@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,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded rolling-TAIL accumulator for streaming exec output (sema D2) — FIRST-PARTY, vendor-independent.
|
|
3
|
+
*
|
|
4
|
+
* A model-driven `yes` / `cat big.bin` over a 120s/600s shell can emit gigabytes; accumulating it unbounded OOMs
|
|
5
|
+
* a durable worker. We keep only the LAST `maxBytes` — the tail (errors + the exit code are at the end, which is
|
|
6
|
+
* what the model needs) — dropping the head as it overflows, plus a count of dropped bytes for a visible marker.
|
|
7
|
+
*
|
|
8
|
+
* This lives in `src/core/` — NOT `src/vendor/` — on purpose: it is OUR robustness invariant, shared by the
|
|
9
|
+
* (currently-vendored) NodeExecutionEnv AND a downstream exec adapter (service host/ssh/adb/docker/k8s, [267]).
|
|
10
|
+
* One implementation + ONE model-facing marker text = zero drift, and the public export points at a STABLE path
|
|
11
|
+
* that survives the planned de-vendoring (when NodeExecutionEnv is naturalized out of `src/vendor/`, nothing rebinds).
|
|
12
|
+
*/
|
|
13
|
+
export declare const MAX_EXEC_OUTPUT_BYTES: number;
|
|
14
|
+
/**
|
|
15
|
+
* Push-based bounded tail: feed it raw output chunks (Buffers); it retains only the last `maxBytes`, dropping the
|
|
16
|
+
* head incrementally so memory is O(maxBytes) regardless of total output. Byte-precise (the OOM bound is bytes).
|
|
17
|
+
*/
|
|
18
|
+
export declare class RollingTailBuffer {
|
|
19
|
+
private readonly maxBytes;
|
|
20
|
+
private readonly chunks;
|
|
21
|
+
private size;
|
|
22
|
+
private dropped;
|
|
23
|
+
constructor(maxBytes?: number);
|
|
24
|
+
/** Append a chunk; evict head bytes (whole or partial chunks) until within `maxBytes`. */
|
|
25
|
+
push(chunk: Buffer): void;
|
|
26
|
+
/** The retained tail decoded as UTF-8, plus how many bytes were dropped off the head. */
|
|
27
|
+
result(): {
|
|
28
|
+
text: string;
|
|
29
|
+
droppedBytes: number;
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Prepend a model-visible marker when `droppedBytes > 0` (only the TAIL was kept). The SINGLE source of the
|
|
34
|
+
* marker wording so the engine and any downstream adapter show the model the SAME thing.
|
|
35
|
+
*/
|
|
36
|
+
export declare function markTruncated(text: string, droppedBytes: number): string;
|
|
37
|
+
//# sourceMappingURL=exec-output-tail.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec-output-tail.d.ts","sourceRoot":"","sources":["../../src/core/exec-output-tail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,qBAAqB,QAAkB,CAAC;AAErD;;;GAGG;AACH,qBAAa,iBAAiB;IAKhB,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAJrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,IAAI,CAAK;IACjB,OAAO,CAAC,OAAO,CAAK;gBAES,QAAQ,GAAE,MAA8B;IAErE,0FAA0F;IAC1F,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAqBzB,yFAAyF;IACzF,MAAM,IAAI;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE;CAGjD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,MAAM,CAIxE"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bounded rolling-TAIL accumulator for streaming exec output (sema D2) — FIRST-PARTY, vendor-independent.
|
|
3
|
+
*
|
|
4
|
+
* A model-driven `yes` / `cat big.bin` over a 120s/600s shell can emit gigabytes; accumulating it unbounded OOMs
|
|
5
|
+
* a durable worker. We keep only the LAST `maxBytes` — the tail (errors + the exit code are at the end, which is
|
|
6
|
+
* what the model needs) — dropping the head as it overflows, plus a count of dropped bytes for a visible marker.
|
|
7
|
+
*
|
|
8
|
+
* This lives in `src/core/` — NOT `src/vendor/` — on purpose: it is OUR robustness invariant, shared by the
|
|
9
|
+
* (currently-vendored) NodeExecutionEnv AND a downstream exec adapter (service host/ssh/adb/docker/k8s, [267]).
|
|
10
|
+
* One implementation + ONE model-facing marker text = zero drift, and the public export points at a STABLE path
|
|
11
|
+
* that survives the planned de-vendoring (when NodeExecutionEnv is naturalized out of `src/vendor/`, nothing rebinds).
|
|
12
|
+
*/
|
|
13
|
+
export const MAX_EXEC_OUTPUT_BYTES = 8 * 1024 * 1024;
|
|
14
|
+
/**
|
|
15
|
+
* Push-based bounded tail: feed it raw output chunks (Buffers); it retains only the last `maxBytes`, dropping the
|
|
16
|
+
* head incrementally so memory is O(maxBytes) regardless of total output. Byte-precise (the OOM bound is bytes).
|
|
17
|
+
*/
|
|
18
|
+
export class RollingTailBuffer {
|
|
19
|
+
maxBytes;
|
|
20
|
+
chunks = [];
|
|
21
|
+
size = 0; // bytes currently retained (always ≤ maxBytes after a push)
|
|
22
|
+
dropped = 0; // bytes dropped off the head
|
|
23
|
+
constructor(maxBytes = MAX_EXEC_OUTPUT_BYTES) {
|
|
24
|
+
this.maxBytes = maxBytes;
|
|
25
|
+
}
|
|
26
|
+
/** Append a chunk; evict head bytes (whole or partial chunks) until within `maxBytes`. */
|
|
27
|
+
push(chunk) {
|
|
28
|
+
if (chunk.length === 0)
|
|
29
|
+
return;
|
|
30
|
+
this.chunks.push(chunk);
|
|
31
|
+
this.size += chunk.length;
|
|
32
|
+
while (this.size > this.maxBytes) {
|
|
33
|
+
const over = this.size - this.maxBytes;
|
|
34
|
+
const head = this.chunks[0];
|
|
35
|
+
if (over >= head.length) {
|
|
36
|
+
this.chunks.shift();
|
|
37
|
+
this.size -= head.length;
|
|
38
|
+
this.dropped += head.length;
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
// trim `over` bytes off the head chunk's front (a partial drop; a multi-byte char split here decodes to
|
|
42
|
+
// one replacement char at the very start of the tail — harmless, the output is already marked truncated).
|
|
43
|
+
this.chunks[0] = head.subarray(over);
|
|
44
|
+
this.size -= over;
|
|
45
|
+
this.dropped += over;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
/** The retained tail decoded as UTF-8, plus how many bytes were dropped off the head. */
|
|
50
|
+
result() {
|
|
51
|
+
return { text: Buffer.concat(this.chunks).toString("utf8"), droppedBytes: this.dropped };
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Prepend a model-visible marker when `droppedBytes > 0` (only the TAIL was kept). The SINGLE source of the
|
|
56
|
+
* marker wording so the engine and any downstream adapter show the model the SAME thing.
|
|
57
|
+
*/
|
|
58
|
+
export function markTruncated(text, droppedBytes) {
|
|
59
|
+
return droppedBytes > 0
|
|
60
|
+
? `[... ${droppedBytes} earlier byte(s) truncated; showing last ${MAX_EXEC_OUTPUT_BYTES} ...]\n${text}`
|
|
61
|
+
: text;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=exec-output-tail.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exec-output-tail.js","sourceRoot":"","sources":["../../src/core/exec-output-tail.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,GAAG,IAAI,GAAG,IAAI,CAAC;AAErD;;;GAGG;AACH,MAAM,OAAO,iBAAiB;IAKC;IAJZ,MAAM,GAAa,EAAE,CAAC;IAC/B,IAAI,GAAG,CAAC,CAAC,CAAC,4DAA4D;IACtE,OAAO,GAAG,CAAC,CAAC,CAAC,6BAA6B;IAElD,YAA6B,WAAmB,qBAAqB;QAAxC,aAAQ,GAAR,QAAQ,CAAgC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AQ,YAAY,4CAA4C,qBAAqB,UAAU,IAAI,EAAE;QACvG,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import type { ExecutionEnv } from "../internal/harness.js";
|
|
2
|
+
export interface FileSnapshotError {
|
|
3
|
+
/** `too_large` = the tree exceeded a bound (fail-CLOSED, NOT a silent partial snapshot); `not_found` = no
|
|
4
|
+
* snapshot for that key; `aborted` = the signal fired; the rest = an underlying fs op failed. */
|
|
5
|
+
code: "too_large" | "enumerate_failed" | "read_failed" | "restore_failed" | "not_found" | "aborted";
|
|
6
|
+
message: string;
|
|
7
|
+
}
|
|
8
|
+
export type FileSnapshotResult = {
|
|
9
|
+
ok: true;
|
|
10
|
+
} | {
|
|
11
|
+
ok: false;
|
|
12
|
+
error: FileSnapshotError;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Capture/restore a working-tree file set keyed by `(scope, key)` — `scope` = sessionId, `key` =
|
|
16
|
+
* `SessionTreeEntry.id` (same anchor as E18 resume-at). All methods are best-effort and NEVER throw — failures
|
|
17
|
+
* are encoded in the returned {@link FileSnapshotResult} (mirrors the ExecutionEnv FileSystem contract).
|
|
18
|
+
*
|
|
19
|
+
* **v1 fidelity bounds (design/101 §defer):** files only — symlinks are NOT captured and are REMOVED by
|
|
20
|
+
* `restore` (they are a path-escape vector); empty directories are not tracked; `restore` re-enumerates under
|
|
21
|
+
* the SAME bounds, so a tree that grew past a bound since the snapshot cannot be rewound (fail-closed).
|
|
22
|
+
*/
|
|
23
|
+
export interface FileSnapshotStore {
|
|
24
|
+
/** Capture the tree under `root` for `(scope, key)`. CREATE-ONCE: a second call for an existing key is a
|
|
25
|
+
* no-op `{ok:true}` (a session entry id is immutable, so its tree state is too). */
|
|
26
|
+
snapshot(scope: string, key: string, env: ExecutionEnv, root: string, signal?: AbortSignal): Promise<FileSnapshotResult>;
|
|
27
|
+
/** Converge the tree under `root` back to the snapshot for `(scope, key)`: remove obstructions/strays
|
|
28
|
+
* (symlinks + files created since), then write every captured file — so the tree MATCHES the snapshot. */
|
|
29
|
+
restore(scope: string, key: string, env: ExecutionEnv, root: string, signal?: AbortSignal): Promise<FileSnapshotResult>;
|
|
30
|
+
/** Whether a snapshot exists for `(scope, key)`. */
|
|
31
|
+
has(scope: string, key: string): Promise<boolean>;
|
|
32
|
+
/** GC: drop every snapshot in `scope` whose key is NOT in `keepKeys` (e.g. unreachable branches). Returns the
|
|
33
|
+
* number of snapshots removed. */
|
|
34
|
+
reap(scope: string, keepKeys: string[]): Promise<number>;
|
|
35
|
+
/** Every snapshot key in `scope` (order unspecified). The enumeration counterpart of {@link reap} (which
|
|
36
|
+
* already iterates the same set internally) — exposed for a cross-backend session EXPORT (service 2c
|
|
37
|
+
* session-sync, [266]): list a session's snapshot keys to move its {entries + file snapshots} to another
|
|
38
|
+
* backend. A durable backend implements it as a `SELECT key WHERE scope = ?`. */
|
|
39
|
+
listKeys(scope: string): Promise<string[]>;
|
|
40
|
+
/**
|
|
41
|
+
* 2c session-sync ([271]): the manifest (`relPath → blobHash`) for `(scope, key)`, or `null` if absent — to
|
|
42
|
+
* EXPORT a snapshot's content to another backend. Pairs with {@link getBlob} for CONTENT-ADDRESSED (deduped)
|
|
43
|
+
* blob transfer: the caller fetches each distinct hash ONCE across all of a session's snapshots. Optional — a
|
|
44
|
+
* backend that supports cross-backend snapshot export implements it.
|
|
45
|
+
*/
|
|
46
|
+
exportManifest?(scope: string, key: string): Promise<Map<string, string> | null>;
|
|
47
|
+
/** 2c session-sync ([271]): the content-addressed bytes for `hash` (undefined if absent). */
|
|
48
|
+
getBlob?(hash: string): Promise<Uint8Array | undefined>;
|
|
49
|
+
/**
|
|
50
|
+
* 2c session-sync ([273]): STORE a snapshot INTO this store from another store's {@link exportManifest} +
|
|
51
|
+
* {@link getBlob} output — the import-side mirror that closes the cross-backend transfer loop. For each DISTINCT
|
|
52
|
+
* blob hash in `manifest`, fetch its bytes via `srcGetBlob`, VERIFY content-address integrity
|
|
53
|
+
* (`sha256(bytes) === hash`), and store it (content-addressed dedup); THEN record `(scope, key) → manifest`.
|
|
54
|
+
*
|
|
55
|
+
* - CREATE-ONCE: a second import for an existing key is a no-op `{ok:true}` (an entry id is immutable).
|
|
56
|
+
* - FAIL-CLOSED: a missing OR hash-mismatched source blob → `read_failed` and NO manifest is committed (never a
|
|
57
|
+
* partial snapshot that a later {@link restore} would silently truncate). The manifest's relPaths are NOT
|
|
58
|
+
* re-validated here — `restore` remains the path-escape gate (it already neutralizes unsafe relPaths).
|
|
59
|
+
* - Pure store→store: does NOT touch an `ExecutionEnv` (unlike `applyManifest`, which converges ONE snapshot to a
|
|
60
|
+
* working tree; import preserves ALL historical snapshots in the dst store so a later rewind-to-past finds them).
|
|
61
|
+
*
|
|
62
|
+
* Optional — a backend that supports cross-backend snapshot import implements it.
|
|
63
|
+
*/
|
|
64
|
+
importManifest?(scope: string, key: string, manifest: Map<string, string>, srcGetBlob: (hash: string) => Promise<Uint8Array | undefined>): Promise<FileSnapshotResult>;
|
|
65
|
+
/**
|
|
66
|
+
* 2c session-sync ([277]): STORE a single content-addressed blob — the symmetric WRITE side of {@link getBlob},
|
|
67
|
+
* for a two-phase PUSH (upload blobs, THEN import the manifest that references them). VERIFIES content-address
|
|
68
|
+
* integrity (`sha256(bytes) === hash`) so a corrupt/mismatched upload can never poison the store (a later
|
|
69
|
+
* getBlob/restore would otherwise return wrong content); a mismatch → `read_failed`, nothing stored. IMMUTABLE +
|
|
70
|
+
* content-addressed: a repeat putBlob for the same hash is a no-op (the bytes are identical by definition).
|
|
71
|
+
* Returns a {@link FileSnapshotResult} (NOT void) so the integrity failure is encodable under the never-throw
|
|
72
|
+
* contract. Optional — a backend that supports a two-phase push implements it.
|
|
73
|
+
*
|
|
74
|
+
* ⚠️ ORCHESTRATION CAVEAT: a pushed blob is NOT yet referenced by any manifest (the matching
|
|
75
|
+
* {@link importManifest} runs LATER), so — unlike `snapshot`/`importManifest`, which hold their blobs in an
|
|
76
|
+
* `inFlight` live-set across the whole store-then-commit — a `putBlob`'d blob is reap-ELIGIBLE in the window
|
|
77
|
+
* before its manifest is imported. The two-phase pusher MUST NOT `reap` the scope between PUT and import (a
|
|
78
|
+
* grace-window). This is fail-closed, not corrupting: blobs are content-addressed (re-push is always safe) and
|
|
79
|
+
* `importManifest` re-verifies+stores every blob before committing, so a reaped blob → `read_failed` with NO
|
|
80
|
+
* dangling-reference manifest, never wrong content.
|
|
81
|
+
*/
|
|
82
|
+
putBlob?(hash: string, bytes: Uint8Array): Promise<FileSnapshotResult>;
|
|
83
|
+
}
|
|
84
|
+
/** Bounds for the reference enumerator — a deliberate, fail-CLOSED cost policy (NOT the grep walk's silent caps). */
|
|
85
|
+
export interface FileSnapshotBounds {
|
|
86
|
+
/** Hard cap on file count; exceeding it REFUSES the snapshot (`too_large`) rather than silently truncating. */
|
|
87
|
+
maxFiles: number;
|
|
88
|
+
/** Hard cap on total bytes; exceeding it REFUSES the snapshot. */
|
|
89
|
+
maxBytes: number;
|
|
90
|
+
/** Directory BASENAMES skipped anywhere in the tree (cost bound). Default `.git` + `node_modules`. */
|
|
91
|
+
ignoreDirs: Set<string>;
|
|
92
|
+
}
|
|
93
|
+
export declare const DEFAULT_SNAPSHOT_BOUNDS: FileSnapshotBounds;
|
|
94
|
+
/**
|
|
95
|
+
* Capture the working tree under `root` into a manifest `relPath → sha256`, handing each file's bytes to
|
|
96
|
+
* `putBlob` (the backend stores them content-addressed). **The env-operating + security-critical half a durable
|
|
97
|
+
* backend MUST reuse** (not re-implement — duplication risks re-introducing the symlink-escape / fail-closed
|
|
98
|
+
* bugs the dual-review fixed). Fail-CLOSED: an enumerate/read/bound failure returns an error and the caller must
|
|
99
|
+
* NOT persist a partial manifest. Never throws.
|
|
100
|
+
*/
|
|
101
|
+
export declare function captureManifest(env: ExecutionEnv, root: string, bounds: FileSnapshotBounds, signal: AbortSignal | undefined, putBlob: (hash: string, bytes: Uint8Array) => void | Promise<void>): Promise<{
|
|
102
|
+
ok: true;
|
|
103
|
+
value: Map<string, string>;
|
|
104
|
+
} | {
|
|
105
|
+
ok: false;
|
|
106
|
+
error: FileSnapshotError;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* CONVERGE the tree under `root` to `manifest`, loading each captured file's bytes via `getBlob`. **The
|
|
110
|
+
* env-operating + security-critical half a durable backend MUST reuse.** Order is load-bearing (codex BLOCKER +
|
|
111
|
+
* Opus M1): PHASE 1 removes every current symlink (neutralizes a `dir -> /outside` ancestor that writeFile would
|
|
112
|
+
* otherwise follow OUT of root) + every file created since; PHASE 2 writes each captured file, clearing a
|
|
113
|
+
* directory that now occupies a file's path first. Never throws.
|
|
114
|
+
*/
|
|
115
|
+
export declare function applyManifest(env: ExecutionEnv, root: string, bounds: FileSnapshotBounds, signal: AbortSignal | undefined, manifest: Map<string, string>, getBlob: (hash: string) => Uint8Array | undefined | Promise<Uint8Array | undefined>): Promise<FileSnapshotResult>;
|
|
116
|
+
/**
|
|
117
|
+
* In-memory, content-addressed reference {@link FileSnapshotStore}. Blobs are deduplicated by sha256 ACROSS all
|
|
118
|
+
* snapshots (a file unchanged between turns is stored once); each snapshot keeps a manifest `relPath → hash`.
|
|
119
|
+
* Single-process (the default-deps reference; a durable/file-backed impl mirrors `src/stores/file/`).
|
|
120
|
+
*/
|
|
121
|
+
export declare class InMemoryFileSnapshotStore implements FileSnapshotStore {
|
|
122
|
+
private readonly blobs;
|
|
123
|
+
private readonly manifests;
|
|
124
|
+
private readonly inFlight;
|
|
125
|
+
private readonly bounds;
|
|
126
|
+
constructor(bounds?: Partial<FileSnapshotBounds>);
|
|
127
|
+
snapshot(scope: string, key: string, env: ExecutionEnv, root: string, signal?: AbortSignal): Promise<FileSnapshotResult>;
|
|
128
|
+
restore(scope: string, key: string, env: ExecutionEnv, root: string, signal?: AbortSignal): Promise<FileSnapshotResult>;
|
|
129
|
+
has(scope: string, key: string): Promise<boolean>;
|
|
130
|
+
listKeys(scope: string): Promise<string[]>;
|
|
131
|
+
exportManifest(scope: string, key: string): Promise<Map<string, string> | null>;
|
|
132
|
+
getBlob(hash: string): Promise<Uint8Array | undefined>;
|
|
133
|
+
putBlob(hash: string, bytes: Uint8Array): Promise<FileSnapshotResult>;
|
|
134
|
+
importManifest(scope: string, key: string, manifest: Map<string, string>, srcGetBlob: (hash: string) => Promise<Uint8Array | undefined>): Promise<FileSnapshotResult>;
|
|
135
|
+
reap(scope: string, keepKeys: string[]): Promise<number>;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=file-snapshot-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-snapshot-store.d.ts","sourceRoot":"","sources":["../../src/core/file-snapshot-store.ts"],"names":[],"mappings":"AA+BA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAO3D,MAAM,WAAW,iBAAiB;IAChC;sGACkG;IAClG,IAAI,EAAE,WAAW,GAAG,kBAAkB,GAAG,aAAa,GAAG,gBAAgB,GAAG,WAAW,GAAG,SAAS,CAAC;IACpG,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,KAAK,EAAE,iBAAiB,CAAA;CAAE,CAAC;AAExF;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC;yFACqF;IACrF,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACzH;+GAC2G;IAC3G,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,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ionEnv and
|
|
3
|
+
// may be of the OTHER family than the host (win engine × POSIX remote env, or the reverse). Family-aware
|
|
4
|
+
// string helpers instead (same philosophy as tools/fs/safety.ts channel [384]/[385]).
|
|
5
|
+
const normSlash = (p) => p.replace(/\\/g, "/");
|
|
6
|
+
const stripTrailSep = (p) => p.replace(/[\\/]+$/, "");
|
|
7
|
+
const foldDrive = (p) => (/^[A-Za-z]:(\/|$)/.test(p) ? p[0].toLowerCase() + p.slice(1) : p);
|
|
8
|
+
/** codex 1.237 F7: family detector — fold "\" only under a WIN-family root; a POSIX tree may legally
|
|
9
|
+
* contain literal backslashes in FILE NAMES, and folding them corrupted both the manifest key and the
|
|
10
|
+
* restore target. Win-form = drive-rooted, UNC, or relative-with-backslash (never "/"-rooted). */
|
|
11
|
+
const isWinFormPath = (p) => /^[A-Za-z]:[\\/]/.test(p) || p.startsWith("\\\\") || (!p.startsWith("/") && p.includes("\\"));
|
|
12
|
+
/** rel path of `child` under `root` in "/" form (win root) / verbatim form (posix root); null when not under. */
|
|
13
|
+
function relUnder(root, child) {
|
|
14
|
+
const fold = isWinFormPath(root) ? normSlash : (p) => p;
|
|
15
|
+
const r = foldDrive(fold(stripTrailSep(root)));
|
|
16
|
+
const c = foldDrive(fold(child));
|
|
17
|
+
if (c === r)
|
|
18
|
+
return "";
|
|
19
|
+
if (!c.startsWith(r + "/"))
|
|
20
|
+
return null;
|
|
21
|
+
return fold(child).slice(fold(stripTrailSep(root)).length + 1);
|
|
22
|
+
}
|
|
23
|
+
/** Join root + a "/"-form relPath using the ROOT's native separator (keys stay family-consistent). */
|
|
24
|
+
function joinUnder(root, rel) {
|
|
25
|
+
const win = isWinFormPath(root);
|
|
26
|
+
return stripTrailSep(root) + (win ? "\\" : "/") + (win ? rel.replace(/\//g, "\\") : rel);
|
|
27
|
+
}
|
|
28
|
+
/** A manifest relPath is SAFE iff it is relative in both families and contains no ".." segment. */
|
|
29
|
+
function isUnsafeRelPath(relN) {
|
|
30
|
+
return relN.startsWith("/") || /^[A-Za-z]:/.test(relN) || relN.split("/").includes("..");
|
|
31
|
+
}
|
|
32
|
+
export const DEFAULT_SNAPSHOT_BOUNDS = {
|
|
33
|
+
// clay (2026-06-26): raised from 2000/64MiB. Snapshot blobs go to OBJECT STORAGE (not a DB row), so there is no
|
|
34
|
+
// per-row size limit — a whole-tree snapshot can be larger. These are per-turn COST ceilings (bound the
|
|
35
|
+
// read+hash work each turn), not storage limits; a backend may raise them further per its object-store budget.
|
|
36
|
+
maxFiles: 10000,
|
|
37
|
+
maxBytes: 256 * 1024 * 1024,
|
|
38
|
+
ignoreDirs: new Set([".git", "node_modules"]),
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Enumerate every FILE under `root` (DFS), plus the SYMLINKS at the level they appear (not traversed). Skips
|
|
42
|
+
* `ignoreDirs`. Fail-CLOSED: if a directory cannot be read OR a bound is exceeded, returns an error — a PARTIAL
|
|
43
|
+
* list would make `restore` data-lossy (leaving stray files / never restoring a dropped one). This is E19's OWN
|
|
44
|
+
* enumerator: unlike the grep `walk` it does NOT skip binary files or dotfiles (a `.env` is a real working-tree
|
|
45
|
+
* file) and does NOT honor `.gitignore` beyond the explicit `ignoreDirs` policy.
|
|
46
|
+
*/
|
|
47
|
+
async function enumerateTree(env, root, bounds, signal) {
|
|
48
|
+
const files = [];
|
|
49
|
+
const symlinks = [];
|
|
50
|
+
let totalBytes = 0;
|
|
51
|
+
const stack = [root];
|
|
52
|
+
while (stack.length > 0) {
|
|
53
|
+
if (signal?.aborted)
|
|
54
|
+
return { ok: false, error: { code: "aborted", message: "aborted" } };
|
|
55
|
+
const dir = stack.pop();
|
|
56
|
+
const ls = await env.listDir(dir, signal);
|
|
57
|
+
if (!ls.ok) {
|
|
58
|
+
return { ok: false, error: { code: "enumerate_failed", message: `listDir ${dir}: ${ls.error.code}` } };
|
|
59
|
+
}
|
|
60
|
+
for (const info of ls.value) {
|
|
61
|
+
if (info.kind === "symlink") {
|
|
62
|
+
// Record but do NOT traverse — listDir is no-follow, so we stop at the FIRST symlink in any path. That
|
|
63
|
+
// lets restore neutralize a symlink ANCESTOR (e.g. `dir -> /outside`) by removing it before any write.
|
|
64
|
+
symlinks.push(info.path);
|
|
65
|
+
}
|
|
66
|
+
else if (info.kind === "directory") {
|
|
67
|
+
if (!bounds.ignoreDirs.has(info.name))
|
|
68
|
+
stack.push(info.path);
|
|
69
|
+
}
|
|
70
|
+
else if (info.kind === "file") {
|
|
71
|
+
// [K-PLATFORM-SWEEP]: family-agnostic rel key, stored in "/" form (portable across capture/restore
|
|
72
|
+
// families). walk guarantees descendants; a non-descendant here is a form anomaly → fail closed.
|
|
73
|
+
const relPath = relUnder(root, info.path);
|
|
74
|
+
if (relPath === null)
|
|
75
|
+
return { ok: false, error: { code: "enumerate_failed", message: `path escapes root form: ${info.path}` } };
|
|
76
|
+
files.push({ relPath, absPath: info.path, size: info.size });
|
|
77
|
+
totalBytes += info.size;
|
|
78
|
+
if (files.length > bounds.maxFiles)
|
|
79
|
+
return { ok: false, error: { code: "too_large", message: `> ${bounds.maxFiles} files` } };
|
|
80
|
+
if (totalBytes > bounds.maxBytes)
|
|
81
|
+
return { ok: false, error: { code: "too_large", message: `> ${bounds.maxBytes} bytes` } };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return { ok: true, value: { files, symlinks } };
|
|
86
|
+
}
|
|
87
|
+
const SEP = String.fromCharCode(0); // NUL sep: scope/key are public strings; a space-bearing id must not mis-slice reap().
|
|
88
|
+
const skey = (scope, key) => `${scope}${SEP}${key}`;
|
|
89
|
+
/**
|
|
90
|
+
* Capture the working tree under `root` into a manifest `relPath → sha256`, handing each file's bytes to
|
|
91
|
+
* `putBlob` (the backend stores them content-addressed). **The env-operating + security-critical half a durable
|
|
92
|
+
* backend MUST reuse** (not re-implement — duplication risks re-introducing the symlink-escape / fail-closed
|
|
93
|
+
* bugs the dual-review fixed). Fail-CLOSED: an enumerate/read/bound failure returns an error and the caller must
|
|
94
|
+
* NOT persist a partial manifest. Never throws.
|
|
95
|
+
*/
|
|
96
|
+
export async function captureManifest(env, root, bounds, signal, putBlob) {
|
|
97
|
+
const enumerated = await enumerateTree(env, root, bounds, signal);
|
|
98
|
+
if (!enumerated.ok)
|
|
99
|
+
return enumerated;
|
|
100
|
+
const manifest = new Map();
|
|
101
|
+
for (const f of enumerated.value.files) {
|
|
102
|
+
if (signal?.aborted)
|
|
103
|
+
return { ok: false, error: { code: "aborted", message: "aborted" } };
|
|
104
|
+
const rb = await env.readBinaryFile(f.absPath, signal);
|
|
105
|
+
if (!rb.ok)
|
|
106
|
+
return { ok: false, error: { code: "read_failed", message: `read ${f.relPath}: ${rb.error.code}` } };
|
|
107
|
+
const hash = createHash("sha256").update(rb.value).digest("hex");
|
|
108
|
+
await putBlob(hash, rb.value);
|
|
109
|
+
manifest.set(f.relPath, hash);
|
|
110
|
+
}
|
|
111
|
+
return { ok: true, value: manifest };
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* CONVERGE the tree under `root` to `manifest`, loading each captured file's bytes via `getBlob`. **The
|
|
115
|
+
* env-operating + security-critical half a durable backend MUST reuse.** Order is load-bearing (codex BLOCKER +
|
|
116
|
+
* Opus M1): PHASE 1 removes every current symlink (neutralizes a `dir -> /outside` ancestor that writeFile would
|
|
117
|
+
* otherwise follow OUT of root) + every file created since; PHASE 2 writes each captured file, clearing a
|
|
118
|
+
* directory that now occupies a file's path first. Never throws.
|
|
119
|
+
*/
|
|
120
|
+
export async function applyManifest(env, root, bounds, signal, manifest, getBlob) {
|
|
121
|
+
const cur = await enumerateTree(env, root, bounds, signal);
|
|
122
|
+
if (!cur.ok)
|
|
123
|
+
return cur; // can't see the current tree → can't safely converge it (fail-closed)
|
|
124
|
+
// PHASE 1 — REMOVE before any write. (a) every current symlink — a snapshot never captures one, so each is a
|
|
125
|
+
// stray/obstruction (and a symlink ANCESTOR would make writeFile escape root).
|
|
126
|
+
for (const link of cur.value.symlinks) {
|
|
127
|
+
if (signal?.aborted)
|
|
128
|
+
return { ok: false, error: { code: "aborted", message: "aborted" } };
|
|
129
|
+
const rm = await env.remove(link, { force: true });
|
|
130
|
+
if (!rm.ok)
|
|
131
|
+
return { ok: false, error: { code: "restore_failed", message: `remove symlink ${link}: ${rm.error.code}` } };
|
|
132
|
+
}
|
|
133
|
+
// (b) every current file NOT in the snapshot (created since).
|
|
134
|
+
for (const f of cur.value.files) {
|
|
135
|
+
if (signal?.aborted)
|
|
136
|
+
return { ok: false, error: { code: "aborted", message: "aborted" } };
|
|
137
|
+
if (!manifest.has(f.relPath)) {
|
|
138
|
+
const rm = await env.remove(f.absPath, { force: true });
|
|
139
|
+
if (!rm.ok)
|
|
140
|
+
return { ok: false, error: { code: "restore_failed", message: `remove ${f.relPath}: ${rm.error.code}` } };
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
// PHASE 2 — WRITE every captured file (writeFile creates parent dirs). Clear a directory that now occupies a
|
|
144
|
+
// path the snapshot needs as a file (`rm x; mkdir x`) so writeFile does not EISDIR.
|
|
145
|
+
for (const [relPath, hash] of manifest) {
|
|
146
|
+
if (signal?.aborted)
|
|
147
|
+
return { ok: false, error: { code: "aborted", message: "aborted" } };
|
|
148
|
+
// Containment guard, orthogonal to the PHASE-1 symlink removal: reject a manifest entry whose path
|
|
149
|
+
// escapes root via `..` (or is absolute). Normal capture stores `relative(root, descendant)` so this only
|
|
150
|
+
// fires on a tampered/foreign/SDK-supplied manifest — fail-closed, matching the symlink posture.
|
|
151
|
+
// [K-PLATFORM-SWEEP]: pure-string family-agnostic containment — absolute (either family) or ANY ".."
|
|
152
|
+
// segment is rejected (normal capture never produces one; stricter than the old host-path normalize).
|
|
153
|
+
// codex F7: fold legacy win-form manifest keys ONLY when restoring onto a win-family root — under a
|
|
154
|
+
// POSIX root a backslash in the key is a literal file-name character (kept verbatim; a LEGACY win
|
|
155
|
+
// manifest restored cross-family onto POSIX is out of scope — new win captures already store "/" keys).
|
|
156
|
+
const relN = isWinFormPath(root) ? normSlash(relPath) : relPath;
|
|
157
|
+
if (isUnsafeRelPath(relN)) {
|
|
158
|
+
return { ok: false, error: { code: "restore_failed", message: `unsafe relPath escapes root: ${relPath}` } };
|
|
159
|
+
}
|
|
160
|
+
const blob = await getBlob(hash);
|
|
161
|
+
if (!blob)
|
|
162
|
+
return { ok: false, error: { code: "restore_failed", message: `missing blob for ${relPath}` } };
|
|
163
|
+
const target = joinUnder(root, relN);
|
|
164
|
+
const fi = await env.fileInfo(target);
|
|
165
|
+
if (fi.ok && fi.value.kind === "directory") {
|
|
166
|
+
const rm = await env.remove(target, { recursive: true, force: true });
|
|
167
|
+
if (!rm.ok)
|
|
168
|
+
return { ok: false, error: { code: "restore_failed", message: `clear dir ${relPath}: ${rm.error.code}` } };
|
|
169
|
+
}
|
|
170
|
+
const w = await env.writeFile(target, blob);
|
|
171
|
+
if (!w.ok)
|
|
172
|
+
return { ok: false, error: { code: "restore_failed", message: `write ${relPath}: ${w.error.code}` } };
|
|
173
|
+
}
|
|
174
|
+
return { ok: true };
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* In-memory, content-addressed reference {@link FileSnapshotStore}. Blobs are deduplicated by sha256 ACROSS all
|
|
178
|
+
* snapshots (a file unchanged between turns is stored once); each snapshot keeps a manifest `relPath → hash`.
|
|
179
|
+
* Single-process (the default-deps reference; a durable/file-backed impl mirrors `src/stores/file/`).
|
|
180
|
+
*/
|
|
181
|
+
export class InMemoryFileSnapshotStore {
|
|
182
|
+
blobs = new Map(); // sha256(hex) → bytes (shared, dedup)
|
|
183
|
+
manifests = new Map(); // skey → (relPath → hash)
|
|
184
|
+
// skey → the blob hashes its mid-capture snapshot has written (create-once atomicity AND reap-safety: an
|
|
185
|
+
// in-flight snapshot's blobs are not yet in any manifest, so reap must treat them as LIVE — bug-hunt MAJOR-1,
|
|
186
|
+
// mirrors the File store at src/stores/file/file-snapshot-store.ts).
|
|
187
|
+
inFlight = new Map();
|
|
188
|
+
bounds;
|
|
189
|
+
constructor(bounds) {
|
|
190
|
+
// COPY ignoreDirs (codex review): the caller's Set is theirs — store our own so a later external mutation
|
|
191
|
+
// cannot change which dirs a restore enumerates (which could then delete a now-included dir's files).
|
|
192
|
+
this.bounds = {
|
|
193
|
+
maxFiles: bounds?.maxFiles ?? DEFAULT_SNAPSHOT_BOUNDS.maxFiles,
|
|
194
|
+
maxBytes: bounds?.maxBytes ?? DEFAULT_SNAPSHOT_BOUNDS.maxBytes,
|
|
195
|
+
ignoreDirs: new Set(bounds?.ignoreDirs ?? DEFAULT_SNAPSHOT_BOUNDS.ignoreDirs),
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
async snapshot(scope, key, env, root, signal) {
|
|
199
|
+
const sk = skey(scope, key);
|
|
200
|
+
// create-once + atomic: an existing OR in-flight snapshot for this immutable entry is a no-op.
|
|
201
|
+
if (this.manifests.has(sk) || this.inFlight.has(sk))
|
|
202
|
+
return { ok: true };
|
|
203
|
+
const written = new Set(); // hashes this capture has stored (reap treats them as live)
|
|
204
|
+
this.inFlight.set(sk, written);
|
|
205
|
+
try {
|
|
206
|
+
const captured = await captureManifest(env, root, this.bounds, signal, (hash, bytes) => {
|
|
207
|
+
written.add(hash); // record BEFORE the store so a racing reap never GCs a blob we are about to/just did set
|
|
208
|
+
if (!this.blobs.has(hash))
|
|
209
|
+
this.blobs.set(hash, bytes);
|
|
210
|
+
});
|
|
211
|
+
if (!captured.ok)
|
|
212
|
+
return captured;
|
|
213
|
+
// Commit ONLY after the full enumerate+read succeeds — never a partial manifest (fail-closed).
|
|
214
|
+
this.manifests.set(sk, captured.value);
|
|
215
|
+
return { ok: true };
|
|
216
|
+
}
|
|
217
|
+
finally {
|
|
218
|
+
this.inFlight.delete(sk);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
async restore(scope, key, env, root, signal) {
|
|
222
|
+
const manifest = this.manifests.get(skey(scope, key));
|
|
223
|
+
if (!manifest)
|
|
224
|
+
return { ok: false, error: { code: "not_found", message: `no snapshot for key ${key}` } };
|
|
225
|
+
return applyManifest(env, root, this.bounds, signal, manifest, (hash) => this.blobs.get(hash));
|
|
226
|
+
}
|
|
227
|
+
async has(scope, key) {
|
|
228
|
+
return this.manifests.has(skey(scope, key));
|
|
229
|
+
}
|
|
230
|
+
async listKeys(scope) {
|
|
231
|
+
// [266]: the enumeration half of reap — every committed snapshot key for this scope (NUL-sep prefix slice,
|
|
232
|
+
// same as reap). In-flight (not-yet-committed) snapshots are deliberately NOT listed (no manifest yet).
|
|
233
|
+
const prefix = `${scope}${SEP}`;
|
|
234
|
+
const keys = [];
|
|
235
|
+
for (const sk of this.manifests.keys()) {
|
|
236
|
+
if (sk.startsWith(prefix))
|
|
237
|
+
keys.push(sk.slice(prefix.length));
|
|
238
|
+
}
|
|
239
|
+
return keys;
|
|
240
|
+
}
|
|
241
|
+
async exportManifest(scope, key) {
|
|
242
|
+
const m = this.manifests.get(skey(scope, key));
|
|
243
|
+
return m ? new Map(m) : null; // detached copy — the caller must not mutate stored state
|
|
244
|
+
}
|
|
245
|
+
async getBlob(hash) {
|
|
246
|
+
return this.blobs.get(hash);
|
|
247
|
+
}
|
|
248
|
+
async putBlob(hash, bytes) {
|
|
249
|
+
// content-address integrity: storing bytes under a non-matching hash would poison the store (a later
|
|
250
|
+
// getBlob/restore returns wrong content) — verify, like importManifest. Mismatch → read_failed, store nothing.
|
|
251
|
+
if (createHash("sha256").update(bytes).digest("hex") !== hash) {
|
|
252
|
+
return { ok: false, error: { code: "read_failed", message: `blob bytes fail content-address integrity for ${hash}` } };
|
|
253
|
+
}
|
|
254
|
+
if (!this.blobs.has(hash))
|
|
255
|
+
this.blobs.set(hash, bytes); // immutable: same hash ⇒ same bytes (repeat = no-op)
|
|
256
|
+
return { ok: true };
|
|
257
|
+
}
|
|
258
|
+
async importManifest(scope, key, manifest, srcGetBlob) {
|
|
259
|
+
const sk = skey(scope, key);
|
|
260
|
+
// create-once + atomic: an existing OR in-flight snapshot for this immutable entry is a no-op.
|
|
261
|
+
if (this.manifests.has(sk) || this.inFlight.has(sk))
|
|
262
|
+
return { ok: true };
|
|
263
|
+
const written = new Set(); // hashes this import has stored (reap treats them as live, mirrors snapshot())
|
|
264
|
+
this.inFlight.set(sk, written);
|
|
265
|
+
try {
|
|
266
|
+
for (const hash of new Set(manifest.values())) {
|
|
267
|
+
written.add(hash); // record BEFORE the fetch so a racing reap never GCs a blob we are about to store
|
|
268
|
+
if (this.blobs.has(hash))
|
|
269
|
+
continue; // already present (content-addressed dedup across snapshots)
|
|
270
|
+
const bytes = await srcGetBlob(hash);
|
|
271
|
+
if (!bytes)
|
|
272
|
+
return { ok: false, error: { code: "read_failed", message: `missing source blob ${hash}` } };
|
|
273
|
+
if (createHash("sha256").update(bytes).digest("hex") !== hash) {
|
|
274
|
+
return { ok: false, error: { code: "read_failed", message: `source blob ${hash} fails content-address integrity` } };
|
|
275
|
+
}
|
|
276
|
+
this.blobs.set(hash, bytes);
|
|
277
|
+
}
|
|
278
|
+
// Commit ONLY after every blob is stored+verified — never a manifest referencing a missing blob (fail-closed,
|
|
279
|
+
// mirrors snapshot(): a partial import would make a later restore silently truncate the tree).
|
|
280
|
+
this.manifests.set(sk, new Map(manifest)); // detached copy — the caller must not mutate stored state
|
|
281
|
+
return { ok: true };
|
|
282
|
+
}
|
|
283
|
+
catch (err) {
|
|
284
|
+
// NEVER throw out of the seam: `srcGetBlob` is a caller-supplied cross-backend fetch (durable/remote) that
|
|
285
|
+
// CAN reject (timeout/ECONNRESET/query error), not just resolve to undefined. Encode it as a typed
|
|
286
|
+
// `read_failed` — the SAME code the File backend now returns for a rejecting fetch (cross-backend equivalence).
|
|
287
|
+
return { ok: false, error: { code: "read_failed", message: `source blob fetch failed: ${err.message}` } };
|
|
288
|
+
}
|
|
289
|
+
finally {
|
|
290
|
+
this.inFlight.delete(sk);
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
async reap(scope, keepKeys) {
|
|
294
|
+
const keep = new Set(keepKeys);
|
|
295
|
+
const prefix = `${scope}${SEP}`;
|
|
296
|
+
let removed = 0;
|
|
297
|
+
for (const sk of [...this.manifests.keys()]) {
|
|
298
|
+
if (sk.startsWith(prefix) && !keep.has(sk.slice(prefix.length))) {
|
|
299
|
+
this.manifests.delete(sk);
|
|
300
|
+
removed++;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
// GC blobs no longer referenced by ANY surviving manifest OR any IN-FLIGHT snapshot (whose blobs are stored
|
|
304
|
+
// but not yet committed to a manifest — bug-hunt MAJOR-1). This whole method is synchronous (no await) so it
|
|
305
|
+
// runs atomically vs an in-flight snapshot parked at an await.
|
|
306
|
+
const live = new Set();
|
|
307
|
+
for (const hs of this.inFlight.values())
|
|
308
|
+
for (const h of hs)
|
|
309
|
+
live.add(h);
|
|
310
|
+
for (const m of this.manifests.values())
|
|
311
|
+
for (const h of m.values())
|
|
312
|
+
live.add(h);
|
|
313
|
+
for (const h of [...this.blobs.keys()])
|
|
314
|
+
if (!live.has(h))
|
|
315
|
+
this.blobs.delete(h);
|
|
316
|
+
return removed;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
//# sourceMappingURL=file-snapshot-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-snapshot-store.js","sourceRoot":"","sources":["../../src/core/file-snapshot-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,wGAAwG;AACxG,yGAAyG;AACzG,sFAAsF;AAEtF,MAAM,SAAS,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC/D,MAAM,aAAa,GAAG,CAAC,CAAS,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AACtE,MAAM,SAAS,GAAG,CAAC,CAAS,EAAU,EAAE,CA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