squidclaw 3.0.32 → 3.0.34
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.
- package/dist/{accounts-BFS_qklA.js → accounts-CB2Or0mr.js} +2 -2
- package/dist/{accounts-DfrJiFJJ.js → accounts-Cop2dSRo.js} +2 -2
- package/dist/{accounts-pMDX8iho.js → accounts-CqITV0Ga.js} +4 -4
- package/dist/{active-listener-CH2vJ3EZ.js → active-listener-B6G6kmsb.js} +2 -2
- package/dist/{api-key-rotation-DCBXT0v7.js → api-key-rotation-Da2qYrP7.js} +2 -2
- package/dist/{audio-preflight-B5XvcdFX.js → audio-preflight-yiMsGLW7.js} +30 -30
- package/dist/{audio-transcription-runner-DUC0ItDY.js → audio-transcription-runner-Mha07yP4.js} +12 -12
- package/dist/{audit-membership-runtime-czdecfjJ.js → audit-membership-runtime-By9-qSwl.js} +3 -3
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +49 -49
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/HOOK.md +2 -1
- package/dist/bundled/session-memory/handler.js +190 -55
- package/dist/{channel-activity-7QMEKenc.js → channel-activity-Du1kh0t3.js} +3 -3
- package/dist/{chrome-BTwG9Gvh.js → chrome-C2CliEWR.js} +15 -15
- package/dist/{commands-registry-BIi1tG__.js → commands-registry-6jWzz0mk.js} +4 -4
- package/dist/{deliver-DZCNXFM8.js → deliver-Ddw3EsOV.js} +11 -11
- package/dist/deliver-runtime-CF9aNwHW.js +36 -0
- package/dist/deps-send-discord.runtime-BdlL7AnG.js +26 -0
- package/dist/deps-send-imessage.runtime-BQx5JSa_.js +25 -0
- package/dist/deps-send-signal.runtime-dgrmoRN9.js +24 -0
- package/dist/deps-send-slack.runtime-CCOjVEQr.js +22 -0
- package/dist/deps-send-telegram.runtime-BgwTF5zt.js +27 -0
- package/dist/deps-send-whatsapp.runtime-C_zE7G9V.js +60 -0
- package/dist/{deps-send-whatsapp.runtime-rPF4BAeN.js → deps-send-whatsapp.runtime-DhuS0SeA.js} +2 -2
- package/dist/{diagnostic-4Dbmo6KU.js → diagnostic-B74jJPqv.js} +2 -2
- package/dist/{errors-Dih7OXdL.js → errors-CCLnP2Fs.js} +1 -1
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-COEkF6YP.js → fetch-OMudX6HR.js} +4 -4
- package/dist/{fetch-guard-CcP28UT1.js → fetch-guard-DBZ7o2IA.js} +2 -2
- package/dist/{frontmatter-LLGh43CC.js → frontmatter-vSrur-r-.js} +3 -3
- package/dist/{fs-safe-NHJJ1b9f.js → fs-safe-Dy2_iDiY.js} +3 -3
- package/dist/{image-COAbpp2B.js → image-CdfqhHaX.js} +6 -6
- package/dist/{image-ops-QLLBkxzG.js → image-ops-BQmWYj-1.js} +2 -2
- package/dist/image-runtime-BFxy3jl0.js +29 -0
- package/dist/{ir-RKRKj5a9.js → ir-DEPhOdwg.js} +8 -8
- package/dist/{legacy-names-CR_H5NWa.js → legacy-names-CDxprteD.js} +1 -1
- package/dist/llm-slug-generator.js +49 -49
- package/dist/{logger-D20iS3B-.js → logger-onBePS9K.js} +1 -1
- package/dist/{login-C1_lumKW.js → login-BPzRFY6S.js} +5 -5
- package/dist/{login-qr-D0Gij2UC.js → login-qr-BZbSxC-5.js} +8 -8
- package/dist/{manager-B_QaG_-L.js → manager-D3ROcs7_.js} +9 -9
- package/dist/manager-runtime-Dup90ARI.js +18 -0
- package/dist/{model-selection-Bjj4oU16.js → model-selection-Bh4BR1_K.js} +10 -10
- package/dist/{outbound-ChkqJkiM.js → outbound-BApjXYwN.js} +6 -6
- package/dist/{outbound-attachment-CRXa01xP.js → outbound-attachment-1Yd0-JW2.js} +2 -2
- package/dist/{path-alias-guards-DgNuZPBA.js → path-alias-guards-B63g_1Gb.js} +1 -1
- package/dist/{paths-7EEBmI5a.js → paths-BJWEyNJy.js} +1 -1
- package/dist/{pi-embedded-BoY_A7hg.js → pi-embedded-BPU69pec.js} +50 -50
- package/dist/{pi-embedded-CLTN3qXD.js → pi-embedded-Cajbf_ri.js} +131 -131
- package/dist/{pi-embedded-helpers-1Z1aUoto.js → pi-embedded-helpers-xpgo_nwz.js} +19 -19
- package/dist/{pi-model-discovery-DSuyTtRM.js → pi-model-discovery-BbCPyLm5.js} +1 -1
- package/dist/pi-model-discovery-runtime-BeF5ldX8.js +11 -0
- package/dist/{pi-tools.before-tool-call.runtime-BCq4EKHD.js → pi-tools.before-tool-call.runtime-s89v8h6G.js} +7 -7
- package/dist/plugin-sdk/accounts-BXFDqY90.js +288 -0
- package/dist/plugin-sdk/accounts-DU7Js54-.js +46 -0
- package/dist/plugin-sdk/accounts-DxiB_4z4.js +35 -0
- package/dist/plugin-sdk/active-listener-DRKcesNb.js +50 -0
- package/dist/plugin-sdk/api-key-rotation-k1ZNheUH.js +181 -0
- package/dist/plugin-sdk/audio-preflight-Be1sKsob.js +69 -0
- package/dist/plugin-sdk/audio-transcription-runner-jhHyCc_7.js +2176 -0
- package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +58 -0
- package/dist/plugin-sdk/channel-activity-Bq1Y9RiB.js +94 -0
- package/dist/plugin-sdk/channel-web-AsdjtnvN.js +2256 -0
- package/dist/plugin-sdk/chrome-DOnBMnlx.js +2415 -0
- package/dist/plugin-sdk/commands-registry-D0py59pz.js +1125 -0
- package/dist/plugin-sdk/config-B16xKqSo.js +17912 -0
- package/dist/plugin-sdk/deliver-BqXXtIuw.js +1694 -0
- package/dist/plugin-sdk/deliver-runtime-D0xZkt8n.js +32 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-BM6ppx2Q.js +23 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-3w5PhXGu.js +22 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-yH9cQl3_.js +21 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-Bh4gw-L5.js +19 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-C_CtsWgt.js +24 -0
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-BF4vx9Ho.js +57 -0
- package/dist/plugin-sdk/diagnostic-DUbajFSl.js +319 -0
- package/dist/plugin-sdk/errors-B8oJXuCF.js +54 -0
- package/dist/plugin-sdk/fetch-guard-Cgyq6Jv9.js +156 -0
- package/dist/plugin-sdk/fs-safe-BW1ypSDS.js +352 -0
- package/dist/plugin-sdk/image-BPXnvxYL.js +2310 -0
- package/dist/plugin-sdk/image-ops-BBY2fn9x.js +584 -0
- package/dist/plugin-sdk/image-runtime-S-TzaJpg.js +25 -0
- package/dist/plugin-sdk/imessage.js +2 -2
- package/dist/plugin-sdk/index.js +50 -50
- package/dist/plugin-sdk/ir-BJsqyZfm.js +1296 -0
- package/dist/plugin-sdk/local-roots-C1ETRlaC.js +186 -0
- package/dist/plugin-sdk/logger-DDdrdbDu.js +1163 -0
- package/dist/plugin-sdk/login-DtS9DDnV.js +57 -0
- package/dist/plugin-sdk/login-qr-B9YeeJ37.js +320 -0
- package/dist/plugin-sdk/manager-Dn7j3n0d.js +3917 -0
- package/dist/plugin-sdk/manager-runtime-UK1-iA2B.js +15 -0
- package/dist/plugin-sdk/mattermost.js +3 -3
- package/dist/plugin-sdk/outbound-B8ca8vE3.js +212 -0
- package/dist/plugin-sdk/outbound-attachment-BppFIMQa.js +19 -0
- package/dist/plugin-sdk/path-alias-guards-BX-3FprC.js +43 -0
- package/dist/plugin-sdk/paths-CjFcHB_C.js +166 -0
- package/dist/plugin-sdk/pi-embedded-helpers-BeYjP1MW.js +9627 -0
- package/dist/plugin-sdk/pi-model-discovery-B_qCKuSW.js +134 -0
- package/dist/plugin-sdk/pi-model-discovery-runtime-CZNiNFlm.js +8 -0
- package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-cZdrrV27.js +354 -0
- package/dist/plugin-sdk/plugins-rivB8KaQ.js +864 -0
- package/dist/{proxy-fetch-ChIxNDe3.js → plugin-sdk/proxy-fetch-ZPEvp58f.js} +1 -1
- package/dist/plugin-sdk/pw-ai-qaWZD0yx.js +1938 -0
- package/dist/plugin-sdk/qmd-manager-izn0N9V3.js +1448 -0
- package/dist/plugin-sdk/query-expansion-C1Nx0XAb.js +1011 -0
- package/dist/{redact-BSwbgwaV.js → plugin-sdk/redact-BoNEjbpF.js} +1 -1
- package/dist/plugin-sdk/reply-DNSpho0-.js +98763 -0
- package/dist/plugin-sdk/resolve-outbound-target-YiPIGXVN.js +40 -0
- package/dist/plugin-sdk/run-with-concurrency-vfuRiXdY.js +2023 -0
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-BgwMJs4X.js +10 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-Y7maoii7.js +19 -0
- package/dist/plugin-sdk/send-BSD6Pkrk.js +414 -0
- package/dist/plugin-sdk/send-C4KxEJe1.js +503 -0
- package/dist/plugin-sdk/send-D3XVKGvq.js +540 -0
- package/dist/plugin-sdk/send-DFrnRiWm.js +3135 -0
- package/dist/plugin-sdk/send-Dh1f5xjE.js +2587 -0
- package/dist/plugin-sdk/session-D5c0BIEo.js +169 -0
- package/dist/plugin-sdk/skill-commands-CnqkEfhS.js +342 -0
- package/dist/plugin-sdk/skills-DSbDUvmU.js +1428 -0
- package/dist/plugin-sdk/slack.js +2 -2
- package/dist/plugin-sdk/slash-commands.runtime-Dbtq7ppF.js +13 -0
- package/dist/plugin-sdk/slash-dispatch.runtime-BhAks953.js +52 -0
- package/dist/plugin-sdk/slash-skill-commands.runtime-QGNWVO9S.js +16 -0
- package/dist/plugin-sdk/ssrf-DvsjfpC2.js +202 -0
- package/dist/plugin-sdk/store-DG90hxe6.js +81 -0
- package/dist/plugin-sdk/subagent-registry-runtime-Db83OZ3_.js +52 -0
- package/dist/plugin-sdk/tables-DNlQ8oQ3.js +55 -0
- package/dist/{target-errors-BMTA5KVE.js → plugin-sdk/target-errors-BlVYPwVC.js} +2 -2
- package/dist/plugin-sdk/thinking-DT2ZR60x.js +1206 -0
- package/dist/{tokens-Cdk21tF_.js → plugin-sdk/tokens-CTIYTLWu.js} +1 -1
- package/dist/plugin-sdk/tool-images-DroS1EaM.js +274 -0
- package/dist/plugin-sdk/web-42d5VBZj.js +56 -0
- package/dist/plugin-sdk/whatsapp-actions-DR2aYq5f.js +80 -0
- package/dist/{plugins-D-K4oUXz.js → plugins-D8QbEQB8.js} +6 -6
- package/dist/{proxy-env-D9oPe73i.js → proxy-env-DS2YEWWX.js} +1 -1
- package/dist/proxy-fetch-08-dhqxn.js +38 -0
- package/dist/{pw-ai-4QFtj-s9.js → pw-ai-rD2G8OP-.js} +12 -12
- package/dist/{qmd-manager-CIcyVJmI.js → qmd-manager-B9vC7u4w.js} +9 -9
- package/dist/{query-expansion-BMExPdLO.js → query-expansion-o9Ib6_Rk.js} +4 -4
- package/dist/redact-rnJm_Z5E.js +319 -0
- package/dist/{run-with-concurrency-hJFK7PcO.js → run-with-concurrency-C3dKaL_j.js} +3 -3
- package/dist/runtime-whatsapp-login.runtime-BVm0A03Y.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-d8oRCgsW.js +22 -0
- package/dist/{send-DySBiOxg.js → send-6s7HVGcN.js} +7 -7
- package/dist/{send-BMtxl7vL.js → send-BdQyKIzE.js} +5 -5
- package/dist/{send-DJcNRhf_.js → send-CAzswJK6.js} +8 -8
- package/dist/{send-CNzGOCHa.js → send-DKB7vlw3.js} +6 -6
- package/dist/{send-pUHxPU20.js → send-Q5SBsGfY.js} +14 -14
- package/dist/{session-DOFapRIv.js → session-D2CiV8TN.js} +4 -4
- package/dist/{skill-commands-yvTkQtnt.js → skill-commands-CgJiKg3Q.js} +5 -5
- package/dist/{skills-BjHeDO5V.js → skills-DNyMj13y.js} +7 -7
- package/dist/slash-commands.runtime-Cvnjq5gh.js +16 -0
- package/dist/{slash-dispatch.runtime-B79IzyjK.js → slash-dispatch.runtime-UHClfKIh.js} +1 -1
- package/dist/slash-dispatch.runtime-YGQtou1U.js +56 -0
- package/dist/slash-skill-commands.runtime-BbZPUdhN.js +20 -0
- package/dist/{store-C3iBzr-_.js → store-Bdm7wypS.js} +2 -2
- package/dist/{subagent-registry-runtime-CFbDYdKR.js → subagent-registry-runtime-BYDycq2m.js} +1 -1
- package/dist/subagent-registry-runtime-DoZWJdY9.js +56 -0
- package/dist/{subsystem-CWsKV5VU.js → subsystem-BJ89YjCN.js} +2 -2
- package/dist/{tables-Bv8tJ0qC.js → tables-MEAoO_QC.js} +1 -1
- package/dist/target-errors-qetEoXTB.js +195 -0
- package/dist/{thinking-BB_GM390.js → thinking-CaLooOu4.js} +7 -7
- package/dist/tokens-9NF8L9Uh.js +52 -0
- package/dist/{tool-images-HRwkh81U.js → tool-images-CkmNQqHm.js} +2 -2
- package/dist/{web-BUpcF84p.js → web-CGbFuIR9.js} +1 -1
- package/dist/{web-BbpOMti_.js → web-ajuJjPrA.js} +53 -53
- package/dist/{whatsapp-actions-CuLcPfQ9.js → whatsapp-actions-DuJpyhRe.js} +19 -19
- package/dist/{workspace-MO4aE903.js → workspace-CkozFUzc.js} +2 -2
- package/package.json +2 -2
- package/dist/deliver-runtime-BJoBkkm_.js +0 -36
- package/dist/deps-send-discord.runtime-Dlb1pOSn.js +0 -26
- package/dist/deps-send-imessage.runtime-DmVvqFTt.js +0 -25
- package/dist/deps-send-signal.runtime-DPX_GcJK.js +0 -24
- package/dist/deps-send-slack.runtime-s7wb1ssP.js +0 -22
- package/dist/deps-send-telegram.runtime-DcIT4v5p.js +0 -27
- package/dist/deps-send-whatsapp.runtime-DfAhniLS.js +0 -60
- package/dist/image-runtime-Dkwf1-U3.js +0 -29
- package/dist/manager-runtime-DPiPNTWB.js +0 -18
- package/dist/pi-model-discovery-runtime-CRif8A8F.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-DTnmQLV1.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Da-07rzo.js +0 -22
- package/dist/slash-commands.runtime-FS9JZ9BW.js +0 -16
- package/dist/slash-dispatch.runtime-BZw5XlvY.js +0 -56
- package/dist/slash-skill-commands.runtime-BZIbPU6x.js +0 -20
- package/dist/subagent-registry-runtime-Blx4zbr0.js +0 -56
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
import { S as resolveNodeRequireFromMeta } from "./subsystem-BJ89YjCN.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,7 +1,7 @@
|
|
|
1
1
|
import { c as resolveStateDir } from "./paths-ZhiQAuKk.js";
|
|
2
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { $ as parseAgentSessionKey, B as resolveAgentIdFromSessionKey, R as normalizeAgentId, j as DEFAULT_AGENT_ID, p as resolveDefaultAgentWorkspaceDir } from "./workspace-
|
|
4
|
-
import { y as resolveUserPath } from "./logger-
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-BJ89YjCN.js";
|
|
3
|
+
import { $ as parseAgentSessionKey, B as resolveAgentIdFromSessionKey, R as normalizeAgentId, j as DEFAULT_AGENT_ID, p as resolveDefaultAgentWorkspaceDir } from "./workspace-CkozFUzc.js";
|
|
4
|
+
import { y as resolveUserPath } from "./logger-onBePS9K.js";
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
|
|
7
7
|
//#region src/config/model-input.ts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./run-with-concurrency-C3dKaL_j.js";
|
|
2
|
+
import "./paths-ZhiQAuKk.js";
|
|
3
|
+
import "./subsystem-BJ89YjCN.js";
|
|
4
|
+
import "./workspace-CkozFUzc.js";
|
|
5
|
+
import "./logger-onBePS9K.js";
|
|
6
|
+
import "./model-selection-Bh4BR1_K.js";
|
|
7
|
+
import "./github-copilot-token-B8Wx9FgQ.js";
|
|
8
|
+
import "./legacy-names-CDxprteD.js";
|
|
9
|
+
import "./accounts-CqITV0Ga.js";
|
|
10
|
+
import "./session-D2CiV8TN.js";
|
|
11
|
+
import { t as loginWeb } from "./login-BPzRFY6S.js";
|
|
12
|
+
|
|
13
|
+
export { loginWeb };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import "./run-with-concurrency-C3dKaL_j.js";
|
|
2
|
+
import "./paths-ZhiQAuKk.js";
|
|
3
|
+
import "./subsystem-BJ89YjCN.js";
|
|
4
|
+
import "./workspace-CkozFUzc.js";
|
|
5
|
+
import "./logger-onBePS9K.js";
|
|
6
|
+
import "./model-selection-Bh4BR1_K.js";
|
|
7
|
+
import "./github-copilot-token-B8Wx9FgQ.js";
|
|
8
|
+
import "./legacy-names-CDxprteD.js";
|
|
9
|
+
import "./plugins-D8QbEQB8.js";
|
|
10
|
+
import "./accounts-CqITV0Ga.js";
|
|
11
|
+
import "./image-ops-BQmWYj-1.js";
|
|
12
|
+
import "./path-alias-guards-B63g_1Gb.js";
|
|
13
|
+
import "./fs-safe-Dy2_iDiY.js";
|
|
14
|
+
import "./proxy-env-DS2YEWWX.js";
|
|
15
|
+
import "./fetch-OMudX6HR.js";
|
|
16
|
+
import "./fetch-guard-DBZ7o2IA.js";
|
|
17
|
+
import "./ir-DEPhOdwg.js";
|
|
18
|
+
import "./render-DW7AcFdD.js";
|
|
19
|
+
import "./tables-MEAoO_QC.js";
|
|
20
|
+
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./outbound-BApjXYwN.js";
|
|
21
|
+
|
|
22
|
+
export { sendMessageWhatsApp, sendPollWhatsApp };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { h as normalizeE164, y as resolveUserPath } from "./logger-
|
|
2
|
-
import { X as loadConfig } from "./model-selection-
|
|
3
|
-
import { E as kindFromMime } from "./image-ops-
|
|
4
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
5
|
-
import { s as resolveMarkdownTableMode } from "./ir-
|
|
6
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
7
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
1
|
+
import { h as normalizeE164, y as resolveUserPath } from "./logger-onBePS9K.js";
|
|
2
|
+
import { X as loadConfig } from "./model-selection-Bh4BR1_K.js";
|
|
3
|
+
import { E as kindFromMime } from "./image-ops-BQmWYj-1.js";
|
|
4
|
+
import { t as resolveIMessageAccount } from "./accounts-CB2Or0mr.js";
|
|
5
|
+
import { s as resolveMarkdownTableMode } from "./ir-DEPhOdwg.js";
|
|
6
|
+
import { t as convertMarkdownTables } from "./tables-MEAoO_QC.js";
|
|
7
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-1Yd0-JW2.js";
|
|
8
8
|
import { spawn } from "node:child_process";
|
|
9
9
|
import { createInterface } from "node:readline";
|
|
10
10
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { X as loadConfig } from "./model-selection-
|
|
1
|
+
import { X as loadConfig } from "./model-selection-Bh4BR1_K.js";
|
|
2
2
|
import { n as generateSecureUuid } from "./secure-random-CXrBi7Jq.js";
|
|
3
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
4
|
-
import { E as kindFromMime } from "./image-ops-
|
|
3
|
+
import { n as resolveSignalAccount } from "./accounts-Cop2dSRo.js";
|
|
4
|
+
import { E as kindFromMime } from "./image-ops-BQmWYj-1.js";
|
|
5
5
|
import { n as fetchWithTimeout } from "./fetch-timeout-Wgx3OXYj.js";
|
|
6
|
-
import { n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-
|
|
6
|
+
import { n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-DEPhOdwg.js";
|
|
7
7
|
import { t as resolveFetch } from "./fetch-tZXOZ9FV.js";
|
|
8
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
8
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-1Yd0-JW2.js";
|
|
9
9
|
|
|
10
10
|
//#region src/signal/format.ts
|
|
11
11
|
function normalizeUrlForComparison(url) {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { w as resolvePreferredSquidClawTmpDir } from "./subsystem-
|
|
2
|
-
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-
|
|
3
|
-
import { S as retryAsync, X as loadConfig, x as resolveRetryConfig } from "./model-selection-
|
|
4
|
-
import { b as resolveDiscordAccount, x as normalizeDiscordToken } from "./plugins-
|
|
1
|
+
import { w as resolvePreferredSquidClawTmpDir } from "./subsystem-BJ89YjCN.js";
|
|
2
|
+
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-CkozFUzc.js";
|
|
3
|
+
import { S as retryAsync, X as loadConfig, x as resolveRetryConfig } from "./model-selection-Bh4BR1_K.js";
|
|
4
|
+
import { b as resolveDiscordAccount, x as normalizeDiscordToken } from "./plugins-D8QbEQB8.js";
|
|
5
5
|
import { i as requireTargetKind, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Bhj5bO-0.js";
|
|
6
|
-
import { k as maxBytesForKind, x as extensionForMime } from "./image-ops-
|
|
7
|
-
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, m as resolveChunkMode, o as loadWebMediaRaw, s as resolveMarkdownTableMode } from "./ir-
|
|
6
|
+
import { k as maxBytesForKind, x as extensionForMime } from "./image-ops-BQmWYj-1.js";
|
|
7
|
+
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, m as resolveChunkMode, o as loadWebMediaRaw, s as resolveMarkdownTableMode } from "./ir-DEPhOdwg.js";
|
|
8
8
|
import { t as resolveFetch } from "./fetch-tZXOZ9FV.js";
|
|
9
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-
|
|
9
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-Du1kh0t3.js";
|
|
10
10
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-BFUunM8u.js";
|
|
11
11
|
import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-CYTwXmA1.js";
|
|
12
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
12
|
+
import { t as convertMarkdownTables } from "./tables-MEAoO_QC.js";
|
|
13
13
|
import fs from "node:fs/promises";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import { promisify } from "node:util";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { u as logVerbose } from "./subsystem-
|
|
2
|
-
import { X as loadConfig } from "./model-selection-
|
|
3
|
-
import { i as isSilentReplyText } from "./tokens-
|
|
4
|
-
import { g as resolveSlackBotToken, p as resolveSlackAccount } from "./plugins-
|
|
1
|
+
import { u as logVerbose } from "./subsystem-BJ89YjCN.js";
|
|
2
|
+
import { X as loadConfig } from "./model-selection-Bh4BR1_K.js";
|
|
3
|
+
import { i as isSilentReplyText } from "./tokens-9NF8L9Uh.js";
|
|
4
|
+
import { g as resolveSlackBotToken, p as resolveSlackAccount } from "./plugins-D8QbEQB8.js";
|
|
5
5
|
import { i as requireTargetKind, n as ensureTargetId, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Bhj5bO-0.js";
|
|
6
|
-
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
7
|
-
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-
|
|
6
|
+
import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-DBZ7o2IA.js";
|
|
7
|
+
import { a as loadWebMedia, d as chunkMarkdownTextWithMode, h as resolveTextChunkLimit, m as resolveChunkMode, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-DEPhOdwg.js";
|
|
8
8
|
import { t as renderMarkdownWithMarkers } from "./render-DW7AcFdD.js";
|
|
9
9
|
import { WebClient } from "@slack/web-api";
|
|
10
10
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-ZhiQAuKk.js";
|
|
2
|
-
import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-
|
|
3
|
-
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-
|
|
4
|
-
import { a as CONFIG_DIR, b as safeParseJson } from "./logger-
|
|
5
|
-
import { Hn as resolveTelegramPreviewStreamMode, Q as readConfigFileSnapshotForWrite, X as loadConfig, Zn as isTruthyEnvValue, ar as withFileLock$1, et as writeConfigFile } from "./model-selection-
|
|
6
|
-
import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-
|
|
2
|
+
import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-BJ89YjCN.js";
|
|
3
|
+
import { G as normalizeAccountId, W as DEFAULT_ACCOUNT_ID } from "./workspace-CkozFUzc.js";
|
|
4
|
+
import { a as CONFIG_DIR, b as safeParseJson } from "./logger-onBePS9K.js";
|
|
5
|
+
import { Hn as resolveTelegramPreviewStreamMode, Q as readConfigFileSnapshotForWrite, X as loadConfig, Zn as isTruthyEnvValue, ar as withFileLock$1, et as writeConfigFile } from "./model-selection-Bh4BR1_K.js";
|
|
6
|
+
import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-D8QbEQB8.js";
|
|
7
7
|
import { n as normalizeTelegramLookupTarget, r as parseTelegramTarget, t as normalizeTelegramChatId } from "./targets-BiE9e9-P.js";
|
|
8
|
-
import { D as normalizeMimeType, E as kindFromMime, S as getFileExtension, T as isGifMedia } from "./image-ops-
|
|
9
|
-
import { t as redactSensitiveText } from "./redact-
|
|
10
|
-
import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-
|
|
11
|
-
import { t as hasProxyEnvConfigured } from "./proxy-env-
|
|
8
|
+
import { D as normalizeMimeType, E as kindFromMime, S as getFileExtension, T as isGifMedia } from "./image-ops-BQmWYj-1.js";
|
|
9
|
+
import { t as redactSensitiveText } from "./redact-rnJm_Z5E.js";
|
|
10
|
+
import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-CCLnP2Fs.js";
|
|
11
|
+
import { t as hasProxyEnvConfigured } from "./proxy-env-DS2YEWWX.js";
|
|
12
12
|
import { r as writeJsonAtomic } from "./json-files-D7-rxoSr.js";
|
|
13
|
-
import { t as makeProxyFetch } from "./proxy-fetch-
|
|
14
|
-
import { a as loadWebMedia, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-
|
|
13
|
+
import { t as makeProxyFetch } from "./proxy-fetch-08-dhqxn.js";
|
|
14
|
+
import { a as loadWebMedia, n as markdownToIR, s as resolveMarkdownTableMode, t as chunkMarkdownIR } from "./ir-DEPhOdwg.js";
|
|
15
15
|
import { t as renderMarkdownWithMarkers } from "./render-DW7AcFdD.js";
|
|
16
16
|
import { t as resolveFetch } from "./fetch-tZXOZ9FV.js";
|
|
17
|
-
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-
|
|
17
|
+
import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-Du1kh0t3.js";
|
|
18
18
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-BFUunM8u.js";
|
|
19
19
|
import { n as normalizePollInput } from "./polls-CYTwXmA1.js";
|
|
20
20
|
import fs from "node:fs/promises";
|
|
21
21
|
import os from "node:os";
|
|
22
22
|
import path from "node:path";
|
|
23
23
|
import fssync, { readFileSync } from "node:fs";
|
|
24
|
-
import
|
|
24
|
+
import json5 from "json5";
|
|
25
25
|
import process$1 from "node:process";
|
|
26
26
|
import crypto, { randomBytes } from "node:crypto";
|
|
27
27
|
import * as net$1 from "node:net";
|
|
@@ -977,7 +977,7 @@ async function loadCronStore(storePath) {
|
|
|
977
977
|
const raw = await fssync.promises.readFile(storePath, "utf-8");
|
|
978
978
|
let parsed;
|
|
979
979
|
try {
|
|
980
|
-
parsed =
|
|
980
|
+
parsed = json5.parse(raw);
|
|
981
981
|
} catch (err) {
|
|
982
982
|
throw new Error(`Failed to parse cron store at ${storePath}: ${String(err)}`, { cause: err });
|
|
983
983
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-
|
|
2
|
-
import { l as ensureDir, y as resolveUserPath } from "./logger-
|
|
3
|
-
import { lr as formatCliCommand, qn as VERSION } from "./model-selection-
|
|
4
|
-
import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-
|
|
1
|
+
import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-BJ89YjCN.js";
|
|
2
|
+
import { l as ensureDir, y as resolveUserPath } from "./logger-onBePS9K.js";
|
|
3
|
+
import { lr as formatCliCommand, qn as VERSION } from "./model-selection-Bh4BR1_K.js";
|
|
4
|
+
import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-CqITV0Ga.js";
|
|
5
5
|
import fssync from "node:fs";
|
|
6
6
|
import { randomUUID } from "node:crypto";
|
|
7
7
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as resolveAgentWorkspaceDir, r as listAgentIds, s as resolveAgentSkillsFilter } from "./run-with-concurrency-
|
|
1
|
+
import { c as resolveAgentWorkspaceDir, r as listAgentIds, s as resolveAgentSkillsFilter } from "./run-with-concurrency-C3dKaL_j.js";
|
|
2
2
|
import { c as resolveStateDir } from "./paths-ZhiQAuKk.js";
|
|
3
|
-
import { t as createSubsystemLogger, u as logVerbose } from "./subsystem-
|
|
4
|
-
import { a as CONFIG_DIR, y as resolveUserPath } from "./logger-
|
|
5
|
-
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-
|
|
3
|
+
import { t as createSubsystemLogger, u as logVerbose } from "./subsystem-BJ89YjCN.js";
|
|
4
|
+
import { a as CONFIG_DIR, y as resolveUserPath } from "./logger-onBePS9K.js";
|
|
5
|
+
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-DNyMj13y.js";
|
|
6
6
|
import { t as createAsyncLock } from "./json-files-D7-rxoSr.js";
|
|
7
|
-
import { i as listChatCommands } from "./commands-registry-
|
|
7
|
+
import { i as listChatCommands } from "./commands-registry-6jWzz0mk.js";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import fssync from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { m as normalizeSkillFilter } from "./run-with-concurrency-
|
|
2
|
-
import { t as createSubsystemLogger, w as resolvePreferredSquidClawTmpDir } from "./subsystem-
|
|
3
|
-
import { O as isPathInside, h as resolveSquidClawPackageRootSync } from "./workspace-
|
|
4
|
-
import { a as CONFIG_DIR, y as resolveUserPath } from "./logger-
|
|
5
|
-
import { Bt as resolveMemorySlotDecision, Nt as loadPluginManifestRegistry, Rt as normalizePluginsConfig, Un as isPathInsideWithRealpath, Xn as isDangerousHostEnvVarName, gr as normalizeResolvedSecretInputString, zt as resolveEffectiveEnableState } from "./model-selection-
|
|
6
|
-
import { a as resolveSquidClawManifestBlock, c as resolveSquidClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseSquidClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveSquidClawManifestInstall, r as parseFrontmatterBool, s as resolveSquidClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-
|
|
7
|
-
import { n as assertNoPathAliasEscape } from "./path-alias-guards-
|
|
1
|
+
import { m as normalizeSkillFilter } from "./run-with-concurrency-C3dKaL_j.js";
|
|
2
|
+
import { t as createSubsystemLogger, w as resolvePreferredSquidClawTmpDir } from "./subsystem-BJ89YjCN.js";
|
|
3
|
+
import { O as isPathInside, h as resolveSquidClawPackageRootSync } from "./workspace-CkozFUzc.js";
|
|
4
|
+
import { a as CONFIG_DIR, y as resolveUserPath } from "./logger-onBePS9K.js";
|
|
5
|
+
import { Bt as resolveMemorySlotDecision, Nt as loadPluginManifestRegistry, Rt as normalizePluginsConfig, Un as isPathInsideWithRealpath, Xn as isDangerousHostEnvVarName, gr as normalizeResolvedSecretInputString, zt as resolveEffectiveEnableState } from "./model-selection-Bh4BR1_K.js";
|
|
6
|
+
import { a as resolveSquidClawManifestBlock, c as resolveSquidClawManifestRequires, d as hasBinary, f as isConfigPathTruthyWithDefaults, i as parseSquidClawManifestInstallBase, l as parseFrontmatterBlock, n as normalizeStringList, o as resolveSquidClawManifestInstall, r as parseFrontmatterBool, s as resolveSquidClawManifestOs, t as getFrontmatterString, u as evaluateRuntimeEligibility } from "./frontmatter-vSrur-r-.js";
|
|
7
|
+
import { n as assertNoPathAliasEscape } from "./path-alias-guards-B63g_1Gb.js";
|
|
8
8
|
import os from "node:os";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import fssync from "node:fs";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import "./run-with-concurrency-C3dKaL_j.js";
|
|
2
|
+
import "./paths-ZhiQAuKk.js";
|
|
3
|
+
import "./subsystem-BJ89YjCN.js";
|
|
4
|
+
import "./workspace-CkozFUzc.js";
|
|
5
|
+
import "./logger-onBePS9K.js";
|
|
6
|
+
import "./model-selection-Bh4BR1_K.js";
|
|
7
|
+
import "./github-copilot-token-B8Wx9FgQ.js";
|
|
8
|
+
import "./legacy-names-CDxprteD.js";
|
|
9
|
+
import "./thinking-CaLooOu4.js";
|
|
10
|
+
import "./plugins-D8QbEQB8.js";
|
|
11
|
+
import "./accounts-CqITV0Ga.js";
|
|
12
|
+
import "./accounts-Cop2dSRo.js";
|
|
13
|
+
import "./accounts-CB2Or0mr.js";
|
|
14
|
+
import { f as resolveCommandArgMenu, n as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs } from "./commands-registry-6jWzz0mk.js";
|
|
15
|
+
|
|
16
|
+
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -2,7 +2,7 @@ import "./run-with-concurrency-DkA37pfw.js";
|
|
|
2
2
|
import "./paths-Bxnm7jO8.js";
|
|
3
3
|
import "./logger-RMqzbo8v.js";
|
|
4
4
|
import "./model-selection-BAHgzvVh.js";
|
|
5
|
-
import { D as resolveAgentRoute, P as finalizeInboundContext, a as createReplyPrefixOptions, b as dispatchReplyWithDispatcher, n as recordInboundSessionMetaSafe, r as deliverSlackSlashReplies } from "./pi-embedded-
|
|
5
|
+
import { D as resolveAgentRoute, P as finalizeInboundContext, a as createReplyPrefixOptions, b as dispatchReplyWithDispatcher, n as recordInboundSessionMetaSafe, r as deliverSlackSlashReplies } from "./pi-embedded-BPU69pec.js";
|
|
6
6
|
import "./github-copilot-token-BI4jINAR.js";
|
|
7
7
|
import "./thinking-XCxkX-4-.js";
|
|
8
8
|
import "./tokens-DXTW31In.js";
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import "./run-with-concurrency-C3dKaL_j.js";
|
|
2
|
+
import "./paths-ZhiQAuKk.js";
|
|
3
|
+
import "./subsystem-BJ89YjCN.js";
|
|
4
|
+
import "./workspace-CkozFUzc.js";
|
|
5
|
+
import "./logger-onBePS9K.js";
|
|
6
|
+
import "./model-selection-Bh4BR1_K.js";
|
|
7
|
+
import "./github-copilot-token-B8Wx9FgQ.js";
|
|
8
|
+
import "./legacy-names-CDxprteD.js";
|
|
9
|
+
import "./thinking-CaLooOu4.js";
|
|
10
|
+
import "./tokens-9NF8L9Uh.js";
|
|
11
|
+
import { I as finalizeInboundContext, S as dispatchReplyWithDispatcher, k as resolveAgentRoute, n as recordInboundSessionMetaSafe, r as deliverSlackSlashReplies, s as createReplyPrefixOptions } from "./pi-embedded-Cajbf_ri.js";
|
|
12
|
+
import "./plugins-D8QbEQB8.js";
|
|
13
|
+
import "./accounts-CqITV0Ga.js";
|
|
14
|
+
import "./send-DKB7vlw3.js";
|
|
15
|
+
import "./send-CAzswJK6.js";
|
|
16
|
+
import "./deliver-Ddw3EsOV.js";
|
|
17
|
+
import "./diagnostic-B74jJPqv.js";
|
|
18
|
+
import "./accounts-Cop2dSRo.js";
|
|
19
|
+
import "./image-ops-BQmWYj-1.js";
|
|
20
|
+
import "./send-Q5SBsGfY.js";
|
|
21
|
+
import "./pi-model-discovery-BbCPyLm5.js";
|
|
22
|
+
import { kt as resolveConversationLabel } from "./pi-embedded-helpers-xpgo_nwz.js";
|
|
23
|
+
import "./chrome-C2CliEWR.js";
|
|
24
|
+
import "./frontmatter-vSrur-r-.js";
|
|
25
|
+
import "./skills-DNyMj13y.js";
|
|
26
|
+
import "./path-alias-guards-B63g_1Gb.js";
|
|
27
|
+
import "./redact-rnJm_Z5E.js";
|
|
28
|
+
import "./errors-CCLnP2Fs.js";
|
|
29
|
+
import "./fs-safe-Dy2_iDiY.js";
|
|
30
|
+
import "./proxy-env-DS2YEWWX.js";
|
|
31
|
+
import "./store-Bdm7wypS.js";
|
|
32
|
+
import "./accounts-CB2Or0mr.js";
|
|
33
|
+
import "./paths-BJWEyNJy.js";
|
|
34
|
+
import "./tool-images-CkmNQqHm.js";
|
|
35
|
+
import "./image-CdfqhHaX.js";
|
|
36
|
+
import "./audio-transcription-runner-Mha07yP4.js";
|
|
37
|
+
import "./fetch-OMudX6HR.js";
|
|
38
|
+
import "./fetch-guard-DBZ7o2IA.js";
|
|
39
|
+
import "./api-key-rotation-Da2qYrP7.js";
|
|
40
|
+
import "./proxy-fetch-08-dhqxn.js";
|
|
41
|
+
import { m as resolveChunkMode, s as resolveMarkdownTableMode } from "./ir-DEPhOdwg.js";
|
|
42
|
+
import "./render-DW7AcFdD.js";
|
|
43
|
+
import "./target-errors-qetEoXTB.js";
|
|
44
|
+
import "./commands-registry-6jWzz0mk.js";
|
|
45
|
+
import "./skill-commands-CgJiKg3Q.js";
|
|
46
|
+
import "./fetch-tZXOZ9FV.js";
|
|
47
|
+
import "./channel-activity-Du1kh0t3.js";
|
|
48
|
+
import "./tables-MEAoO_QC.js";
|
|
49
|
+
import "./send-BdQyKIzE.js";
|
|
50
|
+
import "./outbound-attachment-1Yd0-JW2.js";
|
|
51
|
+
import "./send-6s7HVGcN.js";
|
|
52
|
+
import "./proxy-CecQTx_Z.js";
|
|
53
|
+
import "./manager-D3ROcs7_.js";
|
|
54
|
+
import "./query-expansion-o9Ib6_Rk.js";
|
|
55
|
+
|
|
56
|
+
export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|