sdd-agent-platform 0.3.0 → 0.4.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/README.md +234 -239
- package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/ai-tools.d.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +464 -0
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +181 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.d.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +241 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.d.ts +29 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +198 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/templates.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/templates.js +79 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/templates.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts.js +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/coding-facts/contracts.d.ts +71 -0
- package/node_modules/@sdd-agent-platform/core/dist/coding-facts/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/coding-facts/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/coding-facts.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/coding-facts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/coding-facts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +31 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +89 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +49 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +202 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-detection.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-detection.js +111 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-detection.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-status.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-status.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/project-status.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +441 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/budget.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/budget.js +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/budget.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +46 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +244 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/command-summary.d.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/command-summary.js +34 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/command-summary.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.d.ts +50 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +86 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.d.ts +19 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/source-refs.d.ts +9 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/source-refs.js +30 -0
- package/node_modules/@sdd-agent-platform/core/dist/context/source-refs.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +43 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/runtime.d.ts +36 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/runtime.js +142 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/context-offload.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/context.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/context.js +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/context.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts/issues.d.ts +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts/issues.js +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts/issues.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +75 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/queue.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/queue.js +47 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/queue.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/run-state.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/run-state.js +13 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/run-state.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/state-machine.d.ts +30 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/state-machine.js +56 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/state-machine.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +100 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation.d.ts +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/ai-entries.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/ai-entries.js +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/ai-entries.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +104 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.d.ts +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +78 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.d.ts +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +247 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +313 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-records.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-records.js +68 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-records.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +121 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.d.ts +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +279 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +292 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/model.d.ts +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/model.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/model.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/summary.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/summary.js +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/summary.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +54 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.d.ts +31 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +170 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +249 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +363 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.d.ts +27 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +185 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.d.ts +100 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +327 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/wave-executor.d.ts +45 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/wave-executor.js +178 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/wave-executor.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution.d.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +111 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/index.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/index.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/index.js.map +1 -0
- package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +147 -0
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.d.ts +39 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +319 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/rendering.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/rendering.js +27 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/rendering.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/risk-signals.d.ts +57 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/risk-signals.js +80 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/risk-signals.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +207 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle.js +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +45 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/index.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/index.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/index.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +314 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/path-safety.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning/task-graph.d.ts +57 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning/task-graph.js +157 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning/task-graph.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning/wave-plan.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning/wave-plan.js +119 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning/wave-plan.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/planning.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +70 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +267 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +121 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.d.ts +61 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +69 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +226 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +70 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +220 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +161 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +84 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +111 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +107 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.d.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +99 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.d.ts +19 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +89 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries.d.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries.js +13 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js +77 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +57 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +195 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.d.ts +33 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +215 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +160 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk.d.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/risk.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +278 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +343 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/profile-resolution.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/profile-resolution.js +127 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/profile-resolution.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/risk-policy.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/risk-policy.js +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/risk-policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-cache.d.ts +39 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-cache.js +59 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +318 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-sdd-task.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-sdd-task.js +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-sdd-task.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/routing-rules.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/routing-rules.js +68 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/routing-rules.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +169 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.d.ts +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +102 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-registry.d.ts +17 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-registry.js +82 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-registry.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +235 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/team-mode.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/team-mode.js +134 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/team-mode.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +113 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +83 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js +99 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +203 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +97 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +238 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +366 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +62 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +130 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +9 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +61 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +274 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +175 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis.js +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +35 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +142 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.d.ts +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +89 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +189 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +88 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-inspection.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-inspection.js +31 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-inspection.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +98 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +538 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.d.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js +77 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs.d.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/contracts.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.d.ts +71 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +275 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +166 -0
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +439 -0
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/status.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/status.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/status.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/storage/json-io.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/storage/json-io.js +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/storage/json-io.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +305 -0
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +859 -0
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +41 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.d.ts +43 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +262 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/subagents.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +17 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +243 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +497 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-risk-profile.d.ts +33 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-risk-profile.js +153 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-risk-profile.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +384 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +69 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +50 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +546 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +51 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +129 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +29 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +425 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +877 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +58 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +428 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +299 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units/runtime.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units/runtime.js +90 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units/runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/work-units.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +182 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +130 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +146 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +89 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +75 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.d.ts +29 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +78 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +122 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +253 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree/isolation.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree/isolation.js +89 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree/isolation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree/lifecycle.d.ts +39 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree/lifecycle.js +221 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree/lifecycle.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/worktree.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/package.json +40 -0
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +138 -0
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +577 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.test.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +302 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +181 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +231 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/templates.ts +99 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/src/coding-facts/contracts.ts +79 -0
- package/node_modules/@sdd-agent-platform/core/src/coding-facts.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +306 -0
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +120 -0
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +259 -0
- package/node_modules/@sdd-agent-platform/core/src/config/project-detection.ts +147 -0
- package/node_modules/@sdd-agent-platform/core/src/config/project-status.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +445 -0
- package/node_modules/@sdd-agent-platform/core/src/context/budget.ts +30 -0
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +317 -0
- package/node_modules/@sdd-agent-platform/core/src/context/command-summary.ts +45 -0
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +188 -0
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -0
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +48 -0
- package/node_modules/@sdd-agent-platform/core/src/context/source-refs.ts +41 -0
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.test.ts +71 -0
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.ts +178 -0
- package/node_modules/@sdd-agent-platform/core/src/context-offload.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/context.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/src/contracts/issues.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/src/contracts.test.ts +9 -0
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +116 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/delegation.test.ts +183 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +23 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/queue.ts +58 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/run-state.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/state-machine.ts +90 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +124 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/ai-entries.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/local-run-index.ts +27 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +84 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +252 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +330 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-records.ts +79 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +128 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +300 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +657 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +319 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/model.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/summary.ts +11 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +80 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +49 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +195 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +187 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +305 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +97 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +225 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +132 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +436 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +111 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.ts +231 -0
- package/node_modules/@sdd-agent-platform/core/src/execution.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +57 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +175 -0
- package/node_modules/@sdd-agent-platform/core/src/governance.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/index.test.ts +25 -0
- package/node_modules/@sdd-agent-platform/core/src/index.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +49 -0
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +165 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +174 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +373 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/rendering.ts +29 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/risk-signals.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +263 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +50 -0
- package/node_modules/@sdd-agent-platform/core/src/orchestration/index.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +342 -0
- package/node_modules/@sdd-agent-platform/core/src/path-safety.test.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/src/path-safety.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +243 -0
- package/node_modules/@sdd-agent-platform/core/src/phase8-projection-compat.test.ts +153 -0
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +277 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.ts +222 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +79 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.ts +160 -0
- package/node_modules/@sdd-agent-platform/core/src/planning.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +426 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +142 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +253 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +309 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +246 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +119 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +429 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/skill-capabilities.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +135 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +132 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +144 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +111 -0
- package/node_modules/@sdd-agent-platform/core/src/registries.ts +42 -0
- package/node_modules/@sdd-agent-platform/core/src/risk/consumer-diagnostics.ts +97 -0
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +63 -0
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +233 -0
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +266 -0
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -0
- package/node_modules/@sdd-agent-platform/core/src/risk.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +327 -0
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +388 -0
- package/node_modules/@sdd-agent-platform/core/src/router/profile-resolution.ts +154 -0
- package/node_modules/@sdd-agent-platform/core/src/router/risk-policy.ts +33 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-cache.ts +100 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +357 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +429 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/router/routing-rules.ts +73 -0
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +192 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +124 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-registry.ts +123 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +277 -0
- package/node_modules/@sdd-agent-platform/core/src/router/team-mode.ts +170 -0
- package/node_modules/@sdd-agent-platform/core/src/router.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +118 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +27 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +172 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +109 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +231 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +52 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +356 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +70 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +406 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +206 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +63 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +296 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +152 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +68 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +176 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +111 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +207 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +95 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-inspection.ts +39 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +401 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +694 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-rendering.ts +81 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/contracts.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +209 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +352 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +288 -0
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +625 -0
- package/node_modules/@sdd-agent-platform/core/src/status.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/storage/json-io.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +489 -0
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1175 -0
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +45 -0
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +232 -0
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +307 -0
- package/node_modules/@sdd-agent-platform/core/src/subagents.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +270 -0
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +655 -0
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +569 -0
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/task-risk-profile.ts +193 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +398 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +70 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +335 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +648 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +181 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +255 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +494 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +439 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +1032 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +341 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +513 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +204 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +358 -0
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.test.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +196 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +171 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +143 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +137 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +155 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +96 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +32 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +156 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +464 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +363 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/worktree/isolation.ts +130 -0
- package/node_modules/@sdd-agent-platform/core/src/worktree/lifecycle.ts +269 -0
- package/node_modules/@sdd-agent-platform/core/src/worktree/worktree.test.ts +150 -0
- package/node_modules/@sdd-agent-platform/core/src/worktree.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/tsconfig.json +15 -0
- package/package.json +67 -52
- package/packages/cli/dist/args.d.ts +23 -0
- package/packages/cli/dist/args.js +89 -0
- package/packages/cli/dist/args.js.map +1 -0
- package/packages/cli/dist/commands/ai-tools.d.ts +6 -0
- package/packages/cli/dist/commands/ai-tools.js +18 -0
- package/packages/cli/dist/commands/ai-tools.js.map +1 -0
- package/packages/cli/dist/commands/artifact.d.ts +6 -0
- package/packages/cli/dist/commands/artifact.js +168 -0
- package/packages/cli/dist/commands/artifact.js.map +1 -0
- package/packages/cli/dist/commands/context.d.ts +6 -0
- package/packages/cli/dist/commands/context.js +51 -0
- package/packages/cli/dist/commands/context.js.map +1 -0
- package/packages/cli/dist/commands/doctor.d.ts +6 -0
- package/packages/cli/dist/commands/doctor.js +29 -0
- package/packages/cli/dist/commands/doctor.js.map +1 -0
- package/packages/cli/dist/commands/execution.d.ts +6 -0
- package/packages/cli/dist/commands/execution.js +284 -0
- package/packages/cli/dist/commands/execution.js.map +1 -0
- package/packages/cli/dist/commands/governance.d.ts +6 -0
- package/packages/cli/dist/commands/governance.js +37 -0
- package/packages/cli/dist/commands/governance.js.map +1 -0
- package/packages/cli/dist/commands/init.d.ts +6 -0
- package/packages/cli/dist/commands/init.js +22 -0
- package/packages/cli/dist/commands/init.js.map +1 -0
- package/packages/cli/dist/commands/instructions.d.ts +6 -0
- package/packages/cli/dist/commands/instructions.js +15 -0
- package/packages/cli/dist/commands/instructions.js.map +1 -0
- package/packages/cli/dist/commands/lifecycle.d.ts +6 -0
- package/packages/cli/dist/commands/lifecycle.js +112 -0
- package/packages/cli/dist/commands/lifecycle.js.map +1 -0
- package/packages/cli/dist/commands/registry/contracts.d.ts +2 -0
- package/packages/cli/dist/commands/registry/contracts.js +62 -0
- package/packages/cli/dist/commands/registry/contracts.js.map +1 -0
- package/packages/cli/dist/commands/registry/core.d.ts +2 -0
- package/packages/cli/dist/commands/registry/core.js +75 -0
- package/packages/cli/dist/commands/registry/core.js.map +1 -0
- package/packages/cli/dist/commands/registry/platform.d.ts +2 -0
- package/packages/cli/dist/commands/registry/platform.js +123 -0
- package/packages/cli/dist/commands/registry/platform.js.map +1 -0
- package/packages/cli/dist/commands/registry/runtime.d.ts +2 -0
- package/packages/cli/dist/commands/registry/runtime.js +142 -0
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -0
- package/packages/cli/dist/commands/registry/types.d.ts +5 -0
- package/packages/cli/dist/commands/registry/types.js +2 -0
- package/packages/cli/dist/commands/registry/types.js.map +1 -0
- package/packages/cli/dist/commands/registry.d.ts +3 -0
- package/packages/cli/dist/commands/registry.js +11 -0
- package/packages/cli/dist/commands/registry.js.map +1 -0
- package/packages/cli/dist/commands/run.d.ts +6 -0
- package/packages/cli/dist/commands/run.js +173 -0
- package/packages/cli/dist/commands/run.js.map +1 -0
- package/packages/cli/dist/commands/ship.d.ts +6 -0
- package/packages/cli/dist/commands/ship.js +33 -0
- package/packages/cli/dist/commands/ship.js.map +1 -0
- package/packages/cli/dist/commands/status.d.ts +6 -0
- package/packages/cli/dist/commands/status.js +25 -0
- package/packages/cli/dist/commands/status.js.map +1 -0
- package/packages/cli/dist/commands/sync-back.d.ts +6 -0
- package/packages/cli/dist/commands/sync-back.js +82 -0
- package/packages/cli/dist/commands/sync-back.js.map +1 -0
- package/packages/cli/dist/commands/tasks.d.ts +6 -0
- package/packages/cli/dist/commands/tasks.js +78 -0
- package/packages/cli/dist/commands/tasks.js.map +1 -0
- package/packages/cli/dist/commands/test.d.ts +6 -0
- package/packages/cli/dist/commands/test.js +195 -0
- package/packages/cli/dist/commands/test.js.map +1 -0
- package/packages/cli/dist/commands/verifies.d.ts +6 -0
- package/packages/cli/dist/commands/verifies.js +85 -0
- package/packages/cli/dist/commands/verifies.js.map +1 -0
- package/packages/cli/dist/commands/verify.d.ts +6 -0
- package/packages/cli/dist/commands/verify.js +134 -0
- package/packages/cli/dist/commands/verify.js.map +1 -0
- package/packages/cli/dist/dispatch.d.ts +7 -0
- package/packages/cli/dist/dispatch.js +121 -0
- package/packages/cli/dist/dispatch.js.map +1 -0
- package/packages/cli/dist/help.d.ts +4 -0
- package/packages/cli/dist/help.js +177 -0
- package/packages/cli/dist/help.js.map +1 -0
- package/packages/cli/dist/identity.d.ts +7 -0
- package/packages/cli/dist/identity.js +51 -0
- package/packages/cli/dist/identity.js.map +1 -0
- package/packages/cli/dist/main.js +17 -0
- package/packages/cli/dist/main.js.map +1 -0
- package/{dist/packages/cli/src → packages/cli/dist}/options.d.ts +2 -0
- package/{dist/packages/cli/src → packages/cli/dist}/options.js +6 -0
- package/packages/cli/dist/options.js.map +1 -0
- package/packages/cli/dist/renderers/artifacts.d.ts +5 -0
- package/packages/cli/dist/renderers/artifacts.js +43 -0
- package/packages/cli/dist/renderers/artifacts.js.map +1 -0
- package/packages/cli/dist/renderers/context.d.ts +4 -0
- package/packages/cli/dist/renderers/context.js +47 -0
- package/packages/cli/dist/renderers/context.js.map +1 -0
- package/packages/cli/dist/renderers/doctor.d.ts +5 -0
- package/packages/cli/dist/renderers/doctor.js +31 -0
- package/packages/cli/dist/renderers/doctor.js.map +1 -0
- package/packages/cli/dist/renderers/execution.d.ts +13 -0
- package/packages/cli/dist/renderers/execution.js +133 -0
- package/packages/cli/dist/renderers/execution.js.map +1 -0
- package/packages/cli/dist/renderers/governance.d.ts +3 -0
- package/packages/cli/dist/renderers/governance.js +23 -0
- package/packages/cli/dist/renderers/governance.js.map +1 -0
- package/packages/cli/dist/renderers/issues.d.ts +24 -0
- package/packages/cli/dist/renderers/issues.js +37 -0
- package/packages/cli/dist/renderers/issues.js.map +1 -0
- package/packages/cli/dist/renderers/json.d.ts +3 -0
- package/packages/cli/dist/renderers/json.js +10 -0
- package/packages/cli/dist/renderers/json.js.map +1 -0
- package/packages/cli/dist/renderers/lifecycle.d.ts +2 -0
- package/packages/cli/dist/renderers/lifecycle.js +30 -0
- package/packages/cli/dist/renderers/lifecycle.js.map +1 -0
- package/packages/cli/dist/renderers/planning.d.ts +4 -0
- package/packages/cli/dist/renderers/planning.js +66 -0
- package/packages/cli/dist/renderers/planning.js.map +1 -0
- package/packages/cli/dist/renderers/registry-contracts.d.ts +10 -0
- package/packages/cli/dist/renderers/registry-contracts.js +128 -0
- package/packages/cli/dist/renderers/registry-contracts.js.map +1 -0
- package/packages/cli/dist/renderers/registry-core.d.ts +8 -0
- package/packages/cli/dist/renderers/registry-core.js +93 -0
- package/packages/cli/dist/renderers/registry-core.js.map +1 -0
- package/packages/cli/dist/renderers/registry-platform.d.ts +12 -0
- package/packages/cli/dist/renderers/registry-platform.js +112 -0
- package/packages/cli/dist/renderers/registry-platform.js.map +1 -0
- package/packages/cli/dist/renderers/registry-runtime.d.ts +16 -0
- package/packages/cli/dist/renderers/registry-runtime.js +206 -0
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -0
- package/packages/cli/dist/renderers/registry-shared.d.ts +3 -0
- package/packages/cli/dist/renderers/registry-shared.js +15 -0
- package/packages/cli/dist/renderers/registry-shared.js.map +1 -0
- package/packages/cli/dist/renderers/registry.d.ts +5 -0
- package/packages/cli/dist/renderers/registry.js +6 -0
- package/packages/cli/dist/renderers/registry.js.map +1 -0
- package/packages/cli/dist/renderers/router.d.ts +2 -0
- package/packages/cli/dist/renderers/router.js +34 -0
- package/packages/cli/dist/renderers/router.js.map +1 -0
- package/packages/cli/dist/renderers/workflow.d.ts +19 -0
- package/packages/cli/dist/renderers/workflow.js +274 -0
- package/packages/cli/dist/renderers/workflow.js.map +1 -0
- package/packages/cli/dist/renderers/worktree.d.ts +5 -0
- package/packages/cli/dist/renderers/worktree.js +41 -0
- package/packages/cli/dist/renderers/worktree.js.map +1 -0
- package/packages/cli/dist/test-support/run-cli.d.ts +6 -0
- package/packages/cli/dist/test-support/run-cli.js +15 -0
- package/packages/cli/dist/test-support/run-cli.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -0
- package/packages/cli/package.json +15 -0
- package/packages/core/dist/ai-tools.d.ts +68 -0
- package/packages/core/dist/ai-tools.js +464 -0
- package/packages/core/dist/ai-tools.js.map +1 -0
- package/packages/core/dist/artifacts/ingestion.d.ts +24 -0
- package/packages/core/dist/artifacts/ingestion.js +181 -0
- package/packages/core/dist/artifacts/ingestion.js.map +1 -0
- package/packages/core/dist/artifacts/sdd-evidence.d.ts +47 -0
- package/packages/core/dist/artifacts/sdd-evidence.js +241 -0
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -0
- package/packages/core/dist/artifacts/sdd-result.d.ts +29 -0
- package/packages/core/dist/artifacts/sdd-result.js +198 -0
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -0
- package/packages/core/dist/artifacts/templates.d.ts +10 -0
- package/packages/core/dist/artifacts/templates.js +79 -0
- package/packages/core/dist/artifacts/templates.js.map +1 -0
- package/packages/core/dist/artifacts.d.ts +4 -0
- package/packages/core/dist/artifacts.js +5 -0
- package/packages/core/dist/artifacts.js.map +1 -0
- package/packages/core/dist/coding-facts/contracts.d.ts +71 -0
- package/packages/core/dist/coding-facts/contracts.js +2 -0
- package/packages/core/dist/coding-facts/contracts.js.map +1 -0
- package/packages/core/dist/coding-facts.d.ts +1 -0
- package/packages/core/dist/coding-facts.js +2 -0
- package/packages/core/dist/coding-facts.js.map +1 -0
- package/packages/core/dist/config/init-project.d.ts +31 -0
- package/packages/core/dist/config/init-project.js +89 -0
- package/packages/core/dist/config/init-project.js.map +1 -0
- package/packages/core/dist/config/project-config.d.ts +49 -0
- package/packages/core/dist/config/project-config.js +202 -0
- package/packages/core/dist/config/project-config.js.map +1 -0
- package/packages/core/dist/config/project-detection.d.ts +21 -0
- package/packages/core/dist/config/project-detection.js +111 -0
- package/packages/core/dist/config/project-detection.js.map +1 -0
- package/packages/core/dist/config/project-status.d.ts +1 -0
- package/packages/core/dist/config/project-status.js +2 -0
- package/packages/core/dist/config/project-status.js.map +1 -0
- package/packages/core/dist/config/starter-documents.d.ts +4 -0
- package/packages/core/dist/config/starter-documents.js +441 -0
- package/packages/core/dist/config/starter-documents.js.map +1 -0
- package/packages/core/dist/context/budget.d.ts +10 -0
- package/packages/core/dist/context/budget.js +20 -0
- package/packages/core/dist/context/budget.js.map +1 -0
- package/packages/core/dist/context/build-package.d.ts +46 -0
- package/packages/core/dist/context/build-package.js +244 -0
- package/packages/core/dist/context/build-package.js.map +1 -0
- package/packages/core/dist/context/command-summary.d.ts +14 -0
- package/packages/core/dist/context/command-summary.js +34 -0
- package/packages/core/dist/context/command-summary.js.map +1 -0
- package/packages/core/dist/context/evidence-summary.d.ts +50 -0
- package/packages/core/dist/context/evidence-summary.js +86 -0
- package/packages/core/dist/context/evidence-summary.js.map +1 -0
- package/packages/core/dist/context/log-worker.d.ts +19 -0
- package/packages/core/dist/context/log-worker.js +28 -0
- package/packages/core/dist/context/log-worker.js.map +1 -0
- package/packages/core/dist/context/source-refs.d.ts +9 -0
- package/packages/core/dist/context/source-refs.js +30 -0
- package/packages/core/dist/context/source-refs.js.map +1 -0
- package/packages/core/dist/context-offload/contracts.d.ts +43 -0
- package/packages/core/dist/context-offload/contracts.js +2 -0
- package/packages/core/dist/context-offload/contracts.js.map +1 -0
- package/packages/core/dist/context-offload/runtime.d.ts +36 -0
- package/packages/core/dist/context-offload/runtime.js +142 -0
- package/packages/core/dist/context-offload/runtime.js.map +1 -0
- package/packages/core/dist/context-offload.d.ts +2 -0
- package/packages/core/dist/context-offload.js +3 -0
- package/packages/core/dist/context-offload.js.map +1 -0
- package/packages/core/dist/context.d.ts +6 -0
- package/packages/core/dist/context.js +7 -0
- package/packages/core/dist/context.js.map +1 -0
- package/packages/core/dist/contracts/issues.d.ts +7 -0
- package/packages/core/dist/contracts/issues.js +7 -0
- package/packages/core/dist/contracts/issues.js.map +1 -0
- package/packages/core/dist/contracts.d.ts +110 -0
- package/packages/core/dist/contracts.js +75 -0
- package/packages/core/dist/contracts.js.map +1 -0
- package/packages/core/dist/delegation/model.d.ts +21 -0
- package/packages/core/dist/delegation/model.js +2 -0
- package/packages/core/dist/delegation/model.js.map +1 -0
- package/packages/core/dist/delegation/queue.d.ts +10 -0
- package/packages/core/dist/delegation/queue.js +47 -0
- package/packages/core/dist/delegation/queue.js.map +1 -0
- package/packages/core/dist/delegation/run-state.d.ts +2 -0
- package/packages/core/dist/delegation/run-state.js +13 -0
- package/packages/core/dist/delegation/run-state.js.map +1 -0
- package/packages/core/dist/delegation/state-machine.d.ts +30 -0
- package/packages/core/dist/delegation/state-machine.js +56 -0
- package/packages/core/dist/delegation/state-machine.js.map +1 -0
- package/packages/core/dist/delegation/validation.d.ts +28 -0
- package/packages/core/dist/delegation/validation.js +100 -0
- package/packages/core/dist/delegation/validation.js.map +1 -0
- package/packages/core/dist/delegation.d.ts +7 -0
- package/packages/core/dist/delegation.js +6 -0
- package/packages/core/dist/delegation.js.map +1 -0
- package/packages/core/dist/doctor/checks/ai-entries.d.ts +2 -0
- package/packages/core/dist/doctor/checks/ai-entries.js +26 -0
- package/packages/core/dist/doctor/checks/ai-entries.js.map +1 -0
- package/packages/core/dist/doctor/checks/document-chain.d.ts +2 -0
- package/packages/core/dist/doctor/checks/document-chain.js +104 -0
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -0
- package/packages/core/dist/doctor/checks/local-run-index.d.ts +2 -0
- package/packages/core/dist/doctor/checks/local-run-index.js +26 -0
- package/packages/core/dist/doctor/checks/local-run-index.js.map +1 -0
- package/packages/core/dist/doctor/checks/project.d.ts +11 -0
- package/packages/core/dist/doctor/checks/project.js +78 -0
- package/packages/core/dist/doctor/checks/project.js.map +1 -0
- package/packages/core/dist/doctor/checks/registries.d.ts +11 -0
- package/packages/core/dist/doctor/checks/registries.js +247 -0
- package/packages/core/dist/doctor/checks/registries.js.map +1 -0
- package/packages/core/dist/doctor/checks/run-evidence.d.ts +6 -0
- package/packages/core/dist/doctor/checks/run-evidence.js +313 -0
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -0
- package/packages/core/dist/doctor/checks/run-records.d.ts +4 -0
- package/packages/core/dist/doctor/checks/run-records.js +68 -0
- package/packages/core/dist/doctor/checks/run-records.js.map +1 -0
- package/packages/core/dist/doctor/checks/run-trust.d.ts +3 -0
- package/packages/core/dist/doctor/checks/run-trust.js +121 -0
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -0
- package/packages/core/dist/doctor/checks/runtime-contracts.d.ts +11 -0
- package/packages/core/dist/doctor/checks/runtime-contracts.js +279 -0
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -0
- package/packages/core/dist/doctor/doctor.d.ts +6 -0
- package/packages/core/dist/doctor/doctor.js +292 -0
- package/packages/core/dist/doctor/doctor.js.map +1 -0
- package/packages/core/dist/doctor/model.d.ts +11 -0
- package/packages/core/dist/doctor/model.js +2 -0
- package/packages/core/dist/doctor/model.js.map +1 -0
- package/packages/core/dist/doctor/render.d.ts +2 -0
- package/packages/core/dist/doctor/render.js +44 -0
- package/packages/core/dist/doctor/render.js.map +1 -0
- package/packages/core/dist/doctor/summary.d.ts +2 -0
- package/packages/core/dist/doctor/summary.js +10 -0
- package/packages/core/dist/doctor/summary.js.map +1 -0
- package/packages/core/dist/doctor.d.ts +2 -0
- package/packages/core/dist/doctor.js +3 -0
- package/packages/core/dist/doctor.js.map +1 -0
- package/packages/core/dist/evidence/lookup.d.ts +23 -0
- package/packages/core/dist/evidence/lookup.js +54 -0
- package/packages/core/dist/evidence/lookup.js.map +1 -0
- package/packages/core/dist/evidence-runtime/contracts.d.ts +44 -0
- package/packages/core/dist/evidence-runtime/contracts.js +2 -0
- package/packages/core/dist/evidence-runtime/contracts.js.map +1 -0
- package/packages/core/dist/evidence-runtime.d.ts +1 -0
- package/packages/core/dist/evidence-runtime.js +2 -0
- package/packages/core/dist/evidence-runtime.js.map +1 -0
- package/packages/core/dist/execution/agent-execution-records.d.ts +31 -0
- package/packages/core/dist/execution/agent-execution-records.js +170 -0
- package/packages/core/dist/execution/agent-execution-records.js.map +1 -0
- package/packages/core/dist/execution/background-executor.d.ts +44 -0
- package/packages/core/dist/execution/background-executor.js +249 -0
- package/packages/core/dist/execution/background-executor.js.map +1 -0
- package/packages/core/dist/execution/foreground-subagents.d.ts +55 -0
- package/packages/core/dist/execution/foreground-subagents.js +363 -0
- package/packages/core/dist/execution/foreground-subagents.js.map +1 -0
- package/packages/core/dist/execution/host-invocation.d.ts +27 -0
- package/packages/core/dist/execution/host-invocation.js +185 -0
- package/packages/core/dist/execution/host-invocation.js.map +1 -0
- package/packages/core/dist/execution/resident-worker.d.ts +100 -0
- package/packages/core/dist/execution/resident-worker.js +327 -0
- package/packages/core/dist/execution/resident-worker.js.map +1 -0
- package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/packages/core/dist/execution/stage-team-runtime.js +145 -0
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/packages/core/dist/execution/wave-executor.d.ts +45 -0
- package/packages/core/dist/execution/wave-executor.js +178 -0
- package/packages/core/dist/execution/wave-executor.js.map +1 -0
- package/packages/core/dist/execution.d.ts +5 -0
- package/packages/core/dist/execution.js +6 -0
- package/packages/core/dist/execution.js.map +1 -0
- package/packages/core/dist/governance/policy.d.ts +53 -0
- package/packages/core/dist/governance/policy.js +111 -0
- package/packages/core/dist/governance/policy.js.map +1 -0
- package/packages/core/dist/governance.d.ts +1 -0
- package/packages/core/dist/governance.js +2 -0
- package/packages/core/dist/governance.js.map +1 -0
- package/packages/core/dist/index.d.ts +1 -0
- package/packages/core/dist/index.js +2 -0
- package/packages/core/dist/index.js.map +1 -0
- package/packages/core/dist/instructions.d.ts +14 -0
- package/packages/core/dist/instructions.js +147 -0
- package/packages/core/dist/instructions.js.map +1 -0
- package/packages/core/dist/lifecycle/decision-gate.d.ts +39 -0
- package/packages/core/dist/lifecycle/decision-gate.js +319 -0
- package/packages/core/dist/lifecycle/decision-gate.js.map +1 -0
- package/packages/core/dist/lifecycle/rendering.d.ts +2 -0
- package/packages/core/dist/lifecycle/rendering.js +27 -0
- package/packages/core/dist/lifecycle/rendering.js.map +1 -0
- package/packages/core/dist/lifecycle/risk-signals.d.ts +57 -0
- package/packages/core/dist/lifecycle/risk-signals.js +80 -0
- package/packages/core/dist/lifecycle/risk-signals.js.map +1 -0
- package/packages/core/dist/lifecycle/ship.d.ts +44 -0
- package/packages/core/dist/lifecycle/ship.js +207 -0
- package/packages/core/dist/lifecycle/ship.js.map +1 -0
- package/packages/core/dist/lifecycle.d.ts +4 -0
- package/packages/core/dist/lifecycle.js +5 -0
- package/packages/core/dist/lifecycle.js.map +1 -0
- package/packages/core/dist/orchestration/contracts.d.ts +45 -0
- package/packages/core/dist/orchestration/contracts.js +2 -0
- package/packages/core/dist/orchestration/contracts.js.map +1 -0
- package/packages/core/dist/orchestration/index.d.ts +2 -0
- package/packages/core/dist/orchestration/index.js +3 -0
- package/packages/core/dist/orchestration/index.js.map +1 -0
- package/packages/core/dist/orchestration/runtime.d.ts +55 -0
- package/packages/core/dist/orchestration/runtime.js +314 -0
- package/packages/core/dist/orchestration/runtime.js.map +1 -0
- package/packages/core/dist/path-safety.d.ts +4 -0
- package/packages/core/dist/path-safety.js +35 -0
- package/packages/core/dist/path-safety.js.map +1 -0
- package/packages/core/dist/planning/task-graph.d.ts +57 -0
- package/packages/core/dist/planning/task-graph.js +157 -0
- package/packages/core/dist/planning/task-graph.js.map +1 -0
- package/packages/core/dist/planning/wave-plan.d.ts +37 -0
- package/packages/core/dist/planning/wave-plan.js +119 -0
- package/packages/core/dist/planning/wave-plan.js.map +1 -0
- package/packages/core/dist/planning.d.ts +2 -0
- package/packages/core/dist/planning.js +3 -0
- package/packages/core/dist/planning.js.map +1 -0
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +70 -0
- package/packages/core/dist/registries/agent-capability-catalog.js +267 -0
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -0
- package/packages/core/dist/registries/agent-registry.d.ts +22 -0
- package/packages/core/dist/registries/agent-registry.js +121 -0
- package/packages/core/dist/registries/agent-registry.js.map +1 -0
- package/packages/core/dist/registries/agent-runtime-static.d.ts +61 -0
- package/packages/core/dist/registries/agent-runtime-static.js +69 -0
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -0
- package/packages/core/dist/registries/capability-sources.d.ts +2 -0
- package/packages/core/dist/registries/capability-sources.js +226 -0
- package/packages/core/dist/registries/capability-sources.js.map +1 -0
- package/packages/core/dist/registries/command-team-runtime.d.ts +70 -0
- package/packages/core/dist/registries/command-team-runtime.js +220 -0
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -0
- package/packages/core/dist/registries/eval-learning-context.d.ts +64 -0
- package/packages/core/dist/registries/eval-learning-context.js +161 -0
- package/packages/core/dist/registries/eval-learning-context.js.map +1 -0
- package/packages/core/dist/registries/query-status.d.ts +28 -0
- package/packages/core/dist/registries/query-status.js +84 -0
- package/packages/core/dist/registries/query-status.js.map +1 -0
- package/packages/core/dist/registries/skill-capabilities.d.ts +22 -0
- package/packages/core/dist/registries/skill-capabilities.js +16 -0
- package/packages/core/dist/registries/skill-capabilities.js.map +1 -0
- package/packages/core/dist/registries/tool-capabilities.d.ts +20 -0
- package/packages/core/dist/registries/tool-capabilities.js +111 -0
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -0
- package/packages/core/dist/registries/tool-plugins.d.ts +21 -0
- package/packages/core/dist/registries/tool-plugins.js +107 -0
- package/packages/core/dist/registries/tool-plugins.js.map +1 -0
- package/packages/core/dist/registries/worker-adapters.d.ts +38 -0
- package/packages/core/dist/registries/worker-adapters.js +99 -0
- package/packages/core/dist/registries/worker-adapters.js.map +1 -0
- package/packages/core/dist/registries/workflow-gates.d.ts +19 -0
- package/packages/core/dist/registries/workflow-gates.js +89 -0
- package/packages/core/dist/registries/workflow-gates.js.map +1 -0
- package/packages/core/dist/registries.d.ts +14 -0
- package/packages/core/dist/registries.js +13 -0
- package/packages/core/dist/registries.js.map +1 -0
- package/packages/core/dist/risk/consumer-diagnostics.d.ts +18 -0
- package/packages/core/dist/risk/consumer-diagnostics.js +77 -0
- package/packages/core/dist/risk/consumer-diagnostics.js.map +1 -0
- package/packages/core/dist/risk/contracts.d.ts +57 -0
- package/packages/core/dist/risk/contracts.js +2 -0
- package/packages/core/dist/risk/contracts.js.map +1 -0
- package/packages/core/dist/risk/kernel.d.ts +20 -0
- package/packages/core/dist/risk/kernel.js +195 -0
- package/packages/core/dist/risk/kernel.js.map +1 -0
- package/packages/core/dist/risk/legacy-adapters.d.ts +33 -0
- package/packages/core/dist/risk/legacy-adapters.js +215 -0
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -0
- package/packages/core/dist/risk/workflow-gates.d.ts +24 -0
- package/packages/core/dist/risk/workflow-gates.js +160 -0
- package/packages/core/dist/risk/workflow-gates.js.map +1 -0
- package/packages/core/dist/risk.d.ts +5 -0
- package/packages/core/dist/risk.js +6 -0
- package/packages/core/dist/risk.js.map +1 -0
- package/packages/core/dist/router/agent-runtime-config.d.ts +4 -0
- package/packages/core/dist/router/agent-runtime-config.js +278 -0
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -0
- package/packages/core/dist/router/agent-runtime.d.ts +343 -0
- package/packages/core/dist/router/agent-runtime.js +2 -0
- package/packages/core/dist/router/agent-runtime.js.map +1 -0
- package/packages/core/dist/router/profile-resolution.d.ts +18 -0
- package/packages/core/dist/router/profile-resolution.js +127 -0
- package/packages/core/dist/router/profile-resolution.js.map +1 -0
- package/packages/core/dist/router/risk-policy.d.ts +6 -0
- package/packages/core/dist/router/risk-policy.js +28 -0
- package/packages/core/dist/router/risk-policy.js.map +1 -0
- package/packages/core/dist/router/route-cache.d.ts +39 -0
- package/packages/core/dist/router/route-cache.js +59 -0
- package/packages/core/dist/router/route-cache.js.map +1 -0
- package/packages/core/dist/router/route-projection.d.ts +14 -0
- package/packages/core/dist/router/route-projection.js +318 -0
- package/packages/core/dist/router/route-projection.js.map +1 -0
- package/packages/core/dist/router/route-sdd-task.d.ts +3 -0
- package/packages/core/dist/router/route-sdd-task.js +4 -0
- package/packages/core/dist/router/route-sdd-task.js.map +1 -0
- package/packages/core/dist/router/routing-rules.d.ts +4 -0
- package/packages/core/dist/router/routing-rules.js +68 -0
- package/packages/core/dist/router/routing-rules.js.map +1 -0
- package/packages/core/dist/router/routing.d.ts +18 -0
- package/packages/core/dist/router/routing.js +169 -0
- package/packages/core/dist/router/routing.js.map +1 -0
- package/packages/core/dist/router/runtime-inspection.d.ts +7 -0
- package/packages/core/dist/router/runtime-inspection.js +102 -0
- package/packages/core/dist/router/runtime-inspection.js.map +1 -0
- package/packages/core/dist/router/runtime-registry.d.ts +17 -0
- package/packages/core/dist/router/runtime-registry.js +82 -0
- package/packages/core/dist/router/runtime-registry.js.map +1 -0
- package/packages/core/dist/router/runtime-validation.d.ts +26 -0
- package/packages/core/dist/router/runtime-validation.js +235 -0
- package/packages/core/dist/router/runtime-validation.js.map +1 -0
- package/packages/core/dist/router/team-mode.d.ts +16 -0
- package/packages/core/dist/router/team-mode.js +134 -0
- package/packages/core/dist/router/team-mode.js.map +1 -0
- package/packages/core/dist/router.d.ts +4 -0
- package/packages/core/dist/router.js +5 -0
- package/packages/core/dist/router.js.map +1 -0
- package/packages/core/dist/run-state/artifacts.d.ts +6 -0
- package/packages/core/dist/run-state/artifacts.js +113 -0
- package/packages/core/dist/run-state/artifacts.js.map +1 -0
- package/packages/core/dist/run-state/events.d.ts +3 -0
- package/packages/core/dist/run-state/events.js +23 -0
- package/packages/core/dist/run-state/events.js.map +1 -0
- package/packages/core/dist/run-state/inspect-run.d.ts +102 -0
- package/packages/core/dist/run-state/inspect-run.js +83 -0
- package/packages/core/dist/run-state/inspect-run.js.map +1 -0
- package/packages/core/dist/run-state/invocation-ledger.d.ts +18 -0
- package/packages/core/dist/run-state/invocation-ledger.js +99 -0
- package/packages/core/dist/run-state/invocation-ledger.js.map +1 -0
- package/packages/core/dist/run-state/model.d.ts +203 -0
- package/packages/core/dist/run-state/model.js +2 -0
- package/packages/core/dist/run-state/model.js.map +1 -0
- package/packages/core/dist/run-state/run-index.d.ts +97 -0
- package/packages/core/dist/run-state/run-index.js +238 -0
- package/packages/core/dist/run-state/run-index.js.map +1 -0
- package/packages/core/dist/run-state/run-state.d.ts +20 -0
- package/packages/core/dist/run-state/run-state.js +366 -0
- package/packages/core/dist/run-state/run-state.js.map +1 -0
- package/packages/core/dist/run-state/task-evidence.d.ts +62 -0
- package/packages/core/dist/run-state/task-evidence.js +130 -0
- package/packages/core/dist/run-state/task-evidence.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +8 -0
- package/packages/core/dist/run-state.js +9 -0
- package/packages/core/dist/run-state.js.map +1 -0
- package/packages/core/dist/runtime-analysis/build.d.ts +2 -0
- package/packages/core/dist/runtime-analysis/build.js +61 -0
- package/packages/core/dist/runtime-analysis/build.js.map +1 -0
- package/packages/core/dist/runtime-analysis/findings.d.ts +4 -0
- package/packages/core/dist/runtime-analysis/findings.js +274 -0
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -0
- package/packages/core/dist/runtime-analysis/model.d.ts +175 -0
- package/packages/core/dist/runtime-analysis/model.js +2 -0
- package/packages/core/dist/runtime-analysis/model.js.map +1 -0
- package/packages/core/dist/runtime-analysis.d.ts +3 -0
- package/packages/core/dist/runtime-analysis.js +4 -0
- package/packages/core/dist/runtime-analysis.js.map +1 -0
- package/packages/core/dist/runtime-paths.d.ts +35 -0
- package/packages/core/dist/runtime-paths.js +142 -0
- package/packages/core/dist/runtime-paths.js.map +1 -0
- package/packages/core/dist/sdd-docs/context.d.ts +18 -0
- package/packages/core/dist/sdd-docs/context.js +89 -0
- package/packages/core/dist/sdd-docs/context.js.map +1 -0
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +4 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +189 -0
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/packages/core/dist/sdd-docs/run-binding.d.ts +6 -0
- package/packages/core/dist/sdd-docs/run-binding.js +88 -0
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -0
- package/packages/core/dist/sdd-docs/task-inspection.d.ts +6 -0
- package/packages/core/dist/sdd-docs/task-inspection.js +31 -0
- package/packages/core/dist/sdd-docs/task-inspection.js.map +1 -0
- package/packages/core/dist/sdd-docs/task-parser.d.ts +98 -0
- package/packages/core/dist/sdd-docs/task-parser.js +538 -0
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -0
- package/packages/core/dist/sdd-docs/task-rendering.d.ts +5 -0
- package/packages/core/dist/sdd-docs/task-rendering.js +77 -0
- package/packages/core/dist/sdd-docs/task-rendering.js.map +1 -0
- package/packages/core/dist/sdd-docs.d.ts +5 -0
- package/packages/core/dist/sdd-docs.js +6 -0
- package/packages/core/dist/sdd-docs.js.map +1 -0
- package/packages/core/dist/stage-runtime/contracts.d.ts +37 -0
- package/packages/core/dist/stage-runtime/contracts.js +2 -0
- package/packages/core/dist/stage-runtime/contracts.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.d.ts +71 -0
- package/packages/core/dist/stage-runtime/runtime.js +275 -0
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -0
- package/packages/core/dist/stage-runtime.d.ts +2 -0
- package/packages/core/dist/stage-runtime.js +3 -0
- package/packages/core/dist/stage-runtime.js.map +1 -0
- package/packages/core/dist/status/project-status.d.ts +166 -0
- package/packages/core/dist/status/project-status.js +439 -0
- package/packages/core/dist/status/project-status.js.map +1 -0
- package/packages/core/dist/status.d.ts +2 -0
- package/packages/core/dist/status.js +3 -0
- package/packages/core/dist/status.js.map +1 -0
- package/packages/core/dist/storage/json-io.d.ts +1 -0
- package/packages/core/dist/storage/json-io.js +11 -0
- package/packages/core/dist/storage/json-io.js.map +1 -0
- package/packages/core/dist/storage/runtime-store.d.ts +305 -0
- package/packages/core/dist/storage/runtime-store.js +859 -0
- package/packages/core/dist/storage/runtime-store.js.map +1 -0
- package/packages/core/dist/subagents/contracts.d.ts +41 -0
- package/packages/core/dist/subagents/contracts.js +2 -0
- package/packages/core/dist/subagents/contracts.js.map +1 -0
- package/packages/core/dist/subagents/runtime.d.ts +43 -0
- package/packages/core/dist/subagents/runtime.js +262 -0
- package/packages/core/dist/subagents/runtime.js.map +1 -0
- package/packages/core/dist/subagents.d.ts +2 -0
- package/packages/core/dist/subagents.js +3 -0
- package/packages/core/dist/subagents.js.map +1 -0
- package/packages/core/dist/sync-back/apply.d.ts +17 -0
- package/packages/core/dist/sync-back/apply.js +243 -0
- package/packages/core/dist/sync-back/apply.js.map +1 -0
- package/packages/core/dist/sync-back/inspect.d.ts +110 -0
- package/packages/core/dist/sync-back/inspect.js +497 -0
- package/packages/core/dist/sync-back/inspect.js.map +1 -0
- package/packages/core/dist/sync-back.d.ts +2 -0
- package/packages/core/dist/sync-back.js +3 -0
- package/packages/core/dist/sync-back.js.map +1 -0
- package/packages/core/dist/task-risk-profile.d.ts +33 -0
- package/packages/core/dist/task-risk-profile.js +153 -0
- package/packages/core/dist/task-risk-profile.js.map +1 -0
- package/packages/core/dist/test-support/fixtures.d.ts +21 -0
- package/packages/core/dist/test-support/fixtures.js +384 -0
- package/packages/core/dist/test-support/fixtures.js.map +1 -0
- package/packages/core/dist/test-support/run-state.d.ts +2 -0
- package/packages/core/dist/test-support/run-state.js +69 -0
- package/packages/core/dist/test-support/run-state.js.map +1 -0
- package/packages/core/dist/test-support.d.ts +2 -0
- package/packages/core/dist/test-support.js +3 -0
- package/packages/core/dist/test-support.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -0
- package/packages/core/dist/verification/goal-verify.d.ts +50 -0
- package/packages/core/dist/verification/goal-verify.js +546 -0
- package/packages/core/dist/verification/goal-verify.js.map +1 -0
- package/packages/core/dist/verification/rendering.d.ts +51 -0
- package/packages/core/dist/verification/rendering.js +129 -0
- package/packages/core/dist/verification/rendering.js.map +1 -0
- package/packages/core/dist/verification/review-gate.d.ts +22 -0
- package/packages/core/dist/verification/review-gate.js +53 -0
- package/packages/core/dist/verification/review-gate.js.map +1 -0
- package/packages/core/dist/verification/single-task-loop.d.ts +29 -0
- package/packages/core/dist/verification/single-task-loop.js +425 -0
- package/packages/core/dist/verification/single-task-loop.js.map +1 -0
- package/packages/core/dist/verification/test-runtime.d.ts +77 -0
- package/packages/core/dist/verification/test-runtime.js +877 -0
- package/packages/core/dist/verification/test-runtime.js.map +1 -0
- package/packages/core/dist/verification/validation-wave.d.ts +58 -0
- package/packages/core/dist/verification/validation-wave.js +428 -0
- package/packages/core/dist/verification/validation-wave.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +44 -0
- package/packages/core/dist/verification/verify-contract.js +299 -0
- package/packages/core/dist/verification/verify-contract.js.map +1 -0
- package/packages/core/dist/verification.d.ts +8 -0
- package/packages/core/dist/verification.js +8 -0
- package/packages/core/dist/verification.js.map +1 -0
- package/packages/core/dist/work-units/contracts.d.ts +24 -0
- package/packages/core/dist/work-units/contracts.js +2 -0
- package/packages/core/dist/work-units/contracts.js.map +1 -0
- package/packages/core/dist/work-units/runtime.d.ts +21 -0
- package/packages/core/dist/work-units/runtime.js +90 -0
- package/packages/core/dist/work-units/runtime.js.map +1 -0
- package/packages/core/dist/work-units.d.ts +2 -0
- package/packages/core/dist/work-units.js +3 -0
- package/packages/core/dist/work-units.js.map +1 -0
- package/packages/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js +182 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/packages/core/dist/workflow-gate/hard-checks.js +130 -0
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
- package/packages/core/dist/workflow-gate/policy.js +146 -0
- package/packages/core/dist/workflow-gate/policy.js.map +1 -0
- package/packages/core/dist/workflow-gate/types.d.ts +89 -0
- package/packages/core/dist/workflow-gate/types.js +2 -0
- package/packages/core/dist/workflow-gate/types.js.map +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +13 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +75 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -0
- package/packages/core/dist/workflow-state/dependencies.d.ts +29 -0
- package/packages/core/dist/workflow-state/dependencies.js +78 -0
- package/packages/core/dist/workflow-state/dependencies.js.map +1 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +38 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +122 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +77 -0
- package/packages/core/dist/workflow-state/resolve.js +253 -0
- package/packages/core/dist/workflow-state/resolve.js.map +1 -0
- package/packages/core/dist/workflow-state.d.ts +2 -0
- package/packages/core/dist/workflow-state.js +3 -0
- package/packages/core/dist/workflow-state.js.map +1 -0
- package/packages/core/dist/worktree/isolation.d.ts +40 -0
- package/packages/core/dist/worktree/isolation.js +89 -0
- package/packages/core/dist/worktree/isolation.js.map +1 -0
- package/packages/core/dist/worktree/lifecycle.d.ts +39 -0
- package/packages/core/dist/worktree/lifecycle.js +221 -0
- package/packages/core/dist/worktree/lifecycle.js.map +1 -0
- package/packages/core/dist/worktree.d.ts +2 -0
- package/packages/core/dist/worktree.js +3 -0
- package/packages/core/dist/worktree.js.map +1 -0
- package/packages/core/package.json +40 -0
- package/tsconfig.build.json +4 -3
- package/dist/packages/cli/src/main.js +0 -2522
- package/dist/packages/cli/src/main.js.map +0 -1
- package/dist/packages/cli/src/options.js.map +0 -1
- package/dist/packages/core/src/ai-tools.js +0 -315
- package/dist/packages/core/src/ai-tools.js.map +0 -1
- package/dist/packages/core/src/index.d.ts +0 -1986
- package/dist/packages/core/src/index.js +0 -9722
- package/dist/packages/core/src/index.js.map +0 -1
- package/dist/packages/core/src/instructions.js +0 -118
- package/dist/packages/core/src/instructions.js.map +0 -1
- package/dist/packages/core/src/path-safety.js.map +0 -1
- /package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/path-safety.d.ts +0 -0
- /package/{dist/packages/core/src → node_modules/@sdd-agent-platform/core/dist}/path-safety.js +0 -0
- /package/{dist/packages/cli/src → packages/cli/dist}/main.d.ts +0 -0
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
import { CONTEXT_PACKAGE_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
import { recordRuntimeProjection } from '../storage/runtime-store.js';
|
|
3
|
+
import { resolveSddContext } from '../sdd-docs/context.js';
|
|
4
|
+
import { parseSddBranch } from '../sdd-docs/task-parser.js';
|
|
5
|
+
import { inspectSddTask } from '../sdd-docs/task-inspection.js';
|
|
6
|
+
import { contextBudgetForProfile } from './budget.js';
|
|
7
|
+
import { contextSourceRefForAbsolutePath, contextSourceRefForProjectPath, uniqueContextSourceRefs } from './source-refs.js';
|
|
8
|
+
export async function buildContextBuildPackage(projectRoot, options) {
|
|
9
|
+
const profile = options.profile ?? 'brief';
|
|
10
|
+
const branch = options.branch ?? (await resolveSddContext(projectRoot)).partition;
|
|
11
|
+
const model = await parseSddBranch(projectRoot, branch);
|
|
12
|
+
const inspected = inspectSddTask(model, options.taskId);
|
|
13
|
+
if (!inspected.task) {
|
|
14
|
+
throw new Error(`Task not found: ${options.taskId}`);
|
|
15
|
+
}
|
|
16
|
+
const role = contextBuildRole(options.agent);
|
|
17
|
+
const task = inspected.task;
|
|
18
|
+
const docRefs = await Promise.all([
|
|
19
|
+
contextSourceRefForAbsolutePath(projectRoot, model.tasksPath, 'document'),
|
|
20
|
+
contextSourceRefForAbsolutePath(projectRoot, model.planPath, 'document'),
|
|
21
|
+
contextSourceRefForAbsolutePath(projectRoot, model.specPath, 'document')
|
|
22
|
+
]);
|
|
23
|
+
const affectedRefs = await Promise.all(task.affectedFiles.map((file) => contextSourceRefForProjectPath(projectRoot, file, 'document')));
|
|
24
|
+
const artifactRefs = await Promise.all(task.requiredArtifacts.map((artifact) => contextSourceRefForProjectPath(projectRoot, artifact, 'artifact')));
|
|
25
|
+
const routeRef = await contextSourceRefForProjectPath(projectRoot, `.sdd/cache/routes`, 'derived');
|
|
26
|
+
const runIndexRef = await contextSourceRefForProjectPath(projectRoot, `.sdd/run-index.json`, 'derived');
|
|
27
|
+
const candidateMustRead = uniqueContextSourceRefs(contextMustReadRefs(options.mode, role, docRefs, affectedRefs, artifactRefs, routeRef, runIndexRef));
|
|
28
|
+
const candidateOptionalRead = uniqueContextSourceRefs(contextOptionalRefs(options.mode, role, docRefs, affectedRefs, artifactRefs, routeRef, runIndexRef));
|
|
29
|
+
const candidateDeferredRead = uniqueContextSourceRefs(contextDeferredRefs(options.mode, role, docRefs, affectedRefs, artifactRefs, routeRef, runIndexRef));
|
|
30
|
+
const budgeted = applyContextBudget(contextBudgetForProfile(profile), candidateMustRead, candidateOptionalRead, candidateDeferredRead);
|
|
31
|
+
const contextPackage = {
|
|
32
|
+
contract: CONTEXT_PACKAGE_CONTRACT_VERSION,
|
|
33
|
+
profile,
|
|
34
|
+
mode: options.mode,
|
|
35
|
+
agent: options.agent ?? null,
|
|
36
|
+
role,
|
|
37
|
+
authoritative: false,
|
|
38
|
+
usableForPass: false,
|
|
39
|
+
taskId: task.id,
|
|
40
|
+
branch,
|
|
41
|
+
budget: budgeted.accounting,
|
|
42
|
+
mustRead: budgeted.mustRead,
|
|
43
|
+
optionalRead: budgeted.optionalRead,
|
|
44
|
+
doNotReadUnlessNeeded: budgeted.doNotReadUnlessNeeded,
|
|
45
|
+
nextCommands: contextNextCommands(task.id, branch, options.mode, options.agent),
|
|
46
|
+
warnings: [
|
|
47
|
+
'Context package is derived guidance only and cannot satisfy PASS evidence.',
|
|
48
|
+
...inspected.gaps.map((gap) => `${gap.field}: ${gap.message}`)
|
|
49
|
+
]
|
|
50
|
+
};
|
|
51
|
+
enforceContextPackageOutputBudget(contextPackage);
|
|
52
|
+
await recordRuntimeProjection(projectRoot, 'context_build', `${branch}:${task.id}:${options.mode}:${options.agent ?? 'none'}:${profile}`, contextPackage);
|
|
53
|
+
return contextPackage;
|
|
54
|
+
}
|
|
55
|
+
function applyContextBudget(budget, mustRead, optionalRead, deferredRead) {
|
|
56
|
+
const includedRefs = [];
|
|
57
|
+
const deferredRefs = [];
|
|
58
|
+
const excludedRefs = [];
|
|
59
|
+
const truncatedSummaries = [];
|
|
60
|
+
const nextMustRead = [];
|
|
61
|
+
const nextOptionalRead = [];
|
|
62
|
+
const nextDeferredRead = [];
|
|
63
|
+
let estimatedBytes = 0;
|
|
64
|
+
for (const ref of mustRead) {
|
|
65
|
+
const summary = summarizeBudgetRef(ref, 'required');
|
|
66
|
+
if (estimatedBytes + summary.estimatedBytes <= budget.maxBytes || nextMustRead.length === 0) {
|
|
67
|
+
nextMustRead.push(ref);
|
|
68
|
+
includedRefs.push(summary);
|
|
69
|
+
estimatedBytes += summary.estimatedBytes;
|
|
70
|
+
}
|
|
71
|
+
else {
|
|
72
|
+
nextDeferredRead.push(ref);
|
|
73
|
+
deferredRefs.push({ ...summary, reason: 'required_ref_deferred_by_context_budget' });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
for (const ref of optionalRead) {
|
|
77
|
+
const summary = summarizeBudgetRef(ref, 'optional');
|
|
78
|
+
if (estimatedBytes + summary.estimatedBytes <= budget.maxBytes) {
|
|
79
|
+
nextOptionalRead.push(ref);
|
|
80
|
+
includedRefs.push(summary);
|
|
81
|
+
estimatedBytes += summary.estimatedBytes;
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
nextDeferredRead.push(ref);
|
|
85
|
+
deferredRefs.push({ ...summary, reason: 'optional_ref_deferred_by_context_budget' });
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
const seenDeferred = new Set(nextDeferredRead.map((ref) => `${ref.kind}:${ref.path}`));
|
|
89
|
+
for (const ref of deferredRead) {
|
|
90
|
+
const summary = summarizeBudgetRef(ref, 'deferred');
|
|
91
|
+
if (includedRefs.some((included) => included.path === ref.path && included.kind === ref.kind)) {
|
|
92
|
+
excludedRefs.push({ ...summary, reason: 'duplicate_ref_excluded' });
|
|
93
|
+
}
|
|
94
|
+
else if (!seenDeferred.has(`${ref.kind}:${ref.path}`)) {
|
|
95
|
+
nextDeferredRead.push(ref);
|
|
96
|
+
deferredRefs.push(summary);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
if (deferredRefs.length > 8) {
|
|
100
|
+
truncatedSummaries.push(`deferred_refs_truncated=${deferredRefs.length - 8}`);
|
|
101
|
+
}
|
|
102
|
+
if (excludedRefs.length > 8) {
|
|
103
|
+
truncatedSummaries.push(`excluded_refs_truncated=${excludedRefs.length - 8}`);
|
|
104
|
+
}
|
|
105
|
+
const accounting = {
|
|
106
|
+
profile: budget.profile,
|
|
107
|
+
maxBytes: budget.maxBytes,
|
|
108
|
+
estimatedBytes: Math.min(estimatedBytes, budget.maxBytes),
|
|
109
|
+
estimatedTokens: estimateTokens(Math.min(estimatedBytes, budget.maxBytes)),
|
|
110
|
+
includedRefs: includedRefs.slice(0, 12),
|
|
111
|
+
deferredRefs: deferredRefs.slice(0, 8),
|
|
112
|
+
excludedRefs: excludedRefs.slice(0, 8),
|
|
113
|
+
truncatedSummaries
|
|
114
|
+
};
|
|
115
|
+
return {
|
|
116
|
+
mustRead: nextMustRead,
|
|
117
|
+
optionalRead: nextOptionalRead,
|
|
118
|
+
doNotReadUnlessNeeded: uniqueContextSourceRefs(nextDeferredRead),
|
|
119
|
+
accounting
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function enforceContextPackageOutputBudget(contextPackage) {
|
|
123
|
+
let trimmedOptional = 0;
|
|
124
|
+
let trimmedDeferred = 0;
|
|
125
|
+
let trimmedAccounting = 0;
|
|
126
|
+
while (contextPackage.optionalRead.length > 0 && contextPackageOutputBytes(contextPackage) > contextPackage.budget.maxBytes) {
|
|
127
|
+
contextPackage.optionalRead.pop();
|
|
128
|
+
contextPackage.budget.includedRefs.pop();
|
|
129
|
+
trimmedOptional += 1;
|
|
130
|
+
}
|
|
131
|
+
while (contextPackage.doNotReadUnlessNeeded.length > 0 && contextPackageOutputBytes(contextPackage) > contextPackage.budget.maxBytes) {
|
|
132
|
+
contextPackage.doNotReadUnlessNeeded.pop();
|
|
133
|
+
trimmedDeferred += 1;
|
|
134
|
+
}
|
|
135
|
+
while (contextPackage.budget.excludedRefs.length > 0 && contextPackageOutputBytes(contextPackage) > contextPackage.budget.maxBytes) {
|
|
136
|
+
contextPackage.budget.excludedRefs.pop();
|
|
137
|
+
trimmedAccounting += 1;
|
|
138
|
+
}
|
|
139
|
+
while (contextPackage.budget.deferredRefs.length > 0 && contextPackageOutputBytes(contextPackage) > contextPackage.budget.maxBytes) {
|
|
140
|
+
contextPackage.budget.deferredRefs.pop();
|
|
141
|
+
trimmedAccounting += 1;
|
|
142
|
+
}
|
|
143
|
+
const trims = [
|
|
144
|
+
trimmedOptional > 0 ? `optional_refs_output_trimmed=${trimmedOptional}` : null,
|
|
145
|
+
trimmedDeferred > 0 ? `deferred_refs_output_trimmed=${trimmedDeferred}` : null,
|
|
146
|
+
trimmedAccounting > 0 ? `budget_accounting_output_trimmed=${trimmedAccounting}` : null
|
|
147
|
+
].filter((item) => item !== null);
|
|
148
|
+
if (trims.length > 0) {
|
|
149
|
+
contextPackage.budget.truncatedSummaries = trims;
|
|
150
|
+
}
|
|
151
|
+
contextPackage.budget.estimatedBytes = Math.min(contextPackageOutputBytes(contextPackage), contextPackage.budget.maxBytes);
|
|
152
|
+
contextPackage.budget.estimatedTokens = estimateTokens(contextPackage.budget.estimatedBytes);
|
|
153
|
+
}
|
|
154
|
+
function contextPackageOutputBytes(contextPackage) {
|
|
155
|
+
return Buffer.byteLength(JSON.stringify(contextPackage), 'utf8');
|
|
156
|
+
}
|
|
157
|
+
function summarizeBudgetRef(ref, reason) {
|
|
158
|
+
return {
|
|
159
|
+
path: ref.path,
|
|
160
|
+
kind: ref.kind,
|
|
161
|
+
estimatedBytes: Buffer.byteLength(JSON.stringify(ref), 'utf8'),
|
|
162
|
+
reason
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
function estimateTokens(bytes) {
|
|
166
|
+
return Math.ceil(bytes / 4);
|
|
167
|
+
}
|
|
168
|
+
function contextMustReadRefs(mode, role, docs, affected, artifacts, routeRef, runIndexRef) {
|
|
169
|
+
if (role === 'implementer') {
|
|
170
|
+
return [docs[0], docs[1], ...affected];
|
|
171
|
+
}
|
|
172
|
+
if (role === 'reviewer') {
|
|
173
|
+
return [docs[0], docs[1], runIndexRef, ...affected];
|
|
174
|
+
}
|
|
175
|
+
if (role === 'validator') {
|
|
176
|
+
return [docs[0], ...artifacts, runIndexRef];
|
|
177
|
+
}
|
|
178
|
+
if (role === 'context-curator') {
|
|
179
|
+
return [docs[0], docs[2], routeRef];
|
|
180
|
+
}
|
|
181
|
+
if (mode === 'do') {
|
|
182
|
+
return [docs[0], docs[1], ...affected];
|
|
183
|
+
}
|
|
184
|
+
if (mode === 'verify') {
|
|
185
|
+
return [docs[0], ...artifacts];
|
|
186
|
+
}
|
|
187
|
+
if (mode === 'sync-back') {
|
|
188
|
+
return [docs[0], ...affected];
|
|
189
|
+
}
|
|
190
|
+
return [docs[0]];
|
|
191
|
+
}
|
|
192
|
+
function contextOptionalRefs(mode, role, docs, affected, artifacts, routeRef, runIndexRef) {
|
|
193
|
+
if (role === 'implementer') {
|
|
194
|
+
return [docs[2], ...artifacts, routeRef];
|
|
195
|
+
}
|
|
196
|
+
if (role === 'reviewer') {
|
|
197
|
+
return [docs[2], ...artifacts, routeRef];
|
|
198
|
+
}
|
|
199
|
+
if (role === 'validator') {
|
|
200
|
+
return [docs[1], docs[2], routeRef];
|
|
201
|
+
}
|
|
202
|
+
if (role === 'context-curator') {
|
|
203
|
+
return [docs[1], runIndexRef];
|
|
204
|
+
}
|
|
205
|
+
return mode === 'doctor' ? [docs[1], docs[2], runIndexRef, routeRef, ...artifacts] : [docs[2], ...artifacts];
|
|
206
|
+
}
|
|
207
|
+
function contextDeferredRefs(mode, role, docs, affected, artifacts, routeRef, runIndexRef) {
|
|
208
|
+
if (role === 'context-curator') {
|
|
209
|
+
return [...affected, ...artifacts];
|
|
210
|
+
}
|
|
211
|
+
if (mode === 'verify') {
|
|
212
|
+
return [...affected, routeRef];
|
|
213
|
+
}
|
|
214
|
+
return [runIndexRef, ...artifacts, docs[2]];
|
|
215
|
+
}
|
|
216
|
+
function contextBuildRole(agent) {
|
|
217
|
+
if (agent === 'implementer' || agent === 'reviewer' || agent === 'validator' || agent === 'context-curator') {
|
|
218
|
+
return agent;
|
|
219
|
+
}
|
|
220
|
+
if (agent === 'role.context-curator') {
|
|
221
|
+
return 'context-curator';
|
|
222
|
+
}
|
|
223
|
+
if (agent === 'role.implementation-reviewer') {
|
|
224
|
+
return 'reviewer';
|
|
225
|
+
}
|
|
226
|
+
if (agent === 'role.verification-designer' || agent === 'role.evidence-runner') {
|
|
227
|
+
return 'validator';
|
|
228
|
+
}
|
|
229
|
+
return 'default';
|
|
230
|
+
}
|
|
231
|
+
function contextNextCommands(taskId, branch, mode, agent) {
|
|
232
|
+
if (mode === 'do') {
|
|
233
|
+
return [`sdd do task ${taskId} --branch ${branch}`];
|
|
234
|
+
}
|
|
235
|
+
if (mode === 'verify') {
|
|
236
|
+
return [`sdd test task ${taskId} --branch ${branch}`, `sdd evidence summary <run_id> --task ${taskId} --json`];
|
|
237
|
+
}
|
|
238
|
+
if (mode === 'sync-back') {
|
|
239
|
+
return [`sdd sync-back inspect --branch ${branch} --task ${taskId}`];
|
|
240
|
+
}
|
|
241
|
+
const agentSuffix = agent ? ` --agent ${agent}` : '';
|
|
242
|
+
return [`sdd doctor fast --branch ${branch}`, `sdd context build --task ${taskId} --branch ${branch} --mode verify${agentSuffix} --json`];
|
|
243
|
+
}
|
|
244
|
+
//# sourceMappingURL=build-package.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-package.js","sourceRoot":"","sources":["../../src/context/build-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gCAAgC,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAA2C,MAAM,aAAa,CAAC;AAC/F,OAAO,EAAE,+BAA+B,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAkD5H,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,WAAmB,EAAE,OAA4B;IAC9F,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,OAAO,CAAC;IAC3C,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;IAClF,MAAM,KAAK,GAAG,MAAM,cAAc,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;IACxD,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,MAAM,C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AAE,CAAC;QAC5G,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QACrC,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,IAAI,KAAK,KAAK,8BAA8B,EAAE,CAAC;QAC7C,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,IAAI,KAAK,KAAK,4BAA4B,IAAI,KAAK,KAAK,sBAAsB,EAAE,CAAC;QAC/E,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAc,EAAE,MAAc,EAAE,IAAsB,EAAE,KAAc;IACjG,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,CAAC,eAAe,MAAM,aAAa,MAAM,EAAE,CAAC,CAAC;IACtD,CAAC;IACD,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;QACtB,OAAO,CAAC,iBAAiB,MAAM,aAAa,MAAM,EAAE,EAAE,wCAAwC,MAAM,SAAS,CAAC,CAAC;IACjH,CAAC;IACD,IAAI,IAAI,KAAK,WAAW,EAAE,CAAC;QACzB,OAAO,CAAC,kCAAkC,MAAM,WAAW,MAAM,EAAE,CAAC,CAAC;IACvE,CAAC;IACD,MAAM,WAAW,GAAG,KAAK,CAAC,CAAC,CAAC,YAAY,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;IACrD,OAAO,CAAC,4BAA4B,MAAM,EAAE,EAAE,4BAA4B,MAAM,aAAa,MAAM,iBAAiB,WAAW,SAAS,CAAC,CAAC;AAC5I,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
import type { ContextProfile } from './budget.js';
|
|
3
|
+
import type { ContextSourceRef } from './source-refs.js';
|
|
4
|
+
export type ContextSummaryStatus = 'PASS' | 'FAIL' | 'BLOCKED' | 'UNKNOWN';
|
|
5
|
+
export interface CommandOutputSummary {
|
|
6
|
+
contract: typeof COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION;
|
|
7
|
+
authoritative: false;
|
|
8
|
+
usableForPass: false;
|
|
9
|
+
source: ContextSourceRef;
|
|
10
|
+
status: ContextSummaryStatus;
|
|
11
|
+
highlights: string[];
|
|
12
|
+
omittedLines: number;
|
|
13
|
+
}
|
|
14
|
+
export declare function summarizeCommandOutput(rawOutput: string, source: ContextSourceRef, profile?: ContextProfile): CommandOutputSummary;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
export function summarizeCommandOutput(rawOutput, source, profile = 'brief') {
|
|
3
|
+
const lines = rawOutput.split(/\r?\n/).filter((line) => line.trim().length > 0);
|
|
4
|
+
const failureLines = lines.filter((line) => /\b(fail(?:ed|ure)?|error|blocked|exception|traceback|timed out|timeout)\b/i.test(line));
|
|
5
|
+
const successLines = lines.filter((line) => /\b(pass(?:ed)?|success|completed|ok)\b/i.test(line));
|
|
6
|
+
let maxHighlights = 5;
|
|
7
|
+
if (profile === 'normal') {
|
|
8
|
+
maxHighlights = 12;
|
|
9
|
+
}
|
|
10
|
+
else if (profile === 'forensic') {
|
|
11
|
+
maxHighlights = lines.length;
|
|
12
|
+
}
|
|
13
|
+
const selected = [...failureLines, ...successLines, ...lines].filter((line, index, all) => all.indexOf(line) === index).slice(0, maxHighlights);
|
|
14
|
+
let status = 'UNKNOWN';
|
|
15
|
+
if (failureLines.some((line) => /\bblocked\b/i.test(line))) {
|
|
16
|
+
status = 'BLOCKED';
|
|
17
|
+
}
|
|
18
|
+
else if (failureLines.length > 0) {
|
|
19
|
+
status = 'FAIL';
|
|
20
|
+
}
|
|
21
|
+
else if (successLines.length > 0) {
|
|
22
|
+
status = 'PASS';
|
|
23
|
+
}
|
|
24
|
+
return {
|
|
25
|
+
contract: COMMAND_OUTPUT_SUMMARY_CONTRACT_VERSION,
|
|
26
|
+
authoritative: false,
|
|
27
|
+
usableForPass: false,
|
|
28
|
+
source,
|
|
29
|
+
status,
|
|
30
|
+
highlights: selected,
|
|
31
|
+
omittedLines: Math.max(0, lines.length - selected.length)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=command-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-summary.js","sourceRoot":"","sources":["../../src/context/command-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,iBAAiB,CAAC;AAgB1E,MAAM,UAAU,sBAAsB,CAAC,SAAiB,EAAE,MAAwB,EAAE,UAA0B,OAAO;IACnH,MAAM,KAAK,GAAG,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAChF,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,4EAA4E,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACrI,MAAM,YAAY,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,yCAAyC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IAClG,IAAI,aAAa,GAAG,CAAC,CAAC;IACtB,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,aAAa,GAAG,EAAE,CAAC;IACrB,CAAC;SAAM,IAAI,OAAO,KAAK,UAAU,EAAE,CAAC;QAClC,aAAa,GAAG,KAAK,CAAC,MAAM,CAAC;IAC/B,CAAC;IACD,MAAM,QAAQ,GAAG,CAAC,GAAG,YAAY,EAAE,GAAG,YAAY,EAAE,GAAG,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC;IAChJ,IAAI,MAAM,GAAyB,SAAS,CAAC;IAC7C,IAAI,YAAY,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;QAC3D,MAAM,GAAG,SAAS,CAAC;IACrB,CAAC;SAAM,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,GAAG,MAAM,CAAC;IAClB,CAAC;SAAM,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACnC,MAAM,GAAG,MAAM,CAAC;IAClB,CAAC;IACD,OAAO;QACL,QAAQ,EAAE,uCAAuC;QACjD,aAAa,EAAE,KAAK;QACpB,aAAa,EAAE,KAAK;QACpB,MAAM;QACN,MAAM;QACN,UAAU,EAAE,QAAQ;QACpB,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC;KAC1D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { EVIDENCE_SUMMARY_CONTRACT_VERSION, SDD_EVIDENCE_CONTRACT, SDD_EVIDENCE_VERSION } from '../contracts.js';
|
|
2
|
+
import type { ContextSourceRef } from './source-refs.js';
|
|
3
|
+
type EvidenceCoverageStatus = 'PASS' | 'FAIL' | 'BLOCKED' | 'REFERENCED_ONLY' | 'MISSING';
|
|
4
|
+
export type EvidenceQualityIssue = 'EMPTY_EVIDENCE' | 'TODO_PLACEHOLDER' | 'TEMPLATE_TEXT' | 'MENTION_ONLY' | 'UNSOURCED_PASS' | 'MISSING_COMMAND_OUTPUT' | 'MISSING_ARTIFACT_REFERENCE' | 'MISSING_MATERIAL_REFERENCE' | 'PROVENANCE_GAP' | 'POLICY_RULE_FAILED' | 'DERIVED_SOURCE_EVIDENCE' | 'PARTITION_SCOPE_VIOLATION';
|
|
5
|
+
interface ContractValidationIssue {
|
|
6
|
+
field: string;
|
|
7
|
+
message: string;
|
|
8
|
+
recommendation: string;
|
|
9
|
+
}
|
|
10
|
+
interface EvidenceItem {
|
|
11
|
+
kind: string;
|
|
12
|
+
ref: string;
|
|
13
|
+
summary: string | null;
|
|
14
|
+
}
|
|
15
|
+
export interface EvidenceClaim {
|
|
16
|
+
contract: typeof SDD_EVIDENCE_CONTRACT;
|
|
17
|
+
version: typeof SDD_EVIDENCE_VERSION;
|
|
18
|
+
task: string;
|
|
19
|
+
acceptance: string;
|
|
20
|
+
status: EvidenceCoverageStatus;
|
|
21
|
+
claim: string;
|
|
22
|
+
sourceArtifact: string;
|
|
23
|
+
evidence: EvidenceItem[];
|
|
24
|
+
provenance: string[];
|
|
25
|
+
policy: string[];
|
|
26
|
+
rawMetadata: Record<string, string | string[]>;
|
|
27
|
+
}
|
|
28
|
+
export interface EvidenceSummaryProjection {
|
|
29
|
+
contract: typeof EVIDENCE_SUMMARY_CONTRACT_VERSION;
|
|
30
|
+
authoritative: false;
|
|
31
|
+
usableForPass: false;
|
|
32
|
+
runId: string;
|
|
33
|
+
taskId: string | null;
|
|
34
|
+
sources: ContextSourceRef[];
|
|
35
|
+
passCount: number;
|
|
36
|
+
blockedCount: number;
|
|
37
|
+
failCount: number;
|
|
38
|
+
issueCodes: EvidenceQualityIssue[];
|
|
39
|
+
policyRefs: string[];
|
|
40
|
+
highlights: string[];
|
|
41
|
+
}
|
|
42
|
+
export interface EvidenceSummaryOptions {
|
|
43
|
+
runId: string;
|
|
44
|
+
taskId?: string;
|
|
45
|
+
}
|
|
46
|
+
export declare function buildEvidenceSummaryProjection(projectRoot: string, options: EvidenceSummaryOptions): Promise<EvidenceSummaryProjection>;
|
|
47
|
+
export declare function readRuntimeEvidenceClaims(projectRoot: string, runId: string, taskId: string | null): Promise<EvidenceClaim[]>;
|
|
48
|
+
export declare function hasRuntimeEvidenceScopeViolation(projectRoot: string, runId: string, taskId: string | null): Promise<boolean>;
|
|
49
|
+
export declare function uniqueEvidenceIssueCodes(issues: ContractValidationIssue[]): EvidenceQualityIssue[];
|
|
50
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { ACCEPTANCE_POLICY_RULESET_VERSION, EVIDENCE_SUMMARY_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
import { branchToSafePartition } from '../path-safety.js';
|
|
3
|
+
import { listInvocationLedgerEntries } from '../run-state/invocation-ledger.js';
|
|
4
|
+
import { readRunEvents } from '../run-state/events.js';
|
|
5
|
+
import { readRunState } from '../run-state/run-state.js';
|
|
6
|
+
import { recordRuntimeProjection, withRuntimeStore } from '../storage/runtime-store.js';
|
|
7
|
+
import { contextSourceRefForProjectPath, uniqueContextSourceRefs } from './source-refs.js';
|
|
8
|
+
export async function buildEvidenceSummaryProjection(projectRoot, options) {
|
|
9
|
+
const state = await readRunState(projectRoot, options.runId);
|
|
10
|
+
const [events, invocationLedger] = await Promise.all([
|
|
11
|
+
readRunEvents(projectRoot, options.runId),
|
|
12
|
+
listInvocationLedgerEntries(projectRoot, options.runId)
|
|
13
|
+
]);
|
|
14
|
+
const taskId = options.taskId ?? state.currentTask ?? state.taskId;
|
|
15
|
+
const admittedClaims = await readRuntimeEvidenceClaims(projectRoot, state.runId, taskId ?? null);
|
|
16
|
+
const artifactIngestions = Object.values(state.artifactIngestions ?? {}).filter((record) => !taskId || record.task === taskId);
|
|
17
|
+
const artifacts = state.artifacts.filter((artifact) => !taskId || artifact.task === taskId);
|
|
18
|
+
const ledgerArtifactRefs = invocationLedger
|
|
19
|
+
.filter((entry) => entry.kind === 'artifact_hash' && entry.artifactPath)
|
|
20
|
+
.map((entry) => ({ path: entry.artifactPath, kind: 'artifact' }));
|
|
21
|
+
const branchEvidenceRoot = `.sdd/runs/${branchToSafePartition(state.gitBranch ?? state.partition ?? 'unscoped')}/evidence`;
|
|
22
|
+
const artifactSourceRefs = [
|
|
23
|
+
...artifacts.map((artifact) => ({ path: `${branchEvidenceRoot}/${artifact.path}`, kind: 'artifact' })),
|
|
24
|
+
...ledgerArtifactRefs.map((artifact) => ({ path: `${branchEvidenceRoot}/${artifact.path}`, kind: artifact.kind }))
|
|
25
|
+
];
|
|
26
|
+
const sources = await uniqueContextSourceRefs([
|
|
27
|
+
await contextSourceRefForProjectPath(projectRoot, `.sdd/runtime.sqlite`, 'run_state'),
|
|
28
|
+
await contextSourceRefForProjectPath(projectRoot, `.sdd/runtime.sqlite`, 'command_output'),
|
|
29
|
+
await contextSourceRefForProjectPath(projectRoot, `.sdd/runtime.sqlite`, 'ledger'),
|
|
30
|
+
...(await Promise.all(artifactSourceRefs.map((artifact) => contextSourceRefForProjectPath(projectRoot, artifact.path, artifact.kind))))
|
|
31
|
+
]);
|
|
32
|
+
const issueCodes = uniqueEvidenceIssueCodes(artifactIngestions.flatMap((record) => record.issues));
|
|
33
|
+
const passCount = Math.max(admittedClaims.filter((claim) => claim.status === 'PASS').length, artifactIngestions.filter((record) => record.status === 'accepted' && (record.resultStatus === 'PASS' || record.resultStatus === 'PASS_WITH_GAPS')).length);
|
|
34
|
+
const failCount = Math.max(admittedClaims.filter((claim) => claim.status === 'FAIL').length, artifactIngestions.filter((record) => record.status === 'rejected' || record.resultStatus === 'FAIL').length);
|
|
35
|
+
const blockedCount = Math.max(admittedClaims.filter((claim) => claim.status === 'BLOCKED').length, artifactIngestions.filter((record) => record.resultStatus === 'BLOCKED' || record.resultStatus === 'TIMED_OUT' || record.resultStatus === 'CANCELLED' || record.gaps.length > 0).length);
|
|
36
|
+
const highlights = [
|
|
37
|
+
`run=${state.runId} status=${state.status} phase=${state.phase ?? 'none'}`,
|
|
38
|
+
`task=${taskId ?? 'none'} validation=${state.validation.status} sync_back=${state.syncBack.status}`,
|
|
39
|
+
`artifacts=${artifacts.length} ingestions=${artifactIngestions.length} admitted_claims=${admittedClaims.length} events=${events.length} ledger=${invocationLedger.length}`,
|
|
40
|
+
`pass=${passCount} blocked=${blockedCount} fail=${failCount}`
|
|
41
|
+
];
|
|
42
|
+
if (issueCodes.length > 0) {
|
|
43
|
+
highlights.push(`issues=${issueCodes.join(',')}`);
|
|
44
|
+
}
|
|
45
|
+
const projection = {
|
|
46
|
+
contract: EVIDENCE_SUMMARY_CONTRACT_VERSION,
|
|
47
|
+
authoritative: false,
|
|
48
|
+
usableForPass: false,
|
|
49
|
+
runId: state.runId,
|
|
50
|
+
taskId: taskId ?? null,
|
|
51
|
+
sources,
|
|
52
|
+
passCount,
|
|
53
|
+
blockedCount,
|
|
54
|
+
failCount,
|
|
55
|
+
issueCodes,
|
|
56
|
+
policyRefs: [
|
|
57
|
+
`${ACCEPTANCE_POLICY_RULESET_VERSION}:require-source-evidence`,
|
|
58
|
+
`${ACCEPTANCE_POLICY_RULESET_VERSION}:require-provenance`,
|
|
59
|
+
`${ACCEPTANCE_POLICY_RULESET_VERSION}:reject-derived-source-evidence`
|
|
60
|
+
],
|
|
61
|
+
highlights
|
|
62
|
+
};
|
|
63
|
+
await recordRuntimeProjection(projectRoot, 'evidence_summary', `${state.runId}:${taskId ?? 'all'}`, projection);
|
|
64
|
+
return projection;
|
|
65
|
+
}
|
|
66
|
+
export async function readRuntimeEvidenceClaims(projectRoot, runId, taskId) {
|
|
67
|
+
return withRuntimeStore(projectRoot, ({ db }) => {
|
|
68
|
+
const rows = taskId
|
|
69
|
+
? db.prepare('SELECT c.payload_json FROM evidence_claims c JOIN runs r ON r.run_id = c.run_id WHERE c.run_id = ? AND c.task_id = ? AND (c.partition IS NULL OR r.partition IS NULL OR c.partition = r.partition) ORDER BY c.created_at ASC, c.claim_id ASC').all(runId, taskId)
|
|
70
|
+
: db.prepare('SELECT c.payload_json FROM evidence_claims c JOIN runs r ON r.run_id = c.run_id WHERE c.run_id = ? AND (c.partition IS NULL OR r.partition IS NULL OR c.partition = r.partition) ORDER BY c.created_at ASC, c.claim_id ASC').all(runId);
|
|
71
|
+
return rows.map((row) => JSON.parse(row.payload_json));
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export async function hasRuntimeEvidenceScopeViolation(projectRoot, runId, taskId) {
|
|
75
|
+
return withRuntimeStore(projectRoot, ({ db }) => {
|
|
76
|
+
const row = taskId
|
|
77
|
+
? db.prepare('SELECT COUNT(*) AS count FROM evidence_claims c JOIN runs r ON r.run_id = c.run_id WHERE c.run_id = ? AND c.task_id = ? AND c.partition IS NOT NULL AND r.partition IS NOT NULL AND c.partition <> r.partition').get(runId, taskId)
|
|
78
|
+
: db.prepare('SELECT COUNT(*) AS count FROM evidence_claims c JOIN runs r ON r.run_id = c.run_id WHERE c.run_id = ? AND c.partition IS NOT NULL AND r.partition IS NOT NULL AND c.partition <> r.partition').get(runId);
|
|
79
|
+
return (row?.count ?? 0) > 0;
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
export function uniqueEvidenceIssueCodes(issues) {
|
|
83
|
+
const known = ['EMPTY_EVIDENCE', 'TODO_PLACEHOLDER', 'TEMPLATE_TEXT', 'MENTION_ONLY', 'UNSOURCED_PASS', 'MISSING_COMMAND_OUTPUT', 'MISSING_ARTIFACT_REFERENCE', 'MISSING_MATERIAL_REFERENCE', 'PROVENANCE_GAP', 'POLICY_RULE_FAILED', 'DERIVED_SOURCE_EVIDENCE', 'PARTITION_SCOPE_VIOLATION'];
|
|
84
|
+
return known.filter((code) => issues.some((issue) => issue.message.includes(code)));
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=evidence-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-summary.js","sourceRoot":"","sources":["../../src/context/evidence-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EAGlC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAA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AAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LOG_WORKER_SUMMARY_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
import type { ContractValidationIssue } from '../delegation/state-machine.js';
|
|
3
|
+
import type { ContextSourceRef } from './source-refs.js';
|
|
4
|
+
export interface LogWorkerSummary {
|
|
5
|
+
contract: typeof LOG_WORKER_SUMMARY_CONTRACT_VERSION;
|
|
6
|
+
authoritative: false;
|
|
7
|
+
usableForPass: false;
|
|
8
|
+
runId: string;
|
|
9
|
+
taskId: string | null;
|
|
10
|
+
workerId: string;
|
|
11
|
+
sources: ContextSourceRef[];
|
|
12
|
+
highlights: string[];
|
|
13
|
+
forbiddenAuthority: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface LogWorkerSummaryValidation {
|
|
16
|
+
valid: boolean;
|
|
17
|
+
issues: ContractValidationIssue[];
|
|
18
|
+
}
|
|
19
|
+
export declare function validateLogWorkerSummary(summary: LogWorkerSummary): LogWorkerSummaryValidation;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { LOG_WORKER_SUMMARY_CONTRACT_VERSION } from '../contracts.js';
|
|
2
|
+
export function validateLogWorkerSummary(summary) {
|
|
3
|
+
const issues = [];
|
|
4
|
+
const candidate = summary;
|
|
5
|
+
if (candidate.contract !== LOG_WORKER_SUMMARY_CONTRACT_VERSION) {
|
|
6
|
+
issues.push(contractIssue('contract', 'Log worker summary contract is invalid.', `Use ${LOG_WORKER_SUMMARY_CONTRACT_VERSION}.`));
|
|
7
|
+
}
|
|
8
|
+
if (candidate.authoritative !== false) {
|
|
9
|
+
issues.push(contractIssue('authoritative', 'Log worker summary must be non-authoritative.', 'Set authoritative=false and keep workflow decisions in core runtime.'));
|
|
10
|
+
}
|
|
11
|
+
if (candidate.usableForPass !== false) {
|
|
12
|
+
issues.push(contractIssue('usableForPass', 'Log worker summary cannot be used for PASS evidence.', 'Set usableForPass=false and reference source artifacts for PASS evidence.'));
|
|
13
|
+
}
|
|
14
|
+
const forbiddenAuthority = Array.isArray(candidate.forbiddenAuthority) ? candidate.forbiddenAuthority.filter((item) => typeof item === 'string') : [];
|
|
15
|
+
if (forbiddenAuthority.length > 0) {
|
|
16
|
+
issues.push(contractIssue('forbiddenAuthority', `Log worker summary claims forbidden workflow authority: ${forbiddenAuthority.join(', ')}.`, 'Remove PASS/BLOCKED/route/doctor/sync-back decisions from worker summaries.'));
|
|
17
|
+
}
|
|
18
|
+
for (const field of ['status', 'verdict', 'routeDecision', 'doctorVerdict', 'syncBackReady']) {
|
|
19
|
+
if (field in candidate) {
|
|
20
|
+
issues.push(contractIssue(field, `Log worker summary must not expose workflow decision field ${field}.`, 'Keep decision fields in core runtime outputs only.'));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return { valid: issues.length === 0, issues };
|
|
24
|
+
}
|
|
25
|
+
function contractIssue(field, message, recommendation) {
|
|
26
|
+
return { field, message, recommendation };
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=log-worker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"log-worker.js","sourceRoot":"","sources":["../../src/context/log-worker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAC;AAqBtE,MAAM,UAAU,wBAAwB,CAAC,OAAyB;IAChE,MAAM,MAAM,GAA8B,EAAE,CAAC;IAC7C,MAAM,SAAS,GAAG,OAAqD,CAAC;IACxE,IAAI,SAAS,CAAC,QAAQ,KAAK,mCAAmC,EAAE,CAAC;QAC/D,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,yCAAyC,EAAE,OAAO,mCAAmC,GAAG,CAAC,CAAC,CAAC;IACnI,CAAC;IACD,IAAI,SAAS,CAAC,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,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type ContextSourceKind = 'artifact' | 'run_state' | 'ledger' | 'document' | 'command_output' | 'derived';
|
|
2
|
+
export interface ContextSourceRef {
|
|
3
|
+
path: string;
|
|
4
|
+
hash: string;
|
|
5
|
+
kind: ContextSourceKind;
|
|
6
|
+
}
|
|
7
|
+
export declare function contextSourceRefForProjectPath(projectRoot: string, relativePath: string, kind: ContextSourceKind): Promise<ContextSourceRef>;
|
|
8
|
+
export declare function contextSourceRefForAbsolutePath(projectRoot: string, absolutePath: string, kind: ContextSourceKind, displayPath?: string): Promise<ContextSourceRef>;
|
|
9
|
+
export declare function uniqueContextSourceRefs(refs: ContextSourceRef[]): ContextSourceRef[];
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { readFile, stat } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { exists } from '../storage/json-io.js';
|
|
5
|
+
import { normalizePortablePath } from '../path-safety.js';
|
|
6
|
+
export async function contextSourceRefForProjectPath(projectRoot, relativePath, kind) {
|
|
7
|
+
const normalized = normalizePortablePath(relativePath);
|
|
8
|
+
return contextSourceRefForAbsolutePath(projectRoot, path.join(projectRoot, normalized), kind, normalized);
|
|
9
|
+
}
|
|
10
|
+
export async function contextSourceRefForAbsolutePath(projectRoot, absolutePath, kind, displayPath) {
|
|
11
|
+
const relativePath = displayPath ?? normalizePortablePath(path.relative(projectRoot, absolutePath));
|
|
12
|
+
if (!relativePath || relativePath.startsWith('../') || path.isAbsolute(relativePath)) {
|
|
13
|
+
return { path: normalizePortablePath(absolutePath), hash: hashDocumentContent(`external:${absolutePath}`), kind };
|
|
14
|
+
}
|
|
15
|
+
if (!await exists(absolutePath)) {
|
|
16
|
+
return { path: relativePath, hash: hashDocumentContent(`missing:${relativePath}`), kind };
|
|
17
|
+
}
|
|
18
|
+
const fileStat = await stat(absolutePath);
|
|
19
|
+
if (fileStat.isDirectory()) {
|
|
20
|
+
return { path: relativePath, hash: hashDocumentContent(`directory:${relativePath}`), kind };
|
|
21
|
+
}
|
|
22
|
+
return { path: relativePath, hash: hashDocumentContent(await readFile(absolutePath, 'utf8')), kind };
|
|
23
|
+
}
|
|
24
|
+
export function uniqueContextSourceRefs(refs) {
|
|
25
|
+
return [...new Map(refs.map((ref) => [`${ref.kind}:${ref.path}`, ref])).values()];
|
|
26
|
+
}
|
|
27
|
+
function hashDocumentContent(raw) {
|
|
28
|
+
return createHash('sha256').update(raw.replace(/\r\n/g, '\n'), 'utf8').digest('hex');
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=source-refs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-refs.js","sourceRoot":"","sources":["../../src/context/source-refs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAU1D,MAAM,CAAC,KAAK,UAAU,8BAA8B,CAAC,WAAmB,EAAE,YAAoB,EAAE,IAAuB;IACrH,MAAM,UAAU,GAAG,qBAAqB,CAAC,YAAY,CAAC,CAAC;IACvD,OAAO,+BAA+B,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,UAAU,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;AAC5G,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,WAAmB,EAAE,YAAoB,EAAE,IAAuB,EAAE,WAAoB;IAC5I,MAAM,YAAY,GAAG,WAAW,IAAI,qBAAqB,CAAC,IAAI,CAAC,QAAQ,CAAC,WAAW,EAAE,Y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AAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { RuntimeConfidence, RuntimeRef, RuntimeScope } from '../contracts.js';
|
|
2
|
+
import { CONTEXT_LOAD_SIGNAL_CONTRACT_VERSION, CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION, SCOPED_CONTEXT_HANDOFF_CONTRACT_VERSION } from '../contracts.js';
|
|
3
|
+
export type ContextLoadLevel = 'normal' | 'elevated' | 'high' | 'overloaded';
|
|
4
|
+
export type ContextOffloadAction = 'inline' | 'summarize' | 'dispatch-subagent' | 'block-for-curation';
|
|
5
|
+
export interface ContextLoadSignal {
|
|
6
|
+
contract: typeof CONTEXT_LOAD_SIGNAL_CONTRACT_VERSION;
|
|
7
|
+
scope: RuntimeScope;
|
|
8
|
+
level: ContextLoadLevel;
|
|
9
|
+
score: number;
|
|
10
|
+
fileCountScore: number;
|
|
11
|
+
artifactSizeScore: number;
|
|
12
|
+
dependencyFanoutScore: number;
|
|
13
|
+
unknownImpactScore: number;
|
|
14
|
+
staleEvidenceScore: number;
|
|
15
|
+
logVolumeScore: number;
|
|
16
|
+
confidence: RuntimeConfidence;
|
|
17
|
+
inputRefs: RuntimeRef[];
|
|
18
|
+
reasons: string[];
|
|
19
|
+
generatedAt: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ContextOffloadDecision {
|
|
22
|
+
contract: typeof CONTEXT_OFFLOAD_DECISION_CONTRACT_VERSION;
|
|
23
|
+
scope: RuntimeScope;
|
|
24
|
+
action: ContextOffloadAction;
|
|
25
|
+
loadSignalRef: RuntimeRef;
|
|
26
|
+
requiredBefore: 'stage-output' | 'handoff' | 'sync-back' | 'ship' | 'never';
|
|
27
|
+
inlineRefs: RuntimeRef[];
|
|
28
|
+
summarizeRefs: RuntimeRef[];
|
|
29
|
+
dispatchRefs: RuntimeRef[];
|
|
30
|
+
blockingReasons: string[];
|
|
31
|
+
generatedAt: string;
|
|
32
|
+
}
|
|
33
|
+
export interface ScopedContextHandoff {
|
|
34
|
+
contract: typeof SCOPED_CONTEXT_HANDOFF_CONTRACT_VERSION;
|
|
35
|
+
id: string;
|
|
36
|
+
scope: RuntimeScope;
|
|
37
|
+
purpose: string;
|
|
38
|
+
mustReadRefs: RuntimeRef[];
|
|
39
|
+
summaryRefs: RuntimeRef[];
|
|
40
|
+
doNotReadUnlessNeededRefs: RuntimeRef[];
|
|
41
|
+
producedFor: 'main-agent' | 'co-main-agent' | 'subagent';
|
|
42
|
+
generatedAt: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../../src/context-offload/contracts.ts"],"names":[],"mappings":""}
|