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,182 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import { WORKFLOW_GATE_RUNTIME_CONTRACT_VERSION } from '../contracts.js';
|
|
4
|
+
import { listRuntimeArtifactPayloads, listRuntimeDurableGaps, listRuntimeFanInEvidenceSets, listRuntimeLlmAdvisorAssessments, listRuntimeSyncBackDecisions, recordRuntimeWorkflowGateDecision, runtimeScopedId } from '../storage/runtime-store.js';
|
|
5
|
+
import { getEvidenceAttachmentPath } from '../runtime-paths.js';
|
|
6
|
+
import { readAllRunStates } from '../run-state/run-state.js';
|
|
7
|
+
import { affectedFileConflictsForSelectedRuns } from '../workflow-state/affected-file-conflicts.js';
|
|
8
|
+
import { resolveWorkflowState } from '../workflow-state/resolve.js';
|
|
9
|
+
import { evaluateWorkflowGateHardChecks } from './hard-checks.js';
|
|
10
|
+
import { synthesizeWorkflowGateDecision } from './policy.js';
|
|
11
|
+
export async function buildWorkflowGateEvidencePacket(projectRoot, input) {
|
|
12
|
+
const workflow = await resolveWorkflowState(projectRoot, { branch: input.branch, branchSource: input.branch ? 'cli_option' : undefined, taskId: input.taskId ?? null });
|
|
13
|
+
const taskId = input.taskId ?? workflow.latestRun?.taskId ?? workflow.model.tasks[0]?.id ?? null;
|
|
14
|
+
const selection = taskId ? workflow.latestEligibleRunsByTask.find((candidate) => candidate.taskId === taskId) ?? null : null;
|
|
15
|
+
const runId = input.runId ?? selection?.selected?.runId ?? workflow.latestRun?.runId ?? null;
|
|
16
|
+
const scopedTaskIds = sortedUnique(input.taskIds ?? (taskId ? [taskId] : []));
|
|
17
|
+
const scopedLatestEligibleSelections = scopedTaskIds.length > 0
|
|
18
|
+
? scopedTaskIds.map((scopedTaskId) => workflow.latestEligibleRunsByTask.find((candidate) => candidate.taskId === scopedTaskId) ?? emptyLatestEligibleSelection(workflow.branch, scopedTaskId))
|
|
19
|
+
: (selection ? [selection] : []);
|
|
20
|
+
const scopedRunIds = sortedUnique(input.runIds ?? scopedLatestEligibleSelections.flatMap((candidate) => candidate.selected ? [candidate.selected.runId] : []));
|
|
21
|
+
const workflowScope = {
|
|
22
|
+
waveRunId: input.waveRunId ?? null,
|
|
23
|
+
taskIds: scopedTaskIds,
|
|
24
|
+
runIds: scopedRunIds.length > 0 ? scopedRunIds : sortedUnique(runId ? [runId] : []),
|
|
25
|
+
evidenceRefs: sortedUnique(input.evidenceRefs ?? [])
|
|
26
|
+
};
|
|
27
|
+
const scopedTasks = workflowScope.taskIds.length > 0
|
|
28
|
+
? workflow.model.tasks.filter((candidate) => workflowScope.taskIds.includes(candidate.id))
|
|
29
|
+
: workflow.model.tasks.filter((candidate) => candidate.id === taskId);
|
|
30
|
+
const runtimeInputs = await loadRuntimeGateInputs(projectRoot, workflow.branch, workflowScope.taskIds, workflowScope.runIds);
|
|
31
|
+
const scopedAffectedFileConflicts = await loadScopedAffectedFileConflicts(projectRoot, workflow.affectedFileConflicts, workflowScope.runIds);
|
|
32
|
+
const packetBase = {
|
|
33
|
+
packetId: runtimeScopedId(WORKFLOW_GATE_RUNTIME_CONTRACT_VERSION, workflow.branch, taskId ?? 'none', runId ?? 'none', input.decisionKind),
|
|
34
|
+
generatedAt: new Date().toISOString(),
|
|
35
|
+
decisionKind: input.decisionKind,
|
|
36
|
+
partition: workflow.branch,
|
|
37
|
+
taskId,
|
|
38
|
+
runId,
|
|
39
|
+
documents: workflow.documents,
|
|
40
|
+
latestEligibleSelection: selection,
|
|
41
|
+
latestEligibleSelections: scopedLatestEligibleSelections,
|
|
42
|
+
workflowScope,
|
|
43
|
+
runtimeHealth: runtimeInputs.runtimeHealth,
|
|
44
|
+
durableGaps: runtimeInputs.durableGaps,
|
|
45
|
+
dependencyBlockers: workflow.dependencyBlockers,
|
|
46
|
+
affectedFileConflicts: scopedAffectedFileConflicts,
|
|
47
|
+
syncBackDecision: runtimeInputs.syncBackDecisions[0] ?? null,
|
|
48
|
+
syncBackDecisions: runtimeInputs.syncBackDecisions,
|
|
49
|
+
fanInEvidenceSets: runtimeInputs.fanInEvidenceSets,
|
|
50
|
+
advisorAssessments: runtimeInputs.advisorAssessments,
|
|
51
|
+
canonicalEvidenceRefs: sortedUnique([...workflowScope.evidenceRefs, ...runtimeInputs.payloads.filter((payload) => payload.status === 'active').map((payload) => payload.logicalRef)]),
|
|
52
|
+
requiredArtifactRefs: sortedUnique(scopedTasks.flatMap((task) => task.requiredArtifacts)),
|
|
53
|
+
artifactPayloadHealth: await inspectArtifactPayloadHealth(projectRoot, runtimeInputs.payloads.filter((payload) => payload.status === 'active'))
|
|
54
|
+
};
|
|
55
|
+
return {
|
|
56
|
+
...packetBase,
|
|
57
|
+
hardChecks: evaluateWorkflowGateHardChecks(packetBase)
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
function emptyLatestEligibleSelection(partition, taskId) {
|
|
61
|
+
return {
|
|
62
|
+
partition,
|
|
63
|
+
taskId,
|
|
64
|
+
selected: null,
|
|
65
|
+
candidates: [],
|
|
66
|
+
rejected: []
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
async function loadScopedAffectedFileConflicts(projectRoot, fallback, runIds) {
|
|
70
|
+
if (runIds.length === 0) {
|
|
71
|
+
return fallback;
|
|
72
|
+
}
|
|
73
|
+
const states = await readAllRunStates(projectRoot);
|
|
74
|
+
const selectedRuns = states.filter((state) => runIds.includes(state.runId));
|
|
75
|
+
return affectedFileConflictsForSelectedRuns(states, selectedRuns);
|
|
76
|
+
}
|
|
77
|
+
async function loadRuntimeGateInputs(projectRoot, partition, taskIds, runIds) {
|
|
78
|
+
try {
|
|
79
|
+
const runtimeScopes = scopedRuntimeQueries(taskIds, runIds);
|
|
80
|
+
const [durableGapResults, syncBackDecisionResults, fanInEvidenceSetResults, advisorAssessmentResults, payloadResults] = await Promise.all([
|
|
81
|
+
Promise.all(runtimeScopes.map((scope) => listRuntimeDurableGaps(projectRoot, { partition, taskId: scope.taskId, runId: scope.runId, status: 'open_terminal' }))),
|
|
82
|
+
Promise.all(runIds.map((scopedRunId) => listRuntimeSyncBackDecisions(projectRoot, scopedRunId))),
|
|
83
|
+
Promise.all(runtimeScopes.map((scope) => listRuntimeFanInEvidenceSets(projectRoot, { partition, taskId: scope.taskId, runId: scope.runId }))),
|
|
84
|
+
Promise.all(runtimeScopes.map((scope) => listRuntimeLlmAdvisorAssessments(projectRoot, { partition, taskId: scope.taskId, runId: scope.runId }))),
|
|
85
|
+
Promise.all(runIds.map((scopedRunId) => listRuntimeArtifactPayloads(projectRoot, { runId: scopedRunId })))
|
|
86
|
+
]);
|
|
87
|
+
return {
|
|
88
|
+
runtimeHealth: { status: 'ok', issues: [] },
|
|
89
|
+
durableGaps: uniqueBy(durableGapResults.flat(), (gap) => gap.gapId),
|
|
90
|
+
syncBackDecisions: uniqueBy(syncBackDecisionResults.flat(), (decision) => decision.decisionId),
|
|
91
|
+
fanInEvidenceSets: uniqueBy(fanInEvidenceSetResults.flat(), (evidenceSet) => evidenceSet.fanInId),
|
|
92
|
+
advisorAssessments: uniqueBy(advisorAssessmentResults.flat(), (assessment) => assessment.assessmentId),
|
|
93
|
+
payloads: uniqueBy(payloadResults.flat(), (payload) => payload.payloadId)
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
return {
|
|
98
|
+
runtimeHealth: { status: 'unavailable', issues: [messageFromError(error)] },
|
|
99
|
+
durableGaps: [],
|
|
100
|
+
syncBackDecisions: [],
|
|
101
|
+
fanInEvidenceSets: [],
|
|
102
|
+
advisorAssessments: [],
|
|
103
|
+
payloads: []
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function scopedRuntimeQueries(taskIds, runIds) {
|
|
108
|
+
if (taskIds.length === 0 && runIds.length === 0) {
|
|
109
|
+
return [{ taskId: null, runId: null }];
|
|
110
|
+
}
|
|
111
|
+
if (taskIds.length === 0) {
|
|
112
|
+
return runIds.map((scopedRunId) => ({ taskId: null, runId: scopedRunId }));
|
|
113
|
+
}
|
|
114
|
+
if (runIds.length === 0) {
|
|
115
|
+
return taskIds.map((scopedTaskId) => ({ taskId: scopedTaskId, runId: null }));
|
|
116
|
+
}
|
|
117
|
+
return uniqueBy([
|
|
118
|
+
...taskIds.flatMap((scopedTaskId) => runIds.map((scopedRunId) => ({ taskId: scopedTaskId, runId: scopedRunId }))),
|
|
119
|
+
...taskIds.map((scopedTaskId) => ({ taskId: scopedTaskId, runId: null })),
|
|
120
|
+
...runIds.map((scopedRunId) => ({ taskId: null, runId: scopedRunId }))
|
|
121
|
+
], (scope) => `${scope.taskId ?? 'none'}:${scope.runId ?? 'none'}`);
|
|
122
|
+
}
|
|
123
|
+
function uniqueBy(items, keyOf) {
|
|
124
|
+
const seen = new Set();
|
|
125
|
+
return items.filter((item) => {
|
|
126
|
+
const key = keyOf(item);
|
|
127
|
+
if (seen.has(key)) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
seen.add(key);
|
|
131
|
+
return true;
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
async function inspectArtifactPayloadHealth(projectRoot, payloads) {
|
|
135
|
+
return Promise.all(payloads.map(async (payload) => {
|
|
136
|
+
try {
|
|
137
|
+
const raw = await readFile(getEvidenceAttachmentPath(projectRoot, payload.branchSlug, payload.physicalPayloadPath), 'utf8');
|
|
138
|
+
const actualDigest = hashDocumentContent(raw);
|
|
139
|
+
return {
|
|
140
|
+
payloadId: payload.payloadId,
|
|
141
|
+
logicalRef: payload.logicalRef,
|
|
142
|
+
physicalPayloadPath: payload.physicalPayloadPath,
|
|
143
|
+
expectedDigest: payload.digest,
|
|
144
|
+
actualDigest,
|
|
145
|
+
status: actualDigest === payload.digest ? 'ok' : 'digest_drift'
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
catch {
|
|
149
|
+
return {
|
|
150
|
+
payloadId: payload.payloadId,
|
|
151
|
+
logicalRef: payload.logicalRef,
|
|
152
|
+
physicalPayloadPath: payload.physicalPayloadPath,
|
|
153
|
+
expectedDigest: payload.digest,
|
|
154
|
+
actualDigest: null,
|
|
155
|
+
status: 'missing'
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
}));
|
|
159
|
+
}
|
|
160
|
+
function hashDocumentContent(raw) {
|
|
161
|
+
return createHash('sha256').update(raw.replace(/\r\n/g, '\n'), 'utf8').digest('hex');
|
|
162
|
+
}
|
|
163
|
+
export async function evaluateAndRecordWorkflowGateDecision(projectRoot, input) {
|
|
164
|
+
const packet = await buildWorkflowGateEvidencePacket(projectRoot, input);
|
|
165
|
+
const decision = synthesizeWorkflowGateDecision(packet);
|
|
166
|
+
try {
|
|
167
|
+
await recordRuntimeWorkflowGateDecision(projectRoot, decision);
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
if (packet.runtimeHealth.status === 'ok') {
|
|
171
|
+
throw error;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
return { packet, decision };
|
|
175
|
+
}
|
|
176
|
+
function sortedUnique(values) {
|
|
177
|
+
return [...new Set(values.filter(Boolean))].sort();
|
|
178
|
+
}
|
|
179
|
+
function messageFromError(error) {
|
|
180
|
+
return error instanceof Error ? error.message : String(error);
|
|
181
|
+
}
|
|
182
|
+
//# sourceMappingURL=evidence-packet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"evidence-packet.js","sourceRoot":"","sources":["../../src/workflow-gate/evidence-packet.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,sCAAsC,EAAE,MAAM,iBAAiB,CAAC;AACzE,OAAO,EAAE,2BAA2B,EAAE,sBAAsB,EAAE,4BAA4B,EAAE,gCAAgC,EAAE,4BAA4B,EAAE,iCAAiC,EAAE,eAAe,EAAqC,MAAM,6BAA6B,CAAC;AACvR,OAAO,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,oCAAoC,EAAE,MAAM,8CAA8C,CAAC;AACpG,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kBAAkB,CAAC;AAClE,OAAO,EAAE,8BAA8B,EAAE,MAAM,aAAa,CAAC;AAG7D,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,WAAmB,EAAE,KAAmN;IAC5R,MAAM,QAAQ,GAAG,MAAM,oBAAoB,CAAC,WAAW,EAAE,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,YAAY,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE,CAAC,CAA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K,CAAC;QACd,CAAC;IACH,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAC9B,CAAC;AACD,SAAS,YAAY,CAAC,MAAgB;IACpC,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;AACrD,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { WorkflowGateEvidencePacket, WorkflowGateHardCheck } from './types.js';
|
|
2
|
+
type WorkflowGateHardCheckInput = Omit<WorkflowGateEvidencePacket, 'hardChecks'>;
|
|
3
|
+
export declare function evaluateWorkflowGateHardChecks(packet: WorkflowGateHardCheckInput): WorkflowGateHardCheck[];
|
|
4
|
+
export {};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
export function evaluateWorkflowGateHardChecks(packet) {
|
|
2
|
+
return [
|
|
3
|
+
...runtimeHealthChecks(packet),
|
|
4
|
+
...documentChecks(packet),
|
|
5
|
+
...latestEligibleChecks(packet),
|
|
6
|
+
...dependencyChecks(packet),
|
|
7
|
+
...affectedFileChecks(packet),
|
|
8
|
+
...durableGapChecks(packet),
|
|
9
|
+
...artifactChecks(packet),
|
|
10
|
+
...syncBackChecks(packet),
|
|
11
|
+
...authorityChecks(packet)
|
|
12
|
+
];
|
|
13
|
+
}
|
|
14
|
+
function runtimeHealthChecks(packet) {
|
|
15
|
+
if (packet.runtimeHealth.status === 'ok') {
|
|
16
|
+
return [];
|
|
17
|
+
}
|
|
18
|
+
return [blocked('schema_health_unavailable', packet.partition, `Runtime store health is unavailable: ${packet.runtimeHealth.issues.join('; ') || 'unknown issue'}.`, 'Repair runtime.sqlite schema or rerun after runtime storage is available.', packet.runtimeHealth.issues)];
|
|
19
|
+
}
|
|
20
|
+
function documentChecks(packet) {
|
|
21
|
+
const checks = [];
|
|
22
|
+
const docs = packet.documents;
|
|
23
|
+
const missing = [
|
|
24
|
+
['spec.md', docs.specExists],
|
|
25
|
+
['plan.md', docs.planExists],
|
|
26
|
+
['tasks.md', docs.tasksExists],
|
|
27
|
+
['verify.md', docs.verifyExists]
|
|
28
|
+
].filter(([, exists]) => !exists).map(([name]) => String(name));
|
|
29
|
+
if (missing.length > 0) {
|
|
30
|
+
checks.push(blocked('missing_documents', packet.partition, `Missing workflow documents: ${missing.join(', ')}.`, 'Run the missing SDD document stages before gate evaluation.', missing));
|
|
31
|
+
}
|
|
32
|
+
const stale = [
|
|
33
|
+
['plan.md', docs.planStale],
|
|
34
|
+
['tasks.md', docs.tasksStale],
|
|
35
|
+
['verify.md', docs.verifyStale]
|
|
36
|
+
].filter(([, value]) => value === true).map(([name]) => String(name));
|
|
37
|
+
if (stale.length > 0) {
|
|
38
|
+
checks.push(blocked('stale_documents', packet.partition, `Stale workflow documents: ${stale.join(', ')}.`, 'Refresh the stale stage contract before continuing.', stale));
|
|
39
|
+
}
|
|
40
|
+
if (docs.verifyExists && !docs.verifyBasedOnTasksContractHash) {
|
|
41
|
+
checks.push(blocked('contract_hash_mismatch', packet.partition, 'verify.md is missing based_on_tasks_contract_hash.', 'Regenerate verify.md from the frozen current tasks contract.', ['verify.md', 'tasks.md']));
|
|
42
|
+
}
|
|
43
|
+
else if (docs.verifyBasedOnTasksContractHash && docs.tasksContractHash && docs.verifyBasedOnTasksContractHash !== docs.tasksContractHash) {
|
|
44
|
+
checks.push(blocked('contract_hash_mismatch', packet.partition, 'verify.md is bound to an older tasks contract hash.', 'Regenerate verify.md from the frozen current tasks contract.', ['verify.md', 'tasks.md']));
|
|
45
|
+
}
|
|
46
|
+
return checks;
|
|
47
|
+
}
|
|
48
|
+
function latestEligibleChecks(packet) {
|
|
49
|
+
const scopedSelections = packet.latestEligibleSelections ?? [];
|
|
50
|
+
const selections = scopedSelections.length > 0 ? scopedSelections : (packet.latestEligibleSelection ? [packet.latestEligibleSelection] : []);
|
|
51
|
+
if (selections.length === 0) {
|
|
52
|
+
return [warning('latest_eligible_missing', packet.partition, 'No latest eligible selection is available.', 'Create a run or inspect task evidence before applying gate decisions.', [])];
|
|
53
|
+
}
|
|
54
|
+
return selections.flatMap((selection) => {
|
|
55
|
+
if (!selection.selected && selection.candidates.length > 0) {
|
|
56
|
+
return [blocked('run_rejected', packet.partition, `No default-eligible run for ${selection.taskId}; rejected candidates=${selection.rejected.length}.`, 'Inspect rejected latest-eligible candidates and resolve their reasons.', selection.rejected.map((candidate) => candidate.runId))];
|
|
57
|
+
}
|
|
58
|
+
if (!selection.selected) {
|
|
59
|
+
return [warning('latest_eligible_missing', packet.partition, `No run candidates found for ${selection.taskId}.`, 'Run implementation or validation before expecting gate PASS.', [])];
|
|
60
|
+
}
|
|
61
|
+
const selected = selection.selected;
|
|
62
|
+
if (selected.runStatus === 'blocked' || selected.runStatus === 'failed' || selected.runStatus === 'archived') {
|
|
63
|
+
return [blocked('blocked_failed_or_archived_run', packet.partition, `Selected run ${selected.runId} is ${selected.runStatus}.`, 'Use a non-blocked completed run before continuing.', [selected.runId])];
|
|
64
|
+
}
|
|
65
|
+
if (!selected.eligibleForDefaultApply || selected.compatibility === 'strict_stale' || selected.compatibility === 'incompatible') {
|
|
66
|
+
return [blocked('run_rejected', packet.partition, `Selected run ${selected.runId} is not eligible: ${selected.reasons.join('; ') || selected.compatibility}.`, 'Resolve run eligibility before continuing.', [selected.runId])];
|
|
67
|
+
}
|
|
68
|
+
if (selected.validationStatus === 'fail' || selected.validationStatus === 'blocked') {
|
|
69
|
+
return [blocked('validation_failure', packet.partition, `Selected run validation is ${selected.validationStatus}.`, 'Rerun validation and collect passing evidence.', [selected.runId])];
|
|
70
|
+
}
|
|
71
|
+
return [];
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
function dependencyChecks(packet) {
|
|
75
|
+
return packet.dependencyBlockers.map((blocker) => blocked('dependency_blocker', packet.partition, blocker.reason, `Inspect dependency ${blocker.dependencyId} before continuing.`, [blocker.taskId, blocker.dependencyId]));
|
|
76
|
+
}
|
|
77
|
+
function affectedFileChecks(packet) {
|
|
78
|
+
return packet.affectedFileConflicts.map((conflict) => blocked('affected_file_conflict', packet.partition, `Affected file ${conflict.file} is active in run ${conflict.runId}.`, 'Resolve active run conflict before applying changes.', [conflict.file, conflict.runId]));
|
|
79
|
+
}
|
|
80
|
+
function durableGapChecks(packet) {
|
|
81
|
+
return packet.durableGaps
|
|
82
|
+
.filter((gap) => gap.status === 'open' || gap.status === 'acknowledged')
|
|
83
|
+
.filter((gap) => gap.severity === 'blocking')
|
|
84
|
+
.map((gap) => blocked('durable_gap_blocking', packet.partition, gap.message, gap.recommendation ?? 'Resolve the blocking durable gap before continuing.', [gap.gapId, ...gap.evidenceRefs]));
|
|
85
|
+
}
|
|
86
|
+
function artifactChecks(packet) {
|
|
87
|
+
const available = new Set([...packet.canonicalEvidenceRefs, ...packet.fanInEvidenceSets.flatMap((set) => [...set.canonicalEvidenceRefs, ...set.evidenceRefs])]);
|
|
88
|
+
const checks = packet.requiredArtifactRefs
|
|
89
|
+
.filter((ref) => !available.has(ref))
|
|
90
|
+
.map((ref) => blocked('missing_required_artifact', packet.partition, `Required artifact ${ref} is missing from gate evidence.`, 'Collect required artifacts before gate PASS.', [ref]));
|
|
91
|
+
for (const payload of packet.artifactPayloadHealth) {
|
|
92
|
+
if (payload.status === 'missing') {
|
|
93
|
+
checks.push(blocked('missing_payload', packet.partition, `Artifact payload ${payload.logicalRef} is missing at ${payload.physicalPayloadPath}.`, 'Restore the immutable payload or regenerate current evidence before gate PASS.', [payload.payloadId, payload.logicalRef, payload.physicalPayloadPath]));
|
|
94
|
+
}
|
|
95
|
+
else if (payload.status === 'digest_drift') {
|
|
96
|
+
checks.push(blocked('digest_drift', packet.partition, `Artifact payload ${payload.logicalRef} digest drifted: expected ${payload.expectedDigest} actual ${payload.actualDigest}.`, 'Treat the payload as tampered or stale; regenerate accepted evidence before gate PASS.', [payload.payloadId, payload.logicalRef, payload.physicalPayloadPath]));
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return checks;
|
|
100
|
+
}
|
|
101
|
+
function syncBackChecks(packet) {
|
|
102
|
+
const decisions = packet.syncBackDecisions.length > 0 ? packet.syncBackDecisions : (packet.syncBackDecision ? [packet.syncBackDecision] : []);
|
|
103
|
+
return decisions
|
|
104
|
+
.filter((decision) => decision.status === 'blocked' || decision.status === 'divergent')
|
|
105
|
+
.map((decision) => blocked('sync_back_divergence', packet.partition, `Sync-back decision ${decision.decisionId} is ${decision.status}.`, 'Inspect sync-back decision divergence before continuing.', [decision.decisionId]));
|
|
106
|
+
}
|
|
107
|
+
function authorityChecks(packet) {
|
|
108
|
+
const checks = [];
|
|
109
|
+
for (const fanIn of packet.fanInEvidenceSets) {
|
|
110
|
+
if (fanIn.gateInputOnly !== true) {
|
|
111
|
+
checks.push(blocked('authority_violation', packet.partition, `Fan-in evidence set ${fanIn.fanInId} is not gate-input-only.`, 'Regenerate fan-in evidence as non-final gate input.', [fanIn.fanInId]));
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
for (const advisor of packet.advisorAssessments) {
|
|
115
|
+
if (advisor.advisoryOnly !== true) {
|
|
116
|
+
checks.push(blocked('authority_violation', packet.partition, `Advisor assessment ${advisor.assessmentId} is not advisory-only.`, 'Discard or regenerate advisor assessment as advisory-only.', [advisor.assessmentId]));
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return checks;
|
|
120
|
+
}
|
|
121
|
+
function blocked(code, scope, message, recovery, refs) {
|
|
122
|
+
return { code, severity: 'blocked', scope, message, recovery, refs: sortedUnique(refs) };
|
|
123
|
+
}
|
|
124
|
+
function warning(code, scope, message, recovery, refs) {
|
|
125
|
+
return { code, severity: 'warning', scope, message, recovery, refs: sortedUnique(refs) };
|
|
126
|
+
}
|
|
127
|
+
function sortedUnique(values) {
|
|
128
|
+
return [...new Set(values.filter(Boolean))].sort();
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=hard-checks.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hard-checks.js","sourceRoot":"","sources":["../../src/workflow-gate/hard-checks.ts"],"names":[],"mappings":"AAIA,MAAM,UAAU,8BAA8B,CAAC,MAAkC;IAC/E,OAAO;QACL,GAAG,mBAAmB,CAAC,MAAM,CAAC;QAC9B,GAAG,cAAc,CAAC,MAAM,CAAC;QACzB,GAAG,oBAAoB,CAAC,MAAM,CAAC;QAC/B,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC3B,GAAG,kBAAkB,CAAC,MAAM,CAAC;QAC7B,GAAG,gBAAgB,CAAC,MAAM,CAAC;QAC3B,GAAG,cAAc,CAAC,MAAM,CAAC;QACzB,GAAG,cAAc,CAAC,MAAM,CAAC;QACzB,GAAG,eAAe,CAAC,MAAM,CAAC;KAC3B,CAAC;AACJ,CAAC;AAED,SAAS,mBAAmB,CAAC,MAAkC;IAC7D,IAAI,MAAM,CAAC,aAAa,CAAC,MAAM,KAAK,IAAI,EAAE,CAAC;QACzC,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,OAAO,CAAC,2BAA2B,EAAE,MAAM,CAAC,SAAS,EAAE,wCAAwC,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,eAAe,GAAG,EAAE,2EAA2E,EAAE,MAAM,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC,CAAC;AAClR,CAAC;AAED,SAAS,cAAc,CAAC,MAAkC;IACxD,MAAM,MAAM,GAA4B,EAAE,CAAC;IAC3C,MAAM,IAAI,GAAG,MAAM,CAAC,SAAS,CAAC;IAC9B,MAAM,OAAO,GAAG;QACd,CAAC,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC;QAC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0 +1,4 @@
|
|
|
1
|
+
import type { WorkflowGateAdvisorSummary, WorkflowGateDecision, WorkflowGateEvidencePacket } from './types.js';
|
|
2
|
+
export declare function synthesizeWorkflowGateDecision(packet: WorkflowGateEvidencePacket): WorkflowGateDecision;
|
|
3
|
+
export declare function summarizeAdvisors(packet: WorkflowGateEvidencePacket): WorkflowGateAdvisorSummary;
|
|
4
|
+
export declare function inputHash(packet: WorkflowGateEvidencePacket): string;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { WORKFLOW_GATE_RUNTIME_CONTRACT_VERSION } from '../contracts.js';
|
|
3
|
+
export function synthesizeWorkflowGateDecision(packet) {
|
|
4
|
+
const hardBlocks = packet.hardChecks.filter((check) => check.severity === 'blocked');
|
|
5
|
+
const warnings = packet.hardChecks.filter((check) => check.severity === 'warning');
|
|
6
|
+
const advisorSummary = summarizeAdvisors(packet);
|
|
7
|
+
const status = decideStatus(hardBlocks, warnings, advisorSummary, packet);
|
|
8
|
+
const humanRequired = status === 'HUMAN_REQUIRED';
|
|
9
|
+
const allowedNextActions = allowedActions(status, packet);
|
|
10
|
+
const forbiddenNextActions = forbiddenActions(status, packet);
|
|
11
|
+
return {
|
|
12
|
+
decisionId: `gate-${inputHash(packet).slice(0, 16)}`,
|
|
13
|
+
inputHash: inputHash(packet),
|
|
14
|
+
generatedAt: new Date().toISOString(),
|
|
15
|
+
partition: packet.partition,
|
|
16
|
+
taskId: packet.taskId,
|
|
17
|
+
runId: packet.runId,
|
|
18
|
+
decisionKind: packet.decisionKind,
|
|
19
|
+
status,
|
|
20
|
+
decidedBy: 'runtime_policy',
|
|
21
|
+
hardBlocks,
|
|
22
|
+
warnings,
|
|
23
|
+
advisorSummary,
|
|
24
|
+
allowedNextActions,
|
|
25
|
+
forbiddenNextActions,
|
|
26
|
+
humanRequired,
|
|
27
|
+
reasons: decisionReasons(status, hardBlocks, warnings, advisorSummary),
|
|
28
|
+
evidenceRefs: sortedUnique([...packet.canonicalEvidenceRefs, ...packet.fanInEvidenceSets.flatMap((set) => [...set.evidenceRefs, ...set.canonicalEvidenceRefs])]),
|
|
29
|
+
payload: {
|
|
30
|
+
contract: WORKFLOW_GATE_RUNTIME_CONTRACT_VERSION,
|
|
31
|
+
packetId: packet.packetId,
|
|
32
|
+
workflowScope: packet.workflowScope
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
export function summarizeAdvisors(packet) {
|
|
37
|
+
const highConcernCount = packet.advisorAssessments.filter((assessment) => assessment.concern === 'high').length;
|
|
38
|
+
const mediumConcernCount = packet.advisorAssessments.filter((assessment) => assessment.concern === 'medium').length;
|
|
39
|
+
const invalidCount = packet.advisorAssessments.filter((assessment) => assessment.advisoryOnly !== true || assessment.validity === 'invalid').length;
|
|
40
|
+
const lowConfidenceCount = packet.advisorAssessments.filter((assessment) => assessment.confidence === 'low').length;
|
|
41
|
+
return {
|
|
42
|
+
status: invalidCount > 0 ? 'invalid' : highConcernCount > 0 ? 'high_concern' : mediumConcernCount > 0 || lowConfidenceCount > 0 ? 'medium_concern' : packet.advisorAssessments.length > 0 ? 'low_concern' : 'none',
|
|
43
|
+
highConcernCount,
|
|
44
|
+
mediumConcernCount,
|
|
45
|
+
invalidCount,
|
|
46
|
+
lowConfidenceCount,
|
|
47
|
+
summaries: packet.advisorAssessments.map((assessment) => assessment.summary).filter(Boolean).sort()
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export function inputHash(packet) {
|
|
51
|
+
return createHash('sha256').update(stableJson({
|
|
52
|
+
decisionKind: packet.decisionKind,
|
|
53
|
+
partition: packet.partition,
|
|
54
|
+
taskId: packet.taskId,
|
|
55
|
+
runId: packet.runId,
|
|
56
|
+
documents: packet.documents,
|
|
57
|
+
selection: packet.latestEligibleSelection,
|
|
58
|
+
selections: packet.latestEligibleSelections,
|
|
59
|
+
workflowScope: packet.workflowScope,
|
|
60
|
+
runtimeHealth: packet.runtimeHealth,
|
|
61
|
+
durableGaps: packet.durableGaps,
|
|
62
|
+
dependencyBlockers: packet.dependencyBlockers,
|
|
63
|
+
affectedFileConflicts: packet.affectedFileConflicts,
|
|
64
|
+
syncBackDecision: packet.syncBackDecision,
|
|
65
|
+
syncBackDecisions: packet.syncBackDecisions,
|
|
66
|
+
fanInEvidenceSets: packet.fanInEvidenceSets,
|
|
67
|
+
advisorAssessments: packet.advisorAssessments,
|
|
68
|
+
canonicalEvidenceRefs: packet.canonicalEvidenceRefs,
|
|
69
|
+
requiredArtifactRefs: packet.requiredArtifactRefs,
|
|
70
|
+
artifactPayloadHealth: packet.artifactPayloadHealth,
|
|
71
|
+
hardChecks: packet.hardChecks
|
|
72
|
+
}), 'utf8').digest('hex');
|
|
73
|
+
}
|
|
74
|
+
function decideStatus(hardBlocks, warnings, advisorSummary, packet) {
|
|
75
|
+
if (hardBlocks.length > 0) {
|
|
76
|
+
return 'BLOCKED';
|
|
77
|
+
}
|
|
78
|
+
if (advisorSummary.status === 'invalid') {
|
|
79
|
+
return 'HUMAN_REQUIRED';
|
|
80
|
+
}
|
|
81
|
+
if (advisorSummary.status === 'high_concern') {
|
|
82
|
+
return 'HUMAN_REQUIRED';
|
|
83
|
+
}
|
|
84
|
+
if (warnings.length > 0 || advisorSummary.status === 'medium_concern') {
|
|
85
|
+
return 'WARN';
|
|
86
|
+
}
|
|
87
|
+
if (packet.decisionKind === 'stage_transition' && packet.advisorAssessments.length > 0 && packet.canonicalEvidenceRefs.length === 0) {
|
|
88
|
+
return 'ADVISORY_ONLY';
|
|
89
|
+
}
|
|
90
|
+
return 'PASS';
|
|
91
|
+
}
|
|
92
|
+
function allowedActions(status, packet) {
|
|
93
|
+
if (status === 'PASS') {
|
|
94
|
+
return packet.decisionKind === 'ship' ? ['ship'] : ['continue'];
|
|
95
|
+
}
|
|
96
|
+
if (status === 'WARN') {
|
|
97
|
+
return ['inspect-evidence'];
|
|
98
|
+
}
|
|
99
|
+
if (status === 'HUMAN_REQUIRED') {
|
|
100
|
+
return ['create-decision-card', 'inspect-evidence'];
|
|
101
|
+
}
|
|
102
|
+
if (status === 'ADVISORY_ONLY') {
|
|
103
|
+
return ['inspect-advisor-assessments'];
|
|
104
|
+
}
|
|
105
|
+
return ['inspect-blockers', 'recover'];
|
|
106
|
+
}
|
|
107
|
+
function forbiddenActions(status, packet) {
|
|
108
|
+
if (status === 'BLOCKED') {
|
|
109
|
+
return ['ship', 'sync-back-apply', 'mark-task-complete', 'stage-pass'];
|
|
110
|
+
}
|
|
111
|
+
if (status === 'HUMAN_REQUIRED') {
|
|
112
|
+
return ['satisfy-with-role-result', 'satisfy-with-subagent-output'];
|
|
113
|
+
}
|
|
114
|
+
if (status === 'ADVISORY_ONLY') {
|
|
115
|
+
return ['treat-advisor-as-pass'];
|
|
116
|
+
}
|
|
117
|
+
return status === 'WARN' ? ['ship', 'sync-back-apply', 'mark-task-complete', 'stage-pass'] : packet.decisionKind === 'ship' ? [] : ['skip-evidence-recording'];
|
|
118
|
+
}
|
|
119
|
+
function decisionReasons(status, hardBlocks, warnings, advisorSummary) {
|
|
120
|
+
if (hardBlocks.length > 0) {
|
|
121
|
+
return hardBlocks.map((check) => `${check.code}: ${check.message}`);
|
|
122
|
+
}
|
|
123
|
+
if (status === 'HUMAN_REQUIRED') {
|
|
124
|
+
return [`advisor=${advisorSummary.status}; human decision required because role/subagent outputs cannot satisfy this gate.`];
|
|
125
|
+
}
|
|
126
|
+
if (warnings.length > 0) {
|
|
127
|
+
return warnings.map((check) => `${check.code}: ${check.message}`);
|
|
128
|
+
}
|
|
129
|
+
if (advisorSummary.status === 'medium_concern' || advisorSummary.status === 'high_concern') {
|
|
130
|
+
return [`advisor=${advisorSummary.status}`];
|
|
131
|
+
}
|
|
132
|
+
return [`runtime_policy produced ${status}`];
|
|
133
|
+
}
|
|
134
|
+
function sortedUnique(values) {
|
|
135
|
+
return [...new Set(values.filter(Boolean))].sort();
|
|
136
|
+
}
|
|
137
|
+
function stableJson(value) {
|
|
138
|
+
if (Array.isArray(value)) {
|
|
139
|
+
return `[${value.map(stableJson).join(',')}]`;
|
|
140
|
+
}
|
|
141
|
+
if (value && typeof value === 'object') {
|
|
142
|
+
return `{${Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, item]) => `${JSON.stringify(key)}:${stableJson(item)}`).join(',')}}`;
|
|
143
|
+
}
|
|
144
|
+
return JSON.stringify(value);
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=policy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"policy.js","sourceRoot":"","sources":["../../src/workflow-gate/policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,sCAAsC,EAAE,MAAM,iBAAiB,CAAC;AAGzE,MAAM,UAAU,8BAA8B,CAAC,MAAkC;IAC/E,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;IACrF,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC;IACnF,MAAM,cAAc,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,YAAY,CAAC,UAAU,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,CAAC,CAAC;IAC1E,MAAM,aAAa,GAAG,MAAM,KAAK,gBAAgB,CAAC;IAClD,MAAM,kBAAkB,GAAG,cAAc,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1D,MAAM,oBAAoB,GAAG,gBAAgB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9D,OAAO;QACL,UAAU,EAAE,QAAQ,SAAS,CAAC,MAAM,CAAC,CAAC,KA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KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,IAAI,MAAM,CAAC,OAAO,CAAC,KAAgC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC;IACnM,CAAC;IACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { FanInEvidenceSetRecord, LlmAdvisorAssessmentRecord } from '../execution/stage-team-runtime.js';
|
|
2
|
+
import type { RuntimeDurableGapRecord, RuntimeSyncBackDecisionRecord } from '../storage/runtime-store.js';
|
|
3
|
+
import type { LatestEligibleRunSelection } from '../workflow-state/latest-eligible-run.js';
|
|
4
|
+
import type { WorkflowDependencyBlocker } from '../workflow-state/dependencies.js';
|
|
5
|
+
import type { WorkflowAffectedFileConflict } from '../workflow-state/affected-file-conflicts.js';
|
|
6
|
+
import type { SddTaskModel } from '../sdd-docs/task-parser.js';
|
|
7
|
+
export type WorkflowGateStatus = 'PASS' | 'WARN' | 'BLOCKED' | 'HUMAN_REQUIRED' | 'ADVISORY_ONLY';
|
|
8
|
+
export type WorkflowGateHardCheckSeverity = 'info' | 'warning' | 'blocked';
|
|
9
|
+
export type WorkflowGateAdvisorSummaryStatus = 'none' | 'low_concern' | 'medium_concern' | 'high_concern' | 'invalid';
|
|
10
|
+
export type WorkflowGateDecisionKind = 'test' | 'validation_wave' | 'review_gate' | 'sync_back' | 'ship' | 'stage_transition';
|
|
11
|
+
export type WorkflowGateHardCheckCode = 'schema_health_unavailable' | 'missing_documents' | 'stale_documents' | 'contract_hash_mismatch' | 'run_rejected' | 'blocked_failed_or_archived_run' | 'latest_eligible_missing' | 'missing_payload' | 'digest_drift' | 'missing_required_artifact' | 'validation_failure' | 'dependency_blocker' | 'authority_violation' | 'sync_back_divergence' | 'affected_file_conflict' | 'durable_gap_blocking';
|
|
12
|
+
export interface WorkflowGateHardCheck {
|
|
13
|
+
code: WorkflowGateHardCheckCode;
|
|
14
|
+
severity: WorkflowGateHardCheckSeverity;
|
|
15
|
+
scope: string;
|
|
16
|
+
message: string;
|
|
17
|
+
recovery: string;
|
|
18
|
+
refs: string[];
|
|
19
|
+
}
|
|
20
|
+
export interface WorkflowGateArtifactPayloadHealth {
|
|
21
|
+
payloadId: string;
|
|
22
|
+
logicalRef: string;
|
|
23
|
+
physicalPayloadPath: string;
|
|
24
|
+
expectedDigest: string;
|
|
25
|
+
actualDigest: string | null;
|
|
26
|
+
status: 'ok' | 'missing' | 'digest_drift';
|
|
27
|
+
}
|
|
28
|
+
export interface WorkflowGateRuntimeHealth {
|
|
29
|
+
status: 'ok' | 'unavailable';
|
|
30
|
+
issues: string[];
|
|
31
|
+
}
|
|
32
|
+
export interface WorkflowGateScope {
|
|
33
|
+
waveRunId: string | null;
|
|
34
|
+
taskIds: string[];
|
|
35
|
+
runIds: string[];
|
|
36
|
+
evidenceRefs: string[];
|
|
37
|
+
}
|
|
38
|
+
export interface WorkflowGateEvidencePacket {
|
|
39
|
+
packetId: string;
|
|
40
|
+
generatedAt: string;
|
|
41
|
+
decisionKind: WorkflowGateDecisionKind;
|
|
42
|
+
partition: string;
|
|
43
|
+
taskId: string | null;
|
|
44
|
+
runId: string | null;
|
|
45
|
+
documents: SddTaskModel['documents'];
|
|
46
|
+
latestEligibleSelection: LatestEligibleRunSelection | null;
|
|
47
|
+
latestEligibleSelections: LatestEligibleRunSelection[];
|
|
48
|
+
workflowScope: WorkflowGateScope;
|
|
49
|
+
runtimeHealth: WorkflowGateRuntimeHealth;
|
|
50
|
+
durableGaps: RuntimeDurableGapRecord[];
|
|
51
|
+
dependencyBlockers: WorkflowDependencyBlocker[];
|
|
52
|
+
affectedFileConflicts: WorkflowAffectedFileConflict[];
|
|
53
|
+
syncBackDecision: RuntimeSyncBackDecisionRecord | null;
|
|
54
|
+
syncBackDecisions: RuntimeSyncBackDecisionRecord[];
|
|
55
|
+
fanInEvidenceSets: FanInEvidenceSetRecord[];
|
|
56
|
+
advisorAssessments: LlmAdvisorAssessmentRecord[];
|
|
57
|
+
canonicalEvidenceRefs: string[];
|
|
58
|
+
requiredArtifactRefs: string[];
|
|
59
|
+
artifactPayloadHealth: WorkflowGateArtifactPayloadHealth[];
|
|
60
|
+
hardChecks: WorkflowGateHardCheck[];
|
|
61
|
+
}
|
|
62
|
+
export interface WorkflowGateAdvisorSummary {
|
|
63
|
+
status: WorkflowGateAdvisorSummaryStatus;
|
|
64
|
+
highConcernCount: number;
|
|
65
|
+
mediumConcernCount: number;
|
|
66
|
+
invalidCount: number;
|
|
67
|
+
lowConfidenceCount: number;
|
|
68
|
+
summaries: string[];
|
|
69
|
+
}
|
|
70
|
+
export interface WorkflowGateDecision {
|
|
71
|
+
decisionId: string;
|
|
72
|
+
inputHash: string;
|
|
73
|
+
generatedAt: string;
|
|
74
|
+
partition: string;
|
|
75
|
+
taskId: string | null;
|
|
76
|
+
runId: string | null;
|
|
77
|
+
decisionKind: WorkflowGateDecisionKind;
|
|
78
|
+
status: WorkflowGateStatus;
|
|
79
|
+
decidedBy: 'runtime_policy';
|
|
80
|
+
hardBlocks: WorkflowGateHardCheck[];
|
|
81
|
+
warnings: WorkflowGateHardCheck[];
|
|
82
|
+
advisorSummary: WorkflowGateAdvisorSummary;
|
|
83
|
+
allowedNextActions: string[];
|
|
84
|
+
forbiddenNextActions: string[];
|
|
85
|
+
humanRequired: boolean;
|
|
86
|
+
reasons: string[];
|
|
87
|
+
evidenceRefs: string[];
|
|
88
|
+
payload: unknown;
|
|
89
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/workflow-gate/types.ts"],"names":[],"mappings":""}
|
package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RunState } from '../run-state/model.js';
|
|
2
|
+
export interface WorkflowAffectedFileConflict {
|
|
3
|
+
file: string;
|
|
4
|
+
partition: string;
|
|
5
|
+
gitBranch: string | null;
|
|
6
|
+
taskId: string;
|
|
7
|
+
runId: string;
|
|
8
|
+
runStatus: RunState['status'];
|
|
9
|
+
syncBackStatus: RunState['syncBack']['status'];
|
|
10
|
+
updatedAt: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function affectedFileConflictsForSelectedRun(states: RunState[], selected: RunState): WorkflowAffectedFileConflict[];
|
|
13
|
+
export declare function affectedFileConflictsForSelectedRuns(states: RunState[], selectedRuns: RunState[]): WorkflowAffectedFileConflict[];
|