stitchkit 0.135.1 → 0.136.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 +122 -0
- package/README.md +37 -11
- package/dist/agent-executor/acp/v1-session-build.d.ts +51 -0
- package/dist/agent-executor/acp/v1-session-build.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-session.d.ts +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/classify.d.ts +1 -1
- package/dist/agent-executor/claude/classify.d.ts.map +1 -1
- package/dist/agent-executor/claude/events-wire.d.ts +13 -0
- package/dist/agent-executor/claude/events-wire.d.ts.map +1 -0
- package/dist/agent-executor/claude/events.d.ts +1 -11
- package/dist/agent-executor/claude/events.d.ts.map +1 -1
- package/dist/agent-executor/codex/protocol.d.ts +0 -143
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
- package/dist/agent-executor/codex/server-requests.d.ts +150 -0
- package/dist/agent-executor/codex/server-requests.d.ts.map +1 -0
- package/dist/agent-executor/executor-contract.d.ts.map +1 -1
- package/dist/agent-executor/image-input.d.ts +10 -3
- package/dist/agent-executor/image-input.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-scenarios.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -1
- package/dist/agent-executor/vocabulary.d.ts +80 -0
- package/dist/agent-executor/vocabulary.d.ts.map +1 -1
- package/dist/agent-parts/model.d.ts +94 -0
- package/dist/agent-parts/model.d.ts.map +1 -1
- package/dist/agent-parts/parts.d.ts +176 -0
- package/dist/agent-parts/parts.d.ts.map +1 -1
- package/dist/agent-runtime/browser/browser-control-contract.d.ts +444 -0
- package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-schema.d.ts +532 -0
- package/dist/agent-runtime/browser/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-view.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +720 -3
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/history/run-history-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/deferred-tools.d.ts.map +1 -1
- package/dist/agent-runtime/loop/invocation-payload.d.ts.map +1 -1
- package/dist/agent-runtime/loop/invocation-stream.d.ts +9 -1
- package/dist/agent-runtime/loop/invocation-stream.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts +6 -0
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts +1 -3
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-acquisition.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-approval-signature.d.ts +38 -0
- package/dist/agent-runtime/loop/run-approval-signature.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-approval.d.ts +0 -28
- package/dist/agent-runtime/loop/run-approval.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-complete-port.d.ts +24 -0
- package/dist/agent-runtime/loop/run-complete-port.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-complete-stream.d.ts +7 -2
- package/dist/agent-runtime/loop/run-complete-stream.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-complete-types.d.ts +14 -1
- package/dist/agent-runtime/loop/run-complete-types.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-complete.d.ts +2 -2
- package/dist/agent-runtime/loop/run-complete.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-execution-state.d.ts +8 -0
- package/dist/agent-runtime/loop/run-execution-state.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts +6 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-model-call.d.ts +44 -0
- package/dist/agent-runtime/loop/run-model-call.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-step.d.ts +25 -28
- package/dist/agent-runtime/loop/run-model-step.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-model-steps.d.ts +6 -0
- package/dist/agent-runtime/loop/run-model-steps.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-stream.d.ts +3 -1
- package/dist/agent-runtime/loop/run-model-stream.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts +0 -2
- package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-step-loop.d.ts +19 -0
- package/dist/agent-runtime/loop/run-step-loop.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-step-port.d.ts +175 -0
- package/dist/agent-runtime/loop/run-step-port.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-recorded.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-step-text.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts +2 -1
- package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-call-input.d.ts +39 -0
- package/dist/agent-runtime/loop/run-tool-call-input.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-call.d.ts +13 -34
- package/dist/agent-runtime/loop/run-tool-call.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-errors.d.ts +5 -0
- package/dist/agent-runtime/loop/run-tool-errors.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-executor.d.ts +1 -1
- package/dist/agent-runtime/loop/run-tool-executor.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-slots.d.ts +2 -1
- package/dist/agent-runtime/loop/run-tool-slots.d.ts.map +1 -1
- package/dist/agent-runtime/loop/runtime-state.d.ts.map +1 -1
- package/dist/agent-runtime/loop/runtime.d.ts +0 -5
- package/dist/agent-runtime/loop/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-convert.d.ts +1 -5
- package/dist/agent-runtime/providers/ai-sdk-convert.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts +15 -0
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts.map +1 -0
- package/dist/agent-runtime/providers/ai-sdk-tools.d.ts +11 -0
- package/dist/agent-runtime/providers/ai-sdk-tools.d.ts.map +1 -0
- package/dist/agent-runtime/providers/ai-sdk.d.ts +1 -9
- package/dist/agent-runtime/providers/ai-sdk.d.ts.map +1 -1
- package/dist/agent-runtime/providers/anthropic-sse.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-admission.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-audio.d.ts +123 -81
- package/dist/agent-runtime/providers/openrouter-audio.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-catalog-cache.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-catalog-query.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-catalog.d.ts +2 -2
- package/dist/agent-runtime/providers/openrouter-catalog.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-client.d.ts +37 -0
- package/dist/agent-runtime/providers/openrouter-client.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-http.d.ts +26 -6
- package/dist/agent-runtime/providers/openrouter-http.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-media.d.ts +91 -77
- package/dist/agent-runtime/providers/openrouter-media.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-models.d.ts +2 -23
- package/dist/agent-runtime/providers/openrouter-models.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-options.d.ts +2 -0
- package/dist/agent-runtime/providers/openrouter-options.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-request.d.ts +23 -0
- package/dist/agent-runtime/providers/openrouter-request.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-retrieval.d.ts +86 -55
- package/dist/agent-runtime/providers/openrouter-retrieval.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-speech.d.ts +90 -0
- package/dist/agent-runtime/providers/openrouter-speech.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-spend.d.ts +2 -2
- package/dist/agent-runtime/providers/openrouter-spend.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-stream.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-systemone.d.ts +87 -32
- package/dist/agent-runtime/providers/openrouter-systemone.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-url.d.ts +7 -1
- package/dist/agent-runtime/providers/openrouter-url.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-wire.d.ts +45 -0
- package/dist/agent-runtime/providers/openrouter-wire.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter.d.ts +1 -3
- package/dist/agent-runtime/providers/openrouter.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-http.d.ts +14 -2
- package/dist/agent-runtime/providers/provider-http.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-json-schema-strip.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-json-schema.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-openai-chat-sse.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts +42 -0
- package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-usage.d.ts +9 -0
- package/dist/agent-runtime/providers/provider-usage.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +1 -3
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts +9 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts +6 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-contract.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-process-linux.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts +5 -1
- package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-process-wrapper.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-json-projection.d.ts +29 -0
- package/dist/agent-runtime/schemas-json-projection.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-message.d.ts +88 -0
- package/dist/agent-runtime/schemas-message.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-run.d.ts +88 -0
- package/dist/agent-runtime/schemas-run.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-observations.d.ts +42 -42
- package/dist/agent-runtime/stores/branch-replay.d.ts +264 -0
- package/dist/agent-runtime/stores/branch-replay.d.ts.map +1 -1
- package/dist/agent-runtime/stores/conversations.d.ts +88 -0
- package/dist/agent-runtime/stores/conversations.d.ts.map +1 -1
- package/dist/agent-runtime/stores/sql-rows.d.ts +74 -10
- package/dist/agent-runtime/stores/sql-rows.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-driver-contract.d.ts +616 -0
- package/dist/agent-runtime/stores/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-events.d.ts +1056 -0
- package/dist/agent-runtime/stores/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store.d.ts +1232 -0
- package/dist/agent-runtime/stores/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +74 -10
- package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
- package/dist/agent-runtime/testing/fault-bench.d.ts +5 -1
- package/dist/agent-runtime/testing/fault-bench.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts +158 -30
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-support.d.ts +79 -15
- package/dist/agent-runtime/testing/store-conformance-support.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/notification-delivery.d.ts.map +1 -1
- package/dist/browser/client-executors.d.ts.map +1 -1
- package/dist/browser/client-url.d.ts.map +1 -1
- package/dist/contract/define.d.ts +3 -7
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/normalize.d.ts +17 -5
- package/dist/contract/normalize.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +9 -6
- package/dist/entrypoints/agent-executor/claude-sdk.js +26 -25
- package/dist/entrypoints/agent-executor/claude.js +13 -12
- package/dist/entrypoints/agent-executor/codex.d.ts +2 -1
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/codex.js +135 -40
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +5 -4
- package/dist/entrypoints/agent-executor/testing.js +23 -18
- package/dist/entrypoints/agent-executor.js +8 -8
- package/dist/entrypoints/agent-runtime/ai-sdk.d.ts +2 -1
- package/dist/entrypoints/agent-runtime/ai-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/ai-sdk.js +34 -30
- package/dist/entrypoints/agent-runtime/anthropic.js +15 -12
- package/dist/entrypoints/agent-runtime/browser.js +13 -8
- package/dist/entrypoints/agent-runtime/harness.js +26 -27
- package/dist/entrypoints/agent-runtime/openai.js +7 -7
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +7 -5
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/openrouter.js +1097 -856
- package/dist/entrypoints/agent-runtime/postgres.js +9 -9
- package/dist/entrypoints/agent-runtime/realtime.js +9 -8
- package/dist/entrypoints/agent-runtime/sandbox.js +167 -139
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +10 -10
- package/dist/entrypoints/agent-runtime/sqlite/node.js +10 -10
- package/dist/entrypoints/agent-runtime/testing.js +9 -9
- package/dist/entrypoints/agent-runtime.js +261 -375
- package/dist/entrypoints/application/diagnostic-journal.js +14 -10
- package/dist/entrypoints/application.js +18 -6
- package/dist/entrypoints/cli.js +36 -15
- package/dist/entrypoints/contract.js +12 -10
- package/dist/entrypoints/geo.js +1 -1
- package/dist/entrypoints/handler.js +5 -6
- package/dist/entrypoints/http.d.ts +2 -0
- package/dist/entrypoints/http.d.ts.map +1 -1
- package/dist/entrypoints/http.js +16 -4
- package/dist/entrypoints/index.js +26 -35
- package/dist/entrypoints/live.js +3 -3
- package/dist/entrypoints/node.js +7 -7
- package/dist/entrypoints/observability.js +9 -7
- package/dist/entrypoints/process.js +3 -3
- package/dist/entrypoints/remote.js +5 -5
- package/dist/entrypoints/server.js +29 -16
- package/dist/entrypoints/telegram/grammy.d.ts +1 -1
- package/dist/entrypoints/telegram/grammy.d.ts.map +1 -1
- package/dist/entrypoints/telegram/grammy.js +39 -5
- package/dist/entrypoints/telegram/screens.js +3 -0
- package/dist/entrypoints/telegram.d.ts +1 -1
- package/dist/entrypoints/telegram.d.ts.map +1 -1
- package/dist/entrypoints/telegram.js +19 -6
- package/dist/entrypoints/testing.js +10 -11
- package/dist/entrypoints/tools/agent.js +9 -10
- package/dist/entrypoints/tools/connections.js +27 -57
- package/dist/entrypoints/tools/contract.js +4 -4
- package/dist/entrypoints/tools/invoker.js +7 -8
- package/dist/entrypoints/tools/mcp.js +9 -10
- package/dist/entrypoints/tools/toolkit.js +11 -12
- package/dist/entrypoints/tools.js +24 -22
- package/dist/entrypoints/tracking/contract.js +1 -1
- package/dist/entrypoints/tracking/performance.js +1 -1
- package/dist/entrypoints/tracking.js +1 -1
- package/dist/{index-3czc3ykr.js → index-08a3qfr8.js} +1 -1
- package/dist/index-1psbyyhj.js +21 -0
- package/dist/{index-pdcbjd6a.js → index-1yky29qg.js} +6 -3
- package/dist/{index-b4c9dpzm.js → index-252den5a.js} +10 -11
- package/dist/{index-yhwx4fwk.js → index-26v8hjqm.js} +4 -4
- package/dist/{index-xtby8rj3.js → index-28kbdn63.js} +5 -47
- package/dist/{index-c24bj2r1.js → index-2wm9b9vs.js} +5 -5
- package/dist/{index-ht71v1ag.js → index-32ew02z1.js} +60 -45
- package/dist/{index-dm84tsd5.js → index-3kb8dw48.js} +1 -1
- package/dist/index-3tb82xr7.js +11 -0
- package/dist/{index-nr4fhfn4.js → index-4p2zx593.js} +2 -0
- package/dist/{index-grhhsrd5.js → index-4q9tmzea.js} +5 -4
- package/dist/{index-mcv7b2n0.js → index-63ctzjp4.js} +497 -495
- package/dist/{index-y0a4gt1s.js → index-65p8v81y.js} +3 -2
- package/dist/{index-z72vazf5.js → index-6y3eae97.js} +27 -83
- package/dist/{index-y0mwkgkf.js → index-8cnfgwg8.js} +1212 -1139
- package/dist/{index-mkmep637.js → index-9m1m92rg.js} +1 -1
- package/dist/{index-5awtbyns.js → index-9vj869rx.js} +1 -1
- package/dist/index-a1rjr381.js +114 -0
- package/dist/{index-6kwdfb9m.js → index-akesakvj.js} +23 -4
- package/dist/{index-5q0qpw3v.js → index-aqm7e864.js} +23 -8
- package/dist/{index-d4at0q09.js → index-b9mj31q7.js} +90 -88
- package/dist/{index-baba8ehy.js → index-bjrcbcn2.js} +2 -2
- package/dist/{index-fsw9wxk9.js → index-c9j8441q.js} +1 -103
- package/dist/{index-wdb5jhas.js → index-d1pdv8qc.js} +1 -1
- package/dist/{index-v0j22shs.js → index-d5mhgx72.js} +16 -11
- package/dist/{index-73wq9abg.js → index-df5xr2f9.js} +13 -59
- package/dist/{index-n9358ydy.js → index-dm50x3by.js} +1 -1
- package/dist/{index-zyyerdny.js → index-dmrx8xma.js} +3 -0
- package/dist/{index-78da4g74.js → index-dwq6a6sq.js} +17 -13
- package/dist/{index-9be3tf6r.js → index-e413q2cj.js} +49 -22
- package/dist/{index-57sbckhv.js → index-e4w0sfm1.js} +2 -2
- package/dist/{index-g4gstmp1.js → index-ednf2cxs.js} +1 -1
- package/dist/{index-84tp547a.js → index-edpkm3k7.js} +29 -97
- package/dist/{index-gs0jw0hy.js → index-efbzm2se.js} +3 -3
- package/dist/{index-asnd4h2k.js → index-f0dzyskg.js} +27 -4
- package/dist/{index-xbb8ysmq.js → index-fatke81t.js} +2 -2
- package/dist/{index-d3s070eh.js → index-gj4wdts6.js} +1 -1
- package/dist/{index-6nzzj7qr.js → index-gq35s3bm.js} +1 -1
- package/dist/index-gvgtmt7a.js +102 -0
- package/dist/{index-pd9e8rz4.js → index-gvv7y0s4.js} +1 -1
- package/dist/{index-m2b49tvc.js → index-h08xqfw9.js} +20 -21
- package/dist/{index-gk6dq9ay.js → index-ha1tv70k.js} +3 -26
- package/dist/{index-vebzvse6.js → index-jy907kcs.js} +24 -1
- package/dist/{index-q86qnzzf.js → index-k5azb3v3.js} +8 -25
- package/dist/{index-qcy8et93.js → index-kaq9nb7h.js} +6 -6
- package/dist/{index-vse7x1qt.js → index-knqye3gv.js} +1 -1
- package/dist/{index-tav72wz5.js → index-ks4rhtcc.js} +5 -0
- package/dist/{index-bvpevwt6.js → index-mtpcax6d.js} +210 -205
- package/dist/{index-7qza24g1.js → index-px9r6wv1.js} +1 -1
- package/dist/{index-x6sp5vpa.js → index-q4tr9vnf.js} +1 -1
- package/dist/{index-hce3hbdg.js → index-qj0sq69b.js} +6 -2
- package/dist/{index-de7b0kvz.js → index-r9w7wfgn.js} +2 -2
- package/dist/{index-8vzh5wpv.js → index-rw1caff2.js} +14 -26
- package/dist/index-s8af9jqw.js +6 -0
- package/dist/{index-bgj9hbm3.js → index-sdppfbrh.js} +30 -16
- package/dist/{index-aacwkve4.js → index-sjq4akrx.js} +3 -5
- package/dist/{index-fec05c9k.js → index-ta0e2daw.js} +9 -7
- package/dist/{index-5dxgx3yj.js → index-tcv71frn.js} +1 -1
- package/dist/{index-1zy31r3b.js → index-v92djygb.js} +1 -1
- package/dist/{index-c0yym4a0.js → index-w7e402wx.js} +11 -105
- package/dist/{index-9f60gnfn.js → index-xaa3603f.js} +4 -11
- package/dist/index-xrbrvn15.js +147 -0
- package/dist/{index-ac3rfec5.js → index-y6wzzk2e.js} +21 -1
- package/dist/{index-3d2c45jn.js → index-yjx5jna7.js} +2 -2
- package/dist/{index-j3r7r1mh.js → index-yv7d6tav.js} +1 -1
- package/dist/{index-wsv11dhg.js → index-zagc12j1.js} +5 -5
- package/dist/{index-npfdymav.js → index-zqc64g69.js} +3 -3
- package/dist/{index-rkphknhx.js → index-zthekmrt.js} +2 -2
- package/dist/internal/json-stringify.d.ts +37 -0
- package/dist/internal/json-stringify.d.ts.map +1 -0
- package/dist/internal/loopback-host.d.ts +8 -0
- package/dist/internal/loopback-host.d.ts.map +1 -0
- package/dist/internal/own-member.d.ts +7 -0
- package/dist/internal/own-member.d.ts.map +1 -0
- package/dist/internal/request.d.ts +17 -8
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/secret-shapes.d.ts +33 -4
- package/dist/internal/secret-shapes.d.ts.map +1 -1
- package/dist/json-schema/dialect.d.ts.map +1 -1
- package/dist/json-schema/keywords.d.ts +25 -6
- package/dist/json-schema/keywords.d.ts.map +1 -1
- package/dist/json-schema/string-format.d.ts.map +1 -1
- package/dist/live/events.d.ts.map +1 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/live/watch-delta.d.ts.map +1 -1
- package/dist/observability/context.d.ts +4 -3
- package/dist/observability/context.d.ts.map +1 -1
- package/dist/observability/sanitize.d.ts.map +1 -1
- package/dist/observability/secret-values.d.ts +0 -9
- package/dist/observability/secret-values.d.ts.map +1 -1
- package/dist/server/context.d.ts +3 -2
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/error-hook.d.ts +4 -3
- package/dist/server/error-hook.d.ts.map +1 -1
- package/dist/server/event-bus.d.ts.map +1 -1
- package/dist/server/file.d.ts +11 -3
- package/dist/server/file.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts +2 -2
- package/dist/server/handler-state.d.ts.map +1 -1
- package/dist/server/middleware/jwt.d.ts +12 -1
- package/dist/server/middleware/jwt.d.ts.map +1 -1
- package/dist/server/middleware/trust-fence.d.ts +4 -0
- package/dist/server/middleware/trust-fence.d.ts.map +1 -1
- package/dist/server/multipart.d.ts +2 -3
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/server/raw.d.ts.map +1 -1
- package/dist/server/request-body.d.ts +12 -1
- package/dist/server/request-body.d.ts.map +1 -1
- package/dist/server/request-completion.d.ts.map +1 -1
- package/dist/server/types.d.ts +14 -9
- package/dist/server/types.d.ts.map +1 -1
- package/dist/telegram/crypto.d.ts.map +1 -1
- package/dist/telegram/init-data.d.ts +4 -4
- package/dist/telegram/init-data.d.ts.map +1 -1
- package/dist/telegram/outbound-cost.d.ts.map +1 -1
- package/dist/telegram/screens/test-chat.d.ts.map +1 -1
- package/dist/telegram/widget-api.d.ts +85 -13
- package/dist/telegram/widget-api.d.ts.map +1 -1
- package/dist/telegram/widget.d.ts +46 -2
- package/dist/telegram/widget.d.ts.map +1 -1
- package/dist/tools/cli/args-classify.d.ts +4 -74
- package/dist/tools/cli/args-classify.d.ts.map +1 -1
- package/dist/tools/cli/args-framework.d.ts +79 -0
- package/dist/tools/cli/args-framework.d.ts.map +1 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -1
- package/dist/tools/cli/args-tokens.d.ts.map +1 -1
- package/dist/tools/cli/checkpoint.d.ts +5 -0
- package/dist/tools/cli/checkpoint.d.ts.map +1 -1
- package/dist/tools/cli/stream.d.ts.map +1 -1
- package/dist/tools/connections/foreign-schema-join.d.ts.map +1 -1
- package/dist/tools/connections/openapi.d.ts.map +1 -1
- package/dist/tools/connections/runtime.d.ts.map +1 -1
- package/dist/tools/execute-handler.d.ts +24 -0
- package/dist/tools/execute-handler.d.ts.map +1 -0
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/mcp/round.d.ts.map +1 -1
- package/dist/tools/schema/coerce.d.ts.map +1 -1
- package/dist/tools/schema/flatten.d.ts.map +1 -1
- package/dist/tools/schema/inline-references.d.ts.map +1 -1
- package/dist/tools/schema/nesting-limit.d.ts.map +1 -1
- package/dist/tools/schema/presentation.d.ts.map +1 -1
- package/dist/tracking/privacy.d.ts.map +1 -1
- package/llms/agent-runtime-openrouter.txt +10 -9
- package/llms/agent-runtime-sandbox.txt +50 -11
- package/llms/agent-runtime-testing.txt +1 -1
- package/llms/agent-runtime.2.txt +9 -6
- package/llms/agent-runtime.3.txt +2 -2
- package/llms/agent-runtime.4.txt +11 -5
- package/llms/agent-runtime.5.txt +2 -2
- package/llms/agent-runtime.txt +297 -36
- package/llms/application.2.txt +6 -3
- package/llms/application.3.txt +2 -1
- package/llms/application.txt +7 -2
- package/llms/http.txt +1 -1
- package/llms/live.txt +3 -1
- package/llms/observability.txt +16 -9
- package/llms/server.2.txt +13 -8
- package/llms/server.4.txt +23 -11
- package/llms/server.5.txt +5 -5
- package/llms/server.txt +54 -1
- package/llms/spend.txt +1 -0
- package/llms/stitchkit.2.txt +4 -2
- package/llms/stitchkit.txt +113 -93
- package/llms/telegram-grammy.txt +3 -2
- package/llms/telegram.2.txt +3 -1
- package/llms/telegram.txt +35 -10
- package/llms/upgrading-0.128.0-0.129.0.txt +175 -0
- package/llms/{upgrading-0.128.0-0.135.0.txt → upgrading-0.130.0-0.136.0.txt} +353 -169
- package/llms/upgrading.txt +2 -1
- package/llms-full.txt +1021 -223
- package/llms.txt +14 -13
- package/package.json +6 -6
- package/dist/agent-runtime/loop/deferred-tools-internal.d.ts +0 -19
- package/dist/agent-runtime/loop/deferred-tools-internal.d.ts.map +0 -1
- package/dist/agent-runtime/loop/run-complete-retry.d.ts +0 -24
- package/dist/agent-runtime/loop/run-complete-retry.d.ts.map +0 -1
- package/dist/agent-runtime/loop/run-model-attempts.d.ts +0 -6
- package/dist/agent-runtime/loop/run-model-attempts.d.ts.map +0 -1
- package/dist/index-sznqf8fx.js +0 -20
- /package/dist/{index-fthw8dwa.js → index-4gbybjg6.js} +0 -0
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import"../../index-78da4g74.js";
|
|
2
1
|
import"../../index-dsa676h8.js";
|
|
3
|
-
import"../../index-
|
|
4
|
-
import"../../index-
|
|
5
|
-
import"../../index-
|
|
6
|
-
import"../../index-
|
|
7
|
-
import"../../index-
|
|
2
|
+
import"../../index-ha1tv70k.js";
|
|
3
|
+
import"../../index-d1pdv8qc.js";
|
|
4
|
+
import"../../index-dm50x3by.js";
|
|
5
|
+
import"../../index-qj0sq69b.js";
|
|
6
|
+
import"../../index-b9mj31q7.js";
|
|
8
7
|
import"../../index-yt1gg11x.js";
|
|
9
|
-
import"../../index-
|
|
8
|
+
import"../../index-edpkm3k7.js";
|
|
10
9
|
import {
|
|
11
10
|
createToolInvoker2
|
|
12
|
-
} from "../../index-
|
|
11
|
+
} from "../../index-yjx5jna7.js";
|
|
13
12
|
export {
|
|
14
13
|
createToolInvoker2 as createToolInvoker
|
|
15
14
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import"../../index-7mjsb7zv.js";
|
|
2
|
-
import"../../index-78da4g74.js";
|
|
3
2
|
import"../../index-dsa676h8.js";
|
|
4
|
-
import"../../index-
|
|
5
|
-
import"../../index-
|
|
6
|
-
import"../../index-
|
|
7
|
-
import"../../index-
|
|
8
|
-
import"../../index-
|
|
3
|
+
import"../../index-ha1tv70k.js";
|
|
4
|
+
import"../../index-d1pdv8qc.js";
|
|
5
|
+
import"../../index-dm50x3by.js";
|
|
6
|
+
import"../../index-qj0sq69b.js";
|
|
7
|
+
import"../../index-b9mj31q7.js";
|
|
9
8
|
import"../../index-yt1gg11x.js";
|
|
10
|
-
import"../../index-
|
|
9
|
+
import"../../index-edpkm3k7.js";
|
|
11
10
|
import"../../index-0x4mnwg5.js";
|
|
12
11
|
import"../../index-werjqesf.js";
|
|
13
12
|
import {
|
|
@@ -21,21 +20,21 @@ import {
|
|
|
21
20
|
createMcpHandler2,
|
|
22
21
|
createMcpHttpRoute2,
|
|
23
22
|
createStdioMcpServer2
|
|
24
|
-
} from "../../index-
|
|
23
|
+
} from "../../index-252den5a.js";
|
|
25
24
|
import {
|
|
26
25
|
DEFAULT_PROCESS_SIGNALS,
|
|
27
26
|
defaultSignalSource,
|
|
28
27
|
reportSignalError,
|
|
29
28
|
guardSignalCallback
|
|
30
29
|
} from "../../index-3prvb42w.js";
|
|
31
|
-
import"../../index-
|
|
30
|
+
import"../../index-efbzm2se.js";
|
|
32
31
|
import"../../index-a09r9ff0.js";
|
|
33
32
|
import {
|
|
34
33
|
MCP_CATALOG_META_KEY2,
|
|
35
34
|
mcpCatalogMeta2,
|
|
36
35
|
readMcpCatalogStamp2
|
|
37
36
|
} from "../../index-5t4fpdct.js";
|
|
38
|
-
import"../../index-
|
|
37
|
+
import"../../index-bjrcbcn2.js";
|
|
39
38
|
import"../../index-7csn6pva.js";
|
|
40
39
|
// src/tools/mcp/stdio-signals.ts
|
|
41
40
|
var bound = new WeakSet;
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import"../../index-
|
|
2
|
-
import"../../index-
|
|
3
|
-
import"../../index-78da4g74.js";
|
|
1
|
+
import"../../index-ha1tv70k.js";
|
|
2
|
+
import"../../index-d1pdv8qc.js";
|
|
4
3
|
import"../../index-dsa676h8.js";
|
|
5
|
-
import"../../index-
|
|
6
|
-
import"../../index-
|
|
7
|
-
import"../../index-
|
|
4
|
+
import"../../index-dm50x3by.js";
|
|
5
|
+
import"../../index-qj0sq69b.js";
|
|
6
|
+
import"../../index-b9mj31q7.js";
|
|
8
7
|
import"../../index-yt1gg11x.js";
|
|
9
|
-
import"../../index-
|
|
8
|
+
import"../../index-edpkm3k7.js";
|
|
10
9
|
import"../../index-werjqesf.js";
|
|
11
10
|
import {
|
|
12
11
|
createCli2
|
|
13
|
-
} from "../../index-
|
|
12
|
+
} from "../../index-63ctzjp4.js";
|
|
14
13
|
import"../../index-0x4mnwg5.js";
|
|
15
14
|
import"../../index-6kec3b14.js";
|
|
16
15
|
import"../../index-gy9x38a2.js";
|
|
@@ -21,15 +20,15 @@ import {
|
|
|
21
20
|
buildMcpServer2,
|
|
22
21
|
createMcpHandler2,
|
|
23
22
|
createStdioMcpServer2
|
|
24
|
-
} from "../../index-
|
|
25
|
-
import"../../index-
|
|
23
|
+
} from "../../index-252den5a.js";
|
|
24
|
+
import"../../index-efbzm2se.js";
|
|
26
25
|
import"../../index-a09r9ff0.js";
|
|
27
26
|
import {
|
|
28
27
|
mountAgentTools2
|
|
29
|
-
} from "../../index-
|
|
28
|
+
} from "../../index-k5azb3v3.js";
|
|
30
29
|
import"../../index-rjs94dny.js";
|
|
31
30
|
import"../../index-xrgn784x.js";
|
|
32
|
-
import"../../index-
|
|
31
|
+
import"../../index-bjrcbcn2.js";
|
|
33
32
|
import"../../index-7csn6pva.js";
|
|
34
33
|
|
|
35
34
|
// src/tools/toolkit.ts
|
|
@@ -7,21 +7,18 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
DEFAULT_CORS_ALLOW_HEADERS2
|
|
9
9
|
} from "../index-7mjsb7zv.js";
|
|
10
|
-
import"../index-
|
|
11
|
-
import"../index-
|
|
12
|
-
import {
|
|
13
|
-
normalizeError2
|
|
14
|
-
} from "../index-78da4g74.js";
|
|
10
|
+
import"../index-ha1tv70k.js";
|
|
11
|
+
import"../index-d1pdv8qc.js";
|
|
15
12
|
import"../index-dsa676h8.js";
|
|
16
|
-
import"../index-
|
|
13
|
+
import"../index-dm50x3by.js";
|
|
17
14
|
import {
|
|
18
15
|
coerceJsonArgs2
|
|
19
|
-
} from "../index-
|
|
16
|
+
} from "../index-qj0sq69b.js";
|
|
20
17
|
import {
|
|
21
18
|
ToolExecutionControlError2,
|
|
22
19
|
isToolExecutionControlError2,
|
|
23
20
|
collectTools2
|
|
24
|
-
} from "../index-
|
|
21
|
+
} from "../index-b9mj31q7.js";
|
|
25
22
|
import {
|
|
26
23
|
ALL_TRANSPORTS2,
|
|
27
24
|
TOOL_TRANSPORTS2
|
|
@@ -30,12 +27,12 @@ import {
|
|
|
30
27
|
assertToolName,
|
|
31
28
|
assertUniqueToolName,
|
|
32
29
|
flattenToolJsonSchema2
|
|
33
|
-
} from "../index-
|
|
30
|
+
} from "../index-edpkm3k7.js";
|
|
34
31
|
import"../index-werjqesf.js";
|
|
35
32
|
import"../index-m38ej7e5.js";
|
|
36
33
|
import {
|
|
37
34
|
defineContract2
|
|
38
|
-
} from "../index-
|
|
35
|
+
} from "../index-dmrx8xma.js";
|
|
39
36
|
import {
|
|
40
37
|
AsyncOperationCancelResultSchema2,
|
|
41
38
|
createAsyncOperationSnapshotSchema2
|
|
@@ -58,17 +55,17 @@ import {
|
|
|
58
55
|
import {
|
|
59
56
|
signJwt2,
|
|
60
57
|
verifyPkce2
|
|
61
|
-
} from "../index-
|
|
58
|
+
} from "../index-4p2zx593.js";
|
|
62
59
|
import {
|
|
63
60
|
describeToolCatalog2,
|
|
64
61
|
buildToolManifest2
|
|
65
|
-
} from "../index-
|
|
62
|
+
} from "../index-08a3qfr8.js";
|
|
66
63
|
import {
|
|
67
64
|
listToolNames2,
|
|
68
65
|
listContractToolNames2
|
|
69
|
-
} from "../index-
|
|
70
|
-
import"../index-
|
|
71
|
-
import"../index-
|
|
66
|
+
} from "../index-fatke81t.js";
|
|
67
|
+
import"../index-gq35s3bm.js";
|
|
68
|
+
import"../index-4gbybjg6.js";
|
|
72
69
|
import {
|
|
73
70
|
PROTECTED_RESOURCE_PATH2,
|
|
74
71
|
protectedResourceMetadataUrl2,
|
|
@@ -80,16 +77,18 @@ import {
|
|
|
80
77
|
PORTABLE_JSON_SCHEMA_FORMATS2,
|
|
81
78
|
findNonPortableFormats2,
|
|
82
79
|
findUntypedProperties2
|
|
83
|
-
} from "../index-
|
|
80
|
+
} from "../index-3kb8dw48.js";
|
|
84
81
|
import {
|
|
85
|
-
AgentToolError2,
|
|
86
|
-
isAgentToolError2,
|
|
87
82
|
defineAgentTool2,
|
|
88
83
|
mountAgentTools2
|
|
89
|
-
} from "../index-
|
|
84
|
+
} from "../index-k5azb3v3.js";
|
|
85
|
+
import {
|
|
86
|
+
AgentToolError2,
|
|
87
|
+
isAgentToolError2
|
|
88
|
+
} from "../index-1psbyyhj.js";
|
|
90
89
|
import {
|
|
91
90
|
createToolInvoker2
|
|
92
|
-
} from "../index-
|
|
91
|
+
} from "../index-yjx5jna7.js";
|
|
93
92
|
import {
|
|
94
93
|
WaitTimeoutError,
|
|
95
94
|
runWaitOperation,
|
|
@@ -102,10 +101,13 @@ import {
|
|
|
102
101
|
} from "../index-dz6tstcp.js";
|
|
103
102
|
import {
|
|
104
103
|
collectToolSurface
|
|
105
|
-
} from "../index-
|
|
104
|
+
} from "../index-bjrcbcn2.js";
|
|
106
105
|
import {
|
|
107
106
|
getTraceId2
|
|
108
|
-
} from "../index-
|
|
107
|
+
} from "../index-q4tr9vnf.js";
|
|
108
|
+
import {
|
|
109
|
+
normalizeError2
|
|
110
|
+
} from "../index-dwq6a6sq.js";
|
|
109
111
|
import {
|
|
110
112
|
defineRuntimeTool2,
|
|
111
113
|
createRuntimeToolFactory2
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// src/tools/agent-tool-error.ts
|
|
2
|
+
var AGENT_TOOL_ERROR_BRAND = Symbol.for("stitchkit.AgentToolError");
|
|
3
|
+
|
|
4
|
+
class AgentToolError2 extends Error {
|
|
5
|
+
output;
|
|
6
|
+
constructor(output, cause) {
|
|
7
|
+
let message = "Tool execution failed";
|
|
8
|
+
try {
|
|
9
|
+
message = JSON.stringify(output);
|
|
10
|
+
} catch {}
|
|
11
|
+
super(message, cause === undefined ? undefined : { cause });
|
|
12
|
+
this.name = "AgentToolError";
|
|
13
|
+
this.output = output;
|
|
14
|
+
Object.defineProperty(this, AGENT_TOOL_ERROR_BRAND, { value: true });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function isAgentToolError2(value) {
|
|
18
|
+
return typeof value === "object" && value !== null && AGENT_TOOL_ERROR_BRAND in value;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export { AgentToolError2, isAgentToolError2 };
|
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
LiveStatePhaseSchema2,
|
|
3
3
|
LiveStateStopReasonSchema2
|
|
4
4
|
} from "./index-jmaw365j.js";
|
|
5
|
+
import {
|
|
6
|
+
setOwnMember
|
|
7
|
+
} from "./index-3tb82xr7.js";
|
|
5
8
|
import {
|
|
6
9
|
serializeCanonicalJson
|
|
7
10
|
} from "./index-fmzg39a8.js";
|
|
@@ -53,12 +56,12 @@ function objectDiff(previous, next) {
|
|
|
53
56
|
const drop = [];
|
|
54
57
|
for (const key of Object.keys(next)) {
|
|
55
58
|
if (!Object.hasOwn(previous, key)) {
|
|
56
|
-
set
|
|
59
|
+
setOwnMember(set, key, { t: "set", v: next[key] });
|
|
57
60
|
continue;
|
|
58
61
|
}
|
|
59
62
|
const nested = diff(previous[key], next[key]);
|
|
60
63
|
if (nested !== undefined)
|
|
61
|
-
set
|
|
64
|
+
setOwnMember(set, key, nested);
|
|
62
65
|
}
|
|
63
66
|
for (const key of Object.keys(previous)) {
|
|
64
67
|
if (!Object.hasOwn(next, key))
|
|
@@ -144,7 +147,7 @@ function apply(previous, delta) {
|
|
|
144
147
|
for (const key of delta.drop ?? [])
|
|
145
148
|
delete result[key];
|
|
146
149
|
for (const [key, nested] of Object.entries(delta.set ?? {})) {
|
|
147
|
-
result
|
|
150
|
+
setOwnMember(result, key, apply(Object.hasOwn(result, key) ? result[key] : undefined, nested));
|
|
148
151
|
}
|
|
149
152
|
return result;
|
|
150
153
|
}
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-dsa676h8.js";
|
|
4
4
|
import {
|
|
5
5
|
toJsonSchema
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-d1pdv8qc.js";
|
|
7
7
|
import {
|
|
8
8
|
inspectOnlyError,
|
|
9
9
|
resolveToolAccess,
|
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
collectTools2,
|
|
14
14
|
createToolRunner,
|
|
15
15
|
formatToolError
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-b9mj31q7.js";
|
|
17
17
|
import {
|
|
18
18
|
toolSurfaceOutputSchema,
|
|
19
19
|
presentationMetadata
|
|
20
|
-
} from "./index-
|
|
20
|
+
} from "./index-edpkm3k7.js";
|
|
21
21
|
import {
|
|
22
22
|
publishedToolAnnotations
|
|
23
23
|
} from "./index-0x4mnwg5.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
validateMcpRoundPolicy,
|
|
27
27
|
validateResolvedInputRounds,
|
|
28
28
|
prepareProjectedMcpTools
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-efbzm2se.js";
|
|
30
30
|
import {
|
|
31
31
|
markProtocolOutcome
|
|
32
32
|
} from "./index-cfnmvcq8.js";
|
|
@@ -48,14 +48,14 @@ import {
|
|
|
48
48
|
} from "./index-5t4fpdct.js";
|
|
49
49
|
import {
|
|
50
50
|
projectJsonSafe
|
|
51
|
-
} from "./index-
|
|
51
|
+
} from "./index-9vj869rx.js";
|
|
52
52
|
import {
|
|
53
53
|
collectToolSurface
|
|
54
|
-
} from "./index-
|
|
54
|
+
} from "./index-bjrcbcn2.js";
|
|
55
55
|
import {
|
|
56
56
|
runWithRequestContext2,
|
|
57
57
|
getRequestContext2
|
|
58
|
-
} from "./index-
|
|
58
|
+
} from "./index-q4tr9vnf.js";
|
|
59
59
|
import {
|
|
60
60
|
defineRuntimeTool2
|
|
61
61
|
} from "./index-7csn6pva.js";
|
|
@@ -349,9 +349,9 @@ function roundPlanDigest(requests) {
|
|
|
349
349
|
});
|
|
350
350
|
}
|
|
351
351
|
async function resolveRequests(options, policy) {
|
|
352
|
-
const
|
|
353
|
-
if (
|
|
354
|
-
return { requests:
|
|
352
|
+
const resolver = policy.inputRequired;
|
|
353
|
+
if (typeof resolver !== "function")
|
|
354
|
+
return { requests: resolver, guarded: false };
|
|
355
355
|
const parsed = parseToolCallArguments(options.tool.method, options.rawArgs, {
|
|
356
356
|
coerceJson: options.coerceJsonArgs ?? true,
|
|
357
357
|
toolSurface: true
|
|
@@ -359,7 +359,6 @@ async function resolveRequests(options, policy) {
|
|
|
359
359
|
if (!parsed.ok) {
|
|
360
360
|
return { requests: [], guarded: false };
|
|
361
361
|
}
|
|
362
|
-
const resolver = policy.inputRequired;
|
|
363
362
|
const resolved = await resolver({ params: parsed.params, input: parsed.input });
|
|
364
363
|
validateResolvedInputRounds(options.tool, resolved, options.runtime?.maxRounds ?? 1);
|
|
365
364
|
return { requests: resolved, guarded: false };
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentTimestampSchema2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-yv7d6tav.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentMessagePartSchema2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-ks4rhtcc.js";
|
|
7
7
|
import {
|
|
8
8
|
AgentSnapshotSchema2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-gvv7y0s4.js";
|
|
10
10
|
import {
|
|
11
11
|
isDurableAgentRuntimeEvent,
|
|
12
12
|
AgentRuntimeEventSchema2
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-4q9tmzea.js";
|
|
14
14
|
|
|
15
15
|
// src/agent-runtime/browser/control-schema.ts
|
|
16
16
|
import { z as z2 } from "zod";
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
isSecretKeyName,
|
|
2
3
|
maskSecretShapes
|
|
3
|
-
} from "./index-
|
|
4
|
+
} from "./index-xrbrvn15.js";
|
|
4
5
|
import {
|
|
5
6
|
isUnsafeKey
|
|
6
7
|
} from "./index-zsarb5xp.js";
|
|
@@ -9,49 +10,6 @@ import {
|
|
|
9
10
|
} from "./index-ps3djm8d.js";
|
|
10
11
|
|
|
11
12
|
// src/observability/sanitize.ts
|
|
12
|
-
var SENSITIVE_WORDS = new Set([
|
|
13
|
-
"password",
|
|
14
|
-
"passwords",
|
|
15
|
-
"passwd",
|
|
16
|
-
"pwd",
|
|
17
|
-
"secret",
|
|
18
|
-
"secrets",
|
|
19
|
-
"token",
|
|
20
|
-
"tokens",
|
|
21
|
-
"apikey",
|
|
22
|
-
"auth",
|
|
23
|
-
"authorization",
|
|
24
|
-
"bearer",
|
|
25
|
-
"cookie",
|
|
26
|
-
"cookies",
|
|
27
|
-
"credential",
|
|
28
|
-
"credentials"
|
|
29
|
-
]);
|
|
30
|
-
var SENSITIVE_WORD_PAIRS = new Set([
|
|
31
|
-
"apikey",
|
|
32
|
-
"privatekey",
|
|
33
|
-
"initdata",
|
|
34
|
-
"sessionid",
|
|
35
|
-
"sessionkey"
|
|
36
|
-
]);
|
|
37
|
-
var SENSITIVE_EXACT = new Set(["session"]);
|
|
38
|
-
function splitKeyWords(key) {
|
|
39
|
-
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);
|
|
40
|
-
}
|
|
41
|
-
function isSensitiveKeyDefault(key) {
|
|
42
|
-
const words = splitKeyWords(key);
|
|
43
|
-
if (words.length === 1 && SENSITIVE_EXACT.has(words[0] ?? ""))
|
|
44
|
-
return true;
|
|
45
|
-
for (let index = 0;index < words.length; index += 1) {
|
|
46
|
-
const word = words[index] ?? "";
|
|
47
|
-
if (SENSITIVE_WORDS.has(word))
|
|
48
|
-
return true;
|
|
49
|
-
const next = words[index + 1];
|
|
50
|
-
if (next !== undefined && SENSITIVE_WORD_PAIRS.has(word + next))
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
return false;
|
|
54
|
-
}
|
|
55
13
|
var DEFAULT_MAX_BYTES = 16000;
|
|
56
14
|
var DEFAULT_MAX_DEPTH = 20;
|
|
57
15
|
var DEFAULT_MAX_NODES = 20000;
|
|
@@ -69,7 +27,7 @@ function secretMasker(options, isSecretName) {
|
|
|
69
27
|
output = output.replace(global, MASK);
|
|
70
28
|
} catch {}
|
|
71
29
|
}
|
|
72
|
-
return maskSecretShapes(output, MASK, isSecretName);
|
|
30
|
+
return maskSecretShapes(output, { mask: MASK, isSecretName });
|
|
73
31
|
};
|
|
74
32
|
}
|
|
75
33
|
var ERROR_CORE = new Set(["_type", "name", "message", "stack", "cause"]);
|
|
@@ -110,9 +68,9 @@ function pathMatcher(patterns) {
|
|
|
110
68
|
}
|
|
111
69
|
function redact2(value, options = {}) {
|
|
112
70
|
const custom = options.sensitiveKeys;
|
|
113
|
-
const isSensitive = custom === undefined ?
|
|
71
|
+
const isSensitive = custom === undefined ? isSecretKeyName : (key) => {
|
|
114
72
|
custom.lastIndex = 0;
|
|
115
|
-
return custom.test(key) || options.includeDefaultSensitiveKeys === true &&
|
|
73
|
+
return custom.test(key) || options.includeDefaultSensitiveKeys === true && isSecretKeyName(key);
|
|
116
74
|
};
|
|
117
75
|
const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH;
|
|
118
76
|
const maxStringLength = options.maxStringLength ?? Number.POSITIVE_INFINITY;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentMessageSchema2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-yv7d6tav.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentRunSchema2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-gvv7y0s4.js";
|
|
7
7
|
import {
|
|
8
8
|
missing,
|
|
9
9
|
nextEventSeqByMaximum,
|
|
10
10
|
agentSqlTables,
|
|
11
11
|
createAgentRuntimeStore2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-d5mhgx72.js";
|
|
13
13
|
import {
|
|
14
14
|
canonicalAgentJson2
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-kaq9nb7h.js";
|
|
16
16
|
import {
|
|
17
17
|
createCompanionHost,
|
|
18
18
|
conversationTables,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
scanSqlRecoverable,
|
|
25
25
|
listSqlConversations,
|
|
26
26
|
pageSqlConversationMessages
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-zagc12j1.js";
|
|
28
28
|
import {
|
|
29
29
|
rollbackSqliteFailure
|
|
30
30
|
} from "./index-ttexdtjj.js";
|
|
@@ -2,7 +2,11 @@ import {
|
|
|
2
2
|
sanitizeSurrogates,
|
|
3
3
|
AgentProviderError2,
|
|
4
4
|
AgentProviderStreamCutError2
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-knqye3gv.js";
|
|
6
|
+
import {
|
|
7
|
+
isSecretKeyName,
|
|
8
|
+
maskSecretShapes
|
|
9
|
+
} from "./index-xrbrvn15.js";
|
|
6
10
|
import {
|
|
7
11
|
readBoundedChunks,
|
|
8
12
|
concatChunks,
|
|
@@ -15,6 +19,47 @@ import {
|
|
|
15
19
|
isRecord
|
|
16
20
|
} from "./index-ps3djm8d.js";
|
|
17
21
|
|
|
22
|
+
// src/agent-runtime/providers/provider-usage.ts
|
|
23
|
+
import { z } from "zod";
|
|
24
|
+
var NonNegativeInt = z.int().nonnegative();
|
|
25
|
+
var NonNegativeNum = z.number().nonnegative();
|
|
26
|
+
var Percentage = z.number().min(0).max(100);
|
|
27
|
+
var Probability = z.number().min(0).max(1);
|
|
28
|
+
function reportedInt(value) {
|
|
29
|
+
const parsed = NonNegativeInt.safeParse(value);
|
|
30
|
+
return parsed.success ? { value: parsed.data, provenance: "provider-reported" } : { provenance: "unavailable" };
|
|
31
|
+
}
|
|
32
|
+
function computedInt(value) {
|
|
33
|
+
const parsed = NonNegativeInt.safeParse(value);
|
|
34
|
+
return parsed.success ? { value: parsed.data, provenance: "computed" } : { provenance: "unavailable" };
|
|
35
|
+
}
|
|
36
|
+
function reportedUsd(value) {
|
|
37
|
+
return typeof value !== "number" || !Number.isFinite(value) || value < 0 ? { provenance: "unavailable" } : { value, currency: "USD", provenance: "provider-reported" };
|
|
38
|
+
}
|
|
39
|
+
function computedUsd(value) {
|
|
40
|
+
return typeof value !== "number" || !Number.isFinite(value) || value < 0 ? { provenance: "unavailable" } : { value, currency: "USD", provenance: "computed" };
|
|
41
|
+
}
|
|
42
|
+
function nonNegativeNumber(value) {
|
|
43
|
+
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : undefined;
|
|
44
|
+
}
|
|
45
|
+
function buildProviderUsage(input) {
|
|
46
|
+
const unavailable = { provenance: "unavailable" };
|
|
47
|
+
const inputTotal = input.inputTokens.value;
|
|
48
|
+
const outputTotal = input.outputTokens.value;
|
|
49
|
+
const reasoningTokens = input.reasoningTokens && outputTotal !== undefined && input.reasoningTokens.value !== undefined && input.reasoningTokens.value > outputTotal ? unavailable : input.reasoningTokens ?? unavailable;
|
|
50
|
+
const cacheReadVal = input.cacheReadTokens?.value;
|
|
51
|
+
const cacheWriteVal = input.cacheWriteTokens?.value;
|
|
52
|
+
const cacheExceedsInput = inputTotal !== undefined && (cacheReadVal ?? 0) + (cacheWriteVal ?? 0) > inputTotal;
|
|
53
|
+
return {
|
|
54
|
+
inputTokens: input.inputTokens,
|
|
55
|
+
outputTokens: input.outputTokens,
|
|
56
|
+
reasoningTokens,
|
|
57
|
+
cacheReadTokens: cacheExceedsInput ? unavailable : input.cacheReadTokens ?? unavailable,
|
|
58
|
+
cacheWriteTokens: cacheExceedsInput ? unavailable : input.cacheWriteTokens ?? unavailable,
|
|
59
|
+
cost: input.cost ?? { provenance: "unavailable" }
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
18
63
|
// src/agent-runtime/providers/provider-http.ts
|
|
19
64
|
var DEFAULT_MAX_ERROR_BODY_BYTES = 64 * 1024;
|
|
20
65
|
var DEFAULT_MAX_JSON_BODY_BYTES = 16 * 1024 * 1024;
|
|
@@ -56,9 +101,10 @@ function stripControlChars(raw) {
|
|
|
56
101
|
return out;
|
|
57
102
|
}
|
|
58
103
|
function redactProviderFailureText(raw, maxChars = MAX_ERROR_MESSAGE_CHARS) {
|
|
59
|
-
const cleaned = stripControlChars(raw)
|
|
60
|
-
|
|
61
|
-
|
|
104
|
+
const cleaned = maskSecretShapes(stripControlChars(raw), {
|
|
105
|
+
mask: "[REDACTED]",
|
|
106
|
+
isSecretName: isSecretKeyName,
|
|
107
|
+
untrusted: true
|
|
62
108
|
}).trim();
|
|
63
109
|
return truncateSurrogateSafe(cleaned, maxChars);
|
|
64
110
|
}
|
|
@@ -218,8 +264,8 @@ async function postProviderStream(input) {
|
|
|
218
264
|
headers.set(k, v);
|
|
219
265
|
}
|
|
220
266
|
}
|
|
221
|
-
const
|
|
222
|
-
const response = await
|
|
267
|
+
const send = input.fetch ?? fetch;
|
|
268
|
+
const response = await send(input.url, {
|
|
223
269
|
method: "POST",
|
|
224
270
|
headers,
|
|
225
271
|
body: JSON.stringify(input.body),
|
|
@@ -241,6 +287,13 @@ async function postProviderStream(input) {
|
|
|
241
287
|
...input.maxErrorBytes !== undefined && { maxErrorBytes: input.maxErrorBytes }
|
|
242
288
|
});
|
|
243
289
|
}
|
|
290
|
+
return readProviderStreamResponse(response, {
|
|
291
|
+
provider: input.provider,
|
|
292
|
+
signal: input.signal,
|
|
293
|
+
...input.maxJsonBytes !== undefined && { maxJsonBytes: input.maxJsonBytes }
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
async function readProviderStreamResponse(response, input) {
|
|
244
297
|
const requestId = extractProviderRequestId(response.headers);
|
|
245
298
|
const responseHeaders = headersToRecord(response.headers);
|
|
246
299
|
const contentType = response.headers.get("content-type")?.toLowerCase() ?? "";
|
|
@@ -325,44 +378,6 @@ function recordField(value, key) {
|
|
|
325
378
|
return isRecord(nested) ? nested : undefined;
|
|
326
379
|
}
|
|
327
380
|
|
|
328
|
-
// src/agent-runtime/providers/provider-usage.ts
|
|
329
|
-
import { z } from "zod";
|
|
330
|
-
var NonNegativeIntSchema = z.int().nonnegative();
|
|
331
|
-
function reportedInt(value) {
|
|
332
|
-
const parsed = NonNegativeIntSchema.safeParse(value);
|
|
333
|
-
return parsed.success ? { value: parsed.data, provenance: "provider-reported" } : { provenance: "unavailable" };
|
|
334
|
-
}
|
|
335
|
-
function computedInt(value) {
|
|
336
|
-
const parsed = NonNegativeIntSchema.safeParse(value);
|
|
337
|
-
return parsed.success ? { value: parsed.data, provenance: "computed" } : { provenance: "unavailable" };
|
|
338
|
-
}
|
|
339
|
-
function reportedUsd(value) {
|
|
340
|
-
return typeof value !== "number" || !Number.isFinite(value) || value < 0 ? { provenance: "unavailable" } : { value, currency: "USD", provenance: "provider-reported" };
|
|
341
|
-
}
|
|
342
|
-
function computedUsd(value) {
|
|
343
|
-
return typeof value !== "number" || !Number.isFinite(value) || value < 0 ? { provenance: "unavailable" } : { value, currency: "USD", provenance: "computed" };
|
|
344
|
-
}
|
|
345
|
-
function nonNegativeNumber(value) {
|
|
346
|
-
return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : undefined;
|
|
347
|
-
}
|
|
348
|
-
function buildProviderUsage(input) {
|
|
349
|
-
const unavailable = { provenance: "unavailable" };
|
|
350
|
-
const inputTotal = input.inputTokens.value;
|
|
351
|
-
const outputTotal = input.outputTokens.value;
|
|
352
|
-
const reasoningTokens = input.reasoningTokens && outputTotal !== undefined && input.reasoningTokens.value !== undefined && input.reasoningTokens.value > outputTotal ? unavailable : input.reasoningTokens ?? unavailable;
|
|
353
|
-
const cacheReadVal = input.cacheReadTokens?.value;
|
|
354
|
-
const cacheWriteVal = input.cacheWriteTokens?.value;
|
|
355
|
-
const cacheExceedsInput = inputTotal !== undefined && (cacheReadVal ?? 0) + (cacheWriteVal ?? 0) > inputTotal;
|
|
356
|
-
return {
|
|
357
|
-
inputTokens: input.inputTokens,
|
|
358
|
-
outputTokens: input.outputTokens,
|
|
359
|
-
reasoningTokens,
|
|
360
|
-
cacheReadTokens: cacheExceedsInput ? unavailable : input.cacheReadTokens ?? unavailable,
|
|
361
|
-
cacheWriteTokens: cacheExceedsInput ? unavailable : input.cacheWriteTokens ?? unavailable,
|
|
362
|
-
cost: input.cost ?? { provenance: "unavailable" }
|
|
363
|
-
};
|
|
364
|
-
}
|
|
365
|
-
|
|
366
381
|
// src/agent-runtime/providers/provider-history.ts
|
|
367
382
|
var EMPTY_TOOL_OUTPUT_FALLBACK = "(no tool output)";
|
|
368
383
|
var ORPHAN_TOOL_RESULT_ERROR = "Tool result missing (call was interrupted before completion)";
|
|
@@ -727,4 +742,4 @@ function parseSseJson(provider, data) {
|
|
|
727
742
|
}
|
|
728
743
|
}
|
|
729
744
|
|
|
730
|
-
export { DEFAULT_MAX_ERROR_BODY_BYTES, DEFAULT_MAX_JSON_BODY_BYTES, redactProviderFailureText, headersToRecord, joinProviderUrl, assertNoExtraBodyClash, resolveProviderApiKey, parseHttpDateHeader, extractProviderRequestId, buildProviderHttpError, postProviderStream, nonEmptyString2, recordField,
|
|
745
|
+
export { NonNegativeInt, NonNegativeNum, Percentage, Probability, reportedInt, computedInt, reportedUsd, computedUsd, nonNegativeNumber, buildProviderUsage, DEFAULT_MAX_ERROR_BODY_BYTES, DEFAULT_MAX_JSON_BODY_BYTES, redactProviderFailureText, headersToRecord, joinProviderUrl, assertNoExtraBodyClash, resolveProviderApiKey, parseHttpDateHeader, extractProviderRequestId, buildProviderHttpError, postProviderStream, readProviderStreamResponse, nonEmptyString2, recordField, normalizeProviderHistory, historyHasToolTraffic, parseSseStream, parseSseJson };
|