stitchkit 0.135.1 → 0.136.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +122 -0
- package/README.md +37 -11
- package/dist/agent-executor/acp/v1-session-build.d.ts +51 -0
- package/dist/agent-executor/acp/v1-session-build.d.ts.map +1 -0
- package/dist/agent-executor/acp/v1-session.d.ts +1 -1
- package/dist/agent-executor/acp/v1-session.d.ts.map +1 -1
- package/dist/agent-executor/claude/classify.d.ts +1 -1
- package/dist/agent-executor/claude/classify.d.ts.map +1 -1
- package/dist/agent-executor/claude/events-wire.d.ts +13 -0
- package/dist/agent-executor/claude/events-wire.d.ts.map +1 -0
- package/dist/agent-executor/claude/events.d.ts +1 -11
- package/dist/agent-executor/claude/events.d.ts.map +1 -1
- package/dist/agent-executor/codex/protocol.d.ts +0 -143
- package/dist/agent-executor/codex/protocol.d.ts.map +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts +1 -1
- package/dist/agent-executor/codex/request-answers.d.ts.map +1 -1
- package/dist/agent-executor/codex/server-requests.d.ts +150 -0
- package/dist/agent-executor/codex/server-requests.d.ts.map +1 -0
- package/dist/agent-executor/executor-contract.d.ts.map +1 -1
- package/dist/agent-executor/image-input.d.ts +10 -3
- package/dist/agent-executor/image-input.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-scenarios.d.ts.map +1 -1
- package/dist/agent-executor/testing/replay-transcript.d.ts.map +1 -1
- package/dist/agent-executor/vocabulary.d.ts +80 -0
- package/dist/agent-executor/vocabulary.d.ts.map +1 -1
- package/dist/agent-parts/model.d.ts +94 -0
- package/dist/agent-parts/model.d.ts.map +1 -1
- package/dist/agent-parts/parts.d.ts +176 -0
- package/dist/agent-parts/parts.d.ts.map +1 -1
- package/dist/agent-runtime/browser/browser-control-contract.d.ts +444 -0
- package/dist/agent-runtime/browser/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-schema.d.ts +532 -0
- package/dist/agent-runtime/browser/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/browser/control-view.d.ts.map +1 -1
- package/dist/agent-runtime/event-schema.d.ts +720 -3
- package/dist/agent-runtime/event-schema.d.ts.map +1 -1
- package/dist/agent-runtime/history/run-history-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/deferred-tools.d.ts.map +1 -1
- package/dist/agent-runtime/loop/invocation-payload.d.ts.map +1 -1
- package/dist/agent-runtime/loop/invocation-stream.d.ts +9 -1
- package/dist/agent-runtime/loop/invocation-stream.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts +6 -0
- package/dist/agent-runtime/loop/provider-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts +1 -3
- package/dist/agent-runtime/loop/provider-stream-segments.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-acquisition.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-approval-signature.d.ts +38 -0
- package/dist/agent-runtime/loop/run-approval-signature.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-approval.d.ts +0 -28
- package/dist/agent-runtime/loop/run-approval.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-complete-port.d.ts +24 -0
- package/dist/agent-runtime/loop/run-complete-port.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-complete-stream.d.ts +7 -2
- package/dist/agent-runtime/loop/run-complete-stream.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-complete-types.d.ts +14 -1
- package/dist/agent-runtime/loop/run-complete-types.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-complete.d.ts +2 -2
- package/dist/agent-runtime/loop/run-complete.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-execution-state.d.ts +8 -0
- package/dist/agent-runtime/loop/run-execution-state.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts +6 -1
- package/dist/agent-runtime/loop/run-loop-events.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-model-call.d.ts +44 -0
- package/dist/agent-runtime/loop/run-model-call.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-step.d.ts +25 -28
- package/dist/agent-runtime/loop/run-model-step.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-model-steps.d.ts +6 -0
- package/dist/agent-runtime/loop/run-model-steps.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-model-stream.d.ts +3 -1
- package/dist/agent-runtime/loop/run-model-stream.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts +0 -2
- package/dist/agent-runtime/loop/run-operation-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-step-loop.d.ts +19 -0
- package/dist/agent-runtime/loop/run-step-loop.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-step-port.d.ts +175 -0
- package/dist/agent-runtime/loop/run-step-port.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-stream-parts.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-recorded.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-stream-step-text.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts +2 -1
- package/dist/agent-runtime/loop/run-tool-approval-flow.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-call-input.d.ts +39 -0
- package/dist/agent-runtime/loop/run-tool-call-input.d.ts.map +1 -0
- package/dist/agent-runtime/loop/run-tool-call.d.ts +13 -34
- package/dist/agent-runtime/loop/run-tool-call.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-errors.d.ts +5 -0
- package/dist/agent-runtime/loop/run-tool-errors.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-executor.d.ts +1 -1
- package/dist/agent-runtime/loop/run-tool-executor.d.ts.map +1 -1
- package/dist/agent-runtime/loop/run-tool-slots.d.ts +2 -1
- package/dist/agent-runtime/loop/run-tool-slots.d.ts.map +1 -1
- package/dist/agent-runtime/loop/runtime-state.d.ts.map +1 -1
- package/dist/agent-runtime/loop/runtime.d.ts +0 -5
- package/dist/agent-runtime/loop/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-convert.d.ts +1 -5
- package/dist/agent-runtime/providers/ai-sdk-convert.d.ts.map +1 -1
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts +15 -0
- package/dist/agent-runtime/providers/ai-sdk-normalize.d.ts.map +1 -0
- package/dist/agent-runtime/providers/ai-sdk-tools.d.ts +11 -0
- package/dist/agent-runtime/providers/ai-sdk-tools.d.ts.map +1 -0
- package/dist/agent-runtime/providers/ai-sdk.d.ts +1 -9
- package/dist/agent-runtime/providers/ai-sdk.d.ts.map +1 -1
- package/dist/agent-runtime/providers/anthropic-sse.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-admission.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-audio.d.ts +123 -81
- package/dist/agent-runtime/providers/openrouter-audio.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-catalog-cache.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-catalog-query.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-catalog.d.ts +2 -2
- package/dist/agent-runtime/providers/openrouter-catalog.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-client.d.ts +37 -0
- package/dist/agent-runtime/providers/openrouter-client.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-http.d.ts +26 -6
- package/dist/agent-runtime/providers/openrouter-http.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-media.d.ts +91 -77
- package/dist/agent-runtime/providers/openrouter-media.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-models.d.ts +2 -23
- package/dist/agent-runtime/providers/openrouter-models.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-options.d.ts +2 -0
- package/dist/agent-runtime/providers/openrouter-options.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-request.d.ts +23 -0
- package/dist/agent-runtime/providers/openrouter-request.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-retrieval.d.ts +86 -55
- package/dist/agent-runtime/providers/openrouter-retrieval.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-speech.d.ts +90 -0
- package/dist/agent-runtime/providers/openrouter-speech.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter-spend.d.ts +2 -2
- package/dist/agent-runtime/providers/openrouter-spend.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-stream.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-systemone.d.ts +87 -32
- package/dist/agent-runtime/providers/openrouter-systemone.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-url.d.ts +7 -1
- package/dist/agent-runtime/providers/openrouter-url.d.ts.map +1 -1
- package/dist/agent-runtime/providers/openrouter-wire.d.ts +45 -0
- package/dist/agent-runtime/providers/openrouter-wire.d.ts.map +1 -0
- package/dist/agent-runtime/providers/openrouter.d.ts +1 -3
- package/dist/agent-runtime/providers/openrouter.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-http.d.ts +14 -2
- package/dist/agent-runtime/providers/provider-http.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-json-schema-strip.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-json-schema.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-openai-chat-sse.d.ts.map +1 -1
- package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts +42 -0
- package/dist/agent-runtime/providers/provider-openai-chat-state.d.ts.map +1 -0
- package/dist/agent-runtime/providers/provider-usage.d.ts +9 -0
- package/dist/agent-runtime/providers/provider-usage.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-internals.d.ts +1 -3
- package/dist/agent-runtime/runtime-internals.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts +9 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap-args.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts +6 -0
- package/dist/agent-runtime/sandbox/sandbox-bubblewrap.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-contract.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-process-linux.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts +5 -1
- package/dist/agent-runtime/sandbox/sandbox-process-spec.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox/sandbox-process-wrapper.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-json-projection.d.ts +29 -0
- package/dist/agent-runtime/schemas-json-projection.d.ts.map +1 -0
- package/dist/agent-runtime/schemas-message.d.ts +88 -0
- package/dist/agent-runtime/schemas-message.d.ts.map +1 -1
- package/dist/agent-runtime/schemas-run.d.ts +88 -0
- package/dist/agent-runtime/schemas-run.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-messages.d.ts.map +1 -1
- package/dist/agent-runtime/stores/branch-observations.d.ts +42 -42
- package/dist/agent-runtime/stores/branch-replay.d.ts +264 -0
- package/dist/agent-runtime/stores/branch-replay.d.ts.map +1 -1
- package/dist/agent-runtime/stores/conversations.d.ts +88 -0
- package/dist/agent-runtime/stores/conversations.d.ts.map +1 -1
- package/dist/agent-runtime/stores/sql-rows.d.ts +74 -10
- package/dist/agent-runtime/stores/sql-rows.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-driver-contract.d.ts +616 -0
- package/dist/agent-runtime/stores/store-driver-contract.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store-events.d.ts +1056 -0
- package/dist/agent-runtime/stores/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/stores/store.d.ts +1232 -0
- package/dist/agent-runtime/stores/store.d.ts.map +1 -1
- package/dist/agent-runtime/terminal-commit.d.ts +74 -10
- package/dist/agent-runtime/terminal-commit.d.ts.map +1 -1
- package/dist/agent-runtime/testing/fault-bench.d.ts +5 -1
- package/dist/agent-runtime/testing/fault-bench.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts +158 -30
- package/dist/agent-runtime/testing/store-conformance-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/testing/store-conformance-support.d.ts +79 -15
- package/dist/agent-runtime/testing/store-conformance-support.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/notification-delivery.d.ts.map +1 -1
- package/dist/browser/client-executors.d.ts.map +1 -1
- package/dist/browser/client-url.d.ts.map +1 -1
- package/dist/contract/define.d.ts +3 -7
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/normalize.d.ts +17 -5
- package/dist/contract/normalize.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/acp.js +9 -6
- package/dist/entrypoints/agent-executor/claude-sdk.js +26 -25
- package/dist/entrypoints/agent-executor/claude.js +13 -12
- package/dist/entrypoints/agent-executor/codex.d.ts +2 -1
- package/dist/entrypoints/agent-executor/codex.d.ts.map +1 -1
- package/dist/entrypoints/agent-executor/codex.js +135 -40
- package/dist/entrypoints/agent-executor/testing/claude-sdk.js +5 -4
- package/dist/entrypoints/agent-executor/testing.js +23 -18
- package/dist/entrypoints/agent-executor.js +8 -8
- package/dist/entrypoints/agent-runtime/ai-sdk.d.ts +2 -1
- package/dist/entrypoints/agent-runtime/ai-sdk.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/ai-sdk.js +34 -30
- package/dist/entrypoints/agent-runtime/anthropic.js +15 -12
- package/dist/entrypoints/agent-runtime/browser.js +13 -8
- package/dist/entrypoints/agent-runtime/harness.js +26 -27
- package/dist/entrypoints/agent-runtime/openai.js +7 -7
- package/dist/entrypoints/agent-runtime/openrouter.d.ts +7 -5
- package/dist/entrypoints/agent-runtime/openrouter.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/openrouter.js +1097 -856
- package/dist/entrypoints/agent-runtime/postgres.js +9 -9
- package/dist/entrypoints/agent-runtime/realtime.js +9 -8
- package/dist/entrypoints/agent-runtime/sandbox.js +167 -139
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +10 -10
- package/dist/entrypoints/agent-runtime/sqlite/node.js +10 -10
- package/dist/entrypoints/agent-runtime/testing.js +9 -9
- package/dist/entrypoints/agent-runtime.js +261 -375
- package/dist/entrypoints/application/diagnostic-journal.js +14 -10
- package/dist/entrypoints/application.js +18 -6
- package/dist/entrypoints/cli.js +36 -15
- package/dist/entrypoints/contract.js +12 -10
- package/dist/entrypoints/geo.js +1 -1
- package/dist/entrypoints/handler.js +5 -6
- package/dist/entrypoints/http.d.ts +2 -0
- package/dist/entrypoints/http.d.ts.map +1 -1
- package/dist/entrypoints/http.js +16 -4
- package/dist/entrypoints/index.js +26 -35
- package/dist/entrypoints/live.js +3 -3
- package/dist/entrypoints/node.js +7 -7
- package/dist/entrypoints/observability.js +9 -7
- package/dist/entrypoints/process.js +3 -3
- package/dist/entrypoints/remote.js +5 -5
- package/dist/entrypoints/server.js +29 -16
- package/dist/entrypoints/telegram/grammy.d.ts +1 -1
- package/dist/entrypoints/telegram/grammy.d.ts.map +1 -1
- package/dist/entrypoints/telegram/grammy.js +39 -5
- package/dist/entrypoints/telegram/screens.js +3 -0
- package/dist/entrypoints/telegram.d.ts +1 -1
- package/dist/entrypoints/telegram.d.ts.map +1 -1
- package/dist/entrypoints/telegram.js +19 -6
- package/dist/entrypoints/testing.js +10 -11
- package/dist/entrypoints/tools/agent.js +9 -10
- package/dist/entrypoints/tools/connections.js +27 -57
- package/dist/entrypoints/tools/contract.js +4 -4
- package/dist/entrypoints/tools/invoker.js +7 -8
- package/dist/entrypoints/tools/mcp.js +9 -10
- package/dist/entrypoints/tools/toolkit.js +11 -12
- package/dist/entrypoints/tools.js +24 -22
- package/dist/entrypoints/tracking/contract.js +1 -1
- package/dist/entrypoints/tracking/performance.js +1 -1
- package/dist/entrypoints/tracking.js +1 -1
- package/dist/{index-3czc3ykr.js → index-08a3qfr8.js} +1 -1
- package/dist/index-1psbyyhj.js +21 -0
- package/dist/{index-pdcbjd6a.js → index-1yky29qg.js} +6 -3
- package/dist/{index-b4c9dpzm.js → index-252den5a.js} +10 -11
- package/dist/{index-yhwx4fwk.js → index-26v8hjqm.js} +4 -4
- package/dist/{index-xtby8rj3.js → index-28kbdn63.js} +5 -47
- package/dist/{index-c24bj2r1.js → index-2wm9b9vs.js} +5 -5
- package/dist/{index-ht71v1ag.js → index-32ew02z1.js} +60 -45
- package/dist/{index-dm84tsd5.js → index-3kb8dw48.js} +1 -1
- package/dist/index-3tb82xr7.js +11 -0
- package/dist/{index-nr4fhfn4.js → index-4p2zx593.js} +2 -0
- package/dist/{index-grhhsrd5.js → index-4q9tmzea.js} +5 -4
- package/dist/{index-mcv7b2n0.js → index-63ctzjp4.js} +497 -495
- package/dist/{index-y0a4gt1s.js → index-65p8v81y.js} +3 -2
- package/dist/{index-z72vazf5.js → index-6y3eae97.js} +27 -83
- package/dist/{index-y0mwkgkf.js → index-8cnfgwg8.js} +1212 -1139
- package/dist/{index-mkmep637.js → index-9m1m92rg.js} +1 -1
- package/dist/{index-5awtbyns.js → index-9vj869rx.js} +1 -1
- package/dist/index-a1rjr381.js +114 -0
- package/dist/{index-6kwdfb9m.js → index-akesakvj.js} +23 -4
- package/dist/{index-5q0qpw3v.js → index-aqm7e864.js} +23 -8
- package/dist/{index-d4at0q09.js → index-b9mj31q7.js} +90 -88
- package/dist/{index-baba8ehy.js → index-bjrcbcn2.js} +2 -2
- package/dist/{index-fsw9wxk9.js → index-c9j8441q.js} +1 -103
- package/dist/{index-wdb5jhas.js → index-d1pdv8qc.js} +1 -1
- package/dist/{index-v0j22shs.js → index-d5mhgx72.js} +16 -11
- package/dist/{index-73wq9abg.js → index-df5xr2f9.js} +13 -59
- package/dist/{index-n9358ydy.js → index-dm50x3by.js} +1 -1
- package/dist/{index-zyyerdny.js → index-dmrx8xma.js} +3 -0
- package/dist/{index-78da4g74.js → index-dwq6a6sq.js} +17 -13
- package/dist/{index-9be3tf6r.js → index-e413q2cj.js} +49 -22
- package/dist/{index-57sbckhv.js → index-e4w0sfm1.js} +2 -2
- package/dist/{index-g4gstmp1.js → index-ednf2cxs.js} +1 -1
- package/dist/{index-84tp547a.js → index-edpkm3k7.js} +29 -97
- package/dist/{index-gs0jw0hy.js → index-efbzm2se.js} +3 -3
- package/dist/{index-asnd4h2k.js → index-f0dzyskg.js} +27 -4
- package/dist/{index-xbb8ysmq.js → index-fatke81t.js} +2 -2
- package/dist/{index-d3s070eh.js → index-gj4wdts6.js} +1 -1
- package/dist/{index-6nzzj7qr.js → index-gq35s3bm.js} +1 -1
- package/dist/index-gvgtmt7a.js +102 -0
- package/dist/{index-pd9e8rz4.js → index-gvv7y0s4.js} +1 -1
- package/dist/{index-m2b49tvc.js → index-h08xqfw9.js} +20 -21
- package/dist/{index-gk6dq9ay.js → index-ha1tv70k.js} +3 -26
- package/dist/{index-vebzvse6.js → index-jy907kcs.js} +24 -1
- package/dist/{index-q86qnzzf.js → index-k5azb3v3.js} +8 -25
- package/dist/{index-qcy8et93.js → index-kaq9nb7h.js} +6 -6
- package/dist/{index-vse7x1qt.js → index-knqye3gv.js} +1 -1
- package/dist/{index-tav72wz5.js → index-ks4rhtcc.js} +5 -0
- package/dist/{index-bvpevwt6.js → index-mtpcax6d.js} +210 -205
- package/dist/{index-7qza24g1.js → index-px9r6wv1.js} +1 -1
- package/dist/{index-x6sp5vpa.js → index-q4tr9vnf.js} +1 -1
- package/dist/{index-hce3hbdg.js → index-qj0sq69b.js} +6 -2
- package/dist/{index-de7b0kvz.js → index-r9w7wfgn.js} +2 -2
- package/dist/{index-8vzh5wpv.js → index-rw1caff2.js} +14 -26
- package/dist/index-s8af9jqw.js +6 -0
- package/dist/{index-bgj9hbm3.js → index-sdppfbrh.js} +30 -16
- package/dist/{index-aacwkve4.js → index-sjq4akrx.js} +3 -5
- package/dist/{index-fec05c9k.js → index-ta0e2daw.js} +9 -7
- package/dist/{index-5dxgx3yj.js → index-tcv71frn.js} +1 -1
- package/dist/{index-1zy31r3b.js → index-v92djygb.js} +1 -1
- package/dist/{index-c0yym4a0.js → index-w7e402wx.js} +11 -105
- package/dist/{index-9f60gnfn.js → index-xaa3603f.js} +4 -11
- package/dist/index-xrbrvn15.js +147 -0
- package/dist/{index-ac3rfec5.js → index-y6wzzk2e.js} +21 -1
- package/dist/{index-3d2c45jn.js → index-yjx5jna7.js} +2 -2
- package/dist/{index-j3r7r1mh.js → index-yv7d6tav.js} +1 -1
- package/dist/{index-wsv11dhg.js → index-zagc12j1.js} +5 -5
- package/dist/{index-npfdymav.js → index-zqc64g69.js} +3 -3
- package/dist/{index-rkphknhx.js → index-zthekmrt.js} +2 -2
- package/dist/internal/json-stringify.d.ts +37 -0
- package/dist/internal/json-stringify.d.ts.map +1 -0
- package/dist/internal/loopback-host.d.ts +8 -0
- package/dist/internal/loopback-host.d.ts.map +1 -0
- package/dist/internal/own-member.d.ts +7 -0
- package/dist/internal/own-member.d.ts.map +1 -0
- package/dist/internal/request.d.ts +17 -8
- package/dist/internal/request.d.ts.map +1 -1
- package/dist/internal/secret-shapes.d.ts +33 -4
- package/dist/internal/secret-shapes.d.ts.map +1 -1
- package/dist/json-schema/dialect.d.ts.map +1 -1
- package/dist/json-schema/keywords.d.ts +25 -6
- package/dist/json-schema/keywords.d.ts.map +1 -1
- package/dist/json-schema/string-format.d.ts.map +1 -1
- package/dist/live/events.d.ts.map +1 -1
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/live/watch-delta.d.ts.map +1 -1
- package/dist/observability/context.d.ts +4 -3
- package/dist/observability/context.d.ts.map +1 -1
- package/dist/observability/sanitize.d.ts.map +1 -1
- package/dist/observability/secret-values.d.ts +0 -9
- package/dist/observability/secret-values.d.ts.map +1 -1
- package/dist/server/context.d.ts +3 -2
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/error-hook.d.ts +4 -3
- package/dist/server/error-hook.d.ts.map +1 -1
- package/dist/server/event-bus.d.ts.map +1 -1
- package/dist/server/file.d.ts +11 -3
- package/dist/server/file.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts +2 -2
- package/dist/server/handler-state.d.ts.map +1 -1
- package/dist/server/middleware/jwt.d.ts +12 -1
- package/dist/server/middleware/jwt.d.ts.map +1 -1
- package/dist/server/middleware/trust-fence.d.ts +4 -0
- package/dist/server/middleware/trust-fence.d.ts.map +1 -1
- package/dist/server/multipart.d.ts +2 -3
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/server/raw.d.ts.map +1 -1
- package/dist/server/request-body.d.ts +12 -1
- package/dist/server/request-body.d.ts.map +1 -1
- package/dist/server/request-completion.d.ts.map +1 -1
- package/dist/server/types.d.ts +14 -9
- package/dist/server/types.d.ts.map +1 -1
- package/dist/telegram/crypto.d.ts.map +1 -1
- package/dist/telegram/init-data.d.ts +4 -4
- package/dist/telegram/init-data.d.ts.map +1 -1
- package/dist/telegram/outbound-cost.d.ts.map +1 -1
- package/dist/telegram/screens/test-chat.d.ts.map +1 -1
- package/dist/telegram/widget-api.d.ts +85 -13
- package/dist/telegram/widget-api.d.ts.map +1 -1
- package/dist/telegram/widget.d.ts +46 -2
- package/dist/telegram/widget.d.ts.map +1 -1
- package/dist/tools/cli/args-classify.d.ts +4 -74
- package/dist/tools/cli/args-classify.d.ts.map +1 -1
- package/dist/tools/cli/args-framework.d.ts +79 -0
- package/dist/tools/cli/args-framework.d.ts.map +1 -0
- package/dist/tools/cli/args-scan.d.ts.map +1 -1
- package/dist/tools/cli/args-tokens.d.ts.map +1 -1
- package/dist/tools/cli/checkpoint.d.ts +5 -0
- package/dist/tools/cli/checkpoint.d.ts.map +1 -1
- package/dist/tools/cli/stream.d.ts.map +1 -1
- package/dist/tools/connections/foreign-schema-join.d.ts.map +1 -1
- package/dist/tools/connections/openapi.d.ts.map +1 -1
- package/dist/tools/connections/runtime.d.ts.map +1 -1
- package/dist/tools/execute-handler.d.ts +24 -0
- package/dist/tools/execute-handler.d.ts.map +1 -0
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/mcp/round.d.ts.map +1 -1
- package/dist/tools/schema/coerce.d.ts.map +1 -1
- package/dist/tools/schema/flatten.d.ts.map +1 -1
- package/dist/tools/schema/inline-references.d.ts.map +1 -1
- package/dist/tools/schema/nesting-limit.d.ts.map +1 -1
- package/dist/tools/schema/presentation.d.ts.map +1 -1
- package/dist/tracking/privacy.d.ts.map +1 -1
- package/llms/agent-runtime-openrouter.txt +10 -9
- package/llms/agent-runtime-sandbox.txt +50 -11
- package/llms/agent-runtime-testing.txt +1 -1
- package/llms/agent-runtime.2.txt +9 -6
- package/llms/agent-runtime.3.txt +2 -2
- package/llms/agent-runtime.4.txt +11 -5
- package/llms/agent-runtime.5.txt +2 -2
- package/llms/agent-runtime.txt +297 -36
- package/llms/application.2.txt +6 -3
- package/llms/application.3.txt +2 -1
- package/llms/application.txt +7 -2
- package/llms/http.txt +1 -1
- package/llms/live.txt +3 -1
- package/llms/observability.txt +16 -9
- package/llms/server.2.txt +13 -8
- package/llms/server.4.txt +23 -11
- package/llms/server.5.txt +5 -5
- package/llms/server.txt +54 -1
- package/llms/spend.txt +1 -0
- package/llms/stitchkit.2.txt +4 -2
- package/llms/stitchkit.txt +113 -93
- package/llms/telegram-grammy.txt +3 -2
- package/llms/telegram.2.txt +3 -1
- package/llms/telegram.txt +35 -10
- package/llms/upgrading-0.128.0-0.129.0.txt +175 -0
- package/llms/{upgrading-0.128.0-0.135.0.txt → upgrading-0.130.0-0.136.0.txt} +353 -169
- package/llms/upgrading.txt +2 -1
- package/llms-full.txt +1021 -223
- package/llms.txt +14 -13
- package/package.json +6 -6
- package/dist/agent-runtime/loop/deferred-tools-internal.d.ts +0 -19
- package/dist/agent-runtime/loop/deferred-tools-internal.d.ts.map +0 -1
- package/dist/agent-runtime/loop/run-complete-retry.d.ts +0 -24
- package/dist/agent-runtime/loop/run-complete-retry.d.ts.map +0 -1
- package/dist/agent-runtime/loop/run-model-attempts.d.ts +0 -6
- package/dist/agent-runtime/loop/run-model-attempts.d.ts.map +0 -1
- package/dist/index-sznqf8fx.js +0 -20
- /package/dist/{index-fthw8dwa.js → index-4gbybjg6.js} +0 -0
package/llms/telegram.txt
CHANGED
|
@@ -403,10 +403,10 @@ local Bot API server, and it uses no proxy: where the network needs one, keep `f
|
|
|
403
403
|
## Widgets
|
|
404
404
|
|
|
405
405
|
A widget (Bot API 10.4) is HTML that the Telegram app runs and draws inside a message, with data
|
|
406
|
-
of its own the bot changes and queries it sends to the bot.
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
406
|
+
of its own the bot changes and queries it sends to the bot. `telegramWidgetApi` takes the client
|
|
407
|
+
the bot already has and calls the five widget methods through its `api.raw`, so the client's
|
|
408
|
+
transformers — the outbound budget among them — run every call and no second client, with a
|
|
409
|
+
second limiter, is built for them:
|
|
410
410
|
|
|
411
411
|
```ts
|
|
412
412
|
import { telegramOutboundBudget } from 'stitchkit/telegram'
|
|
@@ -426,8 +426,10 @@ await widgets.editMessageWidgetData(
|
|
|
426
426
|
await widgets.answerWidgetQuery({ widget_query_id: query.id, data: answer }, { signal })
|
|
427
427
|
```
|
|
428
428
|
|
|
429
|
-
The parameters are the Bot API's, by their Bot API names, so the call reads as the grammY call
|
|
430
|
-
|
|
429
|
+
The parameters are the Bot API's, by their Bot API names, so the call reads as the grammY call.
|
|
430
|
+
Their types are written in this package rather than taken from grammY: the supported range starts at
|
|
431
|
+
grammY 1.46, which types no widget method (1.48 types them all), and a type test holds each
|
|
432
|
+
parameter type to the installed grammY's own field for field. A field is sent when it is not `undefined`: `chat_data: ''`
|
|
431
433
|
reaches Telegram and removes the data, an omitted field keeps it. An edit names `chat_id` with
|
|
432
434
|
`message_id`, or `inline_message_id`, and changes `chat_data`, `public_data` or both.
|
|
433
435
|
|
|
@@ -454,15 +456,38 @@ reaches Telegram and removes the data, an omitted field keeps it. An edit names
|
|
|
454
456
|
returns — `true` where a message was due, as a grammY webhook reply gives — is an error with the
|
|
455
457
|
parse failure as its `cause`: the request was sent and its outcome is unknown.
|
|
456
458
|
- **Queries are answered at intake.** `widget_query` must be in the webhook's or polling's
|
|
457
|
-
`allowed_updates`; grammY's `Update` type does not name it
|
|
459
|
+
`allowed_updates`; grammY 1.46's `Update` type does not name it, so read
|
|
458
460
|
`update.widget_query` with `parseTelegramWidgetQuery`. It returns `{ query }`, or `{ id, error }`
|
|
459
461
|
for a query that does not parse — an unknown `type` or data outside 1–64 bytes — whose id is
|
|
460
462
|
enough to answer it with a refusal rather than leave the widget waiting, or `undefined` without
|
|
461
463
|
an id. Telegram's message, chat and query objects are parsed loosely: fields it adds later pass
|
|
462
464
|
through.
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
465
|
+
|
|
466
|
+
### Shared widgets
|
|
467
|
+
|
|
468
|
+
A shared widget is one widget shown by many messages with one `public_data`. `sendWidget` with
|
|
469
|
+
`is_shared: true` creates it, and the message it returns carries its id in `widget.id`, typed as a
|
|
470
|
+
`string` — an answer without one is an error whose outcome is unknown. `sendSharedWidget` sends the same widget to
|
|
471
|
+
another chat; `editSharedWidgetData` changes the public data of every message with it at once:
|
|
472
|
+
|
|
473
|
+
```ts
|
|
474
|
+
const first = await widgets.sendWidget({ chat_id, html, public_data: board, is_shared: true })
|
|
475
|
+
const widget_id = first.widget.id
|
|
476
|
+
await widgets.sendSharedWidget({ chat_id: other, widget_id, chat_data: seat })
|
|
477
|
+
await widgets.editSharedWidgetData({ widget_id, public_data: next, cache_time: 10 })
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
- **A shared send costs one message; a shared data edit costs none.** `sendSharedWidget` waits for
|
|
481
|
+
the token's schedule like any send. `editSharedWidgetData` changes no message, so it waits for no
|
|
482
|
+
slot; Telegram limits it to one edit per second per widget, which is the caller's to keep.
|
|
483
|
+
`public_data: ''` removes the data; `cache_time` (5–3600 s, 30 by default) is how long an app may
|
|
484
|
+
keep the old data.
|
|
485
|
+
- **A forwarded shared widget asks through `shared_widget_query`.** Add it to `allowed_updates` and
|
|
486
|
+
read it with `parseTelegramSharedWidgetQuery`: `{ query }` with the `widget_id`, no chat and no
|
|
487
|
+
message, `{ id, error }` for one that does not parse, or `undefined` without an id. Answer it with
|
|
488
|
+
`answerWidgetQuery` like any other query. A query from a shared widget in a message the bot sent
|
|
489
|
+
arrives as an ordinary `widget_query` with `widget_id` set.
|
|
490
|
+
- In production Telegram sends widgets to private chats only, and their content is protected.
|
|
466
491
|
|
|
467
492
|
The installed
|
|
468
493
|
[`telegram-widget-api.mjs`](../../packages/core/scripts/consumer-lane/fixtures/minimal/src/telegram-widget-api.mjs)
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Upgrading 0.128.0 → 0.129.0 — stitchkit docs slice
|
|
2
|
+
|
|
3
|
+
> Generated from the `docs/` tree by `bun run gen:llms`. The index of all slices is
|
|
4
|
+
> `llms.txt` in this package.
|
|
5
|
+
|
|
6
|
+
Contains: Guide: Upgrading, 0.128.0 → 0.129.0 (docs/guide/upgrading.md)
|
|
7
|
+
|
|
8
|
+
==============================================================================
|
|
9
|
+
# Guide: Upgrading, 0.128.0 → 0.129.0 (docs/guide/upgrading.md)
|
|
10
|
+
==============================================================================
|
|
11
|
+
|
|
12
|
+
## Released migration: 0.129.0
|
|
13
|
+
|
|
14
|
+
### codex-plan-window-keys
|
|
15
|
+
|
|
16
|
+
**Who must act:** every caller of `codexPlanWindows` or `createCodexDriver` (`status()`) from
|
|
17
|
+
`stitchkit/agent-executor/codex` that matches plan window names against `'primary'` or
|
|
18
|
+
`'secondary'`.
|
|
19
|
+
|
|
20
|
+
`codexPlanWindows` now unfolds the full `account/rateLimits/read` response envelope (including
|
|
21
|
+
per-model `rateLimitsByLimitId` buckets) as well as bare `RateLimitSnapshot` objects, keying each
|
|
22
|
+
window as `<limitId|limit>:<windowDurationMins>m` (falling back to `<limitId|limit>:<slot>` when
|
|
23
|
+
duration is absent, or `<limitId|limit>:<windowDurationMins>m:<slot>` when both slots share a
|
|
24
|
+
duration) and populating optional `windowDurationMins` and `label` on `PlanWindow`:
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
// before
|
|
28
|
+
const fiveHour = status.planLimits?.windows.find((w) => w.name === 'primary')
|
|
29
|
+
const weekly = status.planLimits?.windows.find((w) => w.name === 'secondary')
|
|
30
|
+
|
|
31
|
+
// after
|
|
32
|
+
const fiveHour = status.planLimits?.windows.find(
|
|
33
|
+
(w) => w.windowDurationMins === 300 || w.name === 'limit:primary',
|
|
34
|
+
)
|
|
35
|
+
const weekly = status.planLimits?.windows.find(
|
|
36
|
+
(w) => w.windowDurationMins === 10080 || w.name === 'limit:secondary',
|
|
37
|
+
)
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Released migration: 0.128.0
|
|
41
|
+
|
|
42
|
+
### invocation-payload-lifecycle
|
|
43
|
+
|
|
44
|
+
**Who must act:** every caller of `createModelInvocationLedger` from `stitchkit/agent-runtime`
|
|
45
|
+
that reads `readPayload`, reads `sent.artifactId` on `provider/request` or top-level `artifactId`
|
|
46
|
+
on `provider/response` (`ModelInvocationRecord`), passes `authorize` to `ModelInvocationConfig`,
|
|
47
|
+
or relies on `maxPayloadBytes` aborting the provider call.
|
|
48
|
+
|
|
49
|
+
1. **`readPayload` returns a discriminated status:** encrypted payloads redacted by
|
|
50
|
+
`purgePayloads` / `store.purgeExpiredPayloads` stay readable as `{ status: 'expired', expiredAt }`
|
|
51
|
+
while live payloads return `{ status: 'available', payload }`:
|
|
52
|
+
|
|
53
|
+
```ts
|
|
54
|
+
// before
|
|
55
|
+
const payload = await ledger.readPayload({ conversationId, artifactId }, ctx)
|
|
56
|
+
console.log(payload.payload)
|
|
57
|
+
|
|
58
|
+
// after
|
|
59
|
+
const result = await ledger.readPayload({ conversationId, artifactId }, ctx)
|
|
60
|
+
if (result.status === 'available') {
|
|
61
|
+
console.log(result.payload)
|
|
62
|
+
} else {
|
|
63
|
+
console.log('expired at', result.expiredAt)
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
2. **`sent.artifactId` (`provider/request`) and top-level `artifactId` (`provider/response`) are optional when oversized:** exceeding
|
|
68
|
+
`maxPayloadBytes` no longer aborts or prevents the provider call. Instead, the ledger omits the
|
|
69
|
+
encrypted body, records `payloadOmitted: 'max-payload-bytes'` (with `artifactId` absent and
|
|
70
|
+
`payloadSha256` preserved), and reports `InvocationPayloadTooLargeError` via `complete().receiptError`:
|
|
71
|
+
|
|
72
|
+
```ts
|
|
73
|
+
// before
|
|
74
|
+
const id: string = record.sent.artifactId
|
|
75
|
+
|
|
76
|
+
// after
|
|
77
|
+
if (record.sent.artifactId !== undefined) {
|
|
78
|
+
await ledger.readPayload({ conversationId, artifactId: record.sent.artifactId }, ctx)
|
|
79
|
+
} else if (record.sent.payloadOmitted === 'max-payload-bytes') {
|
|
80
|
+
// body was intentionally omitted past maxPayloadBytes
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
3. **`ModelInvocationConfig.authorize` handles `'purge-payloads'`:** if your `authorize` callback
|
|
85
|
+
switches exhaustively on `input.action`, handle the new `'purge-payloads'` variant alongside
|
|
86
|
+
`'complete'`, `'agent'`, `'read'`, and `'read-payload'` (single-argument `input: ModelInvocationAuthorizationInput` carrying `input.context`):
|
|
87
|
+
|
|
88
|
+
```ts
|
|
89
|
+
authorize: (input) => {
|
|
90
|
+
switch (input.action) {
|
|
91
|
+
case 'complete':
|
|
92
|
+
case 'agent':
|
|
93
|
+
case 'read':
|
|
94
|
+
case 'read-payload':
|
|
95
|
+
case 'purge-payloads':
|
|
96
|
+
return allow(input.context, input)
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### cli-option-projections-error-field
|
|
102
|
+
|
|
103
|
+
**Who must act:** every caller of `extractCliGlobalOptions` or `scanCliInvocation` from
|
|
104
|
+
`stitchkit/cli` that caught a thrown `CliArgumentError` on call or on `.argv` access (→ ADR 0327).
|
|
105
|
+
|
|
106
|
+
Both projections now return malformed CLI syntax on an explicit `error?: CliArgumentError` field
|
|
107
|
+
with fail-closed empty routing fields (`argv: []` on `extractCliGlobalOptions`; `command: undefined`
|
|
108
|
+
and `commandTokens: []` on `scanCliInvocation`) instead of throwing on call or via a getter on `.argv`:
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
// before
|
|
112
|
+
let parsed
|
|
113
|
+
try {
|
|
114
|
+
parsed = extractCliGlobalOptions(argv, globals)
|
|
115
|
+
void parsed.argv
|
|
116
|
+
} catch (err) {
|
|
117
|
+
if (err instanceof CliArgumentError) {
|
|
118
|
+
parsed = { globals: {}, argv: [] }
|
|
119
|
+
} else {
|
|
120
|
+
throw err
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// after
|
|
125
|
+
const parsed = extractCliGlobalOptions(argv, globals)
|
|
126
|
+
if (parsed.error) {
|
|
127
|
+
// handle parsed.error, or pass raw argv to createCli(...) for exit-code-2 reporting
|
|
128
|
+
}
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### declaration-single-version
|
|
132
|
+
|
|
133
|
+
**Who must act:** every repository whose `project.json` is validated by `stitchkit/declaration`
|
|
134
|
+
and still carries `identity.version`, or whose server/CLI code reads `declaration.identity.version`.
|
|
135
|
+
|
|
136
|
+
The root `package.json` is the single source of truth for the repository version (whether SemVer or
|
|
137
|
+
CalVer). `ProjectIdentitySchema` no longer accepts `identity.version`:
|
|
138
|
+
|
|
139
|
+
```jsonc
|
|
140
|
+
// before (project.json)
|
|
141
|
+
{
|
|
142
|
+
"identity": {
|
|
143
|
+
"slug": "my-app",
|
|
144
|
+
"name": "My App",
|
|
145
|
+
"version": "0.1.0",
|
|
146
|
+
"description": { "en": "My App." }
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// after (project.json)
|
|
151
|
+
{
|
|
152
|
+
"identity": {
|
|
153
|
+
"slug": "my-app",
|
|
154
|
+
"name": "My App",
|
|
155
|
+
"description": { "en": "My App." }
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
Read your application version from the root `package.json` for a single-version application — or
|
|
161
|
+
from the package's own `package.json` if that package is released independently — instead of
|
|
162
|
+
`identity.version` (for example, in OpenAPI `info.version`, MCP `serverInfo.version`, and
|
|
163
|
+
`createCli({ version })`).
|
|
164
|
+
|
|
165
|
+
### read-only-surface-inspection
|
|
166
|
+
|
|
167
|
+
**Who must act:** optional — hosts and test suites that currently mount a tool surface with
|
|
168
|
+
`access: { open: 'local-operator' }` solely for read-only surface inspection.
|
|
169
|
+
|
|
170
|
+
Pass `access: { inspect: true }` to `mountAgent`, `mountMcp`, `buildMcpServer`, `createToolInvoker`,
|
|
171
|
+
`createCli`, `createCliInvoker`, or `createDeferredAgentToolSurface().mount` whenever a caller only
|
|
172
|
+
needs catalogs, schemas, `--help`, `--schema`, or `commands`. Every tool execution fails closed with
|
|
173
|
+
`FORBIDDEN` before extensions, hooks, durability, multi-round resolvers, or auth run. Keep
|
|
174
|
+
`access: { gate }` for authenticated execution surfaces and `access: { open: 'local-operator' }` for
|
|
175
|
+
tests or local tools that genuinely execute handlers.
|