create-agdf 0.20.2 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -191
- package/generated/.agdf/control/README.md +31 -110
- package/generated/.agdf/control/planned-urs.md +95 -0
- package/generated/.agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/.agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/.agents/plugins/marketplace.json +12 -0
- package/generated/.opencode/agdf-agent-router.md +3 -3
- package/generated/.opencode/agdf-interaction-locales.json +2668 -2682
- package/generated/.opencode/contracts/closeout.md +1 -1
- package/generated/.opencode/contracts/control-scaffold.md +63 -46
- package/generated/.opencode/contracts/gate-artifact-preparation.md +58 -48
- package/generated/.opencode/contracts/gate-transition.md +5 -6
- package/generated/.opencode/contracts/interaction.md +43 -126
- package/generated/.opencode/contracts/modes.md +4 -3
- package/generated/.opencode/contracts/prd-definition.md +6 -6
- package/generated/.opencode/contracts/quality.md +10 -2
- package/generated/.opencode/contracts/request-activation.md +9 -8
- package/generated/.opencode/contracts/sd-definition.md +3 -3
- package/generated/.opencode/contracts/task-target-resolution.md +24 -0
- package/generated/.opencode/contracts/tp-definition.md +1 -1
- package/generated/.opencode/contracts/ur-definition.md +41 -7
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +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 +5 -4
- package/generated/plugins/agdf/.claude-plugin/plugin.json +3 -2
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/companion/assignment.mjs +65 -0
- package/generated/plugins/agdf/companion/companion.json +4 -0
- package/generated/plugins/agdf/companion/core.mjs +16 -0
- package/generated/plugins/agdf/companion/figure.mjs +137 -0
- package/generated/plugins/agdf/companion/gate-bar.mjs +54 -0
- package/generated/plugins/agdf/companion/hooks.json +3 -0
- package/generated/plugins/agdf/companion/locales.json +200 -0
- package/generated/plugins/agdf/companion/localization.mjs +89 -0
- package/generated/plugins/agdf/companion/notice.mjs +90 -0
- package/generated/plugins/agdf/companion/persistence.mjs +36 -0
- package/generated/plugins/agdf/companion/register.mjs +444 -0
- package/generated/plugins/agdf/companion/run-state.mjs +110 -0
- package/generated/plugins/agdf/companion/state.mjs +48 -0
- package/generated/plugins/agdf/companion/view.mjs +84 -0
- package/generated/plugins/agdf/control/README.md +31 -110
- package/generated/plugins/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/agdf/mcp/server/README.md +119 -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 +94 -0
- package/generated/plugins/agdf/mcp/server/src/generation-thread-entry.js +8 -0
- package/generated/plugins/agdf/mcp/server/src/generation.js +64 -20
- package/generated/plugins/agdf/mcp/server/src/main.js +42 -10
- package/generated/plugins/agdf/mcp/server/src/server.js +24 -15
- 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 +2668 -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 +58 -48
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/meta/contracts/interaction.md +43 -126
- package/generated/plugins/agdf/meta/contracts/modes.md +4 -3
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/plugins/agdf/meta/contracts/quality.md +10 -2
- package/generated/plugins/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +3 -3
- package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +1 -1
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +41 -7
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/plugins/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/plugins/agdf/runtime/agdf-session-check.js +25 -21
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2668 -2682
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +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 +58 -48
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +43 -126
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +4 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +10 -2
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +3 -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 +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +41 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/codex-document-command.js +195 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +82 -148
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +8 -37
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +98 -16
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/planned-command.js +55 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/project-read-command.js +35 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/run-command-aliases.js +116 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/runtime-context.js +1 -59
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +33 -103
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +7 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-decision-protocol.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +71 -306
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/owner-client.js +79 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +14 -80
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +29 -9
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-owner-protocol.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-protocol-runtime.js +308 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +152 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +22 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-context.js +8 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/package.json +5 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +10 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +10 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +446 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +7 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/{runtime/core/lib/control-evaluation/backlog-vocabulary.js → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +110 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-context.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-contract.js +11 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.d.ts +10 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.js +32 -41
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +8 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-work.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +75 -44
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +124 -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/project-operation-call.js +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +48 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/result.js +61 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +119 -67
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +9 -37
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +25 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +4 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +18 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +68 -17
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/aggregate.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +13 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-layout.js +183 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-contract.js +10 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-service.js +24 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/git-identity.js +86 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/index.js +0 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +99 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +90 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +5 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-closure.js +343 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +33 -250
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +508 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +198 -34
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +31 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +211 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +70 -13
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +8 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +10 -179
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +84 -161
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +19 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +27 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +136 -248
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/{runtime/core/lib/control-state/backlog-summary-shape.js → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.js} +7 -19
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +14 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +29 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +46 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-schema.js +15 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +31 -15
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/owned-file-lock.js +266 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/owner-placement.js +50 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/configuration.js +92 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +7 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/language-preference.js +59 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +173 -18
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +28 -9
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +11 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +64 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +14 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +49 -14
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +2 -1
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +60 -42
- package/generated/plugins/agdf/scripts/instruction-footprint.mjs +5 -5
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +8 -5
- package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +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 +5 -4
- package/generated/plugins/agdf/submission/openai/availability.md +1 -1
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/plugins/agdf/submission/openai/release-notes.md +9 -1
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +40 -0
- package/generated/plugins/agdf-planning/README.md +21 -0
- package/generated/plugins/agdf-planning/assets/agdf-icon.svg +16 -0
- package/generated/plugins/agdf-planning/assets/agdf-logo.svg +16 -0
- package/generated/plugins/agdf-planning/meta/agdf-planning.definition.json +9 -0
- package/generated/plugins/agdf-planning/plugin.json +45 -0
- package/generated/plugins/agdf-planning/skills/planning/SKILL.md +56 -0
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +878 -475
- package/generated/plugins/copilot/agdf/control/README.md +31 -110
- package/generated/plugins/copilot/agdf/control/planned-urs.md +95 -0
- package/generated/plugins/copilot/agdf/control/templates/RUN_STATE.md +15 -64
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UR.md +1 -1
- package/generated/plugins/copilot/agdf/mcp/server/README.md +119 -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 +94 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-thread-entry.js +8 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +64 -20
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +42 -10
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +24 -15
- 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 +7 -0
- package/generated/plugins/copilot/agdf/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +25 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.json +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2668 -2682
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +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 +58 -48
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +43 -126
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +4 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +10 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +3 -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 +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +41 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/codex-document-command.js +195 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +82 -148
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +8 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +98 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/planned-command.js +55 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/project-read-command.js +35 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/run-command-aliases.js +116 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +1 -59
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +33 -103
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +7 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-decision-protocol.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +71 -306
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +3 -24
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +31 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-runtime.js +29 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-thread-entry.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/owner-client.js +79 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +14 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +29 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-owner-protocol.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-protocol-runtime.js +308 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +152 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +22 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-context.js +8 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +5 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +10 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +10 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +446 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +7 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/generated/plugins/{agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js → copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +110 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +124 -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/project-operation-call.js +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +48 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/result.js +61 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +119 -67
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +9 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +121 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +18 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +68 -17
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/aggregate.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +13 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-layout.js +183 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/git-identity.js +86 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/index.js +0 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +99 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +90 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +5 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-closure.js +343 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +33 -250
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +508 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +198 -34
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +31 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +211 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +70 -13
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +8 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +10 -179
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +84 -161
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +19 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +27 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +136 -248
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/{backlog-summary-shape.js → run-work-summary-shape.js} +7 -19
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +14 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +29 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +46 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-schema.js +15 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +31 -15
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/owned-file-lock.js +266 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/owner-placement.js +50 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/configuration.js +92 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +7 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/language-preference.js +59 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +173 -18
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +28 -9
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +11 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +64 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +14 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +49 -14
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/copilot/agdf/skills/agdf-brownfield-analysis/SKILL.md +8 -5
- package/generated/plugins/copilot/agdf/skills/agdf-clean-implementation-review/SKILL.md +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 +5 -4
- package/generated/plugins/copilot/agdf/skills/contracts/closeout.md +1 -1
- package/generated/plugins/copilot/agdf/skills/contracts/control-scaffold.md +63 -46
- package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +58 -48
- package/generated/plugins/copilot/agdf/skills/contracts/gate-transition.md +5 -6
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +43 -126
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +4 -3
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +6 -6
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +10 -2
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +9 -8
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +3 -3
- package/generated/plugins/copilot/agdf/skills/contracts/task-target-resolution.md +24 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +1 -1
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +41 -7
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/submissions/openai/agdf/meta/agdf-agent-router.md +3 -3
- package/generated/submissions/openai/agdf/meta/agdf-defaults.json +9 -0
- package/generated/submissions/openai/agdf/meta/agdf-defaults.schema.json +20 -0
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +2668 -2682
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +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 +58 -48
- package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +5 -6
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +43 -126
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +4 -3
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +6 -6
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +10 -2
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +9 -8
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +3 -3
- package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +24 -0
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +1 -1
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +41 -7
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +7 -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 +5 -4
- package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +49 -41
- package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +9 -1
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/application.js +31 -43
- package/lib/cli/codex-document-command.js +195 -0
- package/lib/cli/command-registry.js +82 -148
- package/lib/cli/control-maintenance-command.js +8 -37
- package/lib/cli/parse-args.js +98 -16
- package/lib/cli/planned-command.js +55 -0
- package/lib/cli/project-init-command.js +21 -0
- package/lib/cli/project-read-command.js +35 -0
- package/lib/cli/run-command-aliases.js +116 -0
- package/lib/cli/runtime-context.js +1 -59
- package/lib/cli/validation-handlers.js +33 -103
- package/lib/control-evaluation/git-observation.js +7 -5
- package/lib/control-maintenance/startup.js +2 -2
- package/lib/host-adapters/codex/plugin.js +48 -1
- package/lib/install-setup/contract.js +4 -4
- package/lib/install-setup/{control-migration.js → control-compatibility.js} +1 -2
- package/lib/install-setup/interaction.js +0 -1
- package/lib/install-setup/presentation.js +3 -4
- package/lib/install-setup/service.js +5 -18
- package/lib/installers/local-marketplace.js +262 -8
- package/lib/lifecycle/codex-startup-status.js +29 -0
- package/lib/lifecycle/presentation.js +6 -0
- package/lib/mcp-decision-protocol.js +40 -0
- package/lib/mcp-dispatch-runtime.js +71 -306
- 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 +14 -80
- package/lib/mcp-lifecycle/plugin-runtime.js +29 -9
- package/lib/mcp-lifecycle/service.js +5 -4
- package/lib/mcp-lifecycle/thread-owner.js +164 -0
- package/lib/mcp-owner-protocol.js +1 -0
- package/lib/mcp-protocol-runtime.js +308 -0
- package/lib/mcp-worker-runtime.js +152 -0
- package/lib/runtime/control-command-service.js +22 -7
- package/lib/runtime/control-context.js +8 -1
- package/lib/runtime/validator-application.js +2 -2
- package/lib/scaffold/canonical-init.js +2 -691
- package/lib/scaffold/plan.js +9 -32
- package/lib/scaffold/presentation.js +2 -2
- package/lib/scaffold/write.js +6 -1
- package/package.json +6 -2
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +10 -2
- package/runtime/core/lib/control-evaluation/decision-content-placeholder.js +9 -0
- package/runtime/core/lib/control-evaluation/decision-content-readiness.js +2 -7
- package/runtime/core/lib/control-evaluation/definition-sources.js +3 -2
- package/runtime/core/lib/control-evaluation/delivery-map.js +2 -12
- package/runtime/core/lib/control-evaluation/doctor.js +162 -172
- package/runtime/core/lib/control-evaluation/gate-check.js +10 -9
- package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +11 -0
- package/runtime/core/lib/control-evaluation/gate-policy-pure.js +446 -0
- package/runtime/core/lib/control-evaluation/gate-policy.js +3 -434
- package/runtime/core/lib/control-evaluation/next-action.js +2 -0
- package/runtime/core/lib/control-evaluation/parent-reconciliation.js +2 -1
- package/runtime/core/lib/control-evaluation/qa-follow-up.js +2 -1
- package/runtime/core/lib/control-evaluation/required-files.js +9 -7
- package/runtime/core/lib/control-evaluation/run-state-policy.js +1 -1
- package/runtime/core/lib/control-evaluation/run-state.js +15 -9
- package/runtime/core/lib/control-evaluation/run-step-policy.js +2 -1
- package/runtime/core/lib/control-evaluation/run-work-summary.js +6 -4
- package/runtime/core/lib/control-evaluation/shared-value.js +7 -0
- package/runtime/core/lib/control-evaluation/shared.js +5 -254
- package/runtime/core/lib/control-evaluation/tp-planning.js +3 -2
- package/runtime/core/lib/control-evaluation/ur-readiness.js +7 -2
- package/runtime/core/lib/control-evaluation/verified-change.js +11 -9
- package/{generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js → runtime/core/lib/control-evaluation/work-vocabulary.js} +2 -2
- package/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/runtime/core/lib/control-inspect/authoring-inputs.js +110 -0
- package/runtime/core/lib/control-inspect/cockpit-archive.js +53 -0
- package/runtime/core/lib/control-inspect/cockpit-context.js +2 -1
- package/runtime/core/lib/control-inspect/cockpit-contract.js +11 -4
- package/runtime/core/lib/control-inspect/cockpit-list.d.ts +10 -6
- package/runtime/core/lib/control-inspect/cockpit-list.js +32 -41
- package/runtime/core/lib/control-inspect/cockpit-session.js +8 -8
- package/runtime/core/lib/control-inspect/cockpit-work.js +33 -0
- package/runtime/core/lib/control-inspect/cockpit.js +75 -44
- package/runtime/core/lib/control-inspect/contract.js +124 -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/project-operation-call.js +5 -0
- package/runtime/core/lib/control-inspect/project-state.js +48 -0
- package/runtime/core/lib/control-inspect/result.js +61 -0
- package/runtime/core/lib/control-inspect/selection.js +9 -3
- package/runtime/core/lib/control-inspect/service.js +119 -67
- package/runtime/core/lib/control-maintenance/compatibility.js +42 -132
- package/runtime/core/lib/control-maintenance/contract.js +5 -5
- package/runtime/core/lib/control-maintenance/presentation.js +27 -119
- package/runtime/core/lib/control-maintenance/service.js +9 -37
- package/runtime/core/lib/control-read/cockpit-pool.js +25 -9
- package/runtime/core/lib/control-read/cockpit-worker.js +4 -3
- package/runtime/core/lib/control-read/doctor-reader.js +92 -0
- package/runtime/core/lib/control-read/doctor-worker.js +11 -0
- package/runtime/core/lib/control-read/fs.js +18 -0
- package/runtime/core/lib/control-read/snapshot.js +68 -17
- package/runtime/core/lib/control-state/aggregate.js +3 -1
- package/runtime/core/lib/control-state/approval-command.js +13 -10
- package/runtime/core/lib/control-state/approval-operations.js +10 -7
- package/runtime/core/lib/control-state/artefact-binding-proof.js +12 -20
- package/runtime/core/lib/control-state/artefact-bindings.js +10 -7
- package/runtime/core/lib/control-state/canonical-initialization.js +761 -0
- package/runtime/core/lib/control-state/control-layout.js +183 -0
- package/runtime/core/lib/control-state/decision-action-contract.js +10 -1
- package/runtime/core/lib/control-state/decision-action-service.js +24 -3
- package/runtime/core/lib/control-state/decision-material-contract.js +2 -1
- package/runtime/core/lib/control-state/evidence-bindings.js +7 -7
- package/runtime/core/lib/control-state/git-identity.js +86 -0
- package/runtime/core/lib/control-state/index.js +0 -1
- package/runtime/core/lib/control-state/input-resolution.js +99 -0
- package/runtime/core/lib/control-state/planned-entry.js +273 -0
- package/runtime/core/lib/control-state/planned-handoff.js +174 -0
- package/runtime/core/lib/control-state/planned-inventory.js +90 -0
- package/runtime/core/lib/control-state/planned-origin-reader.js +48 -0
- package/runtime/core/lib/control-state/planned-origin.js +40 -0
- package/runtime/core/lib/control-state/presentation-decision.js +12 -7
- package/runtime/core/lib/control-state/presentation-delivery.js +90 -0
- package/runtime/core/lib/control-state/preview-render.js +5 -2
- package/runtime/core/lib/control-state/preview-review.js +3 -2
- package/runtime/core/lib/control-state/preview-snapshot.js +9 -6
- package/runtime/core/lib/control-state/recording-formats.js +12 -16
- package/runtime/core/lib/control-state/run-artefact-recording.js +54 -66
- package/runtime/core/lib/control-state/run-closure.js +343 -0
- package/runtime/core/lib/control-state/run-command-contract.js +33 -250
- package/runtime/core/lib/control-state/run-command-schema.js +508 -0
- package/runtime/core/lib/control-state/run-command-service.js +198 -34
- package/runtime/core/lib/control-state/run-create-command.js +60 -0
- package/runtime/core/lib/control-state/run-identity.d.ts +14 -0
- package/runtime/core/lib/control-state/run-identity.js +40 -0
- package/runtime/core/lib/control-state/run-input-resolution.js +72 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +31 -0
- package/runtime/core/lib/control-state/run-inventory.js +179 -0
- package/runtime/core/lib/control-state/run-material.js +211 -0
- package/runtime/core/lib/control-state/run-mutation.js +51 -0
- package/runtime/core/lib/control-state/run-operation-identity.js +2 -1
- package/runtime/core/lib/control-state/run-operation-proof.js +7 -4
- package/runtime/core/lib/control-state/run-operation-status.js +20 -4
- package/runtime/core/lib/control-state/run-operations.js +70 -13
- package/runtime/core/lib/control-state/run-owned-outputs.js +21 -9
- package/runtime/core/lib/control-state/run-presentation-envelope.js +25 -33
- package/runtime/core/lib/control-state/run-presentation-render.js +8 -7
- package/runtime/core/lib/control-state/run-presentation.js +45 -21
- package/runtime/core/lib/control-state/run-recording.js +10 -179
- package/runtime/core/lib/control-state/run-revision-boundary.js +7 -21
- package/runtime/core/lib/control-state/run-revision-history.js +23 -16
- package/runtime/core/lib/control-state/run-revision.js +84 -161
- package/runtime/core/lib/control-state/run-seal-compute.js +19 -44
- package/runtime/core/lib/control-state/run-seal.js +6 -1
- package/runtime/core/lib/control-state/run-source-revisions.js +19 -18
- package/runtime/core/lib/control-state/run-state-document.js +110 -42
- package/runtime/core/lib/control-state/run-state-edits.js +13 -5
- package/runtime/core/lib/control-state/run-state-parser.js +14 -6
- package/runtime/core/lib/control-state/run-state-reader.js +27 -18
- package/runtime/core/lib/control-state/run-state-repository.js +112 -48
- package/runtime/core/lib/control-state/run-state-resolver.js +12 -15
- package/runtime/core/lib/control-state/run-state-writer.js +21 -377
- package/runtime/core/lib/control-state/run-step-pending.js +2 -1
- package/runtime/core/lib/control-state/run-step-transaction.js +125 -114
- package/runtime/core/lib/control-state/run-steps.js +136 -248
- package/runtime/core/lib/control-state/run-store-inspection.js +14 -2
- package/runtime/core/lib/control-state/run-verified-change.js +81 -0
- package/runtime/core/lib/control-state/run-work-summary-shape.d.ts +1 -0
- package/{generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js → runtime/core/lib/control-state/run-work-summary-shape.js} +7 -19
- package/runtime/core/lib/delivery-continuation/service.js +5 -66
- package/runtime/core/lib/delivery-path-search/persistence.js +26 -8
- package/runtime/core/lib/delivery-path-search/state-adapter.js +1 -1
- package/runtime/core/lib/index.js +14 -6
- package/runtime/core/lib/interaction-catalog.js +3 -3
- package/runtime/core/lib/interaction-presentation.js +29 -11
- package/runtime/core/lib/mcp-input-hints.js +46 -0
- package/runtime/core/lib/mcp-input-resolution.js +98 -0
- package/runtime/core/lib/mcp-input-schema.js +15 -0
- package/runtime/core/lib/mcp-resource-contract.js +1 -1
- package/runtime/core/lib/mcp-tool-errors.js +31 -15
- package/runtime/core/lib/owned-file-lock.js +266 -0
- package/runtime/core/lib/owner-placement.js +50 -0
- package/runtime/core/lib/resources/canonical-init-plan.js +34 -0
- package/runtime/core/lib/resources/configuration.js +92 -0
- package/runtime/core/lib/resources/context.js +7 -11
- package/runtime/core/lib/resources/language-preference.js +59 -0
- package/runtime/core/lib/runtime/mcp-owner-protocol.js +102 -0
- package/runtime/core/lib/runtime/plugin-provenance.js +173 -18
- package/runtime/core/lib/skill-dispatch/compact-continuation.js +3 -3
- package/runtime/core/lib/skill-dispatch/contract.js +28 -9
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +11 -5
- package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +6 -10
- package/runtime/core/lib/skill-dispatch/mcp-continuation.js +64 -0
- package/runtime/core/lib/skill-dispatch/prd-definition.js +14 -5
- package/runtime/core/lib/skill-dispatch/sd-definition.js +2 -1
- package/runtime/core/lib/skill-dispatch/service.js +49 -14
- package/runtime/core/lib/skill-dispatch/tp-definition.js +2 -1
- package/generated/.agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/.agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +0 -28
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +0 -4
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/service.js +0 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +0 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-backlog.js +0 -135
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
- package/generated/plugins/copilot/agdf/control/templates/AGDF_RUN.md +0 -139
- package/generated/plugins/copilot/agdf/control/templates/MASTER_BACKLOG.md +0 -39
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +0 -28
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +0 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/service.js +0 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +0 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
- package/lib/control-maintenance/interaction.js +0 -28
- package/lib/control-maintenance/repair.js +0 -4
- package/lib/control-maintenance/service.js +0 -3
- package/lib/control-state/run-recovery.js +0 -5
- package/lib/install-setup/control-repair.js +0 -1
- package/runtime/core/lib/control-inspect/cockpit-backlog.js +0 -135
- package/runtime/core/lib/control-maintenance/interaction.js +0 -57
- package/runtime/core/lib/control-maintenance/migration.js +0 -85
- package/runtime/core/lib/control-maintenance/repair.js +0 -226
- package/runtime/core/lib/control-state/backlog-summary-shape.d.ts +0 -4
- package/runtime/core/lib/control-state/backlog-summary.js +0 -67
- package/runtime/core/lib/control-state/legacy-migration.js +0 -69
- package/runtime/core/lib/control-state/legacy-projection-reader.js +0 -38
- package/runtime/core/lib/control-state/run-backlog-writer.js +0 -80
- package/runtime/core/lib/control-state/run-backlog.js +0 -90
- package/runtime/core/lib/control-state/run-recovery.js +0 -296
- package/runtime/core/lib/control-state/run-relationship-correction.js +0 -74
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { isRunOwnedDataPath } from '#agdf-core/control-state/run-identity.js';
|
|
2
|
+
import { ownerPlacement, assertOwnerPlacement } from '#agdf-core/owner-placement.js';
|
|
3
|
+
import { fsyncDirectory } from '#agdf-core/owned-file-lock.js';
|
|
4
|
+
import { randomUUID } from 'node:crypto';
|
|
1
5
|
import { CODEX_REGISTRATION_REVISION, codexLocalInstallVersion, isCodexLocalInstallVersion, marketplaceEntries as codexMarketplaceEntries } from "../host-adapters/codex/identity.js";
|
|
2
6
|
import { marketplaceEntries as claudeMarketplaceEntries } from "../host-adapters/claude/marketplace.js";
|
|
3
7
|
export { CODEX_REGISTRATION_REVISION, codexLocalInstallVersion, isCodexLocalInstallVersion } from "../host-adapters/codex/identity.js";
|
|
@@ -55,7 +59,12 @@ function rootIdentity(path) {
|
|
|
55
59
|
}
|
|
56
60
|
|
|
57
61
|
function assertTransactionBackupIdentity(path, transaction) {
|
|
58
|
-
if (
|
|
62
|
+
if (transaction.schema_version === 2) {
|
|
63
|
+
const stable = path.endsWith('.backup') ? path.slice(0, -7) : path;
|
|
64
|
+
try { assertOwnerPlacement(transaction.previous_root_identity, path, 'marketplace-publication', stable); }
|
|
65
|
+
catch (cause) { throw new Error(`AGDF marketplace backup identity changed: ${path}`, { cause }); }
|
|
66
|
+
if (digestDirectory(path) !== transaction.previous_root_digest) throw Error('AGDF_MARKETPLACE_PRIOR_BYTES_CHANGED');
|
|
67
|
+
} else if (rootIdentity(path) !== transaction.previous_root_identity || !transaction.previous_root_identity) {
|
|
59
68
|
throw new Error(`AGDF marketplace backup identity changed: ${path}`);
|
|
60
69
|
}
|
|
61
70
|
}
|
|
@@ -447,11 +456,21 @@ function recoverInterruptedTransaction(stableRoot, stageRoot, backupRoot, failed
|
|
|
447
456
|
const parent = dirname(stableRoot);
|
|
448
457
|
const transaction = existsSync(transactionPath)
|
|
449
458
|
? readOptionalJson(transactionPath) : null;
|
|
450
|
-
if (
|
|
459
|
+
if (transaction?.phase === 'legacy_settlement') {
|
|
460
|
+
if (transaction.legacy_settlement?.step !== 'completed') throw Error('AGDF_LEGACY_SETTLEMENT_RECOVERY_REQUIRED');
|
|
461
|
+
validateLegacySettlement(transaction, stableRoot, failedRoot);
|
|
462
|
+
if (existsSync(failedRoot) || existsSync(backupRoot) || existsSync(stageRoot)) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
463
|
+
rmSync(transactionPath); fsyncDirectory(parent);
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
if (existsSync(transactionPath) && (![1, 2].includes(transaction?.schema_version)
|
|
451
467
|
|| transaction.owner !== "create-agdf" || !["prepared", "committed", "cockpit_qualification_pending"].includes(transaction.phase)
|
|
452
468
|
|| typeof transaction.plugin_digest !== "string" || typeof transaction.version !== "string"
|
|
453
469
|
|| typeof transaction.profile_id !== "string"
|
|
454
|
-
|| (transaction.previous_root_identity !== null && typeof transaction.previous_root_identity !== "string")
|
|
470
|
+
|| (transaction.schema_version === 1 && transaction.previous_root_identity !== null && typeof transaction.previous_root_identity !== "string")
|
|
471
|
+
|| (transaction.schema_version === 2 && transaction.previous_root_identity !== null
|
|
472
|
+
&& (!transaction.previous_root_identity || transaction.previous_root_identity.role !== 'marketplace-publication'
|
|
473
|
+
|| !/^[a-f0-9]{64}$/.test(transaction.previous_root_digest))))) {
|
|
455
474
|
throw new Error(`Invalid AGDF marketplace transaction marker: ${transactionPath}`);
|
|
456
475
|
}
|
|
457
476
|
if (transaction?.phase === 'cockpit_qualification_pending') {
|
|
@@ -484,7 +503,10 @@ function recoverInterruptedTransaction(stableRoot, stageRoot, backupRoot, failed
|
|
|
484
503
|
renameSyncWithRetry(backupRoot, stableRoot);
|
|
485
504
|
if (existsSync(failedRoot)) removeOwnedRoot(failedRoot, parent);
|
|
486
505
|
} else if (transaction?.phase === "prepared" && existsSync(stableRoot)) {
|
|
487
|
-
|
|
506
|
+
const isPrevious = transaction.schema_version === 2 && transaction.previous_root_identity !== null
|
|
507
|
+
? (() => { try { assertTransactionBackupIdentity(stableRoot, transaction); return true; } catch { return false; } })()
|
|
508
|
+
: rootIdentity(stableRoot) === transaction.previous_root_identity;
|
|
509
|
+
if (!isPrevious) {
|
|
488
510
|
if (transaction.previous_root_identity !== null) {
|
|
489
511
|
throw new Error(`AGDF marketplace prior backup missing: ${backupRoot}`);
|
|
490
512
|
}
|
|
@@ -673,13 +695,14 @@ function prepareLocalMarketplaceFromSource({
|
|
|
673
695
|
}
|
|
674
696
|
|
|
675
697
|
const transaction = {
|
|
676
|
-
schema_version:
|
|
698
|
+
schema_version: 2,
|
|
677
699
|
owner: "create-agdf",
|
|
678
700
|
phase: "prepared",
|
|
679
701
|
profile_id: profileId,
|
|
680
702
|
version: expectedVersion,
|
|
681
703
|
plugin_digest: pluginDigest,
|
|
682
|
-
previous_root_identity:
|
|
704
|
+
previous_root_identity: existsSync(stableRoot) ? ownerPlacement(stableRoot, 'marketplace-publication') : null,
|
|
705
|
+
previous_root_digest: existsSync(stableRoot) ? digestDirectory(stableRoot) : null,
|
|
683
706
|
};
|
|
684
707
|
atomicWrite(transactionPath, `${JSON.stringify(transaction)}\n`);
|
|
685
708
|
if (existsSync(stableRoot)) renameSyncWithRetry(stableRoot, backupRoot);
|
|
@@ -763,6 +786,8 @@ function prepareLocalMarketplaceFromSource({
|
|
|
763
786
|
}
|
|
764
787
|
|
|
765
788
|
export function prepareLocalMarketplace(options = {}) {
|
|
789
|
+
if (options.packageSelection === 'planning') return preparePlanningMarketplace(options);
|
|
790
|
+
if (options.packageSelection !== undefined && options.packageSelection !== 'core') throw Error('AGDF_PACKAGE_SELECTION_INVALID');
|
|
766
791
|
if (!options.snapshotSource) return prepareLocalMarketplaceFromSource(options);
|
|
767
792
|
if (Object.hasOwn(options, "codexInstallVersion")) {
|
|
768
793
|
throw new Error("AGDF snapshot preparation owns the Codex local install version.");
|
|
@@ -789,6 +814,82 @@ export function prepareLocalMarketplace(options = {}) {
|
|
|
789
814
|
}
|
|
790
815
|
}
|
|
791
816
|
|
|
817
|
+
// The known skill-only extension shares source capture and publication primitives
|
|
818
|
+
// with Core. Content-addressed roots are immutable: updating the native catalog
|
|
819
|
+
// never replaces a Core installation, and no second runtime is assembled here.
|
|
820
|
+
export function inspectPlanningMarketplace(root) {
|
|
821
|
+
if (!isAbsolute(root) || realpathSync(root) !== resolve(root)) throw Error('AGDF_PLANNING_MARKETPLACE_UNSAFE');
|
|
822
|
+
const marker = readJson(join(root, OWNERSHIP_FILE), 'planning marketplace ownership');
|
|
823
|
+
const pluginRoot = join(root, 'plugins/agdf-planning');
|
|
824
|
+
const names = readdirSync(root).sort();
|
|
825
|
+
if (names.join() !== '.agdf-owned.json,.agents,plugins' || readdirSync(join(root, 'plugins')).join() !== 'agdf-planning'
|
|
826
|
+
|| readdirSync(join(root, '.agents')).join() !== 'plugins' || readdirSync(join(root, '.agents/plugins')).join() !== 'marketplace.json') throw Error('AGDF_PLANNING_MARKETPLACE_UNCONFIRMED');
|
|
827
|
+
if (Object.keys(marker).sort().join() !== 'canonical_version,kind,owner,plugin_digest,schema_version,source_digest,version'
|
|
828
|
+
|| marker.schema_version !== 1 || marker.owner !== 'create-agdf' || marker.kind !== 'planning-marketplace'
|
|
829
|
+
|| !/^[a-f0-9]{64}$/u.test(marker.source_digest ?? '') || digestDirectory(pluginRoot) !== marker.plugin_digest
|
|
830
|
+
|| typeof marker.canonical_version !== 'string' || !isCodexLocalInstallVersion(marker.canonical_version, marker.version, marker.source_digest)
|
|
831
|
+
|| JSON.stringify(readJson(join(root, '.agents/plugins/marketplace.json'), 'planning marketplace')) !== JSON.stringify(planningCatalog()))
|
|
832
|
+
throw Error('AGDF_PLANNING_MARKETPLACE_UNCONFIRMED');
|
|
833
|
+
validatePlanningSource(pluginRoot, marker.version);
|
|
834
|
+
return { ...marker, root, pluginRoot };
|
|
835
|
+
}
|
|
836
|
+
function planningCatalog() {
|
|
837
|
+
return { name: 'agdf-planning', interface: { displayName: 'AGDF Planning' }, plugins: [{ name: 'agdf-planning',
|
|
838
|
+
source: { source: 'local', path: './plugins/agdf-planning' }, policy: { installation: 'AVAILABLE', authentication: 'ON_INSTALL' }, category: 'Productivity' }] };
|
|
839
|
+
}
|
|
840
|
+
function validatePlanningSource(root, expectedVersion) {
|
|
841
|
+
const manifest = readJson(join(root, 'plugin.json'), 'planning portable manifest');
|
|
842
|
+
const native = readJson(join(root, '.codex-plugin/plugin.json'), 'planning Codex manifest');
|
|
843
|
+
const definition = readJson(join(root, 'meta/agdf-planning.definition.json'), 'planning definition');
|
|
844
|
+
if (manifest.name !== 'agdf-planning' || manifest.version !== expectedVersion || native.name !== manifest.name || native.version !== manifest.version
|
|
845
|
+
|| definition.core_capability?.schema !== 'planned-ur-v1' || definition.core_capability.protocol_version !== 1
|
|
846
|
+
|| definition.core_capability.authoring_owner !== 'ur-definition' || native.mcpServers || native.hooks
|
|
847
|
+
|| !existsSync(join(root, 'skills/planning/SKILL.md'))) throw Error('AGDF_PLANNING_PACKAGE_INVALID');
|
|
848
|
+
const visit = directory => {
|
|
849
|
+
for (const name of readdirSync(directory)) {
|
|
850
|
+
const path = join(directory, name), stat = lstatSync(path);
|
|
851
|
+
if (stat.isSymbolicLink() || !stat.isDirectory() && !stat.isFile() || stat.isFile() && stat.size > 131072
|
|
852
|
+
|| ['runtime', 'mcp', 'hooks', 'control', 'templates', 'mcp.json', '.mcp.json'].includes(name)) throw Error('AGDF_PLANNING_PACKAGE_INVALID');
|
|
853
|
+
if (stat.isDirectory()) visit(path);
|
|
854
|
+
}
|
|
855
|
+
};
|
|
856
|
+
visit(root);
|
|
857
|
+
}
|
|
858
|
+
export function preparePlanningMarketplace({ dataRoot = defaultAgdfDataRoot(), expectedVersion = pluginDefinition.version,
|
|
859
|
+
planningRoot = join(generatedRoot, 'plugins/agdf-planning') } = {}) {
|
|
860
|
+
validatePlanningSource(planningRoot, expectedVersion);
|
|
861
|
+
const snapshot = captureLocalPluginSnapshot({ builtPluginRoot: planningRoot, expectedVersion, profileId: 'planning',
|
|
862
|
+
adapters: { digest: digestDirectory } });
|
|
863
|
+
try {
|
|
864
|
+
mkdirSync(resolve(dataRoot), { recursive: true });
|
|
865
|
+
const parent = join(realpathSync(resolve(dataRoot)), 'marketplaces', 'agdf-planning');
|
|
866
|
+
mkdirSync(parent, { recursive: true });
|
|
867
|
+
if (realpathSync(parent) !== parent) throw Error('AGDF_PLANNING_MARKETPLACE_UNSAFE');
|
|
868
|
+
const root = join(parent, snapshot.sourceDigest), version = snapshot.codexInstallVersion;
|
|
869
|
+
return withOwnedFileLock(join(parent, '.publication'), () => {
|
|
870
|
+
if (existsSync(root)) {
|
|
871
|
+
const known = inspectPlanningMarketplace(root);
|
|
872
|
+
if (known.source_digest !== snapshot.sourceDigest || known.version !== version) throw Error('AGDF_PLANNING_MARKETPLACE_UNCONFIRMED');
|
|
873
|
+
} else {
|
|
874
|
+
const stage = mkdtempSync(join(parent, '.stage-')), pluginRoot = join(stage, 'plugins/agdf-planning');
|
|
875
|
+
cpSync(snapshot.pluginRoot, pluginRoot, { recursive: true });
|
|
876
|
+
if (digestDirectory(pluginRoot) !== snapshot.sourceDigest) throw localInstallSourceUnstable('planning-copy');
|
|
877
|
+
for (const path of ['plugin.json', '.codex-plugin/plugin.json']) {
|
|
878
|
+
const file = join(pluginRoot, path); writeJson(file, { ...readJson(file, 'planning manifest'), version });
|
|
879
|
+
}
|
|
880
|
+
writeJson(join(stage, '.agents/plugins/marketplace.json'), planningCatalog());
|
|
881
|
+
writeJson(join(stage, OWNERSHIP_FILE), { schema_version: 1, owner: 'create-agdf', kind: 'planning-marketplace',
|
|
882
|
+
source_digest: snapshot.sourceDigest, plugin_digest: digestDirectory(pluginRoot), version, canonical_version: expectedVersion });
|
|
883
|
+
inspectPlanningMarketplace(stage); fsyncDirectory(stage);
|
|
884
|
+
renameSyncWithRetry(stage, root); fsyncDirectory(parent);
|
|
885
|
+
}
|
|
886
|
+
const known = inspectPlanningMarketplace(root);
|
|
887
|
+
return Object.freeze({ ...known, codexInstallVersion: version, sourceDigest: snapshot.sourceDigest, digest: known.plugin_digest,
|
|
888
|
+
changed: false, commit() {}, rollback() {} });
|
|
889
|
+
});
|
|
890
|
+
} finally { snapshot.cleanup(); }
|
|
891
|
+
}
|
|
892
|
+
|
|
792
893
|
export function prepareCopilotMarketplace(options = {}) {
|
|
793
894
|
const { codexInstallVersion, ...copilotOptions } = options;
|
|
794
895
|
return prepareLocalMarketplace({
|
|
@@ -974,7 +1075,7 @@ export function settleCodexCockpitPublication({ pluginRoot, target, sourceDigest
|
|
|
974
1075
|
const transactionPath = `${stableRoot}.transaction.json`, backupRoot = `${stableRoot}.backup`, failedRoot = `${stableRoot}.failed`;
|
|
975
1076
|
return withOwnedFileLock(`${stableRoot}.cockpit-settle`, () => {
|
|
976
1077
|
const transaction = readOptionalJson(transactionPath);
|
|
977
|
-
if (transaction?.schema_version
|
|
1078
|
+
if (![1, 2].includes(transaction?.schema_version) || transaction.owner !== 'create-agdf' || transaction.profile_id !== 'runtime-plugin'
|
|
978
1079
|
|| transaction.phase !== 'cockpit_qualification_pending' || transaction.cockpit_target !== target
|
|
979
1080
|
|| transaction.source_digest !== sourceDigest) throw Error('AGDF_COCKPIT_SETTLEMENT_CONFLICT');
|
|
980
1081
|
if (action === 'rollback' && transaction.previous_source_digest !== previousSourceDigest
|
|
@@ -1009,7 +1110,7 @@ export function settleCodexCockpitPublication({ pluginRoot, target, sourceDigest
|
|
|
1009
1110
|
throw Error('AGDF_COCKPIT_FINAL_EVIDENCE_REQUIRED');
|
|
1010
1111
|
for (const ref of finalEvidence.evidence) {
|
|
1011
1112
|
const path = resolve(target, ref.path);
|
|
1012
|
-
if (!
|
|
1113
|
+
if (!isRunOwnedDataPath(relative(target, path).split('\\').join('/')) || digest(path) !== ref.digest)
|
|
1013
1114
|
throw Error('AGDF_COCKPIT_FINAL_EVIDENCE_REQUIRED');
|
|
1014
1115
|
}
|
|
1015
1116
|
const runtime = inspectMcpExecutableRoot({ root: finalEvidence.runtime_root, expectedVersion: transaction.version });
|
|
@@ -1043,3 +1144,156 @@ export function settleCodexCockpitPublication({ pluginRoot, target, sourceDigest
|
|
|
1043
1144
|
return { status: 'restored', source_digest: transaction.previous_source_digest };
|
|
1044
1145
|
});
|
|
1045
1146
|
}
|
|
1147
|
+
|
|
1148
|
+
// Explicit compatibility recovery for an original schema-1 publication whose
|
|
1149
|
+
// mount-session device number changed. Automatic schema-1 predicates stay exact.
|
|
1150
|
+
const settlementHash = value => createHash('sha256').update(value).digest('hex');
|
|
1151
|
+
function settlementFile(path, limit = 65536) {
|
|
1152
|
+
let stat;
|
|
1153
|
+
try { stat = lstatSync(path); } catch (error) { if (error.code === 'ENOENT') return null; throw error; }
|
|
1154
|
+
if (!stat.isFile() || stat.isSymbolicLink() || stat.nlink !== 1 || stat.size > limit || realpathSync(path) !== resolve(path))
|
|
1155
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_UNSAFE');
|
|
1156
|
+
return readFileSync(path);
|
|
1157
|
+
}
|
|
1158
|
+
function settlementPaths({ pluginRoot, target, hostHome = homedir() }) {
|
|
1159
|
+
if (!isAbsolute(pluginRoot ?? '') || !isAbsolute(target ?? '') || realpathSync(target) !== target || !isAbsolute(hostHome))
|
|
1160
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_INPUT_INVALID');
|
|
1161
|
+
const stable = dirname(dirname(pluginRoot));
|
|
1162
|
+
if (join(stable, 'plugins', MARKETPLACE_ID) !== pluginRoot) throw Error('AGDF_LEGACY_SETTLEMENT_INPUT_INVALID');
|
|
1163
|
+
return { stable, backup: stable + '.backup', failed: stable + '.failed', stage: stable + '.stage',
|
|
1164
|
+
journal: stable + '.transaction.json', configurations: [...new Set([join(target, '.codex/config.toml'), join(hostHome, '.codex/config.toml')])] };
|
|
1165
|
+
}
|
|
1166
|
+
function configurationSnapshot(paths) {
|
|
1167
|
+
return paths.map(path => { const bytes = settlementFile(path, 4 * 1024 ** 2); return { path, digest: bytes === null ? null : settlementHash(bytes) }; });
|
|
1168
|
+
}
|
|
1169
|
+
function settlementWitness(reference, target) {
|
|
1170
|
+
if (!reference || !isAbsolute(reference.path ?? '') || !/^sha256:[a-f0-9]{64}$/.test(reference.digest ?? '')
|
|
1171
|
+
|| !(pathInside(join(target, 'probe-results'), reference.path) || isRunOwnedDataPath(relative(target, reference.path).split('\\').join('/'))))
|
|
1172
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_WITNESS_REQUIRED');
|
|
1173
|
+
const bytes = settlementFile(reference.path);
|
|
1174
|
+
if (!bytes || 'sha256:' + settlementHash(bytes) !== reference.digest) throw Error('AGDF_LEGACY_SETTLEMENT_WITNESS_CHANGED');
|
|
1175
|
+
const value = JSON.parse(bytes);
|
|
1176
|
+
if (value.kind !== 'isolated_update_prerequisite_preview' || value.live_mutation !== false
|
|
1177
|
+
|| !['stable', 'backup', 'transaction'].every(k => /^[a-f0-9]{64}$/.test(value.before?.[k] ?? '') && value.before[k] === value.after?.[k]))
|
|
1178
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_WITNESS_REQUIRED');
|
|
1179
|
+
return value;
|
|
1180
|
+
}
|
|
1181
|
+
export function inspectLegacyCodexCockpitSettlement(options = {}) {
|
|
1182
|
+
const paths = settlementPaths(options), bytes = settlementFile(paths.journal), transaction = bytes && JSON.parse(bytes);
|
|
1183
|
+
if (transaction?.schema_version !== 1 || transaction.owner !== 'create-agdf' || transaction.profile_id !== 'runtime-plugin'
|
|
1184
|
+
|| transaction.phase !== 'cockpit_qualification_pending' || transaction.cockpit_target !== options.target
|
|
1185
|
+
|| transaction.source_digest !== options.sourceDigest || transaction.previous_source_digest !== options.previousSourceDigest
|
|
1186
|
+
|| !/^[1-9][0-9]*:[1-9][0-9]*$/.test(transaction.previous_root_identity ?? '')
|
|
1187
|
+
|| existsSync(paths.failed) || existsSync(paths.stage)) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1188
|
+
const witness = settlementWitness(options.witness, options.target);
|
|
1189
|
+
if (JSON.stringify(witness.live_transition) !== JSON.stringify(transaction)
|
|
1190
|
+
|| witness.before.transaction !== settlementHash(bytes) || witness.before.stable !== digestDirectory(paths.stable)
|
|
1191
|
+
|| witness.before.backup !== digestDirectory(paths.backup)) throw Error('AGDF_LEGACY_SETTLEMENT_WITNESS_CHANGED');
|
|
1192
|
+
assertTransactionStablePayload(paths.stable, transaction);
|
|
1193
|
+
const prior = ownership(paths.backup);
|
|
1194
|
+
if (prior.source_digest !== transaction.previous_source_digest || digestDirectory(join(paths.backup, 'plugins', MARKETPLACE_ID)) !== prior.plugin_digest)
|
|
1195
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1196
|
+
const binding = ownerPlacement(paths.backup, 'marketplace-publication', paths.stable);
|
|
1197
|
+
if (binding.directory_ino !== transaction.previous_root_identity.split(':')[1]) throw Error('AGDF_LEGACY_SETTLEMENT_PRIOR_REPLACED');
|
|
1198
|
+
const body = { schema_version: 1, kind: 'legacy_publication_settlement_preview', action: 'rollback', target: options.target,
|
|
1199
|
+
paths, source_digest: transaction.source_digest, previous_source_digest: transaction.previous_source_digest,
|
|
1200
|
+
original_journal_digest: settlementHash(bytes), original_identity: transaction.previous_root_identity,
|
|
1201
|
+
current_identity: rootIdentity(paths.backup), previous_binding: binding,
|
|
1202
|
+
current_binding: ownerPlacement(paths.stable, 'marketplace-publication'),
|
|
1203
|
+
previous_digest: witness.before.backup, current_digest: witness.before.stable,
|
|
1204
|
+
witness: options.witness, configurations: configurationSnapshot(paths.configurations),
|
|
1205
|
+
configuration_effect: 'preserve exact current configuration; rollback changes only the owned marketplace publication', authorizes: false };
|
|
1206
|
+
const preview_digest = 'sha256:' + settlementHash(JSON.stringify(body));
|
|
1207
|
+
return { ...body, preview_digest, required_confirmation: `Restore previous AGDF publication: ${preview_digest}` };
|
|
1208
|
+
}
|
|
1209
|
+
function validateLegacySettlement(transaction, stable, failed) {
|
|
1210
|
+
const recovery = transaction?.legacy_settlement;
|
|
1211
|
+
if (transaction?.schema_version !== 1 || transaction.phase !== 'legacy_settlement' || !recovery || recovery.schema_version !== 1
|
|
1212
|
+
|| !['confirmed', 'restoring', 'cleanup', 'completed'].includes(recovery.step)) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1213
|
+
const { digest: seal, ...body } = recovery;
|
|
1214
|
+
const originalBytes = Buffer.from(recovery.original_bytes ?? '', 'base64');
|
|
1215
|
+
if (seal !== settlementHash(JSON.stringify(body)) || settlementHash(originalBytes) !== recovery.preview.original_journal_digest
|
|
1216
|
+
|| recovery.confirmation_digest !== settlementHash(`Restore previous AGDF publication: ${recovery.preview.preview_digest}`)
|
|
1217
|
+
|| recovery.preview.paths.stable !== stable || recovery.preview.paths.failed !== failed
|
|
1218
|
+
|| transaction.source_digest !== recovery.preview.source_digest || transaction.previous_source_digest !== recovery.preview.previous_source_digest)
|
|
1219
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1220
|
+
const original = JSON.parse(originalBytes), witness = settlementWitness(recovery.preview.witness, recovery.preview.target);
|
|
1221
|
+
const { phase: _phase, legacy_settlement: _recovery, ...retained } = transaction;
|
|
1222
|
+
const { phase: _originalPhase, ...originalFields } = original;
|
|
1223
|
+
const { preview_digest, required_confirmation: _confirmation, ...previewBody } = recovery.preview;
|
|
1224
|
+
if (JSON.stringify(retained) !== JSON.stringify(originalFields)
|
|
1225
|
+
|| preview_digest !== 'sha256:' + settlementHash(JSON.stringify(previewBody))
|
|
1226
|
+
|| original.cockpit_target !== recovery.preview.target || original.previous_root_identity.split(':')[1] !== recovery.preview.previous_binding.directory_ino)
|
|
1227
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1228
|
+
if (JSON.stringify(witness.live_transition) !== JSON.stringify(original) || original.phase !== 'cockpit_qualification_pending'
|
|
1229
|
+
|| witness.before.transaction !== recovery.preview.original_journal_digest || witness.before.backup !== recovery.preview.previous_digest
|
|
1230
|
+
|| witness.before.stable !== recovery.preview.current_digest
|
|
1231
|
+
|| JSON.stringify(configurationSnapshot(recovery.preview.paths.configurations)) !== JSON.stringify(recovery.preview.configurations))
|
|
1232
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_WITNESS_CHANGED');
|
|
1233
|
+
if (recovery.step === 'completed') {
|
|
1234
|
+
assertOwnerPlacement(recovery.preview.previous_binding, stable, 'marketplace-publication', stable);
|
|
1235
|
+
if (digestDirectory(stable) !== recovery.preview.previous_digest) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1236
|
+
}
|
|
1237
|
+
return recovery;
|
|
1238
|
+
}
|
|
1239
|
+
export function settleLegacyCodexCockpitPublication(options = {}) {
|
|
1240
|
+
const paths = settlementPaths(options), checkpoint = options.checkpoint ?? (() => {});
|
|
1241
|
+
return withOwnedFileLock(paths.stable + '.cockpit-settle', () => {
|
|
1242
|
+
let transaction = JSON.parse(settlementFile(paths.journal)), recovery;
|
|
1243
|
+
const resumed = transaction.phase === 'legacy_settlement';
|
|
1244
|
+
const historicalEffect = resumed && transaction.legacy_settlement?.step === 'completed';
|
|
1245
|
+
const save = step => {
|
|
1246
|
+
const { digest: _old, ...previous } = recovery;
|
|
1247
|
+
const body = { ...previous, step }; recovery = { ...body, digest: settlementHash(JSON.stringify(body)) };
|
|
1248
|
+
transaction = { ...transaction, phase: 'legacy_settlement', legacy_settlement: recovery };
|
|
1249
|
+
atomicWrite(paths.journal, JSON.stringify(transaction) + '\n'); fsyncDirectory(dirname(paths.journal));
|
|
1250
|
+
};
|
|
1251
|
+
if (transaction.phase === 'legacy_settlement') {
|
|
1252
|
+
recovery = validateLegacySettlement(transaction, paths.stable, paths.failed);
|
|
1253
|
+
if (options.previewDigest !== recovery.preview.preview_digest || options.confirmation !== `Restore previous AGDF publication: ${options.previewDigest}`)
|
|
1254
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_CONFIRMATION_REQUIRED');
|
|
1255
|
+
if (options.target !== recovery.preview.target || options.sourceDigest !== recovery.preview.source_digest
|
|
1256
|
+
|| options.previousSourceDigest !== recovery.preview.previous_source_digest
|
|
1257
|
+
|| JSON.stringify(options.witness) !== JSON.stringify(recovery.preview.witness)
|
|
1258
|
+
|| JSON.stringify(paths) !== JSON.stringify(recovery.preview.paths)) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1259
|
+
} else {
|
|
1260
|
+
const preview = inspectLegacyCodexCockpitSettlement(options);
|
|
1261
|
+
if (options.previewDigest !== preview.preview_digest || options.confirmation !== preview.required_confirmation)
|
|
1262
|
+
throw Error('AGDF_LEGACY_SETTLEMENT_CONFIRMATION_REQUIRED');
|
|
1263
|
+
recovery = { schema_version: 1, operation_id: randomUUID(), step: 'confirmed', preview,
|
|
1264
|
+
original_bytes: settlementFile(paths.journal).toString('base64'), confirmation_digest: settlementHash(options.confirmation) };
|
|
1265
|
+
save('confirmed'); checkpoint('confirmed');
|
|
1266
|
+
}
|
|
1267
|
+
const preview = recovery.preview;
|
|
1268
|
+
if (recovery.step !== 'completed') {
|
|
1269
|
+
// The same fixed objects may be at their declared before/after rename roles.
|
|
1270
|
+
if (existsSync(paths.backup)) {
|
|
1271
|
+
assertOwnerPlacement(preview.previous_binding, paths.backup, 'marketplace-publication', paths.stable);
|
|
1272
|
+
if (digestDirectory(paths.backup) !== preview.previous_digest) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1273
|
+
if (existsSync(paths.stable)) {
|
|
1274
|
+
if (existsSync(paths.failed)) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1275
|
+
assertOwnerPlacement(preview.current_binding, paths.stable, 'marketplace-publication');
|
|
1276
|
+
if (digestDirectory(paths.stable) !== preview.current_digest) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1277
|
+
save('restoring'); renameSyncWithRetry(paths.stable, paths.failed); fsyncDirectory(dirname(paths.stable)); checkpoint('current_moved');
|
|
1278
|
+
}
|
|
1279
|
+
assertOwnerPlacement(preview.current_binding, paths.failed, 'marketplace-publication', paths.stable);
|
|
1280
|
+
if (digestDirectory(paths.failed) !== preview.current_digest) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1281
|
+
renameSyncWithRetry(paths.backup, paths.stable); fsyncDirectory(dirname(paths.stable)); checkpoint('previous_restored');
|
|
1282
|
+
}
|
|
1283
|
+
assertOwnerPlacement(preview.previous_binding, paths.stable, 'marketplace-publication');
|
|
1284
|
+
if (digestDirectory(paths.stable) !== preview.previous_digest) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1285
|
+
if (!existsSync(paths.failed) && recovery.step !== 'cleanup') throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1286
|
+
if (existsSync(paths.failed)) {
|
|
1287
|
+
assertOwnerPlacement(preview.current_binding, paths.failed, 'marketplace-publication', paths.stable);
|
|
1288
|
+
if (digestDirectory(paths.failed) !== preview.current_digest) throw Error('AGDF_LEGACY_SETTLEMENT_CONFLICT');
|
|
1289
|
+
save('cleanup'); checkpoint('before_cleanup'); removeOwnedRoot(paths.failed, dirname(paths.stable)); checkpoint('after_cleanup');
|
|
1290
|
+
}
|
|
1291
|
+
save('completed'); checkpoint('completed');
|
|
1292
|
+
}
|
|
1293
|
+
validateLegacySettlement(transaction, paths.stable, paths.failed);
|
|
1294
|
+
return { status: 'restored', source_digest: preview.previous_source_digest, operation_id: recovery.operation_id,
|
|
1295
|
+
preview_digest: preview.preview_digest, original_journal_digest: preview.original_journal_digest,
|
|
1296
|
+
original_journal_base64: recovery.original_bytes, journal: paths.journal, witness: preview.witness,
|
|
1297
|
+
configurations: preview.configurations, recovery_retained: true, historical_effect: historicalEffect, recovered: resumed, authorizes: false };
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { observeCodexOrigins } from '../mcp-lifecycle/adapters/codex-origin-probe.js';
|
|
2
|
+
import { CODEX_MCP_STARTUP_ARGS } from '../host-adapters/codex/mcp-startup.js';
|
|
3
|
+
|
|
4
|
+
// Transient host observations. Installation, registration and actual catalog
|
|
5
|
+
// readiness remain separate facts; this function grants no authority.
|
|
6
|
+
export async function inspectCodexStartup({ target, native = false, env = process.env },
|
|
7
|
+
{ observe = observeCodexOrigins, now = Date.now } = {}) {
|
|
8
|
+
const deadline = now() + 45000;
|
|
9
|
+
const configuration = await observe({ target, mode: 'configuration', env, timeoutMs: 15000 });
|
|
10
|
+
let catalog = { status: 'not_observed', reason: 'native_not_requested', providers: [] };
|
|
11
|
+
if (native) {
|
|
12
|
+
const remaining = deadline - now();
|
|
13
|
+
const result = remaining > 0 ? await observe({ target, mode: 'catalog', all: true, env, timeoutMs: remaining })
|
|
14
|
+
: { status: 'unavailable', reason: 'timeout' };
|
|
15
|
+
const providers = (result.providers ?? []).filter(row => row.server_id === 'agdf' && row.plugin_id === 'agdf@agdf');
|
|
16
|
+
const ready = result.status === 'observed' && providers.length === 1
|
|
17
|
+
&& ['agdf_inspect', 'agdf_project'].every(name => providers[0].tools.includes(name))
|
|
18
|
+
&& !['failed', 'starting', 'connecting'].includes(providers[0].runtime_status);
|
|
19
|
+
catalog = { status: ready ? 'discovered_ready' : 'unavailable',
|
|
20
|
+
reason: ready ? null : result.reason ?? 'owned_required_tools_unavailable',
|
|
21
|
+
requested: true, invocation_override: [...CODEX_MCP_STARTUP_ARGS], providers,
|
|
22
|
+
teardown: result.status === 'observed' ? 'confirmed' : 'unconfirmed' };
|
|
23
|
+
}
|
|
24
|
+
return { schema_version: 1, authorizes: false, configuration, catalog,
|
|
25
|
+
next_action: catalog.status === 'discovered_ready'
|
|
26
|
+
? 'Inspect project-state for the confirmed Git root; initialize only with deliberate setup intent.'
|
|
27
|
+
: native ? 'Inspect the reported Codex startup cause and supported MCP registration status. Preserve configuration and original operation identity.'
|
|
28
|
+
: 'Registration is not catalog readiness. Use status --surface codex --dir ABSOLUTE --native --json for an explicit bounded catalog observation.' };
|
|
29
|
+
}
|
|
@@ -140,5 +140,11 @@ export function printGeneralStatus(report, { json = false, io = console } = {})
|
|
|
140
140
|
io.log(`Automatic runtime checks: requested=${report.runtime_checks.requested}; effective=${report.runtime_checks.effective}; reason=${report.runtime_checks.reason}`);
|
|
141
141
|
if (report.runtime_checks.verification) io.log(`Automatic-check verification: ${report.runtime_checks.verification}`);
|
|
142
142
|
io.log(`MCP: ${report.mcp?.result ?? report.mcp?.status ?? "not_checked"}`);
|
|
143
|
+
if (report.codex_startup) {
|
|
144
|
+
const { configuration, catalog, next_action } = report.codex_startup;
|
|
145
|
+
io.log(`Codex startup configuration: ${configuration.status}; wait_ms=${configuration.wait_ms ?? 'unknown'}; origin=${configuration.origin?.kind ?? 'unknown'}; reason=${configuration.reason ?? 'none'}`);
|
|
146
|
+
io.log(`Codex native catalog: ${catalog.status}; reason=${catalog.reason ?? 'none'}`);
|
|
147
|
+
io.log(`Codex next action: ${next_action}`);
|
|
148
|
+
}
|
|
143
149
|
io.log(`Next action: ${report.next_action.text}`);
|
|
144
150
|
}
|
|
@@ -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
|
+
|