sdd-agent-platform 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +36 -39
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +72 -71
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js +64 -9
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/ingestion.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js +26 -17
- package/node_modules/@sdd-agent-platform/core/dist/artifacts/sdd-result.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +13 -9
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js +7 -3
- package/node_modules/@sdd-agent-platform/core/dist/config/project-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +16 -20
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js +1 -7
- package/node_modules/@sdd-agent-platform/core/dist/context/build-package.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js +26 -8
- package/node_modules/@sdd-agent-platform/core/dist/context/evidence-summary.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/context/log-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/context-offload/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +4 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/delegation/model.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js +7 -4
- package/node_modules/@sdd-agent-platform/core/dist/delegation/validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js +8 -8
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/registries.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +0 -24
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +277 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +61 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +15 -8
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/background-executor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/execution/foreground-subagents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js +5 -4
- package/node_modules/@sdd-agent-platform/core/dist/execution/host-invocation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +16 -7
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +59 -66
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +55 -19
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.d.ts +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js +62 -21
- package/node_modules/@sdd-agent-platform/core/dist/orchestration/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +20 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +218 -18
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +17 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +32 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.d.ts +2 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +222 -10
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +9 -9
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/registries/eval-learning-context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/query-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-capabilities.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/tool-plugins.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js +11 -11
- package/node_modules/@sdd-agent-platform/core/dist/registries/worker-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +12 -12
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/contracts.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/risk/kernel.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js +4 -7
- package/node_modules/@sdd-agent-platform/core/dist/risk/legacy-adapters.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.d.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js +19 -17
- package/node_modules/@sdd-agent-platform/core/dist/risk/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +28 -13
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +61 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +192 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +73 -17
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.d.ts +28 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js +373 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-import.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +11 -4
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +31 -3
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js +235 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.d.ts +16 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +168 -18
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +22 -54
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +53 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js +1 -3
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-index.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +51 -34
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +65 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +169 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.d.ts +8 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js +131 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/timing.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/build.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js +5 -44
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/findings.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-analysis/model.d.ts +1 -17
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +109 -14
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.d.ts +64 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js +200 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-projection-p0.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +276 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +15 -4
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +139 -38
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js +322 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-artifacts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js +241 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.d.ts +888 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js +3870 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-collaboration.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js +8 -1
- package/node_modules/@sdd-agent-platform/core/dist/stage-runtime/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +105 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +343 -8
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +348 -3
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +1017 -8
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js +7 -7
- package/node_modules/@sdd-agent-platform/core/dist/subagents/runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +19 -20
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.d.ts +44 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js +138 -0
- package/node_modules/@sdd-agent-platform/core/dist/truth-reconciliation.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +44 -37
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +19 -49
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +213 -111
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +28 -3
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +546 -125
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.d.ts +26 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js +73 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-cache.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +76 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +450 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +105 -30
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +164 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +182 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +25 -11
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js +110 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js +63 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +80 -3
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +674 -41
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js +452 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.test.ts +49 -1
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +72 -71
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.test.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/src/artifacts/ingestion.ts +65 -9
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-evidence.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +52 -6
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.ts +26 -17
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +44 -29
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +15 -11
- package/node_modules/@sdd-agent-platform/core/src/config/project-config.ts +10 -4
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +17 -20
- package/node_modules/@sdd-agent-platform/core/src/context/build-package.ts +2 -8
- package/node_modules/@sdd-agent-platform/core/src/context/context-build.test.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/context/evidence-summary.ts +27 -8
- package/node_modules/@sdd-agent-platform/core/src/context/log-worker.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/context-offload/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +4 -1
- package/node_modules/@sdd-agent-platform/core/src/delegation/model.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/delegation/validation.ts +8 -5
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/document-chain.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/project.ts +8 -8
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/registries.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-trust.ts +0 -21
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/runtime-contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +217 -7
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +301 -3
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +88 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +16 -11
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +57 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.test.ts +11 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/foreground-subagents.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/execution/host-invocation.ts +5 -4
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +17 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +16 -7
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +14 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +34 -13
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +60 -67
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/decision-gate.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.test.ts +47 -0
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +58 -19
- package/node_modules/@sdd-agent-platform/core/src/orchestration/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/orchestration/runtime.ts +74 -22
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +8 -3
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +319 -20
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +17 -17
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +42 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +238 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/command-team-runtime.ts +10 -10
- package/node_modules/@sdd-agent-platform/core/src/registries/eval-learning-context.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/query-status.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +45 -4
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-capabilities.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/tool-plugins.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/worker-adapters.ts +11 -11
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +12 -12
- package/node_modules/@sdd-agent-platform/core/src/risk/contracts.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/risk/kernel.ts +4 -4
- package/node_modules/@sdd-agent-platform/core/src/risk/legacy-adapters.ts +4 -7
- package/node_modules/@sdd-agent-platform/core/src/risk/workflow-gates.ts +20 -18
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +32 -13
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +68 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +212 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +391 -6
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +78 -17
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +11 -4
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +32 -3
- package/node_modules/@sdd-agent-platform/core/src/router/stage-route-binding.ts +279 -0
- package/node_modules/@sdd-agent-platform/core/src/router.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +173 -18
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +24 -59
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +59 -9
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-index.ts +1 -5
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +53 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +55 -41
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +252 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/timing.ts +146 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/build.ts +0 -3
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/findings.ts +6 -46
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis/model.ts +1 -13
- package/node_modules/@sdd-agent-platform/core/src/runtime-analysis.test.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +131 -14
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.test.ts +96 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-projection-p0.ts +292 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +306 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +15 -4
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +261 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +169 -41
- package/node_modules/@sdd-agent-platform/core/src/stage-artifacts.ts +450 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration-contracts.ts +322 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.test.ts +2903 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-collaboration.ts +5831 -0
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/stage-runtime/runtime.ts +9 -1
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.test.ts +239 -16
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +497 -8
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +560 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +1510 -9
- package/node_modules/@sdd-agent-platform/core/src/subagents/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/subagents/runtime.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +20 -20
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.test.ts +72 -0
- package/node_modules/@sdd-agent-platform/core/src/truth-reconciliation.ts +177 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +13 -87
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +46 -42
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +18 -52
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +84 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +138 -64
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +226 -116
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +148 -48
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +619 -136
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-cache.ts +106 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +383 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +556 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +131 -8
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +117 -30
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/work-units/contracts.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +425 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +507 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +182 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +174 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +194 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +115 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +19 -4
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +33 -11
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +224 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/migration-recovery.ts +158 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/repair-contract.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve-task-run.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +851 -9
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +862 -45
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -0
- package/package.json +1 -1
- package/packages/cli/dist/args.js +2 -2
- package/packages/cli/dist/args.js.map +1 -1
- package/packages/cli/dist/commands/ai-tools.js +13 -2
- package/packages/cli/dist/commands/ai-tools.js.map +1 -1
- package/packages/cli/dist/commands/context.js +1 -1
- package/packages/cli/dist/commands/context.js.map +1 -1
- package/packages/cli/dist/commands/execution.js +49 -1
- package/packages/cli/dist/commands/execution.js.map +1 -1
- package/packages/cli/dist/commands/governance.js +1 -1
- package/packages/cli/dist/commands/governance.js.map +1 -1
- package/packages/cli/dist/commands/init.js +6 -1
- package/packages/cli/dist/commands/init.js.map +1 -1
- package/packages/cli/dist/commands/lifecycle.js +15 -2
- package/packages/cli/dist/commands/lifecycle.js.map +1 -1
- package/packages/cli/dist/commands/registry/runtime.js +48 -2
- package/packages/cli/dist/commands/registry/runtime.js.map +1 -1
- package/packages/cli/dist/commands/run.js +52 -2
- package/packages/cli/dist/commands/run.js.map +1 -1
- package/packages/cli/dist/commands/stage-close.d.ts +6 -0
- package/packages/cli/dist/commands/stage-close.js +295 -0
- package/packages/cli/dist/commands/stage-close.js.map +1 -0
- package/packages/cli/dist/commands/status.js +70 -4
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js +4 -4
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/test.js +272 -5
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +9 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +257 -20
- package/packages/cli/dist/commands/verify.js.map +1 -1
- package/packages/cli/dist/dispatch.js +4 -9
- package/packages/cli/dist/dispatch.js.map +1 -1
- package/packages/cli/dist/help.js +42 -27
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/doctor.js +1 -1
- package/packages/cli/dist/renderers/doctor.js.map +1 -1
- package/packages/cli/dist/renderers/execution.js +1 -1
- package/packages/cli/dist/renderers/execution.js.map +1 -1
- package/packages/cli/dist/renderers/json.d.ts +1 -0
- package/packages/cli/dist/renderers/json.js +3 -0
- package/packages/cli/dist/renderers/json.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.d.ts +2 -1
- package/packages/cli/dist/renderers/registry-runtime.js +27 -2
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +5 -3
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +0 -4
- package/packages/cli/dist/renderers/workflow.js +46 -84
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/skill-import-args.d.ts +10 -0
- package/packages/cli/dist/skill-import-args.js +47 -0
- package/packages/cli/dist/skill-import-args.js.map +1 -0
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +72 -71
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/artifacts/ingestion.js +64 -9
- package/packages/core/dist/artifacts/ingestion.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-evidence.js +0 -1
- package/packages/core/dist/artifacts/sdd-evidence.js.map +1 -1
- package/packages/core/dist/artifacts/sdd-result.js +26 -17
- package/packages/core/dist/artifacts/sdd-result.js.map +1 -1
- package/packages/core/dist/config/init-project.d.ts +3 -0
- package/packages/core/dist/config/init-project.js +13 -9
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/project-config.d.ts +3 -1
- package/packages/core/dist/config/project-config.js +7 -3
- package/packages/core/dist/config/project-config.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +4 -4
- package/packages/core/dist/config/starter-documents.js +16 -20
- package/packages/core/dist/config/starter-documents.js.map +1 -1
- package/packages/core/dist/context/build-package.d.ts +1 -1
- package/packages/core/dist/context/build-package.js +1 -7
- package/packages/core/dist/context/build-package.js.map +1 -1
- package/packages/core/dist/context/evidence-summary.js +26 -8
- package/packages/core/dist/context/evidence-summary.js.map +1 -1
- package/packages/core/dist/context/log-worker.js +2 -2
- package/packages/core/dist/context/log-worker.js.map +1 -1
- package/packages/core/dist/context-offload/contracts.d.ts +1 -1
- package/packages/core/dist/contracts.d.ts +4 -1
- package/packages/core/dist/contracts.js +3 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/delegation/model.d.ts +3 -0
- package/packages/core/dist/delegation/validation.d.ts +3 -0
- package/packages/core/dist/delegation/validation.js +7 -4
- package/packages/core/dist/delegation/validation.js.map +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js +1 -1
- package/packages/core/dist/doctor/checks/document-chain.js.map +1 -1
- package/packages/core/dist/doctor/checks/project.js +8 -8
- package/packages/core/dist/doctor/checks/project.js.map +1 -1
- package/packages/core/dist/doctor/checks/registries.js +0 -1
- package/packages/core/dist/doctor/checks/registries.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +7 -7
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-trust.js +0 -24
- package/packages/core/dist/doctor/checks/run-trust.js.map +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js +1 -1
- package/packages/core/dist/doctor/checks/runtime-contracts.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +277 -3
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +23 -0
- package/packages/core/dist/evidence/lookup.js +61 -0
- package/packages/core/dist/evidence/lookup.js.map +1 -0
- package/packages/core/dist/evidence-runtime/contracts.d.ts +11 -1
- package/packages/core/dist/execution/agent-execution-records.js +15 -8
- package/packages/core/dist/execution/agent-execution-records.js.map +1 -1
- package/packages/core/dist/execution/background-executor.js +4 -4
- package/packages/core/dist/execution/background-executor.js.map +1 -1
- package/packages/core/dist/execution/foreground-subagents.js +3 -3
- package/packages/core/dist/execution/foreground-subagents.js.map +1 -1
- package/packages/core/dist/execution/host-invocation.js +5 -4
- package/packages/core/dist/execution/host-invocation.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +16 -7
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/packages/core/dist/execution/stage-team-runtime.js +145 -0
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/packages/core/dist/governance/policy.d.ts +1 -1
- package/packages/core/dist/governance/policy.js +1 -1
- package/packages/core/dist/governance/policy.js.map +1 -1
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +59 -66
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js +1 -1
- package/packages/core/dist/lifecycle/decision-gate.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.d.ts +3 -0
- package/packages/core/dist/lifecycle/ship.js +55 -19
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/orchestration/contracts.d.ts +1 -1
- package/packages/core/dist/orchestration/runtime.d.ts +12 -2
- package/packages/core/dist/orchestration/runtime.js +62 -21
- package/packages/core/dist/orchestration/runtime.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +20 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +218 -18
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +17 -17
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/packages/core/dist/registries/agent-runtime-static.js +32 -2
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.d.ts +2 -17
- package/packages/core/dist/registries/capability-sources.js +222 -10
- package/packages/core/dist/registries/capability-sources.js.map +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +9 -9
- package/packages/core/dist/registries/command-team-runtime.js.map +1 -1
- package/packages/core/dist/registries/eval-learning-context.js +4 -4
- package/packages/core/dist/registries/eval-learning-context.js.map +1 -1
- package/packages/core/dist/registries/query-status.js +2 -2
- package/packages/core/dist/registries/query-status.js.map +1 -1
- package/packages/core/dist/registries/tool-capabilities.js +3 -3
- package/packages/core/dist/registries/tool-capabilities.js.map +1 -1
- package/packages/core/dist/registries/tool-plugins.js +2 -2
- package/packages/core/dist/registries/tool-plugins.js.map +1 -1
- package/packages/core/dist/registries/worker-adapters.js +11 -11
- package/packages/core/dist/registries/worker-adapters.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.js +12 -12
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/risk/contracts.d.ts +2 -2
- package/packages/core/dist/risk/kernel.js +4 -4
- package/packages/core/dist/risk/kernel.js.map +1 -1
- package/packages/core/dist/risk/legacy-adapters.js +4 -7
- package/packages/core/dist/risk/legacy-adapters.js.map +1 -1
- package/packages/core/dist/risk/workflow-gates.d.ts +2 -2
- package/packages/core/dist/risk/workflow-gates.js +19 -17
- package/packages/core/dist/risk/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +28 -13
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +61 -1
- package/packages/core/dist/router/route-projection.d.ts +3 -1
- package/packages/core/dist/router/route-projection.js +192 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +73 -17
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-import.d.ts +28 -0
- package/packages/core/dist/router/runtime-import.js +373 -0
- package/packages/core/dist/router/runtime-import.js.map +1 -0
- package/packages/core/dist/router/runtime-inspection.js +11 -4
- package/packages/core/dist/router/runtime-inspection.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +31 -3
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +37 -0
- package/packages/core/dist/router/stage-route-binding.js +235 -0
- package/packages/core/dist/router/stage-route-binding.js.map +1 -0
- package/packages/core/dist/router.d.ts +2 -0
- package/packages/core/dist/router.js +2 -0
- package/packages/core/dist/router.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.d.ts +16 -0
- package/packages/core/dist/run-state/artifacts.js +168 -18
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/events.js +2 -2
- package/packages/core/dist/run-state/events.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +3 -3
- package/packages/core/dist/run-state/inspect-run.js +22 -54
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/invocation-ledger.js +2 -2
- package/packages/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +53 -9
- package/packages/core/dist/run-state/run-index.d.ts +0 -2
- package/packages/core/dist/run-state/run-index.js +1 -3
- package/packages/core/dist/run-state/run-index.js.map +1 -1
- package/packages/core/dist/run-state/run-state.js +51 -34
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +65 -0
- package/packages/core/dist/run-state/task-evidence.js +169 -0
- package/packages/core/dist/run-state/task-evidence.js.map +1 -0
- package/packages/core/dist/run-state/timing.d.ts +8 -0
- package/packages/core/dist/run-state/timing.js +131 -0
- package/packages/core/dist/run-state/timing.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +2 -0
- package/packages/core/dist/run-state.js +2 -0
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-analysis/build.js +0 -3
- package/packages/core/dist/runtime-analysis/build.js.map +1 -1
- package/packages/core/dist/runtime-analysis/findings.js +5 -44
- package/packages/core/dist/runtime-analysis/findings.js.map +1 -1
- package/packages/core/dist/runtime-analysis/model.d.ts +1 -17
- package/packages/core/dist/runtime-paths.d.ts +20 -0
- package/packages/core/dist/runtime-paths.js +109 -14
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/runtime-projection-p0.d.ts +64 -0
- package/packages/core/dist/runtime-projection-p0.js +200 -0
- package/packages/core/dist/runtime-projection-p0.js.map +1 -0
- package/packages/core/dist/sdd-docs/context.js +1 -1
- package/packages/core/dist/sdd-docs/context.js.map +1 -1
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +6 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +276 -0
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +15 -4
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +21 -0
- package/packages/core/dist/sdd-docs/task-parser.js +139 -38
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/stage-artifacts.d.ts +55 -0
- package/packages/core/dist/stage-artifacts.js +322 -0
- package/packages/core/dist/stage-artifacts.js.map +1 -0
- package/packages/core/dist/stage-collaboration-contracts.d.ts +55 -0
- package/packages/core/dist/stage-collaboration-contracts.js +241 -0
- package/packages/core/dist/stage-collaboration-contracts.js.map +1 -0
- package/packages/core/dist/stage-collaboration.d.ts +888 -0
- package/packages/core/dist/stage-collaboration.js +3870 -0
- package/packages/core/dist/stage-collaboration.js.map +1 -0
- package/packages/core/dist/stage-runtime/runtime.js +8 -1
- package/packages/core/dist/stage-runtime/runtime.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +105 -1
- package/packages/core/dist/status/project-status.js +343 -8
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +348 -3
- package/packages/core/dist/storage/runtime-store.js +1017 -8
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- package/packages/core/dist/subagents/contracts.d.ts +1 -1
- package/packages/core/dist/subagents/runtime.js +7 -7
- package/packages/core/dist/subagents/runtime.js.map +1 -1
- package/packages/core/dist/test-support/fixtures.js +21 -0
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +19 -20
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/truth-reconciliation.d.ts +44 -0
- package/packages/core/dist/truth-reconciliation.js +138 -0
- package/packages/core/dist/truth-reconciliation.js.map +1 -0
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.d.ts +0 -1
- package/packages/core/dist/verification/goal-verify.js +44 -37
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.d.ts +0 -2
- package/packages/core/dist/verification/rendering.js +19 -49
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/review-gate.d.ts +22 -0
- package/packages/core/dist/verification/review-gate.js +53 -0
- package/packages/core/dist/verification/review-gate.js.map +1 -0
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +213 -111
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +28 -3
- package/packages/core/dist/verification/test-runtime.js +546 -125
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-cache.d.ts +26 -0
- package/packages/core/dist/verification/validation-cache.js +73 -0
- package/packages/core/dist/verification/validation-cache.js.map +1 -0
- package/packages/core/dist/verification/validation-wave.d.ts +76 -0
- package/packages/core/dist/verification/validation-wave.js +450 -0
- package/packages/core/dist/verification/validation-wave.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +3 -1
- package/packages/core/dist/verification/verify-contract.js +105 -30
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +2 -0
- package/packages/core/dist/verification.js +2 -0
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js +395 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/packages/core/dist/workflow-gate/hard-checks.js +164 -0
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
- package/packages/core/dist/workflow-gate/policy.js +182 -0
- package/packages/core/dist/workflow-gate/policy.js.map +1 -0
- package/packages/core/dist/workflow-gate/types.d.ts +88 -0
- package/packages/core/dist/workflow-gate/types.js +2 -0
- package/packages/core/dist/workflow-gate/types.js.map +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +17 -3
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/packages/core/dist/workflow-state/dependencies.js +25 -11
- package/packages/core/dist/workflow-state/dependencies.js.map +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +37 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +188 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/packages/core/dist/workflow-state/migration-recovery.d.ts +40 -0
- package/packages/core/dist/workflow-state/migration-recovery.js +110 -0
- package/packages/core/dist/workflow-state/migration-recovery.js.map +1 -0
- package/packages/core/dist/workflow-state/repair-contract.d.ts +12 -0
- package/packages/core/dist/workflow-state/repair-contract.js +63 -0
- package/packages/core/dist/workflow-state/repair-contract.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve-task-run.d.ts +21 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js +95 -0
- package/packages/core/dist/workflow-state/resolve-task-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +80 -3
- package/packages/core/dist/workflow-state/resolve.js +674 -41
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state/runtime-projections.d.ts +228 -0
- package/packages/core/dist/workflow-state/runtime-projections.js +452 -0
- package/packages/core/dist/workflow-state/runtime-projections.js.map +1 -0
- package/packages/core/dist/workflow-state.d.ts +1 -0
- package/packages/core/dist/workflow-state.js +1 -0
- package/packages/core/dist/workflow-state.js.map +1 -1
- package/packages/core/package.json +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js +0 -44
- package/node_modules/@sdd-agent-platform/core/dist/doctor/render.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.d.ts +0 -17
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +0 -221
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +0 -91
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -395
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js +0 -3
- package/node_modules/@sdd-agent-platform/core/dist/sync-back.js.map +0 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +0 -248
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -522
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -446
- package/node_modules/@sdd-agent-platform/core/src/sync-back.ts +0 -2
- package/packages/cli/dist/commands/artifact.d.ts +0 -6
- package/packages/cli/dist/commands/artifact.js +0 -168
- package/packages/cli/dist/commands/artifact.js.map +0 -1
- package/packages/cli/dist/commands/sync-back.d.ts +0 -6
- package/packages/cli/dist/commands/sync-back.js +0 -82
- package/packages/cli/dist/commands/sync-back.js.map +0 -1
- package/packages/cli/dist/renderers/artifacts.d.ts +0 -5
- package/packages/cli/dist/renderers/artifacts.js +0 -43
- package/packages/cli/dist/renderers/artifacts.js.map +0 -1
- package/packages/core/dist/doctor/render.d.ts +0 -2
- package/packages/core/dist/doctor/render.js +0 -44
- package/packages/core/dist/doctor/render.js.map +0 -1
- package/packages/core/dist/sync-back/apply.d.ts +0 -17
- package/packages/core/dist/sync-back/apply.js +0 -221
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -91
- package/packages/core/dist/sync-back/inspect.js +0 -395
- package/packages/core/dist/sync-back/inspect.js.map +0 -1
- package/packages/core/dist/sync-back.d.ts +0 -2
- package/packages/core/dist/sync-back.js +0 -3
- package/packages/core/dist/sync-back.js.map +0 -1
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
import type { ContextBranchSource, ContextResolverContract } from '../sdd-docs/context.js';
|
|
2
2
|
import type { SddTaskGap, SddTaskModel } from '../sdd-docs/task-parser.js';
|
|
3
3
|
import type { RunSummary } from '../run-state/model.js';
|
|
4
|
-
import { type WorkflowLatestTaskRun } from '../workflow-state/resolve.js';
|
|
4
|
+
import { type WorkflowLatestTaskRun, type WorkflowNextIntent } from '../workflow-state/resolve.js';
|
|
5
5
|
import type { WorkflowAffectedFileConflict } from '../workflow-state/affected-file-conflicts.js';
|
|
6
6
|
import type { WorkflowDependencyBlocker } from '../workflow-state/dependencies.js';
|
|
7
|
+
import type { LatestEligibleRunSelection } from '../workflow-state/latest-eligible-run.js';
|
|
7
8
|
import { type LifecycleRiskConsumerDiagnostic } from '../risk.js';
|
|
8
9
|
import { type WorkflowStageHandoffDiagnostic } from '../stage-runtime.js';
|
|
9
10
|
import { type ContextRuntimeDiagnostic } from '../context-offload.js';
|
|
11
|
+
import { type FullStageChainDiagnostic, type SpecCollaborationHealthDiagnostic } from '../stage-collaboration.js';
|
|
12
|
+
import { type RuntimeProjectionP0Diagnostic } from '../runtime-projection-p0.js';
|
|
10
13
|
import { type SubagentDispatchDiagnostic } from '../subagents.js';
|
|
14
|
+
import { type AgentCapabilityDomain, type ProfessionalCapabilityDomain } from '../registries/agent-capability-catalog.js';
|
|
15
|
+
import { type RuntimeArtifactPayloadStatus, type RuntimeDurableGapRecord } from '../storage/runtime-store.js';
|
|
16
|
+
import type { WorkflowGateDecision, WorkflowGateDecisionKind } from '../workflow-gate/types.js';
|
|
17
|
+
import type { TruthReconciliationDecision } from '../truth-reconciliation.js';
|
|
11
18
|
export interface RunEvidenceSummary {
|
|
12
19
|
agentExecutions: number;
|
|
13
20
|
teamSessions: number;
|
|
@@ -34,6 +41,83 @@ export interface TokenRuntimeProjection {
|
|
|
34
41
|
teamRuntimeDecisions: number;
|
|
35
42
|
pressureReasons: string[];
|
|
36
43
|
}
|
|
44
|
+
export type CapabilityHealthStatus = 'absent' | 'pass' | 'warn' | 'blocked';
|
|
45
|
+
export interface CapabilityHealthProjection {
|
|
46
|
+
status: CapabilityHealthStatus;
|
|
47
|
+
requiredProfessionalDomains: ProfessionalCapabilityDomain[];
|
|
48
|
+
baselineDomains: ProfessionalCapabilityDomain[];
|
|
49
|
+
missingBaselineDomains: ProfessionalCapabilityDomain[];
|
|
50
|
+
materialPacks: number;
|
|
51
|
+
activeDomains: AgentCapabilityDomain[];
|
|
52
|
+
activePacks: string[];
|
|
53
|
+
sources: {
|
|
54
|
+
total: number;
|
|
55
|
+
quarantined: number;
|
|
56
|
+
denied: number;
|
|
57
|
+
futureAdapters: number;
|
|
58
|
+
};
|
|
59
|
+
evidence: {
|
|
60
|
+
accepted: number;
|
|
61
|
+
candidate: number;
|
|
62
|
+
quarantined: number;
|
|
63
|
+
diagnostic: number;
|
|
64
|
+
blocked: number;
|
|
65
|
+
};
|
|
66
|
+
adoptions: {
|
|
67
|
+
adopted: number;
|
|
68
|
+
rejected: number;
|
|
69
|
+
unresolved: number;
|
|
70
|
+
acceptedAuthority: number;
|
|
71
|
+
releaseCriticalClosures: ProfessionalCapabilityDomain[];
|
|
72
|
+
};
|
|
73
|
+
warnings: string[];
|
|
74
|
+
releaseCriticalGaps: ProfessionalCapabilityDomain[];
|
|
75
|
+
reasons: string[];
|
|
76
|
+
}
|
|
77
|
+
export interface StageTeamHealthProjection {
|
|
78
|
+
sessions: number;
|
|
79
|
+
roleResults: number;
|
|
80
|
+
advisorAssessments: number;
|
|
81
|
+
fanInEvidenceSets: number;
|
|
82
|
+
highConcernAdvisors: number;
|
|
83
|
+
lifecycleProfiles: string[];
|
|
84
|
+
directProfileRequiresNoTeam: boolean;
|
|
85
|
+
}
|
|
86
|
+
export interface WorkflowGateHealthProjection {
|
|
87
|
+
decisions: number;
|
|
88
|
+
blocked: number;
|
|
89
|
+
warnings: number;
|
|
90
|
+
humanRequired: number;
|
|
91
|
+
latestDecision: WorkflowGateDecision | null;
|
|
92
|
+
statusesByKind: Partial<Record<WorkflowGateDecisionKind, WorkflowGateDecision['status']>>;
|
|
93
|
+
evidenceSelection: WorkflowGateEvidenceSelectionProjection;
|
|
94
|
+
}
|
|
95
|
+
export type WorkflowGateEvidenceSelectionSource = 'selection_pointer' | 'candidate_payloads' | 'legacy_active_payloads' | 'none' | 'unknown';
|
|
96
|
+
export interface WorkflowGateEvidenceSelectionRef {
|
|
97
|
+
payloadId: string | null;
|
|
98
|
+
logicalRef: string;
|
|
99
|
+
digest: string | null;
|
|
100
|
+
status: string | null;
|
|
101
|
+
}
|
|
102
|
+
export interface WorkflowGateEvidenceSelectionProjection {
|
|
103
|
+
source: WorkflowGateEvidenceSelectionSource;
|
|
104
|
+
selectionPointerRef: string | null;
|
|
105
|
+
acceptedEvidenceSetRef: string | null;
|
|
106
|
+
selectedRefs: WorkflowGateEvidenceSelectionRef[];
|
|
107
|
+
blockedRefs: string[];
|
|
108
|
+
ignoredRefs: WorkflowGateEvidenceSelectionRef[];
|
|
109
|
+
ignoredCounts: Record<Exclude<RuntimeArtifactPayloadStatus, 'active' | 'candidate'>, number>;
|
|
110
|
+
selectionReasons: string[];
|
|
111
|
+
reasons: string[];
|
|
112
|
+
}
|
|
113
|
+
export interface SpecCollaborationHealthProjection {
|
|
114
|
+
status: SpecCollaborationHealthDiagnostic['status'];
|
|
115
|
+
projectionCount: number;
|
|
116
|
+
latestClarificationGateId: string | null;
|
|
117
|
+
latestHandoffId: string | null;
|
|
118
|
+
latestRejectionReason: string | null;
|
|
119
|
+
reasons: string[];
|
|
120
|
+
}
|
|
37
121
|
export interface ProjectStatus {
|
|
38
122
|
branch: string;
|
|
39
123
|
workflowStatus: 'active' | 'not_started';
|
|
@@ -53,17 +137,27 @@ export interface ProjectStatus {
|
|
|
53
137
|
taskRisk: TaskRiskSummary;
|
|
54
138
|
latestRun: RunSummary | null;
|
|
55
139
|
latestRunsByTask: WorkflowLatestTaskRun[];
|
|
140
|
+
latestEligibleRunsByTask: LatestEligibleRunSelection[];
|
|
56
141
|
latestRunEvidence: RunEvidenceSummary | null;
|
|
57
142
|
latestRunStaleReasons: string[];
|
|
58
143
|
affectedFileConflicts: WorkflowAffectedFileConflict[];
|
|
59
144
|
dependencyBlockers: WorkflowDependencyBlocker[];
|
|
60
145
|
recommendedNextCommand: string;
|
|
146
|
+
nextIntent: WorkflowNextIntent;
|
|
61
147
|
tokenProjection: TokenRuntimeProjection;
|
|
62
148
|
contextRuntime: ContextRuntimeDiagnostic;
|
|
63
149
|
subagentDispatches: SubagentDispatchDiagnostic;
|
|
64
150
|
lifecycleRisk: LifecycleRiskConsumerDiagnostic;
|
|
151
|
+
capabilityHealth: CapabilityHealthProjection;
|
|
65
152
|
workflowHandoff: WorkflowStageHandoffDiagnostic;
|
|
153
|
+
specCollaborationHealth: SpecCollaborationHealthProjection;
|
|
154
|
+
fullStageChain: FullStageChainDiagnostic;
|
|
66
155
|
gaps: SddTaskGap[];
|
|
156
|
+
durableGaps: RuntimeDurableGapRecord[];
|
|
157
|
+
stageTeamHealth: StageTeamHealthProjection;
|
|
158
|
+
workflowGateHealth: WorkflowGateHealthProjection;
|
|
159
|
+
runtimeProjectionP0: RuntimeProjectionP0Diagnostic;
|
|
160
|
+
truthReconciliation: TruthReconciliationDecision | null;
|
|
67
161
|
}
|
|
68
162
|
export interface StatuslineProjection {
|
|
69
163
|
contract: 'sdd-statusline-projection-v1';
|
|
@@ -78,6 +172,7 @@ export interface StatuslineProjection {
|
|
|
78
172
|
contextAction: ProjectStatus['contextRuntime']['action'];
|
|
79
173
|
subagentHealth: ProjectStatus['subagentDispatches']['status'];
|
|
80
174
|
evidenceHealth: 'none' | 'pass' | 'warn' | 'blocked';
|
|
175
|
+
capabilityHealth: ProjectStatus['capabilityHealth']['status'];
|
|
81
176
|
latestRunId: string | null;
|
|
82
177
|
counts: {
|
|
83
178
|
tasks: ProjectStatus['tasks'];
|
|
@@ -90,6 +185,14 @@ export interface StatuslineProjection {
|
|
|
90
185
|
affectedFileConflicts: number;
|
|
91
186
|
subagentDispatches: number;
|
|
92
187
|
blockingSubagents: number;
|
|
188
|
+
capabilityWarnings: number;
|
|
189
|
+
durableGaps: number;
|
|
190
|
+
stageTeamSessions: number;
|
|
191
|
+
stageRoleResults: number;
|
|
192
|
+
advisorAssessments: number;
|
|
193
|
+
fanInEvidenceSets: number;
|
|
194
|
+
workflowGateDecisions: number;
|
|
195
|
+
specCollaborationProjections: number;
|
|
93
196
|
};
|
|
94
197
|
taskRisk: TaskRiskSummary;
|
|
95
198
|
next: string;
|
|
@@ -98,6 +201,7 @@ export declare function getProjectStatus(projectRoot: string, options?: {
|
|
|
98
201
|
branch?: string | null;
|
|
99
202
|
branchSource?: ContextBranchSource;
|
|
100
203
|
}): Promise<ProjectStatus>;
|
|
204
|
+
export declare function resolveProjectStatusNextIntent(branch: string, workflowIntent: WorkflowNextIntent, fullStageChain: Pick<FullStageChainDiagnostic, 'finalHealth'>, workflowHandoff?: Pick<WorkflowStageHandoffDiagnostic, 'status' | 'latestHandoff' | 'latestStageRun'>, truthReconciliation?: TruthReconciliationDecision | null): WorkflowNextIntent;
|
|
101
205
|
export declare function getStatuslineProjection(projectRoot: string, options?: {
|
|
102
206
|
branch?: string | null;
|
|
103
207
|
branchSource?: ContextBranchSource;
|
|
@@ -5,14 +5,19 @@ import { readRunEvents } from '../run-state/events.js';
|
|
|
5
5
|
import { readRunState } from '../run-state/run-state.js';
|
|
6
6
|
import { listAgentExecutionRecords, listTeamSessionRecords } from '../execution/agent-execution-records.js';
|
|
7
7
|
import { listResidentWorkerRuntimes } from '../execution/resident-worker.js';
|
|
8
|
-
import { runDocumentStaleReasons } from '../
|
|
9
|
-
import { resolveWorkflowState } from '../workflow-state/resolve.js';
|
|
8
|
+
import { runDocumentStaleReasons } from '../workflow-state/resolve-task-run.js';
|
|
9
|
+
import { resolveWorkflowState, workflowNextIntent } from '../workflow-state/resolve.js';
|
|
10
10
|
import { buildTaskRiskProfile } from '../task-risk-profile.js';
|
|
11
11
|
import { listRuntimeProjections } from '../storage/runtime-store.js';
|
|
12
12
|
import { inspectLifecycleRiskDecisionForModel } from '../risk.js';
|
|
13
13
|
import { inspectWorkflowStageHandoff } from '../stage-runtime.js';
|
|
14
14
|
import { inspectContextOffloadRuntime } from '../context-offload.js';
|
|
15
|
+
import { inspectFullStageChain, inspectSpecCollaborationHealth } from '../stage-collaboration.js';
|
|
16
|
+
import { inspectRuntimeProjectionP0 } from '../runtime-projection-p0.js';
|
|
15
17
|
import { inspectSubagentDispatches } from '../subagents.js';
|
|
18
|
+
import { inspectAgentCapabilityCatalog, REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS } from '../registries/agent-capability-catalog.js';
|
|
19
|
+
import { validateAgentSkillTeamRuntime } from '../router/runtime-validation.js';
|
|
20
|
+
import { listRuntimeArtifactPayloads, listRuntimeCapabilityAdoptions, listRuntimeDurableGaps, listRuntimeFanInEvidenceSets, listRuntimeLlmAdvisorAssessments, listRuntimeStageRoleResults, listRuntimeStageTeamSessions, listRuntimeTestRuns, listRuntimeWorkflowGateDecisions } from '../storage/runtime-store.js';
|
|
16
21
|
const execFileAsync = promisify(execFile);
|
|
17
22
|
export async function getProjectStatus(projectRoot, options = {}) {
|
|
18
23
|
const [workflow, gitRoot] = await Promise.all([resolveWorkflowState(projectRoot, options), getGitRoot(projectRoot)]);
|
|
@@ -22,13 +27,21 @@ export async function getProjectStatus(projectRoot, options = {}) {
|
|
|
22
27
|
const enrichedLatestRunEvidence = latestRun && latestRunEvidence
|
|
23
28
|
? await addTaskDocumentStalenessToRunEvidence(workflow.model.tasksPath, latestRun, latestRunEvidence)
|
|
24
29
|
: latestRunEvidence;
|
|
25
|
-
const latestRunStaleReasons = latestRunState ?
|
|
30
|
+
const latestRunStaleReasons = latestRunState ? runDocumentStaleReasons(latestRunState, workflow.model) : [];
|
|
26
31
|
const taskRisk = summarizeTaskRisk(workflow.model.tasks);
|
|
27
32
|
const tokenProjection = await inspectTokenRuntimeProjection(projectRoot);
|
|
28
33
|
const lifecycleRisk = await inspectLifecycleRiskDecisionForModel(projectRoot, workflow.branch, workflow.model);
|
|
29
34
|
const workflowHandoff = await inspectWorkflowStageHandoff(projectRoot, workflow.branch);
|
|
30
35
|
const contextRuntime = await inspectContextOffloadRuntime(projectRoot, workflow.branch);
|
|
31
36
|
const subagentDispatches = await inspectSubagentDispatches(projectRoot, workflow.branch);
|
|
37
|
+
const capabilityHealth = await inspectCapabilityHealth(projectRoot, workflow.branch, latestRun?.runId ?? null, workflow.model.tasks);
|
|
38
|
+
const durableGaps = await listRuntimeDurableGaps(projectRoot, { partition: workflow.branch, status: 'open_terminal' });
|
|
39
|
+
const stageTeamHealth = await inspectStageTeamHealth(projectRoot, workflow.branch, latestRun?.runId ?? null);
|
|
40
|
+
const workflowGateHealth = await inspectWorkflowGateHealth(projectRoot, workflow.branch, latestRun?.runId ?? null);
|
|
41
|
+
const specCollaborationHealth = await inspectSpecCollaborationHealth(projectRoot, workflow.branch);
|
|
42
|
+
const fullStageChain = await inspectFullStageChain(projectRoot, workflow.branch);
|
|
43
|
+
const runtimeProjectionP0 = await inspectRuntimeProjectionP0(projectRoot, workflow.branch);
|
|
44
|
+
const nextIntent = resolveProjectStatusNextIntent(workflow.branch, workflow.nextIntent, fullStageChain, workflowHandoff, workflow.truthReconciliation);
|
|
32
45
|
return {
|
|
33
46
|
branch: workflow.branch,
|
|
34
47
|
workflowStatus: workflow.workflowStatus,
|
|
@@ -39,19 +52,72 @@ export async function getProjectStatus(projectRoot, options = {}) {
|
|
|
39
52
|
taskRisk,
|
|
40
53
|
latestRun,
|
|
41
54
|
latestRunsByTask: workflow.latestRunsByTask,
|
|
55
|
+
latestEligibleRunsByTask: workflow.latestEligibleRunsByTask,
|
|
42
56
|
latestRunEvidence: enrichedLatestRunEvidence,
|
|
43
57
|
latestRunStaleReasons,
|
|
44
58
|
affectedFileConflicts: workflow.affectedFileConflicts,
|
|
45
59
|
dependencyBlockers: workflow.dependencyBlockers,
|
|
46
|
-
recommendedNextCommand:
|
|
60
|
+
recommendedNextCommand: nextIntent.canonicalCommand,
|
|
61
|
+
nextIntent,
|
|
47
62
|
tokenProjection,
|
|
48
63
|
contextRuntime,
|
|
49
64
|
subagentDispatches,
|
|
50
65
|
lifecycleRisk,
|
|
51
66
|
workflowHandoff,
|
|
52
|
-
|
|
67
|
+
capabilityHealth,
|
|
68
|
+
gaps: workflow.visibleGaps,
|
|
69
|
+
durableGaps,
|
|
70
|
+
stageTeamHealth,
|
|
71
|
+
workflowGateHealth,
|
|
72
|
+
specCollaborationHealth,
|
|
73
|
+
fullStageChain,
|
|
74
|
+
runtimeProjectionP0,
|
|
75
|
+
truthReconciliation: workflow.truthReconciliation
|
|
53
76
|
};
|
|
54
77
|
}
|
|
78
|
+
export function resolveProjectStatusNextIntent(branch, workflowIntent, fullStageChain, workflowHandoff, truthReconciliation) {
|
|
79
|
+
if (truthReconciliation) {
|
|
80
|
+
return truthReconciliation.nextIntent;
|
|
81
|
+
}
|
|
82
|
+
if (fullStageChain.finalHealth === 'ship_ready') {
|
|
83
|
+
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, {
|
|
84
|
+
targetRuntimeStage: 'ship',
|
|
85
|
+
displayCommand: `/sdd status --branch ${branch} --json`,
|
|
86
|
+
evidenceSurface: ['specs/<branch>/*.md', '.sdd/runs/<branch>/<stage>/*.md', 'truthAlignment projection']
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
if (fullStageChain.finalHealth === 'ready_for_ship') {
|
|
90
|
+
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);
|
|
91
|
+
}
|
|
92
|
+
return intraBundleHandoffNextIntent(branch, workflowHandoff) ?? workflowIntent;
|
|
93
|
+
}
|
|
94
|
+
function intraBundleHandoffNextIntent(branch, workflowHandoff) {
|
|
95
|
+
const handoff = workflowHandoff?.latestHandoff;
|
|
96
|
+
const latestStageRun = workflowHandoff?.latestStageRun;
|
|
97
|
+
if (workflowHandoff?.status !== 'fresh' || !handoff || !['proposed', 'accepted'].includes(handoff.status)) {
|
|
98
|
+
return null;
|
|
99
|
+
}
|
|
100
|
+
if (latestStageRun?.stage === handoff.toStage && latestStageRun.status === 'completed') {
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
if (handoff.fromStage === 'tasks' && handoff.toStage === 'verifies') {
|
|
104
|
+
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, {
|
|
105
|
+
targetRuntimeStage: 'verifies',
|
|
106
|
+
resumeMode: 'resume',
|
|
107
|
+
canAutoAdvanceWithinBundle: true,
|
|
108
|
+
evidenceSurface: ['specs/<branch>/verify.md', '.sdd/runs/<branch>/verifies/*.md']
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
if (handoff.fromStage === 'test' && handoff.toStage === 'goal-verify') {
|
|
112
|
+
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, {
|
|
113
|
+
targetRuntimeStage: 'goal-verify',
|
|
114
|
+
resumeMode: 'resume',
|
|
115
|
+
canAutoAdvanceWithinBundle: true,
|
|
116
|
+
evidenceSurface: ['.sdd/runs/<branch>/goal-verify/*.md', 'truthAlignment projection']
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
55
121
|
export async function getStatuslineProjection(projectRoot, options = {}) {
|
|
56
122
|
return statuslineProjectionFromStatus(await getProjectStatus(projectRoot, options));
|
|
57
123
|
}
|
|
@@ -69,12 +135,13 @@ export function statuslineProjectionFromStatus(status) {
|
|
|
69
135
|
taskHealth: taskHealth(status),
|
|
70
136
|
runtimeHealth,
|
|
71
137
|
testHealth: testHealth(status),
|
|
72
|
-
teamHealth: (evidence?.teamSessions ?? 0) > 0 ? 'active' : 'none',
|
|
138
|
+
teamHealth: (evidence?.teamSessions ?? 0) > 0 || status.stageTeamHealth.sessions > 0 || status.stageTeamHealth.roleResults > 0 ? 'active' : 'none',
|
|
73
139
|
tokenHealth: status.tokenProjection.health,
|
|
74
140
|
contextLoad: status.contextRuntime.level,
|
|
75
141
|
contextAction: status.contextRuntime.action,
|
|
76
142
|
subagentHealth: status.subagentDispatches.status,
|
|
77
143
|
evidenceHealth: evidenceHealth(status, runtimeHealth),
|
|
144
|
+
capabilityHealth: status.capabilityHealth.status,
|
|
78
145
|
latestRunId: status.latestRun?.runId ?? null,
|
|
79
146
|
counts: {
|
|
80
147
|
tasks: status.tasks,
|
|
@@ -86,12 +153,119 @@ export function statuslineProjectionFromStatus(status) {
|
|
|
86
153
|
staleReasons,
|
|
87
154
|
affectedFileConflicts,
|
|
88
155
|
subagentDispatches: status.subagentDispatches.dispatches,
|
|
89
|
-
blockingSubagents: status.subagentDispatches.blockingOpen
|
|
156
|
+
blockingSubagents: status.subagentDispatches.blockingOpen,
|
|
157
|
+
capabilityWarnings: status.capabilityHealth.warnings.length,
|
|
158
|
+
durableGaps: status.durableGaps.length,
|
|
159
|
+
stageTeamSessions: status.stageTeamHealth.sessions,
|
|
160
|
+
stageRoleResults: status.stageTeamHealth.roleResults,
|
|
161
|
+
advisorAssessments: status.stageTeamHealth.advisorAssessments,
|
|
162
|
+
fanInEvidenceSets: status.stageTeamHealth.fanInEvidenceSets,
|
|
163
|
+
workflowGateDecisions: status.workflowGateHealth.decisions,
|
|
164
|
+
specCollaborationProjections: status.specCollaborationHealth.projectionCount
|
|
90
165
|
},
|
|
91
166
|
taskRisk: status.taskRisk,
|
|
92
167
|
next: status.recommendedNextCommand
|
|
93
168
|
};
|
|
94
169
|
}
|
|
170
|
+
async function inspectStageTeamHealth(projectRoot, partition, runId) {
|
|
171
|
+
const query = runId ? { partition, runId } : { partition };
|
|
172
|
+
const [sessions, roleResults, advisorAssessments, fanInEvidenceSets] = await Promise.all([
|
|
173
|
+
listRuntimeStageTeamSessions(projectRoot, query),
|
|
174
|
+
listRuntimeStageRoleResults(projectRoot, query),
|
|
175
|
+
listRuntimeLlmAdvisorAssessments(projectRoot, query),
|
|
176
|
+
listRuntimeFanInEvidenceSets(projectRoot, query)
|
|
177
|
+
]);
|
|
178
|
+
return {
|
|
179
|
+
sessions: sessions.length,
|
|
180
|
+
roleResults: roleResults.length,
|
|
181
|
+
advisorAssessments: advisorAssessments.length,
|
|
182
|
+
fanInEvidenceSets: fanInEvidenceSets.length,
|
|
183
|
+
highConcernAdvisors: advisorAssessments.filter((assessment) => assessment.concern === 'high').length,
|
|
184
|
+
lifecycleProfiles: [...new Set(sessions.map((session) => session.lifecycleProfile))].sort(),
|
|
185
|
+
directProfileRequiresNoTeam: !sessions.some((session) => session.lifecycleProfile === 'direct' && session.assignments.some((assignment) => assignment.required))
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
async function inspectWorkflowGateHealth(projectRoot, partition, runId) {
|
|
189
|
+
const query = runId ? { partition, runId } : { partition };
|
|
190
|
+
const decisions = await listRuntimeWorkflowGateDecisions(projectRoot, query);
|
|
191
|
+
const latestDecision = decisions[0] ?? null;
|
|
192
|
+
const artifactPayloads = await listRuntimeArtifactPayloads(projectRoot, {
|
|
193
|
+
branchSlug: partition,
|
|
194
|
+
runId: runId ?? latestDecision?.runId ?? null,
|
|
195
|
+
taskId: latestDecision?.taskId ?? null
|
|
196
|
+
});
|
|
197
|
+
const statusesByKind = Object.fromEntries(decisions.map((decision) => [decision.decisionKind, decision.status]));
|
|
198
|
+
return {
|
|
199
|
+
decisions: decisions.length,
|
|
200
|
+
blocked: decisions.filter((decision) => decision.status === 'BLOCKED').length,
|
|
201
|
+
warnings: decisions.filter((decision) => decision.status === 'WARN').length,
|
|
202
|
+
humanRequired: decisions.filter((decision) => decision.humanRequired).length,
|
|
203
|
+
latestDecision,
|
|
204
|
+
statusesByKind,
|
|
205
|
+
evidenceSelection: workflowGateEvidenceSelection(latestDecision, artifactPayloads)
|
|
206
|
+
};
|
|
207
|
+
}
|
|
208
|
+
const NON_CONSUMABLE_EVIDENCE_STATUSES = ['partial', 'active_attempt', 'rejected', 'superseded', 'quarantined', 'stale'];
|
|
209
|
+
function workflowGateEvidenceSelection(latestDecision, payloads) {
|
|
210
|
+
const binding = gateEvidenceBindingPayload(latestDecision);
|
|
211
|
+
const ignoredRefs = payloads.filter((payload) => NON_CONSUMABLE_EVIDENCE_STATUSES.includes(payload.status)).map(payloadSelectionRef);
|
|
212
|
+
return {
|
|
213
|
+
source: gateEvidenceSelectionSource(binding?.source),
|
|
214
|
+
selectionPointerRef: readNullableString(binding?.selectionPointerRef),
|
|
215
|
+
acceptedEvidenceSetRef: readNullableString(binding?.acceptedEvidenceSetRef),
|
|
216
|
+
selectedRefs: readSelectionRefs(binding?.selectedRefs),
|
|
217
|
+
blockedRefs: readStringArray(binding?.blockedRefs),
|
|
218
|
+
ignoredRefs,
|
|
219
|
+
ignoredCounts: ignoredEvidenceCounts(payloads),
|
|
220
|
+
selectionReasons: readStringArray(binding?.selectionReasons),
|
|
221
|
+
reasons: readStringArray(binding?.reasons)
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function ignoredEvidenceCounts(payloads) {
|
|
225
|
+
return {
|
|
226
|
+
partial: payloads.filter((payload) => payload.status === 'partial').length,
|
|
227
|
+
active_attempt: payloads.filter((payload) => payload.status === 'active_attempt').length,
|
|
228
|
+
rejected: payloads.filter((payload) => payload.status === 'rejected').length,
|
|
229
|
+
superseded: payloads.filter((payload) => payload.status === 'superseded').length,
|
|
230
|
+
quarantined: payloads.filter((payload) => payload.status === 'quarantined').length,
|
|
231
|
+
stale: payloads.filter((payload) => payload.status === 'stale').length
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
function gateEvidenceBindingPayload(latestDecision) {
|
|
235
|
+
if (!latestDecision || !isRecord(latestDecision.payload)) {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
const binding = latestDecision.payload.evidenceBinding;
|
|
239
|
+
return isRecord(binding) ? binding : null;
|
|
240
|
+
}
|
|
241
|
+
function gateEvidenceSelectionSource(value) {
|
|
242
|
+
return value === 'selection_pointer' || value === 'candidate_payloads' || value === 'legacy_active_payloads' || value === 'none' ? value : 'unknown';
|
|
243
|
+
}
|
|
244
|
+
function readSelectionRefs(value) {
|
|
245
|
+
if (!Array.isArray(value)) {
|
|
246
|
+
return [];
|
|
247
|
+
}
|
|
248
|
+
return value.filter(isRecord).map((item) => ({
|
|
249
|
+
payloadId: readNullableString(item.payloadId),
|
|
250
|
+
logicalRef: readNullableString(item.logicalRef) ?? 'unknown',
|
|
251
|
+
digest: readNullableString(item.digest),
|
|
252
|
+
status: readNullableString(item.status)
|
|
253
|
+
}));
|
|
254
|
+
}
|
|
255
|
+
function readStringArray(value) {
|
|
256
|
+
return Array.isArray(value) ? value.filter((item) => typeof item === 'string') : [];
|
|
257
|
+
}
|
|
258
|
+
function readNullableString(value) {
|
|
259
|
+
return typeof value === 'string' && value.length > 0 ? value : null;
|
|
260
|
+
}
|
|
261
|
+
function payloadSelectionRef(payload) {
|
|
262
|
+
return {
|
|
263
|
+
payloadId: payload.payloadId,
|
|
264
|
+
logicalRef: payload.logicalRef,
|
|
265
|
+
digest: payload.digest,
|
|
266
|
+
status: payload.status
|
|
267
|
+
};
|
|
268
|
+
}
|
|
95
269
|
function summarizeTaskRisk(tasks) {
|
|
96
270
|
const entries = tasks.map((task) => ({ taskId: task?.id ?? null, profile: buildTaskRiskProfile(task) }));
|
|
97
271
|
return {
|
|
@@ -107,7 +281,7 @@ function taskHealth(status) {
|
|
|
107
281
|
if (status.tasks.total === 0) {
|
|
108
282
|
return 'empty';
|
|
109
283
|
}
|
|
110
|
-
if (status.tasks.blocked > 0 || status.gaps.some((gap) => gap.severity === 'blocking') || status.dependencyBlockers.length > 0) {
|
|
284
|
+
if (status.tasks.blocked > 0 || status.gaps.some((gap) => gap.severity === 'blocking') || status.durableGaps.some((gap) => gap.severity === 'blocking') || status.dependencyBlockers.length > 0) {
|
|
111
285
|
return 'blocked';
|
|
112
286
|
}
|
|
113
287
|
if (status.tasks.completed === status.tasks.total) {
|
|
@@ -139,6 +313,167 @@ function evidenceHealth(status, runtimeHealth) {
|
|
|
139
313
|
}
|
|
140
314
|
return 'pass';
|
|
141
315
|
}
|
|
316
|
+
async function inspectCapabilityHealth(projectRoot, branch, latestRunId, tasks) {
|
|
317
|
+
try {
|
|
318
|
+
const [catalog, runtimeValidation, testRuns, adoptionRecords] = await Promise.all([
|
|
319
|
+
inspectAgentCapabilityCatalog(projectRoot),
|
|
320
|
+
validateAgentSkillTeamRuntime(projectRoot),
|
|
321
|
+
latestRunId ? listRuntimeTestRuns(projectRoot, latestRunId) : Promise.resolve([]),
|
|
322
|
+
listRuntimeCapabilityAdoptions(projectRoot, { branchSlug: branch })
|
|
323
|
+
]);
|
|
324
|
+
const baselineDomains = uniqueSorted(catalog.capabilities
|
|
325
|
+
.filter((capability) => capability.domainGroup === 'professional' && capability.provenance.sourceId === 'sdd_professional_baseline')
|
|
326
|
+
.map((capability) => capability.domain));
|
|
327
|
+
const missingBaselineDomains = REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS.filter((domain) => !baselineDomains.includes(domain));
|
|
328
|
+
const latestEvidence = capabilityEvidenceFromTestRuns(testRuns.map((run) => run.payload));
|
|
329
|
+
const acceptedProfessionalEvidence = latestEvidence.filter((item) => item.source === 'professional_capability' && item.class === 'accepted');
|
|
330
|
+
const releaseCriticalAdoptions = releaseCriticalCapabilityAdoptions(adoptionRecords);
|
|
331
|
+
const activeDomains = uniqueSorted([
|
|
332
|
+
...acceptedProfessionalEvidence.map((item) => item.domainOrSourceId),
|
|
333
|
+
...releaseCriticalAdoptions.map((record) => record.capabilityDomain)
|
|
334
|
+
]);
|
|
335
|
+
const activePacks = uniqueSorted(catalog.materialPacks
|
|
336
|
+
.filter((pack) => pack.domains.some((domain) => activeDomains.includes(domain)))
|
|
337
|
+
.map((pack) => pack.id));
|
|
338
|
+
const sources = runtimeValidation.inspection.capabilitySources;
|
|
339
|
+
const releaseCriticalGaps = releaseCriticalCapabilityGaps(tasks, acceptedProfessionalEvidence, releaseCriticalAdoptions);
|
|
340
|
+
const blocked = missingBaselineDomains.length > 0 || !runtimeValidation.valid || releaseCriticalGaps.length > 0;
|
|
341
|
+
const noEvidence = latestRunId !== null && latestEvidence.length === 0;
|
|
342
|
+
const warnings = [
|
|
343
|
+
...missingBaselineDomains.map((domain) => `missing baseline professional domain ${domain}`),
|
|
344
|
+
...runtimeValidation.issues.map((issue) => issue.message),
|
|
345
|
+
...noCapabilityEvidenceWarnings(noEvidence),
|
|
346
|
+
...releaseCriticalGaps.map((domain) => `release-critical capability gap ${domain}`)
|
|
347
|
+
];
|
|
348
|
+
return {
|
|
349
|
+
status: blocked ? 'blocked' : warnings.length > 0 ? 'warn' : 'pass',
|
|
350
|
+
requiredProfessionalDomains: [...REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS],
|
|
351
|
+
baselineDomains,
|
|
352
|
+
missingBaselineDomains,
|
|
353
|
+
materialPacks: catalog.materialPacks.length,
|
|
354
|
+
activeDomains,
|
|
355
|
+
activePacks,
|
|
356
|
+
sources: {
|
|
357
|
+
total: sources.length,
|
|
358
|
+
quarantined: sources.filter((source) => source.quarantineRequired || source.quarantineStatus === 'quarantined').length,
|
|
359
|
+
denied: sources.filter((source) => source.quarantineStatus === 'denied').length,
|
|
360
|
+
futureAdapters: sources.filter((source) => source.hostCompatibility.some((item) => item.includes('future_adapter'))).length
|
|
361
|
+
},
|
|
362
|
+
evidence: capabilityEvidenceCounts(latestEvidence),
|
|
363
|
+
adoptions: capabilityAdoptionCounts(adoptionRecords, releaseCriticalAdoptions),
|
|
364
|
+
releaseCriticalGaps,
|
|
365
|
+
warnings: uniqueSorted(warnings),
|
|
366
|
+
reasons: capabilityHealthReasons(latestRunId, latestEvidence.length, blocked, warnings.length)
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
catch (error) {
|
|
370
|
+
return {
|
|
371
|
+
status: 'absent',
|
|
372
|
+
requiredProfessionalDomains: [...REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS],
|
|
373
|
+
baselineDomains: [],
|
|
374
|
+
missingBaselineDomains: [],
|
|
375
|
+
materialPacks: 0,
|
|
376
|
+
activeDomains: [],
|
|
377
|
+
activePacks: [],
|
|
378
|
+
sources: { total: 0, quarantined: 0, denied: 0, futureAdapters: 0 },
|
|
379
|
+
evidence: { accepted: 0, candidate: 0, quarantined: 0, diagnostic: 0, blocked: 0 },
|
|
380
|
+
adoptions: { adopted: 0, rejected: 0, unresolved: 0, acceptedAuthority: 0, releaseCriticalClosures: [] },
|
|
381
|
+
warnings: [],
|
|
382
|
+
releaseCriticalGaps: [],
|
|
383
|
+
reasons: [`capability health unavailable: ${error instanceof Error ? error.message : String(error)}`]
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
function capabilityEvidenceFromTestRuns(payloads) {
|
|
388
|
+
return payloads.flatMap((payload) => isRecord(payload) && Array.isArray(payload.capabilityEvidence)
|
|
389
|
+
? payload.capabilityEvidence.filter(isCapabilityEvidenceClassification)
|
|
390
|
+
: []);
|
|
391
|
+
}
|
|
392
|
+
function isCapabilityEvidenceClassification(value) {
|
|
393
|
+
return isRecord(value)
|
|
394
|
+
&& (value.class === 'accepted' || value.class === 'candidate' || value.class === 'quarantined' || value.class === 'diagnostic' || value.class === 'blocked')
|
|
395
|
+
&& (value.source === 'professional_capability' || value.source === 'external_source' || value.source === 'runtime_diagnostic')
|
|
396
|
+
&& typeof value.domainOrSourceId === 'string';
|
|
397
|
+
}
|
|
398
|
+
function capabilityEvidenceCounts(evidence) {
|
|
399
|
+
return {
|
|
400
|
+
accepted: evidence.filter((item) => item.class === 'accepted').length,
|
|
401
|
+
candidate: evidence.filter((item) => item.class === 'candidate').length,
|
|
402
|
+
quarantined: evidence.filter((item) => item.class === 'quarantined').length,
|
|
403
|
+
diagnostic: evidence.filter((item) => item.class === 'diagnostic').length,
|
|
404
|
+
blocked: evidence.filter((item) => item.class === 'blocked').length
|
|
405
|
+
};
|
|
406
|
+
}
|
|
407
|
+
function releaseCriticalCapabilityGaps(tasks, acceptedProfessionalEvidence, releaseCriticalAdoptions) {
|
|
408
|
+
const required = releaseCriticalDomainsForTasks(tasks);
|
|
409
|
+
const acceptedEvidenceDomains = new Set(acceptedProfessionalEvidence.map((item) => item.domainOrSourceId));
|
|
410
|
+
const adoptedDomains = new Set(releaseCriticalAdoptions.map((record) => record.capabilityDomain));
|
|
411
|
+
return required.filter((domain) => !acceptedEvidenceDomains.has(domain) && !adoptedDomains.has(domain));
|
|
412
|
+
}
|
|
413
|
+
function releaseCriticalCapabilityAdoptions(records) {
|
|
414
|
+
return records.filter((record) => (record.status === 'adopted' || record.status === 'rejected')
|
|
415
|
+
&& record.reason.trim().length > 0
|
|
416
|
+
&& (record.finalAuthority === 'sdd_contract' || record.finalAuthority === 'sdd_gate')
|
|
417
|
+
&& isRequiredProfessionalDomain(record.capabilityDomain));
|
|
418
|
+
}
|
|
419
|
+
function capabilityAdoptionCounts(records, releaseCriticalAdoptions) {
|
|
420
|
+
return {
|
|
421
|
+
adopted: records.filter((record) => record.status === 'adopted').length,
|
|
422
|
+
rejected: records.filter((record) => record.status === 'rejected').length,
|
|
423
|
+
unresolved: records.filter((record) => record.status === 'unresolved').length,
|
|
424
|
+
acceptedAuthority: records.filter((record) => record.finalAuthority === 'sdd_contract' || record.finalAuthority === 'sdd_gate').length,
|
|
425
|
+
releaseCriticalClosures: uniqueSorted(releaseCriticalAdoptions.map((record) => record.capabilityDomain).filter(isRequiredProfessionalDomain))
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
function releaseCriticalDomainsForTasks(tasks) {
|
|
429
|
+
const domains = new Set();
|
|
430
|
+
for (const task of tasks) {
|
|
431
|
+
const text = [task.title ?? '', ...task.risk, ...task.affectedFiles, ...task.validation, ...task.acceptance, task.boundary ?? ''].join('\n').toLowerCase();
|
|
432
|
+
if (/security|auth|permission|secret|token|安全/.test(text)) {
|
|
433
|
+
domains.add('security-engineering');
|
|
434
|
+
}
|
|
435
|
+
if (/performance|latency|throughput|benchmark|capacity|性能/.test(text)) {
|
|
436
|
+
domains.add('performance-engineering');
|
|
437
|
+
}
|
|
438
|
+
if (/observability|logging|metrics|tracing|diagnostic|可观测/.test(text)) {
|
|
439
|
+
domains.add('observability-engineering');
|
|
440
|
+
}
|
|
441
|
+
if (/release|deploy|rollback|ci|ship|发布/.test(text)) {
|
|
442
|
+
domains.add('release-engineering');
|
|
443
|
+
}
|
|
444
|
+
if (/database|schema|migration|query|data|db|数据/.test(text)) {
|
|
445
|
+
domains.add('db-data-engineering');
|
|
446
|
+
}
|
|
447
|
+
if (/ui|ux|frontend|browser|figma|accessibility|交互|前端/.test(text)) {
|
|
448
|
+
domains.add(text.includes('frontend') || text.includes('browser') || text.includes('前端') ? 'frontend-engineering' : 'ui-ux-product-design');
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
return [...domains].sort((left, right) => left.localeCompare(right));
|
|
452
|
+
}
|
|
453
|
+
function isRequiredProfessionalDomain(domain) {
|
|
454
|
+
return REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS.includes(domain);
|
|
455
|
+
}
|
|
456
|
+
function noCapabilityEvidenceWarnings(noEvidence) {
|
|
457
|
+
return noEvidence ? ['latest run has no capability evidence classification'] : [];
|
|
458
|
+
}
|
|
459
|
+
function capabilityHealthReasons(latestRunId, evidenceCount, blocked, warnings) {
|
|
460
|
+
if (blocked) {
|
|
461
|
+
return ['Capability catalog, runtime source validation, or release-critical adoption has blocking issues.'];
|
|
462
|
+
}
|
|
463
|
+
if (latestRunId !== null && evidenceCount === 0) {
|
|
464
|
+
return ['Latest run has no recorded capability evidence classification.'];
|
|
465
|
+
}
|
|
466
|
+
if (warnings > 0) {
|
|
467
|
+
return ['Capability health has warnings; inspect status JSON for exact missing evidence or release-critical adoption state.'];
|
|
468
|
+
}
|
|
469
|
+
return ['Professional capability baseline, source policy, and release-critical adoption are visible.'];
|
|
470
|
+
}
|
|
471
|
+
function isRecord(value) {
|
|
472
|
+
return Boolean(value) && typeof value === 'object';
|
|
473
|
+
}
|
|
474
|
+
function uniqueSorted(values) {
|
|
475
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
476
|
+
}
|
|
142
477
|
async function inspectTokenRuntimeProjection(projectRoot) {
|
|
143
478
|
const projections = await listRuntimeProjections(projectRoot, ['context_build', 'team_runtime_decision']);
|
|
144
479
|
const contextPackages = projections.filter((projection) => projection.projectionType === 'context_build');
|