sdd-agent-platform 0.4.2 → 0.5.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 +34 -41
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +56 -73
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +9 -64
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +17 -26
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +8 -7
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +8 -12
- 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 +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +1 -1
- 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 +3 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +377 -411
- 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 +18 -25
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +8 -26
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +6 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +5 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +4 -7
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +3 -13
- 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/checks/local-run-index.js +1 -9
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/local-run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +9 -9
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +43 -180
- 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 +7 -14
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -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/background-executor.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +85 -86
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +2 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +31 -67
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +59 -85
- 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.d.ts +2 -12
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +32 -80
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +2 -5
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +27 -69
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +118 -34
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +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 +8 -15
- 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/eval-learning-context.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.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/query-status.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -1
- 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 +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +11 -11
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.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 +21 -21
- 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/kernel.js +6 -6
- 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 +11 -23
- 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.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +18 -20
- 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.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +16 -48
- 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.js +11 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +20 -28
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/router.js +0 -1
- 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 +6 -6
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +13 -124
- 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/inspect-run.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +5 -7
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +28 -28
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +15 -66
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +26 -36
- 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 +0 -4
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +5 -51
- 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.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +1 -1
- 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 +7 -16
- 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 -2
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +1 -4
- 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 +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -1
- 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/document-hashes.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +10 -97
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +6 -8
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +85 -68
- 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 +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +19 -26
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +3 -6
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +111 -263
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +1272 -1124
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +5 -5
- 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.d.ts +1 -44
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +47 -170
- 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.js +73 -73
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +2 -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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +2 -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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +1 -0
- 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 +53 -7
- 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.js +9 -12
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -1
- 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 -48
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +1 -520
- 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 -5
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +14 -14
- 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.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +111 -159
- 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.js +21 -21
- 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-wave.d.ts +0 -18
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +5 -27
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +45 -45
- 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/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +9 -227
- 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 +9 -50
- 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 +4 -42
- 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 +2 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +23 -63
- 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/resolve.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +43 -65
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/package.json +5 -2
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +238 -185
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +56 -73
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +189 -227
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +222 -278
- 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 +301 -301
- 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 -240
- 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 -318
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +128 -123
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +265 -265
- 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 -432
- 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 +304 -311
- 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 -189
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +144 -163
- 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 -116
- 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 -26
- 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 -127
- 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 +19 -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 -251
- 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 -107
- 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 +628 -755
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -453
- 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 -88
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +48 -48
- 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 -235
- 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 -106
- 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 -226
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +132 -143
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +436 -437
- 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 -121
- 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 -65
- 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 -64
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +32 -68
- 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 -47
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +255 -280
- 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 -394
- 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 -242
- 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 -473
- 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 -445
- 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 -263
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +203 -205
- 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 -390
- 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 -665
- 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 -223
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +464 -453
- 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 -279
- 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 -6
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +126 -240
- 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 -253
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.test.ts +80 -52
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +301 -352
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +70 -118
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +406 -416
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +198 -252
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -146
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +8 -9
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +60 -60
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +249 -256
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +139 -140
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +65 -66
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +249 -253
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +101 -96
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +314 -292
- 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 -306
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +95 -97
- 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 -523
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +738 -709
- 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 -450
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +316 -322
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2963 -2902
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5856 -5831
- 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 -360
- 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 -511
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +651 -851
- 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 -681
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1981 -1981
- 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 -56
- 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 -72
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +9 -12
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +137 -137
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -84
- 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 -506
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.test.ts → task-evidence-judgment.test.ts} +261 -261
- package/node_modules/@sdd-agent-platform/core/src/verification/{goal-verify.ts → task-evidence-judgment.ts} +619 -619
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +1190 -1190
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -106
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +513 -556
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +334 -334
- 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 -425
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +169 -507
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +136 -182
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +135 -174
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +153 -194
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +111 -115
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +95 -93
- 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 -224
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -158
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -77
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -114
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +969 -956
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +967 -992
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -712
- 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 +2 -2
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/commands/ai-tools.js +2 -13
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/{verifies.d.ts → artifact.d.ts} +1 -1
- 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.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 +127 -49
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/governance.js +1 -1
- package/packages/cli/dist/commands/governance.js.map +1 -1
- package/packages/cli/dist/commands/init.js +1 -6
- package/packages/cli/dist/commands/init.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 +63 -40
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +13 -52
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +60 -0
- package/packages/cli/dist/commands/stage-close.js +270 -41
- package/packages/cli/dist/commands/stage-close.js.map +1 -1
- package/packages/cli/dist/commands/status.js +9 -68
- 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 -26
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +153 -159
- package/packages/cli/dist/help.js.map +1 -1
- 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/doctor.js +1 -2
- package/packages/cli/dist/renderers/doctor.js.map +1 -1
- package/packages/cli/dist/renderers/execution.js +1 -1
- package/packages/cli/dist/renderers/execution.js.map +1 -1
- package/packages/cli/dist/renderers/json.d.ts +0 -1
- package/packages/cli/dist/renderers/json.js +0 -3
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +1 -2
- package/packages/cli/dist/renderers/registry-runtime.js +0 -20
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +1 -1
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +53 -0
- package/packages/cli/dist/renderers/workflow.js +93 -34
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +56 -73
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +9 -64
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +17 -26
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +8 -7
- package/packages/core/dist/config/init-project.js +8 -12
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +1 -1
- package/packages/core/dist/config/project-config.js +1 -1
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +3 -4
- package/packages/core/dist/config/starter-documents.js +377 -411
- 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 +18 -25
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +8 -26
- package/packages/core/dist/context/evidence-summary.js.map +1 -1
- package/packages/core/dist/context/log-worker.js +2 -2
- package/packages/core/dist/context/log-worker.js.map +1 -1
- package/packages/core/dist/context-offload/contracts.d.ts +1 -1
- package/packages/core/dist/contracts.d.ts +6 -1
- package/packages/core/dist/contracts.js +5 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +0 -3
- package/packages/core/dist/delegation/validation.d.ts +0 -3
- package/packages/core/dist/delegation/validation.js +4 -7
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +3 -13
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/local-run-index.js +1 -9
- package/packages/core/dist/doctor/checks/local-run-index.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +9 -9
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +1 -0
- package/packages/core/dist/doctor/checks/registries.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +4 -4
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-trust.js +24 -0
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +2 -2
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +43 -180
- 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 +7 -14
- package/packages/core/dist/evidence/lookup.js.map +1 -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/background-executor.js +4 -4
- package/packages/core/dist/execution/background-executor.js.map +1 -1
- package/packages/core/dist/execution/foreground-subagents.js +3 -3
- package/packages/core/dist/execution/foreground-subagents.js.map +1 -1
- package/packages/core/dist/execution/host-invocation.js +85 -86
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +2 -3
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.js +2 -2
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/packages/core/dist/governance/policy.d.ts +1 -1
- package/packages/core/dist/governance/policy.js +1 -1
- package/packages/core/dist/governance/policy.js.map +1 -1
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +31 -67
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.d.ts +0 -1
- package/packages/core/dist/lifecycle/ship.js +59 -85
- 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.d.ts +2 -12
- package/packages/core/dist/orchestration/runtime.js +32 -80
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +2 -5
- package/packages/core/dist/registries/agent-capability-catalog.js +27 -69
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +118 -34
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.js +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +8 -15
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/eval-learning-context.js +4 -4
- package/packages/core/dist/registries/eval-learning-context.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/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- 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 +4 -4
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-plugins.js +2 -2
- package/packages/core/dist/registries/tool-plugins.js.map +1 -1
- package/packages/core/dist/registries/worker-adapters.js +11 -11
- package/packages/core/dist/registries/worker-adapters.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.d.ts +1 -1
- package/packages/core/dist/registries/workflow-gates.js +21 -21
- 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/kernel.js +6 -6
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +11 -23
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.d.ts +2 -2
- package/packages/core/dist/risk/workflow-gates.js +18 -20
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +0 -2
- package/packages/core/dist/router/route-projection.js +1 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +16 -48
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.js +11 -1
- package/packages/core/dist/router/runtime-import.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +2 -2
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +2 -2
- package/packages/core/dist/router/stage-route-binding.js +20 -28
- package/packages/core/dist/router/stage-route-binding.js.map +1 -1
- package/packages/core/dist/router.d.ts +0 -1
- package/packages/core/dist/router.js +0 -1
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +6 -6
- package/packages/core/dist/run-state/artifacts.js +13 -124
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +2 -0
- package/packages/core/dist/run-state/inspect-run.js +5 -7
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +28 -28
- package/packages/core/dist/run-state/run-index.d.ts +3 -2
- package/packages/core/dist/run-state/run-index.js +15 -66
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +26 -36
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +0 -4
- package/packages/core/dist/run-state/task-evidence.js +5 -51
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- package/packages/core/dist/run-state.d.ts +0 -1
- package/packages/core/dist/run-state.js +0 -1
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +1 -1
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +7 -16
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -2
- package/packages/core/dist/runtime-paths.d.ts +0 -1
- package/packages/core/dist/runtime-paths.js +1 -4
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +2 -2
- package/packages/core/dist/runtime-projection-p0.js +11 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -1
- 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/document-hashes.d.ts +0 -2
- package/packages/core/dist/sdd-docs/document-hashes.js +10 -97
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +6 -8
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +5 -2
- package/packages/core/dist/sdd-docs/task-parser.js +85 -68
- 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 +2 -2
- package/packages/core/dist/stage-artifacts.js +19 -26
- package/packages/core/dist/stage-artifacts.js.map +1 -1
- package/packages/core/dist/stage-collaboration-contracts.d.ts +1 -1
- package/packages/core/dist/stage-collaboration-contracts.js +3 -6
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -1
- package/packages/core/dist/stage-collaboration.d.ts +111 -263
- package/packages/core/dist/stage-collaboration.js +1272 -1124
- package/packages/core/dist/stage-collaboration.js.map +1 -1
- package/packages/core/dist/stage-runtime/runtime.js +5 -5
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +1 -44
- package/packages/core/dist/status/project-status.js +47 -170
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.js +73 -73
- package/packages/core/dist/subagents/contracts.d.ts +1 -1
- package/packages/core/dist/subagents/runtime.js +7 -7
- package/packages/core/dist/subagents/runtime.js.map +1 -1
- package/packages/core/dist/sync-back/apply.d.ts +1 -0
- package/packages/core/dist/sync-back/apply.js +2 -0
- package/packages/core/dist/sync-back/apply.js.map +1 -0
- package/packages/core/dist/sync-back/inspect.d.ts +1 -0
- package/packages/core/dist/sync-back/inspect.js +2 -0
- package/packages/core/dist/sync-back/inspect.js.map +1 -0
- package/packages/core/dist/sync-back.d.ts +1 -0
- package/packages/core/dist/sync-back.js +2 -0
- package/packages/core/dist/sync-back.js.map +1 -0
- 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 +53 -7
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.js +9 -12
- package/packages/core/dist/truth-reconciliation.js.map +1 -1
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -48
- package/packages/core/dist/verification/goal-verify.js +1 -520
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +5 -5
- package/packages/core/dist/verification/rendering.js +14 -14
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.d.ts +1 -0
- package/packages/core/dist/verification/single-task-loop.js +111 -159
- 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.js +21 -21
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-wave.d.ts +0 -18
- package/packages/core/dist/verification/validation-wave.js +5 -27
- package/packages/core/dist/verification/validation-wave.js.map +1 -1
- package/packages/core/dist/verification/verify-contract.js +45 -45
- 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/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +9 -227
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +9 -50
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +4 -42
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +2 -3
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +2 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.js +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +1 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +23 -63
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/packages/core/dist/workflow-state/resolve.d.ts +2 -2
- package/packages/core/dist/workflow-state/resolve.js +43 -65
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/package.json +5 -2
- package/tsconfig.build.json +6 -7
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +0 -269
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +0 -492
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +0 -383
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +0 -188
- package/packages/cli/dist/commands/lifecycle.d.ts +0 -6
- package/packages/cli/dist/commands/lifecycle.js +0 -125
- package/packages/cli/dist/commands/lifecycle.js.map +0 -1
- package/packages/cli/dist/commands/test.d.ts +0 -6
- package/packages/cli/dist/commands/test.js +0 -373
- package/packages/cli/dist/commands/test.js.map +0 -1
- package/packages/cli/dist/commands/verifies.js +0 -87
- 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 -330
- package/packages/cli/dist/commands/verify.js.map +0 -1
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { evaluateLifecycleDecisionGate, recordLifecycleDecision } from '@sdd-agent-platform/core/lifecycle';
|
|
3
|
-
import { renderLifecycleDecisionGate } from '@sdd-agent-platform/core/lifecycle';
|
|
4
|
-
import { extractLifecycleRiskSignalsFromText } from '@sdd-agent-platform/core/lifecycle';
|
|
5
|
-
import { parseSddBranch } from '@sdd-agent-platform/core/sdd-docs';
|
|
6
|
-
import { evaluateLifecycleRiskDecisionForModel, recordLifecycleRiskDecisionProjection } from '@sdd-agent-platform/core/risk';
|
|
7
|
-
import { readOption, readRepeatedOptions } from '../options.js';
|
|
8
|
-
import { renderLifecycleRiskExtraction } from '../renderers/lifecycle.js';
|
|
9
|
-
export async function handleLifecycleCommand(projectRoot, command, subcommand, rest) {
|
|
10
|
-
if (command !== 'lifecycle' || subcommand !== 'decide') {
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
const lifecycleInput = await readLifecycleSignalOptions(rest);
|
|
14
|
-
if (lifecycleInput.error) {
|
|
15
|
-
return {
|
|
16
|
-
exitCode: 2,
|
|
17
|
-
error: lifecycleInput.error
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
const result = evaluateLifecycleDecisionGate(lifecycleInput.signals);
|
|
21
|
-
const runId = readOption(rest, '--run');
|
|
22
|
-
const branch = readOption(rest, '--branch');
|
|
23
|
-
if (runId) {
|
|
24
|
-
await recordLifecycleDecision(projectRoot, runId, result.record);
|
|
25
|
-
}
|
|
26
|
-
const lifecycleRiskProjection = branch ? await refreshLifecycleRiskProjection(projectRoot, branch) : null;
|
|
27
|
-
const json = rest.includes('--json');
|
|
28
|
-
return {
|
|
29
|
-
exitCode: 0,
|
|
30
|
-
output: json
|
|
31
|
-
? JSON.stringify({ riskExtraction: lifecycleInput.riskExtraction, ...result, recordedRunId: runId ?? null, lifecycleRiskProjection }, null, 2)
|
|
32
|
-
: `${renderLifecycleRiskExtraction(lifecycleInput.riskExtraction)}${renderLifecycleDecisionGate(result)}${runId ? `\nrecorded_run=${runId}` : ''}${lifecycleRiskProjection ? `\nlifecycle_risk_projection=${lifecycleRiskProjection.id} status=${lifecycleRiskProjection.status}` : ''}`
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
async function refreshLifecycleRiskProjection(projectRoot, branch) {
|
|
36
|
-
const model = await parseSddBranch(projectRoot, branch);
|
|
37
|
-
const write = await recordLifecycleRiskDecisionProjection(projectRoot, evaluateLifecycleRiskDecisionForModel(branch, model));
|
|
38
|
-
return {
|
|
39
|
-
id: write.envelope.id,
|
|
40
|
-
status: write.status,
|
|
41
|
-
inputHash: write.envelope.inputHash
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
async function readLifecycleSignalOptions(args) {
|
|
45
|
-
const directSafe = args.includes('--direct-safe');
|
|
46
|
-
const riskTags = readRepeatedOptions(args, '--risk');
|
|
47
|
-
const contracts = readRepeatedOptions(args, '--contract');
|
|
48
|
-
const permissions = readRepeatedOptions(args, '--permission');
|
|
49
|
-
const fromText = readOption(args, '--from-text');
|
|
50
|
-
const fromFile = readOption(args, '--from-file');
|
|
51
|
-
if (fromText && fromFile) {
|
|
52
|
-
return { signals: {}, riskExtraction: null, error: 'Usage: sdd lifecycle decide accepts only one of --from-text or --from-file' };
|
|
53
|
-
}
|
|
54
|
-
const riskExtraction = fromText
|
|
55
|
-
? extractLifecycleRiskSignalsFromText(fromText, 'from_text')
|
|
56
|
-
: fromFile
|
|
57
|
-
? extractLifecycleRiskSignalsFromText(await readFile(fromFile, 'utf8'), 'from_file')
|
|
58
|
-
: null;
|
|
59
|
-
const extracted = riskExtraction?.signals ?? {};
|
|
60
|
-
const signals = {
|
|
61
|
-
intent_clarity: directSafe ? 'high' : readSignalClarity(args, '--intent') ?? 'medium',
|
|
62
|
-
acceptance_clarity: directSafe ? 'high' : readSignalClarity(args, '--acceptance') ?? 'medium',
|
|
63
|
-
estimated_change_size: directSafe ? 'tiny' : readEstimatedChangeSize(args, '--size') ?? 'small',
|
|
64
|
-
task_count_estimate: Number(readOption(args, '--tasks') ?? (directSafe ? '1' : '1')),
|
|
65
|
-
file_count_estimate: Number(readOption(args, '--files') ?? (directSafe ? '1' : '1')),
|
|
66
|
-
affected_layers: readRepeatedOptions(args, '--layer'),
|
|
67
|
-
affected_contracts: uniqueCliStrings([...contracts, ...(extracted.affected_contracts ?? [])]),
|
|
68
|
-
dependency_fanout: readDependencyFanout(args, '--fanout') ?? 'local',
|
|
69
|
-
impact_confidence: directSafe ? 'high' : extracted.impact_confidence ?? readImpactConfidence(args, '--impact-confidence') ?? 'medium',
|
|
70
|
-
risk_tags: uniqueCliStrings([...riskTags, ...(extracted.risk_tags ?? [])]),
|
|
71
|
-
reversibility: directSafe ? 'reversible' : extracted.reversibility ?? readReversibility(args, '--reversibility') ?? 'unknown',
|
|
72
|
-
validation_clarity: directSafe ? 'clear' : extracted.validation_clarity ?? readValidationClarity(args, '--validation') ?? 'partial',
|
|
73
|
-
validation_available: directSafe || args.includes('--validation-available'),
|
|
74
|
-
validation_cost: directSafe ? 'cheap' : readValidationCost(args, '--validation-cost') ?? 'unknown',
|
|
75
|
-
policy_hits: readRepeatedOptions(args, '--policy'),
|
|
76
|
-
permission_required: permissions,
|
|
77
|
-
requires_agents: args.includes('--requires-agents'),
|
|
78
|
-
handoff_count: Number(readOption(args, '--handoffs') ?? '0'),
|
|
79
|
-
artifact_dependency: args.includes('--artifact-dependency'),
|
|
80
|
-
runtime_recovery_need: args.includes('--runtime-recovery'),
|
|
81
|
-
orchestration_uncertainty: directSafe ? 'low' : readOrchestrationUncertainty(args, '--orchestration') ?? 'medium',
|
|
82
|
-
human_checkpoint_required: args.includes('--checkpoint'),
|
|
83
|
-
approval_reason: readRepeatedOptions(args, '--approval-reason'),
|
|
84
|
-
source_artifacts: uniqueCliStrings([...readRepeatedOptions(args, '--source-artifact'), ...(fromFile ? [fromFile] : [])]),
|
|
85
|
-
can_scout_impact: !args.includes('--cannot-scout-impact'),
|
|
86
|
-
architecture_decision_required: args.includes('--architecture') || Boolean(extracted.architecture_decision_required),
|
|
87
|
-
external_unknown: args.includes('--external-unknown') || Boolean(extracted.external_unknown)
|
|
88
|
-
};
|
|
89
|
-
return { signals, riskExtraction };
|
|
90
|
-
}
|
|
91
|
-
function uniqueCliStrings(values) {
|
|
92
|
-
return Array.from(new Set(values.filter((value) => value.length > 0)));
|
|
93
|
-
}
|
|
94
|
-
function readSignalClarity(args, name) {
|
|
95
|
-
const value = readOption(args, name);
|
|
96
|
-
return value === 'high' || value === 'medium' || value === 'low' ? value : null;
|
|
97
|
-
}
|
|
98
|
-
function readEstimatedChangeSize(args, name) {
|
|
99
|
-
const value = readOption(args, name);
|
|
100
|
-
return value === 'tiny' || value === 'small' || value === 'medium' || value === 'large' ? value : null;
|
|
101
|
-
}
|
|
102
|
-
function readImpactConfidence(args, name) {
|
|
103
|
-
return readSignalClarity(args, name);
|
|
104
|
-
}
|
|
105
|
-
function readValidationClarity(args, name) {
|
|
106
|
-
const value = readOption(args, name);
|
|
107
|
-
return value === 'clear' || value === 'partial' || value === 'unclear' ? value : null;
|
|
108
|
-
}
|
|
109
|
-
function readValidationCost(args, name) {
|
|
110
|
-
const value = readOption(args, name);
|
|
111
|
-
return value === 'cheap' || value === 'moderate' || value === 'expensive' || value === 'unknown' ? value : null;
|
|
112
|
-
}
|
|
113
|
-
function readDependencyFanout(args, name) {
|
|
114
|
-
const value = readOption(args, name);
|
|
115
|
-
return value === 'none' || value === 'local' || value === 'multi_component' || value === 'unknown' ? value : null;
|
|
116
|
-
}
|
|
117
|
-
function readReversibility(args, name) {
|
|
118
|
-
const value = readOption(args, name);
|
|
119
|
-
return value === 'reversible' || value === 'irreversible' || value === 'unknown' ? value : null;
|
|
120
|
-
}
|
|
121
|
-
function readOrchestrationUncertainty(args, name) {
|
|
122
|
-
const value = readOption(args, name);
|
|
123
|
-
return value === 'low' || value === 'medium' || value === 'high' ? value : null;
|
|
124
|
-
}
|
|
125
|
-
//# sourceMappingURL=lifecycle.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lifecycle.js","sourceRoot":"","sources":["../../src/commands/lifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,6BAA6B,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAC5G,OAAO,EAAE,2BAA2B,EAAE,MAAM,oCAAoC,CAAC;AACjF,OAAO,EAAE,mCAAmC,EAAmE,MAAM,oCAAoC,CAAC;AAC1J,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,qCAAqC,EAAE,qCAAqC,EAAE,MAAM,+BAA+B,CAAC;AAC7H,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,2BAA2B,CAAC;AAQ1E,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAAC,WAAmB,EAAE,OAA2B,EAAE,UAA8B,E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KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAClG,CAAC;AAED,SAAS,4BAA4B,CAAC,IAAc,EAAE,IAAY;IAChE,MAAM,KAAK,GAAG,UAAU,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACrC,OAAO,KAAK,KAAK,KAAK,IAAI,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC"}
|
|
@@ -1,373 +0,0 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
|
-
import { listVerifyValidationUnits, renderSddTestResult, renderValidationWaveResult, runSddTest, runValidationWave } from '@sdd-agent-platform/core/verification';
|
|
4
|
-
import { parseSddBranch } from '@sdd-agent-platform/core/sdd-docs';
|
|
5
|
-
import { readBranchOption, readOptionalPositionalArgument, readResolvedBranch } from '../args.js';
|
|
6
|
-
import { hasHelpFlag, hasPreflightFlag, readOption, readPositiveIntegerOption, readRepeatedOptions } from '../options.js';
|
|
7
|
-
import { jsonOutput, wantsJson } from '../renderers/json.js';
|
|
8
|
-
export async function handleTestCommand(projectRoot, command, subcommand, rest) {
|
|
9
|
-
if (command !== 'test') {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
if (hasHelpFlag([subcommand, ...rest].filter((item) => Boolean(item)))) {
|
|
13
|
-
return {
|
|
14
|
-
exitCode: 0,
|
|
15
|
-
output: testUsage()
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
if (subcommand === 'wave') {
|
|
19
|
-
return handleTestWaveCommand(projectRoot, rest);
|
|
20
|
-
}
|
|
21
|
-
if (subcommand === 'batch') {
|
|
22
|
-
return handleTestBatchCommand(projectRoot, rest);
|
|
23
|
-
}
|
|
24
|
-
if (subcommand !== 'task') {
|
|
25
|
-
if (subcommand && !subcommand.startsWith('--')) {
|
|
26
|
-
return handleTestValidationUnitCommand(projectRoot, subcommand, rest);
|
|
27
|
-
}
|
|
28
|
-
return {
|
|
29
|
-
exitCode: 2,
|
|
30
|
-
error: testUsage()
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
const passthroughIndex = rest.indexOf('--');
|
|
34
|
-
const cliArgs = passthroughIndex === -1 ? rest : rest.slice(0, passthroughIndex);
|
|
35
|
-
const passthroughArgv = passthroughIndex === -1 ? [] : rest.slice(passthroughIndex + 1);
|
|
36
|
-
const taskId = readOptionalPositionalArgument(cliArgs);
|
|
37
|
-
if (!taskId) {
|
|
38
|
-
return {
|
|
39
|
-
exitCode: 2,
|
|
40
|
-
error: testTaskUsage()
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
if (hasPreflightFlag(cliArgs)) {
|
|
44
|
-
return {
|
|
45
|
-
exitCode: 0,
|
|
46
|
-
output: wantsJson(cliArgs) ? jsonOutput({ contract: 'sdd-command-preflight-v1', command: 'test task', taskId, sideEffects: 'none', status: 'PASS' }, cliArgs) : `SDD command preflight PASS\ncommand=test task\ntask=${taskId}\nside_effects=none`
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
const branch = readBranchOption(cliArgs);
|
|
50
|
-
const explicitSingleTaskOverride = hasSingleTaskOverride(cliArgs, passthroughArgv);
|
|
51
|
-
if (!explicitSingleTaskOverride) {
|
|
52
|
-
const model = await parseSddBranch(projectRoot, await readResolvedBranch(projectRoot, cliArgs));
|
|
53
|
-
const task = model.tasks.find((candidate) => candidate.id === taskId) ?? null;
|
|
54
|
-
if (task && shouldValidateAsGroupedBoundary(task)) {
|
|
55
|
-
const result = await runValidationWave(projectRoot, {
|
|
56
|
-
branch,
|
|
57
|
-
batchId: task.validationTiming === 'batch_end' ? task.validationBatch ?? undefined : undefined,
|
|
58
|
-
wave: task.validationTiming === 'wave_end' ? task.wave ?? undefined : undefined,
|
|
59
|
-
timeoutMs: readPositiveIntegerOption(cliArgs, '--timeout-ms') ?? undefined,
|
|
60
|
-
approved: cliArgs.includes('--approved')
|
|
61
|
-
});
|
|
62
|
-
return {
|
|
63
|
-
exitCode: result.status === 'PASS' ? 0 : 1,
|
|
64
|
-
output: wantsJson(cliArgs) ? jsonOutput(result, cliArgs) : renderValidationWaveResult(result)
|
|
65
|
-
};
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
let commandInputs;
|
|
69
|
-
try {
|
|
70
|
-
commandInputs = await readCommandInputs(projectRoot, cliArgs, passthroughArgv);
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
return {
|
|
74
|
-
exitCode: 2,
|
|
75
|
-
error: error instanceof Error ? error.message : String(error)
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
const result = await runSddTest(projectRoot, {
|
|
79
|
-
taskId,
|
|
80
|
-
branch,
|
|
81
|
-
runId: readOption(cliArgs, '--run') ?? undefined,
|
|
82
|
-
commands: readRepeatedOptions(cliArgs, '--command'),
|
|
83
|
-
commandInputs,
|
|
84
|
-
timeoutMs: readPositiveIntegerOption(cliArgs, '--timeout-ms') ?? undefined,
|
|
85
|
-
approved: cliArgs.includes('--approved')
|
|
86
|
-
});
|
|
87
|
-
return {
|
|
88
|
-
exitCode: result.status === 'PASS' ? 0 : 1,
|
|
89
|
-
output: wantsJson(cliArgs) ? jsonOutput(result, cliArgs) : renderSddTestResult(result)
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
|
-
async function handleTestWaveCommand(projectRoot, rest) {
|
|
93
|
-
if (hasPreflightFlag(rest)) {
|
|
94
|
-
return {
|
|
95
|
-
exitCode: 0,
|
|
96
|
-
output: wantsJson(rest) ? jsonOutput({ contract: 'sdd-command-preflight-v1', command: 'test wave', sideEffects: 'none', status: 'PASS' }, rest) : 'SDD command preflight PASS\ncommand=test wave\nside_effects=none'
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
const result = await runValidationWave(projectRoot, {
|
|
100
|
-
branch: readBranchOption(rest),
|
|
101
|
-
wave: readPositiveIntegerOption(rest, '--wave') ?? undefined,
|
|
102
|
-
taskIds: readRepeatedOptions(rest, '--task'),
|
|
103
|
-
timeoutMs: readPositiveIntegerOption(rest, '--timeout-ms') ?? undefined,
|
|
104
|
-
approved: rest.includes('--approved')
|
|
105
|
-
});
|
|
106
|
-
return {
|
|
107
|
-
exitCode: result.status === 'PASS' ? 0 : 1,
|
|
108
|
-
output: wantsJson(rest) ? jsonOutput(result, rest) : renderValidationWaveResult(result)
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
async function handleTestBatchCommand(projectRoot, rest) {
|
|
112
|
-
const batchId = readOptionalPositionalArgument(rest);
|
|
113
|
-
if (!batchId) {
|
|
114
|
-
return {
|
|
115
|
-
exitCode: 2,
|
|
116
|
-
error: testBatchUsage()
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
if (hasPreflightFlag(rest)) {
|
|
120
|
-
return {
|
|
121
|
-
exitCode: 0,
|
|
122
|
-
output: wantsJson(rest) ? jsonOutput({ contract: 'sdd-command-preflight-v1', command: 'test batch', batchId, sideEffects: 'none', status: 'PASS' }, rest) : `SDD command preflight PASS\ncommand=test batch\nbatch=${batchId}\nside_effects=none`
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
const result = await runValidationWave(projectRoot, {
|
|
126
|
-
branch: readBranchOption(rest),
|
|
127
|
-
batchId,
|
|
128
|
-
timeoutMs: readPositiveIntegerOption(rest, '--timeout-ms') ?? undefined,
|
|
129
|
-
approved: rest.includes('--approved')
|
|
130
|
-
});
|
|
131
|
-
return {
|
|
132
|
-
exitCode: result.status === 'PASS' ? 0 : 1,
|
|
133
|
-
output: wantsJson(rest) ? jsonOutput(result, rest) : renderValidationWaveResult(result)
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
async function handleTestValidationUnitCommand(projectRoot, validationInput, rest) {
|
|
137
|
-
const validationInputs = splitCommaSeparatedInputs(validationInput);
|
|
138
|
-
if (validationInputs.length === 0) {
|
|
139
|
-
return {
|
|
140
|
-
exitCode: 2,
|
|
141
|
-
error: testValidationUnitUsage()
|
|
142
|
-
};
|
|
143
|
-
}
|
|
144
|
-
if (validationInputs.length > 1) {
|
|
145
|
-
return handleTestValidationUnitBatchCommand(projectRoot, validationInputs, rest);
|
|
146
|
-
}
|
|
147
|
-
const binding = await resolveTestValidationUnitBinding(projectRoot, validationInputs[0], rest);
|
|
148
|
-
const preflight = testValidationUnitPreflight(binding);
|
|
149
|
-
if (hasPreflightFlag(rest) || binding.blockers.length > 0) {
|
|
150
|
-
return {
|
|
151
|
-
exitCode: preflight.status === 'PASS' ? 0 : 1,
|
|
152
|
-
output: wantsJson(rest) ? jsonOutput(preflight, rest) : renderTestValidationUnitPreflight(preflight)
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
const unit = binding.unit;
|
|
156
|
-
if (!unit) {
|
|
157
|
-
return {
|
|
158
|
-
exitCode: 1,
|
|
159
|
-
output: wantsJson(rest) ? jsonOutput(preflight, rest) : renderTestValidationUnitPreflight(preflight)
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
const result = await runValidationWave(projectRoot, {
|
|
163
|
-
branch: readBranchOption(rest),
|
|
164
|
-
batchId: unit.validationUnitId,
|
|
165
|
-
timeoutMs: readPositiveIntegerOption(rest, '--timeout-ms') ?? undefined,
|
|
166
|
-
approved: rest.includes('--approved')
|
|
167
|
-
});
|
|
168
|
-
return {
|
|
169
|
-
exitCode: result.status === 'PASS' ? 0 : 1,
|
|
170
|
-
output: wantsJson(rest) ? jsonOutput(result, rest) : renderValidationWaveResult(result)
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
async function handleTestValidationUnitBatchCommand(projectRoot, validationInputs, rest) {
|
|
174
|
-
const bindings = await Promise.all(validationInputs.map((validationInput) => resolveTestValidationUnitBinding(projectRoot, validationInput, rest)));
|
|
175
|
-
const blockers = bindings.flatMap((binding) => binding.blockers.map((blocker) => `${binding.requestedTarget}: ${blocker}`));
|
|
176
|
-
const preflight = testValidationUnitBatchPreflight(validationInputs, bindings, blockers);
|
|
177
|
-
if (hasPreflightFlag(rest) || blockers.length > 0) {
|
|
178
|
-
return {
|
|
179
|
-
exitCode: preflight.status === 'PASS' ? 0 : 1,
|
|
180
|
-
output: wantsJson(rest) ? jsonOutput(preflight, rest) : renderTestValidationUnitBatchPreflight(preflight)
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
const results = [];
|
|
184
|
-
for (const binding of bindings) {
|
|
185
|
-
results.push(await runValidationWave(projectRoot, {
|
|
186
|
-
branch: readBranchOption(rest),
|
|
187
|
-
batchId: binding.unit?.validationUnitId,
|
|
188
|
-
timeoutMs: readPositiveIntegerOption(rest, '--timeout-ms') ?? undefined,
|
|
189
|
-
approved: rest.includes('--approved')
|
|
190
|
-
}));
|
|
191
|
-
}
|
|
192
|
-
const payload = testValidationUnitBatchJsonPayload(validationInputs, bindings, results);
|
|
193
|
-
return {
|
|
194
|
-
exitCode: payload.status === 'PASS' ? 0 : 1,
|
|
195
|
-
output: wantsJson(rest) ? jsonOutput(payload, rest) : results.map(renderValidationWaveResult).join('\n\n---\n\n')
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function testValidationUnitBatchPreflight(validationInputs, bindings, blockers) {
|
|
199
|
-
return {
|
|
200
|
-
contract: 'sdd-command-preflight-v1',
|
|
201
|
-
command: 'test validation-unit',
|
|
202
|
-
requestedTargets: validationInputs,
|
|
203
|
-
validationUnitIds: bindings.map((binding) => binding.validationUnitId),
|
|
204
|
-
bindings: bindings.flatMap((binding) => binding.source && binding.unit ? [{
|
|
205
|
-
requestedTarget: binding.requestedTarget,
|
|
206
|
-
validationUnitId: binding.validationUnitId,
|
|
207
|
-
source: binding.source,
|
|
208
|
-
taskIds: binding.unit.taskIds
|
|
209
|
-
}] : []),
|
|
210
|
-
sideEffects: 'none',
|
|
211
|
-
status: blockers.length > 0 ? 'BLOCKED' : 'PASS',
|
|
212
|
-
blockers
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
function testValidationUnitBatchJsonPayload(validationInputs, bindings, results) {
|
|
216
|
-
return {
|
|
217
|
-
contract: 'sdd-test-validation-unit-batch-cli-result-v1',
|
|
218
|
-
requestedTargets: validationInputs,
|
|
219
|
-
validationUnitIds: bindings.map((binding) => binding.validationUnitId),
|
|
220
|
-
status: results.every((result) => result.status === 'PASS') ? 'PASS' : 'FAIL',
|
|
221
|
-
results
|
|
222
|
-
};
|
|
223
|
-
}
|
|
224
|
-
function renderTestValidationUnitBatchPreflight(preflight) {
|
|
225
|
-
const bindings = preflight.bindings.length > 0 ? `\nbindings:\n${preflight.bindings.map((binding) => `- ${binding.source}:${binding.requestedTarget}->${binding.validationUnitId} tasks=${binding.taskIds.join(',')}`).join('\n')}` : '';
|
|
226
|
-
const blockers = preflight.blockers.length > 0 ? `\nblockers=${preflight.blockers.length}\n${preflight.blockers.map((blocker) => `- ${blocker}`).join('\n')}` : '';
|
|
227
|
-
return `SDD command preflight ${preflight.status}\ncommand=${preflight.command}\nvalidation_units=${preflight.validationUnitIds.join(',')}${bindings}\nside_effects=${preflight.sideEffects}${blockers}`;
|
|
228
|
-
}
|
|
229
|
-
async function resolveTestValidationUnitBinding(projectRoot, validationInput, args) {
|
|
230
|
-
const branch = await readResolvedBranch(projectRoot, args);
|
|
231
|
-
const model = await parseSddBranch(projectRoot, branch);
|
|
232
|
-
const verifyUnits = await listVerifyValidationUnits(projectRoot, { branch });
|
|
233
|
-
const verifyBlockers = verifyUnits.verifyContract.status === 'PASS' ? [] : [`verify.md contract is ${verifyUnits.verifyContract.status}; run /sdd:tasks before /sdd:test.`];
|
|
234
|
-
const taskById = new Map(model.tasks.map((task) => [task.id, task]));
|
|
235
|
-
const units = verifyUnits.units.map((unit) => ({
|
|
236
|
-
...unit,
|
|
237
|
-
tasks: unit.taskIds.map((taskId) => taskById.get(taskId)).filter((task) => Boolean(task))
|
|
238
|
-
}));
|
|
239
|
-
const normalizedInput = normalizeBindingText(validationInput);
|
|
240
|
-
const byUnitId = units.filter((unit) => normalizeBindingText(unit.validationUnitId) === normalizedInput);
|
|
241
|
-
if (byUnitId.length === 1) {
|
|
242
|
-
return boundTestValidationUnit(validationInput, byUnitId[0], 'unit_id', verifyBlockers);
|
|
243
|
-
}
|
|
244
|
-
if (byUnitId.length > 1) {
|
|
245
|
-
return ambiguousTestValidationUnit(validationInput, byUnitId, verifyBlockers);
|
|
246
|
-
}
|
|
247
|
-
const byTaskId = units.filter((unit) => unit.taskIds.some((taskId) => normalizeBindingText(taskId) === normalizedInput));
|
|
248
|
-
if (byTaskId.length === 1) {
|
|
249
|
-
return boundTestValidationUnit(validationInput, byTaskId[0], 'task_id', verifyBlockers);
|
|
250
|
-
}
|
|
251
|
-
if (byTaskId.length > 1) {
|
|
252
|
-
return ambiguousTestValidationUnit(validationInput, byTaskId, verifyBlockers);
|
|
253
|
-
}
|
|
254
|
-
const byTaskTitle = units.filter((unit) => unit.tasks.some((task) => task.title && normalizeBindingText(task.title) === normalizedInput));
|
|
255
|
-
if (byTaskTitle.length === 1) {
|
|
256
|
-
return boundTestValidationUnit(validationInput, byTaskTitle[0], 'task_title', verifyBlockers);
|
|
257
|
-
}
|
|
258
|
-
if (byTaskTitle.length > 1) {
|
|
259
|
-
return ambiguousTestValidationUnit(validationInput, byTaskTitle, verifyBlockers);
|
|
260
|
-
}
|
|
261
|
-
const partialMatches = units.filter((unit) => validationUnitSearchText(unit).includes(normalizedInput));
|
|
262
|
-
if (partialMatches.length === 1) {
|
|
263
|
-
return boundTestValidationUnit(validationInput, partialMatches[0], 'partial', verifyBlockers);
|
|
264
|
-
}
|
|
265
|
-
if (partialMatches.length > 1) {
|
|
266
|
-
return ambiguousTestValidationUnit(validationInput, partialMatches, verifyBlockers);
|
|
267
|
-
}
|
|
268
|
-
return { requestedTarget: validationInput, validationUnitId: validationInput, unit: null, source: null, blockers: [...verifyBlockers, `Validation unit ${validationInput} was not found.`] };
|
|
269
|
-
}
|
|
270
|
-
function validationUnitSearchText(unit) {
|
|
271
|
-
return normalizeBindingText([unit.validationUnitId, ...unit.tasks.flatMap((task) => [task.id, task.title ?? ''])].join(' '));
|
|
272
|
-
}
|
|
273
|
-
function boundTestValidationUnit(requestedTarget, unit, source, blockers = []) {
|
|
274
|
-
return { requestedTarget, validationUnitId: unit.validationUnitId, unit, source, blockers };
|
|
275
|
-
}
|
|
276
|
-
function ambiguousTestValidationUnit(requestedTarget, units, blockers = []) {
|
|
277
|
-
return {
|
|
278
|
-
requestedTarget,
|
|
279
|
-
validationUnitId: requestedTarget,
|
|
280
|
-
unit: null,
|
|
281
|
-
source: null,
|
|
282
|
-
blockers: [...blockers, `Validation unit ${requestedTarget} is ambiguous: ${units.map((unit) => unit.validationUnitId).join(', ')}.`]
|
|
283
|
-
};
|
|
284
|
-
}
|
|
285
|
-
function testValidationUnitPreflight(binding) {
|
|
286
|
-
return {
|
|
287
|
-
contract: 'sdd-command-preflight-v1',
|
|
288
|
-
command: 'test validation-unit',
|
|
289
|
-
requestedTarget: binding.requestedTarget,
|
|
290
|
-
validationUnitId: binding.validationUnitId,
|
|
291
|
-
binding: binding.source && binding.unit ? { source: binding.source, taskIds: binding.unit.taskIds } : null,
|
|
292
|
-
sideEffects: 'none',
|
|
293
|
-
status: binding.blockers.length > 0 ? 'BLOCKED' : 'PASS',
|
|
294
|
-
blockers: binding.blockers
|
|
295
|
-
};
|
|
296
|
-
}
|
|
297
|
-
function splitCommaSeparatedInputs(value) {
|
|
298
|
-
return [...new Set(value.split(',').map((item) => item.trim()).filter((item) => item.length > 0))];
|
|
299
|
-
}
|
|
300
|
-
function renderTestValidationUnitPreflight(preflight) {
|
|
301
|
-
const binding = preflight.binding ? `\nbinding=${preflight.binding.source}:${preflight.requestedTarget}->${preflight.validationUnitId}\ntasks=${preflight.binding.taskIds.join(',')}` : '';
|
|
302
|
-
const blockers = preflight.blockers.length > 0 ? `\nblockers=${preflight.blockers.length}\n${preflight.blockers.map((blocker) => `- ${blocker}`).join('\n')}` : '';
|
|
303
|
-
return `SDD command preflight ${preflight.status}\ncommand=${preflight.command}\nvalidation_unit=${preflight.validationUnitId}${binding}\nside_effects=${preflight.sideEffects}${blockers}`;
|
|
304
|
-
}
|
|
305
|
-
function normalizeBindingText(value) {
|
|
306
|
-
return value.trim().replace(/\s+/g, ' ').toLowerCase();
|
|
307
|
-
}
|
|
308
|
-
function hasSingleTaskOverride(cliArgs, passthroughArgv) {
|
|
309
|
-
return Boolean(readOption(cliArgs, '--run')
|
|
310
|
-
|| readRepeatedOptions(cliArgs, '--command').length > 0
|
|
311
|
-
|| readRepeatedOptions(cliArgs, '--command-json').length > 0
|
|
312
|
-
|| readRepeatedOptions(cliArgs, '--command-file').length > 0
|
|
313
|
-
|| passthroughArgv.length > 0);
|
|
314
|
-
}
|
|
315
|
-
function shouldValidateAsGroupedBoundary(task) {
|
|
316
|
-
return Boolean(task.validationBatch && !task.requiresVerifyBeforeNext && (task.validationTiming === 'batch_end' || task.validationTiming === 'wave_end'));
|
|
317
|
-
}
|
|
318
|
-
async function readCommandInputs(projectRoot, cliArgs, passthroughArgv) {
|
|
319
|
-
const commandInputs = readRepeatedOptions(cliArgs, '--command').map((command) => ({ command }));
|
|
320
|
-
const commandJsonValues = readRepeatedOptions(cliArgs, '--command-json');
|
|
321
|
-
for (const raw of commandJsonValues) {
|
|
322
|
-
commandInputs.push(...parseCommandInputJson(raw));
|
|
323
|
-
}
|
|
324
|
-
const commandFiles = readRepeatedOptions(cliArgs, '--command-file');
|
|
325
|
-
for (const file of commandFiles) {
|
|
326
|
-
const absolutePath = path.isAbsolute(file) ? file : path.resolve(projectRoot, file);
|
|
327
|
-
commandInputs.push(...parseCommandInputJson(await readFile(absolutePath, 'utf8')));
|
|
328
|
-
}
|
|
329
|
-
if (passthroughArgv.length > 0) {
|
|
330
|
-
commandInputs.push({ argv: passthroughArgv });
|
|
331
|
-
}
|
|
332
|
-
return commandInputs;
|
|
333
|
-
}
|
|
334
|
-
function parseCommandInputJson(raw) {
|
|
335
|
-
const parsed = JSON.parse(raw);
|
|
336
|
-
const items = Array.isArray(parsed) && parsed.every((item) => typeof item === 'object' && item !== null && ('command' in item || 'argv' in item)) ? parsed : [parsed];
|
|
337
|
-
return items.map(parseCommandInputValue);
|
|
338
|
-
}
|
|
339
|
-
function parseCommandInputValue(value) {
|
|
340
|
-
if (typeof value === 'string') {
|
|
341
|
-
return { command: value };
|
|
342
|
-
}
|
|
343
|
-
if (!value || typeof value !== 'object') {
|
|
344
|
-
throw new Error('Command JSON must be a string, an object, or an array of command objects.');
|
|
345
|
-
}
|
|
346
|
-
const record = value;
|
|
347
|
-
if (record.argv !== undefined) {
|
|
348
|
-
if (!Array.isArray(record.argv) || !record.argv.every((item) => typeof item === 'string')) {
|
|
349
|
-
throw new Error('Command JSON argv must be an array of strings.');
|
|
350
|
-
}
|
|
351
|
-
return { argv: record.argv };
|
|
352
|
-
}
|
|
353
|
-
if (typeof record.command === 'string') {
|
|
354
|
-
return { command: record.command };
|
|
355
|
-
}
|
|
356
|
-
throw new Error('Command JSON object must include command or argv.');
|
|
357
|
-
}
|
|
358
|
-
function testUsage() {
|
|
359
|
-
return `${testValidationUnitUsage()}\n${testTaskUsage()}\n${testWaveUsage()}\n${testBatchUsage()}`;
|
|
360
|
-
}
|
|
361
|
-
function testValidationUnitUsage() {
|
|
362
|
-
return 'Usage: sdd test <validation_unit_id-or-validation_text>[,<validation_unit_id-or-validation_text>...] [--branch <branch>] [--approved] [--timeout-ms <ms>] [--preflight] [--json]';
|
|
363
|
-
}
|
|
364
|
-
function testTaskUsage() {
|
|
365
|
-
return 'Usage: sdd test task <task_id> [--branch <branch>] [--run <run_id>] [--approved] [--command <command>] [--command-json <json>] [--command-file <path>] [--timeout-ms <ms>] [--preflight] [--json] [-- <executable> [...args]]';
|
|
366
|
-
}
|
|
367
|
-
function testWaveUsage() {
|
|
368
|
-
return 'Usage: sdd test wave [--branch <branch>] [--wave <n>] [--task <task_id>]... [--approved] [--timeout-ms <ms>] [--preflight] [--json]';
|
|
369
|
-
}
|
|
370
|
-
function testBatchUsage() {
|
|
371
|
-
return 'Usage: sdd test batch <batch_id> [--branch <branch>] [--approved] [--timeout-ms <ms>] [--preflight] [--json]';
|
|
372
|
-
}
|
|
373
|
-
//# sourceMappingURL=test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/commands/test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,UAAU,EAAE,iBAAiB,EAAuD,MAAM,uCAAuC,CAAC;AACvN,OAAO,EAAE,cAAc,EAAgB,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,8BAA8B,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAClG,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,UAAU,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAC1H,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAQ7D,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,WAAmB,EAAE,OAA2B,EAAE,UAA8B,EAAE,IAAc;IACtI,IAAI,OAAO,KAAK,MAAM,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,WAAW,CAAC,CAAC,UAAU,EAAE,GAAG,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QACvF,OAAO;YACL,QAAQ,EAAE,CAAC;YACX,MAAM,EAAE,SAAS,EAAE;SACpB,CAAC;IACJ,CAAC;IAED,IAAI,UAAU,KAAK,MAAM,EAAE,CAAC;QAC1B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,OAAO,IAAI,KAAK,QAAQ,CAAC,EAAE,CAAC;YAC1F,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;QACpE,CAAC;QACD,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IACD,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QACvC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;IACrC,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,mDAAmD,CAAC,CAAC;AACvE,CAAC;AAED,SAAS,SAAS;IAChB,OAAO,GAAG,uBAAuB,EAAE,KAAK,aAAa,EAAE,KAAK,aAAa,EAAE,KAAK,cAAc,EAAE,EAAE,CAAC;AACrG,CAAC;AAED,SAAS,uBAAuB;IAC9B,OAAO,kLAAkL,CAAC;AAC5L,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,+NAA+N,CAAC;AACzO,CAAC;AAED,SAAS,aAAa;IACpB,OAAO,qIAAqI,CAAC;AAC/I,CAAC;AAED,SAAS,cAAc;IACrB,OAAO,8GAA8G,CAAC;AACxH,CAAC"}
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { inspectVerifyContract, writeVerifyContract } from '@sdd-agent-platform/core/verification';
|
|
2
|
-
import { readBranchContext } from '../args.js';
|
|
3
|
-
import { jsonOutput, wantsJson } from '../renderers/json.js';
|
|
4
|
-
export async function handleVerifiesCommand(projectRoot, command, subcommand, rest) {
|
|
5
|
-
if (command !== 'verifies') {
|
|
6
|
-
return null;
|
|
7
|
-
}
|
|
8
|
-
const args = [subcommand, ...rest].filter((item) => Boolean(item));
|
|
9
|
-
if (!subcommand || subcommand === 'inspect') {
|
|
10
|
-
const result = await inspectVerifyContract(projectRoot, readBranchContext(args));
|
|
11
|
-
return {
|
|
12
|
-
exitCode: 0,
|
|
13
|
-
output: wantsJson(args) ? jsonOutput(result, args) : renderVerifyContractInspection(result)
|
|
14
|
-
};
|
|
15
|
-
}
|
|
16
|
-
if (subcommand === 'write') {
|
|
17
|
-
const result = await writeVerifyContract(projectRoot, {
|
|
18
|
-
...readBranchContext(args),
|
|
19
|
-
force: args.includes('--force')
|
|
20
|
-
});
|
|
21
|
-
return {
|
|
22
|
-
exitCode: 0,
|
|
23
|
-
output: wantsJson(args) ? jsonOutput(result, args) : renderWriteVerifyContractResult(result)
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
if (subcommand === 'format') {
|
|
27
|
-
return {
|
|
28
|
-
exitCode: 0,
|
|
29
|
-
output: verifyContractFormatText()
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
return {
|
|
33
|
-
exitCode: 2,
|
|
34
|
-
error: 'Usage: sdd verifies [inspect|write|format] [--branch <branch>] [--force] [--json]'
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
function renderVerifyContractInspection(result) {
|
|
38
|
-
const lines = [`SDD verify contract for ${result.branch}`, 'decision'];
|
|
39
|
-
lines.push(`- status=${result.status}`);
|
|
40
|
-
lines.push(`- exists=${result.exists} tasks=${result.taskCount}`);
|
|
41
|
-
lines.push(`- current_tasks_contract_hash=${result.currentTasksContractHash ?? 'none'}`);
|
|
42
|
-
lines.push(`- current_tasks_hash=${result.currentTasksHash ?? 'none'}`);
|
|
43
|
-
lines.push('evidence');
|
|
44
|
-
lines.push(`- verify_path=${result.verifyPath}`);
|
|
45
|
-
lines.push('gaps');
|
|
46
|
-
if (result.issues.length === 0) {
|
|
47
|
-
lines.push('- none');
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
for (const issue of result.issues) {
|
|
51
|
-
lines.push(`- [${issue.level}] ${issue.field}: ${issue.message}`);
|
|
52
|
-
lines.push(` action: ${issue.action}`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
lines.push('next');
|
|
56
|
-
lines.push(result.status === 'PASS' ? '- sdd test task|batch|wave --branch <branch>' : `- sdd verifies write --branch ${result.branch}${result.exists ? ' --force' : ''}`);
|
|
57
|
-
return lines.join('\n');
|
|
58
|
-
}
|
|
59
|
-
function renderWriteVerifyContractResult(result) {
|
|
60
|
-
return [
|
|
61
|
-
`SDD verify contract ${result.status}`,
|
|
62
|
-
'changed',
|
|
63
|
-
`- ${result.relativePath}`,
|
|
64
|
-
'decision',
|
|
65
|
-
`- branch=${result.branch}`,
|
|
66
|
-
'next',
|
|
67
|
-
`- sdd verifies inspect --branch ${result.branch}`
|
|
68
|
-
].join('\n');
|
|
69
|
-
}
|
|
70
|
-
function verifyContractFormatText() {
|
|
71
|
-
return `# Verify contract format
|
|
72
|
-
|
|
73
|
-
\`specs/<branch>/verify.md\` is derived from \`tasks.md\` and must include frontmatter:
|
|
74
|
-
|
|
75
|
-
\`\`\`yaml
|
|
76
|
-
contract: sdd-verify-doc-v1
|
|
77
|
-
version: 1.0.0
|
|
78
|
-
branch: <branch>
|
|
79
|
-
author_role: verification-designer
|
|
80
|
-
independent_from_roles:
|
|
81
|
-
- task-planner
|
|
82
|
-
- implementer
|
|
83
|
-
\`\`\`
|
|
84
|
-
|
|
85
|
-
Include a task verification matrix and verification rules. Runtime evidence, hashes, and accepted dependency edges remain in runtime.sqlite and branch evidence artifacts.`;
|
|
86
|
-
}
|
|
87
|
-
//# sourceMappingURL=verifies.js.map
|