stitchkit 0.126.0 → 0.127.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1636 -0
- package/README.md +12 -4
- package/dist/agent-executor/acp/scenarios.d.ts +4 -0
- package/dist/agent-executor/acp/scenarios.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-connect.d.ts +89 -0
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-driver.d.ts +31 -0
- package/dist/agent-executor/acp/v1-driver.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-map.d.ts +41 -0
- package/dist/agent-executor/acp/v1-map.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts +270 -0
- package/dist/agent-executor/acp/v1-protocol.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-session.d.ts +22 -0
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-turn.d.ts +25 -0
- package/dist/agent-executor/acp/v1-turn.d.ts.map +1 -0
- package/dist/agent-executor/claude/classify.d.ts +54 -0
- package/dist/agent-executor/claude/classify.d.ts.map +1 -0
- package/dist/agent-executor/claude/cli-driver.d.ts +27 -0
- package/dist/agent-executor/claude/cli-driver.d.ts.map +1 -0
- package/dist/agent-executor/claude/limits.d.ts +8 -0
- package/dist/agent-executor/claude/limits.d.ts.map +1 -0
- package/dist/agent-executor/claude/protocol.d.ts +188 -0
- package/dist/agent-executor/claude/protocol.d.ts.map +1 -0
- package/dist/agent-executor/claude/scenarios.d.ts +4 -0
- package/dist/agent-executor/claude/scenarios.d.ts.map +1 -0
- package/dist/agent-executor/claude/session.d.ts +22 -0
- package/dist/agent-executor/claude/session.d.ts.map +1 -0
- package/dist/agent-executor/claude/transcript.d.ts +33 -0
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts +31 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/session.d.ts +10 -0
- package/dist/agent-executor/claude-sdk/session.d.ts.map +1 -0
- package/dist/agent-executor/codex/classify.d.ts +28 -0
- package/dist/agent-executor/codex/classify.d.ts.map +1 -0
- package/dist/agent-executor/codex/driver.d.ts +23 -0
- package/dist/agent-executor/codex/driver.d.ts.map +1 -0
- package/dist/agent-executor/codex/limits.d.ts +4 -0
- package/dist/agent-executor/codex/limits.d.ts.map +1 -0
- package/dist/agent-executor/codex/protocol.d.ts +152 -0
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -0
- package/dist/agent-executor/codex/scenarios.d.ts +4 -0
- package/dist/agent-executor/codex/scenarios.d.ts.map +1 -0
- package/dist/agent-executor/codex/session.d.ts +41 -0
- package/dist/agent-executor/codex/session.d.ts.map +1 -0
- package/dist/agent-executor/contract.d.ts +454 -0
- package/dist/agent-executor/contract.d.ts.map +1 -0
- package/dist/agent-executor/dispatch.d.ts +41 -0
- package/dist/agent-executor/dispatch.d.ts.map +1 -0
- package/dist/agent-executor/engine-process.d.ts +45 -0
- package/dist/agent-executor/engine-process.d.ts.map +1 -0
- package/dist/agent-executor/engine-requests.d.ts +63 -0
- package/dist/agent-executor/engine-requests.d.ts.map +1 -0
- package/dist/agent-executor/engine.d.ts +64 -0
- package/dist/agent-executor/engine.d.ts.map +1 -0
- package/dist/agent-executor/executor-contract.d.ts +387 -0
- package/dist/agent-executor/executor-contract.d.ts.map +1 -0
- package/dist/agent-executor/executor-machine.d.ts +50 -0
- package/dist/agent-executor/executor-machine.d.ts.map +1 -0
- package/dist/agent-executor/hello.d.ts +235 -0
- package/dist/agent-executor/hello.d.ts.map +1 -0
- package/dist/agent-executor/json-rpc-peer.d.ts +48 -0
- package/dist/agent-executor/json-rpc-peer.d.ts.map +1 -0
- package/dist/agent-executor/leases.d.ts +159 -0
- package/dist/agent-executor/leases.d.ts.map +1 -0
- package/dist/agent-executor/plan-limits.d.ts +25 -0
- package/dist/agent-executor/plan-limits.d.ts.map +1 -0
- package/dist/agent-executor/profile.d.ts +52 -0
- package/dist/agent-executor/profile.d.ts.map +1 -0
- package/dist/agent-executor/projection.d.ts +14 -0
- package/dist/agent-executor/projection.d.ts.map +1 -0
- package/dist/agent-executor/session-primitives.d.ts +72 -0
- package/dist/agent-executor/session-primitives.d.ts.map +1 -0
- package/dist/agent-executor/testing/conformance.d.ts +55 -0
- package/dist/agent-executor/testing/conformance.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-claude-engine.d.ts +18 -0
- package/dist/agent-executor/testing/fake-claude-engine.d.ts.map +1 -0
- package/dist/agent-executor/testing/fake-engine.d.ts +52 -0
- package/dist/agent-executor/testing/fake-engine.d.ts.map +1 -0
- package/dist/agent-executor/turn-phases.d.ts +10 -0
- package/dist/agent-executor/turn-phases.d.ts.map +1 -0
- package/dist/agent-executor/vocabulary.d.ts +353 -0
- package/dist/agent-executor/vocabulary.d.ts.map +1 -0
- package/dist/agent-parts/parts.d.ts +160 -0
- package/dist/agent-parts/parts.d.ts.map +1 -0
- package/dist/agent-runtime/agent-tool.d.ts +1 -1
- package/dist/agent-runtime/agent-tool.d.ts.map +1 -1
- package/dist/agent-runtime/archive-projection.d.ts +5 -0
- package/dist/agent-runtime/archive-projection.d.ts.map +1 -1
- package/dist/agent-runtime/branch-contract.d.ts +59 -2
- package/dist/agent-runtime/branch-contract.d.ts.map +1 -1
- package/dist/agent-runtime/branch-events.d.ts +7 -0
- package/dist/agent-runtime/branch-events.d.ts.map +1 -1
- package/dist/agent-runtime/branch-identities.d.ts +40 -6
- package/dist/agent-runtime/branch-identities.d.ts.map +1 -1
- package/dist/agent-runtime/branch-messages.d.ts +11 -29
- package/dist/agent-runtime/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/branch-observations.d.ts +138 -28
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +32 -51
- package/dist/agent-runtime/branch-provider.d.ts.map +1 -1
- package/dist/agent-runtime/branch-refusal.d.ts +60 -0
- package/dist/agent-runtime/branch-refusal.d.ts.map +1 -0
- package/dist/agent-runtime/branch-runtime-tools.d.ts +14 -0
- package/dist/agent-runtime/branch-runtime-tools.d.ts.map +1 -0
- package/dist/agent-runtime/branch-source.d.ts +7 -2
- package/dist/agent-runtime/branch-source.d.ts.map +1 -1
- package/dist/agent-runtime/branch-transitions.d.ts.map +1 -1
- package/dist/agent-runtime/browser-control-contract.d.ts +2 -2
- package/dist/agent-runtime/browser-controller.d.ts.map +1 -1
- package/dist/agent-runtime/child-blocking.d.ts +17 -6
- package/dist/agent-runtime/child-blocking.d.ts.map +1 -1
- package/dist/agent-runtime/child-budget-policy.d.ts +4 -9
- package/dist/agent-runtime/child-budget-policy.d.ts.map +1 -1
- package/dist/agent-runtime/child-tools.d.ts +19 -8
- package/dist/agent-runtime/child-tools.d.ts.map +1 -1
- package/dist/agent-runtime/children-contract.d.ts +84 -3
- package/dist/agent-runtime/children-contract.d.ts.map +1 -1
- package/dist/agent-runtime/children-control.d.ts +23 -2
- package/dist/agent-runtime/children-control.d.ts.map +1 -1
- package/dist/agent-runtime/children-spawn.d.ts +9 -0
- package/dist/agent-runtime/children-spawn.d.ts.map +1 -1
- package/dist/agent-runtime/children-state.d.ts +121 -19
- package/dist/agent-runtime/children-state.d.ts.map +1 -1
- package/dist/agent-runtime/children-usage.d.ts +10 -1
- package/dist/agent-runtime/children-usage.d.ts.map +1 -1
- package/dist/agent-runtime/children.d.ts +3 -3
- package/dist/agent-runtime/children.d.ts.map +1 -1
- package/dist/agent-runtime/{sandbox-coding.d.ts → coding-sandbox.d.ts} +2 -9
- package/dist/agent-runtime/coding-sandbox.d.ts.map +1 -0
- package/dist/agent-runtime/coding-shell-process.d.ts +2 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts +32 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tools.d.ts.map +1 -1
- package/dist/agent-runtime/compaction.d.ts.map +1 -1
- package/dist/agent-runtime/companion-host.d.ts +38 -0
- package/dist/agent-runtime/companion-host.d.ts.map +1 -0
- package/dist/agent-runtime/context-issue.d.ts +5 -0
- package/dist/agent-runtime/context-issue.d.ts.map +1 -0
- package/dist/agent-runtime/control-schema.d.ts +2 -2
- package/dist/agent-runtime/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/conversations.d.ts.map +1 -1
- package/dist/agent-runtime/coordinator.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-types.d.ts +17 -5
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tools-internal.d.ts +2 -0
- package/dist/agent-runtime/deferred-tools-internal.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-durability.d.ts +8 -0
- package/dist/agent-runtime/event-durability.d.ts.map +1 -0
- package/dist/agent-runtime/event-schema.d.ts +13 -5
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/event-search-postgres.d.ts +38 -0
- package/dist/agent-runtime/event-search-postgres.d.ts.map +1 -0
- package/dist/agent-runtime/event-search-terms.d.ts +37 -0
- package/dist/agent-runtime/event-search-terms.d.ts.map +1 -0
- package/dist/agent-runtime/event-search-tools.d.ts +64 -4
- package/dist/agent-runtime/event-search-tools.d.ts.map +1 -1
- package/dist/agent-runtime/event-search.d.ts +16 -3
- package/dist/agent-runtime/event-search.d.ts.map +1 -1
- package/dist/agent-runtime/fault-bench.d.ts.map +1 -1
- package/dist/agent-runtime/harness-control.d.ts +8 -0
- package/dist/agent-runtime/harness-control.d.ts.map +1 -1
- package/dist/agent-runtime/harness-realtime.d.ts +0 -2
- package/dist/agent-runtime/harness-realtime.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-schema.d.ts +23 -0
- package/dist/agent-runtime/invocation-schema.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-spend.d.ts +9 -0
- package/dist/agent-runtime/invocation-spend.d.ts.map +1 -0
- package/dist/agent-runtime/invocations.d.ts.map +1 -1
- package/dist/agent-runtime/managed-tools.d.ts +2 -2
- package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
- package/dist/agent-runtime/observability.d.ts +42 -4
- package/dist/agent-runtime/observability.d.ts.map +1 -1
- package/dist/agent-runtime/openrouter-admission.d.ts +81 -0
- package/dist/agent-runtime/openrouter-admission.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-catalog.d.ts +83 -0
- package/dist/agent-runtime/openrouter-catalog.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-models.d.ts +66 -0
- package/dist/agent-runtime/openrouter-models.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-options.d.ts +106 -0
- package/dist/agent-runtime/openrouter-options.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-route.d.ts +50 -0
- package/dist/agent-runtime/openrouter-route.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter-spend.d.ts +24 -0
- package/dist/agent-runtime/openrouter-spend.d.ts.map +1 -0
- package/dist/agent-runtime/openrouter.d.ts +23 -2
- package/dist/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/agent-runtime/owned-provider-stream.d.ts.map +1 -1
- package/dist/agent-runtime/postgres-schema.d.ts +34 -0
- package/dist/agent-runtime/postgres-schema.d.ts.map +1 -0
- package/dist/agent-runtime/postgres-transactions.d.ts +54 -0
- package/dist/agent-runtime/postgres-transactions.d.ts.map +1 -0
- package/dist/agent-runtime/postgres.d.ts +72 -0
- package/dist/agent-runtime/postgres.d.ts.map +1 -0
- package/dist/agent-runtime/projections.d.ts +57 -17
- package/dist/agent-runtime/projections.d.ts.map +1 -1
- package/dist/agent-runtime/provider-journal.d.ts +57 -0
- package/dist/agent-runtime/provider-journal.d.ts.map +1 -1
- package/dist/agent-runtime/purge.d.ts.map +1 -1
- package/dist/agent-runtime/retry-policy.d.ts +6 -0
- package/dist/agent-runtime/retry-policy.d.ts.map +1 -1
- package/dist/agent-runtime/run-acquisition.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution-state.d.ts +26 -2
- package/dist/agent-runtime/run-execution-state.d.ts.map +1 -1
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/run-failure.d.ts.map +1 -1
- package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -1
- package/dist/agent-runtime/run-provider-ledger.d.ts +2 -0
- package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -1
- package/dist/agent-runtime/run-step-barriers.d.ts +72 -0
- package/dist/agent-runtime/run-step-barriers.d.ts.map +1 -0
- package/dist/agent-runtime/run-step-spend.d.ts +319 -0
- package/dist/agent-runtime/run-step-spend.d.ts.map +1 -0
- package/dist/agent-runtime/run-stream-parts.d.ts +2 -0
- package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/{tool-progress.d.ts → run-tool-progress.d.ts} +1 -1
- package/dist/agent-runtime/run-tool-progress.d.ts.map +1 -0
- package/dist/agent-runtime/run-turn-preparation.d.ts +3 -1
- package/dist/agent-runtime/run-turn-preparation.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-admission-gate.d.ts +0 -14
- package/dist/agent-runtime/runtime-admission-gate.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +6 -0
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-state.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +31 -2
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-binding.d.ts +10 -0
- package/dist/agent-runtime/sandbox-binding.d.ts.map +1 -0
- package/dist/agent-runtime/sandbox-bubblewrap-storage.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-contract.d.ts +1 -1
- package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox.d.ts +5 -0
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-contract.d.ts +3 -2
- package/dist/agent-runtime/schedule-contract.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-dispatch.d.ts +3 -2
- package/dist/agent-runtime/schedule-dispatch.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-records.d.ts +6 -6
- package/dist/agent-runtime/schedule-records.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-tools.d.ts +19 -8
- package/dist/agent-runtime/schedule-tools.d.ts.map +1 -1
- package/dist/agent-runtime/schedules.d.ts +13 -3
- package/dist/agent-runtime/schedules.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-message.d.ts +118 -0
- package/dist/agent-runtime/schemas-message.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-provider.d.ts +8 -0
- package/dist/agent-runtime/schemas-provider.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-records.d.ts +5 -0
- package/dist/agent-runtime/schemas-records.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-run.d.ts +487 -0
- package/dist/agent-runtime/schemas-run.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-usage.d.ts +129 -0
- package/dist/agent-runtime/schemas-usage.d.ts.map +1 -0
- package/dist/agent-runtime/schemas.d.ts +11 -886
- package/dist/agent-runtime/schemas.d.ts.map +1 -1
- package/dist/agent-runtime/spill.d.ts +9 -7
- package/dist/agent-runtime/spill.d.ts.map +1 -1
- package/dist/agent-runtime/sql-events.d.ts +6 -0
- package/dist/agent-runtime/sql-events.d.ts.map +1 -0
- package/dist/agent-runtime/sql-history.d.ts +8 -0
- package/dist/agent-runtime/sql-history.d.ts.map +1 -0
- package/dist/agent-runtime/sql-ledger.d.ts +5 -0
- package/dist/agent-runtime/sql-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/sql-purge.d.ts +13 -0
- package/dist/agent-runtime/sql-purge.d.ts.map +1 -0
- package/dist/agent-runtime/sql-reads.d.ts +16 -0
- package/dist/agent-runtime/sql-reads.d.ts.map +1 -0
- package/dist/agent-runtime/{sqlite-rows.d.ts → sql-rows.d.ts} +24 -10
- package/dist/agent-runtime/sql-rows.d.ts.map +1 -0
- package/dist/agent-runtime/sql-session.d.ts +71 -0
- package/dist/agent-runtime/sql-session.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-bun.d.ts +1 -1
- package/dist/agent-runtime/sqlite-bun.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-node.d.ts +1 -1
- package/dist/agent-runtime/sqlite-node.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-purge.d.ts +2 -3
- package/dist/agent-runtime/sqlite-purge.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-schema.d.ts +1 -1
- package/dist/agent-runtime/sqlite-schema.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-transactions.d.ts +10 -6
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite.d.ts +10 -29
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/state-tools.d.ts +8 -4
- package/dist/agent-runtime/state-tools.d.ts.map +1 -1
- package/dist/agent-runtime/store-archive.d.ts.map +1 -1
- package/dist/agent-runtime/store-branch.d.ts +6 -1
- package/dist/agent-runtime/store-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-capabilities.d.ts +42 -0
- package/dist/agent-runtime/store-capabilities.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-branch.d.ts +5 -2
- package/dist/agent-runtime/store-conformance-branch.d.ts.map +1 -1
- package/dist/agent-runtime/store-conformance-capabilities.d.ts +6 -0
- package/dist/agent-runtime/store-conformance-capabilities.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-event-once.d.ts +12 -0
- package/dist/agent-runtime/store-conformance-event-once.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +20 -20
- package/dist/agent-runtime/store-conformance-seed.d.ts +8 -0
- package/dist/agent-runtime/store-conformance-seed.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance.d.ts +31 -8
- package/dist/agent-runtime/store-conformance.d.ts.map +1 -1
- package/dist/agent-runtime/store-create.d.ts +1 -1
- package/dist/agent-runtime/store-create.d.ts.map +1 -1
- package/dist/agent-runtime/store-driver-contract.d.ts +15 -8
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/store-event-once.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +114 -0
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory-archive.d.ts +2 -0
- package/dist/agent-runtime/store-memory-archive.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory.d.ts +2 -2
- package/dist/agent-runtime/store-memory.d.ts.map +1 -1
- package/dist/agent-runtime/store-mutate.d.ts.map +1 -1
- package/dist/agent-runtime/store-reduce-shared.d.ts +2 -1
- package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -1
- package/dist/agent-runtime/store-reducer.d.ts.map +1 -1
- package/dist/agent-runtime/store-replay.d.ts.map +1 -1
- package/dist/agent-runtime/store.d.ts +15 -2
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +10 -10
- package/dist/application/admission-run.d.ts.map +1 -1
- package/dist/application/admission.d.ts.map +1 -1
- package/dist/application/change-subscription.d.ts.map +1 -1
- package/dist/application/decisions.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-lock-format.d.ts +9 -0
- package/dist/application/diagnostic-journal-lock-format.d.ts.map +1 -0
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/directory-inbox-delivery.d.ts.map +1 -1
- package/dist/application/grammy-update-admission.d.ts.map +1 -1
- package/dist/application/health.d.ts.map +1 -1
- package/dist/application/kernel-admission.d.ts.map +1 -1
- package/dist/application/kernel-contract.d.ts.map +1 -1
- package/dist/application/kernel-restart.d.ts.map +1 -1
- package/dist/application/kernel-rollback.d.ts.map +1 -1
- package/dist/application/kernel-shutdown.d.ts.map +1 -1
- package/dist/application/kernel-state.d.ts.map +1 -1
- package/dist/application/notification-outbox-state.d.ts.map +1 -1
- package/dist/application/notification-outbox.d.ts +1 -1
- package/dist/application/notification-outbox.d.ts.map +1 -1
- package/dist/application/revision-signal.d.ts.map +1 -1
- package/dist/application/schedule-run.d.ts.map +1 -1
- package/dist/application/schedule.d.ts.map +1 -1
- package/dist/application/sqlite-migrations.d.ts +104 -0
- package/dist/application/sqlite-migrations.d.ts.map +1 -0
- package/dist/application/watch-hub-core.d.ts.map +1 -1
- package/dist/browser/bridge-errors.d.ts +24 -0
- package/dist/browser/bridge-errors.d.ts.map +1 -0
- package/dist/browser/bridge-fetch.d.ts +30 -0
- package/dist/browser/bridge-fetch.d.ts.map +1 -0
- package/dist/browser/bridge-inbound.d.ts +28 -0
- package/dist/browser/bridge-inbound.d.ts.map +1 -0
- package/dist/browser/cancellation.d.ts +10 -2
- package/dist/browser/cancellation.d.ts.map +1 -1
- package/dist/browser/chunked-upload.d.ts +1 -1
- package/dist/browser/chunked-upload.d.ts.map +1 -1
- package/dist/browser/client-call-arguments.d.ts +31 -0
- package/dist/browser/client-call-arguments.d.ts.map +1 -0
- package/dist/browser/client-executors.d.ts +6 -0
- package/dist/browser/client-executors.d.ts.map +1 -1
- package/dist/browser/client.d.ts +9 -0
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/http.d.ts +17 -2
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/realtime-client.d.ts +0 -5
- package/dist/browser/realtime-client.d.ts.map +1 -1
- package/dist/browser/session-credentials-storage.d.ts +48 -0
- package/dist/browser/session-credentials-storage.d.ts.map +1 -0
- package/dist/browser/session-credentials.d.ts +26 -5
- package/dist/browser/session-credentials.d.ts.map +1 -1
- package/dist/browser/session-refresh-policy.d.ts +124 -0
- package/dist/browser/session-refresh-policy.d.ts.map +1 -0
- package/dist/browser/session-refresh-timer.d.ts +30 -0
- package/dist/browser/session-refresh-timer.d.ts.map +1 -0
- package/dist/browser/session.d.ts.map +1 -1
- package/dist/browser/socket-io-connection.d.ts.map +1 -1
- package/dist/browser/socket-io-explicit-peer.d.ts +0 -1
- package/dist/browser/socket-io-explicit-peer.d.ts.map +1 -1
- package/dist/browser/stream.d.ts +1 -1
- package/dist/browser/stream.d.ts.map +1 -1
- package/dist/browser/upload-progress.d.ts +3 -0
- package/dist/browser/upload-progress.d.ts.map +1 -1
- package/dist/contract/bridge-envelope.d.ts +155 -0
- package/dist/contract/bridge-envelope.d.ts.map +1 -0
- package/dist/contract/define-validation.d.ts +2 -0
- package/dist/contract/define-validation.d.ts.map +1 -1
- package/dist/contract/define.d.ts +3 -0
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/errors.d.ts +4 -4
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/contract/normalize.d.ts +3 -1
- package/dist/contract/normalize.d.ts.map +1 -1
- package/dist/contract/operation-effect.d.ts +29 -0
- package/dist/contract/operation-effect.d.ts.map +1 -0
- package/dist/contract/runtime-context.d.ts +2 -0
- package/dist/contract/runtime-context.d.ts.map +1 -1
- package/dist/contract/tool-options.d.ts +7 -0
- package/dist/contract/tool-options.d.ts.map +1 -1
- package/dist/declaration/command.d.ts +26 -0
- package/dist/declaration/command.d.ts.map +1 -0
- package/dist/declaration/declaration.d.ts +4 -22
- package/dist/declaration/declaration.d.ts.map +1 -1
- package/dist/declaration/machine-names.d.ts +11 -0
- package/dist/declaration/machine-names.d.ts.map +1 -0
- package/dist/durability/effect.d.ts.map +1 -1
- package/dist/durability/engine.d.ts.map +1 -1
- package/dist/durability/events.d.ts +5 -8
- package/dist/durability/events.d.ts.map +1 -1
- package/dist/durability/parks.d.ts +0 -5
- package/dist/durability/parks.d.ts.map +1 -1
- package/dist/durability/scheduler.d.ts +5 -0
- package/dist/durability/scheduler.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.d.ts +4 -0
- package/dist/entrypoints/agent-executor/acp.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/acp.js +910 -0
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts +2 -0
- package/dist/entrypoints/agent-executor/claude-sdk.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/claude-sdk.js +309 -0
- package/dist/entrypoints/agent-executor/claude.d.ts +5 -0
- package/dist/entrypoints/agent-executor/claude.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/claude.js +403 -0
- package/dist/entrypoints/agent-executor/codex.d.ts +4 -0
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/codex.js +798 -0
- package/dist/entrypoints/agent-executor/testing.d.ts +4 -0
- package/dist/entrypoints/agent-executor/testing.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor/testing.js +375 -0
- package/dist/entrypoints/agent-executor.d.ts +15 -0
- package/dist/entrypoints/agent-executor.d.ts.map +1 -0
- package/dist/entrypoints/agent-executor.js +455 -0
- package/dist/entrypoints/agent-runtime/browser.d.ts +1 -0
- package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +60 -30
- package/dist/entrypoints/agent-runtime/coding-tools.js +9 -12
- package/dist/entrypoints/agent-runtime/harness.js +35 -22
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +6 -0
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/openrouter.js +675 -45
- package/dist/entrypoints/agent-runtime/postgres.d.ts +4 -0
- package/dist/entrypoints/agent-runtime/postgres.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/postgres.js +330 -0
- package/dist/entrypoints/agent-runtime/realtime.js +46 -49
- package/dist/entrypoints/agent-runtime/sandbox.d.ts +3 -1
- package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/sandbox.js +74 -67
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +18 -18
- package/dist/entrypoints/agent-runtime/sqlite/node.js +18 -18
- package/dist/entrypoints/agent-runtime/testing.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/testing.js +394 -95
- package/dist/entrypoints/agent-runtime.d.ts +21 -13
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +1280 -1086
- package/dist/entrypoints/application/diagnostic-journal.js +16 -11
- package/dist/entrypoints/application/directory-inbox.js +20 -14
- package/dist/entrypoints/application/grammy.js +11 -8
- package/dist/entrypoints/application/opentelemetry.js +3 -3
- package/dist/entrypoints/application.d.ts +4 -2
- package/dist/entrypoints/application.d.ts.map +1 -1
- package/dist/entrypoints/application.js +409 -108
- package/dist/entrypoints/bin/upgrade-cli.d.ts +0 -12
- package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -1
- package/dist/entrypoints/bin/upgrade-cli.js +11 -7
- package/dist/entrypoints/cli/publish.js +10 -9
- package/dist/entrypoints/cli.d.ts +10 -3
- package/dist/entrypoints/cli.d.ts.map +1 -1
- package/dist/entrypoints/cli.js +91 -29
- package/dist/entrypoints/contract.d.ts +2 -1
- package/dist/entrypoints/contract.d.ts.map +1 -1
- package/dist/entrypoints/contract.js +13 -7
- package/dist/entrypoints/declaration.d.ts +2 -0
- package/dist/entrypoints/declaration.d.ts.map +1 -1
- package/dist/entrypoints/declaration.js +55 -44
- package/dist/entrypoints/files/packaging.js +8 -5
- package/dist/entrypoints/files.d.ts +5 -0
- package/dist/entrypoints/files.d.ts.map +1 -1
- package/dist/entrypoints/files.js +236 -47
- package/dist/entrypoints/geo.js +9 -4
- package/dist/entrypoints/google.js +14 -13
- package/dist/entrypoints/handler.d.ts +12 -0
- package/dist/entrypoints/handler.d.ts.map +1 -0
- package/dist/entrypoints/handler.js +350 -0
- package/dist/entrypoints/http.d.ts +4 -0
- package/dist/entrypoints/http.d.ts.map +1 -1
- package/dist/entrypoints/http.js +411 -5
- package/dist/entrypoints/index.d.ts +2 -0
- package/dist/entrypoints/index.d.ts.map +1 -1
- package/dist/entrypoints/index.js +664 -91
- package/dist/entrypoints/live.js +22 -12
- package/dist/entrypoints/node.d.ts +2 -1
- package/dist/entrypoints/node.d.ts.map +1 -1
- package/dist/entrypoints/node.js +34 -25
- package/dist/entrypoints/observability.d.ts +2 -0
- package/dist/entrypoints/observability.d.ts.map +1 -1
- package/dist/entrypoints/observability.js +205 -131
- package/dist/entrypoints/primitives.js +152 -14
- package/dist/entrypoints/process/owner-loss.js +2 -2
- package/dist/entrypoints/process.js +18 -92
- package/dist/entrypoints/react.js +6 -5
- package/dist/entrypoints/realtime.d.ts +1 -0
- package/dist/entrypoints/realtime.d.ts.map +1 -1
- package/dist/entrypoints/realtime.js +6 -3
- package/dist/entrypoints/release.js +4 -0
- package/dist/entrypoints/remote.js +7 -6
- package/dist/entrypoints/server.d.ts +3 -1
- package/dist/entrypoints/server.d.ts.map +1 -1
- package/dist/entrypoints/server.js +295 -194
- package/dist/entrypoints/service-host/macos.d.ts +16 -0
- package/dist/entrypoints/service-host/macos.d.ts.map +1 -0
- package/dist/entrypoints/service-host/macos.js +1998 -0
- package/dist/entrypoints/service-host.d.ts +23 -0
- package/dist/entrypoints/service-host.d.ts.map +1 -0
- package/dist/entrypoints/service-host.js +2544 -0
- package/dist/entrypoints/spend/testing.d.ts +2 -0
- package/dist/entrypoints/spend/testing.d.ts.map +1 -0
- package/dist/entrypoints/spend/testing.js +442 -0
- package/dist/entrypoints/spend.d.ts +8 -0
- package/dist/entrypoints/spend.d.ts.map +1 -0
- package/dist/entrypoints/spend.js +593 -0
- package/dist/entrypoints/sync/postgres.d.ts +12 -0
- package/dist/entrypoints/sync/postgres.d.ts.map +1 -0
- package/dist/entrypoints/sync/postgres.js +737 -0
- package/dist/entrypoints/sync.d.ts +12 -0
- package/dist/entrypoints/sync.d.ts.map +1 -0
- package/dist/entrypoints/sync.js +782 -0
- package/dist/entrypoints/telegram/grammy.js +5 -5
- package/dist/entrypoints/telegram/html.d.ts +2 -0
- package/dist/entrypoints/telegram/html.d.ts.map +1 -1
- package/dist/entrypoints/telegram/html.js +839 -2
- package/dist/entrypoints/telegram/screens.js +13 -15
- package/dist/entrypoints/telegram.d.ts +1 -1
- package/dist/entrypoints/telegram.d.ts.map +1 -1
- package/dist/entrypoints/telegram.js +286 -76
- package/dist/entrypoints/testing.js +33 -41
- package/dist/entrypoints/tools/agent.js +12 -9
- package/dist/entrypoints/tools/connections.js +664 -63
- package/dist/entrypoints/tools/contract.d.ts +2 -2
- package/dist/entrypoints/tools/contract.js +4 -1
- package/dist/entrypoints/tools/invoker.js +9 -7
- package/dist/entrypoints/tools/mcp.js +16 -13
- package/dist/entrypoints/tools/toolkit.js +21 -18
- package/dist/entrypoints/tools.d.ts +3 -1
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +105 -92
- package/dist/entrypoints/tracking/contract.js +2 -1
- package/dist/entrypoints/tracking/performance.js +4 -0
- package/dist/entrypoints/tracking.js +6 -1
- package/dist/entrypoints/voice.js +3 -3
- package/dist/entrypoints/xlsx.js +1 -1
- package/dist/files/boundary.d.ts.map +1 -1
- package/dist/files/chunk-spool.d.ts +27 -0
- package/dist/files/chunk-spool.d.ts.map +1 -1
- package/dist/files/directory-appearance.d.ts +44 -0
- package/dist/files/directory-appearance.d.ts.map +1 -0
- package/dist/files/file-io.d.ts.map +1 -1
- package/dist/files/file-stamp.d.ts +35 -0
- package/dist/files/file-stamp.d.ts.map +1 -0
- package/dist/files/json-file-reading.d.ts +37 -0
- package/dist/files/json-file-reading.d.ts.map +1 -0
- package/dist/files/native-packaging.d.ts.map +1 -1
- package/dist/files/polled-json.d.ts +121 -0
- package/dist/files/polled-json.d.ts.map +1 -0
- package/dist/files/regular-file.d.ts +125 -0
- package/dist/files/regular-file.d.ts.map +1 -0
- package/dist/geo/index.d.ts +2 -1
- package/dist/geo/index.d.ts.map +1 -1
- package/dist/geo/resolver.d.ts.map +1 -1
- package/dist/geo/types.d.ts +0 -1
- package/dist/geo/types.d.ts.map +1 -1
- package/dist/google/google.d.ts +6 -0
- package/dist/google/google.d.ts.map +1 -1
- package/dist/{index-w0eqdhyd.js → index-09f7w2qq.js} +6 -1
- package/dist/index-0djnptn8.js +501 -0
- package/dist/index-0hdm5sx6.js +1457 -0
- package/dist/{index-t05a2ry4.js → index-0p0s5hrj.js} +8 -14
- package/dist/{index-1c945ten.js → index-0r15pkjq.js} +1 -1
- package/dist/{index-v1swr26p.js → index-0tyt97nk.js} +2 -2
- package/dist/{index-332d0m9g.js → index-0x4mnwg5.js} +4 -0
- package/dist/index-118aebbg.js +48 -0
- package/dist/index-1q0n6zek.js +184 -0
- package/dist/index-27hck3z2.js +307 -0
- package/dist/index-2rf33y2h.js +77 -0
- package/dist/index-360j58vb.js +63 -0
- package/dist/{index-tt30h7mr.js → index-39n02e0q.js} +1 -1
- package/dist/index-3agqmmrg.js +42 -0
- package/dist/{index-n6hvd1r2.js → index-3b31z0pc.js} +22 -15
- package/dist/index-3djgv3ch.js +472 -0
- package/dist/{index-mfntvj58.js → index-3dq8466w.js} +1 -1
- package/dist/index-3gwp8ez6.js +200 -0
- package/dist/{index-x2d51zay.js → index-3ypvpkwr.js} +309 -345
- package/dist/index-4gk6k3zc.js +248 -0
- package/dist/index-4qvyhn23.js +40 -0
- package/dist/index-4s2w4g37.js +647 -0
- package/dist/index-4ynw5ktx.js +78 -0
- package/dist/index-5awtbyns.js +19 -0
- package/dist/{index-kxff9e9w.js → index-5e0zsbf7.js} +5 -4
- package/dist/{index-nz06qw5a.js → index-5jyjb4s0.js} +1 -1
- package/dist/{index-7zksb1ty.js → index-5ptwb6ka.js} +1 -1
- package/dist/{index-w3nv6kr8.js → index-5q0qpw3v.js} +54 -9
- package/dist/{index-mm89hd8v.js → index-5t4fpdct.js} +1 -1
- package/dist/{index-0v9xb8pz.js → index-5y7j383h.js} +5 -5
- package/dist/index-5zwac8ft.js +221 -0
- package/dist/{index-v62cpkx3.js → index-6g85s734.js} +1 -1
- package/dist/{index-sqc6ezrb.js → index-6kec3b14.js} +17 -4
- package/dist/{index-kqnd6a85.js → index-7416mhyh.js} +1 -1
- package/dist/{index-m0wsfmrc.js → index-7csn6pva.js} +37 -24
- package/dist/{index-dqpesdck.js → index-7grgs8cx.js} +25 -5
- package/dist/{index-jjvr9f15.js → index-7kfcb576.js} +129 -39
- package/dist/{index-cvjddnvd.js → index-7xp05h20.js} +19 -10
- package/dist/{index-48acz7z0.js → index-83n766x4.js} +91 -50
- package/dist/{index-ss67fxhj.js → index-877e9y8r.js} +7 -7
- package/dist/{index-aw6kx2e6.js → index-8gmmdz7k.js} +1 -1
- package/dist/{index-wt6rw7rf.js → index-8xr2eq99.js} +29 -21
- package/dist/{index-rz3z13e9.js → index-97q9kykw.js} +1 -1
- package/dist/index-97rp94ff.js +8 -0
- package/dist/{index-0w0hxp7n.js → index-9pv126eh.js} +3 -9
- package/dist/{index-x2rvpbtj.js → index-9wh98cpa.js} +110 -16
- package/dist/{index-egg0yp2j.js → index-9xr44d2g.js} +86 -210
- package/dist/{index-b2sey031.js → index-9y0afd5f.js} +24 -23
- package/dist/index-a725ayvz.js +405 -0
- package/dist/{index-nmaqxdx7.js → index-ac5rj3d4.js} +203 -90
- package/dist/{index-wqzw3qg9.js → index-agy5fqgf.js} +32 -13
- package/dist/index-ajmtxsky.js +193 -0
- package/dist/{index-ndjzbt2v.js → index-akf0xkrm.js} +4 -3
- package/dist/index-akfgymyr.js +8 -0
- package/dist/index-apv5xfef.js +13 -0
- package/dist/index-ax3wns1a.js +93 -0
- package/dist/{index-ft2wvst5.js → index-bbzvrq66.js} +1603 -342
- package/dist/index-bh4pmtr9.js +317 -0
- package/dist/{index-fa53vygr.js → index-bmaz3jzy.js} +3 -3
- package/dist/{index-8kzct1d6.js → index-bn2baakz.js} +143 -143
- package/dist/{index-m8ddk770.js → index-brhhaygm.js} +1 -1
- package/dist/index-caywx1c0.js +199 -0
- package/dist/index-cbhxhma2.js +90 -0
- package/dist/index-cfnmvcq8.js +11 -0
- package/dist/index-cv9b7fz2.js +42 -0
- package/dist/index-d4svrknj.js +156 -0
- package/dist/{index-a3z56mtn.js → index-d96c1n1q.js} +5 -3
- package/dist/{index-3ymcmpa9.js → index-dvd1qdwa.js} +33 -163
- package/dist/{index-v7rbjatr.js → index-dwa6pskj.js} +1837 -1151
- package/dist/{index-ne4j9998.js → index-e06z0tkb.js} +123 -94
- package/dist/{index-99nnsz39.js → index-en8e5zsj.js} +15 -135
- package/dist/index-fcw255hd.js +929 -0
- package/dist/{index-20hn8pbh.js → index-fmzg39a8.js} +1 -1
- package/dist/{index-fvd6pvw3.js → index-g1q7fwn9.js} +2 -2
- package/dist/index-g56ht6qf.js +98 -0
- package/dist/{index-f56ct5gb.js → index-gj1rjf78.js} +4 -3
- package/dist/{index-g6a3na27.js → index-gnjgkecx.js} +7 -3
- package/dist/index-hy4653g4.js +345 -0
- package/dist/index-j13gzgdv.js +403 -0
- package/dist/{index-pa9bhefy.js → index-j516jaaz.js} +37 -11
- package/dist/{index-t8jz0e20.js → index-j903yhp4.js} +30 -38
- package/dist/{index-9ypczvpj.js → index-jb4m241t.js} +2 -0
- package/dist/index-jrka9029.js +177 -0
- package/dist/{index-cjzaj7ev.js → index-jxtg307y.js} +23 -21
- package/dist/index-kmbpej2y.js +1152 -0
- package/dist/{index-bz9cmnqq.js → index-kt6dh1n6.js} +4 -4
- package/dist/index-ky3ardqn.js +80 -0
- package/dist/index-kyejf658.js +14 -0
- package/dist/{index-zyc64nbh.js → index-kynwa08q.js} +52 -47
- package/dist/index-kzavdze2.js +15 -0
- package/dist/{index-m200b8hs.js → index-mbd92r1w.js} +5 -3
- package/dist/index-mxt0wfjy.js +58 -0
- package/dist/{index-9cxxfkhb.js → index-n20tybgk.js} +14 -9
- package/dist/index-nbv44x0x.js +250 -0
- package/dist/index-ngwf1s3c.js +51 -0
- package/dist/{index-zfncctjp.js → index-nk0cy9g1.js} +5 -4
- package/dist/index-p1m9djt6.js +108 -0
- package/dist/{index-hs76yzt7.js → index-paff5y0r.js} +17 -11
- package/dist/{index-qaet40b2.js → index-prf6ayhf.js} +5 -7
- package/dist/{index-hkxgennw.js → index-ps3djm8d.js} +7 -1
- package/dist/{index-1v3k5zgx.js → index-qnzhmk2s.js} +528 -1129
- package/dist/{index-3bzk2645.js → index-r9kq5ark.js} +1 -1
- package/dist/{index-hkw233vx.js → index-rbd2rq3z.js} +2 -2
- package/dist/{index-r0xr7y4m.js → index-rhb33thr.js} +138 -33
- package/dist/{index-kffm4r8w.js → index-rj32hkkp.js} +2 -2
- package/dist/index-rptj3qnc.js +96 -0
- package/dist/{index-hqsbtvta.js → index-rpyn7geq.js} +11 -3
- package/dist/{index-m9hb9wnk.js → index-sfzfd2m2.js} +2 -2
- package/dist/{index-sqkttz7z.js → index-sv5svtq7.js} +1 -1
- package/dist/{index-srs8hj9c.js → index-sx3g49y2.js} +5 -1
- package/dist/{index-9mjrnqxs.js → index-t1a2jrg7.js} +21 -91
- package/dist/{index-a6w6mwda.js → index-tazm4dxf.js} +1 -1
- package/dist/{index-b51tzcgh.js → index-tf70nm22.js} +2 -2
- package/dist/index-ttexdtjj.js +28 -0
- package/dist/{index-103dp7fz.js → index-v37b2cd6.js} +1956 -3151
- package/dist/{index-0ndz5r8z.js → index-v59pxmf1.js} +17 -9
- package/dist/{index-rfkh44ss.js → index-vgytj9wp.js} +1 -1
- package/dist/{index-tnnmekgb.js → index-wa6h4tz6.js} +3 -3
- package/dist/{index-4efxzrht.js → index-wavv538x.js} +211 -196
- package/dist/{index-1szhrfsf.js → index-wbnpa8z6.js} +7 -5
- package/dist/index-werjqesf.js +43 -0
- package/dist/{index-7qyv50r4.js → index-wv8dqy7q.js} +2 -2
- package/dist/index-wz392jyz.js +10 -0
- package/dist/{index-1d7s7da0.js → index-x6sp5vpa.js} +36 -5
- package/dist/{index-bqzgaj57.js → index-x90w78yz.js} +183 -61
- package/dist/index-xgae0bn7.js +37 -0
- package/dist/index-xmr47znh.js +160 -0
- package/dist/{index-ftk3838x.js → index-xq4s9mka.js} +7 -2
- package/dist/{index-ww3gss55.js → index-xrgn784x.js} +1 -1
- package/dist/{index-fpwbskp2.js → index-xtby8rj3.js} +1 -1
- package/dist/index-xtkw9866.js +107 -0
- package/dist/{index-btjwc7xr.js → index-xypxnzhp.js} +15 -14
- package/dist/{index-yex7eg1v.js → index-y7sy1xdp.js} +6 -2
- package/dist/index-z4k0hqp9.js +476 -0
- package/dist/{index-a7ebd769.js → index-zwgwyvdt.js} +3 -3
- package/dist/internal/abort-error.d.ts +9 -0
- package/dist/internal/abort-error.d.ts.map +1 -0
- package/dist/internal/abort-race.d.ts +47 -4
- package/dist/internal/abort-race.d.ts.map +1 -1
- package/dist/internal/atomic-file.d.ts +19 -0
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/backoff.d.ts.map +1 -1
- package/dist/internal/bounded-body.d.ts +37 -1
- package/dist/internal/bounded-body.d.ts.map +1 -1
- package/dist/internal/bounded-file-read.d.ts +31 -15
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/internal/bun-command.d.ts +11 -0
- package/dist/internal/bun-command.d.ts.map +1 -1
- package/dist/internal/channel.d.ts.map +1 -1
- package/dist/internal/darwin-binding-error.d.ts.map +1 -1
- package/dist/internal/darwin-binding.d.ts +10 -0
- package/dist/internal/darwin-binding.d.ts.map +1 -1
- package/dist/internal/deadline.d.ts +22 -2
- package/dist/internal/deadline.d.ts.map +1 -1
- package/dist/internal/exclusive-lock-owner.d.ts +20 -1
- package/dist/internal/exclusive-lock-owner.d.ts.map +1 -1
- package/dist/internal/exclusive-lock-read.d.ts +2 -0
- package/dist/internal/exclusive-lock-read.d.ts.map +1 -1
- package/dist/internal/exclusive-lock.d.ts +26 -0
- package/dist/internal/exclusive-lock.d.ts.map +1 -1
- package/dist/internal/file-observation.d.ts +49 -0
- package/dist/internal/file-observation.d.ts.map +1 -1
- package/dist/internal/json-response.d.ts +10 -0
- package/dist/internal/json-response.d.ts.map +1 -0
- package/dist/internal/open-descriptors.d.ts +5 -0
- package/dist/internal/open-descriptors.d.ts.map +1 -1
- package/dist/internal/optional-peer.d.ts.map +1 -1
- package/dist/internal/pinned-http.d.ts.map +1 -1
- package/dist/internal/positive-integer.d.ts +14 -6
- package/dist/internal/positive-integer.d.ts.map +1 -1
- package/dist/internal/postgres-query.d.ts +16 -0
- package/dist/internal/postgres-query.d.ts.map +1 -0
- package/dist/internal/process-identity.d.ts +21 -1
- package/dist/internal/process-identity.d.ts.map +1 -1
- package/dist/internal/process-instance.d.ts +6 -0
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/request.d.ts +4 -0
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/secret-equal.d.ts +11 -0
- package/dist/internal/secret-equal.d.ts.map +1 -0
- package/dist/internal/secure-fetch.d.ts.map +1 -1
- package/dist/internal/sqlite.d.ts +8 -0
- package/dist/internal/sqlite.d.ts.map +1 -1
- package/dist/internal/timers.d.ts +20 -0
- package/dist/internal/timers.d.ts.map +1 -1
- package/dist/internal/typed.d.ts +11 -0
- package/dist/internal/typed.d.ts.map +1 -1
- package/dist/internal/unix-client-error.d.ts +21 -0
- package/dist/internal/unix-client-error.d.ts.map +1 -0
- package/dist/internal/unix-socket-lock.d.ts +23 -0
- package/dist/internal/unix-socket-lock.d.ts.map +1 -0
- package/dist/internal/unix-socket.d.ts +60 -0
- package/dist/internal/unix-socket.d.ts.map +1 -1
- package/dist/internal/upgrade-affects.d.ts +3 -3
- package/dist/internal/upgrade-affects.d.ts.map +1 -1
- package/dist/internal/upgrade-plan.d.ts.map +1 -1
- package/dist/json-schema/dialect.d.ts +0 -6
- package/dist/json-schema/dialect.d.ts.map +1 -1
- package/dist/json-schema/keywords.d.ts +116 -0
- package/dist/json-schema/keywords.d.ts.map +1 -0
- package/dist/json-schema/string-format.d.ts.map +1 -1
- package/dist/live/events.d.ts.map +1 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/observability/bounded-logger.d.ts +3 -0
- package/dist/observability/bounded-logger.d.ts.map +1 -1
- package/dist/observability/bounded-sink.d.ts.map +1 -1
- package/dist/observability/context.d.ts +12 -2
- package/dist/observability/context.d.ts.map +1 -1
- package/dist/observability/event-loop-delay.d.ts +62 -0
- package/dist/observability/event-loop-delay.d.ts.map +1 -0
- package/dist/observability/json-logger.d.ts.map +1 -1
- package/dist/observability/log-repeat.d.ts +44 -0
- package/dist/observability/log-repeat.d.ts.map +1 -0
- package/dist/observability/spool-core.d.ts +95 -0
- package/dist/observability/spool-core.d.ts.map +1 -0
- package/dist/observability/spool-file.d.ts +46 -0
- package/dist/observability/spool-file.d.ts.map +1 -0
- package/dist/observability/spool.d.ts +14 -8
- package/dist/observability/spool.d.ts.map +1 -1
- package/dist/observability/trace.d.ts.map +1 -1
- package/dist/observability/work.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +1 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/order-key.d.ts +37 -0
- package/dist/primitives/order-key.d.ts.map +1 -0
- package/dist/process/bun-child.d.ts.map +1 -1
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/contract.d.ts +4 -3
- package/dist/process/contract.d.ts.map +1 -1
- package/dist/process/group-presence.d.ts.map +1 -1
- package/dist/process/group.d.ts +5 -1
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/launch.d.ts +5 -3
- package/dist/process/launch.d.ts.map +1 -1
- package/dist/process/owner-loss-guard.d.ts.map +1 -1
- package/dist/react/cache-bridge.d.ts.map +1 -1
- package/dist/release/watcher.d.ts.map +1 -1
- package/dist/server/bridge-host.d.ts +51 -0
- package/dist/server/bridge-host.d.ts.map +1 -0
- package/dist/server/bun.d.ts +4 -4
- package/dist/server/bun.d.ts.map +1 -1
- package/dist/server/context-contribution.d.ts.map +1 -1
- package/dist/server/contract-method.d.ts.map +1 -1
- package/dist/server/create.d.ts +1 -0
- package/dist/server/create.d.ts.map +1 -1
- package/dist/server/endpoint-dispatch.d.ts.map +1 -1
- package/dist/server/endpoint-response.d.ts.map +1 -1
- package/dist/server/error-dispatch.d.ts +2 -0
- package/dist/server/error-dispatch.d.ts.map +1 -1
- package/dist/server/error-hook.d.ts +2 -0
- package/dist/server/error-hook.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts +13 -2
- package/dist/server/handler-state.d.ts.map +1 -1
- package/dist/server/implement.d.ts +1 -0
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/local-host.d.ts +47 -0
- package/dist/server/local-host.d.ts.map +1 -0
- package/dist/server/logger.d.ts +20 -3
- package/dist/server/logger.d.ts.map +1 -1
- package/dist/server/logging.d.ts +2 -1
- package/dist/server/logging.d.ts.map +1 -1
- package/dist/server/middleware/cors.d.ts +1 -0
- package/dist/server/middleware/cors.d.ts.map +1 -1
- package/dist/server/middleware/signed-link.d.ts +42 -0
- package/dist/server/middleware/signed-link.d.ts.map +1 -0
- package/dist/server/multipart-reader.d.ts +3 -1
- package/dist/server/multipart-reader.d.ts.map +1 -1
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/server/oauth/cimd.d.ts.map +1 -1
- package/dist/server/oauth/endpoints.d.ts.map +1 -1
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/protocol-outcome.d.ts +17 -0
- package/dist/server/protocol-outcome.d.ts.map +1 -0
- package/dist/server/raw.d.ts.map +1 -1
- package/dist/server/request-completion.d.ts +3 -1
- package/dist/server/request-completion.d.ts.map +1 -1
- package/dist/server/shutdown.d.ts.map +1 -1
- package/dist/server/socket-io-config.d.ts +1 -1
- package/dist/server/socket-io-config.d.ts.map +1 -1
- package/dist/server/streaming-route.d.ts.map +1 -1
- package/dist/server/types.d.ts +13 -10
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/unix-client-body.d.ts +4 -1
- package/dist/server/unix-client-body.d.ts.map +1 -1
- package/dist/server/unix-client-bun.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts +1 -1
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/service-host/artifact-activation.d.ts +58 -0
- package/dist/service-host/artifact-activation.d.ts.map +1 -0
- package/dist/service-host/artifact-manifest.d.ts +68 -0
- package/dist/service-host/artifact-manifest.d.ts.map +1 -0
- package/dist/service-host/artifact.d.ts +43 -0
- package/dist/service-host/artifact.d.ts.map +1 -0
- package/dist/service-host/config-reloader-contract.d.ts +66 -0
- package/dist/service-host/config-reloader-contract.d.ts.map +1 -0
- package/dist/service-host/config-reloader-helpers.d.ts +32 -0
- package/dist/service-host/config-reloader-helpers.d.ts.map +1 -0
- package/dist/service-host/config-reloader-source.d.ts +47 -0
- package/dist/service-host/config-reloader-source.d.ts.map +1 -0
- package/dist/service-host/config-reloader.d.ts +6 -0
- package/dist/service-host/config-reloader.d.ts.map +1 -0
- package/dist/service-host/host-adapter.d.ts +72 -0
- package/dist/service-host/host-adapter.d.ts.map +1 -0
- package/dist/service-host/identity-unix-socket.d.ts +101 -0
- package/dist/service-host/identity-unix-socket.d.ts.map +1 -0
- package/dist/service-host/identity.d.ts +117 -0
- package/dist/service-host/identity.d.ts.map +1 -0
- package/dist/service-host/launchd-plist.d.ts +77 -0
- package/dist/service-host/launchd-plist.d.ts.map +1 -0
- package/dist/service-host/launchd-render.d.ts +91 -0
- package/dist/service-host/launchd-render.d.ts.map +1 -0
- package/dist/service-host/launchd.d.ts +82 -0
- package/dist/service-host/launchd.d.ts.map +1 -0
- package/dist/service-host/macos/bundle-plist.d.ts +50 -0
- package/dist/service-host/macos/bundle-plist.d.ts.map +1 -0
- package/dist/service-host/macos/bundle.d.ts +66 -0
- package/dist/service-host/macos/bundle.d.ts.map +1 -0
- package/dist/service-host/macos/codesign.d.ts +95 -0
- package/dist/service-host/macos/codesign.d.ts.map +1 -0
- package/dist/service-host/macos/icon.d.ts +93 -0
- package/dist/service-host/macos/icon.d.ts.map +1 -0
- package/dist/service-host/macos/launch-services.d.ts +88 -0
- package/dist/service-host/macos/launch-services.d.ts.map +1 -0
- package/dist/service-host/macos/launcher.d.ts +59 -0
- package/dist/service-host/macos/launcher.d.ts.map +1 -0
- package/dist/service-host/macos/responsibility.d.ts +90 -0
- package/dist/service-host/macos/responsibility.d.ts.map +1 -0
- package/dist/service-host/macos/runner.d.ts +69 -0
- package/dist/service-host/macos/runner.d.ts.map +1 -0
- package/dist/service-host/plist-xml.d.ts +48 -0
- package/dist/service-host/plist-xml.d.ts.map +1 -0
- package/dist/service-host/process-evidence.d.ts +17 -0
- package/dist/service-host/process-evidence.d.ts.map +1 -0
- package/dist/service-host/systemd-inspect.d.ts +126 -0
- package/dist/service-host/systemd-inspect.d.ts.map +1 -0
- package/dist/service-host/systemd-links.d.ts +23 -0
- package/dist/service-host/systemd-links.d.ts.map +1 -0
- package/dist/service-host/systemd-render.d.ts +93 -0
- package/dist/service-host/systemd-render.d.ts.map +1 -0
- package/dist/service-host/systemd.d.ts +50 -0
- package/dist/service-host/systemd.d.ts.map +1 -0
- package/dist/spend/attribution.d.ts +17 -0
- package/dist/spend/attribution.d.ts.map +1 -0
- package/dist/spend/coverage-guard.d.ts +60 -0
- package/dist/spend/coverage-guard.d.ts.map +1 -0
- package/dist/spend/coverage-lexer.d.ts +20 -0
- package/dist/spend/coverage-lexer.d.ts.map +1 -0
- package/dist/spend/facts.d.ts +23 -0
- package/dist/spend/facts.d.ts.map +1 -0
- package/dist/spend/gateway-stream.d.ts +25 -0
- package/dist/spend/gateway-stream.d.ts.map +1 -0
- package/dist/spend/gateway.d.ts +64 -0
- package/dist/spend/gateway.d.ts.map +1 -0
- package/dist/spend/receipt-merge.d.ts +13 -0
- package/dist/spend/receipt-merge.d.ts.map +1 -0
- package/dist/spend/receipt-spool.d.ts +35 -0
- package/dist/spend/receipt-spool.d.ts.map +1 -0
- package/dist/spend/reconcile.d.ts +45 -0
- package/dist/spend/reconcile.d.ts.map +1 -0
- package/dist/spend/schemas.d.ts +249 -0
- package/dist/spend/schemas.d.ts.map +1 -0
- package/dist/sync/outbox.d.ts +131 -0
- package/dist/sync/outbox.d.ts.map +1 -0
- package/dist/sync/overlay.d.ts +59 -0
- package/dist/sync/overlay.d.ts.map +1 -0
- package/dist/sync/protocol.d.ts +132 -0
- package/dist/sync/protocol.d.ts.map +1 -0
- package/dist/sync/server-store-check.d.ts +10 -0
- package/dist/sync/server-store-check.d.ts.map +1 -0
- package/dist/sync/server-store-memory.d.ts +14 -0
- package/dist/sync/server-store-memory.d.ts.map +1 -0
- package/dist/sync/server-store-postgres.d.ts +25 -0
- package/dist/sync/server-store-postgres.d.ts.map +1 -0
- package/dist/sync/server-store.d.ts +139 -0
- package/dist/sync/server-store.d.ts.map +1 -0
- package/dist/sync/session-machine.d.ts +79 -0
- package/dist/sync/session-machine.d.ts.map +1 -0
- package/dist/sync/session-snapshot.d.ts +19 -0
- package/dist/sync/session-snapshot.d.ts.map +1 -0
- package/dist/sync/session-steps.d.ts +15 -0
- package/dist/sync/session-steps.d.ts.map +1 -0
- package/dist/sync/session.d.ts +142 -0
- package/dist/sync/session.d.ts.map +1 -0
- package/dist/sync/tombstones.d.ts +53 -0
- package/dist/sync/tombstones.d.ts.map +1 -0
- package/dist/telegram/bot-api.d.ts.map +1 -1
- package/dist/telegram/broadcast-failure.d.ts.map +1 -1
- package/dist/telegram/budget-transformer.d.ts.map +1 -1
- package/dist/telegram/crypto.d.ts +2 -10
- package/dist/telegram/crypto.d.ts.map +1 -1
- package/dist/telegram/html/markdown-inline.d.ts +19 -0
- package/dist/telegram/html/markdown-inline.d.ts.map +1 -0
- package/dist/telegram/html/markdown-lines.d.ts +51 -0
- package/dist/telegram/html/markdown-lines.d.ts.map +1 -0
- package/dist/telegram/html/markdown-split.d.ts +49 -0
- package/dist/telegram/html/markdown-split.d.ts.map +1 -0
- package/dist/telegram/html/markdown.d.ts +14 -0
- package/dist/telegram/html/markdown.d.ts.map +1 -0
- package/dist/telegram/html/nodes.d.ts +26 -4
- package/dist/telegram/html/nodes.d.ts.map +1 -1
- package/dist/telegram/html/parse.d.ts.map +1 -1
- package/dist/telegram/html/render.d.ts.map +1 -1
- package/dist/telegram/init-data.d.ts.map +1 -1
- package/dist/telegram/local-files.d.ts.map +1 -1
- package/dist/telegram/operator-channel.d.ts +15 -2
- package/dist/telegram/operator-channel.d.ts.map +1 -1
- package/dist/telegram/outbound-budget.d.ts.map +1 -1
- package/dist/telegram/outbound-cost.d.ts +9 -1
- package/dist/telegram/outbound-cost.d.ts.map +1 -1
- package/dist/telegram/outbound-queue.d.ts +2 -1
- package/dist/telegram/outbound-queue.d.ts.map +1 -1
- package/dist/telegram/screens/outcome.d.ts.map +1 -1
- package/dist/telegram/send-failure.d.ts.map +1 -1
- package/dist/telegram/transport-connect.d.ts.map +1 -1
- package/dist/telegram/transport.d.ts.map +1 -1
- package/dist/telegram/update-intake.d.ts.map +1 -1
- package/dist/telegram/update-store-postgres.d.ts +2 -2
- package/dist/telegram/update-store-postgres.d.ts.map +1 -1
- package/dist/telegram/webhook.d.ts.map +1 -1
- package/dist/testing/managed-resource-conformance.d.ts.map +1 -1
- package/dist/testing/surface-conformance.d.ts.map +1 -1
- package/dist/testing/surface-manifest.d.ts +2 -0
- package/dist/testing/surface-manifest.d.ts.map +1 -1
- package/dist/tools/access.d.ts +34 -0
- package/dist/tools/access.d.ts.map +1 -0
- package/dist/tools/agent.d.ts +14 -6
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args-classify.d.ts +154 -0
- package/dist/tools/cli/args-classify.d.ts.map +1 -0
- package/dist/tools/cli/args-fields.d.ts +14 -7
- package/dist/tools/cli/args-fields.d.ts.map +1 -1
- package/dist/tools/cli/args-json.d.ts +1 -1
- package/dist/tools/cli/args-json.d.ts.map +1 -1
- package/dist/tools/cli/args-route.d.ts +4 -48
- package/dist/tools/cli/args-route.d.ts.map +1 -1
- package/dist/tools/cli/args-scan.d.ts +70 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -0
- package/dist/tools/cli/args-tokens.d.ts +2 -1
- package/dist/tools/cli/args-tokens.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts +31 -19
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/checkpoint.d.ts.map +1 -1
- package/dist/tools/cli/command-shape.d.ts +5 -0
- package/dist/tools/cli/command-shape.d.ts.map +1 -1
- package/dist/tools/cli/command.d.ts +57 -2
- package/dist/tools/cli/command.d.ts.map +1 -1
- package/dist/tools/cli/config.d.ts +15 -58
- package/dist/tools/cli/config.d.ts.map +1 -1
- package/dist/tools/cli/create-cli.d.ts +7 -3
- package/dist/tools/cli/create-cli.d.ts.map +1 -1
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/help.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +70 -20
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/io.d.ts.map +1 -1
- package/dist/tools/cli/managed-surface.d.ts.map +1 -1
- package/dist/tools/cli/notices.d.ts.map +1 -1
- package/dist/tools/cli/policy.d.ts +66 -10
- package/dist/tools/cli/policy.d.ts.map +1 -1
- package/dist/tools/cli/prepare.d.ts +5 -4
- package/dist/tools/cli/prepare.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/run-native.d.ts.map +1 -1
- package/dist/tools/cli/run-stream.d.ts.map +1 -1
- package/dist/tools/cli/runner.d.ts +28 -0
- package/dist/tools/cli/runner.d.ts.map +1 -0
- package/dist/tools/cli/session.d.ts +12 -6
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/cli/stream-surface.d.ts.map +1 -1
- package/dist/tools/cli/stream.d.ts.map +1 -1
- package/dist/tools/cli/unavailable.d.ts +2 -0
- package/dist/tools/cli/unavailable.d.ts.map +1 -1
- package/dist/tools/cli/unix-outcome.d.ts +8 -0
- package/dist/tools/cli/unix-outcome.d.ts.map +1 -0
- package/dist/tools/cli/update.d.ts.map +1 -1
- package/dist/tools/cli/view-columns.d.ts +18 -0
- package/dist/tools/cli/view-columns.d.ts.map +1 -0
- package/dist/tools/cli/view.d.ts.map +1 -1
- package/dist/tools/connections/define.d.ts.map +1 -1
- package/dist/tools/connections/foreign-schema-join.d.ts +28 -0
- package/dist/tools/connections/foreign-schema-join.d.ts.map +1 -0
- package/dist/tools/connections/foreign-schema.d.ts +9 -0
- package/dist/tools/connections/foreign-schema.d.ts.map +1 -0
- package/dist/tools/connections/limits.d.ts +1 -1
- package/dist/tools/connections/limits.d.ts.map +1 -1
- package/dist/tools/connections/mcp-client.d.ts.map +1 -1
- package/dist/tools/connections/mcp.d.ts.map +1 -1
- package/dist/tools/connections/openapi.d.ts.map +1 -1
- package/dist/tools/connections/runtime.d.ts +18 -6
- package/dist/tools/connections/runtime.d.ts.map +1 -1
- package/dist/tools/connections/sse-session.d.ts.map +1 -1
- package/dist/tools/connections/types.d.ts +12 -2
- package/dist/tools/connections/types.d.ts.map +1 -1
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/internal/expose.d.ts +6 -0
- package/dist/tools/internal/expose.d.ts.map +1 -0
- package/dist/tools/internal/json-projection.d.ts +17 -0
- package/dist/tools/internal/json-projection.d.ts.map +1 -0
- package/dist/tools/internal/surface-projector.d.ts +18 -4
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +9 -2
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/lifecycle.d.ts +8 -2
- package/dist/tools/lifecycle.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +1 -1
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +2 -0
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/handler.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +26 -14
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/prepare.d.ts +2 -0
- package/dist/tools/mcp/prepare.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/dist/tools/mcp/stdio.d.ts.map +1 -1
- package/dist/tools/mount.d.ts +7 -2
- package/dist/tools/mount.d.ts.map +1 -1
- package/dist/tools/native-definition.d.ts +1 -1
- package/dist/tools/native-definition.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-tools.d.ts +2 -2
- package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts +1 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
- package/dist/tools/operations/define-wait-tool.d.ts.map +1 -1
- package/dist/tools/operations/mount-wait.d.ts.map +1 -1
- package/dist/tools/operations/wait-core.d.ts.map +1 -1
- package/dist/tools/read-operation.d.ts +6 -4
- package/dist/tools/read-operation.d.ts.map +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/runtime-tool-declaration.d.ts +4 -1
- package/dist/tools/runtime-tool-declaration.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +6 -1
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools/schema/coerce.d.ts.map +1 -1
- package/dist/tools/schema/inline-references.d.ts +7 -0
- package/dist/tools/schema/inline-references.d.ts.map +1 -0
- package/dist/tools/schema/json-schema-origin.d.ts +1 -1
- package/dist/tools/schema/json-schema-origin.d.ts.map +1 -1
- package/dist/tools/schema/presentation.d.ts +6 -0
- package/dist/tools/schema/presentation.d.ts.map +1 -1
- package/dist/tools/schema/schema.d.ts +2 -0
- package/dist/tools/schema/schema.d.ts.map +1 -1
- package/dist/tools/schema/untyped-properties.d.ts.map +1 -1
- package/dist/tools/surface.d.ts.map +1 -1
- package/dist/tools/toolkit.d.ts +6 -3
- package/dist/tools/toolkit.d.ts.map +1 -1
- package/dist/tools/transfer/define-download-tool.d.ts.map +1 -1
- package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -1
- package/dist/tools/transfer/define-view-file-tool.d.ts +2 -1
- package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -1
- package/dist/tools/transfer/mount-download.d.ts.map +1 -1
- package/dist/tools/transfer/view-file-contract.d.ts +2 -2
- package/dist/tools/transfer/view-file.d.ts +1 -2
- package/dist/tools/transfer/view-file.d.ts.map +1 -1
- package/dist/tracking/client.d.ts +0 -13
- package/dist/tracking/client.d.ts.map +1 -1
- package/dist/tracking/delivery.d.ts.map +1 -1
- package/dist/tracking/performance/collector.d.ts.map +1 -1
- package/llms/agent-executor-acp.txt +51 -0
- package/llms/agent-executor-claude-sdk.txt +31 -0
- package/llms/agent-executor-claude.txt +29 -0
- package/llms/agent-executor-codex.txt +25 -0
- package/llms/agent-executor-testing.txt +26 -0
- package/llms/agent-executor.txt +40 -0
- package/llms/agent-runtime-harness.txt +68 -5
- package/llms/agent-runtime-openrouter.txt +8 -2
- package/llms/agent-runtime-postgres.txt +30 -0
- package/llms/agent-runtime-react.txt +1 -1
- package/llms/agent-runtime-realtime.txt +1 -1
- package/llms/agent-runtime-sandbox.txt +5 -2
- package/llms/agent-runtime-sqlite-bun.txt +2 -2
- package/llms/agent-runtime-sqlite-node.txt +2 -2
- package/llms/agent-runtime-testing.txt +2 -1
- package/llms/agent-runtime.2.txt +450 -501
- package/llms/agent-runtime.3.txt +229 -267
- package/llms/agent-runtime.4.txt +23 -242
- package/llms/agent-runtime.5.txt +1 -1
- package/llms/agent-runtime.txt +551 -2
- package/llms/application-diagnostic-journal.txt +2 -0
- package/llms/application.2.txt +3 -0
- package/llms/application.3.txt +21 -4
- package/llms/application.txt +4 -1
- package/llms/cli.2.txt +259 -99
- package/llms/cli.3.txt +90 -0
- package/llms/cli.txt +95 -184
- package/llms/contract.txt +7 -6
- package/llms/declaration.txt +1 -1
- package/llms/files.txt +11 -0
- package/llms/handler.txt +25 -0
- package/llms/http.txt +18 -1
- package/llms/node.txt +3 -2
- package/llms/observability.2.txt +105 -0
- package/llms/observability.txt +14 -90
- package/llms/primitives.txt +27 -0
- package/llms/process.2.txt +2 -2
- package/llms/process.txt +10 -9
- package/llms/realtime.txt +11 -0
- package/llms/server.2.txt +355 -0
- package/llms/server.4.txt +45 -6
- package/llms/server.5.txt +6 -1
- package/llms/server.txt +143 -256
- package/llms/service-host-macos.txt +53 -0
- package/llms/service-host.txt +69 -0
- package/llms/spend-testing.txt +21 -0
- package/llms/spend.txt +173 -0
- package/llms/stitchkit.2.txt +368 -42
- package/llms/stitchkit.3.txt +164 -13
- package/llms/stitchkit.txt +95 -417
- package/llms/sync-postgres.txt +31 -0
- package/llms/sync.txt +396 -0
- package/llms/telegram-html.txt +4 -1
- package/llms/telegram.2.txt +4 -4
- package/llms/telegram.txt +105 -14
- package/llms/testing.txt +4 -3
- package/llms/tools-connections.txt +4 -4
- package/llms/tools.2.txt +78 -17
- package/llms/tools.3.txt +12 -8
- package/llms/tools.txt +85 -78
- package/llms/upgrading-0.127.0.txt +1059 -0
- package/llms/upgrading.txt +1 -0
- package/llms-full.txt +3557 -531
- package/llms.txt +43 -27
- package/native/darwin-arm64.node +0 -0
- package/native/darwin-x64.node +0 -0
- package/native-assets.json +4 -4
- package/package.json +67 -9
- package/dist/agent-runtime/sandbox-coding.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-events.d.ts +0 -5
- package/dist/agent-runtime/sqlite-events.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-history.d.ts +0 -7
- package/dist/agent-runtime/sqlite-history.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-ledger.d.ts +0 -7
- package/dist/agent-runtime/sqlite-ledger.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-reads.d.ts +0 -14
- package/dist/agent-runtime/sqlite-reads.d.ts.map +0 -1
- package/dist/agent-runtime/sqlite-rows.d.ts.map +0 -1
- package/dist/agent-runtime/tool-progress.d.ts.map +0 -1
- package/dist/entrypoints/application/schemas.d.ts +0 -15
- package/dist/entrypoints/application/schemas.d.ts.map +0 -1
- package/dist/entrypoints/application/schemas.js +0 -27
- package/dist/index-0s4xebbg.js +0 -8
- package/dist/index-57ppvpw0.js +0 -1150
- package/dist/index-5dmk54h9.js +0 -256
- package/dist/index-7cn66qdk.js +0 -92
- package/dist/index-8x0q6yfb.js +0 -247
- package/dist/index-a5qr2rj6.js +0 -26
- package/dist/index-b0kddvzw.js +0 -35
- package/dist/index-drcjjhy1.js +0 -40
- package/dist/index-eemvahkc.js +0 -21
- package/dist/index-gfk7nrht.js +0 -0
- package/dist/index-jp2qd9jb.js +0 -108
- package/dist/index-nx6eazt0.js +0 -160
- package/dist/index-wxadzdb7.js +0 -55
- package/dist/internal/until-aborted.d.ts +0 -9
- package/dist/internal/until-aborted.d.ts.map +0 -1
- package/dist/server/unix-client-error.d.ts +0 -9
- package/dist/server/unix-client-error.d.ts.map +0 -1
- package/llms/application-schemas.txt +0 -42
|
@@ -0,0 +1,1059 @@
|
|
|
1
|
+
# Upgrading 0.127.0 → 0.127.0 — stitchkit docs slice
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
|
|
6
|
+
Contains: Guide: Upgrading, 0.127.0 → 0.127.0 (docs/guide/upgrading.md)
|
|
7
|
+
|
|
8
|
+
==============================================================================
|
|
9
|
+
# Guide: Upgrading, 0.127.0 → 0.127.0 (docs/guide/upgrading.md)
|
|
10
|
+
==============================================================================
|
|
11
|
+
|
|
12
|
+
## Released migration: 0.127.0
|
|
13
|
+
|
|
14
|
+
### branch-application-key-modes
|
|
15
|
+
|
|
16
|
+
**Who must act:** every caller of `branchConversation` from `stitchkit/agent-runtime`
|
|
17
|
+
that passes `applicationKeys`.
|
|
18
|
+
|
|
19
|
+
Each key becomes one declaration. A name that was data keeps refusing a source
|
|
20
|
+
identity under the default mode; a record of the past that names the source
|
|
21
|
+
conversation, its runs or its messages takes `sourceIdentity: 'retain'`:
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
// before
|
|
25
|
+
store.branchConversation({ …, applicationKeys: ['messageId', 'reference'] })
|
|
26
|
+
|
|
27
|
+
// after
|
|
28
|
+
store.branchConversation({
|
|
29
|
+
…,
|
|
30
|
+
applicationKeys: [
|
|
31
|
+
{ key: 'messageId' },
|
|
32
|
+
{ key: 'reference' },
|
|
33
|
+
{ key: 'runId', sourceIdentity: 'retain' },
|
|
34
|
+
],
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
A key repeated in the list, or a name outside `reference`, `conversationId`,
|
|
39
|
+
`runId`, `messageId`, `callId`, `toolCallId`, `approvalId`, `operationId` and
|
|
40
|
+
`artifactId`, is now refused by the schema: drop the repeat, and drop a name the
|
|
41
|
+
branch never reads. A declared application file reference under a key now
|
|
42
|
+
refuses like any other source identity.
|
|
43
|
+
|
|
44
|
+
### runtime-tools-take-the-run
|
|
45
|
+
|
|
46
|
+
**Who must act:** every host that calls `createAgentChildTools`,
|
|
47
|
+
`createAgentScheduleTools`, `createAgentStateTools`, `createAgentEventSearchTools`,
|
|
48
|
+
`createSqliteAgentChildManager`, `createAgentScheduleService` or
|
|
49
|
+
`createSqliteAgentSpillStore` with `toolCallId` from `stitchkit/agent-runtime`.
|
|
50
|
+
|
|
51
|
+
Create the built-in tools inside `tools()`, from the run context it receives:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// before
|
|
55
|
+
const tools = [
|
|
56
|
+
...createAgentChildTools(manager),
|
|
57
|
+
...createAgentScheduleTools(service),
|
|
58
|
+
...createAgentStateTools({ conversationId, state }),
|
|
59
|
+
...createAgentEventSearchTools({ conversationId, search, store }),
|
|
60
|
+
]
|
|
61
|
+
createAgentRuntime({ ...config, tools: () => mountAgent([], { runtimeTools: tools }) })
|
|
62
|
+
|
|
63
|
+
// after
|
|
64
|
+
createAgentRuntime({
|
|
65
|
+
...config,
|
|
66
|
+
tools: (run) =>
|
|
67
|
+
mountAgent([], {
|
|
68
|
+
access: { gate: run.toolFenceLifecycle },
|
|
69
|
+
runtimeTools: [
|
|
70
|
+
...createAgentChildTools({ manager, run }),
|
|
71
|
+
...createAgentScheduleTools({ service, run }),
|
|
72
|
+
...createAgentStateTools({ state, run }),
|
|
73
|
+
...createAgentEventSearchTools({ run, search, store }),
|
|
74
|
+
],
|
|
75
|
+
}),
|
|
76
|
+
})
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Every tool acts for the conversation of the run that called it. The tools' input
|
|
80
|
+
schemas have no `parentConversationId` or `conversationId`; a model that sends one
|
|
81
|
+
is refused by the schema. A factory refuses a run context that no runtime issued,
|
|
82
|
+
so a tool set built once outside `tools()` and shared between conversations no
|
|
83
|
+
longer exists; build it per run.
|
|
84
|
+
|
|
85
|
+
Give the child manager and the schedule service their limits and the store's
|
|
86
|
+
companion host, and rename the child manager:
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
// before
|
|
90
|
+
createSqliteAgentChildManager({ sqlite, spawn })
|
|
91
|
+
createAgentScheduleService({ sqlite, dispatch })
|
|
92
|
+
|
|
93
|
+
// after
|
|
94
|
+
createAgentChildManager({
|
|
95
|
+
store: sqlite.store,
|
|
96
|
+
host: sqlite.host,
|
|
97
|
+
spawn,
|
|
98
|
+
remainingBudget: (parentConversationId) => ({ usd: budgetLeft(parentConversationId) }),
|
|
99
|
+
maxActiveChildren: 4,
|
|
100
|
+
})
|
|
101
|
+
createAgentScheduleService({
|
|
102
|
+
host: sqlite.host,
|
|
103
|
+
dispatch,
|
|
104
|
+
maxActivePerConversation: 20,
|
|
105
|
+
minIntervalMs: 60_000,
|
|
106
|
+
})
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
`remainingBudget` is what the parent may still give: a child's budget is the
|
|
110
|
+
requested one clamped to it, a dimension the model leaves out takes it, and a
|
|
111
|
+
budget that names no limit or a dimension at `0` refuses the spawn. A child past
|
|
112
|
+
`maxActiveChildren`, a repeat shorter than `minIntervalMs` and a schedule past
|
|
113
|
+
`maxActivePerConversation` refuse with the limit in the message. The tool
|
|
114
|
+
factories take no limits: the manager and the service own them.
|
|
115
|
+
|
|
116
|
+
Drop `toolCallId` from `createSqliteAgentSpillStore` (now `createAgentSpillStore`): each spill now records the
|
|
117
|
+
call whose output it holds. A hand-written `AgentCodingArtifactStore` may read the
|
|
118
|
+
new `toolCallId` field of `write`.
|
|
119
|
+
|
|
120
|
+
### companions-take-the-host
|
|
121
|
+
|
|
122
|
+
**Who must act:** every host that calls `createSqliteAgentProjectionStore`,
|
|
123
|
+
`createSqliteAgentEventSearch`, `createSqliteAgentChildManager` or
|
|
124
|
+
`createSqliteAgentSpillStore`, reads `database` or calls `transaction` on a
|
|
125
|
+
SQLite store handle, or calls `listChildren`, a projection store's `load` /
|
|
126
|
+
`list`, a spill store's `authorization` / `search` or a schedule service's
|
|
127
|
+
`start` without awaiting it.
|
|
128
|
+
|
|
129
|
+
The companions take the store's companion host, and run on the SQLite and the
|
|
130
|
+
Postgres store alike:
|
|
131
|
+
|
|
132
|
+
```ts
|
|
133
|
+
// before
|
|
134
|
+
createSqliteAgentProjectionStore({ sqlite })
|
|
135
|
+
createSqliteAgentEventSearch({ database: sqlite.database })
|
|
136
|
+
createSqliteAgentSpillStore({ sqlite, conversationId })
|
|
137
|
+
await sqlite.transaction(async (scope) => {
|
|
138
|
+
scope.database.prepare(sql).run(...values)
|
|
139
|
+
await scope.appendEvent(event)
|
|
140
|
+
})
|
|
141
|
+
const children = manager.listChildren(parentConversationId)
|
|
142
|
+
|
|
143
|
+
// after
|
|
144
|
+
createAgentProjectionStore({ store: sqlite.store, host: sqlite.host })
|
|
145
|
+
createAgentEventSearch({ host: sqlite.host })
|
|
146
|
+
createAgentSpillStore({ host: sqlite.host, conversationId })
|
|
147
|
+
await sqlite.host.transaction(conversationId, async (scope) => {
|
|
148
|
+
await scope.run(sql, values)
|
|
149
|
+
await scope.appendEvent(event)
|
|
150
|
+
})
|
|
151
|
+
const children = await manager.listChildren(parentConversationId)
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
`SqliteAgentChildManagerConfig` is `AgentChildManagerConfig`. A test that
|
|
155
|
+
inspects the SQLite file opens the connection itself and passes it to
|
|
156
|
+
`createSqliteAgentRuntimeStore({ database })`; the store no longer hands its
|
|
157
|
+
connection out. A record id containing NUL (`\0`) is now refused by the schema
|
|
158
|
+
on every store; choose another id.
|
|
159
|
+
|
|
160
|
+
### child-blocking-unavailable
|
|
161
|
+
|
|
162
|
+
**Who must act:** every caller of `listChildBlocking` on a child manager from
|
|
163
|
+
`stitchkit/agent-runtime`, every caller of `respondToChildBlocking` or `sendMessage` whose
|
|
164
|
+
child host can take longer than 10 s, and code that spawns one child id twice at once.
|
|
165
|
+
|
|
166
|
+
`listChildBlocking(parentConversationId)` resolves `{ pending, unavailable }`.
|
|
167
|
+
Read the pending requests from `pending`; `unavailable` lists the live children
|
|
168
|
+
whose host did not say what it has pending — `reason: 'timeout'` when it did not
|
|
169
|
+
answer within the stop bound, `reason: 'failed'` with its `cause` when it threw,
|
|
170
|
+
rejected or reported a malformed request. Their pending set is unknown, not empty:
|
|
171
|
+
ask again, or treat the child as unreachable.
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
// before
|
|
175
|
+
const requests = await children.listChildBlocking(parentId)
|
|
176
|
+
|
|
177
|
+
// after
|
|
178
|
+
const { pending: requests, unavailable } = await children.listChildBlocking(parentId)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
`respondToChildBlocking` and `sendMessage` reject when the child's host does not answer within
|
|
182
|
+
10 s, the bound a stop has; they waited without end. The bound ends the wait, not the host's
|
|
183
|
+
work: a rejected response leaves its request pending, and a rejected message is journaled as
|
|
184
|
+
`message-sent` if the host takes it late. While that answer or message is still with the host,
|
|
185
|
+
a second answer to the request, or another message to the child, is a `TypeError`: answer again
|
|
186
|
+
once the first has settled, or treat the child as unreachable.
|
|
187
|
+
A second `spawnChild` of an id still being spawned is a `TypeError`; await the first spawn.
|
|
188
|
+
|
|
189
|
+
```ts
|
|
190
|
+
// before
|
|
191
|
+
await children.sendMessage(parentId, childId, text)
|
|
192
|
+
|
|
193
|
+
// after
|
|
194
|
+
await children.sendMessage(parentId, childId, text).catch(reportUnreachableChild)
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### agent-usage-projection-v2
|
|
198
|
+
|
|
199
|
+
**Who must act:** every caller that reads `agentUsageProjection` from
|
|
200
|
+
`stitchkit/agent-runtime`.
|
|
201
|
+
|
|
202
|
+
`agentUsageProjection` is bumped to `version: 2` and now folds canonical
|
|
203
|
+
`AgentUsage` records instead of flat numbers that always summed to zero. Read
|
|
204
|
+
token counts and cost through `value.usage` and check `provenance`:
|
|
205
|
+
|
|
206
|
+
```ts
|
|
207
|
+
// before
|
|
208
|
+
const { inputTokens, outputTokens, cost } = projected.value
|
|
209
|
+
|
|
210
|
+
// after
|
|
211
|
+
const { records, usage } = projected.value
|
|
212
|
+
const inputTokens = usage.inputTokens.value
|
|
213
|
+
const outputTokens = usage.outputTokens.value
|
|
214
|
+
const costUsd = usage.cost?.provenance === 'unavailable' ? undefined : usage.cost?.value
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Existing `version: 1` rows stored in SQLite are ignored on `load()` and
|
|
218
|
+
automatically re-folded from sequence 1 on the next `advance()`.
|
|
219
|
+
|
|
220
|
+
`usage.cost` is `unavailable` when a provider answered without a price. A run that
|
|
221
|
+
ended without an answer, measured nothing and holds no provider output is not counted
|
|
222
|
+
in `records` and does not make the cost of other runs `unavailable`.
|
|
223
|
+
|
|
224
|
+
### session-credentials-refresh-ahead
|
|
225
|
+
|
|
226
|
+
**Who must act:** every project calling `createSessionCredentials` from `stitchkit`.
|
|
227
|
+
|
|
228
|
+
1. Add `read(): Promise<{ session: TSession; credentials: TCredentials } | null>` to the `storage` object passed to `createSessionCredentials`. Return `null` when no session is stored and throw when the store cannot be read (such as a locked keychain); `restore()` reports `'unreadable'` without calling `storage.clear()` or `scope.clear()`.
|
|
229
|
+
2. Update any caller or test expecting `refresh(operation)` to reject on a storage write failure or `storageTimeoutMs`: once the server has rotated credentials, `refresh()` resolves with the new credentials, emits `{ type: 'storage-failed', ... }` through `onEvent`, retries persistence every `storageRetryMs` and blocks further rotations until flushed. `login()` and `logout()` still reject on storage errors.
|
|
230
|
+
|
|
231
|
+
### portable-handler-and-runtime-floor
|
|
232
|
+
|
|
233
|
+
**Who must act:** every server reading `RequestContext.startedAt` from
|
|
234
|
+
`stitchkit/observability` or running on Node `< 22.3.0` / Bun `< 1.4.0`.
|
|
235
|
+
|
|
236
|
+
1. Upgrade Node.js to `>= 22.3.0` or Bun to `>= 1.4.0` so
|
|
237
|
+
`process.getBuiltinModule('async_hooks')` is available.
|
|
238
|
+
2. Replace nanosecond `bigint` arithmetic on `RequestContext.startedAt` with
|
|
239
|
+
millisecond `number` arithmetic against `performance.now()`:
|
|
240
|
+
|
|
241
|
+
```ts
|
|
242
|
+
// before
|
|
243
|
+
const durationMs = Number(process.hrtime.bigint() - ctx.startedAt) / 1_000_000
|
|
244
|
+
|
|
245
|
+
// after
|
|
246
|
+
const durationMs = performance.now() - ctx.startedAt
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### step-spend-and-child-budget-policy
|
|
250
|
+
|
|
251
|
+
**Who must act:** applications passing `cost` to `agentChildBudgetStopPolicy(...)` or
|
|
252
|
+
reading `event.response` unconditionally on `AgentStepFinishedEvent` from
|
|
253
|
+
`stitchkit/agent-runtime`.
|
|
254
|
+
|
|
255
|
+
1. Remove the `cost` callback from `agentChildBudgetStopPolicy({ manager, childConversationId })`.
|
|
256
|
+
Provide per-step usage/cost normalization once on the model provider's `normalizeUsage` hook
|
|
257
|
+
(for example via `openRouterProvider` or a custom `AgentLanguageModelProvider`), which now feeds
|
|
258
|
+
`onStepSpend`, `observe`, run totals and child USD budgets together.
|
|
259
|
+
2. Branch on `event.phase` in `step-finished` observability events. `'step'` and
|
|
260
|
+
`'abandoned-attempt'` always carry `modelId`, `provider` and `response`; `'compaction'` is billed
|
|
261
|
+
spend without a provider answer and carries none of them, with the number of the step it
|
|
262
|
+
prepared. A consumer that counted model steps by `step-finished` counts `phase === 'step'`.
|
|
263
|
+
`AgentStepSpend`, the fact `onStepSpend` receives, is a union on the same `phase`: read `model`,
|
|
264
|
+
`provider` and `response` after narrowing it.
|
|
265
|
+
|
|
266
|
+
```ts
|
|
267
|
+
// before
|
|
268
|
+
observe.write = (event) => {
|
|
269
|
+
if (event.type === 'step-finished') record(event.step, event.response.id)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
// after
|
|
273
|
+
observe.write = (event) => {
|
|
274
|
+
if (event.type === 'step-finished' && event.phase === 'step') record(event.step, event.response?.id)
|
|
275
|
+
}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### cli-broken-boolean-boundary
|
|
279
|
+
|
|
280
|
+
**Who must act:** scripts or tests that place a bare boolean framework flag before a
|
|
281
|
+
stripped command name or application option followed by a positional `true` or `false`
|
|
282
|
+
(e.g. `app --dry-run inspect false` or `app inspect --dry-run --profile demo false`).
|
|
283
|
+
|
|
284
|
+
Pass either an explicit inline value or `--` before the positional:
|
|
285
|
+
|
|
286
|
+
```sh
|
|
287
|
+
# before (silently rewrote the boundary)
|
|
288
|
+
app --dry-run inspect false
|
|
289
|
+
app inspect --dry-run --profile demo false
|
|
290
|
+
|
|
291
|
+
# after
|
|
292
|
+
app --dry-run=true inspect false
|
|
293
|
+
app inspect --dry-run --profile demo -- false
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
Adjacent `app inspect --dry-run false` continues to set `dryRun = false` and execute
|
|
297
|
+
the command.
|
|
298
|
+
|
|
299
|
+
An entry point that parses argv itself reads the same refusal from the projection it calls:
|
|
300
|
+
|
|
301
|
+
```ts
|
|
302
|
+
// extractCliGlobalOptions: `globals` is always readable; reading `argv` throws
|
|
303
|
+
// CliArgumentError when a lifted global stood between a bare framework boolean
|
|
304
|
+
// and true/false. Other boundaries it lifted travel in `separatedBefore`.
|
|
305
|
+
try {
|
|
306
|
+
const lifted = extractCliGlobalOptions(argv, GlobalsSchema)
|
|
307
|
+
// routeCliArgv: the refusal is in `error`, and `commandArgv` is empty.
|
|
308
|
+
const route = routeCliArgv(lifted.argv, {
|
|
309
|
+
defaultCommand: 'help',
|
|
310
|
+
separatedBefore: lifted.separatedBefore,
|
|
311
|
+
})
|
|
312
|
+
if (route.error !== undefined) return refuse(route.error) // exit 2
|
|
313
|
+
if (route.command === undefined || route.topLevelHelp) return showHelp()
|
|
314
|
+
const parsed = parseCliArgs(route.commandArgv, inputFor(route.command), {
|
|
315
|
+
separatedBefore: route.separatedBefore,
|
|
316
|
+
})
|
|
317
|
+
return run(route.command, parsed)
|
|
318
|
+
} catch (error) {
|
|
319
|
+
if (!(error instanceof CliArgumentError)) throw error
|
|
320
|
+
return refuse(error.message) // exit 2
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
An entry point that only needs the globals and then hands the whole argv to `createCli` with
|
|
325
|
+
`globalOptions` reads `lifted.globals` and passes `argv`, not `lifted.argv`: `createCli` reports the
|
|
326
|
+
refusal and exits `2` itself.
|
|
327
|
+
|
|
328
|
+
### cli-pre-call-view-columns
|
|
329
|
+
|
|
330
|
+
**Who must act:** CLI callers and tests invoking `--table`, `--sort`, `--sum`,
|
|
331
|
+
`--count-by`, or `--top --by` with an unknown column name against a command whose
|
|
332
|
+
output schema defines an unambiguous object collection (including empty results).
|
|
333
|
+
|
|
334
|
+
Fix the column name (the error lists `available: ...`). Commands with an unambiguous
|
|
335
|
+
output collection now fail with exit code `2` before calling the handler, including when
|
|
336
|
+
the collection would have been empty (previously exit code `0`).
|
|
337
|
+
|
|
338
|
+
### cli-native-views
|
|
339
|
+
|
|
340
|
+
**Who must act:** callers passing `--table`, `--sort`, `--sum`, `--count-by`, or `--top`
|
|
341
|
+
to native `defineCliCommand` commands.
|
|
342
|
+
|
|
343
|
+
Native commands with an `output` schema now apply the requested view; native commands
|
|
344
|
+
without an `output` schema now refuse view flags with exit code `2` instead of silently
|
|
345
|
+
ignoring them. Declare an `output` schema on the command or drop the view flag.
|
|
346
|
+
|
|
347
|
+
### cli-unix-delivery-exit-codes
|
|
348
|
+
|
|
349
|
+
**Who must act:** scripts that branch on the exit code of a `stitchkit/cli` command that calls
|
|
350
|
+
its application through `createUnixClientTransport`.
|
|
351
|
+
|
|
352
|
+
Such a command exited `1` for every transport failure. It now exits `9` when the request never
|
|
353
|
+
left (the application is not listening, or the socket was refused), `10` when it may have reached
|
|
354
|
+
the application before the connection dropped, and `1` when an answer came back
|
|
355
|
+
([ADR 0325](../decisions/0325-a-local-cli-exit-code-says-whether-the-request-left.md)). Branch on
|
|
356
|
+
the new codes, or keep `1`:
|
|
357
|
+
|
|
358
|
+
```ts
|
|
359
|
+
createCli({
|
|
360
|
+
…,
|
|
361
|
+
exitCodes: { UNIX_CONNECT_FAILED: 1, UNIX_TARGET_REFUSED: 1, UNIX_DELIVERY_UNCERTAIN: 1 },
|
|
362
|
+
})
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
### cli-invoker-global-errors
|
|
366
|
+
|
|
367
|
+
**Who must act:** callers of `createCliInvoker` from `stitchkit/cli` that catch `ZodError`
|
|
368
|
+
on invalid global options or pre-parse JSON strings for structured global options.
|
|
369
|
+
|
|
370
|
+
Catch `CliArgumentError` instead of `ZodError` when validating global options through
|
|
371
|
+
`createCliInvoker`. JSON-encoded strings for structured global options now parse using
|
|
372
|
+
the same coercer as `createCli`.
|
|
373
|
+
|
|
374
|
+
### cli-public-projections
|
|
375
|
+
|
|
376
|
+
**Who must act:** entry points from `stitchkit/cli` that call `routeCliArgv` with a default
|
|
377
|
+
command, that rely on `parseCliArgs` leaving `--flag=<not a boolean>` to Zod, that branch on
|
|
378
|
+
exit code `1` for an unknown command, or that pass `createCliInvoker` native commands
|
|
379
|
+
`createCli` refuses.
|
|
380
|
+
|
|
381
|
+
1. Pass the default command by name. Search `routeCliArgv(` with a second argument:
|
|
382
|
+
|
|
383
|
+
```ts
|
|
384
|
+
// before
|
|
385
|
+
routeCliArgv(argv, 'help')
|
|
386
|
+
// after
|
|
387
|
+
routeCliArgv(argv, { defaultCommand: 'help' })
|
|
388
|
+
```
|
|
389
|
+
|
|
390
|
+
2. Carry lifted boundaries through the route instead of shifting indices by hand:
|
|
391
|
+
|
|
392
|
+
```ts
|
|
393
|
+
const lifted = extractCliGlobalOptions(argv, Globals)
|
|
394
|
+
const route = routeCliArgv(lifted.argv, { separatedBefore: lifted.separatedBefore })
|
|
395
|
+
parseCliArgs(route.commandArgv, schema, { separatedBefore: route.separatedBefore })
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
3. `parseCliArgs(['--verbose=maybe'], schema)` throws `CliArgumentError` for a pure boolean field;
|
|
399
|
+
catch it where `createCli`'s exit `2` is expected. A field that is a union of boolean and string
|
|
400
|
+
still takes the word.
|
|
401
|
+
|
|
402
|
+
4. An unknown command exits `4` (`UNKNOWN_OPERATION`) from `createCli`, as from `createCliInvoker`.
|
|
403
|
+
Keep `1` with `exitCodes: { UNKNOWN_OPERATION: 1 }`.
|
|
404
|
+
|
|
405
|
+
5. `extractCliGlobalOptions(['--profile', 'a', '--', 'inspect'], Globals).argv` is now
|
|
406
|
+
`['--', 'inspect']`; `routeCliArgv` refuses it with `A command is required before "--"`.
|
|
407
|
+
|
|
408
|
+
6. `createCliInvoker` throws when it is created for a native command `createCli` would refuse: a
|
|
409
|
+
name declared twice or shared with a managed command, `commandSettings` aliases or positionals
|
|
410
|
+
naming a field the command does not have, an alias of the passthrough field. Fix the
|
|
411
|
+
declaration the error names. `invoker.commands` no longer lists a managed command with an
|
|
412
|
+
`unavailableReason`; it was never invocable.
|
|
413
|
+
|
|
414
|
+
### cli-option-before-command
|
|
415
|
+
|
|
416
|
+
**Who must act:** a script that writes a command option before the command name on a
|
|
417
|
+
`stitchkit/cli` CLI without a default command, or a CLI that declares a command named in
|
|
418
|
+
option syntax.
|
|
419
|
+
|
|
420
|
+
1. Move the option after the command name; framework options (`--json`, `--quiet`, …) may
|
|
421
|
+
stay before it:
|
|
422
|
+
|
|
423
|
+
```sh
|
|
424
|
+
# before
|
|
425
|
+
myapp --verbose inspect
|
|
426
|
+
# after
|
|
427
|
+
myapp inspect --verbose
|
|
428
|
+
```
|
|
429
|
+
|
|
430
|
+
2. Rename a command whose name starts with `-` (`--custom` → `custom`).
|
|
431
|
+
3. A script that branched on exit `4` for such a line reads exit `2`.
|
|
432
|
+
|
|
433
|
+
### connections-top-level-union
|
|
434
|
+
|
|
435
|
+
**Who must act:** callers of discovered MCP or OpenAPI tools whose top-level input schema
|
|
436
|
+
uses `oneOf` or `anyOf`.
|
|
437
|
+
|
|
438
|
+
Top-level `oneOf`/`anyOf` object schemas are now merged (together with any root
|
|
439
|
+
`properties`/`required`) and validated locally instead of accepting arbitrary objects.
|
|
440
|
+
Pass fields matching one of the declared object branches; non-object top-level branches
|
|
441
|
+
are skipped with an explicit reason in `onSkippedTool`. A root object schema with `allOf`,
|
|
442
|
+
`minProperties`, `maxProperties`, `propertyNames` or `patternProperties` keeps those
|
|
443
|
+
constraints: an argument that breaks one is refused before the call leaves, and a root that is
|
|
444
|
+
not one object is refused at discovery. Pass arguments the server's schema allows.
|
|
445
|
+
|
|
446
|
+
### connections-unknown-schema-keywords
|
|
447
|
+
|
|
448
|
+
**Who must act:** every host that mounts discovered MCP or OpenAPI tools
|
|
449
|
+
(`mountConnections`, `defineMcpClientConnection`, `defineOpenApiConnection`) from servers whose
|
|
450
|
+
input or output schemas carry keywords outside JSON Schema draft-07, draft 2020-12 and the
|
|
451
|
+
OpenAPI 3.0 Schema Object.
|
|
452
|
+
|
|
453
|
+
Such a tool is no longer mounted. Vendor annotations — `enumNames`, `markdownDescription`,
|
|
454
|
+
`propertyOrdering` — count, as do `$anchor`, `$dynamicRef` and `$dynamicAnchor`; `x-*` extensions
|
|
455
|
+
do not. `onSkippedTool` names each skipped tool with the keyword that refused it; without it the
|
|
456
|
+
same line goes to stderr.
|
|
457
|
+
|
|
458
|
+
```ts
|
|
459
|
+
await mountConnections(connections, {
|
|
460
|
+
onSkippedTool: (skipped) => logger.warn('connection tool skipped', skipped),
|
|
461
|
+
})
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
Where the server is yours, write the annotation as an `x-*` extension (`x-enumNames`) or drop it.
|
|
465
|
+
Where it is not, the tool stays out until its author does; nothing on the consuming side turns the
|
|
466
|
+
check off.
|
|
467
|
+
|
|
468
|
+
### unix-socket-ownership-checks
|
|
469
|
+
|
|
470
|
+
**Who must act:** every `createServer({ unix })` whose socket stands in a directory other users
|
|
471
|
+
can write (`/tmp`), and every `createUnixClientTransport` that dials a socket or a directory owned
|
|
472
|
+
by another user — a system daemon under `/run`, another service account's socket.
|
|
473
|
+
|
|
474
|
+
The server refuses to bind and the client refuses to connect (`UNIX_TARGET_REFUSED`,
|
|
475
|
+
`delivery: 'not-dispatched'`) unless the directory is a real directory owned by the calling user
|
|
476
|
+
with no group or world write, and — for the client — the socket has the same owner. Put the socket
|
|
477
|
+
in a directory that user owns:
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
// before
|
|
481
|
+
createServer({ unix: '/tmp/app.sock', services })
|
|
482
|
+
|
|
483
|
+
// after — $XDG_RUNTIME_DIR, or a directory the service creates with mode 0700
|
|
484
|
+
createServer({ unix: join(runtimeDir, 'app.sock'), services })
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
A client that has to reach a socket owned by another user cannot use `createUnixClientTransport`:
|
|
488
|
+
the check has no switch. A path longer than 103 UTF-8 bytes is refused on every platform.
|
|
489
|
+
|
|
490
|
+
An exhaustive `switch` or `satisfies Record<UnixClientTransportErrorCode, …>` map adds the new code:
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
// before
|
|
494
|
+
const hint = { …, UNIX_CONNECT_FAILED: 'start the server' } satisfies Record<UnixClientTransportErrorCode, string>;
|
|
495
|
+
|
|
496
|
+
// after
|
|
497
|
+
const hint = {
|
|
498
|
+
…,
|
|
499
|
+
UNIX_CONNECT_FAILED: 'start the server',
|
|
500
|
+
UNIX_TARGET_REFUSED: 'move the socket into a directory you own',
|
|
501
|
+
} satisfies Record<UnixClientTransportErrorCode, string>;
|
|
502
|
+
```
|
|
503
|
+
|
|
504
|
+
### application-schemas-and-renames
|
|
505
|
+
|
|
506
|
+
**Who must act:** projects importing from `stitchkit/application/schemas`, calling
|
|
507
|
+
`notificationOutboxStateSchema` from `stitchkit/application`, or calling
|
|
508
|
+
`postgresTelegramUpdateStoreSchema` from `stitchkit/telegram`.
|
|
509
|
+
|
|
510
|
+
1. Replace `stitchkit/application/schemas` imports with `stitchkit/application`
|
|
511
|
+
(already browser-clean since ADR 0157):
|
|
512
|
+
|
|
513
|
+
```ts
|
|
514
|
+
// before
|
|
515
|
+
import { ApplicationSnapshotSchema } from 'stitchkit/application/schemas'
|
|
516
|
+
|
|
517
|
+
// after
|
|
518
|
+
import { ApplicationSnapshotSchema } from 'stitchkit/application'
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
2. Rename the two schema/DDL factories:
|
|
522
|
+
- `notificationOutboxStateSchema` → `createNotificationOutboxStateSchema`
|
|
523
|
+
- `postgresTelegramUpdateStoreSchema` → `postgresTelegramUpdateStoreDdl`
|
|
524
|
+
|
|
525
|
+
### agent-sandbox-probes-relocated
|
|
526
|
+
|
|
527
|
+
**Who must act:** projects importing process-sandbox probe helpers or schemas from
|
|
528
|
+
`stitchkit/agent-runtime`.
|
|
529
|
+
|
|
530
|
+
Import `AgentSandboxGradeSchema`, `AgentSandboxGrade`, `AgentSandboxRestrictionSchema`,
|
|
531
|
+
`AgentSandboxRestriction`, `probeAgentProcessSandbox`, `missingSandboxRestrictions`,
|
|
532
|
+
and `recordAgentSandboxProbe` from `stitchkit/agent-runtime/sandbox`:
|
|
533
|
+
|
|
534
|
+
```ts
|
|
535
|
+
// before
|
|
536
|
+
import { probeAgentProcessSandbox } from 'stitchkit/agent-runtime'
|
|
537
|
+
|
|
538
|
+
// after
|
|
539
|
+
import { probeAgentProcessSandbox } from 'stitchkit/agent-runtime/sandbox'
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
### remove-app-error-helper
|
|
543
|
+
|
|
544
|
+
**Who must act:** every project calling `appError(...)` from `stitchkit`,
|
|
545
|
+
`stitchkit/contract`, `stitchkit/server`, or `stitchkit/node`, or
|
|
546
|
+
relying on `new AppError(code)` defaulting to HTTP `500` for codes listed in
|
|
547
|
+
`STITCH_ERROR_STATUS`.
|
|
548
|
+
|
|
549
|
+
`new AppError(code, options?)` now derives its default `status` from
|
|
550
|
+
`STITCH_ERROR_STATUS[code]` (falling back to `500` for custom codes; an explicit
|
|
551
|
+
`status` still wins), and the redundant `appError(...)` helper is removed.
|
|
552
|
+
|
|
553
|
+
```ts
|
|
554
|
+
// before
|
|
555
|
+
appError('CONFLICT', 'Already exists', { id })
|
|
556
|
+
|
|
557
|
+
// after
|
|
558
|
+
throw new AppError('CONFLICT', { message: 'Already exists', details: { id } })
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
`appError` returned `never`, so it also stood where an expression is expected, and `throw` is a
|
|
562
|
+
statement. Each position has its own rewrite:
|
|
563
|
+
|
|
564
|
+
```ts
|
|
565
|
+
// a statement, or a returned call: throw instead
|
|
566
|
+
appError('CONFLICT', 'Already exists')
|
|
567
|
+
return appError('CONFLICT', 'Already exists')
|
|
568
|
+
// →
|
|
569
|
+
throw new AppError('CONFLICT', { message: 'Already exists' })
|
|
570
|
+
|
|
571
|
+
// an arrow body: give it a block
|
|
572
|
+
const refuse = () => appError('FORBIDDEN', 'Not yours')
|
|
573
|
+
// →
|
|
574
|
+
const refuse = () => {
|
|
575
|
+
throw new AppError('FORBIDDEN', { message: 'Not yours' })
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
// the right side of ??, ||, or a ternary branch: test first, then use the value
|
|
579
|
+
const user = found ?? appError('NOT_FOUND', 'No such user')
|
|
580
|
+
// →
|
|
581
|
+
if (found === undefined || found === null) {
|
|
582
|
+
throw new AppError('NOT_FOUND', { message: 'No such user' })
|
|
583
|
+
}
|
|
584
|
+
const user = found
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
A mechanical starting point for calls that are statements (`^\s*` anchors the match to the start
|
|
588
|
+
of a line, so an expression position is left for the rewrites above; a message that itself holds a
|
|
589
|
+
comma or a parenthesis needs a hand edit; review custom domain codes and consider `defineErrors`):
|
|
590
|
+
|
|
591
|
+
```text
|
|
592
|
+
Regex (1 arg): ^(\s*)(?:return\s+)?appError\(\s*([^,()]+)\s*\)
|
|
593
|
+
Replace: $1throw new AppError($2)
|
|
594
|
+
Regex (2 args): ^(\s*)(?:return\s+)?appError\(\s*([^,()]+)\s*,\s*([^,()]+)\s*\)
|
|
595
|
+
Replace: $1throw new AppError($2, { message: $3 })
|
|
596
|
+
Regex (3 args): ^(\s*)(?:return\s+)?appError\(\s*([^,()]+)\s*,\s*([^,()]+)\s*,\s*([^()]+)\)
|
|
597
|
+
Replace: $1throw new AppError($2, { message: $3, details: $4 })
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
### store-driver-contract-step-1
|
|
601
|
+
|
|
602
|
+
**Who must act:** authors of custom `AgentRuntimeStore` drivers and callers of
|
|
603
|
+
`runAgentStoreConformance` from `stitchkit/agent-runtime/testing`.
|
|
604
|
+
|
|
605
|
+
1. Implement required `history.hasMessage(tx, { conversationId, messageId })` and
|
|
606
|
+
`events.find(tx, { conversationId, eventId })` on your driver (backed by a unique
|
|
607
|
+
index on `(conversation_id, event_id)`). Fallback scans have been removed.
|
|
608
|
+
2. Pass required `capabilities: { branch, planBranch }` and
|
|
609
|
+
`commitConflict: { arm() } | { impossible: 'single-writer' }` to
|
|
610
|
+
`runAgentStoreConformance` (replacing optional `armCommitConflict`).
|
|
611
|
+
|
|
612
|
+
### durable-tool-status
|
|
613
|
+
|
|
614
|
+
**Who must act:** code that reads `tool-status` events from `stitchkit/agent-runtime`
|
|
615
|
+
or `stitchkit/agent-runtime/browser` (a custom view reducer, a cursor of its own).
|
|
616
|
+
|
|
617
|
+
A `tool-status` event now carries `eventId` and `snapshotVersion`, like
|
|
618
|
+
`assistant-checkpoint`, and no longer `runtimeEpoch` or `sequence`. Treat it as
|
|
619
|
+
durable: deduplicate by `eventId`, and after a reconnect read the call's status from
|
|
620
|
+
the snapshot's assistant message parts. The built-in controller and
|
|
621
|
+
`advanceAgentRuntimeEventCursor` already do.
|
|
622
|
+
|
|
623
|
+
### store-driver-contract-step-2
|
|
624
|
+
|
|
625
|
+
**Who must act:** callers of `runAgentStoreConformance` from
|
|
626
|
+
`stitchkit/agent-runtime/testing`, and code that catches the refusals of
|
|
627
|
+
`importConversation`, `branchConversation` or `planConversationBranch`.
|
|
628
|
+
|
|
629
|
+
1. Declare the two driver members in `capabilities`: `archive` (the driver has
|
|
630
|
+
`archive.export` and `archive.import`) and `historyRestore` (it has
|
|
631
|
+
`history.restore`). Read the answer from `store.capabilities` when unsure; the
|
|
632
|
+
kit fails when the declaration and the store disagree.
|
|
633
|
+
2. A store without one of them now refuses an archive or a branch source that
|
|
634
|
+
needs it with `AgentStoreUnsupportedCapabilityError` (still a `TypeError`;
|
|
635
|
+
`.capability` is `'archive'` or `'historyRestore'`) instead of dropping spills
|
|
636
|
+
and companion projections or reviving compacted history. Implement the member,
|
|
637
|
+
or keep such archives away from that store.
|
|
638
|
+
|
|
639
|
+
### async-list-schedules
|
|
640
|
+
|
|
641
|
+
**Who must act:** implementations and callers of `AgentScheduleService.listSchedules`
|
|
642
|
+
from `stitchkit/agent-runtime`.
|
|
643
|
+
|
|
644
|
+
`listSchedules(conversationId)` now returns `Promise<readonly AgentSchedule[]>`. Mark
|
|
645
|
+
custom implementations `async` and `await` every call site.
|
|
646
|
+
|
|
647
|
+
### tool-expose-rename
|
|
648
|
+
|
|
649
|
+
**Who must act:** definitions of runtime tools (`defineRuntimeTool`), native tools
|
|
650
|
+
(`defineDownloadTool`, `defineUploadTool`, `defineWaitTool`, `defineViewFileTool`),
|
|
651
|
+
client connections (`defineMcpClientConnection`, `defineOpenApiConnection`), async
|
|
652
|
+
operation capability maps, and readers of `ToolNameEntry.transports`.
|
|
653
|
+
|
|
654
|
+
Rename `transports` to `expose`. Passing the old `transports` key now throws a
|
|
655
|
+
`TypeError` at definition/mount time. (`SocketIOServerConfig.transports`,
|
|
656
|
+
`SurfaceProbe.transports` and `summarizeTransports` are unrelated and unchanged.)
|
|
657
|
+
|
|
658
|
+
```ts
|
|
659
|
+
// before
|
|
660
|
+
defineMcpClientConnection({ name: 'api', transport: { url }, transports: ['CLI'] })
|
|
661
|
+
const names = listToolNames(surface).filter((entry) => entry.transports.includes('MCP'))
|
|
662
|
+
|
|
663
|
+
// after
|
|
664
|
+
defineMcpClientConnection({ name: 'api', transport: { url }, expose: ['CLI'] })
|
|
665
|
+
const names = listToolNames(surface).filter((entry) => entry.expose.includes('MCP'))
|
|
666
|
+
```
|
|
667
|
+
|
|
668
|
+
### cli-command-settings
|
|
669
|
+
|
|
670
|
+
**Who must act:** every `createCli` and `createCliInvoker` caller passing top-level
|
|
671
|
+
`optionAliases`, `positionals`, `results`, `passthrough`, or `wait`, and code typed against
|
|
672
|
+
`CliPresentationPolicyConfig`, which keeps only `commandSettings` for them.
|
|
673
|
+
|
|
674
|
+
Move per-command settings into the single typed `commandSettings` map (legacy top-level
|
|
675
|
+
keys throw `TypeError` at startup):
|
|
676
|
+
|
|
677
|
+
```ts
|
|
678
|
+
// before
|
|
679
|
+
createCli({
|
|
680
|
+
name: 'app',
|
|
681
|
+
version: '1.0.0',
|
|
682
|
+
services,
|
|
683
|
+
optionAliases: { logs: { f: 'follow' } },
|
|
684
|
+
positionals: { logs: ['target'] },
|
|
685
|
+
results: { logs: defineCliResult(LogsOutput, { present }) },
|
|
686
|
+
})
|
|
687
|
+
|
|
688
|
+
// after
|
|
689
|
+
createCli({
|
|
690
|
+
name: 'app',
|
|
691
|
+
version: '1.0.0',
|
|
692
|
+
services,
|
|
693
|
+
access: { gate: { beforeHandle: authHook } },
|
|
694
|
+
commandSettings: {
|
|
695
|
+
logs: {
|
|
696
|
+
aliases: { f: 'follow' },
|
|
697
|
+
positionals: ['target'],
|
|
698
|
+
result: defineCliResult(LogsOutput, { present }),
|
|
699
|
+
},
|
|
700
|
+
},
|
|
701
|
+
})
|
|
702
|
+
```
|
|
703
|
+
|
|
704
|
+
A direct `parseCliArgs` caller renames the same option: `parseCliArgs(argv, schema, { optionAliases })`
|
|
705
|
+
becomes `parseCliArgs(argv, schema, { aliases })`, with the same `Map` of letter to field.
|
|
706
|
+
|
|
707
|
+
### discovered-mcp-structured-content
|
|
708
|
+
|
|
709
|
+
**Who must act:** MCP client connections (`stitchkit/tools/connections`) calling remote
|
|
710
|
+
MCP servers that advertise `outputSchema`, and code that maps every `StitchErrorCode`
|
|
711
|
+
(`satisfies Record<StitchErrorCode, …>`, an exhaustive `switch`).
|
|
712
|
+
|
|
713
|
+
Discovered tools with an object `outputSchema` now validate and return
|
|
714
|
+
`result.structuredContent` across MCP, Agent and CLI mounts (and count `outputSchema`
|
|
715
|
+
bytes toward `maxSchemaBytes`). For such a tool the structured value is the whole answer
|
|
716
|
+
on every transport: any sibling `content` parts (text, images) sent beside it are no
|
|
717
|
+
longer passed through. If an upstream server declares `outputSchema` but omits
|
|
718
|
+
`structuredContent` on a non-error call, the call fails loudly with
|
|
719
|
+
`MCP_STRUCTURED_CONTENT_MISSING` (`502`). The code is in `StitchErrorCode` and
|
|
720
|
+
`STITCH_ERROR_STATUS`; a map over every code adds it:
|
|
721
|
+
|
|
722
|
+
```ts
|
|
723
|
+
// before
|
|
724
|
+
const kind = { …, INTERNAL_SERVER_ERROR: 'internal' } satisfies Record<StitchErrorCode, string>;
|
|
725
|
+
|
|
726
|
+
// after
|
|
727
|
+
const kind = {
|
|
728
|
+
…,
|
|
729
|
+
INTERNAL_SERVER_ERROR: 'internal',
|
|
730
|
+
MCP_STRUCTURED_CONTENT_MISSING: 'upstream',
|
|
731
|
+
} satisfies Record<StitchErrorCode, string>;
|
|
732
|
+
```
|
|
733
|
+
|
|
734
|
+
### mandatory-tool-access
|
|
735
|
+
|
|
736
|
+
**Who must act:** every caller of `mountAgent`, `mountMcp`, `buildMcpServer`,
|
|
737
|
+
`createMcpHandler`, `createStdioMcpServer`, `createToolInvoker`,
|
|
738
|
+
`createDeferredAgentToolSurface().mount`,
|
|
739
|
+
`createToolkit().{mountMcp,mountAgent,createCli}`, `composeToolLifecycle`, and any
|
|
740
|
+
managed `createCli` / `createCliInvoker` (with `services` or `runtimeTools`).
|
|
741
|
+
|
|
742
|
+
Replace optional `lifecycle` with mandatory `access` — either `{ gate }` with a
|
|
743
|
+
required `beforeHandle` auth hook, or an explicit `{ open: 'public' | 'local-operator' | 'remote', afterHandle? }`:
|
|
744
|
+
|
|
745
|
+
```ts
|
|
746
|
+
// before
|
|
747
|
+
createMcpHandler({ serverInfo, auth, services, lifecycle: { beforeHandle: authHook } })
|
|
748
|
+
mountAgent(services, { context })
|
|
749
|
+
const invoker = createToolInvoker(services, { transport: 'AGENT' })
|
|
750
|
+
await invoker.invoke('op', args, { lifecycle: { beforeHandle: authHook } })
|
|
751
|
+
|
|
752
|
+
// after
|
|
753
|
+
createMcpHandler({ serverInfo, auth, services, access: { gate: { beforeHandle: authHook } } })
|
|
754
|
+
mountAgent(services, { context, access: { gate: { beforeHandle: authHook } } })
|
|
755
|
+
const invoker = createToolInvoker(services, {
|
|
756
|
+
transport: 'AGENT',
|
|
757
|
+
access: { gate: { beforeHandle: authHook } },
|
|
758
|
+
})
|
|
759
|
+
await invoker.invoke('op', args)
|
|
760
|
+
```
|
|
761
|
+
|
|
762
|
+
`composeToolLifecycle(gate, ...rest)` now requires a `ToolGate` first and refuses
|
|
763
|
+
`undefined` at compile time and at runtime. Native-only CLIs (`commands` only, no
|
|
764
|
+
`services` or `runtimeTools`) take no `access`.
|
|
765
|
+
|
|
766
|
+
### openrouter-extra-body-policy-keys
|
|
767
|
+
|
|
768
|
+
**Who must act:** callers of `openRouterProvider` (`stitchkit/agent-runtime/openrouter`)
|
|
769
|
+
that pass `provider`, `reasoning`, `session_id` or `usage` inside `settings.extraBody`.
|
|
770
|
+
|
|
771
|
+
Move those keys into the request policy (`defaultPolicy` or `resolvePolicy`) passed as the
|
|
772
|
+
second argument to `openRouterProvider`, so per-request routing, reasoning and usage
|
|
773
|
+
policies are never silently overwritten by provider-level `extraBody`:
|
|
774
|
+
|
|
775
|
+
```ts
|
|
776
|
+
// before
|
|
777
|
+
openRouterProvider({
|
|
778
|
+
apiKey,
|
|
779
|
+
extraBody: { provider: { order: ['anthropic'] }, usage: { include: true } },
|
|
780
|
+
})
|
|
781
|
+
|
|
782
|
+
// after
|
|
783
|
+
openRouterProvider(
|
|
784
|
+
{ apiKey },
|
|
785
|
+
{ defaultPolicy: { provider: { order: ['anthropic'] } } },
|
|
786
|
+
)
|
|
787
|
+
```
|
|
788
|
+
|
|
789
|
+
### native-command-stdin-budget-reason
|
|
790
|
+
|
|
791
|
+
**Who must act:** callers of `stitchkit/process` that exhaustively switch on
|
|
792
|
+
`NativeCommandError.reason` when `code === 'COMMAND_LIMIT'`.
|
|
793
|
+
|
|
794
|
+
Streamed `stdin` (`ReadableStream<Uint8Array>`) in both `runNativeCommand` and
|
|
795
|
+
`streamNativeCommand` now enforces `maxStdinBytes` with
|
|
796
|
+
`NativeCommandError('COMMAND_LIMIT', ..., { reason: 'stdin-budget' })` instead of an
|
|
797
|
+
untyped `Error`. Handle the new `'stdin-budget'` member alongside `'deadline'` and
|
|
798
|
+
`'output-budget'`:
|
|
799
|
+
|
|
800
|
+
```ts
|
|
801
|
+
// before
|
|
802
|
+
switch (error.reason) {
|
|
803
|
+
case 'deadline':
|
|
804
|
+
case 'output-budget':
|
|
805
|
+
break;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
// after
|
|
809
|
+
switch (error.reason) {
|
|
810
|
+
case 'deadline':
|
|
811
|
+
case 'output-budget':
|
|
812
|
+
case 'stdin-budget':
|
|
813
|
+
break;
|
|
814
|
+
}
|
|
815
|
+
```
|
|
816
|
+
|
|
817
|
+
### telegram-html-link-rules
|
|
818
|
+
|
|
819
|
+
**Who must act:** every caller of `sanitizeTelegramHtml`, `parseTelegramHtml`,
|
|
820
|
+
`splitTelegramHtml` or `truncateTelegramHtml` from `stitchkit/telegram/html` whose
|
|
821
|
+
links can hold a raw space or tab, or a bare `tg:` / `mailto:`.
|
|
822
|
+
|
|
823
|
+
An `href` with whitespace or a control character anywhere, or a `tg:` / `mailto:`
|
|
824
|
+
with nothing after the scheme, is no longer a link: its words stay, the `<a>`
|
|
825
|
+
goes. Encode the space before the markup reaches the parser.
|
|
826
|
+
|
|
827
|
+
```ts
|
|
828
|
+
// before
|
|
829
|
+
sanitizeTelegramHtml('<a href="https://x.test/a b">docs</a>') // <a href="https://x.test/a b">docs</a>
|
|
830
|
+
// after
|
|
831
|
+
sanitizeTelegramHtml('<a href="https://x.test/a b">docs</a>') // docs
|
|
832
|
+
sanitizeTelegramHtml('<a href="https://x.test/a%20b">docs</a>') // <a href="https://x.test/a%20b">docs</a>
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
### telegram-html-split-atom
|
|
836
|
+
|
|
837
|
+
**Who must act:** every caller of `splitTelegramHtml` from `stitchkit/telegram/html` whose markup
|
|
838
|
+
can hold a custom emoji (`<tg-emoji>`) or a `<tg-time>` with more visible characters than `limit`.
|
|
839
|
+
|
|
840
|
+
Such an atom cannot be cut. `splitTelegramHtml` returned it as a part over the limit, followed by an
|
|
841
|
+
empty part — both refused by Telegram; it now throws `RangeError`. Pass a `limit` the longest atom
|
|
842
|
+
fits in, or catch the `RangeError` where the markup comes from outside. `truncateTelegramHtml` is
|
|
843
|
+
unchanged: it cuts before the atom.
|
|
844
|
+
|
|
845
|
+
An atom whose text begins with a space or a line break was dropped with the break a cut was made at,
|
|
846
|
+
leaving an empty part. The cut now goes before it, so the atom is sent, and no part is empty: code
|
|
847
|
+
that skipped empty parts of `splitTelegramHtml` before sending can drop that filter.
|
|
848
|
+
|
|
849
|
+
```ts
|
|
850
|
+
// before
|
|
851
|
+
splitTelegramHtml('ab <tg-emoji emoji-id="1">abcdefghij</tg-emoji> cd', { limit: 5 })
|
|
852
|
+
// ['ab', '<tg-emoji emoji-id="1">abcdefghij</tg-emoji>', '', 'cd']
|
|
853
|
+
// after: RangeError — a custom emoji or a time is longer than the limit
|
|
854
|
+
```
|
|
855
|
+
|
|
856
|
+
### operator-channel-flood-wait
|
|
857
|
+
|
|
858
|
+
**Who must act:** a reader of `TelegramOperatorDrop.reason` from `stitchkit/telegram` with an
|
|
859
|
+
exhaustive `switch`, or a bot that must wait out a long flood wait on its operator chat.
|
|
860
|
+
|
|
861
|
+
1. Add a `'flood-wait'` case where drops are switched on:
|
|
862
|
+
|
|
863
|
+
```ts
|
|
864
|
+
// before
|
|
865
|
+
case 'over-budget':
|
|
866
|
+
// after
|
|
867
|
+
case 'over-budget':
|
|
868
|
+
case 'flood-wait':
|
|
869
|
+
```
|
|
870
|
+
|
|
871
|
+
2. To wait longer than a minute, pass `maxRetryAfterMs` (at most 2147483647 ms) to
|
|
872
|
+
`createTelegramOperatorChannel`.
|
|
873
|
+
|
|
874
|
+
### timer-options-one-rule
|
|
875
|
+
|
|
876
|
+
**Who must act:** code that catches the refusal of a timer option by its error class:
|
|
877
|
+
`reconcileTimeoutMs` (`stitchkit/tools`), a connection's `timeoutMs` / `idleTimeoutMs`
|
|
878
|
+
(`stitchkit/tools/connections`), a streaming route's `heartbeatMs` (`stitchkit/server`), an
|
|
879
|
+
observability drain `timeoutMs` (`stitchkit/observability`), `watchdogTimeoutMs` and
|
|
880
|
+
`runSurfaceProbes`' `timeoutMs` (`stitchkit/testing`), a realtime request `timeoutMs` (`stitchkit`),
|
|
881
|
+
`authorizationTimeoutMs` (`stitchkit/agent-runtime/realtime`), `expiresInMs`
|
|
882
|
+
(`stitchkit/telegram/screens`), `maxWaitMs` (`stitchkit/telegram`), `verifyTimeoutMs`
|
|
883
|
+
(`stitchkit/cli`), the `timeoutMs` of `openRouterModelCatalog` and
|
|
884
|
+
`createOpenRouterSpendReconciler` (`stitchkit/agent-runtime/openrouter`), and the timer options of
|
|
885
|
+
`createBoundedAdmission`, the diagnostic journal, `createTelegramBotTransport`,
|
|
886
|
+
`createAgentRuntime`, `createAgentController` and `createAgentRaceBarrier`; `createManagedFileBoundary`'s
|
|
887
|
+
`inspectionTimeoutMs` (`stitchkit/files`), `createUnixClientTransport`'s `headersTimeoutMs`
|
|
888
|
+
(`stitchkit/server`, `stitchkit/node`), the `close()` budgets of `AgentRuntime` and
|
|
889
|
+
`createAgentSessionCoordinator` (`stitchkit/agent-runtime`), `createCacheBridge`'s `freshWindow`
|
|
890
|
+
(`stitchkit/react`), a credit window's `acquire` `timeoutMs` (`stitchkit/application`),
|
|
891
|
+
`createTelegramUpdateIntake`'s `leaseMs` / `sweepEveryMs` (`stitchkit/telegram`); and code that passes an
|
|
892
|
+
HTTP client, endpoint or request `timeout`, `reconnectOnServerDisconnect`, `uploadInChunks`'
|
|
893
|
+
`retryDelayMs`, a `BackoffPolicy` delay (`stitchkit`, `stitchkit/http`, `stitchkit/realtime`), or a wait
|
|
894
|
+
tool `defaultTimeout` / wait `timeoutSec` (`stitchkit/tools`, `stitchkit/cli`) outside the timer range;
|
|
895
|
+
code that catches the plain `Error` of a download or view-file tool `timeoutMs`,
|
|
896
|
+
`createSecureClientMetadataFetcher`, a stream endpoint, a `defineEvents` topic or
|
|
897
|
+
`createDecisionPipeline` (`stitchkit/tools`, `stitchkit/contract`, `stitchkit/live`,
|
|
898
|
+
`stitchkit/application`); and code that passes a watch, GeoIP reload, release-watcher, tracking,
|
|
899
|
+
`applyCliUpdate` or shutdown/restart schema delay (`stitchkit/live`, `stitchkit/application`,
|
|
900
|
+
`stitchkit/geo`, `stitchkit/release`, `stitchkit/tracking`, `stitchkit/cli`, `stitchkit/server`,
|
|
901
|
+
`stitchkit/node`) outside the timer range; and code that passes a fractional, negative or `NaN`
|
|
902
|
+
`maxFileBytes` / `staleAfterMs` to `createChunkSpool` (`stitchkit/files`) or `maxQueued` /
|
|
903
|
+
`maxAttempts` / `minIntervalMs` to `createTelegramOperatorChannel` (`stitchkit/telegram`).
|
|
904
|
+
|
|
905
|
+
1. Search for `reconcileTimeoutMs` next to `instanceof TypeError`; branch on `RangeError`
|
|
906
|
+
instead. A fractional value (`1.5`) is now refused too — pass an integer.
|
|
907
|
+
2. A connection `timeoutMs` / `idleTimeoutMs` that is not a number (read from JSON as a string)
|
|
908
|
+
now throws `TypeError`; parse it to a number before defining the connection.
|
|
909
|
+
3. Every other timer option answers the same way: a value that is not a number is a `TypeError`; a
|
|
910
|
+
number that is not an integer from 1 (0 for a drain bound, a run timeout or a retry delay) to
|
|
911
|
+
2147483647 is a `RangeError`. Where you branch on `TypeError` for `heartbeatMs: 0` or a drain
|
|
912
|
+
`timeoutMs: -1`, branch on `RangeError`. Where you branch on `RangeError` for a value that is not
|
|
913
|
+
a number — a realtime request `timeoutMs`, `expiresInMs`, `maxWaitMs`, `verifyTimeoutMs` — branch
|
|
914
|
+
on `TypeError`. A value above 2147483647 used to pass and end the wait at once; pass at most
|
|
915
|
+
2147483647 (about 24.8 days).
|
|
916
|
+
4. The same `TypeError` → `RangeError` move covers `inspectionTimeoutMs`, `headersTimeoutMs` and the
|
|
917
|
+
`gracePeriodMs` / `forceTimeoutMs` of `AgentRuntime.close()` / `createAgentSessionCoordinator().close()`
|
|
918
|
+
(a `NaN`, a negative or a fraction; 0 stays valid). A `leaseMs` / `sweepEveryMs` of
|
|
919
|
+
`createTelegramUpdateIntake` that is not a number is now a `TypeError` (it was a `RangeError`).
|
|
920
|
+
5. `createCacheBridge`'s `freshWindow` answered with a plain `Error` and a credit window's
|
|
921
|
+
`acquire(bytes, { timeoutMs })` with a `ZodError`; both are now the timer rule's `RangeError` /
|
|
922
|
+
`TypeError`. `instanceof Error` still holds for both; a message match or an `instanceof ZodError` does
|
|
923
|
+
not.
|
|
924
|
+
6. Newly refused, where nothing checked them: `createHttpClient` / `createClient` / endpoint / request
|
|
925
|
+
`timeout`, `createSocketIOClient`'s `reconnectOnServerDisconnect`, `uploadInChunks`' `retryDelayMs`
|
|
926
|
+
(0, a negative, `NaN` or past 2147483647 — such a value fired at once), and a `BackoffPolicy`'s
|
|
927
|
+
delays past 2147483647 (`ZodError`). Pass the delay you meant, at most 2147483647.
|
|
928
|
+
7. A wait tool's `defaultTimeout` and a wait's `timeoutSec` are seconds: negative, not finite, or past
|
|
929
|
+
2147483.647 (the timer ceiling in seconds) they are a `RangeError` when the tool is defined or before
|
|
930
|
+
the first poll; pass at most that, or a `--wait-timeout` within it.
|
|
931
|
+
8. A plain `Error` became the timer rule's `RangeError` (a `TypeError` when not a number), and a fraction
|
|
932
|
+
is refused too: the `timeoutMs` of `defineDownloadTool`, `mountDownload`, `defineViewFileTool` and
|
|
933
|
+
`mountViewFile` (now when the tool is defined, not at the first fetch), of
|
|
934
|
+
`createSecureClientMetadataFetcher`, a stream endpoint's `lifetimeMs` / `heartbeatMs`, a
|
|
935
|
+
`defineEvents` topic's `listenerTimeoutMs` and `createDecisionPipeline`'s `policyTimeoutMs`.
|
|
936
|
+
`instanceof Error` still holds; a message match does not.
|
|
937
|
+
9. Newly refused where they are taken: `createWatchClient`'s `holdMs` / `openTimeoutMs`,
|
|
938
|
+
`createWatchHub`'s `holdMs` and `backoff`, `createGeoIpResolver`'s `reload.intervalMs` (turn reloading
|
|
939
|
+
off with `reload: false`, not `intervalMs: 0`), `createReleaseWatcher`'s `maxDeferMs`,
|
|
940
|
+
`createTrackingClient`'s `heartbeatMs`, `deliverTrackingBatch`'s `retryDelayMs`,
|
|
941
|
+
`createPerformanceCollector`'s `earlyDelayMs` and `applyCliUpdate`'s `timeoutMs` / `idleTimeoutMs`
|
|
942
|
+
(before the download). `ShutdownOptionsSchema`, `ApplicationRestartInputSchema`,
|
|
943
|
+
`createNotificationOutbox`'s `pollIntervalMs` and a fault plan's `timeout-before-first-byte`
|
|
944
|
+
`milliseconds` refuse a value past 2147483647 with their `ZodError`. Pass the delay you meant, at
|
|
945
|
+
most 2147483647.
|
|
946
|
+
10. A count, a byte size or an age is a safe integer, refused when the factory is created
|
|
947
|
+
([ADR 0324](../decisions/0324-a-count-a-size-or-an-age-is-a-safe-integer-refused-where-it-is-taken.md)):
|
|
948
|
+
`createChunkSpool`'s `maxFileBytes` (positive) and `staleAfterMs` (0 allowed), and
|
|
949
|
+
`createTelegramOperatorChannel`'s `maxQueued` and `maxAttempts` (positive) are a `TypeError`
|
|
950
|
+
when fractional, negative or `NaN`; its `minIntervalMs` follows the timer rule (0 allowed).
|
|
951
|
+
Round a computed value: `staleAfterMs: Math.round(hours * 3.6e6)`.
|
|
952
|
+
|
|
953
|
+
### deferred-surface-projection
|
|
954
|
+
|
|
955
|
+
**Who must act:** every caller of `createDeferredAgentToolSurface().mount` from `stitchkit/agent-runtime`
|
|
956
|
+
that passes `extend` or `flattenUnionInput`.
|
|
957
|
+
|
|
958
|
+
1. Move both keys, unchanged, from the `mount` config into the `createDeferredAgentToolSurface({ … })`
|
|
959
|
+
config — one value for every surface of the registry. A `mount` that still names one throws
|
|
960
|
+
`TypeError`.
|
|
961
|
+
|
|
962
|
+
```ts
|
|
963
|
+
// before
|
|
964
|
+
const deferred = createDeferredAgentToolSurface({ runtimeTools, search, activation })
|
|
965
|
+
deferred.mount(runContext, { access, extend, flattenUnionInput: true })
|
|
966
|
+
// after
|
|
967
|
+
const deferred = createDeferredAgentToolSurface({
|
|
968
|
+
runtimeTools, search, activation, extend, flattenUnionInput: true,
|
|
969
|
+
})
|
|
970
|
+
deferred.mount(runContext, { access })
|
|
971
|
+
```
|
|
972
|
+
|
|
973
|
+
2. `activation.maxSchemaBytes` now measures the projected schemas. A ceiling sized against the old,
|
|
974
|
+
unprojected manifest may be refused at creation (`base tools exceed maxSchemaBytes`) or per step
|
|
975
|
+
(`AgentContextOverflowError`): raise it to the `activeSchemaBytes` that `observe` reports.
|
|
976
|
+
|
|
977
|
+
### retry-max-attempts
|
|
978
|
+
|
|
979
|
+
**Who must act:** a runtime from `stitchkit/agent-runtime` whose `loop.retry.maxAttempts` is `0`, negative,
|
|
980
|
+
a fraction, `NaN` or `Infinity`, and a caller of `recordAgentRetryDecision` with such a policy.
|
|
981
|
+
|
|
982
|
+
Write the number of attempts as a positive integer: `1` for no retry, a finite ceiling instead of
|
|
983
|
+
`Infinity`. Any other value is refused with `TypeError` when the runtime is created.
|
|
984
|
+
|
|
985
|
+
### spool-file-over-its-bound
|
|
986
|
+
|
|
987
|
+
**Who must act:** every `createSpooledSink` from `stitchkit/observability` whose spool file is
|
|
988
|
+
larger than its `maxFileBytes` (default 64 MiB) — one a long outage left under 0.126, which read
|
|
989
|
+
the file whole, or one whose bound was lowered — anything that watches `recover()`, and every
|
|
990
|
+
writer whose store can be down for longer than `maxPendingEntries` (default 10 000) records or
|
|
991
|
+
`maxFileBytes` of them: 0.126 spooled every one, 0.127 keeps the bound (ADR 0323).
|
|
992
|
+
|
|
993
|
+
`recover()` reads the file line by line. A debt that fits the bound is replayed and the file
|
|
994
|
+
compacted as before. A debt that does not fit is moved beside the file,
|
|
995
|
+
`<path>.<milliseconds>.overflow`, and `recover()` names it in `quarantined`; the spool goes on with
|
|
996
|
+
an empty file, so new records are spooled while the store is down. `onSpoolError` reports it as
|
|
997
|
+
`SPOOL_QUARANTINED`. Records the replay offered and left owed are counted in `failed`; records of a
|
|
998
|
+
file too large to read within the bound are not offered, so treat `quarantined` as owed work. A file
|
|
999
|
+
that cannot be read at all (a permission, a directory in its place) is not an empty debt either:
|
|
1000
|
+
`recover()` sets `unread: true`, reports `SPOOL_UNREADABLE` with the read error as `cause`, and
|
|
1001
|
+
leaves the file as it is:
|
|
1002
|
+
|
|
1003
|
+
```ts
|
|
1004
|
+
// before
|
|
1005
|
+
const { failed } = await sink.recover();
|
|
1006
|
+
if (failed > 0) alert(`${failed} audit rows are still owed`);
|
|
1007
|
+
|
|
1008
|
+
// after
|
|
1009
|
+
const { failed, quarantined, unread } = await sink.recover();
|
|
1010
|
+
if (failed > 0 || quarantined || unread) alert(`audit rows are still owed${quarantined ? ` in ${quarantined}` : ''}`);
|
|
1011
|
+
// The moved file is a spool of its own: replay it with a bound it fits.
|
|
1012
|
+
if (quarantined)
|
|
1013
|
+
await createSpooledSink({ path: quarantined, maxFileBytes: 1024 * 1024 * 1024, write }).recover();
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
A record past `maxPendingEntries` or `maxFileBytes` is not spooled. It is still offered to the store;
|
|
1017
|
+
when the store refuses it too, it is kept nowhere and `write` says so: it rejects with code
|
|
1018
|
+
`SPOOL_UNSPOOLED` and the store's error as `cause`, where a row on disk rejects with the store's own
|
|
1019
|
+
error. `onSpoolError` reports `SPOOL_FULL` with the bound (`entries` or `bytes`). Size the bounds for
|
|
1020
|
+
the longest outage the audit must survive, and keep or alert on a row it could not hold:
|
|
1021
|
+
|
|
1022
|
+
```ts
|
|
1023
|
+
// before — every rejection meant "on disk, replayed by recover()"
|
|
1024
|
+
try { await sink.write(event); } catch { /* recover() will deliver it */ }
|
|
1025
|
+
|
|
1026
|
+
// after
|
|
1027
|
+
const sink = createSpooledSink({ path, write, maxPendingEntries: 100_000, maxFileBytes: 512 * 1024 * 1024 });
|
|
1028
|
+
try {
|
|
1029
|
+
await sink.write(event);
|
|
1030
|
+
} catch (error) {
|
|
1031
|
+
if (error instanceof Error && 'code' in error && error.code === 'SPOOL_UNSPOOLED')
|
|
1032
|
+
keepElsewhere(event); // not saved anywhere
|
|
1033
|
+
}
|
|
1034
|
+
```
|
|
1035
|
+
|
|
1036
|
+
### double-failure-aggregate-error
|
|
1037
|
+
|
|
1038
|
+
**Who must act:** code that branches on the class of a rejection from a SQLite agent store
|
|
1039
|
+
(`stitchkit/agent-runtime/sqlite/bun`, `stitchkit/agent-runtime/sqlite/node`) or from
|
|
1040
|
+
`createSessionCredentials().login()` (`stitchkit`).
|
|
1041
|
+
|
|
1042
|
+
When an operation fails and its cleanup fails too, the rejection is one `AggregateError`: `errors`
|
|
1043
|
+
holds the first failure, then the cleanup's, and `cause` is the first failure. A SQLite transaction
|
|
1044
|
+
or schema initialization whose `ROLLBACK` fails (other than "no transaction is active") threw the
|
|
1045
|
+
rollback's error before and lost the failure that ended the transaction. A `login()` whose storage
|
|
1046
|
+
write fails and whose clear of the stored session fails too rejected with the write failure.
|
|
1047
|
+
|
|
1048
|
+
```ts
|
|
1049
|
+
// before
|
|
1050
|
+
catch (error) {
|
|
1051
|
+
if (error instanceof StorageQuotaError) showQuotaHint()
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
// after
|
|
1055
|
+
catch (error) {
|
|
1056
|
+
const first = error instanceof AggregateError ? error.cause : error
|
|
1057
|
+
if (first instanceof StorageQuotaError) showQuotaHint()
|
|
1058
|
+
}
|
|
1059
|
+
```
|