create-agdf 0.14.5 → 0.20.1

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.
Files changed (1331) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +496 -19
  3. package/bin/create-agdf.js +2 -1
  4. package/generated/.agdf/control/README.md +29 -2
  5. package/generated/.agdf/control/templates/MASTER_BACKLOG.md +4 -2
  6. package/generated/.agdf/control/templates/RUN_STATE.md +1 -0
  7. package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +31 -0
  8. package/generated/.agdf/control/templates/artefacts/PRD.md +44 -5
  9. package/generated/.agdf/control/templates/artefacts/QA_REPORT.md +6 -0
  10. package/generated/.agdf/control/templates/artefacts/SD.md +31 -3
  11. package/generated/.agdf/control/templates/artefacts/TP.md +43 -8
  12. package/generated/.agdf/control/templates/artefacts/UR.md +17 -0
  13. package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +10 -0
  14. package/generated/.opencode/AGDF.md +17 -121
  15. package/generated/.opencode/README.md +7 -2
  16. package/generated/.opencode/agdf-agent-router.md +174 -0
  17. package/generated/.opencode/agdf-interaction-locales.json +2682 -495
  18. package/generated/.opencode/agdf-runtime-contract.md +17 -9
  19. package/generated/.opencode/contracts/closeout.md +7 -3
  20. package/generated/.opencode/contracts/control-scaffold.md +19 -6
  21. package/generated/.opencode/contracts/gate-artifact-preparation.md +132 -0
  22. package/generated/.opencode/contracts/gate-transition.md +56 -12
  23. package/generated/.opencode/contracts/interaction.md +331 -41
  24. package/generated/.opencode/contracts/modes.md +23 -11
  25. package/generated/.opencode/contracts/prd-definition.md +130 -0
  26. package/generated/.opencode/contracts/quality.md +85 -14
  27. package/generated/.opencode/contracts/request-activation.md +252 -0
  28. package/generated/.opencode/contracts/sd-definition.md +69 -0
  29. package/generated/.opencode/contracts/task-target-resolution.md +63 -9
  30. package/generated/.opencode/contracts/tp-definition.md +81 -0
  31. package/generated/.opencode/contracts/ur-definition.md +94 -0
  32. package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +70 -8
  33. package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +35 -3
  34. package/generated/.opencode/skills/agdf-code-review/SKILL.md +36 -2
  35. package/generated/.opencode/skills/agdf-delivery-closeout/SKILL.md +36 -4
  36. package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +36 -4
  37. package/generated/.opencode/skills/agdf-gate-check/SKILL.md +68 -222
  38. package/generated/.opencode/skills/agdf-prd-definition/SKILL.md +51 -0
  39. package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +78 -10
  40. package/generated/.opencode/skills/agdf-release-or/SKILL.md +44 -11
  41. package/generated/.opencode/skills/agdf-sd-definition/SKILL.md +51 -0
  42. package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +35 -3
  43. package/generated/.opencode/skills/agdf-tp-definition/SKILL.md +51 -0
  44. package/generated/.opencode/skills/agdf-ur-definition/SKILL.md +54 -0
  45. package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +100 -6
  46. package/generated/plugins/agdf/.claude-plugin/plugin.json +3 -2
  47. package/generated/plugins/agdf/.codex-plugin/plugin.json +3 -1
  48. package/generated/plugins/agdf/control/README.md +29 -2
  49. package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +4 -2
  50. package/generated/plugins/agdf/control/templates/RUN_STATE.md +1 -0
  51. package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +31 -0
  52. package/generated/plugins/agdf/control/templates/artefacts/PRD.md +44 -5
  53. package/generated/plugins/agdf/control/templates/artefacts/QA_REPORT.md +6 -0
  54. package/generated/plugins/agdf/control/templates/artefacts/SD.md +31 -3
  55. package/generated/plugins/agdf/control/templates/artefacts/TP.md +43 -8
  56. package/generated/plugins/agdf/control/templates/artefacts/UR.md +17 -0
  57. package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +10 -0
  58. package/generated/plugins/agdf/hooks/hooks.json +2 -2
  59. package/generated/plugins/agdf/hooks/session-start.sh +5 -70
  60. package/generated/plugins/agdf/mcp/agdf-mcp-launch.js +7 -0
  61. package/generated/plugins/agdf/mcp/claude.mcp.json +11 -0
  62. package/generated/plugins/agdf/mcp/sdk/expected-sdk.json +21 -0
  63. package/generated/plugins/agdf/mcp/sdk/package-lock.json +47 -0
  64. package/generated/plugins/agdf/mcp/sdk/package.json +7 -0
  65. package/generated/plugins/agdf/mcp/server/NOTICE +10 -0
  66. package/generated/plugins/agdf/mcp/server/README.md +136 -0
  67. package/generated/plugins/agdf/mcp/server/bin/agdf-mcp.js +24 -0
  68. package/generated/plugins/agdf/mcp/server/package.json +59 -0
  69. package/generated/plugins/agdf/mcp/server/src/cockpit-resource.js +20 -0
  70. package/generated/plugins/agdf/mcp/server/src/generation-entry.js +86 -0
  71. package/generated/plugins/agdf/mcp/server/src/generation-protocol.js +44 -0
  72. package/generated/plugins/agdf/mcp/server/src/generation.js +211 -0
  73. package/generated/plugins/agdf/mcp/server/src/main.js +56 -0
  74. package/generated/plugins/agdf/mcp/server/src/server.js +187 -0
  75. package/generated/plugins/agdf/mcp/server/src/ui-capability.js +17 -0
  76. package/generated/plugins/agdf/mcp/server/src/worker-entry.js +39 -0
  77. package/generated/plugins/agdf/mcp/server/src/worker.js +134 -0
  78. package/generated/plugins/agdf/mcp/server/ui/cockpit.html +109 -0
  79. package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +8 -0
  80. package/generated/plugins/agdf/mcp/server/ui/decision.html +108 -0
  81. package/generated/plugins/agdf/mcp/server/ui/manifest.json +8 -0
  82. package/generated/plugins/agdf/mcp.json +28 -0
  83. package/generated/plugins/agdf/meta/agdf-agent-router.md +50 -8
  84. package/generated/plugins/agdf/meta/agdf-interaction-locales.json +2682 -495
  85. package/generated/plugins/agdf/meta/agdf-mcp-capability.json +158 -0
  86. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +354 -17
  87. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +17 -9
  88. package/generated/plugins/agdf/meta/contracts/closeout.md +6 -2
  89. package/generated/plugins/agdf/meta/contracts/control-scaffold.md +17 -4
  90. package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
  91. package/generated/plugins/agdf/meta/contracts/gate-transition.md +48 -4
  92. package/generated/plugins/agdf/meta/contracts/interaction.md +328 -38
  93. package/generated/plugins/agdf/meta/contracts/modes.md +23 -11
  94. package/generated/plugins/agdf/meta/contracts/prd-definition.md +130 -0
  95. package/generated/plugins/agdf/meta/contracts/quality.md +77 -6
  96. package/generated/plugins/agdf/meta/contracts/request-activation.md +252 -0
  97. package/generated/plugins/agdf/meta/contracts/sd-definition.md +69 -0
  98. package/generated/plugins/agdf/meta/contracts/task-target-resolution.md +63 -9
  99. package/generated/plugins/agdf/meta/contracts/tp-definition.md +81 -0
  100. package/generated/plugins/agdf/meta/contracts/ur-definition.md +94 -0
  101. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
  102. package/generated/plugins/agdf/meta/distribution-profile-history.json +14 -0
  103. package/generated/plugins/agdf/meta/schemas/agent-plugins/1.0.0/mcp.schema.json +120 -0
  104. package/generated/plugins/agdf/meta/schemas/agent-plugins/1.0.0/plugin.schema.json +65 -0
  105. package/generated/plugins/agdf/meta/schemas/agent-plugins/1.0.0/provenance.json +19 -0
  106. package/generated/plugins/agdf/runtime/agdf-local.js +5 -4
  107. package/generated/plugins/agdf/runtime/agdf-session-check.js +127 -50
  108. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2682 -495
  109. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +354 -17
  110. package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/closeout.md +7 -3
  111. package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/control-scaffold.md +19 -6
  112. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
  113. package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/gate-transition.md +56 -12
  114. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +777 -0
  115. package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/modes.md +23 -11
  116. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +130 -0
  117. package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/quality.md +85 -14
  118. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +252 -0
  119. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +69 -0
  120. package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/task-target-resolution.md +63 -9
  121. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +81 -0
  122. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +94 -0
  123. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +251 -16
  124. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/contract-command.js +24 -0
  125. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +44 -0
  126. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +11 -11
  127. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +254 -5
  128. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/runtime-context.js +14 -37
  129. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +205 -7
  130. package/generated/plugins/agdf/runtime/create-agdf/lib/control-command.js +4 -0
  131. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +22 -0
  132. package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +28 -0
  133. package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +4 -0
  134. package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/service.js +3 -0
  135. package/generated/plugins/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +25 -0
  136. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +5 -0
  137. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +3 -3
  138. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +3 -3
  139. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +4 -4
  140. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +1 -1
  141. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +3 -3
  142. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +3 -3
  143. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +1 -1
  144. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +1 -1
  145. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +2 -1
  146. package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/claude/session-command.js +2 -0
  147. package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/codex/session-command.js +7 -0
  148. package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/copilot/session-command.js +1 -0
  149. package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/opencode/session-command.js +1 -0
  150. package/generated/plugins/agdf/runtime/create-agdf/lib/host-adapters/session-command.js +11 -0
  151. package/generated/plugins/agdf/runtime/create-agdf/lib/host-command.js +112 -0
  152. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +360 -0
  153. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +26 -0
  154. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
  155. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +527 -0
  156. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +420 -0
  157. package/generated/plugins/agdf/runtime/create-agdf/lib/npm-invocation.js +27 -0
  158. package/generated/plugins/agdf/runtime/create-agdf/lib/repository-context.js +87 -0
  159. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +12 -0
  160. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/control-context.js +11 -0
  161. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/git-history.js +7 -0
  162. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/git-originals.js +36 -0
  163. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/local-validator.js +39 -5
  164. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +1 -298
  165. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/runtime-probe.js +61 -0
  166. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +3 -3
  167. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +9 -8
  168. package/generated/plugins/agdf/runtime/create-agdf/lib/skill-dispatch/binding.js +9 -0
  169. package/generated/plugins/agdf/runtime/create-agdf/package.json +6 -2
  170. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
  171. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
  172. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
  173. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
  174. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
  175. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
  176. package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/delivery-map.js +31 -37
  177. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
  178. package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/doctor.js +85 -17
  179. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +827 -0
  180. package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-evaluation/gate-policy.js +141 -10
  181. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
  182. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +32 -0
  183. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
  184. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
  185. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
  186. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +237 -0
  187. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
  188. package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/run-state.js +108 -74
  189. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
  190. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
  191. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
  192. package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-evaluation/shared.js +5 -2
  193. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
  194. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
  195. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
  196. package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/verified-change.js +10 -30
  197. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
  198. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-backlog.js +135 -0
  199. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-context.js +97 -0
  200. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-contract.js +86 -0
  201. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.d.ts +17 -0
  202. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-list.js +45 -0
  203. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit-session.js +217 -0
  204. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +388 -0
  205. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +299 -0
  206. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/decision-session.js +243 -0
  207. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +35 -0
  208. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +319 -0
  209. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +149 -0
  210. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +41 -0
  211. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +57 -0
  212. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +85 -0
  213. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +122 -0
  214. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +226 -0
  215. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +38 -0
  216. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-pool.js +105 -0
  217. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/cockpit-worker.js +33 -0
  218. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/control-changes.js +33 -0
  219. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +55 -0
  220. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +378 -0
  221. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-read-boundary.js +22 -0
  222. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command-contract.js +73 -0
  223. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +137 -0
  224. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +95 -0
  225. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
  226. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +94 -0
  227. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
  228. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
  229. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +67 -0
  230. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/contained-file.js +56 -0
  231. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-configuration.js +19 -0
  232. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-contract.js +32 -0
  233. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-action-service.js +55 -0
  234. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +12 -0
  235. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +132 -0
  236. package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/index.js +2 -0
  237. package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-state/legacy-migration.js +5 -31
  238. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
  239. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +138 -0
  240. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +130 -0
  241. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +136 -0
  242. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +108 -0
  243. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
  244. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +29 -0
  245. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
  246. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
  247. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +90 -0
  248. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +143 -0
  249. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +174 -0
  250. package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/control-state/run-identity.js +1 -0
  251. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +31 -0
  252. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +103 -0
  253. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +59 -0
  254. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +80 -0
  255. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
  256. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
  257. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +443 -0
  258. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +348 -0
  259. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +273 -0
  260. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +296 -0
  261. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
  262. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
  263. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +184 -0
  264. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +458 -0
  265. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +141 -0
  266. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +26 -0
  267. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +221 -0
  268. 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
  269. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +170 -0
  270. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +106 -0
  271. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +57 -0
  272. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +201 -0
  273. package/generated/plugins/{copilot/agdf/runtime/create-agdf → agdf/runtime/create-agdf/runtime/core}/lib/control-state/run-state-resolver.js +1 -1
  274. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +484 -0
  275. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +15 -0
  276. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +359 -0
  277. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +571 -0
  278. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +65 -0
  279. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-text.js +8 -0
  280. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +67 -0
  281. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +14 -0
  282. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +26 -0
  283. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.d.ts +2 -0
  284. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +98 -0
  285. package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
  286. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +4 -0
  287. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +176 -0
  288. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/repository-context-reader.js +87 -0
  289. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/artefact-templates.js +72 -0
  290. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/binding.js +26 -0
  291. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +70 -0
  292. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/contracts.js +23 -0
  293. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/host-installation.js +200 -0
  294. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +496 -0
  295. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/binding.js +66 -0
  296. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
  297. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +430 -0
  298. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
  299. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
  300. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
  301. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
  302. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +833 -0
  303. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
  304. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/task-target-resolution.js +202 -0
  305. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/LICENSE +11 -0
  306. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/decode.js +3 -0
  307. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  308. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
  309. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
  310. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
  311. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
  312. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
  313. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
  314. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
  315. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
  316. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
  317. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
  318. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
  319. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
  320. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
  321. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
  322. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
  323. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
  324. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
  325. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/escape.js +3 -0
  326. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/package.json +118 -0
  327. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
  328. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/LICENSE +20 -0
  329. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
  330. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
  331. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
  332. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.js +47 -0
  333. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
  334. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/package.json +12 -0
  335. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
  336. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
  337. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.js +45 -0
  338. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.cjs +63 -0
  339. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.js +63 -0
  340. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/nanoid.js +1 -0
  341. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
  342. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
  343. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
  344. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/package.json +89 -0
  345. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
  346. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
  347. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
  348. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/LICENSE +19 -0
  349. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
  350. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
  351. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
  352. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
  353. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
  354. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
  355. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
  356. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
  357. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
  358. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
  359. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
  360. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
  361. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
  362. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
  363. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
  364. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
  365. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
  366. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
  367. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
  368. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
  369. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
  370. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
  371. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/index.js +42 -0
  372. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
  373. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
  374. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
  375. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
  376. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
  377. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
  378. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
  379. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
  380. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/package.json +50 -0
  381. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/LICENSE +15 -0
  382. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/package.json +25 -0
  383. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
  384. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.js +75 -0
  385. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/LICENSE +20 -0
  386. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
  387. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/comment.js +13 -0
  388. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/container.js +494 -0
  389. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
  390. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
  391. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/document.js +33 -0
  392. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
  393. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/input.js +282 -0
  394. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
  395. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/list.js +79 -0
  396. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
  397. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
  398. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/node.js +494 -0
  399. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parse.js +42 -0
  400. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parser.js +626 -0
  401. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
  402. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
  403. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
  404. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/processor.js +67 -0
  405. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/result.js +42 -0
  406. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/root.js +76 -0
  407. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/rule.js +27 -0
  408. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
  409. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
  410. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
  411. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
  412. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
  413. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
  414. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warning.js +47 -0
  415. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/package.json +88 -0
  416. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/LICENSE +28 -0
  417. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
  418. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  419. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
  420. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
  421. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
  422. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
  423. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
  424. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
  425. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
  426. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
  427. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/package.json +71 -0
  428. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/source-map.js +8 -0
  429. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  430. package/generated/plugins/agdf/scripts/agent-skills-conformance.mjs +9 -5
  431. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +1123 -182
  432. package/generated/plugins/agdf/scripts/instruction-footprint.mjs +945 -0
  433. package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +67 -5
  434. package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +34 -2
  435. package/generated/plugins/agdf/skills/code-review/SKILL.md +36 -2
  436. package/generated/plugins/agdf/skills/delivery-closeout/SKILL.md +34 -2
  437. package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +34 -2
  438. package/generated/plugins/agdf/skills/gate-check/SKILL.md +68 -222
  439. package/generated/plugins/agdf/skills/prd-definition/SKILL.md +51 -0
  440. package/generated/plugins/agdf/skills/prd-definition/help.md +23 -0
  441. package/generated/plugins/agdf/skills/qa-gate/SKILL.md +73 -5
  442. package/generated/plugins/agdf/skills/release-or/SKILL.md +36 -3
  443. package/generated/plugins/agdf/skills/sd-definition/SKILL.md +51 -0
  444. package/generated/plugins/agdf/skills/sd-definition/help.md +17 -0
  445. package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +34 -2
  446. package/generated/plugins/agdf/skills/tp-definition/SKILL.md +51 -0
  447. package/generated/plugins/agdf/skills/tp-definition/help.md +17 -0
  448. package/generated/plugins/agdf/skills/ur-definition/SKILL.md +54 -0
  449. package/generated/plugins/agdf/skills/ur-definition/help.md +19 -0
  450. package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +100 -6
  451. package/generated/plugins/agdf/skills/ux-intent-definition/help.md +3 -0
  452. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  453. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  454. package/generated/plugins/agdf/submission/openai/release-notes.md +1 -1
  455. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  456. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +3314 -409
  457. package/generated/plugins/copilot/agdf/control/README.md +125 -0
  458. package/generated/plugins/copilot/agdf/control/templates/AGDF_RUN.md +139 -0
  459. package/generated/plugins/copilot/agdf/control/templates/AGENT_QUALITY_CONTRACTS.json +126 -0
  460. package/generated/plugins/copilot/agdf/control/templates/CONTEXT_GRAPH.md +51 -0
  461. package/generated/plugins/copilot/agdf/control/templates/MASTER_BACKLOG.md +39 -0
  462. package/generated/plugins/copilot/agdf/control/templates/RUN_STATE.md +93 -0
  463. package/generated/plugins/copilot/agdf/control/templates/SOT_REGISTRY.md +25 -0
  464. package/generated/plugins/copilot/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +135 -0
  465. package/generated/plugins/copilot/agdf/control/templates/artefacts/OR.md +125 -0
  466. package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +113 -0
  467. package/generated/plugins/copilot/agdf/control/templates/artefacts/QA_REPORT.md +44 -0
  468. package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +70 -0
  469. package/generated/plugins/copilot/agdf/control/templates/artefacts/TP.md +71 -0
  470. package/generated/plugins/copilot/agdf/control/templates/artefacts/UR.md +58 -0
  471. package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +61 -0
  472. package/generated/plugins/copilot/agdf/control/templates/artefacts/VERIFIED_CHANGE.md +58 -0
  473. package/generated/plugins/copilot/agdf/mcp/agdf-mcp-launch.js +7 -0
  474. package/generated/plugins/copilot/agdf/mcp/sdk/expected-sdk.json +21 -0
  475. package/generated/plugins/copilot/agdf/mcp/sdk/package-lock.json +47 -0
  476. package/generated/plugins/copilot/agdf/mcp/sdk/package.json +7 -0
  477. package/generated/plugins/copilot/agdf/mcp/server/NOTICE +10 -0
  478. package/generated/plugins/copilot/agdf/mcp/server/README.md +136 -0
  479. package/generated/plugins/copilot/agdf/mcp/server/bin/agdf-mcp.js +24 -0
  480. package/generated/plugins/copilot/agdf/mcp/server/package.json +59 -0
  481. package/generated/plugins/copilot/agdf/mcp/server/src/cockpit-resource.js +20 -0
  482. package/generated/plugins/copilot/agdf/mcp/server/src/generation-entry.js +86 -0
  483. package/generated/plugins/copilot/agdf/mcp/server/src/generation-protocol.js +44 -0
  484. package/generated/plugins/copilot/agdf/mcp/server/src/generation.js +211 -0
  485. package/generated/plugins/copilot/agdf/mcp/server/src/main.js +56 -0
  486. package/generated/plugins/copilot/agdf/mcp/server/src/server.js +187 -0
  487. package/generated/plugins/copilot/agdf/mcp/server/src/ui-capability.js +17 -0
  488. package/generated/plugins/copilot/agdf/mcp/server/src/worker-entry.js +39 -0
  489. package/generated/plugins/copilot/agdf/mcp/server/src/worker.js +134 -0
  490. package/generated/plugins/copilot/agdf/mcp.json +16 -0
  491. package/generated/plugins/copilot/agdf/meta/agdf-agent-router.md +50 -8
  492. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +354 -17
  493. package/generated/plugins/copilot/agdf/meta/agdf-runtime-contract.md +17 -9
  494. package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +14 -0
  495. package/generated/plugins/copilot/agdf/plugin.json +3 -5
  496. package/generated/plugins/copilot/agdf/runtime/agdf-local.js +5 -4
  497. package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +110 -47
  498. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +2682 -495
  499. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +354 -17
  500. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/closeout.md +82 -0
  501. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/context-graph.md +48 -0
  502. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/control-scaffold.md +145 -0
  503. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
  504. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-transition.md +209 -0
  505. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +777 -0
  506. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +195 -0
  507. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +130 -0
  508. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +228 -0
  509. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +252 -0
  510. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +69 -0
  511. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/task-target-resolution.md +156 -0
  512. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +81 -0
  513. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +94 -0
  514. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +251 -16
  515. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/contract-command.js +24 -0
  516. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/control-maintenance-command.js +44 -0
  517. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +11 -11
  518. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +254 -5
  519. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +14 -37
  520. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +205 -7
  521. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-command.js +4 -0
  522. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/git-observation.js +22 -0
  523. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/interaction.js +28 -0
  524. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/repair.js +4 -0
  525. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/service.js +3 -0
  526. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-maintenance/startup.js +25 -0
  527. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-recovery.js +5 -0
  528. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +3 -3
  529. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +3 -3
  530. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +4 -4
  531. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +1 -1
  532. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +3 -3
  533. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +3 -3
  534. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +1 -1
  535. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +1 -1
  536. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +2 -1
  537. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/claude/session-command.js +2 -0
  538. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/codex/session-command.js +7 -0
  539. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/copilot/session-command.js +1 -0
  540. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/opencode/session-command.js +1 -0
  541. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-adapters/session-command.js +11 -0
  542. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/host-command.js +112 -0
  543. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +360 -0
  544. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-entry.js +26 -0
  545. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
  546. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +527 -0
  547. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +420 -0
  548. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/npm-invocation.js +27 -0
  549. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/repository-context.js +87 -0
  550. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-command-service.js +12 -0
  551. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/control-context.js +11 -0
  552. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/git-history.js +7 -0
  553. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/git-originals.js +36 -0
  554. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/local-validator.js +39 -5
  555. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +1 -298
  556. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/runtime-probe.js +61 -0
  557. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +3 -3
  558. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +9 -8
  559. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/skill-dispatch/binding.js +9 -0
  560. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +6 -2
  561. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
  562. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
  563. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
  564. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
  565. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
  566. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
  567. package/{lib → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/delivery-map.js +31 -37
  568. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
  569. package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-evaluation/doctor.js +85 -17
  570. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +827 -0
  571. package/{lib → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/gate-policy.js +141 -10
  572. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
  573. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/next-action.js +32 -0
  574. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
  575. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
  576. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
  577. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +237 -0
  578. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
  579. package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/run-state.js +108 -74
  580. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
  581. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
  582. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
  583. package/{lib → generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib}/control-evaluation/shared.js +5 -2
  584. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
  585. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
  586. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
  587. package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/verified-change.js +10 -30
  588. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
  589. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +299 -0
  590. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +35 -0
  591. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +319 -0
  592. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/compatibility.js +149 -0
  593. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/contract.js +41 -0
  594. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/interaction.js +57 -0
  595. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/migration.js +85 -0
  596. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/presentation.js +122 -0
  597. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/repair.js +226 -0
  598. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-maintenance/service.js +38 -0
  599. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/fs.js +55 -0
  600. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read/snapshot.js +378 -0
  601. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-read-boundary.js +22 -0
  602. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command-contract.js +73 -0
  603. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-command.js +137 -0
  604. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/approval-operations.js +95 -0
  605. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
  606. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/artefact-bindings.js +94 -0
  607. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
  608. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
  609. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/backlog-summary.js +67 -0
  610. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/contained-file.js +56 -0
  611. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/control-configuration.js +19 -0
  612. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/decision-material-contract.js +12 -0
  613. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/evidence-bindings.js +132 -0
  614. package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/index.js +2 -0
  615. package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-state/legacy-migration.js +5 -31
  616. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
  617. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-decision.js +138 -0
  618. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-render.js +130 -0
  619. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-review.js +136 -0
  620. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/preview-snapshot.js +108 -0
  621. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
  622. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/recording-formats.js +29 -0
  623. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
  624. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
  625. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-backlog.js +90 -0
  626. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +143 -0
  627. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +174 -0
  628. package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-state/run-identity.js +1 -0
  629. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-identity.js +31 -0
  630. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-proof.js +103 -0
  631. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operation-status.js +59 -0
  632. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-operations.js +80 -0
  633. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
  634. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
  635. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +443 -0
  636. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation.js +348 -0
  637. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recording.js +273 -0
  638. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-recovery.js +296 -0
  639. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
  640. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
  641. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision-history.js +184 -0
  642. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +458 -0
  643. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal-compute.js +141 -0
  644. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-seal.js +26 -0
  645. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +221 -0
  646. 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
  647. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-edits.js +170 -0
  648. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-parser.js +106 -0
  649. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +57 -0
  650. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-repository.js +201 -0
  651. package/generated/plugins/{agdf/runtime/create-agdf → copilot/agdf/runtime/create-agdf/runtime/core}/lib/control-state/run-state-resolver.js +1 -1
  652. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-writer.js +484 -0
  653. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-pending.js +15 -0
  654. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-step-transaction.js +359 -0
  655. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +571 -0
  656. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-store-inspection.js +65 -0
  657. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-text.js +8 -0
  658. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/delivery-continuation/service.js +67 -0
  659. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/fs-swap.js +26 -0
  660. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +14 -0
  661. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +26 -0
  662. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +98 -0
  663. package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
  664. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-resource-contract.js +4 -0
  665. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +176 -0
  666. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/repository-context-reader.js +87 -0
  667. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/artefact-templates.js +72 -0
  668. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/binding.js +27 -0
  669. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/context.js +70 -0
  670. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/contracts.js +23 -0
  671. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/distribution-profile-history.js +173 -0
  672. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +496 -0
  673. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/binding.js +66 -0
  674. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
  675. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +430 -0
  676. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
  677. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
  678. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
  679. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
  680. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +833 -0
  681. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
  682. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/task-target-resolution.js +202 -0
  683. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/LICENSE +11 -0
  684. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/decode.js +3 -0
  685. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  686. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
  687. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
  688. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
  689. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
  690. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
  691. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
  692. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
  693. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
  694. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
  695. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
  696. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
  697. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
  698. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
  699. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
  700. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
  701. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
  702. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
  703. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/escape.js +3 -0
  704. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/package.json +118 -0
  705. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
  706. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/LICENSE +20 -0
  707. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
  708. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
  709. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
  710. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.js +47 -0
  711. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
  712. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/async/package.json +12 -0
  713. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
  714. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
  715. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.browser.js +45 -0
  716. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.cjs +63 -0
  717. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/index.js +63 -0
  718. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/nanoid.js +1 -0
  719. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
  720. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
  721. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
  722. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/package.json +89 -0
  723. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
  724. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
  725. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
  726. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/LICENSE +19 -0
  727. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
  728. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
  729. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
  730. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
  731. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
  732. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
  733. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
  734. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
  735. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
  736. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
  737. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
  738. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
  739. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
  740. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
  741. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
  742. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
  743. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
  744. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
  745. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
  746. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
  747. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
  748. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
  749. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/index.js +42 -0
  750. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
  751. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
  752. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
  753. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
  754. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
  755. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
  756. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
  757. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
  758. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/parse5/package.json +50 -0
  759. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/LICENSE +15 -0
  760. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/package.json +25 -0
  761. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
  762. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/picocolors/picocolors.js +75 -0
  763. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/LICENSE +20 -0
  764. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
  765. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/comment.js +13 -0
  766. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/container.js +494 -0
  767. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
  768. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
  769. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/document.js +33 -0
  770. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
  771. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/input.js +282 -0
  772. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
  773. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/list.js +79 -0
  774. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
  775. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
  776. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/node.js +494 -0
  777. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parse.js +42 -0
  778. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/parser.js +626 -0
  779. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
  780. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
  781. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
  782. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/processor.js +67 -0
  783. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/result.js +42 -0
  784. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/root.js +76 -0
  785. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/rule.js +27 -0
  786. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
  787. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
  788. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
  789. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
  790. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
  791. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
  792. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/lib/warning.js +47 -0
  793. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/postcss/package.json +88 -0
  794. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/LICENSE +28 -0
  795. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
  796. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  797. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
  798. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
  799. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
  800. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
  801. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
  802. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
  803. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
  804. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
  805. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/package.json +71 -0
  806. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/node_modules/source-map-js/source-map.js +8 -0
  807. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
  808. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-brownfield-analysis/SKILL.md +70 -8
  809. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-clean-implementation-review/SKILL.md +35 -3
  810. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-code-review/SKILL.md +36 -2
  811. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-delivery-closeout/SKILL.md +36 -4
  812. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-delivery-path-search/SKILL.md +36 -4
  813. package/generated/plugins/copilot/agdf/skills/agdf-gate-check/SKILL.md +86 -0
  814. package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -0
  815. package/generated/plugins/copilot/agdf/skills/agdf-prd-definition/SKILL.md +51 -0
  816. package/generated/plugins/copilot/agdf/skills/agdf-qa-gate/SKILL.md +205 -0
  817. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-release-or/SKILL.md +44 -11
  818. package/generated/plugins/copilot/agdf/skills/agdf-runtime-contract.md +24 -0
  819. package/generated/plugins/copilot/agdf/skills/agdf-sd-definition/SKILL.md +51 -0
  820. package/generated/plugins/copilot/agdf/{copilot-skills → skills}/agdf-task-plan-review/SKILL.md +35 -3
  821. package/generated/plugins/copilot/agdf/skills/agdf-tp-definition/SKILL.md +51 -0
  822. package/generated/plugins/copilot/agdf/skills/agdf-ur-definition/SKILL.md +54 -0
  823. package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +188 -0
  824. package/generated/plugins/copilot/agdf/skills/contracts/closeout.md +82 -0
  825. package/generated/plugins/copilot/agdf/skills/contracts/context-graph.md +48 -0
  826. package/generated/plugins/copilot/agdf/skills/contracts/control-scaffold.md +145 -0
  827. package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +132 -0
  828. package/generated/plugins/copilot/agdf/skills/contracts/gate-transition.md +209 -0
  829. package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +777 -0
  830. package/generated/plugins/copilot/agdf/skills/contracts/modes.md +195 -0
  831. package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +130 -0
  832. package/generated/plugins/copilot/agdf/skills/contracts/quality.md +228 -0
  833. package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +252 -0
  834. package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +69 -0
  835. package/generated/plugins/copilot/agdf/skills/contracts/task-target-resolution.md +156 -0
  836. package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +81 -0
  837. package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +94 -0
  838. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
  839. package/generated/submissions/openai/agdf/meta/agdf-agent-router.md +50 -8
  840. package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +2682 -495
  841. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +354 -17
  842. package/generated/submissions/openai/agdf/meta/agdf-runtime-contract.md +17 -9
  843. package/generated/submissions/openai/agdf/meta/contracts/closeout.md +6 -2
  844. package/generated/submissions/openai/agdf/meta/contracts/control-scaffold.md +17 -4
  845. package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +132 -0
  846. package/generated/submissions/openai/agdf/meta/contracts/gate-transition.md +48 -4
  847. package/generated/submissions/openai/agdf/meta/contracts/interaction.md +328 -38
  848. package/generated/submissions/openai/agdf/meta/contracts/modes.md +23 -11
  849. package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +130 -0
  850. package/generated/submissions/openai/agdf/meta/contracts/quality.md +77 -6
  851. package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +252 -0
  852. package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +69 -0
  853. package/generated/submissions/openai/agdf/meta/contracts/task-target-resolution.md +63 -9
  854. package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +81 -0
  855. package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +94 -0
  856. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
  857. package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +14 -0
  858. package/generated/submissions/openai/agdf/meta/schemas/agent-plugins/1.0.0/mcp.schema.json +120 -0
  859. package/generated/submissions/openai/agdf/meta/schemas/agent-plugins/1.0.0/plugin.schema.json +65 -0
  860. package/generated/submissions/openai/agdf/meta/schemas/agent-plugins/1.0.0/provenance.json +19 -0
  861. package/generated/submissions/openai/agdf/plugin.json +47 -0
  862. package/generated/submissions/openai/agdf/skills/brownfield-analysis/SKILL.md +67 -5
  863. package/generated/submissions/openai/agdf/skills/clean-implementation-review/SKILL.md +34 -2
  864. package/generated/submissions/openai/agdf/skills/code-review/SKILL.md +36 -2
  865. package/generated/submissions/openai/agdf/skills/delivery-closeout/SKILL.md +34 -2
  866. package/generated/submissions/openai/agdf/skills/delivery-path-search/SKILL.md +34 -2
  867. package/generated/submissions/openai/agdf/skills/gate-check/SKILL.md +68 -222
  868. package/generated/submissions/openai/agdf/skills/prd-definition/SKILL.md +51 -0
  869. package/generated/submissions/openai/agdf/skills/prd-definition/help.md +23 -0
  870. package/generated/submissions/openai/agdf/skills/qa-gate/SKILL.md +73 -5
  871. package/generated/submissions/openai/agdf/skills/release-or/SKILL.md +36 -3
  872. package/generated/submissions/openai/agdf/skills/sd-definition/SKILL.md +51 -0
  873. package/generated/submissions/openai/agdf/skills/sd-definition/help.md +17 -0
  874. package/generated/submissions/openai/agdf/skills/task-plan-review/SKILL.md +34 -2
  875. package/generated/submissions/openai/agdf/skills/tp-definition/SKILL.md +51 -0
  876. package/generated/submissions/openai/agdf/skills/tp-definition/help.md +17 -0
  877. package/generated/submissions/openai/agdf/skills/ur-definition/SKILL.md +54 -0
  878. package/generated/submissions/openai/agdf/skills/ur-definition/help.md +19 -0
  879. package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +100 -6
  880. package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +3 -0
  881. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  882. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  883. package/generated/submissions/openai/agdf/submission/openai/inventory.json +104 -32
  884. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  885. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  886. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  887. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +1 -1
  888. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  889. package/lib/cli/application.js +726 -271
  890. package/lib/cli/command-registry.js +251 -16
  891. package/lib/cli/contract-command.js +24 -0
  892. package/lib/cli/control-maintenance-command.js +44 -0
  893. package/lib/cli/delivery-path-search-command.js +11 -11
  894. package/lib/cli/parse-args.js +254 -5
  895. package/lib/cli/runtime-context.js +14 -37
  896. package/lib/cli/validation-handlers.js +205 -7
  897. package/lib/control-command.js +4 -0
  898. package/lib/control-evaluation/git-observation.js +22 -0
  899. package/lib/control-maintenance/interaction.js +28 -0
  900. package/lib/control-maintenance/repair.js +4 -0
  901. package/lib/control-maintenance/service.js +3 -0
  902. package/lib/control-maintenance/startup.js +25 -0
  903. package/lib/control-state/run-recovery.js +5 -0
  904. package/lib/delivery-path-search/evaluators/claude.js +3 -3
  905. package/lib/delivery-path-search/evaluators/codex.js +3 -3
  906. package/lib/delivery-path-search/evaluators/opencode.js +4 -4
  907. package/lib/delivery-path-search/evaluators/protocol.js +1 -1
  908. package/lib/delivery-path-search/generators/claude.js +3 -3
  909. package/lib/delivery-path-search/generators/codex.js +3 -3
  910. package/lib/delivery-path-search/generators/protocol.js +1 -1
  911. package/lib/delivery-path-search/surfaces/capabilities.js +1 -1
  912. package/lib/delivery-path-search/transports/read-only-guard.js +2 -1
  913. package/lib/host-adapters/claude/loaded-sessions.js +45 -0
  914. package/lib/host-adapters/claude/marketplace.js +2 -0
  915. package/lib/host-adapters/claude/permission-rules.js +20 -0
  916. package/lib/host-adapters/claude/plugin-mcp.js +40 -0
  917. package/lib/host-adapters/claude/plugin.js +285 -0
  918. package/lib/host-adapters/claude/runtime-check.js +39 -0
  919. package/lib/host-adapters/claude/session-command.js +2 -0
  920. package/lib/host-adapters/claude/uninstall.js +80 -0
  921. package/lib/host-adapters/codex/config-source.js +48 -0
  922. package/lib/host-adapters/codex/identity.js +19 -0
  923. package/lib/host-adapters/codex/mcp-startup.js +14 -0
  924. package/lib/host-adapters/codex/plugin-mcp.js +39 -0
  925. package/lib/host-adapters/codex/plugin.js +243 -0
  926. package/lib/host-adapters/codex/runtime-check.js +27 -0
  927. package/lib/host-adapters/codex/session-command.js +7 -0
  928. package/lib/host-adapters/copilot/plugin.js +220 -0
  929. package/lib/host-adapters/copilot/session-command.js +1 -0
  930. package/lib/host-adapters/opencode/runtime-check.js +39 -0
  931. package/lib/host-adapters/opencode/session-command.js +1 -0
  932. package/lib/host-adapters/opencode/status.js +43 -0
  933. package/lib/host-adapters/session-command.js +11 -0
  934. package/lib/host-command.js +112 -0
  935. package/lib/install-setup/contract.js +319 -0
  936. package/lib/install-setup/control-migration.js +10 -0
  937. package/lib/install-setup/control-repair.js +1 -0
  938. package/lib/install-setup/interaction.js +157 -0
  939. package/lib/install-setup/presentation.js +337 -0
  940. package/lib/install-setup/service.js +441 -0
  941. package/lib/installers/copilot-marketplace-transport.js +74 -0
  942. package/lib/installers/copilot-settings.js +34 -3
  943. package/lib/installers/copilot-skill-discovery.js +27 -0
  944. package/lib/installers/local-development.js +107 -11
  945. package/lib/installers/local-marketplace.js +313 -37
  946. package/lib/installers/npm-invocation.js +2 -0
  947. package/lib/installers/opencode-activation.js +5 -31
  948. package/lib/installers/opencode.js +286 -89
  949. package/lib/installers/packaged-app-marketplace.js +67 -0
  950. package/lib/installers/plugin-command.js +115 -0
  951. package/lib/installers/plugin-installers.js +21 -521
  952. package/lib/lifecycle/operations.js +78 -137
  953. package/lib/lifecycle/owned-mutation.js +64 -0
  954. package/lib/lifecycle/presentation.js +47 -4
  955. package/lib/lifecycle/result.js +183 -2
  956. package/lib/lifecycle/status.js +150 -66
  957. package/lib/mcp-dispatch-runtime.js +360 -0
  958. package/lib/mcp-lifecycle/adapter-contract.js +54 -0
  959. package/lib/mcp-lifecycle/adapters/claude.js +123 -0
  960. package/lib/mcp-lifecycle/adapters/codex-origin-probe.js +87 -0
  961. package/lib/mcp-lifecycle/adapters/codex.js +513 -0
  962. package/lib/mcp-lifecycle/adapters/copilot.js +106 -0
  963. package/lib/mcp-lifecycle/adapters/file-utils.js +90 -0
  964. package/lib/mcp-lifecycle/adapters/opencode.js +148 -0
  965. package/lib/mcp-lifecycle/evidence.js +122 -0
  966. package/lib/mcp-lifecycle/facade-entry.js +26 -0
  967. package/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
  968. package/lib/mcp-lifecycle/host-config.js +60 -0
  969. package/lib/mcp-lifecycle/package.js +527 -0
  970. package/lib/mcp-lifecycle/plugin-runtime.js +420 -0
  971. package/lib/mcp-lifecycle/presentation.js +61 -0
  972. package/lib/mcp-lifecycle/profile-context.js +11 -0
  973. package/lib/mcp-lifecycle/profile.js +63 -0
  974. package/lib/mcp-lifecycle/result.js +92 -0
  975. package/lib/mcp-lifecycle/service.js +533 -0
  976. package/lib/npm-invocation.js +27 -0
  977. package/lib/repository-context.js +87 -0
  978. package/lib/runtime/control-command-service.js +12 -0
  979. package/lib/runtime/control-context.js +11 -0
  980. package/lib/runtime/git-history.js +7 -0
  981. package/lib/runtime/git-originals.js +36 -0
  982. package/lib/runtime/local-validator.js +39 -5
  983. package/lib/runtime/plugin-provenance.js +1 -298
  984. package/lib/runtime/runtime-probe.js +61 -0
  985. package/lib/runtime/validator-application.js +3 -3
  986. package/lib/runtime-check-consent/adapters.js +3 -42
  987. package/lib/runtime-check-consent/claude-settings.js +2 -23
  988. package/lib/runtime-check-consent/codex-hooks.js +96 -0
  989. package/lib/runtime-check-consent/codex-plugin-consent.js +118 -0
  990. package/lib/runtime-check-consent/contract.js +9 -8
  991. package/lib/runtime-check-consent/coordinator.js +3 -3
  992. package/lib/runtime-check-consent/service.js +29 -53
  993. package/lib/runtime-check-consent/state.js +1 -1
  994. package/lib/scaffold/canonical-init.js +691 -0
  995. package/lib/scaffold/plan.js +8 -14
  996. package/lib/scaffold/presentation.js +53 -3
  997. package/lib/skill-dispatch/binding.js +9 -0
  998. package/opencode-plugin.js +99 -26
  999. package/package.json +22 -51
  1000. package/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
  1001. package/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
  1002. package/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
  1003. package/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
  1004. package/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
  1005. package/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
  1006. package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/delivery-map.js +31 -37
  1007. package/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
  1008. package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/doctor.js +85 -17
  1009. package/runtime/core/lib/control-evaluation/gate-check.js +827 -0
  1010. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/gate-policy.js +141 -10
  1011. package/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
  1012. package/runtime/core/lib/control-evaluation/next-action.js +32 -0
  1013. package/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
  1014. package/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
  1015. package/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
  1016. package/runtime/core/lib/control-evaluation/report-decision.js +237 -0
  1017. package/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
  1018. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/run-state.js +108 -74
  1019. package/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
  1020. package/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
  1021. package/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
  1022. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/shared.js +5 -2
  1023. package/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
  1024. package/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
  1025. package/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
  1026. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/verified-change.js +10 -30
  1027. package/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
  1028. package/runtime/core/lib/control-inspect/cockpit-backlog.js +135 -0
  1029. package/runtime/core/lib/control-inspect/cockpit-context.js +97 -0
  1030. package/runtime/core/lib/control-inspect/cockpit-contract.js +86 -0
  1031. package/runtime/core/lib/control-inspect/cockpit-list.d.ts +17 -0
  1032. package/runtime/core/lib/control-inspect/cockpit-list.js +45 -0
  1033. package/runtime/core/lib/control-inspect/cockpit-session.js +217 -0
  1034. package/runtime/core/lib/control-inspect/cockpit.js +388 -0
  1035. package/runtime/core/lib/control-inspect/contract.js +299 -0
  1036. package/runtime/core/lib/control-inspect/decision-session.js +243 -0
  1037. package/runtime/core/lib/control-inspect/selection.js +35 -0
  1038. package/runtime/core/lib/control-inspect/service.js +319 -0
  1039. package/runtime/core/lib/control-maintenance/compatibility.js +149 -0
  1040. package/runtime/core/lib/control-maintenance/contract.js +41 -0
  1041. package/runtime/core/lib/control-maintenance/interaction.js +57 -0
  1042. package/runtime/core/lib/control-maintenance/migration.js +85 -0
  1043. package/runtime/core/lib/control-maintenance/presentation.js +122 -0
  1044. package/runtime/core/lib/control-maintenance/repair.js +226 -0
  1045. package/runtime/core/lib/control-maintenance/service.js +38 -0
  1046. package/runtime/core/lib/control-read/cockpit-pool.js +105 -0
  1047. package/runtime/core/lib/control-read/cockpit-worker.js +33 -0
  1048. package/runtime/core/lib/control-read/control-changes.js +33 -0
  1049. package/runtime/core/lib/control-read/fs.js +55 -0
  1050. package/runtime/core/lib/control-read/snapshot.js +378 -0
  1051. package/runtime/core/lib/control-read-boundary.js +22 -0
  1052. package/runtime/core/lib/control-state/approval-command-contract.js +73 -0
  1053. package/runtime/core/lib/control-state/approval-command.js +137 -0
  1054. package/runtime/core/lib/control-state/approval-operations.js +95 -0
  1055. package/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
  1056. package/runtime/core/lib/control-state/artefact-bindings.js +94 -0
  1057. package/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
  1058. package/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
  1059. package/runtime/core/lib/control-state/backlog-summary.js +67 -0
  1060. package/runtime/core/lib/control-state/contained-file.js +56 -0
  1061. package/runtime/core/lib/control-state/control-configuration.js +19 -0
  1062. package/runtime/core/lib/control-state/decision-action-contract.js +32 -0
  1063. package/runtime/core/lib/control-state/decision-action-service.js +55 -0
  1064. package/runtime/core/lib/control-state/decision-material-contract.js +12 -0
  1065. package/runtime/core/lib/control-state/evidence-bindings.js +132 -0
  1066. package/{lib → runtime/core/lib}/control-state/index.js +2 -0
  1067. package/{lib → runtime/core/lib}/control-state/legacy-migration.js +5 -31
  1068. package/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
  1069. package/runtime/core/lib/control-state/presentation-decision.js +138 -0
  1070. package/runtime/core/lib/control-state/preview-render.js +130 -0
  1071. package/runtime/core/lib/control-state/preview-review.js +136 -0
  1072. package/runtime/core/lib/control-state/preview-snapshot.js +108 -0
  1073. package/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
  1074. package/runtime/core/lib/control-state/recording-formats.js +29 -0
  1075. package/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
  1076. package/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
  1077. package/runtime/core/lib/control-state/run-backlog.js +90 -0
  1078. package/runtime/core/lib/control-state/run-command-contract.js +143 -0
  1079. package/runtime/core/lib/control-state/run-command-service.js +174 -0
  1080. package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-state/run-identity.js +1 -0
  1081. package/runtime/core/lib/control-state/run-operation-identity.js +31 -0
  1082. package/runtime/core/lib/control-state/run-operation-proof.js +103 -0
  1083. package/runtime/core/lib/control-state/run-operation-status.js +59 -0
  1084. package/runtime/core/lib/control-state/run-operations.js +80 -0
  1085. package/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
  1086. package/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
  1087. package/runtime/core/lib/control-state/run-presentation-render.js +443 -0
  1088. package/runtime/core/lib/control-state/run-presentation.js +348 -0
  1089. package/runtime/core/lib/control-state/run-recording.js +273 -0
  1090. package/runtime/core/lib/control-state/run-recovery.js +296 -0
  1091. package/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
  1092. package/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
  1093. package/runtime/core/lib/control-state/run-revision-history.js +184 -0
  1094. package/runtime/core/lib/control-state/run-revision.js +458 -0
  1095. package/runtime/core/lib/control-state/run-seal-compute.js +141 -0
  1096. package/runtime/core/lib/control-state/run-seal.js +26 -0
  1097. package/runtime/core/lib/control-state/run-source-revisions.js +221 -0
  1098. 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
  1099. package/runtime/core/lib/control-state/run-state-edits.js +170 -0
  1100. package/runtime/core/lib/control-state/run-state-parser.js +106 -0
  1101. package/runtime/core/lib/control-state/run-state-reader.js +57 -0
  1102. package/runtime/core/lib/control-state/run-state-repository.js +201 -0
  1103. package/{lib → runtime/core/lib}/control-state/run-state-resolver.js +1 -1
  1104. package/runtime/core/lib/control-state/run-state-writer.js +484 -0
  1105. package/runtime/core/lib/control-state/run-step-pending.js +15 -0
  1106. package/runtime/core/lib/control-state/run-step-transaction.js +359 -0
  1107. package/runtime/core/lib/control-state/run-steps.js +571 -0
  1108. package/runtime/core/lib/control-state/run-store-inspection.js +65 -0
  1109. package/runtime/core/lib/control-state/run-text.js +8 -0
  1110. package/runtime/core/lib/delivery-continuation/service.js +67 -0
  1111. package/runtime/core/lib/fs-swap.js +26 -0
  1112. package/runtime/core/lib/index.js +14 -0
  1113. package/runtime/core/lib/interaction-catalog-validation.js +26 -0
  1114. package/runtime/core/lib/interaction-catalog.d.ts +2 -0
  1115. package/runtime/core/lib/interaction-catalog.js +98 -0
  1116. package/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
  1117. package/runtime/core/lib/mcp-resource-contract.js +4 -0
  1118. package/runtime/core/lib/mcp-tool-errors.js +176 -0
  1119. package/runtime/core/lib/repository-context-reader.js +87 -0
  1120. package/runtime/core/lib/resources/artefact-templates.js +72 -0
  1121. package/runtime/core/lib/resources/binding.js +26 -0
  1122. package/runtime/core/lib/resources/context.js +70 -0
  1123. package/runtime/core/lib/resources/contracts.js +23 -0
  1124. package/runtime/core/lib/runtime/distribution-profile-history.js +173 -0
  1125. package/runtime/core/lib/runtime/host-installation.js +200 -0
  1126. package/runtime/core/lib/runtime/plugin-provenance.js +496 -0
  1127. package/runtime/core/lib/skill-dispatch/binding.js +66 -0
  1128. package/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
  1129. package/runtime/core/lib/skill-dispatch/contract.js +430 -0
  1130. package/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
  1131. package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
  1132. package/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
  1133. package/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
  1134. package/runtime/core/lib/skill-dispatch/service.js +833 -0
  1135. package/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
  1136. package/runtime/core/lib/task-target-resolution.js +202 -0
  1137. package/runtime/core/node_modules/entities/LICENSE +11 -0
  1138. package/runtime/core/node_modules/entities/decode.js +3 -0
  1139. package/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  1140. package/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
  1141. package/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
  1142. package/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
  1143. package/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
  1144. package/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
  1145. package/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
  1146. package/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
  1147. package/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
  1148. package/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
  1149. package/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
  1150. package/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
  1151. package/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
  1152. package/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
  1153. package/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
  1154. package/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
  1155. package/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
  1156. package/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
  1157. package/runtime/core/node_modules/entities/escape.js +3 -0
  1158. package/runtime/core/node_modules/entities/package.json +118 -0
  1159. package/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
  1160. package/runtime/core/node_modules/nanoid/LICENSE +20 -0
  1161. package/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
  1162. package/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
  1163. package/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
  1164. package/runtime/core/node_modules/nanoid/async/index.js +47 -0
  1165. package/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
  1166. package/runtime/core/node_modules/nanoid/async/package.json +12 -0
  1167. package/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
  1168. package/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
  1169. package/runtime/core/node_modules/nanoid/index.browser.js +45 -0
  1170. package/runtime/core/node_modules/nanoid/index.cjs +63 -0
  1171. package/runtime/core/node_modules/nanoid/index.js +63 -0
  1172. package/runtime/core/node_modules/nanoid/nanoid.js +1 -0
  1173. package/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
  1174. package/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
  1175. package/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
  1176. package/runtime/core/node_modules/nanoid/package.json +89 -0
  1177. package/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
  1178. package/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
  1179. package/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
  1180. package/runtime/core/node_modules/parse5/LICENSE +19 -0
  1181. package/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
  1182. package/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
  1183. package/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
  1184. package/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
  1185. package/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
  1186. package/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
  1187. package/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
  1188. package/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
  1189. package/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
  1190. package/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
  1191. package/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
  1192. package/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
  1193. package/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
  1194. package/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
  1195. package/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
  1196. package/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
  1197. package/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
  1198. package/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
  1199. package/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
  1200. package/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
  1201. package/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
  1202. package/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
  1203. package/runtime/core/node_modules/parse5/dist/index.js +42 -0
  1204. package/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
  1205. package/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
  1206. package/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
  1207. package/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
  1208. package/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
  1209. package/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
  1210. package/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
  1211. package/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
  1212. package/runtime/core/node_modules/parse5/package.json +50 -0
  1213. package/runtime/core/node_modules/picocolors/LICENSE +15 -0
  1214. package/runtime/core/node_modules/picocolors/package.json +25 -0
  1215. package/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
  1216. package/runtime/core/node_modules/picocolors/picocolors.js +75 -0
  1217. package/runtime/core/node_modules/postcss/LICENSE +20 -0
  1218. package/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
  1219. package/runtime/core/node_modules/postcss/lib/comment.js +13 -0
  1220. package/runtime/core/node_modules/postcss/lib/container.js +494 -0
  1221. package/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
  1222. package/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
  1223. package/runtime/core/node_modules/postcss/lib/document.js +33 -0
  1224. package/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
  1225. package/runtime/core/node_modules/postcss/lib/input.js +282 -0
  1226. package/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
  1227. package/runtime/core/node_modules/postcss/lib/list.js +79 -0
  1228. package/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
  1229. package/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
  1230. package/runtime/core/node_modules/postcss/lib/node.js +494 -0
  1231. package/runtime/core/node_modules/postcss/lib/parse.js +42 -0
  1232. package/runtime/core/node_modules/postcss/lib/parser.js +626 -0
  1233. package/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
  1234. package/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
  1235. package/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
  1236. package/runtime/core/node_modules/postcss/lib/processor.js +67 -0
  1237. package/runtime/core/node_modules/postcss/lib/result.js +42 -0
  1238. package/runtime/core/node_modules/postcss/lib/root.js +76 -0
  1239. package/runtime/core/node_modules/postcss/lib/rule.js +27 -0
  1240. package/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
  1241. package/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
  1242. package/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
  1243. package/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
  1244. package/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
  1245. package/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
  1246. package/runtime/core/node_modules/postcss/lib/warning.js +47 -0
  1247. package/runtime/core/node_modules/postcss/package.json +88 -0
  1248. package/runtime/core/node_modules/source-map-js/LICENSE +28 -0
  1249. package/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
  1250. package/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  1251. package/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
  1252. package/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
  1253. package/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
  1254. package/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
  1255. package/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
  1256. package/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
  1257. package/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
  1258. package/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
  1259. package/runtime/core/node_modules/source-map-js/package.json +71 -0
  1260. package/runtime/core/node_modules/source-map-js/source-map.js +8 -0
  1261. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +0 -506
  1262. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +0 -68
  1263. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +0 -97
  1264. package/generated/plugins/copilot/agdf/copilot-skills/agdf-gate-check/SKILL.md +0 -240
  1265. package/generated/plugins/copilot/agdf/copilot-skills/agdf-interaction-locales.json +0 -512
  1266. package/generated/plugins/copilot/agdf/copilot-skills/agdf-qa-gate/SKILL.md +0 -137
  1267. package/generated/plugins/copilot/agdf/copilot-skills/agdf-runtime-contract.md +0 -16
  1268. package/generated/plugins/copilot/agdf/copilot-skills/agdf-ux-intent-definition/SKILL.md +0 -94
  1269. package/generated/plugins/copilot/agdf/copilot-skills/contracts/interaction.md +0 -487
  1270. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +0 -506
  1271. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +0 -68
  1272. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +0 -97
  1273. package/lib/control-evaluation/gate-check.js +0 -506
  1274. package/lib/control-state/run-state-repository.js +0 -68
  1275. package/lib/control-state/run-state-writer.js +0 -97
  1276. package/lib/proportionality-benchmark/blind-prompt.js +0 -38
  1277. package/lib/proportionality-benchmark/contracts.js +0 -129
  1278. package/lib/proportionality-benchmark/corpus-loader.js +0 -221
  1279. package/lib/proportionality-benchmark/evaluator.js +0 -260
  1280. package/lib/proportionality-benchmark/index.js +0 -8
  1281. package/lib/proportionality-benchmark/live-recorder.js +0 -122
  1282. package/lib/proportionality-benchmark/profiles.js +0 -102
  1283. package/lib/proportionality-benchmark/report.js +0 -60
  1284. package/lib/proportionality-benchmark/source-fingerprint.js +0 -34
  1285. package/lib/public-plugin/builder.js +0 -83
  1286. package/lib/public-plugin/contract.js +0 -102
  1287. package/lib/public-plugin/copilot-profile.js +0 -126
  1288. package/lib/public-plugin/manifest.js +0 -104
  1289. package/lib/public-plugin/report.js +0 -33
  1290. package/lib/public-plugin/validator.js +0 -101
  1291. package/lib/release/profile-history.js +0 -222
  1292. package/lib/release/version-bump.js +0 -549
  1293. package/lib/release/version-coherence.js +0 -137
  1294. package/lib/skill-evals/artefact-quality.js +0 -36
  1295. package/lib/skill-evals/index.js +0 -105
  1296. package/lib/skill-evals/live-recorder.js +0 -85
  1297. package/lib/skill-evals/workspace.js +0 -97
  1298. /package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/context-graph.md +0 -0
  1299. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
  1300. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
  1301. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
  1302. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
  1303. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
  1304. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
  1305. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
  1306. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
  1307. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
  1308. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
  1309. /package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/fs-swap.js +0 -0
  1310. /package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/runtime/distribution-profile-history.js +0 -0
  1311. /package/generated/plugins/copilot/agdf/{hooks/copilot-hooks.json → com.github.copilot/hooks/hooks.json} +0 -0
  1312. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
  1313. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
  1314. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
  1315. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
  1316. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
  1317. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
  1318. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
  1319. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
  1320. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
  1321. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
  1322. /package/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
  1323. /package/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
  1324. /package/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
  1325. /package/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
  1326. /package/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
  1327. /package/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
  1328. /package/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
  1329. /package/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
  1330. /package/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
  1331. /package/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
@@ -0,0 +1,143 @@
1
+ import { UR_AUTHORING_FORMAT } from '../control-evaluation/ur-readiness.js';
2
+ import { PRD_DECISION_FORMAT } from '../control-evaluation/prd-readiness.js';
3
+ import { SD_DECISION_FORMAT } from '../control-evaluation/sd-readiness.js';
4
+ import { DIGEST_PATTERN, canonicalJson, digest } from './approval-command-contract.js';
5
+ import { RUN_ID_PATTERN, REVISION_ID_PATTERN, APPROVAL_GATES } from './run-identity.js';
6
+ import { TASK_TARGET_SOURCES } from '../task-target-resolution.js';
7
+ import { PRESENTATION_LANGUAGE_TAG_PATTERN_SOURCE } from '../interaction-presentation.js';
8
+ import { ACCEPTANCE_CRITERIA_FORMAT, TP_AUTHORING_FORMAT } from '../control-evaluation/traceability-readiness.js';
9
+ import { UX_DECISION_FORMAT } from '../control-evaluation/definition-sources.js';
10
+ import { REVIEWED_REQUEST_FORMAT, REVISION_PROPOSAL_FORMAT } from './recording-formats.js';
11
+ import { relationshipForGate } from '../control-evaluation/delivery-relationships.js';
12
+ import { PREVIEW_REVIEW_FORMAT } from './preview-review.js';
13
+
14
+ export const RUN_COMMAND_VERSION = '1';
15
+ export const RUN_COMMAND_LIMITS = Object.freeze({ input_bytes: 65536, result_bytes: 1048576, definition_bytes: 8192, aggregate_definition_bytes: 24576 });
16
+ const string = (maxLength = 4096) => ({ type: 'string', minLength: 1, maxLength });
17
+ const identity = { type: 'string', pattern: REVISION_ID_PATTERN.source };
18
+ const hash = { type: 'string', pattern: DIGEST_PATTERN.source };
19
+ const enumeration = values => ({ enum: [...values] });
20
+ export const strictObject = (properties, required = Object.keys(properties)) => ({ type: 'object', additionalProperties: false, properties, required });
21
+ const source = strictObject({ path: string(), digest: hash });
22
+ const recoveryGroups = Object.freeze({ 'step.record': 'agdf_record', 'artefact.record': 'agdf_record',
23
+ 'presentation_decision.record': 'agdf_record', 'prd_revision.reopen': 'agdf_revise', 'closeout.record': 'agdf_closeout' });
24
+ const recovery = strictObject({ original_kind: enumeration(Object.keys(recoveryGroups)), pending_digest: hash, recovery_revision_id: identity });
25
+ const recordStep = { oneOf: [
26
+ strictObject({ step: { const: 'ur' }, source, title: string(1024) }),
27
+ strictObject({ step: { const: 'route' }, source, reason: string(8192), route: enumeration(['quick_task', 'structured_slice', 'structured_delivery']) }),
28
+ strictObject({ step: { const: 'review' }, source, decision: enumeration(['pass', 'revise', 'block']) }),
29
+ strictObject({ step: { const: 'evidence' }, source, reason: string(8192), covers: string(1024) }),
30
+ { oneOf: [strictObject({ step: { const: 'internal' }, source,
31
+ internal_step: { const: 'UX Intent Definition' }, decision: enumeration(['ready', 'blocked', 'not_applicable']), reason: string(8192), covers: string(1024),
32
+ }, ['step', 'source', 'internal_step', 'decision']), strictObject({ step: { const: 'internal' }, source,
33
+ internal_step: enumeration(['Brownfield Analysis', 'CD+Tests', 'TP Review', 'Clean Implementation Review', 'CR']),
34
+ decision: enumeration(['pass', 'revise', 'block', 'not_applicable']), reason: string(8192), covers: string(1024),
35
+ }, ['step', 'source', 'internal_step', 'decision'])] },
36
+ ] };
37
+
38
+ const spec = (group, payload, owner, effects, confirmation = 'authorized_recording') => ({ group, payload_schema: payload, owner, effects, confirmation });
39
+ const proposal = strictObject({ source_gate: enumeration(['UR', 'PRD', 'SD', 'TP']), proposal: source });
40
+ const apply = strictObject({ ...proposal.properties, preview_digest: hash, confirmation: string(8192) });
41
+ const closeout = strictObject({ or: source, confirmation: string(8192) });
42
+ const descriptors = {
43
+ 'runtime_generation.replace': spec('agdf_record', strictObject({ candidate: source, confirmation: string(256) }), 'owned-runtime-generation.replace', ['replace only the serving facade own runtime; no Run or gate write'], 'concrete_candidate_digest'),
44
+ 'presentation.prepare': spec('agdf_prepare', strictObject({ gate: enumeration(APPROVAL_GATES) }), 'run-presentation.prepareRunPresentation', ['create immutable exact presentation'], 'no_gate_approval'),
45
+ 'step.record': spec('agdf_record', recordStep, 'run-steps.recordRunStep', ['register bounded actual internal/evidence result; update Run/backlog']),
46
+ 'artefact.record': spec('agdf_record', strictObject({ gate: enumeration(['PRD', 'SD', 'TP', 'QA']), reviewed_request: source }), 'run-artefact-recording.prepareArtefactRecording', ['register reviewed source mapping; replace only unapproved draft']),
47
+ 'approval.record': spec('agdf_approve', strictObject({ gate: enumeration(APPROVAL_GATES), presentation_id: identity, response: string(8192) }), 'approval-command.executeApprovalCommand', ['record one exact deliberate gate reply'], 'new_deliberate_exact_reply'),
48
+ 'presentation_decision.record': spec('agdf_record', strictObject({ gate: enumeration(APPROVAL_GATES), presentation_id: identity,
49
+ action: enumeration(['request_change', 'reject']), comment: { type: 'string', maxLength: 8192 } }),
50
+ 'run-steps.recordRunPresentationDecision', ['record one exact deliberate change request or rejection; no gate approval'], 'new_deliberate_bound_human_reply'),
51
+ 'source_revision.preview': spec('agdf_revise', proposal, 'run-revision.previewSourceRevision', ['read exact revision impact'], 'no_mutation'),
52
+ 'source_revision.apply': spec('agdf_revise', apply, 'run-revision.applySourceRevision', ['archive selected material; invalidate affected decisions; reopen earliest source'], 'exact_material_confirmation'),
53
+ 'source_revision.recover': spec('agdf_revise', strictObject({ proposal: source, source_gate: enumeration(['UR', 'PRD', 'SD', 'TP']), recovery_revision_id: identity, pending_digest: hash }), 'run-revision.recoverSourceRevision', ['recover original bounded source revision'], 'original_confirmed_effect'),
54
+ 'prd_revision.reopen': spec('agdf_revise', strictObject({ prd: source, confirmation: string(8192) }), 'run-revision.reopenPrdRevision', ['reopen existing early PRD boundary preserving history'], 'exact_material_confirmation'),
55
+ 'closeout.record': spec('agdf_closeout', closeout, 'run-steps.recordRunStep', ['publish exact OR; complete selected Run; synchronize selected backlog'], 'exact_material_confirmation'),
56
+ 'operation.recover': { ...spec(null, recovery, 'run-step-transaction.recoverPendingRunStep', ['recover original bounded owned outputs and selected backlog'], 'original_confirmed_effect'), groups: ['agdf_record', 'agdf_revise', 'agdf_closeout'] },
57
+ };
58
+ function freeze(value) { if (value && typeof value === 'object' && !Object.isFrozen(value)) { Object.values(value).forEach(freeze); Object.freeze(value); } return value; }
59
+ export const RUN_COMMAND_DESCRIPTORS = freeze(descriptors);
60
+ export const RUN_COMMAND_GROUPS = freeze({
61
+ agdf_prepare: ['presentation.prepare'], agdf_record: ['step.record', 'artefact.record', 'presentation_decision.record', 'runtime_generation.replace', 'operation.recover'],
62
+ agdf_approve: ['approval.record'], agdf_revise: ['source_revision.preview', 'source_revision.apply', 'source_revision.recover', 'prd_revision.reopen', 'operation.recover'],
63
+ agdf_closeout: ['closeout.record', 'operation.recover'],
64
+ });
65
+ const envelope = {
66
+ schema_version: { const: RUN_COMMAND_VERSION }, presentation_language: { type: 'string', maxLength: 64, pattern: PRESENTATION_LANGUAGE_TAG_PATTERN_SOURCE },
67
+ working_directory: string(), target_source: enumeration(TASK_TARGET_SOURCES), primary_target: string(), target_id: hash,
68
+ run_id: { type: 'string', pattern: RUN_ID_PATTERN.source }, expected_revision_id: identity, operation_id: identity,
69
+ assurance: { const: 'cooperative_local' },
70
+ };
71
+ function payloadSchema(group, kind) {
72
+ return kind === 'operation.recover' ? strictObject({ ...recovery.properties,
73
+ original_kind: enumeration(Object.keys(recoveryGroups).filter(original => recoveryGroups[original] === group)) })
74
+ : RUN_COMMAND_DESCRIPTORS[kind].payload_schema;
75
+ }
76
+ export function commandGroupSchema(group) {
77
+ const kinds = RUN_COMMAND_GROUPS[group]; if (!kinds) throw Error('command_group_unsupported');
78
+ return strictObject({ ...envelope, command: { oneOf: kinds.map(kind => strictObject({ kind: { const: kind }, payload: payloadSchema(group, kind) })) } });
79
+ }
80
+ export function commandGroupDefinition(group) {
81
+ const definition = { name: group,
82
+ description: `${group}: ${RUN_COMMAND_GROUPS[group]?.join(', ')}. Exact target/Run/revision/UUID required. Cooperative caller intent only; tool permission never approves a gate. Inspect operation-contract before use; retry original UUID via operation-status after uncertainty. No VCS.`,
83
+ annotations: { readOnlyHint: false, destructiveHint: group !== 'agdf_prepare', idempotentHint: false, openWorldHint: false }, inputSchema: commandGroupSchema(group) };
84
+ if (Buffer.byteLength(JSON.stringify(definition)) > RUN_COMMAND_LIMITS.definition_bytes) throw Error('command_definition_budget_exceeded');
85
+ return freeze(definition);
86
+ }
87
+ // A deliberately small schema interpreter over the same generated JSON Schema subset.
88
+ // No caller validator, accessor execution, coercion or default-expanded effect is allowed.
89
+ export function schemaDiagnostics(value, schema, path = '$') {
90
+ const errors = [];
91
+ if (schema.oneOf) return schema.oneOf.filter(choice => schemaDiagnostics(value, choice, path).length === 0).length === 1 ? [] : [{ path, code: 'one_of_invalid' }];
92
+ if (Object.hasOwn(schema, 'const') && value !== schema.const) errors.push({ path, code: 'constant_invalid' });
93
+ if (schema.enum && !schema.enum.includes(value)) errors.push({ path, code: 'enum_invalid' });
94
+ if (schema.type === 'object') {
95
+ if (value === null || typeof value !== 'object' || Array.isArray(value) || ![Object.prototype, null].includes(Object.getPrototypeOf(value))) return [{ path, code: 'object_required' }];
96
+ const keys = Reflect.ownKeys(value);
97
+ for (const key of keys) {
98
+ if (typeof key !== 'string' || !Object.hasOwn(schema.properties, key)) { errors.push({ path, code: 'unknown_field' }); continue; }
99
+ const property = Object.getOwnPropertyDescriptor(value, key);
100
+ if (!Object.hasOwn(property, 'value')) { errors.push({ path: `${path}.${key}`, code: 'accessor_forbidden' }); continue; }
101
+ errors.push(...schemaDiagnostics(property.value, schema.properties[key], `${path}.${key}`));
102
+ }
103
+ for (const key of schema.required ?? []) if (!Object.hasOwn(value, key)) errors.push({ path: `${path}.${key}`, code: 'field_required' });
104
+ }
105
+ if (schema.type === 'string') {
106
+ if (typeof value !== 'string') return [...errors, { path, code: 'string_required' }];
107
+ if (schema.minLength !== undefined && value.length < schema.minLength || schema.maxLength !== undefined && value.length > schema.maxLength
108
+ || schema.pattern && !(new RegExp(schema.pattern, 'u')).test(value)) errors.push({ path, code: 'string_invalid' });
109
+ }
110
+ return errors;
111
+ }
112
+ export function validateRunCommand(group, input) {
113
+ if (!RUN_COMMAND_GROUPS[group]) return [{ path: '$', code: 'command_group_unsupported' }];
114
+ const errors = schemaDiagnostics(input, commandGroupSchema(group));
115
+ if (errors.length) return errors;
116
+ if (Buffer.byteLength(canonicalJson(input)) > RUN_COMMAND_LIMITS.input_bytes) return [{ path: '$', code: 'command_input_budget_exceeded' }];
117
+ const kind = input.command.kind;
118
+ if (kind === 'operation.recover' && group !== recoveryGroups[input.command.payload.original_kind]) return [{ path: '$.command.payload.original_kind', code: 'command_group_effect_mismatch' }];
119
+ return [];
120
+ }
121
+ export const runCommandRequestDigest = input => digest(`agdf-run-command/1\0${canonicalJson(input)}`);
122
+ export function operationContract(group, kind, { gate } = {}) {
123
+ if (!RUN_COMMAND_GROUPS[group]?.includes(kind)) return { available: false, reason: 'command_group_unsupported' };
124
+ return { schema_version: RUN_COMMAND_VERSION, available: true, group, kind, ...RUN_COMMAND_DESCRIPTORS[kind], payload_schema: payloadSchema(group, kind),
125
+ schema: strictObject({ ...envelope, command: strictObject({ kind: { const: kind }, payload: payloadSchema(group, kind) }) }), retry_class: 'inspect_original_operation_after_dispatch', assurance: 'cooperative_local',
126
+ reference_limits: { input_bytes: RUN_COMMAND_LIMITS.input_bytes, source_file_bytes: 131072, result_bytes: RUN_COMMAND_LIMITS.result_bytes },
127
+ internal_result_formats: kind === 'step.record' ? { 'UX Intent Definition': UX_DECISION_FORMAT,
128
+ reviews: { declaration: '- decision: pass | revise | block | not_applicable', result_scope: 'actual current owner report; no generated judgement or approval' } } : undefined,
129
+ reviewed_request_format: kind === 'artefact.record' ? { ...REVIEWED_REQUEST_FORMAT, current_relationship: relationshipForGate(gate) ?? null,
130
+ destination_status: gate === 'QA' ? 'pass | revise | block matching the actual QA report' : 'draft' } : undefined,
131
+ proposal_format: kind.startsWith('source_revision.') ? REVISION_PROPOSAL_FORMAT : undefined,
132
+ authorizes: false, authoring_format: kind === 'artefact.record' || kind === 'presentation.prepare' || kind === 'step.record'
133
+ ? ({ UR: UR_AUTHORING_FORMAT, PRD: { decisions: PRD_DECISION_FORMAT, criteria: ACCEPTANCE_CRITERIA_FORMAT, preview_review: PREVIEW_REVIEW_FORMAT }, SD: SD_DECISION_FORMAT, TP: TP_AUTHORING_FORMAT }[gate] ?? null) : undefined,
134
+ presentation_format: kind === 'presentation.prepare' || kind === 'artefact.record' ? {
135
+ owner: 'run-presentation-render', compact_brief_fields: ['Goal/Ziel', 'Proposal/Vorschlag or Scope/Umfang', 'Changes/Änderungen', 'Risks/Risiken'],
136
+ source: 'source-authored canonical artefact or validated localized AGDF Approval Summary; no adapter paraphrase',
137
+ missing_fields: 'retain absence and the complete validated summary; do not fabricate a legacy brief',
138
+ delivery: 'native_plus_chat only with qualified native approval and confirmed display on the current user surface; otherwise full_chat; forward one exact decision request. Mac display never proves iPad visibility.',
139
+ remote_document: 'presentation-document; exact binding and every cursor; local file links do not prove iPad access',
140
+ remote_preview: 'presentation-preview; exact binding and every cursor; render only through isolated supported access; unavailable access leaves the review open',
141
+ } : undefined,
142
+ confirmation_boundary: 'host permission, concrete human intent and Core eligibility are separate' };
143
+ }
@@ -0,0 +1,174 @@
1
+ import { join } from 'node:path';
2
+ import { readFileSync } from 'node:fs';
3
+ import { resolveTaskTarget } from '../task-target-resolution.js';
4
+ import { withLiveControlReads } from '../control-read/fs.js';
5
+ import { evaluateGateCheck } from '../control-evaluation/gate-check.js';
6
+ import { policyForRunContent } from '../control-evaluation/run-step-policy.js';
7
+ import { RUN_COMMAND_GROUPS, RUN_COMMAND_LIMITS, runCommandRequestDigest, validateRunCommand } from './run-command-contract.js';
8
+ import { COOPERATIVE_ASSURANCE, canonicalJson, digest, resolveControlCommandTarget } from './approval-command-contract.js';
9
+ import { readRun } from './run-state-edits.js';
10
+ import { runSealState } from './run-seal.js';
11
+ import { runPath } from './run-state-reader.js';
12
+ import { withOwnedFileLock } from './run-state-writer.js';
13
+ import { assertRunOperationIdentity } from './run-operation-identity.js';
14
+ import { prepareRunPresentation } from './run-presentation.js';
15
+ import { executeApprovalCommand } from './approval-command.js';
16
+ import { recordRunStep, recordRunPresentationDecision } from './run-steps.js';
17
+ import { inspectRunOperation } from './run-operation-status.js';
18
+ import { readOperationSource } from './run-operation-proof.js';
19
+ import { pendingRunStepIds, pendingRunStepPath } from './run-step-pending.js';
20
+ import { readPendingRunStepJournal, recoverPendingRunStepLocked } from './run-step-transaction.js';
21
+ import { previewSourceRevision, applySourceRevision, recoverSourceRevision, reopenPrdRevision } from './run-revision.js';
22
+ import { containedRegularFile, hasSymlinkComponent } from './contained-file.js';
23
+ import { parseRunState } from './run-state-parser.js';
24
+ import { existsSync } from 'node:fs';
25
+
26
+ function safeOperationStatus(root, input) {
27
+ try { return inspectRunOperation(root, { runId: input.run_id, operationId: input.operation_id, targetId: input.target_id }); }
28
+ catch { return { status: 'unknown', reason: 'operation_observation_unavailable' }; }
29
+ }
30
+
31
+ function assertCommandRunPath(root, input) {
32
+ const relative = `.agdf/control/runs/${input.run_id}/RUN_STATE.md`;
33
+ if (hasSymlinkComponent(root, relative) || containedRegularFile(root, relative).status !== 'valid') throw Error('run_path_invalid');
34
+ }
35
+
36
+ export function observeCurrentRunCommand(root, input) {
37
+ try {
38
+ const run = readRun(root, input.run_id);
39
+ if (run.rejection) return { available: false, reason: run.rejection.reason };
40
+ if (runSealState(root, run.content).status !== 'valid') return { available: false, reason: 'seal_invalid' };
41
+ const report = evaluateGateCheck(root, { runId: input.run_id, presentationLanguage: input.presentation_language });
42
+ return { available: true, revision: Number(run.meta.revision), revision_id: run.meta.revision_id, lifecycle: run.meta.lifecycle,
43
+ gate: report.current_gate, status: report.status, missing_approval: report.missing_approval,
44
+ blocking_reason: report.blocking_reason ?? null, next_operation: report.next_operation, completion: report.completion };
45
+ } catch { return { available: false, reason: 'current_observation_unavailable' }; }
46
+ }
47
+
48
+ function boundedRecover(root, input) {
49
+ const payload = input.command.payload, path = runPath(root, input.run_id);
50
+ assertCommandRunPath(root, input);
51
+ return withOwnedFileLock(path, () => withOwnedFileLock(join(root, '.agdf/control/MASTER_BACKLOG.md'), () => {
52
+ const other = pendingRunStepIds(root).find(id => id !== input.run_id);
53
+ if (other) return { outcome: 'recovery_required', reason: 'another_pending_operation', pending_run_id: other };
54
+ if (!existsSync(pendingRunStepPath(root, input.run_id))) {
55
+ const observed = safeOperationStatus(root, input);
56
+ return observed.status === 'recorded' && observed.family === payload.original_kind
57
+ ? { outcome: 'recovered', status: 'already_completed', historical_effect: true, receipt: observed.receipt }
58
+ : { outcome: 'recovery_required', reason: 'original_operation_unconfirmed' };
59
+ }
60
+ const pending = readPendingRunStepJournal(root, input.run_id);
61
+ if (pending.schema_version !== 3 || pending.kind !== payload.original_kind || pending.operation_id !== input.operation_id
62
+ || pending.target_id !== input.target_id || digest(canonicalJson(pending)) !== payload.pending_digest
63
+ || ![pending.old_revision_id, pending.next_revision_id].includes(input.expected_revision_id)
64
+ || payload.recovery_revision_id !== input.expected_revision_id) return { outcome: 'rejected', reason: 'recovery_binding_invalid' };
65
+ const statePath = `.agdf/control/runs/${input.run_id}/RUN_STATE.md`;
66
+ if (hasSymlinkComponent(root, statePath) || containedRegularFile(root, statePath).status !== 'valid') return { outcome: 'rejected', reason: 'run_path_invalid' };
67
+ const raw = readFileSync(path, 'utf8');
68
+ const parsed = parseRunState(raw, input.run_id);
69
+ if (!parsed.valid || parsed.meta.revision_id !== input.expected_revision_id) return { outcome: 'rejected', reason: 'stale_revision' };
70
+ return { outcome: 'recovered', ...recoverPendingRunStepLocked(root, input.run_id) };
71
+ }));
72
+ }
73
+
74
+ // The public selector is a fixed permission group, never an arbitrary function name.
75
+ // Adapters receive this same service; private dependencies are package-owned test seams.
76
+ export function createRunCommandService({ packageVersion = '0.14.5', enabledGroups = Object.keys(RUN_COMMAND_GROUPS), checkpoint = () => {}, runtimeControl } = {}) {
77
+ if (!Array.isArray(enabledGroups) || new Set(enabledGroups).size !== enabledGroups.length) throw Error('command_group_unsupported');
78
+ const enabled = new Set(enabledGroups);
79
+ if ([...enabled].some(group => !Object.hasOwn(RUN_COMMAND_GROUPS, group))) throw Error('command_group_unsupported');
80
+ return function executeRunCommand(group, input) {
81
+ return withLiveControlReads(() => {
82
+ const diagnostics = validateRunCommand(group, input);
83
+ if (diagnostics.length) return { schema_version: '1', outcome: 'rejected', reason: 'command_schema_invalid', diagnostics, authorizes: false };
84
+ const requestDigest = runCommandRequestDigest(input);
85
+ let root, dispatched = false;
86
+ const result = (outcome, reason, family = {}, extra = {}) => {
87
+ const status = root ? safeOperationStatus(root, input) : null;
88
+ const receipt = family.receipt ?? status?.receipt ?? null;
89
+ const response = { schema_version: '1', outcome, reason: reason ?? null, operation_id: input.operation_id,
90
+ request_digest: requestDigest, binding: { target_id: input.target_id, run_id: input.run_id, expected_revision_id: input.expected_revision_id, kind: input.command.kind },
91
+ effect: receipt?.effect ?? null, receipt, historical_effect: Boolean(family.historical_effect || outcome === 'already_applied'),
92
+ current: root ? observeCurrentRunCommand(root, input) : { available: false, reason: 'target_unavailable' },
93
+ assurance: COOPERATIVE_ASSURANCE, authorizes: false,
94
+ recovery: ['effect_unknown', 'recovery_required'].includes(outcome) ? 'Inspect operation-status with the original UUID and preserve the exact original payload. Do not infer absence or create another decision.' : null,
95
+ family_result: family, ...extra };
96
+ if (Buffer.byteLength(JSON.stringify(response)) > RUN_COMMAND_LIMITS.result_bytes) return { schema_version: '1', outcome: dispatched ? 'effect_unknown' : 'rejected',
97
+ reason: 'command_result_budget_exceeded', operation_id: input.operation_id, binding: response.binding, authorizes: false,
98
+ recovery: 'Inspect operation-status with the original UUID. A lost response does not prove non-execution.' };
99
+ return response;
100
+ };
101
+ if (!enabled.has(group)) return result('rejected', 'command_group_disabled', {}, { dispatch: 'not_dispatched' });
102
+ try {
103
+ const target = resolveTaskTarget({ workingDirectory: input.working_directory, targetSource: input.target_source, primaryTarget: input.primary_target });
104
+ if (target.resolution_state !== 'resolved') return result('rejected', target.reason_code, {}, { dispatch: 'not_dispatched' });
105
+ root = target.governance_target;
106
+ if (resolveControlCommandTarget(root).target_id !== input.target_id) return result('rejected', 'target_binding_mismatch', {}, { dispatch: 'not_dispatched' });
107
+ const payload = input.command.payload, kind = input.command.kind;
108
+ const context = { kind, operation_id: input.operation_id, target_id: input.target_id, request_digest: requestDigest };
109
+ const bound = { runId: input.run_id, revisionId: input.expected_revision_id, operationId: input.operation_id };
110
+ assertCommandRunPath(root, input);
111
+ let family;
112
+ if (kind === 'runtime_generation.replace') {
113
+ const current = observeCurrentRunCommand(root, input);
114
+ if (!current.available || current.revision_id !== input.expected_revision_id) return result('rejected', 'stale_revision');
115
+ if (current.lifecycle !== 'active') return result('rejected', 'lifecycle_ineligible');
116
+ if (payload.confirmation !== `Replace owned runtime: ${payload.candidate.digest}`) return result('rejected', 'confirmation_required');
117
+ if (!runtimeControl) return result('rejected', 'connection_control_unavailable', {}, { dispatch: 'not_dispatched' });
118
+ const source = readOperationSource(root, input.run_id, payload.candidate);
119
+ const candidate = JSON.parse(source.content);
120
+ // The shared Core validates the current binding and contained manifest;
121
+ // only the serving facade owns an actual process handle. No Run write.
122
+ return Promise.resolve(runtimeControl.replace({ input, candidate, requestDigest,
123
+ revalidate: () => {
124
+ source.validate(); const fresh = observeCurrentRunCommand(root, input);
125
+ if (!fresh.available || fresh.revision_id !== input.expected_revision_id) throw Error('stale_revision');
126
+ } })).then(family => result(family.outcome, family.reason, family, { runtime_control: true }),
127
+ error => result('effect_unknown', error.message, {}, { runtime_control: true }));
128
+ }
129
+ checkpoint('before_dispatch'); dispatched = true;
130
+ if (kind === 'presentation.prepare') {
131
+ family = withOwnedFileLock(runPath(root, input.run_id), () => {
132
+ const run = readRun(root, input.run_id); if (run.rejection) return run.rejection;
133
+ assertRunOperationIdentity(root, run, input.operation_id, kind);
134
+ return prepareRunPresentation(root, { ...bound, gate: payload.gate, language: input.presentation_language, requestDigest }, { evaluateGateCheck, checkpoint });
135
+ });
136
+ } else if (kind === 'approval.record') {
137
+ family = executeApprovalCommand(root, { schema_version: '1', action: 'record_gate_approval', target_id: input.target_id,
138
+ run_id: input.run_id, expected_revision_id: input.expected_revision_id, operation_id: input.operation_id,
139
+ assurance: input.assurance, gate: payload.gate, presentation_id: payload.presentation_id, response: payload.response }, { evaluateGateCheck, packageVersion, checkpoint, commandContext: context });
140
+ } else if (kind === 'presentation_decision.record') {
141
+ family = recordRunPresentationDecision(root, { ...bound, gate: payload.gate, presentationId: payload.presentation_id,
142
+ action: payload.action, comment: payload.comment, requestDigest }, { evaluateGateCheck, packageVersion, afterWrite: checkpoint });
143
+ } else if (kind === 'step.record' || kind === 'artefact.record') {
144
+ const record = kind === 'artefact.record' ? { step: 'artefact', gate: payload.gate, evidence: payload.reviewed_request.path, sourceBinding: payload.reviewed_request }
145
+ : { step: payload.step, sourceBinding: payload.source, evidence: payload.source.path, title: payload.title,
146
+ route: payload.route, reason: payload.reason, decision: payload.decision, covers: payload.covers, internalStep: payload.internal_step };
147
+ family = recordRunStep(root, { ...bound, ...record }, { policy: policyForRunContent, packageVersion, operationContext: context, afterWrite: checkpoint });
148
+ } else if (kind === 'operation.recover') family = boundedRecover(root, input);
149
+ else if (kind === 'source_revision.preview' || kind === 'source_revision.apply') {
150
+ const revised = { ...bound, sourceGate: payload.source_gate, evidence: payload.proposal.path, previewDigest: payload.preview_digest,
151
+ proposalBinding: payload.proposal, confirmation: payload.confirmation, commandContext: context, packageVersion };
152
+ family = kind.endsWith('.apply') ? applySourceRevision(root, revised, { afterWrite: checkpoint }) : previewSourceRevision(root, revised);
153
+ } else if (kind === 'source_revision.recover') {
154
+ family = recoverSourceRevision(root, { ...bound, proposalBinding: payload.proposal, evidence: payload.proposal.path, sourceGate: payload.source_gate,
155
+ recoveryRevisionId: payload.recovery_revision_id, pendingDigest: payload.pending_digest });
156
+ } else if (kind === 'prd_revision.reopen') {
157
+ family = reopenPrdRevision(root, { ...bound, prdBinding: payload.prd, confirmation: payload.confirmation, commandContext: context, packageVersion }, { afterWrite: checkpoint });
158
+ } else if (kind === 'closeout.record') {
159
+ family = recordRunStep(root, { ...bound, step: 'closeout', sourceBinding: payload.or, confirmation: payload.confirmation },
160
+ { policy: policyForRunContent, packageVersion, operationContext: context, afterWrite: checkpoint });
161
+ }
162
+ checkpoint('before_result');
163
+ const accepted = ['prepared', 'recorded', 'accepted', 'preview', 'recovered', 'reopened'].includes(family?.outcome);
164
+ const repeated = ['already_applied', 'already_prepared', 'replayed'].includes(family?.outcome);
165
+ const status = safeOperationStatus(root, input);
166
+ if (family?.outcome === 'rejected' && ['pending', 'unknown', 'committed_recovery_required'].includes(status.status)) return result('effect_unknown', family.reason, family);
167
+ return result(repeated ? 'already_applied' : accepted ? 'accepted' : family?.outcome === 'recovery_required' ? 'recovery_required' : 'rejected', family?.reason, family ?? {});
168
+ } catch (error) {
169
+ if (error.message === 'AGDF_OPERATION_PAYLOAD_CONFLICT') return result('rejected', 'operation_payload_conflict');
170
+ return result(dispatched ? 'effect_unknown' : 'rejected', error.message, {}, { dispatch: dispatched ? 'dispatched' : 'not_dispatched' });
171
+ }
172
+ });
173
+ };
174
+ }
@@ -1,5 +1,6 @@
1
1
  export const RUN_ID_PATTERN = /^[a-z0-9][a-z0-9._-]{0,127}$/;
2
2
  export const REVISION_ID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
3
+ export const APPROVAL_GATES = Object.freeze(["UR", "PRD", "SD", "TP", "QA", "UAT"]);
3
4
 
4
5
  export function validateRunIdentity({ runId, revisionId } = {}) {
5
6
  const findings = [];
@@ -0,0 +1,31 @@
1
+ import { existsSync, readFileSync } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { readRunOperations } from './run-operations.js';
4
+ import { readApprovalOperations } from './approval-operations.js';
5
+ import { readArtefactBindings } from './artefact-bindings.js';
6
+ import { readSourceRevisions } from './run-source-revisions.js';
7
+ import { containedRegularFile, hasSymlinkComponent } from './contained-file.js';
8
+ import { REVISION_ID_PATTERN } from './run-identity.js';
9
+ import { validateRunPresentationEnvelope } from './run-presentation.js';
10
+
11
+ // Called under the existing selected Run lock. This is identity reservation only;
12
+ // the original family alone validates payload, eligibility, receipt and replay.
13
+ export function assertRunOperationIdentity(root, run, operationId, family) {
14
+ if (!REVISION_ID_PATTERN.test(operationId ?? '')) throw Error('AGDF_OPERATION_BINDING_INVALID');
15
+ const receipts = [
16
+ ...readRunOperations(run.content).receipts.map(r => [r.operation_id, r.kind]),
17
+ ...readApprovalOperations(run.content).receipts.map(r => [r.operation_id, 'approval.record']),
18
+ ...readArtefactBindings(run.content).receipts.map(r => [r.operation.id, 'artefact.record']),
19
+ ...readSourceRevisions(run.content).receipts.map(r => [r.operation_id, 'source_revision.apply']),
20
+ ].filter(([id]) => id === operationId);
21
+ if (receipts.length > 1 || receipts.some(([, kind]) => kind !== family)) throw Error('AGDF_OPERATION_PAYLOAD_CONFLICT');
22
+ const path = `.agdf/control/runs/${run.meta.run_id}/presentations/${operationId}.json`;
23
+ if (!existsSync(join(root, path))) return;
24
+ if (hasSymlinkComponent(root, path) || containedRegularFile(root, path).status !== 'valid') throw Error('AGDF_OPERATION_IDENTITY_UNCONFIRMED');
25
+ const bytes = readFileSync(join(root, path)); if (bytes.length > 262144) throw Error('AGDF_OPERATION_IDENTITY_UNCONFIRMED');
26
+ let envelope; try { envelope = JSON.parse(new TextDecoder('utf-8', { fatal: true }).decode(bytes)); } catch { throw Error('AGDF_OPERATION_IDENTITY_UNCONFIRMED'); }
27
+ const r = envelope.record;
28
+ const check = validateRunPresentationEnvelope(envelope, { runId: run.meta.run_id, gate: r?.gate, revisionId: r?.revision_id, presentationId: operationId });
29
+ if (check.reason) throw Error('AGDF_OPERATION_IDENTITY_UNCONFIRMED');
30
+ if (r.operation_id === operationId && (family !== 'presentation.prepare' || receipts.length)) throw Error('AGDF_OPERATION_PAYLOAD_CONFLICT');
31
+ }
@@ -0,0 +1,103 @@
1
+ import { readFileSync, statSync } from 'node:fs';
2
+ import { canonicalJson, digest, DIGEST_PATTERN, exactObject, COOPERATIVE_ASSURANCE, resolveControlCommandTarget } from './approval-command-contract.js';
3
+ import { containedRegularFile, hasSymlinkComponent } from './contained-file.js';
4
+ import { artefactFileDigest, canonicalRunText } from './run-seal-compute.js';
5
+ import { INTERNAL_STEP_FILES } from './run-owned-outputs.js';
6
+ import { EVIDENCE_PREREQUISITES, evidenceSourceSetDigest } from './evidence-bindings.js';
7
+ import { evaluateQaFollowUp } from '../control-evaluation/qa-follow-up.js';
8
+ import { STRUCTURED_REQUIRED_REVIEWS, CORRECTABLE_REVIEWS } from './evidence-bindings.js';
9
+ import { maskFindingCells, readNormalizedFindings, reviewFindingDiagnostics } from '../control-evaluation/normalized-gaps.js';
10
+ import { readReportDecision } from '../control-evaluation/report-decision.js';
11
+ import { approvalMaterialTypes, reviewRecordingChain } from './presentation-decision.js';
12
+
13
+ export function readOperationSource(root, runId, source) {
14
+ if (!exactObject(source, ['path', 'digest']) || !DIGEST_PATTERN.test(source.digest ?? '')
15
+ || typeof source.path !== 'string' || !source.path.startsWith(`.agdf/control/artefacts/${runId}/`)
16
+ || source.path.endsWith('/RUN_STATE.md') || hasSymlinkComponent(root, source.path)) throw Error('AGDF_RUN_OPERATION_SOURCE_INVALID');
17
+ const file = containedRegularFile(root, source.path);
18
+ if (file.status !== 'valid' || statSync(file.path).size > 131072) throw Error('AGDF_RUN_OPERATION_SOURCE_INVALID');
19
+ const bytes = readFileSync(file.path);
20
+ if (bytes.length > 131072) throw Error('AGDF_RUN_OPERATION_SOURCE_INVALID');
21
+ const content = new TextDecoder('utf-8', { fatal: true }).decode(bytes);
22
+ if (artefactFileDigest(root, source.path) !== source.digest || !canonicalRunText(content).trim()) throw Error('AGDF_RUN_OPERATION_SOURCE_INVALID');
23
+ return { content, validate: () => { if (hasSymlinkComponent(root, source.path) || containedRegularFile(root, source.path).status !== 'valid' || artefactFileDigest(root, source.path) !== source.digest) throw Error('AGDF_RUN_OPERATION_SOURCE_CHANGED'); } };
24
+ }
25
+ export function operationSources(root, state, step) {
26
+ const types = EVIDENCE_PREREQUISITES[step]; if (!types) throw Error('AGDF_RUN_OPERATION_STEP_INVALID');
27
+ return types.map(type => {
28
+ const row = state.artefacts.get(type);
29
+ const value = row?.path ? artefactFileDigest(root, row.path) : null;
30
+ return { type, path: row?.path ?? '', digest: DIGEST_PATTERN.test(value ?? '') ? value : null, status: row?.status ?? 'missing' };
31
+ });
32
+ }
33
+ export const operationSourceSetDigest = (root, state, step) => evidenceSourceSetDigest(operationSources(root, state, step));
34
+ export function operationReceipt(root, run, context, nextRevisionId, record, packageVersion) {
35
+ return { schema_version: '1', kind: context.kind, operation_id: context.operation_id, request_digest: context.request_digest,
36
+ target_id: resolveControlCommandTarget(root).target_id, run_id: run.meta.run_id, expected_revision_id: run.meta.revision_id,
37
+ created_at: new Date().toISOString(), producer: { contract: 'run-command/1', package_version: packageVersion }, assurance: COOPERATIVE_ASSURANCE,
38
+ effect: { previous_revision_id: run.meta.revision_id, resulting_revision_id: nextRevisionId, revision: Number(run.meta.revision) + 1, record } };
39
+ }
40
+ // A run approved past QA without a review that closeout requires may record it once, at
41
+ // UAT or OR, when the QA approval never saw that review. A recorded review is never
42
+ // replaced here, and no other internal step becomes recordable after QA approval.
43
+ function lateRequiredReviewEligible(state, before, input) {
44
+ const type = input.internalStep, rows = [state.artefacts.get(type), type === 'Clean Implementation Review' ? state.artefacts.get('Clean Review') : null];
45
+ if (!STRUCTURED_REQUIRED_REVIEWS.includes(type) || state.approvals.get('QA')?.status !== 'approved'
46
+ || state.approvals.get('TP')?.status !== 'approved' || !['UAT', 'OR'].includes(before.current_gate)
47
+ || rows.some(row => row && (row.path || row.status !== 'missing')) || state.artefacts.get('CD+Tests')?.status !== 'done') return false;
48
+ // Only a material receipt proves the approval never saw this review; the same proof lets the
49
+ // QA association stay current afterwards (run-state.js). Legacy or unreadable receipts refuse.
50
+ const material = approvalMaterialTypes(state, 'QA');
51
+ return material.status === 'recorded' && !material.types.has(type);
52
+ }
53
+
54
+ // At OR after Approval: UAT a recorded review may be recorded again only to correct invalid
55
+ // normalized finding rows. This is the structural part; run-steps.js applies
56
+ // reviewCorrectionRefusal to the recorded and the new content before writing.
57
+ function reviewCorrectionCandidate(state, before, input) {
58
+ const type = input.internalStep, row = state.artefacts.get(type);
59
+ if (!CORRECTABLE_REVIEWS.includes(type) || before.current_gate !== 'OR' || !['QA', 'UAT'].every(gate => state.approvals.get(gate)?.status === 'approved')
60
+ || !row?.path || !['done', 'revise', 'block'].includes(row.status)) return false;
61
+ // Only a correction that the approval-material proof recognises afterwards is eligible:
62
+ // the approvals saw a receipt-recorded version at the canonical path with this status.
63
+ const chain = reviewRecordingChain(state, type), canonical = `.agdf/control/artefacts/${state.run_id ?? state.meta?.run_id}/${INTERNAL_STEP_FILES[type]}`;
64
+ return Boolean(chain) && chain.seen.source.path === canonical && String(row.path).replace(/^`|`$/gu, '') === canonical && row.status === chain.seen.status;
65
+ }
66
+
67
+ // Closeout names the OR correction path only where it can be taken (run-steps.js).
68
+ export function reviewCorrectionAvailable(state, type, problems = []) {
69
+ return problems.length > 0 && problems.every(problem => problem.rule === 'required_next_step')
70
+ && reviewCorrectionCandidate(state, { current_gate: 'OR' }, { internalStep: type });
71
+ }
72
+
73
+ const findingClasses = content => readNormalizedFindings(content).entries.filter(entry => entry.kind === 'row')
74
+ .map(entry => entry.row.slice(0, 4).join('|')).sort().join('\n');
75
+ // The approvals saw the recorded version. Only the stuck-run defect is correctable: an empty,
76
+ // placeholder or overlong required_next_step of a readable finding row. A correction changes
77
+ // exactly those cells; decision, status, classification, evidence and all other text stay equal.
78
+ export function reviewCorrectionRefusal(type, recorded, decision, content) {
79
+ if (typeof recorded?.content !== 'string') return 'recorded_review_unavailable';
80
+ const recordedDecision = readReportDecision(recorded.content);
81
+ const problems = reviewFindingDiagnostics(type, recorded.content, { decision: recordedDecision });
82
+ if (!problems.length) return 'recorded_review_valid';
83
+ if (problems.some(problem => !problem.finding_id || problem.rule !== 'required_next_step')) return 'recorded_review_uncorrectable';
84
+ if (recordedDecision !== decision || (decision === 'pass' ? 'done' : decision) !== recorded.status) return 'decision_changed';
85
+ if (findingClasses(recorded.content) !== findingClasses(content)) return 'classification_changed';
86
+ const ids = new Set(problems.map(problem => problem.finding_id));
87
+ return maskFindingCells(recorded.content, ids) === maskFindingCells(content, ids) ? null : 'content_changed';
88
+ }
89
+
90
+ export function internalStepEligibility(state, before, input, root) {
91
+ if (state.meta?.lifecycle !== 'active' || !['structured_slice', 'structured_delivery'].includes(state.mode_slice_decision.decision)) return false;
92
+ if (lateRequiredReviewEligible(state, before, input) || reviewCorrectionCandidate(state, before, input)) return true;
93
+ if (['QA', 'UAT'].some(gate => state.approvals.get(gate)?.status === 'approved')) return false;
94
+ const type = input.internalStep;
95
+ if (!Object.hasOwn(INTERNAL_STEP_FILES, type) || type === 'Brownfield Review') return false;
96
+ if (type === 'UX Intent Definition') return state.approvals.get('UR')?.status === 'approved'
97
+ && (before.next_operation?.analysis === type || before.current_gate === 'PRD' && state.approvals.get('PRD')?.status !== 'approved');
98
+ if (state.approvals.get('TP')?.status !== 'approved') return false;
99
+ if (type === 'Brownfield Analysis') return before.current_gate === 'Brownfield Analysis';
100
+ if (type === 'CD+Tests') return before.current_gate === 'CD+Tests'
101
+ || before.current_gate === 'QA' && evaluateQaFollowUp(root, state, state.run_id, 64, true).kind === 'implementation';
102
+ return state.artefacts.get('CD+Tests')?.status === 'done' && ['CR', 'QA'].includes(before.current_gate);
103
+ }
@@ -0,0 +1,59 @@
1
+ import { readFileSync, existsSync } from '../control-read/fs.js';
2
+ import { join } from 'node:path';
3
+ import { readApprovalOperations } from './approval-operations.js';
4
+ import { readArtefactBindings } from './artefact-bindings.js';
5
+ import { readSourceRevisions } from './run-source-revisions.js';
6
+ import { readRunOperations } from './run-operations.js';
7
+ import { containedRegularFile, hasSymlinkComponent } from './contained-file.js';
8
+ import { parseRunState } from './run-state-parser.js';
9
+ import { runSealState } from './run-seal.js';
10
+ import { readPendingRunStepJournal } from './run-step-transaction.js';
11
+ import { validateRunPresentationEnvelope } from './run-presentation.js';
12
+ import { digest, canonicalJson, resolveControlCommandTarget } from './approval-command-contract.js';
13
+ import { RUN_ID_PATTERN, REVISION_ID_PATTERN } from './run-identity.js';
14
+
15
+ // Lookup only. Receipts stay in their original family; no shadow ledger or recovery here.
16
+ export function inspectRunOperation(root, { runId, operationId, targetId }) {
17
+ const result = extra => ({ schema_version: '1', run_id: runId, operation_id: operationId, authorizes: false, ...extra });
18
+ if (!RUN_ID_PATTERN.test(runId ?? '') || !REVISION_ID_PATTERN.test(operationId ?? '') || targetId !== resolveControlCommandTarget(root).target_id) return result({ status: 'unavailable', reason: 'operation_binding_invalid' });
19
+ const relative = `.agdf/control/runs/${runId}/RUN_STATE.md`;
20
+ if (hasSymlinkComponent(root, relative) || containedRegularFile(root, relative).status !== 'valid') return result({ status: 'unavailable', reason: 'run_path_invalid' });
21
+ const content = readFileSync(join(root, relative), 'utf8'), parsed = parseRunState(content, runId);
22
+ if (!parsed.valid) return result({ status: 'unavailable', reason: 'run_state_invalid' });
23
+ const records = [
24
+ ...readApprovalOperations(content).receipts.map(receipt => ({ kind: 'approval.record', receipt, id: receipt.operation_id, request_digest: receipt.command_digest ?? receipt.request_digest })),
25
+ ...readArtefactBindings(content).receipts.map(receipt => ({ kind: 'artefact.record', receipt, id: receipt.operation.id, request_digest: receipt.operation.request_digest ?? null })),
26
+ ...readSourceRevisions(content).receipts.map(receipt => ({ kind: 'source_revision.apply', receipt, id: receipt.operation_id, request_digest: receipt.command_digest ?? receipt.request_digest })),
27
+ ...readRunOperations(content).receipts.map(receipt => ({ kind: receipt.kind, receipt, id: receipt.operation_id, request_digest: receipt.request_digest })),
28
+ ].filter(row => row.id === operationId);
29
+ const pendingPath = `.agdf/control/runs/${runId}/RUN_STEP_PENDING.json`;
30
+ let pending = null;
31
+ if (existsSync(join(root, pendingPath))) {
32
+ try { const journal = readPendingRunStepJournal(root, runId, { readJournal: path => readFileSync(path, "utf8") }); pending = { kind: journal.kind ?? 'legacy',
33
+ operation_id: journal.operation_id, pending_digest: digest(canonicalJson(journal)), original_revision_id: journal.old_revision_id,
34
+ next_revision_id: journal.next_revision_id, schema_version: journal.schema_version, matches_operation: journal.operation_id === operationId }; }
35
+ catch { return result({ status: 'unknown', reason: 'pending_intent_unconfirmed', receipt: records[0]?.receipt ?? null }); }
36
+ }
37
+ if (records.length > 1) return result({ status: 'unknown', reason: 'operation_identity_ambiguous' });
38
+ if (records.length === 1) {
39
+ const record = records[0], seal = runSealState(root, content);
40
+ if (seal.status !== 'valid') return result({ status: 'unknown', reason: 'current_seal_unconfirmed', receipt: record.receipt, pending });
41
+ return result({ status: pending?.matches_operation ? 'committed_recovery_required' : 'recorded', family: record.kind,
42
+ request_digest: record.request_digest, receipt: record.receipt, historical_effect: true, current_revision_id: parsed.meta.revision_id, pending });
43
+ }
44
+ if (pending) return result({ status: pending.matches_operation ? 'pending' : 'unknown', reason: pending.matches_operation ? null : 'another_pending_operation', pending, current_revision_id: parsed.meta.revision_id });
45
+ // New immutable presentations use the original UUID as their presentation ID.
46
+ const path = `.agdf/control/runs/${runId}/presentations/${operationId}.json`;
47
+ if (existsSync(join(root, path))) {
48
+ if (hasSymlinkComponent(root, path) || containedRegularFile(root, path).status !== 'valid') return result({ status: 'unknown', reason: 'presentation_path_invalid' });
49
+ try {
50
+ const bytes = readFileSync(join(root, path), 'utf8'); if (Buffer.byteLength(bytes) > 262144) throw Error();
51
+ const envelope = JSON.parse(bytes), record = envelope.record;
52
+ const checked = validateRunPresentationEnvelope(envelope, { runId, gate: record.gate, revisionId: record.revision_id, presentationId: operationId });
53
+ if (checked.reason || record.operation_id !== operationId || !record.request_digest) throw Error();
54
+ return result({ status: 'recorded', family: 'presentation.prepare', receipt: record, request_digest: record.request_digest,
55
+ historical_effect: true, current_revision_id: parsed.meta.revision_id });
56
+ } catch { return result({ status: 'unknown', reason: 'presentation_operation_unconfirmed' }); }
57
+ }
58
+ return result({ status: 'absent', reason: 'absence_is_not_proof_of_non_execution', current_revision_id: parsed.meta.revision_id });
59
+ }