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
|
@@ -8,16 +8,39 @@ import { readRunEvents } from '../run-state/events.js';
|
|
|
8
8
|
import { readRunState } from '../run-state/run-state.js';
|
|
9
9
|
import { listAgentExecutionRecords, listTeamSessionRecords } from '../execution/agent-execution-records.js';
|
|
10
10
|
import { listResidentWorkerRuntimes } from '../execution/resident-worker.js';
|
|
11
|
-
import { runDocumentStaleReasons } from '../
|
|
12
|
-
import { resolveWorkflowState, type WorkflowLatestTaskRun } from '../workflow-state/resolve.js';
|
|
11
|
+
import { runDocumentStaleReasons } from '../workflow-state/resolve-task-run.js';
|
|
12
|
+
import { resolveWorkflowState, workflowNextIntent, type WorkflowLatestTaskRun, type WorkflowNextIntent } from '../workflow-state/resolve.js';
|
|
13
13
|
import type { WorkflowAffectedFileConflict } from '../workflow-state/affected-file-conflicts.js';
|
|
14
14
|
import type { WorkflowDependencyBlocker } from '../workflow-state/dependencies.js';
|
|
15
|
+
import type { LatestEligibleRunSelection } from '../workflow-state/latest-eligible-run.js';
|
|
15
16
|
import { buildTaskRiskProfile } from '../task-risk-profile.js';
|
|
16
17
|
import { listRuntimeProjections } from '../storage/runtime-store.js';
|
|
17
18
|
import { inspectLifecycleRiskDecisionForModel, type LifecycleRiskConsumerDiagnostic } from '../risk.js';
|
|
18
19
|
import { inspectWorkflowStageHandoff, type WorkflowStageHandoffDiagnostic } from '../stage-runtime.js';
|
|
19
20
|
import { inspectContextOffloadRuntime, type ContextRuntimeDiagnostic } from '../context-offload.js';
|
|
21
|
+
import { inspectFullStageChain, inspectSpecCollaborationHealth, type FullStageChainDiagnostic, type SpecCollaborationHealthDiagnostic } from '../stage-collaboration.js';
|
|
22
|
+
import { inspectRuntimeProjectionP0, type RuntimeProjectionP0Diagnostic } from '../runtime-projection-p0.js';
|
|
20
23
|
import { inspectSubagentDispatches, type SubagentDispatchDiagnostic } from '../subagents.js';
|
|
24
|
+
import { inspectAgentCapabilityCatalog, REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS, type AgentCapabilityDomain, type ProfessionalCapabilityDomain } from '../registries/agent-capability-catalog.js';
|
|
25
|
+
import { validateAgentSkillTeamRuntime } from '../router/runtime-validation.js';
|
|
26
|
+
import {
|
|
27
|
+
listRuntimeArtifactPayloads,
|
|
28
|
+
listRuntimeCapabilityAdoptions,
|
|
29
|
+
listRuntimeDurableGaps,
|
|
30
|
+
listRuntimeFanInEvidenceSets,
|
|
31
|
+
listRuntimeLlmAdvisorAssessments,
|
|
32
|
+
listRuntimeStageRoleResults,
|
|
33
|
+
listRuntimeStageTeamSessions,
|
|
34
|
+
listRuntimeTestRuns,
|
|
35
|
+
listRuntimeWorkflowGateDecisions,
|
|
36
|
+
type RuntimeArtifactPayloadRecord,
|
|
37
|
+
type RuntimeArtifactPayloadStatus,
|
|
38
|
+
type RuntimeCapabilityAdoptionRecord,
|
|
39
|
+
type RuntimeDurableGapRecord
|
|
40
|
+
} from '../storage/runtime-store.js';
|
|
41
|
+
import type { CapabilityEvidenceClassification } from '../evidence-runtime.js';
|
|
42
|
+
import type { WorkflowGateDecision, WorkflowGateDecisionKind } from '../workflow-gate/types.js';
|
|
43
|
+
import type { TruthReconciliationDecision } from '../truth-reconciliation.js';
|
|
21
44
|
|
|
22
45
|
const execFileAsync = promisify(execFile);
|
|
23
46
|
|
|
@@ -50,6 +73,91 @@ export interface TokenRuntimeProjection {
|
|
|
50
73
|
pressureReasons: string[];
|
|
51
74
|
}
|
|
52
75
|
|
|
76
|
+
export type CapabilityHealthStatus = 'absent' | 'pass' | 'warn' | 'blocked';
|
|
77
|
+
|
|
78
|
+
export interface CapabilityHealthProjection {
|
|
79
|
+
status: CapabilityHealthStatus;
|
|
80
|
+
requiredProfessionalDomains: ProfessionalCapabilityDomain[];
|
|
81
|
+
baselineDomains: ProfessionalCapabilityDomain[];
|
|
82
|
+
missingBaselineDomains: ProfessionalCapabilityDomain[];
|
|
83
|
+
materialPacks: number;
|
|
84
|
+
activeDomains: AgentCapabilityDomain[];
|
|
85
|
+
activePacks: string[];
|
|
86
|
+
sources: {
|
|
87
|
+
total: number;
|
|
88
|
+
quarantined: number;
|
|
89
|
+
denied: number;
|
|
90
|
+
futureAdapters: number;
|
|
91
|
+
};
|
|
92
|
+
evidence: {
|
|
93
|
+
accepted: number;
|
|
94
|
+
candidate: number;
|
|
95
|
+
quarantined: number;
|
|
96
|
+
diagnostic: number;
|
|
97
|
+
blocked: number;
|
|
98
|
+
};
|
|
99
|
+
adoptions: {
|
|
100
|
+
adopted: number;
|
|
101
|
+
rejected: number;
|
|
102
|
+
unresolved: number;
|
|
103
|
+
acceptedAuthority: number;
|
|
104
|
+
releaseCriticalClosures: ProfessionalCapabilityDomain[];
|
|
105
|
+
};
|
|
106
|
+
warnings: string[];
|
|
107
|
+
releaseCriticalGaps: ProfessionalCapabilityDomain[];
|
|
108
|
+
reasons: string[];
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export interface StageTeamHealthProjection {
|
|
112
|
+
sessions: number;
|
|
113
|
+
roleResults: number;
|
|
114
|
+
advisorAssessments: number;
|
|
115
|
+
fanInEvidenceSets: number;
|
|
116
|
+
highConcernAdvisors: number;
|
|
117
|
+
lifecycleProfiles: string[];
|
|
118
|
+
directProfileRequiresNoTeam: boolean;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface WorkflowGateHealthProjection {
|
|
122
|
+
decisions: number;
|
|
123
|
+
blocked: number;
|
|
124
|
+
warnings: number;
|
|
125
|
+
humanRequired: number;
|
|
126
|
+
latestDecision: WorkflowGateDecision | null;
|
|
127
|
+
statusesByKind: Partial<Record<WorkflowGateDecisionKind, WorkflowGateDecision['status']>>;
|
|
128
|
+
evidenceSelection: WorkflowGateEvidenceSelectionProjection;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export type WorkflowGateEvidenceSelectionSource = 'selection_pointer' | 'candidate_payloads' | 'legacy_active_payloads' | 'none' | 'unknown';
|
|
132
|
+
|
|
133
|
+
export interface WorkflowGateEvidenceSelectionRef {
|
|
134
|
+
payloadId: string | null;
|
|
135
|
+
logicalRef: string;
|
|
136
|
+
digest: string | null;
|
|
137
|
+
status: string | null;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export interface WorkflowGateEvidenceSelectionProjection {
|
|
141
|
+
source: WorkflowGateEvidenceSelectionSource;
|
|
142
|
+
selectionPointerRef: string | null;
|
|
143
|
+
acceptedEvidenceSetRef: string | null;
|
|
144
|
+
selectedRefs: WorkflowGateEvidenceSelectionRef[];
|
|
145
|
+
blockedRefs: string[];
|
|
146
|
+
ignoredRefs: WorkflowGateEvidenceSelectionRef[];
|
|
147
|
+
ignoredCounts: Record<Exclude<RuntimeArtifactPayloadStatus, 'active' | 'candidate'>, number>;
|
|
148
|
+
selectionReasons: string[];
|
|
149
|
+
reasons: string[];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export interface SpecCollaborationHealthProjection {
|
|
153
|
+
status: SpecCollaborationHealthDiagnostic['status'];
|
|
154
|
+
projectionCount: number;
|
|
155
|
+
latestClarificationGateId: string | null;
|
|
156
|
+
latestHandoffId: string | null;
|
|
157
|
+
latestRejectionReason: string | null;
|
|
158
|
+
reasons: string[];
|
|
159
|
+
}
|
|
160
|
+
|
|
53
161
|
export interface ProjectStatus {
|
|
54
162
|
branch: string;
|
|
55
163
|
workflowStatus: 'active' | 'not_started';
|
|
@@ -69,17 +177,27 @@ export interface ProjectStatus {
|
|
|
69
177
|
taskRisk: TaskRiskSummary;
|
|
70
178
|
latestRun: RunSummary | null;
|
|
71
179
|
latestRunsByTask: WorkflowLatestTaskRun[];
|
|
180
|
+
latestEligibleRunsByTask: LatestEligibleRunSelection[];
|
|
72
181
|
latestRunEvidence: RunEvidenceSummary | null;
|
|
73
182
|
latestRunStaleReasons: string[];
|
|
74
183
|
affectedFileConflicts: WorkflowAffectedFileConflict[];
|
|
75
184
|
dependencyBlockers: WorkflowDependencyBlocker[];
|
|
76
185
|
recommendedNextCommand: string;
|
|
186
|
+
nextIntent: WorkflowNextIntent;
|
|
77
187
|
tokenProjection: TokenRuntimeProjection;
|
|
78
188
|
contextRuntime: ContextRuntimeDiagnostic;
|
|
79
189
|
subagentDispatches: SubagentDispatchDiagnostic;
|
|
80
190
|
lifecycleRisk: LifecycleRiskConsumerDiagnostic;
|
|
191
|
+
capabilityHealth: CapabilityHealthProjection;
|
|
81
192
|
workflowHandoff: WorkflowStageHandoffDiagnostic;
|
|
193
|
+
specCollaborationHealth: SpecCollaborationHealthProjection;
|
|
194
|
+
fullStageChain: FullStageChainDiagnostic;
|
|
82
195
|
gaps: SddTaskGap[];
|
|
196
|
+
durableGaps: RuntimeDurableGapRecord[];
|
|
197
|
+
stageTeamHealth: StageTeamHealthProjection;
|
|
198
|
+
workflowGateHealth: WorkflowGateHealthProjection;
|
|
199
|
+
runtimeProjectionP0: RuntimeProjectionP0Diagnostic;
|
|
200
|
+
truthReconciliation: TruthReconciliationDecision | null;
|
|
83
201
|
}
|
|
84
202
|
|
|
85
203
|
export interface StatuslineProjection {
|
|
@@ -95,6 +213,7 @@ export interface StatuslineProjection {
|
|
|
95
213
|
contextAction: ProjectStatus['contextRuntime']['action'];
|
|
96
214
|
subagentHealth: ProjectStatus['subagentDispatches']['status'];
|
|
97
215
|
evidenceHealth: 'none' | 'pass' | 'warn' | 'blocked';
|
|
216
|
+
capabilityHealth: ProjectStatus['capabilityHealth']['status'];
|
|
98
217
|
latestRunId: string | null;
|
|
99
218
|
counts: {
|
|
100
219
|
tasks: ProjectStatus['tasks'];
|
|
@@ -107,6 +226,14 @@ export interface StatuslineProjection {
|
|
|
107
226
|
affectedFileConflicts: number;
|
|
108
227
|
subagentDispatches: number;
|
|
109
228
|
blockingSubagents: number;
|
|
229
|
+
capabilityWarnings: number;
|
|
230
|
+
durableGaps: number;
|
|
231
|
+
stageTeamSessions: number;
|
|
232
|
+
stageRoleResults: number;
|
|
233
|
+
advisorAssessments: number;
|
|
234
|
+
fanInEvidenceSets: number;
|
|
235
|
+
workflowGateDecisions: number;
|
|
236
|
+
specCollaborationProjections: number;
|
|
110
237
|
};
|
|
111
238
|
taskRisk: TaskRiskSummary;
|
|
112
239
|
next: string;
|
|
@@ -120,13 +247,21 @@ export async function getProjectStatus(projectRoot: string, options: { branch?:
|
|
|
120
247
|
const enrichedLatestRunEvidence = latestRun && latestRunEvidence
|
|
121
248
|
? await addTaskDocumentStalenessToRunEvidence(workflow.model.tasksPath, latestRun, latestRunEvidence)
|
|
122
249
|
: latestRunEvidence;
|
|
123
|
-
const latestRunStaleReasons = latestRunState ?
|
|
250
|
+
const latestRunStaleReasons = latestRunState ? runDocumentStaleReasons(latestRunState, workflow.model) : [];
|
|
124
251
|
const taskRisk = summarizeTaskRisk(workflow.model.tasks);
|
|
125
252
|
const tokenProjection = await inspectTokenRuntimeProjection(projectRoot);
|
|
126
253
|
const lifecycleRisk = await inspectLifecycleRiskDecisionForModel(projectRoot, workflow.branch, workflow.model);
|
|
127
254
|
const workflowHandoff = await inspectWorkflowStageHandoff(projectRoot, workflow.branch);
|
|
128
255
|
const contextRuntime = await inspectContextOffloadRuntime(projectRoot, workflow.branch);
|
|
129
256
|
const subagentDispatches = await inspectSubagentDispatches(projectRoot, workflow.branch);
|
|
257
|
+
const capabilityHealth = await inspectCapabilityHealth(projectRoot, workflow.branch, latestRun?.runId ?? null, workflow.model.tasks);
|
|
258
|
+
const durableGaps = await listRuntimeDurableGaps(projectRoot, { partition: workflow.branch, status: 'open_terminal' });
|
|
259
|
+
const stageTeamHealth = await inspectStageTeamHealth(projectRoot, workflow.branch, latestRun?.runId ?? null);
|
|
260
|
+
const workflowGateHealth = await inspectWorkflowGateHealth(projectRoot, workflow.branch, latestRun?.runId ?? null);
|
|
261
|
+
const specCollaborationHealth = await inspectSpecCollaborationHealth(projectRoot, workflow.branch);
|
|
262
|
+
const fullStageChain = await inspectFullStageChain(projectRoot, workflow.branch);
|
|
263
|
+
const runtimeProjectionP0 = await inspectRuntimeProjectionP0(projectRoot, workflow.branch);
|
|
264
|
+
const nextIntent = resolveProjectStatusNextIntent(workflow.branch, workflow.nextIntent, fullStageChain, workflowHandoff, workflow.truthReconciliation);
|
|
130
265
|
|
|
131
266
|
return {
|
|
132
267
|
branch: workflow.branch,
|
|
@@ -138,20 +273,81 @@ export async function getProjectStatus(projectRoot: string, options: { branch?:
|
|
|
138
273
|
taskRisk,
|
|
139
274
|
latestRun,
|
|
140
275
|
latestRunsByTask: workflow.latestRunsByTask,
|
|
276
|
+
latestEligibleRunsByTask: workflow.latestEligibleRunsByTask,
|
|
141
277
|
latestRunEvidence: enrichedLatestRunEvidence,
|
|
142
278
|
latestRunStaleReasons,
|
|
143
279
|
affectedFileConflicts: workflow.affectedFileConflicts,
|
|
144
280
|
dependencyBlockers: workflow.dependencyBlockers,
|
|
145
|
-
recommendedNextCommand:
|
|
281
|
+
recommendedNextCommand: nextIntent.canonicalCommand,
|
|
282
|
+
nextIntent,
|
|
146
283
|
tokenProjection,
|
|
147
284
|
contextRuntime,
|
|
148
285
|
subagentDispatches,
|
|
149
286
|
lifecycleRisk,
|
|
150
287
|
workflowHandoff,
|
|
151
|
-
|
|
288
|
+
capabilityHealth,
|
|
289
|
+
gaps: workflow.visibleGaps,
|
|
290
|
+
durableGaps,
|
|
291
|
+
stageTeamHealth,
|
|
292
|
+
workflowGateHealth,
|
|
293
|
+
specCollaborationHealth,
|
|
294
|
+
fullStageChain,
|
|
295
|
+
runtimeProjectionP0,
|
|
296
|
+
truthReconciliation: workflow.truthReconciliation
|
|
152
297
|
};
|
|
153
298
|
}
|
|
154
299
|
|
|
300
|
+
export function resolveProjectStatusNextIntent(
|
|
301
|
+
branch: string,
|
|
302
|
+
workflowIntent: WorkflowNextIntent,
|
|
303
|
+
fullStageChain: Pick<FullStageChainDiagnostic, 'finalHealth'>,
|
|
304
|
+
workflowHandoff?: Pick<WorkflowStageHandoffDiagnostic, 'status' | 'latestHandoff' | 'latestStageRun'>,
|
|
305
|
+
truthReconciliation?: TruthReconciliationDecision | null
|
|
306
|
+
): WorkflowNextIntent {
|
|
307
|
+
if (truthReconciliation) {
|
|
308
|
+
return truthReconciliation.nextIntent;
|
|
309
|
+
}
|
|
310
|
+
if (fullStageChain.finalHealth === 'ship_ready') {
|
|
311
|
+
return workflowNextIntent('ship', 'workflow_complete', `sdd status --branch ${branch} --json`, 'Active Phase 9 stage chain is closed through ship_ready; inspect status only after accepted evidence changes.', null, {
|
|
312
|
+
targetRuntimeStage: 'ship',
|
|
313
|
+
displayCommand: `/sdd status --branch ${branch} --json`,
|
|
314
|
+
evidenceSurface: ['specs/<branch>/*.md', '.sdd/runs/<branch>/<stage>/*.md', 'truthAlignment projection']
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
if (fullStageChain.finalHealth === 'ready_for_ship') {
|
|
318
|
+
return workflowNextIntent('ship', 'ship_readiness', `sdd ship close --branch ${branch} --compact-json`, 'Goal verification and truthAlignment are ready; close ship readiness with ship-stage evidence.', null);
|
|
319
|
+
}
|
|
320
|
+
return intraBundleHandoffNextIntent(branch, workflowHandoff) ?? workflowIntent;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
function intraBundleHandoffNextIntent(branch: string, workflowHandoff?: Pick<WorkflowStageHandoffDiagnostic, 'status' | 'latestHandoff' | 'latestStageRun'>): WorkflowNextIntent | null {
|
|
324
|
+
const handoff = workflowHandoff?.latestHandoff;
|
|
325
|
+
const latestStageRun = workflowHandoff?.latestStageRun;
|
|
326
|
+
if (workflowHandoff?.status !== 'fresh' || !handoff || !['proposed', 'accepted'].includes(handoff.status)) {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
if (latestStageRun?.stage === handoff.toStage && latestStageRun.status === 'completed') {
|
|
330
|
+
return null;
|
|
331
|
+
}
|
|
332
|
+
if (handoff.fromStage === 'tasks' && handoff.toStage === 'verifies') {
|
|
333
|
+
return workflowNextIntent('tasks', 'run_verifies', `sdd tasks close --branch ${branch} --target verifies --compact-json`, 'Close verifies inside the /sdd:tasks bundle using agent-authored verify evidence.', null, {
|
|
334
|
+
targetRuntimeStage: 'verifies',
|
|
335
|
+
resumeMode: 'resume',
|
|
336
|
+
canAutoAdvanceWithinBundle: true,
|
|
337
|
+
evidenceSurface: ['specs/<branch>/verify.md', '.sdd/runs/<branch>/verifies/*.md']
|
|
338
|
+
});
|
|
339
|
+
}
|
|
340
|
+
if (handoff.fromStage === 'test' && handoff.toStage === 'goal-verify') {
|
|
341
|
+
return workflowNextIntent('test', 'run_goal_verify', `sdd test close --branch ${branch} --target goal-verify --compact-json`, 'Close goal verification inside the /sdd:test bundle and compute truthAlignment before ship readiness.', null, {
|
|
342
|
+
targetRuntimeStage: 'goal-verify',
|
|
343
|
+
resumeMode: 'resume',
|
|
344
|
+
canAutoAdvanceWithinBundle: true,
|
|
345
|
+
evidenceSurface: ['.sdd/runs/<branch>/goal-verify/*.md', 'truthAlignment projection']
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
return null;
|
|
349
|
+
}
|
|
350
|
+
|
|
155
351
|
export async function getStatuslineProjection(projectRoot: string, options: { branch?: string | null; branchSource?: ContextBranchSource } = {}): Promise<StatuslineProjection> {
|
|
156
352
|
return statuslineProjectionFromStatus(await getProjectStatus(projectRoot, options));
|
|
157
353
|
}
|
|
@@ -170,12 +366,13 @@ export function statuslineProjectionFromStatus(status: ProjectStatus): Statuslin
|
|
|
170
366
|
taskHealth: taskHealth(status),
|
|
171
367
|
runtimeHealth,
|
|
172
368
|
testHealth: testHealth(status),
|
|
173
|
-
teamHealth: (evidence?.teamSessions ?? 0) > 0 ? 'active' : 'none',
|
|
369
|
+
teamHealth: (evidence?.teamSessions ?? 0) > 0 || status.stageTeamHealth.sessions > 0 || status.stageTeamHealth.roleResults > 0 ? 'active' : 'none',
|
|
174
370
|
tokenHealth: status.tokenProjection.health,
|
|
175
371
|
contextLoad: status.contextRuntime.level,
|
|
176
372
|
contextAction: status.contextRuntime.action,
|
|
177
373
|
subagentHealth: status.subagentDispatches.status,
|
|
178
374
|
evidenceHealth: evidenceHealth(status, runtimeHealth),
|
|
375
|
+
capabilityHealth: status.capabilityHealth.status,
|
|
179
376
|
latestRunId: status.latestRun?.runId ?? null,
|
|
180
377
|
counts: {
|
|
181
378
|
tasks: status.tasks,
|
|
@@ -187,13 +384,131 @@ export function statuslineProjectionFromStatus(status: ProjectStatus): Statuslin
|
|
|
187
384
|
staleReasons,
|
|
188
385
|
affectedFileConflicts,
|
|
189
386
|
subagentDispatches: status.subagentDispatches.dispatches,
|
|
190
|
-
blockingSubagents: status.subagentDispatches.blockingOpen
|
|
387
|
+
blockingSubagents: status.subagentDispatches.blockingOpen,
|
|
388
|
+
capabilityWarnings: status.capabilityHealth.warnings.length,
|
|
389
|
+
durableGaps: status.durableGaps.length,
|
|
390
|
+
stageTeamSessions: status.stageTeamHealth.sessions,
|
|
391
|
+
stageRoleResults: status.stageTeamHealth.roleResults,
|
|
392
|
+
advisorAssessments: status.stageTeamHealth.advisorAssessments,
|
|
393
|
+
fanInEvidenceSets: status.stageTeamHealth.fanInEvidenceSets,
|
|
394
|
+
workflowGateDecisions: status.workflowGateHealth.decisions,
|
|
395
|
+
specCollaborationProjections: status.specCollaborationHealth.projectionCount
|
|
191
396
|
},
|
|
192
397
|
taskRisk: status.taskRisk,
|
|
193
398
|
next: status.recommendedNextCommand
|
|
194
399
|
};
|
|
195
400
|
}
|
|
196
401
|
|
|
402
|
+
async function inspectStageTeamHealth(projectRoot: string, partition: string, runId: string | null): Promise<StageTeamHealthProjection> {
|
|
403
|
+
const query = runId ? { partition, runId } : { partition };
|
|
404
|
+
const [sessions, roleResults, advisorAssessments, fanInEvidenceSets] = await Promise.all([
|
|
405
|
+
listRuntimeStageTeamSessions(projectRoot, query),
|
|
406
|
+
listRuntimeStageRoleResults(projectRoot, query),
|
|
407
|
+
listRuntimeLlmAdvisorAssessments(projectRoot, query),
|
|
408
|
+
listRuntimeFanInEvidenceSets(projectRoot, query)
|
|
409
|
+
]);
|
|
410
|
+
return {
|
|
411
|
+
sessions: sessions.length,
|
|
412
|
+
roleResults: roleResults.length,
|
|
413
|
+
advisorAssessments: advisorAssessments.length,
|
|
414
|
+
fanInEvidenceSets: fanInEvidenceSets.length,
|
|
415
|
+
highConcernAdvisors: advisorAssessments.filter((assessment) => assessment.concern === 'high').length,
|
|
416
|
+
lifecycleProfiles: [...new Set(sessions.map((session) => session.lifecycleProfile))].sort(),
|
|
417
|
+
directProfileRequiresNoTeam: !sessions.some((session) => session.lifecycleProfile === 'direct' && session.assignments.some((assignment) => assignment.required))
|
|
418
|
+
};
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
async function inspectWorkflowGateHealth(projectRoot: string, partition: string, runId: string | null): Promise<WorkflowGateHealthProjection> {
|
|
422
|
+
const query = runId ? { partition, runId } : { partition };
|
|
423
|
+
const decisions = await listRuntimeWorkflowGateDecisions(projectRoot, query);
|
|
424
|
+
const latestDecision = decisions[0] ?? null;
|
|
425
|
+
const artifactPayloads = await listRuntimeArtifactPayloads(projectRoot, {
|
|
426
|
+
branchSlug: partition,
|
|
427
|
+
runId: runId ?? latestDecision?.runId ?? null,
|
|
428
|
+
taskId: latestDecision?.taskId ?? null
|
|
429
|
+
});
|
|
430
|
+
const statusesByKind = Object.fromEntries(decisions.map((decision) => [decision.decisionKind, decision.status])) as WorkflowGateHealthProjection['statusesByKind'];
|
|
431
|
+
return {
|
|
432
|
+
decisions: decisions.length,
|
|
433
|
+
blocked: decisions.filter((decision) => decision.status === 'BLOCKED').length,
|
|
434
|
+
warnings: decisions.filter((decision) => decision.status === 'WARN').length,
|
|
435
|
+
humanRequired: decisions.filter((decision) => decision.humanRequired).length,
|
|
436
|
+
latestDecision,
|
|
437
|
+
statusesByKind,
|
|
438
|
+
evidenceSelection: workflowGateEvidenceSelection(latestDecision, artifactPayloads)
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
const NON_CONSUMABLE_EVIDENCE_STATUSES = ['partial', 'active_attempt', 'rejected', 'superseded', 'quarantined', 'stale'] as const;
|
|
443
|
+
|
|
444
|
+
function workflowGateEvidenceSelection(latestDecision: WorkflowGateDecision | null, payloads: RuntimeArtifactPayloadRecord[]): WorkflowGateEvidenceSelectionProjection {
|
|
445
|
+
const binding = gateEvidenceBindingPayload(latestDecision);
|
|
446
|
+
const ignoredRefs = payloads.filter((payload) => NON_CONSUMABLE_EVIDENCE_STATUSES.includes(payload.status as (typeof NON_CONSUMABLE_EVIDENCE_STATUSES)[number])).map(payloadSelectionRef);
|
|
447
|
+
return {
|
|
448
|
+
source: gateEvidenceSelectionSource(binding?.source),
|
|
449
|
+
selectionPointerRef: readNullableString(binding?.selectionPointerRef),
|
|
450
|
+
acceptedEvidenceSetRef: readNullableString(binding?.acceptedEvidenceSetRef),
|
|
451
|
+
selectedRefs: readSelectionRefs(binding?.selectedRefs),
|
|
452
|
+
blockedRefs: readStringArray(binding?.blockedRefs),
|
|
453
|
+
ignoredRefs,
|
|
454
|
+
ignoredCounts: ignoredEvidenceCounts(payloads),
|
|
455
|
+
selectionReasons: readStringArray(binding?.selectionReasons),
|
|
456
|
+
reasons: readStringArray(binding?.reasons)
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function ignoredEvidenceCounts(payloads: RuntimeArtifactPayloadRecord[]): WorkflowGateEvidenceSelectionProjection['ignoredCounts'] {
|
|
461
|
+
return {
|
|
462
|
+
partial: payloads.filter((payload) => payload.status === 'partial').length,
|
|
463
|
+
active_attempt: payloads.filter((payload) => payload.status === 'active_attempt').length,
|
|
464
|
+
rejected: payloads.filter((payload) => payload.status === 'rejected').length,
|
|
465
|
+
superseded: payloads.filter((payload) => payload.status === 'superseded').length,
|
|
466
|
+
quarantined: payloads.filter((payload) => payload.status === 'quarantined').length,
|
|
467
|
+
stale: payloads.filter((payload) => payload.status === 'stale').length
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function gateEvidenceBindingPayload(latestDecision: WorkflowGateDecision | null): Record<string, unknown> | null {
|
|
472
|
+
if (!latestDecision || !isRecord(latestDecision.payload)) {
|
|
473
|
+
return null;
|
|
474
|
+
}
|
|
475
|
+
const binding = latestDecision.payload.evidenceBinding;
|
|
476
|
+
return isRecord(binding) ? binding : null;
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
function gateEvidenceSelectionSource(value: unknown): WorkflowGateEvidenceSelectionSource {
|
|
480
|
+
return value === 'selection_pointer' || value === 'candidate_payloads' || value === 'legacy_active_payloads' || value === 'none' ? value : 'unknown';
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
function readSelectionRefs(value: unknown): WorkflowGateEvidenceSelectionRef[] {
|
|
484
|
+
if (!Array.isArray(value)) {
|
|
485
|
+
return [];
|
|
486
|
+
}
|
|
487
|
+
return value.filter(isRecord).map((item) => ({
|
|
488
|
+
payloadId: readNullableString(item.payloadId),
|
|
489
|
+
logicalRef: readNullableString(item.logicalRef) ?? 'unknown',
|
|
490
|
+
digest: readNullableString(item.digest),
|
|
491
|
+
status: readNullableString(item.status)
|
|
492
|
+
}));
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function readStringArray(value: unknown): string[] {
|
|
496
|
+
return Array.isArray(value) ? value.filter((item): item is string => typeof item === 'string') : [];
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
function readNullableString(value: unknown): string | null {
|
|
500
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function payloadSelectionRef(payload: RuntimeArtifactPayloadRecord): WorkflowGateEvidenceSelectionRef {
|
|
504
|
+
return {
|
|
505
|
+
payloadId: payload.payloadId,
|
|
506
|
+
logicalRef: payload.logicalRef,
|
|
507
|
+
digest: payload.digest,
|
|
508
|
+
status: payload.status
|
|
509
|
+
};
|
|
510
|
+
}
|
|
511
|
+
|
|
197
512
|
function summarizeTaskRisk(tasks: Array<Parameters<typeof buildTaskRiskProfile>[0]>): TaskRiskSummary {
|
|
198
513
|
const entries = tasks.map((task) => ({ taskId: task?.id ?? null, profile: buildTaskRiskProfile(task) }));
|
|
199
514
|
return {
|
|
@@ -210,7 +525,7 @@ function taskHealth(status: ProjectStatus): StatuslineProjection['taskHealth'] {
|
|
|
210
525
|
if (status.tasks.total === 0) {
|
|
211
526
|
return 'empty';
|
|
212
527
|
}
|
|
213
|
-
if (status.tasks.blocked > 0 || status.gaps.some((gap) => gap.severity === 'blocking') || status.dependencyBlockers.length > 0) {
|
|
528
|
+
if (status.tasks.blocked > 0 || status.gaps.some((gap) => gap.severity === 'blocking') || status.durableGaps.some((gap) => gap.severity === 'blocking') || status.dependencyBlockers.length > 0) {
|
|
214
529
|
return 'blocked';
|
|
215
530
|
}
|
|
216
531
|
if (status.tasks.completed === status.tasks.total) {
|
|
@@ -245,6 +560,180 @@ function evidenceHealth(status: ProjectStatus, runtimeHealth: StatuslineProjecti
|
|
|
245
560
|
return 'pass';
|
|
246
561
|
}
|
|
247
562
|
|
|
563
|
+
async function inspectCapabilityHealth(projectRoot: string, branch: string, latestRunId: string | null, tasks: SddTaskModel['tasks']): Promise<CapabilityHealthProjection> {
|
|
564
|
+
try {
|
|
565
|
+
const [catalog, runtimeValidation, testRuns, adoptionRecords] = await Promise.all([
|
|
566
|
+
inspectAgentCapabilityCatalog(projectRoot),
|
|
567
|
+
validateAgentSkillTeamRuntime(projectRoot),
|
|
568
|
+
latestRunId ? listRuntimeTestRuns(projectRoot, latestRunId) : Promise.resolve([]),
|
|
569
|
+
listRuntimeCapabilityAdoptions(projectRoot, { branchSlug: branch })
|
|
570
|
+
]);
|
|
571
|
+
const baselineDomains = uniqueSorted(catalog.capabilities
|
|
572
|
+
.filter((capability) => capability.domainGroup === 'professional' && capability.provenance.sourceId === 'sdd_professional_baseline')
|
|
573
|
+
.map((capability) => capability.domain)) as ProfessionalCapabilityDomain[];
|
|
574
|
+
const missingBaselineDomains = REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS.filter((domain) => !baselineDomains.includes(domain));
|
|
575
|
+
const latestEvidence = capabilityEvidenceFromTestRuns(testRuns.map((run) => run.payload));
|
|
576
|
+
const acceptedProfessionalEvidence = latestEvidence.filter((item) => item.source === 'professional_capability' && item.class === 'accepted');
|
|
577
|
+
const releaseCriticalAdoptions = releaseCriticalCapabilityAdoptions(adoptionRecords);
|
|
578
|
+
const activeDomains = uniqueSorted([
|
|
579
|
+
...acceptedProfessionalEvidence.map((item) => item.domainOrSourceId),
|
|
580
|
+
...releaseCriticalAdoptions.map((record) => record.capabilityDomain)
|
|
581
|
+
]) as AgentCapabilityDomain[];
|
|
582
|
+
const activePacks = uniqueSorted(catalog.materialPacks
|
|
583
|
+
.filter((pack) => pack.domains.some((domain) => activeDomains.includes(domain)))
|
|
584
|
+
.map((pack) => pack.id));
|
|
585
|
+
const sources = runtimeValidation.inspection.capabilitySources;
|
|
586
|
+
const releaseCriticalGaps = releaseCriticalCapabilityGaps(tasks, acceptedProfessionalEvidence, releaseCriticalAdoptions);
|
|
587
|
+
const blocked = missingBaselineDomains.length > 0 || !runtimeValidation.valid || releaseCriticalGaps.length > 0;
|
|
588
|
+
const noEvidence = latestRunId !== null && latestEvidence.length === 0;
|
|
589
|
+
const warnings = [
|
|
590
|
+
...missingBaselineDomains.map((domain) => `missing baseline professional domain ${domain}`),
|
|
591
|
+
...runtimeValidation.issues.map((issue) => issue.message),
|
|
592
|
+
...noCapabilityEvidenceWarnings(noEvidence),
|
|
593
|
+
...releaseCriticalGaps.map((domain) => `release-critical capability gap ${domain}`)
|
|
594
|
+
];
|
|
595
|
+
return {
|
|
596
|
+
status: blocked ? 'blocked' : warnings.length > 0 ? 'warn' : 'pass',
|
|
597
|
+
requiredProfessionalDomains: [...REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS],
|
|
598
|
+
baselineDomains,
|
|
599
|
+
missingBaselineDomains,
|
|
600
|
+
materialPacks: catalog.materialPacks.length,
|
|
601
|
+
activeDomains,
|
|
602
|
+
activePacks,
|
|
603
|
+
sources: {
|
|
604
|
+
total: sources.length,
|
|
605
|
+
quarantined: sources.filter((source) => source.quarantineRequired || source.quarantineStatus === 'quarantined').length,
|
|
606
|
+
denied: sources.filter((source) => source.quarantineStatus === 'denied').length,
|
|
607
|
+
futureAdapters: sources.filter((source) => source.hostCompatibility.some((item) => item.includes('future_adapter'))).length
|
|
608
|
+
},
|
|
609
|
+
evidence: capabilityEvidenceCounts(latestEvidence),
|
|
610
|
+
adoptions: capabilityAdoptionCounts(adoptionRecords, releaseCriticalAdoptions),
|
|
611
|
+
releaseCriticalGaps,
|
|
612
|
+
warnings: uniqueSorted(warnings),
|
|
613
|
+
reasons: capabilityHealthReasons(latestRunId, latestEvidence.length, blocked, warnings.length)
|
|
614
|
+
};
|
|
615
|
+
} catch (error) {
|
|
616
|
+
return {
|
|
617
|
+
status: 'absent',
|
|
618
|
+
requiredProfessionalDomains: [...REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS],
|
|
619
|
+
baselineDomains: [],
|
|
620
|
+
missingBaselineDomains: [],
|
|
621
|
+
materialPacks: 0,
|
|
622
|
+
activeDomains: [],
|
|
623
|
+
activePacks: [],
|
|
624
|
+
sources: { total: 0, quarantined: 0, denied: 0, futureAdapters: 0 },
|
|
625
|
+
evidence: { accepted: 0, candidate: 0, quarantined: 0, diagnostic: 0, blocked: 0 },
|
|
626
|
+
adoptions: { adopted: 0, rejected: 0, unresolved: 0, acceptedAuthority: 0, releaseCriticalClosures: [] },
|
|
627
|
+
warnings: [],
|
|
628
|
+
releaseCriticalGaps: [],
|
|
629
|
+
reasons: [`capability health unavailable: ${error instanceof Error ? error.message : String(error)}`]
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
function capabilityEvidenceFromTestRuns(payloads: unknown[]): CapabilityEvidenceClassification[] {
|
|
635
|
+
return payloads.flatMap((payload) => isRecord(payload) && Array.isArray(payload.capabilityEvidence)
|
|
636
|
+
? payload.capabilityEvidence.filter(isCapabilityEvidenceClassification)
|
|
637
|
+
: []);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
function isCapabilityEvidenceClassification(value: unknown): value is CapabilityEvidenceClassification {
|
|
641
|
+
return isRecord(value)
|
|
642
|
+
&& (value.class === 'accepted' || value.class === 'candidate' || value.class === 'quarantined' || value.class === 'diagnostic' || value.class === 'blocked')
|
|
643
|
+
&& (value.source === 'professional_capability' || value.source === 'external_source' || value.source === 'runtime_diagnostic')
|
|
644
|
+
&& typeof value.domainOrSourceId === 'string';
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
function capabilityEvidenceCounts(evidence: CapabilityEvidenceClassification[]): CapabilityHealthProjection['evidence'] {
|
|
648
|
+
return {
|
|
649
|
+
accepted: evidence.filter((item) => item.class === 'accepted').length,
|
|
650
|
+
candidate: evidence.filter((item) => item.class === 'candidate').length,
|
|
651
|
+
quarantined: evidence.filter((item) => item.class === 'quarantined').length,
|
|
652
|
+
diagnostic: evidence.filter((item) => item.class === 'diagnostic').length,
|
|
653
|
+
blocked: evidence.filter((item) => item.class === 'blocked').length
|
|
654
|
+
};
|
|
655
|
+
}
|
|
656
|
+
|
|
657
|
+
function releaseCriticalCapabilityGaps(tasks: SddTaskModel['tasks'], acceptedProfessionalEvidence: CapabilityEvidenceClassification[], releaseCriticalAdoptions: RuntimeCapabilityAdoptionRecord[]): ProfessionalCapabilityDomain[] {
|
|
658
|
+
const required = releaseCriticalDomainsForTasks(tasks);
|
|
659
|
+
const acceptedEvidenceDomains = new Set(acceptedProfessionalEvidence.map((item) => item.domainOrSourceId));
|
|
660
|
+
const adoptedDomains = new Set(releaseCriticalAdoptions.map((record) => record.capabilityDomain));
|
|
661
|
+
return required.filter((domain) => !acceptedEvidenceDomains.has(domain) && !adoptedDomains.has(domain));
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
function releaseCriticalCapabilityAdoptions(records: RuntimeCapabilityAdoptionRecord[]): RuntimeCapabilityAdoptionRecord[] {
|
|
665
|
+
return records.filter((record) => (record.status === 'adopted' || record.status === 'rejected')
|
|
666
|
+
&& record.reason.trim().length > 0
|
|
667
|
+
&& (record.finalAuthority === 'sdd_contract' || record.finalAuthority === 'sdd_gate')
|
|
668
|
+
&& isRequiredProfessionalDomain(record.capabilityDomain));
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
function capabilityAdoptionCounts(records: RuntimeCapabilityAdoptionRecord[], releaseCriticalAdoptions: RuntimeCapabilityAdoptionRecord[]): CapabilityHealthProjection['adoptions'] {
|
|
672
|
+
return {
|
|
673
|
+
adopted: records.filter((record) => record.status === 'adopted').length,
|
|
674
|
+
rejected: records.filter((record) => record.status === 'rejected').length,
|
|
675
|
+
unresolved: records.filter((record) => record.status === 'unresolved').length,
|
|
676
|
+
acceptedAuthority: records.filter((record) => record.finalAuthority === 'sdd_contract' || record.finalAuthority === 'sdd_gate').length,
|
|
677
|
+
releaseCriticalClosures: uniqueSorted(releaseCriticalAdoptions.map((record) => record.capabilityDomain).filter(isRequiredProfessionalDomain))
|
|
678
|
+
};
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
|
|
682
|
+
function releaseCriticalDomainsForTasks(tasks: SddTaskModel['tasks']): ProfessionalCapabilityDomain[] {
|
|
683
|
+
const domains = new Set<ProfessionalCapabilityDomain>();
|
|
684
|
+
for (const task of tasks) {
|
|
685
|
+
const text = [task.title ?? '', ...task.risk, ...task.affectedFiles, ...task.validation, ...task.acceptance, task.boundary ?? ''].join('\n').toLowerCase();
|
|
686
|
+
if (/security|auth|permission|secret|token|安全/.test(text)) {
|
|
687
|
+
domains.add('security-engineering');
|
|
688
|
+
}
|
|
689
|
+
if (/performance|latency|throughput|benchmark|capacity|性能/.test(text)) {
|
|
690
|
+
domains.add('performance-engineering');
|
|
691
|
+
}
|
|
692
|
+
if (/observability|logging|metrics|tracing|diagnostic|可观测/.test(text)) {
|
|
693
|
+
domains.add('observability-engineering');
|
|
694
|
+
}
|
|
695
|
+
if (/release|deploy|rollback|ci|ship|发布/.test(text)) {
|
|
696
|
+
domains.add('release-engineering');
|
|
697
|
+
}
|
|
698
|
+
if (/database|schema|migration|query|data|db|数据/.test(text)) {
|
|
699
|
+
domains.add('db-data-engineering');
|
|
700
|
+
}
|
|
701
|
+
if (/ui|ux|frontend|browser|figma|accessibility|交互|前端/.test(text)) {
|
|
702
|
+
domains.add(text.includes('frontend') || text.includes('browser') || text.includes('前端') ? 'frontend-engineering' : 'ui-ux-product-design');
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
return [...domains].sort((left, right) => left.localeCompare(right));
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
function isRequiredProfessionalDomain(domain: string): domain is ProfessionalCapabilityDomain {
|
|
709
|
+
return REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS.includes(domain as ProfessionalCapabilityDomain);
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
function noCapabilityEvidenceWarnings(noEvidence: boolean): string[] {
|
|
713
|
+
return noEvidence ? ['latest run has no capability evidence classification'] : [];
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
function capabilityHealthReasons(latestRunId: string | null, evidenceCount: number, blocked: boolean, warnings: number): string[] {
|
|
717
|
+
if (blocked) {
|
|
718
|
+
return ['Capability catalog, runtime source validation, or release-critical adoption has blocking issues.'];
|
|
719
|
+
}
|
|
720
|
+
if (latestRunId !== null && evidenceCount === 0) {
|
|
721
|
+
return ['Latest run has no recorded capability evidence classification.'];
|
|
722
|
+
}
|
|
723
|
+
if (warnings > 0) {
|
|
724
|
+
return ['Capability health has warnings; inspect status JSON for exact missing evidence or release-critical adoption state.'];
|
|
725
|
+
}
|
|
726
|
+
return ['Professional capability baseline, source policy, and release-critical adoption are visible.'];
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
730
|
+
return Boolean(value) && typeof value === 'object';
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function uniqueSorted<T extends string>(values: T[]): T[] {
|
|
734
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
735
|
+
}
|
|
736
|
+
|
|
248
737
|
async function inspectTokenRuntimeProjection(projectRoot: string): Promise<TokenRuntimeProjection> {
|
|
249
738
|
const projections = await listRuntimeProjections(projectRoot, ['context_build', 'team_runtime_decision']);
|
|
250
739
|
const contextPackages = projections.filter((projection) => projection.projectionType === 'context_build');
|