openclaw-multi-auto 1.7.9 → 1.8.0
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/{agent-Bf9VxLj8.js → agent-BomWJjOy.js} +10 -10
- package/dist/{audio-preflight-DKt9ICbJ.js → audio-preflight-CZHCr2-5.js} +9 -9
- package/dist/{audio-preflight-BK4MI6Gs.js → audio-preflight-GAYJDgGF.js} +1 -1
- package/dist/{audit-membership-runtime-0b4ZhE41.js → audit-membership-runtime-fBOVjLNx.js} +4 -4
- package/dist/auth-profiles.runtime-DNqCx0L5.js +11 -0
- package/dist/{auth-profiles.runtime-DEhTAVAo.js → auth-profiles.runtime-IXde-3_L.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +10 -10
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +9 -9
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{compact.runtime-CH24Vvny.js → compact.runtime-BCHQpekB.js} +1 -1
- package/dist/compact.runtime-pgjSlzSY.js +11 -0
- package/dist/{deliver-runtime-6WeFOxSI.js → deliver-runtime-Bm3VqH55.js} +1 -1
- package/dist/deliver-runtime-D4aWAXZ9.js +11 -0
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-sH_NN8SV.js → fetch-BdTTF2z-.js} +2 -2
- package/dist/{frontmatter-DhmdUnBP.js → frontmatter-DZlWsaUx.js} +3 -3
- package/dist/{github-copilot-token-368sRGBD.js → github-copilot-token-BeFx3MLn.js} +7 -7
- package/dist/image-runtime-Brryt_BU.js +11 -0
- package/dist/{image-runtime-BwzYRCA5.js → image-runtime-CReMeTZL.js} +1 -1
- package/dist/llm-slug-generator.js +9 -9
- package/dist/{logger-C0l_Gj8Y.js → logger-DCBlX1uz.js} +7 -7
- package/dist/{login-aLc84rc7.js → login-CKmmxErc.js} +4 -4
- package/dist/{login-qr-FW_sLvPl.js → login-qr-D2jYdV8v.js} +2 -2
- package/dist/{login-qr-D3QtIyy8.js → login-qr-KVA4wuh0.js} +10 -10
- package/dist/{login-BEOnxdap.js → login-xsvrgJJt.js} +2 -2
- package/dist/{manager-runtime-DV0_pZDZ.js → manager-runtime-BBxiBzvv.js} +1 -1
- package/dist/manager-runtime-D9AEoM1M.js +11 -0
- package/dist/{manager.runtime-ilRhqZW0.js → manager.runtime-BV-CBNb2.js} +10 -10
- package/dist/{manager.runtime-CynsHdcO.js → manager.runtime-CF3GyuMb.js} +7 -7
- package/dist/{model-selection-qaBek98Q.js → model-selection-BQm6_iuT.js} +43 -43
- package/dist/{model-selection-G7SiAgN6.js → model-selection-CNRMBWfR.js} +287 -287
- package/dist/{paths-BwJ6yG6k.js → paths-CNIc83Pn.js} +5 -5
- package/dist/pi-model-discovery-runtime-CDKkuBYh.js +11 -0
- package/dist/{pi-model-discovery-runtime-Q0BoklY3.js → pi-model-discovery-runtime-DeRljgTs.js} +1 -1
- package/dist/{pi-tools.before-tool-call.runtime-Be9V6RlN.js → pi-tools.before-tool-call.runtime-DgAiY2la.js} +9 -9
- package/dist/{pi-tools.before-tool-call.runtime-B_uML_Gt.js → pi-tools.before-tool-call.runtime-PhxG0y1R.js} +1 -1
- package/dist/{pw-ai-BLzIHVAG.js → pw-ai-3ual6adI.js} +9 -9
- package/dist/{pw-ai-DzdseGw2.js → pw-ai-CzFFsGR7.js} +1 -1
- package/dist/{qmd-manager-CFVuAj9l.js → qmd-manager-DvglNhlJ.js} +5 -5
- package/dist/{query-expansion-DnS6CGY2.js → query-expansion-DXwSmE_K.js} +8 -8
- package/dist/runtime-whatsapp-login.runtime-Br3SxDXL.js +13 -0
- package/dist/{runtime-whatsapp-login.runtime-Dsz-DNfa.js → runtime-whatsapp-login.runtime-vKFKNi8Z.js} +3 -3
- package/dist/runtime-whatsapp-outbound.runtime-L3Qkst0n.js +12 -0
- package/dist/{runtime-whatsapp-outbound.runtime-BeZMBTt6.js → runtime-whatsapp-outbound.runtime-SAT-C6UE.js} +2 -2
- package/dist/{send-p1D-Lzec.js → send-CXnKWzde.js} +3 -3
- package/dist/{send-DxYxezcL.js → send-DGQUY-kp.js} +1 -1
- package/dist/{session--tqRfZQU.js → session-CbQ43pUq.js} +1 -1
- package/dist/{session-DIkw9afg.js → session-kt-bqE_z.js} +7 -7
- package/dist/slash-commands.runtime-BYfxn_xu.js +11 -0
- package/dist/{slash-commands.runtime-C8j-n-bX.js → slash-commands.runtime-DoT9bJKb.js} +1 -1
- package/dist/{slash-dispatch.runtime-BA-MMy0P.js → slash-dispatch.runtime--9HmQuIE.js} +1 -1
- package/dist/{slash-dispatch.runtime-CgJLQTwP.js → slash-dispatch.runtime-Cu8ghe1h.js} +9 -9
- package/dist/slash-skill-commands.runtime-8dS5PTaH.js +11 -0
- package/dist/{slash-skill-commands.runtime-Cm8K1kWM.js → slash-skill-commands.runtime-BZqnnkHJ.js} +1 -1
- package/dist/{subagent-registry-runtime-DKOXxZgH.js → subagent-registry-runtime-9WfVik2h.js} +1 -1
- package/dist/{subagent-registry-runtime-DQeHzv-u.js → subagent-registry-runtime-Z0fdsGSq.js} +9 -9
- package/dist/{subsystem-CDcEQtQK.js → subsystem-Cr1MiLhx.js} +14 -14
- package/dist/{web-RzQ9jrtt.js → web-B_EVHbEP.js} +4 -4
- package/dist/{web-gHwQkPhu.js → web-CXyjF_si.js} +12 -12
- package/dist/{whatsapp-actions-C1UZXBOC.js → whatsapp-actions-BUvGEDSk.js} +10 -10
- package/dist/{whatsapp-actions-BmDvJijd.js → whatsapp-actions-pQqLTCXJ.js} +2 -2
- package/dist/{workspace-Cg3kGb1y.js → workspace-Bi8vpJN0.js} +20 -20
- package/package.json +1 -1
- package/scripts/create-instance.sh +43 -176
- package/dist/auth-profiles.runtime-pDQ4QesA.js +0 -11
- package/dist/compact.runtime-Y7wbaDO2.js +0 -11
- package/dist/deliver-runtime-DBYdmfDR.js +0 -11
- package/dist/image-runtime-XMz7IM-j.js +0 -11
- package/dist/manager-runtime-D8C3_L2_.js +0 -11
- package/dist/pi-model-discovery-runtime-DgHKNg0i.js +0 -11
- package/dist/runtime-whatsapp-login.runtime-CXhM_C-C.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-Kx-CVYdW.js +0 -12
- package/dist/slash-commands.runtime-D6R-T9zj.js +0 -11
- package/dist/slash-skill-commands.runtime-BC9oRGpm.js +0 -11
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import syncFs from "node:fs";
|
|
4
4
|
//#region src/infra/home-dir.ts
|
|
5
5
|
function normalize(value) {
|
|
6
6
|
const trimmed = value?.trim();
|
|
@@ -105,10 +105,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
|
105
105
|
const newDir = newStateDir(effectiveHomedir);
|
|
106
106
|
if (env.OPENCLAW_TEST_FAST === "1") return newDir;
|
|
107
107
|
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
108
|
-
if (
|
|
108
|
+
if (syncFs.existsSync(newDir)) return newDir;
|
|
109
109
|
const existingLegacy = legacyDirs.find((dir) => {
|
|
110
110
|
try {
|
|
111
|
-
return
|
|
111
|
+
return syncFs.existsSync(dir);
|
|
112
112
|
} catch {
|
|
113
113
|
return false;
|
|
114
114
|
}
|
|
@@ -141,7 +141,7 @@ function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)
|
|
|
141
141
|
if (env.OPENCLAW_TEST_FAST === "1") return resolveCanonicalConfigPath(env, resolveStateDir(env, homedir));
|
|
142
142
|
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
143
143
|
try {
|
|
144
|
-
return
|
|
144
|
+
return syncFs.existsSync(candidate);
|
|
145
145
|
} catch {
|
|
146
146
|
return false;
|
|
147
147
|
}
|
|
@@ -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 syncFs.existsSync(candidate);
|
|
163
163
|
} catch {
|
|
164
164
|
return false;
|
|
165
165
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { Bn as discoverModels, Ln as PiAuthStorageClass, Rn as PiModelRegistryClass, zn as discoverAuthStorage } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
export { PiAuthStorageClass as AuthStorage, PiModelRegistryClass as ModelRegistry, discoverAuthStorage, discoverModels };
|
package/dist/{pi-model-discovery-runtime-Q0BoklY3.js → pi-model-discovery-runtime-DeRljgTs.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { Fn as PiModelRegistryClass, In as discoverAuthStorage, Ln as discoverModels, Pn as PiAuthStorageClass } from "./model-selection-
|
|
4
|
+
import { Fn as PiModelRegistryClass, In as discoverAuthStorage, Ln as discoverModels, Pn as PiAuthStorageClass } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { PiAuthStorageClass as AuthStorage, PiModelRegistryClass as ModelRegistry, discoverAuthStorage, discoverModels };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import { D as isPlainObject } from "./logger-
|
|
6
|
-
import { Jt as logToolLoopAction, Yt as getDiagnosticSessionState } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import { D as isPlainObject } from "./logger-DCBlX1uz.js";
|
|
6
|
+
import { Jt as logToolLoopAction, Yt as getDiagnosticSessionState } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
11
|
import { createHash } from "node:crypto";
|
|
12
12
|
//#region src/agents/tool-loop-detection.ts
|
|
13
13
|
const log = createSubsystemLogger("agents/loop-detection");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import { D as isPlainObject, O as createSubsystemLogger } from "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { Gt as logToolLoopAction, Kt as getDiagnosticSessionState } from "./model-selection-
|
|
4
|
+
import { Gt as logToolLoopAction, Kt as getDiagnosticSessionState } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
import { createHash } from "node:crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { at as writeFileFromPathWithinRoot } from "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { E as resolvePreferredOpenClawTmpDir } from "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { $r as withCdpSocket, Ci as formatCliCommand, Gr as getRoleSnapshotStats, Jr as normalizeCdpWsUrl, Kr as parseRoleRef, Qr as normalizeCdpHttpBaseForJsonEndpoints, Ur as buildRoleSnapshotFromAiSnapshot, Wr as buildRoleSnapshotFromAriaSnapshot, Xr as fetchJson, Yr as appendCdpPath, Zr as getHeadersWithAuth, ai as DEFAULT_TRACE_DIR, ci as formatErrorMessage, di as BrowserTabNotFoundError, fi as assertBrowserNavigationAllowed, hi as withBrowserNavigationPolicy, li as matchBrowserUrlPattern, mi as assertBrowserNavigationResultAllowed, ni as markPwAiLoaded, oi as DEFAULT_UPLOAD_DIR, pi as assertBrowserNavigationRedirectChainAllowed, qr as formatAriaSnapshot, ri as withNoProxyForCdpUrl, si as resolveStrictExistingPathsWithinRoot, ti as getChromeWebSocketUrl } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import { at as writeFileFromPathWithinRoot } from "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import { E as resolvePreferredOpenClawTmpDir } from "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { $r as withCdpSocket, Ci as formatCliCommand, Gr as getRoleSnapshotStats, Jr as normalizeCdpWsUrl, Kr as parseRoleRef, Qr as normalizeCdpHttpBaseForJsonEndpoints, Ur as buildRoleSnapshotFromAiSnapshot, Wr as buildRoleSnapshotFromAriaSnapshot, Xr as fetchJson, Yr as appendCdpPath, Zr as getHeadersWithAuth, ai as DEFAULT_TRACE_DIR, ci as formatErrorMessage, di as BrowserTabNotFoundError, fi as assertBrowserNavigationAllowed, hi as withBrowserNavigationPolicy, li as matchBrowserUrlPattern, mi as assertBrowserNavigationResultAllowed, ni as markPwAiLoaded, oi as DEFAULT_UPLOAD_DIR, pi as assertBrowserNavigationRedirectChainAllowed, qr as formatAriaSnapshot, ri as withNoProxyForCdpUrl, si as resolveStrictExistingPathsWithinRoot, ti as getChromeWebSocketUrl } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
11
|
import fs from "node:fs/promises";
|
|
12
12
|
import path from "node:path";
|
|
13
13
|
import crypto from "node:crypto";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { at as writeFileFromPathWithinRoot } from "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import { Z as resolvePreferredOpenClawTmpDir } from "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { Br as getRoleSnapshotStats, Gr as fetchJson, Hr as formatAriaSnapshot, Jr as withCdpSocket, Kr as getHeadersWithAuth, Qr as withNoProxyForCdpUrl, Rr as buildRoleSnapshotFromAiSnapshot, Ur as normalizeCdpWsUrl, Vr as parseRoleRef, Wr as appendCdpPath, Xr as getChromeWebSocketUrl, Zr as markPwAiLoaded, ci as assertBrowserNavigationRedirectChainAllowed, ei as DEFAULT_TRACE_DIR, ii as matchBrowserUrlPattern, li as assertBrowserNavigationResultAllowed, ni as resolveStrictExistingPathsWithinRoot, oi as BrowserTabNotFoundError, qr as normalizeCdpHttpBaseForJsonEndpoints, ri as formatErrorMessage, si as assertBrowserNavigationAllowed, ti as DEFAULT_UPLOAD_DIR, ui as withBrowserNavigationPolicy, vi as formatCliCommand, zr as buildRoleSnapshotFromAriaSnapshot } from "./model-selection-
|
|
4
|
+
import { Br as getRoleSnapshotStats, Gr as fetchJson, Hr as formatAriaSnapshot, Jr as withCdpSocket, Kr as getHeadersWithAuth, Qr as withNoProxyForCdpUrl, Rr as buildRoleSnapshotFromAiSnapshot, Ur as normalizeCdpWsUrl, Vr as parseRoleRef, Wr as appendCdpPath, Xr as getChromeWebSocketUrl, Zr as markPwAiLoaded, ci as assertBrowserNavigationRedirectChainAllowed, ei as DEFAULT_TRACE_DIR, ii as matchBrowserUrlPattern, li as assertBrowserNavigationResultAllowed, ni as resolveStrictExistingPathsWithinRoot, oi as BrowserTabNotFoundError, qr as normalizeCdpHttpBaseForJsonEndpoints, ri as formatErrorMessage, si as assertBrowserNavigationAllowed, ti as DEFAULT_UPLOAD_DIR, ui as withBrowserNavigationPolicy, vi as formatCliCommand, zr as buildRoleSnapshotFromAriaSnapshot } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
import path from "node:path";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { B as resolveWindowsSpawnProgram, C as isFileMissingError, Ct as resolveAgentWorkspaceDir, a as listSessionFilesForAgent, i as buildSessionEntry, ot as writeFileWithinRoot, r as requireNodeSqlite, t as extractKeywords, w as statRegularFile, z as materializeWindowsSpawnProgram } from "./query-expansion-
|
|
2
|
-
import { c as resolveStateDir } from "./paths-
|
|
3
|
-
import { t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { it as parseAgentSessionKey } from "./workspace-
|
|
5
|
-
import "./logger-
|
|
1
|
+
import { B as resolveWindowsSpawnProgram, C as isFileMissingError, Ct as resolveAgentWorkspaceDir, a as listSessionFilesForAgent, i as buildSessionEntry, ot as writeFileWithinRoot, r as requireNodeSqlite, t as extractKeywords, w as statRegularFile, z as materializeWindowsSpawnProgram } from "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import { c as resolveStateDir } from "./paths-CNIc83Pn.js";
|
|
3
|
+
import { t as createSubsystemLogger } from "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import { it as parseAgentSessionKey } from "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { c as resolveStateDir, f as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-
|
|
2
|
-
import { C as resolveNodeRequireFromMeta, t as createSubsystemLogger } from "./subsystem-
|
|
3
|
-
import { A as isNotFoundPathError, D as resolveBoundaryPath, E as BOUNDARY_PATH_ALIAS_POLICIES, M as isSymlinkOpenError, P as DEFAULT_AGENT_ID, T as sameFileIdentity, U as resolveAgentIdFromSessionKey, V as normalizeAgentId, it as parseAgentSessionKey, j as isPathInside, k as hasNodeErrorCode, p as resolveDefaultAgentWorkspaceDir } from "./workspace-
|
|
4
|
-
import { i as logWarn, y as resolveUserPath } from "./logger-
|
|
1
|
+
import { c as resolveStateDir, f as resolveRequiredHomeDir, l as expandHomePrefix } from "./paths-CNIc83Pn.js";
|
|
2
|
+
import { C as resolveNodeRequireFromMeta, t as createSubsystemLogger } from "./subsystem-Cr1MiLhx.js";
|
|
3
|
+
import { A as isNotFoundPathError, D as resolveBoundaryPath, E as BOUNDARY_PATH_ALIAS_POLICIES, M as isSymlinkOpenError, P as DEFAULT_AGENT_ID, T as sameFileIdentity, U as resolveAgentIdFromSessionKey, V as normalizeAgentId, it as parseAgentSessionKey, j as isPathInside, k as hasNodeErrorCode, p as resolveDefaultAgentWorkspaceDir } from "./workspace-Bi8vpJN0.js";
|
|
4
|
+
import { i as logWarn, y as resolveUserPath } from "./logger-DCBlX1uz.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs from "node:fs/promises";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import
|
|
9
|
+
import syncFs, { constants, readFileSync, statSync } from "node:fs";
|
|
10
10
|
import { spawn } from "node:child_process";
|
|
11
11
|
import crypto, { randomUUID } from "node:crypto";
|
|
12
12
|
import { once } from "node:events";
|
|
@@ -191,7 +191,7 @@ function normalizePathForComparison(input) {
|
|
|
191
191
|
const resolved = path.resolve(stripNullBytes(resolveUserPath(input)));
|
|
192
192
|
let normalized = resolved;
|
|
193
193
|
try {
|
|
194
|
-
normalized =
|
|
194
|
+
normalized = syncFs.realpathSync.native(resolved);
|
|
195
195
|
} catch {}
|
|
196
196
|
if (process.platform === "win32") return normalized.toLowerCase();
|
|
197
197
|
return normalized;
|
|
@@ -1690,7 +1690,7 @@ function resolveStructuralSessionFallbackPath(candidateAbsPath, expectedAgentId)
|
|
|
1690
1690
|
}
|
|
1691
1691
|
function safeRealpathSync(filePath) {
|
|
1692
1692
|
try {
|
|
1693
|
-
return
|
|
1693
|
+
return syncFs.realpathSync(filePath);
|
|
1694
1694
|
} catch {
|
|
1695
1695
|
return;
|
|
1696
1696
|
}
|
|
@@ -1933,7 +1933,7 @@ const DISABLED_MULTIMODAL_SETTINGS = {
|
|
|
1933
1933
|
};
|
|
1934
1934
|
function ensureDir(dir) {
|
|
1935
1935
|
try {
|
|
1936
|
-
|
|
1936
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
1937
1937
|
} catch {}
|
|
1938
1938
|
return dir;
|
|
1939
1939
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
import "./session-kt-bqE_z.js";
|
|
12
|
+
import { t as loginWeb } from "./login-CKmmxErc.js";
|
|
13
|
+
export { loginWeb };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import "./model-selection-
|
|
4
|
+
import "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
|
-
import "./session
|
|
8
|
-
import { t as loginWeb } from "./login-
|
|
7
|
+
import "./session-CbQ43pUq.js";
|
|
8
|
+
import { t as loginWeb } from "./login-xsvrgJJt.js";
|
|
9
9
|
export { loginWeb };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-CXnKWzde.js";
|
|
12
|
+
export { sendMessageWhatsApp, sendPollWhatsApp };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import "./model-selection-
|
|
4
|
+
import "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
|
-
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
7
|
+
import { n as sendPollWhatsApp, t as sendMessageWhatsApp } from "./send-DGQUY-kp.js";
|
|
8
8
|
export { sendMessageWhatsApp, sendPollWhatsApp };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { b as getChildLogger, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { T as toWhatsappJid, u as escapeRegExp } from "./logger-
|
|
3
|
-
import { Cn as resolveMarkdownTableMode, Mn as loadWebMedia, Nn as normalizePollInput, _i as redactIdentifier, br as resolveWhatsAppMediaMaxBytes, ei as generateSecureUuid, f as requireActiveWebListener, vi as loadConfig, xn as convertMarkdownTables, yr as resolveWhatsAppAccount } from "./model-selection-
|
|
1
|
+
import { b as getChildLogger, t as createSubsystemLogger } from "./subsystem-Cr1MiLhx.js";
|
|
2
|
+
import { T as toWhatsappJid, u as escapeRegExp } from "./logger-DCBlX1uz.js";
|
|
3
|
+
import { Cn as resolveMarkdownTableMode, Mn as loadWebMedia, Nn as normalizePollInput, _i as redactIdentifier, br as resolveWhatsAppMediaMaxBytes, ei as generateSecureUuid, f as requireActiveWebListener, vi as loadConfig, xn as convertMarkdownTables, yr as resolveWhatsAppAccount } from "./model-selection-CNRMBWfR.js";
|
|
4
4
|
//#region src/markdown/whatsapp.ts
|
|
5
5
|
/**
|
|
6
6
|
* Convert standard Markdown formatting to WhatsApp-compatible markup.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K as getChildLogger, O as createSubsystemLogger, T as toWhatsappJid, u as escapeRegExp } from "./logger-Cmh2bFJD.js";
|
|
2
|
-
import { An as normalizePollInput, Yr as generateSecureUuid, bn as resolveMarkdownTableMode, d as requireActiveWebListener, fi as redactIdentifier, hr as resolveWhatsAppMediaMaxBytes, kn as loadWebMedia, mr as resolveWhatsAppAccount, pi as loadConfig, vn as convertMarkdownTables } from "./model-selection-
|
|
2
|
+
import { An as normalizePollInput, Yr as generateSecureUuid, bn as resolveMarkdownTableMode, d as requireActiveWebListener, fi as redactIdentifier, hr as resolveWhatsAppMediaMaxBytes, kn as loadWebMedia, mr as resolveWhatsAppAccount, pi as loadConfig, vn as convertMarkdownTables } from "./model-selection-BQm6_iuT.js";
|
|
3
3
|
//#region src/markdown/whatsapp.ts
|
|
4
4
|
/**
|
|
5
5
|
* Convert standard Markdown formatting to WhatsApp-compatible markup.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { I as danger, K as getChildLogger, V as success, l as ensureDir, q as toPinoLikeLogger, y as resolveUserPath } from "./logger-Cmh2bFJD.js";
|
|
2
|
-
import { Er as resolveWebCredsPath, Sr as readCredsJsonRaw, Tr as resolveWebCredsBackupPath, br as maybeRestoreCredsFromBackup, gi as VERSION, vi as formatCliCommand, wr as resolveDefaultWebAuthDir } from "./model-selection-
|
|
2
|
+
import { Er as resolveWebCredsPath, Sr as readCredsJsonRaw, Tr as resolveWebCredsBackupPath, br as maybeRestoreCredsFromBackup, gi as VERSION, vi as formatCliCommand, wr as resolveDefaultWebAuthDir } from "./model-selection-BQm6_iuT.js";
|
|
3
3
|
import fs from "node:fs";
|
|
4
4
|
import "node:crypto";
|
|
5
5
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { S as toPinoLikeLogger, b as getChildLogger, h as success, l as danger } from "./subsystem-
|
|
2
|
-
import { l as ensureDir, y as resolveUserPath } from "./logger-
|
|
3
|
-
import { Ar as resolveWebCredsBackupPath, Ci as formatCliCommand, Dr as readCredsJsonRaw, Tr as maybeRestoreCredsFromBackup, jr as resolveWebCredsPath, kr as resolveDefaultWebAuthDir, xi as VERSION } from "./model-selection-
|
|
4
|
-
import
|
|
1
|
+
import { S as toPinoLikeLogger, b as getChildLogger, h as success, l as danger } from "./subsystem-Cr1MiLhx.js";
|
|
2
|
+
import { l as ensureDir, y as resolveUserPath } from "./logger-DCBlX1uz.js";
|
|
3
|
+
import { Ar as resolveWebCredsBackupPath, Ci as formatCliCommand, Dr as readCredsJsonRaw, Tr as maybeRestoreCredsFromBackup, jr as resolveWebCredsPath, kr as resolveDefaultWebAuthDir, xi as VERSION } from "./model-selection-CNRMBWfR.js";
|
|
4
|
+
import syncFs from "node:fs";
|
|
5
5
|
import "node:crypto";
|
|
6
6
|
import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
|
|
7
7
|
import qrcode from "qrcode-terminal";
|
|
@@ -19,16 +19,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
|
|
|
19
19
|
const raw = readCredsJsonRaw(credsPath);
|
|
20
20
|
if (raw) try {
|
|
21
21
|
JSON.parse(raw);
|
|
22
|
-
|
|
22
|
+
syncFs.copyFileSync(credsPath, backupPath);
|
|
23
23
|
try {
|
|
24
|
-
|
|
24
|
+
syncFs.chmodSync(backupPath, 384);
|
|
25
25
|
} catch {}
|
|
26
26
|
} catch {}
|
|
27
27
|
} catch {}
|
|
28
28
|
try {
|
|
29
29
|
await Promise.resolve(saveCreds());
|
|
30
30
|
try {
|
|
31
|
-
|
|
31
|
+
syncFs.chmodSync(resolveWebCredsPath(authDir), 384);
|
|
32
32
|
} catch {}
|
|
33
33
|
} catch (err) {
|
|
34
34
|
logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { an as listNativeCommandSpecsForConfig, in as findCommandByNativeName, on as parseCommandArgs, rn as buildCommandTextFromArgs, sn as resolveCommandArgMenu } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { en as buildCommandTextFromArgs, in as resolveCommandArgMenu, nn as listNativeCommandSpecsForConfig, rn as parseCommandArgs, tn as findCommandByNativeName } from "./model-selection-
|
|
4
|
+
import { en as buildCommandTextFromArgs, in as resolveCommandArgMenu, nn as listNativeCommandSpecsForConfig, rn as parseCommandArgs, tn as findCommandByNativeName } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { buildCommandTextFromArgs, findCommandByNativeName, listNativeCommandSpecsForConfig, parseCommandArgs, resolveCommandArgMenu };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { Ar as resolveConversationLabel, Dn as resolveChunkMode, T as createReplyPrefixOptions, bn as resolveMarkdownTableMode, fn as resolveAgentRoute, g as deliverSlackSlashReplies, m as recordInboundSessionMetaSafe, x as dispatchReplyWithDispatcher, z as finalizeInboundContext } from "./model-selection-
|
|
4
|
+
import { Ar as resolveConversationLabel, Dn as resolveChunkMode, T as createReplyPrefixOptions, bn as resolveMarkdownTableMode, fn as resolveAgentRoute, g as deliverSlackSlashReplies, m as recordInboundSessionMetaSafe, x as dispatchReplyWithDispatcher, z as finalizeInboundContext } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { An as resolveChunkMode, B as finalizeInboundContext, Cn as resolveMarkdownTableMode, E as createReplyPrefixOptions, Fr as resolveConversationLabel, S as dispatchReplyWithDispatcher, _ as deliverSlackSlashReplies, h as recordInboundSessionMetaSafe, hn as resolveAgentRoute } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { An as resolveChunkMode, B as finalizeInboundContext, Cn as resolveMarkdownTableMode, E as createReplyPrefixOptions, Fr as resolveConversationLabel, S as dispatchReplyWithDispatcher, _ as deliverSlackSlashReplies, h as recordInboundSessionMetaSafe, hn as resolveAgentRoute } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
11
|
export { createReplyPrefixOptions, deliverSlackSlashReplies, dispatchReplyWithDispatcher, finalizeInboundContext, recordInboundSessionMetaSafe, resolveAgentRoute, resolveChunkMode, resolveConversationLabel, resolveMarkdownTableMode };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { I as listSkillCommandsForAgents } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
|
+
import "./boolean-C7Ct_klp.js";
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
export { listSkillCommandsForAgents };
|
package/dist/{slash-skill-commands.runtime-Cm8K1kWM.js → slash-skill-commands.runtime-BZqnnkHJ.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { F as listSkillCommandsForAgents } from "./model-selection-
|
|
4
|
+
import { F as listSkillCommandsForAgents } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { listSkillCommandsForAgents };
|
package/dist/{subagent-registry-runtime-DKOXxZgH.js → subagent-registry-runtime-9WfVik2h.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { $ as countPendingDescendantRunsExcludingRun, Q as countPendingDescendantRuns, Z as countActiveDescendantRuns, et as isSubagentSessionRunActive, it as shouldIgnorePostCompletionAnnounceForSession, nt as replaceSubagentRunAfterSteer, rt as resolveRequesterForChildSession, tt as listSubagentRunsForRequester } from "./model-selection-
|
|
4
|
+
import { $ as countPendingDescendantRunsExcludingRun, Q as countPendingDescendantRuns, Z as countActiveDescendantRuns, et as isSubagentSessionRunActive, it as shouldIgnorePostCompletionAnnounceForSession, nt as replaceSubagentRunAfterSteer, rt as resolveRequesterForChildSession, tt as listSubagentRunsForRequester } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
7
|
export { countActiveDescendantRuns, countPendingDescendantRuns, countPendingDescendantRunsExcludingRun, isSubagentSessionRunActive, listSubagentRunsForRequester, replaceSubagentRunAfterSteer, resolveRequesterForChildSession, shouldIgnorePostCompletionAnnounceForSession };
|
package/dist/{subagent-registry-runtime-DQeHzv-u.js → subagent-registry-runtime-Z0fdsGSq.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { $ as countPendingDescendantRuns, Q as countActiveDescendantRuns, at as shouldIgnorePostCompletionAnnounceForSession, et as countPendingDescendantRunsExcludingRun, it as resolveRequesterForChildSession, nt as listSubagentRunsForRequester, rt as replaceSubagentRunAfterSteer, tt as isSubagentSessionRunActive } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { $ as countPendingDescendantRuns, Q as countActiveDescendantRuns, at as shouldIgnorePostCompletionAnnounceForSession, et as countPendingDescendantRunsExcludingRun, it as resolveRequesterForChildSession, nt as listSubagentRunsForRequester, rt as replaceSubagentRunAfterSteer, tt as isSubagentSessionRunActive } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
11
|
export { countActiveDescendantRuns, countPendingDescendantRuns, countPendingDescendantRunsExcludingRun, isSubagentSessionRunActive, listSubagentRunsForRequester, replaceSubagentRunAfterSteer, resolveRequesterForChildSession, shouldIgnorePostCompletionAnnounceForSession };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as resolveConfigPath } from "./paths-
|
|
1
|
+
import { r as resolveConfigPath } from "./paths-CNIc83Pn.js";
|
|
2
2
|
import os from "node:os";
|
|
3
3
|
import path from "node:path";
|
|
4
|
-
import
|
|
4
|
+
import syncFs from "node:fs";
|
|
5
5
|
import chalk, { Chalk } from "chalk";
|
|
6
6
|
import { Logger } from "tslog";
|
|
7
7
|
import JSON5 from "json5";
|
|
@@ -49,15 +49,15 @@ function getCommandPathInternal(argv, depth, opts) {
|
|
|
49
49
|
//#endregion
|
|
50
50
|
//#region src/infra/tmp-openclaw-dir.ts
|
|
51
51
|
const POSIX_OPENCLAW_TMP_DIR = "/tmp/openclaw";
|
|
52
|
-
const TMP_DIR_ACCESS_MODE =
|
|
52
|
+
const TMP_DIR_ACCESS_MODE = syncFs.constants.W_OK | syncFs.constants.X_OK;
|
|
53
53
|
function isNodeErrorWithCode(err, code) {
|
|
54
54
|
return typeof err === "object" && err !== null && "code" in err && err.code === code;
|
|
55
55
|
}
|
|
56
56
|
function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
57
|
-
const accessSync = options.accessSync ??
|
|
58
|
-
const chmodSync = options.chmodSync ??
|
|
59
|
-
const lstatSync = options.lstatSync ??
|
|
60
|
-
const mkdirSync = options.mkdirSync ??
|
|
57
|
+
const accessSync = options.accessSync ?? syncFs.accessSync;
|
|
58
|
+
const chmodSync = options.chmodSync ?? syncFs.chmodSync;
|
|
59
|
+
const lstatSync = options.lstatSync ?? syncFs.lstatSync;
|
|
60
|
+
const mkdirSync = options.mkdirSync ?? syncFs.mkdirSync;
|
|
61
61
|
const warn = options.warn ?? ((message) => console.warn(message));
|
|
62
62
|
const getuid = options.getuid ?? (() => {
|
|
63
63
|
try {
|
|
@@ -149,8 +149,8 @@ function resolvePreferredOpenClawTmpDir(options = {}) {
|
|
|
149
149
|
function readLoggingConfig() {
|
|
150
150
|
const configPath = resolveConfigPath();
|
|
151
151
|
try {
|
|
152
|
-
if (!
|
|
153
|
-
const raw =
|
|
152
|
+
if (!syncFs.existsSync(configPath)) return;
|
|
153
|
+
const raw = syncFs.readFileSync(configPath, "utf-8");
|
|
154
154
|
const logging = JSON5.parse(raw)?.logging;
|
|
155
155
|
if (!logging || typeof logging !== "object" || Array.isArray(logging)) return;
|
|
156
156
|
return logging;
|
|
@@ -332,7 +332,7 @@ function buildLogger(settings) {
|
|
|
332
332
|
for (const transport of externalTransports) attachExternalTransport(logger, transport);
|
|
333
333
|
return logger;
|
|
334
334
|
}
|
|
335
|
-
|
|
335
|
+
syncFs.mkdirSync(path.dirname(settings.file), { recursive: true });
|
|
336
336
|
if (isRollingPath(settings.file)) pruneOldRollingLogs(path.dirname(settings.file));
|
|
337
337
|
let currentFileBytes = getCurrentLogFileBytes(settings.file);
|
|
338
338
|
let warnedAboutSizeCap = false;
|
|
@@ -371,14 +371,14 @@ function resolveMaxLogFileBytes(raw) {
|
|
|
371
371
|
}
|
|
372
372
|
function getCurrentLogFileBytes(file) {
|
|
373
373
|
try {
|
|
374
|
-
return
|
|
374
|
+
return syncFs.statSync(file).size;
|
|
375
375
|
} catch {
|
|
376
376
|
return 0;
|
|
377
377
|
}
|
|
378
378
|
}
|
|
379
379
|
function appendLogLine(file, line) {
|
|
380
380
|
try {
|
|
381
|
-
|
|
381
|
+
syncFs.appendFileSync(file, line, { encoding: "utf8" });
|
|
382
382
|
return true;
|
|
383
383
|
} catch {
|
|
384
384
|
return false;
|
|
@@ -430,14 +430,14 @@ function isRollingPath(file) {
|
|
|
430
430
|
}
|
|
431
431
|
function pruneOldRollingLogs(dir) {
|
|
432
432
|
try {
|
|
433
|
-
const entries =
|
|
433
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
434
434
|
const cutoff = Date.now() - MAX_LOG_AGE_MS;
|
|
435
435
|
for (const entry of entries) {
|
|
436
436
|
if (!entry.isFile()) continue;
|
|
437
437
|
if (!entry.name.startsWith(`${LOG_PREFIX}-`) || !entry.name.endsWith(LOG_SUFFIX)) continue;
|
|
438
438
|
const fullPath = path.join(dir, entry.name);
|
|
439
439
|
try {
|
|
440
|
-
if (
|
|
440
|
+
if (syncFs.statSync(fullPath).mtimeMs < cutoff) syncFs.rmSync(fullPath, { force: true });
|
|
441
441
|
} catch {}
|
|
442
442
|
}
|
|
443
443
|
} catch {}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { R as resolveStorePath, fn as normalizeAgentId, ln as buildGroupHistoryKey, on as DEFAULT_MAIN_KEY, sn as buildAgentMainSessionKey } from "./query-expansion-C6UNkw7W.js";
|
|
2
2
|
import "./paths-CzCvxHkV.js";
|
|
3
3
|
import { B as shouldLogVerbose, C as sleep, K as getChildLogger, M as defaultRuntime, O as createSubsystemLogger, R as logVerbose, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-Cmh2bFJD.js";
|
|
4
|
-
import { $r as saveMediaBuffer, A as getReplyFromConfig, C as resolveMentionGating, Cn as resolveDefaultGroupPolicy, Cr as readWebSelfId, D as buildHistoryContextFromEntries, Dn as resolveChunkMode, Dr as webAuthExists, Dt as toLocationContext, E as shouldAckReactionForWhatsApp, Ei as resolveMessagePrefix, En as chunkMarkdownTextWithMode, Et as formatLocationText, G as buildMentionRegexes, Gn as registerUnhandledRejectionHandler, H as resolveInboundDebounceMs, K as normalizeMentionText, O as recordPendingHistoryEntryIfEnabled, On as resolveTextChunkLimit, Or as resolveChannelGroupPolicy, Qn as recordSessionMetaFromInbound, S as issuePairingChallenge, St as createDedupeCache, T as createReplyPrefixOptions, Ti as resolveIdentityNamePrefix, Tn as warnMissingProviderGroupPolicyFallbackOnce, Tt as parseActivationCommand, U as hasControlCommand, V as createInboundDebouncer, W as shouldComputeCommandAuthorized, Zn as loadSessionStore, _r as getWebAuthAgeMs, an as readStoreAllowFromForDmPolicy, b as dispatchReplyWithBufferedBlockDispatcher, bn as resolveMarkdownTableMode, bt as computeBackoff, cn as resolvePinnedMainDmOwnerFromAllowlist, dn as deriveLastRoutePolicy, er as updateLastRoute, f as setActiveWebListener, fn as resolveAgentRoute, gr as WA_WEB_AUTH_DIR, hn as formatDurationPrecise, hr as resolveWhatsAppMediaMaxBytes, jr as resolveGroupSessionKey, k as formatInboundEnvelope, kn as loadWebMedia, kr as resolveChannelGroupRequireMention, ln as upsertChannelPairingRequest, mn as enqueueSystemEvent, mr as resolveWhatsAppAccount, on as resolveDmGroupAccessWithCommandGate, p as resolveInboundSessionEnvelopeContext, pi as loadConfig, pn as resolveInboundLastRouteSessionKey, qn as getAgentScopedMediaLocalRoots, sn as resolveDmGroupAccessWithLists, un as buildAgentSessionKey, vi as formatCliCommand, vn as convertMarkdownTables, vr as logWebSelfId, wn as resolveOpenProviderRuntimeGroupPolicy, wt as normalizeGroupActivation, xr as pickWebChannel, xt as sleepWithAbort, y as createConnectedChannelStatusPatch, yn as recordChannelActivity, z as finalizeInboundContext } from "./model-selection-
|
|
4
|
+
import { $r as saveMediaBuffer, A as getReplyFromConfig, C as resolveMentionGating, Cn as resolveDefaultGroupPolicy, Cr as readWebSelfId, D as buildHistoryContextFromEntries, Dn as resolveChunkMode, Dr as webAuthExists, Dt as toLocationContext, E as shouldAckReactionForWhatsApp, Ei as resolveMessagePrefix, En as chunkMarkdownTextWithMode, Et as formatLocationText, G as buildMentionRegexes, Gn as registerUnhandledRejectionHandler, H as resolveInboundDebounceMs, K as normalizeMentionText, O as recordPendingHistoryEntryIfEnabled, On as resolveTextChunkLimit, Or as resolveChannelGroupPolicy, Qn as recordSessionMetaFromInbound, S as issuePairingChallenge, St as createDedupeCache, T as createReplyPrefixOptions, Ti as resolveIdentityNamePrefix, Tn as warnMissingProviderGroupPolicyFallbackOnce, Tt as parseActivationCommand, U as hasControlCommand, V as createInboundDebouncer, W as shouldComputeCommandAuthorized, Zn as loadSessionStore, _r as getWebAuthAgeMs, an as readStoreAllowFromForDmPolicy, b as dispatchReplyWithBufferedBlockDispatcher, bn as resolveMarkdownTableMode, bt as computeBackoff, cn as resolvePinnedMainDmOwnerFromAllowlist, dn as deriveLastRoutePolicy, er as updateLastRoute, f as setActiveWebListener, fn as resolveAgentRoute, gr as WA_WEB_AUTH_DIR, hn as formatDurationPrecise, hr as resolveWhatsAppMediaMaxBytes, jr as resolveGroupSessionKey, k as formatInboundEnvelope, kn as loadWebMedia, kr as resolveChannelGroupRequireMention, ln as upsertChannelPairingRequest, mn as enqueueSystemEvent, mr as resolveWhatsAppAccount, on as resolveDmGroupAccessWithCommandGate, p as resolveInboundSessionEnvelopeContext, pi as loadConfig, pn as resolveInboundLastRouteSessionKey, qn as getAgentScopedMediaLocalRoots, sn as resolveDmGroupAccessWithLists, un as buildAgentSessionKey, vi as formatCliCommand, vn as convertMarkdownTables, vr as logWebSelfId, wn as resolveOpenProviderRuntimeGroupPolicy, wt as normalizeGroupActivation, xr as pickWebChannel, xt as sleepWithAbort, y as createConnectedChannelStatusPatch, yn as recordChannelActivity, z as finalizeInboundContext } from "./model-selection-BQm6_iuT.js";
|
|
5
5
|
import "./github-copilot-token-xzmo0MIc.js";
|
|
6
6
|
import "./fetch-sqCl8SIJ.js";
|
|
7
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session
|
|
8
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
9
|
-
import { t as loginWeb } from "./login-
|
|
7
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-CbQ43pUq.js";
|
|
8
|
+
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-DGQUY-kp.js";
|
|
9
|
+
import { t as loginWeb } from "./login-xsvrgJJt.js";
|
|
10
10
|
import { randomUUID } from "node:crypto";
|
|
11
11
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
|
|
12
12
|
const DEFAULT_RECONNECT_POLICY = {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { R as resolveStorePath } from "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import { a as defaultRuntime, b as getChildLogger, d as logVerbose, m as shouldLogVerbose, t as createSubsystemLogger } from "./subsystem-
|
|
4
|
-
import { F as DEFAULT_MAIN_KEY, I as buildAgentMainSessionKey, R as buildGroupHistoryKey, V as normalizeAgentId } from "./workspace-
|
|
5
|
-
import { C as sleep, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-
|
|
6
|
-
import { A as formatInboundEnvelope, An as resolveChunkMode, At as toLocationContext, B as finalizeInboundContext, C as issuePairingChallenge, Ci as formatCliCommand, Cn as resolveMarkdownTableMode, Cr as logWebSelfId, Ct as createDedupeCache, D as shouldAckReactionForWhatsApp, Dn as resolveOpenProviderRuntimeGroupPolicy, Dt as normalizeGroupActivation, E as createReplyPrefixOptions, En as resolveDefaultGroupPolicy, Er as pickWebChannel, Et as resolveMessagePrefix, G as shouldComputeCommandAuthorized, H as createInboundDebouncer, Ir as resolveGroupSessionKey, Jn as registerUnhandledRejectionHandler, K as buildMentionRegexes, Mn as loadWebMedia, Mr as webAuthExists, Nr as resolveChannelGroupPolicy, O as buildHistoryContextFromEntries, On as warnMissingProviderGroupPolicyFallbackOnce, Or as readWebSelfId, Ot as parseActivationCommand, Pr as resolveChannelGroupRequireMention, Sn as recordChannelActivity, Sr as getWebAuthAgeMs, St as sleepWithAbort, Tt as resolveIdentityNamePrefix, U as resolveInboundDebounceMs, W as hasControlCommand, Xn as getAgentScopedMediaLocalRoots, _n as enqueueSystemEvent, b as createConnectedChannelStatusPatch, br as resolveWhatsAppMediaMaxBytes, cn as readStoreAllowFromForDmPolicy, dn as resolvePinnedMainDmOwnerFromAllowlist, er as loadSessionStore, fn as upsertChannelPairingRequest, gn as resolveInboundLastRouteSessionKey, hn as resolveAgentRoute, ii as saveMediaBuffer, j as getReplyFromConfig, jn as resolveTextChunkLimit, k as recordPendingHistoryEntryIfEnabled, kn as chunkMarkdownTextWithMode, kt as formatLocationText, ln as resolveDmGroupAccessWithCommandGate, m as resolveInboundSessionEnvelopeContext, mn as deriveLastRoutePolicy, nr as updateLastRoute, p as setActiveWebListener, pn as buildAgentSessionKey, q as normalizeMentionText, tr as recordSessionMetaFromInbound, un as resolveDmGroupAccessWithLists, vi as loadConfig, vn as formatDurationPrecise, w as resolveMentionGating, x as dispatchReplyWithBufferedBlockDispatcher, xn as convertMarkdownTables, xr as WA_WEB_AUTH_DIR, xt as computeBackoff, yr as resolveWhatsAppAccount } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import { R as resolveStorePath } from "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import { a as defaultRuntime, b as getChildLogger, d as logVerbose, m as shouldLogVerbose, t as createSubsystemLogger } from "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import { F as DEFAULT_MAIN_KEY, I as buildAgentMainSessionKey, R as buildGroupHistoryKey, V as normalizeAgentId } from "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import { C as sleep, T as toWhatsappJid, h as normalizeE164, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164 } from "./logger-DCBlX1uz.js";
|
|
6
|
+
import { A as formatInboundEnvelope, An as resolveChunkMode, At as toLocationContext, B as finalizeInboundContext, C as issuePairingChallenge, Ci as formatCliCommand, Cn as resolveMarkdownTableMode, Cr as logWebSelfId, Ct as createDedupeCache, D as shouldAckReactionForWhatsApp, Dn as resolveOpenProviderRuntimeGroupPolicy, Dt as normalizeGroupActivation, E as createReplyPrefixOptions, En as resolveDefaultGroupPolicy, Er as pickWebChannel, Et as resolveMessagePrefix, G as shouldComputeCommandAuthorized, H as createInboundDebouncer, Ir as resolveGroupSessionKey, Jn as registerUnhandledRejectionHandler, K as buildMentionRegexes, Mn as loadWebMedia, Mr as webAuthExists, Nr as resolveChannelGroupPolicy, O as buildHistoryContextFromEntries, On as warnMissingProviderGroupPolicyFallbackOnce, Or as readWebSelfId, Ot as parseActivationCommand, Pr as resolveChannelGroupRequireMention, Sn as recordChannelActivity, Sr as getWebAuthAgeMs, St as sleepWithAbort, Tt as resolveIdentityNamePrefix, U as resolveInboundDebounceMs, W as hasControlCommand, Xn as getAgentScopedMediaLocalRoots, _n as enqueueSystemEvent, b as createConnectedChannelStatusPatch, br as resolveWhatsAppMediaMaxBytes, cn as readStoreAllowFromForDmPolicy, dn as resolvePinnedMainDmOwnerFromAllowlist, er as loadSessionStore, fn as upsertChannelPairingRequest, gn as resolveInboundLastRouteSessionKey, hn as resolveAgentRoute, ii as saveMediaBuffer, j as getReplyFromConfig, jn as resolveTextChunkLimit, k as recordPendingHistoryEntryIfEnabled, kn as chunkMarkdownTextWithMode, kt as formatLocationText, ln as resolveDmGroupAccessWithCommandGate, m as resolveInboundSessionEnvelopeContext, mn as deriveLastRoutePolicy, nr as updateLastRoute, p as setActiveWebListener, pn as buildAgentSessionKey, q as normalizeMentionText, tr as recordSessionMetaFromInbound, un as resolveDmGroupAccessWithLists, vi as loadConfig, vn as formatDurationPrecise, w as resolveMentionGating, x as dispatchReplyWithBufferedBlockDispatcher, xn as convertMarkdownTables, xr as WA_WEB_AUTH_DIR, xt as computeBackoff, yr as resolveWhatsAppAccount } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
11
|
-
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-
|
|
12
|
-
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-
|
|
13
|
-
import { t as loginWeb } from "./login-
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
import { i as waitForWaConnection, n as formatError, r as getStatusCode, t as createWaSocket } from "./session-kt-bqE_z.js";
|
|
12
|
+
import { i as markdownToWhatsApp, r as sendReactionWhatsApp, t as sendMessageWhatsApp } from "./send-CXnKWzde.js";
|
|
13
|
+
import { t as loginWeb } from "./login-CKmmxErc.js";
|
|
14
14
|
import { randomUUID } from "node:crypto";
|
|
15
15
|
import { DisconnectReason, downloadMediaMessage, extractMessageContent, getContentType, isJidGroup, normalizeMessageContent } from "@whiskeysockets/baileys";
|
|
16
16
|
const DEFAULT_RECONNECT_POLICY = {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import "./query-expansion-
|
|
2
|
-
import "./paths-
|
|
3
|
-
import "./subsystem-
|
|
4
|
-
import "./workspace-
|
|
5
|
-
import "./logger-
|
|
6
|
-
import { Gt as readReactionParams, Ht as ToolAuthorizationError, Kt as readStringParam, Ut as createActionGate, Wt as jsonResult, vr as resolveWhatsAppOutboundTarget, yr as resolveWhatsAppAccount } from "./model-selection-
|
|
7
|
-
import "./github-copilot-token-
|
|
1
|
+
import "./query-expansion-DXwSmE_K.js";
|
|
2
|
+
import "./paths-CNIc83Pn.js";
|
|
3
|
+
import "./subsystem-Cr1MiLhx.js";
|
|
4
|
+
import "./workspace-Bi8vpJN0.js";
|
|
5
|
+
import "./logger-DCBlX1uz.js";
|
|
6
|
+
import { Gt as readReactionParams, Ht as ToolAuthorizationError, Kt as readStringParam, Ut as createActionGate, Wt as jsonResult, vr as resolveWhatsAppOutboundTarget, yr as resolveWhatsAppAccount } from "./model-selection-CNRMBWfR.js";
|
|
7
|
+
import "./github-copilot-token-BeFx3MLn.js";
|
|
8
8
|
import "./boolean-C7Ct_klp.js";
|
|
9
|
-
import "./fetch-
|
|
10
|
-
import "./frontmatter-
|
|
11
|
-
import { r as sendReactionWhatsApp } from "./send-
|
|
9
|
+
import "./fetch-BdTTF2z-.js";
|
|
10
|
+
import "./frontmatter-DZlWsaUx.js";
|
|
11
|
+
import { r as sendReactionWhatsApp } from "./send-CXnKWzde.js";
|
|
12
12
|
//#region src/agents/tools/whatsapp-target-auth.ts
|
|
13
13
|
function resolveAuthorizedWhatsAppOutboundTarget(params) {
|
|
14
14
|
const account = resolveWhatsAppAccount({
|