Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .changeset/first-publishable-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@corbits/code-review-workflow": minor
"@corbits/collateral-generation-workflow": minor
"@corbits/connections-tools": minor
"@corbits/credential-expiry-workflow": minor
"@corbits/diligence-brief-workflow": minor
"@corbits/echo-workflow": minor
"@corbits/error-sink": minor
Expand Down
559 changes: 0 additions & 559 deletions apps/hub/src/credential-expiry-sweep.ts

This file was deleted.

33 changes: 4 additions & 29 deletions apps/hub/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ import {
createProviderHealthPort,
createProviderHealthStore,
} from "@corbits/connections/provider-health";
import { createHubNotifyDeliveryDeps } from "./notify-delivery";
import {
createWorkflowAuthorRegistry,
createWorkflowAuthorRoutes,
Expand All @@ -231,10 +230,6 @@ import {
WorkflowAuthorError,
type WorkflowDeployer,
} from "@corbits/workflows";
import {
createCredentialExpirySweep,
createDrizzleCredentialExpirySweepStore,
} from "./credential-expiry-sweep";
import {
createDrizzleServingRefreshStore,
createTenantServingRefresh,
Expand Down Expand Up @@ -2256,29 +2251,10 @@ export async function createHub(config: HubConfig) {
}),
);
// Notify-to-reconnect for an OAuth-connected credential whose token
// expired (Hugging Face today — see docs/onboarding-huggingface-connect.md):
// a light periodic sweep over `@corbits/notify`'s pure
// `findDueCredentialExpiries`, mailing through the hub's notify delivery
// deps (`createHubNotifyDeliveryDeps`). `createInMemoryNotifyDispatchStore`/`createSinkRegistry()`
// mean external sink fan-out (Slack, email) is a no-op until a sink is
// registered — the mailbox row itself is what a person sees in their
// inbox. Requires `@corbits/mailbox`'s and `@corbits/notify`'s own
// migrations applied against `DATABASE_URL`, same as any other
// consumer of this delivery adapter.
const notifyHost = new URL(config.baseUrl).host;
const credentialExpirySweep = createCredentialExpirySweep({
store: createDrizzleCredentialExpirySweepStore(
db,
credentialCipher,
sidecarRouter,
),
hubUrl: config.baseUrl,
notify: createHubNotifyDeliveryDeps({
mailboxDb,
bus: mailboxBus,
host: notifyHost,
}),
});
// expired (Hugging Face today — see docs/onboarding-huggingface-connect.md)
// is now `workflows/credential-expiry` (CL-8181), a schedule-triggered
// workflow deployed like any other Routine rather than a hub-owned
// periodic loop.

// Reopen a snoozed inbox item once its `until` has passed (CL-7208) — a
// light periodic sweep over `@corbits/inbox`'s own snooze table, on the
Expand Down Expand Up @@ -2362,7 +2338,6 @@ export async function createHub(config: HubConfig) {
relaunchSweepSeries += 1;
clearTimeout(relaunchSweepTimer);
chatOrchestrator.dispose();
credentialExpirySweep.stop();
inboxUnsnoozeSweep.stop();
cronEmitter.stop();
await insightsUsage.close();
Expand Down
Loading
Loading