activeclaw 2026.2.10 → 2026.2.11
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-xJh3pJei.js → accounts-C2elk6PC.js} +9 -9
- package/dist/{acp-cli-D_40K9Gr.js → acp-cli-CVFTdsQY.js} +15 -15
- package/dist/{agent-FTQXFOHA.js → agent-22-R4bNS.js} +2 -2
- package/dist/{agent-DkZpDQJb.js → agent-Bz1r5O8q.js} +12 -12
- package/dist/{agent-scope-CPiO6Aw7.js → agent-scope-CGmuusG9.js} +12 -12
- package/dist/{archive-BixfOVSf.js → archive-CXhvR9nU.js} +9 -9
- package/dist/{audit-CGlFTiEB.js → audit-C4wLaF0D.js} +23 -23
- package/dist/{auth-D_PS9etv.js → auth-BvIPpm7G.js} +1 -1
- package/dist/{auth-health-BGd7tGq0.js → auth-health-BFKUoCwJ.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +1 -1
- package/dist/{call-Ccyb4kQR.js → call-Bek1xlgk.js} +11 -11
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-options-DwTe763m.js → channel-options-3mdYN0C_.js} +1 -1
- package/dist/{channel-options-DwA7SVbf.js → channel-options-DJ0b1m7B.js} +7 -7
- package/dist/{channel-selection-La1tQIxQ.js → channel-selection-B9b7Kuit.js} +2 -2
- package/dist/{channels-cli-ENsD3dK4.js → channels-cli-BFznbGOs.js} +48 -48
- package/dist/{channels-cli-CsLF44Xf.js → channels-cli-CYbK2Dku.js} +4 -4
- package/dist/{channels-status-issues-DmIFbKRs.js → channels-status-issues-DQkRaZts.js} +1 -1
- package/dist/{chrome-BN9o1yns.js → chrome-CF16STk9.js} +7 -7
- package/dist/{chrome-XHJ9uNgs.js → chrome-Dm-EgOjJ.js} +5 -5
- package/dist/{clack-prompter-IfLZ3uDJ.js → clack-prompter-BCiBkJVr.js} +4 -4
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-CBL6jLH_.js → cli-Cl3PdJei.js} +1 -1
- package/dist/{cli-Dxi8xMCj.js → cli-DJbWJ9aB.js} +36 -36
- package/dist/{client-Cam-Cwyu.js → client-6xKrRC-1.js} +2 -2
- package/dist/{command-options-_12DJE1t.js → command-options-BTAzyqqb.js} +1 -1
- package/dist/{completion-cli-DZlpcsto.js → completion-cli-DOec3E2Z.js} +40 -40
- package/dist/{completion-cli-DeeDoOCJ.js → completion-cli-DrJGfJGl.js} +1 -1
- package/dist/{config-DiNnQcwe.js → config--NUdpACy.js} +10 -10
- package/dist/{config-guard-CmgZJTGV.js → config-guard-4kCO_rnQ.js} +13 -13
- package/dist/{configure-DB_qIT8D.js → configure-B69emwZv.js} +4 -4
- package/dist/{configure-89VjxHbW.js → configure-sMhpLzFf.js} +18 -18
- package/dist/{control-service-CAXvnE0u.js → control-service-Db_1V-KY.js} +5 -5
- package/dist/{cron-cli-DKp-JxRS.js → cron-cli-Cum2324v.js} +16 -16
- package/dist/{daemon-cli-DfLos4-7.js → daemon-cli-CTC2CHci.js} +2 -2
- package/dist/{daemon-cli-Ctp4o7qg.js → daemon-cli-q7nkEF5-.js} +16 -16
- package/dist/{daemon-runtime-CVte5WIX.js → daemon-runtime-UsK-tOty.js} +11 -11
- package/dist/{deliver-BXVnDeja.js → deliver-CPy8jYj9.js} +1 -1
- package/dist/{deliver-B-MU3Szq.js → deliver-T9d44OpZ.js} +10 -10
- package/dist/{deps-BoJcAXaY.js → deps-Bv1kLtwo.js} +1 -1
- package/dist/{deps-CaDXl7AZ.js → deps-DFQdAWQc.js} +2 -2
- package/dist/{devices-cli-DQJuKnqz.js → devices-cli-ZpjlfK-e.js} +13 -13
- package/dist/{directory-cli-BqVg6pQq.js → directory-cli-B14TUSJA.js} +14 -14
- package/dist/{dispatcher-Rf7W2dBd.js → dispatcher-3ElQWGVI.js} +4 -4
- package/dist/{dns-cli-BXAWgd6S.js → dns-cli-CU-xfhTN.js} +11 -11
- package/dist/{docs-cli-NONeCqqB.js → docs-cli-Cj3L5oqB.js} +6 -6
- package/dist/{doctor-Bytc7n21.js → doctor-BJirShBi.js} +3 -3
- package/dist/{doctor-BkGTzeZj.js → doctor-BV1kvbMm.js} +43 -43
- package/dist/entry.js +1 -1
- package/dist/{env-DqiOM57_.js → env-BxRc6wWv.js} +1 -1
- package/dist/{exec-BSMwiIMp.js → exec-Cv_Ofd1m.js} +1 -1
- package/dist/{exec-approvals-cli-Bn-YY4Vi.js → exec-approvals-cli-DEzz9Iai.js} +23 -23
- package/dist/extensionAPI.js +12 -13
- package/dist/{gateway-cli-DRJQ8rTD.js → gateway-cli-B_xDUDy2.js} +135 -135
- package/dist/{gateway-cli-KkK4A0D8.js → gateway-cli-D1EdIq8I.js} +13 -13
- package/dist/{gateway-rpc-sLO5Psk7.js → gateway-rpc-BoL2vinh.js} +3 -3
- package/dist/{github-copilot-auth-BtMu5l0m.js → github-copilot-auth-CZxurvdz.js} +1 -1
- package/dist/{github-copilot-auth-BJOEuPdX.js → github-copilot-auth-Omqrto0J.js} +8 -8
- package/dist/{gmail-setup-utils-CTDfMXTW.js → gmail-setup-utils-BXQKsLtI.js} +3 -3
- package/dist/{health-format-D6ogrdc9.js → health-format-DrGFg8bx.js} +1 -1
- package/dist/{health-format-I_hcV0x3.js → health-format-Dy1caGsq.js} +14 -14
- package/dist/{help-format-rtF4QeRM.js → help-format-DAj7l5uV.js} +1 -1
- package/dist/{hooks-cli-BbeYZaya.js → hooks-cli-Bhf5VRp1.js} +2 -2
- package/dist/{hooks-cli-rwazn-4_.js → hooks-cli-ptEf6TIM.js} +61 -61
- package/dist/{hooks-status-B3y3_Ypf.js → hooks-status-DNQJSa4B.js} +5 -5
- package/dist/{image-BVLNmAgW.js → image-Dnnxt82I.js} +1 -1
- package/dist/{image-DxmrpIUn.js → image-fUwR7slg.js} +10 -10
- package/dist/index.js +88 -88
- package/dist/{installs-C9WW834H.js → installs-CRSjQxbR.js} +21 -21
- package/dist/{links-D6CUlrWZ.js → links-C591fM9M.js} +1 -1
- package/dist/llm-slug-generator.js +1 -1
- package/dist/{loader-CZRfriRQ.js → loader-wXwp4rZJ.js} +2 -3
- package/dist/{logging-BhXRnaAc.js → logging-MMRGFxGI.js} +1 -1
- package/dist/{login-qr-DXiuhBc8.js → login-qr-wM8BnKJh.js} +5 -5
- package/dist/{logs-cli-CoWZ_Lzs.js → logs-cli-CmfINsOj.js} +14 -14
- package/dist/{manager-DOqexxfO.js → manager-BbnHek5T.js} +15 -15
- package/dist/{manifest-registry-C0ApY9d8.js → manifest-registry-3It8Z8yN.js} +1 -1
- package/dist/{message-channel-DIvXZ2w4.js → message-channel-Cu61-7H6.js} +1 -1
- package/dist/{model-selection-lT7g9ysC.js → model-selection-BK7DuyH8.js} +4 -4
- package/dist/{models-cli-CwqJkYET.js → models-cli-C3uGdOrd.js} +2 -2
- package/dist/{models-cli-C0_ekrlc.js → models-cli-CUIVPgXE.js} +45 -45
- package/dist/{node-cli-SEsdX8-y.js → node-cli-CdYAsuQQ.js} +29 -29
- package/dist/{node-service-OjXvN5Ee.js → node-service-CM5vkdIo.js} +1 -1
- package/dist/{nodes-cli-jihJL52P.js → nodes-cli-BaVMTAPc.js} +18 -18
- package/dist/{nodes-screen-A8K8mlHX.js → nodes-screen-lykd2cny.js} +2 -2
- package/dist/{note-B5QlVszL.js → note-5WqioBRA.js} +2 -2
- package/dist/{onboard-channels-DNlBXz4a.js → onboard-channels-CXhnVy4E.js} +7 -7
- package/dist/{onboard-channels-DYUwMESI.js → onboard-channels-DxXvp8og.js} +1 -1
- package/dist/{onboard-skills-DwIf2ayU.js → onboard-skills-CBxsRGyf.js} +3 -3
- package/dist/{onboard-skills-Djn43Fx2.js → onboard-skills-DQwOQ6Ry.js} +12 -12
- package/dist/{onboarding-DzjDuLJ0.js → onboarding-Du_7qEng.js} +37 -37
- package/dist/{openclaw-root-CBSq79BF.js → openclaw-root-JLDMp6ux.js} +2 -2
- package/dist/{pairing-cli-XrcX3iD7.js → pairing-cli-Cng1KFWw.js} +14 -14
- package/dist/{pairing-labels-K_6MMQA_.js → pairing-labels-Ciu3Zoxj.js} +1 -1
- package/dist/{pairing-store-C6EhvkMA.js → pairing-store-c-QQ2u8p.js} +2 -2
- package/dist/{path-env-CvL55Ntz.js → path-env-BgLvMbz_.js} +1 -1
- package/dist/{pi-embedded-BtNK8X-L.js → pi-embedded-CgPTEqlB.js} +2 -3
- package/dist/{pi-embedded-helpers-WA1Uq3tV.js → pi-embedded-helpers-DYH6OWft.js} +7 -7
- package/dist/{pi-embedded-helpers-Dx2dOx7N.js → pi-embedded-helpers-y1_Se0yq.js} +4 -4
- package/dist/{pi-tools.policy-CCQVTuZw.js → pi-tools.policy-akYsGFiA.js} +4 -4
- package/dist/{plugin-auto-enable-BvBr0yMV.js → plugin-auto-enable-AOSOJ-v1.js} +5 -5
- package/dist/{plugins-5W5E71Ut.js → plugins-CNaHNND_.js} +4 -4
- package/dist/{plugins-cli-mSMFtuzL.js → plugins-cli-8G-hQPCu.js} +2 -2
- package/dist/{plugins-cli-l1TkWMZx.js → plugins-cli-CDiocaDE.js} +42 -42
- package/dist/{program-CaHfkQ0p.js → program-0Cj9YxRN.js} +16 -16
- package/dist/{progress-COZ_ycun.js → progress-DIQJt9Va.js} +1 -1
- package/dist/{prompt-style-CghhrkxS.js → prompt-style-CjQRlDx4.js} +1 -1
- package/dist/{pw-ai-BtArcIEo.js → pw-ai-COWYvUfG.js} +7 -7
- package/dist/{pw-ai-DMeydD_d.js → pw-ai-CsvaObGM.js} +1 -1
- package/dist/{qmd-manager-2PsT4eTr.js → qmd-manager-C02E8ixK.js} +19 -19
- package/dist/{register.subclis-C0SIOLju.js → register.subclis-DUkirdHn.js} +10 -10
- package/dist/{reply-swCg9iXH.js → reply--b7BsXGP.js} +129 -130
- package/dist/{routes-BqZyywjQ.js → routes-DUkEKAc1.js} +19 -19
- package/dist/{rpc-D_Pp8HB_.js → rpc-CuMtxrRT.js} +3 -3
- package/dist/{run-main-D9PO9-U8.js → run-main-XZcPA23b.js} +18 -18
- package/dist/{sandbox-DxAKZfZd.js → sandbox-DqUO2K83.js} +26 -26
- package/dist/{sandbox-cli-149xhJPJ.js → sandbox-cli-CJqRM4V6.js} +18 -18
- package/dist/{security-cli-BclMtAZ6.js → security-cli-DW3lCz-o.js} +33 -33
- package/dist/{server-context-DT3SRl5J.js → server-context-8Qt35QdF.js} +5 -5
- package/dist/{server-node-events-BbWvPZe5.js → server-node-events-BzrEnKLX.js} +3 -3
- package/dist/{server-node-events-CUQHYPok.js → server-node-events-CHWXfb_T.js} +39 -39
- package/dist/{service-DPsnpYzk.js → service-Cd4BxKuo.js} +16 -16
- package/dist/{service-audit-DWlZlYl6.js → service-audit-CCFxuvKs.js} +13 -13
- package/dist/{shared-DQO8Xdjp.js → shared-ILguacOr.js} +2 -2
- package/dist/{shared-DvAp_MsR.js → shared-gOyV38rM.js} +2 -2
- package/dist/{skill-scanner-zYmZ2Coy.js → skill-scanner-DrVEHfC6.js} +5 -5
- package/dist/{skills-pqbmJf1e.js → skills-ccAgQ3Ad.js} +6 -6
- package/dist/{skills-cli-3PxJU4R0.js → skills-cli-DQilTG3n.js} +12 -12
- package/dist/{skills-status-d-tVLIaC.js → skills-status-BosMnzIs.js} +3 -3
- package/dist/{sqlite-CDfAET9Y.js → sqlite-Btrgi7-j.js} +12 -12
- package/dist/{status-DADQEBbg.js → status-BByCntWS.js} +1 -1
- package/dist/{status-DJYrqIJa.js → status-Dt7RE_Yy.js} +4 -4
- package/dist/{status-BoK_Exgh.js → status-zfL4Yej7.js} +6 -6
- package/dist/{subsystem-BbfPHMjH.js → subsystem-Bh1Y_6Uv.js} +2 -2
- package/dist/{system-cli-JNECg6i0.js → system-cli-DwuUkdkH.js} +14 -14
- package/dist/{systemd-Dd6y2wnN.js → systemd-D6wTPnHi.js} +7 -7
- package/dist/{systemd-linger-CblmG_UI.js → systemd-linger-BxjTrgoH.js} +2 -2
- package/dist/{table-DTm1PXe-.js → table-DEnmtvl5.js} +2 -2
- package/dist/{tailscale-WFi900xf.js → tailscale-Cu-2HNvU.js} +2 -2
- package/dist/{tool-display-DwOJbBjC.js → tool-display-DskiU8Kt.js} +1 -1
- package/dist/{tui-CJPKiYWz.js → tui-Bc7XUQGP.js} +9 -9
- package/dist/{tui-cli-DuNJ1OqY.js → tui-cli-BGYh0UL0.js} +23 -23
- package/dist/{tui-formatters-C-dAVvRi.js → tui-formatters-CA85v4U2.js} +4 -4
- package/dist/{update-DymgbepH.js → update-JB16aPIY.js} +5 -5
- package/dist/{update-cli-B-3XbteQ.js → update-cli-DDXp_N9B.js} +8 -8
- package/dist/{update-cli-AcMtIZbG.js → update-cli-wWKDS3cm.js} +68 -68
- package/dist/{update-runner-B7twibOm.js → update-runner-ChTf6O6p.js} +3 -3
- package/dist/{update-runner-BiHI3sto.js → update-runner-CmE6cHdn.js} +28 -28
- package/dist/{utils-l-o5S4c-.js → utils-es4ygvQ-.js} +1 -1
- package/dist/{webhooks-cli-DjdfcB16.js → webhooks-cli-BmKSiQQC.js} +11 -11
- package/dist/{widearea-dns-mquEd9kr.js → widearea-dns-2ah0bkAj.js} +1 -1
- package/dist/{ws-log-B2H596h5.js → ws-log-D7MkvKhg.js} +1 -1
- package/package.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { m as resolveOAuthDir } from "./paths-DVBShlw6.js";
|
|
2
|
-
import { D as info, P as success, c as defaultRuntime, z as getChildLogger } from "./subsystem-
|
|
3
|
-
import { b as resolveUserPath, m as jidToE164 } from "./utils-
|
|
2
|
+
import { D as info, P as success, c as defaultRuntime, z as getChildLogger } from "./subsystem-Bh1Y_6Uv.js";
|
|
3
|
+
import { b as resolveUserPath, m as jidToE164 } from "./utils-es4ygvQ-.js";
|
|
4
4
|
import { c as normalizeAccountId, t as DEFAULT_ACCOUNT_ID } from "./session-key-BWxPj0z_.js";
|
|
5
5
|
import fs from "node:fs";
|
|
6
6
|
import path from "node:path";
|
|
7
|
-
import
|
|
7
|
+
import fs$1 from "node:fs/promises";
|
|
8
8
|
|
|
9
9
|
//#region src/web/auth-store.ts
|
|
10
10
|
function resolveDefaultWebAuthDir() {
|
|
@@ -57,14 +57,14 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
57
57
|
maybeRestoreCredsFromBackup(resolvedAuthDir);
|
|
58
58
|
const credsPath = resolveWebCredsPath(resolvedAuthDir);
|
|
59
59
|
try {
|
|
60
|
-
await
|
|
60
|
+
await fs$1.access(resolvedAuthDir);
|
|
61
61
|
} catch {
|
|
62
62
|
return false;
|
|
63
63
|
}
|
|
64
64
|
try {
|
|
65
|
-
const stats = await
|
|
65
|
+
const stats = await fs$1.stat(credsPath);
|
|
66
66
|
if (!stats.isFile() || stats.size <= 1) return false;
|
|
67
|
-
const raw = await
|
|
67
|
+
const raw = await fs$1.readFile(credsPath, "utf-8");
|
|
68
68
|
JSON.parse(raw);
|
|
69
69
|
return true;
|
|
70
70
|
} catch {
|
|
@@ -72,7 +72,7 @@ async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
|
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
74
|
async function clearLegacyBaileysAuthState(authDir) {
|
|
75
|
-
const entries = await
|
|
75
|
+
const entries = await fs$1.readdir(authDir, { withFileTypes: true });
|
|
76
76
|
const shouldDelete = (name) => {
|
|
77
77
|
if (name === "oauth.json") return false;
|
|
78
78
|
if (name === "creds.json" || name === "creds.json.bak") return true;
|
|
@@ -82,7 +82,7 @@ async function clearLegacyBaileysAuthState(authDir) {
|
|
|
82
82
|
await Promise.all(entries.map(async (entry) => {
|
|
83
83
|
if (!entry.isFile()) return;
|
|
84
84
|
if (!shouldDelete(entry.name)) return;
|
|
85
|
-
await
|
|
85
|
+
await fs$1.rm(path.join(authDir, entry.name), { force: true });
|
|
86
86
|
}));
|
|
87
87
|
}
|
|
88
88
|
async function logoutWeb(params) {
|
|
@@ -93,7 +93,7 @@ async function logoutWeb(params) {
|
|
|
93
93
|
return false;
|
|
94
94
|
}
|
|
95
95
|
if (params.isLegacyAuthDir) await clearLegacyBaileysAuthState(resolvedAuthDir);
|
|
96
|
-
else await
|
|
96
|
+
else await fs$1.rm(resolvedAuthDir, {
|
|
97
97
|
recursive: true,
|
|
98
98
|
force: true
|
|
99
99
|
});
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import "./paths-DVBShlw6.js";
|
|
2
|
-
import { R as theme, c as defaultRuntime } from "./subsystem-
|
|
3
|
-
import "./utils-
|
|
4
|
-
import "./exec-
|
|
5
|
-
import "./agent-scope-
|
|
6
|
-
import "./model-selection-
|
|
2
|
+
import { R as theme, c as defaultRuntime } from "./subsystem-Bh1Y_6Uv.js";
|
|
3
|
+
import "./utils-es4ygvQ-.js";
|
|
4
|
+
import "./exec-Cv_Ofd1m.js";
|
|
5
|
+
import "./agent-scope-CGmuusG9.js";
|
|
6
|
+
import "./model-selection-BK7DuyH8.js";
|
|
7
7
|
import "./github-copilot-token-BW-SEg7E.js";
|
|
8
8
|
import "./boolean-BgXe2hyu.js";
|
|
9
|
-
import "./env-
|
|
10
|
-
import { M as VERSION, i as loadConfig } from "./config
|
|
11
|
-
import "./manifest-registry-
|
|
12
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
13
|
-
import { t as GatewayClient } from "./client-
|
|
14
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
15
|
-
import { t as formatDocsLink } from "./links-
|
|
16
|
-
import "./tailscale-
|
|
9
|
+
import "./env-BxRc6wWv.js";
|
|
10
|
+
import { M as VERSION, i as loadConfig } from "./config--NUdpACy.js";
|
|
11
|
+
import "./manifest-registry-3It8Z8yN.js";
|
|
12
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-Cu61-7H6.js";
|
|
13
|
+
import { t as GatewayClient } from "./client-6xKrRC-1.js";
|
|
14
|
+
import { t as buildGatewayConnectionDetails } from "./call-Bek1xlgk.js";
|
|
15
|
+
import { t as formatDocsLink } from "./links-C591fM9M.js";
|
|
16
|
+
import "./tailscale-Cu-2HNvU.js";
|
|
17
17
|
import { t as isMainModule } from "./is-main-WWuz28Ip.js";
|
|
18
|
-
import { t as ensureOpenClawCliOnPath } from "./path-env-
|
|
19
|
-
import { i as resolveGatewayAuth } from "./auth-
|
|
18
|
+
import { t as ensureOpenClawCliOnPath } from "./path-env-BgLvMbz_.js";
|
|
19
|
+
import { i as resolveGatewayAuth } from "./auth-BvIPpm7G.js";
|
|
20
20
|
import { fileURLToPath } from "node:url";
|
|
21
21
|
import { spawn } from "node:child_process";
|
|
22
22
|
import { randomUUID } from "node:crypto";
|
|
@@ -6,14 +6,14 @@ import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride,
|
|
|
6
6
|
import { i as loadConfig } from "./config-B00lvFac.js";
|
|
7
7
|
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-BlgPSDAh.js";
|
|
8
8
|
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-Db5BiELK.js";
|
|
9
|
-
import { An as runWithModelFallback, At as runEmbeddedPiAgent, En as resolveSessionDeliveryTarget, G as setCliSessionId, Ht as resolveAgentTimeoutMs, K as runCliAgent, Qt as applyModelOverrideToSessionEntry, Tn as resolveOutboundTarget, Ut as clearAgentRunContext, W as getCliSessionId, Wt as emitAgentEvent, X as getRemoteSkillEligibility, Xt as AGENT_LANE_NESTED, Y as resolveSendPolicy, Zt as loadModelCatalog, dt as clearSessionAuthProfileOverride, ft as applyVerboseOverride, gn as lookupContextTokens, lt as getSkillsSnapshotVersion, qt as registerAgentRunContext } from "./loader-
|
|
9
|
+
import { An as runWithModelFallback, At as runEmbeddedPiAgent, En as resolveSessionDeliveryTarget, G as setCliSessionId, Ht as resolveAgentTimeoutMs, K as runCliAgent, Qt as applyModelOverrideToSessionEntry, Tn as resolveOutboundTarget, Ut as clearAgentRunContext, W as getCliSessionId, Wt as emitAgentEvent, X as getRemoteSkillEligibility, Xt as AGENT_LANE_NESTED, Y as resolveSendPolicy, Zt as loadModelCatalog, dt as clearSessionAuthProfileOverride, ft as applyVerboseOverride, gn as lookupContextTokens, lt as getSkillsSnapshotVersion, qt as registerAgentRunContext } from "./loader-wXwp4rZJ.js";
|
|
10
10
|
import { n as resolveSessionFilePath, o as resolveStorePath } from "./paths-IivnSNkP.js";
|
|
11
11
|
import { B as normalizeThinkLevel, F as formatXHighModelHint, H as normalizeVerboseLevel, P as formatThinkingLevels, W as supportsXHighThinking } from "./pi-embedded-helpers-Bkpd4fTr.js";
|
|
12
12
|
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-hf-WKyWd.js";
|
|
13
13
|
import { A as resolveSessionResetType, D as evaluateSessionFreshness, E as resolveSessionKey, F as resolveExplicitAgentSessionKey, O as resolveChannelResetConfig, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, k as resolveSessionResetPolicy } from "./sandbox-Aks-9EcZ.js";
|
|
14
14
|
import { r as buildWorkspaceSkillSnapshot } from "./skills-D5UZZZSY.js";
|
|
15
15
|
import { l as deriveSessionTotalTokens, u as hasNonzeroUsage } from "./session-cost-usage-CcCEQNuc.js";
|
|
16
|
-
import { t as createDefaultDeps } from "./deps-
|
|
16
|
+
import { t as createDefaultDeps } from "./deps-Bv1kLtwo.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
|
|
19
19
|
//#region src/cli/outbound-send-deps.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { c as defaultRuntime, h as DEFAULT_CHAT_CHANNEL } from "./subsystem-
|
|
2
|
-
import { H as normalizeThinkLevel, I as formatThinkingLevels, K as supportsXHighThinking, L as formatXHighModelHint, W as normalizeVerboseLevel } from "./pi-embedded-helpers-
|
|
3
|
-
import { $t as getSkillsSnapshotVersion, Bt as getRemoteSkillEligibility, Cr as applyVerboseOverride, Gr as resolveAgentTimeoutMs, In as registerAgentRunContext, L as runWithModelFallback, M as resolveOutboundTarget, Mn as clearAgentRunContext, N as resolveSessionDeliveryTarget, Nn as emitAgentEvent, Or as loadModelCatalog, Sr as applyModelOverrideToSessionEntry, br as lookupContextTokens, i as runCliAgent, jn as AGENT_LANE_NESTED, l as runEmbeddedPiAgent, n as getCliSessionId, r as setCliSessionId, s as resolveSendPolicy, xr as clearSessionAuthProfileOverride } from "./reply
|
|
1
|
+
import { c as defaultRuntime, h as DEFAULT_CHAT_CHANNEL } from "./subsystem-Bh1Y_6Uv.js";
|
|
2
|
+
import { H as normalizeThinkLevel, I as formatThinkingLevels, K as supportsXHighThinking, L as formatXHighModelHint, W as normalizeVerboseLevel } from "./pi-embedded-helpers-DYH6OWft.js";
|
|
3
|
+
import { $t as getSkillsSnapshotVersion, Bt as getRemoteSkillEligibility, Cr as applyVerboseOverride, Gr as resolveAgentTimeoutMs, In as registerAgentRunContext, L as runWithModelFallback, M as resolveOutboundTarget, Mn as clearAgentRunContext, N as resolveSessionDeliveryTarget, Nn as emitAgentEvent, Or as loadModelCatalog, Sr as applyModelOverrideToSessionEntry, br as lookupContextTokens, i as runCliAgent, jn as AGENT_LANE_NESTED, l as runEmbeddedPiAgent, n as getCliSessionId, r as setCliSessionId, s as resolveSendPolicy, xr as clearSessionAuthProfileOverride } from "./reply--b7BsXGP.js";
|
|
4
4
|
import { d as resolveAgentIdFromSessionKey, l as normalizeAgentId, u as normalizeMainKey } from "./session-key-BWxPj0z_.js";
|
|
5
|
-
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-
|
|
6
|
-
import { Dt as DEFAULT_MODEL, Et as DEFAULT_CONTEXT_TOKENS, Ot as DEFAULT_PROVIDER, a as isCliProvider, d as resolveConfiguredModelRef, h as resolveThinkingDefault, ht as ensureAuthProfileStore, o as modelKey, t as buildAllowedModelSet } from "./model-selection-
|
|
5
|
+
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, x as ensureAgentWorkspace } from "./agent-scope-CGmuusG9.js";
|
|
6
|
+
import { Dt as DEFAULT_MODEL, Et as DEFAULT_CONTEXT_TOKENS, Ot as DEFAULT_PROVIDER, a as isCliProvider, d as resolveConfiguredModelRef, h as resolveThinkingDefault, ht as ensureAuthProfileStore, o as modelKey, t as buildAllowedModelSet } from "./model-selection-BK7DuyH8.js";
|
|
7
7
|
import { t as formatCliCommand } from "./command-format-ChfKqObn.js";
|
|
8
|
-
import { i as loadConfig } from "./config
|
|
9
|
-
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-
|
|
10
|
-
import { A as resolveSessionResetPolicy, D as resolveSessionKey, I as resolveExplicitAgentSessionKey, O as evaluateSessionFreshness, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, j as resolveSessionResetType, k as resolveChannelResetConfig } from "./sandbox-
|
|
11
|
-
import { r as buildWorkspaceSkillSnapshot } from "./skills-
|
|
12
|
-
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-
|
|
8
|
+
import { i as loadConfig } from "./config--NUdpACy.js";
|
|
9
|
+
import { r as normalizeChannelId, t as getChannelPlugin } from "./plugins-CNaHNND_.js";
|
|
10
|
+
import { A as resolveSessionResetPolicy, D as resolveSessionKey, I as resolveExplicitAgentSessionKey, O as evaluateSessionFreshness, T as normalizeAccountId, d as loadSessionStore, g as updateSessionStore, j as resolveSessionResetType, k as resolveChannelResetConfig } from "./sandbox-DqUO2K83.js";
|
|
11
|
+
import { r as buildWorkspaceSkillSnapshot } from "./skills-ccAgQ3Ad.js";
|
|
12
|
+
import { a as isInternalMessageChannel, d as resolveMessageChannel, i as isGatewayMessageChannel, l as normalizeMessageChannel, n as isDeliverableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL } from "./message-channel-Cu61-7H6.js";
|
|
13
13
|
import { n as resolveSessionFilePath, o as resolveStorePath } from "./paths-Bkhd_qY8.js";
|
|
14
|
-
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-
|
|
14
|
+
import { a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "./deliver-T9d44OpZ.js";
|
|
15
15
|
import { l as deriveSessionTotalTokens, u as hasNonzeroUsage } from "./session-cost-usage-PvyVZz-g.js";
|
|
16
|
-
import { t as createDefaultDeps } from "./deps-
|
|
16
|
+
import { t as createDefaultDeps } from "./deps-DFQdAWQc.js";
|
|
17
17
|
import crypto from "node:crypto";
|
|
18
18
|
|
|
19
19
|
//#region src/cli/outbound-send-deps.ts
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { g as resolveStateDir, y as resolveRequiredHomeDir } from "./paths-DVBShlw6.js";
|
|
2
|
-
import { b as resolveUserPath, g as pathExists } from "./utils-
|
|
2
|
+
import { b as resolveUserPath, g as pathExists } from "./utils-es4ygvQ-.js";
|
|
3
3
|
import { l as normalizeAgentId, n as DEFAULT_AGENT_ID, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BWxPj0z_.js";
|
|
4
|
-
import { t as runCommandWithTimeout } from "./exec-
|
|
5
|
-
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-
|
|
4
|
+
import { t as runCommandWithTimeout } from "./exec-Cv_Ofd1m.js";
|
|
5
|
+
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-JLDMp6ux.js";
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import os from "node:os";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import
|
|
9
|
+
import fs from "node:fs/promises";
|
|
10
10
|
|
|
11
11
|
//#region src/agents/workspace-templates.ts
|
|
12
12
|
const FALLBACK_TEMPLATE_DIR = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../../docs/reference/templates");
|
|
@@ -74,14 +74,14 @@ async function loadTemplate(name) {
|
|
|
74
74
|
const templateDir = await resolveWorkspaceTemplateDir();
|
|
75
75
|
const templatePath = path.join(templateDir, name);
|
|
76
76
|
try {
|
|
77
|
-
return stripFrontMatter(await
|
|
77
|
+
return stripFrontMatter(await fs.readFile(templatePath, "utf-8"));
|
|
78
78
|
} catch {
|
|
79
79
|
throw new Error(`Missing workspace template: ${name} (${templatePath}). Ensure docs/reference/templates are packaged.`);
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
async function writeFileIfMissing(filePath, content) {
|
|
83
83
|
try {
|
|
84
|
-
await
|
|
84
|
+
await fs.writeFile(filePath, content, {
|
|
85
85
|
encoding: "utf-8",
|
|
86
86
|
flag: "wx"
|
|
87
87
|
});
|
|
@@ -91,7 +91,7 @@ async function writeFileIfMissing(filePath, content) {
|
|
|
91
91
|
}
|
|
92
92
|
async function hasGitRepo(dir) {
|
|
93
93
|
try {
|
|
94
|
-
await
|
|
94
|
+
await fs.stat(path.join(dir, ".git"));
|
|
95
95
|
return true;
|
|
96
96
|
} catch {
|
|
97
97
|
return false;
|
|
@@ -117,7 +117,7 @@ async function ensureGitRepo(dir, isBrandNewWorkspace) {
|
|
|
117
117
|
}
|
|
118
118
|
async function ensureAgentWorkspace(params) {
|
|
119
119
|
const dir = resolveUserPath(params?.dir?.trim() ? params.dir.trim() : DEFAULT_AGENT_WORKSPACE_DIR);
|
|
120
|
-
await
|
|
120
|
+
await fs.mkdir(dir, { recursive: true });
|
|
121
121
|
if (!params?.ensureBootstrapFiles) return { dir };
|
|
122
122
|
const agentsPath = path.join(dir, DEFAULT_AGENTS_FILENAME);
|
|
123
123
|
const soulPath = path.join(dir, DEFAULT_SOUL_FILENAME);
|
|
@@ -137,7 +137,7 @@ async function ensureAgentWorkspace(params) {
|
|
|
137
137
|
];
|
|
138
138
|
return (await Promise.all(paths.map(async (p) => {
|
|
139
139
|
try {
|
|
140
|
-
await
|
|
140
|
+
await fs.access(p);
|
|
141
141
|
return true;
|
|
142
142
|
} catch {
|
|
143
143
|
return false;
|
|
@@ -176,7 +176,7 @@ async function resolveMemoryBootstrapEntries(resolvedDir) {
|
|
|
176
176
|
for (const name of candidates) {
|
|
177
177
|
const filePath = path.join(resolvedDir, name);
|
|
178
178
|
try {
|
|
179
|
-
await
|
|
179
|
+
await fs.access(filePath);
|
|
180
180
|
entries.push({
|
|
181
181
|
name,
|
|
182
182
|
filePath
|
|
@@ -189,7 +189,7 @@ async function resolveMemoryBootstrapEntries(resolvedDir) {
|
|
|
189
189
|
for (const entry of entries) {
|
|
190
190
|
let key = entry.filePath;
|
|
191
191
|
try {
|
|
192
|
-
key = await
|
|
192
|
+
key = await fs.realpath(entry.filePath);
|
|
193
193
|
} catch {}
|
|
194
194
|
if (seen.has(key)) continue;
|
|
195
195
|
seen.add(key);
|
|
@@ -232,7 +232,7 @@ async function loadWorkspaceBootstrapFiles(dir) {
|
|
|
232
232
|
entries.push(...await resolveMemoryBootstrapEntries(resolvedDir));
|
|
233
233
|
const result = [];
|
|
234
234
|
for (const entry of entries) try {
|
|
235
|
-
const content = await
|
|
235
|
+
const content = await fs.readFile(entry.filePath, "utf-8");
|
|
236
236
|
result.push({
|
|
237
237
|
name: entry.name,
|
|
238
238
|
path: entry.filePath,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
|
-
import
|
|
2
|
+
import fs from "node:fs/promises";
|
|
3
3
|
import JSZip from "jszip";
|
|
4
4
|
import * as tar from "tar";
|
|
5
5
|
|
|
@@ -18,9 +18,9 @@ function resolveArchiveKind(filePath) {
|
|
|
18
18
|
async function resolvePackedRootDir(extractDir) {
|
|
19
19
|
const direct = path.join(extractDir, "package");
|
|
20
20
|
try {
|
|
21
|
-
if ((await
|
|
21
|
+
if ((await fs.stat(direct)).isDirectory()) return direct;
|
|
22
22
|
} catch {}
|
|
23
|
-
const dirs = (await
|
|
23
|
+
const dirs = (await fs.readdir(extractDir, { withFileTypes: true })).filter((entry) => entry.isDirectory()).map((entry) => entry.name);
|
|
24
24
|
if (dirs.length !== 1) throw new Error(`unexpected archive layout (dirs: ${dirs.join(", ")})`);
|
|
25
25
|
const onlyDir = dirs[0];
|
|
26
26
|
if (!onlyDir) throw new Error("unexpected archive layout (no package dir found)");
|
|
@@ -37,7 +37,7 @@ async function withTimeout(promise, timeoutMs, label) {
|
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
39
|
async function extractZip(params) {
|
|
40
|
-
const buffer = await
|
|
40
|
+
const buffer = await fs.readFile(params.archivePath);
|
|
41
41
|
const zip = await JSZip.loadAsync(buffer);
|
|
42
42
|
const entries = Object.values(zip.files);
|
|
43
43
|
for (const entry of entries) {
|
|
@@ -45,14 +45,14 @@ async function extractZip(params) {
|
|
|
45
45
|
if (!entryPath || entryPath.endsWith("/")) {
|
|
46
46
|
const dirPath = path.resolve(params.destDir, entryPath);
|
|
47
47
|
if (!dirPath.startsWith(params.destDir)) throw new Error(`zip entry escapes destination: ${entry.name}`);
|
|
48
|
-
await
|
|
48
|
+
await fs.mkdir(dirPath, { recursive: true });
|
|
49
49
|
continue;
|
|
50
50
|
}
|
|
51
51
|
const outPath = path.resolve(params.destDir, entryPath);
|
|
52
52
|
if (!outPath.startsWith(params.destDir)) throw new Error(`zip entry escapes destination: ${entry.name}`);
|
|
53
|
-
await
|
|
53
|
+
await fs.mkdir(path.dirname(outPath), { recursive: true });
|
|
54
54
|
const data = await entry.async("nodebuffer");
|
|
55
|
-
await
|
|
55
|
+
await fs.writeFile(outPath, data);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
async function extractArchive(params) {
|
|
@@ -70,14 +70,14 @@ async function extractArchive(params) {
|
|
|
70
70
|
}
|
|
71
71
|
async function fileExists(filePath) {
|
|
72
72
|
try {
|
|
73
|
-
await
|
|
73
|
+
await fs.stat(filePath);
|
|
74
74
|
return true;
|
|
75
75
|
} catch {
|
|
76
76
|
return false;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
async function readJsonFile(filePath) {
|
|
80
|
-
const raw = await
|
|
80
|
+
const raw = await fs.readFile(filePath, "utf-8");
|
|
81
81
|
return JSON.parse(raw);
|
|
82
82
|
}
|
|
83
83
|
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { g as resolveStateDir, m as resolveOAuthDir, o as resolveConfigPath } from "./paths-DVBShlw6.js";
|
|
2
2
|
import { l as normalizeAgentId } from "./session-key-BWxPj0z_.js";
|
|
3
|
-
import { n as runExec } from "./exec-
|
|
4
|
-
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
3
|
+
import { n as runExec } from "./exec-Cv_Ofd1m.js";
|
|
4
|
+
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CGmuusG9.js";
|
|
5
5
|
import { t as formatCliCommand } from "./command-format-ChfKqObn.js";
|
|
6
|
-
import { D as INCLUDE_KEY, O as MAX_INCLUDE_DEPTH, r as createConfigIO } from "./config
|
|
7
|
-
import { a as MANIFEST_KEY } from "./manifest-registry-
|
|
8
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
9
|
-
import { $ as resolveSandboxToolPolicyForAgent, Z as resolveSandboxConfigForAgent, ot as resolveToolProfilePolicy } from "./sandbox-
|
|
10
|
-
import { i as loadWorkspaceSkillEntries } from "./skills-
|
|
6
|
+
import { D as INCLUDE_KEY, O as MAX_INCLUDE_DEPTH, r as createConfigIO } from "./config--NUdpACy.js";
|
|
7
|
+
import { a as MANIFEST_KEY } from "./manifest-registry-3It8Z8yN.js";
|
|
8
|
+
import { n as listChannelPlugins } from "./plugins-CNaHNND_.js";
|
|
9
|
+
import { $ as resolveSandboxToolPolicyForAgent, Z as resolveSandboxConfigForAgent, ot as resolveToolProfilePolicy } from "./sandbox-DqUO2K83.js";
|
|
10
|
+
import { i as loadWorkspaceSkillEntries } from "./skills-ccAgQ3Ad.js";
|
|
11
11
|
import { n as formatErrorMessage } from "./errors-B0eT3jVv.js";
|
|
12
|
-
import { a as resolveProfile, i as resolveBrowserConfig } from "./server-context-
|
|
13
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
14
|
-
import { t as GatewayClient } from "./client-
|
|
15
|
-
import { t as buildGatewayConnectionDetails } from "./call-
|
|
16
|
-
import { i as readChannelAllowFromStore } from "./pairing-store-
|
|
17
|
-
import { c as resolveNativeSkillsEnabled, n as isToolAllowedByPolicies, s as resolveNativeCommandsEnabled } from "./pi-tools.policy-
|
|
12
|
+
import { a as resolveProfile, i as resolveBrowserConfig } from "./server-context-8Qt35QdF.js";
|
|
13
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-Cu61-7H6.js";
|
|
14
|
+
import { t as GatewayClient } from "./client-6xKrRC-1.js";
|
|
15
|
+
import { t as buildGatewayConnectionDetails } from "./call-Bek1xlgk.js";
|
|
16
|
+
import { i as readChannelAllowFromStore } from "./pairing-store-c-QQ2u8p.js";
|
|
17
|
+
import { c as resolveNativeSkillsEnabled, n as isToolAllowedByPolicies, s as resolveNativeCommandsEnabled } from "./pi-tools.policy-akYsGFiA.js";
|
|
18
18
|
import { t as resolveChannelDefaultAccountId } from "./helpers-C89IG08W.js";
|
|
19
|
-
import { t as scanDirectoryWithSummary } from "./skill-scanner-
|
|
20
|
-
import { i as resolveGatewayAuth } from "./auth-
|
|
19
|
+
import { t as scanDirectoryWithSummary } from "./skill-scanner-DrVEHfC6.js";
|
|
20
|
+
import { i as resolveGatewayAuth } from "./auth-BvIPpm7G.js";
|
|
21
21
|
import os from "node:os";
|
|
22
22
|
import path from "node:path";
|
|
23
|
-
import
|
|
24
|
-
import
|
|
23
|
+
import JSON5 from "json5";
|
|
24
|
+
import fs from "node:fs/promises";
|
|
25
25
|
import { randomUUID } from "node:crypto";
|
|
26
26
|
|
|
27
27
|
//#region src/gateway/probe.ts
|
|
@@ -646,7 +646,7 @@ function createIcaclsResetCommand(targetPath, opts) {
|
|
|
646
646
|
//#region src/security/audit-fs.ts
|
|
647
647
|
async function safeStat(targetPath) {
|
|
648
648
|
try {
|
|
649
|
-
const lst = await
|
|
649
|
+
const lst = await fs.lstat(targetPath);
|
|
650
650
|
return {
|
|
651
651
|
ok: true,
|
|
652
652
|
isSymlink: lst.isSymbolicLink(),
|
|
@@ -812,11 +812,11 @@ async function collectIncludePathsRecursive(params) {
|
|
|
812
812
|
if (visited.has(resolved)) continue;
|
|
813
813
|
visited.add(resolved);
|
|
814
814
|
result.push(resolved);
|
|
815
|
-
const rawText = await
|
|
815
|
+
const rawText = await fs.readFile(resolved, "utf-8").catch(() => null);
|
|
816
816
|
if (!rawText) continue;
|
|
817
817
|
const nestedParsed = (() => {
|
|
818
818
|
try {
|
|
819
|
-
return
|
|
819
|
+
return JSON5.parse(rawText);
|
|
820
820
|
} catch {
|
|
821
821
|
return null;
|
|
822
822
|
}
|
|
@@ -838,7 +838,7 @@ function extensionUsesSkippedScannerPath(entry) {
|
|
|
838
838
|
}
|
|
839
839
|
async function readPluginManifestExtensions(pluginPath) {
|
|
840
840
|
const manifestPath = path.join(pluginPath, "package.json");
|
|
841
|
-
const raw = await
|
|
841
|
+
const raw = await fs.readFile(manifestPath, "utf-8").catch(() => "");
|
|
842
842
|
if (!raw.trim()) return [];
|
|
843
843
|
const extensions = JSON.parse(raw)?.[MANIFEST_KEY]?.extensions;
|
|
844
844
|
if (!Array.isArray(extensions)) return [];
|
|
@@ -865,7 +865,7 @@ async function collectPluginsTrustFindings(params) {
|
|
|
865
865
|
const extensionsDir = path.join(params.stateDir, "extensions");
|
|
866
866
|
const st = await safeStat(extensionsDir);
|
|
867
867
|
if (!st.ok || !st.isDir) return findings;
|
|
868
|
-
const pluginDirs = (await
|
|
868
|
+
const pluginDirs = (await fs.readdir(extensionsDir, { withFileTypes: true }).catch(() => [])).filter((e) => e.isDirectory()).map((e) => e.name).filter(Boolean);
|
|
869
869
|
if (pluginDirs.length === 0) return findings;
|
|
870
870
|
const allow = params.cfg.plugins?.allow;
|
|
871
871
|
if (!(Array.isArray(allow) && allow.length > 0)) {
|
|
@@ -1092,7 +1092,7 @@ async function collectPluginsCodeSafetyFindings(params) {
|
|
|
1092
1092
|
const extensionsDir = path.join(params.stateDir, "extensions");
|
|
1093
1093
|
const st = await safeStat(extensionsDir);
|
|
1094
1094
|
if (!st.ok || !st.isDir) return findings;
|
|
1095
|
-
const pluginDirs = (await
|
|
1095
|
+
const pluginDirs = (await fs.readdir(extensionsDir, { withFileTypes: true }).catch((err) => {
|
|
1096
1096
|
findings.push({
|
|
1097
1097
|
checkId: "plugins.code_safety.scan_failed",
|
|
1098
1098
|
severity: "warn",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as isTrustedProxyAddress, l as resolveGatewayClientIp, n as isLoopbackAddress, o as parseForwardedForClientIp } from "./ws-DtDKpbLR.js";
|
|
2
|
-
import { c as readTailscaleWhoisIdentity } from "./tailscale-
|
|
2
|
+
import { c as readTailscaleWhoisIdentity } from "./tailscale-Cu-2HNvU.js";
|
|
3
3
|
import { timingSafeEqual } from "node:crypto";
|
|
4
4
|
|
|
5
5
|
//#region src/gateway/auth.ts
|
package/dist/build-info.json
CHANGED
|
@@ -4,7 +4,7 @@ import "../../utils-dp_OM900.js";
|
|
|
4
4
|
import { g as DEFAULT_CHAT_CHANNEL, l as createSubsystemLogger, u as defaultRuntime } from "../../exec-CijMSZd9.js";
|
|
5
5
|
import { a as resolveAgentModelPrimary, i as resolveAgentModelFallbacksOverride, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, y as ensureAgentWorkspace } from "../../agent-scope-D8miw9q_.js";
|
|
6
6
|
import { X as SILENT_REPLY_TOKEN, a as normalizeOutboundPayloadsForJson, i as normalizeOutboundPayloads, m as sendMessageSignal, r as formatOutboundPayloadLog, t as deliverOutboundPayloads } from "../../deliver-CT6KiDqO.js";
|
|
7
|
-
import { C as clearAgentRunContext, D as sendMessageSlack, E as sendMessageWhatsApp, S as AGENT_LANE_NESTED, T as registerAgentRunContext, _ as clearSessionAuthProfileOverride, a as getCliSessionId, b as loadModelCatalog, c as resolveOutboundTarget, d as deriveSessionTotalTokens, f as hasNonzeroUsage, g as lookupContextTokens, h as getSkillsSnapshotVersion, i as sendMessageDiscord, l as resolveSessionDeliveryTarget, m as getRemoteSkillEligibility, n as sendMessageIMessage, o as setCliSessionId, p as resolveSendPolicy, r as sendMessageTelegram, s as runCliAgent, t as runEmbeddedPiAgent, u as runWithModelFallback, v as applyModelOverrideToSessionEntry, w as emitAgentEvent, x as resolveAgentTimeoutMs, y as applyVerboseOverride } from "../../pi-embedded-
|
|
7
|
+
import { C as clearAgentRunContext, D as sendMessageSlack, E as sendMessageWhatsApp, S as AGENT_LANE_NESTED, T as registerAgentRunContext, _ as clearSessionAuthProfileOverride, a as getCliSessionId, b as loadModelCatalog, c as resolveOutboundTarget, d as deriveSessionTotalTokens, f as hasNonzeroUsage, g as lookupContextTokens, h as getSkillsSnapshotVersion, i as sendMessageDiscord, l as resolveSessionDeliveryTarget, m as getRemoteSkillEligibility, n as sendMessageIMessage, o as setCliSessionId, p as resolveSendPolicy, r as sendMessageTelegram, s as runCliAgent, t as runEmbeddedPiAgent, u as runWithModelFallback, v as applyModelOverrideToSessionEntry, w as emitAgentEvent, x as resolveAgentTimeoutMs, y as applyVerboseOverride } from "../../pi-embedded-CgPTEqlB.js";
|
|
8
8
|
import { Ht as buildWorkspaceSkillSnapshot, Nn as normalizeChannelId, Z as updateSessionStore, a as formatXHighModelHint, cn as isDeliverableMessageChannel, ct as evaluateSessionFreshness, d as normalizeVerboseLevel, dt as resolveSessionResetType, hn as resolveMessageChannel, ht as resolveMainSessionKey, i as formatThinkingLevels, jn as getChannelPlugin, l as normalizeThinkLevel, ln as isGatewayMessageChannel, lt as resolveChannelResetConfig, mt as resolveExplicitAgentSessionKey, ot as normalizeAccountId, p as supportsXHighThinking, pn as normalizeMessageChannel, q as loadSessionStore, sn as INTERNAL_MESSAGE_CHANNEL, st as resolveSessionKey, un as isInternalMessageChannel, ut as resolveSessionResetPolicy } from "../../pi-embedded-helpers-BbWRSUnc.js";
|
|
9
9
|
import "../../boolean-M-esQJt6.js";
|
|
10
10
|
import { F as DEFAULT_MODEL, I as DEFAULT_PROVIDER, O as resolveThinkingDefault, P as DEFAULT_CONTEXT_TOKENS, S as modelKey, T as resolveConfiguredModelRef, h as ensureAuthProfileStore, v as buildAllowedModelSet, x as isCliProvider } from "../../model-auth-ioeR_zLX.js";
|
|
@@ -4,7 +4,7 @@ import "../../utils-dp_OM900.js";
|
|
|
4
4
|
import { l as createSubsystemLogger } from "../../exec-CijMSZd9.js";
|
|
5
5
|
import { s as resolveAgentWorkspaceDir } from "../../agent-scope-D8miw9q_.js";
|
|
6
6
|
import "../../deliver-CT6KiDqO.js";
|
|
7
|
-
import "../../pi-embedded-
|
|
7
|
+
import "../../pi-embedded-CgPTEqlB.js";
|
|
8
8
|
import "../../pi-embedded-helpers-BbWRSUnc.js";
|
|
9
9
|
import "../../boolean-M-esQJt6.js";
|
|
10
10
|
import "../../model-auth-ioeR_zLX.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { g as resolveStateDir, o as resolveConfigPath, u as resolveGatewayPort } from "./paths-DVBShlw6.js";
|
|
2
|
-
import { S as shortenHomeInString, b as resolveUserPath, c as ensureDir, t as CONFIG_DIR } from "./utils-
|
|
3
|
-
import { i as loadConfig } from "./config
|
|
2
|
+
import { S as shortenHomeInString, b as resolveUserPath, c as ensureDir, t as CONFIG_DIR } from "./utils-es4ygvQ-.js";
|
|
3
|
+
import { i as loadConfig } from "./config--NUdpACy.js";
|
|
4
4
|
import { t as pickPrimaryTailnetIPv4 } from "./tailnet-DGRSvYuQ.js";
|
|
5
5
|
import { s as pickPrimaryLanIPv4 } from "./ws-DtDKpbLR.js";
|
|
6
|
-
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-
|
|
7
|
-
import { Et as PROTOCOL_VERSION, Mt as normalizeFingerprint, Pt as loadOrCreateDeviceIdentity, t as GatewayClient } from "./client-
|
|
6
|
+
import { h as GATEWAY_CLIENT_NAMES, m as GATEWAY_CLIENT_MODES } from "./message-channel-Cu61-7H6.js";
|
|
7
|
+
import { Et as PROTOCOL_VERSION, Mt as normalizeFingerprint, Pt as loadOrCreateDeviceIdentity, t as GatewayClient } from "./client-6xKrRC-1.js";
|
|
8
8
|
import path from "node:path";
|
|
9
|
-
import
|
|
9
|
+
import fs from "node:fs/promises";
|
|
10
10
|
import { execFile } from "node:child_process";
|
|
11
11
|
import { promisify } from "node:util";
|
|
12
12
|
import { X509Certificate, randomUUID } from "node:crypto";
|
|
@@ -15,7 +15,7 @@ import { X509Certificate, randomUUID } from "node:crypto";
|
|
|
15
15
|
const execFileAsync = promisify(execFile);
|
|
16
16
|
async function fileExists(filePath) {
|
|
17
17
|
try {
|
|
18
|
-
await
|
|
18
|
+
await fs.access(filePath);
|
|
19
19
|
return true;
|
|
20
20
|
} catch {
|
|
21
21
|
return false;
|
|
@@ -42,8 +42,8 @@ async function generateSelfSignedCert(params) {
|
|
|
42
42
|
"-subj",
|
|
43
43
|
"/CN=openclaw-gateway"
|
|
44
44
|
]);
|
|
45
|
-
await
|
|
46
|
-
await
|
|
45
|
+
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
46
|
+
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
47
47
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
48
48
|
}
|
|
49
49
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -81,9 +81,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
81
81
|
error: "gateway tls: cert/key missing"
|
|
82
82
|
};
|
|
83
83
|
try {
|
|
84
|
-
const cert = await
|
|
85
|
-
const key = await
|
|
86
|
-
const ca = caPath ? await
|
|
84
|
+
const cert = await fs.readFile(certPath, "utf8");
|
|
85
|
+
const key = await fs.readFile(keyPath, "utf8");
|
|
86
|
+
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
87
87
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
88
88
|
if (!fingerprintSha256) return {
|
|
89
89
|
enabled: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
80551f12a2a86823be93d5dda1beb84f57f3e9c1c331ab3e9489b0490c81199e
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Q as CHAT_CHANNEL_ORDER, n as isTruthyEnvValue } from "./entry.js";
|
|
2
2
|
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-lZwe2yX5.js";
|
|
3
3
|
import { n as listChannelPlugins } from "./plugins-Db5BiELK.js";
|
|
4
|
-
import { n as ensurePluginRegistryLoaded } from "./command-options-
|
|
4
|
+
import { n as ensurePluginRegistryLoaded } from "./command-options-BTAzyqqb.js";
|
|
5
5
|
|
|
6
6
|
//#region src/cli/channel-options.ts
|
|
7
7
|
function dedupe(values) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { m as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-
|
|
2
|
-
import { ut as loadOpenClawPlugins } from "./reply
|
|
3
|
-
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-
|
|
4
|
-
import { t as isTruthyEnvValue } from "./env-
|
|
5
|
-
import { i as loadConfig } from "./config
|
|
6
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
7
|
-
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-
|
|
1
|
+
import { m as CHAT_CHANNEL_ORDER, t as createSubsystemLogger } from "./subsystem-Bh1Y_6Uv.js";
|
|
2
|
+
import { ut as loadOpenClawPlugins } from "./reply--b7BsXGP.js";
|
|
3
|
+
import { c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-CGmuusG9.js";
|
|
4
|
+
import { t as isTruthyEnvValue } from "./env-BxRc6wWv.js";
|
|
5
|
+
import { i as loadConfig } from "./config--NUdpACy.js";
|
|
6
|
+
import { n as listChannelPlugins } from "./plugins-CNaHNND_.js";
|
|
7
|
+
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-AOSOJ-v1.js";
|
|
8
8
|
|
|
9
9
|
//#region src/cli/command-options.ts
|
|
10
10
|
function hasExplicitOptions(command, names) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as listChannelPlugins } from "./plugins-
|
|
2
|
-
import { c as listDeliverableMessageChannels, l as normalizeMessageChannel } from "./message-channel-
|
|
1
|
+
import { n as listChannelPlugins } from "./plugins-CNaHNND_.js";
|
|
2
|
+
import { c as listDeliverableMessageChannels, l as normalizeMessageChannel } from "./message-channel-Cu61-7H6.js";
|
|
3
3
|
|
|
4
4
|
//#region src/infra/outbound/channel-selection.ts
|
|
5
5
|
const getMessageChannels = () => listDeliverableMessageChannels();
|