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,521 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { readFile } from 'node:fs/promises';
|
|
3
|
-
import { ACCEPTANCE_POLICY_RULESET_VERSION, SDD_EVIDENCE_CONTRACT, SDD_EVIDENCE_VERSION, SDD_RESULT_CONTRACT, SDD_RESULT_VERSION } from '../contracts.js';
|
|
4
|
-
import { artifactKind, readArtifact, recordRuntimeOnlyArtifact } from '../run-state/artifacts.js';
|
|
5
|
-
import { appendEvent } from '../run-state/events.js';
|
|
6
|
-
import { appendArtifactHashLedgerEntry, appendDeclaredCommandLedgerEntries, appendInvocationLedgerEntry, listInvocationLedgerEntries } from '../run-state/invocation-ledger.js';
|
|
7
|
-
import { readRunState, writeRunState } from '../run-state/run-state.js';
|
|
8
|
-
import { getBranchStageEvidencePathFromRef, isBranchStageEvidenceRef, toBranchStageEvidenceRef, toEvidencePayloadFileName } from '../runtime-paths.js';
|
|
9
|
-
import { hasRuntimeEvidenceScopeViolation, readRuntimeEvidenceClaims } from '../context/evidence-summary.js';
|
|
10
|
-
import { validateSddResultArtifact } from '../artifacts/sdd-result.js';
|
|
11
|
-
import { taskGap } from '../sdd-docs/task-inspection.js';
|
|
12
|
-
import { inspectSddTask } from '../sdd-docs/task-inspection.js';
|
|
13
|
-
import { resolveTaskRun } from '../workflow-state/resolve-task-run.js';
|
|
14
|
-
export async function runGoalVerify(projectRoot, options) {
|
|
15
|
-
const resolved = await resolveTaskRun(projectRoot, { runId: options.runId, branch: options.branch, taskId: options.taskId });
|
|
16
|
-
const branch = resolved.context.partition;
|
|
17
|
-
const model = resolved.model;
|
|
18
|
-
const inspected = { task: resolved.task, gaps: inspectSddTask(model, options.taskId).gaps };
|
|
19
|
-
const runId = resolved.runId;
|
|
20
|
-
const state = resolved.state;
|
|
21
|
-
const reviewArtifact = options.reviewArtifact ?? artifactPathForAgent(state, options.taskId, 'reviewer');
|
|
22
|
-
const validationArtifact = options.validationArtifact ?? artifactPathForAgent(state, options.taskId, 'validator');
|
|
23
|
-
const gaps = [...inspected.gaps];
|
|
24
|
-
const plannedCommands = inspected.task?.validation ?? [];
|
|
25
|
-
for (const reason of resolved.staleReasons) {
|
|
26
|
-
gaps.push(taskGap(options.taskId, 'run_snapshot', reason, 'Rerun sdd do task for the current partition before verify.'));
|
|
27
|
-
}
|
|
28
|
-
for (const conflict of resolved.affectedFileConflicts) {
|
|
29
|
-
gaps.push(taskGap(options.taskId, 'affected_files', `Affected file ${conflict.file} is active in run ${conflict.runId} for ${conflict.partition}/${conflict.taskId}.`, 'Resolve or archive the conflicting active run before verify.'));
|
|
30
|
-
}
|
|
31
|
-
const acceptanceCoverage = [];
|
|
32
|
-
const acceptedArtifacts = [];
|
|
33
|
-
let reviewStatus = null;
|
|
34
|
-
let validationStatus = null;
|
|
35
|
-
let validationTrust = null;
|
|
36
|
-
let executedCommands = [];
|
|
37
|
-
await appendEvent(projectRoot, runId, {
|
|
38
|
-
event: 'phase_started',
|
|
39
|
-
runId,
|
|
40
|
-
summary: `Phase 1.9 goal-level verify started for ${options.taskId}`,
|
|
41
|
-
data: { phase: 'verify', branch, task: options.taskId }
|
|
42
|
-
});
|
|
43
|
-
if (!inspected.task) {
|
|
44
|
-
gaps.push(taskGap(options.taskId, 'task', `Task ${options.taskId} was not found for goal-level verification.`, 'Create the task or choose an existing task id before verify.'));
|
|
45
|
-
}
|
|
46
|
-
if (!reviewArtifact) {
|
|
47
|
-
gaps.push(taskGap(options.taskId, 'review_artifact', 'No reviewer evidence was supplied or selected from runtime state.', 'Author reviewer evidence under .sdd/runs/<branch>/do/code-review-vN.md and register its ref/hash before goal-level verify.'));
|
|
48
|
-
}
|
|
49
|
-
else {
|
|
50
|
-
const reviewReport = await validateSddResultArtifact(projectRoot, runId, reviewArtifact, { expectedTask: options.taskId, expectedAgent: 'reviewer' });
|
|
51
|
-
if (!reviewReport.valid || !reviewReport.result) {
|
|
52
|
-
gaps.push(taskGap(options.taskId, 'review_artifact', `Reviewer artifact ${reviewArtifact} is invalid: ${reviewReport.issues.map((issue) => issue.message).join('; ')}`, 'Fix reviewer artifact contract before goal-level verify.'));
|
|
53
|
-
}
|
|
54
|
-
else {
|
|
55
|
-
reviewStatus = reviewReport.result.status;
|
|
56
|
-
acceptedArtifacts.push(reviewArtifact);
|
|
57
|
-
if (reviewReport.result.status !== 'PASS') {
|
|
58
|
-
gaps.push(taskGap(options.taskId, 'review_status', `Reviewer status is ${reviewReport.result.status}, not PASS.`, 'Resolve review findings before marking verification PASS.'));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
if (!validationArtifact) {
|
|
63
|
-
gaps.push(taskGap(options.taskId, 'validation_artifact', 'No validator evidence was supplied or selected from runtime state.', 'Author validator evidence under .sdd/runs/<branch>/test/validation-vN.md and register its ref/hash before goal-level verify.'));
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
const validationReport = await validateSddResultArtifact(projectRoot, runId, validationArtifact, { expectedTask: options.taskId, expectedAgent: 'validator' });
|
|
67
|
-
validationTrust = validationReport.trust ?? null;
|
|
68
|
-
if (!validationReport.valid || !validationReport.result) {
|
|
69
|
-
gaps.push(taskGap(options.taskId, 'validation_artifact', `Validator artifact ${validationArtifact} is invalid: ${validationReport.issues.map((issue) => issue.message).join('; ')}`, 'Fix validator artifact contract before goal-level verify.'));
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
validationStatus = validationReport.result.status;
|
|
73
|
-
acceptedArtifacts.push(validationArtifact);
|
|
74
|
-
if (validationReport.result.status === 'FAIL' || validationReport.result.status === 'BLOCKED') {
|
|
75
|
-
gaps.push(taskGap(options.taskId, 'validation_status', `Validator status is ${validationReport.result.status}.`, 'Do not mark task completed; inspect validation gaps and recovery proposal.'));
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
if (inspected.task) {
|
|
80
|
-
const validationRaw = validationArtifact ? await readArtifactIfExists(projectRoot, runId, validationArtifact) : '';
|
|
81
|
-
const reviewRaw = reviewArtifact ? await readArtifactIfExists(projectRoot, runId, reviewArtifact) : '';
|
|
82
|
-
if (reviewArtifact && reviewRaw.length > 0) {
|
|
83
|
-
await appendArtifactHashLedgerEntry(projectRoot, { runId, taskId: options.taskId, branch, artifactPath: reviewArtifact, content: reviewRaw });
|
|
84
|
-
}
|
|
85
|
-
if (validationArtifact && validationRaw.length > 0) {
|
|
86
|
-
await appendArtifactHashLedgerEntry(projectRoot, { runId, taskId: options.taskId, branch, artifactPath: validationArtifact, content: validationRaw });
|
|
87
|
-
}
|
|
88
|
-
await appendDeclaredCommandLedgerEntries(projectRoot, { runId, taskId: options.taskId, branch, commands: inspected.task.validation });
|
|
89
|
-
const invocationLedger = await listInvocationLedgerEntries(projectRoot, runId);
|
|
90
|
-
executedCommands = executedCommandsFromLedger(invocationLedger);
|
|
91
|
-
const admittedClaims = await readRuntimeEvidenceClaims(projectRoot, runId, options.taskId);
|
|
92
|
-
const scopeViolation = await hasRuntimeEvidenceScopeViolation(projectRoot, runId, options.taskId);
|
|
93
|
-
if (scopeViolation) {
|
|
94
|
-
gaps.push(taskGap(options.taskId, 'runtime_scope', 'PARTITION_SCOPE_VIOLATION: Runtime evidence claims do not match the run partition.', 'Reingest validator evidence in the correct branch/partition before verify.'));
|
|
95
|
-
}
|
|
96
|
-
for (const target of taskAcceptanceCoverageTargets(inspected.task)) {
|
|
97
|
-
const coverage = scopeViolation
|
|
98
|
-
? acceptanceCoverageDecision(target.label, 'BLOCKED', 'Runtime evidence scope violation blocks acceptance coverage.', ['PARTITION_SCOPE_VIOLATION'], [], ['require-partition-scope'])
|
|
99
|
-
: evaluateAcceptanceCoverageTarget(target, {
|
|
100
|
-
taskId: options.taskId,
|
|
101
|
-
validationArtifact,
|
|
102
|
-
validationRaw,
|
|
103
|
-
claims: admittedClaims.length > 0 ? admittedClaims : validationTrust?.claims ?? [],
|
|
104
|
-
validationStatus,
|
|
105
|
-
invocationLedger
|
|
106
|
-
});
|
|
107
|
-
await appendInvocationLedgerEntry(projectRoot, {
|
|
108
|
-
runId,
|
|
109
|
-
taskId: options.taskId,
|
|
110
|
-
branch,
|
|
111
|
-
kind: 'policy_evaluation',
|
|
112
|
-
ref: `${ACCEPTANCE_POLICY_RULESET_VERSION}:${target.label}`,
|
|
113
|
-
status: coverage.status,
|
|
114
|
-
artifactPath: validationArtifact,
|
|
115
|
-
inputHash: validationRaw.length > 0 ? hashDocumentContent(validationRaw) : null,
|
|
116
|
-
materialRefs: [],
|
|
117
|
-
metadata: {
|
|
118
|
-
passedRules: coverage.policyDecision?.passedRules.join(',') ?? '',
|
|
119
|
-
failedRules: coverage.policyDecision?.failedRules.join(',') ?? '',
|
|
120
|
-
issueCodes: coverage.issueCodes?.join(',') ?? ''
|
|
121
|
-
}
|
|
122
|
-
});
|
|
123
|
-
acceptanceCoverage.push(coverage);
|
|
124
|
-
if (coverage.status !== 'PASS') {
|
|
125
|
-
gaps.push(taskGap(options.taskId, 'acceptance_coverage', `Acceptance target ${target.label} is ${coverage.status}: ${coverage.evidence}`, `Add ${SDD_EVIDENCE_CONTRACT} claim/evidence/provenance/policy records for ${target.label}; mention-only acceptance refs cannot pass.`));
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
const status = deriveGoalVerifyStatus(reviewStatus, validationStatus, gaps);
|
|
130
|
-
const standardStatus = toHarnessVerifyStatus(status, reviewStatus, validationStatus, gaps);
|
|
131
|
-
const coverageFileName = `acceptance-coverage-${options.taskId}.md`;
|
|
132
|
-
const coverageRef = toBranchStageEvidenceRef(branch, 'goal-verify', coverageFileName);
|
|
133
|
-
await recordRuntimeOnlyArtifact(projectRoot, runId, coverageFileName, renderAcceptanceCoverageArtifact(options.taskId, status, coverageRef, inspected.task, reviewArtifact, validationArtifact, acceptanceCoverage, gaps, executedCommands), { logicalRef: coverageRef, branch, taskId: options.taskId, artifactRole: 'goal-verify-acceptance-coverage' });
|
|
134
|
-
const allArtifacts = [...acceptedArtifacts, coverageRef];
|
|
135
|
-
await persistVerifyState(projectRoot, runId, {
|
|
136
|
-
status,
|
|
137
|
-
taskId: options.taskId,
|
|
138
|
-
taskState: buildGoalVerifyTaskState(inspected.task, status, gaps, allArtifacts, acceptanceCoverage),
|
|
139
|
-
commands: plannedCommands,
|
|
140
|
-
evidence: allArtifacts,
|
|
141
|
-
artifacts: allArtifacts.map((artifactPath) => ({ path: artifactPath, kind: artifactKind(artifactPath), task: options.taskId, agent: agentFromArtifactPath(artifactPath) }))
|
|
142
|
-
});
|
|
143
|
-
await appendEvent(projectRoot, runId, {
|
|
144
|
-
event: status === 'PASS' ? 'validation_passed' : 'validation_failed',
|
|
145
|
-
runId,
|
|
146
|
-
summary: `Phase 1.9 goal-level verify ${status} for ${options.taskId}`,
|
|
147
|
-
data: { task: options.taskId, status, coverageArtifact: coverageRef, gaps, plannedCommands, executedCommands }
|
|
148
|
-
});
|
|
149
|
-
return {
|
|
150
|
-
runId,
|
|
151
|
-
taskId: options.taskId,
|
|
152
|
-
status,
|
|
153
|
-
task: inspected.task,
|
|
154
|
-
reviewArtifact,
|
|
155
|
-
validationArtifact,
|
|
156
|
-
coverageArtifactPath: coverageRef,
|
|
157
|
-
acceptanceCoverage,
|
|
158
|
-
gaps,
|
|
159
|
-
commands: plannedCommands,
|
|
160
|
-
plannedCommands,
|
|
161
|
-
executedCommands,
|
|
162
|
-
standardStatus,
|
|
163
|
-
message: status === 'PASS' ? 'Goal-level verify passed with explicit acceptance coverage.' : 'Goal-level verify found gaps; inspect coverage artifact.'
|
|
164
|
-
};
|
|
165
|
-
}
|
|
166
|
-
function buildGoalVerifyTaskState(task, status, gaps, artifacts, acceptanceCoverage) {
|
|
167
|
-
const verificationStatus = status === 'PASS' ? 'pass' : status === 'PASS_WITH_GAPS' ? 'pass_with_gaps' : status === 'FAIL' ? 'failed' : 'blocked';
|
|
168
|
-
return {
|
|
169
|
-
status: status === 'PASS' ? 'implemented_verified' : verificationStatus === 'pass_with_gaps' ? 'validation_blocked' : verificationStatus === 'failed' ? 'validation_failed' : 'validation_blocked',
|
|
170
|
-
implementationStatus: 'implemented',
|
|
171
|
-
verificationStatus,
|
|
172
|
-
validationBatch: task?.validationBatch ?? null,
|
|
173
|
-
validationTiming: task?.validationTiming ?? 'task_end',
|
|
174
|
-
requiresVerifyBeforeNext: task?.requiresVerifyBeforeNext ?? true,
|
|
175
|
-
verifyStatus: status,
|
|
176
|
-
gaps,
|
|
177
|
-
artifacts,
|
|
178
|
-
acceptanceCoverage
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
async function persistVerifyState(projectRoot, runId, input) {
|
|
182
|
-
const state = await readRunState(projectRoot, runId);
|
|
183
|
-
const now = new Date().toISOString();
|
|
184
|
-
const knownArtifactPaths = new Set(state.artifacts.map((artifact) => artifact.path));
|
|
185
|
-
const newArtifacts = input.artifacts
|
|
186
|
-
.filter((artifact) => !knownArtifactPaths.has(artifact.path))
|
|
187
|
-
.map((artifact) => ({ ...artifact, createdAt: now }));
|
|
188
|
-
await writeRunState(projectRoot, {
|
|
189
|
-
...state,
|
|
190
|
-
status: input.status === 'PASS' ? 'completed' : 'blocked',
|
|
191
|
-
phase: 'verify',
|
|
192
|
-
currentTask: input.taskId,
|
|
193
|
-
tasks: {
|
|
194
|
-
...state.tasks,
|
|
195
|
-
[input.taskId]: input.taskState
|
|
196
|
-
},
|
|
197
|
-
artifacts: [...state.artifacts, ...newArtifacts],
|
|
198
|
-
validation: {
|
|
199
|
-
status: input.status === 'PASS' ? 'pass' : input.status === 'PASS_WITH_GAPS' ? 'pass_with_gaps' : input.status === 'BLOCKED' ? 'blocked' : 'fail',
|
|
200
|
-
commands: input.commands,
|
|
201
|
-
evidence: input.evidence
|
|
202
|
-
},
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
function renderAcceptanceCoverageArtifact(taskId, status, coverageRef, task, reviewArtifact, validationArtifact, coverage, gaps, executedCommands) {
|
|
206
|
-
return `# Acceptance Coverage ${taskId}\n\n\`\`\`sdd-result\ncontract: ${SDD_RESULT_CONTRACT}\nversion: ${SDD_RESULT_VERSION}\nagent: validator\ntask: ${taskId}\nstatus: ${status}\nartifacts:\n - ${coverageRef}\n\`\`\`\n\n## Source Evidence\n\n- review_artifact: ${reviewArtifact ?? 'missing'}\n- validation_artifact: ${validationArtifact ?? 'missing'}\n- task_source: ${task ? sourceLocationEvidence(task.source) : 'missing'}\n\n## Planned Validation Commands\n\n${task && task.validation.length > 0 ? task.validation.map((command) => `- ${command}`).join('\n') : '- none'}\n\n## Executed Runtime Commands\n\n${executedCommands.length > 0 ? executedCommands.map((command) => `- ${command}`).join('\n') : '- none'}\n\n## Acceptance Mapping\n\n${coverage.length > 0 ? coverage.map((item) => `- [${item.status}] ${item.acceptance} Evidence: ${item.evidence}`).join('\n') : '- No acceptance items available.'}\n\n## Policy Decisions\n\n${coverage.length > 0 ? coverage.map((item) => `- ${item.acceptance}: status=${item.policyDecision?.status ?? item.status}; ruleset=${item.policyDecision?.ruleSet.id ?? ACCEPTANCE_POLICY_RULESET_VERSION}; passed=${item.policyDecision?.passedRules.join(',') || 'none'}; failed=${item.policyDecision?.failedRules.join(',') || 'none'}; issues=${item.issueCodes?.join(',') || 'none'}`).join('\n') : '- none'}\n\n## Gaps\n\n${gaps.length > 0 ? gaps.map((gap) => `- [${gap.severity}] ${gap.type} ${gap.field}: ${gap.message} Recommendation: ${gap.recommendation}`).join('\n') : '- none'}\n`;
|
|
207
|
-
}
|
|
208
|
-
function evaluateAcceptanceCoverageTarget(target, input) {
|
|
209
|
-
const matchingClaims = input.claims.filter((claim) => claim.task === input.taskId && acceptanceMatchesTarget(target, claim.acceptance));
|
|
210
|
-
const issueCodes = [];
|
|
211
|
-
const failedRules = [];
|
|
212
|
-
if (matchingClaims.length === 0) {
|
|
213
|
-
if (target.matchTexts.some((text) => text.length > 0 && input.validationRaw.toLowerCase().includes(text.toLowerCase()))) {
|
|
214
|
-
issueCodes.push('MENTION_ONLY');
|
|
215
|
-
failedRules.push('require-structured-evidence');
|
|
216
|
-
return acceptanceCoverageDecision(target.label, 'REFERENCED_ONLY', `Referenced ${target.label} in ${input.validationArtifact ?? 'validator artifact'} without policy-backed evidence.`, issueCodes, [], failedRules);
|
|
217
|
-
}
|
|
218
|
-
issueCodes.push('MISSING_ARTIFACT_REFERENCE');
|
|
219
|
-
failedRules.push('require-acceptance-claim');
|
|
220
|
-
return acceptanceCoverageDecision(target.label, 'MISSING', 'No policy-backed acceptance evidence found in validator artifact.', issueCodes, [], failedRules);
|
|
221
|
-
}
|
|
222
|
-
let best = matchingClaims[0];
|
|
223
|
-
let bestRank = evidenceClaimSelectionRank(best, input);
|
|
224
|
-
for (const claim of matchingClaims.slice(1)) {
|
|
225
|
-
const rank = evidenceClaimSelectionRank(claim, input);
|
|
226
|
-
if (rank > bestRank) {
|
|
227
|
-
best = claim;
|
|
228
|
-
bestRank = rank;
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
if (best.status === 'PASS') {
|
|
232
|
-
const ledgerDecision = evaluatePassClaimPolicy(best, input);
|
|
233
|
-
if (ledgerDecision.issueCodes.length === 0) {
|
|
234
|
-
return acceptanceCoverageDecision(target.label, 'PASS', `Policy-proven by ${SDD_EVIDENCE_CONTRACT} claim for ${best.acceptance} in ${best.sourceArtifact}; evidence=${best.evidence.map((item) => `${item.kind}:${item.ref}`).join(', ')}; provenance=${best.provenance.join(', ')}; policy=${best.policy.join(', ')}.`, [], ledgerDecision.passedRules, []);
|
|
235
|
-
}
|
|
236
|
-
return acceptanceCoverageDecision(target.label, 'BLOCKED', `PASS claim for ${best.acceptance} is missing required policy/provenance corroboration.`, ledgerDecision.issueCodes, [], ledgerDecision.failedRules);
|
|
237
|
-
}
|
|
238
|
-
if (best.status === 'FAIL') {
|
|
239
|
-
return acceptanceCoverageDecision(target.label, 'FAIL', `Explicit FAIL claim for ${best.acceptance}: ${best.claim}`, [], ['explicit-fail-overrides-pass'], []);
|
|
240
|
-
}
|
|
241
|
-
if (best.status === 'BLOCKED') {
|
|
242
|
-
return acceptanceCoverageDecision(target.label, 'BLOCKED', `Explicit BLOCKED claim for ${best.acceptance}: ${best.claim}`, [], ['explicit-blocked-overrides-pass'], []);
|
|
243
|
-
}
|
|
244
|
-
if (best.status === 'REFERENCED_ONLY') {
|
|
245
|
-
return acceptanceCoverageDecision(target.label, 'REFERENCED_ONLY', `Structured evidence references ${best.acceptance} but does not prove PASS.`, ['MENTION_ONLY'], [], ['require-pass-claim']);
|
|
246
|
-
}
|
|
247
|
-
return acceptanceCoverageDecision(target.label, 'MISSING', `Structured evidence marks ${best.acceptance} missing.`, ['MISSING_ARTIFACT_REFERENCE'], [], ['require-pass-claim']);
|
|
248
|
-
}
|
|
249
|
-
function evidenceClaimSelectionRank(claim, input) {
|
|
250
|
-
if (claim.status === 'FAIL') {
|
|
251
|
-
return 500;
|
|
252
|
-
}
|
|
253
|
-
if (claim.status === 'BLOCKED') {
|
|
254
|
-
return 400;
|
|
255
|
-
}
|
|
256
|
-
if (claim.status === 'PASS') {
|
|
257
|
-
const decision = evaluatePassClaimPolicy(claim, input);
|
|
258
|
-
return decision.issueCodes.length === 0 ? 300 : 200 - decision.issueCodes.length;
|
|
259
|
-
}
|
|
260
|
-
if (claim.status === 'REFERENCED_ONLY') {
|
|
261
|
-
return 100;
|
|
262
|
-
}
|
|
263
|
-
return 0;
|
|
264
|
-
}
|
|
265
|
-
function evaluatePassClaimPolicy(claim, input) {
|
|
266
|
-
const issueCodes = [];
|
|
267
|
-
const failedRules = [];
|
|
268
|
-
const passedRules = [];
|
|
269
|
-
const addFailure = (code, rule) => {
|
|
270
|
-
if (!issueCodes.includes(code)) {
|
|
271
|
-
issueCodes.push(code);
|
|
272
|
-
}
|
|
273
|
-
if (!failedRules.includes(rule)) {
|
|
274
|
-
failedRules.push(rule);
|
|
275
|
-
}
|
|
276
|
-
};
|
|
277
|
-
const addPassed = (rule) => {
|
|
278
|
-
if (!passedRules.includes(rule)) {
|
|
279
|
-
passedRules.push(rule);
|
|
280
|
-
}
|
|
281
|
-
};
|
|
282
|
-
if (claim.evidence.length === 0) {
|
|
283
|
-
addFailure('UNSOURCED_PASS', 'require-source-evidence');
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
addPassed('require-source-evidence');
|
|
287
|
-
}
|
|
288
|
-
if (claim.provenance.length === 0) {
|
|
289
|
-
addFailure('PROVENANCE_GAP', 'require-provenance');
|
|
290
|
-
}
|
|
291
|
-
else {
|
|
292
|
-
addPassed('require-provenance');
|
|
293
|
-
}
|
|
294
|
-
if (claim.policy.length === 0) {
|
|
295
|
-
addFailure('POLICY_RULE_FAILED', 'require-policy-rule');
|
|
296
|
-
}
|
|
297
|
-
else {
|
|
298
|
-
addPassed('require-policy-rule');
|
|
299
|
-
}
|
|
300
|
-
if (input.validationStatus !== 'PASS') {
|
|
301
|
-
addFailure('POLICY_RULE_FAILED', 'require-validator-pass');
|
|
302
|
-
}
|
|
303
|
-
else {
|
|
304
|
-
addPassed('require-validator-pass');
|
|
305
|
-
}
|
|
306
|
-
const ledgerDecision = evaluateClaimLedgerCorroboration(claim, input.invocationLedger);
|
|
307
|
-
for (const issue of ledgerDecision.issueCodes) {
|
|
308
|
-
if (!issueCodes.includes(issue)) {
|
|
309
|
-
issueCodes.push(issue);
|
|
310
|
-
}
|
|
311
|
-
}
|
|
312
|
-
for (const rule of ledgerDecision.failedRules) {
|
|
313
|
-
if (!failedRules.includes(rule)) {
|
|
314
|
-
failedRules.push(rule);
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
if (ledgerDecision.failedRules.length === 0) {
|
|
318
|
-
addPassed('require-ledger-corroboration');
|
|
319
|
-
}
|
|
320
|
-
return { issueCodes, failedRules, passedRules };
|
|
321
|
-
}
|
|
322
|
-
function evaluateClaimLedgerCorroboration(claim, entries) {
|
|
323
|
-
const issueCodes = [];
|
|
324
|
-
const failedRules = [];
|
|
325
|
-
const commandRefs = invocationLedgerRefs(entries, 'command');
|
|
326
|
-
const artifactRefs = invocationLedgerRefs(entries, 'artifact_hash');
|
|
327
|
-
const materialRefs = ledgerMaterialRefs(entries);
|
|
328
|
-
const addIssue = (code, rule) => {
|
|
329
|
-
if (!issueCodes.includes(code)) {
|
|
330
|
-
issueCodes.push(code);
|
|
331
|
-
}
|
|
332
|
-
if (!failedRules.includes(rule)) {
|
|
333
|
-
failedRules.push(rule);
|
|
334
|
-
}
|
|
335
|
-
};
|
|
336
|
-
if (!artifactRefs.has(claim.sourceArtifact)) {
|
|
337
|
-
addIssue('MISSING_ARTIFACT_REFERENCE', 'require-source-artifact-hash');
|
|
338
|
-
}
|
|
339
|
-
for (const item of claim.evidence) {
|
|
340
|
-
if (item.kind === 'command' && !commandRefs.has(item.ref)) {
|
|
341
|
-
addIssue('MISSING_COMMAND_OUTPUT', 'require-command-ledger');
|
|
342
|
-
}
|
|
343
|
-
if (item.kind === 'artifact' && !artifactRefs.has(item.ref)) {
|
|
344
|
-
addIssue('MISSING_ARTIFACT_REFERENCE', 'require-artifact-hash');
|
|
345
|
-
}
|
|
346
|
-
if (item.kind === 'material' && !materialRefs.has(item.ref)) {
|
|
347
|
-
addIssue('MISSING_MATERIAL_REFERENCE', 'require-material-ledger');
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
for (const ref of claim.provenance) {
|
|
351
|
-
const typed = parseTypedLedgerRef(ref);
|
|
352
|
-
if (!typed) {
|
|
353
|
-
continue;
|
|
354
|
-
}
|
|
355
|
-
if (typed.kind === 'command' && !commandRefs.has(typed.ref)) {
|
|
356
|
-
addIssue('PROVENANCE_GAP', 'require-command-provenance-ledger');
|
|
357
|
-
}
|
|
358
|
-
if (typed.kind === 'artifact' && !artifactRefs.has(typed.ref)) {
|
|
359
|
-
addIssue('PROVENANCE_GAP', 'require-artifact-provenance-ledger');
|
|
360
|
-
}
|
|
361
|
-
if (typed.kind === 'material' && !materialRefs.has(typed.ref)) {
|
|
362
|
-
addIssue('PROVENANCE_GAP', 'require-material-provenance-ledger');
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
return { issueCodes, failedRules };
|
|
366
|
-
}
|
|
367
|
-
function invocationLedgerRefs(entries, kind) {
|
|
368
|
-
const refs = new Set();
|
|
369
|
-
for (const entry of entries) {
|
|
370
|
-
if (entry.kind === kind) {
|
|
371
|
-
refs.add(entry.ref);
|
|
372
|
-
if (entry.artifactPath) {
|
|
373
|
-
refs.add(entry.artifactPath);
|
|
374
|
-
}
|
|
375
|
-
if (kind === 'command' && typeof entry.metadata.stepId === 'string') {
|
|
376
|
-
refs.add(entry.metadata.stepId);
|
|
377
|
-
}
|
|
378
|
-
}
|
|
379
|
-
}
|
|
380
|
-
return refs;
|
|
381
|
-
}
|
|
382
|
-
function parseTypedLedgerRef(value) {
|
|
383
|
-
const separator = value.indexOf(':');
|
|
384
|
-
if (separator <= 0) {
|
|
385
|
-
return null;
|
|
386
|
-
}
|
|
387
|
-
const kind = value.slice(0, separator).trim();
|
|
388
|
-
const ref = value.slice(separator + 1).trim();
|
|
389
|
-
if (!/^[A-Za-z0-9_-]+$/.test(kind) || !ref) {
|
|
390
|
-
return null;
|
|
391
|
-
}
|
|
392
|
-
return { kind, ref };
|
|
393
|
-
}
|
|
394
|
-
function acceptanceMatchesTarget(target, acceptance) {
|
|
395
|
-
const normalizedAcceptance = acceptance.toLowerCase();
|
|
396
|
-
return target.matchTexts.some((text) => text.toLowerCase() === normalizedAcceptance) || target.label.toLowerCase() === normalizedAcceptance;
|
|
397
|
-
}
|
|
398
|
-
function acceptanceCoverageDecision(acceptance, status, evidence, issueCodes, passedRules, failedRules) {
|
|
399
|
-
return {
|
|
400
|
-
acceptance,
|
|
401
|
-
status,
|
|
402
|
-
evidence,
|
|
403
|
-
issueCodes,
|
|
404
|
-
policyDecision: {
|
|
405
|
-
status,
|
|
406
|
-
ruleSet: {
|
|
407
|
-
id: ACCEPTANCE_POLICY_RULESET_VERSION,
|
|
408
|
-
version: SDD_EVIDENCE_VERSION,
|
|
409
|
-
ruleIds: ['require-structured-evidence', 'require-source-evidence', 'require-provenance', 'require-policy-rule']
|
|
410
|
-
},
|
|
411
|
-
passedRules,
|
|
412
|
-
failedRules,
|
|
413
|
-
issueCodes
|
|
414
|
-
}
|
|
415
|
-
};
|
|
416
|
-
}
|
|
417
|
-
function taskAcceptanceCoverageTargets(task) {
|
|
418
|
-
if (task.acceptanceRefs.length > 0) {
|
|
419
|
-
return task.acceptanceRefs.map((ref, index) => {
|
|
420
|
-
const description = task.acceptance[index] ?? null;
|
|
421
|
-
return {
|
|
422
|
-
label: ref,
|
|
423
|
-
description,
|
|
424
|
-
matchTexts: description ? [ref, description] : [ref]
|
|
425
|
-
};
|
|
426
|
-
});
|
|
427
|
-
}
|
|
428
|
-
return task.acceptance.map((acceptance) => ({
|
|
429
|
-
label: acceptance,
|
|
430
|
-
description: null,
|
|
431
|
-
matchTexts: [acceptance]
|
|
432
|
-
}));
|
|
433
|
-
}
|
|
434
|
-
function deriveGoalVerifyStatus(reviewStatus, validationStatus, gaps) {
|
|
435
|
-
if (gaps.length > 0) {
|
|
436
|
-
return validationStatus === 'PASS_WITH_GAPS' ? 'PASS_WITH_GAPS' : 'BLOCKED';
|
|
437
|
-
}
|
|
438
|
-
if (reviewStatus !== 'PASS' || !validationStatus) {
|
|
439
|
-
return 'BLOCKED';
|
|
440
|
-
}
|
|
441
|
-
if (validationStatus === 'PASS') {
|
|
442
|
-
return 'PASS';
|
|
443
|
-
}
|
|
444
|
-
if (validationStatus === 'PASS_WITH_GAPS') {
|
|
445
|
-
return 'PASS_WITH_GAPS';
|
|
446
|
-
}
|
|
447
|
-
return validationStatus === 'FAIL' ? 'FAIL' : 'BLOCKED';
|
|
448
|
-
}
|
|
449
|
-
function toHarnessVerifyStatus(status, reviewStatus, validationStatus, gaps) {
|
|
450
|
-
if (status === 'PASS') {
|
|
451
|
-
return 'PASS';
|
|
452
|
-
}
|
|
453
|
-
if (status === 'PASS_WITH_GAPS') {
|
|
454
|
-
return 'GAPS';
|
|
455
|
-
}
|
|
456
|
-
if (!reviewStatus || !validationStatus || gaps.some((gap) => gap.field === 'review_artifact' || gap.field === 'validation_artifact')) {
|
|
457
|
-
return 'HUMAN_NEEDED';
|
|
458
|
-
}
|
|
459
|
-
return 'BLOCKED';
|
|
460
|
-
}
|
|
461
|
-
async function readArtifactIfExists(projectRoot, runId, runRelativeArtifactPath) {
|
|
462
|
-
try {
|
|
463
|
-
if (isBranchStageEvidenceRef(runRelativeArtifactPath)) {
|
|
464
|
-
try {
|
|
465
|
-
return await readFile(getBranchStageEvidencePathFromRef(projectRoot, runRelativeArtifactPath), 'utf8');
|
|
466
|
-
}
|
|
467
|
-
catch {
|
|
468
|
-
return await readArtifact(projectRoot, runId, toEvidencePayloadFileName(runRelativeArtifactPath));
|
|
469
|
-
}
|
|
470
|
-
}
|
|
471
|
-
return await readArtifact(projectRoot, runId, toEvidencePayloadFileName(runRelativeArtifactPath));
|
|
472
|
-
}
|
|
473
|
-
catch {
|
|
474
|
-
return '';
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
function artifactPathForAgent(state, taskId, agent) {
|
|
478
|
-
const delegation = Object.values(state.delegations).find((candidate) => candidate.task === taskId && candidate.agent === agent && candidate.status === 'COMPLETED');
|
|
479
|
-
if (delegation) {
|
|
480
|
-
return delegation.expectedArtifact;
|
|
481
|
-
}
|
|
482
|
-
const artifact = state.artifacts.find((candidate) => candidate.task === taskId && candidate.agent === agent);
|
|
483
|
-
return artifact?.path ?? null;
|
|
484
|
-
}
|
|
485
|
-
function agentFromArtifactPath(artifactPath) {
|
|
486
|
-
const kind = artifactKind(artifactPath);
|
|
487
|
-
if (kind === 'implement') {
|
|
488
|
-
return 'implementer';
|
|
489
|
-
}
|
|
490
|
-
if (kind === 'review' || kind === 'validation' || kind === 'debug') {
|
|
491
|
-
return kind === 'debug' ? 'debugger' : kind === 'review' ? 'reviewer' : 'validator';
|
|
492
|
-
}
|
|
493
|
-
if (kind === 'gap-report') {
|
|
494
|
-
return 'runtime';
|
|
495
|
-
}
|
|
496
|
-
return 'unknown';
|
|
497
|
-
}
|
|
498
|
-
function executedCommandsFromLedger(entries) {
|
|
499
|
-
return [...new Set(entries
|
|
500
|
-
.filter((entry) => entry.kind === 'command' && entry.status !== 'declared')
|
|
501
|
-
.map((entry) => entry.ref))];
|
|
502
|
-
}
|
|
503
|
-
function sourceLocationEvidence(source) {
|
|
504
|
-
return `${source.filePath}:${source.lineStart}-${source.lineEnd}`;
|
|
505
|
-
}
|
|
506
|
-
function ledgerMaterialRefs(entries) {
|
|
507
|
-
const refs = new Set();
|
|
508
|
-
for (const entry of entries) {
|
|
509
|
-
if (entry.kind === 'material') {
|
|
510
|
-
refs.add(entry.ref);
|
|
511
|
-
}
|
|
512
|
-
for (const ref of entry.materialRefs) {
|
|
513
|
-
refs.add(ref);
|
|
514
|
-
}
|
|
515
|
-
}
|
|
516
|
-
return refs;
|
|
517
|
-
}
|
|
518
|
-
function hashDocumentContent(raw) {
|
|
519
|
-
return createHash('sha256').update(raw.replace(/\r\n/g, '\n'), 'utf8').digest('hex');
|
|
520
|
-
}
|
|
1
|
+
export {};
|
|
521
2
|
//# sourceMappingURL=go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,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,UAAU,CAAC;aAC1E,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AACjC,CAAC;AAED,SAAS,sBAAsB,CAAC,MAAyB;IACvD,OAAO,GAAG,MAAM,CAAC,QAAQ,IAAI,MAAM,CAAC,SAAS,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;AACpE,CAAC;AAED,SAAS,kBAAkB,CAAC,OAAgC;IAC1D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;QAC5B,IAAI,KAAK,CAAC,IAAI,KAAK,UAAU,EAAE,CAAC;YAC9B,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC;QACD,KAAK,MAAM,GAAG,IAAI,KAAK,CAAC,YAAY,EAAE,CAAC;YACrC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QAChB,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAS,mBAAmB,CAAC,GAAW;IACtC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC"}
|
|
1
|
+
{"version":3,"file":"goal-verify.js","sourceRoot":"","sources":["../../src/verification/goal-verify.ts"],"names":[],"mappings":""}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { SddTask, SddTaskGap } from '../sdd-docs/task-parser.js';
|
|
2
|
-
export type
|
|
2
|
+
export type TaskEvidenceJudgmentStatus = 'PASS' | 'PASS_WITH_GAPS' | 'FAIL' | 'BLOCKED';
|
|
3
3
|
export type HarnessVerifyStatus = 'PASS' | 'GAPS' | 'BLOCKED' | 'HUMAN_NEEDED';
|
|
4
4
|
export type SingleTaskLoopStatus = 'completed' | 'blocked' | 'failed';
|
|
5
5
|
interface AcceptanceCoverageItemLike {
|
|
@@ -7,10 +7,10 @@ interface AcceptanceCoverageItemLike {
|
|
|
7
7
|
status: string;
|
|
8
8
|
evidence: string;
|
|
9
9
|
}
|
|
10
|
-
export interface
|
|
10
|
+
export interface TaskEvidenceJudgmentResultLike {
|
|
11
11
|
runId: string;
|
|
12
12
|
taskId: string;
|
|
13
|
-
status:
|
|
13
|
+
status: TaskEvidenceJudgmentStatus;
|
|
14
14
|
standardStatus: HarnessVerifyStatus;
|
|
15
15
|
task: SddTask | null;
|
|
16
16
|
reviewArtifact: string | null;
|
|
@@ -24,7 +24,7 @@ export interface GoalVerifyResultLike {
|
|
|
24
24
|
message: string;
|
|
25
25
|
}
|
|
26
26
|
export interface SingleTaskLoopResultLike {
|
|
27
|
-
runId: string;
|
|
27
|
+
runId: string | null;
|
|
28
28
|
taskId: string;
|
|
29
29
|
status: SingleTaskLoopStatus;
|
|
30
30
|
task: SddTask | null;
|
|
@@ -44,6 +44,6 @@ export interface SingleTaskLoopResultLike {
|
|
|
44
44
|
};
|
|
45
45
|
message: string;
|
|
46
46
|
}
|
|
47
|
-
export declare function
|
|
47
|
+
export declare function renderTaskEvidenceJudgmentResult(result: TaskEvidenceJudgmentResultLike): string;
|
|
48
48
|
export declare function renderSingleTaskLoopResult(result: SingleTaskLoopResultLike): string;
|
|
49
49
|
export {};
|