stitchkit 0.93.0 → 0.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +134 -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-tool-contract.d.ts +2 -1
- package/dist/agent-runtime/coding-tool-contract.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-types.d.ts +2 -2
- 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/managed-tools.d.ts +1 -1
- 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 → agent-runtime/openrouter.d.ts} +3 -3
- 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 +9 -4
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/{agent-runtime-sqlite-bun.d.ts → agent-runtime/sqlite-bun.d.ts} +5 -4
- 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 → agent-runtime/sqlite-node.d.ts} +5 -4
- 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/{testing/agent-store-conformance.d.ts → agent-runtime/store-conformance.d.ts} +2 -2
- 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.d.ts → store-driver-contract.d.ts} +7 -7
- 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.d.ts +1 -1
- package/dist/application/admission.d.ts.map +1 -1
- package/dist/application/events.d.ts +1 -1
- package/dist/application/events.d.ts.map +1 -1
- package/dist/{server → application}/file-state-store.d.ts +1 -1
- 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/opentelemetry.d.ts +1 -1
- package/dist/application/opentelemetry.d.ts.map +1 -1
- package/dist/application/watch-hub.d.ts +2 -2
- package/dist/application/watch-hub.d.ts.map +1 -1
- 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 +1 -1
- 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.d.ts +1 -1
- package/dist/browser/http.d.ts.map +1 -1
- 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.d.ts +23 -1
- 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/define.d.ts +72 -65
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/{internal/errors.d.ts → contract/normalize.d.ts} +3 -39
- package/dist/contract/normalize.d.ts.map +1 -0
- package/dist/contract/tool-view.d.ts +135 -0
- package/dist/contract/tool-view.d.ts.map +1 -0
- package/dist/declaration/declaration.d.ts.map +1 -0
- package/dist/{agent-runtime/durability-contract.d.ts → durability/contract.d.ts} +2 -2
- package/dist/durability/contract.d.ts.map +1 -0
- package/dist/{agent-runtime/durability.d.ts → durability/engine.d.ts} +4 -4
- package/dist/durability/engine.d.ts.map +1 -0
- package/dist/durability/events.d.ts +101 -0
- package/dist/durability/events.d.ts.map +1 -0
- package/dist/{agent-runtime/durability-json.d.ts → durability/json.d.ts} +1 -1
- package/dist/durability/json.d.ts.map +1 -0
- package/dist/{agent-runtime/durability-ledger.d.ts → durability/ledger.d.ts} +2 -2
- package/dist/durability/ledger.d.ts.map +1 -0
- package/dist/{agent-runtime/durability-scheduler.d.ts → durability/scheduler.d.ts} +2 -2
- 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/{agent-runtime-browser.js → entrypoints/agent-runtime/browser.js} +3 -3
- package/dist/{agent-runtime-coding-tools.d.ts → entrypoints/agent-runtime/coding-tools.d.ts} +2 -2
- package/dist/entrypoints/agent-runtime/coding-tools.d.ts.map +1 -0
- package/dist/entrypoints/agent-runtime/coding-tools.js +22 -0
- package/dist/{agent-runtime-harness.d.ts → entrypoints/agent-runtime/harness.d.ts} +2 -2
- package/dist/entrypoints/agent-runtime/harness.d.ts.map +1 -0
- package/dist/{agent-runtime-harness.js → entrypoints/agent-runtime/harness.js} +24 -25
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +2 -0
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -0
- package/dist/{agent-runtime-openrouter.js → entrypoints/agent-runtime/openrouter.js} +3 -3
- package/dist/{agent-runtime-sandbox.d.ts → entrypoints/agent-runtime/sandbox.d.ts} +5 -5
- package/dist/entrypoints/agent-runtime/sandbox.d.ts.map +1 -0
- package/dist/{agent-runtime-sandbox.js → entrypoints/agent-runtime/sandbox.js} +11 -12
- 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/{agent-runtime-sqlite-bun.js → entrypoints/agent-runtime/sqlite/bun.js} +8 -6
- 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/{agent-runtime-sqlite-node.js → entrypoints/agent-runtime/sqlite/node.js} +8 -6
- 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 +1084 -0
- package/dist/{agent-runtime.d.ts → entrypoints/agent-runtime.d.ts} +41 -37
- package/dist/entrypoints/agent-runtime.d.ts.map +1 -0
- package/dist/{agent-runtime.js → entrypoints/agent-runtime.js} +408 -366
- package/dist/{application-diagnostic-journal.d.ts → entrypoints/application/diagnostic-journal.d.ts} +2 -2
- package/dist/entrypoints/application/diagnostic-journal.d.ts.map +1 -0
- package/dist/{application-diagnostic-journal.js → entrypoints/application/diagnostic-journal.js} +3 -3
- package/dist/{application-grammy.d.ts → entrypoints/application/grammy.d.ts} +2 -2
- package/dist/entrypoints/application/grammy.d.ts.map +1 -0
- package/dist/{application-grammy.js → entrypoints/application/grammy.js} +2 -2
- package/dist/{application-opentelemetry.d.ts → entrypoints/application/opentelemetry.d.ts} +2 -2
- package/dist/entrypoints/application/opentelemetry.d.ts.map +1 -0
- package/dist/{application-opentelemetry.js → entrypoints/application/opentelemetry.js} +4 -4
- package/dist/{application-schemas.d.ts → entrypoints/application/schemas.d.ts} +2 -2
- package/dist/entrypoints/application/schemas.d.ts.map +1 -0
- package/dist/{application-schemas.js → entrypoints/application/schemas.js} +2 -2
- package/dist/{application.d.ts → entrypoints/application.d.ts} +22 -21
- package/dist/entrypoints/application.d.ts.map +1 -0
- package/dist/{application.js → entrypoints/application.js} +24 -22
- package/dist/entrypoints/bin/upgrade-cli.d.ts.map +1 -0
- package/dist/{upgrade-cli.js → entrypoints/bin/upgrade-cli.js} +3 -3
- package/dist/{cli.d.ts → entrypoints/cli.d.ts} +15 -15
- package/dist/entrypoints/cli.d.ts.map +1 -0
- package/dist/{cli.js → entrypoints/cli.js} +30 -32
- package/dist/entrypoints/contract.d.ts +9 -0
- package/dist/entrypoints/contract.d.ts.map +1 -0
- package/dist/{contract/index.js → entrypoints/contract.js} +14 -6
- package/dist/entrypoints/declaration.d.ts +2 -0
- package/dist/entrypoints/declaration.d.ts.map +1 -0
- package/dist/{declaration.js → entrypoints/declaration.js} +1 -1
- package/dist/{files.d.ts → entrypoints/files.d.ts} +2 -2
- package/dist/entrypoints/files.d.ts.map +1 -0
- package/dist/{files.js → entrypoints/files.js} +3 -3
- package/dist/{geo.d.ts → entrypoints/geo.d.ts} +1 -1
- package/dist/entrypoints/geo.d.ts.map +1 -0
- package/dist/{geo.js → entrypoints/geo.js} +4 -4
- package/dist/entrypoints/google.d.ts +2 -0
- package/dist/entrypoints/google.d.ts.map +1 -0
- package/dist/{google.js → entrypoints/google.js} +1 -1
- package/dist/{index.d.ts → entrypoints/index.d.ts} +14 -13
- package/dist/entrypoints/index.d.ts.map +1 -0
- package/dist/{index.js → entrypoints/index.js} +99 -33
- package/dist/{live.d.ts → entrypoints/live.d.ts} +4 -4
- package/dist/entrypoints/live.d.ts.map +1 -0
- package/dist/{live.js → entrypoints/live.js} +6 -4
- package/dist/{node.d.ts → entrypoints/node.d.ts} +11 -11
- package/dist/entrypoints/node.d.ts.map +1 -0
- package/dist/{node.js → entrypoints/node.js} +20 -16
- package/dist/entrypoints/oauth.d.ts +2 -0
- package/dist/entrypoints/oauth.d.ts.map +1 -0
- package/dist/{oauth.js → entrypoints/oauth.js} +3 -3
- package/dist/{observability/index.d.ts → entrypoints/observability.d.ts} +11 -11
- package/dist/entrypoints/observability.d.ts.map +1 -0
- package/dist/{observability/index.js → entrypoints/observability.js} +9 -11
- package/dist/entrypoints/primitives.d.ts +3 -0
- package/dist/entrypoints/primitives.d.ts.map +1 -0
- package/dist/{primitives.js → entrypoints/primitives.js} +1 -6
- package/dist/{react.d.ts → entrypoints/react.d.ts} +4 -4
- package/dist/entrypoints/react.d.ts.map +1 -0
- package/dist/{react.js → entrypoints/react.js} +3 -3
- package/dist/{release.d.ts → entrypoints/release.d.ts} +4 -4
- package/dist/entrypoints/release.d.ts.map +1 -0
- package/dist/{release.js → entrypoints/release.js} +1 -1
- package/dist/{remote.d.ts → entrypoints/remote.d.ts} +1 -1
- package/dist/entrypoints/remote.d.ts.map +1 -0
- package/dist/entrypoints/remote.js +66 -0
- package/dist/{server/index.d.ts → entrypoints/server.d.ts} +35 -34
- package/dist/entrypoints/server.d.ts.map +1 -0
- package/dist/{server/index.js → entrypoints/server.js} +294 -244
- package/dist/{telegram.d.ts → entrypoints/telegram.d.ts} +2 -2
- package/dist/entrypoints/telegram.d.ts.map +1 -0
- package/dist/{telegram.js → entrypoints/telegram.js} +1 -1
- package/dist/entrypoints/testing.d.ts +9 -0
- package/dist/entrypoints/testing.d.ts.map +1 -0
- package/dist/{testing.js → entrypoints/testing.js} +80 -919
- package/dist/{tools/connections/index.d.ts → entrypoints/tools/connections.d.ts} +6 -7
- package/dist/entrypoints/tools/connections.d.ts.map +1 -0
- package/dist/{tools/connections/index.js → entrypoints/tools/connections.js} +7 -4
- package/dist/{tools-contract.d.ts → entrypoints/tools/contract.d.ts} +5 -5
- package/dist/entrypoints/tools/contract.d.ts.map +1 -0
- package/dist/{tools-contract.js → entrypoints/tools/contract.js} +4 -4
- package/dist/{tool-invoker.d.ts → entrypoints/tools/invoker.d.ts} +2 -2
- package/dist/entrypoints/tools/invoker.d.ts.map +1 -0
- package/dist/entrypoints/tools/invoker.js +20 -0
- package/dist/entrypoints/tools.d.ts +51 -0
- package/dist/entrypoints/tools.d.ts.map +1 -0
- package/dist/{tools.js → entrypoints/tools.js} +1787 -1751
- package/dist/{tracking-server.d.ts → entrypoints/tracking/server.d.ts} +8 -8
- package/dist/entrypoints/tracking/server.d.ts.map +1 -0
- package/dist/{tracking.d.ts → entrypoints/tracking.d.ts} +15 -15
- package/dist/entrypoints/tracking.d.ts.map +1 -0
- package/dist/{tracking.js → entrypoints/tracking.js} +5 -8
- package/dist/google/google.d.ts.map +1 -0
- package/dist/{index-a916km3r.js → index-0b1ess5e.js} +6 -13
- package/dist/{index-zwkgfq1s.js → index-1nd48tm9.js} +113 -118
- package/dist/{index-7zbps32p.js → index-1zbbzgfh.js} +2 -2
- package/dist/{index-mzvgxp0n.js → index-2cr1cqhn.js} +16 -4
- package/dist/{index-f9mb610r.js → index-35mh5bhj.js} +2 -2
- package/dist/index-48ffdxgk.js +6 -0
- package/dist/index-58k4fp34.js +1023 -0
- package/dist/{index-p13mwz16.js → index-83bdg97s.js} +1 -1
- package/dist/index-97ac4gph.js +3618 -0
- package/dist/{index-kw9t5ayn.js → index-cq4qfycf.js} +5 -5
- package/dist/{index-7gnkny4z.js → index-d9pk3td4.js} +1 -1
- package/dist/{index-e42wzzz5.js → index-dcpdvjsc.js} +7 -7
- package/dist/{index-h9etkkyk.js → index-dydjcp8z.js} +102 -25
- package/dist/{index-sr93cwf9.js → index-e2z3ahw9.js} +2 -2
- package/dist/{index-yewwh1w4.js → index-e87kakm4.js} +96 -11
- package/dist/{index-cby4ar3v.js → index-eqqvgdb3.js} +1 -1
- package/dist/index-fdp6hdxn.js +942 -0
- package/dist/{index-0a349c33.js → index-gyr48nzg.js} +125 -198
- package/dist/{index-wnfk50r0.js → index-h6eeys1v.js} +1 -1
- package/dist/{index-77fekveh.js → index-hffjpmq9.js} +1 -15
- package/dist/{index-yn8remb1.js → index-j05z5gn4.js} +50 -14
- package/dist/index-k5hsfc3j.js +31 -0
- package/dist/{index-fq77yfzc.js → index-kj2wbeta.js} +1 -1
- package/dist/index-kvj7f4hq.js +39 -0
- package/dist/{index-4fpa9dy2.js → index-m9zn6cpq.js} +2 -2
- package/dist/{index-2na0qrfn.js → index-mdzh02yc.js} +7 -7
- package/dist/{index-ywd0y6m1.js → index-mkm15s49.js} +1 -1
- package/dist/index-mp5sn43f.js +1084 -0
- package/dist/{index-3bmnp41g.js → index-n6hxg8as.js} +507 -419
- package/dist/index-ngfhvfpd.js +30 -0
- package/dist/{index-e0znv5gn.js → index-p5r7qpdd.js} +2 -93
- package/dist/{index-n0f51dfn.js → index-p81267c2.js} +608 -549
- package/dist/{index-wc4x00bn.js → index-qwhynv6x.js} +1 -1
- package/dist/index-r7nmqpsg.js +154 -0
- package/dist/{index-bx75zwt7.js → index-rewkc2hj.js} +5 -4
- package/dist/{index-9f8ztey6.js → index-sees8yf8.js} +2 -2
- package/dist/{index-vjpvjqpn.js → index-v38qyerb.js} +16 -2
- package/dist/{index-2c2bjw3s.js → index-vcvkq30w.js} +3 -3
- package/dist/index-wqgjfstn.js +18 -0
- package/dist/{index-f477k430.js → index-x4799c19.js} +1 -1
- package/dist/{index-cxqhvq21.js → index-xnj9bgxe.js} +142 -129
- package/dist/index-xsqjkha9.js +281 -0
- package/dist/{index-6kyksz9y.js → index-yw4fzmdz.js} +1 -1
- package/dist/{index-3xwxfj4z.js → index-zeemqhqx.js} +1 -1
- package/dist/{index-tmwcrptx.js → index-zfrhfn82.js} +1 -1
- package/dist/index-znfs20ss.js +98 -0
- 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/logger.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/zod-issues.d.ts +38 -0
- package/dist/internal/zod-issues.d.ts.map +1 -0
- package/dist/{tools/json-schema-dialect.d.ts → json-schema/dialect.d.ts} +1 -1
- 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-delta.d.ts.map +1 -1
- package/dist/{oauth.d.ts → oauth/authorization-code.d.ts} +1 -1
- package/dist/oauth/authorization-code.d.ts.map +1 -0
- package/dist/observability/audit.d.ts +2 -2
- 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/{internal/observability-sink.d.ts → observability/bounded-sink.d.ts} +2 -2
- 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 +1 -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/socket.d.ts +1 -1
- package/dist/realtime/socket.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 +18 -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.d.ts +1 -1
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/middleware/auth.d.ts +1 -1
- 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/trust-fence.d.ts +1 -1
- package/dist/server/middleware/trust-fence.d.ts.map +1 -1
- package/dist/server/multipart.d.ts +1 -1
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/{tools/oauth-metadata.d.ts → server/oauth/metadata.d.ts} +2 -2
- package/dist/server/oauth/metadata.d.ts.map +1 -0
- package/dist/{tools/oauth-provider.d.ts → server/oauth/provider.d.ts} +2 -2
- 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/types.d.ts +7 -4
- package/dist/server/types.d.ts.map +1 -1
- package/dist/testing/handler-clients.d.ts +31 -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/surface-conformance.d.ts +2 -1
- package/dist/testing/surface-conformance.d.ts.map +1 -1
- package/dist/testing/surface-manifest.d.ts +30 -4
- package/dist/testing/surface-manifest.d.ts.map +1 -1
- package/dist/tools/{cli-args.d.ts → cli/args.d.ts} +1 -1
- package/dist/tools/cli/args.d.ts.map +1 -0
- package/dist/tools/{cli-checkpoint.d.ts → cli/checkpoint.d.ts} +1 -1
- package/dist/tools/cli/checkpoint.d.ts.map +1 -0
- package/dist/tools/{cli-command.d.ts → cli/command.d.ts} +4 -4
- package/dist/tools/cli/command.d.ts.map +1 -0
- package/dist/tools/{cli.d.ts → cli/config.d.ts} +5 -9
- 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 → cli/format.d.ts} +2 -2
- 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 → cli/installer.d.ts} +2 -2
- package/dist/tools/cli/installer.d.ts.map +1 -0
- package/dist/tools/{cli-invoke.d.ts → cli/invoke.d.ts} +8 -8
- 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 → cli/manifest.d.ts} +1 -1
- package/dist/tools/cli/manifest.d.ts.map +1 -0
- package/dist/tools/{cli-policy.d.ts → cli/policy.d.ts} +2 -2
- 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 → cli/profile.d.ts} +2 -2
- 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 → cli/signature.d.ts} +2 -2
- package/dist/tools/cli/signature.d.ts.map +1 -0
- package/dist/tools/{cli-stream.d.ts → cli/stream.d.ts} +4 -4
- package/dist/tools/cli/stream.d.ts.map +1 -0
- package/dist/tools/{cli-update.d.ts → cli/update.d.ts} +3 -3
- package/dist/tools/cli/update.d.ts.map +1 -0
- package/dist/tools/{cli-view.d.ts → cli/view.d.ts} +2 -2
- package/dist/tools/cli/view.d.ts.map +1 -0
- package/dist/tools/{cli-wait.d.ts → cli/wait.d.ts} +2 -2
- 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.d.ts +30 -3
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/internal/surface-projector.d.ts +8 -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 +11 -3
- package/dist/tools/invoker.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 → mcp/app.d.ts} +1 -1
- package/dist/tools/mcp/app.d.ts.map +1 -0
- package/dist/tools/{mcp-catalog.d.ts → mcp/catalog.d.ts} +2 -2
- package/dist/tools/mcp/catalog.d.ts.map +1 -0
- package/dist/tools/{mcp-handler.d.ts → mcp/handler.d.ts} +5 -5
- package/dist/tools/mcp/handler.d.ts.map +1 -0
- package/dist/tools/{mcp.d.ts → mcp/mount.d.ts} +9 -9
- package/dist/tools/mcp/mount.d.ts.map +1 -0
- package/dist/tools/{mcp-prepare.d.ts → mcp/prepare.d.ts} +9 -9
- package/dist/tools/mcp/prepare.d.ts.map +1 -0
- package/dist/tools/{mcp-progress.d.ts → mcp/progress.d.ts} +2 -2
- package/dist/tools/mcp/progress.d.ts.map +1 -0
- package/dist/tools/mcp/register.d.ts +35 -0
- package/dist/tools/mcp/register.d.ts.map +1 -0
- package/dist/tools/{mcp-round-policy.d.ts → mcp/round-policy.d.ts} +2 -2
- package/dist/tools/mcp/round-policy.d.ts.map +1 -0
- package/dist/tools/{mcp-round.d.ts → mcp/round.d.ts} +4 -4
- package/dist/tools/mcp/round.d.ts.map +1 -0
- package/dist/tools/mcp/runtime-tools.d.ts +24 -0
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -0
- package/dist/tools/{mcp-stdio-signals.d.ts → mcp/stdio-signals.d.ts} +3 -3
- package/dist/tools/mcp/stdio-signals.d.ts.map +1 -0
- package/dist/tools/{mcp-stdio.d.ts → mcp/stdio.d.ts} +4 -4
- package/dist/tools/mcp/stdio.d.ts.map +1 -0
- package/dist/tools/{mcp-trace.d.ts → mcp/trace.d.ts} +1 -1
- package/dist/tools/mcp/trace.d.ts.map +1 -0
- package/dist/tools/mount.d.ts +12 -7
- package/dist/tools/mount.d.ts.map +1 -1
- package/dist/tools/native-definition.d.ts +3 -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 +40 -0
- package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -0
- package/dist/tools/operations/async-operation-runtime-types.d.ts +68 -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/{define-wait-tool.d.ts → operations/define-wait-tool.d.ts} +2 -2
- 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 +11 -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/{presentation.d.ts → schema/presentation.d.ts} +2 -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/toolkit.d.ts +4 -4
- package/dist/tools/toolkit.d.ts.map +1 -1
- package/dist/tools/{define-download-tool.d.ts → transfer/define-download-tool.d.ts} +4 -4
- package/dist/tools/transfer/define-download-tool.d.ts.map +1 -0
- package/dist/tools/{define-upload-tool.d.ts → transfer/define-upload-tool.d.ts} +3 -3
- package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -0
- package/dist/tools/{define-view-file-tool.d.ts → transfer/define-view-file-tool.d.ts} +2 -2
- package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -0
- package/dist/tools/{download-core.d.ts → transfer/download-core.d.ts} +2 -2
- package/dist/tools/transfer/download-core.d.ts.map +1 -0
- package/dist/tools/{managed-file-error.d.ts → transfer/managed-file-error.d.ts} +1 -1
- package/dist/tools/transfer/managed-file-error.d.ts.map +1 -0
- package/dist/tools/{mount-download.d.ts → transfer/mount-download.d.ts} +1 -1
- package/dist/tools/transfer/mount-download.d.ts.map +1 -0
- package/dist/tools/{mount-upload.d.ts → transfer/mount-upload.d.ts} +1 -1
- 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/{upload-core.d.ts → transfer/upload-core.d.ts} +1 -1
- 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/{view-file.d.ts → transfer/view-file.d.ts} +1 -1
- 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/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 +223 -0
- package/llms/application.txt +1144 -0
- package/llms/cli.txt +977 -0
- package/llms/contract.txt +606 -0
- package/llms/declaration.txt +286 -0
- package/llms/files.txt +30 -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 +838 -0
- package/llms/tools.txt +1004 -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 +214 -75
- package/llms.txt +54 -5
- package/package.json +84 -83
- package/dist/agent-runtime/durability-contract.d.ts.map +0 -1
- package/dist/agent-runtime/durability-json.d.ts.map +0 -1
- package/dist/agent-runtime/durability-ledger.d.ts.map +0 -1
- package/dist/agent-runtime/durability-scheduler.d.ts.map +0 -1
- package/dist/agent-runtime/durability.d.ts.map +0 -1
- 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-coding-tools.d.ts.map +0 -1
- package/dist/agent-runtime-coding-tools.js +0 -23
- package/dist/agent-runtime-harness.d.ts.map +0 -1
- package/dist/agent-runtime-openrouter.d.ts.map +0 -1
- package/dist/agent-runtime-sandbox.d.ts.map +0 -1
- package/dist/agent-runtime-sqlite-bun.d.ts.map +0 -1
- package/dist/agent-runtime-sqlite-node.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/application/channel.d.ts.map +0 -1
- package/dist/application-diagnostic-journal.d.ts.map +0 -1
- package/dist/application-grammy.d.ts.map +0 -1
- package/dist/application-opentelemetry.d.ts.map +0 -1
- package/dist/application-schemas.d.ts.map +0 -1
- package/dist/application.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/contract/index.d.ts +0 -8
- package/dist/contract/index.d.ts.map +0 -1
- package/dist/declaration.d.ts.map +0 -1
- package/dist/files.d.ts.map +0 -1
- package/dist/geo.d.ts.map +0 -1
- package/dist/google.d.ts.map +0 -1
- package/dist/index-0j3vcp5m.js +0 -28
- package/dist/index-a11g2kry.js +0 -866
- package/dist/index-cnyk6te3.js +0 -77
- package/dist/index-fadnxwna.js +0 -1046
- package/dist/index-hrbajay7.js +0 -1196
- package/dist/index-s8cnx02s.js +0 -90
- package/dist/index-v5573g1k.js +0 -142
- package/dist/index-vk3kq9sb.js +0 -3344
- package/dist/index.d.ts.map +0 -1
- package/dist/internal/errors.d.ts.map +0 -1
- package/dist/internal/observability-sink.d.ts.map +0 -1
- package/dist/live.d.ts.map +0 -1
- package/dist/logger.d.ts.map +0 -1
- package/dist/node.d.ts.map +0 -1
- package/dist/oauth.d.ts.map +0 -1
- package/dist/observability/index.d.ts.map +0 -1
- package/dist/primitives.d.ts +0 -3
- package/dist/primitives.d.ts.map +0 -1
- package/dist/react.d.ts.map +0 -1
- package/dist/release.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/request.d.ts.map +0 -1
- package/dist/telegram.d.ts.map +0 -1
- 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/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.map +0 -1
- package/dist/tools/cli-checkpoint.d.ts.map +0 -1
- package/dist/tools/cli-command.d.ts.map +0 -1
- package/dist/tools/cli-format.d.ts.map +0 -1
- package/dist/tools/cli-installer.d.ts.map +0 -1
- package/dist/tools/cli-invoke.d.ts.map +0 -1
- package/dist/tools/cli-manifest.d.ts.map +0 -1
- package/dist/tools/cli-policy.d.ts.map +0 -1
- package/dist/tools/cli-profile.d.ts.map +0 -1
- package/dist/tools/cli-signature.d.ts.map +0 -1
- package/dist/tools/cli-stream.d.ts.map +0 -1
- package/dist/tools/cli-update.d.ts.map +0 -1
- package/dist/tools/cli-view.d.ts.map +0 -1
- package/dist/tools/cli-wait.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/tools/define-download-tool.d.ts.map +0 -1
- package/dist/tools/define-upload-tool.d.ts.map +0 -1
- package/dist/tools/define-view-file-tool.d.ts.map +0 -1
- package/dist/tools/define-wait-tool.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/tools/json-schema.d.ts.map +0 -1
- package/dist/tools/managed-file-error.d.ts.map +0 -1
- package/dist/tools/mcp-app.d.ts.map +0 -1
- package/dist/tools/mcp-catalog.d.ts.map +0 -1
- package/dist/tools/mcp-handler.d.ts.map +0 -1
- package/dist/tools/mcp-prepare.d.ts.map +0 -1
- package/dist/tools/mcp-progress.d.ts.map +0 -1
- package/dist/tools/mcp-round-policy.d.ts.map +0 -1
- package/dist/tools/mcp-round.d.ts.map +0 -1
- package/dist/tools/mcp-stdio-signals.d.ts.map +0 -1
- package/dist/tools/mcp-stdio.d.ts.map +0 -1
- package/dist/tools/mcp-trace.d.ts.map +0 -1
- package/dist/tools/mcp.d.ts.map +0 -1
- package/dist/tools/mount-download.d.ts.map +0 -1
- 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.map +0 -1
- 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.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.map +0 -1
- package/dist/tools/view-file-contract.d.ts.map +0 -1
- 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.map +0 -1
- package/dist/tools.d.ts +0 -50
- package/dist/tools.d.ts.map +0 -1
- package/dist/tracking-server.d.ts.map +0 -1
- package/dist/tracking.d.ts.map +0 -1
- package/dist/upgrade-cli.d.ts.map +0 -1
- 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/{index-actkayzn.js → index-70yj2ebz.js} +3 -3
- /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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/durability/contract.ts
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
var DURABILITY_STEP_EVENT_KIND = "durability/step";
|
|
4
4
|
var DURABILITY_PARK_EVENT_KIND = "durability/park";
|
|
@@ -68,7 +68,7 @@ class ParkAbortedError extends Error {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
// src/
|
|
71
|
+
// src/durability/json.ts
|
|
72
72
|
import { z as z2 } from "zod";
|
|
73
73
|
function losslessJson(value, ancestors = new Set, depth = 0) {
|
|
74
74
|
if (depth > 100)
|
|
@@ -109,7 +109,7 @@ function losslessJson(value, ancestors = new Set, depth = 0) {
|
|
|
109
109
|
}
|
|
110
110
|
var DurableJsonSchema = z2.custom((value) => losslessJson(value), "Expected lossless JSON data (finite numbers, plain objects and dense arrays; no accessors)");
|
|
111
111
|
|
|
112
|
-
// src/
|
|
112
|
+
// src/durability/ledger.ts
|
|
113
113
|
function stepKey(conversationId, runId, stepName) {
|
|
114
114
|
return JSON.stringify([conversationId, runId, stepName]);
|
|
115
115
|
}
|
|
@@ -216,7 +216,7 @@ async function readDurabilityLedger(store, conversationId, view) {
|
|
|
216
216
|
return view;
|
|
217
217
|
}
|
|
218
218
|
|
|
219
|
-
// src/
|
|
219
|
+
// src/durability/scheduler.ts
|
|
220
220
|
var systemClock = {
|
|
221
221
|
now: () => Date.now(),
|
|
222
222
|
schedule(callback, delayMs) {
|
|
@@ -300,7 +300,7 @@ function createParkWaiter(parkWaiters, key, signal) {
|
|
|
300
300
|
return { outcome, cancel: cleanup };
|
|
301
301
|
}
|
|
302
302
|
|
|
303
|
-
// src/
|
|
303
|
+
// src/durability/engine.ts
|
|
304
304
|
function releaseSettled(registry, key, pending) {
|
|
305
305
|
const release = () => {
|
|
306
306
|
if (registry.get(key) === pending)
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentToolError,
|
|
3
3
|
resolveToolDurability
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-cq4qfycf.js";
|
|
5
5
|
import {
|
|
6
6
|
collectToolSurface
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-vcvkq30w.js";
|
|
8
8
|
import {
|
|
9
9
|
createToolRunner,
|
|
10
10
|
formatToolError
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-2cr1cqhn.js";
|
|
12
12
|
import {
|
|
13
13
|
isToolExecutionControlError,
|
|
14
14
|
toolCauseFromResult,
|
|
15
15
|
toolResultFromError
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-j05z5gn4.js";
|
|
17
17
|
import {
|
|
18
18
|
isRecord
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-hffjpmq9.js";
|
|
20
20
|
|
|
21
21
|
// src/tools/agent.ts
|
|
22
22
|
import { jsonSchema, tool } from "ai";
|
|
@@ -29,11 +29,11 @@ function mountAgent(services, config = {}) {
|
|
|
29
29
|
const tools = {};
|
|
30
30
|
const runTool = createToolRunner({
|
|
31
31
|
source: "agent",
|
|
32
|
+
toolSurface: true,
|
|
32
33
|
extend: config.extend,
|
|
33
34
|
context: config.context,
|
|
34
35
|
hooks: config.hooks,
|
|
35
36
|
lifecycle: config.lifecycle,
|
|
36
|
-
errorHint: config.errorHint,
|
|
37
37
|
coerceJsonArgs: config.coerceJsonArgs,
|
|
38
38
|
onOutputStrip: config.onOutputStrip
|
|
39
39
|
});
|
|
@@ -53,6 +53,7 @@ function mountAgent(services, config = {}) {
|
|
|
53
53
|
const callContext = { signal: options.abortSignal, toolCallId: options.toolCallId };
|
|
54
54
|
const executeTool = durability ? createToolRunner({
|
|
55
55
|
source: "agent",
|
|
56
|
+
toolSurface: true,
|
|
56
57
|
extend: config.extend,
|
|
57
58
|
context: {
|
|
58
59
|
...config.context,
|
|
@@ -62,7 +63,6 @@ function mountAgent(services, config = {}) {
|
|
|
62
63
|
},
|
|
63
64
|
hooks: config.hooks,
|
|
64
65
|
lifecycle: config.lifecycle,
|
|
65
|
-
errorHint: config.errorHint,
|
|
66
66
|
coerceJsonArgs: config.coerceJsonArgs,
|
|
67
67
|
onOutputStrip: config.onOutputStrip
|
|
68
68
|
}) : runTool;
|
|
@@ -1,11 +1,20 @@
|
|
|
1
1
|
import {
|
|
2
2
|
toJsonSchema
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-eqqvgdb3.js";
|
|
4
|
+
import {
|
|
5
|
+
validateDeclaredOutput
|
|
6
|
+
} from "./index-znfs20ss.js";
|
|
7
|
+
import {
|
|
8
|
+
AppError
|
|
9
|
+
} from "./index-2vtcmrj9.js";
|
|
10
|
+
import {
|
|
11
|
+
serializeCanonicalJson
|
|
12
|
+
} from "./index-k5hsfc3j.js";
|
|
4
13
|
import {
|
|
5
14
|
isRecord
|
|
6
|
-
} from "./index-
|
|
15
|
+
} from "./index-hffjpmq9.js";
|
|
7
16
|
|
|
8
|
-
// src/tools/portable-formats.ts
|
|
17
|
+
// src/tools/schema/portable-formats.ts
|
|
9
18
|
var PORTABLE_JSON_SCHEMA_FORMATS = new Set([
|
|
10
19
|
"date",
|
|
11
20
|
"time",
|
|
@@ -91,7 +100,7 @@ function findNonPortableFormats(schema, allowFormats = []) {
|
|
|
91
100
|
return found.sort((left, right) => left.path.localeCompare(right.path) || left.format.localeCompare(right.format));
|
|
92
101
|
}
|
|
93
102
|
|
|
94
|
-
// src/tools/flatten-join.ts
|
|
103
|
+
// src/tools/schema/flatten-join.ts
|
|
95
104
|
var ANNOTATION_KEYS = new Set(["$schema", "default", "description", "examples", "title"]);
|
|
96
105
|
var TYPE_KEYWORDS = {
|
|
97
106
|
array: [
|
|
@@ -161,13 +170,6 @@ function withoutAnnotations(schema) {
|
|
|
161
170
|
}
|
|
162
171
|
return result;
|
|
163
172
|
}
|
|
164
|
-
function stableJson(value) {
|
|
165
|
-
if (Array.isArray(value))
|
|
166
|
-
return `[${value.map(stableJson).join(",")}]`;
|
|
167
|
-
if (!isRecord(value))
|
|
168
|
-
return JSON.stringify(value) ?? "undefined";
|
|
169
|
-
return `{${Object.keys(value).sort().map((key) => `${JSON.stringify(key)}:${stableJson(value[key])}`).join(",")}}`;
|
|
170
|
-
}
|
|
171
173
|
function stringValues(schema) {
|
|
172
174
|
if (typeof schema.const === "string")
|
|
173
175
|
return [schema.const];
|
|
@@ -309,7 +311,7 @@ function mergePropertySchemas(properties) {
|
|
|
309
311
|
const structural = schemas.map(withoutAnnotations);
|
|
310
312
|
const [first] = structural;
|
|
311
313
|
let merged;
|
|
312
|
-
if (first && structural.every((schema) =>
|
|
314
|
+
if (first && structural.every((schema) => serializeCanonicalJson(schema) === serializeCanonicalJson(first))) {
|
|
313
315
|
merged = structuredClone(first);
|
|
314
316
|
} else {
|
|
315
317
|
const values = schemas.map(stringValues);
|
|
@@ -324,7 +326,7 @@ function mergePropertySchemas(properties) {
|
|
|
324
326
|
return merged;
|
|
325
327
|
}
|
|
326
328
|
|
|
327
|
-
// src/tools/flatten.ts
|
|
329
|
+
// src/tools/schema/flatten.ts
|
|
328
330
|
function rebuild(value) {
|
|
329
331
|
if (Array.isArray(value))
|
|
330
332
|
return value.map(rebuild);
|
|
@@ -478,7 +480,7 @@ function freezeJsonValue(value) {
|
|
|
478
480
|
}
|
|
479
481
|
}
|
|
480
482
|
|
|
481
|
-
// src/tools/untyped-properties.ts
|
|
483
|
+
// src/tools/schema/untyped-properties.ts
|
|
482
484
|
var TYPE_KEYWORDS2 = ["type", "enum", "const", "anyOf", "oneOf", "allOf", "$ref", "not"];
|
|
483
485
|
function saysWhatItIs(schema) {
|
|
484
486
|
return TYPE_KEYWORDS2.some((keyword) => schema[keyword] !== undefined);
|
|
@@ -549,7 +551,54 @@ function findUntypedProperties(schema, prefix = "") {
|
|
|
549
551
|
return found;
|
|
550
552
|
}
|
|
551
553
|
|
|
552
|
-
// src/tools/
|
|
554
|
+
// src/tools/internal/tool-view.ts
|
|
555
|
+
function toolSurfaceOutputSchema(operation) {
|
|
556
|
+
if (!operation.outputSchema)
|
|
557
|
+
return;
|
|
558
|
+
return operation.toolView?.output ?? operation.outputSchema;
|
|
559
|
+
}
|
|
560
|
+
function applyToolViewDefaults(inputArgs, defaults) {
|
|
561
|
+
if (!defaults)
|
|
562
|
+
return inputArgs;
|
|
563
|
+
const filled = { ...inputArgs };
|
|
564
|
+
for (const [key, value] of Object.entries(defaults)) {
|
|
565
|
+
if (filled[key] === undefined)
|
|
566
|
+
filled[key] = structuredClone(value);
|
|
567
|
+
}
|
|
568
|
+
return filled;
|
|
569
|
+
}
|
|
570
|
+
function projectToolView(options) {
|
|
571
|
+
const { view } = options;
|
|
572
|
+
let projected = options.full;
|
|
573
|
+
if (view.project) {
|
|
574
|
+
try {
|
|
575
|
+
projected = Reflect.apply(view.project, undefined, [options.full, options.call]);
|
|
576
|
+
} catch (error) {
|
|
577
|
+
const failure = new AppError("INTERNAL_SERVER_ERROR", `${options.operation} toolView.project threw`, 500);
|
|
578
|
+
failure.cause = error;
|
|
579
|
+
throw failure;
|
|
580
|
+
}
|
|
581
|
+
if (isRecord(projected) && typeof projected.then === "function") {
|
|
582
|
+
Promise.resolve(projected).catch(() => {
|
|
583
|
+
return;
|
|
584
|
+
});
|
|
585
|
+
throw new AppError("INTERNAL_SERVER_ERROR", `${options.operation} toolView.project returned a Promise — it must be synchronous`, 500);
|
|
586
|
+
}
|
|
587
|
+
if (projected === undefined) {
|
|
588
|
+
return {
|
|
589
|
+
ok: false,
|
|
590
|
+
message: `${options.operation} toolView.project returned undefined`
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
const checked = validateDeclaredOutput(view.output ?? options.fullSchema, projected, view.project ? options.onStripped : undefined);
|
|
595
|
+
if (!checked.ok) {
|
|
596
|
+
return { ok: false, message: `${options.operation} toolView: ${checked.message}` };
|
|
597
|
+
}
|
|
598
|
+
return checked;
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
// src/tools/schema/schema.ts
|
|
553
602
|
import { z } from "zod";
|
|
554
603
|
function objectShapeKeys(schema) {
|
|
555
604
|
return schema instanceof z.ZodObject ? Object.keys(schema.shape) : [];
|
|
@@ -600,7 +649,7 @@ function mergeSchemas(paramsSchema, inputSchema) {
|
|
|
600
649
|
return paramsObject ? z.intersection(paramsObject, inputSchema) : inputSchema;
|
|
601
650
|
}
|
|
602
651
|
|
|
603
|
-
// src/tools/mcp
|
|
652
|
+
// src/tools/mcp/round-policy.ts
|
|
604
653
|
function staticInputRounds(policy) {
|
|
605
654
|
return Array.isArray(policy.inputRequired) ? policy.inputRequired : undefined;
|
|
606
655
|
}
|
|
@@ -674,7 +723,7 @@ function hasUsableChars(value) {
|
|
|
674
723
|
function assertToolName(name, serviceName, key) {
|
|
675
724
|
const where = `service "${serviceName}", method "${key}"`;
|
|
676
725
|
if (!TOOL_NAME_RE.test(name)) {
|
|
677
|
-
const why = name.length > 64 ? `is ${name.length} characters (max 64) — set an explicit \`
|
|
726
|
+
const why = name.length > 64 ? `is ${name.length} characters (max 64) — set an explicit \`tool.name\`` : "must match [a-zA-Z0-9_-]";
|
|
678
727
|
throw new Error(`Tool name "${name}" (${where}) ${why}`);
|
|
679
728
|
}
|
|
680
729
|
}
|
|
@@ -701,10 +750,10 @@ function assertUniqueToolName(name, taken, surface) {
|
|
|
701
750
|
}
|
|
702
751
|
}
|
|
703
752
|
|
|
704
|
-
// src/tools/presentation.ts
|
|
753
|
+
// src/tools/schema/presentation.ts
|
|
705
754
|
import { z as z2 } from "zod";
|
|
706
755
|
|
|
707
|
-
// src/
|
|
756
|
+
// src/json-schema/dialect.ts
|
|
708
757
|
var DRAFT_07_MARKER = "draft-07";
|
|
709
758
|
var DRAFT_07_KEYWORD = "definitions";
|
|
710
759
|
var DEFS_KEYWORD = "$defs";
|
|
@@ -736,7 +785,7 @@ function withDefsDialect(schema) {
|
|
|
736
785
|
return rewritten;
|
|
737
786
|
}
|
|
738
787
|
|
|
739
|
-
// src/tools/presentation.ts
|
|
788
|
+
// src/tools/schema/presentation.ts
|
|
740
789
|
function withoutDialect(schema) {
|
|
741
790
|
const result = {};
|
|
742
791
|
for (const [key, value] of Object.entries(schema)) {
|
|
@@ -887,6 +936,8 @@ function buildToolPresentationSchema(config) {
|
|
|
887
936
|
presentation = mergeObjectSchemas(withoutDialect(extra), withoutDialect(presentation), true);
|
|
888
937
|
}
|
|
889
938
|
}
|
|
939
|
+
if (config.defaults)
|
|
940
|
+
presentation = withToolDefaults(presentation, config.defaults);
|
|
890
941
|
if (presentation.$schema === undefined) {
|
|
891
942
|
presentation = {
|
|
892
943
|
$schema: "http://json-schema.org/draft-07/schema#",
|
|
@@ -895,6 +946,27 @@ function buildToolPresentationSchema(config) {
|
|
|
895
946
|
}
|
|
896
947
|
return freezeToolJsonSchema(presentation);
|
|
897
948
|
}
|
|
949
|
+
function withToolDefaults(schema, defaults) {
|
|
950
|
+
const properties = objectProperties(schema);
|
|
951
|
+
if (!properties)
|
|
952
|
+
return schema;
|
|
953
|
+
const keys = Object.keys(defaults).filter((key) => isRecord(properties[key]));
|
|
954
|
+
if (keys.length === 0)
|
|
955
|
+
return schema;
|
|
956
|
+
const nextProperties = { ...properties };
|
|
957
|
+
for (const key of keys) {
|
|
958
|
+
const property = properties[key];
|
|
959
|
+
if (!isRecord(property))
|
|
960
|
+
continue;
|
|
961
|
+
const value = structuredClone(defaults[key]);
|
|
962
|
+
nextProperties[key] = typeof property.$ref === "string" ? { allOf: [property], default: value } : { ...property, default: value };
|
|
963
|
+
}
|
|
964
|
+
const required = requiredKeys2(schema).filter((key) => !keys.includes(key));
|
|
965
|
+
const next = { ...schema, properties: nextProperties };
|
|
966
|
+
if (Array.isArray(schema.required))
|
|
967
|
+
next.required = required;
|
|
968
|
+
return next;
|
|
969
|
+
}
|
|
898
970
|
function isObjectPresentationSchema(schema) {
|
|
899
971
|
return schema.type === "object" && isRecord(schema.properties);
|
|
900
972
|
}
|
|
@@ -947,7 +1019,7 @@ function assertProjectedName(name, serviceName, action, transport, derived) {
|
|
|
947
1019
|
if (transport === "CLI")
|
|
948
1020
|
return;
|
|
949
1021
|
if (derived && !hasUsableChars(serviceName)) {
|
|
950
|
-
throw new Error(`Service prefix "${serviceName}" (method "${action}") has no characters usable in a tool name — set an explicit \`
|
|
1022
|
+
throw new Error(`Service prefix "${serviceName}" (method "${action}") has no characters usable in a tool name — set an explicit \`tool.name\` or rename the prefix`);
|
|
951
1023
|
}
|
|
952
1024
|
assertToolName(name, serviceName, action);
|
|
953
1025
|
}
|
|
@@ -996,6 +1068,7 @@ function projectToolSurface(surface, transport, config = {}) {
|
|
|
996
1068
|
presentationSchema: buildToolPresentationSchema({
|
|
997
1069
|
paramsSchema: method.paramsSchema,
|
|
998
1070
|
inputSchema: method.inputSchema,
|
|
1071
|
+
defaults: method.toolView?.defaults,
|
|
999
1072
|
extendSchema: shouldExtend ? config.extend?.schema : undefined,
|
|
1000
1073
|
flattenUnionInput: config.flattenUnionInput,
|
|
1001
1074
|
unrepresentable: "any"
|
|
@@ -1026,8 +1099,11 @@ function mcpProjectionCandidate(tool) {
|
|
|
1026
1099
|
...tool.source.inputSchema !== undefined && {
|
|
1027
1100
|
inputSchema: tool.source.inputSchema
|
|
1028
1101
|
},
|
|
1029
|
-
...tool.source.
|
|
1030
|
-
|
|
1102
|
+
...tool.source.toolView?.defaults !== undefined && {
|
|
1103
|
+
inputDefaults: tool.source.toolView.defaults
|
|
1104
|
+
},
|
|
1105
|
+
...toolSurfaceOutputSchema(tool.source) !== undefined && {
|
|
1106
|
+
outputSchema: toolSurfaceOutputSchema(tool.source)
|
|
1031
1107
|
},
|
|
1032
1108
|
shouldExtend: tool.shouldExtend,
|
|
1033
1109
|
...tool.mcp !== undefined && { mcp: tool.mcp }
|
|
@@ -1069,7 +1145,8 @@ function prepareProjectedMcpTools(tools, config = {}) {
|
|
|
1069
1145
|
inputSchema: tool.inputSchema,
|
|
1070
1146
|
extendSchema: tool.shouldExtend && config.extend ? config.extend.schema : undefined,
|
|
1071
1147
|
flattenUnionInput: config.flattenUnionInput,
|
|
1072
|
-
unrepresentable: "throw"
|
|
1148
|
+
unrepresentable: "throw",
|
|
1149
|
+
defaults: tool.inputDefaults
|
|
1073
1150
|
});
|
|
1074
1151
|
} catch (error) {
|
|
1075
1152
|
reportIncompatible(`MCP tool "${tool.name}" — input schema is not JSON Schema-compatible: ${error instanceof Error ? error.message : String(error)}`, policy, config.logger, failures);
|
|
@@ -1123,4 +1200,4 @@ function prepareProjectedMcpTools(tools, config = {}) {
|
|
|
1123
1200
|
return prepared;
|
|
1124
1201
|
}
|
|
1125
1202
|
|
|
1126
|
-
export { objectShapeKeys, rebuildObject, mergeSchemas, staticInputRounds, validateMcpRoundPolicy, validateResolvedInputRounds, assertToolName, assertUniqueToolName, PORTABLE_JSON_SCHEMA_FORMATS, findNonPortableFormats,
|
|
1203
|
+
export { toolSurfaceOutputSchema, applyToolViewDefaults, projectToolView, objectShapeKeys, rebuildObject, mergeSchemas, staticInputRounds, validateMcpRoundPolicy, validateResolvedInputRounds, assertToolName, assertUniqueToolName, PORTABLE_JSON_SCHEMA_FORMATS, findNonPortableFormats, declaresDraft07, withDefsDialect, flattenToolJsonSchema, buildToolPresentationSchema, presentationMetadata, findUntypedProperties, assertToolExtensionCompatible, projectRuntimeTool, projectToolSurface, mcpProjectionCandidate, prepareProjectedMcpTools };
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
contextContributionDelta,
|
|
6
6
|
mergeContextContribution,
|
|
7
7
|
prepareContextContribution
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-xnj9bgxe.js";
|
|
9
9
|
import {
|
|
10
10
|
base64UrlToBytes,
|
|
11
11
|
bytesToBase64Url
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./index-kzfs85xp.js";
|
|
21
21
|
import {
|
|
22
22
|
isRecord
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-hffjpmq9.js";
|
|
24
24
|
|
|
25
25
|
// src/server/middleware/cookies.ts
|
|
26
26
|
function parseCookieHeader(header) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
inputIsQuery
|
|
3
|
+
} from "./index-48ffdxgk.js";
|
|
4
|
+
import {
|
|
5
|
+
ContractStreamFrameSchema,
|
|
6
|
+
DEFAULT_CONTRACT_STREAM_FRAME_BYTES
|
|
7
|
+
} from "./index-wqgjfstn.js";
|
|
7
8
|
import {
|
|
8
9
|
ApiError,
|
|
9
10
|
RequestCancellationError,
|
|
@@ -11,17 +12,76 @@ import {
|
|
|
11
12
|
parseApiErrorBody,
|
|
12
13
|
refuseLocally,
|
|
13
14
|
responseTraceId
|
|
14
|
-
} from "./index-
|
|
15
|
+
} from "./index-zeemqhqx.js";
|
|
15
16
|
import {
|
|
16
|
-
ContractStreamFrameSchema,
|
|
17
|
-
DEFAULT_CONTRACT_STREAM_FRAME_BYTES,
|
|
18
17
|
parseTrailingWildcard
|
|
19
|
-
} from "./index-
|
|
18
|
+
} from "./index-gyr48nzg.js";
|
|
20
19
|
import {
|
|
21
20
|
isRecord,
|
|
22
21
|
mapObject,
|
|
23
22
|
typedEntries
|
|
24
|
-
} from "./index-
|
|
23
|
+
} from "./index-hffjpmq9.js";
|
|
24
|
+
|
|
25
|
+
// src/internal/bounded-lines.ts
|
|
26
|
+
var DEFAULT_STREAM_LINE_BYTES = 1024 * 1024;
|
|
27
|
+
function lineLimit(value) {
|
|
28
|
+
const resolved = value ?? DEFAULT_STREAM_LINE_BYTES;
|
|
29
|
+
if (!Number.isSafeInteger(resolved) || resolved <= 0) {
|
|
30
|
+
throw new TypeError("maxLineBytes must be a positive safe integer");
|
|
31
|
+
}
|
|
32
|
+
return resolved;
|
|
33
|
+
}
|
|
34
|
+
function joinBytes(left, right) {
|
|
35
|
+
if (left.byteLength === 0)
|
|
36
|
+
return right.slice();
|
|
37
|
+
const result = new Uint8Array(left.byteLength + right.byteLength);
|
|
38
|
+
result.set(left);
|
|
39
|
+
result.set(right, left.byteLength);
|
|
40
|
+
return result;
|
|
41
|
+
}
|
|
42
|
+
async function* readBoundedUtf8Lines(response, maxLineBytes, requireFinalNewline = false) {
|
|
43
|
+
const reader = response.body?.getReader();
|
|
44
|
+
if (!reader)
|
|
45
|
+
return;
|
|
46
|
+
const limit = lineLimit(maxLineBytes);
|
|
47
|
+
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
48
|
+
let pending = new Uint8Array;
|
|
49
|
+
try {
|
|
50
|
+
for (;; ) {
|
|
51
|
+
const chunk = await reader.read();
|
|
52
|
+
if (chunk.done)
|
|
53
|
+
break;
|
|
54
|
+
let start = 0;
|
|
55
|
+
for (let index = 0;index < chunk.value.byteLength; index += 1) {
|
|
56
|
+
if (chunk.value[index] !== 10)
|
|
57
|
+
continue;
|
|
58
|
+
const lineBytes = joinBytes(pending, chunk.value.slice(start, index));
|
|
59
|
+
if (lineBytes.byteLength > limit) {
|
|
60
|
+
throw new RangeError(`Stream line exceeds the ${limit} byte limit`);
|
|
61
|
+
}
|
|
62
|
+
yield decoder.decode(lineBytes);
|
|
63
|
+
pending = new Uint8Array;
|
|
64
|
+
start = index + 1;
|
|
65
|
+
}
|
|
66
|
+
pending = joinBytes(pending, chunk.value.slice(start));
|
|
67
|
+
if (pending.byteLength > limit) {
|
|
68
|
+
throw new RangeError(`Stream line exceeds the ${limit} byte limit`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if (pending.byteLength > 0) {
|
|
72
|
+
if (requireFinalNewline) {
|
|
73
|
+
throw new SyntaxError("Stream ended with an unterminated final line");
|
|
74
|
+
}
|
|
75
|
+
yield decoder.decode(pending);
|
|
76
|
+
}
|
|
77
|
+
} finally {
|
|
78
|
+
await reader.cancel().catch(() => {
|
|
79
|
+
return;
|
|
80
|
+
});
|
|
81
|
+
reader.releaseLock();
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
25
85
|
// src/browser/stream.ts
|
|
26
86
|
function parseFailure(raw, error, onParseError) {
|
|
27
87
|
const failure = error instanceof Error ? error : new Error(String(error));
|
|
@@ -45,6 +105,31 @@ async function* parseNDJSON(response, options) {
|
|
|
45
105
|
parseFailure("", error, options?.onParseError);
|
|
46
106
|
}
|
|
47
107
|
}
|
|
108
|
+
async function* parseSSE(response, options) {
|
|
109
|
+
try {
|
|
110
|
+
for await (const rawLine of readBoundedUtf8Lines(response, options?.maxLineBytes ?? DEFAULT_STREAM_LINE_BYTES)) {
|
|
111
|
+
const line = rawLine.endsWith("\r") ? rawLine.slice(0, -1) : rawLine;
|
|
112
|
+
if (!line.startsWith("data:"))
|
|
113
|
+
continue;
|
|
114
|
+
const data = line.slice(5).replace(/^ /, "");
|
|
115
|
+
if (data === "[DONE]")
|
|
116
|
+
return;
|
|
117
|
+
try {
|
|
118
|
+
yield JSON.parse(data);
|
|
119
|
+
} catch (error) {
|
|
120
|
+
const failure = error instanceof Error ? error : new Error(String(error));
|
|
121
|
+
if (!options?.onParseError)
|
|
122
|
+
throw failure;
|
|
123
|
+
options.onParseError(data, failure);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
} catch (error) {
|
|
127
|
+
const failure = error instanceof Error ? error : new Error(String(error));
|
|
128
|
+
if (!options?.onParseError)
|
|
129
|
+
throw failure;
|
|
130
|
+
options.onParseError("", failure);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
48
133
|
|
|
49
134
|
// src/browser/client-multipart.ts
|
|
50
135
|
function isFileDescriptor(value) {
|
|
@@ -644,4 +729,4 @@ function createScopedUrlBuilders(contracts, source, scopeConfigs) {
|
|
|
644
729
|
return buildScopedRegistry(contracts, scopeConfigs, "URL builder", (contract, config) => createUrlBuilder(contract, source, config));
|
|
645
730
|
}
|
|
646
731
|
|
|
647
|
-
export { parseNDJSON, contractEndpointMatchers, createClient, createClients, createScopedClients, createUrlBuilder, createUrlBuilders, createScopedUrlBuilders };
|
|
732
|
+
export { parseNDJSON, parseSSE, contractEndpointMatchers, createClient, createClients, createScopedClients, createUrlBuilder, createUrlBuilders, createScopedUrlBuilders };
|