sdd-agent-platform 0.4.0 → 0.4.2
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 +36 -39
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +72 -71
- 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 +64 -9
- 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 +0 -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 +26 -17
- 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 +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +13 -9
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +16 -20
- 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 +1 -7
- 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 +26 -8
- 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 +4 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +3 -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 +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +7 -4
- 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 +1 -1
- 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/project.js +8 -8
- 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 +0 -1
- 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 +7 -7
- 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 +0 -24
- 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 +1 -1
- 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 +277 -3
- 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 +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +61 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +15 -8
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -1
- 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 +5 -4
- 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 +16 -7
- 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.d.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/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 +59 -66
- 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 +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +55 -19
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- 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 +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +62 -21
- 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 +20 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +218 -18
- 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 +17 -17
- 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.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +32 -2
- 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.d.ts +2 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +222 -10
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +9 -9
- 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/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/tool-capabilities.js +3 -3
- 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.js +12 -12
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +4 -4
- 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 +4 -7
- 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 +19 -17
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +28 -13
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +61 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +192 -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 +73 -17
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +373 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +11 -4
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +31 -3
- 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 +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +235 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +168 -18
- 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/events.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +22 -54
- 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/invocation-ledger.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +53 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +1 -3
- 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 +51 -34
- 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 +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +169 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +2 -0
- 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 +0 -3
- 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 +5 -44
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +109 -14
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +200 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +276 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +15 -4
- 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 +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +139 -38
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +322 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +241 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +888 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +3870 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +105 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +343 -8
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +348 -3
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +1017 -8
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- 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/test-support/fixtures.js +21 -0
- 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 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +19 -20
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +138 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +44 -37
- 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 +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +19 -49
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +213 -111
- 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/test-runtime.d.ts +28 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +546 -125
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +450 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +105 -30
- 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 +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -0
- 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.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +164 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +182 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- 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.d.ts +8 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +25 -11
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +80 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +674 -41
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +49 -1
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +72 -71
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +65 -9
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +52 -6
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +26 -17
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +44 -29
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +15 -11
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +10 -4
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +17 -20
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +2 -8
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +27 -8
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +4 -1
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +8 -5
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +0 -21
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +217 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -3
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +16 -11
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +57 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +11 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +17 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +16 -7
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +34 -13
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +60 -67
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +58 -19
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +74 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +8 -3
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +319 -20
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +17 -17
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +42 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +238 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +45 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +12 -12
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +4 -7
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +20 -18
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +32 -13
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +68 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +212 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +391 -6
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +78 -17
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +11 -4
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +32 -3
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +279 -0
- package/node_modules/@sdd-agent-platform/core/src/router.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +173 -18
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +24 -59
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +59 -9
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +1 -5
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +53 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +55 -41
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +252 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +6 -46
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +1 -13
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +131 -14
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +96 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +292 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +306 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +15 -4
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +261 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +169 -41
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +450 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +322 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2903 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5831 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +9 -1
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +239 -16
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +497 -8
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +560 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1510 -9
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +20 -20
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +177 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +13 -87
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +46 -42
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +18 -52
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +84 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +138 -64
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +226 -116
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +148 -48
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +619 -136
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +383 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +556 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +131 -8
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +117 -30
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +425 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +507 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +182 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +174 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +194 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +115 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +19 -4
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +33 -11
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +224 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +851 -9
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +862 -45
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -0
- package/package.json +1 -1
- 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 +13 -2
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/execution.js +49 -1
- 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 +6 -1
- package/packages/cli/dist/commands/init.js.map +1 -1
- package/packages/cli/dist/commands/lifecycle.js +15 -2
- package/packages/cli/dist/commands/lifecycle.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +48 -2
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +52 -2
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +6 -0
- package/packages/cli/dist/commands/stage-close.js +295 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +70 -4
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js +4 -4
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/test.js +272 -5
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +9 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +257 -20
- package/packages/cli/dist/commands/verify.js.map +1 -1
- package/packages/cli/dist/dispatch.js +4 -9
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +42 -27
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/doctor.js +1 -1
- 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 +1 -0
- package/packages/cli/dist/renderers/json.js +3 -0
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +2 -1
- package/packages/cli/dist/renderers/registry-runtime.js +27 -2
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +5 -3
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +0 -4
- package/packages/cli/dist/renderers/workflow.js +46 -84
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/skill-import-args.d.ts +10 -0
- package/packages/cli/dist/skill-import-args.js +47 -0
- package/packages/cli/dist/skill-import-args.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +72 -71
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +64 -9
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +0 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +26 -17
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +3 -0
- package/packages/core/dist/config/init-project.js +13 -9
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +3 -1
- package/packages/core/dist/config/project-config.js +7 -3
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +4 -4
- package/packages/core/dist/config/starter-documents.js +16 -20
- 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 +1 -7
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +26 -8
- 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 +4 -1
- package/packages/core/dist/contracts.js +3 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +3 -0
- package/packages/core/dist/delegation/validation.d.ts +3 -0
- package/packages/core/dist/delegation/validation.js +7 -4
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +8 -8
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +0 -1
- package/packages/core/dist/doctor/checks/registries.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +7 -7
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-trust.js +0 -24
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +277 -3
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +23 -0
- package/packages/core/dist/evidence/lookup.js +61 -0
- package/packages/core/dist/evidence/lookup.js.map +1 -0
- package/packages/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/packages/core/dist/execution/agent-execution-records.js +15 -8
- package/packages/core/dist/execution/agent-execution-records.js.map +1 -1
- 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 +5 -4
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +16 -7
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/packages/core/dist/execution/stage-team-runtime.js +145 -0
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/packages/core/dist/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 +59 -66
- 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 +3 -0
- package/packages/core/dist/lifecycle/ship.js +55 -19
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.d.ts +12 -2
- package/packages/core/dist/orchestration/runtime.js +62 -21
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +20 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +218 -18
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +17 -17
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/packages/core/dist/registries/agent-runtime-static.js +32 -2
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.d.ts +2 -17
- package/packages/core/dist/registries/capability-sources.js +222 -10
- package/packages/core/dist/registries/capability-sources.js.map +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +9 -9
- 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/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +3 -3
- 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.js +12 -12
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +4 -4
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +4 -7
- 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 +19 -17
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +28 -13
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +61 -1
- package/packages/core/dist/router/route-projection.d.ts +3 -1
- package/packages/core/dist/router/route-projection.js +192 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +73 -17
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.d.ts +28 -0
- package/packages/core/dist/router/runtime-import.js +373 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- package/packages/core/dist/router/runtime-inspection.js +11 -4
- package/packages/core/dist/router/runtime-inspection.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +31 -3
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
- package/packages/core/dist/router/stage-route-binding.js +235 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +2 -0
- package/packages/core/dist/router.js +2 -0
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +16 -0
- package/packages/core/dist/run-state/artifacts.js +168 -18
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/events.js +2 -2
- package/packages/core/dist/run-state/events.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +3 -3
- package/packages/core/dist/run-state/inspect-run.js +22 -54
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/invocation-ledger.js +2 -2
- package/packages/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +53 -9
- package/packages/core/dist/run-state/run-index.d.ts +0 -2
- package/packages/core/dist/run-state/run-index.js +1 -3
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +51 -34
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +65 -0
- package/packages/core/dist/run-state/task-evidence.js +169 -0
- package/packages/core/dist/run-state/task-evidence.js.map +1 -0
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +2 -0
- package/packages/core/dist/run-state.js +2 -0
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +0 -3
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +5 -44
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +20 -0
- package/packages/core/dist/runtime-paths.js +109 -14
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +200 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/context.js +1 -1
- package/packages/core/dist/sdd-docs/context.js.map +1 -1
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +276 -0
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +15 -4
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +21 -0
- package/packages/core/dist/sdd-docs/task-parser.js +139 -38
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +322 -0
- package/packages/core/dist/stage-artifacts.js.map +1 -0
- package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/packages/core/dist/stage-collaboration-contracts.js +241 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +888 -0
- package/packages/core/dist/stage-collaboration.js +3870 -0
- package/packages/core/dist/stage-collaboration.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.js +8 -1
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +105 -1
- package/packages/core/dist/status/project-status.js +343 -8
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +348 -3
- package/packages/core/dist/storage/runtime-store.js +1017 -8
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- 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/test-support/fixtures.js +21 -0
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +19 -20
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.d.ts +44 -0
- package/packages/core/dist/truth-reconciliation.js +138 -0
- package/packages/core/dist/truth-reconciliation.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -1
- package/packages/core/dist/verification/goal-verify.js +44 -37
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +0 -2
- package/packages/core/dist/verification/rendering.js +19 -49
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/review-gate.d.ts +22 -0
- package/packages/core/dist/verification/review-gate.js +53 -0
- package/packages/core/dist/verification/review-gate.js.map +1 -0
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +213 -111
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +28 -3
- package/packages/core/dist/verification/test-runtime.js +546 -125
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-cache.d.ts +26 -0
- package/packages/core/dist/verification/validation-cache.js +73 -0
- package/packages/core/dist/verification/validation-cache.js.map +1 -0
- package/packages/core/dist/verification/validation-wave.d.ts +76 -0
- package/packages/core/dist/verification/validation-wave.js +450 -0
- package/packages/core/dist/verification/validation-wave.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +3 -1
- package/packages/core/dist/verification/verify-contract.js +105 -30
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +2 -0
- package/packages/core/dist/verification.js +2 -0
- 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.d.ts +24 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/packages/core/dist/workflow-gate/hard-checks.js +164 -0
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
- package/packages/core/dist/workflow-gate/policy.js +182 -0
- package/packages/core/dist/workflow-gate/policy.js.map +1 -0
- package/packages/core/dist/workflow-gate/types.d.ts +88 -0
- package/packages/core/dist/workflow-gate/types.js +2 -0
- package/packages/core/dist/workflow-gate/types.js.map +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/packages/core/dist/workflow-state/dependencies.js +25 -11
- package/packages/core/dist/workflow-state/dependencies.js.map +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +80 -3
- package/packages/core/dist/workflow-state/resolve.js +674 -41
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/dist/workflow-state.d.ts +1 -0
- package/packages/core/dist/workflow-state.js +1 -0
- package/packages/core/dist/workflow-state.js.map +1 -1
- package/packages/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +0 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +0 -221
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +0 -91
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -395
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -248
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -522
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -446
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/packages/cli/dist/commands/artifact.d.ts +0 -6
- package/packages/cli/dist/commands/artifact.js +0 -168
- package/packages/cli/dist/commands/artifact.js.map +0 -1
- package/packages/cli/dist/commands/sync-back.d.ts +0 -6
- package/packages/cli/dist/commands/sync-back.js +0 -82
- package/packages/cli/dist/commands/sync-back.js.map +0 -1
- package/packages/cli/dist/renderers/artifacts.d.ts +0 -5
- package/packages/cli/dist/renderers/artifacts.js +0 -43
- package/packages/cli/dist/renderers/artifacts.js.map +0 -1
- package/packages/core/dist/doctor/render.d.ts +0 -2
- package/packages/core/dist/doctor/render.js +0 -44
- package/packages/core/dist/doctor/render.js.map +0 -1
- package/packages/core/dist/sync-back/apply.d.ts +0 -17
- package/packages/core/dist/sync-back/apply.js +0 -221
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -91
- package/packages/core/dist/sync-back/inspect.js +0 -395
- package/packages/core/dist/sync-back/inspect.js.map +0 -1
- package/packages/core/dist/sync-back.d.ts +0 -2
- package/packages/core/dist/sync-back.js +0 -3
- package/packages/core/dist/sync-back.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-paths.js","sourceRoot":"","sources":["../src/runtime-paths.ts"],"names":[],"mappings":"AAA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,OAAO,KAAiB,CAAC;AAC3B,CAAC;AAED,SAAS,oCAAoC,CAAC,QAAgB;IAC5D,IAAI,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,QAAQ,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9G,MAAM,IAAI,KAAK,CAAC,6DAA6D,QAAQ,EAAE,CAAC,CAAC;IAC3F,CAAC;IACD,MAAM,UAAU,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;IACnD,qBAAqB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAC;IAC3D,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,gBAAgB,GAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import type { RuntimeProjectionEnvelope, RuntimeProjectionStaleness, RuntimeRef } from './contracts.js';
|
|
2
|
+
import { type RuntimeProjectionEnvelopeWriteResult } from './storage/runtime-store.js';
|
|
3
|
+
export declare const RUNTIME_PROJECTION_P0_CONTRACT_VERSION: "phase9.19-runtime-sqlite-contract-projection-p0-v1";
|
|
4
|
+
export declare const RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE = "phase9_19_ref_hash_registry";
|
|
5
|
+
export declare const RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION = "phase9.19-ref-hash-registry-v1";
|
|
6
|
+
export declare const STAGE_ROUTE_BINDING_PROJECTION_TYPE = "phase9_18_stage_route_binding";
|
|
7
|
+
export declare const STAGE_ROUTE_BINDING_PRODUCER_VERSION = "phase9.18-stage-route-binding-v1";
|
|
8
|
+
export declare const TRUTH_RECONCILIATION_PROJECTION_TYPE = "phase9_21_truth_reconciliation";
|
|
9
|
+
export type RuntimeProjectionP0Key = 'lifecycleDecisions' | 'riskSignals' | 'stageRuns' | 'stageHandoffs' | 'gates' | 'gapBlockers' | 'evidenceItems' | 'evidenceSets' | 'selectionPointers' | 'workflowCurrentState' | 'taskOrchestration' | 'validationUnits' | 'truthAlignment' | 'truthReconciliation' | 'stageRouteBindings' | 'nextIntent' | 'auditEvents';
|
|
10
|
+
export type RuntimeProjectionP0Storage = 'sqlite' | 'sqlite-ref-hash-only' | 'sqlite-projection';
|
|
11
|
+
export type RuntimeProjectionP0HealthStatus = 'pass' | 'warn' | 'blocked';
|
|
12
|
+
export type RuntimeRefFreshnessStatus = 'fresh' | 'stale' | 'missing' | 'unhashed' | 'unsafe' | 'not_file_backed';
|
|
13
|
+
export interface RuntimeProjectionP0InventoryItem {
|
|
14
|
+
key: RuntimeProjectionP0Key;
|
|
15
|
+
storage: RuntimeProjectionP0Storage;
|
|
16
|
+
primitive: string;
|
|
17
|
+
writer: 'runtime';
|
|
18
|
+
responsibility: string;
|
|
19
|
+
consumers: string[];
|
|
20
|
+
markdownBodyAuthority: false;
|
|
21
|
+
}
|
|
22
|
+
export interface RuntimeRefFreshness {
|
|
23
|
+
ref: RuntimeRef;
|
|
24
|
+
normalizedRef: string;
|
|
25
|
+
expectedHash: string | null;
|
|
26
|
+
currentHash: string | null;
|
|
27
|
+
status: RuntimeRefFreshnessStatus;
|
|
28
|
+
reason: string;
|
|
29
|
+
}
|
|
30
|
+
export interface RuntimeRefHashRegistryProjection {
|
|
31
|
+
contract: typeof RUNTIME_PROJECTION_P0_CONTRACT_VERSION;
|
|
32
|
+
branch: string;
|
|
33
|
+
refs: RuntimeRefFreshness[];
|
|
34
|
+
status: 'fresh' | 'blocked';
|
|
35
|
+
staleRefs: RuntimeRef[];
|
|
36
|
+
reasons: string[];
|
|
37
|
+
}
|
|
38
|
+
export interface RuntimeProjectionP0Diagnostic {
|
|
39
|
+
contract: typeof RUNTIME_PROJECTION_P0_CONTRACT_VERSION;
|
|
40
|
+
branch: string;
|
|
41
|
+
status: RuntimeProjectionP0HealthStatus;
|
|
42
|
+
inventory: RuntimeProjectionP0InventoryItem[];
|
|
43
|
+
projectionCounts: Record<string, number>;
|
|
44
|
+
refHashRegistry: {
|
|
45
|
+
projectionType: typeof RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE;
|
|
46
|
+
envelopeStaleness: RuntimeProjectionStaleness;
|
|
47
|
+
status: RuntimeRefHashRegistryProjection['status'] | 'missing';
|
|
48
|
+
staleRefs: RuntimeRef[];
|
|
49
|
+
reasons: string[];
|
|
50
|
+
};
|
|
51
|
+
reasons: string[];
|
|
52
|
+
}
|
|
53
|
+
export declare const RUNTIME_PROJECTION_P0_INVENTORY: readonly RuntimeProjectionP0InventoryItem[];
|
|
54
|
+
export declare const RUNTIME_PROJECTION_P0_PROJECTION_TYPES: readonly ["phase8_lifecycle_risk_decision", "phase8_stage_run", "phase8_workflow_handoff", "phase9_12_truth_alignment", "phase9_21_truth_reconciliation", "phase9_18_stage_route_binding", "phase9_25_workflow_current_state", "phase9_26_task_orchestration", "phase9_26_validation_unit", "phase9_29_next_intent", "phase9_19_ref_hash_registry"];
|
|
55
|
+
export declare function inspectRuntimeProjectionP0(projectRoot: string, branch: string): Promise<RuntimeProjectionP0Diagnostic>;
|
|
56
|
+
export declare function recordRuntimeRefHashRegistryProjection(projectRoot: string, input: {
|
|
57
|
+
branch: string;
|
|
58
|
+
refs: RuntimeRef[];
|
|
59
|
+
generatedAt?: string;
|
|
60
|
+
}): Promise<RuntimeProjectionEnvelopeWriteResult<RuntimeRefHashRegistryProjection>>;
|
|
61
|
+
export declare function readRuntimeRefHashRegistryProjection(projectRoot: string, branch: string): Promise<RuntimeProjectionEnvelope<RuntimeRefHashRegistryProjection> | null>;
|
|
62
|
+
export declare function inspectRuntimeRefFreshness(projectRoot: string, refs: RuntimeRef[]): Promise<RuntimeRefFreshness[]>;
|
|
63
|
+
export declare function runtimeRefHashRegistryScopeKey(branch: string): string;
|
|
64
|
+
export declare function runtimeProjectionStableHash(value: unknown): string;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
import { readFile } from 'node:fs/promises';
|
|
3
|
+
import path from 'node:path';
|
|
4
|
+
import { branchToSafePartition, normalizePortablePath } from './path-safety.js';
|
|
5
|
+
import { hashDocumentContent } from './sdd-docs/document-hashes.js';
|
|
6
|
+
import { listRuntimeProjections, readRuntimeProjectionEnvelope, recordRuntimeProjectionEnvelope, runtimeProjectionStaleness } from './storage/runtime-store.js';
|
|
7
|
+
import { NEXT_INTENT_PROJECTION_TYPE, TASK_ORCHESTRATION_PROJECTION_TYPE, VALIDATION_UNIT_PROJECTION_TYPE, WORKFLOW_CURRENT_STATE_PROJECTION_TYPE } from './workflow-state/runtime-projections.js';
|
|
8
|
+
export const RUNTIME_PROJECTION_P0_CONTRACT_VERSION = 'phase9.19-runtime-sqlite-contract-projection-p0-v1';
|
|
9
|
+
export const RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE = 'phase9_19_ref_hash_registry';
|
|
10
|
+
export const RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION = 'phase9.19-ref-hash-registry-v1';
|
|
11
|
+
export const STAGE_ROUTE_BINDING_PROJECTION_TYPE = 'phase9_18_stage_route_binding';
|
|
12
|
+
export const STAGE_ROUTE_BINDING_PRODUCER_VERSION = 'phase9.18-stage-route-binding-v1';
|
|
13
|
+
export const TRUTH_RECONCILIATION_PROJECTION_TYPE = 'phase9_21_truth_reconciliation';
|
|
14
|
+
export const RUNTIME_PROJECTION_P0_INVENTORY = [
|
|
15
|
+
inventoryItem('lifecycleDecisions', 'sqlite', 'projections:phase8_lifecycle_risk_decision', 'Lifecycle/risk authority created only by /sdd or /sdd:spec.', ['router', 'stage-close', 'status', 'doctor']),
|
|
16
|
+
inventoryItem('riskSignals', 'sqlite', 'projections:phase8_lifecycle_risk_decision', 'Risk signal snapshot and lifecycle policy output for routing and gates.', ['router', 'workflow-gate', 'status']),
|
|
17
|
+
inventoryItem('stageRuns', 'sqlite', 'projections:phase8_stage_run', 'Runtime-owned stage run state and terminal health.', ['status', 'stage-close', 'ship']),
|
|
18
|
+
inventoryItem('stageHandoffs', 'sqlite', 'projections:phase8_workflow_handoff', 'Runtime handoff packet between completed stages and next runtime stage.', ['status', 'stage-close']),
|
|
19
|
+
inventoryItem('gates', 'sqlite', 'workflow_gate_decisions', 'Hard gate decisions and policy outcomes.', ['workflow-gate', 'status', 'ship']),
|
|
20
|
+
inventoryItem('gapBlockers', 'sqlite', 'durable_gaps', 'Mutable gap/blocker lifecycle with runtime status authority.', ['doctor', 'status', 'stage-close']),
|
|
21
|
+
inventoryItem('evidenceItems', 'sqlite-ref-hash-only', 'stage_artifacts/artifact_payloads', 'Agent-authored Markdown evidence registered by ref, hash, contract, producer, and status.', ['workflow-gate', 'stage-close', 'doctor']),
|
|
22
|
+
inventoryItem('evidenceSets', 'sqlite-ref-hash-only', 'evidence_sets/evidence_set_items', 'Accepted evidence sets selected by refs and digests, not Markdown bodies.', ['workflow-gate', 'ship', 'status']),
|
|
23
|
+
inventoryItem('selectionPointers', 'sqlite', 'selection_pointers', 'Active accepted evidence pointer for downstream consumers.', ['workflow-gate', 'latest-eligible-run', 'ship']),
|
|
24
|
+
inventoryItem('workflowCurrentState', 'sqlite-projection', `projections:${WORKFLOW_CURRENT_STATE_PROJECTION_TYPE}`, 'Runtime-owned lifecycle, task, and validation-unit current state projection.', ['status', 'router', 'ai-tool-entry']),
|
|
25
|
+
inventoryItem('taskOrchestration', 'sqlite-projection', `projections:${TASK_ORCHESTRATION_PROJECTION_TYPE}`, 'Parsed task orchestration read model with task-level hashes, dependencies, validation unit binding, and capability signals.', ['status', 'do-manager', 'tasks-manager']),
|
|
26
|
+
inventoryItem('validationUnits', 'sqlite-projection', `projections:${VALIDATION_UNIT_PROJECTION_TYPE}`, 'Runtime validation-unit read model derived from verify contracts and task orchestration.', ['status', 'test-manager', 'workflow-gate']),
|
|
27
|
+
inventoryItem('truthAlignment', 'sqlite', 'projections:phase9_12_truth_alignment', 'Goal-verify truth alignment projection for ship readiness.', ['ship', 'status']),
|
|
28
|
+
inventoryItem('truthReconciliation', 'sqlite', `projections:${TRUTH_RECONCILIATION_PROJECTION_TYPE}`, 'Owner-stage reconciliation decision slot for minimal rerun frontier.', ['orchestrator', 'status', 'ship']),
|
|
29
|
+
inventoryItem('stageRouteBindings', 'sqlite', `projections:${STAGE_ROUTE_BINDING_PROJECTION_TYPE}`, 'Stage-local command input binding to an accepted runtime target.', ['router', 'status']),
|
|
30
|
+
inventoryItem('nextIntent', 'sqlite-projection', `projections:${NEXT_INTENT_PROJECTION_TYPE}`, 'Advisory runtime next-action read model; execution still checks readiness and gates.', ['status', 'ai-tool-entry']),
|
|
31
|
+
inventoryItem('auditEvents', 'sqlite', 'events/activities', 'Append-only runtime events and activity records for auditability.', ['doctor', 'run-inspect'])
|
|
32
|
+
];
|
|
33
|
+
export const RUNTIME_PROJECTION_P0_PROJECTION_TYPES = [
|
|
34
|
+
'phase8_lifecycle_risk_decision',
|
|
35
|
+
'phase8_stage_run',
|
|
36
|
+
'phase8_workflow_handoff',
|
|
37
|
+
'phase9_12_truth_alignment',
|
|
38
|
+
TRUTH_RECONCILIATION_PROJECTION_TYPE,
|
|
39
|
+
STAGE_ROUTE_BINDING_PROJECTION_TYPE,
|
|
40
|
+
WORKFLOW_CURRENT_STATE_PROJECTION_TYPE,
|
|
41
|
+
TASK_ORCHESTRATION_PROJECTION_TYPE,
|
|
42
|
+
VALIDATION_UNIT_PROJECTION_TYPE,
|
|
43
|
+
NEXT_INTENT_PROJECTION_TYPE,
|
|
44
|
+
RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE
|
|
45
|
+
];
|
|
46
|
+
export async function inspectRuntimeProjectionP0(projectRoot, branch) {
|
|
47
|
+
const partition = branchToSafePartition(branch);
|
|
48
|
+
const projections = await listRuntimeProjections(projectRoot, [...RUNTIME_PROJECTION_P0_PROJECTION_TYPES]);
|
|
49
|
+
const projectionCounts = Object.fromEntries(RUNTIME_PROJECTION_P0_PROJECTION_TYPES.map((projectionType) => [projectionType, projections.filter((projection) => projection.projectionType === projectionType).length]));
|
|
50
|
+
const envelope = await readRuntimeRefHashRegistryProjection(projectRoot, partition);
|
|
51
|
+
const refHashRegistry = await inspectRefHashRegistry(projectRoot, partition, envelope);
|
|
52
|
+
const status = refHashRegistry.status === 'blocked' ? 'blocked' : envelope ? 'pass' : 'warn';
|
|
53
|
+
const reasons = runtimeProjectionP0Reasons(status, refHashRegistry.reasons);
|
|
54
|
+
return {
|
|
55
|
+
contract: RUNTIME_PROJECTION_P0_CONTRACT_VERSION,
|
|
56
|
+
branch: partition,
|
|
57
|
+
status,
|
|
58
|
+
inventory: [...RUNTIME_PROJECTION_P0_INVENTORY],
|
|
59
|
+
projectionCounts,
|
|
60
|
+
refHashRegistry,
|
|
61
|
+
reasons
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export async function recordRuntimeRefHashRegistryProjection(projectRoot, input) {
|
|
65
|
+
const branch = branchToSafePartition(input.branch);
|
|
66
|
+
const refs = await inspectRuntimeRefFreshness(projectRoot, input.refs);
|
|
67
|
+
const staleRefs = refs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.ref);
|
|
68
|
+
const projection = {
|
|
69
|
+
contract: RUNTIME_PROJECTION_P0_CONTRACT_VERSION,
|
|
70
|
+
branch,
|
|
71
|
+
refs,
|
|
72
|
+
status: staleRefs.length === 0 ? 'fresh' : 'blocked',
|
|
73
|
+
staleRefs,
|
|
74
|
+
reasons: refHashRegistryReasons(staleRefs, refs)
|
|
75
|
+
};
|
|
76
|
+
return recordRuntimeProjectionEnvelope(projectRoot, {
|
|
77
|
+
projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
|
|
78
|
+
scopeKey: runtimeRefHashRegistryScopeKey(branch),
|
|
79
|
+
inputHash: runtimeProjectionStableHash(projection),
|
|
80
|
+
producer: 'phase9.19-runtime-projection-p0',
|
|
81
|
+
producerVersion: RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION,
|
|
82
|
+
generatedAt: input.generatedAt,
|
|
83
|
+
payload: projection
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
export async function readRuntimeRefHashRegistryProjection(projectRoot, branch) {
|
|
87
|
+
return readRuntimeProjectionEnvelope(projectRoot, RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE, runtimeRefHashRegistryScopeKey(branchToSafePartition(branch)));
|
|
88
|
+
}
|
|
89
|
+
export async function inspectRuntimeRefFreshness(projectRoot, refs) {
|
|
90
|
+
return Promise.all(refs.map((ref) => inspectRuntimeRef(projectRoot, ref)));
|
|
91
|
+
}
|
|
92
|
+
export function runtimeRefHashRegistryScopeKey(branch) {
|
|
93
|
+
return [branchToSafePartition(branch), 'ref-hash-registry'].join(':');
|
|
94
|
+
}
|
|
95
|
+
export function runtimeProjectionStableHash(value) {
|
|
96
|
+
return createHash('sha256').update(JSON.stringify(value)).digest('hex');
|
|
97
|
+
}
|
|
98
|
+
async function inspectRefHashRegistry(projectRoot, branch, envelope) {
|
|
99
|
+
if (!envelope) {
|
|
100
|
+
return {
|
|
101
|
+
projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
|
|
102
|
+
envelopeStaleness: 'unknown',
|
|
103
|
+
status: 'missing',
|
|
104
|
+
staleRefs: [],
|
|
105
|
+
reasons: ['Runtime ref/hash registry projection is missing; register accepted Markdown refs before relying on freshness diagnostics.']
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
const currentRefs = await inspectRuntimeRefFreshness(projectRoot, envelope.payload.refs.map((entry) => entry.ref));
|
|
109
|
+
const staleRefs = currentRefs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.ref);
|
|
110
|
+
const currentProjection = {
|
|
111
|
+
...envelope.payload,
|
|
112
|
+
refs: currentRefs,
|
|
113
|
+
status: staleRefs.length === 0 ? 'fresh' : 'blocked',
|
|
114
|
+
staleRefs,
|
|
115
|
+
reasons: refHashRegistryReasons(staleRefs, currentRefs)
|
|
116
|
+
};
|
|
117
|
+
return {
|
|
118
|
+
projectionType: RUNTIME_REF_HASH_REGISTRY_PROJECTION_TYPE,
|
|
119
|
+
envelopeStaleness: runtimeProjectionStaleness(envelope, {
|
|
120
|
+
inputHash: runtimeProjectionStableHash(currentProjection),
|
|
121
|
+
producerVersion: RUNTIME_REF_HASH_REGISTRY_PRODUCER_VERSION
|
|
122
|
+
}),
|
|
123
|
+
status: currentProjection.status,
|
|
124
|
+
staleRefs,
|
|
125
|
+
reasons: currentProjection.reasons
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
async function inspectRuntimeRef(projectRoot, ref) {
|
|
129
|
+
const normalizedRef = normalizePortablePath(ref.ref);
|
|
130
|
+
if (!isFileBackedRef(ref)) {
|
|
131
|
+
return freshness(ref, normalizedRef, null, null, 'not_file_backed', `Runtime ref kind ${ref.kind} is not file-backed.`);
|
|
132
|
+
}
|
|
133
|
+
if (!ref.hash) {
|
|
134
|
+
return freshness(ref, normalizedRef, null, null, 'unhashed', `File-backed ref ${ref.ref} has no expected hash.`);
|
|
135
|
+
}
|
|
136
|
+
const safePath = safeProjectRelativePath(projectRoot, normalizedRef);
|
|
137
|
+
if (!safePath) {
|
|
138
|
+
return freshness(ref, normalizedRef, ref.hash, null, 'unsafe', `File-backed ref ${ref.ref} is not a safe project-relative path.`);
|
|
139
|
+
}
|
|
140
|
+
try {
|
|
141
|
+
const currentHash = hashDocumentContent(await readFile(safePath, 'utf8'));
|
|
142
|
+
return hashMatches(ref.hash, currentHash)
|
|
143
|
+
? freshness(ref, normalizedRef, ref.hash, currentHash, 'fresh', `File-backed ref ${normalizedRef} is fresh.`)
|
|
144
|
+
: freshness(ref, normalizedRef, ref.hash, currentHash, 'stale', `File-backed ref ${normalizedRef} hash is stale: expected ${ref.hash}, actual ${currentHash}.`);
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
if (isMissingFileError(error)) {
|
|
148
|
+
return freshness(ref, normalizedRef, ref.hash, null, 'missing', `File-backed ref ${normalizedRef} is missing.`);
|
|
149
|
+
}
|
|
150
|
+
throw error;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function inventoryItem(key, storage, primitive, responsibility, consumers) {
|
|
154
|
+
return { key, storage, primitive, writer: 'runtime', responsibility, consumers, markdownBodyAuthority: false };
|
|
155
|
+
}
|
|
156
|
+
function runtimeProjectionP0Reasons(status, refHashReasons) {
|
|
157
|
+
if (status === 'blocked') {
|
|
158
|
+
return refHashReasons;
|
|
159
|
+
}
|
|
160
|
+
if (status === 'warn') {
|
|
161
|
+
return ['Runtime projection P0 inventory is available; ref/hash freshness registry has not been recorded yet.'];
|
|
162
|
+
}
|
|
163
|
+
return ['Runtime projection P0 inventory is available and registered file-backed refs are fresh.'];
|
|
164
|
+
}
|
|
165
|
+
function refHashRegistryReasons(staleRefs, refs) {
|
|
166
|
+
if (staleRefs.length === 0) {
|
|
167
|
+
return ['Registered file-backed refs are fresh; non-file-backed refs remain metadata-only.'];
|
|
168
|
+
}
|
|
169
|
+
return refs.filter((ref) => blocksRefHashRegistry(ref.status)).map((ref) => ref.reason);
|
|
170
|
+
}
|
|
171
|
+
function blocksRefHashRegistry(status) {
|
|
172
|
+
return status === 'stale' || status === 'missing' || status === 'unhashed' || status === 'unsafe';
|
|
173
|
+
}
|
|
174
|
+
function isFileBackedRef(ref) {
|
|
175
|
+
if (ref.kind === 'document' || ref.kind === 'artifact' || ref.kind === 'evidence') {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
return /^(specs|runs)\//.test(normalizePortablePath(ref.ref));
|
|
179
|
+
}
|
|
180
|
+
function safeProjectRelativePath(projectRoot, normalizedRef) {
|
|
181
|
+
if (path.isAbsolute(normalizedRef) || normalizedRef.startsWith('../') || normalizedRef === '..') {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
const projectPath = path.resolve(projectRoot);
|
|
185
|
+
const absolutePath = path.resolve(projectPath, normalizedRef);
|
|
186
|
+
return absolutePath === projectPath || absolutePath.startsWith(`${projectPath}${path.sep}`) ? absolutePath : null;
|
|
187
|
+
}
|
|
188
|
+
function freshness(ref, normalizedRef, expectedHash, currentHash, status, reason) {
|
|
189
|
+
return { ref: { ...ref, ref: normalizedRef }, normalizedRef, expectedHash, currentHash, status, reason };
|
|
190
|
+
}
|
|
191
|
+
function hashMatches(expected, actual) {
|
|
192
|
+
return expected.replace(/^sha256:/, '') === actual.replace(/^sha256:/, '');
|
|
193
|
+
}
|
|
194
|
+
function isMissingFileError(error) {
|
|
195
|
+
if (!error || typeof error !== 'object') {
|
|
196
|
+
return false;
|
|
197
|
+
}
|
|
198
|
+
return 'code' in error && error.code === 'ENOENT';
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=runtime-projection-p0.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-projection-p0.js","sourceRoot":"","sources":["../src/runtime-projection-p0.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAChF,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,0BAA0B,EAA6C,MAAM,4BAA4B,CAAC;AAC3M,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,EAClC,+BAA+B,EAC/B,sCAAsC,EACvC,MAAM,yCAAyC,CAAC;AAEjD,MAAM,CAAC,MAAM,sCAAsC,GAAG,oDAA6D,CAAC;AACpH,MAAM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AW,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;AACpH,CAAC;AAED,SAAS,SAAS,CAAC,GAAe,EAAE,aAAqB,EAAE,YAA2B,EAAE,WAA0B,EAAE,MAAiC,EAAE,MAAc;IACnK,OAAO,EAAE,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,GAAG,EAAE,aAAa,EAAE,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC3G,CAAC;AAED,SAAS,WAAW,CAAC,QAAgB,EAAE,MAAc;IACnD,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,KAAK,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;AAC7E,CAAC;AAED,SAAS,kBAAkB,CAAC,KAAc;IACxC,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,MAAM,IAAI,KAAK,IAAK,KAA4B,CAAC,IAAI,KAAK,QAAQ,CAAC;AAC5E,CAAC"}
|
|
@@ -20,7 +20,7 @@ export async function resolveSddContext(projectRoot, options = {}) {
|
|
|
20
20
|
if (projectConfigBranch) {
|
|
21
21
|
return resolvedContext(projectRoot, projectConfigBranch, 'project_config', currentGitBranch);
|
|
22
22
|
}
|
|
23
|
-
throw new Error('Cannot resolve SDD branch. Run from a Git branch, pass --branch <branch>, or set sdd.default_branch in .sdd/project.yml.
|
|
23
|
+
throw new Error('Cannot resolve SDD branch. Run from a Git branch, pass --branch <branch>, or set sdd.default_branch in .sdd/project.yml. The spec stage is the workflow partition entry.');
|
|
24
24
|
}
|
|
25
25
|
export async function resolveRunStateContext(projectRoot, state) {
|
|
26
26
|
if (!state.partition && !state.gitBranch) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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K,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC;QAC3F,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QACpC,OAAO,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;IAC3C,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function hashDocumentContent(raw: string): string;
|
|
2
|
+
export declare function hashNormalizedMarkdownContent(raw: string | null): string | null;
|
|
3
|
+
export declare function normalizeMarkdownContentV1(raw: string): string;
|
|
4
|
+
export declare function hashSemanticDocument(raw: string | null): string | null;
|
|
5
|
+
export declare function hashTasksContract(raw: string | null): string | null;
|
|
6
|
+
export declare function documentHashMatches(expected: string, actual: string): boolean;
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { createHash } from 'node:crypto';
|
|
2
|
+
const TASK_CONTRACT_METADATA_KEYS = [
|
|
3
|
+
'id',
|
|
4
|
+
'wave',
|
|
5
|
+
'depends_on',
|
|
6
|
+
'acceptance_refs',
|
|
7
|
+
'plan_refs',
|
|
8
|
+
'affected_files',
|
|
9
|
+
'change_surface',
|
|
10
|
+
'implementation_wave',
|
|
11
|
+
'validation_batch',
|
|
12
|
+
'validation_timing',
|
|
13
|
+
'requires_verify_before_next',
|
|
14
|
+
'validation',
|
|
15
|
+
'risk',
|
|
16
|
+
'required_artifacts',
|
|
17
|
+
'allowed_agents',
|
|
18
|
+
'verification_availability',
|
|
19
|
+
'autonomy',
|
|
20
|
+
'validation_wave',
|
|
21
|
+
'review_gate'
|
|
22
|
+
];
|
|
23
|
+
const TASK_CONTRACT_SECTION_TITLES = [
|
|
24
|
+
'Boundary',
|
|
25
|
+
'Acceptance',
|
|
26
|
+
'Definition of Done',
|
|
27
|
+
'Evidence Expectations'
|
|
28
|
+
];
|
|
29
|
+
const TOP_LEVEL_CONTRACT_SECTION_TITLES = [
|
|
30
|
+
'Delivery Map',
|
|
31
|
+
'Wave Plan',
|
|
32
|
+
'Implementation Waves',
|
|
33
|
+
'Validation Waves',
|
|
34
|
+
'Review Gate',
|
|
35
|
+
'Review Gates',
|
|
36
|
+
'Review Gate Declarations',
|
|
37
|
+
'Phase Gate Checkpoint'
|
|
38
|
+
];
|
|
39
|
+
const RUNTIME_METADATA_KEYS = new Set([
|
|
40
|
+
'accepted_status',
|
|
41
|
+
'close_status',
|
|
42
|
+
'created_at',
|
|
43
|
+
'decision_id',
|
|
44
|
+
'generated_at',
|
|
45
|
+
'generatedat',
|
|
46
|
+
'reviewhash',
|
|
47
|
+
'run_id',
|
|
48
|
+
'runtime_decision_id',
|
|
49
|
+
'targethash',
|
|
50
|
+
'updated_at'
|
|
51
|
+
]);
|
|
52
|
+
export function hashDocumentContent(raw) {
|
|
53
|
+
return sha256(normalizeLineEndings(raw));
|
|
54
|
+
}
|
|
55
|
+
export function hashNormalizedMarkdownContent(raw) {
|
|
56
|
+
return raw === null ? null : sha256(normalizeMarkdownContentV1(raw));
|
|
57
|
+
}
|
|
58
|
+
export function normalizeMarkdownContentV1(raw) {
|
|
59
|
+
const withoutBom = raw.charCodeAt(0) === 0xFEFF ? raw.slice(1) : raw;
|
|
60
|
+
let lines = normalizeLineEndings(withoutBom).split('\n');
|
|
61
|
+
if (lines[0]?.trim() === '---') {
|
|
62
|
+
const frontmatterEnd = lines.findIndex((line, index) => index > 0 && line.trim() === '---');
|
|
63
|
+
if (frontmatterEnd > 0) {
|
|
64
|
+
const frontmatter = lines.slice(1, frontmatterEnd).filter((line) => !isRuntimeMetadataLine(line));
|
|
65
|
+
lines = [...(frontmatter.some((line) => line.trim()) ? ['---', ...frontmatter, '---'] : []), ...lines.slice(frontmatterEnd + 1)];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
const normalized = [];
|
|
69
|
+
let fence = null;
|
|
70
|
+
let previousBlank = false;
|
|
71
|
+
for (const line of lines) {
|
|
72
|
+
if (fence) {
|
|
73
|
+
normalized.push(line);
|
|
74
|
+
if (isClosingFence(line, fence)) {
|
|
75
|
+
fence = null;
|
|
76
|
+
}
|
|
77
|
+
previousBlank = false;
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
const openingFence = parseOpeningFence(line);
|
|
81
|
+
if (openingFence) {
|
|
82
|
+
normalized.push(line);
|
|
83
|
+
fence = openingFence;
|
|
84
|
+
previousBlank = false;
|
|
85
|
+
continue;
|
|
86
|
+
}
|
|
87
|
+
const withoutTrailingWhitespace = line.replace(/[ \t]+$/g, '');
|
|
88
|
+
if (isStandaloneHtmlComment(withoutTrailingWhitespace) || isRuntimeMetadataLine(withoutTrailingWhitespace)) {
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
91
|
+
if (withoutTrailingWhitespace.trim() === '') {
|
|
92
|
+
if (!previousBlank) {
|
|
93
|
+
normalized.push('');
|
|
94
|
+
previousBlank = true;
|
|
95
|
+
}
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
normalized.push(withoutTrailingWhitespace);
|
|
99
|
+
previousBlank = false;
|
|
100
|
+
}
|
|
101
|
+
while (normalized.length > 0 && normalized[0] === '') {
|
|
102
|
+
normalized.shift();
|
|
103
|
+
}
|
|
104
|
+
while (normalized.length > 0 && normalized[normalized.length - 1] === '') {
|
|
105
|
+
normalized.pop();
|
|
106
|
+
}
|
|
107
|
+
return normalized.length > 0 ? `${normalized.join('\n')}\n` : '';
|
|
108
|
+
}
|
|
109
|
+
export function hashSemanticDocument(raw) {
|
|
110
|
+
return hashNormalizedMarkdownContent(raw);
|
|
111
|
+
}
|
|
112
|
+
export function hashTasksContract(raw) {
|
|
113
|
+
if (raw === null) {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
return sha256(stableJson({
|
|
117
|
+
tasks: parseTaskContracts(raw),
|
|
118
|
+
declarations: TOP_LEVEL_CONTRACT_SECTION_TITLES.map((title) => [title, normalizeSectionText(sectionText(raw, title))]).filter(([, value]) => value !== null)
|
|
119
|
+
}));
|
|
120
|
+
}
|
|
121
|
+
export function documentHashMatches(expected, actual) {
|
|
122
|
+
return expected.replace(/^sha256:/, '') === actual;
|
|
123
|
+
}
|
|
124
|
+
function parseTaskContracts(raw) {
|
|
125
|
+
const fencedBlocks = Array.from(raw.matchAll(/^\s*```sdd-task\s*\r?\n([\s\S]*?)\r?^\s*```\s*$/gm));
|
|
126
|
+
return fencedBlocks.map((blockMatch, index) => {
|
|
127
|
+
const block = blockMatch[1] ?? '';
|
|
128
|
+
const blockStart = blockMatch.index ?? 0;
|
|
129
|
+
const blockEnd = blockStart + blockMatch[0].length;
|
|
130
|
+
const nextBlockStart = fencedBlocks[index + 1]?.index ?? raw.length;
|
|
131
|
+
const section = raw.slice(blockEnd, nextTaskStart(raw, blockEnd, nextBlockStart));
|
|
132
|
+
const metadata = parseSimpleYamlBlock(block);
|
|
133
|
+
const heading = nearestTaskHeading(raw.slice(0, blockStart));
|
|
134
|
+
const id = scalarValue(metadata.id) ?? heading?.id ?? null;
|
|
135
|
+
return {
|
|
136
|
+
id,
|
|
137
|
+
title: heading?.title ?? null,
|
|
138
|
+
metadata: Object.fromEntries(TASK_CONTRACT_METADATA_KEYS.map((key) => [key, normalizedMetadataValue(metadata[key])])),
|
|
139
|
+
sections: Object.fromEntries(TASK_CONTRACT_SECTION_TITLES.map((title) => [title, normalizeSectionText(sectionText(section, title))]))
|
|
140
|
+
};
|
|
141
|
+
}).sort((left, right) => String(left.id ?? '').localeCompare(String(right.id ?? '')));
|
|
142
|
+
}
|
|
143
|
+
function normalizeLineEndings(raw) {
|
|
144
|
+
return raw.replace(/\r\n?/g, '\n');
|
|
145
|
+
}
|
|
146
|
+
function parseOpeningFence(line) {
|
|
147
|
+
const match = line.match(/^\s*(`{3,}|~{3,})/);
|
|
148
|
+
if (!match) {
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
const marker = match[1];
|
|
152
|
+
return { character: marker[0], length: marker.length };
|
|
153
|
+
}
|
|
154
|
+
function isClosingFence(line, fence) {
|
|
155
|
+
const escaped = fence.character === '`' ? '`' : '~';
|
|
156
|
+
const match = line.match(new RegExp(`^\\s*(${escaped}{${fence.length},})\\s*$`));
|
|
157
|
+
return Boolean(match);
|
|
158
|
+
}
|
|
159
|
+
function isStandaloneHtmlComment(line) {
|
|
160
|
+
return /^\s*<!--[\s\S]*?-->\s*$/.test(line);
|
|
161
|
+
}
|
|
162
|
+
function isRuntimeMetadataLine(line) {
|
|
163
|
+
const match = line.match(/^\s*(?:-\s*)?([A-Za-z0-9_]+):\s*/);
|
|
164
|
+
if (!match) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
const key = match[1];
|
|
168
|
+
const normalizedKey = key.toLowerCase();
|
|
169
|
+
return /^based_on_.*_hash$/.test(normalizedKey)
|
|
170
|
+
|| RUNTIME_METADATA_KEYS.has(normalizedKey);
|
|
171
|
+
}
|
|
172
|
+
function normalizeSectionText(value) {
|
|
173
|
+
if (!value) {
|
|
174
|
+
return null;
|
|
175
|
+
}
|
|
176
|
+
return value.replace(/\r\n/g, '\n').split('\n').map((line) => line.trim()).filter((line) => line && !/^<!--.*-->$/.test(line)).join('\n');
|
|
177
|
+
}
|
|
178
|
+
function sectionText(raw, title) {
|
|
179
|
+
const escaped = title.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
180
|
+
const sectionPattern = `^\\s*#{2,4}\\s+${escaped}\\s*$([\\s\\S]*?)(?=^\\s*#{2,4}\\s+|$(?![\\s\\S]))`;
|
|
181
|
+
const match = raw.match(new RegExp(sectionPattern, 'im'));
|
|
182
|
+
const text = match?.[1]?.trim() ?? '';
|
|
183
|
+
return text.length > 0 ? text : null;
|
|
184
|
+
}
|
|
185
|
+
function parseSimpleYamlBlock(raw) {
|
|
186
|
+
const result = {};
|
|
187
|
+
const lines = raw.split(/\r?\n/);
|
|
188
|
+
let currentListKey = null;
|
|
189
|
+
for (const line of lines) {
|
|
190
|
+
const trimmed = line.trim();
|
|
191
|
+
if (!trimmed || trimmed.startsWith('#')) {
|
|
192
|
+
continue;
|
|
193
|
+
}
|
|
194
|
+
if (currentListKey && /^-\s+/.test(trimmed)) {
|
|
195
|
+
const current = result[currentListKey];
|
|
196
|
+
const items = Array.isArray(current) ? current : [];
|
|
197
|
+
items.push(unquoteSimpleYamlValue(trimmed.slice(2).trim()));
|
|
198
|
+
result[currentListKey] = items;
|
|
199
|
+
continue;
|
|
200
|
+
}
|
|
201
|
+
const scalarMatch = trimmed.match(/^([A-Za-z0-9_-]+):\s*(.*)$/);
|
|
202
|
+
if (!scalarMatch) {
|
|
203
|
+
currentListKey = null;
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
const key = scalarMatch[1];
|
|
207
|
+
const value = scalarMatch[2].trim();
|
|
208
|
+
if (value === '') {
|
|
209
|
+
result[key] = [];
|
|
210
|
+
currentListKey = key;
|
|
211
|
+
}
|
|
212
|
+
else if (value === '[]') {
|
|
213
|
+
result[key] = [];
|
|
214
|
+
currentListKey = null;
|
|
215
|
+
}
|
|
216
|
+
else if (value.startsWith('[') && value.endsWith(']')) {
|
|
217
|
+
result[key] = value.slice(1, -1).split(',').map((item) => unquoteSimpleYamlValue(item.trim())).filter(Boolean);
|
|
218
|
+
currentListKey = null;
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
result[key] = unquoteSimpleYamlValue(value);
|
|
222
|
+
currentListKey = null;
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return result;
|
|
226
|
+
}
|
|
227
|
+
function normalizedMetadataValue(value) {
|
|
228
|
+
if (Array.isArray(value)) {
|
|
229
|
+
return [...value].filter(Boolean).sort();
|
|
230
|
+
}
|
|
231
|
+
return value && value !== '[]' ? value : null;
|
|
232
|
+
}
|
|
233
|
+
function scalarValue(value) {
|
|
234
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
235
|
+
}
|
|
236
|
+
function unquoteSimpleYamlValue(value) {
|
|
237
|
+
if (value.length >= 2) {
|
|
238
|
+
const first = value[0];
|
|
239
|
+
const last = value[value.length - 1];
|
|
240
|
+
if ((first === '"' && last === '"') || (first === "'" && last === "'")) {
|
|
241
|
+
return value.slice(1, -1);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return value;
|
|
245
|
+
}
|
|
246
|
+
function nearestTaskHeading(prefix) {
|
|
247
|
+
const matches = Array.from(prefix.matchAll(/^\s*###\s+(.+)$/gm));
|
|
248
|
+
const last = matches.at(-1);
|
|
249
|
+
if (!last) {
|
|
250
|
+
return null;
|
|
251
|
+
}
|
|
252
|
+
const raw = last[1].trim();
|
|
253
|
+
const parsed = raw.match(/^([^::\s]+)\s*[::]\s*(.+)$/);
|
|
254
|
+
return {
|
|
255
|
+
raw,
|
|
256
|
+
id: parsed?.[1]?.trim() ?? null,
|
|
257
|
+
title: parsed?.[2]?.trim() ?? raw
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
function nextTaskStart(raw, offset, limit = raw.length) {
|
|
261
|
+
const next = raw.slice(offset, limit).search(/^\s*###\s+/m);
|
|
262
|
+
return next < 0 ? limit : offset + next;
|
|
263
|
+
}
|
|
264
|
+
function stableJson(value) {
|
|
265
|
+
if (Array.isArray(value)) {
|
|
266
|
+
return `[${value.map(stableJson).join(',')}]`;
|
|
267
|
+
}
|
|
268
|
+
if (value && typeof value === 'object') {
|
|
269
|
+
return `{${Object.entries(value).sort(([left], [right]) => left.localeCompare(right)).map(([key, item]) => `${JSON.stringify(key)}:${stableJson(item)}`).join(',')}}`;
|
|
270
|
+
}
|
|
271
|
+
return JSON.stringify(value);
|
|
272
|
+
}
|
|
273
|
+
function sha256(value) {
|
|
274
|
+
return createHash('sha256').update(value, 'utf8').digest('hex');
|
|
275
|
+
}
|
|
276
|
+
//# sourceMappingURL=document-hashes.js.map
|