create-agdf 0.20.1 → 0.30.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 +154 -192
- package/generated/.agdf/control/README.md +31 -110
- package/generated/.agdf/control/planned-urs.md +95 -0
- package/generated/.agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/.agdf/control/templates/artefacts/SD.md +7 -1
- package/generated/.agdf/control/templates/artefacts/TP.md +4 -0
- package/generated/.agdf/control/templates/artefacts/UR.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 +2668 -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 +58 -48
- package/generated/.opencode/contracts/gate-transition.md +5 -6
- package/generated/.opencode/contracts/interaction.md +43 -126
- package/generated/.opencode/contracts/modes.md +4 -3
- package/generated/.opencode/contracts/prd-definition.md +6 -6
- package/generated/.opencode/contracts/quality.md +81 -6
- package/generated/.opencode/contracts/request-activation.md +9 -8
- package/generated/.opencode/contracts/sd-definition.md +19 -3
- package/generated/.opencode/contracts/task-target-resolution.md +24 -0
- package/generated/.opencode/contracts/tp-definition.md +7 -1
- package/generated/.opencode/contracts/ur-definition.md +41 -7
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +5 -2
- package/generated/.opencode/skills/agdf-code-review/SKILL.md +7 -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 +13 -11
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-sd-definition/SKILL.md +5 -3
- package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +5 -2
- package/generated/.opencode/skills/agdf-tp-definition/SKILL.md +5 -3
- package/generated/.opencode/skills/agdf-ur-definition/SKILL.md +12 -4
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +5 -4
- 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/core.mjs +16 -0
- package/generated/plugins/agdf/companion/figure.mjs +137 -0
- package/generated/plugins/agdf/companion/gate-bar.mjs +54 -0
- package/generated/plugins/agdf/companion/hooks.json +3 -0
- package/generated/plugins/agdf/companion/locales.json +200 -0
- package/generated/plugins/agdf/companion/localization.mjs +89 -0
- package/generated/plugins/agdf/companion/notice.mjs +90 -0
- package/generated/plugins/agdf/companion/persistence.mjs +36 -0
- package/generated/plugins/agdf/companion/register.mjs +444 -0
- package/generated/plugins/agdf/companion/run-state.mjs +110 -0
- package/generated/plugins/agdf/companion/state.mjs +48 -0
- package/generated/plugins/agdf/companion/view.mjs +84 -0
- package/generated/plugins/agdf/control/README.md +31 -110
- package/generated/plugins/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/agdf/control/templates/artefacts/SD.md +7 -1
- package/generated/plugins/agdf/control/templates/artefacts/TP.md +4 -0
- package/generated/plugins/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/agdf/mcp/server/README.md +124 -12
- 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 +94 -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 +42 -10
- package/generated/plugins/agdf/mcp/server/src/server.js +44 -22
- package/generated/plugins/agdf/mcp/server/src/stdio-output.js +42 -0
- package/generated/plugins/agdf/mcp/server/src/ui-capability.js +49 -1
- 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 +2668 -2682
- package/generated/plugins/agdf/meta/agdf-mcp-capability.json +2 -2
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +12 -5
- 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 +58 -48
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/meta/contracts/interaction.md +43 -126
- package/generated/plugins/agdf/meta/contracts/modes.md +4 -3
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/plugins/agdf/meta/contracts/quality.md +81 -6
- package/generated/plugins/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +19 -3
- package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +7 -1
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +41 -7
- 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 +2668 -2682
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +12 -5
- 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 +58 -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 +43 -126
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +4 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +81 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +19 -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 +7 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +41 -7
- 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 +82 -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 +98 -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 +35 -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 +33 -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 +71 -298
- 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 +14 -80
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +29 -9
- 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 +152 -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/control-evaluation/closeout-readiness.js +10 -2
- 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 +10 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +446 -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/qa-follow-up.js +2 -1
- 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/ur-readiness.js +7 -2
- 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 +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +110 -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 +75 -44
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +142 -58
- 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/project-operation-call.js +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +48 -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/selection.js +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +142 -72
- 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/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 +99 -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/presentation-decision.js +12 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +90 -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 +33 -119
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +508 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +198 -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 +40 -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 +31 -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 +211 -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 +9 -8
- 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 +84 -161
- 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 +19 -18
- 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 +27 -18
- 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 +136 -248
- 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 +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +30 -12
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +46 -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 +31 -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 +173 -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 +28 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +11 -5
- 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 +64 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +14 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +49 -14
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +2 -1
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +60 -42
- 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 +5 -2
- package/generated/plugins/agdf/skills/code-review/SKILL.md +7 -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 +13 -11
- package/generated/plugins/agdf/skills/release-or/SKILL.md +8 -5
- package/generated/plugins/agdf/skills/sd-definition/SKILL.md +5 -3
- package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +5 -2
- package/generated/plugins/agdf/skills/tp-definition/SKILL.md +5 -3
- package/generated/plugins/agdf/skills/ur-definition/SKILL.md +12 -4
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +5 -4
- 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 +886 -483
- package/generated/plugins/copilot/agdf/control/README.md +31 -110
- package/generated/plugins/copilot/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/copilot/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +7 -1
- package/generated/plugins/copilot/agdf/control/templates/artefacts/TP.md +4 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/copilot/agdf/mcp/server/README.md +124 -12
- 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 +94 -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 +42 -10
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +44 -22
- package/generated/plugins/copilot/agdf/mcp/server/src/stdio-output.js +42 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/ui-capability.js +49 -1
- 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 +12 -5
- 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 +2668 -2682
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +12 -5
- 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 +58 -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 +43 -126
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +4 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +81 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +19 -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 +7 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +41 -7
- 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 +82 -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 +98 -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 +35 -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 +33 -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 +71 -298
- 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 +14 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +29 -9
- 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 +152 -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/control-evaluation/closeout-readiness.js +10 -2
- 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 +10 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +446 -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/qa-follow-up.js +2 -1
- 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/ur-readiness.js +7 -2
- 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 +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +110 -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 +142 -58
- 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/project-operation-call.js +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +48 -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/selection.js +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +142 -72
- 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/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 +99 -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/presentation-decision.js +12 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +90 -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 +33 -119
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +508 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +198 -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 +40 -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 +31 -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 +211 -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 +9 -8
- 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 +84 -161
- 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 +19 -18
- 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 +27 -18
- 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 +136 -248
- 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 +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +30 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +46 -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 +31 -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 +173 -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 +28 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +11 -5
- 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 +64 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +14 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +49 -14
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +2 -1
- 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 +5 -2
- package/generated/plugins/copilot/agdf/skills/agdf-code-review/SKILL.md +7 -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 +13 -11
- package/generated/plugins/copilot/agdf/skills/agdf-release-or/SKILL.md +8 -5
- package/generated/plugins/copilot/agdf/skills/agdf-sd-definition/SKILL.md +5 -3
- package/generated/plugins/copilot/agdf/skills/agdf-task-plan-review/SKILL.md +5 -2
- package/generated/plugins/copilot/agdf/skills/agdf-tp-definition/SKILL.md +5 -3
- 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 +5 -4
- 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 +58 -48
- package/generated/plugins/copilot/agdf/skills/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +43 -126
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +4 -3
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +6 -6
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +81 -6
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +9 -8
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +19 -3
- package/generated/plugins/copilot/agdf/skills/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +7 -1
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +41 -7
- 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 +2668 -2682
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +12 -5
- 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 +58 -48
- package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +43 -126
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +4 -3
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +81 -6
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +19 -3
- package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +7 -1
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +41 -7
- 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 +5 -2
- package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +7 -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 +13 -11
- package/generated/submissions/openai/agdf/skills/release-or/SKILL.md +8 -5
- package/generated/submissions/openai/agdf/skills/sd-definition/SKILL.md +5 -3
- package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +5 -2
- package/generated/submissions/openai/agdf/skills/tp-definition/SKILL.md +5 -3
- package/generated/submissions/openai/agdf/skills/ur-definition/SKILL.md +12 -4
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +5 -4
- 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 +49 -41
- 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 +82 -148
- package/lib/cli/control-maintenance-command.js +8 -37
- package/lib/cli/parse-args.js +98 -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 +35 -0
- package/lib/cli/run-command-aliases.js +116 -0
- package/lib/cli/runtime-context.js +1 -59
- package/lib/cli/validation-handlers.js +33 -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 +71 -298
- package/lib/mcp-lifecycle/adapters/codex-origin-probe.js +28 -4
- package/lib/mcp-lifecycle/adapters/copilot.js +13 -7
- package/lib/mcp-lifecycle/adapters/opencode.js +97 -8
- 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 +14 -80
- package/lib/mcp-lifecycle/plugin-runtime.js +29 -9
- package/lib/mcp-lifecycle/profile.js +2 -1
- 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 +152 -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 +9 -32
- package/lib/scaffold/presentation.js +2 -2
- package/lib/scaffold/write.js +6 -1
- package/package.json +6 -2
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +10 -2
- 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 +10 -9
- package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +11 -0
- package/runtime/core/lib/control-evaluation/gate-policy-pure.js +446 -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/qa-follow-up.js +2 -1
- 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/ur-readiness.js +7 -2
- 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 +5 -3
- package/runtime/core/lib/control-inspect/authoring-inputs.js +110 -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 +75 -44
- package/runtime/core/lib/control-inspect/contract.js +142 -58
- 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/project-operation-call.js +5 -0
- package/runtime/core/lib/control-inspect/project-state.js +48 -0
- package/runtime/core/lib/control-inspect/result.js +61 -0
- package/runtime/core/lib/control-inspect/selection.js +9 -3
- package/runtime/core/lib/control-inspect/service.js +142 -72
- 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/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 +99 -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/presentation-decision.js +12 -7
- package/runtime/core/lib/control-state/presentation-delivery.js +90 -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 +33 -119
- package/runtime/core/lib/control-state/run-command-schema.js +508 -0
- package/runtime/core/lib/control-state/run-command-service.js +198 -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 +40 -0
- package/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +31 -0
- package/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/runtime/core/lib/control-state/run-material.js +211 -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 +9 -8
- 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 +84 -161
- 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 +19 -18
- 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 +27 -18
- 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 +136 -248
- 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 +14 -6
- package/runtime/core/lib/interaction-catalog.js +3 -3
- package/runtime/core/lib/interaction-presentation.js +30 -12
- package/runtime/core/lib/mcp-input-hints.js +46 -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 +31 -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 +173 -18
- package/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/runtime/core/lib/skill-dispatch/contract.js +28 -9
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +11 -5
- package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/runtime/core/lib/skill-dispatch/mcp-continuation.js +64 -0
- package/runtime/core/lib/skill-dispatch/prd-definition.js +14 -5
- package/runtime/core/lib/skill-dispatch/sd-definition.js +2 -1
- package/runtime/core/lib/skill-dispatch/service.js +49 -14
- package/runtime/core/lib/skill-dispatch/tp-definition.js +2 -1
- 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
|
@@ -1,44 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { selectControlMaintenance, selectControlMigration, selectControlRepair } from "../control-maintenance/interaction.js";
|
|
7
|
-
|
|
8
|
-
export async function executeControlMaintenance(options, io = console, adapters = {}) {
|
|
9
|
-
const input = adapters.input ?? process.stdin;
|
|
10
|
-
const output = adapters.output ?? process.stdout;
|
|
11
|
-
if (options.guided && (options.json || !(adapters.interactive ?? (input.isTTY && output.isTTY)))) {
|
|
12
|
-
io.error("AGDF_MAINTENANCE_INTERACTION_REQUIRED: --guided requires interactive input and cannot be combined with --json.");
|
|
13
|
-
return 1;
|
|
14
|
-
}
|
|
15
|
-
let prompt;
|
|
16
|
-
let closed = false;
|
|
17
|
-
const language = options.language?.chat_language ?? "en";
|
|
18
|
-
const write = (value) => io.log(value);
|
|
19
|
-
const readChoice = adapters.readChoice ?? (({ prompt: question }) => new Promise((resolve, reject) => {
|
|
20
|
-
if (closed) { reject(new Error("EOF")); return; }
|
|
21
|
-
const onClose = () => reject(new Error("EOF"));
|
|
22
|
-
prompt.once("close", onClose);
|
|
23
|
-
prompt.question(question).then(resolve, reject).finally(() => prompt.removeListener("close", onClose));
|
|
24
|
-
}));
|
|
25
|
-
const interaction = { language, write, readChoice };
|
|
1
|
+
import { runControlMaintenance } from '#agdf-core/control-maintenance/service.js';
|
|
2
|
+
import { maintenanceResult, maintenanceExitCode } from '#agdf-core/control-maintenance/contract.js';
|
|
3
|
+
import { renderMaintenanceResult } from '#agdf-core/control-maintenance/presentation.js';
|
|
4
|
+
export async function executeControlMaintenance(options, io = console) {
|
|
5
|
+
const language = options.language?.chat_language ?? 'en';
|
|
26
6
|
try {
|
|
27
|
-
|
|
28
|
-
prompt = createInterface({ input, output });
|
|
29
|
-
prompt.on("close", () => { closed = true; });
|
|
30
|
-
}
|
|
31
|
-
const report = await runControlMaintenance(options.dir, {
|
|
32
|
-
guided: options.guided,
|
|
33
|
-
chooseMaintenance: (control) => selectControlMaintenance(control, interaction),
|
|
34
|
-
confirmMigration: (plan) => selectControlMigration(plan, interaction),
|
|
35
|
-
confirmRepair: (plan) => selectControlRepair(plan, { ...interaction, phase: "plan" }),
|
|
36
|
-
});
|
|
7
|
+
const report = await runControlMaintenance(options.dir);
|
|
37
8
|
io.log(options.json ? JSON.stringify(report, null, 2) : renderMaintenanceResult(report, { language, details: options.details }));
|
|
38
9
|
return maintenanceExitCode(report);
|
|
39
10
|
} catch (error) {
|
|
40
|
-
const report = maintenanceResult(options.dir, null, {
|
|
11
|
+
const report = maintenanceResult(options.dir, null, { diagnostic: error.code ?? error.message });
|
|
41
12
|
io.log(options.json ? JSON.stringify(report, null, 2) : renderMaintenanceResult(report, { language }));
|
|
42
13
|
return 1;
|
|
43
|
-
}
|
|
14
|
+
}
|
|
44
15
|
}
|
|
@@ -12,8 +12,8 @@ export class CliUsageError extends Error {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const STEP_FIELD_FLAGS = new Map(["title", "route", "reason", "evidence", "source", "covers", "decision", "result", "risk", "next"]
|
|
16
|
-
.map((name) => [`--${name}`, name]));
|
|
15
|
+
const STEP_FIELD_FLAGS = new Map(["title", "route", "reason", "evidence", "source", "covers", "decision", "result", "risk", "next", "reviewer", "reviewed"]
|
|
16
|
+
.map((name) => [`--${name}`, name]).concat([['--update-draft', 'updateDraft']]));
|
|
17
17
|
|
|
18
18
|
function requiredValue(args, index, option) {
|
|
19
19
|
const next = args[index + 1];
|
|
@@ -35,6 +35,7 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
35
35
|
let dirInput = ".";
|
|
36
36
|
let force = false;
|
|
37
37
|
let json = false;
|
|
38
|
+
let native = false;
|
|
38
39
|
let verbose = false;
|
|
39
40
|
let guided = false;
|
|
40
41
|
let details = false;
|
|
@@ -54,7 +55,9 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
54
55
|
let intakeMode;
|
|
55
56
|
let continueDelivery = false;
|
|
56
57
|
let presentationId;
|
|
57
|
-
let
|
|
58
|
+
let documentServer;
|
|
59
|
+
let documentRequest = false;
|
|
60
|
+
let operationId, assurance, planId, sourceDigest, priority, pendingDigest, packageSelection;
|
|
58
61
|
let revisionMode, sourceGate, previewDigest;
|
|
59
62
|
let fixture;
|
|
60
63
|
let persist = false;
|
|
@@ -73,6 +76,7 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
73
76
|
let recoveryAction;
|
|
74
77
|
let recoveryPreviewId;
|
|
75
78
|
let recoveryConfirmation;
|
|
79
|
+
let closureFile, closureOutcome, successorRun, successorReference, closureConfirmation;
|
|
76
80
|
const stepFields = {};
|
|
77
81
|
let allActive = false;
|
|
78
82
|
let scope;
|
|
@@ -86,7 +90,6 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
86
90
|
let retireCockpit, restoreCockpit;
|
|
87
91
|
let setupRequest;
|
|
88
92
|
let controlDir;
|
|
89
|
-
let controlMigration;
|
|
90
93
|
let targetSource;
|
|
91
94
|
let primaryTarget;
|
|
92
95
|
let workingDirectory = cwd;
|
|
@@ -101,8 +104,23 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
101
104
|
if (!arg) continue;
|
|
102
105
|
if (arg.startsWith("--")) flagCounts.set(arg, (flagCounts.get(arg) ?? 0) + 1);
|
|
103
106
|
if (arg === "--help" || arg === "-h") return { kind: "help" };
|
|
107
|
+
if (arg === '--server') {
|
|
108
|
+
documentServer = requiredValue(args, i, arg); i++; continue;
|
|
109
|
+
}
|
|
110
|
+
if (arg === '--request') { documentRequest = true; continue; }
|
|
111
|
+
if (['--plan-id', '--source-digest', '--priority', '--pending-digest', '--package'].includes(arg)) {
|
|
112
|
+
if (flagCounts.get(arg) !== 1) throw new CliUsageError(`${arg} may not repeat`);
|
|
113
|
+
const value = requiredValue(args, i, arg); i++;
|
|
114
|
+
if (arg === '--plan-id') planId = value;
|
|
115
|
+
else if (arg === '--source-digest') sourceDigest = value;
|
|
116
|
+
else if (arg === '--priority') priority = value;
|
|
117
|
+
else if (arg === '--pending-digest') pendingDigest = value;
|
|
118
|
+
else packageSelection = value;
|
|
119
|
+
continue;
|
|
120
|
+
}
|
|
104
121
|
if (arg === "--force") { force = true; continue; }
|
|
105
122
|
if (arg === "--json") { json = true; continue; }
|
|
123
|
+
if (arg === '--native') { native = true; continue; }
|
|
106
124
|
if (arg === "--verbose") { verbose = true; continue; }
|
|
107
125
|
if (arg === "--guided") { guided = true; continue; }
|
|
108
126
|
if (arg === "--details") { details = true; continue; }
|
|
@@ -134,19 +152,13 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
134
152
|
continue;
|
|
135
153
|
}
|
|
136
154
|
|
|
137
|
-
if (arg ===
|
|
155
|
+
if (arg === '--control-dir') {
|
|
138
156
|
const next = requiredValue(args, i, arg);
|
|
139
|
-
if (
|
|
140
|
-
|
|
141
|
-
controlDir = next;
|
|
142
|
-
} else {
|
|
143
|
-
if (!["inspect", "safe"].includes(next)) throw new CliUsageError("--control-migration must be inspect or safe.");
|
|
144
|
-
controlMigration = next;
|
|
145
|
-
}
|
|
146
|
-
i += 1;
|
|
147
|
-
continue;
|
|
157
|
+
if (!isAbsolute(next)) throw new CliUsageError('--control-dir requires an absolute repository path.');
|
|
158
|
+
controlDir = next; i += 1; continue;
|
|
148
159
|
}
|
|
149
160
|
|
|
161
|
+
|
|
150
162
|
if (arg === "--run") {
|
|
151
163
|
runId = requiredValue(args, i, arg);
|
|
152
164
|
i += 1;
|
|
@@ -171,6 +183,16 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
171
183
|
continue;
|
|
172
184
|
}
|
|
173
185
|
|
|
186
|
+
if (["--closure-file", "--outcome", "--successor-run", "--successor-ref", "--confirmation"].includes(arg)) {
|
|
187
|
+
const value = requiredValue(args, i, arg);
|
|
188
|
+
if (arg === "--closure-file") closureFile = resolve(cwd, value);
|
|
189
|
+
else if (arg === "--outcome") closureOutcome = value;
|
|
190
|
+
else if (arg === "--successor-run") successorRun = value;
|
|
191
|
+
else if (arg === "--successor-ref") successorReference = value;
|
|
192
|
+
else closureConfirmation = value;
|
|
193
|
+
i += 1;
|
|
194
|
+
continue;
|
|
195
|
+
}
|
|
174
196
|
if (arg === '--retire-cockpit' || arg === '--restore-cockpit') {
|
|
175
197
|
const value = requiredValue(args, i, arg);
|
|
176
198
|
if (retireCockpit !== undefined || restoreCockpit !== undefined) throw new CliUsageError('Cockpit transition selector may not repeat');
|
|
@@ -335,17 +357,67 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
335
357
|
}
|
|
336
358
|
|
|
337
359
|
if (!target || !resolveCommand(target)) {
|
|
338
|
-
throw new CliUsageError(`Please choose one target: ${supportedCommandNames().join(", ")}.`, { showUsage: true });
|
|
360
|
+
throw new CliUsageError(`${target ? `Unknown command: ${target}. ` : ""}Please choose one target: ${supportedCommandNames().join(", ")}.`, { showUsage: true });
|
|
339
361
|
}
|
|
340
362
|
if (revisionMode && ["--dir", "--run", "--revision", "--operation", "--source-gate", "--evidence", "--preview-digest"].some(flag => flagCounts.get(flag) > 1)) {
|
|
341
363
|
throw new CliUsageError("Source revision identity and evidence flags may not repeat");
|
|
342
364
|
}
|
|
365
|
+
if (documentServer !== undefined && target !== 'render-document') throw new CliUsageError('--server requires render-document');
|
|
366
|
+
if (['project-state', 'operation-status'].includes(target)) {
|
|
367
|
+
const allowed = new Set(['--dir', '--json', '--language', '--lang', ...(target === 'operation-status' ? ['--module'] : [])]);
|
|
368
|
+
if ([...flagCounts].some(([flag, count]) => count !== 1 || !allowed.has(flag)))
|
|
369
|
+
throw new CliUsageError('Project reads accept only unique --dir, --json, --language and operation-status --module selectors.');
|
|
370
|
+
}
|
|
371
|
+
if (documentRequest && target !== 'render-document') throw new CliUsageError('--request requires render-document');
|
|
372
|
+
if (target === 'render-document') {
|
|
373
|
+
const allowed = new Set(['--dir', '--run', '--revision', '--gate', '--presentation', '--server', '--request']);
|
|
374
|
+
if ([...flagCounts].some(([flag, count]) => count !== 1 || !allowed.has(flag)))
|
|
375
|
+
throw new CliUsageError('render-document accepts only unique explicit document selectors and --server.');
|
|
376
|
+
}
|
|
377
|
+
if (target === "run-close" && ["--action", "--run", "--outcome", "--reason", "--successor-run", "--successor-ref", "--closure-file", "--preview-id", "--confirmation"].some(flag => flagCounts.get(flag) > 1)) {
|
|
378
|
+
throw new CliUsageError("run-close fields may not repeat");
|
|
379
|
+
}
|
|
380
|
+
if (target === 'run-close') {
|
|
381
|
+
if (!['preview', 'apply'].includes(recoveryAction)) throw new CliUsageError('run-close requires --action preview or apply.');
|
|
382
|
+
if (successorRun !== undefined && successorReference !== undefined) throw new CliUsageError('Choose one successor kind: --successor-run or --successor-ref.');
|
|
383
|
+
if (recoveryAction === 'preview' && !closureFile && (!runId || !closureOutcome || !stepFields.reason)) throw new CliUsageError('A closure preview requires --run, --outcome and --reason, or --closure-file.');
|
|
384
|
+
if (recoveryAction === 'apply' && (!recoveryPreviewId || !closureConfirmation)) throw new CliUsageError('A closure apply requires --preview-id and the exact --confirmation.');
|
|
385
|
+
}
|
|
343
386
|
if ((retireCockpit !== undefined || restoreCockpit !== undefined)
|
|
344
387
|
&& ['--dir', '--surface', '--scope', '--evidence'].some(flag => flagCounts.get(flag) > 1)) {
|
|
345
388
|
throw new CliUsageError('Cockpit transition identity and evidence flags may not repeat');
|
|
346
389
|
}
|
|
347
390
|
|
|
348
391
|
if (Object.hasOwn(commandGroupRoutes, target) && [...flagCounts.keys()].some(flag => !['--command-file', '--json'].includes(flag))) throw new CliUsageError('Bound command routes accept only --command-file and --json; no overriding envelope fields.');
|
|
392
|
+
if (target === 'planned') {
|
|
393
|
+
const common = ['--dir', '--action', '--json', '--language'];
|
|
394
|
+
const fields = {
|
|
395
|
+
list: [], inspect: ['--plan-id'], create: ['--evidence', '--priority', '--operation'],
|
|
396
|
+
replace: ['--plan-id', '--source-digest', '--evidence', '--operation'],
|
|
397
|
+
start: ['--plan-id', '--source-digest', '--operation'], status: ['--plan-id', '--operation'],
|
|
398
|
+
};
|
|
399
|
+
const allowed = new Set([...common, ...(fields[recoveryAction] ?? [])]);
|
|
400
|
+
if ([...flagCounts].some(([flag, count]) => count !== 1 || !allowed.has(flag)))
|
|
401
|
+
throw new CliUsageError('Planning accepts only the unique fields of its selected action.');
|
|
402
|
+
}
|
|
403
|
+
if (['run-create', 'run-present', 'run-approve', 'run-step', 'run-revise', 'run-close'].includes(target)) {
|
|
404
|
+
const common = ['--dir', '--working-directory', '--language', '--json', '--operation', '--assurance'];
|
|
405
|
+
const bound = ['--run', '--revision'];
|
|
406
|
+
const stepFlags = { ur: ['--title'], route: ['--route', '--reason'], review: ['--decision'], evidence: ['--reason', '--covers'],
|
|
407
|
+
artefact: ['--gate', '--reviewer', '--reviewed', '--update-draft'], closeout: ['--confirmation'] };
|
|
408
|
+
const fields = {
|
|
409
|
+
'run-create': ['--title'], 'run-present': [...bound, '--gate'],
|
|
410
|
+
'run-approve': [...bound, '--gate', '--presentation', '--response'],
|
|
411
|
+
'run-step': [...bound, '--step', '--evidence', ...(stepFlags[runStep] ?? [])],
|
|
412
|
+
'run-revise': [...bound, ...(revisionMode === 'inspect' ? ['--inspect'] : revisionMode
|
|
413
|
+
? ['--' + revisionMode, '--source-gate', '--evidence', ...(revisionMode === 'apply' ? ['--preview-digest', '--confirmation'] : revisionMode === 'recover' ? ['--pending-digest'] : [])]
|
|
414
|
+
: ['--gate', '--confirmation'])],
|
|
415
|
+
'run-close': ['--action', ...(recoveryAction === 'apply' ? ['--preview-id', '--confirmation']
|
|
416
|
+
: closureFile ? ['--closure-file'] : ['--run', '--outcome', '--reason', '--successor-run', '--successor-ref'])],
|
|
417
|
+
};
|
|
418
|
+
const allowed = new Set([...common, ...fields[target]]);
|
|
419
|
+
if ([...flagCounts].some(([flag, count]) => count !== 1 || !allowed.has(flag))) throw new CliUsageError('Current Run commands accept only the unique fields of the selected operation.');
|
|
420
|
+
}
|
|
349
421
|
return {
|
|
350
422
|
kind: "command",
|
|
351
423
|
options: {
|
|
@@ -355,6 +427,7 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
355
427
|
dirInputAbsolute: dirExplicit && isAbsolute(dirInput),
|
|
356
428
|
force,
|
|
357
429
|
json,
|
|
430
|
+
...(native ? { native: true } : {}),
|
|
358
431
|
verbose,
|
|
359
432
|
...(guided ? { guided: true } : {}),
|
|
360
433
|
...(details ? { details: true } : {}),
|
|
@@ -374,7 +447,12 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
374
447
|
tpAction,
|
|
375
448
|
continueDelivery,
|
|
376
449
|
presentationId,
|
|
450
|
+
...(documentServer !== undefined ? { documentServer } : {}),
|
|
451
|
+
...(documentRequest ? { documentRequest: true } : {}),
|
|
377
452
|
...(operationId !== undefined ? { operationId } : {}),
|
|
453
|
+
...(planId !== undefined ? { planId } : {}), ...(sourceDigest !== undefined ? { sourceDigest } : {}),
|
|
454
|
+
...(priority !== undefined ? { priority } : {}), ...(pendingDigest !== undefined ? { pendingDigest } : {}),
|
|
455
|
+
...(packageSelection !== undefined ? { packageSelection } : {}),
|
|
378
456
|
...(assurance !== undefined ? { assurance } : {}),
|
|
379
457
|
...(revisionMode !== undefined ? { revisionMode } : {}),
|
|
380
458
|
...(sourceGate !== undefined ? { sourceGate } : {}),
|
|
@@ -393,6 +471,11 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
393
471
|
recoveryAction,
|
|
394
472
|
recoveryPreviewId,
|
|
395
473
|
recoveryConfirmation,
|
|
474
|
+
...(closureFile !== undefined ? { closureFile } : {}),
|
|
475
|
+
...(closureOutcome !== undefined ? { closureOutcome } : {}),
|
|
476
|
+
...(successorRun !== undefined ? { successorRun } : {}),
|
|
477
|
+
...(successorReference !== undefined ? { successorReference } : {}),
|
|
478
|
+
...(closureConfirmation !== undefined ? { closureConfirmation } : {}),
|
|
396
479
|
stepFields,
|
|
397
480
|
allActive,
|
|
398
481
|
scope,
|
|
@@ -407,7 +490,6 @@ export function parseArgs(argv, dependencies = {}) {
|
|
|
407
490
|
...(restoreCockpit !== undefined ? { restoreCockpit } : {}),
|
|
408
491
|
setupRequest,
|
|
409
492
|
controlDir,
|
|
410
|
-
controlMigration,
|
|
411
493
|
generatorModel,
|
|
412
494
|
maxGeneratedCandidates,
|
|
413
495
|
generationTimeoutMs,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { randomUUID } from 'node:crypto';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { openSync, closeSync, fstatSync, lstatSync, readFileSync, constants } from 'node:fs';
|
|
4
|
+
import { createRunCommandService } from '#agdf-core/control-state/run-command-service.js';
|
|
5
|
+
import { createRunMaterialStore } from '#agdf-core/control-state/run-material.js';
|
|
6
|
+
import { resolveControlCommandTarget } from '#agdf-core/control-state/approval-command-contract.js';
|
|
7
|
+
import { planningId, inspectPlannedEntry, inspectPlannedOperation } from '#agdf-core/control-state/planned-entry.js';
|
|
8
|
+
import { readPlannedInventory } from '#agdf-core/control-state/planned-inventory.js';
|
|
9
|
+
import { pluginDefinition } from './runtime-context.js';
|
|
10
|
+
|
|
11
|
+
function readUr(path) {
|
|
12
|
+
const stat = lstatSync(path);
|
|
13
|
+
if (stat.isSymbolicLink() || !stat.isFile() || stat.size > 131072) throw Error('planned_source_invalid');
|
|
14
|
+
const fd = openSync(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
15
|
+
try {
|
|
16
|
+
const actual = fstatSync(fd);
|
|
17
|
+
if (actual.ino !== stat.ino || actual.dev !== stat.dev || actual.size !== stat.size) throw Error('planned_source_changed');
|
|
18
|
+
const bytes = readFileSync(fd);
|
|
19
|
+
if (bytes.length > 131072) throw Error('planned_source_limit');
|
|
20
|
+
return new TextDecoder('utf-8', { fatal: true }).decode(bytes);
|
|
21
|
+
} finally { closeSync(fd); }
|
|
22
|
+
}
|
|
23
|
+
export function executePlannedCli(options, io = console) {
|
|
24
|
+
const store = createRunMaterialStore();
|
|
25
|
+
try {
|
|
26
|
+
const root = resolveControlCommandTarget(options.dir), action = options.recoveryAction;
|
|
27
|
+
const emit = value => { io.log(JSON.stringify(value, null, 2)); return ['rejected', 'effect_unknown', 'recovery_required'].includes(value.outcome) ? 2 : 0; };
|
|
28
|
+
if (options.target === 'planned' && action === 'list') return emit(readPlannedInventory(root.root));
|
|
29
|
+
if (options.target === 'planned' && action === 'inspect') return emit(inspectPlannedEntry(root.root, options.planId));
|
|
30
|
+
if (action === 'status') return emit(inspectPlannedOperation(root.root, options.planId, options.operationId));
|
|
31
|
+
const operation_id = options.operationId ?? randomUUID();
|
|
32
|
+
const base = { schema_version: '1', presentation_language: options.language?.chat_language ?? 'en', working_directory: root.root,
|
|
33
|
+
primary_target: root.root, target_source: 'explicit_target', target_id: root.target_id, operation_id, assurance: 'cooperative_local' };
|
|
34
|
+
const scope = { plan_id: action === 'create' ? planningId(operation_id) : options.planId, expected_digest: action === 'create' ? null : options.sourceDigest };
|
|
35
|
+
const bound = { ...base, planning: scope };
|
|
36
|
+
if (action === 'start') {
|
|
37
|
+
const entry = inspectPlannedEntry(root.root, scope.plan_id);
|
|
38
|
+
return emit(createRunCommandService({ packageVersion: pluginDefinition.version })('agdf_run', { ...bound, command: { kind: 'run.create_from_planned', payload: { title: entry.title } } }));
|
|
39
|
+
}
|
|
40
|
+
const content = readUr(resolve(options.workingDirectory, options.stepFields.evidence)), bytes = Buffer.from(content);
|
|
41
|
+
const stage = payload => store.stage({ ...bound, operation_id: randomUUID(), command: { kind: 'planned_material.stage', payload } });
|
|
42
|
+
const started = stage({ action: 'begin', files: [{ slot: 'UR', bytes: bytes.length }] });
|
|
43
|
+
if (started.outcome !== 'accepted') return emit(started);
|
|
44
|
+
const transfer_id = started.family_result.transfer_id;
|
|
45
|
+
for (let offset = 0; offset < bytes.length; offset += 16384) {
|
|
46
|
+
const chunk = stage({ action: 'append', transfer_id, file: 0, offset, data: bytes.subarray(offset, offset + 16384).toString('base64') });
|
|
47
|
+
if (chunk.outcome !== 'accepted') return emit(chunk);
|
|
48
|
+
}
|
|
49
|
+
const sealed = stage({ action: 'seal', transfer_id }); if (sealed.outcome !== 'accepted') return emit(sealed);
|
|
50
|
+
const input = { ...bound, command: { kind: `planned_ur.${action}`, payload: { source: sealed.family_result.files[0].reference,
|
|
51
|
+
...(options.priority ? { priority: options.priority } : {}) } } };
|
|
52
|
+
return emit(createRunCommandService({ packageVersion: pluginDefinition.version, materialGrants: store.grants(input) })('agdf_record', input));
|
|
53
|
+
} catch (error) { io.error(error.code ?? error.message); return 1; }
|
|
54
|
+
finally { store.close(); }
|
|
55
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { createCoreServices } from '#agdf-core';
|
|
2
|
+
import { resources, resolveConfiguredChatLanguage } from '../runtime/control-context.js';
|
|
3
|
+
import { cliGitObservation } from '../control-evaluation/git-observation.js';
|
|
4
|
+
|
|
5
|
+
// CLI syntax only. Target confirmation, facts and original-operation semantics
|
|
6
|
+
// stay with the same inspect owner used by MCP.
|
|
7
|
+
export function executeProjectRead(options, io = console) {
|
|
8
|
+
let language = options.language?.chat_language;
|
|
9
|
+
if (!options.languageExplicit) {
|
|
10
|
+
try { language = resolveConfiguredChatLanguage(options.dir); }
|
|
11
|
+
catch { /* Core still reports the invalid configuration and original receipt facts. */ }
|
|
12
|
+
}
|
|
13
|
+
const result = createCoreServices({ resources, observers: { gitObservation: cliGitObservation } }).inspect({
|
|
14
|
+
operation: options.target, workingDirectory: options.dir, targetSource: 'explicit_target', primaryTarget: options.dir,
|
|
15
|
+
presentationLanguage: language,
|
|
16
|
+
expectedVersion: resources.pluginDefinition.version, interactionLocales: resources.interactionLocales,
|
|
17
|
+
...(options.contractModule ? { contractModule: options.contractModule } : {}),
|
|
18
|
+
});
|
|
19
|
+
if (options.json) io.log(JSON.stringify(result, null, 2));
|
|
20
|
+
else {
|
|
21
|
+
const report = result.report;
|
|
22
|
+
io.log(`AGDF ${options.target}: ${report?.status ?? result.outcome}`);
|
|
23
|
+
if (report?.target_id) io.log(`Target: ${report.target_id}`);
|
|
24
|
+
if (report?.operation_id) io.log(`Operation: ${report.operation_id}`);
|
|
25
|
+
if (report?.current_setup) io.log(`Current setup: ${report.current_setup}`);
|
|
26
|
+
if (report?.plan) io.log(`Plan: ${report.plan.file_count} files; ${report.plan.plan_digest}`);
|
|
27
|
+
if (report?.receipt?.receipt_digest) io.log(`Receipt: ${report.receipt.receipt_digest}`);
|
|
28
|
+
if (report?.reason) io.log(`Reason: ${report.reason}`);
|
|
29
|
+
if (report?.recovery?.instruction) io.log(`Recovery: ${report.recovery.instruction}`);
|
|
30
|
+
if (report?.next_calls?.length) io.log(`Next: ${JSON.stringify(report.next_calls)}`);
|
|
31
|
+
if (result.host_action?.text) io.log(result.host_action.text);
|
|
32
|
+
}
|
|
33
|
+
return result.outcome === 'inspect_result' && result.report?.available === true
|
|
34
|
+
&& !['blocked', 'unavailable', 'incomplete'].includes(result.report.status) ? 0 : 2;
|
|
35
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { renderSourceRevision } from '#agdf-core/interaction-presentation.js';
|
|
2
|
+
import { interactionLocales } from './runtime-context.js';
|
|
3
|
+
import { resolveMcpInput } from '#agdf-core/mcp-input-resolution.js';
|
|
4
|
+
import { withInputResolution } from '#agdf-core/control-state/input-resolution.js';
|
|
5
|
+
import { commandGroupDefinition } from '#agdf-core/control-state/run-command-schema.js';
|
|
6
|
+
import { inspectRunInputResolution } from '#agdf-core/control-state/run-input-resolution.js';
|
|
7
|
+
import { randomUUID } from 'node:crypto';
|
|
8
|
+
import { openSync, closeSync, constants, fstatSync, lstatSync, readFileSync } from 'node:fs';
|
|
9
|
+
import { resolve } from 'node:path';
|
|
10
|
+
import { createCoreServices } from '#agdf-core';
|
|
11
|
+
import { createRunMaterialStore } from '#agdf-core/control-state/run-material.js';
|
|
12
|
+
import { resolveControlCommandTarget, digest } from '#agdf-core/control-state/approval-command-contract.js';
|
|
13
|
+
import { canonicalRunText, artefactFileDigest } from '#agdf-core/control-state/run-seal.js';
|
|
14
|
+
import { inspectRunOperation } from '#agdf-core/control-state/run-operation-status.js';
|
|
15
|
+
import { inspectSourceRevision } from '#agdf-core/control-state/run-revision.js';
|
|
16
|
+
import { runDocumentPath } from '#agdf-core/control-state/run-identity.js';
|
|
17
|
+
import { resources } from '../runtime/control-context.js';
|
|
18
|
+
import { cliGitObservation } from '../control-evaluation/git-observation.js';
|
|
19
|
+
|
|
20
|
+
function sourceText(options, limit = 131072) {
|
|
21
|
+
const supplied = options.stepFields?.evidence;
|
|
22
|
+
if (!supplied) throw Error('A bounded source file is required: --evidence <path>.');
|
|
23
|
+
const path = resolve(options.workingDirectory, supplied), before = lstatSync(path);
|
|
24
|
+
if (!before.isFile() || before.isSymbolicLink() || before.size > limit) throw Error('source_invalid');
|
|
25
|
+
const fd = openSync(path, constants.O_RDONLY | (constants.O_NOFOLLOW ?? 0));
|
|
26
|
+
try {
|
|
27
|
+
const stat = fstatSync(fd), bytes = readFileSync(fd);
|
|
28
|
+
if (stat.ino !== before.ino || stat.dev !== before.dev || stat.size !== before.size || bytes.length > limit) throw Error('source_changed');
|
|
29
|
+
return new TextDecoder('utf-8', { fatal: true }).decode(bytes);
|
|
30
|
+
} finally { closeSync(fd); }
|
|
31
|
+
}
|
|
32
|
+
function printResult(result, options, io, identity) {
|
|
33
|
+
if (options.target === 'run-revise' && !options.json) {
|
|
34
|
+
const shown = result.outcome === 'already_applied' ? { ...result, outcome: 'replayed' } : result.family_result ?? result;
|
|
35
|
+
io.log(renderSourceRevision(shown, interactionLocales, options.language.chat_language, identity).markdown);
|
|
36
|
+
} else io.log(JSON.stringify(result, null, 2));
|
|
37
|
+
}
|
|
38
|
+
export function executeRunAlias(options, io = console) {
|
|
39
|
+
const store = createRunMaterialStore();
|
|
40
|
+
try {
|
|
41
|
+
const target = resolveControlCommandTarget(options.dir), fields = options.stepFields ?? {};
|
|
42
|
+
const input = { working_directory: options.workingDirectory, primary_target: target.root,
|
|
43
|
+
target_source: options.dirExplicit ? 'explicit_target' : 'current_repository', target_id: target.target_id,
|
|
44
|
+
operation_id: options.operationId ?? randomUUID(), ...(options.assurance !== undefined ? { assurance: options.assurance } : {}), ...(options.languageExplicit ? { presentation_language: options.language.chat_language } : {}),
|
|
45
|
+
...(options.runId ? { run_id: options.runId, expected_revision_id: options.revisionId } : {}) };
|
|
46
|
+
const services = grants => createCoreServices({ resources, observers: { gitObservation: cliGitObservation, materialGrants: grants } });
|
|
47
|
+
const normalize = (group, original, action) => {
|
|
48
|
+
const selected = resolveMcpInput(commandGroupDefinition(group), original, { defaults: resources.defaults, lookupOriginal: inspectRunInputResolution });
|
|
49
|
+
return withInputResolution(selected.resolution, () => action(selected.arguments), selected.original);
|
|
50
|
+
};
|
|
51
|
+
const emit = result => {
|
|
52
|
+
printResult(result, options, io, { target: target.root, runId: options.runId, operationId: input.operation_id, revisionId: options.revisionId });
|
|
53
|
+
return ['accepted', 'already_applied', 'preview', 'historical', 'recovered'].includes(result.outcome) ? 0 : 2;
|
|
54
|
+
};
|
|
55
|
+
const material = (slot, content) => {
|
|
56
|
+
// The Core digest binds canonical content, not an expiring transfer UUID.
|
|
57
|
+
// A recorded original operation needs no new transfer or stale admission;
|
|
58
|
+
// the Core still checks its exact logical request before acknowledging it.
|
|
59
|
+
const observed = options.runId ? inspectRunOperation(target.root, { runId: options.runId, operationId: input.operation_id, targetId: input.target_id }) : null;
|
|
60
|
+
if (observed?.status === 'recorded') return { material_id: randomUUID(), digest: digest(canonicalRunText(content)) };
|
|
61
|
+
const bytes = Buffer.from(content), stage = payload => normalize('agdf_record', { ...input,
|
|
62
|
+
operation_id: randomUUID(), command: { kind: 'material.stage', payload } }, value => store.stage(value));
|
|
63
|
+
const started = stage({ action: 'begin', files: [{ slot, bytes: bytes.length }] });
|
|
64
|
+
if (started.outcome !== 'accepted') throw Object.assign(Error(started.reason ?? 'material_unavailable'), { result: started });
|
|
65
|
+
const transfer_id = started.family_result.transfer_id;
|
|
66
|
+
for (let offset = 0; offset < bytes.length; offset += 16384) {
|
|
67
|
+
const part = stage({ action: 'append', transfer_id, file: 0, offset, data: bytes.subarray(offset, offset + 16384).toString('base64') });
|
|
68
|
+
if (part.outcome !== 'accepted') throw Object.assign(Error(part.reason ?? 'material_unavailable'), { result: part });
|
|
69
|
+
}
|
|
70
|
+
const sealed = stage({ action: 'seal', transfer_id });
|
|
71
|
+
if (sealed.outcome !== 'accepted') throw Object.assign(Error(sealed.reason ?? 'material_unavailable'), { result: sealed });
|
|
72
|
+
return sealed.family_result.files[0].reference;
|
|
73
|
+
};
|
|
74
|
+
let group, command;
|
|
75
|
+
if (options.target === 'run-create') { group = 'agdf_run'; command = { kind: 'run.create', payload: { title: fields.title } }; }
|
|
76
|
+
else if (options.target === 'run-present') { group = 'agdf_prepare'; command = { kind: 'presentation.prepare', payload: { gate: options.gate } }; }
|
|
77
|
+
else if (options.target === 'run-approve') { group = 'agdf_approve'; command = { kind: 'approval.record', payload: { gate: options.gate, presentation_id: options.presentationId, response: options.response } }; }
|
|
78
|
+
else if (options.target === 'run-step') {
|
|
79
|
+
const step = options.runStep, slot = step === 'artefact' ? options.gate : ({ ur: 'UR', route: 'Brownfield Review', review: 'CR', evidence: 'EVIDENCE', closeout: 'OR' })[step];
|
|
80
|
+
if (!slot) throw Error('step_invalid');
|
|
81
|
+
const source = material(slot, sourceText(options));
|
|
82
|
+
if (step === 'artefact') { group = 'agdf_record'; command = { kind: 'artefact.record', payload: { gate: options.gate, material: source,
|
|
83
|
+
reviewer: fields.reviewer, reviewed: fields.reviewed === 'true', update_draft: fields.updateDraft === 'true' } }; }
|
|
84
|
+
else if (step === 'closeout') { group = 'agdf_closeout'; command = { kind: 'closeout.record', payload: { or: source, confirmation: options.closureConfirmation } }; }
|
|
85
|
+
else { group = 'agdf_record'; command = { kind: 'step.record', payload: { step, source,
|
|
86
|
+
...(step === 'ur' ? { title: fields.title } : step === 'route' ? { reason: fields.reason, route: fields.route }
|
|
87
|
+
: step === 'review' ? { decision: fields.decision } : { reason: fields.reason, covers: fields.covers }) } }; }
|
|
88
|
+
} else if (options.target === 'run-revise') {
|
|
89
|
+
group = 'agdf_revise';
|
|
90
|
+
if (options.revisionMode === 'inspect') return emit(inspectSourceRevision(target.root, { runId: options.runId, operationId: input.operation_id, revisionId: options.revisionId }));
|
|
91
|
+
if (options.revisionMode) command = { kind: `source_revision.${options.revisionMode}`, payload: {
|
|
92
|
+
source_gate: options.sourceGate, proposal: material('EVIDENCE', sourceText(options)),
|
|
93
|
+
...(options.revisionMode === 'apply' ? { preview_digest: options.previewDigest, confirmation: options.closureConfirmation }
|
|
94
|
+
: options.revisionMode === 'recover' ? { recovery_revision_id: options.revisionId, pending_digest: options.pendingDigest } : {}) } };
|
|
95
|
+
else { const path = runDocumentPath(options.runId, 'PRD.md'); command = { kind: 'prd_revision.reopen', payload: {
|
|
96
|
+
prd: { path, digest: artefactFileDigest(target.root, path) }, confirmation: options.closureConfirmation } }; }
|
|
97
|
+
} else if (options.target === 'run-close') {
|
|
98
|
+
delete input.run_id; delete input.expected_revision_id;
|
|
99
|
+
group = 'agdf_closeout';
|
|
100
|
+
const entries = options.closureFile ? JSON.parse(sourceText({ ...options, stepFields: { evidence: options.closureFile } }, 65536)).entries
|
|
101
|
+
: [{ run_id: options.runId, outcome: options.closureOutcome, reason: fields.reason,
|
|
102
|
+
...(options.successorRun ? { successor_run: options.successorRun } : options.successorReference ? { successor_reference: options.successorReference } : {}) }];
|
|
103
|
+
command = { kind: `closure.${options.recoveryAction}`, payload: options.recoveryAction === 'apply'
|
|
104
|
+
? { preview_id: options.recoveryPreviewId, confirmation: options.closureConfirmation } : { entries } };
|
|
105
|
+
} else throw Error('command_unsupported');
|
|
106
|
+
const bound = { ...input, command };
|
|
107
|
+
return emit(normalize(group, bound, value => services(store.grants(value)).command(group, value)));
|
|
108
|
+
} catch (error) {
|
|
109
|
+
const identity = { target: options.dir, runId: options.runId, operationId: options.operationId, revisionId: options.revisionId };
|
|
110
|
+
if (error.result) printResult(error.result, options, io, identity);
|
|
111
|
+
else if (options.target === 'run-revise' && !options.json) printResult({ outcome: 'rejected', reason: error.code ?? error.message }, options, io, identity);
|
|
112
|
+
else io.error(error.code ?? error.message);
|
|
113
|
+
return 2;
|
|
114
|
+
}
|
|
115
|
+
finally { store.close(); }
|
|
116
|
+
}
|
|
@@ -1,60 +1,2 @@
|
|
|
1
|
-
import process from "node:process";
|
|
2
|
-
import {
|
|
3
|
-
canonicalizeLanguageTag,
|
|
4
|
-
} from "#agdf-core/interaction-presentation.js";
|
|
5
|
-
|
|
6
|
-
import { configuredLanguage, interactionLocales } from "../runtime/control-context.js";
|
|
7
1
|
export { packageRoot, generatedRoot, pluginDefinition, interactionLocales, configuredLanguage, resolveConfiguredChatLanguage } from "../runtime/control-context.js";
|
|
8
|
-
|
|
9
|
-
export function canonicalizeDetectedSystemLocale(value) {
|
|
10
|
-
if (typeof value !== "string") return "";
|
|
11
|
-
const candidate = value.trim().split(":", 1)[0];
|
|
12
|
-
if (!candidate || /^(?:C|POSIX)(?:\.|$)/iu.test(candidate)) return "";
|
|
13
|
-
const withoutModifier = candidate.split("@", 1)[0];
|
|
14
|
-
const withoutEncoding = withoutModifier.split(".", 1)[0];
|
|
15
|
-
return canonicalizeLanguageTag(withoutEncoding.replaceAll("_", "-"));
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function detectSystemLocale(env = process.env) {
|
|
19
|
-
const envLocale = env.LC_ALL || env.LC_MESSAGES || env.LANG || env.LANGUAGE || "";
|
|
20
|
-
if (envLocale) return envLocale;
|
|
21
|
-
try {
|
|
22
|
-
return Intl.DateTimeFormat().resolvedOptions().locale || "";
|
|
23
|
-
} catch {
|
|
24
|
-
return "";
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
export function resolveLanguagePreference(explicitLanguage, env = process.env) {
|
|
29
|
-
const explicit = configuredLanguage(explicitLanguage);
|
|
30
|
-
if (explicit) {
|
|
31
|
-
return {
|
|
32
|
-
artifact_language: explicit,
|
|
33
|
-
chat_language: explicit,
|
|
34
|
-
runtime_language: "en",
|
|
35
|
-
source: "parameter",
|
|
36
|
-
detected_locale: detectSystemLocale(env) || "unknown",
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const detectedLocale = detectSystemLocale(env);
|
|
41
|
-
const detectedTag = canonicalizeDetectedSystemLocale(detectedLocale);
|
|
42
|
-
const detected = configuredLanguage(detectedTag) || "en";
|
|
43
|
-
return {
|
|
44
|
-
artifact_language: detected,
|
|
45
|
-
chat_language: detected,
|
|
46
|
-
runtime_language: "en",
|
|
47
|
-
source: detectedLocale ? "system_locale" : "default",
|
|
48
|
-
detected_locale: detectedLocale || "unknown",
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function languageConfigContent(languagePreference) {
|
|
53
|
-
return `${JSON.stringify({
|
|
54
|
-
artifact_language: languagePreference.artifact_language,
|
|
55
|
-
chat_language: languagePreference.chat_language,
|
|
56
|
-
runtime_language: languagePreference.runtime_language,
|
|
57
|
-
source: languagePreference.source,
|
|
58
|
-
detected_locale: languagePreference.detected_locale,
|
|
59
|
-
}, null, 2)}\n`;
|
|
60
|
-
}
|
|
2
|
+
export { canonicalizeDetectedSystemLocale, detectSystemLocale, resolveLanguagePreference, languageConfigContent } from "#agdf-core/resources/language-preference.js";
|