@bitseek/claw 1.3.6 → 1.3.7
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-CX1yOBOk.js → accounts-BTexwKe8.js} +1 -1
- package/dist/{accounts-Bwq1wvds.js → accounts-DMvETf-t.js} +1 -1
- package/dist/{accounts-CaiECgq3.js → accounts-ubG6irXZ.js} +16 -16
- package/dist/{active-listener-neKWQsOO.js → active-listener-Hd9sOu9T.js} +1 -1
- package/dist/{agent-scope-CTbRzU1C.js → agent-scope-C6hps0r3.js} +4 -4
- package/dist/{api-key-rotation-BbZD-rsQ.js → api-key-rotation-Cv5_SG_o.js} +2 -2
- package/dist/{audio-preflight-C5Crv38h.js → audio-preflight-C2pZmbnM.js} +39 -39
- package/dist/{audio-transcription-runner-eVtEKUPC.js → audio-transcription-runner-CQ4BMvGX.js} +11 -11
- package/dist/{bindings-Daa-Etag.js → bindings-CsIiIjqN.js} +2 -2
- package/dist/build-info.json +2 -2
- package/dist/bundled/boot-md/handler.js +65 -65
- package/dist/bundled/bootstrap-extra-files/handler.js +7 -7
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +65 -65
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{plugin-sdk/channel-activity-DAEbma-o.js → channel-activity-Dwc2BBvs.js} +3 -3
- package/dist/{chrome-BRjY_MCc.js → chrome-DWfXErGH.js} +26 -26
- package/dist/{chunk-Dfkbh8wX.js → chunk-2ZxftpDd.js} +1 -1
- package/dist/{command-registry-BSN6zVlZ.js → command-registry-CtTmCFgA.js} +5 -5
- package/dist/{commands-registry-NyRDVN7s.js → commands-registry-CTkboeeC.js} +5 -5
- package/dist/{completion-cli-lZ6S6oKA.js → completion-cli-D_Hxee-R.js} +2 -2
- package/dist/{completion-cli-BDeiV4p9.js → completion-cli-wYWbi5wA.js} +1 -1
- package/dist/{deliver-DlLNT2iR.js → deliver-zrYSWfQ5.js} +22 -22
- package/dist/{diagnostic-DpOlXoSr.js → diagnostic-BO1GQJJf.js} +2 -2
- package/dist/{dock-DXlPVrMo.js → dock-Bm23mfim.js} +6 -6
- package/dist/{doctor-completion-BKCOmkBi.js → doctor-completion-BYgrEW3s.js} +1 -1
- package/dist/{doctor-completion-Bim4XRFT.js → doctor-completion-Bai361_Y.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{env-Bn6pmvjK.js → env-DNMZEG57.js} +2 -2
- package/dist/{plugin-sdk/errors-jusxdu7M.js → errors-B11yhRo6.js} +1 -1
- package/dist/{fetch-2cO0rj7X.js → fetch-4RonjgqX.js} +5 -5
- package/dist/{fetch-guard-iigSYt3Q.js → fetch-guard-B1EGEHan.js} +2 -2
- package/dist/{frontmatter-rlCI8Hmw.js → frontmatter-D6vByAHn.js} +2 -2
- package/dist/{fs-safe-CM9EhGvi.js → fs-safe-C77EShMC.js} +4 -4
- package/dist/{gateway-cli-CDgld1qp.js → gateway-cli-C3ftrrlK.js} +1 -1
- package/dist/{gateway-cli-8DmbQc9V.js → gateway-cli-CBGutU8q.js} +1 -1
- package/dist/{github-copilot-token-CPjAmbfr.js → github-copilot-token-DLGN-8YS.js} +7 -7
- package/dist/{image-BWlmyhr-.js → image-DnxYCkHO.js} +6 -6
- package/dist/{image-ops-jvmQoiyw.js → image-ops-DCpyia_K.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{internal-hooks-oLQ2m8YT.js → internal-hooks-yQe6H47q.js} +1 -1
- package/dist/{ir-pR36nI-3.js → ir-DcDVAFj3.js} +6 -6
- package/dist/llm-slug-generator.js +65 -65
- package/dist/{plugin-sdk/logger-Cr-x0vMf.js → logger-BlH5MJiV.js} +1 -1
- package/dist/{login-Cm2zDfEU.js → login-CgEHUE7h.js} +6 -6
- package/dist/{login-qr-iS1jPDpP.js → login-qr-DUJfhbUe.js} +13 -13
- package/dist/{manager-BX3KtavU.js → manager-tozHviEd.js} +15 -15
- package/dist/{markdown-tables-pfs_NCNh.js → markdown-tables-BHONoo6S.js} +1 -1
- package/dist/{message-channel-DB68nc40.js → message-channel-pbgFFUNm.js} +1 -1
- package/dist/{model-selection-DfZMxaX3.js → model-selection-D_Si2Ict.js} +44 -44
- package/dist/{onboard-BcaFvsav.js → onboard-C0Bo_5Vw.js} +1 -1
- package/dist/{onboard-sKY5jwsH.js → onboard-CI1TyO0l.js} +1 -1
- package/dist/{onboarding-BRfS3PSa.js → onboarding-DjOCmNCk.js} +1 -1
- package/dist/{onboarding-JNyox6ZE.js → onboarding-DufCP2B8.js} +1 -1
- package/dist/{onboarding.finalize-hBg4b8IC.js → onboarding.finalize-BI2feWXN.js} +4 -4
- package/dist/{onboarding.finalize-CG9tTRyw.js → onboarding.finalize-C7iEnG3X.js} +3 -3
- package/dist/{outbound-N9_vLIGT.js → outbound-9rXkgGZM.js} +7 -7
- package/dist/{outbound-attachment-CEt49GWZ.js → outbound-attachment-Cy8rvvJE.js} +2 -2
- package/dist/{path-alias-guards-xY_GOJVd.js → path-alias-guards-Cpb5gMG6.js} +1 -1
- package/dist/{paths-Bi8MJ8NM.js → paths-BHEVctLd.js} +3 -3
- package/dist/{paths-DKuX7-1L.js → paths-aGRLvQx9.js} +5 -5
- package/dist/{pi-embedded-CDXssetE.js → pi-embedded-BQqt592d.js} +187 -187
- package/dist/{pi-embedded-helpers-DSPiPpLM.js → pi-embedded-helpers-Bo7e-QzJ.js} +29 -29
- package/dist/{pi-model-discovery-N7o4F93J.js → pi-model-discovery-DA46fxhD.js} +7 -7
- package/dist/plugin-sdk/{accounts-COLYAAOx.js → accounts-4WE2wtsW.js} +1 -1
- package/dist/plugin-sdk/{accounts-BZrkOo6-.js → accounts-AbI8uETR.js} +1 -1
- package/dist/plugin-sdk/{accounts-D_pT5EjF.js → accounts-BYcizTXn.js} +3 -3
- package/dist/plugin-sdk/{active-listener-DxBXcWm_.js → active-listener-pnqLAUOh.js} +1 -1
- package/dist/plugin-sdk/{agent-scope-DT5pxpJB.js → agent-scope-_j3fIYCK.js} +3 -3
- package/dist/plugin-sdk/{api-key-rotation-Dl6Ad7Nj.js → api-key-rotation-CYI51U_M.js} +2 -2
- package/dist/plugin-sdk/{audio-preflight-PGsiEosa.js → audio-preflight-D8BVTHCB.js} +33 -33
- package/dist/plugin-sdk/{audio-transcription-runner-CooPnqtC.js → audio-transcription-runner-CRpY5uDq.js} +10 -10
- package/dist/plugin-sdk/{bindings-BSfhEjKN.js → bindings-CxxzC7gn.js} +2 -2
- package/dist/{channel-activity-D0BHmeoE.js → plugin-sdk/channel-activity-B3yZ-f-m.js} +3 -3
- package/dist/plugin-sdk/{channel-web-Dn5fneOY.js → channel-web-BgnipXq5.js} +23 -23
- package/dist/plugin-sdk/{chrome-Dn0G4NoF.js → chrome-oPevdeh5.js} +7 -7
- package/dist/plugin-sdk/{chunk-cvtXztAT.js → chunk-BPyPeheZ.js} +1 -1
- package/dist/plugin-sdk/{command-format-BOJz3y1v.js → command-format-DvyMEXQo.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-CZWv_JwZ.js → commands-registry-Dk8re8Lz.js} +5 -5
- package/dist/plugin-sdk/{config-DAwOhnVF.js → config-D7I2_X4P.js} +10 -10
- package/dist/plugin-sdk/{deliver-PdH-MCq8.js → deliver-NrIHn0__.js} +11 -11
- package/dist/plugin-sdk/{diagnostic-BZvj-qNu.js → diagnostic-DL3k_wRi.js} +2 -2
- package/dist/plugin-sdk/{dock-BdR3OYZn.js → dock-CjdkiLH7.js} +6 -6
- package/dist/{errors-Ct2kCLWx.js → plugin-sdk/errors-DFTN4h2I.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-Dary6WwJ.js → fetch-guard-BivEyA4v.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-DMCE0ej9.js → fs-safe-B256n7Ff.js} +3 -3
- package/dist/plugin-sdk/{image-B3A2l2ep.js → image-CkPzr3XN.js} +6 -6
- package/dist/plugin-sdk/{image-ops-DulHE5Qc.js → image-ops-C9GXWF3o.js} +1 -1
- package/dist/plugin-sdk/index.js +64 -64
- package/dist/plugin-sdk/{ir-BFXiJrsN.js → ir-BIm-jvIK.js} +6 -6
- package/dist/plugin-sdk/{local-roots-DssN60r6.js → local-roots-2AOXGUXW.js} +4 -4
- package/dist/{logger-DelEB7MK.js → plugin-sdk/logger-CNhs9eKJ.js} +1 -1
- package/dist/plugin-sdk/{login-D0ul3-6C.js → login-BcLiF9tC.js} +6 -6
- package/dist/plugin-sdk/{login-qr-XWKTFBuI.js → login-qr-GyPUodKJ.js} +9 -9
- package/dist/plugin-sdk/{manager-DGx_cF54.js → manager-DYLqNUb4.js} +10 -10
- package/dist/plugin-sdk/{markdown-tables-CsQpDNU5.js → markdown-tables-D9mmqMKi.js} +1 -1
- package/dist/plugin-sdk/{message-channel-CvNq-esz.js → message-channel-_CEZcqxE.js} +1 -1
- package/dist/plugin-sdk/{outbound-D29FHlQl.js → outbound-DdTsUaXa.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-DRHrZUOx.js → outbound-attachment--hkuIDR1.js} +2 -2
- package/dist/plugin-sdk/{path-alias-guards-DpKV1B5p.js → path-alias-guards-BqUCBfUg.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-CKEUWckk.js → pi-embedded-helpers-CTfvZz83.js} +17 -17
- package/dist/plugin-sdk/{pi-model-discovery-BPeQq9XM.js → pi-model-discovery-CK3Ih_kq.js} +1 -1
- package/dist/plugin-sdk/{plugins-DF_dKXTR.js → plugins-BpHAMNJ1.js} +6 -6
- package/dist/plugin-sdk/{proxy-BfmEDoun.js → proxy-BJdRZOnJ.js} +1 -1
- package/dist/plugin-sdk/{proxy-fetch-BpHIgvBk.js → proxy-fetch-jmbopGcm.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-BmmXDjtm.js → pw-ai-D0Kx7w1D.js} +13 -13
- package/dist/plugin-sdk/{qmd-manager-3hQbqkm5.js → qmd-manager-BDcutPp9.js} +8 -8
- package/dist/plugin-sdk/{query-expansion-BOGLUWB7.js → query-expansion-C_X8SyEA.js} +2 -2
- package/dist/{redact-BC9R18Uw.js → plugin-sdk/redact-DH8u23pF.js} +1 -1
- package/dist/plugin-sdk/{registry-Cv-oHUj1.js → registry-HF8_S7QO.js} +2 -2
- package/dist/{replies-B6I1tT5t.js → plugin-sdk/replies-DbjvV4gf.js} +3 -3
- package/dist/plugin-sdk/{reply-rsLB0nJs.js → reply-DpplAsbO.js} +93 -93
- package/dist/plugin-sdk/{reply-prefix-DXthVxCx.js → reply-prefix-KODsMNJ-.js} +1 -1
- package/dist/plugin-sdk/{resolve-outbound-target-D3Y4F2Le.js → resolve-outbound-target-BPT4aNiD.js} +2 -2
- package/dist/plugin-sdk/{resolve-route-DuwYYn4a.js → resolve-route-De2B5QY_.js} +4 -4
- package/dist/plugin-sdk/{retry-BMcrIz7L.js → retry-pZ8iKytf.js} +1 -1
- package/dist/plugin-sdk/{send-D0AaWnIj.js → send-1uW-uqPf.js} +7 -7
- package/dist/plugin-sdk/{send-C5USYGq7.js → send-BoNw1Bki.js} +8 -8
- package/dist/plugin-sdk/{send-B0ztz6QC.js → send-C-Rd2stz.js} +6 -6
- package/dist/plugin-sdk/{send-DJzwu8kk.js → send-CZIN8SDx.js} +15 -15
- package/dist/plugin-sdk/{send-DEyQJTzd.js → send-wCqsQs_s.js} +10 -10
- package/dist/plugin-sdk/{session-meta-ChWvKVWj.js → session-meta-7J-uHiM_.js} +1 -1
- package/dist/plugin-sdk/{session-BA7tVDpV.js → session-ooYcB82T.js} +5 -5
- package/dist/plugin-sdk/{sessions-BXps6YzJ.js → sessions-lAIo5l8W.js} +6 -6
- package/dist/plugin-sdk/{skill-commands-B20uUsji.js → skill-commands-D1Q6hGS4.js} +5 -5
- package/dist/plugin-sdk/{skills-DXOTei42.js → skills-BWSDv2F_.js} +8 -8
- package/dist/plugin-sdk/{ssrf-Doxv9M7Q.js → ssrf-JKDwTi8i.js} +1 -1
- package/dist/plugin-sdk/{store-BZbE1V-C.js → store-BMeqzQAf.js} +2 -2
- package/dist/plugin-sdk/{subsystem-CM1s2lDT.js → subsystem-B0V8LFBA.js} +2 -2
- package/dist/plugin-sdk/{tables-BhH8EIqU.js → tables-DCSeBGBz.js} +1 -1
- package/dist/{target-errors-C-KolUyX.js → plugin-sdk/target-errors-0u6pegQv.js} +2 -2
- package/dist/{tokens-BvzZdrVJ.js → plugin-sdk/tokens-DF2_VTJy.js} +1 -1
- package/dist/{tool-images-DiKIlElg.js → plugin-sdk/tool-images-BbsgbHMZ.js} +2 -2
- package/dist/plugin-sdk/{tool-loop-detection-CygMSQUK.js → tool-loop-detection-JkCpGrfk.js} +2 -2
- package/dist/plugin-sdk/{utils-BcL6KGZf.js → utils-BfVxx6bk.js} +1 -1
- package/dist/plugin-sdk/web-pXzbtWjI.js +72 -0
- package/dist/plugin-sdk/{whatsapp-actions-CRean1yN.js → whatsapp-actions-tVcrGNQc.js} +25 -25
- package/dist/{plugins-D63QYxW6.js → plugins-CJoaoIHc.js} +11 -11
- package/dist/{program-B_-eFyJE.js → program-CQtsVyIe.js} +2 -2
- package/dist/{program-context-BJQXRZ1w.js → program-context-CbirfwjC.js} +7 -7
- package/dist/{prompt-select-styled-asxoqY78.js → prompt-select-styled-BlHvgGuv.js} +1 -1
- package/dist/{prompt-select-styled-QH4mD93d.js → prompt-select-styled-CY9iF1l-.js} +1 -1
- package/dist/{proxy-jINniQBi.js → proxy-DfJJLvch.js} +1 -1
- package/dist/{proxy-env-Drg9J503.js → proxy-env-ynOWOBHx.js} +1 -1
- package/dist/{proxy-fetch-AvkSvetA.js → proxy-fetch-xlbVQYN_.js} +1 -1
- package/dist/{pw-ai-gDXxKGzT.js → pw-ai-Cu3cnNF0.js} +17 -17
- package/dist/{qmd-manager-DXbV8CPG.js → qmd-manager-n4jauq3A.js} +11 -11
- package/dist/{query-expansion-C0A4WwZX.js → query-expansion-CdDUaBcQ.js} +5 -5
- package/dist/{plugin-sdk/redact-BOuKZWXa.js → redact-CaZQhKzI.js} +1 -1
- package/dist/{register.maintenance-DvWoKstb.js → register.maintenance-Cid2HJ-t.js} +5 -5
- package/dist/{register.maintenance-B0nZqqML.js → register.maintenance-CyXghztz.js} +4 -4
- package/dist/{register.onboard-DOhvWYV7.js → register.onboard-BsT9XRRr.js} +2 -2
- package/dist/{register.onboard-B1-O21vU.js → register.onboard-CoItO2Ov.js} +2 -2
- package/dist/{register.setup-ixDBzvTR.js → register.setup-2S-SXPOC.js} +2 -2
- package/dist/{register.setup-KPZYo_I1.js → register.setup-DJjPOLJK.js} +2 -2
- package/dist/{register.start-Df91ZVJJ.js → register.start-CI8ol0Mk.js} +1 -1
- package/dist/{register.start-DErNT3nQ.js → register.start-D5trBtN0.js} +1 -1
- package/dist/{register.subclis-BSGvOwqU.js → register.subclis-CIlBs5A-.js} +3 -3
- package/dist/{registry-C2GEGa2t.js → registry-CJCkqTms.js} +3 -3
- package/dist/{plugin-sdk/replies-CddwWBTJ.js → replies-D6zARd6r.js} +3 -3
- package/dist/{reply-prefix-9mzt89Cf.js → reply-prefix-DK1i6bCJ.js} +1 -1
- package/dist/{resolve-route-BNElrVxR.js → resolve-route-C5hVstLo.js} +4 -4
- package/dist/{retry-Ayb7e4XG.js → retry-DTeP7C3h.js} +1 -1
- package/dist/{run-main-CdI1kXKr.js → run-main-bo-QbYn_.js} +3 -3
- package/dist/{send-BMzVXosN.js → send--Gq-Uh-l.js} +7 -7
- package/dist/{send-DC_e_Iev.js → send-BpyiQEov.js} +6 -6
- package/dist/{send-B6QQ8XfC.js → send-CcQZM0c7.js} +8 -8
- package/dist/{send-Buidj_8L.js → send-D2zYssqK.js} +27 -27
- package/dist/{send-BQETStDl.js → send-DcL81tZr.js} +10 -10
- package/dist/{session-meta-DAMj6ZRX.js → session-meta-BbCwXniv.js} +2 -2
- package/dist/{session-TVb8hgJP.js → session-xKPVUYQP.js} +9 -9
- package/dist/{sessions-Ck4ZR4dY.js → sessions-D7EjW0sG.js} +31 -31
- package/dist/{skill-commands-KesfMtZ9.js → skill-commands-Cea3CZFF.js} +9 -9
- package/dist/{skills-BYmEoxNo.js → skills-BttlqUXr.js} +22 -22
- package/dist/{store-KLMMBnKE.js → store-B7PaqfvZ.js} +2 -2
- package/dist/{subsystem-CAatx5oo.js → subsystem-BRjuJbbM.js} +14 -14
- package/dist/{tables-DqechQWF.js → tables-BJ0XAman.js} +1 -1
- package/dist/{plugin-sdk/target-errors-QZay02Cv.js → target-errors-Dad0aUFR.js} +2 -2
- package/dist/{plugin-sdk/tokens-DIE-Bf72.js → tokens-B9EDT4jv.js} +1 -1
- package/dist/{plugin-sdk/tool-images-heXfaJdb.js → tool-images-ArXzv82F.js} +2 -2
- package/dist/{tool-loop-detection-C4V990MS.js → tool-loop-detection-CLoYKYIq.js} +3 -3
- package/dist/{update-cli-CfeiDzYx.js → update-cli-BYrdZPXD.js} +4 -4
- package/dist/{update-cli-DKmrzt8l.js → update-cli-wmp8VSbx.js} +5 -5
- package/dist/{utils-Bo1RFF0l.js → utils-BFZnl-5N.js} +6 -6
- package/dist/{web-BPI4HIht.js → web-C5gLi1bN.js} +69 -69
- package/dist/{whatsapp-actions-Bf61u88d.js → whatsapp-actions-Be9uvUUL.js} +28 -28
- package/dist/{workspace-CswOYN9T.js → workspace-D6mrCnXi.js} +21 -21
- package/package.json +1 -1
- package/dist/plugin-sdk/web-RBob4uU1.js +0 -72
|
@@ -1,90 +1,90 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { c as resolveDefaultAgentId, d as resolveSessionAgentId, f as resolveSessionAgentIds, g as toAgentModelListLike, h as resolveAgentModelPrimaryValue, i as resolveAgentDir, l as resolveEffectiveModelFallbacks, m as resolveAgentModelFallbackValues, n as listAgentIds, o as resolveAgentSkillsFilter, r as resolveAgentConfig, s as resolveAgentWorkspaceDir, t as hasConfiguredModelFallbacks, u as resolveRunModelFallbacksOverride } from "./agent-scope-
|
|
3
|
-
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, p as resolveCliName, r as resolveConfigPath } from "./paths-
|
|
4
|
-
import { C as normalizeLogLevel, E as consumeRootOptionToken, T as FLAG_TERMINATOR, _ as isRich, a as clearActiveProgressLine, c as danger, f as setVerbose, g as colorize, h as warn, i as defaultRuntime, o as registerActiveProgressLine, p as shouldLogVerbose, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger, u as logVerbose, v as theme, w as resolvePreferredOpenClawTmpDir, y as getChildLogger } from "./subsystem-
|
|
2
|
+
import { c as resolveDefaultAgentId, d as resolveSessionAgentId, f as resolveSessionAgentIds, g as toAgentModelListLike, h as resolveAgentModelPrimaryValue, i as resolveAgentDir, l as resolveEffectiveModelFallbacks, m as resolveAgentModelFallbackValues, n as listAgentIds, o as resolveAgentSkillsFilter, r as resolveAgentConfig, s as resolveAgentWorkspaceDir, t as hasConfiguredModelFallbacks, u as resolveRunModelFallbacksOverride } from "./agent-scope-C6hps0r3.js";
|
|
3
|
+
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, p as resolveCliName, r as resolveConfigPath } from "./paths-aGRLvQx9.js";
|
|
4
|
+
import { C as normalizeLogLevel, E as consumeRootOptionToken, T as FLAG_TERMINATOR, _ as isRich, a as clearActiveProgressLine, c as danger, f as setVerbose, g as colorize, h as warn, i as defaultRuntime, o as registerActiveProgressLine, p as shouldLogVerbose, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger, u as logVerbose, v as theme, w as resolvePreferredOpenClawTmpDir, y as getChildLogger } from "./subsystem-BRjuJbbM.js";
|
|
5
5
|
import { C as resolveThreadParentSessionKey, S as parseAgentSessionKey, _ as deriveSessionChatType, b as isCronSessionKey, c as normalizeAgentId, d as resolveThreadSessionKeys, f as sanitizeAgentId, g as isBlockedObjectKey, h as normalizeOptionalAccountId, l as normalizeMainKey, m as normalizeAccountId$2, o as classifySessionKeyShape, p as DEFAULT_ACCOUNT_ID, r as buildAgentMainSessionKey, s as isValidAgentId, t as DEFAULT_AGENT_ID, u as resolveAgentIdFromSessionKey, v as getSubagentDepth, x as isSubagentSessionKey, y as isAcpSessionKey } from "./session-key-a6av96Fj.js";
|
|
6
|
-
import { C as isPlainObject, S as truncateUtf16Safe, _ as shortenHomeInString, a as ensureDir$3, b as sliceUtf16Safe, c as isRecord$1, d as normalizeE164, h as resolveUserPath, o as escapeRegExp, r as clampInt, s as formatTerminalLink, t as CONFIG_DIR, v as shortenHomePath, y as sleep$1 } from "./utils-
|
|
7
|
-
import { C as openBoundaryFileSync, M as normalizeWindowsPathForComparison, S as openBoundaryFile, a as DEFAULT_IDENTITY_FILENAME, b as spawnWithFallback, f as loadWorkspaceBootstrapFiles, g as resolveOpenClawPackageRoot, l as ensureAgentWorkspace, m as resolveWorkspaceAttachmentsRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as runCommandWithTimeout, y as runExec } from "./workspace-
|
|
8
|
-
import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-
|
|
9
|
-
import { $t as extractShellWrapperInlineCommand, A as resolveApiKeyForProvider, An as withFileLock, At as resolveEffectiveEnableState, B as resolveApiKeyForProfile, Bn as DEFAULT_PROVIDER, Bt as getTrustedSafeBinDirs, C as buildAssistantMessage, Cn as resolveOwnerDisplaySetting, Ct as validateJsonSchemaValue, D as getApiKeyForModel, Dn as ensureAuthProfileStore, Dt as safeStatSync, E as buildUsageWithNoCost, En as markAuthProfileGood, Et as isPathInside, F as getSoonestCooldownExpiry, Ft as unsetConfigOverride, G as resolveConfigSnapshotHash, Gt as analyzeShellCommand, H as loadConfig, Ht as listWritableExplicitTrustedSafeBinDirs, I as isProfileInCooldown, In as normalizeSecretInput, It as getConfigValueAtPath, J as TELEGRAM_COMMAND_NAME_PATTERN, Jt as splitCommandChain, K as writeConfigFile, Kt as buildEnforcedShellCommand, L as markAuthProfileFailure, Ln as splitTrailingAuthProfile, Lt as parseConfigPath, M as resolveModelAuthMode, Mt as getConfigOverrides, Nt as resetConfigOverrides, O as getCustomProviderApiKey, On as resolveAuthStorePathForDisplay, Ot as applyTestPluginDefaults, P as resolveAuthProfileOrder, Pn as resolveAuthProfileDisplayLabel, Pt as setConfigOverride, Q as isInboundPathAllowed, Qt as resolveCommandResolutionFromArgv, R as markAuthProfileUsed, Rn as DEFAULT_CONTEXT_TOKENS, Rt as setConfigValueAtPath, S as createOllamaStreamFn, Sn as isDangerousHostEnvVarName, St as isSupportedLocalAvatarExtension, T as buildStreamErrorAssistantMessage, Tn as listProfilesForProvider, Tt as discoverOpenClawPlugins, U as readConfigFileSnapshot, Ut as normalizeTrustedSafeBinDirs, Vt as isTrustedSafeBinPath, Wt as validateSafeBinArgv, X as resolveTelegramCustomCommands, Xt as matchAllowlist, Y as normalizeTelegramCommandName, Yt as DEFAULT_SAFE_BINS, Zt as resolveAllowlistCandidatePath, _n as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, a as isCliProvider, an as SAFE_BIN_PROFILES, at as parseDurationMs, bn as getShellPathFromLoginShell, bt as isAvatarHttpUrl, c as normalizeProviderId, cn as applyMergePatch, d as resolveDefaultModelForAgent, dn as resolveDiscordPreviewStreamMode, en as isDispatchWrapperExecutable, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fn as resolveSlackNativeStreaming, h as resolveThinkingDefault, i as findNormalizedProviderValue, in as splitShellArgs, j as resolveEnvApiKey, jt as resolveMemorySlotDecision, k as requireApiKey, kn as resolveOpenClawAgentDir, kt as normalizePluginsConfig, ln as isSafeExecutableValue, m as resolveSubagentSpawnModelSelection, n as buildConfiguredAllowlistKeys, nn as unwrapKnownDispatchWrapperInvocation, nt as normalizeScpRemoteHost, o as modelKey, on as normalizeSafeBinProfileFixtures, p as resolveReasoningDefault, pn as resolveSlackStreamingMode, q as validateConfigObjectWithPlugins, qt as isWindowsPlatform, r as buildModelAliasIndex, rn as unwrapKnownShellMultiplexerInvocation, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sn as resolveSafeBinProfiles, t as buildAllowedModelSet, tn as isShellWrapperExecutable, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, un as mapStreamingModeToSlackLegacyDraftStreamMode, vn as resolveAgentMaxConcurrent, vt as AVATAR_MAX_BYTES, w as buildAssistantMessageWithZeroUsage, wn as dedupeProfileIds, wt as loadPluginManifestRegistry, x as OLLAMA_NATIVE_BASE_URL, xn as resolveShellEnvFallbackTimeoutMs, xt as isPathWithinRoot, yn as VERSION, yt as isAvatarDataUrl, z as resolveProfilesUnavailableReason, zn as DEFAULT_MODEL, zt as unsetConfigValueAtPath } from "./model-selection-
|
|
10
|
-
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-
|
|
11
|
-
import { n as formatCliCommand, t as isTruthyEnvValue } from "./env-
|
|
6
|
+
import { C as isPlainObject, S as truncateUtf16Safe, _ as shortenHomeInString, a as ensureDir$3, b as sliceUtf16Safe, c as isRecord$1, d as normalizeE164, h as resolveUserPath, o as escapeRegExp, r as clampInt, s as formatTerminalLink, t as CONFIG_DIR, v as shortenHomePath, y as sleep$1 } from "./utils-BFZnl-5N.js";
|
|
7
|
+
import { C as openBoundaryFileSync, M as normalizeWindowsPathForComparison, S as openBoundaryFile, a as DEFAULT_IDENTITY_FILENAME, b as spawnWithFallback, f as loadWorkspaceBootstrapFiles, g as resolveOpenClawPackageRoot, l as ensureAgentWorkspace, m as resolveWorkspaceAttachmentsRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as runCommandWithTimeout, y as runExec } from "./workspace-D6mrCnXi.js";
|
|
8
|
+
import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-BlH5MJiV.js";
|
|
9
|
+
import { $t as extractShellWrapperInlineCommand, A as resolveApiKeyForProvider, An as withFileLock, At as resolveEffectiveEnableState, B as resolveApiKeyForProfile, Bn as DEFAULT_PROVIDER, Bt as getTrustedSafeBinDirs, C as buildAssistantMessage, Cn as resolveOwnerDisplaySetting, Ct as validateJsonSchemaValue, D as getApiKeyForModel, Dn as ensureAuthProfileStore, Dt as safeStatSync, E as buildUsageWithNoCost, En as markAuthProfileGood, Et as isPathInside, F as getSoonestCooldownExpiry, Ft as unsetConfigOverride, G as resolveConfigSnapshotHash, Gt as analyzeShellCommand, H as loadConfig, Ht as listWritableExplicitTrustedSafeBinDirs, I as isProfileInCooldown, In as normalizeSecretInput, It as getConfigValueAtPath, J as TELEGRAM_COMMAND_NAME_PATTERN, Jt as splitCommandChain, K as writeConfigFile, Kt as buildEnforcedShellCommand, L as markAuthProfileFailure, Ln as splitTrailingAuthProfile, Lt as parseConfigPath, M as resolveModelAuthMode, Mt as getConfigOverrides, Nt as resetConfigOverrides, O as getCustomProviderApiKey, On as resolveAuthStorePathForDisplay, Ot as applyTestPluginDefaults, P as resolveAuthProfileOrder, Pn as resolveAuthProfileDisplayLabel, Pt as setConfigOverride, Q as isInboundPathAllowed, Qt as resolveCommandResolutionFromArgv, R as markAuthProfileUsed, Rn as DEFAULT_CONTEXT_TOKENS, Rt as setConfigValueAtPath, S as createOllamaStreamFn, Sn as isDangerousHostEnvVarName, St as isSupportedLocalAvatarExtension, T as buildStreamErrorAssistantMessage, Tn as listProfilesForProvider, Tt as discoverOpenClawPlugins, U as readConfigFileSnapshot, Ut as normalizeTrustedSafeBinDirs, Vt as isTrustedSafeBinPath, Wt as validateSafeBinArgv, X as resolveTelegramCustomCommands, Xt as matchAllowlist, Y as normalizeTelegramCommandName, Yt as DEFAULT_SAFE_BINS, Zt as resolveAllowlistCandidatePath, _n as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, a as isCliProvider, an as SAFE_BIN_PROFILES, at as parseDurationMs, bn as getShellPathFromLoginShell, bt as isAvatarHttpUrl, c as normalizeProviderId, cn as applyMergePatch, d as resolveDefaultModelForAgent, dn as resolveDiscordPreviewStreamMode, en as isDispatchWrapperExecutable, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fn as resolveSlackNativeStreaming, h as resolveThinkingDefault, i as findNormalizedProviderValue, in as splitShellArgs, j as resolveEnvApiKey, jt as resolveMemorySlotDecision, k as requireApiKey, kn as resolveOpenClawAgentDir, kt as normalizePluginsConfig, ln as isSafeExecutableValue, m as resolveSubagentSpawnModelSelection, n as buildConfiguredAllowlistKeys, nn as unwrapKnownDispatchWrapperInvocation, nt as normalizeScpRemoteHost, o as modelKey, on as normalizeSafeBinProfileFixtures, p as resolveReasoningDefault, pn as resolveSlackStreamingMode, q as validateConfigObjectWithPlugins, qt as isWindowsPlatform, r as buildModelAliasIndex, rn as unwrapKnownShellMultiplexerInvocation, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sn as resolveSafeBinProfiles, t as buildAllowedModelSet, tn as isShellWrapperExecutable, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, un as mapStreamingModeToSlackLegacyDraftStreamMode, vn as resolveAgentMaxConcurrent, vt as AVATAR_MAX_BYTES, w as buildAssistantMessageWithZeroUsage, wn as dedupeProfileIds, wt as loadPluginManifestRegistry, x as OLLAMA_NATIVE_BASE_URL, xn as resolveShellEnvFallbackTimeoutMs, xt as isPathWithinRoot, yn as VERSION, yt as isAvatarDataUrl, z as resolveProfilesUnavailableReason, zn as DEFAULT_MODEL, zt as unsetConfigValueAtPath } from "./model-selection-D_Si2Ict.js";
|
|
10
|
+
import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-DLGN-8YS.js";
|
|
11
|
+
import { n as formatCliCommand, t as isTruthyEnvValue } from "./env-DNMZEG57.js";
|
|
12
12
|
import { t as parseBooleanValue$1 } from "./boolean-mcn6kL0s.js";
|
|
13
|
-
import { a as triggerInternalHook, t as createInternalHookEvent } from "./internal-hooks-
|
|
14
|
-
import { _ as getPluginCommandSpecs, a as normalizeAnyChannelId, c as getActivePluginRegistry, d as requireActivePluginRegistry, f as setActivePluginRegistry, g as executePluginCommand, h as clearPluginCommands, i as listChatChannels, l as getActivePluginRegistryKey, m as normalizePluginHttpPath, n as CHAT_CHANNEL_ORDER, o as normalizeChannelId$1, p as createPluginRegistry, r as getChatChannelMeta, s as normalizeChatChannelId, v as listPluginCommands, y as matchPluginCommand } from "./registry-
|
|
13
|
+
import { a as triggerInternalHook, t as createInternalHookEvent } from "./internal-hooks-yQe6H47q.js";
|
|
14
|
+
import { _ as getPluginCommandSpecs, a as normalizeAnyChannelId, c as getActivePluginRegistry, d as requireActivePluginRegistry, f as setActivePluginRegistry, g as executePluginCommand, h as clearPluginCommands, i as listChatChannels, l as getActivePluginRegistryKey, m as normalizePluginHttpPath, n as CHAT_CHANNEL_ORDER, o as normalizeChannelId$1, p as createPluginRegistry, r as getChatChannelMeta, s as normalizeChatChannelId, v as listPluginCommands, y as matchPluginCommand } from "./registry-CJCkqTms.js";
|
|
15
15
|
import { n as MANIFEST_KEY } from "./legacy-names-CaxS8pq2.js";
|
|
16
|
-
import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, o as resolveChannelGroupToolsPolicy, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-
|
|
16
|
+
import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, o as resolveChannelGroupToolsPolicy, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-Bm23mfim.js";
|
|
17
17
|
import { t as runTasksWithConcurrency } from "./run-with-concurrency-NY-gTuzr.js";
|
|
18
|
-
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
19
|
-
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, f as resolveSlackReplyToMode, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$2, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-
|
|
20
|
-
import { a as logWebSelfId, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, t as hasAnyWhatsAppAuth, u as readWebSelfId } from "./accounts-
|
|
18
|
+
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-B9EDT4jv.js";
|
|
19
|
+
import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, f as resolveSlackReplyToMode, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$2, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-CJoaoIHc.js";
|
|
20
|
+
import { a as logWebSelfId, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, t as hasAnyWhatsAppAuth, u as readWebSelfId } from "./accounts-ubG6irXZ.js";
|
|
21
21
|
import { t as resolveAccountEntry } from "./account-lookup-JrULBwdR.js";
|
|
22
22
|
import { t as normalizeChatType } from "./chat-type-DKb2TlGZ.js";
|
|
23
|
-
import { t as buildChannelAccountBindings } from "./bindings-
|
|
24
|
-
import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-
|
|
25
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
23
|
+
import { t as buildChannelAccountBindings } from "./bindings-CsIiIjqN.js";
|
|
24
|
+
import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-CcQZM0c7.js";
|
|
25
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-DcL81tZr.js";
|
|
26
26
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-CY3Mg7Dp.js";
|
|
27
|
-
import { A as initializeGlobalHookRunner, C as shouldSuppressReasoningPayload, D as normalizeChannelTargetInput, E as buildTargetResolverSignature, O as normalizeTargetForProvider, S as shouldSuppressMessagingToolReplies, T as resolveReplyToMode, _ as applyReplyTagsToPayload, a as normalizeOutboundPayloadsForJson, b as filterMessagingToolMediaDuplicates, c as parseReplyDirectives, d as toInternalMessagePreprocessedContext, f as toInternalMessageReceivedContext, g as fireAndForgetHook, h as toPluginMessageReceivedEvent, i as normalizeOutboundPayloads, k as getGlobalHookRunner, l as splitMediaFromOutput, m as toPluginMessageContext, o as normalizeReplyPayloadsForDelivery, p as toInternalMessageTranscribedContext, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as deriveInboundMessageHookContext, v as applyReplyThreading, w as createReplyToModeFilterForChannel, x as isRenderablePayload, y as filterMessagingToolDuplicates } from "./deliver-
|
|
28
|
-
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-
|
|
27
|
+
import { A as initializeGlobalHookRunner, C as shouldSuppressReasoningPayload, D as normalizeChannelTargetInput, E as buildTargetResolverSignature, O as normalizeTargetForProvider, S as shouldSuppressMessagingToolReplies, T as resolveReplyToMode, _ as applyReplyTagsToPayload, a as normalizeOutboundPayloadsForJson, b as filterMessagingToolMediaDuplicates, c as parseReplyDirectives, d as toInternalMessagePreprocessedContext, f as toInternalMessageReceivedContext, g as fireAndForgetHook, h as toPluginMessageReceivedEvent, i as normalizeOutboundPayloads, k as getGlobalHookRunner, l as splitMediaFromOutput, m as toPluginMessageContext, o as normalizeReplyPayloadsForDelivery, p as toInternalMessageTranscribedContext, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as deriveInboundMessageHookContext, v as applyReplyThreading, w as createReplyToModeFilterForChannel, x as isRenderablePayload, y as filterMessagingToolDuplicates } from "./deliver-zrYSWfQ5.js";
|
|
28
|
+
import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-BO1GQJJf.js";
|
|
29
29
|
import { r as getDiagnosticSessionState } from "./diagnostic-session-state-DBPrVBk3.js";
|
|
30
|
-
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-
|
|
31
|
-
import { $ as readChannelAllowFromStore, A as describeReplyTarget, B as resolveTelegramStreamMode, C as buildSenderLabel, D as buildTelegramParentPeer, E as buildTelegramGroupPeerId, F as resolveTelegramDirectPeerId, G as resolveSenderAllowMatch$1, H as isSenderAllowed$1, I as resolveTelegramForumThreadId, J as mergeDmAllowFromSources, K as firstDefined$1, L as resolveTelegramGroupAllowFromContext, M as extractTelegramLocation, N as hasBotMention, O as buildTelegramThreadParams, P as normalizeForwardedContext, Q as addChannelAllowFromStoreEntry, R as resolveTelegramMediaPlaceholder, S as buildGroupLabel, T as buildTelegramGroupFrom, U as normalizeAllowFrom$2, V as resolveTelegramThreadSpec, W as normalizeDmAllowFromWithStore$1, X as formatLocationText, Y as resolveGroupAllowFromSources, Z as toLocationContext, _ as resolveTelegramFetch, a as reactMessageTelegram, at as listPairingChannels, b as loadCronStore, c as sendStickerTelegram, ct as resolveTelegramTargetChatType, d as wasSentByBot, et as removeChannelAllowFromStoreEntry, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, it as getPairingAdapter, j as expandTextLinks, k as buildTypingThreadParams, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as readJsonFileWithFallback, o as sendMessageTelegram, ot as isVoiceCompatibleAudio, p as markdownToTelegramChunks, q as isSenderIdAllowed, r as deleteMessageTelegram, rt as writeJsonFileAtomically, s as sendPollTelegram, st as parseTelegramTarget, t as buildInlineKeyboard, tt as upsertChannelPairingRequest, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildSenderName, x as resolveCronStorePath, y as withTelegramApiErrorLogging, z as resolveTelegramReplyId } from "./send-
|
|
32
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
33
|
-
import { _ as resolveAttachmentKind, a as resolveAutoImageModel, b as modelSupportsVision, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, h as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as findModelInCatalog, x as resolveAliasedOpenAiCompatibleModelId, y as loadModelCatalog } from "./audio-transcription-runner-
|
|
34
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-
|
|
35
|
-
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-
|
|
36
|
-
import { $ as mergeAlsoAllowPolicy, A as isRawApiErrorPayload, B as registerBrowserRoutes, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as sanitizeUserFacingText, G as resolveBrowserControlAuth, H as resolveProfile, I as ensureSandboxWorkspaceForSession, J as resolveSandboxConfigForAgent, K as resolveGatewayCredentialsFromConfig, L as resolveSandboxContext, M as isTransientHttpError, N as parseImageDimensionError, O as isLikelyContextOverflowError, P as parseImageSizeError, Q as expandPolicyWithPluginGroups, R as resolveSandboxRuntimeStatus, S as isBillingAssistantError, T as isContextOverflowError, U as getBridgeAuthForPort, V as resolveBrowserConfig, W as ensureBrowserControlAuth, X as buildPluginToolGroups, Y as applyOwnerOnlyToolPolicy, Z as collectExplicitAllowlist, _ as formatBillingErrorMessage, a as isMessagingToolDuplicateNormalized, at as matchesAnyGlobPattern, b as isAuthAssistantError, c as extractToolCallsFromAssistant, ct as resolveBootstrapMaxChars, d as downgradeOpenAIFunctionCallReasoningPairs, et as stripPluginOnlyAllowlist, f as downgradeOpenAIReasoningBlocks, g as formatAssistantErrorText, h as classifyFailoverReason, it as compileGlobPatterns, j as isTimeoutErrorMessage, k as isRateLimitAssistantError, l as extractToolResultId, lt as resolveBootstrapTotalMaxChars, m as BILLING_ERROR_USER_MESSAGE, n as validateGeminiTurns, nt as normalizeToolName, o as normalizeTextForComparison, ot as buildBootstrapContextFiles, p as isGoogleModelApi, q as trimToUndefined$1, r as pickFallbackThinkingLevel, rt as resolveToolProfilePolicy, s as sanitizeSessionMessagesImages, st as ensureSessionHeader, t as validateAnthropicTurns, tt as expandToolGroups, u as sanitizeToolCallIdsForCloudCodeAssist, ut as sanitizeGoogleTurnOrdering, v as formatRawAssistantErrorForUi, w as isCompactionFailureError, x as isAuthPermanentErrorMessage, y as getApiErrorPayloadFingerprint, z as createBrowserRouteContext } from "./pi-embedded-helpers-
|
|
37
|
-
import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-
|
|
38
|
-
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-
|
|
39
|
-
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-
|
|
40
|
-
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-
|
|
41
|
-
import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-
|
|
42
|
-
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-
|
|
43
|
-
import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-
|
|
44
|
-
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-
|
|
30
|
+
import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BTexwKe8.js";
|
|
31
|
+
import { $ as readChannelAllowFromStore, A as describeReplyTarget, B as resolveTelegramStreamMode, C as buildSenderLabel, D as buildTelegramParentPeer, E as buildTelegramGroupPeerId, F as resolveTelegramDirectPeerId, G as resolveSenderAllowMatch$1, H as isSenderAllowed$1, I as resolveTelegramForumThreadId, J as mergeDmAllowFromSources, K as firstDefined$1, L as resolveTelegramGroupAllowFromContext, M as extractTelegramLocation, N as hasBotMention, O as buildTelegramThreadParams, P as normalizeForwardedContext, Q as addChannelAllowFromStoreEntry, R as resolveTelegramMediaPlaceholder, S as buildGroupLabel, T as buildTelegramGroupFrom, U as normalizeAllowFrom$2, V as resolveTelegramThreadSpec, W as normalizeDmAllowFromWithStore$1, X as formatLocationText, Y as resolveGroupAllowFromSources, Z as toLocationContext, _ as resolveTelegramFetch, a as reactMessageTelegram, at as listPairingChannels, b as loadCronStore, c as sendStickerTelegram, ct as resolveTelegramTargetChatType, d as wasSentByBot, et as removeChannelAllowFromStoreEntry, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, it as getPairingAdapter, j as expandTextLinks, k as buildTypingThreadParams, m as markdownToTelegramHtml, n as createForumTopicTelegram, nt as readJsonFileWithFallback, o as sendMessageTelegram, ot as isVoiceCompatibleAudio, p as markdownToTelegramChunks, q as isSenderIdAllowed, r as deleteMessageTelegram, rt as writeJsonFileAtomically, s as sendPollTelegram, st as parseTelegramTarget, t as buildInlineKeyboard, tt as upsertChannelPairingRequest, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildSenderName, x as resolveCronStorePath, y as withTelegramApiErrorLogging, z as resolveTelegramReplyId } from "./send-D2zYssqK.js";
|
|
32
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-DCpyia_K.js";
|
|
33
|
+
import { _ as resolveAttachmentKind, a as resolveAutoImageModel, b as modelSupportsVision, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, h as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as findModelInCatalog, x as resolveAliasedOpenAiCompatibleModelId, y as loadModelCatalog } from "./audio-transcription-runner-CQ4BMvGX.js";
|
|
34
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-DA46fxhD.js";
|
|
35
|
+
import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-pbgFFUNm.js";
|
|
36
|
+
import { $ as mergeAlsoAllowPolicy, A as isRawApiErrorPayload, B as registerBrowserRoutes, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as sanitizeUserFacingText, G as resolveBrowserControlAuth, H as resolveProfile, I as ensureSandboxWorkspaceForSession, J as resolveSandboxConfigForAgent, K as resolveGatewayCredentialsFromConfig, L as resolveSandboxContext, M as isTransientHttpError, N as parseImageDimensionError, O as isLikelyContextOverflowError, P as parseImageSizeError, Q as expandPolicyWithPluginGroups, R as resolveSandboxRuntimeStatus, S as isBillingAssistantError, T as isContextOverflowError, U as getBridgeAuthForPort, V as resolveBrowserConfig, W as ensureBrowserControlAuth, X as buildPluginToolGroups, Y as applyOwnerOnlyToolPolicy, Z as collectExplicitAllowlist, _ as formatBillingErrorMessage, a as isMessagingToolDuplicateNormalized, at as matchesAnyGlobPattern, b as isAuthAssistantError, c as extractToolCallsFromAssistant, ct as resolveBootstrapMaxChars, d as downgradeOpenAIFunctionCallReasoningPairs, et as stripPluginOnlyAllowlist, f as downgradeOpenAIReasoningBlocks, g as formatAssistantErrorText, h as classifyFailoverReason, it as compileGlobPatterns, j as isTimeoutErrorMessage, k as isRateLimitAssistantError, l as extractToolResultId, lt as resolveBootstrapTotalMaxChars, m as BILLING_ERROR_USER_MESSAGE, n as validateGeminiTurns, nt as normalizeToolName, o as normalizeTextForComparison, ot as buildBootstrapContextFiles, p as isGoogleModelApi, q as trimToUndefined$1, r as pickFallbackThinkingLevel, rt as resolveToolProfilePolicy, s as sanitizeSessionMessagesImages, st as ensureSessionHeader, t as validateAnthropicTurns, tt as expandToolGroups, u as sanitizeToolCallIdsForCloudCodeAssist, ut as sanitizeGoogleTurnOrdering, v as formatRawAssistantErrorForUi, w as isCompactionFailureError, x as isAuthPermanentErrorMessage, y as getApiErrorPayloadFingerprint, z as createBrowserRouteContext } from "./pi-embedded-helpers-Bo7e-QzJ.js";
|
|
37
|
+
import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-DWfXErGH.js";
|
|
38
|
+
import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-BttlqUXr.js";
|
|
39
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-Cpb5gMG6.js";
|
|
40
|
+
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-CaZQhKzI.js";
|
|
41
|
+
import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-B11yhRo6.js";
|
|
42
|
+
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-C77EShMC.js";
|
|
43
|
+
import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-ynOWOBHx.js";
|
|
44
|
+
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-B7PaqfvZ.js";
|
|
45
45
|
import { n as readJsonFile, r as writeJsonAtomic, t as createAsyncLock } from "./json-files-BpxTFudd.js";
|
|
46
|
-
import { A as resolveSessionKey, B as canonicalizeMainSessionAlias, C as extractToolCallNames, D as hasInterSessionUserProvenance, E as applyInputProvenanceToUserMessage, F as resolveThreadFlag, G as resolveGroupSessionKey, H as resolveExplicitAgentSessionKey, I as DEFAULT_RESET_TRIGGERS, K as acquireSessionWriteLock, L as mergeSessionEntry, M as resolveChannelResetConfig, N as resolveSessionResetPolicy, O as normalizeInputProvenance, P as resolveSessionResetType, R as resolveFreshSessionTotalTokens, S as countToolResults, T as INPUT_PROVENANCE_KIND_VALUES, U as resolveMainSessionKey, W as deriveSessionMetaPatch, _ as normalizeDeliveryContext, a as resolveAndPersistSessionFile, b as archiveSessionTranscripts, c as recordSessionMetaFromInbound, d as updateSessionStoreEntry, f as isCacheEnabled, g as mergeDeliveryContext, h as deliveryContextKey, j as evaluateSessionFreshness, k as jsonUtf8Bytes, l as updateLastRoute, m as deliveryContextFromSession, n as parseSessionThreadInfo, o as loadSessionStore, p as resolveCacheTtlMs$1, q as resolveSessionLockMaxHoldFromTimeout, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateSessionStore, v as normalizeSessionDeliveryFields, w as parseInlineDirectives$1, x as capArrayByJsonBytes, y as normalizeAccountId$3, z as setSessionRuntimeModel } from "./sessions-
|
|
46
|
+
import { A as resolveSessionKey, B as canonicalizeMainSessionAlias, C as extractToolCallNames, D as hasInterSessionUserProvenance, E as applyInputProvenanceToUserMessage, F as resolveThreadFlag, G as resolveGroupSessionKey, H as resolveExplicitAgentSessionKey, I as DEFAULT_RESET_TRIGGERS, K as acquireSessionWriteLock, L as mergeSessionEntry, M as resolveChannelResetConfig, N as resolveSessionResetPolicy, O as normalizeInputProvenance, P as resolveSessionResetType, R as resolveFreshSessionTotalTokens, S as countToolResults, T as INPUT_PROVENANCE_KIND_VALUES, U as resolveMainSessionKey, W as deriveSessionMetaPatch, _ as normalizeDeliveryContext, a as resolveAndPersistSessionFile, b as archiveSessionTranscripts, c as recordSessionMetaFromInbound, d as updateSessionStoreEntry, f as isCacheEnabled, g as mergeDeliveryContext, h as deliveryContextKey, j as evaluateSessionFreshness, k as jsonUtf8Bytes, l as updateLastRoute, m as deliveryContextFromSession, n as parseSessionThreadInfo, o as loadSessionStore, p as resolveCacheTtlMs$1, q as resolveSessionLockMaxHoldFromTimeout, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, t as extractDeliveryInfo, u as updateSessionStore, v as normalizeSessionDeliveryFields, w as parseInlineDirectives$1, x as capArrayByJsonBytes, y as normalizeAccountId$3, z as setSessionRuntimeModel } from "./sessions-D7EjW0sG.js";
|
|
47
47
|
import { n as resolveConversationLabel } from "./conversation-label-Dyk7sOSM.js";
|
|
48
|
-
import { t as resolveIMessageAccount } from "./accounts-
|
|
49
|
-
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-
|
|
48
|
+
import { t as resolveIMessageAccount } from "./accounts-DMvETf-t.js";
|
|
49
|
+
import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BHEVctLd.js";
|
|
50
50
|
import { n as onSessionTranscriptUpdate, t as emitSessionTranscriptUpdate } from "./transcript-events-ByYgonIF.js";
|
|
51
|
-
import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-
|
|
51
|
+
import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-ArXzv82F.js";
|
|
52
52
|
import { a as normalizeReasoningLevel, c as normalizeVerboseLevel, i as normalizeElevatedLevel, l as resolveResponseUsageMode, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-BcOnJa2q.js";
|
|
53
|
-
import { C as extractTextFromChatContent, S as isInsideCode, T as ensureOpenClawModelsJson, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as formatToolSummary, w as minimaxUnderstandImage, x as findCodeRegions, y as resolveToolDisplay } from "./image-
|
|
54
|
-
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-
|
|
53
|
+
import { C as extractTextFromChatContent, S as isInsideCode, T as ensureOpenClawModelsJson, _ as stripThinkingTagsFromText, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantThinking, d as formatReasoningMessage, f as inferToolMetaFromArgs, g as stripMinimaxToolCallXml, h as stripDowngradedToolCallText, i as coerceImageModelConfig, l as extractThinkingFromTaggedStream, m as promoteThinkingTagsToBlocks, o as resolveProviderVisionModelFromConfig, p as isAssistantMessage, r as coerceImageAssistantText, s as extractAssistantText$1, u as extractThinkingFromTaggedText, v as formatToolSummary, w as minimaxUnderstandImage, x as findCodeRegions, y as resolveToolDisplay } from "./image-DnxYCkHO.js";
|
|
54
|
+
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-4RonjgqX.js";
|
|
55
55
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-CYFFedEH.js";
|
|
56
|
-
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
57
|
-
import { t as makeProxyFetch } from "./proxy-fetch-
|
|
58
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
59
|
-
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-
|
|
60
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
61
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-
|
|
62
|
-
import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-
|
|
63
|
-
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-
|
|
64
|
-
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-
|
|
56
|
+
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-B1EGEHan.js";
|
|
57
|
+
import { t as makeProxyFetch } from "./proxy-fetch-xlbVQYN_.js";
|
|
58
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DK1i6bCJ.js";
|
|
59
|
+
import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-2ZxftpDd.js";
|
|
60
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
|
|
61
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-DcDVAFj3.js";
|
|
62
|
+
import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-Dad0aUFR.js";
|
|
63
|
+
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-CTkboeeC.js";
|
|
64
|
+
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-Cea3CZFF.js";
|
|
65
65
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-CTd41MBO.js";
|
|
66
66
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-CIXnD4u2.js";
|
|
67
|
-
import { n as retryAsync } from "./retry-
|
|
67
|
+
import { n as retryAsync } from "./retry-DTeP7C3h.js";
|
|
68
68
|
import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-DYqTwyb3.js";
|
|
69
|
-
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-
|
|
69
|
+
import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-Dwc2BBvs.js";
|
|
70
70
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
|
|
71
71
|
import { n as normalizePollInput } from "./polls-an_kOejR.js";
|
|
72
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
73
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
74
|
-
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-
|
|
75
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
76
|
-
import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-
|
|
77
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
78
|
-
import { t as recordInboundSessionMetaSafe } from "./session-meta-
|
|
79
|
-
import { n as resolveMemorySearchConfig } from "./manager-
|
|
80
|
-
import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-
|
|
72
|
+
import { t as convertMarkdownTables } from "./tables-BJ0XAman.js";
|
|
73
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-BpyiQEov.js";
|
|
74
|
+
import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send--Gq-Uh-l.js";
|
|
75
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-C5hVstLo.js";
|
|
76
|
+
import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-Hd9sOu9T.js";
|
|
77
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-D6zARd6r.js";
|
|
78
|
+
import { t as recordInboundSessionMetaSafe } from "./session-meta-BbCwXniv.js";
|
|
79
|
+
import { n as resolveMemorySearchConfig } from "./manager-tozHviEd.js";
|
|
80
|
+
import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-CdDUaBcQ.js";
|
|
81
81
|
import { createRequire } from "node:module";
|
|
82
|
-
import * as fs$
|
|
82
|
+
import * as fs$1 from "node:fs/promises";
|
|
83
83
|
import fs from "node:fs/promises";
|
|
84
84
|
import os, { homedir } from "node:os";
|
|
85
85
|
import * as path$1 from "node:path";
|
|
86
86
|
import path, { isAbsolute } from "node:path";
|
|
87
|
-
import
|
|
87
|
+
import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
88
88
|
import JSON5 from "json5";
|
|
89
89
|
import { inspect, promisify } from "node:util";
|
|
90
90
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
@@ -95,7 +95,7 @@ import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, Setting
|
|
|
95
95
|
import { EdgeTTS } from "node-edge-tts";
|
|
96
96
|
import { createServer } from "node:http";
|
|
97
97
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
98
|
-
import WebSocket, { WebSocket
|
|
98
|
+
import WebSocket$1, { WebSocket } from "ws";
|
|
99
99
|
import { Buffer as Buffer$1 } from "node:buffer";
|
|
100
100
|
import { createJiti } from "jiti";
|
|
101
101
|
import AjvPkg from "ajv";
|
|
@@ -3334,7 +3334,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
3334
3334
|
const workspaceDir = params.workspaceDir?.trim();
|
|
3335
3335
|
if (workspaceDir) {
|
|
3336
3336
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
3337
|
-
if (
|
|
3337
|
+
if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
3338
3338
|
}
|
|
3339
3339
|
const packageRoot = await resolveOpenClawPackageRoot({
|
|
3340
3340
|
cwd: params.cwd,
|
|
@@ -3343,7 +3343,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
3343
3343
|
});
|
|
3344
3344
|
if (!packageRoot) return null;
|
|
3345
3345
|
const packageDocs = path.join(packageRoot, "docs");
|
|
3346
|
-
return
|
|
3346
|
+
return syncFs.existsSync(packageDocs) ? packageDocs : null;
|
|
3347
3347
|
}
|
|
3348
3348
|
|
|
3349
3349
|
//#endregion
|
|
@@ -6394,7 +6394,7 @@ function resolveDefaultIdentityPath() {
|
|
|
6394
6394
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
6395
6395
|
}
|
|
6396
6396
|
function ensureDir$2(filePath) {
|
|
6397
|
-
|
|
6397
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
6398
6398
|
}
|
|
6399
6399
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
6400
6400
|
function base64UrlEncode(buf) {
|
|
@@ -6430,8 +6430,8 @@ function generateIdentity() {
|
|
|
6430
6430
|
}
|
|
6431
6431
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
6432
6432
|
try {
|
|
6433
|
-
if (
|
|
6434
|
-
const raw =
|
|
6433
|
+
if (syncFs.existsSync(filePath)) {
|
|
6434
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
6435
6435
|
const parsed = JSON.parse(raw);
|
|
6436
6436
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
6437
6437
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -6440,9 +6440,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
6440
6440
|
...parsed,
|
|
6441
6441
|
deviceId: derivedId
|
|
6442
6442
|
};
|
|
6443
|
-
|
|
6443
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
6444
6444
|
try {
|
|
6445
|
-
|
|
6445
|
+
syncFs.chmodSync(filePath, 384);
|
|
6446
6446
|
} catch {}
|
|
6447
6447
|
return {
|
|
6448
6448
|
deviceId: derivedId,
|
|
@@ -6467,9 +6467,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
6467
6467
|
privateKeyPem: identity.privateKeyPem,
|
|
6468
6468
|
createdAtMs: Date.now()
|
|
6469
6469
|
};
|
|
6470
|
-
|
|
6470
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
6471
6471
|
try {
|
|
6472
|
-
|
|
6472
|
+
syncFs.chmodSync(filePath, 384);
|
|
6473
6473
|
} catch {}
|
|
6474
6474
|
return identity;
|
|
6475
6475
|
}
|
|
@@ -6661,8 +6661,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
6661
6661
|
}
|
|
6662
6662
|
function readStore(filePath) {
|
|
6663
6663
|
try {
|
|
6664
|
-
if (!
|
|
6665
|
-
const raw =
|
|
6664
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
6665
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
6666
6666
|
const parsed = JSON.parse(raw);
|
|
6667
6667
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
6668
6668
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -6672,10 +6672,10 @@ function readStore(filePath) {
|
|
|
6672
6672
|
}
|
|
6673
6673
|
}
|
|
6674
6674
|
function writeStore(filePath, store) {
|
|
6675
|
-
|
|
6676
|
-
|
|
6675
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
6676
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
6677
6677
|
try {
|
|
6678
|
-
|
|
6678
|
+
syncFs.chmodSync(filePath, 384);
|
|
6679
6679
|
} catch {}
|
|
6680
6680
|
}
|
|
6681
6681
|
function loadDeviceAuthToken(params) {
|
|
@@ -8197,7 +8197,7 @@ var GatewayClient = class {
|
|
|
8197
8197
|
if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
|
|
8198
8198
|
});
|
|
8199
8199
|
}
|
|
8200
|
-
this.ws = new WebSocket
|
|
8200
|
+
this.ws = new WebSocket(url, wsOptions);
|
|
8201
8201
|
this.ws.on("open", () => {
|
|
8202
8202
|
if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
|
|
8203
8203
|
const tlsError = this.validateTlsFingerprint();
|
|
@@ -8393,7 +8393,7 @@ var GatewayClient = class {
|
|
|
8393
8393
|
const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
|
|
8394
8394
|
if (this.connectTimer) clearTimeout(this.connectTimer);
|
|
8395
8395
|
this.connectTimer = setTimeout(() => {
|
|
8396
|
-
if (this.connectSent || this.ws?.readyState !== WebSocket
|
|
8396
|
+
if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
|
|
8397
8397
|
this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
|
|
8398
8398
|
this.ws?.close(1008, "connect challenge timeout");
|
|
8399
8399
|
}, connectChallengeTimeoutMs);
|
|
@@ -8435,7 +8435,7 @@ var GatewayClient = class {
|
|
|
8435
8435
|
return null;
|
|
8436
8436
|
}
|
|
8437
8437
|
async request(method, params, opts) {
|
|
8438
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
8438
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
|
|
8439
8439
|
const id = randomUUID();
|
|
8440
8440
|
const frame = {
|
|
8441
8441
|
type: "req",
|
|
@@ -9715,7 +9715,7 @@ async function routeReply(params) {
|
|
|
9715
9715
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
9716
9716
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
9717
9717
|
try {
|
|
9718
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
9718
|
+
const { deliverOutboundPayloads } = await import("./deliver-zrYSWfQ5.js").then((n) => n.n);
|
|
9719
9719
|
const outboundSession = buildOutboundSessionContext({
|
|
9720
9720
|
cfg,
|
|
9721
9721
|
agentId: resolvedAgentId,
|
|
@@ -10359,7 +10359,7 @@ function normalizeSessionKey(value) {
|
|
|
10359
10359
|
}
|
|
10360
10360
|
function readSessionStore(storePath) {
|
|
10361
10361
|
try {
|
|
10362
|
-
const raw =
|
|
10362
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
10363
10363
|
const parsed = JSON5.parse(raw);
|
|
10364
10364
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
10365
10365
|
} catch {}
|
|
@@ -14273,7 +14273,7 @@ async function sendTranscriptEcho(params) {
|
|
|
14273
14273
|
}
|
|
14274
14274
|
const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
|
|
14275
14275
|
try {
|
|
14276
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
14276
|
+
const { deliverOutboundPayloads } = await import("./deliver-zrYSWfQ5.js").then((n) => n.n);
|
|
14277
14277
|
await deliverOutboundPayloads({
|
|
14278
14278
|
cfg,
|
|
14279
14279
|
channel: normalizedChannel,
|
|
@@ -17888,7 +17888,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
17888
17888
|
}
|
|
17889
17889
|
function ensureDir$1(filePath) {
|
|
17890
17890
|
const dir = path.dirname(filePath);
|
|
17891
|
-
|
|
17891
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
17892
17892
|
}
|
|
17893
17893
|
function coerceAllowlistEntries(allowlist) {
|
|
17894
17894
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -17958,11 +17958,11 @@ function generateToken() {
|
|
|
17958
17958
|
function loadExecApprovals() {
|
|
17959
17959
|
const filePath = resolveExecApprovalsPath();
|
|
17960
17960
|
try {
|
|
17961
|
-
if (!
|
|
17961
|
+
if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
|
|
17962
17962
|
version: 1,
|
|
17963
17963
|
agents: {}
|
|
17964
17964
|
});
|
|
17965
|
-
const raw =
|
|
17965
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
17966
17966
|
const parsed = JSON.parse(raw);
|
|
17967
17967
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
17968
17968
|
version: 1,
|
|
@@ -17979,9 +17979,9 @@ function loadExecApprovals() {
|
|
|
17979
17979
|
function saveExecApprovals(file) {
|
|
17980
17980
|
const filePath = resolveExecApprovalsPath();
|
|
17981
17981
|
ensureDir$1(filePath);
|
|
17982
|
-
|
|
17982
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
17983
17983
|
try {
|
|
17984
|
-
|
|
17984
|
+
syncFs.chmodSync(filePath, 384);
|
|
17985
17985
|
} catch {}
|
|
17986
17986
|
}
|
|
17987
17987
|
function ensureExecApprovals() {
|
|
@@ -18478,18 +18478,18 @@ function drainSystemEventEntries(sessionKey) {
|
|
|
18478
18478
|
function resolvePowerShellPath() {
|
|
18479
18479
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
18480
18480
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
18481
|
-
if (
|
|
18481
|
+
if (syncFs.existsSync(pwsh7)) return pwsh7;
|
|
18482
18482
|
const programW6432 = process.env.ProgramW6432;
|
|
18483
18483
|
if (programW6432 && programW6432 !== programFiles) {
|
|
18484
18484
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
18485
|
-
if (
|
|
18485
|
+
if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
18486
18486
|
}
|
|
18487
18487
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
18488
18488
|
if (pwshInPath) return pwshInPath;
|
|
18489
18489
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
18490
18490
|
if (systemRoot) {
|
|
18491
18491
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
18492
|
-
if (
|
|
18492
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
18493
18493
|
}
|
|
18494
18494
|
return "powershell.exe";
|
|
18495
18495
|
}
|
|
@@ -18527,7 +18527,7 @@ function resolveShellFromPath(name) {
|
|
|
18527
18527
|
for (const entry of entries) {
|
|
18528
18528
|
const candidate = path.join(entry, name);
|
|
18529
18529
|
try {
|
|
18530
|
-
|
|
18530
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
18531
18531
|
return candidate;
|
|
18532
18532
|
} catch {}
|
|
18533
18533
|
}
|
|
@@ -22001,7 +22001,7 @@ function ensureContextWindowCacheLoaded() {
|
|
|
22001
22001
|
await ensureOpenClawModelsJson(cfg);
|
|
22002
22002
|
} catch {}
|
|
22003
22003
|
try {
|
|
22004
|
-
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-
|
|
22004
|
+
const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-DA46fxhD.js").then((n) => n.r);
|
|
22005
22005
|
const agentDir = resolveOpenClawAgentDir();
|
|
22006
22006
|
const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
|
|
22007
22007
|
applyDiscoveredContextWindows({
|
|
@@ -22173,7 +22173,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
22173
22173
|
function hasGitMarker(repoRoot) {
|
|
22174
22174
|
const gitPath = path.join(repoRoot, ".git");
|
|
22175
22175
|
try {
|
|
22176
|
-
const stat =
|
|
22176
|
+
const stat = syncFs.statSync(gitPath);
|
|
22177
22177
|
return stat.isDirectory() || stat.isFile();
|
|
22178
22178
|
} catch {
|
|
22179
22179
|
return false;
|
|
@@ -22185,10 +22185,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
22185
22185
|
function resolveGitDirFromMarker(repoRoot) {
|
|
22186
22186
|
const gitPath = path.join(repoRoot, ".git");
|
|
22187
22187
|
try {
|
|
22188
|
-
const stat =
|
|
22188
|
+
const stat = syncFs.statSync(gitPath);
|
|
22189
22189
|
if (stat.isDirectory()) return gitPath;
|
|
22190
22190
|
if (!stat.isFile()) return null;
|
|
22191
|
-
const match =
|
|
22191
|
+
const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
22192
22192
|
if (!match?.[1]) return null;
|
|
22193
22193
|
return path.resolve(repoRoot, match[1].trim());
|
|
22194
22194
|
} catch {
|
|
@@ -22255,7 +22255,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22255
22255
|
cachedCommit = null;
|
|
22256
22256
|
return cachedCommit;
|
|
22257
22257
|
}
|
|
22258
|
-
const head =
|
|
22258
|
+
const head = syncFs.readFileSync(headPath, "utf-8").trim();
|
|
22259
22259
|
if (!head) {
|
|
22260
22260
|
cachedCommit = null;
|
|
22261
22261
|
return cachedCommit;
|
|
@@ -22263,7 +22263,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
22263
22263
|
if (head.startsWith("ref:")) {
|
|
22264
22264
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
22265
22265
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
22266
|
-
cachedCommit = formatCommit(
|
|
22266
|
+
cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
|
|
22267
22267
|
return cachedCommit;
|
|
22268
22268
|
}
|
|
22269
22269
|
cachedCommit = formatCommit(head);
|
|
@@ -22523,17 +22523,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
|
|
|
22523
22523
|
} catch {
|
|
22524
22524
|
return;
|
|
22525
22525
|
}
|
|
22526
|
-
if (!
|
|
22526
|
+
if (!syncFs.existsSync(logPath)) return;
|
|
22527
22527
|
try {
|
|
22528
22528
|
const TAIL_BYTES = 8192;
|
|
22529
|
-
const stat =
|
|
22529
|
+
const stat = syncFs.statSync(logPath);
|
|
22530
22530
|
const offset = Math.max(0, stat.size - TAIL_BYTES);
|
|
22531
22531
|
const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
|
|
22532
|
-
const fd =
|
|
22532
|
+
const fd = syncFs.openSync(logPath, "r");
|
|
22533
22533
|
try {
|
|
22534
|
-
|
|
22534
|
+
syncFs.readSync(fd, buf, 0, buf.length, offset);
|
|
22535
22535
|
} finally {
|
|
22536
|
-
|
|
22536
|
+
syncFs.closeSync(fd);
|
|
22537
22537
|
}
|
|
22538
22538
|
const tail = buf.toString("utf-8");
|
|
22539
22539
|
const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
|
|
@@ -23888,7 +23888,7 @@ function resolveRepoRoot(params) {
|
|
|
23888
23888
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
23889
23889
|
if (configured) try {
|
|
23890
23890
|
const resolved = path.resolve(configured);
|
|
23891
|
-
if (
|
|
23891
|
+
if (syncFs.statSync(resolved).isDirectory()) return resolved;
|
|
23892
23892
|
} catch {}
|
|
23893
23893
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
23894
23894
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -24656,7 +24656,7 @@ async function buildContextReply(params) {
|
|
|
24656
24656
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
24657
24657
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
24658
24658
|
function loadTemplate(fileName) {
|
|
24659
|
-
return
|
|
24659
|
+
return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
24660
24660
|
}
|
|
24661
24661
|
function generateHtml(sessionData) {
|
|
24662
24662
|
const template = loadTemplate("template.html");
|
|
@@ -24730,7 +24730,7 @@ async function buildExportSessionReply(params) {
|
|
|
24730
24730
|
} catch (err) {
|
|
24731
24731
|
return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
|
|
24732
24732
|
}
|
|
24733
|
-
if (!
|
|
24733
|
+
if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
|
|
24734
24734
|
const sessionManager = SessionManager.open(sessionFile);
|
|
24735
24735
|
const entries = sessionManager.getEntries();
|
|
24736
24736
|
const header = sessionManager.getHeader();
|
|
@@ -24751,8 +24751,8 @@ async function buildExportSessionReply(params) {
|
|
|
24751
24751
|
const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
24752
24752
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
24753
24753
|
const outputDir = path.dirname(outputPath);
|
|
24754
|
-
if (!
|
|
24755
|
-
|
|
24754
|
+
if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
|
|
24755
|
+
syncFs.writeFileSync(outputPath, html, "utf-8");
|
|
24756
24756
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
24757
24757
|
return { text: [
|
|
24758
24758
|
"✅ Session exported!",
|
|
@@ -24927,8 +24927,8 @@ function resolveZaiApiKey() {
|
|
|
24927
24927
|
}
|
|
24928
24928
|
try {
|
|
24929
24929
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
24930
|
-
if (!
|
|
24931
|
-
const data = JSON.parse(
|
|
24930
|
+
if (!syncFs.existsSync(authPath)) return;
|
|
24931
|
+
const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
|
|
24932
24932
|
return data["z-ai"]?.access || data.zai?.access;
|
|
24933
24933
|
} catch {
|
|
24934
24934
|
return;
|
|
@@ -26747,7 +26747,7 @@ function shouldPersistAnyBindingState() {
|
|
|
26747
26747
|
}
|
|
26748
26748
|
function shouldPersistBindingMutations() {
|
|
26749
26749
|
if (shouldPersistAnyBindingState()) return true;
|
|
26750
|
-
return
|
|
26750
|
+
return syncFs.existsSync(resolveThreadBindingsPath());
|
|
26751
26751
|
}
|
|
26752
26752
|
function saveBindingsToDisk(params = {}) {
|
|
26753
26753
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -28011,7 +28011,7 @@ const applyCostTotal = (totals, costTotal) => {
|
|
|
28011
28011
|
totals.totalCost += costTotal;
|
|
28012
28012
|
};
|
|
28013
28013
|
async function* readJsonlRecords(filePath) {
|
|
28014
|
-
const fileStream =
|
|
28014
|
+
const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
|
|
28015
28015
|
const rl = readline.createInterface({
|
|
28016
28016
|
input: fileStream,
|
|
28017
28017
|
crlfDelay: Infinity
|
|
@@ -28083,10 +28083,10 @@ async function loadCostUsageSummary(params) {
|
|
|
28083
28083
|
const dailyMap = /* @__PURE__ */ new Map();
|
|
28084
28084
|
const totals = emptyTotals();
|
|
28085
28085
|
const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
|
|
28086
|
-
const entries = await
|
|
28086
|
+
const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
28087
28087
|
const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
|
|
28088
28088
|
const filePath = path.join(sessionsDir, entry.name);
|
|
28089
|
-
const stats = await
|
|
28089
|
+
const stats = await syncFs.promises.stat(filePath).catch(() => null);
|
|
28090
28090
|
if (!stats) return null;
|
|
28091
28091
|
if (stats.mtimeMs < sinceTime) return null;
|
|
28092
28092
|
return filePath;
|
|
@@ -28119,7 +28119,7 @@ async function loadCostUsageSummary(params) {
|
|
|
28119
28119
|
}
|
|
28120
28120
|
async function loadSessionCostSummary(params) {
|
|
28121
28121
|
const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
|
|
28122
|
-
if (!sessionFile || !
|
|
28122
|
+
if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
|
|
28123
28123
|
const totals = emptyTotals();
|
|
28124
28124
|
let firstActivity;
|
|
28125
28125
|
let lastActivity;
|
|
@@ -30615,7 +30615,7 @@ async function createModelSelectionState(params) {
|
|
|
30615
30615
|
}
|
|
30616
30616
|
}
|
|
30617
30617
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
30618
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
30618
|
+
const { ensureAuthProfileStore } = await import("./model-selection-D_Si2Ict.js").then((n) => n.N);
|
|
30619
30619
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
30620
30620
|
const providerKey = normalizeProviderId(provider);
|
|
30621
30621
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -34276,7 +34276,7 @@ function asBoolean(value) {
|
|
|
34276
34276
|
}
|
|
34277
34277
|
function resolveTempPathParts(opts) {
|
|
34278
34278
|
const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
|
|
34279
|
-
if (!opts.tmpDir)
|
|
34279
|
+
if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
|
|
34280
34280
|
recursive: true,
|
|
34281
34281
|
mode: 448
|
|
34282
34282
|
});
|
|
@@ -34362,7 +34362,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
34362
34362
|
if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
|
|
34363
34363
|
const body = res.body;
|
|
34364
34364
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
34365
|
-
const fileHandle = await fs$
|
|
34365
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
34366
34366
|
let thrown;
|
|
34367
34367
|
try {
|
|
34368
34368
|
const reader = body.getReader();
|
|
@@ -34380,7 +34380,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
34380
34380
|
await fileHandle.close();
|
|
34381
34381
|
}
|
|
34382
34382
|
if (thrown) {
|
|
34383
|
-
await fs$
|
|
34383
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
34384
34384
|
throw thrown;
|
|
34385
34385
|
}
|
|
34386
34386
|
} finally {
|
|
@@ -34393,7 +34393,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
34393
34393
|
}
|
|
34394
34394
|
async function writeBase64ToFile(filePath, base64) {
|
|
34395
34395
|
const buf = Buffer.from(base64, "base64");
|
|
34396
|
-
await fs$
|
|
34396
|
+
await fs$1.writeFile(filePath, buf);
|
|
34397
34397
|
return {
|
|
34398
34398
|
path: filePath,
|
|
34399
34399
|
bytes: buf.length
|
|
@@ -37438,9 +37438,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
37438
37438
|
const entries = [];
|
|
37439
37439
|
for (const rawPath of paths) {
|
|
37440
37440
|
const resolved = resolveUserPath(rawPath);
|
|
37441
|
-
if (!
|
|
37441
|
+
if (!syncFs.existsSync(resolved)) continue;
|
|
37442
37442
|
try {
|
|
37443
|
-
const payload = JSON.parse(
|
|
37443
|
+
const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
|
|
37444
37444
|
entries.push(...parseCatalogEntries(payload));
|
|
37445
37445
|
} catch {}
|
|
37446
37446
|
}
|
|
@@ -41154,7 +41154,7 @@ function listExistingAgentIdsFromDisk() {
|
|
|
41154
41154
|
const root = resolveStateDir();
|
|
41155
41155
|
const agentsDir = path.join(root, "agents");
|
|
41156
41156
|
try {
|
|
41157
|
-
return
|
|
41157
|
+
return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
|
|
41158
41158
|
} catch {
|
|
41159
41159
|
return [];
|
|
41160
41160
|
}
|
|
@@ -47079,7 +47079,7 @@ async function runAgentTurnWithFallback(params) {
|
|
|
47079
47079
|
if (corruptedSessionId) {
|
|
47080
47080
|
const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
|
|
47081
47081
|
try {
|
|
47082
|
-
|
|
47082
|
+
syncFs.unlinkSync(transcriptPath);
|
|
47083
47083
|
} catch {}
|
|
47084
47084
|
}
|
|
47085
47085
|
delete params.activeSessionStore[sessionKey];
|
|
@@ -47880,7 +47880,7 @@ async function readSessionLogSnapshot(params) {
|
|
|
47880
47880
|
if (!logPath) return {};
|
|
47881
47881
|
const snapshot = {};
|
|
47882
47882
|
if (params.includeByteSize) try {
|
|
47883
|
-
const stat = await
|
|
47883
|
+
const stat = await syncFs.promises.stat(logPath);
|
|
47884
47884
|
const size = Math.floor(stat.size);
|
|
47885
47885
|
snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
|
|
47886
47886
|
} catch {
|
|
@@ -47894,7 +47894,7 @@ async function readSessionLogSnapshot(params) {
|
|
|
47894
47894
|
return snapshot;
|
|
47895
47895
|
}
|
|
47896
47896
|
async function readLastNonzeroUsageFromSessionLog(logPath) {
|
|
47897
|
-
const handle = await
|
|
47897
|
+
const handle = await syncFs.promises.open(logPath, "r");
|
|
47898
47898
|
try {
|
|
47899
47899
|
let position = (await handle.stat()).size;
|
|
47900
47900
|
let leadingPartial = "";
|
|
@@ -48565,9 +48565,9 @@ async function readPostCompactionContext(workspaceDir) {
|
|
|
48565
48565
|
if (!opened.ok) return null;
|
|
48566
48566
|
const sections = extractSections((() => {
|
|
48567
48567
|
try {
|
|
48568
|
-
return
|
|
48568
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
48569
48569
|
} finally {
|
|
48570
|
-
|
|
48570
|
+
syncFs.closeSync(opened.fd);
|
|
48571
48571
|
}
|
|
48572
48572
|
})(), ["Session Startup", "Red Lines"]);
|
|
48573
48573
|
if (sections.length === 0) return null;
|
|
@@ -48782,7 +48782,7 @@ async function runReplyAgent(params) {
|
|
|
48782
48782
|
if (resolved) transcriptCandidates.add(resolved);
|
|
48783
48783
|
transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
|
|
48784
48784
|
for (const candidate of transcriptCandidates) try {
|
|
48785
|
-
|
|
48785
|
+
syncFs.unlinkSync(candidate);
|
|
48786
48786
|
} catch {}
|
|
48787
48787
|
}
|
|
48788
48788
|
return true;
|
|
@@ -49773,7 +49773,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
49773
49773
|
return;
|
|
49774
49774
|
}
|
|
49775
49775
|
try {
|
|
49776
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
49776
|
+
const { deliverOutboundPayloads } = await import("./deliver-zrYSWfQ5.js").then((n) => n.n);
|
|
49777
49777
|
const outboundSession = buildOutboundSessionContext({
|
|
49778
49778
|
cfg: params.cfg,
|
|
49779
49779
|
sessionKey: params.sessionKey
|
|
@@ -49911,7 +49911,7 @@ function forkSessionFromParent(params) {
|
|
|
49911
49911
|
agentId: params.agentId,
|
|
49912
49912
|
sessionsDir: params.sessionsDir
|
|
49913
49913
|
});
|
|
49914
|
-
if (!parentSessionFile || !
|
|
49914
|
+
if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
|
|
49915
49915
|
try {
|
|
49916
49916
|
const manager = SessionManager.open(parentSessionFile);
|
|
49917
49917
|
const leafId = manager.getLeafId();
|
|
@@ -49935,7 +49935,7 @@ function forkSessionFromParent(params) {
|
|
|
49935
49935
|
cwd: manager.getCwd(),
|
|
49936
49936
|
parentSession: parentSessionFile
|
|
49937
49937
|
};
|
|
49938
|
-
|
|
49938
|
+
syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
|
|
49939
49939
|
return {
|
|
49940
49940
|
sessionId,
|
|
49941
49941
|
sessionFile
|
|
@@ -54715,7 +54715,7 @@ async function describeStickerImage(params) {
|
|
|
54715
54715
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
54716
54716
|
try {
|
|
54717
54717
|
const buffer = await fs.readFile(imagePath);
|
|
54718
|
-
const { describeImageWithModel } = await import("./image-
|
|
54718
|
+
const { describeImageWithModel } = await import("./image-DnxYCkHO.js").then((n) => n.n);
|
|
54719
54719
|
return (await describeImageWithModel({
|
|
54720
54720
|
buffer,
|
|
54721
54721
|
fileName: "sticker.webp",
|
|
@@ -56469,7 +56469,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
56469
56469
|
const needsPreflightTranscription = !params.isDirectMessage && params.shouldRequireMention && hasAudioAttachment && !hasTypedText && params.mentionRegexes.length > 0;
|
|
56470
56470
|
let transcript;
|
|
56471
56471
|
if (needsPreflightTranscription) try {
|
|
56472
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
56472
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-C2pZmbnM.js");
|
|
56473
56473
|
const audioUrls = audioAttachments.map((att) => att.url).filter((url) => typeof url === "string" && url.length > 0);
|
|
56474
56474
|
if (audioUrls.length > 0) transcript = await transcribeFirstAudio({
|
|
56475
56475
|
ctx: {
|
|
@@ -57924,7 +57924,7 @@ function identityHasValues(identity) {
|
|
|
57924
57924
|
}
|
|
57925
57925
|
function loadIdentityFromFile(identityPath) {
|
|
57926
57926
|
try {
|
|
57927
|
-
const parsed = parseIdentityMarkdown(
|
|
57927
|
+
const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
|
|
57928
57928
|
if (!identityHasValues(parsed)) return null;
|
|
57929
57929
|
return parsed;
|
|
57930
57930
|
} catch {
|
|
@@ -57948,7 +57948,7 @@ function resolveAvatarSource(cfg, agentId) {
|
|
|
57948
57948
|
}
|
|
57949
57949
|
function resolveExistingPath(value) {
|
|
57950
57950
|
try {
|
|
57951
|
-
return
|
|
57951
|
+
return syncFs.realpathSync(value);
|
|
57952
57952
|
} catch {
|
|
57953
57953
|
return path.resolve(value);
|
|
57954
57954
|
}
|
|
@@ -57966,7 +57966,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
57966
57966
|
reason: "unsupported_extension"
|
|
57967
57967
|
};
|
|
57968
57968
|
try {
|
|
57969
|
-
const stat =
|
|
57969
|
+
const stat = syncFs.statSync(realPath);
|
|
57970
57970
|
if (!stat.isFile()) return {
|
|
57971
57971
|
ok: false,
|
|
57972
57972
|
reason: "missing"
|
|
@@ -61011,27 +61011,27 @@ function createOutboundSendDepsFromCliSource(deps) {
|
|
|
61011
61011
|
function createDefaultDeps() {
|
|
61012
61012
|
return {
|
|
61013
61013
|
sendMessageWhatsApp: async (...args) => {
|
|
61014
|
-
const { sendMessageWhatsApp } = await import("./web-
|
|
61014
|
+
const { sendMessageWhatsApp } = await import("./web-C5gLi1bN.js");
|
|
61015
61015
|
return await sendMessageWhatsApp(...args);
|
|
61016
61016
|
},
|
|
61017
61017
|
sendMessageTelegram: async (...args) => {
|
|
61018
|
-
const { sendMessageTelegram } = await import("./send-
|
|
61018
|
+
const { sendMessageTelegram } = await import("./send-D2zYssqK.js").then((n) => n.l);
|
|
61019
61019
|
return await sendMessageTelegram(...args);
|
|
61020
61020
|
},
|
|
61021
61021
|
sendMessageDiscord: async (...args) => {
|
|
61022
|
-
const { sendMessageDiscord } = await import("./send-
|
|
61022
|
+
const { sendMessageDiscord } = await import("./send-DcL81tZr.js").then((n) => n.t);
|
|
61023
61023
|
return await sendMessageDiscord(...args);
|
|
61024
61024
|
},
|
|
61025
61025
|
sendMessageSlack: async (...args) => {
|
|
61026
|
-
const { sendMessageSlack } = await import("./send-
|
|
61026
|
+
const { sendMessageSlack } = await import("./send-CcQZM0c7.js").then((n) => n.n);
|
|
61027
61027
|
return await sendMessageSlack(...args);
|
|
61028
61028
|
},
|
|
61029
61029
|
sendMessageSignal: async (...args) => {
|
|
61030
|
-
const { sendMessageSignal } = await import("./send-
|
|
61030
|
+
const { sendMessageSignal } = await import("./send-BpyiQEov.js").then((n) => n.i);
|
|
61031
61031
|
return await sendMessageSignal(...args);
|
|
61032
61032
|
},
|
|
61033
61033
|
sendMessageIMessage: async (...args) => {
|
|
61034
|
-
const { sendMessageIMessage } = await import("./send-
|
|
61034
|
+
const { sendMessageIMessage } = await import("./send--Gq-Uh-l.js").then((n) => n.n);
|
|
61035
61035
|
return await sendMessageIMessage(...args);
|
|
61036
61036
|
}
|
|
61037
61037
|
};
|
|
@@ -64459,7 +64459,7 @@ function createDiscordGatewayPlugin(params) {
|
|
|
64459
64459
|
return super.registerClient(client);
|
|
64460
64460
|
}
|
|
64461
64461
|
createWebSocket(url) {
|
|
64462
|
-
return new WebSocket(url, { agent: wsAgent });
|
|
64462
|
+
return new WebSocket$1(url, { agent: wsAgent });
|
|
64463
64463
|
}
|
|
64464
64464
|
}
|
|
64465
64465
|
return new ProxyGatewayPlugin();
|
|
@@ -66837,7 +66837,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
66837
66837
|
function readFileIfExists(filePath) {
|
|
66838
66838
|
if (!filePath) return;
|
|
66839
66839
|
try {
|
|
66840
|
-
return
|
|
66840
|
+
return syncFs.readFileSync(filePath, "utf-8").trim();
|
|
66841
66841
|
} catch {
|
|
66842
66842
|
return;
|
|
66843
66843
|
}
|
|
@@ -67451,7 +67451,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
67451
67451
|
prefix: "line-media",
|
|
67452
67452
|
extension: getExtensionForContentType(contentType)
|
|
67453
67453
|
});
|
|
67454
|
-
await
|
|
67454
|
+
await syncFs.promises.writeFile(filePath, buffer);
|
|
67455
67455
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
67456
67456
|
return {
|
|
67457
67457
|
path: filePath,
|
|
@@ -73124,7 +73124,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
73124
73124
|
}
|
|
73125
73125
|
let commandsRegistry;
|
|
73126
73126
|
async function getCommandsRegistry() {
|
|
73127
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
73127
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-CTkboeeC.js").then((n) => n.n);
|
|
73128
73128
|
return commandsRegistry;
|
|
73129
73129
|
}
|
|
73130
73130
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -73454,14 +73454,14 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
73454
73454
|
const channelName = channelInfo?.name;
|
|
73455
73455
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
73456
73456
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
73457
|
-
import("./resolve-route-
|
|
73457
|
+
import("./resolve-route-C5hVstLo.js").then((n) => n.r),
|
|
73458
73458
|
import("./inbound-context-CTd41MBO.js").then((n) => n.n),
|
|
73459
73459
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
73460
73460
|
]);
|
|
73461
73461
|
const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
|
|
73462
73462
|
import("./conversation-label-Dyk7sOSM.js").then((n) => n.t),
|
|
73463
|
-
import("./reply-prefix-
|
|
73464
|
-
import("./session-meta-
|
|
73463
|
+
import("./reply-prefix-DK1i6bCJ.js").then((n) => n.n),
|
|
73464
|
+
import("./session-meta-BbCwXniv.js").then((n) => n.n)
|
|
73465
73465
|
]);
|
|
73466
73466
|
const route = resolveAgentRoute({
|
|
73467
73467
|
cfg,
|
|
@@ -73526,9 +73526,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
73526
73526
|
});
|
|
73527
73527
|
const deliverSlashPayloads = async (replies) => {
|
|
73528
73528
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
73529
|
-
import("./replies-
|
|
73530
|
-
import("./chunk-
|
|
73531
|
-
import("./markdown-tables-
|
|
73529
|
+
import("./replies-D6zARd6r.js").then((n) => n.r),
|
|
73530
|
+
import("./chunk-2ZxftpDd.js").then((n) => n.s),
|
|
73531
|
+
import("./markdown-tables-BHONoo6S.js").then((n) => n.t)
|
|
73532
73532
|
]);
|
|
73533
73533
|
await deliverSlackSlashReplies({
|
|
73534
73534
|
replies,
|
|
@@ -73581,7 +73581,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
73581
73581
|
let nativeCommands = [];
|
|
73582
73582
|
if (nativeEnabled) {
|
|
73583
73583
|
reg = await getCommandsRegistry();
|
|
73584
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
73584
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-Cea3CZFF.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
73585
73585
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
73586
73586
|
skillCommands,
|
|
73587
73587
|
provider: "slack"
|
|
@@ -74167,7 +74167,7 @@ async function auditTelegramGroupMembership(params) {
|
|
|
74167
74167
|
groups: [],
|
|
74168
74168
|
elapsedMs: Date.now() - started
|
|
74169
74169
|
};
|
|
74170
|
-
const fetcher = params.proxyUrl ? (await import("./proxy-
|
|
74170
|
+
const fetcher = params.proxyUrl ? (await import("./proxy-DfJJLvch.js").then((n) => n.t)).makeProxyFetch(params.proxyUrl) : fetch;
|
|
74171
74171
|
const { fetchWithTimeout } = await import("./fetch-timeout-CYFFedEH.js").then((n) => n.r);
|
|
74172
74172
|
const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
|
|
74173
74173
|
const groups = [];
|
|
@@ -76490,7 +76490,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
|
|
|
76490
76490
|
const disableAudioPreflight = firstDefined$1(topicConfig?.disableAudioPreflight, groupConfig?.disableAudioPreflight) === true;
|
|
76491
76491
|
let preflightTranscript;
|
|
76492
76492
|
if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
|
|
76493
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
76493
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-C2pZmbnM.js");
|
|
76494
76494
|
preflightTranscript = await transcribeFirstAudio({
|
|
76495
76495
|
ctx: {
|
|
76496
76496
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -79188,7 +79188,7 @@ function createWhatsAppLoginTool() {
|
|
|
79188
79188
|
force: Type.Optional(Type.Boolean())
|
|
79189
79189
|
}),
|
|
79190
79190
|
execute: async (_toolCallId, args) => {
|
|
79191
|
-
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-
|
|
79191
|
+
const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DUJfhbUe.js");
|
|
79192
79192
|
if ((args?.action ?? "start") === "wait") {
|
|
79193
79193
|
const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
|
|
79194
79194
|
return {
|
|
@@ -79263,23 +79263,23 @@ let webLoginQrPromise = null;
|
|
|
79263
79263
|
let webChannelPromise = null;
|
|
79264
79264
|
let whatsappActionsPromise = null;
|
|
79265
79265
|
function loadWebOutbound() {
|
|
79266
|
-
webOutboundPromise ??= import("./outbound-
|
|
79266
|
+
webOutboundPromise ??= import("./outbound-9rXkgGZM.js").then((n) => n.t);
|
|
79267
79267
|
return webOutboundPromise;
|
|
79268
79268
|
}
|
|
79269
79269
|
function loadWebLogin() {
|
|
79270
|
-
webLoginPromise ??= import("./login-
|
|
79270
|
+
webLoginPromise ??= import("./login-CgEHUE7h.js").then((n) => n.n);
|
|
79271
79271
|
return webLoginPromise;
|
|
79272
79272
|
}
|
|
79273
79273
|
function loadWebLoginQr() {
|
|
79274
|
-
webLoginQrPromise ??= import("./login-qr-
|
|
79274
|
+
webLoginQrPromise ??= import("./login-qr-DUJfhbUe.js");
|
|
79275
79275
|
return webLoginQrPromise;
|
|
79276
79276
|
}
|
|
79277
79277
|
function loadWebChannel() {
|
|
79278
|
-
webChannelPromise ??= import("./web-
|
|
79278
|
+
webChannelPromise ??= import("./web-C5gLi1bN.js");
|
|
79279
79279
|
return webChannelPromise;
|
|
79280
79280
|
}
|
|
79281
79281
|
function loadWhatsAppActions() {
|
|
79282
|
-
whatsappActionsPromise ??= import("./whatsapp-actions-
|
|
79282
|
+
whatsappActionsPromise ??= import("./whatsapp-actions-Be9uvUUL.js");
|
|
79283
79283
|
return whatsappActionsPromise;
|
|
79284
79284
|
}
|
|
79285
79285
|
function createRuntimeWhatsApp() {
|
|
@@ -79729,7 +79729,7 @@ async function getMemorySearchManager(params) {
|
|
|
79729
79729
|
if (cached) return { manager: cached };
|
|
79730
79730
|
}
|
|
79731
79731
|
try {
|
|
79732
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
79732
|
+
const { QmdMemoryManager } = await import("./qmd-manager-n4jauq3A.js");
|
|
79733
79733
|
const primary = await QmdMemoryManager.create({
|
|
79734
79734
|
cfg: params.cfg,
|
|
79735
79735
|
agentId: params.agentId,
|
|
@@ -79741,7 +79741,7 @@ async function getMemorySearchManager(params) {
|
|
|
79741
79741
|
const wrapper = new FallbackMemoryManager({
|
|
79742
79742
|
primary,
|
|
79743
79743
|
fallbackFactory: async () => {
|
|
79744
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
79744
|
+
const { MemoryIndexManager } = await import("./manager-tozHviEd.js").then((n) => n.t);
|
|
79745
79745
|
return await MemoryIndexManager.get(params);
|
|
79746
79746
|
}
|
|
79747
79747
|
}, () => {
|
|
@@ -79756,7 +79756,7 @@ async function getMemorySearchManager(params) {
|
|
|
79756
79756
|
}
|
|
79757
79757
|
}
|
|
79758
79758
|
try {
|
|
79759
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
79759
|
+
const { MemoryIndexManager } = await import("./manager-tozHviEd.js").then((n) => n.t);
|
|
79760
79760
|
return { manager: await MemoryIndexManager.get(params) };
|
|
79761
79761
|
} catch (err) {
|
|
79762
79762
|
return {
|
|
@@ -80283,7 +80283,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
80283
80283
|
}
|
|
80284
80284
|
async function checkReadableFile(pathname) {
|
|
80285
80285
|
try {
|
|
80286
|
-
await fs.access(pathname,
|
|
80286
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
80287
80287
|
return { exists: true };
|
|
80288
80288
|
} catch (err) {
|
|
80289
80289
|
const code = err.code;
|
|
@@ -80342,7 +80342,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
80342
80342
|
}
|
|
80343
80343
|
let dirReadable = null;
|
|
80344
80344
|
try {
|
|
80345
|
-
await fs.access(memoryDir,
|
|
80345
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
80346
80346
|
dirReadable = true;
|
|
80347
80347
|
} catch (err) {
|
|
80348
80348
|
const code = err.code;
|
|
@@ -80788,7 +80788,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
80788
80788
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
80789
80789
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
80790
80790
|
const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
80791
|
-
for (const candidate of orderedCandidates) if (
|
|
80791
|
+
for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
|
|
80792
80792
|
const parent = path.dirname(cursor);
|
|
80793
80793
|
if (parent === cursor) break;
|
|
80794
80794
|
cursor = parent;
|
|
@@ -81125,7 +81125,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
81125
81125
|
continue;
|
|
81126
81126
|
}
|
|
81127
81127
|
const safeSource = opened.path;
|
|
81128
|
-
|
|
81128
|
+
syncFs.closeSync(opened.fd);
|
|
81129
81129
|
let mod = null;
|
|
81130
81130
|
try {
|
|
81131
81131
|
mod = getJiti()(safeSource);
|
|
@@ -81243,7 +81243,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
81243
81243
|
}
|
|
81244
81244
|
function safeRealpathOrResolve(value) {
|
|
81245
81245
|
try {
|
|
81246
|
-
return
|
|
81246
|
+
return syncFs.realpathSync(value);
|
|
81247
81247
|
} catch {
|
|
81248
81248
|
return path.resolve(value);
|
|
81249
81249
|
}
|
|
@@ -81682,9 +81682,9 @@ function resolvePatchFileOps(options) {
|
|
|
81682
81682
|
});
|
|
81683
81683
|
assertBoundaryRead(opened, filePath);
|
|
81684
81684
|
try {
|
|
81685
|
-
return
|
|
81685
|
+
return syncFs.readFileSync(opened.fd, "utf8");
|
|
81686
81686
|
} finally {
|
|
81687
|
-
|
|
81687
|
+
syncFs.closeSync(opened.fd);
|
|
81688
81688
|
}
|
|
81689
81689
|
},
|
|
81690
81690
|
writeFile: async (filePath, content) => {
|
|
@@ -81980,7 +81980,7 @@ async function recordLoopOutcome(args) {
|
|
|
81980
81980
|
if (!args.ctx?.sessionKey) return;
|
|
81981
81981
|
try {
|
|
81982
81982
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DBPrVBk3.js").then((n) => n.n);
|
|
81983
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
81983
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-CLoYKYIq.js");
|
|
81984
81984
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
81985
81985
|
sessionKey: args.ctx.sessionKey,
|
|
81986
81986
|
sessionId: args.ctx?.agentId
|
|
@@ -82001,8 +82001,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
82001
82001
|
const params = args.params;
|
|
82002
82002
|
if (args.ctx?.sessionKey) {
|
|
82003
82003
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DBPrVBk3.js").then((n) => n.n);
|
|
82004
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
82005
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
82004
|
+
const { logToolLoopAction } = await import("./diagnostic-BO1GQJJf.js").then((n) => n.n);
|
|
82005
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-CLoYKYIq.js");
|
|
82006
82006
|
const sessionState = getDiagnosticSessionState({
|
|
82007
82007
|
sessionKey: args.ctx.sessionKey,
|
|
82008
82008
|
sessionId: args.ctx?.agentId
|
|
@@ -84487,9 +84487,9 @@ async function readWorkspaceContextForSummary() {
|
|
|
84487
84487
|
if (!opened.ok) return "";
|
|
84488
84488
|
const sections = extractSections((() => {
|
|
84489
84489
|
try {
|
|
84490
|
-
return
|
|
84490
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
84491
84491
|
} finally {
|
|
84492
|
-
|
|
84492
|
+
syncFs.closeSync(opened.fd);
|
|
84493
84493
|
}
|
|
84494
84494
|
})(), ["Session Startup", "Red Lines"]);
|
|
84495
84495
|
if (sections.length === 0) return "";
|
|
@@ -85836,7 +85836,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
85836
85836
|
if (!apiKeyInfo.apiKey) {
|
|
85837
85837
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
85838
85838
|
} else if (model.provider === "github-copilot") {
|
|
85839
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
85839
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
|
|
85840
85840
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
85841
85841
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
85842
85842
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
@@ -87086,7 +87086,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
87086
87086
|
* Throws if the connection is not open.
|
|
87087
87087
|
*/
|
|
87088
87088
|
send(event) {
|
|
87089
|
-
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
|
|
87089
|
+
if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
|
|
87090
87090
|
this.ws.send(JSON.stringify(event));
|
|
87091
87091
|
}
|
|
87092
87092
|
/**
|
|
@@ -87103,7 +87103,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
87103
87103
|
* Returns true if the WebSocket is currently open and ready to send.
|
|
87104
87104
|
*/
|
|
87105
87105
|
isConnected() {
|
|
87106
|
-
return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
|
|
87106
|
+
return this.ws !== null && this.ws.readyState === WebSocket$1.OPEN;
|
|
87107
87107
|
}
|
|
87108
87108
|
/**
|
|
87109
87109
|
* Permanently closes the WebSocket connection and disables auto-reconnect.
|
|
@@ -87113,7 +87113,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
87113
87113
|
this._cancelRetryTimer();
|
|
87114
87114
|
if (this.ws) {
|
|
87115
87115
|
this.ws.removeAllListeners();
|
|
87116
|
-
if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
|
|
87116
|
+
if (this.ws.readyState === WebSocket$1.OPEN || this.ws.readyState === WebSocket$1.CONNECTING) this.ws.close(1e3, "Client closed");
|
|
87117
87117
|
this.ws = null;
|
|
87118
87118
|
}
|
|
87119
87119
|
}
|
|
@@ -87123,7 +87123,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
87123
87123
|
reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
|
|
87124
87124
|
return;
|
|
87125
87125
|
}
|
|
87126
|
-
const socket = new WebSocket(this.wsUrl, { headers: {
|
|
87126
|
+
const socket = new WebSocket$1(this.wsUrl, { headers: {
|
|
87127
87127
|
Authorization: `Bearer ${this.apiKey}`,
|
|
87128
87128
|
"OpenAI-Beta": "responses-websocket=v1"
|
|
87129
87129
|
} });
|
|
@@ -88089,11 +88089,11 @@ function appendRawStream(payload) {
|
|
|
88089
88089
|
if (!rawStreamReady) {
|
|
88090
88090
|
rawStreamReady = true;
|
|
88091
88091
|
try {
|
|
88092
|
-
|
|
88092
|
+
syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
|
|
88093
88093
|
} catch {}
|
|
88094
88094
|
}
|
|
88095
88095
|
try {
|
|
88096
|
-
|
|
88096
|
+
syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
|
|
88097
88097
|
} catch {}
|
|
88098
88098
|
}
|
|
88099
88099
|
|
|
@@ -91603,7 +91603,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
91603
91603
|
await copilotTokenState.refreshInFlight;
|
|
91604
91604
|
return;
|
|
91605
91605
|
}
|
|
91606
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
91606
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
|
|
91607
91607
|
copilotTokenState.refreshInFlight = (async () => {
|
|
91608
91608
|
const githubToken = copilotTokenState.githubToken.trim();
|
|
91609
91609
|
if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
|
|
@@ -91695,7 +91695,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
91695
91695
|
return;
|
|
91696
91696
|
}
|
|
91697
91697
|
if (model.provider === "github-copilot") {
|
|
91698
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
91698
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DLGN-8YS.js").then((n) => n.n);
|
|
91699
91699
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
91700
91700
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
91701
91701
|
if (copilotTokenState) {
|