sdd-agent-platform 0.4.1 → 0.5.0
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 +24 -28
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +84 -103
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +10 -6
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +7 -8
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +374 -421
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +7 -19
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +7 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +2 -12
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +1 -18
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/coordination.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +83 -83
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +37 -80
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +58 -68
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.d.ts +159 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js +7 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js +461 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph/kernel.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle-graph.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +21 -28
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +124 -40
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +6 -13
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.d.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/plan-scout-domains.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/registries/skill-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +18 -18
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/consumer-diagnostics.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +12 -27
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +2 -4
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +383 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +227 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +2 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +1 -4
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +0 -39
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +211 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js +179 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/artifact-depth.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +5 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +60 -22
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-entry.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/spec-manager-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +315 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +238 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +736 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +4018 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +25 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +170 -18
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +597 -85
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +1 -242
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +1 -110
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +1 -496
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.d.ts +167 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js +377 -0
- package/node_modules/@sdd-agent-platform/core/dist/task-execution-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +329 -314
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +31 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +135 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -49
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +1 -545
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +5 -7
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +15 -55
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +1 -40
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.d.ts +49 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js +521 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/task-evidence-judgment.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +247 -112
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +49 -72
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +2 -7
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +0 -7
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +2 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +3 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +30 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +55 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +518 -36
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/package.json +6 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +238 -137
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +84 -103
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -189
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -222
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.test.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +302 -302
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +181 -181
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +231 -231
- package/node_modules/@sdd-agent-platform/core/src/artifacts/templates.ts +99 -99
- package/node_modules/@sdd-agent-platform/core/src/artifacts.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/coding-facts/contracts.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/coding-facts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +314 -306
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +128 -120
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +265 -259
- package/node_modules/@sdd-agent-platform/core/src/config/project-detection.ts +147 -147
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +400 -445
- package/node_modules/@sdd-agent-platform/core/src/context/budget.ts +30 -30
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +305 -317
- package/node_modules/@sdd-agent-platform/core/src/context/command-summary.ts +45 -45
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +188 -188
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -144
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +48 -48
- package/node_modules/@sdd-agent-platform/core/src/context/source-refs.ts +41 -41
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +47 -47
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.test.ts +71 -71
- package/node_modules/@sdd-agent-platform/core/src/context-offload/runtime.ts +178 -178
- package/node_modules/@sdd-agent-platform/core/src/context-offload.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context.ts +6 -6
- package/node_modules/@sdd-agent-platform/core/src/contracts/issues.ts +13 -13
- package/node_modules/@sdd-agent-platform/core/src/contracts.test.ts +9 -9
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +121 -115
- package/node_modules/@sdd-agent-platform/core/src/delegation/delegation.test.ts +183 -183
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +23 -23
- package/node_modules/@sdd-agent-platform/core/src/delegation/queue.ts +58 -58
- package/node_modules/@sdd-agent-platform/core/src/delegation/run-state.ts +14 -14
- package/node_modules/@sdd-agent-platform/core/src/delegation/state-machine.ts +90 -90
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +124 -124
- package/node_modules/@sdd-agent-platform/core/src/delegation.ts +26 -26
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/ai-entries.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +104 -112
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/local-run-index.ts +27 -27
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +84 -84
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +252 -252
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +330 -330
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-records.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +128 -128
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +300 -300
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +627 -657
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -318
- package/node_modules/@sdd-agent-platform/core/src/doctor/model.ts +13 -13
- package/node_modules/@sdd-agent-platform/core/src/doctor/summary.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/doctor.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +80 -80
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +48 -49
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +195 -195
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +187 -187
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +305 -305
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +97 -97
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +453 -453
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +225 -225
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +132 -132
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +436 -436
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -102
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -271
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.ts +231 -231
- package/node_modules/@sdd-agent-platform/core/src/execution.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +57 -57
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +175 -175
- package/node_modules/@sdd-agent-platform/core/src/governance.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +80 -49
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +38 -81
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +174 -174
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +373 -373
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/rendering.ts +29 -29
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/risk-signals.ts +146 -146
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +255 -263
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/contracts.ts +179 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph/kernel.ts +522 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle-graph.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +50 -50
- package/node_modules/@sdd-agent-platform/core/src/orchestration/index.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +331 -342
- package/node_modules/@sdd-agent-platform/core/src/path-safety.test.ts +22 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +243 -243
- package/node_modules/@sdd-agent-platform/core/src/phase8-projection-compat.test.ts +152 -153
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +277 -277
- package/node_modules/@sdd-agent-platform/core/src/phase9-lifecycle-graph.test.ts +103 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +88 -88
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.ts +222 -222
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +79 -79
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.ts +160 -160
- package/node_modules/@sdd-agent-platform/core/src/planning.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +426 -426
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +230 -146
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +142 -142
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +253 -253
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +302 -309
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +246 -246
- package/node_modules/@sdd-agent-platform/core/src/registries/plan-scout-domains.ts +89 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +119 -119
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +454 -429
- package/node_modules/@sdd-agent-platform/core/src/registries/skill-capabilities.ts +37 -37
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +135 -135
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +132 -132
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +144 -144
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/registries.ts +42 -42
- package/node_modules/@sdd-agent-platform/core/src/risk/consumer-diagnostics.ts +98 -97
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +63 -63
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +233 -233
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +251 -266
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -203
- package/node_modules/@sdd-agent-platform/core/src/risk.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +327 -327
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +388 -388
- package/node_modules/@sdd-agent-platform/core/src/router/profile-resolution.ts +154 -154
- package/node_modules/@sdd-agent-platform/core/src/router/risk-policy.ts +33 -33
- package/node_modules/@sdd-agent-platform/core/src/router/route-cache.ts +100 -100
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +356 -356
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +428 -428
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/router/routing-rules.ts +73 -73
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +189 -191
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +464 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +124 -124
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-registry.ts +123 -123
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +277 -277
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +273 -0
- package/node_modules/@sdd-agent-platform/core/src/router/team-mode.ts +170 -170
- package/node_modules/@sdd-agent-platform/core/src/router.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +126 -118
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +27 -27
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +172 -172
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +109 -109
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +252 -230
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +52 -52
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +356 -356
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +70 -70
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +406 -406
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +198 -206
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +60 -63
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +257 -296
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +140 -152
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +66 -68
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +253 -176
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +101 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +314 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.test.ts +380 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/artifact-depth.ts +207 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +111 -111
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +207 -207
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +95 -95
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-inspection.ts +39 -39
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +467 -401
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +738 -694
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-rendering.ts +81 -81
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/spec-manager-contracts.ts +13 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +435 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +316 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2964 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5856 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/contracts.ts +40 -40
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +209 -209
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +360 -352
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +288 -288
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +651 -625
- package/node_modules/@sdd-agent-platform/core/src/status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/storage/json-io.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +489 -489
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1981 -1175
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +45 -45
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +232 -232
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +307 -307
- package/node_modules/@sdd-agent-platform/core/src/subagents.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.test.ts +141 -0
- package/node_modules/@sdd-agent-platform/core/src/task-execution-contract.ts +566 -0
- package/node_modules/@sdd-agent-platform/core/src/task-risk-profile.ts +193 -193
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +413 -398
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +102 -70
- package/node_modules/@sdd-agent-platform/core/src/test-support.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +174 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +137 -181
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +455 -494
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.test.ts → task-evidence-judgment.test.ts} +261 -335
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.ts → task-evidence-judgment.ts} +619 -648
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +1190 -1032
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +513 -513
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +334 -358
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +26 -26
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.test.ts +88 -88
- package/node_modules/@sdd-agent-platform/core/src/work-units/runtime.ts +112 -112
- package/node_modules/@sdd-agent-platform/core/src/work-units.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +190 -196
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +169 -171
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +136 -143
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +135 -137
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +153 -155
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +111 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +95 -95
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +32 -32
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +114 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +184 -156
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +970 -464
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +967 -363
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/worktree/isolation.ts +130 -130
- package/node_modules/@sdd-agent-platform/core/src/worktree/lifecycle.ts +269 -269
- package/node_modules/@sdd-agent-platform/core/src/worktree/worktree.test.ts +150 -150
- package/node_modules/@sdd-agent-platform/core/src/worktree.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/tsconfig.json +15 -15
- package/package.json +2 -2
- package/packages/cli/dist/args.js +1 -1
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/evidence.js.map +1 -0
- package/packages/cli/dist/commands/execution.js +126 -0
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/instructions.d.ts +1 -1
- package/packages/cli/dist/commands/instructions.js +15 -1
- package/packages/cli/dist/commands/instructions.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +70 -1
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +12 -1
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +66 -0
- package/packages/cli/dist/commands/stage-close.js +524 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +8 -1
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/dispatch.js +6 -31
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +153 -158
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +51 -2
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/skill-import-args.d.ts +10 -0
- package/packages/cli/dist/skill-import-args.js +47 -0
- package/packages/cli/dist/skill-import-args.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +84 -103
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +10 -6
- package/packages/core/dist/config/init-project.js +7 -8
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +3 -1
- package/packages/core/dist/config/project-config.js +7 -3
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +0 -1
- package/packages/core/dist/config/starter-documents.js +374 -421
- package/packages/core/dist/config/starter-documents.js.map +1 -1
- package/packages/core/dist/context/build-package.d.ts +1 -1
- package/packages/core/dist/context/build-package.js +7 -19
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/contracts.d.ts +7 -1
- package/packages/core/dist/contracts.js +6 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +2 -12
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +1 -18
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +1 -1
- package/packages/core/dist/evidence/lookup.js +1 -1
- package/packages/core/dist/evidence/lookup.js.map +1 -1
- package/packages/core/dist/evidence-runtime/contracts.d.ts +0 -1
- package/packages/core/dist/evidence-runtime/coordination.js +110 -0
- package/packages/core/dist/evidence-runtime/coordination.js.map +1 -0
- package/packages/core/dist/execution/host-invocation.js +83 -83
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +37 -80
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.js +58 -68
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/lifecycle-graph/contracts.d.ts +159 -0
- package/packages/core/dist/lifecycle-graph/contracts.js +7 -0
- package/packages/core/dist/lifecycle-graph/contracts.js.map +1 -0
- package/packages/core/dist/lifecycle-graph/kernel.d.ts +16 -0
- package/packages/core/dist/lifecycle-graph/kernel.js +461 -0
- package/packages/core/dist/lifecycle-graph/kernel.js.map +1 -0
- package/packages/core/dist/lifecycle-graph.d.ts +2 -0
- package/packages/core/dist/lifecycle-graph.js +3 -0
- package/packages/core/dist/lifecycle-graph.js.map +1 -0
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.js +21 -28
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +124 -40
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +6 -13
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/plan-scout-domains.d.ts +13 -0
- package/packages/core/dist/registries/plan-scout-domains.js +76 -0
- package/packages/core/dist/registries/plan-scout-domains.js.map +1 -0
- package/packages/core/dist/registries/skill-capabilities.js +7 -7
- package/packages/core/dist/registries/skill-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +6 -6
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.d.ts +1 -1
- package/packages/core/dist/registries/workflow-gates.js +18 -18
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/consumer-diagnostics.js +2 -1
- package/packages/core/dist/risk/consumer-diagnostics.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +7 -7
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +12 -27
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.js +6 -6
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +1 -1
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/routing.js +2 -4
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.d.ts +28 -0
- package/packages/core/dist/router/runtime-import.js +383 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
- package/packages/core/dist/router/stage-route-binding.js +227 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +1 -0
- package/packages/core/dist/router.js +1 -0
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +16 -0
- package/packages/core/dist/run-state/artifacts.js +6 -0
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +20 -0
- package/packages/core/dist/run-state/run-state.js +7 -7
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +1 -2
- package/packages/core/dist/run-state/task-evidence.js +2 -9
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/runtime-analysis/build.js +1 -4
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +0 -39
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +10 -0
- package/packages/core/dist/runtime-paths.js +65 -0
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +211 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/artifact-depth.d.ts +14 -0
- package/packages/core/dist/sdd-docs/artifact-depth.js +179 -0
- package/packages/core/dist/sdd-docs/artifact-depth.js.map +1 -0
- package/packages/core/dist/sdd-docs/task-parser.d.ts +5 -1
- package/packages/core/dist/sdd-docs/task-parser.js +60 -22
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-rendering.js +2 -2
- package/packages/core/dist/sdd-docs/task-rendering.js.map +1 -1
- package/packages/core/dist/spec-entry.js +40 -0
- package/packages/core/dist/spec-entry.js.map +1 -0
- package/packages/core/dist/spec-manager-contracts.d.ts +12 -0
- package/packages/core/dist/spec-manager-contracts.js +2 -0
- package/packages/core/dist/spec-manager-contracts.js.map +1 -0
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +315 -0
- package/packages/core/dist/stage-artifacts.js.map +1 -0
- package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/packages/core/dist/stage-collaboration-contracts.js +238 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +736 -0
- package/packages/core/dist/stage-collaboration.js +4018 -0
- package/packages/core/dist/stage-collaboration.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.js +8 -1
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.js +25 -1
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +170 -18
- package/packages/core/dist/storage/runtime-store.js +597 -85
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- package/packages/core/dist/sync-back/apply.d.ts +1 -17
- package/packages/core/dist/sync-back/apply.js +1 -242
- package/packages/core/dist/sync-back/apply.js.map +1 -1
- package/packages/core/dist/sync-back/inspect.d.ts +1 -110
- package/packages/core/dist/sync-back/inspect.js +1 -496
- package/packages/core/dist/sync-back/inspect.js.map +1 -1
- package/packages/core/dist/sync-back.d.ts +1 -2
- package/packages/core/dist/sync-back.js +1 -2
- package/packages/core/dist/sync-back.js.map +1 -1
- package/packages/core/dist/task-execution-contract.d.ts +167 -0
- package/packages/core/dist/task-execution-contract.js +377 -0
- package/packages/core/dist/task-execution-contract.js.map +1 -0
- package/packages/core/dist/test-support/fixtures.js +329 -314
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -0
- package/packages/core/dist/test-support/run-state.js +31 -0
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.d.ts +44 -0
- package/packages/core/dist/truth-reconciliation.js +135 -0
- package/packages/core/dist/truth-reconciliation.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -49
- package/packages/core/dist/verification/goal-verify.js +1 -545
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +5 -7
- package/packages/core/dist/verification/rendering.js +15 -55
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.js +1 -40
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/task-evidence-judgment.d.ts +49 -0
- package/packages/core/dist/verification/task-evidence-judgment.js +521 -0
- package/packages/core/dist/verification/task-evidence-judgment.js.map +1 -0
- package/packages/core/dist/verification/test-runtime.d.ts +12 -2
- package/packages/core/dist/verification/test-runtime.js +247 -112
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-cache.d.ts +26 -0
- package/packages/core/dist/verification/validation-cache.js +73 -0
- package/packages/core/dist/verification/validation-cache.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +1 -1
- package/packages/core/dist/verification/verify-contract.js +49 -72
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +3 -3
- package/packages/core/dist/verification.js +2 -2
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +2 -7
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +0 -7
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +2 -4
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +3 -5
- package/packages/core/dist/workflow-state/latest-eligible-run.js +30 -4
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +55 -5
- package/packages/core/dist/workflow-state/resolve.js +518 -36
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/package.json +6 -3
- package/tsconfig.build.json +6 -7
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -270
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -655
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -569
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +0 -255
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +0 -439
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +0 -341
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +0 -204
- package/packages/cli/dist/commands/lifecycle.d.ts +0 -6
- package/packages/cli/dist/commands/lifecycle.js +0 -112
- package/packages/cli/dist/commands/lifecycle.js.map +0 -1
- package/packages/cli/dist/commands/sync-back.d.ts +0 -6
- package/packages/cli/dist/commands/sync-back.js +0 -82
- package/packages/cli/dist/commands/sync-back.js.map +0 -1
- package/packages/cli/dist/commands/test.d.ts +0 -6
- package/packages/cli/dist/commands/test.js +0 -195
- package/packages/cli/dist/commands/test.js.map +0 -1
- package/packages/cli/dist/commands/verifies.d.ts +0 -6
- package/packages/cli/dist/commands/verifies.js +0 -85
- package/packages/cli/dist/commands/verifies.js.map +0 -1
- package/packages/cli/dist/commands/verify.d.ts +0 -6
- package/packages/cli/dist/commands/verify.js +0 -134
- package/packages/cli/dist/commands/verify.js.map +0 -1
- package/packages/core/dist/doctor/render.d.ts +0 -2
- package/packages/core/dist/doctor/render.js +0 -44
- package/packages/core/dist/doctor/render.js.map +0 -1
|
@@ -0,0 +1,524 @@
|
|
|
1
|
+
import { readFile } from 'node:fs/promises';
|
|
2
|
+
import path from 'node:path';
|
|
3
|
+
import { evaluateLifecycleRiskDecisionForModel, inspectLifecycleRiskDecisionForModel, readLifecycleRiskDecisionProjection, recordLifecycleRiskDecisionProjection } from '@sdd-agent-platform/core/risk';
|
|
4
|
+
import { getSddInstructions, renderSddInstructions } from '@sdd-agent-platform/core/instructions';
|
|
5
|
+
import { readLifecycleActionAuthority, readLifecycleGraphAuthority, recordLifecycleGraphBundle } from '@sdd-agent-platform/core/lifecycle-graph';
|
|
6
|
+
import { parseSddBranch, resolveSddContext } from '@sdd-agent-platform/core/sdd-docs';
|
|
7
|
+
import { resolveWorkflowState } from '@sdd-agent-platform/core/workflow-state';
|
|
8
|
+
import { inspectWorkflowStageHandoff } from '@sdd-agent-platform/core/stage-runtime';
|
|
9
|
+
import { reconcileExecuteCollaborationClosure, reconcilePlanCollaborationClosure, reconcileShipCollaborationClosure, reconcileSpecCollaborationClosure, reconcileTasksCollaborationClosure } from '@sdd-agent-platform/core/stage-collaboration';
|
|
10
|
+
import { readBranchContext, readResolvedBranch } from '../args.js';
|
|
11
|
+
import { hasHelpFlag, readOption } from '../options.js';
|
|
12
|
+
import { jsonOutput, renderTextOrJson, wantsJson } from '../renderers/json.js';
|
|
13
|
+
const CLOSE_STAGES = ['spec', 'plan', 'tasks', 'execute', 'ship'];
|
|
14
|
+
const ENTRY_STAGES = ['spec', 'plan', 'tasks'];
|
|
15
|
+
const LIFECYCLE_ENTRY_NEXT_ACTION = 'Run sdd spec --branch <branch> --json to create or refresh lifecycle authority before using later stage-local entries.';
|
|
16
|
+
export async function handleStageCloseCommand(projectRoot, command, subcommand, rest) {
|
|
17
|
+
if (isStageEntry(command) && (subcommand === undefined || subcommand.startsWith('--'))) {
|
|
18
|
+
const entryArgs = [subcommand, ...rest].filter((item) => Boolean(item));
|
|
19
|
+
if (hasHelpFlag(entryArgs)) {
|
|
20
|
+
return { exitCode: 0, output: stageEntryUsage(command) };
|
|
21
|
+
}
|
|
22
|
+
const context = await resolveSddContext(projectRoot, readBranchContext(entryArgs));
|
|
23
|
+
const payload = await resolveStageEntryPayload(projectRoot, command, context);
|
|
24
|
+
return {
|
|
25
|
+
exitCode: 0,
|
|
26
|
+
output: renderTextOrJson(entryArgs, payload, renderStageEntryInstructions)
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (!isCloseStage(command)) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
if (subcommand !== 'close') {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
if (hasHelpFlag(rest)) {
|
|
36
|
+
return { exitCode: 0, output: stageCloseUsage(command) };
|
|
37
|
+
}
|
|
38
|
+
const branch = await readResolvedBranch(projectRoot, rest);
|
|
39
|
+
const targetResolution = closeTargetStage(command, rest);
|
|
40
|
+
if (!targetResolution.valid) {
|
|
41
|
+
const payload = stageCloseBlockedPayload(command, branch, [targetResolution.reason]);
|
|
42
|
+
return {
|
|
43
|
+
exitCode: 1,
|
|
44
|
+
output: wantsJson(rest) ? jsonOutput(payload, rest) : renderBlockedStageClosePayload(payload)
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const stage = targetResolution.stage;
|
|
48
|
+
const decision = await lifecycleDecisionForClose(projectRoot, stage, branch);
|
|
49
|
+
if (!decision.decision) {
|
|
50
|
+
const payload = stageCloseBlockedPayload(stage, branch, decision.reasons);
|
|
51
|
+
return {
|
|
52
|
+
exitCode: 1,
|
|
53
|
+
output: wantsJson(rest) ? jsonOutput(payload, rest) : renderBlockedStageClosePayload(payload)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
const authority = await ensureStageCloseLifecycleAuthority(projectRoot, stage, branch, decision.decision);
|
|
57
|
+
if (authority.reasons.length > 0) {
|
|
58
|
+
const payload = stageCloseBlockedPayload(stage, branch, authority.reasons);
|
|
59
|
+
return {
|
|
60
|
+
exitCode: 1,
|
|
61
|
+
output: wantsJson(rest) ? jsonOutput(payload, rest) : renderBlockedStageClosePayload(payload)
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
const runId = readOption(rest, '--run') ?? undefined;
|
|
65
|
+
const result = await reconcileStageClose(projectRoot, stage, decision.decision, runId);
|
|
66
|
+
await refreshLifecycleGraphAfterClose(projectRoot, decision.decision, result);
|
|
67
|
+
const payload = stageClosePayload(stage, result);
|
|
68
|
+
return {
|
|
69
|
+
exitCode: payload.stageDecision.status === 'completed' ? 0 : 1,
|
|
70
|
+
output: wantsJson(rest) ? jsonOutput(payload, rest) : renderStageClosePayload(payload)
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
function isCloseStage(value) {
|
|
74
|
+
return CLOSE_STAGES.includes(value);
|
|
75
|
+
}
|
|
76
|
+
function isStageEntry(value) {
|
|
77
|
+
return ENTRY_STAGES.includes(value);
|
|
78
|
+
}
|
|
79
|
+
export async function resolveStageEntryPayload(projectRoot, stage, context) {
|
|
80
|
+
const authority = stage === 'spec'
|
|
81
|
+
? await refreshSpecEntryLifecycleAuthority(projectRoot, context.partition)
|
|
82
|
+
: await readLifecycleGraphAuthority(projectRoot, { branch: context.partition });
|
|
83
|
+
const actionAuthority = await readLifecycleActionAuthority(projectRoot, { branch: context.partition }, stage);
|
|
84
|
+
const handoff = buildStageWorkOrderHandoff(stage, context, actionAuthority);
|
|
85
|
+
return {
|
|
86
|
+
...getSddInstructions(stage),
|
|
87
|
+
context: {
|
|
88
|
+
branch: context.branch,
|
|
89
|
+
partition: context.partition,
|
|
90
|
+
rawBranch: context.rawBranch,
|
|
91
|
+
branchSource: context.branchSource,
|
|
92
|
+
currentGitBranch: context.currentGitBranch,
|
|
93
|
+
workingTreeMatched: context.workingTreeMatched,
|
|
94
|
+
specDir: context.specDir
|
|
95
|
+
},
|
|
96
|
+
projectionRender: {
|
|
97
|
+
source: 'runtime_kernel',
|
|
98
|
+
branch: context.partition,
|
|
99
|
+
nextAction: {
|
|
100
|
+
status: actionAuthority.action,
|
|
101
|
+
targetStage: actionAuthority.nextStage,
|
|
102
|
+
command: actionAuthority.canonicalCommand
|
|
103
|
+
},
|
|
104
|
+
allowedCommands: actionAuthority.canonicalCommand ? [actionAuthority.canonicalCommand] : []
|
|
105
|
+
},
|
|
106
|
+
runtimeAuthority: {
|
|
107
|
+
status: authority.status,
|
|
108
|
+
action: actionAuthority.action,
|
|
109
|
+
routeStatus: authority.route?.payload.status ?? null,
|
|
110
|
+
nextStage: authority.route?.payload.nextStage ?? null,
|
|
111
|
+
canonicalCommand: actionAuthority.canonicalCommand,
|
|
112
|
+
workOrders: authority.workOrders.map((workOrder) => ({
|
|
113
|
+
stage: workOrder.payload.stage,
|
|
114
|
+
workOrderId: workOrder.payload.workOrderId,
|
|
115
|
+
closureCommand: workOrder.payload.closureCommand
|
|
116
|
+
})),
|
|
117
|
+
reasons: actionAuthority.reasons.length > 0 ? actionAuthority.reasons : authority.reasons
|
|
118
|
+
},
|
|
119
|
+
...stageHandoffPayload(stage, handoff)
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
function buildStageWorkOrderHandoff(stage, context, actionAuthority) {
|
|
123
|
+
if (actionAuthority.action !== 'proceed' || actionAuthority.workOrder?.payload.stage !== stage) {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
const workOrder = actionAuthority.workOrder;
|
|
127
|
+
const targetRef = workOrder.payload.targetRef?.ref ?? null;
|
|
128
|
+
return {
|
|
129
|
+
contract: `sdd-${stage}-stage-work-order-handoff-v1`,
|
|
130
|
+
stage,
|
|
131
|
+
branch: context.branch,
|
|
132
|
+
partition: context.partition,
|
|
133
|
+
handoffTo: String(workOrder.payload.workOrder.stageManager),
|
|
134
|
+
targetRef,
|
|
135
|
+
workOrderId: workOrder.payload.workOrderId,
|
|
136
|
+
workOrderRef: {
|
|
137
|
+
ref: `${workOrder.projectionType}:${workOrder.scopeKey}`,
|
|
138
|
+
hash: workOrder.inputHash
|
|
139
|
+
},
|
|
140
|
+
requiredInputRefs: workOrder.payload.requiredInputRefs.map(formatRuntimeRef),
|
|
141
|
+
requiredOutputKinds: workOrder.payload.requiredOutputKinds,
|
|
142
|
+
closureCommand: workOrder.payload.closureCommand,
|
|
143
|
+
authority: {
|
|
144
|
+
status: 'ready',
|
|
145
|
+
action: actionAuthority.action,
|
|
146
|
+
canonicalCommand: actionAuthority.canonicalCommand,
|
|
147
|
+
reasons: actionAuthority.reasons
|
|
148
|
+
},
|
|
149
|
+
...stageSpecificHandoffRefs(stage, context, targetRef)
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function stageHandoffPayload(stage, handoff) {
|
|
153
|
+
return {
|
|
154
|
+
specStageWorkOrderHandoff: stage === 'spec' ? handoff : null,
|
|
155
|
+
planStageWorkOrderHandoff: stage === 'plan' ? handoff : null,
|
|
156
|
+
tasksStageWorkOrderHandoff: stage === 'tasks' ? handoff : null
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
function stageSpecificHandoffRefs(stage, context, targetRef) {
|
|
160
|
+
if (stage === 'spec') {
|
|
161
|
+
return { targetSpecRef: targetRef };
|
|
162
|
+
}
|
|
163
|
+
if (stage === 'plan') {
|
|
164
|
+
return {
|
|
165
|
+
upstreamAcceptedSpecRef: `specs/${context.partition}/spec.md`,
|
|
166
|
+
targetPlanRef: targetRef
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
return {
|
|
170
|
+
acceptedSpecRef: `specs/${context.partition}/spec.md`,
|
|
171
|
+
acceptedPlanRef: `specs/${context.partition}/plan.md`,
|
|
172
|
+
targetTasksRef: targetRef
|
|
173
|
+
};
|
|
174
|
+
}
|
|
175
|
+
function formatRuntimeRef(ref) {
|
|
176
|
+
return ref.hash ? `${ref.kind}:${ref.ref}#${ref.hash}` : `${ref.kind}:${ref.ref}`;
|
|
177
|
+
}
|
|
178
|
+
async function refreshSpecEntryLifecycleAuthority(projectRoot, branch) {
|
|
179
|
+
const model = await parseSddBranch(projectRoot, branch);
|
|
180
|
+
const decision = forceFullLifecycleEntryDecision(evaluateLifecycleRiskDecisionForModel(branch, model));
|
|
181
|
+
await recordLifecycleRiskDecisionProjection(projectRoot, decision);
|
|
182
|
+
await recordLifecycleGraphBundle(projectRoot, decision, { activeStage: 'spec' });
|
|
183
|
+
return readLifecycleGraphAuthority(projectRoot, { branch });
|
|
184
|
+
}
|
|
185
|
+
function forceFullLifecycleEntryDecision(decision) {
|
|
186
|
+
const requiredStages = ['spec', 'plan', 'tasks', 'execute', 'ship'];
|
|
187
|
+
return {
|
|
188
|
+
...decision,
|
|
189
|
+
profile: 'full',
|
|
190
|
+
requiredStages,
|
|
191
|
+
skippedStages: [],
|
|
192
|
+
blockedStages: [],
|
|
193
|
+
approvalPolicy: decision.humanCheckpointRequired ? 'human-required' : 'review-required',
|
|
194
|
+
reasons: uniqueStrings(['Spec entry initializes the full public SDD lifecycle authority.', ...decision.reasons])
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
export function renderStageEntryInstructions(payload) {
|
|
198
|
+
return [
|
|
199
|
+
renderSddInstructions(payload),
|
|
200
|
+
'',
|
|
201
|
+
'Resolved partition:',
|
|
202
|
+
`- branch=${payload.context.branch}`,
|
|
203
|
+
`- raw_branch=${payload.context.rawBranch}`,
|
|
204
|
+
`- source=${payload.context.branchSource}`,
|
|
205
|
+
`- spec_dir=${payload.context.specDir}`,
|
|
206
|
+
`- current_git_branch=${payload.context.currentGitBranch ?? 'none'}`,
|
|
207
|
+
`- working_tree_matched=${payload.context.workingTreeMatched ?? 'unknown'}`,
|
|
208
|
+
'',
|
|
209
|
+
'Runtime authority:',
|
|
210
|
+
`- status=${payload.runtimeAuthority.status}`,
|
|
211
|
+
`- action=${payload.runtimeAuthority.action}`,
|
|
212
|
+
`- route_status=${payload.runtimeAuthority.routeStatus ?? 'missing'}`,
|
|
213
|
+
`- next_stage=${payload.runtimeAuthority.nextStage ?? 'none'}`,
|
|
214
|
+
`- canonical_command=${payload.runtimeAuthority.canonicalCommand ?? 'none'}`,
|
|
215
|
+
...renderStageEntryHandoff(payload),
|
|
216
|
+
...payload.runtimeAuthority.workOrders.map((workOrder) => `- work_order=${workOrder.stage}:${workOrder.workOrderId}; closure=${workOrder.closureCommand}`),
|
|
217
|
+
...payload.runtimeAuthority.reasons.map((reason) => `- reason=${reason}`)
|
|
218
|
+
].join('\n');
|
|
219
|
+
}
|
|
220
|
+
function renderStageEntryHandoff(payload) {
|
|
221
|
+
const handoff = payload.specStageWorkOrderHandoff ?? payload.planStageWorkOrderHandoff ?? payload.tasksStageWorkOrderHandoff ?? null;
|
|
222
|
+
if (!handoff) {
|
|
223
|
+
return ['- handoff=none'];
|
|
224
|
+
}
|
|
225
|
+
return [
|
|
226
|
+
`- handoff=${handoff.contract}; to=${handoff.handoffTo}; target=${handoff.targetRef ?? 'none'}`,
|
|
227
|
+
`- handoff_work_order=${handoff.workOrderRef.ref}`
|
|
228
|
+
];
|
|
229
|
+
}
|
|
230
|
+
function stageEntryUsage(stage) {
|
|
231
|
+
return `Usage: sdd ${stage} [--branch <branch>] [--json|--compact-json]\n\nThis command prints the generated ${stage}-stage entry contract. Use sdd ${stage} close --branch <branch> after agent-authored Markdown evidence exists.`;
|
|
232
|
+
}
|
|
233
|
+
function closeTargetStage(command, rest) {
|
|
234
|
+
if (!rest.includes('--target')) {
|
|
235
|
+
return { valid: true, stage: command };
|
|
236
|
+
}
|
|
237
|
+
const target = readOption(rest, '--target');
|
|
238
|
+
if (!target || target.startsWith('--')) {
|
|
239
|
+
return { valid: false, reason: '--target requires an internal runtime stage.' };
|
|
240
|
+
}
|
|
241
|
+
if (target === command) {
|
|
242
|
+
return { valid: true, stage: command };
|
|
243
|
+
}
|
|
244
|
+
if (command === 'tasks' && target === 'execute') {
|
|
245
|
+
return { valid: true, stage: 'execute' };
|
|
246
|
+
}
|
|
247
|
+
return { valid: false, reason: `Unsupported --target ${target} for sdd ${command} close.` };
|
|
248
|
+
}
|
|
249
|
+
async function reconcileStageClose(projectRoot, stage, decision, runId) {
|
|
250
|
+
if (stage === 'spec')
|
|
251
|
+
return reconcileSpecCollaborationClosure(projectRoot, {
|
|
252
|
+
decision,
|
|
253
|
+
runId,
|
|
254
|
+
outputCloseRequest: { sectionCloseDeclaration: 'present', reviewSignal: 'present', blockingBeforePlanCount: 0 }
|
|
255
|
+
});
|
|
256
|
+
if (stage === 'plan')
|
|
257
|
+
return reconcilePlanCollaborationClosure(projectRoot, {
|
|
258
|
+
decision,
|
|
259
|
+
runId,
|
|
260
|
+
outputCloseRequest: { planCloseQualityEvidence: 'present', reviewSignal: 'present', blockingBeforeTasksCount: 0 }
|
|
261
|
+
});
|
|
262
|
+
if (stage === 'tasks')
|
|
263
|
+
return reconcileTasksCollaborationClosure(projectRoot, {
|
|
264
|
+
decision,
|
|
265
|
+
runId,
|
|
266
|
+
outputCloseRequest: await buildTasksOutputCloseRequest(projectRoot, decision.scope.branch)
|
|
267
|
+
});
|
|
268
|
+
const input = { decision, runId };
|
|
269
|
+
if (stage === 'execute')
|
|
270
|
+
return reconcileExecuteCollaborationClosure(projectRoot, input);
|
|
271
|
+
return reconcileShipCollaborationClosure(projectRoot, input);
|
|
272
|
+
}
|
|
273
|
+
async function buildTasksOutputCloseRequest(projectRoot, branch) {
|
|
274
|
+
const content = await readOptionalText(path.join(projectRoot, 'specs', branch, 'tasks.md'));
|
|
275
|
+
const closeEvidence = content ? extractMarkdownSection(content, ['Tasks Close Quality Evidence', 'Close Quality Evidence']) ?? '' : '';
|
|
276
|
+
const reviewSignal = hasTaskReviewVerdict(closeEvidence) ? 'present' : 'missing';
|
|
277
|
+
const blockingBeforeExecuteCount = hasTaskReviewReconciliation(closeEvidence) ? 0 : 1;
|
|
278
|
+
return {
|
|
279
|
+
dependencyGraphStatus: 'present',
|
|
280
|
+
validationSignalsStatus: 'present',
|
|
281
|
+
reviewSignal,
|
|
282
|
+
blockingBeforeExecuteCount
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
async function readOptionalText(filePath) {
|
|
286
|
+
try {
|
|
287
|
+
return await readFile(filePath, 'utf8');
|
|
288
|
+
}
|
|
289
|
+
catch {
|
|
290
|
+
return null;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
function extractMarkdownSection(content, section) {
|
|
294
|
+
for (const sectionName of Array.isArray(section) ? section : [section]) {
|
|
295
|
+
const escaped = sectionName.replace(/[.*+?^${}()|[\]\\]/g, '\\$&').replace(/\s+/g, '\\s+');
|
|
296
|
+
const match = new RegExp(`^##\\s+(?:\\d+(?:\\.\\d+)*\\.?\\s+)?${escaped}\\s*$`, 'im').exec(content);
|
|
297
|
+
if (!match)
|
|
298
|
+
continue;
|
|
299
|
+
const start = match.index + match[0].length;
|
|
300
|
+
const rest = content.slice(start);
|
|
301
|
+
const next = /^##\s+/im.exec(rest);
|
|
302
|
+
return (next ? rest.slice(0, next.index) : rest).trim();
|
|
303
|
+
}
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
function hasTaskReviewVerdict(section) {
|
|
307
|
+
return /task-review-agent\s+(?:verdict|review)|review(?:_|\s+)signal|reviewed by task-review-agent/i.test(section);
|
|
308
|
+
}
|
|
309
|
+
function hasTaskReviewReconciliation(section) {
|
|
310
|
+
return /review(?:_|\s+)reconciliation|tasks-manager\s+(?:review\s+)?reconciliation|tasks-manager\s+(?:resolved|adjudicated)|review findings? reconciled|blocking findings resolved|task-review-agent findings resolved/i.test(section);
|
|
311
|
+
}
|
|
312
|
+
async function refreshLifecycleGraphAfterClose(projectRoot, decision, result) {
|
|
313
|
+
const adjudication = result.adjudication;
|
|
314
|
+
const handoff = adjudication.handoffPacket;
|
|
315
|
+
if (!handoff || handoff.status !== 'proposed') {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
await recordLifecycleGraphBundle(projectRoot, decision, { generatedAt: handoff.decidedAt ?? handoff.createdAt, activeStage: handoff.toStage });
|
|
319
|
+
}
|
|
320
|
+
async function ensureStageCloseLifecycleAuthority(projectRoot, stage, branch, decision) {
|
|
321
|
+
let authority = await readLifecycleGraphAuthority(projectRoot, { branch });
|
|
322
|
+
if (authority.decision && (!authority.graph || !authority.route)) {
|
|
323
|
+
await recordLifecycleGraphBundle(projectRoot, authority.decision.payload);
|
|
324
|
+
authority = await readLifecycleGraphAuthority(projectRoot, { branch });
|
|
325
|
+
}
|
|
326
|
+
const activeDecision = authority.decision?.payload ?? decision;
|
|
327
|
+
const action = await readLifecycleActionAuthority(projectRoot, { branch }, stage);
|
|
328
|
+
const reasons = [...authority.reasons];
|
|
329
|
+
if (authority.status !== 'fresh') {
|
|
330
|
+
reasons.push('Stage close requires fresh lifecycle graph authority.');
|
|
331
|
+
}
|
|
332
|
+
if (activeDecision.blockedStages.includes(stage) || authority.route?.payload.status === 'blocked') {
|
|
333
|
+
reasons.push(`Stage ${stage} close is blocked by the active lifecycle graph.`);
|
|
334
|
+
}
|
|
335
|
+
if (!activeDecision.requiredStages.includes(stage)) {
|
|
336
|
+
reasons.push(`Stage ${stage} is skipped by the active lifecycle graph; close is not a legal next action.`);
|
|
337
|
+
}
|
|
338
|
+
const redirectedForRepair = action.action === 'redirect' && action.nextStage
|
|
339
|
+
? await closeRedirectIsOwnerStageRepair(projectRoot, stage, branch, action.nextStage)
|
|
340
|
+
: false;
|
|
341
|
+
if (action.action === 'redirect' && action.nextStage && !redirectedForRepair) {
|
|
342
|
+
reasons.push(`Stage ${stage} close is not the current legal lifecycle action; expected ${action.nextStage}. Run ${action.canonicalCommand ?? 'the active lifecycle command'} first.`);
|
|
343
|
+
}
|
|
344
|
+
else if (action.action === 'repair') {
|
|
345
|
+
reasons.push(...action.reasons);
|
|
346
|
+
}
|
|
347
|
+
else if (action.action === 'blocked') {
|
|
348
|
+
reasons.push(...action.reasons);
|
|
349
|
+
}
|
|
350
|
+
if (activeDecision.requiredStages.includes(stage) && !authority.workOrders.some((workOrder) => workOrder.payload.stage === stage)) {
|
|
351
|
+
reasons.push(`Stage ${stage} close requires a StageWorkOrderProjection before reconciliation.`);
|
|
352
|
+
}
|
|
353
|
+
return { authority, reasons: uniqueStrings(reasons) };
|
|
354
|
+
}
|
|
355
|
+
async function closeRedirectIsOwnerStageRepair(projectRoot, stage, branch, nextStage) {
|
|
356
|
+
if (stage !== 'tasks' || nextStage !== 'execute') {
|
|
357
|
+
return false;
|
|
358
|
+
}
|
|
359
|
+
const model = await parseSddBranch(projectRoot, branch);
|
|
360
|
+
const currentHash = model.documents.tasksHash;
|
|
361
|
+
const handoff = (await inspectWorkflowStageHandoff(projectRoot, branch)).latestHandoff;
|
|
362
|
+
const expectedRef = `specs/${branch}/tasks.md`;
|
|
363
|
+
const acceptedRef = handoff && [...handoff.requiredInputRefs, ...handoff.outputRefs].find((ref) => ref.kind === 'document' && ref.ref === expectedRef);
|
|
364
|
+
return Boolean(handoff?.fromStage === 'tasks' && handoff.toStage === 'execute' && acceptedRef?.hash && currentHash && acceptedRef.hash !== currentHash);
|
|
365
|
+
}
|
|
366
|
+
async function lifecycleDecisionForClose(projectRoot, stage, branch) {
|
|
367
|
+
const model = await parseSddBranch(projectRoot, branch);
|
|
368
|
+
const evaluated = evaluateLifecycleRiskDecisionForModel(branch, model);
|
|
369
|
+
const reconciliationReasons = await truthReconciliationCloseReasons(projectRoot, stage, branch);
|
|
370
|
+
if (reconciliationReasons) {
|
|
371
|
+
return { decision: truthReconciliationLifecycleDecision(evaluated, stage, reconciliationReasons), reasons: [] };
|
|
372
|
+
}
|
|
373
|
+
const authority = await readLifecycleGraphAuthority(projectRoot, { branch });
|
|
374
|
+
if (authority.status === 'fresh' && authority.decision) {
|
|
375
|
+
return { decision: authority.decision.payload, reasons: authority.route?.payload.routeReason ? [authority.route.payload.routeReason] : authority.reasons };
|
|
376
|
+
}
|
|
377
|
+
if (stage === 'spec') {
|
|
378
|
+
return { decision: evaluated, reasons: [] };
|
|
379
|
+
}
|
|
380
|
+
const diagnostic = await inspectLifecycleRiskDecisionForModel(projectRoot, branch, model);
|
|
381
|
+
const existing = await readLifecycleRiskDecisionProjection(projectRoot, { branch });
|
|
382
|
+
if (existing && diagnostic.status === 'fresh') {
|
|
383
|
+
return { decision: existing.payload, reasons: diagnostic.reasons };
|
|
384
|
+
}
|
|
385
|
+
const headline = diagnostic.status === 'missing'
|
|
386
|
+
? 'Stage-local close requires active lifecycle authority created by sdd spec.'
|
|
387
|
+
: diagnostic.status === 'stale'
|
|
388
|
+
? 'Stage-local close requires refreshed lifecycle authority because the active projection is stale.'
|
|
389
|
+
: diagnostic.status === 'blocked'
|
|
390
|
+
? 'Stage-local close is blocked by the active lifecycle decision.'
|
|
391
|
+
: 'Stage-local close requires refreshed lifecycle authority because the active projection is incompatible.';
|
|
392
|
+
return { decision: null, reasons: uniqueStrings([headline, ...diagnostic.reasons, LIFECYCLE_ENTRY_NEXT_ACTION]) };
|
|
393
|
+
}
|
|
394
|
+
async function truthReconciliationCloseReasons(projectRoot, stage, branch) {
|
|
395
|
+
const workflow = await resolveWorkflowState(projectRoot, { branch, branchSource: 'cli_option' });
|
|
396
|
+
const reconciliation = workflow.truthReconciliation;
|
|
397
|
+
if (!reconciliation || reconciliation.nextIntent.intent !== 'reconcile_truth' || reconciliation.nextIntent.targetRuntimeStage !== stage) {
|
|
398
|
+
return null;
|
|
399
|
+
}
|
|
400
|
+
return reconciliation.reasons;
|
|
401
|
+
}
|
|
402
|
+
function truthReconciliationLifecycleDecision(decision, stage, reasons) {
|
|
403
|
+
return {
|
|
404
|
+
...decision,
|
|
405
|
+
profile: 'full',
|
|
406
|
+
requiredStages: allSddStages(),
|
|
407
|
+
skippedStages: [],
|
|
408
|
+
blockedStages: [],
|
|
409
|
+
humanCheckpointRequired: false,
|
|
410
|
+
approvalPolicy: 'review-required',
|
|
411
|
+
reasons: uniqueStrings([`Truth reconciliation routes to ${stage} close; stale truth must not block owner-stage reconciliation.`, ...reasons, ...decision.reasons])
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
function allSddStages() {
|
|
415
|
+
return ['spec', 'plan', 'tasks', 'execute', 'ship'];
|
|
416
|
+
}
|
|
417
|
+
function stageClosePayload(stage, result) {
|
|
418
|
+
const adjudication = result.adjudication;
|
|
419
|
+
const stageDecision = adjudication.stageDecision ?? { status: 'rejected', health: adjudication.health };
|
|
420
|
+
const closureRefs = adjudication.closureRefs ?? {};
|
|
421
|
+
const acceptedRef = acceptedRefForStage(stage, result);
|
|
422
|
+
return {
|
|
423
|
+
contract: 'sdd-stage-close-cli-result-v1',
|
|
424
|
+
stage,
|
|
425
|
+
runId: result.runId,
|
|
426
|
+
branch: result.branch,
|
|
427
|
+
health: adjudication.health,
|
|
428
|
+
stageDecision: {
|
|
429
|
+
status: stageDecision.status,
|
|
430
|
+
health: stageDecision.health
|
|
431
|
+
},
|
|
432
|
+
acceptedRef,
|
|
433
|
+
acceptedHash: acceptedRef?.hash ?? null,
|
|
434
|
+
registeredArtifactRefs: result.registeredArtifacts.map((artifact) => artifact.ref),
|
|
435
|
+
registeredCollaborationContracts: result.registeredCollaborationContracts.map((contract) => ({
|
|
436
|
+
ref: contract.ref,
|
|
437
|
+
hash: contract.hash,
|
|
438
|
+
status: contract.status,
|
|
439
|
+
validationErrors: contract.validationErrors
|
|
440
|
+
})),
|
|
441
|
+
handoff: adjudication.handoffPacket ? {
|
|
442
|
+
fromStage: adjudication.handoffPacket.fromStage,
|
|
443
|
+
toStage: adjudication.handoffPacket.toStage,
|
|
444
|
+
status: adjudication.handoffPacket.status,
|
|
445
|
+
requiredInputRefs: adjudication.handoffPacket.requiredInputRefs ?? []
|
|
446
|
+
} : null,
|
|
447
|
+
closureRefs: {
|
|
448
|
+
artifactRefs: closureRefs.artifactRefs ?? [],
|
|
449
|
+
collaborationContractRef: closureRefs.collaborationContractRef ?? null,
|
|
450
|
+
lifecycleRiskProjectionRef: closureRefs.lifecycleRiskProjectionRef ?? null,
|
|
451
|
+
adjudicationProjectionRef: closureRefs.adjudicationProjectionRef ?? null,
|
|
452
|
+
stageRunProjectionRef: closureRefs.stageRunProjectionRef ?? null,
|
|
453
|
+
workflowHandoffProjectionRef: closureRefs.workflowHandoffProjectionRef ?? null,
|
|
454
|
+
reasons: closureRefs.reasons ?? []
|
|
455
|
+
}
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
function acceptedRefForStage(stage, result) {
|
|
459
|
+
if (stage === 'spec')
|
|
460
|
+
return 'acceptedSpecRef' in result ? result.acceptedSpecRef : null;
|
|
461
|
+
if (stage === 'plan')
|
|
462
|
+
return 'acceptedPlanRef' in result ? result.acceptedPlanRef : null;
|
|
463
|
+
if (stage === 'tasks')
|
|
464
|
+
return 'acceptedTasksRef' in result ? result.acceptedTasksRef : null;
|
|
465
|
+
if (stage === 'execute')
|
|
466
|
+
return 'acceptedExecuteRef' in result ? result.acceptedExecuteRef : null;
|
|
467
|
+
return 'acceptedShipReadinessRef' in result ? result.acceptedShipReadinessRef : null;
|
|
468
|
+
}
|
|
469
|
+
function stageCloseBlockedPayload(stage, branch, reasons) {
|
|
470
|
+
return {
|
|
471
|
+
contract: 'sdd-stage-close-cli-result-v1',
|
|
472
|
+
stage,
|
|
473
|
+
runId: null,
|
|
474
|
+
branch,
|
|
475
|
+
health: 'blocked',
|
|
476
|
+
stageDecision: {
|
|
477
|
+
status: 'rejected',
|
|
478
|
+
health: 'blocked'
|
|
479
|
+
},
|
|
480
|
+
acceptedRef: null,
|
|
481
|
+
acceptedHash: null,
|
|
482
|
+
registeredArtifactRefs: [],
|
|
483
|
+
registeredCollaborationContracts: [],
|
|
484
|
+
handoff: null,
|
|
485
|
+
closureRefs: {
|
|
486
|
+
artifactRefs: [],
|
|
487
|
+
collaborationContractRef: null,
|
|
488
|
+
lifecycleRiskProjectionRef: null,
|
|
489
|
+
adjudicationProjectionRef: null,
|
|
490
|
+
stageRunProjectionRef: null,
|
|
491
|
+
workflowHandoffProjectionRef: null,
|
|
492
|
+
reasons
|
|
493
|
+
}
|
|
494
|
+
};
|
|
495
|
+
}
|
|
496
|
+
function renderStageClosePayload(payload) {
|
|
497
|
+
const lines = [
|
|
498
|
+
`SDD ${payload.stage} close`,
|
|
499
|
+
`health=${payload.health}`,
|
|
500
|
+
`stageDecision.status=${payload.stageDecision.status}`,
|
|
501
|
+
`acceptedRef=${payload.acceptedRef?.ref ?? 'none'}`,
|
|
502
|
+
`acceptedHash=${payload.acceptedHash ?? 'none'}`,
|
|
503
|
+
`registeredArtifactRefs=${payload.registeredArtifactRefs.length}`,
|
|
504
|
+
`registeredCollaborationContracts=${payload.registeredCollaborationContracts.length}`
|
|
505
|
+
];
|
|
506
|
+
if (payload.handoff) {
|
|
507
|
+
lines.push(`handoff=${payload.handoff.fromStage}->${payload.handoff.toStage}:${payload.handoff.status}`);
|
|
508
|
+
}
|
|
509
|
+
if (payload.closureRefs.reasons.length > 0) {
|
|
510
|
+
lines.push('reasons:');
|
|
511
|
+
lines.push(...payload.closureRefs.reasons.map((reason) => `- ${reason}`));
|
|
512
|
+
}
|
|
513
|
+
return lines.join('\n');
|
|
514
|
+
}
|
|
515
|
+
function renderBlockedStageClosePayload(payload) {
|
|
516
|
+
return renderStageClosePayload(payload);
|
|
517
|
+
}
|
|
518
|
+
function uniqueStrings(values) {
|
|
519
|
+
return Array.from(new Set(values.filter((value) => value.length > 0)));
|
|
520
|
+
}
|
|
521
|
+
function stageCloseUsage(stage) {
|
|
522
|
+
return `Usage: sdd ${stage} close [--branch <branch>] [--run <run_id>] [--json|--compact-json]`;
|
|
523
|
+
}
|
|
524
|
+
//# sourceMappingURL=stage-close.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stage-close.js","sourceRoot":"","sources":["../../src/commands/stage-close.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,qCAAqC,EAAE,oCAAoC,EAAE,mCAAmC,EAAE,qCAAqC,EAA8B,MAAM,+BAA+B,CAAC;AACpO,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAA8B,MAAM,uCAAuC,CAAC;AAC9H,OAAO,EAAE,4BAA4B,EAAE,2BAA2B,EAAE,0BAA0B,EAA+D,MAAM,0CAA0C,CAAC;AAC9M,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAgC,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G,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC;IAC5E,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED,SAAS,8BAA8B,CAAC,OAAoD;IAC1F,OAAO,uBAAuB,CAAC,OAAO,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,aAAa,CAAC,MAAgB;IACrC,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACzE,CAAC;AAED,SAAS,eAAe,CAAC,KAAiB;IACxC,OAAO,cAAc,KAAK,qEAAqE,CAAC;AAClG,CAAC"}
|
|
@@ -17,9 +17,16 @@ export async function handleStatusCommand(projectRoot, command, subcommand, rest
|
|
|
17
17
|
}
|
|
18
18
|
const result = await getProjectStatus(projectRoot, readBranchContext(statusArgs));
|
|
19
19
|
const json = wantsJson(statusArgs);
|
|
20
|
+
const payload = {
|
|
21
|
+
contract: 'sdd-project-status-summary-v1',
|
|
22
|
+
...result,
|
|
23
|
+
counts: {
|
|
24
|
+
latestEligibleRunsByTask: result.latestEligibleRunsByTask.length
|
|
25
|
+
}
|
|
26
|
+
};
|
|
20
27
|
return {
|
|
21
28
|
exitCode: 0,
|
|
22
|
-
output: json ? jsonOutput(
|
|
29
|
+
output: json ? jsonOutput(payload, statusArgs) : renderProjectStatus(result)
|
|
23
30
|
};
|
|
24
31
|
}
|
|
25
32
|
//# sourceMappingURL=status.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"status.js","sourceRoot":"","sources":["../../src/commands/status.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,MAAM,iCAA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AC;IAClF,MAAM,IAAI,GAAG,SAAS,CAAC,UAAU,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG;QACd,QAAQ,EAAE,+BAA+B;QACzC,GAAG,MAAM;QACT,MAAM,EAAE;YACN,wBAAwB,EAAE,MAAM,CAAC,wBAAwB,CAAC,MAAM;SACjE;KACF,CAAC;IACF,OAAO;QACL,QAAQ,EAAE,CAAC;QACX,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,MAAM,CAAC;KAC7E,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/commands/tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,wBAAwB,CAAC;AAQnE,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,WAAmB,EAAE,OAA2B,EAAE,UAA8B,EAAE,IAAc;IACvI,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC;IACd,CAAC;
|
|
1
|
+
{"version":3,"file":"tasks.js","sourceRoot":"","sources":["../../src/commands/tasks.ts"],"names":[],"mappings":"AAAA,OA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