@holmes-lab/holmes-kit 0.29.0 → 0.31.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 (169) hide show
  1. package/CHANGELOG.md +556 -0
  2. package/README.md +15 -5
  3. package/bin/holmes-hook-antigravity.js +4 -0
  4. package/bin/holmes-kit.js +4 -0
  5. package/bin/holmes-pre-push.js +3 -0
  6. package/bin/holmes-stop-antigravity.js +4 -0
  7. package/dist/.build-id +1 -1
  8. package/dist/holmes/cli/agents-guidance-history.d.ts +1 -1
  9. package/dist/holmes/cli/agents-guidance-history.js +11 -2
  10. package/dist/holmes/cli/agents-guidance.d.ts +1 -0
  11. package/dist/holmes/cli/agents-guidance.js +11 -8
  12. package/dist/holmes/cli/agents.d.ts +41 -0
  13. package/dist/holmes/cli/agents.js +382 -2
  14. package/dist/holmes/cli/attest.d.ts +2 -0
  15. package/dist/holmes/cli/attest.js +66 -15
  16. package/dist/holmes/cli/ci-gate.js +16 -1
  17. package/dist/holmes/cli/claude-switches.d.ts +95 -0
  18. package/dist/holmes/cli/claude-switches.js +967 -0
  19. package/dist/holmes/cli/codex-hooks.d.ts +77 -0
  20. package/dist/holmes/cli/codex-hooks.js +802 -0
  21. package/dist/holmes/cli/codex-oracle.d.ts +194 -0
  22. package/dist/holmes/cli/codex-oracle.js +1245 -0
  23. package/dist/holmes/cli/codex-toml.d.ts +58 -1
  24. package/dist/holmes/cli/codex-toml.js +456 -40
  25. package/dist/holmes/cli/doctor.d.ts +108 -8
  26. package/dist/holmes/cli/doctor.js +1408 -98
  27. package/dist/holmes/cli/index.js +23 -11
  28. package/dist/holmes/cli/init.d.ts +13 -0
  29. package/dist/holmes/cli/init.js +749 -77
  30. package/dist/holmes/cli/interactive-prompt.js +2 -2
  31. package/dist/holmes/cli/mcp-launcher.d.ts +64 -6
  32. package/dist/holmes/cli/mcp-launcher.js +189 -6
  33. package/dist/holmes/cli/mcp-version.js +13 -2
  34. package/dist/holmes/cli/settings-merge.js +8 -2
  35. package/dist/holmes/cli/upgrade.d.ts +13 -0
  36. package/dist/holmes/cli/upgrade.js +116 -23
  37. package/dist/holmes/cli/workspace-scope.d.ts +22 -0
  38. package/dist/holmes/cli/workspace-scope.js +375 -0
  39. package/dist/holmes/cli/worktree-readiness.d.ts +1 -0
  40. package/dist/holmes/cli/worktree-readiness.js +17 -3
  41. package/dist/holmes/cpg/cpg-scanner.d.ts +29 -0
  42. package/dist/holmes/cpg/cpg-scanner.js +403 -3
  43. package/dist/holmes/cpg/cycle-detect.js +2 -1
  44. package/dist/holmes/cpg/forbidden-edges.js +9 -2
  45. package/dist/holmes/cpg/required-calls.js +8 -1
  46. package/dist/holmes/governance/autonomy.d.ts +9 -0
  47. package/dist/holmes/governance/autonomy.js +28 -1
  48. package/dist/holmes/governance/constitution-debt.js +3 -2
  49. package/dist/holmes/governance/constitution.js +15 -3
  50. package/dist/holmes/governance/provenance-chain.js +3 -2
  51. package/dist/holmes/governance/push-gate-runner.js +4 -3
  52. package/dist/holmes/guardrail/dependency-delta.js +4 -3
  53. package/dist/holmes/guardrail/linear-match.d.ts +57 -0
  54. package/dist/holmes/guardrail/linear-match.js +256 -0
  55. package/dist/holmes/guardrail/risk-classifier.d.ts +6 -7
  56. package/dist/holmes/guardrail/risk-classifier.js +931 -44
  57. package/dist/holmes/guardrail/risk-types.d.ts +6 -0
  58. package/dist/holmes/guardrail/scope-judgment.d.ts +4 -24
  59. package/dist/holmes/guardrail/scope-judgment.js +100 -23
  60. package/dist/holmes/guardrail/shell-words.d.ts +42 -0
  61. package/dist/holmes/guardrail/shell-words.js +1720 -0
  62. package/dist/holmes/guardrail/write-target.d.ts +168 -3
  63. package/dist/holmes/guardrail/write-target.js +2379 -87
  64. package/dist/holmes/hooks/adapters/antigravity.d.ts +3 -1
  65. package/dist/holmes/hooks/adapters/antigravity.js +115 -11
  66. package/dist/holmes/hooks/pre-tool-use.d.ts +32 -6
  67. package/dist/holmes/hooks/pre-tool-use.js +923 -87
  68. package/dist/holmes/hooks/rtm-refresh-child.d.ts +22 -1
  69. package/dist/holmes/hooks/rtm-refresh-child.js +102 -18
  70. package/dist/holmes/hooks/rtm-refresh.d.ts +20 -1
  71. package/dist/holmes/hooks/rtm-refresh.js +60 -15
  72. package/dist/holmes/hooks/session-start.d.ts +10 -0
  73. package/dist/holmes/hooks/session-start.js +31 -7
  74. package/dist/holmes/hooks/stop.d.ts +2 -1
  75. package/dist/holmes/hooks/stop.js +197 -91
  76. package/dist/holmes/mcp/approval-adapters.d.ts +22 -0
  77. package/dist/holmes/mcp/approval-adapters.js +21 -0
  78. package/dist/holmes/mcp/approval-commit.d.ts +20 -0
  79. package/dist/holmes/mcp/approval-commit.js +108 -0
  80. package/dist/holmes/mcp/approval-intent.d.ts +44 -0
  81. package/dist/holmes/mcp/approval-intent.js +67 -0
  82. package/dist/holmes/mcp/approval-policy.d.ts +14 -0
  83. package/dist/holmes/mcp/approval-policy.js +18 -0
  84. package/dist/holmes/mcp/elicit-approval.d.ts +2 -0
  85. package/dist/holmes/mcp/elicit-approval.js +8 -3
  86. package/dist/holmes/mcp/handlers/graph-operations.d.ts +17 -1
  87. package/dist/holmes/mcp/handlers/graph-operations.js +15 -6
  88. package/dist/holmes/mcp/handlers/maintenance-analysis.js +11 -5
  89. package/dist/holmes/mcp/handlers/maintenance-evidence.js +3 -2
  90. package/dist/holmes/mcp/handlers/phase-queries.d.ts +22 -7
  91. package/dist/holmes/mcp/handlers/phase-queries.js +81 -2
  92. package/dist/holmes/mcp/handlers/requirement-triage.d.ts +26 -0
  93. package/dist/holmes/mcp/handlers/requirement-triage.js +48 -11
  94. package/dist/holmes/mcp/handlers/review-evidence.d.ts +2 -1
  95. package/dist/holmes/mcp/handlers/review-evidence.js +15 -5
  96. package/dist/holmes/mcp/handlers/slice-orchestration.d.ts +18 -0
  97. package/dist/holmes/mcp/handlers/slice-orchestration.js +122 -16
  98. package/dist/holmes/mcp/handlers/spec-approval.d.ts +35 -2
  99. package/dist/holmes/mcp/handlers/spec-approval.js +175 -57
  100. package/dist/holmes/mcp/handlers/spec-authoring.js +36 -3
  101. package/dist/holmes/mcp/handlers/spec-queries.d.ts +39 -3
  102. package/dist/holmes/mcp/handlers/spec-queries.js +114 -7
  103. package/dist/holmes/mcp/handlers/test-execution.js +9 -3
  104. package/dist/holmes/mcp/handlers.d.ts +126 -8
  105. package/dist/holmes/mcp/handlers.js +109 -18
  106. package/dist/holmes/mcp/harness-attestation.d.ts +20 -0
  107. package/dist/holmes/mcp/harness-attestation.js +179 -0
  108. package/dist/holmes/mcp/maintenance-analyze.js +28 -4
  109. package/dist/holmes/mcp/maintenance-evidence.js +1 -1
  110. package/dist/holmes/mcp/requirement-triage-evidence.d.ts +72 -2
  111. package/dist/holmes/mcp/requirement-triage-evidence.js +227 -1
  112. package/dist/holmes/mcp/server.js +24 -3
  113. package/dist/holmes/mcp/supervisor.js +7 -3
  114. package/dist/holmes/mcp/tool-schemas.d.ts +8 -0
  115. package/dist/holmes/mcp/tool-schemas.js +54 -7
  116. package/dist/holmes/mcp/validate-args.js +12 -0
  117. package/dist/holmes/project/bounded-io.d.ts +102 -0
  118. package/dist/holmes/project/bounded-io.js +212 -0
  119. package/dist/holmes/project/change-source.js +3 -1
  120. package/dist/holmes/project/ci-runs.js +3 -2
  121. package/dist/holmes/project/ignore.d.ts +31 -2
  122. package/dist/holmes/project/ignore.js +409 -50
  123. package/dist/holmes/project/regular-file-guard.d.ts +13 -0
  124. package/dist/holmes/project/regular-file-guard.js +149 -0
  125. package/dist/holmes/project/root.js +12 -3
  126. package/dist/holmes/refresh/freshness-coordinator.d.ts +67 -0
  127. package/dist/holmes/refresh/freshness-coordinator.js +230 -0
  128. package/dist/holmes/reverse/anchor.js +4 -3
  129. package/dist/holmes/reverse/scan.js +6 -2
  130. package/dist/holmes/review/commit-text.js +3 -2
  131. package/dist/holmes/review/condition-hunk-replay.d.ts +12 -0
  132. package/dist/holmes/review/condition-hunk-replay.js +13 -2
  133. package/dist/holmes/review/condition-hunk-resolution.js +59 -8
  134. package/dist/holmes/review/failed-test-names.js +13 -10
  135. package/dist/holmes/review/findings.js +3 -1
  136. package/dist/holmes/review/kills-check.js +6 -1
  137. package/dist/holmes/review/point-in-time-replay.js +5 -4
  138. package/dist/holmes/review/replay-corpus.js +5 -4
  139. package/dist/holmes/review/requirement-triage-human-records.d.ts +59 -0
  140. package/dist/holmes/review/requirement-triage-human-records.js +119 -0
  141. package/dist/holmes/review/run-replay.js +3 -2
  142. package/dist/holmes/review/scope.js +6 -1
  143. package/dist/holmes/review/temporal-prior.js +3 -2
  144. package/dist/holmes/review/test-evidence.js +3 -2
  145. package/dist/holmes/review/test-outcomes.d.ts +28 -0
  146. package/dist/holmes/review/test-outcomes.js +92 -2
  147. package/dist/holmes/review/test-runner.d.ts +6 -0
  148. package/dist/holmes/review/test-runner.js +36 -15
  149. package/dist/holmes/rtm/advisory-outcomes.js +3 -2
  150. package/dist/holmes/rtm/anchor-ids.js +42 -2
  151. package/dist/holmes/rtm/file-anchors.js +4 -1
  152. package/dist/holmes/rtm/ftt-fulfilment.js +8 -3
  153. package/dist/holmes/rtm/git-changes.js +3 -1
  154. package/dist/holmes/rtm/graph-store.js +3 -2
  155. package/dist/holmes/rtm/test-scope.js +9 -4
  156. package/dist/holmes/spec/compat-impact.d.ts +25 -4
  157. package/dist/holmes/spec/compat-impact.js +682 -11
  158. package/dist/holmes/spec/entity-git-snapshot.js +3 -2
  159. package/dist/holmes/spec/entity-integration.js +3 -2
  160. package/dist/holmes/spec/entity-renumber-transaction.d.ts +19 -0
  161. package/dist/holmes/spec/entity-renumber-transaction.js +79 -6
  162. package/dist/holmes/spec/remote-spec-refs.js +3 -2
  163. package/dist/holmes/spec/renumber.js +25 -10
  164. package/dist/holmes/spec/spec-parser.js +9 -3
  165. package/dist/holmes/spec/yaml-scalar.js +2 -2
  166. package/dist/holmes/update/refresh.js +3 -1
  167. package/dist/holmes/update/update-notice.d.ts +6 -0
  168. package/dist/holmes/update/update-notice.js +18 -1
  169. package/package.json +11 -4
@@ -35,6 +35,12 @@ export interface RiskAction {
35
35
  * conservative: every `.ax` path is treated as protected.
36
36
  */
37
37
  projectRoot?: string;
38
+ /**
39
+ * @implements A-SPEC-728 (round 17)
40
+ * The directory the harness runs the shell in (inside the project). The base the segment model
41
+ * starts from; defaults to `projectRoot`.
42
+ */
43
+ cwd?: string;
38
44
  }
39
45
  export interface RiskThresholds {
40
46
  blastRadiusConfirm?: number;
@@ -1,32 +1,12 @@
1
- /**
2
- * The de-amplified scope judgment — PURE (no fs, no git; the hook gathers, this decides).
3
- *
4
- * Field basis (2026-08-23, jarvis): one test-class addition to an ALREADY-ANCHORED file cost
5
- * >=3 human interventions, because the old model re-checked Files-to-Touch on every edit of an
6
- * anchored file (double registration: the anchor said "this file belongs to X" and FtT had to
7
- * say it again), while its matcher quietly widened every FILE token to the file's whole parent
8
- * directory (`src/a/x.ts` covered all of `src/a/`). Both directions were amplification.
9
- *
10
- * The model here splits TENURE from ADMISSION:
11
- * - TENURE: a file already anchored ON DISK is in its specs' scope — editing it is free. The
12
- * entitlement comes from the fact that the file passed admission when it first joined (gated
13
- * writes are the only way anchors legitimately reach disk), or was deliberately grandfathered
14
- * at adoption (REQ-508's explicit acceptance of the 252-file reality).
15
- * - ADMISSION: joining a file to a spec — a new file's payload anchors, or a re-anchor bringing
16
- * an id the disk does not carry — must pass a gate: an FtT glob match, or the test-file
17
- * dispensation (coverage growth is what ART-4 ASKS for), or the caller's out-of-band
18
- * code-write approval (judged by the hook, not here).
19
- *
20
- * Anchor DELETION never blocks (un-anchoring may be legitimate refactoring) but is surfaced as
21
- * a warning — silent RTM loss is the failure mode C12 taught us to fear.
22
- */
23
1
  /** Repo test conventions — the single census every dispensation consumer shares. */
24
2
  export declare function isTestPath(relPath: string): boolean;
25
3
  /**
26
4
  * One FtT token against one repo-relative path. `**` crosses separators, `*` does not; a literal
27
5
  * token with an extension names EXACTLY that file (the parent-directory widening is gone); a
28
- * literal directory token covers its subtree. The regex build is linear — each glob char maps to
29
- * one bounded fragment, so no ReDoS surface.
6
+ * literal directory token covers its subtree.
7
+ * @implements A-SPEC-733 (round 7) — the glob is matched by a table walk, not a built regex: adjacent
8
+ * stars became nested `.*`/`[^/]*` that backtracked exponentially (24 stars: 85.7 s in the edit gate —
9
+ * measured; the "no ReDoS surface" note here was wrong).
30
10
  */
31
11
  export declare function matchesFtt(token: string, relPath: string): boolean;
32
12
  export declare function isRootFileToken(token: string): boolean;
@@ -1,5 +1,11 @@
1
1
  "use strict";
2
- // @implements A-SPEC-508.1
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isTestPath = isTestPath;
4
+ exports.matchesFtt = matchesFtt;
5
+ exports.isRootFileToken = isRootFileToken;
6
+ exports.fttPathTokens = fttPathTokens;
7
+ exports.judgeScope = judgeScope;
8
+ // @implements A-SPEC-508.1, A-SPEC-733
3
9
  /**
4
10
  * The de-amplified scope judgment — PURE (no fs, no git; the hook gathers, this decides).
5
11
  *
@@ -22,12 +28,7 @@
22
28
  * Anchor DELETION never blocks (un-anchoring may be legitimate refactoring) but is surfaced as
23
29
  * a warning — silent RTM loss is the failure mode C12 taught us to fear.
24
30
  */
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.isTestPath = isTestPath;
27
- exports.matchesFtt = matchesFtt;
28
- exports.isRootFileToken = isRootFileToken;
29
- exports.fttPathTokens = fttPathTokens;
30
- exports.judgeScope = judgeScope;
31
+ const linear_match_1 = require("./linear-match");
31
32
  /** Repo test conventions — the single census every dispensation consumer shares. */
32
33
  function isTestPath(relPath) {
33
34
  const base = relPath.split('/').at(-1) ?? '';
@@ -43,27 +44,50 @@ function isTestPath(relPath) {
43
44
  /**
44
45
  * One FtT token against one repo-relative path. `**` crosses separators, `*` does not; a literal
45
46
  * token with an extension names EXACTLY that file (the parent-directory widening is gone); a
46
- * literal directory token covers its subtree. The regex build is linear — each glob char maps to
47
- * one bounded fragment, so no ReDoS surface.
47
+ * literal directory token covers its subtree.
48
+ * @implements A-SPEC-733 (round 7) — the glob is matched by a table walk, not a built regex: adjacent
49
+ * stars became nested `.*`/`[^/]*` that backtracked exponentially (24 stars: 85.7 s in the edit gate —
50
+ * measured; the "no ReDoS surface" note here was wrong).
48
51
  */
49
52
  function matchesFtt(token, relPath) {
50
- const tok = token.replace(/\/+$/, '');
53
+ const tok = (0, linear_match_1.trimTrailing)(token, '/'); // A-SPEC-733 (round 8): a trailing-run trim is linear (a slash-run token was not)
51
54
  if (tok === '')
52
55
  return false;
53
- if (tok.includes('*')) {
54
- const rx = tok.split(/(\*\*|\*)/).map((part) => {
55
- if (part === '**')
56
- return '.*';
57
- if (part === '*')
58
- return '[^/]*';
59
- return part.replace(/[.+?^${}()|[\]\\]/g, '\\$&');
60
- }).join('');
61
- return new RegExp(`^${rx}$`).test(relPath);
62
- }
56
+ if (tok.includes('*'))
57
+ return globMatches(tok.split(/(\*\*|\*)/).filter((p) => p !== ''), relPath);
63
58
  if (/\.[A-Za-z0-9]+$/.test(tok))
64
59
  return relPath === tok; // file literal: that file only
65
60
  return relPath === tok || relPath.startsWith(tok + '/'); // dir literal: its subtree
66
61
  }
62
+ /**
63
+ * Anchored glob match in O(parts × path): `**` any characters, `*` any but `/`, literals exact —
64
+ * the same language as the regex it replaces (`.*`, `[^/]*`, escaped literal).
65
+ */
66
+ function globMatches(parts, path) {
67
+ const n = path.length;
68
+ let prev = new Uint8Array(n + 1);
69
+ prev[0] = 1;
70
+ for (const part of parts) {
71
+ const next = new Uint8Array(n + 1);
72
+ if (part === '**' || part === '*') {
73
+ const any = part === '**';
74
+ for (let j = 0; j <= n; j++) {
75
+ if (prev[j])
76
+ next[j] = 1;
77
+ else if (j > 0 && next[j - 1] && (any || path[j - 1] !== '/'))
78
+ next[j] = 1;
79
+ }
80
+ }
81
+ else {
82
+ const L = part.length;
83
+ for (let j = 0; j + L <= n; j++)
84
+ if (prev[j] && path.startsWith(part, j))
85
+ next[j + L] = 1;
86
+ }
87
+ prev = next;
88
+ }
89
+ return prev[n] === 1;
90
+ }
67
91
  /**
68
92
  * @implements A-SPEC-654
69
93
  * A repository-ROOT file named as a Files-to-Touch item: a bare filename with an extension that starts
@@ -85,17 +109,70 @@ function isRootFileToken(token) {
85
109
  * admits that exact path (`matchesFtt`), and the grader requires a directory-scoped token of its own.
86
110
  */
87
111
  function fttPathTokens(fttText) {
88
- const tokens = [...(fttText.match(/[\w@.*-]+(?:\/[\w@.*-]+)+/g) ?? [])];
112
+ const tokens = slashedTokens(fttText);
113
+ // A-SPEC-733 (round 6): a set, not `tokens.includes` per item — that was quadratic (640 KB: 3.7 s).
114
+ const seen = new Set(tokens);
89
115
  for (const line of fttText.split('\n')) {
90
116
  const item = /^\s*[-*]\s+(.*)$/.exec(line);
91
117
  if (!item)
92
118
  continue;
93
- const word = (item[1].trim().split(/\s+/)[0] ?? '').replace(/^[`'"]+|[`'"]+$/g, '');
94
- if (isRootFileToken(word) && !tokens.includes(word))
119
+ const word = trimQuotes(item[1].trim().split(/\s+/)[0] ?? '');
120
+ if (isRootFileToken(word) && !seen.has(word)) {
121
+ seen.add(word);
95
122
  tokens.push(word);
123
+ }
96
124
  }
97
125
  return tokens;
98
126
  }
127
+ /** Quotes trimmed from both ends with index loops (the `[`'"]+$` regex backtracked over a run —
128
+ * 240 KB: 33.7 s in the edit gate, measured; A-SPEC-733 round 7). */
129
+ function trimQuotes(word) {
130
+ const q = (c) => c === '`' || c === "'" || c === '"';
131
+ let a = 0, b = word.length;
132
+ while (a < b && q(word[a]))
133
+ a++;
134
+ while (b > a && q(word[b - 1]))
135
+ b--;
136
+ return word.slice(a, b);
137
+ }
138
+ /**
139
+ * @implements A-SPEC-733 (round 5) — exactly the matches of `/[\w@.*-]+(?:\/[\w@.*-]+)+/g`, in one pass:
140
+ * that regex backtracked quadratically on a long run without `/` (measured: 160 KB, 15 s — and this
141
+ * extractor runs in the edit gate). Each maximal run of `[A-Za-z0-9_@.*-/]` is split at `/`; every
142
+ * group of two or more consecutive non-empty segments is one token.
143
+ */
144
+ function slashedTokens(text) {
145
+ const out = [];
146
+ const isSeg = (c) => (c >= 48 && c <= 57) || (c >= 65 && c <= 90) || (c >= 97 && c <= 122) || c === 95 || c === 64 || c === 46 || c === 42 || c === 45;
147
+ let group = [];
148
+ let seg = '';
149
+ const endGroup = () => { if (group.length >= 2)
150
+ out.push(group.join('/')); group = []; };
151
+ const endSeg = (slash) => {
152
+ if (seg !== '') {
153
+ group.push(seg);
154
+ seg = '';
155
+ if (!slash)
156
+ endGroup();
157
+ }
158
+ else
159
+ endGroup(); // an empty segment (`//`, a leading or trailing `/`) splits the group
160
+ };
161
+ for (let i = 0; i < text.length; i++) {
162
+ const c = text.charCodeAt(i);
163
+ if (isSeg(c)) {
164
+ seg += text[i];
165
+ continue;
166
+ }
167
+ if (c === 47) {
168
+ endSeg(true);
169
+ continue;
170
+ } // '/'
171
+ endSeg(false);
172
+ }
173
+ endSeg(false);
174
+ return out;
175
+ }
99
176
  // @implements A-SPEC-508.1
100
177
  function judgeScope(input) {
101
178
  const disk = new Set(input.diskAnchorIds);
@@ -0,0 +1,42 @@
1
+ import { GlobMatcher } from './write-target';
2
+ export interface Word {
3
+ text: string;
4
+ known: boolean;
5
+ glob: boolean;
6
+ }
7
+ export interface SimpleCommand {
8
+ words: Word[];
9
+ redirects: Word[];
10
+ }
11
+ /** Bodies of `$(…)`, backticks and `<(…)`/`>(…)`: they RUN, so they are judged as commands too. */
12
+ export interface ParsedSegment {
13
+ commands: SimpleCommand[];
14
+ subs: string[];
15
+ overflow: boolean;
16
+ }
17
+ export declare function shellWords(src: string, env?: NodeJS.ProcessEnv, home?: string, pwd?: string | null): SimpleCommand & ParsedSegment;
18
+ /** The words from the real command word on, behind wrappers, assignments and grouping keywords. */
19
+ export declare function commandOf(input: Word[]): Word[];
20
+ export declare const MAX_COMMAND: number;
21
+ /**
22
+ * @implements A-SPEC-728 (rule 44) — whether some `find` runs with no `-name`/`-path`/`-regex` filter after it in its clause
23
+ * (`/(^|[|;&\s])find\b(?![^|;&]*-(?:i?name|i?path|regex))/`), in one pass: the regex rescanned the clause from every `find`
24
+ * (100 KB of `find `: 97% of a 6 s verdict — measured). In a clause only its last `find` decides: a filter after it is after
25
+ * every earlier one.
26
+ */
27
+ export declare function findRunsUnfiltered(t: string): boolean;
28
+ /**
29
+ * @implements A-SPEC-728
30
+ * Which governance wiring target one segment writes or deletes, or `null`. `base` is the segment's
31
+ * working directory (null = unknowable: only absolute words are judged); `fullText` is the whole
32
+ * command, which `xargs`/`parallel` and stdin shells consult because their arguments arrive on stdin.
33
+ */
34
+ export declare function harnessWiringActOf(root: string, base: string | null, segmentText: string, fullText: string, env?: NodeJS.ProcessEnv, home?: string, depth?: number): string | null;
35
+ /**
36
+ * @implements A-SPEC-728
37
+ * The rule over a whole command: every segment (data heredoc bodies included — a `<<` inside quotes
38
+ * or a comment must not hide the lines after it) at its effective base.
39
+ */
40
+ export declare function harnessWiringActOfCommand(root: string, command: string, env?: NodeJS.ProcessEnv, home?: string, startBase?: string, depth?: number, baseUnknown?: boolean): string | null;
41
+ /** Back-compat name for the shared translator (find semantics: dotfiles match). */
42
+ export declare function globToRe(glob: string): GlobMatcher;