stitchkit 0.94.0 → 0.95.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 +104 -0
- package/dist/agent-runtime/coding-shell-process.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-listing.d.ts.map +1 -1
- package/dist/agent-runtime/coding-tool-search-patch.d.ts.map +1 -1
- package/dist/agent-runtime/contained-darwin.d.ts +38 -0
- package/dist/agent-runtime/contained-darwin.d.ts.map +1 -0
- package/dist/agent-runtime/contained-files.d.ts +11 -26
- package/dist/agent-runtime/contained-files.d.ts.map +1 -1
- package/dist/agent-runtime/contained-scan.d.ts +21 -0
- package/dist/agent-runtime/contained-scan.d.ts.map +1 -0
- package/dist/agent-runtime/contained-write.d.ts +9 -0
- package/dist/agent-runtime/contained-write.d.ts.map +1 -0
- package/dist/agent-runtime/deferred-tool-types.d.ts +3 -2
- package/dist/agent-runtime/deferred-tool-types.d.ts.map +1 -1
- package/dist/agent-runtime/harness-control.d.ts +0 -1
- package/dist/agent-runtime/harness-control.d.ts.map +1 -1
- package/dist/agent-runtime/harness.d.ts +0 -5
- package/dist/agent-runtime/harness.d.ts.map +1 -1
- package/dist/agent-runtime/managed-tools.d.ts +3 -2
- package/dist/agent-runtime/managed-tools.d.ts.map +1 -1
- package/dist/agent-runtime/provider-origin.d.ts +7 -0
- package/dist/agent-runtime/provider-origin.d.ts.map +1 -1
- package/dist/agent-runtime/run-operation-lifecycle.d.ts.map +1 -1
- package/dist/agent-runtime/runtime.d.ts +1 -1
- package/dist/agent-runtime/runtime.d.ts.map +1 -1
- package/dist/agent-runtime/schedule-records.d.ts +34 -0
- package/dist/agent-runtime/schedule-records.d.ts.map +1 -0
- package/dist/agent-runtime/schedules.d.ts +34 -0
- package/dist/agent-runtime/schedules.d.ts.map +1 -1
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts +434 -0
- package/dist/agent-runtime/store-conformance-lifecycle.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-ordering.d.ts +18 -0
- package/dist/agent-runtime/store-conformance-ordering.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-support.d.ts +130 -0
- package/dist/agent-runtime/store-conformance-support.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance-terminal.d.ts +12 -0
- package/dist/agent-runtime/store-conformance-terminal.d.ts.map +1 -0
- package/dist/agent-runtime/store-conformance.d.ts.map +1 -1
- package/dist/application/admission-rate.d.ts +21 -0
- package/dist/application/admission-rate.d.ts.map +1 -0
- package/dist/application/admission-run.d.ts +8 -0
- package/dist/application/admission-run.d.ts.map +1 -0
- package/dist/application/admission.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-lock.d.ts +9 -34
- package/dist/application/diagnostic-journal-lock.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-manager.d.ts.map +1 -1
- package/dist/application/diagnostic-journal-storage.d.ts.map +1 -1
- package/dist/application/kernel-resource-context.d.ts.map +1 -1
- package/dist/application/notification-outbox.d.ts.map +1 -1
- package/dist/application/process-lifecycle-transitions.d.ts +175 -0
- package/dist/application/process-lifecycle-transitions.d.ts.map +1 -0
- package/dist/application/process-lifecycle.d.ts +3 -131
- package/dist/application/process-lifecycle.d.ts.map +1 -1
- package/dist/application/schedule.d.ts +0 -1
- package/dist/application/schedule.d.ts.map +1 -1
- package/dist/application/watch-hub-core.d.ts +122 -0
- package/dist/application/watch-hub-core.d.ts.map +1 -0
- package/dist/application/watch-hub.d.ts +2 -2
- package/dist/application/watch-hub.d.ts.map +1 -1
- package/dist/browser/client-executors.d.ts +14 -0
- package/dist/browser/client-executors.d.ts.map +1 -0
- package/dist/browser/client-multipart.d.ts +1 -1
- package/dist/browser/client-multipart.d.ts.map +1 -1
- package/dist/browser/client.d.ts +3 -2
- package/dist/browser/client.d.ts.map +1 -1
- package/dist/browser/http-fetch.d.ts +22 -0
- package/dist/browser/http-fetch.d.ts.map +1 -0
- package/dist/browser/http.d.ts +1 -3
- package/dist/browser/http.d.ts.map +1 -1
- package/dist/browser/live-state-core.d.ts +63 -0
- package/dist/browser/live-state-core.d.ts.map +1 -0
- package/dist/browser/live-state.d.ts.map +1 -1
- package/dist/browser/realtime-client.d.ts +26 -0
- package/dist/browser/realtime-client.d.ts.map +1 -0
- package/dist/browser/socket-io-connection.d.ts +82 -0
- package/dist/browser/socket-io-connection.d.ts.map +1 -0
- package/dist/browser/socket-io-peer.d.ts +20 -0
- package/dist/browser/socket-io-peer.d.ts.map +1 -0
- package/dist/browser/socket-io-trace.d.ts +31 -0
- package/dist/browser/socket-io-trace.d.ts.map +1 -0
- package/dist/browser/socket-io.d.ts +2 -18
- package/dist/browser/socket-io.d.ts.map +1 -1
- package/dist/contract/client-types.d.ts +134 -0
- package/dist/contract/client-types.d.ts.map +1 -0
- package/dist/contract/define-validation.d.ts +30 -0
- package/dist/contract/define-validation.d.ts.map +1 -0
- package/dist/contract/define.d.ts +3 -357
- package/dist/contract/define.d.ts.map +1 -1
- package/dist/contract/runtime-context.d.ts +131 -0
- package/dist/contract/runtime-context.d.ts.map +1 -0
- package/dist/contract/tool-options.d.ts +105 -0
- package/dist/contract/tool-options.d.ts.map +1 -0
- package/dist/contract/tool-view.d.ts +15 -2
- package/dist/contract/tool-view.d.ts.map +1 -1
- package/dist/durability/contract.d.ts +83 -0
- package/dist/durability/contract.d.ts.map +1 -1
- package/dist/durability/effect.d.ts +24 -0
- package/dist/durability/effect.d.ts.map +1 -0
- package/dist/durability/engine.d.ts +2 -2
- package/dist/durability/engine.d.ts.map +1 -1
- package/dist/durability/events.d.ts +2 -0
- package/dist/durability/events.d.ts.map +1 -1
- package/dist/durability/ledger.d.ts +11 -0
- package/dist/durability/ledger.d.ts.map +1 -1
- package/dist/durability/parks.d.ts +22 -0
- package/dist/durability/parks.d.ts.map +1 -0
- package/dist/durability/scheduler.d.ts +1 -0
- package/dist/durability/scheduler.d.ts.map +1 -1
- package/dist/entrypoints/agent-runtime/coding-tools.js +4 -4
- package/dist/entrypoints/agent-runtime/harness.js +127 -116
- package/dist/entrypoints/agent-runtime/sandbox.js +4 -4
- package/dist/entrypoints/agent-runtime/sqlite/bun.js +3 -3
- package/dist/entrypoints/agent-runtime/sqlite/node.js +3 -3
- package/dist/entrypoints/agent-runtime/testing.js +246 -214
- package/dist/entrypoints/agent-runtime.js +224 -203
- package/dist/entrypoints/application/diagnostic-journal.js +63 -203
- package/dist/entrypoints/application/opentelemetry.js +1 -1
- package/dist/entrypoints/application.d.ts +2 -1
- package/dist/entrypoints/application.d.ts.map +1 -1
- package/dist/entrypoints/application.js +506 -380
- package/dist/entrypoints/cli.d.ts +4 -1
- package/dist/entrypoints/cli.d.ts.map +1 -1
- package/dist/entrypoints/cli.js +57 -35
- package/dist/entrypoints/contract.d.ts +5 -2
- package/dist/entrypoints/contract.d.ts.map +1 -1
- package/dist/entrypoints/contract.js +3 -2
- package/dist/entrypoints/files.d.ts +2 -0
- package/dist/entrypoints/files.d.ts.map +1 -1
- package/dist/entrypoints/files.js +98 -2
- package/dist/entrypoints/index.d.ts +4 -2
- package/dist/entrypoints/index.d.ts.map +1 -1
- package/dist/entrypoints/index.js +348 -282
- package/dist/entrypoints/live.js +89 -71
- package/dist/entrypoints/node.d.ts +2 -1
- package/dist/entrypoints/node.d.ts.map +1 -1
- package/dist/entrypoints/node.js +13 -12
- package/dist/entrypoints/react.js +1 -1
- package/dist/entrypoints/remote.js +4 -4
- package/dist/entrypoints/server.d.ts +4 -2
- package/dist/entrypoints/server.d.ts.map +1 -1
- package/dist/entrypoints/server.js +293 -79
- package/dist/entrypoints/testing.d.ts +2 -1
- package/dist/entrypoints/testing.d.ts.map +1 -1
- package/dist/entrypoints/testing.js +288 -281
- package/dist/entrypoints/tools/connections.js +2 -2
- package/dist/entrypoints/tools/invoker.js +4 -4
- package/dist/entrypoints/tools.d.ts +6 -3
- package/dist/entrypoints/tools.d.ts.map +1 -1
- package/dist/entrypoints/tools.js +245 -202
- package/dist/entrypoints/tracking.js +325 -274
- package/dist/files/boundary.d.ts.map +1 -1
- package/dist/files/file-io.d.ts +14 -0
- package/dist/files/file-io.d.ts.map +1 -0
- package/dist/index-1j8pm5t0.js +412 -0
- package/dist/{index-kvj7f4hq.js → index-2bxbyab0.js} +10 -2
- package/dist/{index-xnj9bgxe.js → index-2gxzjvyr.js} +2 -162
- package/dist/index-4gcnakhx.js +82 -0
- package/dist/{index-j05z5gn4.js → index-55hkhm67.js} +136 -119
- package/dist/{index-cq4qfycf.js → index-79z7m7dt.js} +227 -59
- package/dist/{index-r7nmqpsg.js → index-7p1f0vp2.js} +1 -1
- package/dist/{index-dcpdvjsc.js → index-863ea9jb.js} +4 -4
- package/dist/index-8p52kd5p.js +242 -0
- package/dist/{index-97ac4gph.js → index-8zja4pkf.js} +26 -4
- package/dist/{index-2qzskm8h.js → index-dce5wxcq.js} +1 -1
- package/dist/index-e01r054k.js +105 -0
- package/dist/{index-sees8yf8.js → index-ensd0r74.js} +118 -111
- package/dist/{index-1nd48tm9.js → index-gxrt5h6v.js} +2 -1
- package/dist/{index-e87kakm4.js → index-ham5sz8m.js} +112 -110
- package/dist/{index-kj2wbeta.js → index-het2he5g.js} +280 -196
- package/dist/{index-vcvkq30w.js → index-hmp4800j.js} +3 -3
- package/dist/{index-gyr48nzg.js → index-k30h66yd.js} +71 -151
- package/dist/{index-2cr1cqhn.js → index-khtgb21r.js} +2 -2
- package/dist/{index-x4799c19.js → index-ndddxtyx.js} +11 -11
- package/dist/{index-dydjcp8z.js → index-np4m8hd3.js} +38 -36
- package/dist/{index-p81267c2.js → index-p3vsv1fb.js} +621 -357
- package/dist/{index-mp5sn43f.js → index-p9e0w8hs.js} +2 -2
- package/dist/{index-rewkc2hj.js → index-p9sh0xx4.js} +3 -3
- package/dist/{index-70yj2ebz.js → index-paz6sgdp.js} +107 -103
- package/dist/{index-bn2cjajt.js → index-px2gm2jp.js} +26 -102
- package/dist/index-s812ycat.js +65 -0
- package/dist/{index-xsqjkha9.js → index-sp1tzwnb.js} +2 -2
- package/dist/{index-n6hxg8as.js → index-t9rhjr9f.js} +615 -566
- package/dist/{index-zeemqhqx.js → index-v260df89.js} +88 -80
- package/dist/{index-fdp6hdxn.js → index-w906953s.js} +5 -1
- package/dist/{index-mdzh02yc.js → index-wdkt63w3.js} +1 -1
- package/dist/{index-58k4fp34.js → index-wsm5w4ee.js} +1 -1
- package/dist/{index-v38qyerb.js → index-xw3s75nj.js} +1 -1
- package/dist/internal/atomic-file.d.ts +23 -2
- package/dist/internal/atomic-file.d.ts.map +1 -1
- package/dist/internal/exclusive-lock.d.ts +51 -0
- package/dist/internal/exclusive-lock.d.ts.map +1 -0
- package/dist/internal/process-identity.d.ts +47 -0
- package/dist/internal/process-identity.d.ts.map +1 -0
- package/dist/internal/with-exclusive-lock.d.ts +67 -0
- package/dist/internal/with-exclusive-lock.d.ts.map +1 -0
- package/dist/live/watch-client.d.ts.map +1 -1
- package/dist/observability/audit.d.ts +2 -2
- package/dist/observability/audit.d.ts.map +1 -1
- package/dist/observability/event.d.ts +2 -1
- package/dist/observability/event.d.ts.map +1 -1
- package/dist/primitives/export-operation.d.ts +1 -1
- package/dist/primitives/export-operation.d.ts.map +1 -1
- package/dist/realtime/registry.d.ts +0 -5
- package/dist/realtime/registry.d.ts.map +1 -1
- package/dist/server/bun.d.ts +0 -1
- package/dist/server/bun.d.ts.map +1 -1
- package/dist/server/context-contribution.d.ts +1 -1
- package/dist/server/context-contribution.d.ts.map +1 -1
- package/dist/server/context.d.ts +1 -1
- package/dist/server/context.d.ts.map +1 -1
- package/dist/server/endpoint-response.d.ts +2 -1
- package/dist/server/endpoint-response.d.ts.map +1 -1
- package/dist/server/error-dispatch.d.ts +1 -1
- package/dist/server/error-dispatch.d.ts.map +1 -1
- package/dist/server/error-hook.d.ts +1 -1
- package/dist/server/error-hook.d.ts.map +1 -1
- package/dist/server/handler-state.d.ts +1 -1
- package/dist/server/handler-state.d.ts.map +1 -1
- package/dist/server/implement-registry.d.ts +54 -0
- package/dist/server/implement-registry.d.ts.map +1 -0
- package/dist/server/implement.d.ts +9 -55
- package/dist/server/implement.d.ts.map +1 -1
- package/dist/server/middleware/auth.d.ts +1 -31
- package/dist/server/middleware/auth.d.ts.map +1 -1
- package/dist/server/middleware/jwt.d.ts +31 -0
- package/dist/server/middleware/jwt.d.ts.map +1 -0
- package/dist/server/multipart-reader.d.ts +22 -0
- package/dist/server/multipart-reader.d.ts.map +1 -0
- package/dist/server/multipart.d.ts +1 -1
- package/dist/server/multipart.d.ts.map +1 -1
- package/dist/server/oauth/cimd.d.ts +88 -0
- package/dist/server/oauth/cimd.d.ts.map +1 -0
- package/dist/server/oauth/endpoints.d.ts +39 -0
- package/dist/server/oauth/endpoints.d.ts.map +1 -0
- package/dist/server/oauth/provider.d.ts +1 -68
- package/dist/server/oauth/provider.d.ts.map +1 -1
- package/dist/server/streaming-pump.d.ts +66 -0
- package/dist/server/streaming-pump.d.ts.map +1 -0
- package/dist/server/streaming-route.d.ts +12 -5
- package/dist/server/streaming-route.d.ts.map +1 -1
- package/dist/server/types.d.ts +4 -1
- package/dist/server/types.d.ts.map +1 -1
- package/dist/server/unix-client-bun.d.ts.map +1 -1
- package/dist/server/unix-client-http1.d.ts +76 -0
- package/dist/server/unix-client-http1.d.ts.map +1 -0
- package/dist/server/unix-client.d.ts.map +1 -1
- package/dist/testing/handler-clients.d.ts +2 -1
- package/dist/testing/handler-clients.d.ts.map +1 -1
- package/dist/testing/realtime-probe.d.ts +33 -0
- package/dist/testing/realtime-probe.d.ts.map +1 -0
- package/dist/testing/surface-conformance.d.ts +0 -31
- package/dist/testing/surface-conformance.d.ts.map +1 -1
- package/dist/testing/surface-manifest-digest.d.ts +44 -0
- package/dist/testing/surface-manifest-digest.d.ts.map +1 -0
- 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-fields.d.ts +31 -0
- package/dist/tools/cli/args-fields.d.ts.map +1 -0
- package/dist/tools/cli/args-route.d.ts +42 -0
- package/dist/tools/cli/args-route.d.ts.map +1 -0
- package/dist/tools/cli/args-view.d.ts +32 -0
- package/dist/tools/cli/args-view.d.ts.map +1 -0
- package/dist/tools/cli/args.d.ts +2 -65
- package/dist/tools/cli/args.d.ts.map +1 -1
- package/dist/tools/cli/argument-error.d.ts +5 -0
- package/dist/tools/cli/argument-error.d.ts.map +1 -0
- package/dist/tools/cli/checkpoint.d.ts.map +1 -1
- package/dist/tools/cli/command.d.ts +1 -1
- package/dist/tools/cli/command.d.ts.map +1 -1
- package/dist/tools/cli/config.d.ts +1 -1
- package/dist/tools/cli/config.d.ts.map +1 -1
- package/dist/tools/cli/format.d.ts +2 -1
- package/dist/tools/cli/format.d.ts.map +1 -1
- package/dist/tools/cli/invoke.d.ts +2 -1
- package/dist/tools/cli/invoke.d.ts.map +1 -1
- package/dist/tools/cli/managed-surface.d.ts +1 -1
- package/dist/tools/cli/managed-surface.d.ts.map +1 -1
- package/dist/tools/cli/policy.d.ts +1 -1
- package/dist/tools/cli/policy.d.ts.map +1 -1
- package/dist/tools/cli/prepare.d.ts.map +1 -1
- package/dist/tools/cli/run-managed.d.ts.map +1 -1
- package/dist/tools/cli/session.d.ts +1 -1
- package/dist/tools/cli/session.d.ts.map +1 -1
- package/dist/tools/cli/update.d.ts +19 -0
- package/dist/tools/cli/update.d.ts.map +1 -1
- package/dist/tools/cli/view.d.ts +1 -1
- package/dist/tools/cli/view.d.ts.map +1 -1
- package/dist/tools/cli/wait.d.ts +1 -1
- package/dist/tools/cli/wait.d.ts.map +1 -1
- package/dist/tools/connections/runtime.d.ts +1 -1
- package/dist/tools/connections/runtime.d.ts.map +1 -1
- package/dist/tools/execute-args.d.ts +23 -0
- package/dist/tools/execute-args.d.ts.map +1 -0
- package/dist/tools/execute-hooks.d.ts +146 -0
- package/dist/tools/execute-hooks.d.ts.map +1 -0
- package/dist/tools/execute-result.d.ts +40 -0
- package/dist/tools/execute-result.d.ts.map +1 -0
- package/dist/tools/execute.d.ts +4 -193
- package/dist/tools/execute.d.ts.map +1 -1
- package/dist/tools/internal/surface-projector.d.ts +2 -1
- package/dist/tools/internal/surface-projector.d.ts.map +1 -1
- package/dist/tools/invoker.d.ts +2 -1
- package/dist/tools/invoker.d.ts.map +1 -1
- package/dist/tools/lifecycle.d.ts +1 -1
- package/dist/tools/lifecycle.d.ts.map +1 -1
- package/dist/tools/mcp/mount.d.ts +1 -1
- package/dist/tools/mcp/mount.d.ts.map +1 -1
- package/dist/tools/mcp/prepare.d.ts +2 -1
- package/dist/tools/mcp/prepare.d.ts.map +1 -1
- package/dist/tools/mcp/progress.d.ts +1 -1
- package/dist/tools/mcp/progress.d.ts.map +1 -1
- package/dist/tools/mcp/register.d.ts +3 -2
- package/dist/tools/mcp/register.d.ts.map +1 -1
- package/dist/tools/mcp/round-context.d.ts +38 -0
- package/dist/tools/mcp/round-context.d.ts.map +1 -0
- package/dist/tools/mcp/round-policy.d.ts +1 -1
- package/dist/tools/mcp/round-policy.d.ts.map +1 -1
- package/dist/tools/mcp/round.d.ts +3 -11
- package/dist/tools/mcp/round.d.ts.map +1 -1
- package/dist/tools/mcp/runtime-tools.d.ts +2 -1
- package/dist/tools/mcp/runtime-tools.d.ts.map +1 -1
- package/dist/tools/mount.d.ts +3 -1
- package/dist/tools/mount.d.ts.map +1 -1
- package/dist/tools/native-definition.d.ts +2 -1
- package/dist/tools/native-definition.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-tools.d.ts +2 -1
- package/dist/tools/operations/async-operation-runtime-tools.d.ts.map +1 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts +2 -1
- package/dist/tools/operations/async-operation-runtime-types.d.ts.map +1 -1
- package/dist/tools/remote.d.ts.map +1 -1
- package/dist/tools/runtime-tool.d.ts +3 -1
- package/dist/tools/runtime-tool.d.ts.map +1 -1
- package/dist/tools/tool-logger.d.ts +1 -1
- package/dist/tools/tool-logger.d.ts.map +1 -1
- package/dist/tracking/client-listeners.d.ts +30 -0
- package/dist/tracking/client-listeners.d.ts.map +1 -0
- package/dist/tracking/client-visit.d.ts +61 -0
- package/dist/tracking/client-visit.d.ts.map +1 -0
- package/dist/tracking/client.d.ts +3 -2
- package/dist/tracking/client.d.ts.map +1 -1
- package/llms/application.2.txt +271 -7
- package/llms/application.txt +66 -289
- package/llms/cli.2.txt +80 -0
- package/llms/cli.txt +45 -74
- package/llms/contract.txt +3 -3
- package/llms/files.txt +3 -0
- package/llms/stitchkit.txt +3 -3
- package/llms/tools.2.txt +88 -279
- package/llms/tools.3.txt +288 -0
- package/llms/tools.txt +27 -65
- package/llms/{upgrading-0.37.0-0.50.0.txt → upgrading-0.37.0-0.53.0.txt} +25 -3
- package/llms/{upgrading-0.53.0-0.67.0.txt → upgrading-0.55.0-0.68.0.txt} +53 -25
- package/llms/{upgrading-0.68.0-0.94.0.txt → upgrading-0.69.0-0.95.0.txt} +45 -53
- package/llms/upgrading.txt +3 -3
- package/llms-full.txt +216 -43
- package/llms.txt +8 -8
- package/package.json +1 -1
- package/dist/index-e2z3ahw9.js +0 -325
- package/dist/index-mkm15s49.js +0 -394
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
composeAgentPrompt,
|
|
7
7
|
createAgentRuntime,
|
|
8
8
|
createAgentRuntimeEventSink
|
|
9
|
-
} from "../../index-
|
|
9
|
+
} from "../../index-8zja4pkf.js";
|
|
10
10
|
import"../../index-83bdg97s.js";
|
|
11
11
|
import"../../index-y64k3s0h.js";
|
|
12
12
|
import {
|
|
@@ -15,19 +15,19 @@ import {
|
|
|
15
15
|
import"../../index-h6eeys1v.js";
|
|
16
16
|
import {
|
|
17
17
|
walkContainedFiles
|
|
18
|
-
} from "../../index-
|
|
19
|
-
import"../../index-
|
|
18
|
+
} from "../../index-px2gm2jp.js";
|
|
19
|
+
import"../../index-gxrt5h6v.js";
|
|
20
20
|
import"../../index-gtj3zc53.js";
|
|
21
|
-
import"../../index-
|
|
22
|
-
import"../../index-
|
|
21
|
+
import"../../index-79z7m7dt.js";
|
|
22
|
+
import"../../index-55hkhm67.js";
|
|
23
23
|
import"../../index-zfrhfn82.js";
|
|
24
24
|
import"../../index-35mh5bhj.js";
|
|
25
25
|
import"../../index-zcgf3gqf.js";
|
|
26
26
|
import"../../index-1zbbzgfh.js";
|
|
27
27
|
import {
|
|
28
28
|
defineRuntimeTool
|
|
29
|
-
} from "../../index-
|
|
30
|
-
import"../../index-
|
|
29
|
+
} from "../../index-xw3s75nj.js";
|
|
30
|
+
import"../../index-np4m8hd3.js";
|
|
31
31
|
import"../../index-eqqvgdb3.js";
|
|
32
32
|
import"../../index-znfs20ss.js";
|
|
33
33
|
import"../../index-p5r7qpdd.js";
|
|
@@ -271,6 +271,53 @@ function createAgentHarnessFileResources(config) {
|
|
|
271
271
|
return { load, runtimeTools: [readResource] };
|
|
272
272
|
}
|
|
273
273
|
// src/agent-runtime/harness-control.ts
|
|
274
|
+
async function runControlledOperation(harness, request) {
|
|
275
|
+
if (request.operation === "interrupt") {
|
|
276
|
+
await harness.interrupt({
|
|
277
|
+
conversationId: request.conversationId,
|
|
278
|
+
runId: request.runId
|
|
279
|
+
});
|
|
280
|
+
return AgentControlResponseSchema.parse({
|
|
281
|
+
schemaVersion: 1,
|
|
282
|
+
requestId: request.requestId,
|
|
283
|
+
outcome: "ok",
|
|
284
|
+
snapshot: await harness.snapshot(request.conversationId)
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
if (request.operation === "respond-approval") {
|
|
288
|
+
const ticket2 = await harness.respondToApproval({
|
|
289
|
+
conversationId: request.conversationId,
|
|
290
|
+
approvalId: request.approvalId,
|
|
291
|
+
approved: request.approved,
|
|
292
|
+
...request.reason && { reason: request.reason },
|
|
293
|
+
context: request.context,
|
|
294
|
+
...request.metadata !== undefined && { metadata: request.metadata }
|
|
295
|
+
});
|
|
296
|
+
const admission2 = await ticket2.admission;
|
|
297
|
+
return AgentControlResponseSchema.parse({
|
|
298
|
+
schemaVersion: 1,
|
|
299
|
+
requestId: request.requestId,
|
|
300
|
+
outcome: "ok",
|
|
301
|
+
runId: admission2.runId,
|
|
302
|
+
snapshot: await harness.snapshot(request.conversationId)
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
const ticket = harness.submit({
|
|
306
|
+
conversationId: request.conversationId,
|
|
307
|
+
idempotencyKey: request.idempotencyKey,
|
|
308
|
+
context: request.context,
|
|
309
|
+
parts: request.parts,
|
|
310
|
+
...request.metadata !== undefined && { metadata: request.metadata }
|
|
311
|
+
});
|
|
312
|
+
const admission = await ticket.admission;
|
|
313
|
+
return AgentControlResponseSchema.parse({
|
|
314
|
+
schemaVersion: 1,
|
|
315
|
+
requestId: request.requestId,
|
|
316
|
+
outcome: "ok",
|
|
317
|
+
runId: admission.runId,
|
|
318
|
+
snapshot: await harness.snapshot(request.conversationId)
|
|
319
|
+
});
|
|
320
|
+
}
|
|
274
321
|
function createAgentHarnessControlServer(harness, config = {}) {
|
|
275
322
|
const maxPendingAttachments = config.maxPendingAttachments ?? 32;
|
|
276
323
|
if (!Number.isSafeInteger(maxPendingAttachments) || maxPendingAttachments <= 0) {
|
|
@@ -419,51 +466,7 @@ function createAgentHarnessControlServer(harness, config = {}) {
|
|
|
419
466
|
if (state.attached.get(request.conversationId) !== "control" || controllers.get(request.conversationId) !== id) {
|
|
420
467
|
return fail("LEASE_REQUIRED", "An active controller lease is required");
|
|
421
468
|
}
|
|
422
|
-
|
|
423
|
-
await harness.interrupt({
|
|
424
|
-
conversationId: request.conversationId,
|
|
425
|
-
runId: request.runId
|
|
426
|
-
});
|
|
427
|
-
return AgentControlResponseSchema.parse({
|
|
428
|
-
schemaVersion: 1,
|
|
429
|
-
requestId: request.requestId,
|
|
430
|
-
outcome: "ok",
|
|
431
|
-
snapshot: await harness.snapshot(request.conversationId)
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
if (request.operation === "respond-approval") {
|
|
435
|
-
const ticket2 = await harness.respondToApproval({
|
|
436
|
-
conversationId: request.conversationId,
|
|
437
|
-
approvalId: request.approvalId,
|
|
438
|
-
approved: request.approved,
|
|
439
|
-
...request.reason && { reason: request.reason },
|
|
440
|
-
context: request.context,
|
|
441
|
-
...request.metadata !== undefined && { metadata: request.metadata }
|
|
442
|
-
});
|
|
443
|
-
const admission2 = await ticket2.admission;
|
|
444
|
-
return AgentControlResponseSchema.parse({
|
|
445
|
-
schemaVersion: 1,
|
|
446
|
-
requestId: request.requestId,
|
|
447
|
-
outcome: "ok",
|
|
448
|
-
runId: admission2.runId,
|
|
449
|
-
snapshot: await harness.snapshot(request.conversationId)
|
|
450
|
-
});
|
|
451
|
-
}
|
|
452
|
-
const ticket = harness.submit({
|
|
453
|
-
conversationId: request.conversationId,
|
|
454
|
-
idempotencyKey: request.idempotencyKey,
|
|
455
|
-
context: request.context,
|
|
456
|
-
parts: request.parts,
|
|
457
|
-
...request.metadata !== undefined && { metadata: request.metadata }
|
|
458
|
-
});
|
|
459
|
-
const admission = await ticket.admission;
|
|
460
|
-
return AgentControlResponseSchema.parse({
|
|
461
|
-
schemaVersion: 1,
|
|
462
|
-
requestId: request.requestId,
|
|
463
|
-
outcome: "ok",
|
|
464
|
-
runId: admission.runId,
|
|
465
|
-
snapshot: await harness.snapshot(request.conversationId)
|
|
466
|
-
});
|
|
469
|
+
return await runControlledOperation(harness, request);
|
|
467
470
|
} catch {
|
|
468
471
|
return fail("REQUEST_REJECTED", "Control request was rejected");
|
|
469
472
|
}
|
|
@@ -503,6 +506,75 @@ function activeRunId(snapshot) {
|
|
|
503
506
|
throw new Error("Agent harness active run is unavailable");
|
|
504
507
|
return run.id;
|
|
505
508
|
}
|
|
509
|
+
function listPendingApprovals(snapshot, conversationId) {
|
|
510
|
+
const responded = new Set(snapshot.messages.flatMap((message) => message.parts.filter((part) => part.type === "tool-approval-response").map((part) => part.approvalId)));
|
|
511
|
+
const pendingApprovals = [];
|
|
512
|
+
for (const message of snapshot.messages) {
|
|
513
|
+
const calls = new Map(message.parts.filter((part) => part.type === "tool-call").map((part) => [part.callId, part]));
|
|
514
|
+
for (const request of message.parts.filter((part) => part.type === "tool-approval-request")) {
|
|
515
|
+
if (responded.has(request.approvalId))
|
|
516
|
+
continue;
|
|
517
|
+
const call = calls.get(request.callId);
|
|
518
|
+
if (!call || !message.runId)
|
|
519
|
+
continue;
|
|
520
|
+
pendingApprovals.push({
|
|
521
|
+
conversationId,
|
|
522
|
+
runId: message.runId,
|
|
523
|
+
messageId: message.id,
|
|
524
|
+
approvalId: request.approvalId,
|
|
525
|
+
callId: request.callId,
|
|
526
|
+
toolName: call.toolName,
|
|
527
|
+
input: call.input,
|
|
528
|
+
...request.signature && { signature: request.signature }
|
|
529
|
+
});
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
return pendingApprovals;
|
|
533
|
+
}
|
|
534
|
+
function profileEventOf(runId, prompt, toolNames) {
|
|
535
|
+
return AgentHarnessProfileEventSchema.parse({
|
|
536
|
+
schemaVersion: 1,
|
|
537
|
+
type: "profile-applied",
|
|
538
|
+
conversationId: prompt.conversationId,
|
|
539
|
+
runId,
|
|
540
|
+
model: prompt.model.descriptor,
|
|
541
|
+
resources: prompt.resources.map(({ kind, name, provenance }) => ({
|
|
542
|
+
kind,
|
|
543
|
+
name,
|
|
544
|
+
provenance
|
|
545
|
+
})),
|
|
546
|
+
diagnostics: prompt.diagnostics,
|
|
547
|
+
toolNames
|
|
548
|
+
});
|
|
549
|
+
}
|
|
550
|
+
async function authorizeApprovalResponder(config, input, request) {
|
|
551
|
+
if (!config.authorizeApprovalResponse)
|
|
552
|
+
return;
|
|
553
|
+
const authorization = await config.authorizeApprovalResponse({
|
|
554
|
+
responder: input.context,
|
|
555
|
+
conversationId: input.conversationId,
|
|
556
|
+
request: {
|
|
557
|
+
approvalId: request.approvalId,
|
|
558
|
+
callId: request.callId,
|
|
559
|
+
toolName: request.toolName,
|
|
560
|
+
input: request.input
|
|
561
|
+
},
|
|
562
|
+
approved: input.approved
|
|
563
|
+
});
|
|
564
|
+
if (authorization.status !== "rejected")
|
|
565
|
+
return;
|
|
566
|
+
await config.store.appendEvent({
|
|
567
|
+
conversationId: input.conversationId,
|
|
568
|
+
kind: "approval/response-rejected",
|
|
569
|
+
payload: {
|
|
570
|
+
approvalId: request.approvalId,
|
|
571
|
+
callId: request.callId,
|
|
572
|
+
toolName: request.toolName,
|
|
573
|
+
reason: authorization.reason
|
|
574
|
+
}
|
|
575
|
+
});
|
|
576
|
+
throw new AgentHarnessApprovalRejectedError(authorization.reason);
|
|
577
|
+
}
|
|
506
578
|
function createHeadlessAgentHarness(config) {
|
|
507
579
|
const {
|
|
508
580
|
models,
|
|
@@ -524,20 +596,7 @@ function createHeadlessAgentHarness(config) {
|
|
|
524
596
|
const entry = pending.get(runId);
|
|
525
597
|
if (!entry?.prompt || !entry.toolNames || entry.emitting)
|
|
526
598
|
return entry?.emitting;
|
|
527
|
-
const event =
|
|
528
|
-
schemaVersion: 1,
|
|
529
|
-
type: "profile-applied",
|
|
530
|
-
conversationId: entry.prompt.conversationId,
|
|
531
|
-
runId,
|
|
532
|
-
model: entry.prompt.model.descriptor,
|
|
533
|
-
resources: entry.prompt.resources.map(({ kind, name, provenance }) => ({
|
|
534
|
-
kind,
|
|
535
|
-
name,
|
|
536
|
-
provenance
|
|
537
|
-
})),
|
|
538
|
-
diagnostics: entry.prompt.diagnostics,
|
|
539
|
-
toolNames: entry.toolNames
|
|
540
|
-
});
|
|
599
|
+
const event = profileEventOf(runId, entry.prompt, entry.toolNames);
|
|
541
600
|
const emitting = (async () => {
|
|
542
601
|
try {
|
|
543
602
|
await onProfile?.(event);
|
|
@@ -617,32 +676,7 @@ function createHeadlessAgentHarness(config) {
|
|
|
617
676
|
return mounted;
|
|
618
677
|
}
|
|
619
678
|
});
|
|
620
|
-
const pendingApprovals = async (conversationId) =>
|
|
621
|
-
const snapshot = await config.store.loadSnapshot(conversationId);
|
|
622
|
-
const responded = new Set(snapshot.messages.flatMap((message) => message.parts.filter((part) => part.type === "tool-approval-response").map((part) => part.approvalId)));
|
|
623
|
-
const pendingApprovals2 = [];
|
|
624
|
-
for (const message of snapshot.messages) {
|
|
625
|
-
const calls = new Map(message.parts.filter((part) => part.type === "tool-call").map((part) => [part.callId, part]));
|
|
626
|
-
for (const request of message.parts.filter((part) => part.type === "tool-approval-request")) {
|
|
627
|
-
if (responded.has(request.approvalId))
|
|
628
|
-
continue;
|
|
629
|
-
const call = calls.get(request.callId);
|
|
630
|
-
if (!call || !message.runId)
|
|
631
|
-
continue;
|
|
632
|
-
pendingApprovals2.push({
|
|
633
|
-
conversationId,
|
|
634
|
-
runId: message.runId,
|
|
635
|
-
messageId: message.id,
|
|
636
|
-
approvalId: request.approvalId,
|
|
637
|
-
callId: request.callId,
|
|
638
|
-
toolName: call.toolName,
|
|
639
|
-
input: call.input,
|
|
640
|
-
...request.signature && { signature: request.signature }
|
|
641
|
-
});
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
return pendingApprovals2;
|
|
645
|
-
};
|
|
679
|
+
const pendingApprovals = async (conversationId) => listPendingApprovals(await config.store.loadSnapshot(conversationId), conversationId);
|
|
646
680
|
return {
|
|
647
681
|
...runtime,
|
|
648
682
|
snapshot: async (conversationId) => {
|
|
@@ -663,30 +697,7 @@ function createHeadlessAgentHarness(config) {
|
|
|
663
697
|
if (!request) {
|
|
664
698
|
throw new Error("Approval request is missing, stale or already answered");
|
|
665
699
|
}
|
|
666
|
-
|
|
667
|
-
responder: input.context,
|
|
668
|
-
conversationId: input.conversationId,
|
|
669
|
-
request: {
|
|
670
|
-
approvalId: request.approvalId,
|
|
671
|
-
callId: request.callId,
|
|
672
|
-
toolName: request.toolName,
|
|
673
|
-
input: request.input
|
|
674
|
-
},
|
|
675
|
-
approved: input.approved
|
|
676
|
-
}) : { status: "allowed" };
|
|
677
|
-
if (authorization.status === "rejected") {
|
|
678
|
-
await runtimeConfig.store.appendEvent({
|
|
679
|
-
conversationId: input.conversationId,
|
|
680
|
-
kind: "approval/response-rejected",
|
|
681
|
-
payload: {
|
|
682
|
-
approvalId: request.approvalId,
|
|
683
|
-
callId: request.callId,
|
|
684
|
-
toolName: request.toolName,
|
|
685
|
-
reason: authorization.reason
|
|
686
|
-
}
|
|
687
|
-
});
|
|
688
|
-
throw new AgentHarnessApprovalRejectedError(authorization.reason);
|
|
689
|
-
}
|
|
700
|
+
await authorizeApprovalResponder(config, input, request);
|
|
690
701
|
const ticket = runtime.submit({
|
|
691
702
|
conversationId: input.conversationId,
|
|
692
703
|
idempotencyKey: `tool-approval:${input.approvalId}`,
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createAgentCodingTools
|
|
3
|
-
} from "../../index-
|
|
4
|
-
import"../../index-
|
|
3
|
+
} from "../../index-het2he5g.js";
|
|
4
|
+
import"../../index-px2gm2jp.js";
|
|
5
5
|
import {
|
|
6
6
|
codingRefusal,
|
|
7
7
|
missingSandboxRestrictions,
|
|
8
8
|
probeAgentProcessSandbox
|
|
9
9
|
} from "../../index-qmy6zq75.js";
|
|
10
|
-
import"../../index-
|
|
11
|
-
import"../../index-
|
|
10
|
+
import"../../index-xw3s75nj.js";
|
|
11
|
+
import"../../index-np4m8hd3.js";
|
|
12
12
|
import"../../index-eqqvgdb3.js";
|
|
13
13
|
import"../../index-znfs20ss.js";
|
|
14
14
|
import"../../index-p5r7qpdd.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSqliteAgentRuntimeStore,
|
|
3
3
|
initializeAgentRuntimeSqlite
|
|
4
|
-
} from "../../../index-
|
|
4
|
+
} from "../../../index-p9e0w8hs.js";
|
|
5
5
|
import"../../../index-crykmqkr.js";
|
|
6
|
-
import"../../../index-
|
|
7
|
-
import"../../../index-
|
|
6
|
+
import"../../../index-wsm5w4ee.js";
|
|
7
|
+
import"../../../index-gxrt5h6v.js";
|
|
8
8
|
import"../../../index-gtj3zc53.js";
|
|
9
9
|
import"../../../index-k5hsfc3j.js";
|
|
10
10
|
import"../../../index-hffjpmq9.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSqliteAgentRuntimeStore,
|
|
3
3
|
initializeAgentRuntimeSqlite
|
|
4
|
-
} from "../../../index-
|
|
4
|
+
} from "../../../index-p9e0w8hs.js";
|
|
5
5
|
import"../../../index-crykmqkr.js";
|
|
6
|
-
import"../../../index-
|
|
7
|
-
import"../../../index-
|
|
6
|
+
import"../../../index-wsm5w4ee.js";
|
|
7
|
+
import"../../../index-gxrt5h6v.js";
|
|
8
8
|
import"../../../index-gtj3zc53.js";
|
|
9
9
|
import"../../../index-k5hsfc3j.js";
|
|
10
10
|
import"../../../index-hffjpmq9.js";
|