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,1377 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createApplication
|
|
3
|
+
} from "../index-w906953s.js";
|
|
4
|
+
import"../index-3gye9wzb.js";
|
|
5
|
+
import"../index-2k4yrqkc.js";
|
|
6
|
+
import"../index-3z73fh2c.js";
|
|
7
|
+
import {
|
|
8
|
+
RealtimeRejectDirectionSchema,
|
|
9
|
+
RealtimeRejectFaultSchema,
|
|
10
|
+
RealtimeRejectPhaseSchema,
|
|
11
|
+
RealtimeRejectReasonSchema
|
|
12
|
+
} from "../index-p7hgdyhb.js";
|
|
13
|
+
import {
|
|
14
|
+
createClient,
|
|
15
|
+
createClients
|
|
16
|
+
} from "../index-ham5sz8m.js";
|
|
17
|
+
import {
|
|
18
|
+
RealtimeRequestDisconnectedError,
|
|
19
|
+
RealtimeRequestInvalidAcknowledgementError,
|
|
20
|
+
RealtimeRequestTimeoutError
|
|
21
|
+
} from "../index-dce5wxcq.js";
|
|
22
|
+
import"../index-48ffdxgk.js";
|
|
23
|
+
import"../index-wqgjfstn.js";
|
|
24
|
+
import"../index-v260df89.js";
|
|
25
|
+
import {
|
|
26
|
+
TOOL_TRANSPORTS
|
|
27
|
+
} from "../index-k30h66yd.js";
|
|
28
|
+
import {
|
|
29
|
+
joinRoutePath
|
|
30
|
+
} from "../index-4gcnakhx.js";
|
|
31
|
+
import"../index-zcgf3gqf.js";
|
|
32
|
+
import {
|
|
33
|
+
mcpProjectionCandidate,
|
|
34
|
+
prepareProjectedMcpTools,
|
|
35
|
+
projectToolSurface,
|
|
36
|
+
staticInputRounds
|
|
37
|
+
} from "../index-np4m8hd3.js";
|
|
38
|
+
import {
|
|
39
|
+
toJsonSchema
|
|
40
|
+
} from "../index-eqqvgdb3.js";
|
|
41
|
+
import"../index-znfs20ss.js";
|
|
42
|
+
import"../index-p5r7qpdd.js";
|
|
43
|
+
import"../index-2vtcmrj9.js";
|
|
44
|
+
import {
|
|
45
|
+
compareCodeUnits,
|
|
46
|
+
serializeCanonicalJson
|
|
47
|
+
} from "../index-k5hsfc3j.js";
|
|
48
|
+
import"../index-kzfs85xp.js";
|
|
49
|
+
import {
|
|
50
|
+
isRecord
|
|
51
|
+
} from "../index-hffjpmq9.js";
|
|
52
|
+
|
|
53
|
+
// src/testing/handler-clients.ts
|
|
54
|
+
function resolveTestBaseUrl(origin, pathPrefix) {
|
|
55
|
+
const base = new URL(origin ?? "http://stitchkit.test");
|
|
56
|
+
if (base.pathname !== "/" || base.search || base.hash) {
|
|
57
|
+
throw new TypeError("Handler test client origin must contain only an absolute origin");
|
|
58
|
+
}
|
|
59
|
+
const prefix = pathPrefix?.replace(/^\/+|\/+$/g, "");
|
|
60
|
+
return prefix ? `${base.origin}/${prefix}` : base.origin;
|
|
61
|
+
}
|
|
62
|
+
function createHandlerFetch(handler, server) {
|
|
63
|
+
return async (input, init) => handler(new Request(input, init), server);
|
|
64
|
+
}
|
|
65
|
+
function createTestClientConfig(config) {
|
|
66
|
+
return {
|
|
67
|
+
...config.client,
|
|
68
|
+
baseUrl: resolveTestBaseUrl(config.origin, config.pathPrefix),
|
|
69
|
+
fetch: createHandlerFetch(config.handler, config.server)
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function createHandlerTestClient(config) {
|
|
73
|
+
return createClient(config.contract, createTestClientConfig(config), config.contractConfig);
|
|
74
|
+
}
|
|
75
|
+
function createHandlerTestClients(config) {
|
|
76
|
+
return createClients(config.contracts, createTestClientConfig(config), config.contractConfig);
|
|
77
|
+
}
|
|
78
|
+
// src/testing/managed-resource-conformance-contract.ts
|
|
79
|
+
import { z } from "zod";
|
|
80
|
+
var ManagedResourceConformanceScenarioIdSchema = z.enum([
|
|
81
|
+
"clean-shutdown",
|
|
82
|
+
"partial-start-rollback",
|
|
83
|
+
"readiness-rejection",
|
|
84
|
+
"completion-before-ready",
|
|
85
|
+
"required-late-completion",
|
|
86
|
+
"optional-late-completion",
|
|
87
|
+
"activation-rejection",
|
|
88
|
+
"shutdown-during-startup",
|
|
89
|
+
"force-after-stalled-close"
|
|
90
|
+
]);
|
|
91
|
+
var ManagedResourceConformanceScenarioSchema = z.discriminatedUnion("id", [
|
|
92
|
+
z.object({ id: z.literal("clean-shutdown"), required: z.literal(true) }).readonly(),
|
|
93
|
+
z.object({ id: z.literal("partial-start-rollback"), required: z.literal(true) }).readonly(),
|
|
94
|
+
z.object({ id: z.literal("readiness-rejection"), required: z.literal(true) }).readonly(),
|
|
95
|
+
z.object({ id: z.literal("completion-before-ready"), required: z.literal(true) }).readonly(),
|
|
96
|
+
z.object({ id: z.literal("required-late-completion"), required: z.literal(true) }).readonly(),
|
|
97
|
+
z.object({ id: z.literal("optional-late-completion"), required: z.literal(false) }).readonly(),
|
|
98
|
+
z.object({ id: z.literal("activation-rejection"), required: z.literal(true) }).readonly(),
|
|
99
|
+
z.object({ id: z.literal("shutdown-during-startup"), required: z.literal(true) }).readonly(),
|
|
100
|
+
z.object({ id: z.literal("force-after-stalled-close"), required: z.literal(true) }).readonly()
|
|
101
|
+
]);
|
|
102
|
+
var ManagedResourceConformancePhaseSchema = z.enum([
|
|
103
|
+
"start",
|
|
104
|
+
"readiness",
|
|
105
|
+
"completion",
|
|
106
|
+
"activate",
|
|
107
|
+
"stop-admission",
|
|
108
|
+
"drain",
|
|
109
|
+
"close",
|
|
110
|
+
"force",
|
|
111
|
+
"dispose"
|
|
112
|
+
]);
|
|
113
|
+
var ManagedResourceConformanceTraceOutcomeSchema = z.enum([
|
|
114
|
+
"enter",
|
|
115
|
+
"resolve",
|
|
116
|
+
"reject"
|
|
117
|
+
]);
|
|
118
|
+
var ManagedResourceConformanceTraceEntrySchema = z.object({
|
|
119
|
+
sequence: z.number().int().nonnegative(),
|
|
120
|
+
phase: ManagedResourceConformancePhaseSchema,
|
|
121
|
+
outcome: ManagedResourceConformanceTraceOutcomeSchema
|
|
122
|
+
}).strict().readonly();
|
|
123
|
+
|
|
124
|
+
class ManagedResourceConformanceError extends Error {
|
|
125
|
+
scenarioId;
|
|
126
|
+
expected;
|
|
127
|
+
trace;
|
|
128
|
+
code = "MANAGED_RESOURCE_CONFORMANCE_FAILED";
|
|
129
|
+
constructor(scenarioId, expected, trace, detail) {
|
|
130
|
+
const observed = trace.length === 0 ? "(empty)" : trace.map((entry) => `${entry.phase}:${entry.outcome}`).join(" -> ");
|
|
131
|
+
super(`[stitchkit] managed resource conformance "${scenarioId}" failed: ${detail}; ` + `expected ${expected.join(" -> ")}; observed ${observed}`);
|
|
132
|
+
this.scenarioId = scenarioId;
|
|
133
|
+
this.expected = expected;
|
|
134
|
+
this.trace = trace;
|
|
135
|
+
this.name = "ManagedResourceConformanceError";
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// src/testing/managed-resource-conformance-driver.ts
|
|
140
|
+
function controlledPromise() {
|
|
141
|
+
const deferred = Promise.withResolvers();
|
|
142
|
+
let settled = false;
|
|
143
|
+
deferred.promise.catch(() => {
|
|
144
|
+
return;
|
|
145
|
+
});
|
|
146
|
+
return {
|
|
147
|
+
promise: deferred.promise,
|
|
148
|
+
resolve() {
|
|
149
|
+
if (settled)
|
|
150
|
+
return false;
|
|
151
|
+
settled = true;
|
|
152
|
+
deferred.resolve();
|
|
153
|
+
return true;
|
|
154
|
+
},
|
|
155
|
+
reject(error) {
|
|
156
|
+
if (settled)
|
|
157
|
+
return false;
|
|
158
|
+
settled = true;
|
|
159
|
+
deferred.reject(error);
|
|
160
|
+
return true;
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
class ManagedResourceConformanceTrace {
|
|
166
|
+
entries = [];
|
|
167
|
+
waiters = new Set;
|
|
168
|
+
record(phase, outcome) {
|
|
169
|
+
const entry = ManagedResourceConformanceTraceEntrySchema.parse({
|
|
170
|
+
sequence: this.entries.length,
|
|
171
|
+
phase,
|
|
172
|
+
outcome
|
|
173
|
+
});
|
|
174
|
+
this.entries.push(entry);
|
|
175
|
+
for (const waiter of this.waiters) {
|
|
176
|
+
if (waiter.phase !== phase || waiter.outcome !== outcome)
|
|
177
|
+
continue;
|
|
178
|
+
this.waiters.delete(waiter);
|
|
179
|
+
waiter.resolve();
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
has(phase, outcome) {
|
|
183
|
+
return this.entries.some((entry) => entry.phase === phase && entry.outcome === outcome);
|
|
184
|
+
}
|
|
185
|
+
count(phase, outcome) {
|
|
186
|
+
return this.entries.filter((entry) => entry.phase === phase && entry.outcome === outcome).length;
|
|
187
|
+
}
|
|
188
|
+
waitFor(phase, outcome = "enter") {
|
|
189
|
+
if (this.has(phase, outcome))
|
|
190
|
+
return Promise.resolve();
|
|
191
|
+
return new Promise((resolve) => this.waiters.add({ phase, outcome, resolve }));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
function createManagedResourceConformanceGates(trace) {
|
|
195
|
+
const startup = controlledPromise();
|
|
196
|
+
const readiness = controlledPromise();
|
|
197
|
+
const completion = controlledPromise();
|
|
198
|
+
const activation = controlledPromise();
|
|
199
|
+
const close = controlledPromise();
|
|
200
|
+
const force = controlledPromise();
|
|
201
|
+
const gateFor = (phase) => {
|
|
202
|
+
if (phase === "start")
|
|
203
|
+
return startup;
|
|
204
|
+
if (phase === "readiness")
|
|
205
|
+
return readiness;
|
|
206
|
+
if (phase === "completion")
|
|
207
|
+
return completion;
|
|
208
|
+
if (phase === "activate")
|
|
209
|
+
return activation;
|
|
210
|
+
if (phase === "close")
|
|
211
|
+
return close;
|
|
212
|
+
return force;
|
|
213
|
+
};
|
|
214
|
+
const resolve = (phase) => {
|
|
215
|
+
if (gateFor(phase).resolve())
|
|
216
|
+
trace.record(phase, "resolve");
|
|
217
|
+
};
|
|
218
|
+
return {
|
|
219
|
+
controls: {
|
|
220
|
+
startup: startup.promise,
|
|
221
|
+
readiness: readiness.promise,
|
|
222
|
+
completion: completion.promise,
|
|
223
|
+
activation: activation.promise,
|
|
224
|
+
close: close.promise,
|
|
225
|
+
force: force.promise
|
|
226
|
+
},
|
|
227
|
+
resolve,
|
|
228
|
+
reject(phase, error) {
|
|
229
|
+
if (gateFor(phase).reject(error))
|
|
230
|
+
trace.record(phase, "reject");
|
|
231
|
+
},
|
|
232
|
+
releaseAll() {
|
|
233
|
+
resolve("start");
|
|
234
|
+
resolve("readiness");
|
|
235
|
+
resolve("completion");
|
|
236
|
+
resolve("activate");
|
|
237
|
+
resolve("close");
|
|
238
|
+
resolve("force");
|
|
239
|
+
}
|
|
240
|
+
};
|
|
241
|
+
}
|
|
242
|
+
async function observePhase(trace, phase, invoke) {
|
|
243
|
+
trace.record(phase, "enter");
|
|
244
|
+
try {
|
|
245
|
+
const value = await invoke();
|
|
246
|
+
trace.record(phase, "resolve");
|
|
247
|
+
return value;
|
|
248
|
+
} catch (error) {
|
|
249
|
+
trace.record(phase, "reject");
|
|
250
|
+
throw error;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
function optionalPhase(resource, trace, phase, invoke) {
|
|
254
|
+
if (!invoke)
|
|
255
|
+
return {};
|
|
256
|
+
return {
|
|
257
|
+
[phase]: (context) => observePhase(trace, phase, () => invoke.call(resource, context))
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function observeManagedResource(resource, required, trace) {
|
|
261
|
+
const start = async (context) => {
|
|
262
|
+
trace.record("start", "enter");
|
|
263
|
+
try {
|
|
264
|
+
const value = await resource.start(context);
|
|
265
|
+
trace.record("start", "resolve");
|
|
266
|
+
if (value === undefined)
|
|
267
|
+
return;
|
|
268
|
+
return value;
|
|
269
|
+
} catch (error) {
|
|
270
|
+
trace.record("start", "reject");
|
|
271
|
+
throw error;
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
return {
|
|
275
|
+
id: resource.id,
|
|
276
|
+
required,
|
|
277
|
+
start,
|
|
278
|
+
...optionalPhase(resource, trace, "activate", resource.activate),
|
|
279
|
+
...resource.stopAdmission ? {
|
|
280
|
+
stopAdmission: (context) => observePhase(trace, "stop-admission", () => resource.stopAdmission?.call(resource, context))
|
|
281
|
+
} : {},
|
|
282
|
+
...optionalPhase(resource, trace, "drain", resource.drain),
|
|
283
|
+
...optionalPhase(resource, trace, "close", resource.close),
|
|
284
|
+
...optionalPhase(resource, trace, "force", resource.force)
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
// src/testing/managed-resource-conformance-scenarios.ts
|
|
289
|
+
var MANAGED_RESOURCE_CONFORMANCE_SCENARIOS = ManagedResourceConformanceScenarioSchema.array().parse([
|
|
290
|
+
{ id: "clean-shutdown", required: true },
|
|
291
|
+
{ id: "partial-start-rollback", required: true },
|
|
292
|
+
{ id: "readiness-rejection", required: true },
|
|
293
|
+
{ id: "completion-before-ready", required: true },
|
|
294
|
+
{ id: "required-late-completion", required: true },
|
|
295
|
+
{ id: "optional-late-completion", required: false },
|
|
296
|
+
{ id: "activation-rejection", required: true },
|
|
297
|
+
{ id: "shutdown-during-startup", required: true },
|
|
298
|
+
{ id: "force-after-stalled-close", required: true }
|
|
299
|
+
]);
|
|
300
|
+
var EXPECTED_TRACE = {
|
|
301
|
+
"clean-shutdown": [
|
|
302
|
+
"start:enter",
|
|
303
|
+
"start:resolve",
|
|
304
|
+
"readiness:resolve",
|
|
305
|
+
"activate:enter",
|
|
306
|
+
"activate:resolve",
|
|
307
|
+
"stop-admission:enter",
|
|
308
|
+
"drain:enter",
|
|
309
|
+
"close:enter",
|
|
310
|
+
"close:resolve"
|
|
311
|
+
],
|
|
312
|
+
"partial-start-rollback": ["start:enter", "start:reject", "close:enter", "close:resolve"],
|
|
313
|
+
"readiness-rejection": [
|
|
314
|
+
"start:enter",
|
|
315
|
+
"start:resolve",
|
|
316
|
+
"readiness:reject",
|
|
317
|
+
"close:enter",
|
|
318
|
+
"close:resolve"
|
|
319
|
+
],
|
|
320
|
+
"completion-before-ready": [
|
|
321
|
+
"start:enter",
|
|
322
|
+
"start:resolve",
|
|
323
|
+
"completion:reject",
|
|
324
|
+
"close:enter",
|
|
325
|
+
"close:resolve"
|
|
326
|
+
],
|
|
327
|
+
"required-late-completion": [
|
|
328
|
+
"activate:resolve",
|
|
329
|
+
"completion:reject",
|
|
330
|
+
"stop-admission:enter",
|
|
331
|
+
"drain:enter",
|
|
332
|
+
"close:enter"
|
|
333
|
+
],
|
|
334
|
+
"optional-late-completion": [
|
|
335
|
+
"activate:resolve",
|
|
336
|
+
"completion:reject",
|
|
337
|
+
"stop-admission:enter",
|
|
338
|
+
"drain:enter",
|
|
339
|
+
"close:enter"
|
|
340
|
+
],
|
|
341
|
+
"activation-rejection": [
|
|
342
|
+
"readiness:resolve",
|
|
343
|
+
"activate:enter",
|
|
344
|
+
"activate:reject",
|
|
345
|
+
"close:enter",
|
|
346
|
+
"close:resolve"
|
|
347
|
+
],
|
|
348
|
+
"shutdown-during-startup": ["start:enter", "start:resolve", "close:enter", "close:resolve"],
|
|
349
|
+
"force-after-stalled-close": [
|
|
350
|
+
"stop-admission:enter",
|
|
351
|
+
"drain:enter",
|
|
352
|
+
"close:enter",
|
|
353
|
+
"force:enter",
|
|
354
|
+
"force:resolve"
|
|
355
|
+
]
|
|
356
|
+
};
|
|
357
|
+
function outcomeOf(promise) {
|
|
358
|
+
return promise.then(() => ({ status: "resolved" }), (error) => ({ status: "rejected", error }));
|
|
359
|
+
}
|
|
360
|
+
function requireCondition(condition, detail) {
|
|
361
|
+
if (!condition)
|
|
362
|
+
throw new Error(detail);
|
|
363
|
+
}
|
|
364
|
+
function observedTrace(trace) {
|
|
365
|
+
return trace.entries.map((entry) => `${entry.phase}:${entry.outcome}`);
|
|
366
|
+
}
|
|
367
|
+
function requireTrace(runtime) {
|
|
368
|
+
const expected = EXPECTED_TRACE[runtime.scenario.id];
|
|
369
|
+
const observed = observedTrace(runtime.trace);
|
|
370
|
+
let cursor = 0;
|
|
371
|
+
for (const entry of observed) {
|
|
372
|
+
if (entry === expected[cursor])
|
|
373
|
+
cursor += 1;
|
|
374
|
+
}
|
|
375
|
+
requireCondition(cursor === expected.length, `phase trace omitted or reordered "${expected[cursor] ?? "unknown"}"`);
|
|
376
|
+
}
|
|
377
|
+
async function phaseOrSettlement(trace, phase, settlement) {
|
|
378
|
+
return Promise.race([
|
|
379
|
+
trace.waitFor(phase).then(() => "phase"),
|
|
380
|
+
settlement.then(() => "settled", () => "settled")
|
|
381
|
+
]);
|
|
382
|
+
}
|
|
383
|
+
async function startSuccessfully(runtime) {
|
|
384
|
+
const starting = runtime.application.start();
|
|
385
|
+
const startOutcome = outcomeOf(starting);
|
|
386
|
+
await runtime.trace.waitFor("start");
|
|
387
|
+
runtime.gates.resolve("start");
|
|
388
|
+
runtime.gates.resolve("readiness");
|
|
389
|
+
const activation = await Promise.race([
|
|
390
|
+
runtime.trace.waitFor("activate").then(() => ({ status: "resolved" })),
|
|
391
|
+
startOutcome
|
|
392
|
+
]);
|
|
393
|
+
if (activation.status === "rejected")
|
|
394
|
+
throw activation.error;
|
|
395
|
+
runtime.gates.resolve("activate");
|
|
396
|
+
const outcome = await startOutcome;
|
|
397
|
+
requireCondition(outcome.status === "resolved", "application did not complete successful startup");
|
|
398
|
+
}
|
|
399
|
+
async function closeNormally(runtime) {
|
|
400
|
+
const shuttingDown = runtime.application.shutdown();
|
|
401
|
+
const close = await phaseOrSettlement(runtime.trace, "close", shuttingDown);
|
|
402
|
+
if (close === "phase")
|
|
403
|
+
runtime.gates.resolve("close");
|
|
404
|
+
const outcome = await outcomeOf(shuttingDown);
|
|
405
|
+
requireCondition(outcome.status === "resolved", "application shutdown rejected");
|
|
406
|
+
}
|
|
407
|
+
async function expectStartupFailure(runtime, starting) {
|
|
408
|
+
const close = await phaseOrSettlement(runtime.trace, "close", starting);
|
|
409
|
+
if (close === "phase")
|
|
410
|
+
runtime.gates.resolve("close");
|
|
411
|
+
const outcome = await outcomeOf(starting);
|
|
412
|
+
if (outcome.status === "resolved") {
|
|
413
|
+
await closeNormally(runtime);
|
|
414
|
+
throw new Error("application startup unexpectedly resolved");
|
|
415
|
+
}
|
|
416
|
+
requireCondition(runtime.trace.count("close", "enter") === 1, "attempted resource was not closed once");
|
|
417
|
+
await runtime.application.shutdown();
|
|
418
|
+
}
|
|
419
|
+
function waitForSnapshot(application, predicate) {
|
|
420
|
+
const deferred = Promise.withResolvers();
|
|
421
|
+
let unsubscribe = () => {
|
|
422
|
+
return;
|
|
423
|
+
};
|
|
424
|
+
unsubscribe = application.subscribe((snapshot) => {
|
|
425
|
+
if (!predicate(snapshot))
|
|
426
|
+
return;
|
|
427
|
+
unsubscribe();
|
|
428
|
+
deferred.resolve(snapshot);
|
|
429
|
+
});
|
|
430
|
+
return deferred.promise;
|
|
431
|
+
}
|
|
432
|
+
async function cleanShutdown(runtime) {
|
|
433
|
+
await startSuccessfully(runtime);
|
|
434
|
+
await closeNormally(runtime);
|
|
435
|
+
requireCondition(runtime.application.getSnapshot().lifecycle === "stopped", "clean shutdown did not stop the application");
|
|
436
|
+
}
|
|
437
|
+
async function partialStartRollback(runtime) {
|
|
438
|
+
const starting = runtime.application.start();
|
|
439
|
+
await runtime.trace.waitFor("start");
|
|
440
|
+
runtime.gates.reject("start", new Error("controlled partial startup rejection"));
|
|
441
|
+
await expectStartupFailure(runtime, starting);
|
|
442
|
+
}
|
|
443
|
+
async function readinessRejection(runtime) {
|
|
444
|
+
const starting = runtime.application.start();
|
|
445
|
+
await runtime.trace.waitFor("start");
|
|
446
|
+
runtime.gates.resolve("start");
|
|
447
|
+
await runtime.trace.waitFor("start", "resolve");
|
|
448
|
+
runtime.gates.reject("readiness", new Error("controlled readiness rejection"));
|
|
449
|
+
runtime.gates.resolve("activate");
|
|
450
|
+
await expectStartupFailure(runtime, starting);
|
|
451
|
+
}
|
|
452
|
+
async function completionBeforeReady(runtime) {
|
|
453
|
+
const starting = runtime.application.start();
|
|
454
|
+
await runtime.trace.waitFor("start");
|
|
455
|
+
runtime.gates.resolve("start");
|
|
456
|
+
await runtime.trace.waitFor("start", "resolve");
|
|
457
|
+
runtime.gates.reject("completion", new Error("controlled early completion rejection"));
|
|
458
|
+
runtime.gates.resolve("readiness");
|
|
459
|
+
runtime.gates.resolve("activate");
|
|
460
|
+
await expectStartupFailure(runtime, starting);
|
|
461
|
+
}
|
|
462
|
+
async function lateCompletion(runtime) {
|
|
463
|
+
await startSuccessfully(runtime);
|
|
464
|
+
const expectedHealth = runtime.scenario.required ? "unhealthy" : "degraded";
|
|
465
|
+
const changed = waitForSnapshot(runtime.application, (snapshot2) => snapshot2.health === expectedHealth);
|
|
466
|
+
runtime.gates.reject("completion", new Error("controlled late completion rejection"));
|
|
467
|
+
const snapshot = await changed;
|
|
468
|
+
requireCondition(snapshot.lifecycle === "ready", "late completion changed lifecycle ownership");
|
|
469
|
+
requireCondition(snapshot.health === expectedHealth, "late completion projected the wrong health");
|
|
470
|
+
requireCondition(snapshot.ready === !runtime.scenario.required, "late completion projected the wrong readiness");
|
|
471
|
+
requireCondition(snapshot.admission.accepting === !runtime.scenario.required, "late completion projected the wrong admission state");
|
|
472
|
+
await closeNormally(runtime);
|
|
473
|
+
}
|
|
474
|
+
async function activationRejection(runtime) {
|
|
475
|
+
const starting = runtime.application.start();
|
|
476
|
+
await runtime.trace.waitFor("start");
|
|
477
|
+
runtime.gates.resolve("start");
|
|
478
|
+
await runtime.trace.waitFor("start", "resolve");
|
|
479
|
+
runtime.gates.resolve("readiness");
|
|
480
|
+
await runtime.trace.waitFor("activate");
|
|
481
|
+
runtime.gates.reject("activate", new Error("controlled activation rejection"));
|
|
482
|
+
await expectStartupFailure(runtime, starting);
|
|
483
|
+
}
|
|
484
|
+
async function shutdownDuringStartup(runtime) {
|
|
485
|
+
const starting = runtime.application.start();
|
|
486
|
+
await runtime.trace.waitFor("start");
|
|
487
|
+
const shuttingDown = runtime.application.shutdown();
|
|
488
|
+
runtime.gates.resolve("start");
|
|
489
|
+
const close = await phaseOrSettlement(runtime.trace, "close", shuttingDown);
|
|
490
|
+
if (close === "phase")
|
|
491
|
+
runtime.gates.resolve("close");
|
|
492
|
+
const [startOutcome, shutdownOutcome] = await Promise.all([
|
|
493
|
+
outcomeOf(starting),
|
|
494
|
+
outcomeOf(shuttingDown)
|
|
495
|
+
]);
|
|
496
|
+
requireCondition(startOutcome.status === "rejected", "startup won the shutdown race");
|
|
497
|
+
requireCondition(shutdownOutcome.status === "resolved", "shutdown race rejected");
|
|
498
|
+
requireCondition(!runtime.trace.has("activate", "enter"), "resource activated after shutdown won");
|
|
499
|
+
}
|
|
500
|
+
async function forceAfterStalledClose(runtime) {
|
|
501
|
+
await startSuccessfully(runtime);
|
|
502
|
+
const controller = new AbortController;
|
|
503
|
+
const shuttingDown = runtime.application.shutdown({
|
|
504
|
+
gracePeriodMs: 60000,
|
|
505
|
+
forceTimeoutMs: 60000,
|
|
506
|
+
signal: controller.signal
|
|
507
|
+
});
|
|
508
|
+
await runtime.trace.waitFor("close");
|
|
509
|
+
controller.abort();
|
|
510
|
+
const force = await phaseOrSettlement(runtime.trace, "force", shuttingDown);
|
|
511
|
+
if (force === "phase")
|
|
512
|
+
runtime.gates.resolve("force");
|
|
513
|
+
const result = await shuttingDown;
|
|
514
|
+
requireCondition(runtime.trace.count("close", "enter") === 1, "close was not invoked exactly once");
|
|
515
|
+
requireCondition(runtime.trace.count("force", "enter") === 1, "unfinished close did not invoke force");
|
|
516
|
+
requireCondition(result.outcome === "forced", "forced shutdown reported a clean outcome");
|
|
517
|
+
requireCondition(result.reason === "signal", "forced shutdown lost its signal reason");
|
|
518
|
+
runtime.gates.resolve("close");
|
|
519
|
+
}
|
|
520
|
+
function expectedManagedResourceConformanceTrace(scenarioId) {
|
|
521
|
+
return EXPECTED_TRACE[scenarioId];
|
|
522
|
+
}
|
|
523
|
+
async function executeManagedResourceConformanceScenario(scenario, resource, gates, trace) {
|
|
524
|
+
const application = createApplication({
|
|
525
|
+
id: `conformance-${scenario.id}`,
|
|
526
|
+
resources: [observeManagedResource(resource, scenario.required, trace)]
|
|
527
|
+
});
|
|
528
|
+
const runtime = { scenario, application, gates, trace };
|
|
529
|
+
if (scenario.id === "clean-shutdown")
|
|
530
|
+
await cleanShutdown(runtime);
|
|
531
|
+
else if (scenario.id === "partial-start-rollback")
|
|
532
|
+
await partialStartRollback(runtime);
|
|
533
|
+
else if (scenario.id === "readiness-rejection")
|
|
534
|
+
await readinessRejection(runtime);
|
|
535
|
+
else if (scenario.id === "completion-before-ready")
|
|
536
|
+
await completionBeforeReady(runtime);
|
|
537
|
+
else if (scenario.id === "required-late-completion" || scenario.id === "optional-late-completion") {
|
|
538
|
+
await lateCompletion(runtime);
|
|
539
|
+
} else if (scenario.id === "activation-rejection")
|
|
540
|
+
await activationRejection(runtime);
|
|
541
|
+
else if (scenario.id === "shutdown-during-startup")
|
|
542
|
+
await shutdownDuringStartup(runtime);
|
|
543
|
+
else
|
|
544
|
+
await forceAfterStalledClose(runtime);
|
|
545
|
+
requireTrace(runtime);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
// src/testing/managed-resource-conformance.ts
|
|
549
|
+
var DEFAULT_WATCHDOG_TIMEOUT_MS = 2000;
|
|
550
|
+
|
|
551
|
+
class ManagedResourceConformanceWatchdogError extends Error {
|
|
552
|
+
phase;
|
|
553
|
+
constructor(phase) {
|
|
554
|
+
super(`emergency watchdog expired during ${phase}`);
|
|
555
|
+
this.phase = phase;
|
|
556
|
+
this.name = "ManagedResourceConformanceWatchdogError";
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
async function withWatchdog(promise, timeoutMs, phase) {
|
|
560
|
+
let timer;
|
|
561
|
+
const watchdog = new Promise((_resolve, reject) => {
|
|
562
|
+
timer = setTimeout(() => reject(new ManagedResourceConformanceWatchdogError(phase)), timeoutMs);
|
|
563
|
+
});
|
|
564
|
+
try {
|
|
565
|
+
return await Promise.race([promise, watchdog]);
|
|
566
|
+
} finally {
|
|
567
|
+
if (timer !== undefined)
|
|
568
|
+
clearTimeout(timer);
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
function detailOf(error) {
|
|
572
|
+
if (error instanceof ManagedResourceConformanceWatchdogError)
|
|
573
|
+
return error.message;
|
|
574
|
+
if (error instanceof Error)
|
|
575
|
+
return error.message;
|
|
576
|
+
return "unknown conformance failure";
|
|
577
|
+
}
|
|
578
|
+
async function runScenario(config, scenario, watchdogTimeoutMs) {
|
|
579
|
+
const trace = new ManagedResourceConformanceTrace;
|
|
580
|
+
const gates = createManagedResourceConformanceGates(trace);
|
|
581
|
+
const fixture = await withWatchdog(Promise.resolve().then(() => config.createFixture({ scenario, controls: gates.controls })), watchdogTimeoutMs, "factory").catch((error) => {
|
|
582
|
+
throw new ManagedResourceConformanceError(scenario.id, expectedManagedResourceConformanceTrace(scenario.id), trace.entries, detailOf(error));
|
|
583
|
+
});
|
|
584
|
+
let failure;
|
|
585
|
+
const execution = executeManagedResourceConformanceScenario(scenario, fixture.resource, gates, trace);
|
|
586
|
+
execution.catch(() => {
|
|
587
|
+
return;
|
|
588
|
+
});
|
|
589
|
+
let settlementIncomplete = false;
|
|
590
|
+
try {
|
|
591
|
+
await withWatchdog(execution, watchdogTimeoutMs, "scenario");
|
|
592
|
+
} catch (error) {
|
|
593
|
+
failure = { value: error };
|
|
594
|
+
} finally {
|
|
595
|
+
gates.releaseAll();
|
|
596
|
+
if (failure?.value instanceof ManagedResourceConformanceWatchdogError) {
|
|
597
|
+
try {
|
|
598
|
+
await withWatchdog(execution, watchdogTimeoutMs, "settlement");
|
|
599
|
+
} catch (error) {
|
|
600
|
+
if (error instanceof ManagedResourceConformanceWatchdogError) {
|
|
601
|
+
settlementIncomplete = true;
|
|
602
|
+
} else {
|
|
603
|
+
failure = { value: error };
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
trace.record("dispose", "enter");
|
|
608
|
+
try {
|
|
609
|
+
await withWatchdog(Promise.resolve(fixture.dispose()), watchdogTimeoutMs, "dispose");
|
|
610
|
+
trace.record("dispose", "resolve");
|
|
611
|
+
} catch (error) {
|
|
612
|
+
trace.record("dispose", "reject");
|
|
613
|
+
if (failure === undefined)
|
|
614
|
+
failure = { value: error };
|
|
615
|
+
}
|
|
616
|
+
if (settlementIncomplete) {
|
|
617
|
+
try {
|
|
618
|
+
await withWatchdog(execution, watchdogTimeoutMs, "settlement");
|
|
619
|
+
settlementIncomplete = false;
|
|
620
|
+
} catch (error) {
|
|
621
|
+
if (error instanceof ManagedResourceConformanceWatchdogError) {
|
|
622
|
+
const original = failure?.value;
|
|
623
|
+
failure = {
|
|
624
|
+
value: new Error(`${detailOf(original)}; execution remained live after fixture disposal`)
|
|
625
|
+
};
|
|
626
|
+
} else {
|
|
627
|
+
settlementIncomplete = false;
|
|
628
|
+
failure = { value: error };
|
|
629
|
+
}
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
if (failure !== undefined) {
|
|
634
|
+
if (failure.value instanceof ManagedResourceConformanceError)
|
|
635
|
+
throw failure.value;
|
|
636
|
+
throw new ManagedResourceConformanceError(scenario.id, expectedManagedResourceConformanceTrace(scenario.id), trace.entries, detailOf(failure.value));
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
async function runManagedResourceConformance(config) {
|
|
640
|
+
const watchdogTimeoutMs = config.watchdogTimeoutMs ?? DEFAULT_WATCHDOG_TIMEOUT_MS;
|
|
641
|
+
if (!Number.isSafeInteger(watchdogTimeoutMs) || watchdogTimeoutMs <= 0) {
|
|
642
|
+
throw new TypeError("[stitchkit] managed resource conformance watchdogTimeoutMs must be positive");
|
|
643
|
+
}
|
|
644
|
+
const selected = new Set((config.scenarios ?? MANAGED_RESOURCE_CONFORMANCE_SCENARIOS.map((scenario) => scenario.id)).map((scenario) => ManagedResourceConformanceScenarioIdSchema.parse(scenario)));
|
|
645
|
+
if (selected.size === 0) {
|
|
646
|
+
throw new TypeError("[stitchkit] managed resource conformance scenarios must not be empty");
|
|
647
|
+
}
|
|
648
|
+
for (const scenario of MANAGED_RESOURCE_CONFORMANCE_SCENARIOS) {
|
|
649
|
+
if (!selected.has(scenario.id))
|
|
650
|
+
continue;
|
|
651
|
+
await runScenario(config, scenario, watchdogTimeoutMs);
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
// src/testing/surface-conformance.ts
|
|
655
|
+
import { z as z3 } from "zod";
|
|
656
|
+
|
|
657
|
+
// src/testing/surface-manifest.ts
|
|
658
|
+
import { z as z2 } from "zod";
|
|
659
|
+
|
|
660
|
+
// src/testing/surface-manifest-digest.ts
|
|
661
|
+
import { createHash } from "node:crypto";
|
|
662
|
+
function digestValue(value) {
|
|
663
|
+
return createHash("sha256").update(serializeCanonicalJson(value)).digest("hex").slice(0, 16);
|
|
664
|
+
}
|
|
665
|
+
function canonicalSchemaValue(value, parentKey) {
|
|
666
|
+
if (Array.isArray(value)) {
|
|
667
|
+
const entries = value.map((entry) => canonicalSchemaValue(entry));
|
|
668
|
+
return parentKey === "required" && entries.every((entry) => typeof entry === "string") ? entries.sort((left, right) => compareCodeUnits(String(left), String(right))) : entries;
|
|
669
|
+
}
|
|
670
|
+
if (!isRecord(value))
|
|
671
|
+
return value;
|
|
672
|
+
const result = {};
|
|
673
|
+
for (const key of Object.keys(value).sort(compareCodeUnits)) {
|
|
674
|
+
result[key] = canonicalSchemaValue(value[key], key);
|
|
675
|
+
}
|
|
676
|
+
return result;
|
|
677
|
+
}
|
|
678
|
+
function schemaDigest(schema, io) {
|
|
679
|
+
if (!schema)
|
|
680
|
+
return null;
|
|
681
|
+
return digestValue(canonicalSchemaValue(toJsonSchema(schema, io, "any")));
|
|
682
|
+
}
|
|
683
|
+
function presentationDigest(schema) {
|
|
684
|
+
return digestValue(canonicalSchemaValue(schema));
|
|
685
|
+
}
|
|
686
|
+
function multipartDigest(value) {
|
|
687
|
+
return value === undefined ? null : digestValue(value);
|
|
688
|
+
}
|
|
689
|
+
function operationKey(kind, service, action) {
|
|
690
|
+
return `${kind}\x00${service}\x00${action}`;
|
|
691
|
+
}
|
|
692
|
+
function operationFrom(kind, source) {
|
|
693
|
+
return {
|
|
694
|
+
kind,
|
|
695
|
+
service: source.serviceName,
|
|
696
|
+
action: source.key,
|
|
697
|
+
method: source.method,
|
|
698
|
+
scope: source.scope ?? null,
|
|
699
|
+
description: source.desc,
|
|
700
|
+
schemas: {
|
|
701
|
+
params: schemaDigest(source.paramsSchema, "input"),
|
|
702
|
+
input: schemaDigest(source.inputSchema, "input"),
|
|
703
|
+
output: schemaDigest(source.outputSchema, "output"),
|
|
704
|
+
multipart: multipartDigest(source.multipart)
|
|
705
|
+
},
|
|
706
|
+
mcp: mcpRoundsOf(source),
|
|
707
|
+
...toolViewEntry(source),
|
|
708
|
+
http: []
|
|
709
|
+
};
|
|
710
|
+
}
|
|
711
|
+
function toolViewOf(source) {
|
|
712
|
+
const view = source.toolView;
|
|
713
|
+
if (!view)
|
|
714
|
+
return null;
|
|
715
|
+
return {
|
|
716
|
+
defaults: view.defaults === undefined || Object.keys(view.defaults).length === 0 ? null : digestValue(view.defaults),
|
|
717
|
+
output: schemaDigest(view.output, "output"),
|
|
718
|
+
project: view.project !== undefined
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
function toolViewEntry(source) {
|
|
722
|
+
const toolView = toolViewOf(source);
|
|
723
|
+
return toolView ? { toolView } : {};
|
|
724
|
+
}
|
|
725
|
+
function mcpRoundsOf(source) {
|
|
726
|
+
if (!source.mcp)
|
|
727
|
+
return null;
|
|
728
|
+
const declared = staticInputRounds(source.mcp);
|
|
729
|
+
return {
|
|
730
|
+
inputRequired: declared ? declared.map((request) => ({
|
|
731
|
+
key: request.key,
|
|
732
|
+
message: request.message,
|
|
733
|
+
schema: schemaDigest(request.schema, "input")
|
|
734
|
+
})) : "resolved-per-call"
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
function operationFingerprint(source) {
|
|
738
|
+
const mcp = mcpRoundsOf(source);
|
|
739
|
+
return serializeCanonicalJson({
|
|
740
|
+
method: source.method,
|
|
741
|
+
serviceName: source.serviceName,
|
|
742
|
+
key: source.key,
|
|
743
|
+
desc: source.desc,
|
|
744
|
+
scope: source.scope ?? null,
|
|
745
|
+
path: source.path ?? null,
|
|
746
|
+
expose: source.expose ? [...source.expose].sort(compareCodeUnits) : null,
|
|
747
|
+
toolName: source.toolName ?? null,
|
|
748
|
+
annotations: source.annotations ?? null,
|
|
749
|
+
ui: source.ui ?? null,
|
|
750
|
+
mcp,
|
|
751
|
+
toolView: toolViewOf(source),
|
|
752
|
+
rawBody: source.rawBody ?? false,
|
|
753
|
+
safelistedBody: source.safelistedBody ?? false,
|
|
754
|
+
rawResponse: source.rawResponse ?? false,
|
|
755
|
+
responseMeta: source.responseMeta ?? null,
|
|
756
|
+
maxJsonBodyBytes: source.maxJsonBodyBytes ?? null,
|
|
757
|
+
idempotent: source.idempotent ?? false,
|
|
758
|
+
contentType: source.contentType ?? null,
|
|
759
|
+
meta: source.meta ?? null,
|
|
760
|
+
schemas: {
|
|
761
|
+
params: schemaDigest(source.paramsSchema, "input"),
|
|
762
|
+
input: schemaDigest(source.inputSchema, "input"),
|
|
763
|
+
output: schemaDigest(source.outputSchema, "output"),
|
|
764
|
+
multipart: multipartDigest(source.multipart)
|
|
765
|
+
}
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
function sortTools(tools) {
|
|
769
|
+
return tools.sort((left, right) => compareCodeUnits(left.name, right.name) || compareCodeUnits(left.service, right.service) || compareCodeUnits(left.action, right.action) || compareCodeUnits(left.kind, right.kind));
|
|
770
|
+
}
|
|
771
|
+
function runtimeOperationSource(source) {
|
|
772
|
+
return {
|
|
773
|
+
definitionToken: source,
|
|
774
|
+
method: source.identity.method,
|
|
775
|
+
serviceName: source.identity.serviceName,
|
|
776
|
+
key: source.identity.action,
|
|
777
|
+
desc: source.description,
|
|
778
|
+
...source.identity.scope !== undefined && { scope: source.identity.scope },
|
|
779
|
+
inputSchema: source.input,
|
|
780
|
+
...source.output !== undefined && { outputSchema: source.output },
|
|
781
|
+
toolName: source.name,
|
|
782
|
+
expose: source.transports,
|
|
783
|
+
...source.annotations !== undefined && { annotations: source.annotations },
|
|
784
|
+
...source.ui !== undefined && { ui: source.ui },
|
|
785
|
+
...source.identity.meta !== undefined && { meta: source.identity.meta },
|
|
786
|
+
...source.mcp !== undefined && { mcp: source.mcp }
|
|
787
|
+
};
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
// src/testing/surface-manifest.ts
|
|
791
|
+
var SURFACE_MANIFEST_VERSION = 3;
|
|
792
|
+
var HttpMethodSchema = z2.enum(["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD"]);
|
|
793
|
+
var ToolTransportSchema = z2.enum(TOOL_TRANSPORTS);
|
|
794
|
+
var SurfaceTransportSchema = z2.enum(["HTTP", "MCP", "AGENT", "CLI", "REALTIME"]);
|
|
795
|
+
var SurfaceSchemaDigestsSchema = z2.object({
|
|
796
|
+
params: z2.string().nullable(),
|
|
797
|
+
input: z2.string().nullable(),
|
|
798
|
+
output: z2.string().nullable(),
|
|
799
|
+
multipart: z2.string().nullable()
|
|
800
|
+
});
|
|
801
|
+
var SurfaceManifestOperationMcpSchema = z2.object({
|
|
802
|
+
inputRequired: z2.union([
|
|
803
|
+
z2.array(z2.object({ key: z2.string(), message: z2.string(), schema: z2.string().nullable() })),
|
|
804
|
+
z2.literal("resolved-per-call")
|
|
805
|
+
])
|
|
806
|
+
}).nullable();
|
|
807
|
+
var SurfaceManifestOperationToolViewSchema = z2.object({
|
|
808
|
+
defaults: z2.string().nullable(),
|
|
809
|
+
output: z2.string().nullable(),
|
|
810
|
+
project: z2.boolean()
|
|
811
|
+
});
|
|
812
|
+
var SurfaceManifestOperationSchema = z2.object({
|
|
813
|
+
kind: z2.enum(["contract", "runtime"]),
|
|
814
|
+
service: z2.string(),
|
|
815
|
+
action: z2.string(),
|
|
816
|
+
method: HttpMethodSchema,
|
|
817
|
+
scope: z2.string().nullable(),
|
|
818
|
+
description: z2.string(),
|
|
819
|
+
schemas: SurfaceSchemaDigestsSchema,
|
|
820
|
+
mcp: SurfaceManifestOperationMcpSchema,
|
|
821
|
+
toolView: SurfaceManifestOperationToolViewSchema.optional(),
|
|
822
|
+
http: z2.array(z2.object({ method: HttpMethodSchema, path: z2.string() }))
|
|
823
|
+
});
|
|
824
|
+
var SurfaceManifestToolSchema = z2.object({
|
|
825
|
+
kind: z2.enum(["contract", "runtime"]),
|
|
826
|
+
service: z2.string(),
|
|
827
|
+
action: z2.string(),
|
|
828
|
+
name: z2.string(),
|
|
829
|
+
input: z2.string()
|
|
830
|
+
});
|
|
831
|
+
var SurfaceManifestToolSurfaceSchema = z2.object({
|
|
832
|
+
transport: ToolTransportSchema,
|
|
833
|
+
surface: z2.string().nullable(),
|
|
834
|
+
tools: z2.array(SurfaceManifestToolSchema)
|
|
835
|
+
});
|
|
836
|
+
var SurfaceManifestCliCommandSchema = z2.object({
|
|
837
|
+
name: z2.string(),
|
|
838
|
+
description: z2.string(),
|
|
839
|
+
input: z2.string(),
|
|
840
|
+
output: z2.string().nullable()
|
|
841
|
+
});
|
|
842
|
+
var SurfaceManifestExtensionSchema = z2.object({
|
|
843
|
+
name: z2.string(),
|
|
844
|
+
transport: SurfaceTransportSchema
|
|
845
|
+
});
|
|
846
|
+
var SurfaceRealtimeSchemaPairSchema = z2.object({
|
|
847
|
+
input: z2.string(),
|
|
848
|
+
output: z2.string()
|
|
849
|
+
});
|
|
850
|
+
var SurfaceManifestRealtimeEventSchema = z2.object({
|
|
851
|
+
contract: z2.string(),
|
|
852
|
+
direction: z2.enum(["serverToClient", "clientToServer"]),
|
|
853
|
+
event: z2.string(),
|
|
854
|
+
args: SurfaceRealtimeSchemaPairSchema,
|
|
855
|
+
acknowledgement: SurfaceRealtimeSchemaPairSchema.nullable()
|
|
856
|
+
});
|
|
857
|
+
var SurfaceManifestSchema = z2.object({
|
|
858
|
+
manifestVersion: z2.literal(SURFACE_MANIFEST_VERSION),
|
|
859
|
+
digestVersion: z2.literal(1),
|
|
860
|
+
operations: z2.array(SurfaceManifestOperationSchema),
|
|
861
|
+
toolSurfaces: z2.array(SurfaceManifestToolSurfaceSchema),
|
|
862
|
+
realtimeContracts: z2.array(z2.string()),
|
|
863
|
+
realtime: z2.array(SurfaceManifestRealtimeEventSchema),
|
|
864
|
+
cliOnly: z2.array(SurfaceManifestCliCommandSchema),
|
|
865
|
+
extensions: z2.array(SurfaceManifestExtensionSchema)
|
|
866
|
+
});
|
|
867
|
+
var serializeSurfaceValue = serializeCanonicalJson;
|
|
868
|
+
function realtimeEvents(config, realtimeContracts) {
|
|
869
|
+
const realtime = [];
|
|
870
|
+
for (const contractName of realtimeContracts) {
|
|
871
|
+
const contract = config.realtime?.[contractName];
|
|
872
|
+
if (!contract)
|
|
873
|
+
continue;
|
|
874
|
+
for (const direction of ["serverToClient", "clientToServer"]) {
|
|
875
|
+
const registry = contract[direction];
|
|
876
|
+
for (const event of Object.keys(registry).sort(compareCodeUnits)) {
|
|
877
|
+
const definition = registry[event];
|
|
878
|
+
if (!definition)
|
|
879
|
+
continue;
|
|
880
|
+
const argsInput = schemaDigest(definition.args, "input");
|
|
881
|
+
const argsOutput = schemaDigest(definition.args, "output");
|
|
882
|
+
if (!argsInput || !argsOutput)
|
|
883
|
+
throw new Error("Realtime args schema digest missing");
|
|
884
|
+
let acknowledgement = null;
|
|
885
|
+
if (definition.ack) {
|
|
886
|
+
const input = schemaDigest(definition.ack, "input");
|
|
887
|
+
const output = schemaDigest(definition.ack, "output");
|
|
888
|
+
if (!input || !output)
|
|
889
|
+
throw new Error("Realtime ack schema digest missing");
|
|
890
|
+
acknowledgement = { input, output };
|
|
891
|
+
}
|
|
892
|
+
realtime.push({
|
|
893
|
+
contract: contractName,
|
|
894
|
+
direction,
|
|
895
|
+
event,
|
|
896
|
+
args: { input: argsInput, output: argsOutput },
|
|
897
|
+
acknowledgement
|
|
898
|
+
});
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
return realtime;
|
|
903
|
+
}
|
|
904
|
+
function buildSurfaceManifest(config) {
|
|
905
|
+
const operations = new Map;
|
|
906
|
+
const operationFingerprints = new Map;
|
|
907
|
+
const operationDefinitions = new Map;
|
|
908
|
+
const addOperation = (kind, source) => {
|
|
909
|
+
const candidate = operationFrom(kind, source);
|
|
910
|
+
const key = operationKey(kind, candidate.service, candidate.action);
|
|
911
|
+
const definition = source.definitionToken ?? source;
|
|
912
|
+
const existing = operations.get(key);
|
|
913
|
+
if (!existing) {
|
|
914
|
+
operations.set(key, candidate);
|
|
915
|
+
operationFingerprints.set(key, operationFingerprint(source));
|
|
916
|
+
operationDefinitions.set(key, definition);
|
|
917
|
+
return candidate;
|
|
918
|
+
}
|
|
919
|
+
if (operationDefinitions.get(key) !== definition || operationFingerprints.get(key) !== operationFingerprint(source)) {
|
|
920
|
+
throw new Error(`Conflicting ${kind} operation identity ${candidate.service}.${candidate.action}`);
|
|
921
|
+
}
|
|
922
|
+
return existing;
|
|
923
|
+
};
|
|
924
|
+
const addHttp = (service, prefix) => {
|
|
925
|
+
for (const method of Object.values(service.methods)) {
|
|
926
|
+
const operation = addOperation("contract", method);
|
|
927
|
+
if (method.expose && !method.expose.includes("HTTP"))
|
|
928
|
+
continue;
|
|
929
|
+
const route = {
|
|
930
|
+
method: method.method,
|
|
931
|
+
path: joinRoutePath(prefix, service.prefix, method.path)
|
|
932
|
+
};
|
|
933
|
+
if (!operation.http.some((entry) => entry.method === route.method && entry.path === route.path)) {
|
|
934
|
+
operation.http.push(route);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
for (const service of config.services ?? []) {
|
|
939
|
+
addHttp(service, config.scopePrefixes?.[service.scope] ?? "");
|
|
940
|
+
}
|
|
941
|
+
for (const group of config.groups ?? []) {
|
|
942
|
+
for (const service of group.services)
|
|
943
|
+
addHttp(service, group.pathPrefix ?? "");
|
|
944
|
+
}
|
|
945
|
+
const toolSurfaces = [];
|
|
946
|
+
const addToolProjection = (transport, surface, projection, presentation = {}) => {
|
|
947
|
+
const projected = projectToolSurface(projection, transport, transport === "MCP" ? config.mcpPreparation ?? {} : presentation);
|
|
948
|
+
const collected = transport === "MCP" ? prepareProjectedMcpTools(projected.map(mcpProjectionCandidate), config.mcpPreparation ?? {}).map((prepared) => ({
|
|
949
|
+
...prepared.tool,
|
|
950
|
+
presentationSchema: prepared.inputSchema
|
|
951
|
+
})) : projected;
|
|
952
|
+
const tools = [];
|
|
953
|
+
for (const entry of collected) {
|
|
954
|
+
const source = entry.kind === "contract" ? entry.source : runtimeOperationSource(entry.source);
|
|
955
|
+
const operation = addOperation(entry.kind, source);
|
|
956
|
+
tools.push({
|
|
957
|
+
kind: entry.kind,
|
|
958
|
+
service: operation.service,
|
|
959
|
+
action: operation.action,
|
|
960
|
+
name: entry.name,
|
|
961
|
+
input: presentationDigest(entry.presentationSchema)
|
|
962
|
+
});
|
|
963
|
+
}
|
|
964
|
+
toolSurfaces.push({ transport, surface, tools: sortTools(tools) });
|
|
965
|
+
};
|
|
966
|
+
const shared = {
|
|
967
|
+
services: config.services,
|
|
968
|
+
runtimeTools: config.runtimeTools
|
|
969
|
+
};
|
|
970
|
+
const explicitMcp = config.toolSurfaces?.MCP;
|
|
971
|
+
const namedMcp = config.mcpSurfaces;
|
|
972
|
+
if (explicitMcp && namedMcp) {
|
|
973
|
+
throw new Error("Surface manifest MCP topology must use either one direct surface or named surfaces");
|
|
974
|
+
}
|
|
975
|
+
if (explicitMcp)
|
|
976
|
+
addToolProjection("MCP", null, explicitMcp);
|
|
977
|
+
if (namedMcp) {
|
|
978
|
+
for (const name of Object.keys(namedMcp).sort(compareCodeUnits)) {
|
|
979
|
+
const projection = namedMcp[name];
|
|
980
|
+
if (projection)
|
|
981
|
+
addToolProjection("MCP", name, projection);
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
if (!explicitMcp && !namedMcp)
|
|
985
|
+
addToolProjection("MCP", null, shared);
|
|
986
|
+
const agent = config.toolSurfaces?.AGENT;
|
|
987
|
+
addToolProjection("AGENT", null, agent ?? shared, agent ?? {});
|
|
988
|
+
addToolProjection("CLI", null, config.toolSurfaces?.CLI ?? shared);
|
|
989
|
+
const realtimeContracts = Object.keys(config.realtime ?? {}).sort(compareCodeUnits);
|
|
990
|
+
const realtime = realtimeEvents(config, realtimeContracts);
|
|
991
|
+
const cliOnly = (config.cliCommands ?? []).map((command) => ({
|
|
992
|
+
name: command.name,
|
|
993
|
+
description: command.description,
|
|
994
|
+
input: schemaDigest(command.input, "input") ?? digestValue({}),
|
|
995
|
+
output: schemaDigest(command.output, "output")
|
|
996
|
+
})).sort((left, right) => compareCodeUnits(left.name, right.name));
|
|
997
|
+
for (const operation of operations.values()) {
|
|
998
|
+
operation.http.sort((left, right) => compareCodeUnits(left.path, right.path) || compareCodeUnits(left.method, right.method));
|
|
999
|
+
}
|
|
1000
|
+
return SurfaceManifestSchema.parse({
|
|
1001
|
+
manifestVersion: SURFACE_MANIFEST_VERSION,
|
|
1002
|
+
digestVersion: 1,
|
|
1003
|
+
operations: [...operations.values()].sort((left, right) => compareCodeUnits(left.service, right.service) || compareCodeUnits(left.action, right.action) || compareCodeUnits(left.kind, right.kind)),
|
|
1004
|
+
toolSurfaces: toolSurfaces.sort((left, right) => compareCodeUnits(left.transport, right.transport) || compareCodeUnits(left.surface ?? "", right.surface ?? "")),
|
|
1005
|
+
realtimeContracts,
|
|
1006
|
+
realtime,
|
|
1007
|
+
cliOnly,
|
|
1008
|
+
extensions: [...config.extensions ?? []].sort((left, right) => compareCodeUnits(left.transport, right.transport) || compareCodeUnits(left.name, right.name))
|
|
1009
|
+
});
|
|
1010
|
+
}
|
|
1011
|
+
function assertSurfaceManifestSnapshot(manifest, snapshot) {
|
|
1012
|
+
const committed = snapshot.manifestVersion;
|
|
1013
|
+
if (committed !== SURFACE_MANIFEST_VERSION) {
|
|
1014
|
+
throw new Error(`Surface snapshot is manifestVersion ${String(committed)}; this build writes ` + `${SURFACE_MANIFEST_VERSION}. Regenerate it and review the diff — the format ` + "changed, so the first regeneration is expected to be large.");
|
|
1015
|
+
}
|
|
1016
|
+
const actual = serializeSurfaceValue(SurfaceManifestSchema.parse(manifest));
|
|
1017
|
+
const expected = serializeSurfaceValue(SurfaceManifestSchema.parse(snapshot));
|
|
1018
|
+
if (actual !== expected) {
|
|
1019
|
+
throw new Error(`Surface manifest diverged from its committed snapshot
|
|
1020
|
+
expected: ${expected}
|
|
1021
|
+
actual: ${actual}`);
|
|
1022
|
+
}
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
// src/testing/surface-conformance.ts
|
|
1026
|
+
var RealtimeRejectionObservationSchema = z3.object({
|
|
1027
|
+
direction: RealtimeRejectDirectionSchema,
|
|
1028
|
+
phase: RealtimeRejectPhaseSchema,
|
|
1029
|
+
reason: RealtimeRejectReasonSchema,
|
|
1030
|
+
fault: RealtimeRejectFaultSchema
|
|
1031
|
+
});
|
|
1032
|
+
var ObservationFields = {
|
|
1033
|
+
code: z3.string().optional(),
|
|
1034
|
+
data: z3.unknown().optional(),
|
|
1035
|
+
diagnostic: z3.string().optional(),
|
|
1036
|
+
handlerCalls: z3.number().int().nonnegative().optional()
|
|
1037
|
+
};
|
|
1038
|
+
var RealtimeDisconnectObservationSchema = z3.object({
|
|
1039
|
+
phase: z3.enum(["before-invoke", "in-flight"])
|
|
1040
|
+
});
|
|
1041
|
+
var TransportObservationSchema = z3.discriminatedUnion("outcome", [
|
|
1042
|
+
z3.object({ outcome: z3.literal("success"), ...ObservationFields }),
|
|
1043
|
+
z3.object({ outcome: z3.literal("validation_error"), ...ObservationFields }),
|
|
1044
|
+
z3.object({ outcome: z3.literal("domain_error"), ...ObservationFields }),
|
|
1045
|
+
z3.object({ outcome: z3.literal("aborted"), ...ObservationFields }),
|
|
1046
|
+
z3.object({
|
|
1047
|
+
outcome: z3.literal("realtime_rejected"),
|
|
1048
|
+
...ObservationFields,
|
|
1049
|
+
rejection: RealtimeRejectionObservationSchema
|
|
1050
|
+
}),
|
|
1051
|
+
z3.object({
|
|
1052
|
+
outcome: z3.literal("disconnected"),
|
|
1053
|
+
...ObservationFields,
|
|
1054
|
+
disconnect: RealtimeDisconnectObservationSchema
|
|
1055
|
+
}),
|
|
1056
|
+
z3.object({ outcome: z3.literal("timeout"), ...ObservationFields })
|
|
1057
|
+
]);
|
|
1058
|
+
function sorted(values) {
|
|
1059
|
+
return [...values].sort((left, right) => left < right ? -1 : left > right ? 1 : 0);
|
|
1060
|
+
}
|
|
1061
|
+
function assertSameSet(label, expectedValues, actualValues) {
|
|
1062
|
+
const expected = sorted(expectedValues);
|
|
1063
|
+
const actual = sorted(actualValues);
|
|
1064
|
+
if (serializeSurfaceValue(expected) === serializeSurfaceValue(actual))
|
|
1065
|
+
return;
|
|
1066
|
+
throw new Error(`${label} mismatch
|
|
1067
|
+
expected: ${expected.join(", ") || "(empty)"}
|
|
1068
|
+
actual: ${actual.join(", ") || "(empty)"}`);
|
|
1069
|
+
}
|
|
1070
|
+
function openApiOperations(document) {
|
|
1071
|
+
return Object.entries(document.paths).flatMap(([path, item]) => Object.keys(item).filter((method) => ["get", "post", "put", "patch", "delete", "head"].includes(method)).map((method) => `${method.toUpperCase()}:${path}`));
|
|
1072
|
+
}
|
|
1073
|
+
function expectedToolNames(manifest, transport, surface) {
|
|
1074
|
+
const projection = manifest.toolSurfaces.find((candidate) => candidate.transport === transport && candidate.surface === surface);
|
|
1075
|
+
if (!projection) {
|
|
1076
|
+
throw new Error(`${transport} surface "${surface ?? "(default)"}" is not declared in the manifest`);
|
|
1077
|
+
}
|
|
1078
|
+
return projection.tools.map((tool) => tool.name);
|
|
1079
|
+
}
|
|
1080
|
+
function assertSurfaceDiscovery(manifest, observed) {
|
|
1081
|
+
if (observed.openApi) {
|
|
1082
|
+
assertSameSet("HTTP/OpenAPI", manifest.operations.flatMap((operation) => operation.http.map((entry) => `${entry.method}:${entry.path.replace(/:([^/]+)/g, "{$1}")}`)), openApiOperations(observed.openApi));
|
|
1083
|
+
}
|
|
1084
|
+
for (const transport of TOOL_TRANSPORTS) {
|
|
1085
|
+
const names = observed[transport];
|
|
1086
|
+
if (names) {
|
|
1087
|
+
assertSameSet(`${transport} discovery`, expectedToolNames(manifest, transport, null), names);
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
for (const projection of observed.toolSurfaces ?? []) {
|
|
1091
|
+
assertSameSet(`${projection.transport} surface "${projection.surface ?? "(default)"}" discovery`, expectedToolNames(manifest, projection.transport, projection.surface ?? null), projection.names);
|
|
1092
|
+
}
|
|
1093
|
+
for (const [contract, topology] of Object.entries(observed.realtime ?? {})) {
|
|
1094
|
+
if (!manifest.realtimeContracts.includes(contract)) {
|
|
1095
|
+
throw new Error(`REALTIME contract "${contract}" is not declared in the manifest`);
|
|
1096
|
+
}
|
|
1097
|
+
for (const direction of ["serverToClient", "clientToServer"]) {
|
|
1098
|
+
assertSameSet(`REALTIME ${contract}.${direction} discovery`, manifest.realtime.filter((entry) => entry.contract === contract && entry.direction === direction).map((entry) => entry.event), topology[direction]);
|
|
1099
|
+
}
|
|
1100
|
+
}
|
|
1101
|
+
if (observed.cliOnly) {
|
|
1102
|
+
assertSameSet("CLI-only discovery", manifest.cliOnly.map((command) => command.name), observed.cliOnly);
|
|
1103
|
+
}
|
|
1104
|
+
for (const transport of [
|
|
1105
|
+
"HTTP",
|
|
1106
|
+
"MCP",
|
|
1107
|
+
"AGENT",
|
|
1108
|
+
"CLI",
|
|
1109
|
+
"REALTIME"
|
|
1110
|
+
]) {
|
|
1111
|
+
const names = observed.extensions?.[transport];
|
|
1112
|
+
if (!names)
|
|
1113
|
+
continue;
|
|
1114
|
+
assertSameSet(`${transport} extension discovery`, manifest.extensions.filter((extension) => extension.transport === transport).map((extension) => extension.name), names);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
function boundedObservation(observation, maxDiagnosticBytes) {
|
|
1118
|
+
const parsed = TransportObservationSchema.parse(observation);
|
|
1119
|
+
if (!parsed.diagnostic)
|
|
1120
|
+
return parsed;
|
|
1121
|
+
const bytes = new TextEncoder().encode(parsed.diagnostic);
|
|
1122
|
+
if (bytes.byteLength <= maxDiagnosticBytes)
|
|
1123
|
+
return parsed;
|
|
1124
|
+
return {
|
|
1125
|
+
...parsed,
|
|
1126
|
+
diagnostic: new TextDecoder().decode(bytes.slice(0, maxDiagnosticBytes))
|
|
1127
|
+
};
|
|
1128
|
+
}
|
|
1129
|
+
async function runBounded(run, signal) {
|
|
1130
|
+
if (signal.aborted) {
|
|
1131
|
+
Promise.resolve().then(run).catch(() => {
|
|
1132
|
+
return;
|
|
1133
|
+
});
|
|
1134
|
+
throw signal.reason;
|
|
1135
|
+
}
|
|
1136
|
+
let removeAbortListener = () => {
|
|
1137
|
+
return;
|
|
1138
|
+
};
|
|
1139
|
+
const aborted = new Promise((_resolve, reject) => {
|
|
1140
|
+
const onAbort = () => reject(signal.reason);
|
|
1141
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1142
|
+
removeAbortListener = () => signal.removeEventListener("abort", onAbort);
|
|
1143
|
+
});
|
|
1144
|
+
try {
|
|
1145
|
+
return await Promise.race([Promise.resolve().then(run), aborted]);
|
|
1146
|
+
} finally {
|
|
1147
|
+
removeAbortListener();
|
|
1148
|
+
}
|
|
1149
|
+
}
|
|
1150
|
+
async function runSurfaceProbes({
|
|
1151
|
+
probes,
|
|
1152
|
+
drivers,
|
|
1153
|
+
signal,
|
|
1154
|
+
timeoutMs = 1e4,
|
|
1155
|
+
maxDiagnosticBytes = 4096
|
|
1156
|
+
}) {
|
|
1157
|
+
if (!Number.isInteger(timeoutMs) || timeoutMs <= 0) {
|
|
1158
|
+
throw new TypeError("Surface probe timeoutMs must be a positive integer");
|
|
1159
|
+
}
|
|
1160
|
+
if (!Number.isInteger(maxDiagnosticBytes) || maxDiagnosticBytes <= 0) {
|
|
1161
|
+
throw new TypeError("Surface probe maxDiagnosticBytes must be a positive integer");
|
|
1162
|
+
}
|
|
1163
|
+
for (const probe of probes) {
|
|
1164
|
+
const timeoutSignal = AbortSignal.timeout(timeoutMs);
|
|
1165
|
+
const probeSignal = signal ? AbortSignal.any([signal, timeoutSignal]) : timeoutSignal;
|
|
1166
|
+
let failed = false;
|
|
1167
|
+
let failure;
|
|
1168
|
+
try {
|
|
1169
|
+
probeSignal.throwIfAborted();
|
|
1170
|
+
if (probe.setup)
|
|
1171
|
+
await runBounded(() => probe.setup?.(probeSignal), probeSignal);
|
|
1172
|
+
for (const transport of probe.transports) {
|
|
1173
|
+
probeSignal.throwIfAborted();
|
|
1174
|
+
const driver = drivers[transport];
|
|
1175
|
+
if (!driver) {
|
|
1176
|
+
throw new Error(`Surface probe "${probe.name}" has no ${transport} driver`);
|
|
1177
|
+
}
|
|
1178
|
+
const actual = boundedObservation(await runBounded(() => driver.invoke(probe.fixture, probeSignal), probeSignal), maxDiagnosticBytes);
|
|
1179
|
+
const expected = probe.expected[transport];
|
|
1180
|
+
if (!expected) {
|
|
1181
|
+
throw new Error(`Surface probe "${probe.name}" has no ${transport} expectation`);
|
|
1182
|
+
}
|
|
1183
|
+
if (serializeSurfaceValue(actual) !== serializeSurfaceValue(expected)) {
|
|
1184
|
+
throw new Error(`Surface probe "${probe.name}" ${transport} mismatch
|
|
1185
|
+
expected: ${serializeSurfaceValue(expected)}
|
|
1186
|
+
actual: ${serializeSurfaceValue(actual)}`);
|
|
1187
|
+
}
|
|
1188
|
+
}
|
|
1189
|
+
} catch (error) {
|
|
1190
|
+
failed = true;
|
|
1191
|
+
failure = error;
|
|
1192
|
+
}
|
|
1193
|
+
if (probe.teardown) {
|
|
1194
|
+
try {
|
|
1195
|
+
await runBounded(() => probe.teardown?.(probeSignal), probeSignal);
|
|
1196
|
+
} catch (error) {
|
|
1197
|
+
if (!failed) {
|
|
1198
|
+
failed = true;
|
|
1199
|
+
failure = error;
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
if (failed)
|
|
1204
|
+
throw failure;
|
|
1205
|
+
}
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
// src/testing/realtime-probe.ts
|
|
1209
|
+
function scenarioOutcome(scenario) {
|
|
1210
|
+
if (scenario === "event" || scenario === "acknowledgement")
|
|
1211
|
+
return "success";
|
|
1212
|
+
if (scenario === "invalid_arguments" || scenario === "invalid_acknowledgement" || scenario === "peer_rejection") {
|
|
1213
|
+
return "realtime_rejected";
|
|
1214
|
+
}
|
|
1215
|
+
if (scenario === "disconnected" || scenario === "in_flight_disconnect") {
|
|
1216
|
+
return "disconnected";
|
|
1217
|
+
}
|
|
1218
|
+
return "timeout";
|
|
1219
|
+
}
|
|
1220
|
+
function assertScenarioExpectation(scenario, expected) {
|
|
1221
|
+
const outcome = scenarioOutcome(scenario);
|
|
1222
|
+
if (expected.outcome !== outcome) {
|
|
1223
|
+
throw new TypeError(`Realtime probe scenario "${scenario}" requires outcome "${outcome}"`);
|
|
1224
|
+
}
|
|
1225
|
+
if (expected.outcome === "realtime_rejected" && (scenario === "invalid_arguments" && expected.rejection.phase !== "arguments" || scenario === "invalid_acknowledgement" && expected.rejection.phase !== "acknowledgement")) {
|
|
1226
|
+
throw new TypeError(`Realtime probe scenario "${scenario}" has incompatible rejection phase`);
|
|
1227
|
+
}
|
|
1228
|
+
if (scenario === "invalid_arguments" && expected.handlerCalls !== 0) {
|
|
1229
|
+
throw new TypeError('Realtime probe scenario "invalid_arguments" requires handlerCalls: 0');
|
|
1230
|
+
}
|
|
1231
|
+
if (scenario === "peer_rejection" && (expected.outcome !== "realtime_rejected" || expected.rejection.reason !== "rejected-by-peer")) {
|
|
1232
|
+
throw new TypeError('Realtime probe scenario "peer_rejection" requires a rejected-by-peer outcome');
|
|
1233
|
+
}
|
|
1234
|
+
if (expected.outcome === "disconnected") {
|
|
1235
|
+
const phase = scenario === "disconnected" ? "before-invoke" : "in-flight";
|
|
1236
|
+
if (expected.disconnect.phase !== phase) {
|
|
1237
|
+
throw new TypeError(`Realtime probe scenario "${scenario}" requires disconnect phase "${phase}"`);
|
|
1238
|
+
}
|
|
1239
|
+
}
|
|
1240
|
+
}
|
|
1241
|
+
function defineRealtimeProbe(config) {
|
|
1242
|
+
const expected = TransportObservationSchema.parse(config.expected);
|
|
1243
|
+
assertScenarioExpectation(config.scenario, expected);
|
|
1244
|
+
return {
|
|
1245
|
+
name: config.name,
|
|
1246
|
+
fixture: { scenario: config.scenario, value: config.fixture },
|
|
1247
|
+
transports: ["REALTIME"],
|
|
1248
|
+
expected: { REALTIME: expected },
|
|
1249
|
+
setup: config.setup,
|
|
1250
|
+
teardown: config.teardown
|
|
1251
|
+
};
|
|
1252
|
+
}
|
|
1253
|
+
function rejectionObservation(rejected) {
|
|
1254
|
+
return RealtimeRejectionObservationSchema.parse(rejected);
|
|
1255
|
+
}
|
|
1256
|
+
function createRealtimeProbeDriver({
|
|
1257
|
+
bind,
|
|
1258
|
+
handlerCalls
|
|
1259
|
+
}) {
|
|
1260
|
+
return {
|
|
1261
|
+
async invoke(fixture, signal) {
|
|
1262
|
+
let rejected;
|
|
1263
|
+
const currentRejection = () => rejected;
|
|
1264
|
+
const adapter = bind((event) => {
|
|
1265
|
+
rejected = event;
|
|
1266
|
+
}, fixture);
|
|
1267
|
+
const connectedBefore = adapter.connected();
|
|
1268
|
+
const callsBefore = handlerCalls?.();
|
|
1269
|
+
const withCalls = (observation) => {
|
|
1270
|
+
if (callsBefore === undefined || !handlerCalls)
|
|
1271
|
+
return observation;
|
|
1272
|
+
return { ...observation, handlerCalls: handlerCalls() - callsBefore };
|
|
1273
|
+
};
|
|
1274
|
+
try {
|
|
1275
|
+
signal.throwIfAborted();
|
|
1276
|
+
const data = await adapter.invoke(fixture, signal);
|
|
1277
|
+
const observedRejection = currentRejection();
|
|
1278
|
+
if (observedRejection) {
|
|
1279
|
+
return withCalls({
|
|
1280
|
+
outcome: "realtime_rejected",
|
|
1281
|
+
code: observedRejection.error.code,
|
|
1282
|
+
rejection: rejectionObservation(observedRejection)
|
|
1283
|
+
});
|
|
1284
|
+
}
|
|
1285
|
+
return withCalls({
|
|
1286
|
+
outcome: "success",
|
|
1287
|
+
...data !== undefined && { data }
|
|
1288
|
+
});
|
|
1289
|
+
} catch (error) {
|
|
1290
|
+
const observedRejection = currentRejection();
|
|
1291
|
+
if (observedRejection) {
|
|
1292
|
+
return withCalls({
|
|
1293
|
+
outcome: "realtime_rejected",
|
|
1294
|
+
code: error instanceof RealtimeRequestInvalidAcknowledgementError ? error.code : observedRejection.error.code,
|
|
1295
|
+
rejection: rejectionObservation(observedRejection)
|
|
1296
|
+
});
|
|
1297
|
+
}
|
|
1298
|
+
if (error instanceof RealtimeRequestInvalidAcknowledgementError) {
|
|
1299
|
+
return withCalls({
|
|
1300
|
+
outcome: "realtime_rejected",
|
|
1301
|
+
code: error.code,
|
|
1302
|
+
rejection: {
|
|
1303
|
+
direction: "client-inbound",
|
|
1304
|
+
phase: "acknowledgement",
|
|
1305
|
+
reason: "invalid-acknowledgement-value",
|
|
1306
|
+
fault: "peer"
|
|
1307
|
+
}
|
|
1308
|
+
});
|
|
1309
|
+
}
|
|
1310
|
+
if (error instanceof RealtimeRequestDisconnectedError) {
|
|
1311
|
+
return withCalls({
|
|
1312
|
+
outcome: "disconnected",
|
|
1313
|
+
code: error.code,
|
|
1314
|
+
disconnect: {
|
|
1315
|
+
phase: connectedBefore ? "in-flight" : "before-invoke"
|
|
1316
|
+
}
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
if (error instanceof RealtimeRequestTimeoutError) {
|
|
1320
|
+
return withCalls({ outcome: "timeout", code: error.code });
|
|
1321
|
+
}
|
|
1322
|
+
if (signal.aborted && error === signal.reason) {
|
|
1323
|
+
return withCalls({ outcome: "aborted" });
|
|
1324
|
+
}
|
|
1325
|
+
const parsedRejection = RealtimeRejectionObservationSchema.safeParse(typeof error === "object" && error !== null && "details" in error ? error.details : undefined);
|
|
1326
|
+
if (parsedRejection.success) {
|
|
1327
|
+
const code2 = typeof error === "object" && error !== null && "code" in error ? String(error.code) : "REALTIME_CONTRACT_VIOLATION";
|
|
1328
|
+
return withCalls({
|
|
1329
|
+
outcome: "realtime_rejected",
|
|
1330
|
+
code: code2,
|
|
1331
|
+
rejection: parsedRejection.data
|
|
1332
|
+
});
|
|
1333
|
+
}
|
|
1334
|
+
const code = typeof error === "object" && error !== null && "code" in error ? String(error.code) : undefined;
|
|
1335
|
+
return withCalls({
|
|
1336
|
+
outcome: "domain_error",
|
|
1337
|
+
...code !== undefined && { code },
|
|
1338
|
+
diagnostic: error instanceof Error ? error.message : String(error)
|
|
1339
|
+
});
|
|
1340
|
+
} finally {
|
|
1341
|
+
await adapter.dispose?.();
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
};
|
|
1345
|
+
}
|
|
1346
|
+
export {
|
|
1347
|
+
serializeSurfaceValue,
|
|
1348
|
+
runSurfaceProbes,
|
|
1349
|
+
runManagedResourceConformance,
|
|
1350
|
+
defineRealtimeProbe,
|
|
1351
|
+
createRealtimeProbeDriver,
|
|
1352
|
+
createHandlerTestClients,
|
|
1353
|
+
createHandlerTestClient,
|
|
1354
|
+
buildSurfaceManifest,
|
|
1355
|
+
assertSurfaceManifestSnapshot,
|
|
1356
|
+
assertSurfaceDiscovery,
|
|
1357
|
+
TransportObservationSchema,
|
|
1358
|
+
SurfaceSchemaDigestsSchema,
|
|
1359
|
+
SurfaceRealtimeSchemaPairSchema,
|
|
1360
|
+
SurfaceManifestToolSurfaceSchema,
|
|
1361
|
+
SurfaceManifestToolSchema,
|
|
1362
|
+
SurfaceManifestSchema,
|
|
1363
|
+
SurfaceManifestRealtimeEventSchema,
|
|
1364
|
+
SurfaceManifestOperationToolViewSchema,
|
|
1365
|
+
SurfaceManifestOperationSchema,
|
|
1366
|
+
SurfaceManifestOperationMcpSchema,
|
|
1367
|
+
SurfaceManifestExtensionSchema,
|
|
1368
|
+
SURFACE_MANIFEST_VERSION,
|
|
1369
|
+
RealtimeRejectionObservationSchema,
|
|
1370
|
+
RealtimeDisconnectObservationSchema,
|
|
1371
|
+
ManagedResourceConformanceTraceOutcomeSchema,
|
|
1372
|
+
ManagedResourceConformanceTraceEntrySchema,
|
|
1373
|
+
ManagedResourceConformanceScenarioSchema,
|
|
1374
|
+
ManagedResourceConformanceScenarioIdSchema,
|
|
1375
|
+
ManagedResourceConformancePhaseSchema,
|
|
1376
|
+
ManagedResourceConformanceError
|
|
1377
|
+
};
|