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
package/dist/index-3xwxfj4z.js
DELETED
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createTraceContext,
|
|
3
|
-
formatTraceparent
|
|
4
|
-
} from "./index-zcgf3gqf.js";
|
|
5
|
-
import {
|
|
6
|
-
isRecord,
|
|
7
|
-
transportResult
|
|
8
|
-
} from "./index-77fekveh.js";
|
|
9
|
-
|
|
10
|
-
// src/browser/http.ts
|
|
11
|
-
import ky, {
|
|
12
|
-
isHTTPError,
|
|
13
|
-
isNetworkError,
|
|
14
|
-
isTimeoutError
|
|
15
|
-
} from "ky";
|
|
16
|
-
|
|
17
|
-
// src/browser/cancellation.ts
|
|
18
|
-
class RequestCancellationError extends Error {
|
|
19
|
-
cause;
|
|
20
|
-
constructor(cause) {
|
|
21
|
-
super(cause === "caller" ? "Request was aborted" : "Request timed out");
|
|
22
|
-
this.cause = cause;
|
|
23
|
-
this.name = "RequestCancellationError";
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
function createRequestCancellation(caller, timeoutMs) {
|
|
27
|
-
if (!caller && timeoutMs === undefined) {
|
|
28
|
-
return { signal: undefined, run: (operation) => operation() };
|
|
29
|
-
}
|
|
30
|
-
const timeoutController = timeoutMs === undefined ? undefined : new AbortController;
|
|
31
|
-
const signal = caller && timeoutController ? AbortSignal.any([caller, timeoutController.signal]) : caller ?? timeoutController?.signal;
|
|
32
|
-
let cause;
|
|
33
|
-
let timer;
|
|
34
|
-
const abortFromCaller = () => {
|
|
35
|
-
if (cause)
|
|
36
|
-
return;
|
|
37
|
-
cause = "caller";
|
|
38
|
-
};
|
|
39
|
-
if (caller?.aborted)
|
|
40
|
-
abortFromCaller();
|
|
41
|
-
else
|
|
42
|
-
caller?.addEventListener("abort", abortFromCaller, { once: true });
|
|
43
|
-
if (timeoutMs !== undefined && timeoutController) {
|
|
44
|
-
timer = setTimeout(() => {
|
|
45
|
-
if (cause)
|
|
46
|
-
return;
|
|
47
|
-
cause = "timeout";
|
|
48
|
-
timeoutController.abort(new DOMException("Request timed out", "TimeoutError"));
|
|
49
|
-
}, timeoutMs);
|
|
50
|
-
}
|
|
51
|
-
return {
|
|
52
|
-
signal,
|
|
53
|
-
async run(operation) {
|
|
54
|
-
try {
|
|
55
|
-
if (cause === "caller")
|
|
56
|
-
throw cancellationError(cause);
|
|
57
|
-
return await operation(signal);
|
|
58
|
-
} catch (error) {
|
|
59
|
-
if (cause)
|
|
60
|
-
throw cancellationError(cause);
|
|
61
|
-
throw error;
|
|
62
|
-
} finally {
|
|
63
|
-
if (timer !== undefined)
|
|
64
|
-
clearTimeout(timer);
|
|
65
|
-
caller?.removeEventListener("abort", abortFromCaller);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
function cancellationError(cause) {
|
|
71
|
-
return new RequestCancellationError(cause);
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// src/browser/request-id.ts
|
|
75
|
-
var REQUEST_ID_HEADER = "x-request-id";
|
|
76
|
-
function responseTraceId(response) {
|
|
77
|
-
return response?.headers.get(REQUEST_ID_HEADER) ?? undefined;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
// src/browser/http.ts
|
|
81
|
-
var API_ERROR_BRAND = Symbol.for("stitchkit.ApiError");
|
|
82
|
-
function messageForCode(code, message) {
|
|
83
|
-
return message !== undefined && message.length > 0 ? message : `${code} (no message supplied)`;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
class ApiError extends Error {
|
|
87
|
-
code;
|
|
88
|
-
status;
|
|
89
|
-
details;
|
|
90
|
-
hint;
|
|
91
|
-
traceId;
|
|
92
|
-
constructor(code, status = 0, details, message, hint, traceId, options) {
|
|
93
|
-
super(messageForCode(code, message), options);
|
|
94
|
-
this.code = code;
|
|
95
|
-
this.status = status;
|
|
96
|
-
this.details = details;
|
|
97
|
-
this.hint = hint;
|
|
98
|
-
this.traceId = traceId;
|
|
99
|
-
this.name = "ApiError";
|
|
100
|
-
Object.defineProperty(this, API_ERROR_BRAND, { value: true });
|
|
101
|
-
}
|
|
102
|
-
static is(error) {
|
|
103
|
-
return typeof error === "object" && error !== null && API_ERROR_BRAND in error;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
function refuseLocally(path, message) {
|
|
107
|
-
return new ApiError("VALIDATION_ERROR", 0, { issues: [{ path, code: "invalid_type", message }] }, message);
|
|
108
|
-
}
|
|
109
|
-
function isAbortLikeError(error) {
|
|
110
|
-
if (error instanceof RequestCancellationError)
|
|
111
|
-
return true;
|
|
112
|
-
return typeof error === "object" && error !== null && "name" in error && (error.name === "AbortError" || error.name === "TimeoutError");
|
|
113
|
-
}
|
|
114
|
-
function shouldRetryBunNetworkError(error) {
|
|
115
|
-
if (ApiError.is(error) || isHTTPError(error) || isNetworkError(error) || isTimeoutError(error) || isAbortLikeError(error)) {
|
|
116
|
-
return;
|
|
117
|
-
}
|
|
118
|
-
if (!(error instanceof Error))
|
|
119
|
-
return;
|
|
120
|
-
const code = Object.getOwnPropertyDescriptor(error, "code");
|
|
121
|
-
return code && "value" in code && code.value === "ConnectionRefused" ? true : undefined;
|
|
122
|
-
}
|
|
123
|
-
function parseApiErrorBody(body) {
|
|
124
|
-
if (!isRecord(body) || !isRecord(body.error))
|
|
125
|
-
return null;
|
|
126
|
-
const error = body.error;
|
|
127
|
-
if (typeof error.code !== "string")
|
|
128
|
-
return null;
|
|
129
|
-
return {
|
|
130
|
-
code: error.code,
|
|
131
|
-
message: typeof error.message === "string" ? error.message : undefined,
|
|
132
|
-
details: error.details,
|
|
133
|
-
hint: typeof error.hint === "string" ? error.hint : undefined
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
function createRetryAwareFetch(transportFetch, unix) {
|
|
137
|
-
const runtimeFetch = transportFetch;
|
|
138
|
-
let attempt = 0;
|
|
139
|
-
return (input, init) => {
|
|
140
|
-
attempt += 1;
|
|
141
|
-
if (unix === undefined && attempt === 1) {
|
|
142
|
-
return runtimeFetch(input, init);
|
|
143
|
-
}
|
|
144
|
-
if (!(input instanceof Request)) {
|
|
145
|
-
if (unix === undefined)
|
|
146
|
-
return runtimeFetch(input, init);
|
|
147
|
-
const unixInit = { ...init, unix };
|
|
148
|
-
return runtimeFetch(input, unixInit);
|
|
149
|
-
}
|
|
150
|
-
const streamedBody = input.body ? { body: input.body, duplex: "half" } : {};
|
|
151
|
-
const materialized = {
|
|
152
|
-
...init,
|
|
153
|
-
...unix !== undefined && { unix },
|
|
154
|
-
method: input.method,
|
|
155
|
-
headers: input.headers,
|
|
156
|
-
...streamedBody,
|
|
157
|
-
cache: input.cache,
|
|
158
|
-
credentials: input.credentials,
|
|
159
|
-
integrity: input.integrity,
|
|
160
|
-
keepalive: input.keepalive,
|
|
161
|
-
mode: input.mode,
|
|
162
|
-
redirect: input.redirect,
|
|
163
|
-
referrer: input.referrer,
|
|
164
|
-
referrerPolicy: input.referrerPolicy,
|
|
165
|
-
signal: input.signal
|
|
166
|
-
};
|
|
167
|
-
return runtimeFetch(input.url, materialized);
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function createHttpClient(config) {
|
|
171
|
-
if (config.fetch && config.unix) {
|
|
172
|
-
throw new TypeError("HttpClientConfig.fetch and unix are mutually exclusive");
|
|
173
|
-
}
|
|
174
|
-
if (config.unix !== undefined) {
|
|
175
|
-
if (!config.unix.startsWith("/") || config.unix.includes("\x00")) {
|
|
176
|
-
throw new TypeError("HttpClientConfig.unix must be an absolute Unix socket path");
|
|
177
|
-
}
|
|
178
|
-
if (typeof Reflect.get(globalThis, "Bun") !== "object") {
|
|
179
|
-
throw new TypeError("HttpClientConfig.unix requires Bun; on Bun or Node use createUnixClientTransport().fetch for an explicit portable transport");
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
let ssrCookies = null;
|
|
183
|
-
let isLoggedOut = false;
|
|
184
|
-
const listeners = new Set;
|
|
185
|
-
const suppressUnauthorizedFor = config.suppressUnauthorizedFor ?? [];
|
|
186
|
-
const parseError = config.parseError ?? parseApiErrorBody;
|
|
187
|
-
function emit(event) {
|
|
188
|
-
for (const fn of listeners) {
|
|
189
|
-
try {
|
|
190
|
-
fn(event);
|
|
191
|
-
} catch {}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
const client = ky.create({
|
|
195
|
-
prefix: config.baseUrl,
|
|
196
|
-
credentials: config.credentials ?? "include",
|
|
197
|
-
timeout: false,
|
|
198
|
-
retry: {
|
|
199
|
-
limit: config.retry?.limit ?? 2,
|
|
200
|
-
methods: config.retry?.methods ?? ["get"],
|
|
201
|
-
statusCodes: config.retry?.statusCodes ?? [],
|
|
202
|
-
shouldRetry: ({ error }) => shouldRetryBunNetworkError(error)
|
|
203
|
-
},
|
|
204
|
-
hooks: {
|
|
205
|
-
beforeRequest: [
|
|
206
|
-
({ request: request2 }) => {
|
|
207
|
-
if (ssrCookies) {
|
|
208
|
-
request2.headers.set("Cookie", ssrCookies);
|
|
209
|
-
}
|
|
210
|
-
const extra = typeof config.headers === "function" ? config.headers() : config.headers;
|
|
211
|
-
if (extra) {
|
|
212
|
-
for (const [key, value] of Object.entries(extra)) {
|
|
213
|
-
request2.headers.set(key, value);
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
if (config.trace && !request2.headers.has("traceparent")) {
|
|
217
|
-
request2.headers.set("traceparent", formatTraceparent(createTraceContext()));
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
],
|
|
221
|
-
afterResponse: [
|
|
222
|
-
async ({ request: request2, response }) => {
|
|
223
|
-
if (config.release) {
|
|
224
|
-
try {
|
|
225
|
-
config.release.observe(response.headers.get("x-build-id"));
|
|
226
|
-
} catch {}
|
|
227
|
-
}
|
|
228
|
-
if (response.status === 401) {
|
|
229
|
-
const url = new URL(request2.url).pathname;
|
|
230
|
-
if (!isLoggedOut && !suppressUnauthorizedFor.some((matches) => matches(url))) {
|
|
231
|
-
isLoggedOut = true;
|
|
232
|
-
emit({ type: "unauthorized" });
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
if (!response.ok) {
|
|
236
|
-
const body = await response.clone().json().catch(() => null);
|
|
237
|
-
if (body) {
|
|
238
|
-
const parsed = parseError(body);
|
|
239
|
-
if (parsed) {
|
|
240
|
-
throw new ApiError(parsed.code, response.status, parsed.details, parsed.message, parsed.hint, responseTraceId(response));
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
});
|
|
248
|
-
async function request(method, url, data, options = {}) {
|
|
249
|
-
const cancellation = createRequestCancellation(options.signal, options.timeout ?? config.timeout ?? 30000);
|
|
250
|
-
const kyOptions = {
|
|
251
|
-
fetch: createRetryAwareFetch(config.fetch ?? globalThis.fetch.bind(globalThis), config.unix),
|
|
252
|
-
timeout: false,
|
|
253
|
-
signal: cancellation.signal
|
|
254
|
-
};
|
|
255
|
-
if (options.params) {
|
|
256
|
-
const searchParams = new URLSearchParams;
|
|
257
|
-
for (const [key, value] of Object.entries(options.params)) {
|
|
258
|
-
if (value === undefined)
|
|
259
|
-
continue;
|
|
260
|
-
if (Array.isArray(value)) {
|
|
261
|
-
for (const item of value)
|
|
262
|
-
searchParams.append(key, String(item));
|
|
263
|
-
} else {
|
|
264
|
-
searchParams.set(key, String(value));
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
if (searchParams.size > 0) {
|
|
268
|
-
kyOptions.searchParams = searchParams;
|
|
269
|
-
}
|
|
270
|
-
}
|
|
271
|
-
if (data instanceof FormData) {
|
|
272
|
-
kyOptions.body = data;
|
|
273
|
-
} else if (data !== undefined) {
|
|
274
|
-
kyOptions.json = data;
|
|
275
|
-
}
|
|
276
|
-
try {
|
|
277
|
-
return await cancellation.run(async () => {
|
|
278
|
-
if (options.responseType === "blob") {
|
|
279
|
-
return transportResult(await client[method](url, kyOptions).blob());
|
|
280
|
-
}
|
|
281
|
-
if (options.responseType === "response") {
|
|
282
|
-
return transportResult(await client[method](url, kyOptions));
|
|
283
|
-
}
|
|
284
|
-
const response = await client[method](url, kyOptions);
|
|
285
|
-
if (options.responseType === "void") {
|
|
286
|
-
const text = await response.text();
|
|
287
|
-
if (text.length > 0) {
|
|
288
|
-
throw new Error("Server returned data for an endpoint with no output contract");
|
|
289
|
-
}
|
|
290
|
-
}
|
|
291
|
-
if (options.responseType === "void" || response.status === 204 || response.headers.get("content-length") === "0") {
|
|
292
|
-
return transportResult(undefined);
|
|
293
|
-
}
|
|
294
|
-
return await response.json();
|
|
295
|
-
});
|
|
296
|
-
} catch (error) {
|
|
297
|
-
if (error instanceof RequestCancellationError) {
|
|
298
|
-
throw new ApiError(error.cause === "caller" ? "REQUEST_ABORTED" : "REQUEST_TIMEOUT", 0, undefined, error.message);
|
|
299
|
-
}
|
|
300
|
-
if (ApiError.is(error))
|
|
301
|
-
throw error;
|
|
302
|
-
emit({ type: "network_error" });
|
|
303
|
-
const response = isHTTPError(error) ? error.response : undefined;
|
|
304
|
-
const status = response?.status ?? 0;
|
|
305
|
-
const msg = error instanceof Error ? error.message : undefined;
|
|
306
|
-
throw new ApiError("UNKNOWN_ERROR", status, msg ? { message: msg } : undefined, msg, undefined, responseTraceId(response), { cause: error });
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
return {
|
|
310
|
-
baseUrl: config.baseUrl,
|
|
311
|
-
get: (url, options) => request("get", url, undefined, options),
|
|
312
|
-
head: (url, options) => request("head", url, undefined, options),
|
|
313
|
-
post: (url, data, options) => request("post", url, data, options),
|
|
314
|
-
put: (url, data, options) => request("put", url, data, options),
|
|
315
|
-
patch: (url, data, options) => request("patch", url, data, options),
|
|
316
|
-
delete: (url, options) => request("delete", url, undefined, options),
|
|
317
|
-
setServerContext(cookies) {
|
|
318
|
-
ssrCookies = cookies;
|
|
319
|
-
},
|
|
320
|
-
subscribe(listener) {
|
|
321
|
-
listeners.add(listener);
|
|
322
|
-
return () => listeners.delete(listener);
|
|
323
|
-
},
|
|
324
|
-
logout() {
|
|
325
|
-
isLoggedOut = true;
|
|
326
|
-
emit({ type: "logout" });
|
|
327
|
-
},
|
|
328
|
-
resetLogoutState() {
|
|
329
|
-
isLoggedOut = false;
|
|
330
|
-
}
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export { RequestCancellationError, createRequestCancellation, responseTraceId, ApiError, refuseLocally, isAbortLikeError, parseApiErrorBody, createHttpClient };
|
package/dist/index-4fpa9dy2.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
// src/tools/async-operation-contract.ts
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
var AsyncOperationCancelResultSchema = z.discriminatedUnion("outcome", [
|
|
4
|
-
z.object({ outcome: z.literal("accepted") }),
|
|
5
|
-
z.object({ outcome: z.literal("already_terminal") }),
|
|
6
|
-
z.object({ outcome: z.literal("rejected"), reason: z.string().min(1) })
|
|
7
|
-
]);
|
|
8
|
-
function createAsyncOperationSnapshotSchema(config) {
|
|
9
|
-
const progress = config.progress ? { progress: config.progress.optional() } : {};
|
|
10
|
-
return z.discriminatedUnion("phase", [
|
|
11
|
-
z.object({ phase: z.literal("pending"), ...progress }),
|
|
12
|
-
z.object({ phase: z.literal("running"), ...progress }),
|
|
13
|
-
z.object({ phase: z.literal("succeeded"), ...progress }),
|
|
14
|
-
z.object({ phase: z.literal("failed"), failure: config.failure, ...progress }),
|
|
15
|
-
z.object({ phase: z.literal("cancelled"), ...progress })
|
|
16
|
-
]);
|
|
17
|
-
}
|
|
18
|
-
// src/tools/view-file-contract.ts
|
|
19
|
-
import { z as z2 } from "zod";
|
|
20
|
-
var MAX_VIEW_FILES = 20;
|
|
21
|
-
var McpAnnotationsSchema = z2.object({
|
|
22
|
-
audience: z2.array(z2.enum(["user", "assistant"])).optional(),
|
|
23
|
-
priority: z2.number().optional()
|
|
24
|
-
});
|
|
25
|
-
var McpMediaContentSchema = z2.discriminatedUnion("type", [
|
|
26
|
-
z2.object({ type: z2.literal("text"), text: z2.string() }),
|
|
27
|
-
z2.object({
|
|
28
|
-
type: z2.literal("image"),
|
|
29
|
-
data: z2.string(),
|
|
30
|
-
mimeType: z2.string(),
|
|
31
|
-
annotations: McpAnnotationsSchema.optional()
|
|
32
|
-
}),
|
|
33
|
-
z2.object({
|
|
34
|
-
type: z2.literal("audio"),
|
|
35
|
-
data: z2.string(),
|
|
36
|
-
mimeType: z2.string(),
|
|
37
|
-
annotations: McpAnnotationsSchema.optional()
|
|
38
|
-
})
|
|
39
|
-
]);
|
|
40
|
-
var ViewFileErrorSchema = z2.object({
|
|
41
|
-
path: z2.string(),
|
|
42
|
-
message: z2.string()
|
|
43
|
-
});
|
|
44
|
-
var ViewFileOutputSchema = z2.object({
|
|
45
|
-
content: z2.array(McpMediaContentSchema),
|
|
46
|
-
errors: z2.array(ViewFileErrorSchema)
|
|
47
|
-
});
|
|
48
|
-
var ViewFileInputSchema = z2.object({
|
|
49
|
-
paths: z2.union([z2.string(), z2.array(z2.string()).max(MAX_VIEW_FILES)]).describe("Media URL(s) or file path(s) to view")
|
|
50
|
-
});
|
|
51
|
-
export { AsyncOperationCancelResultSchema, createAsyncOperationSnapshotSchema, McpAnnotationsSchema, McpMediaContentSchema, ViewFileErrorSchema, ViewFileOutputSchema, ViewFileInputSchema };
|
package/dist/index-6kyksz9y.js
DELETED
|
@@ -1,268 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
isUnsafeKey
|
|
3
|
-
} from "./index-kzfs85xp.js";
|
|
4
|
-
import {
|
|
5
|
-
isRecord
|
|
6
|
-
} from "./index-77fekveh.js";
|
|
7
|
-
|
|
8
|
-
// src/observability/sanitize.ts
|
|
9
|
-
var SENSITIVE_WORDS = new Set([
|
|
10
|
-
"password",
|
|
11
|
-
"passwords",
|
|
12
|
-
"passwd",
|
|
13
|
-
"pwd",
|
|
14
|
-
"secret",
|
|
15
|
-
"secrets",
|
|
16
|
-
"token",
|
|
17
|
-
"tokens",
|
|
18
|
-
"apikey",
|
|
19
|
-
"auth",
|
|
20
|
-
"authorization",
|
|
21
|
-
"bearer",
|
|
22
|
-
"cookie",
|
|
23
|
-
"cookies",
|
|
24
|
-
"credential",
|
|
25
|
-
"credentials"
|
|
26
|
-
]);
|
|
27
|
-
var SENSITIVE_WORD_PAIRS = new Set([
|
|
28
|
-
"apikey",
|
|
29
|
-
"privatekey",
|
|
30
|
-
"initdata",
|
|
31
|
-
"sessionid",
|
|
32
|
-
"sessionkey"
|
|
33
|
-
]);
|
|
34
|
-
var SENSITIVE_EXACT = new Set(["session"]);
|
|
35
|
-
function splitKeyWords(key) {
|
|
36
|
-
return key.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").toLowerCase().split(/[^a-z0-9]+/).filter((word) => word.length > 0);
|
|
37
|
-
}
|
|
38
|
-
function isSensitiveKeyDefault(key) {
|
|
39
|
-
const words = splitKeyWords(key);
|
|
40
|
-
if (words.length === 1 && SENSITIVE_EXACT.has(words[0] ?? ""))
|
|
41
|
-
return true;
|
|
42
|
-
for (let index = 0;index < words.length; index += 1) {
|
|
43
|
-
const word = words[index] ?? "";
|
|
44
|
-
if (SENSITIVE_WORDS.has(word))
|
|
45
|
-
return true;
|
|
46
|
-
const next = words[index + 1];
|
|
47
|
-
if (next !== undefined && SENSITIVE_WORD_PAIRS.has(word + next))
|
|
48
|
-
return true;
|
|
49
|
-
}
|
|
50
|
-
return false;
|
|
51
|
-
}
|
|
52
|
-
var DEFAULT_MAX_BYTES = 16000;
|
|
53
|
-
var DEFAULT_MAX_DEPTH = 20;
|
|
54
|
-
var DEFAULT_MAX_NODES = 20000;
|
|
55
|
-
var MASK = "[redacted]";
|
|
56
|
-
function redact(value, options = {}) {
|
|
57
|
-
const custom = options.sensitiveKeys;
|
|
58
|
-
const isSensitive = custom === undefined ? isSensitiveKeyDefault : (key) => {
|
|
59
|
-
custom.lastIndex = 0;
|
|
60
|
-
return custom.test(key) || options.includeDefaultSensitiveKeys === true && isSensitiveKeyDefault(key);
|
|
61
|
-
};
|
|
62
|
-
const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
|
|
63
|
-
const maxStringLength = options.maxStringLength ?? Number.POSITIVE_INFINITY;
|
|
64
|
-
const maxCollectionLength = options.maxCollectionLength ?? Number.POSITIVE_INFINITY;
|
|
65
|
-
const pathMatchers = (options.sensitivePaths ?? []).map((pattern) => pattern.split("."));
|
|
66
|
-
const matchesPath = (matcher, path, patternIndex = 0, pathIndex = 0) => {
|
|
67
|
-
if (patternIndex === matcher.length)
|
|
68
|
-
return pathIndex === path.length;
|
|
69
|
-
const segment = matcher[patternIndex];
|
|
70
|
-
if (segment === "**") {
|
|
71
|
-
if (patternIndex + 1 === matcher.length)
|
|
72
|
-
return true;
|
|
73
|
-
for (let next = pathIndex;next <= path.length; next += 1) {
|
|
74
|
-
if (matchesPath(matcher, path, patternIndex + 1, next))
|
|
75
|
-
return true;
|
|
76
|
-
}
|
|
77
|
-
return false;
|
|
78
|
-
}
|
|
79
|
-
if (pathIndex === path.length || segment !== "*" && segment !== path[pathIndex])
|
|
80
|
-
return false;
|
|
81
|
-
return matchesPath(matcher, path, patternIndex + 1, pathIndex + 1);
|
|
82
|
-
};
|
|
83
|
-
const isSensitivePath = (path) => pathMatchers.some((matcher) => matchesPath(matcher, path));
|
|
84
|
-
const stringBoundFor = (key) => {
|
|
85
|
-
const byKey = key === undefined ? undefined : options.maxStringLengthByKey?.[key];
|
|
86
|
-
return byKey ?? maxStringLength;
|
|
87
|
-
};
|
|
88
|
-
const safeString = (input, key) => {
|
|
89
|
-
const bound = stringBoundFor(key);
|
|
90
|
-
let output = input;
|
|
91
|
-
for (const pattern of options.sensitiveUrlPatterns ?? []) {
|
|
92
|
-
try {
|
|
93
|
-
const global = new RegExp(pattern.source, `${pattern.flags.replace(/[gy]/g, "")}g`);
|
|
94
|
-
output = output.replace(global, MASK);
|
|
95
|
-
} catch {}
|
|
96
|
-
}
|
|
97
|
-
if (output.length <= bound)
|
|
98
|
-
return output;
|
|
99
|
-
return `${output.slice(0, Math.max(0, bound))}…[truncated]`;
|
|
100
|
-
};
|
|
101
|
-
const ancestors = new Set;
|
|
102
|
-
const maxNodes = options.maxNodes ?? DEFAULT_MAX_NODES;
|
|
103
|
-
let visited = 0;
|
|
104
|
-
const walk = (input, depth, path = []) => {
|
|
105
|
-
if (depth > maxDepth)
|
|
106
|
-
return "[max depth]";
|
|
107
|
-
visited += 1;
|
|
108
|
-
if (visited > maxNodes)
|
|
109
|
-
return "[node budget]";
|
|
110
|
-
if (input === null || input === undefined)
|
|
111
|
-
return null;
|
|
112
|
-
if (typeof input === "string")
|
|
113
|
-
return safeString(input, path[path.length - 1]);
|
|
114
|
-
if (typeof input === "number" || typeof input === "boolean") {
|
|
115
|
-
return input;
|
|
116
|
-
}
|
|
117
|
-
if (input instanceof Uint8Array || input instanceof ArrayBuffer) {
|
|
118
|
-
return { _type: "binary", size: input.byteLength };
|
|
119
|
-
}
|
|
120
|
-
if (input instanceof Blob) {
|
|
121
|
-
return { _type: "blob", size: input.size, mime: input.type };
|
|
122
|
-
}
|
|
123
|
-
if (typeof FormData !== "undefined" && input instanceof FormData) {
|
|
124
|
-
return { _type: "formdata", keys: [...input.keys()] };
|
|
125
|
-
}
|
|
126
|
-
if (input instanceof Map) {
|
|
127
|
-
if (ancestors.has(input))
|
|
128
|
-
return "[circular]";
|
|
129
|
-
ancestors.add(input);
|
|
130
|
-
const entries = [...input.entries()];
|
|
131
|
-
const result = entries.slice(0, maxCollectionLength).map(([key, value2]) => {
|
|
132
|
-
const segment = typeof key === "string" ? key : String(key);
|
|
133
|
-
const childPath = [...path, segment];
|
|
134
|
-
return [
|
|
135
|
-
walk(key, depth + 1, [...path, "[key]"]),
|
|
136
|
-
typeof key === "string" && isSensitive(key) || isSensitivePath(childPath) ? MASK : walk(value2, depth + 1, childPath)
|
|
137
|
-
];
|
|
138
|
-
});
|
|
139
|
-
if (entries.length > maxCollectionLength)
|
|
140
|
-
result.push(["[truncated]", entries.length - maxCollectionLength]);
|
|
141
|
-
ancestors.delete(input);
|
|
142
|
-
return { _type: "map", entries: result };
|
|
143
|
-
}
|
|
144
|
-
if (input instanceof Set) {
|
|
145
|
-
if (ancestors.has(input))
|
|
146
|
-
return "[circular]";
|
|
147
|
-
ancestors.add(input);
|
|
148
|
-
const entries = [...input];
|
|
149
|
-
const values = entries.slice(0, maxCollectionLength).map((item, index) => walk(item, depth + 1, [...path, String(index)]));
|
|
150
|
-
if (entries.length > maxCollectionLength)
|
|
151
|
-
values.push(`[truncated ${entries.length - maxCollectionLength} items]`);
|
|
152
|
-
ancestors.delete(input);
|
|
153
|
-
return { _type: "set", values };
|
|
154
|
-
}
|
|
155
|
-
if (input instanceof Date) {
|
|
156
|
-
return Number.isNaN(input.getTime()) ? "[invalid date]" : input.toISOString();
|
|
157
|
-
}
|
|
158
|
-
if (input instanceof URL)
|
|
159
|
-
return safeString(input.href);
|
|
160
|
-
if (input instanceof Error) {
|
|
161
|
-
const property = (name) => {
|
|
162
|
-
try {
|
|
163
|
-
return Reflect.get(input, name);
|
|
164
|
-
} catch {
|
|
165
|
-
return "[unreadable]";
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
const stack = property("stack");
|
|
169
|
-
const cause = property("cause");
|
|
170
|
-
return {
|
|
171
|
-
_type: "error",
|
|
172
|
-
name: safeString(String(property("name")), "name"),
|
|
173
|
-
message: safeString(String(property("message")), "message"),
|
|
174
|
-
...stack !== undefined && { stack: safeString(String(stack), "stack") },
|
|
175
|
-
...cause !== undefined && { cause: walk(cause, depth + 1, [...path, "cause"]) }
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
if (Array.isArray(input)) {
|
|
179
|
-
if (ancestors.has(input))
|
|
180
|
-
return "[circular]";
|
|
181
|
-
ancestors.add(input);
|
|
182
|
-
const result = [];
|
|
183
|
-
const count = Math.min(input.length, maxCollectionLength);
|
|
184
|
-
for (let index = 0;index < count; index += 1) {
|
|
185
|
-
try {
|
|
186
|
-
result.push(walk(Reflect.get(input, index), depth + 1, [...path, String(index)]));
|
|
187
|
-
} catch {
|
|
188
|
-
result.push("[unreadable]");
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
if (input.length > maxCollectionLength)
|
|
192
|
-
result.push(`[truncated ${input.length - maxCollectionLength} items]`);
|
|
193
|
-
ancestors.delete(input);
|
|
194
|
-
return result;
|
|
195
|
-
}
|
|
196
|
-
if (isRecord(input)) {
|
|
197
|
-
if (ancestors.has(input))
|
|
198
|
-
return "[circular]";
|
|
199
|
-
ancestors.add(input);
|
|
200
|
-
const out = {};
|
|
201
|
-
const keys = Object.keys(input);
|
|
202
|
-
for (const key of keys.slice(0, maxCollectionLength)) {
|
|
203
|
-
if (isUnsafeKey(key))
|
|
204
|
-
continue;
|
|
205
|
-
const childPath = [...path, key];
|
|
206
|
-
if (isSensitive(key) || isSensitivePath(childPath)) {
|
|
207
|
-
out[key] = MASK;
|
|
208
|
-
continue;
|
|
209
|
-
}
|
|
210
|
-
try {
|
|
211
|
-
out[key] = walk(Reflect.get(input, key), depth + 1, childPath);
|
|
212
|
-
} catch {
|
|
213
|
-
out[key] = "[unreadable]";
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
if (keys.length > maxCollectionLength)
|
|
217
|
-
out["[truncated]"] = keys.length - maxCollectionLength;
|
|
218
|
-
ancestors.delete(input);
|
|
219
|
-
return out;
|
|
220
|
-
}
|
|
221
|
-
return String(input);
|
|
222
|
-
};
|
|
223
|
-
return walk(value, 0);
|
|
224
|
-
}
|
|
225
|
-
function truncatePreview(value, maxBytes = DEFAULT_MAX_BYTES) {
|
|
226
|
-
const json = JSON.stringify(value);
|
|
227
|
-
const bytes = new TextEncoder().encode(json);
|
|
228
|
-
if (bytes.byteLength <= maxBytes)
|
|
229
|
-
return value;
|
|
230
|
-
let end = Math.max(0, maxBytes);
|
|
231
|
-
while (end > 0 && ((bytes[end] ?? 0) & 192) === 128)
|
|
232
|
-
end -= 1;
|
|
233
|
-
const preview = new TextDecoder().decode(bytes.subarray(0, end));
|
|
234
|
-
return {
|
|
235
|
-
_truncated: true,
|
|
236
|
-
_originalBytes: bytes.byteLength,
|
|
237
|
-
preview: `${preview}…`
|
|
238
|
-
};
|
|
239
|
-
}
|
|
240
|
-
function sanitizePayload(value, options = {}) {
|
|
241
|
-
if (value === undefined || value === null)
|
|
242
|
-
return null;
|
|
243
|
-
try {
|
|
244
|
-
return truncatePreview(redact(value, options), options.maxBytes ?? DEFAULT_MAX_BYTES);
|
|
245
|
-
} catch {
|
|
246
|
-
return "[unserializable]";
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
function measureSize(value) {
|
|
250
|
-
if (value === undefined || value === null) {
|
|
251
|
-
return { resultSize: null, responseBytes: 0 };
|
|
252
|
-
}
|
|
253
|
-
let responseBytes = 0;
|
|
254
|
-
try {
|
|
255
|
-
responseBytes = new TextEncoder().encode(JSON.stringify(value)).byteLength;
|
|
256
|
-
} catch {
|
|
257
|
-
return { resultSize: null, responseBytes: 0, unserializable: true };
|
|
258
|
-
}
|
|
259
|
-
if (Array.isArray(value)) {
|
|
260
|
-
return { resultSize: value.length, responseBytes };
|
|
261
|
-
}
|
|
262
|
-
if (isRecord(value) && Array.isArray(value.items) && "nextCursor" in value) {
|
|
263
|
-
return { resultSize: value.items.length, responseBytes };
|
|
264
|
-
}
|
|
265
|
-
return { resultSize: null, responseBytes };
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
export { redact, truncatePreview, sanitizePayload, measureSize };
|
package/dist/index-77fekveh.js
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// src/internal/typed.ts
|
|
2
|
-
function typedEntries(value) {
|
|
3
|
-
return Object.entries(value);
|
|
4
|
-
}
|
|
5
|
-
function isRecord(value) {
|
|
6
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
7
|
-
}
|
|
8
|
-
function callRuntimeHandler(handler, context) {
|
|
9
|
-
if (typeof handler !== "function") {
|
|
10
|
-
throw new TypeError("Runtime handler must be a function");
|
|
11
|
-
}
|
|
12
|
-
return Reflect.apply(handler, undefined, [context]);
|
|
13
|
-
}
|
|
14
|
-
function executableAgentRuntimeTools(tools) {
|
|
15
|
-
for (const tool of tools) {
|
|
16
|
-
if (typeof tool.handler !== "function") {
|
|
17
|
-
throw new TypeError(`Runtime tool "${tool.name}" must provide a handler`);
|
|
18
|
-
}
|
|
19
|
-
if (tool.present?.agent !== undefined && typeof tool.present.agent !== "function") {
|
|
20
|
-
throw new TypeError(`Runtime tool "${tool.name}" Agent presenter must be a function`);
|
|
21
|
-
}
|
|
22
|
-
if (tool.present?.agent !== undefined && tool.output === undefined) {
|
|
23
|
-
throw new TypeError(`Runtime tool "${tool.name}" Agent presenter requires an output schema`);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return tools;
|
|
27
|
-
}
|
|
28
|
-
function transportResult(value) {
|
|
29
|
-
return value;
|
|
30
|
-
}
|
|
31
|
-
function mapObject(source, mapper) {
|
|
32
|
-
const result = {};
|
|
33
|
-
for (const [key, value] of typedEntries(source)) {
|
|
34
|
-
const mapped = mapper(key, value);
|
|
35
|
-
if (mapped !== undefined)
|
|
36
|
-
result[key] = mapped;
|
|
37
|
-
}
|
|
38
|
-
return result;
|
|
39
|
-
}
|
|
40
|
-
function mapObjectTypeBoundary(source, mapper) {
|
|
41
|
-
return mapObject(source, (key, value) => mapper(key, value));
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export { typedEntries, isRecord, callRuntimeHandler, executableAgentRuntimeTools, transportResult, mapObject, mapObjectTypeBoundary };
|