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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ scripts/checks/report-error.ts --write-baseline` after fixing (or
tracked on its own ticket opts out instead with a `report-error-ignore:
<reason>` comment on the catch or in its body — that's for a violation
actively being fixed, never a way to clear a baseline entry quietly.
- A package's `browser-safe` subpath (e.g. `@corbits/routines/client`) may
- A package's `browser-safe` subpath (e.g. `@corbits/inbox/client`) may
never import a server-only dependency (`postgres`, `drizzle-orm`,
`hono`, any `@intx/*`) — `check:browser-safe-subpaths` walks the real
import graph from each declared entry point.
Expand Down
12 changes: 6 additions & 6 deletions PRODUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@ for how a workbench's settings relate to its tenant, and

## Routines, through conversation

A **Routine** is the named, recurring (or manual) parent over runs of one
agent definition — a trigger (or none), a delivery destination, and a run
history. Routines are set up and managed from inside conversation, not
from a separate scheduling console: a person names what should happen
again, on what schedule, and where the result should land. See
`packages/routines` for the underlying shape.
A **Routine** is a scheduled workflow — an authored definition whose
frozen projection carries a native `ScheduleTrigger`. Cadence is set
from inside conversation, not from a separate scheduling console: a
person names what should happen again, on what schedule, and where the
result should land. See `@corbits/workflows` for the schedule/cron
helpers and the hub's `workflow-scheduler.ts` for the poller.

## Inbox and approvals

Expand Down
2 changes: 1 addition & 1 deletion VENDORED.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ never a convenience.
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------- | ----------------- |
| `apps/sidecar` | Derived from upstream's own `apps/sidecar`: six modules byte-identical (`default-harness.ts`, `signing-keypair.ts`, `source-asset-delivery.ts`, `workflow-closure-apply.ts`, `workflow-probe-handler.ts`, `workflow-run-pack-restore.ts`), three near-verbatim (`atomic-write.ts` differs only by the repo-wide logger namespace), the rest (`index.ts`, `config.ts`, `tool-materialization.ts`, `step-agent-tools.ts`, `workflow-host-wiring/`, `workflow-substrate-factory/`, …) substantially rewritten, plus workbench-only modules. A living fork, not a frozen copy, so this row carries no tree hash. | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | An app is never npm-published, so no publish can cover the execution host; retired by consuming an upstream-published host, or by renewing this row deliberately | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/agent` | `@intx/agent` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 predates the operator-configurable doom-loop threshold (`afd0c82b`, `c421c092`) the re-vendored `workflow-host` configures; one local delta (CL-7190): `ToolBundle.beforeToolExtension` (`tool.ts`) and its composition into `ResolvedTools.beforeToolExtensions` (`agent.ts`), so a tool package can contribute its own suspend-capable extension without the reactor or director special-casing it by name; retired by the next `@intx/agent` publish | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/db` | `@intx/db` source (`src/`, `migrations/`, drizzle config, manifest, tsconfigs) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 covers the base package but not the `wire_projection` column/loader delta (CL-6324) or the `workflow_definition.origin` column separating a definition from the per-run record of one folded run's deploy (CL-6452), shipped as migrations `0086`/`0087` behind upstream's `0085_add_approval_run_idx`, plus `0088` rewriting the retired `onBodyFailure: "continue"` literal to upstream's `"tolerate"` in stored wire projections; retired when upstream absorbs the deltas | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/db` | `@intx/db` source (`src/`, `migrations/`, drizzle config, manifest, tsconfigs) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 covers the base package but not the `wire_projection` column/loader delta (CL-6324) or the `workflow_definition.origin` column separating a definition from the per-run record of one folded run's deploy (CL-6452), shipped as migrations `0086`/`0087` behind upstream's `0085_add_approval_run_idx`, plus `0088` rewriting the retired `onBodyFailure: "continue"` literal to upstream's `"tolerate"` in stored wire projections, plus `0089` adding `workflow_definition.schedule_claimed_minute` for the hub's native ScheduleTrigger poller (CL-4455); retired when upstream absorbs the deltas | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/harness` | `@intx/harness` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 predates the connector reply drain (`driveConnectorReplies`, `ConnectorReplyDrain`, `AgentEventStream`; `11590e66`) the sidecar's warm mail loop drives; no local delta; retired by the next `@intx/harness` publish | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/hub-agent` | `@intx/hub-agent` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 predates the `agentDir` path export (`927556de`) the sidecar's deploy-tree lookup uses, and its own `@intx/mail-memory`/`@intx/harness` pins must resolve the vendored copies; one local delta (CL-6396): `SessionEventSink` / `publishWorkflowInferenceEvent` stamp optional `childRunId` on `agent.event`; retired by the next publish | sawyer | 2026-10-26 | `check:killdates` |
| `vendor/intx/hub-api` | `@intx/hub-api` source (`src/`, manifest, tsconfig) | [faremeter/interchange](https://github.com/faremeter/interchange) @ `a8bc06ae` (origin/main, 2026-08-27) | npm 0.3.0 covers the base package but not the null-principal `resolveApproval` for policy-resolved decisions (CL-6345) or the bearer-authenticated workflow-deploy mirror (`middleware/workflow-run-deploy-auth.ts`, CL-workflow-deploy-bearer); retired when upstream absorbs the deltas | sawyer | 2026-10-26 | `check:killdates` |
Expand Down
4 changes: 2 additions & 2 deletions apps/hub/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ native tenant middleware.
- Serves the built `apps/web` SPA from its own origin
(`HUB_STATIC_DIR` points at `apps/web/dist`), so every `/api` call the
interface makes is same-origin.
- `credential-expiry-sweep.ts`, `cron-due.ts`, `routine-launcher.ts`,
`routine-scheduler.ts`, `tenant-create-guard.ts` are host-level
- `credential-expiry-sweep.ts`, `cron-due.ts`, `workflow-scheduler.ts`,
`tenant-create-guard.ts` are host-level
background jobs and guards wired at boot, alongside the route mounts.
- `in-flight-requests.ts` and `shutdown.ts` bound SIGINT/SIGTERM: the hub
waits for Hono handlers that have not yet returned a Response (a
Expand Down
1 change: 0 additions & 1 deletion apps/hub/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
"@corbits/notify": "workspace:*",
"@corbits/preferences": "workspace:*",
"@corbits/presence": "workspace:*",
"@corbits/routines": "workspace:*",
"@corbits/run-key-history": "workspace:*",
"@corbits/run-scope": "workspace:*",
"@corbits/sidecar-placement": "workspace:*",
Expand Down
9 changes: 4 additions & 5 deletions apps/hub/src/credential-expiry-sweep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@
// column gets refreshed in place instead — the reconnect nudge is now a
// last resort, sent only when that refresh itself fails.
//
// This mirrors `routine-scheduler.ts`'s own shape: the decision of
// This mirrors the hub's native schedule poller shape: the decision of
// *which* Hugging-Face-style credentials are due lives in
// `@corbits/notify` (`findDueCredentialExpiries`), pure and unit-tested
// there; `CredentialExpirySweepStore` is the same store-behind-an-
// interface seam `@corbits/routines`' `RoutineStore` uses, so this loop's
// own claim/refresh/mail orchestration is testable against an in-memory
// store without a live Postgres.
// there; `CredentialExpirySweepStore` is a store-behind-an-interface
// seam, so this loop's own claim/refresh/mail orchestration is testable
// against an in-memory store without a live Postgres.
//
// Interchange's inference reactor already fails a credential-category
// error over to the next configured source with no changes here — for
Expand Down
9 changes: 4 additions & 5 deletions apps/hub/src/cron-due.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// A re-export of `@corbits/routines`' own cron matcher — the same
// A re-export of `@corbits/workflows`' own cron matcher — the same
// grammar `isValidCronExpression` validates at save time and
// `nextCronFireAt` uses to persist a routine's next fire. Kept as its
// own module (rather than importing `@corbits/routines` at every call
// site in this app) so this hub has one seam onto the shared parser;
// `cronMatchesMinute` uses to decide a native ScheduleTrigger tick.
// Kept as its own module so this hub has one seam onto the shared parser;
// it is never a second implementation of it.
export { cronMatchesMinute, minuteKey } from "@corbits/routines";
export { cronMatchesMinute, minuteKey } from "@corbits/workflows";
10 changes: 7 additions & 3 deletions apps/hub/src/crypto-provider-cache-wiring.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
// that same reference to every mail sender. A second constructor would
// still typecheck; this scan is the pin. crypto-cache.test.ts covers the
// Map; platform-adapter.test.ts covers chat injection only.
//
// CL-4455 removed the custom routine scheduler's `createHubRoutineLauncher`
// call site: a native ScheduleTrigger now fires through
// `triggerNativeWorkflowRoutineRun` (native-workflow-routine-launch.ts),
// which signs its trigger mail with a freshly generated per-call keypair
// rather than the shared cache — there is no longer a fourth mail-sender
// call site to pin here.
import { describe, expect, test } from "bun:test";
import { readdirSync, readFileSync } from "node:fs";
import path from "node:path";
Expand Down Expand Up @@ -67,9 +74,6 @@ describe("hub crypto-provider cache wiring", () => {
expect(firstCall(source, "launchWebhookTrigger")).toContain(
`cryptoProviderCache: ${assigned}`,
);
expect(firstCall(source, "createHubRoutineLauncher")).toContain(
`cryptoProviderCache: ${assigned}`,
);
expect(firstCall(source, "runOneShotFoldedPrompt")).toContain(assigned);
});
});
Loading
Loading