@sema-ai/core 1.275.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5433 -0
- package/LICENSE +27 -0
- package/NOTICE.md +30 -0
- package/README.md +1040 -0
- package/dist/agents/agent-definition.d.ts +10 -0
- package/dist/agents/agent-definition.d.ts.map +1 -0
- package/dist/agents/agent-definition.js +18 -0
- package/dist/agents/agent-definition.js.map +1 -0
- package/dist/agents/builtin-agents.d.ts +69 -0
- package/dist/agents/builtin-agents.d.ts.map +1 -0
- package/dist/agents/builtin-agents.js +177 -0
- package/dist/agents/builtin-agents.js.map +1 -0
- package/dist/agents/cascade.d.ts +101 -0
- package/dist/agents/cascade.d.ts.map +1 -0
- package/dist/agents/cascade.js +189 -0
- package/dist/agents/cascade.js.map +1 -0
- package/dist/agents/observer.d.ts +209 -0
- package/dist/agents/observer.d.ts.map +1 -0
- package/dist/agents/observer.js +495 -0
- package/dist/agents/observer.js.map +1 -0
- package/dist/agents/repair-loop.d.ts +236 -0
- package/dist/agents/repair-loop.d.ts.map +1 -0
- package/dist/agents/repair-loop.js +293 -0
- package/dist/agents/repair-loop.js.map +1 -0
- package/dist/agents/session-util.d.ts +8 -0
- package/dist/agents/session-util.d.ts.map +1 -0
- package/dist/agents/session-util.js +9 -0
- package/dist/agents/session-util.js.map +1 -0
- package/dist/agents/subagent-steps.d.ts +93 -0
- package/dist/agents/subagent-steps.d.ts.map +1 -0
- package/dist/agents/subagent-steps.js +206 -0
- package/dist/agents/subagent-steps.js.map +1 -0
- package/dist/agents/subagent.d.ts +441 -0
- package/dist/agents/subagent.d.ts.map +1 -0
- package/dist/agents/subagent.js +2492 -0
- package/dist/agents/subagent.js.map +1 -0
- package/dist/agents/suspend-guard.d.ts +35 -0
- package/dist/agents/suspend-guard.d.ts.map +1 -0
- package/dist/agents/suspend-guard.js +48 -0
- package/dist/agents/suspend-guard.js.map +1 -0
- package/dist/agents/teacher.d.ts +137 -0
- package/dist/agents/teacher.d.ts.map +1 -0
- package/dist/agents/teacher.js +575 -0
- package/dist/agents/teacher.js.map +1 -0
- package/dist/agents/team.d.ts +211 -0
- package/dist/agents/team.d.ts.map +1 -0
- package/dist/agents/team.js +293 -0
- package/dist/agents/team.js.map +1 -0
- package/dist/agents/tool-filter.d.ts +29 -0
- package/dist/agents/tool-filter.d.ts.map +1 -0
- package/dist/agents/tool-filter.js +50 -0
- package/dist/agents/tool-filter.js.map +1 -0
- package/dist/agents/verify.d.ts +177 -0
- package/dist/agents/verify.d.ts.map +1 -0
- package/dist/agents/verify.js +305 -0
- package/dist/agents/verify.js.map +1 -0
- package/dist/bench/metrics.d.ts +714 -0
- package/dist/bench/metrics.d.ts.map +1 -0
- package/dist/bench/metrics.js +618 -0
- package/dist/bench/metrics.js.map +1 -0
- package/dist/bin/sema-tb.d.ts +3 -0
- package/dist/bin/sema-tb.d.ts.map +1 -0
- package/dist/bin/sema-tb.js +516 -0
- package/dist/bin/sema-tb.js.map +1 -0
- package/dist/bin/tb-env.d.ts +13 -0
- package/dist/bin/tb-env.d.ts.map +1 -0
- package/dist/bin/tb-env.js +26 -0
- package/dist/bin/tb-env.js.map +1 -0
- package/dist/brain/anthropic.d.ts +46 -0
- package/dist/brain/anthropic.d.ts.map +1 -0
- package/dist/brain/anthropic.js +830 -0
- package/dist/brain/anthropic.js.map +1 -0
- package/dist/brain/circuit-breaker.d.ts +46 -0
- package/dist/brain/circuit-breaker.d.ts.map +1 -0
- package/dist/brain/circuit-breaker.js +173 -0
- package/dist/brain/circuit-breaker.js.map +1 -0
- package/dist/brain/degrading.d.ts +98 -0
- package/dist/brain/degrading.d.ts.map +1 -0
- package/dist/brain/degrading.js +249 -0
- package/dist/brain/degrading.js.map +1 -0
- package/dist/brain/errors.d.ts +31 -0
- package/dist/brain/errors.d.ts.map +1 -0
- package/dist/brain/errors.js +58 -0
- package/dist/brain/errors.js.map +1 -0
- package/dist/brain/failover.d.ts +18 -0
- package/dist/brain/failover.d.ts.map +1 -0
- package/dist/brain/failover.js +118 -0
- package/dist/brain/failover.js.map +1 -0
- package/dist/brain/model-presets.d.ts +36 -0
- package/dist/brain/model-presets.d.ts.map +1 -0
- package/dist/brain/model-presets.js +54 -0
- package/dist/brain/model-presets.js.map +1 -0
- package/dist/brain/openai.d.ts +43 -0
- package/dist/brain/openai.d.ts.map +1 -0
- package/dist/brain/openai.js +784 -0
- package/dist/brain/openai.js.map +1 -0
- package/dist/brain/reasoning.d.ts +138 -0
- package/dist/brain/reasoning.d.ts.map +1 -0
- package/dist/brain/reasoning.js +146 -0
- package/dist/brain/reasoning.js.map +1 -0
- package/dist/brain/repetition.d.ts +60 -0
- package/dist/brain/repetition.d.ts.map +1 -0
- package/dist/brain/repetition.js +121 -0
- package/dist/brain/repetition.js.map +1 -0
- package/dist/brain/request-params.d.ts +29 -0
- package/dist/brain/request-params.d.ts.map +1 -0
- package/dist/brain/request-params.js +78 -0
- package/dist/brain/request-params.js.map +1 -0
- package/dist/brain/retry.d.ts +18 -0
- package/dist/brain/retry.d.ts.map +1 -0
- package/dist/brain/retry.js +42 -0
- package/dist/brain/retry.js.map +1 -0
- package/dist/brain/routing.d.ts +19 -0
- package/dist/brain/routing.d.ts.map +1 -0
- package/dist/brain/routing.js +44 -0
- package/dist/brain/routing.js.map +1 -0
- package/dist/brain/status-sink.d.ts +46 -0
- package/dist/brain/status-sink.d.ts.map +1 -0
- package/dist/brain/status-sink.js +36 -0
- package/dist/brain/status-sink.js.map +1 -0
- package/dist/brain/stream-engine.d.ts +85 -0
- package/dist/brain/stream-engine.d.ts.map +1 -0
- package/dist/brain/stream-engine.js +391 -0
- package/dist/brain/stream-engine.js.map +1 -0
- package/dist/brain/timeout.d.ts +44 -0
- package/dist/brain/timeout.d.ts.map +1 -0
- package/dist/brain/timeout.js +41 -0
- package/dist/brain/timeout.js.map +1 -0
- package/dist/brain/tool-call-repair.d.ts +15 -0
- package/dist/brain/tool-call-repair.d.ts.map +1 -0
- package/dist/brain/tool-call-repair.js +67 -0
- package/dist/brain/tool-call-repair.js.map +1 -0
- package/dist/brain/walltime.d.ts +14 -0
- package/dist/brain/walltime.d.ts.map +1 -0
- package/dist/brain/walltime.js +14 -0
- package/dist/brain/walltime.js.map +1 -0
- package/dist/core/arg-summary.d.ts +19 -0
- package/dist/core/arg-summary.d.ts.map +1 -0
- package/dist/core/arg-summary.js +96 -0
- package/dist/core/arg-summary.js.map +1 -0
- package/dist/core/ask-question.d.ts +113 -0
- package/dist/core/ask-question.d.ts.map +1 -0
- package/dist/core/ask-question.js +246 -0
- package/dist/core/ask-question.js.map +1 -0
- package/dist/core/auto-compaction.d.ts +341 -0
- package/dist/core/auto-compaction.d.ts.map +1 -0
- package/dist/core/auto-compaction.js +495 -0
- package/dist/core/auto-compaction.js.map +1 -0
- package/dist/core/auto-promote.d.ts +126 -0
- package/dist/core/auto-promote.d.ts.map +1 -0
- package/dist/core/auto-promote.js +171 -0
- package/dist/core/auto-promote.js.map +1 -0
- package/dist/core/background-shell.d.ts +128 -0
- package/dist/core/background-shell.d.ts.map +1 -0
- package/dist/core/background-shell.js +42 -0
- package/dist/core/background-shell.js.map +1 -0
- package/dist/core/cache-break-detector.d.ts +63 -0
- package/dist/core/cache-break-detector.d.ts.map +1 -0
- package/dist/core/cache-break-detector.js +0 -0
- package/dist/core/cache-break-detector.js.map +1 -0
- package/dist/core/canonical-json.d.ts +45 -0
- package/dist/core/canonical-json.d.ts.map +1 -0
- package/dist/core/canonical-json.js +132 -0
- package/dist/core/canonical-json.js.map +1 -0
- package/dist/core/checkpoint-store.d.ts +1101 -0
- package/dist/core/checkpoint-store.d.ts.map +1 -0
- package/dist/core/checkpoint-store.js +514 -0
- package/dist/core/checkpoint-store.js.map +1 -0
- package/dist/core/consolidate-scope.d.ts +94 -0
- package/dist/core/consolidate-scope.d.ts.map +1 -0
- package/dist/core/consolidate-scope.js +158 -0
- package/dist/core/consolidate-scope.js.map +1 -0
- package/dist/core/context-edit.d.ts +82 -0
- package/dist/core/context-edit.d.ts.map +1 -0
- package/dist/core/context-edit.js +149 -0
- package/dist/core/context-edit.js.map +1 -0
- package/dist/core/context-guard.d.ts +43 -0
- package/dist/core/context-guard.d.ts.map +1 -0
- package/dist/core/context-guard.js +171 -0
- package/dist/core/context-guard.js.map +1 -0
- package/dist/core/dynamic-recall.d.ts +100 -0
- package/dist/core/dynamic-recall.d.ts.map +1 -0
- package/dist/core/dynamic-recall.js +108 -0
- package/dist/core/dynamic-recall.js.map +1 -0
- package/dist/core/exec-gate.d.ts +74 -0
- package/dist/core/exec-gate.d.ts.map +1 -0
- package/dist/core/exec-gate.js +143 -0
- package/dist/core/exec-gate.js.map +1 -0
- package/dist/core/exec-output-tail.d.ts +37 -0
- package/dist/core/exec-output-tail.d.ts.map +1 -0
- package/dist/core/exec-output-tail.js +63 -0
- package/dist/core/exec-output-tail.js.map +1 -0
- package/dist/core/file-snapshot-store.d.ts +137 -0
- package/dist/core/file-snapshot-store.d.ts.map +1 -0
- package/dist/core/file-snapshot-store.js +319 -0
- package/dist/core/file-snapshot-store.js.map +1 -0
- package/dist/core/git-worktree-env.d.ts +41 -0
- package/dist/core/git-worktree-env.d.ts.map +1 -0
- package/dist/core/git-worktree-env.js +64 -0
- package/dist/core/git-worktree-env.js.map +1 -0
- package/dist/core/hooks.d.ts +372 -0
- package/dist/core/hooks.d.ts.map +1 -0
- package/dist/core/hooks.js +269 -0
- package/dist/core/hooks.js.map +1 -0
- package/dist/core/lsp-diagnostics.d.ts +74 -0
- package/dist/core/lsp-diagnostics.d.ts.map +1 -0
- package/dist/core/lsp-diagnostics.js +125 -0
- package/dist/core/lsp-diagnostics.js.map +1 -0
- package/dist/core/lsp-protocol.d.ts +28 -0
- package/dist/core/lsp-protocol.d.ts.map +1 -0
- package/dist/core/lsp-protocol.js +179 -0
- package/dist/core/lsp-protocol.js.map +1 -0
- package/dist/core/lsp-session.d.ts +56 -0
- package/dist/core/lsp-session.d.ts.map +1 -0
- package/dist/core/lsp-session.js +185 -0
- package/dist/core/lsp-session.js.map +1 -0
- package/dist/core/lsp.d.ts +132 -0
- package/dist/core/lsp.d.ts.map +1 -0
- package/dist/core/lsp.js +147 -0
- package/dist/core/lsp.js.map +1 -0
- package/dist/core/mcp.d.ts +294 -0
- package/dist/core/mcp.d.ts.map +1 -0
- package/dist/core/mcp.js +992 -0
- package/dist/core/mcp.js.map +1 -0
- package/dist/core/media-byte-cap.d.ts +34 -0
- package/dist/core/media-byte-cap.d.ts.map +1 -0
- package/dist/core/media-byte-cap.js +76 -0
- package/dist/core/media-byte-cap.js.map +1 -0
- package/dist/core/memory-engine/data-plane.d.ts +103 -0
- package/dist/core/memory-engine/data-plane.d.ts.map +1 -0
- package/dist/core/memory-engine/data-plane.js +272 -0
- package/dist/core/memory-engine/data-plane.js.map +1 -0
- package/dist/core/memory-engine/dual-root.d.ts +40 -0
- package/dist/core/memory-engine/dual-root.d.ts.map +1 -0
- package/dist/core/memory-engine/dual-root.js +95 -0
- package/dist/core/memory-engine/dual-root.js.map +1 -0
- package/dist/core/memory-engine/engine.d.ts +161 -0
- package/dist/core/memory-engine/engine.d.ts.map +1 -0
- package/dist/core/memory-engine/engine.js +1110 -0
- package/dist/core/memory-engine/engine.js.map +1 -0
- package/dist/core/memory-engine/file-backend.d.ts +162 -0
- package/dist/core/memory-engine/file-backend.d.ts.map +1 -0
- package/dist/core/memory-engine/file-backend.js +948 -0
- package/dist/core/memory-engine/file-backend.js.map +1 -0
- package/dist/core/memory-engine/frontmatter.d.ts +24 -0
- package/dist/core/memory-engine/frontmatter.d.ts.map +1 -0
- package/dist/core/memory-engine/frontmatter.js +135 -0
- package/dist/core/memory-engine/frontmatter.js.map +1 -0
- package/dist/core/memory-engine/index.d.ts +13 -0
- package/dist/core/memory-engine/index.d.ts.map +1 -0
- package/dist/core/memory-engine/index.js +28 -0
- package/dist/core/memory-engine/index.js.map +1 -0
- package/dist/core/memory-engine/layout.d.ts +123 -0
- package/dist/core/memory-engine/layout.d.ts.map +1 -0
- package/dist/core/memory-engine/layout.js +643 -0
- package/dist/core/memory-engine/layout.js.map +1 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts +22 -0
- package/dist/core/memory-engine/memory-backend-contract.d.ts.map +1 -0
- package/dist/core/memory-engine/memory-backend-contract.js +271 -0
- package/dist/core/memory-engine/memory-backend-contract.js.map +1 -0
- package/dist/core/memory-engine/migrate.d.ts +17 -0
- package/dist/core/memory-engine/migrate.d.ts.map +1 -0
- package/dist/core/memory-engine/migrate.js +35 -0
- package/dist/core/memory-engine/migrate.js.map +1 -0
- package/dist/core/memory-engine/scan.d.ts +20 -0
- package/dist/core/memory-engine/scan.d.ts.map +1 -0
- package/dist/core/memory-engine/scan.js +84 -0
- package/dist/core/memory-engine/scan.js.map +1 -0
- package/dist/core/memory-engine/scope-contract.d.ts +104 -0
- package/dist/core/memory-engine/scope-contract.d.ts.map +1 -0
- package/dist/core/memory-engine/scope-contract.js +288 -0
- package/dist/core/memory-engine/scope-contract.js.map +1 -0
- package/dist/core/memory-engine/sync-client.d.ts +100 -0
- package/dist/core/memory-engine/sync-client.d.ts.map +1 -0
- package/dist/core/memory-engine/sync-client.js +328 -0
- package/dist/core/memory-engine/sync-client.js.map +1 -0
- package/dist/core/memory-engine/sync.d.ts +97 -0
- package/dist/core/memory-engine/sync.d.ts.map +1 -0
- package/dist/core/memory-engine/sync.js +91 -0
- package/dist/core/memory-engine/sync.js.map +1 -0
- package/dist/core/memory-engine/types.d.ts +279 -0
- package/dist/core/memory-engine/types.d.ts.map +1 -0
- package/dist/core/memory-engine/types.js +9 -0
- package/dist/core/memory-engine/types.js.map +1 -0
- package/dist/core/memory-recall.d.ts +261 -0
- package/dist/core/memory-recall.d.ts.map +1 -0
- package/dist/core/memory-recall.js +600 -0
- package/dist/core/memory-recall.js.map +1 -0
- package/dist/core/memory-vector.d.ts +24 -0
- package/dist/core/memory-vector.d.ts.map +1 -0
- package/dist/core/memory-vector.js +51 -0
- package/dist/core/memory-vector.js.map +1 -0
- package/dist/core/memory.d.ts +502 -0
- package/dist/core/memory.d.ts.map +1 -0
- package/dist/core/memory.js +881 -0
- package/dist/core/memory.js.map +1 -0
- package/dist/core/message-utils.d.ts +7 -0
- package/dist/core/message-utils.d.ts.map +1 -0
- package/dist/core/message-utils.js +10 -0
- package/dist/core/message-utils.js.map +1 -0
- package/dist/core/oracle-isolation.d.ts +85 -0
- package/dist/core/oracle-isolation.d.ts.map +1 -0
- package/dist/core/oracle-isolation.js +121 -0
- package/dist/core/oracle-isolation.js.map +1 -0
- package/dist/core/permission-rules.d.ts +102 -0
- package/dist/core/permission-rules.d.ts.map +1 -0
- package/dist/core/permission-rules.js +357 -0
- package/dist/core/permission-rules.js.map +1 -0
- package/dist/core/present-plan-tool.d.ts +28 -0
- package/dist/core/present-plan-tool.d.ts.map +1 -0
- package/dist/core/present-plan-tool.js +119 -0
- package/dist/core/present-plan-tool.js.map +1 -0
- package/dist/core/pricing.d.ts +48 -0
- package/dist/core/pricing.d.ts.map +1 -0
- package/dist/core/pricing.js +46 -0
- package/dist/core/pricing.js.map +1 -0
- package/dist/core/property-harness.d.ts +126 -0
- package/dist/core/property-harness.d.ts.map +1 -0
- package/dist/core/property-harness.js +192 -0
- package/dist/core/property-harness.js.map +1 -0
- package/dist/core/push-queue.d.ts +10 -0
- package/dist/core/push-queue.d.ts.map +1 -0
- package/dist/core/push-queue.js +42 -0
- package/dist/core/push-queue.js.map +1 -0
- package/dist/core/remote-env.d.ts +432 -0
- package/dist/core/remote-env.d.ts.map +1 -0
- package/dist/core/remote-env.js +77 -0
- package/dist/core/remote-env.js.map +1 -0
- package/dist/core/roles.d.ts +74 -0
- package/dist/core/roles.d.ts.map +1 -0
- package/dist/core/roles.js +272 -0
- package/dist/core/roles.js.map +1 -0
- package/dist/core/runner/active-skill-scope.d.ts +64 -0
- package/dist/core/runner/active-skill-scope.d.ts.map +1 -0
- package/dist/core/runner/active-skill-scope.js +197 -0
- package/dist/core/runner/active-skill-scope.js.map +1 -0
- package/dist/core/runner/assemble-result.d.ts +191 -0
- package/dist/core/runner/assemble-result.d.ts.map +1 -0
- package/dist/core/runner/assemble-result.js +250 -0
- package/dist/core/runner/assemble-result.js.map +1 -0
- package/dist/core/runner/call-cap.d.ts +130 -0
- package/dist/core/runner/call-cap.d.ts.map +1 -0
- package/dist/core/runner/call-cap.js +151 -0
- package/dist/core/runner/call-cap.js.map +1 -0
- package/dist/core/runner/grounding-signal.d.ts +12 -0
- package/dist/core/runner/grounding-signal.d.ts.map +1 -0
- package/dist/core/runner/grounding-signal.js +94 -0
- package/dist/core/runner/grounding-signal.js.map +1 -0
- package/dist/core/runner/image.d.ts +23 -0
- package/dist/core/runner/image.d.ts.map +1 -0
- package/dist/core/runner/image.js +151 -0
- package/dist/core/runner/image.js.map +1 -0
- package/dist/core/runner/memory-consolidation.d.ts +112 -0
- package/dist/core/runner/memory-consolidation.d.ts.map +1 -0
- package/dist/core/runner/memory-consolidation.js +372 -0
- package/dist/core/runner/memory-consolidation.js.map +1 -0
- package/dist/core/runner/prepare-task.d.ts +583 -0
- package/dist/core/runner/prepare-task.d.ts.map +1 -0
- package/dist/core/runner/prepare-task.js +3612 -0
- package/dist/core/runner/prepare-task.js.map +1 -0
- package/dist/core/runner/prompt-suggestions.d.ts +33 -0
- package/dist/core/runner/prompt-suggestions.d.ts.map +1 -0
- package/dist/core/runner/prompt-suggestions.js +116 -0
- package/dist/core/runner/prompt-suggestions.js.map +1 -0
- package/dist/core/runner/runtask.d.ts +274 -0
- package/dist/core/runner/runtask.d.ts.map +1 -0
- package/dist/core/runner/runtask.js +4606 -0
- package/dist/core/runner/runtask.js.map +1 -0
- package/dist/core/runner/session-rule-policy.d.ts +28 -0
- package/dist/core/runner/session-rule-policy.d.ts.map +1 -0
- package/dist/core/runner/session-rule-policy.js +110 -0
- package/dist/core/runner/session-rule-policy.js.map +1 -0
- package/dist/core/runner/strict-output-schema.d.ts +36 -0
- package/dist/core/runner/strict-output-schema.d.ts.map +1 -0
- package/dist/core/runner/strict-output-schema.js +365 -0
- package/dist/core/runner/strict-output-schema.js.map +1 -0
- package/dist/core/runner/synthetic-tools.d.ts +72 -0
- package/dist/core/runner/synthetic-tools.d.ts.map +1 -0
- package/dist/core/runner/synthetic-tools.js +203 -0
- package/dist/core/runner/synthetic-tools.js.map +1 -0
- package/dist/core/runner/tool-disclosure.d.ts +117 -0
- package/dist/core/runner/tool-disclosure.d.ts.map +1 -0
- package/dist/core/runner/tool-disclosure.js +0 -0
- package/dist/core/runner/tool-disclosure.js.map +1 -0
- package/dist/core/runner/turn-attachments.d.ts +381 -0
- package/dist/core/runner/turn-attachments.d.ts.map +1 -0
- package/dist/core/runner/turn-attachments.js +596 -0
- package/dist/core/runner/turn-attachments.js.map +1 -0
- package/dist/core/runner/usage-accounting.d.ts +35 -0
- package/dist/core/runner/usage-accounting.d.ts.map +1 -0
- package/dist/core/runner/usage-accounting.js +45 -0
- package/dist/core/runner/usage-accounting.js.map +1 -0
- package/dist/core/runtime.d.ts +9 -0
- package/dist/core/runtime.d.ts.map +1 -0
- package/dist/core/runtime.js +17 -0
- package/dist/core/runtime.js.map +1 -0
- package/dist/core/safety-axis-vocab.d.ts +33 -0
- package/dist/core/safety-axis-vocab.d.ts.map +1 -0
- package/dist/core/safety-axis-vocab.js +35 -0
- package/dist/core/safety-axis-vocab.js.map +1 -0
- package/dist/core/safety-merge-corpus.d.ts +48 -0
- package/dist/core/safety-merge-corpus.d.ts.map +1 -0
- package/dist/core/safety-merge-corpus.js +203 -0
- package/dist/core/safety-merge-corpus.js.map +1 -0
- package/dist/core/scheduler.d.ts +126 -0
- package/dist/core/scheduler.d.ts.map +1 -0
- package/dist/core/scheduler.js +54 -0
- package/dist/core/scheduler.js.map +1 -0
- package/dist/core/secret-env.d.ts +23 -0
- package/dist/core/secret-env.d.ts.map +1 -0
- package/dist/core/secret-env.js +35 -0
- package/dist/core/secret-env.js.map +1 -0
- package/dist/core/select-model.d.ts +26 -0
- package/dist/core/select-model.d.ts.map +1 -0
- package/dist/core/select-model.js +58 -0
- package/dist/core/select-model.js.map +1 -0
- package/dist/core/sensitive-path-policy.d.ts +24 -0
- package/dist/core/sensitive-path-policy.d.ts.map +1 -0
- package/dist/core/sensitive-path-policy.js +96 -0
- package/dist/core/sensitive-path-policy.js.map +1 -0
- package/dist/core/session-policy-store.d.ts +102 -0
- package/dist/core/session-policy-store.d.ts.map +1 -0
- package/dist/core/session-policy-store.js +177 -0
- package/dist/core/session-policy-store.js.map +1 -0
- package/dist/core/session-reconcile.d.ts +63 -0
- package/dist/core/session-reconcile.d.ts.map +1 -0
- package/dist/core/session-reconcile.js +71 -0
- package/dist/core/session-reconcile.js.map +1 -0
- package/dist/core/session-store.d.ts +99 -0
- package/dist/core/session-store.d.ts.map +1 -0
- package/dist/core/session-store.js +298 -0
- package/dist/core/session-store.js.map +1 -0
- package/dist/core/session.d.ts +144 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +56 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/spec-contract.d.ts +147 -0
- package/dist/core/spec-contract.d.ts.map +1 -0
- package/dist/core/spec-contract.js +340 -0
- package/dist/core/spec-contract.js.map +1 -0
- package/dist/core/strategy-store.d.ts +50 -0
- package/dist/core/strategy-store.d.ts.map +1 -0
- package/dist/core/strategy-store.js +100 -0
- package/dist/core/strategy-store.js.map +1 -0
- package/dist/core/stub-env.d.ts +35 -0
- package/dist/core/stub-env.d.ts.map +1 -0
- package/dist/core/stub-env.js +69 -0
- package/dist/core/stub-env.js.map +1 -0
- package/dist/core/task-notification.d.ts +115 -0
- package/dist/core/task-notification.d.ts.map +1 -0
- package/dist/core/task-notification.js +247 -0
- package/dist/core/task-notification.js.map +1 -0
- package/dist/core/task-outcome.d.ts +80 -0
- package/dist/core/task-outcome.d.ts.map +1 -0
- package/dist/core/task-outcome.js +40 -0
- package/dist/core/task-outcome.js.map +1 -0
- package/dist/core/task-registry.d.ts +349 -0
- package/dist/core/task-registry.d.ts.map +1 -0
- package/dist/core/task-registry.js +1751 -0
- package/dist/core/task-registry.js.map +1 -0
- package/dist/core/tighten-task-spec.d.ts +27 -0
- package/dist/core/tighten-task-spec.d.ts.map +1 -0
- package/dist/core/tighten-task-spec.js +95 -0
- package/dist/core/tighten-task-spec.js.map +1 -0
- package/dist/core/tool-detach.d.ts +31 -0
- package/dist/core/tool-detach.d.ts.map +1 -0
- package/dist/core/tool-detach.js +62 -0
- package/dist/core/tool-detach.js.map +1 -0
- package/dist/core/tool-errors.d.ts +72 -0
- package/dist/core/tool-errors.d.ts.map +1 -0
- package/dist/core/tool-errors.js +194 -0
- package/dist/core/tool-errors.js.map +1 -0
- package/dist/core/tool-name-aliases.d.ts +5 -0
- package/dist/core/tool-name-aliases.d.ts.map +1 -0
- package/dist/core/tool-name-aliases.js +130 -0
- package/dist/core/tool-name-aliases.js.map +1 -0
- package/dist/core/tool-policy.d.ts +295 -0
- package/dist/core/tool-policy.d.ts.map +1 -0
- package/dist/core/tool-policy.js +567 -0
- package/dist/core/tool-policy.js.map +1 -0
- package/dist/core/tool-result-budget.d.ts +44 -0
- package/dist/core/tool-result-budget.d.ts.map +1 -0
- package/dist/core/tool-result-budget.js +140 -0
- package/dist/core/tool-result-budget.js.map +1 -0
- package/dist/core/tool-result-store.d.ts +136 -0
- package/dist/core/tool-result-store.d.ts.map +1 -0
- package/dist/core/tool-result-store.js +219 -0
- package/dist/core/tool-result-store.js.map +1 -0
- package/dist/core/tools.d.ts +14 -0
- package/dist/core/tools.d.ts.map +1 -0
- package/dist/core/tools.js +98 -0
- package/dist/core/tools.js.map +1 -0
- package/dist/core/trace.d.ts +340 -0
- package/dist/core/trace.d.ts.map +1 -0
- package/dist/core/trace.js +12 -0
- package/dist/core/trace.js.map +1 -0
- package/dist/core/types.d.ts +2828 -0
- package/dist/core/types.d.ts.map +1 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/core/untrusted-egress.d.ts +32 -0
- package/dist/core/untrusted-egress.d.ts.map +1 -0
- package/dist/core/untrusted-egress.js +49 -0
- package/dist/core/untrusted-egress.js.map +1 -0
- package/dist/core/untrusted-text.d.ts +64 -0
- package/dist/core/untrusted-text.d.ts.map +1 -0
- package/dist/core/untrusted-text.js +119 -0
- package/dist/core/untrusted-text.js.map +1 -0
- package/dist/core/warm-resume.d.ts +23 -0
- package/dist/core/warm-resume.d.ts.map +1 -0
- package/dist/core/warm-resume.js +28 -0
- package/dist/core/warm-resume.js.map +1 -0
- package/dist/core/with-retry.d.ts +43 -0
- package/dist/core/with-retry.d.ts.map +1 -0
- package/dist/core/with-retry.js +59 -0
- package/dist/core/with-retry.js.map +1 -0
- package/dist/core/workflow-journal-store.d.ts +44 -0
- package/dist/core/workflow-journal-store.d.ts.map +1 -0
- package/dist/core/workflow-journal-store.js +47 -0
- package/dist/core/workflow-journal-store.js.map +1 -0
- package/dist/core/workflow-run-store-contract.d.ts +31 -0
- package/dist/core/workflow-run-store-contract.d.ts.map +1 -0
- package/dist/core/workflow-run-store-contract.js +191 -0
- package/dist/core/workflow-run-store-contract.js.map +1 -0
- package/dist/core/workflow-run-store.d.ts +149 -0
- package/dist/core/workflow-run-store.d.ts.map +1 -0
- package/dist/core/workflow-run-store.js +110 -0
- package/dist/core/workflow-run-store.js.map +1 -0
- package/dist/engine/compaction/compaction.d.ts +139 -0
- package/dist/engine/compaction/compaction.d.ts.map +1 -0
- package/dist/engine/compaction/compaction.js +1030 -0
- package/dist/engine/compaction/compaction.js.map +1 -0
- package/dist/engine/compaction/utils.d.ts +45 -0
- package/dist/engine/compaction/utils.d.ts.map +1 -0
- package/dist/engine/compaction/utils.js +203 -0
- package/dist/engine/compaction/utils.js.map +1 -0
- package/dist/engine/execution-env/kill-tree.d.ts +20 -0
- package/dist/engine/execution-env/kill-tree.d.ts.map +1 -0
- package/dist/engine/execution-env/kill-tree.js +183 -0
- package/dist/engine/execution-env/kill-tree.js.map +1 -0
- package/dist/engine/execution-env/node-execution-env.d.ts +133 -0
- package/dist/engine/execution-env/node-execution-env.d.ts.map +1 -0
- package/dist/engine/execution-env/node-execution-env.js +1031 -0
- package/dist/engine/execution-env/node-execution-env.js.map +1 -0
- package/dist/engine/harness/agent-harness.d.ts +174 -0
- package/dist/engine/harness/agent-harness.d.ts.map +1 -0
- package/dist/engine/harness/agent-harness.js +1053 -0
- package/dist/engine/harness/agent-harness.js.map +1 -0
- package/dist/engine/harness/messages.d.ts +17 -0
- package/dist/engine/harness/messages.d.ts.map +1 -0
- package/dist/engine/harness/messages.js +122 -0
- package/dist/engine/harness/messages.js.map +1 -0
- package/dist/engine/harness/types.d.ts +713 -0
- package/dist/engine/harness/types.d.ts.map +1 -0
- package/dist/engine/harness/types.js +100 -0
- package/dist/engine/harness/types.js.map +1 -0
- package/dist/engine/llm/diagnostics.d.ts +23 -0
- package/dist/engine/llm/diagnostics.d.ts.map +1 -0
- package/dist/engine/llm/diagnostics.js +32 -0
- package/dist/engine/llm/diagnostics.js.map +1 -0
- package/dist/engine/llm/event-stream.d.ts +25 -0
- package/dist/engine/llm/event-stream.d.ts.map +1 -0
- package/dist/engine/llm/event-stream.js +103 -0
- package/dist/engine/llm/event-stream.js.map +1 -0
- package/dist/engine/llm/index.d.ts +12 -0
- package/dist/engine/llm/index.d.ts.map +1 -0
- package/dist/engine/llm/index.js +12 -0
- package/dist/engine/llm/index.js.map +1 -0
- package/dist/engine/llm/types.d.ts +753 -0
- package/dist/engine/llm/types.d.ts.map +1 -0
- package/dist/engine/llm/types.js +2 -0
- package/dist/engine/llm/types.js.map +1 -0
- package/dist/engine/llm/validation.d.ts +8 -0
- package/dist/engine/llm/validation.d.ts.map +1 -0
- package/dist/engine/llm/validation.js +318 -0
- package/dist/engine/llm/validation.js.map +1 -0
- package/dist/engine/loop/agent-loop.d.ts +74 -0
- package/dist/engine/loop/agent-loop.d.ts.map +1 -0
- package/dist/engine/loop/agent-loop.js +1490 -0
- package/dist/engine/loop/agent-loop.js.map +1 -0
- package/dist/engine/loop/runtime-deps.d.ts +17 -0
- package/dist/engine/loop/runtime-deps.d.ts.map +1 -0
- package/dist/engine/loop/runtime-deps.js +21 -0
- package/dist/engine/loop/runtime-deps.js.map +1 -0
- package/dist/engine/loop/types.d.ts +609 -0
- package/dist/engine/loop/types.d.ts.map +1 -0
- package/dist/engine/loop/types.js +2 -0
- package/dist/engine/loop/types.js.map +1 -0
- package/dist/engine/lsp/frame-decoder.d.ts +16 -0
- package/dist/engine/lsp/frame-decoder.d.ts.map +1 -0
- package/dist/engine/lsp/frame-decoder.js +53 -0
- package/dist/engine/lsp/frame-decoder.js.map +1 -0
- package/dist/engine/lsp/node-lsp-manager.d.ts +105 -0
- package/dist/engine/lsp/node-lsp-manager.d.ts.map +1 -0
- package/dist/engine/lsp/node-lsp-manager.js +343 -0
- package/dist/engine/lsp/node-lsp-manager.js.map +1 -0
- package/dist/engine/lsp/stdio-lsp-transport.d.ts +37 -0
- package/dist/engine/lsp/stdio-lsp-transport.d.ts.map +1 -0
- package/dist/engine/lsp/stdio-lsp-transport.js +185 -0
- package/dist/engine/lsp/stdio-lsp-transport.js.map +1 -0
- package/dist/engine/session/import-validate.d.ts +44 -0
- package/dist/engine/session/import-validate.d.ts.map +1 -0
- package/dist/engine/session/import-validate.js +92 -0
- package/dist/engine/session/import-validate.js.map +1 -0
- package/dist/engine/session/memory-repo.d.ts +25 -0
- package/dist/engine/session/memory-repo.d.ts.map +1 -0
- package/dist/engine/session/memory-repo.js +59 -0
- package/dist/engine/session/memory-repo.js.map +1 -0
- package/dist/engine/session/memory-storage.d.ts +14 -0
- package/dist/engine/session/memory-storage.d.ts.map +1 -0
- package/dist/engine/session/memory-storage.js +17 -0
- package/dist/engine/session/memory-storage.js.map +1 -0
- package/dist/engine/session/repo-utils.d.ts +11 -0
- package/dist/engine/session/repo-utils.d.ts.map +1 -0
- package/dist/engine/session/repo-utils.js +40 -0
- package/dist/engine/session/repo-utils.js.map +1 -0
- package/dist/engine/session/session.d.ts +34 -0
- package/dist/engine/session/session.d.ts.map +1 -0
- package/dist/engine/session/session.js +227 -0
- package/dist/engine/session/session.js.map +1 -0
- package/dist/engine/session/storage-base.d.ts +38 -0
- package/dist/engine/session/storage-base.d.ts.map +1 -0
- package/dist/engine/session/storage-base.js +157 -0
- package/dist/engine/session/storage-base.js.map +1 -0
- package/dist/engine/session/timestamps.d.ts +3 -0
- package/dist/engine/session/timestamps.d.ts.map +1 -0
- package/dist/engine/session/timestamps.js +15 -0
- package/dist/engine/session/timestamps.js.map +1 -0
- package/dist/engine/session/uuid.d.ts +2 -0
- package/dist/engine/session/uuid.d.ts.map +1 -0
- package/dist/engine/session/uuid.js +50 -0
- package/dist/engine/session/uuid.js.map +1 -0
- package/dist/index.d.ts +160 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +374 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/harness.d.ts +26 -0
- package/dist/internal/harness.d.ts.map +1 -0
- package/dist/internal/harness.js +24 -0
- package/dist/internal/harness.js.map +1 -0
- package/dist/internal/llm.d.ts +9 -0
- package/dist/internal/llm.d.ts.map +1 -0
- package/dist/internal/llm.js +8 -0
- package/dist/internal/llm.js.map +1 -0
- package/dist/orchestration/builtin-workflows.d.ts +44 -0
- package/dist/orchestration/builtin-workflows.d.ts.map +1 -0
- package/dist/orchestration/builtin-workflows.js +165 -0
- package/dist/orchestration/builtin-workflows.js.map +1 -0
- package/dist/orchestration/dev-vm-script-runner.d.ts +24 -0
- package/dist/orchestration/dev-vm-script-runner.d.ts.map +1 -0
- package/dist/orchestration/dev-vm-script-runner.js +106 -0
- package/dist/orchestration/dev-vm-script-runner.js.map +1 -0
- package/dist/orchestration/goal.d.ts +97 -0
- package/dist/orchestration/goal.d.ts.map +1 -0
- package/dist/orchestration/goal.js +248 -0
- package/dist/orchestration/goal.js.map +1 -0
- package/dist/orchestration/run-spec.d.ts +63 -0
- package/dist/orchestration/run-spec.d.ts.map +1 -0
- package/dist/orchestration/run-spec.js +274 -0
- package/dist/orchestration/run-spec.js.map +1 -0
- package/dist/orchestration/run-workflow-tool.d.ts +187 -0
- package/dist/orchestration/run-workflow-tool.d.ts.map +1 -0
- package/dist/orchestration/run-workflow-tool.js +612 -0
- package/dist/orchestration/run-workflow-tool.js.map +1 -0
- package/dist/orchestration/workflow-governance.d.ts +70 -0
- package/dist/orchestration/workflow-governance.d.ts.map +1 -0
- package/dist/orchestration/workflow-governance.js +176 -0
- package/dist/orchestration/workflow-governance.js.map +1 -0
- package/dist/orchestration/workflow-meta.d.ts +41 -0
- package/dist/orchestration/workflow-meta.d.ts.map +1 -0
- package/dist/orchestration/workflow-meta.js +426 -0
- package/dist/orchestration/workflow-meta.js.map +1 -0
- package/dist/orchestration/workflow-observe.d.ts +77 -0
- package/dist/orchestration/workflow-observe.d.ts.map +1 -0
- package/dist/orchestration/workflow-observe.js +177 -0
- package/dist/orchestration/workflow-observe.js.map +1 -0
- package/dist/orchestration/workflow-primitives.d.ts +31 -0
- package/dist/orchestration/workflow-primitives.d.ts.map +1 -0
- package/dist/orchestration/workflow-primitives.js +104 -0
- package/dist/orchestration/workflow-primitives.js.map +1 -0
- package/dist/orchestration/workflow-sandbox-conformance.d.ts +34 -0
- package/dist/orchestration/workflow-sandbox-conformance.d.ts.map +1 -0
- package/dist/orchestration/workflow-sandbox-conformance.js +301 -0
- package/dist/orchestration/workflow-sandbox-conformance.js.map +1 -0
- package/dist/orchestration/workflow-script-runner.d.ts +127 -0
- package/dist/orchestration/workflow-script-runner.d.ts.map +1 -0
- package/dist/orchestration/workflow-script-runner.js +48 -0
- package/dist/orchestration/workflow-script-runner.js.map +1 -0
- package/dist/orchestration/workflow-script-store.d.ts +99 -0
- package/dist/orchestration/workflow-script-store.d.ts.map +1 -0
- package/dist/orchestration/workflow-script-store.js +133 -0
- package/dist/orchestration/workflow-script-store.js.map +1 -0
- package/dist/orchestration/workflow-size-guideline.d.ts +50 -0
- package/dist/orchestration/workflow-size-guideline.d.ts.map +1 -0
- package/dist/orchestration/workflow-size-guideline.js +78 -0
- package/dist/orchestration/workflow-size-guideline.js.map +1 -0
- package/dist/orchestration/workflow.d.ts +624 -0
- package/dist/orchestration/workflow.d.ts.map +1 -0
- package/dist/orchestration/workflow.js +1596 -0
- package/dist/orchestration/workflow.js.map +1 -0
- package/dist/prompts/default.d.ts +474 -0
- package/dist/prompts/default.d.ts.map +1 -0
- package/dist/prompts/default.js +676 -0
- package/dist/prompts/default.js.map +1 -0
- package/dist/prompts/supervisor.d.ts +60 -0
- package/dist/prompts/supervisor.d.ts.map +1 -0
- package/dist/prompts/supervisor.js +162 -0
- package/dist/prompts/supervisor.js.map +1 -0
- package/dist/scenarios/env.d.ts +41 -0
- package/dist/scenarios/env.d.ts.map +1 -0
- package/dist/scenarios/env.js +65 -0
- package/dist/scenarios/env.js.map +1 -0
- package/dist/scenarios/full-body.d.ts +47 -0
- package/dist/scenarios/full-body.d.ts.map +1 -0
- package/dist/scenarios/full-body.js +36 -0
- package/dist/scenarios/full-body.js.map +1 -0
- package/dist/scenarios/scenario-registry.d.ts +107 -0
- package/dist/scenarios/scenario-registry.d.ts.map +1 -0
- package/dist/scenarios/scenario-registry.js +192 -0
- package/dist/scenarios/scenario-registry.js.map +1 -0
- package/dist/scenarios/teacher-quickstart.d.ts +41 -0
- package/dist/scenarios/teacher-quickstart.d.ts.map +1 -0
- package/dist/scenarios/teacher-quickstart.js +32 -0
- package/dist/scenarios/teacher-quickstart.js.map +1 -0
- package/dist/server/http.d.ts +36 -0
- package/dist/server/http.d.ts.map +1 -0
- package/dist/server/http.js +144 -0
- package/dist/server/http.js.map +1 -0
- package/dist/stores/file/checkpoint-store.d.ts +62 -0
- package/dist/stores/file/checkpoint-store.d.ts.map +1 -0
- package/dist/stores/file/checkpoint-store.js +250 -0
- package/dist/stores/file/checkpoint-store.js.map +1 -0
- package/dist/stores/file/file-snapshot-store.d.ts +43 -0
- package/dist/stores/file/file-snapshot-store.d.ts.map +1 -0
- package/dist/stores/file/file-snapshot-store.js +374 -0
- package/dist/stores/file/file-snapshot-store.js.map +1 -0
- package/dist/stores/file/fs-atomic.d.ts +95 -0
- package/dist/stores/file/fs-atomic.d.ts.map +1 -0
- package/dist/stores/file/fs-atomic.js +415 -0
- package/dist/stores/file/fs-atomic.js.map +1 -0
- package/dist/stores/file/index.d.ts +98 -0
- package/dist/stores/file/index.d.ts.map +1 -0
- package/dist/stores/file/index.js +109 -0
- package/dist/stores/file/index.js.map +1 -0
- package/dist/stores/file/memory-store.d.ts +95 -0
- package/dist/stores/file/memory-store.d.ts.map +1 -0
- package/dist/stores/file/memory-store.js +393 -0
- package/dist/stores/file/memory-store.js.map +1 -0
- package/dist/stores/file/session-policy-store.d.ts +24 -0
- package/dist/stores/file/session-policy-store.d.ts.map +1 -0
- package/dist/stores/file/session-policy-store.js +123 -0
- package/dist/stores/file/session-policy-store.js.map +1 -0
- package/dist/stores/file/session-store.d.ts +34 -0
- package/dist/stores/file/session-store.d.ts.map +1 -0
- package/dist/stores/file/session-store.js +175 -0
- package/dist/stores/file/session-store.js.map +1 -0
- package/dist/stores/file/tool-result-store.d.ts +23 -0
- package/dist/stores/file/tool-result-store.d.ts.map +1 -0
- package/dist/stores/file/tool-result-store.js +61 -0
- package/dist/stores/file/tool-result-store.js.map +1 -0
- package/dist/stores/file/workflow-journal-store.d.ts +36 -0
- package/dist/stores/file/workflow-journal-store.d.ts.map +1 -0
- package/dist/stores/file/workflow-journal-store.js +157 -0
- package/dist/stores/file/workflow-journal-store.js.map +1 -0
- package/dist/stores/file/workflow-run-store.d.ts +58 -0
- package/dist/stores/file/workflow-run-store.d.ts.map +1 -0
- package/dist/stores/file/workflow-run-store.js +178 -0
- package/dist/stores/file/workflow-run-store.js.map +1 -0
- package/dist/stores/pg.d.ts +210 -0
- package/dist/stores/pg.d.ts.map +1 -0
- package/dist/stores/pg.js +652 -0
- package/dist/stores/pg.js.map +1 -0
- package/dist/tools/fs/encoding.d.ts +51 -0
- package/dist/tools/fs/encoding.d.ts.map +1 -0
- package/dist/tools/fs/encoding.js +74 -0
- package/dist/tools/fs/encoding.js.map +1 -0
- package/dist/tools/fs/gh-rate-limit.d.ts +19 -0
- package/dist/tools/fs/gh-rate-limit.d.ts.map +1 -0
- package/dist/tools/fs/gh-rate-limit.js +35 -0
- package/dist/tools/fs/gh-rate-limit.js.map +1 -0
- package/dist/tools/fs/index.d.ts +246 -0
- package/dist/tools/fs/index.d.ts.map +1 -0
- package/dist/tools/fs/index.js +2130 -0
- package/dist/tools/fs/index.js.map +1 -0
- package/dist/tools/fs/pdf.d.ts +106 -0
- package/dist/tools/fs/pdf.d.ts.map +1 -0
- package/dist/tools/fs/pdf.js +178 -0
- package/dist/tools/fs/pdf.js.map +1 -0
- package/dist/tools/fs/repo-map.d.ts +15 -0
- package/dist/tools/fs/repo-map.d.ts.map +1 -0
- package/dist/tools/fs/repo-map.js +251 -0
- package/dist/tools/fs/repo-map.js.map +1 -0
- package/dist/tools/fs/safety.d.ts +168 -0
- package/dist/tools/fs/safety.d.ts.map +1 -0
- package/dist/tools/fs/safety.js +479 -0
- package/dist/tools/fs/safety.js.map +1 -0
- package/dist/tools/fs/search.d.ts +118 -0
- package/dist/tools/fs/search.d.ts.map +1 -0
- package/dist/tools/fs/search.js +650 -0
- package/dist/tools/fs/search.js.map +1 -0
- package/dist/tools/gitea-issue.d.ts +39 -0
- package/dist/tools/gitea-issue.d.ts.map +1 -0
- package/dist/tools/gitea-issue.js +91 -0
- package/dist/tools/gitea-issue.js.map +1 -0
- package/dist/tools/monitor.d.ts +64 -0
- package/dist/tools/monitor.d.ts.map +1 -0
- package/dist/tools/monitor.js +135 -0
- package/dist/tools/monitor.js.map +1 -0
- package/dist/tools/scheduler-tools.d.ts +48 -0
- package/dist/tools/scheduler-tools.d.ts.map +1 -0
- package/dist/tools/scheduler-tools.js +449 -0
- package/dist/tools/scheduler-tools.js.map +1 -0
- package/dist/tools/sql-adapters.d.ts +32 -0
- package/dist/tools/sql-adapters.d.ts.map +1 -0
- package/dist/tools/sql-adapters.js +31 -0
- package/dist/tools/sql-adapters.js.map +1 -0
- package/dist/tools/sql.d.ts +36 -0
- package/dist/tools/sql.d.ts.map +1 -0
- package/dist/tools/sql.js +131 -0
- package/dist/tools/sql.js.map +1 -0
- package/dist/tools/task-list.d.ts +26 -0
- package/dist/tools/task-list.d.ts.map +1 -0
- package/dist/tools/task-list.js +352 -0
- package/dist/tools/task-list.js.map +1 -0
- package/dist/tools/todo.d.ts +11 -0
- package/dist/tools/todo.d.ts.map +1 -0
- package/dist/tools/todo.js +126 -0
- package/dist/tools/todo.js.map +1 -0
- package/dist/tools/web.d.ts +59 -0
- package/dist/tools/web.d.ts.map +1 -0
- package/dist/tools/web.js +607 -0
- package/dist/tools/web.js.map +1 -0
- package/dist/tools/worktree.d.ts +88 -0
- package/dist/tools/worktree.d.ts.map +1 -0
- package/dist/tools/worktree.js +434 -0
- package/dist/tools/worktree.js.map +1 -0
- package/docs/A1-ATTRIBUTION-ROUND1-2026-07-09.md +181 -0
- package/docs/AB-ORACLE-GATE-VERDICT-2026-07-10.md +100 -0
- package/docs/ANCHOR-GAP-INVENTORY-2026-07-09.md +143 -0
- package/docs/ARCHITECTURE.md +125 -0
- package/docs/BUGHUNT-2026-07-05-NIGHT.md +98 -0
- package/docs/BUILD.md +63 -0
- package/docs/CANCEL-ASYNC-ATTRIBUTION-2026-07-09.md +98 -0
- package/docs/CC-198-VS-201-DRIFT-2026-07-09.md +70 -0
- package/docs/CC-BASELINE-FAKE-ZERO-AUDIT-2026-07-09.md +51 -0
- package/docs/CC-DRIFT-198-206-AGENT-TYPES-2026-07-10.md +82 -0
- package/docs/CC-DRIFT-198-206-CHANGELOG-2026-07-10.md +82 -0
- package/docs/CC-DRIFT-198-206-REMINDERS-2026-07-10.md +96 -0
- package/docs/CC-DRIFT-198-206-ROADMAP-2026-07-10.md +110 -0
- package/docs/CC-DRIFT-198-206-TOOL-INVENTORY-2026-07-10.md +53 -0
- package/docs/CC-DRIFT-198-206-USAGE-CONSTANTS-2026-07-10.md +64 -0
- package/docs/CC-DRIFT-198-206-WORKFLOW-2026-07-10.md +83 -0
- package/docs/CC-PARITY-CHECKLIST.md +220 -0
- package/docs/CC-PARITY-DEEP-SWEEP-2026-07-07.md +149 -0
- package/docs/CC-SUBAGENT-PROMPT-STUDY-2026-07-09.md +219 -0
- package/docs/CC-TASK-REMINDER-CADENCE-STUDY-2026-07-09.md +396 -0
- package/docs/CC-TOOL-PARITY-SWEEP-2026-07.md +56 -0
- package/docs/CC-TOOL-PROMPT-DEEP-DIFF-2026-07-08.md +274 -0
- package/docs/CC-TOOLSURFACE-DEEP-DIVE-2026-07-07.md +197 -0
- package/docs/CC206-OBSERVER-ANCHORS-2026-07-11.md +463 -0
- package/docs/CC207-CORE-SWEEP-BACKLOG-2026-07-12.md +155 -0
- package/docs/CENTER-CONTROL-PLANE-SEAM.md +86 -0
- package/docs/CLEANUP-CONTRACT-ANCHOR-2026-07-09.md +83 -0
- package/docs/COLD-START-RSI-2026-07-09.md +72 -0
- package/docs/COMPACTION-LIVE-AUDIT-2026-07-09.md +114 -0
- package/docs/CONTEXT-lifecycle-extension-points-and-stop-attribution.md +71 -0
- package/docs/COREWARS-POLYGLOT-TRIAGE-2026-07-09.md +85 -0
- package/docs/DEADTARGET-OVERFULL-HBOX-2026-07-10.md +92 -0
- package/docs/DEADTARGET-PATH-TRACING-REVERSE-2026-07-10.md +87 -0
- package/docs/DEADTARGET-WINNING-AVG-COREWARS-2026-07-10.md +96 -0
- package/docs/DEEPSEEK-API-LIMITS-PROBE-2026-07-09.md +118 -0
- package/docs/DESIGN-140-MOCK-VERIFY-2026-07-11.md +79 -0
- package/docs/DESIGN-140-VERIFICATION-2026-07-11.md +43 -0
- package/docs/DESIGN-DRAFT-workflow-collab-2026-07-11.md +56 -0
- package/docs/DESIGN-ORACLE-GROUNDING-GATE-2026-07-10.md +167 -0
- package/docs/DESIGN-TFRAG-RECONCILE-SCAFFOLD-2026-07-09.md +102 -0
- package/docs/EXP-PA2-PE-DESIGN-2026-07-11.md +220 -0
- package/docs/EXT-DOGFOOD-2026-07-12.md +50 -0
- package/docs/FINAL-VERIFY-SURFACE-AUDIT-2026-07-09.md +44 -0
- package/docs/FRAG-RECON-INVESTIGATION-2026-07-09.md +183 -0
- package/docs/HANDOFF.md +121 -0
- package/docs/KNOWN-ISSUES.md +96 -0
- package/docs/LEGW-WINDOW-TAX-2026-07-10.md +82 -0
- package/docs/LIVE-PROBE-BATCH-2026-07-11.md +207 -0
- package/docs/M2-CERT-ATTRIBUTION-2026-07-10.md +61 -0
- package/docs/M25-LEG-VARIANCE-ATTRIBUTION-2026-07-10.md +81 -0
- package/docs/MAILMAN-TIMEOUT-ATTRIBUTION-2026-07-10.md +88 -0
- package/docs/MEMORY-BACKEND-DIALECT-NOTES.md +69 -0
- package/docs/MTEB-ESCAPE-HATCH-ATTRIBUTION-2026-07-09.md +57 -0
- package/docs/MTEB-LEADERBOARD-ATTRIBUTION-2026-07-10.md +134 -0
- package/docs/ORACLE-GATE-NEGATIVE-SAMPLE-2026-07-11.md +28 -0
- package/docs/PARITY-CONTEXT-TRANSACTIONS-2026-07-10.md +67 -0
- package/docs/PARITY-PROGRESS-MATRIX-2026-07-10.md +37 -0
- package/docs/PARITY-SPOT-AGENT-TYPES-2026-07-10.md +70 -0
- package/docs/PARITY-SPOT-REMINDERS-2026-07-10.md +144 -0
- package/docs/PARITY-SPOT-TOOL-INVENTORY-2026-07-10.md +61 -0
- package/docs/PARITY-SPOT-USAGE-CONSTANTS-2026-07-10.md +95 -0
- package/docs/PARITY-SPOT-WORKFLOW-2026-07-10.md +93 -0
- package/docs/PASSWORD-RECOVERY-PANEL-VERDICT-2026-07-10.md +62 -0
- package/docs/R8-R9-FINALIZE-COORDINATION-2026-07-09.md +124 -0
- package/docs/REPL-CODE-MODE-EVALUATION-2026-07-10.md +187 -0
- package/docs/REPORT-1249-TARGETED.md +48 -0
- package/docs/RESEARCH-3P-MEMORY-SWAP-2026-07-12.md +273 -0
- package/docs/ROADMAP.md +111 -0
- package/docs/RSI-CLOUD-DEPLOY-2026-07-06.md +289 -0
- package/docs/RSI-PROCESS-AI-COLDSTART-2026-07-11.md +68 -0
- package/docs/S18-THOROUGHNESS-AUDIT-2026-07-09.md +113 -0
- package/docs/SERVICE-INTEGRATION-GUIDE.md +298 -0
- package/docs/SUBAGENT-STREAM-RESILIENCE-PARITY-2026-07-10.md +118 -0
- package/docs/SWEBENCH-PRO-RECON-2026-07-11.md +31 -0
- package/docs/TB-EFFICIENCY-TELEMETRY-2026-07-08.md +114 -0
- package/docs/TB-FAILURE-AUTOPSY-2026-07-05-RERUN.md +67 -0
- package/docs/TB-FAIRNESS-AUDIT-2026-07-08.md +141 -0
- package/docs/TB-FULL-1257-2026-07-08.md +77 -0
- package/docs/TB-LEG-GAP-ATTRIBUTION-1261-1263-2026-07-11.md +154 -0
- package/docs/TB-REGRESSION-DAEMON-KILL-2026-07-08.md +58 -0
- package/docs/TB-RSI-CROSSCHECK-2026-07-06.md +68 -0
- package/docs/TB-RSI-LEDGER.md +30 -0
- package/docs/TB-STABLE-SET-2026-07-08.md +127 -0
- package/docs/TB21-RECON-2026-07-11.md +28 -0
- package/docs/TEST-DESIGN-BATCH-1-2-3.md +97 -0
- package/docs/THIRD-PARTY-INTEGRATION.md +45 -0
- package/docs/TOKEN-ESTIMATE-CALIBRATION-LIVE-2026-07-09.md +102 -0
- package/docs/audit-2026-06-10-/347/254/254/344/272/214/350/275/256-/347/251/272/347/231/275/345/214/272/344/270/216/345/277/230/346/216/245/347/272/277.md +147 -0
- package/docs/audit-2026-06-10-/350/256/241/347/256/227bug/346/211/253/346/217/217.md +163 -0
- package/docs/audit-2026-06-11-/344/277/256/345/244/215/345/244/215/345/256/241/344/270/216/345/233/236/345/275/222/344/270/223/346/211/253.md +95 -0
- package/docs/audit-2026-06-12-design71-P1/346/275/234/344/274/217/351/235/242/350/243/201/345/206/263/344/270/216/345/220/236/351/224/231/345/256/241/350/256/241.md +45 -0
- package/docs/audit-2026-06-12-/345/205/254/345/274/200/346/227/213/351/222/256/346/264/273/346/200/247/344/270/216vendored/346/255/273/350/267/257.md +63 -0
- package/docs/audit-2026-06-15/ADDENDUM-second-pass.md +88 -0
- package/docs/audit-2026-06-15/ARCHITECTURE-AND-ROADMAP.md +187 -0
- package/docs/audit-2026-06-15/DOC-CORRECTIONS.md +105 -0
- package/docs/audit-2026-06-15/INDEX.md +49 -0
- package/docs/audit-2026-06-15/ORCHESTRATION-STATUS.md +98 -0
- package/docs/audit-2026-06-15/PRODUCTION-ISSUES.md +189 -0
- package/docs/audit-2026-06-15/REFERENCES-literature.md +139 -0
- package/docs/audit-2026-06-15/VENDOR-REFACTOR-PLAN.md +96 -0
- package/docs/cc-probe-198/README.md +72 -0
- package/docs/cc-probe-198/STABILITY-AUDIT.md +118 -0
- package/docs/cc-probe-198/live-schema-monitor-worktree-2026-07-09.json +56 -0
- package/docs/cc-probe-198/mount-variants.json +536 -0
- package/docs/cc-probe-198/plan-mode-run.json +1 -0
- package/docs/cc-probe-198/probe-bash-bg.json +224 -0
- package/docs/cc-probe-198/probe-edit-mismatch.json +120 -0
- package/docs/cc-probe-198/probe-read-missing.json +62 -0
- package/docs/cc-probe-198/probe-search-empty.json +127 -0
- package/docs/cc-probe-198/probe-task-family.json +227 -0
- package/docs/cc-probe-198/probes.status +6 -0
- package/docs/cc-probe-198/raw-capture-interactive.json +948 -0
- package/docs/cc-probe-198/raw-capture-print.json +787 -0
- package/docs/cc-probe-198/raw-capture2-interactive.json +948 -0
- package/docs/cc-probe-198/raw-capture2-print.json +787 -0
- package/docs/cc-probe-198/system-prompt.txt +135 -0
- package/docs/cc-probe-198/tools-array.json +962 -0
- package/docs/durability-boundary.md +63 -0
- package/docs/fix-2026-06-10-/350/256/241/347/256/227bug/344/277/256/345/244/215-search/346/211/271.md +75 -0
- package/docs/fix-2026-06-11-/347/254/254/344/272/214/350/275/256-/344/277/256/345/244/215-search/346/211/271.md +62 -0
- package/docs/parity-sweep/REPORT-DYNAMIC.md +97 -0
- package/docs/parity-sweep/REPORT-STATIC-GGB.md +127 -0
- package/docs/parity-sweep/REPORT-STATIC-RWE.md +133 -0
- package/docs/vendor-history.md +385 -0
- package/docs/vendored-upstream-diff-2026-07.md +83 -0
- package/package.json +70 -0
|
@@ -0,0 +1,432 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remote execution seam (design/48 §5) — the type-only contract a **remote/containerised** `ExecutionEnv`
|
|
3
|
+
* implementation (E2B/Firecracker, owned by the service control plane) must satisfy so the agent's "hand"
|
|
4
|
+
* (design/44) can act inside an isolated, *stateful*, *suspendable* workspace instead of the in-process
|
|
5
|
+
* `NodeExecutionEnv`.
|
|
6
|
+
*
|
|
7
|
+
* **This file is a SEAM, not an implementation.** The real `RemoteContainerExecutionEnv` (E2B SDK, warm
|
|
8
|
+
* pools, snapshot lifecycle, tier routing) lives in the service and is driven by real integration needs —
|
|
9
|
+
* exactly like `CheckpointStore` (design/45). Core owns the seam shape; service owns the backend.
|
|
10
|
+
*
|
|
11
|
+
* Design rulings folded in (design/48 §10/§11 DeepSeek council):
|
|
12
|
+
* - **#1 [blocker] interface extension, not capability probing**: `RemoteExecutionEnv extends ExecutionEnv`.
|
|
13
|
+
* The base {@link ExecutionEnv} is UNCHANGED — `NodeExecutionEnv`/`StubExecutionEnv` need zero edits, and a
|
|
14
|
+
* consumer that only needs buffered fs/shell keeps accepting the base type.
|
|
15
|
+
* - **#3 [major] do not overload `exec`**: `exec()` stays buffered; streaming is a NEW {@link execStream}.
|
|
16
|
+
* - **#4 [major] suspend × in-flight exec must not hang**: see {@link suspendVM}.
|
|
17
|
+
* - **#8 [major] post-resume consistency**: see {@link postResumeInit}.
|
|
18
|
+
* - **#10 naming**: the isolation level is `sandboxTier` (not `tier`) to avoid clashing with the existing
|
|
19
|
+
* timeout-/degradation-"tier" in the codebase.
|
|
20
|
+
* - **#16 suspend/resume disambiguation**: the VM-lifecycle methods are `suspendVM`/`resumeVM` to keep them
|
|
21
|
+
* distinct from the Runner gate-resume and design/45 wake/resume semantics.
|
|
22
|
+
*
|
|
23
|
+
* **Deferred (NOT modelled here — they are runtime, not seam):** actually suspending a running task and
|
|
24
|
+
* persisting the {@link WorkspaceHandle} into a design/45 `Checkpoint`; the `status:"suspended"` orchestrator
|
|
25
|
+
* mapping; tier *classification* (the static table + Tier1-safe allow-list + fail-closed routing) — all are
|
|
26
|
+
* service/design-45 implementation-time concerns. Core only declares the seam those will plug into.
|
|
27
|
+
*/
|
|
28
|
+
import type { ExecutionEnv } from "../internal/harness.js";
|
|
29
|
+
/** Snapshot identifier returned by {@link RemoteExecutionEnv.suspendVM}; opaque to core, resolved by the provider. */
|
|
30
|
+
export type SnapshotId = string;
|
|
31
|
+
/**
|
|
32
|
+
* Token identifying a still-running remote session, used by {@link RemoteExecutionEnv.reconnect} to re-attach
|
|
33
|
+
* the control plane's transport after a control-plane replica crash/failover. The underlying VM state lives
|
|
34
|
+
* independently of any single control-plane TCP connection (a Firecracker process survives a dropped client),
|
|
35
|
+
* so reconnect re-binds rather than re-creates.
|
|
36
|
+
*/
|
|
37
|
+
export type SessionToken = string;
|
|
38
|
+
/** Isolation routing level (design/48 §2). v1 runs everything as Tier 2; classification is DEFERRED to service. */
|
|
39
|
+
export type SandboxTier = 1 | 2;
|
|
40
|
+
/**
|
|
41
|
+
* Serializable identity of a remote workspace (design/48 §5 gap 1). The control plane persists this into its
|
|
42
|
+
* durable state (and design/45 `Checkpoint`) so a *different* replica can reconnect/resume the same workspace.
|
|
43
|
+
*/
|
|
44
|
+
export interface WorkspaceHandle {
|
|
45
|
+
/** Provider/VM/sandbox id (e.g. an E2B sandbox id). */
|
|
46
|
+
sandboxId: string;
|
|
47
|
+
/** Provider identifier (e.g. `"e2b"`), so the control plane routes reconnect/destroy to the right backend. */
|
|
48
|
+
provider: string;
|
|
49
|
+
/** Absolute mount path of the workspace root inside the remote env; remote paths normalize against this. */
|
|
50
|
+
mountPath: string;
|
|
51
|
+
/** Set when this env was produced by resuming a snapshot ({@link RemoteExecutionEnv.resumeVM}), else undefined. */
|
|
52
|
+
snapshotId?: SnapshotId;
|
|
53
|
+
/** Token for {@link RemoteExecutionEnv.reconnect} when the VM is still running (vs suspended to a snapshot). */
|
|
54
|
+
sessionToken?: SessionToken;
|
|
55
|
+
/** How a checkpointed workspace is restored on resume (1.257.2 hardening, codex review of [500]②):
|
|
56
|
+
* `"park_only"` = durable-park-only suspend degrade (non-suspendable env; workspace persists on the
|
|
57
|
+
* target, resume skips `resumeVM`). Absent = legacy/snapshot handle — resume treats a MISSING
|
|
58
|
+
* `snapshotId` as corruption (fail-closed) unless the resumed env is itself non-suspendable
|
|
59
|
+
* (tolerance for park handles minted by 1.257.1 before this field existed). */
|
|
60
|
+
restoreMode?: "park_only";
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* A reference to a secret injected at {@link RemoteExecutionEnv.connect}/{@link RemoteExecutionEnv.postResumeInit}
|
|
64
|
+
* time (design/48 §5 gap 7) — never baked into the image. The control plane resolves {@link ref} to a value out of
|
|
65
|
+
* band; only the reference travels through core.
|
|
66
|
+
*/
|
|
67
|
+
export interface SecretRef {
|
|
68
|
+
/** Logical name the secret is exposed under (an env-var name in the remote env for `destination:"remote"`). */
|
|
69
|
+
name: string;
|
|
70
|
+
/** Opaque locator the control plane resolves to a value (vault path, KMS key id, …). */
|
|
71
|
+
ref: string;
|
|
72
|
+
/**
|
|
73
|
+
* Where the resolved secret is consumed (design/61 §9 B, council). Default `"remote"` (the original
|
|
74
|
+
* semantics): injected **into the remote env** as `name` (E2B env-var) — visible to code running there.
|
|
75
|
+
* `"adapter"`: used by the **adapter itself** to establish/authenticate the connection (an SSH private key,
|
|
76
|
+
* an ADB token) and **MUST NOT be injected into the target machine/device** — a credential that reaches an
|
|
77
|
+
* un-isolated target's environment is the lethal trifecta (design/53 §C). An adapter MUST honor this.
|
|
78
|
+
*/
|
|
79
|
+
destination?: "remote" | "adapter";
|
|
80
|
+
}
|
|
81
|
+
/** Configuration for {@link RemoteExecutionEnv.connect}. */
|
|
82
|
+
export interface RemoteConnectConfig {
|
|
83
|
+
/** Resume from this snapshot instead of provisioning a fresh workspace. */
|
|
84
|
+
snapshotId?: SnapshotId;
|
|
85
|
+
/** Secrets to inject at connect time (design/48 §5 gap 7). */
|
|
86
|
+
secrets?: SecretRef[];
|
|
87
|
+
/** Abort provisioning/connection. */
|
|
88
|
+
abortSignal?: AbortSignal;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Options for the VM-lifecycle ops {@link RemoteExecutionEnv.suspendVM} / {@link RemoteExecutionEnv.resumeVM}
|
|
92
|
+
* (design/49 v1.5, code-ready council BUG#2). Parity with {@link RemoteConnectConfig.abortSignal} /
|
|
93
|
+
* {@link ExecStreamOptions.signal}: without an abort hook a hung provider pause/restore (network partition)
|
|
94
|
+
* would pin the calling worker forever. The implementation races the op against this signal + an internal
|
|
95
|
+
* timeout; on abort it returns `{ok:false}` with code `"aborted"`.
|
|
96
|
+
*/
|
|
97
|
+
export interface VmLifecycleOptions {
|
|
98
|
+
/** Abort a hung pause/restore. */
|
|
99
|
+
abortSignal?: AbortSignal;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* One chunk streamed from {@link RemoteExecutionEnv.execStream} (design/48 §5 gap 3, council BUG#3). A run is a
|
|
103
|
+
* sequence of `stdout`/`stderr` chunks terminated by exactly one `exit` chunk carrying the typed exit code.
|
|
104
|
+
*
|
|
105
|
+
* The async iterator THROWS a {@link RemoteExecutionError} if the stream fails before an `exit` chunk arrives
|
|
106
|
+
* (transport loss, or a {@link RemoteExecutionEnv.suspendVM} that aborts the in-flight command) — that is the
|
|
107
|
+
* streaming analogue of the base {@link ExecutionEnv}'s never-throw `Result` contract, and it guarantees a
|
|
108
|
+
* consumer is never left awaiting a chunk that will never come.
|
|
109
|
+
*/
|
|
110
|
+
export type OutputChunk = {
|
|
111
|
+
type: "stdout";
|
|
112
|
+
data: string;
|
|
113
|
+
} | {
|
|
114
|
+
type: "stderr";
|
|
115
|
+
data: string;
|
|
116
|
+
} | {
|
|
117
|
+
type: "exit";
|
|
118
|
+
exitCode: number;
|
|
119
|
+
};
|
|
120
|
+
/** Options for {@link RemoteExecutionEnv.execStream}. */
|
|
121
|
+
export interface ExecStreamOptions {
|
|
122
|
+
/**
|
|
123
|
+
* Isolation routing hint (design/48 §2; renamed from `tier` per §11 #10). The *classification* that decides
|
|
124
|
+
* a command's tier — static tool table + Tier1-safe sub-command allow-list, fail-closed to Tier 2 — is the
|
|
125
|
+
* env/control-plane's job and is DEFERRED; this param only lets a caller pass an explicit route when known.
|
|
126
|
+
*/
|
|
127
|
+
sandboxTier?: SandboxTier;
|
|
128
|
+
/** Working directory; relative paths resolve against the workspace root. */
|
|
129
|
+
cwd?: string;
|
|
130
|
+
/** Extra environment variables for the command. */
|
|
131
|
+
env?: Record<string, string>;
|
|
132
|
+
/**
|
|
133
|
+
* Total command wall-clock timeout in seconds. **🔴 Per-command — independent of the env/sandbox lifetime.**
|
|
134
|
+
* A remote adapter MUST NOT fall back to the sandbox lifetime when this is unset (service [45]: an E2B adapter
|
|
135
|
+
* that defaulted a missing per-command timeout to `cfg.timeoutMs` = the sandbox lifetime made a seconds-long
|
|
136
|
+
* command wait the *whole sandbox lifetime*, ~30 min, on a provider RPC hang). "No `timeout`" means "no
|
|
137
|
+
* wall-clock cap on a *making-progress* command" — NOT "wait until the env dies"; liveness is still bounded by
|
|
138
|
+
* {@link readTimeoutMs} (see below). Distinct concerns: `timeout` caps a slow-but-progressing command;
|
|
139
|
+
* `readTimeoutMs` catches a *hung/unreachable* one.
|
|
140
|
+
*/
|
|
141
|
+
timeout?: number;
|
|
142
|
+
/** Abort the command. Aborting ends the stream with a {@link RemoteExecutionError} (code `"aborted"`, no `exit` chunk). */
|
|
143
|
+
signal?: AbortSignal;
|
|
144
|
+
/**
|
|
145
|
+
* Idle/liveness read timeout (ms). If no {@link OutputChunk} arrives within this window, `execStream` ends
|
|
146
|
+
* with a {@link RemoteExecutionError} (code `"timeout"`) instead of hanging. **Needed in practice for remote
|
|
147
|
+
* backends** (design/48 §5, service [7]): E2B issue #1128 — a *streaming* call sets no read timeout (only unary
|
|
148
|
+
* does), so an unreachable sandbox hangs the worker forever. Distinct from `timeout` (total wall-clock).
|
|
149
|
+
*
|
|
150
|
+
* 🔴 **Liveness contract (service [45]/[59]):** a remote adapter SHOULD enforce a default liveness bound even
|
|
151
|
+
* when this is unset (a missing idle timeout MUST NOT mean "wait forever / until the env dies"), and that bound
|
|
152
|
+
* MUST cover the **command-creation/handshake RPC**, not only the post-first-chunk loop — a provider hang
|
|
153
|
+
* typically occurs at creation, before any chunk arrives, so an idle timer started only after the first chunk
|
|
154
|
+
* misses it. On trigger, throw {@link RemoteExecutionError} with code `"timeout"` (retryable by the caller per
|
|
155
|
+
* the command's idempotency — the adapter MUST NOT blind-retry).
|
|
156
|
+
*/
|
|
157
|
+
readTimeoutMs?: number;
|
|
158
|
+
/** Per-call output cap (design/48 §5 gap 8): stop streaming after this many bytes to avoid a `find /` flooding the control plane. */
|
|
159
|
+
maxOutputBytes?: number;
|
|
160
|
+
}
|
|
161
|
+
/** Stable error codes for the remote seam's lifecycle/streaming operations (design/48 §5/§11 BUG#2). */
|
|
162
|
+
export type RemoteExecutionErrorCode =
|
|
163
|
+
/** A lifecycle/exec op failed because the workspace is (or became) suspended. */
|
|
164
|
+
"suspended"
|
|
165
|
+
/** {@link RemoteExecutionEnv.suspendVM} refused because a command was still in flight (council #4). */
|
|
166
|
+
| "command_in_flight"
|
|
167
|
+
/** Connect/resume/reconnect failed to reach or provision the remote workspace. */
|
|
168
|
+
| "connect_failed"
|
|
169
|
+
/** A post-resume consistency step failed (design/48 §5/#8) — caller must destroy the env. */
|
|
170
|
+
| "post_resume_failed"
|
|
171
|
+
/** The command/stream was aborted via its `AbortSignal`. */
|
|
172
|
+
| "aborted"
|
|
173
|
+
/**
|
|
174
|
+
* A command's wall-clock {@link ExecStreamOptions.timeout} or liveness {@link ExecStreamOptions.readTimeoutMs}
|
|
175
|
+
* was exceeded — including a provider RPC hang at command creation (service [45]/[59]). **Retryable** by the
|
|
176
|
+
* caller per the command's idempotency (the adapter MUST NOT blind-retry). Distinct from `"aborted"` (a
|
|
177
|
+
* caller-driven `AbortSignal`) and `"connect_failed"` (workspace provisioning, not a per-command hang).
|
|
178
|
+
*/
|
|
179
|
+
| "timeout"
|
|
180
|
+
/**
|
|
181
|
+
* The op is not supported by this adapter's capabilities (design/61 §9 A) — e.g. `suspendVM`/`resumeVM` on a
|
|
182
|
+
* non-suspendable SSH/ADB env. Permanent for this env; check {@link RemoteExecutionEnv.capabilities} first.
|
|
183
|
+
*/
|
|
184
|
+
| "unsupported"
|
|
185
|
+
/**
|
|
186
|
+
* A **transient** authentication step that is expected to succeed on a retry (design/61 §9 C) — e.g. an ADB
|
|
187
|
+
* device awaiting first-time authorization (connect once → user authorizes → connect again succeeds).
|
|
188
|
+
* **Retryable** (typically retry-exactly-once). Distinct from {@link "auth_failed"} so a real rejection isn't
|
|
189
|
+
* retried and a bounded ADB retry doesn't false-kill an SSH transient.
|
|
190
|
+
*/
|
|
191
|
+
| "auth_transient"
|
|
192
|
+
/**
|
|
193
|
+
* **Permanent** authentication failure (design/61 §9 C) — wrong/rejected SSH key, revoked token. **NEVER
|
|
194
|
+
* retry** (retrying burns the whole attempt budget and can lock accounts). The caller must surface it.
|
|
195
|
+
*/
|
|
196
|
+
| "auth_failed"
|
|
197
|
+
/**
|
|
198
|
+
* The transport connection dropped mid-session (TCP RST, network partition, peer close) — design/61 §9 C/#14.
|
|
199
|
+
* **Retryable** by re-establishing the connection (idempotent for a persistent SSH/ADB session). An adapter
|
|
200
|
+
* MUST map raw transport errors (DNS `ENOTFOUND`, TCP RST) onto a typed code, not leave them as `"unknown"`,
|
|
201
|
+
* else a retry whitelist misses them.
|
|
202
|
+
*/
|
|
203
|
+
| "transport_lost"
|
|
204
|
+
/** Unclassified provider/transport failure. */
|
|
205
|
+
| "unknown";
|
|
206
|
+
/**
|
|
207
|
+
* Error surfaced by {@link RemoteExecutionEnv} lifecycle ops and by {@link RemoteExecutionEnv.execStream}'s
|
|
208
|
+
* iterator. Mirrors the vendored `ExecutionError` shape but carries the remote-specific code set; it is kept
|
|
209
|
+
* separate from the vendored `ExecutionErrorCode` union deliberately — those codes only need to widen once the
|
|
210
|
+
* design/45 suspend/resume *runtime* lands and the Runner/orchestrator layer must thread `"suspended"`.
|
|
211
|
+
*/
|
|
212
|
+
export declare class RemoteExecutionError extends Error {
|
|
213
|
+
readonly code: RemoteExecutionErrorCode;
|
|
214
|
+
constructor(code: RemoteExecutionErrorCode, message: string, cause?: Error);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* A remote, stateful, suspendable {@link ExecutionEnv} (design/48 §5). Extends the base with workspace identity,
|
|
218
|
+
* connection lifecycle, streaming exec, and post-resume reconciliation. Every method follows the base contract:
|
|
219
|
+
* **never throw/reject** — encode failures in the returned `Result` (the one exception is {@link execStream},
|
|
220
|
+
* whose iterator may throw mid-stream; see {@link OutputChunk}).
|
|
221
|
+
*
|
|
222
|
+
* Lifecycle methods are typed but their RUNTIME wiring (task suspension, `Checkpoint` persistence of the
|
|
223
|
+
* {@link WorkspaceHandle}, cross-replica resume) is implemented with design/45 — see the file header.
|
|
224
|
+
*
|
|
225
|
+
* 🔴 **Universal liveness contract (service [45]/[59] class-fix) — applies to EVERY remote RPC**, not just
|
|
226
|
+
* `execStream`: the inherited {@link ExecutionEnv} filesystem ops (`readTextFile`/`writeFile`/`listDir`/…), the
|
|
227
|
+
* streaming/buffered exec, AND the VM-lifecycle ops below (`connect`/`reconnect`/`suspendVM`/`resumeVM`/
|
|
228
|
+
* `postResumeInit`/`destroy`). Each is a network round-trip to a provider that can hang. The contract:
|
|
229
|
+
* 1. **Every remote RPC SHOULD enforce a bounded default liveness/idle timeout** even when no `abortSignal`/
|
|
230
|
+
* timeout is given — a hung provider call MUST NOT wait until the env/sandbox lifetime expires (the
|
|
231
|
+
* service [45] bug, but generalized: it was found on `exec`, and `files.read`/`resumeVM`/etc. share the
|
|
232
|
+
* exact exposure). An optional `abortSignal` (where present) composes with, but does not replace, this default.
|
|
233
|
+
* 2. **🔴 Bound on LIVENESS (no progress), not a fixed short wall-clock** — distinguish *hung* from *slow but
|
|
234
|
+
* progressing* (search [60] / service [50] data-transfer sharpening). A **data-transfer** op — a large-workspace
|
|
235
|
+
* `suspendVM` snapshot, a big `writeFile`/`readTextFile` — may legitimately run for minutes; a fixed short
|
|
236
|
+
* wall-clock would false-kill the (durable-checkpoint *命门*) path. So such ops bound on an **idle/no-heartbeat**
|
|
237
|
+
* window (reset by observable progress), not total elapsed time. Cheap control RPCs (`isRunning`, a small
|
|
238
|
+
* `connect` handshake) may use a short wall-clock. The adapter sizes the bound per op class.
|
|
239
|
+
* 3. **A liveness breach surfaces as a typed, retryable error**: `RemoteExecutionError` code `"timeout"` for the
|
|
240
|
+
* lifecycle/stream ops; for the inherited filesystem ops (which return the vendored `Result<_, FileError>`),
|
|
241
|
+
* a `FileError` — but still **bounded, never an unbounded wait**. Retry is the caller's decision per the op's
|
|
242
|
+
* idempotency; the adapter MUST NOT blind-retry.
|
|
243
|
+
*/
|
|
244
|
+
export interface RemoteExecutionEnv extends ExecutionEnv {
|
|
245
|
+
/**
|
|
246
|
+
* What this adapter can actually do (design/61 §9 A, council). The seam was built for E2B (a full
|
|
247
|
+
* `{isolation:true, suspendable:true}` adapter); **partial-capability** adapters (SSH/ADB: `{false, false}`
|
|
248
|
+
* — a real machine/device, not snapshotable and not isolated) declare it here. **Required + explicit** so
|
|
249
|
+
* the orchestrator never has to guess: there is no safe default (assuming isolation when there is none is a
|
|
250
|
+
* security hole; assuming suspendable crashes on `suspendVM`). Use {@link isSuspendable}/{@link isIsolated}
|
|
251
|
+
* rather than the structural {@link isRemoteExecutionEnv} (method presence ≠ semantics — a stub `suspendVM`
|
|
252
|
+
* that returns `"unsupported"` still satisfies the structural check). Extensible: add fields as new
|
|
253
|
+
* partial-capability classes appear.
|
|
254
|
+
*/
|
|
255
|
+
readonly capabilities: {
|
|
256
|
+
/** True iff actions are contained (E2B microVM); false for a real target (SSH host / ADB device). The
|
|
257
|
+
* orchestrator tightens autonomy + the design/37 policy gate when this is false (design/53 zero-trust). */
|
|
258
|
+
isolation: boolean;
|
|
259
|
+
/** True iff the env can be snapshot/`suspendVM`'d (E2B); false for SSH/ADB (durable suspend N/A).
|
|
260
|
+
*
|
|
261
|
+
* ⚠️ LOAD-BEARING INVARIANT (opus review 1.257.2): `suspendable:false` on a remote env also asserts
|
|
262
|
+
* the workspace is EXTERNALLY DURABLE — it persists on the target across the env object's lifetime
|
|
263
|
+
* (true for SSH hosts / ADB devices). The durable-park-only suspend degrade (service [500]②) rests
|
|
264
|
+
* on this: it skips `suspendVM` and trusts the factory to reconnect to the SAME workspace on resume.
|
|
265
|
+
* An adapter for a non-suspendable EPHEMERAL backend (e.g. a snapshot-less container torn down with
|
|
266
|
+
* the transport) must NOT be modeled as `suspendable:false` remote — it would silently take the
|
|
267
|
+
* park-only branch and resume onto a fresh empty workspace. Model such a backend as a per-task env
|
|
268
|
+
* without durable suspend instead (the human gate refuses it), or extend capabilities with an
|
|
269
|
+
* explicit workspace-durability flag before building one. */
|
|
270
|
+
suspendable: boolean;
|
|
271
|
+
};
|
|
272
|
+
/** Identity of the connected workspace (design/48 §5 gap 1). Synchronous: it is data the env already holds. */
|
|
273
|
+
workspaceHandle(): WorkspaceHandle;
|
|
274
|
+
/** Provision/attach the remote workspace and inject secrets. Returns the resulting {@link WorkspaceHandle}. */
|
|
275
|
+
connect(config?: RemoteConnectConfig): Promise<{
|
|
276
|
+
ok: true;
|
|
277
|
+
value: WorkspaceHandle;
|
|
278
|
+
} | {
|
|
279
|
+
ok: false;
|
|
280
|
+
error: RemoteExecutionError;
|
|
281
|
+
}>;
|
|
282
|
+
/**
|
|
283
|
+
* Snapshot the workspace and (provider permitting) stop billing; returns the {@link SnapshotId} to resume from.
|
|
284
|
+
*
|
|
285
|
+
* **Council #4 — must not leave an in-flight command hung.** If a {@link Shell.exec}/{@link execStream} is in
|
|
286
|
+
* flight, an implementation MUST either (a) refuse with `RemoteExecutionError("command_in_flight")`, or (b)
|
|
287
|
+
* abort the in-flight command — buffered `exec` then resolves an `Err` and an in-flight {@link execStream}
|
|
288
|
+
* iterator throws `RemoteExecutionError("suspended")`. It must NOT silently snapshot and leave the command's
|
|
289
|
+
* promise/iterator pending forever.
|
|
290
|
+
*
|
|
291
|
+
* **🔴 Atomicity contract (design/49 v1.5, code-ready council BUG#1/#13).** This is the FIRST durable side
|
|
292
|
+
* effect of a remote durable-suspend, so its all-or-nothing semantics are load-bearing for the Runner's
|
|
293
|
+
* commit ordering:
|
|
294
|
+
* - `{ok:true}` ⇒ the VM is paused at `value` (a `SnapshotId`); the caller may now persist a checkpoint.
|
|
295
|
+
* - `{ok:false}` ⇒ the VM is left in its ORIGINAL (running) state, untouched — the caller can safely fall
|
|
296
|
+
* back to the synchronous `onAsk` gate as if no suspend was attempted (Runner: design/49 §4①).
|
|
297
|
+
* An implementation MUST NOT return `{ok:false}` after it has already paused/snapshotted the VM. The gate
|
|
298
|
+
* path means no command is in flight (the batch's prior calls are awaited, the gated call has not run), so
|
|
299
|
+
* `command_in_flight` should not arise; if it does, the Runner treats it as an ordinary `{ok:false}` and
|
|
300
|
+
* falls back to `onAsk` — see {@link RemoteExecutionErrorCode}.
|
|
301
|
+
*/
|
|
302
|
+
suspendVM(options?: VmLifecycleOptions): Promise<{
|
|
303
|
+
ok: true;
|
|
304
|
+
value: SnapshotId;
|
|
305
|
+
} | {
|
|
306
|
+
ok: false;
|
|
307
|
+
error: RemoteExecutionError;
|
|
308
|
+
}>;
|
|
309
|
+
/** Restore the workspace from a snapshot. Idempotent + re-entrant (a replica that crashed mid-suspend can be
|
|
310
|
+
* superseded by another resuming the same {@link SnapshotId} without corruption — aligns with design/45 resolve-CAS).
|
|
311
|
+
* Pass `options.abortSignal` so a hung restore cannot pin the resuming worker (design/49 BUG#2). */
|
|
312
|
+
resumeVM(snapshotId: SnapshotId, options?: VmLifecycleOptions): Promise<{
|
|
313
|
+
ok: true;
|
|
314
|
+
value: WorkspaceHandle;
|
|
315
|
+
} | {
|
|
316
|
+
ok: false;
|
|
317
|
+
error: RemoteExecutionError;
|
|
318
|
+
}>;
|
|
319
|
+
/** Re-attach the control-plane transport to a still-running VM after a control-plane reconnect (design/48 §5 gap 4). */
|
|
320
|
+
reconnect(sessionToken: SessionToken): Promise<{
|
|
321
|
+
ok: true;
|
|
322
|
+
value: WorkspaceHandle;
|
|
323
|
+
} | {
|
|
324
|
+
ok: false;
|
|
325
|
+
error: RemoteExecutionError;
|
|
326
|
+
}>;
|
|
327
|
+
/**
|
|
328
|
+
* Re-establish consistency AFTER {@link resumeVM}/{@link reconnect} (design/48 §5 gap, council #8): re-fetch git
|
|
329
|
+
* remote refs + invalidate stale package/index caches, and re-inject secrets (short-lived credentials may have
|
|
330
|
+
* expired while suspended). Any failed step → `Err("post_resume_failed")` and the caller MUST destroy the env.
|
|
331
|
+
*
|
|
332
|
+
* Note: a resumed guest's network/long-lived connections (git remote / API / registry) are NOT guaranteed to
|
|
333
|
+
* survive the snapshot (clay decision 2), so this is also where the VM-internal agent rebuilds those.
|
|
334
|
+
*
|
|
335
|
+
* 🔴 Ordering red line (design/48 §5/#6): at-rest encryption of the memory snapshot must be ensured BEFORE
|
|
336
|
+
* secrets are injected — never let plaintext credentials land in an unencrypted snapshot. That encryption is a
|
|
337
|
+
* service-side property of the snapshot store; this method must fail-and-clean if it cannot be guaranteed.
|
|
338
|
+
*/
|
|
339
|
+
postResumeInit(): Promise<{
|
|
340
|
+
ok: true;
|
|
341
|
+
value: void;
|
|
342
|
+
} | {
|
|
343
|
+
ok: false;
|
|
344
|
+
error: RemoteExecutionError;
|
|
345
|
+
}>;
|
|
346
|
+
/**
|
|
347
|
+
* Stream a command's output (design/48 §5 gap 3) — the standard path for long build/test runs. Distinct from
|
|
348
|
+
* the buffered base `exec()` (council #3: no overload). Yields `stdout`/`stderr` chunks then exactly one `exit`
|
|
349
|
+
* chunk; the iterator throws {@link RemoteExecutionError} if the stream fails before `exit` (see {@link OutputChunk}).
|
|
350
|
+
*
|
|
351
|
+
* 🔴 **Timeout/liveness contract (service [45]/[59]) — applies to BOTH `execStream` and the base `exec`:** a
|
|
352
|
+
* per-command timeout is **independent of the env/sandbox lifetime** and an adapter MUST NOT fall back to the
|
|
353
|
+
* lifetime when none is given (else a hung provider RPC pins the worker for the whole sandbox lifetime). An
|
|
354
|
+
* adapter SHOULD enforce a bounded default liveness/idle timeout that also covers the command-creation RPC, and
|
|
355
|
+
* surface a liveness/timeout breach as a typed, retryable {@link RemoteExecutionError} code `"timeout"`. See
|
|
356
|
+
* {@link ExecStreamOptions.timeout} / {@link ExecStreamOptions.readTimeoutMs}.
|
|
357
|
+
*/
|
|
358
|
+
execStream(command: string, options?: ExecStreamOptions): AsyncIterable<OutputChunk>;
|
|
359
|
+
/**
|
|
360
|
+
* Tear down the workspace and release provider resources. Best-effort; must never throw (like `cleanup`).
|
|
361
|
+
* **Must be idempotent** — safe to call more than once (the second call is a no-op). The Runner calls it
|
|
362
|
+
* once on task end, and `prepareTask` calls it on a prepare-time throw; a remote impl may also be reaped,
|
|
363
|
+
* so a defensive double-call must not error or double-bill.
|
|
364
|
+
*
|
|
365
|
+
* 飞轮 [519] contract note: on a NON-isolated env (no `capabilities.isolation` — host lane, SSH host),
|
|
366
|
+
* destroy() is workspace/object-level cleanup and must NOT reap still-running background processes —
|
|
367
|
+
* that is `disposeBackgroundShells`' job, which honours the timeout/session keep-alive except-list
|
|
368
|
+
* ([511]③ monitor timeout anchor). An isolated env (container/VM) naturally takes everything down;
|
|
369
|
+
* the Runner's envDying settle accounts for that with an accurate killed receipt beforehand.
|
|
370
|
+
*/
|
|
371
|
+
destroy(): Promise<void>;
|
|
372
|
+
}
|
|
373
|
+
/** Context handed to an {@link ExecutionEnvFactory} for each task (design/48 §5 / §7 Q7). Deliberately minimal:
|
|
374
|
+
* per-task identity is enough to allocate/route a per-task container; richer routing (tenant/principal) is
|
|
375
|
+
* captured in the factory closure by the trusted control plane that builds it. */
|
|
376
|
+
export interface ExecutionEnvFactoryContext {
|
|
377
|
+
/** Resolved session id for the task — the stable identity of its per-task workspace. */
|
|
378
|
+
sessionId: string;
|
|
379
|
+
/** Caller-supplied task id, when set on the `TaskSpec`. */
|
|
380
|
+
taskId?: string;
|
|
381
|
+
/**
|
|
382
|
+
* design/97 CORE-6 — per-task ISOLATION hint threaded from the workflow's `ctx.agent({ isolation })` via the
|
|
383
|
+
* TRUSTED `RunInternals` channel (never from the untrusted `TaskSpec`). When `"worktree"`, a control-plane
|
|
384
|
+
* factory should mint a git-worktree-rooted env for this agent (e.g. via {@link addWorktree}) WITH a
|
|
385
|
+
* `destroy()` that removes the worktree, and return the SHARED base env (no `destroy`) otherwise. Unset =
|
|
386
|
+
* default (the factory's normal per-task env).
|
|
387
|
+
*/
|
|
388
|
+
isolation?: "worktree";
|
|
389
|
+
/**
|
|
390
|
+
* Blackboard 2026-07-03 (clay dogfood — sub-agents landing in an EMPTY sandbox): the PARENT task's
|
|
391
|
+
* effective working root, threaded (like `isolation`) via the TRUSTED `RunInternals` channel when this
|
|
392
|
+
* task is a sub-agent (workflow `ctx.agent` / Task delegation). CC parity: a Task sub-agent inherits the
|
|
393
|
+
* main session's cwd. A single-user/TOC factory SHOULD root the child env here (unless `isolation`
|
|
394
|
+
* requests a worktree — that wins); a multi-tenant/TOB factory minting isolated containers may ignore
|
|
395
|
+
* it. Absent on top-level tasks. Static shared-`executionEnv` deployments need nothing — the child
|
|
396
|
+
* already shares the parent env (and its cwd).
|
|
397
|
+
*/
|
|
398
|
+
parentCwd?: string;
|
|
399
|
+
}
|
|
400
|
+
/**
|
|
401
|
+
* A **trusted control-plane** factory that mints a per-task {@link ExecutionEnv} (design/48 §5 answers core
|
|
402
|
+
* gap-a / §7 Q7). Lives on `RunnerDeps` (deployment-level) — NOT on `TaskSpec` — so an untrusted caller can
|
|
403
|
+
* never inject its own env and escape the sandbox (design/44 §7 Q4 red line; clay decision 3: the Docker
|
|
404
|
+
* fast-lane must be control-plane-assigned, never task-selectable).
|
|
405
|
+
*
|
|
406
|
+
* The remote model is "one container per task", so the factory is invoked once per task. The Runner owns the
|
|
407
|
+
* lifetime of a factory-produced env: if it implements {@link RemoteExecutionEnv.destroy} (see {@link hasDestroy}),
|
|
408
|
+
* the Runner calls it when the task ends.
|
|
409
|
+
*/
|
|
410
|
+
export type ExecutionEnvFactory = (ctx: ExecutionEnvFactoryContext) => ExecutionEnv | Promise<ExecutionEnv>;
|
|
411
|
+
/** True when `env` exposes a lifecycle {@link RemoteExecutionEnv.destroy} the Runner should call on task end. */
|
|
412
|
+
export declare function hasDestroy(env: ExecutionEnv): env is ExecutionEnv & Pick<RemoteExecutionEnv, "destroy">;
|
|
413
|
+
/** Structural check that `env` implements the remote seam (lifecycle + streaming surface + declared capabilities). */
|
|
414
|
+
export declare function isRemoteExecutionEnv(env: ExecutionEnv): env is RemoteExecutionEnv;
|
|
415
|
+
/**
|
|
416
|
+
* Can this env be durably suspended/snapshotted (design/61 §9 A)? Use this — NOT the structural
|
|
417
|
+
* {@link isRemoteExecutionEnv} — before calling `suspendVM` (a non-suspendable SSH/ADB env declares
|
|
418
|
+
* `capabilities.suspendable: false` but still has the method, which returns `"unsupported"`). Non-remote
|
|
419
|
+
* (in-process) envs are not suspendable.
|
|
420
|
+
*
|
|
421
|
+
* A composite type guard (structural AND capability) so a `suspendVM` call site narrowed by THIS predicate
|
|
422
|
+
* gets the {@link RemoteExecutionEnv} type without a cast — `true` always implies the structural check too.
|
|
423
|
+
*/
|
|
424
|
+
export declare function isSuspendable(env: ExecutionEnv): env is RemoteExecutionEnv;
|
|
425
|
+
/**
|
|
426
|
+
* Is this env an isolated sandbox (design/61 §9 A, design/53)? `false` for a real SSH host / ADB device AND
|
|
427
|
+
* for any in-process env (the host process is not isolated). The orchestrator tightens autonomy + the
|
|
428
|
+
* design/37 policy gate when this is `false` (zero-trust on an un-isolated target). The safe default is
|
|
429
|
+
* `false` — isolation must be explicitly declared, never assumed.
|
|
430
|
+
*/
|
|
431
|
+
export declare function isIsolated(env: ExecutionEnv): boolean;
|
|
432
|
+
//# sourceMappingURL=remote-env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-env.d.ts","sourceRoot":"","sources":["../../src/core/remote-env.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Remote execution seam (design/48 §5) — the type-only contract a **remote/containerised** `ExecutionEnv`
|
|
3
|
+
* implementation (E2B/Firecracker, owned by the service control plane) must satisfy so the agent's "hand"
|
|
4
|
+
* (design/44) can act inside an isolated, *stateful*, *suspendable* workspace instead of the in-process
|
|
5
|
+
* `NodeExecutionEnv`.
|
|
6
|
+
*
|
|
7
|
+
* **This file is a SEAM, not an implementation.** The real `RemoteContainerExecutionEnv` (E2B SDK, warm
|
|
8
|
+
* pools, snapshot lifecycle, tier routing) lives in the service and is driven by real integration needs —
|
|
9
|
+
* exactly like `CheckpointStore` (design/45). Core owns the seam shape; service owns the backend.
|
|
10
|
+
*
|
|
11
|
+
* Design rulings folded in (design/48 §10/§11 DeepSeek council):
|
|
12
|
+
* - **#1 [blocker] interface extension, not capability probing**: `RemoteExecutionEnv extends ExecutionEnv`.
|
|
13
|
+
* The base {@link ExecutionEnv} is UNCHANGED — `NodeExecutionEnv`/`StubExecutionEnv` need zero edits, and a
|
|
14
|
+
* consumer that only needs buffered fs/shell keeps accepting the base type.
|
|
15
|
+
* - **#3 [major] do not overload `exec`**: `exec()` stays buffered; streaming is a NEW {@link execStream}.
|
|
16
|
+
* - **#4 [major] suspend × in-flight exec must not hang**: see {@link suspendVM}.
|
|
17
|
+
* - **#8 [major] post-resume consistency**: see {@link postResumeInit}.
|
|
18
|
+
* - **#10 naming**: the isolation level is `sandboxTier` (not `tier`) to avoid clashing with the existing
|
|
19
|
+
* timeout-/degradation-"tier" in the codebase.
|
|
20
|
+
* - **#16 suspend/resume disambiguation**: the VM-lifecycle methods are `suspendVM`/`resumeVM` to keep them
|
|
21
|
+
* distinct from the Runner gate-resume and design/45 wake/resume semantics.
|
|
22
|
+
*
|
|
23
|
+
* **Deferred (NOT modelled here — they are runtime, not seam):** actually suspending a running task and
|
|
24
|
+
* persisting the {@link WorkspaceHandle} into a design/45 `Checkpoint`; the `status:"suspended"` orchestrator
|
|
25
|
+
* mapping; tier *classification* (the static table + Tier1-safe allow-list + fail-closed routing) — all are
|
|
26
|
+
* service/design-45 implementation-time concerns. Core only declares the seam those will plug into.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Error surfaced by {@link RemoteExecutionEnv} lifecycle ops and by {@link RemoteExecutionEnv.execStream}'s
|
|
30
|
+
* iterator. Mirrors the vendored `ExecutionError` shape but carries the remote-specific code set; it is kept
|
|
31
|
+
* separate from the vendored `ExecutionErrorCode` union deliberately — those codes only need to widen once the
|
|
32
|
+
* design/45 suspend/resume *runtime* lands and the Runner/orchestrator layer must thread `"suspended"`.
|
|
33
|
+
*/
|
|
34
|
+
export class RemoteExecutionError extends Error {
|
|
35
|
+
code;
|
|
36
|
+
constructor(code, message, cause) {
|
|
37
|
+
super(message, cause === undefined ? undefined : { cause });
|
|
38
|
+
this.name = "RemoteExecutionError";
|
|
39
|
+
this.code = code;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
/** True when `env` exposes a lifecycle {@link RemoteExecutionEnv.destroy} the Runner should call on task end. */
|
|
43
|
+
export function hasDestroy(env) {
|
|
44
|
+
return typeof env.destroy === "function";
|
|
45
|
+
}
|
|
46
|
+
/** Structural check that `env` implements the remote seam (lifecycle + streaming surface + declared capabilities). */
|
|
47
|
+
export function isRemoteExecutionEnv(env) {
|
|
48
|
+
const e = env;
|
|
49
|
+
return (typeof e.workspaceHandle === "function" &&
|
|
50
|
+
typeof e.execStream === "function" &&
|
|
51
|
+
typeof e.suspendVM === "function" &&
|
|
52
|
+
typeof e.destroy === "function" &&
|
|
53
|
+
typeof e.capabilities === "object" &&
|
|
54
|
+
e.capabilities !== null);
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Can this env be durably suspended/snapshotted (design/61 §9 A)? Use this — NOT the structural
|
|
58
|
+
* {@link isRemoteExecutionEnv} — before calling `suspendVM` (a non-suspendable SSH/ADB env declares
|
|
59
|
+
* `capabilities.suspendable: false` but still has the method, which returns `"unsupported"`). Non-remote
|
|
60
|
+
* (in-process) envs are not suspendable.
|
|
61
|
+
*
|
|
62
|
+
* A composite type guard (structural AND capability) so a `suspendVM` call site narrowed by THIS predicate
|
|
63
|
+
* gets the {@link RemoteExecutionEnv} type without a cast — `true` always implies the structural check too.
|
|
64
|
+
*/
|
|
65
|
+
export function isSuspendable(env) {
|
|
66
|
+
return isRemoteExecutionEnv(env) && env.capabilities.suspendable;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Is this env an isolated sandbox (design/61 §9 A, design/53)? `false` for a real SSH host / ADB device AND
|
|
70
|
+
* for any in-process env (the host process is not isolated). The orchestrator tightens autonomy + the
|
|
71
|
+
* design/37 policy gate when this is `false` (zero-trust on an un-isolated target). The safe default is
|
|
72
|
+
* `false` — isolation must be explicitly declared, never assumed.
|
|
73
|
+
*/
|
|
74
|
+
export function isIsolated(env) {
|
|
75
|
+
return isRemoteExecutionEnv(env) ? env.capabilities.isolation : false;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=remote-env.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-env.js","sourceRoot":"","sources":["../../src/core/remote-env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAyLH;;;;;GAKG;AACH,MAAM,OAAO,oBAAqB,SAAQ,KAAK;IACpC,IAAI,CAA2B;IAExC,YAAY,IAA8B,EAAE,OAAe,EAAE,KAAa;QACxE,KAAK,CAAC,OAAO,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;QAC5D,IAAI,CAAC,IAAI,GAAG,sBAAsB,CAAC;QACnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CACF;AA6LD,iHAAiH;AACjH,MAAM,UAAU,UAAU,CAAC,GAAiB;IAC1C,OAAO,OAAQ,GAA6B,CAAC,OAAO,KAAK,UAAU,CAAC;AACtE,CAAC;AAED,sHAAsH;AACtH,MAAM,UAAU,oBAAoB,CAAC,GAAiB;IACpD,MAAM,CAAC,GAAG,GAAkC,CAAC;IAC7C,OAAO,CACL,OAAO,CAAC,CAAC,eAAe,KAAK,UAAU;QACvC,OAAO,CAAC,CAAC,UAAU,KAAK,UAAU;QAClC,OAAO,CAAC,CAAC,SAAS,KAAK,UAAU;QACjC,OAAO,CAAC,CAAC,OAAO,KAAK,UAAU;QAC/B,OAAO,CAAC,CAAC,YAAY,KAAK,QAAQ;QAClC,CAAC,CAAC,YAAY,KAAK,IAAI,CACxB,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,aAAa,CAAC,GAAiB;IAC7C,OAAO,oBAAoB,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,YAAY,CAAC,WAAW,CAAC;AACnE,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,GAAiB;IAC1C,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { ThinkingLevel } from "../internal/harness.js";
|
|
2
|
+
import type { Model } from "../internal/llm.js";
|
|
3
|
+
import type { ModelRef, ModelRole, ModelRoles } from "./types.js";
|
|
4
|
+
export type { ModelRole, RoleSpec, ModelRoles } from "./types.js";
|
|
5
|
+
/** Resolve a string ModelRef against the catalog (a Model object passes through). */
|
|
6
|
+
export declare function resolveModel(ref: ModelRef, models?: Record<string, Model>): Model;
|
|
7
|
+
/** 档位降档链(强→弱)。解析某档无绑定时沿链向后找第一个有绑定的档(fail-open 可用性优先;绑定缺口
|
|
8
|
+
* 在部署 catalog 审计面可见)。`ultra` 预留:排在 `max` 前,今天不绑,未来加档零码改。 */
|
|
9
|
+
export declare const DEFAULT_TIER_ORDER: readonly string[];
|
|
10
|
+
/** CC 档位词 → sema 档位(内置固定,兼容层):fable/mythos→max · opus→pro · sonnet→flash · haiku→lite。 */
|
|
11
|
+
export declare const CC_MODEL_TIER_ALIASES: Readonly<Record<string, string>>;
|
|
12
|
+
export declare function expandTiers(models: Record<string, Model> | undefined, tiers: Record<string, ModelRef> | undefined): Record<string, Model> | undefined;
|
|
13
|
+
export interface ModelMention {
|
|
14
|
+
/** The matched model name — always one of `allowedNames` — or undefined if none was found. */
|
|
15
|
+
model?: string;
|
|
16
|
+
/** The message with the matched `@model` token removed and whitespace tidied. */
|
|
17
|
+
cleanedText: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Parse a leading/inline `@model` mention out of a user message, restoring the chat "@-model" UX.
|
|
21
|
+
* Returns the matched model **name** (a catalog ref the caller resolves), never a Model object — and
|
|
22
|
+
* **only ever a name from `allowedNames`**. This is the security boundary: untrusted end-user text can
|
|
23
|
+
* pick *which configured model* to use, but can never inject an arbitrary `baseUrl`/`apiKey`/Model
|
|
24
|
+
* (see design/11). Matches the first allow-listed mention; the rest of the text is returned cleaned.
|
|
25
|
+
*
|
|
26
|
+
* Typical use: `const { model, cleanedText } = parseModelMention(userMsg, Object.keys(deps.models));`
|
|
27
|
+
* then `runTask({ objective: cleanedText, model })` (omit `model` to fall back to the default role).
|
|
28
|
+
*/
|
|
29
|
+
export declare function parseModelMention(text: string, allowedNames: Iterable<string>): ModelMention;
|
|
30
|
+
/**
|
|
31
|
+
* Role → 档位默认表(clay 拍 2026-07-11:「role 体系用户不感知」)。配了 `RunnerDeps.tiers` 的部署,
|
|
32
|
+
* 各 role 未显式配置时自动落到语义档位——用户/壳只感知档位,roles 降级为内部路由层:
|
|
33
|
+
* - `default` → `pro`(主力档兜底;用户/部署 roles.default / TaskSpec.model 恒可覆盖);
|
|
34
|
+
* - `summarize` → `flash`(压缩本该便宜;flash 未绑沿降档链到 lite);
|
|
35
|
+
* - `advisor` → 第一档(`ultra` 起,未绑降档到 max/pro——teacher 用最强的);
|
|
36
|
+
* - `verifier` → `pro`;
|
|
37
|
+
* - `subagent`/`team`/`synthesize` 无档位默认 = 走 FALLBACK 继承主模型(LLM 可经 model 参数自选档)。
|
|
38
|
+
* 未配 tiers 的部署:catalog 无 TIERS_ACTIVE 标记 → 表整体 INERT,行为与从前逐字节一致
|
|
39
|
+
* (即使 catalog 恰有裸模型名 `pro`/`flash` 也不入档位路由——INERT 靠配置成立,不靠键名运气)。
|
|
40
|
+
*/
|
|
41
|
+
export declare const ROLE_TIER_DEFAULTS: Readonly<Partial<Record<ModelRole, string>>>;
|
|
42
|
+
export interface ResolvedRole {
|
|
43
|
+
model: Model;
|
|
44
|
+
/** The effective thinking level: explicit `spec.thinking` wins, else the role's default. */
|
|
45
|
+
thinking?: ThinkingLevel;
|
|
46
|
+
/** The requested role's preset system prompt, if it set one (independent of model fallback). */
|
|
47
|
+
systemPrompt?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the model (and default thinking) for a task. Explicit `spec.model` wins; otherwise walk the
|
|
51
|
+
* `modelRole`'s fallback chain over the merged roles (task overrides runner) and use the first role
|
|
52
|
+
* that supplies a model. Throws a helpful error if nothing resolves.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveTaskModel(spec: {
|
|
55
|
+
model?: ModelRef;
|
|
56
|
+
modelRole?: ModelRole;
|
|
57
|
+
roles?: ModelRoles;
|
|
58
|
+
thinking?: ThinkingLevel;
|
|
59
|
+
}, deps: {
|
|
60
|
+
models?: Record<string, Model>;
|
|
61
|
+
roles?: ModelRoles;
|
|
62
|
+
}): ResolvedRole;
|
|
63
|
+
/**
|
|
64
|
+
* Resolve a role's model **only if that exact role key is configured** (no fallback chain). Used for
|
|
65
|
+
* the `summarize` compaction model: override only when a summarize-specific model is set, otherwise
|
|
66
|
+
* let the caller fall back to the main model (unchanged behavior).
|
|
67
|
+
*/
|
|
68
|
+
export declare function roleModelIfSet(role: ModelRole, spec: {
|
|
69
|
+
roles?: ModelRoles;
|
|
70
|
+
}, deps: {
|
|
71
|
+
models?: Record<string, Model>;
|
|
72
|
+
roles?: ModelRoles;
|
|
73
|
+
}): Model | undefined;
|
|
74
|
+
//# sourceMappingURL=roles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.d.ts","sourceRoot":"","sources":["../../src/core/roles.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAY,MAAM,YAAY,CAAC;AAE5E,YAAY,EAAE,SAAS,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAElE,qFAAqF;AACrF,wBAAgB,YAAY,CAAC,GAAG,EAAE,QAAQ,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,KAAK,CAWjF;AAUD;6DAC6D;AAC7D,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAA6C,CAAC;AAE9F,0FAA0F;AAC1F,eAAO,MAAM,qBAAqB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMlE,CAAC;AAuBF,wBAAgB,WAAW,CACzB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,SAAS,EACzC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,GAC1C,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GAAG,SAAS,CAiCnC;AAED,MAAM,WAAW,YAAY;IAC3B,8FAA8F;IAC9F,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,GAAG,YAAY,CAiB5F;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAK3E,CAAC;AA8FF,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,4FAA4F;IAC5F,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,gGAAgG;IAChG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,QAAQ,CAAC;IAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,aAAa,CAAA;CAAE,EAC/F,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,GAC3D,YAAY,CAmCd;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,IAAI,EAAE,SAAS,EACf,IAAI,EAAE;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,EAC5B,IAAI,EAAE;IAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAAC,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,GAC3D,KAAK,GAAG,SAAS,CAKnB"}
|