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,15 +1,16 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
3
|
import path from 'node:path';
|
|
4
|
-
import {
|
|
5
|
-
import { readRuntimeRunState, recordRuntimeEvidenceAttachment, runtimeScopedId, withRuntimeStore } from '../storage/runtime-store.js';
|
|
6
|
-
import { exists } from '../storage/json-io.js';
|
|
4
|
+
import { getBranchStageEvidencePathFromRef, getEvidenceAttachmentPath, getLegacyArtifactPath, getRunRelativeArtifactPath, getRuntimeStorePath, isBranchStageEvidenceRef, normalizeArtifactRootRelativePath, normalizeBranchStageEvidenceRef, toBranchStageEvidenceRef } from '../runtime-paths.js';
|
|
5
|
+
import { readRuntimeRunState, recordRuntimeArtifactPayload, recordRuntimeEvidenceAttachment, resolveRuntimeArtifactPayload, runtimeScopedId, withRuntimeStore } from '../storage/runtime-store.js';
|
|
7
6
|
import { appendArtifactHashLedgerEntry } from './invocation-ledger.js';
|
|
8
7
|
export async function writeArtifact(projectRoot, runId, artifactRootRelativePath, content) {
|
|
9
8
|
const normalized = normalizeArtifactRootRelativePath(artifactRootRelativePath);
|
|
10
9
|
const runRelativePath = getRunRelativeArtifactPath(normalized);
|
|
11
|
-
const
|
|
12
|
-
const
|
|
10
|
+
const runScope = await resolveRunScope(projectRoot, runId);
|
|
11
|
+
const contentHash = hashDocumentContent(content);
|
|
12
|
+
const physicalPayloadPath = uniquePhysicalPayloadPath(runRelativePath, runId, contentHash);
|
|
13
|
+
const absolutePath = getEvidenceAttachmentPath(projectRoot, runScope.branchSlug, physicalPayloadPath);
|
|
13
14
|
await mkdir(path.dirname(absolutePath), { recursive: true });
|
|
14
15
|
await writeFile(absolutePath, content, 'utf8');
|
|
15
16
|
await appendArtifactHashLedgerEntry(projectRoot, {
|
|
@@ -18,26 +19,172 @@ export async function writeArtifact(projectRoot, runId, artifactRootRelativePath
|
|
|
18
19
|
content,
|
|
19
20
|
status: 'written'
|
|
20
21
|
});
|
|
21
|
-
await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'written' });
|
|
22
|
+
await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'written', taskId: runScope.taskId });
|
|
23
|
+
await recordRuntimeArtifactPayload(projectRoot, {
|
|
24
|
+
payloadId: runtimeScopedId(runId, runRelativePath, contentHash),
|
|
25
|
+
runId,
|
|
26
|
+
sourceRunId: runId,
|
|
27
|
+
branchSlug: runScope.branchSlug,
|
|
28
|
+
taskId: runScope.taskId,
|
|
29
|
+
logicalRef: runRelativePath,
|
|
30
|
+
physicalPayloadPath,
|
|
31
|
+
artifactRole: artifactKind(runRelativePath),
|
|
32
|
+
digest: contentHash,
|
|
33
|
+
status: 'active',
|
|
34
|
+
payload: { logicalRef: runRelativePath, physicalPayloadPath, artifactPath: runRelativePath, status: 'written' }
|
|
35
|
+
});
|
|
22
36
|
await recordRuntimeEvidenceAttachment(projectRoot, {
|
|
23
|
-
branchSlug,
|
|
37
|
+
branchSlug: runScope.branchSlug,
|
|
24
38
|
runId,
|
|
39
|
+
taskId: runScope.taskId,
|
|
25
40
|
kind: artifactKind(runRelativePath),
|
|
41
|
+
relativePath: physicalPayloadPath,
|
|
42
|
+
contentHash,
|
|
43
|
+
bytes: Buffer.byteLength(content, 'utf8'),
|
|
44
|
+
payload: { logicalRef: runRelativePath, physicalPayloadPath, status: 'written' }
|
|
45
|
+
});
|
|
46
|
+
return { absolutePath, runRelativePath };
|
|
47
|
+
}
|
|
48
|
+
export async function recordStageEvidenceArtifact(projectRoot, runId, stageEvidenceRef, content, options = {}) {
|
|
49
|
+
const runRelativePath = normalizeBranchStageEvidenceRef(stageEvidenceRef);
|
|
50
|
+
const runScope = await resolveRunScope(projectRoot, runId);
|
|
51
|
+
const taskId = options.taskId ?? runScope.taskId;
|
|
52
|
+
const contentHash = hashDocumentContent(content);
|
|
53
|
+
const absolutePath = getBranchStageEvidencePathFromRef(projectRoot, runRelativePath);
|
|
54
|
+
await mkdir(path.dirname(absolutePath), { recursive: true });
|
|
55
|
+
await writeFile(absolutePath, content, 'utf8');
|
|
56
|
+
await appendArtifactHashLedgerEntry(projectRoot, {
|
|
57
|
+
runId,
|
|
58
|
+
taskId,
|
|
59
|
+
branch: runScope.branchSlug,
|
|
60
|
+
artifactPath: runRelativePath,
|
|
61
|
+
content,
|
|
62
|
+
status: 'written'
|
|
63
|
+
});
|
|
64
|
+
await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'written', taskId });
|
|
65
|
+
await recordRuntimeArtifactPayload(projectRoot, {
|
|
66
|
+
payloadId: runtimeScopedId(runId, runRelativePath, contentHash),
|
|
67
|
+
runId,
|
|
68
|
+
sourceRunId: runId,
|
|
69
|
+
branchSlug: runScope.branchSlug,
|
|
70
|
+
taskId,
|
|
71
|
+
logicalRef: runRelativePath,
|
|
72
|
+
physicalPayloadPath: runRelativePath,
|
|
73
|
+
artifactRole: options.artifactRole ?? artifactKind(runRelativePath),
|
|
74
|
+
digest: contentHash,
|
|
75
|
+
status: 'active',
|
|
76
|
+
payload: { logicalRef: runRelativePath, physicalPayloadPath: runRelativePath, storage: 'stage-evidence', status: 'written' }
|
|
77
|
+
});
|
|
78
|
+
await recordRuntimeEvidenceAttachment(projectRoot, {
|
|
79
|
+
branchSlug: runScope.branchSlug,
|
|
80
|
+
runId,
|
|
81
|
+
taskId,
|
|
82
|
+
kind: options.artifactRole ?? artifactKind(runRelativePath),
|
|
26
83
|
relativePath: runRelativePath,
|
|
27
|
-
contentHash
|
|
84
|
+
contentHash,
|
|
28
85
|
bytes: Buffer.byteLength(content, 'utf8'),
|
|
29
|
-
payload: {
|
|
86
|
+
payload: { logicalRef: runRelativePath, physicalPayloadPath: runRelativePath, storage: 'stage-evidence', status: 'written' }
|
|
30
87
|
});
|
|
31
88
|
return { absolutePath, runRelativePath };
|
|
32
89
|
}
|
|
90
|
+
export async function recordRuntimeOnlyArtifact(projectRoot, runId, artifactRootRelativePath, content, options = {}) {
|
|
91
|
+
const normalized = normalizeArtifactRootRelativePath(artifactRootRelativePath);
|
|
92
|
+
const runRelativePath = options.logicalRef ?? getRunRelativeArtifactPath(normalized);
|
|
93
|
+
const runScope = await resolveRunScope(projectRoot, runId);
|
|
94
|
+
const branchSlug = options.branch ?? runScope.branchSlug;
|
|
95
|
+
const taskId = options.taskId ?? runScope.taskId;
|
|
96
|
+
const contentHash = hashDocumentContent(content);
|
|
97
|
+
const physicalPayloadPath = `runtime.sqlite:${runId}:${runRelativePath}`;
|
|
98
|
+
await appendArtifactHashLedgerEntry(projectRoot, {
|
|
99
|
+
runId,
|
|
100
|
+
taskId,
|
|
101
|
+
branch: branchSlug,
|
|
102
|
+
artifactPath: runRelativePath,
|
|
103
|
+
content,
|
|
104
|
+
status: 'recorded'
|
|
105
|
+
});
|
|
106
|
+
await recordRuntimeArtifact(projectRoot, { runId, path: runRelativePath, content, status: 'recorded', taskId });
|
|
107
|
+
await recordRuntimeArtifactPayload(projectRoot, {
|
|
108
|
+
payloadId: runtimeScopedId(runId, runRelativePath, contentHash),
|
|
109
|
+
runId,
|
|
110
|
+
sourceRunId: runId,
|
|
111
|
+
branchSlug,
|
|
112
|
+
taskId,
|
|
113
|
+
logicalRef: runRelativePath,
|
|
114
|
+
physicalPayloadPath,
|
|
115
|
+
artifactRole: options.artifactRole ?? artifactKind(runRelativePath),
|
|
116
|
+
digest: contentHash,
|
|
117
|
+
status: 'active',
|
|
118
|
+
payload: { logicalRef: runRelativePath, physicalPayloadPath, storage: 'runtime.sqlite', content }
|
|
119
|
+
});
|
|
120
|
+
await recordRuntimeEvidenceAttachment(projectRoot, {
|
|
121
|
+
branchSlug,
|
|
122
|
+
runId,
|
|
123
|
+
taskId,
|
|
124
|
+
kind: options.artifactRole ?? artifactKind(runRelativePath),
|
|
125
|
+
relativePath: physicalPayloadPath,
|
|
126
|
+
contentHash,
|
|
127
|
+
bytes: Buffer.byteLength(content, 'utf8'),
|
|
128
|
+
payload: { logicalRef: runRelativePath, physicalPayloadPath, storage: 'runtime.sqlite' }
|
|
129
|
+
});
|
|
130
|
+
return { absolutePath: `${getRuntimeStorePath(projectRoot)}#${runRelativePath}`, runRelativePath };
|
|
131
|
+
}
|
|
33
132
|
export async function readArtifact(projectRoot, runId, artifactRootRelativePath) {
|
|
34
133
|
const normalized = normalizeArtifactRootRelativePath(artifactRootRelativePath);
|
|
35
134
|
const runRelativePath = getRunRelativeArtifactPath(normalized);
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
135
|
+
const runScope = await resolveRunScope(projectRoot, runId);
|
|
136
|
+
const payload = await resolveRuntimeArtifactPayload(projectRoot, runId, runRelativePath)
|
|
137
|
+
?? await resolveRuntimeArtifactPayload(projectRoot, runId, runtimeStageEvidenceRef(runScope.branchSlug, normalized));
|
|
138
|
+
const payloadContent = runtimePayloadContent(payload);
|
|
139
|
+
if (payloadContent !== null) {
|
|
140
|
+
return payloadContent;
|
|
141
|
+
}
|
|
142
|
+
if (payload) {
|
|
143
|
+
if (isBranchStageEvidenceRef(payload.physicalPayloadPath)) {
|
|
144
|
+
return readFile(getBranchStageEvidencePathFromRef(projectRoot, payload.physicalPayloadPath), 'utf8');
|
|
145
|
+
}
|
|
146
|
+
return readFile(getEvidenceAttachmentPath(projectRoot, runScope.branchSlug, payload.physicalPayloadPath), 'utf8');
|
|
147
|
+
}
|
|
148
|
+
const stageEvidenceRef = runtimeStageEvidenceRef(runScope.branchSlug, normalized);
|
|
149
|
+
try {
|
|
150
|
+
return await readFile(getBranchStageEvidencePathFromRef(projectRoot, stageEvidenceRef), 'utf8');
|
|
39
151
|
}
|
|
40
|
-
|
|
152
|
+
catch {
|
|
153
|
+
try {
|
|
154
|
+
return await readFile(getEvidenceAttachmentPath(projectRoot, runScope.branchSlug, runRelativePath), 'utf8');
|
|
155
|
+
}
|
|
156
|
+
catch {
|
|
157
|
+
return readFile(getLegacyArtifactPath(projectRoot, runId, normalized), 'utf8');
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
function runtimePayloadContent(payload) {
|
|
162
|
+
if (!payload || !payload.payload || typeof payload.payload !== 'object' || Array.isArray(payload.payload)) {
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
const content = payload.payload.content;
|
|
166
|
+
return typeof content === 'string' ? content : null;
|
|
167
|
+
}
|
|
168
|
+
function runtimeStageEvidenceRef(branch, artifactRootRelativePath) {
|
|
169
|
+
const fileName = path.posix.basename(artifactRootRelativePath.replace(/\\/g, '/'));
|
|
170
|
+
return toBranchStageEvidenceRef(branch, runtimeStageForArtifact(fileName), fileName);
|
|
171
|
+
}
|
|
172
|
+
function runtimeStageForArtifact(fileName) {
|
|
173
|
+
if (fileName.startsWith('acceptance-coverage-')) {
|
|
174
|
+
return 'goal-verify';
|
|
175
|
+
}
|
|
176
|
+
if (fileName.startsWith('test-') || fileName.startsWith('validation-')) {
|
|
177
|
+
return 'test';
|
|
178
|
+
}
|
|
179
|
+
if (fileName.startsWith('ship-') || fileName.startsWith('release-')) {
|
|
180
|
+
return 'ship';
|
|
181
|
+
}
|
|
182
|
+
return 'do';
|
|
183
|
+
}
|
|
184
|
+
function uniquePhysicalPayloadPath(logicalRef, runId, digest) {
|
|
185
|
+
const parsed = path.posix.parse(logicalRef.replace(/\\/g, '/'));
|
|
186
|
+
const suffix = `${runId}-${digest.slice(0, 12)}`;
|
|
187
|
+
return path.posix.join(parsed.dir, `${parsed.name}-${suffix}${parsed.ext}`);
|
|
41
188
|
}
|
|
42
189
|
export function artifactKind(artifactPath) {
|
|
43
190
|
const fileName = path.posix.basename(artifactPath.replace(/\\/g, '/'));
|
|
@@ -50,15 +197,15 @@ export function artifactKind(artifactPath) {
|
|
|
50
197
|
if (fileName.startsWith('debug-')) {
|
|
51
198
|
return 'debug';
|
|
52
199
|
}
|
|
200
|
+
if (fileName.startsWith('test-validation-')) {
|
|
201
|
+
return 'test-validation';
|
|
202
|
+
}
|
|
53
203
|
if (fileName.startsWith('validation-')) {
|
|
54
204
|
return 'validation';
|
|
55
205
|
}
|
|
56
206
|
if (fileName.startsWith('gap-report-')) {
|
|
57
207
|
return 'gap-report';
|
|
58
208
|
}
|
|
59
|
-
if (fileName === 'sync-back-proposal.md') {
|
|
60
|
-
return 'sync-back-proposal';
|
|
61
|
-
}
|
|
62
209
|
return 'artifact';
|
|
63
210
|
}
|
|
64
211
|
async function recordRuntimeArtifact(projectRoot, input) {
|
|
@@ -70,9 +217,12 @@ async function recordRuntimeArtifact(projectRoot, input) {
|
|
|
70
217
|
.run(runtimeScopedId(input.runId, input.path, contentHash), input.runId, input.path, artifactKind(input.path), input.taskId ?? null, input.agent ?? null, contentHash, Buffer.byteLength(input.content, 'utf8'), input.status, now, payload);
|
|
71
218
|
});
|
|
72
219
|
}
|
|
73
|
-
async function
|
|
220
|
+
async function resolveRunScope(projectRoot, runId) {
|
|
74
221
|
const state = await readRuntimeRunState(projectRoot, runId);
|
|
75
|
-
return
|
|
222
|
+
return {
|
|
223
|
+
branchSlug: state?.gitBranch ?? state?.partition ?? 'unscoped',
|
|
224
|
+
taskId: state?.taskId ?? state?.currentTask ?? null
|
|
225
|
+
};
|
|
76
226
|
}
|
|
77
227
|
function hashDocumentContent(raw) {
|
|
78
228
|
return createHash('sha256').update(raw.replace(/\r\n/g, '\n'), 'utf8').digest('hex');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../src/run-state/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"artifacts.js","sourceRoot":"","sources":["../../src/run-state/artifacts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAA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AAmB,CAAC,GAAW;IACtC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import path from 'node:path';
|
|
2
2
|
import { EVENT_LOG_CONTRACT } from '../contracts.js';
|
|
3
|
-
import {
|
|
3
|
+
import { getLegacyRunDir } from '../runtime-paths.js';
|
|
4
4
|
import { importLegacyRunEventsIfNeeded, readRuntimeRunEvents, recordRuntimeEvent } from '../storage/runtime-store.js';
|
|
5
5
|
export async function appendEvent(projectRoot, runId, event) {
|
|
6
6
|
const nextEvent = {
|
|
@@ -16,7 +16,7 @@ export async function readRunEvents(projectRoot, runId) {
|
|
|
16
16
|
if (storedEvents.length > 0) {
|
|
17
17
|
return storedEvents;
|
|
18
18
|
}
|
|
19
|
-
const eventPath = path.join(
|
|
19
|
+
const eventPath = path.join(getLegacyRunDir(projectRoot, runId), 'events.jsonl');
|
|
20
20
|
await importLegacyRunEventsIfNeeded(projectRoot, runId, eventPath);
|
|
21
21
|
return readRuntimeRunEvents(projectRoot, runId);
|
|
22
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/run-state/events.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/run-state/events.ts"],"names":[],"mappings":"AACA,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,WAAmB,EAAE,KAAa,EAAE,KAA8C;IAClH,MAAM,SAAS,GAAiB;QAC9B,QAAQ,EAAE,kBAAkB;QAC5B,IAAI,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QAC9B,GAAG,KAAK;KACT,CAAC;IACF,MAAM,kBAAkB,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IACjD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,WAAmB,EAAE,KAAa;IACpE,MAAM,YAAY,GAAG,MAAM,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;IACpE,IAAI,YAAY,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,WAAW,EAAE,KAAK,CAAC,EAAE,cAAc,CAAC,CAAC;IACjF,MAAM,6BAA6B,CAAC,WAAW,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC;IACnE,OAAO,oBAAoB,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC;AAClD,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TASK_RUN_EVIDENCE_CONTRACT_VERSION } from '../contracts.js';
|
|
2
2
|
import type { ArtifactIndexEntry, InvocationLedgerEntry, RunState, RunStateArtifactIngestionRecord, RunStateWorktreeLifecycleRecord, RunStatus, RunSummary, RuntimeEvent } from './model.js';
|
|
3
|
+
import { type TaskEvidenceView } from './task-evidence.js';
|
|
3
4
|
export interface TaskRunEvidenceGap {
|
|
4
5
|
type: string;
|
|
5
6
|
severity: string;
|
|
@@ -20,7 +21,7 @@ export interface AgentExecutionRecordView {
|
|
|
20
21
|
} | null;
|
|
21
22
|
routeId: string;
|
|
22
23
|
routeDecision: {
|
|
23
|
-
recommendedProfile?: string;
|
|
24
|
+
recommendedProfile?: string | null;
|
|
24
25
|
};
|
|
25
26
|
createdAt: string;
|
|
26
27
|
[key: string]: unknown;
|
|
@@ -73,7 +74,6 @@ export interface TaskRunEvidenceContract {
|
|
|
73
74
|
artifacts: ArtifactIndexEntry[];
|
|
74
75
|
validation: RunState['validation'];
|
|
75
76
|
gaps: TaskRunEvidenceGap[];
|
|
76
|
-
syncBackProposal: string | null;
|
|
77
77
|
invocationLedger: InvocationLedgerEntry[];
|
|
78
78
|
agentExecutions: AgentExecutionRecordView[];
|
|
79
79
|
teamSessions: TeamSessionRecordView[];
|
|
@@ -89,9 +89,9 @@ export interface RunInspection {
|
|
|
89
89
|
artifactIngestions: RunStateArtifactIngestionRecord[];
|
|
90
90
|
worktrees: RunStateWorktreeLifecycleRecord[];
|
|
91
91
|
validation: RunState['validation'];
|
|
92
|
-
syncBack: RunState['syncBack'];
|
|
93
92
|
tasks: Record<string, unknown>;
|
|
94
93
|
taskRunEvidence: TaskRunEvidenceContract;
|
|
94
|
+
taskEvidenceView: TaskEvidenceView | null;
|
|
95
95
|
agentExecutions: AgentExecutionRecordView[];
|
|
96
96
|
invocationLedger: InvocationLedgerEntry[];
|
|
97
97
|
teamSessions: TeamSessionRecordView[];
|
|
@@ -1,22 +1,29 @@
|
|
|
1
|
-
import { readdir, readFile } from 'node:fs/promises';
|
|
2
|
-
import path from 'node:path';
|
|
3
1
|
import { TASK_RUN_EVIDENCE_CONTRACT_VERSION } from '../contracts.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { listAgentExecutionRecords as listRuntimeBackedAgentExecutionRecords, listTeamSessionRecords as listRuntimeBackedTeamSessionRecords } from '../execution/agent-execution-records.js';
|
|
3
|
+
import { listResidentWorkerRuntimeRecords as listRuntimeBackedResidentWorkerRuntimeRecords } from '../execution/resident-worker.js';
|
|
4
|
+
import { listRuntimeTestRuns, listRuntimeTestSteps } from '../storage/runtime-store.js';
|
|
6
5
|
import { readRunEvents } from './events.js';
|
|
7
6
|
import { listInvocationLedgerEntries } from './invocation-ledger.js';
|
|
8
7
|
import { readRunState, summarizeRunState } from './run-state.js';
|
|
8
|
+
import { readTaskEvidenceView } from './task-evidence.js';
|
|
9
|
+
import { buildRunDurationBreakdown } from './timing.js';
|
|
9
10
|
export async function inspectRun(projectRoot, runId) {
|
|
10
11
|
const state = await readRunState(projectRoot, runId);
|
|
11
|
-
const [events, agentExecutions, teamSessions, workerRuntimes, invocationLedger] = await Promise.all([
|
|
12
|
+
const [events, agentExecutions, teamSessions, workerRuntimes, invocationLedger, testRuns, testSteps] = await Promise.all([
|
|
12
13
|
readRunEvents(projectRoot, runId),
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
listInvocationLedgerEntries(projectRoot, runId)
|
|
14
|
+
listRuntimeBackedAgentExecutionRecords(projectRoot, runId),
|
|
15
|
+
listRuntimeBackedTeamSessionRecords(projectRoot, runId),
|
|
16
|
+
listRuntimeBackedResidentWorkerRuntimeRecords(projectRoot, runId),
|
|
17
|
+
listInvocationLedgerEntries(projectRoot, runId),
|
|
18
|
+
listRuntimeTestRuns(projectRoot, runId),
|
|
19
|
+
listRuntimeTestSteps(projectRoot, { runId })
|
|
17
20
|
]);
|
|
21
|
+
const agentExecutionViews = agentExecutions.map((record) => ({ ...record }));
|
|
22
|
+
const teamSessionViews = teamSessions.map((record) => ({ ...record }));
|
|
23
|
+
const workerRuntimeViews = workerRuntimes.map((record) => ({ ...record }));
|
|
24
|
+
const taskEvidenceView = state.partition && state.taskId ? await readTaskEvidenceView(projectRoot, { branch: state.partition, taskId: state.taskId }) : null;
|
|
18
25
|
return {
|
|
19
|
-
summary: summarizeRunState(state),
|
|
26
|
+
summary: { ...summarizeRunState(state), durationBreakdown: buildRunDurationBreakdown(state, { events, testRuns, testSteps }) },
|
|
20
27
|
state,
|
|
21
28
|
events,
|
|
22
29
|
eventCount: events.length,
|
|
@@ -25,53 +32,15 @@ export async function inspectRun(projectRoot, runId) {
|
|
|
25
32
|
artifactIngestions: Object.values(state.artifactIngestions ?? {}),
|
|
26
33
|
worktrees: Object.values(state.worktrees ?? {}),
|
|
27
34
|
validation: state.validation,
|
|
28
|
-
|
|
29
|
-
|
|
35
|
+
taskRunEvidence: buildTaskRunEvidence(state, events, agentExecutionViews, teamSessionViews, workerRuntimeViews, invocationLedger),
|
|
36
|
+
taskEvidenceView,
|
|
30
37
|
tasks: state.tasks,
|
|
31
|
-
agentExecutions,
|
|
32
|
-
teamSessions,
|
|
33
|
-
workerRuntimes,
|
|
38
|
+
agentExecutions: agentExecutionViews,
|
|
39
|
+
teamSessions: teamSessionViews,
|
|
40
|
+
workerRuntimes: workerRuntimeViews,
|
|
34
41
|
invocationLedger
|
|
35
42
|
};
|
|
36
43
|
}
|
|
37
|
-
async function listAgentExecutionRecords(projectRoot, runId) {
|
|
38
|
-
const recordsDir = getAgentExecutionsDir(projectRoot, runId);
|
|
39
|
-
if (!await exists(recordsDir)) {
|
|
40
|
-
return [];
|
|
41
|
-
}
|
|
42
|
-
const records = await readJsonRecords(recordsDir);
|
|
43
|
-
return records.sort((left, right) => left.createdAt.localeCompare(right.createdAt) || left.executionId.localeCompare(right.executionId));
|
|
44
|
-
}
|
|
45
|
-
async function listTeamSessionRecords(projectRoot, runId) {
|
|
46
|
-
const recordsDir = getTeamSessionsDir(projectRoot, runId);
|
|
47
|
-
if (!await exists(recordsDir)) {
|
|
48
|
-
return [];
|
|
49
|
-
}
|
|
50
|
-
const records = await readJsonRecords(recordsDir);
|
|
51
|
-
return records.sort((left, right) => left.createdAt.localeCompare(right.createdAt) || left.teamId.localeCompare(right.teamId));
|
|
52
|
-
}
|
|
53
|
-
async function listResidentWorkerRuntimeRecords(projectRoot, runId) {
|
|
54
|
-
const recordsDir = getWorkerRuntimesDir(projectRoot, runId);
|
|
55
|
-
if (!await exists(recordsDir)) {
|
|
56
|
-
return [];
|
|
57
|
-
}
|
|
58
|
-
const records = await readJsonRecords(recordsDir);
|
|
59
|
-
return records.sort((left, right) => left.updatedAt.localeCompare(right.updatedAt) || left.runtimeId.localeCompare(right.runtimeId));
|
|
60
|
-
}
|
|
61
|
-
async function readJsonRecords(recordsDir) {
|
|
62
|
-
const entries = await readdir(recordsDir, { withFileTypes: true });
|
|
63
|
-
const records = [];
|
|
64
|
-
for (const entry of entries.filter((candidate) => candidate.isFile() && candidate.name.endsWith('.json'))) {
|
|
65
|
-
try {
|
|
66
|
-
const raw = await readFile(path.join(recordsDir, entry.name), 'utf8');
|
|
67
|
-
records.push(JSON.parse(raw));
|
|
68
|
-
}
|
|
69
|
-
catch {
|
|
70
|
-
continue;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
return records;
|
|
74
|
-
}
|
|
75
44
|
function buildTaskRunEvidence(state, events, agentExecutions = [], teamSessions = [], workerRuntimes = [], invocationLedger = []) {
|
|
76
45
|
return {
|
|
77
46
|
version: TASK_RUN_EVIDENCE_CONTRACT_VERSION,
|
|
@@ -89,7 +58,6 @@ function buildTaskRunEvidence(state, events, agentExecutions = [], teamSessions
|
|
|
89
58
|
artifacts: state.artifacts,
|
|
90
59
|
validation: state.validation,
|
|
91
60
|
gaps: Object.values(state.tasks).flatMap(extractTaskGaps),
|
|
92
|
-
syncBackProposal: state.syncBack.proposalPath,
|
|
93
61
|
agentExecutions,
|
|
94
62
|
teamSessions,
|
|
95
63
|
workerRuntimes,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inspect-run.js","sourceRoot":"","sources":["../../src/run-state/inspect-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"inspect-run.js","sourceRoot":"","sources":["../../src/run-state/inspect-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,yBAAyB,IAAI,sCAAsC,EAAE,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AAW;IACxE,MAAM,KAAK,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC;IAC1B,OAAO,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC;AAClD,CAAC;AAED,SAAS,eAAe,CAAC,SAAkB;IACzC,IAAI,CAAC,SAAS,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,CAAC,MAAM,IAAI,SAAS,CAAC,EAAE,CAAC;QAC1E,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,IAAI,GAAI,SAAgC,CAAC,IAAI,CAAC;IACpD,OAAO,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAc;IAC1C,IAAI,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,MAAM,GAAG,GAAG,KAAoC,CAAC;IACjD,OAAO,OAAO,GAAG,CAAC,IAAI,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,QAAQ,IAAI,OAAO,GAAG,CAAC,cAAc,KAAK,QAAQ,CAAC;AACxL,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createHash } from 'node:crypto';
|
|
2
2
|
import { readFile } from 'node:fs/promises';
|
|
3
3
|
import { INVOCATION_LEDGER_CONTRACT_VERSION } from '../contracts.js';
|
|
4
|
-
import {
|
|
4
|
+
import { getLegacyInvocationLedgerPath } from '../runtime-paths.js';
|
|
5
5
|
import { exists } from '../storage/json-io.js';
|
|
6
6
|
import { RuntimeStoreError, legacyImportId, readRuntimeActivities, recordLegacyImportFailure, recordRuntimeActivity, withRuntimeStore } from '../storage/runtime-store.js';
|
|
7
7
|
export async function appendInvocationLedgerEntry(projectRoot, input) {
|
|
@@ -21,7 +21,7 @@ export async function listInvocationLedgerEntries(projectRoot, runId) {
|
|
|
21
21
|
if (entries.length > 0) {
|
|
22
22
|
return entries;
|
|
23
23
|
}
|
|
24
|
-
const ledgerPath =
|
|
24
|
+
const ledgerPath = getLegacyInvocationLedgerPath(projectRoot, runId);
|
|
25
25
|
await importLegacyInvocationLedgerIfNeeded(projectRoot, runId, ledgerPath);
|
|
26
26
|
return readRuntimeActivities(projectRoot, runId);
|
|
27
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invocation-ledger.js","sourceRoot":"","sources":["../../src/run-state/invocation-ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"invocation-ledger.js","sourceRoot":"","sources":["../../src/run-state/invocation-ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,kCAAkC,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,6BAA6B,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAG3K,MAAM,CAAC,KAAK,UAAU,2BAA2B,CAAC,WAAmB,EA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KAAK,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC;QAC1E,MAAM,IAAI,iBAAiB,CAAC,sBAAsB,EAAE,8CAA8C,KAAK,KAAK,gBAAgB,CAAC,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3J,CAAC;AACH,CAAC;AAED,KAAK,UAAU,iCAAiC,CAAC,WAAmB,EAAE,KAAoF;IACxJ,MAAM,OAAO,GAAG,MAAM,2BAA2B,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IAC5E,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,IAAI,KAAK,CAAC,GAAG,KAAK,KAAK,CAAC,GAAG,IAAI,KAAK,CAAC,MAAM,KAAK,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI,CAAC;AACzK,CAAC;AAID,SAAS,mBAAmB,CAAC,GAAW;IACtC,OAAO,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AACvF,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAc;IACtC,OAAO,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAChE,CAAC"}
|
|
@@ -11,8 +11,14 @@ export interface RunDocumentSnapshot {
|
|
|
11
11
|
specHash: string | null;
|
|
12
12
|
planHash: string | null;
|
|
13
13
|
tasksHash: string | null;
|
|
14
|
+
specContractHash: string | null;
|
|
15
|
+
planContractHash: string | null;
|
|
16
|
+
tasksContractHash: string | null;
|
|
17
|
+
taskContractHash: string | null;
|
|
14
18
|
planBasedOnSpecHash: string | null;
|
|
15
19
|
tasksBasedOnPlanHash: string | null;
|
|
20
|
+
planBasedOnSpecContractHash: string | null;
|
|
21
|
+
tasksBasedOnPlanContractHash: string | null;
|
|
16
22
|
}
|
|
17
23
|
export interface RunStateContractValidationIssue {
|
|
18
24
|
field: string;
|
|
@@ -66,6 +72,9 @@ export interface RunStateDelegationRecord {
|
|
|
66
72
|
expectedArtifact: string;
|
|
67
73
|
terminalEventRequired: boolean;
|
|
68
74
|
terminalEventAt?: string | null;
|
|
75
|
+
attempt?: number;
|
|
76
|
+
retryOf?: string | null;
|
|
77
|
+
replayReason?: 'document_contract_refresh' | 'artifact_reingest' | 'validation_replay' | 'manual_retry' | 'runtime_recovery' | null;
|
|
69
78
|
}
|
|
70
79
|
export interface RunStateArtifactIngestionRecord {
|
|
71
80
|
contract: typeof ARTIFACT_RESULT_INGESTION_CONTRACT_VERSION;
|
|
@@ -80,6 +89,9 @@ export interface RunStateArtifactIngestionRecord {
|
|
|
80
89
|
ingestedAt: string;
|
|
81
90
|
issues: RunStateContractValidationIssue[];
|
|
82
91
|
gaps: RunStateTaskGap[];
|
|
92
|
+
contentDigest?: string;
|
|
93
|
+
retryOf?: string | null;
|
|
94
|
+
replayReason?: string | null;
|
|
83
95
|
}
|
|
84
96
|
export interface RunStateWorktreeLifecycleRecord {
|
|
85
97
|
contract: 'phase-3.8-worktree-lifecycle-v1';
|
|
@@ -96,6 +108,25 @@ export interface RunStateWorktreeLifecycleRecord {
|
|
|
96
108
|
keepReason: string | null;
|
|
97
109
|
dirty: boolean;
|
|
98
110
|
}
|
|
111
|
+
export type RunTaskImplementationStatus = 'not_started' | 'running' | 'implemented' | 'blocked' | 'failed';
|
|
112
|
+
export type RunTaskVerificationStatus = 'not_run' | 'pending_batch' | 'ready_for_validation' | 'running' | 'pass' | 'pass_with_gaps' | 'blocked' | 'failed';
|
|
113
|
+
export interface RunStateTaskRuntime {
|
|
114
|
+
status: string;
|
|
115
|
+
implementationStatus?: RunTaskImplementationStatus;
|
|
116
|
+
verificationStatus?: RunTaskVerificationStatus;
|
|
117
|
+
validationBatch?: string | null;
|
|
118
|
+
validationTiming?: 'task_end' | 'batch_end' | 'wave_end';
|
|
119
|
+
requiresVerifyBeforeNext?: boolean;
|
|
120
|
+
gaps?: unknown[];
|
|
121
|
+
artifacts?: string[];
|
|
122
|
+
testStatus?: string;
|
|
123
|
+
validationStatus?: string;
|
|
124
|
+
verifyStatus?: string;
|
|
125
|
+
workflowGateStatus?: string;
|
|
126
|
+
workflowGateDecisionId?: string;
|
|
127
|
+
evidence?: string[];
|
|
128
|
+
acceptanceCoverage?: unknown[];
|
|
129
|
+
}
|
|
99
130
|
export interface RunState {
|
|
100
131
|
contract: typeof RUN_STATE_CONTRACT;
|
|
101
132
|
runtimeVersion: typeof RUNTIME_VERSION;
|
|
@@ -115,7 +146,7 @@ export interface RunState {
|
|
|
115
146
|
eventLogPath: string;
|
|
116
147
|
artifactRoot: string;
|
|
117
148
|
lifecycleDecision: RunStateLifecycleDecisionRecord | null;
|
|
118
|
-
tasks: Record<string,
|
|
149
|
+
tasks: Record<string, RunStateTaskRuntime>;
|
|
119
150
|
agents: Record<string, unknown>;
|
|
120
151
|
delegations: Record<string, RunStateDelegationRecord>;
|
|
121
152
|
artifacts: ArtifactIndexEntry[];
|
|
@@ -126,13 +157,26 @@ export interface RunState {
|
|
|
126
157
|
commands: string[];
|
|
127
158
|
evidence: string[];
|
|
128
159
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
160
|
+
}
|
|
161
|
+
export interface RunDurationContributor {
|
|
162
|
+
kind: 'validation' | 'waiting' | 'blocked' | 'queue_or_bind' | 'host_waiting' | 'unknown_gap';
|
|
163
|
+
durationMs: number;
|
|
164
|
+
startedAt: string;
|
|
165
|
+
endedAt: string;
|
|
166
|
+
reason: string;
|
|
167
|
+
refs: string[];
|
|
168
|
+
}
|
|
169
|
+
export interface RunDurationBreakdown {
|
|
170
|
+
elapsedDurationMs: number;
|
|
171
|
+
activeRuntimeDurationMs: number;
|
|
172
|
+
validationDurationMs: number;
|
|
173
|
+
waitingDurationMs: number;
|
|
174
|
+
blockedDurationMs: number;
|
|
175
|
+
queueOrBindDurationMs: number;
|
|
176
|
+
unknownGapDurationMs: number;
|
|
177
|
+
hostWaitingDurationMs: number;
|
|
178
|
+
slowReason: RunDurationContributor['kind'] | 'active_runtime' | 'none';
|
|
179
|
+
topContributors: RunDurationContributor[];
|
|
136
180
|
}
|
|
137
181
|
export interface RunSummary {
|
|
138
182
|
runId: string;
|
|
@@ -147,9 +191,9 @@ export interface RunSummary {
|
|
|
147
191
|
createdAt: string;
|
|
148
192
|
updatedAt: string;
|
|
149
193
|
validationStatus: RunState['validation']['status'];
|
|
150
|
-
syncBackStatus: RunState['syncBack']['status'];
|
|
151
194
|
taskIds: string[];
|
|
152
195
|
artifactCount: number;
|
|
196
|
+
durationBreakdown: RunDurationBreakdown;
|
|
153
197
|
}
|
|
154
198
|
export interface RuntimeEvent {
|
|
155
199
|
contract: typeof EVENT_LOG_CONTRACT;
|
|
@@ -52,7 +52,6 @@ export interface LocalRunIndexPartitionTaskEntry {
|
|
|
52
52
|
runId: string;
|
|
53
53
|
runStatus: RunStatus;
|
|
54
54
|
validationStatus: RunState['validation']['status'];
|
|
55
|
-
syncBackStatus: RunState['syncBack']['status'];
|
|
56
55
|
affectedFiles: string[];
|
|
57
56
|
updatedAt: string;
|
|
58
57
|
}
|
|
@@ -63,7 +62,6 @@ export interface LocalRunIndexAffectedFileEntry {
|
|
|
63
62
|
taskId: string;
|
|
64
63
|
runId: string;
|
|
65
64
|
runStatus: RunStatus;
|
|
66
|
-
syncBackStatus: RunState['syncBack']['status'];
|
|
67
65
|
updatedAt: string;
|
|
68
66
|
}
|
|
69
67
|
export interface LocalRunIndexQuery {
|