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
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
setPostgresTransactionIsolation,
|
|
12
12
|
runPostgresTransaction,
|
|
13
13
|
createAgentRuntimeStore2
|
|
14
|
-
} from "../../index-
|
|
14
|
+
} from "../../index-rg08syp1.js";
|
|
15
15
|
import"../../index-qcy8et93.js";
|
|
16
16
|
import"../../index-brhhaygm.js";
|
|
17
17
|
import"../../index-64t6pheq.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
scanSqlRecoverable,
|
|
27
27
|
listSqlConversations,
|
|
28
28
|
pageSqlConversationMessages
|
|
29
|
-
} from "../../index-
|
|
29
|
+
} from "../../index-hberxns4.js";
|
|
30
30
|
import"../../index-1zy31r3b.js";
|
|
31
31
|
import"../../index-werjqesf.js";
|
|
32
32
|
import"../../index-6kec3b14.js";
|
|
@@ -4,20 +4,20 @@ import"../../index-814xpr6d.js";
|
|
|
4
4
|
import"../../index-tav72wz5.js";
|
|
5
5
|
import"../../index-j3r7r1mh.js";
|
|
6
6
|
import"../../index-pd9e8rz4.js";
|
|
7
|
-
import"../../index-
|
|
8
|
-
import"../../index-
|
|
7
|
+
import"../../index-1en7k3q5.js";
|
|
8
|
+
import"../../index-kzsetgh9.js";
|
|
9
9
|
import {
|
|
10
10
|
agentControlRealtimeContract2
|
|
11
|
-
} from "../../index-
|
|
11
|
+
} from "../../index-hpzhz1vm.js";
|
|
12
12
|
import"../../index-7an2fs5h.js";
|
|
13
13
|
import {
|
|
14
14
|
reportAgentControlError,
|
|
15
15
|
createAgentHarnessControlServer2
|
|
16
|
-
} from "../../index-
|
|
16
|
+
} from "../../index-36mtj8xm.js";
|
|
17
17
|
import {
|
|
18
18
|
bindRealtimeServer2
|
|
19
19
|
} from "../../index-y68gavb5.js";
|
|
20
|
-
import"../../index-
|
|
20
|
+
import"../../index-jperyn0c.js";
|
|
21
21
|
import {
|
|
22
22
|
assertPositiveSafeInteger
|
|
23
23
|
} from "../../index-gr0kxymw.js";
|
|
@@ -24,6 +24,9 @@ import"../../index-jwtmw39p.js";
|
|
|
24
24
|
import {
|
|
25
25
|
runNativeCommand2
|
|
26
26
|
} from "../../index-0sxj3y45.js";
|
|
27
|
+
import {
|
|
28
|
+
isLoopbackHostname
|
|
29
|
+
} from "../../index-s8af9jqw.js";
|
|
27
30
|
import {
|
|
28
31
|
bindUnixSocket2
|
|
29
32
|
} from "../../index-kp1j7cc8.js";
|
|
@@ -54,7 +57,10 @@ var SandboxNetworkPolicySchema = z.union([
|
|
|
54
57
|
origin: z.url().refine((value) => {
|
|
55
58
|
const u = new URL(value);
|
|
56
59
|
return ["http:", "https:"].includes(u.protocol) && !u.username && !u.password && u.pathname === "/" && !u.search && !u.hash;
|
|
57
|
-
}, "Expected an HTTP origin")
|
|
60
|
+
}, "Expected an HTTP origin").refine((value) => {
|
|
61
|
+
const u = new URL(value);
|
|
62
|
+
return u.protocol === "https:" || isLoopbackHostname(u.hostname);
|
|
63
|
+
}, "A brokered origin must use https: unless it names a loopback host (localhost, 127.0.0.0/8, [::1])"),
|
|
58
64
|
headers: z.record(z.string().regex(/^[!#$%&'*+.^_`|~0-9A-Za-z-]+$/).refine((name) => ![
|
|
59
65
|
"host",
|
|
60
66
|
"connection",
|
|
@@ -259,13 +265,18 @@ Connection: close\r
|
|
|
259
265
|
}
|
|
260
266
|
|
|
261
267
|
// src/agent-runtime/sandbox/sandbox-bubblewrap-args.ts
|
|
268
|
+
var BUBBLEWRAP_ISOLATION_ARGS = [
|
|
269
|
+
"--unshare-all",
|
|
270
|
+
"--unshare-user",
|
|
271
|
+
"--disable-userns",
|
|
272
|
+
"--die-with-parent",
|
|
273
|
+
"--new-session",
|
|
274
|
+
"--cap-drop",
|
|
275
|
+
"ALL"
|
|
276
|
+
];
|
|
262
277
|
function bubblewrapArgs(input) {
|
|
263
278
|
const args = [
|
|
264
|
-
|
|
265
|
-
"--die-with-parent",
|
|
266
|
-
"--new-session",
|
|
267
|
-
"--cap-drop",
|
|
268
|
-
"ALL",
|
|
279
|
+
...BUBBLEWRAP_ISOLATION_ARGS,
|
|
269
280
|
"--ro-bind",
|
|
270
281
|
"/usr",
|
|
271
282
|
"/usr",
|
|
@@ -628,6 +639,18 @@ function sandboxProcessOwner(assertActive, maximum) {
|
|
|
628
639
|
}
|
|
629
640
|
|
|
630
641
|
// src/agent-runtime/sandbox/sandbox-bubblewrap.ts
|
|
642
|
+
async function runShutdownSteps(steps) {
|
|
643
|
+
const failures = [];
|
|
644
|
+
for (const step of steps) {
|
|
645
|
+
try {
|
|
646
|
+
await step();
|
|
647
|
+
} catch (error) {
|
|
648
|
+
failures.push(error);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
if (failures.length > 0)
|
|
652
|
+
throw failures[0];
|
|
653
|
+
}
|
|
631
654
|
async function createBubblewrapSandboxBackend(config) {
|
|
632
655
|
if (process.platform !== "linux")
|
|
633
656
|
throw new SandboxError("SANDBOX_UNAVAILABLE", "Bubblewrap requires Linux");
|
|
@@ -717,27 +740,30 @@ async function createBubblewrapSandboxBackend(config) {
|
|
|
717
740
|
if (stopPending)
|
|
718
741
|
return stopPending;
|
|
719
742
|
active = false;
|
|
720
|
-
stopPending = (
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
await rm2(temporary, { recursive: true, force: true });
|
|
727
|
-
} finally {
|
|
728
|
-
await stored.release();
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
})();
|
|
743
|
+
stopPending = runShutdownSteps([
|
|
744
|
+
() => processes.stop(),
|
|
745
|
+
() => broker.close(),
|
|
746
|
+
() => rm2(temporary, { recursive: true, force: true }),
|
|
747
|
+
() => stored.release()
|
|
748
|
+
]);
|
|
732
749
|
return stopPending;
|
|
733
750
|
}
|
|
734
751
|
try {
|
|
735
752
|
await execute("/usr/bin/true", []);
|
|
736
753
|
} catch (error) {
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
await
|
|
740
|
-
|
|
754
|
+
let cause = error;
|
|
755
|
+
try {
|
|
756
|
+
await runShutdownSteps([
|
|
757
|
+
stop,
|
|
758
|
+
async () => {
|
|
759
|
+
if (!input.state)
|
|
760
|
+
await rm2(stored.directory, { recursive: true, force: true });
|
|
761
|
+
}
|
|
762
|
+
]);
|
|
763
|
+
} catch (cleanupFailure) {
|
|
764
|
+
cause = new AggregateError([error, cleanupFailure], "Bubblewrap probe failed and its cleanup failed");
|
|
765
|
+
}
|
|
766
|
+
throw new SandboxError("SANDBOX_UNAVAILABLE", "Bubblewrap could not establish isolation", { cause });
|
|
741
767
|
}
|
|
742
768
|
return {
|
|
743
769
|
coding: { root: stored.workspace, adapter: coding.adapter, assertActive },
|
|
@@ -770,7 +796,7 @@ async function createBubblewrapSandboxBackend(config) {
|
|
|
770
796
|
import { posix as posix4 } from "node:path";
|
|
771
797
|
|
|
772
798
|
// src/agent-runtime/sandbox/sandbox-process-spec.ts
|
|
773
|
-
import { realpathSync } from "node:fs";
|
|
799
|
+
import { lstatSync, readlinkSync, realpathSync } from "node:fs";
|
|
774
800
|
import { posix as posix3 } from "node:path";
|
|
775
801
|
import { z as z4 } from "zod";
|
|
776
802
|
var AbsolutePathSchema = z4.string().min(1).refine((value) => value.startsWith("/"), "Path must be absolute").refine((value) => !/[\0\r\n]/.test(value), "Path must not contain NUL or newline characters");
|
|
@@ -786,20 +812,50 @@ function normalizeAbsolute(path) {
|
|
|
786
812
|
const normalized = posix3.normalize(path);
|
|
787
813
|
return normalized.length > 1 && normalized.endsWith("/") ? normalized.slice(0, -1) : normalized;
|
|
788
814
|
}
|
|
815
|
+
function unresolvablePath(path, cursor, error) {
|
|
816
|
+
const detail = error instanceof Error ? error.message : String(error);
|
|
817
|
+
return new SandboxError("SANDBOX_UNAVAILABLE", `Failed to resolve sandbox path "${path}" at "${cursor}" (${errnoOf(error) ?? "unknown"}): ${detail}`, { cause: error });
|
|
818
|
+
}
|
|
819
|
+
function resolveUnopenableEntry(path, cursor) {
|
|
820
|
+
const realParent = resolveRealOrAncestor(posix3.dirname(cursor));
|
|
821
|
+
let target;
|
|
822
|
+
try {
|
|
823
|
+
target = readlinkSync(cursor);
|
|
824
|
+
} catch (error) {
|
|
825
|
+
if (errnoOf(error) !== "EINVAL")
|
|
826
|
+
throw unresolvablePath(path, cursor, error);
|
|
827
|
+
return posix3.join(realParent, posix3.basename(cursor));
|
|
828
|
+
}
|
|
829
|
+
return resolveRealOrAncestor(posix3.resolve(realParent, target));
|
|
830
|
+
}
|
|
789
831
|
function resolveRealOrAncestor(path) {
|
|
790
832
|
const normalized = normalizeAbsolute(path);
|
|
791
833
|
let cursor = normalized;
|
|
792
834
|
const tail = [];
|
|
793
835
|
for (;; ) {
|
|
794
836
|
try {
|
|
795
|
-
const resolved = realpathSync(cursor);
|
|
837
|
+
const resolved = normalizeAbsolute(realpathSync(cursor));
|
|
796
838
|
return tail.length === 0 ? resolved : posix3.join(resolved, ...tail.reverse());
|
|
797
|
-
} catch {
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
return
|
|
801
|
-
|
|
802
|
-
|
|
839
|
+
} catch (error) {
|
|
840
|
+
if (errnoOf(error) === "EOPNOTSUPP") {
|
|
841
|
+
const resolved = resolveUnopenableEntry(path, cursor);
|
|
842
|
+
return tail.length === 0 ? resolved : posix3.join(resolved, ...tail.reverse());
|
|
843
|
+
}
|
|
844
|
+
if (errnoOf(error) !== "ENOENT")
|
|
845
|
+
throw unresolvablePath(path, cursor, error);
|
|
846
|
+
try {
|
|
847
|
+
lstatSync(cursor);
|
|
848
|
+
} catch (lstatError) {
|
|
849
|
+
if (errnoOf(lstatError) !== "ENOENT")
|
|
850
|
+
throw unresolvablePath(path, cursor, lstatError);
|
|
851
|
+
const parent = posix3.dirname(cursor);
|
|
852
|
+
if (parent === cursor)
|
|
853
|
+
throw unresolvablePath(path, cursor, error);
|
|
854
|
+
tail.push(posix3.basename(cursor));
|
|
855
|
+
cursor = parent;
|
|
856
|
+
continue;
|
|
857
|
+
}
|
|
858
|
+
throw unresolvablePath(path, cursor, error);
|
|
803
859
|
}
|
|
804
860
|
}
|
|
805
861
|
}
|
|
@@ -1002,7 +1058,7 @@ function buildMacOsSeatbeltCommand(spec, command) {
|
|
|
1002
1058
|
};
|
|
1003
1059
|
}
|
|
1004
1060
|
// src/agent-runtime/sandbox/sandbox-process-linux.ts
|
|
1005
|
-
import { lstatSync,
|
|
1061
|
+
import { existsSync, lstatSync as lstatSync2, readlinkSync as readlinkSync2, statSync } from "node:fs";
|
|
1006
1062
|
import { posix as posix5 } from "node:path";
|
|
1007
1063
|
var DEFAULT_BWRAP_EXECUTABLE = "/usr/bin/bwrap";
|
|
1008
1064
|
var DEFAULT_SYSTEM_ROOTS = ["/usr", "/bin", "/sbin", "/lib", "/lib64", "/etc"];
|
|
@@ -1023,10 +1079,6 @@ var DEFAULT_NETWORK_ETC_MOUNTS = [
|
|
|
1023
1079
|
"/etc/hosts",
|
|
1024
1080
|
"/etc/nsswitch.conf"
|
|
1025
1081
|
];
|
|
1026
|
-
function isAbsentErrno(error) {
|
|
1027
|
-
const code = errnoOf(error);
|
|
1028
|
-
return code === "ENOENT" || code === "ENOTDIR";
|
|
1029
|
-
}
|
|
1030
1082
|
function sandboxUnavailable(context, error) {
|
|
1031
1083
|
const detail = error instanceof Error ? error.message : String(error);
|
|
1032
1084
|
return new SandboxError("SANDBOX_UNAVAILABLE", `${context}: ${detail}`, { cause: error });
|
|
@@ -1051,45 +1103,50 @@ function collectMountedRoots(spec) {
|
|
|
1051
1103
|
...spec.privateTmpDir !== undefined ? [spec.privateTmpDir] : []
|
|
1052
1104
|
];
|
|
1053
1105
|
}
|
|
1054
|
-
function
|
|
1106
|
+
function resolveMountSource(rawPath, optional) {
|
|
1055
1107
|
const normalized = normalizeAbsolute(rawPath);
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
for (;; ) {
|
|
1108
|
+
if (optional) {
|
|
1109
|
+
let leaf;
|
|
1059
1110
|
try {
|
|
1060
|
-
|
|
1061
|
-
if (tail.length === 0) {
|
|
1062
|
-
return { realRoot: resolved, isDirectory: statSync(resolved).isDirectory() };
|
|
1063
|
-
}
|
|
1064
|
-
return {
|
|
1065
|
-
realRoot: normalizeAbsolute(posix5.join(resolved, ...tail.reverse())),
|
|
1066
|
-
isDirectory: defaultIsDirectory
|
|
1067
|
-
};
|
|
1111
|
+
leaf = lstatSync2(normalized);
|
|
1068
1112
|
} catch (error) {
|
|
1069
|
-
if (
|
|
1113
|
+
if (errnoOf(error) !== "ENOENT") {
|
|
1114
|
+
throw sandboxUnavailable(`Failed to resolve Linux sandbox mount path "${rawPath}"`, error);
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
if (leaf?.isSymbolicLink() === true && !existsSync(normalized)) {
|
|
1118
|
+
let target;
|
|
1119
|
+
try {
|
|
1120
|
+
target = readlinkSync2(normalized);
|
|
1121
|
+
} catch (error) {
|
|
1070
1122
|
throw sandboxUnavailable(`Failed to resolve Linux sandbox mount path "${rawPath}"`, error);
|
|
1071
1123
|
}
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
const parent = posix5.dirname(cursor);
|
|
1075
|
-
if (parent === cursor)
|
|
1076
|
-
return { realRoot: normalized, isDirectory: defaultIsDirectory };
|
|
1077
|
-
tail.push(posix5.basename(cursor));
|
|
1078
|
-
cursor = parent;
|
|
1124
|
+
const realParent = resolveRealOrAncestor(posix5.dirname(normalized));
|
|
1125
|
+
return resolveRealOrAncestor(posix5.resolve(realParent, target));
|
|
1079
1126
|
}
|
|
1080
1127
|
}
|
|
1128
|
+
return resolveRealOrAncestor(normalized);
|
|
1129
|
+
}
|
|
1130
|
+
function resolveMountRoot(rawPath, defaultIsDirectory, optional) {
|
|
1131
|
+
const realRoot = resolveMountSource(rawPath, optional);
|
|
1132
|
+
try {
|
|
1133
|
+
return { realRoot, isDirectory: statSync(realRoot).isDirectory() };
|
|
1134
|
+
} catch (error) {
|
|
1135
|
+
if (errnoOf(error) !== "ENOENT") {
|
|
1136
|
+
throw sandboxUnavailable(`Failed to resolve Linux sandbox mount path "${rawPath}"`, error);
|
|
1137
|
+
}
|
|
1138
|
+
return { realRoot, isDirectory: defaultIsDirectory };
|
|
1139
|
+
}
|
|
1081
1140
|
}
|
|
1082
1141
|
function collectHostMounts(spec, network) {
|
|
1083
1142
|
const mounts = [];
|
|
1084
1143
|
const addMount = (hostPath, mountPath, defaultIsDirectory, optional) => {
|
|
1085
|
-
const resolved =
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
});
|
|
1092
|
-
}
|
|
1144
|
+
const resolved = resolveMountRoot(hostPath, defaultIsDirectory, optional);
|
|
1145
|
+
mounts.push({
|
|
1146
|
+
mountPath: normalizeAbsolute(mountPath),
|
|
1147
|
+
realRoot: resolved.realRoot,
|
|
1148
|
+
isDirectory: resolved.isDirectory
|
|
1149
|
+
});
|
|
1093
1150
|
};
|
|
1094
1151
|
if (spec.systemReadOnlyPaths !== undefined) {
|
|
1095
1152
|
for (const systemPath of spec.systemReadOnlyPaths)
|
|
@@ -1116,94 +1173,72 @@ function collectHostMounts(spec, network) {
|
|
|
1116
1173
|
}
|
|
1117
1174
|
return mounts;
|
|
1118
1175
|
}
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1121
|
-
try {
|
|
1122
|
-
lstatSync(normalizedDenied);
|
|
1123
|
-
} catch (error) {
|
|
1124
|
-
if (isAbsentErrno(error))
|
|
1125
|
-
return;
|
|
1126
|
-
throw sandboxUnavailable(`Failed to inspect Linux sandbox denyPath "${denied}"`, error);
|
|
1127
|
-
}
|
|
1128
|
-
let realDenied;
|
|
1129
|
-
try {
|
|
1130
|
-
realDenied = normalizeAbsolute(realpathSync2(normalizedDenied));
|
|
1131
|
-
} catch (error) {
|
|
1132
|
-
throw sandboxUnavailable(`Failed to resolve Linux sandbox denyPath "${denied}"`, error);
|
|
1133
|
-
}
|
|
1134
|
-
try {
|
|
1135
|
-
return { realDenied, isDir: statSync(realDenied).isDirectory() };
|
|
1136
|
-
} catch (error) {
|
|
1137
|
-
throw sandboxUnavailable(`Failed to stat resolved Linux sandbox denyPath "${denied}" -> "${realDenied}"`, error);
|
|
1138
|
-
}
|
|
1176
|
+
function mountCoveredByDeny(mount, realDenied) {
|
|
1177
|
+
return relativeIfUnder(mount.realRoot, realDenied) !== undefined || relativeIfUnder(mount.mountPath, realDenied) !== undefined;
|
|
1139
1178
|
}
|
|
1140
|
-
function
|
|
1179
|
+
function planDenyMasks(denyPaths, hostMounts) {
|
|
1180
|
+
const resolvedDenies = denyPaths.map((denied) => ({
|
|
1181
|
+
denied,
|
|
1182
|
+
realDenied: resolveRealOrAncestor(denied)
|
|
1183
|
+
}));
|
|
1141
1184
|
const masks = new Map;
|
|
1142
|
-
const
|
|
1143
|
-
const normalized = normalizeAbsolute(maskPath);
|
|
1144
|
-
masks.set(normalized, (masks.get(normalized) ?? false) || isDir);
|
|
1145
|
-
};
|
|
1146
|
-
for (const denied of denyPaths) {
|
|
1147
|
-
const target = resolveDenyPathTarget(denied);
|
|
1148
|
-
if (target === undefined)
|
|
1149
|
-
continue;
|
|
1150
|
-
const { realDenied, isDir } = target;
|
|
1185
|
+
for (const { realDenied } of resolvedDenies) {
|
|
1151
1186
|
for (const mount of hostMounts) {
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
recordMask(relInsideMount.length === 0 ? mount.mountPath : posix5.join(mount.mountPath, relInsideMount), isDir);
|
|
1155
|
-
continue;
|
|
1156
|
-
}
|
|
1157
|
-
if (!isDir)
|
|
1158
|
-
continue;
|
|
1159
|
-
const mountUnderDenied = relativeIfUnder(mount.realRoot, realDenied);
|
|
1160
|
-
const mountPathUnderDenied = relativeIfUnder(mount.mountPath, realDenied);
|
|
1161
|
-
if (mountUnderDenied !== undefined && mountUnderDenied.length > 0 || mountPathUnderDenied !== undefined && mountPathUnderDenied.length > 0) {
|
|
1162
|
-
recordMask(mount.mountPath, mount.isDirectory);
|
|
1187
|
+
if (mountCoveredByDeny(mount, realDenied)) {
|
|
1188
|
+
masks.set(mount.mountPath, mount.isDirectory);
|
|
1163
1189
|
}
|
|
1164
1190
|
}
|
|
1165
1191
|
}
|
|
1166
|
-
const
|
|
1167
|
-
const
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1192
|
+
const maskedDirs = [...masks.entries()].filter(([, isDir]) => isDir).map(([path]) => path);
|
|
1193
|
+
for (const mount of hostMounts) {
|
|
1194
|
+
if (maskedDirs.some((dir) => relativeIfUnder(mount.mountPath, dir) !== undefined)) {
|
|
1195
|
+
masks.set(mount.mountPath, mount.isDirectory);
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
for (const { denied, realDenied } of resolvedDenies) {
|
|
1199
|
+
for (const mount of hostMounts) {
|
|
1200
|
+
if (!mount.isDirectory || masks.has(mount.mountPath))
|
|
1201
|
+
continue;
|
|
1202
|
+
const relInsideMount = relativeIfUnder(realDenied, mount.realRoot);
|
|
1203
|
+
if (relInsideMount === undefined || relInsideMount.length === 0)
|
|
1204
|
+
continue;
|
|
1205
|
+
throw new SandboxError("SANDBOX_UNAVAILABLE", `Linux sandbox cannot keep denyPath "${denied}" hidden: it resolves to "${realDenied}" ` + `inside the mounted host directory "${mount.mountPath}". A Bubblewrap mask there covers ` + "only the directory entry present at start, so a host rename over it or a file created " + "there later would be readable. Move the path out of every mounted tree (workspace, " + "readOnlyPaths, writableDirs, privateTmpDir, unixSockets, system roots) or deny the " + "whole mounted path.");
|
|
1176
1206
|
}
|
|
1177
1207
|
}
|
|
1208
|
+
return masks;
|
|
1178
1209
|
}
|
|
1179
|
-
function
|
|
1210
|
+
function pushBindOrMask(args, masks, flag, source, dest) {
|
|
1211
|
+
const isDirMask = masks.get(normalizeAbsolute(dest));
|
|
1212
|
+
if (isDirMask === undefined)
|
|
1213
|
+
args.push(flag, source, dest);
|
|
1214
|
+
else if (isDirMask)
|
|
1215
|
+
args.push("--tmpfs", dest);
|
|
1216
|
+
else
|
|
1217
|
+
args.push("--ro-bind", "/dev/null", dest);
|
|
1218
|
+
}
|
|
1219
|
+
function appendSystemMounts(args, spec, network, masks) {
|
|
1180
1220
|
if (spec.systemReadOnlyPaths !== undefined) {
|
|
1181
1221
|
for (const systemPath of spec.systemReadOnlyPaths)
|
|
1182
|
-
args
|
|
1222
|
+
pushBindOrMask(args, masks, "--ro-bind", systemPath, systemPath);
|
|
1183
1223
|
return;
|
|
1184
1224
|
}
|
|
1185
1225
|
for (const [flag, path] of DEFAULT_SYSTEM_BIND_MOUNTS)
|
|
1186
|
-
args
|
|
1226
|
+
pushBindOrMask(args, masks, flag, path, path);
|
|
1187
1227
|
for (const [target, linkPath] of DEFAULT_SYSTEM_SYMLINKS)
|
|
1188
1228
|
args.push("--symlink", target, linkPath);
|
|
1189
1229
|
if (network === "allow") {
|
|
1190
1230
|
for (const path of DEFAULT_NETWORK_ETC_MOUNTS)
|
|
1191
|
-
args
|
|
1231
|
+
pushBindOrMask(args, masks, "--ro-bind-try", path, path);
|
|
1192
1232
|
}
|
|
1193
1233
|
}
|
|
1194
1234
|
function buildLinuxBubblewrapArgs(rawSpec, command) {
|
|
1195
1235
|
const spec = ProcessSandboxSpecSchema.parse(rawSpec);
|
|
1196
1236
|
const network = spec.network ?? "deny";
|
|
1197
|
-
const args = [
|
|
1198
|
-
"--unshare-all",
|
|
1199
|
-
"--die-with-parent",
|
|
1200
|
-
"--new-session",
|
|
1201
|
-
"--cap-drop",
|
|
1202
|
-
"ALL"
|
|
1203
|
-
];
|
|
1237
|
+
const args = [...BUBBLEWRAP_ISOLATION_ARGS];
|
|
1204
1238
|
if (network === "allow")
|
|
1205
1239
|
args.push("--share-net");
|
|
1206
|
-
|
|
1240
|
+
const masks = spec.denyPaths !== undefined && spec.denyPaths.length > 0 ? planDenyMasks(spec.denyPaths, collectHostMounts(spec, network)) : new Map;
|
|
1241
|
+
appendSystemMounts(args, spec, network, masks);
|
|
1207
1242
|
args.push("--proc", "/proc", "--dev", "/dev", "--tmpfs", "/tmp");
|
|
1208
1243
|
const systemRoots = spec.systemReadOnlyPaths ?? DEFAULT_SYSTEM_ROOTS;
|
|
1209
1244
|
const mountedRoots = collectMountedRoots(spec);
|
|
@@ -1212,18 +1247,15 @@ function buildLinuxBubblewrapArgs(rawSpec, command) {
|
|
|
1212
1247
|
if (homeDir !== undefined && !pathCoveredByAny(homeDir, mountedRoots) && !virtualAndSystemRoots.some((root) => pathCoveredByAny(root, [homeDir]))) {
|
|
1213
1248
|
args.push("--tmpfs", homeDir);
|
|
1214
1249
|
}
|
|
1215
|
-
args
|
|
1250
|
+
pushBindOrMask(args, masks, spec.profile === "workspace-strict" ? "--bind" : "--ro-bind", spec.workspace, spec.workspace);
|
|
1216
1251
|
for (const roPath of spec.readOnlyPaths ?? [])
|
|
1217
|
-
args
|
|
1252
|
+
pushBindOrMask(args, masks, "--ro-bind", roPath, roPath);
|
|
1218
1253
|
for (const rwDir of spec.writableDirs ?? [])
|
|
1219
|
-
args
|
|
1254
|
+
pushBindOrMask(args, masks, "--bind", rwDir, rwDir);
|
|
1220
1255
|
if (spec.privateTmpDir !== undefined)
|
|
1221
|
-
args
|
|
1256
|
+
pushBindOrMask(args, masks, "--bind", spec.privateTmpDir, spec.privateTmpDir);
|
|
1222
1257
|
for (const sock of spec.unixSockets ?? []) {
|
|
1223
|
-
args
|
|
1224
|
-
}
|
|
1225
|
-
if (spec.denyPaths !== undefined && spec.denyPaths.length > 0) {
|
|
1226
|
-
appendDenyMasks(args, spec.denyPaths, collectHostMounts(spec, network));
|
|
1258
|
+
pushBindOrMask(args, masks, "--bind", sock.hostPath, sock.mountPath ?? sock.hostPath);
|
|
1227
1259
|
}
|
|
1228
1260
|
const allMountedRoots = homeDir !== undefined ? [...mountedRoots, homeDir] : mountedRoots;
|
|
1229
1261
|
const resolvedEnv = resolveProcessSandboxEnv(spec, command.env);
|
|
@@ -1277,11 +1309,7 @@ async function probeProcessSandbox(options = {}) {
|
|
|
1277
1309
|
const result = await runNativeCommand2({
|
|
1278
1310
|
executable,
|
|
1279
1311
|
args: [
|
|
1280
|
-
|
|
1281
|
-
"--die-with-parent",
|
|
1282
|
-
"--new-session",
|
|
1283
|
-
"--cap-drop",
|
|
1284
|
-
"ALL",
|
|
1312
|
+
...BUBBLEWRAP_ISOLATION_ARGS,
|
|
1285
1313
|
"--ro-bind",
|
|
1286
1314
|
"/usr",
|
|
1287
1315
|
"/usr",
|
|
@@ -2,16 +2,16 @@ import"../../../index-j3r7r1mh.js";
|
|
|
2
2
|
import"../../../index-tav72wz5.js";
|
|
3
3
|
import"../../../index-7qza24g1.js";
|
|
4
4
|
import"../../../index-pd9e8rz4.js";
|
|
5
|
-
import"../../../index-
|
|
5
|
+
import"../../../index-rg08syp1.js";
|
|
6
6
|
import"../../../index-qcy8et93.js";
|
|
7
7
|
import"../../../index-brhhaygm.js";
|
|
8
8
|
import"../../../index-64t6pheq.js";
|
|
9
|
-
import"../../../index-
|
|
9
|
+
import"../../../index-hberxns4.js";
|
|
10
10
|
import"../../../index-1zy31r3b.js";
|
|
11
11
|
import {
|
|
12
12
|
initializeAgentRuntimeSqlite2,
|
|
13
13
|
createSqliteAgentRuntimeStore2
|
|
14
|
-
} from "../../../index-
|
|
14
|
+
} from "../../../index-4243301z.js";
|
|
15
15
|
import"../../../index-werjqesf.js";
|
|
16
16
|
import"../../../index-6kec3b14.js";
|
|
17
17
|
import"../../../index-tgehj4bp.js";
|
|
@@ -2,16 +2,16 @@ import"../../../index-j3r7r1mh.js";
|
|
|
2
2
|
import"../../../index-tav72wz5.js";
|
|
3
3
|
import"../../../index-7qza24g1.js";
|
|
4
4
|
import"../../../index-pd9e8rz4.js";
|
|
5
|
-
import"../../../index-
|
|
5
|
+
import"../../../index-rg08syp1.js";
|
|
6
6
|
import"../../../index-qcy8et93.js";
|
|
7
7
|
import"../../../index-brhhaygm.js";
|
|
8
8
|
import"../../../index-64t6pheq.js";
|
|
9
|
-
import"../../../index-
|
|
9
|
+
import"../../../index-hberxns4.js";
|
|
10
10
|
import"../../../index-1zy31r3b.js";
|
|
11
11
|
import {
|
|
12
12
|
initializeAgentRuntimeSqlite2,
|
|
13
13
|
createSqliteAgentRuntimeStore2
|
|
14
|
-
} from "../../../index-
|
|
14
|
+
} from "../../../index-4243301z.js";
|
|
15
15
|
import"../../../index-werjqesf.js";
|
|
16
16
|
import"../../../index-6kec3b14.js";
|
|
17
17
|
import"../../../index-tgehj4bp.js";
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
AgentConversationBranchRefusedError2,
|
|
18
18
|
AgentStoreUnsupportedCapabilityError2
|
|
19
|
-
} from "../../index-
|
|
19
|
+
} from "../../index-rg08syp1.js";
|
|
20
20
|
import"../../index-64t6pheq.js";
|
|
21
21
|
import"../../index-werjqesf.js";
|
|
22
22
|
import"../../index-6kec3b14.js";
|
|
@@ -26,7 +26,7 @@ import"../../index-snef22zr.js";
|
|
|
26
26
|
import"../../index-vebzvse6.js";
|
|
27
27
|
import {
|
|
28
28
|
createMemoryAgentRuntimeStore2
|
|
29
|
-
} from "../../index-
|
|
29
|
+
} from "../../index-j5vzhj3d.js";
|
|
30
30
|
import {
|
|
31
31
|
createToolChronology,
|
|
32
32
|
advanceToolChronology
|
|
@@ -166,7 +166,7 @@ data: [DONE]
|
|
|
166
166
|
if (!address || typeof address === "string")
|
|
167
167
|
throw new Error("Fault server has no TCP address");
|
|
168
168
|
return {
|
|
169
|
-
url: `http://127.0.0.1:${address.port}/v1
|
|
169
|
+
url: `http://127.0.0.1:${address.port}/v1`,
|
|
170
170
|
calls: () => calls,
|
|
171
171
|
close: () => new Promise((resolve, reject) => server.close((error) => error ? reject(error) : resolve()))
|
|
172
172
|
};
|