@lannguyensi/harness 0.44.0 → 0.45.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 (231) hide show
  1. package/CHANGELOG.md +1213 -0
  2. package/dist/cli/adopt/derive.d.ts +16 -7
  3. package/dist/cli/adopt/derive.js +19 -2
  4. package/dist/cli/adopt/derive.js.map +1 -1
  5. package/dist/cli/adopt/index.js +18 -3
  6. package/dist/cli/adopt/index.js.map +1 -1
  7. package/dist/cli/apply/apply.d.ts +1 -0
  8. package/dist/cli/apply/apply.js +62 -6
  9. package/dist/cli/apply/apply.js.map +1 -1
  10. package/dist/cli/apply/generate-codex-config.js +5 -6
  11. package/dist/cli/apply/generate-codex-config.js.map +1 -1
  12. package/dist/cli/apply/generate-opencode-config.d.ts +58 -0
  13. package/dist/cli/apply/generate-opencode-config.js +210 -0
  14. package/dist/cli/apply/generate-opencode-config.js.map +1 -0
  15. package/dist/cli/apply/generate-settings.d.ts +90 -32
  16. package/dist/cli/apply/generate-settings.js +133 -10
  17. package/dist/cli/apply/generate-settings.js.map +1 -1
  18. package/dist/cli/apply/index.d.ts +2 -1
  19. package/dist/cli/apply/index.js +2 -1
  20. package/dist/cli/apply/index.js.map +1 -1
  21. package/dist/cli/approve/stdin-report.d.ts +15 -0
  22. package/dist/cli/approve/stdin-report.js +1 -1
  23. package/dist/cli/approve/stdin-report.js.map +1 -1
  24. package/dist/cli/approve/understanding.d.ts +75 -0
  25. package/dist/cli/approve/understanding.js +150 -2
  26. package/dist/cli/approve/understanding.js.map +1 -1
  27. package/dist/cli/audit.d.ts +1 -1
  28. package/dist/cli/audit.js +3 -2
  29. package/dist/cli/audit.js.map +1 -1
  30. package/dist/cli/doctor/claude-mcp.d.ts +19 -1
  31. package/dist/cli/doctor/claude-mcp.js +36 -10
  32. package/dist/cli/doctor/claude-mcp.js.map +1 -1
  33. package/dist/cli/doctor/codex.d.ts +3 -1
  34. package/dist/cli/doctor/codex.js +6 -9
  35. package/dist/cli/doctor/codex.js.map +1 -1
  36. package/dist/cli/doctor/format.js +94 -8
  37. package/dist/cli/doctor/format.js.map +1 -1
  38. package/dist/cli/doctor/index.d.ts +23 -0
  39. package/dist/cli/doctor/index.js +106 -2
  40. package/dist/cli/doctor/index.js.map +1 -1
  41. package/dist/cli/doctor/opencode.d.ts +24 -0
  42. package/dist/cli/doctor/opencode.js +107 -0
  43. package/dist/cli/doctor/opencode.js.map +1 -0
  44. package/dist/cli/doctor/target-checks.d.ts +11 -0
  45. package/dist/cli/doctor/target-checks.js +25 -0
  46. package/dist/cli/doctor/target-checks.js.map +1 -0
  47. package/dist/cli/doctor/toolchain-parity.d.ts +63 -0
  48. package/dist/cli/doctor/toolchain-parity.js +154 -0
  49. package/dist/cli/doctor/toolchain-parity.js.map +1 -0
  50. package/dist/cli/doctor/types.d.ts +85 -1
  51. package/dist/cli/doctor/types.js +1 -1
  52. package/dist/cli/doctor/types.js.map +1 -1
  53. package/dist/cli/doctor/understanding-mode-env.d.ts +39 -0
  54. package/dist/cli/doctor/understanding-mode-env.js +83 -0
  55. package/dist/cli/doctor/understanding-mode-env.js.map +1 -0
  56. package/dist/cli/dry-run.js +32 -17
  57. package/dist/cli/dry-run.js.map +1 -1
  58. package/dist/cli/explain.d.ts +1 -1
  59. package/dist/cli/explain.js +1 -1
  60. package/dist/cli/explain.js.map +1 -1
  61. package/dist/cli/index.js +58 -4
  62. package/dist/cli/index.js.map +1 -1
  63. package/dist/cli/init/composer.js +36 -13
  64. package/dist/cli/init/composer.js.map +1 -1
  65. package/dist/cli/init/interactive.d.ts +7 -4
  66. package/dist/cli/init/interactive.js +79 -27
  67. package/dist/cli/init/interactive.js.map +1 -1
  68. package/dist/cli/init/profiles.d.ts +2 -2
  69. package/dist/cli/init/profiles.js +32 -1
  70. package/dist/cli/init/profiles.js.map +1 -1
  71. package/dist/cli/init/templates.d.ts +2 -1
  72. package/dist/cli/init/templates.js +130 -20
  73. package/dist/cli/init/templates.js.map +1 -1
  74. package/dist/cli/pack/approve-escape.js +69 -8
  75. package/dist/cli/pack/approve-escape.js.map +1 -1
  76. package/dist/cli/pack/hook-branch-protection.js +1 -1
  77. package/dist/cli/pack/hook-branch-protection.js.map +1 -1
  78. package/dist/cli/pack/hook-codex-pre-tool-use.js +27 -1
  79. package/dist/cli/pack/hook-codex-pre-tool-use.js.map +1 -1
  80. package/dist/cli/pack/hook-post-merge-gate.js +1 -1
  81. package/dist/cli/pack/hook-post-merge-gate.js.map +1 -1
  82. package/dist/cli/pack/hook-pre-tool-use.js +91 -4
  83. package/dist/cli/pack/hook-pre-tool-use.js.map +1 -1
  84. package/dist/cli/pack/hook-solution-acceptance.js +19 -2
  85. package/dist/cli/pack/hook-solution-acceptance.js.map +1 -1
  86. package/dist/cli/pack/understanding-report-schema-hint.d.ts +13 -0
  87. package/dist/cli/pack/understanding-report-schema-hint.js +52 -3
  88. package/dist/cli/pack/understanding-report-schema-hint.js.map +1 -1
  89. package/dist/cli/pause/index.js +1 -1
  90. package/dist/cli/pause/index.js.map +1 -1
  91. package/dist/cli/policy/intercept.d.ts +148 -0
  92. package/dist/cli/policy/intercept.js +379 -48
  93. package/dist/cli/policy/intercept.js.map +1 -1
  94. package/dist/cli/session-start/index.d.ts +12 -3
  95. package/dist/cli/session-start/index.js +67 -11
  96. package/dist/cli/session-start/index.js.map +1 -1
  97. package/dist/cli/session-start/stale-base-check.d.ts +71 -0
  98. package/dist/cli/session-start/stale-base-check.js +379 -0
  99. package/dist/cli/session-start/stale-base-check.js.map +1 -0
  100. package/dist/cli/session-start/toolchain-parity.d.ts +142 -8
  101. package/dist/cli/session-start/toolchain-parity.js +244 -36
  102. package/dist/cli/session-start/toolchain-parity.js.map +1 -1
  103. package/dist/cli/smoke/assertions.d.ts +9 -2
  104. package/dist/cli/smoke/assertions.js +9 -2
  105. package/dist/cli/smoke/assertions.js.map +1 -1
  106. package/dist/cli/uninstall/index.js +18 -2
  107. package/dist/cli/uninstall/index.js.map +1 -1
  108. package/dist/cli/validate/checks.d.ts +3 -1
  109. package/dist/cli/validate/checks.js +298 -3
  110. package/dist/cli/validate/checks.js.map +1 -1
  111. package/dist/io/claude-mcp.d.ts +122 -1
  112. package/dist/io/claude-mcp.js +214 -12
  113. package/dist/io/claude-mcp.js.map +1 -1
  114. package/dist/io/duration.js.map +1 -0
  115. package/dist/io/expand-home.js.map +1 -0
  116. package/dist/io/extract.js.map +1 -0
  117. package/dist/io/harness-lock.js +1 -1
  118. package/dist/io/harness-lock.js.map +1 -1
  119. package/dist/{runtime → io}/ledger-record.d.ts +1 -1
  120. package/dist/io/ledger-record.js.map +1 -0
  121. package/dist/policies/index.d.ts +2 -2
  122. package/dist/policies/index.js +2 -2
  123. package/dist/policies/index.js.map +1 -1
  124. package/dist/policies/ledger-client.js +10 -6
  125. package/dist/policies/ledger-client.js.map +1 -1
  126. package/dist/policies/producers.js +1 -1
  127. package/dist/policies/producers.js.map +1 -1
  128. package/dist/policies/requires.js +2 -2
  129. package/dist/policies/requires.js.map +1 -1
  130. package/dist/policy-packs/builtin/branch-protection.js +28 -3
  131. package/dist/policy-packs/builtin/branch-protection.js.map +1 -1
  132. package/dist/policy-packs/builtin/post-merge-gate.js +45 -9
  133. package/dist/policy-packs/builtin/post-merge-gate.js.map +1 -1
  134. package/dist/policy-packs/builtin/solution-acceptance-runtime.d.ts +139 -8
  135. package/dist/policy-packs/builtin/solution-acceptance-runtime.js +246 -12
  136. package/dist/policy-packs/builtin/solution-acceptance-runtime.js.map +1 -1
  137. package/dist/policy-packs/builtin/solution-acceptance.js +17 -3
  138. package/dist/policy-packs/builtin/solution-acceptance.js.map +1 -1
  139. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.d.ts +25 -0
  140. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js +89 -0
  141. package/dist/policy-packs/builtin/understanding-before-execution/active-claim.js.map +1 -0
  142. package/dist/policy-packs/builtin/understanding-before-execution/index.d.ts +13 -0
  143. package/dist/policy-packs/builtin/understanding-before-execution/index.js +39 -0
  144. package/dist/policy-packs/builtin/understanding-before-execution/index.js.map +1 -0
  145. package/dist/policy-packs/builtin/understanding-before-execution/ledger.d.ts +25 -0
  146. package/dist/policy-packs/builtin/understanding-before-execution/ledger.js +56 -0
  147. package/dist/policy-packs/builtin/understanding-before-execution/ledger.js.map +1 -0
  148. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.d.ts +20 -0
  149. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js +79 -0
  150. package/dist/policy-packs/builtin/understanding-before-execution/lifecycle.js.map +1 -0
  151. package/dist/policy-packs/builtin/understanding-before-execution/markers.d.ts +103 -0
  152. package/dist/policy-packs/builtin/understanding-before-execution/markers.js +203 -0
  153. package/dist/policy-packs/builtin/understanding-before-execution/markers.js.map +1 -0
  154. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.d.ts +177 -0
  155. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js +309 -0
  156. package/dist/policy-packs/builtin/understanding-before-execution/persisted-reports.js.map +1 -0
  157. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.d.ts +106 -0
  158. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js +209 -0
  159. package/dist/policy-packs/builtin/understanding-before-execution/post-tool-use-boundary.js.map +1 -0
  160. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.d.ts +78 -0
  161. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js +185 -0
  162. package/dist/policy-packs/builtin/understanding-before-execution/task-markers.js.map +1 -0
  163. package/dist/policy-packs/builtin/understanding-before-execution-runtime.d.ts +1 -536
  164. package/dist/policy-packs/builtin/understanding-before-execution-runtime.js +9 -1095
  165. package/dist/policy-packs/builtin/understanding-before-execution-runtime.js.map +1 -1
  166. package/dist/policy-packs/builtin/understanding-before-execution.d.ts +109 -1
  167. package/dist/policy-packs/builtin/understanding-before-execution.js +183 -15
  168. package/dist/policy-packs/builtin/understanding-before-execution.js.map +1 -1
  169. package/dist/policy-packs/registry.d.ts +11 -0
  170. package/dist/policy-packs/registry.js +1 -1
  171. package/dist/policy-packs/registry.js.map +1 -1
  172. package/dist/policy-packs/runtime.d.ts +1 -1
  173. package/dist/policy-packs/runtime.js +10 -1
  174. package/dist/policy-packs/runtime.js.map +1 -1
  175. package/dist/runtime/agent-facing.js +1 -1
  176. package/dist/runtime/agent-facing.js.map +1 -1
  177. package/dist/runtime/bash-match-facts.d.ts +9 -7
  178. package/dist/runtime/bash-match-facts.js +9 -7
  179. package/dist/runtime/bash-match-facts.js.map +1 -1
  180. package/dist/runtime/bash-match-registry.d.ts +75 -38
  181. package/dist/runtime/bash-match-registry.js +279 -232
  182. package/dist/runtime/bash-match-registry.js.map +1 -1
  183. package/dist/runtime/bash-prefix-parse.d.ts +7 -0
  184. package/dist/runtime/bash-prefix-parse.js +205 -17
  185. package/dist/runtime/bash-prefix-parse.js.map +1 -1
  186. package/dist/runtime/command-normalize.d.ts +112 -0
  187. package/dist/runtime/command-normalize.js +411 -38
  188. package/dist/runtime/command-normalize.js.map +1 -1
  189. package/dist/runtime/hermetic-spawn-guard.js +6 -0
  190. package/dist/runtime/hermetic-spawn-guard.js.map +1 -1
  191. package/dist/runtime/index.d.ts +2 -2
  192. package/dist/runtime/index.js +2 -2
  193. package/dist/runtime/index.js.map +1 -1
  194. package/dist/runtime/intercept.d.ts +78 -3
  195. package/dist/runtime/intercept.js +151 -39
  196. package/dist/runtime/intercept.js.map +1 -1
  197. package/dist/runtime/ledger-add.js +1 -1
  198. package/dist/runtime/ledger-add.js.map +1 -1
  199. package/dist/runtime/read-only-bash.js +303 -24
  200. package/dist/runtime/read-only-bash.js.map +1 -1
  201. package/dist/schema/doctor.d.ts +25 -0
  202. package/dist/schema/doctor.js +23 -0
  203. package/dist/schema/doctor.js.map +1 -0
  204. package/dist/schema/extract.js +1 -1
  205. package/dist/schema/extract.js.map +1 -1
  206. package/dist/schema/index.d.ts +76 -0
  207. package/dist/schema/index.js +9 -0
  208. package/dist/schema/index.js.map +1 -1
  209. package/dist/schema/requires.js +2 -2
  210. package/dist/schema/requires.js.map +1 -1
  211. package/dist/schema/risk.d.ts +7 -0
  212. package/dist/schema/risk.js +23 -0
  213. package/dist/schema/risk.js.map +1 -1
  214. package/dist/schema/stale-base-check.d.ts +18 -0
  215. package/dist/schema/stale-base-check.js +37 -0
  216. package/dist/schema/stale-base-check.js.map +1 -0
  217. package/dist/schema/toolchain-parity.d.ts +3 -0
  218. package/dist/schema/toolchain-parity.js +13 -0
  219. package/dist/schema/toolchain-parity.js.map +1 -1
  220. package/package.json +3 -2
  221. package/dist/policies/duration.js.map +0 -1
  222. package/dist/policies/extract.js.map +0 -1
  223. package/dist/runtime/expand-home.js.map +0 -1
  224. package/dist/runtime/ledger-record.js.map +0 -1
  225. /package/dist/{policies → io}/duration.d.ts +0 -0
  226. /package/dist/{policies → io}/duration.js +0 -0
  227. /package/dist/{runtime → io}/expand-home.d.ts +0 -0
  228. /package/dist/{runtime → io}/expand-home.js +0 -0
  229. /package/dist/{policies → io}/extract.d.ts +0 -0
  230. /package/dist/{policies → io}/extract.js +0 -0
  231. /package/dist/{runtime → io}/ledger-record.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/policy-packs/runtime.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,uDAAuD;AACvD,EAAE;AACF,wFAAwF;AACxF,iEAAiE;AACjE,iEAAiE;AACjE,qCAAqC;AACrC,EAAE;AACF,oEAAoE;AACpE,uEAAuE;AACvE,6CAA6C;AAC7C,qEAAqE;AACrE,iEAAiE;AACjE,gCAAgC;AAEhC,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,OAAO,CAAU,CAAC;AAEhE,MAAM,CAAC,MAAM,eAAe,GAAY,aAAa,CAAC;AAEtD,MAAM,UAAU,SAAS,CAAC,KAAc;IACtC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAA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AAS;QAAE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC1E,IAAI,SAAS,CAAC,GAAG,CAAC;QAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;IAC3D,OAAO;QACL,OAAO,EAAE,eAAe;QACxB,OAAO,EAAE,wBAAwB,IAAI,CAAC,SAAS,CAC7C,GAAG,CACJ,sBAAsB,eAAe,eAAe,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG;KAClF,CAAC;AACJ,CAAC"}
@@ -27,7 +27,7 @@
27
27
  // the builtins (SESSION_ID / REPO / BRANCH / TOOL_NAME / CWD).
28
28
  // Unresolved vars are left literal so the agent can still read what
29
29
  // was expected (mirrors renderProducers' best-effort substitution).
30
- import { substituteTemplate } from "../policies/extract.js";
30
+ import { substituteTemplate } from "../io/extract.js";
31
31
  export function buildAgentFacingBlock(ux, values) {
32
32
  const sub = (s) => substituteTemplate(s, values).result;
33
33
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"agent-facing.js","sourceRoot":"","sources":["../../src/runtime/agent-facing.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,EAAE;AACF,uEAAuE;AACvE,mEAAmE;AACnE,sEAAsE;AACtE,mEAAmE;AACnE,qCAAqC;AACrC,EAAE;AACF,0BAA0B;AAC1B,EAAE;AACF,gDAAgD;AAChD,EAAE;AACF,cAAc;AACd,oCAAoC;AACpC,EAAE;AACF,SAAS;AACT,wBAAwB;AACxB,EAAE;AACF,iEAAiE;AACjE,oEAAoE;AACpE,mEAAmE;AACnE,sEAAsE;AACtE,oCAAoC;AACpC,EAAE;AACF,qEAAqE;AACrE,oEAAoE;AACpE,+DAA+D;AAC/D,oEAAoE;AACpE,oEAAoE;AAEpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAS5D,MAAM,UAAU,qBAAqB,CACnC,EAAY,EACZ,MAA8B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MatchFacts(policies: readonly (BashMatchPolicyLike | Policy)[]): BashMatchFacts;
48
48
  /**
49
- * "Is `token` gated by ANY shipped `bash_match` policy?" — the one-call
50
- * question both incidents got wrong. Real caller (F8, fix round):
51
- * `bash-match-registry.ts`'s `checkRegisteredSets` covers-purity check,
52
- * which asks this once per declared `member` of every
53
- * "covers-gated-head-tokens" registration. Takes only the `gatedHeadTokens`
54
- * slice of `BashMatchFacts` (not the full shape) so a caller holding the
55
- * same narrowed `Pick` `checkRegisteredSets` accepts can call this directly
49
+ * "Is `token` gated by ANY shipped `bash_match` policy?", the one-call
50
+ * question both incidents got wrong. Real caller (task 209e6dc4 redesign):
51
+ * `bash-match-registry.ts`'s `checkRegisteredSets`, via its
52
+ * `isLegitimatelyCoverable` helper, a source-based probe over the live
53
+ * gated-head-token vocabulary (and `PLAUSIBLE_NON_GATED_HEAD_TOKENS`),
54
+ * never a per-declared-`member` walk; the registration surface no longer
55
+ * has a `members` field to walk. Takes only the `gatedHeadTokens` slice of
56
+ * `BashMatchFacts` (not the full shape) so a caller holding the same
57
+ * narrowed `Pick` `checkRegisteredSets` accepts can call this directly
56
58
  * without widening its own parameter type.
57
59
  */
58
60
  export declare function isHeadTokenGated(facts: Pick<BashMatchFacts, "gatedHeadTokens">, token: string): boolean;
@@ -179,13 +179,15 @@ function assertStandaloneWord(pattern, word, policyName) {
179
179
  }
180
180
  }
181
181
  /**
182
- * "Is `token` gated by ANY shipped `bash_match` policy?" — the one-call
183
- * question both incidents got wrong. Real caller (F8, fix round):
184
- * `bash-match-registry.ts`'s `checkRegisteredSets` covers-purity check,
185
- * which asks this once per declared `member` of every
186
- * "covers-gated-head-tokens" registration. Takes only the `gatedHeadTokens`
187
- * slice of `BashMatchFacts` (not the full shape) so a caller holding the
188
- * same narrowed `Pick` `checkRegisteredSets` accepts can call this directly
182
+ * "Is `token` gated by ANY shipped `bash_match` policy?", the one-call
183
+ * question both incidents got wrong. Real caller (task 209e6dc4 redesign):
184
+ * `bash-match-registry.ts`'s `checkRegisteredSets`, via its
185
+ * `isLegitimatelyCoverable` helper, a source-based probe over the live
186
+ * gated-head-token vocabulary (and `PLAUSIBLE_NON_GATED_HEAD_TOKENS`),
187
+ * never a per-declared-`member` walk; the registration surface no longer
188
+ * has a `members` field to walk. Takes only the `gatedHeadTokens` slice of
189
+ * `BashMatchFacts` (not the full shape) so a caller holding the same
190
+ * narrowed `Pick` `checkRegisteredSets` accepts can call this directly
189
191
  * without widening its own parameter type.
190
192
  */
191
193
  export function isHeadTokenGated(facts, token) {
@@ -1 +1 @@
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;AACzE,uEAAuE;AACvE,0EAA0E;AAC1E,YAAY;AACZ,EAAE;AACF,qEAAqE;AACrE,gEAAgE;AAChE,mEAAmE;AACnE,uEAAuE;AACvE,uEAAuE;AACvE,gEAAgE;AAChE,wEAAwE;AACxE,wEAAwE;AACxE,oEAAoE;AACpE,qEAAqE;AACrE,mEAAmE;AACnE,kDAAkD;AAClD,EAAE;AACF,yEAAyE;AACzE,4EAA4E;AAC5E,4EAA4E;AAC5E,sEAAsE;AACtE,yEAAyE;AACzE,gCAAgC;AAChC,EAAE;AACF,gEAAgE;AAChE,wEAAwE;AACxE,iEAAiE;AACjE,sEAAsE;AACtE,wEAAwE;AACxE,wEAAwE;AACxE,SAAS;AA0BT;;;;;;;;;GASG;AACH,MAAM,wBAAwB,GAAgD;IAC5E,0BAA0B,EAAE;QAC1B,UAAU,EAAE,CAAC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CAAC;IAED,OAAO;QACL,WAAW,EAAE,WAAW;QACxB,QAAQ,EAAE,WAAW;QACrB,eAAe;QACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;KAC/C,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAe,EAAE,IAAY,EAAE,UAAkB;IAC7E,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;IACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,mCAAmC,UAAU,uEAAuE,IAAI,oCAAoC,OAAO,oGAAoG,CACxQ,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAA8C,EAC9C,KAAa;IAEb,OAAO,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1C,CAAC"}
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;AACzE,uEAAuE;AACvE,0EAA0E;AAC1E,YAAY;AACZ,EAAE;AACF,qEAAqE;AACrE,gEAAgE;AAChE,mEAAmE;AACnE,uEAAuE;AACvE,uEAAuE;AACvE,gEAAgE;AAChE,wEAAwE;AACxE,wEAAwE;AACxE,oEAAoE;AACpE,qEAAqE;AACrE,mEAAmE;AACnE,k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,GAAG,CAAC,CAAC;QACjC,CAAC;QACD,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;YACjC,oBAAoB,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,CAAC,CAAC;QAClD,CAAC;QAED,WAAW,CAAC,IAAI,CAAC;YACf,UAAU;YACV,OAAO;YACP,UAAU,EAAE,OAAO,CAAC,UAAU;YAC9B,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,WAAW,EAAE,WAAW;QACxB,QAAQ,EAAE,WAAW;QACrB,eAAe;QACf,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,KAAK,CAAC;KAC/C,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,OAAe,EAAE,IAAY,EAAE,UAAkB;IAC7E,MAAM,gBAAgB,GAAG,IAAI,MAAM,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;IACrD,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;QACpC,MAAM,IAAI,KAAK,CACb,mCAAmC,UAAU,uEAAuE,IAAI,oCAAoC,OAAO,oGAAoG,CACxQ,CAAC;IACJ,CAAC;AACH,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAC9B,KAA8C,EAC9C,KAAa;IAEb,OAAO,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC1C,CAAC"}
@@ -1,56 +1,76 @@
1
1
  import type { BashMatchFacts } from "./bash-match-facts.js";
2
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;
3
20
  interface RegisteredHeadTokenSetCommon {
4
- /** Stable identifier, used in failure messages and by the unregistered-set scan's cross-reference. */
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
+ */
5
28
  readonly id: string;
6
- /** File the set is actually declared in, for failure messages. */
29
+ /** File the set is actually declared in, for failure messages. Descriptive only, same caveat as `id`. */
7
30
  readonly module: string;
8
- /** Membership test — `Set.has` or `RegExp.test`, see the module header. */
9
- readonly has: (token: string) => boolean;
31
+ /** The actual constant this registration mirrors — see `HeadTokenSource`. */
32
+ readonly source: HeadTokenSource;
10
33
  readonly description: string;
11
34
  }
12
35
  /**
13
36
  * A "covers-gated-head-tokens" registration — the set exists so the engine
14
- * RECOGNISES these head tokens. `members` is NON-OPTIONAL (fix round 2,
15
- * S1): the round-1 shape had this field OPTIONAL, and
16
- * `checkRegisteredSets`'s covers-purity check (c) simply `continue`d past
17
- * any registration that omitted it — a new module registered as
18
- * "covers-gated-head-tokens" WITHOUT `members` measurably passed the full
19
- * suite (167 files / 3980 tests) even with a gated head token laundered
20
- * inside its `has()` predicate. Making `members` mandatory on this arm
21
- * turns that escape into a TYPE ERROR: a covers registration that omits
22
- * `members` now fails `tsc`, not merely a test. See `checkRegisteredSets`
23
- * checks (c), (d), (e) below for the three independent things `members`
24
- * (and `has()`) are cross-checked against.
37
+ * RECOGNISES these head tokens.
25
38
  */
26
39
  export interface CoversHeadTokenSet extends RegisteredHeadTokenSetCommon {
27
40
  readonly intent: "covers-gated-head-tokens";
28
- readonly members: readonly string[];
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>;
29
53
  }
30
54
  /**
31
55
  * A "must-not-contain-gated-head-token" registration — the set exists for
32
56
  * some OTHER purpose and must never contain a token the manifest itself
33
- * gates (the dbc6d303 CRITICAL shape). `members` is optional here: no
34
- * purity/redundancy/predicate-purity semantics apply to this arm — only
35
- * `has()` is ever asked anything (check (a)).
57
+ * gates (the dbc6d303 CRITICAL shape). No purity/redundancy semantics apply
58
+ * to this arm — only `sourceHas` is ever asked anything (check (a)).
36
59
  */
37
60
  export interface MustNotContainHeadTokenSet extends RegisteredHeadTokenSetCommon {
38
61
  readonly intent: "must-not-contain-gated-head-token";
39
- readonly members?: readonly string[];
40
62
  }
41
- /**
42
- * Discriminated union on `intent` (fix round 2, S1) — see
43
- * `CoversHeadTokenSet`'s doc for why the split exists.
44
- */
63
+ /** Discriminated union on `intent`. */
45
64
  export type RegisteredHeadTokenSet = CoversHeadTokenSet | MustNotContainHeadTokenSet;
46
65
  export declare const REGISTERED_HEAD_TOKEN_SETS: readonly RegisteredHeadTokenSet[];
47
66
  /**
48
- * Which of the five independent checks flagged this violation (fix round
49
- * 2): a fixture test asserting on one check's behaviour must not be
50
- * silently polluted by another check's unrelated finding on the same
51
- * (setId, token) pair — see `tests/runtime/bash-match-registry.test.ts`.
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.
52
72
  */
53
- export type RegistrationCheck = "must-not-contain" | "covers-completeness" | "covers-purity" | "covers-redundancy" | "covers-predicate-purity";
73
+ export type RegistrationCheck = "must-not-contain" | "covers-completeness" | "covers-empty" | "covers-purity" | "covers-redundancy";
54
74
  export interface RegistrationViolation {
55
75
  readonly setId: string;
56
76
  readonly intent: RegisteredSetIntent;
@@ -58,18 +78,35 @@ export interface RegistrationViolation {
58
78
  readonly check: RegistrationCheck;
59
79
  readonly reason: string;
60
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[];
61
103
  /**
62
104
  * Check every registered set against the live facts. Returns an EMPTY
63
105
  * array when clean. `registrations` and `documentedUncovered` default to
64
- * the real, shipped values (F5 fix-round correction: the
65
- * `documentedUncovered` default previously silently fell back to an empty
66
- * set, which raised 4 FALSE violations — tee, cp, env, unset — when called
67
- * with only `facts`; pinned by
68
- * `tests/runtime/bash-match-head-token-drift.test.ts`'s
69
- * "checkRegisteredSets(liveFacts())" defaults test) but accept fixtures —
70
- * see `tests/runtime/bash-match-registry.test.ts`'s regression tests for
71
- * the historical incidents, which pass deliberately-broken fixtures to
72
- * prove this function catches their exact shape.
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.
73
110
  */
74
111
  export declare function checkRegisteredSets(facts: Pick<BashMatchFacts, "gatedHeadTokens" | "classify">, registrations?: readonly RegisteredHeadTokenSet[], documentedUncovered?: ReadonlySet<string>): RegistrationViolation[];
75
112
  export {};