stitchkit 0.104.1 → 0.105.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 +381 -12
- package/darwin-native.cjs +4 -2
- package/dist/agent-runtime/browser-control-contract.d.ts +32 -2
- package/dist/agent-runtime/browser-control-contract.d.ts.map +1 -1
- package/dist/agent-runtime/browser-controller.d.ts +21 -3
- package/dist/agent-runtime/browser-controller.d.ts.map +1 -1
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-refusals.d.ts +1 -0
- package/dist/agent-runtime/coding-tool-refusals.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-shell.d.ts.map +1 -1
- package/dist/agent-runtime/compaction.d.ts.map +1 -1
- package/dist/agent-runtime/contained-write.d.ts.map +1 -1
- package/dist/agent-runtime/control-schema.d.ts +48 -1
- package/dist/agent-runtime/control-schema.d.ts.map +1 -1
- package/dist/agent-runtime/deferred-tool-search.d.ts +3 -2
- package/dist/agent-runtime/deferred-tool-search.d.ts.map +1 -1
- package/dist/agent-runtime/harness-control.d.ts.map +1 -1
- package/dist/agent-runtime/harness-realtime.d.ts +34 -4
- package/dist/agent-runtime/harness-realtime.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-recovery.d.ts.map +1 -1
- package/dist/agent-runtime/runtime-state.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-contract.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox-process-owner.d.ts +9 -1
- package/dist/agent-runtime/sandbox-process-owner.d.ts.map +1 -1
- package/dist/agent-runtime/sandbox.d.ts +32 -1
- package/dist/agent-runtime/sandbox.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-records.d.ts.map +1 -1
- package/dist/agent-runtime/schedules.d.ts.map +1 -1
- package/dist/agent-runtime/store-events.d.ts +9 -4
- package/dist/agent-runtime/store-events.d.ts.map +1 -1
- package/dist/agent-runtime/testing.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-contract.d.ts +50 -0
- package/dist/application/diagnostic-journal-contract.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-generations.d.ts +24 -0
- package/dist/application/diagnostic-journal-generations.d.ts.map +1 -0
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-open.d.ts +10 -0
- package/dist/application/diagnostic-journal-open.d.ts.map +1 -0
- package/dist/application/diagnostic-journal-quarantine.d.ts +28 -0
- package/dist/application/diagnostic-journal-quarantine.d.ts.map +1 -0
- package/dist/application/diagnostic-journal-read-contract.d.ts +73 -3
- package/dist/application/diagnostic-journal-read-contract.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-reader.d.ts +17 -2
- package/dist/application/diagnostic-journal-reader.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-recovery.d.ts +18 -2
- package/dist/application/diagnostic-journal-recovery.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-storage.d.ts +6 -2
- package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-tail.d.ts +12 -0
- package/dist/application/diagnostic-journal-tail.d.ts.map +1 -0
- package/dist/application/diagnostic-journal.d.ts +3 -0
- package/dist/application/diagnostic-journal.d.ts.map +1 -1
- package/dist/application/directory-inbox-accept.d.ts +3 -3
- package/dist/application/directory-inbox-accept.d.ts.map +1 -1
- package/dist/application/directory-inbox-contract.d.ts +38 -10
- package/dist/application/directory-inbox-contract.d.ts.map +1 -1
- package/dist/application/directory-inbox-delivery.d.ts +3 -3
- package/dist/application/directory-inbox-delivery.d.ts.map +1 -1
- package/dist/application/directory-inbox-files.d.ts +17 -2
- package/dist/application/directory-inbox-files.d.ts.map +1 -1
- package/dist/application/directory-inbox-state.d.ts +1 -1
- package/dist/application/directory-inbox-state.d.ts.map +1 -1
- package/dist/application/directory-inbox.d.ts +1 -1
- package/dist/application/directory-inbox.d.ts.map +1 -1
- package/dist/application/file-state-store.d.ts +21 -1
- package/dist/application/file-state-store.d.ts.map +1 -1
- package/dist/application/grammy.d.ts.map +1 -1
- package/dist/application/kernel-contract.d.ts.map +1 -1
- package/dist/application/revision-signal.d.ts.map +1 -1
- package/dist/application/state-store.d.ts +3 -0
- package/dist/application/state-store.d.ts.map +1 -1
- package/dist/browser/api-error.d.ts +38 -0
- package/dist/browser/api-error.d.ts.map +1 -0
- package/dist/browser/chunked-upload.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/browser/contract-stream.d.ts.map +1 -1
- package/dist/browser/http.d.ts +0 -25
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/resumable.d.ts.map +1 -1
- package/dist/contract/define-validation.d.ts +0 -1
- package/dist/contract/define-validation.d.ts.map +1 -1
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/errors-factory.d.ts.map +1 -1
- package/dist/contract/errors.d.ts +15 -18
- package/dist/contract/errors.d.ts.map +1 -1
- package/dist/contract/normalize.d.ts.map +1 -1
- package/dist/durability/effect.d.ts.map +1 -1
- package/dist/durability/scheduler.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/browser.js +29 -18
- package/dist/entrypoints/agent-runtime/coding-tools.js +8 -7
- package/dist/entrypoints/agent-runtime/harness.js +15 -14
- package/dist/entrypoints/agent-runtime/realtime.d.ts +1 -1
- package/dist/entrypoints/agent-runtime/realtime.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/realtime.js +119 -54
- package/dist/entrypoints/agent-runtime/sandbox.js +23 -17
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +4 -3
- package/dist/entrypoints/agent-runtime/sqlite/node.js +4 -3
- package/dist/entrypoints/agent-runtime/testing.js +8 -6
- package/dist/entrypoints/agent-runtime.js +37 -38
- package/dist/entrypoints/application/diagnostic-journal.js +305 -111
- package/dist/entrypoints/application/directory-inbox.js +174 -77
- package/dist/entrypoints/application/grammy.js +5 -2
- package/dist/entrypoints/application/opentelemetry.js +2 -2
- package/dist/entrypoints/application.d.ts +2 -2
- package/dist/entrypoints/application.d.ts.map +1 -1
- package/dist/entrypoints/application.js +17 -8
- package/dist/entrypoints/cli/publish.d.ts +16 -0
- package/dist/entrypoints/cli/publish.d.ts.map +1 -0
- package/dist/entrypoints/cli/publish.js +527 -0
- package/dist/entrypoints/cli.d.ts +1 -2
- package/dist/entrypoints/cli.d.ts.map +1 -1
- package/dist/entrypoints/cli.js +59 -966
- package/dist/entrypoints/contract.js +3 -3
- package/dist/entrypoints/files/packaging.js +196 -56
- package/dist/entrypoints/files.d.ts +1 -0
- package/dist/entrypoints/files.d.ts.map +1 -1
- package/dist/entrypoints/files.js +17 -10
- package/dist/entrypoints/index.d.ts +2 -1
- package/dist/entrypoints/index.d.ts.map +1 -1
- package/dist/entrypoints/index.js +31 -60
- package/dist/entrypoints/node.js +8 -8
- package/dist/entrypoints/observability.js +3 -3
- package/dist/entrypoints/primitives.js +67 -83
- package/dist/entrypoints/process.d.ts +1 -1
- package/dist/entrypoints/process.d.ts.map +1 -1
- package/dist/entrypoints/process.js +2 -2
- package/dist/entrypoints/react.js +4 -2
- package/dist/entrypoints/remote.js +37 -13
- package/dist/entrypoints/server.js +18 -16
- package/dist/entrypoints/telegram/screens.js +5 -3
- package/dist/entrypoints/telegram.js +31 -46
- package/dist/entrypoints/testing.d.ts +1 -1
- package/dist/entrypoints/testing.d.ts.map +1 -1
- package/dist/entrypoints/testing.js +444 -448
- package/dist/entrypoints/tools/connections.js +268 -105
- package/dist/entrypoints/tools/contract.js +2 -2
- package/dist/entrypoints/tools/invoker.js +8 -7
- package/dist/entrypoints/tools/mcp.d.ts +2 -2
- package/dist/entrypoints/tools/mcp.d.ts.map +1 -1
- package/dist/entrypoints/tools/mcp.js +10 -9
- package/dist/entrypoints/tools.d.ts +0 -1
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +118 -53
- package/dist/entrypoints/tracking.js +2 -3
- package/dist/files/boundary.d.ts +2 -2
- package/dist/files/boundary.d.ts.map +1 -1
- package/dist/files/chunk-spool.d.ts.map +1 -1
- package/dist/files/file-io.d.ts +2 -2
- package/dist/files/file-io.d.ts.map +1 -1
- package/dist/files/native-packaging-layout.d.ts +50 -4
- package/dist/files/native-packaging-layout.d.ts.map +1 -1
- package/dist/files/native-packaging.d.ts +104 -21
- package/dist/files/native-packaging.d.ts.map +1 -1
- package/dist/{index-r5hsgkz5.js → index-0gs4ymfj.js} +6 -3
- package/dist/{index-zax7resm.js → index-0gxvns6s.js} +1 -13
- package/dist/index-0s4xebbg.js +8 -0
- package/dist/{index-r4r70zmh.js → index-12zsej7b.js} +5 -2
- package/dist/{index-kemm0ej5.js → index-1pwwan01.js} +65 -22
- package/dist/{index-vgkbcnkc.js → index-299sm5tr.js} +1 -1
- package/dist/{index-2vnh05w4.js → index-2k91mewf.js} +31 -74
- package/dist/{index-269zqj8m.js → index-2rc6jd9n.js} +28 -12
- package/dist/{index-wh0ecvyk.js → index-37asdw3a.js} +1 -1
- package/dist/index-3h0ztg0z.js +285 -0
- package/dist/{index-g95fk660.js → index-4vsby8n8.js} +8 -15
- package/dist/index-556g5hsh.js +17 -0
- package/dist/{index-adhgd4pe.js → index-5p55xreg.js} +2 -2
- package/dist/index-5w6t91ze.js +47 -0
- package/dist/{index-9pw0a51a.js → index-6yxhe58g.js} +40 -7
- package/dist/{index-6d9xaxw1.js → index-8ks9b85e.js} +33 -5
- package/dist/{index-bhb950qs.js → index-916yh4e2.js} +25 -12
- package/dist/index-9tqbxv5p.js +44 -0
- package/dist/{index-5csmzesf.js → index-azx12jgv.js} +4 -3
- package/dist/{index-mbnnw3f2.js → index-b0kddvzw.js} +15 -5
- package/dist/{index-n5yqxd3d.js → index-b0w7rbpt.js} +23 -2
- package/dist/index-b56nnscm.js +132 -0
- package/dist/{index-0ndk4555.js → index-c0hffcmj.js} +2 -2
- package/dist/{index-pptyv13k.js → index-c17xcx4k.js} +42 -6
- package/dist/{index-g2j7pnak.js → index-cmzvhhtd.js} +5 -2
- package/dist/index-cq59agna.js +51 -0
- package/dist/{index-ssmd41kh.js → index-d2h99n7d.js} +1 -1
- package/dist/{index-z94wht4y.js → index-dky0dcmf.js} +34 -5
- package/dist/{index-za6j7nwy.js → index-dsnjzb62.js} +104 -51
- package/dist/index-eemvahkc.js +21 -0
- package/dist/index-ef8gdaq0.js +105 -0
- package/dist/{index-fa4wg312.js → index-f199nfq5.js} +10 -6
- package/dist/{index-ck71tbcf.js → index-fsw1ybf3.js} +11 -15
- package/dist/{index-f330qqyg.js → index-g2vfg7ak.js} +217 -63
- package/dist/{index-fk18k56k.js → index-gr5g3xfw.js} +11 -18
- package/dist/{index-jn9g8xdt.js → index-hjvje0pf.js} +6 -4
- package/dist/{index-x928baz2.js → index-j9gxbztg.js} +18 -14
- package/dist/index-kfjkb396.js +37 -0
- package/dist/{index-6drst9sg.js → index-ksfagmyz.js} +45 -345
- package/dist/index-m616f0yz.js +120 -0
- package/dist/{index-fm1c1a08.js → index-m6w6jtda.js} +40 -21
- package/dist/{index-ptn0g0gj.js → index-ma963wz7.js} +21 -20
- package/dist/{index-bakgedh8.js → index-msfpyy2f.js} +2 -4
- package/dist/{index-ywppsaby.js → index-n1nszyk0.js} +23 -34
- package/dist/{index-v14qqmys.js → index-n4689krb.js} +1 -1
- package/dist/{index-a0zzh8ak.js → index-pz3y6b6g.js} +3 -3
- package/dist/{index-43p08g7t.js → index-pzb63z66.js} +12 -8
- package/dist/{index-h97tqqp1.js → index-qaet40b2.js} +5 -3
- package/dist/{index-t1sr4aks.js → index-qaqbdm7s.js} +52 -6
- package/dist/{index-77nxk6ay.js → index-r393tnfp.js} +16 -10
- package/dist/{index-kb8styz3.js → index-rpzewktb.js} +15 -5
- package/dist/{index-27a2pj09.js → index-sj28htvf.js} +1 -1
- package/dist/index-szybbezc.js +455 -0
- package/dist/{index-2hyavjjj.js → index-wbhdzxar.js} +3 -3
- package/dist/{index-4e0ah203.js → index-wdy68sh6.js} +47 -24
- package/dist/{index-hbd32c6a.js → index-wqmvtnkp.js} +38 -89
- package/dist/{index-hp9d77wk.js → index-x7w1z6pf.js} +15 -4
- package/dist/{index-20yvtn9a.js → index-yt7gyg5x.js} +1 -1
- package/dist/{index-cvda079a.js → index-yvfk3y36.js} +12 -2
- package/dist/{index-5z6jn897.js → index-z23rfxhj.js} +1 -1
- package/dist/internal/abort-race.d.ts +8 -2
- package/dist/internal/abort-race.d.ts.map +1 -1
- package/dist/internal/atomic-file.d.ts +55 -9
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/atomic-publication.d.ts +39 -4
- package/dist/internal/atomic-publication.d.ts.map +1 -1
- package/dist/internal/atomic-staging.d.ts +46 -0
- package/dist/internal/atomic-staging.d.ts.map +1 -0
- package/dist/internal/bounded-file-read.d.ts +19 -11
- package/dist/internal/bounded-file-read.d.ts.map +1 -1
- package/dist/internal/bounded-lines.d.ts.map +1 -1
- package/dist/internal/close-after.d.ts +11 -0
- package/dist/internal/close-after.d.ts.map +1 -0
- package/dist/internal/deadline.d.ts +10 -0
- package/dist/internal/deadline.d.ts.map +1 -1
- package/dist/internal/exclusive-lock-read.d.ts +10 -12
- package/dist/internal/exclusive-lock-read.d.ts.map +1 -1
- package/dist/internal/exclusive-lock.d.ts +2 -2
- package/dist/internal/exclusive-lock.d.ts.map +1 -1
- package/dist/internal/file-observation.d.ts +14 -0
- package/dist/internal/file-observation.d.ts.map +1 -0
- package/dist/internal/json-data.d.ts +22 -5
- package/dist/internal/json-data.d.ts.map +1 -1
- package/dist/internal/positive-integer.d.ts +9 -0
- package/dist/internal/positive-integer.d.ts.map +1 -0
- package/dist/internal/process-instance.d.ts +35 -5
- package/dist/internal/process-instance.d.ts.map +1 -1
- package/dist/internal/secure-fetch.d.ts.map +1 -1
- package/dist/internal/timers.d.ts +11 -0
- package/dist/internal/timers.d.ts.map +1 -0
- package/dist/internal/with-exclusive-lock.d.ts +5 -4
- package/dist/internal/with-exclusive-lock.d.ts.map +1 -1
- package/dist/observability/bounded-sink.d.ts.map +1 -1
- package/dist/primitives/canonical-json.d.ts +23 -2
- package/dist/primitives/canonical-json.d.ts.map +1 -1
- package/dist/primitives/delivery.d.ts.map +1 -1
- package/dist/primitives/index.d.ts +1 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/money.d.ts.map +1 -1
- package/dist/process/cleanup.d.ts +6 -1
- package/dist/process/cleanup.d.ts.map +1 -1
- package/dist/process/command-lifetime.d.ts +4 -0
- package/dist/process/command-lifetime.d.ts.map +1 -1
- package/dist/process/command-owner.d.ts.map +1 -1
- package/dist/process/command.d.ts +4 -0
- package/dist/process/command.d.ts.map +1 -1
- package/dist/process/contract.d.ts +67 -2
- package/dist/process/contract.d.ts.map +1 -1
- package/dist/process/group.d.ts +40 -3
- package/dist/process/group.d.ts.map +1 -1
- package/dist/process/launch.d.ts +12 -1
- package/dist/process/launch.d.ts.map +1 -1
- package/dist/process/terminate.d.ts +39 -0
- package/dist/process/terminate.d.ts.map +1 -0
- package/dist/react/query-client.d.ts.map +1 -1
- package/dist/realtime/rejection.d.ts.map +1 -1
- package/dist/server/contract-stream.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts.map +1 -1
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/request-body.d.ts +0 -1
- package/dist/server/request-body.d.ts.map +1 -1
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/telegram/broadcast-delivery.d.ts.map +1 -1
- package/dist/telegram/broadcast-failure.d.ts +10 -2
- package/dist/telegram/broadcast-failure.d.ts.map +1 -1
- package/dist/telegram/operator-channel.d.ts.map +1 -1
- package/dist/telegram/screens/outcome.d.ts.map +1 -1
- package/dist/testing/surface-conformance.d.ts +1 -1
- package/dist/testing/surface-conformance.d.ts.map +1 -1
- package/dist/testing/surface-manifest.d.ts +0 -6
- package/dist/testing/surface-manifest.d.ts.map +1 -1
- package/dist/tools/agent.d.ts +1 -1
- package/dist/tools/agent.d.ts.map +1 -1
- package/dist/tools/cli/args.d.ts +1 -1
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/help.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +2 -2
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/profile.d.ts.map +1 -1
- package/dist/tools/cli/publication-assets.d.ts.map +1 -1
- package/dist/tools/cli/publication-contract.d.ts +8 -0
- package/dist/tools/cli/publication-contract.d.ts.map +1 -1
- package/dist/tools/cli/publication-control.d.ts.map +1 -1
- package/dist/tools/cli/publication-storage.d.ts +23 -2
- package/dist/tools/cli/publication-storage.d.ts.map +1 -1
- package/dist/tools/cli/publication.d.ts +8 -1
- package/dist/tools/cli/publication.d.ts.map +1 -1
- package/dist/tools/connections/errors.d.ts +18 -6
- package/dist/tools/connections/errors.d.ts.map +1 -1
- package/dist/tools/connections/limits.d.ts +8 -2
- package/dist/tools/connections/limits.d.ts.map +1 -1
- package/dist/tools/connections/mcp-client.d.ts.map +1 -1
- package/dist/tools/connections/mcp-envelope.d.ts.map +1 -1
- package/dist/tools/connections/openapi.d.ts.map +1 -1
- package/dist/tools/connections/schema-budget.d.ts +1 -1
- package/dist/tools/connections/schema-budget.d.ts.map +1 -1
- package/dist/tools/connections/sse-session.d.ts.map +1 -1
- package/dist/tools/execute-args.d.ts.map +1 -1
- package/dist/tools/execute-result.d.ts.map +1 -1
- package/dist/tools/internal/surface-projector.d.ts +17 -3
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/internal/tool-error-projection.d.ts +16 -0
- package/dist/tools/internal/tool-error-projection.d.ts.map +1 -0
- package/dist/tools/internal/tool-view.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/list-names.d.ts +3 -2
- package/dist/tools/list-names.d.ts.map +1 -1
- package/dist/tools/manifest.d.ts +3 -2
- package/dist/tools/manifest.d.ts.map +1 -1
- package/dist/tools/mcp/handler.d.ts +7 -0
- package/dist/tools/mcp/handler.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +18 -2
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/prepare.d.ts +3 -3
- package/dist/tools/mcp/prepare.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/dist/tools/mcp/stdio-signals.d.ts +14 -0
- package/dist/tools/mcp/stdio-signals.d.ts.map +1 -1
- package/dist/tools/mcp/stdio.d.ts +7 -0
- package/dist/tools/mcp/stdio.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts +3 -3
- package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
- package/dist/tools/operations/define-wait-tool.d.ts +1 -1
- package/dist/tools/operations/define-wait-tool.d.ts.map +1 -1
- package/dist/tools/operations/wait-core.d.ts +0 -6
- package/dist/tools/operations/wait-core.d.ts.map +1 -1
- package/dist/tools/registry.d.ts +1 -1
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/remote.d.ts +1 -1
- package/dist/tools/remote.d.ts.map +1 -1
- package/dist/tools/{runtime-tool-execution.d.ts → runtime-tool-declaration.d.ts} +32 -9
- package/dist/tools/runtime-tool-declaration.d.ts.map +1 -0
- package/dist/tools/runtime-tool-mcp.d.ts +6 -15
- package/dist/tools/runtime-tool-mcp.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +14 -12
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools/schema/coerce.d.ts +4 -0
- package/dist/tools/schema/coerce.d.ts.map +1 -1
- package/dist/tools/schema/flatten-join.d.ts.map +1 -1
- package/dist/tools/surface.d.ts +7 -11
- package/dist/tools/surface.d.ts.map +1 -1
- package/dist/tools/transfer/define-download-tool.d.ts +1 -1
- package/dist/tools/transfer/define-download-tool.d.ts.map +1 -1
- package/dist/tools/transfer/define-upload-tool.d.ts +1 -1
- package/dist/tools/transfer/define-upload-tool.d.ts.map +1 -1
- package/dist/tools/transfer/define-view-file-tool.d.ts +1 -1
- package/dist/tools/transfer/define-view-file-tool.d.ts.map +1 -1
- package/dist/tools/transfer/managed-file-error.d.ts.map +1 -1
- package/dist/tools/transfer/view-file-contract.d.ts.map +1 -1
- package/dist/tools/transfer/view-file.d.ts +1 -1
- package/dist/tools/transfer/view-file.d.ts.map +1 -1
- package/dist/tools/transports.d.ts +3 -2
- package/dist/tools/transports.d.ts.map +1 -1
- package/llms/agent-runtime-browser.txt +10 -4
- package/llms/agent-runtime-harness.txt +32 -31
- package/llms/agent-runtime-react.txt +1 -1
- package/llms/agent-runtime-realtime.txt +14 -5
- package/llms/agent-runtime-sandbox.txt +3 -11
- package/llms/agent-runtime.3.txt +2 -2
- package/llms/agent-runtime.txt +0 -9
- package/llms/application.2.txt +3 -12
- package/llms/application.3.txt +7 -4
- package/llms/application.txt +44 -15
- package/llms/cli-publish.txt +29 -0
- package/llms/cli.2.txt +9 -11
- package/llms/cli.txt +26 -14
- package/llms/declaration.txt +0 -9
- package/llms/files-packaging.txt +22 -7
- package/llms/files.txt +4 -2
- package/llms/geo.txt +0 -9
- package/llms/live.txt +4 -13
- package/llms/observability.txt +31 -5
- package/llms/primitives.txt +38 -20
- package/llms/process.txt +305 -154
- package/llms/react-keyboard.txt +0 -9
- package/llms/react.txt +0 -18
- package/llms/server.4.txt +1 -1
- package/llms/server.5.txt +1 -1
- package/llms/server.txt +1 -1
- package/llms/stitchkit.txt +6 -7
- package/llms/telegram-screens.txt +2 -2
- package/llms/testing.txt +0 -1
- package/llms/tools-mcp.txt +2 -3
- package/llms/tools.2.txt +12 -0
- package/llms/tools.3.txt +5 -6
- package/llms/tools.txt +6 -4
- package/llms/upgrading-0.37.0-0.50.0.txt +947 -0
- package/llms/{upgrading-0.44.0-0.61.0.txt → upgrading-0.53.0-0.67.0.txt} +576 -506
- package/llms/{upgrading-0.62.0-0.80.0.txt → upgrading-0.68.0-0.94.0.txt} +562 -576
- package/llms/{upgrading-0.81.0-0.104.0.txt → upgrading-0.95.0-0.105.0.txt} +452 -567
- package/llms/upgrading.txt +4 -4
- package/llms-full.txt +1053 -405
- package/llms.txt +24 -24
- package/native-assets.json +11 -3
- package/package.json +6 -6
- package/dist/agent-runtime/harness-tools.d.ts +0 -11
- package/dist/agent-runtime/harness-tools.d.ts.map +0 -1
- package/dist/entrypoints/agent-runtime/harness-tools.d.ts +0 -2
- package/dist/entrypoints/agent-runtime/harness-tools.d.ts.map +0 -1
- package/dist/entrypoints/agent-runtime/harness-tools.js +0 -32
- package/dist/index-1a6jtnd9.js +0 -88
- package/dist/index-8a9ksm91.js +0 -95
- package/dist/index-a3wma1hk.js +0 -48
- package/dist/index-jd470k6q.js +0 -109
- package/dist/index-n1dqr7gf.js +0 -20
- package/dist/index-nggfa2yn.js +0 -34
- package/dist/index-s4evrmp5.js +0 -98
- package/dist/index-ze1eph1k.js +0 -20
- package/dist/tools/connections/error-projection.d.ts +0 -4
- package/dist/tools/connections/error-projection.d.ts.map +0 -1
- package/dist/tools/runtime-tool-execution.d.ts.map +0 -1
- package/llms/agent-runtime-harness-tools.txt +0 -25
- package/llms/upgrading-0.37.0-0.44.0.txt +0 -444
|
@@ -1,36 +1,73 @@
|
|
|
1
|
-
import"../../index-
|
|
2
|
-
import"../../index-
|
|
1
|
+
import"../../index-j9gxbztg.js";
|
|
2
|
+
import"../../index-pzb63z66.js";
|
|
3
3
|
import"../../index-4s0fep5q.js";
|
|
4
4
|
import"../../index-814xpr6d.js";
|
|
5
5
|
import"../../index-8kzct1d6.js";
|
|
6
6
|
import"../../index-mnkk1ffz.js";
|
|
7
|
-
import"../../index-
|
|
7
|
+
import"../../index-b0w7rbpt.js";
|
|
8
8
|
import {
|
|
9
9
|
agentControlRealtimeContract2
|
|
10
|
-
} from "../../index-
|
|
11
|
-
import"../../index-
|
|
10
|
+
} from "../../index-yt7gyg5x.js";
|
|
11
|
+
import"../../index-qaet40b2.js";
|
|
12
12
|
import {
|
|
13
13
|
createAgentHarnessControlServer2
|
|
14
|
-
} from "../../index-
|
|
14
|
+
} from "../../index-hjvje0pf.js";
|
|
15
|
+
import"../../index-299sm5tr.js";
|
|
15
16
|
import {
|
|
16
17
|
bindRealtimeServer2
|
|
17
|
-
} from "../../index-
|
|
18
|
-
import
|
|
18
|
+
} from "../../index-z23rfxhj.js";
|
|
19
|
+
import {
|
|
20
|
+
withSignalDeadline
|
|
21
|
+
} from "../../index-9tqbxv5p.js";
|
|
22
|
+
import {
|
|
23
|
+
raceAbort
|
|
24
|
+
} from "../../index-b0kddvzw.js";
|
|
25
|
+
import {
|
|
26
|
+
MAX_TIMER_MS
|
|
27
|
+
} from "../../index-eemvahkc.js";
|
|
28
|
+
import {
|
|
29
|
+
assertPositiveSafeInteger
|
|
30
|
+
} from "../../index-0s4xebbg.js";
|
|
19
31
|
|
|
20
32
|
// src/agent-runtime/harness-realtime.ts
|
|
33
|
+
async function askAuthorizationHook(input) {
|
|
34
|
+
const { config, identity, request, source, timeoutMs, report } = input;
|
|
35
|
+
const settled = new AbortController;
|
|
36
|
+
try {
|
|
37
|
+
return await withSignalDeadline(timeoutMs, undefined, () => new Error("Agent authorization timed out"), (deadline) => {
|
|
38
|
+
const signal = AbortSignal.any([deadline, settled.signal]);
|
|
39
|
+
return raceAbort(Promise.resolve().then(() => config.authorize({ identity, request, source, signal })), signal);
|
|
40
|
+
});
|
|
41
|
+
} catch (error) {
|
|
42
|
+
report(error);
|
|
43
|
+
return null;
|
|
44
|
+
} finally {
|
|
45
|
+
settled.abort();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
21
48
|
function bindAgentHarnessRealtime(harness, handle, config) {
|
|
22
49
|
const control = createAgentHarnessControlServer2(harness, config);
|
|
23
50
|
const realtime = bindRealtimeServer2(agentControlRealtimeContract2, handle);
|
|
24
51
|
const cleanups = new Set;
|
|
52
|
+
const sockets = new Set;
|
|
25
53
|
const maxPending = config.maxPendingRequests ?? 32;
|
|
26
54
|
const authTimeout = config.authorizationTimeoutMs ?? 1e4;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
55
|
+
assertPositiveSafeInteger("maxPendingRequests", maxPending);
|
|
56
|
+
assertPositiveSafeInteger("authorizationTimeoutMs", authTimeout);
|
|
57
|
+
if (authTimeout > MAX_TIMER_MS) {
|
|
58
|
+
throw new RangeError("authorizationTimeoutMs exceeds the timer range");
|
|
30
59
|
}
|
|
31
60
|
const unsubscribe = realtime.onConnection(({ raw, events }) => {
|
|
32
61
|
let closed = false;
|
|
62
|
+
const grants = {
|
|
63
|
+
identity: raw.data,
|
|
64
|
+
granted: new Set,
|
|
65
|
+
revocations: new Map,
|
|
66
|
+
refused: new Set
|
|
67
|
+
};
|
|
68
|
+
sockets.add(grants);
|
|
33
69
|
const pending = new Set;
|
|
70
|
+
const deciding = new Map;
|
|
34
71
|
const report = (error) => {
|
|
35
72
|
try {
|
|
36
73
|
if (config.onError)
|
|
@@ -44,42 +81,64 @@ function bindAgentHarnessRealtime(harness, handle, config) {
|
|
|
44
81
|
});
|
|
45
82
|
}
|
|
46
83
|
};
|
|
47
|
-
const authorize = async (request) => {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
return null;
|
|
60
|
-
} finally {
|
|
61
|
-
abort.abort();
|
|
62
|
-
if (timer !== undefined)
|
|
63
|
-
clearTimeout(timer);
|
|
84
|
+
const authorize = async (request, source = "request") => {
|
|
85
|
+
const startedAt = grants.revocations.get(request.conversationId) ?? 0;
|
|
86
|
+
let allowed = await askAuthorizationHook({
|
|
87
|
+
config,
|
|
88
|
+
identity: raw.data,
|
|
89
|
+
request,
|
|
90
|
+
source,
|
|
91
|
+
timeoutMs: authTimeout,
|
|
92
|
+
report
|
|
93
|
+
});
|
|
94
|
+
if (allowed && (grants.revocations.get(request.conversationId) ?? 0) !== startedAt) {
|
|
95
|
+
allowed = null;
|
|
64
96
|
}
|
|
97
|
+
if (allowed && request.operation !== "detach") {
|
|
98
|
+
grants.granted.add(request.conversationId);
|
|
99
|
+
if (request.operation === "attach")
|
|
100
|
+
grants.refused.delete(request.conversationId);
|
|
101
|
+
} else
|
|
102
|
+
grants.granted.delete(request.conversationId);
|
|
103
|
+
return allowed;
|
|
65
104
|
};
|
|
66
105
|
const connection = control.connect({
|
|
67
106
|
id: raw.id,
|
|
68
107
|
async deliver(delivery) {
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
requestId: crypto.randomUUID(),
|
|
72
|
-
operation: "snapshot",
|
|
73
|
-
conversationId: delivery.event.conversationId
|
|
74
|
-
});
|
|
75
|
-
if (!allowed) {
|
|
76
|
-
await connection.request({
|
|
77
|
-
schemaVersion: 1,
|
|
78
|
-
requestId: crypto.randomUUID(),
|
|
79
|
-
operation: "detach",
|
|
80
|
-
conversationId: delivery.event.conversationId
|
|
81
|
-
});
|
|
108
|
+
const { conversationId } = delivery.event;
|
|
109
|
+
if (grants.refused.has(conversationId))
|
|
82
110
|
return;
|
|
111
|
+
if (!grants.granted.has(conversationId)) {
|
|
112
|
+
let decision = deciding.get(conversationId);
|
|
113
|
+
if (!decision) {
|
|
114
|
+
decision = authorize({
|
|
115
|
+
schemaVersion: 1,
|
|
116
|
+
requestId: crypto.randomUUID(),
|
|
117
|
+
operation: "snapshot",
|
|
118
|
+
conversationId
|
|
119
|
+
}, "delivery").finally(() => deciding.delete(conversationId));
|
|
120
|
+
deciding.set(conversationId, decision);
|
|
121
|
+
}
|
|
122
|
+
const allowed = await decision;
|
|
123
|
+
if (!allowed) {
|
|
124
|
+
if (grants.refused.has(conversationId))
|
|
125
|
+
return;
|
|
126
|
+
grants.refused.add(conversationId);
|
|
127
|
+
await connection.request({
|
|
128
|
+
schemaVersion: 1,
|
|
129
|
+
requestId: crypto.randomUUID(),
|
|
130
|
+
operation: "detach",
|
|
131
|
+
conversationId
|
|
132
|
+
});
|
|
133
|
+
if (!closed) {
|
|
134
|
+
events.emit("agent:delivery", {
|
|
135
|
+
schemaVersion: 1,
|
|
136
|
+
type: "access-denied",
|
|
137
|
+
conversationId
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
83
142
|
}
|
|
84
143
|
if (!closed)
|
|
85
144
|
events.emit("agent:delivery", delivery);
|
|
@@ -97,6 +156,7 @@ function bindAgentHarnessRealtime(harness, handle, config) {
|
|
|
97
156
|
error: { code, message }
|
|
98
157
|
});
|
|
99
158
|
if (request.operation === "detach") {
|
|
159
|
+
grants.granted.delete(request.conversationId);
|
|
100
160
|
for (const entry of pending)
|
|
101
161
|
if (entry.conversationId === request.conversationId)
|
|
102
162
|
entry.cancelled = true;
|
|
@@ -112,21 +172,17 @@ function bindAgentHarnessRealtime(harness, handle, config) {
|
|
|
112
172
|
const allowed = await authorize(request);
|
|
113
173
|
if (entry.cancelled)
|
|
114
174
|
return fail("REQUEST_CANCELLED", "Agent request was detached");
|
|
115
|
-
if (!allowed
|
|
116
|
-
|
|
117
|
-
await connection.request({
|
|
118
|
-
schemaVersion: 1,
|
|
119
|
-
requestId: crypto.randomUUID(),
|
|
120
|
-
operation: "detach",
|
|
121
|
-
conversationId: request.conversationId
|
|
122
|
-
});
|
|
123
|
-
return {
|
|
175
|
+
if (!allowed) {
|
|
176
|
+
await connection.request({
|
|
124
177
|
schemaVersion: 1,
|
|
125
|
-
requestId:
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
};
|
|
178
|
+
requestId: crypto.randomUUID(),
|
|
179
|
+
operation: "detach",
|
|
180
|
+
conversationId: request.conversationId
|
|
181
|
+
});
|
|
182
|
+
return fail("FORBIDDEN", "Agent access denied");
|
|
129
183
|
}
|
|
184
|
+
if (closed)
|
|
185
|
+
return fail("CONNECTION_CLOSED", "Connection is closed");
|
|
130
186
|
return connection.request(request.operation === "submit" || request.operation === "respond-approval" ? { ...request, context: allowed.context } : request);
|
|
131
187
|
};
|
|
132
188
|
execute().then(ack).catch(report).finally(() => {
|
|
@@ -137,6 +193,7 @@ function bindAgentHarnessRealtime(harness, handle, config) {
|
|
|
137
193
|
if (closed)
|
|
138
194
|
return;
|
|
139
195
|
closed = true;
|
|
196
|
+
sockets.delete(grants);
|
|
140
197
|
offRequest();
|
|
141
198
|
raw.off("disconnect", close);
|
|
142
199
|
connection.close();
|
|
@@ -146,6 +203,14 @@ function bindAgentHarnessRealtime(harness, handle, config) {
|
|
|
146
203
|
cleanups.add(close);
|
|
147
204
|
});
|
|
148
205
|
return {
|
|
206
|
+
revoke(conversationId, matches) {
|
|
207
|
+
for (const socket of sockets) {
|
|
208
|
+
if (matches && !matches(socket.identity))
|
|
209
|
+
continue;
|
|
210
|
+
socket.granted.delete(conversationId);
|
|
211
|
+
socket.revocations.set(conversationId, (socket.revocations.get(conversationId) ?? 0) + 1);
|
|
212
|
+
}
|
|
213
|
+
},
|
|
149
214
|
close() {
|
|
150
215
|
unsubscribe();
|
|
151
216
|
for (const close of cleanups)
|
|
@@ -2,23 +2,29 @@ import {
|
|
|
2
2
|
probeAgentProcessSandbox2,
|
|
3
3
|
missingSandboxRestrictions2,
|
|
4
4
|
codingRefusal
|
|
5
|
-
} from "../../index-
|
|
6
|
-
import"../../index-
|
|
5
|
+
} from "../../index-8ks9b85e.js";
|
|
6
|
+
import"../../index-j9gxbztg.js";
|
|
7
7
|
import"../../index-ct75c3at.js";
|
|
8
|
-
import"../../index-
|
|
9
|
-
import"../../index-
|
|
8
|
+
import"../../index-r393tnfp.js";
|
|
9
|
+
import"../../index-rpzewktb.js";
|
|
10
10
|
import {
|
|
11
11
|
createAgentCodingTools2
|
|
12
|
-
} from "../../index-
|
|
12
|
+
} from "../../index-ma963wz7.js";
|
|
13
13
|
import"../../index-v5ee8ath.js";
|
|
14
|
+
import"../../index-cq59agna.js";
|
|
14
15
|
import {
|
|
16
|
+
COMMAND_CLEANUP_TIMEOUT_MS,
|
|
15
17
|
NativeCommandError2,
|
|
16
18
|
spawnOwnedCommand,
|
|
17
19
|
nativeCommandOwner,
|
|
20
|
+
terminateOwnedGroup,
|
|
18
21
|
startNativeCommand
|
|
19
|
-
} from "../../index-
|
|
22
|
+
} from "../../index-g2vfg7ak.js";
|
|
20
23
|
import"../../index-gxm9rc97.js";
|
|
21
|
-
import
|
|
24
|
+
import {
|
|
25
|
+
MAX_TIMER_MS
|
|
26
|
+
} from "../../index-eemvahkc.js";
|
|
27
|
+
import"../../index-yvfk3y36.js";
|
|
22
28
|
|
|
23
29
|
// src/agent-runtime/sandbox-bubblewrap.ts
|
|
24
30
|
import { mkdir as mkdir2, mkdtemp, realpath, rm as rm2 } from "node:fs/promises";
|
|
@@ -65,7 +71,7 @@ var SandboxCommandSchema = z.object({
|
|
|
65
71
|
args: z.array(z.string()).optional(),
|
|
66
72
|
cwd: z.string().optional(),
|
|
67
73
|
environment: z.record(z.string(), z.string()).optional(),
|
|
68
|
-
timeoutMs: z.number().int().positive().max(
|
|
74
|
+
timeoutMs: z.number().int().positive().max(MAX_TIMER_MS).optional(),
|
|
69
75
|
maxOutputBytes: z.number().int().positive().optional()
|
|
70
76
|
}).strict();
|
|
71
77
|
|
|
@@ -521,7 +527,7 @@ function spawnSandboxProcess(executable, args, limits, options = {}, onSpawn) {
|
|
|
521
527
|
capture: true,
|
|
522
528
|
envPolicy: "declared-only",
|
|
523
529
|
env: {},
|
|
524
|
-
|
|
530
|
+
stop: { target: "group", graceMs: 0 },
|
|
525
531
|
...options.stdin !== undefined ? {
|
|
526
532
|
stdin: typeof options.stdin === "string" ? new TextEncoder().encode(options.stdin) : options.stdin,
|
|
527
533
|
maxStdinBytes: Math.max(1, typeof options.stdin === "string" ? Buffer.byteLength(options.stdin) : options.stdin.byteLength)
|
|
@@ -550,14 +556,14 @@ function sandboxProcessOwner(assertActive, maximum) {
|
|
|
550
556
|
if (children.size >= maximum)
|
|
551
557
|
throw new SandboxError("SANDBOX_BUSY", "Sandbox command concurrency limit reached");
|
|
552
558
|
};
|
|
553
|
-
const terminate = (child) =>
|
|
554
|
-
const owner = nativeCommandOwner(child) ?? startNativeCommand({ executable: "host-owned-command", signal: new AbortController().signal }, undefined, { launch: () => child, group: process.platform !== "win32", force: true });
|
|
555
|
-
return owner.terminate();
|
|
556
|
-
};
|
|
559
|
+
const terminate = (child, closeEvent) => nativeCommandOwner(child)?.terminate() ?? terminateOwnedGroup(child, closeEvent, COMMAND_CLEANUP_TIMEOUT_MS);
|
|
557
560
|
const track = (child) => {
|
|
561
|
+
const closeEvent = new Promise((resolve) => {
|
|
562
|
+
child.once("close", () => resolve());
|
|
563
|
+
});
|
|
558
564
|
const settleDirect = () => {
|
|
559
565
|
if (!nativeCommandOwner(child))
|
|
560
|
-
terminate(child).catch(() => {
|
|
566
|
+
terminate(child, closeEvent).catch(() => {
|
|
561
567
|
return;
|
|
562
568
|
});
|
|
563
569
|
};
|
|
@@ -582,7 +588,7 @@ function sandboxProcessOwner(assertActive, maximum) {
|
|
|
582
588
|
closed.catch(() => {
|
|
583
589
|
return;
|
|
584
590
|
});
|
|
585
|
-
children.set(child, closed);
|
|
591
|
+
children.set(child, { closed, closeEvent });
|
|
586
592
|
};
|
|
587
593
|
return {
|
|
588
594
|
admit,
|
|
@@ -605,8 +611,8 @@ function sandboxProcessOwner(assertActive, maximum) {
|
|
|
605
611
|
},
|
|
606
612
|
async stop() {
|
|
607
613
|
const pending = [...children];
|
|
608
|
-
await Promise.all(pending.map(([child]) => terminate(child)));
|
|
609
|
-
await Promise.all(pending.map(([, closed]) => closed));
|
|
614
|
+
await Promise.all(pending.map(([child, { closeEvent }]) => terminate(child, closeEvent)));
|
|
615
|
+
await Promise.all(pending.map(([, { closed }]) => closed));
|
|
610
616
|
}
|
|
611
617
|
};
|
|
612
618
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import"../../../index-
|
|
1
|
+
import"../../../index-0gs4ymfj.js";
|
|
2
2
|
import"../../../index-8kzct1d6.js";
|
|
3
|
-
import"../../../index-
|
|
3
|
+
import"../../../index-d2h99n7d.js";
|
|
4
4
|
import {
|
|
5
5
|
initializeAgentRuntimeSqlite2,
|
|
6
6
|
createSqliteAgentRuntimeStore2
|
|
7
|
-
} from "../../../index-
|
|
7
|
+
} from "../../../index-c0hffcmj.js";
|
|
8
8
|
import"../../../index-kqnd6a85.js";
|
|
9
|
+
import"../../../index-5w6t91ze.js";
|
|
9
10
|
|
|
10
11
|
// src/agent-runtime/sqlite-bun.ts
|
|
11
12
|
import { Database } from "bun:sqlite";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import"../../../index-
|
|
1
|
+
import"../../../index-0gs4ymfj.js";
|
|
2
2
|
import"../../../index-8kzct1d6.js";
|
|
3
|
-
import"../../../index-
|
|
3
|
+
import"../../../index-d2h99n7d.js";
|
|
4
4
|
import {
|
|
5
5
|
initializeAgentRuntimeSqlite2,
|
|
6
6
|
createSqliteAgentRuntimeStore2
|
|
7
|
-
} from "../../../index-
|
|
7
|
+
} from "../../../index-c0hffcmj.js";
|
|
8
8
|
import"../../../index-kqnd6a85.js";
|
|
9
|
+
import"../../../index-5w6t91ze.js";
|
|
9
10
|
|
|
10
11
|
// src/agent-runtime/sqlite-node.ts
|
|
11
12
|
import { DatabaseSync } from "node:sqlite";
|
|
@@ -7,11 +7,15 @@ import {
|
|
|
7
7
|
decodeAgentConversationArchive2,
|
|
8
8
|
createToolChronology,
|
|
9
9
|
advanceToolChronology
|
|
10
|
-
} from "../../index-
|
|
11
|
-
import"../../index-
|
|
10
|
+
} from "../../index-0gs4ymfj.js";
|
|
11
|
+
import"../../index-5w6t91ze.js";
|
|
12
|
+
import"../../index-d2h99n7d.js";
|
|
12
13
|
import {
|
|
13
14
|
createMemoryAgentRuntimeStore2
|
|
14
|
-
} from "../../index-
|
|
15
|
+
} from "../../index-5p55xreg.js";
|
|
16
|
+
import {
|
|
17
|
+
assertPositiveSafeInteger
|
|
18
|
+
} from "../../index-0s4xebbg.js";
|
|
15
19
|
|
|
16
20
|
// src/agent-runtime/fault-bench.ts
|
|
17
21
|
import { createServer } from "node:http";
|
|
@@ -1093,9 +1097,7 @@ async function archiveScenario(store, conversationId) {
|
|
|
1093
1097
|
}
|
|
1094
1098
|
// src/agent-runtime/testing.ts
|
|
1095
1099
|
function createAgentRaceBarrier(timeoutMs = 5000) {
|
|
1096
|
-
|
|
1097
|
-
throw new TypeError("Agent race barrier timeoutMs must be a positive safe integer");
|
|
1098
|
-
}
|
|
1100
|
+
assertPositiveSafeInteger("Agent race barrier timeoutMs", timeoutMs);
|
|
1099
1101
|
const reached = Promise.withResolvers();
|
|
1100
1102
|
const released = Promise.withResolvers();
|
|
1101
1103
|
let announced = false;
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
AgentHistoryMutationSchema2,
|
|
48
48
|
ACTIVE_AGENT_RUN_STATES2,
|
|
49
49
|
createAgentRuntimeStore2
|
|
50
|
-
} from "../index-
|
|
50
|
+
} from "../index-d2h99n7d.js";
|
|
51
51
|
import {
|
|
52
52
|
AgentStoreEventKindSchema2,
|
|
53
53
|
AgentStoreEventEnvelopeSchema2,
|
|
@@ -79,7 +79,8 @@ import {
|
|
|
79
79
|
decodeAgentConversationArchive2,
|
|
80
80
|
isAssistantHistoryEvidence2,
|
|
81
81
|
isCompleteAgentHistoryTurn
|
|
82
|
-
} from "../index-
|
|
82
|
+
} from "../index-0gs4ymfj.js";
|
|
83
|
+
import"../index-5w6t91ze.js";
|
|
83
84
|
import {
|
|
84
85
|
AgentRuntimeConflictError2,
|
|
85
86
|
normalizeSdkUsage,
|
|
@@ -110,30 +111,39 @@ import {
|
|
|
110
111
|
agentGoalStateSlot2,
|
|
111
112
|
agentTodoStateSlot2,
|
|
112
113
|
createAgentRuntime2
|
|
113
|
-
} from "../index-
|
|
114
|
+
} from "../index-gr5g3xfw.js";
|
|
114
115
|
import {
|
|
115
116
|
AgentConversationSummarySchema2,
|
|
116
117
|
AgentConversationPageSchema2,
|
|
117
118
|
AgentConversationMessagePageSchema2
|
|
118
119
|
} from "../index-kqnd6a85.js";
|
|
119
|
-
import
|
|
120
|
-
|
|
121
|
-
|
|
120
|
+
import {
|
|
121
|
+
DURABILITY_STEP_EVENT_KIND2,
|
|
122
|
+
StepResultDecodeError2,
|
|
123
|
+
StepResultNotSerializableError2,
|
|
124
|
+
StepAbortedError2,
|
|
125
|
+
ParkRecordDecodeError2,
|
|
126
|
+
ParkAbortedError2
|
|
127
|
+
} from "../index-c17xcx4k.js";
|
|
128
|
+
import"../index-j9gxbztg.js";
|
|
129
|
+
import"../index-rpzewktb.js";
|
|
122
130
|
import {
|
|
123
131
|
createTraceContext2,
|
|
124
132
|
childSpan2
|
|
125
133
|
} from "../index-yex7eg1v.js";
|
|
126
|
-
import"../index-
|
|
134
|
+
import"../index-6yxhe58g.js";
|
|
127
135
|
import"../index-ct75c3at.js";
|
|
128
|
-
import"../index-
|
|
129
|
-
import"../index-
|
|
130
|
-
import"../index-
|
|
136
|
+
import"../index-r393tnfp.js";
|
|
137
|
+
import"../index-2k91mewf.js";
|
|
138
|
+
import"../index-556g5hsh.js";
|
|
139
|
+
import"../index-wbhdzxar.js";
|
|
131
140
|
import {
|
|
132
|
-
mountAgent2
|
|
133
|
-
|
|
141
|
+
mountAgent2,
|
|
142
|
+
buildToolManifest2
|
|
143
|
+
} from "../index-qaqbdm7s.js";
|
|
134
144
|
import {
|
|
135
145
|
createBoundedSinkManager
|
|
136
|
-
} from "../index-
|
|
146
|
+
} from "../index-qaet40b2.js";
|
|
137
147
|
import {
|
|
138
148
|
AgentAdmissionEventSchema2,
|
|
139
149
|
AgentTransientDeltaEventSchema2,
|
|
@@ -168,14 +178,6 @@ import {
|
|
|
168
178
|
defineModelRegistry2,
|
|
169
179
|
validateAgentModelSnapshot2
|
|
170
180
|
} from "../index-nx6eazt0.js";
|
|
171
|
-
import {
|
|
172
|
-
DURABILITY_STEP_EVENT_KIND2,
|
|
173
|
-
StepResultDecodeError2,
|
|
174
|
-
StepResultNotSerializableError2,
|
|
175
|
-
StepAbortedError2,
|
|
176
|
-
ParkRecordDecodeError2,
|
|
177
|
-
ParkAbortedError2
|
|
178
|
-
} from "../index-pptyv13k.js";
|
|
179
181
|
import {
|
|
180
182
|
AgentSandboxRestrictionSchema2,
|
|
181
183
|
AgentSandboxGradeSchema2,
|
|
@@ -183,21 +185,24 @@ import {
|
|
|
183
185
|
missingSandboxRestrictions2,
|
|
184
186
|
recordAgentSandboxProbe2,
|
|
185
187
|
refuseUnknownSpillReference
|
|
186
|
-
} from "../index-
|
|
188
|
+
} from "../index-8ks9b85e.js";
|
|
187
189
|
import {
|
|
188
190
|
createMemoryAgentRuntimeStore2
|
|
189
|
-
} from "../index-
|
|
191
|
+
} from "../index-5p55xreg.js";
|
|
190
192
|
import {
|
|
191
193
|
createAgentRuntimeEventSink2
|
|
192
|
-
} from "../index-
|
|
194
|
+
} from "../index-299sm5tr.js";
|
|
193
195
|
import {
|
|
194
|
-
|
|
195
|
-
} from "../index-
|
|
196
|
-
import
|
|
196
|
+
MAX_TIMER_MS
|
|
197
|
+
} from "../index-eemvahkc.js";
|
|
198
|
+
import {
|
|
199
|
+
assertPositiveSafeInteger
|
|
200
|
+
} from "../index-0s4xebbg.js";
|
|
201
|
+
import"../index-pz3y6b6g.js";
|
|
197
202
|
import {
|
|
198
203
|
defineRuntimeTool2,
|
|
199
204
|
executableAgentRuntimeTools
|
|
200
|
-
} from "../index-
|
|
205
|
+
} from "../index-yvfk3y36.js";
|
|
201
206
|
import"../index-7n68nmc6.js";
|
|
202
207
|
|
|
203
208
|
// src/agent-runtime/child-tools.ts
|
|
@@ -952,13 +957,9 @@ function mutationSnapshot(result, fallback, attempts) {
|
|
|
952
957
|
return { outcome: result.outcome, snapshot: fallback, attempts };
|
|
953
958
|
}
|
|
954
959
|
function structuredCompaction(config) {
|
|
955
|
-
|
|
956
|
-
throw new TypeError("keepRecentTurns must be a positive safe integer");
|
|
957
|
-
}
|
|
960
|
+
assertPositiveSafeInteger("keepRecentTurns", config.keepRecentTurns);
|
|
958
961
|
const maxAttempts = config.maxAttempts ?? 1;
|
|
959
|
-
|
|
960
|
-
throw new TypeError("maxAttempts must be a positive safe integer");
|
|
961
|
-
}
|
|
962
|
+
assertPositiveSafeInteger("maxAttempts", maxAttempts);
|
|
962
963
|
return async (input) => {
|
|
963
964
|
let lastSnapshot = await input.store.loadSnapshot(input.conversationId);
|
|
964
965
|
for (let attempt = 1;attempt <= maxAttempts; attempt += 1) {
|
|
@@ -2066,9 +2067,7 @@ function newSchedule(request, observedAt) {
|
|
|
2066
2067
|
const kind = request.at !== undefined ? "at" : request.afterMs !== undefined ? "after" : "every";
|
|
2067
2068
|
const intervalMs = request.everyMs;
|
|
2068
2069
|
const delay = request.afterMs ?? request.everyMs;
|
|
2069
|
-
|
|
2070
|
-
throw new TypeError("Schedule delay must be a positive safe integer");
|
|
2071
|
-
}
|
|
2070
|
+
assertPositiveSafeInteger("Schedule delay", delay);
|
|
2072
2071
|
const nextAt = request.at ? new Date(z10.iso.datetime({ offset: true }).parse(request.at)).toISOString() : new Date(observedAt.getTime() + (delay ?? 0)).toISOString();
|
|
2073
2072
|
const schedule = AgentScheduleSchema.parse({
|
|
2074
2073
|
id: randomUUID2(),
|
|
@@ -2333,7 +2332,7 @@ function createAgentScheduleService(input) {
|
|
|
2333
2332
|
timer = setTimer(() => {
|
|
2334
2333
|
timer = undefined;
|
|
2335
2334
|
tick();
|
|
2336
|
-
}, Math.min(Math.max(0, dueAt - now().getTime()),
|
|
2335
|
+
}, Math.min(Math.max(0, dueAt - now().getTime()), MAX_TIMER_MS));
|
|
2337
2336
|
};
|
|
2338
2337
|
const runTick = async () => {
|
|
2339
2338
|
if (lifecycle.signal.aborted || now().getTime() < recoveryAt)
|