@multiplytech/openclaw 2026.2.15-pairing-code.3 → 2026.2.15-pairing-code.4
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-DyinIlq4.js → accounts-BvmssTEF.js} +1 -1
- package/dist/{accounts-Bu2DSNpQ.js → accounts-CyxQBpl8.js} +1 -1
- package/dist/{active-listener-BIBYF9eG.js → active-listener-BruG-udz.js} +1 -1
- package/dist/{agent-DTNvKM2P.js → agent-BxxBd9wX.js} +2 -2
- package/dist/{agent-DoKOzDAt.js → agent-D0LfsEPF.js} +2 -2
- package/dist/{agent-scope-BIw4Bz2L.js → agent-scope-DUn-XVYs.js} +3 -3
- package/dist/{agents-DB8xHohl.js → agents-jAnRMd-A.js} +2 -2
- package/dist/{audio-preflight-BHSwqB70.js → audio-preflight-CbR1q2CT.js} +17 -17
- package/dist/{audio-preflight-CeC5WuRi.js → audio-preflight-kYQdd_bY.js} +4 -4
- package/dist/{auth-choice-CTK4oGkS.js → auth-choice-B6AdPtCu.js} +1 -1
- package/dist/{auth-choice-C3--CpEI.js → auth-choice-GrNENivg.js} +1 -1
- package/dist/{banner-DlnL7Slb.js → banner-D3tgjbUi.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +38 -38
- package/dist/bundled/bootstrap-extra-files/handler.js +4 -4
- package/dist/bundled/command-logger/handler.js +1 -1
- package/dist/bundled/session-memory/handler.js +32 -32
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-C4rZNocg.js → channel-activity--HqvQlN3.js} +1 -1
- package/dist/{channel-options-DjpVPRIl.js → channel-options-C0ayB7mx.js} +1 -1
- package/dist/{channel-options-DTszr7UZ.js → channel-options-CgdgqIte.js} +1 -1
- package/dist/{channel-web-D7bde6n5.js → channel-web-BTTW7H_d.js} +2 -2
- package/dist/{channels-cli-u2oRC89U.js → channels-cli-BcDsE2LA.js} +4 -4
- package/dist/{channels-cli-HhdoLxhz.js → channels-cli-p5hPpQzH.js} +4 -4
- package/dist/{chrome-BR14_3nU.js → chrome-B2PpxswT.js} +7 -7
- package/dist/{chrome-DlM4kwMc.js → chrome-BtogRifc.js} +18 -18
- package/dist/{cli-BmEEG6LF.js → cli-Cwzdze-z.js} +1 -1
- package/dist/{cli-DALx-L2z.js → cli-Oxxb4axp.js} +1 -1
- package/dist/{command-registry-Zu61QmVf.js → command-registry-C8q1jb3h.js} +9 -9
- package/dist/{common-BB2PeD4P.js → common-BJE3S8zA.js} +2 -2
- package/dist/{completion-cli-sZBZnfMK.js → completion-cli-CIcsx6ic.js} +1 -1
- package/dist/{completion-cli-C-q-FkeT.js → completion-cli-DQd6XSG4.js} +2 -2
- package/dist/{config-BA8Xs1ek.js → config-CYlbDcBt.js} +34 -34
- package/dist/{config-cli-CGOyIowg.js → config-cli-BmW3yfH6.js} +1 -1
- package/dist/{config-cli-BWKb4EMZ.js → config-cli-CZLDgS2E.js} +1 -1
- package/dist/{configure-DOqQjooh.js → configure-B0_p6Z1n.js} +3 -3
- package/dist/{configure-Vvq-cip8.js → configure-CRaYQ6hS.js} +3 -3
- package/dist/{deliver-CV4a0MBa.js → deliver-BwXnLuWH.js} +16 -16
- package/dist/{deliver-DOrBYvPC.js → deliver-C7HjLIB7.js} +1 -1
- package/dist/{deps-CtD8VF2g.js → deps-i6fBS1Dw.js} +1 -1
- package/dist/{doctor-DtN-z3_C.js → doctor-AUivq-af.js} +4 -4
- package/dist/{doctor-C4_8AvIH.js → doctor-Cs7rfmA-.js} +4 -4
- package/dist/{doctor-completion-I1dEiTU-.js → doctor-completion-C2PR6GJF.js} +1 -1
- package/dist/{doctor-completion-CHjJchGS.js → doctor-completion-CtBAIy0Z.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/{exec-C9rZpEqA.js → exec-C_bNT00b.js} +17 -17
- package/dist/extensionAPI.js +6 -6
- package/dist/{fetch-Dyb5pqye.js → fetch-mr22CaT4.js} +2 -2
- package/dist/{frontmatter-Bk_vZq47.js → frontmatter-BetN20QN.js} +2 -2
- package/dist/{gateway-cli-CjGNIUv4.js → gateway-cli-BgGnL3cE.js} +9 -9
- package/dist/{gateway-cli-DLgphSfL.js → gateway-cli-M8r3XcpJ.js} +9 -9
- package/dist/{github-copilot-token-BXEGgIt5.js → github-copilot-token-U5JrmjNt.js} +7 -7
- package/dist/{health-B7GSkRWi.js → health-BqoIIu1u.js} +2 -2
- package/dist/{health-CZTNBGMI.js → health-shfUNbPM.js} +2 -2
- package/dist/{heartbeat-visibility-B9nOsKDd.js → heartbeat-visibility-BEMg5PJB.js} +1 -1
- package/dist/{heartbeat-visibility-Dgp5aP37.js → heartbeat-visibility-B_kubgRp.js} +1 -1
- package/dist/{hooks-cli-CB0R6yP9.js → hooks-cli-99NPDBK1.js} +2 -2
- package/dist/{hooks-cli-C8IQCUf9.js → hooks-cli-ec5DFn5g.js} +2 -2
- package/dist/{image-CIO7-OG5.js → image-CRFk69Io.js} +1 -1
- package/dist/{image-DVTZYmDL.js → image-DN3RgnPr.js} +4 -4
- package/dist/{image-ops-7EDUjzca.js → image-ops-CKPJXWk4.js} +9 -9
- package/dist/index.js +9 -9
- package/dist/{ir-eyTjTBlP.js → ir-C-hSqOPD.js} +6 -6
- package/dist/llm-slug-generator.js +32 -32
- package/dist/{login-NEYiBobK.js → login-BFkQgAbM.js} +1 -1
- package/dist/{login-CfzZlhYy.js → login-CmhHGO4I.js} +1 -1
- package/dist/{login-CrD6iwIT.js → login-CwQj2jUX.js} +1 -1
- package/dist/{login-CFjSEIg1.js → login-Dydm4XDa.js} +3 -3
- package/dist/{login-qr-B92LRmnh.js → login-qr-B_NTKK4T.js} +1 -1
- package/dist/{login-qr-LM0fkvty.js → login-qr-BrIxb_5N.js} +8 -8
- package/dist/{login-qr-CmkMkiw0.js → login-qr-CEOlIdRe.js} +1 -1
- package/dist/{login-qr-D3hsc4br.js → login-qr-CF5T7Eew.js} +1 -1
- package/dist/{manager-ihPMEKim.js → manager-Ec86Dapd.js} +10 -10
- package/dist/{model-auth-BBAJ-iuC.js → model-auth-COYibYBO.js} +8 -8
- package/dist/{models-VeXFWmzm.js → models-D688pDKn.js} +2 -2
- package/dist/{models-cli-fOdGdULJ.js → models-cli-CcHjNOe3.js} +3 -3
- package/dist/{models-cli-QFp-Qadk.js → models-cli-GWtfGvki.js} +2 -2
- package/dist/{onboard-DkkjXP5u.js → onboard-BmB1TAqN.js} +2 -2
- package/dist/{onboard-ApR__J6N.js → onboard-C5_njUCe.js} +2 -2
- package/dist/{onboard-channels-Oo2BI8vk.js → onboard-channels-BATBIQiN.js} +1 -1
- package/dist/{onboard-channels-CTkeYXWn.js → onboard-channels-BeXdUwL0.js} +1 -1
- package/dist/{onboarding-BvGs6yhQ.js → onboarding-Cjbb0fRA.js} +3 -3
- package/dist/{onboarding-DE9maYL1.js → onboarding-txZtcVMA.js} +3 -3
- package/dist/{onboarding.finalize-DFyOM5B6.js → onboarding.finalize-BI8zTyGF.js} +6 -6
- package/dist/{onboarding.finalize-CS-chLDk.js → onboarding.finalize-CSj3Rf0J.js} +5 -5
- package/dist/{outbound-N8cZjkHg.js → outbound-C8YnTFjo.js} +5 -5
- package/dist/{outbound-attachment-BAu7a9Bk.js → outbound-attachment-C8Qf4dh8.js} +2 -2
- package/dist/{outbound-send-deps-SJCtmIUG.js → outbound-send-deps-BCi2C-Sb.js} +1 -1
- package/dist/{paths-CMYSfM3T.js → paths-Bbik2tb_.js} +2 -2
- package/dist/{paths-CyR9Pa1R.js → paths-CkkDESQ2.js} +5 -5
- package/dist/{pi-auth-json-BX0whbu8.js → pi-auth-json-MhfZXNOP.js} +6 -6
- package/dist/{pi-embedded-D_ek_HF_.js → pi-embedded-8ou24X6D.js} +18 -18
- package/dist/{pi-embedded-helpers-DHT11gwA.js → pi-embedded-helpers-DmwtjJVo.js} +48 -48
- package/dist/{pi-embedded-helpers-D3YxFr03.js → pi-embedded-helpers-Dow6Qreh.js} +4 -4
- package/dist/{pi-embedded-DyKQ3bSU.js → pi-embedded-wVlKSjNK.js} +120 -120
- package/dist/{plugin-registry-Dcizpoio.js → plugin-registry-D_bG1PT_.js} +1 -1
- package/dist/{plugin-registry-DBpayaga.js → plugin-registry-N4ZFQdQ9.js} +1 -1
- package/dist/plugin-sdk/{active-listener-CFLZdKRQ.js → active-listener-CkyAenz6.js} +2 -2
- package/dist/plugin-sdk/{agent-scope-ip6rBrUD.js → agent-scope-DWZdK6Cr.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-C0NlyreL.js → audio-preflight-BzSvof9i.js} +12 -12
- package/dist/plugin-sdk/{channel-web-Za6SnC7J.js → channel-web-BXr_pHKk.js} +11 -11
- package/dist/plugin-sdk/{chrome-OZ5Ge8PR.js → chrome-BLYh1Ek9.js} +1 -1
- package/dist/plugin-sdk/{common-pKa0kElY.js → common-STTVkT-Z.js} +2 -2
- package/dist/plugin-sdk/{config-DelXkt58.js → config-iUJxJaTT.js} +8 -8
- package/dist/plugin-sdk/{deliver-ebYNQy_5.js → deliver-Bkdn7hYJ.js} +6 -6
- package/dist/plugin-sdk/{exec-C5lqk9X4.js → exec-9HIVkGqi.js} +2 -2
- package/dist/plugin-sdk/{fetch-Cw_7QfME.js → fetch-DjHoyhHv.js} +2 -2
- package/dist/plugin-sdk/{image-2KL1DOmN.js → image-DolmBtru.js} +4 -4
- package/dist/plugin-sdk/{image-ops-zm4O3fkk.js → image-ops-DvO68zWD.js} +4 -4
- package/dist/plugin-sdk/index.js +23 -23
- package/dist/plugin-sdk/{ir-BEwiHV7R.js → ir-D6TOa8wy.js} +4 -4
- package/dist/plugin-sdk/{login-DG-oB1Gg.js → login-CGRU_9Nh.js} +3 -3
- package/dist/plugin-sdk/{login-qr-DjYOgNGQ.js → login-qr-D6D-dPg-.js} +5 -5
- package/dist/plugin-sdk/{manager-Cqyl7HDP.js → manager-DSG4npLd.js} +5 -5
- package/dist/plugin-sdk/{model-selection-DHMRsTNB.js → model-selection-BfTuBvS4.js} +2 -2
- package/dist/plugin-sdk/{outbound-DT2nH6dY.js → outbound-BuWEi6UJ.js} +4 -4
- package/dist/plugin-sdk/{paths-wRVSwmkX.js → paths-6C0IeDIg.js} +1 -1
- package/dist/plugin-sdk/{pi-auth-json-XTF0mVQ6.js → pi-auth-json-CdSpUvvH.js} +3 -3
- package/dist/plugin-sdk/{pi-embedded-helpers-C3_rwWkJ.js → pi-embedded-helpers-rNIrRqeN.js} +13 -13
- package/dist/plugin-sdk/{pw-ai-BYr2wRwE.js → pw-ai-DHGDCfpy.js} +2 -2
- package/dist/plugin-sdk/{qmd-manager-CY7j7J3V.js → qmd-manager-D0FXZkrS.js} +4 -4
- package/dist/plugin-sdk/{reply-CnWG5ty5.js → reply-BvOTUN2t.js} +35 -35
- package/dist/plugin-sdk/{runner-DxPwS4ed.js → runner-CaaUwzMJ.js} +7 -7
- package/dist/plugin-sdk/{session-BO6X9uoj.js → session-Cjs4HuZk.js} +9 -4
- package/dist/plugin-sdk/{sqlite-CKrK6KKr.js → sqlite-QNHsO4bW.js} +2 -2
- package/dist/plugin-sdk/{tool-images-C4GaQjrF.js → tool-images-BuctNDly.js} +2 -2
- package/dist/plugin-sdk/web-CUrXnjRV.js +30 -0
- package/dist/plugin-sdk/{whatsapp-actions-C5T64qvX.js → whatsapp-actions-3adtwpVJ.js} +11 -11
- package/dist/{plugins-cli-Dc9-hwnS.js → plugins-cli-CFOLjXM-.js} +2 -2
- package/dist/{plugins-cli-ByM99YMv.js → plugins-cli-D2KHK9jR.js} +2 -2
- package/dist/{program-CxbZh7UH.js → program-B9I5xkOF.js} +7 -7
- package/dist/{program-context-BAwPjqcT.js → program-context-C3C2WLNP.js} +17 -17
- package/dist/{provider-auth-helpers-BHnRj7nc.js → provider-auth-helpers-DIPDa8Lw.js} +1 -1
- package/dist/{provider-auth-helpers-iolF14w8.js → provider-auth-helpers-DYPDXQQP.js} +1 -1
- package/dist/{pw-ai-xh9cPTDX.js → pw-ai-BCyIw4W4.js} +3 -3
- package/dist/{pw-ai-QsOEPS_1.js → pw-ai-Bbd79y0r.js} +1 -1
- package/dist/{qmd-manager-DtmZgEoS.js → qmd-manager-CgC5sB-T.js} +6 -6
- package/dist/{register.agent-BBVjFp8Y.js → register.agent-BedOGhk-.js} +7 -7
- package/dist/{register.agent-C4IrpTkN.js → register.agent-JL4_r2Jb.js} +6 -6
- package/dist/{register.configure-CUZo4Aot.js → register.configure-D_-8trFJ.js} +6 -6
- package/dist/{register.configure-aZaemwQh.js → register.configure-U45T1EJ-.js} +6 -6
- package/dist/{register.maintenance-BUk55ZfL.js → register.maintenance-BNhGCK92.js} +7 -7
- package/dist/{register.maintenance-k-FF9sjN.js → register.maintenance-TMdlbc45.js} +8 -8
- package/dist/{register.message-rDz6Pyj3.js → register.message-BdQletmJ.js} +3 -3
- package/dist/{register.message-C85LDxMG.js → register.message-DKw_hGiP.js} +3 -3
- package/dist/{register.onboard-qQ-XzgeJ.js → register.onboard-D5LHgdqV.js} +4 -4
- package/dist/{register.onboard-DoeqvAhF.js → register.onboard-DVHlSfZa.js} +4 -4
- package/dist/{register.setup-BYePf2X9.js → register.setup-CAVftQvz.js} +4 -4
- package/dist/{register.setup-UW5rhwoL.js → register.setup-Dfhxwzgk.js} +4 -4
- package/dist/{register.status-health-sessions-C7tVEUfl.js → register.status-health-sessions-YCJQ83my.js} +3 -3
- package/dist/{register.status-health-sessions-D-e34zX_.js → register.status-health-sessions-ixyM5rDz.js} +3 -3
- package/dist/{register.subclis-tuSSdE3-.js → register.subclis-D-kjKwwz.js} +9 -9
- package/dist/{reply-jLqhHIBQ.js → reply-d6yV4wB_.js} +4 -4
- package/dist/{retry-B0RhK9tX.js → retry-D1bxhFWp.js} +1 -1
- package/dist/{run-main-B3U7jH0W.js → run-main-D5duEqg3.js} +14 -14
- package/dist/{runner-nMdrG8eK.js → runner-DGYLHL8R.js} +7 -7
- package/dist/{runner-DED-FFOX.js → runner-oDUAvejt.js} +1 -1
- package/dist/{send-BRIcpOAj.js → send-CKSrJ7se.js} +5 -5
- package/dist/{send-DzhCsWw9.js → send-DULTJ0oK.js} +7 -7
- package/dist/{send-CNibEQip.js → send-Df7eglyR.js} +6 -6
- package/dist/{send-CWOrEtrR.js → send-DjP-Miy_.js} +7 -7
- package/dist/{send-BMQRcdbF.js → send-z4yxEOnF.js} +4 -4
- package/dist/{server-node-events-CKA4Mn5e.js → server-node-events-BE6fD68d.js} +3 -3
- package/dist/{server-node-events-CF_WTOvc.js → server-node-events-C51Bayv9.js} +3 -3
- package/dist/{session-BrloLgwj.js → session-2uX9t1PO.js} +13 -8
- package/dist/{session-D0vLMCo1.js → session-B5I8E41_.js} +7 -2
- package/dist/{session-EJQdFRC5.js → session-Bu5MF744.js} +7 -2
- package/dist/{session-CJ3QUnhn.js → session-ZppYapGg.js} +7 -2
- package/dist/{sqlite-Bfoh6OgV.js → sqlite-CBMbuGLX.js} +4 -4
- package/dist/{status-D0bufmRu.js → status-8g-vfjfP.js} +2 -2
- package/dist/{status-DfjRvBXf.js → status-BRNeaZhV.js} +1 -1
- package/dist/{status-DrjhxuYR.js → status-D0P0XQqw.js} +1 -1
- package/dist/{status-DVBJLUIs.js → status-NfZ6FkuQ.js} +2 -2
- package/dist/{store-B6Y3aOaY.js → store-m4I2z_5t.js} +2 -2
- package/dist/{subagent-registry-Do5aAYdm.js → subagent-registry-DJBVFvb4.js} +4 -4
- package/dist/{tables-BhgdJIJu.js → tables-7DihLyDw.js} +1 -1
- package/dist/{tool-images-DRiKq4of.js → tool-images-hzyBQ0Og.js} +2 -2
- package/dist/{update-cli-COHKHs55.js → update-cli-BOXR9slg.js} +7 -7
- package/dist/{update-cli-Dz5XBQ_v.js → update-cli-BZ2fDrwx.js} +8 -8
- package/dist/{update-runner-DIgoatPE.js → update-runner-B55O98W8.js} +1 -1
- package/dist/{update-runner-rbu-IrlQ.js → update-runner-BZFeJzUi.js} +1 -1
- package/dist/{web-B-mup9LH.js → web-By5urMji.js} +4 -4
- package/dist/{web-BTK9UUaM.js → web-C5vqAHQC.js} +36 -36
- package/dist/{web-DIO2jYwG.js → web-CtSLAgT_.js} +3 -3
- package/dist/{web-RzuY5nXI.js → web-DoaI-RpC.js} +8 -8
- package/dist/{whatsapp-actions-x16Ismcy.js → whatsapp-actions-C4JR_6XT.js} +14 -14
- package/dist/{workspace-LSLFINSz.js → workspace-CgGZnIx_.js} +5 -5
- package/package.json +2 -1
- package/dist/plugin-sdk/web-DY7ps8Jl.js +0 -30
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { B as escapeRegExp, l as createSubsystemLogger, mt as getChildLogger, nt as toWhatsappJid } from "./exec-
|
|
3
|
-
import { n as loadConfig } from "./config-
|
|
4
|
-
import { a as loadWebMedia, c as resolveMarkdownTableMode } from "./ir-
|
|
2
|
+
import { B as escapeRegExp, l as createSubsystemLogger, mt as getChildLogger, nt as toWhatsappJid } from "./exec-C_bNT00b.js";
|
|
3
|
+
import { n as loadConfig } from "./config-CYlbDcBt.js";
|
|
4
|
+
import { a as loadWebMedia, c as resolveMarkdownTableMode } from "./ir-C-hSqOPD.js";
|
|
5
5
|
import { n as normalizePollInput } from "./polls-Bqd9Aibe.js";
|
|
6
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
7
|
-
import { n as requireActiveWebListener } from "./active-listener-
|
|
6
|
+
import { t as convertMarkdownTables } from "./tables-7DihLyDw.js";
|
|
7
|
+
import { n as requireActiveWebListener } from "./active-listener-BruG-udz.js";
|
|
8
8
|
import { randomUUID } from "node:crypto";
|
|
9
9
|
|
|
10
10
|
//#region src/markdown/whatsapp.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as saveMediaBuffer } from "./store-
|
|
2
|
-
import { a as loadWebMedia } from "./ir-
|
|
1
|
+
import { r as saveMediaBuffer } from "./store-m4I2z_5t.js";
|
|
2
|
+
import { a as loadWebMedia } from "./ir-C-hSqOPD.js";
|
|
3
3
|
|
|
4
4
|
//#region src/media/outbound-attachment.ts
|
|
5
5
|
async function resolveOutboundAttachmentFromUrl(mediaUrl, maxBytes, options) {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
function createDefaultDeps() {
|
|
3
3
|
return {
|
|
4
4
|
sendMessageWhatsApp: async (...args) => {
|
|
5
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
5
|
+
const { sendMessageWhatsApp } = await import("./web-CtSLAgT_.js");
|
|
6
6
|
return await sendMessageWhatsApp(...args);
|
|
7
7
|
},
|
|
8
8
|
sendMessageTelegram: async (...args) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-
|
|
2
|
-
import { _ as DEFAULT_AGENT_ID, w as normalizeAgentId } from "./workspace-
|
|
1
|
+
import { c as expandHomePrefix, s as resolveStateDir, u as resolveRequiredHomeDir } from "./paths-CkkDESQ2.js";
|
|
2
|
+
import { _ as DEFAULT_AGENT_ID, w as normalizeAgentId } from "./workspace-CgGZnIx_.js";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import os from "node:os";
|
|
2
2
|
import path from "node:path";
|
|
3
|
-
import
|
|
3
|
+
import fsSync from "node:fs";
|
|
4
4
|
|
|
5
5
|
//#region src/infra/home-dir.ts
|
|
6
6
|
function normalize(value) {
|
|
@@ -93,10 +93,10 @@ function resolveStateDir(env = process.env, homedir = envHomedir(env)) {
|
|
|
93
93
|
if (override) return resolveUserPath(override, env, effectiveHomedir);
|
|
94
94
|
const newDir = newStateDir(effectiveHomedir);
|
|
95
95
|
const legacyDirs = legacyStateDirs(effectiveHomedir);
|
|
96
|
-
if (
|
|
96
|
+
if (fsSync.existsSync(newDir)) return newDir;
|
|
97
97
|
const existingLegacy = legacyDirs.find((dir) => {
|
|
98
98
|
try {
|
|
99
|
-
return
|
|
99
|
+
return fsSync.existsSync(dir);
|
|
100
100
|
} catch {
|
|
101
101
|
return false;
|
|
102
102
|
}
|
|
@@ -135,7 +135,7 @@ function resolveCanonicalConfigPath(env = process.env, stateDir = resolveStateDi
|
|
|
135
135
|
function resolveConfigPathCandidate(env = process.env, homedir = envHomedir(env)) {
|
|
136
136
|
const existing = resolveDefaultConfigCandidates(env, homedir).find((candidate) => {
|
|
137
137
|
try {
|
|
138
|
-
return
|
|
138
|
+
return fsSync.existsSync(candidate);
|
|
139
139
|
} catch {
|
|
140
140
|
return false;
|
|
141
141
|
}
|
|
@@ -152,7 +152,7 @@ function resolveConfigPath(env = process.env, stateDir = resolveStateDir(env, en
|
|
|
152
152
|
const stateOverride = env.OPENCLAW_STATE_DIR?.trim();
|
|
153
153
|
const existing = [path.join(stateDir, CONFIG_FILENAME), ...LEGACY_CONFIG_FILENAMES.map((name) => path.join(stateDir, name))].find((candidate) => {
|
|
154
154
|
try {
|
|
155
|
-
return
|
|
155
|
+
return fsSync.existsSync(candidate);
|
|
156
156
|
} catch {
|
|
157
157
|
return false;
|
|
158
158
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import "./paths-
|
|
2
|
-
import "./workspace-
|
|
3
|
-
import "./exec-
|
|
4
|
-
import "./agent-scope-
|
|
1
|
+
import "./paths-CkkDESQ2.js";
|
|
2
|
+
import "./workspace-CgGZnIx_.js";
|
|
3
|
+
import "./exec-C_bNT00b.js";
|
|
4
|
+
import "./agent-scope-DUn-XVYs.js";
|
|
5
5
|
import "./boolean-Bb19hm9Y.js";
|
|
6
|
-
import { h as ensureAuthProfileStore, p as listProfilesForProvider } from "./model-auth-
|
|
7
|
-
import "./github-copilot-token-
|
|
6
|
+
import { h as ensureAuthProfileStore, p as listProfilesForProvider } from "./model-auth-COYibYBO.js";
|
|
7
|
+
import "./github-copilot-token-U5JrmjNt.js";
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
|
|
@@ -5,17 +5,17 @@ import { $ as sliceUtf16Safe, A as matchPluginCommand, B as isPlainObject, C as
|
|
|
5
5
|
import { B as markAuthProfileGood, C as resolveApiKeyForProvider, E as getShellPathFromLoginShell, F as isProfileInCooldown, H as resolveAuthStorePathForDisplay, I as markAuthProfileFailure, J as DEFAULT_CONTEXT_TOKENS, K as normalizeSecretInput, L as markAuthProfileUsed, M as parseBooleanValue$1, O as resolveShellEnvFallbackTimeoutMs, P as resolveAuthProfileOrder, R as resolveApiKeyForProfile, S as requireApiKey, T as resolveModelAuthMode, U as resolveOpenClawAgentDir, V as ensureAuthProfileStore, W as withFileLock$1, X as DEFAULT_PROVIDER, Y as DEFAULT_MODEL, a as modelKey, b as getApiKeyForModel, d as resolveModelRefFromString, f as resolveThinkingDefault, i as isCliProvider, j as isTruthyEnvValue, l as resolveConfiguredModelRef, n as buildConfiguredAllowlistKeys, o as normalizeModelRef, q as resolveAuthProfileDisplayLabel, r as buildModelAliasIndex, s as normalizeProviderId, t as buildAllowedModelSet, u as resolveDefaultModelForAgent, v as OLLAMA_NATIVE_BASE_URL, w as resolveEnvApiKey, x as getCustomProviderApiKey, y as createOllamaStreamFn, z as listProfilesForProvider } from "./model-selection-Cb6822pn.js";
|
|
6
6
|
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-DZwwYztr.js";
|
|
7
7
|
import { n as resolveCliName, t as formatCliCommand } from "./command-format-qUVxzqYm.js";
|
|
8
|
-
import { A as SILENT_REPLY_TOKEN, C as parseReplyDirectives, D as getGlobalHookRunner, E as parseInlineDirectives$1, O as initializeGlobalHookRunner, S as throwIfAborted, T as splitMediaFromOutput, _ as streamSignalEvents, a as applyReplyThreading, b as normalizeChannelTargetInput, c as shouldSuppressMessagingToolReplies, d as sendMessageSignal, f as sendReadReceiptSignal, g as signalRpcRequest, h as signalCheck, i as applyReplyTagsToPayload, j as isSilentReplyText, k as HEARTBEAT_TOKEN, l as createReplyToModeFilterForChannel, m as resolveSignalRpcContext, o as filterMessagingToolDuplicates, p as sendTypingSignal, r as normalizeReplyPayloadsForDelivery, s as isRenderablePayload, t as deliverOutboundPayloads, u as resolveReplyToMode, v as resolveOutboundAttachmentFromUrl, w as MEDIA_TOKEN_RE, x as normalizeTargetForProvider, y as buildTargetResolverSignature } from "./deliver-
|
|
8
|
+
import { A as SILENT_REPLY_TOKEN, C as parseReplyDirectives, D as getGlobalHookRunner, E as parseInlineDirectives$1, O as initializeGlobalHookRunner, S as throwIfAborted, T as splitMediaFromOutput, _ as streamSignalEvents, a as applyReplyThreading, b as normalizeChannelTargetInput, c as shouldSuppressMessagingToolReplies, d as sendMessageSignal, f as sendReadReceiptSignal, g as signalRpcRequest, h as signalCheck, i as applyReplyTagsToPayload, j as isSilentReplyText, k as HEARTBEAT_TOKEN, l as createReplyToModeFilterForChannel, m as resolveSignalRpcContext, o as filterMessagingToolDuplicates, p as sendTypingSignal, r as normalizeReplyPayloadsForDelivery, s as isRenderablePayload, t as deliverOutboundPayloads, u as resolveReplyToMode, v as resolveOutboundAttachmentFromUrl, w as MEDIA_TOKEN_RE, x as normalizeTargetForProvider, y as buildTargetResolverSignature } from "./deliver-C7HjLIB7.js";
|
|
9
9
|
import { A as normalizeMimeType$1, B as listTelegramAccountIds, C as detectMime, D as isAudioFileName, E as imageMimeFromFormat, F as listChannelPlugins, H as resolveTelegramToken, I as normalizeChannelId$1, J as normalizeChatType, K as resolveSlackAppToken, L as isWhatsAppGroupJid, M as maxBytesForKind, N as mediaKindFromMime, O as isGifMedia, P as getChannelPlugin, R as normalizeWhatsAppTarget, S as GATEWAY_CLIENT_NAMES, T as getFileExtension, U as listBindings, V as resolveTelegramAccount, W as resolveSlackAccount, X as resolveDiscordAccount, Y as listEnabledDiscordAccounts, Z as normalizeDiscordToken, _ as normalizeMessageChannel, a as resizeToJpeg, b as GATEWAY_CLIENT_IDS, f as INTERNAL_MESSAGE_CHANNEL, g as listDeliverableMessageChannels, h as isMarkdownCapableMessageChannel, j as MAX_IMAGE_BYTES, l as isBlockedHostname, m as isInternalMessageChannel, n as getImageMetadata, o as SsrFBlockedError, p as isDeliverableMessageChannel, q as resolveSlackBotToken, u as isPrivateIpAddress, v as resolveGatewayMessageChannel, w as extensionForMime, x as GATEWAY_CLIENT_MODES, y as resolveMessageChannel, z as listEnabledTelegramAccounts } from "./image-ops-B9jnR447.js";
|
|
10
10
|
import { A as resolveAgentMaxConcurrent, B as readWebSelfId, C as setConfigOverride, D as setConfigValueAtPath, E as parseConfigPath, F as logWebSelfId, I as logoutWeb, M as resolveWhatsAppAccount, O as unsetConfigValueAtPath, P as getWebAuthAgeMs, S as resetConfigOverrides, T as getConfigValueAtPath, W as webAuthExists, _ as applyTestPluginDefaults, a as writeConfigFile, b as resolveMemorySlotDecision, c as TELEGRAM_COMMAND_NAME_PATTERN, d as parseDurationMs, f as validateJsonSchemaValue, i as resolveConfigSnapshotHash, j as VERSION, k as isSafeExecutableValue, l as normalizeTelegramCommandName, m as discoverOpenClawPlugins, n as loadConfig, o as validateConfigObjectWithPlugins, p as loadPluginManifestRegistry, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as normalizePluginsConfig, w as unsetConfigOverride, x as getConfigOverrides, y as resolveEnableState } from "./config-Ejc5JKGl.js";
|
|
11
|
-
import { $t as buildPluginToolGroups, A as isBillingAssistantError, At as createBrowserRouteContext, B as isTransientHttpError, Bt as buildWorkspaceSkillSnapshot, C as BILLING_ERROR_USER_MESSAGE, Ct as listChannelDocks, D as formatRawAssistantErrorForUi, Dt as resolveChannelGroupToolsPolicy, E as formatBillingErrorMessage, Et as resolveChannelGroupRequireMention, F as isFailoverErrorMessage, Ft as saveMediaBuffer, G as resolveSandboxContext, Gt as assertSandboxPath, H as parseImageSizeError, Ht as resolveSkillsPromptForRun, I as isLikelyContextOverflowError, It as DEFAULT_UPLOAD_DIR, J as appendAssistantMessageToSessionTranscript, Jt as applySkillEnvOverridesFromSnapshot, K as resolveSandboxRuntimeStatus, Kt as resolveSandboxedMediaSource, L as isRateLimitAssistantError, Lt as resolvePathsWithinRoot, M as isCompactionFailureError, Mt as resolveBrowserConfig, N as isContextOverflowError, Nt as resolveProfile, O as getApiErrorPayloadFingerprint, Ot as resolveConversationLabel, P as isFailoverAssistantError, Pt as getMediaDir, Q as recordSessionMetaFromInbound, Qt as applyOwnerOnlyToolPolicy, R as isRawApiErrorPayload, Rt as getBridgeAuthForPort, S as isGoogleModelApi, St as getChannelDock, T as formatAssistantErrorText, Tt as resolveChannelGroupPolicy, U as sanitizeUserFacingText, Ut as resolvePluginSkillDirs, V as parseImageDimensionError, Vt as loadWorkspaceSkillEntries, W as ensureSandboxWorkspaceForSession, Wt as assertMediaNotDataUrl, X as loadSessionStore, Xt as resolveBrowserControlAuth, Yt as ensureBrowserControlAuth, Z as readSessionUpdatedAt, Zt as resolveSandboxConfigForAgent, _ as sanitizeSessionMessagesImages, _t as DEFAULT_RESET_TRIGGERS, a as formatXHighModelHint, an as resolveToolProfilePolicy, at as deliveryContextFromSession, b as downgradeOpenAIReasoningBlocks, bt as resolveMainSessionKey, c as normalizeReasoningLevel, cn as matchesAnyGlobPattern, ct as normalizeDeliveryContext, d as normalizeVerboseLevel, dn as resolveBootstrapMaxChars, dt as resolveSessionKey$1, en as collectExplicitAllowlist, et as updateLastRoute, f as resolveResponseUsageMode, fn as resolveBootstrapTotalMaxChars, ft as evaluateSessionFreshness, g as normalizeTextForComparison, gt as resolveThreadFlag, h as isMessagingToolDuplicateNormalized, hn as resolveSignalAccount, ht as resolveSessionResetType, i as formatThinkingLevels, in as normalizeToolName, it as resolveCacheTtlMs$1, j as isCloudCodeAssistFormatError, jt as registerBrowserRoutes, k as isAuthAssistantError, kt as resolveGroupSessionKey, l as normalizeThinkLevel, ln as buildBootstrapContextFiles, lt as normalizeSessionDeliveryFields, mn as listEnabledSignalAccounts, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nn as expandToolGroups, nt as updateSessionStoreEntry, o as listThinkingLevels, on as stripPluginOnlyAllowlist, ot as deliveryContextKey, p as supportsXHighThinking, pn as sanitizeGoogleTurnOrdering, pt as resolveChannelResetConfig, q as extractDeliveryInfo, qt as applySkillEnvOverrides, r as pickFallbackThinkingLevel, rn as mergeAlsoAllowPolicy, rt as isCacheEnabled, s as normalizeElevatedLevel, sn as compileGlobPatterns, st as mergeDeliveryContext, t as validateAnthropicTurns, tn as expandPolicyWithPluginGroups, tt as updateSessionStore, u as normalizeUsageDisplay, un as ensureSessionHeader, ut as acquireSessionWriteLock, v as extractToolCallsFromAssistant, vt as resolveFreshSessionTotalTokens, w as classifyFailoverReason, wt as resolveIMessageAccount, x as isAntigravityClaude, xt as deriveSessionMetaPatch, y as extractToolResultId, yt as canonicalizeMainSessionAlias, z as isTimeoutErrorMessage, zt as buildWorkspaceSkillCommandSpecs } from "./pi-embedded-helpers-
|
|
11
|
+
import { $t as buildPluginToolGroups, A as isBillingAssistantError, At as createBrowserRouteContext, B as isTransientHttpError, Bt as buildWorkspaceSkillSnapshot, C as BILLING_ERROR_USER_MESSAGE, Ct as listChannelDocks, D as formatRawAssistantErrorForUi, Dt as resolveChannelGroupToolsPolicy, E as formatBillingErrorMessage, Et as resolveChannelGroupRequireMention, F as isFailoverErrorMessage, Ft as saveMediaBuffer, G as resolveSandboxContext, Gt as assertSandboxPath, H as parseImageSizeError, Ht as resolveSkillsPromptForRun, I as isLikelyContextOverflowError, It as DEFAULT_UPLOAD_DIR, J as appendAssistantMessageToSessionTranscript, Jt as applySkillEnvOverridesFromSnapshot, K as resolveSandboxRuntimeStatus, Kt as resolveSandboxedMediaSource, L as isRateLimitAssistantError, Lt as resolvePathsWithinRoot, M as isCompactionFailureError, Mt as resolveBrowserConfig, N as isContextOverflowError, Nt as resolveProfile, O as getApiErrorPayloadFingerprint, Ot as resolveConversationLabel, P as isFailoverAssistantError, Pt as getMediaDir, Q as recordSessionMetaFromInbound, Qt as applyOwnerOnlyToolPolicy, R as isRawApiErrorPayload, Rt as getBridgeAuthForPort, S as isGoogleModelApi, St as getChannelDock, T as formatAssistantErrorText, Tt as resolveChannelGroupPolicy, U as sanitizeUserFacingText, Ut as resolvePluginSkillDirs, V as parseImageDimensionError, Vt as loadWorkspaceSkillEntries, W as ensureSandboxWorkspaceForSession, Wt as assertMediaNotDataUrl, X as loadSessionStore, Xt as resolveBrowserControlAuth, Yt as ensureBrowserControlAuth, Z as readSessionUpdatedAt, Zt as resolveSandboxConfigForAgent, _ as sanitizeSessionMessagesImages, _t as DEFAULT_RESET_TRIGGERS, a as formatXHighModelHint, an as resolveToolProfilePolicy, at as deliveryContextFromSession, b as downgradeOpenAIReasoningBlocks, bt as resolveMainSessionKey, c as normalizeReasoningLevel, cn as matchesAnyGlobPattern, ct as normalizeDeliveryContext, d as normalizeVerboseLevel, dn as resolveBootstrapMaxChars, dt as resolveSessionKey$1, en as collectExplicitAllowlist, et as updateLastRoute, f as resolveResponseUsageMode, fn as resolveBootstrapTotalMaxChars, ft as evaluateSessionFreshness, g as normalizeTextForComparison, gt as resolveThreadFlag, h as isMessagingToolDuplicateNormalized, hn as resolveSignalAccount, ht as resolveSessionResetType, i as formatThinkingLevels, in as normalizeToolName, it as resolveCacheTtlMs$1, j as isCloudCodeAssistFormatError, jt as registerBrowserRoutes, k as isAuthAssistantError, kt as resolveGroupSessionKey, l as normalizeThinkLevel, ln as buildBootstrapContextFiles, lt as normalizeSessionDeliveryFields, mn as listEnabledSignalAccounts, mt as resolveSessionResetPolicy, n as validateGeminiTurns, nn as expandToolGroups, nt as updateSessionStoreEntry, o as listThinkingLevels, on as stripPluginOnlyAllowlist, ot as deliveryContextKey, p as supportsXHighThinking, pn as sanitizeGoogleTurnOrdering, pt as resolveChannelResetConfig, q as extractDeliveryInfo, qt as applySkillEnvOverrides, r as pickFallbackThinkingLevel, rn as mergeAlsoAllowPolicy, rt as isCacheEnabled, s as normalizeElevatedLevel, sn as compileGlobPatterns, st as mergeDeliveryContext, t as validateAnthropicTurns, tn as expandPolicyWithPluginGroups, tt as updateSessionStore, u as normalizeUsageDisplay, un as ensureSessionHeader, ut as acquireSessionWriteLock, v as extractToolCallsFromAssistant, vt as resolveFreshSessionTotalTokens, w as classifyFailoverReason, wt as resolveIMessageAccount, x as isAntigravityClaude, xt as deriveSessionMetaPatch, y as extractToolResultId, yt as canonicalizeMainSessionAlias, z as isTimeoutErrorMessage, zt as buildWorkspaceSkillCommandSpecs } from "./pi-embedded-helpers-Dow6Qreh.js";
|
|
12
12
|
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DWTTaAgY.js";
|
|
13
|
-
import { C as pickPrimaryTailnetIPv4, E as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as pickPrimaryLanIPv4, b as rawDataToString, v as ensureChromeExtensionRelayServer } from "./chrome-
|
|
13
|
+
import { C as pickPrimaryTailnetIPv4, E as DEFAULT_AI_SNAPSHOT_MAX_CHARS, S as pickPrimaryLanIPv4, b as rawDataToString, v as ensureChromeExtensionRelayServer } from "./chrome-B2PpxswT.js";
|
|
14
14
|
import { n as formatErrorMessage, r as formatUncaughtError, t as extractErrorCode } from "./errors-B8y79jwX.js";
|
|
15
15
|
import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath } from "./paths-CdHoK26P.js";
|
|
16
16
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BiU0SOrl.js";
|
|
17
17
|
import { n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-IRIIkjuN.js";
|
|
18
|
-
import { _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as ensureOpenClawModelsJson, y as resolveToolDisplay } from "./image-
|
|
18
|
+
import { _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as ensureOpenClawModelsJson, y as resolveToolDisplay } from "./image-CRFk69Io.js";
|
|
19
19
|
import { i as resolveMemorySearchConfig, n as resolveRetryConfig, r as retryAsync } from "./manager-CyBrtpKf.js";
|
|
20
20
|
import { d as listMemoryFiles, f as normalizeExtraMemoryPaths } from "./sqlite-CUiUMvKy.js";
|
|
21
21
|
import { t as redactSensitiveText } from "./redact-DO22U0Pj.js";
|
|
@@ -24,7 +24,7 @@ import { _ as findFenceSpanAt, a as loadWebMedia, c as resolveMarkdownTableMode,
|
|
|
24
24
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-CmZi0_-L.js";
|
|
25
25
|
import { i as fetchWithSsrFGuard, n as fetchRemoteMedia, r as readResponseWithLimit } from "./fetch-CE6hQpN5.js";
|
|
26
26
|
import { a as normalizePollDurationHours, i as convertMarkdownTables, o as normalizePollInput, s as renderMarkdownWithMarkers, t as getActiveWebListener } from "./active-listener-B5CpzLkd.js";
|
|
27
|
-
import { _ as applyTemplate, a as runCapability, c as modelSupportsVision, d as registerUnhandledRejectionHandler, f as resolveConcurrency, g as CLI_OUTPUT_MAX_BUFFER, h as resolveMediaUnderstandingScope, i as resolveAutoImageModel, m as normalizeMediaUnderstandingChatType, n as createMediaAttachmentCache, o as findModelInCatalog, p as resolveTimeoutMs$1, r as normalizeMediaAttachments, s as loadModelCatalog, t as buildProviderRegistry, u as resolveAttachmentKind } from "./runner-
|
|
27
|
+
import { _ as applyTemplate, a as runCapability, c as modelSupportsVision, d as registerUnhandledRejectionHandler, f as resolveConcurrency, g as CLI_OUTPUT_MAX_BUFFER, h as resolveMediaUnderstandingScope, i as resolveAutoImageModel, m as normalizeMediaUnderstandingChatType, n as createMediaAttachmentCache, o as findModelInCatalog, p as resolveTimeoutMs$1, r as normalizeMediaAttachments, s as loadModelCatalog, t as buildProviderRegistry, u as resolveAttachmentKind } from "./runner-oDUAvejt.js";
|
|
28
28
|
import { t as resolveFetch } from "./fetch-DvufHSTX.js";
|
|
29
29
|
import { t as makeProxyFetch } from "./proxy-_LH9fwZb.js";
|
|
30
30
|
import { createRequire } from "node:module";
|
|
@@ -47,7 +47,7 @@ import AjvPkg from "ajv";
|
|
|
47
47
|
import process$1 from "node:process";
|
|
48
48
|
import * as net$1 from "node:net";
|
|
49
49
|
import { createServer } from "node:http";
|
|
50
|
-
import WebSocket
|
|
50
|
+
import WebSocket, { WebSocket as WebSocket$1 } from "ws";
|
|
51
51
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
52
52
|
import { createJiti } from "jiti";
|
|
53
53
|
import { Type } from "@sinclair/typebox";
|
|
@@ -7260,7 +7260,7 @@ var GatewayClient = class {
|
|
|
7260
7260
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
7261
7261
|
});
|
|
7262
7262
|
}
|
|
7263
|
-
this.ws = new WebSocket(url, wsOptions);
|
|
7263
|
+
this.ws = new WebSocket$1(url, wsOptions);
|
|
7264
7264
|
this.ws.on("open", () => {
|
|
7265
7265
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
7266
7266
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -7463,7 +7463,7 @@ var GatewayClient = class {
|
|
|
7463
7463
|
return null;
|
|
7464
7464
|
}
|
|
7465
7465
|
async request(method, params, opts) {
|
|
7466
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
7466
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
|
|
7467
7467
|
const id = randomUUID();
|
|
7468
7468
|
const frame = {
|
|
7469
7469
|
type: "req",
|
|
@@ -8548,7 +8548,7 @@ async function routeReply(params) {
|
|
|
8548
8548
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
8549
8549
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
8550
8550
|
try {
|
|
8551
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
8551
|
+
const { deliverOutboundPayloads } = await import("./deliver-C7HjLIB7.js").then((n) => n.n);
|
|
8552
8552
|
return {
|
|
8553
8553
|
ok: true,
|
|
8554
8554
|
messageId: (await deliverOutboundPayloads({
|
|
@@ -40005,7 +40005,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
40005
40005
|
return;
|
|
40006
40006
|
}
|
|
40007
40007
|
try {
|
|
40008
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
40008
|
+
const { deliverOutboundPayloads } = await import("./deliver-C7HjLIB7.js").then((n) => n.n);
|
|
40009
40009
|
await deliverOutboundPayloads({
|
|
40010
40010
|
cfg: params.cfg,
|
|
40011
40011
|
channel,
|
|
@@ -45656,7 +45656,7 @@ async function describeStickerImage(params) {
|
|
|
45656
45656
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
45657
45657
|
try {
|
|
45658
45658
|
const buffer = await fs$1.readFile(imagePath);
|
|
45659
|
-
const { describeImageWithModel } = await import("./image-
|
|
45659
|
+
const { describeImageWithModel } = await import("./image-CRFk69Io.js").then((n) => n.n);
|
|
45660
45660
|
return (await describeImageWithModel({
|
|
45661
45661
|
buffer,
|
|
45662
45662
|
fileName: "sticker.webp",
|
|
@@ -46018,7 +46018,7 @@ function createWhatsAppLoginTool() {
|
|
|
46018
46018
|
force: Type.Optional(Type.Boolean())
|
|
46019
46019
|
}),
|
|
46020
46020
|
execute: async (_toolCallId, args) => {
|
|
46021
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
46021
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-CEOlIdRe.js");
|
|
46022
46022
|
if ((args?.action ?? "start") === "wait") {
|
|
46023
46023
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
46024
46024
|
return {
|
|
@@ -47824,7 +47824,7 @@ async function preflightDiscordMessage(params) {
|
|
|
47824
47824
|
let preflightTranscript;
|
|
47825
47825
|
const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
|
|
47826
47826
|
if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
|
|
47827
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
47827
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-kYQdd_bY.js");
|
|
47828
47828
|
const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
|
|
47829
47829
|
if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
|
|
47830
47830
|
ctx: {
|
|
@@ -50597,7 +50597,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
50597
50597
|
super(options);
|
|
50598
50598
|
}
|
|
50599
50599
|
createWebSocket(url) {
|
|
50600
|
-
return new WebSocket
|
|
50600
|
+
return new WebSocket(url, { agent });
|
|
50601
50601
|
}
|
|
50602
50602
|
}
|
|
50603
50603
|
return new ProxyGatewayPlugin();
|
|
@@ -59159,7 +59159,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
|
|
|
59159
59159
|
const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
|
|
59160
59160
|
let preflightTranscript;
|
|
59161
59161
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
|
|
59162
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
59162
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-kYQdd_bY.js");
|
|
59163
59163
|
preflightTranscript = await transcribeFirstAudio({
|
|
59164
59164
|
ctx: {
|
|
59165
59165
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -61235,15 +61235,15 @@ function loadWebOutbound() {
|
|
|
61235
61235
|
return webOutboundPromise;
|
|
61236
61236
|
}
|
|
61237
61237
|
function loadWebLogin() {
|
|
61238
|
-
webLoginPromise ??= import("./login-
|
|
61238
|
+
webLoginPromise ??= import("./login-CwQj2jUX.js").then((n) => n.n);
|
|
61239
61239
|
return webLoginPromise;
|
|
61240
61240
|
}
|
|
61241
61241
|
function loadWebLoginQr() {
|
|
61242
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
61242
|
+
webLoginQrPromise ??= import("./login-qr-CEOlIdRe.js");
|
|
61243
61243
|
return webLoginQrPromise;
|
|
61244
61244
|
}
|
|
61245
61245
|
function loadWebChannel() {
|
|
61246
|
-
webChannelPromise ??= import("./web-
|
|
61246
|
+
webChannelPromise ??= import("./web-DoaI-RpC.js");
|
|
61247
61247
|
return webChannelPromise;
|
|
61248
61248
|
}
|
|
61249
61249
|
function loadWhatsAppActions() {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-
|
|
2
|
-
import { C as normalizeAccountId$1, E as resolveAgentIdFromSessionKey, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, h as resolveOpenClawPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-
|
|
3
|
-
import { B as escapeRegExp, C as requireActivePluginRegistry, F as CONFIG_DIR, K as normalizeE164, X as resolveUserPath, _t as resolvePreferredOpenClawTmpDir, d as defaultRuntime, g as CHAT_CHANNEL_ORDER, h as CHANNEL_IDS, l as createSubsystemLogger, n as runExec, rt as truncateUtf16Safe, v as getChatChannelMeta } from "./exec-
|
|
4
|
-
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-
|
|
5
|
-
import { G as resolveSlackAccount, H as resolveTelegramAccount, K as resolveSlackReplyToMode, L as normalizeChannelId, Y as normalizeChatType, Z as resolveDiscordAccount, _ as listDeliverableMessageChannels, a as resizeToJpeg, n as getImageMetadata, v as normalizeMessageChannel, z as normalizeWhatsAppTarget } from "./image-ops-
|
|
1
|
+
import { i as resolveGatewayPort, t as STATE_DIR } from "./paths-CkkDESQ2.js";
|
|
2
|
+
import { C as normalizeAccountId$1, E as resolveAgentIdFromSessionKey, T as normalizeMainKey, _ as DEFAULT_AGENT_ID, a as DEFAULT_IDENTITY_FILENAME, c as DEFAULT_USER_FILENAME, h as resolveOpenClawPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as normalizeAgentId, y as buildAgentMainSessionKey } from "./workspace-CgGZnIx_.js";
|
|
3
|
+
import { B as escapeRegExp, C as requireActivePluginRegistry, F as CONFIG_DIR, K as normalizeE164, X as resolveUserPath, _t as resolvePreferredOpenClawTmpDir, d as defaultRuntime, g as CHAT_CHANNEL_ORDER, h as CHANNEL_IDS, l as createSubsystemLogger, n as runExec, rt as truncateUtf16Safe, v as getChatChannelMeta } from "./exec-C_bNT00b.js";
|
|
4
|
+
import { n as resolveAgentConfig, u as resolveSessionAgentId } from "./agent-scope-DUn-XVYs.js";
|
|
5
|
+
import { G as resolveSlackAccount, H as resolveTelegramAccount, K as resolveSlackReplyToMode, L as normalizeChannelId, Y as normalizeChatType, Z as resolveDiscordAccount, _ as listDeliverableMessageChannels, a as resizeToJpeg, n as getImageMetadata, v as normalizeMessageChannel, z as normalizeWhatsAppTarget } from "./image-ops-CKPJXWk4.js";
|
|
6
6
|
import { t as parseBooleanValue } from "./boolean-Bb19hm9Y.js";
|
|
7
|
-
import { y as isPidAlive } from "./model-auth-
|
|
7
|
+
import { y as isPidAlive } from "./model-auth-COYibYBO.js";
|
|
8
8
|
import { t as formatCliCommand } from "./command-format-BmTFj7S4.js";
|
|
9
|
-
import { A as resolveWhatsAppAccount, _ as resolveEnableState, a as writeConfigFile, d as parseDurationMs, g as normalizePluginsConfig, n as loadConfig, p as loadPluginManifestRegistry, s as parseByteSize, t as createConfigIO, v as resolveMemorySlotDecision } from "./config-
|
|
10
|
-
import { n as resolveSignalAccount } from "./accounts-
|
|
11
|
-
import { A as DEFAULT_OPENCLAW_BROWSER_ENABLED, D as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, E as DEFAULT_AI_SNAPSHOT_MAX_CHARS, O as DEFAULT_BROWSER_EVALUATE_ENABLED, T as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as fetchOk, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, k as DEFAULT_OPENCLAW_BROWSER_COLOR, l as createTargetViaCdp, m as fetchJson, n as isChromeCdpReady, o as stopOpenClawChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as ensureChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, x as isLoopbackHost, y as stopChromeExtensionRelayServer } from "./chrome-
|
|
12
|
-
import { a as parseFrontmatterBlock, c as resolveRuntimePlatform, i as resolveOpenClawManifestBlock, n as normalizeStringList, o as hasBinary, r as parseFrontmatterBool, s as isConfigPathTruthyWithDefaults, t as getFrontmatterString } from "./frontmatter-
|
|
9
|
+
import { A as resolveWhatsAppAccount, _ as resolveEnableState, a as writeConfigFile, d as parseDurationMs, g as normalizePluginsConfig, n as loadConfig, p as loadPluginManifestRegistry, s as parseByteSize, t as createConfigIO, v as resolveMemorySlotDecision } from "./config-CYlbDcBt.js";
|
|
10
|
+
import { n as resolveSignalAccount } from "./accounts-BvmssTEF.js";
|
|
11
|
+
import { A as DEFAULT_OPENCLAW_BROWSER_ENABLED, D as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, E as DEFAULT_AI_SNAPSHOT_MAX_CHARS, O as DEFAULT_BROWSER_EVALUATE_ENABLED, T as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as fetchOk, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, k as DEFAULT_OPENCLAW_BROWSER_COLOR, l as createTargetViaCdp, m as fetchJson, n as isChromeCdpReady, o as stopOpenClawChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as ensureChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, x as isLoopbackHost, y as stopChromeExtensionRelayServer } from "./chrome-BtogRifc.js";
|
|
12
|
+
import { a as parseFrontmatterBlock, c as resolveRuntimePlatform, i as resolveOpenClawManifestBlock, n as normalizeStringList, o as hasBinary, r as parseFrontmatterBool, s as isConfigPathTruthyWithDefaults, t as getFrontmatterString } from "./frontmatter-BetN20QN.js";
|
|
13
13
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-8mFQsaX1.js";
|
|
14
|
-
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-
|
|
15
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
16
|
-
import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
14
|
+
import { r as saveMediaBuffer, t as ensureMediaDir } from "./store-m4I2z_5t.js";
|
|
15
|
+
import { t as resolveIMessageAccount } from "./accounts-CyxQBpl8.js";
|
|
16
|
+
import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-Bbik2tb_.js";
|
|
17
17
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-5cC8ciFz.js";
|
|
18
|
-
import { t as sanitizeContentBlocksImages } from "./tool-images-
|
|
18
|
+
import { t as sanitizeContentBlocksImages } from "./tool-images-hzyBQ0Og.js";
|
|
19
19
|
import fs from "node:fs/promises";
|
|
20
20
|
import os from "node:os";
|
|
21
21
|
import path from "node:path";
|
|
22
|
-
import
|
|
22
|
+
import fsSync, { existsSync } from "node:fs";
|
|
23
23
|
import { spawn } from "node:child_process";
|
|
24
24
|
import { fileURLToPath } from "node:url";
|
|
25
25
|
import { CURRENT_SESSION_VERSION, SessionManager, formatSkillsForPrompt, loadSkillsFromDir } from "@mariozechner/pi-coding-agent";
|
|
@@ -1029,13 +1029,13 @@ function shortPath(value) {
|
|
|
1029
1029
|
//#region src/agents/skills/bundled-dir.ts
|
|
1030
1030
|
function looksLikeSkillsDir(dir) {
|
|
1031
1031
|
try {
|
|
1032
|
-
const entries =
|
|
1032
|
+
const entries = fsSync.readdirSync(dir, { withFileTypes: true });
|
|
1033
1033
|
for (const entry of entries) {
|
|
1034
1034
|
if (entry.name.startsWith(".")) continue;
|
|
1035
1035
|
const fullPath = path.join(dir, entry.name);
|
|
1036
1036
|
if (entry.isFile() && entry.name.endsWith(".md")) return true;
|
|
1037
1037
|
if (entry.isDirectory()) {
|
|
1038
|
-
if (
|
|
1038
|
+
if (fsSync.existsSync(path.join(fullPath, "SKILL.md"))) return true;
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
1041
|
} catch {
|
|
@@ -1050,7 +1050,7 @@ function resolveBundledSkillsDir(opts = {}) {
|
|
|
1050
1050
|
const execPath = opts.execPath ?? process.execPath;
|
|
1051
1051
|
const execDir = path.dirname(execPath);
|
|
1052
1052
|
const sibling = path.join(execDir, "skills");
|
|
1053
|
-
if (
|
|
1053
|
+
if (fsSync.existsSync(sibling)) return sibling;
|
|
1054
1054
|
} catch {}
|
|
1055
1055
|
try {
|
|
1056
1056
|
const moduleUrl = opts.moduleUrl ?? import.meta.url;
|
|
@@ -1106,7 +1106,7 @@ function resolvePluginSkillDirs(params) {
|
|
|
1106
1106
|
const trimmed = raw.trim();
|
|
1107
1107
|
if (!trimmed) continue;
|
|
1108
1108
|
const candidate = path.resolve(record.rootDir, trimmed);
|
|
1109
|
-
if (!
|
|
1109
|
+
if (!fsSync.existsSync(candidate)) {
|
|
1110
1110
|
log$1.warn(`plugin skill path not found (${record.id}): ${candidate}`);
|
|
1111
1111
|
continue;
|
|
1112
1112
|
}
|
|
@@ -1133,7 +1133,7 @@ async function serializeByKey(key, task) {
|
|
|
1133
1133
|
|
|
1134
1134
|
//#endregion
|
|
1135
1135
|
//#region src/agents/skills/workspace.ts
|
|
1136
|
-
const fsp =
|
|
1136
|
+
const fsp = fsSync.promises;
|
|
1137
1137
|
const skillsLogger = createSubsystemLogger("skills");
|
|
1138
1138
|
const skillCommandDebugOnce = /* @__PURE__ */ new Set();
|
|
1139
1139
|
function debugSkillCommandOnce(messageKey, message, meta) {
|
|
@@ -1226,7 +1226,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
1226
1226
|
return Array.from(merged.values()).map((skill) => {
|
|
1227
1227
|
let frontmatter = {};
|
|
1228
1228
|
try {
|
|
1229
|
-
frontmatter = parseFrontmatter(
|
|
1229
|
+
frontmatter = parseFrontmatter(fsSync.readFileSync(skill.filePath, "utf-8"));
|
|
1230
1230
|
} catch {}
|
|
1231
1231
|
return {
|
|
1232
1232
|
skill,
|
|
@@ -1465,7 +1465,7 @@ function isModuleNotFoundError(err) {
|
|
|
1465
1465
|
}
|
|
1466
1466
|
async function loadPwAiModule(mode) {
|
|
1467
1467
|
try {
|
|
1468
|
-
return await import("./pw-ai-
|
|
1468
|
+
return await import("./pw-ai-BCyIw4W4.js");
|
|
1469
1469
|
} catch (err) {
|
|
1470
1470
|
if (mode === "soft") return null;
|
|
1471
1471
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -3123,11 +3123,11 @@ async function movePathToTrash(targetPath) {
|
|
|
3123
3123
|
return targetPath;
|
|
3124
3124
|
} catch {
|
|
3125
3125
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
3126
|
-
|
|
3126
|
+
fsSync.mkdirSync(trashDir, { recursive: true });
|
|
3127
3127
|
const base = path.basename(targetPath);
|
|
3128
3128
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
3129
|
-
if (
|
|
3130
|
-
|
|
3129
|
+
if (fsSync.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${Math.random()}`);
|
|
3130
|
+
fsSync.renameSync(targetPath, dest);
|
|
3131
3131
|
return dest;
|
|
3132
3132
|
}
|
|
3133
3133
|
}
|
|
@@ -3205,7 +3205,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
3205
3205
|
} catch {}
|
|
3206
3206
|
const userDataDir = resolveOpenClawUserDataDir(name);
|
|
3207
3207
|
const profileDir = path.dirname(userDataDir);
|
|
3208
|
-
if (
|
|
3208
|
+
if (fsSync.existsSync(profileDir)) {
|
|
3209
3209
|
await movePathToTrash(profileDir);
|
|
3210
3210
|
deleted = true;
|
|
3211
3211
|
}
|
|
@@ -3835,13 +3835,13 @@ function createProfileContext(opts, profile) {
|
|
|
3835
3835
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
3836
3836
|
const profileState = getProfileState();
|
|
3837
3837
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
3838
|
-
await (await import("./pw-ai-
|
|
3838
|
+
await (await import("./pw-ai-BCyIw4W4.js")).closePlaywrightBrowserConnection();
|
|
3839
3839
|
} catch {}
|
|
3840
3840
|
if (profileState.running) await stopRunningBrowser();
|
|
3841
3841
|
try {
|
|
3842
|
-
await (await import("./pw-ai-
|
|
3842
|
+
await (await import("./pw-ai-BCyIw4W4.js")).closePlaywrightBrowserConnection();
|
|
3843
3843
|
} catch {}
|
|
3844
|
-
if (!
|
|
3844
|
+
if (!fsSync.existsSync(userDataDir)) return {
|
|
3845
3845
|
moved: false,
|
|
3846
3846
|
from: userDataDir
|
|
3847
3847
|
};
|
|
@@ -6188,7 +6188,7 @@ function releaseAllLocksSync() {
|
|
|
6188
6188
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
6189
6189
|
} catch {}
|
|
6190
6190
|
try {
|
|
6191
|
-
|
|
6191
|
+
fsSync.rmSync(held.lockPath, { force: true });
|
|
6192
6192
|
} catch {}
|
|
6193
6193
|
HELD_LOCKS.delete(sessionFile);
|
|
6194
6194
|
}
|
|
@@ -6403,7 +6403,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
6403
6403
|
}
|
|
6404
6404
|
function getFileMtimeMs(filePath) {
|
|
6405
6405
|
try {
|
|
6406
|
-
return
|
|
6406
|
+
return fsSync.statSync(filePath).mtimeMs;
|
|
6407
6407
|
} catch {
|
|
6408
6408
|
return;
|
|
6409
6409
|
}
|
|
@@ -6480,7 +6480,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
6480
6480
|
let store = {};
|
|
6481
6481
|
let mtimeMs = getFileMtimeMs(storePath);
|
|
6482
6482
|
try {
|
|
6483
|
-
const raw =
|
|
6483
|
+
const raw = fsSync.readFileSync(storePath, "utf-8");
|
|
6484
6484
|
const parsed = JSON.parse(raw);
|
|
6485
6485
|
if (isSessionStoreRecord(parsed)) store = parsed;
|
|
6486
6486
|
mtimeMs = getFileMtimeMs(storePath) ?? mtimeMs;
|
|
@@ -6618,7 +6618,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
6618
6618
|
}
|
|
6619
6619
|
async function getSessionFileSize(storePath) {
|
|
6620
6620
|
try {
|
|
6621
|
-
return (await
|
|
6621
|
+
return (await fsSync.promises.stat(storePath)).size;
|
|
6622
6622
|
} catch {
|
|
6623
6623
|
return null;
|
|
6624
6624
|
}
|
|
@@ -6635,7 +6635,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6635
6635
|
if (fileSize <= maxBytes) return false;
|
|
6636
6636
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
6637
6637
|
try {
|
|
6638
|
-
await
|
|
6638
|
+
await fsSync.promises.rename(storePath, backupPath);
|
|
6639
6639
|
log.info("rotated session store file", {
|
|
6640
6640
|
backupPath: path.basename(backupPath),
|
|
6641
6641
|
sizeBytes: fileSize
|
|
@@ -6646,11 +6646,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
6646
6646
|
try {
|
|
6647
6647
|
const dir = path.dirname(storePath);
|
|
6648
6648
|
const baseName = path.basename(storePath);
|
|
6649
|
-
const backups = (await
|
|
6649
|
+
const backups = (await fsSync.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
6650
6650
|
const maxBackups = 3;
|
|
6651
6651
|
if (backups.length > maxBackups) {
|
|
6652
6652
|
const toDelete = backups.slice(maxBackups);
|
|
6653
|
-
for (const old of toDelete) await
|
|
6653
|
+
for (const old of toDelete) await fsSync.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
6654
6654
|
log.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
6655
6655
|
}
|
|
6656
6656
|
} catch {}
|
|
@@ -6687,11 +6687,11 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6687
6687
|
await rotateSessionFile(storePath, maintenance.rotateBytes);
|
|
6688
6688
|
}
|
|
6689
6689
|
}
|
|
6690
|
-
await
|
|
6690
|
+
await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6691
6691
|
const json = JSON.stringify(store, null, 2);
|
|
6692
6692
|
if (process.platform === "win32") {
|
|
6693
6693
|
try {
|
|
6694
|
-
await
|
|
6694
|
+
await fsSync.promises.writeFile(storePath, json, "utf-8");
|
|
6695
6695
|
} catch (err) {
|
|
6696
6696
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") return;
|
|
6697
6697
|
throw err;
|
|
@@ -6700,21 +6700,21 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6700
6700
|
}
|
|
6701
6701
|
const tmp = `${storePath}.${process.pid}.${crypto.randomUUID()}.tmp`;
|
|
6702
6702
|
try {
|
|
6703
|
-
await
|
|
6703
|
+
await fsSync.promises.writeFile(tmp, json, {
|
|
6704
6704
|
mode: 384,
|
|
6705
6705
|
encoding: "utf-8"
|
|
6706
6706
|
});
|
|
6707
|
-
await
|
|
6708
|
-
await
|
|
6707
|
+
await fsSync.promises.rename(tmp, storePath);
|
|
6708
|
+
await fsSync.promises.chmod(storePath, 384);
|
|
6709
6709
|
} catch (err) {
|
|
6710
6710
|
if ((err && typeof err === "object" && "code" in err ? String(err.code) : null) === "ENOENT") {
|
|
6711
6711
|
try {
|
|
6712
|
-
await
|
|
6713
|
-
await
|
|
6712
|
+
await fsSync.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
6713
|
+
await fsSync.promises.writeFile(storePath, json, {
|
|
6714
6714
|
mode: 384,
|
|
6715
6715
|
encoding: "utf-8"
|
|
6716
6716
|
});
|
|
6717
|
-
await
|
|
6717
|
+
await fsSync.promises.chmod(storePath, 384);
|
|
6718
6718
|
} catch (err2) {
|
|
6719
6719
|
if ((err2 && typeof err2 === "object" && "code" in err2 ? String(err2.code) : null) === "ENOENT") return;
|
|
6720
6720
|
throw err2;
|
|
@@ -6723,7 +6723,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
6723
6723
|
}
|
|
6724
6724
|
throw err;
|
|
6725
6725
|
} finally {
|
|
6726
|
-
await
|
|
6726
|
+
await fsSync.promises.rm(tmp, { force: true });
|
|
6727
6727
|
}
|
|
6728
6728
|
}
|
|
6729
6729
|
async function updateSessionStore(storePath, mutator, opts) {
|
|
@@ -6942,8 +6942,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
6942
6942
|
return trimmed ? trimmed : null;
|
|
6943
6943
|
}
|
|
6944
6944
|
async function ensureSessionHeader(params) {
|
|
6945
|
-
if (
|
|
6946
|
-
await
|
|
6945
|
+
if (fsSync.existsSync(params.sessionFile)) return;
|
|
6946
|
+
await fsSync.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
6947
6947
|
const header = {
|
|
6948
6948
|
type: "session",
|
|
6949
6949
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -6951,7 +6951,7 @@ async function ensureSessionHeader(params) {
|
|
|
6951
6951
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
6952
6952
|
cwd: process.cwd()
|
|
6953
6953
|
};
|
|
6954
|
-
await
|
|
6954
|
+
await fsSync.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
6955
6955
|
}
|
|
6956
6956
|
async function appendAssistantMessageToSessionTranscript(params) {
|
|
6957
6957
|
const sessionKey = params.sessionKey.trim();
|
|
@@ -5,7 +5,7 @@ import { G as isPidAlive, M as parseBooleanValue } from "./model-selection-Cb682
|
|
|
5
5
|
import { t as formatCliCommand } from "./command-format-qUVxzqYm.js";
|
|
6
6
|
import { C as detectMime, G as resolveSlackReplyToMode, I as normalizeChannelId, J as normalizeChatType, R as normalizeWhatsAppTarget, V as resolveTelegramAccount, W as resolveSlackAccount, X as resolveDiscordAccount, _ as normalizeMessageChannel, a as resizeToJpeg, g as listDeliverableMessageChannels, n as getImageMetadata, w as extensionForMime } from "./image-ops-B9jnR447.js";
|
|
7
7
|
import { M as resolveWhatsAppAccount, a as writeConfigFile, b as resolveMemorySlotDecision, d as parseDurationMs, g as MANIFEST_KEY, h as LEGACY_MANIFEST_KEYS, n as loadConfig, p as loadPluginManifestRegistry, s as parseByteSize, t as createConfigIO, v as normalizePluginsConfig, y as resolveEnableState } from "./config-Ejc5JKGl.js";
|
|
8
|
-
import { A as DEFAULT_OPENCLAW_BROWSER_ENABLED, D as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, E as DEFAULT_AI_SNAPSHOT_MAX_CHARS, O as DEFAULT_BROWSER_EVALUATE_ENABLED, T as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as fetchOk, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, k as DEFAULT_OPENCLAW_BROWSER_COLOR, l as createTargetViaCdp, m as fetchJson, n as isChromeCdpReady, o as stopOpenClawChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as ensureChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, x as isLoopbackHost, y as stopChromeExtensionRelayServer } from "./chrome-
|
|
8
|
+
import { A as DEFAULT_OPENCLAW_BROWSER_ENABLED, D as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, E as DEFAULT_AI_SNAPSHOT_MAX_CHARS, O as DEFAULT_BROWSER_EVALUATE_ENABLED, T as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, a as resolveOpenClawUserDataDir, c as captureScreenshot, d as normalizeCdpWsUrl, f as snapshotAria, h as fetchOk, i as launchOpenClawChrome, j as DEFAULT_OPENCLAW_BROWSER_PROFILE_NAME, k as DEFAULT_OPENCLAW_BROWSER_COLOR, l as createTargetViaCdp, m as fetchJson, n as isChromeCdpReady, o as stopOpenClawChrome, p as appendCdpPath, r as isChromeReachable, s as resolveBrowserExecutableForPlatform, v as ensureChromeExtensionRelayServer, w as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH, x as isLoopbackHost, y as stopChromeExtensionRelayServer } from "./chrome-B2PpxswT.js";
|
|
9
9
|
import { n as formatErrorMessage, t as extractErrorCode } from "./errors-B8y79jwX.js";
|
|
10
10
|
import { n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CdHoK26P.js";
|
|
11
11
|
import { t as emitSessionTranscriptUpdate } from "./transcript-events-BiU0SOrl.js";
|
|
@@ -1708,7 +1708,7 @@ function isModuleNotFoundError(err) {
|
|
|
1708
1708
|
}
|
|
1709
1709
|
async function loadPwAiModule(mode) {
|
|
1710
1710
|
try {
|
|
1711
|
-
return await import("./pw-ai-
|
|
1711
|
+
return await import("./pw-ai-Bbd79y0r.js");
|
|
1712
1712
|
} catch (err) {
|
|
1713
1713
|
if (mode === "soft") return null;
|
|
1714
1714
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -4135,11 +4135,11 @@ function createProfileContext(opts, profile) {
|
|
|
4135
4135
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
4136
4136
|
const profileState = getProfileState();
|
|
4137
4137
|
if (await isHttpReachable(300) && !profileState.running) try {
|
|
4138
|
-
await (await import("./pw-ai-
|
|
4138
|
+
await (await import("./pw-ai-Bbd79y0r.js")).closePlaywrightBrowserConnection();
|
|
4139
4139
|
} catch {}
|
|
4140
4140
|
if (profileState.running) await stopRunningBrowser();
|
|
4141
4141
|
try {
|
|
4142
|
-
await (await import("./pw-ai-
|
|
4142
|
+
await (await import("./pw-ai-Bbd79y0r.js")).closePlaywrightBrowserConnection();
|
|
4143
4143
|
} catch {}
|
|
4144
4144
|
if (!fs.existsSync(userDataDir)) return {
|
|
4145
4145
|
moved: false,
|