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,169 @@
|
|
|
1
|
+
import { f as readCredsJsonRaw, g as resolveWebCredsPath, h as resolveWebCredsBackupPath, m as resolveDefaultWebAuthDir, u as maybeRestoreCredsFromBackup } from "./accounts-BXFDqY90.js";
|
|
2
|
+
import { Pr as formatCliCommand, Xr as VERSION } from "./config-B16xKqSo.js";
|
|
3
|
+
import { B as success, E as resolveUserPath, F as danger, G as getChildLogger, g as ensureDir, q as toPinoLikeLogger } from "./logger-DDdrdbDu.js";
|
|
4
|
+
import fs from "node:fs";
|
|
5
|
+
import { randomUUID } from "node:crypto";
|
|
6
|
+
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
7
|
+
import qrcode from "qrcode-terminal";
|
|
8
|
+
|
|
9
|
+
//#region src/web/session.ts
|
|
10
|
+
let credsSaveQueue = Promise.resolve();
|
|
11
|
+
function enqueueSaveCreds(authDir, saveCreds, logger) {
|
|
12
|
+
credsSaveQueue = credsSaveQueue.then(() => safeSaveCreds(authDir, saveCreds, logger)).catch((err) => {
|
|
13
|
+
logger.warn({ error: String(err) }, "WhatsApp creds save queue error");
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
async function safeSaveCreds(authDir, saveCreds, logger) {
|
|
17
|
+
try {
|
|
18
|
+
const credsPath = resolveWebCredsPath(authDir);
|
|
19
|
+
const backupPath = resolveWebCredsBackupPath(authDir);
|
|
20
|
+
const raw = readCredsJsonRaw(credsPath);
|
|
21
|
+
if (raw) try {
|
|
22
|
+
JSON.parse(raw);
|
|
23
|
+
fs.copyFileSync(credsPath, backupPath);
|
|
24
|
+
try {
|
|
25
|
+
fs.chmodSync(backupPath, 384);
|
|
26
|
+
} catch {}
|
|
27
|
+
} catch {}
|
|
28
|
+
} catch {}
|
|
29
|
+
try {
|
|
30
|
+
await Promise.resolve(saveCreds());
|
|
31
|
+
try {
|
|
32
|
+
fs.chmodSync(resolveWebCredsPath(authDir), 384);
|
|
33
|
+
} catch {}
|
|
34
|
+
} catch (err) {
|
|
35
|
+
logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Create a Baileys socket backed by the multi-file auth store we keep on disk.
|
|
40
|
+
* Consumers can opt into QR printing for interactive login flows.
|
|
41
|
+
*/
|
|
42
|
+
async function createWaSocket(printQr, verbose, opts = {}) {
|
|
43
|
+
const logger = toPinoLikeLogger(getChildLogger({ module: "baileys" }, { level: verbose ? "info" : "silent" }), verbose ? "info" : "silent");
|
|
44
|
+
const authDir = resolveUserPath(opts.authDir ?? resolveDefaultWebAuthDir());
|
|
45
|
+
await ensureDir(authDir);
|
|
46
|
+
const sessionLogger = getChildLogger({ module: "web-session" });
|
|
47
|
+
maybeRestoreCredsFromBackup(authDir);
|
|
48
|
+
const { state, saveCreds } = await useMultiFileAuthState(authDir);
|
|
49
|
+
const { version } = await fetchLatestBaileysVersion();
|
|
50
|
+
const sock = makeWASocket({
|
|
51
|
+
auth: {
|
|
52
|
+
creds: state.creds,
|
|
53
|
+
keys: makeCacheableSignalKeyStore(state.keys, logger)
|
|
54
|
+
},
|
|
55
|
+
version,
|
|
56
|
+
logger,
|
|
57
|
+
printQRInTerminal: false,
|
|
58
|
+
browser: [
|
|
59
|
+
"squidclaw",
|
|
60
|
+
"cli",
|
|
61
|
+
VERSION
|
|
62
|
+
],
|
|
63
|
+
syncFullHistory: false,
|
|
64
|
+
markOnlineOnConnect: false
|
|
65
|
+
});
|
|
66
|
+
sock.ev.on("creds.update", () => enqueueSaveCreds(authDir, saveCreds, sessionLogger));
|
|
67
|
+
sock.ev.on("connection.update", (update) => {
|
|
68
|
+
try {
|
|
69
|
+
const { connection, lastDisconnect, qr } = update;
|
|
70
|
+
if (qr) {
|
|
71
|
+
opts.onQr?.(qr);
|
|
72
|
+
if (printQr) {
|
|
73
|
+
console.log("Scan this QR in WhatsApp (Linked Devices):");
|
|
74
|
+
qrcode.generate(qr, { small: true });
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
if (connection === "close") {
|
|
78
|
+
if (getStatusCode(lastDisconnect?.error) === DisconnectReason.loggedOut) console.error(danger(`WhatsApp session logged out. Run: ${formatCliCommand("squidclaw channels login")}`));
|
|
79
|
+
}
|
|
80
|
+
if (connection === "open" && verbose) console.log(success("WhatsApp Web connected."));
|
|
81
|
+
} catch (err) {
|
|
82
|
+
sessionLogger.error({ error: String(err) }, "connection.update handler error");
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
if (sock.ws && typeof sock.ws.on === "function") sock.ws.on("error", (err) => {
|
|
86
|
+
sessionLogger.error({ error: String(err) }, "WebSocket error");
|
|
87
|
+
});
|
|
88
|
+
return sock;
|
|
89
|
+
}
|
|
90
|
+
async function waitForWaConnection(sock) {
|
|
91
|
+
return new Promise((resolve, reject) => {
|
|
92
|
+
const evWithOff = sock.ev;
|
|
93
|
+
const handler = (...args) => {
|
|
94
|
+
const update = args[0] ?? {};
|
|
95
|
+
if (update.connection === "open") {
|
|
96
|
+
evWithOff.off?.("connection.update", handler);
|
|
97
|
+
resolve();
|
|
98
|
+
}
|
|
99
|
+
if (update.connection === "close") {
|
|
100
|
+
evWithOff.off?.("connection.update", handler);
|
|
101
|
+
reject(update.lastDisconnect ?? /* @__PURE__ */ new Error("Connection closed"));
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
sock.ev.on("connection.update", handler);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
function getStatusCode(err) {
|
|
108
|
+
return err?.output?.statusCode ?? err?.status;
|
|
109
|
+
}
|
|
110
|
+
function safeStringify(value, limit = 800) {
|
|
111
|
+
try {
|
|
112
|
+
const seen = /* @__PURE__ */ new WeakSet();
|
|
113
|
+
const raw = JSON.stringify(value, (_key, v) => {
|
|
114
|
+
if (typeof v === "bigint") return v.toString();
|
|
115
|
+
if (typeof v === "function") {
|
|
116
|
+
const maybeName = v.name;
|
|
117
|
+
return `[Function ${typeof maybeName === "string" && maybeName.length > 0 ? maybeName : "anonymous"}]`;
|
|
118
|
+
}
|
|
119
|
+
if (typeof v === "object" && v) {
|
|
120
|
+
if (seen.has(v)) return "[Circular]";
|
|
121
|
+
seen.add(v);
|
|
122
|
+
}
|
|
123
|
+
return v;
|
|
124
|
+
}, 2);
|
|
125
|
+
if (!raw) return String(value);
|
|
126
|
+
return raw.length > limit ? `${raw.slice(0, limit)}…` : raw;
|
|
127
|
+
} catch {
|
|
128
|
+
return String(value);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
function extractBoomDetails(err) {
|
|
132
|
+
if (!err || typeof err !== "object") return null;
|
|
133
|
+
const output = err?.output;
|
|
134
|
+
if (!output || typeof output !== "object") return null;
|
|
135
|
+
const payload = output.payload;
|
|
136
|
+
const statusCode = typeof output.statusCode === "number" ? output.statusCode : typeof payload?.statusCode === "number" ? payload.statusCode : void 0;
|
|
137
|
+
const error = typeof payload?.error === "string" ? payload.error : void 0;
|
|
138
|
+
const message = typeof payload?.message === "string" ? payload.message : void 0;
|
|
139
|
+
if (!statusCode && !error && !message) return null;
|
|
140
|
+
return {
|
|
141
|
+
statusCode,
|
|
142
|
+
error,
|
|
143
|
+
message
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function formatError(err) {
|
|
147
|
+
if (err instanceof Error) return err.message;
|
|
148
|
+
if (typeof err === "string") return err;
|
|
149
|
+
if (!err || typeof err !== "object") return String(err);
|
|
150
|
+
const boom = extractBoomDetails(err) ?? extractBoomDetails(err?.error) ?? extractBoomDetails(err?.lastDisconnect?.error);
|
|
151
|
+
const status = boom?.statusCode ?? getStatusCode(err);
|
|
152
|
+
const code = err?.code;
|
|
153
|
+
const codeText = typeof code === "string" || typeof code === "number" ? String(code) : void 0;
|
|
154
|
+
const message = [
|
|
155
|
+
boom?.message,
|
|
156
|
+
typeof err?.message === "string" ? err.message : void 0,
|
|
157
|
+
typeof err?.error?.message === "string" ? err.error?.message : void 0
|
|
158
|
+
].filter((v) => Boolean(v && v.trim().length > 0))[0];
|
|
159
|
+
const pieces = [];
|
|
160
|
+
if (typeof status === "number") pieces.push(`status=${status}`);
|
|
161
|
+
if (boom?.error) pieces.push(boom.error);
|
|
162
|
+
if (message) pieces.push(message);
|
|
163
|
+
if (codeText) pieces.push(`code=${codeText}`);
|
|
164
|
+
if (pieces.length > 0) return pieces.join(" ");
|
|
165
|
+
return safeStringify(err);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
//#endregion
|
|
169
|
+
export { waitForWaConnection as i, formatError as n, getStatusCode as r, createWaSocket as t };
|
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
import { c as resolveAgentWorkspaceDir, r as listAgentIds, s as resolveAgentSkillsFilter } from "./run-with-concurrency-vfuRiXdY.js";
|
|
2
|
+
import { c as resolveStateDir } from "./paths-8xF5kDne.js";
|
|
3
|
+
import { E as resolveUserPath, L as logVerbose, a as createSubsystemLogger, f as CONFIG_DIR } from "./logger-DDdrdbDu.js";
|
|
4
|
+
import { t as createAsyncLock } from "./json-files-DJe5SBCd.js";
|
|
5
|
+
import { o as resolvePluginSkillDirs, t as buildWorkspaceSkillCommandSpecs } from "./skills-DSbDUvmU.js";
|
|
6
|
+
import { i as listChatCommands } from "./commands-registry-D0py59pz.js";
|
|
7
|
+
import fs from "node:fs";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
import os from "node:os";
|
|
10
|
+
import { randomBytes, randomUUID } from "node:crypto";
|
|
11
|
+
import chokidar from "chokidar";
|
|
12
|
+
|
|
13
|
+
//#region src/infra/pairing-files.ts
|
|
14
|
+
function resolvePairingPaths(baseDir, subdir) {
|
|
15
|
+
const root = baseDir ?? resolveStateDir();
|
|
16
|
+
const dir = path.join(root, subdir);
|
|
17
|
+
return {
|
|
18
|
+
dir,
|
|
19
|
+
pendingPath: path.join(dir, "pending.json"),
|
|
20
|
+
pairedPath: path.join(dir, "paired.json")
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
function pruneExpiredPending(pendingById, nowMs, ttlMs) {
|
|
24
|
+
for (const [id, req] of Object.entries(pendingById)) if (nowMs - req.ts > ttlMs) delete pendingById[id];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/infra/pairing-pending.ts
|
|
29
|
+
async function rejectPendingPairingRequest(params) {
|
|
30
|
+
const state = await params.loadState();
|
|
31
|
+
const pending = state.pendingById[params.requestId];
|
|
32
|
+
if (!pending) return null;
|
|
33
|
+
delete state.pendingById[params.requestId];
|
|
34
|
+
await params.persistState(state);
|
|
35
|
+
return {
|
|
36
|
+
requestId: params.requestId,
|
|
37
|
+
[params.idKey]: params.getId(pending)
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/infra/pairing-token.ts
|
|
43
|
+
const PAIRING_TOKEN_BYTES = 32;
|
|
44
|
+
function generatePairingToken() {
|
|
45
|
+
return randomBytes(PAIRING_TOKEN_BYTES).toString("base64url");
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
//#endregion
|
|
49
|
+
//#region src/agents/skills/refresh.ts
|
|
50
|
+
const log$1 = createSubsystemLogger("gateway/skills");
|
|
51
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
52
|
+
const workspaceVersions = /* @__PURE__ */ new Map();
|
|
53
|
+
const watchers = /* @__PURE__ */ new Map();
|
|
54
|
+
let globalVersion = 0;
|
|
55
|
+
const DEFAULT_SKILLS_WATCH_IGNORED = [
|
|
56
|
+
/(^|[\\/])\.git([\\/]|$)/,
|
|
57
|
+
/(^|[\\/])node_modules([\\/]|$)/,
|
|
58
|
+
/(^|[\\/])dist([\\/]|$)/,
|
|
59
|
+
/(^|[\\/])\.venv([\\/]|$)/,
|
|
60
|
+
/(^|[\\/])venv([\\/]|$)/,
|
|
61
|
+
/(^|[\\/])__pycache__([\\/]|$)/,
|
|
62
|
+
/(^|[\\/])\.mypy_cache([\\/]|$)/,
|
|
63
|
+
/(^|[\\/])\.pytest_cache([\\/]|$)/,
|
|
64
|
+
/(^|[\\/])build([\\/]|$)/,
|
|
65
|
+
/(^|[\\/])\.cache([\\/]|$)/
|
|
66
|
+
];
|
|
67
|
+
function bumpVersion(current) {
|
|
68
|
+
const now = Date.now();
|
|
69
|
+
return now <= current ? current + 1 : now;
|
|
70
|
+
}
|
|
71
|
+
function emit(event) {
|
|
72
|
+
for (const listener of listeners) try {
|
|
73
|
+
listener(event);
|
|
74
|
+
} catch (err) {
|
|
75
|
+
log$1.warn(`skills change listener failed: ${String(err)}`);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function resolveWatchPaths(workspaceDir, config) {
|
|
79
|
+
const paths = [];
|
|
80
|
+
if (workspaceDir.trim()) {
|
|
81
|
+
paths.push(path.join(workspaceDir, "skills"));
|
|
82
|
+
paths.push(path.join(workspaceDir, ".agents", "skills"));
|
|
83
|
+
}
|
|
84
|
+
paths.push(path.join(CONFIG_DIR, "skills"));
|
|
85
|
+
paths.push(path.join(os.homedir(), ".agents", "skills"));
|
|
86
|
+
const extraDirs = (config?.skills?.load?.extraDirs ?? []).map((d) => typeof d === "string" ? d.trim() : "").filter(Boolean).map((dir) => resolveUserPath(dir));
|
|
87
|
+
paths.push(...extraDirs);
|
|
88
|
+
const pluginSkillDirs = resolvePluginSkillDirs({
|
|
89
|
+
workspaceDir,
|
|
90
|
+
config
|
|
91
|
+
});
|
|
92
|
+
paths.push(...pluginSkillDirs);
|
|
93
|
+
return paths;
|
|
94
|
+
}
|
|
95
|
+
function toWatchGlobRoot(raw) {
|
|
96
|
+
return raw.replaceAll("\\", "/").replace(/\/+$/, "");
|
|
97
|
+
}
|
|
98
|
+
function resolveWatchTargets(workspaceDir, config) {
|
|
99
|
+
const targets = /* @__PURE__ */ new Set();
|
|
100
|
+
for (const root of resolveWatchPaths(workspaceDir, config)) {
|
|
101
|
+
const globRoot = toWatchGlobRoot(root);
|
|
102
|
+
targets.add(`${globRoot}/SKILL.md`);
|
|
103
|
+
targets.add(`${globRoot}/*/SKILL.md`);
|
|
104
|
+
}
|
|
105
|
+
return Array.from(targets).toSorted();
|
|
106
|
+
}
|
|
107
|
+
function bumpSkillsSnapshotVersion(params) {
|
|
108
|
+
const reason = params?.reason ?? "manual";
|
|
109
|
+
const changedPath = params?.changedPath;
|
|
110
|
+
if (params?.workspaceDir) {
|
|
111
|
+
const next = bumpVersion(workspaceVersions.get(params.workspaceDir) ?? 0);
|
|
112
|
+
workspaceVersions.set(params.workspaceDir, next);
|
|
113
|
+
emit({
|
|
114
|
+
workspaceDir: params.workspaceDir,
|
|
115
|
+
reason,
|
|
116
|
+
changedPath
|
|
117
|
+
});
|
|
118
|
+
return next;
|
|
119
|
+
}
|
|
120
|
+
globalVersion = bumpVersion(globalVersion);
|
|
121
|
+
emit({
|
|
122
|
+
reason,
|
|
123
|
+
changedPath
|
|
124
|
+
});
|
|
125
|
+
return globalVersion;
|
|
126
|
+
}
|
|
127
|
+
function getSkillsSnapshotVersion(workspaceDir) {
|
|
128
|
+
if (!workspaceDir) return globalVersion;
|
|
129
|
+
const local = workspaceVersions.get(workspaceDir) ?? 0;
|
|
130
|
+
return Math.max(globalVersion, local);
|
|
131
|
+
}
|
|
132
|
+
function ensureSkillsWatcher(params) {
|
|
133
|
+
const workspaceDir = params.workspaceDir.trim();
|
|
134
|
+
if (!workspaceDir) return;
|
|
135
|
+
const watchEnabled = params.config?.skills?.load?.watch !== false;
|
|
136
|
+
const debounceMsRaw = params.config?.skills?.load?.watchDebounceMs;
|
|
137
|
+
const debounceMs = typeof debounceMsRaw === "number" && Number.isFinite(debounceMsRaw) ? Math.max(0, debounceMsRaw) : 250;
|
|
138
|
+
const existing = watchers.get(workspaceDir);
|
|
139
|
+
if (!watchEnabled) {
|
|
140
|
+
if (existing) {
|
|
141
|
+
watchers.delete(workspaceDir);
|
|
142
|
+
if (existing.timer) clearTimeout(existing.timer);
|
|
143
|
+
existing.watcher.close().catch(() => {});
|
|
144
|
+
}
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
const watchTargets = resolveWatchTargets(workspaceDir, params.config);
|
|
148
|
+
const pathsKey = watchTargets.join("|");
|
|
149
|
+
if (existing && existing.pathsKey === pathsKey && existing.debounceMs === debounceMs) return;
|
|
150
|
+
if (existing) {
|
|
151
|
+
watchers.delete(workspaceDir);
|
|
152
|
+
if (existing.timer) clearTimeout(existing.timer);
|
|
153
|
+
existing.watcher.close().catch(() => {});
|
|
154
|
+
}
|
|
155
|
+
const watcher = chokidar.watch(watchTargets, {
|
|
156
|
+
ignoreInitial: true,
|
|
157
|
+
awaitWriteFinish: {
|
|
158
|
+
stabilityThreshold: debounceMs,
|
|
159
|
+
pollInterval: 100
|
|
160
|
+
},
|
|
161
|
+
ignored: DEFAULT_SKILLS_WATCH_IGNORED
|
|
162
|
+
});
|
|
163
|
+
const state = {
|
|
164
|
+
watcher,
|
|
165
|
+
pathsKey,
|
|
166
|
+
debounceMs
|
|
167
|
+
};
|
|
168
|
+
const schedule = (changedPath) => {
|
|
169
|
+
state.pendingPath = changedPath ?? state.pendingPath;
|
|
170
|
+
if (state.timer) clearTimeout(state.timer);
|
|
171
|
+
state.timer = setTimeout(() => {
|
|
172
|
+
const pendingPath = state.pendingPath;
|
|
173
|
+
state.pendingPath = void 0;
|
|
174
|
+
state.timer = void 0;
|
|
175
|
+
bumpSkillsSnapshotVersion({
|
|
176
|
+
workspaceDir,
|
|
177
|
+
reason: "watch",
|
|
178
|
+
changedPath: pendingPath
|
|
179
|
+
});
|
|
180
|
+
}, debounceMs);
|
|
181
|
+
};
|
|
182
|
+
watcher.on("add", (p) => schedule(p));
|
|
183
|
+
watcher.on("change", (p) => schedule(p));
|
|
184
|
+
watcher.on("unlink", (p) => schedule(p));
|
|
185
|
+
watcher.on("error", (err) => {
|
|
186
|
+
log$1.warn(`skills watcher error (${workspaceDir}): ${String(err)}`);
|
|
187
|
+
});
|
|
188
|
+
watchers.set(workspaceDir, state);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
//#endregion
|
|
192
|
+
//#region src/infra/node-pairing.ts
|
|
193
|
+
const PENDING_TTL_MS = 300 * 1e3;
|
|
194
|
+
const withLock = createAsyncLock();
|
|
195
|
+
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region src/infra/skills-remote.ts
|
|
198
|
+
const log = createSubsystemLogger("gateway/skills-remote");
|
|
199
|
+
const remoteNodes = /* @__PURE__ */ new Map();
|
|
200
|
+
function isMacPlatform(platform, deviceFamily) {
|
|
201
|
+
const platformNorm = String(platform ?? "").trim().toLowerCase();
|
|
202
|
+
const familyNorm = String(deviceFamily ?? "").trim().toLowerCase();
|
|
203
|
+
if (platformNorm.includes("mac")) return true;
|
|
204
|
+
if (platformNorm.includes("darwin")) return true;
|
|
205
|
+
if (familyNorm === "mac") return true;
|
|
206
|
+
return false;
|
|
207
|
+
}
|
|
208
|
+
function supportsSystemRun(commands) {
|
|
209
|
+
return Array.isArray(commands) && commands.includes("system.run");
|
|
210
|
+
}
|
|
211
|
+
function getRemoteSkillEligibility() {
|
|
212
|
+
const macNodes = [...remoteNodes.values()].filter((node) => isMacPlatform(node.platform, node.deviceFamily) && supportsSystemRun(node.commands));
|
|
213
|
+
if (macNodes.length === 0) return;
|
|
214
|
+
const bins = /* @__PURE__ */ new Set();
|
|
215
|
+
for (const node of macNodes) for (const bin of node.bins) bins.add(bin);
|
|
216
|
+
const labels = macNodes.map((node) => node.displayName ?? node.nodeId).filter(Boolean);
|
|
217
|
+
return {
|
|
218
|
+
platforms: ["darwin"],
|
|
219
|
+
hasBin: (bin) => bins.has(bin),
|
|
220
|
+
hasAnyBin: (required) => required.some((bin) => bins.has(bin)),
|
|
221
|
+
note: labels.length > 0 ? `Remote macOS node available (${labels.join(", ")}). Run macOS-only skills via nodes.run on that node.` : "Remote macOS node available. Run macOS-only skills via nodes.run on that node."
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
//#endregion
|
|
226
|
+
//#region src/auto-reply/skill-commands.ts
|
|
227
|
+
function listReservedChatSlashCommandNames(extraNames = []) {
|
|
228
|
+
const reserved = /* @__PURE__ */ new Set();
|
|
229
|
+
for (const command of listChatCommands()) {
|
|
230
|
+
if (command.nativeName) reserved.add(command.nativeName.toLowerCase());
|
|
231
|
+
for (const alias of command.textAliases) {
|
|
232
|
+
const trimmed = alias.trim();
|
|
233
|
+
if (!trimmed.startsWith("/")) continue;
|
|
234
|
+
reserved.add(trimmed.slice(1).toLowerCase());
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
for (const name of extraNames) {
|
|
238
|
+
const trimmed = name.trim().toLowerCase();
|
|
239
|
+
if (trimmed) reserved.add(trimmed);
|
|
240
|
+
}
|
|
241
|
+
return reserved;
|
|
242
|
+
}
|
|
243
|
+
function listSkillCommandsForWorkspace(params) {
|
|
244
|
+
return buildWorkspaceSkillCommandSpecs(params.workspaceDir, {
|
|
245
|
+
config: params.cfg,
|
|
246
|
+
skillFilter: params.skillFilter,
|
|
247
|
+
eligibility: { remote: getRemoteSkillEligibility() },
|
|
248
|
+
reservedNames: listReservedChatSlashCommandNames()
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
function listSkillCommandsForAgents(params) {
|
|
252
|
+
const mergeSkillFilters = (existing, incoming) => {
|
|
253
|
+
if (existing === void 0 || incoming === void 0) return;
|
|
254
|
+
if (existing.length === 0) return Array.from(new Set(incoming));
|
|
255
|
+
if (incoming.length === 0) return Array.from(new Set(existing));
|
|
256
|
+
return Array.from(new Set([...existing, ...incoming]));
|
|
257
|
+
};
|
|
258
|
+
const agentIds = params.agentIds ?? listAgentIds(params.cfg);
|
|
259
|
+
const used = listReservedChatSlashCommandNames();
|
|
260
|
+
const entries = [];
|
|
261
|
+
const workspaceFilters = /* @__PURE__ */ new Map();
|
|
262
|
+
for (const agentId of agentIds) {
|
|
263
|
+
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, agentId);
|
|
264
|
+
if (!fs.existsSync(workspaceDir)) {
|
|
265
|
+
logVerbose(`Skipping agent "${agentId}": workspace does not exist: ${workspaceDir}`);
|
|
266
|
+
continue;
|
|
267
|
+
}
|
|
268
|
+
let canonicalDir;
|
|
269
|
+
try {
|
|
270
|
+
canonicalDir = fs.realpathSync(workspaceDir);
|
|
271
|
+
} catch {
|
|
272
|
+
logVerbose(`Skipping agent "${agentId}": cannot resolve workspace: ${workspaceDir}`);
|
|
273
|
+
continue;
|
|
274
|
+
}
|
|
275
|
+
const skillFilter = resolveAgentSkillsFilter(params.cfg, agentId);
|
|
276
|
+
const existing = workspaceFilters.get(canonicalDir);
|
|
277
|
+
if (existing) {
|
|
278
|
+
existing.skillFilter = mergeSkillFilters(existing.skillFilter, skillFilter);
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
workspaceFilters.set(canonicalDir, {
|
|
282
|
+
workspaceDir,
|
|
283
|
+
skillFilter
|
|
284
|
+
});
|
|
285
|
+
}
|
|
286
|
+
for (const { workspaceDir, skillFilter } of workspaceFilters.values()) {
|
|
287
|
+
const commands = buildWorkspaceSkillCommandSpecs(workspaceDir, {
|
|
288
|
+
config: params.cfg,
|
|
289
|
+
skillFilter,
|
|
290
|
+
eligibility: { remote: getRemoteSkillEligibility() },
|
|
291
|
+
reservedNames: used
|
|
292
|
+
});
|
|
293
|
+
for (const command of commands) {
|
|
294
|
+
used.add(command.name.toLowerCase());
|
|
295
|
+
entries.push(command);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
return entries;
|
|
299
|
+
}
|
|
300
|
+
function normalizeSkillCommandLookup(value) {
|
|
301
|
+
return value.trim().toLowerCase().replace(/[\s_]+/g, "-");
|
|
302
|
+
}
|
|
303
|
+
function findSkillCommand(skillCommands, rawName) {
|
|
304
|
+
const trimmed = rawName.trim();
|
|
305
|
+
if (!trimmed) return;
|
|
306
|
+
const lowered = trimmed.toLowerCase();
|
|
307
|
+
const normalized = normalizeSkillCommandLookup(trimmed);
|
|
308
|
+
return skillCommands.find((entry) => {
|
|
309
|
+
if (entry.name.toLowerCase() === lowered) return true;
|
|
310
|
+
if (entry.skillName.toLowerCase() === lowered) return true;
|
|
311
|
+
return normalizeSkillCommandLookup(entry.name) === normalized || normalizeSkillCommandLookup(entry.skillName) === normalized;
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
function resolveSkillCommandInvocation(params) {
|
|
315
|
+
const trimmed = params.commandBodyNormalized.trim();
|
|
316
|
+
if (!trimmed.startsWith("/")) return null;
|
|
317
|
+
const match = trimmed.match(/^\/([^\s]+)(?:\s+([\s\S]+))?$/);
|
|
318
|
+
if (!match) return null;
|
|
319
|
+
const commandName = match[1]?.trim().toLowerCase();
|
|
320
|
+
if (!commandName) return null;
|
|
321
|
+
if (commandName === "skill") {
|
|
322
|
+
const remainder = match[2]?.trim();
|
|
323
|
+
if (!remainder) return null;
|
|
324
|
+
const skillMatch = remainder.match(/^([^\s]+)(?:\s+([\s\S]+))?$/);
|
|
325
|
+
if (!skillMatch) return null;
|
|
326
|
+
const skillCommand = findSkillCommand(params.skillCommands, skillMatch[1] ?? "");
|
|
327
|
+
if (!skillCommand) return null;
|
|
328
|
+
return {
|
|
329
|
+
command: skillCommand,
|
|
330
|
+
args: skillMatch[2]?.trim() || void 0
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
const command = params.skillCommands.find((entry) => entry.name.toLowerCase() === commandName);
|
|
334
|
+
if (!command) return null;
|
|
335
|
+
return {
|
|
336
|
+
command,
|
|
337
|
+
args: match[2]?.trim() || void 0
|
|
338
|
+
};
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
//#endregion
|
|
342
|
+
export { getRemoteSkillEligibility as a, generatePairingToken as c, resolvePairingPaths as d, resolveSkillCommandInvocation as i, rejectPendingPairingRequest as l, listSkillCommandsForAgents as n, ensureSkillsWatcher as o, listSkillCommandsForWorkspace as r, getSkillsSnapshotVersion as s, listReservedChatSlashCommandNames as t, pruneExpiredPending as u };
|