create-agdf 0.14.4 → 0.20.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/LICENSE +201 -0
- package/README.md +474 -11
- package/bin/create-agdf.js +2 -1
- package/generated/.agdf/control/README.md +29 -2
- package/generated/.agdf/control/templates/MASTER_BACKLOG.md +4 -2
- package/generated/.agdf/control/templates/RUN_STATE.md +1 -0
- package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +31 -0
- package/generated/.agdf/control/templates/artefacts/PRD.md +44 -5
- package/generated/.agdf/control/templates/artefacts/QA_REPORT.md +6 -0
- package/generated/.agdf/control/templates/artefacts/SD.md +31 -3
- package/generated/.agdf/control/templates/artefacts/TP.md +43 -8
- package/generated/.agdf/control/templates/artefacts/UR.md +17 -0
- package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +10 -0
- package/generated/.opencode/AGDF.md +17 -121
- package/generated/.opencode/README.md +7 -2
- package/generated/.opencode/agdf-agent-router.md +174 -0
- package/generated/.opencode/agdf-interaction-locales.json +2682 -495
- package/generated/.opencode/agdf-runtime-contract.md +17 -9
- package/generated/.opencode/contracts/closeout.md +7 -3
- package/generated/.opencode/contracts/control-scaffold.md +19 -6
- package/generated/.opencode/contracts/gate-artifact-preparation.md +132 -0
- package/generated/.opencode/contracts/gate-transition.md +56 -12
- package/generated/.opencode/contracts/interaction.md +331 -41
- package/generated/.opencode/contracts/modes.md +23 -11
- package/generated/.opencode/contracts/prd-definition.md +130 -0
- package/generated/.opencode/contracts/quality.md +85 -14
- package/generated/.opencode/contracts/request-activation.md +252 -0
- package/generated/.opencode/contracts/sd-definition.md +69 -0
- package/generated/.opencode/contracts/task-target-resolution.md +63 -9
- package/generated/.opencode/contracts/tp-definition.md +81 -0
- package/generated/.opencode/contracts/ur-definition.md +94 -0
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +70 -8
- package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +35 -3
- package/generated/.opencode/skills/agdf-code-review/SKILL.md +36 -2
- package/generated/.opencode/skills/agdf-delivery-closeout/SKILL.md +36 -4
- package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +36 -4
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +68 -222
- package/generated/.opencode/skills/agdf-prd-definition/SKILL.md +51 -0
- package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +78 -10
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +44 -11
- package/generated/.opencode/skills/agdf-sd-definition/SKILL.md +51 -0
- package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +35 -3
- package/generated/.opencode/skills/agdf-tp-definition/SKILL.md +51 -0
- package/generated/.opencode/skills/agdf-ur-definition/SKILL.md +54 -0
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +100 -6
- package/generated/plugins/agdf/.claude-plugin/plugin.json +3 -2
- package/generated/plugins/agdf/.codex-plugin/plugin.json +3 -1
- package/generated/plugins/agdf/control/README.md +29 -2
- package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +4 -2
- package/generated/plugins/agdf/control/templates/RUN_STATE.md +1 -0
- package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +31 -0
- package/generated/plugins/agdf/control/templates/artefacts/PRD.md +44 -5
- package/generated/plugins/agdf/control/templates/artefacts/QA_REPORT.md +6 -0
- package/generated/plugins/agdf/control/templates/artefacts/SD.md +31 -3
- package/generated/plugins/agdf/control/templates/artefacts/TP.md +43 -8
- package/generated/plugins/agdf/control/templates/artefacts/UR.md +17 -0
- package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +10 -0
- package/generated/plugins/agdf/hooks/hooks.json +2 -2
- package/generated/plugins/agdf/hooks/session-start.sh +5 -70
- package/generated/plugins/agdf/mcp/agdf-mcp-launch.js +7 -0
- package/generated/plugins/agdf/mcp/claude.mcp.json +11 -0
- package/generated/plugins/agdf/mcp/sdk/expected-sdk.json +21 -0
- package/generated/plugins/agdf/mcp/sdk/package-lock.json +47 -0
- package/generated/plugins/agdf/mcp/sdk/package.json +7 -0
- package/generated/plugins/agdf/mcp/server/NOTICE +10 -0
- package/generated/plugins/agdf/mcp/server/README.md +136 -0
- package/generated/plugins/agdf/mcp/server/bin/agdf-mcp.js +24 -0
- package/generated/plugins/agdf/mcp/server/package.json +59 -0
- package/generated/plugins/agdf/mcp/server/src/cockpit-resource.js +20 -0
- package/generated/plugins/agdf/mcp/server/src/generation-entry.js +86 -0
- package/generated/plugins/agdf/mcp/server/src/generation-protocol.js +44 -0
- package/generated/plugins/agdf/mcp/server/src/generation.js +211 -0
- package/generated/plugins/agdf/mcp/server/src/main.js +56 -0
- package/generated/plugins/agdf/mcp/server/src/server.js +187 -0
- package/generated/plugins/agdf/mcp/server/src/ui-capability.js +17 -0
- package/generated/plugins/agdf/mcp/server/src/worker-entry.js +39 -0
- package/generated/plugins/agdf/mcp/server/src/worker.js +134 -0
- package/generated/plugins/agdf/mcp/server/ui/cockpit.html +109 -0
- package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +8 -0
- package/generated/plugins/agdf/mcp/server/ui/decision.html +108 -0
- package/generated/plugins/agdf/mcp/server/ui/manifest.json +8 -0
- package/generated/plugins/agdf/mcp.json +28 -0
- package/generated/plugins/agdf/meta/agdf-agent-router.md +50 -8
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +2682 -495
- package/generated/plugins/agdf/meta/agdf-mcp-capability.json +158 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +288 -42
- package/generated/plugins/agdf/meta/agdf-runtime-contract.md +17 -9
- package/generated/plugins/agdf/meta/contracts/closeout.md +6 -2
- package/generated/plugins/agdf/meta/contracts/control-scaffold.md +17 -4
- package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +48 -4
- package/generated/plugins/agdf/meta/contracts/interaction.md +328 -38
- package/generated/plugins/agdf/meta/contracts/modes.md +23 -11
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +130 -0
- package/generated/plugins/agdf/meta/contracts/quality.md +77 -6
- package/generated/plugins/agdf/meta/contracts/request-activation.md +252 -0
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +69 -0
- package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +63 -9
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +81 -0
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +94 -0
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/plugins/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/plugins/agdf/meta/schemas/agent-plugins/1.0.0/mcp.schema.json +120 -0
- package/generated/plugins/agdf/meta/schemas/agent-plugins/1.0.0/plugin.schema.json +65 -0
- package/generated/plugins/agdf/meta/schemas/agent-plugins/1.0.0/provenance.json +19 -0
- package/generated/plugins/agdf/runtime/agdf-local.js +5 -4
- package/generated/plugins/agdf/runtime/agdf-session-check.js +127 -50
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2682 -495
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +288 -42
- package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/closeout.md +7 -3
- package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/control-scaffold.md +19 -6
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
- package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/gate-transition.md +56 -12
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +777 -0
- package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/modes.md +23 -11
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +130 -0
- package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/quality.md +85 -14
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +252 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +69 -0
- package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/task-target-resolution.md +63 -9
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +81 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +94 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +251 -16
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/contract-command.js +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +44 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +11 -11
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +254 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/runtime-context.js +14 -37
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +205 -7
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-command.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +22 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +28 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/service.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +25 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +4 -4
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/claude/session-command.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/codex/session-command.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/copilot/session-command.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/opencode/session-command.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/session-command.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/host-command.js +112 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +360 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +26 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +527 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +420 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/npm-invocation.js +27 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/repository-context.js +87 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +12 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-context.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/git-history.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/git-originals.js +36 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/local-validator.js +39 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +1 -298
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/runtime-probe.js +61 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +3 -3
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +9 -8
- package/generated/plugins/agdf/runtime/create-agdf/lib/skill-dispatch/binding.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/package.json +6 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
- package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/delivery-map.js +31 -37
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
- package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/doctor.js +85 -17
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +827 -0
- package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-evaluation/gate-policy.js +141 -10
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +32 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +237 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
- package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/run-state.js +108 -74
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
- package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-evaluation/shared.js +5 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
- package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/verified-change.js +10 -30
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-backlog.js +135 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-context.js +97 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-contract.js +86 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.d.ts +17 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.js +45 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +217 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +388 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +299 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/decision-session.js +243 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +35 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +319 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +149 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +41 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +57 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +85 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +122 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +226 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +38 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +105 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/control-changes.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +55 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +378 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read-boundary.js +22 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command-contract.js +73 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +137 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +95 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +94 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +67 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/contained-file.js +56 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-configuration.js +19 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-contract.js +32 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-service.js +55 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +12 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +132 -0
- package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/index.js +2 -0
- package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-state/legacy-migration.js +5 -31
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +138 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +130 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +136 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +108 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +29 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +90 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +143 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +174 -0
- package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-state/run-identity.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +31 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +103 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +59 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +80 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +443 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +348 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +273 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +296 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +184 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +458 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +141 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +26 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +221 -0
- package/generated/plugins/{copilot/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js → agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js} +17 -47
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +170 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +106 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +57 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +201 -0
- package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-state/run-state-resolver.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +484 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +15 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +359 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +571 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +65 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-text.js +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +67 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +14 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +26 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.d.ts +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +98 -0
- package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +176 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/repository-context-reader.js +87 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/artefact-templates.js +72 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/binding.js +26 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +70 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/contracts.js +23 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/host-installation.js +200 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +496 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/binding.js +66 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +430 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +833 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/task-target-resolution.js +202 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/LICENSE +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/decode.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/escape.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/package.json +118 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/LICENSE +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.js +47 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/package.json +12 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.js +45 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.cjs +63 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.js +63 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/nanoid.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/package.json +89 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/LICENSE +19 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/index.js +42 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/package.json +50 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/LICENSE +15 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/package.json +25 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.js +75 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/LICENSE +20 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/comment.js +13 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/container.js +494 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/document.js +33 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/input.js +282 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/list.js +79 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/node.js +494 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parse.js +42 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parser.js +626 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/processor.js +67 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/result.js +42 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/root.js +76 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/rule.js +27 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warning.js +47 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/package.json +88 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/LICENSE +28 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/package.json +71 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/source-map.js +8 -0
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/agent-skills-conformance.mjs +9 -5
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +1123 -182
- package/generated/plugins/agdf/scripts/instruction-footprint.mjs +945 -0
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +67 -5
- package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +34 -2
- package/generated/plugins/agdf/skills/code-review/SKILL.md +36 -2
- package/generated/plugins/agdf/skills/delivery-closeout/SKILL.md +34 -2
- package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +34 -2
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +68 -222
- package/generated/plugins/agdf/skills/prd-definition/SKILL.md +51 -0
- package/generated/plugins/agdf/skills/prd-definition/help.md +23 -0
- package/generated/plugins/agdf/skills/qa-gate/SKILL.md +73 -5
- package/generated/plugins/agdf/skills/release-or/SKILL.md +36 -3
- package/generated/plugins/agdf/skills/sd-definition/SKILL.md +51 -0
- package/generated/plugins/agdf/skills/sd-definition/help.md +17 -0
- package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +34 -2
- package/generated/plugins/agdf/skills/tp-definition/SKILL.md +51 -0
- package/generated/plugins/agdf/skills/tp-definition/help.md +17 -0
- package/generated/plugins/agdf/skills/ur-definition/SKILL.md +54 -0
- package/generated/plugins/agdf/skills/ur-definition/help.md +19 -0
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +100 -6
- package/generated/plugins/agdf/skills/ux-intent-definition/help.md +3 -0
- 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 +1 -1
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +3314 -409
- package/generated/plugins/copilot/agdf/control/README.md +125 -0
- package/generated/plugins/copilot/agdf/control/templates/AGDF_RUN.md +139 -0
- package/generated/plugins/copilot/agdf/control/templates/AGENT_QUALITY_CONTRACTS.json +126 -0
- package/generated/plugins/copilot/agdf/control/templates/CONTEXT_GRAPH.md +51 -0
- package/generated/plugins/copilot/agdf/control/templates/MASTER_BACKLOG.md +39 -0
- package/generated/plugins/copilot/agdf/control/templates/RUN_STATE.md +93 -0
- package/generated/plugins/copilot/agdf/control/templates/SOT_REGISTRY.md +25 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +135 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/OR.md +125 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +113 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/QA_REPORT.md +44 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +70 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/TP.md +71 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UR.md +58 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +61 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/VERIFIED_CHANGE.md +58 -0
- package/generated/plugins/copilot/agdf/mcp/agdf-mcp-launch.js +7 -0
- package/generated/plugins/copilot/agdf/mcp/sdk/expected-sdk.json +21 -0
- package/generated/plugins/copilot/agdf/mcp/sdk/package-lock.json +47 -0
- package/generated/plugins/copilot/agdf/mcp/sdk/package.json +7 -0
- package/generated/plugins/copilot/agdf/mcp/server/NOTICE +10 -0
- package/generated/plugins/copilot/agdf/mcp/server/README.md +136 -0
- package/generated/plugins/copilot/agdf/mcp/server/bin/agdf-mcp.js +24 -0
- package/generated/plugins/copilot/agdf/mcp/server/package.json +59 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/cockpit-resource.js +20 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-entry.js +86 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-protocol.js +44 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +211 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +56 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +187 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/ui-capability.js +17 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/worker-entry.js +39 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/worker.js +134 -0
- package/generated/plugins/copilot/agdf/mcp.json +16 -0
- package/generated/plugins/copilot/agdf/meta/agdf-agent-router.md +50 -8
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +288 -42
- package/generated/plugins/copilot/agdf/meta/agdf-runtime-contract.md +17 -9
- package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/plugins/copilot/agdf/plugin.json +3 -5
- package/generated/plugins/copilot/agdf/runtime/agdf-local.js +5 -4
- package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +110 -47
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2682 -495
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +288 -42
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md +82 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/context-graph.md +48 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/control-scaffold.md +145 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +209 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +777 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +195 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +130 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +228 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +252 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +69 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md +156 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +81 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +94 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +251 -16
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/contract-command.js +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +44 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +11 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +254 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +14 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +205 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-command.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +22 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +28 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/service.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +25 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +4 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/claude/session-command.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/codex/session-command.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/copilot/session-command.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/opencode/session-command.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/session-command.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-command.js +112 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +360 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +26 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +527 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +420 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/npm-invocation.js +27 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/repository-context.js +87 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +12 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-context.js +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/git-history.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/git-originals.js +36 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/local-validator.js +39 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +1 -298
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/runtime-probe.js +61 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +3 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +9 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/skill-dispatch/binding.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +6 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
- package/{lib → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/delivery-map.js +31 -37
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
- package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-evaluation/doctor.js +85 -17
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +827 -0
- package/{lib → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/gate-policy.js +141 -10
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +32 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +237 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/run-state.js +108 -74
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
- package/{lib → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/shared.js +5 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/verified-change.js +10 -30
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +299 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +35 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +319 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +149 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +41 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +57 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +85 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +122 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +226 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +38 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +55 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +378 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read-boundary.js +22 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command-contract.js +73 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +137 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +95 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +94 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +67 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/contained-file.js +56 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-configuration.js +19 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +12 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +132 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/index.js +2 -0
- package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-state/legacy-migration.js +5 -31
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +138 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +130 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +136 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +108 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +29 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +90 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +143 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +174 -0
- package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-state/run-identity.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +31 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +103 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +59 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +80 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +443 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +348 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +273 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +296 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +184 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +458 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +141 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +26 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +221 -0
- package/{lib/control-state/run-state-parser.js → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-document.js} +17 -47
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +170 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +106 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +57 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +201 -0
- package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-state/run-state-resolver.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +484 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +15 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +359 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +571 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +65 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-text.js +8 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +67 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/fs-swap.js +26 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +14 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +26 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +98 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +176 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/repository-context-reader.js +87 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/artefact-templates.js +72 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/binding.js +27 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +70 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/contracts.js +23 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/distribution-profile-history.js +173 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +496 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/binding.js +66 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +430 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +833 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/task-target-resolution.js +202 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/LICENSE +11 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/decode.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/escape.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/package.json +118 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/LICENSE +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.js +47 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/package.json +12 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.js +45 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.cjs +63 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.js +63 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/nanoid.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/package.json +89 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/LICENSE +19 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/index.js +42 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/package.json +50 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/LICENSE +15 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/package.json +25 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.js +75 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/LICENSE +20 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/comment.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/container.js +494 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/document.js +33 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/input.js +282 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/list.js +79 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/node.js +494 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parse.js +42 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parser.js +626 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/processor.js +67 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/result.js +42 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/root.js +76 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/rule.js +27 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warning.js +47 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/package.json +88 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/LICENSE +28 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/package.json +71 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/source-map.js +8 -0
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-brownfield-analysis/SKILL.md +70 -8
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-clean-implementation-review/SKILL.md +35 -3
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-code-review/SKILL.md +36 -2
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-delivery-closeout/SKILL.md +36 -4
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-delivery-path-search/SKILL.md +36 -4
- package/generated/plugins/copilot/agdf/skills/agdf-gate-check/SKILL.md +86 -0
- package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -0
- package/generated/plugins/copilot/agdf/skills/agdf-prd-definition/SKILL.md +51 -0
- package/generated/plugins/copilot/agdf/skills/agdf-qa-gate/SKILL.md +205 -0
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-release-or/SKILL.md +44 -11
- package/generated/plugins/copilot/agdf/skills/agdf-runtime-contract.md +24 -0
- package/generated/plugins/copilot/agdf/skills/agdf-sd-definition/SKILL.md +51 -0
- package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-task-plan-review/SKILL.md +35 -3
- package/generated/plugins/copilot/agdf/skills/agdf-tp-definition/SKILL.md +51 -0
- package/generated/plugins/copilot/agdf/skills/agdf-ur-definition/SKILL.md +54 -0
- package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +188 -0
- package/generated/plugins/copilot/agdf/skills/contracts/closeout.md +82 -0
- package/generated/plugins/copilot/agdf/skills/contracts/context-graph.md +48 -0
- package/generated/plugins/copilot/agdf/skills/contracts/control-scaffold.md +145 -0
- package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +132 -0
- package/generated/plugins/copilot/agdf/skills/contracts/gate-transition.md +209 -0
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +777 -0
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +195 -0
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +130 -0
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +228 -0
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +252 -0
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +69 -0
- package/generated/plugins/copilot/agdf/skills/contracts/task-target-resolution.md +156 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +81 -0
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +94 -0
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/submissions/openai/agdf/meta/agdf-agent-router.md +50 -8
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +2682 -495
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +288 -42
- package/generated/submissions/openai/agdf/meta/agdf-runtime-contract.md +17 -9
- package/generated/submissions/openai/agdf/meta/contracts/closeout.md +6 -2
- package/generated/submissions/openai/agdf/meta/contracts/control-scaffold.md +17 -4
- package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
- package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +48 -4
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +328 -38
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +23 -11
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +130 -0
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +77 -6
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +252 -0
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +69 -0
- package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +63 -9
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +81 -0
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +94 -0
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +14 -0
- package/generated/submissions/openai/agdf/meta/schemas/agent-plugins/1.0.0/mcp.schema.json +120 -0
- package/generated/submissions/openai/agdf/meta/schemas/agent-plugins/1.0.0/plugin.schema.json +65 -0
- package/generated/submissions/openai/agdf/meta/schemas/agent-plugins/1.0.0/provenance.json +19 -0
- package/generated/submissions/openai/agdf/plugin.json +47 -0
- package/generated/submissions/openai/agdf/skills/brownfield-analysis/SKILL.md +67 -5
- package/generated/submissions/openai/agdf/skills/clean-implementation-review/SKILL.md +34 -2
- package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +36 -2
- package/generated/submissions/openai/agdf/skills/delivery-closeout/SKILL.md +34 -2
- package/generated/submissions/openai/agdf/skills/delivery-path-search/SKILL.md +34 -2
- package/generated/submissions/openai/agdf/skills/gate-check/SKILL.md +68 -222
- package/generated/submissions/openai/agdf/skills/prd-definition/SKILL.md +51 -0
- package/generated/submissions/openai/agdf/skills/prd-definition/help.md +23 -0
- package/generated/submissions/openai/agdf/skills/qa-gate/SKILL.md +73 -5
- package/generated/submissions/openai/agdf/skills/release-or/SKILL.md +36 -3
- package/generated/submissions/openai/agdf/skills/sd-definition/SKILL.md +51 -0
- package/generated/submissions/openai/agdf/skills/sd-definition/help.md +17 -0
- package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +34 -2
- package/generated/submissions/openai/agdf/skills/tp-definition/SKILL.md +51 -0
- package/generated/submissions/openai/agdf/skills/tp-definition/help.md +17 -0
- package/generated/submissions/openai/agdf/skills/ur-definition/SKILL.md +54 -0
- package/generated/submissions/openai/agdf/skills/ur-definition/help.md +19 -0
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +100 -6
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +3 -0
- 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 +104 -32
- 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 +1 -1
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/application.js +726 -271
- package/lib/cli/command-registry.js +251 -16
- package/lib/cli/contract-command.js +24 -0
- package/lib/cli/control-maintenance-command.js +44 -0
- package/lib/cli/delivery-path-search-command.js +11 -11
- package/lib/cli/parse-args.js +254 -5
- package/lib/cli/runtime-context.js +14 -37
- package/lib/cli/validation-handlers.js +205 -7
- package/lib/control-command.js +4 -0
- package/lib/control-evaluation/git-observation.js +22 -0
- package/lib/control-maintenance/interaction.js +28 -0
- package/lib/control-maintenance/repair.js +4 -0
- package/lib/control-maintenance/service.js +3 -0
- package/lib/control-maintenance/startup.js +25 -0
- package/lib/control-state/run-recovery.js +5 -0
- package/lib/delivery-path-search/evaluators/claude.js +3 -3
- package/lib/delivery-path-search/evaluators/codex.js +3 -3
- package/lib/delivery-path-search/evaluators/opencode.js +4 -4
- package/lib/delivery-path-search/evaluators/protocol.js +1 -1
- package/lib/delivery-path-search/generators/claude.js +3 -3
- package/lib/delivery-path-search/generators/codex.js +3 -3
- package/lib/delivery-path-search/generators/protocol.js +1 -1
- package/lib/delivery-path-search/surfaces/capabilities.js +1 -1
- package/lib/delivery-path-search/transports/read-only-guard.js +2 -1
- package/lib/host-adapters/claude/loaded-sessions.js +45 -0
- package/lib/host-adapters/claude/marketplace.js +2 -0
- package/lib/host-adapters/claude/permission-rules.js +20 -0
- package/lib/host-adapters/claude/plugin-mcp.js +40 -0
- package/lib/host-adapters/claude/plugin.js +285 -0
- package/lib/host-adapters/claude/runtime-check.js +39 -0
- package/lib/host-adapters/claude/session-command.js +2 -0
- package/lib/host-adapters/claude/uninstall.js +80 -0
- package/lib/host-adapters/codex/identity.js +19 -0
- package/lib/host-adapters/codex/mcp-startup.js +14 -0
- package/lib/host-adapters/codex/plugin-mcp.js +39 -0
- package/lib/host-adapters/codex/plugin.js +243 -0
- package/lib/host-adapters/codex/runtime-check.js +27 -0
- package/lib/host-adapters/codex/session-command.js +7 -0
- package/lib/host-adapters/copilot/plugin.js +220 -0
- package/lib/host-adapters/copilot/session-command.js +1 -0
- package/lib/host-adapters/opencode/runtime-check.js +39 -0
- package/lib/host-adapters/opencode/session-command.js +1 -0
- package/lib/host-adapters/opencode/status.js +43 -0
- package/lib/host-adapters/session-command.js +11 -0
- package/lib/host-command.js +112 -0
- package/lib/install-setup/contract.js +319 -0
- package/lib/install-setup/control-migration.js +10 -0
- package/lib/install-setup/control-repair.js +1 -0
- package/lib/install-setup/interaction.js +157 -0
- package/lib/install-setup/presentation.js +337 -0
- package/lib/install-setup/service.js +441 -0
- package/lib/installers/copilot-marketplace-transport.js +74 -0
- package/lib/installers/copilot-settings.js +34 -3
- package/lib/installers/copilot-skill-discovery.js +27 -0
- package/lib/installers/local-development.js +107 -11
- package/lib/installers/local-marketplace.js +313 -37
- package/lib/installers/npm-invocation.js +2 -0
- package/lib/installers/opencode-activation.js +5 -31
- package/lib/installers/opencode.js +286 -89
- package/lib/installers/packaged-app-marketplace.js +67 -0
- package/lib/installers/plugin-command.js +115 -0
- package/lib/installers/plugin-installers.js +21 -521
- package/lib/lifecycle/operations.js +78 -137
- package/lib/lifecycle/owned-mutation.js +64 -0
- package/lib/lifecycle/presentation.js +47 -4
- package/lib/lifecycle/result.js +183 -2
- package/lib/lifecycle/status.js +150 -66
- package/lib/mcp-dispatch-runtime.js +360 -0
- package/lib/mcp-lifecycle/adapter-contract.js +54 -0
- package/lib/mcp-lifecycle/adapters/claude.js +123 -0
- package/lib/mcp-lifecycle/adapters/codex-origin-probe.js +87 -0
- package/lib/mcp-lifecycle/adapters/codex.js +502 -0
- package/lib/mcp-lifecycle/adapters/copilot.js +106 -0
- package/lib/mcp-lifecycle/adapters/file-utils.js +90 -0
- package/lib/mcp-lifecycle/adapters/opencode.js +148 -0
- package/lib/mcp-lifecycle/evidence.js +122 -0
- package/lib/mcp-lifecycle/facade-entry.js +26 -0
- package/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
- package/lib/mcp-lifecycle/host-config.js +60 -0
- package/lib/mcp-lifecycle/package.js +527 -0
- package/lib/mcp-lifecycle/plugin-runtime.js +420 -0
- package/lib/mcp-lifecycle/presentation.js +61 -0
- package/lib/mcp-lifecycle/profile-context.js +11 -0
- package/lib/mcp-lifecycle/profile.js +63 -0
- package/lib/mcp-lifecycle/result.js +92 -0
- package/lib/mcp-lifecycle/service.js +533 -0
- package/lib/npm-invocation.js +27 -0
- package/lib/repository-context.js +87 -0
- package/lib/runtime/control-command-service.js +12 -0
- package/lib/runtime/control-context.js +11 -0
- package/lib/runtime/git-history.js +7 -0
- package/lib/runtime/git-originals.js +36 -0
- package/lib/runtime/local-validator.js +39 -5
- package/lib/runtime/plugin-provenance.js +1 -298
- package/lib/runtime/runtime-probe.js +61 -0
- package/lib/runtime/validator-application.js +3 -3
- package/lib/runtime-check-consent/adapters.js +3 -42
- package/lib/runtime-check-consent/claude-settings.js +2 -23
- package/lib/runtime-check-consent/codex-hooks.js +96 -0
- package/lib/runtime-check-consent/codex-plugin-consent.js +118 -0
- package/lib/runtime-check-consent/contract.js +9 -8
- package/lib/runtime-check-consent/coordinator.js +3 -3
- package/lib/runtime-check-consent/service.js +29 -53
- package/lib/runtime-check-consent/state.js +1 -1
- package/lib/scaffold/canonical-init.js +691 -0
- package/lib/scaffold/plan.js +8 -14
- package/lib/scaffold/presentation.js +53 -3
- package/lib/skill-dispatch/binding.js +9 -0
- package/opencode-plugin.js +99 -26
- package/package.json +22 -51
- package/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
- package/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
- package/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
- package/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
- package/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
- package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/delivery-map.js +31 -37
- package/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
- package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/doctor.js +85 -17
- package/runtime/core/lib/control-evaluation/gate-check.js +827 -0
- package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/gate-policy.js +141 -10
- package/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
- package/runtime/core/lib/control-evaluation/next-action.js +32 -0
- package/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
- package/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
- package/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
- package/runtime/core/lib/control-evaluation/report-decision.js +237 -0
- package/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
- package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/run-state.js +108 -74
- package/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
- package/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
- package/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
- package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/shared.js +5 -2
- package/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
- package/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
- package/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
- package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/verified-change.js +10 -30
- package/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
- package/runtime/core/lib/control-inspect/cockpit-backlog.js +135 -0
- package/runtime/core/lib/control-inspect/cockpit-context.js +97 -0
- package/runtime/core/lib/control-inspect/cockpit-contract.js +86 -0
- package/runtime/core/lib/control-inspect/cockpit-list.d.ts +17 -0
- package/runtime/core/lib/control-inspect/cockpit-list.js +45 -0
- package/runtime/core/lib/control-inspect/cockpit-session.js +217 -0
- package/runtime/core/lib/control-inspect/cockpit.js +388 -0
- package/runtime/core/lib/control-inspect/contract.js +299 -0
- package/runtime/core/lib/control-inspect/decision-session.js +243 -0
- package/runtime/core/lib/control-inspect/selection.js +35 -0
- package/runtime/core/lib/control-inspect/service.js +319 -0
- package/runtime/core/lib/control-maintenance/compatibility.js +149 -0
- package/runtime/core/lib/control-maintenance/contract.js +41 -0
- package/runtime/core/lib/control-maintenance/interaction.js +57 -0
- package/runtime/core/lib/control-maintenance/migration.js +85 -0
- package/runtime/core/lib/control-maintenance/presentation.js +122 -0
- package/runtime/core/lib/control-maintenance/repair.js +226 -0
- package/runtime/core/lib/control-maintenance/service.js +38 -0
- package/runtime/core/lib/control-read/cockpit-pool.js +105 -0
- package/runtime/core/lib/control-read/cockpit-worker.js +33 -0
- package/runtime/core/lib/control-read/control-changes.js +33 -0
- package/runtime/core/lib/control-read/fs.js +55 -0
- package/runtime/core/lib/control-read/snapshot.js +378 -0
- package/runtime/core/lib/control-read-boundary.js +22 -0
- package/runtime/core/lib/control-state/approval-command-contract.js +73 -0
- package/runtime/core/lib/control-state/approval-command.js +137 -0
- package/runtime/core/lib/control-state/approval-operations.js +95 -0
- package/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
- package/runtime/core/lib/control-state/artefact-bindings.js +94 -0
- package/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
- package/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
- package/runtime/core/lib/control-state/backlog-summary.js +67 -0
- package/runtime/core/lib/control-state/contained-file.js +56 -0
- package/runtime/core/lib/control-state/control-configuration.js +19 -0
- package/runtime/core/lib/control-state/decision-action-contract.js +32 -0
- package/runtime/core/lib/control-state/decision-action-service.js +55 -0
- package/runtime/core/lib/control-state/decision-material-contract.js +12 -0
- package/runtime/core/lib/control-state/evidence-bindings.js +132 -0
- package/{lib → runtime/core/lib}/control-state/index.js +2 -0
- package/{lib → runtime/core/lib}/control-state/legacy-migration.js +5 -31
- package/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
- package/runtime/core/lib/control-state/presentation-decision.js +138 -0
- package/runtime/core/lib/control-state/preview-render.js +130 -0
- package/runtime/core/lib/control-state/preview-review.js +136 -0
- package/runtime/core/lib/control-state/preview-snapshot.js +108 -0
- package/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
- package/runtime/core/lib/control-state/recording-formats.js +29 -0
- package/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
- package/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
- package/runtime/core/lib/control-state/run-backlog.js +90 -0
- package/runtime/core/lib/control-state/run-command-contract.js +143 -0
- package/runtime/core/lib/control-state/run-command-service.js +174 -0
- package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-state/run-identity.js +1 -0
- package/runtime/core/lib/control-state/run-operation-identity.js +31 -0
- package/runtime/core/lib/control-state/run-operation-proof.js +103 -0
- package/runtime/core/lib/control-state/run-operation-status.js +59 -0
- package/runtime/core/lib/control-state/run-operations.js +80 -0
- package/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
- package/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
- package/runtime/core/lib/control-state/run-presentation-render.js +443 -0
- package/runtime/core/lib/control-state/run-presentation.js +348 -0
- package/runtime/core/lib/control-state/run-recording.js +273 -0
- package/runtime/core/lib/control-state/run-recovery.js +296 -0
- package/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
- package/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
- package/runtime/core/lib/control-state/run-revision-history.js +184 -0
- package/runtime/core/lib/control-state/run-revision.js +458 -0
- package/runtime/core/lib/control-state/run-seal-compute.js +141 -0
- package/runtime/core/lib/control-state/run-seal.js +26 -0
- package/runtime/core/lib/control-state/run-source-revisions.js +221 -0
- package/{generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js → runtime/core/lib/control-state/run-state-document.js} +17 -47
- package/runtime/core/lib/control-state/run-state-edits.js +170 -0
- package/runtime/core/lib/control-state/run-state-parser.js +106 -0
- package/runtime/core/lib/control-state/run-state-reader.js +57 -0
- package/runtime/core/lib/control-state/run-state-repository.js +201 -0
- package/{lib → runtime/core/lib}/control-state/run-state-resolver.js +1 -1
- package/runtime/core/lib/control-state/run-state-writer.js +484 -0
- package/runtime/core/lib/control-state/run-step-pending.js +15 -0
- package/runtime/core/lib/control-state/run-step-transaction.js +359 -0
- package/runtime/core/lib/control-state/run-steps.js +571 -0
- package/runtime/core/lib/control-state/run-store-inspection.js +65 -0
- package/runtime/core/lib/control-state/run-text.js +8 -0
- package/runtime/core/lib/delivery-continuation/service.js +67 -0
- package/runtime/core/lib/fs-swap.js +26 -0
- package/runtime/core/lib/index.js +14 -0
- package/runtime/core/lib/interaction-catalog-validation.js +26 -0
- package/runtime/core/lib/interaction-catalog.d.ts +2 -0
- package/runtime/core/lib/interaction-catalog.js +98 -0
- package/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
- package/runtime/core/lib/mcp-resource-contract.js +4 -0
- package/runtime/core/lib/mcp-tool-errors.js +176 -0
- package/runtime/core/lib/repository-context-reader.js +87 -0
- package/runtime/core/lib/resources/artefact-templates.js +72 -0
- package/runtime/core/lib/resources/binding.js +26 -0
- package/runtime/core/lib/resources/context.js +70 -0
- package/runtime/core/lib/resources/contracts.js +23 -0
- package/runtime/core/lib/runtime/distribution-profile-history.js +173 -0
- package/runtime/core/lib/runtime/host-installation.js +200 -0
- package/runtime/core/lib/runtime/plugin-provenance.js +496 -0
- package/runtime/core/lib/skill-dispatch/binding.js +66 -0
- package/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
- package/runtime/core/lib/skill-dispatch/contract.js +430 -0
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
- package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
- package/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
- package/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
- package/runtime/core/lib/skill-dispatch/service.js +833 -0
- package/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
- package/runtime/core/lib/task-target-resolution.js +202 -0
- package/runtime/core/node_modules/entities/LICENSE +11 -0
- package/runtime/core/node_modules/entities/decode.js +3 -0
- package/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
- package/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
- package/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
- package/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
- package/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
- package/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
- package/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
- package/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
- package/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
- package/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
- package/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
- package/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
- package/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
- package/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
- package/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
- package/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
- package/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
- package/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
- package/runtime/core/node_modules/entities/escape.js +3 -0
- package/runtime/core/node_modules/entities/package.json +118 -0
- package/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
- package/runtime/core/node_modules/nanoid/LICENSE +20 -0
- package/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
- package/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
- package/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
- package/runtime/core/node_modules/nanoid/async/index.js +47 -0
- package/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
- package/runtime/core/node_modules/nanoid/async/package.json +12 -0
- package/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
- package/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
- package/runtime/core/node_modules/nanoid/index.browser.js +45 -0
- package/runtime/core/node_modules/nanoid/index.cjs +63 -0
- package/runtime/core/node_modules/nanoid/index.js +63 -0
- package/runtime/core/node_modules/nanoid/nanoid.js +1 -0
- package/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
- package/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
- package/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
- package/runtime/core/node_modules/nanoid/package.json +89 -0
- package/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
- package/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
- package/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
- package/runtime/core/node_modules/parse5/LICENSE +19 -0
- package/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
- package/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
- package/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
- package/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
- package/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
- package/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
- package/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
- package/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
- package/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
- package/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
- package/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
- package/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
- package/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
- package/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
- package/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
- package/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
- package/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
- package/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
- package/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
- package/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
- package/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
- package/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
- package/runtime/core/node_modules/parse5/dist/index.js +42 -0
- package/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
- package/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
- package/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
- package/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
- package/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
- package/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
- package/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
- package/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
- package/runtime/core/node_modules/parse5/package.json +50 -0
- package/runtime/core/node_modules/picocolors/LICENSE +15 -0
- package/runtime/core/node_modules/picocolors/package.json +25 -0
- package/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
- package/runtime/core/node_modules/picocolors/picocolors.js +75 -0
- package/runtime/core/node_modules/postcss/LICENSE +20 -0
- package/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
- package/runtime/core/node_modules/postcss/lib/comment.js +13 -0
- package/runtime/core/node_modules/postcss/lib/container.js +494 -0
- package/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
- package/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
- package/runtime/core/node_modules/postcss/lib/document.js +33 -0
- package/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
- package/runtime/core/node_modules/postcss/lib/input.js +282 -0
- package/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
- package/runtime/core/node_modules/postcss/lib/list.js +79 -0
- package/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
- package/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
- package/runtime/core/node_modules/postcss/lib/node.js +494 -0
- package/runtime/core/node_modules/postcss/lib/parse.js +42 -0
- package/runtime/core/node_modules/postcss/lib/parser.js +626 -0
- package/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
- package/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
- package/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
- package/runtime/core/node_modules/postcss/lib/processor.js +67 -0
- package/runtime/core/node_modules/postcss/lib/result.js +42 -0
- package/runtime/core/node_modules/postcss/lib/root.js +76 -0
- package/runtime/core/node_modules/postcss/lib/rule.js +27 -0
- package/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
- package/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
- package/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
- package/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
- package/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
- package/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
- package/runtime/core/node_modules/postcss/lib/warning.js +47 -0
- package/runtime/core/node_modules/postcss/package.json +88 -0
- package/runtime/core/node_modules/source-map-js/LICENSE +28 -0
- package/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
- package/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
- package/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
- package/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
- package/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
- package/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
- package/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
- package/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
- package/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
- package/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
- package/runtime/core/node_modules/source-map-js/package.json +71 -0
- package/runtime/core/node_modules/source-map-js/source-map.js +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +0 -506
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +0 -68
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +0 -97
- package/generated/plugins/copilot/agdf/copilot-skills/agdf-gate-check/SKILL.md +0 -240
- package/generated/plugins/copilot/agdf/copilot-skills/agdf-interaction-locales.json +0 -512
- package/generated/plugins/copilot/agdf/copilot-skills/agdf-qa-gate/SKILL.md +0 -137
- package/generated/plugins/copilot/agdf/copilot-skills/agdf-runtime-contract.md +0 -16
- package/generated/plugins/copilot/agdf/copilot-skills/agdf-ux-intent-definition/SKILL.md +0 -94
- package/generated/plugins/copilot/agdf/copilot-skills/contracts/interaction.md +0 -487
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +0 -506
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +0 -68
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +0 -97
- package/lib/control-evaluation/gate-check.js +0 -506
- package/lib/control-state/run-state-repository.js +0 -68
- package/lib/control-state/run-state-writer.js +0 -97
- package/lib/proportionality-benchmark/blind-prompt.js +0 -38
- package/lib/proportionality-benchmark/contracts.js +0 -129
- package/lib/proportionality-benchmark/corpus-loader.js +0 -221
- package/lib/proportionality-benchmark/evaluator.js +0 -260
- package/lib/proportionality-benchmark/index.js +0 -8
- package/lib/proportionality-benchmark/live-recorder.js +0 -122
- package/lib/proportionality-benchmark/profiles.js +0 -102
- package/lib/proportionality-benchmark/report.js +0 -60
- package/lib/proportionality-benchmark/source-fingerprint.js +0 -34
- package/lib/public-plugin/builder.js +0 -83
- package/lib/public-plugin/contract.js +0 -102
- package/lib/public-plugin/copilot-profile.js +0 -126
- package/lib/public-plugin/manifest.js +0 -104
- package/lib/public-plugin/report.js +0 -33
- package/lib/public-plugin/validator.js +0 -101
- package/lib/release/profile-history.js +0 -222
- package/lib/release/version-bump.js +0 -527
- package/lib/release/version-coherence.js +0 -137
- package/lib/skill-evals/artefact-quality.js +0 -36
- package/lib/skill-evals/index.js +0 -105
- package/lib/skill-evals/live-recorder.js +0 -85
- package/lib/skill-evals/workspace.js +0 -97
- /package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/context-graph.md +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
- /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
- /package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/fs-swap.js +0 -0
- /package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/runtime/distribution-profile-history.js +0 -0
- /package/generated/plugins/copilot/agdf/{hooks/copilot-hooks.json → com.github.copilot/hooks/hooks.json} +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
- /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
- /package/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
- /package/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
- /package/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
- /package/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
- /package/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
- /package/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
- /package/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
- /package/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
- /package/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
- /package/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { readFileSync, statSync } from '../control-read/fs.js';
|
|
2
|
+
import { containedRegularFile, hasSymlinkComponent, isSafeControlRelativePath } from './contained-file.js';
|
|
3
|
+
import { canonicalJson, digest, exactObject, DIGEST_PATTERN } from './approval-command-contract.js';
|
|
4
|
+
import { canonicalRunText } from './run-text.js';
|
|
5
|
+
import { readAcceptanceCriteria } from '../control-evaluation/acceptance-criteria.js';
|
|
6
|
+
import { renderPreview, PREVIEW_RENDER_LIMIT } from './preview-render.js';
|
|
7
|
+
|
|
8
|
+
export const PREVIEW_LIMITS = Object.freeze({ descriptor: 16384, files: 32, file: 131072, total: 1048576, rendered: PREVIEW_RENDER_LIMIT, chunk: 131072 });
|
|
9
|
+
export const PREVIEW_REVIEW_FORMAT = Object.freeze({ section: 'Preview Review', fence: 'json', schema_version: '1',
|
|
10
|
+
fields: Object.freeze(['schema_version', 'version', 'source_ur_digest', 'entry', 'files', 'review_task', 'scenarios', 'criterion_ids', 'open_questions']),
|
|
11
|
+
file_fields: Object.freeze(['path', 'digest', 'bytes', 'media_type']), limits: PREVIEW_LIMITS,
|
|
12
|
+
entry: '.agdf/control/artefacts/<run_id>/previews/<short-name-vN>/index.html', digest_rule: 'raw bytes for files; canonical approved UR text for source_ur_digest',
|
|
13
|
+
});
|
|
14
|
+
export const previewError = code => { throw Error(`preview_${code}`); };
|
|
15
|
+
const text = (value, max = 1200) => typeof value === 'string' && !!value.trim() && value.length <= max && !/[\u0000-\u0008\u000b\u000c\u000e-\u001f]/u.test(value);
|
|
16
|
+
const media = new Set(['text/html', 'text/css', 'text/javascript', 'image/png', 'image/jpeg', 'image/webp', 'image/gif', 'image/svg+xml']);
|
|
17
|
+
|
|
18
|
+
// Initial metadata only. Examples, later prose and code blocks cannot declare a requirement.
|
|
19
|
+
export function previewRequirement(content) {
|
|
20
|
+
const header = String(content).replace(/^\uFEFF/u, '').split(/^##[ \t]/mu)[0];
|
|
21
|
+
const lines = header.split(/\r?\n/u), fields = [];
|
|
22
|
+
let fence = false;
|
|
23
|
+
for (const line of lines) {
|
|
24
|
+
if (/^\s*(?:```|~~~)/u.test(line)) { fence = !fence; continue; }
|
|
25
|
+
if (!fence && /^Preview requirement:/u.test(line)) fields.push(line.slice(20).trim());
|
|
26
|
+
}
|
|
27
|
+
if (fields.length > 1 || fields.some(value => !['none', 'before_prd_interactive'].includes(value))) previewError('requirement_invalid');
|
|
28
|
+
return fields[0] === 'before_prd_interactive';
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// Reject duplicate JSON keys before JSON.parse can discard their first value.
|
|
32
|
+
function uniqueJson(source) {
|
|
33
|
+
let offset = 0;
|
|
34
|
+
const ws = () => { while (/\s/u.test(source[offset] ?? '') && offset < source.length) ++offset; };
|
|
35
|
+
const string = () => {
|
|
36
|
+
const start = offset++;
|
|
37
|
+
while (offset < source.length) { const c = source[offset++]; if (c === '\\') ++offset; else if (c === '"') return JSON.parse(source.slice(start, offset)); }
|
|
38
|
+
previewError('descriptor_invalid');
|
|
39
|
+
};
|
|
40
|
+
const value = (depth = 0) => {
|
|
41
|
+
if (depth > 32) previewError('descriptor_invalid');
|
|
42
|
+
ws(); const c = source[offset];
|
|
43
|
+
if (c === '"') { string(); return; }
|
|
44
|
+
if (c === '{' || c === '[') {
|
|
45
|
+
++offset; ws(); const end = c === '{' ? '}' : ']', names = new Set();
|
|
46
|
+
if (source[offset] === end) { ++offset; return; }
|
|
47
|
+
for (;;) {
|
|
48
|
+
ws();
|
|
49
|
+
if (c === '{') { if (source[offset] !== '"') previewError('descriptor_invalid'); const key = string(); if (names.has(key)) previewError('descriptor_duplicate_key'); names.add(key); ws(); if (source[offset++] !== ':') previewError('descriptor_invalid'); }
|
|
50
|
+
value(depth + 1); ws(); if (source[offset] === end) { ++offset; return; }
|
|
51
|
+
if (source[offset++] !== ',') previewError('descriptor_invalid');
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const primitive = source.slice(offset).match(/^(?:true|false|null|-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)/u)?.[0];
|
|
55
|
+
if (!primitive) previewError('descriptor_invalid'); offset += primitive.length;
|
|
56
|
+
};
|
|
57
|
+
try { value(); ws(); if (offset !== source.length) previewError('descriptor_invalid'); return JSON.parse(source); }
|
|
58
|
+
catch (error) { if (error.message.startsWith('preview_')) throw error; previewError('descriptor_invalid'); }
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
function descriptorSource(content) {
|
|
62
|
+
const lines = String(content).replace(/\r\n?/gu, '\n').split('\n');
|
|
63
|
+
let fence = null, section = false, seen = 0, collecting = false, closed = false, html = false;
|
|
64
|
+
const body = [];
|
|
65
|
+
for (const line of lines) {
|
|
66
|
+
if (collecting) { if (line === '```') { collecting = false; closed = true; } else body.push(line); continue; }
|
|
67
|
+
if (fence) { if (line.startsWith(fence)) fence = null; continue; }
|
|
68
|
+
if (/^<!--/u.test(line)) html = true;
|
|
69
|
+
if (html) { if (line.includes('-->')) html = false; continue; }
|
|
70
|
+
if (/^## /u.test(line)) { section = line.trim() === '## Preview Review'; if (section) ++seen; continue; }
|
|
71
|
+
if (section && line === '```json') { if (closed) previewError('descriptor_invalid'); collecting = true; continue; }
|
|
72
|
+
const mark = line.match(/^ {0,3}(`{3,}|~{3,})/u)?.[1];
|
|
73
|
+
if (mark) { fence = mark; if (section) previewError('descriptor_invalid'); continue; }
|
|
74
|
+
if (section && line.trim()) previewError('descriptor_invalid');
|
|
75
|
+
}
|
|
76
|
+
if (!seen) return null;
|
|
77
|
+
if (seen !== 1 || !closed || collecting) previewError('descriptor_invalid');
|
|
78
|
+
const source = body.join('\n');
|
|
79
|
+
if (Buffer.byteLength(source) > PREVIEW_LIMITS.descriptor) previewError('descriptor_limit');
|
|
80
|
+
return uniqueJson(source);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function validatePreviewDescriptor(row, runId, criteria, urDigest) {
|
|
84
|
+
if (Buffer.byteLength(canonicalJson(row)) > PREVIEW_LIMITS.descriptor) previewError('descriptor_limit');
|
|
85
|
+
if (!exactObject(row, PREVIEW_REVIEW_FORMAT.fields)
|
|
86
|
+
|| row.schema_version !== '1' || !/^[a-z][a-z0-9-]{0,63}-v[1-9][0-9]{0,5}$/u.test(row.version ?? '')
|
|
87
|
+
|| !DIGEST_PATTERN.test(row.source_ur_digest ?? '') || urDigest && row.source_ur_digest !== urDigest
|
|
88
|
+
|| !text(row.review_task) || !Array.isArray(row.scenarios) || !row.scenarios.length || row.scenarios.length > 16
|
|
89
|
+
|| !row.scenarios.every(v => text(v, 240)) || !Array.isArray(row.open_questions) || row.open_questions.length > 16 || !row.open_questions.every(v => text(v))
|
|
90
|
+
|| !Array.isArray(row.criterion_ids) || !row.criterion_ids.length || row.criterion_ids.length > 64
|
|
91
|
+
|| new Set(row.criterion_ids).size !== row.criterion_ids.length || !row.criterion_ids.every(id => /^[A-Z][A-Z0-9-]*$/u.test(id) && (!criteria || criteria.includes(id)))
|
|
92
|
+
|| !Array.isArray(row.files) || !row.files.length || row.files.length > PREVIEW_LIMITS.files) previewError('descriptor_invalid');
|
|
93
|
+
const prefix = `.agdf/control/artefacts/${runId}/previews/${row.version}/`;
|
|
94
|
+
if (row.entry !== prefix + 'index.html') previewError('entry_invalid');
|
|
95
|
+
let previous = '', total = 0;
|
|
96
|
+
for (const file of row.files) {
|
|
97
|
+
if (!exactObject(file, PREVIEW_REVIEW_FORMAT.file_fields) || !isSafeControlRelativePath(file.path)
|
|
98
|
+
|| !file.path.startsWith(prefix) || /[%?#\s<>"']/u.test(file.path) || file.path <= previous
|
|
99
|
+
|| !DIGEST_PATTERN.test(file.digest ?? '') || !Number.isSafeInteger(file.bytes) || file.bytes < 1 || file.bytes > PREVIEW_LIMITS.file
|
|
100
|
+
|| !media.has(file.media_type)) previewError('file_binding_invalid');
|
|
101
|
+
previous = file.path; total += file.bytes;
|
|
102
|
+
}
|
|
103
|
+
if (total > PREVIEW_LIMITS.total || row.files.find(f => f.path === row.entry)?.media_type !== 'text/html') previewError('file_limit');
|
|
104
|
+
return row;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function readPreviewBytes(root, path) {
|
|
108
|
+
if (hasSymlinkComponent(root, path)) previewError('path_unsafe');
|
|
109
|
+
const file = containedRegularFile(root, path);
|
|
110
|
+
if (file.status !== 'valid' || statSync(file.path).size > PREVIEW_LIMITS.file) previewError('file_unavailable');
|
|
111
|
+
const bytes = readFileSync(file.path);
|
|
112
|
+
if (bytes.length > PREVIEW_LIMITS.file) previewError('file_limit');
|
|
113
|
+
return bytes;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function inspectPreviewReview(root, { runId, urContent, prdContent, readBytes = path => readPreviewBytes(root, path) }) {
|
|
117
|
+
const required = previewRequirement(urContent), descriptor = descriptorSource(prdContent);
|
|
118
|
+
if (!descriptor) { if (required) previewError('descriptor_missing'); return null; }
|
|
119
|
+
const criteria = readAcceptanceCriteria(prdContent);
|
|
120
|
+
if (criteria.diagnostics.length) previewError('criteria_invalid');
|
|
121
|
+
validatePreviewDescriptor(descriptor, runId, criteria.ids, digest(canonicalRunText(urContent)));
|
|
122
|
+
const files = descriptor.files.map(file => {
|
|
123
|
+
const bytes = readBytes(file.path);
|
|
124
|
+
if (!Buffer.isBuffer(bytes) || bytes.length !== file.bytes || digest(bytes) !== file.digest) previewError('file_changed');
|
|
125
|
+
return { ...file, data: bytes };
|
|
126
|
+
});
|
|
127
|
+
const html = renderPreview(descriptor, files);
|
|
128
|
+
if (Buffer.byteLength(html) > PREVIEW_LIMITS.rendered) previewError('render_limit');
|
|
129
|
+
return { descriptor, descriptor_digest: digest(canonicalJson(descriptor)), files, html, rendered_digest: digest(html), rendered_bytes: Buffer.byteLength(html) };
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function previewForState(root, state, { readBytes } = {}) {
|
|
133
|
+
const runId = state.run_id ?? state.meta?.run_id;
|
|
134
|
+
const read = type => { const path = state.artefacts.get(type)?.path?.replace(/^`|`$/gu, ''); return path ? (readBytes ? readBytes(path) : readPreviewBytes(root, path)).toString('utf8') : ''; };
|
|
135
|
+
return inspectPreviewReview(root, { runId, urContent: read('UR'), prdContent: read('PRD'), readBytes });
|
|
136
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { closeSync, constants, fsyncSync, openSync, writeFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { canonicalJson, digest, exactObject, DIGEST_PATTERN } from './approval-command-contract.js';
|
|
4
|
+
import { PREVIEW_LIMITS, previewError, readPreviewBytes, validatePreviewDescriptor } from './preview-review.js';
|
|
5
|
+
import { canonicalRunText } from './run-text.js';
|
|
6
|
+
import { readFileSync, statSync } from '../control-read/fs.js';
|
|
7
|
+
import { containedRegularFile, hasSymlinkComponent } from './contained-file.js';
|
|
8
|
+
|
|
9
|
+
const prefix = (runId, id) => `.agdf/control/runs/${runId}/presentations/${id}`;
|
|
10
|
+
export function previewSnapshotBinding(preview, runId, id) {
|
|
11
|
+
const start = prefix(runId, id), bytes = Buffer.from(preview.html);
|
|
12
|
+
const chunks = [];
|
|
13
|
+
for (let offset = 0; offset < bytes.length; offset += PREVIEW_LIMITS.chunk) {
|
|
14
|
+
const data = bytes.subarray(offset, offset + PREVIEW_LIMITS.chunk);
|
|
15
|
+
chunks.push({ snapshot: `${start}.preview-${chunks.length}`, bytes: data.length, digest: digest(data) });
|
|
16
|
+
}
|
|
17
|
+
return { descriptor: preview.descriptor, descriptor_digest: preview.descriptor_digest, renderer_policy: 1,
|
|
18
|
+
rendered_digest: preview.rendered_digest, rendered_bytes: preview.rendered_bytes,
|
|
19
|
+
files: preview.files.map((file, index) => ({ ...preview.descriptor.files[index], snapshot: `${start}.preview-file-${index}` })), chunks };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function validPreviewSnapshot(row, runId, id) {
|
|
23
|
+
try {
|
|
24
|
+
if (!exactObject(row, ['descriptor', 'descriptor_digest', 'renderer_policy', 'rendered_digest', 'rendered_bytes', 'files', 'chunks'])
|
|
25
|
+
|| row.renderer_policy !== 1 || row.descriptor_digest !== digest(canonicalJson(row.descriptor))
|
|
26
|
+
|| !DIGEST_PATTERN.test(row.rendered_digest ?? '') || !Number.isSafeInteger(row.rendered_bytes)
|
|
27
|
+
|| row.rendered_bytes < 1 || row.rendered_bytes > PREVIEW_LIMITS.rendered) return false;
|
|
28
|
+
validatePreviewDescriptor(row.descriptor, runId);
|
|
29
|
+
const start = prefix(runId, id);
|
|
30
|
+
if (!Array.isArray(row.files) || row.files.length !== row.descriptor.files.length
|
|
31
|
+
|| row.files.some((file, index) => !exactObject(file, ['path', 'digest', 'bytes', 'media_type', 'snapshot'])
|
|
32
|
+
|| file.snapshot !== `${start}.preview-file-${index}`
|
|
33
|
+
|| canonicalJson(Object.fromEntries(Object.entries(file).filter(([key]) => key !== 'snapshot'))) !== canonicalJson(row.descriptor.files[index]))) return false;
|
|
34
|
+
if (!Array.isArray(row.chunks) || !row.chunks.length || row.chunks.length > 16
|
|
35
|
+
|| row.chunks.some((chunk, index) => !exactObject(chunk, ['snapshot', 'bytes', 'digest']) || chunk.snapshot !== `${start}.preview-${index}`
|
|
36
|
+
|| !Number.isSafeInteger(chunk.bytes) || chunk.bytes < 1 || chunk.bytes > PREVIEW_LIMITS.chunk || !DIGEST_PATTERN.test(chunk.digest ?? '')
|
|
37
|
+
|| index < row.chunks.length - 1 && chunk.bytes !== PREVIEW_LIMITS.chunk)
|
|
38
|
+
|| row.chunks.reduce((total, chunk) => total + chunk.bytes, 0) !== row.rendered_bytes) return false;
|
|
39
|
+
return true;
|
|
40
|
+
} catch { return false; }
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export function publishPreviewSnapshot(root, record, preview, { resume = false, checkpoint = () => {} } = {}) {
|
|
44
|
+
const binding = record.preview_review;
|
|
45
|
+
if (!binding) return;
|
|
46
|
+
const html = Buffer.from(preview.html);
|
|
47
|
+
const outputs = [...binding.files.map((file, i) => ({ ...file, data: preview.files[i].data })),
|
|
48
|
+
...binding.chunks.map((chunk, i) => ({ ...chunk, data: html.subarray(i * PREVIEW_LIMITS.chunk, i * PREVIEW_LIMITS.chunk + chunk.bytes) })),
|
|
49
|
+
{ snapshot: prefix(record.run_id, record.presentation_id) + '.preview.html', digest: binding.rendered_digest, bytes: html.length, data: html }];
|
|
50
|
+
for (const output of outputs) {
|
|
51
|
+
let fd;
|
|
52
|
+
try { fd = openSync(join(root, output.snapshot), constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | (constants.O_NOFOLLOW ?? 0), 0o600); }
|
|
53
|
+
catch (error) {
|
|
54
|
+
if (error.code !== 'EEXIST' || !resume) throw error;
|
|
55
|
+
const old = output.snapshot.endsWith('.html') ? readStandalone(root, record) : readPreviewBytes(root, output.snapshot);
|
|
56
|
+
if (old.length !== output.bytes || digest(old) !== output.digest) previewError('snapshot_invalid');
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
try { writeFileSync(fd, output.data); fsyncSync(fd); } finally { closeSync(fd); }
|
|
60
|
+
checkpoint('presentation_preview_file_published');
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function readPreviewSnapshot(root, record, { readBytes = path => readPreviewBytes(root, path), current = false } = {}) {
|
|
65
|
+
const row = record.preview_review;
|
|
66
|
+
if (record.schema_version !== 5 || !validPreviewSnapshot(row, record.run_id, record.presentation_id)) previewError('snapshot_invalid');
|
|
67
|
+
for (const file of row.files) {
|
|
68
|
+
const bytes = readBytes(file.snapshot);
|
|
69
|
+
if (!bytes || bytes.length !== file.bytes || digest(bytes) !== file.digest) previewError('snapshot_changed');
|
|
70
|
+
if (current) { const live = readBytes(file.path); if (!live || live.length !== file.bytes || digest(live) !== file.digest) previewError('file_changed'); }
|
|
71
|
+
}
|
|
72
|
+
const chunks = row.chunks.map(chunk => {
|
|
73
|
+
const bytes = readBytes(chunk.snapshot);
|
|
74
|
+
if (!bytes || bytes.length !== chunk.bytes || digest(bytes) !== chunk.digest) previewError('snapshot_changed');
|
|
75
|
+
return bytes;
|
|
76
|
+
});
|
|
77
|
+
const bytes = Buffer.concat(chunks);
|
|
78
|
+
if (bytes.length !== row.rendered_bytes || digest(bytes) !== row.rendered_digest) previewError('snapshot_changed');
|
|
79
|
+
return bytes;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function validateCurrentPreviewRecord(root, record) {
|
|
83
|
+
if (record.schema_version !== 5) return;
|
|
84
|
+
readPreviewSnapshot(root, record, { current: true });
|
|
85
|
+
readStandalone(root, record);
|
|
86
|
+
const base = `.agdf/control/artefacts/${record.run_id}/`;
|
|
87
|
+
if (digest(readPreviewBytes(root, base + 'PRD.md')) !== record.document_digest
|
|
88
|
+
|| digest(canonicalRunText(readPreviewBytes(root, base + 'UR.md').toString('utf8'))) !== record.preview_review.descriptor.source_ur_digest) previewError('source_changed');
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
// A checked full-document access copy. The immutable chunk set remains the
|
|
92
|
+
// historical authority; archives reconstruct it without this derived cache.
|
|
93
|
+
function readStandalone(root, record) {
|
|
94
|
+
const path = prefix(record.run_id, record.presentation_id) + '.preview.html', file = containedRegularFile(root, path);
|
|
95
|
+
if (hasSymlinkComponent(root, path) || file.status !== 'valid' || statSync(file.path).size !== record.preview_review.rendered_bytes) previewError('standalone_unavailable');
|
|
96
|
+
const bytes = readFileSync(file.path);
|
|
97
|
+
if (bytes.length > PREVIEW_LIMITS.rendered || digest(bytes) !== record.preview_review.rendered_digest) previewError('standalone_changed');
|
|
98
|
+
return bytes;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Proof readers may be archive-bound. Never repair history with live filesystem bytes.
|
|
102
|
+
export function previewProof(record, { rawFileDigest, fileDigest }) {
|
|
103
|
+
const row = record.preview_review;
|
|
104
|
+
if (!validPreviewSnapshot(row, record.run_id, record.presentation_id)) return false;
|
|
105
|
+
if (row.files.some(file => rawFileDigest(file.snapshot) !== file.digest || rawFileDigest(file.path) !== file.digest)
|
|
106
|
+
|| row.chunks.some(chunk => rawFileDigest(chunk.snapshot) !== chunk.digest)) return false;
|
|
107
|
+
return fileDigest(`.agdf/control/artefacts/${record.run_id}/UR.md`) === row.descriptor.source_ur_digest;
|
|
108
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { canonicalJson, digest, exactObject } from './approval-command-contract.js';
|
|
2
|
+
import { inspectQaReports } from '../control-evaluation/qa-follow-up.js';
|
|
3
|
+
import { interactionLocales } from '../resources/context.js';
|
|
4
|
+
|
|
5
|
+
const fields = ['schema_version', 'reviewer', 'usage_scope', 'deviations'];
|
|
6
|
+
const itemFields = ['finding_id', 'severity', 'risk', 'consequence', 'follow_up', 'owner'];
|
|
7
|
+
const concrete = (value, limit = 600) => typeof value === 'string' && value.trim().length > 0
|
|
8
|
+
&& value.length <= limit && !/^(?:tbd|todo|none|<)/iu.test(value.trim());
|
|
9
|
+
const outcome = text => [...text.matchAll(/^- decision:[ \t]*(pass|passed|revise|block)[ \t]*$/gmu)].map(row => row[1]);
|
|
10
|
+
|
|
11
|
+
// The existing QA report owns the proposal. It is never a second approval ledger,
|
|
12
|
+
// a caller override flag, a passing test result or proof of native qualification.
|
|
13
|
+
export function inspectQaDeviationAcceptance(root, state, readArtefact) {
|
|
14
|
+
const unavailable = reason => ({ eligible: false, accepted: false, reason });
|
|
15
|
+
const qa = state.artefacts.get('QA');
|
|
16
|
+
if (qa?.status !== 'revise' || !qa.path) return unavailable('qa_deviation_proposal_not_applicable');
|
|
17
|
+
const text = readArtefact(qa.path);
|
|
18
|
+
if (typeof text !== 'string' || !text.includes('## QA Deviation Acceptance')) return unavailable('qa_deviation_proposal_missing');
|
|
19
|
+
try {
|
|
20
|
+
if (!['UR', 'PRD', 'SD', 'TP'].every(gate => state.approvals.get(gate)?.status === 'approved')
|
|
21
|
+
|| !['Brownfield Analysis', 'CD+Tests', 'CR', 'Clean Implementation Review', 'TP Review'].every(step => {
|
|
22
|
+
const row = state.artefacts.get(step) ?? state.artefacts.get({ CR: 'Code Review', 'Clean Implementation Review': 'Clean Review' }[step]);
|
|
23
|
+
return row?.path && ['done', ...(step === 'TP Review' ? ['revise'] : [])].includes(row.status);
|
|
24
|
+
})) return unavailable('qa_deviation_prerequisites_incomplete');
|
|
25
|
+
if (!['QA', 'CR', 'Clean Implementation Review', 'TP Review'].every(step =>
|
|
26
|
+
state.evidence_applicability?.by_step.get(step)?.applicability === 'current')) return unavailable('qa_deviation_evidence_not_current');
|
|
27
|
+
for (const step of ['CR', 'Clean Implementation Review']) {
|
|
28
|
+
const row = state.artefacts.get(step) ?? state.artefacts.get({ CR: 'Code Review', 'Clean Implementation Review': 'Clean Review' }[step]);
|
|
29
|
+
const decisions = outcome(readArtefact(row.path) ?? '');
|
|
30
|
+
if (decisions.length !== 1 || !['pass', 'passed'].includes(decisions[0])) return unavailable('qa_deviation_protected_review_not_pass');
|
|
31
|
+
}
|
|
32
|
+
if ([...(state.missing_evidence ?? []), ...(state.risks ?? [])].some(row => row.impact === 'block')) return unavailable('qa_deviation_hard_blocker');
|
|
33
|
+
const sections = text.split(/^## QA Deviation Acceptance\s*$/mu);
|
|
34
|
+
if (sections.length !== 2) return unavailable('qa_deviation_proposal_invalid');
|
|
35
|
+
const section = sections[1].split(/^## /mu)[0].trim();
|
|
36
|
+
const match = section.match(/^```json\s*\n([\s\S]*?)\n```$/u);
|
|
37
|
+
if (!match || Buffer.byteLength(match[1]) > 16000) return unavailable('qa_deviation_proposal_invalid');
|
|
38
|
+
const proposal = JSON.parse(match[1]);
|
|
39
|
+
if (!exactObject(proposal, fields) || proposal.schema_version !== '1' || !concrete(proposal.reviewer, 200)
|
|
40
|
+
|| !concrete(proposal.usage_scope) || !Array.isArray(proposal.deviations) || !proposal.deviations.length || proposal.deviations.length > 16
|
|
41
|
+
|| !proposal.deviations.every(row => exactObject(row, itemFields) && /^[A-Za-z0-9][A-Za-z0-9._-]{0,127}$/u.test(row.finding_id ?? '')
|
|
42
|
+
&& ['low', 'medium'].includes(row.severity) && ['risk', 'consequence', 'follow_up', 'owner'].every(field => concrete(row[field])))) return unavailable('qa_deviation_proposal_invalid');
|
|
43
|
+
const ids = proposal.deviations.map(row => row.finding_id);
|
|
44
|
+
if (new Set(ids).size !== ids.length) return unavailable('qa_deviation_proposal_invalid');
|
|
45
|
+
const observations = inspectQaReports(root, state, state.run_id, 'revise', 64, true, { readArtefact });
|
|
46
|
+
if (observations.kind !== 'evidence' || observations.findings.some(row => row.target !== 'evidence_obligation')) return unavailable('qa_deviation_hard_blocker');
|
|
47
|
+
const described = new Map();
|
|
48
|
+
for (const row of observations.findings) {
|
|
49
|
+
const statement = canonicalJson({ target: row.target, evidence: row.evidence, action: row.action });
|
|
50
|
+
if (described.has(row.id) && described.get(row.id) !== statement) return unavailable('qa_deviation_scope_ambiguous');
|
|
51
|
+
described.set(row.id, statement);
|
|
52
|
+
}
|
|
53
|
+
const open = new Set(observations.findings.map(row => row.id));
|
|
54
|
+
if (open.size !== ids.length || ids.some(id => !open.has(id))) return unavailable('qa_deviation_scope_incomplete');
|
|
55
|
+
const acceptanceDigest = digest(`agdf-qa-deviation-acceptance/1\0${canonicalJson({ proposal, sources: observations.sources })}`);
|
|
56
|
+
const decided = state.presentation_decisions?.get('QA');
|
|
57
|
+
const acceptance = decided?.receipt?.effect?.qa_acceptance;
|
|
58
|
+
const accepted = state.approvals.get('QA')?.status === 'approved' && decided?.decided === true
|
|
59
|
+
&& decided.action === 'approve' && acceptance?.kind === 'accepted_with_deviations' && acceptance.digest === acceptanceDigest
|
|
60
|
+
&& canonicalJson(acceptance.deviation_ids) === canonicalJson(ids);
|
|
61
|
+
return { eligible: true, accepted, digest: acceptanceDigest, proposal, sources: observations.sources, qa_outcome: 'revise' };
|
|
62
|
+
} catch { return unavailable('qa_deviation_proposal_invalid'); }
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function qaDeviationPresentation(acceptance, language) {
|
|
66
|
+
if (!acceptance?.eligible) return null;
|
|
67
|
+
const german = String(language).toLowerCase().startsWith('de');
|
|
68
|
+
const labels = (german ? interactionLocales.locales.de : interactionLocales.locales.en).decisionCard;
|
|
69
|
+
const { proposal } = acceptance;
|
|
70
|
+
const summary = [acceptance.accepted ? labels.confirmedWithDeviations : labels.deviationAcceptanceIntro,
|
|
71
|
+
`${german ? 'Geltungsbereich' : 'Usage scope'}: ${proposal.usage_scope}`,
|
|
72
|
+
...proposal.deviations.map(row => `- ${row.finding_id} (${german ? { low: 'gering', medium: 'mittel' }[row.severity] : row.severity}): ${row.risk}\n ${german ? 'Folge' : 'Consequence'}: ${row.consequence}\n ${german ? 'Nacharbeit' : 'Follow-up'}: ${row.follow_up}\n ${german ? 'Verantwortlich' : 'Owner'}: ${row.owner}`),
|
|
73
|
+
acceptance.accepted ? (german
|
|
74
|
+
? 'Diese Abweichungen wurden für die vorgelegte Fassung ausdrücklich akzeptiert. Der QA-Befund bleibt „Nachbessern“; fehlende Prüfungen und native Produktionsqualifikation sind nicht bestanden.'
|
|
75
|
+
: 'These deviations were explicitly accepted for the presented version. The QA result remains revise; missing tests and native production qualification are not marked passed.')
|
|
76
|
+
: (german ? 'Der QA-Befund bleibt „Nachbessern“. Mit deiner Freigabe akzeptierst du diese Abweichungen und deren Folgen; anschließend folgt UAT. Fehlende Prüfungen und native Produktionsqualifikation sind damit nicht bestanden.'
|
|
77
|
+
: 'The QA result remains revise. Your approval accepts these deviations and their consequences; UAT follows. Missing tests and native production qualification are not marked passed.')].join('\n\n');
|
|
78
|
+
return { kind: 'accepted_with_deviations', digest: acceptance.digest, summary,
|
|
79
|
+
approve_label: labels.approveWithDeviations, confirmed_label: labels.confirmedWithDeviations,
|
|
80
|
+
effect: german ? 'Du akzeptierst die aufgeführten Abweichungen. Als Nächstes folgt UAT.'
|
|
81
|
+
: 'You accept the listed deviations. UAT follows.' };
|
|
82
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Field contracts shared by the existing recording/revision owners and selected Inspect
|
|
2
|
+
// descriptors. These describe review input; they do not manufacture review findings.
|
|
3
|
+
export const REVIEWED_REQUEST_FIELDS = Object.freeze(['schema_version', 'target_id', 'run_id', 'expected_revision_id', 'destination', 'source', 'relationship', 'review', 'update_draft']);
|
|
4
|
+
export const REVIEW_PROOF_FIELDS = Object.freeze(['schema_version', 'target_id', 'run_id', 'relationship', 'destination', 'source', 'reviewer', 'reviewed']);
|
|
5
|
+
export const REVISION_PROPOSAL_FIELDS = Object.freeze(['schema_version', 'target_id', 'run_id', 'expected_revision_id', 'operation_id', 'source_gate', 'reason', 'intended_change', 'sources', 'impact_assessment']);
|
|
6
|
+
export const REVISION_IMPACT_FIELDS = Object.freeze(['reviewer', 'earliest_source', 'upstream', 'analyses', 'implementation_evidence', 'unresolved']);
|
|
7
|
+
export const REVISION_UPSTREAM_FIELDS = Object.freeze(['type', 'path', 'digest', 'rationale']);
|
|
8
|
+
export const REVISION_ANALYSIS_FIELDS = Object.freeze(['type', 'disposition', 'path', 'digest', 'reason']);
|
|
9
|
+
export const REVISION_PROPOSAL_V2_FIELDS = Object.freeze([...REVISION_PROPOSAL_FIELDS, 'policy_version', 'initiating_phase', 'changed_statements', 'quality_assessment']);
|
|
10
|
+
export const REVISION_STATEMENT_FIELDS = Object.freeze(['type', 'path', 'digest', 'statement', 'intended_change', 'reason']);
|
|
11
|
+
export const REVISION_QUALITY_FIELDS = Object.freeze(['record', 'record_digest', 'operation_id', 'source_set_digest', 'sources', 'association', 'disposition', 'reason']);
|
|
12
|
+
|
|
13
|
+
export const REVIEWED_REQUEST_FORMAT = Object.freeze({ schema_version: '1', fields: REVIEWED_REQUEST_FIELDS,
|
|
14
|
+
references: { destination: ['type', 'path', 'digest', 'status'], source: ['type', 'path', 'digest'], review: ['reviewer', 'path', 'digest'] },
|
|
15
|
+
relationship: 'Use the current gate relationship returned by this descriptor; source must be the current approved exact artefact.',
|
|
16
|
+
review_proof: { fields: REVIEW_PROOF_FIELDS, reviewed: true, equality: 'target/run/relationship/destination/source/reviewer must equal the reviewed request; hash the contained proof after canonical BOM removal and CRLF normalization' },
|
|
17
|
+
update_draft: 'false for first recording; true only for updating the same unapproved recorded draft with fresh reviewed mapping. Never update approved material.',
|
|
18
|
+
scope: 'All request, report and review proof paths belong to .agdf/control/artefacts/<run_id>/; each source is bounded to 131072 bytes.',
|
|
19
|
+
evidence: 'A real reviewed mapping is required. Authoring completeness alone does not prove derivation.' });
|
|
20
|
+
export const REVISION_PROPOSAL_FORMAT = Object.freeze({ schema_version: '1', fields: REVISION_PROPOSAL_FIELDS,
|
|
21
|
+
supported_versions: ['1', '2'], expanded: { schema_version: '2', policy_version: 2, fields: REVISION_PROPOSAL_V2_FIELDS,
|
|
22
|
+
changed_statements: REVISION_STATEMENT_FIELDS, quality_assessment: REVISION_QUALITY_FIELDS,
|
|
23
|
+
initiating_phase: 'Actual current PRD/SD/TP/CD+Tests/QA/pending UAT; choose the earliest approved changed source, never by phase alone.',
|
|
24
|
+
quality: 'Cover every current registered analysis/result and evidence row exactly; bind report, source set, original operation and record digest. Unknown associations require reassess. Use the inspected current facts; no invented dependency proof.' },
|
|
25
|
+
impact_assessment: { fields: REVISION_IMPACT_FIELDS, upstream: REVISION_UPSTREAM_FIELDS, analyses: REVISION_ANALYSIS_FIELDS,
|
|
26
|
+
dispositions: ['retain', 'reassess'], unresolved: [], earliest_source: 'Must match source_gate; unchanged upstream needs actual rationale. UR requires reassess for both applicable analyses.' },
|
|
27
|
+
sources: 'Use the exact current sources returned by the existing preview boundary, in UR/PRD/SD/TP order; the eligible boundary determines the subset.',
|
|
28
|
+
preview: 'Read-only preview returns actual impact, preview_digest and the exact confirmation_selector. Do not derive authorization from a preview.',
|
|
29
|
+
recovery: 'Keep the original UUID, proposal and inspected pending digest/current recovery revision; never submit a new intent to repair the original.' });
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { readOperationSource } from "./run-operation-proof.js";
|
|
2
|
+
import { randomUUID } from "node:crypto";
|
|
3
|
+
import { canonicalJson, exactObject, resolveControlCommandTarget } from "./approval-command-contract.js";
|
|
4
|
+
import { appendArtefactBinding, artefactBindingKey, readArtefactBindings, validArtefactBinding } from "./artefact-bindings.js";
|
|
5
|
+
import { exactApprovedArtefacts, readContainedJson, validateBindingProof } from "./artefact-binding-proof.js";
|
|
6
|
+
import { artefactFileDigest, computeRunSeals, runSealState } from "./run-seal.js";
|
|
7
|
+
import { appendTableRow, upsertTableRow } from "./run-state-edits.js";
|
|
8
|
+
import { relationshipForGate, sameRelationship } from "../control-evaluation/delivery-relationships.js";
|
|
9
|
+
import { readFileSync } from "node:fs";
|
|
10
|
+
import { containedRegularFile } from "./contained-file.js";
|
|
11
|
+
import { readSourceRevisions } from "./run-source-revisions.js";
|
|
12
|
+
import { REVIEWED_REQUEST_FIELDS } from './recording-formats.js';
|
|
13
|
+
import { readReportDecision } from '../control-evaluation/report-decision.js';
|
|
14
|
+
|
|
15
|
+
// Called by run-step with Run and Backlog locks already held. No approval or QA decision owner.
|
|
16
|
+
export function prepareArtefactRecording(root, run, input, control, before) {
|
|
17
|
+
const fail = reason => { throw new Error(reason); };
|
|
18
|
+
const expected = relationshipForGate(input.gate);
|
|
19
|
+
const qaRecording = input.gate === 'QA' && before.current_gate === 'QA'
|
|
20
|
+
&& (before.status === 'open' || before.status === 'blocked' && control.artefacts.get('QA')?.status === 'block');
|
|
21
|
+
if (readSourceRevisions(run.content).present && !qaRecording && before.missing_approval !== `Approval: ${input.gate}` && before.next_operation?.type !== "revise_gate_material") fail("AGDF_ARTEFACT_RECORDING_GATE_INVALID");
|
|
22
|
+
if (!expected || input.gate === "UR" || before.current_gate !== input.gate || before.status !== "open" && !qaRecording
|
|
23
|
+
|| control.approvals.get(input.gate)?.status === "approved") fail("AGDF_ARTEFACT_RECORDING_GATE_INVALID");
|
|
24
|
+
const sourceRequest = input.requestBinding ? readOperationSource(root, input.runId, input.requestBinding) : null;
|
|
25
|
+
const command = readContainedJson(root, input.evidence);
|
|
26
|
+
if (!exactObject(command, REVIEWED_REQUEST_FIELDS)
|
|
27
|
+
|| command.schema_version !== "1" || command.target_id !== resolveControlCommandTarget(root).target_id
|
|
28
|
+
|| command.run_id !== input.runId || command.expected_revision_id !== input.revisionId
|
|
29
|
+
|| typeof command.update_draft !== "boolean" || !exactObject(command.relationship, ["from", "relationship", "to"])
|
|
30
|
+
|| !sameRelationship(command.relationship, expected)) fail("AGDF_ARTEFACT_RECORDING_INPUT_INVALID");
|
|
31
|
+
const bindings = readArtefactBindings(run.content);
|
|
32
|
+
if (!bindings.valid) fail("AGDF_ARTEFACT_BINDINGS_INVALID");
|
|
33
|
+
const candidate = {
|
|
34
|
+
schema_version: input.operationId ? "2" : "1", binding_id: randomUUID(), target_id: command.target_id, run_id: input.runId,
|
|
35
|
+
relationship: command.relationship, destination: command.destination, source: command.source, review: command.review,
|
|
36
|
+
origin: "reviewed_mapping", operation: { id: input.operationId ?? randomUUID(), previous_revision_id: input.revisionId, resulting_revision_id: randomUUID(), revision: Number(run.meta.revision) + 1, ...(input.operationId ? { request_digest: input.requestDigest } : {}) }, supersedes: null,
|
|
37
|
+
};
|
|
38
|
+
const prior = bindings.latest.filter(item => artefactBindingKey(item) === artefactBindingKey(candidate));
|
|
39
|
+
if (prior.length > 1) fail("AGDF_ARTEFACT_BINDINGS_INVALID");
|
|
40
|
+
candidate.supersedes = prior[0]?.binding_id ?? null;
|
|
41
|
+
const source = control.artefacts.get(expected.to);
|
|
42
|
+
if (!validArtefactBinding(candidate) || !source || source.path !== command.source.path || source.status !== "approved"
|
|
43
|
+
|| control.approvals.get(expected.to)?.status !== "approved" || !validateBindingProof(root, candidate)
|
|
44
|
+
|| !exactApprovedArtefacts(root, control)) fail("AGDF_ARTEFACT_BINDING_PROOF_INVALID");
|
|
45
|
+
if (input.gate === "QA") {
|
|
46
|
+
const report = readFileSync(containedRegularFile(root, candidate.destination.path).path, "utf8");
|
|
47
|
+
if (readReportDecision(report) !== candidate.destination.status) fail("AGDF_ARTEFACT_RECORDING_INPUT_INVALID");
|
|
48
|
+
}
|
|
49
|
+
const old = control.artefacts.get(input.gate);
|
|
50
|
+
if (old?.path && old.path !== candidate.destination.path) fail("AGDF_ARTEFACT_RECORDING_INPUT_INVALID");
|
|
51
|
+
const seal = runSealState(root, run.content);
|
|
52
|
+
let draftChange = false;
|
|
53
|
+
if (seal.status === "content_changed" && command.update_draft && (old?.status === "draft"
|
|
54
|
+
|| qaRecording && ['pass', 'revise', 'block'].includes(old?.status))
|
|
55
|
+
&& prior.length === 1 && old.path === prior[0].destination.path && prior[0].destination.digest !== candidate.destination.digest) {
|
|
56
|
+
// Reconstruct the old aggregate seal using only the previously sealed draft digest.
|
|
57
|
+
// Every other bound file and the complete recorded body must still match that seal.
|
|
58
|
+
const restored = computeRunSeals(root, run.content, { artefactDigests: new Map([[old.path, prior[0].destination.digest]]) });
|
|
59
|
+
draftChange = restored.content_seal === seal.recorded.content_seal && restored.approval_seal === seal.recorded.approval_seal;
|
|
60
|
+
}
|
|
61
|
+
if (seal.status !== "valid" && !draftChange) fail("AGDF_RUN_SEAL_INVALID");
|
|
62
|
+
const rows = control.artefact_chain.filter(row => row.from === expected.from);
|
|
63
|
+
if (rows.length > 1 || rows.some(row => !sameRelationship(row, expected))) fail("AGDF_ARTEFACT_BINDING_PROOF_INVALID");
|
|
64
|
+
const evidence = `binding ${candidate.binding_id}; reviewed by ${candidate.review.reviewer}; ${candidate.review.path}`;
|
|
65
|
+
let text = upsertTableRow(run.content, "Artefacts", 0, input.gate, [input.gate, candidate.destination.path, candidate.destination.status, "Reviewed source binding recorded atomically"]);
|
|
66
|
+
text = text && upsertTableRow(text, "Artefact Chain", 0, expected.from, [expected.from, expected.relationship, expected.to, evidence]);
|
|
67
|
+
if (!text) fail("AGDF_ARTEFACT_RECORDING_INPUT_INVALID");
|
|
68
|
+
text = appendArtefactBinding(text, candidate);
|
|
69
|
+
// Proof files are seal-bound too; historical proofs may not be silently rewritten on update.
|
|
70
|
+
text = upsertTableRow(text, "Artefacts", 0, `Binding proof ${candidate.binding_id}`, [`Binding proof ${candidate.binding_id}`, candidate.review.path, "done", "Subordinate reviewed mapping evidence"]);
|
|
71
|
+
text = text && appendTableRow(text, "Evidence", ["Artefact source binding", candidate.review.path, `${expected.from} ${expected.relationship} ${expected.to}; binding ${candidate.binding_id}; operation ${candidate.operation.id}; ${input.revisionId} -> ${candidate.operation.resulting_revision_id}`, "reviewed cooperative mapping"]);
|
|
72
|
+
if (!text) fail("AGDF_ARTEFACT_RECORDING_INPUT_INVALID");
|
|
73
|
+
const snapshot = canonicalJson([candidate, command]);
|
|
74
|
+
return { text, receipt: candidate, nextRevisionId: candidate.operation.resulting_revision_id, allowContentChange: draftChange,
|
|
75
|
+
validateBeforeWrite: () => {
|
|
76
|
+
sourceRequest?.validate();
|
|
77
|
+
if (!validateBindingProof(root, candidate) || !exactApprovedArtefacts(root, control)
|
|
78
|
+
|| canonicalJson([candidate, readContainedJson(root, input.evidence)]) !== snapshot
|
|
79
|
+
|| artefactFileDigest(root, candidate.destination.path) !== candidate.destination.digest) fail("AGDF_ARTEFACT_BINDING_PROOF_INVALID");
|
|
80
|
+
} };
|
|
81
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { join, relative, sep } from "node:path";
|
|
3
|
+
import { parseRunState } from "./run-state-parser.js";
|
|
4
|
+
import { runSealState } from "./run-seal.js";
|
|
5
|
+
import { atomicWrite, withOwnedFileLock, writeRunLocked } from "./run-state-writer.js";
|
|
6
|
+
import { commitRunStepLocked, recoverPendingRunStepLocked, readPendingRunStepJournal } from "./run-step-transaction.js";
|
|
7
|
+
import { pendingRunStepIds } from "./run-step-pending.js";
|
|
8
|
+
import { BACKLOG_RELATIVE_PATH, prepareRunBacklogOrSkip } from "./run-backlog.js";
|
|
9
|
+
import { containedRegularFile, hasSymlinkComponent } from "./contained-file.js";
|
|
10
|
+
import { randomUUID } from "node:crypto";
|
|
11
|
+
import { existsSync } from 'node:fs';
|
|
12
|
+
import { pendingRunStepPath } from './run-step-pending.js';
|
|
13
|
+
import { assertSummarySources } from "../control-evaluation/run-work-summary.js";
|
|
14
|
+
|
|
15
|
+
export function withRunBacklogLock(root, path, work, options = {}) {
|
|
16
|
+
const relativePath = relative(root, path).split(sep).join("/");
|
|
17
|
+
if (hasSymlinkComponent(root, relativePath) || containedRegularFile(root, relativePath).status !== "valid") throw Error("AGDF_RUN_PATH_INVALID");
|
|
18
|
+
// The Run path check covers the shared .agdf/control ancestors, so the sibling Backlog lock is
|
|
19
|
+
// contained. An unusable Backlog file itself is reported by the planner, not by the lock.
|
|
20
|
+
return withOwnedFileLock(path, () => {
|
|
21
|
+
return withOwnedFileLock(join(root, BACKLOG_RELATIVE_PATH), () => {
|
|
22
|
+
const run = parseRunState(readFileSync(path, "utf8"));
|
|
23
|
+
if (!run.valid) throw Error("AGDF_RUN_STATE_INVALID");
|
|
24
|
+
const other = pendingRunStepIds(root).find(id => id !== run.meta.run_id);
|
|
25
|
+
if (other) { const error = Error("AGDF_RUN_STEP_RECOVERY_REQUIRED"); error.pending_run_id = other; throw error; }
|
|
26
|
+
if (options.operationContext && existsSync(pendingRunStepPath(root, run.meta.run_id))) {
|
|
27
|
+
const pending = readPendingRunStepJournal(root, run.meta.run_id), expected = options.operationContext;
|
|
28
|
+
if (pending.schema_version !== 3 || pending.operation_id !== expected.operation_id || pending.kind !== expected.kind
|
|
29
|
+
|| pending.target_id !== expected.target_id || pending.request_digest !== expected.request_digest) throw Error('AGDF_RUN_STEP_RECOVERY_REQUIRED');
|
|
30
|
+
}
|
|
31
|
+
recoverPendingRunStepLocked(root, run.meta.run_id);
|
|
32
|
+
return work();
|
|
33
|
+
});
|
|
34
|
+
}, options);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
// Both locks are held by the caller. The existing journal keeps receipt, seal, revision
|
|
38
|
+
// and Backlog projection recoverable at the same Run commit point.
|
|
39
|
+
export function writeRunWithBacklogLocked(root, path, content, revisionId, options = {}) {
|
|
40
|
+
const old = readFileSync(path, "utf8"), run = parseRunState(old);
|
|
41
|
+
if (!run.valid) throw Error("AGDF_RUN_STATE_INVALID");
|
|
42
|
+
if (run.meta.revision_id !== revisionId || options.expectedContent !== undefined && old !== options.expectedContent) throw Error("AGDF_STALE_RUN_REVISION");
|
|
43
|
+
const nextRevisionId = options.nextRevisionId ?? randomUUID();
|
|
44
|
+
const plan = prepareRunBacklogOrSkip(root, run.meta.run_id, content, path, nextRevisionId);
|
|
45
|
+
const withBacklog = state => ({ ...state, backlog: plan.status, backlog_reason: plan.reason ?? null });
|
|
46
|
+
const guard = () => { if (plan.summary) assertSummarySources(root, plan.summary); };
|
|
47
|
+
if (!plan.update && !options.operationContext) return withBacklog(writeRunLocked(path, content, revisionId, { ...options, nextRevisionId,
|
|
48
|
+
validateBeforeWrite: () => { options.validateBeforeWrite?.(); guard(); } }));
|
|
49
|
+
// Full gate/presentation evaluation still sees the original sealed Run, under both
|
|
50
|
+
// locks. The journal then rechecks its captured source digests and envelope at commit.
|
|
51
|
+
options.validateBeforeWrite?.();
|
|
52
|
+
return withBacklog(commitRunStepLocked(root, { runId: run.meta.run_id, runPath: path, content,
|
|
53
|
+
revisionId, expectedContent: old, backlog: plan.update, or: null,
|
|
54
|
+
operationContext: options.operationContext,
|
|
55
|
+
nextRevisionId,
|
|
56
|
+
writeOptions: { ...options, validateBeforeWrite: () => { options.validateDuringTransaction?.(); guard(); } }, afterWrite: options.afterWrite }));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function writeRunWithBacklog(root, path, content, revisionId, options = {}) {
|
|
60
|
+
return withRunBacklogLock(root, path, () => writeRunWithBacklogLocked(root, path, content, revisionId, options));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// Explicit repair of a valid sealed Run's stale pointer needs only one atomic file write;
|
|
64
|
+
// no fabricated Run revision, new approval or reader-side write is necessary.
|
|
65
|
+
export function synchronizeRunBacklog(root, path, revisionId) {
|
|
66
|
+
return withRunBacklogLock(root, path, () => {
|
|
67
|
+
const content = readFileSync(path, "utf8"), run = parseRunState(content);
|
|
68
|
+
if (!run.valid) throw Error("AGDF_RUN_STATE_INVALID");
|
|
69
|
+
if (run.meta.revision_id !== revisionId) throw Error("AGDF_STALE_RUN_REVISION");
|
|
70
|
+
if (runSealState(root, content).status !== "valid") throw Error("AGDF_RUN_SEAL_INVALID");
|
|
71
|
+
const plan = prepareRunBacklogOrSkip(root, run.meta.run_id, content, path, revisionId);
|
|
72
|
+
if (plan.update) {
|
|
73
|
+
assertSummarySources(root, plan.summary);
|
|
74
|
+
if (readFileSync(path, "utf8") !== content || runSealState(root, content).status !== "valid"
|
|
75
|
+
|| readFileSync(join(root, BACKLOG_RELATIVE_PATH), "utf8") !== plan.update.old) throw Error("AGDF_STALE_RUN_REVISION");
|
|
76
|
+
atomicWrite(join(root, BACKLOG_RELATIVE_PATH), plan.update.next);
|
|
77
|
+
}
|
|
78
|
+
return { meta: run.meta, backlog: plan.status, backlog_reason: plan.reason ?? null };
|
|
79
|
+
});
|
|
80
|
+
}
|
package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { firstSection, tableCells, tableLine, tableLineIndexes } from "./run-state-edits.js";
|
|
4
|
+
import { containedRegularFile, hasSymlinkComponent } from "./contained-file.js";
|
|
5
|
+
import { policyForRunContent } from "../control-evaluation/run-step-policy.js";
|
|
6
|
+
import { runWorkSummary } from "../control-evaluation/run-work-summary.js";
|
|
7
|
+
import { recordBacklogSummary } from "./backlog-summary.js";
|
|
8
|
+
import { parseRunState } from "./run-state-parser.js";
|
|
9
|
+
|
|
10
|
+
export const BACKLOG_RELATIVE_PATH = ".agdf/control/MASTER_BACKLOG.md";
|
|
11
|
+
const compactHeaders = ["priority", "key", "work item", "status", "artefacts", "current spec", "next step"];
|
|
12
|
+
const legacyHeaders = ["prio", "key", "title", "status", "ur", "brownfield review", "prd", "sd", "tp", "qa", "or", "current spec", "notes"];
|
|
13
|
+
const clean = value => value.replaceAll("`", "").trim();
|
|
14
|
+
export const backlogTableLayout = headers => {
|
|
15
|
+
const normalized = headers.map(value => clean(value).toLowerCase()).join("\0");
|
|
16
|
+
return normalized === compactHeaders.join("\0") ? "compact" : normalized === legacyHeaders.join("\0") ? "legacy" : null;
|
|
17
|
+
};
|
|
18
|
+
const SKIPPABLE_BACKLOG_ERRORS = new Map([
|
|
19
|
+
["AGDF_BACKLOG_PATH_INVALID", "backlog_path_invalid"],
|
|
20
|
+
["AGDF_BACKLOG_LAYOUT_UNSUPPORTED", "backlog_layout_unsupported"],
|
|
21
|
+
["AGDF_BACKLOG_IDENTITY_AMBIGUOUS", "backlog_identity_ambiguous"],
|
|
22
|
+
]);
|
|
23
|
+
|
|
24
|
+
// A saved projection of the same policy used by the Run writer, never UR metadata or a
|
|
25
|
+
// reader-side claim of current readiness. Completion still belongs to explicit closeout.
|
|
26
|
+
export function backlogStatusForPolicy(after) {
|
|
27
|
+
if (after.status === "blocked") return "Blocked";
|
|
28
|
+
if (after.current_gate === "UR") return "Needs UR";
|
|
29
|
+
if (after.current_gate === "Brownfield Review") return "Awaiting Brownfield Review";
|
|
30
|
+
if (["PRD", "SD", "TP"].includes(after.current_gate)) return `Awaiting ${after.current_gate}`;
|
|
31
|
+
if (["QA", "UAT"].includes(after.current_gate) && after.missing_approval === `Approval: ${after.current_gate}`) return `Awaiting ${after.current_gate}`;
|
|
32
|
+
if (after.current_gate === "OR") return "Awaiting OR";
|
|
33
|
+
if (["Brownfield Analysis", "CD+Tests", "CR", "Quick Task Execution", "Verified Change Execution", "Mode/Slice Decision"].includes(after.current_gate)) return `${after.current_gate} work pending`;
|
|
34
|
+
return "In Progress";
|
|
35
|
+
}
|
|
36
|
+
export const backlogStatusForSummary = (summary, after) =>
|
|
37
|
+
["work_pending", "approval_pending", "closeout_pending"].includes(summary.kind)
|
|
38
|
+
? backlogStatusForPolicy(after) : summary.status_label;
|
|
39
|
+
|
|
40
|
+
export function assertBacklogPath(root) {
|
|
41
|
+
if (hasSymlinkComponent(root, BACKLOG_RELATIVE_PATH)
|
|
42
|
+
|| existsSync(join(root, BACKLOG_RELATIVE_PATH)) && containedRegularFile(root, BACKLOG_RELATIVE_PATH).status !== "valid") {
|
|
43
|
+
throw Error("AGDF_BACKLOG_PATH_INVALID");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// Change only the addressed existing Active row. Keep title, links, order, other rows and
|
|
48
|
+
// archive/planning placement intact. Unsupported layouts and ambiguous identities fail closed.
|
|
49
|
+
export function prepareRunBacklog(root, runId, content, runPath, revisionId = parseRunState(content).meta.revision_id) {
|
|
50
|
+
assertBacklogPath(root);
|
|
51
|
+
const path = join(root, BACKLOG_RELATIVE_PATH);
|
|
52
|
+
if (!existsSync(path)) return { status: "missing", update: null };
|
|
53
|
+
const old = readFileSync(path, "utf8"), lines = old.split("\n");
|
|
54
|
+
if (Buffer.byteLength(old) > 2097152) throw Error("AGDF_BACKLOG_LAYOUT_UNSUPPORTED");
|
|
55
|
+
const section = firstSection(lines, "Active Backlog");
|
|
56
|
+
if (!section) throw Error("AGDF_BACKLOG_LAYOUT_UNSUPPORTED");
|
|
57
|
+
const indexes = tableLineIndexes(lines, section), layout = backlogTableLayout(tableCells(lines[indexes[0]] ?? ""));
|
|
58
|
+
const width = layout === "compact" ? compactHeaders.length : layout === "legacy" ? legacyHeaders.length : undefined;
|
|
59
|
+
if (!width || indexes.length < 2 || tableCells(lines[indexes[1]]).length !== width
|
|
60
|
+
|| tableCells(lines[indexes[1]]).some(value => !/^:?-{3,}:?$/u.test(value))) throw Error("AGDF_BACKLOG_LAYOUT_UNSUPPORTED");
|
|
61
|
+
const matches = indexes.slice(2).filter(index => clean(tableCells(lines[index])[1] ?? "") === runId);
|
|
62
|
+
if (matches.length > 1) throw Error("AGDF_BACKLOG_IDENTITY_AMBIGUOUS");
|
|
63
|
+
if (!matches.length) return { status: "unlinked", update: null };
|
|
64
|
+
for (const [heading, column] of [["Planned / Parking Lot", 1], ["Completed / Superseded Pointers", 0]]) {
|
|
65
|
+
const other = firstSection(lines, heading);
|
|
66
|
+
if (other && tableLineIndexes(lines, other).slice(2).some(index => clean(tableCells(lines[index])[column] ?? "") === runId)) throw Error("AGDF_BACKLOG_IDENTITY_AMBIGUOUS");
|
|
67
|
+
}
|
|
68
|
+
const index = matches[0], cells = tableCells(lines[index]);
|
|
69
|
+
if (cells.length !== width) throw Error("AGDF_BACKLOG_LAYOUT_UNSUPPORTED");
|
|
70
|
+
const after = policyForRunContent(root, content, runPath);
|
|
71
|
+
const summary = runWorkSummary(root, content, runPath, after);
|
|
72
|
+
const status = backlogStatusForSummary(summary, after);
|
|
73
|
+
const next = summary.display_action;
|
|
74
|
+
cells[3] = status; cells[width - 1] = next;
|
|
75
|
+
lines[index] = tableLine(cells);
|
|
76
|
+
const updated = recordBacklogSummary(root, lines.join("\n"), runId, "Active Backlog", summary, revisionId);
|
|
77
|
+
return { status: old === updated ? "unchanged" : "updated", summary, update: old === updated ? null : { old, next: updated } };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// Approvals and run-update stay valid when the saved pointer cannot be synchronized. The
|
|
81
|
+
// pointer is left untouched and the result names why; the doctor reports the backlog itself.
|
|
82
|
+
export function prepareRunBacklogOrSkip(root, runId, content, runPath, revisionId) {
|
|
83
|
+
try { return prepareRunBacklog(root, runId, content, runPath, revisionId); }
|
|
84
|
+
catch (error) {
|
|
85
|
+
const reason = SKIPPABLE_BACKLOG_ERRORS.get(error?.message);
|
|
86
|
+
if (!reason) throw error;
|
|
87
|
+
return { status: "skipped", reason, update: null };
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
export const backlogSkip = plan => plan?.reason ? { backlog: plan.status, backlog_reason: plan.reason } : {};
|