@lawpath-tech/openclaw 2026.2.21-27 → 2026.2.21-29
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-DQo5uGA3.js → accounts-C8m4ADkw.js} +14 -14
- package/dist/{accounts-CJEDkyd7.js → accounts-CQT5u65w.js} +1 -1
- package/dist/{accounts-CaJg9v7D.js → accounts-DFrH9IVU.js} +1 -1
- package/dist/{active-listener-Bhmh-BBe.js → active-listener-BKTctYlH.js} +1 -1
- package/dist/{agent-scope-DiO1KimT.js → agent-scope-DSUeV7-g.js} +3 -3
- package/dist/{audio-preflight-PCEdzoV0.js → audio-preflight-CLqoZYgI.js} +29 -29
- package/dist/{bindings-CEJk9Gww.js → bindings-BKEEBdsb.js} +2 -2
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +53 -53
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +53 -53
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-pOw1s-fe.js → channel-activity-BgsTqLau.js} +1 -1
- package/dist/{chrome-DcmLXeT1.js → chrome-Bqbv_ZSj.js} +20 -20
- package/dist/{chunk-BkGjWi6P.js → chunk-fZrBDWYg.js} +1 -1
- package/dist/{command-format-CM0AxuCk.js → command-format-BOHIfoCX.js} +1 -1
- package/dist/{commands-registry-C0QzohKU.js → commands-registry-BzlB3qtZ.js} +4 -4
- package/dist/{config-7ClJ9IDt.js → config-Du_-inxH.js} +12 -12
- package/dist/{deliver-RhV3c93M.js → deliver-CKH_FhS0.js} +20 -20
- package/dist/{diagnostic-DTfVTKJM.js → diagnostic-DriDPU6M.js} +1 -1
- package/dist/{frontmatter-Dab6NVCF.js → frontmatter-CdkBcBAo.js} +2 -2
- package/dist/{gemini-auth-CnEqRhSo.js → gemini-auth-A2JaRMHH.js} +1 -1
- package/dist/{github-copilot-token-DAycnoAs.js → github-copilot-token-Dgb9dAHW.js} +7 -7
- package/dist/{image-COCyG_gz.js → image-CxPjVob-.js} +4 -4
- package/dist/{image-ops-D-bh1BTN.js → image-ops-BGmpOcey.js} +1 -1
- package/dist/{ir-j1Xb0PNv.js → ir-DJPm0a4k.js} +4 -4
- package/dist/llm-slug-generator.js +53 -53
- package/dist/{local-roots-Dx32AY60.js → local-roots-JqlMsAYY.js} +5 -5
- package/dist/{login-CLQskGt7.js → login-DXtAIVXy.js} +7 -7
- package/dist/{login-qr-CxZVehrh.js → login-qr-D0A3WDBN.js} +12 -12
- package/dist/{manager-C6KdjXEH.js → manager-D7SRrHxT.js} +13 -13
- package/dist/{manifest-registry-D31TP66o.js → manifest-registry-Dhk4A5vb.js} +19 -19
- package/dist/{markdown-tables-BOmw5zkp.js → markdown-tables-DpVJE0eA.js} +1 -1
- package/dist/{message-channel-BckS8bQ9.js → message-channel-CHYSjmbr.js} +1 -1
- package/dist/{model-auth-C-Vzzybi.js → model-auth-vtNH8C4P.js} +9 -9
- package/dist/{outbound-Bk0PGZ1q.js → outbound-BWgFha97.js} +7 -7
- package/dist/{outbound-attachment-CHLSsIj_.js → outbound-attachment-B8WHzsCX.js} +2 -2
- package/dist/{paths-Cv2Q0cX2.js → paths-BEAbheM8.js} +1 -1
- package/dist/{paths-CkkDESQ2.js → paths-CyR9Pa1R.js} +5 -5
- package/dist/{pi-auth-json-DzcwV2uo.js → pi-auth-json-BiwfFswL.js} +8 -8
- package/dist/{pi-embedded-13CLN75T.js → pi-embedded-Dz24QZz9.js} +162 -162
- package/dist/{pi-embedded-helpers-HpusHn6J.js → pi-embedded-helpers-CSE0v99A.js} +52 -52
- package/dist/{plugins-Bf_qBfZ7.js → plugins-DIrNa311.js} +9 -9
- package/dist/{pw-ai-B4NkhpRH.js → pw-ai-D-_aGzdQ.js} +11 -11
- package/dist/{qmd-manager-DVrv2Huu.js → qmd-manager-DePh-PT0.js} +7 -7
- package/dist/{registry-wimgwqAA.js → registry-DpeZG5fo.js} +18 -18
- package/dist/{replies-DuQ9MtQM.js → replies-CSVWkVda.js} +3 -3
- package/dist/{reply-prefix-B_1VtLm5.js → reply-prefix-DZrS3Kf7.js} +1 -1
- package/dist/{resolve-route-CSE9DZsB.js → resolve-route-1ar2IrQt.js} +4 -4
- package/dist/{retry-DwLEH9x4.js → retry-Bdu4_ZcT.js} +1 -1
- package/dist/{runner-BjLlUYe1.js → runner-D1eXJZ8T.js} +9 -9
- package/dist/{send-DrfA4RxA.js → send-BEFzSOoD.js} +10 -10
- package/dist/{send-CEP4RX_l.js → send-BeWYOs1x.js} +7 -7
- package/dist/{send-CMeyW_Bu.js → send-Byt_wJDK.js} +6 -6
- package/dist/{send-CdIaqNP6.js → send-CWtaJF1G.js} +18 -18
- package/dist/{send-BCt1G0xY.js → send-DPVf5tQ4.js} +6 -6
- package/dist/{session-CQ9JJgSo.js → session-Bnp7PC7f.js} +8 -8
- package/dist/{skill-commands-CwFNOYqC.js → skill-commands-CqyVDpti.js} +9 -9
- package/dist/{skills-C8xf0p1B.js → skills-DSZuhFx9.js} +21 -21
- package/dist/{sqlite-B6SD9PTM.js → sqlite-C3XxSzBN.js} +4 -4
- package/dist/{store-VFVAfYgh.js → store-BrNiRjgB.js} +2 -2
- package/dist/{subsystem-BEdh_1O5.js → subsystem-BF9jT_Nw.js} +1 -1
- package/dist/{tables-QNO5uMcm.js → tables-C3clT_iA.js} +1 -1
- package/dist/{target-errors-DD2466Y6.js → target-errors-ChHV8dPI.js} +2 -2
- package/dist/{thinking-BZFf1juV.js → thinking-Dg8vKjw_.js} +5 -5
- package/dist/{tokens-GCiqN5mi.js → tokens-B-c56SkM.js} +1 -1
- package/dist/{tool-images-D0sBSASn.js → tool-images-C1rdDr34.js} +2 -2
- package/dist/{tool-loop-detection-BPAeTbUj.js → tool-loop-detection-Bu3OGskw.js} +3 -3
- package/dist/{web-5rulK8WV.js → web-Y49Dumye.js} +57 -57
- package/dist/{whatsapp-actions-kX73ghOz.js → whatsapp-actions-DFZYzkBp.js} +23 -23
- package/dist/{workspace-CH9k4Qgz.js → workspace-DYx5Dxtw.js} +6 -6
- package/extensions/voice-call/src/providers/realtime-session.ts +46 -107
- package/package.json +1 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { i as resolveGatewayPort, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { i as resolveGatewayPort, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CyR9Pa1R.js";
|
|
2
2
|
import { c as normalizeMainKey, l as resolveAgentIdFromSessionKey, m as normalizeOptionalAccountId, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
|
|
3
|
-
import { I as resolveUserPath, M as normalizeE164, U as truncateUtf16Safe, dt as resolvePreferredOpenClawTmpDir, t as CHANNEL_IDS } from "./registry-
|
|
4
|
-
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-
|
|
5
|
-
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-
|
|
6
|
-
import { _ as runExec, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-
|
|
7
|
-
import { r as normalizeChannelId } from "./plugins-
|
|
3
|
+
import { I as resolveUserPath, M as normalizeE164, U as truncateUtf16Safe, dt as resolvePreferredOpenClawTmpDir, t as CHANNEL_IDS } from "./registry-DpeZG5fo.js";
|
|
4
|
+
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-DSUeV7-g.js";
|
|
5
|
+
import { r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BF9jT_Nw.js";
|
|
6
|
+
import { _ as runExec, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME } from "./workspace-DYx5Dxtw.js";
|
|
7
|
+
import { r as normalizeChannelId } from "./plugins-DIrNa311.js";
|
|
8
8
|
import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
|
|
9
9
|
import { t as parseBooleanValue } from "./boolean-B8-BqKGQ.js";
|
|
10
|
-
import { t as formatCliCommand } from "./command-format-
|
|
11
|
-
import { c as SafeOpenError, i as getImageMetadata, l as openFileWithinRoot, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-
|
|
12
|
-
import { S as isPidAlive, x as resolveProcessScopedMap } from "./model-auth-
|
|
13
|
-
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-
|
|
14
|
-
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-
|
|
15
|
-
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_OPENCLAW_BROWSER_ENABLED, N as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopOpenClawChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-
|
|
16
|
-
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-
|
|
10
|
+
import { t as formatCliCommand } from "./command-format-BOHIfoCX.js";
|
|
11
|
+
import { c as SafeOpenError, i as getImageMetadata, l as openFileWithinRoot, n as buildImageResizeSideGrid, s as resizeToJpeg, t as IMAGE_REDUCE_QUALITY_STEPS } from "./image-ops-BGmpOcey.js";
|
|
12
|
+
import { S as isPidAlive, x as resolveProcessScopedMap } from "./model-auth-vtNH8C4P.js";
|
|
13
|
+
import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-CHYSjmbr.js";
|
|
14
|
+
import { _ as parseDurationMs, a as writeConfigFile, n as loadConfig, s as parseByteSize, t as createConfigIO } from "./config-Du_-inxH.js";
|
|
15
|
+
import { A as DEFAULT_BROWSER_EVALUATE_ENABLED, D as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, E as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, M as DEFAULT_OPENCLAW_BROWSER_ENABLED, N as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as stopChromeExtensionRelayServer, _ as fetchJson, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, g as appendCdpPath, h as withBrowserNavigationPolicy, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_COLOR, k as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, l as createTargetViaCdp, m as assertBrowserNavigationAllowed, n as isChromeCdpReady, o as stopOpenClawChrome, p as InvalidBrowserNavigationUrlError, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as fetchOk, w as isLoopbackHost, x as ensureChromeExtensionRelayServer } from "./chrome-Bqbv_ZSj.js";
|
|
16
|
+
import { a as syncSkillsToWorkspace, l as resolveSandboxInputPath, m as sanitizeEnvVars, u as resolveSandboxPath } from "./skills-DSZuhFx9.js";
|
|
17
17
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-BoQgnc8X.js";
|
|
18
18
|
import { t as SsrFBlockedError } from "./ssrf-BTMDZjHT.js";
|
|
19
|
-
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-
|
|
20
|
-
import { d as getChannelDock, o as normalizeThinkLevel, v as normalizeHyphenSlug } from "./thinking-
|
|
19
|
+
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-BrNiRjgB.js";
|
|
20
|
+
import { d as getChannelDock, o as normalizeThinkLevel, v as normalizeHyphenSlug } from "./thinking-Dg8vKjw_.js";
|
|
21
21
|
import { n as resolveConversationLabel } from "./conversation-label-DXUkoKcB.js";
|
|
22
|
-
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
22
|
+
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BEAbheM8.js";
|
|
23
23
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-DDYvbmRV.js";
|
|
24
|
-
import { t as sanitizeContentBlocksImages } from "./tool-images-
|
|
24
|
+
import { t as sanitizeContentBlocksImages } from "./tool-images-C1rdDr34.js";
|
|
25
25
|
import fs from "node:fs/promises";
|
|
26
26
|
import os from "node:os";
|
|
27
27
|
import path, { posix } from "node:path";
|
|
28
|
-
import
|
|
28
|
+
import fs$1, { existsSync, realpathSync } from "node:fs";
|
|
29
29
|
import { spawn } from "node:child_process";
|
|
30
30
|
import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
|
|
31
31
|
import crypto, { createHash, timingSafeEqual } from "node:crypto";
|
|
@@ -933,7 +933,7 @@ function isModuleNotFoundError(err) {
|
|
|
933
933
|
}
|
|
934
934
|
async function loadPwAiModule(mode) {
|
|
935
935
|
try {
|
|
936
|
-
return await import("./pw-ai-
|
|
936
|
+
return await import("./pw-ai-D-_aGzdQ.js");
|
|
937
937
|
} catch (err) {
|
|
938
938
|
if (mode === "soft") return null;
|
|
939
939
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -2689,11 +2689,11 @@ async function movePathToTrash(targetPath) {
|
|
|
2689
2689
|
return targetPath;
|
|
2690
2690
|
} catch {
|
|
2691
2691
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
2692
|
-
|
|
2692
|
+
fs$1.mkdirSync(trashDir, { recursive: true });
|
|
2693
2693
|
const base = path.basename(targetPath);
|
|
2694
2694
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
2695
|
-
if (
|
|
2696
|
-
|
|
2695
|
+
if (fs$1.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
|
|
2696
|
+
fs$1.renameSync(targetPath, dest);
|
|
2697
2697
|
return dest;
|
|
2698
2698
|
}
|
|
2699
2699
|
}
|
|
@@ -2771,7 +2771,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
2771
2771
|
} catch {}
|
|
2772
2772
|
const userDataDir = resolveOpenClawUserDataDir(name);
|
|
2773
2773
|
const profileDir = path.dirname(userDataDir);
|
|
2774
|
-
if (
|
|
2774
|
+
if (fs$1.existsSync(profileDir)) {
|
|
2775
2775
|
await movePathToTrash(profileDir);
|
|
2776
2776
|
deleted = true;
|
|
2777
2777
|
}
|
|
@@ -3473,13 +3473,13 @@ function createProfileContext(opts, profile) {
|
|
|
3473
3473
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
3474
3474
|
const profileState = getProfileState();
|
|
3475
3475
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3476
|
-
await (await import("./pw-ai-
|
|
3476
|
+
await (await import("./pw-ai-D-_aGzdQ.js")).closePlaywrightBrowserConnection();
|
|
3477
3477
|
} catch {}
|
|
3478
3478
|
if (profileState.running) await stopRunningBrowser();
|
|
3479
3479
|
try {
|
|
3480
|
-
await (await import("./pw-ai-
|
|
3480
|
+
await (await import("./pw-ai-D-_aGzdQ.js")).closePlaywrightBrowserConnection();
|
|
3481
3481
|
} catch {}
|
|
3482
|
-
if (!
|
|
3482
|
+
if (!fs$1.existsSync(userDataDir)) return {
|
|
3483
3483
|
moved: false,
|
|
3484
3484
|
from: userDataDir
|
|
3485
3485
|
};
|
|
@@ -3898,7 +3898,7 @@ function releaseAllLocksSync() {
|
|
|
3898
3898
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
3899
3899
|
} catch {}
|
|
3900
3900
|
try {
|
|
3901
|
-
|
|
3901
|
+
fs$1.rmSync(held.lockPath, { force: true });
|
|
3902
3902
|
} catch {}
|
|
3903
3903
|
HELD_LOCKS.delete(sessionFile);
|
|
3904
3904
|
}
|
|
@@ -5698,7 +5698,7 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
5698
5698
|
}
|
|
5699
5699
|
function archiveFileOnDisk(filePath, reason) {
|
|
5700
5700
|
const archived = `${filePath}.${reason}.${(/* @__PURE__ */ new Date()).toISOString().replaceAll(":", "-")}`;
|
|
5701
|
-
|
|
5701
|
+
fs$1.renameSync(filePath, archived);
|
|
5702
5702
|
return archived;
|
|
5703
5703
|
}
|
|
5704
5704
|
/**
|
|
@@ -5708,7 +5708,7 @@ function archiveFileOnDisk(filePath, reason) {
|
|
|
5708
5708
|
function archiveSessionTranscripts(opts) {
|
|
5709
5709
|
const archived = [];
|
|
5710
5710
|
for (const candidate of resolveSessionTranscriptCandidates(opts.sessionId, opts.storePath, opts.sessionFile, opts.agentId)) {
|
|
5711
|
-
if (!
|
|
5711
|
+
if (!fs$1.existsSync(candidate)) continue;
|
|
5712
5712
|
try {
|
|
5713
5713
|
archived.push(archiveFileOnDisk(candidate, opts.reason));
|
|
5714
5714
|
} catch {}
|
|
@@ -5740,15 +5740,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
5740
5740
|
let removed = 0;
|
|
5741
5741
|
let scanned = 0;
|
|
5742
5742
|
for (const dir of directories) {
|
|
5743
|
-
const entries = await
|
|
5743
|
+
const entries = await fs$1.promises.readdir(dir).catch(() => []);
|
|
5744
5744
|
for (const entry of entries) {
|
|
5745
5745
|
const timestamp = parseArchivedTimestamp(entry, reason);
|
|
5746
5746
|
if (timestamp == null) continue;
|
|
5747
5747
|
scanned += 1;
|
|
5748
5748
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
5749
5749
|
const fullPath = path.join(dir, entry);
|
|
5750
|
-
if (!(await
|
|
5751
|
-
await
|
|
5750
|
+
if (!(await fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
5751
|
+
await fs$1.promises.rm(fullPath).catch(() => void 0);
|
|
5752
5752
|
removed += 1;
|
|
5753
5753
|
}
|
|
5754
5754
|
}
|
|
@@ -5884,7 +5884,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
5884
5884
|
}
|
|
5885
5885
|
function getFileMtimeMs(filePath) {
|
|
5886
5886
|
try {
|
|
5887
|
-
return
|
|
5887
|
+
return fs$1.statSync(filePath).mtimeMs;
|
|
5888
5888
|
} catch {
|
|
5889
5889
|
return;
|
|
5890
5890
|
}
|
|
@@ -5963,7 +5963,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
5963
5963
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
5964
5964
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
5965
5965
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
5966
|
-
const raw =
|
|
5966
|
+
const raw = fs$1.readFileSync(storePath, "utf-8");
|
|
5967
5967
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
5968
5968
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
5969
5969
|
continue;
|
|
@@ -6115,7 +6115,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
6115
6115
|
}
|
|
6116
6116
|
async function getSessionFileSize(storePath) {
|
|
6117
6117
|
try {
|
|
6118
|
-
return (await
|
|
6118
|
+
return (await fs$1.promises.stat(storePath)).size;
|
|
6119
6119
|
} catch {
|
|
6120
6120
|
return null;
|
|
6121
6121
|
}
|
|
@@ -6132,7 +6132,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6132
6132
|
if (fileSize <= maxBytes) return false;
|
|
6133
6133
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
6134
6134
|
try {
|
|
6135
|
-
await
|
|
6135
|
+
await fs$1.promises.rename(storePath, backupPath);
|
|
6136
6136
|
log.info("rotated session store file", {
|
|
6137
6137
|
backupPath: path.basename(backupPath),
|
|
6138
6138
|
sizeBytes: fileSize
|
|
@@ -6143,11 +6143,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6143
6143
|
try {
|
|
6144
6144
|
const dir = path.dirname(storePath);
|
|
6145
6145
|
const baseName = path.basename(storePath);
|
|
6146
|
-
const backups = (await
|
|
6146
|
+
const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
6147
6147
|
const maxBackups = 3;
|
|
6148
6148
|
if (backups.length > maxBackups) {
|
|
6149
6149
|
const toDelete = backups.slice(maxBackups);
|
|
6150
|
-
for (const old of toDelete) await
|
|
6150
|
+
for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
6151
6151
|
log.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
6152
6152
|
}
|
|
6153
6153
|
} catch {}
|
|
@@ -6202,14 +6202,14 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6202
6202
|
await rotateSessionFile(storePath, maintenance.rotateBytes);
|
|
6203
6203
|
}
|
|
6204
6204
|
}
|
|
6205
|
-
await
|
|
6205
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6206
6206
|
const json = JSON.stringify(store, null, 2);
|
|
6207
6207
|
if (process.platform === "win32") {
|
|
6208
6208
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6209
6209
|
try {
|
|
6210
|
-
await
|
|
6210
|
+
await fs$1.promises.writeFile(tmp, json, "utf-8");
|
|
6211
6211
|
for (let i = 0; i < 5; i++) try {
|
|
6212
|
-
await
|
|
6212
|
+
await fs$1.promises.rename(tmp, storePath);
|
|
6213
6213
|
break;
|
|
6214
6214
|
} catch {
|
|
6215
6215
|
if (i < 4) await new Promise((r) => setTimeout(r, 50 * (i + 1)));
|
|
@@ -6219,27 +6219,27 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6219
6219
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
6220
6220
|
throw err;
|
|
6221
6221
|
} finally {
|
|
6222
|
-
await
|
|
6222
|
+
await fs$1.promises.rm(tmp, { force: true }).catch(() => void 0);
|
|
6223
6223
|
}
|
|
6224
6224
|
return;
|
|
6225
6225
|
}
|
|
6226
6226
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6227
6227
|
try {
|
|
6228
|
-
await
|
|
6228
|
+
await fs$1.promises.writeFile(tmp, json, {
|
|
6229
6229
|
mode: 384,
|
|
6230
6230
|
encoding: "utf-8"
|
|
6231
6231
|
});
|
|
6232
|
-
await
|
|
6233
|
-
await
|
|
6232
|
+
await fs$1.promises.rename(tmp, storePath);
|
|
6233
|
+
await fs$1.promises.chmod(storePath, 384);
|
|
6234
6234
|
} catch (err) {
|
|
6235
6235
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
6236
6236
|
try {
|
|
6237
|
-
await
|
|
6238
|
-
await
|
|
6237
|
+
await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6238
|
+
await fs$1.promises.writeFile(storePath, json, {
|
|
6239
6239
|
mode: 384,
|
|
6240
6240
|
encoding: "utf-8"
|
|
6241
6241
|
});
|
|
6242
|
-
await
|
|
6242
|
+
await fs$1.promises.chmod(storePath, 384);
|
|
6243
6243
|
} catch (err2) {
|
|
6244
6244
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
6245
6245
|
throw err2;
|
|
@@ -6248,7 +6248,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6248
6248
|
}
|
|
6249
6249
|
throw err;
|
|
6250
6250
|
} finally {
|
|
6251
|
-
await
|
|
6251
|
+
await fs$1.promises.rm(tmp, { force: true });
|
|
6252
6252
|
}
|
|
6253
6253
|
}
|
|
6254
6254
|
async function updateSessionStore(storePath, mutator, opts) {
|
|
@@ -6493,8 +6493,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
6493
6493
|
return trimmed ? trimmed : null;
|
|
6494
6494
|
}
|
|
6495
6495
|
async function ensureSessionHeader(params) {
|
|
6496
|
-
if (
|
|
6497
|
-
await
|
|
6496
|
+
if (fs$1.existsSync(params.sessionFile)) return;
|
|
6497
|
+
await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
6498
6498
|
const header = {
|
|
6499
6499
|
type: "session",
|
|
6500
6500
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -6502,7 +6502,7 @@ async function ensureSessionHeader(params) {
|
|
|
6502
6502
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6503
6503
|
cwd: process.cwd()
|
|
6504
6504
|
};
|
|
6505
|
-
await
|
|
6505
|
+
await fs$1.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
6506
6506
|
encoding: "utf-8",
|
|
6507
6507
|
mode: 384
|
|
6508
6508
|
});
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { f as DEFAULT_ACCOUNT_ID, p as normalizeAccountId } from "./session-key-BCzIW1Y2.js";
|
|
2
|
-
import { M as normalizeE164, a as normalizeAnyChannelId, l as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER } from "./registry-
|
|
3
|
-
import { m as createAccountListHelpers } from "./accounts-
|
|
2
|
+
import { M as normalizeE164, a as normalizeAnyChannelId, l as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER } from "./registry-DpeZG5fo.js";
|
|
3
|
+
import { m as createAccountListHelpers } from "./accounts-C8m4ADkw.js";
|
|
4
4
|
import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
|
|
5
|
-
import { r as isTruthyEnvValue } from "./command-format-
|
|
6
|
-
import { n as listBoundAccountIds, r as resolveDefaultAgentBoundAccountId } from "./bindings-
|
|
7
|
-
import
|
|
5
|
+
import { r as isTruthyEnvValue } from "./command-format-BOHIfoCX.js";
|
|
6
|
+
import { n as listBoundAccountIds, r as resolveDefaultAgentBoundAccountId } from "./bindings-BKEEBdsb.js";
|
|
7
|
+
import fs from "node:fs";
|
|
8
8
|
|
|
9
9
|
//#region src/channels/plugins/account-action-gate.ts
|
|
10
10
|
function createAccountActionGate(params) {
|
|
@@ -186,7 +186,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
186
186
|
const accountCfg = resolveAccountCfg(accountId !== DEFAULT_ACCOUNT_ID ? accountId : DEFAULT_ACCOUNT_ID);
|
|
187
187
|
const accountTokenFile = accountCfg?.tokenFile?.trim();
|
|
188
188
|
if (accountTokenFile) {
|
|
189
|
-
if (!
|
|
189
|
+
if (!fs.existsSync(accountTokenFile)) {
|
|
190
190
|
opts.logMissingFile?.(`channels.telegram.accounts.${accountId}.tokenFile not found: ${accountTokenFile}`);
|
|
191
191
|
return {
|
|
192
192
|
token: "",
|
|
@@ -194,7 +194,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
194
194
|
};
|
|
195
195
|
}
|
|
196
196
|
try {
|
|
197
|
-
const token =
|
|
197
|
+
const token = fs.readFileSync(accountTokenFile, "utf-8").trim();
|
|
198
198
|
if (token) return {
|
|
199
199
|
token,
|
|
200
200
|
source: "tokenFile"
|
|
@@ -219,7 +219,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
219
219
|
const allowEnv = accountId === DEFAULT_ACCOUNT_ID;
|
|
220
220
|
const tokenFile = telegramCfg?.tokenFile?.trim();
|
|
221
221
|
if (tokenFile && allowEnv) {
|
|
222
|
-
if (!
|
|
222
|
+
if (!fs.existsSync(tokenFile)) {
|
|
223
223
|
opts.logMissingFile?.(`channels.telegram.tokenFile not found: ${tokenFile}`);
|
|
224
224
|
return {
|
|
225
225
|
token: "",
|
|
@@ -227,7 +227,7 @@ function resolveTelegramToken(cfg, opts = {}) {
|
|
|
227
227
|
};
|
|
228
228
|
}
|
|
229
229
|
try {
|
|
230
|
-
const token =
|
|
230
|
+
const token = fs.readFileSync(tokenFile, "utf-8").trim();
|
|
231
231
|
if (token) return {
|
|
232
232
|
token,
|
|
233
233
|
source: "tokenFile"
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import { dt as resolvePreferredOpenClawTmpDir } from "./registry-
|
|
3
|
-
import "./agent-scope-
|
|
4
|
-
import "./subsystem-
|
|
5
|
-
import "./workspace-
|
|
1
|
+
import "./paths-CyR9Pa1R.js";
|
|
2
|
+
import { dt as resolvePreferredOpenClawTmpDir } from "./registry-DpeZG5fo.js";
|
|
3
|
+
import "./agent-scope-DSUeV7-g.js";
|
|
4
|
+
import "./subsystem-BF9jT_Nw.js";
|
|
5
|
+
import "./workspace-DYx5Dxtw.js";
|
|
6
6
|
import "./boolean-B8-BqKGQ.js";
|
|
7
|
-
import { t as formatCliCommand } from "./command-format-
|
|
8
|
-
import "./model-auth-
|
|
9
|
-
import "./github-copilot-token-
|
|
10
|
-
import "./config-
|
|
11
|
-
import "./manifest-registry-
|
|
12
|
-
import { _ as fetchJson, b as withCdpSocket, d as normalizeCdpWsUrl, g as appendCdpPath, h as withBrowserNavigationPolicy, m as assertBrowserNavigationAllowed, t as getChromeWebSocketUrl, u as formatAriaSnapshot, y as getHeadersWithAuth } from "./chrome-
|
|
7
|
+
import { t as formatCliCommand } from "./command-format-BOHIfoCX.js";
|
|
8
|
+
import "./model-auth-vtNH8C4P.js";
|
|
9
|
+
import "./github-copilot-token-Dgb9dAHW.js";
|
|
10
|
+
import "./config-Du_-inxH.js";
|
|
11
|
+
import "./manifest-registry-Dhk4A5vb.js";
|
|
12
|
+
import { _ as fetchJson, b as withCdpSocket, d as normalizeCdpWsUrl, g as appendCdpPath, h as withBrowserNavigationPolicy, m as assertBrowserNavigationAllowed, t as getChromeWebSocketUrl, u as formatAriaSnapshot, y as getHeadersWithAuth } from "./chrome-Bqbv_ZSj.js";
|
|
13
13
|
import "./redact-jSxx6Ep2.js";
|
|
14
14
|
import { n as formatErrorMessage } from "./errors-BoQgnc8X.js";
|
|
15
15
|
import "./ssrf-BTMDZjHT.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { s as resolveStateDir } from "./paths-
|
|
1
|
+
import { s as resolveStateDir } from "./paths-CyR9Pa1R.js";
|
|
2
2
|
import { y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
|
|
3
|
-
import "./registry-
|
|
4
|
-
import { s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
5
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
6
|
-
import "./workspace-
|
|
3
|
+
import "./registry-DpeZG5fo.js";
|
|
4
|
+
import { s as resolveAgentWorkspaceDir } from "./agent-scope-DSUeV7-g.js";
|
|
5
|
+
import { t as createSubsystemLogger } from "./subsystem-BF9jT_Nw.js";
|
|
6
|
+
import "./workspace-DYx5Dxtw.js";
|
|
7
7
|
import "./redact-jSxx6Ep2.js";
|
|
8
|
-
import "./paths-
|
|
9
|
-
import { _ as isFileMissingError, n as buildSessionEntry, r as listSessionFilesForAgent, t as requireNodeSqlite, v as statRegularFile } from "./sqlite-
|
|
8
|
+
import "./paths-BEAbheM8.js";
|
|
9
|
+
import { _ as isFileMissingError, n as buildSessionEntry, r as listSessionFilesForAgent, t as requireNodeSqlite, v as statRegularFile } from "./sqlite-C3XxSzBN.js";
|
|
10
10
|
import fs from "node:fs/promises";
|
|
11
11
|
import os from "node:os";
|
|
12
12
|
import path from "node:path";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { a as resolveOAuthDir, c as expandHomePrefix, l as resolveEffectiveHomeDir, n as resolveConfigPath, u as resolveRequiredHomeDir } from "./paths-
|
|
1
|
+
import { a as resolveOAuthDir, c as expandHomePrefix, l as resolveEffectiveHomeDir, n as resolveConfigPath, u as resolveRequiredHomeDir } from "./paths-CyR9Pa1R.js";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import fs from "node:fs";
|
|
5
5
|
import { Logger } from "tslog";
|
|
6
6
|
import JSON5 from "json5";
|
|
7
7
|
import chalk, { Chalk } from "chalk";
|
|
@@ -12,9 +12,9 @@ function isNodeErrorWithCode(err, code) {
|
|
|
12
12
|
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
13
13
|
}
|
|
14
14
|
function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
15
|
-
const accessSync = options.accessSync ??
|
|
16
|
-
const lstatSync = options.lstatSync ??
|
|
17
|
-
const mkdirSync = options.mkdirSync ??
|
|
15
|
+
const accessSync = options.accessSync ?? fs.accessSync;
|
|
16
|
+
const lstatSync = options.lstatSync ?? fs.lstatSync;
|
|
17
|
+
const mkdirSync = options.mkdirSync ?? fs.mkdirSync;
|
|
18
18
|
const getuid = options.getuid ?? (() => {
|
|
19
19
|
try {
|
|
20
20
|
return typeof process.getuid === "function" ? process.getuid() : void 0;
|
|
@@ -38,14 +38,14 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
38
38
|
try {
|
|
39
39
|
const preferred = lstatSync(POSIX_OPENCLAW_TMP_DIR);
|
|
40
40
|
if (!preferred.isDirectory() || preferred.isSymbolicLink()) return fallback();
|
|
41
|
-
accessSync(POSIX_OPENCLAW_TMP_DIR,
|
|
41
|
+
accessSync(POSIX_OPENCLAW_TMP_DIR, fs.constants.W_OK | fs.constants.X_OK);
|
|
42
42
|
if (!isSecureDirForUser(preferred)) return fallback();
|
|
43
43
|
return POSIX_OPENCLAW_TMP_DIR;
|
|
44
44
|
} catch (err) {
|
|
45
45
|
if (!isNodeErrorWithCode(err, "ENOENT")) return fallback();
|
|
46
46
|
}
|
|
47
47
|
try {
|
|
48
|
-
accessSync("/tmp",
|
|
48
|
+
accessSync("/tmp", fs.constants.W_OK | fs.constants.X_OK);
|
|
49
49
|
mkdirSync(POSIX_OPENCLAW_TMP_DIR, {
|
|
50
50
|
recursive: true,
|
|
51
51
|
mode: 448
|
|
@@ -68,8 +68,8 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
68
68
|
function readLoggingConfig() {
|
|
69
69
|
const configPath = resolveConfigPath();
|
|
70
70
|
try {
|
|
71
|
-
if (!
|
|
72
|
-
const raw =
|
|
71
|
+
if (!fs.existsSync(configPath)) return;
|
|
72
|
+
const raw = fs.readFileSync(configPath, "utf-8");
|
|
73
73
|
const logging = JSON5.parse(raw)?.logging;
|
|
74
74
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
75
75
|
return logging;
|
|
@@ -174,7 +174,7 @@ function isFileLogLevelEnabled(level) {
|
|
|
174
174
|
return levelToMinLevel(level) <= levelToMinLevel(settings.level);
|
|
175
175
|
}
|
|
176
176
|
function buildLogger(settings) {
|
|
177
|
-
|
|
177
|
+
fs.mkdirSync(path.dirname(settings.file), { recursive: true });
|
|
178
178
|
if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
|
|
179
179
|
let currentFileBytes = getCurrentLogFileBytes(settings.file);
|
|
180
180
|
let warnedAboutSizeCap = false;
|
|
@@ -218,14 +218,14 @@ function resolveMaxLogFileBytes(raw) {
|
|
|
218
218
|
}
|
|
219
219
|
function getCurrentLogFileBytes(file) {
|
|
220
220
|
try {
|
|
221
|
-
return
|
|
221
|
+
return fs.statSync(file).size;
|
|
222
222
|
} catch {
|
|
223
223
|
return 0;
|
|
224
224
|
}
|
|
225
225
|
}
|
|
226
226
|
function appendLogLine(file, line) {
|
|
227
227
|
try {
|
|
228
|
-
|
|
228
|
+
fs.appendFileSync(file, line, { encoding: "utf8" });
|
|
229
229
|
return true;
|
|
230
230
|
} catch {
|
|
231
231
|
return false;
|
|
@@ -277,14 +277,14 @@ function isRollingPath(file) {
|
|
|
277
277
|
}
|
|
278
278
|
function pruneOldRollingLogs(dir) {
|
|
279
279
|
try {
|
|
280
|
-
const entries =
|
|
280
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
281
281
|
const cutoff = Date.now() - MAX_LOG_AGE_MS;
|
|
282
282
|
for (const entry of entries) {
|
|
283
283
|
if (!entry.isFile()) continue;
|
|
284
284
|
if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
|
|
285
285
|
const fullPath = path.join(dir, entry.name);
|
|
286
286
|
try {
|
|
287
|
-
if (
|
|
287
|
+
if (fs.statSync(fullPath).mtimeMs < cutoff) fs.rmSync(fullPath, { force: true });
|
|
288
288
|
} catch {}
|
|
289
289
|
}
|
|
290
290
|
} catch {}
|
|
@@ -365,14 +365,14 @@ function isPlainObject(value) {
|
|
|
365
365
|
//#endregion
|
|
366
366
|
//#region src/utils.ts
|
|
367
367
|
async function ensureDir(dir) {
|
|
368
|
-
await
|
|
368
|
+
await fs.promises.mkdir(dir, { recursive: true });
|
|
369
369
|
}
|
|
370
370
|
/**
|
|
371
371
|
* Check if a file or directory exists at the given path.
|
|
372
372
|
*/
|
|
373
373
|
async function pathExists(targetPath) {
|
|
374
374
|
try {
|
|
375
|
-
await
|
|
375
|
+
await fs.promises.access(targetPath);
|
|
376
376
|
return true;
|
|
377
377
|
} catch {
|
|
378
378
|
return false;
|
|
@@ -455,7 +455,7 @@ function readLidReverseMapping(lid, opts) {
|
|
|
455
455
|
for (const dir of mappingDirs) {
|
|
456
456
|
const mappingPath = path.join(dir, mappingFilename);
|
|
457
457
|
try {
|
|
458
|
-
const data =
|
|
458
|
+
const data = fs.readFileSync(mappingPath, "utf8");
|
|
459
459
|
const phone = JSON.parse(data);
|
|
460
460
|
if (phone === null || phone === void 0) continue;
|
|
461
461
|
return normalizeE164(String(phone));
|
|
@@ -539,7 +539,7 @@ function resolveConfigDir(env = process.env, homedir = os.homedir) {
|
|
|
539
539
|
if (override) return resolveUserPath(override);
|
|
540
540
|
const newDir = path.join(resolveRequiredHomeDir(env, homedir), ".openclaw");
|
|
541
541
|
try {
|
|
542
|
-
if (
|
|
542
|
+
if (fs.existsSync(newDir)) return newDir;
|
|
543
543
|
} catch {}
|
|
544
544
|
return newDir;
|
|
545
545
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-
|
|
3
|
-
import { r as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-
|
|
4
|
-
import { i as chunkMarkdownTextWithMode } from "./chunk-
|
|
2
|
+
import { i as isSilentReplyText, n as SILENT_REPLY_TOKEN } from "./tokens-B-c56SkM.js";
|
|
3
|
+
import { r as markdownToSlackMrkdwnChunks, t as sendMessageSlack } from "./send-Byt_wJDK.js";
|
|
4
|
+
import { i as chunkMarkdownTextWithMode } from "./chunk-fZrBDWYg.js";
|
|
5
5
|
|
|
6
6
|
//#region src/auto-reply/reply/reply-reference.ts
|
|
7
7
|
function createReplyReferencePlanner(options) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { n as resolveAgentConfig } from "./agent-scope-
|
|
2
|
+
import { n as resolveAgentConfig } from "./agent-scope-DSUeV7-g.js";
|
|
3
3
|
|
|
4
4
|
//#region src/agents/identity.ts
|
|
5
5
|
const DEFAULT_ACK_REACTION = "👀";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
2
|
import { d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, i as buildAgentPeerSessionKey, n as DEFAULT_MAIN_KEY, p as normalizeAccountId, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID } from "./session-key-BCzIW1Y2.js";
|
|
3
|
-
import { Z as shouldLogVerbose } from "./registry-
|
|
4
|
-
import { c as resolveDefaultAgentId } from "./agent-scope-
|
|
5
|
-
import { y as logDebug } from "./workspace-
|
|
3
|
+
import { Z as shouldLogVerbose } from "./registry-DpeZG5fo.js";
|
|
4
|
+
import { c as resolveDefaultAgentId } from "./agent-scope-DSUeV7-g.js";
|
|
5
|
+
import { y as logDebug } from "./workspace-DYx5Dxtw.js";
|
|
6
6
|
import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
|
|
7
|
-
import { t as listBindings } from "./bindings-
|
|
7
|
+
import { t as listBindings } from "./bindings-BKEEBdsb.js";
|
|
8
8
|
|
|
9
9
|
//#region src/routing/resolve-route.ts
|
|
10
10
|
var resolve_route_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { J as logVerbose, Z as shouldLogVerbose } from "./registry-
|
|
2
|
-
import { _ as runExec } from "./workspace-
|
|
1
|
+
import { J as logVerbose, Z as shouldLogVerbose } from "./registry-DpeZG5fo.js";
|
|
2
|
+
import { _ as runExec } from "./workspace-DYx5Dxtw.js";
|
|
3
3
|
import { t as normalizeChatType } from "./chat-type-C_KiWNAH.js";
|
|
4
|
-
import { _ as kindFromMime, d as detectMime, h as isAudioFileName, p as getFileExtension } from "./image-ops-
|
|
5
|
-
import { A as normalizeProviderId, L as normalizeGoogleModelId, i as resolveApiKeyForProvider, r as requireApiKey, y as resolveOpenClawAgentDir } from "./model-auth-
|
|
6
|
-
import { d as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, f as isInboundPathAllowed, m as resolveIMessageAttachmentRoots, n as loadConfig, p as mergeInboundPathRoots } from "./config-
|
|
7
|
-
import { S as ensureOpenClawModelsJson, t as describeImageWithModel } from "./image-
|
|
8
|
-
import { n as collectProviderApiKeysForExecution, r as executeWithApiKeyRotation, t as parseGeminiAuth } from "./gemini-auth-
|
|
4
|
+
import { _ as kindFromMime, d as detectMime, h as isAudioFileName, p as getFileExtension } from "./image-ops-BGmpOcey.js";
|
|
5
|
+
import { A as normalizeProviderId, L as normalizeGoogleModelId, i as resolveApiKeyForProvider, r as requireApiKey, y as resolveOpenClawAgentDir } from "./model-auth-vtNH8C4P.js";
|
|
6
|
+
import { d as DEFAULT_IMESSAGE_ATTACHMENT_ROOTS, f as isInboundPathAllowed, m as resolveIMessageAttachmentRoots, n as loadConfig, p as mergeInboundPathRoots } from "./config-Du_-inxH.js";
|
|
7
|
+
import { S as ensureOpenClawModelsJson, t as describeImageWithModel } from "./image-CxPjVob-.js";
|
|
8
|
+
import { n as collectProviderApiKeysForExecution, r as executeWithApiKeyRotation, t as parseGeminiAuth } from "./gemini-auth-A2JaRMHH.js";
|
|
9
9
|
import { n as fetchWithTimeout } from "./fetch-timeout-DL3f_O53.js";
|
|
10
|
-
import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, r as MediaFetchError } from "./local-roots-
|
|
10
|
+
import { i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, r as MediaFetchError } from "./local-roots-JqlMsAYY.js";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
12
12
|
import os from "node:os";
|
|
13
13
|
import path from "node:path";
|
|
@@ -882,7 +882,7 @@ async function loadModelCatalog(params) {
|
|
|
882
882
|
});
|
|
883
883
|
try {
|
|
884
884
|
await ensureOpenClawModelsJson(params?.config ?? loadConfig());
|
|
885
|
-
await (await import("./pi-auth-json-
|
|
885
|
+
await (await import("./pi-auth-json-BiwfFswL.js")).ensurePiAuthJsonFromAuthProfiles(resolveOpenClawAgentDir());
|
|
886
886
|
const piSdk = await importPiSdk();
|
|
887
887
|
const agentDir = resolveOpenClawAgentDir();
|
|
888
888
|
const { join } = await import("node:path");
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { dt as resolvePreferredOpenClawTmpDir } from "./registry-
|
|
3
|
-
import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-
|
|
2
|
+
import { dt as resolvePreferredOpenClawTmpDir } from "./registry-DpeZG5fo.js";
|
|
3
|
+
import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-DIrNa311.js";
|
|
4
4
|
import { a as requireTargetKind, i as parseTargetPrefixes, n as ensureTargetId, r as parseTargetMention, t as buildMessagingTarget } from "./targets-CFovdgJI.js";
|
|
5
|
-
import { b as maxBytesForKind, f as extensionForMime } from "./image-ops-
|
|
6
|
-
import { n as loadConfig } from "./config-
|
|
7
|
-
import { n as retryAsync, t as resolveRetryConfig } from "./retry-
|
|
8
|
-
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-
|
|
9
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
10
|
-
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-
|
|
5
|
+
import { b as maxBytesForKind, f as extensionForMime } from "./image-ops-BGmpOcey.js";
|
|
6
|
+
import { n as loadConfig } from "./config-Du_-inxH.js";
|
|
7
|
+
import { n as retryAsync, t as resolveRetryConfig } from "./retry-Bdu4_ZcT.js";
|
|
8
|
+
import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-fZrBDWYg.js";
|
|
9
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DpVJE0eA.js";
|
|
10
|
+
import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-DJPm0a4k.js";
|
|
11
11
|
import { t as resolveFetch } from "./fetch-DtI0mtzx.js";
|
|
12
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-
|
|
12
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-BgsTqLau.js";
|
|
13
13
|
import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-CCuCaqgv.js";
|
|
14
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
14
|
+
import { t as convertMarkdownTables } from "./tables-C3clT_iA.js";
|
|
15
15
|
import fs from "node:fs/promises";
|
|
16
16
|
import path from "node:path";
|
|
17
17
|
import { execFile } from "node:child_process";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { I as resolveUserPath, M as normalizeE164 } from "./registry-
|
|
3
|
-
import { x as mediaKindFromMime } from "./image-ops-
|
|
4
|
-
import { n as loadConfig } from "./config-
|
|
5
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
6
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
7
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
8
|
-
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-
|
|
2
|
+
import { I as resolveUserPath, M as normalizeE164 } from "./registry-DpeZG5fo.js";
|
|
3
|
+
import { x as mediaKindFromMime } from "./image-ops-BGmpOcey.js";
|
|
4
|
+
import { n as loadConfig } from "./config-Du_-inxH.js";
|
|
5
|
+
import { t as resolveIMessageAccount } from "./accounts-DFrH9IVU.js";
|
|
6
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DpVJE0eA.js";
|
|
7
|
+
import { t as convertMarkdownTables } from "./tables-C3clT_iA.js";
|
|
8
|
+
import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-B8WHzsCX.js";
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
10
10
|
import { createInterface } from "node:readline";
|
|
11
11
|
|