@deftai/directive-runtime 0.129.4 → 0.129.6

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 (303) hide show
  1. package/Taskfile.yml +235 -0
  2. package/UPGRADING.md +1 -0
  3. package/contracts/design-critique.md +1 -1
  4. package/contracts/path-write-fence.md +6 -0
  5. package/dist/applying-host-release.d.ts +16 -0
  6. package/dist/applying-host-release.js +98 -0
  7. package/dist/authz.d.ts +1 -1
  8. package/dist/authz.js +1 -1
  9. package/dist/check.d.ts +1 -0
  10. package/dist/check.js +27 -4
  11. package/dist/design-critique-ensure-arc-dest.d.ts +16 -0
  12. package/dist/design-critique-ensure-arc-dest.js +168 -0
  13. package/dist/dispatch.d.ts +1 -1
  14. package/dist/dispatch.js +8 -0
  15. package/dist/hook-dispatch.js +11 -5
  16. package/dist/human-presence-mint.d.ts +6 -1
  17. package/dist/human-presence-mint.js +20 -6
  18. package/dist/pre-pr-run.d.ts +7 -1
  19. package/dist/pre-pr-run.js +25 -1
  20. package/dist/session-start.js +40 -6
  21. package/dist/setup-wiring.d.ts +36 -0
  22. package/dist/setup-wiring.js +169 -14
  23. package/dist/verify-ac.d.ts +7 -2
  24. package/dist/verify-ac.js +13 -5
  25. package/dist/verify-source-cli/verify-deposit-closure.js +5 -5
  26. package/dist/windows-bin-ps1.d.ts +2 -2
  27. package/dist/windows-bin-ps1.js +5 -11
  28. package/docs/deft-directive-disable.md +3 -3
  29. package/docs/scope-provenance.md +4 -0
  30. package/package.json +2 -3
  31. package/packs/lessons/lessons-pack-0.1.json +15 -0
  32. package/packs/skills/skills-pack-0.1.json +2 -2
  33. package/skills/deft-directive-design-critique/SKILL.md +1 -1
  34. package/skills/deft-directive-release/SKILL.md +54 -1
  35. package/tasks/materialize.cjs +106 -5
  36. package/tasks/materialize.test.cjs +108 -0
  37. package/tasks/materialize.yml +14 -2
  38. package/vendor/directive-content/Taskfile.yml +235 -0
  39. package/vendor/directive-content/UPGRADING.md +1 -0
  40. package/vendor/directive-content/contracts/design-critique.md +1 -1
  41. package/vendor/directive-content/contracts/path-write-fence.md +6 -0
  42. package/vendor/directive-content/docs/deft-directive-disable.md +3 -3
  43. package/vendor/directive-content/docs/scope-provenance.md +4 -0
  44. package/vendor/directive-content/packs/lessons/lessons-pack-0.1.json +15 -0
  45. package/vendor/directive-content/packs/skills/skills-pack-0.1.json +2 -2
  46. package/vendor/directive-content/skills/deft-directive-design-critique/SKILL.md +1 -1
  47. package/vendor/directive-content/skills/deft-directive-release/SKILL.md +54 -1
  48. package/vendor/directive-content/tasks/materialize.cjs +106 -5
  49. package/vendor/directive-content/tasks/materialize.test.cjs +108 -0
  50. package/vendor/directive-content/tasks/materialize.yml +14 -2
  51. package/vendor/directive-core/dist/.tsbuildinfo +1 -1
  52. package/vendor/directive-core/dist/authz/classify.d.ts +18 -0
  53. package/vendor/directive-core/dist/authz/classify.d.ts.map +1 -1
  54. package/vendor/directive-core/dist/authz/classify.js +196 -14
  55. package/vendor/directive-core/dist/authz/classify.js.map +1 -1
  56. package/vendor/directive-core/dist/authz/evaluate.d.ts +5 -0
  57. package/vendor/directive-core/dist/authz/evaluate.d.ts.map +1 -1
  58. package/vendor/directive-core/dist/authz/evaluate.js +15 -5
  59. package/vendor/directive-core/dist/authz/evaluate.js.map +1 -1
  60. package/vendor/directive-core/dist/authz/templates.d.ts +2 -2
  61. package/vendor/directive-core/dist/authz/templates.d.ts.map +1 -1
  62. package/vendor/directive-core/dist/authz/templates.js +1 -0
  63. package/vendor/directive-core/dist/authz/templates.js.map +1 -1
  64. package/vendor/directive-core/dist/authz/types.d.ts +1 -1
  65. package/vendor/directive-core/dist/authz/types.d.ts.map +1 -1
  66. package/vendor/directive-core/dist/authz/types.js +2 -0
  67. package/vendor/directive-core/dist/authz/types.js.map +1 -1
  68. package/vendor/directive-core/dist/authz/verb-classification.d.ts.map +1 -1
  69. package/vendor/directive-core/dist/authz/verb-classification.js +30 -3
  70. package/vendor/directive-core/dist/authz/verb-classification.js.map +1 -1
  71. package/vendor/directive-core/dist/cache/fetch.d.ts.map +1 -1
  72. package/vendor/directive-core/dist/cache/fetch.js +50 -4
  73. package/vendor/directive-core/dist/cache/fetch.js.map +1 -1
  74. package/vendor/directive-core/dist/check/cached-orchestrator.d.ts.map +1 -1
  75. package/vendor/directive-core/dist/check/cached-orchestrator.js +101 -2
  76. package/vendor/directive-core/dist/check/cached-orchestrator.js.map +1 -1
  77. package/vendor/directive-core/dist/check/context.d.ts +199 -0
  78. package/vendor/directive-core/dist/check/context.d.ts.map +1 -1
  79. package/vendor/directive-core/dist/check/context.js +417 -2
  80. package/vendor/directive-core/dist/check/context.js.map +1 -1
  81. package/vendor/directive-core/dist/check/gate-lists.d.ts +42 -0
  82. package/vendor/directive-core/dist/check/gate-lists.d.ts.map +1 -1
  83. package/vendor/directive-core/dist/check/gate-lists.js +226 -0
  84. package/vendor/directive-core/dist/check/gate-lists.js.map +1 -1
  85. package/vendor/directive-core/dist/check/index.d.ts +1 -0
  86. package/vendor/directive-core/dist/check/index.d.ts.map +1 -1
  87. package/vendor/directive-core/dist/check/index.js +1 -0
  88. package/vendor/directive-core/dist/check/index.js.map +1 -1
  89. package/vendor/directive-core/dist/check/named-cause.d.ts.map +1 -1
  90. package/vendor/directive-core/dist/check/named-cause.js +1 -0
  91. package/vendor/directive-core/dist/check/named-cause.js.map +1 -1
  92. package/vendor/directive-core/dist/check/orchestrator.d.ts +1 -0
  93. package/vendor/directive-core/dist/check/orchestrator.d.ts.map +1 -1
  94. package/vendor/directive-core/dist/check/orchestrator.js +69 -4
  95. package/vendor/directive-core/dist/check/orchestrator.js.map +1 -1
  96. package/vendor/directive-core/dist/design-critique/arc-dest.d.ts +22 -5
  97. package/vendor/directive-core/dist/design-critique/arc-dest.d.ts.map +1 -1
  98. package/vendor/directive-core/dist/design-critique/arc-dest.js +61 -0
  99. package/vendor/directive-core/dist/design-critique/arc-dest.js.map +1 -1
  100. package/vendor/directive-core/dist/design-critique/run-posture.d.ts +7 -2
  101. package/vendor/directive-core/dist/design-critique/run-posture.d.ts.map +1 -1
  102. package/vendor/directive-core/dist/design-critique/run-posture.js +6 -1
  103. package/vendor/directive-core/dist/design-critique/run-posture.js.map +1 -1
  104. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.d.ts +7 -0
  105. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.d.ts.map +1 -1
  106. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.js +42 -0
  107. package/vendor/directive-core/dist/finish-loop/pr-finish-loop.js.map +1 -1
  108. package/vendor/directive-core/dist/hooks/classify/host-session-identity.d.ts +15 -2
  109. package/vendor/directive-core/dist/hooks/classify/host-session-identity.d.ts.map +1 -1
  110. package/vendor/directive-core/dist/hooks/classify/host-session-identity.js +46 -5
  111. package/vendor/directive-core/dist/hooks/classify/host-session-identity.js.map +1 -1
  112. package/vendor/directive-core/dist/hooks/dispatcher.d.ts.map +1 -1
  113. package/vendor/directive-core/dist/hooks/dispatcher.js +235 -22
  114. package/vendor/directive-core/dist/hooks/dispatcher.js.map +1 -1
  115. package/vendor/directive-core/dist/hooks/scope.d.ts +38 -9
  116. package/vendor/directive-core/dist/hooks/scope.d.ts.map +1 -1
  117. package/vendor/directive-core/dist/hooks/scope.js +102 -16
  118. package/vendor/directive-core/dist/hooks/scope.js.map +1 -1
  119. package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts +5 -0
  120. package/vendor/directive-core/dist/hooks/shell-write-targets.d.ts.map +1 -1
  121. package/vendor/directive-core/dist/hooks/shell-write-targets.js +18 -1
  122. package/vendor/directive-core/dist/hooks/shell-write-targets.js.map +1 -1
  123. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts +5 -0
  124. package/vendor/directive-core/dist/init-deposit/host-hook-outer.d.ts.map +1 -1
  125. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js +22 -9
  126. package/vendor/directive-core/dist/init-deposit/host-hook-outer.js.map +1 -1
  127. package/vendor/directive-core/dist/init-deposit/scaffold.d.ts +8 -1
  128. package/vendor/directive-core/dist/init-deposit/scaffold.d.ts.map +1 -1
  129. package/vendor/directive-core/dist/init-deposit/scaffold.js +38 -4
  130. package/vendor/directive-core/dist/init-deposit/scaffold.js.map +1 -1
  131. package/vendor/directive-core/dist/install-health/cheap.d.ts +13 -1
  132. package/vendor/directive-core/dist/install-health/cheap.d.ts.map +1 -1
  133. package/vendor/directive-core/dist/install-health/cheap.js +39 -4
  134. package/vendor/directive-core/dist/install-health/cheap.js.map +1 -1
  135. package/vendor/directive-core/dist/install-health/constants.d.ts +18 -2
  136. package/vendor/directive-core/dist/install-health/constants.d.ts.map +1 -1
  137. package/vendor/directive-core/dist/install-health/constants.js +18 -2
  138. package/vendor/directive-core/dist/install-health/constants.js.map +1 -1
  139. package/vendor/directive-core/dist/install-health/index.d.ts +1 -1
  140. package/vendor/directive-core/dist/install-health/index.d.ts.map +1 -1
  141. package/vendor/directive-core/dist/install-health/index.js +1 -1
  142. package/vendor/directive-core/dist/install-health/index.js.map +1 -1
  143. package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts +42 -5
  144. package/vendor/directive-core/dist/policy/deft-directive-disable.d.ts.map +1 -1
  145. package/vendor/directive-core/dist/policy/deft-directive-disable.js +71 -41
  146. package/vendor/directive-core/dist/policy/deft-directive-disable.js.map +1 -1
  147. package/vendor/directive-core/dist/policy/write-fence.d.ts +7 -0
  148. package/vendor/directive-core/dist/policy/write-fence.d.ts.map +1 -1
  149. package/vendor/directive-core/dist/policy/write-fence.js +81 -14
  150. package/vendor/directive-core/dist/policy/write-fence.js.map +1 -1
  151. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts +6 -1
  152. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.d.ts.map +1 -1
  153. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js +24 -12
  154. package/vendor/directive-core/dist/pr-closeout-attestable/evaluate.js.map +1 -1
  155. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts +68 -14
  156. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.d.ts.map +1 -1
  157. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js +278 -47
  158. package/vendor/directive-core/dist/pr-closeout-attestable/pr-head-assert.js.map +1 -1
  159. package/vendor/directive-core/dist/pr-closing-keywords/main.d.ts +19 -0
  160. package/vendor/directive-core/dist/pr-closing-keywords/main.d.ts.map +1 -1
  161. package/vendor/directive-core/dist/pr-closing-keywords/main.js +31 -16
  162. package/vendor/directive-core/dist/pr-closing-keywords/main.js.map +1 -1
  163. package/vendor/directive-core/dist/pr-merge-readiness/compute.d.ts +8 -0
  164. package/vendor/directive-core/dist/pr-merge-readiness/compute.d.ts.map +1 -1
  165. package/vendor/directive-core/dist/pr-merge-readiness/compute.js +54 -2
  166. package/vendor/directive-core/dist/pr-merge-readiness/compute.js.map +1 -1
  167. package/vendor/directive-core/dist/pr-merge-readiness/gh.d.ts +7 -0
  168. package/vendor/directive-core/dist/pr-merge-readiness/gh.d.ts.map +1 -1
  169. package/vendor/directive-core/dist/pr-merge-readiness/gh.js +180 -49
  170. package/vendor/directive-core/dist/pr-merge-readiness/gh.js.map +1 -1
  171. package/vendor/directive-core/dist/pr-merge-readiness/main.d.ts +2 -0
  172. package/vendor/directive-core/dist/pr-merge-readiness/main.d.ts.map +1 -1
  173. package/vendor/directive-core/dist/pr-merge-readiness/main.js +1 -0
  174. package/vendor/directive-core/dist/pr-merge-readiness/main.js.map +1 -1
  175. package/vendor/directive-core/dist/pr-monitor/monitor.d.ts.map +1 -1
  176. package/vendor/directive-core/dist/pr-monitor/monitor.js +1 -0
  177. package/vendor/directive-core/dist/pr-monitor/monitor.js.map +1 -1
  178. package/vendor/directive-core/dist/pr-monitor/readiness.d.ts.map +1 -1
  179. package/vendor/directive-core/dist/pr-monitor/readiness.js +1 -0
  180. package/vendor/directive-core/dist/pr-monitor/readiness.js.map +1 -1
  181. package/vendor/directive-core/dist/pr-monitor/types.d.ts +2 -0
  182. package/vendor/directive-core/dist/pr-monitor/types.d.ts.map +1 -1
  183. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.d.ts +6 -0
  184. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.d.ts.map +1 -1
  185. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.js +27 -0
  186. package/vendor/directive-core/dist/pr-wait-mergeable/cascade.js.map +1 -1
  187. package/vendor/directive-core/dist/pr-wait-mergeable/constants.d.ts +15 -0
  188. package/vendor/directive-core/dist/pr-wait-mergeable/constants.d.ts.map +1 -1
  189. package/vendor/directive-core/dist/pr-wait-mergeable/constants.js +18 -0
  190. package/vendor/directive-core/dist/pr-wait-mergeable/constants.js.map +1 -1
  191. package/vendor/directive-core/dist/pr-wait-mergeable/index.d.ts +2 -1
  192. package/vendor/directive-core/dist/pr-wait-mergeable/index.d.ts.map +1 -1
  193. package/vendor/directive-core/dist/pr-wait-mergeable/index.js +2 -1
  194. package/vendor/directive-core/dist/pr-wait-mergeable/index.js.map +1 -1
  195. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.d.ts +81 -0
  196. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.d.ts.map +1 -1
  197. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.js +687 -3
  198. package/vendor/directive-core/dist/pr-wait-mergeable/semantic-green.js.map +1 -1
  199. package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts +59 -1
  200. package/vendor/directive-core/dist/pre-pr-controller/controller.d.ts.map +1 -1
  201. package/vendor/directive-core/dist/pre-pr-controller/controller.js +155 -2
  202. package/vendor/directive-core/dist/pre-pr-controller/controller.js.map +1 -1
  203. package/vendor/directive-core/dist/pre-pr-controller/index.d.ts +1 -1
  204. package/vendor/directive-core/dist/pre-pr-controller/index.d.ts.map +1 -1
  205. package/vendor/directive-core/dist/pre-pr-controller/index.js +1 -1
  206. package/vendor/directive-core/dist/pre-pr-controller/index.js.map +1 -1
  207. package/vendor/directive-core/dist/pre-pr-controller/phases.d.ts +7 -0
  208. package/vendor/directive-core/dist/pre-pr-controller/phases.d.ts.map +1 -1
  209. package/vendor/directive-core/dist/pre-pr-controller/phases.js +11 -0
  210. package/vendor/directive-core/dist/pre-pr-controller/phases.js.map +1 -1
  211. package/vendor/directive-core/dist/pre-pr-controller/types.d.ts +1 -1
  212. package/vendor/directive-core/dist/pre-pr-controller/types.d.ts.map +1 -1
  213. package/vendor/directive-core/dist/pre-pr-controller/types.js.map +1 -1
  214. package/vendor/directive-core/dist/preflight-gh/pre-push.d.ts.map +1 -1
  215. package/vendor/directive-core/dist/preflight-gh/pre-push.js +58 -2
  216. package/vendor/directive-core/dist/preflight-gh/pre-push.js.map +1 -1
  217. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.d.ts +1 -1
  218. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.d.ts.map +1 -1
  219. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.js +1 -1
  220. package/vendor/directive-core/dist/product-first-done-gate/acceptance-resolver.js.map +1 -1
  221. package/vendor/directive-core/dist/product-first-done-gate/index.d.ts +1 -1
  222. package/vendor/directive-core/dist/product-first-done-gate/index.d.ts.map +1 -1
  223. package/vendor/directive-core/dist/product-first-done-gate/index.js +1 -1
  224. package/vendor/directive-core/dist/product-first-done-gate/index.js.map +1 -1
  225. package/vendor/directive-core/dist/release/gh.d.ts.map +1 -1
  226. package/vendor/directive-core/dist/release/gh.js +2 -1
  227. package/vendor/directive-core/dist/release/gh.js.map +1 -1
  228. package/vendor/directive-core/dist/release/pipeline.d.ts.map +1 -1
  229. package/vendor/directive-core/dist/release/pipeline.js +13 -1
  230. package/vendor/directive-core/dist/release/pipeline.js.map +1 -1
  231. package/vendor/directive-core/dist/release/preflight.d.ts +11 -0
  232. package/vendor/directive-core/dist/release/preflight.d.ts.map +1 -1
  233. package/vendor/directive-core/dist/release/preflight.js +65 -0
  234. package/vendor/directive-core/dist/release/preflight.js.map +1 -1
  235. package/vendor/directive-core/dist/release/types.d.ts +4 -0
  236. package/vendor/directive-core/dist/release/types.d.ts.map +1 -1
  237. package/vendor/directive-core/dist/release/version.d.ts +4 -2
  238. package/vendor/directive-core/dist/release/version.d.ts.map +1 -1
  239. package/vendor/directive-core/dist/release/version.js +4 -2
  240. package/vendor/directive-core/dist/release/version.js.map +1 -1
  241. package/vendor/directive-core/dist/release-publish/gh-api.d.ts.map +1 -1
  242. package/vendor/directive-core/dist/release-publish/gh-api.js +4 -2
  243. package/vendor/directive-core/dist/release-publish/gh-api.js.map +1 -1
  244. package/vendor/directive-core/dist/release-publish/main.d.ts.map +1 -1
  245. package/vendor/directive-core/dist/release-publish/main.js +15 -4
  246. package/vendor/directive-core/dist/release-publish/main.js.map +1 -1
  247. package/vendor/directive-core/dist/release-publish/pipeline.d.ts +11 -0
  248. package/vendor/directive-core/dist/release-publish/pipeline.d.ts.map +1 -1
  249. package/vendor/directive-core/dist/release-publish/pipeline.js +143 -2
  250. package/vendor/directive-core/dist/release-publish/pipeline.js.map +1 -1
  251. package/vendor/directive-core/dist/release-rollback/gh.d.ts.map +1 -1
  252. package/vendor/directive-core/dist/release-rollback/gh.js +2 -1
  253. package/vendor/directive-core/dist/release-rollback/gh.js.map +1 -1
  254. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts +37 -0
  255. package/vendor/directive-core/dist/scope/delivery-evidence.d.ts.map +1 -1
  256. package/vendor/directive-core/dist/scope/delivery-evidence.js +106 -6
  257. package/vendor/directive-core/dist/scope/delivery-evidence.js.map +1 -1
  258. package/vendor/directive-core/dist/scope/transition.d.ts +3 -1
  259. package/vendor/directive-core/dist/scope/transition.d.ts.map +1 -1
  260. package/vendor/directive-core/dist/scope/transition.js +4 -0
  261. package/vendor/directive-core/dist/scope/transition.js.map +1 -1
  262. package/vendor/directive-core/dist/session/git.d.ts +21 -2
  263. package/vendor/directive-core/dist/session/git.d.ts.map +1 -1
  264. package/vendor/directive-core/dist/session/git.js +21 -4
  265. package/vendor/directive-core/dist/session/git.js.map +1 -1
  266. package/vendor/directive-core/dist/session/occupancy.d.ts +93 -6
  267. package/vendor/directive-core/dist/session/occupancy.d.ts.map +1 -1
  268. package/vendor/directive-core/dist/session/occupancy.js +215 -52
  269. package/vendor/directive-core/dist/session/occupancy.js.map +1 -1
  270. package/vendor/directive-core/dist/session/session-start.d.ts.map +1 -1
  271. package/vendor/directive-core/dist/session/session-start.js +5 -2
  272. package/vendor/directive-core/dist/session/session-start.js.map +1 -1
  273. package/vendor/directive-core/dist/swarm/dest-place.d.ts +1 -1
  274. package/vendor/directive-core/dist/swarm/dest-place.d.ts.map +1 -1
  275. package/vendor/directive-core/dist/swarm/dest-place.js +36 -41
  276. package/vendor/directive-core/dist/swarm/dest-place.js.map +1 -1
  277. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts +14 -0
  278. package/vendor/directive-core/dist/swarm/finalize-owed.d.ts.map +1 -1
  279. package/vendor/directive-core/dist/swarm/finalize-owed.js +214 -48
  280. package/vendor/directive-core/dist/swarm/finalize-owed.js.map +1 -1
  281. package/vendor/directive-core/dist/swarm/launch.d.ts.map +1 -1
  282. package/vendor/directive-core/dist/swarm/launch.js +15 -4
  283. package/vendor/directive-core/dist/swarm/launch.js.map +1 -1
  284. package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts +49 -2
  285. package/vendor/directive-core/dist/swarm/worktree-pm-install.d.ts.map +1 -1
  286. package/vendor/directive-core/dist/swarm/worktree-pm-install.js +207 -12
  287. package/vendor/directive-core/dist/swarm/worktree-pm-install.js.map +1 -1
  288. package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts +6 -0
  289. package/vendor/directive-core/dist/swarm/worktrees-cli.d.ts.map +1 -1
  290. package/vendor/directive-core/dist/swarm/worktrees-cli.js +79 -2
  291. package/vendor/directive-core/dist/swarm/worktrees-cli.js.map +1 -1
  292. package/vendor/directive-core/dist/swarm/worktrees.d.ts +12 -1
  293. package/vendor/directive-core/dist/swarm/worktrees.d.ts.map +1 -1
  294. package/vendor/directive-core/dist/swarm/worktrees.js +34 -26
  295. package/vendor/directive-core/dist/swarm/worktrees.js.map +1 -1
  296. package/vendor/directive-core/dist/verify-ac/evaluate.d.ts +52 -0
  297. package/vendor/directive-core/dist/verify-ac/evaluate.d.ts.map +1 -1
  298. package/vendor/directive-core/dist/verify-ac/evaluate.js +361 -1
  299. package/vendor/directive-core/dist/verify-ac/evaluate.js.map +1 -1
  300. package/vendor/directive-core/dist/verify-ac/index.d.ts +1 -1
  301. package/vendor/directive-core/dist/verify-ac/index.d.ts.map +1 -1
  302. package/vendor/directive-core/dist/verify-ac/index.js +1 -1
  303. package/vendor/directive-core/dist/verify-ac/index.js.map +1 -1
@@ -0,0 +1,168 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * design-critique:ensure-arc-dest — sanctioned pin-bin arc dest create/verify (#6142).
4
+ * Defaults to guarded-prep; explicit process-only-no-install for pin-read callers.
5
+ * Never treat gitignored packages/core/dist as SoT — call this verb instead.
6
+ */
7
+ import { resolve } from "node:path";
8
+ import { fileURLToPath } from "node:url";
9
+ import { ensureArcDest, } from "../vendor/directive-core/dist/design-critique/arc-dest.js";
10
+ export const DESIGN_CRITIQUE_ENSURE_ARC_DEST_HELP = `design-critique:ensure-arc-dest — create/verify arc dest via pin-bin (#6142)
11
+
12
+ Usage:
13
+ deft design-critique:ensure-arc-dest --dest-path <path> [--project-root PATH] [--against-implementation SHA] [--install-mode guarded-prep|process-only-no-install] [--json]
14
+
15
+ Options:
16
+ --dest-path PATH Linked worktree path for the arc dest (required)
17
+ --project-root PATH Repo root that owns the worktree (default: cwd)
18
+ --against-implementation SHA Fetched PR head SHA (against-implementation pin)
19
+ --install-mode MODE guarded-prep (default) or process-only-no-install
20
+ --json Emit structured result
21
+
22
+ Exit codes:
23
+ 0 Dest created or reused with selected install mode
24
+ 1 Operational refuse (prep failed, runtime pin missing, stranger lease, …)
25
+ 2 Config / usage error
26
+ `;
27
+ export function parseDesignCritiqueEnsureArcDestArgs(argv) {
28
+ const acc = {
29
+ destPath: null,
30
+ projectRoot: ".",
31
+ againstImplementationSha: null,
32
+ installMode: null,
33
+ emitJson: false,
34
+ help: false,
35
+ };
36
+ for (let i = 0; i < argv.length; i += 1) {
37
+ const arg = argv[i];
38
+ if (arg === "--")
39
+ continue;
40
+ if (arg === "--help" || arg === "-h")
41
+ return { ...acc, help: true };
42
+ if (arg === "--json") {
43
+ acc.emitJson = true;
44
+ continue;
45
+ }
46
+ if (arg === "--dest-path") {
47
+ const value = argv[i + 1];
48
+ if (value === undefined || value.startsWith("--")) {
49
+ return { ...acc, error: "argument --dest-path: expected one argument" };
50
+ }
51
+ acc.destPath = value;
52
+ i += 1;
53
+ continue;
54
+ }
55
+ if (arg?.startsWith("--dest-path=")) {
56
+ acc.destPath = arg.slice("--dest-path=".length);
57
+ continue;
58
+ }
59
+ if (arg === "--project-root") {
60
+ const value = argv[i + 1];
61
+ if (value === undefined || value.startsWith("--")) {
62
+ return { ...acc, error: "argument --project-root: expected one argument" };
63
+ }
64
+ acc.projectRoot = value;
65
+ i += 1;
66
+ continue;
67
+ }
68
+ if (arg?.startsWith("--project-root=")) {
69
+ acc.projectRoot = arg.slice("--project-root=".length);
70
+ continue;
71
+ }
72
+ if (arg === "--against-implementation") {
73
+ const value = argv[i + 1];
74
+ if (value === undefined || value.startsWith("--")) {
75
+ return { ...acc, error: "argument --against-implementation: expected one argument" };
76
+ }
77
+ acc.againstImplementationSha = value;
78
+ i += 1;
79
+ continue;
80
+ }
81
+ if (arg?.startsWith("--against-implementation=")) {
82
+ acc.againstImplementationSha = arg.slice("--against-implementation=".length);
83
+ continue;
84
+ }
85
+ if (arg === "--install-mode") {
86
+ const value = argv[i + 1];
87
+ if (value === undefined || value.startsWith("--")) {
88
+ return { ...acc, error: "argument --install-mode: expected one argument" };
89
+ }
90
+ if (value !== "guarded-prep" && value !== "process-only-no-install") {
91
+ return {
92
+ ...acc,
93
+ error: "argument --install-mode: expected guarded-prep|process-only-no-install",
94
+ };
95
+ }
96
+ acc.installMode = value;
97
+ i += 1;
98
+ continue;
99
+ }
100
+ if (arg?.startsWith("--install-mode=")) {
101
+ const value = arg.slice("--install-mode=".length);
102
+ if (value !== "guarded-prep" && value !== "process-only-no-install") {
103
+ return {
104
+ ...acc,
105
+ error: "argument --install-mode: expected guarded-prep|process-only-no-install",
106
+ };
107
+ }
108
+ acc.installMode = value;
109
+ continue;
110
+ }
111
+ return { ...acc, error: `unknown argument: ${arg}` };
112
+ }
113
+ return acc;
114
+ }
115
+ export function run(argv) {
116
+ const args = parseDesignCritiqueEnsureArcDestArgs(argv);
117
+ if (args.help) {
118
+ process.stdout.write(`${DESIGN_CRITIQUE_ENSURE_ARC_DEST_HELP}\n`);
119
+ return 0;
120
+ }
121
+ if (args.error !== undefined) {
122
+ process.stderr.write(`design-critique:ensure-arc-dest: ${args.error}\n`);
123
+ return 2;
124
+ }
125
+ if (args.destPath === null || args.destPath.trim().length === 0) {
126
+ process.stderr.write("design-critique:ensure-arc-dest: --dest-path is required\n" +
127
+ "Remediation: deft design-critique:ensure-arc-dest --dest-path .deft-scratch/worktrees/arc-<N>\n");
128
+ return 2;
129
+ }
130
+ const projectRoot = resolve(args.projectRoot);
131
+ const destPath = resolve(projectRoot, args.destPath);
132
+ let result;
133
+ try {
134
+ result = ensureArcDest({
135
+ repoRoot: projectRoot,
136
+ destPath,
137
+ againstImplementationSha: args.againstImplementationSha ?? undefined,
138
+ installMode: args.installMode ?? "guarded-prep",
139
+ });
140
+ }
141
+ catch (err) {
142
+ const message = err instanceof Error ? err.message : String(err);
143
+ if (args.emitJson) {
144
+ process.stdout.write(`${JSON.stringify({ ok: false, code: "ensure-failed", message }, null, 2)}\n`);
145
+ }
146
+ else {
147
+ process.stderr.write(`design-critique:ensure-arc-dest: ${message}\n`);
148
+ }
149
+ return 1;
150
+ }
151
+ if (args.emitJson) {
152
+ process.stdout.write(`${JSON.stringify(result, null, 2)}\n`);
153
+ }
154
+ else if (result.ok) {
155
+ process.stdout.write(`design-critique:ensure-arc-dest: ok dest=${result.destPath} sha=${result.dispatchSha} pin=${result.pinKind} reused=${result.reused}\n`);
156
+ }
157
+ else {
158
+ process.stderr.write(`design-critique:ensure-arc-dest: ${result.code}: ${result.message}\n`);
159
+ }
160
+ return result.ok ? 0 : 1;
161
+ }
162
+ export function main(argv) {
163
+ return run(argv);
164
+ }
165
+ if (process.argv[1] !== undefined && fileURLToPath(import.meta.url) === process.argv[1]) {
166
+ process.exit(run(process.argv.slice(2)));
167
+ }
168
+ //# sourceMappingURL=design-critique-ensure-arc-dest.js.map
@@ -10,7 +10,7 @@ export interface DispatchIo {
10
10
  writeErr: (text: string) => void;
11
11
  }
12
12
  /** CLI modules in packages/cli/src (excluding parity harnesses and bin/index). */
13
- export declare const CLI_MODULE_VERBS: readonly ["agents-refresh", "cache", "check", "capacity-backfill", "capacity-show", "codebase-default-extractor", "codebase-map", "codebase-map-fresh", "codebase-projection-registry", "codebase-provider", "doctor", "ownership-doctor", "ownership-fix", "verify-ownership", "install-upgrade", "install-uninstall", "migrate-preflight", "migrate-xbrief", "migrate-category-b", "framework-check-updates", "hook-dispatch", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "coverage-hotspots", "policy", "authz", "escalation-cli", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "pr-finish-loop", "directive-finish-loop", "pre-pr-run", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "release-wait-npm", "scope-lifecycle", "scope-record-approved-scope", "scope-record-observable-scope", "scope-record-intent-constraint", "scm-sync-default", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "occupancy-steal", "occupancy-release", "occupancy-heartbeat", "occupancy-grant", "plan-sequence", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "triage-strip-withdrawn", "triage-evaluate", "triage-help", "triage-queue", "triage-reconcile", "triage-refresh", "triage-scope", "triage-scope-drift", "triage-smoketest", "triage-subscribe", "triage-summary", "triage-welcome", "ts-check-lane", "vbrief-activate", "vbrief-build", "vbrief-preflight", "vbrief-reconcile", "vbrief-validate", "vbrief-validation", "xbrief-create", "xbrief-verify", "xbrief-adopt-stored-plan-id", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "verify-class-checks", "verify-presentation-coverage", "verify-scope-provenance", "verify-consumer-check-contract", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-biome-config", "verify-bridge-drift", "verify-capacity", "verify-contained-writes", "verify-telemetry-coverage", "verify-content-manifest", "verify-deposit-closure", "verify-consumer-hard-stops", "verify-closing-keywords", "verify-skill-external-fetch-gate", "verify-semantic-single-source", "verify-contract-drift", "verify-cursor-tier1", "verify-openclaw-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-plan-sequence", "verify-stubs", "verify-xbrief-drift", "verify-spec-prd-fresh", "verify-spec-drift", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-cohort-review-monitors", "verify-l4-owner", "verify-subagent-alive", "verify-subagent-steer", "subagent-pre-cancel", "subagent-steer-write", "design-critique-spend-resolve", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-pr-closeout-attestable", "verify-lifecycle-visible", "verify-completed-tracked", "verify-completed-write-guard", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-consumer-header-placeholder", "verify-agents-md-advisory", "verify-persisted-planning-narratives", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "verify-evaluator-surface", "verify-observable-scope", "verify-operator-scope-limit", "verify-presentation-ceiling", "verify-intent-constraint", "verify-durable-effect-acquisition", "verify-consumer-test-lane", "eval-health", "eval-run", "eval-report", "eval-triggers"];
13
+ export declare const CLI_MODULE_VERBS: readonly ["agents-refresh", "cache", "check", "capacity-backfill", "capacity-show", "codebase-default-extractor", "codebase-map", "codebase-map-fresh", "codebase-projection-registry", "codebase-provider", "doctor", "ownership-doctor", "ownership-fix", "verify-ownership", "install-upgrade", "install-uninstall", "migrate-preflight", "migrate-xbrief", "migrate-category-b", "framework-check-updates", "hook-dispatch", "umbrella-current-shape", "changelog-check", "change-init", "commit-lint", "coverage-hotspots", "policy", "authz", "escalation-cli", "pr-closing-keywords", "pr-merge-readiness", "pr-monitor", "pr-protected-issues", "pr-wait-mergeable", "pr-watch", "pr-finish-loop", "directive-finish-loop", "pre-pr-run", "preflight-cache", "preflight-gh", "probe-session", "release", "release-e2e", "release-publish", "release-rollback", "release-wait-npm", "scope-lifecycle", "scope-record-approved-scope", "scope-record-observable-scope", "scope-record-intent-constraint", "scm-sync-default", "lifecycle-event", "lifecycle-stats", "session-start", "session-ready", "occupancy-steal", "occupancy-release", "occupancy-heartbeat", "occupancy-grant", "applying-host-release", "plan-sequence", "slice", "subagent-monitor", "toolchain-check", "triage-actions", "triage-bootstrap", "triage-bulk", "triage-classify", "triage-strip-withdrawn", "triage-evaluate", "triage-help", "triage-queue", "triage-reconcile", "triage-refresh", "triage-scope", "triage-scope-drift", "triage-smoketest", "triage-subscribe", "triage-summary", "triage-welcome", "ts-check-lane", "vbrief-activate", "vbrief-build", "vbrief-preflight", "vbrief-reconcile", "vbrief-validate", "vbrief-validation", "xbrief-create", "xbrief-verify", "xbrief-adopt-stored-plan-id", "verify-branch", "verify-encoding", "verify-forward-coverage", "verify-test-boundary", "verify-class-checks", "verify-presentation-coverage", "verify-scope-provenance", "verify-consumer-check-contract", "verify-hooks-installed", "verify-investigation", "verify-judgment-gates", "verify-no-task-runtime", "validate-links", "validate-strategy-output", "verify-biome-config", "verify-bridge-drift", "verify-capacity", "verify-contained-writes", "verify-telemetry-coverage", "verify-content-manifest", "verify-deposit-closure", "verify-consumer-hard-stops", "verify-closing-keywords", "verify-skill-external-fetch-gate", "verify-semantic-single-source", "verify-contract-drift", "verify-cursor-tier1", "verify-openclaw-tier1", "verify-go-freeze", "verify-scm-boundary", "verify-session-ritual", "verify-plan-sequence", "verify-stubs", "verify-xbrief-drift", "verify-spec-prd-fresh", "verify-spec-drift", "rule-ownership-lint", "verify-story-ready", "verify-review-monitor", "verify-cohort-review-monitors", "verify-l4-owner", "verify-subagent-alive", "verify-subagent-steer", "subagent-pre-cancel", "subagent-steer-write", "design-critique-spend-resolve", "design-critique-ensure-arc-dest", "review-monitor-register", "review-monitor-release", "verify-tools", "verify-wip-cap", "verify-orphan-active", "verify-pr-closeout-attestable", "verify-lifecycle-visible", "verify-completed-tracked", "verify-completed-write-guard", "verify-literal-ac", "verify-ac", "verify-agents-md-budget", "verify-consumer-header-placeholder", "verify-agents-md-advisory", "verify-persisted-planning-narratives", "verify-eval-health-relocation", "verify-eval-triggers-relocation", "verify-evaluator-surface", "verify-observable-scope", "verify-operator-scope-limit", "verify-presentation-ceiling", "verify-intent-constraint", "verify-durable-effect-acquisition", "verify-consumer-test-lane", "eval-health", "eval-run", "eval-report", "eval-triggers"];
14
14
  /** Core-only CLI entrypoints without a packages/cli wrapper. */
15
15
  export declare const CORE_MODULE_VERBS: readonly ["scm", "scm-readiness", "github-auth-modes", "github-body", "issue-emit", "issue-ingest", "issue-sync-from-xbrief", "reconcile-issues", "swarm-launch", "swarm-complete-cohort", "swarm-finalize-cohort", "swarm-finalize-owed", "swarm-pre-dispatch", "swarm-readiness", "swarm-routing-verify", "swarm-routing-set", "swarm-verify-review-clean", "swarm-worktrees", "framework-commands", "pack-render", "packs-slice", "prd-render", "export-spec", "project-render", "project-write-narratives", "roadmap-render", "rule-map", "capability-map", "spec-render", "spec-reconstruct", "spec-validate", "code-structure-validate", "pack-migrate-skills", "pack-migrate-rules", "pack-migrate-strategies", "pack-migrate-patterns", "pack-migrate-swarm-spec", "policy-set", "setup-ghx", "scope-undo", "scope-demote", "scope-decompose", "changelog-resolve-unreleased", "architecture-preflight-sor", "feedback-file", "value-readback", "product-signal", "freshness-report", "decision-write", "decision-list", "docs-impact", "tutorial", "migrate-clause-ids", "migrate-confidence", "rule-to-verb-parity"];
16
16
  /** Colon aliases for triage-actions (mirrors cli-router SUBCOMMAND_ROUTES). */
package/dist/dispatch.js CHANGED
@@ -86,6 +86,7 @@ export const CLI_MODULE_VERBS = [
86
86
  "occupancy-release",
87
87
  "occupancy-heartbeat",
88
88
  "occupancy-grant",
89
+ "applying-host-release",
89
90
  "plan-sequence",
90
91
  "slice",
91
92
  "subagent-monitor",
@@ -162,6 +163,7 @@ export const CLI_MODULE_VERBS = [
162
163
  "subagent-pre-cancel",
163
164
  "subagent-steer-write",
164
165
  "design-critique-spend-resolve",
166
+ "design-critique-ensure-arc-dest",
165
167
  "review-monitor-register",
166
168
  "review-monitor-release",
167
169
  "verify-tools",
@@ -398,6 +400,7 @@ export const VERB_ALIASES = {
398
400
  "subagent:pre-cancel": "subagent-pre-cancel",
399
401
  "subagent:steer": "subagent-steer-write",
400
402
  "design-critique:spend-resolve": "design-critique-spend-resolve",
403
+ "design-critique:ensure-arc-dest": "design-critique-ensure-arc-dest",
401
404
  "agent:monitor": "subagent-monitor",
402
405
  "review-monitor:register": "review-monitor-register",
403
406
  "review-monitor:release": "review-monitor-release",
@@ -465,6 +468,7 @@ export const VERB_ALIASES = {
465
468
  "occupancy:release": "occupancy-release",
466
469
  "occupancy:heartbeat": "occupancy-heartbeat",
467
470
  "occupancy:grant": "occupancy-grant",
471
+ "applying-host:release": "applying-host-release",
468
472
  "session:end": "occupancy-release",
469
473
  ...FRESHNESS_COLON_ALIASES,
470
474
  "lifecycle:event": "lifecycle-event",
@@ -2839,6 +2843,10 @@ const CURATED_HELP_GROUPS = [
2839
2843
  name: "session:end",
2840
2844
  summary: "End this mutation session by releasing occupancy (same as occupancy:release)",
2841
2845
  },
2846
+ {
2847
+ name: "applying-host:release",
2848
+ summary: "Clear the worktree applying-host soft claim (owner or abandoned no-lease)",
2849
+ },
2842
2850
  {
2843
2851
  name: "freshness:report",
2844
2852
  summary: "Bound vs live deposit generation (current|stale_soft|stale_hard)",
@@ -3,7 +3,7 @@ import { readFileSync, realpathSync } from "node:fs";
3
3
  import { resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
5
  import { checkCheapInSync } from "../vendor/directive-core/dist/install-health/cheap.js";
6
- import { INSTALLATION_RECOVERY_GUIDANCE } from "../vendor/directive-core/dist/install-health/constants.js";
6
+ import { HOOK_ROOT_MISMATCH_RECOVERY_GUIDANCE, INSTALLATION_RECOVERY_GUIDANCE, } from "../vendor/directive-core/dist/install-health/constants.js";
7
7
  import { decideHook, hookPayloadTopLevelKeys, isHookEvent, isHookHost, mergeHookDispatchEnviron, normalizeHookProjectRoot, parseHookStdin, projectRootFromHookPayload, renderHostDecision, } from "../vendor/directive-core/dist/hooks/index.js";
8
8
  import { readProjectDataStatus } from "./data-status.js";
9
9
  import { maybeSelfCompleteSetup } from "./self-complete.js";
@@ -216,7 +216,7 @@ export function run(argv, seams = {}) {
216
216
  // owns the running hook-bin. Mismatch → fail closed (no setup, no policy).
217
217
  const launchRoot = (seams.launchingCheckoutRoot ?? resolveLaunchingCheckoutRoot)();
218
218
  if (launchRoot !== null && !rootsMatch(launchRoot, projectRoot)) {
219
- const guidance = INSTALLATION_RECOVERY_GUIDANCE;
219
+ const guidance = HOOK_ROOT_MISMATCH_RECOVERY_GUIDANCE;
220
220
  const decision = installationIdentityDeny(args.host, args.event, projectRoot, `Directive hook refuse: payload project root does not match the launching checkout ` +
221
221
  `(payloadRoot=${normalizeHookProjectRoot(projectRoot)} ` +
222
222
  `launchRoot=${normalizeHookProjectRoot(launchRoot)}). Recovery: ${guidance}`);
@@ -226,12 +226,18 @@ export function run(argv, seams = {}) {
226
226
  return 0;
227
227
  }
228
228
  // Wave 2k / AC9.4+AC14.8: pin≠installed → fail closed before policy.
229
+ // #6013/#5893: pin≠installed recovery names project PM install (not AC9.7).
230
+ // #5910: overlay-present also fail-closes (even when versions match); recovery
231
+ // names frozen-lockfile restore then overlay retirement.
229
232
  const cheap = (seams.cheapInSync ?? checkCheapInSync)(projectRoot);
230
233
  if (cheap.failClosed) {
231
234
  const guidance = cheap.recoveryGuidance ?? INSTALLATION_RECOVERY_GUIDANCE;
232
- const decision = installationIdentityDeny(args.host, args.event, projectRoot, `Directive hook refuse: pinned runtime does not match the installed runtime ` +
233
- `(pin=${cheap.pinVersion ?? "?"} installed=${cheap.installedVersion ?? "?"}). ` +
234
- `Recovery: ${guidance}`);
235
+ const identityLine = cheap.identityMatch
236
+ ? `Directive hook refuse: materialize-runtime overlay is present; identity cannot pass until the overlay is retired after exact restore ` +
237
+ `(pin=${cheap.pinVersion ?? "?"} installed=${cheap.installedVersion ?? "?"}). `
238
+ : `Directive hook refuse: pinned runtime does not match the installed runtime ` +
239
+ `(pin=${cheap.pinVersion ?? "?"} installed=${cheap.installedVersion ?? "?"}). `;
240
+ const decision = installationIdentityDeny(args.host, args.event, projectRoot, `${identityLine}Recovery: ${guidance}`);
235
241
  const rendered = renderHostDecision(args.host, decision);
236
242
  if (rendered.length > 0)
237
243
  writeOut(`${rendered}\n`);
@@ -3,7 +3,7 @@
3
3
  * (pseudo-terminal residual; #3110 Greptile). Presence refuses mint.
4
4
  * Expanded for dogfood conf 5/5 — markers are fail-closed (any non-empty value).
5
5
  */
6
- export declare const AUTHZ_AGENT_SHELL_ENV_MARKERS: readonly ["CLAUDECODE", "CLAUDE_CODE", "CLAUDE_CODE_ENTRYPOINT", "CURSOR_AGENT", "CURSOR_TRACE_ID", "CURSOR_SESSION_ID", "AIDER", "CONTINUE_CLI", "CODEX_SANDBOX", "CODEX_CI", "OPENAI_CODEX", "OPENCLAW", "OPENCLAW_STATE_DIR", "DEFT_PROBE_OPENCLAW", "DEFT_HOOK_HOST", "DEFT_AGENT_SHELL", "DEFT_AGENT_RUNTIME", "WARP_SESSION_ID", "WARP_HARNESS", "WARP_RUN_ID", "GEMINI_CLI", "AMP_CLI", "SWARM_AGENT", "AI_AGENT", "CI", "CONTINUOUS_INTEGRATION", "GITHUB_ACTIONS", "GITLAB_CI", "CIRCLECI", "BUILDKITE", "TRAVIS", "JENKINS_URL", "TEAMCITY_VERSION", "TF_BUILD", "APPVEYOR", "BITBUCKET_BUILD_NUMBER", "CODEBUILD_BUILD_ID"];
6
+ export declare const AUTHZ_AGENT_SHELL_ENV_MARKERS: readonly ["CLAUDECODE", "CLAUDE_CODE", "CLAUDE_CODE_ENTRYPOINT", "CURSOR_AGENT", "CURSOR_TRACE_ID", "CURSOR_SESSION_ID", "AIDER", "CONTINUE_CLI", "CODEX_SANDBOX", "CODEX_CI", "OPENAI_CODEX", "GROK_AGENT", "GROK_SESSION_ID", "OPENCLAW", "OPENCLAW_STATE_DIR", "DEFT_PROBE_OPENCLAW", "DEFT_HOOK_HOST", "DEFT_AGENT_SHELL", "DEFT_AGENT_RUNTIME", "WARP_SESSION_ID", "WARP_HARNESS", "WARP_RUN_ID", "GEMINI_CLI", "AMP_CLI", "SWARM_AGENT", "AI_AGENT", "CI", "CONTINUOUS_INTEGRATION", "GITHUB_ACTIONS", "GITLAB_CI", "CIRCLECI", "BUILDKITE", "TRAVIS", "JENKINS_URL", "TEAMCITY_VERSION", "TF_BUILD", "APPVEYOR", "BITBUCKET_BUILD_NUMBER", "CODEBUILD_BUILD_ID"];
7
7
  /** Phrase an operator must type on the controlling TTY after --confirm (#3110). */
8
8
  export declare const AUTHZ_INTERACTIVE_CONFIRM_PHRASE = "mint";
9
9
  /** Testable seams for TTY / agent-shell detection (#3110 / #3384). */
@@ -26,6 +26,11 @@ export interface HumanPresenceMintSeams {
26
26
  */
27
27
  readonly readInteractiveConfirm?: () => string | null;
28
28
  }
29
+ /**
30
+ * Matching agent/CI shell marker keys in AUTHZ_AGENT_SHELL_ENV_MARKERS order.
31
+ * Blank or whitespace-only values do not match (return []).
32
+ */
33
+ export declare function detectedAgentShellMarkers(environ: NodeJS.ProcessEnv): string[];
29
34
  export declare function looksLikeAgentShell(environ: NodeJS.ProcessEnv): boolean;
30
35
  /** Platform controlling-terminal path (`\\.\CONIN$` on win32, `/dev/tty` elsewhere). */
31
36
  export declare function controllingTerminalPath(platform?: NodeJS.Platform): string;
@@ -26,6 +26,9 @@ export const AUTHZ_AGENT_SHELL_ENV_MARKERS = [
26
26
  "CODEX_SANDBOX",
27
27
  "CODEX_CI",
28
28
  "OPENAI_CODEX",
29
+ // Grok Build shell markers (#5983 Prefer-A Recut-2): exact names only, both unconditional.
30
+ "GROK_AGENT",
31
+ "GROK_SESSION_ID",
29
32
  "OPENCLAW",
30
33
  "OPENCLAW_STATE_DIR",
31
34
  "DEFT_PROBE_OPENCLAW",
@@ -56,13 +59,21 @@ export const AUTHZ_AGENT_SHELL_ENV_MARKERS = [
56
59
  ];
57
60
  /** Phrase an operator must type on the controlling TTY after --confirm (#3110). */
58
61
  export const AUTHZ_INTERACTIVE_CONFIRM_PHRASE = "mint";
59
- export function looksLikeAgentShell(environ) {
62
+ /**
63
+ * Matching agent/CI shell marker keys in AUTHZ_AGENT_SHELL_ENV_MARKERS order.
64
+ * Blank or whitespace-only values do not match (return []).
65
+ */
66
+ export function detectedAgentShellMarkers(environ) {
67
+ const matched = [];
60
68
  for (const key of AUTHZ_AGENT_SHELL_ENV_MARKERS) {
61
69
  const v = environ[key];
62
70
  if (v !== undefined && String(v).trim().length > 0)
63
- return true;
71
+ matched.push(key);
64
72
  }
65
- return false;
73
+ return matched;
74
+ }
75
+ export function looksLikeAgentShell(environ) {
76
+ return detectedAgentShellMarkers(environ).length > 0;
66
77
  }
67
78
  function defaultIsTty() {
68
79
  return process.stdin.isTTY === true && process.stdout.isTTY === true;
@@ -163,10 +174,13 @@ export function refuseMintWhileUatActive(verb, projectRoot) {
163
174
  */
164
175
  export function refuseNonInteractiveMint(input) {
165
176
  const { verb, confirm } = input;
166
- if (looksLikeAgentShell(input.environ)) {
177
+ const matchedMarkers = detectedAgentShellMarkers(input.environ);
178
+ if (matchedMarkers.length > 0) {
179
+ const named = matchedMarkers.join(", ");
167
180
  process.stderr.write(`${verb}: refusing operator-cli stamp from an agent/host/CI shell ` +
168
- `(detected agent or CI env marker). Mint requires a human interactive ` +
169
- "TTY without agent-shell markers, plus --confirm and typed phrase (#3110).\n");
181
+ `(matched agent-shell env markers: ${named}). Unset ${named} and retry ` +
182
+ "from a human interactive TTY without agent-shell markers, plus --confirm " +
183
+ "and typed phrase (#3110 / #5983).\n");
170
184
  return 2;
171
185
  }
172
186
  const tty = input.isTty();
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+ import type { VerifyAcDispositionKind } from "@deftai/directive-core/product-first-done-gate";
2
3
  interface ParsedArgs {
3
4
  repo: string;
4
5
  baseSha: string;
@@ -31,11 +32,16 @@ interface ParsedArgs {
31
32
  evaluate: boolean;
32
33
  pushAdmit: boolean;
33
34
  projectRoot: string | null;
35
+ verifyAcDisposition: VerifyAcDispositionKind | null;
34
36
  json: boolean;
35
37
  help: boolean;
36
38
  error?: string;
37
39
  }
38
40
  export declare function parseArgs(argv: string[]): ParsedArgs;
39
- export declare function run(argv: string[]): number;
41
+ export interface PrePrRunOptions {
42
+ /** Hermetic tests inject this; production CLI never sets it (#6071 Greptile). */
43
+ readonly skipNamedMergeGate?: boolean;
44
+ }
45
+ export declare function run(argv: string[], options?: PrePrRunOptions): number;
40
46
  export {};
41
47
  //# sourceMappingURL=pre-pr-run.d.ts.map
@@ -41,6 +41,8 @@ Options:
41
41
  --criteria-digest <hex>
42
42
  --reviewed-file <path> (repeatable)
43
43
  --reviewer-report-ref <ref>
44
+ --verify-ac-disposition <executed-ac|no-obligation>
45
+ direct verify:ac disposition for ordinary pre-PR (#5855)
44
46
  --mark-complete always refuses; cannot mint a pass
45
47
  --skill-open always refuses; opening the skill is not completion
46
48
  --evaluate evaluate live binding against the private store
@@ -82,6 +84,7 @@ export function parseArgs(argv) {
82
84
  evaluate: false,
83
85
  pushAdmit: false,
84
86
  projectRoot: null,
87
+ verifyAcDisposition: null,
85
88
  json: false,
86
89
  help: false,
87
90
  };
@@ -338,6 +341,23 @@ export function parseArgs(argv) {
338
341
  if (arg === "--run-id")
339
342
  i += 1;
340
343
  }
344
+ else if (arg === "--verify-ac-disposition" || arg?.startsWith("--verify-ac-disposition=")) {
345
+ const value = arg === "--verify-ac-disposition"
346
+ ? argv[i + 1]
347
+ : arg.slice("--verify-ac-disposition=".length);
348
+ if (value === undefined) {
349
+ return { ...parsed, error: "argument --verify-ac-disposition: expected one argument" };
350
+ }
351
+ if (value !== "executed-ac" && value !== "no-obligation") {
352
+ return {
353
+ ...parsed,
354
+ error: "argument --verify-ac-disposition: expected executed-ac|no-obligation",
355
+ };
356
+ }
357
+ parsed.verifyAcDisposition = value;
358
+ if (arg === "--verify-ac-disposition")
359
+ i += 1;
360
+ }
341
361
  else {
342
362
  return { ...parsed, error: `unrecognized argument: ${arg}` };
343
363
  }
@@ -354,7 +374,7 @@ function emit(json, payload, text, err) {
354
374
  function asPhaseId(value) {
355
375
  return PRE_PR_PHASE_IDS.includes(value) ? value : null;
356
376
  }
357
- export function run(argv) {
377
+ export function run(argv, options = {}) {
358
378
  const args = parseArgs(argv);
359
379
  if (args.help) {
360
380
  process.stdout.write(USAGE);
@@ -515,6 +535,10 @@ export function run(argv) {
515
535
  const projectRoot = args.projectRoot?.trim() || process.cwd();
516
536
  const d = completeRun(store, controllerPublisher(), args.runId, undefined, {
517
537
  projectRoot,
538
+ ...(options.skipNamedMergeGate === true ? { skipNamedMergeGate: true } : {}),
539
+ ...(args.verifyAcDisposition !== null
540
+ ? { verifyAcDisposition: args.verifyAcDisposition }
541
+ : {}),
518
542
  });
519
543
  emit(args.json, d, d.message, !d.ok);
520
544
  return d.ok ? 0 : 1;
@@ -523,12 +523,15 @@ export function run(argv) {
523
523
  if (stray) {
524
524
  lines.push(stray);
525
525
  }
526
- // #5676: read-only may bootstrap the applying-host record; mutation/rearm
526
+ // #5676 / #6101: read-only may bootstrap the applying-host record; mutation/rearm
527
527
  // republishes as reinforcement after a successful ceremony. Skip opt-out /
528
528
  // kill-switch disabled results so .no-deft-directive stays write-free.
529
+ // Helper owns the live-occupant skip; CLI surfaces published / deferred / failed
530
+ // (deferred distinct from non-canonical null) without claiming conflict recovery.
529
531
  const disabled = typeof result.payload === "object" &&
530
532
  result.payload !== null &&
531
533
  result.payload.disabled === true;
534
+ let applyingHostPublish = { status: "skipped" };
532
535
  if (result.code === 0 && !disabled) {
533
536
  const owner = args.sessionId?.trim() ||
534
537
  (typeof result.payload.occupancy === "object" &&
@@ -541,20 +544,43 @@ export function run(argv) {
541
544
  if (owner.length > 0) {
542
545
  try {
543
546
  const transport = process.env.GROK_HOOK_EVENT?.trim() ? "grok-hook-event" : "native";
544
- publishApplyingHostFromCanonicalSessionId(projectRoot, owner, {
547
+ const published = publishApplyingHostFromCanonicalSessionId(projectRoot, owner, {
545
548
  transport: owner.startsWith("host:cursor:") ? "native" : transport,
546
549
  });
550
+ if (published === null) {
551
+ applyingHostPublish = { status: "non-canonical" };
552
+ }
553
+ else if (published.status === "published") {
554
+ applyingHostPublish = {
555
+ status: "published",
556
+ applyingHostSessionId: published.record.applyingHostSessionId,
557
+ };
558
+ }
559
+ else {
560
+ applyingHostPublish = {
561
+ status: "deferred",
562
+ reason: published.reason,
563
+ liveSessionId: published.liveSessionId,
564
+ attemptedSessionId: published.attemptedSessionId,
565
+ };
566
+ }
547
567
  }
548
- catch {
549
- /* ceremony success stays authoritative; applying-host is best-effort */
568
+ catch (err) {
569
+ applyingHostPublish = {
570
+ status: "failed",
571
+ message: err instanceof Error ? err.message : String(err),
572
+ };
550
573
  }
551
574
  }
552
575
  }
576
+ const payloadWithPublish = applyingHostPublish.status === "skipped"
577
+ ? result.payload
578
+ : { ...result.payload, applyingHostPublish };
553
579
  if (args.emitJson) {
554
- const sorted = Object.keys(result.payload)
580
+ const sorted = Object.keys(payloadWithPublish)
555
581
  .sort()
556
582
  .reduce((acc, key) => {
557
- acc[key] = result.payload[key];
583
+ acc[key] = payloadWithPublish[key];
558
584
  return acc;
559
585
  }, {});
560
586
  process.stdout.write(`${JSON.stringify(sorted)}\n`);
@@ -572,6 +598,14 @@ export function run(argv) {
572
598
  else {
573
599
  process.stdout.write(`[deft] session ritual recorded at ${ritualStatePath(projectRoot)} (diagnostic-only; not posture authority)\n`);
574
600
  }
601
+ if (applyingHostPublish.status === "deferred") {
602
+ process.stdout.write(`[deft] applying-host publish deferred: live occupant ${applyingHostPublish.liveSessionId} ` +
603
+ `still holds this worktree (attempted ${applyingHostPublish.attemptedSessionId}); ` +
604
+ "not a conflict recovery — that owner must release/end or wait for lease TTL.\n");
605
+ }
606
+ else if (applyingHostPublish.status === "failed") {
607
+ process.stdout.write(`[deft] applying-host publish failed: ${applyingHostPublish.message}\n`);
608
+ }
575
609
  }
576
610
  return result.code;
577
611
  }
@@ -14,6 +14,15 @@ export type TrackResult = {
14
14
  conflict?: boolean;
15
15
  conflictReason?: string;
16
16
  };
17
+ /** Normalize CRLF/CR to LF for ownership/wrapper equality (#5995). */
18
+ export declare function normalizeEol(text: string): string;
19
+ /** True when two texts differ only by end-of-line convention (#5995). */
20
+ export declare function contentsEqualIgnoringEol(a: string, b: string): boolean;
21
+ /**
22
+ * `.githooks` shell entrypoints must be LF on disk for `sh` (#5995 / PR #6151 P1).
23
+ * Ownership stays EOL-insensitive; these paths still rewrite CRLF-only drift.
24
+ */
25
+ export declare function isShellHookEntrypoint(rel: string): boolean;
17
26
  /**
18
27
  * Resolve deft skill pointer target (AC9.6). Prefer skills/deft/SKILL.md when
19
28
  * present in this runtime package; otherwise keep working package-root SKILL.md.
@@ -48,6 +57,32 @@ export declare function ensureSkillPointers(projectRoot: string): {
48
57
  };
49
58
  /** All wholly owned skill pointer paths (host roots × inventory). */
50
59
  export declare function listSkillPointerPaths(): string[];
60
+ /**
61
+ * True when `rel` has unstaged worktree edits vs the index (#6151 P1).
62
+ * No repo / no git / clean path → false (safe to report modified for staging).
63
+ */
64
+ export declare function pathHasUnstagedChanges(projectRoot: string, rel: string): boolean;
65
+ /** Left-unstaged disclosure when LF pins land on a dirty `.gitattributes` (#6151 P1). */
66
+ export declare const GITATTRIBUTES_STAGING_SKIPPED_DIRTY = ".gitattributes had unstaged local edits; LF pins were written but left unstaged so install/upgrade does not git add unrelated user changes (#6151 P1)";
67
+ /**
68
+ * True when every attribute line is a known Directive core/managed marker (or
69
+ * Deft deposit comment). Foreign rules mean the file is not pure Directive-owned
70
+ * (#6151 P1 dirty-skip heuristic).
71
+ */
72
+ export declare function isDirectiveManagedGitattributes(content: string): boolean;
73
+ /**
74
+ * Deposit narrow LF .gitattributes for managed wiring paths (#5995).
75
+ * Reuses scaffold ensureGitattributes (core markers + managed wiring lines).
76
+ * Reports created/modified so install/upgrade staging commits the pins (#6151 P1).
77
+ * When the path already has unstaged user edits (or an untracked foreign file),
78
+ * still appends missing pins but does not report modified (avoids staging WIP).
79
+ */
80
+ export declare function ensureManagedPathGitattributes(projectRoot: string): {
81
+ created: boolean;
82
+ modified: boolean;
83
+ wrote: boolean;
84
+ stagingSkippedNotice?: string;
85
+ };
51
86
  /**
52
87
  * Deposit host slash/prompt thin wrappers with package-relative targets (AC8.1 / AC8.10).
53
88
  * Reuses emitter inventory; does not revive .deft/core teaching.
@@ -57,6 +92,7 @@ export declare function ensureSlashCommands(projectRoot: string): {
57
92
  created: string[];
58
93
  modified: string[];
59
94
  conflicts: string[];
95
+ notices: string[];
60
96
  };
61
97
  /**
62
98
  * Verified managed slash/prompt paths from the emitter inventory (AC8.1 / AC11.10).