@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,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* design/81 Slice 5 — the shared distance primitives for the consolidation `searchScored` retrieval, extracted
|
|
3
|
+
* BYTE-IDENTICAL from the original PgMemoryStore implementation so the File (portable/TOC) and Pg (native/TOB)
|
|
4
|
+
* backends rank on ONE source of truth and can't drift. The `{@link import("./runner/memory-consolidation.js")}`
|
|
5
|
+
* band `{0.05, 0.3}` is defined on this cosine-distance scale; the lexical `1 - Jaccard ∈ [0,1] ⊂ [0,2]` is the
|
|
6
|
+
* same-zero-point stand-in used when no embedding vector is present (fail-open per row).
|
|
7
|
+
*
|
|
8
|
+
* The capability LADDER a store reports via {@link import("./memory.js").MemoryStore.vectorMode}:
|
|
9
|
+
* - `lexical` — no embedder: `1 - Jaccard(terms)` everywhere.
|
|
10
|
+
* - `portable` — embedder + IN-PROCESS cosine over stored vectors (File jsonl / Pg jsonb / MySQL JSON — ANY
|
|
11
|
+
* backend that can store a float array; O(n) over the scope, no index).
|
|
12
|
+
* - `native` — embedder + a backend index/operator (pgvector `<=>` / TiDB `VEC_COSINE_DISTANCE`).
|
|
13
|
+
* MySQL is NOT "can't support vectors" — it is `portable`-capable (JSON column + in-process cosine), just not
|
|
14
|
+
* `native`. A deployment injects an embedder (config-driven); the store then reports the achieved rung.
|
|
15
|
+
*/
|
|
16
|
+
/** Lower-cased alphanumeric term set of a string (for the lexical stand-in distance). */
|
|
17
|
+
export declare function termSet(s: string): Set<string>;
|
|
18
|
+
/** Lexical stand-in distance: `1 - Jaccard(terms)` ∈ [0,1] ⊂ [0,2]; `null` = no overlap (not a candidate). */
|
|
19
|
+
export declare function jaccardDistance(query: Set<string>, text: string): number | null;
|
|
20
|
+
/** Cosine distance ∈ [0,2] (0 = identical), the {@link import("./memory.js").ScoredMemory} contract. Uses
|
|
21
|
+
* `Math.min(a.length,b.length)` — a store MUST only call this on dimension-matched vectors (the row-level
|
|
22
|
+
* dimension guard lives at the caller; a mismatch falls open to {@link jaccardDistance}). */
|
|
23
|
+
export declare function cosineDistance(a: number[], b: number[]): number;
|
|
24
|
+
//# sourceMappingURL=memory-vector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-vector.d.ts","sourceRoot":"","sources":["../../src/core/memory-vector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,yFAAyF;AACzF,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,CAO9C;AAED,8GAA8G;AAC9G,wBAAgB,eAAe,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAS/E;AAED;;8FAE8F;AAC9F,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,CAY/D"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* design/81 Slice 5 — the shared distance primitives for the consolidation `searchScored` retrieval, extracted
|
|
3
|
+
* BYTE-IDENTICAL from the original PgMemoryStore implementation so the File (portable/TOC) and Pg (native/TOB)
|
|
4
|
+
* backends rank on ONE source of truth and can't drift. The `{@link import("./runner/memory-consolidation.js")}`
|
|
5
|
+
* band `{0.05, 0.3}` is defined on this cosine-distance scale; the lexical `1 - Jaccard ∈ [0,1] ⊂ [0,2]` is the
|
|
6
|
+
* same-zero-point stand-in used when no embedding vector is present (fail-open per row).
|
|
7
|
+
*
|
|
8
|
+
* The capability LADDER a store reports via {@link import("./memory.js").MemoryStore.vectorMode}:
|
|
9
|
+
* - `lexical` — no embedder: `1 - Jaccard(terms)` everywhere.
|
|
10
|
+
* - `portable` — embedder + IN-PROCESS cosine over stored vectors (File jsonl / Pg jsonb / MySQL JSON — ANY
|
|
11
|
+
* backend that can store a float array; O(n) over the scope, no index).
|
|
12
|
+
* - `native` — embedder + a backend index/operator (pgvector `<=>` / TiDB `VEC_COSINE_DISTANCE`).
|
|
13
|
+
* MySQL is NOT "can't support vectors" — it is `portable`-capable (JSON column + in-process cosine), just not
|
|
14
|
+
* `native`. A deployment injects an embedder (config-driven); the store then reports the achieved rung.
|
|
15
|
+
*/
|
|
16
|
+
/** Lower-cased alphanumeric term set of a string (for the lexical stand-in distance). */
|
|
17
|
+
export function termSet(s) {
|
|
18
|
+
return new Set(s
|
|
19
|
+
.toLowerCase()
|
|
20
|
+
.split(/[^a-z0-9]+/)
|
|
21
|
+
.filter(Boolean));
|
|
22
|
+
}
|
|
23
|
+
/** Lexical stand-in distance: `1 - Jaccard(terms)` ∈ [0,1] ⊂ [0,2]; `null` = no overlap (not a candidate). */
|
|
24
|
+
export function jaccardDistance(query, text) {
|
|
25
|
+
const t = termSet(text);
|
|
26
|
+
let inter = 0;
|
|
27
|
+
for (const term of query) {
|
|
28
|
+
if (t.has(term))
|
|
29
|
+
inter++;
|
|
30
|
+
}
|
|
31
|
+
const union = query.size + t.size - inter;
|
|
32
|
+
const jaccard = union === 0 ? 0 : inter / union;
|
|
33
|
+
return jaccard === 0 ? null : 1 - jaccard;
|
|
34
|
+
}
|
|
35
|
+
/** Cosine distance ∈ [0,2] (0 = identical), the {@link import("./memory.js").ScoredMemory} contract. Uses
|
|
36
|
+
* `Math.min(a.length,b.length)` — a store MUST only call this on dimension-matched vectors (the row-level
|
|
37
|
+
* dimension guard lives at the caller; a mismatch falls open to {@link jaccardDistance}). */
|
|
38
|
+
export function cosineDistance(a, b) {
|
|
39
|
+
let dot = 0;
|
|
40
|
+
let na = 0;
|
|
41
|
+
let nb = 0;
|
|
42
|
+
const n = Math.min(a.length, b.length);
|
|
43
|
+
for (let i = 0; i < n; i++) {
|
|
44
|
+
dot += a[i] * b[i];
|
|
45
|
+
na += a[i] * a[i];
|
|
46
|
+
nb += b[i] * b[i];
|
|
47
|
+
}
|
|
48
|
+
const denom = Math.sqrt(na) * Math.sqrt(nb);
|
|
49
|
+
return denom === 0 ? 1 : 1 - dot / denom;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=memory-vector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory-vector.js","sourceRoot":"","sources":["../../src/core/memory-vector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,yFAAyF;AACzF,MAAM,UAAU,OAAO,CAAC,CAAS;IAC/B,OAAO,IAAI,GAAG,CACZ,CAAC;SACE,WAAW,EAAE;SACb,KAAK,CAAC,YAAY,CAAC;SACnB,MAAM,CAAC,OAAO,CAAC,CACnB,CAAC;AACJ,CAAC;AAED,8GAA8G;AAC9G,MAAM,UAAU,eAAe,CAAC,KAAkB,EAAE,IAAY;IAC9D,MAAM,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC;YAAE,KAAK,EAAE,CAAC;IAC3B,CAAC;IACD,MAAM,KAAK,GAAG,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,KAAK,CAAC;IAC1C,MAAM,OAAO,GAAG,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;IAChD,OAAO,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC;AAC5C,CAAC;AAED;;8FAE8F;AAC9F,MAAM,UAAU,cAAc,CAAC,CAAW,EAAE,CAAW;IACrD,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC;QAC3B,GAAG,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QACrB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;QACpB,EAAE,IAAI,CAAC,CAAC,CAAC,CAAE,GAAG,CAAC,CAAC,CAAC,CAAE,CAAC;IACtB,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IAC5C,OAAO,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,KAAK,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
import type { AgentTool } from "../internal/harness.js";
|
|
2
|
+
/**
|
|
3
|
+
* A scored memory candidate returned by {@link MemoryStore.searchScored} (design/41). Carries a
|
|
4
|
+
* **stable id** (for {@link MemoryStore.update}/{@link MemoryStore.delete}) and a similarity `score`.
|
|
5
|
+
*
|
|
6
|
+
* `score` is a **cosine distance ∈ [0, 2]** where **0 = identical** and larger = less similar — pinned
|
|
7
|
+
* by contract so the consolidation band (`{lo, hi}`) is calibrated the same way across stores (a store
|
|
8
|
+
* that returned a *similarity* instead of a *distance* would invert the band). The reference
|
|
9
|
+
* {@link InMemoryMemoryStore} has no embeddings, so it returns a lexical distance in [0, 1] (a subset
|
|
10
|
+
* of the range) as a stand-in for tests/dev; a production store returns a real cosine distance.
|
|
11
|
+
*/
|
|
12
|
+
export interface ScoredMemory {
|
|
13
|
+
id: string;
|
|
14
|
+
text: string;
|
|
15
|
+
score: number;
|
|
16
|
+
/** design/84 Seam B (前置 BLOCKER): true when this note was CREATED by a consolidation ADD (not the
|
|
17
|
+
* `remember` tool / a caller). Periodic/incremental consolidation EXCLUDES these from its candidate set so
|
|
18
|
+
* it never re-consolidates its own output (infinite re-merge). Stores that don't track it leave it absent
|
|
19
|
+
* (treated as not-generated — back-compat: the inline task-end path already excludes this-task notes by id). */
|
|
20
|
+
consolidationGenerated?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* The vector-ranking capability RUNG a {@link MemoryStore} actually achieves (design/81 Slice 5). It is a
|
|
24
|
+
* runtime OBSERVABLE (it depends on whether an embedder was injected AND whether the backend has native vector
|
|
25
|
+
* ops), NOT a static class trait — a deployment reads `store.vectorMode` to decide whether to build a native
|
|
26
|
+
* index / for metrics, and to answer "does this backend do neural recall?".
|
|
27
|
+
* - `lexical` — no embedder: `1 - Jaccard` everywhere (the default; byte-identical to the pre-Slice-5 floor).
|
|
28
|
+
* - `portable` — embedder + IN-PROCESS cosine over stored vectors (File jsonl / Pg jsonb / **MySQL JSON** —
|
|
29
|
+
* any backend that can store a float array; O(n), no index). MySQL sits HERE, not "unsupported".
|
|
30
|
+
* - `native` — embedder + a backend index/operator (pgvector `<=>` / TiDB `VEC_COSINE_DISTANCE`).
|
|
31
|
+
*/
|
|
32
|
+
export type MemoryVectorMode = "lexical" | "portable" | "native";
|
|
33
|
+
/**
|
|
34
|
+
* Produces an embedding for one note/query (design/81 Slice 3 — the OPTIONAL vector seam). **Byte-identical
|
|
35
|
+
* to {@link import("../stores/pg.js").PgEmbedder}** so the same caller-injected embedder satisfies both the
|
|
36
|
+
* Pg and File backends. It is an OPTIONAL injection: a store WITHOUT one falls back to the lexical
|
|
37
|
+
* cosine-distance (the TOC default — no model file, no native binary in core's default path). When one IS
|
|
38
|
+
* injected the File backend uses it for vector ranking (Slice 5) via a rebuildable sidecar index; injecting
|
|
39
|
+
* none keeps the lexical floor unchanged. Core bundles NO embedder; a cloud/TOB consumer injects its own.
|
|
40
|
+
*/
|
|
41
|
+
export interface Embedder {
|
|
42
|
+
embed(text: string): Promise<number[]>;
|
|
43
|
+
dimensions: number;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Long-term (L2) memory backend — pluggable, scoped, durable across sessions.
|
|
47
|
+
*
|
|
48
|
+
* Design adapted (MIT) from CodeWhale's `memory.rs` (a persistent note file injected into the
|
|
49
|
+
* system prompt) and Anthropic's memory tool (the model manages its own memory via a tool; the
|
|
50
|
+
* backend lives in your infrastructure). The default is in-memory; a deployment provides a durable
|
|
51
|
+
* backend (e.g. TiDB) implementing this interface.
|
|
52
|
+
*
|
|
53
|
+
* `scope` partitions memory by tenant — e.g. `user:42`, `org:7`, `agent:main`, or `global`.
|
|
54
|
+
*/
|
|
55
|
+
export interface MemoryStore {
|
|
56
|
+
/** Full memory content for a scope (timestamped bullets), or null when empty. */
|
|
57
|
+
read(scope: string): Promise<string | null> | string | null;
|
|
58
|
+
/**
|
|
59
|
+
* Append one durable note to a scope. Implementations timestamp it. A store that supports
|
|
60
|
+
* consolidation (implements {@link searchScored}/{@link update}/{@link delete}) **MUST** return the new
|
|
61
|
+
* note's **stable id**: memory consolidation (design/41) uses it to exclude a just-appended note from
|
|
62
|
+
* its own reconcile candidates, so an id-addressable store that returns `void` would let a note
|
|
63
|
+
* self-match and trigger a wasteful no-op every cycle. Returning `void` is fine only for stores that
|
|
64
|
+
* do NOT support consolidation.
|
|
65
|
+
*/
|
|
66
|
+
append(scope: string, note: string): Promise<string | void> | string | void;
|
|
67
|
+
/** Clear a scope's memory. */
|
|
68
|
+
clear(scope: string): Promise<void> | void;
|
|
69
|
+
/**
|
|
70
|
+
* Optional just-in-time (L3) retrieval: return notes in `scope` relevant to `query`.
|
|
71
|
+
* When implemented, the Runner exposes a `recall` tool so the model can query memory on demand
|
|
72
|
+
* instead of relying only on the injected block (useful when a scope's memory is large).
|
|
73
|
+
*/
|
|
74
|
+
search?(scope: string, query: string, limit?: number): Promise<string[]> | string[];
|
|
75
|
+
/**
|
|
76
|
+
* Optional id-addressable similarity retrieval (design/41): return up to `limit` notes in `scope`
|
|
77
|
+
* most similar to `query`, each with a **stable id** and a cosine-distance `score` (see
|
|
78
|
+
* {@link ScoredMemory}). Required (together with {@link update}/{@link delete}) for memory
|
|
79
|
+
* consolidation; when any of the three is absent, consolidation is a safe no-op.
|
|
80
|
+
*
|
|
81
|
+
* **Concurrency contract:** memory consolidation keys on the task's memory `scope`, NOT its session,
|
|
82
|
+
* and the Runner's per-session lock does not serialize across sessions. So `searchScored`/`update`/
|
|
83
|
+
* `delete` MAY be called concurrently for the SAME scope from different sessions. A durable async store
|
|
84
|
+
* must therefore either linearize per-scope writes (e.g. optimistic lock by id) or accept eventual
|
|
85
|
+
* consistency — at worst a near-duplicate survives one extra consolidation pass (fail-open, no loss).
|
|
86
|
+
*/
|
|
87
|
+
searchScored?(scope: string, query: string, limit?: number): Promise<ScoredMemory[]> | ScoredMemory[];
|
|
88
|
+
/** The vector-ranking rung this store achieves (design/81 Slice 5). Absent ⇒ treated as `"lexical"`
|
|
89
|
+
* (back-compat). A runtime observable — a deployment reads it to decide index/metrics, NOT to decide
|
|
90
|
+
* whether to inject an embedder (injection is config-driven; this is the RESULT). See {@link MemoryVectorMode}. */
|
|
91
|
+
readonly vectorMode?: MemoryVectorMode;
|
|
92
|
+
/** Optional: replace a note's text by id (consolidation UPDATE). The id stays stable. Must be safe
|
|
93
|
+
* under concurrent same-scope calls — see {@link searchScored}'s concurrency contract. */
|
|
94
|
+
update?(scope: string, id: string, text: string): Promise<void> | void;
|
|
95
|
+
/** Optional: remove a note by id (consolidation DELETE). The id is never reused afterwards. Must be
|
|
96
|
+
* safe under concurrent same-scope calls — see {@link searchScored}'s concurrency contract. */
|
|
97
|
+
delete?(scope: string, id: string): Promise<void> | void;
|
|
98
|
+
/**
|
|
99
|
+
* Optional **manifest** for selective recall (design/65 §2.2/§8#6): a per-note HEADER (id + a short
|
|
100
|
+
* description + mtime [+ name/type when structured]) — **NOT the body** (mirrors CC reading only the
|
|
101
|
+
* frontmatter, `memoryScan.ts FRONTMATTER_MAX_LINES=30`). The Runner injects this index for a large
|
|
102
|
+
* scope and side-queries which ids are relevant, then fetches only those via {@link getByIds}.
|
|
103
|
+
*/
|
|
104
|
+
listStructuredNotes?(scope: string): Promise<MemoryNoteHeader[]> | MemoryNoteHeader[];
|
|
105
|
+
/** Optional: fetch the FULL records (with body) for the selected ids (design/65 §2.2). Unknown ids are
|
|
106
|
+
* silently skipped. Order is not guaranteed. Pairs with {@link listStructuredNotes}. */
|
|
107
|
+
getByIds?(scope: string, ids: string[]): Promise<MemoryNoteRecord[]> | MemoryNoteRecord[];
|
|
108
|
+
/**
|
|
109
|
+
* Optional: append a **structured/typed** note (design/65 §2.1, P2). `type` defaults to `"project"` and
|
|
110
|
+
* `description` to the body's first sentence (derived at write time — store responsibility, §8#6). Returns
|
|
111
|
+
* the new note's stable id (like {@link append}). A store that supports this surfaces `name`/`type` in
|
|
112
|
+
* {@link listStructuredNotes} so the selective-recall side-query gets a `[type]` relevance signal.
|
|
113
|
+
*/
|
|
114
|
+
appendStructured?(scope: string, note: StructuredNoteInput): Promise<string> | string;
|
|
115
|
+
/**
|
|
116
|
+
* Optional **legitimate door** for a *promotable* artifact write (design/77 §2 Gate-2). A promotable
|
|
117
|
+
* note (a self-evolution artifact — skill/playbook/outcome-stats; classified by NOTE STRUCTURE, not a
|
|
118
|
+
* caller flag, via {@link classifyPromotable}) may ONLY reach the backend through this method, which
|
|
119
|
+
* carries the required `utilityVerdict`. The store-boundary gate ({@link guardedMemoryStore}) routes a
|
|
120
|
+
* present+positive promotable write here; a promotable note WITHOUT a present+positive verdict is
|
|
121
|
+
* fail-closed REJECTED at the boundary (never reaches any store method). `utilityVerdict` is opaque
|
|
122
|
+
* `unknown` in core — the *definition* of "positive" stays in the profile (taxonomy never enters core).
|
|
123
|
+
* Stores that do not implement this can still serve caller-authored writes; promotable writes simply
|
|
124
|
+
* have nowhere legitimate to land and are rejected (fail-closed).
|
|
125
|
+
*/
|
|
126
|
+
appendPromotable?(scope: string, note: StructuredNoteInput, utilityVerdict: unknown): Promise<string> | string;
|
|
127
|
+
/**
|
|
128
|
+
* **INTERNAL consolidation-only door** for the design/84 Seam B marker. Memory consolidation (and ONLY
|
|
129
|
+
* it — `runMemoryConsolidation`) calls this to materialize a merged "add" decision tagged
|
|
130
|
+
* `consolidationGenerated:true`, so a later periodic/incremental pass EXCLUDES its own output from the
|
|
131
|
+
* candidate set (no infinite re-merge). It is the COUNTERPART to the {@link guardedMemoryStore} boundary
|
|
132
|
+
* defense: the public {@link appendStructured} STRIPS a caller-supplied `consolidationGenerated` (an
|
|
133
|
+
* external caller must never be able to mark a note "consolidation-generated" and silently exile it from
|
|
134
|
+
* consolidation forever), while THIS method is the single legitimate inlet that may set it. The guarded
|
|
135
|
+
* store wires it to set the marker then forward to the inner `appendStructured`; a raw (un-wrapped) store
|
|
136
|
+
* need not implement it — consolidation then falls back to `appendStructured` (which on an un-wrapped
|
|
137
|
+
* store still honors the marker, preserving the old behavior for direct-store tests). NOT a public caller
|
|
138
|
+
* surface: it carries no extra capability beyond `appendStructured` + the one internal flag.
|
|
139
|
+
*/
|
|
140
|
+
appendConsolidationGenerated?(scope: string, note: StructuredNoteInput): Promise<string> | string;
|
|
141
|
+
/**
|
|
142
|
+
* design/84 Seam B — read the periodic/incremental consolidation cursor for `scope` (decision 3). The
|
|
143
|
+
* cursor is an **opaque ordering marker** the STORE defines (this core never inspects it): a value such
|
|
144
|
+
* that every note whose ordering marker is `<= cursor` has ALREADY been folded into a prior consolidation
|
|
145
|
+
* pass and MUST NOT be re-fed (no infinite re-merge), while every note `> cursor` is still pending. In the
|
|
146
|
+
* reference stores it is a note **id** (uuidv7 — lexicographically time-sortable), so "after the cursor"
|
|
147
|
+
* is a simple string `>` comparison. Returns `undefined` when no pass has run yet (⇒ the WHOLE scope is
|
|
148
|
+
* pending — the first pass sweeps it all). PAIR with {@link setConsolidationCursor}: a store implements
|
|
149
|
+
* BOTH or NEITHER ({@link supportsPeriodicConsolidation}); a store with neither makes {@link consolidateScope}
|
|
150
|
+
* a safe NO-OP (it never silently degrades to a full re-consolidation).
|
|
151
|
+
*/
|
|
152
|
+
getConsolidationCursor?(scope: string): Promise<string | undefined> | string | undefined;
|
|
153
|
+
/**
|
|
154
|
+
* design/84 Seam B — persist the periodic/incremental consolidation cursor for `scope` (decision 3). Called
|
|
155
|
+
* by {@link consolidateScope} ONLY after a pass succeeds in full, advancing the cursor to the max ordering
|
|
156
|
+
* marker the pass observed (seen note ids ∪ added ids). Must be durable (a later pass reads it back). PAIR
|
|
157
|
+
* with {@link getConsolidationCursor}.
|
|
158
|
+
*/
|
|
159
|
+
setConsolidationCursor?(scope: string, cursor: string): Promise<void> | void;
|
|
160
|
+
}
|
|
161
|
+
/** Standard structured-note types (design/65 §2.1, CC `memoryTypes.ts`). Any other string is accepted and
|
|
162
|
+
* degrades gracefully (stored + shown as-is) — `type` is widened to `string` everywhere for that reason. */
|
|
163
|
+
export type MemoryNoteType = "user" | "feedback" | "project" | "reference";
|
|
164
|
+
/** Input to {@link MemoryStore.appendStructured}. Only `body` is required. */
|
|
165
|
+
export interface StructuredNoteInput {
|
|
166
|
+
body: string;
|
|
167
|
+
/** A short slug for `[[name]]` cross-references (design/65 §2.1). Optional. */
|
|
168
|
+
name?: string;
|
|
169
|
+
/** One of {@link MemoryNoteType}, or any string (unknown types degrade). Default `"project"`. */
|
|
170
|
+
type?: string;
|
|
171
|
+
/** One-line summary for the manifest. Default = first sentence of `body`. */
|
|
172
|
+
description?: string;
|
|
173
|
+
/** `[[name]]` cross-reference slugs (design/65 §2.1; v1 stores/displays, no link-following). */
|
|
174
|
+
links?: string[];
|
|
175
|
+
/**
|
|
176
|
+
* design/77 §2 Gate-2 structural marker. An opaque (`unknown`) outcome-statistics blob attached to a
|
|
177
|
+
* self-evolution artifact (held-out pass-rate, usage count, …). Its PRESENCE makes a note *promotable*
|
|
178
|
+
* even when `type` is in the caller-authored closed set — the structural marker WINS over the type
|
|
179
|
+
* (see {@link classifyPromotable}). Core never inspects its shape; the taxonomy/threshold stays in the
|
|
180
|
+
* profile (`RunnerDeps.utilityGate`).
|
|
181
|
+
*/
|
|
182
|
+
outcomeStats?: unknown;
|
|
183
|
+
/**
|
|
184
|
+
* design/84 Seam B (前置 BLOCKER): mark a note as CREATED BY A CONSOLIDATION ADD. Set ONLY by
|
|
185
|
+
* {@link import("./runner/memory-consolidation.js").runMemoryConsolidation} when it materializes a merged
|
|
186
|
+
* "add" decision — never by the `remember` tool or a normal caller. A store persists it (and surfaces it on
|
|
187
|
+
* {@link ScoredMemory}/{@link MemoryNoteHeader}) so periodic/incremental consolidation can EXCLUDE these
|
|
188
|
+
* notes from its candidate set and not re-consolidate its own output forever. It does NOT affect the
|
|
189
|
+
* promotable/secret gates (a consolidation ADD is `caller_authored` by construction).
|
|
190
|
+
*/
|
|
191
|
+
consolidationGenerated?: boolean;
|
|
192
|
+
}
|
|
193
|
+
/** A manifest entry: enough to judge relevance, never the body (design/65 §2.2). */
|
|
194
|
+
export interface MemoryNoteHeader {
|
|
195
|
+
/** Store contract: ids must be SINGLE-LINE whitespace-free tokens (uuid-like). The manifest renders
|
|
196
|
+
* `- {id}: …` lines and the side-query matches selected ids by string equality — an id containing
|
|
197
|
+
* a newline could forge manifest lines, and a renderer-side rewrite would break the equality match,
|
|
198
|
+
* so the contract sits on the store (search 1.95.1 review #2). */
|
|
199
|
+
id: string;
|
|
200
|
+
/** A one-line summary used as the relevance signal (derived from the note's first sentence when untyped). */
|
|
201
|
+
description: string;
|
|
202
|
+
/** Append/update time as ms since epoch — drives the freshness caveat (design/65 §8#8). */
|
|
203
|
+
mtimeMs: number;
|
|
204
|
+
/** Present once notes are structured (design/65 §2.1, P2); absent for legacy flat notes. */
|
|
205
|
+
name?: string;
|
|
206
|
+
/** One of {@link MemoryNoteType} or any other string (unknown degrades gracefully). */
|
|
207
|
+
type?: string;
|
|
208
|
+
/** design/84 Seam B: true when this note was created by a consolidation ADD (excluded from periodic
|
|
209
|
+
* consolidation candidates). Absent for `remember`/caller notes. */
|
|
210
|
+
consolidationGenerated?: boolean;
|
|
211
|
+
}
|
|
212
|
+
/** A full note record (header + body) returned by {@link MemoryStore.getByIds}. */
|
|
213
|
+
export interface MemoryNoteRecord extends MemoryNoteHeader {
|
|
214
|
+
text: string;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* True when a store implements the full id-addressable trio required for memory consolidation
|
|
218
|
+
* (design/41): {@link MemoryStore.searchScored}/{@link MemoryStore.update}/{@link MemoryStore.delete}.
|
|
219
|
+
* When false, the Runner skips consolidation entirely (graceful no-op).
|
|
220
|
+
*/
|
|
221
|
+
export declare function supportsConsolidation(store: MemoryStore): boolean;
|
|
222
|
+
/**
|
|
223
|
+
* True when a store implements the design/84 Seam B cursor PAIR
|
|
224
|
+
* ({@link MemoryStore.getConsolidationCursor}/{@link MemoryStore.setConsolidationCursor}). Periodic/incremental
|
|
225
|
+
* consolidation ({@link import("./consolidate-scope.js").consolidateScope}) GATES on this: a store missing
|
|
226
|
+
* either method makes a periodic pass a safe **NO-OP** (never a silent full re-consolidation of the whole
|
|
227
|
+
* scope, which would re-merge already-consolidated notes forever). Both-or-neither — a store implementing
|
|
228
|
+
* only one is treated as unsupported. Independent of {@link supportsConsolidation} (the id-addressable trio),
|
|
229
|
+
* which a periodic pass ALSO needs to actually mutate.
|
|
230
|
+
*/
|
|
231
|
+
export declare function supportsPeriodicConsolidation(store: MemoryStore): boolean;
|
|
232
|
+
/** The closed set of caller-authored note types (design/65 {@link MemoryNoteType}, memory.ts). A note
|
|
233
|
+
* whose `type` is in this set is caller-authored; a `type` *outside* it (e.g. `"skill"`) is promotable.
|
|
234
|
+
* Exported so a caller-authored inlet (e.g. consolidation ADD) can NORMALIZE a model-suggested type to
|
|
235
|
+
* the closed set before the store boundary — a legitimate caller_authored write must never trip the
|
|
236
|
+
* promotable gate just because the model invented a non-standard `type` slug (MINOR-3). */
|
|
237
|
+
export declare const CALLER_AUTHORED_TYPES: ReadonlySet<string>;
|
|
238
|
+
/** The default caller-authored note type (matches {@link StructuredNoteInput.type}'s documented default). */
|
|
239
|
+
export declare const DEFAULT_CALLER_AUTHORED_TYPE: MemoryNoteType;
|
|
240
|
+
/**
|
|
241
|
+
* Profile-injected predicate that judges whether a promotable note's `outcomeStats` clear the promotion bar
|
|
242
|
+
* (design/77 §2). Core only guarantees a verdict is PRESENT for a promotable write; this predicate — wired
|
|
243
|
+
* by the deployment — receives the note's (opaque) `outcomeStats` blob and returns whether it clears the
|
|
244
|
+
* bar. (It is NOT handed the `utilityVerdict` token; the verdict's PRESENCE is checked separately by
|
|
245
|
+
* {@link enforcePromotableWriteGate}, then the gate judges the outcome statistics.) When UNWIRED, a
|
|
246
|
+
* promotable write fails closed.
|
|
247
|
+
*/
|
|
248
|
+
export type UtilityGate = (stats: unknown) => boolean;
|
|
249
|
+
/** Typed, fail-closed error thrown when a promotable artifact write reaches the store boundary without a
|
|
250
|
+
* present-and-positive `utilityVerdict` (design/77 §2). The `code` is stable for callers to switch on;
|
|
251
|
+
* the write NEVER reaches the backend. */
|
|
252
|
+
export declare class MemoryGateError extends Error {
|
|
253
|
+
readonly code: string;
|
|
254
|
+
constructor(code: string, detail?: string);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Scan `text` for a high-confidence credential (CC-parity P0-2). Returns the matched pattern's stable
|
|
258
|
+
* `label` (NEVER the matched secret value — labels are safe to log/surface), or `null` when clean.
|
|
259
|
+
* Deliberately CONSERVATIVE: only provider-prefixed keys + PEM private-key headers match, so ordinary
|
|
260
|
+
* prose that merely mentions tokens/keys/passwords passes through untouched (false-positives are the head
|
|
261
|
+
* risk — a wrongly-rejected normal note silently breaks legitimate memory).
|
|
262
|
+
*/
|
|
263
|
+
export declare function detectSecret(text: string): string | null;
|
|
264
|
+
/**
|
|
265
|
+
* Store-boundary secret-scan invariant (CC-parity P0-2). Fail-closed: if `body` carries a high-confidence
|
|
266
|
+
* credential, throw {@link MemoryGateError}`("memory.secret_detected")` — the write NEVER reaches the
|
|
267
|
+
* backend. The error detail names the pattern LABEL (e.g. `aws_access_key_id`), never the matched value,
|
|
268
|
+
* so the secret is not re-leaked into a log/error sink. A clean body is a no-op. Applied by
|
|
269
|
+
* {@link guardedMemoryStore} on EVERY durable write inlet (`append`, `appendStructured`, the
|
|
270
|
+
* `appendPromotable` door) so both the `remember` tool and consolidation ADD are covered at one chokepoint.
|
|
271
|
+
*/
|
|
272
|
+
export declare function enforceSecretWriteGate(body: string): void;
|
|
273
|
+
/**
|
|
274
|
+
* Structured-note secret-scan invariant (CC-parity P0-2). Scans EVERY text field of a {@link StructuredNoteInput}
|
|
275
|
+
* that becomes DURABLE and/or enters the manifest — not just `body`. The body alone is insufficient: `name`
|
|
276
|
+
* (rendered as `[[name]]` cross-references) and `description` (rendered into the recall manifest + injected
|
|
277
|
+
* into the side-query sub-prompt) are ALSO persisted and surfaced, so a secret hidden there
|
|
278
|
+
* (`appendStructured({ body: "safe", description: "sk_live_…" })`) would otherwise be durably stored and
|
|
279
|
+
* leaked into every later same-scope manifest — a real bypass of the body-only scan. `links` slugs are NOT
|
|
280
|
+
* scanned: they are short `[[name]]`-style reference tokens (no credential body shape clears the
|
|
281
|
+
* conservative detector), and scanning them adds FP surface for no realistic gain. Fail-closed: the first
|
|
282
|
+
* field that carries a high-confidence credential throws {@link MemoryGateError}`("memory.secret_detected")`.
|
|
283
|
+
*/
|
|
284
|
+
export declare function enforceStructuredNoteSecretGate(note: StructuredNoteInput): void;
|
|
285
|
+
/**
|
|
286
|
+
* Classify a structured-note write as `caller_authored` (normal memory — ungated) or `promotable` (a
|
|
287
|
+
* self-evolution artifact — gated) — design/77 §2. PURE, taxonomy-free CORE logic.
|
|
288
|
+
*
|
|
289
|
+
* `promotable` iff the note's `type` is defined AND outside the caller-authored closed set, OR the note
|
|
290
|
+
* carries a structural promotable marker. **The structural marker WINS over the closed-set type** — a
|
|
291
|
+
* `type:"reference"` note WITH an `outcomeStats` marker classifies `promotable`.
|
|
292
|
+
*/
|
|
293
|
+
export declare function classifyPromotable(note: StructuredNoteInput): "caller_authored" | "promotable";
|
|
294
|
+
/**
|
|
295
|
+
* The store-boundary Gate-2 check (design/77 §2). For a `promotable` note, require a present-and-positive
|
|
296
|
+
* `utilityVerdict`; otherwise throw {@link MemoryGateError}`("memory.promotable_ungated")` fail-closed —
|
|
297
|
+
* the write NEVER reaches the backend. A `caller_authored` note is unchanged (no verdict needed).
|
|
298
|
+
*
|
|
299
|
+
* **Gate-presence invariant (CRITICAL):** "positive" is decided by the profile `utilityGate`. When the
|
|
300
|
+
* gate is UNWIRED, a promotable note STILL fails closed (an absent gate never auto-passes). When wired,
|
|
301
|
+
* the verdict must be present (`!== undefined`) and the gate must accept its `outcomeStats`.
|
|
302
|
+
*/
|
|
303
|
+
export declare function enforcePromotableWriteGate(note: StructuredNoteInput, utilityVerdict: unknown, utilityGate?: UtilityGate): void;
|
|
304
|
+
/**
|
|
305
|
+
* Wrap a {@link MemoryStore} so EVERY durable write path runs the Gate-2 chokepoint (design/77 §2). One
|
|
306
|
+
* wrapper at the store boundary covers BOTH inlets (the `remember` tool and consolidation ADD) — no
|
|
307
|
+
* per-inlet edits. It intercepts BOTH write methods (§2 polish):
|
|
308
|
+
* - `appendStructured` — classify the structured note; a `promotable` one needs a present+positive verdict.
|
|
309
|
+
* Since `appendStructured` carries NO verdict, a promotable structured write is ALWAYS rejected here;
|
|
310
|
+
* the legitimate way to land one is {@link MemoryStore.appendPromotable} (which carries the verdict).
|
|
311
|
+
* - `append` — the legacy/typeless fallback CANNOT carry structure, so any append-path write is
|
|
312
|
+
* classified `caller_authored` and passes through unchanged (documents the chokepoint's exhaustiveness
|
|
313
|
+
* across store methods — a promotable artifact structurally cannot flow out of this path).
|
|
314
|
+
*
|
|
315
|
+
* `appendPromotable` is the gated legitimate door: it runs the gate WITH the supplied verdict, then (on
|
|
316
|
+
* pass) writes via the inner store's `appendStructured` (or `append` fallback). The id-addressed `update`
|
|
317
|
+
* (consolidation's UPDATE op) replaces a note's text with new model-generated content, so it is ALSO
|
|
318
|
+
* secret-scanned (a promotable artifact structurally cannot flow out of it — only existing-note text is
|
|
319
|
+
* rewritten). `delete` and the read/search/manifest surface are straight pass-throughs (they carry no new
|
|
320
|
+
* content and never WRITE a promotable artifact).
|
|
321
|
+
*/
|
|
322
|
+
export declare function guardedMemoryStore(inner: MemoryStore, utilityGate?: UtilityGate): MemoryStore;
|
|
323
|
+
/**
|
|
324
|
+
* Default in-memory MemoryStore (lost on restart). Use a durable backend in production.
|
|
325
|
+
*
|
|
326
|
+
* Id-addressable (design/41): each note gets a UUID stable across `update` and never reused after
|
|
327
|
+
* `delete`, so {@link searchScored}/{@link update}/{@link delete} work and memory consolidation can run.
|
|
328
|
+
* It has no embeddings, so `searchScored` returns a **lexical** (Jaccard) distance as a stand-in for a
|
|
329
|
+
* real cosine distance — fine for dev/tests, but a production store should back this with vectors.
|
|
330
|
+
*/
|
|
331
|
+
export declare class InMemoryMemoryStore implements MemoryStore {
|
|
332
|
+
private byScope;
|
|
333
|
+
/** design/84 Seam B: per-scope periodic-consolidation cursor (lost on restart, like the rest of this store). */
|
|
334
|
+
private cursorByScope;
|
|
335
|
+
/** design/81 Slice 5: the in-memory store has no embedder — always the lexical floor. */
|
|
336
|
+
readonly vectorMode: "lexical";
|
|
337
|
+
read(scope: string): string | null;
|
|
338
|
+
append(scope: string, note: string): string | void;
|
|
339
|
+
appendStructured(scope: string, note: StructuredNoteInput): string;
|
|
340
|
+
clear(scope: string): void;
|
|
341
|
+
/**
|
|
342
|
+
* Keyword search backing the `recall` tool. design/81 Slice 2b — uses the SHARED synonym/stem-aware
|
|
343
|
+
* {@link lexicalSearchMatch} (the SAME matcher as {@link import("../stores/file/memory-store.js").FileMemoryStore.search}),
|
|
344
|
+
* so the `recall` tool returns IDENTICAL results across the InMemory and File backends. With no synonym/stem
|
|
345
|
+
* hit it degrades to the plain substring filter (byte-identical to the pre-Slice-2b behavior).
|
|
346
|
+
*/
|
|
347
|
+
search(scope: string, query: string, limit?: number): string[];
|
|
348
|
+
/**
|
|
349
|
+
* Lexical-distance retrieval (consolidation candidate source). Distance = `1 - Jaccard(terms)` so it
|
|
350
|
+
* lives in [0, 1] ⊂ the [0, 2] cosine-distance contract (0 = identical term set). Returns the top
|
|
351
|
+
* `limit` nearest entries (excludes zero-overlap ones). Deterministic — handy for tests.
|
|
352
|
+
*/
|
|
353
|
+
searchScored(scope: string, query: string, limit?: number): ScoredMemory[];
|
|
354
|
+
update(scope: string, id: string, text: string): void;
|
|
355
|
+
delete(scope: string, id: string): void;
|
|
356
|
+
/** Manifest (design/65 §2.2): a header per note, body excluded. description = the note's first sentence
|
|
357
|
+
* (legacy flat notes have no frontmatter; this is the council #10 P1 fallback). */
|
|
358
|
+
listStructuredNotes(scope: string): MemoryNoteHeader[];
|
|
359
|
+
/** design/84 Seam B: read the periodic-consolidation cursor (opaque note-id high-water mark). */
|
|
360
|
+
getConsolidationCursor(scope: string): string | undefined;
|
|
361
|
+
/** design/84 Seam B: persist the periodic-consolidation cursor. */
|
|
362
|
+
setConsolidationCursor(scope: string, cursor: string): void;
|
|
363
|
+
getByIds(scope: string, ids: string[]): MemoryNoteRecord[];
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* design/81 Slice 2b — a ZERO-MODEL lexical term expander closing the only real lexical recall weakness the
|
|
367
|
+
* red-team raised (the `recall`-tool `search` misses paraphrases like "auth token" vs "credentials/bearer").
|
|
368
|
+
* Pure TS, NO embedder/native/model dep — same posture as the Jaccard stand-in. For a lower-cased query
|
|
369
|
+
* term it returns that term PLUS:
|
|
370
|
+
* - its members of a small bidirectional **synonym set** (auth↔credentials↔bearer, token↔key↔secret, …),
|
|
371
|
+
* looked up for BOTH the original term AND its plural stem (so an inflected query like "tokens" — whose
|
|
372
|
+
* singular "token" is the synonym-group member — still expands to {bearer, apikey, secret, key}), and
|
|
373
|
+
* - a light **plural** stem (`-ies→-y`, `-es`, `-s`, with a ≥3-char guard) so "tokens" reaches "token".
|
|
374
|
+
* (The `-ing`/`-ed` rules were removed — they over-truncated and produced wrong stems.)
|
|
375
|
+
* Always includes the original term, so a non-expandable term degrades to the existing substring match
|
|
376
|
+
* (byte-identical to the prior behavior when no synonym/stem applies). The caller (`lexicalSearchMatch`)
|
|
377
|
+
* treats the returned variants as an OR within one query term (still AND across terms).
|
|
378
|
+
*/
|
|
379
|
+
export declare function expandLexicalTerms(term: string): string[];
|
|
380
|
+
/**
|
|
381
|
+
* Shared SYNONYM/STEM-aware lexical match (design/81 Slice 2b) — the ONE matcher used by BOTH
|
|
382
|
+
* {@link InMemoryMemoryStore.search} and {@link import("../stores/file/memory-store.js").FileMemoryStore.search},
|
|
383
|
+
* so the `recall` tool returns IDENTICAL results across backends (the "byte-identical to InMemory" contract).
|
|
384
|
+
* It is a recall-QUALITY behavior, correct to apply everywhere. (Pg's `search` is a separate SQL path —
|
|
385
|
+
* a known follow-on, unchanged in this pass.)
|
|
386
|
+
*
|
|
387
|
+
* Matching rule: tokenize `text` on word boundaries, then for each whitespace-separated `query` term the
|
|
388
|
+
* text must match AT LEAST ONE of that term's {@link expandLexicalTerms} variants (OR within a term), and
|
|
389
|
+
* EVERY query term must match (AND across terms). The ORIGINAL query term keeps its pre-Slice-2b SUBSTRING
|
|
390
|
+
* semantics (back-compat); the EXPANDED synonym/stem variants are matched on WORD BOUNDARIES (set membership
|
|
391
|
+
* over the text's token set) so a short injected synonym like "key"/"db" cannot substring-match an unrelated
|
|
392
|
+
* word ("keyboard"/"double"). An empty/whitespace-only query never matches.
|
|
393
|
+
*/
|
|
394
|
+
export declare function lexicalSearchMatch(query: string, text: string): boolean;
|
|
395
|
+
/** First sentence (or ~120-char head) of a note — the manifest description fallback for untyped notes. */
|
|
396
|
+
export declare function firstSentence(text: string): string;
|
|
397
|
+
/** The canonical, normalized shape of {@link import("./types.js").TaskSpec.memory} — the ONE form every
|
|
398
|
+
* consumer reads (prepare-task, recall, consolidation, the remember tool), so the union never narrows
|
|
399
|
+
* downstream. `scopes` is the ordered read-side layering (first = stable prefix, last = volatile tail =
|
|
400
|
+
* highest priority); `writeScope` is the single layer ALL writes land in (`null` = read-only, no writes). */
|
|
401
|
+
export interface NormalizedMemorySpec {
|
|
402
|
+
/** Ordered, deduped, non-empty opaque scopes for read-side layered injection (list order = inject order). */
|
|
403
|
+
scopes: string[];
|
|
404
|
+
/** The single scope all writes route to (decision 3), or `null` for a read-only (inherited) layering. */
|
|
405
|
+
writeScope: string | null;
|
|
406
|
+
/** Mirrors `memory.enabled` (default true) — false ⇒ the whole memory feature is off for this task. */
|
|
407
|
+
enabled: boolean;
|
|
408
|
+
/** design/142 §1.2 — present iff the task opted into the v2 scope identity contract (keys validated). */
|
|
409
|
+
scopeContract?: "v2";
|
|
410
|
+
}
|
|
411
|
+
/** The raw, backward-compatible union accepted on `TaskSpec.memory` (design/84 Seam A). */
|
|
412
|
+
export type MemorySpecInput = {
|
|
413
|
+
scope?: string;
|
|
414
|
+
scopes?: ReadonlyArray<string>;
|
|
415
|
+
writeScope?: string | null;
|
|
416
|
+
enabled?: boolean;
|
|
417
|
+
/**
|
|
418
|
+
* design/142 §1.2 — EXPLICIT opt-in to the v2 scope identity contract (`user:` / `org:` /
|
|
419
|
+
* `proj:<tenant>/<projectId>` / `userproj:` typed keys). Absent ⇒ every scope stays byte-identically
|
|
420
|
+
* OPAQUE, including keys that happen to look like `user:42` (the documented legacy shape above — the
|
|
421
|
+
* contract is NEVER activated by prefix sniffing, 复审 F1 double-confirmed). Under `"v2"`, keys
|
|
422
|
+
* carrying a reserved prefix are validated fail-loud (`config.memory_scope_key`); unprefixed keys
|
|
423
|
+
* remain legal opaque legacy scopes.
|
|
424
|
+
*/
|
|
425
|
+
scopeContract?: "v2";
|
|
426
|
+
};
|
|
427
|
+
/**
|
|
428
|
+
* Normalize the backward-compatible {@link import("./types.js").TaskSpec.memory} union into ONE canonical
|
|
429
|
+
* {@link NormalizedMemorySpec} (design/84 Seam A decision 1). The consumer side reads ONLY this result — no
|
|
430
|
+
* narrowing of the union anywhere downstream:
|
|
431
|
+
* - `scopes` wins over `scope` when both are present; otherwise `scope` → `[scope]`.
|
|
432
|
+
* - blank/whitespace scopes are dropped and duplicates collapsed (FIRST occurrence wins — keeps the
|
|
433
|
+
* caller's stable→volatile order); list order is the inject order (stable prefix first, volatile tail last).
|
|
434
|
+
* - `writeScope` defaults to the LAST scope (the highest-priority layer); an EXPLICIT `null` means read-only
|
|
435
|
+
* (no `remember` tool, no consolidation); an explicit non-null string is taken as-is (it need NOT be one
|
|
436
|
+
* of `scopes` — a deployment may write a layer it does not inject, though normally it is the last scope).
|
|
437
|
+
* ⚠️ Layered READ seeding (service [646]①, 142-S4): when `scopes` comes from a registry's defaultScopes
|
|
438
|
+
* (shared read layers), ALWAYS pin `writeScope` explicitly — the last-scope default would land every
|
|
439
|
+
* harvest in whichever shared layer happens to be listed last (a cross-tenant write surface).
|
|
440
|
+
* - returns `undefined` when there are no usable scopes (the caller treats it like "no memory configured").
|
|
441
|
+
*
|
|
442
|
+
* Backward compatibility: `{ scope: "user:42" }` → `{ scopes: ["user:42"], writeScope: "user:42", enabled: true }`,
|
|
443
|
+
* so every single-scope path is byte-identical to the pre-design/84 behavior.
|
|
444
|
+
*/
|
|
445
|
+
export declare function normalizeMemorySpec(input: MemorySpecInput | undefined): NormalizedMemorySpec | undefined;
|
|
446
|
+
/** Max bytes of memory injected into the prompt; larger is truncated with a marker. (CodeWhale: 100 KiB)
|
|
447
|
+
* Exported so the inject-all de-dup seeding (prepare-task.ts) can detect truncation and NOT seed dropped
|
|
448
|
+
* (truncated-out) note ids as "already surfaced" — see the MINOR-1 audit fix there. */
|
|
449
|
+
export declare const MAX_MEMORY_BYTES: number;
|
|
450
|
+
/** The wrapper-tag family the memory injection fences neutralize (`<system-reminder>` is ALWAYS
|
|
451
|
+
* included by {@link sanitizeUntrustedText} itself). Single source (design/138 S2-C, C-F10/O-F11):
|
|
452
|
+
* the memory write-time scan (`memory-engine/scan.ts`) detects break-out markup by diffing
|
|
453
|
+
* `sanitizeUntrustedText(text, MEMORY_WRAPPER_TAGS)` against the raw text, so the scan rules and
|
|
454
|
+
* the ACTUAL injection boundary (this file's compose* fences) can never drift apart. */
|
|
455
|
+
export declare const MEMORY_WRAPPER_TAGS: readonly string[];
|
|
456
|
+
/**
|
|
457
|
+
* Wrap memory content in a `<user_memory>` block. This is the **variable tail** of the system prompt
|
|
458
|
+
* (per-user, scoped, timestamped) — the default prompt provider places it LAST so the stable base
|
|
459
|
+
* prompt before it stays a cacheable prefix (see `defaultPromptProvider`).
|
|
460
|
+
* Truncates over-cap content with a `<truncated bytes=N>` marker (mirrors CodeWhale `as_system_block`).
|
|
461
|
+
* Returns undefined for empty content.
|
|
462
|
+
*/
|
|
463
|
+
export declare function composeMemoryBlock(content: string | null | undefined, scope: string): string | undefined;
|
|
464
|
+
/**
|
|
465
|
+
* Compose the LAYERED inject-all memory block for multiple scopes (design/84 Seam A decision 2). One
|
|
466
|
+
* `<user_memory>` block with a `<scope name="…">` subsection per scope, **in the given list order** — the
|
|
467
|
+
* caller passes stable layers FIRST (cacheable prefix) and volatile layers LAST (re-computed tail), and the
|
|
468
|
+
* highest-priority layer is therefore at the END of the block (closest to the model's attention, matching the
|
|
469
|
+
* single-scope tail placement). Empty layers are omitted. Each layer's content is byte-capped + fence-sanitized
|
|
470
|
+
* exactly like {@link composeMemoryBlock} (the same A-7 escape class). Returns `undefined` when every layer is
|
|
471
|
+
* empty (no block to inject).
|
|
472
|
+
*
|
|
473
|
+
* **Cache-stability guarantee (§5):** the subsection order is EXACTLY the caller's list order — never sorted
|
|
474
|
+
* or reordered here — and the per-scope wrapper/format is fixed, so a stable layer at the front renders
|
|
475
|
+
* byte-identically across turns (the 90/98% prefix-cache hit measured in §5.1/§5.2 depends on this). The
|
|
476
|
+
* VOLATILE layers the caller places last are the only part that changes, so only the tail re-computes.
|
|
477
|
+
*/
|
|
478
|
+
export declare function composeLayeredMemoryBlock(layers: ReadonlyArray<{
|
|
479
|
+
scope: string;
|
|
480
|
+
content: string | null | undefined;
|
|
481
|
+
}>): string | undefined;
|
|
482
|
+
/** Build a `recall` tool that searches long-term memory on demand (just-in-time L3 retrieval).
|
|
483
|
+
* @deprecated design/138 S4 — the Runner no longer mounts this (legacy memoryStore path retired;
|
|
484
|
+
* new model-facing `Recall` calls get the TOMBSTONED_TOOLS migration text). Kept exported one major
|
|
485
|
+
* for deployments that mount it as an explicit custom tool; removal is the next major. */
|
|
486
|
+
export declare function createRecallTool(store: MemoryStore, scope: string): AgentTool;
|
|
487
|
+
/**
|
|
488
|
+
* Build the `remember` tool bound to a store + scope. Auto-applies (writes are scoped to memory).
|
|
489
|
+
*
|
|
490
|
+
* `onRemembered` (optional) is called after each successful append with the new note's `text` and its
|
|
491
|
+
* store id (when the store returned one) — the Runner used it to collect this task's notes for
|
|
492
|
+
* end-of-task consolidation (design/41) without re-reading the store.
|
|
493
|
+
*
|
|
494
|
+
* @deprecated design/138 S4 — the Runner no longer mounts this (legacy memoryStore path retired; new
|
|
495
|
+
* model-facing `Remember` calls get the TOMBSTONED_TOOLS migration text). Kept exported one major for
|
|
496
|
+
* deployments that mount it as an explicit custom tool; removal is the next major.
|
|
497
|
+
*/
|
|
498
|
+
export declare function createRememberTool(store: MemoryStore, scope: string, onRemembered?: (note: {
|
|
499
|
+
id?: string;
|
|
500
|
+
text: string;
|
|
501
|
+
}) => void): AgentTool;
|
|
502
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/core/memory.ts"],"names":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