@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,104 @@
|
|
|
1
|
+
/** Per-segment cap, measured AFTER encoding. A conservative portability policy adopted as contract
|
|
2
|
+
* (research (d) recommendation — NOT a verified third-party hard limit; uuidv7 = 36 chars fits). */
|
|
3
|
+
export declare const SCOPE_SEGMENT_MAX_ENCODED = 64;
|
|
4
|
+
/**
|
|
5
|
+
* Canonical injective encoding for a raw identifier entering a scope key: everything outside
|
|
6
|
+
* `[A-Za-z0-9._-]` becomes `%XX` (UTF-8 bytes), INCLUDING `%` itself (that self-encoding is what
|
|
7
|
+
* makes the map injective — no `__`-style collidable escapes). Throws when the encoded segment
|
|
8
|
+
* exceeds {@link SCOPE_SEGMENT_MAX_ENCODED} (an over-long principal is a deployment config error)
|
|
9
|
+
* or when the raw value is empty.
|
|
10
|
+
*/
|
|
11
|
+
export declare function encodeScopeSegment(raw: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Inverse of {@link encodeScopeSegment}, CANONICAL-FORM ONLY (codex 复审 B6): the input must be
|
|
14
|
+
* exactly what the encoder produces — safe chars stay bare (so `%41` for `A` is refused: two
|
|
15
|
+
* spellings of one identity must not mint two keys), `%XX` sequences must decode as valid UTF-8
|
|
16
|
+
* (fatal decoder — no U+FFFD smoothing), and the 64-char cap holds here too (parse side enforces
|
|
17
|
+
* what the format side promised).
|
|
18
|
+
*/
|
|
19
|
+
export declare function decodeScopeSegment(encoded: string): string;
|
|
20
|
+
export type ParsedScopeKey = {
|
|
21
|
+
kind: "user";
|
|
22
|
+
principal: string;
|
|
23
|
+
} | {
|
|
24
|
+
kind: "org";
|
|
25
|
+
tenant: string;
|
|
26
|
+
} | {
|
|
27
|
+
kind: "proj";
|
|
28
|
+
tenant: string;
|
|
29
|
+
projectId: string;
|
|
30
|
+
} | {
|
|
31
|
+
kind: "userproj";
|
|
32
|
+
principal: string;
|
|
33
|
+
projectId: string;
|
|
34
|
+
}
|
|
35
|
+
/** No recognized v2 prefix: an opaque legacy scope (fully valid under the v2 contract too). */
|
|
36
|
+
| {
|
|
37
|
+
kind: "legacy";
|
|
38
|
+
raw: string;
|
|
39
|
+
};
|
|
40
|
+
export declare function formatUserScope(principal: string): string;
|
|
41
|
+
export declare function formatOrgScope(tenant: string): string;
|
|
42
|
+
export declare function formatProjScope(tenant: string, projectId: string): string;
|
|
43
|
+
export declare function formatUserProjScope(principal: string, projectId: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Parse a scope key under the v2 contract. A key carrying a recognized prefix MUST be well-formed
|
|
46
|
+
* (fail-loud — a malformed `proj:` key under an explicit opt-in is a config error, not an opaque
|
|
47
|
+
* scope); anything without a recognized prefix parses as `{ kind: "legacy" }` and keeps today's
|
|
48
|
+
* opaque behavior. NEVER call this on a deployment that has not opted in (see module header).
|
|
49
|
+
*/
|
|
50
|
+
export declare function parseScopeKey(key: string): ParsedScopeKey;
|
|
51
|
+
/** True when a v2-parsed key belongs to a PERSONAL plane (`user:` / `userproj:`). */
|
|
52
|
+
export declare function isPersonalScope(parsed: ParsedScopeKey): boolean;
|
|
53
|
+
/** True when the key's AUTHORITY is central (design/142 §2 表: user/userproj/org rows) — these keys
|
|
54
|
+
* must never project into an in-repo memory dir (they would leak to every collaborator AND enter
|
|
55
|
+
* commit history; codex 复审 B1 extended the F9 gate from personal to org). `proj:`/legacy stay
|
|
56
|
+
* repo-planed. */
|
|
57
|
+
export declare function isCentralAuthorityScope(parsed: ParsedScopeKey): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* design/142 §7 S1 hard gate (复审 F9): until S1b per-scope physical roots land, ALL scopes of a
|
|
60
|
+
* session materialize under ONE root — so a v2 session mixing `user:*`/`userproj:*` keys with an
|
|
61
|
+
* IN-REPO memory dir would project personal memory into the repo (the exact §2.7 leak shape:
|
|
62
|
+
* personal notes committed to a shared/open repo). Fail-loud, never fail-open: this throws a
|
|
63
|
+
* `config.`-coded error the prepare path must NOT swallow.
|
|
64
|
+
*/
|
|
65
|
+
export declare function assertScopeContractPlacement(args: {
|
|
66
|
+
parsedScopes: readonly ParsedScopeKey[];
|
|
67
|
+
memoryDir: string;
|
|
68
|
+
/** The repo/workspace root the session works in (undefined = no repo context, gate passes). */
|
|
69
|
+
repoRoot: string | undefined;
|
|
70
|
+
}): void;
|
|
71
|
+
/** Repo-root marker file: minted once (by scaffold/deployment, NEVER by the engine), committed, and
|
|
72
|
+
* from then on the project's identity survives clone/copy/rename/machine/cloud-sandbox. */
|
|
73
|
+
export declare const PROJECT_MARKER_PATH = ".sema/project";
|
|
74
|
+
/** projectId 格式单源([637]① 承诺):generic UUID,version nibble 不收紧——宽读严写(读面认外部/
|
|
75
|
+
* 历史 v4;铸造面 formatProjectMarker / center mint 统一产 uuidv7)。center 侧自持镜像+dev-only
|
|
76
|
+
* drift 锁对着这条(registry-core coreTypes 先例)。 */
|
|
77
|
+
export declare const PROJECT_ID_REGEX: RegExp;
|
|
78
|
+
/** Serialize a marker file body (scaffold-side helper; the engine itself never writes one). */
|
|
79
|
+
export declare function formatProjectMarker(projectId: string): string;
|
|
80
|
+
/** Parse a marker body: TOML-subset `key = value` lines, `#` comments and blank lines ignored,
|
|
81
|
+
* optional quotes around the value. Unknown keys are ignored (forward-compatible). codex 复审 H7:
|
|
82
|
+
* ANY line that starts a `projectId` assignment but is not one canonical UUID assignment is a
|
|
83
|
+
* CORRUPT marker (fail-loud, `config.memory_project_marker`) — an empty value, an unclosed quote,
|
|
84
|
+
* a non-UUID, or a DUPLICATE projectId line must never degrade to "no marker" (that would be a
|
|
85
|
+
* silent identity change back to the path key). Returns null only when NO projectId line exists. */
|
|
86
|
+
export declare function parseProjectMarker(body: string): {
|
|
87
|
+
projectId: string;
|
|
88
|
+
} | null;
|
|
89
|
+
/**
|
|
90
|
+
* design/142 §1.1 — resolve a project's identity. READS ONLY THE MARKER (复审 F2: never derives an
|
|
91
|
+
* identity from a git remote; remote-URL normalization is a scaffold-side minting heuristic, not an
|
|
92
|
+
* identity source). v1 scope (复审 F10): ONE marker at the project root —
|
|
93
|
+
* - inside a git repo, the root is the REPO root; a marker at a nested directory that is not the
|
|
94
|
+
* repo root is fail-loud (`config.memory_project_marker_nested`) — monorepo sub-project identity
|
|
95
|
+
* is a future need-signal, not a silent second identity;
|
|
96
|
+
* - outside git, the given rootDir IS the project root (path-form local projects).
|
|
97
|
+
* Returns null when no marker exists (callers fall through the resolution ladder: explicit
|
|
98
|
+
* declaration → path fallback with a warning).
|
|
99
|
+
*/
|
|
100
|
+
export declare function resolveProjectId(rootDir: string): {
|
|
101
|
+
projectId: string;
|
|
102
|
+
markerDir: string;
|
|
103
|
+
} | null;
|
|
104
|
+
//# sourceMappingURL=scope-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-contract.d.ts","sourceRoot":"","sources":["../../../src/core/memory-engine/scope-contract.ts"],"names":[],"mappings":"AAmBA;qGACqG;AACrG,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAI5C;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAmBtD;AAmBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CA4B1D;AAMD,MAAM,MAAM,cAAc,GACtB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACnC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAC/B;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,SAA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;AAYD;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG;IAAE,SAAS,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CA4BjG"}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
// design/142 §1 — the memory scope IDENTITY CONTRACT (r2, clay-approved 2026-07-12).
|
|
2
|
+
//
|
|
3
|
+
// Today `TaskSpec.memory.scopes` are OPAQUE free-form strings; grouping correctness rides entirely on
|
|
4
|
+
// whoever mints them (path-derived keys break on rename / second checkout / every cloud clone). This
|
|
5
|
+
// module is the v2 contract: a typed key syntax (`user:` / `org:` / `proj:` / `userproj:`), an
|
|
6
|
+
// injective segment encoding, and the in-repo project marker that makes a project's identity travel
|
|
7
|
+
// WITH its files instead of living in a path.
|
|
8
|
+
//
|
|
9
|
+
// ACTIVATION IS AN EXPLICIT OPT-IN (`TaskSpec.memory.scopeContract: "v2"`) — never prefix sniffing:
|
|
10
|
+
// `user:42` is the documented LEGACY example shape (types.ts TaskSpec.memory), so recognizing keys by
|
|
11
|
+
// prefix would silently capture existing deployments (design/142 复审 F1, codex+fable double-confirmed
|
|
12
|
+
// BLOCKER). Without the opt-in every scope stays byte-identically opaque.
|
|
13
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
14
|
+
import { dirname, join, resolve } from "node:path";
|
|
15
|
+
// ---------------------------------------------------------------------------------------------
|
|
16
|
+
// Segment encoding (§1.2) — injective, third-party-portable
|
|
17
|
+
// ---------------------------------------------------------------------------------------------
|
|
18
|
+
/** Per-segment cap, measured AFTER encoding. A conservative portability policy adopted as contract
|
|
19
|
+
* (research (d) recommendation — NOT a verified third-party hard limit; uuidv7 = 36 chars fits). */
|
|
20
|
+
export const SCOPE_SEGMENT_MAX_ENCODED = 64;
|
|
21
|
+
const SEGMENT_SAFE = /^[A-Za-z0-9._-]$/;
|
|
22
|
+
/**
|
|
23
|
+
* Canonical injective encoding for a raw identifier entering a scope key: everything outside
|
|
24
|
+
* `[A-Za-z0-9._-]` becomes `%XX` (UTF-8 bytes), INCLUDING `%` itself (that self-encoding is what
|
|
25
|
+
* makes the map injective — no `__`-style collidable escapes). Throws when the encoded segment
|
|
26
|
+
* exceeds {@link SCOPE_SEGMENT_MAX_ENCODED} (an over-long principal is a deployment config error)
|
|
27
|
+
* or when the raw value is empty.
|
|
28
|
+
*/
|
|
29
|
+
export function encodeScopeSegment(raw) {
|
|
30
|
+
if (raw.length === 0)
|
|
31
|
+
throw new Error("scope segment must be non-empty");
|
|
32
|
+
// codex 复审 B6: a lone surrogate would silently become U+FFFD in UTF-8 (two distinct JS strings
|
|
33
|
+
// → one key = injectivity broken). Refuse non-well-formed input outright.
|
|
34
|
+
if (!isWellFormedString(raw))
|
|
35
|
+
throw new Error("scope segment is not well-formed Unicode (lone surrogate)");
|
|
36
|
+
let out = "";
|
|
37
|
+
for (const ch of raw) {
|
|
38
|
+
if (SEGMENT_SAFE.test(ch)) {
|
|
39
|
+
out += ch;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
for (const byte of Buffer.from(ch, "utf8"))
|
|
43
|
+
out += `%${byte.toString(16).toUpperCase().padStart(2, "0")}`;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
if (out.length > SCOPE_SEGMENT_MAX_ENCODED) {
|
|
47
|
+
throw new Error(`scope segment exceeds ${SCOPE_SEGMENT_MAX_ENCODED} encoded chars (${out.length}): ${out.slice(0, 24)}…`);
|
|
48
|
+
}
|
|
49
|
+
return out;
|
|
50
|
+
}
|
|
51
|
+
function isWellFormedString(s) {
|
|
52
|
+
// String.prototype.isWellFormed (Node ≥20) with a manual fallback.
|
|
53
|
+
const anyS = s;
|
|
54
|
+
if (typeof anyS.isWellFormed === "function")
|
|
55
|
+
return anyS.isWellFormed();
|
|
56
|
+
for (let i = 0; i < s.length; i++) {
|
|
57
|
+
const c = s.charCodeAt(i);
|
|
58
|
+
if (c >= 0xd800 && c <= 0xdbff) {
|
|
59
|
+
const n = s.charCodeAt(i + 1);
|
|
60
|
+
if (!(n >= 0xdc00 && n <= 0xdfff))
|
|
61
|
+
return false;
|
|
62
|
+
i++;
|
|
63
|
+
}
|
|
64
|
+
else if (c >= 0xdc00 && c <= 0xdfff)
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
const FATAL_UTF8 = new TextDecoder("utf-8", { fatal: true });
|
|
70
|
+
/**
|
|
71
|
+
* Inverse of {@link encodeScopeSegment}, CANONICAL-FORM ONLY (codex 复审 B6): the input must be
|
|
72
|
+
* exactly what the encoder produces — safe chars stay bare (so `%41` for `A` is refused: two
|
|
73
|
+
* spellings of one identity must not mint two keys), `%XX` sequences must decode as valid UTF-8
|
|
74
|
+
* (fatal decoder — no U+FFFD smoothing), and the 64-char cap holds here too (parse side enforces
|
|
75
|
+
* what the format side promised).
|
|
76
|
+
*/
|
|
77
|
+
export function decodeScopeSegment(encoded) {
|
|
78
|
+
if (encoded.length > SCOPE_SEGMENT_MAX_ENCODED) {
|
|
79
|
+
throw new Error(`scope segment exceeds ${SCOPE_SEGMENT_MAX_ENCODED} encoded chars (${encoded.length})`);
|
|
80
|
+
}
|
|
81
|
+
if (!/^(?:[A-Za-z0-9._-]|%[0-9A-F]{2})*$/.test(encoded)) {
|
|
82
|
+
throw new Error(`malformed scope segment: ${encoded}`);
|
|
83
|
+
}
|
|
84
|
+
const bytes = [];
|
|
85
|
+
for (let i = 0; i < encoded.length; i++) {
|
|
86
|
+
if (encoded[i] === "%") {
|
|
87
|
+
bytes.push(parseInt(encoded.slice(i + 1, i + 3), 16));
|
|
88
|
+
i += 2;
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
bytes.push(encoded.charCodeAt(i));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
let decoded;
|
|
95
|
+
try {
|
|
96
|
+
decoded = FATAL_UTF8.decode(Uint8Array.from(bytes));
|
|
97
|
+
}
|
|
98
|
+
catch {
|
|
99
|
+
throw new Error(`malformed scope segment (invalid UTF-8 in %XX sequence): ${encoded}`);
|
|
100
|
+
}
|
|
101
|
+
// Canonical-form check: re-encoding must reproduce the input byte-for-byte. This rejects
|
|
102
|
+
// non-canonical spellings (`%41` for `A`) in ONE rule instead of case-by-case validation.
|
|
103
|
+
if (encodeScopeSegment(decoded) !== encoded) {
|
|
104
|
+
throw new Error(`non-canonical scope segment (re-encode mismatch): ${encoded}`);
|
|
105
|
+
}
|
|
106
|
+
return decoded;
|
|
107
|
+
}
|
|
108
|
+
export function formatUserScope(principal) {
|
|
109
|
+
return `user:${encodeScopeSegment(principal)}`;
|
|
110
|
+
}
|
|
111
|
+
export function formatOrgScope(tenant) {
|
|
112
|
+
return `org:${encodeScopeSegment(tenant)}`;
|
|
113
|
+
}
|
|
114
|
+
export function formatProjScope(tenant, projectId) {
|
|
115
|
+
return `proj:${encodeScopeSegment(tenant)}/${encodeScopeSegment(projectId)}`;
|
|
116
|
+
}
|
|
117
|
+
export function formatUserProjScope(principal, projectId) {
|
|
118
|
+
return `userproj:${encodeScopeSegment(principal)}/${encodeScopeSegment(projectId)}`;
|
|
119
|
+
}
|
|
120
|
+
const ONE_SEGMENT = /^(user|org):((?:[A-Za-z0-9._-]|%[0-9A-F]{2})+)$/;
|
|
121
|
+
const TWO_SEGMENT = /^(proj|userproj):((?:[A-Za-z0-9._-]|%[0-9A-F]{2})+)\/((?:[A-Za-z0-9._-]|%[0-9A-F]{2})+)$/;
|
|
122
|
+
/**
|
|
123
|
+
* Parse a scope key under the v2 contract. A key carrying a recognized prefix MUST be well-formed
|
|
124
|
+
* (fail-loud — a malformed `proj:` key under an explicit opt-in is a config error, not an opaque
|
|
125
|
+
* scope); anything without a recognized prefix parses as `{ kind: "legacy" }` and keeps today's
|
|
126
|
+
* opaque behavior. NEVER call this on a deployment that has not opted in (see module header).
|
|
127
|
+
*/
|
|
128
|
+
export function parseScopeKey(key) {
|
|
129
|
+
const m1 = ONE_SEGMENT.exec(key);
|
|
130
|
+
if (m1) {
|
|
131
|
+
const seg = decodeScopeSegment(m1[2]);
|
|
132
|
+
return m1[1] === "user" ? { kind: "user", principal: seg } : { kind: "org", tenant: seg };
|
|
133
|
+
}
|
|
134
|
+
const m2 = TWO_SEGMENT.exec(key);
|
|
135
|
+
if (m2) {
|
|
136
|
+
const a = decodeScopeSegment(m2[2]);
|
|
137
|
+
const b = decodeScopeSegment(m2[3]);
|
|
138
|
+
return m2[1] === "proj" ? { kind: "proj", tenant: a, projectId: b } : { kind: "userproj", principal: a, projectId: b };
|
|
139
|
+
}
|
|
140
|
+
const prefix = /^(user|org|proj|userproj):/.exec(key);
|
|
141
|
+
if (prefix) {
|
|
142
|
+
const e = new Error(`malformed v2 scope key "${key}": prefix "${prefix[1]}:" is reserved by the scope contract ` +
|
|
143
|
+
`(design/142 §1.2) — segments must be encoded with encodeScopeSegment (charset [A-Za-z0-9._-] + %XX), ` +
|
|
144
|
+
`"${prefix[1]}" takes ${prefix[1] === "proj" || prefix[1] === "userproj" ? "two segments (a/b)" : "one segment"}.`);
|
|
145
|
+
e.code = "config.memory_scope_key";
|
|
146
|
+
throw e;
|
|
147
|
+
}
|
|
148
|
+
return { kind: "legacy", raw: key };
|
|
149
|
+
}
|
|
150
|
+
/** True when a v2-parsed key belongs to a PERSONAL plane (`user:` / `userproj:`). */
|
|
151
|
+
export function isPersonalScope(parsed) {
|
|
152
|
+
return parsed.kind === "user" || parsed.kind === "userproj";
|
|
153
|
+
}
|
|
154
|
+
/** True when the key's AUTHORITY is central (design/142 §2 表: user/userproj/org rows) — these keys
|
|
155
|
+
* must never project into an in-repo memory dir (they would leak to every collaborator AND enter
|
|
156
|
+
* commit history; codex 复审 B1 extended the F9 gate from personal to org). `proj:`/legacy stay
|
|
157
|
+
* repo-planed. */
|
|
158
|
+
export function isCentralAuthorityScope(parsed) {
|
|
159
|
+
return isPersonalScope(parsed) || parsed.kind === "org";
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* design/142 §7 S1 hard gate (复审 F9): until S1b per-scope physical roots land, ALL scopes of a
|
|
163
|
+
* session materialize under ONE root — so a v2 session mixing `user:*`/`userproj:*` keys with an
|
|
164
|
+
* IN-REPO memory dir would project personal memory into the repo (the exact §2.7 leak shape:
|
|
165
|
+
* personal notes committed to a shared/open repo). Fail-loud, never fail-open: this throws a
|
|
166
|
+
* `config.`-coded error the prepare path must NOT swallow.
|
|
167
|
+
*/
|
|
168
|
+
export function assertScopeContractPlacement(args) {
|
|
169
|
+
if (!args.repoRoot)
|
|
170
|
+
return;
|
|
171
|
+
const personal = args.parsedScopes.filter(isCentralAuthorityScope);
|
|
172
|
+
if (personal.length === 0)
|
|
173
|
+
return;
|
|
174
|
+
const root = resolve(args.repoRoot);
|
|
175
|
+
const dir = resolve(args.memoryDir);
|
|
176
|
+
if (dir === root || dir.startsWith(root + "/")) {
|
|
177
|
+
const e = new Error(`memory scope contract v2: central-authority scope(s) ${personal
|
|
178
|
+
.map((p) => `"${p.kind}"`)
|
|
179
|
+
.join(", ")} cannot materialize into an IN-REPO memory dir (${args.memoryDir}) — ` +
|
|
180
|
+
`a user/userproj/org layer projected under the repo root would leak non-repo memory to every ` +
|
|
181
|
+
`collaborator (and into commit history). Move the memory dir out of the repo, or drop those scopes.`);
|
|
182
|
+
e.code = "config.memory_scope_placement";
|
|
183
|
+
throw e;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
// ---------------------------------------------------------------------------------------------
|
|
187
|
+
// Project marker (§1.1) — identity travels with the files
|
|
188
|
+
// ---------------------------------------------------------------------------------------------
|
|
189
|
+
/** Repo-root marker file: minted once (by scaffold/deployment, NEVER by the engine), committed, and
|
|
190
|
+
* from then on the project's identity survives clone/copy/rename/machine/cloud-sandbox. */
|
|
191
|
+
export const PROJECT_MARKER_PATH = ".sema/project";
|
|
192
|
+
/** projectId 格式单源([637]① 承诺):generic UUID,version nibble 不收紧——宽读严写(读面认外部/
|
|
193
|
+
* 历史 v4;铸造面 formatProjectMarker / center mint 统一产 uuidv7)。center 侧自持镜像+dev-only
|
|
194
|
+
* drift 锁对着这条(registry-core coreTypes 先例)。 */
|
|
195
|
+
export const PROJECT_ID_REGEX = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
196
|
+
const UUID_RE = PROJECT_ID_REGEX;
|
|
197
|
+
/** Serialize a marker file body (scaffold-side helper; the engine itself never writes one). */
|
|
198
|
+
export function formatProjectMarker(projectId) {
|
|
199
|
+
if (!UUID_RE.test(projectId))
|
|
200
|
+
throw new Error(`projectId must be a UUID, got: ${projectId}`);
|
|
201
|
+
return `projectId = ${projectId.toLowerCase()}\n`;
|
|
202
|
+
}
|
|
203
|
+
/** Parse a marker body: TOML-subset `key = value` lines, `#` comments and blank lines ignored,
|
|
204
|
+
* optional quotes around the value. Unknown keys are ignored (forward-compatible). codex 复审 H7:
|
|
205
|
+
* ANY line that starts a `projectId` assignment but is not one canonical UUID assignment is a
|
|
206
|
+
* CORRUPT marker (fail-loud, `config.memory_project_marker`) — an empty value, an unclosed quote,
|
|
207
|
+
* a non-UUID, or a DUPLICATE projectId line must never degrade to "no marker" (that would be a
|
|
208
|
+
* silent identity change back to the path key). Returns null only when NO projectId line exists. */
|
|
209
|
+
export function parseProjectMarker(body) {
|
|
210
|
+
const corrupt = (detail) => {
|
|
211
|
+
const e = new Error(`corrupt project marker: ${detail}`);
|
|
212
|
+
e.code = "config.memory_project_marker";
|
|
213
|
+
throw e;
|
|
214
|
+
};
|
|
215
|
+
let projectId;
|
|
216
|
+
for (const line of body.split(/\r?\n/)) {
|
|
217
|
+
const t = line.trim();
|
|
218
|
+
if (!t || t.startsWith("#"))
|
|
219
|
+
continue;
|
|
220
|
+
if (!/^projectId\b/.test(t))
|
|
221
|
+
continue;
|
|
222
|
+
const m = /^projectId\s*=\s*(?:"([^"]*)"|([^"\s]+))\s*$/.exec(t);
|
|
223
|
+
if (!m)
|
|
224
|
+
corrupt(`unparseable projectId line (${t.slice(0, 48)})`);
|
|
225
|
+
const value = m[1] ?? m[2] ?? "";
|
|
226
|
+
if (!UUID_RE.test(value))
|
|
227
|
+
corrupt(`projectId is not a UUID (${value.slice(0, 48) || "<empty>"})`);
|
|
228
|
+
if (projectId !== undefined && projectId !== value.toLowerCase())
|
|
229
|
+
corrupt("duplicate conflicting projectId lines");
|
|
230
|
+
projectId = value.toLowerCase();
|
|
231
|
+
}
|
|
232
|
+
if (projectId === undefined)
|
|
233
|
+
return null;
|
|
234
|
+
return { projectId };
|
|
235
|
+
}
|
|
236
|
+
function gitRootOf(dir) {
|
|
237
|
+
let cur = resolve(dir);
|
|
238
|
+
for (;;) {
|
|
239
|
+
if (existsSync(join(cur, ".git")))
|
|
240
|
+
return cur;
|
|
241
|
+
const parent = dirname(cur);
|
|
242
|
+
if (parent === cur)
|
|
243
|
+
return undefined;
|
|
244
|
+
cur = parent;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* design/142 §1.1 — resolve a project's identity. READS ONLY THE MARKER (复审 F2: never derives an
|
|
249
|
+
* identity from a git remote; remote-URL normalization is a scaffold-side minting heuristic, not an
|
|
250
|
+
* identity source). v1 scope (复审 F10): ONE marker at the project root —
|
|
251
|
+
* - inside a git repo, the root is the REPO root; a marker at a nested directory that is not the
|
|
252
|
+
* repo root is fail-loud (`config.memory_project_marker_nested`) — monorepo sub-project identity
|
|
253
|
+
* is a future need-signal, not a silent second identity;
|
|
254
|
+
* - outside git, the given rootDir IS the project root (path-form local projects).
|
|
255
|
+
* Returns null when no marker exists (callers fall through the resolution ladder: explicit
|
|
256
|
+
* declaration → path fallback with a warning).
|
|
257
|
+
*/
|
|
258
|
+
export function resolveProjectId(rootDir) {
|
|
259
|
+
const dir = resolve(rootDir);
|
|
260
|
+
const gitRoot = gitRootOf(dir);
|
|
261
|
+
const projectRoot = gitRoot ?? dir;
|
|
262
|
+
// codex 复审 M13: scan EVERY level from the call dir up to the repo root — a nested marker at an
|
|
263
|
+
// intermediate directory (repo/sub/.sema/project when called from repo/sub/deeper) is the same
|
|
264
|
+
// v1 violation as one at the call dir itself; missing it would silently split identities.
|
|
265
|
+
if (gitRoot !== undefined) {
|
|
266
|
+
let cur = dir;
|
|
267
|
+
while (cur !== gitRoot) {
|
|
268
|
+
if (existsSync(join(cur, PROJECT_MARKER_PATH))) {
|
|
269
|
+
const e = new Error(`nested project marker: ${join(cur, PROJECT_MARKER_PATH)} sits below the repo root (${gitRoot}) — ` +
|
|
270
|
+
`v1 supports ONE marker at the repo root (design/142 §1.1); remove the nested marker or split the repo.`);
|
|
271
|
+
e.code = "config.memory_project_marker_nested";
|
|
272
|
+
throw e;
|
|
273
|
+
}
|
|
274
|
+
const parent = dirname(cur);
|
|
275
|
+
if (parent === cur)
|
|
276
|
+
break;
|
|
277
|
+
cur = parent;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
const markerFile = join(projectRoot, PROJECT_MARKER_PATH);
|
|
281
|
+
if (!existsSync(markerFile))
|
|
282
|
+
return null;
|
|
283
|
+
const parsed = parseProjectMarker(readFileSync(markerFile, "utf8"));
|
|
284
|
+
if (!parsed)
|
|
285
|
+
return null;
|
|
286
|
+
return { projectId: parsed.projectId, markerDir: projectRoot };
|
|
287
|
+
}
|
|
288
|
+
//# sourceMappingURL=scope-contract.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope-contract.js","sourceRoot":"","sources":["../../../src/core/memory-engine/scope-contract.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,EAAE;AACF,sGAAsG;AACtG,qGAAqG;AACrG,+FAA+F;AAC/F,oGAAoG;AACpG,8CAA8C;AAC9C,EAAE;AACF,oGAAoG;AACpG,sGAAsG;AACtG,qGAAqG;AACrG,0EAA0E;AAC1E,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAA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
1
|
+
import { type MemorySyncCursor } from "./sync.js";
|
|
2
|
+
import type { MemoryBackend, MemoryEntry, PatchReport } from "./types.js";
|
|
3
|
+
/** The injected HTTP seam — core never bundles a fetch. The deployment maps `path` (e.g.
|
|
4
|
+
* `/v1/memory/sync/user%3Aalice`) onto its server base URL, attaches auth, and returns the
|
|
5
|
+
* DECODED JSON body of a 2xx response; any non-2xx / network failure should THROW (the round then
|
|
6
|
+
* aborts with zero local side effects — the transport runs before any local write). */
|
|
7
|
+
export type MemorySyncTransport = (path: string, body: unknown) => Promise<unknown>;
|
|
8
|
+
/** The wire REQUEST of one round (the server's `parseMemorySyncRequest` twin — [671]①): the push
|
|
9
|
+
* half as computed against the client's own cursor. `deletes` ⊆ `Object.keys(baseRevs)` by
|
|
10
|
+
* construction (a delete is CAS'd on its baseline; an id never synced cannot be delete-propagated). */
|
|
11
|
+
export interface MemorySyncRequestBody {
|
|
12
|
+
peer: string;
|
|
13
|
+
/** id → rev at the last completed round (the cursor's baseRevs; empty = first round). */
|
|
14
|
+
baseRevs: Record<string, string>;
|
|
15
|
+
/** Full state of every entry new/changed here since the baseline. */
|
|
16
|
+
entries: MemoryEntry[];
|
|
17
|
+
/** Ids deleted here since the baseline (tombstoned or gone from the local plane). */
|
|
18
|
+
deletes: string[];
|
|
19
|
+
}
|
|
20
|
+
/** The wire RESPONSE of one round (server `MemorySyncResponse` twin — [671]①: one RTT, both
|
|
21
|
+
* directions; `serverDeletes` is the delete-propagation leg [codex B4 — without it a central
|
|
22
|
+
* removal never crosses = livelock]; `cursor` is the server-computed next baseline with the
|
|
23
|
+
* retention discipline ALREADY applied to the pull half). */
|
|
24
|
+
export interface MemorySyncResponseBody {
|
|
25
|
+
/** Ops the server actually landed from our push (empty on an idempotent replay). */
|
|
26
|
+
applied: PatchReport["applied"];
|
|
27
|
+
/** Server-side rejections/divergences: inbound-gate rejects, rev lies, CAS losses, both-sides
|
|
28
|
+
* divergence (resolve via the §3 ladder — loser minted as a sibling, never dropped). */
|
|
29
|
+
conflicts: Array<{
|
|
30
|
+
id: string;
|
|
31
|
+
reason: string;
|
|
32
|
+
baseRev?: string;
|
|
33
|
+
currentRev?: string;
|
|
34
|
+
}>;
|
|
35
|
+
/** The pull half: entries new/changed centrally since our baseline. */
|
|
36
|
+
serverEntries: MemoryEntry[];
|
|
37
|
+
/** The pull half's delete leg: centrally deleted, unchanged here since baseline (CAS baseRev). */
|
|
38
|
+
serverDeletes: Array<{
|
|
39
|
+
id: string;
|
|
40
|
+
baseRev: string;
|
|
41
|
+
}>;
|
|
42
|
+
/** The next baseline to persist AFTER the pull half lands (the client cannot compute it — it
|
|
43
|
+
* does not hold the central set). Pull-half ids are retained at the OLD baseline inside. */
|
|
44
|
+
cursor: {
|
|
45
|
+
peer: string;
|
|
46
|
+
baseRevs: Record<string, string>;
|
|
47
|
+
updatedAtMs: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
/** One aggregated conflict: `server` = reported by the central half (its gate/CAS/divergence),
|
|
51
|
+
* `local` = produced landing the pull half here (our CAS refusals, inbound-gate rejects, rev
|
|
52
|
+
* lies). Nothing is hidden; the caller resolves via the §3 ladder (loser-as-sibling). */
|
|
53
|
+
export interface MemorySyncClientConflict {
|
|
54
|
+
side: "server" | "local";
|
|
55
|
+
id: string;
|
|
56
|
+
reason: string;
|
|
57
|
+
baseRev?: string;
|
|
58
|
+
currentRev?: string;
|
|
59
|
+
}
|
|
60
|
+
export interface SyncMemoryScopeOptions {
|
|
61
|
+
/** The LOCAL authority plane (TOC: the File backend). */
|
|
62
|
+
backend: MemoryBackend;
|
|
63
|
+
/** The scope this round syncs (one round = one scope, mirroring the server route). */
|
|
64
|
+
scope: string;
|
|
65
|
+
/** The injected HTTP seam. */
|
|
66
|
+
transport: MemorySyncTransport;
|
|
67
|
+
/** The persisted cursor from the last completed round with this peer; absent = first round. */
|
|
68
|
+
cursor?: MemorySyncCursor;
|
|
69
|
+
/** Peer name for the cursor partition (defaults to the cursor's peer, else "central"). */
|
|
70
|
+
peer?: string;
|
|
71
|
+
/** Caller-injected clock (engine precedent) — stamps the returned cursor's updatedAtMs. */
|
|
72
|
+
now?: () => number;
|
|
73
|
+
}
|
|
74
|
+
export interface MemorySyncClientResult {
|
|
75
|
+
/** True ⇔ the round was fully clean: cursor advanced AND zero conflicts on either side. */
|
|
76
|
+
ok: boolean;
|
|
77
|
+
/** What the push half contained (ids only — the bodies already went over the wire). */
|
|
78
|
+
pushed: {
|
|
79
|
+
entries: string[];
|
|
80
|
+
deletes: string[];
|
|
81
|
+
};
|
|
82
|
+
/** Ops the server landed from our push (response `applied` verbatim). */
|
|
83
|
+
serverApplied: PatchReport["applied"];
|
|
84
|
+
/** Ops we landed locally from the pull half. */
|
|
85
|
+
localApplied: PatchReport["applied"];
|
|
86
|
+
/** Aggregated server-reported + local conflicts (never hidden). */
|
|
87
|
+
conflicts: MemorySyncClientConflict[];
|
|
88
|
+
/** True ⇔ every pull-half item landed cleanly, so `cursor` is the NEW baseline to persist. */
|
|
89
|
+
cursorAdvanced: boolean;
|
|
90
|
+
/** The cursor the caller should now persist: advanced on full success, otherwise the INPUT
|
|
91
|
+
* cursor unchanged (undefined on a failed first round) — the retention discipline. */
|
|
92
|
+
cursor: MemorySyncCursor | undefined;
|
|
93
|
+
}
|
|
94
|
+
/**
|
|
95
|
+
* One full CLIENT sync round for one (scope, peer) against the [671]① central sync API — see the
|
|
96
|
+
* module header for the ①-⑤ flow and the cursor retention discipline. Pure orchestration: all I/O
|
|
97
|
+
* rides the injected backend/transport; the caller persists the returned cursor.
|
|
98
|
+
*/
|
|
99
|
+
export declare function syncMemoryScope(opts: SyncMemoryScopeOptions): Promise<MemorySyncClientResult>;
|
|
100
|
+
//# sourceMappingURL=sync-client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sync-client.d.ts","sourceRoot":"","sources":["../../../src/core/memory-engine/sync-client.ts"],"names":[],"mappings":"AAoCA,OAAO,EAA0B,KAAK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