@stigmer/runner 0.1.0-dev.20261017020314.g644422724c27
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/LICENSE +194 -0
- package/README.md +310 -0
- package/dist/.build-fingerprint +1 -0
- package/dist/__test-utils__/approval-contract/hook-commands.d.ts +25 -0
- package/dist/__test-utils__/approval-contract/hook-commands.js +87 -0
- package/dist/__test-utils__/approval-contract/hook-commands.js.map +1 -0
- package/dist/__test-utils__/approval-contract/types.d.ts +326 -0
- package/dist/__test-utils__/approval-contract/types.js +24 -0
- package/dist/__test-utils__/approval-contract/types.js.map +1 -0
- package/dist/__test-utils__/approval-log.d.ts +34 -0
- package/dist/__test-utils__/approval-log.js +126 -0
- package/dist/__test-utils__/approval-log.js.map +1 -0
- package/dist/__test-utils__/execution-record-fixture.d.ts +121 -0
- package/dist/__test-utils__/execution-record-fixture.js +134 -0
- package/dist/__test-utils__/execution-record-fixture.js.map +1 -0
- package/dist/__test-utils__/file-review-projection.d.ts +45 -0
- package/dist/__test-utils__/file-review-projection.js +61 -0
- package/dist/__test-utils__/file-review-projection.js.map +1 -0
- package/dist/__test-utils__/harness-contract/types.d.ts +188 -0
- package/dist/__test-utils__/harness-contract/types.js +64 -0
- package/dist/__test-utils__/harness-contract/types.js.map +1 -0
- package/dist/__test-utils__/hermetic-activity.d.ts +450 -0
- package/dist/__test-utils__/hermetic-activity.js +883 -0
- package/dist/__test-utils__/hermetic-activity.js.map +1 -0
- package/dist/__test-utils__/loopback-host.d.ts +23 -0
- package/dist/__test-utils__/loopback-host.js +45 -0
- package/dist/__test-utils__/loopback-host.js.map +1 -0
- package/dist/__test-utils__/mock-client.d.ts +13 -0
- package/dist/__test-utils__/mock-client.js +46 -0
- package/dist/__test-utils__/mock-client.js.map +1 -0
- package/dist/__test-utils__/mock-workspace.d.ts +15 -0
- package/dist/__test-utils__/mock-workspace.js +21 -0
- package/dist/__test-utils__/mock-workspace.js.map +1 -0
- package/dist/__test-utils__/model-registry-fixture.d.ts +111 -0
- package/dist/__test-utils__/model-registry-fixture.js +109 -0
- package/dist/__test-utils__/model-registry-fixture.js.map +1 -0
- package/dist/__test-utils__/turn-input-fixture.d.ts +60 -0
- package/dist/__test-utils__/turn-input-fixture.js +129 -0
- package/dist/__test-utils__/turn-input-fixture.js.map +1 -0
- package/dist/activities/attach-session.d.ts +34 -0
- package/dist/activities/attach-session.js +94 -0
- package/dist/activities/attach-session.js.map +1 -0
- package/dist/activities/ensure-thread.d.ts +24 -0
- package/dist/activities/ensure-thread.js +44 -0
- package/dist/activities/ensure-thread.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/contract-subject.d.ts +107 -0
- package/dist/activities/execute-cursor/__test-utils__/contract-subject.js +392 -0
- package/dist/activities/execute-cursor/__test-utils__/contract-subject.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.d.ts +251 -0
- package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.js +254 -0
- package/dist/activities/execute-cursor/__test-utils__/cursor-hook-harness.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/fold.d.ts +62 -0
- package/dist/activities/execute-cursor/__test-utils__/fold.js +94 -0
- package/dist/activities/execute-cursor/__test-utils__/fold.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.d.ts +34 -0
- package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.js +287 -0
- package/dist/activities/execute-cursor/__test-utils__/gateway-substrate.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.d.ts +202 -0
- package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js +306 -0
- package/dist/activities/execute-cursor/__test-utils__/hermetic-cursor.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/scripted-agent.d.ts +176 -0
- package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js +278 -0
- package/dist/activities/execute-cursor/__test-utils__/scripted-agent.js.map +1 -0
- package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.d.ts +182 -0
- package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js +241 -0
- package/dist/activities/execute-cursor/__test-utils__/scripted-sdk.js.map +1 -0
- package/dist/activities/execute-cursor/adapter.d.ts +63 -0
- package/dist/activities/execute-cursor/adapter.js +141 -0
- package/dist/activities/execute-cursor/adapter.js.map +1 -0
- package/dist/activities/execute-cursor/agent-session-cache.d.ts +72 -0
- package/dist/activities/execute-cursor/agent-session-cache.js +186 -0
- package/dist/activities/execute-cursor/agent-session-cache.js.map +1 -0
- package/dist/activities/execute-cursor/approval-policy.d.ts +67 -0
- package/dist/activities/execute-cursor/approval-policy.js +101 -0
- package/dist/activities/execute-cursor/approval-policy.js.map +1 -0
- package/dist/activities/execute-cursor/approval-state.d.ts +657 -0
- package/dist/activities/execute-cursor/approval-state.js +682 -0
- package/dist/activities/execute-cursor/approval-state.js.map +1 -0
- package/dist/activities/execute-cursor/boundary-rows.d.ts +455 -0
- package/dist/activities/execute-cursor/boundary-rows.js +1268 -0
- package/dist/activities/execute-cursor/boundary-rows.js.map +1 -0
- package/dist/activities/execute-cursor/cas-observations.d.ts +126 -0
- package/dist/activities/execute-cursor/cas-observations.js +240 -0
- package/dist/activities/execute-cursor/cas-observations.js.map +1 -0
- package/dist/activities/execute-cursor/cursor-capabilities.d.ts +37 -0
- package/dist/activities/execute-cursor/cursor-capabilities.js +74 -0
- package/dist/activities/execute-cursor/cursor-capabilities.js.map +1 -0
- package/dist/activities/execute-cursor/cursor-event-recorder.d.ts +43 -0
- package/dist/activities/execute-cursor/cursor-event-recorder.js +88 -0
- package/dist/activities/execute-cursor/cursor-event-recorder.js.map +1 -0
- package/dist/activities/execute-cursor/cursor-mcp-config.d.ts +58 -0
- package/dist/activities/execute-cursor/cursor-mcp-config.js +86 -0
- package/dist/activities/execute-cursor/cursor-mcp-config.js.map +1 -0
- package/dist/activities/execute-cursor/cursor-mode.d.ts +32 -0
- package/dist/activities/execute-cursor/cursor-mode.js +36 -0
- package/dist/activities/execute-cursor/cursor-mode.js.map +1 -0
- package/dist/activities/execute-cursor/error-classifier.d.ts +138 -0
- package/dist/activities/execute-cursor/error-classifier.js +330 -0
- package/dist/activities/execute-cursor/error-classifier.js.map +1 -0
- package/dist/activities/execute-cursor/fetch-interceptor.d.ts +56 -0
- package/dist/activities/execute-cursor/fetch-interceptor.js +378 -0
- package/dist/activities/execute-cursor/fetch-interceptor.js.map +1 -0
- package/dist/activities/execute-cursor/hook-scope.d.ts +143 -0
- package/dist/activities/execute-cursor/hook-scope.js +149 -0
- package/dist/activities/execute-cursor/hook-scope.js.map +1 -0
- package/dist/activities/execute-cursor/hook-script.d.ts +172 -0
- package/dist/activities/execute-cursor/hook-script.js +1204 -0
- package/dist/activities/execute-cursor/hook-script.js.map +1 -0
- package/dist/activities/execute-cursor/hook-server.d.ts +152 -0
- package/dist/activities/execute-cursor/hook-server.js +422 -0
- package/dist/activities/execute-cursor/hook-server.js.map +1 -0
- package/dist/activities/execute-cursor/hook-tool-hiding.d.ts +37 -0
- package/dist/activities/execute-cursor/hook-tool-hiding.js +58 -0
- package/dist/activities/execute-cursor/hook-tool-hiding.js.map +1 -0
- package/dist/activities/execute-cursor/hook-views.d.ts +74 -0
- package/dist/activities/execute-cursor/hook-views.js +180 -0
- package/dist/activities/execute-cursor/hook-views.js.map +1 -0
- package/dist/activities/execute-cursor/http2-interceptor.d.ts +98 -0
- package/dist/activities/execute-cursor/http2-interceptor.js +218 -0
- package/dist/activities/execute-cursor/http2-interceptor.js.map +1 -0
- package/dist/activities/execute-cursor/model-pricing-data.d.ts +39 -0
- package/dist/activities/execute-cursor/model-pricing-data.js +109 -0
- package/dist/activities/execute-cursor/model-pricing-data.js.map +1 -0
- package/dist/activities/execute-cursor/model-pricing.d.ts +51 -0
- package/dist/activities/execute-cursor/model-pricing.js +160 -0
- package/dist/activities/execute-cursor/model-pricing.js.map +1 -0
- package/dist/activities/execute-cursor/prompt-builder.d.ts +437 -0
- package/dist/activities/execute-cursor/prompt-builder.js +719 -0
- package/dist/activities/execute-cursor/prompt-builder.js.map +1 -0
- package/dist/activities/execute-cursor/rejection-capture.d.ts +27 -0
- package/dist/activities/execute-cursor/rejection-capture.js +78 -0
- package/dist/activities/execute-cursor/rejection-capture.js.map +1 -0
- package/dist/activities/execute-cursor/run-telemetry.d.ts +61 -0
- package/dist/activities/execute-cursor/run-telemetry.js +149 -0
- package/dist/activities/execute-cursor/run-telemetry.js.map +1 -0
- package/dist/activities/execute-cursor/sdk-warmup.d.ts +53 -0
- package/dist/activities/execute-cursor/sdk-warmup.js +70 -0
- package/dist/activities/execute-cursor/sdk-warmup.js.map +1 -0
- package/dist/activities/execute-cursor/service-tier.d.ts +68 -0
- package/dist/activities/execute-cursor/service-tier.js +200 -0
- package/dist/activities/execute-cursor/service-tier.js.map +1 -0
- package/dist/activities/execute-cursor/session-lifecycle.d.ts +247 -0
- package/dist/activities/execute-cursor/session-lifecycle.js +330 -0
- package/dist/activities/execute-cursor/session-lifecycle.js.map +1 -0
- package/dist/activities/execute-cursor/session-store.d.ts +99 -0
- package/dist/activities/execute-cursor/session-store.js +156 -0
- package/dist/activities/execute-cursor/session-store.js.map +1 -0
- package/dist/activities/execute-cursor/sub-agent-steps.d.ts +79 -0
- package/dist/activities/execute-cursor/sub-agent-steps.js +180 -0
- package/dist/activities/execute-cursor/sub-agent-steps.js.map +1 -0
- package/dist/activities/execute-cursor/subagent-config.d.ts +61 -0
- package/dist/activities/execute-cursor/subagent-config.js +102 -0
- package/dist/activities/execute-cursor/subagent-config.js.map +1 -0
- package/dist/activities/execute-cursor/tool-result.d.ts +49 -0
- package/dist/activities/execute-cursor/tool-result.js +130 -0
- package/dist/activities/execute-cursor/tool-result.js.map +1 -0
- package/dist/activities/execute-cursor/translator.d.ts +183 -0
- package/dist/activities/execute-cursor/translator.js +485 -0
- package/dist/activities/execute-cursor/translator.js.map +1 -0
- package/dist/activities/execute-cursor/turn-boundary.d.ts +124 -0
- package/dist/activities/execute-cursor/turn-boundary.js +210 -0
- package/dist/activities/execute-cursor/turn-boundary.js.map +1 -0
- package/dist/activities/execute-cursor/turn-recovery.d.ts +62 -0
- package/dist/activities/execute-cursor/turn-recovery.js +208 -0
- package/dist/activities/execute-cursor/turn-recovery.js.map +1 -0
- package/dist/activities/execute-cursor/turn-settle.d.ts +59 -0
- package/dist/activities/execute-cursor/turn-settle.js +512 -0
- package/dist/activities/execute-cursor/turn-settle.js.map +1 -0
- package/dist/activities/execute-cursor/turn-setup.d.ts +281 -0
- package/dist/activities/execute-cursor/turn-setup.js +739 -0
- package/dist/activities/execute-cursor/turn-setup.js.map +1 -0
- package/dist/activities/execute-cursor/turn-stream.d.ts +133 -0
- package/dist/activities/execute-cursor/turn-stream.js +239 -0
- package/dist/activities/execute-cursor/turn-stream.js.map +1 -0
- package/dist/activities/execute-cursor/turn.d.ts +46 -0
- package/dist/activities/execute-cursor/turn.js +247 -0
- package/dist/activities/execute-cursor/turn.js.map +1 -0
- package/dist/activities/execute-cursor/usage-pricing.d.ts +38 -0
- package/dist/activities/execute-cursor/usage-pricing.js +50 -0
- package/dist/activities/execute-cursor/usage-pricing.js.map +1 -0
- package/dist/activities/execute-cursor/workspace-hook-files.d.ts +116 -0
- package/dist/activities/execute-cursor/workspace-hook-files.js +390 -0
- package/dist/activities/execute-cursor/workspace-hook-files.js.map +1 -0
- package/dist/activities/execute-cursor/workspace-setup.d.ts +148 -0
- package/dist/activities/execute-cursor/workspace-setup.js +444 -0
- package/dist/activities/execute-cursor/workspace-setup.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/contract-subject.d.ts +102 -0
- package/dist/activities/execute-deep-agent/__test-utils__/contract-subject.js +361 -0
- package/dist/activities/execute-deep-agent/__test-utils__/contract-subject.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/gateway-substrate.d.ts +33 -0
- package/dist/activities/execute-deep-agent/__test-utils__/gateway-substrate.js +423 -0
- package/dist/activities/execute-deep-agent/__test-utils__/gateway-substrate.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/hermetic-deep-agent.d.ts +224 -0
- package/dist/activities/execute-deep-agent/__test-utils__/hermetic-deep-agent.js +307 -0
- package/dist/activities/execute-deep-agent/__test-utils__/hermetic-deep-agent.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/hitl-script.d.ts +24 -0
- package/dist/activities/execute-deep-agent/__test-utils__/hitl-script.js +41 -0
- package/dist/activities/execute-deep-agent/__test-utils__/hitl-script.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/paused-session-fixture.d.ts +76 -0
- package/dist/activities/execute-deep-agent/__test-utils__/paused-session-fixture.js +112 -0
- package/dist/activities/execute-deep-agent/__test-utils__/paused-session-fixture.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/scripted-model-module.d.ts +53 -0
- package/dist/activities/execute-deep-agent/__test-utils__/scripted-model-module.js +71 -0
- package/dist/activities/execute-deep-agent/__test-utils__/scripted-model-module.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/scripted-model.d.ts +305 -0
- package/dist/activities/execute-deep-agent/__test-utils__/scripted-model.js +368 -0
- package/dist/activities/execute-deep-agent/__test-utils__/scripted-model.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/think-bound-session.d.ts +17 -0
- package/dist/activities/execute-deep-agent/__test-utils__/think-bound-session.js +23 -0
- package/dist/activities/execute-deep-agent/__test-utils__/think-bound-session.js.map +1 -0
- package/dist/activities/execute-deep-agent/__test-utils__/v3-event-fixtures.d.ts +80 -0
- package/dist/activities/execute-deep-agent/__test-utils__/v3-event-fixtures.js +195 -0
- package/dist/activities/execute-deep-agent/__test-utils__/v3-event-fixtures.js.map +1 -0
- package/dist/activities/execute-deep-agent/adapter.d.ts +41 -0
- package/dist/activities/execute-deep-agent/adapter.js +79 -0
- package/dist/activities/execute-deep-agent/adapter.js.map +1 -0
- package/dist/activities/execute-deep-agent/approval-file-change.d.ts +54 -0
- package/dist/activities/execute-deep-agent/approval-file-change.js +68 -0
- package/dist/activities/execute-deep-agent/approval-file-change.js.map +1 -0
- package/dist/activities/execute-deep-agent/auto-publish.d.ts +17 -0
- package/dist/activities/execute-deep-agent/auto-publish.js +71 -0
- package/dist/activities/execute-deep-agent/auto-publish.js.map +1 -0
- package/dist/activities/execute-deep-agent/cas-capture-backend.d.ts +84 -0
- package/dist/activities/execute-deep-agent/cas-capture-backend.js +106 -0
- package/dist/activities/execute-deep-agent/cas-capture-backend.js.map +1 -0
- package/dist/activities/execute-deep-agent/cas-capture-observer.d.ts +83 -0
- package/dist/activities/execute-deep-agent/cas-capture-observer.js +117 -0
- package/dist/activities/execute-deep-agent/cas-capture-observer.js.map +1 -0
- package/dist/activities/execute-deep-agent/deep-agent-capabilities.d.ts +32 -0
- package/dist/activities/execute-deep-agent/deep-agent-capabilities.js +45 -0
- package/dist/activities/execute-deep-agent/deep-agent-capabilities.js.map +1 -0
- package/dist/activities/execute-deep-agent/deepagents-profiles.d.ts +30 -0
- package/dist/activities/execute-deep-agent/deepagents-profiles.js +46 -0
- package/dist/activities/execute-deep-agent/deepagents-profiles.js.map +1 -0
- package/dist/activities/execute-deep-agent/engine-tools.d.ts +32 -0
- package/dist/activities/execute-deep-agent/engine-tools.js +32 -0
- package/dist/activities/execute-deep-agent/engine-tools.js.map +1 -0
- package/dist/activities/execute-deep-agent/hitl.d.ts +126 -0
- package/dist/activities/execute-deep-agent/hitl.js +194 -0
- package/dist/activities/execute-deep-agent/hitl.js.map +1 -0
- package/dist/activities/execute-deep-agent/hooks-setup.d.ts +25 -0
- package/dist/activities/execute-deep-agent/hooks-setup.js +59 -0
- package/dist/activities/execute-deep-agent/hooks-setup.js.map +1 -0
- package/dist/activities/execute-deep-agent/inline-publisher.d.ts +83 -0
- package/dist/activities/execute-deep-agent/inline-publisher.js +152 -0
- package/dist/activities/execute-deep-agent/inline-publisher.js.map +1 -0
- package/dist/activities/execute-deep-agent/platform-route.d.ts +145 -0
- package/dist/activities/execute-deep-agent/platform-route.js +237 -0
- package/dist/activities/execute-deep-agent/platform-route.js.map +1 -0
- package/dist/activities/execute-deep-agent/prompt-builder.d.ts +189 -0
- package/dist/activities/execute-deep-agent/prompt-builder.js +369 -0
- package/dist/activities/execute-deep-agent/prompt-builder.js.map +1 -0
- package/dist/activities/execute-deep-agent/resumed-history.d.ts +25 -0
- package/dist/activities/execute-deep-agent/resumed-history.js +47 -0
- package/dist/activities/execute-deep-agent/resumed-history.js.map +1 -0
- package/dist/activities/execute-deep-agent/streaming-side-effects.d.ts +49 -0
- package/dist/activities/execute-deep-agent/streaming-side-effects.js +73 -0
- package/dist/activities/execute-deep-agent/streaming-side-effects.js.map +1 -0
- package/dist/activities/execute-deep-agent/subagent-transformer.d.ts +253 -0
- package/dist/activities/execute-deep-agent/subagent-transformer.js +474 -0
- package/dist/activities/execute-deep-agent/subagent-transformer.js.map +1 -0
- package/dist/activities/execute-deep-agent/subagent-wiring.d.ts +99 -0
- package/dist/activities/execute-deep-agent/subagent-wiring.js +119 -0
- package/dist/activities/execute-deep-agent/subagent-wiring.js.map +1 -0
- package/dist/activities/execute-deep-agent/todo-list.d.ts +40 -0
- package/dist/activities/execute-deep-agent/todo-list.js +51 -0
- package/dist/activities/execute-deep-agent/todo-list.js.map +1 -0
- package/dist/activities/execute-deep-agent/translator.d.ts +167 -0
- package/dist/activities/execute-deep-agent/translator.js +521 -0
- package/dist/activities/execute-deep-agent/translator.js.map +1 -0
- package/dist/activities/execute-deep-agent/turn-settle.d.ts +48 -0
- package/dist/activities/execute-deep-agent/turn-settle.js +141 -0
- package/dist/activities/execute-deep-agent/turn-settle.js.map +1 -0
- package/dist/activities/execute-deep-agent/turn-setup.d.ts +281 -0
- package/dist/activities/execute-deep-agent/turn-setup.js +687 -0
- package/dist/activities/execute-deep-agent/turn-setup.js.map +1 -0
- package/dist/activities/execute-deep-agent/turn-stream.d.ts +105 -0
- package/dist/activities/execute-deep-agent/turn-stream.js +236 -0
- package/dist/activities/execute-deep-agent/turn-stream.js.map +1 -0
- package/dist/activities/execute-deep-agent/turn.d.ts +48 -0
- package/dist/activities/execute-deep-agent/turn.js +136 -0
- package/dist/activities/execute-deep-agent/turn.js.map +1 -0
- package/dist/activities/execute-deep-agent/v3-event-recorder.d.ts +32 -0
- package/dist/activities/execute-deep-agent/v3-event-recorder.js +72 -0
- package/dist/activities/execute-deep-agent/v3-event-recorder.js.map +1 -0
- package/dist/activities/generate-session-subject.d.ts +93 -0
- package/dist/activities/generate-session-subject.js +285 -0
- package/dist/activities/generate-session-subject.js.map +1 -0
- package/dist/activities/list-plugin-tools.d.ts +76 -0
- package/dist/activities/list-plugin-tools.js +170 -0
- package/dist/activities/list-plugin-tools.js.map +1 -0
- package/dist/agent-host/channel.d.ts +93 -0
- package/dist/agent-host/channel.js +332 -0
- package/dist/agent-host/channel.js.map +1 -0
- package/dist/agent-host/codec.d.ts +290 -0
- package/dist/agent-host/codec.js +437 -0
- package/dist/agent-host/codec.js.map +1 -0
- package/dist/agent-host/entry.d.ts +56 -0
- package/dist/agent-host/entry.js +137 -0
- package/dist/agent-host/entry.js.map +1 -0
- package/dist/agent-host/environment.d.ts +36 -0
- package/dist/agent-host/environment.js +72 -0
- package/dist/agent-host/environment.js.map +1 -0
- package/dist/agent-host/failed-boot.d.ts +15 -0
- package/dist/agent-host/failed-boot.js +26 -0
- package/dist/agent-host/failed-boot.js.map +1 -0
- package/dist/agent-host/fs-service.d.ts +18 -0
- package/dist/agent-host/fs-service.js +133 -0
- package/dist/agent-host/fs-service.js.map +1 -0
- package/dist/agent-host/host-sink.d.ts +63 -0
- package/dist/agent-host/host-sink.js +136 -0
- package/dist/agent-host/host-sink.js.map +1 -0
- package/dist/agent-host/host.d.ts +48 -0
- package/dist/agent-host/host.js +191 -0
- package/dist/agent-host/host.js.map +1 -0
- package/dist/agent-host/hosting.d.ts +80 -0
- package/dist/agent-host/hosting.js +126 -0
- package/dist/agent-host/hosting.js.map +1 -0
- package/dist/agent-host/protocol.d.ts +478 -0
- package/dist/agent-host/protocol.js +77 -0
- package/dist/agent-host/protocol.js.map +1 -0
- package/dist/agent-host/remote-adapter.d.ts +64 -0
- package/dist/agent-host/remote-adapter.js +283 -0
- package/dist/agent-host/remote-adapter.js.map +1 -0
- package/dist/agent-host/remote-fs.d.ts +19 -0
- package/dist/agent-host/remote-fs.js +120 -0
- package/dist/agent-host/remote-fs.js.map +1 -0
- package/dist/agent-host/supervisor.d.ts +149 -0
- package/dist/agent-host/supervisor.js +311 -0
- package/dist/agent-host/supervisor.js.map +1 -0
- package/dist/agent-proxy/cursor-lane.d.ts +124 -0
- package/dist/agent-proxy/cursor-lane.js +507 -0
- package/dist/agent-proxy/cursor-lane.js.map +1 -0
- package/dist/agent-proxy/lanes.d.ts +63 -0
- package/dist/agent-proxy/lanes.js +255 -0
- package/dist/agent-proxy/lanes.js.map +1 -0
- package/dist/agent-proxy/loopback-certificate.d.ts +27 -0
- package/dist/agent-proxy/loopback-certificate.js +115 -0
- package/dist/agent-proxy/loopback-certificate.js.map +1 -0
- package/dist/agent-proxy/otlp-forward.d.ts +67 -0
- package/dist/agent-proxy/otlp-forward.js +170 -0
- package/dist/agent-proxy/otlp-forward.js.map +1 -0
- package/dist/agent-proxy/relay.d.ts +67 -0
- package/dist/agent-proxy/relay.js +164 -0
- package/dist/agent-proxy/relay.js.map +1 -0
- package/dist/agent-proxy/server.d.ts +84 -0
- package/dist/agent-proxy/server.js +258 -0
- package/dist/agent-proxy/server.js.map +1 -0
- package/dist/attach/entry.d.ts +36 -0
- package/dist/attach/entry.js +69 -0
- package/dist/attach/entry.js.map +1 -0
- package/dist/attach/main.d.ts +14 -0
- package/dist/attach/main.js +25 -0
- package/dist/attach/main.js.map +1 -0
- package/dist/attach/push.d.ts +71 -0
- package/dist/attach/push.js +123 -0
- package/dist/attach/push.js.map +1 -0
- package/dist/attach/waiter.d.ts +108 -0
- package/dist/attach/waiter.js +323 -0
- package/dist/attach/waiter.js.map +1 -0
- package/dist/bootstrap.d.ts +80 -0
- package/dist/bootstrap.js +119 -0
- package/dist/bootstrap.js.map +1 -0
- package/dist/client/server-contracts.d.ts +51 -0
- package/dist/client/server-contracts.js +70 -0
- package/dist/client/server-contracts.js.map +1 -0
- package/dist/client/stigmer-client.d.ts +328 -0
- package/dist/client/stigmer-client.js +478 -0
- package/dist/client/stigmer-client.js.map +1 -0
- package/dist/client/token-claims.d.ts +40 -0
- package/dist/client/token-claims.js +88 -0
- package/dist/client/token-claims.js.map +1 -0
- package/dist/config.d.ts +216 -0
- package/dist/config.js +200 -0
- package/dist/config.js.map +1 -0
- package/dist/exit-backstop.d.ts +64 -0
- package/dist/exit-backstop.js +79 -0
- package/dist/exit-backstop.js.map +1 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/enum_pb.d.ts +1016 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/enum_pb.js +1035 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/enum_pb.js.map +1 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/ledger_pb.d.ts +402 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/ledger_pb.js +47 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/ledger_pb.js.map +1 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/rows_pb.d.ts +826 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/rows_pb.js +48 -0
- package/dist/gen/turn/ai/stigmer/runner/turn/v1/rows_pb.js.map +1 -0
- package/dist/gen-ai-conventions.d.ts +95 -0
- package/dist/gen-ai-conventions.js +102 -0
- package/dist/gen-ai-conventions.js.map +1 -0
- package/dist/harness/approval-answers.d.ts +104 -0
- package/dist/harness/approval-answers.js +136 -0
- package/dist/harness/approval-answers.js.map +1 -0
- package/dist/harness/approval-decisions.d.ts +50 -0
- package/dist/harness/approval-decisions.js +80 -0
- package/dist/harness/approval-decisions.js.map +1 -0
- package/dist/harness/capabilities.d.ts +149 -0
- package/dist/harness/capabilities.js +48 -0
- package/dist/harness/capabilities.js.map +1 -0
- package/dist/harness/capture.d.ts +154 -0
- package/dist/harness/capture.js +248 -0
- package/dist/harness/capture.js.map +1 -0
- package/dist/harness/cost-cap-watch.d.ts +31 -0
- package/dist/harness/cost-cap-watch.js +44 -0
- package/dist/harness/cost-cap-watch.js.map +1 -0
- package/dist/harness/events/emitter.d.ts +220 -0
- package/dist/harness/events/emitter.js +726 -0
- package/dist/harness/events/emitter.js.map +1 -0
- package/dist/harness/events/ids.d.ts +88 -0
- package/dist/harness/events/ids.js +136 -0
- package/dist/harness/events/ids.js.map +1 -0
- package/dist/harness/loaded-versions.d.ts +20 -0
- package/dist/harness/loaded-versions.js +70 -0
- package/dist/harness/loaded-versions.js.map +1 -0
- package/dist/harness/owed-undos.d.ts +119 -0
- package/dist/harness/owed-undos.js +200 -0
- package/dist/harness/owed-undos.js.map +1 -0
- package/dist/harness/persist-chokepoint.d.ts +113 -0
- package/dist/harness/persist-chokepoint.js +126 -0
- package/dist/harness/persist-chokepoint.js.map +1 -0
- package/dist/harness/registry.d.ts +108 -0
- package/dist/harness/registry.js +174 -0
- package/dist/harness/registry.js.map +1 -0
- package/dist/harness/run-span.d.ts +78 -0
- package/dist/harness/run-span.js +139 -0
- package/dist/harness/run-span.js.map +1 -0
- package/dist/harness/run-turn.d.ts +59 -0
- package/dist/harness/run-turn.js +749 -0
- package/dist/harness/run-turn.js.map +1 -0
- package/dist/harness/stop-controller.d.ts +65 -0
- package/dist/harness/stop-controller.js +70 -0
- package/dist/harness/stop-controller.js.map +1 -0
- package/dist/harness/terminal-table.d.ts +212 -0
- package/dist/harness/terminal-table.js +329 -0
- package/dist/harness/terminal-table.js.map +1 -0
- package/dist/harness/transcript/builder.d.ts +269 -0
- package/dist/harness/transcript/builder.js +842 -0
- package/dist/harness/transcript/builder.js.map +1 -0
- package/dist/harness/transcript/events.d.ts +236 -0
- package/dist/harness/transcript/events.js +55 -0
- package/dist/harness/transcript/events.js.map +1 -0
- package/dist/harness/transcript/resume-seed.d.ts +67 -0
- package/dist/harness/transcript/resume-seed.js +228 -0
- package/dist/harness/transcript/resume-seed.js.map +1 -0
- package/dist/harness/transcript/state.d.ts +111 -0
- package/dist/harness/transcript/state.js +147 -0
- package/dist/harness/transcript/state.js.map +1 -0
- package/dist/harness/turn-context.d.ts +923 -0
- package/dist/harness/turn-context.js +1448 -0
- package/dist/harness/turn-context.js.map +1 -0
- package/dist/harness/turn-timeline.d.ts +132 -0
- package/dist/harness/turn-timeline.js +213 -0
- package/dist/harness/turn-timeline.js.map +1 -0
- package/dist/harness/types.d.ts +700 -0
- package/dist/harness/types.js +72 -0
- package/dist/harness/types.js.map +1 -0
- package/dist/harness/usage-accumulator.d.ts +76 -0
- package/dist/harness/usage-accumulator.js +112 -0
- package/dist/harness/usage-accumulator.js.map +1 -0
- package/dist/harness-adapters.d.ts +40 -0
- package/dist/harness-adapters.js +45 -0
- package/dist/harness-adapters.js.map +1 -0
- package/dist/idle-watchdog.d.ts +11 -0
- package/dist/idle-watchdog.js +24 -0
- package/dist/idle-watchdog.js.map +1 -0
- package/dist/in-flight.d.ts +35 -0
- package/dist/in-flight.js +61 -0
- package/dist/in-flight.js.map +1 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +42 -0
- package/dist/index.js.map +1 -0
- package/dist/interceptors/run-credential-activity.d.ts +24 -0
- package/dist/interceptors/run-credential-activity.js +36 -0
- package/dist/interceptors/run-credential-activity.js.map +1 -0
- package/dist/ipc-protocol-fixtures.d.ts +28 -0
- package/dist/ipc-protocol-fixtures.js +50 -0
- package/dist/ipc-protocol-fixtures.js.map +1 -0
- package/dist/ipc-protocol.d.ts +43 -0
- package/dist/ipc-protocol.js +20 -0
- package/dist/ipc-protocol.js.map +1 -0
- package/dist/main.d.ts +26 -0
- package/dist/main.js +451 -0
- package/dist/main.js.map +1 -0
- package/dist/middleware/advisory-message.d.ts +52 -0
- package/dist/middleware/advisory-message.js +58 -0
- package/dist/middleware/advisory-message.js.map +1 -0
- package/dist/middleware/approval-gate.d.ts +255 -0
- package/dist/middleware/approval-gate.js +502 -0
- package/dist/middleware/approval-gate.js.map +1 -0
- package/dist/middleware/cost-advisory.d.ts +65 -0
- package/dist/middleware/cost-advisory.js +185 -0
- package/dist/middleware/cost-advisory.js.map +1 -0
- package/dist/middleware/error-hints.d.ts +27 -0
- package/dist/middleware/error-hints.js +116 -0
- package/dist/middleware/error-hints.js.map +1 -0
- package/dist/middleware/execution-budget.d.ts +38 -0
- package/dist/middleware/execution-budget.js +168 -0
- package/dist/middleware/execution-budget.js.map +1 -0
- package/dist/middleware/index.d.ts +55 -0
- package/dist/middleware/index.js +80 -0
- package/dist/middleware/index.js.map +1 -0
- package/dist/middleware/loop-detection.d.ts +22 -0
- package/dist/middleware/loop-detection.js +161 -0
- package/dist/middleware/loop-detection.js.map +1 -0
- package/dist/middleware/otel-spans.d.ts +43 -0
- package/dist/middleware/otel-spans.js +281 -0
- package/dist/middleware/otel-spans.js.map +1 -0
- package/dist/middleware/path-normalization.d.ts +84 -0
- package/dist/middleware/path-normalization.js +161 -0
- package/dist/middleware/path-normalization.js.map +1 -0
- package/dist/middleware/tool-intent.d.ts +57 -0
- package/dist/middleware/tool-intent.js +152 -0
- package/dist/middleware/tool-intent.js.map +1 -0
- package/dist/middleware/tool-scope.d.ts +119 -0
- package/dist/middleware/tool-scope.js +159 -0
- package/dist/middleware/tool-scope.js.map +1 -0
- package/dist/middleware/tool-truncation.d.ts +16 -0
- package/dist/middleware/tool-truncation.js +67 -0
- package/dist/middleware/tool-truncation.js.map +1 -0
- package/dist/middleware/types.d.ts +119 -0
- package/dist/middleware/types.js +10 -0
- package/dist/middleware/types.js.map +1 -0
- package/dist/otel-export.d.ts +142 -0
- package/dist/otel-export.js +269 -0
- package/dist/otel-export.js.map +1 -0
- package/dist/otel-metrics.d.ts +22 -0
- package/dist/otel-metrics.js +47 -0
- package/dist/otel-metrics.js.map +1 -0
- package/dist/otel.d.ts +49 -0
- package/dist/otel.js +125 -0
- package/dist/otel.js.map +1 -0
- package/dist/payload-codecs.d.ts +17 -0
- package/dist/payload-codecs.js +45 -0
- package/dist/payload-codecs.js.map +1 -0
- package/dist/pipe-safety.d.ts +55 -0
- package/dist/pipe-safety.js +103 -0
- package/dist/pipe-safety.js.map +1 -0
- package/dist/pool-member.d.ts +61 -0
- package/dist/pool-member.js +51 -0
- package/dist/pool-member.js.map +1 -0
- package/dist/preflight.d.ts +77 -0
- package/dist/preflight.js +98 -0
- package/dist/preflight.js.map +1 -0
- package/dist/run-trace-id.d.ts +34 -0
- package/dist/run-trace-id.js +44 -0
- package/dist/run-trace-id.js.map +1 -0
- package/dist/runner-entry.d.ts +15 -0
- package/dist/runner-entry.js +17 -0
- package/dist/runner-entry.js.map +1 -0
- package/dist/runner-manager.d.ts +160 -0
- package/dist/runner-manager.js +590 -0
- package/dist/runner-manager.js.map +1 -0
- package/dist/runner-token-coordinator.d.ts +61 -0
- package/dist/runner-token-coordinator.js +89 -0
- package/dist/runner-token-coordinator.js.map +1 -0
- package/dist/runner.d.ts +155 -0
- package/dist/runner.js +392 -0
- package/dist/runner.js.map +1 -0
- package/dist/sandbox-token-renewal.d.ts +64 -0
- package/dist/sandbox-token-renewal.js +168 -0
- package/dist/sandbox-token-renewal.js.map +1 -0
- package/dist/shared/activity-input.d.ts +52 -0
- package/dist/shared/activity-input.js +34 -0
- package/dist/shared/activity-input.js.map +1 -0
- package/dist/shared/agent-fs.d.ts +144 -0
- package/dist/shared/agent-fs.js +171 -0
- package/dist/shared/agent-fs.js.map +1 -0
- package/dist/shared/agent-handover.d.ts +42 -0
- package/dist/shared/agent-handover.js +156 -0
- package/dist/shared/agent-handover.js.map +1 -0
- package/dist/shared/agent-identity.d.ts +96 -0
- package/dist/shared/agent-identity.js +153 -0
- package/dist/shared/agent-identity.js.map +1 -0
- package/dist/shared/agent-servers.d.ts +4 -0
- package/dist/shared/agent-servers.js +46 -0
- package/dist/shared/agent-servers.js.map +1 -0
- package/dist/shared/approval-canonicalize.d.ts +19 -0
- package/dist/shared/approval-canonicalize.js +119 -0
- package/dist/shared/approval-canonicalize.js.map +1 -0
- package/dist/shared/approval-fingerprint.d.ts +103 -0
- package/dist/shared/approval-fingerprint.js +110 -0
- package/dist/shared/approval-fingerprint.js.map +1 -0
- package/dist/shared/approval-policy.d.ts +323 -0
- package/dist/shared/approval-policy.js +375 -0
- package/dist/shared/approval-policy.js.map +1 -0
- package/dist/shared/archive-mount.d.ts +68 -0
- package/dist/shared/archive-mount.js +108 -0
- package/dist/shared/archive-mount.js.map +1 -0
- package/dist/shared/args-preview.d.ts +90 -0
- package/dist/shared/args-preview.js +121 -0
- package/dist/shared/args-preview.js.map +1 -0
- package/dist/shared/artifact-storage.d.ts +155 -0
- package/dist/shared/artifact-storage.js +373 -0
- package/dist/shared/artifact-storage.js.map +1 -0
- package/dist/shared/attachment-download-urls.d.ts +53 -0
- package/dist/shared/attachment-download-urls.js +68 -0
- package/dist/shared/attachment-download-urls.js.map +1 -0
- package/dist/shared/attachment-naming.d.ts +53 -0
- package/dist/shared/attachment-naming.js +59 -0
- package/dist/shared/attachment-naming.js.map +1 -0
- package/dist/shared/attachment-resolver.d.ts +124 -0
- package/dist/shared/attachment-resolver.js +322 -0
- package/dist/shared/attachment-resolver.js.map +1 -0
- package/dist/shared/attachment-vision.d.ts +245 -0
- package/dist/shared/attachment-vision.js +339 -0
- package/dist/shared/attachment-vision.js.map +1 -0
- package/dist/shared/attachment-zip.d.ts +85 -0
- package/dist/shared/attachment-zip.js +185 -0
- package/dist/shared/attachment-zip.js.map +1 -0
- package/dist/shared/blueprint-resolver.d.ts +175 -0
- package/dist/shared/blueprint-resolver.js +305 -0
- package/dist/shared/blueprint-resolver.js.map +1 -0
- package/dist/shared/builtin-assistant-prompt.d.ts +30 -0
- package/dist/shared/builtin-assistant-prompt.js +36 -0
- package/dist/shared/builtin-assistant-prompt.js.map +1 -0
- package/dist/shared/builtin-judge.d.ts +9 -0
- package/dist/shared/builtin-judge.js +53 -0
- package/dist/shared/builtin-judge.js.map +1 -0
- package/dist/shared/caller-identity.d.ts +112 -0
- package/dist/shared/caller-identity.js +150 -0
- package/dist/shared/caller-identity.js.map +1 -0
- package/dist/shared/channel-attachment.d.ts +90 -0
- package/dist/shared/channel-attachment.js +209 -0
- package/dist/shared/channel-attachment.js.map +1 -0
- package/dist/shared/checkpointer/factory.d.ts +32 -0
- package/dist/shared/checkpointer/factory.js +72 -0
- package/dist/shared/checkpointer/factory.js.map +1 -0
- package/dist/shared/checkpointer/http-saver.d.ts +70 -0
- package/dist/shared/checkpointer/http-saver.js +335 -0
- package/dist/shared/checkpointer/http-saver.js.map +1 -0
- package/dist/shared/checkpointer/sqlite-saver.d.ts +54 -0
- package/dist/shared/checkpointer/sqlite-saver.js +272 -0
- package/dist/shared/checkpointer/sqlite-saver.js.map +1 -0
- package/dist/shared/checkpointer/types.d.ts +25 -0
- package/dist/shared/checkpointer/types.js +18 -0
- package/dist/shared/checkpointer/types.js.map +1 -0
- package/dist/shared/cold-start-timing.d.ts +124 -0
- package/dist/shared/cold-start-timing.js +220 -0
- package/dist/shared/cold-start-timing.js.map +1 -0
- package/dist/shared/context-bridge.d.ts +30 -0
- package/dist/shared/context-bridge.js +45 -0
- package/dist/shared/context-bridge.js.map +1 -0
- package/dist/shared/conversation-attachment.d.ts +103 -0
- package/dist/shared/conversation-attachment.js +128 -0
- package/dist/shared/conversation-attachment.js.map +1 -0
- package/dist/shared/conversation-catchup.d.ts +40 -0
- package/dist/shared/conversation-catchup.js +86 -0
- package/dist/shared/conversation-catchup.js.map +1 -0
- package/dist/shared/cost-guard.d.ts +51 -0
- package/dist/shared/cost-guard.js +58 -0
- package/dist/shared/cost-guard.js.map +1 -0
- package/dist/shared/declared-preferences.d.ts +47 -0
- package/dist/shared/declared-preferences.js +64 -0
- package/dist/shared/declared-preferences.js.map +1 -0
- package/dist/shared/eval-case/agent-mock.d.ts +61 -0
- package/dist/shared/eval-case/agent-mock.js +88 -0
- package/dist/shared/eval-case/agent-mock.js.map +1 -0
- package/dist/shared/eval-case/case-archive.d.ts +51 -0
- package/dist/shared/eval-case/case-archive.js +119 -0
- package/dist/shared/eval-case/case-archive.js.map +1 -0
- package/dist/shared/eval-case/mock-endpoint.d.ts +68 -0
- package/dist/shared/eval-case/mock-endpoint.js +209 -0
- package/dist/shared/eval-case/mock-endpoint.js.map +1 -0
- package/dist/shared/eval-case/prepare-case.d.ts +78 -0
- package/dist/shared/eval-case/prepare-case.js +193 -0
- package/dist/shared/eval-case/prepare-case.js.map +1 -0
- package/dist/shared/eval-case/read-files.d.ts +26 -0
- package/dist/shared/eval-case/read-files.js +88 -0
- package/dist/shared/eval-case/read-files.js.map +1 -0
- package/dist/shared/exact-apply.d.ts +109 -0
- package/dist/shared/exact-apply.js +205 -0
- package/dist/shared/exact-apply.js.map +1 -0
- package/dist/shared/execution-context.d.ts +47 -0
- package/dist/shared/execution-context.js +51 -0
- package/dist/shared/execution-context.js.map +1 -0
- package/dist/shared/execution-target.d.ts +13 -0
- package/dist/shared/execution-target.js +15 -0
- package/dist/shared/execution-target.js.map +1 -0
- package/dist/shared/extract-json.d.ts +26 -0
- package/dist/shared/extract-json.js +140 -0
- package/dist/shared/extract-json.js.map +1 -0
- package/dist/shared/extract-structured-output.d.ts +38 -0
- package/dist/shared/extract-structured-output.js +68 -0
- package/dist/shared/extract-structured-output.js.map +1 -0
- package/dist/shared/file-change.d.ts +42 -0
- package/dist/shared/file-change.js +55 -0
- package/dist/shared/file-change.js.map +1 -0
- package/dist/shared/file-tools.d.ts +105 -0
- package/dist/shared/file-tools.js +166 -0
- package/dist/shared/file-tools.js.map +1 -0
- package/dist/shared/filereview/capture.d.ts +238 -0
- package/dist/shared/filereview/capture.js +559 -0
- package/dist/shared/filereview/capture.js.map +1 -0
- package/dist/shared/filereview/cas-progress.d.ts +45 -0
- package/dist/shared/filereview/cas-progress.js +131 -0
- package/dist/shared/filereview/cas-progress.js.map +1 -0
- package/dist/shared/filereview/cas-substrate.d.ts +226 -0
- package/dist/shared/filereview/cas-substrate.js +315 -0
- package/dist/shared/filereview/cas-substrate.js.map +1 -0
- package/dist/shared/filereview/cas-touched.d.ts +56 -0
- package/dist/shared/filereview/cas-touched.js +63 -0
- package/dist/shared/filereview/cas-touched.js.map +1 -0
- package/dist/shared/filereview/command-provenance.d.ts +95 -0
- package/dist/shared/filereview/command-provenance.js +134 -0
- package/dist/shared/filereview/command-provenance.js.map +1 -0
- package/dist/shared/filereview/digest.d.ts +40 -0
- package/dist/shared/filereview/digest.js +66 -0
- package/dist/shared/filereview/digest.js.map +1 -0
- package/dist/shared/filereview/events.d.ts +199 -0
- package/dist/shared/filereview/events.js +348 -0
- package/dist/shared/filereview/events.js.map +1 -0
- package/dist/shared/filereview/git-substrate.d.ts +233 -0
- package/dist/shared/filereview/git-substrate.js +528 -0
- package/dist/shared/filereview/git-substrate.js.map +1 -0
- package/dist/shared/filereview/index.d.ts +15 -0
- package/dist/shared/filereview/index.js +16 -0
- package/dist/shared/filereview/index.js.map +1 -0
- package/dist/shared/filereview/line-counts.d.ts +48 -0
- package/dist/shared/filereview/line-counts.js +72 -0
- package/dist/shared/filereview/line-counts.js.map +1 -0
- package/dist/shared/filereview/progress.d.ts +200 -0
- package/dist/shared/filereview/progress.js +245 -0
- package/dist/shared/filereview/progress.js.map +1 -0
- package/dist/shared/filereview/record.d.ts +53 -0
- package/dist/shared/filereview/record.js +104 -0
- package/dist/shared/filereview/record.js.map +1 -0
- package/dist/shared/filereview/secret-paths.d.ts +61 -0
- package/dist/shared/filereview/secret-paths.js +103 -0
- package/dist/shared/filereview/secret-paths.js.map +1 -0
- package/dist/shared/fingerprint-secret.d.ts +35 -0
- package/dist/shared/fingerprint-secret.js +68 -0
- package/dist/shared/fingerprint-secret.js.map +1 -0
- package/dist/shared/grpc-retry.d.ts +28 -0
- package/dist/shared/grpc-retry.js +39 -0
- package/dist/shared/grpc-retry.js.map +1 -0
- package/dist/shared/heartbeat.d.ts +24 -0
- package/dist/shared/heartbeat.js +40 -0
- package/dist/shared/heartbeat.js.map +1 -0
- package/dist/shared/hooks/answer.d.ts +49 -0
- package/dist/shared/hooks/answer.js +152 -0
- package/dist/shared/hooks/answer.js.map +1 -0
- package/dist/shared/hooks/condition.d.ts +71 -0
- package/dist/shared/hooks/condition.js +341 -0
- package/dist/shared/hooks/condition.js.map +1 -0
- package/dist/shared/hooks/evaluate.d.ts +125 -0
- package/dist/shared/hooks/evaluate.js +253 -0
- package/dist/shared/hooks/evaluate.js.map +1 -0
- package/dist/shared/hooks/formats/claude-code.d.ts +43 -0
- package/dist/shared/hooks/formats/claude-code.js +90 -0
- package/dist/shared/hooks/formats/claude-code.js.map +1 -0
- package/dist/shared/hooks/formats/common.d.ts +30 -0
- package/dist/shared/hooks/formats/common.js +7 -0
- package/dist/shared/hooks/formats/common.js.map +1 -0
- package/dist/shared/hooks/formats/cursor.d.ts +72 -0
- package/dist/shared/hooks/formats/cursor.js +238 -0
- package/dist/shared/hooks/formats/cursor.js.map +1 -0
- package/dist/shared/hooks/hook-set.d.ts +84 -0
- package/dist/shared/hooks/hook-set.js +80 -0
- package/dist/shared/hooks/hook-set.js.map +1 -0
- package/dist/shared/hooks/matcher.d.ts +14 -0
- package/dist/shared/hooks/matcher.js +32 -0
- package/dist/shared/hooks/matcher.js.map +1 -0
- package/dist/shared/hooks/messages.d.ts +19 -0
- package/dist/shared/hooks/messages.js +34 -0
- package/dist/shared/hooks/messages.js.map +1 -0
- package/dist/shared/hooks/run.d.ts +89 -0
- package/dist/shared/hooks/run.js +146 -0
- package/dist/shared/hooks/run.js.map +1 -0
- package/dist/shared/hooks/setup.d.ts +73 -0
- package/dist/shared/hooks/setup.js +166 -0
- package/dist/shared/hooks/setup.js.map +1 -0
- package/dist/shared/hooks/shell-commands.d.ts +39 -0
- package/dist/shared/hooks/shell-commands.js +326 -0
- package/dist/shared/hooks/shell-commands.js.map +1 -0
- package/dist/shared/hooks/tool-view.d.ts +164 -0
- package/dist/shared/hooks/tool-view.js +310 -0
- package/dist/shared/hooks/tool-view.js.map +1 -0
- package/dist/shared/http-retry.d.ts +85 -0
- package/dist/shared/http-retry.js +101 -0
- package/dist/shared/http-retry.js.map +1 -0
- package/dist/shared/implement-plan-prompt.d.ts +44 -0
- package/dist/shared/implement-plan-prompt.js +98 -0
- package/dist/shared/implement-plan-prompt.js.map +1 -0
- package/dist/shared/json-schema-to-zod.d.ts +13 -0
- package/dist/shared/json-schema-to-zod.js +49 -0
- package/dist/shared/json-schema-to-zod.js.map +1 -0
- package/dist/shared/llm-backend.d.ts +303 -0
- package/dist/shared/llm-backend.js +491 -0
- package/dist/shared/llm-backend.js.map +1 -0
- package/dist/shared/llm-proxy.d.ts +64 -0
- package/dist/shared/llm-proxy.js +131 -0
- package/dist/shared/llm-proxy.js.map +1 -0
- package/dist/shared/mcp-manager.d.ts +61 -0
- package/dist/shared/mcp-manager.js +131 -0
- package/dist/shared/mcp-manager.js.map +1 -0
- package/dist/shared/mcp-oauth-detect.d.ts +23 -0
- package/dist/shared/mcp-oauth-detect.js +72 -0
- package/dist/shared/mcp-oauth-detect.js.map +1 -0
- package/dist/shared/mcp-resolver.d.ts +145 -0
- package/dist/shared/mcp-resolver.js +238 -0
- package/dist/shared/mcp-resolver.js.map +1 -0
- package/dist/shared/mcp-schema-sanitizer.d.ts +68 -0
- package/dist/shared/mcp-schema-sanitizer.js +195 -0
- package/dist/shared/mcp-schema-sanitizer.js.map +1 -0
- package/dist/shared/mcp-tool-listing.d.ts +80 -0
- package/dist/shared/mcp-tool-listing.js +166 -0
- package/dist/shared/mcp-tool-listing.js.map +1 -0
- package/dist/shared/mcp-transport-guard.d.ts +53 -0
- package/dist/shared/mcp-transport-guard.js +70 -0
- package/dist/shared/mcp-transport-guard.js.map +1 -0
- package/dist/shared/memory-attachment.d.ts +103 -0
- package/dist/shared/memory-attachment.js +142 -0
- package/dist/shared/memory-attachment.js.map +1 -0
- package/dist/shared/memory-retrieval.d.ts +126 -0
- package/dist/shared/memory-retrieval.js +293 -0
- package/dist/shared/memory-retrieval.js.map +1 -0
- package/dist/shared/model-client.d.ts +111 -0
- package/dist/shared/model-client.js +328 -0
- package/dist/shared/model-client.js.map +1 -0
- package/dist/shared/model-error.d.ts +94 -0
- package/dist/shared/model-error.js +475 -0
- package/dist/shared/model-error.js.map +1 -0
- package/dist/shared/model-facts.d.ts +21 -0
- package/dist/shared/model-facts.js +22 -0
- package/dist/shared/model-facts.js.map +1 -0
- package/dist/shared/model-lanes.d.ts +48 -0
- package/dist/shared/model-lanes.js +52 -0
- package/dist/shared/model-lanes.js.map +1 -0
- package/dist/shared/model-pricing-data.d.ts +20 -0
- package/dist/shared/model-pricing-data.js +82 -0
- package/dist/shared/model-pricing-data.js.map +1 -0
- package/dist/shared/model-pricing.d.ts +16 -0
- package/dist/shared/model-pricing.js +46 -0
- package/dist/shared/model-pricing.js.map +1 -0
- package/dist/shared/model-registry.d.ts +113 -0
- package/dist/shared/model-registry.js +250 -0
- package/dist/shared/model-registry.js.map +1 -0
- package/dist/shared/persist-decision.d.ts +38 -0
- package/dist/shared/persist-decision.js +40 -0
- package/dist/shared/persist-decision.js.map +1 -0
- package/dist/shared/placeholder-resolver.d.ts +39 -0
- package/dist/shared/placeholder-resolver.js +86 -0
- package/dist/shared/placeholder-resolver.js.map +1 -0
- package/dist/shared/plan-artifact.d.ts +105 -0
- package/dist/shared/plan-artifact.js +225 -0
- package/dist/shared/plan-artifact.js.map +1 -0
- package/dist/shared/plan-mode-permissions.d.ts +49 -0
- package/dist/shared/plan-mode-permissions.js +51 -0
- package/dist/shared/plan-mode-permissions.js.map +1 -0
- package/dist/shared/plan-mode-prompt.d.ts +41 -0
- package/dist/shared/plan-mode-prompt.js +74 -0
- package/dist/shared/plan-mode-prompt.js.map +1 -0
- package/dist/shared/platform-server-address.d.ts +72 -0
- package/dist/shared/platform-server-address.js +103 -0
- package/dist/shared/platform-server-address.js.map +1 -0
- package/dist/shared/plugin-mount.d.ts +165 -0
- package/dist/shared/plugin-mount.js +428 -0
- package/dist/shared/plugin-mount.js.map +1 -0
- package/dist/shared/plugin-servers.d.ts +16 -0
- package/dist/shared/plugin-servers.js +22 -0
- package/dist/shared/plugin-servers.js.map +1 -0
- package/dist/shared/prompt-sections.d.ts +140 -0
- package/dist/shared/prompt-sections.js +135 -0
- package/dist/shared/prompt-sections.js.map +1 -0
- package/dist/shared/recalled-memories.d.ts +55 -0
- package/dist/shared/recalled-memories.js +70 -0
- package/dist/shared/recalled-memories.js.map +1 -0
- package/dist/shared/registry-endpoint.d.ts +60 -0
- package/dist/shared/registry-endpoint.js +99 -0
- package/dist/shared/registry-endpoint.js.map +1 -0
- package/dist/shared/run-credential-store.d.ts +32 -0
- package/dist/shared/run-credential-store.js +39 -0
- package/dist/shared/run-credential-store.js.map +1 -0
- package/dist/shared/run-credential.d.ts +40 -0
- package/dist/shared/run-credential.js +47 -0
- package/dist/shared/run-credential.js.map +1 -0
- package/dist/shared/run-values.d.ts +88 -0
- package/dist/shared/run-values.js +101 -0
- package/dist/shared/run-values.js.map +1 -0
- package/dist/shared/runner-credential-keys.d.ts +20 -0
- package/dist/shared/runner-credential-keys.js +101 -0
- package/dist/shared/runner-credential-keys.js.map +1 -0
- package/dist/shared/runner-credential-store.d.ts +77 -0
- package/dist/shared/runner-credential-store.js +111 -0
- package/dist/shared/runner-credential-store.js.map +1 -0
- package/dist/shared/sender-identity.d.ts +50 -0
- package/dist/shared/sender-identity.js +69 -0
- package/dist/shared/sender-identity.js.map +1 -0
- package/dist/shared/service-tier.d.ts +55 -0
- package/dist/shared/service-tier.js +67 -0
- package/dist/shared/service-tier.js.map +1 -0
- package/dist/shared/session-context.d.ts +35 -0
- package/dist/shared/session-context.js +52 -0
- package/dist/shared/session-context.js.map +1 -0
- package/dist/shared/shell-env.d.ts +42 -0
- package/dist/shared/shell-env.js +65 -0
- package/dist/shared/shell-env.js.map +1 -0
- package/dist/shared/skill-mount.d.ts +135 -0
- package/dist/shared/skill-mount.js +178 -0
- package/dist/shared/skill-mount.js.map +1 -0
- package/dist/shared/skill-resolver.d.ts +57 -0
- package/dist/shared/skill-resolver.js +113 -0
- package/dist/shared/skill-resolver.js.map +1 -0
- package/dist/shared/stall-watchdog.d.ts +68 -0
- package/dist/shared/stall-watchdog.js +102 -0
- package/dist/shared/stall-watchdog.js.map +1 -0
- package/dist/shared/status-offload.d.ts +196 -0
- package/dist/shared/status-offload.js +655 -0
- package/dist/shared/status-offload.js.map +1 -0
- package/dist/shared/status.d.ts +100 -0
- package/dist/shared/status.js +191 -0
- package/dist/shared/status.js.map +1 -0
- package/dist/shared/streaming-scheduler.d.ts +59 -0
- package/dist/shared/streaming-scheduler.js +110 -0
- package/dist/shared/streaming-scheduler.js.map +1 -0
- package/dist/shared/subagent-gate.d.ts +47 -0
- package/dist/shared/subagent-gate.js +98 -0
- package/dist/shared/subagent-gate.js.map +1 -0
- package/dist/shared/subagent-rows.d.ts +21 -0
- package/dist/shared/subagent-rows.js +34 -0
- package/dist/shared/subagent-rows.js.map +1 -0
- package/dist/shared/subagents.d.ts +49 -0
- package/dist/shared/subagents.js +51 -0
- package/dist/shared/subagents.js.map +1 -0
- package/dist/shared/synthesized-attachment.d.ts +73 -0
- package/dist/shared/synthesized-attachment.js +59 -0
- package/dist/shared/synthesized-attachment.js.map +1 -0
- package/dist/shared/telemetry-content.d.ts +132 -0
- package/dist/shared/telemetry-content.js +239 -0
- package/dist/shared/telemetry-content.js.map +1 -0
- package/dist/shared/thinking-mode.d.ts +82 -0
- package/dist/shared/thinking-mode.js +105 -0
- package/dist/shared/thinking-mode.js.map +1 -0
- package/dist/shared/todos.d.ts +30 -0
- package/dist/shared/todos.js +58 -0
- package/dist/shared/todos.js.map +1 -0
- package/dist/shared/tool-kind.d.ts +41 -0
- package/dist/shared/tool-kind.js +107 -0
- package/dist/shared/tool-kind.js.map +1 -0
- package/dist/shared/tool-lists.d.ts +283 -0
- package/dist/shared/tool-lists.js +518 -0
- package/dist/shared/tool-lists.js.map +1 -0
- package/dist/shared/tool-rounds.d.ts +91 -0
- package/dist/shared/tool-rounds.js +136 -0
- package/dist/shared/tool-rounds.js.map +1 -0
- package/dist/shared/tool-row.d.ts +195 -0
- package/dist/shared/tool-row.js +320 -0
- package/dist/shared/tool-row.js.map +1 -0
- package/dist/shared/trace-context.d.ts +20 -0
- package/dist/shared/trace-context.js +36 -0
- package/dist/shared/trace-context.js.map +1 -0
- package/dist/shared/with-timeout.d.ts +27 -0
- package/dist/shared/with-timeout.js +47 -0
- package/dist/shared/with-timeout.js.map +1 -0
- package/dist/shared/worker-shutdown.d.ts +99 -0
- package/dist/shared/worker-shutdown.js +94 -0
- package/dist/shared/worker-shutdown.js.map +1 -0
- package/dist/shared/workspace/file-tree.d.ts +13 -0
- package/dist/shared/workspace/file-tree.js +101 -0
- package/dist/shared/workspace/file-tree.js.map +1 -0
- package/dist/shared/workspace/git-credential.d.ts +91 -0
- package/dist/shared/workspace/git-credential.js +222 -0
- package/dist/shared/workspace/git-credential.js.map +1 -0
- package/dist/shared/workspace/git-identity.d.ts +36 -0
- package/dist/shared/workspace/git-identity.js +39 -0
- package/dist/shared/workspace/git-identity.js.map +1 -0
- package/dist/shared/workspace/local-backend.d.ts +44 -0
- package/dist/shared/workspace/local-backend.js +110 -0
- package/dist/shared/workspace/local-backend.js.map +1 -0
- package/dist/shared/workspace/platform-dir.d.ts +106 -0
- package/dist/shared/workspace/platform-dir.js +151 -0
- package/dist/shared/workspace/platform-dir.js.map +1 -0
- package/dist/shared/workspace/platform-mount.d.ts +95 -0
- package/dist/shared/workspace/platform-mount.js +157 -0
- package/dist/shared/workspace/platform-mount.js.map +1 -0
- package/dist/shared/workspace/provisioner.d.ts +52 -0
- package/dist/shared/workspace/provisioner.js +70 -0
- package/dist/shared/workspace/provisioner.js.map +1 -0
- package/dist/shared/workspace/session-provision.d.ts +56 -0
- package/dist/shared/workspace/session-provision.js +54 -0
- package/dist/shared/workspace/session-provision.js.map +1 -0
- package/dist/shared/workspace/session-root.d.ts +35 -0
- package/dist/shared/workspace/session-root.js +53 -0
- package/dist/shared/workspace/session-root.js.map +1 -0
- package/dist/shared/workspace/sources/empty.d.ts +8 -0
- package/dist/shared/workspace/sources/empty.js +16 -0
- package/dist/shared/workspace/sources/empty.js.map +1 -0
- package/dist/shared/workspace/sources/git.d.ts +30 -0
- package/dist/shared/workspace/sources/git.js +224 -0
- package/dist/shared/workspace/sources/git.js.map +1 -0
- package/dist/shared/workspace/sources/local-path.d.ts +17 -0
- package/dist/shared/workspace/sources/local-path.js +61 -0
- package/dist/shared/workspace/sources/local-path.js.map +1 -0
- package/dist/shared/workspace/stigmer-link.d.ts +73 -0
- package/dist/shared/workspace/stigmer-link.js +173 -0
- package/dist/shared/workspace/stigmer-link.js.map +1 -0
- package/dist/shared/workspace/types.d.ts +71 -0
- package/dist/shared/workspace/types.js +19 -0
- package/dist/shared/workspace/types.js.map +1 -0
- package/dist/shared/workspace/workspace-lock.d.ts +86 -0
- package/dist/shared/workspace/workspace-lock.js +190 -0
- package/dist/shared/workspace/workspace-lock.js.map +1 -0
- package/dist/shared/workspace/writeback-coordinator.d.ts +119 -0
- package/dist/shared/workspace/writeback-coordinator.js +361 -0
- package/dist/shared/workspace/writeback-coordinator.js.map +1 -0
- package/dist/shared/zip-extract.d.ts +55 -0
- package/dist/shared/zip-extract.js +98 -0
- package/dist/shared/zip-extract.js.map +1 -0
- package/dist/tools/index.d.ts +26 -0
- package/dist/tools/index.js +26 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/url-guard.d.ts +77 -0
- package/dist/tools/url-guard.js +119 -0
- package/dist/tools/url-guard.js.map +1 -0
- package/dist/tools/web-fetch-tool.d.ts +55 -0
- package/dist/tools/web-fetch-tool.js +218 -0
- package/dist/tools/web-fetch-tool.js.map +1 -0
- package/dist/worker.d.ts +35 -0
- package/dist/worker.js +71 -0
- package/dist/worker.js.map +1 -0
- package/dist/workflow-source.d.ts +38 -0
- package/dist/workflow-source.js +53 -0
- package/dist/workflow-source.js.map +1 -0
- package/dist/workflows/index.d.ts +32 -0
- package/dist/workflows/index.js +33 -0
- package/dist/workflows/index.js.map +1 -0
- package/dist/workflows/list-plugin-tools.d.ts +23 -0
- package/dist/workflows/list-plugin-tools.js +56 -0
- package/dist/workflows/list-plugin-tools.js.map +1 -0
- package/dist/workflows/types.d.ts +43 -0
- package/dist/workflows/types.js +18 -0
- package/dist/workflows/types.js.map +1 -0
- package/package.json +161 -0
- package/src/__test-utils__/__tests__/execution-record-barrier.test.ts +75 -0
- package/src/__test-utils__/__tests__/harness-contract-self-check.test.ts +361 -0
- package/src/__test-utils__/__tests__/live-gate.test.ts +100 -0
- package/src/__test-utils__/__tests__/real-model-registry.test.ts +53 -0
- package/src/__test-utils__/__tests__/vitest-global-setup.test.ts +37 -0
- package/src/__test-utils__/agent-host-probe-child.ts +77 -0
- package/src/__test-utils__/approval-contract/contract.ts +613 -0
- package/src/__test-utils__/approval-contract/hook-commands.ts +100 -0
- package/src/__test-utils__/approval-contract/types.ts +323 -0
- package/src/__test-utils__/approval-log.ts +142 -0
- package/src/__test-utils__/config-fixture.ts +65 -0
- package/src/__test-utils__/cursor-sdk-wire-child.ts +47 -0
- package/src/__test-utils__/execution-record-fixture.ts +229 -0
- package/src/__test-utils__/fake-artifact-storage.ts +83 -0
- package/src/__test-utils__/fake-upstream.ts +67 -0
- package/src/__test-utils__/file-review-projection.ts +77 -0
- package/src/__test-utils__/git-workspace-fixture.ts +58 -0
- package/src/__test-utils__/harness-boot-order-child.ts +78 -0
- package/src/__test-utils__/harness-contract/contract.ts +652 -0
- package/src/__test-utils__/harness-contract/recording-sink.ts +138 -0
- package/src/__test-utils__/harness-contract/runtime-contract.ts +1136 -0
- package/src/__test-utils__/harness-contract/scripted-adapter.ts +404 -0
- package/src/__test-utils__/harness-contract/types.ts +200 -0
- package/src/__test-utils__/hermetic-activity.ts +1061 -0
- package/src/__test-utils__/import-http2-first.ts +11 -0
- package/src/__test-utils__/live-gate.ts +106 -0
- package/src/__test-utils__/loopback-host.ts +48 -0
- package/src/__test-utils__/mock-client.ts +52 -0
- package/src/__test-utils__/mock-workspace.ts +28 -0
- package/src/__test-utils__/model-registry-fixture.ts +133 -0
- package/src/__test-utils__/module-specifiers.ts +177 -0
- package/src/__test-utils__/proto-helpers.ts +70 -0
- package/src/__test-utils__/real-model-registry.ts +85 -0
- package/src/__test-utils__/refuse-engine-sdks.ts +18 -0
- package/src/__test-utils__/timing-lines.ts +43 -0
- package/src/__test-utils__/turn-input-fixture.ts +166 -0
- package/src/__test-utils__/vitest-global-setup.ts +50 -0
- package/src/__tests__/agent-separation.container.test.ts +157 -0
- package/src/__tests__/approval-gateway-contract.test.ts +29 -0
- package/src/__tests__/bootstrap.test.ts +264 -0
- package/src/__tests__/config-boundary.test.ts +135 -0
- package/src/__tests__/config.test.ts +165 -0
- package/src/__tests__/exit-backstop.test.ts +91 -0
- package/src/__tests__/harness-boot-order.test.ts +87 -0
- package/src/__tests__/harness-contract.test.ts +27 -0
- package/src/__tests__/in-flight.test.ts +84 -0
- package/src/__tests__/ipc-protocol-fixtures.test.ts +61 -0
- package/src/__tests__/ipc-protocol.test.ts +33 -0
- package/src/__tests__/otel-export.test.ts +266 -0
- package/src/__tests__/otel-init.test.ts +111 -0
- package/src/__tests__/otel-metrics.test.ts +37 -0
- package/src/__tests__/pipe-safety.test.ts +119 -0
- package/src/__tests__/pool-member.test.ts +77 -0
- package/src/__tests__/preflight.test.ts +104 -0
- package/src/__tests__/readme-environment.test.ts +678 -0
- package/src/__tests__/run-credential-registration.test.ts +53 -0
- package/src/__tests__/run-trace-id.test.ts +53 -0
- package/src/__tests__/runner-hosting.test.ts +134 -0
- package/src/__tests__/runner-manager-interceptors.test.ts +67 -0
- package/src/__tests__/runner-manager-shutdown.test.ts +199 -0
- package/src/__tests__/runner-manager.test.ts +95 -0
- package/src/__tests__/runner-token-coordinator.test.ts +166 -0
- package/src/__tests__/runner.test.ts +284 -0
- package/src/__tests__/sandbox-token-renewal.test.ts +175 -0
- package/src/__tests__/worker.test.ts +107 -0
- package/src/activities/__tests__/attach-session.test.ts +133 -0
- package/src/activities/__tests__/ensure-thread.test.ts +96 -0
- package/src/activities/__tests__/error-classifier.test.ts +464 -0
- package/src/activities/__tests__/generate-session-subject-wire.test.ts +119 -0
- package/src/activities/__tests__/generate-session-subject.test.ts +356 -0
- package/src/activities/__tests__/list-plugin-tools.test.ts +392 -0
- package/src/activities/attach-session.ts +111 -0
- package/src/activities/ensure-thread.ts +45 -0
- package/src/activities/execute-cursor/__test-utils__/__tests__/scripted-double.test.ts +126 -0
- package/src/activities/execute-cursor/__test-utils__/contract-subject.ts +445 -0
- package/src/activities/execute-cursor/__test-utils__/cursor-hook-harness.ts +407 -0
- package/src/activities/execute-cursor/__test-utils__/fold.ts +118 -0
- package/src/activities/execute-cursor/__test-utils__/gateway-substrate.ts +316 -0
- package/src/activities/execute-cursor/__test-utils__/hermetic-cursor.ts +428 -0
- package/src/activities/execute-cursor/__test-utils__/scripted-agent.ts +374 -0
- package/src/activities/execute-cursor/__test-utils__/scripted-sdk.ts +310 -0
- package/src/activities/execute-cursor/__tests__/adapter-is-temporal-free.test.ts +45 -0
- package/src/activities/execute-cursor/__tests__/agent-session-cache.test.ts +220 -0
- package/src/activities/execute-cursor/__tests__/approval-decisions-agree.test.ts +141 -0
- package/src/activities/execute-cursor/__tests__/approval-gate.test.ts +335 -0
- package/src/activities/execute-cursor/__tests__/approval-state.test.ts +288 -0
- package/src/activities/execute-cursor/__tests__/boundary-seal.test.ts +125 -0
- package/src/activities/execute-cursor/__tests__/build-prompt.test.ts +1045 -0
- package/src/activities/execute-cursor/__tests__/cas-observations.test.ts +267 -0
- package/src/activities/execute-cursor/__tests__/check-tool-scope.test.ts +290 -0
- package/src/activities/execute-cursor/__tests__/coarse-fingerprint.test.ts +98 -0
- package/src/activities/execute-cursor/__tests__/cursor-baseurl-routing.live.test.ts +94 -0
- package/src/activities/execute-cursor/__tests__/cursor-event-recorder.test.ts +142 -0
- package/src/activities/execute-cursor/__tests__/cursor-fetch-interceptor-bypass.live.test.ts +76 -0
- package/src/activities/execute-cursor/__tests__/cursor-generate-image.live.test.ts +154 -0
- package/src/activities/execute-cursor/__tests__/cursor-hook-protocol.live.test.ts +479 -0
- package/src/activities/execute-cursor/__tests__/cursor-hooks-gate.live.test.ts +295 -0
- package/src/activities/execute-cursor/__tests__/cursor-mcp-config.test.ts +128 -0
- package/src/activities/execute-cursor/__tests__/cursor-mode.test.ts +95 -0
- package/src/activities/execute-cursor/__tests__/cursor-sdk-auth.live.test.ts +97 -0
- package/src/activities/execute-cursor/__tests__/cursor-transcript.live.test.ts +289 -0
- package/src/activities/execute-cursor/__tests__/deny-gate-exact-apply.test.ts +200 -0
- package/src/activities/execute-cursor/__tests__/error-classifier-billing.test.ts +178 -0
- package/src/activities/execute-cursor/__tests__/error-classifier-extraction.test.ts +208 -0
- package/src/activities/execute-cursor/__tests__/error-classifier-introspection.test.ts +156 -0
- package/src/activities/execute-cursor/__tests__/fetch-interceptor.test.ts +389 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.enhanced.append.prompt.md +147 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.enhanced.everything.prompt.md +164 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.enhanced.no-instructions.prompt.md +142 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.enhanced.plan-mode.prompt.md +184 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.hitl.recovery.prompt.md +189 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.hitl.reinvocation.prompt.md +13 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.resumed.prefixed.prompt.md +32 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.resumed.raw.append.prompt.md +5 -0
- package/src/activities/execute-cursor/__tests__/goldens/prompt.resumed.raw.prompt.md +1 -0
- package/src/activities/execute-cursor/__tests__/hermetic/answers.test.ts +279 -0
- package/src/activities/execute-cursor/__tests__/hermetic/built-in-assistant.test.ts +127 -0
- package/src/activities/execute-cursor/__tests__/hermetic/bypassed-tool-call.test.ts +120 -0
- package/src/activities/execute-cursor/__tests__/hermetic/deny-and-retry.test.ts +233 -0
- package/src/activities/execute-cursor/__tests__/hermetic/file-review-capture.test.ts +262 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/approve-all.turn2.events.json +94 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/approve-all.turn2.rows.json +47 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/approve-all.turn2.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/cost-cap.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/cost-cap.rows.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/cost-cap.status.json +18 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn1.events.json +37 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn1.rows.json +29 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn1.status.json +4 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn2.events.json +71 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn2.rows.json +32 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/deny-and-retry.turn2.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-capture.events.json +68 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-capture.rows.json +96 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-capture.status.json +74 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-off.events.json +50 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-off.rows.json +32 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-off.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-reconcile.events.json +91 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-reconcile.rows.json +9 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/file-review-reconcile.status.json +6 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/hooks.turn1.events.json +110 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/hooks.turn1.rows.json +77 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/hooks.turn1.status.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/hooks.turn2.events.json +144 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/hooks.turn2.rows.json +34 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/hooks.turn2.status.json +27 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/mcp-tool-call.events.json +50 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/mcp-tool-call.rows.json +30 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/mcp-tool-call.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/pause.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/pause.rows.json +9 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/pause.status.json +4 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/plain-turn.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/plain-turn.rows.json +9 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/plain-turn.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/platform-stop.events.json +37 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/platform-stop.rows.json +29 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/platform-stop.status.json +6 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-fresh-agent.events.json +26 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-fresh-agent.rows.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-fresh-agent.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-transport-timeout.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-transport-timeout.rows.json +9 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/recovery-transport-timeout.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/reject.turn2.events.json +61 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/reject.turn2.rows.json +31 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/reject.turn2.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/resolution-error.events.json +1 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/resolution-error.rows.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/resolution-error.status.json +7 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-cancelled.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-cancelled.rows.json +9 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-cancelled.status.json +5 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-error-non-retryable.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-error-non-retryable.rows.json +9 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/run-error-non-retryable.status.json +7 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-error-at-create.events.json +1 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-error-at-create.rows.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-error-at-create.status.json +7 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-task-note.events.json +56 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-task-note.rows.json +34 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sdk-task-note.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.error-delta.events.json +64 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.error-delta.rows.json +36 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.error-delta.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.events.json +49 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.output-first.events.json +49 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.output-first.rows.json +31 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.output-first.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.rows.json +31 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/shell-output-delta.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/stall.events.json +24 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/stall.rows.json +29 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/stall.status.json +7 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sub-agent-delegation.events.json +158 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sub-agent-delegation.rows.json +70 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/sub-agent-delegation.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/thinking-turn.events.json +77 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/thinking-turn.rows.json +39 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/thinking-turn.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/todo-write.events.json +99 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/todo-write.rows.json +80 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/todo-write.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-call.events.json +49 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-call.rows.json +29 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-call.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-error.events.json +50 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-error.rows.json +29 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-error.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-only-step.events.json +37 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-only-step.rows.json +28 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/tool-only-step.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattended-skip.events.json +51 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattended-skip.rows.json +31 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattended-skip.status.json +17 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattributed-hook-block.events.json +50 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattributed-hook-block.rows.json +36 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/unattributed-hook-block.status.json +19 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/worker-shutdown.events.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/worker-shutdown.rows.json +14 -0
- package/src/activities/execute-cursor/__tests__/hermetic/goldens/worker-shutdown.status.json +7 -0
- package/src/activities/execute-cursor/__tests__/hermetic/harness-contract.test.ts +198 -0
- package/src/activities/execute-cursor/__tests__/hermetic/hooks.test.ts +569 -0
- package/src/activities/execute-cursor/__tests__/hermetic/mcp-tool-call.test.ts +149 -0
- package/src/activities/execute-cursor/__tests__/hermetic/pause-vs-shutdown.test.ts +222 -0
- package/src/activities/execute-cursor/__tests__/hermetic/plain-turn.test.ts +178 -0
- package/src/activities/execute-cursor/__tests__/hermetic/recovery-fresh-agent.test.ts +162 -0
- package/src/activities/execute-cursor/__tests__/hermetic/run-wait-arms.test.ts +296 -0
- package/src/activities/execute-cursor/__tests__/hermetic/sdk-task-note.test.ts +125 -0
- package/src/activities/execute-cursor/__tests__/hermetic/shell-output-delta.test.ts +283 -0
- package/src/activities/execute-cursor/__tests__/hermetic/stream-self-stop-arms.test.ts +342 -0
- package/src/activities/execute-cursor/__tests__/hermetic/sub-agent-delegation.test.ts +197 -0
- package/src/activities/execute-cursor/__tests__/hermetic/thinking-turn.test.ts +149 -0
- package/src/activities/execute-cursor/__tests__/hermetic/thrown-error-arms.test.ts +214 -0
- package/src/activities/execute-cursor/__tests__/hermetic/todo-write.test.ts +169 -0
- package/src/activities/execute-cursor/__tests__/hermetic/tool-call.test.ts +143 -0
- package/src/activities/execute-cursor/__tests__/hermetic/tool-error.test.ts +141 -0
- package/src/activities/execute-cursor/__tests__/hermetic/tool-lists.test.ts +391 -0
- package/src/activities/execute-cursor/__tests__/hermetic/tool-only-step.test.ts +134 -0
- package/src/activities/execute-cursor/__tests__/hermetic/turn-phases.test.ts +136 -0
- package/src/activities/execute-cursor/__tests__/hermetic/unattended-skip.test.ts +157 -0
- package/src/activities/execute-cursor/__tests__/hermetic/unattributed-hook-block.test.ts +200 -0
- package/src/activities/execute-cursor/__tests__/hermetic/workspace-lock-timeout.test.ts +156 -0
- package/src/activities/execute-cursor/__tests__/hitl-ledger.test.ts +2109 -0
- package/src/activities/execute-cursor/__tests__/hitl-resume-history.test.ts +431 -0
- package/src/activities/execute-cursor/__tests__/hook-refusal-rows.test.ts +95 -0
- package/src/activities/execute-cursor/__tests__/hook-scope.test.ts +175 -0
- package/src/activities/execute-cursor/__tests__/hook-script.test.ts +1408 -0
- package/src/activities/execute-cursor/__tests__/hook-server.test.ts +465 -0
- package/src/activities/execute-cursor/__tests__/hook-views.test.ts +171 -0
- package/src/activities/execute-cursor/__tests__/http2-interceptor.test.ts +408 -0
- package/src/activities/execute-cursor/__tests__/model-pricing.test.ts +173 -0
- package/src/activities/execute-cursor/__tests__/prepare-hooks.test.ts +97 -0
- package/src/activities/execute-cursor/__tests__/prompt-builder-delegation.test.ts +85 -0
- package/src/activities/execute-cursor/__tests__/prompt-goldens.test.ts +270 -0
- package/src/activities/execute-cursor/__tests__/resolve-timeout-message.test.ts +24 -0
- package/src/activities/execute-cursor/__tests__/run-telemetry.test.ts +177 -0
- package/src/activities/execute-cursor/__tests__/runner-error-regressions.test.ts +103 -0
- package/src/activities/execute-cursor/__tests__/same-identity-reproposal.test.ts +174 -0
- package/src/activities/execute-cursor/__tests__/scope-refusal-rows.test.ts +269 -0
- package/src/activities/execute-cursor/__tests__/sdk-warmup.test.ts +45 -0
- package/src/activities/execute-cursor/__tests__/sequential-gate-resume.test.ts +182 -0
- package/src/activities/execute-cursor/__tests__/service-tier.test.ts +230 -0
- package/src/activities/execute-cursor/__tests__/session-lifecycle.test.ts +336 -0
- package/src/activities/execute-cursor/__tests__/session-store.test.ts +220 -0
- package/src/activities/execute-cursor/__tests__/subagent-config.test.ts +181 -0
- package/src/activities/execute-cursor/__tests__/tool-result-image.test.ts +250 -0
- package/src/activities/execute-cursor/__tests__/translator.test.ts +651 -0
- package/src/activities/execute-cursor/__tests__/turn-boundary.test.ts +415 -0
- package/src/activities/execute-cursor/__tests__/turn-recovery.test.ts +186 -0
- package/src/activities/execute-cursor/__tests__/turn-stream.test.ts +354 -0
- package/src/activities/execute-cursor/__tests__/usage-pricing.test.ts +84 -0
- package/src/activities/execute-cursor/__tests__/workspace-setup.test.ts +814 -0
- package/src/activities/execute-cursor/adapter.ts +161 -0
- package/src/activities/execute-cursor/agent-session-cache.ts +229 -0
- package/src/activities/execute-cursor/approval-policy.ts +129 -0
- package/src/activities/execute-cursor/approval-state.ts +1097 -0
- package/src/activities/execute-cursor/boundary-rows.ts +1419 -0
- package/src/activities/execute-cursor/cas-observations.ts +263 -0
- package/src/activities/execute-cursor/cursor-capabilities.ts +80 -0
- package/src/activities/execute-cursor/cursor-event-recorder.ts +112 -0
- package/src/activities/execute-cursor/cursor-mcp-config.ts +124 -0
- package/src/activities/execute-cursor/cursor-mode.ts +42 -0
- package/src/activities/execute-cursor/error-classifier.ts +416 -0
- package/src/activities/execute-cursor/fetch-interceptor.ts +454 -0
- package/src/activities/execute-cursor/hook-scope.ts +216 -0
- package/src/activities/execute-cursor/hook-script.ts +1232 -0
- package/src/activities/execute-cursor/hook-server.ts +473 -0
- package/src/activities/execute-cursor/hook-tool-hiding.ts +76 -0
- package/src/activities/execute-cursor/hook-views.ts +195 -0
- package/src/activities/execute-cursor/http2-interceptor.ts +267 -0
- package/src/activities/execute-cursor/model-pricing-data.ts +170 -0
- package/src/activities/execute-cursor/model-pricing.ts +190 -0
- package/src/activities/execute-cursor/prompt-builder.ts +1081 -0
- package/src/activities/execute-cursor/rejection-capture.ts +93 -0
- package/src/activities/execute-cursor/run-telemetry.ts +189 -0
- package/src/activities/execute-cursor/sdk-warmup.ts +77 -0
- package/src/activities/execute-cursor/service-tier.ts +251 -0
- package/src/activities/execute-cursor/session-lifecycle.ts +543 -0
- package/src/activities/execute-cursor/session-store.ts +186 -0
- package/src/activities/execute-cursor/sub-agent-steps.ts +188 -0
- package/src/activities/execute-cursor/subagent-config.ts +124 -0
- package/src/activities/execute-cursor/tool-result.ts +128 -0
- package/src/activities/execute-cursor/translator.ts +544 -0
- package/src/activities/execute-cursor/turn-boundary.ts +373 -0
- package/src/activities/execute-cursor/turn-recovery.ts +223 -0
- package/src/activities/execute-cursor/turn-settle.ts +605 -0
- package/src/activities/execute-cursor/turn-setup.ts +964 -0
- package/src/activities/execute-cursor/turn-stream.ts +354 -0
- package/src/activities/execute-cursor/turn.ts +271 -0
- package/src/activities/execute-cursor/usage-pricing.ts +67 -0
- package/src/activities/execute-cursor/workspace-hook-files.ts +424 -0
- package/src/activities/execute-cursor/workspace-setup.ts +549 -0
- package/src/activities/execute-deep-agent/__test-utils__/contract-subject.ts +404 -0
- package/src/activities/execute-deep-agent/__test-utils__/gateway-substrate.ts +519 -0
- package/src/activities/execute-deep-agent/__test-utils__/hermetic-deep-agent.ts +430 -0
- package/src/activities/execute-deep-agent/__test-utils__/hitl-script.ts +48 -0
- package/src/activities/execute-deep-agent/__test-utils__/paused-session-fixture.ts +172 -0
- package/src/activities/execute-deep-agent/__test-utils__/scripted-model-module.ts +84 -0
- package/src/activities/execute-deep-agent/__test-utils__/scripted-model.ts +585 -0
- package/src/activities/execute-deep-agent/__test-utils__/think-bound-session.ts +29 -0
- package/src/activities/execute-deep-agent/__test-utils__/v3-event-fixtures.ts +295 -0
- package/src/activities/execute-deep-agent/__tests__/adapter-graph-is-sdk-free.test.ts +76 -0
- package/src/activities/execute-deep-agent/__tests__/adapter-is-temporal-free.test.ts +47 -0
- package/src/activities/execute-deep-agent/__tests__/adapter.test.ts +83 -0
- package/src/activities/execute-deep-agent/__tests__/approval-file-change.test.ts +88 -0
- package/src/activities/execute-deep-agent/__tests__/auto-publish.test.ts +144 -0
- package/src/activities/execute-deep-agent/__tests__/builtin-tool-surface.test.ts +108 -0
- package/src/activities/execute-deep-agent/__tests__/cas-capture-backend.test.ts +286 -0
- package/src/activities/execute-deep-agent/__tests__/cas-capture-observer.test.ts +163 -0
- package/src/activities/execute-deep-agent/__tests__/engine-tools.test.ts +97 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/system-prompt.build-from-plan.prompt.md +133 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/system-prompt.everything.prompt.md +151 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/system-prompt.judge.prompt.md +26 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/system-prompt.minimal.append.prompt.md +28 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/system-prompt.minimal.prompt.md +25 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/system-prompt.plan-mode.prompt.md +140 -0
- package/src/activities/execute-deep-agent/__tests__/goldens/user-message.everything.md +36 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/answers.test.ts +114 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/built-in-assistant.test.ts +103 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/cost-advisory.test.ts +239 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/file-review-capture.test.ts +306 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/fixtures/paused-session.deepagents-1.10.2.json +592 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/fixtures/paused-session.think-bound.json +498 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve-all-lease.turn1.events.json +49 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve-all-lease.turn1.rows.json +32 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve-all-lease.turn1.status.json +15 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve-all-lease.turn2.events.json +118 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve-all-lease.turn2.rows.json +45 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve-all-lease.turn2.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve.turn2.events.json +69 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve.turn2.rows.json +30 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/approve.turn2.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-capture.events.json +69 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-capture.rows.json +97 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-capture.status.json +84 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-off.events.json +51 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-off.rows.json +33 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-off.status.json +27 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-reconcile.events.json +92 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-reconcile.rows.json +9 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/file-review-reconcile.status.json +6 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/gate.turn1.events.json +35 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/gate.turn1.rows.json +27 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/gate.turn1.status.json +15 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/hooks.turn1.events.json +107 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/hooks.turn1.rows.json +74 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/hooks.turn1.status.json +25 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/hooks.turn2.events.json +141 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/hooks.turn2.rows.json +31 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/hooks.turn2.status.json +26 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/inline-artifact.turn1.events.json +71 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/inline-artifact.turn1.rows.json +50 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/inline-artifact.turn1.status.json +26 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/inline-artifact.turn2.events.json +105 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/inline-artifact.turn2.rows.json +30 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/inline-artifact.turn2.status.json +27 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/pause.loop.after-tool.events.json +37 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/pause.loop.after-tool.rows.json +24 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/pause.loop.after-tool.status.json +15 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/pause.loop.mid-tool.events.json +24 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/pause.loop.mid-tool.rows.json +22 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/pause.loop.mid-tool.status.json +15 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/plain-turn.events.json +14 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/plain-turn.rows.json +9 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/plain-turn.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/platform-stop.events.json +24 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/platform-stop.rows.json +27 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/platform-stop.status.json +17 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/recursion-limit.persisted.events.json +352 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/recursion-limit.persisted.rows.json +209 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/recursion-limit.persisted.status.json +18 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/reject.turn2.events.json +71 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/reject.turn2.rows.json +29 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/reject.turn2.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/resolution-error.events.json +1 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/resolution-error.rows.json +14 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/resolution-error.status.json +7 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sequential-gates.turn2.events.json +90 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sequential-gates.turn2.rows.json +48 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sequential-gates.turn2.status.json +15 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sequential-gates.turn3.events.json +124 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sequential-gates.turn3.rows.json +30 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sequential-gates.turn3.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/skip.turn2.events.json +70 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/skip.turn2.rows.json +29 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/skip.turn2.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.text-fallback.events.json +24 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.text-fallback.rows.json +13 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.text-fallback.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.tier2.events.json +24 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.tier2.rows.json +13 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.tier2.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.tool-strategy.events.json +36 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.tool-strategy.rows.json +18 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/structured-output.tool-strategy.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sub-agent-delegation.events.json +118 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sub-agent-delegation.rows.json +49 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/sub-agent-delegation.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/tool-call.events.json +49 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/tool-call.rows.json +29 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/tool-call.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/unattended-skip.events.json +51 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/unattended-skip.rows.json +31 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/unattended-skip.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/worker-shutdown.events.json +37 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/worker-shutdown.rows.json +29 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/worker-shutdown.status.json +18 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/write-todos.events.json +58 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/write-todos.rows.json +54 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/goldens/write-todos.status.json +16 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/harness-contract.test.ts +144 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/hitl-approve-all-lease.test.ts +194 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/hitl-parallel-gates.test.ts +131 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/hitl-round-trips.test.ts +224 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/hitl-sequential-gates.test.ts +180 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/hooks.test.ts +556 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/inline-artifact-across-gate.test.ts +188 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/pause-vs-shutdown.test.ts +217 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/plain-turn.test.ts +162 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/platform-stop.test.ts +130 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/recorded-agent-version.test.ts +148 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/recursion-limit.test.ts +212 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/resolution-error.test.ts +130 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/resume-across-engine-upgrade.test.ts +268 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/resume-across-think-retirement.test.ts +181 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/run-finished-while-waiting.test.ts +110 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/run-values-refused.test.ts +106 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/structured-output.test.ts +242 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/sub-agent-concurrent-invocations.test.ts +312 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/sub-agent-delegation.test.ts +211 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/sub-agent-own-context.test.ts +192 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/thrown-turn-drains-publishes.test.ts +154 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/tool-call.test.ts +167 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/tool-lists.test.ts +291 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/turn-phases.test.ts +118 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/unattended-skip.test.ts +130 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/workspace-lock-timeout.test.ts +154 -0
- package/src/activities/execute-deep-agent/__tests__/hermetic/write-todos.test.ts +160 -0
- package/src/activities/execute-deep-agent/__tests__/hitl.test.ts +355 -0
- package/src/activities/execute-deep-agent/__tests__/hooks-setup.test.ts +333 -0
- package/src/activities/execute-deep-agent/__tests__/inline-publisher.test.ts +350 -0
- package/src/activities/execute-deep-agent/__tests__/loaded-tool-marks.test.ts +95 -0
- package/src/activities/execute-deep-agent/__tests__/plain-turn.live.test.ts +103 -0
- package/src/activities/execute-deep-agent/__tests__/plan-mode-path-normalization.test.ts +404 -0
- package/src/activities/execute-deep-agent/__tests__/platform-route.test.ts +185 -0
- package/src/activities/execute-deep-agent/__tests__/prompt-builder.test.ts +577 -0
- package/src/activities/execute-deep-agent/__tests__/prompt-goldens.test.ts +293 -0
- package/src/activities/execute-deep-agent/__tests__/resume-across-think-retirement.live.test.ts +98 -0
- package/src/activities/execute-deep-agent/__tests__/resumed-history.test.ts +48 -0
- package/src/activities/execute-deep-agent/__tests__/scripted-model.test.ts +408 -0
- package/src/activities/execute-deep-agent/__tests__/shell-execute-gate.test.ts +293 -0
- package/src/activities/execute-deep-agent/__tests__/streaming-side-effects.test.ts +120 -0
- package/src/activities/execute-deep-agent/__tests__/subagent-approval-propagation.test.ts +160 -0
- package/src/activities/execute-deep-agent/__tests__/subagent-gitignored-capture.test.ts +214 -0
- package/src/activities/execute-deep-agent/__tests__/subagent-plan-mode-permissions.test.ts +213 -0
- package/src/activities/execute-deep-agent/__tests__/subagent-spans.test.ts +110 -0
- package/src/activities/execute-deep-agent/__tests__/subagent-transformer.test.ts +662 -0
- package/src/activities/execute-deep-agent/__tests__/subagent-wiring.test.ts +197 -0
- package/src/activities/execute-deep-agent/__tests__/summarization-verification.test.ts +330 -0
- package/src/activities/execute-deep-agent/__tests__/tool-call.live.test.ts +80 -0
- package/src/activities/execute-deep-agent/__tests__/tool-scope.test.ts +519 -0
- package/src/activities/execute-deep-agent/__tests__/translator-subagents.test.ts +519 -0
- package/src/activities/execute-deep-agent/__tests__/translator-through-builder.test.ts +830 -0
- package/src/activities/execute-deep-agent/__tests__/translator.test.ts +641 -0
- package/src/activities/execute-deep-agent/__tests__/turn-setup-connect.test.ts +89 -0
- package/src/activities/execute-deep-agent/__tests__/turn-setup-tool-lists.test.ts +192 -0
- package/src/activities/execute-deep-agent/__tests__/turn-stream.test.ts +381 -0
- package/src/activities/execute-deep-agent/__tests__/v3-event-recorder.test.ts +186 -0
- package/src/activities/execute-deep-agent/__tests__/vision-input.test.ts +152 -0
- package/src/activities/execute-deep-agent/adapter.ts +95 -0
- package/src/activities/execute-deep-agent/approval-file-change.ts +86 -0
- package/src/activities/execute-deep-agent/auto-publish.ts +80 -0
- package/src/activities/execute-deep-agent/cas-capture-backend.ts +154 -0
- package/src/activities/execute-deep-agent/cas-capture-observer.ts +132 -0
- package/src/activities/execute-deep-agent/deep-agent-capabilities.ts +49 -0
- package/src/activities/execute-deep-agent/deepagents-profiles.ts +51 -0
- package/src/activities/execute-deep-agent/engine-tools.ts +33 -0
- package/src/activities/execute-deep-agent/hitl.ts +274 -0
- package/src/activities/execute-deep-agent/hooks-setup.ts +75 -0
- package/src/activities/execute-deep-agent/inline-publisher.ts +208 -0
- package/src/activities/execute-deep-agent/platform-route.ts +284 -0
- package/src/activities/execute-deep-agent/prompt-builder.ts +547 -0
- package/src/activities/execute-deep-agent/resumed-history.ts +52 -0
- package/src/activities/execute-deep-agent/streaming-side-effects.ts +83 -0
- package/src/activities/execute-deep-agent/subagent-transformer.ts +732 -0
- package/src/activities/execute-deep-agent/subagent-wiring.ts +180 -0
- package/src/activities/execute-deep-agent/todo-list.ts +56 -0
- package/src/activities/execute-deep-agent/translator.ts +564 -0
- package/src/activities/execute-deep-agent/turn-settle.ts +162 -0
- package/src/activities/execute-deep-agent/turn-setup.ts +842 -0
- package/src/activities/execute-deep-agent/turn-stream.ts +309 -0
- package/src/activities/execute-deep-agent/turn.ts +151 -0
- package/src/activities/execute-deep-agent/v3-event-recorder.ts +112 -0
- package/src/activities/generate-session-subject.ts +376 -0
- package/src/activities/list-plugin-tools.ts +251 -0
- package/src/agent-host/__tests__/channel.test.ts +271 -0
- package/src/agent-host/__tests__/codec.test.ts +435 -0
- package/src/agent-host/__tests__/entry-telemetry.test.ts +159 -0
- package/src/agent-host/__tests__/entry.test.ts +223 -0
- package/src/agent-host/__tests__/environment.test.ts +73 -0
- package/src/agent-host/__tests__/failed-boot.test.ts +58 -0
- package/src/agent-host/__tests__/host-sink.test.ts +118 -0
- package/src/agent-host/__tests__/host.test.ts +162 -0
- package/src/agent-host/__tests__/hostile-host.test.ts +440 -0
- package/src/agent-host/__tests__/offload-through-host.test.ts +124 -0
- package/src/agent-host/__tests__/remote-fs.test.ts +177 -0
- package/src/agent-host/__tests__/spawned-host.test.ts +174 -0
- package/src/agent-host/__tests__/supervisor.test.ts +488 -0
- package/src/agent-host/channel.ts +334 -0
- package/src/agent-host/codec.ts +631 -0
- package/src/agent-host/entry.ts +153 -0
- package/src/agent-host/environment.ts +76 -0
- package/src/agent-host/failed-boot.ts +29 -0
- package/src/agent-host/fs-service.ts +133 -0
- package/src/agent-host/host-sink.ts +153 -0
- package/src/agent-host/host.ts +228 -0
- package/src/agent-host/hosting.ts +162 -0
- package/src/agent-host/protocol.ts +380 -0
- package/src/agent-host/remote-adapter.ts +320 -0
- package/src/agent-host/remote-fs.ts +128 -0
- package/src/agent-host/supervisor.ts +382 -0
- package/src/agent-proxy/__tests__/cursor-lane.test.ts +635 -0
- package/src/agent-proxy/__tests__/cursor-sdk-key-required.test.ts +119 -0
- package/src/agent-proxy/__tests__/cursor-sdk-wire.test.ts +175 -0
- package/src/agent-proxy/__tests__/lanes.test.ts +258 -0
- package/src/agent-proxy/__tests__/loopback-certificate.test.ts +100 -0
- package/src/agent-proxy/__tests__/otlp-forward-rebuild.test.ts +66 -0
- package/src/agent-proxy/__tests__/otlp-forward.test.ts +295 -0
- package/src/agent-proxy/__tests__/relay.test.ts +115 -0
- package/src/agent-proxy/__tests__/server.test.ts +436 -0
- package/src/agent-proxy/cursor-lane.ts +528 -0
- package/src/agent-proxy/lanes.ts +285 -0
- package/src/agent-proxy/loopback-certificate.ts +143 -0
- package/src/agent-proxy/otlp-forward.ts +190 -0
- package/src/agent-proxy/relay.ts +188 -0
- package/src/agent-proxy/server.ts +266 -0
- package/src/attach/__tests__/entry.test.ts +123 -0
- package/src/attach/__tests__/import-graph.test.ts +66 -0
- package/src/attach/__tests__/push.test.ts +162 -0
- package/src/attach/__tests__/waiter.test.ts +416 -0
- package/src/attach/entry.ts +92 -0
- package/src/attach/main.ts +26 -0
- package/src/attach/push.ts +165 -0
- package/src/attach/waiter.ts +370 -0
- package/src/bootstrap.ts +178 -0
- package/src/client/__tests__/agent-version-read.test.ts +39 -0
- package/src/client/__tests__/eval-read.test.ts +43 -0
- package/src/client/__tests__/plugin-read.test.ts +57 -0
- package/src/client/__tests__/run-calls.test.ts +65 -0
- package/src/client/__tests__/server-contracts.test.ts +157 -0
- package/src/client/__tests__/session-events-calls.test.ts +139 -0
- package/src/client/__tests__/stigmer-client.test.ts +577 -0
- package/src/client/__tests__/token-claims.test.ts +102 -0
- package/src/client/server-contracts.ts +124 -0
- package/src/client/stigmer-client.ts +686 -0
- package/src/client/token-claims.ts +103 -0
- package/src/config.ts +378 -0
- package/src/exit-backstop.ts +97 -0
- package/src/gen/turn/ai/stigmer/runner/turn/v1/enum_pb.ts +1142 -0
- package/src/gen/turn/ai/stigmer/runner/turn/v1/ledger_pb.ts +458 -0
- package/src/gen/turn/ai/stigmer/runner/turn/v1/rows_pb.ts +920 -0
- package/src/gen-ai-conventions.ts +121 -0
- package/src/harness/README.md +372 -0
- package/src/harness/__tests__/approval-answers.test.ts +202 -0
- package/src/harness/__tests__/approval-decisions.test.ts +114 -0
- package/src/harness/__tests__/attachment-credential.test.ts +115 -0
- package/src/harness/__tests__/capture.test.ts +285 -0
- package/src/harness/__tests__/import-direction.test.ts +169 -0
- package/src/harness/__tests__/loaded-versions.test.ts +76 -0
- package/src/harness/__tests__/mount-skills.test.ts +305 -0
- package/src/harness/__tests__/owed-undos.test.ts +305 -0
- package/src/harness/__tests__/persist-chokepoint.test.ts +344 -0
- package/src/harness/__tests__/readme-index.test.ts +339 -0
- package/src/harness/__tests__/reconcile-turn.test.ts +111 -0
- package/src/harness/__tests__/registry.test.ts +178 -0
- package/src/harness/__tests__/reinvocation-carry.test.ts +65 -0
- package/src/harness/__tests__/resolve-hooks.test.ts +241 -0
- package/src/harness/__tests__/resolve-subagents.test.ts +477 -0
- package/src/harness/__tests__/run-span.test.ts +255 -0
- package/src/harness/__tests__/run-turn-deterministic.test.ts +94 -0
- package/src/harness/__tests__/run-turn-eval-case.test.ts +211 -0
- package/src/harness/__tests__/run-turn.test.ts +435 -0
- package/src/harness/__tests__/runtime-touches-no-agent-path.test.ts +109 -0
- package/src/harness/__tests__/stop-controller.test.ts +93 -0
- package/src/harness/__tests__/terminal-table.test.ts +81 -0
- package/src/harness/__tests__/transcript-is-engine-free.test.ts +83 -0
- package/src/harness/__tests__/transcript-writers.test.ts +193 -0
- package/src/harness/__tests__/turn-attachments-vision.test.ts +105 -0
- package/src/harness/__tests__/turn-context.test.ts +213 -0
- package/src/harness/__tests__/turn-mcp.test.ts +554 -0
- package/src/harness/__tests__/turn-timeline.test.ts +290 -0
- package/src/harness/__tests__/usage-accumulator.test.ts +106 -0
- package/src/harness/approval-answers.ts +174 -0
- package/src/harness/approval-decisions.ts +82 -0
- package/src/harness/capabilities.ts +155 -0
- package/src/harness/capture.ts +337 -0
- package/src/harness/cost-cap-watch.ts +52 -0
- package/src/harness/events/__tests__/emitter.test.ts +715 -0
- package/src/harness/events/__tests__/ids-corpus.test.ts +86 -0
- package/src/harness/events/emitter.ts +805 -0
- package/src/harness/events/ids.ts +156 -0
- package/src/harness/loaded-versions.ts +78 -0
- package/src/harness/owed-undos.ts +258 -0
- package/src/harness/persist-chokepoint.ts +163 -0
- package/src/harness/registry.ts +203 -0
- package/src/harness/run-span.ts +184 -0
- package/src/harness/run-turn.ts +862 -0
- package/src/harness/stop-controller.ts +101 -0
- package/src/harness/terminal-table.ts +390 -0
- package/src/harness/transcript/__tests__/builder.test.ts +1246 -0
- package/src/harness/transcript/__tests__/resume-seed.test.ts +148 -0
- package/src/harness/transcript/__tests__/state.test.ts +144 -0
- package/src/harness/transcript/builder.ts +925 -0
- package/src/harness/transcript/events.ts +281 -0
- package/src/harness/transcript/resume-seed.ts +280 -0
- package/src/harness/transcript/state.ts +167 -0
- package/src/harness/turn-context.ts +1982 -0
- package/src/harness/turn-timeline.ts +248 -0
- package/src/harness/types.ts +725 -0
- package/src/harness/usage-accumulator.ts +134 -0
- package/src/harness-adapters.ts +48 -0
- package/src/idle-watchdog.ts +28 -0
- package/src/in-flight.ts +71 -0
- package/src/index.ts +48 -0
- package/src/interceptors/__tests__/run-credential-activity.test.ts +86 -0
- package/src/interceptors/run-credential-activity.ts +40 -0
- package/src/ipc-protocol-fixtures.ts +90 -0
- package/src/ipc-protocol.ts +89 -0
- package/src/main.ts +506 -0
- package/src/middleware/__tests__/advisory-message.test.ts +59 -0
- package/src/middleware/__tests__/approval-gate-hooks.test.ts +269 -0
- package/src/middleware/__tests__/approval-gate.test.ts +1072 -0
- package/src/middleware/__tests__/cost-advisory.test.ts +272 -0
- package/src/middleware/__tests__/error-hints.test.ts +90 -0
- package/src/middleware/__tests__/execution-budget.test.ts +239 -0
- package/src/middleware/__tests__/loop-detection.test.ts +194 -0
- package/src/middleware/__tests__/otel-spans.test.ts +460 -0
- package/src/middleware/__tests__/path-normalization.test.ts +198 -0
- package/src/middleware/__tests__/tool-intent.test.ts +266 -0
- package/src/middleware/__tests__/tool-truncation.test.ts +112 -0
- package/src/middleware/advisory-message.ts +62 -0
- package/src/middleware/approval-gate.ts +741 -0
- package/src/middleware/cost-advisory.ts +224 -0
- package/src/middleware/error-hints.ts +136 -0
- package/src/middleware/execution-budget.ts +197 -0
- package/src/middleware/index.ts +100 -0
- package/src/middleware/loop-detection.ts +197 -0
- package/src/middleware/otel-spans.ts +345 -0
- package/src/middleware/path-normalization.ts +178 -0
- package/src/middleware/tool-intent.ts +174 -0
- package/src/middleware/tool-scope.ts +201 -0
- package/src/middleware/tool-truncation.ts +94 -0
- package/src/middleware/types.ts +141 -0
- package/src/otel-export.ts +325 -0
- package/src/otel-metrics.ts +61 -0
- package/src/otel.ts +173 -0
- package/src/payload-codecs.ts +66 -0
- package/src/pipe-safety.ts +117 -0
- package/src/pool-member.ts +99 -0
- package/src/preflight.ts +104 -0
- package/src/run-trace-id.ts +50 -0
- package/src/runner-entry.ts +18 -0
- package/src/runner-manager.ts +882 -0
- package/src/runner-token-coordinator.ts +140 -0
- package/src/runner.ts +588 -0
- package/src/sandbox-token-renewal.ts +211 -0
- package/src/shared/__tests__/activity-input.test.ts +78 -0
- package/src/shared/__tests__/advisory-anthropic-payload.test.ts +194 -0
- package/src/shared/__tests__/agent-handover.test.ts +186 -0
- package/src/shared/__tests__/agent-identity.test.ts +144 -0
- package/src/shared/__tests__/agent-servers.test.ts +55 -0
- package/src/shared/__tests__/approval-canonicalize.test.ts +106 -0
- package/src/shared/__tests__/approval-fingerprint.test.ts +115 -0
- package/src/shared/__tests__/approval-policy.test.ts +466 -0
- package/src/shared/__tests__/args-preview.test.ts +147 -0
- package/src/shared/__tests__/artifact-storage-extended.test.ts +243 -0
- package/src/shared/__tests__/artifact-storage.test.ts +844 -0
- package/src/shared/__tests__/attachment-download-urls.test.ts +72 -0
- package/src/shared/__tests__/attachment-naming.test.ts +146 -0
- package/src/shared/__tests__/attachment-resolver.test.ts +644 -0
- package/src/shared/__tests__/attachment-vision.test.ts +424 -0
- package/src/shared/__tests__/attachment-zip.test.ts +236 -0
- package/src/shared/__tests__/bedrock-adapter.test.ts +213 -0
- package/src/shared/__tests__/bedrock-seam.test.ts +390 -0
- package/src/shared/__tests__/blueprint-resolver.test.ts +629 -0
- package/src/shared/__tests__/builtin-judge.test.ts +57 -0
- package/src/shared/__tests__/caller-identity.test.ts +172 -0
- package/src/shared/__tests__/channel-attachment.test.ts +285 -0
- package/src/shared/__tests__/cold-start-timing.test.ts +333 -0
- package/src/shared/__tests__/context-bridge.test.ts +51 -0
- package/src/shared/__tests__/conversation-attachment.test.ts +152 -0
- package/src/shared/__tests__/conversation-catchup.test.ts +94 -0
- package/src/shared/__tests__/cost-guard.test.ts +68 -0
- package/src/shared/__tests__/declared-preferences.test.ts +109 -0
- package/src/shared/__tests__/default-model-agrees-with-server.test.ts +74 -0
- package/src/shared/__tests__/exact-apply.test.ts +370 -0
- package/src/shared/__tests__/execution-target.test.ts +33 -0
- package/src/shared/__tests__/extract-json.test.ts +153 -0
- package/src/shared/__tests__/extract-structured-output.test.ts +149 -0
- package/src/shared/__tests__/file-change.test.ts +85 -0
- package/src/shared/__tests__/file-tools.test.ts +90 -0
- package/src/shared/__tests__/fingerprint-secret.test.ts +51 -0
- package/src/shared/__tests__/foundry-adapter.test.ts +276 -0
- package/src/shared/__tests__/foundry-seam.test.ts +482 -0
- package/src/shared/__tests__/grpc-retry-extended.test.ts +38 -0
- package/src/shared/__tests__/grpc-retry.test.ts +43 -0
- package/src/shared/__tests__/http-retry.test.ts +68 -0
- package/src/shared/__tests__/implement-plan-prompt.test.ts +86 -0
- package/src/shared/__tests__/json-schema-to-zod.test.ts +227 -0
- package/src/shared/__tests__/lease-scope-corpus.test.ts +78 -0
- package/src/shared/__tests__/llm-backend.test.ts +676 -0
- package/src/shared/__tests__/llm-proxy.test.ts +179 -0
- package/src/shared/__tests__/mcp-manager.test.ts +272 -0
- package/src/shared/__tests__/mcp-oauth-detect.test.ts +167 -0
- package/src/shared/__tests__/mcp-resolver.test.ts +454 -0
- package/src/shared/__tests__/mcp-schema-sanitizer.test.ts +267 -0
- package/src/shared/__tests__/mcp-tool-listing.hang.test.ts +82 -0
- package/src/shared/__tests__/mcp-tool-listing.test.ts +257 -0
- package/src/shared/__tests__/mcp-transport-guard.test.ts +71 -0
- package/src/shared/__tests__/memory-attachment.test.ts +183 -0
- package/src/shared/__tests__/memory-retrieval.test.ts +310 -0
- package/src/shared/__tests__/model-client-sampling.test.ts +110 -0
- package/src/shared/__tests__/model-client.test.ts +623 -0
- package/src/shared/__tests__/model-error.test.ts +579 -0
- package/src/shared/__tests__/model-lanes.test.ts +225 -0
- package/src/shared/__tests__/model-pricing.test.ts +131 -0
- package/src/shared/__tests__/model-registry-at-provider.live.test.ts +63 -0
- package/src/shared/__tests__/model-registry.test.ts +460 -0
- package/src/shared/__tests__/persist-decision.test.ts +87 -0
- package/src/shared/__tests__/placeholder-resolver.test.ts +210 -0
- package/src/shared/__tests__/plan-artifact.test.ts +260 -0
- package/src/shared/__tests__/plan-mode-permissions.test.ts +29 -0
- package/src/shared/__tests__/platform-server-address.test.ts +125 -0
- package/src/shared/__tests__/plugin-mount-faults.test.ts +71 -0
- package/src/shared/__tests__/plugin-mount.test.ts +407 -0
- package/src/shared/__tests__/plugin-servers.test.ts +53 -0
- package/src/shared/__tests__/policy-source-corpus.test.ts +69 -0
- package/src/shared/__tests__/prompt-sections.test.ts +113 -0
- package/src/shared/__tests__/recalled-memories.test.ts +88 -0
- package/src/shared/__tests__/registry-endpoint.test.ts +96 -0
- package/src/shared/__tests__/run-credential.test.ts +109 -0
- package/src/shared/__tests__/run-values.test.ts +125 -0
- package/src/shared/__tests__/runner-credential-store.test.ts +175 -0
- package/src/shared/__tests__/secret-leak-scan.test.ts +100 -0
- package/src/shared/__tests__/sender-identity.test.ts +92 -0
- package/src/shared/__tests__/session-context.test.ts +67 -0
- package/src/shared/__tests__/shell-env.test.ts +118 -0
- package/src/shared/__tests__/skill-mount.test.ts +353 -0
- package/src/shared/__tests__/skill-resolver.test.ts +401 -0
- package/src/shared/__tests__/stall-watchdog.test.ts +193 -0
- package/src/shared/__tests__/stamp-flowed-rows.test.ts +142 -0
- package/src/shared/__tests__/status-offload.test.ts +778 -0
- package/src/shared/__tests__/status.test.ts +350 -0
- package/src/shared/__tests__/streaming-scheduler.test.ts +198 -0
- package/src/shared/__tests__/subagent-gate.test.ts +112 -0
- package/src/shared/__tests__/subagent-rows.test.ts +34 -0
- package/src/shared/__tests__/subagents.test.ts +135 -0
- package/src/shared/__tests__/synthesized-attachment.test.ts +96 -0
- package/src/shared/__tests__/telemetry-content.test.ts +220 -0
- package/src/shared/__tests__/thinking-mode.test.ts +69 -0
- package/src/shared/__tests__/todos.test.ts +216 -0
- package/src/shared/__tests__/tool-kind.test.ts +81 -0
- package/src/shared/__tests__/tool-lists.test.ts +463 -0
- package/src/shared/__tests__/tool-rounds.test.ts +107 -0
- package/src/shared/__tests__/tool-row.test.ts +390 -0
- package/src/shared/__tests__/trace-context.test.ts +68 -0
- package/src/shared/__tests__/vertex-adapter.test.ts +196 -0
- package/src/shared/__tests__/vertex-seam.test.ts +296 -0
- package/src/shared/__tests__/with-timeout.test.ts +60 -0
- package/src/shared/__tests__/worker-shutdown.test.ts +106 -0
- package/src/shared/__tests__/zip-extract.test.ts +256 -0
- package/src/shared/activity-input.ts +78 -0
- package/src/shared/agent-fs.ts +264 -0
- package/src/shared/agent-handover.ts +171 -0
- package/src/shared/agent-identity.ts +185 -0
- package/src/shared/agent-servers.ts +51 -0
- package/src/shared/approval-canonicalize.ts +159 -0
- package/src/shared/approval-fingerprint.ts +145 -0
- package/src/shared/approval-policy.ts +536 -0
- package/src/shared/archive-mount.ts +140 -0
- package/src/shared/args-preview.ts +128 -0
- package/src/shared/artifact-storage.ts +496 -0
- package/src/shared/attachment-download-urls.ts +76 -0
- package/src/shared/attachment-naming.ts +78 -0
- package/src/shared/attachment-resolver.ts +468 -0
- package/src/shared/attachment-vision.ts +466 -0
- package/src/shared/attachment-zip.ts +281 -0
- package/src/shared/blueprint-resolver.ts +420 -0
- package/src/shared/builtin-assistant-prompt.ts +38 -0
- package/src/shared/builtin-judge.ts +62 -0
- package/src/shared/caller-identity.ts +186 -0
- package/src/shared/channel-attachment.ts +246 -0
- package/src/shared/checkpointer/__tests__/factory.test.ts +88 -0
- package/src/shared/checkpointer/__tests__/http-saver.test.ts +393 -0
- package/src/shared/checkpointer/__tests__/sqlite-saver.test.ts +212 -0
- package/src/shared/checkpointer/factory.ts +94 -0
- package/src/shared/checkpointer/http-saver.ts +429 -0
- package/src/shared/checkpointer/sqlite-saver.ts +384 -0
- package/src/shared/checkpointer/types.ts +27 -0
- package/src/shared/cold-start-timing.ts +260 -0
- package/src/shared/context-bridge.ts +51 -0
- package/src/shared/conversation-attachment.ts +141 -0
- package/src/shared/conversation-catchup.ts +93 -0
- package/src/shared/cost-guard.ts +63 -0
- package/src/shared/declared-preferences.ts +84 -0
- package/src/shared/eval-case/__tests__/agent-mock.test.ts +126 -0
- package/src/shared/eval-case/__tests__/case-archive.test.ts +159 -0
- package/src/shared/eval-case/__tests__/mock-endpoint-failure.test.ts +65 -0
- package/src/shared/eval-case/__tests__/mock-endpoint.test.ts +269 -0
- package/src/shared/eval-case/__tests__/prepare-case.test.ts +228 -0
- package/src/shared/eval-case/__tests__/read-files.test.ts +90 -0
- package/src/shared/eval-case/agent-mock.ts +131 -0
- package/src/shared/eval-case/case-archive.ts +135 -0
- package/src/shared/eval-case/mock-endpoint.ts +282 -0
- package/src/shared/eval-case/prepare-case.ts +227 -0
- package/src/shared/eval-case/read-files.ts +94 -0
- package/src/shared/exact-apply.ts +247 -0
- package/src/shared/execution-context.ts +62 -0
- package/src/shared/execution-target.ts +17 -0
- package/src/shared/extract-json.ts +153 -0
- package/src/shared/extract-structured-output.ts +83 -0
- package/src/shared/file-change.ts +62 -0
- package/src/shared/file-tools.ts +167 -0
- package/src/shared/filereview/__tests__/capture.test.ts +1178 -0
- package/src/shared/filereview/__tests__/cas-progress.test.ts +229 -0
- package/src/shared/filereview/__tests__/cas-substrate.test.ts +504 -0
- package/src/shared/filereview/__tests__/command-provenance.test.ts +249 -0
- package/src/shared/filereview/__tests__/digest.test.ts +100 -0
- package/src/shared/filereview/__tests__/events.test.ts +350 -0
- package/src/shared/filereview/__tests__/git-substrate.test.ts +365 -0
- package/src/shared/filereview/__tests__/line-counts.test.ts +73 -0
- package/src/shared/filereview/__tests__/progress.test.ts +480 -0
- package/src/shared/filereview/__tests__/proxy-reconcile.test.ts +265 -0
- package/src/shared/filereview/__tests__/record.test.ts +126 -0
- package/src/shared/filereview/__tests__/secret-paths.test.ts +121 -0
- package/src/shared/filereview/capture.ts +783 -0
- package/src/shared/filereview/cas-progress.ts +155 -0
- package/src/shared/filereview/cas-substrate.ts +460 -0
- package/src/shared/filereview/cas-touched.ts +89 -0
- package/src/shared/filereview/command-provenance.ts +182 -0
- package/src/shared/filereview/digest.ts +83 -0
- package/src/shared/filereview/events.ts +515 -0
- package/src/shared/filereview/git-substrate.ts +680 -0
- package/src/shared/filereview/index.ts +99 -0
- package/src/shared/filereview/line-counts.ts +83 -0
- package/src/shared/filereview/progress.ts +361 -0
- package/src/shared/filereview/record.ts +107 -0
- package/src/shared/filereview/secret-paths.ts +119 -0
- package/src/shared/fingerprint-secret.ts +77 -0
- package/src/shared/grpc-retry.ts +54 -0
- package/src/shared/heartbeat.ts +50 -0
- package/src/shared/hooks/__tests__/answer.test.ts +179 -0
- package/src/shared/hooks/__tests__/condition.test.ts +389 -0
- package/src/shared/hooks/__tests__/cursor-format.test.ts +209 -0
- package/src/shared/hooks/__tests__/evaluate.test.ts +473 -0
- package/src/shared/hooks/__tests__/run.test.ts +159 -0
- package/src/shared/hooks/__tests__/stall.test.ts +75 -0
- package/src/shared/hooks/__tests__/tool-view.test.ts +235 -0
- package/src/shared/hooks/answer.ts +180 -0
- package/src/shared/hooks/condition.ts +341 -0
- package/src/shared/hooks/evaluate.ts +381 -0
- package/src/shared/hooks/formats/claude-code.ts +106 -0
- package/src/shared/hooks/formats/common.ts +31 -0
- package/src/shared/hooks/formats/cursor.ts +261 -0
- package/src/shared/hooks/hook-set.ts +134 -0
- package/src/shared/hooks/matcher.ts +31 -0
- package/src/shared/hooks/messages.ts +38 -0
- package/src/shared/hooks/run.ts +190 -0
- package/src/shared/hooks/setup.ts +209 -0
- package/src/shared/hooks/shell-commands.ts +326 -0
- package/src/shared/hooks/tool-view.ts +406 -0
- package/src/shared/http-retry.ts +139 -0
- package/src/shared/implement-plan-prompt.ts +104 -0
- package/src/shared/json-schema-to-zod.ts +53 -0
- package/src/shared/llm-backend.ts +623 -0
- package/src/shared/llm-proxy.ts +154 -0
- package/src/shared/mcp-manager.ts +161 -0
- package/src/shared/mcp-oauth-detect.ts +80 -0
- package/src/shared/mcp-resolver.ts +338 -0
- package/src/shared/mcp-schema-sanitizer.ts +222 -0
- package/src/shared/mcp-tool-listing.ts +203 -0
- package/src/shared/mcp-transport-guard.ts +81 -0
- package/src/shared/memory-attachment.ts +177 -0
- package/src/shared/memory-retrieval.ts +380 -0
- package/src/shared/model-client.ts +465 -0
- package/src/shared/model-error.ts +551 -0
- package/src/shared/model-facts.ts +30 -0
- package/src/shared/model-lanes.ts +66 -0
- package/src/shared/model-pricing-data.ts +123 -0
- package/src/shared/model-pricing.ts +64 -0
- package/src/shared/model-registry.ts +352 -0
- package/src/shared/persist-decision.ts +47 -0
- package/src/shared/placeholder-resolver.ts +113 -0
- package/src/shared/plan-artifact.ts +255 -0
- package/src/shared/plan-mode-permissions.ts +53 -0
- package/src/shared/plan-mode-prompt.ts +74 -0
- package/src/shared/platform-server-address.ts +124 -0
- package/src/shared/plugin-mount.ts +495 -0
- package/src/shared/plugin-servers.ts +23 -0
- package/src/shared/prompt-sections.ts +205 -0
- package/src/shared/recalled-memories.ts +90 -0
- package/src/shared/registry-endpoint.ts +108 -0
- package/src/shared/run-credential-store.ts +45 -0
- package/src/shared/run-credential.ts +48 -0
- package/src/shared/run-values.ts +154 -0
- package/src/shared/runner-credential-keys.ts +106 -0
- package/src/shared/runner-credential-store.ts +115 -0
- package/src/shared/sender-identity.ts +85 -0
- package/src/shared/service-tier.ts +78 -0
- package/src/shared/session-context.ts +58 -0
- package/src/shared/shell-env.ts +75 -0
- package/src/shared/skill-mount.ts +214 -0
- package/src/shared/skill-resolver.ts +167 -0
- package/src/shared/stall-watchdog.ts +122 -0
- package/src/shared/status-offload.ts +742 -0
- package/src/shared/status.ts +268 -0
- package/src/shared/streaming-scheduler.ts +158 -0
- package/src/shared/subagent-gate.ts +122 -0
- package/src/shared/subagent-rows.ts +39 -0
- package/src/shared/subagents.ts +75 -0
- package/src/shared/synthesized-attachment.ts +100 -0
- package/src/shared/telemetry-content.ts +301 -0
- package/src/shared/thinking-mode.ts +125 -0
- package/src/shared/todos.ts +68 -0
- package/src/shared/tool-kind.ts +140 -0
- package/src/shared/tool-lists.ts +617 -0
- package/src/shared/tool-rounds.ts +151 -0
- package/src/shared/tool-row.ts +346 -0
- package/src/shared/trace-context.ts +35 -0
- package/src/shared/with-timeout.ts +53 -0
- package/src/shared/worker-shutdown.ts +134 -0
- package/src/shared/workspace/__tests__/file-tree.test.ts +210 -0
- package/src/shared/workspace/__tests__/git-credential.test.ts +470 -0
- package/src/shared/workspace/__tests__/git-identity.test.ts +124 -0
- package/src/shared/workspace/__tests__/git-source.test.ts +476 -0
- package/src/shared/workspace/__tests__/local-backend-platform.test.ts +259 -0
- package/src/shared/workspace/__tests__/local-backend.test.ts +160 -0
- package/src/shared/workspace/__tests__/platform-mount.test.ts +378 -0
- package/src/shared/workspace/__tests__/provisioner.test.ts +194 -0
- package/src/shared/workspace/__tests__/session-provision.test.ts +322 -0
- package/src/shared/workspace/__tests__/session-root.test.ts +42 -0
- package/src/shared/workspace/__tests__/stigmer-link.test.ts +278 -0
- package/src/shared/workspace/__tests__/workspace-lock.test.ts +207 -0
- package/src/shared/workspace/__tests__/writeback-coordinator-git.test.ts +244 -0
- package/src/shared/workspace/__tests__/writeback-coordinator.test.ts +495 -0
- package/src/shared/workspace/file-tree.ts +116 -0
- package/src/shared/workspace/git-credential.ts +247 -0
- package/src/shared/workspace/git-identity.ts +41 -0
- package/src/shared/workspace/local-backend.ts +132 -0
- package/src/shared/workspace/platform-dir.ts +163 -0
- package/src/shared/workspace/platform-mount.ts +190 -0
- package/src/shared/workspace/provisioner.ts +119 -0
- package/src/shared/workspace/session-provision.ts +104 -0
- package/src/shared/workspace/session-root.ts +60 -0
- package/src/shared/workspace/sources/empty.ts +19 -0
- package/src/shared/workspace/sources/git.ts +292 -0
- package/src/shared/workspace/sources/local-path.ts +92 -0
- package/src/shared/workspace/stigmer-link.ts +185 -0
- package/src/shared/workspace/types.ts +85 -0
- package/src/shared/workspace/workspace-lock.ts +245 -0
- package/src/shared/workspace/writeback-coordinator.ts +522 -0
- package/src/shared/zip-extract.ts +118 -0
- package/src/tools/__tests__/url-guard.test.ts +155 -0
- package/src/tools/__tests__/web-fetch-tool.test.ts +193 -0
- package/src/tools/index.ts +27 -0
- package/src/tools/url-guard.ts +140 -0
- package/src/tools/web-fetch-tool.ts +278 -0
- package/src/worker.ts +112 -0
- package/src/workflow-source.ts +72 -0
- package/src/workflows/__tests__/barrel.test.ts +21 -0
- package/src/workflows/__tests__/list-plugin-tools.test.ts +82 -0
- package/src/workflows/index.ts +36 -0
- package/src/workflows/list-plugin-tools.ts +70 -0
- package/src/workflows/types.ts +46 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
Copyright 2026 Stigmer Contributors
|
|
179
|
+
|
|
180
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
181
|
+
you may not use this file except in compliance with the License.
|
|
182
|
+
You may obtain a copy of the License at
|
|
183
|
+
|
|
184
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
185
|
+
|
|
186
|
+
Unless required by applicable law or agreed to in writing, software
|
|
187
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
188
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
189
|
+
See the License for the specific language governing permissions and
|
|
190
|
+
limitations under the License.
|
|
191
|
+
|
|
192
|
+
Except for the contents of the ee/ directory, which are licensed under the
|
|
193
|
+
Stigmer Enterprise License (see ee/LICENSE), everything in this repository
|
|
194
|
+
is licensed under the Apache License, Version 2.0, above.
|
package/README.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# @stigmer/runner
|
|
2
|
+
|
|
3
|
+
Embeddable Temporal worker for the Stigmer AI agent platform. The runner executes agent sessions — driving the Cursor and native (deep-agent) harnesses, orchestrating MCP servers, and reporting status and artifacts back to the Stigmer backend.
|
|
4
|
+
|
|
5
|
+
It is the single runtime behind three surfaces:
|
|
6
|
+
|
|
7
|
+
- the **CLI daemon** (`stigmer up`) running agents locally,
|
|
8
|
+
- **cloud deployments** (Kubernetes / sandbox) running managed executions, and
|
|
9
|
+
- the **desktop app**, which embeds the runner as a subprocess to run sessions on the user's own machine.
|
|
10
|
+
|
|
11
|
+
This document is the operational reference for the package: how it runs, what it needs, and every environment variable that configures it. You should not need to read `config.ts` or `main.ts` to operate or embed the runner.
|
|
12
|
+
|
|
13
|
+
> **You usually don't start the runner by hand.** `stigmer up` runs it for local agent execution, and the desktop app embeds it automatically. Invoke the `stigmer-runner` binary directly only for advanced operation or embedding — which is what this document covers.
|
|
14
|
+
|
|
15
|
+
> The deep manager-mode IPC protocol (see [Manager mode](#manager-mode)), the desktop-vs-web embedding walkthrough, and the SDK-level `RunnerAdapter` / `executionTarget` surfaces are documented separately — see [Related documentation](#related-documentation).
|
|
16
|
+
|
|
17
|
+
## Install and build
|
|
18
|
+
|
|
19
|
+
The runner is a workspace package in the Stigmer monorepo. Build it from the repo root:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
make build-runner
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
This runs `npm run build` in `backend/services/runner` (`tsc -p tsconfig.build.json`) and then writes a build fingerprint (see [The stale-build guard](#the-stale-build-guard)). The compiled output lands in `dist/`, with a `stigmer-runner` CLI entry point at `dist/main.js`.
|
|
26
|
+
|
|
27
|
+
Requires a Node.js whose built-in `node:sqlite` is available unflagged — `>= 22.13` in the 22.x line, and `>= 23.4` after that (23.0–23.3 lack it). The durable local checkpointer depends on it, and the runner probes for it at boot (`src/preflight.ts`), refusing to start with an actionable error rather than crashing on the import.
|
|
28
|
+
|
|
29
|
+
### The slim embedding artifact
|
|
30
|
+
|
|
31
|
+
The plain `dist/` resolves its dependencies from `node_modules` at runtime — ~508 MB unpacked, which is unshippable inside a desktop app ([#170](https://github.com/stigmer/stigmer/issues/170)). For embedding, build the **slim artifact**:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
make build-runner-slim # or: npm run build:slim
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
This produces `dist-slim/`: a tree-shaken esbuild bundle of the whole runner (`main.js`), a build-time-prebuilt Temporal workflow bundle, and a staged `node_modules` containing only the packages that genuinely cannot be bundled (the platform-pruned Temporal native bridge, `@cursor/sdk` and its native binaries) — **~85 MB per platform**. `node dist-slim/main.js` accepts the same modes, environment variables, and IPC protocol as `dist/main.js`. It also holds `attach/main.js`, the attach entry (below) bundled on its own, which starts the `main.js` beside it with the same Node. See `scripts/bundle-slim.mjs` for the full layout, `scripts/verify-slim-artifact.mjs` for the boot verification that gates releases, and the [embedding guide](https://stigmer.ai/docs/guides/runners/embedding) for how apps stage it.
|
|
38
|
+
|
|
39
|
+
> **Why the slim bundle is CommonJS, not ESM.** The runner's auth correctness depends on a deliberate module **load order**: it installs the fetch + HTTP/2 interceptors first, then lazily loads `@cursor/sdk` and `@connectrpc/connect-node` (via dynamic `import()`) so the interceptors are in place before those packages capture `globalThis.fetch` / snapshot the `node:http2` ESM facade. An **ESM** esbuild bundle destroys this — it hoists every external `import` to the top of the output and evaluates them before any code runs, freezing the `node:http2` facade and capturing the original `fetch` before install, which silently breaks proxy auth on the authenticated path (this was the regression in [#170](https://github.com/stigmer/stigmer/issues/170)). A **CJS** bundle preserves the source's lazy evaluation order, so the dynamic-import boundary keeps both interceptors correct. The meta `package.json` deliberately omits `"type": "module"` so `node main.js` runs as CommonJS — do **not** add it back, and do not flip `format` to `"esm"` in `bundle-slim.mjs`. The boot guard `assertHttp2ConnectPatched()` plus the authenticated check in `verify-slim-artifact.mjs` fail loudly if this is ever reverted.
|
|
40
|
+
|
|
41
|
+
The slim build is also published to npm as `@stigmer/runner-slim` (with per-platform `@stigmer/runner-slim-<platform>` support packages) alongside the full `@stigmer/runner` package on every release.
|
|
42
|
+
|
|
43
|
+
The sandbox image (`Dockerfile.sandbox`) ships the same directory as its runner layer: `dist-slim/` at `/runner/dist`, started by the layer's own Node at `/runner/bin/node` (the repository's `.nvmrc` version), on a base image that holds the agent's tools. The server's drivers launch it with the command in `backend/services/stigmer-server/src/sandbox/runner-launch.ts`: `/runner/bin/start` (`layer/start.sh`), which refuses a base image the runner cannot run on (no glibc, not root, no `bash`, `git` or the Cursor hook's text tools) in one line that names the contract, refuses a layer whose `/runner/RELEASE` names another release than the server's `STIGMER_SERVER_RELEASE` (stigmer/stigmer#1831), clears `NODE_OPTIONS` and `NODE_PATH`, and execs that Node. The image's release lane runs `verify-slim-artifact.mjs` inside the built image, through the start script, before any tag but `main-<sha>` names it, and publishes the layer alone (`ghcr.io/stigmer/runner-layer`, amd64 and arm64) after booting it on Ubuntu and seeing it refuse Alpine; `deploy/runner-layer/Dockerfile` adds it to an operator's own base (the self-hosting guide's "Bring your own base image").
|
|
44
|
+
|
|
45
|
+
## Run modes
|
|
46
|
+
|
|
47
|
+
The runner has three **run modes**, selected at boot by two environment variables (`src/main.ts`): `STIGMER_RUNNER_MODE=manager` selects manager mode; otherwise a set `STIGMER_POOL_MEMBER_ID` selects pool mode; otherwise the runner is static. Do not confuse the run mode (process topology) with the execution location (`MODE=local|cloud`) or the transport (`STIGMER_PROXY_ENDPOINT`) — those are independent axes covered in [Execution location vs transport](#execution-location-vs-transport).
|
|
48
|
+
|
|
49
|
+
| Run mode | Selector | Topology | Used by |
|
|
50
|
+
|----------|----------|----------|---------|
|
|
51
|
+
| Static | Neither of the two below (default) | One Worker polling one task queue; blocks until shutdown | CLI daemon, cloud deployments |
|
|
52
|
+
| Manager | `STIGMER_RUNNER_MODE=manager` | Shared Temporal connection; dynamic per-session / per-execution Workers; stdin/stdout JSON IPC | Desktop app |
|
|
53
|
+
| Pool | `STIGMER_POOL_MEMBER_ID` set, and `STIGMER_RUNNER_MODE` not `manager` | A warm-pool sandbox: boots the runner manager, then serves what its injected credential says — a blank member polls its `sandbox:{memberId}` control queue for a claim, a claimed member that restarted goes straight to its session's queue (`src/pool-member.ts`) | Hosted cloud sandboxes |
|
|
54
|
+
|
|
55
|
+
### Static mode
|
|
56
|
+
|
|
57
|
+
Static mode creates a single Temporal Worker that polls one task queue and runs until it receives `SIGTERM` / `SIGINT`. This is the right mode when the set of work is fixed at startup (a daemon or a pod dedicated to a queue).
|
|
58
|
+
|
|
59
|
+
On a signal it drains the worker, releases the harnesses, closes its Temporal connection and flushes telemetry, and the process then exits on its own, normally within milliseconds. As the CLI entry (`stigmer-runner`, and the cloud's pool members, which end the same way), a process still alive 5 s after that is made to exit, with one log line naming the resources that kept it alive (`src/exit-backstop.ts`). That line means a leaked handle to fix, not a slow shutdown to tune.
|
|
60
|
+
|
|
61
|
+
As a library:
|
|
62
|
+
|
|
63
|
+
```ts
|
|
64
|
+
import { createStigmerRunner } from "@stigmer/runner";
|
|
65
|
+
|
|
66
|
+
const runner = await createStigmerRunner({
|
|
67
|
+
taskQueue: "stigmer_runner",
|
|
68
|
+
temporalAddress: "localhost:7233",
|
|
69
|
+
stigmerEndpoint: "http://localhost:7234",
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
process.on("SIGTERM", () => runner.shutdown());
|
|
73
|
+
await runner.start(); // blocks until shutdown
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
The `stigmer-runner` CLI runs this mode by default, reading its configuration from the environment.
|
|
77
|
+
|
|
78
|
+
### Manager mode
|
|
79
|
+
|
|
80
|
+
Manager mode keeps a single shared Temporal connection and a single set of activities, then spins Workers up and down on demand — one per session (`session:{sessionId}`). This is what the desktop app needs: it adds and removes Workers as the user opens and closes sessions, without restarting the process.
|
|
81
|
+
|
|
82
|
+
As a library:
|
|
83
|
+
|
|
84
|
+
```ts
|
|
85
|
+
import { createStigmerRunnerManager } from "@stigmer/runner";
|
|
86
|
+
|
|
87
|
+
const manager = await createStigmerRunnerManager({
|
|
88
|
+
temporalAddress: "localhost:7233",
|
|
89
|
+
stigmerEndpoint: "http://localhost:7234",
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
await manager.addSession("ses_abc123");
|
|
93
|
+
// ... later
|
|
94
|
+
await manager.removeSession("ses_abc123");
|
|
95
|
+
await manager.shutdown();
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
As a subprocess, the host launches `stigmer-runner` with `STIGMER_RUNNER_MODE=manager` and drives it over a line-delimited JSON protocol on stdin/stdout (`addSession`, `removeSession`, `updateToken`, `shutdown`). The protocol surface is intentionally small and is specified in detail elsewhere — see [Related documentation](#related-documentation).
|
|
99
|
+
|
|
100
|
+
### The attach entry (a sandbox that waits to be attached)
|
|
101
|
+
|
|
102
|
+
`dist/attach/main.js` is a second entry, for sandbox platforms that snapshot a started sandbox once and start every later sandbox from that snapshot (Agent Substrate's golden snapshot). It is not a run mode of the runner: it starts a small waiter (`src/attach/waiter.ts`) that loads none of the runner's machinery (Node built-ins, the runner's secret-name list and claim reader, and the codecs' `connection` subpath: 13 modules, pinned by `src/attach/__tests__/import-graph.test.ts` and `scripts/verify-attach-boot.mjs`, and in the slim artifact by `scripts/bundle-slim.mjs`'s check of the bundle's inputs, one rule in `scripts/attach-graph-rule.mjs`), answers `GET /readyz`, and waits for one `POST /attach` carrying the task queue to serve and the runner's secrets. The first accepted push starts the runner, `dist/main.js` in static mode, with the sandbox's environment plus that queue and those secrets, exactly the environment a sandbox pod gives it at start; the waiter then supervises it as a restart policy would. A later push for the same queue (a driver pushes on every wakeup) may only rotate `STIGMER_TOKEN`, for a token of the same `token_type` and, when the first named a session, the same session; every other secret must be the first push's. A push that arrives while a crashed runner waits out its restart delay starts it at once. A restart uses the latest pushed token, not the one the live runner renewed, so a composition whose tokens are renewed also pushes the renewed token while the sandbox runs. Every refusal answers `{"error", "code"}`, and the code is stable (`PushRefusalCode` in `src/attach/push.ts`): `secrets_changed`, for one, tells a driver that the runner must start fresh to take new secrets. A snapshot therefore never holds a runner or a credential. It must not: every clone of one snapshot shares the snapshotted process's random state, so a runner in the snapshot would give unrelated sessions the same keys and identifiers (the waiter's header has the measurement).
|
|
103
|
+
|
|
104
|
+
A push is accepted only for the queue whose sandbox name (`sbx-<code>-<12 hex>`, the server's own derivation) is this sandbox's, may set only the runner's secret variables, and must carry an unexpired JWT or no token (`src/attach/push.ts`). Who can reach the waiter is the driver's to restrict: on Agent Substrate, its router reaches every actor, so no actor's egress policy may reach the router. The sandbox's own processes reach it over loopback too, which is why a later push can change nothing but the token. The first accepted push is not authenticated and fixes the sandbox's queue and secrets for its life: a sandbox whose first push did not come from its driver cannot be repaired, only replaced. Non-secret connection settings (the Temporal server's CA, a client certificate, the server name) belong in the sandbox's own environment, not in a push. The waiter holds port 80 by default; an agent's own servers inside the sandbox use other ports.
|
|
105
|
+
|
|
106
|
+
### The agent host (where the engines run)
|
|
107
|
+
|
|
108
|
+
In every run mode, and in a library embedding, the runner runs every harness's engine (the native one and Cursor's) in a second process, the agent host: the runner's own entry started as `main.js agent-host`, on the same Node, with a private pipe on file descriptor 3 (`src/agent-host/`). The runner keeps the turn runtime, its credentials and all its control-plane traffic; the host runs the engines and every process an agent's turn starts there (its shell, its hooks, its MCP servers, the Cursor approval hook's server). The runner's own process loads neither engine's SDK. The two meet at the harness adapter contract (`src/harness/types.ts`): the runner's remote adapter (`src/agent-host/remote-adapter.ts`) forwards each turn to the host and treats everything the host sends back as untrusted, and which harnesses are hosted is one set in `src/harness-adapters.ts` (`HOSTED_HARNESSES`).
|
|
109
|
+
|
|
110
|
+
The host is handed none of the runner's keys. Everything it calls that needs one goes through the runner's local proxy on `127.0.0.1` (`src/agent-proxy/`): model calls, the model registry, its telemetry (forwarded to the operator's collector with the collector's login, below), and on a runner behind the platform proxy the checkpoints. The platform's own MCP servers (memory, channels, the conversation tools) never carry the runner's own key: they carry a credential scoped to the run (in a hosted sandbox, the sandbox's session token until #2080), and a turn for which none can be had runs without them and says so. In a container shape the host's environment is an allow-list, so an ambient cloud identity in the runner's (`AWS_ACCESS_KEY_ID` and its siblings, `AWS_WEB_IDENTITY_TOKEN_FILE`, `GOOGLE_APPLICATION_CREDENTIALS`, Azure client secrets) does not reach it; on a local shape the host gets the runner's environment minus the runner's secret variables, as the agent's tools always did there. Each model lane serves its provider's model calls only, not the rest of the provider's API. The host authenticates with a token minted at each host start, and a model call is served only while a turn of the execution it names is running. On a runner that calls its providers directly, the proxy adds the operator's key or signs with the runner's cloud identity for each model backend (Anthropic, OpenAI, Bedrock, Vertex, Foundry), from the same settings as before; on a runner behind `STIGMER_PROXY_ENDPOINT`, it forwards to that proxy with the runner's own token. The Cursor SDK's traffic has a listener of its own on the proxy, TLS on loopback with a certificate made at each runner start, which the host trusts through `NODE_EXTRA_CA_CERTS` (added to any file the operator named there). The Cursor key exchange is made with the runner's credential, and the access token it returns stays in the runner: the host gets a stand-in, swapped back on every call. Of Cursor's Connect services the lane relays only what the SDK calls: the agent run and the side calls listed in `CURSOR_SIDE_CALLS` (`src/agent-proxy/cursor-lane.ts`); anything else is refused and logged once as `[agent-proxy] refused …`, so an SDK upgrade that adds a call fails the real-SDK wire test until the list names it. The proxy listens on loopback only and needs no configuration.
|
|
111
|
+
|
|
112
|
+
The turn runtime's own work on the agent's paths (provisioning the workspace, the `.stigmer` link, skill, plugin and attachment mounts, the file-review capture, write-back's git) goes through `src/shared/agent-fs.ts`, which the runner routes to the host: each file operation and each process is performed there, so a link, a git hook or a `core.fsmonitor` the agent planted never acts with the runner's rights. `src/harness/__tests__/runtime-touches-no-agent-path.test.ts` holds the runtime's graph to that.
|
|
113
|
+
|
|
114
|
+
**In a container shape** (root, Linux, started through the runner layer's `/runner/bin/start`, which exports `STIGMER_RUNNER_LAYER=1`), the runner starts the host as a user of its own, `stigmer-agent` (uid and gid 10001), through `setpriv` (`src/shared/agent-identity.ts`), with the agent's home (`STIGMER_AGENT_HOME`, else `/home/stigmer-agent`) as `HOME`, so nothing an agent runs can read the runner's process, files or keys. At boot it adds the user when the image lacks it, hands the agent its home and workspace (on the first such boot, moving the agent's session state into that home, `src/shared/agent-handover.ts`), and proves the drop works; a runner that cannot drop exits 78. It keeps only `SETUID`, `SETGID`, `CHOWN`, `KILL` (to end a host that will not exit, which root cannot signal without it) and `DAC_OVERRIDE` (to write its own state on a volume it shares with the server). There the host's environment is an allow-list (`src/agent-host/environment.ts`), with `STIGMER_AGENT_ENV_PASSTHROUGH` naming extra variables; a credential under an allowed prefix (`NODE_AUTH_TOKEN`, an OpenTelemetry `*_HEADERS` name the runner does not hold) is held back unless named there, and the collector's login (`OTEL_EXPORTER_OTLP_HEADERS` and its per-signal forms) is a runner secret that never reaches it: the host exports through the runner's local proxy. The agent's home may hold none of the runner's own files: a `STIGMER_AGENT_HOME` above the runner's home or inside its `~/.stigmer` is refused with exit 78 before the handover moves anything. `src/__tests__/agent-separation.container.test.ts` proves it in a container (`STIGMER_TEST_CONTAINER=1`). A workspace root inside the runner's home that the agent cannot pass (the default `~/.stigmer/workspaces/runner` under a driver's `/root`) is refused the same way, naming `WORKSPACE_ROOT_DIR`. Local shapes (`stigmer up`, the all-in-one image, which runs it, and the desktop app) run the host as the same user, whose keys are their own.
|
|
115
|
+
|
|
116
|
+
Elsewhere the host starts with the environment the agent's tools have always seen: the runner's own, without the runner's secrets (`src/agent-host/environment.ts`). Its log lines are relayed through the runner's console unchanged. A host that exits is started again after one second, backing off to thirty; a turn running on it settles as an internal failure at once, and the next turn waits for the new host. The host exits when its pipe closes, so a runner that is killed leaves no host behind. `scripts/verify-agent-host-boot.mjs` (part of `npm run verify:dist`, and of `verify-slim-artifact.mjs` for the slim artifact) proves a build starts as the host.
|
|
117
|
+
|
|
118
|
+
### Traces: every run as OpenTelemetry GenAI spans
|
|
119
|
+
|
|
120
|
+
The runner sends every run to the operator's tracing tool over OTLP, in OpenTelemetry's conventions for generative AI (`src/gen-ai-conventions.ts`): each turn an `invoke_agent <agent>` root span in a trace whose id is derived from the run id (`src/run-trace-id.ts`), so a run that resumed after an approval stays one trace; each model call a `chat <model>` span with its provider, model and tokens; each tool call an `execute_tool <tool>` span; a sub-agent an `invoke_agent <name>` span under its `task` call; a Cursor run an `invoke_agent Cursor` span with its summed tokens. It is configured only by the standard variables (`src/otel-export.ts`): an endpoint turns it on, `OTEL_EXPORTER_OTLP_PROTOCOL` picks `http/protobuf` (the default), `http/json` or `grpc`, and `OTEL_EXPORTER_OTLP_HEADERS` (with its per-signal forms) is the collector's login, a runner secret held in custody like the model keys. The conversation's text rides the spans only with `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true`, and never shows more than the saved conversation does (`src/shared/telemetry-content.ts`). The agent host never holds the login: it exports to the local proxy's `otlp` lane, which forwards to the collector (`src/agent-proxy/otlp-forward.ts`). The operator's guide is `docs/guides/self-hosting/tracing.mdx`.
|
|
121
|
+
|
|
122
|
+
### A note for embedders: OpenTelemetry
|
|
123
|
+
|
|
124
|
+
When you embed the runner as a **library** (`createStigmerRunner` / `createStigmerRunnerManager`), the factory does **not** initialize OpenTelemetry — tracing and metrics mutate global state, which the embedding process should own. The factory still wires the Temporal OTel interceptor internally when the standard settings export traces, but you must initialize the tracer/meter providers yourself if you want spans and metrics exported, and with your provider's id generator each turn of a run is a trace of its own, grouped by the Session's id. The `stigmer-runner` CLI initializes OTel for you in every mode. The agent host is a process of the runner's own, not the embedder's: when the settings export it sends its spans and metrics through the runner's local proxy under the runner's service name, with `stigmer.runner.process=agent-host` on the resource.
|
|
125
|
+
## Execution location vs transport
|
|
126
|
+
|
|
127
|
+
Two settings are easy to conflate but are deliberately independent:
|
|
128
|
+
|
|
129
|
+
- **`MODE` — execution location.** Where the agent runs and whose filesystem it sees. `local` allows local-path workspaces on the host filesystem; `cloud` runs in a server-provisioned sandbox (git-only).
|
|
130
|
+
- **`STIGMER_PROXY_ENDPOINT` — transport.** How credentials and artifacts move. When set, the runner routes Cursor SDK traffic through the Stigmer proxy and pushes artifacts through it, instead of talking to providers and storage directly.
|
|
131
|
+
|
|
132
|
+
These are orthogonal. The **desktop runner** is the canonical case where they diverge: it executes **locally** (`MODE=local`, so local-path workspaces work) yet still routes Cursor traffic and artifact uploads **through the proxy**. Coupling the two — forcing "proxy implies cloud" — is exactly what previously broke local-path sessions, which is why the env path (`MODE`) and both library factories (`executionMode`) treat them separately.
|
|
133
|
+
|
|
134
|
+
> **Library factories — `executionMode`.** Both `createStigmerRunner` and `createStigmerRunnerManager` accept an optional `executionMode: "local" | "cloud"` that sets execution location independently of proxy transport. When omitted, the static `createStigmerRunner` derives it for backward compatibility (`proxy ⇒ cloud`, otherwise `local`); the manager defaults to `local`. Set `executionMode: "local"` together with `proxyEndpoint` to express the desktop case — local execution with proxy transport.
|
|
135
|
+
|
|
136
|
+
### Credential modes
|
|
137
|
+
|
|
138
|
+
The transport setting drives two credential modes:
|
|
139
|
+
|
|
140
|
+
- **Direct mode** (local / OSS): you provide `CURSOR_API_KEY` directly (for the Cursor harness); `STIGMER_TOKEN` is optional against a trusted-local server, which verifies no credential, and is the runner's own API key against a self-hosted server with sign-in on (the run's per-run credential arrives with each dispatch; see `src/shared/run-credential.ts`). `STIGMER_PROXY_ENDPOINT` is unset.
|
|
141
|
+
- **Proxy mode** (cloud / managed runners): `STIGMER_PROXY_ENDPOINT` and `STIGMER_TOKEN` are required. You do not supply `CURSOR_API_KEY`: the Cursor key is the organization's own, saved in Settings → Provider keys, and the proxy validates your token and injects that key upstream, so the key never reaches the runner or the sandbox. An organization with no Cursor key is refused at the key exchange, and the turn fails with "This organization has no Cursor key. An admin can add one in Settings → Provider keys." The agent host's Cursor SDK talks to the runner's local proxy, which forwards to `STIGMER_PROXY_ENDPOINT`; `CURSOR_BACKEND_URL` in the host is runner-managed, not configuration you set. On a direct-mode runner, `CURSOR_BACKEND_URL` set on the runner still names the Cursor backend the local proxy calls.
|
|
142
|
+
|
|
143
|
+
## Required infrastructure
|
|
144
|
+
|
|
145
|
+
| Component | When | Purpose |
|
|
146
|
+
|-----------|------|---------|
|
|
147
|
+
| Temporal | Always | The runner is a Temporal Worker. It needs a reachable Temporal frontend and a namespace. You may set these explicitly (`TEMPORAL_SERVICE_ADDRESS`, `TEMPORAL_NAMESPACE`), but when a token is present the runner self-discovers them from the control plane at boot — see the env reference below. |
|
|
148
|
+
| Stigmer backend | Always | The control plane (`STIGMER_BACKEND_ENDPOINT`) for status updates, blueprints, and (local) artifact serving. |
|
|
149
|
+
| Stigmer proxy + token | Proxy/cloud only | The proxy (`STIGMER_PROXY_ENDPOINT`) injects the organization's own Cursor key (saved in Settings → Provider keys) and brokers artifact storage; `STIGMER_TOKEN` authenticates to it. |
|
|
150
|
+
|
|
151
|
+
In local/direct mode, only Temporal and the Stigmer backend are required, and both default to localhost.
|
|
152
|
+
|
|
153
|
+
## The stale-build guard
|
|
154
|
+
|
|
155
|
+
The runner runs from compiled `dist/` output. A stale `dist/` — source changed but not rebuilt — silently runs old code, which has historically cost hours of debugging (structured-output failures, naming mismatches, env-resolution regressions).
|
|
156
|
+
|
|
157
|
+
To prevent this, `npm run build` writes `dist/.build-fingerprint`: a JSON file with a SHA-256 hash of all `src/**/*.ts` files (excluding `node_modules` and `__tests__`), plus a build timestamp and file count. At startup, `checkBuildFreshness()` recomputes the hash and compares it. On mismatch, the runner prints a clear error and exits with code `78`:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
!!! STALE RUNNER BUILD — REFUSING TO START !!!
|
|
161
|
+
dist/ was built at <timestamp> (hash <hash>)
|
|
162
|
+
src/ has changed since (current hash <hash>)
|
|
163
|
+
|
|
164
|
+
Run 'make build-runner' or 'make desktop-dev' to rebuild.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The check is skipped gracefully when the fingerprint file is absent — for example under `tsx` (`npm run start`), in CI, or on a first build — so it never blocks development workflows that run from source.
|
|
168
|
+
|
|
169
|
+
## Environment variable reference
|
|
170
|
+
|
|
171
|
+
All configuration is environment-driven. Every variable the runner's source reads is named here, except the few `src/__tests__/readme-environment.test.ts` lists as deliberate exceptions, each with its reason (the operating system's home directory, a backend value not yet supported); the test fails when any other name appears nowhere in this file, so a new setting cannot land undocumented. That its row says the right thing is read in review. Defaults are checked by hand against the module each row cites or that reads the variable. "Applies to" indicates the run mode, execution location, or credential mode a variable is relevant to.
|
|
172
|
+
|
|
173
|
+
### Core configuration
|
|
174
|
+
|
|
175
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
176
|
+
|----------|-----------|----------|---------|---------|
|
|
177
|
+
| `STIGMER_RUNNER_MODE` | All | No | `static` | Selects the run mode. Set to `manager` for dynamic per-session/per-execution Workers; any other value (or unset) means static mode, or pool mode when `STIGMER_POOL_MEMBER_ID` is set. |
|
|
178
|
+
| `STIGMER_POOL_MEMBER_ID` | Hosted sandboxes | No | _(none)_ | Selects pool mode (see [Run modes](#run-modes)): the sandbox's identity in the warm pool. Set by the hosted edition's sandbox provisioning; a self-hosted runner never sets it. |
|
|
179
|
+
| `STIGMER_ATTACH_PORT` | The attach entry | No | `80` | Port the attach waiter listens on (`src/attach/entry.ts`), 80 being the port a Substrate router reaches without a `CONNECT` tunnel. Not passed to the runner. |
|
|
180
|
+
| `STIGMER_SANDBOX_NAME_FILE` | The attach entry | No | `/run/ate/actor-name` | File holding this sandbox's name, read on every push because each clone of a snapshot has its own (a Substrate template projects it with an actor-metadata volume). A push for a queue whose sandbox name differs is refused. Not passed to the runner. |
|
|
181
|
+
| `STIGMER_SERVER_RELEASE` | The start script | No | _(none)_ | The server's release, set when the server is a release by the built-in `agent-sandbox`, `docker` and `substrate` drivers, and by a composition's own driver once it hands `SandboxDriverConfig.serverRelease` on (`SERVER_RELEASE_ENV` in the server's `src/sandbox/runner-launch.ts`); a sandbox started without it is not checked. The layer's start script (`layer/start.sh`) refuses a layer whose `/runner/RELEASE` names another release, and warns about one that names none. Read by the start script only, not by the runner. |
|
|
182
|
+
| `MODE` | All | No | `local` | Execution location: `local` (host filesystem, local-path workspaces) or `cloud` (server-provisioned sandbox, git-only). Independent of `STIGMER_PROXY_ENDPOINT`. Also the default for the two guards below. |
|
|
183
|
+
| `STIGMER_WEB_FETCH_ALLOW_PRIVATE` | All (native `web_fetch`) | No | follows `MODE`: strict in `cloud`, relaxed in `local` | The `web_fetch` address guard's override. `true` lets the agent fetch loopback and private-network addresses on any runner (link-local, which holds the cloud metadata endpoint, stays refused); `false` refuses them on a local runner too. For embedders whose execution location and network differ; managed cloud deployments never set it. See `src/tools/url-guard.ts`. |
|
|
184
|
+
| `STIGMER_MCP_ALLOW_STDIO` | All | No | follows `MODE`: forbidden in `cloud`, allowed in `local` | The MCP transport guard's override. `true` lets a cloud runner start stdio MCP servers, which download a package and run it as a subprocess holding the execution's secrets; `false` forbids them on a local runner too. For rolling the policy back without a redeploy; managed cloud deployments never set it. See `src/shared/mcp-transport-guard.ts`. |
|
|
185
|
+
| `STIGMER_TASK_QUEUE` | Static mode | No | `stigmer_runner` | Temporal task queue the static Worker polls. (Legacy alias: `TEMPORAL_AGENT_EXECUTION_RUNNER_TASK_QUEUE`.) Unused in manager mode, where each Worker derives its own queue. |
|
|
186
|
+
| `TEMPORAL_SERVICE_ADDRESS` | All | No | _(discovered)_ | Address of the Temporal frontend. **Resolution order:** an explicit value always wins; otherwise, if `STIGMER_TOKEN` is set, the runner discovers it from the control plane at boot (`getRunnerBootstrapConfig`); otherwise it falls back to `localhost:7233`. Discovery failure aborts startup with an actionable error (no silent fallback). |
|
|
187
|
+
| `TEMPORAL_NAMESPACE` | All | No | `default` | Temporal namespace. |
|
|
188
|
+
| `STIGMER_TEMPORAL_API_KEY` | All | No | — | Temporal frontend API key (Temporal Cloud, or a frontend with an authorizer); implies TLS. Taken into the credential store at boot, so agent tools never see it. |
|
|
189
|
+
| `STIGMER_TEMPORAL_TLS` | All | No | — | `true` or `1`: TLS to the frontend against the system's trusted roots. A CA, a client certificate or an API key implies it. |
|
|
190
|
+
| `STIGMER_TEMPORAL_TLS_SERVER_NAME` | All | No | — | Host-name (SNI) override for the frontend's certificate. |
|
|
191
|
+
| `STIGMER_TEMPORAL_TLS_SERVER_CA_CERT_DATA` / `_PATH` | All | No | — | The frontend's CA, as PEM text or a file path (one form, not both). |
|
|
192
|
+
| `STIGMER_TEMPORAL_TLS_CLIENT_CERT_DATA` / `_PATH`, `STIGMER_TEMPORAL_TLS_CLIENT_KEY_DATA` / `_PATH` | All | No | — | Mutual TLS: the client certificate and its key, both or neither (half a pair stops the boot). The key's `_DATA` form is taken into the credential store; a `_PATH` key is a file the agent's tools can read, so prefer `_DATA`. These are Stigmer's own names: Temporal's `TEMPORAL_API_KEY` and `TEMPORAL_TLS_*` belong to the user's own Temporal work and are never read. |
|
|
193
|
+
| `STIGMER_BACKEND_ENDPOINT` | All | In cloud mode | `http://localhost:7234` (local) | Stigmer backend endpoint for status, blueprints, and local artifact serving. A bare `host:port` is normalized to `http://` (or `https://` for port `443`). |
|
|
194
|
+
| `STIGMER_TOKEN` | Cloud or proxy mode | Yes (cloud/proxy) | _(none)_ | Auth token for the Stigmer backend / proxy. Required when `MODE=cloud` or `STIGMER_PROXY_ENDPOINT` is set; optional in local/direct mode. |
|
|
195
|
+
| `CURSOR_API_KEY` | Direct mode | Yes (Cursor harness, direct) | _(empty)_ | Cursor API key for direct mode. In proxy mode it is not required: the proxy injects the organization's own Cursor key (saved in Settings → Provider keys), so the key never reaches the sandbox, and the SDK transport presents the current `STIGMER_TOKEN` (read per turn, so a rotated token is honoured). |
|
|
196
|
+
| `STIGMER_PROXY_ENDPOINT` | Proxy/cloud | No | _(none)_ | Stigmer proxy endpoint. When set, activates proxy transport: Cursor SDK traffic and artifact uploads are routed through the proxy. |
|
|
197
|
+
| `GIT_CONFIG_COUNT` | Git workspaces | No | _(none)_ | git's own per-command configuration, honoured as git honours it: a runner that sets it (a container's `safe.directory`, for one) keeps it, and the settings that hand a repository's token to a network git command are appended after it (`src/shared/workspace/git-credential.ts`), never in its place. |
|
|
198
|
+
| `WORKSPACE_ROOT_DIR` | All | No | `~/.stigmer/workspaces/runner` (fallback) | Root directory for agent workspaces. If unset, the runner warns and creates an isolated fallback directory — it never falls back to the process working directory. |
|
|
199
|
+
| `TEMPORAL_MAX_CONCURRENCY` | All | No | `5` | Maximum concurrent Temporal activity executions (per session Worker in manager mode). |
|
|
200
|
+
| `STIGMER_CHECKPOINTER_TYPE` | All | No | `sqlite` (local), `http` (cloud) | LangGraph checkpointer backend for the native harness's agent state: `sqlite` (a durable per-session file under the platform dir, so a paused or interrupted run resumes across invocations), `http` (the proxy-backed saver), or `memory` (ephemeral; test runs only — a paused run cannot resume on it). |
|
|
201
|
+
| `STIGMER_CHECKPOINTER_PROXY_ENDPOINT` | `http` checkpointer | No | value of `STIGMER_PROXY_ENDPOINT` | Endpoint for the HTTP checkpointer; falls back to the proxy endpoint. |
|
|
202
|
+
| `STIGMER_PRIMARY_MODEL` | All | No | `gpt-4.1` | Default LLM model identifier. |
|
|
203
|
+
| `STIGMER_CURSOR_CLOUD_MODE_ENABLED` | All | No | `false` | When `true`, enables Cursor cloud (workspace-less) execution mode for the Cursor harness. |
|
|
204
|
+
| `STIGMER_IDLE_TIMEOUT_SECONDS` | All | No | _(none)_ | **Reserved.** Parsed from the environment but not currently honored by the runtime — no component reads it today. Documented for completeness; setting it has no effect. |
|
|
205
|
+
|
|
206
|
+
### Artifact storage
|
|
207
|
+
|
|
208
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
209
|
+
|----------|-----------|----------|---------|---------|
|
|
210
|
+
| `ARTIFACT_STORAGE_TYPE` | All | No | `proxy` if `STIGMER_ARTIFACT_PROXY_ENDPOINT` or `STIGMER_PROXY_ENDPOINT` is set, else `local` | Selects the artifact backend: `local` (filesystem, served by the Stigmer backend), `proxy` (presigned URLs via the proxy), or `none` (storage deliberately disabled: artifact features are refused rather than stored). An explicit value always wins. Storage follows transport, not execution location (`src/shared/artifact-storage.ts`). |
|
|
211
|
+
| `STIGMER_ARTIFACT_PROXY_ENDPOINT` | Proxy storage | No | value of `STIGMER_PROXY_ENDPOINT` | Endpoint the proxy artifact store presigns against, when artifact traffic must reach a different host than LLM traffic (the checkpointer-override pattern). |
|
|
212
|
+
| `LOCAL_ARTIFACT_PATH` | Local storage | No | `~/.stigmer/data/artifacts` | Filesystem root of the local artifact store. **Must equal the stigmer-server's `ARTIFACT_LOCAL_BASE_PATH`** — in local mode the server writes an artifact to `<ARTIFACT_LOCAL_BASE_PATH>/<key>` and the runner reads it from `<LOCAL_ARTIFACT_PATH>/<key>`, so a mismatch makes every storage-key attachment and offload fail to resolve. The defaults align out of the box; the CLI local daemon sets both explicitly. |
|
|
213
|
+
|
|
214
|
+
### Payload encryption (Temporal history at rest)
|
|
215
|
+
|
|
216
|
+
The encryption codec encrypts every Temporal payload the runner produces (AES-256-GCM), so a run's fetched values never rest in workflow history or the Temporal UI. Payloads the runner did not encrypt (orchestrator inputs, signals, pre-rollout histories) pass through untouched. A key without its id — or a malformed key — fails the boot rather than silently running plaintext.
|
|
217
|
+
|
|
218
|
+
Keys come from two sources with strict precedence: the env vars below (the operator's explicit choice — self-hosted deployments and cloud sandboxes), or, when the env is silent, server-managed per-identity keys delivered by `getRunnerBootstrapConfig` (desktop-class runners on cloud; held in memory only, re-fetched each boot). See `src/encryption/config.ts`.
|
|
219
|
+
|
|
220
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
221
|
+
|----------|-----------|----------|---------|---------|
|
|
222
|
+
| `STIGMER_PAYLOAD_ENCRYPTION_KEY` | All | No | _(unset — encryption off)_ | Base64-encoded 32-byte AES-256 key. Setting it enables the codec. |
|
|
223
|
+
| `STIGMER_PAYLOAD_ENCRYPTION_KEY_ID` | Payload encryption | With the key | _(none)_ | Identifier stamped on every encrypted payload so rotation can tell keys apart. Required when the key is set. |
|
|
224
|
+
| `STIGMER_PAYLOAD_ENCRYPTION_SECONDARY_KEY` | Payload encryption | No | _(unset)_ | Decrypt-only key accepted during rotation windows (payloads written under the previous key stay readable). |
|
|
225
|
+
| `STIGMER_PAYLOAD_ENCRYPTION_SECONDARY_KEY_ID` | Payload encryption | With the secondary key | _(none)_ | Key id of the secondary key. |
|
|
226
|
+
|
|
227
|
+
### Claim-check (large Temporal payloads)
|
|
228
|
+
|
|
229
|
+
The claim-check codec offloads oversized Temporal payloads to artifact storage and passes a reference instead. When payload encryption is enabled, encryption runs first, so offloaded blobs are ciphertext.
|
|
230
|
+
|
|
231
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
232
|
+
|----------|-----------|----------|---------|---------|
|
|
233
|
+
| `CLAIMCHECK_ENABLED` | All | No | `false` | Enables the claim-check payload codec. When disabled, payloads pass through unchanged. |
|
|
234
|
+
| `CLAIMCHECK_THRESHOLD_BYTES` | Claim-check | No | `131072` (128 KB) | Payload size at or above which the codec offloads to artifact storage. |
|
|
235
|
+
| `CLAIMCHECK_COMPRESSION_ENABLED` | Claim-check | No | `true` | Compresses offloaded payloads. Only the literal value `false` disables it. |
|
|
236
|
+
| `CLAIMCHECK_KEY_PREFIX` | Claim-check | No | `claimcheck/` | Key prefix for offloaded payloads in artifact storage. |
|
|
237
|
+
|
|
238
|
+
### Credentials and providers
|
|
239
|
+
|
|
240
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
241
|
+
|----------|-----------|----------|---------|---------|
|
|
242
|
+
| `OPENAI_API_KEY` | Direct mode (native/OpenAI) | When using OpenAI directly | _(empty)_ | OpenAI API key for the native harness in direct mode. Not needed in proxy mode. |
|
|
243
|
+
| `ANTHROPIC_API_KEY` | Direct mode (native/Anthropic) | When using Anthropic directly | _(empty)_ | Anthropic API key for the native harness in direct mode. Not needed in proxy mode. |
|
|
244
|
+
| `ANTHROPIC_BASE_URL` | Direct mode (native/Anthropic, `public` backend) | No | _(empty: api.anthropic.com)_ | The address of an LLM gateway in front of Anthropic (the API root, without `/v1`). A value that is not an http(s) URL stops the runner at startup; ignored, with a warning, under the proxy or a non-`public` backend. |
|
|
245
|
+
| `STIGMER_LLM_REQUEST_TIMEOUT_MS` | Native harness | No | `0` (no timeout) | Per-request timeout for native LLM calls, in milliseconds. `0` or unset means no explicit timeout. |
|
|
246
|
+
| `STIGMER_CLOUD_API_URL` | All | No | _(unset)_ | Explicit override for the origin serving `/v1/proxy/model-registry` (model resolution and pricing). When unset, fetches go to `STIGMER_PROXY_ENDPOINT` (proxy mode) or `STIGMER_BACKEND_ENDPOINT` (direct/local mode — the local stigmer-server serves the registry). |
|
|
247
|
+
| `STIGMER_AUTH_TOKEN` | Pricing/registry fetch | No | value of `STIGMER_TOKEN` | Fallback bearer token for model-pricing and model-registry requests when `STIGMER_TOKEN` is not set. |
|
|
248
|
+
| `GITHUB_TOKEN` | Deep-agent git writeback | When writing back to GitHub | _(none)_ | Token used by the deep-agent harness for git writeback operations. |
|
|
249
|
+
| `STIGMER_RUNNER_HITL_SECRET` | All | No | _(a random secret per process)_ | Master secret the per-execution approval fingerprint keys derive from (`src/shared/fingerprint-secret.ts`). Set it to keep a pending approval valid across runner restarts and replicas; without it a restart re-keys, so a pending approval is asked again (never silently accepted). Taken into the credential store at boot, so agent tools never see it. |
|
|
250
|
+
|
|
251
|
+
### Model backends
|
|
252
|
+
|
|
253
|
+
Where the native harness's models are served when the runner talks to providers directly. Under `STIGMER_PROXY_ENDPOINT` the proxy owns provider routing, and the runner warns that a non-`public` backend is ignored. The [model backends guide](https://stigmer.ai/docs/guides/runners/model-backends) is the one explanation of each backend, its credentials and its errors; the rows below index what the runner reads.
|
|
254
|
+
|
|
255
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
256
|
+
|----------|-----------|----------|---------|---------|
|
|
257
|
+
| `STIGMER_ANTHROPIC_BACKEND` | Anthropic models | No | `public` | Where Anthropic models are served: `public` (Anthropic's API), `vertex`, `bedrock` or `foundry`. An unknown value stops the runner at startup. |
|
|
258
|
+
| `OPENAI_BASE_URL` | OpenAI models | No | `https://api.openai.com/v1` | The OpenAI SDK's own variable: an OpenAI-compatible endpoint, including its `/v1`. |
|
|
259
|
+
| `CLOUD_ML_REGION` | `vertex` | Yes (vertex) | _(none)_ | The Vertex AI region, or `global`. Credentials come from Application Default Credentials. |
|
|
260
|
+
| `ANTHROPIC_VERTEX_PROJECT_ID` | `vertex` | No | _(the credentials' project)_ | The Google Cloud project the Vertex calls are billed to. |
|
|
261
|
+
| `ANTHROPIC_VERTEX_BASE_URL` | `vertex` | No | _(the region's endpoint)_ | A Vertex endpoint instead of the one the region names. |
|
|
262
|
+
| `AWS_REGION` | `bedrock` | Yes (bedrock) | _(none)_ | The Bedrock region; the runner never assumes one. |
|
|
263
|
+
| `ANTHROPIC_BEDROCK_BASE_URL` | `bedrock` | No | `https://bedrock-runtime.<region>.amazonaws.com` | A Bedrock runtime endpoint instead of the region's. |
|
|
264
|
+
| `AWS_BEARER_TOKEN_BEDROCK` | `bedrock` | No | _(the AWS credential chain)_ | A Bedrock API key, instead of the AWS chain (environment keys, IAM role / IRSA). Taken into the credential store at boot. |
|
|
265
|
+
| `STIGMER_BEDROCK_INFERENCE_PREFIX` | `bedrock` | No | _(none)_ | The inference-profile geography (`us`, `eu`, `global`, …) for models Bedrock serves only through a profile. |
|
|
266
|
+
| `STIGMER_BEDROCK_MODEL_MAP` | `bedrock` | No | _(none)_ | Overrides, `canonical=bedrockId` pairs separated by commas; consulted before the built-in mapping. A malformed value stops the runner at startup. |
|
|
267
|
+
| `ANTHROPIC_FOUNDRY_RESOURCE` | `foundry` | One of the two | _(none)_ | The Microsoft Foundry resource name. |
|
|
268
|
+
| `ANTHROPIC_FOUNDRY_BASE_URL` | `foundry` | One of the two | _(none)_ | A full Foundry endpoint, instead of the resource name. |
|
|
269
|
+
| `ANTHROPIC_FOUNDRY_API_KEY` | `foundry` | No | _(a Microsoft Entra ID token)_ | A Foundry API key, instead of the runner's Azure identity. Taken into the credential store at boot. |
|
|
270
|
+
| `STIGMER_FOUNDRY_DEPLOYMENT_MAP` | `foundry` | No | _(none)_ | Custom deployment names, `canonical=deployment` pairs separated by commas. A malformed value stops the runner at startup. |
|
|
271
|
+
|
|
272
|
+
### Observability
|
|
273
|
+
|
|
274
|
+
| Variable | Applies to | Required | Default | Purpose |
|
|
275
|
+
|----------|-----------|----------|---------|---------|
|
|
276
|
+
| `OTEL_EXPORTER_OTLP_ENDPOINT` | All | No | _(none)_ | OTLP endpoint for traces and metrics (or the per-signal `..._TRACES_ENDPOINT`, `..._METRICS_ENDPOINT`). When unset, OpenTelemetry is disabled with zero overhead. See [traces](#traces-every-run-as-opentelemetry-genai-spans) and [the embedder note](#a-note-for-embedders-opentelemetry) on who initializes OTel. |
|
|
277
|
+
| `OTEL_EXPORTER_OTLP_PROTOCOL` | All | No | `http/protobuf` | `grpc`, `http/protobuf` or `http/json` (and the per-signal forms). Any other value refuses the runner's start. Before 2026-10 the runner spoke gRPC only: a gRPC collector port needs `grpc` set. |
|
|
278
|
+
| `OTEL_EXPORTER_OTLP_HEADERS` | All | No | _(none)_ | The collector's login, `key=value` pairs comma-separated (and the per-signal `..._TRACES_HEADERS`, `..._METRICS_HEADERS`). A runner secret: taken into custody at boot, never in an agent's environment; a sandboxed runner receives it on `STIGMER_SANDBOX_RUNNER_SECRETS`. |
|
|
279
|
+
| `OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT` | All | No | _(off)_ | `true` (or `span_only`, `span_and_event`) puts the conversation's text on the spans, within the saved conversation's rules. |
|
|
280
|
+
| `OTEL_SDK_DISABLED` | All | No | _(unset)_ | `true` turns every exporter off, whatever else is set. |
|
|
281
|
+
| `OTEL_BSP_MAX_EXPORT_BATCH_SIZE` | All | No | 512, or 32 with content on | Spans per export. With content on a span carries up to 64 KiB, so the default drops to 32 to keep a batch under a gRPC collector's 4 MiB; a value set here wins. |
|
|
282
|
+
|
|
283
|
+
### Advanced and debug
|
|
284
|
+
|
|
285
|
+
These tune internal behavior or support testing. Most operators never set them.
|
|
286
|
+
|
|
287
|
+
| Variable | Default | Purpose |
|
|
288
|
+
|----------|---------|---------|
|
|
289
|
+
| `STREAMING_MIN_INTERVAL_MS` | `500` | Minimum time between streaming status updates (rate limit). |
|
|
290
|
+
| `STREAMING_MAX_INTERVAL_MS` | `5000` | Maximum time before a forced keepalive status update. Clamped up to the min if set lower. |
|
|
291
|
+
| `STREAMING_BURST_THRESHOLD` | `50` | Event count that triggers an immediate status update (burst protection). |
|
|
292
|
+
| `STIGMER_PROGRESS_CAPTURE_MIN_INTERVAL_MS` | `2000` | Minimum time between two mid-run captures of the "N files changed so far" strip. Each capture stages the working tree with git (git workspaces) or reads the touched files (other workspaces), so this bounds that cost however often status is written. Read once at startup; a non-numeric or negative value keeps the default, and `0` captures on every status write. |
|
|
293
|
+
| `CURSOR_STREAM_STALL_TIMEOUT_MS` | `180000` (3 min) | **Parsed but not yet honoured** ([#1731](https://github.com/stigmer/stigmer/issues/1731)): `loadConfig` reads it, but no boot path passes it to the runner, so the default always applies to `stigmer-runner`. The bound it names: how long an engine may report no activity before the run is cancelled and the execution fails with a stall error, for every harness (the name is the Cursor harness's, its first user). Embedders set it through the `cursorStreamStallTimeoutMs` option. |
|
|
294
|
+
| `CURSOR_AGENT_RESOLVE_TIMEOUT_MS` | `120000` (2 min) | **Parsed but not yet honoured**, as above; embedders use the `agentResolveTimeoutMs` option. The bound it names: the Cursor SDK's agent create or resume, which has no timeout of its own; on expiry the execution fails with a transport diagnosis instead of hanging until Temporal's heartbeat timeout. |
|
|
295
|
+
| `STIGMER_CURSOR_AGENT_CACHE_TTL_MS` | `1800000` (30 min) | How long an idle Cursor agent stays parked between turns, holding its MCP subprocesses, before it is closed. A non-positive or non-numeric value keeps the default. |
|
|
296
|
+
| `WORKSPACE_LOCK_TIMEOUT_MS` | `900000` (15 min) | **Parsed but not yet honoured**, as above; embedders use the `workspaceLockTimeoutMs` option. The bound it names: how long a turn waits for another session's lock on the same workspace before the execution fails with "workspace is in use by another session" (`src/shared/workspace/workspace-lock.ts`). |
|
|
297
|
+
| `STIGMER_MCP_BRIDGE_ENDPOINT` | _(none)_ | The MCP bridge the runner's own attachments (channel messaging, conversation participation) connect to, as `https://…`. Unset selects the local shape: a spawned `stigmer mcp-server` stdio child against the local backend. |
|
|
298
|
+
| `STIGMER_WORKFLOW_BUNDLE` | _(discovered)_ | An explicit path to the pre-built Temporal workflow bundle, for tests and for embedders that stage it elsewhere (`src/workflow-source.ts`). A path that does not exist stops the boot. |
|
|
299
|
+
| `SKIP_MCP_CONNECT_BACKFILL` | `false` | When `true`, skips MCP Connect backfill. |
|
|
300
|
+
| `STIGMER_MCP_PUBLIC_ENDPOINT` | _(none)_ | The server's public endpoint. A server that provisions this runner's sandbox sets it from its own configuration (`STIGMER_SANDBOX_MCP_PUBLIC_ENDPOINT`). Fills `STIGMER_SERVER_ADDRESS` (as `host:port`) for MCP servers that declare it and carry no value; without it, only stdio servers are filled, from `STIGMER_BACKEND_ENDPOINT`. A value already present is never overridden. |
|
|
301
|
+
| `CURSOR_EVENT_RECORD_DIR` | _(none)_ | Directory to record Cursor harness events (debugging/fixtures). |
|
|
302
|
+
| `V3_EVENT_RECORD_DIR` | _(none)_ | Directory to record deep-agent harness events (debugging/fixtures). |
|
|
303
|
+
|
|
304
|
+
## Related documentation
|
|
305
|
+
|
|
306
|
+
- **[Manager-mode IPC protocol](https://stigmer.ai/docs/guides/runners/ipc-protocol)** — the line-delimited JSON command/response contract and its versioned handshake (current protocol version `1`). A short pointer also lives at [`docs/ipc-protocol.md`](docs/ipc-protocol.md); the code definition is [`src/ipc-protocol.ts`](src/ipc-protocol.ts).
|
|
307
|
+
- **[Embedding integration guide](https://stigmer.ai/docs/guides/runners/embedding)** — building a desktop client (local execution) and a web client (cloud execution), including the per-audience configuration each one passes.
|
|
308
|
+
- **SDK `RunnerAdapter` and `executionTarget`** — the local-execution surfaces in `@stigmer/react-sdk` and `@stigmer/client`. The [embedding guide](https://stigmer.ai/docs/guides/runners/embedding) covers them today; a dedicated SDK reference is forthcoming.
|
|
309
|
+
- **Public API** — `src/index.ts` exports `createStigmerRunner` and `createStigmerRunnerManager` with typed options and inline examples.
|
|
310
|
+
- **[Adding a harness](src/harness/README.md)** — the turn runtime, the adapter contract, the contract kit, and the checklist of files inside and outside the runner a new harness touches.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"hash":"ff7b79668fb753e1","builtAt":"2026-10-17T02:08:19.910Z","fileCount":363}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The contract's hooks as real commands, shared by every substrate so both
|
|
3
|
+
* engines run the very same hooks: each logs what it reads on stdin, then
|
|
4
|
+
* answers as its behaviour says, in its format (Claude Code's JSON, or
|
|
5
|
+
* Cursor's `permission`), grouped into the turn's sources one per plugin
|
|
6
|
+
* and format.
|
|
7
|
+
*/
|
|
8
|
+
import type { HookSourceGroups } from "../../shared/hooks/hook-set.js";
|
|
9
|
+
import type { ContractHook, ContractHookBehaviour, ProposedAction } from "./types.js";
|
|
10
|
+
/** One word of a bash command, quoted. */
|
|
11
|
+
export declare function shellWord(value: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* The bash command a contract hook runs: log its stdin, then answer as `does`
|
|
14
|
+
* says, in the hook's format (Claude Code's JSON, or Cursor's `permission`).
|
|
15
|
+
* Shared with the Cursor substrate, so both engines run the very same hooks.
|
|
16
|
+
*/
|
|
17
|
+
export declare function contractHookCommand(does: ContractHookBehaviour, files: {
|
|
18
|
+
runs: string;
|
|
19
|
+
state: string;
|
|
20
|
+
}, format: "claude-code" | "cursor", rewriteInput: (action: ProposedAction) => Record<string, unknown>): string;
|
|
21
|
+
/** The contract's hooks as the turn's sources: one per plugin and format, in first-seen order. */
|
|
22
|
+
export declare function contractHookSources(hooks: readonly ContractHook[], files: {
|
|
23
|
+
runs: string;
|
|
24
|
+
state: string;
|
|
25
|
+
}, pluginRoot: string, rewriteInput: (action: ProposedAction) => Record<string, unknown>): HookSourceGroups[];
|