stitchkit 0.126.0 → 0.128.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 +1767 -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 +97 -0
- package/dist/agent-executor/acp/v1-connect.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-driver.d.ts +37 -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 +30 -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 +31 -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 +206 -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 +23 -0
- package/dist/agent-executor/claude/session.d.ts.map +1 -0
- package/dist/agent-executor/claude/transcript.d.ts +36 -0
- package/dist/agent-executor/claude/transcript.d.ts.map +1 -0
- package/dist/agent-executor/claude-sdk/driver.d.ts +35 -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 +27 -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 +176 -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 +43 -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/image-input.d.ts +71 -0
- package/dist/agent-executor/image-input.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 +69 -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 +22 -8
- 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 +60 -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 +43 -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 +153 -30
- package/dist/agent-runtime/branch-observations.d.ts.map +1 -1
- package/dist/agent-runtime/branch-provider.d.ts +43 -56
- 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 +19 -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 +82 -7
- 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 +141 -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-attempt.d.ts +1 -1
- package/dist/agent-runtime/invocation-attempt.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-payload.d.ts +12 -0
- package/dist/agent-runtime/invocation-payload.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-read.d.ts +6 -3
- package/dist/agent-runtime/invocation-read.d.ts.map +1 -1
- package/dist/agent-runtime/invocation-schema.d.ts +70 -5
- 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 +20 -9
- 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 +49 -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-invocation-payload.d.ts +48 -0
- package/dist/agent-runtime/schemas-invocation-payload.d.ts.map +1 -0
- 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 +82 -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 +63 -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-seed.d.ts +8 -0
- package/dist/agent-runtime/store-conformance-seed.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +10 -10
- 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 +27 -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-events.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 +22 -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 +10 -25
- 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 +921 -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 +325 -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 +422 -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 +858 -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 +34 -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 +335 -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 +26 -16
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime.js +1439 -1198
- 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 +92 -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 +54 -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 +259 -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 +26 -0
- package/dist/entrypoints/service-host.d.ts.map +1 -0
- package/dist/entrypoints/service-host.js +3155 -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 +13 -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 +10 -7
- package/dist/entrypoints/tools/mcp.js +17 -13
- package/dist/entrypoints/tools/toolkit.js +22 -18
- package/dist/entrypoints/tools.d.ts +4 -2
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +105 -90
- 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 +55 -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 +135 -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-0gqs8ght.js +558 -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-13dnv6d0.js +296 -0
- package/dist/index-1q0n6zek.js +184 -0
- package/dist/index-1qwrczr1.js +405 -0
- package/dist/index-27hck3z2.js +307 -0
- package/dist/index-2c5w2d1d.js +107 -0
- package/dist/{index-fvd6pvw3.js → index-2nwvn7m2.js} +2 -2
- 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-mfntvj58.js → index-3dq8466w.js} +1 -1
- package/dist/index-3tnwtz38.js +725 -0
- package/dist/{index-x2d51zay.js → index-3ypvpkwr.js} +309 -345
- package/dist/index-4gk6k3zc.js +248 -0
- package/dist/{index-kxff9e9w.js → index-4j8efqr3.js} +5 -4
- package/dist/index-4qvyhn23.js +40 -0
- package/dist/index-4ynw5ktx.js +78 -0
- package/dist/index-5awtbyns.js +19 -0
- 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-5v5vg85s.js +108 -0
- package/dist/{index-0v9xb8pz.js → index-5y7j383h.js} +5 -5
- package/dist/{index-bqzgaj57.js → index-673drwkn.js} +198 -61
- package/dist/{index-v62cpkx3.js → index-6g85s734.js} +1 -1
- package/dist/{index-sqc6ezrb.js → index-6kec3b14.js} +17 -4
- package/dist/{index-cvjddnvd.js → index-6wp4dn9d.js} +17 -8
- 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-ss67fxhj.js → index-877e9y8r.js} +7 -7
- package/dist/{index-aw6kx2e6.js → index-8gmmdz7k.js} +1 -1
- package/dist/index-8x22nprv.js +1461 -0
- 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-egg0yp2j.js → index-9xr44d2g.js} +86 -210
- package/dist/{index-b2sey031.js → index-9y0afd5f.js} +24 -23
- package/dist/{index-nmaqxdx7.js → index-ac5rj3d4.js} +203 -90
- package/dist/{index-wqzw3qg9.js → index-agy5fqgf.js} +32 -13
- 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-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-bz3gn6cs.js +407 -0
- package/dist/index-c5gp2gh6.js +51 -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-1szhrfsf.js → index-d54npte7.js} +7 -5
- package/dist/{index-ne4j9998.js → index-e06z0tkb.js} +123 -94
- package/dist/index-emgrmavr.js +1193 -0
- package/dist/{index-99nnsz39.js → index-en8e5zsj.js} +15 -135
- package/dist/{index-20hn8pbh.js → index-fmzg39a8.js} +1 -1
- package/dist/{index-ft2wvst5.js → index-g3e57qj6.js} +1928 -414
- package/dist/index-g56ht6qf.js +98 -0
- package/dist/{index-7cn66qdk.js → index-gf92hc87.js} +15 -7
- package/dist/{index-f56ct5gb.js → index-gj1rjf78.js} +4 -3
- package/dist/{index-g6a3na27.js → index-gnjgkecx.js} +7 -3
- package/dist/index-gzny6zsw.js +487 -0
- package/dist/{index-n6hvd1r2.js → index-hj1zq7mh.js} +26 -13
- package/dist/index-hy4653g4.js +345 -0
- package/dist/{index-t8jz0e20.js → index-j903yhp4.js} +30 -38
- package/dist/{index-9ypczvpj.js → index-jb4m241t.js} +2 -0
- package/dist/{index-wt6rw7rf.js → index-jfecdk1e.js} +29 -21
- package/dist/{index-cjzaj7ev.js → index-jxtg307y.js} +23 -21
- package/dist/{index-3ymcmpa9.js → index-ke02kxsr.js} +33 -163
- 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-48acz7z0.js → index-m18xm96h.js} +93 -46
- 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-1v3k5zgx.js → index-n7f89hjw.js} +610 -1168
- package/dist/index-ngwf1s3c.js +51 -0
- package/dist/{index-zfncctjp.js → index-nk0cy9g1.js} +5 -4
- package/dist/{index-hs76yzt7.js → index-paff5y0r.js} +17 -11
- package/dist/index-pn5b11ce.js +40 -0
- package/dist/{index-qaet40b2.js → index-prf6ayhf.js} +5 -7
- package/dist/{index-hkxgennw.js → index-ps3djm8d.js} +7 -1
- package/dist/index-pwskmywy.js +195 -0
- 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-x2rvpbtj.js → index-rxnyygke.js} +151 -17
- package/dist/index-rzeezh79.js +508 -0
- package/dist/index-s2e3h616.js +351 -0
- 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-t7wa7k12.js +221 -0
- 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-btjwc7xr.js → index-v1mxss62.js} +15 -14
- 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-vgzhw2zk.js +304 -0
- package/dist/index-vmbxj75t.js +177 -0
- package/dist/{index-tnnmekgb.js → index-wa6h4tz6.js} +3 -3
- package/dist/{index-pa9bhefy.js → index-waa6t4zx.js} +83 -10
- package/dist/{index-4efxzrht.js → index-wavv538x.js} +211 -196
- 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-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-xv9jb84s.js +929 -0
- package/dist/{index-v7rbjatr.js → index-y065r8g5.js} +1881 -1156
- package/dist/{index-yex7eg1v.js → index-y7sy1xdp.js} +6 -2
- 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-confirm.d.ts +32 -0
- package/dist/internal/bounded-file-confirm.d.ts.map +1 -0
- package/dist/internal/bounded-file-read.d.ts +34 -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 +53 -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 +14 -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 +62 -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 +8 -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 +128 -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-shared.d.ts +64 -0
- package/dist/service-host/systemd-render-shared.d.ts.map +1 -0
- package/dist/service-host/systemd-render.d.ts +98 -0
- package/dist/service-host/systemd-render.d.ts.map +1 -0
- package/dist/service-host/systemd-timer-render.d.ts +31 -0
- package/dist/service-host/systemd-timer-render.d.ts.map +1 -0
- package/dist/service-host/systemd-timer-rollback.d.ts +26 -0
- package/dist/service-host/systemd-timer-rollback.d.ts.map +1 -0
- package/dist/service-host/systemd-timer.d.ts +82 -0
- package/dist/service-host/systemd-timer.d.ts.map +1 -0
- package/dist/service-host/systemd-unit-ops.d.ts +26 -0
- package/dist/service-host/systemd-unit-ops.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 +63 -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 +75 -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 +37 -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 +71 -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 +10 -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 +3 -4
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +4 -3
- 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 +2 -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 +55 -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 +39 -246
- 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 +96 -184
- package/llms/contract.txt +7 -6
- package/llms/declaration.txt +3 -3
- package/llms/files.txt +11 -0
- package/llms/handler.txt +25 -0
- package/llms/http.txt +18 -1
- package/llms/node.txt +5 -4
- 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 +8 -3
- 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 +99 -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 +14 -9
- package/llms/tools.txt +85 -78
- package/llms/upgrading-0.127.0.txt +1059 -0
- package/llms/upgrading-0.128.0.txt +147 -0
- package/llms/upgrading.txt +2 -0
- package/llms-full.txt +3727 -542
- package/llms.txt +44 -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-8x0q6yfb.js +0 -247
- package/dist/index-a3z56mtn.js +0 -48
- 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
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,1773 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.128.0] - 2026-11-25
|
|
19
|
+
|
|
20
|
+
### ⚠️ Breaking changes
|
|
21
|
+
|
|
22
|
+
**Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime` that
|
|
23
|
+
reads `readPayload`, assumes `sent.artifactId` or a `provider/response` record's `artifactId` is
|
|
24
|
+
always present, switches exhaustively on `ModelInvocationConfig.authorize` actions, or relies on
|
|
25
|
+
`maxPayloadBytes` aborting the provider call
|
|
26
|
+
([migration](docs/guide/upgrading.md#invocation-payload-lifecycle)); every caller of
|
|
27
|
+
`extractCliGlobalOptions` or `scanCliInvocation` from `stitchkit/cli` that caught `CliArgumentError`
|
|
28
|
+
on call or on `.argv` access ([migration](docs/guide/upgrading.md#cli-option-projections-error-field));
|
|
29
|
+
and every repository with a `project.json` validated by `stitchkit/declaration` that still declares
|
|
30
|
+
`identity.version` ([migration](docs/guide/upgrading.md#declaration-single-version)).
|
|
31
|
+
|
|
32
|
+
- `stitchkit/agent-runtime` `createModelInvocationLedger` makes `maxPayloadBytes` non-fatal and adds
|
|
33
|
+
encrypted payload expiry redaction (`purgePayloads` / `store.purgeExpiredPayloads`). Exceeding
|
|
34
|
+
`maxPayloadBytes` previously failed the call before or after provider execution, and encrypted
|
|
35
|
+
payload artifacts had no retention purge path. Oversized request/response bodies now omit the
|
|
36
|
+
encrypted artifact with `payloadOmitted: 'max-payload-bytes'` (making `sent.artifactId` on
|
|
37
|
+
`provider/request` and top-level `artifactId` on `provider/response` optional while preserving
|
|
38
|
+
`payloadSha256`) and report `InvocationPayloadTooLargeError` via `complete().receiptError`;
|
|
39
|
+
`readPayload` now returns a discriminated `ModelInvocationPayloadRead`
|
|
40
|
+
(`{ status: 'available', payload, ... }` or `{ status: 'expired', expiredAt, ... }`); and
|
|
41
|
+
`ModelInvocationConfig.authorize` receives a fifth action `'purge-payloads'` alongside
|
|
42
|
+
`'complete'`, `'agent'`, `'read'`, and `'read-payload'` (`ModelInvocationAuthorizationInput`).
|
|
43
|
+
`const body = (await ledger.readPayload(in, ctx)).payload` →
|
|
44
|
+
`const res = await ledger.readPayload(in, ctx); if (res.status === 'available') { … }`.
|
|
45
|
+
**Affects:** `stitchkit/agent-runtime` createModelInvocationLedger, ModelInvocationLedger(readPayload, purgePayloads), ModelInvocationConfig(maxPayloadBytes, authorize), ModelInvocationRecordSchema, ModelInvocationRecord, ModelInvocationPayloadReadSchema, ModelInvocationPayloadRead, ModelInvocationAuthorizationInput, InvocationPayloadTooLargeError, createAgentRuntimeStore, createMemoryAgentRuntimeStore, AgentRuntimeStore(purgeExpiredPayloads)
|
|
46
|
+
- `stitchkit/cli` `extractCliGlobalOptions` and `scanCliInvocation` return malformed CLI flag
|
|
47
|
+
errors on an `error?: CliArgumentError` field instead of throwing on call or via a throwing
|
|
48
|
+
`.argv` getter. Dynamic-catalog entrypoints calling `extractCliGlobalOptions` before `createCli`
|
|
49
|
+
had to wrap the helper in `try/catch` and avoid spreading the returned object whenever a user
|
|
50
|
+
passed malformed flags. On error, `extractCliGlobalOptions` returns `argv: []` and
|
|
51
|
+
`scanCliInvocation` returns `command: undefined` and `commandTokens: []` alongside `error`, while
|
|
52
|
+
early notices suppress when `scan.error !== undefined || scan.framework.quiet`. `routeCliArgv`
|
|
53
|
+
preserves its `error?: string` field.
|
|
54
|
+
`try { const p = extractCliGlobalOptions(argv, g); void p.argv } catch (e) { … }` →
|
|
55
|
+
`const p = extractCliGlobalOptions(argv, g); if (p.error) { … }`. → ADR 0327
|
|
56
|
+
**Affects:** `stitchkit/cli` extractCliGlobalOptions, scanCliInvocation, CliGlobalOptionsParse(argv, error), CliInvocationScan(command, commandTokens, error)
|
|
57
|
+
- `stitchkit/declaration` `ProjectIdentitySchema` removes `identity.version` so the root
|
|
58
|
+
`package.json` is the single source of truth for a project's version (supporting both SemVer and
|
|
59
|
+
CalVer without a second copy in `project.json`). Because `ProjectIdentitySchema` is strict, a
|
|
60
|
+
`project.json` carrying `identity.version` is now refused. `starter.version` (the scaffolder
|
|
61
|
+
package version) is unchanged.
|
|
62
|
+
`{ "identity": { "slug": "app", "name": "App", "version": "0.1.0", "description": { "en": "…" } } }` →
|
|
63
|
+
`{ "identity": { "slug": "app", "name": "App", "description": { "en": "…" } } }`.
|
|
64
|
+
**Affects:** `stitchkit/declaration` ProjectIdentitySchema, ProjectIdentity, ProjectDeclarationSchema, ProjectDeclaration, parseProjectDeclaration, findProjectRole
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
|
|
68
|
+
- `stitchkit/agent-executor/claude`, `stitchkit/agent-executor/claude-sdk`, and
|
|
69
|
+
`stitchkit/agent-executor/codex`: turn-input image attachments via optional `resolveFile` and
|
|
70
|
+
`maxImageBytes` (default 5 MiB) on `ClaudeCliDriverConfig`, `ClaudeSdkDriverConfig`, and
|
|
71
|
+
`CodexDriverConfig`, encoding ordered text and base64 image blocks/data URLs and failing closed
|
|
72
|
+
before dispatch on unsupported media types, oversize payloads, or unresolved references.
|
|
73
|
+
- `stitchkit/agent-executor/acp`: `AcpApprovalEnforcement` (`'agent-initiated'`) on
|
|
74
|
+
`AcpDriver.approvalEnforcement` and `AcpSession.approvalEnforcement`, advertising that ACP
|
|
75
|
+
tool approvals are initiated by the agent and answered by the host without fabricating approval
|
|
76
|
+
prompts for unprompted tool calls.
|
|
77
|
+
- `stitchkit/files`: `match?: 'directory' | 'entry'` on `waitForDirectory` (`WaitForDirectoryOptions`),
|
|
78
|
+
allowing callers to wake when any filesystem entry (regular file, broken or cyclic symlink, or
|
|
79
|
+
directory) appears at the target path while still refusing intermediate non-directory components.
|
|
80
|
+
- `stitchkit/service-host`: extended `SystemdServiceUnitConfig` with `startLimitIntervalSec`,
|
|
81
|
+
`successExitStatus`, `timeoutStartSec`, `dynamicUser`, `nice`, `ioSchedulingClass`,
|
|
82
|
+
`privateNetwork`, `privateTmp`, `protectSystem`, `protectHome`, `restrictAddressFamilies`,
|
|
83
|
+
`bindReadOnlyPaths` (`SystemdBindReadOnlyPath`), `runtimeDirectoryMode`, `stateDirectory`, and
|
|
84
|
+
`stateDirectoryMode`, plus `.timer` rendering (`renderSystemdTimerUnit`, `SystemdTimerUnitConfig`,
|
|
85
|
+
`SystemdTimerUnitConfigSchema`) and rollback-guarded `.service` + `.timer` pair inspection and
|
|
86
|
+
installation (per-file atomic writes with rollback: `checkSystemdTimerPair`,
|
|
87
|
+
`installSystemdTimerPair`, `CheckSystemdTimerPairOptions`, `SystemdTimerPairCheckResult`,
|
|
88
|
+
`InstallSystemdTimerPairOptions`, `SystemdTimerPairInstallResult`).
|
|
89
|
+
- `stitchkit/agent-runtime`: `sourceIdentity: 'rekey-spill'` on `BranchAgentConversationInput.applicationKeys`,
|
|
90
|
+
rekeying declared application tool JSON fields that carry source spill references (live or
|
|
91
|
+
legitimately expired) while refusing foreign spills and all other source identities (→ ADR 0328).
|
|
92
|
+
- `stitchkit/agent-runtime`: `ModelInvocationLedger.purgePayloads` and
|
|
93
|
+
`AgentRuntimeStore.purgeExpiredPayloads` (`PurgeInvocationPayloadsInput`,
|
|
94
|
+
`PurgeInvocationPayloadsResult`) to redact expired encrypted invocation payloads in-place across
|
|
95
|
+
memory, SQLite (including `events_fts`), and Postgres (including `event_search`) in bounded pages
|
|
96
|
+
without losing receipt metadata or digests.
|
|
97
|
+
- `stitchkit/agent-runtime` and `stitchkit/tools`: deeply frozen non-executable static catalog
|
|
98
|
+
descriptors (`AgentToolDescriptor`, `AGENT_STATE_TOOL_DESCRIPTORS`,
|
|
99
|
+
`AGENT_SCHEDULE_TOOL_DESCRIPTORS`, `AGENT_CHILD_TOOL_DESCRIPTORS`,
|
|
100
|
+
`AGENT_EVENT_SEARCH_TOOL_DESCRIPTORS`) and widened `listToolNames`, `buildToolManifest`, and
|
|
101
|
+
`describeToolCatalog` to accept `SurfaceRuntimeToolDefinition` (exported from `stitchkit/tools`)
|
|
102
|
+
so hosts can inspect full tool catalogs without an active run.
|
|
103
|
+
- `stitchkit/tools`, `stitchkit/tools/agent`, `stitchkit/tools/mcp`, `stitchkit/tools/invoker`,
|
|
104
|
+
`stitchkit/cli`, and `stitchkit/agent-runtime`: `access: { inspect: true }` on `ToolAccess` for
|
|
105
|
+
read-only surface inspection (catalogs, schemas, `--help`, `--schema`, `commands`) that refuses
|
|
106
|
+
every tool invocation fail-closed with `FORBIDDEN` before extensions, hooks, durability,
|
|
107
|
+
multi-round handlers, or auth run.
|
|
108
|
+
|
|
109
|
+
### Fixed
|
|
110
|
+
|
|
111
|
+
- `stitchkit/agent-executor/claude` and `stitchkit/agent-executor/claude-sdk`: stream Claude Code
|
|
112
|
+
transcripts line-by-line during `findInput` instead of reading the whole file into a 64 MiB string
|
|
113
|
+
buffer, matching only `type === 'user'` records (never mistaking assistant UUIDs for accepted user
|
|
114
|
+
input) and failing closed on corrupt or overlong records while enforcing a 16 MiB per-record memory
|
|
115
|
+
ceiling.
|
|
116
|
+
**Affects:** `stitchkit/agent-executor/claude` createClaudeCliDriver; `stitchkit/agent-executor/claude-sdk` createClaudeSdkDriver
|
|
117
|
+
- `stitchkit/agent-executor/codex`: paginate `thread/turns/list` across all pages (up to 256 pages)
|
|
118
|
+
in `findInput` with cycle/cursor guards instead of stopping after the first page.
|
|
119
|
+
**Affects:** `stitchkit/agent-executor/codex` createCodexDriver
|
|
120
|
+
- `stitchkit/files`: confirm the current named path after `readRegularFile` / `readRegularFileSync`
|
|
121
|
+
accepts an opened descriptor, retrying once when the path was swapped concurrently (including to
|
|
122
|
+
a symlink under `noFollow`) instead of returning bytes from an unlinked or replaced target.
|
|
123
|
+
**Affects:** `stitchkit/files` readRegularFile, readRegularFileSync, readJsonFileSync, readJsonOnce, PolledJsonFile, PolledJsonFiles
|
|
124
|
+
- `stitchkit/server` and `stitchkit/node`: allow `createUnixClientTransport` to pin an explicit
|
|
125
|
+
POSIX owner UID (`expectedOwnerUid`) for cross-UID group-accessible local daemon sockets while
|
|
126
|
+
preserving parent-directory, symlink, and non-group/world-writable checks on both Bun and Node.
|
|
127
|
+
**Affects:** `stitchkit/server` createUnixClientTransport, UnixClientTransportConfig(expectedOwnerUid); `stitchkit/node` createUnixClientTransport, UnixClientTransportConfig(expectedOwnerUid)
|
|
128
|
+
- `stitchkit/agent-runtime`: allow `branchConversation` and `planConversationBranch` to branch
|
|
129
|
+
conversations whose spills legitimately expired via `spill/deleted` (including across
|
|
130
|
+
`throughRunId` cutoffs and multi-hop branches via inert `runtime/branch-observation` records),
|
|
131
|
+
while continuing to refuse corrupt, orphan, or unexplained missing spills with `integrity`
|
|
132
|
+
(→ ADR 0328).
|
|
133
|
+
**Affects:** `stitchkit/agent-runtime` createAgentRuntimeStore, createMemoryAgentRuntimeStore, AgentRuntimeStore(branchConversation, planConversationBranch)
|
|
134
|
+
- `stitchkit/process`: re-check PID liveness in `probeProcessOwner` and `probeProcessOwnerSync`
|
|
135
|
+
when process identity observation becomes unavailable after an initial `'alive'` liveness check,
|
|
136
|
+
reporting `{ liveness: 'gone', identity: 'pid-gone' }` when the process exited in the TOCTOU
|
|
137
|
+
window instead of `unavailable / not-probed`, while keeping live-process observation failures
|
|
138
|
+
(`EPERM`, foreign namespace, unreadable `/proc/self`) as `unavailable` with their original
|
|
139
|
+
`cause`.
|
|
140
|
+
**Affects:** `stitchkit/process` probeProcessOwner
|
|
141
|
+
- Upgrade scanner (`stitchkit upgrade`): backfilled missing producer exports (`listToolNames`,
|
|
142
|
+
`listContractToolNames`, `createRuntimeToolFactory`, `defineAsyncOperation`,
|
|
143
|
+
`RuntimeToolDefinition*`, `createAgentCodingTools`, and 10 other omitted producer functions) in
|
|
144
|
+
the `0.127.0` changelog `**Affects:**` lines and added a checked-in
|
|
145
|
+
`public-surface-producers.json` release gate (`assertAffectsProducersNamed`) that refuses any
|
|
146
|
+
future breaking, `Fixed`, or `Security` `**Affects:**` line naming a type-only export without its
|
|
147
|
+
producer functions.
|
|
148
|
+
|
|
149
|
+
## [0.127.0] - 2026-11-25
|
|
150
|
+
|
|
151
|
+
### ⚠️ Breaking changes
|
|
152
|
+
|
|
153
|
+
**Who must act:** every caller of `branchConversation` that passes `applicationKeys`
|
|
154
|
+
([migration](docs/guide/upgrading.md#branch-application-key-modes)), every host that
|
|
155
|
+
creates a built-in runtime tool, a child manager or a schedule service
|
|
156
|
+
([migration](docs/guide/upgrading.md#runtime-tools-take-the-run)), every caller
|
|
157
|
+
that reads `agentUsageProjection`
|
|
158
|
+
([migration](docs/guide/upgrading.md#agent-usage-projection-v2)), every caller
|
|
159
|
+
of `createSessionCredentials`
|
|
160
|
+
([migration](docs/guide/upgrading.md#session-credentials-refresh-ahead)), and
|
|
161
|
+
every runtime reading `RequestContext.startedAt` or running on Node `< 22.3` /
|
|
162
|
+
Bun `< 1.4` ([migration](docs/guide/upgrading.md#portable-handler-and-runtime-floor)),
|
|
163
|
+
and every caller passing `cost` to `agentChildBudgetStopPolicy` or reading
|
|
164
|
+
`AgentStepFinishedEvent.response` as always present
|
|
165
|
+
([migration](docs/guide/upgrading.md#step-spend-and-child-budget-policy)),
|
|
166
|
+
and CLI/connection callers affected by broken boolean boundaries, pre-call view
|
|
167
|
+
column checks, native view handling, `createCliInvoker` global option errors or
|
|
168
|
+
top-level foreign schema unions
|
|
169
|
+
([migration](docs/guide/upgrading.md#cli-broken-boolean-boundary)),
|
|
170
|
+
every host that mounts discovered MCP or OpenAPI tools whose schemas carry
|
|
171
|
+
non-standard keywords
|
|
172
|
+
([migration](docs/guide/upgrading.md#connections-unknown-schema-keywords)),
|
|
173
|
+
every server and client on a unix socket outside a directory its own user owns
|
|
174
|
+
([migration](docs/guide/upgrading.md#unix-socket-ownership-checks)),
|
|
175
|
+
every reader of `tool-status` events
|
|
176
|
+
([migration](docs/guide/upgrading.md#durable-tool-status)), every SQLite companion
|
|
177
|
+
host caller ([migration](docs/guide/upgrading.md#companions-take-the-host)), every
|
|
178
|
+
custom `AgentRuntimeStore` driver
|
|
179
|
+
([migration](docs/guide/upgrading.md#store-driver-contract-step-2)), every caller of
|
|
180
|
+
`openRouterProvider` passing policy keys in `extraBody`
|
|
181
|
+
([migration](docs/guide/upgrading.md#openrouter-extra-body-policy-keys)),
|
|
182
|
+
and every project affected by the planned `0.127.0` breaking boundary cleanup
|
|
183
|
+
(`access: { gate } | { open }`, `transports` → `expose`, `CliConfig.commandSettings`,
|
|
184
|
+
removal of `appError` and `stitchkit/application/schemas`, sandbox-probe relocation,
|
|
185
|
+
store driver contract step 1, async `listSchedules`, and discovered MCP `structuredContent`
|
|
186
|
+
— [migration](docs/guide/upgrading.md#application-schemas-and-renames)), callers
|
|
187
|
+
switching exhaustively on `NativeCommandError.reason`
|
|
188
|
+
([migration](docs/guide/upgrading.md#native-command-stdin-budget-reason)) or mapping every
|
|
189
|
+
`StitchErrorCode` ([migration](docs/guide/upgrading.md#discovered-mcp-structured-content)) or
|
|
190
|
+
`UnixClientTransportErrorCode` ([migration](docs/guide/upgrading.md#unix-socket-ownership-checks)), every
|
|
191
|
+
caller of `listChildBlocking`, of `respondToChildBlocking` or `sendMessage` on a slow
|
|
192
|
+
child host, or of two `spawnChild` of one id at once
|
|
193
|
+
([migration](docs/guide/upgrading.md#child-blocking-unavailable)), every entry point
|
|
194
|
+
that calls `routeCliArgv` with a default command, parses a pure boolean with
|
|
195
|
+
`parseCliArgs`, branches on the exit code of an unknown command or declares native
|
|
196
|
+
commands `createCli` refuses to `createCliInvoker`
|
|
197
|
+
([migration](docs/guide/upgrading.md#cli-public-projections)), every CLI that declares a
|
|
198
|
+
command named in option syntax or a script that writes a command option before the
|
|
199
|
+
command name ([migration](docs/guide/upgrading.md#cli-option-before-command)), every
|
|
200
|
+
reader of `TelegramOperatorDrop.reason` that switches exhaustively
|
|
201
|
+
([migration](docs/guide/upgrading.md#operator-channel-flood-wait)), every caller that
|
|
202
|
+
catches the refusal of an out-of-range timer option — `reconcileTimeoutMs`, a
|
|
203
|
+
connection `timeoutMs` / `idleTimeoutMs`, a streaming route `heartbeatMs`, an
|
|
204
|
+
observability drain `timeoutMs`, a conformance `watchdogTimeoutMs`, a surface probe
|
|
205
|
+
`timeoutMs`, a realtime request `timeoutMs`, `authorizationTimeoutMs`, an HTTP client,
|
|
206
|
+
endpoint or request `timeout`, `reconnectOnServerDisconnect`, `uploadInChunks`'
|
|
207
|
+
`retryDelayMs`, a `BackoffPolicy`, a cache bridge `freshWindow`, a managed file
|
|
208
|
+
boundary `inspectionTimeoutMs`, a unix client `headersTimeoutMs`, a credit window wait
|
|
209
|
+
`timeoutMs`, an agent session or runtime `close` budget, a Telegram update intake
|
|
210
|
+
`leaseMs` / `sweepEveryMs`, a wait tool `defaultTimeout` or a wait `timeoutSec`, and the
|
|
211
|
+
timer options of `stitchkit/application`, `stitchkit/telegram`, `stitchkit/cli`,
|
|
212
|
+
`stitchkit/agent-runtime`, `stitchkit/tools`, `stitchkit/live`, `stitchkit/geo`, `stitchkit/release`
|
|
213
|
+
and `stitchkit/tracking` listed below — by its class, and every caller passing a fractional,
|
|
214
|
+
negative or `NaN` count, size or age to `createChunkSpool` or `createTelegramOperatorChannel`
|
|
215
|
+
([migration](docs/guide/upgrading.md#timer-options-one-rule)), every script that branches on
|
|
216
|
+
the exit code of a CLI command over a unix socket
|
|
217
|
+
([migration](docs/guide/upgrading.md#cli-unix-delivery-exit-codes)), every caller of
|
|
218
|
+
`createDeferredAgentToolSurface().mount` that passes `extend` or `flattenUnionInput`
|
|
219
|
+
([migration](docs/guide/upgrading.md#deferred-surface-projection)), every runtime whose
|
|
220
|
+
`loop.retry.maxAttempts` is not a positive integer
|
|
221
|
+
([migration](docs/guide/upgrading.md#retry-max-attempts)), and every caller of
|
|
222
|
+
`sanitizeTelegramHtml`, `parseTelegramHtml`, `splitTelegramHtml` or
|
|
223
|
+
`truncateTelegramHtml` that passes links with raw whitespace or a bare `tg:` or
|
|
224
|
+
`mailto:` ([migration](docs/guide/upgrading.md#telegram-html-link-rules)), every caller
|
|
225
|
+
of `splitTelegramHtml` whose markup can hold a custom emoji or a `tg-time` longer than
|
|
226
|
+
its limit ([migration](docs/guide/upgrading.md#telegram-html-split-atom)), every
|
|
227
|
+
`createSpooledSink` whose spool file is past its `maxFileBytes`, that watches `recover()`,
|
|
228
|
+
or whose store can be down for longer than `maxPendingEntries` records
|
|
229
|
+
([migration](docs/guide/upgrading.md#spool-file-over-its-bound)), and every caller that
|
|
230
|
+
branches on the class of a SQLite store's transaction failure or of a failed
|
|
231
|
+
`createSessionCredentials().login()`
|
|
232
|
+
([migration](docs/guide/upgrading.md#double-failure-aggregate-error)).
|
|
233
|
+
|
|
234
|
+
- `stitchkit/agent-runtime` `branchConversation` declares each application key
|
|
235
|
+
once with a mode. An application's record of the past — the run that took an
|
|
236
|
+
input, the IDs a read of its own data returned — names the source conversation,
|
|
237
|
+
and a declared key refused it, so such a conversation could not be branched.
|
|
238
|
+
`sourceIdentity: 'retain'` carries a value naming the source conversation, a run
|
|
239
|
+
or a message byte for byte and never as a reference of the destination; a value
|
|
240
|
+
naming a spill, an application file or another runtime identity still refuses,
|
|
241
|
+
as does any source identity under the default `'refuse'`. A key is one of the
|
|
242
|
+
runtime reference names, declared once, and a refusal names the key's path in
|
|
243
|
+
the payload. `applicationKeys: ['messageId']` →
|
|
244
|
+
`applicationKeys: [{ key: 'messageId' }, { key: 'runId', sourceIdentity: 'retain' }]`.
|
|
245
|
+
→ ADR 0300
|
|
246
|
+
**Affects:** `stitchkit/agent-runtime` BranchAgentConversationInputSchema(applicationKeys), BranchAgentConversationInput(applicationKeys); `stitchkit/agent-runtime` behaviour
|
|
247
|
+
- `stitchkit/agent-runtime` `createAgentChildTools`, `createAgentScheduleTools`,
|
|
248
|
+
`createAgentStateTools` and `createAgentEventSearchTools` take the run context
|
|
249
|
+
`tools()` receives. The child and schedule tools took the conversation to act
|
|
250
|
+
for from the model's input, so a model that knew another conversation's ID could
|
|
251
|
+
spend its child budget, message or interrupt its children and place or cancel
|
|
252
|
+
its schedules; the state and event search tools took it from a free host
|
|
253
|
+
argument that nothing tied to the run. Every tool now acts for the conversation
|
|
254
|
+
of the run that called it, the model's input carries no conversation address, a
|
|
255
|
+
child of another parent is refused, and a run context no runtime issued is
|
|
256
|
+
refused by the factory. The factories' config types are exported
|
|
257
|
+
(`AgentChildToolsConfig`, `AgentScheduleToolsConfig`, `AgentStateToolsConfig`,
|
|
258
|
+
`AgentEventSearchToolsConfig`).
|
|
259
|
+
`createAgentChildTools(manager)` → `tools: (run) => mountAgent([], { access: { gate: run.toolFenceLifecycle }, runtimeTools: createAgentChildTools({ manager, run }) })`;
|
|
260
|
+
the same `{ …, run }` replaces `service`, `{ conversationId, state }` and
|
|
261
|
+
`{ conversationId, search, store }`. → ADR 0300
|
|
262
|
+
**Affects:** `stitchkit/agent-runtime` createAgentChildTools, createAgentScheduleTools, createAgentStateTools, createAgentEventSearchTools
|
|
263
|
+
- `stitchkit/agent-runtime` `createSqliteAgentChildManager` and the schedule
|
|
264
|
+
service require their limits. The model chose how many children to spawn and,
|
|
265
|
+
without `remainingBudget`, what budget each got; a schedule could repeat every
|
|
266
|
+
millisecond, and a conversation could hold any number of them.
|
|
267
|
+
`remainingBudget` and `maxActiveChildren` are required: a child past the
|
|
268
|
+
limit, a budget that names no limit and a spent parent are refused. The
|
|
269
|
+
service takes `maxActivePerConversation` and `minIntervalMs`. Both limits are
|
|
270
|
+
counted in the transaction that records the row, so they hold between
|
|
271
|
+
processes. The tools add no limits of their own. The remainder's shape is
|
|
272
|
+
exported as `AgentChildRemainingBudget`.
|
|
273
|
+
`createSqliteAgentChildManager({ sqlite, spawn })` →
|
|
274
|
+
`createAgentChildManager({ store: sqlite.store, host: sqlite.host, spawn, remainingBudget, maxActiveChildren: 4 })`;
|
|
275
|
+
`createAgentScheduleService({ sqlite, dispatch })` →
|
|
276
|
+
`createAgentScheduleService({ host: sqlite.host, dispatch, maxActivePerConversation: 20, minIntervalMs: 60_000 })`.
|
|
277
|
+
**Affects:** `stitchkit/agent-runtime` createSqliteAgentChildManager, SqliteAgentChildManagerConfig(remainingBudget, maxActiveChildren), createAgentScheduleService
|
|
278
|
+
- `stitchkit/agent-runtime` `createSqliteAgentSpillStore` no longer takes
|
|
279
|
+
`toolCallId`: the store is created once and serves many calls, so a fixed id
|
|
280
|
+
attributed every spill to one call. Each spill records the call whose output it
|
|
281
|
+
holds. `createSqliteAgentSpillStore({ sqlite, conversationId, toolCallId })` →
|
|
282
|
+
`createAgentSpillStore({ host: sqlite.host, conversationId })`.
|
|
283
|
+
**Affects:** `stitchkit/agent-runtime` createSqliteAgentSpillStore(toolCallId)
|
|
284
|
+
- `stitchkit/agent-runtime`, `stitchkit/agent-runtime/sqlite/bun` and `stitchkit/agent-runtime/sqlite/node` the runtime companions run on a store's companion
|
|
285
|
+
host, on SQLite and on Postgres alike, and their reads return promises.
|
|
286
|
+
They took the SQLite handle and wrote through its raw connection, so they ran
|
|
287
|
+
on SQLite only, and a second store could not have them. The SQLite and
|
|
288
|
+
Postgres stores now give `host`, one transaction of the store with the purge
|
|
289
|
+
check and the event append inside it, and every companion is written once
|
|
290
|
+
against it. `createSqliteAgentChildManager`, `createSqliteAgentSpillStore`,
|
|
291
|
+
`createSqliteAgentProjectionStore` and `createSqliteAgentEventSearch` are
|
|
292
|
+
`createAgentChildManager`, `createAgentSpillStore`,
|
|
293
|
+
`createAgentProjectionStore` and `createAgentEventSearch`, and take
|
|
294
|
+
`{ host }` (the child manager and the projection store `{ store, host }`);
|
|
295
|
+
`SqliteAgentChildManagerConfig` is `AgentChildManagerConfig`. The SQLite
|
|
296
|
+
store's `database` and `transaction` are gone: a companion's row goes through
|
|
297
|
+
`host.transaction(conversationId, work)`, a read through `host.read(work)`.
|
|
298
|
+
`manager.listChildren`, `projections.load` / `list`, a spill store's
|
|
299
|
+
`authorization` / `search` and `service.start()` return promises; await them.
|
|
300
|
+
The event search runs on both: FTS5 on SQLite, a `tsvector` index on
|
|
301
|
+
Postgres (see Added). `AgentCompanionHost`, `AgentCompanionScope`, `AgentSqlSession`,
|
|
302
|
+
`AgentSqlTables` and `AgentSqlValue` are exported for a companion of the
|
|
303
|
+
application's own (the surface of `stitchkit/agent-runtime` grows by five). `createSqliteAgentProjectionStore({ sqlite })` →
|
|
304
|
+
`createAgentProjectionStore({ store: sqlite.store, host: sqlite.host })`;
|
|
305
|
+
`createSqliteAgentEventSearch({ database: sqlite.database })` →
|
|
306
|
+
`createAgentEventSearch({ host: sqlite.host })`;
|
|
307
|
+
`manager.listChildren(parent)` → `await manager.listChildren(parent)`. → ADR 0314
|
|
308
|
+
**Affects:** `stitchkit/agent-runtime` createSqliteAgentChildManager, createSqliteAgentSpillStore, createSqliteAgentProjectionStore, createSqliteAgentEventSearch, SqliteAgentChildManagerConfig, AgentChildManager(listChildren), createAgentChildManager(listChildren), AgentScheduleService(start), createAgentScheduleService(start); `stitchkit/agent-runtime/sqlite/bun` SqliteAgentRuntimeStore(database, transaction), createBunSqliteAgentRuntimeStore(database, transaction), createSqliteAgentRuntimeStore(database, transaction), SqliteStoreTransaction; `stitchkit/agent-runtime/sqlite/node` SqliteAgentRuntimeStore(database, transaction), createNodeSqliteAgentRuntimeStore(database, transaction), createSqliteAgentRuntimeStore(database, transaction), SqliteStoreTransaction
|
|
309
|
+
- `stitchkit/agent-runtime` `AgentChildManager.listChildBlocking` returns
|
|
310
|
+
`{ pending, unavailable }` instead of the bare pending list. Each live child is
|
|
311
|
+
asked for its blocking events within the stop bound; a child that did not answer
|
|
312
|
+
in time was read as one with nothing pending, and one whose host threw or
|
|
313
|
+
rejected failed the whole list for every sibling. Such a child is now named in
|
|
314
|
+
`unavailable` (`reason: 'timeout'`, or `'failed'` with the `cause` — a throw, a
|
|
315
|
+
rejection or a malformed report), and the other children are still presented.
|
|
316
|
+
`const pending = await children.listChildBlocking(parentId)` →
|
|
317
|
+
`const { pending, unavailable } = await children.listChildBlocking(parentId)`.
|
|
318
|
+
[migration](docs/guide/upgrading.md#child-blocking-unavailable)
|
|
319
|
+
**Affects:** `stitchkit/agent-runtime` AgentChildManager(listChildBlocking), createAgentChildManager(listChildBlocking), createSqliteAgentChildManager(listChildBlocking)
|
|
320
|
+
- `stitchkit/agent-runtime` `createAgentChildManager` gives a child's host 10 s — the
|
|
321
|
+
bound a stop already had — to answer a blocking response or a message:
|
|
322
|
+
`respondToChildBlocking` and `sendMessage` reject when it does not, where they waited
|
|
323
|
+
without end. An unanswered response leaves its request pending to answer again; an
|
|
324
|
+
unanswered message records no `message-sent` event. The bound is fixed, and it ends
|
|
325
|
+
the wait, not the host's work: while an answer or a message that outlived it is still
|
|
326
|
+
with the host, a second answer to that request is refused (`TypeError`) instead of
|
|
327
|
+
being delivered twice, and another message to that child is refused while any
|
|
328
|
+
message that outlived the bound is still with its host — counted one by one, so the
|
|
329
|
+
first of two to land does not lift the guard for the second; one the host takes late
|
|
330
|
+
retires the request, or is journaled as `message-sent`, when it lands. A second
|
|
331
|
+
`spawnChild` of a child id still being spawned is refused with a `TypeError` before
|
|
332
|
+
its host is asked to start it, where both reached the host.
|
|
333
|
+
`await children.sendMessage(parentId, childId, text)` →
|
|
334
|
+
`await children.sendMessage(parentId, childId, text).catch(reportUnreachableChild)`.
|
|
335
|
+
[migration](docs/guide/upgrading.md#child-blocking-unavailable)
|
|
336
|
+
**Affects:** `stitchkit/agent-runtime` AgentChildManager(respondToChildBlocking, sendMessage, spawnChild), createAgentChildManager(behaviour)
|
|
337
|
+
- `stitchkit/agent-runtime` a record id containing NUL (`\0`) is refused by the
|
|
338
|
+
schema. Postgres cannot store it in `text`, so an id the SQLite and memory
|
|
339
|
+
stores accepted failed only on the way into Postgres, in the middle of moving
|
|
340
|
+
an archive. Every store now refuses it alike. `{ conversationId: 'a\0b' }`
|
|
341
|
+
→ a different id.
|
|
342
|
+
**Affects:** `stitchkit/agent-runtime` AgentRecordIdSchema, AgentStoreEventEnvelopeSchema, AppendAgentStoreEventSchema
|
|
343
|
+
- `stitchkit/agent-runtime` `agentUsageProjection` (bumped to `version: 2`) folds
|
|
344
|
+
canonical `AgentUsage` records from terminal `runtime/transition` events,
|
|
345
|
+
abandoned `recover` events with checkpointed spend and standalone
|
|
346
|
+
`provider/response` receipts instead of non-existent top-level numeric fields
|
|
347
|
+
that always summed to zero. Its projected state changes from
|
|
348
|
+
`{ inputTokens, outputTokens, cost, sources }` to `{ records, usage }`
|
|
349
|
+
(`AgentUsage` with per-field `provenance`), so unreported tokens and prices stay
|
|
350
|
+
`unavailable` instead of collapsing into zero; persisted `version: 1` rows
|
|
351
|
+
re-fold from sequence 1 on the next `advance()`. A run that did not complete,
|
|
352
|
+
measured nothing and holds no part of a provider answer (a refused connection,
|
|
353
|
+
an oversized context, a cancel before the request) is not a record: it leaves
|
|
354
|
+
the cost of the paid runs around it known.
|
|
355
|
+
`projected.value.inputTokens` / `projected.value.cost` →
|
|
356
|
+
`projected.value.usage.inputTokens.value` / `projected.value.usage.cost?.value`
|
|
357
|
+
(checking `provenance`).
|
|
358
|
+
**Affects:** `stitchkit/agent-runtime` agentUsageProjection
|
|
359
|
+
- `stitchkit` `SessionCredentialsConfig.storage` requires
|
|
360
|
+
`read(): Promise<{ session; credentials } | null>` so `restore()` can
|
|
361
|
+
distinguish an unreadable keychain from an absent session without clearing
|
|
362
|
+
storage or scope.
|
|
363
|
+
`storage: { write, clear }` → `storage: { read, write, clear }`. → ADR 0306
|
|
364
|
+
**Affects:** `stitchkit` createSessionCredentials(storage.read), SessionCredentialsConfig(storage.read)
|
|
365
|
+
- `stitchkit` `createSessionCredentials().refresh()` resolves with the newly
|
|
366
|
+
rotated credentials when post-rotation `storage.write()` fails or times out,
|
|
367
|
+
emits `'storage-failed'` through `onEvent`, retries persistence every
|
|
368
|
+
`storageRetryMs` and refuses to rotate again until flushed; `login()` still
|
|
369
|
+
rejects on storage errors.
|
|
370
|
+
`await expect(auth.refresh(op)).rejects.toThrow('storageTimeoutMs')` →
|
|
371
|
+
`const next = await auth.refresh(op)` and observe `onEvent` (`'storage-failed'`).
|
|
372
|
+
→ ADR 0306
|
|
373
|
+
**Affects:** `stitchkit` createSessionCredentials(behaviour), SessionCredentials(refresh)
|
|
374
|
+
- `stitchkit/observability` `RequestContext.startedAt` changes from `bigint`
|
|
375
|
+
(`process.hrtime.bigint()` nanoseconds) to `number` (`performance.now()`
|
|
376
|
+
milliseconds) so the handler pipeline uses one monotonic clock across Node,
|
|
377
|
+
Bun, browsers and React Native / Hermes without `process.hrtime`.
|
|
378
|
+
`Number(process.hrtime.bigint() - ctx.startedAt) / 1e6` →
|
|
379
|
+
`performance.now() - ctx.startedAt`. → ADR 0307
|
|
380
|
+
**Affects:** `stitchkit/observability` RequestContext(startedAt), getRequestContext(startedAt); `stitchkit/server` behaviour; `stitchkit/node` behaviour
|
|
381
|
+
- `stitchkit` Minimum supported runtimes rise from `node >=22` / `bun >=1.2.0`
|
|
382
|
+
to `node >=22.3.0` / `bun >=1.4.0` because `RequestContext` loads
|
|
383
|
+
`AsyncLocalStorage` lazily through `process.getBuiltinModule('async_hooks')`
|
|
384
|
+
instead of statically importing `node:async_hooks`. → ADR 0307
|
|
385
|
+
**Affects:** `stitchkit` behaviour; `stitchkit/observability` behaviour; `stitchkit/server` behaviour; `stitchkit/node` behaviour
|
|
386
|
+
- `stitchkit/agent-runtime` `agentChildBudgetStopPolicy` no longer takes a `cost`
|
|
387
|
+
callback and `AgentStepFinishedEventSchema.response` is now optional. The child
|
|
388
|
+
budget stop policy reads provider-normalized usage (including USD cost from
|
|
389
|
+
adapters such as `openRouterProvider`) through `selectedModel` on
|
|
390
|
+
`AgentRuntimeRunContext`, using the same normalization path as `onStepSpend`,
|
|
391
|
+
while compaction spend emits `step-finished` events without a provider response
|
|
392
|
+
envelope. Every `step-finished` event carries `phase` and `attempt`; a
|
|
393
|
+
`step` or `abandoned-attempt` always names its `modelId`, `provider` and
|
|
394
|
+
`response`, a `compaction` names none of them and carries the number of the
|
|
395
|
+
step it prepared, so model steps are counted by `phase === 'step'`.
|
|
396
|
+
`AgentStepSpendSchema` is the same split as a union on `phase`.
|
|
397
|
+
`agentChildBudgetStopPolicy({ manager, childConversationId, cost })` →
|
|
398
|
+
`agentChildBudgetStopPolicy({ manager, childConversationId })`.
|
|
399
|
+
**Affects:** `stitchkit/agent-runtime` agentChildBudgetStopPolicy(cost), AgentStepFinishedEventSchema(response), AgentStepFinishedEvent(response)
|
|
400
|
+
- `stitchkit/cli` a bare boolean framework flag separated from a trailing `true`
|
|
401
|
+
or `false` token by a stripped command name or application option (e.g.
|
|
402
|
+
`--dry-run inspect false`, `inspect --dry-run --profile demo false`, or before the
|
|
403
|
+
command `--quiet --profile demo true inspect`, which exited `1` with
|
|
404
|
+
`Unknown command "true"`) now
|
|
405
|
+
fails with `CliArgumentError` (exit code 2, zero handler calls) and a hint to
|
|
406
|
+
write `--flag=false` or `-- false`, replacing silent boundary rewriting. A bare
|
|
407
|
+
`--help` or `--schema` parted that way asks for nothing, so the line is refused
|
|
408
|
+
instead of answered: `myapp --schema --profile demo false` exits `2` (it exited
|
|
409
|
+
`1` with `Unknown command "false"`).
|
|
410
|
+
Adjacent `--flag false` remains a boolean value. The projections refuse the
|
|
411
|
+
argv they can no longer write: `routeCliArgv` returns the refusal in `error`
|
|
412
|
+
with an empty `commandArgv`, and `extractCliGlobalOptions` still returns
|
|
413
|
+
`globals` but throws `CliArgumentError` when `argv` is read after a lifted
|
|
414
|
+
global stood between a bare framework boolean and `true` or `false`
|
|
415
|
+
(non-framework option boundaries return in `separatedBefore`). A line that
|
|
416
|
+
starts with `--` names no command: `routeCliArgv` reports `A command is
|
|
417
|
+
required before "--"` instead of `command: "--"`. → ADR 0310
|
|
418
|
+
**Affects:** `stitchkit/cli` parseCliArgs, extractCliGlobalOptions, routeCliArgv, scanCliInvocation; `stitchkit/cli` behaviour
|
|
419
|
+
- `stitchkit/cli` view column flags (`--table`, `--sort`, `--sum`, `--count-by`,
|
|
420
|
+
`--top --by`) are now validated against the output schema before calling the
|
|
421
|
+
handler whenever the schema defines an unambiguous object collection, so an
|
|
422
|
+
unknown column fails with exit code 2 and zero handler calls — including when
|
|
423
|
+
the handler would return an empty collection (previously exit code 0). Open or
|
|
424
|
+
ambiguous output schemas retain post-call validation. → ADR 0310
|
|
425
|
+
**Affects:** `stitchkit/cli` behaviour
|
|
426
|
+
- `stitchkit/cli` native commands now honour view flags (`--table`, `--sort`,
|
|
427
|
+
`--sum`, `--count-by`, `--top`) when they declare an `output` schema and fail
|
|
428
|
+
with exit code 2 (zero handler calls) when view flags are passed to a native
|
|
429
|
+
command without `output`, instead of silently ignoring those flags. → ADR 0310
|
|
430
|
+
**Affects:** `stitchkit/cli` defineCliCommand; `stitchkit/cli` behaviour
|
|
431
|
+
- `stitchkit/cli` `createCliInvoker` now parses global option values through the
|
|
432
|
+
same schema-aware coercer as `createCli` (accepting JSON strings for
|
|
433
|
+
structured globals) and throws `CliArgumentError` on invalid globals instead of
|
|
434
|
+
raw `ZodError`. → ADR 0310
|
|
435
|
+
**Affects:** `stitchkit/cli` createCliInvoker
|
|
436
|
+
- `stitchkit/cli` the public projections read a line with the grammar `createCli` reads it with, so an
|
|
437
|
+
entry point that lifts, routes and parses argv itself (`extractCliGlobalOptions` → `routeCliArgv` →
|
|
438
|
+
`parseCliArgs` → `createCliInvoker`) reaches the same refusal, arguments, exit code and handler calls.
|
|
439
|
+
`routeCliArgv(argv, defaultCommand)` → `routeCliArgv(argv, { defaultCommand, separatedBefore })`: it
|
|
440
|
+
takes the `separatedBefore` that `extractCliGlobalOptions` returned and returns `separatedBefore`
|
|
441
|
+
indexed by `commandArgv`, so `inspect --verbose --profile demo false` parses as
|
|
442
|
+
`{ verbose: true, text: 'false' }` on both paths (it was `{ verbose: false }` through the chain), and a
|
|
443
|
+
separated value option no longer takes the token after the boundary. `extractCliGlobalOptions` keeps a
|
|
444
|
+
`--` that stands before the command in `argv` (it was dropped, so the route ran the command `createCli`
|
|
445
|
+
refuses), and a line answered by help, `--version` or `--schema` reports no application global's error
|
|
446
|
+
(`--profile --help` shows help instead of throwing). `routeCliArgv` returns `error` for a line that
|
|
447
|
+
fails before a command is named (`--json=maybe`). It also returns `error` for every other line
|
|
448
|
+
`createCli` refuses before a command runs, a repeated or malformed framework option on either side of
|
|
449
|
+
the command included (`nosuch --json --json` is that refusal, exit `2`, not an unknown command), unless
|
|
450
|
+
help, `--version` or `--schema` answers the line (`--verbose --schema` lists the commands, as
|
|
451
|
+
`createCli` does). A line help or `--schema` answers is routed even when removing the
|
|
452
|
+
command parts a bare framework boolean from `true` or `false` (`--json inspect true --help`):
|
|
453
|
+
the word is kept apart in `separatedBefore`, so `parseCliArgs` reads `--json` as written and
|
|
454
|
+
answers help, as 0.126 and `createCli` do. `parseCliArgs` refuses a pure boolean written inline
|
|
455
|
+
with a word that is not a boolean (`--verbose=maybe`) with `CliArgumentError`, as `createCli` does,
|
|
456
|
+
instead of leaving the string for Zod; a line that asks for help or `--schema` is still answered, before
|
|
457
|
+
any argument it cannot read (`parseCliArgs(['--verbose=maybe', '--help'], schema).options.help` is
|
|
458
|
+
`true`, with empty `toolArgs`, as it was `true` in 0.126; `-x --help` and `--count abc --help` answer
|
|
459
|
+
help too, where 0.126 threw), and a bare framework boolean that `separatedBefore` parts from
|
|
460
|
+
`true`/`false` is refused instead of read as either. `ParsedCliArgs.options` carries `schema`
|
|
461
|
+
(`--schema`). `createCli` exits `4` (`UNKNOWN_OPERATION`, overridable through `exitCodes`) for an
|
|
462
|
+
unknown command, the code `createCliInvoker` already returned; it exited `1`.
|
|
463
|
+
`routeCliArgv(argv, 'help')` → `routeCliArgv(argv, { defaultCommand: 'help' })`. → ADR 0310
|
|
464
|
+
[migration](docs/guide/upgrading.md#cli-public-projections)
|
|
465
|
+
**Affects:** `stitchkit/cli` routeCliArgv(defaultCommand), CliArgvRoute(separatedBefore), CliRouteOptions, parseCliArgs, CliRunOptions(schema), ParsedCliArgs(options), extractCliGlobalOptions, createCli; `stitchkit/cli` behaviour
|
|
466
|
+
- `stitchkit/cli` `createCliInvoker` checks its native commands as `createCli` does, when it is
|
|
467
|
+
created: a command name declared twice or shared with a managed command, `commandSettings` aliases or
|
|
468
|
+
positionals that name a field the command does not have, and an alias of its passthrough field throw
|
|
469
|
+
instead of being accepted, the later declaration silently replacing the earlier one.
|
|
470
|
+
`invoker.commands` no longer lists a managed command that cannot run (one with an `unavailableReason`).
|
|
471
|
+
`createCliInvoker({ commands: [inspect, inspect] })` → one `inspect`. → ADR 0310
|
|
472
|
+
[migration](docs/guide/upgrading.md#cli-public-projections)
|
|
473
|
+
**Affects:** `stitchkit/cli` createCliInvoker, CliInvoker(commands)
|
|
474
|
+
- `stitchkit/cli` on a CLI without a default command, a command option written where
|
|
475
|
+
the command name belongs (`myapp --verbose inspect`, `myapp --verbose=maybe inspect`)
|
|
476
|
+
is a usage error, exit `2`: "`--verbose is an option of a command, not a command: put
|
|
477
|
+
it after the command name (<command> --verbose)`". It exited `4` with
|
|
478
|
+
`Unknown command "--verbose"`. `createCli` and `routeCliArgv` (as `error`, no
|
|
479
|
+
`command`) answer it alike; help and `--version` still answer such a line, and
|
|
480
|
+
framework options before the command (`myapp --json inspect`) are unchanged. A
|
|
481
|
+
command name in option syntax (`--custom`, `-x`) is now reserved and refused when
|
|
482
|
+
declared: no projection can tell it from an option.
|
|
483
|
+
`myapp --verbose inspect` → `myapp inspect --verbose`. → ADR 0310
|
|
484
|
+
[migration](docs/guide/upgrading.md#cli-option-before-command)
|
|
485
|
+
**Affects:** `stitchkit/cli` createCli, createCliInvoker, routeCliArgv; `stitchkit/cli` behaviour
|
|
486
|
+
- `stitchkit/server` and `stitchkit/node` `createServer({ unix })` and
|
|
487
|
+
`createUnixClientTransport` now reject socket paths exceeding **103 UTF-8
|
|
488
|
+
bytes** (cross-OS `sun_path` limit) and verify parent directory ownership and
|
|
489
|
+
permissions (real directory, not symlink, owner uid, `(mode & 0o022) === 0`);
|
|
490
|
+
`createUnixClientTransport` also verifies the target socket's owner before
|
|
491
|
+
connecting and throws non-retryable `UNIX_TARGET_REFUSED` (`delivery:
|
|
492
|
+
'not-dispatched'`) on refusal. A socket in a shared directory such as `/tmp`,
|
|
493
|
+
a socket owned by another user and a system daemon's socket under a
|
|
494
|
+
root-owned directory are refused for every caller that is not that owner;
|
|
495
|
+
there is no option that turns the check off.
|
|
496
|
+
Before: `createServer({ unix: '/tmp/app.sock' })`. After:
|
|
497
|
+
`createServer({ unix: join(runtimeDir, 'app.sock') })`, where `runtimeDir` is a
|
|
498
|
+
directory the same user owns with mode `0700`. → ADR 0318
|
|
499
|
+
An exhaustive switch on `UnixClientTransportErrorCode` adds `'UNIX_TARGET_REFUSED'`.
|
|
500
|
+
**Affects:** `stitchkit/server` createServer, createUnixClientTransport, UnixClientTransportErrorCode; `stitchkit/node` createUnixClientTransport, UnixClientTransportErrorCode
|
|
501
|
+
- `stitchkit/tools/connections` a discovered MCP or OpenAPI tool whose input or
|
|
502
|
+
output schema carries a keyword outside JSON Schema draft-07, draft 2020-12
|
|
503
|
+
and the OpenAPI 3.0 Schema Object is no longer mounted: it is reported through
|
|
504
|
+
`onSkippedTool` with the keyword's name. Vendor annotations such as `enumNames`,
|
|
505
|
+
`markdownDescription` and `propertyOrdering` are such keywords, and so are the
|
|
506
|
+
refused `$anchor`, `$dynamicRef` and `$dynamicAnchor`; `x-*` extensions pass.
|
|
507
|
+
A tool that mounted and accepted any value under those keywords is now absent
|
|
508
|
+
until its schema is written in standard keywords. → ADR 0310
|
|
509
|
+
**Affects:** `stitchkit/tools/connections` behaviour
|
|
510
|
+
- `stitchkit/tools/connections` top-level `oneOf`/`anyOf` object schemas in
|
|
511
|
+
discovered MCP and OpenAPI tools now merge their object branches (with any root
|
|
512
|
+
`properties`/`required`, preserving `$schema`) instead of collapsing into an
|
|
513
|
+
unvalidated `z.looseObject({})`, while non-object branches fail closed into
|
|
514
|
+
`onSkippedTool`. A root object schema that carries `allOf`, `minProperties`,
|
|
515
|
+
`maxProperties`, `propertyNames`, `patternProperties`, or `oneOf`/`anyOf` beside
|
|
516
|
+
other keywords keeps its properties, its required fields and those constraints the
|
|
517
|
+
same way, and a root that cannot be read as one object is refused instead of
|
|
518
|
+
accepted. The constraints are checked locally, on every mount, before the call
|
|
519
|
+
reaches the server: an argument that breaks one is refused here, where it was sent.
|
|
520
|
+
[migration](docs/guide/upgrading.md#connections-top-level-union) → ADR 0310
|
|
521
|
+
**Affects:** `stitchkit/tools/connections` behaviour
|
|
522
|
+
- `stitchkit/application` and `stitchkit/application/schemas` removed the redundant
|
|
523
|
+
`stitchkit/application/schemas` entrypoint (all canonical schemas are already
|
|
524
|
+
browser-clean on `stitchkit/application`), renamed `notificationOutboxStateSchema`
|
|
525
|
+
to `createNotificationOutboxStateSchema`, and tightened
|
|
526
|
+
`public-surface-budget.test.ts` to refuse limits or overlaps naming nonexistent
|
|
527
|
+
entrypoints. → ADR 0311
|
|
528
|
+
**Affects:** `stitchkit/application` createNotificationOutboxStateSchema, notificationOutboxStateSchema; `stitchkit/application/schemas` *
|
|
529
|
+
- `stitchkit/telegram` renamed `postgresTelegramUpdateStoreSchema` to
|
|
530
|
+
`postgresTelegramUpdateStoreDdl`. → ADR 0311
|
|
531
|
+
**Affects:** `stitchkit/telegram` postgresTelegramUpdateStoreSchema, postgresTelegramUpdateStoreDdl
|
|
532
|
+
- `stitchkit/telegram/html` decides which `href` stays a link by fixed rules,
|
|
533
|
+
the same in every runtime, instead of the runtime's `URL`: 0.126 called
|
|
534
|
+
`URL.canParse`, which React Native does not have, and React Native's `URL`
|
|
535
|
+
accepts what a WHATWG parser refuses, so one input gave two outputs. An `href`
|
|
536
|
+
is kept when it is trimmed of whitespace and holds no whitespace or control
|
|
537
|
+
character anywhere, its scheme is `http:`, `https:`, `tg:` or `mailto:`, an
|
|
538
|
+
`http:`/`https:` link names a host (a bracketed IPv6 address or a name without
|
|
539
|
+
the characters a host forbids; optional user info; a port up to 65535), and a
|
|
540
|
+
`tg:`/`mailto:` link has something after its scheme. Newly refused, so the
|
|
541
|
+
words stay and the tag goes: an `href` with a raw space or tab inside
|
|
542
|
+
(`https://x.test/a b`, previously percent-encoded or stripped by `URL`), and a
|
|
543
|
+
bare `tg:` or `mailto:`. Newly kept: a dotted host that `URL` refused as an
|
|
544
|
+
invalid IPv4 address (`https://1.2.3.999`), an `xn--` label `URL` could not
|
|
545
|
+
decode, a host with U+FFFD. Encode a space as `%20` before it reaches the
|
|
546
|
+
parser: `<a href="https://x.test/a b">` → `<a href="https://x.test/a%20b">`.
|
|
547
|
+
[migration](docs/guide/upgrading.md#telegram-html-link-rules)
|
|
548
|
+
**Affects:** `stitchkit/telegram/html` parseTelegramHtml(href), sanitizeTelegramHtml(href), splitTelegramHtml(href), truncateTelegramHtml(href)
|
|
549
|
+
- `stitchkit/telegram/html` `splitTelegramHtml` refuses a custom emoji or a
|
|
550
|
+
`tg-time` longer than the limit, which cannot be cut, with a `RangeError`. It
|
|
551
|
+
returned that atom as a part over the limit, followed by an empty part, and
|
|
552
|
+
Telegram refuses both. A custom emoji or a time whose text begins with a space or
|
|
553
|
+
a line break is no longer dropped with the break a cut is made at, leaving an
|
|
554
|
+
empty part: the cut goes before it, and a part whose visible text is blank but
|
|
555
|
+
holds one is sent (`'abcd<tg-emoji emoji-id="1"> xy</tg-emoji> efgh'` at limit 5
|
|
556
|
+
gave `['abcd', '', 'efgh']`, now `['abcd', '<tg-emoji emoji-id="1"> xy</tg-emoji>', 'efgh']`).
|
|
557
|
+
`truncateTelegramHtml` already cut before an atom and is unchanged. `splitTelegramHtml('ab <tg-emoji emoji-id="1">abcdefghij</tg-emoji> cd', { limit: 5 })`:
|
|
558
|
+
`['ab', '<tg-emoji emoji-id="1">abcdefghij</tg-emoji>', '', 'cd']` → `RangeError`;
|
|
559
|
+
pass a limit the longest atom fits in.
|
|
560
|
+
[migration](docs/guide/upgrading.md#telegram-html-split-atom)
|
|
561
|
+
**Affects:** `stitchkit/telegram/html` splitTelegramHtml(limit)
|
|
562
|
+
- `stitchkit/observability` `createSpooledSink` keeps a spool file within
|
|
563
|
+
`maxFileBytes` (default 64 MiB) instead of reading it whole. `recover()` and
|
|
564
|
+
compaction read it line by line, holding at most `maxFileBytes` and
|
|
565
|
+
`maxPendingEntries` of it. A debt that does not fit the bound — a file a long
|
|
566
|
+
outage left under 0.126, or one whose bound was lowered — is moved to
|
|
567
|
+
`<path>.<milliseconds>.overflow`, named by the new `SpoolRecovery.quarantined` and
|
|
568
|
+
reported as `SPOOL_QUARANTINED`; the spool goes on with an empty file, so new
|
|
569
|
+
records are spooled instead of refused behind an old debt. Records of a file too
|
|
570
|
+
large to read within the bound are not offered to the store: the quarantined file
|
|
571
|
+
is owed work, replayed by a spool at its path with a bound it fits. A file over its
|
|
572
|
+
bound is compacted once per process even with nothing delivered. A spool file that
|
|
573
|
+
cannot be read (anything but missing) is no longer answered
|
|
574
|
+
`{ replayed: 0, failed: 0 }`: `recover()` sets `unread: true`, reports
|
|
575
|
+
`SPOOL_UNREADABLE` with the read error as `cause`, and leaves the file as it is. A
|
|
576
|
+
record past `maxPendingEntries` (default 10 000) or `maxFileBytes` is no longer
|
|
577
|
+
spooled — 0.126 spooled every record while the store was down. It is still offered
|
|
578
|
+
to the store; when the store refuses it too it is kept nowhere, and `write` rejects
|
|
579
|
+
with code `SPOOL_UNSPOOLED` and the store's error as `cause`, where a row on disk
|
|
580
|
+
rejects with the store's own error. `onSpoolError` reports `SPOOL_FULL` with the
|
|
581
|
+
bound (`entries` or `bytes`).
|
|
582
|
+
`const { failed } = await sink.recover()` →
|
|
583
|
+
`const { failed, quarantined, unread } = await sink.recover()`.
|
|
584
|
+
[migration](docs/guide/upgrading.md#spool-file-over-its-bound). → ADR 0323
|
|
585
|
+
**Affects:** `stitchkit/observability` createSpooledSink(behaviour), SpooledSink(write), SpoolRecovery(quarantined, unread)
|
|
586
|
+
- `stitchkit` `stitchkit/agent-runtime/sqlite/bun` `stitchkit/agent-runtime/sqlite/node`
|
|
587
|
+
two failures of one operation reject with one `AggregateError` — the first failure
|
|
588
|
+
first in `errors` and as its `cause`, then the second — instead of one of them
|
|
589
|
+
alone. A SQLite store transaction or schema initialization whose `ROLLBACK` fails
|
|
590
|
+
for a reason other than "no transaction is active" threw the rollback's error and
|
|
591
|
+
lost the failure that ended the transaction; the connection could be left inside
|
|
592
|
+
the transaction, and the next `BEGIN` failed for a reason nobody saw.
|
|
593
|
+
`createSessionCredentials().login()` whose storage write fails and whose clear of
|
|
594
|
+
the stored session it replaced fails too rejects with the `AggregateError`, where
|
|
595
|
+
it rejected with the write failure. Code that branches on the class of such a
|
|
596
|
+
rejection reads the first failure from `cause`.
|
|
597
|
+
`catch (error) { if (error instanceof X) … }`
|
|
598
|
+
→ `catch (error) { const first = error instanceof AggregateError ? error.cause : error; if (first instanceof X) … }`.
|
|
599
|
+
[migration](docs/guide/upgrading.md#double-failure-aggregate-error). → ADR 0326
|
|
600
|
+
**Affects:** `stitchkit` SessionCredentials(login), createSessionCredentials(login); `stitchkit/agent-runtime/sqlite/bun` behaviour; `stitchkit/agent-runtime/sqlite/node` behaviour
|
|
601
|
+
- `stitchkit/telegram` the operator channel waits Telegram's `retry_after` only up to
|
|
602
|
+
`maxRetryAfterMs` (new option, default 60 000 ms — the minute over which Telegram
|
|
603
|
+
counts a group's messages). A longer flood wait would hold every queued message
|
|
604
|
+
behind one, so that message is dropped with the new reason `flood-wait` (with its
|
|
605
|
+
classified failure) and the next one is tried at the usual pace. It waited as long
|
|
606
|
+
as Telegram asked. A `switch` over `TelegramOperatorDrop['reason']` gains a case:
|
|
607
|
+
`case 'over-budget':` → `case 'over-budget': case 'flood-wait':`.
|
|
608
|
+
[migration](docs/guide/upgrading.md#operator-channel-flood-wait)
|
|
609
|
+
**Affects:** `stitchkit/telegram` TelegramOperatorDrop(reason), TelegramOperatorChannelConfig(maxRetryAfterMs), createTelegramOperatorChannel; `stitchkit/telegram` behaviour
|
|
610
|
+
- `stitchkit/agent-runtime` relocated the seven process-sandbox probe exports
|
|
611
|
+
(`AgentSandboxGradeSchema`, `AgentSandboxGrade`, `AgentSandboxRestrictionSchema`,
|
|
612
|
+
`AgentSandboxRestriction`, `probeAgentProcessSandbox`,
|
|
613
|
+
`missingSandboxRestrictions`, `recordAgentSandboxProbe`) to
|
|
614
|
+
`stitchkit/agent-runtime/sandbox`. → ADR 0311
|
|
615
|
+
**Affects:** `stitchkit/agent-runtime` probeAgentProcessSandbox, recordAgentSandboxProbe, missingSandboxRestrictions, AgentSandboxGradeSchema, AgentSandboxGrade, AgentSandboxRestrictionSchema, AgentSandboxRestriction
|
|
616
|
+
- `stitchkit`, `stitchkit/contract`, `stitchkit/server` and `stitchkit/node` removed
|
|
617
|
+
`appError`; `new AppError(code, options?)` now derives its default HTTP status from
|
|
618
|
+
`STITCH_ERROR_STATUS[code]` (falling back to `500` when unknown, with explicit
|
|
619
|
+
`status` winning). → ADR 0311
|
|
620
|
+
**Affects:** `stitchkit` AppError, appError; `stitchkit/contract` AppError, appError; `stitchkit/server` AppError, appError; `stitchkit/node` AppError, appError
|
|
621
|
+
- `stitchkit/agent-runtime` and `stitchkit/agent-runtime/testing` store driver
|
|
622
|
+
contract step 1 makes `history.hasMessage` and `events.find` required (removing
|
|
623
|
+
fallback scans) and `AgentScheduleService.listSchedules` async
|
|
624
|
+
(`Promise<readonly AgentSchedule[]>`); `AgentStoreConformanceConfig` now requires
|
|
625
|
+
explicit `capabilities: { branch, planBranch }` and
|
|
626
|
+
`commitConflict: { arm() } | { impossible: 'single-writer' }`. → ADR 0311
|
|
627
|
+
**Affects:** `stitchkit/agent-runtime` AgentScheduleService(listSchedules), createAgentScheduleService(listSchedules), AgentRuntimeStoreDriver; `stitchkit/agent-runtime/testing` runAgentStoreConformance, AgentStoreConformanceConfig
|
|
628
|
+
- `stitchkit/agent-runtime` and `stitchkit/agent-runtime/testing` store driver
|
|
629
|
+
contract step 2: a store built by `createAgentRuntimeStore` reports
|
|
630
|
+
`store.capabilities` (`{ archive, historyRestore, purge }`, frozen) for its
|
|
631
|
+
driver's optional members, and an operation that needs a missing one is refused
|
|
632
|
+
with `AgentStoreUnsupportedCapabilityError` (a `TypeError` with `.capability`
|
|
633
|
+
`'archive' | 'historyRestore'`) before it writes. Before, `importConversation`
|
|
634
|
+
without `driver.archive` dropped an archive's spills and companion projections,
|
|
635
|
+
and without `driver.history.restore` it turned compacted baseline rows back into
|
|
636
|
+
active history; `planConversationBranch` answered `ready` for a branch that would
|
|
637
|
+
then fail. A half-implemented `driver.archive` is refused when the store is
|
|
638
|
+
built. The memory store keeps companion projections through import and export.
|
|
639
|
+
`stitchkit/agent-runtime/testing` `capabilities` now also declares `archive` and
|
|
640
|
+
`historyRestore`, compared with `store.capabilities` and proven by behaviour:
|
|
641
|
+
`// before: capabilities: { branch: true, planBranch: true }` →
|
|
642
|
+
`// after: capabilities: { branch: true, planBranch: true, archive: true, historyRestore: true }`.
|
|
643
|
+
→ ADR 0311
|
|
644
|
+
**Affects:** `stitchkit/agent-runtime` AgentRuntimeStore(importConversation), AgentRuntimeStore(branchConversation), AgentRuntimeStore(planConversationBranch), createAgentRuntimeStore; `stitchkit/agent-runtime` behaviour; `stitchkit/agent-runtime/testing` runAgentStoreConformance, AgentStoreConformanceConfig
|
|
645
|
+
- `stitchkit/agent-runtime` and `stitchkit/agent-runtime/browser` `tool-status` events
|
|
646
|
+
are durable: each is published right after the checkpoint that holds its call (or
|
|
647
|
+
its result) and carries `eventId` and `snapshotVersion` instead of `runtimeEpoch`
|
|
648
|
+
and `sequence`, so a reader that reconnects finds the call (or its result) in the
|
|
649
|
+
snapshot and the cursor drops a repeat. `// before: { type: 'tool-status', runtimeEpoch, sequence, … }` →
|
|
650
|
+
`// after: { type: 'tool-status', eventId, snapshotVersion, … }`.
|
|
651
|
+
**Affects:** `stitchkit/agent-runtime` AgentToolStatusEventSchema, AgentRuntimeEvent; `stitchkit/agent-runtime/browser` AgentToolStatusEventSchema, AgentRuntimeEvent
|
|
652
|
+
- `stitchkit/tools`, `stitchkit/tools/connections` and `stitchkit/agent-runtime/coding-tools`
|
|
653
|
+
renamed `transports` to `expose` on runtime tool definitions, managed native tool
|
|
654
|
+
factories, async-operation capability maps, `ToolNameEntry.expose`, coding tool
|
|
655
|
+
definitions, and MCP/OpenAPI client connection configs; passing the removed
|
|
656
|
+
`transports` key now throws a `TypeError` at definition/mount time. → ADR 0311
|
|
657
|
+
**Affects:** `stitchkit/tools` defineRuntimeTool, createRuntimeToolFactory, defineAsyncOperation, defineDownloadTool, defineUploadTool, defineWaitTool, defineViewFileTool, listToolNames, listContractToolNames, ToolNameEntry, RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput, RuntimeToolFactory, RuntimeAsyncOperationConfig; `stitchkit/cli` RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput; `stitchkit/tools/mcp` RuntimeToolDefinition, RuntimeToolDefinitionWithOutput, RuntimeToolDefinitionWithoutOutput; `stitchkit/tools/connections` defineMcpClientConnection, defineOpenApiConnection, McpClientConnectionConfig, OpenApiConnectionConfig; `stitchkit/agent-runtime/coding-tools` createAgentCodingTools, AgentCodingToolDefinition
|
|
658
|
+
- `stitchkit/cli` consolidated top-level `optionAliases`, `positionals`,
|
|
659
|
+
`results`, `passthrough`, and `wait` (and duplicate `lifecycle`) into one typed
|
|
660
|
+
`CliConfig.commandSettings` map (`CliCommandName`, `CliCommandSettings`),
|
|
661
|
+
validated uniformly with runtime `TypeError` on removed top-level keys; CLI
|
|
662
|
+
success output now shares the safe JSON projection used by MCP (`bigint` and
|
|
663
|
+
cycles never crash `JSON.stringify`). `parseCliArgs` takes the same word: its
|
|
664
|
+
`optionAliases` map is `aliases`. → ADR 0311
|
|
665
|
+
**Affects:** `stitchkit/cli` createCli, createCliInvoker, CliConfig, CliInvokerConfig, CliPresentationPolicyConfig(optionAliases, positionals, results), parseCliArgs(optionAliases)
|
|
666
|
+
- `stitchkit/tools/connections`, `stitchkit`, `stitchkit/contract` and `stitchkit/server`
|
|
667
|
+
discovered MCP tools advertising an object `outputSchema` now validate and return `result.structuredContent` across MCP,
|
|
668
|
+
Agent and CLI mounts (charging `outputSchema` bytes to `maxSchemaBytes`) and
|
|
669
|
+
fail loudly with `MCP_STRUCTURED_CONTENT_MISSING` (`502`) when an upstream
|
|
670
|
+
server omits `structuredContent` on a non-error response. For such a tool the
|
|
671
|
+
structured value is the whole answer on every transport: the `content` parts
|
|
672
|
+
the server sent beside it (text, images) are no longer passed through. The
|
|
673
|
+
value is checked with the local verdict its input gets, on every mount (a
|
|
674
|
+
re-exposed MCP tool and an agent tool included), so a format the remote server
|
|
675
|
+
judges (`uri-reference` with a relative path) does not fail the call. The code joins
|
|
676
|
+
`StitchErrorCode` and `STITCH_ERROR_STATUS`, so a map written as
|
|
677
|
+
`satisfies Record<StitchErrorCode, …>` adds `MCP_STRUCTURED_CONTENT_MISSING`. → ADR 0311
|
|
678
|
+
**Affects:** `stitchkit/tools/connections` behaviour; `stitchkit` StitchErrorCode, STITCH_ERROR_STATUS; `stitchkit/contract` StitchErrorCode, STITCH_ERROR_STATUS; `stitchkit/server` StitchErrorCode, STITCH_ERROR_STATUS
|
|
679
|
+
- `stitchkit/tools`, `stitchkit/tools/mcp`, `stitchkit/tools/agent`,
|
|
680
|
+
`stitchkit/tools/invoker`, `stitchkit/tools/toolkit`, `stitchkit/cli` and
|
|
681
|
+
`stitchkit/agent-runtime` replaced optional `lifecycle` with mandatory mount-time
|
|
682
|
+
`access: { gate: ToolGate } | { open: ToolOpenReason; afterHandle? }`
|
|
683
|
+
(`ToolAccess`, `ToolGate`, `ToolOpenReason`) on `mountAgent`, `mountMcp`,
|
|
684
|
+
`buildMcpServer`, `createMcpHandler`, `createStdioMcpServer`, `createToolInvoker`
|
|
685
|
+
(moved from per-call `ToolInvocationOptions`),
|
|
686
|
+
`createDeferredAgentToolSurface().mount`,
|
|
687
|
+
`createToolkit().{mountMcp,mountAgent,createCli}`, and managed
|
|
688
|
+
`createCli` / `createCliInvoker` (native-only CLIs without
|
|
689
|
+
`services`/`runtimeTools` omit `access`), with runtime `TypeError` before the
|
|
690
|
+
first call and stricter `composeToolLifecycle(gate, ...rest): ToolGate` rejecting
|
|
691
|
+
`undefined`. → ADR 0311
|
|
692
|
+
**Affects:** `stitchkit/tools` composeToolLifecycle, createToolInvoker, ToolInvokerConfig, ToolInvocationOptions; `stitchkit/tools/mcp` mountMcp, buildMcpServer, createMcpHandler, createStdioMcpServer; `stitchkit/tools/agent` mountAgent; `stitchkit/tools/invoker` createToolInvoker; `stitchkit/tools/toolkit` createToolkit; `stitchkit/cli` createCli, createCliInvoker, CliConfig, CliInvokerConfig; `stitchkit/agent-runtime` createDeferredAgentToolSurface
|
|
693
|
+
- `stitchkit/agent-runtime` `createDeferredAgentToolSurface` takes the input
|
|
694
|
+
projection (`extend`, `flattenUnionInput`, `inputRecursionDepth`); `mount` refuses
|
|
695
|
+
it with a `TypeError`. The manifest the selector ranked and
|
|
696
|
+
`activation.maxSchemaBytes` measured was built without the projection `mount`
|
|
697
|
+
applied, so the ceiling did not bound the schemas the model received (`extend`
|
|
698
|
+
fields and flattened unions were never counted). The manifest, the ceilings and
|
|
699
|
+
the mount now use the surface's one projection.
|
|
700
|
+
`deferred.mount(runContext, { access, extend, flattenUnionInput: true })`
|
|
701
|
+
→ `createDeferredAgentToolSurface({ …, extend, flattenUnionInput: true })` and
|
|
702
|
+
`deferred.mount(runContext, { access })`.
|
|
703
|
+
[migration](docs/guide/upgrading.md#deferred-surface-projection)
|
|
704
|
+
**Affects:** `stitchkit/agent-runtime` createDeferredAgentToolSurface(extend, flattenUnionInput, inputRecursionDepth), DeferredAgentToolMountConfig(extend, flattenUnionInput), DeferredAgentToolCommonConfig
|
|
705
|
+
- `stitchkit/agent-runtime` `createAgentRuntime` refuses a `loop.retry.maxAttempts`
|
|
706
|
+
that is not a positive safe integer, and so does `recordAgentRetryDecision`
|
|
707
|
+
(`TypeError`). `Infinity` retried a retryable provider failure, each attempt paid,
|
|
708
|
+
without end; `NaN`, `0`, a negative number or a fraction silently meant "never
|
|
709
|
+
retry". `loop: { retry: { maxAttempts: 0, delayMs } }`
|
|
710
|
+
→ `loop: { retry: { maxAttempts: 1, delayMs } }`.
|
|
711
|
+
[migration](docs/guide/upgrading.md#retry-max-attempts)
|
|
712
|
+
**Affects:** `stitchkit/agent-runtime` createAgentRuntime(loop), recordAgentRetryDecision, AgentRetryPolicy(maxAttempts)
|
|
713
|
+
- `stitchkit/agent-runtime/openrouter` `openRouterProvider(settings, access?)` now
|
|
714
|
+
refuses `settings.extraBody` keys owned by the request policy (`provider`,
|
|
715
|
+
`reasoning`, `session_id`, `usage`) with a `TypeError` so provider-level
|
|
716
|
+
`extraBody` cannot silently overwrite per-request routing, reasoning or usage
|
|
717
|
+
policies.
|
|
718
|
+
`openRouterProvider({ apiKey, extraBody: { provider: { order: ['anthropic'] } } })`
|
|
719
|
+
→ `openRouterProvider({ apiKey }, { defaultPolicy: { provider: { order: ['anthropic'] } } })`.
|
|
720
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterProvider(extraBody)
|
|
721
|
+
- `stitchkit/process` `NativeCommandError.reason` (when `code === 'COMMAND_LIMIT'`)
|
|
722
|
+
adds `'stdin-budget'` for streamed `stdin` (`ReadableStream<Uint8Array>`) in
|
|
723
|
+
`runNativeCommand` and `streamNativeCommand` exceeding `maxStdinBytes`
|
|
724
|
+
(previously thrown as an untyped `Error`). Exhaustive switches on
|
|
725
|
+
`NativeCommandError.reason` must add a `'stdin-budget'` branch.
|
|
726
|
+
`case 'deadline': case 'output-budget':` → `case 'deadline': case 'output-budget': case 'stdin-budget':`.
|
|
727
|
+
**Affects:** `stitchkit/process` NativeCommandError(reason)
|
|
728
|
+
- `stitchkit/tools` and `stitchkit/tools/connections` a timer option is refused by the
|
|
729
|
+
one timer rule every other component uses: an integer from 1 to 2147483647
|
|
730
|
+
milliseconds. `effect(…, { reconcileTimeoutMs })` refused an out-of-range value
|
|
731
|
+
with a `TypeError` and accepted a fraction such as `1.5`; it now refuses both with a
|
|
732
|
+
`RangeError`. A connection's `timeoutMs` and `idleTimeoutMs` that are not numbers
|
|
733
|
+
(a string read from JSON) are a `TypeError` instead of a `RangeError`; numbers out
|
|
734
|
+
of range stay a `RangeError`. Every refusal names the option and the value it
|
|
735
|
+
received. `catch (error) { if (error instanceof TypeError) … } // reconcileTimeoutMs: 0`
|
|
736
|
+
→ `catch (error) { if (error instanceof RangeError) … } // reconcileTimeoutMs: 0, 1.5`.
|
|
737
|
+
[migration](docs/guide/upgrading.md#timer-options-one-rule). → ADR 0320
|
|
738
|
+
**Affects:** `stitchkit/tools` EffectRunOptions(reconcileTimeoutMs); `stitchkit/tools/connections` defineMcpClientConnection(timeoutMs, idleTimeoutMs), defineOpenApiConnection(timeoutMs, idleTimeoutMs)
|
|
739
|
+
- `stitchkit` `stitchkit/http` `stitchkit/realtime` `stitchkit/contract` `stitchkit/react`
|
|
740
|
+
`stitchkit/files` `stitchkit/server` `stitchkit/node` `stitchkit/tools`
|
|
741
|
+
`stitchkit/observability` `stitchkit/testing` `stitchkit/application`
|
|
742
|
+
`stitchkit/application/diagnostic-journal` `stitchkit/telegram`
|
|
743
|
+
`stitchkit/telegram/screens` `stitchkit/cli` `stitchkit/agent-runtime`
|
|
744
|
+
`stitchkit/agent-runtime/browser` `stitchkit/agent-runtime/realtime`
|
|
745
|
+
`stitchkit/agent-runtime/testing` `stitchkit/agent-runtime/openrouter` `stitchkit/live`
|
|
746
|
+
`stitchkit/google` `stitchkit/geo` `stitchkit/release` `stitchkit/tracking`
|
|
747
|
+
`stitchkit/tracking/performance` every other timer option follows the same timer
|
|
748
|
+
rule: an integer from 1 (0 for a drain bound, a run timeout or a retry delay) to
|
|
749
|
+
2147483647 milliseconds, refused before anything starts. A value past 2147483647
|
|
750
|
+
used to pass and fire at once; it is now a `RangeError`. A value these options
|
|
751
|
+
refused with a `TypeError` — 0, a negative or a fractional number — is now a
|
|
752
|
+
`RangeError`: a streaming route's `heartbeatMs` (`sseRoute`, `ndjsonRoute`,
|
|
753
|
+
`streamingRoute`), the drain `timeoutMs` of `createObservability().flush()`/`close()`,
|
|
754
|
+
`runManagedResourceConformance`'s `watchdogTimeoutMs`, `runSurfaceProbes`'
|
|
755
|
+
`timeoutMs` (checked before any driver runs), `createBoundedAdmission`'s
|
|
756
|
+
`drain({ timeoutMs })` and `run(…, { timeoutMs })`, the diagnostic journal's
|
|
757
|
+
`flush`/`close` `timeoutMs`, `createTelegramBotTransport`'s `connectAttemptMs`,
|
|
758
|
+
`connectBudgetMs` and `responseTimeoutMs`, `createAgentRuntime`'s
|
|
759
|
+
`loop.idleTimeoutMs`, a retry policy's `delayMs` result, `createAgentController`'s
|
|
760
|
+
`timeoutMs`, `createAgentRaceBarrier`'s timeout, the `timeoutMs` of
|
|
761
|
+
`openRouterModelCatalog` (now checked when the catalog is created, not on its first
|
|
762
|
+
`load()`) and of `createOpenRouterSpendReconciler`, and `bindAgentHarnessRealtime`'s
|
|
763
|
+
`authorizationTimeoutMs` (now checked before it creates the control server or binds
|
|
764
|
+
the realtime contract), `createManagedFileBoundary`'s `inspectionTimeoutMs` (now
|
|
765
|
+
checked before it binds its root) and `createUnixClientTransport`'s
|
|
766
|
+
`headersTimeoutMs`. The `gracePeriodMs` / `forceTimeoutMs` of `AgentRuntime.close()`
|
|
767
|
+
and `createAgentSessionCoordinator().close()` refused a negative, fractional or `NaN`
|
|
768
|
+
value with a `TypeError` and now with a `RangeError` (0 allowed), still before
|
|
769
|
+
admission closes. `heartbeatMs`, a drain `timeoutMs` and a realtime request
|
|
770
|
+
`timeoutMs` accepted a fraction and now refuse it. A value that is not a number is a
|
|
771
|
+
`TypeError` where it was a `RangeError`: a realtime request `timeoutMs`,
|
|
772
|
+
`ScreenOutcome.notice`'s `expiresInMs`, the `maxWaitMs` call option of
|
|
773
|
+
`telegramOutboundBudget`, `applyCliUpdate`'s `verifyTimeoutMs` and
|
|
774
|
+
`createTelegramUpdateIntake`'s `leaseMs` and `sweepEveryMs`; a number out of range
|
|
775
|
+
stays a `RangeError`. `createCacheBridge`'s `freshWindow` refused a negative or
|
|
776
|
+
non-finite value with a plain `Error`, and a credit window's
|
|
777
|
+
`acquire(bytes, { timeoutMs })` refused with a `ZodError`; both now answer by the
|
|
778
|
+
timer rule (`freshWindow` 0 allowed), a fraction refused too. Options that reached a
|
|
779
|
+
timer with no check are now refused where they are taken, before anything is sent,
|
|
780
|
+
scheduled or opened — 0, a negative, `NaN` or a value past the ceiling used to fire
|
|
781
|
+
at once: `createHttpClient`'s and `createClient`'s `timeout`, a contract endpoint's
|
|
782
|
+
`timeout` (at `defineContract`), a request's `timeout` (before the request is sent),
|
|
783
|
+
`createSocketIOClient`'s `reconnectOnServerDisconnect` (0 allowed) and
|
|
784
|
+
`uploadInChunks`' `retryDelayMs` (0 allowed, before the first part).
|
|
785
|
+
`BackoffPolicySchema` refuses a `minDelayMs` or `maxDelayMs` past the ceiling with
|
|
786
|
+
its `ZodError`. A wait timeout in seconds follows the rule in seconds: `defineWaitTool`
|
|
787
|
+
and `mountWait` refuse a `defaultTimeout` that is negative, not finite or longer than
|
|
788
|
+
2147483.647 seconds when they are defined, and a wait refuses such a per-call
|
|
789
|
+
`timeoutSec` — from `timeoutFromInput`, `timeoutFromArgs`, `timeoutFromId`,
|
|
790
|
+
`--wait-timeout` or a CLI wait's `timeout` — before its first poll; a fraction and 0
|
|
791
|
+
stay valid. Such a timeout used to abort every poll at once. The download and
|
|
792
|
+
view-file tools (`defineDownloadTool`, `mountDownload`, `defineViewFileTool`,
|
|
793
|
+
`mountViewFile`) refuse `timeoutMs` when they are defined, with a `RangeError`, where
|
|
794
|
+
they refused it at the first fetch with a plain `Error`;
|
|
795
|
+
`createSecureClientMetadataFetcher`'s `timeoutMs`, a contract stream endpoint's
|
|
796
|
+
`lifetimeMs` and `heartbeatMs`, a `defineEvents` topic's `listenerTimeoutMs` and
|
|
797
|
+
`createDecisionPipeline`'s `policyTimeoutMs` are a `RangeError` (a `TypeError` when
|
|
798
|
+
not a number) where they were a plain `Error`, and each refuses a fraction too;
|
|
799
|
+
`applyCliUpdate` refuses `timeoutMs`, `idleTimeoutMs` and `verifyTimeoutMs` before it
|
|
800
|
+
downloads anything (a `verifyTimeoutMs` was checked only after the download).
|
|
801
|
+
`createGoogleOidcClient` keeps answering a bad `timeoutMs` with
|
|
802
|
+
`GoogleOidcError('MISCONFIGURED')`, now also past the range, with the timer refusal as
|
|
803
|
+
its `cause`. More options that reached their timer with no check are refused where
|
|
804
|
+
they are taken: `createWatchClient`'s `holdMs` (0 allowed) and `openTimeoutMs`, before
|
|
805
|
+
a watch opens; `createWatchHub`'s `holdMs` (0 allowed), at construction instead of at
|
|
806
|
+
the first release, and its `backoff`, parsed with `BackoffPolicySchema` at
|
|
807
|
+
construction instead of at the first failed read; `createGeoIpResolver`'s
|
|
808
|
+
`reload.intervalMs`, at creation (an `intervalMs` of 0 or below used to turn reloading
|
|
809
|
+
off silently; `reload: false` does that); `createReleaseWatcher`'s `maxDeferMs`
|
|
810
|
+
(0 allowed); `createTrackingClient`'s `heartbeatMs`, `deliverTrackingBatch`'s
|
|
811
|
+
`retryDelayMs` (0 allowed, before the first request) and
|
|
812
|
+
`createPerformanceCollector`'s `earlyDelayMs` (0 allowed). A schema field that becomes
|
|
813
|
+
a timer states the ceiling: `ShutdownOptionsSchema` (`gracePeriodMs`,
|
|
814
|
+
`realtimeCloseTimeoutMs`, `forceTimeoutMs`), `ApplicationRestartInputSchema`
|
|
815
|
+
(`gracePeriodMs`, `forceTimeoutMs`), `createNotificationOutbox`'s `pollIntervalMs` and
|
|
816
|
+
a fault plan's `timeout-before-first-byte` `milliseconds` refuse a value past
|
|
817
|
+
2147483647 with their `ZodError`. Every refusal names the option and the value it
|
|
818
|
+
received. A drain or a journal `close` refused this way no
|
|
819
|
+
longer stops admission first.
|
|
820
|
+
`catch (error) { if (error instanceof TypeError) … } // sseRoute({ heartbeatMs: 0 })`
|
|
821
|
+
→ `catch (error) { if (error instanceof RangeError) … } // sseRoute({ heartbeatMs: 0 })`.
|
|
822
|
+
`mountWait(server, { …, defaultTimeout: 30 * 86_400 })`
|
|
823
|
+
→ `mountWait(server, { …, defaultTimeout: 24 * 86_400 })`.
|
|
824
|
+
[migration](docs/guide/upgrading.md#timer-options-one-rule). → ADR 0320
|
|
825
|
+
**Affects:** `stitchkit` bindRealtimeClient(behaviour), createHttpClient(timeout), createClient(behaviour), createSocketIOClient(reconnectOnServerDisconnect), uploadInChunks(retryDelayMs), BackoffPolicySchema(minDelayMs, maxDelayMs), defineContract(behaviour); `stitchkit/http` createHttpClient(timeout), createClient(behaviour), uploadInChunks(retryDelayMs); `stitchkit/realtime` createSocketIOClient(reconnectOnServerDisconnect); `stitchkit/contract` defineContract(behaviour); `stitchkit/react` createCacheBridge(freshWindow); `stitchkit/files` createManagedFileBoundary(inspectionTimeoutMs); `stitchkit/server` sseRoute(heartbeatMs), ndjsonRoute(heartbeatMs), streamingRoute(heartbeatMs), createUnixClientTransport(headersTimeoutMs), ShutdownOptionsSchema(gracePeriodMs, realtimeCloseTimeoutMs, forceTimeoutMs); `stitchkit/node` createUnixClientTransport(headersTimeoutMs), ShutdownOptionsSchema(gracePeriodMs, realtimeCloseTimeoutMs, forceTimeoutMs); `stitchkit/tools` defineWaitTool(defaultTimeout), mountWait(defaultTimeout), defineDownloadTool(timeoutMs), mountDownload(timeoutMs), defineViewFileTool(timeoutMs), mountViewFile(timeoutMs), createSecureClientMetadataFetcher(timeoutMs); `stitchkit/observability` createObservability(behaviour); `stitchkit/testing` runManagedResourceConformance(watchdogTimeoutMs), runSurfaceProbes(timeoutMs); `stitchkit/application` createBoundedAdmission(behaviour), createCreditWindow(behaviour), createDecisionPipeline(policyTimeoutMs), ApplicationRestartInputSchema(gracePeriodMs, forceTimeoutMs), createWatchHub(holdMs, backoff), createNotificationOutbox(pollIntervalMs); `stitchkit/application/diagnostic-journal` createDiagnosticJournal(behaviour); `stitchkit/telegram` createTelegramBotTransport(connectAttemptMs, connectBudgetMs, responseTimeoutMs), telegramOutboundBudget(maxWaitMs), createTelegramUpdateIntake(leaseMs, sweepEveryMs); `stitchkit/telegram/screens` ScreenOutcome(notice); `stitchkit/cli` applyCliUpdate(verifyTimeoutMs, timeoutMs, idleTimeoutMs), pollUntilDone(behaviour); `stitchkit/agent-runtime` createAgentRuntime(loop, close), createAgentSessionCoordinator(behaviour), AgentRetryPolicy(delayMs); `stitchkit/agent-runtime/browser` createAgentController(timeoutMs); `stitchkit/agent-runtime/realtime` bindAgentHarnessRealtime(authorizationTimeoutMs); `stitchkit/agent-runtime/testing` createAgentRaceBarrier(behaviour), defineAgentFaultPlan(behaviour), AgentFaultStepSchema(behaviour); `stitchkit/agent-runtime/openrouter` openRouterModelCatalog(timeoutMs), createOpenRouterSpendReconciler(timeoutMs); `stitchkit/live` defineEvents(behaviour), createWatchClient(holdMs, openTimeoutMs); `stitchkit/google` createGoogleOidcClient(timeoutMs); `stitchkit/geo` createGeoIpResolver(reload); `stitchkit/release` createReleaseWatcher(maxDeferMs); `stitchkit/tracking` createTrackingClient(heartbeatMs), deliverTrackingBatch(retryDelayMs); `stitchkit/tracking/performance` createPerformanceCollector(earlyDelayMs)
|
|
826
|
+
- `stitchkit/files` `stitchkit/telegram` a count, a byte size or an age is a safe
|
|
827
|
+
integer, refused when the factory is created, where it was used as written:
|
|
828
|
+
`createChunkSpool` refuses a `maxFileBytes` that is not a positive safe integer and
|
|
829
|
+
a `staleAfterMs` that is not a non-negative one (`TypeError`) — a `NaN`
|
|
830
|
+
`staleAfterMs` made `sweep()` remove every upload; `createTelegramOperatorChannel`
|
|
831
|
+
refuses a `maxQueued` or `maxAttempts` that is not a positive safe integer
|
|
832
|
+
(`TypeError`) — `maxAttempts: NaN` retried forever, `maxQueued: NaN` queued
|
|
833
|
+
without bound — and a `minIntervalMs` outside the timer rule (`RangeError`, 0
|
|
834
|
+
allowed), which a negative or `NaN` value silently became 0. A fraction computed
|
|
835
|
+
from another value (`hours * 3.6e6`) is refused too.
|
|
836
|
+
`createChunkSpool({ …, staleAfterMs: hours * 3.6e6 })` →
|
|
837
|
+
`createChunkSpool({ …, staleAfterMs: Math.round(hours * 3.6e6) })`.
|
|
838
|
+
[migration](docs/guide/upgrading.md#timer-options-one-rule) → ADR 0324
|
|
839
|
+
**Affects:** `stitchkit/files` createChunkSpool(maxFileBytes, staleAfterMs), ChunkSpoolConfig(maxFileBytes, staleAfterMs); `stitchkit/telegram` createTelegramOperatorChannel(maxQueued, maxAttempts, minIntervalMs), TelegramOperatorChannelConfig(maxQueued, maxAttempts, minIntervalMs)
|
|
840
|
+
- `stitchkit/cli` a command that fails on `createUnixClientTransport` answers the
|
|
841
|
+
transport's `UNIX_*` code and exits by delivery: `9` when the request never left
|
|
842
|
+
(`UNIX_CONNECT_FAILED`, `UNIX_TARGET_REFUSED`, `UNIX_CLIENT_CLOSED`,
|
|
843
|
+
`UNIX_CONNECTION_LIMIT`, `UNIX_REQUEST_TOO_LARGE`; the message names the socket),
|
|
844
|
+
`10` when it may have reached the application (`UNIX_DELIVERY_UNCERTAIN`,
|
|
845
|
+
`UNIX_HEADERS_TIMEOUT`; "Outcome unknown, not retried"), and `1` when an answer
|
|
846
|
+
came back. Every such failure exited `1`. `exitCodes` overrides each.
|
|
847
|
+
`if [ $? -eq 1 ]; then start-app; fi` → `if [ $? -eq 9 ]; then start-app; fi`.
|
|
848
|
+
[migration](docs/guide/upgrading.md#cli-unix-delivery-exit-codes) → ADR 0325
|
|
849
|
+
**Affects:** `stitchkit/cli` DEFAULT_EXIT_CODES, createCli(behaviour)
|
|
850
|
+
|
|
851
|
+
### Added
|
|
852
|
+
|
|
853
|
+
- `stitchkit/telegram/html` adds zero-dependency `markdownToTelegramHtml` and
|
|
854
|
+
`splitTelegramMarkdown` (`TelegramMarkdownSplitOptions`,
|
|
855
|
+
`TelegramMarkdownSplitError`, `TelegramMarkdownSplitRefusal`): GitHub-flavored
|
|
856
|
+
Markdown (inline formatting, safe `http`/`https`/`tg`/`mailto` links, fenced
|
|
857
|
+
code blocks, GFM tables in `<pre>`, headings, lists/checkboxes, blockquotes,
|
|
858
|
+
`<details>`/`<summary>` with the body's blank lines preserved) compiles through the canonical HTML AST so every
|
|
859
|
+
output passes `checkTelegramHtml` and is a `sanitizeTelegramHtml` fixed point.
|
|
860
|
+
Conversion is linear in the text and never recurses on its depth: quotes,
|
|
861
|
+
`<details>` and inline styles nested deeper than 32 stay text. For Telegram
|
|
862
|
+
HTML, convert first and cut with `splitTelegramHtml`, which counts what the
|
|
863
|
+
reader sees — a table aligned in `<pre>` can be several times longer than its
|
|
864
|
+
Markdown. `splitTelegramMarkdown` is for text that stays Markdown: its `limit`
|
|
865
|
+
counts Markdown, a fenced block split across chunks is closed and reopened,
|
|
866
|
+
and a table split across chunks repeats its header row and separator.
|
|
867
|
+
Plain text stays plain: every emphasis delimiter (`*`, `**`, `_`, `__`, `~~`,
|
|
868
|
+
`||`) opens only where no letter or digit stands before it and closes only
|
|
869
|
+
where none follows, so `2*3*4`, `a*b or c*d` and `snake_case` convert to
|
|
870
|
+
themselves. A link whose destination the link rules refuse stays its source
|
|
871
|
+
text — `[click](javascript:alert(1))` reads exactly so — instead of losing its
|
|
872
|
+
destination; it never becomes a link. A literal double quote in a Markdown
|
|
873
|
+
destination is refused; `%22` is accepted, as are quotes in the label or title.
|
|
874
|
+
`parseTelegramHtml` / `sanitizeTelegramHtml` also allow `code`, `a`, `pre`,
|
|
875
|
+
`tg-emoji` and `tg-time` inside `blockquote` (matching Telegram Bot API).
|
|
876
|
+
|
|
877
|
+
- `stitchkit/agent-runtime` `loop.stepBarriers` guards each model step: a bound on
|
|
878
|
+
tool calls (`maxToolCallsPerStep`: the extra call is refused to the model as a
|
|
879
|
+
`STEP_TOOL_CALL_LIMIT` tool error and is not put to approval), call order by
|
|
880
|
+
entity (`toolDependencies`, with `createToolDependencyResolver` over the
|
|
881
|
+
`effect` of contract endpoints under their mounted tool names: a read waits for
|
|
882
|
+
the step's earlier write of its entity, a write for the earlier reads and
|
|
883
|
+
writes), a bound on reasoning (`maxReasoningCharsPerStep`, `policy_stop`), and
|
|
884
|
+
`stepText: 'after-tools'` (a step's text shown only after its tool calls all
|
|
885
|
+
succeeded). A bound no step could meet is refused by `createAgentRuntime`. The
|
|
886
|
+
browser controller and `useAgent` are no longer marked experimental; both stay
|
|
887
|
+
`evolving`.
|
|
888
|
+
- `stitchkit/spend` (new, evolving, server-only, peer-free) — one gateway `fetch`
|
|
889
|
+
per paid model provider (`createSpendGateway(...).fetchFor(name)`): the attempt
|
|
890
|
+
is recorded before the request is sent and closed on every outcome — success,
|
|
891
|
+
HTTP error, broken or cancelled stream, transport failure; credentials only for
|
|
892
|
+
the provider's origin, the caller's credential headers dropped, redirects
|
|
893
|
+
refused, `x-request-id` = attempt id; attribution required
|
|
894
|
+
(`runWithSpendAttribution`); usage read from the response
|
|
895
|
+
(`openAiCompatibleUsage`); a spooled ledger (`createSpooledSpendStore`; a record
|
|
896
|
+
that could be neither spooled nor stored rejects with `SPOOL_UNSPOOLED`, the
|
|
897
|
+
database's error as `cause`), the
|
|
898
|
+
monotone receipt merge (`mergeSpendReceipt`), `reconcilePendingSpend` and
|
|
899
|
+
`closeOrphanedSpend`. A cost is set only when the provider reported it.
|
|
900
|
+
`admit` refuses a call before it is sent and records it as `refused`; a
|
|
901
|
+
receipt whose attempt the database has not taken waits on disk with it, and
|
|
902
|
+
`reconcilePendingSpend` reports a receipt it cannot merge through `onError`
|
|
903
|
+
and goes on with the rest. The labels of the current attribution are merged
|
|
904
|
+
with those of the gateway's `context()` instead of replacing them.
|
|
905
|
+
`stitchkit/spend/testing` adds `assertSpendCoverage`, red on a model SDK
|
|
906
|
+
import (subpaths and `@scope/*` included), a provider key or a provider host
|
|
907
|
+
outside the gateway files, which reads a declaration without a closing `;` as
|
|
908
|
+
its own statement rather than joining it to the import after it. `stitchkit/agent-runtime`
|
|
909
|
+
`modelInvocationSpendAttribution` fills a gateway's attribution from the
|
|
910
|
+
current model attempt. → ADR 0317
|
|
911
|
+
- `stitchkit/agent-runtime/openrouter` — one access layer for OpenRouter models:
|
|
912
|
+
a request policy (`OpenRouterRequestPolicySchema`: `sessionId` or
|
|
913
|
+
`provider.order`, routing, `maxPrice`, `reasoning.effort` up to `max`,
|
|
914
|
+
`looseTools`) applied by `openRouterProvider(settings, { defaultPolicy,
|
|
915
|
+
resolvePolicy, sessionPerConversation })`, which delivers `looseTools`'
|
|
916
|
+
`strict: false` for every tool on the wire; a route pinned per thread
|
|
917
|
+
(`createOpenRouterRouteResolver`, bounded `createMemoryOpenRouterRouteStore`); a
|
|
918
|
+
stored catalog snapshot with endpoints (`loadOpenRouterCatalogSnapshot`,
|
|
919
|
+
`fetchOpenRouterModelEndpoints`) and admission from it
|
|
920
|
+
(`evaluateOpenRouterModelAdmission`: admitted, unverified or rejected with a
|
|
921
|
+
reason, as a schema; floating aliases and `openrouter/auto` always refused; an
|
|
922
|
+
unknown price never zero, and a stated price over the policy's limit rejects the
|
|
923
|
+
model even when the other price is unknown); and the
|
|
924
|
+
`stitchkit/spend` provider and reconciler (`openRouterSpendProvider`,
|
|
925
|
+
`createOpenRouterSpendReconciler`). The catalog requests refuse redirects and
|
|
926
|
+
bound their bodies; `openRouterModelCatalog` leaves out a price OpenRouter does
|
|
927
|
+
not know instead of failing, and its HTTP error names the request path.
|
|
928
|
+
- `stitchkit/agent-executor` — the contract between an executor that drives
|
|
929
|
+
external coding agents and the server that hands it turns: hello with
|
|
930
|
+
engines and private profiles, thread leases under a fence, turn phases and
|
|
931
|
+
reports applied once, interrupts and answers to an engine's requests, over
|
|
932
|
+
`defineContract` and the realtime contract. Deltas extend the message parts,
|
|
933
|
+
which moved to a neutral part the runtime shares; `projectExecutorDeltas`
|
|
934
|
+
folds them into a message. A lease refusal (`ExecutorLeaseRefusal`) is an
|
|
935
|
+
`AppError` with status 409 and a code of `EXECUTOR_ERRORS`, so an operation
|
|
936
|
+
that returns the service's promise answers
|
|
937
|
+
`409 { error: { code: 'EXECUTOR_FENCE_STALE' } }` without a mapper of its own.
|
|
938
|
+
A turn carries the `turnOrdinal` the server offered it under (`TurnOfferSchema`,
|
|
939
|
+
`TurnReportSchema`, `ExecutorResumableTurnSchema`). `createExecutorLeases` keeps
|
|
940
|
+
receipts for each thread's last `retainedTurns` turns (default 64, at most 1024)
|
|
941
|
+
and the highest ordinal it let go, so the lease state is bounded by threads, not
|
|
942
|
+
by history. A report is acknowledged `{ outcome: 'applied' | 'duplicate', ackedSeq }`;
|
|
943
|
+
a report of a turn at or below the ordinal let go — its first report included — is
|
|
944
|
+
`{ outcome: 'not-retained' }`, never applied again; a report whose turn belongs to
|
|
945
|
+
another thread or was offered under another ordinal is refused with
|
|
946
|
+
`EXECUTOR_UNKNOWN_TURN`. `resume(resumable)` answers a hello the same way: each
|
|
947
|
+
resumable turn is `{ outcome: 'acked', ackedSeq }` (0 for a turn never seen) or
|
|
948
|
+
`{ outcome: 'not-retained' }` (`ExecutorHelloAckSchema.resumable`). A hello takes the same ids a report takes (at most 256
|
|
949
|
+
characters) and bounds its lists (engines, profiles, resumable turns, credential
|
|
950
|
+
names, model ids, plan windows).
|
|
951
|
+
`ExecutorEngineInfo.models` names which fact it is: `{ answer: 'listed', ids }`
|
|
952
|
+
(an empty list — the engine offers none), `{ answer: 'not-asked' }` (the Claude
|
|
953
|
+
and Codex drivers do not ask their engine) or `{ answer: 'failed', error }`.
|
|
954
|
+
An ACP profile's `home` is its agent's `HOME` unless `profile.env` sets one, so
|
|
955
|
+
two profiles with two homes are two sign-ins. Evolving. → ADR 0316
|
|
956
|
+
- The engine drivers, each a leaf the base entrypoint does not know:
|
|
957
|
+
`stitchkit/agent-executor/claude` (`createClaudeCliDriver`, the unmodified
|
|
958
|
+
CLI over `stream-json`), `stitchkit/agent-executor/claude-sdk`
|
|
959
|
+
(`createClaudeSdkDriver`, the Agent SDK's `query` passed in by the
|
|
960
|
+
application, read by the same classifier; the SDK is an optional peer whose
|
|
961
|
+
types alone the leaf names), `stitchkit/agent-executor/codex`
|
|
962
|
+
(`createCodexDriver`, `codex app-server`) and `stitchkit/agent-executor/acp`
|
|
963
|
+
(`createAcpDriver`, an Agent Client Protocol v1 agent: model, thought level
|
|
964
|
+
and mode set by category, images when the agent takes them, MCP servers,
|
|
965
|
+
`session/resume` or `session/load`, `session/list`; protocol 2 refused at
|
|
966
|
+
hello, a pending permission answered `cancelled` on interrupt, no
|
|
967
|
+
reconcile; `requestTimeoutMs`, `maxFrameBytes` and `maxImageBytes` out of
|
|
968
|
+
range are refused when the driver is created, before any agent is spawned).
|
|
969
|
+
Every driver answers an interrupt alike: a request the engine sends after
|
|
970
|
+
`interrupt()` is refused at once (ACP `cancelled`, Claude deny, Codex
|
|
971
|
+
`cancel`), a request the Claude CLI sends between turns is denied, and every
|
|
972
|
+
request an interrupt, the turn's end or a lost engine answers is closed with a
|
|
973
|
+
`request-resolved` delta. A session whose engine died on its own fails its turn
|
|
974
|
+
and lets go of the caller's signal; `close()` only collects what it left. An
|
|
975
|
+
answer the engine could not take leaves its request held and open to another
|
|
976
|
+
answer. A failure to stop the engine after opening failed is
|
|
977
|
+
thrown with that failure as one `AggregateError` whose `cause` is the opening
|
|
978
|
+
failure. The Claude drivers read `loginExpiresAt` as the ISO-8601 time the CLI
|
|
979
|
+
writes (any other form is `login: unknown`) and refuse a resume whose
|
|
980
|
+
transcript cannot be opened for a reason other than absence. A driver refuses a
|
|
981
|
+
profile whose `engine` is not its own with a `TypeError`, before it reads a file
|
|
982
|
+
or starts the engine: the profile's home is kept under that engine's variable,
|
|
983
|
+
so another engine would run on the executor's own account.
|
|
984
|
+
`spawnEngineProcess` bounds queued stdin (`maxPendingStdinBytes`) and
|
|
985
|
+
`createJsonRpcPeer` bounds its local waits (`JSON_RPC_LOCAL_TIMEOUT`). Every
|
|
986
|
+
option of `spawnEngineProcess` is checked before the engine is started, and
|
|
987
|
+
`maxStdinBytes` (default 256 MiB) bounds what one connection writes over its
|
|
988
|
+
life: `send()` refuses a line past it with a `RangeError` and the engine keeps
|
|
989
|
+
running.
|
|
990
|
+
A `control_request` of a subtype the Claude driver does not know is answered
|
|
991
|
+
with the CLI's `ControlErrorResponse` and still reaches the consumer as an
|
|
992
|
+
`unhandled` error, so the turn does not wait on it.
|
|
993
|
+
`stitchkit/agent-executor/testing` holds the conformance kit and the
|
|
994
|
+
scripted engine every driver is proven against;
|
|
995
|
+
`AgentEngineDialectScenarios.requestAfterInterrupt()` proves the interrupt
|
|
996
|
+
rule on every dialect; `requestAtTurnEnd()` and `requestThenCrash()` prove that
|
|
997
|
+
a request still held when the turn ends is closed with `request-resolved` before
|
|
998
|
+
the end, and that neither it nor one held by an engine that died is left open to
|
|
999
|
+
the consumer's answer. `AgentEngineConformanceConfig.open()` also returns
|
|
1000
|
+
`answered(request)`, how the kit sees that the engine itself was answered when a
|
|
1001
|
+
turn ended with its request held. `runFakeClaudeEngine` plays a scenario as Claude Code
|
|
1002
|
+
does on `stream-json` (Codex and ACP are played by their own fakes); the
|
|
1003
|
+
scenario schemas (`FakeEngineScenarioSchema`, `FakeEngineStepSchema`) stay
|
|
1004
|
+
dialect-neutral. Evolving. → ADR 0316
|
|
1005
|
+
|
|
1006
|
+
- `stitchkit/agent-runtime/postgres` — the agent store on Postgres.
|
|
1007
|
+
`createPostgresAgentRuntimeStore({ transaction, query })` gives the store,
|
|
1008
|
+
the conversation reader and the companion host over the application's own
|
|
1009
|
+
client (Bun SQL, Prisma, `pg`): SERIALIZABLE write transactions retried on a
|
|
1010
|
+
serialization conflict, at a statement or at `COMMIT`, up to `maxAttempts` (32; a
|
|
1011
|
+
value that is not a positive safe integer is refused with `TypeError`); a versioned schema
|
|
1012
|
+
created under an advisory lock or checked when migrations own it
|
|
1013
|
+
(`createTables: false`, `postgresAgentRuntimeStoreDdl(prefix)`, which seeds
|
|
1014
|
+
its own schema version); the schema is created in `READ COMMITTED` whatever
|
|
1015
|
+
the database's default isolation; every
|
|
1016
|
+
companion — schedules, children, spills, projections — on the same tables.
|
|
1017
|
+
`createPostgresAgentRuntimeStoreDriver` is the driver alone. Evolving. → ADR 0314
|
|
1018
|
+
- `stitchkit/agent-runtime` `createAgentEventSearch` searches the Postgres store
|
|
1019
|
+
too, with the SQLite semantics: every word of the query, in any order, and a
|
|
1020
|
+
query of punctuation refused. Each event gets a `tsvector` (`simple`) in
|
|
1021
|
+
its own table, indexed when a search needs it rather than inside
|
|
1022
|
+
`appendEvent`, so an event of any size is stored; a document past the
|
|
1023
|
+
`tsvector` limit is indexed from fewer characters. `postgres` options:
|
|
1024
|
+
`diacritics` (`preserve`, or `unaccent` through the extension, refused
|
|
1025
|
+
without it), `maxIndexedChars` (65 536) and `maxSyncEvents` (10 000; a search
|
|
1026
|
+
further behind indexes that many and refuses, the next continues).
|
|
1027
|
+
`PostgresAgentEventSearchConfig` is exported. → ADR 0315
|
|
1028
|
+
- `stitchkit/server` `createLocalHostGuard` (also on `stitchkit/node`): a desktop
|
|
1029
|
+
app's host is an ordinary server on loopback that answers only its own windows.
|
|
1030
|
+
Loopback keeps other machines out but not a web page on the same machine, which
|
|
1031
|
+
can call the port and open a WebSocket there, nor a DNS-rebinding page. The guard
|
|
1032
|
+
refuses a non-loopback `Host`, an `Origin` outside its list and a missing or wrong
|
|
1033
|
+
Bearer secret (compared in constant time, length included), as `hooks.onRequest`
|
|
1034
|
+
on every route and as Socket.IO `allowRequest` and `handshake`; `guard.cors` allows
|
|
1035
|
+
the same origins, so a window in a webview passes its preflight and reads every
|
|
1036
|
+
answer, and is `undefined` when `origins` is empty, which `createHandler` and
|
|
1037
|
+
`createServer` take as no CORS. → ADR 0303
|
|
1038
|
+
- `stitchkit` A call that got no answer — a dropped connection, not a response — is
|
|
1039
|
+
sent again only when that is safe, and the endpoint says when: `idempotent: true`
|
|
1040
|
+
whatever the method, a `GET`/`HEAD` that does not say `idempotent: false` and does
|
|
1041
|
+
not declare `effect: 'write'` (both clients read the declared effect before
|
|
1042
|
+
falling back to the method). The bare
|
|
1043
|
+
`createClient` now repeats such a call up to `ClientConfig.retry.limit` times
|
|
1044
|
+
(default 2; a value that is not a non-negative integer is refused), and a
|
|
1045
|
+
cancellation during the pause ends the call at once; a client on
|
|
1046
|
+
`createHttpClient` passes the endpoint's `idempotent` to its transport retry
|
|
1047
|
+
through the new `RequestOptions.idempotent`, and repeats an unflagged `HEAD` like a
|
|
1048
|
+
`GET`. → ADR 0303
|
|
1049
|
+
- `stitchkit/sync` (new, evolving): the client half of an offline-first sync, with
|
|
1050
|
+
no driver and no domain, for a browser, Hermes and Bun. `decideOutboxBatch` says
|
|
1051
|
+
which outbox rows leave next — FIFO across pages, a row ripe when no earlier
|
|
1052
|
+
unresolved row shares one of its keys (`keysOf`, by default its entity), a waiting
|
|
1053
|
+
row holding all its keys, exact message bytes; a quarantined or held row holds its
|
|
1054
|
+
keys until a person retries or discards it, unless the policy says
|
|
1055
|
+
`setAside: 'releases-keys'`. `replaceableOutboxRow` says a row may take another edit
|
|
1056
|
+
only before it ever left, and `coveredOutboxIds` lets a `confirmed` row leave once
|
|
1057
|
+
the cursor covers the version its change got. `deriveOverlay` keeps pending local
|
|
1058
|
+
edits on top of remote rows until acknowledged; `decideRemoteRow`,
|
|
1059
|
+
`staleAfterFullSync` and `orphansOf` keep a local delete winning and clean only
|
|
1060
|
+
what a complete snapshot allows; `createSyncSession` runs one cursor session at a
|
|
1061
|
+
time with catch-up, deferred and server-forced full snapshots, the same page again
|
|
1062
|
+
after a dropped transport and a generation check after every wait, on synchronous
|
|
1063
|
+
or asynchronous ports; a full snapshot saves the version it began at and catches
|
|
1064
|
+
up from there, so an entity deleted while it was paged still disappears. A full
|
|
1065
|
+
snapshot may be paged by an opaque `nextToken`; an interrupted full snapshot —
|
|
1066
|
+
paged by version or by token — continues from a saved `SyncSnapshotResume`
|
|
1067
|
+
(`{ snapshot, after, from }` or `{ snapshot, token, from }`) after a restart, so
|
|
1068
|
+
its last page still rebases pending changes and its catch-up starts at the
|
|
1069
|
+
version it began at, deletes made while it ran included. Every full snapshot has
|
|
1070
|
+
an id: `apply(page, { current, snapshot })` names it on each of its pages (`null`
|
|
1071
|
+
in an incremental session), `rebasePending(snapshot)` after its last one, and a
|
|
1072
|
+
snapshot continued after a restart keeps it. Mark the rows a snapshot page writes
|
|
1073
|
+
with it: the rows marked with the id are the `server` set of
|
|
1074
|
+
`staleAfterFullSync`, so a snapshot continued in a new process does not call the
|
|
1075
|
+
rows of the one before stale; a `stale_cursor` refusal
|
|
1076
|
+
(`SYNC_STALE_CURSOR`) loads a full snapshot at once, a server-forced snapshot that
|
|
1077
|
+
cannot begin is reported as `begin_failed` and retried as a full sync, and after
|
|
1078
|
+
every full snapshot `rebasePending` merges the pending changes onto it before its
|
|
1079
|
+
cursor is saved; `saveProgress` saves where the session stands after every page
|
|
1080
|
+
that has more — the next cursor of an incremental session, a `SyncSnapshotResume`
|
|
1081
|
+
in a full snapshot — and `readCursor` returns it; there is one progress port, no
|
|
1082
|
+
`saveSnapshotToken`. `createSyncSession` refuses a `deadlineMs` outside the timer
|
|
1083
|
+
range, and `decideOutboxBatch` a policy whose `emptyEnvelopeBytes`, `maxBytes` or
|
|
1084
|
+
`maxChanges` is not a positive safe integer or whose `retryAfterMs` is not a timer
|
|
1085
|
+
delay (`RangeError`; a `retryAfterMs` that is not a number is a `TypeError`),
|
|
1086
|
+
before anything is sent or decided.
|
|
1087
|
+
Push results are read one by one with an open outcome vocabulary
|
|
1088
|
+
(`classifyChangeResults`): each says `acknowledge` (with the `version` the change
|
|
1089
|
+
got), `retry` or `hold` — a rejection is held for a person unless
|
|
1090
|
+
`rejected: 'acknowledge'`, a failure after `holdAfterFailures`, an unknown outcome
|
|
1091
|
+
within a bound, instead of dropping the acknowledgements beside it.
|
|
1092
|
+
`syncPushRequestSchema` requires push limits. The client half works against a
|
|
1093
|
+
server of the app's own as well. → ADR 0304
|
|
1094
|
+
- `stitchkit/sync/postgres` (new, evolving): the server half inside the
|
|
1095
|
+
application's own transaction. `allocateVersions` and `publish` number every
|
|
1096
|
+
writer of a stream from a counter row locked until commit, so versions commit in
|
|
1097
|
+
their order and a reader never skips one; `push` runs each change once by a
|
|
1098
|
+
`(scope, replicaId, changeId)` ledger with a content fingerprint and the stored
|
|
1099
|
+
outcome — an applied or replayed change answers the newest version its transaction
|
|
1100
|
+
took, so the client keeps it on top until its cursor covers it; a rejection rolls back
|
|
1101
|
+
what the change wrote and is recorded on its own,
|
|
1102
|
+
a failure returns its cause for the server's log; `changesAfter` pages a feed of
|
|
1103
|
+
one row per entity; `prune` forgets old ledger records of one scope or all.
|
|
1104
|
+
`memorySyncStore`, `createSyncServerStore` for another database, and
|
|
1105
|
+
`checkSyncStore`, the rules every store keeps, concurrent writers included.
|
|
1106
|
+
→ ADR 0304
|
|
1107
|
+
- `stitchkit/application` `runSqliteMigrations` and `runSqliteMigrationsAsync`:
|
|
1108
|
+
ordered SQLite migrations with a `schema_migrations` ledger and a 32-bit FNV-1a
|
|
1109
|
+
checksum — the shape offline-first apps already ship, so their databases read as
|
|
1110
|
+
theirs. Ordering does not mutate the caller's list or require `Array.prototype.toSorted`
|
|
1111
|
+
on React Native. Every applied migration is checked before anything runs
|
|
1112
|
+
(`SqliteMigrationLedgerMismatchError`), a ledger ahead of the code is not an
|
|
1113
|
+
error, and each migration is one transaction that the synchronous runner never
|
|
1114
|
+
awaits inside; a failure is `SqliteMigrationFailedError` naming the scope and
|
|
1115
|
+
version, with the driver's error as `cause`; a ledger row whose version is not a
|
|
1116
|
+
positive safe integer, or a version recorded twice, is
|
|
1117
|
+
`SqliteMigrationLedgerUnreadableError`. The ledger is read again inside
|
|
1118
|
+
each transaction, so two connections that open one file at the same moment
|
|
1119
|
+
both finish: the later one skips what the first already applied. A `ROLLBACK`
|
|
1120
|
+
that fails for a reason other than "no transaction is active" is not swallowed:
|
|
1121
|
+
the `SqliteMigrationFailedError`'s cause is an `AggregateError` of the migration
|
|
1122
|
+
error and the rollback error. `ledger` names the table one list is recorded in
|
|
1123
|
+
(default `schema_migrations`), so independent lists share one database — a
|
|
1124
|
+
queue's tables and a replica's — and each numbers its versions from 1; a ledger
|
|
1125
|
+
name that is not a plain SQL identifier is a `TypeError` before anything runs. A
|
|
1126
|
+
`begin` other than `DEFERRED`, `IMMEDIATE` or `EXCLUSIVE` is a `TypeError` before
|
|
1127
|
+
the ledger is created; it never reaches the SQL.
|
|
1128
|
+
The sync guide's synchronous `expo-sqlite` wrapper binds through
|
|
1129
|
+
`getFirstSync`/`getAllSync`/`runSync`, so no prepared statement stays open, and
|
|
1130
|
+
refuses a `bigint`, which `expo-sqlite` does not bind. → ADR 0304
|
|
1131
|
+
- `stitchkit/agent-runtime` `branchConversation` answers every refusal at once,
|
|
1132
|
+
with its address. A branch stopped at the first refusal and named no event, so a
|
|
1133
|
+
host with an archive of hundreds of events learnt what to declare one attempt at
|
|
1134
|
+
a time. Every refusal a declaration or an authorization lifts is now collected
|
|
1135
|
+
into `AgentConversationBranchRefusedError` (a `TypeError`): its `refusals` each
|
|
1136
|
+
carry a `code`, the event `seq` and `eventKind`, the `messageId`, the `toolName`
|
|
1137
|
+
and the key `path`, never a value; a source the branch cannot read stops it at
|
|
1138
|
+
once as an `integrity` refusal with the same address.
|
|
1139
|
+
`store.planConversationBranch(input)` returns the same list without writing, with
|
|
1140
|
+
every attachment reference to grant and declare and the keys to declare. Every
|
|
1141
|
+
identity is defined before any value is judged, so the answer no longer depends on
|
|
1142
|
+
the order the source recorded them in. → ADR 0301
|
|
1143
|
+
- `stitchkit/contract` `RuntimeContext.toolCallId` names the provider's id of the
|
|
1144
|
+
call on the agent transport, where it was already set without a declared type.
|
|
1145
|
+
Like every transport-owned field it is reserved: an auth rule that contributes
|
|
1146
|
+
`toolCallId` to the context is refused instead of replacing the call's identity.
|
|
1147
|
+
- `stitchkit/agent-runtime/coding-tools` `AgentCodingArtifactStore.write` receives
|
|
1148
|
+
the `toolCallId` of the call whose output it holds; the shell tool passes it.
|
|
1149
|
+
- `stitchkit` `createSessionCredentials` adds opt-in proactive refresh
|
|
1150
|
+
(`refreshAhead`, `SessionRefreshAhead`, `refreshIfDue`), startup `restore()`
|
|
1151
|
+
(`SessionRestoreResult`), `refresh(op, { rejected })` (`SessionRefreshOptions`),
|
|
1152
|
+
refresh-endpoint failure classification (`defaultClassifyRefreshFailure`,
|
|
1153
|
+
`SessionRefreshFailure`, `SessionRefreshRejectedError`,
|
|
1154
|
+
`classifyRefreshFailure`), monotonic backoff retries (`retry`), deferred
|
|
1155
|
+
post-rotation write retry (`storageRetryMs`), lifecycle events (`onEvent`,
|
|
1156
|
+
`SessionCredentialsEvent`) and clock injection (`clock`, `SessionClock`).
|
|
1157
|
+
→ ADR 0306
|
|
1158
|
+
- `stitchkit/handler` (new, evolving, browser & React Native/Hermes safe):
|
|
1159
|
+
portable `createHandler`, `implement`, `createImplement`, `createErrorHook`,
|
|
1160
|
+
error helpers and `serveBridge` with zero Node built-ins; pairs with
|
|
1161
|
+
`createBridgeFetch`, `BridgeFailureError` and the v1 bridge frame schemas on
|
|
1162
|
+
`stitchkit/http` so a WebView / Expo DOM window calls an in-process React
|
|
1163
|
+
Native host through the same typed client and replay rules. `createBridgeFetch`
|
|
1164
|
+
bounds a request body by `maxFrameBytes` while reading it, not after buffering
|
|
1165
|
+
it. Both halves refuse bytes that are not UTF-8 with `failure: 'unsupported'`
|
|
1166
|
+
instead of decoding them with U+FFFD, whatever the type says
|
|
1167
|
+
(`text/plain; charset=windows-1251`, `application/json` with a `0xff` byte) and
|
|
1168
|
+
without a type (fetch gives a string body `text/plain`, so an untyped body was
|
|
1169
|
+
built from bytes); UTF-8 bytes travel unchanged under their own `Content-Type`. A
|
|
1170
|
+
React Native host without a body stream reads a typed body with its own `text()`,
|
|
1171
|
+
and without `TextDecoder` passes an untyped body only when it is ASCII. A
|
|
1172
|
+
streaming response (`text/event-stream`, `application/x-ndjson`: a contract
|
|
1173
|
+
`stream` or a raw route) is refused with `unsupported` as soon as the host sees its
|
|
1174
|
+
type, and its stream is cancelled; one frame carries one whole response. A reply
|
|
1175
|
+
frame the window's `Headers` or `Response` refuses (a header value that is not a
|
|
1176
|
+
ByteString, such as a `Content-Disposition` with a Cyrillic file name from a host
|
|
1177
|
+
whose `Headers` does not check values) rejects the call with a `TypeError` instead
|
|
1178
|
+
of leaving it pending past its abort and timeout, and the client does not replay
|
|
1179
|
+
it, nor an invoke reply that is not a reply frame or answers another id. A reply
|
|
1180
|
+
the window drops — over its own `maxFrameBytes`, or not valid for it (a failure
|
|
1181
|
+
code from a newer host) — still ends the call it names, with `frame-too-large` or
|
|
1182
|
+
a `TypeError`, instead of leaving it to the caller's timeout. `createBridgeFetch`
|
|
1183
|
+
takes a `windowInstance` of 1–128 characters and refuses a longer one with a
|
|
1184
|
+
`TypeError` when it is created, so every id the window sends can be found at the
|
|
1185
|
+
head of a reply too large to parse. A string `init.body`
|
|
1186
|
+
follows the type rule a `Request` body follows (`application/octet-stream`,
|
|
1187
|
+
`application/x-ndjson` and `text/event-stream` are refused before sending), and a
|
|
1188
|
+
UTF-8 byte order mark reaches the window as the handler wrote it. → ADR 0307
|
|
1189
|
+
- `stitchkit/files` adds non-blocking regular-file and bounded polled JSON
|
|
1190
|
+
config primitives (`readRegularFile`, `readRegularFileSync`, `fileIdentity`,
|
|
1191
|
+
`RegularFileError`, `JsonValueRefusal`, `DEFAULT_JSON_FILE_BYTES`, `parseJsonBytes`,
|
|
1192
|
+
`readJsonFileSync`, `readJsonOnce`, `PolledJsonFile`, `PolledJsonFiles`, `PolledJsonEntry`,
|
|
1193
|
+
`MAX_POLLED_JSON_CACHE_BYTES`, `JsonFileReading`, `JsonValueSchema`) refusing
|
|
1194
|
+
FIFOs, directories, sockets and concurrent modifications while decoding strict
|
|
1195
|
+
fatal UTF-8. Reads take `{ limit, noFollow, accept }` (plus `signal`
|
|
1196
|
+
async) and refuse with a typed `RegularFileError.reason`: `noFollow` refuses a
|
|
1197
|
+
symbolic link as the last path component through `O_NOFOLLOW`, and `accept`
|
|
1198
|
+
checks the `fstat` of the descriptor the bytes come from before reading them,
|
|
1199
|
+
sync and async, admitting the file only on `true`. Bytes that are not the value
|
|
1200
|
+
are refused too, with the original failure as `cause`: `encoding` (not strict
|
|
1201
|
+
UTF-8), `syntax` (not JSON, or a `__proto__` key at any depth — refused, never
|
|
1202
|
+
dropped) and `schema` (refused or thrown); an error of the operating system keeps
|
|
1203
|
+
its own `code`. A polled reading tells them apart the same way: `unreadable` when
|
|
1204
|
+
the file could not be read, `invalid` with that `reason` when its bytes are not the
|
|
1205
|
+
value. `PolledJsonFiles.refresh(entries)` tracks a set of `{ path, options }` that
|
|
1206
|
+
changes as it runs — each path with its own read options, so explicit files that
|
|
1207
|
+
follow links and drop-ins read with `noFollow` and `accept` share one set — reports
|
|
1208
|
+
`removed` for a path that left it, refuses a path listed twice and refuses rather
|
|
1209
|
+
than evicts past `MAX_POLLED_JSON_PATHS`; `refreshAsync(entries, { signal })` does the
|
|
1210
|
+
same without holding the event loop and commits nothing when aborted. The
|
|
1211
|
+
unchanged-identity shortcut answers from metadata only for a file read at least
|
|
1212
|
+
3 s after its last change (newer of ctime and an mtime not ahead of the clock): a
|
|
1213
|
+
younger file is read and
|
|
1214
|
+
compared again on each poll, since a same-length rewrite inside one tick of a
|
|
1215
|
+
coarse filesystem clock (vfat, FUSE, 9p, kernels without fine-grained timestamps)
|
|
1216
|
+
leaves size, mtime and ctime as they were. `maxCacheBytes` counts the bytes each
|
|
1217
|
+
cached file held when read.
|
|
1218
|
+
`waitForDirectory` resolves when a directory appears, watching its nearest existing
|
|
1219
|
+
ancestor instead of polling; `keepAlive: false` lets the process exit while it waits,
|
|
1220
|
+
and a watch the system refuses with `ENOENT`/`ENOTDIR` is retried after `settleMs`.
|
|
1221
|
+
→ ADR 0308
|
|
1222
|
+
- `stitchkit/observability` adds `repeatLimited` (`RepeatLimitOptions`,
|
|
1223
|
+
`DEFAULT_REPEAT_WINDOW_MS`, `DEFAULT_REPEAT_MAX_KINDS`) and optional `repeat`
|
|
1224
|
+
integration on `createBoundedLogger` and `createJsonLogger` for bounded
|
|
1225
|
+
per-kind suppression of repeated `warn`/`error` entries with
|
|
1226
|
+
`repeatedSinceLastWrite` and LRU eviction flush, applied after redaction and
|
|
1227
|
+
before `entryBytes` bounding. A kind is the level, the message and the stable
|
|
1228
|
+
data fields with every number as `#` — an attempt, a duration or a status is the
|
|
1229
|
+
same kind whatever its value — and the reason under `cause` or `error`: its `name`,
|
|
1230
|
+
its `code`, and its `message` unless the message names a code that is a name, as a
|
|
1231
|
+
system error's does (`ENOENT: no such file or directory, open '/path'`) — so one
|
|
1232
|
+
`ENOENT` for many paths is one kind, while two failures under one category code
|
|
1233
|
+
(`INTERNAL_ERROR`, `COMMAND_FAILED`) or one numeric code (an exit status `1`, an
|
|
1234
|
+
HTTP `500`) with different messages stay apart.
|
|
1235
|
+
`kindOf(level, message, data)` names the kind instead, for a string field such as
|
|
1236
|
+
a path; levels never merge. The count of a kind that stops repeating is written
|
|
1237
|
+
when its window ends. A kind holds the data of its last suppressed entry only
|
|
1238
|
+
until that count is written. → ADR 0308
|
|
1239
|
+
- `stitchkit/contract` (and `stitchkit`) adds closed `OperationEffect`
|
|
1240
|
+
(`'read' | 'write'`), `OperationEffectSchema`, optional `effect` on
|
|
1241
|
+
`defineContract` endpoints (validated at definition time),
|
|
1242
|
+
`contractOperationEffects` and fail-closed `requireContractOperationEffects`.
|
|
1243
|
+
The declared effect reaches hooks and tools as `OperationIdentity.effect` and
|
|
1244
|
+
`RuntimeToolIdentity.effect`, and decides whether a call is a repeatable read
|
|
1245
|
+
before the method does: `effect: 'read'` on a `POST` is one unless it is marked
|
|
1246
|
+
destructive, `effect: 'write'` on a `GET` never is.
|
|
1247
|
+
→ ADR 0308
|
|
1248
|
+
- `stitchkit/service-host` (new, evolving, peer-free server entrypoint) adds
|
|
1249
|
+
host service supervision primitives: manifest-verified artifact directories
|
|
1250
|
+
and atomic versioned `releases/` + `current` activation/rollback
|
|
1251
|
+
(`verifyArtifactDirectory`, `activateVersionedArtifact`,
|
|
1252
|
+
`rollbackVersionedArtifact`), Linux `systemd` unit rendering/inspection/reload
|
|
1253
|
+
with foreign `UnitPath` drop-in detection and stability-window rollback
|
|
1254
|
+
(`renderSystemdServiceUnit`, `checkSystemdUnit`, `installAndStartSystemdUnit`,
|
|
1255
|
+
`reloadSystemdUnit`, `systemdUnitActive`, `systemdMainPid`), macOS `launchd`
|
|
1256
|
+
plist rendering and `bootout` + `bootstrap` reload with rollback
|
|
1257
|
+
(`renderLaunchdPlist`, `parseLaunchctlPrint`, `inspectLaunchdJob`,
|
|
1258
|
+
`reloadLaunchdJob`; an argument or environment value with a line break is
|
|
1259
|
+
refused, since `launchctl print` shows it unescaped and it could name another
|
|
1260
|
+
program), and live PID / Unix-socket ownership verification with
|
|
1261
|
+
post-check `probeProcessOwner` TOCTOU protection (`verifySupervisedProcess`,
|
|
1262
|
+
`parseProcNetUnixListeningSockets`). A socket path is matched by the
|
|
1263
|
+
filesystem node it resolves to (read with `ss`), so a listener whose name was
|
|
1264
|
+
unlinked does not own the path another process took, and a server that binds
|
|
1265
|
+
one name and publishes another by hard link owns the published one. A socket
|
|
1266
|
+
counts only where `/proc/net/unix` and `ss` agree on it — an `@abstract` name
|
|
1267
|
+
included, which now needs `ss` too — and every line of both tables must be a
|
|
1268
|
+
record: a socket name holding a line break, which would write records of its own,
|
|
1269
|
+
makes the check `socket-unverifiable`; the `ss` name field is read greedily, so a
|
|
1270
|
+
name that spells another socket's node does not claim it. Any other character is
|
|
1271
|
+
part of the name — a carriage return, U+2028, U+2029, a trailing space.
|
|
1272
|
+
Installing a systemd unit refuses a name systemd loads from another file or
|
|
1273
|
+
has masked (`FOREIGN_FRAGMENT`, checked before the write and again after
|
|
1274
|
+
`daemon-reload`) and a `Type=oneshot` unit (`UNSUPPORTED_UNIT_TYPE`);
|
|
1275
|
+
reloading a launchd job refuses a plist whose `Label` is not the job's, and a
|
|
1276
|
+
job of that label loaded from another plist (`FOREIGN_FRAGMENT`, before
|
|
1277
|
+
`bootout`). The path a manager reports is compared with `plistPath` or
|
|
1278
|
+
`unitPath` after resolving the links in their directories, so a file under a
|
|
1279
|
+
linked directory — `/tmp` → `/private/tmp`, `/var`, `/etc` on macOS — is the job's
|
|
1280
|
+
or unit's own; a link at the path itself is still refused. `checkSystemdUnit`
|
|
1281
|
+
reports it as `fragmentIsUnitPath`, and `verifySupervisedProcess` matches
|
|
1282
|
+
`expectedExe` against the kernel's fully resolved executable path. Host adapters
|
|
1283
|
+
carry `canonicalPath(path)` and the process identity adapter
|
|
1284
|
+
`resolveExecutablePath(path)`; a custom adapter implements them. `checkSystemdUnit` answers `missing` only when nothing else
|
|
1285
|
+
answers for the name: a vendor, transient or generated unit, or one loaded
|
|
1286
|
+
with no unit file, is `fragment-mismatch`. Both roll back to the bytes that
|
|
1287
|
+
were there and to the state the service was in: a stopped unit stays stopped,
|
|
1288
|
+
the enable links of the unit and of the units its `[Install]` names in `Also=` are
|
|
1289
|
+
read before an `enable`, and every link it added is removed again — whatever the
|
|
1290
|
+
`[Install]` text says, and also after an `enable` or `bootstrap` that answered an
|
|
1291
|
+
error — the links must then be the ones found before and `is-enabled` must read
|
|
1292
|
+
the state found then; a launchd job ends loaded or not loaded as it was found; a
|
|
1293
|
+
rollback reports `rolledBack: true` only when every step of it succeeded.
|
|
1294
|
+
Host commands run by absolute path (`/usr/bin/systemctl`, `/bin/launchctl`,
|
|
1295
|
+
`/usr/bin/plutil`, iproute2 `ss` at `/usr/bin/ss` or `/usr/sbin/ss`) with a
|
|
1296
|
+
declared environment (`PATH=/usr/sbin:/usr/bin:/sbin:/bin`, `HOME`,
|
|
1297
|
+
`XDG_RUNTIME_DIR`, `DBUS_SESSION_BUS_ADDRESS`); a socket check on a host
|
|
1298
|
+
without `ss`, or whose socket table cannot be read, answers
|
|
1299
|
+
`runtime-unavailable` with reason `socket-unverifiable`. The executable
|
|
1300
|
+
of `execStart` and `execStartPre` may not begin with a systemd prefix
|
|
1301
|
+
(`-`, `@`, `:`, `+`, `!`), and an activated release is writable by its owner
|
|
1302
|
+
only. A relative or unnormalised `unitPath` or `plistPath` (`//`, `/./`, `/../`, a
|
|
1303
|
+
trailing `/`) is `INVALID_CONFIG` before any command. A symbolic link or another
|
|
1304
|
+
non-regular node at `unitPath` or `plistPath` is refused with `FOREIGN_FRAGMENT`
|
|
1305
|
+
(`rolledBack: false`) before anything is read, written or unloaded — the target is
|
|
1306
|
+
not ours to replace — and a rollback puts the previous file back with the mode it
|
|
1307
|
+
had, not the candidate's. Both host adapters carry `inspectPath(path)`
|
|
1308
|
+
(`ServiceHostPathState`: `missing`, `file` with its `mode`, `symlink` with its
|
|
1309
|
+
`target`, `other`, by `lstat`); a custom `SystemdHostAdapter` or
|
|
1310
|
+
`LaunchdHostAdapter` implements it. Activation fsyncs every
|
|
1311
|
+
release file and directory before `current` names the release, and the directory
|
|
1312
|
+
of `current` after each switch. → ADR 0309
|
|
1313
|
+
- `stitchkit/agent-runtime` unified per-step spend accounting
|
|
1314
|
+
(`AgentStepSpendSchema`, `AgentStepSpend`, `AgentStepSpendPhaseSchema`,
|
|
1315
|
+
`AgentStepSpendPhase`) with `AgentRuntimeConfig.onStepSpend`,
|
|
1316
|
+
`onStepSpendError`, and `stepSpendTimeoutMs` (default `5000`). Fires after
|
|
1317
|
+
`provider/response` is persisted for every completed model step (`step`),
|
|
1318
|
+
billed retried attempt (`abandoned-attempt`), and compaction call
|
|
1319
|
+
(`compaction`); non-audited `provider/response` records now persist `usage`,
|
|
1320
|
+
and `observe` `step-finished` events emit from the same fact with `phase`,
|
|
1321
|
+
`attempt`, `provider`, and isolated `spendHookError` diagnostics.
|
|
1322
|
+
`onStepSpendError` is awaited up to the same `stepSpendTimeoutMs` as
|
|
1323
|
+
`onStepSpend`, so a store that hangs both cannot hold the step; a reporter that
|
|
1324
|
+
times out is carried on `step-finished` as `reportFailed` with the timeout as
|
|
1325
|
+
`reportError`.
|
|
1326
|
+
- `stitchkit/cli` `scanCliInvocation` (with `CliInvocationScanOptions`,
|
|
1327
|
+
`CliInvocationScan`, and `CliFrameworkOptions`): single-pass CLI argv scanner
|
|
1328
|
+
backing `createCli`, `routeCliArgv`, `extractCliGlobalOptions`, and early
|
|
1329
|
+
profile notice suppression. → ADR 0310
|
|
1330
|
+
- `stitchkit/files` `writeFileAtomic` and `writeFileAtomicSync` add explicit
|
|
1331
|
+
opt-in `idempotent: true` for `{ replace: false }` (rejected with `TypeError`
|
|
1332
|
+
otherwise): byte-identical existing regular files with matching `0o7777` mode
|
|
1333
|
+
succeed without replacing the inode, using `O_NOFOLLOW`, 1 bounded
|
|
1334
|
+
`EEXIST → ENOENT` retry, staged cleanup and directory sync; `readRegularFile`
|
|
1335
|
+
now also detects `mode` changes during its retry check. → ADR 0312
|
|
1336
|
+
- `stitchkit/service-host` adds `startConfigReloader` and
|
|
1337
|
+
`createPolledJsonConfigSource` (`ConfigReloader`, `ConfigReloaderOptions`,
|
|
1338
|
+
`ConfigReloaderShutdownOptions`, `ShutdownTarget` compatible with
|
|
1339
|
+
`bindProcessSignals`): validates new config before stopping the active handle,
|
|
1340
|
+
coalesces burst reloads to 1 pending slot, deduplicates invalid config digests
|
|
1341
|
+
and rolls back on start failure. While nothing is running, each poll starts
|
|
1342
|
+
the last config again, so a transient start failure heals without a file
|
|
1343
|
+
change. A `stop` that outlives `stopTimeoutMs` stays the only `stop` of its
|
|
1344
|
+
handle: later reloads and `shutdown()` wait for it, and the config that waited
|
|
1345
|
+
behind it starts when it ends. `checkSystemdUnit` adds `expectedDigest`,
|
|
1346
|
+
allows trusted `<dir>/service.d/*.conf` and template drop-ins, and handles
|
|
1347
|
+
`LoadState=masked`; `verifySupervisedProcess` re-snapshots `/proc/net/unix`
|
|
1348
|
+
and re-runs `probeProcessOwner` across in-process reloads. → ADR 0312
|
|
1349
|
+
- `stitchkit/observability` adds windowed `createEventLoopDelayMonitor`
|
|
1350
|
+
(`EventLoopDelayMonitorOptions`, `EventLoopDelaySnapshot`) over lazy
|
|
1351
|
+
`perf_hooks.monitorEventLoopDelay` with an O(1) ring buffer, Node empty-histogram
|
|
1352
|
+
and Bun `p99 <= max` guards, and an `unref()` bucket timer; browser-safe
|
|
1353
|
+
`repeatLimited` is also re-exported from root `stitchkit`. → ADR 0312
|
|
1354
|
+
- `stitchkit/application` adds browser-clean exhaustive
|
|
1355
|
+
`formatDiagnosticJournalLockDiagnosis` over `DiagnosticJournalLockDiagnosis`.
|
|
1356
|
+
→ ADR 0312
|
|
1357
|
+
- `stitchkit/service-host` extends macOS `launchd` helpers with `lintLaunchdPlist`,
|
|
1358
|
+
`readLaunchdPlist` (`PLUTIL_PATH`, guarding `Code=257`), `bootoutLaunchdJob`,
|
|
1359
|
+
`ReloadLaunchdJobOptions.validatePlist`, `AssociatedBundleIdentifiers` and
|
|
1360
|
+
`LimitLoadToSessionType`. → ADR 0313
|
|
1361
|
+
- `stitchkit/declaration` `ProjectDeclarationSchema` adds optional strict
|
|
1362
|
+
`starter: { version }` (semantic version recorded by `create-stitchkit` when
|
|
1363
|
+
scaffolding a repository; omitted legitimately by non-starter projects).
|
|
1364
|
+
→ ADR 0311
|
|
1365
|
+
- `stitchkit/service-host/macos` (new, evolving, peer-free server entrypoint)
|
|
1366
|
+
adds fail-closed Developer ID `codesign` (`findDeveloperIds`,
|
|
1367
|
+
`resolveSigningIdentity`, `signBundle`, `verifySignedBundle`, which has
|
|
1368
|
+
`codesign` evaluate a requirement anchored in Apple's root with the Developer
|
|
1369
|
+
ID markers and the team, so a self-made chain carrying Apple's names is
|
|
1370
|
+
refused), strict C11
|
|
1371
|
+
`.app` launcher generation/compilation (`renderMacosLauncherSource`,
|
|
1372
|
+
`compileMacosLauncher`), Apple 824×824 squircle `AppIcon.icns` generation
|
|
1373
|
+
(`generateAppIconIcns`, `renderAppleSquircleSvg`, `assertSafeSvg`), idempotent
|
|
1374
|
+
atomic `.app` bundle installation with `RENAME_SWAP` rollback via Darwin N-API
|
|
1375
|
+
(`ensureSignedBundle`, `swapDirectoriesDarwin`, `renderBundleInfoPlist`,
|
|
1376
|
+
`computeBundleSpecDigest`), streaming LaunchServices maintenance
|
|
1377
|
+
(`registerBundle`, `forgetRegistration`, `scanLsregisterDump`,
|
|
1378
|
+
`forgetStaleRegistrations`, `forgetBuildTree`), and TCC responsibility
|
|
1379
|
+
inspection (`inspectResponsibleProcess`, `verifyProcessSubtreeResponsibility`,
|
|
1380
|
+
`MacosResponsibilityReason`; a native lookup that failed without an errno asks
|
|
1381
|
+
the process table whether the process is gone instead of reading it as `ESRCH`).
|
|
1382
|
+
`createDefaultMacosCommandRunner` runs every command with a declared environment
|
|
1383
|
+
only: `PATH=/usr/bin:/bin:/usr/sbin:/sbin`, the caller's `HOME`, `TMPDIR`,
|
|
1384
|
+
`DEVELOPER_DIR`, `SDKROOT` and `TOOLCHAINS` when set, and the call's `env` on top,
|
|
1385
|
+
so a host tool never sees a secret the process happens to hold.
|
|
1386
|
+
→ ADR 0313
|
|
1387
|
+
- `stitchkit/primitives` `orderKeyBetween`, `isOrderKey`, `OrderKeySchema`, `OrderKeyError`:
|
|
1388
|
+
a fractional order key strictly between two keys (`null` is an open end), sorted by plain
|
|
1389
|
+
string comparison — JavaScript's `<`, `COLLATE "C"`, SQLite's default collation — so a list
|
|
1390
|
+
is never renumbered. The format and, for the same ascending bounds, the keys are those of the
|
|
1391
|
+
`fractional-indexing` package's default alphabets, so keys an application already stores
|
|
1392
|
+
read as well-formed; below the integer next to the smallest one the key carries a fraction
|
|
1393
|
+
where the package returns one it then refuses. Bounds not strictly ascending or not
|
|
1394
|
+
well-formed throw `OrderKeyError` with `reason` `order` or `malformed`. Plain JavaScript,
|
|
1395
|
+
browser- and Hermes-safe.
|
|
1396
|
+
- `stitchkit/realtime` exports `bindRealtimeClient` and its types
|
|
1397
|
+
`RealtimeClientTransport`, `BoundRealtimeClient` and `BindRealtimeClientOptions`
|
|
1398
|
+
(the root's one binding, shared by both entrypoints). A React Native/Hermes app
|
|
1399
|
+
binds a contract to the socket it already created with `createSocketIOClient`,
|
|
1400
|
+
so watched reads and an agent controller share one connection without importing
|
|
1401
|
+
the root entry, whose default peer loader is a computed `import()` the Hermes
|
|
1402
|
+
compiler refuses. The consumer lane walks the installed subpath module by module
|
|
1403
|
+
as Metro does, compiles it with `hermesc` and runs the binding in the Hermes V1 VM.
|
|
1404
|
+
- `stitchkit/server` `signLink` and `verifySignedLink`: a short-lived link for a request that
|
|
1405
|
+
cannot carry a header (`<audio src>`, `<img src>`). `signLink` appends `expires` and an
|
|
1406
|
+
HMAC-SHA-256 `signature` over the method, the path and every query parameter, for 1 second
|
|
1407
|
+
to `MAX_SIGNED_LINK_SECONDS` (seven days); `verifySignedLink(request, { secret })` compares
|
|
1408
|
+
the signature in constant time, then the expiry, and returns `{ ok: true, expiresAt }` or a
|
|
1409
|
+
`reason` (`unsigned`, `malformed`, `forged`, `expired`). Called from `createAuthHook`'s
|
|
1410
|
+
`resolve`, a `rawResponse` endpoint stays behind the auth gate with no guard of its own.
|
|
1411
|
+
Web Crypto only; nothing is stored.
|
|
1412
|
+
- `stitchkit/tools`, `stitchkit/tools/agent`, `stitchkit/tools/mcp`, `stitchkit/contract`
|
|
1413
|
+
`inputRecursionDepth` advertises a tool input with no `$ref`, `definitions` or `$defs`.
|
|
1414
|
+
Some model providers refuse a whole request when one tool carries a reference cycle
|
|
1415
|
+
(`z.lazy`, `z.json()`), others never read a definition behind `allOf: [{ $ref }]`. With
|
|
1416
|
+
the option every reference is written out in place, each recursive definition is
|
|
1417
|
+
unrolled the declared number of levels, and the last level becomes an open node typed by
|
|
1418
|
+
every JSON type the definition accepts (`{ type: 'object' }`, `{ type: 'array', items: {} }`,
|
|
1419
|
+
or an `anyOf` of them), so the document still accepts every value the contract does; the
|
|
1420
|
+
handler parses the contract's own recursive schema. Declare it on a surface — `mountAgent`,
|
|
1421
|
+
`mountMcp`, `buildMcpServer`, `createMcpHandler`, `validateMcpSchemas`, `buildToolManifest`,
|
|
1422
|
+
`describeToolCatalog`, `collectTools`, `createToolInvoker`,
|
|
1423
|
+
`createDeferredAgentToolSurface` and `buildSurfaceManifest` (`toolSurfaces.AGENT`, `mcpPreparation`) — and per tool
|
|
1424
|
+
in the endpoint's `tool` group, where `tool.inputRecursionDepth` wins over the surface's
|
|
1425
|
+
value. A value that is not a positive integer is refused where it is declared. With the
|
|
1426
|
+
option, an `allowUntyped` path for a property inside a recursive definition is reported
|
|
1427
|
+
from its full path. Without it every document is unchanged, byte for byte.
|
|
1428
|
+
`mountAgent(services, { access, inputRecursionDepth: 1 })`;
|
|
1429
|
+
`tool: { name: 'formula_create', inputRecursionDepth: 3 }`. → ADR 0319
|
|
1430
|
+
|
|
1431
|
+
### Changed
|
|
1432
|
+
|
|
1433
|
+
- `stitchkit/agent-runtime/browser` `createAgentController` keeps the last
|
|
1434
|
+
snapshot on screen across a reconnect, where it showed an empty view, until the
|
|
1435
|
+
new attach answers; that answer replaces it whatever its version.
|
|
1436
|
+
**Affects:** `stitchkit/agent-runtime/browser` createAgentController
|
|
1437
|
+
- `stitchkit/observability` `createSpooledSink` keeps its spool file `0o600`
|
|
1438
|
+
(an existing file is narrowed too) and bounded — `maxPendingEntries` (default
|
|
1439
|
+
10 000) and `maxFileBytes` (default 64 MiB, compacting first; → ADR 0323, and what
|
|
1440
|
+
a writer sees at a bound is under ⚠️ Breaking changes) — closes off a
|
|
1441
|
+
line torn by a crash before appending, and keeps a line it cannot decode
|
|
1442
|
+
through compaction instead of erasing it. Compaction replaces the file
|
|
1443
|
+
atomically and leaves no temporary file behind when the rename fails. What
|
|
1444
|
+
`recover()` does with a file past `maxFileBytes`, or one it cannot read, is under
|
|
1445
|
+
⚠️ Breaking changes ([migration](docs/guide/upgrading.md#spool-file-over-its-bound)).
|
|
1446
|
+
The spool mechanism is shared with
|
|
1447
|
+
`stitchkit/spend`.
|
|
1448
|
+
**Affects:** `stitchkit/observability` createSpooledSink(behaviour), SpooledSinkConfig
|
|
1449
|
+
|
|
1450
|
+
- Maturity-table breaking-change cadence figures in `docs/guide/getting-started.md`
|
|
1451
|
+
now cover every core entrypoint over the window since `0.94.0`
|
|
1452
|
+
(`BREAKING_METADATA_SINCE`), derived from breaking-item leading entrypoints
|
|
1453
|
+
instead of the previous 0.56.2 keyword list.
|
|
1454
|
+
- `stitchkit/telegram` The outbound budget fails closed: a Bot API method it does
|
|
1455
|
+
not know costs one message instead of nothing, and a 429 on it pauses its chat
|
|
1456
|
+
(or the whole token when no `chat_id` is present). A send method Telegram added
|
|
1457
|
+
after the budget's list was written previously went out unbudgeted into flood
|
|
1458
|
+
waits. Every method and deprecated alias grammY's types name is now classified
|
|
1459
|
+
as a send or as free (`FREE_METHODS`: reads, edits of a sent message,
|
|
1460
|
+
administration, `sendChatAction`, `answerWidgetQuery`, `editSharedWidgetData`),
|
|
1461
|
+
and `sendRichMessageDraft` and `sendChatJoinRequestWebApp` count as sends.
|
|
1462
|
+
→ ADR 0305 (amends ADR 0274)
|
|
1463
|
+
**Affects:** `stitchkit/telegram` behaviour
|
|
1464
|
+
- `stitchkit/cli` `CliSurfaceSource` factories (`services` and `runtimeTools`)
|
|
1465
|
+
now receive `(auth, globals)` so a local CLI can compute a variant's unix
|
|
1466
|
+
socket path from parsed global options. Its exit codes for a unix-socket failure
|
|
1467
|
+
are under ⚠️ Breaking changes ([migration](docs/guide/upgrading.md#cli-unix-delivery-exit-codes)).
|
|
1468
|
+
- `stitchkit/cli` removed the ADR 0296 transitional exit-2 refusal for leading
|
|
1469
|
+
framework flags before a native command in a CLI with a managed factory and no
|
|
1470
|
+
`defaultCommand`; leading framework flags now route identically across all CLI
|
|
1471
|
+
profiles. → ADR 0310 (amends ADR 0296)
|
|
1472
|
+
**Affects:** `stitchkit/cli` behaviour
|
|
1473
|
+
- `release:check` refuses an `**Affects:**` line that names an export its entrypoint does not
|
|
1474
|
+
have, from 0.127.0 on. A breaking item's names are looked up in the tree's export snapshot and
|
|
1475
|
+
in the previous core release, since a breaking change may remove the export it names; a fix's
|
|
1476
|
+
names in the tree only, since a fix ships in this release and removes nothing. A misspelt or
|
|
1477
|
+
stale name never matches a consumer's import in `stitchkit upgrade`; the refusal lists each one
|
|
1478
|
+
with where the name is exported now.
|
|
1479
|
+
- Signals are linked one way across the framework: the durability parks and effects, the
|
|
1480
|
+
directory inbox, change subscriptions, the surface probes, file inspection, the OpenRouter
|
|
1481
|
+
catalog and spend reads, model invocations, authorization hooks and each provider attempt of a
|
|
1482
|
+
run link a caller's signal for as long as their work runs and detach from it when it ends,
|
|
1483
|
+
instead of `AbortSignal.any`, whose listeners some runtimes keep on a long-lived source until it
|
|
1484
|
+
aborts.
|
|
1485
|
+
|
|
1486
|
+
### Fixed
|
|
1487
|
+
|
|
1488
|
+
- `stitchkit/agent-runtime/harness` control replies no longer leave an unobserved
|
|
1489
|
+
rejection of the run result behind when the run fails.
|
|
1490
|
+
**Affects:** `stitchkit/agent-runtime/harness` createAgentHarnessControlServer
|
|
1491
|
+
- `stitchkit/agent-runtime/harness` `stitchkit/agent-runtime/realtime` a control
|
|
1492
|
+
request the harness rejects still answers `REQUEST_REJECTED`, and its cause now
|
|
1493
|
+
reaches `onError` (new on `AgentHarnessControlServerConfig`;
|
|
1494
|
+
`AgentHarnessRealtimeConfig` inherits it, so its `onError` also sees rejected
|
|
1495
|
+
requests), else `console.error`; it was dropped.
|
|
1496
|
+
**Affects:** `stitchkit/agent-runtime/harness` createAgentHarnessControlServer(onError); `stitchkit/agent-runtime/realtime` bindAgentHarnessRealtime(onError)
|
|
1497
|
+
- `stitchkit/agent-runtime/realtime` `bindAgentHarnessRealtime` keeps no entry per
|
|
1498
|
+
revoked conversation on a socket: `revoke()` without `matches` added one to every
|
|
1499
|
+
socket, never removed. A revoke now marks only the authorizations in flight.
|
|
1500
|
+
**Affects:** `stitchkit/agent-runtime/realtime` bindAgentHarnessRealtime(behaviour)
|
|
1501
|
+
- `stitchkit/tools` `resolveMedia`, `mountViewFile` and `defineViewFileTool` cancel
|
|
1502
|
+
the body of a URL answered with a status that is not 2xx before refusing it with
|
|
1503
|
+
`VIEW_HTTP_ERROR`, as they already did for a video or an oversized answer, so the
|
|
1504
|
+
pinned connection is released at once instead of when the response is collected.
|
|
1505
|
+
**Affects:** `stitchkit/tools` resolveMedia(behaviour), mountViewFile(behaviour), defineViewFileTool(behaviour)
|
|
1506
|
+
|
|
1507
|
+
- `stitchkit` `createHttpClient` on Bun repeats a `GET` whose connection closed
|
|
1508
|
+
before any answer came (`ECONNRESET`, `ConnectionClosed`), as it always did for a
|
|
1509
|
+
refused one. The transport retry promised for network failures recognised only a
|
|
1510
|
+
refused connection there, so a host that restarted mid-call failed every read.
|
|
1511
|
+
Both `createClient` and `createHttpClient` now also classify
|
|
1512
|
+
`UnixClientTransportError` by code and delivery state — retrying idempotent
|
|
1513
|
+
calls only on `UNIX_CONNECT_FAILED` (`not-dispatched`) and
|
|
1514
|
+
`UNIX_DELIVERY_UNCERTAIN` (`possibly-dispatched`) and never retrying
|
|
1515
|
+
`UNIX_RESPONSE_TOO_LARGE` or other post-response failures — while on Node
|
|
1516
|
+
`createUnixClientTransport` classifies `HPE_*` parser failures as
|
|
1517
|
+
`UNIX_RESPONSE_ABORTED` (`response-received`) and in-flight `close()` as
|
|
1518
|
+
`UNIX_CLIENT_CLOSED` without retrying.
|
|
1519
|
+
**Affects:** `stitchkit` behaviour; `stitchkit/server` createUnixClientTransport; `stitchkit/node` createUnixClientTransport
|
|
1520
|
+
- `stitchkit/server` `createServer({ unix })` no longer removes a live sibling's
|
|
1521
|
+
unix socket on concurrent starts or shutdown: startup probe, reclaim and bind
|
|
1522
|
+
serialize under a per-socket lock, publish via an atomic staged hard link so
|
|
1523
|
+
Bun's `server.stop()` never unlinks a replaced path, unlink only the `(dev, ino)`
|
|
1524
|
+
recorded at bind time, treat only `ECONNREFUSED` and `ENOENT` as stale (refusing
|
|
1525
|
+
`ENAMETOOLONG`, `EINVAL`, `EACCES` and probe errors without unlinking), and run
|
|
1526
|
+
the liveness probe via `process.execPath` with `BUN_BE_BUN=1` and
|
|
1527
|
+
`--config=/dev/null` so compiled binaries work without `bun` on `PATH` and
|
|
1528
|
+
without `bunfig.toml`/`BUN_OPTIONS` interference. The staging name of the hard
|
|
1529
|
+
link fits the platform's `sun_path` (at most 107 bytes on Linux, 103 on Darwin).
|
|
1530
|
+
The startup lock (`.<name>.lock` beside the socket) records and judges its holder
|
|
1531
|
+
by the exclusive lock's rule, not a bare PID: the record names this machine and
|
|
1532
|
+
one process lifetime, so a lock left by a process that has exited, whose PID now
|
|
1533
|
+
names a different process, or whose boot is over is taken at once, under a guard
|
|
1534
|
+
file that lets only one start take it, and a holder that is still running is
|
|
1535
|
+
waited for (5 s). A lock with no readable owner record is taken once it is 30 s
|
|
1536
|
+
old. On macOS the lock loads the packaged Darwin addon for process identity, like
|
|
1537
|
+
`withExclusiveLock`. A failure to remove the lock after the socket is bound
|
|
1538
|
+
(`EIO`, `EBUSY`, …) is logged with its cause and does not replace the outcome:
|
|
1539
|
+
`createServer` returns the listening server, and the next start takes the lock
|
|
1540
|
+
this process left with no descriptor open on it.
|
|
1541
|
+
**Affects:** `stitchkit/server` createServer(unix)
|
|
1542
|
+
- `stitchkit/server` Malformed percent-encoding in URL query parameters now
|
|
1543
|
+
answers `400 BAD_REQUEST` instead of crashing with an uncaught `URIError`
|
|
1544
|
+
(500) on React Native / Hermes and Node/Bun. → ADR 0307
|
|
1545
|
+
**Affects:** `stitchkit/server` createHandler; `stitchkit/node` createHandler; `stitchkit/handler` createHandler
|
|
1546
|
+
- `stitchkit/files` declarations resolve without `@types/node`: `fileIdentity`
|
|
1547
|
+
and the `accept` callback of `readRegularFileSync` take `FileIdentityStats`
|
|
1548
|
+
and `FileStatsView`, which `fs.Stats` and `fs.BigIntStats` satisfy, instead of
|
|
1549
|
+
naming `node:fs`; a project that type-checks without Node types can import the
|
|
1550
|
+
entrypoint again. The two types are exported from `stitchkit/files`.
|
|
1551
|
+
**Affects:** `stitchkit/files` fileIdentity, readRegularFileSync, FileIdentityStats, FileStatsView
|
|
1552
|
+
- `stitchkit/http` a call that outlives its `timeout` rejects with
|
|
1553
|
+
`REQUEST_TIMEOUT` in React Native. The timeout aborted with a `DOMException`,
|
|
1554
|
+
a global React Native does not have, so the timer threw and the call never
|
|
1555
|
+
settled; uploads and aborted streams raised the same error the same way.
|
|
1556
|
+
Abort and timeout errors are now an `Error` named `AbortError` or
|
|
1557
|
+
`TimeoutError` wherever `DOMException` is missing. An upload that reports
|
|
1558
|
+
progress (`onUploadProgress`) no longer requires the `TextEncoder` and
|
|
1559
|
+
`ReadableStream` globals. Reading a Unicode JSON reply with upload progress
|
|
1560
|
+
enabled preserves the same text as the ordinary call; binary replies stay bytes.
|
|
1561
|
+
**Affects:** `stitchkit/http` behaviour; `stitchkit` behaviour
|
|
1562
|
+
- `stitchkit` `createSessionScope` starts an operation in React Native and on a
|
|
1563
|
+
page served over plain HTTP: the operation id no longer comes from
|
|
1564
|
+
`crypto.randomUUID`, which neither has, so `login()` no longer throws there.
|
|
1565
|
+
A refresh that outlives `refreshTimeoutMs` rejects with a `TimeoutError`.
|
|
1566
|
+
**Affects:** `stitchkit` createSessionScope, createSessionCredentials
|
|
1567
|
+
- `stitchkit/tools/connections` OpenAPI 3.0 `nullable: true` now validates `null`
|
|
1568
|
+
(passing `dialect: 'openapi-3.0'` for OpenAPI 3.0.x specs and normalizing
|
|
1569
|
+
`nullable: true` for MCP and 2020-12 schemas). → ADR 0310
|
|
1570
|
+
**Affects:** `stitchkit/tools/connections` behaviour
|
|
1571
|
+
- `stitchkit/tools/connections` discovered tools using `not`, `if`/`then`/`else`,
|
|
1572
|
+
`dependentRequired`, `dependentSchemas`, `unevaluatedProperties`,
|
|
1573
|
+
`unevaluatedItems`, or draft-07 `dependencies` now mount instead of being
|
|
1574
|
+
dropped, stripping those keywords locally and delegating enforcement to the
|
|
1575
|
+
remote server via `markRemoteSchemaVerdict`. → ADR 0310
|
|
1576
|
+
**Affects:** `stitchkit/tools/connections` behaviour
|
|
1577
|
+
- `stitchkit/cli` invalid inline boolean framework flags such as `--quiet=maybe`
|
|
1578
|
+
now refuse with exit code 2 before any profile notice is printed (instead of
|
|
1579
|
+
silently evaluating to `false` in early notice checks). → ADR 0310
|
|
1580
|
+
**Affects:** `stitchkit/cli` behaviour
|
|
1581
|
+
- `stitchkit/cli` boolean flag words (`true`/`false`, `TRUE`/`FALSE`) are now
|
|
1582
|
+
matched case-insensitively across routing, framework flags, application
|
|
1583
|
+
globals, and command fields so `--quiet TRUE cmd` routes to `cmd` consistently.
|
|
1584
|
+
→ ADR 0310
|
|
1585
|
+
**Affects:** `stitchkit/cli` behaviour
|
|
1586
|
+
- `stitchkit/agent-runtime` `branchConversation` carries the runtime's own
|
|
1587
|
+
records by their type. A conversation whose ledger held model invocation
|
|
1588
|
+
records (`invocations`) could not be branched at all, and one whose history
|
|
1589
|
+
held a deferred tool selection receipt or an event search call branched only
|
|
1590
|
+
when the host declared the runtime's reference names with
|
|
1591
|
+
`sourceIdentity: 'retain'`. Invocation records now cross as inert receipts that
|
|
1592
|
+
still name the conversation and run that made the call, without the encrypted
|
|
1593
|
+
payload body; a tool selection receipt follows its run; what `session_search`,
|
|
1594
|
+
`session_trace` and `session_event` were asked and answered crosses as the
|
|
1595
|
+
model read it, payload bodies removed. An event kind without a branch rule no
|
|
1596
|
+
longer compiles. → ADR 0300
|
|
1597
|
+
**Affects:** `stitchkit/agent-runtime` behaviour
|
|
1598
|
+
- `stitchkit/agent-runtime` `branchConversation` reads a child's events through
|
|
1599
|
+
the schema the child manager writes them with, so their usage and stop fields
|
|
1600
|
+
(`usage`, `overrun`, `policyName`, `enforced`, `stopDurationMs`) no longer fail
|
|
1601
|
+
the branch with `ZodError: unrecognized_keys`: a conversation whose children
|
|
1602
|
+
reported usage or were stopped can be branched. A spill is read back and exported through
|
|
1603
|
+
the one archive spill schema instead of a looser copy, so a malformed stored
|
|
1604
|
+
spill (an `authorization` of `false`) is refused instead of travelling into an
|
|
1605
|
+
archive.
|
|
1606
|
+
**Affects:** `stitchkit/agent-runtime` AgentRuntimeStore(branchConversation), AgentRuntimeStore(planConversationBranch), createAgentRuntimeStore(branchConversation), createMemoryAgentRuntimeStore(branchConversation), createAgentSpillStore
|
|
1607
|
+
- `stitchkit/agent-runtime` `createAgentChildManager` no longer writes `stopped`
|
|
1608
|
+
over a child that finished while it was being stopped. A host that answers a
|
|
1609
|
+
stop by finishing the child resolved its result before the stop returned, and
|
|
1610
|
+
`stopChildren` or `interruptChild` then rewrote the finished row to `stopped`,
|
|
1611
|
+
dropped its `resultReference` and journalled a second terminal state. A child
|
|
1612
|
+
now moves out of `spawned`/`running` in one write transaction that reads and
|
|
1613
|
+
updates the row, and the event is appended only when the row moved, on SQLite
|
|
1614
|
+
and Postgres, from one process or two; a result that arrived before the stop
|
|
1615
|
+
returned is recorded first. A late `recordStepUsage` of an ended child is still
|
|
1616
|
+
counted, and its event names the state the row is in rather than `running`.
|
|
1617
|
+
**Affects:** `stitchkit/agent-runtime` createAgentChildManager(stopChildren, interruptChild, recordStepUsage)
|
|
1618
|
+
- `stitchkit/agent-runtime` `interruptChild` and the cleanup of a spawn whose
|
|
1619
|
+
record failed ask the child's host to stop within the same stop bound as
|
|
1620
|
+
`stopChildren`: a host that never answered held the `interrupt_child` tool and
|
|
1621
|
+
`spawnChild` forever, and a host that threw escaped `interruptChild` with the
|
|
1622
|
+
child left live. An unconfirmed stop records `lost` with `reason`
|
|
1623
|
+
(`stop-timeout`, `stop-failed`, or `unreachable` for a cascade over a child this
|
|
1624
|
+
process cannot reach), not `stopped`; `waitChild` resolves once a stop has
|
|
1625
|
+
recorded how the child ended — `stopped`, or `lost` for a host that did not confirm
|
|
1626
|
+
or could not be reached — also for a waiter that came before the stop, such as the
|
|
1627
|
+
`subagent` tool, without waiting for a host that never reports a result, and a
|
|
1628
|
+
failed spawn cleanup rejects with an `AggregateError` of the record
|
|
1629
|
+
failure (also its `cause`) and each cleanup failure. A child-budget stop asks the
|
|
1630
|
+
child's stop policy once within the bound (a policy that threw or timed out was
|
|
1631
|
+
asked again, doubling the wait), and its journal entry says `enforced` as the
|
|
1632
|
+
stop ended. A child-budget stop the host confirms records the child `stopped`, as
|
|
1633
|
+
an interrupt does: `recordStepUsage` returned `enforced: true` and left the row
|
|
1634
|
+
`running`, so the child held its place under `maxActiveChildren` until its host
|
|
1635
|
+
reported a result, and the next spawn was refused. Stops that meet on one child
|
|
1636
|
+
while its host is answering — an interrupt and the parent's cascade, a budget stop
|
|
1637
|
+
and either — share one delivery: the host is asked once and each records the same
|
|
1638
|
+
outcome, where a second stop asked the host again and a quick refusal of it could
|
|
1639
|
+
record `lost` over a stop still being confirmed.
|
|
1640
|
+
**Affects:** `stitchkit/agent-runtime` createAgentChildManager(interruptChild, spawnChild, stopChildren, waitChild, recordStepUsage), agentChildBudgetStopPolicy(behaviour), createAgentChildTools(behaviour)
|
|
1641
|
+
- `stitchkit/agent-runtime` `createAgentChildManager` stops a child whatever point of
|
|
1642
|
+
its spawn the parent's stop meets. `stopChildren` found a child whose row was
|
|
1643
|
+
written but whose handle was not yet held and recorded it `lost` (`unreachable`)
|
|
1644
|
+
while it kept running and spending; earlier still — while the spawn checked the
|
|
1645
|
+
limit, asked `remainingBudget` or read the seed history — it did not see the child
|
|
1646
|
+
at all, and the spawn went on to start it. A spawn is now visible to a stop from its
|
|
1647
|
+
first line: stopped before the host is asked to start the child, `spawnChild`
|
|
1648
|
+
rejects and no child exists; stopped after, the child is stopped through
|
|
1649
|
+
`stopPolicy` as soon as its handle is held and `spawnChild` returns the state that
|
|
1650
|
+
stop recorded. `stopChildren` waits for a spawn in flight within the stop bound. The
|
|
1651
|
+
`subagent` and `subagent_fork` tools of a run whose signal has aborted refuse before
|
|
1652
|
+
spawning.
|
|
1653
|
+
**Affects:** `stitchkit/agent-runtime` createAgentChildManager(spawnChild, stopChildren), createAgentChildTools(behaviour)
|
|
1654
|
+
- `stitchkit/agent-runtime` `createAgentChildManager` keeps one blocking relay queue
|
|
1655
|
+
per parent. There was one queue for every parent, so a child host that never
|
|
1656
|
+
answered held `listChildBlocking` and `respondToChildBlocking` of every other
|
|
1657
|
+
parent too.
|
|
1658
|
+
**Affects:** `stitchkit/agent-runtime` createAgentChildManager(behaviour)
|
|
1659
|
+
- `stitchkit/agent-runtime` a streaming tool (`async *execute`) records one
|
|
1660
|
+
`tool-result` and one `completed` tool status — its final value. Each
|
|
1661
|
+
intermediate value was persisted as another result of the same call. Under
|
|
1662
|
+
`stepBarriers.toolDependencies` an `execute` that returns a promise of an async
|
|
1663
|
+
iterable ends in its last value too, whether or not the call waited for another.
|
|
1664
|
+
**Affects:** `stitchkit/agent-runtime` createAgentRuntime(behaviour)
|
|
1665
|
+
- `stitchkit/cli` a value piped on stdin into a positional field
|
|
1666
|
+
(`commandSettings.<command>.positionals`) that the field cannot take (`---`,
|
|
1667
|
+
`--hello`, or `abc` for a number) is refused with exit code `2` on native,
|
|
1668
|
+
managed and discovered commands alike, instead of an uncaught
|
|
1669
|
+
`CliArgumentError`.
|
|
1670
|
+
**Affects:** `stitchkit/cli` createCli
|
|
1671
|
+
- `stitchkit/cli` a field declared with `.readonly()` parses and shows as the
|
|
1672
|
+
schema it wraps — a boolean is a flag, a number is coerced, a view column is
|
|
1673
|
+
found — as it does without `.readonly()`, and `--no-<name>` sets a boolean
|
|
1674
|
+
`<name>` to `false` only when no field is itself named `no-<name>`.
|
|
1675
|
+
**Affects:** `stitchkit/cli` createCli, createCliInvoker, parseCliArgs
|
|
1676
|
+
- `stitchkit` `createSessionCredentials().login()` whose `storage.write()` fails
|
|
1677
|
+
or times out leaves no session behind: the scope is cleared, its timers are
|
|
1678
|
+
stopped and `read()` no longer returns credentials that were never stored. A
|
|
1679
|
+
`login()` or `logout()` that replaced the operation in the meantime is left
|
|
1680
|
+
as it is. Storage is cleared too, of the stored session the login replaced, so
|
|
1681
|
+
a restart no longer restores the previous account the app saw signed out (what
|
|
1682
|
+
`login()` rejects with when that clear fails too is under ⚠️ Breaking changes).
|
|
1683
|
+
**Affects:** `stitchkit` createSessionCredentials, SessionCredentials(login)
|
|
1684
|
+
- `stitchkit`, `stitchkit/http` a long-lived caller signal no longer collects one
|
|
1685
|
+
listener per request on React Native, whose `AbortSignal.any` keeps its
|
|
1686
|
+
listeners until a source aborts. A request's link to the caller is released when
|
|
1687
|
+
the call settles, a stream's when the stream ends, the session refresh
|
|
1688
|
+
deadline's when the exchange settles. A caller abort still ends a stream or raw
|
|
1689
|
+
body that outlived its open.
|
|
1690
|
+
**Affects:** `stitchkit` createClient(behaviour), createHttpClient(behaviour), createSessionCredentials(refresh); `stitchkit/http` createClient(behaviour), createHttpClient(behaviour)
|
|
1691
|
+
- `stitchkit/tools/mcp` runtime tools take the surface's `flattenUnionInput` on
|
|
1692
|
+
MCP, as contract tools do: `buildMcpServer` / `createMcpHandler` prepared
|
|
1693
|
+
runtime tools (discovered connection tools included) without it, so a
|
|
1694
|
+
discriminated union in a runtime tool's input was listed as `oneOf` while
|
|
1695
|
+
`buildSurfaceManifest` showed it flattened.
|
|
1696
|
+
**Affects:** `stitchkit/tools/mcp` buildMcpServer, createMcpHandler
|
|
1697
|
+
- `stitchkit/tools/mcp` the `requireTypedProperties` refusal that recommends
|
|
1698
|
+
`z.json()` now says that its schema refers to itself and that a surface whose
|
|
1699
|
+
model provider refuses recursive schemas also sets `inputRecursionDepth`.
|
|
1700
|
+
**Affects:** `stitchkit/tools/mcp` validateMcpSchemas, createMcpHandler, mountMcp
|
|
1701
|
+
- `stitchkit/server`, `stitchkit/node` `createUnixClientTransport` rejects a call
|
|
1702
|
+
with `UNIX_CLIENT_CLOSED` when `close()` lands while the request body is being
|
|
1703
|
+
read (`not-dispatched`, nothing is sent) or after the request went out
|
|
1704
|
+
(`response-received`), on Bun and Node. It checked `closed` only before reading
|
|
1705
|
+
the body and sent the request anyway.
|
|
1706
|
+
**Affects:** `stitchkit/server` createUnixClientTransport; `stitchkit/node` createUnixClientTransport
|
|
1707
|
+
- `stitchkit/files` `createChunkSpool` publishes a spool file once through the
|
|
1708
|
+
atomic writer with mode `0o600`, and a failure to remove its staging file no
|
|
1709
|
+
longer replaces the outcome of the publish.
|
|
1710
|
+
**Affects:** `stitchkit/files` createChunkSpool
|
|
1711
|
+
- `stitchkit/telegram/html` parses markup in time linear in its length and no
|
|
1712
|
+
longer overflows the stack on deep nesting: `sanitizeTelegramHtml` of 16 000
|
|
1713
|
+
nested `<b>` threw `RangeError`, and a tag with a long run of spaces, a long
|
|
1714
|
+
run of line breaks, or thousands of open `<span>`s took seconds. An element
|
|
1715
|
+
nested more than 32 deep keeps its words and loses its tag. `splitTelegramHtml`
|
|
1716
|
+
and `truncateTelegramHtml` measure the tree once instead of walking and
|
|
1717
|
+
re-measuring it for each part, so a long text cut into many parts no longer
|
|
1718
|
+
takes time that grows with both (400 000 characters of markup cut at 64: 2.4 s →
|
|
1719
|
+
0.17 s). The parts are unchanged.
|
|
1720
|
+
**Affects:** `stitchkit/telegram/html` parseTelegramHtml, sanitizeTelegramHtml, splitTelegramHtml, truncateTelegramHtml, checkTelegramHtml
|
|
1721
|
+
- `stitchkit/telegram` `stitchkit/telegram/grammy` `stitchkit/files` `stitchkit/tools`
|
|
1722
|
+
`stitchkit/tools/connections` `stitchkit/agent-runtime` a signal aborted without a
|
|
1723
|
+
reason fails a wait with an
|
|
1724
|
+
`AbortError`, never with `undefined` or a substitute error: in `telegramOutboundBudget`
|
|
1725
|
+
and `callTelegramBotApi`, the grammY `telegramBudgetTransformer`
|
|
1726
|
+
(`'The operation was aborted'`, was `'This operation was aborted'`), the managed file
|
|
1727
|
+
boundary, `withExclusiveLock` (also while its machine identity command runs), the
|
|
1728
|
+
view-file tool (was the read error) and agent-runtime compaction.
|
|
1729
|
+
`createTelegramBotTransport` parsed the bytes received so far as the answer; it now
|
|
1730
|
+
rejects with an `AbortError`. An MCP connection over SSE closes an aborted request's
|
|
1731
|
+
session with the signal's reason, an `AbortError` when it has none, instead of a
|
|
1732
|
+
generic session-closed error. A platform `AbortController` always gives a reason,
|
|
1733
|
+
so only a hand-made signal-like object sees this.
|
|
1734
|
+
**Affects:** `stitchkit/telegram` telegramOutboundBudget(behaviour), callTelegramBotApi(behaviour), createTelegramBotTransport(behaviour); `stitchkit/telegram/grammy` telegramBudgetTransformer(behaviour); `stitchkit/files` createManagedFileBoundary(behaviour), withExclusiveLock(behaviour); `stitchkit/tools` defineViewFileTool(behaviour), mountViewFile(behaviour); `stitchkit/tools/connections` defineMcpClientConnection(behaviour); `stitchkit/agent-runtime` behaviour
|
|
1735
|
+
- `stitchkit/observability` `createSpooledSink`: a record written while `recover()`
|
|
1736
|
+
ran and refused by the store was dropped from memory when the replay finished, so
|
|
1737
|
+
the next record of its group could reach the store first; it now stays undelivered
|
|
1738
|
+
behind what the file still owes. A spooled spend ledger shares the spool and keeps
|
|
1739
|
+
the same order.
|
|
1740
|
+
**Affects:** `stitchkit/observability` createSpooledSink(behaviour)
|
|
1741
|
+
- `stitchkit/application` a managed schedule whose period, first delay or drain
|
|
1742
|
+
deadline is past 2147483647 ms waits for it in steps of that ceiling instead of a
|
|
1743
|
+
timer that fired at once — `createManagedSchedule({ everyMs })` of more than 24.8
|
|
1744
|
+
days used to tick at once.
|
|
1745
|
+
**Affects:** `stitchkit/application` createManagedSchedule(everyMs, startAfterMs)
|
|
1746
|
+
- `stitchkit/application` the application kernel waits for a force deadline — the
|
|
1747
|
+
grace period plus the force timeout — in steps of the longest a timer holds. With
|
|
1748
|
+
both budgets near 2147483647 ms their sum fired at once and aborted the close of a
|
|
1749
|
+
startup rollback, a restart, or the force of a shutdown forced by its signal, before
|
|
1750
|
+
either budget had run.
|
|
1751
|
+
**Affects:** `stitchkit/application` createApplication(behaviour)
|
|
1752
|
+
- `stitchkit` `stitchkit/http` `uploadInChunks` doubles its retry pause up to
|
|
1753
|
+
2147483647 ms instead of past it, where the timer fired at once and the repeats of a
|
|
1754
|
+
part ran back to back.
|
|
1755
|
+
**Affects:** `stitchkit` uploadInChunks(retryDelayMs); `stitchkit/http` uploadInChunks(retryDelayMs)
|
|
1756
|
+
- `stitchkit/tools/mcp` `stitchkit/server` the request line of an MCP endpoint
|
|
1757
|
+
(`createMcpHandler` mounted by `createMcpHttpRoute`) logs the `405` it answers to
|
|
1758
|
+
the `GET` that opens a Streamable HTTP event stream, and to the `DELETE` that ends
|
|
1759
|
+
a session, at `info` instead of `warn`: the protocol names `405` as the answer
|
|
1760
|
+
"not offered here" and the official client carries on. The handler marks such a
|
|
1761
|
+
response and the line reads the mark, never a path or method, so the `401` of a
|
|
1762
|
+
missing token, a `405` to any other method and every other `4xx` stay `warn`, and
|
|
1763
|
+
a `5xx` stays `error`; the line's format and fields are unchanged, on the built-in
|
|
1764
|
+
sink and on `logging.logger`.
|
|
1765
|
+
**Affects:** `stitchkit/tools/mcp` createMcpHandler(behaviour), createMcpHttpRoute(behaviour); `stitchkit/server` createServer(behaviour), createHandler(behaviour); `stitchkit/node` createHandler(behaviour); `stitchkit/handler` createHandler(behaviour)
|
|
1766
|
+
|
|
1767
|
+
### Security
|
|
1768
|
+
|
|
1769
|
+
- `stitchkit/agent-runtime` the child and schedule tools act only for the conversation of
|
|
1770
|
+
the run that called them. They took the conversation from the model's input, so a model
|
|
1771
|
+
that knew another conversation's ID could spend that conversation's child budget,
|
|
1772
|
+
message or interrupt its children and place or cancel its schedules; the state and event
|
|
1773
|
+
search tools read a conversation nothing tied to the run. The change and its migration
|
|
1774
|
+
are the breaking item on `createAgentChildTools` above
|
|
1775
|
+
([migration](docs/guide/upgrading.md#runtime-tools-take-the-run)).
|
|
1776
|
+
**Affects:** `stitchkit/agent-runtime` createAgentChildTools, createAgentScheduleTools, createAgentStateTools, createAgentEventSearchTools
|
|
1777
|
+
- `stitchkit/server` and `stitchkit/node` a unix socket is bound and dialled only inside a
|
|
1778
|
+
directory its own user owns, and a client connects only to a socket with that owner. A
|
|
1779
|
+
socket in a shared directory such as `/tmp` could be replaced by another user, who then
|
|
1780
|
+
received the requests or answered them. The change and its migration are the breaking
|
|
1781
|
+
item on `createServer({ unix })` above
|
|
1782
|
+
([migration](docs/guide/upgrading.md#unix-socket-ownership-checks)).
|
|
1783
|
+
**Affects:** `stitchkit/server` createServer, createUnixClientTransport; `stitchkit/node` createUnixClientTransport
|
|
1784
|
+
|
|
18
1785
|
## [0.126.0] - 2026-11-21
|
|
19
1786
|
|
|
20
1787
|
### ⚠️ Breaking changes
|