stitchkit 0.93.0 → 0.94.1
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 +198 -0
- package/README.md +5 -2
- package/dist/agent-runtime/children-control.d.ts +6 -0
- package/dist/agent-runtime/children-control.d.ts.map +1 -0
- package/dist/agent-runtime/children-spawn.d.ts +6 -0
- package/dist/agent-runtime/children-spawn.d.ts.map +1 -0
- package/dist/agent-runtime/children-state.d.ts +46 -0
- package/dist/agent-runtime/children-state.d.ts.map +1 -0
- package/dist/agent-runtime/children-usage.d.ts +8 -0
- package/dist/agent-runtime/children-usage.d.ts.map +1 -0
- package/dist/agent-runtime/children.d.ts +11 -14
- package/dist/agent-runtime/children.d.ts.map +1 -1
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts +2 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/contained-darwin.d.ts +38 -0
- package/dist/agent-runtime/contained-darwin.d.ts.map +1 -0
- package/dist/agent-runtime/contained-files.d.ts +11 -26
- package/dist/agent-runtime/contained-files.d.ts.map +1 -1
- package/dist/agent-runtime/contained-scan.d.ts +21 -0
- package/dist/agent-runtime/contained-scan.d.ts.map +1 -0
- package/dist/agent-runtime/contained-write.d.ts +9 -0
- package/dist/agent-runtime/contained-write.d.ts.map +1 -0
- package/dist/agent-runtime/deferred-tool-types.d.ts +4 -3
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/agent-runtime/events.d.ts +1 -1
- package/dist/agent-runtime/events.d.ts.map +1 -1
- package/dist/agent-runtime/harness-control.d.ts +0 -1
- package/dist/agent-runtime/harness-control.d.ts.map +1 -1
- package/dist/agent-runtime/harness.d.ts +0 -5
- package/dist/agent-runtime/harness.d.ts.map +1 -1
- package/dist/agent-runtime/managed-tools.d.ts +3 -2
- package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
- package/dist/agent-runtime/observability.d.ts +1 -1
- package/dist/agent-runtime/observability.d.ts.map +1 -1
- package/dist/agent-runtime/openrouter.d.ts +29 -0
- package/dist/agent-runtime/openrouter.d.ts.map +1 -0
- package/dist/agent-runtime/projections.d.ts +1 -1
- package/dist/agent-runtime/projections.d.ts.map +1 -1
- package/dist/agent-runtime/run-acquisition.d.ts +17 -0
- package/dist/agent-runtime/run-acquisition.d.ts.map +1 -0
- package/dist/agent-runtime/run-execution-state.d.ts +133 -0
- package/dist/agent-runtime/run-execution-state.d.ts.map +1 -0
- package/dist/agent-runtime/run-execution.d.ts +17 -33
- package/dist/agent-runtime/run-execution.d.ts.map +1 -1
- package/dist/agent-runtime/run-failure.d.ts +18 -0
- package/dist/agent-runtime/run-failure.d.ts.map +1 -0
- package/dist/agent-runtime/run-model-attempts.d.ts +6 -0
- package/dist/agent-runtime/run-model-attempts.d.ts.map +1 -0
- package/dist/agent-runtime/run-prompt-history.d.ts +58 -0
- package/dist/agent-runtime/run-prompt-history.d.ts.map +1 -0
- package/dist/agent-runtime/run-provider-ledger.d.ts +26 -0
- package/dist/agent-runtime/run-provider-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/run-stream-parts.d.ts +17 -0
- package/dist/agent-runtime/run-stream-parts.d.ts.map +1 -0
- package/dist/agent-runtime/run-terminal.d.ts +11 -0
- package/dist/agent-runtime/run-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/run-turn-preparation.d.ts +22 -0
- package/dist/agent-runtime/run-turn-preparation.d.ts.map +1 -0
- package/dist/agent-runtime/runtime-admission-gate.d.ts +29 -0
- package/dist/agent-runtime/runtime-admission-gate.d.ts.map +1 -0
- package/dist/agent-runtime/runtime-control.d.ts +9 -0
- package/dist/agent-runtime/runtime-control.d.ts.map +1 -0
- package/dist/agent-runtime/runtime-recovery.d.ts +10 -0
- package/dist/agent-runtime/runtime-recovery.d.ts.map +1 -0
- package/dist/agent-runtime/runtime-state.d.ts +36 -0
- package/dist/agent-runtime/runtime-state.d.ts.map +1 -0
- package/dist/agent-runtime/runtime-submit.d.ts +5 -0
- package/dist/agent-runtime/runtime-submit.d.ts.map +1 -0
- package/dist/agent-runtime/runtime.d.ts +10 -5
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-records.d.ts +34 -0
- package/dist/agent-runtime/schedule-records.d.ts.map +1 -0
- package/dist/agent-runtime/schedules.d.ts +34 -0
- package/dist/agent-runtime/schedules.d.ts.map +1 -1
- package/dist/agent-runtime/sqlite-bun.d.ts +12 -0
- package/dist/agent-runtime/sqlite-bun.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-events.d.ts +5 -0
- package/dist/agent-runtime/sqlite-events.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-history.d.ts +7 -0
- package/dist/agent-runtime/sqlite-history.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-ledger.d.ts +7 -0
- package/dist/agent-runtime/sqlite-ledger.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-node.d.ts +12 -0
- package/dist/agent-runtime/sqlite-node.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-reads.d.ts +14 -0
- package/dist/agent-runtime/sqlite-reads.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-rows.d.ts +178 -0
- package/dist/agent-runtime/sqlite-rows.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-schema.d.ts +7 -0
- package/dist/agent-runtime/sqlite-schema.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite-transactions.d.ts +25 -0
- package/dist/agent-runtime/sqlite-transactions.d.ts.map +1 -0
- package/dist/agent-runtime/sqlite.d.ts +10 -6
- package/dist/agent-runtime/sqlite.d.ts.map +1 -1
- package/dist/agent-runtime/store-archive.d.ts +16 -0
- package/dist/agent-runtime/store-archive.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +434 -0
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-ordering.d.ts +18 -0
- package/dist/agent-runtime/store-conformance-ordering.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +130 -0
- package/dist/agent-runtime/store-conformance-support.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-terminal.d.ts +12 -0
- package/dist/agent-runtime/store-conformance-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance.d.ts +40 -0
- package/dist/agent-runtime/store-conformance.d.ts.map +1 -0
- package/dist/agent-runtime/store-create.d.ts +11 -0
- package/dist/agent-runtime/store-create.d.ts.map +1 -0
- package/dist/agent-runtime/store-driver-contract.d.ts +814 -0
- package/dist/agent-runtime/store-driver-contract.d.ts.map +1 -0
- package/dist/agent-runtime/store-events.d.ts +7 -89
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/store-memory.d.ts +4 -0
- package/dist/agent-runtime/store-memory.d.ts.map +1 -0
- package/dist/agent-runtime/store-mutate.d.ts +13 -0
- package/dist/agent-runtime/store-mutate.d.ts.map +1 -0
- package/dist/agent-runtime/store-purge.d.ts +1 -1
- package/dist/agent-runtime/store-purge.d.ts.map +1 -1
- package/dist/agent-runtime/store-reads.d.ts +29 -0
- package/dist/agent-runtime/store-reads.d.ts.map +1 -0
- package/dist/agent-runtime/store-reduce-history.d.ts +10 -0
- package/dist/agent-runtime/store-reduce-history.d.ts.map +1 -0
- package/dist/agent-runtime/store-reduce-run.d.ts +14 -0
- package/dist/agent-runtime/store-reduce-run.d.ts.map +1 -0
- package/dist/agent-runtime/store-reduce-shared.d.ts +76 -0
- package/dist/agent-runtime/store-reduce-shared.d.ts.map +1 -0
- package/dist/agent-runtime/store-reduce-terminal.d.ts +6 -0
- package/dist/agent-runtime/store-reduce-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/store-reducer.d.ts +24 -0
- package/dist/agent-runtime/store-reducer.d.ts.map +1 -0
- package/dist/agent-runtime/store-snapshot.d.ts +19 -0
- package/dist/agent-runtime/store-snapshot.d.ts.map +1 -0
- package/dist/agent-runtime/store.d.ts +1 -1
- package/dist/agent-runtime/store.d.ts.map +1 -1
- package/dist/application/admission-rate.d.ts +21 -0
- package/dist/application/admission-rate.d.ts.map +1 -0
- package/dist/application/admission-run.d.ts +8 -0
- package/dist/application/admission-run.d.ts.map +1 -0
- package/dist/application/admission.d.ts +1 -1
- package/dist/application/admission.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-lock.d.ts +9 -34
- package/dist/application/diagnostic-journal-lock.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
- package/dist/application/events.d.ts +1 -1
- package/dist/application/events.d.ts.map +1 -1
- package/dist/application/file-state-store.d.ts +23 -0
- package/dist/application/file-state-store.d.ts.map +1 -0
- package/dist/application/health.d.ts +1 -1
- package/dist/application/health.d.ts.map +1 -1
- package/dist/application/kernel-admission.d.ts +8 -0
- package/dist/application/kernel-admission.d.ts.map +1 -0
- package/dist/application/kernel-contract.d.ts +142 -0
- package/dist/application/kernel-contract.d.ts.map +1 -0
- package/dist/application/kernel-resource-context.d.ts +24 -0
- package/dist/application/kernel-resource-context.d.ts.map +1 -0
- package/dist/application/kernel-restart.d.ts +5 -0
- package/dist/application/kernel-restart.d.ts.map +1 -0
- package/dist/application/kernel-rollback.d.ts +4 -0
- package/dist/application/kernel-rollback.d.ts.map +1 -0
- package/dist/application/kernel-shutdown.d.ts +6 -0
- package/dist/application/kernel-shutdown.d.ts.map +1 -0
- package/dist/application/kernel-start.d.ts +20 -0
- package/dist/application/kernel-start.d.ts.map +1 -0
- package/dist/application/kernel-state.d.ts +116 -0
- package/dist/application/kernel-state.d.ts.map +1 -0
- package/dist/application/kernel.d.ts +9 -140
- package/dist/application/kernel.d.ts.map +1 -1
- package/dist/application/latest-sink.d.ts +1 -1
- package/dist/application/latest-sink.d.ts.map +1 -1
- package/dist/application/notification-outbox.d.ts.map +1 -1
- package/dist/application/opentelemetry.d.ts +1 -1
- package/dist/application/opentelemetry.d.ts.map +1 -1
- package/dist/application/schedule.d.ts +0 -1
- package/dist/application/schedule.d.ts.map +1 -1
- package/dist/application/watch-hub-core.d.ts +122 -0
- package/dist/application/watch-hub-core.d.ts.map +1 -0
- package/dist/application/watch-hub.d.ts +3 -3
- package/dist/application/watch-hub.d.ts.map +1 -1
- package/dist/browser/client-executors.d.ts +14 -0
- package/dist/browser/client-executors.d.ts.map +1 -0
- package/dist/browser/client-multipart.d.ts +1 -1
- package/dist/browser/client-multipart.d.ts.map +1 -1
- package/dist/browser/client-url.d.ts +1 -1
- package/dist/browser/client-url.d.ts.map +1 -1
- package/dist/browser/client.d.ts +3 -2
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/contract-stream.d.ts +1 -1
- package/dist/browser/contract-stream.d.ts.map +1 -1
- package/dist/browser/http-fetch.d.ts +22 -0
- package/dist/browser/http-fetch.d.ts.map +1 -0
- package/dist/browser/http.d.ts +2 -4
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/live-state-core.d.ts +63 -0
- package/dist/browser/live-state-core.d.ts.map +1 -0
- package/dist/browser/live-state.d.ts.map +1 -1
- package/dist/browser/realtime-client.d.ts +26 -0
- package/dist/browser/realtime-client.d.ts.map +1 -0
- package/dist/browser/resumable.d.ts +1 -28
- package/dist/browser/resumable.d.ts.map +1 -1
- package/dist/browser/retained.d.ts.map +1 -0
- package/dist/browser/socket-io-connection.d.ts +82 -0
- package/dist/browser/socket-io-connection.d.ts.map +1 -0
- package/dist/browser/socket-io-peer.d.ts +20 -0
- package/dist/browser/socket-io-peer.d.ts.map +1 -0
- package/dist/browser/socket-io-trace.d.ts +31 -0
- package/dist/browser/socket-io-trace.d.ts.map +1 -0
- package/dist/browser/socket-io.d.ts +24 -18
- package/dist/browser/socket-io.d.ts.map +1 -1
- package/dist/browser/stream.d.ts +14 -2
- package/dist/browser/stream.d.ts.map +1 -1
- package/dist/contract/client-types.d.ts +134 -0
- package/dist/contract/client-types.d.ts.map +1 -0
- package/dist/contract/define-validation.d.ts +30 -0
- package/dist/contract/define-validation.d.ts.map +1 -0
- package/dist/contract/define.d.ts +47 -394
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/normalize.d.ts +56 -0
- package/dist/contract/normalize.d.ts.map +1 -0
- package/dist/contract/runtime-context.d.ts +131 -0
- package/dist/contract/runtime-context.d.ts.map +1 -0
- package/dist/contract/tool-options.d.ts +105 -0
- package/dist/contract/tool-options.d.ts.map +1 -0
- package/dist/contract/tool-view.d.ts +148 -0
- package/dist/contract/tool-view.d.ts.map +1 -0
- package/dist/declaration/declaration.d.ts.map +1 -0
- package/dist/durability/contract.d.ts +259 -0
- package/dist/durability/contract.d.ts.map +1 -0
- package/dist/durability/effect.d.ts +24 -0
- package/dist/durability/effect.d.ts.map +1 -0
- package/dist/durability/engine.d.ts +14 -0
- package/dist/durability/engine.d.ts.map +1 -0
- package/dist/durability/events.d.ts +103 -0
- package/dist/durability/events.d.ts.map +1 -0
- package/dist/durability/json.d.ts +3 -0
- package/dist/durability/json.d.ts.map +1 -0
- package/dist/durability/ledger.d.ts +27 -0
- package/dist/durability/ledger.d.ts.map +1 -0
- package/dist/durability/parks.d.ts +22 -0
- package/dist/durability/parks.d.ts.map +1 -0
- package/dist/durability/scheduler.d.ts +30 -0
- package/dist/durability/scheduler.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/browser.d.ts +5 -0
- package/dist/entrypoints/agent-runtime/browser.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/browser.js +124 -0
- package/dist/entrypoints/agent-runtime/coding-tools.d.ts +2 -0
- package/dist/entrypoints/agent-runtime/coding-tools.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/coding-tools.js +22 -0
- package/dist/entrypoints/agent-runtime/harness.d.ts +2 -0
- package/dist/entrypoints/agent-runtime/harness.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/harness.js +739 -0
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +2 -0
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/openrouter.js +270 -0
- package/dist/entrypoints/agent-runtime/sandbox.d.ts +5 -0
- package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/sandbox.js +797 -0
- package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts +2 -0
- package/dist/entrypoints/agent-runtime/sqlite/bun.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +44 -0
- package/dist/entrypoints/agent-runtime/sqlite/node.d.ts +2 -0
- package/dist/entrypoints/agent-runtime/sqlite/node.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/sqlite/node.js +46 -0
- package/dist/entrypoints/agent-runtime/testing.d.ts +4 -0
- package/dist/entrypoints/agent-runtime/testing.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/testing.js +1116 -0
- package/dist/entrypoints/agent-runtime.d.ts +42 -0
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime.js +2670 -0
- package/dist/entrypoints/application/diagnostic-journal.d.ts +21 -0
- package/dist/entrypoints/application/diagnostic-journal.d.ts.map +1 -0
- package/dist/entrypoints/application/diagnostic-journal.js +492 -0
- package/dist/entrypoints/application/grammy.d.ts +2 -0
- package/dist/entrypoints/application/grammy.d.ts.map +1 -0
- package/dist/entrypoints/application/grammy.js +169 -0
- package/dist/entrypoints/application/opentelemetry.d.ts +2 -0
- package/dist/entrypoints/application/opentelemetry.d.ts.map +1 -0
- package/dist/entrypoints/application/opentelemetry.js +250 -0
- package/dist/entrypoints/application/schemas.d.ts +15 -0
- package/dist/entrypoints/application/schemas.d.ts.map +1 -0
- package/dist/entrypoints/application/schemas.js +27 -0
- package/dist/entrypoints/application.d.ts +23 -0
- package/dist/entrypoints/application.d.ts.map +1 -0
- package/dist/entrypoints/application.js +2016 -0
- package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -0
- package/dist/entrypoints/bin/upgrade-cli.js +177 -0
- package/dist/entrypoints/cli.d.ts +44 -0
- package/dist/entrypoints/cli.d.ts.map +1 -0
- package/dist/entrypoints/cli.js +773 -0
- package/dist/entrypoints/contract.d.ts +12 -0
- package/dist/entrypoints/contract.d.ts.map +1 -0
- package/dist/entrypoints/contract.js +64 -0
- package/dist/entrypoints/declaration.d.ts +2 -0
- package/dist/entrypoints/declaration.d.ts.map +1 -0
- package/dist/entrypoints/declaration.js +183 -0
- package/dist/entrypoints/files.d.ts +5 -0
- package/dist/entrypoints/files.d.ts.map +1 -0
- package/dist/entrypoints/files.js +111 -0
- package/dist/entrypoints/geo.d.ts +3 -0
- package/dist/entrypoints/geo.d.ts.map +1 -0
- package/dist/entrypoints/geo.js +245 -0
- package/dist/entrypoints/google.d.ts +2 -0
- package/dist/entrypoints/google.d.ts.map +1 -0
- package/dist/entrypoints/google.js +175 -0
- package/dist/entrypoints/index.d.ts +17 -0
- package/dist/entrypoints/index.d.ts.map +1 -0
- package/dist/entrypoints/index.js +764 -0
- package/dist/entrypoints/live.d.ts +19 -0
- package/dist/entrypoints/live.d.ts.map +1 -0
- package/dist/entrypoints/live.js +302 -0
- package/dist/entrypoints/node.d.ts +19 -0
- package/dist/entrypoints/node.d.ts.map +1 -0
- package/dist/entrypoints/node.js +308 -0
- package/dist/entrypoints/oauth.d.ts +2 -0
- package/dist/entrypoints/oauth.d.ts.map +1 -0
- package/dist/entrypoints/oauth.js +170 -0
- package/dist/entrypoints/observability.d.ts +19 -0
- package/dist/entrypoints/observability.d.ts.map +1 -0
- package/dist/entrypoints/observability.js +567 -0
- package/dist/entrypoints/primitives.d.ts +3 -0
- package/dist/entrypoints/primitives.d.ts.map +1 -0
- package/dist/entrypoints/primitives.js +749 -0
- package/dist/entrypoints/react.d.ts +5 -0
- package/dist/entrypoints/react.d.ts.map +1 -0
- package/dist/entrypoints/react.js +403 -0
- package/dist/entrypoints/release.d.ts +15 -0
- package/dist/entrypoints/release.d.ts.map +1 -0
- package/dist/entrypoints/release.js +196 -0
- package/dist/entrypoints/remote.d.ts +9 -0
- package/dist/entrypoints/remote.d.ts.map +1 -0
- package/dist/entrypoints/remote.js +66 -0
- package/dist/entrypoints/server.d.ts +39 -0
- package/dist/entrypoints/server.d.ts.map +1 -0
- package/dist/entrypoints/server.js +2009 -0
- package/dist/entrypoints/telegram.d.ts +3 -0
- package/dist/entrypoints/telegram.d.ts.map +1 -0
- package/dist/entrypoints/telegram.js +224 -0
- package/dist/entrypoints/testing.d.ts +10 -0
- package/dist/entrypoints/testing.d.ts.map +1 -0
- package/dist/entrypoints/testing.js +1377 -0
- package/dist/entrypoints/tools/connections.d.ts +19 -0
- package/dist/entrypoints/tools/connections.d.ts.map +1 -0
- package/dist/entrypoints/tools/connections.js +1110 -0
- package/dist/entrypoints/tools/contract.d.ts +29 -0
- package/dist/entrypoints/tools/contract.d.ts.map +1 -0
- package/dist/entrypoints/tools/contract.js +24 -0
- package/dist/entrypoints/tools/invoker.d.ts +9 -0
- package/dist/entrypoints/tools/invoker.d.ts.map +1 -0
- package/dist/entrypoints/tools/invoker.js +20 -0
- package/dist/entrypoints/tools.d.ts +54 -0
- package/dist/entrypoints/tools.d.ts.map +1 -0
- package/dist/entrypoints/tools.js +3009 -0
- package/dist/entrypoints/tracking/server.d.ts +15 -0
- package/dist/entrypoints/tracking/server.d.ts.map +1 -0
- package/dist/entrypoints/tracking.d.ts +24 -0
- package/dist/entrypoints/tracking.d.ts.map +1 -0
- package/dist/entrypoints/tracking.js +1140 -0
- package/dist/files/boundary.d.ts.map +1 -1
- package/dist/files/file-io.d.ts +14 -0
- package/dist/files/file-io.d.ts.map +1 -0
- package/dist/google/google.d.ts.map +1 -0
- package/dist/index-0b1ess5e.js +38 -0
- package/dist/index-1j8pm5t0.js +412 -0
- package/dist/index-1zbbzgfh.js +89 -0
- package/dist/index-2bxbyab0.js +47 -0
- package/dist/index-2gxzjvyr.js +266 -0
- package/dist/index-35mh5bhj.js +177 -0
- package/dist/index-48ffdxgk.js +6 -0
- package/dist/index-4gcnakhx.js +82 -0
- package/dist/index-55hkhm67.js +343 -0
- package/dist/index-79z7m7dt.js +675 -0
- package/dist/index-7f68ghdn.js +3618 -0
- package/dist/index-7p1f0vp2.js +154 -0
- package/dist/index-83bdg97s.js +16 -0
- package/dist/index-863ea9jb.js +154 -0
- package/dist/index-8p52kd5p.js +242 -0
- package/dist/index-d9pk3td4.js +326 -0
- package/dist/index-dce5wxcq.js +63 -0
- package/dist/index-e01r054k.js +105 -0
- package/dist/index-ensd0r74.js +595 -0
- package/dist/index-eqqvgdb3.js +46 -0
- package/dist/index-gxrt5h6v.js +341 -0
- package/dist/index-h6eeys1v.js +211 -0
- package/dist/index-ham5sz8m.js +734 -0
- package/dist/index-het2he5g.js +1387 -0
- package/dist/index-hffjpmq9.js +30 -0
- package/dist/index-hmp4800j.js +51 -0
- package/dist/index-k30h66yd.js +317 -0
- package/dist/index-k5hsfc3j.js +31 -0
- package/dist/index-khtgb21r.js +92 -0
- package/dist/index-m9zn6cpq.js +51 -0
- package/dist/index-ndddxtyx.js +324 -0
- package/dist/index-ngfhvfpd.js +30 -0
- package/dist/index-np4m8hd3.js +1205 -0
- package/dist/index-p3vsv1fb.js +3493 -0
- package/dist/index-p5r7qpdd.js +85 -0
- package/dist/index-p9e0w8hs.js +1084 -0
- package/dist/index-p9sh0xx4.js +64 -0
- package/dist/index-paz6sgdp.js +371 -0
- package/dist/index-px2gm2jp.js +448 -0
- package/dist/index-qwhynv6x.js +103 -0
- package/dist/index-s812ycat.js +65 -0
- package/dist/index-sp1tzwnb.js +281 -0
- package/dist/index-t9rhjr9f.js +2306 -0
- package/dist/index-v260df89.js +342 -0
- package/dist/index-w906953s.js +946 -0
- package/dist/index-wdkt63w3.js +214 -0
- package/dist/index-wqgjfstn.js +18 -0
- package/dist/index-wsm5w4ee.js +1023 -0
- package/dist/index-xw3s75nj.js +100 -0
- package/dist/index-yw4fzmdz.js +268 -0
- package/dist/index-zfrhfn82.js +85 -0
- package/dist/index-znfs20ss.js +98 -0
- package/dist/internal/atomic-file.d.ts +23 -2
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/backoff.d.ts +29 -0
- package/dist/internal/backoff.d.ts.map +1 -0
- package/dist/internal/canonical-json.d.ts +21 -11
- package/dist/internal/canonical-json.d.ts.map +1 -1
- package/dist/internal/channel.d.ts.map +1 -0
- package/dist/internal/exclusive-lock.d.ts +51 -0
- package/dist/internal/exclusive-lock.d.ts.map +1 -0
- package/dist/internal/logger.d.ts.map +1 -0
- package/dist/internal/process-identity.d.ts +47 -0
- package/dist/internal/process-identity.d.ts.map +1 -0
- package/dist/internal/request.d.ts.map +1 -0
- package/dist/internal/stable-digest.d.ts +0 -43
- package/dist/internal/stable-digest.d.ts.map +1 -1
- package/dist/internal/typed.d.ts +0 -8
- package/dist/internal/typed.d.ts.map +1 -1
- package/dist/internal/with-exclusive-lock.d.ts +67 -0
- package/dist/internal/with-exclusive-lock.d.ts.map +1 -0
- package/dist/internal/zod-issues.d.ts +38 -0
- package/dist/internal/zod-issues.d.ts.map +1 -0
- package/dist/json-schema/dialect.d.ts +17 -0
- package/dist/json-schema/dialect.d.ts.map +1 -0
- package/dist/json-schema/json-schema.d.ts.map +1 -0
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/live/watch-delta.d.ts.map +1 -1
- package/dist/oauth/authorization-code.d.ts +57 -0
- package/dist/oauth/authorization-code.d.ts.map +1 -0
- package/dist/observability/audit.d.ts +3 -3
- package/dist/observability/audit.d.ts.map +1 -1
- package/dist/observability/bounded-logger.d.ts +1 -1
- package/dist/observability/bounded-logger.d.ts.map +1 -1
- package/dist/observability/bounded-sink.d.ts +81 -0
- package/dist/observability/bounded-sink.d.ts.map +1 -0
- package/dist/observability/context.d.ts +1 -1
- package/dist/observability/context.d.ts.map +1 -1
- package/dist/observability/event.d.ts +2 -1
- package/dist/observability/event.d.ts.map +1 -1
- package/dist/observability/work.d.ts +1 -1
- package/dist/observability/work.d.ts.map +1 -1
- package/dist/primitives/audit.d.ts +1 -1
- package/dist/primitives/audit.d.ts.map +1 -1
- package/dist/primitives/export-operation.d.ts +4 -2
- package/dist/primitives/export-operation.d.ts.map +1 -1
- package/dist/realtime/registry.d.ts +0 -5
- package/dist/realtime/registry.d.ts.map +1 -1
- package/dist/realtime/socket.d.ts +1 -1
- package/dist/realtime/socket.d.ts.map +1 -1
- package/dist/server/bun.d.ts +0 -1
- package/dist/server/bun.d.ts.map +1 -1
- package/dist/server/context-contribution.d.ts +1 -1
- package/dist/server/context-contribution.d.ts.map +1 -1
- package/dist/server/context.d.ts +2 -2
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/contract-method.d.ts +15 -0
- package/dist/server/contract-method.d.ts.map +1 -0
- package/dist/server/contract-stream.d.ts +1 -1
- package/dist/server/contract-stream.d.ts.map +1 -1
- package/dist/server/create.d.ts +8 -0
- package/dist/server/create.d.ts.map +1 -1
- package/dist/server/endpoint-dispatch.d.ts +10 -0
- package/dist/server/endpoint-dispatch.d.ts.map +1 -0
- package/dist/server/endpoint-response.d.ts +19 -0
- package/dist/server/endpoint-response.d.ts.map +1 -0
- package/dist/server/error-dispatch.d.ts +17 -1
- package/dist/server/error-dispatch.d.ts.map +1 -1
- package/dist/server/error-hook.d.ts +2 -2
- package/dist/server/error-hook.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts +44 -0
- package/dist/server/handler-state.d.ts.map +1 -0
- package/dist/server/implement-registry.d.ts +54 -0
- package/dist/server/implement-registry.d.ts.map +1 -0
- package/dist/server/implement.d.ts +9 -55
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/middleware/auth.d.ts +1 -31
- package/dist/server/middleware/auth.d.ts.map +1 -1
- package/dist/server/middleware/cors.d.ts +17 -0
- package/dist/server/middleware/cors.d.ts.map +1 -1
- package/dist/server/middleware/jwt.d.ts +31 -0
- package/dist/server/middleware/jwt.d.ts.map +1 -0
- package/dist/server/middleware/trust-fence.d.ts +1 -1
- package/dist/server/middleware/trust-fence.d.ts.map +1 -1
- package/dist/server/multipart-reader.d.ts +22 -0
- package/dist/server/multipart-reader.d.ts.map +1 -0
- package/dist/server/multipart.d.ts +1 -1
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/server/oauth/cimd.d.ts +88 -0
- package/dist/server/oauth/cimd.d.ts.map +1 -0
- package/dist/server/oauth/endpoints.d.ts +39 -0
- package/dist/server/oauth/endpoints.d.ts.map +1 -0
- package/dist/server/oauth/metadata.d.ts +28 -0
- package/dist/server/oauth/metadata.d.ts.map +1 -0
- package/dist/server/oauth/provider.d.ts +117 -0
- package/dist/server/oauth/provider.d.ts.map +1 -0
- package/dist/server/realtime.d.ts +1 -1
- package/dist/server/realtime.d.ts.map +1 -1
- package/dist/server/request-completion.d.ts +16 -0
- package/dist/server/request-completion.d.ts.map +1 -0
- package/dist/server/response-metadata.d.ts +1 -1
- package/dist/server/response-metadata.d.ts.map +1 -1
- package/dist/server/route-table.d.ts +9 -0
- package/dist/server/route-table.d.ts.map +1 -0
- package/dist/server/stream.d.ts +0 -13
- package/dist/server/stream.d.ts.map +1 -1
- package/dist/server/streaming-pump.d.ts +66 -0
- package/dist/server/streaming-pump.d.ts.map +1 -0
- package/dist/server/streaming-route.d.ts +12 -5
- package/dist/server/streaming-route.d.ts.map +1 -1
- package/dist/server/types.d.ts +10 -4
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/unix-client-bun.d.ts.map +1 -1
- package/dist/server/unix-client-http1.d.ts +76 -0
- package/dist/server/unix-client-http1.d.ts.map +1 -0
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/testing/handler-clients.d.ts +32 -0
- package/dist/testing/handler-clients.d.ts.map +1 -0
- package/dist/testing/managed-resource-conformance-scenarios.d.ts.map +1 -1
- package/dist/testing/realtime-probe.d.ts +33 -0
- package/dist/testing/realtime-probe.d.ts.map +1 -0
- package/dist/testing/surface-conformance.d.ts +2 -32
- package/dist/testing/surface-conformance.d.ts.map +1 -1
- package/dist/testing/surface-manifest-digest.d.ts +44 -0
- package/dist/testing/surface-manifest-digest.d.ts.map +1 -0
- package/dist/testing/surface-manifest.d.ts +30 -4
- package/dist/testing/surface-manifest.d.ts.map +1 -1
- package/dist/tools/agent.d.ts +1 -1
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args-fields.d.ts +31 -0
- package/dist/tools/cli/args-fields.d.ts.map +1 -0
- package/dist/tools/cli/args-route.d.ts +42 -0
- package/dist/tools/cli/args-route.d.ts.map +1 -0
- package/dist/tools/cli/args-view.d.ts +32 -0
- package/dist/tools/cli/args-view.d.ts.map +1 -0
- package/dist/tools/cli/args.d.ts +80 -0
- package/dist/tools/cli/args.d.ts.map +1 -0
- package/dist/tools/cli/argument-error.d.ts +5 -0
- package/dist/tools/cli/argument-error.d.ts.map +1 -0
- package/dist/tools/cli/checkpoint.d.ts +24 -0
- package/dist/tools/cli/checkpoint.d.ts.map +1 -0
- package/dist/tools/cli/command.d.ts +70 -0
- package/dist/tools/cli/command.d.ts.map +1 -0
- package/dist/tools/cli/config.d.ts +90 -0
- package/dist/tools/cli/config.d.ts.map +1 -0
- package/dist/tools/cli/create-cli.d.ts +36 -0
- package/dist/tools/cli/create-cli.d.ts.map +1 -0
- package/dist/tools/cli/download.d.ts +8 -0
- package/dist/tools/cli/download.d.ts.map +1 -0
- package/dist/tools/cli/format.d.ts +50 -0
- package/dist/tools/cli/format.d.ts.map +1 -0
- package/dist/tools/cli/help.d.ts +24 -0
- package/dist/tools/cli/help.d.ts.map +1 -0
- package/dist/tools/cli/installer.d.ts +34 -0
- package/dist/tools/cli/installer.d.ts.map +1 -0
- package/dist/tools/cli/invoke.d.ts +144 -0
- package/dist/tools/cli/invoke.d.ts.map +1 -0
- package/dist/tools/cli/io.d.ts +10 -0
- package/dist/tools/cli/io.d.ts.map +1 -0
- package/dist/tools/cli/managed-surface.d.ts +30 -0
- package/dist/tools/cli/managed-surface.d.ts.map +1 -0
- package/dist/tools/cli/manifest.d.ts +80 -0
- package/dist/tools/cli/manifest.d.ts.map +1 -0
- package/dist/tools/cli/policy.d.ts +27 -0
- package/dist/tools/cli/policy.d.ts.map +1 -0
- package/dist/tools/cli/prepare.d.ts +14 -0
- package/dist/tools/cli/prepare.d.ts.map +1 -0
- package/dist/tools/cli/profile.d.ts +40 -0
- package/dist/tools/cli/profile.d.ts.map +1 -0
- package/dist/tools/cli/run-managed.d.ts +5 -0
- package/dist/tools/cli/run-managed.d.ts.map +1 -0
- package/dist/tools/cli/run-native.d.ts +9 -0
- package/dist/tools/cli/run-native.d.ts.map +1 -0
- package/dist/tools/cli/session.d.ts +40 -0
- package/dist/tools/cli/session.d.ts.map +1 -0
- package/dist/tools/cli/signature.d.ts +81 -0
- package/dist/tools/cli/signature.d.ts.map +1 -0
- package/dist/tools/cli/stream.d.ts +93 -0
- package/dist/tools/cli/stream.d.ts.map +1 -0
- package/dist/tools/cli/update.d.ts +145 -0
- package/dist/tools/cli/update.d.ts.map +1 -0
- package/dist/tools/cli/view.d.ts +12 -0
- package/dist/tools/cli/view.d.ts.map +1 -0
- package/dist/tools/cli/wait.d.ts +54 -0
- package/dist/tools/cli/wait.d.ts.map +1 -0
- package/dist/tools/connections/runtime.d.ts +1 -1
- package/dist/tools/connections/runtime.d.ts.map +1 -1
- package/dist/tools/connections/types.d.ts +3 -3
- package/dist/tools/connections/types.d.ts.map +1 -1
- package/dist/tools/durability-context.d.ts +1 -1
- package/dist/tools/durability-context.d.ts.map +1 -1
- package/dist/tools/execute-args.d.ts +23 -0
- package/dist/tools/execute-args.d.ts.map +1 -0
- package/dist/tools/execute-hooks.d.ts +146 -0
- package/dist/tools/execute-hooks.d.ts.map +1 -0
- package/dist/tools/execute-result.d.ts +40 -0
- package/dist/tools/execute-result.d.ts.map +1 -0
- package/dist/tools/execute.d.ts +31 -193
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/internal/surface-projector.d.ts +9 -6
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/internal/tool-view.d.ts +41 -0
- package/dist/tools/internal/tool-view.d.ts.map +1 -0
- package/dist/tools/invoker.d.ts +13 -4
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/lifecycle.d.ts +1 -1
- package/dist/tools/lifecycle.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +3 -3
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +2 -2
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/app.d.ts +62 -0
- package/dist/tools/mcp/app.d.ts.map +1 -0
- package/dist/tools/mcp/catalog.d.ts +68 -0
- package/dist/tools/mcp/catalog.d.ts.map +1 -0
- package/dist/tools/mcp/handler.d.ts +46 -0
- package/dist/tools/mcp/handler.d.ts.map +1 -0
- package/dist/tools/mcp/mount.d.ts +152 -0
- package/dist/tools/mcp/mount.d.ts.map +1 -0
- package/dist/tools/mcp/prepare.d.ts +76 -0
- package/dist/tools/mcp/prepare.d.ts.map +1 -0
- package/dist/tools/mcp/progress.d.ts +46 -0
- package/dist/tools/mcp/progress.d.ts.map +1 -0
- package/dist/tools/mcp/register.d.ts +36 -0
- package/dist/tools/mcp/register.d.ts.map +1 -0
- package/dist/tools/mcp/round-context.d.ts +38 -0
- package/dist/tools/mcp/round-context.d.ts.map +1 -0
- package/dist/tools/mcp/round-policy.d.ts +33 -0
- package/dist/tools/mcp/round-policy.d.ts.map +1 -0
- package/dist/tools/mcp/round.d.ts +53 -0
- package/dist/tools/mcp/round.d.ts.map +1 -0
- package/dist/tools/mcp/runtime-tools.d.ts +25 -0
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -0
- package/dist/tools/mcp/stdio-signals.d.ts +33 -0
- package/dist/tools/mcp/stdio-signals.d.ts.map +1 -0
- package/dist/tools/mcp/stdio.d.ts +20 -0
- package/dist/tools/mcp/stdio.d.ts.map +1 -0
- package/dist/tools/mcp/trace.d.ts +12 -0
- package/dist/tools/mcp/trace.d.ts.map +1 -0
- package/dist/tools/mount.d.ts +14 -7
- package/dist/tools/mount.d.ts.map +1 -1
- package/dist/tools/native-definition.d.ts +4 -3
- package/dist/tools/native-definition.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-binding-types.d.ts +127 -0
- package/dist/tools/operations/async-operation-binding-types.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-binding.d.ts +28 -0
- package/dist/tools/operations/async-operation-binding.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-canonical-types.d.ts +110 -0
- package/dist/tools/operations/async-operation-canonical-types.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-canonical.d.ts +7 -0
- package/dist/tools/operations/async-operation-canonical.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-contract.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-id.d.ts +23 -0
- package/dist/tools/operations/async-operation-id.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-runtime-tools.d.ts +41 -0
- package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-runtime-types.d.ts +69 -0
- package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-runtime.d.ts +5 -0
- package/dist/tools/operations/async-operation-runtime.d.ts.map +1 -0
- package/dist/tools/operations/define-wait-tool.d.ts +22 -0
- package/dist/tools/operations/define-wait-tool.d.ts.map +1 -0
- package/dist/tools/operations/mount-wait.d.ts.map +1 -0
- package/dist/tools/operations/wait-core.d.ts.map +1 -0
- package/dist/tools/remote.d.ts +1 -1
- package/dist/tools/remote.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +13 -4
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools/schema/coerce.d.ts.map +1 -0
- package/dist/tools/schema/flatten-join.d.ts.map +1 -0
- package/dist/tools/schema/flatten.d.ts.map +1 -0
- package/dist/tools/schema/portable-formats.d.ts.map +1 -0
- package/dist/tools/schema/presentation.d.ts +24 -0
- package/dist/tools/schema/presentation.d.ts.map +1 -0
- package/dist/tools/schema/schema.d.ts.map +1 -0
- package/dist/tools/schema/untyped-properties.d.ts.map +1 -0
- package/dist/tools/surface.d.ts +2 -3
- package/dist/tools/surface.d.ts.map +1 -1
- package/dist/tools/tool-logger.d.ts +1 -1
- package/dist/tools/tool-logger.d.ts.map +1 -1
- package/dist/tools/toolkit.d.ts +4 -4
- package/dist/tools/toolkit.d.ts.map +1 -1
- package/dist/tools/transfer/define-download-tool.d.ts +18 -0
- package/dist/tools/transfer/define-download-tool.d.ts.map +1 -0
- package/dist/tools/transfer/define-upload-tool.d.ts +16 -0
- package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -0
- package/dist/tools/transfer/define-view-file-tool.d.ts +10 -0
- package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -0
- package/dist/tools/transfer/download-core.d.ts +20 -0
- package/dist/tools/transfer/download-core.d.ts.map +1 -0
- package/dist/tools/transfer/managed-file-error.d.ts +6 -0
- package/dist/tools/transfer/managed-file-error.d.ts.map +1 -0
- package/dist/tools/transfer/mount-download.d.ts +41 -0
- package/dist/tools/transfer/mount-download.d.ts.map +1 -0
- package/dist/tools/transfer/mount-upload.d.ts +21 -0
- package/dist/tools/transfer/mount-upload.d.ts.map +1 -0
- package/dist/tools/transfer/native-result.d.ts.map +1 -0
- package/dist/tools/transfer/upload-core.d.ts +4 -0
- package/dist/tools/transfer/upload-core.d.ts.map +1 -0
- package/dist/tools/transfer/view-file-contract.d.ts.map +1 -0
- package/dist/tools/transfer/view-file.d.ts +62 -0
- package/dist/tools/transfer/view-file.d.ts.map +1 -0
- package/dist/tools/transports.d.ts +1 -1
- package/dist/tools/transports.d.ts.map +1 -1
- package/dist/tracking/client-listeners.d.ts +30 -0
- package/dist/tracking/client-listeners.d.ts.map +1 -0
- package/dist/tracking/client-visit.d.ts +61 -0
- package/dist/tracking/client-visit.d.ts.map +1 -0
- package/dist/tracking/client.d.ts +3 -2
- package/dist/tracking/client.d.ts.map +1 -1
- package/dist/tracking/contract.d.ts +1 -1
- package/dist/tracking/contract.d.ts.map +1 -1
- package/llms/agent-runtime-browser.txt +33 -0
- package/llms/agent-runtime-coding-tools.txt +58 -0
- package/llms/agent-runtime-harness.txt +45 -0
- package/llms/agent-runtime-openrouter.txt +22 -0
- package/llms/agent-runtime-sandbox.txt +159 -0
- package/llms/agent-runtime-sqlite-bun.txt +29 -0
- package/llms/agent-runtime-sqlite-node.txt +26 -0
- package/llms/agent-runtime-testing.txt +30 -0
- package/llms/agent-runtime.2.txt +550 -0
- package/llms/agent-runtime.3.txt +311 -0
- package/llms/agent-runtime.txt +893 -0
- package/llms/application-diagnostic-journal.txt +30 -0
- package/llms/application-grammy.txt +27 -0
- package/llms/application-opentelemetry.txt +27 -0
- package/llms/application-schemas.txt +42 -0
- package/llms/application.2.txt +487 -0
- package/llms/application.txt +886 -0
- package/llms/cli.2.txt +80 -0
- package/llms/cli.txt +948 -0
- package/llms/contract.txt +606 -0
- package/llms/declaration.txt +286 -0
- package/llms/files.txt +33 -0
- package/llms/geo.txt +114 -0
- package/llms/google.txt +27 -0
- package/llms/live.txt +471 -0
- package/llms/node.txt +43 -0
- package/llms/oauth.txt +136 -0
- package/llms/observability.txt +893 -0
- package/llms/primitives.txt +158 -0
- package/llms/react.txt +184 -0
- package/llms/release.txt +176 -0
- package/llms/remote.txt +25 -0
- package/llms/server.2.txt +361 -0
- package/llms/server.3.txt +1031 -0
- package/llms/server.4.txt +905 -0
- package/llms/server.5.txt +250 -0
- package/llms/server.txt +996 -0
- package/llms/stitchkit.2.txt +836 -0
- package/llms/stitchkit.3.txt +147 -0
- package/llms/stitchkit.txt +260 -0
- package/llms/telegram.txt +30 -0
- package/llms/testing.txt +676 -0
- package/llms/tools-connections.txt +45 -0
- package/llms/tools-contract.txt +9 -0
- package/llms/tools-invoker.txt +9 -0
- package/llms/tools.2.txt +647 -0
- package/llms/tools.3.txt +288 -0
- package/llms/tools.txt +966 -0
- package/llms/tracking-server.txt +32 -0
- package/llms/tracking.txt +263 -0
- package/llms/upgrading-0.37.0-0.50.0.txt +947 -0
- package/llms/upgrading-0.53.0-0.67.0.txt +1174 -0
- package/llms/upgrading-0.68.0-0.94.0.txt +1159 -0
- package/llms/upgrading.txt +215 -0
- package/llms-full.txt +312 -77
- package/llms.txt +54 -5
- package/package.json +84 -83
- package/dist/agent-runtime/durability-contract.d.ts +0 -176
- package/dist/agent-runtime/durability-contract.d.ts.map +0 -1
- package/dist/agent-runtime/durability-json.d.ts +0 -3
- package/dist/agent-runtime/durability-json.d.ts.map +0 -1
- package/dist/agent-runtime/durability-ledger.d.ts +0 -16
- package/dist/agent-runtime/durability-ledger.d.ts.map +0 -1
- package/dist/agent-runtime/durability-scheduler.d.ts +0 -29
- package/dist/agent-runtime/durability-scheduler.d.ts.map +0 -1
- package/dist/agent-runtime/durability.d.ts +0 -14
- package/dist/agent-runtime/durability.d.ts.map +0 -1
- package/dist/agent-runtime/store-driver.d.ts +0 -814
- package/dist/agent-runtime/store-driver.d.ts.map +0 -1
- package/dist/agent-runtime-browser.d.ts +0 -5
- package/dist/agent-runtime-browser.d.ts.map +0 -1
- package/dist/agent-runtime-browser.js +0 -124
- package/dist/agent-runtime-coding-tools.d.ts +0 -2
- package/dist/agent-runtime-coding-tools.d.ts.map +0 -1
- package/dist/agent-runtime-coding-tools.js +0 -23
- package/dist/agent-runtime-harness.d.ts +0 -2
- package/dist/agent-runtime-harness.d.ts.map +0 -1
- package/dist/agent-runtime-harness.js +0 -729
- package/dist/agent-runtime-openrouter.d.ts +0 -29
- package/dist/agent-runtime-openrouter.d.ts.map +0 -1
- package/dist/agent-runtime-openrouter.js +0 -270
- package/dist/agent-runtime-sandbox.d.ts +0 -5
- package/dist/agent-runtime-sandbox.d.ts.map +0 -1
- package/dist/agent-runtime-sandbox.js +0 -798
- package/dist/agent-runtime-sqlite-bun.d.ts +0 -11
- package/dist/agent-runtime-sqlite-bun.d.ts.map +0 -1
- package/dist/agent-runtime-sqlite-bun.js +0 -42
- package/dist/agent-runtime-sqlite-node.d.ts +0 -11
- package/dist/agent-runtime-sqlite-node.d.ts.map +0 -1
- package/dist/agent-runtime-sqlite-node.js +0 -44
- package/dist/agent-runtime-testing.d.ts +0 -3
- package/dist/agent-runtime-testing.d.ts.map +0 -1
- package/dist/agent-runtime-testing.js +0 -156
- package/dist/agent-runtime.d.ts +0 -38
- package/dist/agent-runtime.d.ts.map +0 -1
- package/dist/agent-runtime.js +0 -2607
- package/dist/application/channel.d.ts.map +0 -1
- package/dist/application-diagnostic-journal.d.ts +0 -21
- package/dist/application-diagnostic-journal.d.ts.map +0 -1
- package/dist/application-diagnostic-journal.js +0 -632
- package/dist/application-grammy.d.ts +0 -2
- package/dist/application-grammy.d.ts.map +0 -1
- package/dist/application-grammy.js +0 -169
- package/dist/application-opentelemetry.d.ts +0 -2
- package/dist/application-opentelemetry.d.ts.map +0 -1
- package/dist/application-opentelemetry.js +0 -250
- package/dist/application-schemas.d.ts +0 -15
- package/dist/application-schemas.d.ts.map +0 -1
- package/dist/application-schemas.js +0 -27
- package/dist/application.d.ts +0 -22
- package/dist/application.d.ts.map +0 -1
- package/dist/application.js +0 -1977
- package/dist/cli.d.ts +0 -41
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js +0 -753
- package/dist/contract/index.d.ts +0 -8
- package/dist/contract/index.d.ts.map +0 -1
- package/dist/contract/index.js +0 -55
- package/dist/declaration.d.ts.map +0 -1
- package/dist/declaration.js +0 -183
- package/dist/files.d.ts +0 -3
- package/dist/files.d.ts.map +0 -1
- package/dist/files.js +0 -15
- package/dist/geo.d.ts +0 -3
- package/dist/geo.d.ts.map +0 -1
- package/dist/geo.js +0 -245
- package/dist/google.d.ts.map +0 -1
- package/dist/google.js +0 -175
- package/dist/index-0a349c33.js +0 -470
- package/dist/index-0j3vcp5m.js +0 -28
- package/dist/index-2c2bjw3s.js +0 -51
- package/dist/index-2na0qrfn.js +0 -214
- package/dist/index-2qzskm8h.js +0 -63
- package/dist/index-3bmnp41g.js +0 -2169
- package/dist/index-3xwxfj4z.js +0 -334
- package/dist/index-4fpa9dy2.js +0 -51
- package/dist/index-6kyksz9y.js +0 -268
- package/dist/index-77fekveh.js +0 -44
- package/dist/index-7gnkny4z.js +0 -326
- package/dist/index-7zbps32p.js +0 -89
- package/dist/index-9f8ztey6.js +0 -588
- package/dist/index-a11g2kry.js +0 -866
- package/dist/index-a916km3r.js +0 -45
- package/dist/index-actkayzn.js +0 -367
- package/dist/index-bn2cjajt.js +0 -524
- package/dist/index-bx75zwt7.js +0 -63
- package/dist/index-cby4ar3v.js +0 -46
- package/dist/index-cnyk6te3.js +0 -77
- package/dist/index-cxqhvq21.js +0 -413
- package/dist/index-e0znv5gn.js +0 -176
- package/dist/index-e42wzzz5.js +0 -154
- package/dist/index-f477k430.js +0 -324
- package/dist/index-f9mb610r.js +0 -177
- package/dist/index-fadnxwna.js +0 -1046
- package/dist/index-fq77yfzc.js +0 -1303
- package/dist/index-h9etkkyk.js +0 -1126
- package/dist/index-hrbajay7.js +0 -1196
- package/dist/index-kw9t5ayn.js +0 -507
- package/dist/index-mzvgxp0n.js +0 -80
- package/dist/index-n0f51dfn.js +0 -3170
- package/dist/index-p13mwz16.js +0 -16
- package/dist/index-s8cnx02s.js +0 -90
- package/dist/index-sr93cwf9.js +0 -325
- package/dist/index-tmwcrptx.js +0 -85
- package/dist/index-v5573g1k.js +0 -142
- package/dist/index-vjpvjqpn.js +0 -86
- package/dist/index-vk3kq9sb.js +0 -3344
- package/dist/index-wc4x00bn.js +0 -103
- package/dist/index-wnfk50r0.js +0 -211
- package/dist/index-yewwh1w4.js +0 -647
- package/dist/index-yn8remb1.js +0 -290
- package/dist/index-ywd0y6m1.js +0 -394
- package/dist/index-zwkgfq1s.js +0 -345
- package/dist/index.d.ts +0 -14
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -632
- package/dist/internal/errors.d.ts +0 -92
- package/dist/internal/errors.d.ts.map +0 -1
- package/dist/internal/observability-sink.d.ts +0 -81
- package/dist/internal/observability-sink.d.ts.map +0 -1
- package/dist/live.d.ts +0 -19
- package/dist/live.d.ts.map +0 -1
- package/dist/live.js +0 -282
- package/dist/logger.d.ts.map +0 -1
- package/dist/node.d.ts +0 -18
- package/dist/node.d.ts.map +0 -1
- package/dist/node.js +0 -303
- package/dist/oauth.d.ts +0 -57
- package/dist/oauth.d.ts.map +0 -1
- package/dist/oauth.js +0 -170
- package/dist/observability/index.d.ts +0 -19
- package/dist/observability/index.d.ts.map +0 -1
- package/dist/observability/index.js +0 -569
- package/dist/primitives.d.ts +0 -3
- package/dist/primitives.d.ts.map +0 -1
- package/dist/primitives.js +0 -754
- package/dist/react.d.ts +0 -5
- package/dist/react.d.ts.map +0 -1
- package/dist/react.js +0 -403
- package/dist/release.d.ts +0 -15
- package/dist/release.d.ts.map +0 -1
- package/dist/release.js +0 -196
- package/dist/remote.d.ts +0 -9
- package/dist/remote.d.ts.map +0 -1
- package/dist/remote.js +0 -88
- package/dist/retained.d.ts.map +0 -1
- package/dist/server/file-state-store.d.ts +0 -23
- package/dist/server/file-state-store.d.ts.map +0 -1
- package/dist/server/index.d.ts +0 -36
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js +0 -1745
- package/dist/server/request.d.ts.map +0 -1
- package/dist/telegram.d.ts +0 -3
- package/dist/telegram.d.ts.map +0 -1
- package/dist/telegram.js +0 -224
- package/dist/testing/agent-store-conformance.d.ts +0 -40
- package/dist/testing/agent-store-conformance.d.ts.map +0 -1
- package/dist/testing.d.ts +0 -39
- package/dist/testing.d.ts.map +0 -1
- package/dist/testing.js +0 -2209
- package/dist/tool-invoker.d.ts +0 -9
- package/dist/tool-invoker.d.ts.map +0 -1
- package/dist/tool-invoker.js +0 -21
- package/dist/tools/async-operation-contract.d.ts.map +0 -1
- package/dist/tools/async-operation.d.ts +0 -332
- package/dist/tools/async-operation.d.ts.map +0 -1
- package/dist/tools/cli-args.d.ts +0 -143
- package/dist/tools/cli-args.d.ts.map +0 -1
- package/dist/tools/cli-checkpoint.d.ts +0 -24
- package/dist/tools/cli-checkpoint.d.ts.map +0 -1
- package/dist/tools/cli-command.d.ts +0 -70
- package/dist/tools/cli-command.d.ts.map +0 -1
- package/dist/tools/cli-format.d.ts +0 -49
- package/dist/tools/cli-format.d.ts.map +0 -1
- package/dist/tools/cli-installer.d.ts +0 -34
- package/dist/tools/cli-installer.d.ts.map +0 -1
- package/dist/tools/cli-invoke.d.ts +0 -143
- package/dist/tools/cli-invoke.d.ts.map +0 -1
- package/dist/tools/cli-manifest.d.ts +0 -80
- package/dist/tools/cli-manifest.d.ts.map +0 -1
- package/dist/tools/cli-policy.d.ts +0 -27
- package/dist/tools/cli-policy.d.ts.map +0 -1
- package/dist/tools/cli-profile.d.ts +0 -40
- package/dist/tools/cli-profile.d.ts.map +0 -1
- package/dist/tools/cli-signature.d.ts +0 -81
- package/dist/tools/cli-signature.d.ts.map +0 -1
- package/dist/tools/cli-stream.d.ts +0 -93
- package/dist/tools/cli-stream.d.ts.map +0 -1
- package/dist/tools/cli-update.d.ts +0 -126
- package/dist/tools/cli-update.d.ts.map +0 -1
- package/dist/tools/cli-view.d.ts +0 -12
- package/dist/tools/cli-view.d.ts.map +0 -1
- package/dist/tools/cli-wait.d.ts +0 -54
- package/dist/tools/cli-wait.d.ts.map +0 -1
- package/dist/tools/cli.d.ts +0 -94
- package/dist/tools/cli.d.ts.map +0 -1
- package/dist/tools/coerce.d.ts.map +0 -1
- package/dist/tools/connections/index.d.ts +0 -20
- package/dist/tools/connections/index.d.ts.map +0 -1
- package/dist/tools/connections/index.js +0 -1107
- package/dist/tools/define-download-tool.d.ts +0 -18
- package/dist/tools/define-download-tool.d.ts.map +0 -1
- package/dist/tools/define-upload-tool.d.ts +0 -16
- package/dist/tools/define-upload-tool.d.ts.map +0 -1
- package/dist/tools/define-view-file-tool.d.ts +0 -10
- package/dist/tools/define-view-file-tool.d.ts.map +0 -1
- package/dist/tools/define-wait-tool.d.ts +0 -22
- package/dist/tools/define-wait-tool.d.ts.map +0 -1
- package/dist/tools/download-core.d.ts +0 -20
- package/dist/tools/download-core.d.ts.map +0 -1
- package/dist/tools/flatten-join.d.ts.map +0 -1
- package/dist/tools/flatten.d.ts.map +0 -1
- package/dist/tools/json-schema-dialect.d.ts +0 -17
- package/dist/tools/json-schema-dialect.d.ts.map +0 -1
- package/dist/tools/json-schema.d.ts.map +0 -1
- package/dist/tools/managed-file-error.d.ts +0 -6
- package/dist/tools/managed-file-error.d.ts.map +0 -1
- package/dist/tools/mcp-app.d.ts +0 -62
- package/dist/tools/mcp-app.d.ts.map +0 -1
- package/dist/tools/mcp-catalog.d.ts +0 -68
- package/dist/tools/mcp-catalog.d.ts.map +0 -1
- package/dist/tools/mcp-handler.d.ts +0 -46
- package/dist/tools/mcp-handler.d.ts.map +0 -1
- package/dist/tools/mcp-prepare.d.ts +0 -75
- package/dist/tools/mcp-prepare.d.ts.map +0 -1
- package/dist/tools/mcp-progress.d.ts +0 -46
- package/dist/tools/mcp-progress.d.ts.map +0 -1
- package/dist/tools/mcp-round-policy.d.ts +0 -33
- package/dist/tools/mcp-round-policy.d.ts.map +0 -1
- package/dist/tools/mcp-round.d.ts +0 -61
- package/dist/tools/mcp-round.d.ts.map +0 -1
- package/dist/tools/mcp-stdio-signals.d.ts +0 -33
- package/dist/tools/mcp-stdio-signals.d.ts.map +0 -1
- package/dist/tools/mcp-stdio.d.ts +0 -20
- package/dist/tools/mcp-stdio.d.ts.map +0 -1
- package/dist/tools/mcp-trace.d.ts +0 -12
- package/dist/tools/mcp-trace.d.ts.map +0 -1
- package/dist/tools/mcp.d.ts +0 -152
- package/dist/tools/mcp.d.ts.map +0 -1
- package/dist/tools/mount-download.d.ts +0 -41
- package/dist/tools/mount-download.d.ts.map +0 -1
- package/dist/tools/mount-upload.d.ts +0 -21
- package/dist/tools/mount-upload.d.ts.map +0 -1
- package/dist/tools/mount-wait.d.ts.map +0 -1
- package/dist/tools/native-mcp.d.ts +0 -20
- package/dist/tools/native-mcp.d.ts.map +0 -1
- package/dist/tools/native-result.d.ts.map +0 -1
- package/dist/tools/oauth-metadata.d.ts +0 -28
- package/dist/tools/oauth-metadata.d.ts.map +0 -1
- package/dist/tools/oauth-provider.d.ts +0 -184
- package/dist/tools/oauth-provider.d.ts.map +0 -1
- package/dist/tools/portable-formats.d.ts.map +0 -1
- package/dist/tools/presentation.d.ts +0 -22
- package/dist/tools/presentation.d.ts.map +0 -1
- package/dist/tools/schema.d.ts.map +0 -1
- package/dist/tools/untyped-properties.d.ts.map +0 -1
- package/dist/tools/upload-core.d.ts +0 -4
- package/dist/tools/upload-core.d.ts.map +0 -1
- package/dist/tools/view-file-contract.d.ts.map +0 -1
- package/dist/tools/view-file.d.ts +0 -62
- package/dist/tools/view-file.d.ts.map +0 -1
- package/dist/tools/wait-core.d.ts.map +0 -1
- package/dist/tools-contract.d.ts +0 -29
- package/dist/tools-contract.d.ts.map +0 -1
- package/dist/tools-contract.js +0 -24
- package/dist/tools.d.ts +0 -50
- package/dist/tools.d.ts.map +0 -1
- package/dist/tools.js +0 -2930
- package/dist/tracking-server.d.ts +0 -15
- package/dist/tracking-server.d.ts.map +0 -1
- package/dist/tracking.d.ts +0 -24
- package/dist/tracking.d.ts.map +0 -1
- package/dist/tracking.js +0 -1092
- package/dist/upgrade-cli.d.ts.map +0 -1
- package/dist/upgrade-cli.js +0 -177
- /package/dist/{retained.d.ts → browser/retained.d.ts} +0 -0
- /package/dist/{declaration.d.ts → declaration/declaration.d.ts} +0 -0
- /package/dist/{upgrade-cli.d.ts → entrypoints/bin/upgrade-cli.d.ts} +0 -0
- /package/dist/{tracking-server.js → entrypoints/tracking/server.js} +0 -0
- /package/dist/{google.d.ts → google/google.d.ts} +0 -0
- /package/dist/{index-pq95qkbf.js → index-5jm36zv1.js} +0 -0
- /package/dist/{application → internal}/channel.d.ts +0 -0
- /package/dist/{logger.d.ts → internal/logger.d.ts} +0 -0
- /package/dist/{server → internal}/request.d.ts +0 -0
- /package/dist/{tools → json-schema}/json-schema.d.ts +0 -0
- /package/dist/tools/{async-operation-contract.d.ts → operations/async-operation-contract.d.ts} +0 -0
- /package/dist/tools/{mount-wait.d.ts → operations/mount-wait.d.ts} +0 -0
- /package/dist/tools/{wait-core.d.ts → operations/wait-core.d.ts} +0 -0
- /package/dist/tools/{coerce.d.ts → schema/coerce.d.ts} +0 -0
- /package/dist/tools/{flatten-join.d.ts → schema/flatten-join.d.ts} +0 -0
- /package/dist/tools/{flatten.d.ts → schema/flatten.d.ts} +0 -0
- /package/dist/tools/{portable-formats.d.ts → schema/portable-formats.d.ts} +0 -0
- /package/dist/tools/{schema.d.ts → schema/schema.d.ts} +0 -0
- /package/dist/tools/{untyped-properties.d.ts → schema/untyped-properties.d.ts} +0 -0
- /package/dist/tools/{native-result.d.ts → transfer/native-result.d.ts} +0 -0
- /package/dist/tools/{view-file-contract.d.ts → transfer/view-file-contract.d.ts} +0 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# stitchkit/agent-runtime/sqlite/node — stitchkit docs slice
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
|
|
6
|
+
Contains: API reference: `stitchkit/agent-runtime/sqlite/node` (docs/api/reference.md)
|
|
7
|
+
|
|
8
|
+
Also read:
|
|
9
|
+
- see `llms/agent-runtime.txt` for the Agent application runtime guide
|
|
10
|
+
|
|
11
|
+
==============================================================================
|
|
12
|
+
# API reference: `stitchkit/agent-runtime/sqlite/node` (docs/api/reference.md)
|
|
13
|
+
==============================================================================
|
|
14
|
+
|
|
15
|
+
## `stitchkit/agent-runtime/sqlite/node`
|
|
16
|
+
|
|
17
|
+
Node 22.5+ built-in SQLite persistence. It shares the schema and semantics of
|
|
18
|
+
the Bun leaf but imports only `node:sqlite`.
|
|
19
|
+
|
|
20
|
+
| Export | Kind | Summary |
|
|
21
|
+
|--------|------|---------|
|
|
22
|
+
| `createNodeSqliteAgentRuntimeStore` | function | open an owned Node `DatabaseSync`, initialize/validate schema v2, migrate v1 transactionally and return `{ store, conversations, database, transaction, close }` |
|
|
23
|
+
| `NodeSqliteAgentRuntimeStoreConfig` | _type_ | database filename plus optional read-only and initialization policies; read-only requires an initialized schema |
|
|
24
|
+
| `createSqliteAgentRuntimeStore` / `initializeAgentRuntimeSqlite` | function | shared normalized adapter and namespaced schema lifecycle |
|
|
25
|
+
| `SqliteDatabase` / `SqliteStatement` / `SqliteValue` | _type_ | minimal runtime-neutral synchronous SQLite boundary |
|
|
26
|
+
| `SqliteAgentRuntimeStore` / `SqliteAgentRuntimeStoreConfig` / `SqliteStoreTransaction` | _type_ | durable store handle — `store`, `conversations`, `database`, `transaction`, `close` — owned connection lifecycle, initialization policy, and the one write transaction the SQLite companions share |
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# stitchkit/agent-runtime/testing — stitchkit docs slice
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
|
|
6
|
+
Contains: API reference: `stitchkit/agent-runtime/testing` (docs/api/reference.md)
|
|
7
|
+
|
|
8
|
+
Also read:
|
|
9
|
+
- see `llms/agent-runtime.txt` for the Agent application runtime guide
|
|
10
|
+
|
|
11
|
+
==============================================================================
|
|
12
|
+
# API reference: `stitchkit/agent-runtime/testing` (docs/api/reference.md)
|
|
13
|
+
==============================================================================
|
|
14
|
+
|
|
15
|
+
## `stitchkit/agent-runtime/testing`
|
|
16
|
+
|
|
17
|
+
Credential-free provider and concurrency fixtures for Bun and Node tests.
|
|
18
|
+
|
|
19
|
+
| Export | Kind | Summary |
|
|
20
|
+
|--------|------|---------|
|
|
21
|
+
| `createFaultProviderServer` | function | start an OpenAI-compatible local SSE endpoint with deterministic pass, connection-refused, timeout, stream-cut, HTTP, malformed JSON, slow-stream and missing-usage steps |
|
|
22
|
+
| `AgentFaultStepSchema` / `AgentFaultStep` | schema / _type_ | strict fault-plan step vocabulary |
|
|
23
|
+
| `defineAgentFaultPlan` | function | validate a non-empty deterministic fault sequence |
|
|
24
|
+
| `createReplayAgentProvider` | function | serve a declared sequence of credential-free language-model fixtures per model ID |
|
|
25
|
+
| `createAgentRaceBarrier` / `AgentRaceBarrier` | function / _type_ | named bounded deterministic concurrency barrier |
|
|
26
|
+
| `createAgentRaceTrace` / `AgentRaceTrace` / `AgentRaceTraceEntry` | function / _type_ | record and assert exact event order without wall-clock guesses |
|
|
27
|
+
| `createAgentRaceDriver` / `AgentRaceDriver` | function / _type_ | collect named barriers and release their teardown together |
|
|
28
|
+
| `runAgentStoreConformance` | function | reusable black-box duplicate/coalescing/stale/recovery contract for durable agent-store adapters |
|
|
29
|
+
| `AgentStoreConformanceConfig` | _type_ | `{ createStore(context), cleanup?(context) }` — the factory the contract runs against, plus a teardown that runs once whether the scenario passed or failed |
|
|
30
|
+
| `AgentStoreConformanceContext` | _type_ | `{ conversationIds }` — every conversation the scenario will mutate, handed over **before** the first mutation so an adapter can provision application-owned parent rows; a zero-argument factory stays valid |
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
# stitchkit/agent-runtime — stitchkit docs slice, part 2 of 3
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
> Continues in `llms/agent-runtime.3.txt`.
|
|
6
|
+
|
|
7
|
+
Parts of this slice:
|
|
8
|
+
- `llms/agent-runtime.txt`: Guide: Agent application runtime (docs/guide/agent-runtime.md)
|
|
9
|
+
- `llms/agent-runtime.2.txt`: Guide: Agent application runtime (docs/guide/agent-runtime.md)
|
|
10
|
+
- `llms/agent-runtime.3.txt`: API reference: `stitchkit/agent-runtime` (docs/api/reference.md) · API reference: `stitchkit-tui` (docs/api/reference.md)
|
|
11
|
+
|
|
12
|
+
==============================================================================
|
|
13
|
+
# Guide: Agent application runtime (docs/guide/agent-runtime.md) (continued)
|
|
14
|
+
==============================================================================
|
|
15
|
+
|
|
16
|
+
## Store operations
|
|
17
|
+
|
|
18
|
+
`AgentRuntimeStore` remains the runtime-facing aggregate. Application adapters
|
|
19
|
+
implement the smaller `AgentRuntimeStoreDriver` rather than these eleven members:
|
|
20
|
+
|
|
21
|
+
- `acceptInputAndAssignRun`
|
|
22
|
+
- `acquireRun`
|
|
23
|
+
- `checkpointRunAssistant`
|
|
24
|
+
- `requestRunInterrupt`
|
|
25
|
+
- `recoverRun`
|
|
26
|
+
- `commitRunTerminal`
|
|
27
|
+
- `replaceCompactedRange`
|
|
28
|
+
- `loadSnapshot` — the whole conversation; see **Reading a conversation** below
|
|
29
|
+
- `loadRun` — one run by id, with the answer it produced if it has ended
|
|
30
|
+
- `listActiveRuns` — the runs of one conversation that have not ended
|
|
31
|
+
- `scanRecoverable` — one **bounded page** of recoverable runs; `recover()`
|
|
32
|
+
calls this and nothing else, so an adapter that implements the interface has
|
|
33
|
+
everything recovery needs
|
|
34
|
+
|
|
35
|
+
### Reading a conversation
|
|
36
|
+
|
|
37
|
+
Two shapes of read, and the difference matters as a conversation grows.
|
|
38
|
+
|
|
39
|
+
**Bounded.** `loadRun` and `listActiveRuns` read run records and the
|
|
40
|
+
conversation head. Neither touches history, so neither grows with the length of
|
|
41
|
+
the conversation. `loadRun` is how you resolve the `runId` that
|
|
42
|
+
`submit().admission` hands back — it returns the run, the version it was read
|
|
43
|
+
at, and, once the run is terminal, the answer it produced.
|
|
44
|
+
|
|
45
|
+
**Unbounded.** `loadSnapshot` returns every message and every run, and so does
|
|
46
|
+
every mutation result: the store's reducer validates its invariants against the
|
|
47
|
+
whole conversation, and the runtime builds the next prompt from the snapshot the
|
|
48
|
+
mutation returns. Ask for it when you need the conversation — composing a
|
|
49
|
+
prompt, or compacting — and not to look one run up.
|
|
50
|
+
|
|
51
|
+
So the cost of a run scales with the length of its conversation, not with the
|
|
52
|
+
length of the turn. **Configure compaction** (see below) for anything
|
|
53
|
+
long-running: it is the only thing in the framework that makes a conversation
|
|
54
|
+
smaller, and without it a year-old assistant thread is read in full on every
|
|
55
|
+
turn. This is a known limit, held deliberately rather than by omission — paged
|
|
56
|
+
history would have to change what a snapshot *is*, and the store's invariants
|
|
57
|
+
with it, and that is a decision on its own (→ ADR 0112).
|
|
58
|
+
|
|
59
|
+
Every mutation carries an expected run revision or snapshot version. Input
|
|
60
|
+
assignment additionally carries an idempotency identity. A conflict is a
|
|
61
|
+
control outcome; stale data is never silently overwritten.
|
|
62
|
+
|
|
63
|
+
Acquisition increments an optional monotonic `fencingToken`. The managed runtime carries it through
|
|
64
|
+
checkpoint/terminal CAS and tool context, so a distributed adapter can reject an old owner even if
|
|
65
|
+
an owner label is reused. Lease expiry and renewal remain application-owned.
|
|
66
|
+
|
|
67
|
+
On startup, `runtime.recover({ resolveContext })` consumes bounded lightweight
|
|
68
|
+
pages, then restores each conversation's durable execution order before any run
|
|
69
|
+
acquires. Persisted `executionSequence` orders work that started; queued
|
|
70
|
+
`interrupt-next` work precedes ordinary queued work with FIFO preserved inside
|
|
71
|
+
each class. Scan identifiers, equal timestamps and page boundaries therefore
|
|
72
|
+
never become queue order. Its safe default resumes queued runs and reports acquired or
|
|
73
|
+
`interrupt_requested` runs as skipped. A policy may requeue acquired work only
|
|
74
|
+
with explicit replay-safe evidence, or abandon it only with stale-owner
|
|
75
|
+
evidence. Each attempted run returns its own outcome/error; a `resumed` or
|
|
76
|
+
`requeued` outcome also exposes the terminal `result` promise. The outcome is
|
|
77
|
+
reported only after durable acquisition, so a lost acquisition is `failed`
|
|
78
|
+
rather than a successful-looking handoff. `pageSize`, `maxRuns`, and `signal`
|
|
79
|
+
bound the pass. `runtime.resume(...)` remains available for one known queued
|
|
80
|
+
record; its `accepted` promise likewise means that the recovered run acquired
|
|
81
|
+
durable ownership, while `result` carries terminal completion.
|
|
82
|
+
|
|
83
|
+
Canonical records currently write `schemaVersion: 1`. A durable adapter owns
|
|
84
|
+
read-time migration of older rows: migrate to the current shape at its storage
|
|
85
|
+
boundary, validate with the exported schema, and write only the current
|
|
86
|
+
version. Core deliberately does not guess an application's database migration
|
|
87
|
+
or silently accept an unknown future version.
|
|
88
|
+
|
|
89
|
+
### Purging a conversation
|
|
90
|
+
|
|
91
|
+
```ts
|
|
92
|
+
import { purgeAgentConversation } from 'stitchkit/agent-runtime';
|
|
93
|
+
|
|
94
|
+
const result = await purgeAgentConversation(store, {
|
|
95
|
+
conversationId,
|
|
96
|
+
expectedVersion: snapshot.version, // optional stale-intent protection
|
|
97
|
+
});
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
The optional `AgentRuntimeStore.purgeConversation` capability is implemented by the memory and
|
|
101
|
+
initialized Bun/Node SQLite stores. The helper returns `unsupported` for stores without it; it
|
|
102
|
+
never pretends deletion succeeded. Other outcomes are `purged`, `already_purged`,
|
|
103
|
+
`active` (with `runIds`), or `conflict` (with `actualVersion`). Storage failures reject.
|
|
104
|
+
|
|
105
|
+
Purge refuses queued, running and interrupt-requested runs. It does not interrupt, force-abandon
|
|
106
|
+
or wait for a provider. Authorize the destructive request in the host, close its conversation
|
|
107
|
+
ingress/attachments, then settle runs through normal interruption or explicitly justified recovery.
|
|
108
|
+
Retry purge after they are terminal. An optional expected version must match the current snapshot;
|
|
109
|
+
a version conflict requires a fresh deletion decision, not blind retry with a new version.
|
|
110
|
+
|
|
111
|
+
Successful purge atomically removes messages (including compacted inactive rows), all runs and
|
|
112
|
+
retained terminal assistants, admissions/idempotency receipts, conversation heads and their owned
|
|
113
|
+
indexes. It retains only a permanent conversation-ID tombstone. Purging an unknown ID reserves it
|
|
114
|
+
as well, so a submit paused before admission cannot create it later. Repeating the call returns
|
|
115
|
+
`already_purged`, regardless of the original expected version. A lost response is safely retried
|
|
116
|
+
with the same ID; **new chats require a new ID**.
|
|
117
|
+
|
|
118
|
+
Every later runtime mutation rejects with `AgentConversationPurgedError`, including fresh and
|
|
119
|
+
duplicate admissions, checkpoints, recovery and compaction. Existing controller leases grant no
|
|
120
|
+
exception. Existing reads return empty snapshots, absent runs and empty message pages; purged
|
|
121
|
+
conversations disappear from the SQLite catalog and recovery scans. Snapshots retain their
|
|
122
|
+
existing empty `version: 0` shape; use the purge result, not an empty snapshot, as deletion evidence.
|
|
123
|
+
|
|
124
|
+
SQLite commits the tombstone and all deletions in one `BEGIN IMMEDIATE` transaction. Failure before
|
|
125
|
+
commit rolls everything back; reopen/recovery cannot restore committed deleted records. Same-thread
|
|
126
|
+
connection contention rejects promptly without effects; retry after the competing operation settles.
|
|
127
|
+
Initialization adds the tombstone table and write guards to schema v1 transactionally, without
|
|
128
|
+
changing application tables or `user_version`. Guards also fence older writers. `initialize: false`
|
|
129
|
+
on an original v1 database does not add purge capability; open an initialized writer first.
|
|
130
|
+
|
|
131
|
+
Consumer-owned model selections, projections, attachment files, delivery/outbox records and event
|
|
132
|
+
logs remain outside this boundary. Retain an authorized cleanup intent plus any needed opaque file
|
|
133
|
+
references in consumer storage, purge first, then retry idempotent consumer cleanup. Invalidate local
|
|
134
|
+
caches/subscriptions so an old delivered event cannot repopulate a UI. The library never traverses
|
|
135
|
+
paths, revokes remote artifacts or claims a cross-store transaction. Nor does logical purge securely
|
|
136
|
+
wipe database free pages, WAL or backups. Memory tombstones last only for that store instance.
|
|
137
|
+
|
|
138
|
+
Custom normalized drivers may opt in through `AgentConversationPurgeDriver` on `driver.conversations`.
|
|
139
|
+
Their transaction must serialize `isPurged`, head/active-run checks, `remove`, and **all** mutations
|
|
140
|
+
for the same ID, including absent-ID admission. An optimistic head CAS alone is insufficient. `remove`
|
|
141
|
+
must delete every owned payload/index and preserve the tombstone; errors must roll back the entire
|
|
142
|
+
transaction. Drivers without this guarantee must leave the capability absent. See ADR 0138.
|
|
143
|
+
|
|
144
|
+
## Events and reconnect
|
|
145
|
+
|
|
146
|
+
A subscriber that switches over `event.type` handles one transient event
|
|
147
|
+
beyond deltas and reasoning: `attempt-reset`, published when `loop.retry`
|
|
148
|
+
starts a new attempt, meaning everything this run streamed before it is
|
|
149
|
+
withdrawn. `reduceAgentControlEvent` does that; a hand-written reducer must,
|
|
150
|
+
or it keeps the failed attempt's partial text on screen.
|
|
151
|
+
|
|
152
|
+
`publish` receives event classes with different guarantees:
|
|
153
|
+
|
|
154
|
+
- `admission` follows a successful acceptance CAS and carries the same complete
|
|
155
|
+
projection as `ticket.admission`;
|
|
156
|
+
|
|
157
|
+
- `assistant-delta` is transient and ordered by
|
|
158
|
+
`(runId, runtimeEpoch, sequence)`;
|
|
159
|
+
- `reasoning-start`, `reasoning-delta` and `reasoning-end` are transient and
|
|
160
|
+
ordered by the same identity; delta carries only the current text fragment,
|
|
161
|
+
while provider metadata stays inside a validated canonical envelope;
|
|
162
|
+
- `assistant-checkpoint` follows a successful checkpoint CAS;
|
|
163
|
+
- `run-state` follows durable queue/acquire/interrupt transitions;
|
|
164
|
+
- `run-operation` follows a successful operation CAS. Its `operation` is the
|
|
165
|
+
durable `AgentRun.lastOperation`: `model-request` or `compaction`, with
|
|
166
|
+
`started`, `first-output`, `completed`, `failed` or `cancelled` phase and the
|
|
167
|
+
original timestamps. Concrete models use SDK call identity in an awaited model
|
|
168
|
+
middleware; global provider IDs use a runtime-generated identity during awaited
|
|
169
|
+
step preparation. Both durably admit the request before entering `doStream`, so a failed
|
|
170
|
+
write prevents the provider call. This does not claim HTTP transmission is
|
|
171
|
+
measured. First output is a
|
|
172
|
+
non-empty text/reasoning/tool-argument delta or complete tool call; metadata,
|
|
173
|
+
usage, files and sources do not count;
|
|
174
|
+
- `tool-status` is transient lifecycle presentation with JSON-safe input on
|
|
175
|
+
start and output on completion. A mounted typed failure carries the same safe
|
|
176
|
+
`{ error, retryable, details?, _hint? }` envelope as the durable result; an unknown
|
|
177
|
+
internal cause remains generic and stays in local observability only;
|
|
178
|
+
- `terminal` follows the winning terminal CAS.
|
|
179
|
+
|
|
180
|
+
`loop.checkpointEveryEvents` batches ordinary stream parts (default `20`) and
|
|
181
|
+
does not batch live event delivery. Tool call/result/error/denial, approval
|
|
182
|
+
request/response and step-finish boundaries force an assistant checkpoint and
|
|
183
|
+
reset that batch. The checkpoint is awaited after the managed loop observes the
|
|
184
|
+
normalized boundary. It does **not** promise persistence before a tool side
|
|
185
|
+
effect: tool fencing supplies the real ownership checks around execution, while
|
|
186
|
+
cross-crash effect idempotency stays application-owned. The following model
|
|
187
|
+
step waits for the previous step-finish checkpoint before its own durable
|
|
188
|
+
request admission and provider invocation. → ADR 0174.
|
|
189
|
+
|
|
190
|
+
`compaction` names invocation of the configured callback, including a
|
|
191
|
+
`not_needed` context-budget check; it does not by itself say that history was
|
|
192
|
+
summarized. Operation timestamps are retained wall-clock observations and may
|
|
193
|
+
move backwards after a clock correction. Do not subtract them for duration;
|
|
194
|
+
phase order comes from durable snapshot versions/event order.
|
|
195
|
+
|
|
196
|
+
These are post-commit notifications, not a transactional outbox: a process can
|
|
197
|
+
crash between the database commit and `publish`. Reconnect should load canonical
|
|
198
|
+
state. Exactly-once external delivery remains an application-owned outbox.
|
|
199
|
+
|
|
200
|
+
### External channel ingress and delivery
|
|
201
|
+
|
|
202
|
+
The executable
|
|
203
|
+
[`external-channel-harness.ts`](../../packages/core/examples/agent-runtime/external-channel-harness.ts)
|
|
204
|
+
is the reference composition for webhooks, polling transports and local-device
|
|
205
|
+
adapters. Its generic boundary injects a runtime, durable store and delivery
|
|
206
|
+
adapter; the optional
|
|
207
|
+
[`external-channel-grammy.ts`](../../packages/core/examples/agent-runtime/external-channel-grammy.ts)
|
|
208
|
+
attaches the same ingress function to grammY polling or webhook lifecycle
|
|
209
|
+
without putting provider types in the agent runtime.
|
|
210
|
+
|
|
211
|
+
Inbound update identity, principal resolution, conversation mapping and reply
|
|
212
|
+
target are application policy. Persist and deduplicate the update before
|
|
213
|
+
`runtime.submit`, use the stored idempotency key on crash recovery, then persist
|
|
214
|
+
the admitted `runId`. A duplicate arriving after restart resolves to that same
|
|
215
|
+
mapping instead of creating another model turn.
|
|
216
|
+
|
|
217
|
+
For output, choose `terminal-only` or `streaming` explicitly. Stable durable
|
|
218
|
+
`eventId` values and transient `(runtimeEpoch, sequence)` identities become
|
|
219
|
+
outbox keys; the application store assigns causal ordinals. A bounded channel
|
|
220
|
+
is only a process-local wakeup and never the durable authority. Before sending,
|
|
221
|
+
persist one of these states:
|
|
222
|
+
|
|
223
|
+
| State | Recovery action |
|
|
224
|
+
| --- | --- |
|
|
225
|
+
| `not-dispatched` | may dispatch once |
|
|
226
|
+
| `possibly-dispatched` | reconcile with the adapter or remain unresolved |
|
|
227
|
+
| `acknowledged` | deduplicate; delivery is complete |
|
|
228
|
+
|
|
229
|
+
The agent `terminal` event and the adapter's delivery receipt are intentionally
|
|
230
|
+
different records. A successful run does not prove that a reply reached its
|
|
231
|
+
channel, and a delivery failure never rewrites the canonical agent result.
|
|
232
|
+
Shutdown stops ingress, drains accepted process-local work and leaves ambiguous
|
|
233
|
+
outbox records visible for a later reconciliation pass. Stitchkit does not own
|
|
234
|
+
a channel database, durable broker, provider payload schema or application
|
|
235
|
+
identity policy.
|
|
236
|
+
|
|
237
|
+
Durable event IDs are derived from run, event type and snapshot version. Use
|
|
238
|
+
`advanceAgentRuntimeEventCursor` to classify delivery.
|
|
239
|
+
|
|
240
|
+
**`gap` is reported for transient events only**, where `sequence` is a per-run
|
|
241
|
+
counter the runtime really does increment once per event. Durable events carry
|
|
242
|
+
the *conversation's* version, which advances on every mutation including the many
|
|
243
|
+
that publish nothing — checkpoints, compaction, an acceptance that has not
|
|
244
|
+
started — so two consecutive durable events are routinely several versions apart
|
|
245
|
+
and adjacency says nothing. A durable loss is not detectable from the cursor;
|
|
246
|
+
reload on reconnect, which is what a bounded fire-and-forget sink asks of you
|
|
247
|
+
anyway. `createAgentRuntimeEventSink` adds a bounded failure-isolated lifecycle and typed
|
|
248
|
+
projection/redaction hook. `onPublishError` records direct publisher failures without changing the
|
|
249
|
+
already committed run.
|
|
250
|
+
|
|
251
|
+
A named custom stop condition terminalizes with `policy_stop`; its `policyName`
|
|
252
|
+
is persisted on the run and included in the terminal event/result. `max-steps`
|
|
253
|
+
is the reserved built-in policy name. `loop.prepareStep` is the controlled AI
|
|
254
|
+
SDK step boundary for changing active tools, model, instructions or messages.
|
|
255
|
+
It cannot replace the managed tool set or bypass its lifecycle fence.
|
|
256
|
+
|
|
257
|
+
Context can grow between steps as tool results and deferred schemas enter the
|
|
258
|
+
provider prompt. When application budgeting can prove that the next assembled
|
|
259
|
+
step exceeds the selected model window, refuse it by type before that provider
|
|
260
|
+
call:
|
|
261
|
+
|
|
262
|
+
```ts
|
|
263
|
+
prepareStep: (step) => {
|
|
264
|
+
if (wouldExceedSelectedModelWindow(step)) {
|
|
265
|
+
throw new AgentContextOverflowError('Prepared step exceeds the selected model window')
|
|
266
|
+
}
|
|
267
|
+
return chooseProductStepOptions(step)
|
|
268
|
+
}
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
That deliberate refusal ends the run as `context_overflow` on the durable
|
|
272
|
+
record, delivery terminal and operator event. Stitchkit does not inspect error
|
|
273
|
+
messages — it recognises failures by identity, not by text. A store refusing an
|
|
274
|
+
owned mutation ends the run `storage_conflict`; `protocol.acceptTerminal`
|
|
275
|
+
refusing a finished message ends it `output_rejected`; a check the SDK runs on
|
|
276
|
+
what this runtime handed it ends it `runtime_failure`. Every error the runtime
|
|
277
|
+
cannot identify as its own remains `provider_failure`, and operator-only
|
|
278
|
+
observability retains its original cause in all of them.
|
|
279
|
+
|
|
280
|
+
Completion validity belongs to the protocol and is checked before the terminal
|
|
281
|
+
CAS. Protocols that require a visible answer opt in explicitly:
|
|
282
|
+
|
|
283
|
+
```ts
|
|
284
|
+
const protocol = defineAgentProtocol({
|
|
285
|
+
context: ContextSchema,
|
|
286
|
+
inputMetadata: InputMetadataSchema,
|
|
287
|
+
terminalAcceptance: 'require-output',
|
|
288
|
+
})
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
The built-in rule accepts non-blank text, generated files, structured provider
|
|
292
|
+
parts, and a named tool-only `policy_stop`. The default is `allow-empty` for
|
|
293
|
+
protocols where an empty acknowledgement is meaningful. Pass a callback when
|
|
294
|
+
the product has a narrower definition; it receives the candidate message,
|
|
295
|
+
terminal reason and optional policy name, and runs before persistence. A false
|
|
296
|
+
result fails the candidate instead of rewriting an already committed success.
|
|
297
|
+
|
|
298
|
+
`loop.idleTimeoutMs` measures provider silence. It starts immediately before the
|
|
299
|
+
provider call, resets on stream activity, and pauses while local tools execute.
|
|
300
|
+
Resource preparation, child waits and approval waiting do not spend this budget.
|
|
301
|
+
The host gives tools their own deadlines. A stalled provider still aborts with
|
|
302
|
+
durable reason `timeout`; caller interruption and shutdown reach tools directly.
|
|
303
|
+
|
|
304
|
+
Reconnect loads the durable snapshot. Missing transient deltas do not mean the
|
|
305
|
+
canonical result was lost. Exactly-once external delivery requires the
|
|
306
|
+
application's transactional outbox or stable-ID deduplication.
|
|
307
|
+
|
|
308
|
+
## Managed tools
|
|
309
|
+
|
|
310
|
+
Durable `step` bodies return lossless JSON: finite numbers (excluding negative zero),
|
|
311
|
+
strings, booleans, null, dense arrays and plain data objects. Return `null` explicitly
|
|
312
|
+
for effect-only bodies and convert Date values to strings. Unsupported values are
|
|
313
|
+
refused after the body, so external effects still require idempotency. First results
|
|
314
|
+
and replay are detached snapshots; mutating a returned object cannot rewrite a record.
|
|
315
|
+
The optional [sandbox coding profile](sandbox.md#coding-tool-integration) reuses the
|
|
316
|
+
same tool mounting, authorization and output handling for namespace-backed commands.
|
|
317
|
+
|
|
318
|
+
Always compose `toolFenceLifecycle` into `mountAgent`. It checks ownership
|
|
319
|
+
before a managed side effect and again before accepting its result. Fence loss
|
|
320
|
+
uses an internal control signal: it stops the old loop and is not sent to the
|
|
321
|
+
model as a tool error.
|
|
322
|
+
|
|
323
|
+
`mountAgent` sends failed runner outcomes through the AI SDK's tool-error
|
|
324
|
+
channel. AgentRuntime persists them with `outcome: 'error'`, publishes the same
|
|
325
|
+
safe envelope, and replays them as an error result on later turns. Classification
|
|
326
|
+
comes from the execution channel, never from inspecting output fields: a valid
|
|
327
|
+
successful result such as `{ error: 'domain value' }` remains successful. Typed
|
|
328
|
+
`AppError` codes and safe details may reach the model; arbitrary thrown causes
|
|
329
|
+
are retained for local hooks and reduced to `INTERNAL_SERVER_ERROR` outside.
|
|
330
|
+
|
|
331
|
+
The framework cannot undo an already-started non-cooperative external effect.
|
|
332
|
+
Pass the stable call/run idempotency identity into business mutations when the
|
|
333
|
+
effect must be replay-safe.
|
|
334
|
+
|
|
335
|
+
## History, provider metadata and files
|
|
336
|
+
|
|
337
|
+
`projectAgentHistory` converts canonical engine records into provider-valid AI
|
|
338
|
+
SDK messages and pairs tool calls/results in persisted causal order. Adjacent
|
|
339
|
+
parallel calls stay in one assistant round and their adjacent results stay in
|
|
340
|
+
one tool round; a dependent call after those results starts a new assistant
|
|
341
|
+
round, and trailing final text remains after the last tool result. Provider-required metadata is kept
|
|
342
|
+
in a versioned opaque envelope and omitted from product delivery by default.
|
|
343
|
+
`projectAgentHistoryDetailed` additionally returns one inspectable decision per canonical record;
|
|
344
|
+
leading assistant records, crash drafts and unmatched tool chronology are never silently passed to
|
|
345
|
+
the provider.
|
|
346
|
+
|
|
347
|
+
`selectAgentHistory` is the non-destructive context-window selector. It removes only whole oldest
|
|
348
|
+
complete turns, protects system/summary, incomplete and configured recent turns, and reports every
|
|
349
|
+
keep/remove reason with measured/estimated/unavailable token provenance. An oversized protected turn
|
|
350
|
+
returns `oversized`; unavailable accounting returns `unavailable` without invented arithmetic.
|
|
351
|
+
|
|
352
|
+
`ComposedAgentPrompt.instructions` accepts the AI SDK `Instructions` contract.
|
|
353
|
+
Use `adaptInstructions` when a provider needs metadata on the system message:
|
|
354
|
+
|
|
355
|
+
```ts
|
|
356
|
+
prompt({
|
|
357
|
+
context,
|
|
358
|
+
signal,
|
|
359
|
+
adaptInstructions: (content) => ({
|
|
360
|
+
role: 'system',
|
|
361
|
+
content,
|
|
362
|
+
providerOptions: { openrouter: { cacheControl: { type: 'ephemeral' } } },
|
|
363
|
+
}),
|
|
364
|
+
})
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
Attachments and generated files remain application-owned. The runtime only
|
|
368
|
+
stores a reference returned by `persistGeneratedFile`; it never silently puts
|
|
369
|
+
base64 blobs into the neutral history store.
|
|
370
|
+
|
|
371
|
+
To send a stored attachment back to a multimodal model, configure
|
|
372
|
+
`history.resolveFile`. It maps the neutral file reference to AI SDK file data
|
|
373
|
+
(URL, bytes, provider reference or text). Without a resolver the
|
|
374
|
+
`unresolvedFile` policy applies, and it is **`omit`** by default: the file part
|
|
375
|
+
simply does not reach the provider. Choose `text` for a describing placeholder —
|
|
376
|
+
the filename or media type, never the storage reference, because that string is
|
|
377
|
+
an address inside your infrastructure and this content travels upstream — or
|
|
378
|
+
`error` to fail loudly. The `error` message does name the reference: it is
|
|
379
|
+
thrown into your process, where you are owed the whole story.
|
|
380
|
+
|
|
381
|
+
## Compaction
|
|
382
|
+
|
|
383
|
+
`structuredCompaction` summarizes complete provider-valid turn groups outside
|
|
384
|
+
the store lock, then calls `replaceCompactedRange` against the exact snapshot
|
|
385
|
+
version. A concurrent input produces `conflict`; the stale summary is not
|
|
386
|
+
applied. Summary records use the dedicated `summary` role and project to a
|
|
387
|
+
provider system message. The consumer supplies the structured summary schema
|
|
388
|
+
and prompt. Pass `previousSummary` for a direct call, or configure
|
|
389
|
+
`readPreviousSummary` for runtime-managed compaction, to merge and atomically
|
|
390
|
+
replace a leading summary on the next compaction.
|
|
391
|
+
Set `maxAttempts` to allow bounded conflict recovery. Every retry reloads the snapshot, reselects the
|
|
392
|
+
eligible range and recomputes the summary; the stale summary is never retried.
|
|
393
|
+
|
|
394
|
+
### Compacting without the store
|
|
395
|
+
|
|
396
|
+
The *selection* inside compaction needs no store, no version and no runtime, so
|
|
397
|
+
it is published on its own as `selectCompactableHistory` — for an application
|
|
398
|
+
that drives the model itself and keeps its own history (→ ADR 0142):
|
|
399
|
+
|
|
400
|
+
```ts
|
|
401
|
+
import { selectCompactableHistory } from 'stitchkit/agent-runtime'
|
|
402
|
+
|
|
403
|
+
const { leadingSummary, compactable, retained } = selectCompactableHistory({
|
|
404
|
+
messages,
|
|
405
|
+
keepRecentTurns: 3,
|
|
406
|
+
})
|
|
407
|
+
if (compactable.length > 0) {
|
|
408
|
+
const summary = await summarize(compactable, leadingSummary)
|
|
409
|
+
messages = [summary, ...retained] // replace the old summary, never stack one
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
`compactable` is the oldest **whole complete** turns and `retained` is
|
|
414
|
+
everything the model must still hear; together they are the input, in order. A
|
|
415
|
+
turn holding a tool call whose result never arrived is never eligible, and
|
|
416
|
+
neither is anything after it: half a turn hands the provider a call with no
|
|
417
|
+
result, which most of them refuse outright.
|
|
418
|
+
|
|
419
|
+
`structuredCompaction` calls this same function, so the published selection and
|
|
420
|
+
the runtime's cannot drift into two behaviours. What it adds is the part that
|
|
421
|
+
does need the store — writing the result back under a version check.
|
|
422
|
+
|
|
423
|
+
Deciding *when* to compact is yours: `AgentRuntimeRunContext.contextUsage`
|
|
424
|
+
carries the last step's prompt size beside the model's window, and dividing them
|
|
425
|
+
is one line where the threshold is decided. The core does not own that ratio, on
|
|
426
|
+
purpose — see ADR 0142 for what it publishes and what it declines to.
|
|
427
|
+
|
|
428
|
+
## Observability
|
|
429
|
+
|
|
430
|
+
`createAgentObservability` emits a separate operator-only `AgentRunEvent`. It
|
|
431
|
+
reuses the same bounded sink lifecycle as request/tool observability without
|
|
432
|
+
sending new event kinds to existing request sinks. Product events omit provider
|
|
433
|
+
causes. Operator `internalCause` is also redacted by default; an operator-only sink must explicitly
|
|
434
|
+
set `includeInternalCause` and own its retention policy.
|
|
435
|
+
|
|
436
|
+
### What a run says it spent
|
|
437
|
+
|
|
438
|
+
Usage values carry `provider-reported`, `computed`, `estimated` or `unavailable`
|
|
439
|
+
provenance, **per field**. Cost additionally carries an ISO currency code;
|
|
440
|
+
OpenRouter-reported cost is normalized as USD.
|
|
441
|
+
|
|
442
|
+
Read the provenance before the number (→ ADR 0109):
|
|
443
|
+
|
|
444
|
+
- **`provider-reported`** — the provider handed us exactly this. On
|
|
445
|
+
`step-finished`, that is what a step's figures are.
|
|
446
|
+
- **`computed`** — a total, added up over steps. **Every figure on a terminal
|
|
447
|
+
event is this**, tokens included: the AI SDK's `totalUsage` is a sum it
|
|
448
|
+
performed, not a number a provider reported for the run. It is not a figure to
|
|
449
|
+
bill against unchanged.
|
|
450
|
+
- **`unavailable`** — nobody reported it. Not zero.
|
|
451
|
+
|
|
452
|
+
Two rules follow from that last one, and they differ by field on purpose:
|
|
453
|
+
|
|
454
|
+
- **A token total with an unreported step is a floor**, labelled `computed`. A
|
|
455
|
+
token count is a diagnostic, and a floor is a useful one.
|
|
456
|
+
- **A cost with an unreported step is `unavailable`, not a floor.** Money is what
|
|
457
|
+
people bill against, and "at least $1.00" reported as `$1.00` is the same class
|
|
458
|
+
of lie this whole section exists to remove. One step that did not report its
|
|
459
|
+
cost makes the run's cost unknown — not smaller. It also stays unknown: later
|
|
460
|
+
steps reporting normally cannot revive it.
|
|
461
|
+
|
|
462
|
+
**A terminal event always carries `usage`.** A run that ended before the provider
|
|
463
|
+
reported anything — superseded, interrupted, timed out, shut down, failed —
|
|
464
|
+
carries every field `unavailable`. That is deliberately different from a run that
|
|
465
|
+
spent nothing, and an omitted object could not tell you which one you had.
|
|
466
|
+
|
|
467
|
+
Two costs in different currencies do not add: the sum reports `unavailable`
|
|
468
|
+
rather than picking a label. The core records a currency and never converts one.
|
|
469
|
+
|
|
470
|
+
`step-finished.response` identifies the provider response for that one step. The terminal event
|
|
471
|
+
does not copy the last response: response identity remains per-step, while every terminal usage
|
|
472
|
+
figure remains a `computed` aggregate.
|
|
473
|
+
|
|
474
|
+
**A run's figure is durable, and that is where to read it when a channel loses
|
|
475
|
+
it.** `AgentRun.usage` is written at every checkpoint and again with the terminal
|
|
476
|
+
record, so a crashed process leaves behind what it had already spent and a
|
|
477
|
+
dropped event is not a lost number:
|
|
478
|
+
|
|
479
|
+
```ts
|
|
480
|
+
const snapshot = await store.loadSnapshot(conversationId)
|
|
481
|
+
const spent = snapshot.runs.find((run) => run.id === runId)?.usage
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
Two gaps are open and are stated rather than left to be discovered:
|
|
485
|
+
|
|
486
|
+
- **Both event sinks are bounded and drop under load**, by arrival order — the
|
|
487
|
+
event carrying the money is exactly as droppable as the one carrying nothing.
|
|
488
|
+
The run record is the recovery, and this paragraph is the only place that says
|
|
489
|
+
so.
|
|
490
|
+
- **`AgentRuntimeResult.metrics` is `undefined` when this executor did not win
|
|
491
|
+
the terminal race.** Read `result.run.usage` — the durable figure — rather than
|
|
492
|
+
`result.metrics`, which is the channel that can go missing.
|
|
493
|
+
- **Compaction spend is invisible unless you report it.** `config.history.compact`
|
|
494
|
+
calls a model inside the turn and produces no step and no event of its own.
|
|
495
|
+
Return `usage` from `AgentCompactionResult` and it joins the run's figure;
|
|
496
|
+
omit it and the run under-reports by whatever summarising cost.
|
|
497
|
+
|
|
498
|
+
What stitchkit does **not** keep is a ledger: one figure, on the run that
|
|
499
|
+
produced it, never aggregated and never reconciled against a provider invoice
|
|
500
|
+
(→ ADR 0110).
|
|
501
|
+
|
|
502
|
+
### Reconciling with the provider's own accounting
|
|
503
|
+
|
|
504
|
+
Whether a provider bills for a call that was aborted mid-flight cannot be known
|
|
505
|
+
inside the process: the authoritative number arrives later, from the provider's
|
|
506
|
+
accounting. **stitchkit does not accept it back** (→ ADR 0110) — a terminal run
|
|
507
|
+
is an absorbing state, and a write that reached it through the conversation
|
|
508
|
+
aggregate could conflict a concurrent compaction into discarding a summary it had
|
|
509
|
+
just paid a model to produce.
|
|
510
|
+
|
|
511
|
+
The join is yours, and `runId` is the key:
|
|
512
|
+
|
|
513
|
+
```ts
|
|
514
|
+
// when the run terminates — write what the runtime observed
|
|
515
|
+
await ledger.record({
|
|
516
|
+
runId: terminal.run.id,
|
|
517
|
+
conversationId: terminal.run.conversationId,
|
|
518
|
+
// The durable figure, not `terminal.metrics` — that one is absent whenever
|
|
519
|
+
// this executor did not win the terminal race.
|
|
520
|
+
costUsd: terminal.run.usage?.cost?.value ?? null, // null when `unavailable`
|
|
521
|
+
provenance: terminal.run.usage?.cost?.provenance ?? 'unavailable',
|
|
522
|
+
})
|
|
523
|
+
|
|
524
|
+
// later — the provider's accounting names the same generation
|
|
525
|
+
await ledger.reconcile({ runId, costUsd: billed, provenance: 'provider-reported' })
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
Record the row even when the figure is `unavailable`: that row is the evidence
|
|
529
|
+
that a run happened and cost something nobody has counted yet, and it is what the
|
|
530
|
+
provider's later figure attaches to. A run with no row is a run you cannot
|
|
531
|
+
reconcile.
|
|
532
|
+
|
|
533
|
+
The sink deduplicates stable event IDs by default. Cross-crash exactly-once still requires a durable
|
|
534
|
+
outbox.
|
|
535
|
+
|
|
536
|
+
## Deterministic race and adapter proof
|
|
537
|
+
|
|
538
|
+
`stitchkit/agent-runtime/testing` exports `createAgentRaceBarrier`, `createAgentRaceDriver`,
|
|
539
|
+
`createAgentRaceTrace` and `runAgentStoreConformance` — agent testing tools live beside the agent
|
|
540
|
+
runtime, and `stitchkit/testing` imports none of it. Barriers have bounded teardown, traces assert exact partial order, and the
|
|
541
|
+
helpers are exercised from packed Bun and Node consumers. `runAgentStoreConformance` runs duplicate,
|
|
542
|
+
coalescing, collision, stale checkpoint, replay safety, terminal race, absorption, bounded reads,
|
|
543
|
+
causal queued-history order, durable interrupt priority, compaction and recovery invariants against
|
|
544
|
+
any fresh durable adapter.
|
|
545
|
+
|
|
546
|
+
It picks its conversation identities itself and passes them to `createStore(context)` **before the
|
|
547
|
+
first mutation**, so an adapter whose runtime rows reference an application-owned conversation row
|
|
548
|
+
can provision those parents; the optional `cleanup(context)` removes them again, and runs once
|
|
549
|
+
whether the scenario passed or failed. A factory that owns no fixture state ignores the argument and
|
|
550
|
+
keeps working unchanged.
|