sdd-agent-platform 0.4.1 → 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 +30 -28
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +67 -69
- 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 +12 -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 +12 -25
- 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 +2 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +1 -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 +4 -4
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-trust.js +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 +178 -58
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +14 -7
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +0 -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 +3 -2
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/governance/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +54 -61
- 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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +24 -8
- 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 +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +69 -27
- 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 +15 -15
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/command-team-runtime.js +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 +1 -1
- 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 +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +45 -15
- 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-validation.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/stage-route-binding.d.ts +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 +126 -9
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +0 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +7 -5
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +28 -8
- 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 +37 -27
- 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 +5 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +53 -14
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +1 -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 +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +65 -0
- 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/document-hashes.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +97 -10
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +8 -6
- 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 +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +55 -34
- 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 +44 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +170 -23
- 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 +170 -18
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +544 -32
- 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 +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 +8 -23
- 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 +28 -53
- 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 +10 -50
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +159 -150
- 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 +12 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +238 -103
- 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 +18 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +27 -5
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +9 -32
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/work-units/contracts.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +228 -15
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +49 -15
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +42 -6
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +4 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +1 -2
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +72 -6
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/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 +55 -5
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +538 -34
- 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/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 +67 -69
- 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 +2 -2
- 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 +43 -31
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +14 -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 +12 -25
- 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 +2 -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 +4 -4
- 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 +143 -45
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +193 -58
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +15 -7
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +0 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +50 -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 +12 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +8 -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 +33 -18
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +55 -62
- 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 +25 -8
- 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 +2 -3
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +82 -35
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +15 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +1 -1
- 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 +18 -2
- 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 +1 -1
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +241 -4
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +47 -15
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-import.ts +453 -0
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +2 -2
- 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 +132 -10
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +7 -7
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +31 -8
- 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 +50 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +39 -29
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +62 -16
- 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 +1 -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 +77 -0
- 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/document-hashes.ts +109 -10
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +8 -6
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +123 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +58 -43
- 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 +249 -23
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +196 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +860 -54
- 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 +1 -1
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +9 -23
- 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 +27 -56
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +10 -54
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +8 -1
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +93 -79
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +166 -154
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +100 -47
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +265 -107
- 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 +47 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +48 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +15 -31
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +9 -33
- 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 +246 -17
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +339 -3
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +53 -14
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +45 -8
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +45 -6
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +6 -5
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +1 -3
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +75 -7
- 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 +518 -25
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +670 -41
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/runtime-projections.ts +712 -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 +68 -2
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/test.js +180 -2
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +7 -5
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +222 -26
- 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 +27 -26
- 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 +20 -0
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +1 -1
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.d.ts +0 -4
- package/packages/cli/dist/renderers/workflow.js +30 -89
- 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 +67 -69
- 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 +12 -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 +12 -25
- 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 +2 -1
- package/packages/core/dist/contracts.js +1 -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 +4 -4
- 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 +178 -58
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.js +14 -7
- package/packages/core/dist/evidence/lookup.js.map +1 -1
- package/packages/core/dist/evidence-runtime/contracts.d.ts +0 -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 +3 -2
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.js +2 -2
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -1
- package/packages/core/dist/governance/policy.d.ts +1 -1
- package/packages/core/dist/governance/policy.js +1 -1
- package/packages/core/dist/governance/policy.js.map +1 -1
- package/packages/core/dist/instructions.d.ts +1 -1
- package/packages/core/dist/instructions.js +54 -61
- 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 +1 -0
- package/packages/core/dist/lifecycle/ship.js +24 -8
- 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 +5 -2
- package/packages/core/dist/registries/agent-capability-catalog.js +69 -27
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +15 -15
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js +1 -1
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.js +1 -1
- package/packages/core/dist/registries/command-team-runtime.d.ts +1 -1
- package/packages/core/dist/registries/command-team-runtime.js +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 +1 -1
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +2 -0
- package/packages/core/dist/router/route-projection.js +1 -1
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +45 -15
- 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-validation.js +2 -2
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/router/stage-route-binding.d.ts +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 +126 -9
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +0 -2
- package/packages/core/dist/run-state/inspect-run.js +7 -5
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +28 -8
- 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 +37 -27
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +5 -2
- package/packages/core/dist/run-state/task-evidence.js +53 -14
- package/packages/core/dist/run-state/task-evidence.js.map +1 -1
- 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 +1 -0
- package/packages/core/dist/run-state.js +1 -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 +10 -0
- package/packages/core/dist/runtime-paths.js +65 -0
- 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/document-hashes.d.ts +2 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +97 -10
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -1
- package/packages/core/dist/sdd-docs/run-binding.d.ts +1 -1
- package/packages/core/dist/sdd-docs/run-binding.js +8 -6
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +1 -0
- package/packages/core/dist/sdd-docs/task-parser.js +55 -34
- 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 +44 -1
- package/packages/core/dist/status/project-status.js +170 -23
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +170 -18
- package/packages/core/dist/storage/runtime-store.js +544 -32
- 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 +1 -1
- package/packages/core/dist/test-support/run-state.d.ts +1 -1
- package/packages/core/dist/test-support/run-state.js +8 -23
- 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 +28 -53
- 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 +10 -50
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/single-task-loop.d.ts +0 -1
- package/packages/core/dist/verification/single-task-loop.js +159 -150
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +12 -2
- package/packages/core/dist/verification/test-runtime.js +238 -103
- 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 +18 -0
- package/packages/core/dist/verification/validation-wave.js +27 -5
- package/packages/core/dist/verification/validation-wave.js.map +1 -1
- package/packages/core/dist/verification/verify-contract.d.ts +1 -1
- package/packages/core/dist/verification/verify-contract.js +9 -32
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/work-units/contracts.d.ts +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.js +228 -15
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -1
- package/packages/core/dist/workflow-gate/hard-checks.js +49 -15
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -1
- package/packages/core/dist/workflow-gate/policy.js +42 -6
- package/packages/core/dist/workflow-gate/policy.js.map +1 -1
- package/packages/core/dist/workflow-gate/types.d.ts +4 -5
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +0 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +1 -2
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.js +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +0 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.js +72 -6
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -1
- 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 +55 -5
- package/packages/core/dist/workflow-state/resolve.js +538 -34
- 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/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 -243
- 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 -110
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +0 -497
- 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 -270
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +0 -655
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +0 -569
- 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 -243
- package/packages/core/dist/sync-back/apply.js.map +0 -1
- package/packages/core/dist/sync-back/inspect.d.ts +0 -110
- package/packages/core/dist/sync-back/inspect.js +0 -497
- 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,6 +1,6 @@
|
|
|
1
1
|
import test from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
-
import { mkdtemp, rm } from 'node:fs/promises';
|
|
3
|
+
import { access, mkdtemp, rm } from 'node:fs/promises';
|
|
4
4
|
import { tmpdir } from 'node:os';
|
|
5
5
|
import path from 'node:path';
|
|
6
6
|
|
|
@@ -10,6 +10,7 @@ import { createRun, listRuns, readRunState, writeRunState } from './run-state.js
|
|
|
10
10
|
import { validTaskMarkdown, writeBranchDocs } from '../test-support/fixtures.js';
|
|
11
11
|
import { getRunDir } from '../runtime-paths.js';
|
|
12
12
|
import { exists } from '../storage/json-io.js';
|
|
13
|
+
import { buildRunDurationBreakdown } from './timing.js';
|
|
13
14
|
|
|
14
15
|
test('createRun writes state and append-only events', async () => {
|
|
15
16
|
const root = await mkdtemp(path.join(tmpdir(), 'sdd-runtime-'));
|
|
@@ -24,6 +25,7 @@ test('createRun writes state and append-only events', async () => {
|
|
|
24
25
|
assert.equal(events.some((event) => event.event === 'run_started'), true);
|
|
25
26
|
assert.equal(events.some((event) => event.event === 'lifecycle_decision_recorded'), true);
|
|
26
27
|
assert.equal(await exists(getRunDir(root, state.runId)), false);
|
|
28
|
+
await assert.rejects(access(path.join(root, '.sdd', 'runs')));
|
|
27
29
|
} finally {
|
|
28
30
|
await rm(root, { recursive: true, force: true });
|
|
29
31
|
}
|
|
@@ -43,7 +45,8 @@ test('createRun binds scoped branch task metadata', async () => {
|
|
|
43
45
|
assert.equal(restored.currentTask, 'T1');
|
|
44
46
|
assert.equal(restored.taskId, 'T1');
|
|
45
47
|
assert.deepEqual(restored.affectedFiles, ['packages/core/src/index.ts']);
|
|
46
|
-
assert.
|
|
48
|
+
assert.equal(restored.artifactRoot.replace(/\\/g, '/'), '.sdd/runs/feature');
|
|
49
|
+
assert.equal(await exists(path.join(root, '.sdd', 'runs')), false);
|
|
47
50
|
assert.equal(restored.documentSnapshot.tasksHash !== null, true);
|
|
48
51
|
} finally {
|
|
49
52
|
await rm(root, { recursive: true, force: true });
|
|
@@ -68,3 +71,48 @@ test('listRuns sorts run summaries by updated time descending', async () => {
|
|
|
68
71
|
await rm(root, { recursive: true, force: true });
|
|
69
72
|
}
|
|
70
73
|
});
|
|
74
|
+
|
|
75
|
+
test('buildRunDurationBreakdown classifies runtime gaps and validation contributors', () => {
|
|
76
|
+
const base = {
|
|
77
|
+
contract: 'phase-1.2-run-state-contract',
|
|
78
|
+
runId: 'run-1',
|
|
79
|
+
createdAt: '2026-05-01T00:00:00.000Z',
|
|
80
|
+
updatedAt: '2026-05-01T00:01:00.000Z',
|
|
81
|
+
status: 'blocked',
|
|
82
|
+
phase: 'test',
|
|
83
|
+
currentTask: 'T1',
|
|
84
|
+
taskId: 'T1',
|
|
85
|
+
partition: 'master',
|
|
86
|
+
gitBranch: null,
|
|
87
|
+
artifactRoot: '',
|
|
88
|
+
lifecycleDecision: null,
|
|
89
|
+
documentSnapshot: { specHash: null, planHash: null, tasksHash: null, verifyHash: null },
|
|
90
|
+
affectedFiles: [],
|
|
91
|
+
tasks: {},
|
|
92
|
+
delegations: {},
|
|
93
|
+
artifacts: [],
|
|
94
|
+
validation: { status: 'blocked', commands: [], evidence: [] },
|
|
95
|
+
} as const;
|
|
96
|
+
|
|
97
|
+
const breakdown = buildRunDurationBreakdown(base, {
|
|
98
|
+
events: [
|
|
99
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:00.000Z', event: 'lifecycle_decision_recorded' },
|
|
100
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:05.000Z', event: 'run_context_bound' },
|
|
101
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:06.000Z', event: 'agent_invocation_started' },
|
|
102
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:16.000Z', event: 'runtime_output_received' },
|
|
103
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:20.000Z', event: 'validation_started' },
|
|
104
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:30.000Z', event: 'validation_completed' },
|
|
105
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:40.000Z', event: 'workflow_gate_blocked', data: { status: 'blocked' } },
|
|
106
|
+
{ contract: 'sdd-event-log-v1', runId: 'run-1', time: '2026-05-01T00:00:50.000Z', event: 'run_finished' }
|
|
107
|
+
],
|
|
108
|
+
testSteps: [{ stepId: 'step-1', testRunId: 'test-1', runId: 'run-1', taskId: 'T1', command: 'npm test', status: 'PASS', exitCode: 0, durationMs: 12_000, outputArtifact: 'artifacts/test.log', payload: { startedAt: '2026-05-01T00:00:30.000Z', endedAt: '2026-05-01T00:00:42.000Z' } }]
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
assert.equal(breakdown.elapsedDurationMs, 60_000);
|
|
112
|
+
assert.equal(breakdown.queueOrBindDurationMs, 5_000);
|
|
113
|
+
assert.equal(breakdown.hostWaitingDurationMs, 10_000);
|
|
114
|
+
assert.equal(breakdown.validationDurationMs, 36_000);
|
|
115
|
+
assert.equal(breakdown.blockedDurationMs, 10_000);
|
|
116
|
+
assert.equal(breakdown.waitingDurationMs, 16_000);
|
|
117
|
+
assert.equal(breakdown.slowReason, 'validation');
|
|
118
|
+
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
|
-
import {
|
|
2
|
+
import { readdir, readFile } from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
4
|
import {
|
|
5
|
-
getEvidenceDir,
|
|
6
5
|
getLegacyRunDir,
|
|
7
6
|
getProjectConfigPath,
|
|
7
|
+
getRunEvidenceRoot,
|
|
8
8
|
getRunsDir
|
|
9
9
|
} from '../runtime-paths.js';
|
|
10
10
|
import { exists } from '../storage/json-io.js';
|
|
@@ -17,6 +17,7 @@ import { branchToSafePartition } from '../path-safety.js';
|
|
|
17
17
|
import { resolveSddContext } from '../sdd-docs/context.js';
|
|
18
18
|
import { parseSddBranch } from '../sdd-docs/task-parser.js';
|
|
19
19
|
import { inspectSddTask } from '../sdd-docs/task-inspection.js';
|
|
20
|
+
import { buildRunDurationBreakdown } from './timing.js';
|
|
20
21
|
|
|
21
22
|
export async function readRunState(projectRoot: string, runId: string): Promise<RunState> {
|
|
22
23
|
const storedState = await readRuntimeRunState(projectRoot, runId);
|
|
@@ -84,14 +85,12 @@ export interface CreateRunOptions {
|
|
|
84
85
|
|
|
85
86
|
export async function createRun(projectRoot: string, options: CreateRunOptions = {}): Promise<RunState> {
|
|
86
87
|
await validateProjectConfig(projectRoot);
|
|
87
|
-
if (
|
|
88
|
-
throw new Error('
|
|
88
|
+
if (options.taskId && !options.branch) {
|
|
89
|
+
throw new Error('Task-scoped run creation requires --branch <branch>.');
|
|
89
90
|
}
|
|
90
|
-
const scope = options.branch
|
|
91
|
-
await mkdir(getRunsDir(projectRoot), { recursive: true });
|
|
91
|
+
const scope = options.branch ? await resolveCreateRunScope(projectRoot, options.branch, options.taskId ?? null) : null;
|
|
92
92
|
const runId = options.runId ?? await createUniqueRunId(projectRoot);
|
|
93
93
|
|
|
94
|
-
|
|
95
94
|
const now = new Date().toISOString();
|
|
96
95
|
const state: RunState = {
|
|
97
96
|
contract: RUN_STATE_CONTRACT,
|
|
@@ -110,7 +109,7 @@ export async function createRun(projectRoot: string, options: CreateRunOptions =
|
|
|
110
109
|
projectRoot: path.resolve(projectRoot),
|
|
111
110
|
projectConfigPath: path.relative(projectRoot, getProjectConfigPath(projectRoot)),
|
|
112
111
|
eventLogPath: getRuntimeStoreEventRef(),
|
|
113
|
-
artifactRoot: path.relative(projectRoot,
|
|
112
|
+
artifactRoot: path.relative(projectRoot, path.join(getRunEvidenceRoot(projectRoot), stateEvidenceBranchSlug(scope?.partition ?? null))),
|
|
114
113
|
lifecycleDecision: options.lifecycleDecision ?? emptyRunLifecycleDecisionRecord(),
|
|
115
114
|
tasks: {},
|
|
116
115
|
agents: {},
|
|
@@ -122,11 +121,6 @@ export async function createRun(projectRoot: string, options: CreateRunOptions =
|
|
|
122
121
|
status: 'not_run',
|
|
123
122
|
commands: [],
|
|
124
123
|
evidence: []
|
|
125
|
-
},
|
|
126
|
-
syncBack: {
|
|
127
|
-
mode: 'proposal',
|
|
128
|
-
proposalPath: null,
|
|
129
|
-
status: 'not_created'
|
|
130
124
|
}
|
|
131
125
|
};
|
|
132
126
|
|
|
@@ -134,7 +128,7 @@ export async function createRun(projectRoot: string, options: CreateRunOptions =
|
|
|
134
128
|
await appendEvent(projectRoot, runId, {
|
|
135
129
|
event: 'run_started',
|
|
136
130
|
runId,
|
|
137
|
-
summary: scope ? `Scoped run created for ${scope.partition}
|
|
131
|
+
summary: scope ? `Scoped run created for ${scope.partition}${scope.taskId ? `/${scope.taskId}` : ''}.` : 'Run created by Phase 7.2 SQLite-first runtime storage',
|
|
138
132
|
data: {
|
|
139
133
|
runtimeVersion: RUNTIME_VERSION,
|
|
140
134
|
stateRef: '.sdd/runtime.sqlite:runs',
|
|
@@ -223,9 +217,9 @@ export function summarizeRunState(state: RunState): RunSummary {
|
|
|
223
217
|
createdAt: state.createdAt,
|
|
224
218
|
updatedAt: state.updatedAt,
|
|
225
219
|
validationStatus: state.validation.status,
|
|
226
|
-
syncBackStatus: state.syncBack.status,
|
|
227
220
|
taskIds: Object.keys(state.tasks).sort(),
|
|
228
|
-
artifactCount: state.artifacts.length
|
|
221
|
+
artifactCount: state.artifacts.length,
|
|
222
|
+
durationBreakdown: buildRunDurationBreakdown(state)
|
|
229
223
|
};
|
|
230
224
|
}
|
|
231
225
|
|
|
@@ -253,6 +247,7 @@ export function normalizeRunDocumentSnapshot(snapshot: unknown): RunDocumentSnap
|
|
|
253
247
|
specContractHash: stringOrNull(snapshot.specContractHash),
|
|
254
248
|
planContractHash: stringOrNull(snapshot.planContractHash),
|
|
255
249
|
tasksContractHash: stringOrNull(snapshot.tasksContractHash),
|
|
250
|
+
taskContractHash: stringOrNull(snapshot.taskContractHash),
|
|
256
251
|
planBasedOnSpecHash: stringOrNull(snapshot.planBasedOnSpecHash),
|
|
257
252
|
tasksBasedOnPlanHash: stringOrNull(snapshot.tasksBasedOnPlanHash),
|
|
258
253
|
planBasedOnSpecContractHash: stringOrNull(snapshot.planBasedOnSpecContractHash),
|
|
@@ -268,6 +263,7 @@ export function emptyRunDocumentSnapshot(): RunDocumentSnapshot {
|
|
|
268
263
|
specContractHash: null,
|
|
269
264
|
planContractHash: null,
|
|
270
265
|
tasksContractHash: null,
|
|
266
|
+
taskContractHash: null,
|
|
271
267
|
planBasedOnSpecHash: null,
|
|
272
268
|
tasksBasedOnPlanHash: null,
|
|
273
269
|
planBasedOnSpecContractHash: null,
|
|
@@ -307,9 +303,18 @@ function emptyRunLifecycleDecisionRecord(): RunStateLifecycleDecisionRecord {
|
|
|
307
303
|
};
|
|
308
304
|
}
|
|
309
305
|
|
|
310
|
-
async function resolveCreateRunScope(projectRoot: string, branch: string, taskId: string): Promise<{ partition: string; rawBranch: string; taskId: string; affectedFiles: string[]; documentSnapshot: RunDocumentSnapshot }> {
|
|
306
|
+
async function resolveCreateRunScope(projectRoot: string, branch: string, taskId: string | null): Promise<{ partition: string; rawBranch: string; taskId: string | null; affectedFiles: string[]; documentSnapshot: RunDocumentSnapshot }> {
|
|
311
307
|
const context = await resolveSddContext(projectRoot, { branch, branchSource: 'cli_option' });
|
|
312
308
|
const model = await parseSddBranch(projectRoot, context.partition);
|
|
309
|
+
if (!taskId) {
|
|
310
|
+
return {
|
|
311
|
+
partition: context.partition,
|
|
312
|
+
rawBranch: context.rawBranch,
|
|
313
|
+
taskId: null,
|
|
314
|
+
affectedFiles: [],
|
|
315
|
+
documentSnapshot: documentSnapshotFromModel(model)
|
|
316
|
+
};
|
|
317
|
+
}
|
|
313
318
|
const task = inspectSddTask(model, taskId).task;
|
|
314
319
|
if (!task) {
|
|
315
320
|
throw new Error(`Cannot create scoped run: task ${taskId} was not found in specs/${context.partition}/tasks.md.`);
|
|
@@ -319,18 +324,23 @@ async function resolveCreateRunScope(projectRoot: string, branch: string, taskId
|
|
|
319
324
|
rawBranch: context.rawBranch,
|
|
320
325
|
taskId,
|
|
321
326
|
affectedFiles: task.affectedFiles,
|
|
322
|
-
documentSnapshot:
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
327
|
+
documentSnapshot: documentSnapshotFromModel(model, task)
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
function documentSnapshotFromModel(model: Awaited<ReturnType<typeof parseSddBranch>>, task: ReturnType<typeof inspectSddTask>['task'] = null): RunDocumentSnapshot {
|
|
332
|
+
return {
|
|
333
|
+
specHash: model.documents.specHash ?? null,
|
|
334
|
+
planHash: model.documents.planHash ?? null,
|
|
335
|
+
tasksHash: model.documents.tasksHash ?? null,
|
|
336
|
+
specContractHash: model.documents.specContractHash ?? null,
|
|
337
|
+
planContractHash: model.documents.planContractHash ?? null,
|
|
338
|
+
tasksContractHash: model.documents.tasksContractHash ?? null,
|
|
339
|
+
taskContractHash: task?.contractHash ?? null,
|
|
340
|
+
planBasedOnSpecHash: model.documents.planBasedOnSpecHash ?? null,
|
|
341
|
+
tasksBasedOnPlanHash: model.documents.tasksBasedOnPlanHash ?? null,
|
|
342
|
+
planBasedOnSpecContractHash: model.documents.planBasedOnSpecContractHash ?? null,
|
|
343
|
+
tasksBasedOnPlanContractHash: model.documents.tasksBasedOnPlanContractHash ?? null
|
|
334
344
|
};
|
|
335
345
|
}
|
|
336
346
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { branchToSafePartition } from '../path-safety.js';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
2
|
+
import { isBranchStageEvidenceRef, toBranchStageEvidenceRef } from '../runtime-paths.js';
|
|
3
|
+
import { listRuntimeAcceptanceEvidenceMaps, listRuntimeAgentExecutions, listRuntimeArtifactPayloads, listRuntimeDurableGaps, listRuntimeFanInEvidenceSets, listRuntimeLlmAdvisorAssessments, listRuntimeStageRoleResults, listRuntimeStageTeamSessions, listRuntimeTeamSessions, listRuntimeTestRuns, listRuntimeValidationEnvironmentSessions, listRuntimeValidationWaveRuns, listRuntimeWorkflowGateDecisions, listRuntimeWorkerRuntimes } from '../storage/runtime-store.js';
|
|
4
|
+
import type { RuntimeAcceptanceEvidenceMapRecord, RuntimeArtifactPayloadRecord, RuntimeDurableGapRecord, RuntimeTestRunRecord, RuntimeValidationEnvironmentSessionRecord, RuntimeValidationWaveRunRecord } from '../storage/runtime-store.js';
|
|
5
|
+
import type { SddStage } from '../contracts.js';
|
|
4
6
|
import type { AgentExecutionRecord, TeamSessionRecord } from '../router/agent-runtime.js';
|
|
5
7
|
import type { ResidentWorkerRuntimeRecord } from '../execution/resident-worker.js';
|
|
6
8
|
import type { FanInEvidenceSetRecord, LlmAdvisorAssessmentRecord, StageRoleResultRecord, StageTeamSessionRecord } from '../execution/stage-team-runtime.js';
|
|
@@ -15,8 +17,12 @@ export const TASK_EVIDENCE_VIEW_CONTRACT_VERSION = 'phase-8.12-task-evidence-vie
|
|
|
15
17
|
export interface TaskEvidencePayloadGroups {
|
|
16
18
|
active: RuntimeArtifactPayloadRecord[];
|
|
17
19
|
candidate: RuntimeArtifactPayloadRecord[];
|
|
20
|
+
partial: RuntimeArtifactPayloadRecord[];
|
|
21
|
+
active_attempt: RuntimeArtifactPayloadRecord[];
|
|
18
22
|
rejected: RuntimeArtifactPayloadRecord[];
|
|
19
23
|
superseded: RuntimeArtifactPayloadRecord[];
|
|
24
|
+
quarantined: RuntimeArtifactPayloadRecord[];
|
|
25
|
+
stale: RuntimeArtifactPayloadRecord[];
|
|
20
26
|
all: RuntimeArtifactPayloadRecord[];
|
|
21
27
|
}
|
|
22
28
|
|
|
@@ -59,7 +65,6 @@ export interface TaskEvidenceView {
|
|
|
59
65
|
compatibility: LatestEligibleRunCandidate['compatibility'] | null;
|
|
60
66
|
payloads: TaskEvidencePayloadGroups;
|
|
61
67
|
validation: TaskEvidenceValidationView;
|
|
62
|
-
syncBackDecision: RuntimeSyncBackDecisionRecord | null;
|
|
63
68
|
runtimeActivity: TaskEvidenceRuntimeActivity;
|
|
64
69
|
gaps: SddTaskGap[];
|
|
65
70
|
durableGaps: RuntimeDurableGapRecord[];
|
|
@@ -73,11 +78,10 @@ export async function readTaskEvidenceView(projectRoot: string, input: { branch?
|
|
|
73
78
|
const selectedRunState = selection.selected?.runId === workflow.latestRunState?.runId ? workflow.latestRunState : null;
|
|
74
79
|
const runIds = uniqueRunIds(selection);
|
|
75
80
|
const payloads = await readTaskPayloads(projectRoot, workflow.branch, input.taskId, runIds);
|
|
76
|
-
const [testRuns, validationWaveEvidence,
|
|
81
|
+
const [testRuns, validationWaveEvidence, runtimeActivity, durableGaps, stageTeam, workflowGate] = selection.selected
|
|
77
82
|
? await Promise.all([
|
|
78
83
|
listRuntimeTestRuns(projectRoot, selection.selected.runId),
|
|
79
84
|
readValidationWaveEvidence(projectRoot, workflow.branch, input.taskId, selection.selected.runId),
|
|
80
|
-
latestSyncBackDecision(projectRoot, selection.selected.runId),
|
|
81
85
|
readRuntimeActivity(projectRoot, selection.selected.runId),
|
|
82
86
|
listRuntimeDurableGaps(projectRoot, { partition: workflow.branch, taskId: input.taskId, status: 'open_terminal' }),
|
|
83
87
|
readStageTeamEvidence(projectRoot, workflow.branch, input.taskId, selection.selected.runId),
|
|
@@ -86,7 +90,6 @@ export async function readTaskEvidenceView(projectRoot: string, input: { branch?
|
|
|
86
90
|
: await Promise.all([
|
|
87
91
|
Promise.resolve([]),
|
|
88
92
|
readValidationWaveEvidence(projectRoot, workflow.branch, input.taskId, null),
|
|
89
|
-
Promise.resolve(null),
|
|
90
93
|
Promise.resolve(emptyRuntimeActivity()),
|
|
91
94
|
listRuntimeDurableGaps(projectRoot, { partition: workflow.branch, taskId: input.taskId, status: 'open_terminal' }),
|
|
92
95
|
readStageTeamEvidence(projectRoot, workflow.branch, input.taskId, null),
|
|
@@ -113,7 +116,6 @@ export async function readTaskEvidenceView(projectRoot: string, input: { branch?
|
|
|
113
116
|
environmentSessions,
|
|
114
117
|
acceptanceEvidenceMaps
|
|
115
118
|
},
|
|
116
|
-
syncBackDecision,
|
|
117
119
|
runtimeActivity,
|
|
118
120
|
gaps: [...workflow.visibleGaps.filter((gap) => gap.taskId === input.taskId || gap.taskId === null), ...runtimeTaskGaps(selectedRunState?.tasks[input.taskId])],
|
|
119
121
|
durableGaps,
|
|
@@ -134,15 +136,63 @@ async function readTaskPayloads(projectRoot: string, branch: string, taskId: str
|
|
|
134
136
|
const payloads = runIds.length > 0
|
|
135
137
|
? (await Promise.all(runIds.map((runId) => listRuntimeArtifactPayloads(projectRoot, { runId, taskId })))).flat()
|
|
136
138
|
: await listRuntimeArtifactPayloads(projectRoot, { branchSlug: branchToSafePartition(branch), taskId });
|
|
139
|
+
const normalizedPayloads = payloads.map((payload) => normalizeTaskEvidencePayload(branch, payload));
|
|
137
140
|
return {
|
|
138
|
-
active:
|
|
139
|
-
candidate:
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
active: normalizedPayloads.filter((payload) => payload.status === 'active'),
|
|
142
|
+
candidate: normalizedPayloads.filter((payload) => payload.status === 'candidate'),
|
|
143
|
+
partial: normalizedPayloads.filter((payload) => payload.status === 'partial'),
|
|
144
|
+
active_attempt: normalizedPayloads.filter((payload) => payload.status === 'active_attempt'),
|
|
145
|
+
rejected: normalizedPayloads.filter((payload) => payload.status === 'rejected'),
|
|
146
|
+
superseded: normalizedPayloads.filter((payload) => payload.status === 'superseded'),
|
|
147
|
+
quarantined: normalizedPayloads.filter((payload) => payload.status === 'quarantined'),
|
|
148
|
+
stale: normalizedPayloads.filter((payload) => payload.status === 'stale'),
|
|
149
|
+
all: normalizedPayloads
|
|
143
150
|
};
|
|
144
151
|
}
|
|
145
152
|
|
|
153
|
+
function normalizeTaskEvidencePayload(branch: string, payload: RuntimeArtifactPayloadRecord): RuntimeArtifactPayloadRecord {
|
|
154
|
+
const fileName = payload.logicalRef.replace(/\\/g, '/').split('/').filter(Boolean).pop();
|
|
155
|
+
if (!fileName) {
|
|
156
|
+
return payload;
|
|
157
|
+
}
|
|
158
|
+
const logicalRef = isBranchStageEvidenceRef(payload.logicalRef)
|
|
159
|
+
? payload.logicalRef
|
|
160
|
+
: toBranchStageEvidenceRef(branch, stageForPayload(payload, fileName), fileName);
|
|
161
|
+
const physicalPayloadPath = payload.physicalPayloadPath.replace(/\\/g, '/').replace(/^artifacts\//, '');
|
|
162
|
+
return {
|
|
163
|
+
...payload,
|
|
164
|
+
logicalRef,
|
|
165
|
+
physicalPayloadPath,
|
|
166
|
+
payload: normalizeTaskEvidencePayloadMetadata(payload.payload, logicalRef, physicalPayloadPath)
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
function normalizeTaskEvidencePayloadMetadata(value: unknown, logicalRef: string, physicalPayloadPath: string): unknown {
|
|
171
|
+
if (!value || typeof value !== 'object' || Array.isArray(value)) {
|
|
172
|
+
return value;
|
|
173
|
+
}
|
|
174
|
+
return {
|
|
175
|
+
...value,
|
|
176
|
+
logicalRef,
|
|
177
|
+
artifactPath: logicalRef,
|
|
178
|
+
physicalPayloadPath
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
function stageForPayload(payload: RuntimeArtifactPayloadRecord, fileName: string): SddStage {
|
|
183
|
+
const role = payload.artifactRole.toLowerCase();
|
|
184
|
+
if (role.includes('goal') || fileName.startsWith('acceptance-coverage-')) {
|
|
185
|
+
return 'goal-verify';
|
|
186
|
+
}
|
|
187
|
+
if (role.includes('validation') || fileName.startsWith('validation-') || fileName.startsWith('test-validation-')) {
|
|
188
|
+
return 'test';
|
|
189
|
+
}
|
|
190
|
+
if (role.includes('ship') || fileName.startsWith('ship-') || fileName.startsWith('release-')) {
|
|
191
|
+
return 'ship';
|
|
192
|
+
}
|
|
193
|
+
return 'do';
|
|
194
|
+
}
|
|
195
|
+
|
|
146
196
|
async function readValidationWaveEvidence(projectRoot: string, partition: string, taskId: string, runId: string | null): Promise<[RuntimeValidationWaveRunRecord[], RuntimeValidationEnvironmentSessionRecord[], RuntimeAcceptanceEvidenceMapRecord[]]> {
|
|
147
197
|
const query = runId ? { partition, runId, taskId } : { partition, taskId };
|
|
148
198
|
const validationWaves = await listRuntimeValidationWaveRuns(projectRoot, query);
|
|
@@ -154,10 +204,6 @@ async function readValidationWaveEvidence(projectRoot: string, partition: string
|
|
|
154
204
|
return [validationWaves, environmentSessions, acceptanceEvidenceMaps];
|
|
155
205
|
}
|
|
156
206
|
|
|
157
|
-
async function latestSyncBackDecision(projectRoot: string, runId: string): Promise<RuntimeSyncBackDecisionRecord | null> {
|
|
158
|
-
const decisions = await listRuntimeSyncBackDecisions(projectRoot, runId);
|
|
159
|
-
return decisions[0] ?? null;
|
|
160
|
-
}
|
|
161
207
|
|
|
162
208
|
async function readRuntimeActivity(projectRoot: string, runId: string): Promise<TaskEvidenceRuntimeActivity> {
|
|
163
209
|
const [agentExecutions, teamSessions, workerRuntimes] = await Promise.all([
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import type { RuntimeTestRunRecord, RuntimeTestStepRecord } from '../storage/runtime-store.js';
|
|
2
|
+
import type { RunDurationBreakdown, RunDurationContributor, RunState, RuntimeEvent } from './model.js';
|
|
3
|
+
|
|
4
|
+
export type RunDurationContributorKind = RunDurationContributor['kind'];
|
|
5
|
+
|
|
6
|
+
const MIN_CONTRIBUTOR_MS = 1_000;
|
|
7
|
+
|
|
8
|
+
export function buildRunDurationBreakdown(state: RunState, input: { events?: RuntimeEvent[]; testRuns?: RuntimeTestRunRecord[]; testSteps?: RuntimeTestStepRecord[] } = {}): RunDurationBreakdown {
|
|
9
|
+
const elapsedDurationMs = durationBetween(state.createdAt, state.updatedAt);
|
|
10
|
+
const eventContributors = classifyEventGaps(input.events ?? []);
|
|
11
|
+
const validationContributors = validationDurationContributors(input.testRuns ?? [], input.testSteps ?? []);
|
|
12
|
+
const contributors = [...eventContributors, ...validationContributors].sort((left, right) => right.durationMs - left.durationMs);
|
|
13
|
+
const validationDurationMs = sumByKind(contributors, 'validation');
|
|
14
|
+
const blockedDurationMs = sumByKind(contributors, 'blocked');
|
|
15
|
+
const queueOrBindDurationMs = sumByKind(contributors, 'queue_or_bind');
|
|
16
|
+
const unknownGapDurationMs = sumByKind(contributors, 'unknown_gap');
|
|
17
|
+
const hostWaitingDurationMs = sumByKind(contributors, 'host_waiting');
|
|
18
|
+
const waitingDurationMs = queueOrBindDurationMs + unknownGapDurationMs + hostWaitingDurationMs;
|
|
19
|
+
const activeRuntimeDurationMs = Math.max(0, elapsedDurationMs - waitingDurationMs - blockedDurationMs - validationDurationMs);
|
|
20
|
+
const topContributors = contributors.slice(0, 3);
|
|
21
|
+
return {
|
|
22
|
+
elapsedDurationMs,
|
|
23
|
+
activeRuntimeDurationMs,
|
|
24
|
+
validationDurationMs,
|
|
25
|
+
waitingDurationMs,
|
|
26
|
+
blockedDurationMs,
|
|
27
|
+
queueOrBindDurationMs,
|
|
28
|
+
unknownGapDurationMs,
|
|
29
|
+
hostWaitingDurationMs,
|
|
30
|
+
slowReason: topContributors[0]?.kind ?? (elapsedDurationMs > 0 ? 'active_runtime' : 'none'),
|
|
31
|
+
topContributors
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function classifyEventGaps(events: RuntimeEvent[]): RunDurationContributor[] {
|
|
36
|
+
const sorted = [...events].sort((left, right) => Date.parse(left.time) - Date.parse(right.time));
|
|
37
|
+
const contributors: RunDurationContributor[] = [];
|
|
38
|
+
for (let index = 0; index < sorted.length - 1; index += 1) {
|
|
39
|
+
const current = sorted[index];
|
|
40
|
+
const next = sorted[index + 1];
|
|
41
|
+
const durationMs = durationBetween(current.time, next.time);
|
|
42
|
+
if (durationMs < MIN_CONTRIBUTOR_MS) {
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
const kind = classifyGap(current, next);
|
|
46
|
+
contributors.push({
|
|
47
|
+
kind,
|
|
48
|
+
durationMs,
|
|
49
|
+
startedAt: current.time,
|
|
50
|
+
endedAt: next.time,
|
|
51
|
+
reason: gapReason(kind, current, next),
|
|
52
|
+
refs: [current.event, next.event]
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
return contributors;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function validationDurationContributors(testRuns: RuntimeTestRunRecord[], testSteps: RuntimeTestStepRecord[]): RunDurationContributor[] {
|
|
59
|
+
if (testSteps.length > 0) {
|
|
60
|
+
return testSteps
|
|
61
|
+
.filter((step) => step.durationMs >= MIN_CONTRIBUTOR_MS)
|
|
62
|
+
.map((step) => {
|
|
63
|
+
const refs = step.outputArtifact ? [step.stepId, step.outputArtifact] : [step.stepId];
|
|
64
|
+
return {
|
|
65
|
+
kind: 'validation' as const,
|
|
66
|
+
durationMs: step.durationMs,
|
|
67
|
+
startedAt: stringPayload(step.payload, 'startedAt') ?? '',
|
|
68
|
+
endedAt: stringPayload(step.payload, 'endedAt') ?? '',
|
|
69
|
+
reason: `validation command ${step.command}`,
|
|
70
|
+
refs
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
return testRuns
|
|
75
|
+
.map((run) => ({ run, durationMs: durationBetween(run.startedAt, run.completedAt) }))
|
|
76
|
+
.filter((entry) => entry.durationMs >= MIN_CONTRIBUTOR_MS)
|
|
77
|
+
.map((entry) => ({
|
|
78
|
+
kind: 'validation' as const,
|
|
79
|
+
durationMs: entry.durationMs,
|
|
80
|
+
startedAt: entry.run.startedAt,
|
|
81
|
+
endedAt: entry.run.completedAt,
|
|
82
|
+
reason: `validation test run ${entry.run.testRunId}`,
|
|
83
|
+
refs: [entry.run.testRunId]
|
|
84
|
+
}));
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
function classifyGap(current: RuntimeEvent, next: RuntimeEvent): RunDurationContributorKind {
|
|
88
|
+
if (current.event === 'lifecycle_decision_recorded' && next.event === 'run_context_bound') {
|
|
89
|
+
return 'queue_or_bind';
|
|
90
|
+
}
|
|
91
|
+
if (mentionsValidation(current) || mentionsValidation(next)) {
|
|
92
|
+
return 'validation';
|
|
93
|
+
}
|
|
94
|
+
if (mentionsBlocked(current) || mentionsBlocked(next)) {
|
|
95
|
+
return 'blocked';
|
|
96
|
+
}
|
|
97
|
+
if (mentionsHostWait(current)) {
|
|
98
|
+
return 'host_waiting';
|
|
99
|
+
}
|
|
100
|
+
return 'unknown_gap';
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function gapReason(kind: RunDurationContributorKind, current: RuntimeEvent, next: RuntimeEvent): string {
|
|
104
|
+
if (kind === 'queue_or_bind') {
|
|
105
|
+
return 'gap between lifecycle decision and run context bind';
|
|
106
|
+
}
|
|
107
|
+
if (kind === 'validation') {
|
|
108
|
+
return 'gap around validation runtime events';
|
|
109
|
+
}
|
|
110
|
+
if (kind === 'blocked') {
|
|
111
|
+
return 'gap around blocked or gate terminal events';
|
|
112
|
+
}
|
|
113
|
+
if (kind === 'host_waiting') {
|
|
114
|
+
return 'gap after host invocation activity without runtime output';
|
|
115
|
+
}
|
|
116
|
+
return `gap between ${current.event} and ${next.event}`;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function mentionsValidation(event: RuntimeEvent): boolean {
|
|
120
|
+
return event.event.includes('test') || event.event.includes('validation');
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
function mentionsBlocked(event: RuntimeEvent): boolean {
|
|
124
|
+
const status = typeof event.data?.status === 'string' ? event.data.status.toLowerCase() : '';
|
|
125
|
+
return event.event.includes('blocked') || event.event.includes('gate') || status === 'blocked' || status === 'failed';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
function mentionsHostWait(event: RuntimeEvent): boolean {
|
|
129
|
+
return event.event.includes('invocation') || event.event.includes('agent') || event.event.includes('delegation');
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
function sumByKind(contributors: RunDurationContributor[], kind: RunDurationContributorKind): number {
|
|
133
|
+
return contributors.filter((contributor) => contributor.kind === kind).reduce((sum, contributor) => sum + contributor.durationMs, 0);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function durationBetween(startedAt: string, endedAt: string): number {
|
|
137
|
+
const start = Date.parse(startedAt);
|
|
138
|
+
const end = Date.parse(endedAt);
|
|
139
|
+
return Number.isFinite(start) && Number.isFinite(end) ? Math.max(0, end - start) : 0;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
function stringPayload(payload: unknown, key: string): string | null {
|
|
143
|
+
return payload && typeof payload === 'object' && key in payload && typeof (payload as Record<string, unknown>)[key] === 'string'
|
|
144
|
+
? String((payload as Record<string, unknown>)[key])
|
|
145
|
+
: null;
|
|
146
|
+
}
|
|
@@ -7,7 +7,6 @@ import { inspectWavePlan } from '../planning/wave-plan.js';
|
|
|
7
7
|
import { inspectRun } from '../run-state/inspect-run.js';
|
|
8
8
|
import { inspectLocalRunIndex } from '../run-state/run-index.js';
|
|
9
9
|
import { getProjectStatus } from '../status/project-status.js';
|
|
10
|
-
import { inspectSyncBack } from '../sync-back/inspect.js';
|
|
11
10
|
import { createRuntimeAnalysisReport } from './findings.js';
|
|
12
11
|
import type { RuntimeAnalysisInputIssue, RuntimeAnalysisOptions, RuntimeAnalysisReport } from './model.js';
|
|
13
12
|
|
|
@@ -27,7 +26,6 @@ export async function buildRuntimeAnalysisReport(projectRoot: string, options: R
|
|
|
27
26
|
const runInspection = selectedRunId ? await runtimeAnalysisStep(inputIssues, 'run', () => inspectRun(projectRoot, selectedRunId), { runId: selectedRunId }) : null;
|
|
28
27
|
const evidenceSummary = selectedRunId ? await runtimeAnalysisStep(inputIssues, 'evidence', () => buildEvidenceSummaryProjection(projectRoot, { runId: selectedRunId, taskId: selectedTaskId ?? undefined }), { runId: selectedRunId, taskId: selectedTaskId ?? undefined }) : null;
|
|
29
28
|
const contextPackage = selectedTaskId ? await runtimeAnalysisStep(inputIssues, 'context', () => buildContextBuildPackage(projectRoot, { taskId: selectedTaskId, branch, mode: 'do', profile }), { taskId: selectedTaskId }) : null;
|
|
30
|
-
const syncBack = selectedTaskId ? await runtimeAnalysisStep(inputIssues, 'sync_back', () => inspectSyncBack(projectRoot, { runId: selectedRunId ?? undefined, branch, taskId: selectedTaskId }), { runId: selectedRunId ?? undefined, taskId: selectedTaskId }) : null;
|
|
31
29
|
|
|
32
30
|
return createRuntimeAnalysisReport({
|
|
33
31
|
generatedAt: new Date().toISOString(),
|
|
@@ -43,7 +41,6 @@ export async function buildRuntimeAnalysisReport(projectRoot: string, options: R
|
|
|
43
41
|
runInspection,
|
|
44
42
|
evidenceSummary,
|
|
45
43
|
contextPackage,
|
|
46
|
-
syncBack,
|
|
47
44
|
inputIssues
|
|
48
45
|
});
|
|
49
46
|
}
|