create-agdf 0.20.2 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -191
- package/generated/.agdf/control/README.md +35 -109
- package/generated/.agdf/control/planned-urs.md +95 -0
- package/generated/.agdf/control/templates/BRAND.md +28 -0
- package/generated/.agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/.agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/.agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/.agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/.agents/plugins/marketplace.json +12 -0
- package/generated/.opencode/agdf-agent-router.md +3 -3
- package/generated/.opencode/agdf-interaction-locales.json +2958 -2682
- package/generated/.opencode/contracts/closeout.md +1 -1
- package/generated/.opencode/contracts/control-scaffold.md +63 -46
- package/generated/.opencode/contracts/gate-artifact-preparation.md +64 -48
- package/generated/.opencode/contracts/gate-transition.md +5 -6
- package/generated/.opencode/contracts/interaction.md +52 -129
- package/generated/.opencode/contracts/modes.md +9 -3
- package/generated/.opencode/contracts/prd-definition.md +46 -7
- package/generated/.opencode/contracts/quality.md +45 -2
- package/generated/.opencode/contracts/request-activation.md +14 -10
- package/generated/.opencode/contracts/sd-definition.md +49 -3
- package/generated/.opencode/contracts/task-target-resolution.md +24 -0
- package/generated/.opencode/contracts/tp-definition.md +9 -1
- package/generated/.opencode/contracts/ur-definition.md +50 -12
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-code-review/SKILL.md +5 -3
- package/generated/.opencode/skills/agdf-delivery-closeout/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +35 -31
- package/generated/.opencode/skills/agdf-prd-definition/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-sd-definition/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-tp-definition/SKILL.md +3 -2
- package/generated/.opencode/skills/agdf-ur-definition/SKILL.md +12 -4
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +36 -6
- package/generated/plugins/agdf/.claude-plugin/plugin.json +3 -2
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/companion/assignment.mjs +65 -0
- package/generated/plugins/agdf/companion/companion.json +4 -0
- package/generated/plugins/agdf/companion/events.mjs +117 -0
- package/generated/plugins/agdf/companion/figure.mjs +137 -0
- package/generated/plugins/agdf/companion/gate-bar.mjs +36 -0
- package/generated/plugins/agdf/companion/hooks.json +3 -0
- package/generated/plugins/agdf/companion/localization.mjs +67 -0
- package/generated/plugins/agdf/companion/notice.mjs +92 -0
- package/generated/plugins/agdf/companion/persistence.mjs +36 -0
- package/generated/plugins/agdf/companion/register.mjs +630 -0
- package/generated/plugins/agdf/companion/run-state.mjs +97 -0
- package/generated/plugins/agdf/companion/state.mjs +22 -0
- package/generated/plugins/agdf/companion/view.mjs +129 -0
- package/generated/plugins/agdf/control/README.md +35 -109
- package/generated/plugins/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/agdf/mcp/server/README.md +143 -7
- package/generated/plugins/agdf/mcp/server/package.json +12 -7
- package/generated/plugins/agdf/mcp/server/src/generation-entry.js +3 -85
- package/generated/plugins/agdf/mcp/server/src/generation-protocol.js +2 -44
- package/generated/plugins/agdf/mcp/server/src/generation-runtime.js +103 -0
- package/generated/plugins/agdf/mcp/server/src/generation-thread-entry.js +8 -0
- package/generated/plugins/agdf/mcp/server/src/generation.js +64 -20
- package/generated/plugins/agdf/mcp/server/src/main.js +43 -10
- package/generated/plugins/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/agdf/mcp/server/src/server.js +159 -46
- package/generated/plugins/agdf/mcp/server/src/stdio-output.js +42 -0
- package/generated/plugins/agdf/mcp/server/src/worker-entry.js +2 -2
- package/generated/plugins/agdf/mcp/server/src/worker.js +53 -7
- package/generated/plugins/agdf/mcp/server/ui/cockpit.html +31 -31
- package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
- package/generated/plugins/agdf/mcp/server/ui/decision.html +36 -36
- package/generated/plugins/agdf/mcp/server/ui/manifest.json +4 -4
- package/generated/plugins/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/plugins/agdf/meta/agdf-mcp-capability.json +1 -1
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/agdf/meta/contracts/closeout.md +1 -1
- package/generated/plugins/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/meta/contracts/interaction.md +52 -129
- package/generated/plugins/agdf/meta/contracts/modes.md +9 -3
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/plugins/agdf/meta/contracts/quality.md +45 -2
- package/generated/plugins/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/plugins/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/plugins/agdf/runtime/agdf-session-check.js +25 -21
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +52 -129
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +45 -2
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/codex-document-command.js +195 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +83 -148
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +8 -37
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +101 -16
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/planned-command.js +55 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/project-read-command.js +64 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/run-command-aliases.js +116 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/runtime-context.js +1 -59
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +34 -103
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +7 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-decision-protocol.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +95 -304
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/owner-client.js +79 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +21 -80
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +61 -13
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-owner-protocol.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-protocol-runtime.js +308 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +155 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +22 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-context.js +8 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/package.json +5 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +34 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +54 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +13 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +450 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +22 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/{runtime/core/lib/control-evaluation/backlog-vocabulary.js → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +10 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +195 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-context.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-contract.js +11 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.d.ts +10 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.js +32 -41
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +8 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-work.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +72 -57
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +164 -32
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/decision-session.js +53 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/doctor-observation.js +91 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-operation-call.js +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +49 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/result.js +61 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +15 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +148 -69
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +9 -37
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +25 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +4 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +18 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +68 -17
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/aggregate.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +13 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-layout.js +183 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-contract.js +10 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-service.js +24 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/git-identity.js +86 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/index.js +0 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +101 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +93 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +5 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-closure.js +343 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +40 -251
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +514 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +222 -34
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +42 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +229 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +70 -13
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +92 -35
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +10 -179
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +120 -179
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +56 -35
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +37 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +142 -251
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/{runtime/core/lib/control-state/backlog-summary-shape.js → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.js} +7 -19
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +16 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +11 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +55 -12
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +75 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-schema.js +15 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +33 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/owned-file-lock.js +266 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/owner-placement.js +50 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/configuration.js +92 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +7 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/language-preference.js +59 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +180 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +34 -13
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +87 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +17 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +6 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +66 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +6 -3
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +62 -43
- package/generated/plugins/agdf/scripts/instruction-footprint.mjs +5 -5
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +8 -5
- package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/code-review/SKILL.md +5 -3
- package/generated/plugins/agdf/skills/delivery-closeout/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +35 -31
- package/generated/plugins/agdf/skills/prd-definition/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/qa-gate/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/release-or/SKILL.md +8 -5
- package/generated/plugins/agdf/skills/sd-definition/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/tp-definition/SKILL.md +3 -2
- package/generated/plugins/agdf/skills/ur-definition/SKILL.md +12 -4
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +36 -6
- package/generated/plugins/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/plugins/agdf/submission/openai/availability.md +1 -1
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/plugins/agdf/submission/openai/release-notes.md +9 -1
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +40 -0
- package/generated/plugins/agdf-planning/README.md +21 -0
- package/generated/plugins/agdf-planning/assets/agdf-icon.svg +16 -0
- package/generated/plugins/agdf-planning/assets/agdf-logo.svg +16 -0
- package/generated/plugins/agdf-planning/meta/agdf-planning.definition.json +9 -0
- package/generated/plugins/agdf-planning/plugin.json +45 -0
- package/generated/plugins/agdf-planning/skills/planning/SKILL.md +56 -0
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +1028 -488
- package/generated/plugins/copilot/agdf/control/README.md +35 -109
- package/generated/plugins/copilot/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/copilot/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/copilot/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/copilot/agdf/mcp/server/README.md +143 -7
- package/generated/plugins/copilot/agdf/mcp/server/package.json +12 -7
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-entry.js +3 -85
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-protocol.js +2 -44
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-runtime.js +103 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-thread-entry.js +8 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +64 -20
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +43 -10
- package/generated/plugins/copilot/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +159 -46
- package/generated/plugins/copilot/agdf/mcp/server/src/stdio-output.js +42 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/worker-entry.js +2 -2
- package/generated/plugins/copilot/agdf/mcp/server/src/worker.js +53 -7
- package/generated/plugins/copilot/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/plugins/copilot/agdf/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +25 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +52 -129
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +45 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/codex-document-command.js +195 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +83 -148
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +8 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +101 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/planned-command.js +55 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/project-read-command.js +64 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/run-command-aliases.js +116 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +1 -59
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +34 -103
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +7 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-decision-protocol.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +95 -304
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/owner-client.js +79 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +21 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +61 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-owner-protocol.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-protocol-runtime.js +308 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +155 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +22 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-context.js +8 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +5 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +34 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +54 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +450 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +22 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/generated/plugins/{agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js → copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +10 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +195 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +164 -32
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/doctor-observation.js +91 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-operation-call.js +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +49 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/result.js +61 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +15 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +148 -69
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +9 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +121 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +18 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +68 -17
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/aggregate.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +13 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-layout.js +183 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/git-identity.js +86 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/index.js +0 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +101 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +93 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +5 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-closure.js +343 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +40 -251
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +514 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +222 -34
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +42 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +33 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +229 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +70 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +92 -35
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +10 -179
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +120 -179
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +56 -35
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +37 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +142 -251
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/{backlog-summary-shape.js → run-work-summary-shape.js} +7 -19
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +16 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +11 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +55 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +75 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-schema.js +15 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +33 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/owned-file-lock.js +266 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/owner-placement.js +50 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/configuration.js +92 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +7 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/language-preference.js +59 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +180 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +34 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +87 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +17 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +6 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +66 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +6 -3
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/copilot/agdf/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/plugins/copilot/agdf/skills/agdf-clean-implementation-review/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-code-review/SKILL.md +5 -3
- package/generated/plugins/copilot/agdf/skills/agdf-delivery-closeout/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-delivery-path-search/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-gate-check/SKILL.md +35 -31
- package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -1
- package/generated/plugins/copilot/agdf/skills/agdf-prd-definition/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-qa-gate/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-release-or/SKILL.md +8 -5
- package/generated/plugins/copilot/agdf/skills/agdf-sd-definition/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-task-plan-review/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-tp-definition/SKILL.md +3 -2
- package/generated/plugins/copilot/agdf/skills/agdf-ur-definition/SKILL.md +12 -4
- package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +36 -6
- package/generated/plugins/copilot/agdf/skills/contracts/closeout.md +1 -1
- package/generated/plugins/copilot/agdf/skills/contracts/control-scaffold.md +63 -46
- package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +64 -48
- package/generated/plugins/copilot/agdf/skills/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +52 -129
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +9 -3
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +46 -7
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +45 -2
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +14 -10
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +49 -3
- package/generated/plugins/copilot/agdf/skills/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +9 -1
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +50 -12
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/submissions/openai/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/submissions/openai/agdf/meta/agdf-defaults.json +9 -0
- package/generated/submissions/openai/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +2958 -2682
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +8 -3
- package/generated/submissions/openai/agdf/meta/contracts/closeout.md +1 -1
- package/generated/submissions/openai/agdf/meta/contracts/control-scaffold.md +63 -46
- package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +64 -48
- package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +52 -129
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +9 -3
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +46 -7
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +45 -2
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +14 -10
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +49 -3
- package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +9 -1
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +50 -12
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/submissions/openai/agdf/plugin.json +1 -1
- package/generated/submissions/openai/agdf/skills/brownfield-analysis/SKILL.md +8 -5
- package/generated/submissions/openai/agdf/skills/clean-implementation-review/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +5 -3
- package/generated/submissions/openai/agdf/skills/delivery-closeout/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/delivery-path-search/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/gate-check/SKILL.md +35 -31
- package/generated/submissions/openai/agdf/skills/prd-definition/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/qa-gate/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/release-or/SKILL.md +8 -5
- package/generated/submissions/openai/agdf/skills/sd-definition/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/tp-definition/SKILL.md +3 -2
- package/generated/submissions/openai/agdf/skills/ur-definition/SKILL.md +12 -4
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +36 -6
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +50 -42
- package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +9 -1
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/application.js +31 -43
- package/lib/cli/codex-document-command.js +195 -0
- package/lib/cli/command-registry.js +83 -148
- package/lib/cli/control-maintenance-command.js +8 -37
- package/lib/cli/parse-args.js +101 -16
- package/lib/cli/planned-command.js +55 -0
- package/lib/cli/project-init-command.js +21 -0
- package/lib/cli/project-read-command.js +64 -0
- package/lib/cli/run-command-aliases.js +116 -0
- package/lib/cli/runtime-context.js +1 -59
- package/lib/cli/validation-handlers.js +34 -103
- package/lib/control-evaluation/git-observation.js +7 -5
- package/lib/control-maintenance/startup.js +2 -2
- package/lib/host-adapters/codex/plugin.js +48 -1
- package/lib/install-setup/contract.js +4 -4
- package/lib/install-setup/{control-migration.js → control-compatibility.js} +1 -2
- package/lib/install-setup/interaction.js +0 -1
- package/lib/install-setup/presentation.js +3 -4
- package/lib/install-setup/service.js +5 -18
- package/lib/installers/local-marketplace.js +262 -8
- package/lib/lifecycle/codex-startup-status.js +29 -0
- package/lib/lifecycle/presentation.js +6 -0
- package/lib/mcp-decision-protocol.js +40 -0
- package/lib/mcp-dispatch-runtime.js +95 -304
- package/lib/mcp-lifecycle/adapters/codex-origin-probe.js +28 -4
- package/lib/mcp-lifecycle/evidence.js +2 -1
- package/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/lib/mcp-lifecycle/owner-client.js +79 -0
- package/lib/mcp-lifecycle/package.js +21 -80
- package/lib/mcp-lifecycle/plugin-runtime.js +61 -13
- package/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/lib/mcp-lifecycle/service.js +5 -4
- package/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/lib/mcp-owner-protocol.js +1 -0
- package/lib/mcp-protocol-runtime.js +308 -0
- package/lib/mcp-worker-runtime.js +155 -0
- package/lib/runtime/control-command-service.js +22 -7
- package/lib/runtime/control-context.js +8 -1
- package/lib/runtime/validator-application.js +2 -2
- package/lib/scaffold/canonical-init.js +2 -691
- package/lib/scaffold/plan.js +11 -32
- package/lib/scaffold/presentation.js +2 -2
- package/lib/scaffold/write.js +6 -1
- package/package.json +6 -2
- package/runtime/core/lib/companion/events.js +154 -0
- package/runtime/core/lib/companion/figure-state.js +36 -0
- package/runtime/core/lib/companion/journal.js +180 -0
- package/runtime/core/lib/companion/run-view.js +184 -0
- package/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +34 -8
- package/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/runtime/core/lib/control-evaluation/gate-check.js +54 -15
- package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +13 -0
- package/runtime/core/lib/control-evaluation/gate-policy-pure.js +450 -0
- package/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/runtime/core/lib/control-evaluation/ur-readiness.js +22 -4
- package/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/{generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js → runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/runtime/core/lib/control-inspect/artifact-readiness.js +10 -6
- package/runtime/core/lib/control-inspect/authoring-inputs.js +195 -0
- package/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/runtime/core/lib/control-inspect/cockpit-context.js +2 -1
- package/runtime/core/lib/control-inspect/cockpit-contract.js +11 -4
- package/runtime/core/lib/control-inspect/cockpit-list.d.ts +10 -6
- package/runtime/core/lib/control-inspect/cockpit-list.js +32 -41
- package/runtime/core/lib/control-inspect/cockpit-session.js +8 -8
- package/runtime/core/lib/control-inspect/cockpit-work.js +33 -0
- package/runtime/core/lib/control-inspect/cockpit.js +72 -57
- package/runtime/core/lib/control-inspect/contract.js +164 -32
- package/runtime/core/lib/control-inspect/decision-session.js +53 -11
- package/runtime/core/lib/control-inspect/doctor-observation.js +91 -0
- package/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/runtime/core/lib/control-inspect/project-operation-call.js +5 -0
- package/runtime/core/lib/control-inspect/project-state.js +49 -0
- package/runtime/core/lib/control-inspect/result.js +61 -0
- package/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/runtime/core/lib/control-inspect/selection.js +15 -3
- package/runtime/core/lib/control-inspect/service.js +148 -69
- package/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/runtime/core/lib/control-maintenance/service.js +9 -37
- package/runtime/core/lib/control-read/cockpit-pool.js +25 -9
- package/runtime/core/lib/control-read/cockpit-worker.js +4 -3
- package/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/runtime/core/lib/control-read/fs.js +18 -0
- package/runtime/core/lib/control-read/snapshot.js +68 -17
- package/runtime/core/lib/control-state/aggregate.js +3 -1
- package/runtime/core/lib/control-state/approval-command.js +13 -10
- package/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/runtime/core/lib/control-state/control-layout.js +183 -0
- package/runtime/core/lib/control-state/decision-action-contract.js +10 -1
- package/runtime/core/lib/control-state/decision-action-service.js +24 -3
- package/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/runtime/core/lib/control-state/git-identity.js +86 -0
- package/runtime/core/lib/control-state/index.js +0 -1
- package/runtime/core/lib/control-state/input-resolution.js +101 -0
- package/runtime/core/lib/control-state/material-limits.js +4 -0
- package/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/runtime/core/lib/control-state/presentation-delivery.js +93 -0
- package/runtime/core/lib/control-state/preview-render.js +5 -2
- package/runtime/core/lib/control-state/preview-review.js +3 -2
- package/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/runtime/core/lib/control-state/run-closure.js +343 -0
- package/runtime/core/lib/control-state/run-command-contract.js +40 -251
- package/runtime/core/lib/control-state/run-command-schema.js +514 -0
- package/runtime/core/lib/control-state/run-command-service.js +222 -34
- package/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/runtime/core/lib/control-state/run-identity.js +42 -0
- package/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +33 -0
- package/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/runtime/core/lib/control-state/run-material.js +229 -0
- package/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/runtime/core/lib/control-state/run-operations.js +70 -13
- package/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/runtime/core/lib/control-state/run-presentation-render.js +92 -35
- package/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/runtime/core/lib/control-state/run-recording.js +10 -179
- package/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/runtime/core/lib/control-state/run-revision.js +120 -179
- package/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/runtime/core/lib/control-state/run-seal.js +6 -1
- package/runtime/core/lib/control-state/run-source-revisions.js +56 -35
- package/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/runtime/core/lib/control-state/run-state-reader.js +37 -21
- package/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/runtime/core/lib/control-state/run-steps.js +142 -251
- package/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/{generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js → runtime/core/lib/control-state/run-work-summary-shape.js} +7 -19
- package/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/runtime/core/lib/index.js +16 -6
- package/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/runtime/core/lib/interaction-catalog.js +11 -3
- package/runtime/core/lib/interaction-presentation.js +55 -12
- package/runtime/core/lib/mcp-input-hints.js +75 -0
- package/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/runtime/core/lib/mcp-input-schema.js +15 -0
- package/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/runtime/core/lib/mcp-tool-errors.js +33 -15
- package/runtime/core/lib/owned-file-lock.js +266 -0
- package/runtime/core/lib/owner-placement.js +50 -0
- package/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/runtime/core/lib/resources/configuration.js +92 -0
- package/runtime/core/lib/resources/context.js +7 -11
- package/runtime/core/lib/resources/language-preference.js +59 -0
- package/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/runtime/core/lib/runtime/plugin-provenance.js +180 -18
- package/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/runtime/core/lib/skill-dispatch/contract.js +34 -13
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +14 -6
- package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/runtime/core/lib/skill-dispatch/mcp-continuation.js +87 -0
- package/runtime/core/lib/skill-dispatch/prd-definition.js +17 -7
- package/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/runtime/core/lib/skill-dispatch/sd-definition.js +6 -3
- package/runtime/core/lib/skill-dispatch/service.js +66 -18
- package/runtime/core/lib/skill-dispatch/tp-definition.js +6 -3
- package/generated/.agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/.agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +0 -28
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +0 -4
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/service.js +0 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +0 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-backlog.js +0 -135
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
- package/generated/plugins/copilot/agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/plugins/copilot/agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +0 -28
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +0 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/service.js +0 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +0 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
- package/lib/control-maintenance/interaction.js +0 -28
- package/lib/control-maintenance/repair.js +0 -4
- package/lib/control-maintenance/service.js +0 -3
- package/lib/control-state/run-recovery.js +0 -5
- package/lib/install-setup/control-repair.js +0 -1
- package/runtime/core/lib/control-inspect/cockpit-backlog.js +0 -135
- package/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
|
@@ -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,64 @@
|
|
|
1
|
+
import { createCoreServices } from '#agdf-core';
|
|
2
|
+
import { readRunView } from '#agdf-core/companion/run-view.js';
|
|
3
|
+
import { resources, resolveConfiguredChatLanguage } from '../runtime/control-context.js';
|
|
4
|
+
import { cliGitObservation } from '../control-evaluation/git-observation.js';
|
|
5
|
+
import { RUN_ID_PATTERN } from '#agdf-core/control-state/run-identity.js';
|
|
6
|
+
import { CliUsageError } from './parse-args.js';
|
|
7
|
+
|
|
8
|
+
// An explicit --language wins; otherwise the configured chat language. A configuration that cannot be
|
|
9
|
+
// resolved (unsupported layout, invalid value) must not hide the store diagnosis (PRD AC-002), so the
|
|
10
|
+
// language is left to Core as executeProjectRead does: an unsupported store is reported in `store`,
|
|
11
|
+
// an invalid configuration as the evaluation error of every evaluated run (CR finding CIR-05; both
|
|
12
|
+
// cases are covered by run-view-command-test.js).
|
|
13
|
+
const readLanguage = options => {
|
|
14
|
+
if (options.languageExplicit) return options.language?.chat_language;
|
|
15
|
+
try { return resolveConfiguredChatLanguage(options.dir); } catch { return undefined; }
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// Read-only companion run view (SD SDD-001): the status card fields of every active or unreadable
|
|
19
|
+
// run of one project root plus every run named with --run, versioned run-view/1. Writes nothing.
|
|
20
|
+
// Exit 0 for a complete view, 2 when the store is unavailable or has no control folder.
|
|
21
|
+
export function executeRunView(options, io = console) {
|
|
22
|
+
// A malformed run id is a usage error, never an evaluated run of its own (CR finding C3).
|
|
23
|
+
const invalid = (options.runIds ?? []).find(runId => !RUN_ID_PATTERN.test(runId));
|
|
24
|
+
if (invalid !== undefined) throw new CliUsageError(`run-view --run requires a run id (${RUN_ID_PATTERN}); got ${JSON.stringify(invalid)}.`);
|
|
25
|
+
const view = readRunView(options.dir, { language: readLanguage(options), runIds: options.runIds ?? [] });
|
|
26
|
+
if (options.json) io.log(JSON.stringify(view, null, 2));
|
|
27
|
+
else {
|
|
28
|
+
io.log(`AGDF run-view: ${view.store.status}${view.store.reason ? ` (${view.store.reason})` : ''}`);
|
|
29
|
+
for (const run of view.runs) io.log(`- ${run.run_id}: ${run.evaluated ? `${run.status} · ${run.current_gate} · ${run.next_step_text}` : run.lifecycle ?? 'unreadable'}`);
|
|
30
|
+
}
|
|
31
|
+
return view.store.status === 'ok' ? 0 : 2;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// CLI syntax only. Target confirmation, facts and original-operation semantics
|
|
35
|
+
// stay with the same inspect owner used by MCP.
|
|
36
|
+
export function executeProjectRead(options, io = console) {
|
|
37
|
+
let language = options.language?.chat_language;
|
|
38
|
+
if (!options.languageExplicit) {
|
|
39
|
+
try { language = resolveConfiguredChatLanguage(options.dir); }
|
|
40
|
+
catch { /* Core still reports the invalid configuration and original receipt facts. */ }
|
|
41
|
+
}
|
|
42
|
+
const result = createCoreServices({ resources, observers: { gitObservation: cliGitObservation } }).inspect({
|
|
43
|
+
operation: options.target, workingDirectory: options.dir, targetSource: 'explicit_target', primaryTarget: options.dir,
|
|
44
|
+
presentationLanguage: language,
|
|
45
|
+
expectedVersion: resources.pluginDefinition.version, interactionLocales: resources.interactionLocales,
|
|
46
|
+
...(options.contractModule ? { contractModule: options.contractModule } : {}),
|
|
47
|
+
});
|
|
48
|
+
if (options.json) io.log(JSON.stringify(result, null, 2));
|
|
49
|
+
else {
|
|
50
|
+
const report = result.report;
|
|
51
|
+
io.log(`AGDF ${options.target}: ${report?.status ?? result.outcome}`);
|
|
52
|
+
if (report?.target_id) io.log(`Target: ${report.target_id}`);
|
|
53
|
+
if (report?.operation_id) io.log(`Operation: ${report.operation_id}`);
|
|
54
|
+
if (report?.current_setup) io.log(`Current setup: ${report.current_setup}`);
|
|
55
|
+
if (report?.plan) io.log(`Plan: ${report.plan.file_count} files; ${report.plan.plan_digest}`);
|
|
56
|
+
if (report?.receipt?.receipt_digest) io.log(`Receipt: ${report.receipt.receipt_digest}`);
|
|
57
|
+
if (report?.reason) io.log(`Reason: ${report.reason}`);
|
|
58
|
+
if (report?.recovery?.instruction) io.log(`Recovery: ${report.recovery.instruction}`);
|
|
59
|
+
if (report?.next_calls?.length) io.log(`Next: ${JSON.stringify(report.next_calls)}`);
|
|
60
|
+
if (result.host_action?.text) io.log(result.host_action.text);
|
|
61
|
+
}
|
|
62
|
+
return result.outcome === 'inspect_result' && result.report?.available === true
|
|
63
|
+
&& !['blocked', 'unavailable', 'incomplete'].includes(result.report.status) ? 0 : 2;
|
|
64
|
+
}
|
|
@@ -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";
|
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { executeRunAlias } from './run-command-aliases.js';
|
|
2
|
+
import { executeProjectRead, executeRunView } from './project-read-command.js';
|
|
3
|
+
import { localePack } from '#agdf-core/interaction-presentation.js';
|
|
4
|
+
import { renderCodexDocument } from './codex-document-command.js';
|
|
3
5
|
import { readFileSync, lstatSync, openSync, fstatSync, closeSync, constants } from "node:fs";
|
|
4
6
|
import { commandGroupRoutes } from './command-registry.js';
|
|
5
7
|
import { RUN_COMMAND_LIMITS } from '#agdf-core/control-state/run-command-contract.js';
|
|
6
8
|
import { executeControlMaintenance } from "./control-maintenance-command.js";
|
|
7
|
-
import { createRun } from "#agdf-core/control-state/run-state-repository.js";
|
|
8
|
-
import { extractField } from "#agdf-core/control-evaluation/verified-change.js";
|
|
9
|
-
import { ARTEFACT_TEMPLATE_IDS, resolveArtefactTemplatePath } from "#agdf-core/resources/artefact-templates.js";
|
|
10
|
-
import { prepareRunPresentation } from "#agdf-core/control-state/run-presentation.js";
|
|
11
9
|
import {
|
|
12
10
|
buildStatusCard,
|
|
13
11
|
evaluateGateCheck,
|
|
@@ -19,19 +17,19 @@ import { evaluateDeliveryMap, printDeliveryMapReport } from "#agdf-core/control-
|
|
|
19
17
|
import { evaluateDoctor, printDoctorReport } from "#agdf-core/control-evaluation/doctor.js";
|
|
20
18
|
import { executeDeliveryPathSearch } from "./delivery-path-search-command.js";
|
|
21
19
|
import { resolveTaskTarget } from "#agdf-core/task-target-resolution.js";
|
|
22
|
-
import { renderSkillDispatchRecovery, renderTaskTargetOrientation, renderSourceRevision } from "#agdf-core/interaction-presentation.js";
|
|
20
|
+
import { renderSkillDispatchRecovery, renderTaskTargetOrientation, renderSourceRevision, renderRunInventory } from "#agdf-core/interaction-presentation.js";
|
|
21
|
+
import { readRunInventory } from "#agdf-core/control-state/run-inventory-reader.js";
|
|
22
|
+
import { readWorkInventory } from '#agdf-core/control-state/planned-inventory.js';
|
|
23
|
+
import { readControlLayout, CURRENT_LAYOUT } from '#agdf-core/control-state/control-layout.js';
|
|
24
|
+
import { executePlannedCli } from './planned-command.js';
|
|
23
25
|
import { interactionLocales, pluginDefinition } from "./runtime-context.js";
|
|
24
26
|
import { serializeSkillDispatchResult } from "#agdf-core/skill-dispatch/contract.js";
|
|
25
27
|
import { createCoreServices } from "#agdf-core";
|
|
26
28
|
import { resources } from "../runtime/control-context.js";
|
|
27
|
-
import { approveRunGate, recordRunRevision } from "#agdf-core/control-state/run-recording.js";
|
|
28
|
-
import { reopenPrdRevision, previewSourceRevision, applySourceRevision, inspectSourceRevision, recoverSourceRevision } from "#agdf-core/control-state/run-revision.js";
|
|
29
29
|
import { readRuntimeContract, readSkillRuntimeContracts } from "./contract-command.js";
|
|
30
|
-
import { recordRunStep } from "#agdf-core/control-state/run-steps.js";
|
|
31
|
-
import { policyForRunContent } from "#agdf-core/control-evaluation/run-step-policy.js";
|
|
32
30
|
import { cliGitObservation } from "../control-evaluation/git-observation.js";
|
|
33
31
|
import { resolveRepositoryContext } from "../repository-context.js";
|
|
34
|
-
import {
|
|
32
|
+
import { resolveConfiguredChatLanguage } from "#agdf-core/resources/context.js";
|
|
35
33
|
|
|
36
34
|
const evaluateDoctorWithCliGit = (target, selection) => evaluateDoctor(target, selection, cliGitObservation);
|
|
37
35
|
const evaluateGateWithCliGit = (target, selection) => evaluateGateCheck(target, selection, cliGitObservation);
|
|
@@ -47,6 +45,10 @@ export function createValidationHandlers(io = console) {
|
|
|
47
45
|
readSkillRuntimeContracts,
|
|
48
46
|
} }).dispatch;
|
|
49
47
|
return new Map([
|
|
48
|
+
...['project-state', 'operation-status'].map(name => [name, options => executeProjectRead(options, io)]),
|
|
49
|
+
['run-view', options => executeRunView(options, io)],
|
|
50
|
+
['render-document', options => renderCodexDocument(options)],
|
|
51
|
+
...['run-create', 'run-present', 'run-approve', 'run-step', 'run-revise', 'run-close'].map(name => [name, options => executeRunAlias(options, io)]),
|
|
50
52
|
...Object.entries(commandGroupRoutes).map(([route, group]) => [route, options => {
|
|
51
53
|
let fd;
|
|
52
54
|
try {
|
|
@@ -58,39 +60,14 @@ export function createValidationHandlers(io = console) {
|
|
|
58
60
|
const bytes = readFileSync(fd);
|
|
59
61
|
if (bytes.length > RUN_COMMAND_LIMITS.input_bytes) throw Error('command_file_invalid');
|
|
60
62
|
const input = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes));
|
|
61
|
-
const result = createCoreServices({ resources }).command(group, input);
|
|
63
|
+
const result = createCoreServices({ resources, observers: { gitObservation: cliGitObservation } }).command(group, input);
|
|
62
64
|
io.log(JSON.stringify(result));
|
|
63
65
|
return ['accepted', 'already_applied'].includes(result.outcome) ? 0 : 2;
|
|
64
66
|
} catch (error) { io.error(error.message); return 1; }
|
|
65
67
|
finally { if (fd !== undefined) closeSync(fd); }
|
|
66
68
|
}]),
|
|
67
69
|
["control-maintenance", (options) => executeControlMaintenance(options, io)],
|
|
68
|
-
[
|
|
69
|
-
try {
|
|
70
|
-
const path = createRun(options.dir, options.runId);
|
|
71
|
-
const revisionId = extractField(readFileSync(path, "utf8"), "revision_id");
|
|
72
|
-
io.log(path);
|
|
73
|
-
io.log(`revision_id: ${revisionId}`);
|
|
74
|
-
// The plugin-owned template is the only authoring source; repository scaffold copies are
|
|
75
|
-
// derived references. Run creation itself never fails on template availability.
|
|
76
|
-
let urTemplate = null;
|
|
77
|
-
try { urTemplate = resolveArtefactTemplatePath(ARTEFACT_TEMPLATE_IDS.UR); } catch {}
|
|
78
|
-
const templateSource = urTemplate
|
|
79
|
-
? `the plugin-owned UR template at ${urTemplate}`
|
|
80
|
-
: "the plugin-owned UR template supplied as template_path by the bound ur-definition dispatch";
|
|
81
|
-
io.log(`Next: write .agdf/control/artefacts/${options.runId}/UR.md from ${templateSource}, then record it with run-step --run ${options.runId} --revision ${revisionId} --step ur --title "<short requirement title>".`);
|
|
82
|
-
return 0;
|
|
83
|
-
} catch (error) {
|
|
84
|
-
io.error(error instanceof Error ? error.message : String(error));
|
|
85
|
-
return 1;
|
|
86
|
-
}
|
|
87
|
-
}],
|
|
88
|
-
["run-present", (options) => {
|
|
89
|
-
const result = prepareRunPresentation(options.dir, { runId: options.runId, gate: options.gate,
|
|
90
|
-
revisionId: options.revisionId, language: options.language?.chat_language }, { evaluateGateCheck: evaluateGateWithCliGit });
|
|
91
|
-
io.log(JSON.stringify(result, null, 2));
|
|
92
|
-
return result.outcome === "prepared" ? 0 : 2;
|
|
93
|
-
}],
|
|
70
|
+
['planned', options => executePlannedCli(options, io)],
|
|
94
71
|
["target-check", (options) => {
|
|
95
72
|
const report = resolveTaskTargetWithCliGit({
|
|
96
73
|
targetSource: options.targetSource,
|
|
@@ -138,7 +115,13 @@ export function createValidationHandlers(io = console) {
|
|
|
138
115
|
}],
|
|
139
116
|
["doctor", (options) => {
|
|
140
117
|
const report = evaluateDoctorWithCliGit(options.dir, options);
|
|
141
|
-
|
|
118
|
+
let emptyInventoryText;
|
|
119
|
+
if (report.empty_inventory && !options.json) {
|
|
120
|
+
const language = options.languageExplicit ? options.language.chat_language : resolveConfiguredChatLanguage(options.dir);
|
|
121
|
+
emptyInventoryText = localePack(interactionLocales, language).doctorEmptyInventory?.policyDescription
|
|
122
|
+
.replace('{policy}', String(report.empty_inventory.allow_no_active_runs));
|
|
123
|
+
}
|
|
124
|
+
printDoctorReport(report, options.json, io, { emptyInventoryText });
|
|
142
125
|
return report.status === "block" ? 2 : 0;
|
|
143
126
|
}],
|
|
144
127
|
["gate-check", (options) => {
|
|
@@ -154,6 +137,17 @@ export function createValidationHandlers(io = console) {
|
|
|
154
137
|
if (presentationRendered === false) return 2;
|
|
155
138
|
return report.status === "blocked" ? 2 : 0;
|
|
156
139
|
}],
|
|
140
|
+
["inventory", (options) => {
|
|
141
|
+
const language = options.languageExplicit ? options.language?.chat_language : resolveConfiguredChatLanguage(options.dir);
|
|
142
|
+
if (readControlLayout(options.dir).layout === CURRENT_LAYOUT) {
|
|
143
|
+
const inventory = readWorkInventory(options.dir, { language });
|
|
144
|
+
io.log(options.json ? JSON.stringify(inventory, null, 2) : inventory.entries.map(row => `${row.kind}: ${row.title} · ${row.coverage}`).join('\n'));
|
|
145
|
+
return inventory.state === 'unavailable' ? 2 : 0;
|
|
146
|
+
}
|
|
147
|
+
const inventory = readRunInventory(options.dir, { language });
|
|
148
|
+
io.log(options.json ? JSON.stringify(inventory, null, 2) : renderRunInventory(inventory, interactionLocales, language).markdown);
|
|
149
|
+
return 0;
|
|
150
|
+
}],
|
|
157
151
|
["delivery-map", (options) => {
|
|
158
152
|
const report = evaluateDeliveryMap(options.dir, options, deliveryMapDependencies);
|
|
159
153
|
printDeliveryMapReport(report, options.json, io);
|
|
@@ -168,69 +162,6 @@ export function createValidationHandlers(io = console) {
|
|
|
168
162
|
io.log(options.json ? JSON.stringify({ module: result.module, content: result.content }) : result.content.replace(/\n$/u, ""));
|
|
169
163
|
return 0;
|
|
170
164
|
}],
|
|
171
|
-
["run-update", (options) => {
|
|
172
|
-
const result = recordRunRevision(options.dir, { runId: options.runId, revisionId: options.revisionId });
|
|
173
|
-
io.log(JSON.stringify(result, null, 2));
|
|
174
|
-
return result.outcome === "rejected" ? 2 : 0;
|
|
175
|
-
}],
|
|
176
|
-
["run-revise", (options) => {
|
|
177
|
-
const operation = { preview: previewSourceRevision, apply: applySourceRevision, inspect: inspectSourceRevision, recover: recoverSourceRevision }[options.revisionMode] ?? reopenPrdRevision;
|
|
178
|
-
const result = operation(options.dir, { runId: options.runId, revisionId: options.revisionId,
|
|
179
|
-
operationId: options.operationId, sourceGate: options.sourceGate, evidence: options.stepFields?.evidence, previewDigest: options.previewDigest });
|
|
180
|
-
io.log(options.revisionMode && !options.json ? renderSourceRevision(result, interactionLocales, options.language.chat_language,
|
|
181
|
-
{ ...options, target: options.dir }).markdown : JSON.stringify(result, null, 2));
|
|
182
|
-
return ["rejected", "recovery_required"].includes(result.outcome) ? 2 : 0;
|
|
183
|
-
}],
|
|
184
|
-
["run-step", (options) => {
|
|
185
|
-
const result = recordRunStep(options.dir, {
|
|
186
|
-
runId: options.runId,
|
|
187
|
-
revisionId: options.revisionId,
|
|
188
|
-
step: options.runStep,
|
|
189
|
-
...(options.gate ? { gate: options.gate } : {}),
|
|
190
|
-
...options.stepFields,
|
|
191
|
-
}, { policy: policyForRunContent });
|
|
192
|
-
io.log(JSON.stringify(result, null, 2));
|
|
193
|
-
return result.outcome === "rejected" ? 2 : 0;
|
|
194
|
-
}],
|
|
195
|
-
["run-approve", (options) => {
|
|
196
|
-
let result;
|
|
197
|
-
if (options.assurance !== undefined && options.assurance !== "cooperative_local") {
|
|
198
|
-
result = { schema_version: "1", outcome: "rejected", run_id: options.runId,
|
|
199
|
-
reason: "unsupported_authority", assurance: COOPERATIVE_ASSURANCE };
|
|
200
|
-
} else if (options.operationId !== undefined) {
|
|
201
|
-
result = recordGateApprovalCommand(options.dir, {
|
|
202
|
-
schema_version: "1", action: "record_gate_approval",
|
|
203
|
-
target_id: resolveControlCommandTarget(options.dir).target_id, run_id: options.runId,
|
|
204
|
-
gate: options.gate, expected_revision_id: options.revisionId,
|
|
205
|
-
presentation_id: options.presentationId, response: options.response,
|
|
206
|
-
operation_id: options.operationId, assurance: options.assurance ?? "cooperative_local",
|
|
207
|
-
});
|
|
208
|
-
} else result = { ...approveRunGate(options.dir, {
|
|
209
|
-
runId: options.runId,
|
|
210
|
-
gate: options.gate,
|
|
211
|
-
revisionId: options.revisionId,
|
|
212
|
-
response: options.response,
|
|
213
|
-
presentationId: options.presentationId,
|
|
214
|
-
}, { evaluateGateCheck: evaluateGateWithCliGit }), assurance: COOPERATIVE_ASSURANCE };
|
|
215
|
-
io.log(JSON.stringify(result, null, 2));
|
|
216
|
-
return ["approved", "accepted", "already_applied"].includes(result.outcome) ? 0 : 2;
|
|
217
|
-
}],
|
|
218
|
-
["run-recovery", (options) => {
|
|
219
|
-
try {
|
|
220
|
-
const result = options.recoveryAction === "inspect"
|
|
221
|
-
? inspectRunRecovery(options.dir, options.runId)
|
|
222
|
-
: options.recoveryAction === "preview"
|
|
223
|
-
? previewRunRecovery(options.dir, options.runId)
|
|
224
|
-
: applyRunRecovery(options.dir, { runId: options.runId,
|
|
225
|
-
previewId: options.recoveryPreviewId, confirmation: options.recoveryConfirmation });
|
|
226
|
-
io.log(JSON.stringify(result, null, 2));
|
|
227
|
-
return 0;
|
|
228
|
-
} catch (error) {
|
|
229
|
-
io.log(JSON.stringify({ schema_version: "1", outcome: "blocked", run_id: options.runId,
|
|
230
|
-
action: options.recoveryAction, reason: error instanceof Error ? error.message : String(error) }, null, 2));
|
|
231
|
-
return 2;
|
|
232
|
-
}
|
|
233
|
-
}],
|
|
234
165
|
["delivery-path-search", async (options) => {
|
|
235
166
|
try {
|
|
236
167
|
const result = await executeDeliveryPathSearch(options, io);
|
package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { execFileSync } from "node:child_process";
|
|
2
|
+
const readOnlyOptions = ['--no-optional-locks', '-c', 'core.fsmonitor=false'];
|
|
2
3
|
|
|
3
4
|
export function gitPathList(targetDir, args, exec = execFileSync) {
|
|
4
5
|
try {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
if (![JSON.stringify(['diff', 'HEAD', '--name-only']), JSON.stringify(['ls-files', '--others', '--exclude-standard'])].includes(JSON.stringify(args))) return null;
|
|
7
|
+
const fixed = args[0] === 'diff' ? ['diff', '--no-ext-diff', '--no-textconv', ...args.slice(1)] : args;
|
|
8
|
+
const bytes = exec("git", [...readOnlyOptions, ...fixed, '-z'], { cwd: targetDir, encoding: 'buffer', stdio: ["ignore", "pipe", "ignore"], timeout: 3000, maxBuffer: 2 * 1024 * 1024 });
|
|
9
|
+
return new TextDecoder('utf-8', { fatal: true }).decode(bytes).split('\0').filter(item => item.length > 0);
|
|
9
10
|
} catch {
|
|
10
11
|
return null;
|
|
11
12
|
}
|
|
@@ -13,7 +14,8 @@ export function gitPathList(targetDir, args, exec = execFileSync) {
|
|
|
13
14
|
|
|
14
15
|
export function gitValue(targetDir, args, exec = execFileSync) {
|
|
15
16
|
try {
|
|
16
|
-
|
|
17
|
+
if (![JSON.stringify(['rev-parse', 'HEAD']), JSON.stringify(['rev-parse', '--show-toplevel'])].includes(JSON.stringify(args))) return null;
|
|
18
|
+
return exec("git", [...readOnlyOptions, ...args], { cwd: targetDir, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"], timeout: 3000, maxBuffer: 2 * 1024 * 1024 }).trim();
|
|
17
19
|
} catch {
|
|
18
20
|
return null;
|
|
19
21
|
}
|
package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/startup.js
CHANGED
|
@@ -20,6 +20,6 @@ export function inspectStartupCompatibility({ target, executable, validator, env
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
export function startupMaintenanceInvocation(facts, { executable, validator, language = "en" }) {
|
|
23
|
-
if (!["
|
|
24
|
-
return { executable, argv: [validator, "control-maintenance", "--dir", facts.target, "--
|
|
23
|
+
if (!["unsupported", "repair_required", "unavailable"].includes(facts.status)) return null;
|
|
24
|
+
return { executable, argv: [validator, "control-maintenance", "--dir", facts.target, "--language", language], authorizes: false };
|
|
25
25
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { RUN_COMMAND_GROUPS, RUN_COMMAND_LIMITS } from '#agdf-core/control-state/run-command-schema.js';
|
|
2
|
+
|
|
3
|
+
// Optional UI composition is deliberately outside the default headless import
|
|
4
|
+
// closure. Full and thin UI fronts share this one structural contract.
|
|
5
|
+
const unwrapped = () => { throw Object.assign(Error('generation_unavailable'), { code: 'generation_unavailable', dispatch: 'not_dispatched' }); };
|
|
6
|
+
|
|
7
|
+
import { decisionActionDefinition, validateDecisionAction, DECISION_VIEW_DEFINITION, validateDecisionView } from '#agdf-core/control-state/decision-action-contract.js';
|
|
8
|
+
import { COCKPIT_READ_DEFINITION, parseCockpitArguments } from '#agdf-core/control-inspect/cockpit-contract.js';
|
|
9
|
+
|
|
10
|
+
export function composeMcpDecisionProtocol({ runtime, ui, prepared = unwrapped, open = unwrapped, read = unwrapped, action = unwrapped, close = () => {} } = {}) {
|
|
11
|
+
const groups = runtime.trustedContext.commandGroups;
|
|
12
|
+
const facade = decisionActionDefinition(groups);
|
|
13
|
+
const tools = [...runtime.tools];
|
|
14
|
+
if (groups.includes('agdf_prepare')) tools.push({ name: DECISION_VIEW_DEFINITION.name, definition: DECISION_VIEW_DEFINITION, requiresUi: true, parentOwned: true,
|
|
15
|
+
parse: input => { if (validateDecisionView(input).length) throw Error('decision_schema_invalid'); return input; },
|
|
16
|
+
execute: async (input, signal, host) => {
|
|
17
|
+
const remembered = prepared(input);
|
|
18
|
+
if (!remembered) return { schema_version: '1', outcome: 'rejected', reason: 'delivery_state_unavailable', authorizes: false };
|
|
19
|
+
const opened = await open(remembered.input, remembered.result, host);
|
|
20
|
+
return { schema_version: '1', outcome: opened._meta ? 'accepted' : 'rejected', reason: opened.app_reason ?? null,
|
|
21
|
+
app_capability: opened.app_capability, authorizes: false, ...(opened._meta ? { _meta: opened._meta } : {}) };
|
|
22
|
+
}, serialize: JSON.stringify });
|
|
23
|
+
tools.push({ name: COCKPIT_READ_DEFINITION.name, definition: COCKPIT_READ_DEFINITION, requiresUi: true, parentOwned: true,
|
|
24
|
+
parse: parseCockpitArguments, execute: (input, signal, host) => read(input, signal, host), serialize: value => JSON.stringify(value) });
|
|
25
|
+
if (facade) tools.push({ name: facade.name, definition: facade, requiresUi: true, parentOwned: true,
|
|
26
|
+
parse: input => { if (validateDecisionAction(input, facade.inputSchema.properties.action.enum).length) throw Error('decision_schema_invalid'); return input; },
|
|
27
|
+
execute: (input, signal, host) => action(input, host), serialize: value => JSON.stringify(value) });
|
|
28
|
+
const bytes = tools.filter(tool => Object.hasOwn(RUN_COMMAND_GROUPS, tool.name) || tool.name === facade?.name || tool.name === DECISION_VIEW_DEFINITION.name)
|
|
29
|
+
.reduce((sum, tool) => sum + Buffer.byteLength(JSON.stringify(tool.definition)), 0);
|
|
30
|
+
if (bytes > RUN_COMMAND_LIMITS.aggregate_definition_bytes) { void close(); throw Error('command_aggregate_definition_budget_exceeded'); }
|
|
31
|
+
return Object.freeze({ ...runtime, tools: Object.freeze(tools), ui, mode: 'decision',
|
|
32
|
+
tool: name => tools.find(tool => tool.name === name) ?? null,
|
|
33
|
+
failure(code, name, input, dispatch) {
|
|
34
|
+
return name === 'agdf_decision_action' ? { schema_version: '1', outcome: dispatch?.dispatch === 'not_dispatched' ? 'rejected' : 'effect_unknown',
|
|
35
|
+
reason: code, operation_id: input?.operation_id ?? null, authorizes: false, recovery: 'Inspect the original UUID; do not infer non-execution or submit another decision.' }
|
|
36
|
+
: ['agdf_cockpit_read', 'agdf_decision_view'].includes(name) ? { schema_version: '1', outcome: 'rejected', reason: code, authorizes: false } : runtime.failure(code, name, input, dispatch);
|
|
37
|
+
},
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|