@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
@@ -14,6 +14,10 @@
14
14
  import { classifyMcpTool, classifyShellCommand, listShellOps } from "../policy/runtime-authority.js";
15
15
  import type { AuthzOperation } from "./types.js";
16
16
  export type AuthzClassifiedOp = AuthzOperation | "test" | "evidence" | "unknown" | "protected_store";
17
+ /** Kill-switch / permanent opt-out basenames agents must not plant (#3186 / #3039 / #6136). */
18
+ export declare const KILL_SWITCH_BASENAMES: readonly [".deft-directive-disable", ".no-deft-directive"];
19
+ /** True when a path basename is a kill-switch / permanent opt-out plant target (#6136). */
20
+ export declare function isKillSwitchPlantPath(pathish: string): boolean;
17
21
  /** True when a recovered dest literal is a payload-relative protected path. */
18
22
  export declare function destLiteralIsRelativeProtected(dest: string): boolean;
19
23
  /**
@@ -23,6 +27,12 @@ export declare function destLiteralIsRelativeProtected(dest: string): boolean;
23
27
  * symlink dest can still be realpath-resolved.
24
28
  */
25
29
  export declare function harvestDestsOfWriteForRealpath(command: string): string[];
30
+ /**
31
+ * Shell write targeting `.deft-directive-disable` / `.no-deft-directive` (#3186 / #3039 / #3213 / #6136).
32
+ * Always-on grant-gated plant deny (not UAT-only). Includes symlink plant bins
33
+ * (`ln`/`link`/`mklink`) and quote-split-resistant basename checks.
34
+ */
35
+ export declare function hasKillSwitchShellWrite(command: string, tokens?: readonly string[]): boolean;
26
36
  /** Best-effort shell classification for UAT-sensitive ops beyond push/merge. */
27
37
  export declare function classifyShellAuthzOps(command: string): AuthzClassifiedOp[];
28
38
  /** Map a PreToolUse tool name + optional shell command to authz ops. */
@@ -33,6 +43,8 @@ export declare function classifyHookAuthzOps(input: {
33
43
  readonly mcpArgsText?: string | null;
34
44
  /** Payload root for #4188 harvest realpath. Blank/omitted skips harvest. */
35
45
  readonly projectRoot?: string | null;
46
+ /** Direct Write/Edit target path for always-on kill-switch plant classify (#6136). */
47
+ readonly writePath?: string | null;
36
48
  }): AuthzClassifiedOp[];
37
49
  /**
38
50
  * Public pin for #4709: Shell write targeting `.deft/authz/` or `.deft/approved-scope/`.
@@ -50,6 +62,12 @@ export declare function hasProtectedDestOfWriteUnknown(command: string): boolean
50
62
  * realpath against an explicit payload root closes non-lexical symlink aliases.
51
63
  */
52
64
  export declare function inactiveShellTargetsProtectedStore(command: string): boolean;
65
+ /**
66
+ * First matched protected dest/token from the same classify/harvest routes that
67
+ * set protected_store (#5970 P3). Lexical dest-of-write first; #4188 realpath
68
+ * harvest when projectRoot is provided. Proven readers yield null.
69
+ */
70
+ export declare function matchProtectedStoreShellDest(command: string, projectRoot?: string | null): string | null;
53
71
  /** Re-export #2711 classifiers for composition docs/tests. */
54
72
  export { classifyMcpTool, classifyShellCommand, listShellOps };
55
73
  //# sourceMappingURL=classify.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/authz/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,YAAY,EAEb,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,MAAM,GACN,UAAU,GACV,SAAS,GACT,iBAAiB,CAAC;AA28FtB,+EAA+E;AAC/E,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpE;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA4BxE;AA+5CD,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAgH1E;AAyOD,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACtC,GAAG,iBAAiB,EAAE,CAkDtB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI9D;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAYvE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"classify.d.ts","sourceRoot":"","sources":["../../src/authz/classify.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,YAAY,EAEb,MAAM,gCAAgC,CAAC;AAKxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,MAAM,iBAAiB,GACzB,cAAc,GACd,MAAM,GACN,UAAU,GACV,SAAS,GACT,iBAAiB,CAAC;AA6KtB,+FAA+F;AAC/F,eAAO,MAAM,qBAAqB,4DAA6D,CAAC;AAEhG,2FAA2F;AAC3F,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAQ9D;AA61FD,+EAA+E;AAC/E,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAIpE;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CA4BxE;AAuaD;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAK5F;AAo/BD,gFAAgF;AAChF,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAiH1E;AA+OD,wEAAwE;AACxE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE;IAC1C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,QAAQ,CAAC,aAAa,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,4EAA4E;IAC5E,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,sFAAsF;IACtF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC,GAAG,iBAAiB,EAAE,CA2DtB;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAI9D;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAYvE;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED;;;;GAIG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,MAAM,EACf,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,GAC1B,MAAM,GAAG,IAAI,CAkEf;AAED,8DAA8D;AAC9D,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,YAAY,EAAE,CAAC"}
@@ -13,7 +13,7 @@
13
13
  */
14
14
  import { isShellTool } from "../hooks/tools.js";
15
15
  import { classifyMcpTool, classifyShellCommand, listShellOps, } from "../policy/runtime-authority.js";
16
- import { shellCommandHasPayloadRootProtectedDestAfterRealpath } from "./protected-dest-realpath.js";
16
+ import { resolvedDestIsPayloadRootProtected, shellCommandHasPayloadRootProtectedDestAfterRealpath, } from "./protected-dest-realpath.js";
17
17
  /**
18
18
  * Split on whitespace without nested quantifiers (O(n)).
19
19
  * Newlines become `;` segment breaks so compound lists like
@@ -185,8 +185,20 @@ const POLICY_AUTHORITY_MUTATORS = new Set([
185
185
  "disable-directive",
186
186
  "enable-directive",
187
187
  ]);
188
- /** Kill-switch / permanent opt-out basenames agents must not plant under UAT (#3186 / #3039). */
189
- const KILL_SWITCH_BASENAMES = [".deft-directive-disable", ".no-deft-directive"];
188
+ /** Kill-switch / permanent opt-out basenames agents must not plant (#3186 / #3039 / #6136). */
189
+ export const KILL_SWITCH_BASENAMES = [".deft-directive-disable", ".no-deft-directive"];
190
+ /** True when a path basename is a kill-switch / permanent opt-out plant target (#6136). */
191
+ export function isKillSwitchPlantPath(pathish) {
192
+ // Lowercase so Windows / case-insensitive plants (`.DEFT-DIRECTIVE-DISABLE`) match.
193
+ const p = canonicalizePathish(pathish).toLowerCase();
194
+ if (p.length === 0)
195
+ return false;
196
+ for (const name of KILL_SWITCH_BASENAMES) {
197
+ if (p === name || p.endsWith(`/${name}`))
198
+ return true;
199
+ }
200
+ return false;
201
+ }
190
202
  /**
191
203
  * Dest-form writers #3529 harvest missed (#3545). Shared across downloader,
192
204
  * archive-alt, positional, and indirect-write membership so a named-peer
@@ -1488,6 +1500,49 @@ function zipShellWithoutLineContinuations(command) {
1488
1500
  }
1489
1501
  return result;
1490
1502
  }
1503
+ /**
1504
+ * True for executable command substitution (`$(…)` / backticks) outside single
1505
+ * quotes. Arithmetic `$((…))` and plain `$VAR` / `${VAR}` do not qualify —
1506
+ * those cannot run a nested writer before the outer argv0 (#5970 P1).
1507
+ */
1508
+ function zipShellWordHasCommandSubstitution(raw) {
1509
+ let quote = null;
1510
+ for (let i = 0; i < raw.length; i++) {
1511
+ const char = raw[i];
1512
+ if (char === "\\" && quote !== "'" && i + 1 < raw.length) {
1513
+ i++;
1514
+ continue;
1515
+ }
1516
+ if (quote === null && char === "$" && raw[i + 1] === "'") {
1517
+ quote = "$'";
1518
+ i++;
1519
+ continue;
1520
+ }
1521
+ if (char === "'" || char === '"') {
1522
+ if (quote === null)
1523
+ quote = char;
1524
+ else if (quote === "$'" && char === "'")
1525
+ quote = null;
1526
+ else if (quote === char)
1527
+ quote = null;
1528
+ continue;
1529
+ }
1530
+ if (quote === "'" || quote === "$'")
1531
+ continue;
1532
+ if (char === "`")
1533
+ return true;
1534
+ if (char === "$" && raw[i + 1] === "(" && raw[i + 2] !== "(")
1535
+ return true;
1536
+ }
1537
+ return false;
1538
+ }
1539
+ function argvHasCommandSubstitution(words, execIndex) {
1540
+ for (let i = execIndex + 1; i < words.length; i++) {
1541
+ if (zipShellWordHasCommandSubstitution(words[i]))
1542
+ return true;
1543
+ }
1544
+ return false;
1545
+ }
1491
1546
  /** True for shell expansion syntax outside single quotes and not escaped. */
1492
1547
  function zipShellWordHasExpansion(raw) {
1493
1548
  let quote = null;
@@ -2194,6 +2249,22 @@ const READ_ONLY_PROOF_BINS = new Set([
2194
2249
  "gawk",
2195
2250
  "nawk",
2196
2251
  ]);
2252
+ /**
2253
+ * #5970 Approach1 existence probes. Sole classify carve for relative dest-of-write
2254
+ * and #4188 harvest (no second harvest-only skip list). test/[ ignore POSIX -o OR;
2255
+ * dir/Get-ChildItem still refuse sort/awk-style output-dest flags.
2256
+ */
2257
+ const EXISTENCE_PROBE_READ_ONLY_BINS = new Set([
2258
+ "test-path",
2259
+ "test",
2260
+ "[",
2261
+ "get-item",
2262
+ "gi",
2263
+ "dir",
2264
+ "get-childitem",
2265
+ "gci",
2266
+ ]);
2267
+ const EXISTENCE_PROBE_IGNORE_OUTPUT_DEST_FLAGS = new Set(["test", "["]);
2197
2268
  const READ_ONLY_PROOF_OUTPUT_DEST_FLAGS = new Set(["-o", "--output", "--pretty-print"]);
2198
2269
  function argvHasOutputDestFlag(words, execIndex) {
2199
2270
  for (let i = execIndex + 1; i < words.length; i++) {
@@ -2281,6 +2352,9 @@ function isProvenReadOnlyArgv(words, execIndex) {
2281
2352
  const literal = argv0Literal(words, execIndex);
2282
2353
  if (literal === null || argv0IsPathQualified(literal))
2283
2354
  return false;
2355
+ // Nested writers in argv (`$(mkfile …)` / backticks) void the reader proof (#5970 P1).
2356
+ if (argvHasCommandSubstitution(words, execIndex))
2357
+ return false;
2284
2358
  const name = writeBinName(literal);
2285
2359
  if (isArStyleArchiveBin(name)) {
2286
2360
  const rawMode = words[execIndex + 1];
@@ -2290,6 +2364,14 @@ function isProvenReadOnlyArgv(words, execIndex) {
2290
2364
  return (/^[abcdfilmnpqrstuvx]+$/.test(mode) &&
2291
2365
  ![...mode].some((letter) => ARCHIVE_WRITE_OPERATIONS.has(letter)));
2292
2366
  }
2367
+ if (EXISTENCE_PROBE_READ_ONLY_BINS.has(name)) {
2368
+ // Visible refuse for nested writers (Greptile #5970 P1); also gated above.
2369
+ if (argvHasCommandSubstitution(words, execIndex))
2370
+ return false;
2371
+ if (EXISTENCE_PROBE_IGNORE_OUTPUT_DEST_FLAGS.has(name))
2372
+ return true;
2373
+ return !argvHasOutputDestFlag(words, execIndex);
2374
+ }
2293
2375
  if (READ_ONLY_PROOF_BINS.has(name)) {
2294
2376
  if (name === "sort" || name === "awk" || name === "gawk" || name === "nawk") {
2295
2377
  return !argvHasOutputDestFlag(words, execIndex);
@@ -3452,7 +3534,7 @@ function sqlite3MetaDest(raw, next) {
3452
3534
  return null;
3453
3535
  }
3454
3536
  function pathishMentionsKillSwitch(pathish) {
3455
- const p = canonicalizePathish(pathish);
3537
+ const p = canonicalizePathish(pathish).toLowerCase();
3456
3538
  for (const name of KILL_SWITCH_BASENAMES) {
3457
3539
  if (p === name || p.endsWith(`/${name}`) || p.includes(name)) {
3458
3540
  return true;
@@ -3461,11 +3543,18 @@ function pathishMentionsKillSwitch(pathish) {
3461
3543
  return false;
3462
3544
  }
3463
3545
  /**
3464
- * Shell write targeting `.deft-directive-disable` / `.no-deft-directive` (#3186 / #3039 / #3213).
3465
- * Planting the kill-switch under UAT would full-bypass subsequent gates without operator recovery.
3466
- * Includes symlink plant bins (`ln`/`link`/`mklink`) and quote-split-resistant basename checks.
3546
+ * Shell write targeting `.deft-directive-disable` / `.no-deft-directive` (#3186 / #3039 / #3213 / #6136).
3547
+ * Always-on grant-gated plant deny (not UAT-only). Includes symlink plant bins
3548
+ * (`ln`/`link`/`mklink`) and quote-split-resistant basename checks.
3467
3549
  */
3468
- function hasKillSwitchShellWrite(command, tokens) {
3550
+ export function hasKillSwitchShellWrite(command, tokens) {
3551
+ const cmd = command.trim();
3552
+ if (cmd.length === 0)
3553
+ return false;
3554
+ const resolvedTokens = tokens ?? shellTokens(cmd);
3555
+ return hasKillSwitchShellWriteInner(cmd, resolvedTokens);
3556
+ }
3557
+ function hasKillSwitchShellWriteInner(command, tokens) {
3469
3558
  const lower = command.toLowerCase().replace(/\\/g, "/");
3470
3559
  // Quote-stripped form so `'.deft'-directive-disable`-class splits still match (#3213).
3471
3560
  const stripped = lower.replace(/['"]/g, "");
@@ -3505,6 +3594,8 @@ function hasKillSwitchShellWrite(command, tokens) {
3505
3594
  }
3506
3595
  // Write/destructive + symlink plant + archive/alt-write bins with a kill-switch path
3507
3596
  // argument (#3213 ln/link/mklink; #3245 tar/axel/rclone/socat residual).
3597
+ // echo/printf/type are stdout-only without a redirect; redirect dests are handled
3598
+ // above so bare `echo .deft-directive-disable` stays non-plant (#6136 Greptile P2).
3508
3599
  const killWriteBins = new Set([
3509
3600
  ...INDIRECT_WRITE_BINS,
3510
3601
  ...SYMLINK_PLANT_BINS,
@@ -3512,9 +3603,6 @@ function hasKillSwitchShellWrite(command, tokens) {
3512
3603
  "touch",
3513
3604
  "new-item",
3514
3605
  "ni",
3515
- "echo",
3516
- "printf",
3517
- "type",
3518
3606
  ]);
3519
3607
  for (let ti = 0; ti < tokens.length; ti++) {
3520
3608
  const binTok = normalizeToken(tokens[ti]);
@@ -4512,7 +4600,8 @@ export function classifyShellAuthzOps(command) {
4512
4600
  found.add("settings");
4513
4601
  if (commandHasAuthzDirShellWrite(cmd, tokens))
4514
4602
  found.add("settings");
4515
- // #3186: kill-switch plant + policy authority mutators → settings (UAT fail-closed).
4603
+ // #3186 / #6136: kill-switch plant + policy authority mutators → settings
4604
+ // (always-on grant-gated via dispatcher; not UAT-only).
4516
4605
  if (hasKillSwitchShellWrite(cmd, tokens))
4517
4606
  found.add("settings");
4518
4607
  if (hasPolicyAuthorityMutator(tokens))
@@ -4729,7 +4818,11 @@ function isCargoArgv0(name) {
4729
4818
  const EMPTY_OPS_DEST_ASSIGNMENT_KEYS = new Set(["of"]);
4730
4819
  function emptyOpsSegmentIsReadShaped(tokens, index) {
4731
4820
  const first = firstCommandBin(segmentSliceAround(tokens, index));
4732
- return READ_SHAPED_FILE_FLAG_BINS.has(first) || DEST_ASSIGNMENT_NON_WRITER_FIRST_BINS.has(first);
4821
+ // #5970: POSIX test/[ use -f/-o as predicates, not EMPTY_OPS_DEST_FLAGS writers.
4822
+ // dir/Get-ChildItem stay off this carve so -o/--output dest plants still deny.
4823
+ return (READ_SHAPED_FILE_FLAG_BINS.has(first) ||
4824
+ DEST_ASSIGNMENT_NON_WRITER_FIRST_BINS.has(first) ||
4825
+ EXISTENCE_PROBE_IGNORE_OUTPUT_DEST_FLAGS.has(first));
4733
4826
  }
4734
4827
  function destFlagOperandIsProtectedSettings(tokens) {
4735
4828
  for (let i = 0; i < tokens.length; i++) {
@@ -4813,8 +4906,17 @@ function hasWriteShapedProtectedSettingsDest(command, tokens) {
4813
4906
  /** Map a PreToolUse tool name + optional shell command to authz ops. */
4814
4907
  export function classifyHookAuthzOps(input) {
4815
4908
  const { toolName, shellCommand, isDirectWrite } = input;
4816
- if (isDirectWrite)
4909
+ if (isDirectWrite) {
4910
+ // Prefer-A Bound #6136: kill-switch Write/Edit is `settings` (always-on grant
4911
+ // gate). Keep off bare `edit` — isProtectedStoreEditDest treats the flag
4912
+ // basenames themselves as protected and would deny before the grant check.
4913
+ // Symlink plants into `.deft/authz/` are denied in dispatcher via realpath
4914
+ // (not this op class alone).
4915
+ const writePath = (input.writePath ?? "").trim();
4916
+ if (writePath.length > 0 && isKillSwitchPlantPath(writePath))
4917
+ return ["settings"];
4817
4918
  return ["edit"];
4919
+ }
4818
4920
  const lower = toolName.toLowerCase();
4819
4921
  // Shared catalog (#4041 / #3987). A second name list missed Grok monitor.
4820
4922
  if (isShellTool(toolName)) {
@@ -4892,6 +4994,86 @@ export function hasProtectedDestOfWriteUnknown(command) {
4892
4994
  export function inactiveShellTargetsProtectedStore(command) {
4893
4995
  return hasAuthzDirShellWrite(command) || hasProtectedDestOfWriteUnknown(command);
4894
4996
  }
4997
+ /**
4998
+ * First matched protected dest/token from the same classify/harvest routes that
4999
+ * set protected_store (#5970 P3). Lexical dest-of-write first; #4188 realpath
5000
+ * harvest when projectRoot is provided. Proven readers yield null.
5001
+ */
5002
+ export function matchProtectedStoreShellDest(command, projectRoot) {
5003
+ const cmd = command.trim();
5004
+ if (cmd.length === 0)
5005
+ return null;
5006
+ for (const segment of zipStyleCommandSegments(cmd)) {
5007
+ if (isProvenReadOnlyArgv(segment.words, segment.execIndex))
5008
+ continue;
5009
+ const jarDest = jarCreateArchiveDest(segment.words, segment.execIndex);
5010
+ if (jarDest !== null && isRelativePayloadProtectedDest(jarDest))
5011
+ return jarDest;
5012
+ const archiveDest = firstArchiveOperandDest(segment.words, segment.execIndex);
5013
+ if (archiveDest !== null && isRelativePayloadProtectedDest(archiveDest))
5014
+ return archiveDest;
5015
+ for (const doubleColonDest of doubleColonCreateArchiveDests(segment.words, segment.execIndex)) {
5016
+ if (isRelativePayloadProtectedDest(doubleColonDest))
5017
+ return doubleColonDest;
5018
+ }
5019
+ for (const dest of harvestInterpreterPayloadDests(segment.words, segment.execIndex)) {
5020
+ if (isRelativePayloadProtectedDest(dest))
5021
+ return dest;
5022
+ }
5023
+ const name = argv0BareName(segment.words, segment.execIndex);
5024
+ if (name !== null) {
5025
+ for (const dest of harvestUnknownDestFlagValues(segment.words, segment.execIndex, name)) {
5026
+ if (isRelativePayloadProtectedDest(dest))
5027
+ return dest;
5028
+ }
5029
+ }
5030
+ const last = lastDestOfWritePositional(segment.words, segment.execIndex);
5031
+ if (last !== null && isRelativePayloadProtectedDest(last)) {
5032
+ const lit = zipShellWordLiteral(last);
5033
+ return lit ?? last;
5034
+ }
5035
+ }
5036
+ const tokens = shellTokens(cmd);
5037
+ if (hasWriteShapedProtectedSettingsDest(cmd, tokens)) {
5038
+ // Prefer redirect destinations over earlier read operands (#5970 P2).
5039
+ for (let i = 0; i < cmd.length; i++) {
5040
+ if (cmd[i] !== ">")
5041
+ continue;
5042
+ const dest = redirectDestSlice(cmd.toLowerCase().replace(/\\/g, "/"), i).trim();
5043
+ if (dest.length > 0 && pathishIsProtectedMutationDest(dest))
5044
+ return dest;
5045
+ }
5046
+ for (const raw of tokens) {
5047
+ const pathish = pathishToken(raw);
5048
+ if (pathishIsProtectedMutationDest(pathish))
5049
+ return pathish;
5050
+ }
5051
+ }
5052
+ if (commandHasAuthzDirShellWrite(cmd, tokens)) {
5053
+ for (const raw of tokens) {
5054
+ const pathish = pathishToken(raw);
5055
+ if (pathishIsAuthzDir(pathish) || pathishIsApprovedScopeDir(pathish))
5056
+ return pathish;
5057
+ }
5058
+ }
5059
+ if (hasKillSwitchShellWrite(cmd, tokens)) {
5060
+ for (const raw of tokens) {
5061
+ const pathish = pathishToken(raw);
5062
+ if (pathishMentionsKillSwitch(pathish))
5063
+ return pathish;
5064
+ }
5065
+ }
5066
+ const harvestRoot = (projectRoot ?? "").trim();
5067
+ if (harvestRoot.length > 0) {
5068
+ for (const dest of harvestDestsOfWriteForRealpath(cmd)) {
5069
+ if (destLiteralIsRelativeProtected(dest))
5070
+ continue;
5071
+ if (resolvedDestIsPayloadRootProtected(harvestRoot, dest))
5072
+ return dest;
5073
+ }
5074
+ }
5075
+ return null;
5076
+ }
4895
5077
  /** Re-export #2711 classifiers for composition docs/tests. */
4896
5078
  export { classifyMcpTool, classifyShellCommand, listShellOps };
4897
5079
  //# sourceMappingURL=classify.js.map