create-agdf 0.20.2 → 0.31.0
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 +148 -191
- package/generated/.agdf/control/README.md +35 -109
- package/generated/.agdf/control/planned-urs.md +95 -0
- package/generated/.agdf/control/templates/BRAND.md +28 -0
- package/generated/.agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/.agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/.agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/.agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/.agents/plugins/marketplace.json +12 -0
- package/generated/.opencode/agdf-agent-router.md +3 -3
- package/generated/.opencode/agdf-interaction-locales.json +2958 -2682
- package/generated/.opencode/contracts/closeout.md +1 -1
- package/generated/.opencode/contracts/control-scaffold.md +63 -46
- package/generated/.opencode/contracts/gate-artifact-preparation.md +64 -48
- package/generated/.opencode/contracts/gate-transition.md +5 -6
- package/generated/.opencode/contracts/interaction.md +52 -129
- package/generated/.opencode/contracts/modes.md +9 -3
- package/generated/.opencode/contracts/prd-definition.md +46 -7
- package/generated/.opencode/contracts/quality.md +45 -2
- package/generated/.opencode/contracts/request-activation.md +14 -10
- package/generated/.opencode/contracts/sd-definition.md +49 -3
- package/generated/.opencode/contracts/task-target-resolution.md +24 -0
- package/generated/.opencode/contracts/tp-definition.md +9 -1
- package/generated/.opencode/contracts/ur-definition.md +50 -12
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-code-review/SKILL.md +5 -3
- package/generated/.opencode/skills/agdf-delivery-closeout/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +35 -31
- package/generated/.opencode/skills/agdf-prd-definition/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-sd-definition/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-tp-definition/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-ur-definition/SKILL.md +12 -4
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +36 -6
- package/generated/plugins/agdf/.claude-plugin/plugin.json +3 -2
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/companion/assignment.mjs +65 -0
- package/generated/plugins/agdf/companion/companion.json +4 -0
- package/generated/plugins/agdf/companion/events.mjs +117 -0
- package/generated/plugins/agdf/companion/figure.mjs +137 -0
- package/generated/plugins/agdf/companion/gate-bar.mjs +36 -0
- package/generated/plugins/agdf/companion/hooks.json +3 -0
- package/generated/plugins/agdf/companion/localization.mjs +67 -0
- package/generated/plugins/agdf/companion/notice.mjs +92 -0
- package/generated/plugins/agdf/companion/persistence.mjs +36 -0
- package/generated/plugins/agdf/companion/register.mjs +630 -0
- package/generated/plugins/agdf/companion/run-state.mjs +97 -0
- package/generated/plugins/agdf/companion/state.mjs +22 -0
- package/generated/plugins/agdf/companion/view.mjs +129 -0
- package/generated/plugins/agdf/control/README.md +35 -109
- package/generated/plugins/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/agdf/mcp/server/README.md +143 -7
- package/generated/plugins/agdf/mcp/server/package.json +12 -7
- package/generated/plugins/agdf/mcp/server/src/generation-entry.js +3 -85
- package/generated/plugins/agdf/mcp/server/src/generation-protocol.js +2 -44
- package/generated/plugins/agdf/mcp/server/src/generation-runtime.js +103 -0
- package/generated/plugins/agdf/mcp/server/src/generation-thread-entry.js +8 -0
- package/generated/plugins/agdf/mcp/server/src/generation.js +64 -20
- package/generated/plugins/agdf/mcp/server/src/main.js +43 -10
- package/generated/plugins/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/agdf/mcp/server/src/server.js +159 -46
- package/generated/plugins/agdf/mcp/server/src/stdio-output.js +42 -0
- package/generated/plugins/agdf/mcp/server/src/worker-entry.js +2 -2
- package/generated/plugins/agdf/mcp/server/src/worker.js +53 -7
- package/generated/plugins/agdf/mcp/server/ui/cockpit.html +31 -31
- package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
- package/generated/plugins/agdf/mcp/server/ui/decision.html +36 -36
- package/generated/plugins/agdf/mcp/server/ui/manifest.json +4 -4
- package/generated/plugins/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/plugins/agdf/meta/agdf-mcp-capability.json +1 -1
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/agdf/meta/contracts/closeout.md +1 -1
- package/generated/plugins/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/meta/contracts/interaction.md +52 -129
- package/generated/plugins/agdf/meta/contracts/modes.md +9 -3
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/plugins/agdf/meta/contracts/quality.md +45 -2
- package/generated/plugins/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/plugins/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/plugins/agdf/runtime/agdf-session-check.js +25 -21
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +52 -129
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +45 -2
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/codex-document-command.js +195 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +83 -148
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +8 -37
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +101 -16
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/planned-command.js +55 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/project-read-command.js +64 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/run-command-aliases.js +116 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/runtime-context.js +1 -59
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +34 -103
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +7 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-decision-protocol.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +95 -304
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/owner-client.js +79 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +21 -80
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +61 -13
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-owner-protocol.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-protocol-runtime.js +308 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +155 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +22 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-context.js +8 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/package.json +5 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +34 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +54 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +13 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +450 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +22 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/{runtime/core/lib/control-evaluation/backlog-vocabulary.js → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +10 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +195 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-context.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-contract.js +11 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.d.ts +10 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.js +32 -41
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +8 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-work.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +72 -57
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +164 -32
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/decision-session.js +53 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/doctor-observation.js +91 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-operation-call.js +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +49 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/result.js +61 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +15 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +148 -69
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +9 -37
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +25 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +4 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +18 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +68 -17
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/aggregate.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +13 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-layout.js +183 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-contract.js +10 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-service.js +24 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/git-identity.js +86 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/index.js +0 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +101 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +93 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +5 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-closure.js +343 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +40 -251
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +514 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +222 -34
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +42 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +229 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +70 -13
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +92 -35
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +10 -179
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +120 -179
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +56 -35
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +37 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +142 -251
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/{runtime/core/lib/control-state/backlog-summary-shape.js → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.js} +7 -19
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +16 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +11 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +55 -12
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +75 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-schema.js +15 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +33 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/owned-file-lock.js +266 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/owner-placement.js +50 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/configuration.js +92 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +7 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/language-preference.js +59 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +180 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +34 -13
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +87 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +17 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +6 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +66 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +6 -3
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +62 -43
- package/generated/plugins/agdf/scripts/instruction-footprint.mjs +5 -5
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +8 -5
- package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/code-review/SKILL.md +5 -3
- package/generated/plugins/agdf/skills/delivery-closeout/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +35 -31
- package/generated/plugins/agdf/skills/prd-definition/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/qa-gate/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/release-or/SKILL.md +8 -5
- package/generated/plugins/agdf/skills/sd-definition/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/tp-definition/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/ur-definition/SKILL.md +12 -4
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +36 -6
- package/generated/plugins/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/plugins/agdf/submission/openai/availability.md +1 -1
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/plugins/agdf/submission/openai/release-notes.md +9 -1
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +40 -0
- package/generated/plugins/agdf-planning/README.md +21 -0
- package/generated/plugins/agdf-planning/assets/agdf-icon.svg +16 -0
- package/generated/plugins/agdf-planning/assets/agdf-logo.svg +16 -0
- package/generated/plugins/agdf-planning/meta/agdf-planning.definition.json +9 -0
- package/generated/plugins/agdf-planning/plugin.json +45 -0
- package/generated/plugins/agdf-planning/skills/planning/SKILL.md +56 -0
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +1028 -488
- package/generated/plugins/copilot/agdf/control/README.md +35 -109
- package/generated/plugins/copilot/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/copilot/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/copilot/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/copilot/agdf/mcp/server/README.md +143 -7
- package/generated/plugins/copilot/agdf/mcp/server/package.json +12 -7
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-entry.js +3 -85
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-protocol.js +2 -44
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-runtime.js +103 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-thread-entry.js +8 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +64 -20
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +43 -10
- package/generated/plugins/copilot/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +159 -46
- package/generated/plugins/copilot/agdf/mcp/server/src/stdio-output.js +42 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/worker-entry.js +2 -2
- package/generated/plugins/copilot/agdf/mcp/server/src/worker.js +53 -7
- package/generated/plugins/copilot/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/plugins/copilot/agdf/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +25 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +52 -129
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +45 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/codex-document-command.js +195 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +83 -148
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +8 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +101 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/planned-command.js +55 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/project-read-command.js +64 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/run-command-aliases.js +116 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +1 -59
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +34 -103
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +7 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-decision-protocol.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +95 -304
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/owner-client.js +79 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +21 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +61 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-owner-protocol.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-protocol-runtime.js +308 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +155 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +22 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-context.js +8 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +5 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +34 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +54 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +450 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +22 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/generated/plugins/{agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js → copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +10 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +195 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +164 -32
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/doctor-observation.js +91 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-operation-call.js +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +49 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/result.js +61 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +15 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +148 -69
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +9 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +121 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +18 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +68 -17
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/aggregate.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +13 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-layout.js +183 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/git-identity.js +86 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/index.js +0 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +101 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +93 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +5 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-closure.js +343 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +40 -251
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +514 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +222 -34
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +42 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +33 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +229 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +70 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +92 -35
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +10 -179
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +120 -179
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +56 -35
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +37 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +142 -251
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/{backlog-summary-shape.js → run-work-summary-shape.js} +7 -19
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +16 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +11 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +55 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +75 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-schema.js +15 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +33 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/owned-file-lock.js +266 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/owner-placement.js +50 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/configuration.js +92 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +7 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/language-preference.js +59 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +180 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +34 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +87 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +17 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +6 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +66 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +6 -3
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/copilot/agdf/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/plugins/copilot/agdf/skills/agdf-clean-implementation-review/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-code-review/SKILL.md +5 -3
- package/generated/plugins/copilot/agdf/skills/agdf-delivery-closeout/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-delivery-path-search/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-gate-check/SKILL.md +35 -31
- package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -1
- package/generated/plugins/copilot/agdf/skills/agdf-prd-definition/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-qa-gate/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-release-or/SKILL.md +8 -5
- package/generated/plugins/copilot/agdf/skills/agdf-sd-definition/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-task-plan-review/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-tp-definition/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-ur-definition/SKILL.md +12 -4
- package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +36 -6
- package/generated/plugins/copilot/agdf/skills/contracts/closeout.md +1 -1
- package/generated/plugins/copilot/agdf/skills/contracts/control-scaffold.md +63 -46
- package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/copilot/agdf/skills/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +52 -129
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +9 -3
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +46 -7
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +45 -2
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +14 -10
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +49 -3
- package/generated/plugins/copilot/agdf/skills/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +9 -1
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +50 -12
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/submissions/openai/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/submissions/openai/agdf/meta/agdf-defaults.json +9 -0
- package/generated/submissions/openai/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/submissions/openai/agdf/meta/contracts/closeout.md +1 -1
- package/generated/submissions/openai/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +52 -129
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +9 -3
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +45 -2
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/submissions/openai/agdf/plugin.json +1 -1
- package/generated/submissions/openai/agdf/skills/brownfield-analysis/SKILL.md +8 -5
- package/generated/submissions/openai/agdf/skills/clean-implementation-review/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +5 -3
- package/generated/submissions/openai/agdf/skills/delivery-closeout/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/delivery-path-search/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/gate-check/SKILL.md +35 -31
- package/generated/submissions/openai/agdf/skills/prd-definition/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/qa-gate/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/release-or/SKILL.md +8 -5
- package/generated/submissions/openai/agdf/skills/sd-definition/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/tp-definition/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/ur-definition/SKILL.md +12 -4
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +36 -6
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +50 -42
- package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +9 -1
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/application.js +31 -43
- package/lib/cli/codex-document-command.js +195 -0
- package/lib/cli/command-registry.js +83 -148
- package/lib/cli/control-maintenance-command.js +8 -37
- package/lib/cli/parse-args.js +101 -16
- package/lib/cli/planned-command.js +55 -0
- package/lib/cli/project-init-command.js +21 -0
- package/lib/cli/project-read-command.js +64 -0
- package/lib/cli/run-command-aliases.js +116 -0
- package/lib/cli/runtime-context.js +1 -59
- package/lib/cli/validation-handlers.js +34 -103
- package/lib/control-evaluation/git-observation.js +7 -5
- package/lib/control-maintenance/startup.js +2 -2
- package/lib/host-adapters/codex/plugin.js +48 -1
- package/lib/install-setup/contract.js +4 -4
- package/lib/install-setup/{control-migration.js → control-compatibility.js} +1 -2
- package/lib/install-setup/interaction.js +0 -1
- package/lib/install-setup/presentation.js +3 -4
- package/lib/install-setup/service.js +5 -18
- package/lib/installers/local-marketplace.js +262 -8
- package/lib/lifecycle/codex-startup-status.js +29 -0
- package/lib/lifecycle/presentation.js +6 -0
- package/lib/mcp-decision-protocol.js +40 -0
- package/lib/mcp-dispatch-runtime.js +95 -304
- package/lib/mcp-lifecycle/adapters/codex-origin-probe.js +28 -4
- package/lib/mcp-lifecycle/evidence.js +2 -1
- package/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/lib/mcp-lifecycle/owner-client.js +79 -0
- package/lib/mcp-lifecycle/package.js +21 -80
- package/lib/mcp-lifecycle/plugin-runtime.js +61 -13
- package/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/lib/mcp-lifecycle/service.js +5 -4
- package/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/lib/mcp-owner-protocol.js +1 -0
- package/lib/mcp-protocol-runtime.js +308 -0
- package/lib/mcp-worker-runtime.js +155 -0
- package/lib/runtime/control-command-service.js +22 -7
- package/lib/runtime/control-context.js +8 -1
- package/lib/runtime/validator-application.js +2 -2
- package/lib/scaffold/canonical-init.js +2 -691
- package/lib/scaffold/plan.js +11 -32
- package/lib/scaffold/presentation.js +2 -2
- package/lib/scaffold/write.js +6 -1
- package/package.json +6 -2
- package/runtime/core/lib/companion/events.js +154 -0
- package/runtime/core/lib/companion/figure-state.js +36 -0
- package/runtime/core/lib/companion/journal.js +180 -0
- package/runtime/core/lib/companion/run-view.js +184 -0
- package/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +34 -8
- package/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/runtime/core/lib/control-evaluation/gate-check.js +54 -15
- package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +13 -0
- package/runtime/core/lib/control-evaluation/gate-policy-pure.js +450 -0
- package/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/runtime/core/lib/control-evaluation/ur-readiness.js +22 -4
- package/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/{generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js → runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/runtime/core/lib/control-inspect/artifact-readiness.js +10 -6
- package/runtime/core/lib/control-inspect/authoring-inputs.js +195 -0
- package/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/runtime/core/lib/control-inspect/cockpit-context.js +2 -1
- package/runtime/core/lib/control-inspect/cockpit-contract.js +11 -4
- package/runtime/core/lib/control-inspect/cockpit-list.d.ts +10 -6
- package/runtime/core/lib/control-inspect/cockpit-list.js +32 -41
- package/runtime/core/lib/control-inspect/cockpit-session.js +8 -8
- package/runtime/core/lib/control-inspect/cockpit-work.js +33 -0
- package/runtime/core/lib/control-inspect/cockpit.js +72 -57
- package/runtime/core/lib/control-inspect/contract.js +164 -32
- package/runtime/core/lib/control-inspect/decision-session.js +53 -11
- package/runtime/core/lib/control-inspect/doctor-observation.js +91 -0
- package/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/runtime/core/lib/control-inspect/project-operation-call.js +5 -0
- package/runtime/core/lib/control-inspect/project-state.js +49 -0
- package/runtime/core/lib/control-inspect/result.js +61 -0
- package/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/runtime/core/lib/control-inspect/selection.js +15 -3
- package/runtime/core/lib/control-inspect/service.js +148 -69
- package/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/runtime/core/lib/control-maintenance/service.js +9 -37
- package/runtime/core/lib/control-read/cockpit-pool.js +25 -9
- package/runtime/core/lib/control-read/cockpit-worker.js +4 -3
- package/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/runtime/core/lib/control-read/fs.js +18 -0
- package/runtime/core/lib/control-read/snapshot.js +68 -17
- package/runtime/core/lib/control-state/aggregate.js +3 -1
- package/runtime/core/lib/control-state/approval-command.js +13 -10
- package/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/runtime/core/lib/control-state/control-layout.js +183 -0
- package/runtime/core/lib/control-state/decision-action-contract.js +10 -1
- package/runtime/core/lib/control-state/decision-action-service.js +24 -3
- package/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/runtime/core/lib/control-state/git-identity.js +86 -0
- package/runtime/core/lib/control-state/index.js +0 -1
- package/runtime/core/lib/control-state/input-resolution.js +101 -0
- package/runtime/core/lib/control-state/material-limits.js +4 -0
- package/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/runtime/core/lib/control-state/presentation-delivery.js +93 -0
- package/runtime/core/lib/control-state/preview-render.js +5 -2
- package/runtime/core/lib/control-state/preview-review.js +3 -2
- package/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/runtime/core/lib/control-state/run-closure.js +343 -0
- package/runtime/core/lib/control-state/run-command-contract.js +40 -251
- package/runtime/core/lib/control-state/run-command-schema.js +514 -0
- package/runtime/core/lib/control-state/run-command-service.js +222 -34
- package/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/runtime/core/lib/control-state/run-identity.js +42 -0
- package/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +33 -0
- package/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/runtime/core/lib/control-state/run-material.js +229 -0
- package/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/runtime/core/lib/control-state/run-operations.js +70 -13
- package/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/runtime/core/lib/control-state/run-presentation-render.js +92 -35
- package/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/runtime/core/lib/control-state/run-recording.js +10 -179
- package/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/runtime/core/lib/control-state/run-revision.js +120 -179
- package/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/runtime/core/lib/control-state/run-seal.js +6 -1
- package/runtime/core/lib/control-state/run-source-revisions.js +56 -35
- package/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/runtime/core/lib/control-state/run-state-reader.js +37 -21
- package/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/runtime/core/lib/control-state/run-steps.js +142 -251
- package/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/{generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js → runtime/core/lib/control-state/run-work-summary-shape.js} +7 -19
- package/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/runtime/core/lib/index.js +16 -6
- package/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/runtime/core/lib/interaction-catalog.js +11 -3
- package/runtime/core/lib/interaction-presentation.js +55 -12
- package/runtime/core/lib/mcp-input-hints.js +75 -0
- package/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/runtime/core/lib/mcp-input-schema.js +15 -0
- package/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/runtime/core/lib/mcp-tool-errors.js +33 -15
- package/runtime/core/lib/owned-file-lock.js +266 -0
- package/runtime/core/lib/owner-placement.js +50 -0
- package/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/runtime/core/lib/resources/configuration.js +92 -0
- package/runtime/core/lib/resources/context.js +7 -11
- package/runtime/core/lib/resources/language-preference.js +59 -0
- package/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/runtime/core/lib/runtime/plugin-provenance.js +180 -18
- package/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/runtime/core/lib/skill-dispatch/contract.js +34 -13
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +14 -6
- package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/runtime/core/lib/skill-dispatch/mcp-continuation.js +87 -0
- package/runtime/core/lib/skill-dispatch/prd-definition.js +17 -7
- package/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/runtime/core/lib/skill-dispatch/sd-definition.js +6 -3
- package/runtime/core/lib/skill-dispatch/service.js +66 -18
- package/runtime/core/lib/skill-dispatch/tp-definition.js +6 -3
- package/generated/.agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/.agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +0 -28
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +0 -4
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/service.js +0 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +0 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-backlog.js +0 -135
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
- package/generated/plugins/copilot/agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/plugins/copilot/agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +0 -28
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +0 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/service.js +0 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +0 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
- package/lib/control-maintenance/interaction.js +0 -28
- package/lib/control-maintenance/repair.js +0 -4
- package/lib/control-maintenance/service.js +0 -3
- package/lib/control-state/run-recovery.js +0 -5
- package/lib/install-setup/control-repair.js +0 -1
- package/runtime/core/lib/control-inspect/cockpit-backlog.js +0 -135
- package/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-command-service.js
CHANGED
|
@@ -1,12 +1,27 @@
|
|
|
1
|
-
import { executeApprovalCommand } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import { executeApprovalCommand } from '#agdf-core/control-state/approval-command.js';
|
|
2
|
+
import { validateApprovalCommand, resolveControlCommandTarget } from '#agdf-core/control-state/approval-command-contract.js';
|
|
3
|
+
import { createCoreServices } from '#agdf-core';
|
|
4
|
+
import { evaluateGateCheck } from '#agdf-core/control-evaluation/gate-check.js';
|
|
5
|
+
import { cliGitObservation } from '../control-evaluation/git-observation.js';
|
|
6
|
+
import { pluginDefinition, resources } from './control-context.js';
|
|
5
7
|
|
|
6
8
|
const evaluateLocalGate = (root, selection) => evaluateGateCheck(root, selection, cliGitObservation);
|
|
9
|
+
const invalidResult = (root, command) => executeApprovalCommand(root, command, {
|
|
10
|
+
evaluateGateCheck: evaluateLocalGate, packageVersion: pluginDefinition.version,
|
|
11
|
+
});
|
|
7
12
|
|
|
8
13
|
export function recordGateApprovalCommand(root, command) {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
14
|
+
// Preserve the public action's strict descriptor validation before copying
|
|
15
|
+
// any field. Valid calls share CLI/MCP normalization and original UUID proof.
|
|
16
|
+
if (validateApprovalCommand(command)) return invalidResult(root, command);
|
|
17
|
+
let target;
|
|
18
|
+
try { target = resolveControlCommandTarget(root); } catch { return invalidResult(root, command); }
|
|
19
|
+
const input = { working_directory: process.cwd(), primary_target: target.root, target_source: 'explicit_target',
|
|
20
|
+
target_id: command.target_id, run_id: command.run_id, expected_revision_id: command.expected_revision_id,
|
|
21
|
+
operation_id: command.operation_id, assurance: command.assurance,
|
|
22
|
+
command: { kind: 'approval.record', payload: { gate: command.gate, presentation_id: command.presentation_id, response: command.response } } };
|
|
23
|
+
const result = createCoreServices({ resources, observers: { gitObservation: cliGitObservation } }).command('agdf_approve', input);
|
|
24
|
+
// The action facade keeps its existing result observations. The canonical
|
|
25
|
+
// command owner supplies its current receipt and replay, never a second writer.
|
|
26
|
+
return result.family_result?.operation_id === command.operation_id ? result.family_result : result;
|
|
12
27
|
}
|
|
@@ -5,7 +5,14 @@ const generatedURL = new URL("../../generated/", import.meta.url);
|
|
|
5
5
|
const contractsURL = coreResources.packageRoot === fileURLToPath(packageURL)
|
|
6
6
|
? pathToFileURL(`${coreResources.contractsRoot}/`)
|
|
7
7
|
: new URL("plugins/agdf/meta/contracts/", generatedURL);
|
|
8
|
-
|
|
8
|
+
// Projected packages bind Core and CLI to the same immutable resource files.
|
|
9
|
+
// Reuse that already-validated data instead of parsing/freezing it twice. Source
|
|
10
|
+
// compositions with different roots still construct their own bound context;
|
|
11
|
+
// CLI's existing null template-root contract and fresh runtime digests remain.
|
|
12
|
+
const sameResources = coreResources.packageRoot === fileURLToPath(packageURL)
|
|
13
|
+
&& coreResources.generatedRoot === fileURLToPath(generatedURL);
|
|
14
|
+
export const resources = sameResources ? Object.freeze({ ...coreResources, templatesRoot: null })
|
|
15
|
+
: createResourceContext({ packageURL, generatedURL, contractsURL });
|
|
9
16
|
export const { packageRoot, generatedRoot, pluginDefinition, interactionLocales } = resources;
|
|
10
17
|
export const configuredLanguage = value => configured(value, resources);
|
|
11
18
|
export const resolveConfiguredChatLanguage = target => resolveLanguage(target, resources);
|
package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js
CHANGED
|
@@ -4,7 +4,7 @@ import { validateCommandOptions, commandGroupRoutes } from "../cli/command-regis
|
|
|
4
4
|
import { CliUsageError, parseArgs } from "../cli/parse-args.js";
|
|
5
5
|
import { pluginDefinition } from "../cli/runtime-context.js";
|
|
6
6
|
|
|
7
|
-
const validatorCommands = new Set(["target-check", "skill-dispatch", "doctor", "gate-check", "delivery-map", "delivery-path-search", "contract", "control-maintenance", "run-create", "run-present", "run-
|
|
7
|
+
const validatorCommands = new Set(["project-state", "operation-status", "run-view", "target-check", "skill-dispatch", "doctor", "gate-check", "delivery-map", "inventory", "delivery-path-search", "contract", "control-maintenance", "run-create", "run-present", "run-revise", "run-step", "run-approve", "run-close", ...Object.keys(commandGroupRoutes)]);
|
|
8
8
|
|
|
9
9
|
export async function runValidatorCli(argv = process.argv.slice(2), adapters = {}) {
|
|
10
10
|
const io = adapters.io ?? console;
|
|
@@ -22,7 +22,7 @@ export async function runValidatorCli(argv = process.argv.slice(2), adapters = {
|
|
|
22
22
|
return error.exitCode;
|
|
23
23
|
}
|
|
24
24
|
if (parsed.kind === "help") {
|
|
25
|
-
io.log("AGDF surface-local validator: target-check | skill-dispatch | doctor | gate-check | delivery-map | delivery-path-search | contract | control-maintenance | run-create | run-present | run-
|
|
25
|
+
io.log("AGDF surface-local validator: project-state | operation-status | run-view | target-check | skill-dispatch | doctor | gate-check | delivery-map | inventory | delivery-path-search | contract | control-maintenance | run-create | run-present | run-revise | run-step | run-approve | run-close");
|
|
26
26
|
return 0;
|
|
27
27
|
}
|
|
28
28
|
let options;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agdf/local-validator-runtime",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"imports": {
|
|
7
7
|
"#agdf-core": "./runtime/core/lib/index.js",
|
|
8
8
|
"#agdf-core/*": "./runtime/core/lib/*"
|
|
9
|
+
},
|
|
10
|
+
"exports": {
|
|
11
|
+
"./mcp-worker-runtime": "./lib/mcp-worker-runtime.js",
|
|
12
|
+
"./mcp-owner-protocol": "./lib/mcp-owner-protocol.js"
|
|
9
13
|
}
|
|
10
14
|
}
|
package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js
ADDED
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
// Companion events (SD SDD-005, SDD-009): the pure mapping from the final result of an AGDF MCP tool
|
|
2
|
+
// call to zero or one event of schema `companion-event/1`, and the reader of the versioned journal
|
|
3
|
+
// format. Events come from real MCP outcomes, never from host hooks, so the agent cannot shape them.
|
|
4
|
+
// Read-only tools produce none. Review facts (SDD-008) are computed by the runtime and handed in.
|
|
5
|
+
// Host-neutral: no Node built-in, no host API.
|
|
6
|
+
import { COMMAND_TOOL_NAMES, TOOL_RESULT_META } from '../mcp-tool-errors.js';
|
|
7
|
+
import { RUN_STEP_SLOTS } from '../control-state/run-identity.js';
|
|
8
|
+
|
|
9
|
+
export const COMPANION_EVENT_SCHEMA = 'companion-event/1';
|
|
10
|
+
export const EVENT_KINDS = Object.freeze(['approval_requested', 'approval_recorded', 'write_rejected', 'effect_unknown',
|
|
11
|
+
'recovery_required', 'run_completed', 'material_staged', 'document_recorded']);
|
|
12
|
+
// Decision P1: these kinds interrupt as a toast, together with a digest mismatch (a drift warning of
|
|
13
|
+
// the run view); approval recorded and write rejected appear in the pane only.
|
|
14
|
+
export const TOAST_KINDS = Object.freeze(['approval_requested', 'effect_unknown', 'recovery_required', 'run_completed']);
|
|
15
|
+
// Decision P2: at most 40 lines or 4 KiB, whichever is smaller.
|
|
16
|
+
export const PREVIEW_LIMITS = Object.freeze({ lines: 40, bytes: 4096 });
|
|
17
|
+
export const SOURCE_MATCHES = Object.freeze(['match', 'mismatch', 'not_determinable', 'unavailable']);
|
|
18
|
+
|
|
19
|
+
// The tool-result descriptor key and the command tools come from the MCP tool-error contract, and the
|
|
20
|
+
// slot of a recorded step from the run identity owner; all three modules are pure (CR finding CIR-04).
|
|
21
|
+
export const TOOL_RESULT_META_KEY = TOOL_RESULT_META;
|
|
22
|
+
const COMMAND_TOOLS = new Set(COMMAND_TOOL_NAMES);
|
|
23
|
+
const TEXT_LIMIT = 256;
|
|
24
|
+
const encoder = new TextEncoder();
|
|
25
|
+
const bounded = value => (typeof value === 'string' && value.length ? value.slice(0, TEXT_LIMIT) : null);
|
|
26
|
+
|
|
27
|
+
// The bounded preview of a text: cut after the 40th line break unless the text ends there, then to
|
|
28
|
+
// at most 4096 UTF-8 bytes on a character boundary. Exactly 40 lines or 4096 bytes stay whole.
|
|
29
|
+
export function reviewPreview(text) {
|
|
30
|
+
const value = String(text ?? '');
|
|
31
|
+
let preview = value;
|
|
32
|
+
let at = -1;
|
|
33
|
+
for (let line = 0; line < PREVIEW_LIMITS.lines; line += 1) {
|
|
34
|
+
at = value.indexOf('\n', at + 1);
|
|
35
|
+
if (at < 0) break;
|
|
36
|
+
}
|
|
37
|
+
if (at >= 0 && at < value.length - 1) preview = value.slice(0, at + 1);
|
|
38
|
+
if (encoder.encode(preview).length > PREVIEW_LIMITS.bytes) {
|
|
39
|
+
let size = 0;
|
|
40
|
+
let cut = 0;
|
|
41
|
+
for (const char of preview) {
|
|
42
|
+
const width = encoder.encode(char).length;
|
|
43
|
+
if (size + width > PREVIEW_LIMITS.bytes) break;
|
|
44
|
+
size += width;
|
|
45
|
+
cut += char.length;
|
|
46
|
+
}
|
|
47
|
+
preview = preview.slice(0, cut);
|
|
48
|
+
}
|
|
49
|
+
return { text: preview, truncated: preview.length < value.length, bytes: encoder.encode(value).length };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// One review fact: what the runtime saw of recorded or staged material. Unknown values stay null
|
|
53
|
+
// ("unavailable"), never guessed (PRD AC-007).
|
|
54
|
+
export function reviewFact({ slot = null, source, path = null, digest = null, text = null, sourceMatch }) {
|
|
55
|
+
const preview = typeof text === 'string' ? reviewPreview(text) : null;
|
|
56
|
+
return {
|
|
57
|
+
slot: bounded(slot),
|
|
58
|
+
source: source === 'path' ? 'path' : 'staged',
|
|
59
|
+
path: bounded(path),
|
|
60
|
+
digest: /^sha256:[a-f0-9]{64}$/u.test(digest ?? '') ? digest : null,
|
|
61
|
+
bytes: preview?.bytes ?? null,
|
|
62
|
+
preview: preview?.text ?? null,
|
|
63
|
+
truncated: preview?.truncated ?? null,
|
|
64
|
+
source_match: SOURCE_MATCHES.includes(sourceMatch) ? sourceMatch : 'unavailable',
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// The slot (gate or step) a command names, for the event's gate field.
|
|
69
|
+
export function commandGate(command = {}) {
|
|
70
|
+
const payload = command.payload ?? {};
|
|
71
|
+
if (command.kind === 'closeout.record') return 'OR';
|
|
72
|
+
if (command.kind === 'step.record') return payload.internal_step ?? RUN_STEP_SLOTS[payload.step] ?? null;
|
|
73
|
+
if (command.kind === 'operation.recover') return null;
|
|
74
|
+
return typeof payload.gate === 'string' ? payload.gate : null;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function successKind(command, result) {
|
|
78
|
+
const kind = command?.kind;
|
|
79
|
+
if (kind === 'presentation.deliver') {
|
|
80
|
+
return result.historical_effect === true || result.presentation_delivery?.historical_delivery === true
|
|
81
|
+
? null : 'approval_requested';
|
|
82
|
+
}
|
|
83
|
+
if (kind === 'approval.record') return 'approval_recorded';
|
|
84
|
+
if (kind === 'closeout.record') return 'run_completed';
|
|
85
|
+
if (kind === 'material.stage' && command.payload?.action === 'seal') return 'material_staged';
|
|
86
|
+
if (kind === 'step.record' || kind === 'artefact.record') return 'document_recorded';
|
|
87
|
+
return null;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// The event kind of one final command result, or null for a read, a replay or an outcome outside
|
|
91
|
+
// the eight kinds. A failure is classified by the projected descriptor's effect state first, so a
|
|
92
|
+
// thrown failure of unknown effect is never reported as rejected.
|
|
93
|
+
export function eventKind(toolName, input, result) {
|
|
94
|
+
if (!COMMAND_TOOLS.has(toolName) || !result || typeof result !== 'object') return null;
|
|
95
|
+
const descriptor = result._meta?.[TOOL_RESULT_META_KEY] ?? null;
|
|
96
|
+
if (result.outcome === 'accepted') return successKind(input?.command, result);
|
|
97
|
+
if (result.outcome === 'already_applied') return null;
|
|
98
|
+
if (result.outcome === 'recovery_required') return 'recovery_required';
|
|
99
|
+
if (result.outcome === 'effect_unknown' || descriptor?.effect_state === 'unknown') return 'effect_unknown';
|
|
100
|
+
if (descriptor?.failed || result.outcome === 'rejected') return 'write_rejected';
|
|
101
|
+
return null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// The event of one final tool result: { schema_version, id, at, root, run_id, gate, kind, outcome,
|
|
105
|
+
// reason, operation_id, review } or null. `id`, `at` and `root` come from the writer; `review` holds
|
|
106
|
+
// the runtime's review facts for staged or recorded material.
|
|
107
|
+
export function deriveEvent(toolName, input, result, { id, at, root = null, review = null } = {}) {
|
|
108
|
+
const kind = eventKind(toolName, input, result);
|
|
109
|
+
if (!kind) return null;
|
|
110
|
+
const descriptor = result._meta?.[TOOL_RESULT_META_KEY] ?? null;
|
|
111
|
+
const facts = Array.isArray(review) && review.length && ['material_staged', 'document_recorded'].includes(kind) ? review.slice(0, 4) : null;
|
|
112
|
+
return {
|
|
113
|
+
schema_version: COMPANION_EVENT_SCHEMA,
|
|
114
|
+
id: bounded(id),
|
|
115
|
+
at: bounded(at),
|
|
116
|
+
root: typeof root === 'string' && root.length ? root : bounded(input?.primary_target) ?? bounded(input?.working_directory),
|
|
117
|
+
run_id: bounded(input?.run_id) ?? bounded(result.run_id),
|
|
118
|
+
gate: kind === 'material_staged' ? facts?.[0]?.slot ?? null : commandGate(input?.command),
|
|
119
|
+
kind,
|
|
120
|
+
outcome: bounded(result.outcome) ?? (descriptor?.failed ? 'failed' : null),
|
|
121
|
+
reason: descriptor?.failed ? bounded(descriptor.code) ?? bounded(result.reason) : null,
|
|
122
|
+
operation_id: bounded(input?.operation_id),
|
|
123
|
+
review: facts,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// A journal line is an event when it parses and carries the schema, a known kind and an id.
|
|
128
|
+
export function validEvent(value) {
|
|
129
|
+
return Boolean(value) && typeof value === 'object' && !Array.isArray(value) && value.schema_version === COMPANION_EVENT_SCHEMA
|
|
130
|
+
&& EVENT_KINDS.includes(value.kind) && typeof value.id === 'string' && typeof value.at === 'string';
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
// The events of a journal text in file order; malformed or foreign lines are skipped, since several
|
|
134
|
+
// MCP servers may interleave lines (SDD-006).
|
|
135
|
+
export function parseEventLines(text) {
|
|
136
|
+
const events = [];
|
|
137
|
+
for (const line of String(text ?? '').split('\n')) {
|
|
138
|
+
if (!line.trim()) continue;
|
|
139
|
+
try {
|
|
140
|
+
const value = JSON.parse(line);
|
|
141
|
+
if (validEvent(value)) events.push(value);
|
|
142
|
+
} catch { /* an interleaved or cut line */ }
|
|
143
|
+
}
|
|
144
|
+
return events;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
// Roots compare after normalizing separators, a trailing separator and, on win32, case (SD 5).
|
|
148
|
+
export function sameRoot(left, right, { win32 = false } = {}) {
|
|
149
|
+
const normal = value => {
|
|
150
|
+
const text = String(value ?? '').replaceAll('\\', '/').replace(/\/+$/u, '');
|
|
151
|
+
return win32 ? text.toLowerCase() : text;
|
|
152
|
+
};
|
|
153
|
+
return Boolean(left) && Boolean(right) && normal(left) === normal(right);
|
|
154
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Companion figure state (SD SDD-004): one mood and a reason descriptor per run-view entry, derived
|
|
2
|
+
// only from the status-card fields the run view copied. Pure and host-neutral; hosts localize the
|
|
3
|
+
// reason with the catalog's companion section and may overlay their own activity (turn in progress).
|
|
4
|
+
import { COMPANION_MOODS } from '../interaction-catalog.js';
|
|
5
|
+
import { RUN_MODES } from '../control-state/run-identity.js';
|
|
6
|
+
|
|
7
|
+
export { COMPANION_MOODS };
|
|
8
|
+
// The internal steps between an approved TP and QA, shown as building in structured runs; hosts that
|
|
9
|
+
// mark the build phase use this list (CR finding CIR-04).
|
|
10
|
+
export const BUILD_GATES = Object.freeze(['Brownfield Analysis', 'CD+Tests', 'CR']);
|
|
11
|
+
export const STRUCTURED_MODES = Object.freeze(RUN_MODES.filter(mode => mode.startsWith('structured_')));
|
|
12
|
+
// The ended lifecycles of run-operations.js (ENDED_LIFECYCLES), kept here so this module stays pure;
|
|
13
|
+
// the companion tests assert both agree.
|
|
14
|
+
export const ENDED_LIFECYCLES = Object.freeze(['superseded', 'abandoned']);
|
|
15
|
+
// The pending approval as the run inventory reads it (run-inventory.js runAttention): a negated
|
|
16
|
+
// mention ("No Approval: QA") is no pending approval.
|
|
17
|
+
const pendingApproval = missing => String(missing ?? '').match(/(?<!\b(?:[Nn]o|[Nn]ot|[Ww]ithout) )\bApproval: (UR|PRD|SD|TP|QA|UAT|OR)\b/u)?.[1] ?? null;
|
|
18
|
+
|
|
19
|
+
// { mood, reason: { key, gate?, decision?, reason? } }; null or no entry is the idle figure.
|
|
20
|
+
export function deriveFigureState(entry) {
|
|
21
|
+
if (!entry) return { mood: 'bereit', reason: { key: 'idle' } };
|
|
22
|
+
if (entry.valid === false) return { mood: 'blockiert', reason: { key: 'unreadable', reason: entry.unreadable_reason ?? 'run_state_invalid' } };
|
|
23
|
+
if (entry.evaluation_error) return { mood: 'blockiert', reason: { key: 'unreadable', reason: entry.evaluation_error } };
|
|
24
|
+
if (entry.lifecycle === 'completed') return { mood: 'fertig', reason: { key: 'done' } };
|
|
25
|
+
if (ENDED_LIFECYCLES.includes(entry.lifecycle)) return { mood: 'bereit', reason: { key: 'ended' } };
|
|
26
|
+
if (!entry.evaluated) return { mood: 'bereit', reason: { key: 'idle' } };
|
|
27
|
+
const gate = entry.current_gate;
|
|
28
|
+
if (entry.status === 'blocked' || (entry.blocking_reason && entry.blocking_reason !== 'none'))
|
|
29
|
+
return { mood: 'blockiert', reason: { key: 'blocked', gate, decision: entry.blocking_reason } };
|
|
30
|
+
const approval = pendingApproval(entry.missing_approval);
|
|
31
|
+
if (approval) return { mood: 'wartet', reason: { key: 'waitingApproval', gate: approval } };
|
|
32
|
+
if (entry.user_action_required === 'yes') return { mood: 'wartet', reason: { key: 'waitingDecision', gate } };
|
|
33
|
+
if (entry.status === 'pass') return { mood: 'fertig', reason: { key: 'done' } };
|
|
34
|
+
if (STRUCTURED_MODES.includes(entry.mode) && BUILD_GATES.includes(gate)) return { mood: 'baut', reason: { key: 'building', gate } };
|
|
35
|
+
return { mood: 'laeuft', reason: { key: 'working', gate } };
|
|
36
|
+
}
|
package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js
ADDED
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
// Companion event journal (SD SDD-006, SDD-008): the runtime appends one line per event of a final
|
|
2
|
+
// AGDF MCP tool result to `companion/events.jsonl` below the plugin data root, bounded to 256 KiB with
|
|
3
|
+
// one rotation file `events.1.jsonl`. It is a notification channel only, never a source of truth, and
|
|
4
|
+
// nothing here writes under `.agdf/control`. Every failure is swallowed: the tool result never changes.
|
|
5
|
+
import { createHash, randomUUID } from 'node:crypto';
|
|
6
|
+
import { appendFileSync, lstatSync, mkdirSync, readFileSync, realpathSync, renameSync, statSync } from 'node:fs';
|
|
7
|
+
import { isAbsolute, join, resolve } from 'node:path';
|
|
8
|
+
import { resolveTaskTarget } from '../task-target-resolution.js';
|
|
9
|
+
import { artefactFileDigest } from '../control-state/run-seal-compute.js';
|
|
10
|
+
import { containedRegularFile } from '../control-state/contained-file.js';
|
|
11
|
+
import { atomicWrite, withOwnedFileLock } from '../owned-file-lock.js';
|
|
12
|
+
import { commandGate, deriveEvent, eventKind, reviewFact } from './events.js';
|
|
13
|
+
|
|
14
|
+
export const JOURNAL_DIRECTORY = 'companion';
|
|
15
|
+
export const JOURNAL_FILE = 'events.jsonl';
|
|
16
|
+
export const JOURNAL_ROTATED_FILE = 'events.1.jsonl';
|
|
17
|
+
export const JOURNAL_LIMIT_BYTES = 256 * 1024;
|
|
18
|
+
// The launcher hands its data root (CLAUDE_PLUGIN_DATA on Claude, --data on Codex) to the runtime
|
|
19
|
+
// processes through this variable (SDD-006).
|
|
20
|
+
export const COMPANION_DATA_ROOT_ENV = 'AGDF_COMPANION_DATA_ROOT';
|
|
21
|
+
const SOURCE_TEXT_LIMIT = 1024 * 1024;
|
|
22
|
+
const RESERVATIONS_FILE = 'approval-requests.json';
|
|
23
|
+
const RESERVATIONS_LIFETIME_MS = 30 * 60_000;
|
|
24
|
+
const RESERVATIONS_MAX_ENTRIES = 8192;
|
|
25
|
+
const RESERVATIONS_MAX_BYTES = 1024 * 1024;
|
|
26
|
+
const RESERVATIONS_LOCK_WAIT_MS = 50;
|
|
27
|
+
const DIGEST = /^[a-f0-9]{64}$/u;
|
|
28
|
+
|
|
29
|
+
export const journalPath = dataRoot => join(dataRoot, JOURNAL_DIRECTORY, JOURNAL_FILE);
|
|
30
|
+
|
|
31
|
+
const isLink = path => { try { return lstatSync(path).isSymbolicLink(); } catch { return false; } };
|
|
32
|
+
|
|
33
|
+
function readReservations(path) {
|
|
34
|
+
let stat;
|
|
35
|
+
try { stat = lstatSync(path); }
|
|
36
|
+
catch (error) { if (error.code === 'ENOENT') return []; throw error; }
|
|
37
|
+
if (!stat.isFile() || stat.size > RESERVATIONS_MAX_BYTES) throw Error('invalid notification reservations');
|
|
38
|
+
const bytes = readFileSync(path);
|
|
39
|
+
if (bytes.length > RESERVATIONS_MAX_BYTES) throw Error('invalid notification reservations');
|
|
40
|
+
const stored = JSON.parse(bytes);
|
|
41
|
+
if (!stored || typeof stored !== 'object' || Array.isArray(stored)) throw Error('invalid notification reservations');
|
|
42
|
+
const entries = Object.entries(stored);
|
|
43
|
+
if (entries.length > RESERVATIONS_MAX_ENTRIES
|
|
44
|
+
|| entries.some(([key, expires]) => !DIGEST.test(key) || !Number.isSafeInteger(expires) || expires < 0)) {
|
|
45
|
+
throw Error('invalid notification reservations');
|
|
46
|
+
}
|
|
47
|
+
return entries;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// Only the notification survives a serving-process restart. Neither this
|
|
51
|
+
// reservation nor the journal line participates in delivery or approval.
|
|
52
|
+
function reserveApprovalRequest(dataRoot, input, at) {
|
|
53
|
+
const identity = [input.target_id, input.run_id, input.expected_revision_id,
|
|
54
|
+
input.command.payload.presentation_id, input.operation_id];
|
|
55
|
+
if (!identity.every(value => typeof value === 'string' && value.length > 0)) return false;
|
|
56
|
+
const key = createHash('sha256').update(JSON.stringify(identity)).digest('hex');
|
|
57
|
+
const directory = join(dataRoot, JOURNAL_DIRECTORY);
|
|
58
|
+
if (isLink(dataRoot) || isLink(directory)) return false;
|
|
59
|
+
mkdirSync(directory, { recursive: true, mode: 0o700 });
|
|
60
|
+
const path = join(directory, RESERVATIONS_FILE);
|
|
61
|
+
const deadline = performance.now() + RESERVATIONS_LOCK_WAIT_MS;
|
|
62
|
+
for (;;) {
|
|
63
|
+
try {
|
|
64
|
+
return withOwnedFileLock(path, () => {
|
|
65
|
+
const live = new Map(readReservations(path).filter(([, expires]) => expires > at));
|
|
66
|
+
if (live.has(key) || live.size >= RESERVATIONS_MAX_ENTRIES) return false;
|
|
67
|
+
live.set(key, at + RESERVATIONS_LIFETIME_MS);
|
|
68
|
+
const bytes = JSON.stringify(Object.fromEntries(live));
|
|
69
|
+
if (Buffer.byteLength(bytes) > RESERVATIONS_MAX_BYTES) return false;
|
|
70
|
+
atomicWrite(path, bytes);
|
|
71
|
+
return true;
|
|
72
|
+
});
|
|
73
|
+
} catch (error) {
|
|
74
|
+
const remaining = deadline - performance.now();
|
|
75
|
+
if (error.lock_owner_status !== 'live' || remaining <= 0) return false;
|
|
76
|
+
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, Math.min(5, remaining));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
// Appends one event line; rotates first when the line would cross the bound. Returns whether the line
|
|
82
|
+
// was written. Concurrent servers may interleave whole lines or lose some at rotation (accepted).
|
|
83
|
+
export function appendJournalEvent(dataRoot, event, { limit = JOURNAL_LIMIT_BYTES } = {}) {
|
|
84
|
+
try {
|
|
85
|
+
if (typeof dataRoot !== 'string' || !dataRoot || !event) return false;
|
|
86
|
+
const directory = join(dataRoot, JOURNAL_DIRECTORY);
|
|
87
|
+
if (isLink(dataRoot) || isLink(directory)) return false;
|
|
88
|
+
mkdirSync(directory, { recursive: true });
|
|
89
|
+
const line = `${JSON.stringify(event)}\n`;
|
|
90
|
+
const size = Buffer.byteLength(line, 'utf8');
|
|
91
|
+
if (size > limit) return false;
|
|
92
|
+
const file = join(directory, JOURNAL_FILE);
|
|
93
|
+
if (isLink(file)) return false;
|
|
94
|
+
let current = 0;
|
|
95
|
+
try { current = statSync(file).size; } catch { current = 0; }
|
|
96
|
+
if (current > 0 && current + size > limit) renameSync(file, join(directory, JOURNAL_ROTATED_FILE));
|
|
97
|
+
appendFileSync(file, line, 'utf8');
|
|
98
|
+
return true;
|
|
99
|
+
} catch {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
// The governance root of a command input, resolved like the material store does; the input's own
|
|
105
|
+
// target path when it does not resolve.
|
|
106
|
+
export function commandRoot(input = {}) {
|
|
107
|
+
try {
|
|
108
|
+
const target = resolveTaskTarget({ workingDirectory: input.working_directory, targetSource: input.target_source, primaryTarget: input.primary_target });
|
|
109
|
+
if (target.resolution_state === 'resolved' && target.governance_target) return target.governance_target;
|
|
110
|
+
} catch { /* fall back to the input path */ }
|
|
111
|
+
return input.primary_target ?? input.working_directory ?? null;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
// The event's root: the caller's target path when it names the same directory as the resolved root
|
|
115
|
+
// through another spelling (junction, symlink, subst drive), so a host comparing with its own session
|
|
116
|
+
// root still matches (SD SDD-005 "the MCP target path", CR finding A6); else the resolved root.
|
|
117
|
+
// Review facts keep reading below the resolved root.
|
|
118
|
+
export function eventRoot(input = {}, root = commandRoot(input)) {
|
|
119
|
+
const given = typeof input.primary_target === 'string' && isAbsolute(input.primary_target) ? resolve(input.primary_target) : null;
|
|
120
|
+
if (!given || !root || given === root) return root;
|
|
121
|
+
try { return realpathSync(given) === realpathSync(root) ? given : root; } catch { return root; }
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
// Review facts of a path source: the file read now, its canonical digest from the node digest owner
|
|
125
|
+
// compared with the declared digest (match or mismatch); unreadable files are unavailable.
|
|
126
|
+
function pathFact(root, slot, source) {
|
|
127
|
+
const current = root ? artefactFileDigest(root, source.path) : 'unresolved';
|
|
128
|
+
if (!/^sha256:/u.test(current)) return reviewFact({ slot, source: 'path', path: source.path, digest: source.digest, sourceMatch: 'unavailable' });
|
|
129
|
+
let text = null;
|
|
130
|
+
try {
|
|
131
|
+
const file = containedRegularFile(root, String(source.path).trim());
|
|
132
|
+
if (file.status === 'valid' && statSync(file.path).size <= SOURCE_TEXT_LIMIT) text = readFileSync(file.path, 'utf8');
|
|
133
|
+
} catch { text = null; }
|
|
134
|
+
return reviewFact({ slot, source: 'path', path: source.path, digest: source.digest, text, sourceMatch: current === source.digest ? 'match' : 'mismatch' });
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
// Review facts (SDD-008, decision P4): sealed staged material carries its preview, size and digest
|
|
138
|
+
// with source_match not_determinable; a recording from a path carries the path, the recorded digest
|
|
139
|
+
// and whether the file still matches it; a recording from staged material names its digest only.
|
|
140
|
+
export function reviewFacts(toolName, input, result, { sealedFiles = () => null, root = commandRoot(input) } = {}) {
|
|
141
|
+
const kind = eventKind(toolName, input, result);
|
|
142
|
+
const command = input?.command ?? {};
|
|
143
|
+
if (kind === 'material_staged') {
|
|
144
|
+
const files = sealedFiles(command.payload?.transfer_id) ?? [];
|
|
145
|
+
return files.map(file => reviewFact({ slot: file.slot, source: 'staged', digest: file.digest, text: file.content, sourceMatch: 'not_determinable' }));
|
|
146
|
+
}
|
|
147
|
+
if (kind !== 'document_recorded') return null;
|
|
148
|
+
const payload = command.payload ?? {};
|
|
149
|
+
const source = payload.source ?? payload.material ?? null;
|
|
150
|
+
const slot = commandGate(command);
|
|
151
|
+
if (source?.path) return [pathFact(root, slot, source)];
|
|
152
|
+
if (source?.material_id) return [reviewFact({ slot, source: 'staged', digest: source.digest, sourceMatch: 'not_determinable' })];
|
|
153
|
+
return null;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// The runtime's observer of final tool results. Without a data root it does nothing.
|
|
157
|
+
export function createCompanionJournal({ dataRoot = process.env[COMPANION_DATA_ROOT_ENV], sealedFiles = () => null,
|
|
158
|
+
now = () => new Date(), newId = randomUUID, limit = JOURNAL_LIMIT_BYTES } = {}) {
|
|
159
|
+
const enabled = typeof dataRoot === 'string' && dataRoot.length > 0;
|
|
160
|
+
return Object.freeze({
|
|
161
|
+
enabled,
|
|
162
|
+
path: enabled ? journalPath(dataRoot) : null,
|
|
163
|
+
observe(toolName, input, result) {
|
|
164
|
+
if (!enabled) return false;
|
|
165
|
+
try {
|
|
166
|
+
const kind = eventKind(toolName, input, result);
|
|
167
|
+
if (!kind) return false;
|
|
168
|
+
const root = commandRoot(input);
|
|
169
|
+
const review = reviewFacts(toolName, input, result, { sealedFiles, root });
|
|
170
|
+
const at = now();
|
|
171
|
+
const event = deriveEvent(toolName, input, result, { id: newId(), at: at.toISOString(), root: eventRoot(input, root), review });
|
|
172
|
+
if (!event) return false;
|
|
173
|
+
if (kind === 'approval_requested' && !reserveApprovalRequest(dataRoot, input, at.getTime())) return false;
|
|
174
|
+
return appendJournalEvent(dataRoot, event, { limit });
|
|
175
|
+
} catch {
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
});
|
|
180
|
+
}
|
package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
// Companion run view (SD SDD-001, SDD-002): a read-only projection of the unchanged gate-check
|
|
2
|
+
// report of each run, beside the run inventory of one project root. It never re-derives a gate
|
|
3
|
+
// rule: status fields are copied from the status card verbatim, so every consumer of the run
|
|
4
|
+
// view sees exactly what the status card shows. Nothing here writes or authorizes.
|
|
5
|
+
import { existsSync, realpathSync } from 'node:fs';
|
|
6
|
+
import { join } from 'node:path';
|
|
7
|
+
import { readFileSync } from '../control-read/fs.js';
|
|
8
|
+
import { captureControlScope } from '../control-read/snapshot.js';
|
|
9
|
+
import { evaluateGateCheck } from '../control-evaluation/gate-check.js';
|
|
10
|
+
import { readRunInventory } from '../control-state/run-inventory-reader.js';
|
|
11
|
+
import { runFolderEntries } from '../control-state/run-state-reader.js';
|
|
12
|
+
import { readArtefactBindings } from '../control-state/artefact-bindings.js';
|
|
13
|
+
import { readEvidenceBindings } from '../control-state/evidence-bindings.js';
|
|
14
|
+
import { runRelativePath } from '../control-state/run-identity.js';
|
|
15
|
+
import { artefactFileDigest } from '../control-state/run-seal-compute.js';
|
|
16
|
+
import { boundedCode } from '../control-inspect/run-classification.js';
|
|
17
|
+
import { localizeBlockingCondition, localizeOperationalValue } from '../interaction-presentation.js';
|
|
18
|
+
import { interactionLocales } from '../resources/context.js';
|
|
19
|
+
import { deriveFigureState } from './figure-state.js';
|
|
20
|
+
|
|
21
|
+
export const RUN_VIEW_SCHEMA = 'run-view/1';
|
|
22
|
+
export const DIAGNOSIS_REASONS = Object.freeze(['run_version_unsupported', 'run_state_invalid', 'too_large', 'missing']);
|
|
23
|
+
// The reader's findings for a run folder without a readable run state: the path finding of
|
|
24
|
+
// run-state-reader.js (invalidRun) and the inventory's finding for a run without text (run-inventory.js).
|
|
25
|
+
const MISSING_CODES = new Set(['AGDF_RUN_PATH_INVALID', 'AGDF_RUN_STATE_UNAVAILABLE']);
|
|
26
|
+
// The classifications run-state-resolver.js treats as unsupported (AGDF_RUN_VERSION_UNSUPPORTED).
|
|
27
|
+
const UNSUPPORTED_CLASSIFICATIONS = new Set(['unsupported_version', 'unsupported_layout']);
|
|
28
|
+
|
|
29
|
+
// Per-run reason of an unreadable run (SD SDD-003) from the reader findings: unsupported by their
|
|
30
|
+
// classification, as run-state-resolver.js and the cockpit decide it (CR finding CIR-03), missing
|
|
31
|
+
// when only the missing-state findings are present, otherwise invalid. Core reports no size bound
|
|
32
|
+
// of its own, so an oversized run state is reported with the reason Core gives it; too_large stays
|
|
33
|
+
// reserved for such a bound (contradiction C1).
|
|
34
|
+
export function diagnosisReason(findings) {
|
|
35
|
+
if (findings.some(finding => UNSUPPORTED_CLASSIFICATIONS.has(finding.classification))) return 'run_version_unsupported';
|
|
36
|
+
if (findings.length && findings.every(finding => MISSING_CODES.has(finding.code))) return 'missing';
|
|
37
|
+
return 'run_state_invalid';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function projectDiagnosis(entries) {
|
|
41
|
+
const unreadable = entries.filter(entry => !entry.valid).map(entry => ({ run_id: entry.run_id, reason: entry.unreadable_reason ?? 'run_state_invalid', codes: entry.findings }));
|
|
42
|
+
const by_reason = Object.fromEntries(DIAGNOSIS_REASONS.map(reason => [reason, unreadable.filter(row => row.reason === reason).length]));
|
|
43
|
+
return { unreadable, counts: { unreadable: unreadable.length, readable: entries.length - unreadable.length, by_reason } };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// One run entry: inventory facts plus, when evaluated, the status card fields of its report.
|
|
47
|
+
export function projectRunEntry(inventoryEntry, report, { registry = interactionLocales, language = 'en' } = {}) {
|
|
48
|
+
const base = {
|
|
49
|
+
run_id: inventoryEntry.run_id,
|
|
50
|
+
title: inventoryEntry.title ?? null,
|
|
51
|
+
// The authored objective only; a template objective or a run-id title is no goal (CR finding C2).
|
|
52
|
+
objective: inventoryEntry.title_source === 'objective' ? inventoryEntry.title ?? null : null,
|
|
53
|
+
lifecycle: inventoryEntry.lifecycle ?? null,
|
|
54
|
+
valid: inventoryEntry.valid !== false,
|
|
55
|
+
revision: inventoryEntry.revision ?? null,
|
|
56
|
+
revision_id: inventoryEntry.revision_id ?? null,
|
|
57
|
+
last_activity: inventoryEntry.last_activity?.at ?? null,
|
|
58
|
+
findings: (inventoryEntry.findings ?? []).map(finding => finding.code),
|
|
59
|
+
};
|
|
60
|
+
if (!base.valid) base.unreadable_reason = diagnosisReason(inventoryEntry.findings ?? []);
|
|
61
|
+
// A run whose evaluation threw is reported with the bounded reason, never as an idle run (CR A7).
|
|
62
|
+
if (report?.evaluation_error) return withFigure({ ...base, evaluated: false, evaluation_error: report.evaluation_error });
|
|
63
|
+
if (!report?.status_card) return withFigure({ ...base, evaluated: false });
|
|
64
|
+
const card = report.status_card;
|
|
65
|
+
return withFigure({
|
|
66
|
+
...base,
|
|
67
|
+
title: card.humanPresentation?.runTitle ?? base.title,
|
|
68
|
+
evaluated: true,
|
|
69
|
+
status: card.status,
|
|
70
|
+
current_gate: card.current_gate,
|
|
71
|
+
path: card.breadcrumb.map(({ gate, status }) => ({ gate, status })),
|
|
72
|
+
missing_approval: card.missing_approval,
|
|
73
|
+
blocking_reason: card.blocking_condition,
|
|
74
|
+
blocking_text: localizeBlockingCondition(card.blocking_condition, { registry, requestedLocale: language }) ?? card.blocking_condition,
|
|
75
|
+
next_step: card.next_step,
|
|
76
|
+
next_step_text: localizeOperationalValue(card.next_step, { registry, requestedLocale: language }) ?? card.next_step,
|
|
77
|
+
user_action_required: card.user_action_required,
|
|
78
|
+
doctor_status: report.doctor_status,
|
|
79
|
+
mode: card.mode_slice_decision ?? card.mode ?? null,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
const withFigure = entry => ({ ...entry, figure: deriveFigureState(entry) });
|
|
83
|
+
|
|
84
|
+
// Pure assembly of the versioned view from already evaluated parts.
|
|
85
|
+
export function projectRunView({ root, language, store, entries }) {
|
|
86
|
+
return {
|
|
87
|
+
schema_version: RUN_VIEW_SCHEMA,
|
|
88
|
+
root,
|
|
89
|
+
language,
|
|
90
|
+
store,
|
|
91
|
+
diagnosis: projectDiagnosis(entries.filter(entry => entry.listed !== false)),
|
|
92
|
+
runs: entries,
|
|
93
|
+
authorizes: false,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// Drift warnings (SD SDD-008, PRD AC-008): documents the run state binds with a recorded digest
|
|
98
|
+
// (effective artefact binding destination, latest evidence report per path) whose file now has another
|
|
99
|
+
// canonical digest from the node digest owner. Declared input files of a recording are not kept in
|
|
100
|
+
// the run state, so only bound documents are compared (contradiction C5 of this run). An unreadable
|
|
101
|
+
// run state yields no warning; the status card reports it.
|
|
102
|
+
export function readRunDrift(root, runId) {
|
|
103
|
+
let content;
|
|
104
|
+
try { content = readFileSync(join(root, runRelativePath(runId, '', 'RUN_STATE.md')), 'utf8'); } catch { return []; }
|
|
105
|
+
const declared = new Map();
|
|
106
|
+
const artefacts = readArtefactBindings(content);
|
|
107
|
+
// A binding a recorded source revision invalidated is superseded for Core, so its document being
|
|
108
|
+
// re-drafted is no drift (CR finding A5).
|
|
109
|
+
for (const receipt of artefacts.valid ? artefacts.active ?? [] : []) {
|
|
110
|
+
declared.set(receipt.destination.path, { document: receipt.destination.type, digest: receipt.destination.digest });
|
|
111
|
+
}
|
|
112
|
+
const evidence = readEvidenceBindings(content);
|
|
113
|
+
for (const row of evidence.valid ? evidence.bindings : []) {
|
|
114
|
+
declared.set(row.report.path, { document: row.report.path.split('/').at(-1).replace(/\.md$/u, ''), digest: row.report.digest });
|
|
115
|
+
}
|
|
116
|
+
const drift = [];
|
|
117
|
+
for (const [path, { document, digest }] of declared) {
|
|
118
|
+
const current = artefactFileDigest(root, path);
|
|
119
|
+
if (current === digest) continue;
|
|
120
|
+
drift.push({ document, path, recorded_digest: digest, current_digest: /^sha256:/u.test(current) ? current : null });
|
|
121
|
+
}
|
|
122
|
+
return drift;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
// Active and unreadable runs are evaluated; terminal runs are summarized unless requested by id,
|
|
126
|
+
// so a large history does not cost one evaluation per run.
|
|
127
|
+
const needsEvaluation = (entry, requested) => requested.has(entry.run_id) || !entry.valid || entry.lifecycle === 'active';
|
|
128
|
+
|
|
129
|
+
// A write that lands during a capture invalidates it (source_changed); the read is repeated a bounded
|
|
130
|
+
// number of times before the change is reported (CR delta review RV-1).
|
|
131
|
+
export const CAPTURE_ATTEMPTS = 3;
|
|
132
|
+
export function captured(readRoot, project, capture = captureControlScope) {
|
|
133
|
+
for (let attempt = 1; ; attempt += 1) {
|
|
134
|
+
try { return capture(readRoot, view => project(view.root)).data; }
|
|
135
|
+
catch (error) { if (error?.code !== 'source_changed' || attempt >= CAPTURE_ATTEMPTS) throw error; }
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
// Reads inside bounded, revalidated control snapshots (TP T-002, SD section 4: captureControlScope,
|
|
140
|
+
// CR finding CIR-01): the inventory in one snapshot and each evaluated run with its drift in its own,
|
|
141
|
+
// so a read-boundary failure of one run (a linked file, a document outside the control folder, a read
|
|
142
|
+
// limit) marks only that run and the readable runs stay listed (SDD-003, RV-2). The root is resolved
|
|
143
|
+
// first, as MCP canonicalizes its target, so a junction or symlinked project root reads like its
|
|
144
|
+
// target; the view keeps the caller's spelling (RV-3). A missing root has no control folder (RV-5).
|
|
145
|
+
export function readRunView(root, { language = 'en', runIds = [] } = {}) {
|
|
146
|
+
const empty = store => projectRunView({ root, language, store, entries: [] });
|
|
147
|
+
if (!existsSync(root)) return empty({ status: 'no_control', reason: null });
|
|
148
|
+
let readRoot;
|
|
149
|
+
try { readRoot = realpathSync(root); } catch (error) { return empty({ status: 'unavailable', reason: boundedCode(error) }); }
|
|
150
|
+
const requested = new Set(runIds);
|
|
151
|
+
const evaluate = runId => {
|
|
152
|
+
try {
|
|
153
|
+
return captured(readRoot, base => {
|
|
154
|
+
const report = evaluateGateCheck(base, { runId, ignoreRunIdEnv: true, presentationLanguage: language });
|
|
155
|
+
return { report, drift: report?.status_card ? readRunDrift(base, runId) : null };
|
|
156
|
+
});
|
|
157
|
+
} catch (error) { return { report: { evaluation_error: boundedCode(error) }, drift: null }; }
|
|
158
|
+
};
|
|
159
|
+
const entryOf = (inventoryEntry, evaluated) => {
|
|
160
|
+
const entry = projectRunEntry(inventoryEntry, evaluated?.report ?? null, { language });
|
|
161
|
+
return entry.evaluated && entry.valid !== false && evaluated.drift ? { ...entry, drift: evaluated.drift } : entry;
|
|
162
|
+
};
|
|
163
|
+
let inventory = null, store;
|
|
164
|
+
try {
|
|
165
|
+
inventory = captured(readRoot, base => readRunInventory(base, { language, observe: false }));
|
|
166
|
+
store = { status: inventory.state === 'absent' ? 'no_control' : 'ok', reason: null };
|
|
167
|
+
} catch (error) {
|
|
168
|
+
store = { status: 'unavailable', reason: boundedCode(error) };
|
|
169
|
+
// An unsupported layout lists no run, but its run folders can be counted, so a consumer names count
|
|
170
|
+
// and reason instead of "no open runs" (PRD AC-002, TP T-004). A failing count leaves the field out.
|
|
171
|
+
if (store.reason === 'control_layout_unsupported') {
|
|
172
|
+
try { store.run_folders = captured(readRoot, base => runFolderEntries(base).length); } catch { /* count unknown */ }
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
const listed = inventory?.runs ?? [];
|
|
176
|
+
const entries = listed.map(entry => entryOf(entry, needsEvaluation(entry, requested) ? evaluate(entry.run_id) : null));
|
|
177
|
+
for (const runId of requested) {
|
|
178
|
+
if (listed.some(entry => entry.run_id === runId)) continue;
|
|
179
|
+
// Requested but not listed by the inventory (for example behind an unsupported layout):
|
|
180
|
+
// evaluated for its card, never counted in the diagnosis of listed runs.
|
|
181
|
+
entries.push({ ...entryOf({ run_id: runId, findings: [] }, evaluate(runId)), valid: null, listed: false });
|
|
182
|
+
}
|
|
183
|
+
return projectRunView({ root, language, store, entries });
|
|
184
|
+
}
|