squidclaw 3.0.24 → 3.0.25

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 (180) hide show
  1. package/dist/{accounts-DwGoZKGm.js → accounts-B6F_XCgS.js} +17 -17
  2. package/dist/{accounts-DjhBQg_8.js → accounts-Bkb-J8V6.js} +2 -2
  3. package/dist/{accounts-C7pGQPcS.js → accounts-s5e9zidf.js} +2 -2
  4. package/dist/{active-listener-DPc_PGsA.js → active-listener-6-Svu8Dx.js} +2 -2
  5. package/dist/{api-key-rotation-DVyYtQxC.js → api-key-rotation-TRwuCWbu.js} +2 -2
  6. package/dist/{audio-preflight-BUCBED7N.js → audio-preflight-1KULThhV.js} +32 -32
  7. package/dist/{audio-transcription-runner-Cv0Q47cM.js → audio-transcription-runner-C3N9eAGM.js} +12 -12
  8. package/dist/{audit-membership-runtime-DyLj-uhz.js → audit-membership-runtime-w23FnNAN.js} +4 -4
  9. package/dist/build-info.json +3 -3
  10. package/dist/bundled/boot-md/handler.js +51 -51
  11. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  12. package/dist/bundled/command-logger/handler.js +2 -2
  13. package/dist/bundled/session-memory/handler.js +99 -55
  14. package/dist/{channel-activity-CPpt4XaL.js → channel-activity-CxJbx4sD.js} +3 -3
  15. package/dist/{chrome-OgCChbC_.js → chrome-Qbvnl6so.js} +18 -18
  16. package/dist/{commands-registry-BJjv8_oR.js → commands-registry-B44COZFz.js} +4 -4
  17. package/dist/{deliver-DMTUTpTM.js → deliver-BC5egJvm.js} +21 -21
  18. package/dist/deliver-runtime-B6NtHUuv.js +36 -0
  19. package/dist/deps-send-discord.runtime-CUTAK2hy.js +26 -0
  20. package/dist/deps-send-imessage.runtime-CQOiEIuA.js +25 -0
  21. package/dist/deps-send-signal.runtime-wN7MkzLw.js +24 -0
  22. package/dist/deps-send-slack.runtime-HEEwW4uU.js +22 -0
  23. package/dist/deps-send-telegram.runtime-DHlcnjQO.js +27 -0
  24. package/dist/deps-send-whatsapp.runtime-C2x2R2Ow.js +60 -0
  25. package/dist/{diagnostic-CnVwZNbm.js → diagnostic-C2lklhkn.js} +2 -2
  26. package/dist/{errors-kkRuS2Cs.js → errors-DfgAh2Ml.js} +1 -1
  27. package/dist/{fetch-DP-JjB6Z.js → fetch-b8tSR7_e.js} +5 -5
  28. package/dist/{fetch-guard-BDy975wP.js → fetch-guard-D16tjNsZ.js} +2 -2
  29. package/dist/{frontmatter-Cq1TcIQ2.js → frontmatter-CjKtFduT.js} +3 -3
  30. package/dist/{fs-safe-BoB4X3GD.js → fs-safe-CwHbZdFH.js} +4 -4
  31. package/dist/{github-copilot-token-B5cPlwaz.js → github-copilot-token-Cw3tAXM9.js} +7 -7
  32. package/dist/{image-kKMG59st.js → image-ByqExb8z.js} +6 -6
  33. package/dist/{image-ops-Dg8iraUV.js → image-ops-BoN1E_WZ.js} +2 -2
  34. package/dist/image-runtime-BSVF52oe.js +29 -0
  35. package/dist/{ir-CKK03mBV.js → ir-Dut0zXyS.js} +8 -8
  36. package/dist/{legacy-names-aGJJuzM_.js → legacy-names-B0wgIP0Q.js} +1 -1
  37. package/dist/llm-slug-generator.js +51 -51
  38. package/dist/{logger-CnTSBL7T.js → logger-oGKcCLZ5.js} +7 -7
  39. package/dist/{login-CeKDrz6_.js → login-DJ357UQV.js} +5 -5
  40. package/dist/{login-qr-KbOpR0GQ.js → login-qr-C0fDBnpM.js} +10 -10
  41. package/dist/{manager-DINhLnMi.js → manager-BPGhs30n.js} +13 -13
  42. package/dist/manager-runtime-BB9lcoFR.js +18 -0
  43. package/dist/{model-selection-DuNLFQPR.js → model-selection-CHnojCCK.js} +43 -43
  44. package/dist/{outbound-attachment-DwupUxYF.js → outbound-attachment-rlW7G5df.js} +2 -2
  45. package/dist/{outbound-C9svt6RH.js → outbound-qTioiTJg.js} +6 -6
  46. package/dist/{path-alias-guards-DORgbZ1w.js → path-alias-guards-Cpsiv2KL.js} +1 -1
  47. package/dist/{paths-DA5srn0U.js → paths-CSdAWKDO.js} +5 -5
  48. package/dist/{paths-DSd911Oe.js → paths-CXClY8zC.js} +4 -4
  49. package/dist/{pi-embedded-BiC4tIJ8.js → pi-embedded-DUtpCH0X.js} +162 -162
  50. package/dist/{pi-embedded-helpers-Di58J7Eh.js → pi-embedded-helpers-CYR1UemI.js} +52 -52
  51. package/dist/{plugin-sdk/pi-model-discovery-DdctvBeX.js → pi-model-discovery-o-WX5w2t.js} +2 -2
  52. package/dist/pi-model-discovery-runtime-DBkQoIJw.js +11 -0
  53. package/dist/{pi-tools.before-tool-call.runtime-Bpk4qTgV.js → pi-tools.before-tool-call.runtime-B_LUttg1.js} +9 -9
  54. package/dist/plugin-sdk/discord.js +6 -6
  55. package/dist/plugin-sdk/index.js +50 -50
  56. package/dist/plugin-sdk/signal.js +2 -2
  57. package/dist/{plugins-DvejjZnJ.js → plugins-AqsVZZk3.js} +11 -11
  58. package/dist/{proxy-env-D-fike7s.js → proxy-env-DXXfs2WL.js} +1 -1
  59. package/dist/{plugin-sdk/proxy-fetch-ZPEvp58f.js → proxy-fetch-C2v-Utgg.js} +1 -1
  60. package/dist/{pw-ai-B8ymIYub.js → pw-ai-1NQPuno2.js} +14 -14
  61. package/dist/{qmd-manager-BN0siR2Z.js → qmd-manager-CO-shcLU.js} +10 -10
  62. package/dist/{query-expansion-Dzxt6kXo.js → query-expansion-DlQOkf-g.js} +6 -6
  63. package/dist/{plugin-sdk/redact-BoNEjbpF.js → redact-NmPEVjIo.js} +1 -1
  64. package/dist/{run-with-concurrency-BFR3ReeF.js → run-with-concurrency-FczpX8ng.js} +4 -4
  65. package/dist/runtime-whatsapp-login.runtime-DumUjKRz.js +13 -0
  66. package/dist/runtime-whatsapp-outbound.runtime-Cgu2MfqR.js +22 -0
  67. package/dist/{send-dTQd-IyJ.js → send-B5QEmMJ4.js} +5 -5
  68. package/dist/{send-DdBbRpTP.js → send-B9H0BkfO.js} +6 -6
  69. package/dist/{send-4nRsZJXH.js → send-Bx9CqcZr.js} +7 -7
  70. package/dist/{send-BGlcHjUD.js → send-D5D0ZGht.js} +26 -26
  71. package/dist/{send-BTUU1jWM.js → send-DtHQ7_6Z.js} +8 -8
  72. package/dist/{session-CnCwDJke.js → session-DLTCuoUD.js} +8 -8
  73. package/dist/{skill-commands-Cz45_nme.js → skill-commands-BwTLQRR8.js} +9 -9
  74. package/dist/{skills-CdCS1HeL.js → skills-B9N2bqKU.js} +22 -22
  75. package/dist/slash-commands.runtime-CjBXruwG.js +16 -0
  76. package/dist/slash-dispatch.runtime-CGd3HarH.js +56 -0
  77. package/dist/slash-skill-commands.runtime-DYK20Lxf.js +20 -0
  78. package/dist/{store-D9z0dn7D.js → store-CvQ41zCV.js} +2 -2
  79. package/dist/subagent-registry-runtime-m9bFJFix.js +56 -0
  80. package/dist/{subsystem-6v7sWnAD.js → subsystem-BaLYRf7D.js} +14 -14
  81. package/dist/{tables-BTFiZyRU.js → tables-BRYYxYs7.js} +1 -1
  82. package/dist/{plugin-sdk/target-errors-jlLHihbX.js → target-errors-D0ZJUbbf.js} +2 -2
  83. package/dist/{thinking-B75CXkTT.js → thinking-B-A99X3F.js} +7 -7
  84. package/dist/{tokens-DfbMVF9y.js → tokens-D2XhLqIz.js} +1 -1
  85. package/dist/{tool-images-Dp5OiXeA.js → tool-images-Zn6jVmkX.js} +2 -2
  86. package/dist/{web-QsxgXbNK.js → web-CEdWU_u3.js} +55 -55
  87. package/dist/{whatsapp-actions-CzqsuSGx.js → whatsapp-actions-Cuy0qeQK.js} +21 -21
  88. package/dist/{workspace-kVMIaBrV.js → workspace-TqfVSQuO.js} +20 -20
  89. package/package.json +1 -1
  90. package/dist/deliver-runtime-B80olQwJ.js +0 -36
  91. package/dist/deps-send-discord.runtime-GIuvX7Xw.js +0 -26
  92. package/dist/deps-send-imessage.runtime-B3TC7G80.js +0 -25
  93. package/dist/deps-send-signal.runtime-CuVJyw7n.js +0 -24
  94. package/dist/deps-send-slack.runtime-cbfFoLZ4.js +0 -22
  95. package/dist/deps-send-telegram.runtime-CRyP-xDQ.js +0 -27
  96. package/dist/deps-send-whatsapp.runtime-4aOUBP2J.js +0 -60
  97. package/dist/image-runtime-BqIv7p_K.js +0 -29
  98. package/dist/manager-runtime-D6ckUNSs.js +0 -18
  99. package/dist/pi-model-discovery-V-InbjOM.js +0 -134
  100. package/dist/pi-model-discovery-runtime--t6tAlar.js +0 -11
  101. package/dist/plugin-sdk/accounts-CUEuUR3C.js +0 -46
  102. package/dist/plugin-sdk/accounts-D0W2pELU.js +0 -288
  103. package/dist/plugin-sdk/accounts-ucj0odJq.js +0 -35
  104. package/dist/plugin-sdk/active-listener-BO7eBEG_.js +0 -50
  105. package/dist/plugin-sdk/api-key-rotation-C4C_mDsg.js +0 -181
  106. package/dist/plugin-sdk/audio-preflight-Cqdo0JKm.js +0 -69
  107. package/dist/plugin-sdk/audio-transcription-runner-DnEooIyE.js +0 -2176
  108. package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +0 -58
  109. package/dist/plugin-sdk/channel-activity-BMWLw4o2.js +0 -94
  110. package/dist/plugin-sdk/channel-web-B8bj7MB9.js +0 -2256
  111. package/dist/plugin-sdk/chrome-CV-q0Lmc.js +0 -2415
  112. package/dist/plugin-sdk/commands-registry-e7YoqrbP.js +0 -1125
  113. package/dist/plugin-sdk/config-B2B64aX0.js +0 -17911
  114. package/dist/plugin-sdk/deliver-BkyBtcLR.js +0 -1694
  115. package/dist/plugin-sdk/deliver-runtime-O4lwAWMw.js +0 -32
  116. package/dist/plugin-sdk/deps-send-discord.runtime-BAeeBldY.js +0 -23
  117. package/dist/plugin-sdk/deps-send-imessage.runtime-EL-CfikZ.js +0 -22
  118. package/dist/plugin-sdk/deps-send-signal.runtime-BeemHeUu.js +0 -21
  119. package/dist/plugin-sdk/deps-send-slack.runtime-DTttkC0N.js +0 -19
  120. package/dist/plugin-sdk/deps-send-telegram.runtime-Dsf9Cnka.js +0 -24
  121. package/dist/plugin-sdk/deps-send-whatsapp.runtime-DvdFo6lj.js +0 -57
  122. package/dist/plugin-sdk/diagnostic-DPRVoKTk.js +0 -319
  123. package/dist/plugin-sdk/errors-B8oJXuCF.js +0 -54
  124. package/dist/plugin-sdk/fetch-guard-F0Fnqisy.js +0 -156
  125. package/dist/plugin-sdk/fs-safe-Dqmpk-Fr.js +0 -352
  126. package/dist/plugin-sdk/image-cBW8L8pp.js +0 -2310
  127. package/dist/plugin-sdk/image-ops-BP8ix1GC.js +0 -584
  128. package/dist/plugin-sdk/image-runtime-9xkgSlNz.js +0 -25
  129. package/dist/plugin-sdk/ir-DWEc6zOp.js +0 -1296
  130. package/dist/plugin-sdk/local-roots-BIPT8uAO.js +0 -186
  131. package/dist/plugin-sdk/logger-DDdrdbDu.js +0 -1163
  132. package/dist/plugin-sdk/login-BMTiGutN.js +0 -57
  133. package/dist/plugin-sdk/login-qr-BFxqYUkc.js +0 -320
  134. package/dist/plugin-sdk/manager-BD-aYaZ8.js +0 -3917
  135. package/dist/plugin-sdk/manager-runtime-C5bRwUlz.js +0 -15
  136. package/dist/plugin-sdk/outbound-Bm07xvO6.js +0 -212
  137. package/dist/plugin-sdk/outbound-attachment-DLsaxDsc.js +0 -19
  138. package/dist/plugin-sdk/path-alias-guards-gBhrAn14.js +0 -43
  139. package/dist/plugin-sdk/paths-C6W4VHoa.js +0 -166
  140. package/dist/plugin-sdk/pi-embedded-helpers-BExwPvTh.js +0 -9627
  141. package/dist/plugin-sdk/pi-model-discovery-runtime-DrtpLJjk.js +0 -8
  142. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-rgTz3FBl.js +0 -354
  143. package/dist/plugin-sdk/plugins-BN64HHZA.js +0 -864
  144. package/dist/plugin-sdk/pw-ai-DBm3RdBK.js +0 -1938
  145. package/dist/plugin-sdk/qmd-manager-6bozlfFg.js +0 -1448
  146. package/dist/plugin-sdk/query-expansion-eeVz_aEm.js +0 -1011
  147. package/dist/plugin-sdk/reply-Bp49JV3f.js +0 -98828
  148. package/dist/plugin-sdk/resolve-outbound-target-DXfjGlZQ.js +0 -40
  149. package/dist/plugin-sdk/run-with-concurrency-5DMu9szx.js +0 -1994
  150. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-D2hkJBa-.js +0 -10
  151. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-C06I4adi.js +0 -19
  152. package/dist/plugin-sdk/send-B9xnwtQ-.js +0 -540
  153. package/dist/plugin-sdk/send-BxySs-Cu.js +0 -2587
  154. package/dist/plugin-sdk/send-D9THKp_J.js +0 -414
  155. package/dist/plugin-sdk/send-DCuaaP2w.js +0 -503
  156. package/dist/plugin-sdk/send-Dm_-_xje.js +0 -3135
  157. package/dist/plugin-sdk/session-DDzIZHxt.js +0 -169
  158. package/dist/plugin-sdk/skill-commands-DRvqtuFC.js +0 -342
  159. package/dist/plugin-sdk/skills-BWwlfbVj.js +0 -1428
  160. package/dist/plugin-sdk/slash-commands.runtime-BzYsaTST.js +0 -13
  161. package/dist/plugin-sdk/slash-dispatch.runtime-Cty8EAD9.js +0 -52
  162. package/dist/plugin-sdk/slash-skill-commands.runtime-sg98L8BK.js +0 -16
  163. package/dist/plugin-sdk/ssrf-DOBwjFow.js +0 -202
  164. package/dist/plugin-sdk/store-BKDR_-Qk.js +0 -81
  165. package/dist/plugin-sdk/subagent-registry-runtime-Dz50ieim.js +0 -52
  166. package/dist/plugin-sdk/tables-GIj79us5.js +0 -55
  167. package/dist/plugin-sdk/thinking-BgdUnMZ2.js +0 -1206
  168. package/dist/plugin-sdk/tokens-CTIYTLWu.js +0 -52
  169. package/dist/plugin-sdk/tool-images-GSlvf6RP.js +0 -274
  170. package/dist/plugin-sdk/web-BK9mCTAc.js +0 -56
  171. package/dist/plugin-sdk/whatsapp-actions-DQpK_5Ds.js +0 -80
  172. package/dist/proxy-fetch-lH6RsRTE.js +0 -38
  173. package/dist/redact-DvzicBMu.js +0 -319
  174. package/dist/runtime-whatsapp-login.runtime-DxV9iv6l.js +0 -13
  175. package/dist/runtime-whatsapp-outbound.runtime-DQqIlwhS.js +0 -22
  176. package/dist/slash-commands.runtime-CZz6v6b3.js +0 -16
  177. package/dist/slash-dispatch.runtime-SO7HOe8q.js +0 -56
  178. package/dist/slash-skill-commands.runtime-Bawt7j0r.js +0 -20
  179. package/dist/subagent-registry-runtime-D2rUxU5J.js +0 -56
  180. package/dist/target-errors-DgNRx3Nr.js +0 -195
@@ -1,319 +0,0 @@
1
- import { S as resolveNodeRequireFromMeta } from "./subsystem-6v7sWnAD.js";
2
-
3
- //#region src/security/safe-regex.ts
4
- const SAFE_REGEX_CACHE_MAX = 256;
5
- const SAFE_REGEX_TEST_WINDOW = 2048;
6
- const safeRegexCache = /* @__PURE__ */ new Map();
7
- function createParseFrame() {
8
- return {
9
- lastToken: null,
10
- containsRepetition: false,
11
- hasAlternation: false,
12
- branchMinLength: 0,
13
- branchMaxLength: 0,
14
- altMinLength: null,
15
- altMaxLength: null
16
- };
17
- }
18
- function addLength(left, right) {
19
- if (!Number.isFinite(left) || !Number.isFinite(right)) return Number.POSITIVE_INFINITY;
20
- return left + right;
21
- }
22
- function multiplyLength(length, factor) {
23
- if (!Number.isFinite(length)) return factor === 0 ? 0 : Number.POSITIVE_INFINITY;
24
- return length * factor;
25
- }
26
- function recordAlternative(frame) {
27
- if (frame.altMinLength === null || frame.altMaxLength === null) {
28
- frame.altMinLength = frame.branchMinLength;
29
- frame.altMaxLength = frame.branchMaxLength;
30
- return;
31
- }
32
- frame.altMinLength = Math.min(frame.altMinLength, frame.branchMinLength);
33
- frame.altMaxLength = Math.max(frame.altMaxLength, frame.branchMaxLength);
34
- }
35
- function readQuantifier(source, index) {
36
- const ch = source[index];
37
- const consumed = source[index + 1] === "?" ? 2 : 1;
38
- if (ch === "*") return {
39
- consumed,
40
- minRepeat: 0,
41
- maxRepeat: null
42
- };
43
- if (ch === "+") return {
44
- consumed,
45
- minRepeat: 1,
46
- maxRepeat: null
47
- };
48
- if (ch === "?") return {
49
- consumed,
50
- minRepeat: 0,
51
- maxRepeat: 1
52
- };
53
- if (ch !== "{") return null;
54
- let i = index + 1;
55
- while (i < source.length && /\d/.test(source[i])) i += 1;
56
- if (i === index + 1) return null;
57
- const minRepeat = Number.parseInt(source.slice(index + 1, i), 10);
58
- let maxRepeat = minRepeat;
59
- if (source[i] === ",") {
60
- i += 1;
61
- const maxStart = i;
62
- while (i < source.length && /\d/.test(source[i])) i += 1;
63
- maxRepeat = i === maxStart ? null : Number.parseInt(source.slice(maxStart, i), 10);
64
- }
65
- if (source[i] !== "}") return null;
66
- i += 1;
67
- if (source[i] === "?") i += 1;
68
- if (maxRepeat !== null && maxRepeat < minRepeat) return null;
69
- return {
70
- consumed: i - index,
71
- minRepeat,
72
- maxRepeat
73
- };
74
- }
75
- function tokenizePattern(source) {
76
- const tokens = [];
77
- let inCharClass = false;
78
- for (let i = 0; i < source.length; i += 1) {
79
- const ch = source[i];
80
- if (ch === "\\") {
81
- i += 1;
82
- tokens.push({ kind: "simple-token" });
83
- continue;
84
- }
85
- if (inCharClass) {
86
- if (ch === "]") inCharClass = false;
87
- continue;
88
- }
89
- if (ch === "[") {
90
- inCharClass = true;
91
- tokens.push({ kind: "simple-token" });
92
- continue;
93
- }
94
- if (ch === "(") {
95
- tokens.push({ kind: "group-open" });
96
- continue;
97
- }
98
- if (ch === ")") {
99
- tokens.push({ kind: "group-close" });
100
- continue;
101
- }
102
- if (ch === "|") {
103
- tokens.push({ kind: "alternation" });
104
- continue;
105
- }
106
- const quantifier = readQuantifier(source, i);
107
- if (quantifier) {
108
- tokens.push({
109
- kind: "quantifier",
110
- quantifier
111
- });
112
- i += quantifier.consumed - 1;
113
- continue;
114
- }
115
- tokens.push({ kind: "simple-token" });
116
- }
117
- return tokens;
118
- }
119
- function analyzeTokensForNestedRepetition(tokens) {
120
- const frames = [createParseFrame()];
121
- const emitToken = (token) => {
122
- const frame = frames[frames.length - 1];
123
- frame.lastToken = token;
124
- if (token.containsRepetition) frame.containsRepetition = true;
125
- frame.branchMinLength = addLength(frame.branchMinLength, token.minLength);
126
- frame.branchMaxLength = addLength(frame.branchMaxLength, token.maxLength);
127
- };
128
- const emitSimpleToken = () => {
129
- emitToken({
130
- containsRepetition: false,
131
- hasAmbiguousAlternation: false,
132
- minLength: 1,
133
- maxLength: 1
134
- });
135
- };
136
- for (const token of tokens) {
137
- if (token.kind === "simple-token") {
138
- emitSimpleToken();
139
- continue;
140
- }
141
- if (token.kind === "group-open") {
142
- frames.push(createParseFrame());
143
- continue;
144
- }
145
- if (token.kind === "group-close") {
146
- if (frames.length > 1) {
147
- const frame = frames.pop();
148
- if (frame.hasAlternation) recordAlternative(frame);
149
- const groupMinLength = frame.hasAlternation ? frame.altMinLength ?? 0 : frame.branchMinLength;
150
- const groupMaxLength = frame.hasAlternation ? frame.altMaxLength ?? 0 : frame.branchMaxLength;
151
- emitToken({
152
- containsRepetition: frame.containsRepetition,
153
- hasAmbiguousAlternation: frame.hasAlternation && frame.altMinLength !== null && frame.altMaxLength !== null && frame.altMinLength !== frame.altMaxLength,
154
- minLength: groupMinLength,
155
- maxLength: groupMaxLength
156
- });
157
- }
158
- continue;
159
- }
160
- if (token.kind === "alternation") {
161
- const frame = frames[frames.length - 1];
162
- frame.hasAlternation = true;
163
- recordAlternative(frame);
164
- frame.branchMinLength = 0;
165
- frame.branchMaxLength = 0;
166
- frame.lastToken = null;
167
- continue;
168
- }
169
- const frame = frames[frames.length - 1];
170
- const previousToken = frame.lastToken;
171
- if (!previousToken) continue;
172
- if (previousToken.containsRepetition) return true;
173
- if (previousToken.hasAmbiguousAlternation && token.quantifier.maxRepeat === null) return true;
174
- const previousMinLength = previousToken.minLength;
175
- const previousMaxLength = previousToken.maxLength;
176
- previousToken.minLength = multiplyLength(previousToken.minLength, token.quantifier.minRepeat);
177
- previousToken.maxLength = token.quantifier.maxRepeat === null ? Number.POSITIVE_INFINITY : multiplyLength(previousToken.maxLength, token.quantifier.maxRepeat);
178
- previousToken.containsRepetition = true;
179
- frame.containsRepetition = true;
180
- frame.branchMinLength = frame.branchMinLength - previousMinLength + previousToken.minLength;
181
- frame.branchMaxLength = addLength(Number.isFinite(frame.branchMaxLength) && Number.isFinite(previousMaxLength) ? frame.branchMaxLength - previousMaxLength : Number.POSITIVE_INFINITY, previousToken.maxLength);
182
- }
183
- return false;
184
- }
185
- function testRegexFromStart(regex, value) {
186
- regex.lastIndex = 0;
187
- return regex.test(value);
188
- }
189
- function testRegexWithBoundedInput(regex, input, maxWindow = SAFE_REGEX_TEST_WINDOW) {
190
- if (maxWindow <= 0) return false;
191
- if (input.length <= maxWindow) return testRegexFromStart(regex, input);
192
- if (testRegexFromStart(regex, input.slice(0, maxWindow))) return true;
193
- return testRegexFromStart(regex, input.slice(-maxWindow));
194
- }
195
- function hasNestedRepetition(source) {
196
- return analyzeTokensForNestedRepetition(tokenizePattern(source));
197
- }
198
- function compileSafeRegex(source, flags = "") {
199
- const trimmed = source.trim();
200
- if (!trimmed) return null;
201
- const cacheKey = `${flags}::${trimmed}`;
202
- if (safeRegexCache.has(cacheKey)) return safeRegexCache.get(cacheKey) ?? null;
203
- let compiled = null;
204
- if (!hasNestedRepetition(trimmed)) try {
205
- compiled = new RegExp(trimmed, flags);
206
- } catch {
207
- compiled = null;
208
- }
209
- safeRegexCache.set(cacheKey, compiled);
210
- if (safeRegexCache.size > SAFE_REGEX_CACHE_MAX) {
211
- const oldestKey = safeRegexCache.keys().next().value;
212
- if (oldestKey) safeRegexCache.delete(oldestKey);
213
- }
214
- return compiled;
215
- }
216
-
217
- //#endregion
218
- //#region src/logging/redact-bounded.ts
219
- const REDACT_REGEX_CHUNK_THRESHOLD = 32768;
220
- const REDACT_REGEX_CHUNK_SIZE = 16384;
221
- function replacePatternBounded(text, pattern, replacer, options) {
222
- const chunkThreshold = options?.chunkThreshold ?? REDACT_REGEX_CHUNK_THRESHOLD;
223
- const chunkSize = options?.chunkSize ?? REDACT_REGEX_CHUNK_SIZE;
224
- if (chunkThreshold <= 0 || chunkSize <= 0 || text.length <= chunkThreshold) return text.replace(pattern, replacer);
225
- let output = "";
226
- for (let index = 0; index < text.length; index += chunkSize) output += text.slice(index, index + chunkSize).replace(pattern, replacer);
227
- return output;
228
- }
229
-
230
- //#endregion
231
- //#region src/logging/redact.ts
232
- const requireConfig = resolveNodeRequireFromMeta(import.meta.url);
233
- const DEFAULT_REDACT_MODE = "tools";
234
- const DEFAULT_REDACT_MIN_LENGTH = 18;
235
- const DEFAULT_REDACT_KEEP_START = 6;
236
- const DEFAULT_REDACT_KEEP_END = 4;
237
- const DEFAULT_REDACT_PATTERNS = [
238
- String.raw`\b[A-Z0-9_]*(?:KEY|TOKEN|SECRET|PASSWORD|PASSWD)\b\s*[=:]\s*(["']?)([^\s"'\\]+)\1`,
239
- String.raw`"(?:apiKey|token|secret|password|passwd|accessToken|refreshToken)"\s*:\s*"([^"]+)"`,
240
- String.raw`--(?:api[-_]?key|token|secret|password|passwd)\s+(["']?)([^\s"']+)\1`,
241
- String.raw`Authorization\s*[:=]\s*Bearer\s+([A-Za-z0-9._\-+=]+)`,
242
- String.raw`\bBearer\s+([A-Za-z0-9._\-+=]{18,})\b`,
243
- String.raw`-----BEGIN [A-Z ]*PRIVATE KEY-----[\s\S]+?-----END [A-Z ]*PRIVATE KEY-----`,
244
- String.raw`\b(sk-[A-Za-z0-9_-]{8,})\b`,
245
- String.raw`\b(ghp_[A-Za-z0-9]{20,})\b`,
246
- String.raw`\b(github_pat_[A-Za-z0-9_]{20,})\b`,
247
- String.raw`\b(xox[baprs]-[A-Za-z0-9-]{10,})\b`,
248
- String.raw`\b(xapp-[A-Za-z0-9-]{10,})\b`,
249
- String.raw`\b(gsk_[A-Za-z0-9_-]{10,})\b`,
250
- String.raw`\b(AIza[0-9A-Za-z\-_]{20,})\b`,
251
- String.raw`\b(pplx-[A-Za-z0-9_-]{10,})\b`,
252
- String.raw`\b(npm_[A-Za-z0-9]{10,})\b`,
253
- String.raw`\bbot(\d{6,}:[A-Za-z0-9_-]{20,})\b`,
254
- String.raw`\b(\d{6,}:[A-Za-z0-9_-]{20,})\b`
255
- ];
256
- function normalizeMode(value) {
257
- return value === "off" ? "off" : DEFAULT_REDACT_MODE;
258
- }
259
- function parsePattern(raw) {
260
- if (!raw.trim()) return null;
261
- const match = raw.match(/^\/(.+)\/([gimsuy]*)$/);
262
- if (match) {
263
- const flags = match[2].includes("g") ? match[2] : `${match[2]}g`;
264
- return compileSafeRegex(match[1], flags);
265
- }
266
- return compileSafeRegex(raw, "gi");
267
- }
268
- function resolvePatterns(value) {
269
- return (value?.length ? value : DEFAULT_REDACT_PATTERNS).map(parsePattern).filter((re) => Boolean(re));
270
- }
271
- function maskToken(token) {
272
- if (token.length < DEFAULT_REDACT_MIN_LENGTH) return "***";
273
- return `${token.slice(0, DEFAULT_REDACT_KEEP_START)}…${token.slice(-DEFAULT_REDACT_KEEP_END)}`;
274
- }
275
- function redactPemBlock(block) {
276
- const lines = block.split(/\r?\n/).filter(Boolean);
277
- if (lines.length < 2) return "***";
278
- return `${lines[0]}\n…redacted…\n${lines[lines.length - 1]}`;
279
- }
280
- function redactMatch(match, groups) {
281
- if (match.includes("PRIVATE KEY-----")) return redactPemBlock(match);
282
- const token = groups.filter((value) => typeof value === "string" && value.length > 0).at(-1) ?? match;
283
- const masked = maskToken(token);
284
- if (token === match) return masked;
285
- return match.replace(token, masked);
286
- }
287
- function redactText(text, patterns) {
288
- let next = text;
289
- for (const pattern of patterns) next = replacePatternBounded(next, pattern, (...args) => redactMatch(args[0], args.slice(1, args.length - 2)));
290
- return next;
291
- }
292
- function resolveConfigRedaction() {
293
- let cfg;
294
- try {
295
- cfg = (requireConfig?.("../config/config.js"))?.loadConfig?.().logging;
296
- } catch {
297
- cfg = void 0;
298
- }
299
- return {
300
- mode: normalizeMode(cfg?.redactSensitive),
301
- patterns: cfg?.redactPatterns
302
- };
303
- }
304
- function redactSensitiveText(text, options) {
305
- if (!text) return text;
306
- const resolved = options ?? resolveConfigRedaction();
307
- if (normalizeMode(resolved.mode) === "off") return text;
308
- const patterns = resolvePatterns(resolved.patterns);
309
- if (!patterns.length) return text;
310
- return redactText(text, patterns);
311
- }
312
- function redactToolDetail(detail) {
313
- const resolved = resolveConfigRedaction();
314
- if (normalizeMode(resolved.mode) !== "tools") return detail;
315
- return redactSensitiveText(detail, resolved);
316
- }
317
-
318
- //#endregion
319
- export { testRegexWithBoundedInput as i, redactToolDetail as n, compileSafeRegex as r, redactSensitiveText as t };
@@ -1,13 +0,0 @@
1
- import "./run-with-concurrency-BFR3ReeF.js";
2
- import "./paths-DA5srn0U.js";
3
- import "./subsystem-6v7sWnAD.js";
4
- import "./workspace-kVMIaBrV.js";
5
- import "./logger-CnTSBL7T.js";
6
- import "./model-selection-DuNLFQPR.js";
7
- import "./github-copilot-token-B5cPlwaz.js";
8
- import "./legacy-names-aGJJuzM_.js";
9
- import "./accounts-DwGoZKGm.js";
10
- import "./session-CnCwDJke.js";
11
- import { t as loginWeb } from "./login-CeKDrz6_.js";
12
-
13
- export { loginWeb };
@@ -1,22 +0,0 @@
1
- import "./run-with-concurrency-BFR3ReeF.js";
2
- import "./paths-DA5srn0U.js";
3
- import "./subsystem-6v7sWnAD.js";
4
- import "./workspace-kVMIaBrV.js";
5
- import "./logger-CnTSBL7T.js";
6
- import "./model-selection-DuNLFQPR.js";
7
- import "./github-copilot-token-B5cPlwaz.js";
8
- import "./legacy-names-aGJJuzM_.js";
9
- import "./plugins-DvejjZnJ.js";
10
- import "./accounts-DwGoZKGm.js";
11
- import "./image-ops-Dg8iraUV.js";
12
- import "./path-alias-guards-DORgbZ1w.js";
13
- import "./fs-safe-BoB4X3GD.js";
14
- import "./proxy-env-D-fike7s.js";
15
- import "./fetch-DP-JjB6Z.js";
16
- import "./fetch-guard-BDy975wP.js";
17
- import "./ir-CKK03mBV.js";
18
- import "./render-DW7AcFdD.js";
19
- import "./tables-BTFiZyRU.js";
20
- import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./outbound-C9svt6RH.js";
21
-
22
- export { sendMessageWhatsApp, sendPollWhatsApp };
@@ -1,16 +0,0 @@
1
- import "./run-with-concurrency-BFR3ReeF.js";
2
- import "./paths-DA5srn0U.js";
3
- import "./subsystem-6v7sWnAD.js";
4
- import "./workspace-kVMIaBrV.js";
5
- import "./logger-CnTSBL7T.js";
6
- import "./model-selection-DuNLFQPR.js";
7
- import "./github-copilot-token-B5cPlwaz.js";
8
- import "./legacy-names-aGJJuzM_.js";
9
- import "./thinking-B75CXkTT.js";
10
- import "./plugins-DvejjZnJ.js";
11
- import "./accounts-DwGoZKGm.js";
12
- import "./accounts-C7pGQPcS.js";
13
- import "./accounts-DjhBQg_8.js";
14
- import { f as resolveCommandArgMenu, n as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs } from "./commands-registry-BJjv8_oR.js";
15
-
16
- export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
@@ -1,56 +0,0 @@
1
- import "./run-with-concurrency-BFR3ReeF.js";
2
- import "./paths-DA5srn0U.js";
3
- import "./subsystem-6v7sWnAD.js";
4
- import "./workspace-kVMIaBrV.js";
5
- import "./logger-CnTSBL7T.js";
6
- import "./model-selection-DuNLFQPR.js";
7
- import "./github-copilot-token-B5cPlwaz.js";
8
- import "./legacy-names-aGJJuzM_.js";
9
- import "./thinking-B75CXkTT.js";
10
- import "./tokens-DfbMVF9y.js";
11
- import { I as finalizeInboundContext, S as dispatchReplyWithDispatcher, k as resolveAgentRoute, n as recordInboundSessionMetaSafe, r as deliverSlackSlashReplies, s as createReplyPrefixOptions } from "./pi-embedded-BiC4tIJ8.js";
12
- import "./plugins-DvejjZnJ.js";
13
- import "./accounts-DwGoZKGm.js";
14
- import "./send-DdBbRpTP.js";
15
- import "./send-BTUU1jWM.js";
16
- import "./deliver-DMTUTpTM.js";
17
- import "./diagnostic-CnVwZNbm.js";
18
- import "./accounts-C7pGQPcS.js";
19
- import "./image-ops-Dg8iraUV.js";
20
- import "./send-BGlcHjUD.js";
21
- import "./pi-model-discovery-V-InbjOM.js";
22
- import { kt as resolveConversationLabel } from "./pi-embedded-helpers-Di58J7Eh.js";
23
- import "./chrome-OgCChbC_.js";
24
- import "./frontmatter-Cq1TcIQ2.js";
25
- import "./skills-CdCS1HeL.js";
26
- import "./path-alias-guards-DORgbZ1w.js";
27
- import "./redact-DvzicBMu.js";
28
- import "./errors-kkRuS2Cs.js";
29
- import "./fs-safe-BoB4X3GD.js";
30
- import "./proxy-env-D-fike7s.js";
31
- import "./store-D9z0dn7D.js";
32
- import "./accounts-DjhBQg_8.js";
33
- import "./paths-DSd911Oe.js";
34
- import "./tool-images-Dp5OiXeA.js";
35
- import "./image-kKMG59st.js";
36
- import "./audio-transcription-runner-Cv0Q47cM.js";
37
- import "./fetch-DP-JjB6Z.js";
38
- import "./fetch-guard-BDy975wP.js";
39
- import "./api-key-rotation-DVyYtQxC.js";
40
- import "./proxy-fetch-lH6RsRTE.js";
41
- import { m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-CKK03mBV.js";
42
- import "./render-DW7AcFdD.js";
43
- import "./target-errors-DgNRx3Nr.js";
44
- import "./commands-registry-BJjv8_oR.js";
45
- import "./skill-commands-Cz45_nme.js";
46
- import "./fetch-tZXOZ9FV.js";
47
- import "./channel-activity-CPpt4XaL.js";
48
- import "./tables-BTFiZyRU.js";
49
- import "./send-dTQd-IyJ.js";
50
- import "./outbound-attachment-DwupUxYF.js";
51
- import "./send-4nRsZJXH.js";
52
- import "./proxy-CecQTx_Z.js";
53
- import "./manager-DINhLnMi.js";
54
- import "./query-expansion-Dzxt6kXo.js";
55
-
56
- export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
@@ -1,20 +0,0 @@
1
- import "./run-with-concurrency-BFR3ReeF.js";
2
- import "./paths-DA5srn0U.js";
3
- import "./subsystem-6v7sWnAD.js";
4
- import "./workspace-kVMIaBrV.js";
5
- import "./logger-CnTSBL7T.js";
6
- import "./model-selection-DuNLFQPR.js";
7
- import "./github-copilot-token-B5cPlwaz.js";
8
- import "./legacy-names-aGJJuzM_.js";
9
- import "./thinking-B75CXkTT.js";
10
- import "./plugins-DvejjZnJ.js";
11
- import "./accounts-DwGoZKGm.js";
12
- import "./accounts-C7pGQPcS.js";
13
- import "./frontmatter-Cq1TcIQ2.js";
14
- import "./skills-CdCS1HeL.js";
15
- import "./path-alias-guards-DORgbZ1w.js";
16
- import "./accounts-DjhBQg_8.js";
17
- import "./commands-registry-BJjv8_oR.js";
18
- import { n as listSkillCommandsForAgents } from "./skill-commands-Cz45_nme.js";
19
-
20
- export { listSkillCommandsForAgents };
@@ -1,56 +0,0 @@
1
- import "./run-with-concurrency-BFR3ReeF.js";
2
- import "./paths-DA5srn0U.js";
3
- import "./subsystem-6v7sWnAD.js";
4
- import "./workspace-kVMIaBrV.js";
5
- import "./logger-CnTSBL7T.js";
6
- import "./model-selection-DuNLFQPR.js";
7
- import "./github-copilot-token-B5cPlwaz.js";
8
- import "./legacy-names-aGJJuzM_.js";
9
- import "./thinking-B75CXkTT.js";
10
- import "./tokens-DfbMVF9y.js";
11
- import { G as resolveRequesterForChildSession, H as countPendingDescendantRuns, U as countPendingDescendantRunsExcludingRun, V as countActiveDescendantRuns, W as isSubagentSessionRunActive } from "./pi-embedded-BiC4tIJ8.js";
12
- import "./plugins-DvejjZnJ.js";
13
- import "./accounts-DwGoZKGm.js";
14
- import "./send-DdBbRpTP.js";
15
- import "./send-BTUU1jWM.js";
16
- import "./deliver-DMTUTpTM.js";
17
- import "./diagnostic-CnVwZNbm.js";
18
- import "./accounts-C7pGQPcS.js";
19
- import "./image-ops-Dg8iraUV.js";
20
- import "./send-BGlcHjUD.js";
21
- import "./pi-model-discovery-V-InbjOM.js";
22
- import "./pi-embedded-helpers-Di58J7Eh.js";
23
- import "./chrome-OgCChbC_.js";
24
- import "./frontmatter-Cq1TcIQ2.js";
25
- import "./skills-CdCS1HeL.js";
26
- import "./path-alias-guards-DORgbZ1w.js";
27
- import "./redact-DvzicBMu.js";
28
- import "./errors-kkRuS2Cs.js";
29
- import "./fs-safe-BoB4X3GD.js";
30
- import "./proxy-env-D-fike7s.js";
31
- import "./store-D9z0dn7D.js";
32
- import "./accounts-DjhBQg_8.js";
33
- import "./paths-DSd911Oe.js";
34
- import "./tool-images-Dp5OiXeA.js";
35
- import "./image-kKMG59st.js";
36
- import "./audio-transcription-runner-Cv0Q47cM.js";
37
- import "./fetch-DP-JjB6Z.js";
38
- import "./fetch-guard-BDy975wP.js";
39
- import "./api-key-rotation-DVyYtQxC.js";
40
- import "./proxy-fetch-lH6RsRTE.js";
41
- import "./ir-CKK03mBV.js";
42
- import "./render-DW7AcFdD.js";
43
- import "./target-errors-DgNRx3Nr.js";
44
- import "./commands-registry-BJjv8_oR.js";
45
- import "./skill-commands-Cz45_nme.js";
46
- import "./fetch-tZXOZ9FV.js";
47
- import "./channel-activity-CPpt4XaL.js";
48
- import "./tables-BTFiZyRU.js";
49
- import "./send-dTQd-IyJ.js";
50
- import "./outbound-attachment-DwupUxYF.js";
51
- import "./send-4nRsZJXH.js";
52
- import "./proxy-CecQTx_Z.js";
53
- import "./manager-DINhLnMi.js";
54
- import "./query-expansion-Dzxt6kXo.js";
55
-
56
- export { countActiveDescendantRuns, countPendingDescendantRuns, countPendingDescendantRunsExcludingRun, isSubagentSessionRunActive, resolveRequesterForChildSession };