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
package/llms.txt
CHANGED
|
@@ -10,61 +10,61 @@ Load the slice for each entrypoint your code imports — `import … from 'stitc
|
|
|
10
10
|
|
|
11
11
|
## Entrypoint slices
|
|
12
12
|
- **stitchkit**: [llms/stitchkit.txt](llms/stitchkit.txt) 17.6 KB → [llms/stitchkit.2.txt](llms/stitchkit.2.txt) 46.2 KB → [llms/stitchkit.3.txt](llms/stitchkit.3.txt) 17.1 KB
|
|
13
|
-
- **stitchkit/live**: [llms/live.txt](llms/live.txt) 21.
|
|
14
|
-
- **stitchkit/react**: [llms/react.txt](llms/react.txt)
|
|
15
|
-
- **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 9.
|
|
16
|
-
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 46.
|
|
13
|
+
- **stitchkit/live**: [llms/live.txt](llms/live.txt) 21.2 KB
|
|
14
|
+
- **stitchkit/react**: [llms/react.txt](llms/react.txt) 8.6 KB
|
|
15
|
+
- **stitchkit/react/keyboard**: [llms/react-keyboard.txt](llms/react-keyboard.txt) 9.2 KB
|
|
16
|
+
- **stitchkit/tools**: [llms/tools.txt](llms/tools.txt) 46.2 KB → [llms/tools.2.txt](llms/tools.2.txt) 30.4 KB → [llms/tools.3.txt](llms/tools.3.txt) 26.2 KB
|
|
17
17
|
- **stitchkit/tools/mcp**: [llms/tools-mcp.txt](llms/tools-mcp.txt) 1.8 KB
|
|
18
18
|
- **stitchkit/tools/contract**: [llms/tools-contract.txt](llms/tools-contract.txt) 0.2 KB
|
|
19
19
|
- **stitchkit/tools/invoker**: [llms/tools-invoker.txt](llms/tools-invoker.txt) 0.2 KB
|
|
20
20
|
- **stitchkit/tools/connections**: [llms/tools-connections.txt](llms/tools-connections.txt) 3.7 KB
|
|
21
|
-
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt)
|
|
21
|
+
- **stitchkit/cli**: [llms/cli.txt](llms/cli.txt) 47.0 KB → [llms/cli.2.txt](llms/cli.2.txt) 15.4 KB
|
|
22
|
+
- **stitchkit/cli/publish**: [llms/cli-publish.txt](llms/cli-publish.txt) 1.5 KB
|
|
22
23
|
- **stitchkit/remote**: [llms/remote.txt](llms/remote.txt) 1.0 KB
|
|
23
24
|
- **stitchkit/contract**: [llms/contract.txt](llms/contract.txt) 31.9 KB
|
|
24
|
-
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 11.
|
|
25
|
-
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 45.3 KB → [llms/server.2.txt](llms/server.2.txt) 14.6 KB → [llms/server.3.txt](llms/server.3.txt) 45.6 KB → [llms/server.4.txt](llms/server.4.txt) 38.3 KB → [llms/server.5.txt](llms/server.5.txt) 22.
|
|
26
|
-
- **stitchkit/observability**: [llms/observability.txt](llms/observability.txt)
|
|
27
|
-
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 37.
|
|
25
|
+
- **stitchkit/primitives**: [llms/primitives.txt](llms/primitives.txt) 11.7 KB
|
|
26
|
+
- **stitchkit/server**: [llms/server.txt](llms/server.txt) 45.3 KB → [llms/server.2.txt](llms/server.2.txt) 14.6 KB → [llms/server.3.txt](llms/server.3.txt) 45.6 KB → [llms/server.4.txt](llms/server.4.txt) 38.3 KB → [llms/server.5.txt](llms/server.5.txt) 22.1 KB
|
|
27
|
+
- **stitchkit/observability**: [llms/observability.txt](llms/observability.txt) 45.9 KB
|
|
28
|
+
- **stitchkit/agent-runtime**: [llms/agent-runtime.txt](llms/agent-runtime.txt) 37.0 KB → [llms/agent-runtime.2.txt](llms/agent-runtime.2.txt) 46.7 KB → [llms/agent-runtime.3.txt](llms/agent-runtime.3.txt) 34.7 KB
|
|
28
29
|
- **stitchkit/agent-runtime/testing**: [llms/agent-runtime-testing.txt](llms/agent-runtime-testing.txt) 2.6 KB
|
|
29
|
-
- **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt)
|
|
30
|
+
- **stitchkit/agent-runtime/harness**: [llms/agent-runtime-harness.txt](llms/agent-runtime-harness.txt) 11.0 KB
|
|
30
31
|
- **stitchkit/agent-runtime/coding-tools**: [llms/agent-runtime-coding-tools.txt](llms/agent-runtime-coding-tools.txt) 4.9 KB
|
|
31
|
-
- **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt) 3.
|
|
32
|
+
- **stitchkit/agent-runtime/browser**: [llms/agent-runtime-browser.txt](llms/agent-runtime-browser.txt) 3.8 KB
|
|
32
33
|
- **stitchkit/agent-runtime/openrouter**: [llms/agent-runtime-openrouter.txt](llms/agent-runtime-openrouter.txt) 1.1 KB
|
|
33
34
|
- **stitchkit/agent-runtime/sqlite/bun**: [llms/agent-runtime-sqlite-bun.txt](llms/agent-runtime-sqlite-bun.txt) 1.8 KB
|
|
34
35
|
- **stitchkit/agent-runtime/sqlite/node**: [llms/agent-runtime-sqlite-node.txt](llms/agent-runtime-sqlite-node.txt) 1.7 KB
|
|
35
|
-
- **stitchkit/application**: [llms/application.txt](llms/application.txt)
|
|
36
|
+
- **stitchkit/application**: [llms/application.txt](llms/application.txt) 39.6 KB → [llms/application.2.txt](llms/application.2.txt) 30.7 KB → [llms/application.3.txt](llms/application.3.txt) 29.0 KB
|
|
36
37
|
- **stitchkit/application/grammy**: [llms/application-grammy.txt](llms/application-grammy.txt) 2.3 KB
|
|
37
38
|
- **stitchkit/application/opentelemetry**: [llms/application-opentelemetry.txt](llms/application-opentelemetry.txt) 1.6 KB
|
|
38
39
|
- **stitchkit/application/directory-inbox**: [llms/application-directory-inbox.txt](llms/application-directory-inbox.txt) 0.3 KB
|
|
39
40
|
- **stitchkit/application/diagnostic-journal**: [llms/application-diagnostic-journal.txt](llms/application-diagnostic-journal.txt) 1.8 KB
|
|
40
41
|
- **stitchkit/application/schemas**: [llms/application-schemas.txt](llms/application-schemas.txt) 1.8 KB
|
|
41
|
-
- **stitchkit/testing**: [llms/testing.txt](llms/testing.txt) 30.
|
|
42
|
+
- **stitchkit/testing**: [llms/testing.txt](llms/testing.txt) 30.7 KB
|
|
42
43
|
- **stitchkit/agent-runtime/sandbox**: [llms/agent-runtime-sandbox.txt](llms/agent-runtime-sandbox.txt) 8.3 KB
|
|
43
|
-
- **stitchkit/files**: [llms/files.txt](llms/files.txt)
|
|
44
|
+
- **stitchkit/files**: [llms/files.txt](llms/files.txt) 5.5 KB
|
|
44
45
|
- **stitchkit/telegram**: [llms/telegram.txt](llms/telegram.txt) 30.1 KB
|
|
45
46
|
- **stitchkit/telegram/html**: [llms/telegram-html.txt](llms/telegram-html.txt) 2.7 KB
|
|
46
47
|
- **stitchkit/telegram/screens**: [llms/telegram-screens.txt](llms/telegram-screens.txt) 21.2 KB
|
|
47
48
|
- **stitchkit/tracking**: [llms/tracking.txt](llms/tracking.txt) 16.8 KB
|
|
48
49
|
- **stitchkit/release**: [llms/release.txt](llms/release.txt) 8.9 KB
|
|
49
50
|
- **stitchkit/tracking/server**: [llms/tracking-server.txt](llms/tracking-server.txt) 2.5 KB
|
|
50
|
-
- **stitchkit/geo**: [llms/geo.txt](llms/geo.txt) 4.
|
|
51
|
+
- **stitchkit/geo**: [llms/geo.txt](llms/geo.txt) 4.1 KB
|
|
51
52
|
- **stitchkit/voice**: [llms/voice.txt](llms/voice.txt) 5.2 KB
|
|
52
53
|
- **stitchkit/oauth**: [llms/oauth.txt](llms/oauth.txt) 6.7 KB
|
|
53
54
|
- **stitchkit/google**: [llms/google.txt](llms/google.txt) 1.4 KB
|
|
54
|
-
- **stitchkit/declaration**: [llms/declaration.txt](llms/declaration.txt)
|
|
55
|
+
- **stitchkit/declaration**: [llms/declaration.txt](llms/declaration.txt) 15.7 KB
|
|
55
56
|
- **stitchkit/node**: [llms/node.txt](llms/node.txt) 3.1 KB
|
|
56
57
|
- **stitchkit/agent-runtime/react**: [llms/agent-runtime-react.txt](llms/agent-runtime-react.txt) 1.0 KB
|
|
57
|
-
- **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt)
|
|
58
|
-
- **stitchkit/
|
|
59
|
-
- **stitchkit/
|
|
60
|
-
- **stitchkit/files/packaging**: [llms/files-packaging.txt](llms/files-packaging.txt) 1.5 KB
|
|
58
|
+
- **stitchkit/agent-runtime/realtime**: [llms/agent-runtime-realtime.txt](llms/agent-runtime-realtime.txt) 2.6 KB
|
|
59
|
+
- **stitchkit/process**: [llms/process.txt](llms/process.txt) 32.8 KB
|
|
60
|
+
- **stitchkit/files/packaging**: [llms/files-packaging.txt](llms/files-packaging.txt) 2.7 KB
|
|
61
61
|
|
|
62
62
|
## Upgrading slices
|
|
63
63
|
- **Upgrading — how to move across versions**: [llms/upgrading.txt](llms/upgrading.txt) 10.3 KB
|
|
64
|
-
- **Upgrading 0.
|
|
65
|
-
- **Upgrading 0.
|
|
66
|
-
- **Upgrading 0.
|
|
67
|
-
- **Upgrading 0.37.0 → 0.
|
|
64
|
+
- **Upgrading 0.95.0 → 0.105.0**: [llms/upgrading-0.95.0-0.105.0.txt](llms/upgrading-0.95.0-0.105.0.txt) 46.8 KB
|
|
65
|
+
- **Upgrading 0.68.0 → 0.94.0**: [llms/upgrading-0.68.0-0.94.0.txt](llms/upgrading-0.68.0-0.94.0.txt) 46.5 KB
|
|
66
|
+
- **Upgrading 0.53.0 → 0.67.0**: [llms/upgrading-0.53.0-0.67.0.txt](llms/upgrading-0.53.0-0.67.0.txt) 46.1 KB
|
|
67
|
+
- **Upgrading 0.37.0 → 0.50.0**: [llms/upgrading-0.37.0-0.50.0.txt](llms/upgrading-0.37.0-0.50.0.txt) 31.6 KB
|
|
68
68
|
|
|
69
69
|
## Guide (web)
|
|
70
70
|
- [Getting started](https://github.com/max-listov/stitchkit/blob/master/docs/guide/getting-started.md): install, entrypoints, and a first contract → server → client app
|
package/native-assets.json
CHANGED
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
{
|
|
2
|
-
"formatVersion":
|
|
2
|
+
"formatVersion": 2,
|
|
3
3
|
"loader": "darwin-native.cjs",
|
|
4
4
|
"assets": {
|
|
5
|
-
"arm64":
|
|
6
|
-
|
|
5
|
+
"arm64": {
|
|
6
|
+
"path": "native/darwin-arm64.node",
|
|
7
|
+
"size": 52784,
|
|
8
|
+
"sha256": "65eb5ee5f09e47edb4bee9ddd43dca7fdf0c85676e74648a6d31f6cb70a08219"
|
|
9
|
+
},
|
|
10
|
+
"x64": {
|
|
11
|
+
"path": "native/darwin-x64.node",
|
|
12
|
+
"size": 19512,
|
|
13
|
+
"sha256": "87e9c264e7f504d170d03d32a8ac47c77377603e5216f3503e24df9126fa590c"
|
|
14
|
+
}
|
|
7
15
|
}
|
|
8
16
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stitchkit",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.105.0",
|
|
4
4
|
"description": "Contract-first backend framework — one defineContract() into an HTTP API, MCP tools, AI-agent tools and a typed client. Bun and Node.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"bun",
|
|
@@ -96,6 +96,10 @@
|
|
|
96
96
|
"types": "./dist/entrypoints/cli.d.ts",
|
|
97
97
|
"import": "./dist/entrypoints/cli.js"
|
|
98
98
|
},
|
|
99
|
+
"./cli/publish": {
|
|
100
|
+
"types": "./dist/entrypoints/cli/publish.d.ts",
|
|
101
|
+
"import": "./dist/entrypoints/cli/publish.js"
|
|
102
|
+
},
|
|
99
103
|
"./remote": {
|
|
100
104
|
"types": "./dist/entrypoints/remote.d.ts",
|
|
101
105
|
"import": "./dist/entrypoints/remote.js"
|
|
@@ -240,10 +244,6 @@
|
|
|
240
244
|
"types": "./dist/entrypoints/agent-runtime/realtime.d.ts",
|
|
241
245
|
"import": "./dist/entrypoints/agent-runtime/realtime.js"
|
|
242
246
|
},
|
|
243
|
-
"./agent-runtime/harness-tools": {
|
|
244
|
-
"types": "./dist/entrypoints/agent-runtime/harness-tools.d.ts",
|
|
245
|
-
"import": "./dist/entrypoints/agent-runtime/harness-tools.js"
|
|
246
|
-
},
|
|
247
247
|
"./process": {
|
|
248
248
|
"types": "./dist/entrypoints/process.d.ts",
|
|
249
249
|
"import": "./dist/entrypoints/process.js"
|
|
@@ -271,7 +271,7 @@
|
|
|
271
271
|
"consumer-lane": "bun scripts/consumer-lane/run.mjs",
|
|
272
272
|
"bench:mcp-preparation": "bun scripts/benchmark-mcp-preparation.ts",
|
|
273
273
|
"bench:durable-store": "bun scripts/bench-durable-store.ts",
|
|
274
|
-
"build:entrypoints": "bun scripts/generate-native-
|
|
274
|
+
"build:entrypoints": "bun scripts/generate-native-assets.ts && bun scripts/build-entrypoints.mjs"
|
|
275
275
|
},
|
|
276
276
|
"peerDependencies": {
|
|
277
277
|
"@modelcontextprotocol/ext-apps": "^1.7.2 || ^2.0.0",
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ToolSet } from 'ai';
|
|
2
|
-
import type { ServiceDef } from '../server/types.js';
|
|
3
|
-
import { type AgentMountConfig } from '../tools/agent.js';
|
|
4
|
-
import type { AgentRuntimeRunContext } from './runtime.js';
|
|
5
|
-
/** Full mount configuration, resolved from the validated context of each run. */
|
|
6
|
-
export interface AgentHarnessToolsConfig extends AgentMountConfig {
|
|
7
|
-
services: ServiceDef | ServiceDef[];
|
|
8
|
-
}
|
|
9
|
-
/** Mount through the existing tool runner, always retaining the run's execution fence. */
|
|
10
|
-
export declare function createAgentHarnessTools<CONTEXT>(resolve: (run: AgentRuntimeRunContext<CONTEXT>) => AgentHarnessToolsConfig | Promise<AgentHarnessToolsConfig>): (run: AgentRuntimeRunContext<CONTEXT>) => Promise<ToolSet>;
|
|
11
|
-
//# sourceMappingURL=harness-tools.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"harness-tools.d.ts","sourceRoot":"","sources":["../../src/agent-runtime/harness-tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAClC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,KAAK,gBAAgB,EAAc,MAAM,gBAAgB,CAAC;AAEnE,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AAExD,iFAAiF;AACjF,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,QAAQ,EAAE,UAAU,GAAG,UAAU,EAAE,CAAC;CACrC;AAED,0FAA0F;AAC1F,wBAAgB,uBAAuB,CAAC,OAAO,EAC7C,OAAO,EAAE,CACP,GAAG,EAAE,sBAAsB,CAAC,OAAO,CAAC,KACjC,uBAAuB,GAAG,OAAO,CAAC,uBAAuB,CAAC,GAC9D,CAAC,GAAG,EAAE,sBAAsB,CAAC,OAAO,CAAC,KAAK,OAAO,CAAC,OAAO,CAAC,CAQ5D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"harness-tools.d.ts","sourceRoot":"","sources":["../../../src/entrypoints/agent-runtime/harness-tools.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAC5B,uBAAuB,GACxB,MAAM,mCAAmC,CAAC"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import"../../index-nggfa2yn.js";
|
|
2
|
-
import"../../index-x928baz2.js";
|
|
3
|
-
import"../../index-kb8styz3.js";
|
|
4
|
-
import"../../index-yex7eg1v.js";
|
|
5
|
-
import"../../index-9pw0a51a.js";
|
|
6
|
-
import"../../index-ct75c3at.js";
|
|
7
|
-
import"../../index-77nxk6ay.js";
|
|
8
|
-
import"../../index-2vnh05w4.js";
|
|
9
|
-
import"../../index-2hyavjjj.js";
|
|
10
|
-
import {
|
|
11
|
-
mountAgent2
|
|
12
|
-
} from "../../index-t1sr4aks.js";
|
|
13
|
-
import {
|
|
14
|
-
composeToolLifecycle2
|
|
15
|
-
} from "../../index-ze1eph1k.js";
|
|
16
|
-
import"../../index-a0zzh8ak.js";
|
|
17
|
-
import"../../index-cvda079a.js";
|
|
18
|
-
import"../../index-7n68nmc6.js";
|
|
19
|
-
|
|
20
|
-
// src/agent-runtime/harness-tools.ts
|
|
21
|
-
function createAgentHarnessTools(resolve) {
|
|
22
|
-
return async (run) => {
|
|
23
|
-
const { services, lifecycle, ...config } = await resolve(run);
|
|
24
|
-
return mountAgent2(services, {
|
|
25
|
-
...config,
|
|
26
|
-
lifecycle: composeToolLifecycle2(lifecycle, run.toolFenceLifecycle)
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
export {
|
|
31
|
-
createAgentHarnessTools
|
|
32
|
-
};
|
package/dist/index-1a6jtnd9.js
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
// src/tools/connections/errors.ts
|
|
2
|
-
class ConnectionAuthorizationRequiredError2 extends Error {
|
|
3
|
-
connectionName;
|
|
4
|
-
instanceId;
|
|
5
|
-
operation;
|
|
6
|
-
phase;
|
|
7
|
-
constructor(connectionName, instanceId, context = {}) {
|
|
8
|
-
super(`Connection "${connectionName}" requires authorization`);
|
|
9
|
-
this.name = "ConnectionAuthorizationRequiredError";
|
|
10
|
-
this.connectionName = connectionName;
|
|
11
|
-
this.instanceId = instanceId;
|
|
12
|
-
this.operation = context.operation ?? "request";
|
|
13
|
-
this.phase = context.phase ?? "call";
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
class ConnectionRequestError2 extends Error {
|
|
18
|
-
connectionName;
|
|
19
|
-
status;
|
|
20
|
-
body;
|
|
21
|
-
operation;
|
|
22
|
-
phase;
|
|
23
|
-
constructor(connectionName, status, body, context = {}) {
|
|
24
|
-
super(`Connection "${connectionName}" request failed with status ${status}`);
|
|
25
|
-
this.name = "ConnectionRequestError";
|
|
26
|
-
this.connectionName = connectionName;
|
|
27
|
-
this.status = status;
|
|
28
|
-
this.body = body;
|
|
29
|
-
this.operation = context.operation ?? "request";
|
|
30
|
-
this.phase = context.phase ?? "call";
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
class ConnectionUrlError2 extends Error {
|
|
35
|
-
url;
|
|
36
|
-
constructor(message, url) {
|
|
37
|
-
super(message);
|
|
38
|
-
this.name = "ConnectionUrlError";
|
|
39
|
-
this.url = url;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
class ConnectionBudgetExceededError2 extends Error {
|
|
44
|
-
limit;
|
|
45
|
-
actual;
|
|
46
|
-
constructor(limit, actual, unit = "tools") {
|
|
47
|
-
super(`Connection surface exposes ${actual} ${unit}, above the budget of ${limit}`);
|
|
48
|
-
this.name = "ConnectionBudgetExceededError";
|
|
49
|
-
this.limit = limit;
|
|
50
|
-
this.actual = actual;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
class ConnectionTimeoutError2 extends Error {
|
|
55
|
-
connectionName;
|
|
56
|
-
timeoutMs;
|
|
57
|
-
operation;
|
|
58
|
-
phase;
|
|
59
|
-
observedReadBytes;
|
|
60
|
-
constructor(connectionName, timeoutMs, context = {}) {
|
|
61
|
-
super(`Connection "${connectionName}" timed out after ${timeoutMs} ms`);
|
|
62
|
-
this.name = "ConnectionTimeoutError";
|
|
63
|
-
this.connectionName = connectionName;
|
|
64
|
-
this.timeoutMs = timeoutMs;
|
|
65
|
-
this.operation = context.operation ?? "request";
|
|
66
|
-
this.phase = context.phase ?? "call";
|
|
67
|
-
this.observedReadBytes = context.observedReadBytes ?? 0;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
class ConnectionResponseTooLargeError2 extends Error {
|
|
72
|
-
connectionName;
|
|
73
|
-
maxBytes;
|
|
74
|
-
operation;
|
|
75
|
-
phase;
|
|
76
|
-
observedReadBytes;
|
|
77
|
-
constructor(connectionName, maxBytes, context = {}) {
|
|
78
|
-
super(`Connection "${connectionName}" response exceeded the ${maxBytes} byte limit`);
|
|
79
|
-
this.name = "ConnectionResponseTooLargeError";
|
|
80
|
-
this.connectionName = connectionName;
|
|
81
|
-
this.maxBytes = maxBytes;
|
|
82
|
-
this.operation = context.operation ?? "request";
|
|
83
|
-
this.phase = context.phase ?? "call";
|
|
84
|
-
this.observedReadBytes = context.observedReadBytes ?? 0;
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export { ConnectionAuthorizationRequiredError2, ConnectionRequestError2, ConnectionUrlError2, ConnectionBudgetExceededError2, ConnectionTimeoutError2, ConnectionResponseTooLargeError2 };
|
package/dist/index-8a9ksm91.js
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
// src/internal/atomic-publication.ts
|
|
2
|
-
import { closeSync, fsyncSync, linkSync, openSync, renameSync, unlinkSync } from "node:fs";
|
|
3
|
-
import { link, open, rename, unlink } from "node:fs/promises";
|
|
4
|
-
import { dirname } from "node:path";
|
|
5
|
-
|
|
6
|
-
class AtomicFilePublicationError2 extends Error {
|
|
7
|
-
phase;
|
|
8
|
-
published = true;
|
|
9
|
-
constructor(phase, cause) {
|
|
10
|
-
super(`File published but ${phase} failed`, { cause });
|
|
11
|
-
this.phase = phase;
|
|
12
|
-
this.name = "AtomicFilePublicationError";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
var native = { rename, link, unlink, open };
|
|
16
|
-
async function publishAtomicFile(staged, target, replace, directorySync, io = native) {
|
|
17
|
-
if (directorySync && process.platform === "win32")
|
|
18
|
-
throw new Error("Directory durability is unsupported on Windows");
|
|
19
|
-
const directory = directorySync ? await io.open(dirname(target), "r") : undefined;
|
|
20
|
-
let failed = false;
|
|
21
|
-
let failure;
|
|
22
|
-
try {
|
|
23
|
-
if (replace)
|
|
24
|
-
await io.rename(staged, target);
|
|
25
|
-
else {
|
|
26
|
-
await io.link(staged, target);
|
|
27
|
-
try {
|
|
28
|
-
await io.unlink(staged);
|
|
29
|
-
} catch (error) {
|
|
30
|
-
throw new AtomicFilePublicationError2("cleanup", error);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
try {
|
|
34
|
-
await directory?.sync();
|
|
35
|
-
} catch (error) {
|
|
36
|
-
throw new AtomicFilePublicationError2("directory-sync", error);
|
|
37
|
-
}
|
|
38
|
-
} catch (error) {
|
|
39
|
-
failed = true;
|
|
40
|
-
failure = error;
|
|
41
|
-
} finally {
|
|
42
|
-
try {
|
|
43
|
-
await directory?.close();
|
|
44
|
-
} catch (error) {
|
|
45
|
-
if (!failed) {
|
|
46
|
-
failed = true;
|
|
47
|
-
failure = new AtomicFilePublicationError2("directory-close", error);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
if (failed)
|
|
52
|
-
throw failure;
|
|
53
|
-
}
|
|
54
|
-
function publishAtomicFileSync(staged, target, replace, directorySync) {
|
|
55
|
-
if (directorySync && process.platform === "win32")
|
|
56
|
-
throw new Error("Directory durability is unsupported on Windows");
|
|
57
|
-
const directory = directorySync ? openSync(dirname(target), "r") : undefined;
|
|
58
|
-
let failed = false;
|
|
59
|
-
let failure;
|
|
60
|
-
try {
|
|
61
|
-
if (replace)
|
|
62
|
-
renameSync(staged, target);
|
|
63
|
-
else {
|
|
64
|
-
linkSync(staged, target);
|
|
65
|
-
try {
|
|
66
|
-
unlinkSync(staged);
|
|
67
|
-
} catch (error) {
|
|
68
|
-
throw new AtomicFilePublicationError2("cleanup", error);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
try {
|
|
72
|
-
if (directory !== undefined)
|
|
73
|
-
fsyncSync(directory);
|
|
74
|
-
} catch (error) {
|
|
75
|
-
throw new AtomicFilePublicationError2("directory-sync", error);
|
|
76
|
-
}
|
|
77
|
-
} catch (error) {
|
|
78
|
-
failed = true;
|
|
79
|
-
failure = error;
|
|
80
|
-
} finally {
|
|
81
|
-
try {
|
|
82
|
-
if (directory !== undefined)
|
|
83
|
-
closeSync(directory);
|
|
84
|
-
} catch (error) {
|
|
85
|
-
if (!failed) {
|
|
86
|
-
failed = true;
|
|
87
|
-
failure = new AtomicFilePublicationError2("directory-close", error);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
if (failed)
|
|
92
|
-
throw failure;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
export { AtomicFilePublicationError2, publishAtomicFile, publishAtomicFileSync };
|
package/dist/index-a3wma1hk.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
collectToolSurface
|
|
3
|
-
} from "./index-a0zzh8ak.js";
|
|
4
|
-
|
|
5
|
-
// src/tools/manifest.ts
|
|
6
|
-
function utf8Length(value) {
|
|
7
|
-
return new TextEncoder().encode(JSON.stringify(value)).byteLength;
|
|
8
|
-
}
|
|
9
|
-
function describeToolCatalog2(config) {
|
|
10
|
-
const deferred = new Set(config.deferredNames ?? []);
|
|
11
|
-
const entries = collectToolSurface({
|
|
12
|
-
surface: config,
|
|
13
|
-
transport: config.transport,
|
|
14
|
-
extend: config.extend,
|
|
15
|
-
flattenUnionInput: config.flattenUnionInput
|
|
16
|
-
}).map(({ kind, service, action, mountable }) => {
|
|
17
|
-
const schemaBytes = utf8Length(mountable.presentationSchema);
|
|
18
|
-
return {
|
|
19
|
-
name: mountable.name,
|
|
20
|
-
description: mountable.method.desc,
|
|
21
|
-
inputSchema: mountable.presentationSchema,
|
|
22
|
-
source: { kind, service, action },
|
|
23
|
-
schemaBytes,
|
|
24
|
-
deferred: deferred.has(mountable.name)
|
|
25
|
-
};
|
|
26
|
-
});
|
|
27
|
-
if (config.maxSchemaBytes !== undefined) {
|
|
28
|
-
const total = entries.reduce((sum, entry) => sum + entry.schemaBytes, 0);
|
|
29
|
-
if (total > config.maxSchemaBytes) {
|
|
30
|
-
throw new TypeError(`Tool catalog schemas use ${total} bytes, exceeding maxSchemaBytes ${config.maxSchemaBytes}`);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
return entries;
|
|
34
|
-
}
|
|
35
|
-
function buildToolManifest2(config) {
|
|
36
|
-
return collectToolSurface({
|
|
37
|
-
surface: config,
|
|
38
|
-
transport: config.transport,
|
|
39
|
-
extend: config.extend,
|
|
40
|
-
flattenUnionInput: config.flattenUnionInput
|
|
41
|
-
}).map(({ mountable }) => ({
|
|
42
|
-
name: mountable.name,
|
|
43
|
-
description: mountable.method.desc,
|
|
44
|
-
inputSchema: mountable.presentationSchema
|
|
45
|
-
}));
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { describeToolCatalog2, buildToolManifest2 };
|
package/dist/index-jd470k6q.js
DELETED
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
// src/internal/bounded-file-read.ts
|
|
2
|
-
import { constants } from "node:fs";
|
|
3
|
-
import { open } from "node:fs/promises";
|
|
4
|
-
|
|
5
|
-
class BoundedFileReadError extends Error {
|
|
6
|
-
code;
|
|
7
|
-
observation;
|
|
8
|
-
constructor(code, message, observation) {
|
|
9
|
-
super(message);
|
|
10
|
-
this.code = code;
|
|
11
|
-
this.observation = observation;
|
|
12
|
-
this.name = "BoundedFileReadError";
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
var observationOf = (info) => ({
|
|
16
|
-
dev: info.dev,
|
|
17
|
-
ino: info.ino,
|
|
18
|
-
size: info.size,
|
|
19
|
-
nlink: info.nlink,
|
|
20
|
-
mtimeMs: info.mtimeMs,
|
|
21
|
-
ctimeMs: info.ctimeMs
|
|
22
|
-
});
|
|
23
|
-
async function readBoundedFile(target, maxBytes, options = {}, openDescriptor = open) {
|
|
24
|
-
if (options.rejectSymlinks && !constants.O_NOFOLLOW)
|
|
25
|
-
throw new BoundedFileReadError("FILE_UNSUPPORTED", "strict leaf nofollow is unavailable");
|
|
26
|
-
options.signal?.throwIfAborted();
|
|
27
|
-
const flags = constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0) | (constants.O_NONBLOCK ?? 0);
|
|
28
|
-
const handle = await openDescriptor(target, flags);
|
|
29
|
-
let failed = false;
|
|
30
|
-
let failure;
|
|
31
|
-
let before;
|
|
32
|
-
let source;
|
|
33
|
-
try {
|
|
34
|
-
options.signal?.throwIfAborted();
|
|
35
|
-
before = await handle.stat();
|
|
36
|
-
if (!before.isFile())
|
|
37
|
-
throw new BoundedFileReadError("FILE_NOT_REGULAR", "managed path is not a regular file");
|
|
38
|
-
if (options.singleLink && before.nlink !== 1)
|
|
39
|
-
throw new BoundedFileReadError("FILE_UNSAFE_LINK", "managed file has multiple links");
|
|
40
|
-
if (before.size > maxBytes)
|
|
41
|
-
throw new BoundedFileReadError("FILE_TOO_LARGE", `file exceeds the ${maxBytes}-byte cap`);
|
|
42
|
-
const bytes = await readHandle(handle, maxBytes, options.signal);
|
|
43
|
-
const after = await handle.stat();
|
|
44
|
-
if (options.stable && (before.dev !== after.dev || before.ino !== after.ino || before.size !== after.size || before.mtimeMs !== after.mtimeMs || before.ctimeMs !== after.ctimeMs || before.nlink !== after.nlink || bytes.length !== after.size))
|
|
45
|
-
throw new BoundedFileReadError("FILE_CHANGED", "managed file changed during read");
|
|
46
|
-
options.signal?.throwIfAborted();
|
|
47
|
-
source = { bytes, observation: observationOf(after) };
|
|
48
|
-
} catch (error) {
|
|
49
|
-
failed = true;
|
|
50
|
-
failure = error;
|
|
51
|
-
if (error instanceof BoundedFileReadError && error.code === "FILE_TOO_LARGE" && before) {
|
|
52
|
-
const after = await handle.stat().catch(() => {
|
|
53
|
-
return;
|
|
54
|
-
});
|
|
55
|
-
if (after?.isFile() && after.dev === before.dev && after.ino === before.ino && after.nlink === 1)
|
|
56
|
-
failure = new BoundedFileReadError(error.code, error.message, observationOf(after));
|
|
57
|
-
}
|
|
58
|
-
} finally {
|
|
59
|
-
try {
|
|
60
|
-
await handle.close();
|
|
61
|
-
} catch (error) {
|
|
62
|
-
if (!failed) {
|
|
63
|
-
failed = true;
|
|
64
|
-
failure = error;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
if (failed)
|
|
69
|
-
throw failure;
|
|
70
|
-
if (source === undefined)
|
|
71
|
-
throw new Error("Read completed without a result");
|
|
72
|
-
return source;
|
|
73
|
-
}
|
|
74
|
-
async function readHandle(handle, maxBytes, signal) {
|
|
75
|
-
const chunks = [];
|
|
76
|
-
let total = 0;
|
|
77
|
-
let ended = false;
|
|
78
|
-
while (!ended) {
|
|
79
|
-
const capacity = Math.min(64 * 1024, maxBytes + 1 - total);
|
|
80
|
-
if (capacity <= 0)
|
|
81
|
-
throw new BoundedFileReadError("FILE_TOO_LARGE", `file exceeds the ${maxBytes}-byte cap`);
|
|
82
|
-
const chunk = new Uint8Array(capacity);
|
|
83
|
-
let filled = 0;
|
|
84
|
-
while (filled < capacity) {
|
|
85
|
-
signal?.throwIfAborted();
|
|
86
|
-
const { bytesRead } = await handle.read(chunk, filled, capacity - filled);
|
|
87
|
-
if (bytesRead === 0) {
|
|
88
|
-
ended = true;
|
|
89
|
-
break;
|
|
90
|
-
}
|
|
91
|
-
filled += bytesRead;
|
|
92
|
-
total += bytesRead;
|
|
93
|
-
if (total > maxBytes)
|
|
94
|
-
throw new BoundedFileReadError("FILE_TOO_LARGE", `file exceeds the ${maxBytes}-byte cap`);
|
|
95
|
-
}
|
|
96
|
-
if (filled > 0)
|
|
97
|
-
chunks.push(chunk.subarray(0, filled));
|
|
98
|
-
}
|
|
99
|
-
signal?.throwIfAborted();
|
|
100
|
-
const bytes = new Uint8Array(total);
|
|
101
|
-
let offset = 0;
|
|
102
|
-
for (const chunk of chunks) {
|
|
103
|
-
bytes.set(chunk, offset);
|
|
104
|
-
offset += chunk.byteLength;
|
|
105
|
-
}
|
|
106
|
-
return bytes;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export { BoundedFileReadError, readBoundedFile };
|
package/dist/index-n1dqr7gf.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
// src/internal/deadline.ts
|
|
2
|
-
async function withDeadline(value, timeoutMs) {
|
|
3
|
-
if (!(value instanceof Promise))
|
|
4
|
-
return { settled: true, value };
|
|
5
|
-
let timer;
|
|
6
|
-
const expiry = new Promise((resolve) => {
|
|
7
|
-
timer = setTimeout(() => resolve({ settled: false }), timeoutMs);
|
|
8
|
-
});
|
|
9
|
-
try {
|
|
10
|
-
return await Promise.race([
|
|
11
|
-
value.then((settledValue) => ({ settled: true, value: settledValue })),
|
|
12
|
-
expiry
|
|
13
|
-
]);
|
|
14
|
-
} finally {
|
|
15
|
-
if (timer !== undefined)
|
|
16
|
-
clearTimeout(timer);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export { withDeadline };
|
package/dist/index-nggfa2yn.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
// src/tools/agent-tool-error.ts
|
|
2
|
-
var AGENT_TOOL_ERROR_BRAND = Symbol.for("stitchkit.AgentToolError");
|
|
3
|
-
|
|
4
|
-
class AgentToolError2 extends Error {
|
|
5
|
-
output;
|
|
6
|
-
constructor(output, cause) {
|
|
7
|
-
let message = "Tool execution failed";
|
|
8
|
-
try {
|
|
9
|
-
message = JSON.stringify(output);
|
|
10
|
-
} catch {}
|
|
11
|
-
super(message, cause === undefined ? undefined : { cause });
|
|
12
|
-
this.name = "AgentToolError";
|
|
13
|
-
this.output = output;
|
|
14
|
-
Object.defineProperty(this, AGENT_TOOL_ERROR_BRAND, { value: true });
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
function isAgentToolError2(value) {
|
|
18
|
-
return typeof value === "object" && value !== null && AGENT_TOOL_ERROR_BRAND in value;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
// src/tools/durability-context.ts
|
|
22
|
-
var contexts = new WeakMap;
|
|
23
|
-
function createToolDurabilityContext(factory) {
|
|
24
|
-
const context = {};
|
|
25
|
-
contexts.set(context, factory);
|
|
26
|
-
return context;
|
|
27
|
-
}
|
|
28
|
-
function resolveToolDurability(context, callId, signal) {
|
|
29
|
-
if (typeof context !== "object" || context === null)
|
|
30
|
-
return;
|
|
31
|
-
return contexts.get(context)?.(callId, signal);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export { AgentToolError2, isAgentToolError2, createToolDurabilityContext, resolveToolDurability };
|