@lannguyensi/harness 0.63.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (702) hide show
  1. package/CHANGELOG.md +90 -0
  2. package/README.md +46 -42
  3. package/dist/cli/add/index.js +17 -21
  4. package/dist/cli/add/index.js.map +1 -1
  5. package/dist/cli/adopt/derive.d.ts +2 -2
  6. package/dist/cli/adopt/derive.js +2 -19
  7. package/dist/cli/adopt/derive.js.map +1 -1
  8. package/dist/cli/adopt/index.d.ts +1 -1
  9. package/dist/cli/adopt/index.js +1 -12
  10. package/dist/cli/adopt/index.js.map +1 -1
  11. package/dist/cli/apply/apply.d.ts +20 -35
  12. package/dist/cli/apply/apply.js +61 -136
  13. package/dist/cli/apply/apply.js.map +1 -1
  14. package/dist/cli/apply/generate-codex-config.js +10 -58
  15. package/dist/cli/apply/generate-codex-config.js.map +1 -1
  16. package/dist/cli/apply/generate-memory-index.js +1 -2
  17. package/dist/cli/apply/generate-memory-index.js.map +1 -1
  18. package/dist/cli/apply/generate-opencode-config.d.ts +2 -10
  19. package/dist/cli/apply/generate-opencode-config.js +74 -113
  20. package/dist/cli/apply/generate-opencode-config.js.map +1 -1
  21. package/dist/cli/apply/generate-settings.d.ts +11 -64
  22. package/dist/cli/apply/generate-settings.js +27 -132
  23. package/dist/cli/apply/generate-settings.js.map +1 -1
  24. package/dist/cli/apply/index.d.ts +1 -1
  25. package/dist/cli/apply/index.js +1 -1
  26. package/dist/cli/apply/index.js.map +1 -1
  27. package/dist/cli/apply/install-codex-config.d.ts +153 -1
  28. package/dist/cli/apply/install-codex-config.js +445 -70
  29. package/dist/cli/apply/install-codex-config.js.map +1 -1
  30. package/dist/cli/apply/next-steps.d.ts +7 -0
  31. package/dist/cli/apply/next-steps.js +13 -1
  32. package/dist/cli/apply/next-steps.js.map +1 -1
  33. package/dist/cli/bounded-stdin.d.ts +0 -23
  34. package/dist/cli/bounded-stdin.js +2 -49
  35. package/dist/cli/bounded-stdin.js.map +1 -1
  36. package/dist/cli/describe.d.ts +1 -1
  37. package/dist/cli/describe.js +0 -3
  38. package/dist/cli/describe.js.map +1 -1
  39. package/dist/cli/diff/engine.d.ts +0 -11
  40. package/dist/cli/diff/engine.js +1 -17
  41. package/dist/cli/diff/engine.js.map +1 -1
  42. package/dist/cli/diff/index.js +14 -25
  43. package/dist/cli/diff/index.js.map +1 -1
  44. package/dist/cli/doctor/claude-mcp.d.ts +4 -19
  45. package/dist/cli/doctor/claude-mcp.js +11 -22
  46. package/dist/cli/doctor/claude-mcp.js.map +1 -1
  47. package/dist/cli/doctor/codex.d.ts +12 -14
  48. package/dist/cli/doctor/codex.js +31 -144
  49. package/dist/cli/doctor/codex.js.map +1 -1
  50. package/dist/cli/doctor/format.js +23 -338
  51. package/dist/cli/doctor/format.js.map +1 -1
  52. package/dist/cli/doctor/hook-liveness.d.ts +56 -0
  53. package/dist/cli/doctor/hook-liveness.js +455 -0
  54. package/dist/cli/doctor/hook-liveness.js.map +1 -0
  55. package/dist/cli/doctor/index.d.ts +13 -87
  56. package/dist/cli/doctor/index.js +57 -705
  57. package/dist/cli/doctor/index.js.map +1 -1
  58. package/dist/cli/doctor/opencode.d.ts +2 -1
  59. package/dist/cli/doctor/opencode.js.map +1 -1
  60. package/dist/cli/doctor/types.d.ts +21 -378
  61. package/dist/cli/doctor/types.js.map +1 -1
  62. package/dist/cli/drain-stdio.d.ts +31 -0
  63. package/dist/cli/drain-stdio.js +76 -0
  64. package/dist/cli/drain-stdio.js.map +1 -0
  65. package/dist/cli/export.d.ts +3 -1
  66. package/dist/cli/export.js +7 -16
  67. package/dist/cli/export.js.map +1 -1
  68. package/dist/cli/gate/codex-disable.d.ts +29 -0
  69. package/dist/cli/gate/codex-disable.js +195 -0
  70. package/dist/cli/gate/codex-disable.js.map +1 -0
  71. package/dist/cli/gate/codex-enable.d.ts +41 -0
  72. package/dist/cli/gate/codex-enable.js +127 -0
  73. package/dist/cli/gate/codex-enable.js.map +1 -0
  74. package/dist/cli/gate/codex-snapshot.d.ts +208 -0
  75. package/dist/cli/gate/codex-snapshot.js +402 -0
  76. package/dist/cli/gate/codex-snapshot.js.map +1 -0
  77. package/dist/cli/gate/disable.d.ts +9 -0
  78. package/dist/cli/gate/disable.js +263 -28
  79. package/dist/cli/gate/disable.js.map +1 -1
  80. package/dist/cli/gate/enable.d.ts +26 -6
  81. package/dist/cli/gate/enable.js +152 -80
  82. package/dist/cli/gate/enable.js.map +1 -1
  83. package/dist/cli/gate/link-chain.d.ts +53 -0
  84. package/dist/cli/gate/link-chain.js +122 -0
  85. package/dist/cli/gate/link-chain.js.map +1 -0
  86. package/dist/cli/gate/snapshot.d.ts +289 -12
  87. package/dist/cli/gate/snapshot.js +481 -22
  88. package/dist/cli/gate/snapshot.js.map +1 -1
  89. package/dist/cli/index.d.ts +0 -9
  90. package/dist/cli/index.js +15 -2607
  91. package/dist/cli/index.js.map +1 -1
  92. package/dist/cli/init/composer.d.ts +3 -6
  93. package/dist/cli/init/composer.js +6 -370
  94. package/dist/cli/init/composer.js.map +1 -1
  95. package/dist/cli/init/dependencies.d.ts +1 -2
  96. package/dist/cli/init/dependencies.js +4 -80
  97. package/dist/cli/init/dependencies.js.map +1 -1
  98. package/dist/cli/init/detect.js +5 -4
  99. package/dist/cli/init/detect.js.map +1 -1
  100. package/dist/cli/init/interactive.d.ts +1 -23
  101. package/dist/cli/init/interactive.js +33 -247
  102. package/dist/cli/init/interactive.js.map +1 -1
  103. package/dist/cli/init/profiles.d.ts +2 -2
  104. package/dist/cli/init/profiles.js +51 -243
  105. package/dist/cli/init/profiles.js.map +1 -1
  106. package/dist/cli/init/templates.d.ts +2 -37
  107. package/dist/cli/init/templates.js +25 -1237
  108. package/dist/cli/init/templates.js.map +1 -1
  109. package/dist/cli/list.d.ts +1 -1
  110. package/dist/cli/list.js +1 -38
  111. package/dist/cli/list.js.map +1 -1
  112. package/dist/cli/loader.d.ts +15 -1
  113. package/dist/cli/loader.js +56 -39
  114. package/dist/cli/loader.js.map +1 -1
  115. package/dist/cli/main.js +7 -2
  116. package/dist/cli/main.js.map +1 -1
  117. package/dist/cli/migrate-home/index.js +2 -2
  118. package/dist/cli/migrate-home/index.js.map +1 -1
  119. package/dist/cli/pack/add.js +1 -1
  120. package/dist/cli/pack/add.js.map +1 -1
  121. package/dist/cli/pack/hook-bootstrap.d.ts +5 -164
  122. package/dist/cli/pack/hook-bootstrap.js +15 -291
  123. package/dist/cli/pack/hook-bootstrap.js.map +1 -1
  124. package/dist/cli/pack/hook-branch-protection.d.ts +28 -21
  125. package/dist/cli/pack/hook-branch-protection.js +365 -340
  126. package/dist/cli/pack/hook-branch-protection.js.map +1 -1
  127. package/dist/cli/pack/index.d.ts +0 -1
  128. package/dist/cli/pack/index.js +0 -1
  129. package/dist/cli/pack/index.js.map +1 -1
  130. package/dist/cli/pack/list.js +1 -6
  131. package/dist/cli/pack/list.js.map +1 -1
  132. package/dist/cli/pack/mutate.d.ts +7 -9
  133. package/dist/cli/pack/mutate.js +6 -9
  134. package/dist/cli/pack/mutate.js.map +1 -1
  135. package/dist/cli/pack/reseed.d.ts +2 -2
  136. package/dist/cli/pack/reseed.js +16 -22
  137. package/dist/cli/pack/reseed.js.map +1 -1
  138. package/dist/cli/register-gate-group.d.ts +5 -0
  139. package/dist/cli/register-gate-group.js +348 -0
  140. package/dist/cli/register-gate-group.js.map +1 -0
  141. package/dist/cli/register-inspect-group.d.ts +6 -0
  142. package/dist/cli/register-inspect-group.js +189 -0
  143. package/dist/cli/register-inspect-group.js.map +1 -0
  144. package/dist/cli/register-operator-lifecycle.d.ts +5 -0
  145. package/dist/cli/register-operator-lifecycle.js +20 -0
  146. package/dist/cli/register-operator-lifecycle.js.map +1 -0
  147. package/dist/cli/register-pack-group.d.ts +5 -0
  148. package/dist/cli/register-pack-group.js +134 -0
  149. package/dist/cli/register-pack-group.js.map +1 -0
  150. package/dist/cli/register-setup-group.d.ts +5 -0
  151. package/dist/cli/register-setup-group.js +495 -0
  152. package/dist/cli/register-setup-group.js.map +1 -0
  153. package/dist/cli/remove/index.d.ts +0 -14
  154. package/dist/cli/remove/index.js +2 -115
  155. package/dist/cli/remove/index.js.map +1 -1
  156. package/dist/cli/remove/mutate.d.ts +0 -2
  157. package/dist/cli/remove/mutate.js +1 -19
  158. package/dist/cli/remove/mutate.js.map +1 -1
  159. package/dist/cli/remove/register.d.ts +5 -0
  160. package/dist/cli/remove/register.js +25 -0
  161. package/dist/cli/remove/register.js.map +1 -0
  162. package/dist/cli/shell-quote.d.ts +7 -0
  163. package/dist/cli/shell-quote.js +17 -0
  164. package/dist/cli/shell-quote.js.map +1 -0
  165. package/dist/cli/uninstall/index.d.ts +4 -2
  166. package/dist/cli/uninstall/index.js +15 -7
  167. package/dist/cli/uninstall/index.js.map +1 -1
  168. package/dist/cli/uninstall/register.d.ts +5 -0
  169. package/dist/cli/uninstall/register.js +171 -0
  170. package/dist/cli/uninstall/register.js.map +1 -0
  171. package/dist/cli/uninstall/snapshot.d.ts +15 -0
  172. package/dist/cli/uninstall/snapshot.js +38 -0
  173. package/dist/cli/uninstall/snapshot.js.map +1 -1
  174. package/dist/cli/validate/checks.d.ts +0 -77
  175. package/dist/cli/validate/checks.js +3 -1049
  176. package/dist/cli/validate/checks.js.map +1 -1
  177. package/dist/cli/validate/index.js +19 -15
  178. package/dist/cli/validate/index.js.map +1 -1
  179. package/dist/index.d.ts +0 -3
  180. package/dist/index.js +0 -3
  181. package/dist/index.js.map +1 -1
  182. package/dist/io/claude-mcp.d.ts +1 -1
  183. package/dist/io/claude-mcp.js +27 -14
  184. package/dist/io/claude-mcp.js.map +1 -1
  185. package/dist/io/harness-lock.js +2 -2
  186. package/dist/io/harness-lock.js.map +1 -1
  187. package/dist/io/lock.d.ts +0 -26
  188. package/dist/io/lock.js +10 -27
  189. package/dist/io/lock.js.map +1 -1
  190. package/dist/io/merge-settings.js +6 -4
  191. package/dist/io/merge-settings.js.map +1 -1
  192. package/dist/io/project-name.d.ts +22 -39
  193. package/dist/io/project-name.js +25 -42
  194. package/dist/io/project-name.js.map +1 -1
  195. package/dist/io/read-regular-file.d.ts +103 -40
  196. package/dist/io/read-regular-file.js +196 -35
  197. package/dist/io/read-regular-file.js.map +1 -1
  198. package/dist/io/restart-hints.js +3 -6
  199. package/dist/io/restart-hints.js.map +1 -1
  200. package/dist/io/version-compare.d.ts +1 -3
  201. package/dist/io/version-compare.js +1 -3
  202. package/dist/io/version-compare.js.map +1 -1
  203. package/dist/io/write-regular-file.d.ts +30 -0
  204. package/dist/io/write-regular-file.js +85 -0
  205. package/dist/io/write-regular-file.js.map +1 -0
  206. package/dist/overrides/index.d.ts +1 -0
  207. package/dist/overrides/index.js +1 -0
  208. package/dist/overrides/index.js.map +1 -1
  209. package/dist/overrides/merge-layers.d.ts +43 -0
  210. package/dist/overrides/merge-layers.js +76 -0
  211. package/dist/overrides/merge-layers.js.map +1 -0
  212. package/dist/overrides/merge.d.ts +16 -0
  213. package/dist/overrides/merge.js +21 -8
  214. package/dist/overrides/merge.js.map +1 -1
  215. package/dist/policy-packs/builtin/branch-protection-runtime.d.ts +4 -69
  216. package/dist/policy-packs/builtin/branch-protection-runtime.js +12 -84
  217. package/dist/policy-packs/builtin/branch-protection-runtime.js.map +1 -1
  218. package/dist/policy-packs/builtin/branch-protection.d.ts +7 -30
  219. package/dist/policy-packs/builtin/branch-protection.js +56 -89
  220. package/dist/policy-packs/builtin/branch-protection.js.map +1 -1
  221. package/dist/policy-packs/config-check.d.ts +7 -5
  222. package/dist/policy-packs/config-check.js +2 -2
  223. package/dist/policy-packs/config-check.js.map +1 -1
  224. package/dist/policy-packs/expand.d.ts +1 -3
  225. package/dist/policy-packs/expand.js +5 -42
  226. package/dist/policy-packs/expand.js.map +1 -1
  227. package/dist/policy-packs/index.d.ts +3 -3
  228. package/dist/policy-packs/index.js +2 -2
  229. package/dist/policy-packs/index.js.map +1 -1
  230. package/dist/policy-packs/registry.d.ts +9 -38
  231. package/dist/policy-packs/registry.js +5 -65
  232. package/dist/policy-packs/registry.js.map +1 -1
  233. package/dist/policy-packs/runtime.d.ts +0 -4
  234. package/dist/policy-packs/runtime.js +9 -22
  235. package/dist/policy-packs/runtime.js.map +1 -1
  236. package/dist/policy-packs/types.d.ts +0 -19
  237. package/dist/policy-packs/ux-compare.d.ts +1 -11
  238. package/dist/policy-packs/ux-compare.js +6 -42
  239. package/dist/policy-packs/ux-compare.js.map +1 -1
  240. package/dist/policy-packs/ux-drift-check.d.ts +5 -5
  241. package/dist/policy-packs/ux-drift-check.js +17 -22
  242. package/dist/policy-packs/ux-drift-check.js.map +1 -1
  243. package/dist/policy-packs/version-check.d.ts +5 -26
  244. package/dist/policy-packs/version-check.js +19 -74
  245. package/dist/policy-packs/version-check.js.map +1 -1
  246. package/dist/probes/memory.d.ts +1 -1
  247. package/dist/probes/memory.js +1 -1
  248. package/dist/probes/memory.js.map +1 -1
  249. package/dist/runtime/agent-facing.d.ts +9 -0
  250. package/dist/runtime/agent-facing.js +28 -14
  251. package/dist/runtime/agent-facing.js.map +1 -1
  252. package/dist/runtime/bounded-text.d.ts +15 -0
  253. package/dist/runtime/bounded-text.js +27 -0
  254. package/dist/runtime/bounded-text.js.map +1 -0
  255. package/dist/runtime/git-branch.d.ts +125 -0
  256. package/dist/runtime/git-branch.js +381 -0
  257. package/dist/runtime/git-branch.js.map +1 -0
  258. package/dist/runtime/hermetic-spawn-guard.d.ts +2 -2
  259. package/dist/runtime/hermetic-spawn-guard.js +24 -34
  260. package/dist/runtime/hermetic-spawn-guard.js.map +1 -1
  261. package/dist/runtime/home-dir.js +3 -2
  262. package/dist/runtime/home-dir.js.map +1 -1
  263. package/dist/runtime/tool-name-aliases.d.ts +0 -6
  264. package/dist/runtime/tool-name-aliases.js +5 -18
  265. package/dist/runtime/tool-name-aliases.js.map +1 -1
  266. package/dist/schema/grounding.d.ts +7 -54
  267. package/dist/schema/grounding.js +10 -12
  268. package/dist/schema/grounding.js.map +1 -1
  269. package/dist/schema/hooks.d.ts +39 -136
  270. package/dist/schema/hooks.js +3 -6
  271. package/dist/schema/hooks.js.map +1 -1
  272. package/dist/schema/index.d.ts +114 -3828
  273. package/dist/schema/index.js +41 -80
  274. package/dist/schema/index.js.map +1 -1
  275. package/dist/schema/memory.d.ts +54 -131
  276. package/dist/schema/memory.js +2 -2
  277. package/dist/schema/memory.js.map +1 -1
  278. package/dist/schema/policy-packs.d.ts +3 -45
  279. package/dist/schema/policy-packs.js +7 -13
  280. package/dist/schema/policy-packs.js.map +1 -1
  281. package/dist/schema/policy-ux.d.ts +7 -0
  282. package/dist/schema/policy-ux.js +18 -0
  283. package/dist/schema/policy-ux.js.map +1 -0
  284. package/dist/schema/removed-keys.d.ts +185 -0
  285. package/dist/schema/removed-keys.js +531 -0
  286. package/dist/schema/removed-keys.js.map +1 -0
  287. package/dist/schema/tools.d.ts +30 -268
  288. package/dist/schema/tools.js +4 -4
  289. package/dist/schema/tools.js.map +1 -1
  290. package/package.json +5 -16
  291. package/dist/cli/approve/branch-protection.d.ts +0 -69
  292. package/dist/cli/approve/branch-protection.js +0 -144
  293. package/dist/cli/approve/branch-protection.js.map +0 -1
  294. package/dist/cli/approve/risk.d.ts +0 -112
  295. package/dist/cli/approve/risk.js +0 -197
  296. package/dist/cli/approve/risk.js.map +0 -1
  297. package/dist/cli/approve/stdin-report.d.ts +0 -57
  298. package/dist/cli/approve/stdin-report.js +0 -145
  299. package/dist/cli/approve/stdin-report.js.map +0 -1
  300. package/dist/cli/approve/understanding.d.ts +0 -410
  301. package/dist/cli/approve/understanding.js +0 -996
  302. package/dist/cli/approve/understanding.js.map +0 -1
  303. package/dist/cli/audit.d.ts +0 -80
  304. package/dist/cli/audit.js +0 -252
  305. package/dist/cli/audit.js.map +0 -1
  306. package/dist/cli/delegate/index.d.ts +0 -76
  307. package/dist/cli/delegate/index.js +0 -443
  308. package/dist/cli/delegate/index.js.map +0 -1
  309. package/dist/cli/doctor/auto-approve-mode.d.ts +0 -37
  310. package/dist/cli/doctor/auto-approve-mode.js +0 -80
  311. package/dist/cli/doctor/auto-approve-mode.js.map +0 -1
  312. package/dist/cli/doctor/bypass-without-auto-approve.d.ts +0 -38
  313. package/dist/cli/doctor/bypass-without-auto-approve.js +0 -95
  314. package/dist/cli/doctor/bypass-without-auto-approve.js.map +0 -1
  315. package/dist/cli/doctor/codex-config-drift.d.ts +0 -28
  316. package/dist/cli/doctor/codex-config-drift.js +0 -240
  317. package/dist/cli/doctor/codex-config-drift.js.map +0 -1
  318. package/dist/cli/doctor/rogue-ledger.d.ts +0 -53
  319. package/dist/cli/doctor/rogue-ledger.js +0 -153
  320. package/dist/cli/doctor/rogue-ledger.js.map +0 -1
  321. package/dist/cli/doctor/session-start-preflight-setup-version.d.ts +0 -83
  322. package/dist/cli/doctor/session-start-preflight-setup-version.js +0 -114
  323. package/dist/cli/doctor/session-start-preflight-setup-version.js.map +0 -1
  324. package/dist/cli/doctor/settings-drift.d.ts +0 -25
  325. package/dist/cli/doctor/settings-drift.js +0 -213
  326. package/dist/cli/doctor/settings-drift.js.map +0 -1
  327. package/dist/cli/doctor/toolchain-parity.d.ts +0 -63
  328. package/dist/cli/doctor/toolchain-parity.js +0 -154
  329. package/dist/cli/doctor/toolchain-parity.js.map +0 -1
  330. package/dist/cli/doctor/ug-auto-approvals.d.ts +0 -40
  331. package/dist/cli/doctor/ug-auto-approvals.js +0 -91
  332. package/dist/cli/doctor/ug-auto-approvals.js.map +0 -1
  333. package/dist/cli/doctor/ug-delegations.d.ts +0 -26
  334. package/dist/cli/doctor/ug-delegations.js +0 -121
  335. package/dist/cli/doctor/ug-delegations.js.map +0 -1
  336. package/dist/cli/doctor/ug-inflight.d.ts +0 -35
  337. package/dist/cli/doctor/ug-inflight.js +0 -57
  338. package/dist/cli/doctor/ug-inflight.js.map +0 -1
  339. package/dist/cli/doctor/understanding-mode-env.d.ts +0 -51
  340. package/dist/cli/doctor/understanding-mode-env.js +0 -98
  341. package/dist/cli/doctor/understanding-mode-env.js.map +0 -1
  342. package/dist/cli/dry-run.d.ts +0 -46
  343. package/dist/cli/dry-run.js +0 -250
  344. package/dist/cli/dry-run.js.map +0 -1
  345. package/dist/cli/event-input.d.ts +0 -28
  346. package/dist/cli/event-input.js +0 -73
  347. package/dist/cli/event-input.js.map +0 -1
  348. package/dist/cli/explain-action.d.ts +0 -20
  349. package/dist/cli/explain-action.js +0 -27
  350. package/dist/cli/explain-action.js.map +0 -1
  351. package/dist/cli/explain-policy.d.ts +0 -135
  352. package/dist/cli/explain-policy.js +0 -266
  353. package/dist/cli/explain-policy.js.map +0 -1
  354. package/dist/cli/explain.d.ts +0 -31
  355. package/dist/cli/explain.js +0 -159
  356. package/dist/cli/explain.js.map +0 -1
  357. package/dist/cli/gc/index.d.ts +0 -63
  358. package/dist/cli/gc/index.js +0 -566
  359. package/dist/cli/gc/index.js.map +0 -1
  360. package/dist/cli/pack/approve-escape.d.ts +0 -19
  361. package/dist/cli/pack/approve-escape.js +0 -190
  362. package/dist/cli/pack/approve-escape.js.map +0 -1
  363. package/dist/cli/pack/auto-approve-path.d.ts +0 -146
  364. package/dist/cli/pack/auto-approve-path.js +0 -462
  365. package/dist/cli/pack/auto-approve-path.js.map +0 -1
  366. package/dist/cli/pack/hook-codex-post-tool-use.d.ts +0 -25
  367. package/dist/cli/pack/hook-codex-post-tool-use.js +0 -160
  368. package/dist/cli/pack/hook-codex-post-tool-use.js.map +0 -1
  369. package/dist/cli/pack/hook-codex-pre-tool-use.d.ts +0 -48
  370. package/dist/cli/pack/hook-codex-pre-tool-use.js +0 -474
  371. package/dist/cli/pack/hook-codex-pre-tool-use.js.map +0 -1
  372. package/dist/cli/pack/hook-codex-stop.d.ts +0 -35
  373. package/dist/cli/pack/hook-codex-stop.js +0 -329
  374. package/dist/cli/pack/hook-codex-stop.js.map +0 -1
  375. package/dist/cli/pack/hook-codex-user-prompt-submit.d.ts +0 -24
  376. package/dist/cli/pack/hook-codex-user-prompt-submit.js +0 -93
  377. package/dist/cli/pack/hook-codex-user-prompt-submit.js.map +0 -1
  378. package/dist/cli/pack/hook-post-merge-gate-record.d.ts +0 -37
  379. package/dist/cli/pack/hook-post-merge-gate-record.js +0 -190
  380. package/dist/cli/pack/hook-post-merge-gate-record.js.map +0 -1
  381. package/dist/cli/pack/hook-post-merge-gate.d.ts +0 -34
  382. package/dist/cli/pack/hook-post-merge-gate.js +0 -277
  383. package/dist/cli/pack/hook-post-merge-gate.js.map +0 -1
  384. package/dist/cli/pack/hook-post-tool-use.d.ts +0 -45
  385. package/dist/cli/pack/hook-post-tool-use.js +0 -137
  386. package/dist/cli/pack/hook-post-tool-use.js.map +0 -1
  387. package/dist/cli/pack/hook-pre-tool-use.d.ts +0 -92
  388. package/dist/cli/pack/hook-pre-tool-use.js +0 -1328
  389. package/dist/cli/pack/hook-pre-tool-use.js.map +0 -1
  390. package/dist/cli/pack/hook-runtime-reality.d.ts +0 -63
  391. package/dist/cli/pack/hook-runtime-reality.js +0 -210
  392. package/dist/cli/pack/hook-runtime-reality.js.map +0 -1
  393. package/dist/cli/pack/hook-solution-acceptance-writeguard.d.ts +0 -32
  394. package/dist/cli/pack/hook-solution-acceptance-writeguard.js +0 -337
  395. package/dist/cli/pack/hook-solution-acceptance-writeguard.js.map +0 -1
  396. package/dist/cli/pack/hook-solution-acceptance.d.ts +0 -157
  397. package/dist/cli/pack/hook-solution-acceptance.js +0 -530
  398. package/dist/cli/pack/hook-solution-acceptance.js.map +0 -1
  399. package/dist/cli/pack/hook-stay-in-scope.d.ts +0 -37
  400. package/dist/cli/pack/hook-stay-in-scope.js +0 -128
  401. package/dist/cli/pack/hook-stay-in-scope.js.map +0 -1
  402. package/dist/cli/pack/hook-subagent-start.d.ts +0 -23
  403. package/dist/cli/pack/hook-subagent-start.js +0 -88
  404. package/dist/cli/pack/hook-subagent-start.js.map +0 -1
  405. package/dist/cli/pack/hook-subagent-stop.d.ts +0 -19
  406. package/dist/cli/pack/hook-subagent-stop.js +0 -41
  407. package/dist/cli/pack/hook-subagent-stop.js.map +0 -1
  408. package/dist/cli/pack/hook-track-active-claim.d.ts +0 -27
  409. package/dist/cli/pack/hook-track-active-claim.js +0 -275
  410. package/dist/cli/pack/hook-track-active-claim.js.map +0 -1
  411. package/dist/cli/pack/transcript-report-scan.d.ts +0 -71
  412. package/dist/cli/pack/transcript-report-scan.js +0 -359
  413. package/dist/cli/pack/transcript-report-scan.js.map +0 -1
  414. package/dist/cli/pack/understanding-report-schema-hint.d.ts +0 -26
  415. package/dist/cli/pack/understanding-report-schema-hint.js +0 -120
  416. package/dist/cli/pack/understanding-report-schema-hint.js.map +0 -1
  417. package/dist/cli/pack/upgrade.d.ts +0 -32
  418. package/dist/cli/pack/upgrade.js +0 -273
  419. package/dist/cli/pack/upgrade.js.map +0 -1
  420. package/dist/cli/pause/index.d.ts +0 -113
  421. package/dist/cli/pause/index.js +0 -251
  422. package/dist/cli/pause/index.js.map +0 -1
  423. package/dist/cli/pause-check.d.ts +0 -22
  424. package/dist/cli/pause-check.js +0 -54
  425. package/dist/cli/pause-check.js.map +0 -1
  426. package/dist/cli/policy/intercept.d.ts +0 -233
  427. package/dist/cli/policy/intercept.js +0 -1020
  428. package/dist/cli/policy/intercept.js.map +0 -1
  429. package/dist/cli/policy/risk-envelope-enrichment.d.ts +0 -40
  430. package/dist/cli/policy/risk-envelope-enrichment.js +0 -108
  431. package/dist/cli/policy/risk-envelope-enrichment.js.map +0 -1
  432. package/dist/cli/record/index.d.ts +0 -81
  433. package/dist/cli/record/index.js +0 -348
  434. package/dist/cli/record/index.js.map +0 -1
  435. package/dist/cli/resolve-env.d.ts +0 -32
  436. package/dist/cli/resolve-env.js +0 -47
  437. package/dist/cli/resolve-env.js.map +0 -1
  438. package/dist/cli/session-export/index.d.ts +0 -46
  439. package/dist/cli/session-export/index.js +0 -169
  440. package/dist/cli/session-export/index.js.map +0 -1
  441. package/dist/cli/session-export/redact.d.ts +0 -22
  442. package/dist/cli/session-export/redact.js +0 -47
  443. package/dist/cli/session-export/redact.js.map +0 -1
  444. package/dist/cli/session-export/transcript.d.ts +0 -24
  445. package/dist/cli/session-export/transcript.js +0 -164
  446. package/dist/cli/session-export/transcript.js.map +0 -1
  447. package/dist/cli/session-start/branch-check.d.ts +0 -18
  448. package/dist/cli/session-start/branch-check.js +0 -140
  449. package/dist/cli/session-start/branch-check.js.map +0 -1
  450. package/dist/cli/session-start/index.d.ts +0 -121
  451. package/dist/cli/session-start/index.js +0 -591
  452. package/dist/cli/session-start/index.js.map +0 -1
  453. package/dist/cli/session-start/shared-options.d.ts +0 -103
  454. package/dist/cli/session-start/shared-options.js +0 -107
  455. package/dist/cli/session-start/shared-options.js.map +0 -1
  456. package/dist/cli/session-start/stale-base-check.d.ts +0 -46
  457. package/dist/cli/session-start/stale-base-check.js +0 -352
  458. package/dist/cli/session-start/stale-base-check.js.map +0 -1
  459. package/dist/cli/session-start/toolchain-parity.d.ts +0 -267
  460. package/dist/cli/session-start/toolchain-parity.js +0 -797
  461. package/dist/cli/session-start/toolchain-parity.js.map +0 -1
  462. package/dist/cli/smoke/assertions.d.ts +0 -46
  463. package/dist/cli/smoke/assertions.js +0 -170
  464. package/dist/cli/smoke/assertions.js.map +0 -1
  465. package/dist/cli/smoke/index.d.ts +0 -76
  466. package/dist/cli/smoke/index.js +0 -245
  467. package/dist/cli/smoke/index.js.map +0 -1
  468. package/dist/cli/smoke/runner.d.ts +0 -55
  469. package/dist/cli/smoke/runner.js +0 -134
  470. package/dist/cli/smoke/runner.js.map +0 -1
  471. package/dist/cli/smoke/stream-parser.d.ts +0 -65
  472. package/dist/cli/smoke/stream-parser.js +0 -115
  473. package/dist/cli/smoke/stream-parser.js.map +0 -1
  474. package/dist/cli/test-risk.d.ts +0 -26
  475. package/dist/cli/test-risk.js +0 -34
  476. package/dist/cli/test-risk.js.map +0 -1
  477. package/dist/io/display-path.d.ts +0 -11
  478. package/dist/io/display-path.js +0 -29
  479. package/dist/io/display-path.js.map +0 -1
  480. package/dist/io/duration.d.ts +0 -5
  481. package/dist/io/duration.js +0 -50
  482. package/dist/io/duration.js.map +0 -1
  483. package/dist/io/extract.d.ts +0 -79
  484. package/dist/io/extract.js +0 -226
  485. package/dist/io/extract.js.map +0 -1
  486. package/dist/io/ledger-record.d.ts +0 -83
  487. package/dist/io/ledger-record.js +0 -301
  488. package/dist/io/ledger-record.js.map +0 -1
  489. package/dist/io/read-json-dir-entries.d.ts +0 -36
  490. package/dist/io/read-json-dir-entries.js +0 -48
  491. package/dist/io/read-json-dir-entries.js.map +0 -1
  492. package/dist/io/safe-json-parse.d.ts +0 -5
  493. package/dist/io/safe-json-parse.js +0 -21
  494. package/dist/io/safe-json-parse.js.map +0 -1
  495. package/dist/policies/index.d.ts +0 -5
  496. package/dist/policies/index.js +0 -6
  497. package/dist/policies/index.js.map +0 -1
  498. package/dist/policies/ledger-client.d.ts +0 -113
  499. package/dist/policies/ledger-client.js +0 -500
  500. package/dist/policies/ledger-client.js.map +0 -1
  501. package/dist/policies/producers.d.ts +0 -12
  502. package/dist/policies/producers.js +0 -61
  503. package/dist/policies/producers.js.map +0 -1
  504. package/dist/policies/requires.d.ts +0 -75
  505. package/dist/policies/requires.js +0 -240
  506. package/dist/policies/requires.js.map +0 -1
  507. package/dist/policies/timestamp.d.ts +0 -14
  508. package/dist/policies/timestamp.js +0 -36
  509. package/dist/policies/timestamp.js.map +0 -1
  510. package/dist/policy-packs/builtin/permission-profiles.d.ts +0 -11
  511. package/dist/policy-packs/builtin/permission-profiles.js +0 -74
  512. package/dist/policy-packs/builtin/permission-profiles.js.map +0 -1
  513. package/dist/policy-packs/builtin/post-merge-gate-runtime.d.ts +0 -286
  514. package/dist/policy-packs/builtin/post-merge-gate-runtime.js +0 -397
  515. package/dist/policy-packs/builtin/post-merge-gate-runtime.js.map +0 -1
  516. package/dist/policy-packs/builtin/post-merge-gate.d.ts +0 -56
  517. package/dist/policy-packs/builtin/post-merge-gate.js +0 -347
  518. package/dist/policy-packs/builtin/post-merge-gate.js.map +0 -1
  519. package/dist/policy-packs/builtin/solution-acceptance-reconnect.d.ts +0 -50
  520. package/dist/policy-packs/builtin/solution-acceptance-reconnect.js +0 -151
  521. package/dist/policy-packs/builtin/solution-acceptance-reconnect.js.map +0 -1
  522. package/dist/policy-packs/builtin/solution-acceptance-runtime.d.ts +0 -323
  523. package/dist/policy-packs/builtin/solution-acceptance-runtime.js +0 -672
  524. package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +0 -1
  525. package/dist/policy-packs/builtin/solution-acceptance.d.ts +0 -45
  526. package/dist/policy-packs/builtin/solution-acceptance.js +0 -226
  527. package/dist/policy-packs/builtin/solution-acceptance.js.map +0 -1
  528. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.d.ts +0 -25
  529. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js +0 -94
  530. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js.map +0 -1
  531. package/dist/policy-packs/builtin/understanding-before-execution/auto-approve-default.d.ts +0 -35
  532. package/dist/policy-packs/builtin/understanding-before-execution/auto-approve-default.js +0 -86
  533. package/dist/policy-packs/builtin/understanding-before-execution/auto-approve-default.js.map +0 -1
  534. package/dist/policy-packs/builtin/understanding-before-execution/auto-approve.d.ts +0 -210
  535. package/dist/policy-packs/builtin/understanding-before-execution/auto-approve.js +0 -361
  536. package/dist/policy-packs/builtin/understanding-before-execution/auto-approve.js.map +0 -1
  537. package/dist/policy-packs/builtin/understanding-before-execution/delegation-markers.d.ts +0 -304
  538. package/dist/policy-packs/builtin/understanding-before-execution/delegation-markers.js +0 -734
  539. package/dist/policy-packs/builtin/understanding-before-execution/delegation-markers.js.map +0 -1
  540. package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.d.ts +0 -36
  541. package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.js +0 -73
  542. package/dist/policy-packs/builtin/understanding-before-execution/expiry-reason.js.map +0 -1
  543. package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +0 -19
  544. package/dist/policy-packs/builtin/understanding-before-execution/index.js +0 -83
  545. package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +0 -1
  546. package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.d.ts +0 -135
  547. package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.js +0 -618
  548. package/dist/policy-packs/builtin/understanding-before-execution/inflight-records.js.map +0 -1
  549. package/dist/policy-packs/builtin/understanding-before-execution/ledger.d.ts +0 -25
  550. package/dist/policy-packs/builtin/understanding-before-execution/ledger.js +0 -56
  551. package/dist/policy-packs/builtin/understanding-before-execution/ledger.js.map +0 -1
  552. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.d.ts +0 -20
  553. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js +0 -93
  554. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js.map +0 -1
  555. package/dist/policy-packs/builtin/understanding-before-execution/markers.d.ts +0 -126
  556. package/dist/policy-packs/builtin/understanding-before-execution/markers.js +0 -245
  557. package/dist/policy-packs/builtin/understanding-before-execution/markers.js.map +0 -1
  558. package/dist/policy-packs/builtin/understanding-before-execution/measured-permission-modes.d.ts +0 -29
  559. package/dist/policy-packs/builtin/understanding-before-execution/measured-permission-modes.js +0 -82
  560. package/dist/policy-packs/builtin/understanding-before-execution/measured-permission-modes.js.map +0 -1
  561. package/dist/policy-packs/builtin/understanding-before-execution/permission-mode-observations.d.ts +0 -71
  562. package/dist/policy-packs/builtin/understanding-before-execution/permission-mode-observations.js +0 -175
  563. package/dist/policy-packs/builtin/understanding-before-execution/permission-mode-observations.js.map +0 -1
  564. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +0 -620
  565. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +0 -1047
  566. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +0 -1
  567. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.d.ts +0 -128
  568. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js +0 -213
  569. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js.map +0 -1
  570. package/dist/policy-packs/builtin/understanding-before-execution/stay-in-scope-config.d.ts +0 -129
  571. package/dist/policy-packs/builtin/understanding-before-execution/stay-in-scope-config.js +0 -166
  572. package/dist/policy-packs/builtin/understanding-before-execution/stay-in-scope-config.js.map +0 -1
  573. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.d.ts +0 -164
  574. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js +0 -275
  575. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js.map +0 -1
  576. package/dist/policy-packs/builtin/understanding-before-execution-runtime.d.ts +0 -1
  577. package/dist/policy-packs/builtin/understanding-before-execution-runtime.js +0 -10
  578. package/dist/policy-packs/builtin/understanding-before-execution-runtime.js.map +0 -1
  579. package/dist/policy-packs/builtin/understanding-before-execution.d.ts +0 -526
  580. package/dist/policy-packs/builtin/understanding-before-execution.js +0 -1074
  581. package/dist/policy-packs/builtin/understanding-before-execution.js.map +0 -1
  582. package/dist/policy-packs/permission-translator.d.ts +0 -9
  583. package/dist/policy-packs/permission-translator.js +0 -76
  584. package/dist/policy-packs/permission-translator.js.map +0 -1
  585. package/dist/runtime/action-envelope.d.ts +0 -64
  586. package/dist/runtime/action-envelope.js +0 -46
  587. package/dist/runtime/action-envelope.js.map +0 -1
  588. package/dist/runtime/approval-signing.d.ts +0 -111
  589. package/dist/runtime/approval-signing.js +0 -384
  590. package/dist/runtime/approval-signing.js.map +0 -1
  591. package/dist/runtime/bash-match-facts.d.ts +0 -60
  592. package/dist/runtime/bash-match-facts.js +0 -196
  593. package/dist/runtime/bash-match-facts.js.map +0 -1
  594. package/dist/runtime/bash-match-registry.d.ts +0 -112
  595. package/dist/runtime/bash-match-registry.js +0 -406
  596. package/dist/runtime/bash-match-registry.js.map +0 -1
  597. package/dist/runtime/bash-prefix-parse.d.ts +0 -31
  598. package/dist/runtime/bash-prefix-parse.js +0 -576
  599. package/dist/runtime/bash-prefix-parse.js.map +0 -1
  600. package/dist/runtime/command-normalize.d.ts +0 -658
  601. package/dist/runtime/command-normalize.js +0 -2410
  602. package/dist/runtime/command-normalize.js.map +0 -1
  603. package/dist/runtime/deletion-target-resolve.d.ts +0 -28
  604. package/dist/runtime/deletion-target-resolve.js +0 -1078
  605. package/dist/runtime/deletion-target-resolve.js.map +0 -1
  606. package/dist/runtime/destructive-shell-floor.d.ts +0 -19
  607. package/dist/runtime/destructive-shell-floor.js +0 -611
  608. package/dist/runtime/destructive-shell-floor.js.map +0 -1
  609. package/dist/runtime/environment-resolver.d.ts +0 -36
  610. package/dist/runtime/environment-resolver.js +0 -138
  611. package/dist/runtime/environment-resolver.js.map +0 -1
  612. package/dist/runtime/git-context.d.ts +0 -201
  613. package/dist/runtime/git-context.js +0 -422
  614. package/dist/runtime/git-context.js.map +0 -1
  615. package/dist/runtime/index.d.ts +0 -12
  616. package/dist/runtime/index.js +0 -13
  617. package/dist/runtime/index.js.map +0 -1
  618. package/dist/runtime/intercept.d.ts +0 -494
  619. package/dist/runtime/intercept.js +0 -1313
  620. package/dist/runtime/intercept.js.map +0 -1
  621. package/dist/runtime/kube-context.d.ts +0 -16
  622. package/dist/runtime/kube-context.js +0 -63
  623. package/dist/runtime/kube-context.js.map +0 -1
  624. package/dist/runtime/kubectl-target-parse.d.ts +0 -31
  625. package/dist/runtime/kubectl-target-parse.js +0 -249
  626. package/dist/runtime/kubectl-target-parse.js.map +0 -1
  627. package/dist/runtime/ledger-add.d.ts +0 -16
  628. package/dist/runtime/ledger-add.js +0 -150
  629. package/dist/runtime/ledger-add.js.map +0 -1
  630. package/dist/runtime/ledger-writer.d.ts +0 -27
  631. package/dist/runtime/ledger-writer.js +0 -46
  632. package/dist/runtime/ledger-writer.js.map +0 -1
  633. package/dist/runtime/pause-sentinel.d.ts +0 -60
  634. package/dist/runtime/pause-sentinel.js +0 -156
  635. package/dist/runtime/pause-sentinel.js.map +0 -1
  636. package/dist/runtime/pending-approval.d.ts +0 -23
  637. package/dist/runtime/pending-approval.js +0 -67
  638. package/dist/runtime/pending-approval.js.map +0 -1
  639. package/dist/runtime/read-only-bash.d.ts +0 -141
  640. package/dist/runtime/read-only-bash.js +0 -2204
  641. package/dist/runtime/read-only-bash.js.map +0 -1
  642. package/dist/runtime/recovery-git-commit.d.ts +0 -22
  643. package/dist/runtime/recovery-git-commit.js +0 -284
  644. package/dist/runtime/recovery-git-commit.js.map +0 -1
  645. package/dist/runtime/reject-malformed-session-id.d.ts +0 -8
  646. package/dist/runtime/reject-malformed-session-id.js +0 -16
  647. package/dist/runtime/reject-malformed-session-id.js.map +0 -1
  648. package/dist/runtime/risk-classifier.d.ts +0 -38
  649. package/dist/runtime/risk-classifier.js +0 -311
  650. package/dist/runtime/risk-classifier.js.map +0 -1
  651. package/dist/runtime/session-id.d.ts +0 -113
  652. package/dist/runtime/session-id.js +0 -193
  653. package/dist/runtime/session-id.js.map +0 -1
  654. package/dist/runtime/shell-word.d.ts +0 -62
  655. package/dist/runtime/shell-word.js +0 -410
  656. package/dist/runtime/shell-word.js.map +0 -1
  657. package/dist/runtime/task-providers/agent-tasks.d.ts +0 -103
  658. package/dist/runtime/task-providers/agent-tasks.js +0 -245
  659. package/dist/runtime/task-providers/agent-tasks.js.map +0 -1
  660. package/dist/runtime/when-eval.d.ts +0 -62
  661. package/dist/runtime/when-eval.js +0 -212
  662. package/dist/runtime/when-eval.js.map +0 -1
  663. package/dist/runtime/workflow-policies.d.ts +0 -207
  664. package/dist/runtime/workflow-policies.js +0 -596
  665. package/dist/runtime/workflow-policies.js.map +0 -1
  666. package/dist/schema/audit.d.ts +0 -71
  667. package/dist/schema/audit.js +0 -32
  668. package/dist/schema/audit.js.map +0 -1
  669. package/dist/schema/doctor.d.ts +0 -25
  670. package/dist/schema/doctor.js +0 -23
  671. package/dist/schema/doctor.js.map +0 -1
  672. package/dist/schema/environments.d.ts +0 -215
  673. package/dist/schema/environments.js +0 -101
  674. package/dist/schema/environments.js.map +0 -1
  675. package/dist/schema/extract.d.ts +0 -9
  676. package/dist/schema/extract.js +0 -86
  677. package/dist/schema/extract.js.map +0 -1
  678. package/dist/schema/permission-profiles.d.ts +0 -2292
  679. package/dist/schema/permission-profiles.js +0 -60
  680. package/dist/schema/permission-profiles.js.map +0 -1
  681. package/dist/schema/policies.d.ts +0 -974
  682. package/dist/schema/policies.js +0 -298
  683. package/dist/schema/policies.js.map +0 -1
  684. package/dist/schema/requires.d.ts +0 -131
  685. package/dist/schema/requires.js +0 -88
  686. package/dist/schema/requires.js.map +0 -1
  687. package/dist/schema/risk.d.ts +0 -144
  688. package/dist/schema/risk.js +0 -194
  689. package/dist/schema/risk.js.map +0 -1
  690. package/dist/schema/session-start-preflight.d.ts +0 -10
  691. package/dist/schema/session-start-preflight.js +0 -106
  692. package/dist/schema/session-start-preflight.js.map +0 -1
  693. package/dist/schema/stale-base-check.d.ts +0 -18
  694. package/dist/schema/stale-base-check.js +0 -37
  695. package/dist/schema/stale-base-check.js.map +0 -1
  696. package/dist/schema/toolchain-parity.d.ts +0 -21
  697. package/dist/schema/toolchain-parity.js +0 -48
  698. package/dist/schema/toolchain-parity.js.map +0 -1
  699. package/dist/schema/workflows.d.ts +0 -519
  700. package/dist/schema/workflows.js +0 -81
  701. package/dist/schema/workflows.js.map +0 -1
  702. package/scripts/runtime-reality-docker-probe.mjs +0 -71
@@ -1 +0,0 @@
1
- {"version":3,"file":"bash-match-facts.js","sourceRoot":"","sources":["../../src/runtime/bash-match-facts.ts"],"names":[],"mappings":"AAAA,uEAAuE;AACvE,4DAA4D;AAC5D,EAAE;AACF,0EAA0E;AAC1E,uDAAuD;AACvD,sEAAsE;AACtE,wEAAwE;AACxE,oDAAoD;AACpD,yEAAyE;AACzE,qCAAqC;AACrC,mEAAmE;AACnE,yEAAyE;AACzE,gEAAgE;AAChE,yEAAyE;AACzE,wEAAwE;AACxE,qBAAqB;AACrB,uEAAuE;AACvE,wEAAwE;AACxE,yEAAyE;AACz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match-facts.js";
2
- export type RegisteredSetIntent = "covers-gated-head-tokens" | "must-not-contain-gated-head-token";
3
- /**
4
- * The registration hands the guard the CONSTANT itself, discriminated by
5
- * shape (task `209e6dc4` redesign — see the module header). There is no
6
- * `has()` closure any more: `sourceHas` below is the ONLY way membership is
7
- * ever tested, so a registration cannot assert a predicate that diverges
8
- * from what the underlying `Set`/`RegExp` actually does, because there is
9
- * only one value, not a value plus a separate self-description of it.
10
- */
11
- export type HeadTokenSource = {
12
- readonly kind: "set";
13
- readonly set: ReadonlySet<string>;
14
- } | {
15
- readonly kind: "regex";
16
- readonly re: RegExp;
17
- };
18
- /** Membership test derived FROM `source` — never independently supplied. */
19
- export declare function sourceHas(source: HeadTokenSource, token: string): boolean;
20
- interface RegisteredHeadTokenSetCommon {
21
- /**
22
- * Stable identifier, used in failure messages and by the unregistered-set
23
- * scan's cross-reference. Purely descriptive (task `209e6dc4`): the
24
- * checked value is `source`, a direct reference to the real constant, so
25
- * a wrong `id` here is a misleading LABEL, never a way to escape a
26
- * check — see the module header's point 6.
27
- */
28
- readonly id: string;
29
- /** File the set is actually declared in, for failure messages. Descriptive only, same caveat as `id`. */
30
- readonly module: string;
31
- /** The actual constant this registration mirrors — see `HeadTokenSource`. */
32
- readonly source: HeadTokenSource;
33
- readonly description: string;
34
- }
35
- /**
36
- * A "covers-gated-head-tokens" registration — the set exists so the engine
37
- * RECOGNISES these head tokens.
38
- */
39
- export interface CoversHeadTokenSet extends RegisteredHeadTokenSetCommon {
40
- readonly intent: "covers-gated-head-tokens";
41
- /**
42
- * Token(s) this registration KNOWINGLY shares coverage of with another
43
- * registered "covers-gated-head-tokens" set — an explicit, conscious
44
- * declaration (task `209e6dc4` redesign, resolving the module header's
45
- * point 4), never an inference. `checkRegisteredSets`'s covers-redundancy
46
- * check only clears a token for which MORE THAN ONE covers-set answers
47
- * true when EVERY one of those covering sets lists that token here. A
48
- * set that silently overlaps without declaring so still trips the
49
- * check — legitimate double coverage requires editing both
50
- * registrations, not just adding one next to an untouched other.
51
- */
52
- readonly intentionalOverlaps?: ReadonlySet<string>;
53
- }
54
- /**
55
- * A "must-not-contain-gated-head-token" registration — the set exists for
56
- * some OTHER purpose and must never contain a token the manifest itself
57
- * gates (the dbc6d303 CRITICAL shape). No purity/redundancy semantics apply
58
- * to this arm — only `sourceHas` is ever asked anything (check (a)).
59
- */
60
- export interface MustNotContainHeadTokenSet extends RegisteredHeadTokenSetCommon {
61
- readonly intent: "must-not-contain-gated-head-token";
62
- }
63
- /** Discriminated union on `intent`. */
64
- export type RegisteredHeadTokenSet = CoversHeadTokenSet | MustNotContainHeadTokenSet;
65
- export declare const REGISTERED_HEAD_TOKEN_SETS: readonly RegisteredHeadTokenSet[];
66
- /**
67
- * Which check flagged this violation. `covers-purity` (task `209e6dc4`
68
- * redesign) merges what used to be three separate checks (covers-purity,
69
- * covers-predicate-purity, and the documented-uncovered laundering gap
70
- * that had no check at all) into one probe over the registration's real
71
- * `source` — see the module header's points 1 and 3.
72
- */
73
- export type RegistrationCheck = "must-not-contain" | "covers-completeness" | "covers-empty" | "covers-purity" | "covers-redundancy";
74
- export interface RegistrationViolation {
75
- readonly setId: string;
76
- readonly intent: RegisteredSetIntent;
77
- readonly token: string;
78
- readonly check: RegistrationCheck;
79
- readonly reason: string;
80
- }
81
- /**
82
- * Fixed, deliberately small, PER-ENTRY-PINNED vocabulary of plausible
83
- * NON-gated head tokens (originally fix round 2 S4/D-004; each entry
84
- * individually pinned by a live regression test in
85
- * `tests/runtime/bash-match-head-token-drift.test.ts` as of task
86
- * `209e6dc4` — see the module header's point 5): commands a reasonable
87
- * engine-side set might plausibly mirror or accidentally absorb, but that
88
- * no shipped `bash_match` policy gates today. Combined with the live
89
- * `facts.gatedHeadTokens` (every token that IS gated, verified fresh — see
90
- * `bash-match-facts.ts`) this gives covers-purity a concrete probe domain
91
- * to test every registered "covers" source against, instead of trusting a
92
- * registration to honestly describe what it covers.
93
- *
94
- * RESIDUAL, named not hidden: this list cannot be exhaustively DERIVED from
95
- * the manifest — the manifest enumerates what IS gated, never the infinite
96
- * negative space of what is not. A token entirely outside both this list
97
- * and `facts.gatedHeadTokens` (e.g. `yarn`, `pnpm`) is not probed by
98
- * covers-purity. Widening this list narrows that residual; it cannot close
99
- * it completely for a `RegExp`-backed source, whose true match set is not
100
- * enumerable at all.
101
- */
102
- export declare const PLAUSIBLE_NON_GATED_HEAD_TOKENS: readonly string[];
103
- /**
104
- * Check every registered set against the live facts. Returns an EMPTY
105
- * array when clean. `registrations` and `documentedUncovered` default to
106
- * the real, shipped values but accept fixtures — see
107
- * `tests/runtime/bash-match-registry.test.ts`'s regression tests for the
108
- * historical incidents, which pass deliberately-broken fixtures to prove
109
- * this function catches their exact shape.
110
- */
111
- export declare function checkRegisteredSets(facts: Pick<BashMatchFacts, "gatedHeadTokens" | "classify">, registrations?: readonly RegisteredHeadTokenSet[], documentedUncovered?: ReadonlySet<string>): RegistrationViolation[];
112
- export {};
@@ -1,406 +0,0 @@
1
- // Registration point for every engine-side constant set that mirrors
2
- // FULL_TEMPLATE's `bash_match` facts (task `074acf5d`, run
3
- // `2026-07-28-manifest-facts-drift-guard`; redesigned by task `209e6dc4`).
4
- //
5
- // WHY A REGISTRY, NOT ONE HARD-CODED COMPARISON: the guard this replaces
6
- // (`tests/runtime/bash-match-head-token-drift.test.ts`, pre-migration)
7
- // checked exactly one named set (`NON_GIT_HEAD_TOKENS`) against the
8
- // manifest. That guard could not see run `dbc6d303`'s `INERT_CONSUMER_HEADS`
9
- // (a NEW module, CRITICAL: contained `harness`, the kill-switch's own
10
- // gated head token) at all — it simply never looked at any set but the
11
- // one it was told about. `REGISTERED_HEAD_TOKEN_SETS` below is the list
12
- // every such set must join; `checkRegisteredSets` walks the WHOLE list
13
- // against the live facts, so a set registered tomorrow is checked
14
- // automatically, and (paired with the unregistered-set scan in
15
- // `tests/runtime/bash-match-head-token-drift.test.ts`) a set that is
16
- // NOT registered is itself a finding.
17
- //
18
- // TWO INTENTS (minimum required — see the two historical incidents this
19
- // registry exists to close):
20
- // - "covers-gated-head-tokens": the set exists so the engine recognises
21
- // these head tokens (`NON_GIT_HEAD_TOKENS`'s shape). Checked for
22
- // COMPLETENESS: every head token the manifest actually gates (barring
23
- // a consciously `documented-uncovered` token) must be covered by AT
24
- // LEAST ONE registered set with this intent — the run `432db3d3` HIGH
25
- // (a covers-set spanning only 4 of 8 gated tokens) as a standing
26
- // regression class.
27
- // - "must-not-contain-gated-head-token": the set exists for some OTHER
28
- // purpose entirely and must NEVER contain a token the manifest itself
29
- // gates — the run `dbc6d303` CRITICAL's shape (an "inert consumer"
30
- // allowlist that accidentally absorbed the kill-switch's own gated
31
- // head token). Checked by testing every LIVE gated head token against
32
- // every such registered set's coverage.
33
- //
34
- // REDESIGN (task `209e6dc4`) — WHY: the ORIGINAL registration surface (fix
35
- // rounds 1 and 2 of task `074acf5d`, both superseded by this redesign) let a
36
- // registration hand the guard a freely-chosen `has: (token) => boolean`
37
- // closure plus an independently hand-typed `members: readonly string[]`
38
- // array — TWO self-descriptions of the SAME underlying constant, asserted
39
- // by the registrant, never derived from it. Three adversarial review
40
- // passes attacked that gap; two fix rounds narrowed the escape family by
41
- // adding checks c/d/e over the self-descriptions (covers-purity,
42
- // covers-redundancy, covers-predicate-purity) without closing it — every
43
- // added check produced the next bypass. Review round 3 measured the
44
- // residual: a `covers-gated-head-tokens` registration declaring
45
- // `members: ["tee"]` (or any subset of the four `documented-uncovered`
46
- // tokens `env`/`unset`/`tee`/`cp`) passed every one of the five checks with
47
- // an entirely honest, live-coupled `has()` and `members` — because nothing
48
- // in the old design distinguished "genuinely not gated" from "gated but
49
- // consciously uncovered", and `members` could say anything a NEW closure
50
- // also happened to agree with.
51
- //
52
- // HALT CRITERION (recorded before this redesign's first line, task
53
- // `209e6dc4` brief, quoted verbatim): "Findet ein spaeterer Review eine
54
- // weitere Registrierung, die akzeptiert wird und nicht sollte, wird NICHT
55
- // nachgebessert (keine fuenfte/sechste Pruefung), sondern die Oberflaeche
56
- // erneut vorgelegt. Drei Passes haben gezeigt: jede zusaetzliche Pruefung
57
- // produziert die naechste Umgehung. Der Umbau muss die Formen STRUKTURELL
58
- // unausdrueckbar machen, nicht einzeln fangen." This redesign follows that
59
- // instruction literally: it does not add a sixth check on top of the old
60
- // five. It removes the SURFACE the old checks were inspecting.
61
- //
62
- // THE STRUCTURAL FIX: `has()` as a freely-chosen closure, and `members` as
63
- // an independently hand-typed array, are BOTH GONE. A registration now
64
- // supplies a single `source: HeadTokenSource` — a discriminated union that
65
- // holds the ACTUAL constant (`{ kind: "set"; set: NON_GIT_HEAD_TOKENS }` or
66
- // `{ kind: "regex"; re: GIT_TOKEN_RE }`), imported and passed by reference,
67
- // not re-described. `sourceHas` (below) derives membership testing FROM
68
- // `source` — there is no code path left where a registration's declared
69
- // coverage and its actual behaviour can diverge, because there is only one
70
- // value now, not two. See the six-point closure list below for exactly
71
- // which of the three passes' findings this makes unexpressible vs. which
72
- // residual boundary (documented, not hidden) remains.
73
- //
74
- // SIX FORMS MEASURED OPEN BEFORE THIS REDESIGN (task `209e6dc4` brief,
75
- // reconstructed from review round 3 since the run's own `.ai/runs/` docs
76
- // are gitignored and not present in this checkout) AND THEIR DISPOSITION:
77
- //
78
- // 1. Documented-uncovered laundering WITHOUT dishonesty: a covers
79
- // registration whose declared members are all `documented-uncovered`
80
- // gated tokens (env/unset/tee/cp) passed all five checks with an
81
- // honest, live-coupled has()/members (the dbc6d303-CRITICAL shape,
82
- // concretely reproduced with `members: ["tee"]`).
83
- // CLOSED, structurally + a live probe: `checkRegisteredSets`'s (now
84
- // merged) covers-purity check probes the registration's actual
85
- // `source` — not a hand-typed members list, there isn't one any
86
- // more — against every live gated head token AND treats a
87
- // `documented-uncovered` token as ILLEGITIMATE to claim, exactly like
88
- // a token that is not gated at all. A registration cannot "declare"
89
- // its way around this: the probe reads the real Set/RegExp.
90
- // Pinned by the `["tee"]`-shaped regression test in
91
- // `tests/runtime/bash-match-registry.test.ts` (the exact form review
92
- // round 3 measured).
93
- // 2. `has()` as an arbitrary closure with no coupling to the constant
94
- // `id`/`module` name (stale hand-copied predicate; `has: () => false`;
95
- // no predicate check at all on the must-not-contain arm).
96
- // STRUCTURALLY UNEXPRESSIBLE: there is no `has()` field any more.
97
- // `source` holds the constant directly; `sourceHas` is the ONLY way
98
- // membership is ever tested, for both intents.
99
- // 3. `members` claiming coverage `has()` rejects (each walked in only one
100
- // direction), and `members: []`, which type-checked and passed.
101
- // STRUCTURALLY UNEXPRESSIBLE (the divergence half): there is no
102
- // `members` field to disagree with `source` — a registration has
103
- // exactly one thing to say about its coverage. CHECKED, not merely
104
- // unexpressible (the empty half): an empty/vacuous `source` (e.g.
105
- // `new Set([])`, or a regex matching none of the live vocabulary) is
106
- // still a value a registrant CAN write — `checkRegisteredSets`'s new
107
- // covers-empty check flags a covers registration whose `source`
108
- // matches none of the legitimately-coverable live gated head tokens.
109
- // 4. Check (d) COVERS-REDUNDANCY (fix round 2) forbade ALL double
110
- // coverage, so it would also convict a legitimate future case (two
111
- // registered sets consciously, by design, both keying the same head
112
- // token) as if it were laundering.
113
- // RESOLVED: `CoversHeadTokenSet.intentionalOverlaps` is an explicit,
114
- // conscious per-token declaration. Covers-redundancy now only clears
115
- // a multiply-covered token when EVERY registered set currently
116
- // covering it lists that token in ITS OWN `intentionalOverlaps` — a
117
- // set that silently overlaps (the round-2 laundering shape: a new
118
- // set quietly re-covering a token an existing set already owns)
119
- // still trips the check, because it has declared nothing. Legitimate
120
- // double coverage requires touching BOTH registrations, not one.
121
- // 5. `PLAUSIBLE_NON_GATED_HEAD_TOKENS` (the probe vocabulary check (e)
122
- // used) was itself an uncoupled hand-written constant — 5 of its 8
123
- // entries were exercised by no test at the time, and a token outside
124
- // BOTH vocabularies (e.g. `yarn`/`pnpm`) went unprobed.
125
- // PARTIALLY CLOSED (acceptance's declared "OR" branch — the vocabulary
126
- // cannot be DERIVED from the manifest, which only enumerates what IS
127
- // gated, never the negative space of what is not): every entry is now
128
- // individually pinned by a live regression test in
129
- // `tests/runtime/bash-match-head-token-drift.test.ts` asserting it is
130
- // NOT a live gated head token — a future policy gating one of these
131
- // words turns that test red, forcing a conscious update instead of a
132
- // silent drift. The residual boundary (a probe token entirely outside
133
- // both vocabularies stays unprobed) is named here AND at the constant.
134
- // 6. A registration could name a `module`/`id` to which no exported
135
- // constant actually corresponds.
136
- // STRUCTURALLY UNEXPRESSIBLE, by the TypeScript compiler: `id` and
137
- // `module` are now purely descriptive strings (used only in failure
138
- // messages) — the CHECKED value is `source.set` / `source.re`, a
139
- // direct reference to the real imported binding. Writing
140
- // `source: { kind: "set", set: SOME_NAME_THAT_DOES_NOT_EXIST }`
141
- // is `TS2304: Cannot find name` — a compile error, before any test
142
- // runs. Manually verified (task `209e6dc4`): temporarily editing a
143
- // real registration's `source.set` reference to an undeclared
144
- // identifier fails `npm run typecheck` immediately; reverted right
145
- // after. `id`/`module` can still be a MISLEADING label for a real,
146
- // existing `source` (e.g. call `NON_GIT_HEAD_TOKENS`'s registration
147
- // `id: "TOTALLY_WRONG_NAME"` while `source.set` still correctly
148
- // references it) — that is a cosmetic residual, not a behavioural
149
- // one: every check still evaluates the REAL constant regardless of
150
- // the label.
151
- //
152
- // WHAT IS STILL A RESIDUAL, NAMED HONESTLY, NOT HIDDEN:
153
- // - The probe vocabulary (point 5) is finite; a token outside both
154
- // `facts.gatedHeadTokens` and `PLAUSIBLE_NON_GATED_HEAD_TOKENS` is not
155
- // probed by covers-purity. This is inherent to any predicate-based
156
- // check over an unbounded domain (a `RegExp`'s match set is not
157
- // enumerable) and is not something the source-based redesign changes;
158
- // it narrows the practical exposure (both arms are now checked with
159
- // the SAME probe set, no separate unguarded closure) without claiming
160
- // to enumerate "every string that is not gated".
161
- // - `id`/`module` remain free-text labels, decoupled from `source`'s
162
- // actual identity (point 6's cosmetic half, above).
163
- // - `intentionalOverlaps` is itself a hand-declared field. A registrant
164
- // COULD mark an overlap "intentional" when it is not. The bar this
165
- // redesign sets is that doing so requires editing BOTH covering
166
- // registrations (a two-registration diff, visible in review), not
167
- // silently adding one new registration next to an untouched existing
168
- // one — a materially higher bar than the round-2 escape, not a
169
- // mathematical impossibility.
170
- // - The must-not-contain arm has no purity check of its own (never did):
171
- // its whole point is that its content is unrelated to gated head
172
- // tokens, so there is nothing to compare its coverage against.
173
- //
174
- // AXIS SCOPE (carried forward, unchanged by this redesign): this registry
175
- // models the HEAD-TOKEN axis only — which literal head token a
176
- // `bash_match` anchors on. A shipped policy's `bash_match` can equally
177
- // anchor on a VERB with no head-token significance of its own (`pause` in
178
- // `deny-kill-switch-bypass`), checked today only by `HARNESS_READ_ONLY_SUBS`
179
- // in `read-only-bash.ts`, a set this registry does not see and does not
180
- // check. The VERB axis is explicitly OUT OF SCOPE here, unchanged from the
181
- // prior design: the exact same defect shape (an engine-side allowlist
182
- // silently absorbing a gated token) is unmodellable here today, one axis
183
- // over. Do not assume verb coverage exists because head-token coverage
184
- // does.
185
- //
186
- // WHY src/runtime/, NOT tests/: see `bash-match-facts.ts`'s module header —
187
- // the same reasoning applies here.
188
- //
189
- // TODAY'S REAL REGISTRATIONS are both "covers" sets — `GIT_TOKEN_RE` and
190
- // `NON_GIT_HEAD_TOKENS`, both from `command-normalize.ts`, the two sets
191
- // the pre-migration guard already knew about, each now registered by
192
- // handing this module the ACTUAL constant (`source: { kind: "regex", re:
193
- // GIT_TOKEN_RE }` / `source: { kind: "set", set: NON_GIT_HEAD_TOKENS }`),
194
- // not a re-description of it. No real "must-not-contain-gated-head-token"
195
- // consumer exists in this tree today (run `dbc6d303`'s own module is
196
- // explicit non-goal / future work) — the intent is fully implemented and
197
- // covered by the fixture regression tests in
198
- // `tests/runtime/bash-match-registry.test.ts` (reproducing the CRITICAL's
199
- // exact shape) and by a live mutation probe against this file's own
200
- // `REGISTERED_HEAD_TOKEN_SETS` array, not against a second production
201
- // consumer: temporarily registering a fixture
202
- // (`intent: "must-not-contain-gated-head-token"`,
203
- // `source: { kind: "set", set: new Set(["harness"]) }`) reddens exactly
204
- // "every registered engine-side set is clean against the live facts ..."
205
- // and the defaults test in
206
- // `tests/runtime/bash-match-head-token-drift.test.ts`, with the violation
207
- // naming the fixture's own `setId` and the offending token — the probe was
208
- // reverted immediately after.
209
- import { GIT_TOKEN_RE, NON_GIT_HEAD_TOKENS } from "./command-normalize.js";
210
- import { DOCUMENTED_UNCOVERED_HEAD_TOKENS, isHeadTokenGated } from "./bash-match-facts.js";
211
- /** Membership test derived FROM `source` — never independently supplied. */
212
- export function sourceHas(source, token) {
213
- return source.kind === "set" ? source.set.has(token) : source.re.test(token);
214
- }
215
- export const REGISTERED_HEAD_TOKEN_SETS = [
216
- {
217
- id: "GIT_TOKEN_RE",
218
- module: "src/runtime/command-normalize.ts",
219
- intent: "covers-gated-head-tokens",
220
- source: { kind: "regex", re: GIT_TOKEN_RE },
221
- description: "canonicalizeSegment's git-basename recognizer (matches `git`, and any `\\S*/git` path-qualified spelling, by basename)",
222
- },
223
- {
224
- id: "NON_GIT_HEAD_TOKENS",
225
- module: "src/runtime/command-normalize.ts",
226
- intent: "covers-gated-head-tokens",
227
- source: { kind: "set", set: NON_GIT_HEAD_TOKENS },
228
- description: "canonicalizeSegment's closed non-git head-token set (today: gh, npm, harness)",
229
- },
230
- ];
231
- /**
232
- * Fixed, deliberately small, PER-ENTRY-PINNED vocabulary of plausible
233
- * NON-gated head tokens (originally fix round 2 S4/D-004; each entry
234
- * individually pinned by a live regression test in
235
- * `tests/runtime/bash-match-head-token-drift.test.ts` as of task
236
- * `209e6dc4` — see the module header's point 5): commands a reasonable
237
- * engine-side set might plausibly mirror or accidentally absorb, but that
238
- * no shipped `bash_match` policy gates today. Combined with the live
239
- * `facts.gatedHeadTokens` (every token that IS gated, verified fresh — see
240
- * `bash-match-facts.ts`) this gives covers-purity a concrete probe domain
241
- * to test every registered "covers" source against, instead of trusting a
242
- * registration to honestly describe what it covers.
243
- *
244
- * RESIDUAL, named not hidden: this list cannot be exhaustively DERIVED from
245
- * the manifest — the manifest enumerates what IS gated, never the infinite
246
- * negative space of what is not. A token entirely outside both this list
247
- * and `facts.gatedHeadTokens` (e.g. `yarn`, `pnpm`) is not probed by
248
- * covers-purity. Widening this list narrows that residual; it cannot close
249
- * it completely for a `RegExp`-backed source, whose true match set is not
250
- * enumerable at all.
251
- */
252
- export const PLAUSIBLE_NON_GATED_HEAD_TOKENS = [
253
- "docker",
254
- "kubectl",
255
- "ls",
256
- "cat",
257
- "node",
258
- "python",
259
- "make",
260
- "ssh",
261
- ];
262
- /**
263
- * Check every registered set against the live facts. Returns an EMPTY
264
- * array when clean. `registrations` and `documentedUncovered` default to
265
- * the real, shipped values but accept fixtures — see
266
- * `tests/runtime/bash-match-registry.test.ts`'s regression tests for the
267
- * historical incidents, which pass deliberately-broken fixtures to prove
268
- * this function catches their exact shape.
269
- */
270
- export function checkRegisteredSets(facts, registrations = REGISTERED_HEAD_TOKEN_SETS, documentedUncovered = DOCUMENTED_UNCOVERED_HEAD_TOKENS) {
271
- const violations = [];
272
- // (a) must-not-contain: no registered set with this intent may answer
273
- // `true` (via `sourceHas`, the ONLY membership test that exists now) for
274
- // ANY live gated head token — the dbc6d303 CRITICAL shape.
275
- for (const reg of registrations) {
276
- if (reg.intent !== "must-not-contain-gated-head-token")
277
- continue;
278
- for (const token of facts.gatedHeadTokens) {
279
- if (sourceHas(reg.source, token)) {
280
- violations.push({
281
- setId: reg.id,
282
- intent: reg.intent,
283
- token,
284
- check: "must-not-contain",
285
- reason: `"${reg.id}" (${reg.module} — ${reg.description}) declares intent "must-not-contain-gated-head-token" but its source contains "${token}", which IS gated by a shipped bash_match policy`,
286
- });
287
- }
288
- }
289
- }
290
- // Is `token` something a "covers" registration is LEGITIMATELY allowed to
291
- // claim: gated, AND not consciously carved out as documented-uncovered?
292
- // Point 1 of the module header's six forms lived exactly in the gap this
293
- // predicate closes — the old design treated "gated" as the only bar to
294
- // clear, so a covers set claiming ONLY documented-uncovered tokens
295
- // passed cleanly.
296
- const isLegitimatelyCoverable = (token) => isHeadTokenGated(facts, token) && !documentedUncovered.has(token);
297
- // (b) covers-completeness: every gated head token NOT consciously
298
- // documented as uncovered must be answered `true` by at least one
299
- // registered "covers" set's `source` — the 432db3d3 HIGH shape.
300
- for (const token of facts.gatedHeadTokens) {
301
- if (documentedUncovered.has(token))
302
- continue;
303
- const covered = registrations.some((reg) => reg.intent === "covers-gated-head-tokens" && sourceHas(reg.source, token));
304
- if (!covered) {
305
- const cls = facts.classify(token);
306
- violations.push({
307
- setId: "(none)",
308
- intent: "covers-gated-head-tokens",
309
- token,
310
- check: "covers-completeness",
311
- reason: `gated head token "${token}" (class: ${cls ?? "unknown"}) is not covered by ANY registered "covers-gated-head-tokens" set, and is not in the documented-uncovered list either`,
312
- });
313
- }
314
- }
315
- // (c) covers-empty (task `209e6dc4`, module header point 3, empty half):
316
- // a covers registration whose `source` matches NONE of the legitimately
317
- // coverable live gated head tokens contributes zero real coverage — the
318
- // structural echo of the old `members: []` escape, which type-checked
319
- // and passed silently because nothing walked an empty declaration back
320
- // to a finding. There is no `members` field to leave empty any more, but
321
- // an empty backing `Set`, or a regex that matches nothing in the known
322
- // vocabulary, is still a value a registrant can write; this check makes
323
- // that visible instead of silently accepted.
324
- for (const reg of registrations) {
325
- if (reg.intent !== "covers-gated-head-tokens")
326
- continue;
327
- const coversSomething = [...facts.gatedHeadTokens]
328
- .filter(isLegitimatelyCoverable)
329
- .some((token) => sourceHas(reg.source, token));
330
- if (!coversSomething) {
331
- violations.push({
332
- setId: reg.id,
333
- intent: reg.intent,
334
- token: "(none)",
335
- check: "covers-empty",
336
- reason: `"${reg.id}" (${reg.module} — ${reg.description}) declares intent "covers-gated-head-tokens" but its source matches NONE of the live, legitimately-coverable gated head tokens — an empty or vacuous registration`,
337
- });
338
- }
339
- }
340
- // (d) covers-purity (task `209e6dc4` redesign, merging the old checks
341
- // (c) covers-purity, (e) covers-predicate-purity, and closing the
342
- // previously-unchecked documented-uncovered laundering gap — module
343
- // header points 1 and 3): probe the registration's ACTUAL `source`
344
- // directly — never a hand-typed `members` list, there isn't one any
345
- // more — against every live gated head token PLUS
346
- // `PLAUSIBLE_NON_GATED_HEAD_TOKENS`. A covers registration must answer
347
- // `true` ONLY for tokens that are BOTH gated AND not consciously
348
- // documented-uncovered (i.e. `isLegitimatelyCoverable`). Because coverage
349
- // is read straight off `source` instead of a separate declared list,
350
- // "declaring coverage the predicate rejects" and "claiming a
351
- // documented-uncovered token honestly" collapse into the same probe:
352
- // there is nothing left to declare independently of what the constant
353
- // actually does.
354
- const probeVocabulary = new Set([
355
- ...facts.gatedHeadTokens,
356
- ...PLAUSIBLE_NON_GATED_HEAD_TOKENS,
357
- ]);
358
- for (const reg of registrations) {
359
- if (reg.intent !== "covers-gated-head-tokens")
360
- continue;
361
- for (const token of probeVocabulary) {
362
- if (sourceHas(reg.source, token) && !isLegitimatelyCoverable(token)) {
363
- const reason = documentedUncovered.has(token)
364
- ? `"${reg.id}" (${reg.module} — ${reg.description}) declares intent "covers-gated-head-tokens" and its source answers true for "${token}", but "${token}" IS gated while also being consciously documented-uncovered — a covers set may not claim coverage of a token this codebase has deliberately marked as NOT covered by any engine-side set (the dbc6d303-shape laundering this check exists to close)`
365
- : `"${reg.id}" (${reg.module} — ${reg.description}) declares intent "covers-gated-head-tokens" and its source answers true for "${token}", but "${token}" is not a live gated head token at all — the source accepts more than it should, reproducing this registry's own defect class (an engine-side constant mirroring manifest content with no coupling) inside the guard itself`;
366
- violations.push({
367
- setId: reg.id,
368
- intent: reg.intent,
369
- token,
370
- check: "covers-purity",
371
- reason,
372
- });
373
- }
374
- }
375
- }
376
- // (e) covers-redundancy: a gated head token answered `true` by MORE THAN
377
- // ONE registered "covers-gated-head-tokens" set's `source` is a
378
- // violation UNLESS every one of those covering sets consciously declares
379
- // that token in its own `intentionalOverlaps` (task `209e6dc4`,
380
- // resolving module header point 4: a silent new registration re-covering
381
- // a token an existing set already owns still trips this — only a
382
- // declaration on BOTH sides clears it).
383
- const isCoversSet = (reg) => reg.intent === "covers-gated-head-tokens";
384
- for (const token of facts.gatedHeadTokens) {
385
- const coveringSets = registrations
386
- .filter(isCoversSet)
387
- .filter((reg) => sourceHas(reg.source, token));
388
- if (coveringSets.length <= 1)
389
- continue;
390
- const allAcknowledged = coveringSets.every((reg) => reg.intentionalOverlaps?.has(token));
391
- if (allAcknowledged)
392
- continue;
393
- for (const reg of coveringSets) {
394
- const others = coveringSets.filter((r) => r.id !== reg.id).map((r) => r.id);
395
- violations.push({
396
- setId: reg.id,
397
- intent: reg.intent,
398
- token,
399
- check: "covers-redundancy",
400
- reason: `"${reg.id}" (${reg.module} — ${reg.description}) declares intent "covers-gated-head-tokens" and answers true for "${token}", but "${token}" is ALSO covered by ${others.length} other registered covers-set(s) (${others.join(", ")}) without every covering set declaring "${token}" in its own intentionalOverlaps — a gated head token must be covered by exactly one registered covers-set unless ALL covering sets consciously declare the overlap`,
401
- });
402
- }
403
- }
404
- return violations;
405
- }
406
- //# sourceMappingURL=bash-match-registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bash-match-registry.js","sourceRoot":"","sources":["../../src/runtime/bash-match-registry.ts"],"names":[],"mappings":"AAAA,qEAAqE;AACrE,2DAA2D;AAC3D,2EAA2E;AAC3E,EAAE;AACF,yEAAyE;AACzE,uEAAuE;AACvE,oEAAoE;AACpE,6EAA6E;AAC7E,sEAAsE;AACtE,uEAAuE;AACvE,wEAAwE;AACxE,uEAAuE;AACvE,kEAAkE;AAClE,+DAA+D;AAC/D,qEAAqE;AACrE,sCAAsC;AACtC,EAAE;AACF,wEAAwE;AACxE,6BAA6B;AAC7B,0EAA0E;AAC1E,qEAAqE;AACrE,0EAA0E;AAC1E,wEAAwE;AACxE,0EAA0E;AAC1E,qEAAqE;AACrE,wBAAwB;AACxB,yEAAyE;AACzE,0EAA0E;AAC1E,uEAAuE;AACvE,uEAAuE;AACvE,0EAA0E;AAC1E,4CAA4C;AAC5C,EAAE;AACF,2EAA2E;AAC3E,6EAA6E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;aACnB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC;QACjD,IAAI,YAAY,CAAC,MAAM,IAAI,CAAC;YAAE,SAAS;QACvC,MAAM,eAAe,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,mBAAmB,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QACzF,IAAI,eAAe;YAAE,SAAS;QAC9B,KAAK,MAAM,GAAG,IAAI,YAAY,EAAE,CAAC;YAC/B,MAAM,MAAM,GAAG,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;YAC5E,UAAU,CAAC,IAAI,CAAC;gBACd,KAAK,EAAE,GAAG,CAAC,EAAE;gBACb,MAAM,EAAE,GAAG,CAAC,MAAM;gBAClB,KAAK;gBACL,KAAK,EAAE,mBAAmB;gBAC1B,MAAM,EAAE,IAAI,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,MAAM,GAAG,CAAC,WAAW,sEAAsE,KAAK,WAAW,KAAK,wBAAwB,MAAM,CAAC,MAAM,oCAAoC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,2CAA2C,KAAK,qKAAqK;aAClc,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
@@ -1,31 +0,0 @@
1
- /** Parsed leading-prefix result. */
2
- export interface BashPrefix {
3
- /** `VAR -> value` pairs from leading inline-env assignments. Empty when none. */
4
- inlineEnv: Record<string, string>;
5
- /** Path argument of a leading `cd <path> &&|;`, or null when none. */
6
- cdTarget: string | null;
7
- /**
8
- * Branch argument of a leading `git [-C <path>] (switch|checkout)
9
- * <branch> &&|;`, or null when none, including when the branch
10
- * argument is a `-`-prefixed flag/file-restore form or an
11
- * unresolvable `$VAR` (see module doc, form 3). Task 341e024b.
12
- */
13
- branchTarget: string | null;
14
- /**
15
- * Index into the original `command` string right after the last
16
- * consumed prefix clause: `command.slice(remainderStart)` is what is
17
- * left once every recognized leading `VAR=value` / `cd <path> &&` /
18
- * `git switch <branch> &&` clause has been stripped. `0` when nothing
19
- * matched. Added (task a7eb1a71) so a caller needing to test the
20
- * REMAINING command's own head, such as
21
- * `kubectl-target-parse.ts`'s narrow kubectl-head anchor, can do so
22
- * without re-implementing this module's prefix grammar.
23
- */
24
- remainderStart: number;
25
- }
26
- /**
27
- * Parse leading inline-env and `cd <path>` idioms from a Bash command
28
- * string. Returns an empty `inlineEnv` and `cdTarget:null` when neither
29
- * idiom matches. Never throws.
30
- */
31
- export declare function parseBashPrefix(command: string): BashPrefix;