create-agdf 0.14.4 → 0.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1330) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +474 -11
  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 +288 -42
  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 +288 -42
  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 +288 -42
  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 +288 -42
  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 +288 -42
  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/identity.js +19 -0
  922. package/lib/host-adapters/codex/mcp-startup.js +14 -0
  923. package/lib/host-adapters/codex/plugin-mcp.js +39 -0
  924. package/lib/host-adapters/codex/plugin.js +243 -0
  925. package/lib/host-adapters/codex/runtime-check.js +27 -0
  926. package/lib/host-adapters/codex/session-command.js +7 -0
  927. package/lib/host-adapters/copilot/plugin.js +220 -0
  928. package/lib/host-adapters/copilot/session-command.js +1 -0
  929. package/lib/host-adapters/opencode/runtime-check.js +39 -0
  930. package/lib/host-adapters/opencode/session-command.js +1 -0
  931. package/lib/host-adapters/opencode/status.js +43 -0
  932. package/lib/host-adapters/session-command.js +11 -0
  933. package/lib/host-command.js +112 -0
  934. package/lib/install-setup/contract.js +319 -0
  935. package/lib/install-setup/control-migration.js +10 -0
  936. package/lib/install-setup/control-repair.js +1 -0
  937. package/lib/install-setup/interaction.js +157 -0
  938. package/lib/install-setup/presentation.js +337 -0
  939. package/lib/install-setup/service.js +441 -0
  940. package/lib/installers/copilot-marketplace-transport.js +74 -0
  941. package/lib/installers/copilot-settings.js +34 -3
  942. package/lib/installers/copilot-skill-discovery.js +27 -0
  943. package/lib/installers/local-development.js +107 -11
  944. package/lib/installers/local-marketplace.js +313 -37
  945. package/lib/installers/npm-invocation.js +2 -0
  946. package/lib/installers/opencode-activation.js +5 -31
  947. package/lib/installers/opencode.js +286 -89
  948. package/lib/installers/packaged-app-marketplace.js +67 -0
  949. package/lib/installers/plugin-command.js +115 -0
  950. package/lib/installers/plugin-installers.js +21 -521
  951. package/lib/lifecycle/operations.js +78 -137
  952. package/lib/lifecycle/owned-mutation.js +64 -0
  953. package/lib/lifecycle/presentation.js +47 -4
  954. package/lib/lifecycle/result.js +183 -2
  955. package/lib/lifecycle/status.js +150 -66
  956. package/lib/mcp-dispatch-runtime.js +360 -0
  957. package/lib/mcp-lifecycle/adapter-contract.js +54 -0
  958. package/lib/mcp-lifecycle/adapters/claude.js +123 -0
  959. package/lib/mcp-lifecycle/adapters/codex-origin-probe.js +87 -0
  960. package/lib/mcp-lifecycle/adapters/codex.js +502 -0
  961. package/lib/mcp-lifecycle/adapters/copilot.js +106 -0
  962. package/lib/mcp-lifecycle/adapters/file-utils.js +90 -0
  963. package/lib/mcp-lifecycle/adapters/opencode.js +148 -0
  964. package/lib/mcp-lifecycle/evidence.js +122 -0
  965. package/lib/mcp-lifecycle/facade-entry.js +26 -0
  966. package/lib/mcp-lifecycle/facade-owner-entry.js +34 -0
  967. package/lib/mcp-lifecycle/host-config.js +60 -0
  968. package/lib/mcp-lifecycle/package.js +527 -0
  969. package/lib/mcp-lifecycle/plugin-runtime.js +420 -0
  970. package/lib/mcp-lifecycle/presentation.js +61 -0
  971. package/lib/mcp-lifecycle/profile-context.js +11 -0
  972. package/lib/mcp-lifecycle/profile.js +63 -0
  973. package/lib/mcp-lifecycle/result.js +92 -0
  974. package/lib/mcp-lifecycle/service.js +533 -0
  975. package/lib/npm-invocation.js +27 -0
  976. package/lib/repository-context.js +87 -0
  977. package/lib/runtime/control-command-service.js +12 -0
  978. package/lib/runtime/control-context.js +11 -0
  979. package/lib/runtime/git-history.js +7 -0
  980. package/lib/runtime/git-originals.js +36 -0
  981. package/lib/runtime/local-validator.js +39 -5
  982. package/lib/runtime/plugin-provenance.js +1 -298
  983. package/lib/runtime/runtime-probe.js +61 -0
  984. package/lib/runtime/validator-application.js +3 -3
  985. package/lib/runtime-check-consent/adapters.js +3 -42
  986. package/lib/runtime-check-consent/claude-settings.js +2 -23
  987. package/lib/runtime-check-consent/codex-hooks.js +96 -0
  988. package/lib/runtime-check-consent/codex-plugin-consent.js +118 -0
  989. package/lib/runtime-check-consent/contract.js +9 -8
  990. package/lib/runtime-check-consent/coordinator.js +3 -3
  991. package/lib/runtime-check-consent/service.js +29 -53
  992. package/lib/runtime-check-consent/state.js +1 -1
  993. package/lib/scaffold/canonical-init.js +691 -0
  994. package/lib/scaffold/plan.js +8 -14
  995. package/lib/scaffold/presentation.js +53 -3
  996. package/lib/skill-dispatch/binding.js +9 -0
  997. package/opencode-plugin.js +99 -26
  998. package/package.json +22 -51
  999. package/runtime/core/lib/control-evaluation/acceptance-criteria.js +61 -0
  1000. package/runtime/core/lib/control-evaluation/backlog-vocabulary.d.ts +3 -0
  1001. package/runtime/core/lib/control-evaluation/backlog-vocabulary.js +15 -0
  1002. package/runtime/core/lib/control-evaluation/closeout-readiness.js +103 -0
  1003. package/runtime/core/lib/control-evaluation/decision-content-readiness.js +131 -0
  1004. package/runtime/core/lib/control-evaluation/definition-sources.js +46 -0
  1005. package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/delivery-map.js +31 -37
  1006. package/runtime/core/lib/control-evaluation/delivery-relationships.js +21 -0
  1007. package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/doctor.js +85 -17
  1008. package/runtime/core/lib/control-evaluation/gate-check.js +827 -0
  1009. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/gate-policy.js +141 -10
  1010. package/runtime/core/lib/control-evaluation/markdown-table.js +40 -0
  1011. package/runtime/core/lib/control-evaluation/next-action.js +32 -0
  1012. package/runtime/core/lib/control-evaluation/normalized-gaps.js +105 -0
  1013. package/runtime/core/lib/control-evaluation/prd-readiness.js +51 -0
  1014. package/runtime/core/lib/control-evaluation/qa-follow-up.js +83 -0
  1015. package/runtime/core/lib/control-evaluation/report-decision.js +237 -0
  1016. package/runtime/core/lib/control-evaluation/run-state-policy.js +51 -0
  1017. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/run-state.js +108 -74
  1018. package/runtime/core/lib/control-evaluation/run-step-policy.js +20 -0
  1019. package/runtime/core/lib/control-evaluation/run-work-summary.js +109 -0
  1020. package/runtime/core/lib/control-evaluation/sd-readiness.js +56 -0
  1021. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/shared.js +5 -2
  1022. package/runtime/core/lib/control-evaluation/tp-planning.js +118 -0
  1023. package/runtime/core/lib/control-evaluation/traceability-readiness.js +212 -0
  1024. package/runtime/core/lib/control-evaluation/ur-readiness.js +47 -0
  1025. package/{generated/plugins/agdf/runtime/create-agdf → runtime/core}/lib/control-evaluation/verified-change.js +10 -30
  1026. package/runtime/core/lib/control-inspect/artifact-readiness.js +122 -0
  1027. package/runtime/core/lib/control-inspect/cockpit-backlog.js +135 -0
  1028. package/runtime/core/lib/control-inspect/cockpit-context.js +97 -0
  1029. package/runtime/core/lib/control-inspect/cockpit-contract.js +86 -0
  1030. package/runtime/core/lib/control-inspect/cockpit-list.d.ts +17 -0
  1031. package/runtime/core/lib/control-inspect/cockpit-list.js +45 -0
  1032. package/runtime/core/lib/control-inspect/cockpit-session.js +217 -0
  1033. package/runtime/core/lib/control-inspect/cockpit.js +388 -0
  1034. package/runtime/core/lib/control-inspect/contract.js +299 -0
  1035. package/runtime/core/lib/control-inspect/decision-session.js +243 -0
  1036. package/runtime/core/lib/control-inspect/selection.js +35 -0
  1037. package/runtime/core/lib/control-inspect/service.js +319 -0
  1038. package/runtime/core/lib/control-maintenance/compatibility.js +149 -0
  1039. package/runtime/core/lib/control-maintenance/contract.js +41 -0
  1040. package/runtime/core/lib/control-maintenance/interaction.js +57 -0
  1041. package/runtime/core/lib/control-maintenance/migration.js +85 -0
  1042. package/runtime/core/lib/control-maintenance/presentation.js +122 -0
  1043. package/runtime/core/lib/control-maintenance/repair.js +226 -0
  1044. package/runtime/core/lib/control-maintenance/service.js +38 -0
  1045. package/runtime/core/lib/control-read/cockpit-pool.js +105 -0
  1046. package/runtime/core/lib/control-read/cockpit-worker.js +33 -0
  1047. package/runtime/core/lib/control-read/control-changes.js +33 -0
  1048. package/runtime/core/lib/control-read/fs.js +55 -0
  1049. package/runtime/core/lib/control-read/snapshot.js +378 -0
  1050. package/runtime/core/lib/control-read-boundary.js +22 -0
  1051. package/runtime/core/lib/control-state/approval-command-contract.js +73 -0
  1052. package/runtime/core/lib/control-state/approval-command.js +137 -0
  1053. package/runtime/core/lib/control-state/approval-operations.js +95 -0
  1054. package/runtime/core/lib/control-state/artefact-binding-proof.js +90 -0
  1055. package/runtime/core/lib/control-state/artefact-bindings.js +94 -0
  1056. package/runtime/core/lib/control-state/backlog-summary-shape.d.ts +4 -0
  1057. package/runtime/core/lib/control-state/backlog-summary-shape.js +40 -0
  1058. package/runtime/core/lib/control-state/backlog-summary.js +67 -0
  1059. package/runtime/core/lib/control-state/contained-file.js +56 -0
  1060. package/runtime/core/lib/control-state/control-configuration.js +19 -0
  1061. package/runtime/core/lib/control-state/decision-action-contract.js +32 -0
  1062. package/runtime/core/lib/control-state/decision-action-service.js +55 -0
  1063. package/runtime/core/lib/control-state/decision-material-contract.js +12 -0
  1064. package/runtime/core/lib/control-state/evidence-bindings.js +132 -0
  1065. package/{lib → runtime/core/lib}/control-state/index.js +2 -0
  1066. package/{lib → runtime/core/lib}/control-state/legacy-migration.js +5 -31
  1067. package/runtime/core/lib/control-state/legacy-projection-reader.js +38 -0
  1068. package/runtime/core/lib/control-state/presentation-decision.js +138 -0
  1069. package/runtime/core/lib/control-state/preview-render.js +130 -0
  1070. package/runtime/core/lib/control-state/preview-review.js +136 -0
  1071. package/runtime/core/lib/control-state/preview-snapshot.js +108 -0
  1072. package/runtime/core/lib/control-state/qa-deviation-acceptance.js +82 -0
  1073. package/runtime/core/lib/control-state/recording-formats.js +29 -0
  1074. package/runtime/core/lib/control-state/run-artefact-recording.js +81 -0
  1075. package/runtime/core/lib/control-state/run-backlog-writer.js +80 -0
  1076. package/runtime/core/lib/control-state/run-backlog.js +90 -0
  1077. package/runtime/core/lib/control-state/run-command-contract.js +143 -0
  1078. package/runtime/core/lib/control-state/run-command-service.js +174 -0
  1079. package/{generated/plugins/copilot/agdf/runtime/create-agdf → runtime/core}/lib/control-state/run-identity.js +1 -0
  1080. package/runtime/core/lib/control-state/run-operation-identity.js +31 -0
  1081. package/runtime/core/lib/control-state/run-operation-proof.js +103 -0
  1082. package/runtime/core/lib/control-state/run-operation-status.js +59 -0
  1083. package/runtime/core/lib/control-state/run-operations.js +80 -0
  1084. package/runtime/core/lib/control-state/run-owned-outputs.js +59 -0
  1085. package/runtime/core/lib/control-state/run-presentation-envelope.js +36 -0
  1086. package/runtime/core/lib/control-state/run-presentation-render.js +443 -0
  1087. package/runtime/core/lib/control-state/run-presentation.js +348 -0
  1088. package/runtime/core/lib/control-state/run-recording.js +273 -0
  1089. package/runtime/core/lib/control-state/run-recovery.js +296 -0
  1090. package/runtime/core/lib/control-state/run-relationship-correction.js +74 -0
  1091. package/runtime/core/lib/control-state/run-revision-boundary.js +44 -0
  1092. package/runtime/core/lib/control-state/run-revision-history.js +184 -0
  1093. package/runtime/core/lib/control-state/run-revision.js +458 -0
  1094. package/runtime/core/lib/control-state/run-seal-compute.js +141 -0
  1095. package/runtime/core/lib/control-state/run-seal.js +26 -0
  1096. package/runtime/core/lib/control-state/run-source-revisions.js +221 -0
  1097. 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
  1098. package/runtime/core/lib/control-state/run-state-edits.js +170 -0
  1099. package/runtime/core/lib/control-state/run-state-parser.js +106 -0
  1100. package/runtime/core/lib/control-state/run-state-reader.js +57 -0
  1101. package/runtime/core/lib/control-state/run-state-repository.js +201 -0
  1102. package/{lib → runtime/core/lib}/control-state/run-state-resolver.js +1 -1
  1103. package/runtime/core/lib/control-state/run-state-writer.js +484 -0
  1104. package/runtime/core/lib/control-state/run-step-pending.js +15 -0
  1105. package/runtime/core/lib/control-state/run-step-transaction.js +359 -0
  1106. package/runtime/core/lib/control-state/run-steps.js +571 -0
  1107. package/runtime/core/lib/control-state/run-store-inspection.js +65 -0
  1108. package/runtime/core/lib/control-state/run-text.js +8 -0
  1109. package/runtime/core/lib/delivery-continuation/service.js +67 -0
  1110. package/runtime/core/lib/fs-swap.js +26 -0
  1111. package/runtime/core/lib/index.js +14 -0
  1112. package/runtime/core/lib/interaction-catalog-validation.js +26 -0
  1113. package/runtime/core/lib/interaction-catalog.d.ts +2 -0
  1114. package/runtime/core/lib/interaction-catalog.js +98 -0
  1115. package/{lib → runtime/core/lib}/interaction-presentation.js +437 -33
  1116. package/runtime/core/lib/mcp-resource-contract.js +4 -0
  1117. package/runtime/core/lib/mcp-tool-errors.js +176 -0
  1118. package/runtime/core/lib/repository-context-reader.js +87 -0
  1119. package/runtime/core/lib/resources/artefact-templates.js +72 -0
  1120. package/runtime/core/lib/resources/binding.js +26 -0
  1121. package/runtime/core/lib/resources/context.js +70 -0
  1122. package/runtime/core/lib/resources/contracts.js +23 -0
  1123. package/runtime/core/lib/runtime/distribution-profile-history.js +173 -0
  1124. package/runtime/core/lib/runtime/host-installation.js +200 -0
  1125. package/runtime/core/lib/runtime/plugin-provenance.js +496 -0
  1126. package/runtime/core/lib/skill-dispatch/binding.js +66 -0
  1127. package/runtime/core/lib/skill-dispatch/compact-continuation.js +76 -0
  1128. package/runtime/core/lib/skill-dispatch/contract.js +430 -0
  1129. package/runtime/core/lib/skill-dispatch/delivery-intake.js +80 -0
  1130. package/runtime/core/lib/skill-dispatch/delivery-run-assignment.js +74 -0
  1131. package/runtime/core/lib/skill-dispatch/prd-definition.js +39 -0
  1132. package/runtime/core/lib/skill-dispatch/sd-definition.js +39 -0
  1133. package/runtime/core/lib/skill-dispatch/service.js +833 -0
  1134. package/runtime/core/lib/skill-dispatch/tp-definition.js +41 -0
  1135. package/runtime/core/lib/task-target-resolution.js +202 -0
  1136. package/runtime/core/node_modules/entities/LICENSE +11 -0
  1137. package/runtime/core/node_modules/entities/decode.js +3 -0
  1138. package/runtime/core/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  1139. package/runtime/core/node_modules/entities/dist/commonjs/decode.js +511 -0
  1140. package/runtime/core/node_modules/entities/dist/commonjs/encode.js +73 -0
  1141. package/runtime/core/node_modules/entities/dist/commonjs/escape.js +121 -0
  1142. package/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-html.js +10 -0
  1143. package/runtime/core/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +10 -0
  1144. package/runtime/core/node_modules/entities/dist/commonjs/generated/encode-html.js +13 -0
  1145. package/runtime/core/node_modules/entities/dist/commonjs/index.js +131 -0
  1146. package/runtime/core/node_modules/entities/dist/commonjs/package.json +3 -0
  1147. package/runtime/core/node_modules/entities/dist/esm/decode-codepoint.js +72 -0
  1148. package/runtime/core/node_modules/entities/dist/esm/decode.js +497 -0
  1149. package/runtime/core/node_modules/entities/dist/esm/encode.js +69 -0
  1150. package/runtime/core/node_modules/entities/dist/esm/escape.js +117 -0
  1151. package/runtime/core/node_modules/entities/dist/esm/generated/decode-data-html.js +7 -0
  1152. package/runtime/core/node_modules/entities/dist/esm/generated/decode-data-xml.js +7 -0
  1153. package/runtime/core/node_modules/entities/dist/esm/generated/encode-html.js +10 -0
  1154. package/runtime/core/node_modules/entities/dist/esm/index.js +107 -0
  1155. package/runtime/core/node_modules/entities/dist/esm/package.json +3 -0
  1156. package/runtime/core/node_modules/entities/escape.js +3 -0
  1157. package/runtime/core/node_modules/entities/package.json +118 -0
  1158. package/runtime/core/node_modules/entities/src/generated/.eslintrc.json +10 -0
  1159. package/runtime/core/node_modules/nanoid/LICENSE +20 -0
  1160. package/runtime/core/node_modules/nanoid/async/index.browser.cjs +43 -0
  1161. package/runtime/core/node_modules/nanoid/async/index.browser.js +43 -0
  1162. package/runtime/core/node_modules/nanoid/async/index.cjs +47 -0
  1163. package/runtime/core/node_modules/nanoid/async/index.js +47 -0
  1164. package/runtime/core/node_modules/nanoid/async/index.native.js +38 -0
  1165. package/runtime/core/node_modules/nanoid/async/package.json +12 -0
  1166. package/runtime/core/node_modules/nanoid/bin/nanoid.cjs +55 -0
  1167. package/runtime/core/node_modules/nanoid/index.browser.cjs +45 -0
  1168. package/runtime/core/node_modules/nanoid/index.browser.js +45 -0
  1169. package/runtime/core/node_modules/nanoid/index.cjs +63 -0
  1170. package/runtime/core/node_modules/nanoid/index.js +63 -0
  1171. package/runtime/core/node_modules/nanoid/nanoid.js +1 -0
  1172. package/runtime/core/node_modules/nanoid/non-secure/index.cjs +24 -0
  1173. package/runtime/core/node_modules/nanoid/non-secure/index.js +24 -0
  1174. package/runtime/core/node_modules/nanoid/non-secure/package.json +6 -0
  1175. package/runtime/core/node_modules/nanoid/package.json +89 -0
  1176. package/runtime/core/node_modules/nanoid/url-alphabet/index.cjs +4 -0
  1177. package/runtime/core/node_modules/nanoid/url-alphabet/index.js +4 -0
  1178. package/runtime/core/node_modules/nanoid/url-alphabet/package.json +6 -0
  1179. package/runtime/core/node_modules/parse5/LICENSE +19 -0
  1180. package/runtime/core/node_modules/parse5/dist/cjs/common/doctype.js +118 -0
  1181. package/runtime/core/node_modules/parse5/dist/cjs/common/error-codes.js +66 -0
  1182. package/runtime/core/node_modules/parse5/dist/cjs/common/foreign-content.js +237 -0
  1183. package/runtime/core/node_modules/parse5/dist/cjs/common/html.js +528 -0
  1184. package/runtime/core/node_modules/parse5/dist/cjs/common/token.js +24 -0
  1185. package/runtime/core/node_modules/parse5/dist/cjs/common/unicode.js +70 -0
  1186. package/runtime/core/node_modules/parse5/dist/cjs/index.js +54 -0
  1187. package/runtime/core/node_modules/parse5/dist/cjs/package.json +1 -0
  1188. package/runtime/core/node_modules/parse5/dist/cjs/parser/formatting-element-list.js +114 -0
  1189. package/runtime/core/node_modules/parse5/dist/cjs/parser/index.js +3240 -0
  1190. package/runtime/core/node_modules/parse5/dist/cjs/parser/open-element-stack.js +328 -0
  1191. package/runtime/core/node_modules/parse5/dist/cjs/serializer/index.js +172 -0
  1192. package/runtime/core/node_modules/parse5/dist/cjs/tokenizer/index.js +2714 -0
  1193. package/runtime/core/node_modules/parse5/dist/cjs/tokenizer/preprocessor.js +200 -0
  1194. package/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/default.js +176 -0
  1195. package/runtime/core/node_modules/parse5/dist/cjs/tree-adapters/interface.js +2 -0
  1196. package/runtime/core/node_modules/parse5/dist/common/doctype.js +114 -0
  1197. package/runtime/core/node_modules/parse5/dist/common/error-codes.js +63 -0
  1198. package/runtime/core/node_modules/parse5/dist/common/foreign-content.js +228 -0
  1199. package/runtime/core/node_modules/parse5/dist/common/html.js +523 -0
  1200. package/runtime/core/node_modules/parse5/dist/common/token.js +20 -0
  1201. package/runtime/core/node_modules/parse5/dist/common/unicode.js +62 -0
  1202. package/runtime/core/node_modules/parse5/dist/index.js +42 -0
  1203. package/runtime/core/node_modules/parse5/dist/parser/formatting-element-list.js +110 -0
  1204. package/runtime/core/node_modules/parse5/dist/parser/index.js +3245 -0
  1205. package/runtime/core/node_modules/parse5/dist/parser/open-element-stack.js +324 -0
  1206. package/runtime/core/node_modules/parse5/dist/serializer/index.js +168 -0
  1207. package/runtime/core/node_modules/parse5/dist/tokenizer/index.js +2710 -0
  1208. package/runtime/core/node_modules/parse5/dist/tokenizer/preprocessor.js +196 -0
  1209. package/runtime/core/node_modules/parse5/dist/tree-adapters/default.js +173 -0
  1210. package/runtime/core/node_modules/parse5/dist/tree-adapters/interface.js +1 -0
  1211. package/runtime/core/node_modules/parse5/package.json +50 -0
  1212. package/runtime/core/node_modules/picocolors/LICENSE +15 -0
  1213. package/runtime/core/node_modules/picocolors/package.json +25 -0
  1214. package/runtime/core/node_modules/picocolors/picocolors.browser.js +4 -0
  1215. package/runtime/core/node_modules/picocolors/picocolors.js +75 -0
  1216. package/runtime/core/node_modules/postcss/LICENSE +20 -0
  1217. package/runtime/core/node_modules/postcss/lib/at-rule.js +25 -0
  1218. package/runtime/core/node_modules/postcss/lib/comment.js +13 -0
  1219. package/runtime/core/node_modules/postcss/lib/container.js +494 -0
  1220. package/runtime/core/node_modules/postcss/lib/css-syntax-error.js +133 -0
  1221. package/runtime/core/node_modules/postcss/lib/declaration.js +24 -0
  1222. package/runtime/core/node_modules/postcss/lib/document.js +33 -0
  1223. package/runtime/core/node_modules/postcss/lib/fromJSON.js +107 -0
  1224. package/runtime/core/node_modules/postcss/lib/input.js +282 -0
  1225. package/runtime/core/node_modules/postcss/lib/lazy-result.js +626 -0
  1226. package/runtime/core/node_modules/postcss/lib/list.js +79 -0
  1227. package/runtime/core/node_modules/postcss/lib/map-generator.js +383 -0
  1228. package/runtime/core/node_modules/postcss/lib/no-work-result.js +137 -0
  1229. package/runtime/core/node_modules/postcss/lib/node.js +494 -0
  1230. package/runtime/core/node_modules/postcss/lib/parse.js +42 -0
  1231. package/runtime/core/node_modules/postcss/lib/parser.js +626 -0
  1232. package/runtime/core/node_modules/postcss/lib/postcss.js +101 -0
  1233. package/runtime/core/node_modules/postcss/lib/postcss.mjs +30 -0
  1234. package/runtime/core/node_modules/postcss/lib/previous-map.js +176 -0
  1235. package/runtime/core/node_modules/postcss/lib/processor.js +67 -0
  1236. package/runtime/core/node_modules/postcss/lib/result.js +42 -0
  1237. package/runtime/core/node_modules/postcss/lib/root.js +76 -0
  1238. package/runtime/core/node_modules/postcss/lib/rule.js +27 -0
  1239. package/runtime/core/node_modules/postcss/lib/stringifier.js +457 -0
  1240. package/runtime/core/node_modules/postcss/lib/stringify.js +69 -0
  1241. package/runtime/core/node_modules/postcss/lib/symbols.js +5 -0
  1242. package/runtime/core/node_modules/postcss/lib/terminal-highlight.js +70 -0
  1243. package/runtime/core/node_modules/postcss/lib/tokenize.js +270 -0
  1244. package/runtime/core/node_modules/postcss/lib/warn-once.js +13 -0
  1245. package/runtime/core/node_modules/postcss/lib/warning.js +47 -0
  1246. package/runtime/core/node_modules/postcss/package.json +88 -0
  1247. package/runtime/core/node_modules/source-map-js/LICENSE +28 -0
  1248. package/runtime/core/node_modules/source-map-js/lib/array-set.js +121 -0
  1249. package/runtime/core/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  1250. package/runtime/core/node_modules/source-map-js/lib/base64.js +67 -0
  1251. package/runtime/core/node_modules/source-map-js/lib/binary-search.js +111 -0
  1252. package/runtime/core/node_modules/source-map-js/lib/mapping-list.js +79 -0
  1253. package/runtime/core/node_modules/source-map-js/lib/quick-sort.js +141 -0
  1254. package/runtime/core/node_modules/source-map-js/lib/source-map-consumer.js +1236 -0
  1255. package/runtime/core/node_modules/source-map-js/lib/source-map-generator.js +446 -0
  1256. package/runtime/core/node_modules/source-map-js/lib/source-node.js +420 -0
  1257. package/runtime/core/node_modules/source-map-js/lib/util.js +594 -0
  1258. package/runtime/core/node_modules/source-map-js/package.json +71 -0
  1259. package/runtime/core/node_modules/source-map-js/source-map.js +8 -0
  1260. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +0 -506
  1261. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +0 -68
  1262. package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +0 -97
  1263. package/generated/plugins/copilot/agdf/copilot-skills/agdf-gate-check/SKILL.md +0 -240
  1264. package/generated/plugins/copilot/agdf/copilot-skills/agdf-interaction-locales.json +0 -512
  1265. package/generated/plugins/copilot/agdf/copilot-skills/agdf-qa-gate/SKILL.md +0 -137
  1266. package/generated/plugins/copilot/agdf/copilot-skills/agdf-runtime-contract.md +0 -16
  1267. package/generated/plugins/copilot/agdf/copilot-skills/agdf-ux-intent-definition/SKILL.md +0 -94
  1268. package/generated/plugins/copilot/agdf/copilot-skills/contracts/interaction.md +0 -487
  1269. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +0 -506
  1270. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +0 -68
  1271. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +0 -97
  1272. package/lib/control-evaluation/gate-check.js +0 -506
  1273. package/lib/control-state/run-state-repository.js +0 -68
  1274. package/lib/control-state/run-state-writer.js +0 -97
  1275. package/lib/proportionality-benchmark/blind-prompt.js +0 -38
  1276. package/lib/proportionality-benchmark/contracts.js +0 -129
  1277. package/lib/proportionality-benchmark/corpus-loader.js +0 -221
  1278. package/lib/proportionality-benchmark/evaluator.js +0 -260
  1279. package/lib/proportionality-benchmark/index.js +0 -8
  1280. package/lib/proportionality-benchmark/live-recorder.js +0 -122
  1281. package/lib/proportionality-benchmark/profiles.js +0 -102
  1282. package/lib/proportionality-benchmark/report.js +0 -60
  1283. package/lib/proportionality-benchmark/source-fingerprint.js +0 -34
  1284. package/lib/public-plugin/builder.js +0 -83
  1285. package/lib/public-plugin/contract.js +0 -102
  1286. package/lib/public-plugin/copilot-profile.js +0 -126
  1287. package/lib/public-plugin/manifest.js +0 -104
  1288. package/lib/public-plugin/report.js +0 -33
  1289. package/lib/public-plugin/validator.js +0 -101
  1290. package/lib/release/profile-history.js +0 -222
  1291. package/lib/release/version-bump.js +0 -527
  1292. package/lib/release/version-coherence.js +0 -137
  1293. package/lib/skill-evals/artefact-quality.js +0 -36
  1294. package/lib/skill-evals/index.js +0 -105
  1295. package/lib/skill-evals/live-recorder.js +0 -85
  1296. package/lib/skill-evals/workspace.js +0 -97
  1297. /package/generated/plugins/{copilot/agdf/copilot-skills → agdf/runtime/create-agdf/generated/plugins/agdf/meta}/contracts/context-graph.md +0 -0
  1298. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
  1299. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
  1300. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
  1301. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
  1302. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
  1303. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
  1304. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
  1305. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
  1306. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
  1307. /package/generated/plugins/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
  1308. /package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/fs-swap.js +0 -0
  1309. /package/{lib → generated/plugins/agdf/runtime/create-agdf/runtime/core/lib}/runtime/distribution-profile-history.js +0 -0
  1310. /package/generated/plugins/copilot/agdf/{hooks/copilot-hooks.json → com.github.copilot/hooks/hooks.json} +0 -0
  1311. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
  1312. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
  1313. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
  1314. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
  1315. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
  1316. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
  1317. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
  1318. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
  1319. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
  1320. /package/generated/plugins/copilot/agdf/runtime/create-agdf/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
  1321. /package/{lib → runtime/core/lib}/control-evaluation/parent-reconciliation.js +0 -0
  1322. /package/{lib → runtime/core/lib}/control-evaluation/required-files.js +0 -0
  1323. /package/{lib → runtime/core/lib}/control-state/aggregate.js +0 -0
  1324. /package/{lib → runtime/core/lib}/control-state/gate-approval-validator.js +0 -0
  1325. /package/{lib → runtime/core/lib}/delivery-path-search/candidate-policy.js +0 -0
  1326. /package/{lib → runtime/core/lib}/delivery-path-search/contracts.js +0 -0
  1327. /package/{lib → runtime/core/lib}/delivery-path-search/persistence.js +0 -0
  1328. /package/{lib → runtime/core/lib}/delivery-path-search/scoring.js +0 -0
  1329. /package/{lib → runtime/core/lib}/delivery-path-search/search-engine.js +0 -0
  1330. /package/{lib → runtime/core/lib}/delivery-path-search/state-adapter.js +0 -0
@@ -0,0 +1,176 @@
1
+ // Pure transport projection. Domain outcomes, receipts and eligibility stay with
2
+ // their existing owners. No IO, SDK, private reader or mutable registry lives here.
3
+ export const TOOL_ERROR_CONTRACT = 'agdf-tool-result/1';
4
+ export const TOOL_RESULT_META = 'agdf/tool-result';
5
+ const fields = ['schema_version', 'failed', 'code', 'category', 'effect_state', 'action', 'message', 'authorizes'];
6
+ const actions = {
7
+ correct_input: ['input', ['invalid_input', 'dispatch_input_invalid', 'inspect_input_invalid', 'command_schema_invalid', 'decision_schema_invalid', 'operation_source_invalid']],
8
+ confirm_target: ['binding', ['target_unresolved', 'target_binding_mismatch', 'no_reliable_target', 'explicit_target_required', 'target_invalid']],
9
+ refresh_binding: ['binding', ['stale_revision', 'revision_mismatch', 'operation_binding_stale_or_invalid', 'artifact_revision_stale', 'decision_binding_changed', 'decision_binding_invalid', 'presentation_state_changed', 'presentation_version_decided', 'presentation_not_found', 'presentation_missing', 'operation_source_changed', 'session_expired', 'source_changed', 'snapshot_stale', 'run_missing', 'invalid_run', 'document_missing', 'read_unavailable', 'recovery_binding_invalid', 'run_path_invalid']],
10
+ obtain_authority: ['permission', ['resource_denied', 'host_ui_unsupported', 'app_only_mediation_not_qualified', 'approval_required', 'confirmation_required', 'command_group_disabled', 'permission_denied', 'closeout_not_ready']],
11
+ inspect_operation: ['uncertain', ['effect_unknown', 'recovery_required', 'original_operation_unconfirmed', 'operation_payload_conflict', 'another_pending_operation', 'decision_pending', 'decision_result_unknown', 'dispatch_timeout', 'dispatch_worker_termination_unconfirmed', 'generation_connection_lost', 'generation_response_unknown', 'generation_result_limit', 'command_result_budget_exceeded']],
12
+ retry_after_prerequisite: ['runtime', ['dispatch_busy', 'busy', 'dispatch_cancelled', 'cancelled', 'resource_limit', 'timeout', 'dispatch_output_too_large', 'inspect_output_too_large', 'lifecycle_ineligible', 'generation_unavailable', 'generation_capacity_protected', 'generation_input_limit', 'connection_closed', 'connection_control_unavailable', 'generation_route_capacity', 'generation_replacement_busy', 'connection_control_capacity']],
13
+ repair_runtime: ['runtime', ['runtime_version_mismatch', 'runtime_provenance_invalid']],
14
+ stop: ['unknown', ['dispatch_worker_failed', 'generation_runtime_failed', 'tool_result_invalid', 'unclassified_tool_failure', 'generation_manifest_incompatible']],
15
+ };
16
+ const causes = new Map(Object.entries(actions).flatMap(([action, [category, codes]]) => codes.map(code => [code, { action, category }])));
17
+ const commandNames = new Set(['agdf_prepare', 'agdf_record', 'agdf_approve', 'agdf_revise', 'agdf_closeout', 'agdf_decision_action']);
18
+ const commandOutcomes = new Set(['accepted', 'already_applied', 'rejected', 'recovery_required', 'effect_unknown']);
19
+ const dispatchOutcomes = new Set(['invalid_input', 'target_unresolved', 'control_result', 'skill_continuation', 'intake_continuation', 'evaluator_error']);
20
+ const inspectOutcomes = new Set(['invalid_input', 'target_unresolved', 'inspect_result', 'evaluator_error']);
21
+ const exactReads = new Set(['presentation-document', 'presentation-preview', 'operation-contract', 'runtime-generations']);
22
+ const reportReads = new Set(['doctor', 'gate-check', 'delivery-map', 'artifact-readiness', 'operation-status', 'native-qualification', 'contract']);
23
+ const readStates = new Set(['available', 'empty', 'partial', 'invalid', 'missing', 'unsupported', 'blocked', 'stale', 'error']);
24
+ const safeFields = new Set(['arguments', 'working_directory', 'primary_target', 'target_source', 'presentation_language', 'skill_id', 'run_id', 'expected_revision_id', 'operation_id', 'command', 'module', 'gate', 'cursor', 'operation', 'all_active', 'variant']);
25
+ const plain = value => !!value && typeof value === 'object' && !Array.isArray(value) && [Object.prototype, null].includes(Object.getPrototypeOf(value));
26
+ const invalid = () => { throw Object.assign(new Error('tool_result_invalid'), { code: 'tool_result_invalid', facts: { code: 'tool_result_invalid', dispatch: 'unknown' } }); };
27
+ const textBytes = value => new TextEncoder().encode(JSON.stringify(value)).length;
28
+
29
+ export function knownExecutionCode(code) { return causes.has(code) ? code : 'dispatch_worker_failed'; }
30
+ export function validExecutionFacts(value) {
31
+ return plain(value) && Object.keys(value).every(key => ['code', 'dispatch', 'field', 'cause_code', 'worker_phase'].includes(key))
32
+ && causes.has(value.code) && ['not_dispatched', 'unknown'].includes(value.dispatch)
33
+ && (value.field === undefined || safeFields.has(value.field))
34
+ && (value.cause_code === undefined || value.code === 'dispatch_worker_termination_unconfirmed' && causes.has(value.cause_code))
35
+ && (value.worker_phase === undefined || value.code === 'dispatch_worker_termination_unconfirmed'
36
+ && ['worker_start', 'runtime_provenance', 'operation', 'result'].includes(value.worker_phase));
37
+ }
38
+ export function executionFacts(error, { phase = 'execute' } = {}) {
39
+ // Callers must establish the phase. An arbitrary exception's message/code is
40
+ // not a typed cause or evidence that a command did not execute.
41
+ const facts = validExecutionFacts(error?.facts) ? error.facts : null;
42
+ if (facts) return { ...facts };
43
+ return { code: 'dispatch_worker_failed', dispatch: phase === 'parse' || phase === 'setup' ? 'not_dispatched' : 'unknown' };
44
+ }
45
+
46
+ export function validateToolDomain(name, result) {
47
+ if (!plain(result) || result.schema_version !== '1' || result._meta !== undefined && !plain(result._meta)) invalid();
48
+ if (name === 'agdf_dispatch' || name === 'agdf_inspect') {
49
+ const outcomes = name === 'agdf_dispatch' ? dispatchOutcomes : inspectOutcomes;
50
+ if (result.contract_version !== 1 || !plain(result.runtime) || !plain(result.timing)
51
+ || !['wrapper_ms', 'input_ms', 'target_ms', 'control_ms', 'render_ms', 'total_ms'].every(key => Number.isFinite(result.timing[key]) && result.timing[key] >= 0)) invalid();
52
+ if (!outcomes.has(result.outcome) || result.authorizes !== false || typeof result.terminal !== 'boolean'
53
+ || !Array.isArray(result.diagnostics) || !result.diagnostics.every(plain)) invalid();
54
+ if (name === 'agdf_dispatch' && ['skill', 'control', 'continuation'].some(key => result[key] !== null && !plain(result[key]))) invalid();
55
+ if (name === 'agdf_inspect' && result.outcome === 'inspect_result' && !plain(result.report)) invalid();
56
+ if (!plain(result.host_action) || typeof result.host_action.mode !== 'string' || typeof result.host_action.source !== 'string'
57
+ || result.host_action.allow_surrounding_text !== undefined && typeof result.host_action.allow_surrounding_text !== 'boolean'
58
+ || result.host_action.may_request_run_or_evidence !== undefined && typeof result.host_action.may_request_run_or_evidence !== 'boolean'
59
+ || !(result.recovery === null || plain(result.recovery))
60
+ || !(result.target === null || plain(result.target)) || !(result.presentation === null || plain(result.presentation))) invalid();
61
+ if (name === 'agdf_inspect' && (!(result.operation === null || typeof result.operation === 'string')
62
+ || !(result.report === null || plain(result.report))
63
+ || result.outcome !== 'inspect_result' && result.report !== null
64
+ || result.outcome === 'inspect_result' && result.terminal !== false)) invalid();
65
+ if (['invalid_input', 'target_unresolved', 'evaluator_error'].includes(result.outcome)
66
+ && (result.terminal !== true || !['transmit_presentation_verbatim_and_stop', 'transmit_recovery_verbatim_and_stop'].includes(result.host_action.mode)
67
+ || typeof result.host_action.allow_surrounding_text !== 'boolean' || typeof result.host_action.may_request_run_or_evidence !== 'boolean'
68
+ || typeof result.recovery?.action !== 'string' || !result.recovery.action
69
+ || typeof result.host_action.text !== 'string' || !result.host_action.text)) invalid();
70
+ } else if (commandNames.has(name)) {
71
+ if (!commandOutcomes.has(result.outcome) || result.authorizes !== false) invalid();
72
+ if (['accepted', 'already_applied'].includes(result.outcome) ? !(result.receipt === null || plain(result.receipt)) : typeof result.reason !== 'string' || !result.reason) invalid();
73
+ } else if (name === 'agdf_cockpit' || name === 'agdf_cockpit_read') {
74
+ if (name === 'agdf_cockpit' && result.state === undefined && result.outcome === undefined) {
75
+ const view = result._meta?.agdf_cockpit;
76
+ if (result.authorizes !== false || !plain(result.target) || typeof result.target.target_id !== 'string'
77
+ || typeof result.target.display_path !== 'string' || !plain(view) || !plain(view.target)
78
+ || view.target.target_id !== result.target.target_id || view.target.display_path !== result.target.display_path
79
+ || typeof view.session_id !== 'string' || !/^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/iu.test(view.session_id)
80
+ || !Number.isSafeInteger(view.render_generation) || view.render_generation < 1) invalid();
81
+ } else if (name === 'agdf_cockpit_read' && result.state === 'available' && result.target === undefined && result.code === undefined) {
82
+ // Decision-session close and preview have existing minimal shapes,
83
+ // distinct from a Cockpit reader DTO with target/snapshot fields.
84
+ const preview = result.data?.preview;
85
+ const closed = plain(result.data) && Object.keys(result.data).join() === 'closed' && result.data.closed === true;
86
+ const rendered = plain(result.data) && Object.keys(result.data).join() === 'preview' && plain(preview)
87
+ && typeof preview.resource_id === 'string' && /^[0-9a-f]{8}(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/iu.test(preview.resource_id)
88
+ && typeof preview.content === 'string' && /^sha256:[0-9a-f]{64}$/u.test(preview.content_digest)
89
+ && typeof preview.version === 'string' && preview.version.length > 0;
90
+ if (result.authorizes !== false || !closed && !rendered
91
+ || Object.keys(result).some(key => !['schema_version', 'state', 'data', 'authorizes', '_meta'].includes(key))) invalid();
92
+ } else if (result.outcome === 'rejected') { if (result.authorizes !== false || typeof result.reason !== 'string') invalid(); }
93
+ else if (!readStates.has(result.state) || !(result.code === null || typeof result.code === 'string')
94
+ || typeof result.retryable !== 'boolean' || !Object.hasOwn(result, 'data')
95
+ || !(result.target === null || plain(result.target)) || !Object.hasOwn(result, 'snapshot_id')) invalid();
96
+ } else invalid();
97
+ return result;
98
+ }
99
+
100
+ function isFailure(name, input, result) {
101
+ if (name === 'agdf_dispatch') return ['invalid_input', 'target_unresolved', 'evaluator_error'].includes(result.outcome);
102
+ if (name === 'agdf_inspect') {
103
+ if (result.outcome !== 'inspect_result') return true;
104
+ if (exactReads.has(input.operation)) return result.report.available !== true;
105
+ if (reportReads.has(input.operation)) return input.operation === 'native-qualification' && result.report.available === false;
106
+ invalid();
107
+ }
108
+ if (commandNames.has(name)) return !['accepted', 'already_applied'].includes(result.outcome);
109
+ if (result.outcome === 'rejected') return true;
110
+ // Freshness/changes legitimately report a stale snapshot. Nested run/resource
111
+ // states are never considered: only failure of this requested operation is.
112
+ if (['freshness', 'changes'].includes(input.operation) && result.state === 'stale') return false;
113
+ return ['invalid', 'missing', 'unsupported', 'blocked', 'stale', 'error'].includes(result.state);
114
+ }
115
+
116
+ export function describeToolResult(name, input, result, pack, facts) {
117
+ validateToolDomain(name, result);
118
+ const failed = isFailure(name, input, result);
119
+ const descriptor = { schema_version: '1', failed, code: null, category: null, effect_state: null, action: null, message: null, authorizes: false };
120
+ if (!failed) return descriptor;
121
+ const candidate = result.reason ?? result.code ?? result.diagnostics?.[0]?.code ?? result.report?.reason ?? result.target?.reason_code ?? result.outcome;
122
+ const code = causes.has(candidate) ? candidate : result.outcome === 'target_unresolved' ? 'target_unresolved'
123
+ : result.outcome === 'invalid_input' ? 'invalid_input' : result.report?.available === false ? 'read_unavailable' : 'unclassified_tool_failure';
124
+ const uncertain = ['effect_unknown', 'recovery_required'].includes(result.outcome);
125
+ let { action, category } = causes.get(code);
126
+ if (uncertain) { action = 'inspect_operation'; category = 'uncertain'; }
127
+ const effect = validExecutionFacts(facts) ? facts.dispatch : result.dispatch === 'not_dispatched' ? 'not_dispatched'
128
+ : commandNames.has(name) ? (uncertain ? 'unknown' : 'owner_reported') : 'owner_reported';
129
+ // A cancelled/disconnected write cannot be offered a blind retry.
130
+ if (commandNames.has(name) && effect === 'unknown') { action = 'inspect_operation'; category = 'uncertain'; }
131
+ const copy = pack?.mcpErrors;
132
+ if (!copy?.actions?.[action] || !copy?.effects?.[effect]) invalid();
133
+ const field = safeFields.has(facts?.field) ? facts.field : safeFields.has(result.diagnostics?.[0]?.field) ? result.diagnostics[0].field : null;
134
+ const ownerAction = !facts && result.outcome === 'invalid_input'
135
+ && typeof result.recovery?.action === 'string' && result.recovery.action.length <= 700
136
+ && !/[\0\x01-\x08]/u.test(result.recovery.action) ? result.recovery.action : null;
137
+ const workerDetails = validExecutionFacts(facts)
138
+ ? [facts.cause_code && `cause_code=${facts.cause_code}`, facts.worker_phase && `worker_phase=${facts.worker_phase}`].filter(Boolean) : [];
139
+ const message = `${copy.failure} ${code}${field ? ` (${field})` : ''}${workerDetails.length ? ` (${workerDetails.join(', ')})` : ''}. ${copy.effects[effect]} ${ownerAction ?? (action === causes.get(code).action ? copy.causes?.[code] : null) ?? copy.actions[action]}`;
140
+ return { ...descriptor, code, category, effect_state: effect, action, message };
141
+ }
142
+
143
+ export function validateToolDescriptor(value) {
144
+ if (!plain(value) || Object.keys(value).sort().join() !== [...fields].sort().join() || value.schema_version !== '1'
145
+ || typeof value.failed !== 'boolean' || value.authorizes !== false || textBytes(value) > 4096) invalid();
146
+ if (!value.failed) {
147
+ if (['code', 'category', 'effect_state', 'action', 'message'].some(key => value[key] !== null)) invalid();
148
+ } else if (!causes.has(value.code) || !['input', 'binding', 'permission', 'runtime', 'uncertain', 'unknown'].includes(value.category)
149
+ || !['not_dispatched', 'owner_reported', 'unknown'].includes(value.effect_state) || !Object.hasOwn(actions, value.action)
150
+ || typeof value.message !== 'string' || !value.message.trim() || value.message.length > 1200) invalid();
151
+ const expected = causes.get(value.code);
152
+ if (value.failed && !(value.action === expected.action && value.category === expected.category)
153
+ && !(value.action === 'inspect_operation' && value.category === 'uncertain' && value.effect_state === 'unknown')) invalid();
154
+ return value;
155
+ }
156
+
157
+ export function projectToolResult(name, input, result, pack, facts) {
158
+ const descriptor = validateToolDescriptor(describeToolResult(name, input, result, pack, facts));
159
+ return { ...result, _meta: { ...result._meta, [TOOL_RESULT_META]: descriptor } };
160
+ }
161
+ export function consumeToolResult(name, result) {
162
+ validateToolDomain(name, result);
163
+ const descriptor = validateToolDescriptor(result._meta?.[TOOL_RESULT_META]);
164
+ if ((!descriptor.failed && (commandNames.has(name) && !['accepted', 'already_applied'].includes(result.outcome)
165
+ || ['agdf_dispatch', 'agdf_inspect'].includes(name) && ['invalid_input', 'target_unresolved', 'evaluator_error'].includes(result.outcome)))
166
+ || descriptor.failed && (commandNames.has(name) && ['accepted', 'already_applied'].includes(result.outcome)
167
+ || name === 'agdf_dispatch' && ['control_result', 'skill_continuation', 'intake_continuation'].includes(result.outcome))) invalid();
168
+ if (['agdf_cockpit', 'agdf_cockpit_read'].includes(name) && !result.outcome
169
+ && (descriptor.failed && ['available', 'empty', 'partial'].includes(result.state)
170
+ || !descriptor.failed && ['invalid', 'missing', 'unsupported', 'blocked', 'error'].includes(result.state))) invalid();
171
+ if (name === 'agdf_inspect' && result.outcome === 'inspect_result' && exactReads.has(result.operation)
172
+ && descriptor.failed === (result.report.available === true)) invalid();
173
+ const { [TOOL_RESULT_META]: _private, ...metadata } = result._meta;
174
+ const { _meta, ...domain } = result;
175
+ return { domain, metadata, descriptor };
176
+ }
@@ -0,0 +1,87 @@
1
+ import { existsSync, lstatSync, readFileSync, realpathSync, statSync } from "node:fs";
2
+ import { dirname, isAbsolute, parse, relative, resolve, sep } from "node:path";
3
+
4
+ function isInside(root, candidate) {
5
+ const path = relative(root, candidate);
6
+ return path === "" || (path !== ".." && !path.startsWith(`..${sep}`) && !isAbsolute(path));
7
+ }
8
+
9
+ function repositoryMarker(directory) {
10
+ const marker = `${directory}${sep}.git`;
11
+ if (!existsSync(marker)) return false;
12
+ try {
13
+ const stats = lstatSync(marker);
14
+ if (stats.isSymbolicLink()) return false;
15
+ let gitDirectory;
16
+ if (stats.isDirectory()) gitDirectory = marker;
17
+ else if (stats.isFile()) {
18
+ const match = /^gitdir:\s*(.+)\s*$/u.exec(readFileSync(marker, "utf8"));
19
+ if (!match) return false;
20
+ gitDirectory = realpathSync(resolve(directory, match[1]));
21
+ const gitStats = lstatSync(gitDirectory);
22
+ if (!gitStats.isDirectory() || gitStats.isSymbolicLink()) return false;
23
+ } else return false;
24
+ const head = `${gitDirectory}${sep}HEAD`;
25
+ if (!existsSync(head)) return false;
26
+ const headStats = lstatSync(head);
27
+ if (!headStats.isFile() || headStats.isSymbolicLink()) return false;
28
+ const value = readFileSync(head, "utf8").trim();
29
+ return /^ref:\s+refs\/[A-Za-z0-9._\/-]+$/u.test(value) || /^[a-f0-9]{40}(?:[a-f0-9]{24})?$/u.test(value);
30
+ } catch {
31
+ return false;
32
+ }
33
+ }
34
+
35
+ export function resolveRepositoryContextByMarker(workingDirectory) {
36
+ const rawPath = String(workingDirectory ?? "").trim();
37
+ if (!rawPath || !isAbsolute(rawPath) || !existsSync(rawPath)) {
38
+ return Object.freeze({
39
+ context_state: "repo_less",
40
+ working_directory: rawPath || "unavailable",
41
+ repository_root: "",
42
+ reason_code: "working_directory_unavailable",
43
+ authorizes: false,
44
+ });
45
+ }
46
+ let canonicalWorkingDirectory;
47
+ try {
48
+ canonicalWorkingDirectory = realpathSync(rawPath);
49
+ if (!statSync(canonicalWorkingDirectory).isDirectory()) throw new Error("not_directory");
50
+ } catch {
51
+ return Object.freeze({
52
+ context_state: "repo_less",
53
+ working_directory: rawPath,
54
+ repository_root: "",
55
+ reason_code: "working_directory_unavailable",
56
+ authorizes: false,
57
+ });
58
+ }
59
+
60
+ const filesystemRoot = parse(canonicalWorkingDirectory).root;
61
+ let candidate = canonicalWorkingDirectory;
62
+ while (true) {
63
+ if (repositoryMarker(candidate)) {
64
+ const repositoryRoot = realpathSync(candidate);
65
+ if (isInside(repositoryRoot, canonicalWorkingDirectory)) {
66
+ return Object.freeze({
67
+ context_state: "repository_bound",
68
+ working_directory: canonicalWorkingDirectory,
69
+ repository_root: repositoryRoot,
70
+ reason_code: "verified_git_marker",
71
+ authorizes: false,
72
+ });
73
+ }
74
+ }
75
+ if (candidate === filesystemRoot) break;
76
+ const parent = dirname(candidate);
77
+ if (parent === candidate) break;
78
+ candidate = parent;
79
+ }
80
+ return Object.freeze({
81
+ context_state: "repo_less",
82
+ working_directory: canonicalWorkingDirectory,
83
+ repository_root: "",
84
+ reason_code: "not_in_git_worktree",
85
+ authorizes: false,
86
+ });
87
+ }
@@ -0,0 +1,72 @@
1
+ import { isAbsolute } from "node:path";
2
+ import { lstatKindSync } from "../control-read/fs.js";
3
+ import { containedRegularFile, hasSymlinkComponent } from "../control-state/contained-file.js";
4
+ import { resources } from "./context.js";
5
+
6
+ export const ARTEFACT_TEMPLATE_IDS = Object.freeze({
7
+ UR: "UR",
8
+ PRD: "PRD",
9
+ SD: "SD",
10
+ TP: "TP",
11
+ UX_INTENT_DEFINITION: "UX_INTENT_DEFINITION",
12
+ BROWNFIELD_REVIEW: "BROWNFIELD_REVIEW",
13
+ VERIFIED_CHANGE: "VERIFIED_CHANGE",
14
+ QA_REPORT: "QA_REPORT",
15
+ OR: "OR",
16
+ });
17
+
18
+ export const ARTEFACT_TEMPLATE_ERROR_CODES = Object.freeze([
19
+ "AGDF_ARTEFACT_TEMPLATE_UNSUPPORTED",
20
+ "AGDF_ARTEFACT_TEMPLATE_ROOT_UNAVAILABLE",
21
+ "AGDF_ARTEFACT_TEMPLATE_UNAVAILABLE",
22
+ "AGDF_ARTEFACT_TEMPLATE_UNSAFE",
23
+ ]);
24
+
25
+ const TEMPLATE_FILES = Object.freeze({
26
+ [ARTEFACT_TEMPLATE_IDS.UR]: "UR.md",
27
+ [ARTEFACT_TEMPLATE_IDS.PRD]: "PRD.md",
28
+ [ARTEFACT_TEMPLATE_IDS.SD]: "SD.md",
29
+ [ARTEFACT_TEMPLATE_IDS.TP]: "TP.md",
30
+ [ARTEFACT_TEMPLATE_IDS.UX_INTENT_DEFINITION]: "UX_INTENT_DEFINITION.md",
31
+ [ARTEFACT_TEMPLATE_IDS.BROWNFIELD_REVIEW]: "BROWNFIELD_REVIEW.md",
32
+ [ARTEFACT_TEMPLATE_IDS.VERIFIED_CHANGE]: "VERIFIED_CHANGE.md",
33
+ [ARTEFACT_TEMPLATE_IDS.QA_REPORT]: "QA_REPORT.md",
34
+ [ARTEFACT_TEMPLATE_IDS.OR]: "OR.md",
35
+ });
36
+
37
+ function templateError(code) {
38
+ return Object.assign(new Error(code), { code });
39
+ }
40
+
41
+ function rootKind(root) {
42
+ try {
43
+ return lstatKindSync(root);
44
+ } catch (error) {
45
+ if (error.code === "ENOENT") throw templateError("AGDF_ARTEFACT_TEMPLATE_ROOT_UNAVAILABLE");
46
+ throw templateError("AGDF_ARTEFACT_TEMPLATE_UNSAFE");
47
+ }
48
+ }
49
+
50
+ // The root itself must be a real directory and no component below it may be a link;
51
+ // ancestors are outside the plugin's ownership and are covered by realpath containment.
52
+ export function resolveArtefactTemplatePath(templateId, context = resources) {
53
+ if (!Object.hasOwn(TEMPLATE_FILES, templateId)) {
54
+ throw templateError("AGDF_ARTEFACT_TEMPLATE_UNSUPPORTED");
55
+ }
56
+ const filename = TEMPLATE_FILES[templateId];
57
+ const root = context?.templatesRoot;
58
+ if (root === null || root === undefined || root === "") {
59
+ throw templateError("AGDF_ARTEFACT_TEMPLATE_ROOT_UNAVAILABLE");
60
+ }
61
+ if (typeof root !== "string" || !isAbsolute(root) || rootKind(root) !== "directory") {
62
+ throw templateError("AGDF_ARTEFACT_TEMPLATE_UNSAFE");
63
+ }
64
+ const relativePath = `artefacts/${filename}`;
65
+ if (hasSymlinkComponent(root, relativePath)) {
66
+ throw templateError("AGDF_ARTEFACT_TEMPLATE_UNSAFE");
67
+ }
68
+ const result = containedRegularFile(root, relativePath);
69
+ if (result.status === "valid") return result.path;
70
+ if (result.status === "missing") throw templateError("AGDF_ARTEFACT_TEMPLATE_UNAVAILABLE");
71
+ throw templateError("AGDF_ARTEFACT_TEMPLATE_UNSAFE");
72
+ }
@@ -0,0 +1,26 @@
1
+ // Generated resource binding; canonical Core implementation bytes are copied unchanged.
2
+ import { existsSync, readFileSync } from "node:fs";
3
+ import { isAbsolute, join, sep } from "node:path";
4
+ import process from "node:process";
5
+ import { fileURLToPath, pathToFileURL } from "node:url";
6
+ export const packageURL = new URL("../../../../", import.meta.url);
7
+ export const generatedURL = new URL("generated/", packageURL);
8
+ function readVersion(path) {
9
+ try { return JSON.parse(readFileSync(path, "utf8")).version ?? null; } catch { return null; }
10
+ }
11
+ function directoryURL(path) {
12
+ return existsSync(path) ? pathToFileURL(`${path}${sep}`) : null;
13
+ }
14
+ // Only an absolute, exact-version-matched plugin root overlays the package-shipped resources.
15
+ function trustedPluginRoot() {
16
+ const root = process.env.AGDF_DISPATCH_PLUGIN_ROOT;
17
+ if (!root || !isAbsolute(root)) return null;
18
+ const packageVersion = readVersion(fileURLToPath(new URL("package.json", packageURL)));
19
+ return packageVersion !== null && readVersion(join(root, "runtime", "runtime-manifest.json")) === packageVersion ? root : null;
20
+ }
21
+ const pluginRoot = trustedPluginRoot();
22
+ export const contractsURL = new URL("plugins/agdf/meta/contracts/", generatedURL);
23
+ export const templatesURL = (pluginRoot ? directoryURL(join(pluginRoot, "control", "templates")) : null)
24
+ ?? directoryURL(fileURLToPath(new URL("../../control/templates/", packageURL)))
25
+ ?? directoryURL(fileURLToPath(new URL("plugins/agdf/control/templates/", generatedURL)))
26
+ ?? null;
@@ -0,0 +1,70 @@
1
+ import { existsSync, readFileSync } from "../control-read/fs.js";
2
+ import { join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ import { canonicalizeLanguageTag, resolvePresentationLocale } from "../interaction-presentation.js";
5
+ import { validateInteractionCatalog } from "../interaction-catalog-validation.js";
6
+ import { packageURL, generatedURL, contractsURL, templatesURL } from "./binding.js";
7
+
8
+ function freeze(value) {
9
+ if (value && typeof value === "object") { for (const entry of Object.values(value)) freeze(entry); Object.freeze(value); }
10
+ return value;
11
+ }
12
+ export function createResourceContext({ packageURL, generatedURL, contractsURL, templatesURL, expectedVersion } = {}) {
13
+ if (![packageURL, generatedURL, contractsURL].every(value => value instanceof URL && value.protocol === "file:")
14
+ || (templatesURL !== null && templatesURL !== undefined
15
+ && (!(templatesURL instanceof URL) || templatesURL.protocol !== "file:"))) throw new Error("runtime_resources_unavailable");
16
+ const packageRoot = fileURLToPath(packageURL), generatedRoot = fileURLToPath(generatedURL);
17
+ expectedVersion ??= JSON.parse(readFileSync(new URL("package.json", packageURL), "utf8")).version;
18
+ const pluginDefinition = JSON.parse(readFileSync(new URL("plugins/agdf/meta/agdf-plugin.definition.json", generatedURL), "utf8"));
19
+ const interactionLocales = JSON.parse(readFileSync(new URL("plugins/agdf/meta/agdf-interaction-locales.json", generatedURL), "utf8"));
20
+ if (typeof expectedVersion !== "string" || !/^\d+\.\d+\.\d+(?:[-+][0-9A-Za-z.-]+)?$/u.test(expectedVersion) || pluginDefinition.version !== expectedVersion
21
+ || !Array.isArray(pluginDefinition.runtimeContract?.modules) || !pluginDefinition.runtimeContract.modules.length
22
+ || new Set(pluginDefinition.runtimeContract.modules).size !== pluginDefinition.runtimeContract.modules.length
23
+ || pluginDefinition.runtimeContract.modules.some(path => !/^meta\/contracts\/[a-z0-9-]+\.md$/u.test(path))
24
+ || !Array.isArray(pluginDefinition.skillSet) || !interactionLocales.locales?.[interactionLocales.fallbackLocale]) throw new Error("runtime_resources_unavailable");
25
+ validateInteractionCatalog(interactionLocales);
26
+ return freeze({
27
+ packageRoot,
28
+ generatedRoot,
29
+ contractsRoot: fileURLToPath(contractsURL),
30
+ templatesRoot: templatesURL instanceof URL ? fileURLToPath(templatesURL) : null,
31
+ pluginDefinition,
32
+ interactionLocales,
33
+ });
34
+ }
35
+ export const resources = createResourceContext({ packageURL, generatedURL, contractsURL, templatesURL });
36
+ export const { packageRoot, generatedRoot, pluginDefinition, interactionLocales } = resources;
37
+ export function configuredLanguage(value, context = resources) {
38
+ const normalized = canonicalizeLanguageTag(value);
39
+ if (!normalized) return "";
40
+ const language = normalized.split("-")[0];
41
+ if (context.interactionLocales.locales[normalized] || context.interactionLocales.locales[language]) return resolvePresentationLocale(context.interactionLocales, normalized);
42
+ return normalized;
43
+ }
44
+ export function resolveConfiguredChatLanguage(targetDir, context = resources) {
45
+ const configPath = join(targetDir, ".agdf", "control", "config.json");
46
+ if (!existsSync(configPath)) return context.interactionLocales.fallbackLocale;
47
+ try { return resolvePresentationLocale(context.interactionLocales, JSON.parse(readFileSync(configPath, "utf8")).chat_language); }
48
+ catch { return context.interactionLocales.fallbackLocale; }
49
+ }
50
+ // Missing or invalid config means English artefacts.
51
+ export function resolveConfiguredArtifactLanguage(targetDir) {
52
+ try { return canonicalizeLanguageTag(JSON.parse(readFileSync(join(targetDir, ".agdf", "control", "config.json"), "utf8")).artifact_language).split("-")[0] || "en"; }
53
+ catch { return "en"; }
54
+ }
55
+
56
+ // Shared by artefact authoring and approval rendering; the selected locale may override
57
+ // the configured chat default, but never changes the persisted artefact language.
58
+ export function resolveArtifactPresentationLanguages(targetDir, requestedLanguage, context = resources) {
59
+ const artifactLanguage = resolveConfiguredArtifactLanguage(targetDir);
60
+ const presentationLanguage = requestedLanguage
61
+ ? resolvePresentationLocale(context.interactionLocales, requestedLanguage)
62
+ : resolveConfiguredChatLanguage(targetDir, context);
63
+ const required = artifactLanguage !== presentationLanguage.split("-")[0];
64
+ return Object.freeze({
65
+ artifact_language: artifactLanguage,
66
+ presentation_language: presentationLanguage,
67
+ approval_summary_required: required,
68
+ approval_summary_heading: required ? `AGDF Approval Summary (${presentationLanguage}; source=${artifactLanguage})` : null,
69
+ });
70
+ }
@@ -0,0 +1,23 @@
1
+ import { readFileSync } from "node:fs";
2
+ import { join, basename } from "node:path";
3
+ import { createHash } from "node:crypto";
4
+ import { resources } from "./context.js";
5
+ export function runtimeContractModules(definition = resources.pluginDefinition) {
6
+ return definition.runtimeContract.modules.map(path => basename(path, ".md"));
7
+ }
8
+ export function readRuntimeContract(module, { context = resources } = {}) {
9
+ const modules = runtimeContractModules(context.pluginDefinition);
10
+ if (!modules.includes(module)) return Object.freeze({ ok: false, reason: "module_unknown", modules });
11
+ const path = join(context.contractsRoot, `${module}.md`);
12
+ try { return Object.freeze({ ok: true, module, path, content: readFileSync(path, "utf8") }); }
13
+ catch { return Object.freeze({ ok: false, reason: "module_unavailable", modules }); }
14
+ }
15
+ export function readSkillRuntimeContracts(skillId, { context = resources } = {}) {
16
+ const modules = context.pluginDefinition.skillSet.find(skill => skill.slug === skillId)?.runtimeContractModules;
17
+ if (!Array.isArray(modules) || !modules.length || new Set(modules).size !== modules.length) throw new Error("runtime_contracts_unavailable");
18
+ return Object.freeze(modules.map(module => {
19
+ const result = readRuntimeContract(module, { context });
20
+ if (!result.ok || !result.content.trim()) throw new Error("runtime_contracts_unavailable");
21
+ return Object.freeze({ module, content: result.content, sha256: createHash("sha256").update(result.content).digest("hex") });
22
+ }));
23
+ }
@@ -0,0 +1,173 @@
1
+ import { createHash } from "node:crypto";
2
+
3
+ const SHA256 = /^[a-f0-9]{64}$/;
4
+ const RELEASE_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/;
5
+ const TOP_LEVEL_KEYS = ["contracts", "releases", "schema_version"];
6
+ const CONTRACT_KEYS = ["contract_digest", "distribution_profiles"];
7
+ const RELEASE_KEYS = ["contract_id", "entry_digest", "profile_id", "provenance_schema_version", "status"];
8
+
9
+ function canonicalize(value) {
10
+ if (Array.isArray(value)) return value.map(canonicalize);
11
+ if (value && typeof value === "object") {
12
+ return Object.fromEntries(
13
+ Object.keys(value).sort().map((key) => [key, canonicalize(value[key])]),
14
+ );
15
+ }
16
+ return value;
17
+ }
18
+
19
+ function canonicalJson(value) {
20
+ return JSON.stringify(canonicalize(value));
21
+ }
22
+
23
+ function digest(value) {
24
+ return createHash("sha256").update(canonicalJson(value)).digest("hex");
25
+ }
26
+
27
+ function exactKeys(value, expected) {
28
+ return value && typeof value === "object" && !Array.isArray(value)
29
+ && JSON.stringify(Object.keys(value).sort()) === JSON.stringify(expected);
30
+ }
31
+
32
+ function sortedKeys(value) {
33
+ const keys = Object.keys(value);
34
+ return JSON.stringify(keys) === JSON.stringify([...keys].sort());
35
+ }
36
+
37
+ function invalid(reason) {
38
+ return { status: "invalid", reason };
39
+ }
40
+
41
+ export function canonicalDistributionProfileDigest(distributionProfiles) {
42
+ return digest(distributionProfiles);
43
+ }
44
+
45
+ export function canonicalDistributionProfileEntryDigest({
46
+ version,
47
+ contract_id,
48
+ contract_digest,
49
+ provenance_schema_version = 1,
50
+ profile_id = "runtime-plugin",
51
+ status = "supported",
52
+ }) {
53
+ return digest({
54
+ version,
55
+ contract_id,
56
+ contract_digest,
57
+ provenance_schema_version,
58
+ profile_id,
59
+ status,
60
+ });
61
+ }
62
+
63
+ export function validateDistributionProfileHistory(catalogue) {
64
+ if (!exactKeys(catalogue, TOP_LEVEL_KEYS)
65
+ || catalogue.schema_version !== 1
66
+ || !catalogue.contracts || typeof catalogue.contracts !== "object" || Array.isArray(catalogue.contracts)
67
+ || !catalogue.releases || typeof catalogue.releases !== "object" || Array.isArray(catalogue.releases)
68
+ || !sortedKeys(catalogue.contracts)
69
+ || !sortedKeys(catalogue.releases)
70
+ || Object.keys(catalogue.contracts).length === 0
71
+ || Object.keys(catalogue.releases).length === 0) {
72
+ return invalid("profile_history_invalid");
73
+ }
74
+
75
+ const contractDigests = new Set();
76
+ for (const contract of Object.values(catalogue.contracts)) {
77
+ if (!exactKeys(contract, CONTRACT_KEYS)
78
+ || !contract.distribution_profiles
79
+ || typeof contract.distribution_profiles !== "object"
80
+ || Array.isArray(contract.distribution_profiles)
81
+ || !SHA256.test(contract.contract_digest ?? "")
82
+ || canonicalDistributionProfileDigest(contract.distribution_profiles) !== contract.contract_digest) {
83
+ return invalid("profile_history_invalid");
84
+ }
85
+ if (contractDigests.has(contract.contract_digest)) return invalid("profile_history_invalid");
86
+ contractDigests.add(contract.contract_digest);
87
+ }
88
+
89
+ const referencedContracts = new Set();
90
+ for (const [version, release] of Object.entries(catalogue.releases)) {
91
+ const contract = catalogue.contracts[release?.contract_id];
92
+ if (!RELEASE_VERSION.test(version)
93
+ || !exactKeys(release, RELEASE_KEYS)
94
+ || !contract
95
+ || release.provenance_schema_version !== 1
96
+ || release.profile_id !== "runtime-plugin"
97
+ || release.status !== "supported"
98
+ || !SHA256.test(release.entry_digest ?? "")) {
99
+ return invalid("profile_history_invalid");
100
+ }
101
+ referencedContracts.add(release.contract_id);
102
+ const expectedDigest = canonicalDistributionProfileEntryDigest({
103
+ version,
104
+ contract_id: release.contract_id,
105
+ contract_digest: contract.contract_digest,
106
+ provenance_schema_version: release.provenance_schema_version,
107
+ profile_id: release.profile_id,
108
+ status: release.status,
109
+ });
110
+ if (release.entry_digest !== expectedDigest) return invalid("profile_history_invalid");
111
+ }
112
+ if (referencedContracts.size !== Object.keys(catalogue.contracts).length) {
113
+ return invalid("profile_history_invalid");
114
+ }
115
+
116
+ return { status: "matched", reason: "profile_history_valid" };
117
+ }
118
+
119
+ export function classifyHistoricalDistributionProfile({ catalogue, version, distributionProfiles }) {
120
+ const validation = validateDistributionProfileHistory(catalogue);
121
+ if (validation.status !== "matched") {
122
+ return {
123
+ status: "invalid",
124
+ reason: "profile_history_invalid",
125
+ release_version: null,
126
+ contract_id: null,
127
+ contract_digest: null,
128
+ entry_digest: null,
129
+ };
130
+ }
131
+ const release = Object.hasOwn(catalogue.releases, version) ? catalogue.releases[version] : null;
132
+ if (!release) {
133
+ return {
134
+ status: "unsupported",
135
+ reason: "historical_contract_unsupported",
136
+ release_version: null,
137
+ contract_id: null,
138
+ contract_digest: null,
139
+ entry_digest: null,
140
+ };
141
+ }
142
+ const contract = catalogue.contracts[release.contract_id];
143
+ if (!distributionProfiles || typeof distributionProfiles !== "object" || Array.isArray(distributionProfiles)) {
144
+ return {
145
+ status: "invalid",
146
+ reason: "historical_contract_invalid",
147
+ release_version: version,
148
+ contract_id: release.contract_id,
149
+ contract_digest: contract.contract_digest,
150
+ entry_digest: release.entry_digest,
151
+ };
152
+ }
153
+ const observedDigest = canonicalDistributionProfileDigest(distributionProfiles);
154
+ if (observedDigest !== contract.contract_digest
155
+ || canonicalJson(distributionProfiles) !== canonicalJson(contract.distribution_profiles)) {
156
+ return {
157
+ status: "invalid",
158
+ reason: "historical_contract_invalid",
159
+ release_version: version,
160
+ contract_id: release.contract_id,
161
+ contract_digest: contract.contract_digest,
162
+ entry_digest: release.entry_digest,
163
+ };
164
+ }
165
+ return {
166
+ status: "matched",
167
+ reason: "historical_contract_matched",
168
+ release_version: version,
169
+ contract_id: release.contract_id,
170
+ contract_digest: contract.contract_digest,
171
+ entry_digest: release.entry_digest,
172
+ };
173
+ }