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
|
@@ -0,0 +1,945 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
|
|
3
|
+
export const INSTRUCTION_FOOTPRINT_SCHEMA_VERSION = 1;
|
|
4
|
+
|
|
5
|
+
export const REQUEST_ACTIVATION_MARKERS = Object.freeze({
|
|
6
|
+
start: "<!-- AGDF-REQUEST-ACTIVATION-GUARD:START -->",
|
|
7
|
+
end: "<!-- AGDF-REQUEST-ACTIVATION-GUARD:END -->",
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
export const DISPATCHER_BINDING_PREFIX = "AGDF dispatcher binding:";
|
|
11
|
+
export const RUNTIME_FACTS_PREFIX = "AGDF runtime facts:";
|
|
12
|
+
|
|
13
|
+
export const INSTRUCTION_FOOTPRINT_SURFACE_IDS = Object.freeze([
|
|
14
|
+
"activationKernel",
|
|
15
|
+
"skillDiscoveryDescription",
|
|
16
|
+
"allSkillDiscoveryDescriptions",
|
|
17
|
+
"sessionStartBase",
|
|
18
|
+
"runtimeCheckSupplement",
|
|
19
|
+
"openCodeEagerInstructions",
|
|
20
|
+
"openCodeActiveDynamicContext",
|
|
21
|
+
"openCodeInactiveDynamicContext",
|
|
22
|
+
"openCodeComposedStaticAndActiveDynamic",
|
|
23
|
+
"openCodeCompactionAddition",
|
|
24
|
+
"selectedGateCheckSkill",
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
// These canonical digests lock approved content without copying its budget values, condition prose,
|
|
28
|
+
// or terminal-dispatch wording into a second semantic owner. Object-key order is intentionally
|
|
29
|
+
// irrelevant to the schema digest. A semantic change requires an explicitly reviewed validator
|
|
30
|
+
// update, not a silent limit increase, condition weakening or dispatch rewrite.
|
|
31
|
+
const AUTHORIZED_SCHEMA_V1_FINGERPRINT = "43d1bbd0760fd6957676ca8f31995411be3cfa76a7d9fd064d56d8d0676478a7";
|
|
32
|
+
const AUTHORIZED_TERMINAL_DISPATCH_FINGERPRINT = "a6c88ba3da4a022d0910f59b0bbf1d88726dcbc8077bba0ae6bd00b3bfd9b9e0";
|
|
33
|
+
const AUTHORIZED_OPENCODE_EAGER_FINGERPRINTS = Object.freeze({
|
|
34
|
+
canonical: "f4241ee566b2e2528a6c031281135561b411ac14602958bfdc3219a28db52f3f",
|
|
35
|
+
global: "166e07d217fd8d8e7f6734c0c8e509e59b09d24828a5dd6132f546b55d99629c",
|
|
36
|
+
});
|
|
37
|
+
const TERMINAL_DISPATCH_ANCHOR = "For a result with `terminal: true`, the entire assistant response must consist only of host_action.text, copied verbatim.";
|
|
38
|
+
const GLOBAL_TERMINAL_DISPATCH_ANCHOR = TERMINAL_DISPATCH_ANCHOR;
|
|
39
|
+
const TERMINAL_DISPATCH_SKILL_IDENTITY = "`gate-check` has deterministic-control dispatch.";
|
|
40
|
+
const GLOBAL_TERMINAL_DISPATCH_SKILL_IDENTITY = "`agdf-global-gate-check` has deterministic-control dispatch.";
|
|
41
|
+
|
|
42
|
+
const DYNAMIC_VALUE_KEYS = Object.freeze(["executable", "validator", "workingDirectory"]);
|
|
43
|
+
const EXPECTED_DYNAMIC_TOKENS = Object.freeze({
|
|
44
|
+
executable: "<executable>",
|
|
45
|
+
validator: "<validator>",
|
|
46
|
+
workingDirectory: "<working-directory>",
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
const FULL_ROUTER_HEADINGS = Object.freeze([
|
|
50
|
+
"Task Target Resolution",
|
|
51
|
+
"Mode Selection",
|
|
52
|
+
"Gate Transition",
|
|
53
|
+
"Quality Readiness",
|
|
54
|
+
"Closeout",
|
|
55
|
+
]);
|
|
56
|
+
|
|
57
|
+
function failure(code, message, surfaceId = null, instanceId = null) {
|
|
58
|
+
return {
|
|
59
|
+
code,
|
|
60
|
+
message,
|
|
61
|
+
...(surfaceId ? { surface_id: surfaceId } : {}),
|
|
62
|
+
...(instanceId ? { instance_id: instanceId } : {}),
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function normalizeInstructionLineEndings(value) {
|
|
67
|
+
return String(value ?? "").replace(/\r\n?/gu, "\n");
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
function isAbsoluteInstructionPath(value) {
|
|
71
|
+
return typeof value === "string"
|
|
72
|
+
&& value.length > 0
|
|
73
|
+
&& (/^\//u.test(value) || /^[A-Za-z]:[\\/]/u.test(value) || /^\\\\/u.test(value));
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function replaceAllLiteral(value, search, replacement) {
|
|
77
|
+
return search ? value.split(search).join(replacement) : value;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function normalizeDynamicInstructionContent(
|
|
81
|
+
content,
|
|
82
|
+
dynamicValues = {},
|
|
83
|
+
dynamicTokens = EXPECTED_DYNAMIC_TOKENS,
|
|
84
|
+
) {
|
|
85
|
+
let normalized = normalizeInstructionLineEndings(content);
|
|
86
|
+
const replacements = [];
|
|
87
|
+
|
|
88
|
+
for (const key of DYNAMIC_VALUE_KEYS) {
|
|
89
|
+
const value = dynamicValues?.[key];
|
|
90
|
+
if (!isAbsoluteInstructionPath(value)) continue;
|
|
91
|
+
replacements.push({ key, value });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
replacements.sort((left, right) => right.value.length - left.value.length);
|
|
95
|
+
for (const { key, value } of replacements) {
|
|
96
|
+
const token = dynamicTokens[key];
|
|
97
|
+
const jsonEscapedValue = JSON.stringify(value).slice(1, -1);
|
|
98
|
+
normalized = replaceAllLiteral(normalized, value, token);
|
|
99
|
+
if (jsonEscapedValue !== value) {
|
|
100
|
+
normalized = replaceAllLiteral(normalized, jsonEscapedValue, token);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return normalized;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function measureInstructionContent({ content, dynamicValues = {}, dynamicTokens = EXPECTED_DYNAMIC_TOKENS }) {
|
|
108
|
+
const raw = normalizeInstructionLineEndings(content);
|
|
109
|
+
const normalized = normalizeDynamicInstructionContent(raw, dynamicValues, dynamicTokens);
|
|
110
|
+
return Object.freeze({
|
|
111
|
+
raw_bytes: Buffer.byteLength(raw, "utf8"),
|
|
112
|
+
normalized_bytes: Buffer.byteLength(normalized, "utf8"),
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
function canonicalizeJson(value) {
|
|
117
|
+
if (Array.isArray(value)) return value.map((entry) => canonicalizeJson(entry));
|
|
118
|
+
if (!value || typeof value !== "object") return value;
|
|
119
|
+
return Object.fromEntries(
|
|
120
|
+
Object.keys(value).sort().map((key) => [key, canonicalizeJson(value[key])]),
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export function extractSerializedDescriptionScalar(skillContent) {
|
|
125
|
+
const normalized = normalizeInstructionLineEndings(skillContent);
|
|
126
|
+
const frontmatterMatch = normalized.match(/^---\n([\s\S]*?)\n---(?:\n|$)/u);
|
|
127
|
+
if (!frontmatterMatch) {
|
|
128
|
+
throw new Error("AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_FRONTMATTER_MISSING");
|
|
129
|
+
}
|
|
130
|
+
const matches = [...frontmatterMatch[1].matchAll(/^description:[ \t]*(.*)$/gmu)];
|
|
131
|
+
if (matches.length !== 1 || matches[0][1].length === 0) {
|
|
132
|
+
throw new Error("AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_SCALAR_INVALID");
|
|
133
|
+
}
|
|
134
|
+
return matches[0][1];
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function requestActivationKernelFingerprint(kernel) {
|
|
138
|
+
const normalized = normalizeInstructionLineEndings(kernel);
|
|
139
|
+
const matches = [...normalized.matchAll(/- `guard_fingerprint`: `sha256:[0-9a-f]{64}`/gu)];
|
|
140
|
+
if (matches.length !== 1) {
|
|
141
|
+
throw new Error("AGDF_INSTRUCTION_FOOTPRINT_KERNEL_FINGERPRINT_FIELD_INVALID");
|
|
142
|
+
}
|
|
143
|
+
const fingerprintInput = normalized.replace(
|
|
144
|
+
/- `guard_fingerprint`: `sha256:[0-9a-f]{64}`/u,
|
|
145
|
+
"- `guard_fingerprint`: `sha256:<computed>`",
|
|
146
|
+
);
|
|
147
|
+
return `sha256:${createHash("sha256").update(fingerprintInput, "utf8").digest("hex")}`;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
function requestActivationKernelIdentity(kernel) {
|
|
151
|
+
const readOne = (pattern) => {
|
|
152
|
+
const matches = [...kernel.matchAll(pattern)];
|
|
153
|
+
return matches.length === 1 ? matches[0][1] : null;
|
|
154
|
+
};
|
|
155
|
+
return {
|
|
156
|
+
owner: readOne(/- `owner`: `([^`]+)`/gu),
|
|
157
|
+
path: readOne(/- `path`: `([^`]+)`/gu),
|
|
158
|
+
policy_version: Number(readOne(/- `policy_version`: `(\d+)`/gu)),
|
|
159
|
+
guard_fingerprint: readOne(/- `guard_fingerprint`: `(sha256:[0-9a-f]{64})`/gu),
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
function countLiteral(value, needle) {
|
|
164
|
+
if (!needle) return 0;
|
|
165
|
+
return value.split(needle).length - 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function instructionContentFingerprint(content) {
|
|
169
|
+
return createHash("sha256")
|
|
170
|
+
.update(normalizeInstructionLineEndings(content), "utf8")
|
|
171
|
+
.digest("hex");
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function parsePrefixedJsonLine(line, prefix) {
|
|
175
|
+
if (!line.startsWith(`${prefix} `)) return null;
|
|
176
|
+
try {
|
|
177
|
+
return JSON.parse(line.slice(prefix.length + 1));
|
|
178
|
+
} catch {
|
|
179
|
+
return null;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
function hasConflictingActivationLanguage(content, canonicalKernel) {
|
|
184
|
+
const withoutKernel = canonicalKernel
|
|
185
|
+
? replaceAllLiteral(normalizeInstructionLineEndings(content), normalizeInstructionLineEndings(canonicalKernel), "")
|
|
186
|
+
: normalizeInstructionLineEndings(content);
|
|
187
|
+
return [
|
|
188
|
+
/AGDF activation policy:/iu,
|
|
189
|
+
/automatic discovery[^\n.]*activat(?:e|es|ing)[^\n.]*AGDF/iu,
|
|
190
|
+
/(?:always|automatically|unconditionally)[^\n.]*activat(?:e|es|ing)[^\n.]*AGDF/iu,
|
|
191
|
+
/activat(?:e|es|ing)[^\n.]*AGDF[^\n.]*(?:every|all)\s+(?:user\s+)?requests?/iu,
|
|
192
|
+
/(?:every|all)\s+(?:user\s+)?requests?[^\n.]*activat(?:e|es|ing)[^\n.]*AGDF/iu,
|
|
193
|
+
/AGDF[^\n.]*(?:applies to|is active for)[^\n.]*(?:every|all)\s+(?:user\s+)?requests?/iu,
|
|
194
|
+
/default entry rule/iu,
|
|
195
|
+
/stop this AGDF path silently/iu,
|
|
196
|
+
/request activation is non-authorizing/iu,
|
|
197
|
+
/^#{1,6}[ \t]+Request Activation[ \t]*$/imu,
|
|
198
|
+
].some((pattern) => pattern.test(withoutKernel));
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
function kernelCount(content, canonicalKernel) {
|
|
202
|
+
return canonicalKernel ? countLiteral(content, canonicalKernel) : 0;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
function bindingCount(content) {
|
|
206
|
+
return countLiteral(normalizeInstructionLineEndings(content), DISPATCHER_BINDING_PREFIX);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
function markerState(content) {
|
|
210
|
+
const normalized = normalizeInstructionLineEndings(content);
|
|
211
|
+
const startCount = countLiteral(normalized, REQUEST_ACTIVATION_MARKERS.start);
|
|
212
|
+
const endCount = countLiteral(normalized, REQUEST_ACTIVATION_MARKERS.end);
|
|
213
|
+
return {
|
|
214
|
+
startCount,
|
|
215
|
+
endCount,
|
|
216
|
+
ordered: startCount === 1
|
|
217
|
+
&& endCount === 1
|
|
218
|
+
&& normalized.indexOf(REQUEST_ACTIVATION_MARKERS.start) < normalized.indexOf(REQUEST_ACTIVATION_MARKERS.end),
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function validateDefinition(definition) {
|
|
223
|
+
const failures = [];
|
|
224
|
+
if (!definition || typeof definition !== "object" || Array.isArray(definition)) {
|
|
225
|
+
return { failures: [failure("AGDF_INSTRUCTION_FOOTPRINT_DEFINITION_MISSING", "instructionFootprint must be an object")] };
|
|
226
|
+
}
|
|
227
|
+
if (definition.schemaVersion !== INSTRUCTION_FOOTPRINT_SCHEMA_VERSION) {
|
|
228
|
+
failures.push(failure(
|
|
229
|
+
"AGDF_INSTRUCTION_FOOTPRINT_SCHEMA_UNKNOWN",
|
|
230
|
+
`instructionFootprint.schemaVersion must be ${INSTRUCTION_FOOTPRINT_SCHEMA_VERSION}`,
|
|
231
|
+
));
|
|
232
|
+
}
|
|
233
|
+
if (definition.measurement?.encoding !== "utf8" || definition.measurement?.lineEndings !== "lf") {
|
|
234
|
+
failures.push(failure(
|
|
235
|
+
"AGDF_INSTRUCTION_FOOTPRINT_MEASUREMENT_INVALID",
|
|
236
|
+
"instructionFootprint measurement must use UTF-8 bytes after LF normalization",
|
|
237
|
+
));
|
|
238
|
+
}
|
|
239
|
+
for (const key of DYNAMIC_VALUE_KEYS) {
|
|
240
|
+
if (definition.measurement?.dynamicAbsolutePathTokens?.[key] !== EXPECTED_DYNAMIC_TOKENS[key]) {
|
|
241
|
+
failures.push(failure(
|
|
242
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DYNAMIC_TOKEN_INVALID",
|
|
243
|
+
`instructionFootprint dynamic token ${key} is missing or changed`,
|
|
244
|
+
));
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
const declaredBudgets = definition.budgets && typeof definition.budgets === "object"
|
|
249
|
+
? definition.budgets
|
|
250
|
+
: {};
|
|
251
|
+
for (const id of Object.keys(declaredBudgets)) {
|
|
252
|
+
if (!INSTRUCTION_FOOTPRINT_SURFACE_IDS.includes(id)) {
|
|
253
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BUDGET_UNKNOWN", `unknown budget id: ${id}`, id));
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
for (const id of INSTRUCTION_FOOTPRINT_SURFACE_IDS) {
|
|
257
|
+
const declared = declaredBudgets[id];
|
|
258
|
+
if (!declared || typeof declared !== "object") {
|
|
259
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BUDGET_MISSING", `missing budget id: ${id}`, id));
|
|
260
|
+
continue;
|
|
261
|
+
}
|
|
262
|
+
if (!Number.isInteger(declared.maxNormalizedBytes) || declared.maxNormalizedBytes < 0) {
|
|
263
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BUDGET_INVALID", `invalid budget value: ${id}`, id));
|
|
264
|
+
}
|
|
265
|
+
if (!Array.isArray(declared.structuralConditions) || declared.structuralConditions.length === 0
|
|
266
|
+
|| declared.structuralConditions.some((condition) => typeof condition !== "string" || !condition)) {
|
|
267
|
+
failures.push(failure(
|
|
268
|
+
"AGDF_INSTRUCTION_FOOTPRINT_CONDITIONS_INVALID",
|
|
269
|
+
`structural conditions for ${id} are missing or invalid`,
|
|
270
|
+
id,
|
|
271
|
+
));
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
if (definition.schemaVersion === INSTRUCTION_FOOTPRINT_SCHEMA_VERSION) {
|
|
275
|
+
const observedFingerprint = createHash("sha256")
|
|
276
|
+
.update(JSON.stringify(canonicalizeJson(definition)), "utf8")
|
|
277
|
+
.digest("hex");
|
|
278
|
+
if (observedFingerprint !== AUTHORIZED_SCHEMA_V1_FINGERPRINT) {
|
|
279
|
+
failures.push(failure(
|
|
280
|
+
"AGDF_INSTRUCTION_FOOTPRINT_CONTRACT_UNAUTHORIZED",
|
|
281
|
+
"instructionFootprint schema v1 differs from its approved budget and structural-condition contract",
|
|
282
|
+
));
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
return { failures };
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export function validateInstructionFootprintDefinition(definition) {
|
|
289
|
+
const { failures } = validateDefinition(definition);
|
|
290
|
+
return Object.freeze({ status: failures.length === 0 ? "pass" : "block", failures: Object.freeze(failures) });
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function validateKernelIdentity(content, canonicalKernel, surfaceId, instanceId, failures, expectedCount = 1) {
|
|
294
|
+
const count = kernelCount(content, canonicalKernel);
|
|
295
|
+
if (count !== expectedCount) {
|
|
296
|
+
failures.push(failure(
|
|
297
|
+
"AGDF_INSTRUCTION_FOOTPRINT_KERNEL_COUNT",
|
|
298
|
+
`${surfaceId}/${instanceId} must contain ${expectedCount} canonical kernel instance(s); found ${count}`,
|
|
299
|
+
surfaceId,
|
|
300
|
+
instanceId,
|
|
301
|
+
));
|
|
302
|
+
}
|
|
303
|
+
const state = markerState(content);
|
|
304
|
+
if (expectedCount === 1 && (state.startCount !== 1 || state.endCount !== 1 || !state.ordered)) {
|
|
305
|
+
failures.push(failure(
|
|
306
|
+
"AGDF_INSTRUCTION_FOOTPRINT_MARKER_INVALID",
|
|
307
|
+
`${surfaceId}/${instanceId} has missing, duplicate, partial or reordered kernel markers`,
|
|
308
|
+
surfaceId,
|
|
309
|
+
instanceId,
|
|
310
|
+
));
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
function validateNoRouter(content, surfaceId, instanceId, failures) {
|
|
315
|
+
const leaked = FULL_ROUTER_HEADINGS.find((heading) => new RegExp(
|
|
316
|
+
`^#{1,6}[ \\t]+${heading.replaceAll(" ", "[ \\t]+")}[ \\t]*$`,
|
|
317
|
+
"imu",
|
|
318
|
+
).test(content));
|
|
319
|
+
if (leaked) {
|
|
320
|
+
failures.push(failure(
|
|
321
|
+
"AGDF_INSTRUCTION_FOOTPRINT_FULL_ROUTER_LEAK",
|
|
322
|
+
`${surfaceId}/${instanceId} contains eager router section ${leaked}`,
|
|
323
|
+
surfaceId,
|
|
324
|
+
instanceId,
|
|
325
|
+
));
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function derivedDynamicValues(surfaceId, content) {
|
|
330
|
+
const normalized = normalizeInstructionLineEndings(content);
|
|
331
|
+
const values = {};
|
|
332
|
+
if ([
|
|
333
|
+
"sessionStartBase",
|
|
334
|
+
"openCodeActiveDynamicContext",
|
|
335
|
+
"openCodeComposedStaticAndActiveDynamic",
|
|
336
|
+
].includes(surfaceId)) {
|
|
337
|
+
const bindingLines = normalized
|
|
338
|
+
.split("\n")
|
|
339
|
+
.filter((line) => line.startsWith(`${DISPATCHER_BINDING_PREFIX} `));
|
|
340
|
+
const binding = bindingLines.length === 1
|
|
341
|
+
? parsePrefixedJsonLine(bindingLines[0], DISPATCHER_BINDING_PREFIX)
|
|
342
|
+
: null;
|
|
343
|
+
if (isAbsoluteInstructionPath(binding?.executable)) values.executable = binding.executable;
|
|
344
|
+
if (isAbsoluteInstructionPath(binding?.argv_prefix?.[0])) values.validator = binding.argv_prefix[0];
|
|
345
|
+
}
|
|
346
|
+
if (surfaceId === "runtimeCheckSupplement") {
|
|
347
|
+
const factLines = normalized
|
|
348
|
+
.split("\n")
|
|
349
|
+
.filter((line) => line.startsWith(`${RUNTIME_FACTS_PREFIX} `));
|
|
350
|
+
const facts = factLines.length === 1
|
|
351
|
+
? parsePrefixedJsonLine(factLines[0], RUNTIME_FACTS_PREFIX)
|
|
352
|
+
: null;
|
|
353
|
+
if (isAbsoluteInstructionPath(facts?.working_directory)) {
|
|
354
|
+
values.workingDirectory = facts.working_directory;
|
|
355
|
+
}
|
|
356
|
+
const invocation = facts?.repository_control?.invocation;
|
|
357
|
+
if (isAbsoluteInstructionPath(invocation?.executable)) values.executable = invocation.executable;
|
|
358
|
+
if (isAbsoluteInstructionPath(invocation?.argv?.[0])) values.validator = invocation.argv[0];
|
|
359
|
+
}
|
|
360
|
+
return values;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function validateBindingJson(content, canonicalKernel, expectedVersion, surfaceId, instanceId, failures) {
|
|
364
|
+
const bindingLines = normalizeInstructionLineEndings(content)
|
|
365
|
+
.split("\n")
|
|
366
|
+
.filter((line) => line.startsWith(DISPATCHER_BINDING_PREFIX));
|
|
367
|
+
const binding = bindingLines.length === 1
|
|
368
|
+
? parsePrefixedJsonLine(bindingLines[0], DISPATCHER_BINDING_PREFIX)
|
|
369
|
+
: null;
|
|
370
|
+
const kernelIdentity = requestActivationKernelIdentity(canonicalKernel);
|
|
371
|
+
const expectedBindingKeys = surfaceId === "sessionStartBase"
|
|
372
|
+
? "arguments,argv_prefix,authorizes,environment,executable,expected_version,request_activation,route_source_after_activation,schema_version"
|
|
373
|
+
: "arguments,argv_prefix,authorizes,environment,executable,expected_version,request_activation,schema_version";
|
|
374
|
+
const exactKeys = binding && typeof binding === "object" && !Array.isArray(binding)
|
|
375
|
+
? Object.keys(binding).sort().join(",") === expectedBindingKeys
|
|
376
|
+
: false;
|
|
377
|
+
const activationKeys = binding?.request_activation && typeof binding.request_activation === "object" && !Array.isArray(binding.request_activation)
|
|
378
|
+
? Object.keys(binding.request_activation).sort().join(",") === "guard_fingerprint,owner,policy_version"
|
|
379
|
+
: false;
|
|
380
|
+
const routeSourceKeys = binding?.route_source_after_activation
|
|
381
|
+
&& typeof binding.route_source_after_activation === "object"
|
|
382
|
+
&& !Array.isArray(binding.route_source_after_activation)
|
|
383
|
+
? Object.keys(binding.route_source_after_activation).sort().join(",") === "path,relative_to"
|
|
384
|
+
: false;
|
|
385
|
+
const routeSourceValid = surfaceId !== "sessionStartBase"
|
|
386
|
+
|| (routeSourceKeys
|
|
387
|
+
&& binding.route_source_after_activation.relative_to === "validator_directory"
|
|
388
|
+
&& [
|
|
389
|
+
"../meta/contracts/request-activation.md",
|
|
390
|
+
"../skills/contracts/request-activation.md",
|
|
391
|
+
].includes(binding.route_source_after_activation.path));
|
|
392
|
+
let computedFingerprint = null;
|
|
393
|
+
try {
|
|
394
|
+
computedFingerprint = requestActivationKernelFingerprint(canonicalKernel);
|
|
395
|
+
} catch {}
|
|
396
|
+
const valid = binding
|
|
397
|
+
&& exactKeys
|
|
398
|
+
&& activationKeys
|
|
399
|
+
&& routeSourceValid
|
|
400
|
+
&& binding.schema_version === "2"
|
|
401
|
+
&& typeof binding.arguments === "string" && binding.arguments.length > 0 && binding.arguments.length <= 512
|
|
402
|
+
&& binding.environment && typeof binding.environment === "object" && !Array.isArray(binding.environment)
|
|
403
|
+
&& Object.keys(binding.environment).every((key) => key === "ELECTRON_RUN_AS_NODE" && binding.environment[key] === "1")
|
|
404
|
+
&& isAbsoluteInstructionPath(binding.executable)
|
|
405
|
+
&& Array.isArray(binding.argv_prefix)
|
|
406
|
+
&& binding.argv_prefix.length === 5
|
|
407
|
+
&& isAbsoluteInstructionPath(binding.argv_prefix[0])
|
|
408
|
+
&& binding.argv_prefix.slice(1, 5).join("\u0000") === ["skill-dispatch", "--json", "--surface", binding.argv_prefix[4]].join("\u0000")
|
|
409
|
+
&& typeof binding.argv_prefix[4] === "string"
|
|
410
|
+
&& ["codex", "claude", "copilot", "opencode"].includes(binding.argv_prefix[4])
|
|
411
|
+
&& typeof binding.expected_version === "string"
|
|
412
|
+
&& binding.expected_version.length > 0
|
|
413
|
+
&& (!expectedVersion || binding.expected_version === expectedVersion)
|
|
414
|
+
&& binding.authorizes === false
|
|
415
|
+
&& binding.request_activation.owner === kernelIdentity.owner
|
|
416
|
+
&& binding.request_activation.policy_version === kernelIdentity.policy_version
|
|
417
|
+
&& binding.request_activation.guard_fingerprint === kernelIdentity.guard_fingerprint
|
|
418
|
+
&& kernelIdentity.guard_fingerprint === computedFingerprint;
|
|
419
|
+
if (!valid) {
|
|
420
|
+
failures.push(failure(
|
|
421
|
+
"AGDF_INSTRUCTION_FOOTPRINT_BINDING_INVALID",
|
|
422
|
+
`${surfaceId}/${instanceId} must contain one exact non-authorizing dispatcher binding for the canonical kernel`,
|
|
423
|
+
surfaceId,
|
|
424
|
+
instanceId,
|
|
425
|
+
));
|
|
426
|
+
}
|
|
427
|
+
return valid ? binding : null;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
function validateSurfaceStructure({ surfaceId, record, canonicalKernel, expectedDescriptions, expectedVersion }, failures) {
|
|
431
|
+
const content = normalizeInstructionLineEndings(record.content);
|
|
432
|
+
const instanceId = record.id;
|
|
433
|
+
|
|
434
|
+
if ([
|
|
435
|
+
"sessionStartBase",
|
|
436
|
+
"runtimeCheckSupplement",
|
|
437
|
+
"openCodeEagerInstructions",
|
|
438
|
+
"openCodeActiveDynamicContext",
|
|
439
|
+
"openCodeInactiveDynamicContext",
|
|
440
|
+
"openCodeComposedStaticAndActiveDynamic",
|
|
441
|
+
"openCodeCompactionAddition",
|
|
442
|
+
].includes(surfaceId) && hasConflictingActivationLanguage(content, canonicalKernel)) {
|
|
443
|
+
failures.push(failure(
|
|
444
|
+
"AGDF_INSTRUCTION_FOOTPRINT_ACTIVATION_CONFLICT",
|
|
445
|
+
`${surfaceId}/${instanceId} contains activation language outside the canonical kernel`,
|
|
446
|
+
surfaceId,
|
|
447
|
+
instanceId,
|
|
448
|
+
));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
switch (surfaceId) {
|
|
452
|
+
case "activationKernel": {
|
|
453
|
+
if (content !== canonicalKernel) {
|
|
454
|
+
failures.push(failure(
|
|
455
|
+
"AGDF_INSTRUCTION_FOOTPRINT_KERNEL_IDENTITY",
|
|
456
|
+
`${surfaceId}/${instanceId} differs from the canonical kernel`,
|
|
457
|
+
surfaceId,
|
|
458
|
+
instanceId,
|
|
459
|
+
));
|
|
460
|
+
}
|
|
461
|
+
validateKernelIdentity(content, canonicalKernel, surfaceId, instanceId, failures);
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
case "skillDiscoveryDescription": {
|
|
465
|
+
if (!record.slug || !Object.hasOwn(expectedDescriptions, record.slug)) {
|
|
466
|
+
failures.push(failure(
|
|
467
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_SKILL_UNKNOWN",
|
|
468
|
+
`${surfaceId}/${instanceId} has no definition-owned skill identity`,
|
|
469
|
+
surfaceId,
|
|
470
|
+
instanceId,
|
|
471
|
+
));
|
|
472
|
+
} else if (content !== expectedDescriptions[record.slug]) {
|
|
473
|
+
failures.push(failure(
|
|
474
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_IDENTITY",
|
|
475
|
+
`${surfaceId}/${instanceId} is not the exact serialized definition projection`,
|
|
476
|
+
surfaceId,
|
|
477
|
+
instanceId,
|
|
478
|
+
));
|
|
479
|
+
}
|
|
480
|
+
break;
|
|
481
|
+
}
|
|
482
|
+
case "allSkillDiscoveryDescriptions": {
|
|
483
|
+
const expectedAggregate = Object.values(expectedDescriptions).join("");
|
|
484
|
+
if (content !== expectedAggregate) {
|
|
485
|
+
failures.push(failure(
|
|
486
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_AGGREGATE_IDENTITY",
|
|
487
|
+
`${surfaceId}/${instanceId} is not ten serialized scalars in definition order without separators`,
|
|
488
|
+
surfaceId,
|
|
489
|
+
instanceId,
|
|
490
|
+
));
|
|
491
|
+
}
|
|
492
|
+
if (/AGDF-REQUEST-ACTIVATION-OPERATIONS|ordinary_read_only|active_run_continuation|requested_effect|invocation_provenance/iu.test(content)) {
|
|
493
|
+
failures.push(failure(
|
|
494
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_POLICY_LEAK",
|
|
495
|
+
`${surfaceId}/${instanceId} contains the exclusion taxonomy or operation catalog`,
|
|
496
|
+
surfaceId,
|
|
497
|
+
instanceId,
|
|
498
|
+
));
|
|
499
|
+
}
|
|
500
|
+
break;
|
|
501
|
+
}
|
|
502
|
+
case "sessionStartBase": {
|
|
503
|
+
validateKernelIdentity(content, canonicalKernel, surfaceId, instanceId, failures);
|
|
504
|
+
if (bindingCount(content) !== 1) {
|
|
505
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BINDING_COUNT", `${surfaceId}/${instanceId} must contain exactly one binding`, surfaceId, instanceId));
|
|
506
|
+
} else {
|
|
507
|
+
validateBindingJson(content, canonicalKernel, expectedVersion, surfaceId, instanceId, failures);
|
|
508
|
+
const bindingLine = content.split("\n").find((line) => line.startsWith(`${DISPATCHER_BINDING_PREFIX} `));
|
|
509
|
+
if (content !== `${canonicalKernel}\n\n${bindingLine}`) {
|
|
510
|
+
failures.push(failure(
|
|
511
|
+
"AGDF_INSTRUCTION_FOOTPRINT_SESSION_BASE_SHAPE",
|
|
512
|
+
`${surfaceId}/${instanceId} must contain only the canonical kernel, one blank separator and the binding line`,
|
|
513
|
+
surfaceId,
|
|
514
|
+
instanceId,
|
|
515
|
+
));
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
validateNoRouter(content, surfaceId, instanceId, failures);
|
|
519
|
+
break;
|
|
520
|
+
}
|
|
521
|
+
case "runtimeCheckSupplement": {
|
|
522
|
+
const lines = content.split("\n").filter(Boolean);
|
|
523
|
+
const facts = lines.length === 1 ? parsePrefixedJsonLine(lines[0], RUNTIME_FACTS_PREFIX) : null;
|
|
524
|
+
const required = ["context_state", "working_directory", "automatic_check", "config"];
|
|
525
|
+
const allowed = new Set([...required, "languages", "repository_control"]);
|
|
526
|
+
const control = facts?.repository_control;
|
|
527
|
+
const controlKeys = ["target", "inspection_state", "status", "counts", "authorizes"];
|
|
528
|
+
const invocation = control?.invocation;
|
|
529
|
+
const controlValid = !Object.hasOwn(facts ?? {}, "repository_control") || (
|
|
530
|
+
control && typeof control === "object" && !Array.isArray(control)
|
|
531
|
+
&& controlKeys.every((key) => Object.hasOwn(control, key))
|
|
532
|
+
&& Object.keys(control).every((key) => [...controlKeys, "invocation", "notice"].includes(key))
|
|
533
|
+
&& isAbsoluteInstructionPath(control.target)
|
|
534
|
+
&& typeof facts.working_directory === "string"
|
|
535
|
+
&& (control.target === facts.working_directory
|
|
536
|
+
|| facts.working_directory?.startsWith(`${control.target}/`)
|
|
537
|
+
|| facts.working_directory?.startsWith(`${control.target}\\`))
|
|
538
|
+
&& ["complete", "unavailable"].includes(control.inspection_state)
|
|
539
|
+
&& typeof control.status === "string" && control.status.length > 0
|
|
540
|
+
&& control.authorizes === false
|
|
541
|
+
&& (control.inspection_state === "unavailable" ? control.counts === null : (
|
|
542
|
+
control.counts && Object.keys(control.counts).sort().join(",") === "historical,migration,repair"
|
|
543
|
+
&& Object.values(control.counts).every((count) => Number.isSafeInteger(count) && count >= 0)
|
|
544
|
+
))
|
|
545
|
+
&& (!Object.hasOwn(control, "notice") || (typeof control.notice === "string" && invocation))
|
|
546
|
+
&& (!Object.hasOwn(control, "invocation") || (
|
|
547
|
+
invocation && Object.keys(invocation).sort().join(",") === "argv,authorizes,executable"
|
|
548
|
+
&& isAbsoluteInstructionPath(invocation.executable) && invocation.authorizes === false
|
|
549
|
+
&& Array.isArray(invocation.argv) && invocation.argv.length === 7
|
|
550
|
+
&& isAbsoluteInstructionPath(invocation.argv[0])
|
|
551
|
+
&& invocation.argv[1] === "control-maintenance" && invocation.argv[2] === "--dir"
|
|
552
|
+
&& invocation.argv[3] === control.target && invocation.argv[4] === "--guided"
|
|
553
|
+
&& invocation.argv[5] === "--language" && /^[A-Za-z0-9-]{1,24}$/u.test(invocation.argv[6])
|
|
554
|
+
))
|
|
555
|
+
);
|
|
556
|
+
if (
|
|
557
|
+
!facts
|
|
558
|
+
|| typeof facts !== "object"
|
|
559
|
+
|| Array.isArray(facts)
|
|
560
|
+
|| required.some((key) => !Object.hasOwn(facts, key))
|
|
561
|
+
|| Object.keys(facts).some((key) => !allowed.has(key))
|
|
562
|
+
|| typeof facts.context_state !== "string"
|
|
563
|
+
|| typeof facts.working_directory !== "string"
|
|
564
|
+
|| typeof facts.config !== "string"
|
|
565
|
+
|| !controlValid
|
|
566
|
+
|| !facts.automatic_check
|
|
567
|
+
|| typeof facts.automatic_check !== "object"
|
|
568
|
+
|| Array.isArray(facts.automatic_check)
|
|
569
|
+
|| Object.keys(facts.automatic_check).sort().join(",") !== "findings,status"
|
|
570
|
+
|| typeof facts.automatic_check.status !== "string"
|
|
571
|
+
|| !Number.isSafeInteger(facts.automatic_check.findings)
|
|
572
|
+
|| facts.automatic_check.findings < 0
|
|
573
|
+
|| (Object.hasOwn(facts, "languages") && (
|
|
574
|
+
!facts.languages
|
|
575
|
+
|| typeof facts.languages !== "object"
|
|
576
|
+
|| Array.isArray(facts.languages)
|
|
577
|
+
|| Object.keys(facts.languages).sort().join(",") !== "artifact,chat,runtime"
|
|
578
|
+
|| Object.values(facts.languages).some((value) => typeof value !== "string")
|
|
579
|
+
))
|
|
580
|
+
) {
|
|
581
|
+
failures.push(failure(
|
|
582
|
+
"AGDF_INSTRUCTION_FOOTPRINT_RUNTIME_FACTS_INVALID",
|
|
583
|
+
`${surfaceId}/${instanceId} must contain one variable-facts JSON line only`,
|
|
584
|
+
surfaceId,
|
|
585
|
+
instanceId,
|
|
586
|
+
));
|
|
587
|
+
}
|
|
588
|
+
if (kernelCount(content, canonicalKernel) !== 0 || bindingCount(content) !== 0) {
|
|
589
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_RUNTIME_FACTS_POLICY_LEAK", `${surfaceId}/${instanceId} contains kernel or binding policy`, surfaceId, instanceId));
|
|
590
|
+
}
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
case "openCodeEagerInstructions": {
|
|
594
|
+
validateKernelIdentity(content, canonicalKernel, surfaceId, instanceId, failures);
|
|
595
|
+
if (bindingCount(content) !== 0) {
|
|
596
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BINDING_COUNT", `${surfaceId}/${instanceId} must not contain a binding`, surfaceId, instanceId));
|
|
597
|
+
}
|
|
598
|
+
validateNoRouter(content, surfaceId, instanceId, failures);
|
|
599
|
+
const variant = record.variant ?? "canonical";
|
|
600
|
+
if (
|
|
601
|
+
!Object.hasOwn(AUTHORIZED_OPENCODE_EAGER_FINGERPRINTS, variant)
|
|
602
|
+
|| instructionContentFingerprint(content) !== AUTHORIZED_OPENCODE_EAGER_FINGERPRINTS[variant]
|
|
603
|
+
) {
|
|
604
|
+
failures.push(failure(
|
|
605
|
+
"AGDF_INSTRUCTION_FOOTPRINT_EAGER_IDENTITY_DRIFT",
|
|
606
|
+
`${surfaceId}/${instanceId} must equal its approved generated micro-bootstrap`,
|
|
607
|
+
surfaceId,
|
|
608
|
+
instanceId,
|
|
609
|
+
));
|
|
610
|
+
}
|
|
611
|
+
break;
|
|
612
|
+
}
|
|
613
|
+
case "openCodeActiveDynamicContext": {
|
|
614
|
+
if (kernelCount(content, canonicalKernel) !== 0 || markerState(content).startCount !== 0 || markerState(content).endCount !== 0) {
|
|
615
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_DYNAMIC_KERNEL_LEAK", `${surfaceId}/${instanceId} must not copy the kernel`, surfaceId, instanceId));
|
|
616
|
+
}
|
|
617
|
+
if (bindingCount(content) !== 1) {
|
|
618
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BINDING_COUNT", `${surfaceId}/${instanceId} must contain exactly one binding`, surfaceId, instanceId));
|
|
619
|
+
} else {
|
|
620
|
+
record.bindingVersion = validateBindingJson(content, canonicalKernel, expectedVersion, surfaceId, instanceId, failures)?.expected_version ?? null;
|
|
621
|
+
}
|
|
622
|
+
{
|
|
623
|
+
const lines = content.split("\n");
|
|
624
|
+
const facts = lines.length === 2 ? parsePrefixedJsonLine(lines[1], RUNTIME_FACTS_PREFIX) : null;
|
|
625
|
+
if (
|
|
626
|
+
!facts
|
|
627
|
+
|| typeof facts !== "object"
|
|
628
|
+
|| Array.isArray(facts)
|
|
629
|
+
|| Object.keys(facts).sort().join(",") !== "active,version"
|
|
630
|
+
|| facts.active !== true
|
|
631
|
+
|| typeof facts.version !== "string"
|
|
632
|
+
|| (expectedVersion && facts.version !== expectedVersion)
|
|
633
|
+
|| (record.bindingVersion && facts.version !== record.bindingVersion)
|
|
634
|
+
) {
|
|
635
|
+
failures.push(failure(
|
|
636
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DYNAMIC_FACTS_INVALID",
|
|
637
|
+
`${surfaceId}/${instanceId} must contain only active/version facts after its binding`,
|
|
638
|
+
surfaceId,
|
|
639
|
+
instanceId,
|
|
640
|
+
));
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
break;
|
|
644
|
+
}
|
|
645
|
+
case "openCodeInactiveDynamicContext": {
|
|
646
|
+
if (content.length !== 0) {
|
|
647
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_INACTIVE_NONEMPTY", `${surfaceId}/${instanceId} must be empty`, surfaceId, instanceId));
|
|
648
|
+
}
|
|
649
|
+
break;
|
|
650
|
+
}
|
|
651
|
+
case "openCodeComposedStaticAndActiveDynamic": {
|
|
652
|
+
validateKernelIdentity(content, canonicalKernel, surfaceId, instanceId, failures);
|
|
653
|
+
if (bindingCount(content) !== 1) {
|
|
654
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_BINDING_COUNT", `${surfaceId}/${instanceId} must contain exactly one binding`, surfaceId, instanceId));
|
|
655
|
+
} else {
|
|
656
|
+
validateBindingJson(content, canonicalKernel, expectedVersion, surfaceId, instanceId, failures);
|
|
657
|
+
}
|
|
658
|
+
validateNoRouter(content, surfaceId, instanceId, failures);
|
|
659
|
+
const bindingStart = content.lastIndexOf(`${DISPATCHER_BINDING_PREFIX} `);
|
|
660
|
+
if (bindingStart <= 0 || content[bindingStart - 1] !== "\n") {
|
|
661
|
+
failures.push(failure(
|
|
662
|
+
"AGDF_INSTRUCTION_FOOTPRINT_COMPOSED_SHAPE_INVALID",
|
|
663
|
+
`${surfaceId}/${instanceId} must be one approved eager bootstrap plus one active dynamic block`,
|
|
664
|
+
surfaceId,
|
|
665
|
+
instanceId,
|
|
666
|
+
));
|
|
667
|
+
} else {
|
|
668
|
+
const eagerContent = content.slice(0, bindingStart - 1);
|
|
669
|
+
const activeContent = content.slice(bindingStart);
|
|
670
|
+
validateSurfaceStructure({
|
|
671
|
+
surfaceId: "openCodeEagerInstructions",
|
|
672
|
+
record: { id: `${instanceId}-eager`, variant: record.variant, content: eagerContent },
|
|
673
|
+
canonicalKernel,
|
|
674
|
+
expectedDescriptions,
|
|
675
|
+
expectedVersion,
|
|
676
|
+
}, failures);
|
|
677
|
+
validateSurfaceStructure({
|
|
678
|
+
surfaceId: "openCodeActiveDynamicContext",
|
|
679
|
+
record: { id: `${instanceId}-active`, content: activeContent },
|
|
680
|
+
canonicalKernel,
|
|
681
|
+
expectedDescriptions,
|
|
682
|
+
expectedVersion,
|
|
683
|
+
}, failures);
|
|
684
|
+
}
|
|
685
|
+
break;
|
|
686
|
+
}
|
|
687
|
+
case "openCodeCompactionAddition": {
|
|
688
|
+
if (content !== "" && content !== canonicalKernel) {
|
|
689
|
+
failures.push(failure(
|
|
690
|
+
"AGDF_INSTRUCTION_FOOTPRINT_COMPACTION_INVALID",
|
|
691
|
+
`${surfaceId}/${instanceId} must be empty or the exact kernel-only recovery block`,
|
|
692
|
+
surfaceId,
|
|
693
|
+
instanceId,
|
|
694
|
+
));
|
|
695
|
+
}
|
|
696
|
+
if (bindingCount(content) !== 0 || /\bactive\b|\binactive\b/iu.test(replaceAllLiteral(content, canonicalKernel, ""))) {
|
|
697
|
+
failures.push(failure(
|
|
698
|
+
"AGDF_INSTRUCTION_FOOTPRINT_COMPACTION_GUIDANCE_LEAK",
|
|
699
|
+
`${surfaceId}/${instanceId} contains a binding or active/inactive guidance`,
|
|
700
|
+
surfaceId,
|
|
701
|
+
instanceId,
|
|
702
|
+
));
|
|
703
|
+
}
|
|
704
|
+
break;
|
|
705
|
+
}
|
|
706
|
+
case "selectedGateCheckSkill": {
|
|
707
|
+
validateKernelIdentity(content, canonicalKernel, surfaceId, instanceId, failures);
|
|
708
|
+
const variant = record.variant ?? "canonical";
|
|
709
|
+
const dispatchHeading = variant === "global" ? "## Conditional Executable Dispatch" : "## Executable Dispatch";
|
|
710
|
+
const dispatchIndex = content.indexOf(dispatchHeading);
|
|
711
|
+
if (dispatchIndex < 0 || content.indexOf(canonicalKernel) > dispatchIndex || countLiteral(content, dispatchHeading) !== 1) {
|
|
712
|
+
failures.push(failure(
|
|
713
|
+
"AGDF_INSTRUCTION_FOOTPRINT_GATE_DISPATCH_ORDER",
|
|
714
|
+
`${surfaceId}/${instanceId} must contain one unchanged terminal dispatch after the kernel`,
|
|
715
|
+
surfaceId,
|
|
716
|
+
instanceId,
|
|
717
|
+
));
|
|
718
|
+
}
|
|
719
|
+
const expectedHeadings = variant === "global"
|
|
720
|
+
? [
|
|
721
|
+
"## Purpose",
|
|
722
|
+
"## Request Activation",
|
|
723
|
+
"## Repository Activation Guard",
|
|
724
|
+
"## Route Boundary",
|
|
725
|
+
"## Conditional Executable Dispatch",
|
|
726
|
+
"## Declared `instruction_only` Fallback",
|
|
727
|
+
]
|
|
728
|
+
: [
|
|
729
|
+
"## Purpose",
|
|
730
|
+
"## Request Activation",
|
|
731
|
+
"## Route Boundary",
|
|
732
|
+
"## Executable Dispatch",
|
|
733
|
+
"## Declared `instruction_only` Fallback",
|
|
734
|
+
];
|
|
735
|
+
const actualHeadings = content.match(/^## .+$/gmu) ?? [];
|
|
736
|
+
if (
|
|
737
|
+
!["canonical", "global"].includes(variant)
|
|
738
|
+
||
|
|
739
|
+
actualHeadings.length !== expectedHeadings.length
|
|
740
|
+
|| actualHeadings.some((heading, index) => heading !== expectedHeadings[index])
|
|
741
|
+
) {
|
|
742
|
+
failures.push(failure(
|
|
743
|
+
"AGDF_INSTRUCTION_FOOTPRINT_GATE_STRUCTURE",
|
|
744
|
+
`${surfaceId}/${instanceId} must contain exactly its approved compact level-two headings in order`,
|
|
745
|
+
surfaceId,
|
|
746
|
+
instanceId,
|
|
747
|
+
));
|
|
748
|
+
}
|
|
749
|
+
if (!/## Declared `instruction_only` Fallback/u.test(content) || !/terminal:\s*true/u.test(content)) {
|
|
750
|
+
failures.push(failure(
|
|
751
|
+
"AGDF_INSTRUCTION_FOOTPRINT_GATE_FALLBACK_INVALID",
|
|
752
|
+
`${surfaceId}/${instanceId} must keep explicit instruction_only fallback and terminal dispatch`,
|
|
753
|
+
surfaceId,
|
|
754
|
+
instanceId,
|
|
755
|
+
));
|
|
756
|
+
}
|
|
757
|
+
const terminalDispatchAnchor = variant === "global"
|
|
758
|
+
? GLOBAL_TERMINAL_DISPATCH_ANCHOR
|
|
759
|
+
: TERMINAL_DISPATCH_ANCHOR;
|
|
760
|
+
const terminalDispatchCount = countLiteral(content, terminalDispatchAnchor);
|
|
761
|
+
const fallbackStart = content.indexOf("## Declared `instruction_only` Fallback");
|
|
762
|
+
const terminalDispatchStart = content.indexOf(terminalDispatchAnchor);
|
|
763
|
+
const terminalDispatch = terminalDispatchCount === 1
|
|
764
|
+
&& terminalDispatchStart >= 0
|
|
765
|
+
&& fallbackStart > terminalDispatchStart
|
|
766
|
+
? content.slice(terminalDispatchStart, fallbackStart).trimEnd()
|
|
767
|
+
: "";
|
|
768
|
+
const canonicalTerminalDispatch = variant === "global"
|
|
769
|
+
? terminalDispatch.replace(GLOBAL_TERMINAL_DISPATCH_SKILL_IDENTITY, TERMINAL_DISPATCH_SKILL_IDENTITY)
|
|
770
|
+
: terminalDispatch;
|
|
771
|
+
const terminalDispatchFingerprint = createHash("sha256")
|
|
772
|
+
.update(canonicalTerminalDispatch, "utf8")
|
|
773
|
+
.digest("hex");
|
|
774
|
+
if (
|
|
775
|
+
terminalDispatchCount !== 1
|
|
776
|
+
|| terminalDispatchFingerprint !== AUTHORIZED_TERMINAL_DISPATCH_FINGERPRINT
|
|
777
|
+
) {
|
|
778
|
+
failures.push(failure(
|
|
779
|
+
"AGDF_INSTRUCTION_FOOTPRINT_GATE_TERMINAL_DISPATCH_DRIFT",
|
|
780
|
+
`${surfaceId}/${instanceId} must preserve the approved terminal dispatch byte-for-byte`,
|
|
781
|
+
surfaceId,
|
|
782
|
+
instanceId,
|
|
783
|
+
));
|
|
784
|
+
}
|
|
785
|
+
const fallback = fallbackStart >= 0 ? content.slice(fallbackStart) : "";
|
|
786
|
+
const expectedResourceRoot = variant === "global" ? "../../contracts" : "../../meta/contracts";
|
|
787
|
+
const expectedResources = [
|
|
788
|
+
"task-target-resolution.md",
|
|
789
|
+
"gate-transition.md",
|
|
790
|
+
"gate-artifact-preparation.md",
|
|
791
|
+
"interaction.md",
|
|
792
|
+
"control-scaffold.md",
|
|
793
|
+
"modes.md",
|
|
794
|
+
"quality.md",
|
|
795
|
+
].map((name) => `${expectedResourceRoot}/${name}`);
|
|
796
|
+
const declaredResources = [...fallback.matchAll(/`(\.\.\/\.\.\/(?:meta\/)?contracts\/[a-z0-9-]+\.md)`/gu)]
|
|
797
|
+
.map((match) => match[1]);
|
|
798
|
+
const resourcesOutsideFallback = [...content.slice(0, Math.max(0, fallbackStart)).matchAll(/`(\.\.\/\.\.\/(?:meta\/)?contracts\/[a-z0-9-]+\.md)`/gu)];
|
|
799
|
+
if (JSON.stringify(declaredResources) !== JSON.stringify(expectedResources) || resourcesOutsideFallback.length !== 0) {
|
|
800
|
+
failures.push(failure(
|
|
801
|
+
"AGDF_INSTRUCTION_FOOTPRINT_GATE_RESOURCES_INVALID",
|
|
802
|
+
`${surfaceId}/${instanceId} must load exactly ${expectedResources.length} focused contracts only through its declared fallback`,
|
|
803
|
+
surfaceId,
|
|
804
|
+
instanceId,
|
|
805
|
+
));
|
|
806
|
+
}
|
|
807
|
+
validateNoRouter(content, surfaceId, instanceId, failures);
|
|
808
|
+
break;
|
|
809
|
+
}
|
|
810
|
+
default:
|
|
811
|
+
break;
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
|
|
815
|
+
export function validateInstructionFootprintProfile({
|
|
816
|
+
definition,
|
|
817
|
+
canonicalKernel,
|
|
818
|
+
expectedDescriptions = {},
|
|
819
|
+
expectedVersion = null,
|
|
820
|
+
expectedInstanceIds = {},
|
|
821
|
+
surfaces,
|
|
822
|
+
requiredSurfaceIds = INSTRUCTION_FOOTPRINT_SURFACE_IDS,
|
|
823
|
+
}) {
|
|
824
|
+
const definitionResult = validateDefinition(definition);
|
|
825
|
+
const failures = [...definitionResult.failures];
|
|
826
|
+
const measurements = [];
|
|
827
|
+
const dynamicTokens = definition?.measurement?.dynamicAbsolutePathTokens ?? EXPECTED_DYNAMIC_TOKENS;
|
|
828
|
+
const normalizedKernel = normalizeInstructionLineEndings(canonicalKernel);
|
|
829
|
+
let canonicalFingerprint = null;
|
|
830
|
+
|
|
831
|
+
if (!normalizedKernel) {
|
|
832
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_CANONICAL_KERNEL_MISSING", "canonical kernel is required"));
|
|
833
|
+
} else {
|
|
834
|
+
const state = markerState(normalizedKernel);
|
|
835
|
+
if (state.startCount !== 1 || state.endCount !== 1 || !state.ordered) {
|
|
836
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_CANONICAL_MARKER_INVALID", "canonical kernel markers are missing, duplicate, partial or reordered"));
|
|
837
|
+
}
|
|
838
|
+
try {
|
|
839
|
+
canonicalFingerprint = requestActivationKernelFingerprint(normalizedKernel);
|
|
840
|
+
const identity = requestActivationKernelIdentity(normalizedKernel);
|
|
841
|
+
if (
|
|
842
|
+
identity.owner !== "request_activation_contract"
|
|
843
|
+
|| identity.path !== "meta/contracts/request-activation.md"
|
|
844
|
+
|| identity.policy_version !== 1
|
|
845
|
+
|| identity.guard_fingerprint !== canonicalFingerprint
|
|
846
|
+
) {
|
|
847
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_CANONICAL_FINGERPRINT_INVALID", "canonical kernel fingerprint does not match its normalized guard content"));
|
|
848
|
+
}
|
|
849
|
+
} catch {
|
|
850
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_CANONICAL_FINGERPRINT_INVALID", "canonical kernel must contain exactly one valid fingerprint field"));
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
const required = new Set(requiredSurfaceIds);
|
|
855
|
+
for (const id of required) {
|
|
856
|
+
if (!INSTRUCTION_FOOTPRINT_SURFACE_IDS.includes(id)) {
|
|
857
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_REQUIRED_SURFACE_UNKNOWN", `unknown required surface: ${id}`, id));
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
if (!surfaces || typeof surfaces !== "object" || Array.isArray(surfaces)) {
|
|
861
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_SURFACES_MISSING", "surface profile must be an object"));
|
|
862
|
+
}
|
|
863
|
+
const supplied = surfaces && typeof surfaces === "object" && !Array.isArray(surfaces) ? surfaces : {};
|
|
864
|
+
for (const id of Object.keys(supplied)) {
|
|
865
|
+
if (!INSTRUCTION_FOOTPRINT_SURFACE_IDS.includes(id)) {
|
|
866
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_SURFACE_UNKNOWN", `unknown surface: ${id}`, id));
|
|
867
|
+
}
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
for (const surfaceId of INSTRUCTION_FOOTPRINT_SURFACE_IDS) {
|
|
871
|
+
const records = supplied[surfaceId];
|
|
872
|
+
if (!Array.isArray(records) || records.length === 0) {
|
|
873
|
+
if (required.has(surfaceId)) {
|
|
874
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_SURFACE_MISSING", `missing required surface: ${surfaceId}`, surfaceId));
|
|
875
|
+
}
|
|
876
|
+
continue;
|
|
877
|
+
}
|
|
878
|
+
if (Object.hasOwn(expectedInstanceIds, surfaceId)) {
|
|
879
|
+
const actualIds = records.map((record) => record?.id);
|
|
880
|
+
const expectedIds = expectedInstanceIds[surfaceId];
|
|
881
|
+
if (!Array.isArray(expectedIds) || JSON.stringify(actualIds) !== JSON.stringify(expectedIds)) {
|
|
882
|
+
failures.push(failure(
|
|
883
|
+
"AGDF_INSTRUCTION_FOOTPRINT_SURFACE_INVENTORY_INVALID",
|
|
884
|
+
`${surfaceId} instances are missing, unknown, duplicate or out of order`,
|
|
885
|
+
surfaceId,
|
|
886
|
+
));
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
if (surfaceId === "skillDiscoveryDescription") {
|
|
890
|
+
const actualSlugs = records.map((record) => record?.slug);
|
|
891
|
+
const expectedSlugs = Object.keys(expectedDescriptions);
|
|
892
|
+
if (expectedSlugs.length === 0 || JSON.stringify(actualSlugs) !== JSON.stringify(expectedSlugs)) {
|
|
893
|
+
failures.push(failure(
|
|
894
|
+
"AGDF_INSTRUCTION_FOOTPRINT_DESCRIPTION_INVENTORY_INVALID",
|
|
895
|
+
`${surfaceId} must contain every canonical skill exactly once in definition order`,
|
|
896
|
+
surfaceId,
|
|
897
|
+
));
|
|
898
|
+
}
|
|
899
|
+
}
|
|
900
|
+
for (const [index, record] of records.entries()) {
|
|
901
|
+
const instanceId = typeof record?.id === "string" && record.id ? record.id : `${surfaceId}-${index + 1}`;
|
|
902
|
+
if (!record || typeof record.content !== "string") {
|
|
903
|
+
failures.push(failure("AGDF_INSTRUCTION_FOOTPRINT_SURFACE_INVALID", `${surfaceId}/${instanceId} content must be a string`, surfaceId, instanceId));
|
|
904
|
+
continue;
|
|
905
|
+
}
|
|
906
|
+
const measured = measureInstructionContent({
|
|
907
|
+
content: record.content,
|
|
908
|
+
dynamicValues: derivedDynamicValues(surfaceId, record.content),
|
|
909
|
+
dynamicTokens,
|
|
910
|
+
});
|
|
911
|
+
const budget = definition?.budgets?.[surfaceId]?.maxNormalizedBytes;
|
|
912
|
+
const overBudget = Number.isInteger(budget) && measured.normalized_bytes > budget;
|
|
913
|
+
measurements.push(Object.freeze({
|
|
914
|
+
surface_id: surfaceId,
|
|
915
|
+
instance_id: instanceId,
|
|
916
|
+
...measured,
|
|
917
|
+
max_normalized_bytes: budget ?? null,
|
|
918
|
+
status: overBudget ? "block" : "pass",
|
|
919
|
+
}));
|
|
920
|
+
if (overBudget) {
|
|
921
|
+
failures.push(failure(
|
|
922
|
+
"AGDF_INSTRUCTION_FOOTPRINT_BUDGET_EXCEEDED",
|
|
923
|
+
`${surfaceId}/${instanceId} is ${measured.normalized_bytes} normalized bytes; maximum is ${budget}`,
|
|
924
|
+
surfaceId,
|
|
925
|
+
instanceId,
|
|
926
|
+
));
|
|
927
|
+
}
|
|
928
|
+
validateSurfaceStructure({
|
|
929
|
+
surfaceId,
|
|
930
|
+
record: { ...record, id: instanceId },
|
|
931
|
+
canonicalKernel: normalizedKernel,
|
|
932
|
+
expectedDescriptions,
|
|
933
|
+
expectedVersion,
|
|
934
|
+
}, failures);
|
|
935
|
+
}
|
|
936
|
+
}
|
|
937
|
+
|
|
938
|
+
return Object.freeze({
|
|
939
|
+
schema_version: INSTRUCTION_FOOTPRINT_SCHEMA_VERSION,
|
|
940
|
+
status: failures.length === 0 ? "pass" : "block",
|
|
941
|
+
canonical_kernel_fingerprint: canonicalFingerprint,
|
|
942
|
+
measurements: Object.freeze(measurements),
|
|
943
|
+
failures: Object.freeze(failures),
|
|
944
|
+
});
|
|
945
|
+
}
|