@lawpath-tech/openclaw 2026.2.21-31 → 2026.2.21-33
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/{agents-BP8GDc9z.js → agents-B1Ai7rsS.js} +4 -4
- package/dist/{agents.config-Bz7K-hIv.js → agents.config-CxHnl-lL.js} +1 -1
- package/dist/{agents.config-BelTNn6K.js → agents.config-DX3tDviB.js} +1 -1
- package/dist/{audio-preflight-DP74Yvkp.js → audio-preflight-Dp9KYMCX.js} +4 -4
- package/dist/{auth-choice-D1nW1tnt.js → auth-choice-CW81kzG9.js} +1 -1
- package/dist/{auth-choice-CBUsciQJ.js → auth-choice-DKrgElus.js} +1 -1
- package/dist/{banner-C18cJKYR.js → banner-B3qK6V55.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +8 -8
- package/dist/bundled/session-memory/handler.js +8 -8
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DUJnpe5D.js → channel-options-CvSrxm2D.js} +1 -1
- package/dist/{channel-options-Dh4UX17R.js → channel-options-UCu5_Nv-.js} +1 -1
- package/dist/{channel-web-wLJAIBDS.js → channel-web-BUJggj7Y.js} +1 -1
- package/dist/{channels-cli-B3GeraPZ.js → channels-cli-B5TJMyaR.js} +6 -6
- package/dist/{channels-cli-7lL-U0bT.js → channels-cli-CGweC0NS.js} +6 -6
- package/dist/{chrome-BukFhWVN.js → chrome-DAmaIuXa.js} +7 -7
- package/dist/{cli-BdmFE8Ie.js → cli-B1suYn5Q.js} +3 -3
- package/dist/{cli-C9y6JSoj.js → cli-BFVjC6gz.js} +3 -3
- package/dist/{command-registry-D-PJPg1t.js → command-registry-C3Cb6_lT.js} +9 -9
- package/dist/{completion-cli-CA5pvA6W.js → completion-cli-CiR_bu8-.js} +1 -1
- package/dist/{completion-cli-zfVgI7-n.js → completion-cli-D-U8-xK-.js} +2 -2
- package/dist/{config-cli-BPrhK0hV.js → config-cli-BOhut0nG.js} +1 -1
- package/dist/{config-cli-CgMtqspq.js → config-cli-CsmTCdxD.js} +1 -1
- package/dist/{configure-yDD4TKIJ.js → configure-B7NUZjG2.js} +3 -3
- package/dist/{configure-P0T5xCKn.js → configure-BWfLMNPf.js} +3 -3
- package/dist/{deliver-BLmoUvp-.js → deliver-BP564y6d.js} +1 -1
- package/dist/{doctor-completion-wNJ24zG1.js → doctor-completion-CRCM30Gd.js} +1 -1
- package/dist/{doctor-completion-QnB3fOSm.js → doctor-completion-GAbf1D6s.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensionAPI.js +3 -3
- package/dist/{gateway-cli-jzI2iY9a.js → gateway-cli-DGPCB6rN.js} +10 -10
- package/dist/{gateway-cli-abohiHMm.js → gateway-cli-QMubBYii.js} +10 -10
- package/dist/{health-ChDsDryb.js → health-CwpYY0fN.js} +1 -1
- package/dist/{health-BJ6SHHDr.js → health-DR30gLMN.js} +1 -1
- package/dist/{hooks-cli-BmuxgZBH.js → hooks-cli-DNwlE26g.js} +4 -4
- package/dist/{hooks-cli-DuRDIltL.js → hooks-cli-DlkiBMJi.js} +4 -4
- package/dist/{image-hH4ugSJI.js → image-DL65NdIM.js} +1 -1
- package/dist/index.js +8 -8
- package/dist/llm-slug-generator.js +8 -8
- package/dist/{models-BpqbY6s6.js → models-DVkqCyTw.js} +2 -2
- package/dist/{models-cli-COanmcGm.js → models-cli-BEkmRLcC.js} +4 -4
- package/dist/{models-cli-DqWWTCao.js → models-cli-DVKgOKux.js} +5 -5
- package/dist/{onboard-wCY6TSre.js → onboard-BS7ZSQTR.js} +2 -2
- package/dist/{onboard-UEtBiCoJ.js → onboard-D9z9OO_A.js} +2 -2
- package/dist/{onboard-channels-BJ-tZka8.js → onboard-channels-CUuKFX-y.js} +1 -1
- package/dist/{onboard-channels-CPma01ab.js → onboard-channels-SRbD8DVG.js} +1 -1
- package/dist/{onboarding-Dp6k5p-a.js → onboarding-CQRQ7bCq.js} +3 -3
- package/dist/{onboarding-Di4SkJUj.js → onboarding-DVBEYCod.js} +3 -3
- package/dist/{onboarding.finalize-G-q87JA2.js → onboarding.finalize-BRewG-HX.js} +7 -7
- package/dist/{onboarding.finalize-DshqLGqp.js → onboarding.finalize-CTF-nyL8.js} +8 -8
- package/dist/{pi-embedded-C7TfFIPO.js → pi-embedded-BqyWOcTK.js} +200 -43
- package/dist/{pi-embedded-helpers-DR_3fJko.js → pi-embedded-helpers-HnqhrewN.js} +4 -4
- package/dist/{pi-embedded-BAqpVR_m.js → pi-embedded-rXq7jDOy.js} +214 -57
- package/dist/{plugin-registry-CFiYBSX2.js → plugin-registry-Bp0OjK16.js} +1 -1
- package/dist/{plugin-registry-BdQI8-bG.js → plugin-registry-Ca9kiZbZ.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-BjU_kuyW.js → agent-scope-KjIvGpFh.js} +19 -19
- package/dist/plugin-sdk/{channel-web-DtyyUoWA.js → channel-web-i7Q0e2xL.js} +1 -1
- package/dist/plugin-sdk/index.js +4 -4
- package/dist/plugin-sdk/{manager-BBcNMx7F.js → manager-DeHKg0Ym.js} +28 -28
- package/dist/plugin-sdk/memory-host-search.js +4 -4
- package/dist/plugin-sdk/{qmd-manager-B5NFEjJd.js → qmd-manager-Ci6Ood2P.js} +2 -2
- package/dist/plugin-sdk/{replies-OoosoUz9.js → replies-CvKNemz4.js} +5 -4
- package/dist/plugin-sdk/{reply-C_4ajFUt.js → reply-CrBuiTf0.js} +200 -43
- package/dist/plugin-sdk/{send-C9Q83PfF.js → send-DzgvnkSq.js} +20 -1
- package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/members.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +1 -0
- package/dist/plugin-sdk/slack/monitor/events.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/provider.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/replies.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/types.d.ts +4 -0
- package/dist/plugin-sdk/slack/threading.d.ts +9 -0
- package/dist/plugin-sdk/{sqlite-CH_AglGD.js → sqlite-CcSeRdqy.js} +15 -15
- package/dist/plugin-sdk/{web-BlY2wNrk.js → web-DXbKqGiu.js} +4 -4
- package/dist/{plugins-cli-CmrER-zr.js → plugins-cli-B54I3YDp.js} +4 -4
- package/dist/{plugins-cli-B03aSLgf.js → plugins-cli-DQqPpkDg.js} +4 -4
- package/dist/{program-Djk08-l7.js → program-CiVPUyGe.js} +9 -9
- package/dist/{program-context-DlRS1tcr.js → program-context-B8jVIvqn.js} +17 -17
- package/dist/{prompt-select-styled-CMszn2hx.js → prompt-select-styled-DP6ORKEH.js} +4 -4
- package/dist/{prompt-select-styled-JkMJPt68.js → prompt-select-styled-XJNDuVI-.js} +4 -4
- package/dist/{provider-auth-helpers-36LOZ6SL.js → provider-auth-helpers-BvdnFgmZ.js} +1 -1
- package/dist/{provider-auth-helpers-ZV7-WRyR.js → provider-auth-helpers-GlPRMdgU.js} +1 -1
- package/dist/{push-apns-Cm-ZTdUp.js → push-apns-4PMWZHdd.js} +1 -1
- package/dist/{push-apns-TUUEPpx1.js → push-apns-BLl8QvkS.js} +1 -1
- package/dist/{pw-ai-Dp9c5KD_.js → pw-ai-BLLeU82T.js} +1 -1
- package/dist/{register.agent-DsFrb0R7.js → register.agent-DMDB7XFY.js} +8 -8
- package/dist/{register.agent-7Pku8mId.js → register.agent-O8MfanIY.js} +7 -7
- package/dist/{register.configure-BMfcA9Sh.js → register.configure-BnK5Jcux.js} +8 -8
- package/dist/{register.configure-CJ6IYgGS.js → register.configure-z-iZ8GQq.js} +8 -8
- package/dist/{register.maintenance-DfoSO5fo.js → register.maintenance-BnFA8dD9.js} +9 -9
- package/dist/{register.maintenance-BFSQHBgH.js → register.maintenance-DSLAHGdZ.js} +10 -10
- package/dist/{register.message-BTCpZ8RW.js → register.message-BEBbZm3E.js} +4 -4
- package/dist/{register.message-C-5P7V4g.js → register.message-Diwl2TLo.js} +4 -4
- package/dist/{register.onboard-CVXaGmEF.js → register.onboard-Bc4G3TMS.js} +6 -6
- package/dist/{register.onboard-CTO-qkWZ.js → register.onboard-gF_aeZ9o.js} +6 -6
- package/dist/{register.setup-Dg1Ud7ox.js → register.setup-B4r3oTHQ.js} +6 -6
- package/dist/{register.setup-BzaCK19n.js → register.setup-CdWPBfRb.js} +6 -6
- package/dist/{register.status-health-sessions-IymXWaoK.js → register.status-health-sessions-gEelqg9y.js} +5 -5
- package/dist/{register.status-health-sessions-DjwY1WQe.js → register.status-health-sessions-gHKOUBxw.js} +5 -5
- package/dist/{register.subclis-Bw1N3fIn.js → register.subclis-DflQa27k.js} +9 -9
- package/dist/{replies-MVPArv-r.js → replies-9ipbTXMP.js} +5 -4
- package/dist/{replies-DtFxhHfI.js → replies-BCd0AxfK.js} +5 -4
- package/dist/{replies-DKKNtkun.js → replies-BdkHHO5V.js} +5 -4
- package/dist/{replies-DhmTgroV.js → replies-CSjH2EQ6.js} +5 -4
- package/dist/{reply-pTxrsMtG.js → reply-CM9fxt2r.js} +200 -43
- package/dist/{run-main-DnYUey0K.js → run-main-3miuYYBs.js} +16 -16
- package/dist/{runner-CLY-9j7g.js → runner-CcRtHLpd.js} +1 -1
- package/dist/{send-CTGeWUSD.js → send-B3u53ZAu.js} +20 -1
- package/dist/{send-Cr8R-bMi.js → send-CAuzoyQe.js} +20 -1
- package/dist/{send-D_FU_HIa.js → send-D6r6s6Nf.js} +20 -1
- package/dist/{send-CKGUBMnM.js → send-DUc9Jw32.js} +20 -1
- package/dist/{server-node-events-Dhbdspn_.js → server-node-events-BcfA38Ht.js} +4 -4
- package/dist/{server-node-events-DQYNf8b_.js → server-node-events-DzAfZuLY.js} +4 -4
- package/dist/{session-dirs-CFHymbM9.js → session-dirs-BdEl6HTu.js} +1 -1
- package/dist/{session-dirs-DoK1aPxY.js → session-dirs-BeIjLerM.js} +1 -1
- package/dist/{status-D32_SxwC.js → status-B0MQkmRx.js} +2 -2
- package/dist/{status-CFnZ8E56.js → status-CgApQy5C.js} +1 -1
- package/dist/{status-C-PQHlxh.js → status-DpOLEQn-.js} +1 -1
- package/dist/{status-KRRAxPjg.js → status-dZ2UgRzN.js} +2 -2
- package/dist/{subagent-registry-DkjybHrK.js → subagent-registry-CEyaZMV5.js} +200 -43
- package/dist/{update-cli-DXd4fNuS.js → update-cli-COdYp-Y5.js} +10 -10
- package/dist/{update-cli-DMrRvy-m.js → update-cli-Y2wT8mXS.js} +9 -9
- package/dist/{web-Dsgry4ji.js → web-CQ4AF_Y7.js} +3 -3
- package/dist/{web-CCqlC0N_.js → web-Cp6O0VTJ.js} +4 -4
- package/dist/{web-IfDcZx01.js → web-D8FEwRAX.js} +3 -3
- package/dist/{web-DCNwbuhj.js → web-c0XVFCZq.js} +8 -8
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { gt as loadOpenClawPlugins } from "./reply-
|
|
2
|
+
import { gt as loadOpenClawPlugins } from "./reply-CM9fxt2r.js";
|
|
3
3
|
import { d as getActivePluginRegistry } from "./registry-lBbEkQ26.js";
|
|
4
4
|
import { t as createSubsystemLogger } from "./subsystem-Cu1fn6xi.js";
|
|
5
5
|
import { c as resolveAgentWorkspaceDir, l as resolveDefaultAgentId } from "./agent-scope-BGlpyppa.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import chalk, { Chalk } from "chalk";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import fsSync from "node:fs";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import { Logger } from "tslog";
|
|
6
6
|
import json5 from "json5";
|
|
7
7
|
import { promisify } from "node:util";
|
|
8
|
-
import fs
|
|
8
|
+
import fs from "node:fs/promises";
|
|
9
9
|
import { execFile, spawn } from "node:child_process";
|
|
10
10
|
import { fileURLToPath } from "node:url";
|
|
11
11
|
|
|
@@ -100,10 +100,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
|
100
100
|
if (override) return resolveUserPath$1(override, env, effectiveHomedir);
|
|
101
101
|
const newDir = newStateDir(effectiveHomedir);
|
|
102
102
|
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
103
|
-
if (
|
|
103
|
+
if (fsSync.existsSync(newDir)) return newDir;
|
|
104
104
|
const existingLegacy = legacyDirs.find((dir) => {
|
|
105
105
|
try {
|
|
106
|
-
return
|
|
106
|
+
return fsSync.existsSync(dir);
|
|
107
107
|
} catch {
|
|
108
108
|
return false;
|
|
109
109
|
}
|
|
@@ -142,7 +142,7 @@ function resolveCanonicalConfigPath(env = process.env, stateDir = resolveStateDi
|
|
|
142
142
|
function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)) {
|
|
143
143
|
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
144
144
|
try {
|
|
145
|
-
return
|
|
145
|
+
return fsSync.existsSync(candidate);
|
|
146
146
|
} catch {
|
|
147
147
|
return false;
|
|
148
148
|
}
|
|
@@ -159,7 +159,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
|
|
|
159
159
|
const stateOverride = env.OPENCLAW_STATE_DIR?.trim();
|
|
160
160
|
const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
|
|
161
161
|
try {
|
|
162
|
-
return
|
|
162
|
+
return fsSync.existsSync(candidate);
|
|
163
163
|
} catch {
|
|
164
164
|
return false;
|
|
165
165
|
}
|
|
@@ -217,9 +217,9 @@ function isNodeErrorWithCode(err, code) {
|
|
|
217
217
|
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
218
218
|
}
|
|
219
219
|
function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
220
|
-
const accessSync = options.accessSync ??
|
|
221
|
-
const lstatSync = options.lstatSync ??
|
|
222
|
-
const mkdirSync = options.mkdirSync ??
|
|
220
|
+
const accessSync = options.accessSync ?? fsSync.accessSync;
|
|
221
|
+
const lstatSync = options.lstatSync ?? fsSync.lstatSync;
|
|
222
|
+
const mkdirSync = options.mkdirSync ?? fsSync.mkdirSync;
|
|
223
223
|
const getuid = options.getuid ?? (() => {
|
|
224
224
|
try {
|
|
225
225
|
return typeof process.getuid === "function" ? process.getuid() : void 0;
|
|
@@ -243,14 +243,14 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
243
243
|
try {
|
|
244
244
|
const preferred = lstatSync(POSIX_OPENCLAW_TMP_DIR);
|
|
245
245
|
if (!preferred.isDirectory() || preferred.isSymbolicLink()) return fallback();
|
|
246
|
-
accessSync(POSIX_OPENCLAW_TMP_DIR,
|
|
246
|
+
accessSync(POSIX_OPENCLAW_TMP_DIR, fsSync.constants.W_OK | fsSync.constants.X_OK);
|
|
247
247
|
if (!isSecureDirForUser(preferred)) return fallback();
|
|
248
248
|
return POSIX_OPENCLAW_TMP_DIR;
|
|
249
249
|
} catch (err) {
|
|
250
250
|
if (!isNodeErrorWithCode(err, "ENOENT")) return fallback();
|
|
251
251
|
}
|
|
252
252
|
try {
|
|
253
|
-
accessSync("/tmp",
|
|
253
|
+
accessSync("/tmp", fsSync.constants.W_OK | fsSync.constants.X_OK);
|
|
254
254
|
mkdirSync(POSIX_OPENCLAW_TMP_DIR, {
|
|
255
255
|
recursive: true,
|
|
256
256
|
mode: 448
|
|
@@ -273,8 +273,8 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
273
273
|
function readLoggingConfig() {
|
|
274
274
|
const configPath = resolveConfigPath();
|
|
275
275
|
try {
|
|
276
|
-
if (!
|
|
277
|
-
const raw =
|
|
276
|
+
if (!fsSync.existsSync(configPath)) return;
|
|
277
|
+
const raw = fsSync.readFileSync(configPath, "utf-8");
|
|
278
278
|
const logging = json5.parse(raw)?.logging;
|
|
279
279
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
280
280
|
return logging;
|
|
@@ -379,7 +379,7 @@ function isFileLogLevelEnabled(level) {
|
|
|
379
379
|
return levelToMinLevel(level) <= levelToMinLevel(settings.level);
|
|
380
380
|
}
|
|
381
381
|
function buildLogger(settings) {
|
|
382
|
-
|
|
382
|
+
fsSync.mkdirSync(path.dirname(settings.file), { recursive: true });
|
|
383
383
|
if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
|
|
384
384
|
let currentFileBytes = getCurrentLogFileBytes(settings.file);
|
|
385
385
|
let warnedAboutSizeCap = false;
|
|
@@ -423,14 +423,14 @@ function resolveMaxLogFileBytes(raw) {
|
|
|
423
423
|
}
|
|
424
424
|
function getCurrentLogFileBytes(file) {
|
|
425
425
|
try {
|
|
426
|
-
return
|
|
426
|
+
return fsSync.statSync(file).size;
|
|
427
427
|
} catch {
|
|
428
428
|
return 0;
|
|
429
429
|
}
|
|
430
430
|
}
|
|
431
431
|
function appendLogLine(file, line) {
|
|
432
432
|
try {
|
|
433
|
-
|
|
433
|
+
fsSync.appendFileSync(file, line, { encoding: "utf8" });
|
|
434
434
|
return true;
|
|
435
435
|
} catch {
|
|
436
436
|
return false;
|
|
@@ -469,14 +469,14 @@ function isRollingPath(file) {
|
|
|
469
469
|
}
|
|
470
470
|
function pruneOldRollingLogs(dir) {
|
|
471
471
|
try {
|
|
472
|
-
const entries =
|
|
472
|
+
const entries = fsSync.readdirSync(dir, { withFileTypes: true });
|
|
473
473
|
const cutoff = Date.now() - MAX_LOG_AGE_MS;
|
|
474
474
|
for (const entry of entries) {
|
|
475
475
|
if (!entry.isFile()) continue;
|
|
476
476
|
if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
|
|
477
477
|
const fullPath = path.join(dir, entry.name);
|
|
478
478
|
try {
|
|
479
|
-
if (
|
|
479
|
+
if (fsSync.statSync(fullPath).mtimeMs < cutoff) fsSync.rmSync(fullPath, { force: true });
|
|
480
480
|
} catch {}
|
|
481
481
|
}
|
|
482
482
|
} catch {}
|
|
@@ -582,7 +582,7 @@ function resolveConfigDir(env = process.env, homedir = os.homedir) {
|
|
|
582
582
|
if (override) return resolveUserPath(override);
|
|
583
583
|
const newDir = path.join(resolveRequiredHomeDir(env, homedir), ".openclaw");
|
|
584
584
|
try {
|
|
585
|
-
if (
|
|
585
|
+
if (fsSync.existsSync(newDir)) return newDir;
|
|
586
586
|
} catch {}
|
|
587
587
|
return newDir;
|
|
588
588
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as buildGroupHistoryKey, n as DEFAULT_MAIN_KEY, r as buildAgentMainSessionKey, s as normalizeAgentId } from "./session-key-C_0eELjb.js";
|
|
2
2
|
import { f as readWebSelfId, o as getWebAuthAgeMs, r as resolveWhatsAppAccount } from "./accounts-CIV6d4kn.js";
|
|
3
|
-
import { E as enqueueSystemEvent, G as resolveMentionGating, W as shouldAckReactionForWhatsApp, X as buildHistoryContextFromEntries, Y as DEFAULT_GROUP_HISTORY_LIMIT, _ as resolveEnvelopeFormatOptions, c as computeBackoff, d as formatDurationPrecise, f as dispatchReplyWithBufferedBlockDispatcher, g as formatInboundEnvelope, h as resolveInboundDebounceMs, ht as createDedupeCache, l as sleepWithAbort, m as createInboundDebouncer, n as normalizeGroupActivation, nt as buildMentionRegexes, r as parseActivationCommand, rt as normalizeMentionText, t as getReplyFromConfig, tt as recordPendingHistoryEntryIfEnabled, u as buildPairingReply, v as hasControlCommand, y as shouldComputeCommandAuthorized } from "./reply-
|
|
3
|
+
import { E as enqueueSystemEvent, G as resolveMentionGating, W as shouldAckReactionForWhatsApp, X as buildHistoryContextFromEntries, Y as DEFAULT_GROUP_HISTORY_LIMIT, _ as resolveEnvelopeFormatOptions, c as computeBackoff, d as formatDurationPrecise, f as dispatchReplyWithBufferedBlockDispatcher, g as formatInboundEnvelope, h as resolveInboundDebounceMs, ht as createDedupeCache, l as sleepWithAbort, m as createInboundDebouncer, n as normalizeGroupActivation, nt as buildMentionRegexes, r as parseActivationCommand, rt as normalizeMentionText, t as getReplyFromConfig, tt as recordPendingHistoryEntryIfEnabled, u as buildPairingReply, v as hasControlCommand, y as shouldComputeCommandAuthorized } from "./reply-CrBuiTf0.js";
|
|
4
4
|
import { A as jidToE164, P as resolveJidToE164, S as clamp, V as toWhatsappJid, X as shouldLogVerbose, j as normalizeE164, k as isSelfChatMode, nt as getChildLogger, q as logVerbose, s as normalizeChatChannelId, z as sleep } from "./registry-BlMOtcPL.js";
|
|
5
5
|
import { n as loadConfig } from "./config-CpE4TWH0.js";
|
|
6
6
|
import { i as defaultRuntime, t as createSubsystemLogger } from "./subsystem-DoAZkah-.js";
|
package/dist/plugin-sdk/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-C_0eELjb.js";
|
|
2
2
|
import { _ as createAccountListHelpers, i as resolveWhatsAppAuthDir, n as resolveDefaultWhatsAppAccountId, r as resolveWhatsAppAccount, t as listWhatsAppAccountIds } from "./accounts-CIV6d4kn.js";
|
|
3
|
-
import { $ as clearHistoryEntriesIfEnabled, A as resolveDiscordUserAllowlist, B as logTypingFailure, C as stripMarkdown, Ct as unbindThreadBindingsBySessionKey, D as resolveSlackUserAllowlist, Dt as BLUEBUBBLES_ACTION_NAMES, Et as BLUEBUBBLES_ACTIONS, F as stringEnum, G as resolveMentionGating, H as removeAckReactionAfterReply, I as recordInboundSession, J as summarizeMapping, K as resolveMentionGatingWithBypass, L as resolveControlCommandGate, M as collectDiscordAuditChannelIds, N as formatDocsLink, O as resolveSlackChannelAllowlist, Ot as BLUEBUBBLES_GROUP_ACTIONS, P as optionalStringEnum, Q as clearHistoryEntries, R as logAckFailure, S as processLineMessage, St as listThreadBindingsBySessionKey, T as attachFooterText, Tt as resolveAllowlistMatchSimple, U as shouldAckReaction, V as createTypingCallbacks, W as shouldAckReactionForWhatsApp, Y as DEFAULT_GROUP_HISTORY_LIMIT, Z as buildPendingHistoryContextFromMap, _t as listDevicePairing, a as normalizeAccountId$1, at as isWSLEnv, bt as registerPluginHttpRoute, ct as DEFAULT_WEBHOOK_MAX_BODY_BYTES, dt as isRequestBodyLimitError, et as recordPendingHistoryEntry, ft as readJsonBodyWithLimit, gt as approveDevicePairing, ht as createDedupeCache, i as listLineAccountIds, it as isWSL2Sync, j as resolveDiscordChannelAllowlist, k as detectBinary, kt as CHANNEL_MESSAGE_ACTION_NAMES, lt as RequestBodyLimitError, mt as requestBodyErrorToText, o as resolveDefaultLineAccountId, ot as isWSLSync, pt as readRequestBodyWithLimit, q as mergeAllowlist, s as resolveLineAccount, st as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, tt as recordPendingHistoryEntryIfEnabled, ut as installRequestBodyLimitGuard, vt as rejectDevicePairing, w as createReceiptCard, wt as formatAllowlistMatchMeta, x as hasMarkdownToConvert, xt as autoBindSpawnedDiscordSubagent, yt as extractToolSend, z as logInboundDrop } from "./reply-
|
|
3
|
+
import { $ as clearHistoryEntriesIfEnabled, A as resolveDiscordUserAllowlist, B as logTypingFailure, C as stripMarkdown, Ct as unbindThreadBindingsBySessionKey, D as resolveSlackUserAllowlist, Dt as BLUEBUBBLES_ACTION_NAMES, Et as BLUEBUBBLES_ACTIONS, F as stringEnum, G as resolveMentionGating, H as removeAckReactionAfterReply, I as recordInboundSession, J as summarizeMapping, K as resolveMentionGatingWithBypass, L as resolveControlCommandGate, M as collectDiscordAuditChannelIds, N as formatDocsLink, O as resolveSlackChannelAllowlist, Ot as BLUEBUBBLES_GROUP_ACTIONS, P as optionalStringEnum, Q as clearHistoryEntries, R as logAckFailure, S as processLineMessage, St as listThreadBindingsBySessionKey, T as attachFooterText, Tt as resolveAllowlistMatchSimple, U as shouldAckReaction, V as createTypingCallbacks, W as shouldAckReactionForWhatsApp, Y as DEFAULT_GROUP_HISTORY_LIMIT, Z as buildPendingHistoryContextFromMap, _t as listDevicePairing, a as normalizeAccountId$1, at as isWSLEnv, bt as registerPluginHttpRoute, ct as DEFAULT_WEBHOOK_MAX_BODY_BYTES, dt as isRequestBodyLimitError, et as recordPendingHistoryEntry, ft as readJsonBodyWithLimit, gt as approveDevicePairing, ht as createDedupeCache, i as listLineAccountIds, it as isWSL2Sync, j as resolveDiscordChannelAllowlist, k as detectBinary, kt as CHANNEL_MESSAGE_ACTION_NAMES, lt as RequestBodyLimitError, mt as requestBodyErrorToText, o as resolveDefaultLineAccountId, ot as isWSLSync, pt as readRequestBodyWithLimit, q as mergeAllowlist, s as resolveLineAccount, st as DEFAULT_WEBHOOK_BODY_TIMEOUT_MS, tt as recordPendingHistoryEntryIfEnabled, ut as installRequestBodyLimitGuard, vt as rejectDevicePairing, w as createReceiptCard, wt as formatAllowlistMatchMeta, x as hasMarkdownToConvert, xt as autoBindSpawnedDiscordSubagent, yt as extractToolSend, z as logInboundDrop } from "./reply-CrBuiTf0.js";
|
|
4
4
|
import "./paths-DVWx7USN.js";
|
|
5
5
|
import "./github-copilot-token-Cg0YPPSu.js";
|
|
6
6
|
import { D as resolveSlackAccount, E as resolveDefaultSlackAccountId, F as resolveDiscordAccount, M as listDiscordAccountIds, O as resolveSlackReplyToMode, P as resolveDefaultDiscordAccountId, S as resolveTelegramAccount, T as listSlackAccountIds, _ as normalizeWhatsAppTarget, a as listDiscordDirectoryPeersFromConfig, b as listTelegramAccountIds, c as listTelegramDirectoryGroupsFromConfig, d as listWhatsAppDirectoryPeersFromConfig, f as looksLikeSlackTargetId, g as isWhatsAppGroupJid, i as listDiscordDirectoryGroupsFromConfig, l as listTelegramDirectoryPeersFromConfig, o as listSlackDirectoryGroupsFromConfig, p as normalizeSlackMessagingTarget, s as listSlackDirectoryPeersFromConfig, u as listWhatsAppDirectoryGroupsFromConfig, w as listEnabledSlackAccounts, x as resolveDefaultTelegramAccountId } from "./plugins-CCHKO6PS.js";
|
|
@@ -30,7 +30,7 @@ import "./tables-DAJbUPhT.js";
|
|
|
30
30
|
import { d as resolveServicePrefixedAllowTarget, f as resolveServicePrefixedTarget, l as parseChatAllowTargetPrefixes, m as isAllowedParsedChatSender, p as formatAllowFromLowercase, s as normalizeIMessageHandle, u as parseChatTargetPrefixesOrThrow } from "./send-CiTMY1uN.js";
|
|
31
31
|
import "./tool-images-D_St2NkT.js";
|
|
32
32
|
import { a as createActionGate, c as jsonResult, d as readReactionParams, m as readStringParam, n as missingTargetError, u as readNumberParam } from "./target-errors-CeKndUCY.js";
|
|
33
|
-
import {
|
|
33
|
+
import { c as parseSlackBlocksInput } from "./send-DzgvnkSq.js";
|
|
34
34
|
import { it as writeJsonFileAtomically, nt as toLocationContext, rt as readJsonFileWithFallback, tt as formatLocationText } from "./send-C40m59QO.js";
|
|
35
35
|
import { b as withTempDownloadPath, y as buildRandomTempFilePath } from "./runner-BkVA5r9t.js";
|
|
36
36
|
import { a as resolveAckReaction, n as createReplyPrefixOptions, t as createReplyPrefixContext } from "./reply-prefix-G9ruZ2EI.js";
|
|
@@ -47,7 +47,7 @@ import "./paths-BNQjLbn7.js";
|
|
|
47
47
|
import { h as onDiagnosticEvent, m as isDiagnosticsEnabled, p as emitDiagnosticEvent } from "./diagnostic-AkXUmNj3.js";
|
|
48
48
|
import { n as extractOriginalFilename } from "./store-DDOdV26p.js";
|
|
49
49
|
import { t as resolveWhatsAppOutboundTarget } from "./resolve-outbound-target-D9fgJ-GG.js";
|
|
50
|
-
import { r as resolveWhatsAppHeartbeatRecipients } from "./channel-web-
|
|
50
|
+
import { r as resolveWhatsAppHeartbeatRecipients } from "./channel-web-i7Q0e2xL.js";
|
|
51
51
|
import "./image-D-2tr3lg.js";
|
|
52
52
|
import "./pi-model-discovery-LbcEa65a.js";
|
|
53
53
|
import "./api-key-rotation-nmjAMTZA.js";
|
|
@@ -58,7 +58,7 @@ import "./commands-registry-BgL5BgCb.js";
|
|
|
58
58
|
import "./send-b1mZbvoC.js";
|
|
59
59
|
import "./proxy-MquBDehr.js";
|
|
60
60
|
import "./resolve-route-yBLQIeuf.js";
|
|
61
|
-
import "./replies-
|
|
61
|
+
import "./replies-CvKNemz4.js";
|
|
62
62
|
import "./outbound-attachment-1oBost2D.js";
|
|
63
63
|
import "./outbound-ChKX7wv_.js";
|
|
64
64
|
import "./session-DBbj6znF.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { c as clampInt, d as sleep, f as truncateUtf16Safe, i as DEFAULT_AGENT_ID, l as clampNumber$1, m as resolveStateDir, n as resolveAgentDir, p as resolveOAuthPath, r as resolveAgentWorkspaceDir, s as createSubsystemLogger, t as resolveAgentConfig, u as resolveUserPath } from "./agent-scope-
|
|
2
|
-
import { _ as isFileMissingError, a as resolveSessionTranscriptsDirForAgent, c as cosineSimilarity, d as isMemoryPath, f as listMemoryFiles, g as runWithConcurrency, h as remapChunkLines, i as sessionPathForFile, l as ensureDir, m as parseEmbedding, n as buildSessionEntry, o as buildFileEntry, p as normalizeExtraMemoryPaths, r as listSessionFilesForAgent, s as chunkMarkdown, t as requireNodeSqlite, u as hashText, v as statRegularFile, y as redactSensitiveText } from "./sqlite-
|
|
1
|
+
import { c as clampInt, d as sleep, f as truncateUtf16Safe, i as DEFAULT_AGENT_ID, l as clampNumber$1, m as resolveStateDir, n as resolveAgentDir, p as resolveOAuthPath, r as resolveAgentWorkspaceDir, s as createSubsystemLogger, t as resolveAgentConfig, u as resolveUserPath } from "./agent-scope-KjIvGpFh.js";
|
|
2
|
+
import { _ as isFileMissingError, a as resolveSessionTranscriptsDirForAgent, c as cosineSimilarity, d as isMemoryPath, f as listMemoryFiles, g as runWithConcurrency, h as remapChunkLines, i as sessionPathForFile, l as ensureDir, m as parseEmbedding, n as buildSessionEntry, o as buildFileEntry, p as normalizeExtraMemoryPaths, r as listSessionFilesForAgent, s as chunkMarkdown, t as requireNodeSqlite, u as hashText, v as statRegularFile, y as redactSensitiveText } from "./sqlite-CcSeRdqy.js";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fsSync from "node:fs";
|
|
5
5
|
import os from "node:os";
|
|
6
|
-
import fs
|
|
6
|
+
import fs from "node:fs/promises";
|
|
7
7
|
import { randomUUID } from "node:crypto";
|
|
8
8
|
import { getOAuthApiKey, getOAuthProviders } from "@mariozechner/pi-ai/oauth";
|
|
9
9
|
import "@aws-sdk/client-bedrock";
|
|
@@ -209,8 +209,8 @@ function formatErrorMessage(err) {
|
|
|
209
209
|
//#region src/infra/json-file.ts
|
|
210
210
|
function loadJsonFile(pathname) {
|
|
211
211
|
try {
|
|
212
|
-
if (!
|
|
213
|
-
const raw =
|
|
212
|
+
if (!fsSync.existsSync(pathname)) return;
|
|
213
|
+
const raw = fsSync.readFileSync(pathname, "utf8");
|
|
214
214
|
return JSON.parse(raw);
|
|
215
215
|
} catch {
|
|
216
216
|
return;
|
|
@@ -218,12 +218,12 @@ function loadJsonFile(pathname) {
|
|
|
218
218
|
}
|
|
219
219
|
function saveJsonFile(pathname, data) {
|
|
220
220
|
const dir = path.dirname(pathname);
|
|
221
|
-
if (!
|
|
221
|
+
if (!fsSync.existsSync(dir)) fsSync.mkdirSync(dir, {
|
|
222
222
|
recursive: true,
|
|
223
223
|
mode: 448
|
|
224
224
|
});
|
|
225
|
-
|
|
226
|
-
|
|
225
|
+
fsSync.writeFileSync(pathname, `${JSON.stringify(data, null, 2)}\n`, "utf8");
|
|
226
|
+
fsSync.chmodSync(pathname, 384);
|
|
227
227
|
}
|
|
228
228
|
|
|
229
229
|
//#endregion
|
|
@@ -349,7 +349,7 @@ function computeDelayMs(retries, attempt) {
|
|
|
349
349
|
}
|
|
350
350
|
async function readLockPayload(lockPath) {
|
|
351
351
|
try {
|
|
352
|
-
const raw = await fs
|
|
352
|
+
const raw = await fs.readFile(lockPath, "utf8");
|
|
353
353
|
const parsed = JSON.parse(raw);
|
|
354
354
|
if (typeof parsed.pid !== "number" || typeof parsed.createdAt !== "string") return null;
|
|
355
355
|
return {
|
|
@@ -363,9 +363,9 @@ async function readLockPayload(lockPath) {
|
|
|
363
363
|
async function resolveNormalizedFilePath(filePath) {
|
|
364
364
|
const resolved = path.resolve(filePath);
|
|
365
365
|
const dir = path.dirname(resolved);
|
|
366
|
-
await fs
|
|
366
|
+
await fs.mkdir(dir, { recursive: true });
|
|
367
367
|
try {
|
|
368
|
-
const realDir = await fs
|
|
368
|
+
const realDir = await fs.realpath(dir);
|
|
369
369
|
return path.join(realDir, path.basename(resolved));
|
|
370
370
|
} catch {
|
|
371
371
|
return resolved;
|
|
@@ -379,7 +379,7 @@ async function isStaleLock(lockPath, staleMs) {
|
|
|
379
379
|
if (!Number.isFinite(createdAt) || Date.now() - createdAt > staleMs) return true;
|
|
380
380
|
}
|
|
381
381
|
try {
|
|
382
|
-
const stat = await fs
|
|
382
|
+
const stat = await fs.stat(lockPath);
|
|
383
383
|
return Date.now() - stat.mtimeMs > staleMs;
|
|
384
384
|
} catch {
|
|
385
385
|
return true;
|
|
@@ -392,7 +392,7 @@ async function releaseHeldLock(normalizedFile) {
|
|
|
392
392
|
if (current.count > 0) return;
|
|
393
393
|
HELD_LOCKS.delete(normalizedFile);
|
|
394
394
|
await current.handle.close().catch(() => void 0);
|
|
395
|
-
await fs
|
|
395
|
+
await fs.rm(current.lockPath, { force: true }).catch(() => void 0);
|
|
396
396
|
}
|
|
397
397
|
async function acquireFileLock(filePath, options) {
|
|
398
398
|
const normalizedFile = await resolveNormalizedFilePath(filePath);
|
|
@@ -407,7 +407,7 @@ async function acquireFileLock(filePath, options) {
|
|
|
407
407
|
}
|
|
408
408
|
const attempts = Math.max(1, options.retries.retries + 1);
|
|
409
409
|
for (let attempt = 0; attempt < attempts; attempt += 1) try {
|
|
410
|
-
const handle = await fs
|
|
410
|
+
const handle = await fs.open(lockPath, "wx");
|
|
411
411
|
await handle.writeFile(JSON.stringify({
|
|
412
412
|
pid: process.pid,
|
|
413
413
|
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -424,7 +424,7 @@ async function acquireFileLock(filePath, options) {
|
|
|
424
424
|
} catch (err) {
|
|
425
425
|
if (err.code !== "EEXIST") throw err;
|
|
426
426
|
if (await isStaleLock(lockPath, options.stale)) {
|
|
427
|
-
await fs
|
|
427
|
+
await fs.rm(lockPath, { force: true }).catch(() => void 0);
|
|
428
428
|
continue;
|
|
429
429
|
}
|
|
430
430
|
if (attempt >= attempts - 1) break;
|
|
@@ -586,7 +586,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
586
586
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
587
587
|
}
|
|
588
588
|
function ensureAuthStoreFile(pathname) {
|
|
589
|
-
if (
|
|
589
|
+
if (fsSync.existsSync(pathname)) return;
|
|
590
590
|
saveJsonFile(pathname, {
|
|
591
591
|
version: AUTH_STORE_VERSION,
|
|
592
592
|
profiles: {}
|
|
@@ -742,7 +742,7 @@ function loadAuthProfileStoreForAgent(agentDir, _options) {
|
|
|
742
742
|
if (shouldWrite && legacy !== null) {
|
|
743
743
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
744
744
|
try {
|
|
745
|
-
|
|
745
|
+
fsSync.unlinkSync(legacyPath);
|
|
746
746
|
} catch (err) {
|
|
747
747
|
if (err?.code !== "ENOENT") log$6.warn("failed to delete legacy auth.json after migration", {
|
|
748
748
|
err,
|
|
@@ -2070,7 +2070,7 @@ function canAutoSelectLocal(options) {
|
|
|
2070
2070
|
if (/^(hf:|https?:)/i.test(modelPath)) return false;
|
|
2071
2071
|
const resolved = resolveUserPath(modelPath);
|
|
2072
2072
|
try {
|
|
2073
|
-
return
|
|
2073
|
+
return fsSync.statSync(resolved).isFile();
|
|
2074
2074
|
} catch {
|
|
2075
2075
|
return false;
|
|
2076
2076
|
}
|
|
@@ -2378,7 +2378,7 @@ async function extractTimestamp(params) {
|
|
|
2378
2378
|
if (!params.workspaceDir) return null;
|
|
2379
2379
|
const absolutePath = path.isAbsolute(params.filePath) ? params.filePath : path.resolve(params.workspaceDir, params.filePath);
|
|
2380
2380
|
try {
|
|
2381
|
-
const stat = await fs
|
|
2381
|
+
const stat = await fs.stat(absolutePath);
|
|
2382
2382
|
if (!Number.isFinite(stat.mtimeMs)) return null;
|
|
2383
2383
|
return new Date(stat.mtimeMs);
|
|
2384
2384
|
} catch {
|
|
@@ -3547,7 +3547,7 @@ var MemoryManagerSyncOps = class {
|
|
|
3547
3547
|
const source = `${sourceBase}${suffix}`;
|
|
3548
3548
|
const target = `${targetBase}${suffix}`;
|
|
3549
3549
|
try {
|
|
3550
|
-
await fs
|
|
3550
|
+
await fs.rename(source, target);
|
|
3551
3551
|
} catch (err) {
|
|
3552
3552
|
if (err.code !== "ENOENT") throw err;
|
|
3553
3553
|
}
|
|
@@ -3558,7 +3558,7 @@ var MemoryManagerSyncOps = class {
|
|
|
3558
3558
|
"",
|
|
3559
3559
|
"-wal",
|
|
3560
3560
|
"-shm"
|
|
3561
|
-
].map((suffix) => fs
|
|
3561
|
+
].map((suffix) => fs.rm(`${basePath}${suffix}`, { force: true })));
|
|
3562
3562
|
}
|
|
3563
3563
|
ensureSchema() {
|
|
3564
3564
|
const result = ensureMemoryIndexSchema({
|
|
@@ -3582,7 +3582,7 @@ var MemoryManagerSyncOps = class {
|
|
|
3582
3582
|
]);
|
|
3583
3583
|
const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
|
|
3584
3584
|
for (const entry of additionalPaths) try {
|
|
3585
|
-
const stat =
|
|
3585
|
+
const stat = fsSync.lstatSync(entry);
|
|
3586
3586
|
if (stat.isSymbolicLink()) continue;
|
|
3587
3587
|
if (stat.isDirectory()) {
|
|
3588
3588
|
watchPaths.add(path.join(entry, "**", "*.md"));
|
|
@@ -3653,7 +3653,7 @@ var MemoryManagerSyncOps = class {
|
|
|
3653
3653
|
if (!thresholds) return null;
|
|
3654
3654
|
let stat;
|
|
3655
3655
|
try {
|
|
3656
|
-
stat = await fs
|
|
3656
|
+
stat = await fs.stat(sessionFile);
|
|
3657
3657
|
} catch {
|
|
3658
3658
|
return null;
|
|
3659
3659
|
}
|
|
@@ -3695,7 +3695,7 @@ var MemoryManagerSyncOps = class {
|
|
|
3695
3695
|
if (end <= start) return 0;
|
|
3696
3696
|
let handle;
|
|
3697
3697
|
try {
|
|
3698
|
-
handle = await fs
|
|
3698
|
+
handle = await fs.open(absPath, "r");
|
|
3699
3699
|
} catch (err) {
|
|
3700
3700
|
if (isFileMissingError(err)) return 0;
|
|
3701
3701
|
throw err;
|
|
@@ -4611,7 +4611,7 @@ var MemoryManagerEmbeddingOps = class extends MemoryManagerSyncOps {
|
|
|
4611
4611
|
});
|
|
4612
4612
|
return;
|
|
4613
4613
|
}
|
|
4614
|
-
const content = options.content ?? await fs
|
|
4614
|
+
const content = options.content ?? await fs.readFile(entry.absPath, "utf-8");
|
|
4615
4615
|
const chunks = enforceEmbeddingMaxInputTokens(this.provider, chunkMarkdown(content, this.settings.chunking).filter((chunk) => chunk.text.trim().length > 0));
|
|
4616
4616
|
if (options.source === "sessions" && "lineMap" in entry) remapChunkLines(chunks, entry.lineMap);
|
|
4617
4617
|
const embeddings = this.batch.enabled ? await this.embedChunksWithBatch(chunks, entry, options.source) : await this.embedChunksInBatches(chunks);
|
|
@@ -5192,7 +5192,7 @@ var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbedding
|
|
|
5192
5192
|
if (!allowedWorkspace && this.settings.extraPaths.length > 0) {
|
|
5193
5193
|
const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
|
|
5194
5194
|
for (const additionalPath of additionalPaths) try {
|
|
5195
|
-
const stat = await fs
|
|
5195
|
+
const stat = await fs.lstat(additionalPath);
|
|
5196
5196
|
if (stat.isSymbolicLink()) continue;
|
|
5197
5197
|
if (stat.isDirectory()) {
|
|
5198
5198
|
if (absPath === additionalPath || absPath.startsWith(`${additionalPath}${path.sep}`)) {
|
|
@@ -5217,7 +5217,7 @@ var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbedding
|
|
|
5217
5217
|
};
|
|
5218
5218
|
let content;
|
|
5219
5219
|
try {
|
|
5220
|
-
content = await fs
|
|
5220
|
+
content = await fs.readFile(absPath, "utf-8");
|
|
5221
5221
|
} catch (err) {
|
|
5222
5222
|
if (isFileMissingError(err)) return {
|
|
5223
5223
|
text: "",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as resolveAgentWorkspaceDir, s as createSubsystemLogger, u as resolveUserPath } from "./agent-scope-
|
|
1
|
+
import { r as resolveAgentWorkspaceDir, s as createSubsystemLogger, u as resolveUserPath } from "./agent-scope-KjIvGpFh.js";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
|
|
4
4
|
//#region src/cli/parse-duration.ts
|
|
@@ -283,7 +283,7 @@ async function getMemorySearchManager(params) {
|
|
|
283
283
|
if (cached) return { manager: cached };
|
|
284
284
|
}
|
|
285
285
|
try {
|
|
286
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
286
|
+
const { QmdMemoryManager } = await import("./qmd-manager-Ci6Ood2P.js");
|
|
287
287
|
const primary = await QmdMemoryManager.create({
|
|
288
288
|
cfg: params.cfg,
|
|
289
289
|
agentId: params.agentId,
|
|
@@ -295,7 +295,7 @@ async function getMemorySearchManager(params) {
|
|
|
295
295
|
const wrapper = new FallbackMemoryManager({
|
|
296
296
|
primary,
|
|
297
297
|
fallbackFactory: async () => {
|
|
298
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
298
|
+
const { MemoryIndexManager } = await import("./manager-DeHKg0Ym.js");
|
|
299
299
|
return await MemoryIndexManager.get(params);
|
|
300
300
|
}
|
|
301
301
|
}, () => QMD_MANAGER_CACHE.delete(cacheKey));
|
|
@@ -308,7 +308,7 @@ async function getMemorySearchManager(params) {
|
|
|
308
308
|
}
|
|
309
309
|
}
|
|
310
310
|
try {
|
|
311
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
311
|
+
const { MemoryIndexManager } = await import("./manager-DeHKg0Ym.js");
|
|
312
312
|
return { manager: await MemoryIndexManager.get(params) };
|
|
313
313
|
} catch (err) {
|
|
314
314
|
return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { m as resolveStateDir, o as parseAgentSessionKey, r as resolveAgentWorkspaceDir, s as createSubsystemLogger } from "./agent-scope-
|
|
2
|
-
import { _ as isFileMissingError, n as buildSessionEntry, r as listSessionFilesForAgent, t as requireNodeSqlite, v as statRegularFile } from "./sqlite-
|
|
1
|
+
import { m as resolveStateDir, o as parseAgentSessionKey, r as resolveAgentWorkspaceDir, s as createSubsystemLogger } from "./agent-scope-KjIvGpFh.js";
|
|
2
|
+
import { _ as isFileMissingError, n as buildSessionEntry, r as listSessionFilesForAgent, t as requireNodeSqlite, v as statRegularFile } from "./sqlite-CcSeRdqy.js";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
import os from "node:os";
|
|
5
5
|
import fs from "node:fs/promises";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { i as chunkMarkdownTextWithMode } from "./chunk-D4rztYS_.js";
|
|
3
|
-
import {
|
|
3
|
+
import { i as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-DzgvnkSq.js";
|
|
4
4
|
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-Dag82kdi.js";
|
|
5
5
|
|
|
6
6
|
//#region src/auto-reply/reply/reply-reference.ts
|
|
@@ -43,7 +43,7 @@ var replies_exports = /* @__PURE__ */ __exportAll({
|
|
|
43
43
|
});
|
|
44
44
|
async function deliverReplies(params) {
|
|
45
45
|
for (const payload of params.replies) {
|
|
46
|
-
const threadTs = payload.replyToId ?? params.replyThreadTs;
|
|
46
|
+
const threadTs = (params.replyToMode === "off" ? void 0 : payload.replyToId) ?? params.replyThreadTs;
|
|
47
47
|
const mediaList = payload.mediaUrls ?? (payload.mediaUrl ? [payload.mediaUrl] : []);
|
|
48
48
|
const text = payload.text ?? "";
|
|
49
49
|
if (!text && mediaList.length === 0) continue;
|
|
@@ -87,7 +87,7 @@ function resolveSlackThreadTs(params) {
|
|
|
87
87
|
}
|
|
88
88
|
function createSlackReplyReferencePlanner(params) {
|
|
89
89
|
return createReplyReferencePlanner({
|
|
90
|
-
replyToMode: params.
|
|
90
|
+
replyToMode: params.isThreadReply ? "all" : params.replyToMode,
|
|
91
91
|
existingId: params.incomingThreadTs,
|
|
92
92
|
startId: params.messageTs,
|
|
93
93
|
hasReplied: params.hasReplied
|
|
@@ -98,7 +98,8 @@ function createSlackReplyDeliveryPlan(params) {
|
|
|
98
98
|
replyToMode: params.replyToMode,
|
|
99
99
|
incomingThreadTs: params.incomingThreadTs,
|
|
100
100
|
messageTs: params.messageTs,
|
|
101
|
-
hasReplied: params.hasRepliedRef.value
|
|
101
|
+
hasReplied: params.hasRepliedRef.value,
|
|
102
|
+
isThreadReply: params.isThreadReply
|
|
102
103
|
});
|
|
103
104
|
return {
|
|
104
105
|
nextThreadTs: () => replyReference.use(),
|