stitchkit 0.135.1 → 0.136.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +109 -0
- package/README.md +25 -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/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-runtime/browser/browser-control-contract.d.ts +4 -0
- package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-schema.d.ts +4 -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 +16 -3
- package/dist/agent-runtime/event-schema.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 -1
- 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 +34 -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-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-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 +2 -31
- 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 +11 -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/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/stores/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-observations.d.ts +42 -42
- package/dist/agent-runtime/stores/sql-rows.d.ts +10 -10
- package/dist/agent-runtime/terminal-commit.d.ts +10 -10
- 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 +20 -20
- package/dist/agent-runtime/testing/store-conformance-support.d.ts +10 -10
- package/dist/application/diagnostic-journal-contract.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 +4 -2
- package/dist/entrypoints/agent-executor/claude-sdk.js +20 -20
- package/dist/entrypoints/agent-executor/claude.js +7 -7
- 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 +129 -35
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +2 -2
- package/dist/entrypoints/agent-executor/testing.js +17 -13
- package/dist/entrypoints/agent-executor.js +1 -1
- 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 +10 -12
- package/dist/entrypoints/agent-runtime/anthropic.js +13 -10
- package/dist/entrypoints/agent-runtime/browser.js +8 -4
- package/dist/entrypoints/agent-runtime/harness.js +18 -19
- package/dist/entrypoints/agent-runtime/openai.js +5 -5
- 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 +1095 -854
- package/dist/entrypoints/agent-runtime/postgres.js +2 -2
- package/dist/entrypoints/agent-runtime/realtime.js +5 -5
- package/dist/entrypoints/agent-runtime/sandbox.js +167 -139
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
- package/dist/entrypoints/agent-runtime/testing.js +3 -3
- package/dist/entrypoints/agent-runtime.js +246 -360
- package/dist/entrypoints/application.js +2 -2
- 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 +8 -9
- 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 +20 -20
- 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-grhhsrd5.js → index-1en7k3q5.js} +2 -1
- package/dist/{index-pdcbjd6a.js → index-1yky29qg.js} +6 -3
- package/dist/{index-b4c9dpzm.js → index-252den5a.js} +10 -11
- package/dist/{index-xtby8rj3.js → index-28kbdn63.js} +5 -47
- package/dist/{index-57sbckhv.js → index-36mtj8xm.js} +2 -2
- package/dist/{index-dm84tsd5.js → index-3kb8dw48.js} +1 -1
- package/dist/index-3tb82xr7.js +11 -0
- package/dist/{index-c24bj2r1.js → index-4243301z.js} +2 -2
- package/dist/{index-nr4fhfn4.js → index-4p2zx593.js} +2 -0
- package/dist/{index-q86qnzzf.js → index-54wp467c.js} +4 -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-5awtbyns.js → index-9vj869rx.js} +1 -1
- 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-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-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-de7b0kvz.js → index-epwvp88y.js} +1 -1
- package/dist/{index-asnd4h2k.js → index-f0dzyskg.js} +27 -4
- package/dist/{index-xbb8ysmq.js → index-fatke81t.js} +2 -2
- package/dist/{index-6nzzj7qr.js → index-gq35s3bm.js} +1 -1
- package/dist/index-gvgtmt7a.js +102 -0
- package/dist/{index-m2b49tvc.js → index-h08xqfw9.js} +20 -21
- package/dist/{index-gk6dq9ay.js → index-ha1tv70k.js} +3 -26
- package/dist/{index-wsv11dhg.js → index-hberxns4.js} +1 -1
- package/dist/{index-rkphknhx.js → index-hpzhz1vm.js} +1 -1
- package/dist/{index-npfdymav.js → index-j5vzhj3d.js} +1 -1
- package/dist/{index-d3s070eh.js → index-jperyn0c.js} +1 -1
- package/dist/{index-yhwx4fwk.js → index-kzsetgh9.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-v0j22shs.js → index-rg08syp1.js} +9 -6
- 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-y0mwkgkf.js → index-shte29pg.js} +1086 -1055
- package/dist/{index-fec05c9k.js → index-ta0e2daw.js} +9 -7
- package/dist/{index-ht71v1ag.js → index-tb36xawm.js} +59 -44
- package/dist/{index-c0yym4a0.js → index-w7e402wx.js} +11 -105
- package/dist/{index-bvpevwt6.js → index-xnqab06h.js} +207 -202
- 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/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 +1 -1
- package/llms/agent-runtime.txt +283 -36
- package/llms/application.txt +3 -1
- 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 +994 -217
- package/llms.txt +13 -12
- 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
package/CHANGELOG.md
CHANGED
|
@@ -15,6 +15,115 @@ additive**; the first breaking change landed in 0.10.0. Grep the file for
|
|
|
15
15
|
|
|
16
16
|
## [Unreleased]
|
|
17
17
|
|
|
18
|
+
## [0.136.0] - 2026-12-01
|
|
19
|
+
|
|
20
|
+
### ⚠️ Breaking changes
|
|
21
|
+
|
|
22
|
+
**Who must act:** applications reading diarized `segments` / `words` from `openRouterAudioTranscription` in `stitchkit/agent-runtime/openrouter`; applications passing `responseFormat: 'opus' | 'aac' | 'flac'` to `openRouterAudioSpeech`; applications that point an OpenRouter `baseUrl` at a plain-`http:` non-loopback host or at the `/chat/completions` endpoint instead of the API root, or give it credentials, a query or a fragment; tests that derive a provider `baseUrl` from `createFaultProviderServer().url` in `stitchkit/agent-runtime/testing`; applications that catch `OpenRouterHttpError`, type a fetch as `OpenRouterCatalogFetch`, read the request URL in a custom `OpenRouterFetch` as a string, or pass `fetcher` to an OpenRouter catalog, cache or spend reconciler; Linux applications whose `createProcessSandbox` `denyPaths` lie strictly inside a mounted directory (the workspace, `readOnlyPaths`, `writableDirs`, `privateTmpDir` or a system root) in `stitchkit/agent-runtime/sandbox`; applications whose sandbox network policy allows a plain-`http:` non-loopback origin, and Linux applications that run software needing its own user namespace inside a Bubblewrap sandbox or use a setuid `bwrap`, in `stitchkit/agent-runtime/sandbox`; applications of `createDeferredAgentToolSurface` in `stitchkit/agent-runtime` that relied on inactive-call repair without passing `repairToolCall`; applications that await `streamComplete(...).result` without iterating `parts`; applications with `loop.retry` that rely on a retry restarting the run's model steps from the first step or re-running `prepareStep`; standalone completions that relied on no idle deadline; applications importing `stitchkit/react` with `@tanstack/react-query` older than 5.103.0; applications passing `trustProxy` to `createServer`, `createHandler`, `serveNode`, `wrapInRequestContext`, `extractIp` or `getClientInfo`; applications whose endpoints accept JSON bodies over 1 MiB without setting `maxJsonBodyBytes`; applications whose handlers throw a `ZodError` to refuse a caller, or whose own `onError` checks `instanceof ZodError`; applications serving files whose names start with a dot through `staticRoute`, verifying JWTs without `exp` with `verifyJwt`, or calling `verifyTelegramInitData` without `maxAgeSeconds` and accepting strings older than a day. All other applications need no code changes.
|
|
23
|
+
|
|
24
|
+
- `stitchkit/agent-runtime/openrouter` — `openRouterAudioTranscription` parses diarized responses as OpenRouter sends them: `speaker` is a zero-based integer index and the provider's label arrives as `speaker_label` (`STTSegment` / `STTWord` in the STT API reference). The schema expected a string `speaker`, so every `diarize: true` + `verbose_json` request failed validation after it was billed. `OpenRouterAudioTranscriptionResult.segments` / `.words` are now typed projections (`OpenRouterTranscriptionSegment`, `OpenRouterTranscriptionWord`) with `speaker: number`, `speakerLabel`, `channel` and, on words, `confidence` and `type`; the untouched wire objects stay on `raw`. Before: `result.words?.[0]?.speaker` typed `string`, `result.segments?.[0]?.avg_logprob`; after: `result.words?.[0]?.speaker` is `number`, `result.words?.[0]?.speakerLabel`, `result.raw.segments?.[0]?.avg_logprob`.
|
|
25
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterAudioTranscription, OpenRouterAudioTranscriptionResult, OpenRouterAudioTranscriptionResponse, OpenRouterAudioTranscriptionResponseSchema
|
|
26
|
+
- `stitchkit/agent-runtime/openrouter` — `OpenRouterSpeechFormat` is `'mp3' | 'pcm' | 'wav'`, the `response_format` values OpenRouter's TTS API reference accepts; `'opus'`, `'aac'` and `'flac'` typed and then failed with a 400 after the request left, and `openRouterAudioSpeech` now refuses them before any request. Before: `openRouterAudioSpeech({ …, responseFormat: 'flac' })`; after: `responseFormat: 'mp3'` (or `'wav'` on Gemini TTS).
|
|
27
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` OpenRouterSpeechFormat, openRouterAudioSpeech(responseFormat)
|
|
28
|
+
- `stitchkit/agent-runtime/openrouter` — every OpenRouter path applies one `baseUrl` rule: `https:`, or `http:` only to a loopback host (`localhost`, `127.0.0.0/8`, `[::1]`); embedded credentials, a query string (even an empty `?`) and a fragment are refused when the provider, catalog, cache, spend helper or client is created or called, before any request. `baseUrl` is the API root on every path, so one ending in `/chat/completions` is refused the same way, with a `TypeError` naming the root: the chat driver used to keep such a URL as is while the catalog and non-chat paths appended their endpoint to it (`…/chat/completions/models`); `openRouterProvider({ apiKey, baseUrl: 'https://openrouter.ai/api/v1/chat/completions' })` → `openRouterProvider({ apiKey, baseUrl: 'https://openrouter.ai/api/v1' })`. The chat driver accepted `http://` to any host — the API key then travelled in clear text — and appended a `baseUrl` query to every request, while catalog and non-chat helpers refused credentials and fragments that chat accepted. Before: `openRouterProvider({ apiKey, baseUrl: 'http://gateway.internal/api/v1?team=a' })`; after: `openRouterProvider({ apiKey, baseUrl: 'https://gateway.internal/api/v1', headers: { 'x-team': 'a' } })`.
|
|
29
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterProvider(baseUrl), openRouterModelCatalog(baseUrl), loadOpenRouterCatalogSnapshot(baseUrl), fetchOpenRouterModelEndpoints(baseUrl), createOpenRouterCatalogCache(baseUrl), openRouterSpendProvider(baseUrl), createOpenRouterSpendReconciler(baseUrl), openRouterRequestJson(baseUrl), openRouterRequestStream(baseUrl)
|
|
30
|
+
- `stitchkit/agent-runtime/testing` — `createFaultProviderServer()` answers `url` as the API root (`http://127.0.0.1:<port>/v1`), not the `…/v1/chat/completions` endpoint, so it is the `baseUrl` every provider takes: `openRouterProvider` refuses an endpoint URL now (above), and `openAiProvider` / `anthropicProvider` append their own endpoint to it. The server still answers every path with the next step. Before: `anthropicProvider({ apiKey, baseUrl: new URL('/v1', server.url).toString() })`; after: `anthropicProvider({ apiKey, baseUrl: server.url })`. A test that fetches `server.url` directly is unaffected.
|
|
31
|
+
**Affects:** `stitchkit/agent-runtime/testing` createFaultProviderServer(url); `stitchkit/agent-runtime/testing` behaviour
|
|
32
|
+
- `stitchkit/agent-runtime/openrouter` — chat, catalog, spend and every non-chat client reach OpenRouter through one transport, so a non-2xx answer is always an `AgentProviderError` with `statusCode`, `retryAfterMs`, `requestId` and a bounded, redacted `responseBody`; `OpenRouterHttpError` is removed. One fetch type remains: `OpenRouterCatalogFetch` is removed and `OpenRouterFetch` is `(input: URL, init?: RequestInit) => Promise<Response>` for every `fetch` option — the transport hands it the resolved `URL` (chat and non-chat passed a string). Catalog and spend reads also share the transport's body limit (`AgentProviderError` instead of `RangeError` past `maxResponseBytes`), JSON content-type check and redirect refusal. Before: `if (error instanceof OpenRouterHttpError && error.status === 404)`, `const f: OpenRouterCatalogFetch = …`; after: `if (error instanceof AgentProviderError && error.statusCode === 404)`, `const f: OpenRouterFetch = …`.
|
|
33
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` OpenRouterHttpError, OpenRouterCatalogFetch, OpenRouterFetch, openRouterModelCatalog, loadOpenRouterCatalogSnapshot, fetchOpenRouterModelEndpoints, createOpenRouterCatalogCache, createOpenRouterSpendReconciler, openRouterProvider(fetch), openRouterRequestJson(fetch), openRouterRequestStream(fetch)
|
|
34
|
+
- `stitchkit/agent-runtime/openrouter` — the injected transport has one option name across every OpenRouter client: the catalog (`openRouterModelCatalog`), the snapshot and endpoint reads (`OpenRouterSnapshotOptions`), the catalog cache and the spend reconciler take `fetch`, as `openRouterProvider` and the non-chat clients already did; `fetcher` is removed without an alias. Before: `loadOpenRouterCatalogSnapshot({ apiKey, fetcher: gateway.fetchFor('openrouter') })`; after: `loadOpenRouterCatalogSnapshot({ apiKey, fetch: gateway.fetchFor('openrouter') })`.
|
|
35
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterModelCatalog(fetcher), OpenRouterModelCatalogOptions, loadOpenRouterCatalogSnapshot(fetcher), fetchOpenRouterModelEndpoints(fetcher), OpenRouterSnapshotOptions, createOpenRouterCatalogCache(fetcher), OpenRouterCatalogCacheOptions, createOpenRouterSpendReconciler(fetcher)
|
|
36
|
+
- `stitchkit/agent-runtime/sandbox` — on Linux, a `denyPaths` entry strictly inside a mounted host directory is refused with `SandboxError('SANDBOX_UNAVAILABLE')` naming the path and the mount, whether it exists at start or not. Bubblewrap masks a path by mounting over its directory entry, and a host rename over that entry (the usual atomic update of a token or `.env`) or a file created there after start left a long-lived sandboxed process reading the new secret. A deny that equals or contains a mount now replaces that mount with an empty `tmpfs` or `/dev/null` instead of binding the host path and covering it, so a rename on the host no longer reveals the old file either. macOS Seatbelt matches by path and keeps accepting such paths. Before: `createProcessSandbox({ workspace: '/srv/ws', denyPaths: ['/srv/ws/.env'] })`; after: keep the secret outside every mounted tree (`denyPaths: ['/srv/secrets/.env']`, nothing mounted there) or deny a whole mounted path.
|
|
37
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` createProcessSandbox(denyPaths)
|
|
38
|
+
- `stitchkit/agent-runtime/sandbox` — a network gateway rule (`SandboxNetworkPolicySchema` `{ allow: [{ origin, headers }] }`) accepts an `https:` origin, or `http:` only to a loopback host (`localhost`, `127.0.0.0/8`, `[::1]`); any other `http:` origin is refused when the policy is parsed by `createBubblewrapSandboxBackend`'s `create`, `setNetworkPolicy` or `createSandboxSession`. The gateway attaches the rule's `headers` — host credentials — and relays the guest's request, so a plain `http:` origin sent both across the network in clear text. Before: `setNetworkPolicy({ allow: [{ origin: 'http://api.internal', headers: { authorization } }] })`; after: `setNetworkPolicy({ allow: [{ origin: 'https://api.internal', headers: { authorization } }] })` (or a loopback `http:` origin to a local TLS-terminating proxy).
|
|
39
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` SandboxNetworkPolicySchema, SandboxNetworkPolicy, createBubblewrapSandboxBackend(network), createSandboxSession
|
|
40
|
+
- `stitchkit/agent-runtime/sandbox` — every Linux Bubblewrap launch (`createBubblewrapSandboxBackend`, `createProcessSandbox`) and `probeProcessSandbox` pass `--unshare-user --disable-userns`, so a sandboxed process can no longer create a nested user namespace: `unshare -U` fails with `ENOSPC`. Inside one it held every capability again and could remount its view of the filesystem. Software that needs its own user namespace in the sandbox (a nested `bwrap`, a browser's namespace sandbox) no longer runs there, and a host where Bubblewrap cannot create a user namespace or runs setuid — which does not support `--disable-userns` — now probes unavailable (`SANDBOX_UNAVAILABLE`) instead of running without a user namespace. Before: `unshare -U true` inside the sandbox exited 0; after: it exits non-zero, and nothing in the sandbox can regain capabilities through a new user namespace.
|
|
41
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` createBubblewrapSandboxBackend, createProcessSandbox, probeProcessSandbox
|
|
42
|
+
- `stitchkit/agent-runtime` — deferred inactive-call repair is only the hook `deferred.repairToolCall()` returns, passed as `loop.repairToolCall` or `completeText({ repairToolCall })`. It rode on the mounted tool set as a hidden property: spreading the search tool (`{ ...search, description }`) dropped it, and two merged `deferred.mount()` sets always resolved to the first surface's repair, so the second surface's inactive calls failed. The repair now decides from the tool set the loop holds and its own catalog. Before: `loop: { prepareStep: deferred.prepareStep() }`; after: `loop: { prepareStep: deferred.prepareStep(), repairToolCall: deferred.repairToolCall() }`.
|
|
43
|
+
**Affects:** `stitchkit/agent-runtime` createDeferredAgentToolSurface(mount), completeText(repairToolCall), streamComplete(repairToolCall), createAgentRuntime(loop)
|
|
44
|
+
- `stitchkit/agent-runtime` — `streamComplete` takes `parts: 'iterate' | 'ignore'` (`StreamCompleteInput`) instead of guessing the mode from when `parts` is first read. `'iterate'`, the default, backpressures from the first part: a consumer that starts `for await (stream.parts)` after other awaits gets every part, where it used to get an overflow `Error` once 64 parts had passed. `'ignore'` keeps no buffer and refuses `parts`; awaiting `result` alone without it now waits while the 64-part buffer is full. The idle deadline (`idleTimeoutMs`) still bounds a consumer that holds the full buffer (or a slow `onPart`), but the `timeout` it ends with then names the consumer and is never retried, so a late consumer does not pay for a second provider call. Before: `await streamComplete(input).result`; after: `await streamComplete({ ...input, parts: 'ignore' }).result` (or `await completeText(input)`).
|
|
45
|
+
**Affects:** `stitchkit/agent-runtime` streamComplete, StreamCompleteInput
|
|
46
|
+
- `stitchkit/agent-runtime` — `createAgentRuntime` and `completeText` / `streamComplete` / `completeObject` run one loop of model steps, so a retry repeats the same unit in both: the model call of the failed step. The runtime used to restart every step of the run (and could not retry at all once a tool had run, failing the run); now earlier steps and their tools stand, the repeated call keeps the request `prepareStep` built (it is not run again), and `onAttemptDiscarded`, `retry/scheduled`, `retry/started` and `attempt-reset` describe that call. A call whose stream already carried a provider-executed tool call or a tool result (a preliminary one included) is not repeated in either. As before, the runtime records `retry/started` and publishes `attempt-reset` after the retry's backoff, so a run stopped during the pause records neither; a standalone `attempt-reset` part still comes before the pause. `attempt-reset` withdraws what the failed call streamed and carries `withdrawn: { text, reasoning }` — the characters of transient text and reasoning that call published, the tail of what the run streamed; `reduceAgentControlEvent` drops that many from the end (and keeps calls still running), so earlier steps stay in the live view, also for a subscriber that joined mid-run, and a hand-written reducer must do the same. A discarded call's usage reaches `onAttemptDiscarded` also when its stream throws while draining after the `finish` that reported it. Before: a 503 in step 3 after a tool in step 2 ended the run as `provider_failure`; after: step 3's call is retried and the tool is not run again.
|
|
47
|
+
**Affects:** `stitchkit/agent-runtime` createAgentRuntime(loop), completeText(retry), streamComplete(retry), completeObject(retry), AgentAttemptResetEventSchema; `stitchkit/agent-runtime` behaviour; `stitchkit/agent-runtime/browser` reduceAgentControlEvent
|
|
48
|
+
- `stitchkit/agent-runtime` — `completeText` / `streamComplete` / `completeObject` take `idleTimeoutMs: number | null` and default it to 60 000, the runtime's default; a provider that stops sending used to hold a standalone call forever unless the caller passed `signal` or `idleTimeoutMs`. Before: `completeText({ driver, prompt })` could wait indefinitely; after: it fails with a `timeout` `AgentProviderError` after 60 s of silence — pass `idleTimeoutMs: null` to keep no deadline.
|
|
49
|
+
**Affects:** `stitchkit/agent-runtime` completeText(idleTimeoutMs), streamComplete(idleTimeoutMs), completeObject(idleTimeoutMs), CompleteTextOptions
|
|
50
|
+
- `stitchkit/react` — the optional peer `@tanstack/react-query` is `^5.103.0` (was `>=5`). The entry imports `environmentManager`, which `@tanstack/react-query` exports from 5.91.0, and its declarations name `MutationCacheConfig`, which it exports from 5.103.0: on 5.0.0 importing `stitchkit/react` failed with `SyntaxError: Export named 'environmentManager' not found`, and a strict typecheck refused `query-client.d.ts`. The consumer lane now installs every optional peer, and each alternative of an `a || b` range, at its declared floor, and runs there the typecheck, the sources and the installed proofs that load it. Before: `"@tanstack/react-query": "5.90.21"`; after: `"@tanstack/react-query": "^5.103.0"`. → ADR 0339
|
|
51
|
+
**Affects:** `stitchkit/react` *
|
|
52
|
+
- `stitchkit/server`, `stitchkit/node`, `stitchkit/handler`, `stitchkit/observability` — `trustProxy` names the proxies you run, `{ trustedPeer(address) }`, instead of `true`, and the client IP is the first address of `x-forwarded-for` read **from the right** that `trustedPeer` does not accept — read only when the real socket peer is itself trusted. `trustProxy: true` took the leftmost entry, which the client writes: behind nginx `$proxy_add_x_forwarded_for`, a request with `X-Forwarded-For: 127.0.0.1` became `ctx.ipAddress === '127.0.0.1'` and passed an `isLoopbackAddress` rule. `x-real-ip` is no longer read, and `extractIp` / `getClientInfo` without `socketIp` ignore the header (answer `''`). Before: `createServer({ trustProxy: true, … })`, `getClientInfo(req, { trustProxy: true })`; after: `createServer({ trustProxy: { trustedPeer: isLoopbackAddress }, … })`, `ctx.ipAddress` in a handler, or `getClientInfo(req, { trustProxy, socketIp: resolveSocketIp(req, server) })`. → ADR 0340
|
|
53
|
+
**Affects:** `stitchkit/server` createServer(trustProxy), createHandler(trustProxy), HandlerConfig, extractIp(trustProxy), getClientInfo(trustProxy), ClientIpOptions; `stitchkit/node` serveNode(trustProxy), createHandler(trustProxy); `stitchkit/handler` createHandler(trustProxy); `stitchkit/observability` wrapInRequestContext(trustProxy), WrapRequestContextOptions
|
|
54
|
+
- `stitchkit/server`, `stitchkit/node`, `stitchkit/handler`, `stitchkit/contract` — a JSON request body is bounded at **1 MiB** when neither the endpoint nor the handler sets `maxJsonBodyBytes`; a larger body is refused with `400 BAD_REQUEST` (`JSON body exceeds the 1048576-byte limit`) as soon as the stream crosses it, before buffering, parsing or the handler. Unset used to read the body whole: a 50 MiB anonymous POST answered `200` with the process at 229 MB RSS, and under Node no runtime limit applies at all. `parseBody` and the audit payload read share the same 1 MiB default. Before: an endpoint without `maxJsonBodyBytes` accepted any size; after: declare what it needs, `maxJsonBodyBytes: 8 * 1024 * 1024` on the endpoint or on `createServer` / `createHandler`. → ADR 0340
|
|
55
|
+
**Affects:** `stitchkit/server` createServer(maxJsonBodyBytes), createHandler(maxJsonBodyBytes), HandlerConfig; `stitchkit/server` behaviour; `stitchkit/node` serveNode(maxJsonBodyBytes); `stitchkit/node` behaviour; `stitchkit/handler` createHandler(maxJsonBodyBytes); `stitchkit/handler` behaviour; `stitchkit/contract` defineContract(maxJsonBodyBytes)
|
|
56
|
+
- `stitchkit/server`, `stitchkit/node`, `stitchkit/handler`, `stitchkit/contract`, `stitchkit/tools` — `VALIDATION_ERROR` 400 belongs to the contract boundary: the endpoint's `params` / `input` (and multipart fields) fail their schema as an `AppError('VALIDATION_ERROR')` carrying `details.issues` and the `ZodError` as `cause`, and `normalizeError` answers any other `ZodError` as `INTERNAL_SERVER_ERROR` 500 with the generic message, logging it and writing its text to the audit row. A `ZodError` from a handler parsing an upstream answer or a database row used to reach the caller as a 400 listing the internal schema's paths and enum values, and dressed a server fault as a client one. A tool's factory `context` that fails its schema is likewise a 500. A custom `onError` now receives invalid input as that `AppError`, never a raw `ZodError`. Before: `if (error instanceof ZodError) return badInput(zodIssues(error))` in `onError`, `throw Schema.parse(input.extra)` to refuse a caller; after: `if (AppError.is(error) && error.code === 'VALIDATION_ERROR') return badInput(error.details?.issues)`, `badRequest('extra is invalid', { issues: zodIssues(result.error) })`. → ADR 0340
|
|
57
|
+
**Affects:** `stitchkit/server` normalizeError, errorCode, createErrorHook; `stitchkit/server` behaviour; `stitchkit/node` behaviour; `stitchkit/handler` createErrorHook; `stitchkit/handler` behaviour; `stitchkit/contract` behaviour; `stitchkit/tools` createRuntimeToolFactory(context); `stitchkit/tools` behaviour
|
|
58
|
+
- `stitchkit/server` — `staticRoute` answers `404` for a path with a segment starting with a dot (`/.env`, `/.git/config`, `/assets/.npmrc`, `%2E`-encoded too); it served whatever hidden file sat in the directory. `StaticRouteOptions.allowedDotNames` names the ones to serve. Before: `staticRoute('/', './public')` served `/.well-known/assetlinks.json`; after: `staticRoute('/', './public', { allowedDotNames: ['.well-known'] })`. → ADR 0340
|
|
59
|
+
**Affects:** `stitchkit/server` staticRoute, StaticRouteOptions
|
|
60
|
+
- `stitchkit/server` — `verifyJwt` refuses a token without `exp` (`401 Token has no expiry`); such a token stayed valid for as long as the secret did. `VerifyJwtOptions.expiration: 'optional'` accepts it for tokens whose lifetime the application bounds elsewhere; a present `exp` is enforced either way. Before: `verifyJwt(token, secret)` accepted `signJwt(payload, secret)` without `expiresInSec`; after: sign with `expiresInSec`, or `verifyJwt(token, secret, { expiration: 'optional' })`. → ADR 0340
|
|
61
|
+
**Affects:** `stitchkit/server` verifyJwt, VerifyJwtOptions
|
|
62
|
+
- `stitchkit/telegram` — `verifyTelegramInitData` bounds the signature age at one day (`86400` s) when `maxAgeSeconds` is omitted, refusing an older string as `expired`; omitted used to mean never, so a captured `initData` was a permanent credential. Before: `verifyTelegramInitData({ initData, botToken })` accepted a string signed a year ago; after: the same call refuses it — pass the lifetime your session is worth, `maxAgeSeconds: 7 * 86_400`.
|
|
63
|
+
**Affects:** `stitchkit/telegram` verifyTelegramInitData(maxAgeSeconds), VerifyTelegramInitDataOptions
|
|
64
|
+
|
|
65
|
+
### Added
|
|
66
|
+
|
|
67
|
+
- `stitchkit/telegram/grammy`, `stitchkit/telegram` — shared widgets: `telegramWidgetApi` sends `is_shared` on `sendWidget` and adds `sendSharedWidget` (one message of the token budget) and `editSharedWidgetData` (no message; `public_data`, `cache_time` 5–3600 s), both checked before the request like the other widget methods; a shared widget's message must carry its `widget.id`, else the call fails as an unknown outcome, so `sendWidget` with `is_shared: true` and `sendSharedWidget` resolve to a message whose `widget.id` is typed `string`; `is_shared` is checked as a boolean before the request. `parseTelegramSharedWidgetQuery` / `TelegramSharedWidgetQuerySchema` read `update.shared_widget_query`. The parameter types (`TelegramSendSharedWidgetParams`, `TelegramEditSharedWidgetDataParams`) stay hand-written because the supported grammY range starts at 1.46, which types no widget method; a type test holds them to the installed grammY's own.
|
|
68
|
+
- `stitchkit/agent-runtime/openrouter` — `openRouterAudioSpeech` covers the rest of OpenRouter's `POST /audio/speech` request: `voice` is optional (providers with a default voice), `input` takes multi-speaker turns (`OpenRouterSpeechTurn`: `{ text, voice?, instructions? }`; a blank turn `voice` is refused like a blank request `voice`), request-wide `instructions`, and `outputDelivery: 'url'`, which resolves `OpenRouterAudioSpeechUrlResult` (`{ delivery: 'url', url, expiresAt, mediaType }`) or the byte stream when zero-data-retention makes OpenRouter stream anyway; `timeoutMs` bounds the signed-URL answer through its JSON body, not only its headers. The stream result carries `delivery: 'stream'`; a call without `outputDelivery: 'url'` is still typed as the stream result. `output_delivery` stays an owned key, so `extraBody` cannot set it.
|
|
69
|
+
- `stitchkit/agent-runtime/openrouter` — `OpenRouterProviderRouting` takes `options`: provider-specific request fields keyed by provider slug (`{ azure: { diarization: { enabled: true } } }`), sent as `provider.options` by the chat provider and every non-chat client (speech, transcription as JSON and multipart, images, videos, embeddings, rerank, System One). `provider` is an owned key, so these documented OpenRouter options were unreachable before.
|
|
70
|
+
- `stitchkit/agent-runtime/openrouter` — `createOpenRouterClient({ apiKey, baseUrl, fetch, … })` (`OpenRouterClientOptions` → `OpenRouterClient`) states the transport settings once and returns the non-chat clients as methods of the same name (`audioTranscription`, `audioSpeech`, `systemOne`, `generateImages`, `submitVideo`, `getVideo`, `downloadVideo`, `embeddings`, `rerank`, `requestJson`, `requestStream`); each method is the existing `openRouter*` function called with the client's settings under the call's own, `headers` and `providerApiKeys` merged key by key with the call's entries winning. An invalid `baseUrl` or static `apiKey` is refused when the client is created. The agent runtime guide gains speech-to-text, text-to-speech, video and `requestJson` + Zod `schema` examples, type-checked against the current exports, and states that audio by URL depends on the model.
|
|
71
|
+
- `stitchkit/agent-runtime/openrouter` — every non-chat client validates its request fields with a Zod schema before any request, so a value outside the API (`responseFormat: 'srt'`, `encodingFormat: 'int8'`, a non-boolean `generateAudio`, an empty `questions` map) is a `TypeError` naming the field instead of a paid 400; range checks keep their `RangeError`. Each `…Input` type is inferred from that schema plus `OpenRouterTransportOptions`. The non-chat answers share `OpenRouterUsageSchema` / `OpenRouterUsage` (tokens, `seconds`, `cost`, `is_byok`) and every result extends `OpenRouterResponseMeta` (`status`, `generationId`, `requestId`, `costUsd`, `headers`); the response schemas are exported alike — new `OpenRouterEmbeddingsResponseSchema`, `OpenRouterRerankResponseSchema`, `OpenRouterVideoSubmitResponseSchema`, `OpenRouterVideoStatusResponseSchema`, `OpenRouterSpeechUrlResponseSchema` (with `OpenRouterSpeechUrlResponse`).
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
|
|
75
|
+
- `stitchkit/agent-runtime` — a call to an unknown or inactive tool, or one with invalid input, is recorded with the refusal the model was shown (`Unknown or inactive tool "serach"`, `Invalid input for tool …`), so a later turn that reads the run back from the store tells the model which call to correct. The record said `Tool execution failed`, while the step right after the call carried the real text; a tool's own unexpected throw stays masked in both. Before: the next turn's tool result read `{ message: 'Tool execution failed' }`; after: `{ message: 'Unknown or inactive tool "serach"' }`.
|
|
76
|
+
**Affects:** `stitchkit/agent-runtime` behaviour
|
|
77
|
+
- `stitchkit/agent-runtime` — `createAgentRuntime` refuses a composition missing `protocol`, `store`, `models.resolve`, `prompt` or `tools` with `TypeError: createAgentRuntime: missing <names>` when it is made; a composition written in JavaScript, or run without a type check, used to fail its first run as `runtime_failure` with nothing to say which member was missing. The agent runtime guide gains "When a run ends `runtime_failure`": the cause is on the operator `run-terminal` event of `observe: createAgentObservability({ includeInternalCause: true, write })`, never on the result a client sees.
|
|
78
|
+
**Affects:** `stitchkit/agent-runtime` createAgentRuntime
|
|
79
|
+
- `stitchkit`, `stitchkit/contract` — an endpoint without `desc` is refused with `Contract "<prefix>": endpoint "<key>" requires desc` instead of a `TypeError` from `ep.desc.trim` (JavaScript, or a contract assembled at runtime); an empty `desc` keeps its own refusal. `defineContract` has one signature with an optional `scope` instead of two overloads, so TypeScript reports a mistake inside an endpoint at that endpoint, naming the missing `desc`, rather than "Property 'scope' is missing" at the call. A `// @ts-expect-error` placed above the contract's `{ prefix }` argument for such a mistake becomes unused: move it above the endpoint property it refers to.
|
|
80
|
+
**Affects:** `stitchkit` defineContract; `stitchkit/contract` defineContract
|
|
81
|
+
- Docs — the first examples a reader copies compile and run: the README Quick Start and the getting-started first app call the server where it listens (the client used `baseUrl: '/api'` while the server serves `/notes`, so every call answered `UNKNOWN_OPERATION`), declare their in-memory `db` and print the server's URL; the agent runtime's minimal composition is a whole program that runs without a key through `createScriptedModelDriver`, with a `preflight` that returns nothing; the grammY `configure` and the server guide's `createImplement` / `createScopedImplement` examples type-check. The README and getting-started name the `telegram-bot` template, and the scaffold instructions write `.env` (`bun run env:ensure`) before asking you to edit it. `packages/core/tests/guide-first-path-snippets.test.ts` type-checks these examples against the source entrypoints and runs the two programs.
|
|
82
|
+
- `stitchkit/agent-runtime/openrouter` — `openRouterSystemOne` accepts every request OpenRouter's System One API reference accepts and reads every answer it returns: a `score` question with one criterion (two were required), `instructions` and `criteria` as a string, JSON object or JSON array (`instructions` optional except on `box`), the image `box` question and its bounding-box answer, a per-question `refusal`, image `assets` (`{ format: 'png' | 'jpg' | 'jpeg', dataBase64 }`, sent as `data_base64`), `sessionId` (`session_id`) and `user`. A `choice` question no longer needs two criteria, and a `score` legend is the object the API returns.
|
|
83
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterSystemOne(questions, assets, sessionId, user), OpenRouterSystemOneInput, OpenRouterSystemOneQuestion, OpenRouterSystemOneResponseSchema, OpenRouterSystemOneResponse, OpenRouterSystemOneResult
|
|
84
|
+
- `stitchkit/agent-runtime/openrouter` — a non-chat call without `apiKey`, `Authorization` header or custom `fetch` whose `baseUrl` is OpenRouter's own host (`OPENROUTER_API_BASE_URL`, any case or trailing slash) is refused with a `TypeError` before any request; a set `baseUrl` used to count as a credential-injecting gateway, so the call went out and came back as an HTTP 401. A `baseUrl` on another host is still trusted to inject credentials.
|
|
85
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` behaviour
|
|
86
|
+
- `stitchkit/agent-runtime/openrouter` — three non-chat clients match OpenRouter's API reference: `openRouterRerank` accepts multimodal documents (`string` or `{ text?, image? }`, the image an http(s) URL or `data:image/` URI) and parses a result whose `document` echoes only an `image` (it required `document.text` and failed schema validation); `openRouterDownloadVideo` takes the zero-based output `index` (`GET /videos/{jobId}/content?index=`); `openRouterSystemOne` types `state` as a string, JSON object or JSON array and refuses anything else before the request.
|
|
87
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterRerank(documents), OpenRouterRerankInput, OpenRouterRerankResult, openRouterDownloadVideo(index), OpenRouterVideoJobInput, openRouterSystemOne(state), OpenRouterSystemOneInput
|
|
88
|
+
- `stitchkit/agent-runtime/openai`, `stitchkit/agent-runtime/anthropic`, `stitchkit/agent-runtime/openrouter` — a provider error body no longer leaks a credential into `AgentProviderError.message` / `responseBody`: redaction now drops JSON-quoted values (`"api_key": "…"`, `"access_token": "…"`, `{"authorization":"Token …"}`, `client_secret`, `password`) while keeping the field name and JSON shape, and masks `or-v1-…` and Google `AIza…` keys besides `sk-…` (including a masked `sk-…****1234` tail). Text without a secret is unchanged.
|
|
89
|
+
**Affects:** `stitchkit/agent-runtime/openai` openAiProvider; `stitchkit/agent-runtime/anthropic` anthropicProvider; `stitchkit/agent-runtime/openrouter` openRouterProvider, openRouterRequestJson, openRouterRequestStream
|
|
90
|
+
- `stitchkit/agent-runtime/openrouter` — `openRouterAudioTranscription` with `audio: { kind: 'url' }` sends the URL as `input_audio: { url, format? }`, the JSON shape OpenRouter's STT API reference requires (`STTUrlInputAudio`), instead of the multipart-only `source_url` field; the `url` source gains an optional `format` that overrides the one OpenRouter derives from the URL path extension.
|
|
91
|
+
**Affects:** `stitchkit/agent-runtime/openrouter` openRouterAudioTranscription(audio), OpenRouterAudioSource
|
|
92
|
+
- `stitchkit/agent-runtime/openai`, `stitchkit/agent-runtime/anthropic`, `stitchkit/agent-runtime/openrouter`, `stitchkit/agent-runtime`, `stitchkit/tools` — a schema property named `__proto__` survives every JSON Schema rebuild: OpenAI strict kept it out of `properties` and `required`, and Anthropic dropped it from `properties` while `required` still named it. Every structural walk (provider normalizers, `completeObject` strict closing, tool flattening and reference inlining, MCP dialect and served-format rewrites, foreign connection schemas) now goes through one subschema walker that writes own members.
|
|
93
|
+
**Affects:** `stitchkit/agent-runtime/openai` openAiProvider; `stitchkit/agent-runtime/anthropic` anthropicProvider; `stitchkit/agent-runtime/openrouter` openRouterProvider; `stitchkit/agent-runtime` completeObject; `stitchkit/tools` flattenToolJsonSchema, mountAgentTools
|
|
94
|
+
- `stitchkit/agent-runtime`, `stitchkit/tools`, `stitchkit/tools/connections`, `stitchkit/cli` — the rebuilds the previous item missed keep a `__proto__` key as an own member and resolve a `$ref` only through own members. `completeObject` in strict mode dropped a `__proto__` value from the model's answer, and set the answer object's prototype when the value was an object. A foreign connection schema whose top-level `allOf` / `oneOf` / `anyOf` named a `__proto__` property lost it from the tool's input. A tool document with a recursive definition beside such a property, or one cut by `inputNestingDepth`, lost it while `required` still named it. JSON-string argument coercion set the prototype of a nested object from its `__proto__` member, so a declared field could be read from it. `$ref: "#/$defs/__proto__"` (or another inherited name) against `$defs` without it resolved to `Object.prototype` in a foreign connection schema and when references are written out (`inputRecursionDepth`); it is now refused as an unresolvable reference.
|
|
95
|
+
**Affects:** `stitchkit/agent-runtime` completeObject; `stitchkit/tools` mountAgentTools; `stitchkit/tools/connections` mountConnections; `stitchkit/cli` coerceJsonArgs
|
|
96
|
+
- `stitchkit/cli` — a `defineCliBatchCommand` line whose `id` names an `Object.prototype` member (`toString`, `constructor`, `__proto__`) runs on a fresh checkpoint and replays on resume. Before, the inherited member was read as a recorded entry, so the never-run line was refused with `CONFLICT` (exit code 2), and an entry recorded as `__proto__` became the prototype of `entries` and was lost from the file. `readCliCheckpoint` keeps a `__proto__` entry as an own member.
|
|
97
|
+
**Affects:** `stitchkit/cli` defineCliBatchCommand, readCliCheckpoint
|
|
98
|
+
- `stitchkit/http` — exports `readContractIdentity` (with its `ContractIdentity` result) and the stream line errors `StreamLineLimitError` / `StreamTruncatedLineError`, the same owners the root entry exports. A client package for React Native that needed them took them from `stitchkit`, which pulled the root's default Socket.IO peer loader — a computed `import()` — into the phone bundle, and the Hermes compiler refused it with `Invalid expression`. Before: `import { readContractIdentity, StreamLineLimitError } from 'stitchkit'`; after: `from 'stitchkit/http'`, whose module graph holds no computed `import()`.
|
|
99
|
+
**Affects:** `stitchkit/http` readContractIdentity, ContractIdentity, StreamLineLimitError, StreamTruncatedLineError
|
|
100
|
+
- `stitchkit/agent-runtime/sandbox` — stopping a Bubblewrap session whose command group could not be proven dead (`COMMAND_CLEANUP`) still closes the network broker, removes its socket directory and releases the state lease, then rejects with that cleanup error; before, the first failure skipped every later step and the session could not be reattached.
|
|
101
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` createBubblewrapSandboxBackend
|
|
102
|
+
- `stitchkit/agent-runtime/sandbox` — macOS Seatbelt and the shared spec checks resolve a path through its ancestor only when the entry is genuinely absent (`ENOENT` with nothing at that name); a dangling or looping symlink, a path through a regular file or an unreadable directory now fails with `SandboxError('SANDBOX_UNAVAILABLE')` naming the path and code, as Linux already did, instead of being denied only by its spelling, which a symlink could bypass. Linux and macOS share this one resolver.
|
|
103
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` createProcessSandbox(denyPaths), buildSeatbeltProfile, ProcessSandboxSpecSchema
|
|
104
|
+
- `stitchkit/agent-runtime/sandbox` — on Linux with `denyPaths`, every mount source now resolves through that same resolver when the deny plan is made. An explicit mount (`workspace`, `readOnlyPaths`, `writableDirs`, `privateTmpDir`, `unixSockets`, `systemReadOnlyPaths`) through a dangling symlink or a regular file fails with `SandboxError('SANDBOX_UNAVAILABLE')` naming the path and code; before, it was planned by its spelling, and a denied target created before Bubblewrap started was bound and readable. A default optional system mount (`/lib64`, `/etc/ssl`, `/etc/ca-certificates`, `/etc/ld.so.cache`, and with `network: 'allow'` `/etc/resolv.conf`, `/etc/hosts`, `/etc/nsswitch.conf`) that is absent or a dangling symlink at plan time now stays in the plan as the path it would bind, so a covering `denyPaths` entry masks it and one strictly inside it is refused; before, it was left out of the plan but still emitted as `--ro-bind-try`, and a denied path appearing before start was bound.
|
|
105
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` createProcessSandbox(denyPaths)
|
|
106
|
+
- `stitchkit/agent-runtime/sandbox` — when the isolation probe of a new Bubblewrap session fails and stopping it fails too (`COMMAND_CLEANUP`), the ephemeral session directory is still removed and the caller still gets `SandboxError('SANDBOX_UNAVAILABLE', 'Bubblewrap could not establish isolation')`, its `cause` an `AggregateError` of the probe and cleanup failures; before, the stop error escaped and the session directory stayed on disk.
|
|
107
|
+
**Affects:** `stitchkit/agent-runtime/sandbox` createBubblewrapSandboxBackend
|
|
108
|
+
- `stitchkit/cli` — a `defineCliBatchCommand` checkpoint entry whose digest matches the line but whose recorded answer is not a recorded success is refused with `CONFLICT` (exit code 2) instead of replayed: the replay answered `{ id, replayed: true }` with no `ok` and no `exitCode`, and running the line again would repeat an operation that already ran.
|
|
109
|
+
**Affects:** `stitchkit/cli` defineCliBatchCommand
|
|
110
|
+
- `stitchkit/server` — `createEventBus` with declared `topics` refuses a name the topic record only inherits (`toString`, `constructor`) as an undeclared topic; it read the inherited property as the topic's declaration.
|
|
111
|
+
**Affects:** `stitchkit/server` createEventBus
|
|
112
|
+
- `stitchkit`, `stitchkit/http` — a contract client and URL builder refuse a path param, a wildcard segment or a `stripPrefixKeys` value that is `.` or `..` with a local `VALIDATION_ERROR` naming the param, before any request; a `stripPrefixKeys` value, which the prefix function writes unencoded, is also refused for `%2e` dot segments (`%2e%2e`, `%2E.`), a backslash-separated `..` and a `?` or `#`. `encodeURIComponent` leaves both as they are, and the URL parser resolved them: `docId: '..'` on `/tenants/:tenantId/docs/:docId` sent `GET /tenants/acme/`, another route, with the client's credentials. A segment that merely contains dots (`a..b`, `.env`) is sent as before.
|
|
113
|
+
**Affects:** `stitchkit` behaviour; `stitchkit/http` behaviour
|
|
114
|
+
- `stitchkit/observability` — `redact`, `sanitizePayload` and every logger on them mask more secrets by name and by shape. By name: `passphrase`, `accessKey` / `aws_access_key_id`, `apiKeys` / `x-provider-api-keys`, a key written as one lowercase run that ends in a secret word (`newpassword`, `accesstoken`, `xamzsignature`), and a key whose last word is `auth`, `signature`, `jwt`, `otp`, `pin` or `dsn` (`basicAuth`, `webhookSignature`, `X-Hub-Signature-256`, `SENTRY_DSN`, `userPin`, `pinCode`, `otpCode`); `signatureVersion`, `jwtExpiresAt`, `otpSentAt`, `pinned`, `dsnHost`, `auth_date` and `authMethod` stay readable (`auth` used to mask any key containing the word), and so do model token counts (`maxTokens`, `inputTokens`, `usage.total_tokens`), which were masked as `tokens`. By shape, in any string: the credential after `Bearer` (prose such as "Bearer token" stays), provider keys — `sk-…` (`sk-ant-api03-…`, `sk-proj-…`, a `sk-…****1234` tail) of 8 or more characters after `sk-`, OpenRouter `or-v1-…`, Google `AIza…` — JSON Web Tokens (`eyJ….eyJ….…`), and the user of an `http(s)` / `ws(s)` address with no password, where a Sentry DSN carries its key; a database or SSH user (`postgres://app@db`, `ssh://git@host`) stays.
|
|
115
|
+
**Affects:** `stitchkit/observability` behaviour
|
|
116
|
+
- `stitchkit/agent-runtime/openai`, `stitchkit/agent-runtime/anthropic`, `stitchkit/agent-runtime/openrouter` — provider error text (`AgentProviderError.message` / `responseBody`) is redacted by the same secret shapes as the journal, read as untrusted text: besides what it masked, it now drops a JWT, a Telegram bot token in a URL path, a database password, any secret-named assignment (`passphrase=…`, `x-provider-api-keys`), a secret inside a JSON-escaped body such as OpenRouter's `error.metadata.raw` (`{\"api_key\":\"…\"}`) and a masked `or-v1-…****1234` tail. A masked provider key now reads `[REDACTED]` (was `[REDACTED_KEY]`).
|
|
117
|
+
**Affects:** `stitchkit/agent-runtime/openai` openAiProvider; `stitchkit/agent-runtime/anthropic` anthropicProvider; `stitchkit/agent-runtime/openrouter` openRouterProvider, openRouterRequestJson, openRouterRequestStream
|
|
118
|
+
- `stitchkit/tracking` — `redactTrackingText` and `redactTrackingValue` take secret names and shapes from the same rule as the journal and provider errors: they now also mask a JWT, a provider key (`sk-…`, `or-v1-…`, `AIza…`), a Telegram bot token, the value after `Basic`, the password in the userinfo of a non-HTTP address such as a `postgres://` connection string, and parameters such as `passphrase`, `session`, `key` and `sig`. The context rules stay tracking's own: `code` beside `state`, `hash` beside `auth_date`, `tgWebAppData`, and no assignment inside a path (`/docs/token:abc`).
|
|
119
|
+
**Affects:** `stitchkit/tracking` redactTrackingText, redactTrackingValue
|
|
120
|
+
- `stitchkit/live`, `stitchkit/telegram`, `stitchkit/agent-runtime/anthropic`, `stitchkit/agent-runtime`, `stitchkit/agent-executor/testing`, `stitchkit/tools/connections` — a key that comes from outside and is named `__proto__` stays an own member instead of rewiring a prototype: `watchDiff` no longer loses such a field (two different values compared equal) and `applyWatchDelta` no longer sets the result's prototype; `verifyTelegramInitData` signs a `__proto__` pair like any other, so an unsigned one appended to a valid string now fails with `signature-mismatch`; a streamed Anthropic usage field named `__proto__` no longer supplies inherited token counts; a branched conversation keeps such a field of application JSON, and a recorded model invocation keeps it too (two payloads differing only there hashed alike); `parseReplayTranscript` reads a transcript line the same with and without `workspace`; an OpenAPI parameter named `__proto__` is a property of the tool input, and a parameter the caller did not give is no longer read from the prototype (`constructor`, `toString` used to send the function's source).
|
|
121
|
+
**Affects:** `stitchkit/live` watchDiff, applyWatchDelta; `stitchkit/telegram` verifyTelegramInitData; `stitchkit/agent-runtime/anthropic` anthropicProvider; `stitchkit/agent-runtime` behaviour; `stitchkit/agent-executor/testing` parseReplayTranscript; `stitchkit/tools/connections` mountConnections
|
|
122
|
+
|
|
123
|
+
### Changed
|
|
124
|
+
|
|
125
|
+
- Development and starter dependencies refreshed to their latest stable releases (grammy 1.48, ai 7.0.185, react-query-kit 3.4.1, @opentui 0.9.10, Biome 2.6.9, next-intl 4.16, recharts 3.11, oxc-parser 0.160); Prisma stays on 7.10.1 because 8.x is published only as a release candidate.
|
|
126
|
+
|
|
18
127
|
## [0.135.1] - 2026-11-29
|
|
19
128
|
|
|
20
129
|
### Added
|
package/README.md
CHANGED
|
@@ -60,10 +60,17 @@ Start a production-shaped Next.js, StitchKit and PostgreSQL application:
|
|
|
60
60
|
```bash
|
|
61
61
|
bun create stitchkit my-app
|
|
62
62
|
cd my-app
|
|
63
|
-
|
|
63
|
+
bun run env:ensure # writes .env from .env.example
|
|
64
|
+
# Replace USER:PASSWORD in DATABASE_URL in .env with your PostgreSQL role.
|
|
64
65
|
bun run dev
|
|
65
66
|
```
|
|
66
67
|
|
|
68
|
+
Two smaller templates start from the same command:
|
|
69
|
+
`bun create stitchkit my-agent --template agent` (a terminal coding agent over
|
|
70
|
+
OpenRouter) and `bun create stitchkit my-bot --template telegram-bot` (a
|
|
71
|
+
long-polling Telegram bot). Each says what to put in `.env`; see
|
|
72
|
+
[`create-stitchkit`](./packages/create-stitchkit/README.md).
|
|
73
|
+
|
|
67
74
|
To add StitchKit to an existing project instead:
|
|
68
75
|
|
|
69
76
|
```bash
|
|
@@ -193,17 +200,24 @@ export const users = defineContract({ prefix: 'users' }, {
|
|
|
193
200
|
|
|
194
201
|
```ts
|
|
195
202
|
// server/index.ts
|
|
196
|
-
import { implement,
|
|
203
|
+
import { createServer, implement, notFound } from 'stitchkit/server'
|
|
197
204
|
import { users } from '../shared/contracts'
|
|
198
205
|
|
|
206
|
+
const db = new Map<string, { id: string; name: string }>() // your database here
|
|
207
|
+
|
|
199
208
|
const service = implement(users, {
|
|
200
|
-
list: (
|
|
201
|
-
create: (ctx) =>
|
|
202
|
-
|
|
203
|
-
|
|
209
|
+
list: () => [...db.values()],
|
|
210
|
+
create: (ctx) => {
|
|
211
|
+
const user = { id: crypto.randomUUID(), name: ctx.input.name }
|
|
212
|
+
db.set(user.id, user)
|
|
213
|
+
return user
|
|
214
|
+
},
|
|
215
|
+
get: (ctx) => db.get(ctx.params.id) ?? notFound(),
|
|
216
|
+
delete: (ctx) => { db.delete(ctx.params.id) },
|
|
204
217
|
})
|
|
205
218
|
|
|
206
|
-
createServer({ services: [service], port: 3000 })
|
|
219
|
+
const server = createServer({ services: [service], port: 3000 })
|
|
220
|
+
console.log(`Listening on ${server.url}`) // serves /users and /users/:id
|
|
207
221
|
```
|
|
208
222
|
|
|
209
223
|
### 3. Use from the client
|
|
@@ -213,12 +227,12 @@ createServer({ services: [service], port: 3000 })
|
|
|
213
227
|
import { createClient, createHttpClient } from 'stitchkit'
|
|
214
228
|
import { users } from '../shared/contracts'
|
|
215
229
|
|
|
216
|
-
const http = createHttpClient({ baseUrl: '
|
|
230
|
+
const http = createHttpClient({ baseUrl: 'http://localhost:3000' })
|
|
217
231
|
export const api = createClient(users, http)
|
|
218
232
|
|
|
219
|
-
await api.
|
|
220
|
-
await api.
|
|
221
|
-
await api.get({ id:
|
|
233
|
+
const max = await api.create({ name: 'Max' }) // POST /users → User
|
|
234
|
+
console.log(await api.list()) // GET /users → User[]
|
|
235
|
+
console.log(await api.get({ id: max.id })) // GET /users/:id → User
|
|
222
236
|
```
|
|
223
237
|
|
|
224
238
|
For many contracts at once, use `createClients(contractRegistry, http)`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One ACP session as the driver holds it: the state a session keeps, its `close`, the
|
|
3
|
+
* open-or-reopen exchange with the agent, and the `AcpSession` built over them.
|
|
4
|
+
* `openAcpSession` in `v1-session.ts` validates the input and drives them.
|
|
5
|
+
*/
|
|
6
|
+
import type { z } from 'zod';
|
|
7
|
+
import { type JsonRpcValue } from '../json-rpc-peer.js';
|
|
8
|
+
import type { SessionLiveness, sessionAbort } from '../session-primitives.js';
|
|
9
|
+
import { type AcpConnection, type AcpDriverConfig, type connectAcp, type resolveAcpSessionMeta } from './v1-connect.js';
|
|
10
|
+
import { type PendingExternalAcpRequest } from './v1-permission.js';
|
|
11
|
+
import { type AcpConfigOption, type AcpMcpServerSchema, AcpSessionStateSchema } from './v1-protocol.js';
|
|
12
|
+
import type { AcpSession } from './v1-session.js';
|
|
13
|
+
import { type AcpTurnSlot } from './v1-turn.js';
|
|
14
|
+
export interface AcpSessionState {
|
|
15
|
+
current: AcpTurnSlot | undefined;
|
|
16
|
+
opened: boolean;
|
|
17
|
+
livePid: number | undefined;
|
|
18
|
+
pidNotified: boolean;
|
|
19
|
+
configOptions: readonly AcpConfigOption[];
|
|
20
|
+
sawConfigOptionUpdate: boolean;
|
|
21
|
+
title: string | undefined;
|
|
22
|
+
commands: readonly string[];
|
|
23
|
+
}
|
|
24
|
+
export declare function openOrReopenAcpSession(input: {
|
|
25
|
+
connected: AcpConnection;
|
|
26
|
+
cwd: string;
|
|
27
|
+
nativeThreadId: string | undefined;
|
|
28
|
+
mcpServers: z.infer<typeof AcpMcpServerSchema>[];
|
|
29
|
+
meta: ReturnType<typeof resolveAcpSessionMeta>;
|
|
30
|
+
signal: AbortSignal;
|
|
31
|
+
onBeforeFallback: () => void;
|
|
32
|
+
}): Promise<{
|
|
33
|
+
readonly sessionId: string;
|
|
34
|
+
readonly configOptions: readonly AcpConfigOption[] | null | undefined;
|
|
35
|
+
readonly models: z.infer<typeof AcpSessionStateSchema>['models'];
|
|
36
|
+
readonly sessionMeta: Readonly<Record<string, JsonRpcValue>> | undefined;
|
|
37
|
+
}>;
|
|
38
|
+
export declare function buildAcpSession(input: {
|
|
39
|
+
readonly config: AcpDriverConfig;
|
|
40
|
+
readonly connected: Awaited<ReturnType<typeof connectAcp>>;
|
|
41
|
+
readonly sessionId: string;
|
|
42
|
+
readonly sessionMeta: Readonly<Record<string, JsonRpcValue>> | undefined;
|
|
43
|
+
readonly liveness: SessionLiveness;
|
|
44
|
+
readonly linked: ReturnType<typeof sessionAbort>;
|
|
45
|
+
readonly externalPending: Map<string, PendingExternalAcpRequest>;
|
|
46
|
+
readonly state: AcpSessionState;
|
|
47
|
+
readonly stop: (primary?: {
|
|
48
|
+
error: unknown;
|
|
49
|
+
}) => Promise<void>;
|
|
50
|
+
}): AcpSession;
|
|
51
|
+
//# sourceMappingURL=v1-session-build.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"v1-session-build.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-session-build.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAE7B,OAAO,EAAwC,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,eAAe,EAGpB,KAAK,UAAU,EAEf,KAAK,qBAAqB,EAC3B,MAAM,cAAc,CAAC;AACtB,OAAO,EAGL,KAAK,yBAAyB,EAC/B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,kBAAkB,EAEvB,qBAAqB,EACtB,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO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AU,CAAC,OAAO,UAAU,CAAC,CAAC,CAAC;IAC3D,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,GAAG,SAAS,CAAC;IACzE,QAAQ,CAAC,QAAQ,EAAE,eAAe,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC;IACjD,QAAQ,CAAC,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,yBAAyB,CAAC,CAAC;IACjE,QAAQ,CAAC,KAAK,EAAE,eAAe,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE,GAAG,UAAU,CAkFb"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { AgentMessagePart } from '../../agent-parts/parts.js';
|
|
2
2
|
import type { AgentEngineSession } from '../engine.js';
|
|
3
3
|
import type { InteractionReply } from '../executor-contract.js';
|
|
4
|
-
import {
|
|
4
|
+
import type { JsonRpcValue } from '../json-rpc-peer.js';
|
|
5
5
|
import type { ExecutorProfileConfig } from '../profile.js';
|
|
6
6
|
import type { ExecutorStartupPhase } from '../vocabulary.js';
|
|
7
7
|
import { type AcpDriverConfig } from './v1-connect.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"v1-session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-session.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"v1-session.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/acp/v1-session.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CA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;IAC3G,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IACzC,mGAAmG;IACnG,QAAQ,CAAC,mBAAmB,EAAE,sBAAsB,CAAC;IACrD;;;;OAIG;IACH,QAAQ,CAAC,WAAW,EAAE,mBAAmB,CAAC;IAC1C,kGAAkG;IAClG,QAAQ,CAAC,aAAa,EAAE,SAAS,eAAe,EAAE,CAAC;IACnD,yDAAyD;IACzD,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,oDAAoD;IACpD,QAAQ,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,wHAAwH;IACxH,QAAQ,CAAC,WAAW,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAC;IAC9D,wFAAwF;IACxF,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,eAAe,EAAE,CAAC,CAAC;IACtF,oHAAoH;IACpH,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,KAAK,EAAE,gBAAgB,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChF;;;;;;OAMG;IACH,SAAS,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC;QAAE,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3E;AAED,wBAAsB,cAAc,CAClC,MAAM,EAAE,eAAe,EACvB,KAAK,EAAE,YAAY,GAClB,OAAO,CAAC,UAAU,CAAC,CA6JrB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ExecutorDelta } from '../vocabulary.js';
|
|
2
|
-
import {
|
|
2
|
+
import type { ClaudeRuntimeEvent } from './events.js';
|
|
3
3
|
/** What one turn has seen so far: which tool each call named, and whether it was asked to stop. */
|
|
4
4
|
export interface ClaudeTurnState {
|
|
5
5
|
readonly turnId: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/classify.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAyC,MAAM,eAAe,CAAC;AAC1F,OAAO,
|
|
1
|
+
{"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/classify.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAyC,MAAM,eAAe,CAAC;AAC1F,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAyBnD,mGAAmG;AACnG,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACxC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAElE;AAED;;;;;GAKG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,aAAa,EAAE,CAAA;CAAE,GAC3C;IACE,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE,OAAO,CAAC,aAAa,EAAE;QAAE,IAAI,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACnD,KAAK,EAAE,OAAO,CAAC;IACf,wFAAwF;IACxF,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,gFAAgF;IAChF,mBAAmB,EAAE,OAAO,CAAC;CAC9B,GACD;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,aAAa,EAAE,CAAC;IAAC,OAAO,EAAE,WAAW,GAAG,aAAa,GAAG,QAAQ,CAAA;CAAE,GACzF;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CAAE,GACjD;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,kBAAkB,CAAA;CAAE,GAC5C;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GACtD;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAClC,sBAAsB,CAAC;AAE3B;;;;GAIG;AACH,UAAU,sBAAsB;IAC9B,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC;IACrB,MAAM,CAAC,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;CACjD;AA4JD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,eAAe,GAAG,aAAa,CAuL1F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ClaudeRuntimeEvent } from './events.js';
|
|
2
|
+
/** Whether a Claude `system` record subtype maps to a {@link ClaudeRuntimeEvent}. */
|
|
3
|
+
export declare function isClaudeRuntimeSystemSubtype(subtype: string): boolean;
|
|
4
|
+
/**
|
|
5
|
+
* Parse a validated Claude `system` (task/retry/elicitation) or top-level `tool_progress`
|
|
6
|
+
* wire record into a normalized {@link ClaudeRuntimeEvent}. Returns `undefined` when required
|
|
7
|
+
* fields are missing or malformed so the classifier can surface `unhandled` fail-closed.
|
|
8
|
+
*/
|
|
9
|
+
export declare function parseClaudeRuntimeEvent(record: {
|
|
10
|
+
readonly type: string;
|
|
11
|
+
readonly subtype?: string;
|
|
12
|
+
}): ClaudeRuntimeEvent | undefined;
|
|
13
|
+
//# sourceMappingURL=events-wire.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events-wire.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/events-wire.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AA8JnD,qFAAqF;AACrF,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAErE;AAkJD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE;IAC9C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B,GAAG,kBAAkB,GAAG,SAAS,CA6BjC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export declare const MAX_BACKGROUND_TASKS = 1024;
|
|
2
3
|
/** Token, tool-use and duration counters reported on Claude task progress/notification events. */
|
|
3
4
|
export declare const ClaudeTaskUsageSchema: z.ZodObject<{
|
|
4
5
|
totalTokens: z.ZodInt;
|
|
@@ -132,15 +133,4 @@ export declare const ClaudeRuntimeEventSchema: z.ZodDiscriminatedUnion<[z.ZodObj
|
|
|
132
133
|
}, z.core.$strict>], "type">;
|
|
133
134
|
/** Typed non-delta runtime event inferred from {@link ClaudeRuntimeEventSchema}. */
|
|
134
135
|
export type ClaudeRuntimeEvent = z.infer<typeof ClaudeRuntimeEventSchema>;
|
|
135
|
-
/** Whether a Claude `system` record subtype maps to a {@link ClaudeRuntimeEvent}. */
|
|
136
|
-
export declare function isClaudeRuntimeSystemSubtype(subtype: string): boolean;
|
|
137
|
-
/**
|
|
138
|
-
* Parse a validated Claude `system` (task/retry/elicitation) or top-level `tool_progress`
|
|
139
|
-
* wire record into a normalized {@link ClaudeRuntimeEvent}. Returns `undefined` when required
|
|
140
|
-
* fields are missing or malformed so the classifier can surface `unhandled` fail-closed.
|
|
141
|
-
*/
|
|
142
|
-
export declare function parseClaudeRuntimeEvent(record: {
|
|
143
|
-
readonly type: string;
|
|
144
|
-
readonly subtype?: string;
|
|
145
|
-
}): ClaudeRuntimeEvent | undefined;
|
|
146
136
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/claude/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB,OAAO,CAAC;AAEzC,kGAAkG;AAClG,eAAO,MAAM,qBAAqB;;;;kBAIhC,CAAC;AAEH,mDAAmD;AACnD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAyCpE;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4BAsFnC,CAAC;AAEH,oFAAoF;AACpF,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -641,147 +641,4 @@ export declare const CodexThreadRevertResponseSchema: z.ZodObject<{
|
|
|
641
641
|
turnsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
642
642
|
itemsBackwardsCursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
643
643
|
}, z.core.$loose>;
|
|
644
|
-
/** Loose Zod schema for `item/commandExecution/requestApproval` and `item/fileChange/requestApproval` params. */
|
|
645
|
-
export declare const CodexApprovalParamsSchema: z.ZodObject<{
|
|
646
|
-
threadId: z.ZodOptional<z.ZodString>;
|
|
647
|
-
turnId: z.ZodOptional<z.ZodString>;
|
|
648
|
-
itemId: z.ZodString;
|
|
649
|
-
command: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
650
|
-
cwd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
651
|
-
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
652
|
-
grantRoot: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
653
|
-
kind: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
654
|
-
approvalId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
655
|
-
startedAtMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
656
|
-
commandActions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodJSONSchema>>>;
|
|
657
|
-
availableDecisions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodJSONSchema>>>;
|
|
658
|
-
}, z.core.$loose>;
|
|
659
|
-
/** Loose Zod schema for one option inside a `item/tool/requestUserInput` question. */
|
|
660
|
-
export declare const CodexUserInputOptionSchema: z.ZodObject<{
|
|
661
|
-
label: z.ZodString;
|
|
662
|
-
description: z.ZodString;
|
|
663
|
-
}, z.core.$loose>;
|
|
664
|
-
/** Loose Zod schema for one question inside `item/tool/requestUserInput`. */
|
|
665
|
-
export declare const CodexUserInputQuestionSchema: z.ZodObject<{
|
|
666
|
-
id: z.ZodString;
|
|
667
|
-
question: z.ZodString;
|
|
668
|
-
header: z.ZodString;
|
|
669
|
-
isOther: z.ZodOptional<z.ZodBoolean>;
|
|
670
|
-
isSecret: z.ZodOptional<z.ZodBoolean>;
|
|
671
|
-
options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
672
|
-
label: z.ZodString;
|
|
673
|
-
description: z.ZodString;
|
|
674
|
-
}, z.core.$loose>>>>;
|
|
675
|
-
}, z.core.$loose>;
|
|
676
|
-
/** Loose Zod schema for `item/tool/requestUserInput` server request params. */
|
|
677
|
-
export declare const CodexUserInputParamsSchema: z.ZodObject<{
|
|
678
|
-
threadId: z.ZodOptional<z.ZodString>;
|
|
679
|
-
turnId: z.ZodOptional<z.ZodString>;
|
|
680
|
-
itemId: z.ZodString;
|
|
681
|
-
questions: z.ZodArray<z.ZodObject<{
|
|
682
|
-
id: z.ZodString;
|
|
683
|
-
question: z.ZodString;
|
|
684
|
-
header: z.ZodString;
|
|
685
|
-
isOther: z.ZodOptional<z.ZodBoolean>;
|
|
686
|
-
isSecret: z.ZodOptional<z.ZodBoolean>;
|
|
687
|
-
options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
|
|
688
|
-
label: z.ZodString;
|
|
689
|
-
description: z.ZodString;
|
|
690
|
-
}, z.core.$loose>>>>;
|
|
691
|
-
}, z.core.$loose>>;
|
|
692
|
-
}, z.core.$loose>;
|
|
693
|
-
/** Answers to `item/tool/requestUserInput`: question id → the chosen answers. */
|
|
694
|
-
export declare const CodexUserInputAnswersSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
695
|
-
answers: z.ZodArray<z.ZodString>;
|
|
696
|
-
}, z.core.$strict>>;
|
|
697
|
-
/** Permission profile requested or granted on `item/permissions/requestApproval`. */
|
|
698
|
-
export declare const CodexPermissionProfileSchema: z.ZodObject<{
|
|
699
|
-
fileSystem: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
700
|
-
network: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
701
|
-
}, z.core.$loose>;
|
|
702
|
-
/** Parameters of Codex `item/permissions/requestApproval` (0.171.0). */
|
|
703
|
-
export declare const CodexPermissionsApprovalParamsSchema: z.ZodObject<{
|
|
704
|
-
threadId: z.ZodString;
|
|
705
|
-
turnId: z.ZodString;
|
|
706
|
-
itemId: z.ZodString;
|
|
707
|
-
cwd: z.ZodString;
|
|
708
|
-
permissions: z.ZodObject<{
|
|
709
|
-
fileSystem: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
710
|
-
network: z.ZodOptional<z.ZodNullable<z.ZodJSONSchema>>;
|
|
711
|
-
}, z.core.$loose>;
|
|
712
|
-
startedAtMs: z.ZodNumber;
|
|
713
|
-
reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
714
|
-
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
715
|
-
}, z.core.$loose>;
|
|
716
|
-
/** Parameters of Codex `mcpServer/elicitation/request` across all four `oneOf` modes (0.171.0). */
|
|
717
|
-
export declare const CodexMcpElicitationParamsSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
718
|
-
serverName: z.ZodString;
|
|
719
|
-
threadId: z.ZodString;
|
|
720
|
-
turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
721
|
-
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
722
|
-
message: z.ZodString;
|
|
723
|
-
_meta: z.ZodOptional<z.ZodJSONSchema>;
|
|
724
|
-
mode: z.ZodLiteral<"form">;
|
|
725
|
-
requestedSchema: z.ZodObject<{
|
|
726
|
-
type: z.ZodLiteral<"object">;
|
|
727
|
-
properties: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
|
|
728
|
-
required: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
|
|
729
|
-
$schema: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
730
|
-
}, z.core.$loose>;
|
|
731
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
732
|
-
serverName: z.ZodString;
|
|
733
|
-
threadId: z.ZodString;
|
|
734
|
-
turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
735
|
-
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
736
|
-
message: z.ZodString;
|
|
737
|
-
_meta: z.ZodOptional<z.ZodJSONSchema>;
|
|
738
|
-
mode: z.ZodLiteral<"openai/form">;
|
|
739
|
-
requestedSchema: z.ZodJSONSchema;
|
|
740
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
741
|
-
serverName: z.ZodString;
|
|
742
|
-
threadId: z.ZodString;
|
|
743
|
-
turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
744
|
-
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
745
|
-
message: z.ZodString;
|
|
746
|
-
_meta: z.ZodOptional<z.ZodJSONSchema>;
|
|
747
|
-
mode: z.ZodLiteral<"openaiForm">;
|
|
748
|
-
requestedSchema: z.ZodJSONSchema;
|
|
749
|
-
}, z.core.$loose>, z.ZodObject<{
|
|
750
|
-
serverName: z.ZodString;
|
|
751
|
-
threadId: z.ZodString;
|
|
752
|
-
turnId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
753
|
-
environmentId: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
754
|
-
message: z.ZodString;
|
|
755
|
-
_meta: z.ZodOptional<z.ZodJSONSchema>;
|
|
756
|
-
mode: z.ZodLiteral<"url">;
|
|
757
|
-
elicitationId: z.ZodString;
|
|
758
|
-
url: z.ZodString;
|
|
759
|
-
}, z.core.$loose>], "mode">;
|
|
760
|
-
/** Elicitation request mode discriminated by Codex `mcpServer/elicitation/request`. */
|
|
761
|
-
export type CodexMcpElicitationMode = z.infer<typeof CodexMcpElicitationParamsSchema>['mode'];
|
|
762
|
-
/** Answer payload for `mcpServer/elicitation/request`, matching `McpServerElicitationRequestResponse`. */
|
|
763
|
-
export declare const CodexMcpElicitationAnswerSchema: z.ZodObject<{
|
|
764
|
-
action: z.ZodEnum<{
|
|
765
|
-
accept: "accept";
|
|
766
|
-
cancel: "cancel";
|
|
767
|
-
decline: "decline";
|
|
768
|
-
}>;
|
|
769
|
-
content: z.ZodOptional<z.ZodJSONSchema>;
|
|
770
|
-
_meta: z.ZodOptional<z.ZodJSONSchema>;
|
|
771
|
-
}, z.core.$strict>;
|
|
772
|
-
/** Server requests the driver answers; every other is refused `-32601`. */
|
|
773
|
-
export declare const CODEX_APPROVAL_REQUESTS: Set<string>;
|
|
774
|
-
export declare const CODEX_PERMISSIONS_APPROVAL_REQUEST = "item/permissions/requestApproval";
|
|
775
|
-
export declare const CODEX_INPUT_REQUEST = "item/tool/requestUserInput";
|
|
776
|
-
export declare const CODEX_ELICITATION_REQUEST = "mcpServer/elicitation/request";
|
|
777
|
-
/**
|
|
778
|
-
* The decisions the driver answers an approval with, the same for a command and a file
|
|
779
|
-
* change: `deny` lets the agent continue the turn, `interrupted` interrupts it at once.
|
|
780
|
-
*/
|
|
781
|
-
export declare const CODEX_APPROVAL_DECISION: {
|
|
782
|
-
readonly approve: 'accept';
|
|
783
|
-
readonly approveForSession: 'acceptForSession';
|
|
784
|
-
readonly deny: 'decline';
|
|
785
|
-
readonly interrupted: 'cancel';
|
|
786
|
-
};
|
|
787
644
|
//# sourceMappingURL=protocol.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"protocol.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/protocol.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,mBAAmB,EAAsB,MAAM,kBAAkB,CAAC;AAE3E;;;;;;GAMG;AAEH,wGAAwG;AACxG,qBAAa,kBAAmB,SAAQ,KAAK;IAIzC,QAAQ,CAAC,MAAM,EAAE,MAAM;IAHzB,SAAkB,KAAK,EAAE,CAAC,CAAC,QAAQ,CAAC;IAEpC,YACW,MAAM,EAAE,MAAM,EACvB,KAAK,EAAE,CAAC,CAAC,QAAQ,EACjB,OAAO,CAAC,EAAE,MAAM,EASjB;CACF;AAED,2GAA2G;AAC3G,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EACpB,GAAG,EAAE,OAAO,EACZ,IAAI,GAAE,UAAU,GAAG,c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iCAqDZ,KAAK;iCACL,KAAK;uCACC,KAAK;mCACT,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAxDD,MAAM;;mCAwEW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAiKvD,CAAC;AAEH,sGAAsG;AACtG,MAAM,MAAM,kBAAkB,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC,CAAC;AAEpF,wDAAwD;AACxD,eAAO,MAAM,6BAA6B;;iBAExC,CAAC;AAaH,qGAAqG;AACrG,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;uBA/PF,MAAM;;iCAqDZ,KAAK;iCACL,KAAK;uCACC,KAAK;mCACT,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAxDD,MAAM;;mCAwEW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgM/C,CAAC;AAEX,2HAA2H;AAC3H,wBAAgB,yBAAyB,CACvC,MAAM,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,GAC/C,kBAAkB,CAapB;AAED,wDAAwD;AACxD,eAAO,MAAM,sBAAsB;;;;iBAEjC,CAAC;AAEH,wDAAwD;AACxD,eAAO,MAAM,4BAA4B;;iBAEvC,CAAC;AAEH,2DAA2D;AAC3D,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;2BAvST,MAAM;;mCAwEW,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmOvD,CAAC"}
|
|
@@ -3,7 +3,7 @@ import { type InteractionReply } from '../executor-contract.js';
|
|
|
3
3
|
import { type JsonRpcValue } from '../json-rpc-peer.js';
|
|
4
4
|
import type { CodexTurnState } from './classify.js';
|
|
5
5
|
import type { CodexStartingTurn } from './event-routing.js';
|
|
6
|
-
import { type CodexMcpElicitationMode } from './
|
|
6
|
+
import { type CodexMcpElicitationMode } from './server-requests.js';
|
|
7
7
|
/** Known Codex app-server request methods handled by the driver. */
|
|
8
8
|
export type CodexServerRequestMethod = 'item/commandExecution/requestApproval' | 'item/fileChange/requestApproval' | 'item/permissions/requestApproval' | 'item/tool/requestUserInput' | 'mcpServer/elicitation/request';
|
|
9
9
|
/** Metadata kept with one held Codex approval, permissions, user-input, or MCP elicitation request. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request-answers.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/request-answers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAQL,KAAK,uBAAuB,EAK7B,MAAM,
|
|
1
|
+
{"version":3,"file":"request-answers.d.ts","sourceRoot":"","sources":["../../../src/agent-executor/codex/request-answers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EAExB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,gBAAgB,EAA0B,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAA2C,KAAK,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE9F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAQL,KAAK,uBAAuB,EAK7B,MAAM,mBAAmB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