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
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
offerTurnDelta,
|
|
10
10
|
safeJsonValue,
|
|
11
11
|
clampUniqueWindowName
|
|
12
|
-
} from "./index-
|
|
13
|
-
import {
|
|
14
|
-
mergeRateLimitEvent2
|
|
15
|
-
} from "./index-mkmep637.js";
|
|
12
|
+
} from "./index-sjq4akrx.js";
|
|
16
13
|
import {
|
|
17
14
|
isSupportedImageMediaType
|
|
18
|
-
} from "./index-
|
|
15
|
+
} from "./index-65p8v81y.js";
|
|
16
|
+
import {
|
|
17
|
+
mergeRateLimitEvent2
|
|
18
|
+
} from "./index-9m1m92rg.js";
|
|
19
19
|
import {
|
|
20
20
|
endEngineTurn
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-tcv71frn.js";
|
|
22
22
|
import {
|
|
23
23
|
errnoOf
|
|
24
24
|
} from "./index-jj9228tt.js";
|
|
@@ -27,7 +27,10 @@ import {
|
|
|
27
27
|
} from "./index-ps3djm8d.js";
|
|
28
28
|
|
|
29
29
|
// src/agent-executor/claude/classify.ts
|
|
30
|
-
import { z as
|
|
30
|
+
import { z as z4 } from "zod";
|
|
31
|
+
|
|
32
|
+
// src/agent-executor/claude/events-wire.ts
|
|
33
|
+
import { z as z2 } from "zod";
|
|
31
34
|
|
|
32
35
|
// src/agent-executor/claude/events.ts
|
|
33
36
|
import { z } from "zod";
|
|
@@ -155,129 +158,131 @@ var ClaudeRuntimeEventSchema2 = z.discriminatedUnion("type", [
|
|
|
155
158
|
...eventBase
|
|
156
159
|
})
|
|
157
160
|
]);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
161
|
+
|
|
162
|
+
// src/agent-executor/claude/events-wire.ts
|
|
163
|
+
var optWireStr = z2.string().optional().transform(nonEmptyString);
|
|
164
|
+
var WireTaskUsageSchema = z2.looseObject({
|
|
165
|
+
total_tokens: z2.int().nonnegative(),
|
|
166
|
+
tool_uses: z2.int().nonnegative(),
|
|
167
|
+
duration_ms: z2.number().nonnegative()
|
|
163
168
|
}).transform((u) => ({
|
|
164
169
|
totalTokens: u.total_tokens,
|
|
165
170
|
toolUses: u.tool_uses,
|
|
166
171
|
durationMs: u.duration_ms
|
|
167
172
|
}));
|
|
168
173
|
var WireBase = { uuid: optWireStr, session_id: optWireStr };
|
|
169
|
-
var WireTaskStartedSchema =
|
|
170
|
-
type:
|
|
171
|
-
subtype:
|
|
172
|
-
task_id:
|
|
174
|
+
var WireTaskStartedSchema = z2.looseObject({
|
|
175
|
+
type: z2.literal("system"),
|
|
176
|
+
subtype: z2.literal("task_started"),
|
|
177
|
+
task_id: z2.string().min(1),
|
|
173
178
|
run_id: optWireStr,
|
|
174
179
|
tool_use_id: optWireStr,
|
|
175
|
-
description:
|
|
180
|
+
description: z2.string(),
|
|
176
181
|
subagent_type: optWireStr,
|
|
177
|
-
is_backgrounded:
|
|
178
|
-
spawn_depth:
|
|
182
|
+
is_backgrounded: z2.boolean().optional(),
|
|
183
|
+
spawn_depth: z2.int().nonnegative().optional(),
|
|
179
184
|
parent_task_id: optWireStr,
|
|
180
185
|
task_type: optWireStr,
|
|
181
186
|
workflow_name: optWireStr,
|
|
182
|
-
prompt:
|
|
183
|
-
skip_transcript:
|
|
184
|
-
ambient:
|
|
187
|
+
prompt: z2.string().optional(),
|
|
188
|
+
skip_transcript: z2.boolean().optional(),
|
|
189
|
+
ambient: z2.boolean().optional(),
|
|
185
190
|
...WireBase
|
|
186
191
|
});
|
|
187
|
-
var WireTaskUpdatedSchema =
|
|
188
|
-
type:
|
|
189
|
-
subtype:
|
|
190
|
-
task_id:
|
|
192
|
+
var WireTaskUpdatedSchema = z2.looseObject({
|
|
193
|
+
type: z2.literal("system"),
|
|
194
|
+
subtype: z2.literal("task_updated"),
|
|
195
|
+
task_id: z2.string().min(1),
|
|
191
196
|
run_id: optWireStr,
|
|
192
|
-
patch:
|
|
197
|
+
patch: z2.looseObject({
|
|
193
198
|
status: optWireStr,
|
|
194
|
-
description:
|
|
195
|
-
end_time:
|
|
196
|
-
total_paused_ms:
|
|
197
|
-
error:
|
|
198
|
-
is_backgrounded:
|
|
199
|
+
description: z2.string().optional(),
|
|
200
|
+
end_time: z2.number().nonnegative().optional(),
|
|
201
|
+
total_paused_ms: z2.number().nonnegative().optional(),
|
|
202
|
+
error: z2.string().optional(),
|
|
203
|
+
is_backgrounded: z2.boolean().optional()
|
|
199
204
|
}),
|
|
200
205
|
...WireBase
|
|
201
206
|
});
|
|
202
|
-
var WireTaskProgressSchema =
|
|
203
|
-
type:
|
|
204
|
-
subtype:
|
|
205
|
-
task_id:
|
|
207
|
+
var WireTaskProgressSchema = z2.looseObject({
|
|
208
|
+
type: z2.literal("system"),
|
|
209
|
+
subtype: z2.literal("task_progress"),
|
|
210
|
+
task_id: z2.string().min(1),
|
|
206
211
|
run_id: optWireStr,
|
|
207
212
|
tool_use_id: optWireStr,
|
|
208
|
-
description:
|
|
213
|
+
description: z2.string(),
|
|
209
214
|
subagent_type: optWireStr,
|
|
210
215
|
usage: WireTaskUsageSchema.optional(),
|
|
211
216
|
last_tool_name: optWireStr,
|
|
212
|
-
summary:
|
|
217
|
+
summary: z2.string().optional(),
|
|
213
218
|
...WireBase
|
|
214
219
|
});
|
|
215
|
-
var WireTaskNotificationSchema =
|
|
216
|
-
type:
|
|
217
|
-
subtype:
|
|
218
|
-
task_id:
|
|
220
|
+
var WireTaskNotificationSchema = z2.looseObject({
|
|
221
|
+
type: z2.literal("system"),
|
|
222
|
+
subtype: z2.literal("task_notification"),
|
|
223
|
+
task_id: z2.string().min(1),
|
|
219
224
|
run_id: optWireStr,
|
|
220
225
|
tool_use_id: optWireStr,
|
|
221
|
-
status:
|
|
226
|
+
status: z2.string().min(1),
|
|
222
227
|
reason: optWireStr,
|
|
223
|
-
output_file:
|
|
224
|
-
summary:
|
|
228
|
+
output_file: z2.string().optional(),
|
|
229
|
+
summary: z2.string(),
|
|
225
230
|
usage: WireTaskUsageSchema.optional(),
|
|
226
|
-
skip_transcript:
|
|
227
|
-
ambient:
|
|
231
|
+
skip_transcript: z2.boolean().optional(),
|
|
232
|
+
ambient: z2.boolean().optional(),
|
|
228
233
|
...WireBase
|
|
229
234
|
});
|
|
230
|
-
var WireBackgroundTasksChangedSchema =
|
|
231
|
-
type:
|
|
232
|
-
subtype:
|
|
233
|
-
tasks:
|
|
234
|
-
task_id:
|
|
235
|
+
var WireBackgroundTasksChangedSchema = z2.looseObject({
|
|
236
|
+
type: z2.literal("system"),
|
|
237
|
+
subtype: z2.literal("background_tasks_changed"),
|
|
238
|
+
tasks: z2.array(z2.looseObject({
|
|
239
|
+
task_id: z2.string().min(1),
|
|
235
240
|
run_id: optWireStr,
|
|
236
|
-
task_type:
|
|
241
|
+
task_type: z2.string().min(1),
|
|
237
242
|
subagent_type: optWireStr,
|
|
238
|
-
description:
|
|
243
|
+
description: z2.string(),
|
|
239
244
|
parent_task_id: optWireStr,
|
|
240
|
-
ambient:
|
|
245
|
+
ambient: z2.boolean().optional()
|
|
241
246
|
})).max(MAX_BACKGROUND_TASKS),
|
|
242
247
|
...WireBase
|
|
243
248
|
});
|
|
244
|
-
var WireApiRetrySchema =
|
|
245
|
-
type:
|
|
246
|
-
subtype:
|
|
247
|
-
attempt:
|
|
248
|
-
max_retries:
|
|
249
|
-
retry_delay_ms:
|
|
250
|
-
error_status:
|
|
251
|
-
error:
|
|
252
|
-
no_response:
|
|
253
|
-
waited_ms:
|
|
254
|
-
retry_wait_ms:
|
|
249
|
+
var WireApiRetrySchema = z2.looseObject({
|
|
250
|
+
type: z2.literal("system"),
|
|
251
|
+
subtype: z2.literal("api_retry"),
|
|
252
|
+
attempt: z2.int().nonnegative(),
|
|
253
|
+
max_retries: z2.int().nonnegative(),
|
|
254
|
+
retry_delay_ms: z2.number().nonnegative(),
|
|
255
|
+
error_status: z2.int().nullable(),
|
|
256
|
+
error: z2.string().min(1),
|
|
257
|
+
no_response: z2.looseObject({
|
|
258
|
+
waited_ms: z2.number().nonnegative(),
|
|
259
|
+
retry_wait_ms: z2.number().nonnegative()
|
|
255
260
|
}).optional(),
|
|
256
261
|
...WireBase
|
|
257
262
|
});
|
|
258
|
-
var WireElicitationCompleteSchema =
|
|
259
|
-
type:
|
|
260
|
-
subtype:
|
|
261
|
-
mcp_server_name:
|
|
262
|
-
elicitation_id:
|
|
263
|
+
var WireElicitationCompleteSchema = z2.looseObject({
|
|
264
|
+
type: z2.literal("system"),
|
|
265
|
+
subtype: z2.literal("elicitation_complete"),
|
|
266
|
+
mcp_server_name: z2.string().min(1),
|
|
267
|
+
elicitation_id: z2.string().min(1),
|
|
263
268
|
...WireBase
|
|
264
269
|
});
|
|
265
|
-
var WireToolProgressSchema =
|
|
266
|
-
type:
|
|
267
|
-
tool_use_id:
|
|
268
|
-
tool_name:
|
|
269
|
-
parent_tool_use_id:
|
|
270
|
-
elapsed_time_seconds:
|
|
270
|
+
var WireToolProgressSchema = z2.looseObject({
|
|
271
|
+
type: z2.literal("tool_progress"),
|
|
272
|
+
tool_use_id: z2.string().min(1),
|
|
273
|
+
tool_name: z2.string().min(1),
|
|
274
|
+
parent_tool_use_id: z2.string().nullable().optional(),
|
|
275
|
+
elapsed_time_seconds: z2.number().nonnegative(),
|
|
271
276
|
task_id: optWireStr,
|
|
272
|
-
heartbeat:
|
|
277
|
+
heartbeat: z2.boolean().optional(),
|
|
273
278
|
subagent_type: optWireStr,
|
|
274
|
-
subagent_retry:
|
|
275
|
-
agent_id:
|
|
276
|
-
attempt:
|
|
277
|
-
max_retries:
|
|
278
|
-
retry_delay_ms:
|
|
279
|
-
error_status:
|
|
280
|
-
error_category:
|
|
279
|
+
subagent_retry: z2.looseObject({
|
|
280
|
+
agent_id: z2.string().min(1),
|
|
281
|
+
attempt: z2.int().nonnegative(),
|
|
282
|
+
max_retries: z2.int().nonnegative(),
|
|
283
|
+
retry_delay_ms: z2.number().nonnegative(),
|
|
284
|
+
error_status: z2.int().nullable(),
|
|
285
|
+
error_category: z2.string().min(1)
|
|
281
286
|
}).optional(),
|
|
282
287
|
...WireBase
|
|
283
288
|
});
|
|
@@ -473,118 +478,118 @@ function parseClaudeRuntimeEvent(record) {
|
|
|
473
478
|
}
|
|
474
479
|
|
|
475
480
|
// src/agent-executor/claude/protocol.ts
|
|
476
|
-
import { z as
|
|
477
|
-
var TextBlock =
|
|
478
|
-
var ThinkingBlock =
|
|
479
|
-
type:
|
|
480
|
-
thinking:
|
|
481
|
+
import { z as z3 } from "zod";
|
|
482
|
+
var TextBlock = z3.looseObject({ type: z3.literal("text"), text: z3.string() });
|
|
483
|
+
var ThinkingBlock = z3.looseObject({
|
|
484
|
+
type: z3.literal("thinking"),
|
|
485
|
+
thinking: z3.string().optional()
|
|
481
486
|
});
|
|
482
|
-
var ToolUseBlock =
|
|
483
|
-
type:
|
|
484
|
-
id:
|
|
485
|
-
name:
|
|
486
|
-
input:
|
|
487
|
+
var ToolUseBlock = z3.looseObject({
|
|
488
|
+
type: z3.literal("tool_use"),
|
|
489
|
+
id: z3.string().min(1),
|
|
490
|
+
name: z3.string().min(1),
|
|
491
|
+
input: z3.json()
|
|
487
492
|
});
|
|
488
|
-
var ToolResultBlock =
|
|
489
|
-
type:
|
|
490
|
-
tool_use_id:
|
|
491
|
-
content:
|
|
492
|
-
is_error:
|
|
493
|
+
var ToolResultBlock = z3.looseObject({
|
|
494
|
+
type: z3.literal("tool_result"),
|
|
495
|
+
tool_use_id: z3.string().min(1),
|
|
496
|
+
content: z3.json().optional(),
|
|
497
|
+
is_error: z3.boolean().optional()
|
|
493
498
|
});
|
|
494
|
-
var OtherBlock =
|
|
495
|
-
var ClaudeContentBlockSchema =
|
|
499
|
+
var OtherBlock = z3.looseObject({ type: z3.string() });
|
|
500
|
+
var ClaudeContentBlockSchema = z3.union([
|
|
496
501
|
TextBlock,
|
|
497
502
|
ThinkingBlock,
|
|
498
503
|
ToolUseBlock,
|
|
499
504
|
ToolResultBlock,
|
|
500
505
|
OtherBlock
|
|
501
506
|
]);
|
|
502
|
-
var Usage =
|
|
503
|
-
input_tokens:
|
|
504
|
-
output_tokens:
|
|
505
|
-
cache_read_input_tokens:
|
|
506
|
-
cache_creation_input_tokens:
|
|
507
|
-
output_tokens_details:
|
|
508
|
-
thinking_tokens:
|
|
507
|
+
var Usage = z3.looseObject({
|
|
508
|
+
input_tokens: z3.int().nonnegative().nullish(),
|
|
509
|
+
output_tokens: z3.int().nonnegative().nullish(),
|
|
510
|
+
cache_read_input_tokens: z3.int().nonnegative().nullish(),
|
|
511
|
+
cache_creation_input_tokens: z3.int().nonnegative().nullish(),
|
|
512
|
+
output_tokens_details: z3.looseObject({
|
|
513
|
+
thinking_tokens: z3.int().nonnegative().nullish()
|
|
509
514
|
}).nullish()
|
|
510
515
|
});
|
|
511
|
-
var ClaudeRecordSchema =
|
|
512
|
-
|
|
513
|
-
type:
|
|
514
|
-
subtype:
|
|
515
|
-
session_id:
|
|
516
|
-
model:
|
|
517
|
-
uuid:
|
|
516
|
+
var ClaudeRecordSchema = z3.discriminatedUnion("type", [
|
|
517
|
+
z3.looseObject({
|
|
518
|
+
type: z3.literal("system"),
|
|
519
|
+
subtype: z3.string(),
|
|
520
|
+
session_id: z3.string().optional(),
|
|
521
|
+
model: z3.string().optional(),
|
|
522
|
+
uuid: z3.string().optional()
|
|
518
523
|
}),
|
|
519
|
-
|
|
520
|
-
type:
|
|
521
|
-
uuid:
|
|
522
|
-
isReplay:
|
|
523
|
-
message:
|
|
524
|
-
content:
|
|
524
|
+
z3.looseObject({
|
|
525
|
+
type: z3.literal("user"),
|
|
526
|
+
uuid: z3.string().optional(),
|
|
527
|
+
isReplay: z3.boolean().optional(),
|
|
528
|
+
message: z3.looseObject({
|
|
529
|
+
content: z3.union([z3.string(), z3.array(ClaudeContentBlockSchema)])
|
|
525
530
|
})
|
|
526
531
|
}),
|
|
527
|
-
|
|
528
|
-
type:
|
|
529
|
-
parent_tool_use_id:
|
|
530
|
-
message:
|
|
531
|
-
id:
|
|
532
|
-
model:
|
|
533
|
-
content:
|
|
532
|
+
z3.looseObject({
|
|
533
|
+
type: z3.literal("assistant"),
|
|
534
|
+
parent_tool_use_id: z3.string().nullable().optional(),
|
|
535
|
+
message: z3.looseObject({
|
|
536
|
+
id: z3.string().min(1),
|
|
537
|
+
model: z3.string().optional(),
|
|
538
|
+
content: z3.array(ClaudeContentBlockSchema)
|
|
534
539
|
})
|
|
535
540
|
}),
|
|
536
|
-
|
|
537
|
-
type:
|
|
538
|
-
api_message_id:
|
|
539
|
-
event:
|
|
540
|
-
type:
|
|
541
|
-
index:
|
|
542
|
-
delta:
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
541
|
+
z3.looseObject({
|
|
542
|
+
type: z3.literal("stream_event"),
|
|
543
|
+
api_message_id: z3.string().optional(),
|
|
544
|
+
event: z3.looseObject({
|
|
545
|
+
type: z3.string(),
|
|
546
|
+
index: z3.int().nonnegative().optional(),
|
|
547
|
+
delta: z3.union([
|
|
548
|
+
z3.looseObject({ type: z3.literal("text_delta"), text: z3.string() }),
|
|
549
|
+
z3.looseObject({ type: z3.literal("thinking_delta"), thinking: z3.string() }),
|
|
550
|
+
z3.looseObject({ type: z3.string().optional() })
|
|
546
551
|
]).optional(),
|
|
547
|
-
message:
|
|
552
|
+
message: z3.looseObject({ id: z3.string().optional() }).optional()
|
|
548
553
|
})
|
|
549
554
|
}),
|
|
550
|
-
|
|
551
|
-
type:
|
|
552
|
-
subtype:
|
|
553
|
-
is_error:
|
|
554
|
-
session_id:
|
|
555
|
-
terminal_reason:
|
|
556
|
-
api_error_status:
|
|
557
|
-
result:
|
|
558
|
-
total_cost_usd:
|
|
555
|
+
z3.looseObject({
|
|
556
|
+
type: z3.literal("result"),
|
|
557
|
+
subtype: z3.string(),
|
|
558
|
+
is_error: z3.boolean(),
|
|
559
|
+
session_id: z3.string().optional(),
|
|
560
|
+
terminal_reason: z3.string().optional(),
|
|
561
|
+
api_error_status: z3.union([z3.int(), z3.string()]).nullable().optional(),
|
|
562
|
+
result: z3.string().optional(),
|
|
563
|
+
total_cost_usd: z3.number().nonnegative().optional(),
|
|
559
564
|
usage: Usage.nullish(),
|
|
560
|
-
modelUsage:
|
|
565
|
+
modelUsage: z3.record(z3.string(), z3.unknown()).nullish()
|
|
561
566
|
}),
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
type:
|
|
565
|
-
request_id:
|
|
566
|
-
request:
|
|
567
|
-
subtype:
|
|
568
|
-
tool_name:
|
|
569
|
-
input:
|
|
570
|
-
tool_use_id:
|
|
571
|
-
suppress_always_allow_rule:
|
|
567
|
+
z3.looseObject({ type: z3.literal("rate_limit_event"), rate_limit_info: z3.looseObject({}) }),
|
|
568
|
+
z3.looseObject({
|
|
569
|
+
type: z3.literal("control_request"),
|
|
570
|
+
request_id: z3.string().min(1),
|
|
571
|
+
request: z3.looseObject({
|
|
572
|
+
subtype: z3.string(),
|
|
573
|
+
tool_name: z3.string().optional(),
|
|
574
|
+
input: z3.json().optional(),
|
|
575
|
+
tool_use_id: z3.string().optional(),
|
|
576
|
+
suppress_always_allow_rule: z3.boolean().optional()
|
|
572
577
|
})
|
|
573
578
|
}),
|
|
574
|
-
|
|
575
|
-
type:
|
|
576
|
-
response:
|
|
579
|
+
z3.looseObject({
|
|
580
|
+
type: z3.literal("control_response"),
|
|
581
|
+
response: z3.looseObject({ subtype: z3.string(), request_id: z3.string().optional() })
|
|
577
582
|
}),
|
|
578
|
-
|
|
579
|
-
type:
|
|
580
|
-
command_uuid:
|
|
581
|
-
state:
|
|
583
|
+
z3.looseObject({
|
|
584
|
+
type: z3.literal("command_lifecycle"),
|
|
585
|
+
command_uuid: z3.string().optional(),
|
|
586
|
+
state: z3.string()
|
|
582
587
|
}),
|
|
583
|
-
|
|
584
|
-
type:
|
|
588
|
+
z3.looseObject({
|
|
589
|
+
type: z3.literal("tool_progress")
|
|
585
590
|
})
|
|
586
591
|
]);
|
|
587
|
-
var ClaudeUnknownRecordSchema =
|
|
592
|
+
var ClaudeUnknownRecordSchema = z3.looseObject({ type: z3.string() });
|
|
588
593
|
function claudeUserContent(parts) {
|
|
589
594
|
if (parts.every((part) => part.type === "text")) {
|
|
590
595
|
return parts.map((part) => part.text).join(`
|
|
@@ -688,21 +693,21 @@ function claudeInterrupt(requestId) {
|
|
|
688
693
|
var MAX_MODEL_USAGE_ENTRIES = 64;
|
|
689
694
|
var MAX_MODEL_KEY_CHARS = 256;
|
|
690
695
|
var MAX_PROVIDER_CHARS = 128;
|
|
691
|
-
var ClaudeWireModelUsageSchema =
|
|
692
|
-
inputTokens:
|
|
693
|
-
outputTokens:
|
|
694
|
-
cacheReadInputTokens:
|
|
695
|
-
cacheCreationInputTokens:
|
|
696
|
-
thinkingTokens:
|
|
697
|
-
cacheCreationEphemeral5mInputTokens:
|
|
698
|
-
cacheCreationEphemeral1hInputTokens:
|
|
699
|
-
webSearchRequests:
|
|
700
|
-
costUSD:
|
|
701
|
-
contextWindow:
|
|
702
|
-
maxOutputTokens:
|
|
703
|
-
canonicalModel:
|
|
704
|
-
provider:
|
|
705
|
-
costBasis:
|
|
696
|
+
var ClaudeWireModelUsageSchema = z4.looseObject({
|
|
697
|
+
inputTokens: z4.int().nonnegative(),
|
|
698
|
+
outputTokens: z4.int().nonnegative(),
|
|
699
|
+
cacheReadInputTokens: z4.int().nonnegative().nullish(),
|
|
700
|
+
cacheCreationInputTokens: z4.int().nonnegative().nullish(),
|
|
701
|
+
thinkingTokens: z4.int().nonnegative().nullish(),
|
|
702
|
+
cacheCreationEphemeral5mInputTokens: z4.int().nonnegative().nullish(),
|
|
703
|
+
cacheCreationEphemeral1hInputTokens: z4.int().nonnegative().nullish(),
|
|
704
|
+
webSearchRequests: z4.int().nonnegative().nullish(),
|
|
705
|
+
costUSD: z4.number().nonnegative().nullish(),
|
|
706
|
+
contextWindow: z4.int().nonnegative().nullish(),
|
|
707
|
+
maxOutputTokens: z4.int().nonnegative().nullish(),
|
|
708
|
+
canonicalModel: z4.string().nullish(),
|
|
709
|
+
provider: z4.string().nullish(),
|
|
710
|
+
costBasis: z4.string().nullish()
|
|
706
711
|
});
|
|
707
712
|
function newClaudeTurnState(turnId) {
|
|
708
713
|
return { turnId, toolNames: new Map, interruptRequested: false, compactCount: 0 };
|
|
@@ -1013,32 +1018,32 @@ function classifyClaudeRecord(value, state) {
|
|
|
1013
1018
|
}
|
|
1014
1019
|
|
|
1015
1020
|
// src/agent-executor/claude/limits.ts
|
|
1016
|
-
import { z as
|
|
1021
|
+
import { z as z5 } from "zod";
|
|
1017
1022
|
var MAX_WINDOW_NAME_CHARS = 256;
|
|
1018
1023
|
var MAX_PLAN_WINDOWS = 32;
|
|
1019
|
-
var ClaudeWindowSchema =
|
|
1020
|
-
utilization:
|
|
1021
|
-
resetsAt:
|
|
1024
|
+
var ClaudeWindowSchema = z5.looseObject({
|
|
1025
|
+
utilization: z5.number().min(0),
|
|
1026
|
+
resetsAt: z5.number().positive().optional()
|
|
1022
1027
|
});
|
|
1023
|
-
var ClaudeRateLimitInfoSchema =
|
|
1024
|
-
rateLimitType:
|
|
1025
|
-
utilization:
|
|
1026
|
-
resetsAt:
|
|
1027
|
-
unifiedWindows:
|
|
1028
|
+
var ClaudeRateLimitInfoSchema = z5.looseObject({
|
|
1029
|
+
rateLimitType: z5.string().optional(),
|
|
1030
|
+
utilization: z5.number().min(0).optional(),
|
|
1031
|
+
resetsAt: z5.number().positive().optional(),
|
|
1032
|
+
unifiedWindows: z5.record(z5.string(), ClaudeWindowSchema).optional()
|
|
1028
1033
|
});
|
|
1029
|
-
var ClaudeUsageWindowSchema =
|
|
1030
|
-
utilization:
|
|
1031
|
-
resets_at:
|
|
1034
|
+
var ClaudeUsageWindowSchema = z5.looseObject({
|
|
1035
|
+
utilization: z5.number().min(0).nullish(),
|
|
1036
|
+
resets_at: z5.string().nullish()
|
|
1032
1037
|
});
|
|
1033
|
-
var ClaudeModelScopedWindowSchema =
|
|
1034
|
-
display_name:
|
|
1035
|
-
utilization:
|
|
1036
|
-
resets_at:
|
|
1038
|
+
var ClaudeModelScopedWindowSchema = z5.looseObject({
|
|
1039
|
+
display_name: z5.string().nullish(),
|
|
1040
|
+
utilization: z5.number().min(0).nullish(),
|
|
1041
|
+
resets_at: z5.string().nullish()
|
|
1037
1042
|
});
|
|
1038
|
-
var ClaudeUsageResponseSchema =
|
|
1039
|
-
subscription_type:
|
|
1040
|
-
rate_limits_available:
|
|
1041
|
-
rate_limits:
|
|
1043
|
+
var ClaudeUsageResponseSchema = z5.looseObject({
|
|
1044
|
+
subscription_type: z5.string().nullish(),
|
|
1045
|
+
rate_limits_available: z5.boolean().optional(),
|
|
1046
|
+
rate_limits: z5.record(z5.string(), z5.unknown()).nullish()
|
|
1042
1047
|
});
|
|
1043
1048
|
var FIXED_USAGE_WINDOWS = [
|
|
1044
1049
|
"five_hour",
|
|
@@ -3,10 +3,13 @@ import {
|
|
|
3
3
|
} from "./index-dsa676h8.js";
|
|
4
4
|
import {
|
|
5
5
|
unwrapZodWrappers
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-dm50x3by.js";
|
|
7
7
|
import {
|
|
8
8
|
safeJsonParse
|
|
9
9
|
} from "./index-zsarb5xp.js";
|
|
10
|
+
import {
|
|
11
|
+
setOwnMember
|
|
12
|
+
} from "./index-3tb82xr7.js";
|
|
10
13
|
import {
|
|
11
14
|
isRecord
|
|
12
15
|
} from "./index-ps3djm8d.js";
|
|
@@ -100,7 +103,8 @@ function coerceValue(value, schema, path) {
|
|
|
100
103
|
const shape = base.shape;
|
|
101
104
|
const out = {};
|
|
102
105
|
for (const [key, item] of Object.entries(current)) {
|
|
103
|
-
|
|
106
|
+
const field = Object.hasOwn(shape, key) ? shape[key] : undefined;
|
|
107
|
+
setOwnMember(out, key, coerceValue(item, field, [...path, key]));
|
|
104
108
|
}
|
|
105
109
|
return out;
|
|
106
110
|
}
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
CodexThreadSchema2,
|
|
6
6
|
codexDriverCapabilities,
|
|
7
7
|
codexSharedServerCapabilities
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-c9j8441q.js";
|
|
9
9
|
import {
|
|
10
10
|
ExecutorDeltaSchema2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-akesakvj.js";
|
|
12
12
|
|
|
13
13
|
// src/agent-executor/testing/fixtures.ts
|
|
14
14
|
function makeExecutorDelta2(delta) {
|
|
@@ -1,40 +1,28 @@
|
|
|
1
|
+
import {
|
|
2
|
+
isSecretQueryName,
|
|
3
|
+
maskKeyShapes,
|
|
4
|
+
maskAuthorizationValues,
|
|
5
|
+
maskUrlPasswords
|
|
6
|
+
} from "./index-xrbrvn15.js";
|
|
7
|
+
|
|
1
8
|
// src/tracking/privacy.ts
|
|
2
9
|
var MASK = "[masked]";
|
|
3
10
|
var MAX_REDACTED_CHARS = 16384;
|
|
4
11
|
var TELEGRAM_SIGNED_FIELD = "tgwebappdata";
|
|
5
|
-
var PASSWORD_FIELD = /^(?:current|new|old|confirm|repeat|repeated)?(?:password|passwd|pwd)(?:confirmation)?$/;
|
|
6
|
-
var CREDENTIAL_FIELDS = new Set([
|
|
7
|
-
"token",
|
|
8
|
-
"accesstoken",
|
|
9
|
-
"idtoken",
|
|
10
|
-
"refreshtoken",
|
|
11
|
-
"authtoken",
|
|
12
|
-
"sessiontoken",
|
|
13
|
-
"csrftoken",
|
|
14
|
-
"resettoken",
|
|
15
|
-
"magictoken",
|
|
16
|
-
"secret",
|
|
17
|
-
"clientsecret",
|
|
18
|
-
"apikey",
|
|
19
|
-
"privatekey",
|
|
20
|
-
"authorization",
|
|
21
|
-
"signature",
|
|
22
|
-
"xamzsignature"
|
|
23
|
-
]);
|
|
24
12
|
var OAUTH_FIELDS = new Set(["code", "state", "sessionstate"]);
|
|
25
13
|
var SIGNED_LOGIN_FIELDS = new Set(["hash"]);
|
|
26
14
|
var PARAMETER = /([?&#])([^=&#?\s]+)=([^&#\s]*)/g;
|
|
27
|
-
var URL_PASSWORD = /(https?:\/\/[^\s/:@]+:)[^\s/@]+(@)/gi;
|
|
28
|
-
var BEARER = /\b(bearer\s+)[^\s,;]+/gi;
|
|
29
15
|
var ASSIGNMENT = /(^|[^\w?&#/-])("[^"\n]+"|'[^'\n]+'|[\w.$[\]-]+)(\s*[:=]\s*)("(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|[^\s,;}]+)/g;
|
|
16
|
+
function lastFieldName(key) {
|
|
17
|
+
return key.replace(/^amp;/, "").split(/[.[\]]/).filter((part) => part !== "" && !/^\d+$/.test(part)).at(-1) ?? "";
|
|
18
|
+
}
|
|
30
19
|
function fieldName(key) {
|
|
31
|
-
|
|
32
|
-
return field.replace(/[-_\s]/g, "").toLowerCase();
|
|
20
|
+
return lastFieldName(key).replace(/[-_\s]/g, "").toLowerCase();
|
|
33
21
|
}
|
|
34
22
|
function isSecretField(key, context) {
|
|
35
|
-
|
|
36
|
-
if (PASSWORD_FIELD.test(field) || CREDENTIAL_FIELDS.has(field))
|
|
23
|
+
if (isSecretQueryName(lastFieldName(key)))
|
|
37
24
|
return true;
|
|
25
|
+
const field = fieldName(key);
|
|
38
26
|
if (field === TELEGRAM_SIGNED_FIELD)
|
|
39
27
|
return true;
|
|
40
28
|
if (context?.oauth && OAUTH_FIELDS.has(field))
|
|
@@ -58,7 +46,7 @@ function secretContextOf(input) {
|
|
|
58
46
|
function redactTrackingText2(input) {
|
|
59
47
|
const text = input.slice(0, MAX_REDACTED_CHARS);
|
|
60
48
|
const context = secretContextOf(text);
|
|
61
|
-
return text
|
|
49
|
+
return maskAuthorizationValues(maskUrlPasswords(maskKeyShapes(text, MASK), MASK), MASK).replace(PARAMETER, (whole, separator, key, value) => {
|
|
62
50
|
try {
|
|
63
51
|
if (isSecretField(decodeKey(key), context))
|
|
64
52
|
return `${separator}${key}=${MASK}`;
|