wednesdayai 0.5.1-dev.40 → 0.5.1-dev.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-scope-BudmZlc1.js → agent-scope-CXfIHPTl.js} +3 -3
- package/dist/{agent-scope-BJFJ0deZ.js → agent-scope-DUbhjnHb.js} +18 -18
- package/dist/{agent-turn-execute-CIlMMXNu.js → agent-turn-execute-8DU-jztX.js} +168 -168
- package/dist/{agent-turn-runner-C5FiRTJg.js → agent-turn-runner-BJqs23F_.js} +6 -6
- package/dist/{agent-turn-runner-SxjOzPCD.js → agent-turn-runner-DHc4lH66.js} +6 -6
- package/dist/{api-key-rotation-BWj1Itf-.js → api-key-rotation-B8RAiYZ_.js} +2 -2
- package/dist/{api-key-rotation-DzXkIU1m.js → api-key-rotation-PK29aYV9.js} +2 -2
- package/dist/{audio-preflight-CKxOmHZL.js → audio-preflight-Cio-wP6C.js} +22 -22
- package/dist/{audio-preflight-E-nHdi7I.js → audio-preflight-DaYu-alJ.js} +27 -27
- package/dist/{audio-transcription-runner-Cc-hAbE1.js → audio-transcription-runner-DW04B1B-.js} +26 -26
- package/dist/{audio-transcription-runner-DrIyj8a5.js → audio-transcription-runner-D_-_mf4m.js} +25 -25
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +58 -58
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +58 -58
- package/dist/bundled/session-memory/handler.js +58 -58
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{chat-content-CL44f6Ub.js → chat-content-DIjp-kW-.js} +36 -36
- package/dist/{chat-content-BgW4rG28.js → chat-content-tQ21BnhN.js} +24 -24
- package/dist/{plugin-sdk/chrome-DML7V0HT.js → chrome-C9TkYQeh.js} +26 -26
- package/dist/{chrome-DNTX4D1k.js → chrome-DxiDoVpi.js} +13 -13
- package/dist/{chunk-BEuk6eCG.js → chunk-50mU2Avf.js} +3 -3
- package/dist/{chunk-BHQuzJtJ.js → chunk-DCCRrNDr.js} +3 -3
- package/dist/{command-queue-CyJUnsMn.js → command-queue-De2GI8TP.js} +1 -1
- package/dist/{command-queue-D_saM8MV.js → command-queue-yDJ733aN.js} +1 -1
- package/dist/{command-registry-xYf1aBOy.js → command-registry-Ip0F63vx.js} +4 -4
- package/dist/{commands-registry-CNVoO37I.js → commands-registry-C3LKhQLY.js} +2 -2
- package/dist/{commands-registry-C-BDBl_b.js → commands-registry-CzTzqbi9.js} +2 -2
- package/dist/{completion-cli-od6mAB_x.js → completion-cli-BFHL_SSq.js} +2 -2
- package/dist/{completion-cli-BIuMSnSA.js → completion-cli-EqOcxJpx.js} +1 -1
- package/dist/{config-CPcuaNsB.js → config-D5tWLhng.js} +26 -26
- package/dist/config.js +3 -3
- package/dist/{credentials-DnIj4HtR.js → credentials-BAWD9O8L.js} +1 -1
- package/dist/{credentials-2Kd9Ahu7.js → credentials-DdZjLLBj.js} +1 -1
- package/dist/{deliver-Ap_fWjsf.js → deliver-Cqo4_R0v.js} +14 -14
- package/dist/{deliver-DUUEMT-w.js → deliver-DeMElZFE.js} +29 -29
- package/dist/{diagnostic-YRGuisNG.js → diagnostic-BqFtliY1.js} +3 -3
- package/dist/{diagnostic--vAGyKdB.js → diagnostic-Nq6B3DZr.js} +3 -3
- package/dist/{doctor-completion-xR-LI2Kc.js → doctor-completion-CNBGQIUD.js} +1 -1
- package/dist/{doctor-completion-B3oIZ4R2.js → doctor-completion-W6Xmw25w.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{plugin-sdk/errors-BH3DYZVB.js → errors-BWpk4nzX.js} +1 -1
- package/dist/{errors-DnOtx_vg.js → errors-D8k7j4A4.js} +1 -1
- package/dist/{fetch-ChtdmCYU.js → fetch-CHncmQms.js} +8 -8
- package/dist/{plugin-sdk/fetch-BxGJD3sH.js → fetch-CLvElPgY.js} +1 -1
- package/dist/{plugin-sdk/fetch-BqFNIJpI.js → fetch-DG4n5iR6.js} +1 -1
- package/dist/{fetch-BJ9kDOw8.js → fetch-TzOudNO4.js} +7 -7
- package/dist/{fetch-guard-CRERUrFK.js → fetch-guard-BZlxmZcA.js} +2 -2
- package/dist/{fetch-guard-BnKTeFyb.js → fetch-guard-kz-XQlCx.js} +2 -2
- package/dist/{frontmatter-CqznVm7P.js → frontmatter-BDLxOane.js} +5 -5
- package/dist/{fs-safe-C3qJHn62.js → fs-safe-BH37Yhl8.js} +25 -25
- package/dist/{fs-safe-D96d8swI.js → fs-safe-BjrptUz1.js} +26 -26
- package/dist/{gateway-cli-B0WWrjnY.js → gateway-cli-D17zAbrY.js} +20 -10
- package/dist/{gateway-cli-BRUhDHZW.js → gateway-cli-DktZhN9y.js} +20 -10
- package/dist/{image-ops-BiBI-uAf.js → image-ops-BWgZn39_.js} +1 -1
- package/dist/{image-ops-BTgGxcIG.js → image-ops-C54shfkj.js} +11 -11
- package/dist/index.js +1 -1
- package/dist/{ir-IKFrcD2H.js → ir-Btci3Wse.js} +8 -8
- package/dist/{ir-Drj2D5Gr.js → ir-SWdqg35s.js} +5 -5
- package/dist/{json-files-DNv3G6Vg.js → json-files-C3L53Qrl.js} +7 -7
- package/dist/{legacy-names-Bx5L8LWT.js → legacy-names-BKv-k5-D.js} +1 -1
- package/dist/llm-slug-generator.js +58 -58
- package/dist/{manager-Cb_Lde6Q.js → manager-BPk0HUHz.js} +14 -14
- package/dist/{manager-C9H5Oflk.js → manager-Nw8a10KA.js} +18 -18
- package/dist/{markdown-tables-Crj_Y0Qx.js → markdown-tables-BJqhUgli.js} +2 -2
- package/dist/{markdown-tables-BvoP0b-H.js → markdown-tables-By4yQcHS.js} +2 -2
- package/dist/{model-selection-2-pBJbaC.js → model-selection-JA-6f5ss.js} +84 -84
- package/dist/{models-config-7yfOGOZY.js → models-config-Cbzv_acs.js} +2 -2
- package/dist/{models-config-DkEpc_7A.js → models-config-TH00YNHC.js} +7 -7
- package/dist/{nudge-BR_K1LnT.js → nudge-DVGzMWUi.js} +16 -16
- package/dist/{nudge-CcGwhSSL.js → nudge-Da1ePscI.js} +35 -35
- package/dist/{onboard-CRHyyv-F.js → onboard-D2AmYbm8.js} +1 -1
- package/dist/{onboard-CYQVIEKp.js → onboard-PJee12bv.js} +1 -1
- package/dist/{onboarding-CDHMZKiy.js → onboarding-C1f94rh1.js} +1 -1
- package/dist/{onboarding-vLVDuEr7.js → onboarding-DXRhSAcO.js} +1 -1
- package/dist/{onboarding.finalize-D3hX9K5R.js → onboarding.finalize-C0RUJoiz.js} +4 -4
- package/dist/{onboarding.finalize-BDJnDt6t.js → onboarding.finalize-Calv0MIe.js} +3 -3
- package/dist/{outbound-attachment-CxvBVgcJ.js → outbound-attachment-CZwlqfbE.js} +2 -2
- package/dist/{outbound-attachment-DFIzmC4e.js → outbound-attachment-DAUmCye_.js} +2 -2
- package/dist/{outbound-message-hooks-C9zh-qk0.js → outbound-message-hooks-Bqu2fu_R.js} +4 -4
- package/dist/{outbound-message-hooks-DfRORyCc.js → outbound-message-hooks-CIrC0qAA.js} +5 -5
- package/dist/{pairing-files-ByediFgs.js → pairing-files-B1ukutA_.js} +1 -1
- package/dist/{path-alias-guards-B9AcbQl6.js → path-alias-guards-CGcezGX3.js} +3 -3
- package/dist/{path-alias-guards-BXXI1YTn.js → path-alias-guards-CgO2FpVx.js} +1 -1
- package/dist/{pi-embedded-Dp5uUcq6.js → pi-embedded-W4tWwQw6.js} +254 -254
- package/dist/{pi-embedded-utils-Dc-LEWCI.js → pi-embedded-utils-B6eeyw2H.js} +3 -3
- package/dist/{pi-embedded-utils-CQ3KPjMe.js → pi-embedded-utils-DF7kfQx2.js} +3 -3
- package/dist/{pi-model-discovery-C4WE3mR2.js → pi-model-discovery-VTZCKDCd.js} +1 -1
- package/dist/{pi-model-discovery-B44lshxv.js → pi-model-discovery-ym24jTFO.js} +7 -7
- package/dist/plugin-sdk/{agent-scope-Cy5bPtkD.js → agent-scope-BnbrZIzh.js} +1 -1
- package/dist/plugin-sdk/{agent-turn-execute-Cr_GYkDb.js → agent-turn-execute-Bj1_MqWi.js} +79 -79
- package/dist/plugin-sdk/agent-turn-execute-D0szeKs8.js +61 -0
- package/dist/plugin-sdk/{agent-turn-runner-D3tAlzpP.js → agent-turn-runner-fV3h6ELM.js} +6 -6
- package/dist/plugin-sdk/{agent-turn-runner-CBR6kAt-.js → agent-turn-runner-zbex5xar.js} +6 -6
- package/dist/plugin-sdk/{api-key-rotation-Dmd_whf1.js → api-key-rotation-DbJkvwYN.js} +1 -1
- package/dist/plugin-sdk/{api-key-rotation-BKcVxTy8.js → api-key-rotation-Dpyf5O6z.js} +2 -2
- package/dist/plugin-sdk/{audio-preflight-2XKqIXAx.js → audio-preflight-DhIYyWh0.js} +14 -14
- package/dist/plugin-sdk/{audio-preflight-BVKGoA22.js → audio-preflight-DlNHpUpW.js} +23 -23
- package/dist/plugin-sdk/{audio-transcription-runner-Cvfignlt.js → audio-transcription-runner-BNWmQAJ3.js} +10 -10
- package/dist/plugin-sdk/{audio-transcription-runner-2ziIuais.js → audio-transcription-runner-DbjdWQRu.js} +8 -8
- package/dist/plugin-sdk/{auth-profiles-BxDhfCHT.js → auth-profiles-DPd1Ol-P.js} +1 -1
- package/dist/plugin-sdk/{chat-content-DWJ_WMLQ.js → chat-content-CEMoDe5q.js} +9 -9
- package/dist/{chrome-D1006Mu2.js → plugin-sdk/chrome-CobI3ImG.js} +8 -8
- package/dist/plugin-sdk/{chrome-Djvom4Ij.js → chrome-DwoV5WFU.js} +6 -6
- package/dist/plugin-sdk/{chunk-SR4Ydfza.js → chunk-C3M1IW7W.js} +2 -2
- package/dist/plugin-sdk/{chunk-Bh4ffo9K.js → chunk-CBTJQenE.js} +3 -3
- package/dist/plugin-sdk/{command-queue-DUO9-NRr.js → command-queue-DUuIiwvi.js} +2 -2
- package/dist/plugin-sdk/{command-queue-DxcAKezg.js → command-queue-hSL_BIod.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-DnePgYTq.js → commands-registry-DPCcTIwi.js} +2 -2
- package/dist/plugin-sdk/{commands-registry-CCiWhIrU.js → commands-registry-vhM5U22x.js} +2 -2
- package/dist/plugin-sdk/{credentials-DJMyq23O.js → credentials-BgX_xjTe.js} +1 -1
- package/dist/plugin-sdk/{credentials-BFdx8hCQ.js → credentials-oF38Hm9r.js} +1 -1
- package/dist/plugin-sdk/{deliver-Cf-VdZA7.js → deliver-CkQB8s_s.js} +14 -14
- package/dist/plugin-sdk/deliver-DTstMBfw.js +34 -0
- package/dist/plugin-sdk/{deliver-D3LWZpv1.js → deliver-lkeqXp0v.js} +11 -11
- package/dist/plugin-sdk/{diagnostic-BXgGsRnq.js → diagnostic-TucKQ5Fk.js} +2 -2
- package/dist/plugin-sdk/{diagnostic-BpXW-Rhw.js → diagnostic-nUTVaBEe.js} +3 -3
- package/dist/plugin-sdk/{diagnostic-session-state-Y-_mHHE2.js → diagnostic-session-state-C74O1QW2.js} +1 -1
- package/dist/{errors-DnS9ngr1.js → plugin-sdk/errors-BcCM5PTR.js} +1 -1
- package/dist/{fetch-CrTLz8wd.js → plugin-sdk/fetch-BEOHdT2e.js} +1 -1
- package/dist/{fetch-DJPbv7La.js → plugin-sdk/fetch-BNHoA66Z.js} +1 -1
- package/dist/plugin-sdk/{fetch-CpY6mDmQ.js → fetch-D7rvWjfk.js} +2 -2
- package/dist/plugin-sdk/{fetch-B9WuvLLv.js → fetch-DV_cKD5m.js} +7 -7
- package/dist/plugin-sdk/{fetch-guard-BEue3kvx.js → fetch-guard-CQIsGUgZ.js} +1 -1
- package/dist/plugin-sdk/{fetch-guard-CJhIVznN.js → fetch-guard-Dpd7hJ0h.js} +2 -2
- package/dist/plugin-sdk/{fs-safe-BQ8e0fFk.js → fs-safe-CnAPtYPG.js} +3 -3
- package/dist/plugin-sdk/{image-ops-CqatVl0e.js → image-ops-1WkFRYfC.js} +1 -1
- package/dist/plugin-sdk/{inbound-context-CKtZsNVT.js → inbound-context-BdGImnhD.js} +1 -1
- package/dist/plugin-sdk/{ir-C1cLQG0N.js → ir-BnNIPrDz.js} +5 -5
- package/dist/plugin-sdk/{ir-Ep5lw12h.js → ir-D-nyt7yZ.js} +2 -2
- package/dist/plugin-sdk/{manager-DyYd10T2.js → manager-3Bw8zhA3.js} +4 -4
- package/dist/plugin-sdk/manager-BexdJt3o.js +14 -0
- package/dist/plugin-sdk/{manager-xGWNrW5i.js → manager-uIw894nB.js} +7 -7
- package/dist/plugin-sdk/{markdown-tables-DnMUQn1V.js → markdown-tables-D6Jl1s9s.js} +2 -2
- package/dist/plugin-sdk/{markdown-tables-B4G-uOPz.js → markdown-tables-DczIA0hC.js} +2 -2
- package/dist/plugin-sdk/{model-auth-pNsZhRxq.js → model-auth-Beiv1ujI.js} +7 -7
- package/dist/plugin-sdk/{models-config-DsHaLeW3.js → models-config-DPG3UP6h.js} +1 -1
- package/dist/plugin-sdk/{models-config-d-LFEKVs.js → models-config-DrzOHxl5.js} +2 -2
- package/dist/plugin-sdk/{monitor-CbKokdL4.js → monitor-BQWiYAwC.js} +77 -77
- package/dist/plugin-sdk/{nudge-z8ozyWd6.js → nudge-Cp00v46W.js} +11 -11
- package/dist/plugin-sdk/{nudge-BvirROp6.js → nudge-czM3OOTT.js} +8 -8
- package/dist/plugin-sdk/{openai-compatible-video-BxPbkLMy.js → openai-compatible-video-Dy57wpNv.js} +7 -7
- package/dist/plugin-sdk/{outbound-attachment-DkIWM5yK.js → outbound-attachment-BoSR20RK.js} +2 -2
- package/dist/plugin-sdk/{outbound-attachment-BrHUWeqB.js → outbound-attachment-JHREBMfy.js} +1 -1
- package/dist/plugin-sdk/{outbound-message-hooks-DsAvrOUy.js → outbound-message-hooks-eUNVCJ0m.js} +4 -4
- package/dist/plugin-sdk/{path-alias-guards-CF0cvXKB.js → path-alias-guards-D1I2TIj4.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-helpers-Ctve63Vr.js → pi-embedded-helpers-BRSkUtFR.js} +15 -15
- package/dist/plugin-sdk/{pi-embedded-utils-cecBA96E.js → pi-embedded-utils-DcsHTJ1m.js} +3 -3
- package/dist/plugin-sdk/{pi-embedded-utils-6FFFlkbd.js → pi-embedded-utils-JXHsJfhx.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-BnsoI-E6.js → pi-model-discovery-CKGA60jT.js} +2 -2
- package/dist/plugin-sdk/{pi-model-discovery-CMOEq078.js → pi-model-discovery-HVno_0HD.js} +1 -1
- package/dist/plugin-sdk/provider-dispatcher-Cq6Acy3h.js +61 -0
- package/dist/plugin-sdk/provider-media-understanding.js +20 -20
- package/dist/plugin-sdk/{proxy-env-jBCtIiJH.js → proxy-env-D9QKz5Mq.js} +1 -1
- package/dist/plugin-sdk/{pw-ai-Bl2Z9GYg.js → pw-ai-B1OqkFDb.js} +10 -10
- package/dist/plugin-sdk/{pw-ai-IAdR6aX7.js → pw-ai-B_6I8TGZ.js} +4 -4
- package/dist/plugin-sdk/{qmd-manager-DERrmogO.js → qmd-manager-CIgxgs0D.js} +2 -2
- package/dist/plugin-sdk/{qmd-manager-DY9c1S_2.js → qmd-manager-Ip6QnhA7.js} +8 -8
- package/dist/plugin-sdk/{qmd-scope-C3rw3Qjd.js → qmd-scope-DMNjwnEQ.js} +1 -1
- package/dist/plugin-sdk/{query-expansion-CWCvbGoy.js → query-expansion-CECAX0Pe.js} +1 -1
- package/dist/plugin-sdk/{query-expansion-BhXha2GI.js → query-expansion-DV-ECmRb.js} +2 -2
- package/dist/plugin-sdk/{recorder-xWMrt--U.js → recorder-C6OpZN3o.js} +1 -1
- package/dist/plugin-sdk/{recorder-DccHbgBz.js → recorder-XQ8ZjG7j.js} +2 -2
- package/dist/plugin-sdk/{redact-CXDVzhSq.js → redact-C3T6IWmQ.js} +1 -1
- package/dist/plugin-sdk/{registry-B-9fRLtl.js → registry-D9-EsIYH.js} +1 -1
- package/dist/plugin-sdk/{replies-BNtRlug2.js → replies-BhuMuYfa.js} +11 -11
- package/dist/plugin-sdk/{replies-CbnkLeUl.js → replies-ClN-Aak4.js} +4 -4
- package/dist/{replies-DAavcLc9.js → plugin-sdk/replies-HCqRS_IF.js} +5 -5
- package/dist/plugin-sdk/{reply-directives-CXKYiQC1.js → reply-directives-Bn4oBJnk.js} +2 -2
- package/dist/plugin-sdk/{reply-directives-CKNwlk_8.js → reply-directives-C69Fd8zO.js} +1 -1
- package/dist/plugin-sdk/{reply-prefix-DCeyas-6.js → reply-prefix-BQ-rDIAU.js} +1 -1
- package/dist/{reply-prefix-C08CPcgE.js → plugin-sdk/reply-prefix-CCyygbH2.js} +1 -1
- package/dist/plugin-sdk/{resolve-route-CsiTWvoi.js → resolve-route-Djrs4IWv.js} +3 -3
- package/dist/plugin-sdk/{resolve-route-t2HJkuDx.js → resolve-route-N9oe4tGM.js} +2 -2
- package/dist/plugin-sdk/{runs-B0mmuxPP.js → runs-0OTO0OVX.js} +12 -12
- package/dist/plugin-sdk/{runs-CSaP-UMd.js → runs-DK85oFoq.js} +7 -7
- package/dist/plugin-sdk/{runs-ByM3uA8B.js → runs-DN-UxJ44.js} +8 -8
- package/dist/plugin-sdk/{send-D0UAWWai.js → send-AstP-BDn.js} +8 -8
- package/dist/plugin-sdk/{send-BToCKtul.js → send-C8OYq5CD.js} +10 -10
- package/dist/plugin-sdk/send-CMAU8Lg8.js +23 -0
- package/dist/plugin-sdk/{send-CbbM7dcD.js → send-CVYVctJr.js} +6 -6
- package/dist/plugin-sdk/{send-hdgQBd4P.js → send-CciBIiE2.js} +4 -4
- package/dist/plugin-sdk/{send-rQhDBwIJ.js → send-CilPGWoe.js} +8 -8
- package/dist/plugin-sdk/{send-CTefF3Iw.js → send-CyKQnkbd.js} +6 -6
- package/dist/plugin-sdk/{send-Dgf6n9kX.js → send-D3hVSNy0.js} +6 -6
- package/dist/plugin-sdk/{send-qUR5w2lM.js → send-D5C72eu6.js} +7 -7
- package/dist/plugin-sdk/{send-CY2iq9C4.js → send-DFpY65tA.js} +10 -10
- package/dist/plugin-sdk/{send-BwuMsQ_p.js → send-DnJb7LiP.js} +8 -8
- package/dist/plugin-sdk/{send-BQYyBicH.js → send-dNeIyZEN.js} +5 -5
- package/dist/plugin-sdk/{session-context-E8Vv0lBU.js → session-context-4IeKkzGJ.js} +2 -2
- package/dist/plugin-sdk/{session-meta-_XFpsAgw.js → session-meta-BlMS0pts.js} +2 -2
- package/dist/plugin-sdk/{session-meta-B_alDqcD.js → session-meta-pKpwf1nQ.js} +1 -1
- package/dist/plugin-sdk/{sessions-DGyoDRbg.js → sessions-BUjbH5K1.js} +1 -1
- package/dist/plugin-sdk/{sessions-CkJfRajZ.js → sessions-BfBjVuaP.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-D5O0FXiW.js → skill-commands-Bk_STwKa.js} +4 -4
- package/dist/plugin-sdk/{skill-commands-DJ9gv-vK.js → skill-commands-J-ZcPvqF.js} +3 -3
- package/dist/plugin-sdk/{skills-ByCpoIW7.js → skills-BArFQgKX.js} +6 -6
- package/dist/plugin-sdk/{skills-mfK8NK3f.js → skills-W6RHTFue.js} +1 -1
- package/dist/plugin-sdk/{ssrf-aLKAjCHj.js → ssrf-B2UnPTf3.js} +1 -1
- package/dist/plugin-sdk/{store-KaVQ5gHj.js → store-D8eITlWs.js} +2 -2
- package/dist/plugin-sdk/{subagent-registry-DyI22dHA.js → subagent-registry-Bek3q0nu.js} +44 -44
- package/dist/plugin-sdk/{subsystem-DGPv0F8I.js → subsystem-Btq0amiz.js} +4 -4
- package/dist/plugin-sdk/{tables-CONj5xDV.js → tables-Bj_zeTwr.js} +1 -1
- package/dist/plugin-sdk/{tables-Dt2IrV1k.js → tables-ohryoECJ.js} +1 -1
- package/dist/plugin-sdk/testing.js +44 -44
- package/dist/plugin-sdk/{tokens-DUGBy1gM.js → tokens-mfZMXas7.js} +1 -1
- package/dist/plugin-sdk/{tool-loop-detection-Cl4-Vsd_.js → tool-loop-detection-CnFqoQKh.js} +1 -1
- package/dist/plugin-sdk/{user-run-recording-C05KbS-o.js → user-run-recording-CAAdiBWD.js} +2 -2
- package/dist/plugin-sdk/{user-run-recording--8aaZMPs.js → user-run-recording-DQBPNzif.js} +2 -2
- package/dist/plugin-sdk/{ws-C7BGsi5P.js → ws-DN6RmfyQ.js} +1 -1
- package/dist/plugin-sdk/{ws-BzjQAveZ.js → ws-zaFiZiYP.js} +1 -1
- package/dist/{program-CcLb8Psv.js → program-DYZ4XAFZ.js} +2 -2
- package/dist/{program-context-X8qIC1Px.js → program-context-BM_flY1J.js} +6 -6
- package/dist/{prompt-select-styled-NrfLylYh.js → prompt-select-styled-BFW0tf77.js} +1 -1
- package/dist/{prompt-select-styled-DUTH4ST5.js → prompt-select-styled-Eb9ltCzM.js} +1 -1
- package/dist/{proxy-env-Bw8nAERJ.js → proxy-env-DKs0W5v1.js} +1 -1
- package/dist/{proxy-env-DdoaBr4H.js → proxy-env-DtzLr6mZ.js} +1 -1
- package/dist/{pw-ai-C6ZFN6As.js → pw-ai-CEk9Jaqd.js} +13 -13
- package/dist/{pw-ai-CV5A9Kt_.js → pw-ai-KPNOiYzf.js} +14 -14
- package/dist/{qmd-manager-Bw5dnMTy.js → qmd-manager-BFUaPUn-.js} +12 -12
- package/dist/{qmd-manager-BZSlXT1A.js → qmd-manager-BmiJlIMN.js} +23 -23
- package/dist/{qmd-scope-BOfwIKTy.js → qmd-scope-CUCeRWxr.js} +1 -1
- package/dist/{qmd-scope-0dG63o_w.js → qmd-scope-DLLTbQwp.js} +1 -1
- package/dist/{query-expansion-gzgHhq68.js → query-expansion-CbOJZTFH.js} +13 -13
- package/dist/{query-expansion-BDAO12Ha.js → query-expansion-DLN1Vjgr.js} +11 -11
- package/dist/{recorder-ciGDu2oO.js → recorder-CndF3Klo.js} +2 -2
- package/dist/{recorder-Bp_onP2d.js → recorder-jnBdoV4s.js} +2 -2
- package/dist/{redact-Cp-v7ZNA.js → redact-B6sHOW29.js} +1 -1
- package/dist/{redact-D--orJnz.js → redact-C8xjZT-F.js} +1 -1
- package/dist/{register.maintenance-CFd160fT.js → register.maintenance-CNiAi_Bg.js} +5 -5
- package/dist/{register.maintenance-Dc0j0tvi.js → register.maintenance-Dq3k6jFc.js} +4 -4
- package/dist/{register.onboard-u0pMgMv4.js → register.onboard-DGBJtyFX.js} +2 -2
- package/dist/{register.onboard-C-lkIY7d.js → register.onboard-DqGIfQsO.js} +2 -2
- package/dist/{register.setup-BAiTfEey.js → register.setup-BdAQ_7gM.js} +2 -2
- package/dist/{register.setup-D6hviI6L.js → register.setup-Ckb9Hpks.js} +2 -2
- package/dist/{register.subclis-3YVvoBSB.js → register.subclis-Cn5DS2Th.js} +3 -3
- package/dist/{plugin-sdk/replies-CyyZdjYH.js → replies-CoEfccKv.js} +5 -5
- package/dist/{replies-EZyamg1p.js → replies-lKn2Mrkb.js} +5 -5
- package/dist/{reply-directives-B_wfvntf.js → reply-directives-BclP76MA.js} +2 -2
- package/dist/{reply-directives-DMPiBIx3.js → reply-directives-Djre3xI1.js} +2 -2
- package/dist/{reply-prefix-DLf0nmds.js → reply-prefix-BTUna5vE.js} +1 -1
- package/dist/{plugin-sdk/reply-prefix-DL3DiQEo.js → reply-prefix-DiyN1oc7.js} +1 -1
- package/dist/{resolve-route-GBqD8iPk.js → resolve-route-BmA3wi9D.js} +4 -4
- package/dist/{resolve-route-BP1OpZqn.js → resolve-route-ClI5pltd.js} +3 -3
- package/dist/{run-main-BBLzm5df.js → run-main-BYnz7Ou5.js} +3 -3
- package/dist/{runs-EvR8ugp4.js → runs-DffCseDM.js} +9 -9
- package/dist/{runs-Bf_VVVBE.js → runs-efmPtrdw.js} +8 -8
- package/dist/{send-C0kXNcyD.js → send-B3c56zXa.js} +8 -8
- package/dist/{send-B5XVAKWg.js → send-BZrEBJKt.js} +7 -7
- package/dist/{send-CNMPyQyQ.js → send-CLnmNoGF.js} +7 -7
- package/dist/{send-BVfxa93K.js → send-ChgWfhHL.js} +8 -8
- package/dist/{send-12uxFQQR.js → send-Co-6tb50.js} +8 -8
- package/dist/{send-oHqfck_E.js → send-DkHxW8Pg.js} +6 -6
- package/dist/{send-BCEsHNBh.js → send-NLqVlKnJ.js} +6 -6
- package/dist/{send-BOm8dqOB.js → send-TVImOmCV.js} +13 -13
- package/dist/{session-meta-BCY_pfg7.js → session-meta-CE9Oi0tA.js} +1 -1
- package/dist/{session-meta-C_fW_AWG.js → session-meta-DDeeNkQv.js} +1 -1
- package/dist/{sessions-IqyeyMXp.js → sessions-BgTvNzNv.js} +4 -4
- package/dist/{sessions-DODCZ4JK.js → sessions-DkSPJ2k9.js} +5 -5
- package/dist/{skill-commands-DYJDIogS.js → skill-commands-BOG-33Ja.js} +5 -5
- package/dist/{skill-commands-5VtV6o_q.js → skill-commands-K9_D6a_V.js} +7 -7
- package/dist/{skills-jb4bSwT6.js → skills-Ci9t7Gax.js} +4 -4
- package/dist/{skills-B3DYwqF5.js → skills-CrNvxe8D.js} +21 -21
- package/dist/{store-CsI6l-8d.js → store-B6wZFu_5.js} +7 -7
- package/dist/{store-DnvoAjAE.js → store-DJPbhmBq.js} +7 -7
- package/dist/{subsystem-BTMrlJ-R.js → subsystem-B9soUuXQ.js} +7 -7
- package/dist/{subsystem-DoQFckDJ.js → subsystem-cFv2jJm-.js} +71 -71
- package/dist/{tables-CuZTAY1e.js → tables-BaYGY_Hk.js} +1 -1
- package/dist/{tables-BTIafSNy.js → tables-CYp9eWuv.js} +1 -1
- package/dist/{tokens-C8E7C2l5.js → tokens-DwuYAzrE.js} +1 -1
- package/dist/{tokens-qfLiLlNv.js → tokens-KbWGDYPC.js} +1 -1
- package/dist/{tool-loop-detection-CiexABx1.js → tool-loop-detection-B2G2F3vq.js} +1 -1
- package/dist/{tool-loop-detection-4AIUOil2.js → tool-loop-detection-BwJFCGqI.js} +2 -2
- package/dist/{update-cli-D4CRTu-Y.js → update-cli-BFg_CRum.js} +5 -5
- package/dist/{update-cli-q45uqAKK.js → update-cli-BfwXa0Uk.js} +4 -4
- package/dist/{user-run-recording-D-7cPbdf.js → user-run-recording-B_-S5l8q.js} +2 -2
- package/dist/{user-run-recording-4Dhev2ED.js → user-run-recording-DIqKTo0U.js} +2 -2
- package/dist/{workspace-DOy2M7yN.js → workspace-D5PKyvm-.js} +26 -26
- package/dist/{ws-D51UDdBH.js → ws-CSU92Z2r.js} +1 -1
- package/dist/{ws-D916JacH.js → ws-CmKUpGwq.js} +1 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/anthropic/package.json +1 -1
- package/extensions/bifrost/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/deepgram/package.json +1 -1
- package/extensions/deepinfra/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/dream-cycle/package.json +1 -1
- package/extensions/elevenlabs/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/gemini-search/package.json +1 -1
- package/extensions/google/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/package.json +1 -1
- package/extensions/grok-search/package.json +1 -1
- package/extensions/groq/package.json +1 -1
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/kimi-search/package.json +1 -1
- package/extensions/kokoro/package.json +1 -1
- package/extensions/learning-core/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +1 -1
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/package.json +1 -1
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/mistral/package.json +1 -1
- package/extensions/moonshot/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +1 -1
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +1 -1
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/openai/package.json +1 -1
- package/extensions/openai-realtime/package.json +1 -1
- package/extensions/openrouter/package.json +1 -1
- package/extensions/perplexity-search/package.json +1 -1
- package/extensions/searxng-search/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +1 -1
- package/extensions/twitch/package.json +1 -1
- package/extensions/ui-surfaces/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +1 -1
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zai/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +1 -1
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +1 -1
- package/extensions/zalouser/package.json +1 -1
- package/package.json +1 -1
- package/dist/github-copilot-token-DrVydgnY.js +0 -106
- package/dist/paths-BIDPYPVC.js +0 -233
- package/dist/plugin-sdk/agent-turn-execute-Co_96UFp.js +0 -61
- package/dist/plugin-sdk/deliver-5MyFMK8o.js +0 -34
- package/dist/plugin-sdk/manager-B9WMktLu.js +0 -14
- package/dist/plugin-sdk/provider-dispatcher-uLJ5yzx1.js +0 -61
- package/dist/plugin-sdk/send-vp7qbuoy.js +0 -23
|
@@ -1,80 +1,80 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
|
|
2
|
-
import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as resolveSessionAgentIds, r as resolveAgentConfig, s as resolveAgentSkillsFilter, t as hasConfiguredModelFallbacks, u as resolveEffectiveModelFallbacks } from "./agent-scope-
|
|
3
|
-
import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, o as resolveGatewayPort, r as resolveConfigPath, s as resolveOAuthDir, u as expandHomePrefix } from "./paths-
|
|
4
|
-
import { C as appendFileLog, F as openBoundaryFileSync, K as isDangerousHostEnvVarName, O as INCLUDE_KEY, P as openBoundaryFile, Q as clampInt, T as normalizeLogLevel, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, ct as safeParseJson, dt as sleep$3, f as logVerbose, ft as sliceUtf16Safe, g as warn, h as shouldLogVerbose, it as normalizeE164, j as isBlockedObjectKey, l as unregisterActiveProgressLine, lt as shortenHomeInString, m as setVerbose, mt as resolvePreferredOpenClawTmpDir, nt as formatTerminalLink, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$1, s as clearActiveProgressLine, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, u as danger, ut as shortenHomePath, v as isRich, y as theme } from "./subsystem-
|
|
2
|
+
import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as resolveSessionAgentIds, r as resolveAgentConfig, s as resolveAgentSkillsFilter, t as hasConfiguredModelFallbacks, u as resolveEffectiveModelFallbacks } from "./agent-scope-CXfIHPTl.js";
|
|
3
|
+
import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, o as resolveGatewayPort, r as resolveConfigPath, s as resolveOAuthDir, u as expandHomePrefix } from "./paths-B_gs59ga.js";
|
|
4
|
+
import { C as appendFileLog, F as openBoundaryFileSync, K as isDangerousHostEnvVarName, O as INCLUDE_KEY, P as openBoundaryFile, Q as clampInt, T as normalizeLogLevel, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, ct as safeParseJson, dt as sleep$3, f as logVerbose, ft as sliceUtf16Safe, g as warn, h as shouldLogVerbose, it as normalizeE164, j as isBlockedObjectKey, l as unregisterActiveProgressLine, lt as shortenHomeInString, m as setVerbose, mt as resolvePreferredOpenClawTmpDir, nt as formatTerminalLink, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$1, s as clearActiveProgressLine, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, u as danger, ut as shortenHomePath, v as isRich, y as theme } from "./subsystem-cFv2jJm-.js";
|
|
5
5
|
import { n as resolveProcessScopedMap, t as isPlainObject } from "./plain-object-Doc_YkH1.js";
|
|
6
|
-
import { B as resolveThreadSessionKeys, C as DEFAULT_AGENT_ID, D as buildAgentMainSessionKey, F as normalizeAgentId, G as normalizeAccountId$1, H as sessionKeyAgentMatches, I as normalizeMainKey, K as normalizeOptionalAccountId, L as resolveAgentIdFromSessionKey, N as isKnownAgentMainSessionKey, P as isValidAgentId, Q as isCronSessionKey, R as resolveCanonicalIdentity, S as logWarn, T as DEVICE_SENDER_PREFIX, U as toAgentStoreSessionKey, V as sanitizeAgentId, W as DEFAULT_ACCOUNT_ID, X as getSubagentDepth, Y as WAKE_GATE_SESSION_KEY_SEGMENT, Z as isAcpSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, b as logError, et as isSubagentSessionKey, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, k as classifySessionKeyShape, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, nt as resolveThreadParentSessionKey, r as DEFAULT_BOOTSTRAP_FILENAME, rt as stripAgentSessionKeyPrefix, tt as parseAgentSessionKey, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug, z as resolveConfiguredCanonicalIdentity } from "./workspace-
|
|
7
|
-
import { $ as normalizeScpRemoteHost, $i as parseDotPath, $n as getChannelPlugin, $t as clearPluginCommands, A as requireApiKey, Ai as DEFAULT_SAFE_BINS, An as DEFAULT_RESET_TRIGGERS, Ar as deliveryContextKey, At as resolveMemorySlotDecision, B as resolveProfilesUnavailableReason, Bi as SAFE_BIN_PROFILES, Bn as SESSION_RUN_STORE_FILE_NAME, Br as normalizeMessageChannel, Bt as normalizeChatChannelId, C as createOllamaStreamFn, Ca as resolveSecretInputRef, Ci as listWritableExplicitTrustedSafeBinDirs, Cn as readSessionUpdatedAt, Cr as resolveDiscordAccount, Ct as validateJsonSchemaValue, D as buildUsageWithNoCost, Da as DEFAULT_PROVIDER, Di as buildEnforcedShellCommand, Dn as updateSessionStore, Dr as resolveChannelGroupToolsPolicy, Dt as isBundledChannelEnabledByChannelConfig, E as buildStreamErrorAssistantMessage, Ea as DEFAULT_MODEL, Ei as analyzeShellCommand, En as updateLastRoute, Er as resolveChannelGroupRequireMention, Et as applyTestPluginDefaults, F as resolveAuthProfileOrder, Fi as isDispatchWrapperExecutable, Fn as parseSessionIndexRecordKey, Fr as isDeliverableMessageChannel, Ft as CHAT_CHANNEL_ORDER, G as readConfigFileSnapshotForWrite, Gi as mapStreamingModeToSlackLegacyDraftStreamMode, Gr as GATEWAY_CLIENT_NAMES, Hi as resolveSafeBinProfiles, Hn as resolveSessionFilePath, Hr as resolveMessageChannel, Ht as getActiveGatewayPluginRegistry, I as getSoonestCooldownExpiry, Ii as isShellWrapperExecutable, Ir as isGatewayMessageChannel, It as getChatChannelMeta, Ji as resolveSlackStreamingMode, Jn as resolveGroupSessionKey, Jr as resolveSessionLockMaxHoldFromTimeout, Jt as addRegisteredPluginApi, K as writeConfigFile, Ki as resolveDiscordPreviewStreamMode, Kn as resolveStorePath, Kr as normalizeAccountId$2, Kt as requireActivePluginRegistry, L as isProfileInCooldown, Li as unwrapKnownDispatchWrapperInvocation, Lr as isInternalMessageChannel, Lt as listChatChannels, M as resolveEnvApiKey, Mi as resolveAllowlistCandidatePath, Mn as resolveFreshSessionTotalTokens, Mr as normalizeDeliveryContext, Mt as isPathInside, N as resolveModelAuthMode, Ni as resolveCommandResolutionFromArgv, Nn as setSessionRuntimeModel, Nr as normalizeSessionDeliveryFields, Nt as safeStatSync, O as getApiKeyForModel, Oi as isWindowsPlatform, On as updateSessionStoreEntry, Or as resolveAccountEntry, Ot as normalizePluginsConfig, Pi as extractShellWrapperInlineCommand, Pn as parseDurationMs, Pr as INTERNAL_MESSAGE_CHANNEL, Q as resolveIMessageRemoteAttachmentRoots, Qi as isRecord$2, Qn as normalizeSignalMessagingTarget, Qt as buildPluginHealthReport, R as markAuthProfileFailure, Ri as unwrapKnownShellMultiplexerInvocation, Rr as isMarkdownCapableMessageChannel, Rt as normalizeAnyChannelId, S as OLLAMA_NATIVE_BASE_URL, Sa as normalizeResolvedSecretInputString, Si as isTrustedSafeBinPath, Sn as prepareConfiguredSessionStorageRuntimeActivation, Sr as listEnabledDiscordAccounts, T as buildAssistantMessageWithZeroUsage, Ta as DEFAULT_CONTEXT_TOKENS, Ti as validateSafeBinArgv, Tn as refreshConfiguredSessionBindingEntry, Tr as resolveChannelGroupPolicy, Tt as BUNDLED_ENABLED_BY_DEFAULT, U as loadConfig, Ui as applyMergePatch, Un as resolveSessionFilePathOptions, Ur as GATEWAY_CLIENT_IDS, Ut as getActivePluginRegistry, V as resolveApiKeyForProfile, Vi as normalizeSafeBinProfileFixtures, Vr as resolveGatewayMessageChannel, Vt as resolveChannelConfigId, W as readConfigFileSnapshot, Wi as isSafeExecutableValue, Wn as resolveSessionTranscriptPath, Wr as GATEWAY_CLIENT_MODES, Wt as getActivePluginRegistryKey, Xi as describeUnknownError$1, Xn as getChannelDock, Xr as readTaskWorkStates, Xt as createPluginRegistry, Y as isInboundPathAllowed, Yi as resolveSecretRefValues, Yn as resolveParentSessionGroupId, Yr as CtxProjectionCorruptionError, Yt as clearRegisteredPluginApis, Z as resolveIMessageAttachmentRoots, Zi as isNonEmptyString, Zn as listChannelDocks, Zt as normalizePluginHttpPath, _a as resolveAuthProfileDisplayLabel, _i as getConfigValueAtPath, _n as commitPreparedConfiguredSessionStorageRuntimeActivation, _r as resolveWhatsAppAccount, _t as isAvatarDataUrl, a as isCliProvider, aa as resolveShellEnvFallbackTimeoutMs, ai as applyTargetToParams, an as getRegisteredSpeechProviders, ar as normalizeHyphenSlug, ba as coerceSecretRef, bi as unsetConfigValueAtPath, bn as loadSessionStore, br as resolveIMessageAccount, bt as isSupportedLocalAvatarExtension, c as normalizeProviderId, ca as dedupeProfileIds, cn as replaceSpeechProviders, cr as resolveSlackAccount, d as resolveDefaultModelForAgent, da as ensureAuthProfileStore, di as replaceBufferedPluginTaskPasses, dn as createConversationReadQuery, dr as resolveSlackBotToken, ea as secretRefKey, en as executePluginCommand, er as listChannelPlugins, et as parseNonNegativeByteSize, f as resolveModelRefFromString, fa as resolveAuthStorePathForDisplay, fi as RecoveryAdmissionError, fn as getConversationReadQuery, fr as listEnabledSignalAccounts, ga as readProcessElapsedSeconds, gi as unsetConfigOverride, gn as closeReplacedConfiguredSessionStorageRuntime, gr as hasAnyWhatsAppAuth, gt as AVATAR_MAX_BYTES, h as resolveThinkingDefault, ha as isPidAlive, hi as setConfigOverride, hn as closeConfiguredSessionStorageRuntime, hr as normalizeWhatsAppTarget, i as findNormalizedProviderValue, ia as getShellPathFromLoginShell, ii as stringEnum, in as BUILTIN_TTS_PROVIDER_IDS, ir as normalizeAtHashSlug, ji as matchAllowlist, jn as mergeSessionEntry, jr as mergeDeliveryContext, jt as discoverOpenClawPlugins, k as getCustomProviderApiKey, ki as splitCommandChain, kr as deliveryContextFromSession, kt as resolveEffectiveEnableState, l as parseModelRef, la as listProfilesForProvider, li as discardBufferedPluginTaskPasses, ln as normalizeProviderId$1, lr as resolveSlackReplyToMode, m as resolveSubagentSpawnModelSelection, ma as withFileLock$1, mi as resetConfigOverrides, mn as requireSessionStorageRuntime, mr as isWhatsAppGroupJid, n as buildConfiguredAllowlistKeys, na as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, ni as channelTargetsSchema, nn as matchPluginCommand, nr as formatAllowlistMatchMeta, nt as resolveExecPolicyPreset, o as modelKey, oa as isTruthyEnvValue, oi as actionHasTarget, on as getSpeechProvider, or as normalizeStringEntries, p as resolveReasoningDefault, pa as resolveOpenClawAgentDir, pi as getConfigOverrides, pr as resolveSignalAccount, q as validateConfigObjectWithPlugins, qi as resolveSlackNativeStreaming, qn as deriveSessionMetaPatch, qr as acquireSessionWriteLock, qt as setActivePluginRegistry, r as buildModelAliasIndex, ra as VERSION, ri as optionalStringEnum, rn as registerPluginCommand, rr as resolveAllowlistMatchByCandidates, s as normalizeModelRef$2, sa as resolveOwnerDisplaySetting, si as actionRequiresTarget, sn as isBuiltinTtsProvider, sr as normalizeStringEntriesLower, t as buildAllowedModelSet, ta as runTasksWithConcurrency, ti as channelTargetSchema, tn as listPluginCommands, tr as normalizeChannelId$1, u as resolveConfiguredModelRef, ua as markAuthProfileGood, ui as listBufferedPluginTaskPasses, un as StorageReadAccessError, ur as resolveSlackAppToken, vi as parseConfigPath, vn as getConfiguredSessionStorageRuntime, vr as formatCliCommand, vt as isAvatarHttpUrl, w as buildAssistantMessage, wa as splitTrailingAuthProfile, wi as normalizeTrustedSafeBinDirs, wn as recordSessionMetaFromInbound, wr as normalizeDiscordToken, wt as loadPluginManifestRegistry, x as retryAsync, xa as hasConfiguredSecretInput, xi as getTrustedSafeBinDirs, xn as loadSessionStoreFromDisk, xr as createDiscordActionGate, xt as buildChannelAccountBindings, ya as normalizeSecretInput, yi as setConfigValueAtPath, yr as resolveCliName, yt as isPathWithinRoot, z as markAuthProfileUsed, zi as splitShellArgs, zn as SAFE_SESSION_ID_RE, zr as listDeliverableMessageChannels, zt as normalizeChannelId$2 } from "./model-selection-
|
|
8
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-
|
|
9
|
-
import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-
|
|
6
|
+
import { B as resolveThreadSessionKeys, C as DEFAULT_AGENT_ID, D as buildAgentMainSessionKey, F as normalizeAgentId, G as normalizeAccountId$1, H as sessionKeyAgentMatches, I as normalizeMainKey, K as normalizeOptionalAccountId, L as resolveAgentIdFromSessionKey, N as isKnownAgentMainSessionKey, P as isValidAgentId, Q as isCronSessionKey, R as resolveCanonicalIdentity, S as logWarn, T as DEVICE_SENDER_PREFIX, U as toAgentStoreSessionKey, V as sanitizeAgentId, W as DEFAULT_ACCOUNT_ID, X as getSubagentDepth, Y as WAKE_GATE_SESSION_KEY_SEGMENT, Z as isAcpSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, b as logError, et as isSubagentSessionKey, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, k as classifySessionKeyShape, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, nt as resolveThreadParentSessionKey, r as DEFAULT_BOOTSTRAP_FILENAME, rt as stripAgentSessionKeyPrefix, tt as parseAgentSessionKey, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug, z as resolveConfiguredCanonicalIdentity } from "./workspace-D5PKyvm-.js";
|
|
7
|
+
import { $ as normalizeScpRemoteHost, $i as parseDotPath, $n as getChannelPlugin, $t as clearPluginCommands, A as requireApiKey, Ai as DEFAULT_SAFE_BINS, An as DEFAULT_RESET_TRIGGERS, Ar as deliveryContextKey, At as resolveMemorySlotDecision, B as resolveProfilesUnavailableReason, Bi as SAFE_BIN_PROFILES, Bn as SESSION_RUN_STORE_FILE_NAME, Br as normalizeMessageChannel, Bt as normalizeChatChannelId, C as createOllamaStreamFn, Ca as resolveSecretInputRef, Ci as listWritableExplicitTrustedSafeBinDirs, Cn as readSessionUpdatedAt, Cr as resolveDiscordAccount, Ct as validateJsonSchemaValue, D as buildUsageWithNoCost, Da as DEFAULT_PROVIDER, Di as buildEnforcedShellCommand, Dn as updateSessionStore, Dr as resolveChannelGroupToolsPolicy, Dt as isBundledChannelEnabledByChannelConfig, E as buildStreamErrorAssistantMessage, Ea as DEFAULT_MODEL, Ei as analyzeShellCommand, En as updateLastRoute, Er as resolveChannelGroupRequireMention, Et as applyTestPluginDefaults, F as resolveAuthProfileOrder, Fi as isDispatchWrapperExecutable, Fn as parseSessionIndexRecordKey, Fr as isDeliverableMessageChannel, Ft as CHAT_CHANNEL_ORDER, G as readConfigFileSnapshotForWrite, Gi as mapStreamingModeToSlackLegacyDraftStreamMode, Gr as GATEWAY_CLIENT_NAMES, Hi as resolveSafeBinProfiles, Hn as resolveSessionFilePath, Hr as resolveMessageChannel, Ht as getActiveGatewayPluginRegistry, I as getSoonestCooldownExpiry, Ii as isShellWrapperExecutable, Ir as isGatewayMessageChannel, It as getChatChannelMeta, Ji as resolveSlackStreamingMode, Jn as resolveGroupSessionKey, Jr as resolveSessionLockMaxHoldFromTimeout, Jt as addRegisteredPluginApi, K as writeConfigFile, Ki as resolveDiscordPreviewStreamMode, Kn as resolveStorePath, Kr as normalizeAccountId$2, Kt as requireActivePluginRegistry, L as isProfileInCooldown, Li as unwrapKnownDispatchWrapperInvocation, Lr as isInternalMessageChannel, Lt as listChatChannels, M as resolveEnvApiKey, Mi as resolveAllowlistCandidatePath, Mn as resolveFreshSessionTotalTokens, Mr as normalizeDeliveryContext, Mt as isPathInside, N as resolveModelAuthMode, Ni as resolveCommandResolutionFromArgv, Nn as setSessionRuntimeModel, Nr as normalizeSessionDeliveryFields, Nt as safeStatSync, O as getApiKeyForModel, Oi as isWindowsPlatform, On as updateSessionStoreEntry, Or as resolveAccountEntry, Ot as normalizePluginsConfig, Pi as extractShellWrapperInlineCommand, Pn as parseDurationMs, Pr as INTERNAL_MESSAGE_CHANNEL, Q as resolveIMessageRemoteAttachmentRoots, Qi as isRecord$2, Qn as normalizeSignalMessagingTarget, Qt as buildPluginHealthReport, R as markAuthProfileFailure, Ri as unwrapKnownShellMultiplexerInvocation, Rr as isMarkdownCapableMessageChannel, Rt as normalizeAnyChannelId, S as OLLAMA_NATIVE_BASE_URL, Sa as normalizeResolvedSecretInputString, Si as isTrustedSafeBinPath, Sn as prepareConfiguredSessionStorageRuntimeActivation, Sr as listEnabledDiscordAccounts, T as buildAssistantMessageWithZeroUsage, Ta as DEFAULT_CONTEXT_TOKENS, Ti as validateSafeBinArgv, Tn as refreshConfiguredSessionBindingEntry, Tr as resolveChannelGroupPolicy, Tt as BUNDLED_ENABLED_BY_DEFAULT, U as loadConfig, Ui as applyMergePatch, Un as resolveSessionFilePathOptions, Ur as GATEWAY_CLIENT_IDS, Ut as getActivePluginRegistry, V as resolveApiKeyForProfile, Vi as normalizeSafeBinProfileFixtures, Vr as resolveGatewayMessageChannel, Vt as resolveChannelConfigId, W as readConfigFileSnapshot, Wi as isSafeExecutableValue, Wn as resolveSessionTranscriptPath, Wr as GATEWAY_CLIENT_MODES, Wt as getActivePluginRegistryKey, Xi as describeUnknownError$1, Xn as getChannelDock, Xr as readTaskWorkStates, Xt as createPluginRegistry, Y as isInboundPathAllowed, Yi as resolveSecretRefValues, Yn as resolveParentSessionGroupId, Yr as CtxProjectionCorruptionError, Yt as clearRegisteredPluginApis, Z as resolveIMessageAttachmentRoots, Zi as isNonEmptyString, Zn as listChannelDocks, Zt as normalizePluginHttpPath, _a as resolveAuthProfileDisplayLabel, _i as getConfigValueAtPath, _n as commitPreparedConfiguredSessionStorageRuntimeActivation, _r as resolveWhatsAppAccount, _t as isAvatarDataUrl, a as isCliProvider, aa as resolveShellEnvFallbackTimeoutMs, ai as applyTargetToParams, an as getRegisteredSpeechProviders, ar as normalizeHyphenSlug, ba as coerceSecretRef, bi as unsetConfigValueAtPath, bn as loadSessionStore, br as resolveIMessageAccount, bt as isSupportedLocalAvatarExtension, c as normalizeProviderId, ca as dedupeProfileIds, cn as replaceSpeechProviders, cr as resolveSlackAccount, d as resolveDefaultModelForAgent, da as ensureAuthProfileStore, di as replaceBufferedPluginTaskPasses, dn as createConversationReadQuery, dr as resolveSlackBotToken, ea as secretRefKey, en as executePluginCommand, er as listChannelPlugins, et as parseNonNegativeByteSize, f as resolveModelRefFromString, fa as resolveAuthStorePathForDisplay, fi as RecoveryAdmissionError, fn as getConversationReadQuery, fr as listEnabledSignalAccounts, ga as readProcessElapsedSeconds, gi as unsetConfigOverride, gn as closeReplacedConfiguredSessionStorageRuntime, gr as hasAnyWhatsAppAuth, gt as AVATAR_MAX_BYTES, h as resolveThinkingDefault, ha as isPidAlive, hi as setConfigOverride, hn as closeConfiguredSessionStorageRuntime, hr as normalizeWhatsAppTarget, i as findNormalizedProviderValue, ia as getShellPathFromLoginShell, ii as stringEnum, in as BUILTIN_TTS_PROVIDER_IDS, ir as normalizeAtHashSlug, ji as matchAllowlist, jn as mergeSessionEntry, jr as mergeDeliveryContext, jt as discoverOpenClawPlugins, k as getCustomProviderApiKey, ki as splitCommandChain, kr as deliveryContextFromSession, kt as resolveEffectiveEnableState, l as parseModelRef, la as listProfilesForProvider, li as discardBufferedPluginTaskPasses, ln as normalizeProviderId$1, lr as resolveSlackReplyToMode, m as resolveSubagentSpawnModelSelection, ma as withFileLock$1, mi as resetConfigOverrides, mn as requireSessionStorageRuntime, mr as isWhatsAppGroupJid, n as buildConfiguredAllowlistKeys, na as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, ni as channelTargetsSchema, nn as matchPluginCommand, nr as formatAllowlistMatchMeta, nt as resolveExecPolicyPreset, o as modelKey, oa as isTruthyEnvValue, oi as actionHasTarget, on as getSpeechProvider, or as normalizeStringEntries, p as resolveReasoningDefault, pa as resolveOpenClawAgentDir, pi as getConfigOverrides, pr as resolveSignalAccount, q as validateConfigObjectWithPlugins, qi as resolveSlackNativeStreaming, qn as deriveSessionMetaPatch, qr as acquireSessionWriteLock, qt as setActivePluginRegistry, r as buildModelAliasIndex, ra as VERSION, ri as optionalStringEnum, rn as registerPluginCommand, rr as resolveAllowlistMatchByCandidates, s as normalizeModelRef$2, sa as resolveOwnerDisplaySetting, si as actionRequiresTarget, sn as isBuiltinTtsProvider, sr as normalizeStringEntriesLower, t as buildAllowedModelSet, ta as runTasksWithConcurrency, ti as channelTargetSchema, tn as listPluginCommands, tr as normalizeChannelId$1, u as resolveConfiguredModelRef, ua as markAuthProfileGood, ui as listBufferedPluginTaskPasses, un as StorageReadAccessError, ur as resolveSlackAppToken, vi as parseConfigPath, vn as getConfiguredSessionStorageRuntime, vr as formatCliCommand, vt as isAvatarHttpUrl, w as buildAssistantMessage, wa as splitTrailingAuthProfile, wi as normalizeTrustedSafeBinDirs, wn as recordSessionMetaFromInbound, wr as normalizeDiscordToken, wt as loadPluginManifestRegistry, x as retryAsync, xa as hasConfiguredSecretInput, xi as getTrustedSafeBinDirs, xn as loadSessionStoreFromDisk, xr as createDiscordActionGate, xt as buildChannelAccountBindings, ya as normalizeSecretInput, yi as setConfigValueAtPath, yr as resolveCliName, yt as isPathWithinRoot, z as markAuthProfileUsed, zi as splitShellArgs, zn as SAFE_SESSION_ID_RE, zr as listDeliverableMessageChannels, zt as normalizeChannelId$2 } from "./model-selection-JA-6f5ss.js";
|
|
8
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-BJeEWDJb.js";
|
|
9
|
+
import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-BKv-k5-D.js";
|
|
10
10
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-Ckfze_uK.js";
|
|
11
|
-
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-
|
|
12
|
-
import { $ as setChannelPermissionDiscord, A as readMessagesDiscord, At as buildChannelKeyCandidates, B as kickMemberDiscord, C as createThreadDiscord, Ct as shouldEmitDiscordReactionNotification, D as listPinsDiscord, Dt as resolveTimestampMs, E as fetchMessageDiscord, Et as resolveDiscordSystemLocation, F as createScheduledEventDiscord, G as listGuildEmojisDiscord, H as listScheduledEventsDiscord, I as fetchChannelInfoDiscord, J as createChannelDiscord, K as uploadEmojiDiscord, L as fetchMemberInfoDiscord, M as unpinMessageDiscord, Mt as resolveChannelEntryMatchWithFallback, N as addRoleDiscord, O as listThreadsDiscord, Ot as fetchDiscord, P as banMemberDiscord, Q as removeChannelPermissionDiscord, R as fetchRoleInfoDiscord, S as recordChannelActivity, St as resolveGroupDmAllow, T as editMessageDiscord, Tt as formatDiscordUserTag, U as removeRoleDiscord, V as listGuildChannelsDiscord, W as timeoutMemberDiscord, X as editChannelDiscord, Y as deleteChannelDiscord, Z as moveChannelDiscord, _ as sendPollDiscord, _t as resolveDiscordGuildEntry, a as removeReactionDiscord, at as createDiscordClient, b as sendWebhookMessageDiscord, bt as resolveDiscordOwnerAllowFrom, c as formatDiscordComponentEventText, ct as parseDiscordTarget, d as parseDiscordModalCustomId, dt as listDiscordDirectoryPeersLive, et as stripUndefinedFields, f as parseDiscordModalCustomIdForCarbon, ft as isDiscordGroupAllowedByPolicy, g as sendMessageDiscord, gt as resolveDiscordChannelConfigWithFallback, h as resolveDiscordModalEntry, ht as resolveDiscordAllowListMatch, i as removeOwnReactionsDiscord, it as normalizePollInput, j as searchMessagesDiscord, jt as normalizeChannelSlug, k as pinMessageDiscord, kt as applyChannelMatchMeta, l as parseDiscordComponentCustomId, lt as resolveDiscordChannelId, m as resolveDiscordComponentEntry, mt as normalizeDiscordSlug, n as fetchReactionsDiscord, nt as hasAnyGuildPermissionDiscord, o as sendDiscordComponentMessage, ot as createDiscordRestClient, p as readDiscordComponentSpec, pt as normalizeDiscordAllowList, q as uploadStickerDiscord, r as reactMessageDiscord, rt as chunkDiscordTextWithMode, s as createDiscordFormModal, st as createDiscordRetryRunner, tt as fetchChannelPermissionsDiscord, u as parseDiscordComponentCustomIdForCarbon, ut as listDiscordDirectoryGroupsLive, v as sendStickerDiscord, vt as resolveDiscordMemberAccessState, w as deleteMessageDiscord, wt as formatDiscordReactionEmoji, x as getChannelActivity, xt as resolveDiscordShouldRequireMention, y as sendVoiceMessageDiscord, yt as resolveDiscordOwnerAccess, z as fetchVoiceStatusDiscord } from "./send-
|
|
13
|
-
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
14
|
-
import { $ as stripMessageCarriers, A as resolveChannelResetConfig, B as openDbSessionManager, Bt as resolveProviderPromptCacheKey, C as deriveSessionTotalTokens, Ct as openRawToolResultStash, Dt as stripToolResultDetails, E as normalizeUsage, Et as sanitizeToolUseResultPairing, F as resolveAgentMainSessionKey, Ft as initializeGlobalHookRunner, G as sha256, H as drainPendingPrimaryWrites, Ht as createCurrentUserPromptEnvelope, I as resolveExplicitAgentSessionKey, It as hasHookForPlugin, J as renderInboundUserContext, K as buildInboundMetaSystemPrompt, L as resolveMainSessionKey, Lt as promptBuildResultToContribution, M as resolveSessionResetType, Mt as normalizeInputProvenance, N as resolveThreadFlag, Nt as getGlobalHookRunner, O as resolveSessionKey, Ot as canonicalToolCallIdBase, P as canonicalizeMainSessionAlias, Pt as getGlobalPluginRegistry, Q as messageTime, R as isPrimarySessionTranscriptFileName, Rt as buildPluginRuntimeIdentity, S as derivePromptTokens, St as guardSessionManager, T as makeZeroUsageSnapshot, Tt as sanitizeToolCallInputs, U as extractLegacyTranscriptEntryFields, Ut as mergePromptContributions, V as runSerializedBySession, Vt as resolveProviderRuntimeIdentity, W as sanitizeJsonb, Wt as toJsonValue$1, X as getMessageIngress, Y as attachMessageIngress, Z as isRepresentableEpochMs, _ as inferLegacyName, _t as createMessageCharEstimateCache, a as resolveMirroredTranscriptText, at as eventOrder, b as resolveDefaultCronStaggerMs, bt as getToolResultText$1, c as createSessionStorageRuntimeFromConfig, ct as capToolResultContent, dt as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, et as formatMessageStamp, ft as TOOL_RESULT_TEXT_WEIGHT, g as CREATE_CTX_STORAGE_OWNER_SQL, gt as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, h as sanitizeAppendEntry, ht as CHARS_PER_TOKEN_ESTIMATE$2, i as appendAssistantMessageToSessionTranscript, it as DB_SESSION_HYDRATION_LIMIT, j as resolveSessionResetPolicy, jt as hasInterSessionUserProvenance, k as evaluateSessionFreshness, kt as sanitizeToolCallIdsForCloudCodeAssist, l as resolveSessionStorageConfig, lt as HARD_MAX_TOOL_RESULT_CHARS, m as deriveLegacyActorIdentity, mt as truncateToolResultToChars, n as parseSessionThreadInfo, nt as resolveTimezone, o as parseInlineDirectives$1, ot as pickLeaf, p as buildEqualityProjection, pt as truncateTextHeadTail, q as collectInboundUserContext, r as resolveAndPersistSessionFile, rt as resolveSenderLabel, s as attachPgPoolErrorListeners, st as HIDDEN_HEARTBEAT_CUSTOM_TYPE, t as extractDeliveryInfo, tt as formatZonedTimestamp, u as validateCtxStorage, ut as sessionLikelyHasOversizedToolResults, v as normalizeHttpWebhookUrl, vt as estimateContextChars$1, w as hasNonzeroUsage, wt as repairToolUseResultPairing, x as parseAbsoluteTimeMs, xt as isToolResultMessage, y as normalizeCronStaggerMs, yt as estimateMessageCharsCached, z as isSessionArchiveArtifactName, zt as buildPluginTurnIdentity } from "./sessions-
|
|
11
|
+
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-BZrEBJKt.js";
|
|
12
|
+
import { $ as setChannelPermissionDiscord, A as readMessagesDiscord, At as buildChannelKeyCandidates, B as kickMemberDiscord, C as createThreadDiscord, Ct as shouldEmitDiscordReactionNotification, D as listPinsDiscord, Dt as resolveTimestampMs, E as fetchMessageDiscord, Et as resolveDiscordSystemLocation, F as createScheduledEventDiscord, G as listGuildEmojisDiscord, H as listScheduledEventsDiscord, I as fetchChannelInfoDiscord, J as createChannelDiscord, K as uploadEmojiDiscord, L as fetchMemberInfoDiscord, M as unpinMessageDiscord, Mt as resolveChannelEntryMatchWithFallback, N as addRoleDiscord, O as listThreadsDiscord, Ot as fetchDiscord, P as banMemberDiscord, Q as removeChannelPermissionDiscord, R as fetchRoleInfoDiscord, S as recordChannelActivity, St as resolveGroupDmAllow, T as editMessageDiscord, Tt as formatDiscordUserTag, U as removeRoleDiscord, V as listGuildChannelsDiscord, W as timeoutMemberDiscord, X as editChannelDiscord, Y as deleteChannelDiscord, Z as moveChannelDiscord, _ as sendPollDiscord, _t as resolveDiscordGuildEntry, a as removeReactionDiscord, at as createDiscordClient, b as sendWebhookMessageDiscord, bt as resolveDiscordOwnerAllowFrom, c as formatDiscordComponentEventText, ct as parseDiscordTarget, d as parseDiscordModalCustomId, dt as listDiscordDirectoryPeersLive, et as stripUndefinedFields, f as parseDiscordModalCustomIdForCarbon, ft as isDiscordGroupAllowedByPolicy, g as sendMessageDiscord, gt as resolveDiscordChannelConfigWithFallback, h as resolveDiscordModalEntry, ht as resolveDiscordAllowListMatch, i as removeOwnReactionsDiscord, it as normalizePollInput, j as searchMessagesDiscord, jt as normalizeChannelSlug, k as pinMessageDiscord, kt as applyChannelMatchMeta, l as parseDiscordComponentCustomId, lt as resolveDiscordChannelId, m as resolveDiscordComponentEntry, mt as normalizeDiscordSlug, n as fetchReactionsDiscord, nt as hasAnyGuildPermissionDiscord, o as sendDiscordComponentMessage, ot as createDiscordRestClient, p as readDiscordComponentSpec, pt as normalizeDiscordAllowList, q as uploadStickerDiscord, r as reactMessageDiscord, rt as chunkDiscordTextWithMode, s as createDiscordFormModal, st as createDiscordRetryRunner, tt as fetchChannelPermissionsDiscord, u as parseDiscordComponentCustomIdForCarbon, ut as listDiscordDirectoryGroupsLive, v as sendStickerDiscord, vt as resolveDiscordMemberAccessState, w as deleteMessageDiscord, wt as formatDiscordReactionEmoji, x as getChannelActivity, xt as resolveDiscordShouldRequireMention, y as sendVoiceMessageDiscord, yt as resolveDiscordOwnerAccess, z as fetchVoiceStatusDiscord } from "./send-ChgWfhHL.js";
|
|
13
|
+
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-DwuYAzrE.js";
|
|
14
|
+
import { $ as stripMessageCarriers, A as resolveChannelResetConfig, B as openDbSessionManager, Bt as resolveProviderPromptCacheKey, C as deriveSessionTotalTokens, Ct as openRawToolResultStash, Dt as stripToolResultDetails, E as normalizeUsage, Et as sanitizeToolUseResultPairing, F as resolveAgentMainSessionKey, Ft as initializeGlobalHookRunner, G as sha256, H as drainPendingPrimaryWrites, Ht as createCurrentUserPromptEnvelope, I as resolveExplicitAgentSessionKey, It as hasHookForPlugin, J as renderInboundUserContext, K as buildInboundMetaSystemPrompt, L as resolveMainSessionKey, Lt as promptBuildResultToContribution, M as resolveSessionResetType, Mt as normalizeInputProvenance, N as resolveThreadFlag, Nt as getGlobalHookRunner, O as resolveSessionKey, Ot as canonicalToolCallIdBase, P as canonicalizeMainSessionAlias, Pt as getGlobalPluginRegistry, Q as messageTime, R as isPrimarySessionTranscriptFileName, Rt as buildPluginRuntimeIdentity, S as derivePromptTokens, St as guardSessionManager, T as makeZeroUsageSnapshot, Tt as sanitizeToolCallInputs, U as extractLegacyTranscriptEntryFields, Ut as mergePromptContributions, V as runSerializedBySession, Vt as resolveProviderRuntimeIdentity, W as sanitizeJsonb, Wt as toJsonValue$1, X as getMessageIngress, Y as attachMessageIngress, Z as isRepresentableEpochMs, _ as inferLegacyName, _t as createMessageCharEstimateCache, a as resolveMirroredTranscriptText, at as eventOrder, b as resolveDefaultCronStaggerMs, bt as getToolResultText$1, c as createSessionStorageRuntimeFromConfig, ct as capToolResultContent, dt as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, et as formatMessageStamp, ft as TOOL_RESULT_TEXT_WEIGHT, g as CREATE_CTX_STORAGE_OWNER_SQL, gt as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, h as sanitizeAppendEntry, ht as CHARS_PER_TOKEN_ESTIMATE$2, i as appendAssistantMessageToSessionTranscript, it as DB_SESSION_HYDRATION_LIMIT, j as resolveSessionResetPolicy, jt as hasInterSessionUserProvenance, k as evaluateSessionFreshness, kt as sanitizeToolCallIdsForCloudCodeAssist, l as resolveSessionStorageConfig, lt as HARD_MAX_TOOL_RESULT_CHARS, m as deriveLegacyActorIdentity, mt as truncateToolResultToChars, n as parseSessionThreadInfo, nt as resolveTimezone, o as parseInlineDirectives$1, ot as pickLeaf, p as buildEqualityProjection, pt as truncateTextHeadTail, q as collectInboundUserContext, r as resolveAndPersistSessionFile, rt as resolveSenderLabel, s as attachPgPoolErrorListeners, st as HIDDEN_HEARTBEAT_CUSTOM_TYPE, t as extractDeliveryInfo, tt as formatZonedTimestamp, u as validateCtxStorage, ut as sessionLikelyHasOversizedToolResults, v as normalizeHttpWebhookUrl, vt as estimateContextChars$1, w as hasNonzeroUsage, wt as repairToolUseResultPairing, x as parseAbsoluteTimeMs, xt as isToolResultMessage, y as normalizeCronStaggerMs, yt as estimateMessageCharsCached, z as isSessionArchiveArtifactName, zt as buildPluginTurnIdentity } from "./sessions-DkSPJ2k9.js";
|
|
15
15
|
import { n as isDiagnosticsEnabled, t as emitDiagnosticEvent } from "./diagnostic-events-BTSwhIfk.js";
|
|
16
16
|
import { n as onSessionTranscriptUpdate } from "./transcript-events-C2lcxc6-.js";
|
|
17
17
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-BDA1WAvZ.js";
|
|
18
|
-
import { _ as recordSystemPromptHashComparison, b as recordCommandPoll, d as logRunCompleted, f as logRunStarted, g as logToolExecutionStarted, h as logToolExecutionCompleted, l as logModelCallError, m as logToolExecutionBlocked, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, v as refreshRunProgress, x as resetCommandPollCount, y as boundDiagnosticContent } from "./diagnostic-
|
|
18
|
+
import { _ as recordSystemPromptHashComparison, b as recordCommandPoll, d as logRunCompleted, f as logRunStarted, g as logToolExecutionStarted, h as logToolExecutionCompleted, l as logModelCallError, m as logToolExecutionBlocked, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, v as refreshRunProgress, x as resetCommandPollCount, y as boundDiagnosticContent } from "./diagnostic-BqFtliY1.js";
|
|
19
19
|
import { o as redactChannelCorrelation, r as getDiagnosticSessionState } from "./diagnostic-session-state-DJQj3Ka7.js";
|
|
20
20
|
import { t as redactIdentifier } from "./redact-identifier-C_VCQ34e.js";
|
|
21
|
-
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-
|
|
21
|
+
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-B6sHOW29.js";
|
|
22
22
|
import { t as CommandLane } from "./lanes-DBBnME5O.js";
|
|
23
|
-
import { a as getCommandLaneSnapshots, c as isQueuedCommandCancellation, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isGatewayDraining, t as CommandLaneAbortedError } from "./command-queue-
|
|
24
|
-
import { _ as mediaKindFromMime, c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, h as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as normalizeMimeType$1, p as kindFromMime, s as resizeToJpeg, u as getFileExtension } from "./image-ops-
|
|
25
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-
|
|
26
|
-
import { $ as expandPolicyWithPluginGroups, A as isLikelyContextOverflowError, B as resolveSandboxContext, C as isAuthAssistantError, D as isContextOverflowError, E as isCompactionFailureError, F as parseImageSizeError, G as resolveProfile, H as createBrowserRouteContext, I as sanitizeUserFacingText, J as resolveBrowserControlAuth, K as getBridgeAuthForPort, L as isAuthPermanentErrorMessage, M as isRawApiErrorPayload, N as isTransientHttpError, O as isFailoverAssistantError, P as parseImageDimensionError, Q as collectExplicitAllowlist, R as isTimeoutErrorMessage, S as getApiErrorPayloadFingerprint, T as isCloudCodeAssistFormatError, U as registerBrowserRoutes, V as resolveSandboxRuntimeStatus, W as resolveBrowserConfig, X as applyOwnerOnlyToolPolicy, Y as resolveSandboxConfigForAgent, Z as buildPluginToolGroups, _ as BILLING_ERROR_USER_MESSAGE, at as listCoreToolIds, b as formatBillingErrorMessage, c as sanitizeSessionMessagesImages, ct as buildBootstrapContextFiles, d as resolveImageSanitizationLimits, dt as sanitizeGoogleTurnOrdering, et as mergeAlsoAllowPolicy, f as canonicalizeBase64, g as isGoogleModelApi, h as downgradeOpenAIReasoningBlocks, i as pickFallbackThinkingLevel, it as resolveToolProfilePolicy, j as isRateLimitAssistantError, k as isFailoverErrorMessage, l as sanitizeImageBlocks, lt as resolveBootstrapMaxChars, m as downgradeOpenAIFunctionCallReasoningPairs, n as validateAnthropicTurns, nt as expandToolGroups, o as isMessagingToolDuplicateNormalized, ot as compileGlobPatterns, p as estimateBase64DecodedBytes, q as ensureBrowserControlAuth, r as validateGeminiTurns, rt as normalizeToolName, s as normalizeTextForComparison, st as matchesAnyGlobPattern, t as extractTextFromChatContent, tt as stripPluginOnlyAllowlist, u as sanitizeToolResultImages, ut as resolveBootstrapTotalMaxChars, v as classifyFailoverReason, w as isBillingAssistantError, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as ensureSandboxWorkspaceForSession } from "./chat-content-
|
|
27
|
-
import { B as DEFAULT_AI_SNAPSHOT_MAX_CHARS, C as ensureChromeExtensionRelayServer, M as DEFAULT_UPLOAD_DIR, N as resolveExistingPathsWithinRoot, s as resolveLsofCommandSync } from "./chrome-
|
|
28
|
-
import { r as isLoopbackHost } from "./ws-
|
|
29
|
-
import { r as trimToUndefined, t as resolveGatewayCredentialsFromConfig } from "./credentials-
|
|
30
|
-
import { a as skillsSnapshotSourceDiffers, c as assertMediaNotDataUrl, f as resolveSandboxedMediaSource, i as resolveSkillsPromptForRun, l as assertSandboxPath, m as applySkillEnvOverridesFromSnapshot, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverrides, r as loadWorkspaceSkillEntries, u as resolveSandboxInputPath } from "./skills-
|
|
31
|
-
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-
|
|
32
|
-
import { i as hasErrnoCode, o as readErrorName, r as formatErrorMessage } from "./errors-
|
|
33
|
-
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-
|
|
34
|
-
import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-
|
|
35
|
-
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-
|
|
23
|
+
import { a as getCommandLaneSnapshots, c as isQueuedCommandCancellation, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isGatewayDraining, t as CommandLaneAbortedError } from "./command-queue-De2GI8TP.js";
|
|
24
|
+
import { _ as mediaKindFromMime, c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, h as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as normalizeMimeType$1, p as kindFromMime, s as resizeToJpeg, u as getFileExtension } from "./image-ops-BWgZn39_.js";
|
|
25
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-ym24jTFO.js";
|
|
26
|
+
import { $ as expandPolicyWithPluginGroups, A as isLikelyContextOverflowError, B as resolveSandboxContext, C as isAuthAssistantError, D as isContextOverflowError, E as isCompactionFailureError, F as parseImageSizeError, G as resolveProfile, H as createBrowserRouteContext, I as sanitizeUserFacingText, J as resolveBrowserControlAuth, K as getBridgeAuthForPort, L as isAuthPermanentErrorMessage, M as isRawApiErrorPayload, N as isTransientHttpError, O as isFailoverAssistantError, P as parseImageDimensionError, Q as collectExplicitAllowlist, R as isTimeoutErrorMessage, S as getApiErrorPayloadFingerprint, T as isCloudCodeAssistFormatError, U as registerBrowserRoutes, V as resolveSandboxRuntimeStatus, W as resolveBrowserConfig, X as applyOwnerOnlyToolPolicy, Y as resolveSandboxConfigForAgent, Z as buildPluginToolGroups, _ as BILLING_ERROR_USER_MESSAGE, at as listCoreToolIds, b as formatBillingErrorMessage, c as sanitizeSessionMessagesImages, ct as buildBootstrapContextFiles, d as resolveImageSanitizationLimits, dt as sanitizeGoogleTurnOrdering, et as mergeAlsoAllowPolicy, f as canonicalizeBase64, g as isGoogleModelApi, h as downgradeOpenAIReasoningBlocks, i as pickFallbackThinkingLevel, it as resolveToolProfilePolicy, j as isRateLimitAssistantError, k as isFailoverErrorMessage, l as sanitizeImageBlocks, lt as resolveBootstrapMaxChars, m as downgradeOpenAIFunctionCallReasoningPairs, n as validateAnthropicTurns, nt as expandToolGroups, o as isMessagingToolDuplicateNormalized, ot as compileGlobPatterns, p as estimateBase64DecodedBytes, q as ensureBrowserControlAuth, r as validateGeminiTurns, rt as normalizeToolName, s as normalizeTextForComparison, st as matchesAnyGlobPattern, t as extractTextFromChatContent, tt as stripPluginOnlyAllowlist, u as sanitizeToolResultImages, ut as resolveBootstrapTotalMaxChars, v as classifyFailoverReason, w as isBillingAssistantError, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as ensureSandboxWorkspaceForSession } from "./chat-content-DIjp-kW-.js";
|
|
27
|
+
import { B as DEFAULT_AI_SNAPSHOT_MAX_CHARS, C as ensureChromeExtensionRelayServer, M as DEFAULT_UPLOAD_DIR, N as resolveExistingPathsWithinRoot, s as resolveLsofCommandSync } from "./chrome-C9TkYQeh.js";
|
|
28
|
+
import { r as isLoopbackHost } from "./ws-CmKUpGwq.js";
|
|
29
|
+
import { r as trimToUndefined, t as resolveGatewayCredentialsFromConfig } from "./credentials-BAWD9O8L.js";
|
|
30
|
+
import { a as skillsSnapshotSourceDiffers, c as assertMediaNotDataUrl, f as resolveSandboxedMediaSource, i as resolveSkillsPromptForRun, l as assertSandboxPath, m as applySkillEnvOverridesFromSnapshot, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverrides, r as loadWorkspaceSkillEntries, u as resolveSandboxInputPath } from "./skills-CrNvxe8D.js";
|
|
31
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-CgO2FpVx.js";
|
|
32
|
+
import { i as hasErrnoCode, o as readErrorName, r as formatErrorMessage } from "./errors-BWpk4nzX.js";
|
|
33
|
+
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-BjrptUz1.js";
|
|
34
|
+
import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-DtzLr6mZ.js";
|
|
35
|
+
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-DJPbhmBq.js";
|
|
36
36
|
import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-Cj-XaaTu.js";
|
|
37
37
|
import { r as writeJsonAtomic } from "./json-files-DBtcstGX.js";
|
|
38
38
|
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-CcoiS9V4.js";
|
|
39
|
-
import { A as validateSecretsResolveResult, C as callGateway, D as GatewayClient, E as resolveLeastPrivilegeOperatorScopesForMethod, M as DOCS_SITE_URL, N as docsSiteUrl, O as gatewayErrorReason, S as buildGatewayConnectionDetails, T as randomIdempotencyKey, _ as resolveSessionReference, a as buildAgentToAgentReplyContext, b as clearActiveCoordinationDepth, c as resolvePingPongTurns, d as createSessionVisibilityGuard, f as resolveEffectiveSessionToolsVisibility, g as resolveMainSessionAlias, h as resolveInternalSessionKey, i as buildAgentToAgentMessageContext, j as SESSION_LABEL_MAX_LENGTH, k as gatewayErrorShapeOf, l as AuthorizationError, m as resolveDisplaySessionKey, n as requestAuthorizedNudge, o as isAnnounceSkip, p as resolveSandboxedSessionToolContext, r as buildAgentToAgentAnnounceContext, s as isReplySkip, u as createAgentToAgentPolicy, v as resolveVisibleSessionReference, w as callGatewayLeastPrivilege, x as setActiveCoordinationDepth, y as shouldResolveSessionIdInput } from "./nudge-
|
|
40
|
-
import { t as ensureOpenClawModelsJson } from "./models-config-
|
|
41
|
-
import { C as coerceImageModelConfig, D as loadModelCatalog, E as findModelInCatalog, O as modelSupportsVision, S as coerceImageAssistantText, T as resolveProviderVisionModelFromConfig, _ as stripCarriedTranscriptFromBody, a as resolveMediaAttachmentLocalRoots, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as runCapability, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as minimaxUnderstandImage, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as decodeDataUrl, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-
|
|
42
|
-
import { a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, l as stripDowngradedToolCallText, m as stripReasoningTagsFromText, n as extractAssistantThinking, o as inferToolMetaFromArgs, p as resolveToolDisplay, s as isAssistantMessage, t as extractAssistantText$1, u as stripMinimaxToolCallXml } from "./pi-embedded-utils-
|
|
43
|
-
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit } from "./fetch-
|
|
44
|
-
import { a as bindAbortRelay, n as withStrictGuardedFetchMode, o as fetchWithTimeout, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
45
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
39
|
+
import { A as validateSecretsResolveResult, C as callGateway, D as GatewayClient, E as resolveLeastPrivilegeOperatorScopesForMethod, M as DOCS_SITE_URL, N as docsSiteUrl, O as gatewayErrorReason, S as buildGatewayConnectionDetails, T as randomIdempotencyKey, _ as resolveSessionReference, a as buildAgentToAgentReplyContext, b as clearActiveCoordinationDepth, c as resolvePingPongTurns, d as createSessionVisibilityGuard, f as resolveEffectiveSessionToolsVisibility, g as resolveMainSessionAlias, h as resolveInternalSessionKey, i as buildAgentToAgentMessageContext, j as SESSION_LABEL_MAX_LENGTH, k as gatewayErrorShapeOf, l as AuthorizationError, m as resolveDisplaySessionKey, n as requestAuthorizedNudge, o as isAnnounceSkip, p as resolveSandboxedSessionToolContext, r as buildAgentToAgentAnnounceContext, s as isReplySkip, u as createAgentToAgentPolicy, v as resolveVisibleSessionReference, w as callGatewayLeastPrivilege, x as setActiveCoordinationDepth, y as shouldResolveSessionIdInput } from "./nudge-Da1ePscI.js";
|
|
40
|
+
import { t as ensureOpenClawModelsJson } from "./models-config-Cbzv_acs.js";
|
|
41
|
+
import { C as coerceImageModelConfig, D as loadModelCatalog, E as findModelInCatalog, O as modelSupportsVision, S as coerceImageAssistantText, T as resolveProviderVisionModelFromConfig, _ as stripCarriedTranscriptFromBody, a as resolveMediaAttachmentLocalRoots, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as runCapability, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as minimaxUnderstandImage, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as decodeDataUrl, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-DW04B1B-.js";
|
|
42
|
+
import { a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, l as stripDowngradedToolCallText, m as stripReasoningTagsFromText, n as extractAssistantThinking, o as inferToolMetaFromArgs, p as resolveToolDisplay, s as isAssistantMessage, t as extractAssistantText$1, u as stripMinimaxToolCallXml } from "./pi-embedded-utils-B6eeyw2H.js";
|
|
43
|
+
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit } from "./fetch-CHncmQms.js";
|
|
44
|
+
import { a as bindAbortRelay, n as withStrictGuardedFetchMode, o as fetchWithTimeout, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-kz-XQlCx.js";
|
|
45
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-BTUna5vE.js";
|
|
46
46
|
import { n as isSafeFenceBreak, r as parseFenceSpans, t as findFenceSpanAt } from "./fences-B64kVeCJ.js";
|
|
47
|
-
import { a as chunkText, c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as resolveChunkNewlinePacking } from "./chunk-
|
|
48
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
49
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-
|
|
50
|
-
import { _ as isRestartEnabled, a as listChatCommands, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, g as isNativeCommandsExplicitlyDisabled, h as isCommandFlagEnabled, i as isCommandEnabled, l as normalizeCommandBody, m as shouldHandleTextCommands, o as listChatCommandsForConfig, p as serializeCommandArgs, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs, v as resolveNativeCommandsEnabled, y as resolveNativeSkillsEnabled } from "./commands-registry-
|
|
51
|
-
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-
|
|
52
|
-
import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-
|
|
53
|
-
import { c as enqueueAgentTurn, d as peekDelayedAgentTurn, f as setDelayedReleaseHold, i as AGENT_TURN_TOPIC, l as isClaimableAgentTurnWorkId, m as KeyedAsyncQueue, p as WORKSPACE_LANE_DENIED_REASON, r as tryGetAgentTurnRuntime, s as clearDelayedReleaseHold, u as mergeDelayedAgentTurn } from "./agent-turn-runner-
|
|
54
|
-
import { _ as endModelCall, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as createInlineCodeState, h as buildCodeSpanIndex, i as endInFlightEmbeddedAttempt, l as setActiveEmbeddedRun, m as emitEmbeddedAgentEvent, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, v as clearAgentRunContext, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-
|
|
55
|
-
import { a as toInternalMessageReceivedContext, c as toPluginMessageReceivedEvent, d as resolveOutboundSessionId, i as toInternalMessagePreprocessedContext, l as fireAndForgetHook, n as createMessageSentEmitter, o as toInternalMessageTranscribedContext, r as deriveInboundMessageHookContext, s as toPluginMessageContext, t as applyMessageSendingHook, u as buildOutboundSessionContext } from "./outbound-message-hooks-
|
|
56
|
-
import { A as createReplyToModeFilterForChannel, C as applyReplyTagsToPayload, D as isRenderablePayload, E as filterMessagingToolMediaDuplicates, M as buildTargetResolverSignature, N as normalizeChannelTargetInput, O as shouldSuppressMessagingToolReplies, P as normalizeTargetForProvider, S as transcriptEntriesToMessages, T as filterMessagingToolDuplicates, _ as resolveContextTokensForModel, a as normalizeOutboundPayloadsForJson, c as loadCombinedSessionStoreForGateway, d as throwIfAborted, f as loadChannelOutboundAdapter, g as lookupContextTokens, h as stripLeadingInboundMetadata, i as normalizeOutboundPayloads, j as resolveReplyToMode, k as shouldSuppressReasoningPayload, l as capArrayByJsonBytes, m as extractToolCallNames, o as normalizeReplyPayloadsForDelivery, p as countToolResults, r as formatOutboundPayloadLog, s as stampReplyActivity, t as deliverOutboundPayloads, u as jsonUtf8Bytes, v as computeBackoff, w as applyReplyThreading, x as readFullTranscriptEntriesFromBackend, y as sleepWithAbort } from "./deliver-
|
|
47
|
+
import { a as chunkText, c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as resolveChunkNewlinePacking } from "./chunk-DCCRrNDr.js";
|
|
48
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-By4yQcHS.js";
|
|
49
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-SWdqg35s.js";
|
|
50
|
+
import { _ as isRestartEnabled, a as listChatCommands, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, g as isNativeCommandsExplicitlyDisabled, h as isCommandFlagEnabled, i as isCommandEnabled, l as normalizeCommandBody, m as shouldHandleTextCommands, o as listChatCommandsForConfig, p as serializeCommandArgs, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs, v as resolveNativeCommandsEnabled, y as resolveNativeSkillsEnabled } from "./commands-registry-C3LKhQLY.js";
|
|
51
|
+
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-DIqKTo0U.js";
|
|
52
|
+
import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-CndF3Klo.js";
|
|
53
|
+
import { c as enqueueAgentTurn, d as peekDelayedAgentTurn, f as setDelayedReleaseHold, i as AGENT_TURN_TOPIC, l as isClaimableAgentTurnWorkId, m as KeyedAsyncQueue, p as WORKSPACE_LANE_DENIED_REASON, r as tryGetAgentTurnRuntime, s as clearDelayedReleaseHold, u as mergeDelayedAgentTurn } from "./agent-turn-runner-BJqs23F_.js";
|
|
54
|
+
import { _ as endModelCall, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as createInlineCodeState, h as buildCodeSpanIndex, i as endInFlightEmbeddedAttempt, l as setActiveEmbeddedRun, m as emitEmbeddedAgentEvent, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, v as clearAgentRunContext, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-DffCseDM.js";
|
|
55
|
+
import { a as toInternalMessageReceivedContext, c as toPluginMessageReceivedEvent, d as resolveOutboundSessionId, i as toInternalMessagePreprocessedContext, l as fireAndForgetHook, n as createMessageSentEmitter, o as toInternalMessageTranscribedContext, r as deriveInboundMessageHookContext, s as toPluginMessageContext, t as applyMessageSendingHook, u as buildOutboundSessionContext } from "./outbound-message-hooks-CIrC0qAA.js";
|
|
56
|
+
import { A as createReplyToModeFilterForChannel, C as applyReplyTagsToPayload, D as isRenderablePayload, E as filterMessagingToolMediaDuplicates, M as buildTargetResolverSignature, N as normalizeChannelTargetInput, O as shouldSuppressMessagingToolReplies, P as normalizeTargetForProvider, S as transcriptEntriesToMessages, T as filterMessagingToolDuplicates, _ as resolveContextTokensForModel, a as normalizeOutboundPayloadsForJson, c as loadCombinedSessionStoreForGateway, d as throwIfAborted, f as loadChannelOutboundAdapter, g as lookupContextTokens, h as stripLeadingInboundMetadata, i as normalizeOutboundPayloads, j as resolveReplyToMode, k as shouldSuppressReasoningPayload, l as capArrayByJsonBytes, m as extractToolCallNames, o as normalizeReplyPayloadsForDelivery, p as countToolResults, r as formatOutboundPayloadLog, s as stampReplyActivity, t as deliverOutboundPayloads, u as jsonUtf8Bytes, v as computeBackoff, w as applyReplyThreading, x as readFullTranscriptEntriesFromBackend, y as sleepWithAbort } from "./deliver-DeMElZFE.js";
|
|
57
57
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-BA0V7L4t.js";
|
|
58
|
-
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-
|
|
59
|
-
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames } from "./skill-commands-
|
|
60
|
-
import { t as convertMarkdownTables } from "./tables-
|
|
61
|
-
import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-
|
|
62
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
63
|
-
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-
|
|
64
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
65
|
-
import { t as recordInboundSessionMetaSafe } from "./session-meta-
|
|
66
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$2, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
67
|
-
import { n as resolveMemorySearchConfig } from "./manager-
|
|
68
|
-
import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-
|
|
69
|
-
import { t as isQmdScopeAllowed } from "./qmd-scope-
|
|
58
|
+
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-CLvElPgY.js";
|
|
59
|
+
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames } from "./skill-commands-K9_D6a_V.js";
|
|
60
|
+
import { t as convertMarkdownTables } from "./tables-BaYGY_Hk.js";
|
|
61
|
+
import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-Djre3xI1.js";
|
|
62
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-Co-6tb50.js";
|
|
63
|
+
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-NLqVlKnJ.js";
|
|
64
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-BmA3wi9D.js";
|
|
65
|
+
import { t as recordInboundSessionMetaSafe } from "./session-meta-DDeeNkQv.js";
|
|
66
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$2, t as createSlackReplyDeliveryPlan } from "./replies-lKn2Mrkb.js";
|
|
67
|
+
import { n as resolveMemorySearchConfig } from "./manager-Nw8a10KA.js";
|
|
68
|
+
import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-CbOJZTFH.js";
|
|
69
|
+
import { t as isQmdScopeAllowed } from "./qmd-scope-DLLTbQwp.js";
|
|
70
70
|
import { createRequire } from "node:module";
|
|
71
71
|
import * as path$1 from "node:path";
|
|
72
72
|
import path, { basename, isAbsolute, join } from "node:path";
|
|
73
|
-
import
|
|
73
|
+
import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
74
74
|
import os, { homedir } from "node:os";
|
|
75
|
-
import
|
|
76
|
-
import * as fs$
|
|
77
|
-
import fs
|
|
75
|
+
import json5 from "json5";
|
|
76
|
+
import * as fs$1 from "node:fs/promises";
|
|
77
|
+
import fs, { open } from "node:fs/promises";
|
|
78
78
|
import { inspect, isDeepStrictEqual, promisify } from "node:util";
|
|
79
79
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
80
80
|
import { fileURLToPath } from "node:url";
|
|
@@ -86,7 +86,7 @@ import { DefaultResourceLoader, SessionManager, SettingsManager, convertToLlm, c
|
|
|
86
86
|
import { EdgeTTS } from "node-edge-tts";
|
|
87
87
|
import net from "node:net";
|
|
88
88
|
import { ProxyAgent, fetch as fetch$1 } from "undici";
|
|
89
|
-
import WebSocket
|
|
89
|
+
import WebSocket from "ws";
|
|
90
90
|
import { Worker } from "node:worker_threads";
|
|
91
91
|
import { createJiti } from "jiti";
|
|
92
92
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -3222,7 +3222,7 @@ function setPromptSourceCacheEntry(key, entry) {
|
|
|
3222
3222
|
}
|
|
3223
3223
|
function readOpenFileUtf8(fd) {
|
|
3224
3224
|
return new Promise((resolve, reject) => {
|
|
3225
|
-
|
|
3225
|
+
syncFs.readFile(fd, "utf-8", (error, data) => {
|
|
3226
3226
|
if (error) {
|
|
3227
3227
|
reject(error);
|
|
3228
3228
|
return;
|
|
@@ -3233,7 +3233,7 @@ function readOpenFileUtf8(fd) {
|
|
|
3233
3233
|
}
|
|
3234
3234
|
function closeOpenFile(fd) {
|
|
3235
3235
|
return new Promise((resolve, reject) => {
|
|
3236
|
-
|
|
3236
|
+
syncFs.close(fd, (error) => {
|
|
3237
3237
|
if (error) {
|
|
3238
3238
|
reject(error);
|
|
3239
3239
|
return;
|
|
@@ -3642,7 +3642,7 @@ function resolveWorkspaceLane(params) {
|
|
|
3642
3642
|
}
|
|
3643
3643
|
async function pathExists(targetPath) {
|
|
3644
3644
|
try {
|
|
3645
|
-
await fs
|
|
3645
|
+
await fs.access(targetPath);
|
|
3646
3646
|
return true;
|
|
3647
3647
|
} catch {
|
|
3648
3648
|
return false;
|
|
@@ -3650,7 +3650,7 @@ async function pathExists(targetPath) {
|
|
|
3650
3650
|
}
|
|
3651
3651
|
async function getExistingPathState(targetPath) {
|
|
3652
3652
|
try {
|
|
3653
|
-
const stats = await fs
|
|
3653
|
+
const stats = await fs.lstat(targetPath);
|
|
3654
3654
|
if (stats.isSymbolicLink()) return "other";
|
|
3655
3655
|
return stats.isDirectory() ? "directory" : "other";
|
|
3656
3656
|
} catch {
|
|
@@ -3659,7 +3659,7 @@ async function getExistingPathState(targetPath) {
|
|
|
3659
3659
|
}
|
|
3660
3660
|
async function pathLexicallyExists(targetPath) {
|
|
3661
3661
|
try {
|
|
3662
|
-
await fs
|
|
3662
|
+
await fs.lstat(targetPath);
|
|
3663
3663
|
return true;
|
|
3664
3664
|
} catch {
|
|
3665
3665
|
return false;
|
|
@@ -3680,9 +3680,9 @@ async function copyIfMissing(params) {
|
|
|
3680
3680
|
if (!opened.ok) return opened.reason === "path" ? "missing-source" : "invalid";
|
|
3681
3681
|
let content;
|
|
3682
3682
|
try {
|
|
3683
|
-
content =
|
|
3683
|
+
content = syncFs.readFileSync(opened.fd);
|
|
3684
3684
|
} finally {
|
|
3685
|
-
|
|
3685
|
+
syncFs.closeSync(opened.fd);
|
|
3686
3686
|
}
|
|
3687
3687
|
try {
|
|
3688
3688
|
await writeFileWithinRoot({
|
|
@@ -3726,7 +3726,7 @@ async function resolveWorkspaceLaneForTurn(params) {
|
|
|
3726
3726
|
const config = resolveWorkspaceLaneConfig(params.cfg, resolution.agentId);
|
|
3727
3727
|
if ((config?.create ?? "on-first-message") !== "on-first-message") return resolution;
|
|
3728
3728
|
const existed = pathState === "directory";
|
|
3729
|
-
if (!existed) await fs
|
|
3729
|
+
if (!existed) await fs.mkdir(resolution.effectiveWorkspaceDir, { recursive: true });
|
|
3730
3730
|
for (const file of config?.copiedOnCreate ?? DEFAULT_COPIED_ON_CREATE_FILES) {
|
|
3731
3731
|
const decision = await copyIfMissing({
|
|
3732
3732
|
sourceRoot: resolution.personaWorkspaceDir,
|
|
@@ -4042,7 +4042,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
4042
4042
|
const workspaceDir = params.workspaceDir?.trim();
|
|
4043
4043
|
if (workspaceDir) {
|
|
4044
4044
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
4045
|
-
if (
|
|
4045
|
+
if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
4046
4046
|
}
|
|
4047
4047
|
const packageRoot = await resolveOpenClawPackageRoot({
|
|
4048
4048
|
cwd: params.cwd,
|
|
@@ -4051,7 +4051,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
4051
4051
|
});
|
|
4052
4052
|
if (packageRoot) {
|
|
4053
4053
|
const packageDocs = path.join(packageRoot, "docs");
|
|
4054
|
-
if (
|
|
4054
|
+
if (syncFs.existsSync(path.join(packageDocs, "docs.json"))) return packageDocs;
|
|
4055
4055
|
}
|
|
4056
4056
|
return DOCS_SITE_URL;
|
|
4057
4057
|
}
|
|
@@ -6525,7 +6525,7 @@ async function imageResult(params) {
|
|
|
6525
6525
|
}, params.label, params.imageSanitization);
|
|
6526
6526
|
}
|
|
6527
6527
|
async function imageResultFromFile(params) {
|
|
6528
|
-
const buf = await fs
|
|
6528
|
+
const buf = await fs.readFile(params.path);
|
|
6529
6529
|
const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
|
|
6530
6530
|
return await imageResult({
|
|
6531
6531
|
label: params.label,
|
|
@@ -7436,7 +7436,7 @@ async function resolveAgentSessionDirs(stateDir) {
|
|
|
7436
7436
|
const agentsDir = path.join(stateDir, "agents");
|
|
7437
7437
|
let entries = [];
|
|
7438
7438
|
try {
|
|
7439
|
-
entries = await fs
|
|
7439
|
+
entries = await fs.readdir(agentsDir, { withFileTypes: true });
|
|
7440
7440
|
} catch (err) {
|
|
7441
7441
|
if (err.code === "ENOENT") return [];
|
|
7442
7442
|
throw err;
|
|
@@ -9625,7 +9625,7 @@ async function routeReply(params) {
|
|
|
9625
9625
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
9626
9626
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
9627
9627
|
try {
|
|
9628
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
9628
|
+
const { deliverOutboundPayloads } = await import("./deliver-DeMElZFE.js").then((n) => n.n);
|
|
9629
9629
|
const outboundSession = buildOutboundSessionContext({
|
|
9630
9630
|
cfg,
|
|
9631
9631
|
agentId: resolvedAgentId,
|
|
@@ -11622,7 +11622,7 @@ async function sendTranscriptEcho(params) {
|
|
|
11622
11622
|
}
|
|
11623
11623
|
const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
|
|
11624
11624
|
try {
|
|
11625
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
11625
|
+
const { deliverOutboundPayloads } = await import("./deliver-DeMElZFE.js").then((n) => n.n);
|
|
11626
11626
|
await deliverOutboundPayloads({
|
|
11627
11627
|
cfg,
|
|
11628
11628
|
channel: normalizedChannel,
|
|
@@ -14430,7 +14430,7 @@ async function resolveDiscordUserAllowlist(params) {
|
|
|
14430
14430
|
//#region src/plugin-sdk/json-store.ts
|
|
14431
14431
|
async function readJsonFileWithFallback(filePath, fallback) {
|
|
14432
14432
|
try {
|
|
14433
|
-
const parsed = safeParseJson(await
|
|
14433
|
+
const parsed = safeParseJson(await syncFs.promises.readFile(filePath, "utf-8"));
|
|
14434
14434
|
if (parsed == null) return {
|
|
14435
14435
|
value: fallback,
|
|
14436
14436
|
exists: true
|
|
@@ -14517,7 +14517,7 @@ async function readPairingRequests(filePath) {
|
|
|
14517
14517
|
}
|
|
14518
14518
|
async function ensureJsonFile(filePath, fallback) {
|
|
14519
14519
|
try {
|
|
14520
|
-
await
|
|
14520
|
+
await syncFs.promises.access(filePath);
|
|
14521
14521
|
} catch {
|
|
14522
14522
|
await writeJsonFile(filePath, fallback);
|
|
14523
14523
|
}
|
|
@@ -14673,7 +14673,7 @@ function resolveAllowFromReadCacheOrMissing(filePath, stat) {
|
|
|
14673
14673
|
async function readAllowFromStateForPathWithExists(channel, filePath) {
|
|
14674
14674
|
let stat = null;
|
|
14675
14675
|
try {
|
|
14676
|
-
stat = await
|
|
14676
|
+
stat = await syncFs.promises.stat(filePath);
|
|
14677
14677
|
} catch (err) {
|
|
14678
14678
|
if (err.code !== "ENOENT") throw err;
|
|
14679
14679
|
}
|
|
@@ -14716,7 +14716,7 @@ async function writeAllowFromState(filePath, allowFrom) {
|
|
|
14716
14716
|
});
|
|
14717
14717
|
let stat = null;
|
|
14718
14718
|
try {
|
|
14719
|
-
stat = await
|
|
14719
|
+
stat = await syncFs.promises.stat(filePath);
|
|
14720
14720
|
} catch {}
|
|
14721
14721
|
setAllowFromReadCache(filePath, {
|
|
14722
14722
|
exists: true,
|
|
@@ -16006,7 +16006,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
16006
16006
|
}
|
|
16007
16007
|
function ensureDir$1(filePath) {
|
|
16008
16008
|
const dir = path.dirname(filePath);
|
|
16009
|
-
|
|
16009
|
+
syncFs.mkdirSync(dir, { recursive: true });
|
|
16010
16010
|
}
|
|
16011
16011
|
function coerceAllowlistEntries(allowlist) {
|
|
16012
16012
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -16076,11 +16076,11 @@ function generateToken() {
|
|
|
16076
16076
|
function loadExecApprovals() {
|
|
16077
16077
|
const filePath = resolveExecApprovalsPath();
|
|
16078
16078
|
try {
|
|
16079
|
-
if (!
|
|
16079
|
+
if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
|
|
16080
16080
|
version: 1,
|
|
16081
16081
|
agents: {}
|
|
16082
16082
|
});
|
|
16083
|
-
const raw =
|
|
16083
|
+
const raw = syncFs.readFileSync(filePath, "utf8");
|
|
16084
16084
|
const parsed = JSON.parse(raw);
|
|
16085
16085
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
16086
16086
|
version: 1,
|
|
@@ -16097,9 +16097,9 @@ function loadExecApprovals() {
|
|
|
16097
16097
|
function saveExecApprovals(file) {
|
|
16098
16098
|
const filePath = resolveExecApprovalsPath();
|
|
16099
16099
|
ensureDir$1(filePath);
|
|
16100
|
-
|
|
16100
|
+
syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
16101
16101
|
try {
|
|
16102
|
-
|
|
16102
|
+
syncFs.chmodSync(filePath, 384);
|
|
16103
16103
|
} catch {}
|
|
16104
16104
|
}
|
|
16105
16105
|
function ensureExecApprovals() {
|
|
@@ -16563,18 +16563,18 @@ function applyPathPrepend(env, prepend, options) {
|
|
|
16563
16563
|
function resolvePowerShellPath() {
|
|
16564
16564
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
16565
16565
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
16566
|
-
if (
|
|
16566
|
+
if (syncFs.existsSync(pwsh7)) return pwsh7;
|
|
16567
16567
|
const programW6432 = process.env.ProgramW6432;
|
|
16568
16568
|
if (programW6432 && programW6432 !== programFiles) {
|
|
16569
16569
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
16570
|
-
if (
|
|
16570
|
+
if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
16571
16571
|
}
|
|
16572
16572
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
16573
16573
|
if (pwshInPath) return pwshInPath;
|
|
16574
16574
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
16575
16575
|
if (systemRoot) {
|
|
16576
16576
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
16577
|
-
if (
|
|
16577
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
16578
16578
|
}
|
|
16579
16579
|
return "powershell.exe";
|
|
16580
16580
|
}
|
|
@@ -16612,7 +16612,7 @@ function resolveShellFromPath(name) {
|
|
|
16612
16612
|
for (const entry of entries) {
|
|
16613
16613
|
const candidate = path.join(entry, name);
|
|
16614
16614
|
try {
|
|
16615
|
-
|
|
16615
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
16616
16616
|
return candidate;
|
|
16617
16617
|
} catch {}
|
|
16618
16618
|
}
|
|
@@ -17550,7 +17550,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
17550
17550
|
cwd: process.cwd(),
|
|
17551
17551
|
root: params.sandbox.workspaceDir
|
|
17552
17552
|
});
|
|
17553
|
-
if (!(await fs
|
|
17553
|
+
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
17554
17554
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
17555
17555
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
17556
17556
|
return {
|
|
@@ -18940,13 +18940,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
18940
18940
|
cwd: params.workdir,
|
|
18941
18941
|
root: params.workdir
|
|
18942
18942
|
});
|
|
18943
|
-
stat = await fs
|
|
18943
|
+
stat = await fs.stat(absPath);
|
|
18944
18944
|
} catch {
|
|
18945
18945
|
return;
|
|
18946
18946
|
}
|
|
18947
18947
|
if (!stat.isFile()) return;
|
|
18948
18948
|
if (stat.size > 512 * 1024) return;
|
|
18949
|
-
const content = await fs
|
|
18949
|
+
const content = await fs.readFile(absPath, "utf-8");
|
|
18950
18950
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
18951
18951
|
if (first) {
|
|
18952
18952
|
const idx = first.index;
|
|
@@ -20375,7 +20375,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
20375
20375
|
function hasGitMarker(repoRoot) {
|
|
20376
20376
|
const gitPath = path.join(repoRoot, ".git");
|
|
20377
20377
|
try {
|
|
20378
|
-
const stat =
|
|
20378
|
+
const stat = syncFs.statSync(gitPath);
|
|
20379
20379
|
return stat.isDirectory() || stat.isFile();
|
|
20380
20380
|
} catch {
|
|
20381
20381
|
return false;
|
|
@@ -20387,10 +20387,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
20387
20387
|
function resolveGitDirFromMarker(repoRoot) {
|
|
20388
20388
|
const gitPath = path.join(repoRoot, ".git");
|
|
20389
20389
|
try {
|
|
20390
|
-
const stat =
|
|
20390
|
+
const stat = syncFs.statSync(gitPath);
|
|
20391
20391
|
if (stat.isDirectory()) return gitPath;
|
|
20392
20392
|
if (!stat.isFile()) return null;
|
|
20393
|
-
const match =
|
|
20393
|
+
const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
20394
20394
|
if (!match?.[1]) return null;
|
|
20395
20395
|
return path.resolve(repoRoot, match[1].trim());
|
|
20396
20396
|
} catch {
|
|
@@ -20457,7 +20457,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
20457
20457
|
cachedCommit = null;
|
|
20458
20458
|
return cachedCommit;
|
|
20459
20459
|
}
|
|
20460
|
-
const head =
|
|
20460
|
+
const head = syncFs.readFileSync(headPath, "utf-8").trim();
|
|
20461
20461
|
if (!head) {
|
|
20462
20462
|
cachedCommit = null;
|
|
20463
20463
|
return cachedCommit;
|
|
@@ -20465,7 +20465,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
20465
20465
|
if (head.startsWith("ref:")) {
|
|
20466
20466
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
20467
20467
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
20468
|
-
cachedCommit = formatCommit(
|
|
20468
|
+
cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
|
|
20469
20469
|
return cachedCommit;
|
|
20470
20470
|
}
|
|
20471
20471
|
cachedCommit = formatCommit(head);
|
|
@@ -25103,7 +25103,7 @@ function resolveRepoRoot(params) {
|
|
|
25103
25103
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
25104
25104
|
if (configured) try {
|
|
25105
25105
|
const resolved = path.resolve(configured);
|
|
25106
|
-
if (
|
|
25106
|
+
if (syncFs.statSync(resolved).isDirectory()) return resolved;
|
|
25107
25107
|
} catch {}
|
|
25108
25108
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
25109
25109
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -25620,7 +25620,7 @@ async function readForwardAndSort(query, sessionId) {
|
|
|
25620
25620
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
25621
25621
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
25622
25622
|
function loadTemplate(fileName) {
|
|
25623
|
-
return
|
|
25623
|
+
return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
25624
25624
|
}
|
|
25625
25625
|
function generateHtml(sessionData) {
|
|
25626
25626
|
const template = loadTemplate("template.html");
|
|
@@ -25723,8 +25723,8 @@ async function buildExportSessionReply(params) {
|
|
|
25723
25723
|
const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
25724
25724
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
25725
25725
|
const outputDir = path.dirname(outputPath);
|
|
25726
|
-
if (!
|
|
25727
|
-
|
|
25726
|
+
if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
|
|
25727
|
+
syncFs.writeFileSync(outputPath, html, "utf-8");
|
|
25728
25728
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
25729
25729
|
return { text: [
|
|
25730
25730
|
"✅ Session exported!",
|
|
@@ -25899,8 +25899,8 @@ function resolveZaiApiKey() {
|
|
|
25899
25899
|
}
|
|
25900
25900
|
try {
|
|
25901
25901
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
25902
|
-
if (!
|
|
25903
|
-
const data = JSON.parse(
|
|
25902
|
+
if (!syncFs.existsSync(authPath)) return;
|
|
25903
|
+
const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
|
|
25904
25904
|
return data["z-ai"]?.access || data.zai?.access;
|
|
25905
25905
|
} catch {
|
|
25906
25906
|
return;
|
|
@@ -27659,7 +27659,7 @@ function shouldPersistAnyBindingState() {
|
|
|
27659
27659
|
}
|
|
27660
27660
|
function shouldPersistBindingMutations() {
|
|
27661
27661
|
if (shouldPersistAnyBindingState()) return true;
|
|
27662
|
-
return
|
|
27662
|
+
return syncFs.existsSync(resolveThreadBindingsPath());
|
|
27663
27663
|
}
|
|
27664
27664
|
function saveBindingsToDisk(params = {}) {
|
|
27665
27665
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -30266,8 +30266,8 @@ function normalizeSessionKey(value) {
|
|
|
30266
30266
|
}
|
|
30267
30267
|
function readSessionStore(storePath) {
|
|
30268
30268
|
try {
|
|
30269
|
-
const raw =
|
|
30270
|
-
const parsed =
|
|
30269
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
30270
|
+
const parsed = json5.parse(raw);
|
|
30271
30271
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
30272
30272
|
} catch {}
|
|
30273
30273
|
return {};
|
|
@@ -31953,7 +31953,7 @@ async function createModelSelectionState(params) {
|
|
|
31953
31953
|
}
|
|
31954
31954
|
}
|
|
31955
31955
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
31956
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
31956
|
+
const { ensureAuthProfileStore } = await import("./model-selection-JA-6f5ss.js").then((n) => n.P);
|
|
31957
31957
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
31958
31958
|
const providerKey = normalizeProviderId(provider);
|
|
31959
31959
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -35550,7 +35550,7 @@ function asBoolean(value) {
|
|
|
35550
35550
|
}
|
|
35551
35551
|
function resolveTempPathParts(opts) {
|
|
35552
35552
|
const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
|
|
35553
|
-
if (!opts.tmpDir)
|
|
35553
|
+
if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
|
|
35554
35554
|
recursive: true,
|
|
35555
35555
|
mode: 448
|
|
35556
35556
|
});
|
|
@@ -35636,7 +35636,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
35636
35636
|
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}`);
|
|
35637
35637
|
const body = res.body;
|
|
35638
35638
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
35639
|
-
const fileHandle = await fs$
|
|
35639
|
+
const fileHandle = await fs$1.open(filePath, "w");
|
|
35640
35640
|
let thrown;
|
|
35641
35641
|
try {
|
|
35642
35642
|
const reader = body.getReader();
|
|
@@ -35654,7 +35654,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
35654
35654
|
await fileHandle.close();
|
|
35655
35655
|
}
|
|
35656
35656
|
if (thrown) {
|
|
35657
|
-
await fs$
|
|
35657
|
+
await fs$1.unlink(filePath).catch(() => {});
|
|
35658
35658
|
throw thrown;
|
|
35659
35659
|
}
|
|
35660
35660
|
} finally {
|
|
@@ -35667,7 +35667,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
35667
35667
|
}
|
|
35668
35668
|
async function writeBase64ToFile(filePath, base64) {
|
|
35669
35669
|
const buf = Buffer.from(base64, "base64");
|
|
35670
|
-
await fs$
|
|
35670
|
+
await fs$1.writeFile(filePath, buf);
|
|
35671
35671
|
return {
|
|
35672
35672
|
path: filePath,
|
|
35673
35673
|
bytes: buf.length
|
|
@@ -35752,7 +35752,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
35752
35752
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
35753
35753
|
throw new Error("jsonlPath outside allowed roots");
|
|
35754
35754
|
}
|
|
35755
|
-
const canonical = await fs
|
|
35755
|
+
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
35756
35756
|
if (!isInboundPathAllowed({
|
|
35757
35757
|
filePath: canonical,
|
|
35758
35758
|
roots
|
|
@@ -35760,7 +35760,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
35760
35760
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
35761
35761
|
throw new Error("jsonlPath outside allowed roots");
|
|
35762
35762
|
}
|
|
35763
|
-
return await fs
|
|
35763
|
+
return await fs.readFile(canonical, "utf8");
|
|
35764
35764
|
}
|
|
35765
35765
|
const CanvasToolSchema = Type.Object({
|
|
35766
35766
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -36611,12 +36611,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
36611
36611
|
}
|
|
36612
36612
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
36613
36613
|
const filePath = resolveRestartSentinelPath(env);
|
|
36614
|
-
await fs
|
|
36614
|
+
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
36615
36615
|
const data = {
|
|
36616
36616
|
version: 1,
|
|
36617
36617
|
payload
|
|
36618
36618
|
};
|
|
36619
|
-
await fs
|
|
36619
|
+
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
36620
36620
|
return filePath;
|
|
36621
36621
|
}
|
|
36622
36622
|
|
|
@@ -39026,9 +39026,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
39026
39026
|
const entries = [];
|
|
39027
39027
|
for (const rawPath of paths) {
|
|
39028
39028
|
const resolved = resolveUserPath(rawPath);
|
|
39029
|
-
if (!
|
|
39029
|
+
if (!syncFs.existsSync(resolved)) continue;
|
|
39030
39030
|
try {
|
|
39031
|
-
const payload = JSON.parse(
|
|
39031
|
+
const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
|
|
39032
39032
|
entries.push(...parseCatalogEntries(payload));
|
|
39033
39033
|
} catch {}
|
|
39034
39034
|
}
|
|
@@ -47998,18 +47998,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
47998
47998
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
47999
47999
|
}
|
|
48000
48000
|
async function writeCliImages(images) {
|
|
48001
|
-
const tempDir = await fs
|
|
48001
|
+
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
|
|
48002
48002
|
const paths = [];
|
|
48003
48003
|
for (let i = 0; i < images.length; i += 1) {
|
|
48004
48004
|
const image = images[i];
|
|
48005
48005
|
const ext = resolveImageExtension(image.mimeType);
|
|
48006
48006
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
48007
48007
|
const buffer = Buffer.from(image.data, "base64");
|
|
48008
|
-
await fs
|
|
48008
|
+
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
48009
48009
|
paths.push(filePath);
|
|
48010
48010
|
}
|
|
48011
48011
|
const cleanup = async () => {
|
|
48012
|
-
await fs
|
|
48012
|
+
await fs.rm(tempDir, {
|
|
48013
48013
|
recursive: true,
|
|
48014
48014
|
force: true
|
|
48015
48015
|
});
|
|
@@ -49909,10 +49909,10 @@ function resolveCronStorePath(storePath) {
|
|
|
49909
49909
|
}
|
|
49910
49910
|
async function loadCronStore(storePath) {
|
|
49911
49911
|
try {
|
|
49912
|
-
const raw = await
|
|
49912
|
+
const raw = await syncFs.promises.readFile(storePath, "utf-8");
|
|
49913
49913
|
let parsed;
|
|
49914
49914
|
try {
|
|
49915
|
-
parsed =
|
|
49915
|
+
parsed = json5.parse(raw);
|
|
49916
49916
|
} catch (err) {
|
|
49917
49917
|
throw new Error(`Failed to parse cron store at ${storePath}: ${String(err)}`, { cause: err });
|
|
49918
49918
|
}
|
|
@@ -50479,9 +50479,9 @@ async function readPostCompactionContext(workspaceDir) {
|
|
|
50479
50479
|
if (!opened.ok) return null;
|
|
50480
50480
|
const sections = extractSections((() => {
|
|
50481
50481
|
try {
|
|
50482
|
-
return
|
|
50482
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
50483
50483
|
} finally {
|
|
50484
|
-
|
|
50484
|
+
syncFs.closeSync(opened.fd);
|
|
50485
50485
|
}
|
|
50486
50486
|
})(), ["Session Startup", "Red Lines"]);
|
|
50487
50487
|
if (sections.length === 0) return null;
|
|
@@ -51526,7 +51526,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
51526
51526
|
return;
|
|
51527
51527
|
}
|
|
51528
51528
|
try {
|
|
51529
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
51529
|
+
const { deliverOutboundPayloads } = await import("./deliver-DeMElZFE.js").then((n) => n.n);
|
|
51530
51530
|
const outboundSession = buildOutboundSessionContext({
|
|
51531
51531
|
cfg: params.cfg,
|
|
51532
51532
|
sessionKey: params.sessionKey
|
|
@@ -52475,7 +52475,7 @@ async function stageSandboxMedia(params) {
|
|
|
52475
52475
|
const remoteMediaCacheDir = ctx.MediaRemoteHost ? path.join(workspaceDir, ".openclaw", "media", "remote-cache", sessionKey) : null;
|
|
52476
52476
|
const effectiveWorkspaceDir = sandbox?.workspaceDir ?? remoteMediaCacheDir;
|
|
52477
52477
|
if (!effectiveWorkspaceDir) return;
|
|
52478
|
-
await fs
|
|
52478
|
+
await fs.mkdir(effectiveWorkspaceDir, { recursive: true });
|
|
52479
52479
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
52480
52480
|
cfg,
|
|
52481
52481
|
accountId: ctx.AccountId
|
|
@@ -52534,8 +52534,8 @@ async function stageLocalFileIntoRoot(params) {
|
|
|
52534
52534
|
}
|
|
52535
52535
|
async function stageRemoteFileIntoRoot(params) {
|
|
52536
52536
|
const tmpRoot = resolvePreferredOpenClawTmpDir();
|
|
52537
|
-
await fs
|
|
52538
|
-
const tmpDir = await fs
|
|
52537
|
+
await fs.mkdir(tmpRoot, { recursive: true });
|
|
52538
|
+
const tmpDir = await fs.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
|
|
52539
52539
|
const tmpPath = path.join(tmpDir, "download");
|
|
52540
52540
|
try {
|
|
52541
52541
|
await scpFile(params.remoteHost, params.remotePath, tmpPath);
|
|
@@ -52546,7 +52546,7 @@ async function stageRemoteFileIntoRoot(params) {
|
|
|
52546
52546
|
maxBytes: params.maxBytes
|
|
52547
52547
|
});
|
|
52548
52548
|
} finally {
|
|
52549
|
-
await fs
|
|
52549
|
+
await fs.rm(tmpDir, {
|
|
52550
52550
|
recursive: true,
|
|
52551
52551
|
force: true
|
|
52552
52552
|
}).catch(() => {});
|
|
@@ -53693,7 +53693,7 @@ async function runModelGate(spec, ctx) {
|
|
|
53693
53693
|
const isolatedSessionId = randomNonce;
|
|
53694
53694
|
const isolatedRunId = randomNonce;
|
|
53695
53695
|
const tmpBaseDir = resolvePreferredOpenClawTmpDir();
|
|
53696
|
-
tmpDir = await fs
|
|
53696
|
+
tmpDir = await fs.mkdtemp(path.join(tmpBaseDir, "wake-gate-"));
|
|
53697
53697
|
const workspaceDir = tmpDir;
|
|
53698
53698
|
const prompt = spec.prompt ?? DEFAULT_MODEL_PROMPT;
|
|
53699
53699
|
const timeoutMs = spec.timeoutMs ?? DEFAULT_MODEL_TIMEOUT_MS;
|
|
@@ -53751,7 +53751,7 @@ async function runModelGate(spec, ctx) {
|
|
|
53751
53751
|
log$33.warn("model gate error", { error: err instanceof Error ? err.message : String(err) });
|
|
53752
53752
|
return { wake: false };
|
|
53753
53753
|
} finally {
|
|
53754
|
-
if (tmpDir) await fs
|
|
53754
|
+
if (tmpDir) await fs.rm(tmpDir, {
|
|
53755
53755
|
recursive: true,
|
|
53756
53756
|
force: true
|
|
53757
53757
|
}).catch(() => void 0);
|
|
@@ -53981,7 +53981,7 @@ async function resolveHeartbeatPreflight(params) {
|
|
|
53981
53981
|
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, params.agentId);
|
|
53982
53982
|
const heartbeatFilePath = path.join(workspaceDir, DEFAULT_HEARTBEAT_FILENAME);
|
|
53983
53983
|
try {
|
|
53984
|
-
if (isHeartbeatContentEffectivelyEmpty(await fs
|
|
53984
|
+
if (isHeartbeatContentEffectivelyEmpty(await fs.readFile(heartbeatFilePath, "utf-8"))) return {
|
|
53985
53985
|
...basePreflight,
|
|
53986
53986
|
skipReason: "empty-heartbeat-file"
|
|
53987
53987
|
};
|
|
@@ -62568,7 +62568,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
62568
62568
|
let transcript;
|
|
62569
62569
|
let carry;
|
|
62570
62570
|
if (needsPreflightTranscription) try {
|
|
62571
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
62571
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DaYu-alJ.js");
|
|
62572
62572
|
const uploadable = audioAttachments.filter((att) => typeof att.url === "string" && att.url.length > 0);
|
|
62573
62573
|
if (uploadable.length > 0) {
|
|
62574
62574
|
const preflight = await transcribeFirstAudio({
|
|
@@ -64029,7 +64029,7 @@ function identityHasValues(identity) {
|
|
|
64029
64029
|
}
|
|
64030
64030
|
function loadIdentityFromFile(identityPath) {
|
|
64031
64031
|
try {
|
|
64032
|
-
const parsed = parseIdentityMarkdown(
|
|
64032
|
+
const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
|
|
64033
64033
|
if (!identityHasValues(parsed)) return null;
|
|
64034
64034
|
return parsed;
|
|
64035
64035
|
} catch {
|
|
@@ -64053,7 +64053,7 @@ function resolveAvatarSource(cfg, agentId) {
|
|
|
64053
64053
|
}
|
|
64054
64054
|
function resolveExistingPath(value) {
|
|
64055
64055
|
try {
|
|
64056
|
-
return
|
|
64056
|
+
return syncFs.realpathSync(value);
|
|
64057
64057
|
} catch {
|
|
64058
64058
|
return path.resolve(value);
|
|
64059
64059
|
}
|
|
@@ -64071,7 +64071,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
64071
64071
|
reason: "unsupported_extension"
|
|
64072
64072
|
};
|
|
64073
64073
|
try {
|
|
64074
|
-
const stat =
|
|
64074
|
+
const stat = syncFs.statSync(realPath);
|
|
64075
64075
|
if (!stat.isFile()) return {
|
|
64076
64076
|
ok: false,
|
|
64077
64077
|
reason: "missing"
|
|
@@ -69838,19 +69838,19 @@ function createDefaultDeps() {
|
|
|
69838
69838
|
};
|
|
69839
69839
|
}),
|
|
69840
69840
|
sendMessageDiscord: async (...args) => {
|
|
69841
|
-
const { sendMessageDiscord } = await import("./send-
|
|
69841
|
+
const { sendMessageDiscord } = await import("./send-ChgWfhHL.js").then((n) => n.t);
|
|
69842
69842
|
return await sendMessageDiscord(...args);
|
|
69843
69843
|
},
|
|
69844
69844
|
sendMessageSlack: async (...args) => {
|
|
69845
|
-
const { sendMessageSlack } = await import("./send-
|
|
69845
|
+
const { sendMessageSlack } = await import("./send-BZrEBJKt.js").then((n) => n.n);
|
|
69846
69846
|
return await sendMessageSlack(...args);
|
|
69847
69847
|
},
|
|
69848
69848
|
sendMessageSignal: async (...args) => {
|
|
69849
|
-
const { sendMessageSignal } = await import("./send-
|
|
69849
|
+
const { sendMessageSignal } = await import("./send-Co-6tb50.js").then((n) => n.i);
|
|
69850
69850
|
return await sendMessageSignal(...args);
|
|
69851
69851
|
},
|
|
69852
69852
|
sendMessageIMessage: async (...args) => {
|
|
69853
|
-
const { sendMessageIMessage } = await import("./send-
|
|
69853
|
+
const { sendMessageIMessage } = await import("./send-NLqVlKnJ.js").then((n) => n.n);
|
|
69854
69854
|
return await sendMessageIMessage(...args);
|
|
69855
69855
|
}
|
|
69856
69856
|
};
|
|
@@ -71102,10 +71102,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
71102
71102
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
71103
71103
|
}
|
|
71104
71104
|
async function writeWavFile(pcm) {
|
|
71105
|
-
const tempDir = await fs
|
|
71105
|
+
const tempDir = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "discord-voice-"));
|
|
71106
71106
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
71107
71107
|
const wav = buildWavBuffer(pcm);
|
|
71108
|
-
await fs
|
|
71108
|
+
await fs.writeFile(filePath, wav);
|
|
71109
71109
|
scheduleTempCleanup(tempDir);
|
|
71110
71110
|
return {
|
|
71111
71111
|
path: filePath,
|
|
@@ -71114,7 +71114,7 @@ async function writeWavFile(pcm) {
|
|
|
71114
71114
|
}
|
|
71115
71115
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
71116
71116
|
setTimeout(() => {
|
|
71117
|
-
fs
|
|
71117
|
+
fs.rm(tempDir, {
|
|
71118
71118
|
recursive: true,
|
|
71119
71119
|
force: true
|
|
71120
71120
|
}).catch((err) => {
|
|
@@ -73451,7 +73451,7 @@ var ResilientGatewayPlugin = class extends GatewayPlugin {
|
|
|
73451
73451
|
}
|
|
73452
73452
|
createWebSocket(url) {
|
|
73453
73453
|
if (!this.wsAgent) return super.createWebSocket(url);
|
|
73454
|
-
return new WebSocket
|
|
73454
|
+
return new WebSocket(url, { agent: this.wsAgent });
|
|
73455
73455
|
}
|
|
73456
73456
|
};
|
|
73457
73457
|
function createDiscordGatewayPlugin(params) {
|
|
@@ -74899,7 +74899,7 @@ async function detectBinary(name) {
|
|
|
74899
74899
|
if (!isSafeExecutableValue(name)) return false;
|
|
74900
74900
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
74901
74901
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
74902
|
-
await fs
|
|
74902
|
+
await fs.access(resolved);
|
|
74903
74903
|
return true;
|
|
74904
74904
|
} catch {
|
|
74905
74905
|
return false;
|
|
@@ -75563,7 +75563,7 @@ function normalizeAllowList$1(list) {
|
|
|
75563
75563
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
75564
75564
|
try {
|
|
75565
75565
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
75566
|
-
const content = await fs
|
|
75566
|
+
const content = await fs.readFile(expanded, "utf8");
|
|
75567
75567
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
75568
75568
|
if (userHostMatch) return userHostMatch[1];
|
|
75569
75569
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -75899,7 +75899,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
75899
75899
|
function readFileIfExists(filePath) {
|
|
75900
75900
|
if (!filePath) return;
|
|
75901
75901
|
try {
|
|
75902
|
-
return
|
|
75902
|
+
return syncFs.readFileSync(filePath, "utf-8").trim();
|
|
75903
75903
|
} catch {
|
|
75904
75904
|
return;
|
|
75905
75905
|
}
|
|
@@ -76562,7 +76562,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
76562
76562
|
prefix: "line-media",
|
|
76563
76563
|
extension: getExtensionForContentType(contentType)
|
|
76564
76564
|
});
|
|
76565
|
-
await
|
|
76565
|
+
await syncFs.promises.writeFile(filePath, buffer);
|
|
76566
76566
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
76567
76567
|
return {
|
|
76568
76568
|
path: filePath,
|
|
@@ -82335,7 +82335,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
82335
82335
|
}
|
|
82336
82336
|
let commandsRegistry;
|
|
82337
82337
|
async function getCommandsRegistry() {
|
|
82338
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
82338
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-C3LKhQLY.js").then((n) => n.n);
|
|
82339
82339
|
return commandsRegistry;
|
|
82340
82340
|
}
|
|
82341
82341
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -82665,14 +82665,14 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
82665
82665
|
const channelName = channelInfo?.name;
|
|
82666
82666
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
82667
82667
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
82668
|
-
import("./resolve-route-
|
|
82668
|
+
import("./resolve-route-BmA3wi9D.js").then((n) => n.r),
|
|
82669
82669
|
import("./inbound-context-BA0V7L4t.js").then((n) => n.n),
|
|
82670
82670
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
82671
82671
|
]);
|
|
82672
82672
|
const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
|
|
82673
82673
|
import("./conversation-label-Ckfze_uK.js").then((n) => n.t),
|
|
82674
|
-
import("./reply-prefix-
|
|
82675
|
-
import("./session-meta-
|
|
82674
|
+
import("./reply-prefix-BTUna5vE.js").then((n) => n.n),
|
|
82675
|
+
import("./session-meta-DDeeNkQv.js").then((n) => n.n)
|
|
82676
82676
|
]);
|
|
82677
82677
|
const route = resolveAgentRoute({
|
|
82678
82678
|
cfg,
|
|
@@ -82737,9 +82737,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
82737
82737
|
});
|
|
82738
82738
|
const deliverSlashPayloads = async (replies) => {
|
|
82739
82739
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode, resolveChunkNewlinePacking }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
82740
|
-
import("./replies-
|
|
82741
|
-
import("./chunk-
|
|
82742
|
-
import("./markdown-tables-
|
|
82740
|
+
import("./replies-lKn2Mrkb.js").then((n) => n.r),
|
|
82741
|
+
import("./chunk-DCCRrNDr.js").then((n) => n.s),
|
|
82742
|
+
import("./markdown-tables-By4yQcHS.js").then((n) => n.t)
|
|
82743
82743
|
]);
|
|
82744
82744
|
await deliverSlackSlashReplies({
|
|
82745
82745
|
replies,
|
|
@@ -82793,7 +82793,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
82793
82793
|
let nativeCommands = [];
|
|
82794
82794
|
if (nativeEnabled) {
|
|
82795
82795
|
reg = await getCommandsRegistry();
|
|
82796
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
82796
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-K9_D6a_V.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
82797
82797
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
82798
82798
|
skillCommands,
|
|
82799
82799
|
provider: "slack"
|
|
@@ -83737,7 +83737,7 @@ async function getMemorySearchManager(params) {
|
|
|
83737
83737
|
if (cached) return { manager: cached };
|
|
83738
83738
|
}
|
|
83739
83739
|
try {
|
|
83740
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
83740
|
+
const { QmdMemoryManager } = await import("./qmd-manager-BFUaPUn-.js");
|
|
83741
83741
|
const primary = await QmdMemoryManager.create({
|
|
83742
83742
|
cfg: params.cfg,
|
|
83743
83743
|
agentId: params.agentId,
|
|
@@ -83749,7 +83749,7 @@ async function getMemorySearchManager(params) {
|
|
|
83749
83749
|
const wrapper = new FallbackMemoryManager({
|
|
83750
83750
|
primary,
|
|
83751
83751
|
fallbackFactory: async () => {
|
|
83752
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
83752
|
+
const { MemoryIndexManager } = await import("./manager-Nw8a10KA.js").then((n) => n.t);
|
|
83753
83753
|
return await MemoryIndexManager.get(params);
|
|
83754
83754
|
}
|
|
83755
83755
|
}, () => {
|
|
@@ -83764,7 +83764,7 @@ async function getMemorySearchManager(params) {
|
|
|
83764
83764
|
}
|
|
83765
83765
|
}
|
|
83766
83766
|
try {
|
|
83767
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
83767
|
+
const { MemoryIndexManager } = await import("./manager-Nw8a10KA.js").then((n) => n.t);
|
|
83768
83768
|
return { manager: await MemoryIndexManager.get(params) };
|
|
83769
83769
|
} catch (err) {
|
|
83770
83770
|
return {
|
|
@@ -84114,7 +84114,7 @@ const LEGACY_ARCHIVE_DEFAULT_RETENTION_MS = 720 * 60 * 60 * 1e3;
|
|
|
84114
84114
|
const log$25 = createSubsystemLogger("config/sessions/legacy-import/archive");
|
|
84115
84115
|
/** SHA-256 over the file's bytes; null when the file is gone (ENOENT). Other errors propagate. */
|
|
84116
84116
|
async function sourceIdentity(filePath) {
|
|
84117
|
-
const handle = await fs
|
|
84117
|
+
const handle = await fs.open(filePath, "r").catch((error) => {
|
|
84118
84118
|
if (error.code === "ENOENT") return null;
|
|
84119
84119
|
throw error;
|
|
84120
84120
|
});
|
|
@@ -84167,9 +84167,9 @@ function fallbackArchiveDest(source, archiveRoot) {
|
|
|
84167
84167
|
async function copyVerifiedTo(sourcePath, dest, expected) {
|
|
84168
84168
|
const tmp = `${dest}.tmp-${randomUUID()}`;
|
|
84169
84169
|
try {
|
|
84170
|
-
const handle = await fs
|
|
84170
|
+
const handle = await fs.open(tmp, "wx", 384);
|
|
84171
84171
|
try {
|
|
84172
|
-
const sourceHandle = await fs
|
|
84172
|
+
const sourceHandle = await fs.open(sourcePath, "r");
|
|
84173
84173
|
try {
|
|
84174
84174
|
const chunk = Buffer.allocUnsafe(256 * 1024);
|
|
84175
84175
|
let size = 0;
|
|
@@ -84186,18 +84186,18 @@ async function copyVerifiedTo(sourcePath, dest, expected) {
|
|
|
84186
84186
|
} finally {
|
|
84187
84187
|
await handle.close();
|
|
84188
84188
|
}
|
|
84189
|
-
await fs
|
|
84189
|
+
await fs.chmod(tmp, 384);
|
|
84190
84190
|
const copied = await identityOf(tmp);
|
|
84191
84191
|
if (!copied || copied.fingerprint !== expected.fingerprint) throw new Error(`legacy archive cross-device copy diverged from the imported bytes: ${dest}`);
|
|
84192
84192
|
try {
|
|
84193
|
-
await fs
|
|
84193
|
+
await fs.link(tmp, dest);
|
|
84194
84194
|
} catch (error) {
|
|
84195
84195
|
if (error.code !== "EEXIST") throw error;
|
|
84196
84196
|
const existing = await identityOf(dest);
|
|
84197
84197
|
if (!existing || existing.fingerprint !== expected.fingerprint) throw new Error(`legacy archive destination exists with different content: ${dest}`, { cause: error });
|
|
84198
84198
|
}
|
|
84199
84199
|
} finally {
|
|
84200
|
-
await fs
|
|
84200
|
+
await fs.rm(tmp, { force: true });
|
|
84201
84201
|
}
|
|
84202
84202
|
}
|
|
84203
84203
|
/**
|
|
@@ -84213,7 +84213,7 @@ async function planLegacyArchiveDest(source, archiveRoot, expected) {
|
|
|
84213
84213
|
const resolvedRoot = path.resolve(archiveRoot);
|
|
84214
84214
|
const { dir, dest } = archivePathsFor(source, resolvedRoot);
|
|
84215
84215
|
try {
|
|
84216
|
-
await fs
|
|
84216
|
+
await fs.mkdir(dir, {
|
|
84217
84217
|
recursive: true,
|
|
84218
84218
|
mode: 448
|
|
84219
84219
|
});
|
|
@@ -84253,7 +84253,7 @@ async function archiveLegacySource(source, archiveRoot, expected) {
|
|
|
84253
84253
|
*/
|
|
84254
84254
|
async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
84255
84255
|
const resolvedRoot = path.resolve(archiveRoot);
|
|
84256
|
-
await fs
|
|
84256
|
+
await fs.mkdir(path.dirname(dest), {
|
|
84257
84257
|
recursive: true,
|
|
84258
84258
|
mode: 448
|
|
84259
84259
|
});
|
|
@@ -84263,14 +84263,14 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
84263
84263
|
const expectedIdentity = expected ?? sourceIdentityValue;
|
|
84264
84264
|
if (sourceIdentityValue.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy source changed after import; failing closed: ${source.path}`);
|
|
84265
84265
|
const destInodeVerified = async (destPath) => {
|
|
84266
|
-
const [sourceStat, destStat] = await Promise.all([fs
|
|
84266
|
+
const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath).catch(() => void 0)]);
|
|
84267
84267
|
return destStat !== void 0 && destStat.dev === sourceStat.dev && destStat.ino === sourceStat.ino;
|
|
84268
84268
|
};
|
|
84269
84269
|
const moveInto = async (destPath) => {
|
|
84270
84270
|
let moved = false;
|
|
84271
84271
|
let independentArchive = false;
|
|
84272
84272
|
try {
|
|
84273
|
-
await fs
|
|
84273
|
+
await fs.link(source.path, destPath);
|
|
84274
84274
|
moved = true;
|
|
84275
84275
|
} catch (error) {
|
|
84276
84276
|
const code = error.code;
|
|
@@ -84278,7 +84278,7 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
84278
84278
|
const existing = await identityOf(destPath);
|
|
84279
84279
|
if (existing && existing.fingerprint === expectedIdentity.fingerprint) {
|
|
84280
84280
|
moved = true;
|
|
84281
|
-
const [sourceStat, destStat] = await Promise.all([fs
|
|
84281
|
+
const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath)]);
|
|
84282
84282
|
independentArchive = sourceStat.dev !== destStat.dev || sourceStat.ino !== destStat.ino;
|
|
84283
84283
|
} else return {
|
|
84284
84284
|
moved: false,
|
|
@@ -84299,13 +84299,13 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
84299
84299
|
};
|
|
84300
84300
|
const outcome = await moveInto(dest);
|
|
84301
84301
|
if (outcome.divergent) throw new Error(`legacy archive destination exists with different content: ${dest}`);
|
|
84302
|
-
await fs
|
|
84302
|
+
await fs.chmod(dest, 384);
|
|
84303
84303
|
if (!await destInodeVerified(dest)) {
|
|
84304
84304
|
const archived = await identityOf(dest);
|
|
84305
84305
|
if (!archived || archived.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy archive verification failed: ${dest}`);
|
|
84306
84306
|
}
|
|
84307
84307
|
if (outcome.moved) if (outcome.independentArchive) await unlinkSourceIfUnchanged(source.path, expectedIdentity);
|
|
84308
|
-
else await fs
|
|
84308
|
+
else await fs.unlink(source.path);
|
|
84309
84309
|
return dest;
|
|
84310
84310
|
}
|
|
84311
84311
|
/**
|
|
@@ -84319,12 +84319,12 @@ async function unlinkSourceIfUnchanged(sourcePath, expected) {
|
|
|
84319
84319
|
const current = await sourceIdentity(sourcePath);
|
|
84320
84320
|
if (!current) return;
|
|
84321
84321
|
if (current.fingerprint !== expected.fingerprint) throw new Error(`legacy source changed before removal; failing closed: ${sourcePath}`);
|
|
84322
|
-
await fs
|
|
84322
|
+
await fs.unlink(sourcePath);
|
|
84323
84323
|
}
|
|
84324
84324
|
async function chmodDirs(dir, stopAt) {
|
|
84325
84325
|
let current = dir;
|
|
84326
84326
|
while (current.startsWith(stopAt) && current !== stopAt) {
|
|
84327
|
-
await fs
|
|
84327
|
+
await fs.chmod(current, 448).catch(() => void 0);
|
|
84328
84328
|
const parent = path.dirname(current);
|
|
84329
84329
|
if (parent === current) return;
|
|
84330
84330
|
current = parent;
|
|
@@ -84353,11 +84353,11 @@ async function purgeExpiredLegacyArchives(runtime, opts) {
|
|
|
84353
84353
|
log$25.warn("skipping legacy archive outside the archive root", { sourcePath: receipt.sourcePath });
|
|
84354
84354
|
continue;
|
|
84355
84355
|
}
|
|
84356
|
-
if (!await fs
|
|
84356
|
+
if (!await fs.stat(archivePath).then(() => true).catch((error) => {
|
|
84357
84357
|
if (error.code === "ENOENT") return false;
|
|
84358
84358
|
throw error;
|
|
84359
84359
|
})) continue;
|
|
84360
|
-
await fs
|
|
84360
|
+
await fs.rm(archivePath, { force: true });
|
|
84361
84361
|
purged += 1;
|
|
84362
84362
|
await pruneEmptyArchiveDirs(path.dirname(archivePath), archiveRoot);
|
|
84363
84363
|
}
|
|
@@ -84368,12 +84368,12 @@ async function pruneEmptyArchiveDirs(dir, stopAt) {
|
|
|
84368
84368
|
while (current.startsWith(stopAt + path.sep)) {
|
|
84369
84369
|
let entries;
|
|
84370
84370
|
try {
|
|
84371
|
-
entries = await fs
|
|
84371
|
+
entries = await fs.readdir(current);
|
|
84372
84372
|
} catch {
|
|
84373
84373
|
return;
|
|
84374
84374
|
}
|
|
84375
84375
|
if (entries.length > 0) return;
|
|
84376
|
-
await fs
|
|
84376
|
+
await fs.rmdir(current).catch(() => void 0);
|
|
84377
84377
|
current = path.dirname(current);
|
|
84378
84378
|
}
|
|
84379
84379
|
}
|
|
@@ -84656,7 +84656,7 @@ function byPath(a, b) {
|
|
|
84656
84656
|
}
|
|
84657
84657
|
function readDirents(dirPath) {
|
|
84658
84658
|
try {
|
|
84659
|
-
return
|
|
84659
|
+
return syncFs.readdirSync(dirPath, { withFileTypes: true });
|
|
84660
84660
|
} catch {
|
|
84661
84661
|
return [];
|
|
84662
84662
|
}
|
|
@@ -84669,7 +84669,7 @@ function isUnderQuarantine(rootDir, candidatePath) {
|
|
|
84669
84669
|
}
|
|
84670
84670
|
function statSource(filePath) {
|
|
84671
84671
|
try {
|
|
84672
|
-
const stats =
|
|
84672
|
+
const stats = syncFs.statSync(filePath);
|
|
84673
84673
|
if (!stats.isFile()) return;
|
|
84674
84674
|
return {
|
|
84675
84675
|
mtimeMs: stats.mtimeMs,
|
|
@@ -84860,12 +84860,12 @@ async function censusLegacySources(cfg, env) {
|
|
|
84860
84860
|
for (const agentDir of readDirents(agentsRoot).filter((entry) => entry.isDirectory()).toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
84861
84861
|
const agentId = normalizeAgentId(agentDir.name);
|
|
84862
84862
|
const sessionsDir = path.join(agentsRoot, agentDir.name, LEGACY_SESSIONS_DIR_NAME);
|
|
84863
|
-
if (
|
|
84863
|
+
if (syncFs.existsSync(sessionsDir)) censusAgentDir(sessionsDir, agentId);
|
|
84864
84864
|
}
|
|
84865
84865
|
const legacyRoot = path.join(stateDir, LEGACY_SESSIONS_DIR_NAME);
|
|
84866
|
-
if (
|
|
84866
|
+
if (syncFs.existsSync(legacyRoot)) censusAgentDir(legacyRoot, defaultAgent);
|
|
84867
84867
|
const recoveryDir = path.join(stateDir, RECOVERY_DIR_NAME);
|
|
84868
|
-
if (
|
|
84868
|
+
if (syncFs.existsSync(recoveryDir)) censusRecoveryTree(sources, recoveryDir);
|
|
84869
84869
|
return sources.values();
|
|
84870
84870
|
}
|
|
84871
84871
|
/**
|
|
@@ -84949,7 +84949,7 @@ async function admitDurableKeyMappings(registry, listKeys, opts) {
|
|
|
84949
84949
|
await opts?.clearMappingSourcePath?.(mapping.agentId, mapping.sessionId).catch(() => void 0);
|
|
84950
84950
|
continue;
|
|
84951
84951
|
}
|
|
84952
|
-
const stats = await fs
|
|
84952
|
+
const stats = await fs.stat(mapping.sourcePath).catch(() => void 0);
|
|
84953
84953
|
if (!stats?.isFile()) continue;
|
|
84954
84954
|
registry.admit({
|
|
84955
84955
|
path: mapping.sourcePath,
|
|
@@ -85149,7 +85149,7 @@ function createLegacySourceRegistry() {
|
|
|
85149
85149
|
if (!isSettledReceipt(receipt, source.sizeBytes)) trackPendingPath(key, source);
|
|
85150
85150
|
return;
|
|
85151
85151
|
}
|
|
85152
|
-
const stats = await fs
|
|
85152
|
+
const stats = await fs.stat(key).catch(() => void 0);
|
|
85153
85153
|
if (!stats?.isFile() && receipt.status !== "imported") return;
|
|
85154
85154
|
admit({
|
|
85155
85155
|
path: key,
|
|
@@ -85366,12 +85366,12 @@ function canonicalSqliteIdentityPathSync(sqlitePath) {
|
|
|
85366
85366
|
for (let hops = 0; hops < MAX_SYMLINK_HOPS; hops += 1) {
|
|
85367
85367
|
let stats;
|
|
85368
85368
|
try {
|
|
85369
|
-
stats =
|
|
85369
|
+
stats = syncFs.lstatSync(current);
|
|
85370
85370
|
} catch {
|
|
85371
85371
|
return canonicalPathSync(current);
|
|
85372
85372
|
}
|
|
85373
85373
|
if (!stats.isSymbolicLink()) return canonicalPathSync(current);
|
|
85374
|
-
current = path.resolve(canonicalPathSync(path.dirname(current)),
|
|
85374
|
+
current = path.resolve(canonicalPathSync(path.dirname(current)), syncFs.readlinkSync(current));
|
|
85375
85375
|
}
|
|
85376
85376
|
return canonicalPathSync(sqlitePath);
|
|
85377
85377
|
}
|
|
@@ -85385,12 +85385,12 @@ function sleep$1(ms) {
|
|
|
85385
85385
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
85386
85386
|
}
|
|
85387
85387
|
function acquireKernelOwnerLock(lock) {
|
|
85388
|
-
|
|
85388
|
+
syncFs.mkdirSync(path.dirname(lock.lockPath), {
|
|
85389
85389
|
recursive: true,
|
|
85390
85390
|
mode: 448
|
|
85391
85391
|
});
|
|
85392
85392
|
try {
|
|
85393
|
-
|
|
85393
|
+
syncFs.closeSync(syncFs.openSync(lock.lockPath, "wx", 384));
|
|
85394
85394
|
} catch (err) {
|
|
85395
85395
|
if (err.code !== "EEXIST") throw err;
|
|
85396
85396
|
}
|
|
@@ -85424,7 +85424,7 @@ function closeSqliteQuietly(db) {
|
|
|
85424
85424
|
function releaseKernelOwnerLock(lock, db, info) {
|
|
85425
85425
|
try {
|
|
85426
85426
|
const current = readHolderSidecar(lock.sidecarPath);
|
|
85427
|
-
if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt)
|
|
85427
|
+
if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt) syncFs.rmSync(lock.sidecarPath, { force: true });
|
|
85428
85428
|
} finally {
|
|
85429
85429
|
closeSqliteQuietly(db);
|
|
85430
85430
|
}
|
|
@@ -85432,17 +85432,17 @@ function releaseKernelOwnerLock(lock, db, info) {
|
|
|
85432
85432
|
function writeHolderSidecar(sidecarPath, info) {
|
|
85433
85433
|
const temp = `${sidecarPath}.${process.pid}.tmp`;
|
|
85434
85434
|
try {
|
|
85435
|
-
const fd =
|
|
85435
|
+
const fd = syncFs.openSync(temp, "w", 384);
|
|
85436
85436
|
try {
|
|
85437
|
-
|
|
85438
|
-
|
|
85437
|
+
syncFs.writeFileSync(fd, `${JSON.stringify(info)}\n`);
|
|
85438
|
+
syncFs.fsyncSync(fd);
|
|
85439
85439
|
} finally {
|
|
85440
|
-
|
|
85440
|
+
syncFs.closeSync(fd);
|
|
85441
85441
|
}
|
|
85442
|
-
|
|
85442
|
+
syncFs.renameSync(temp, sidecarPath);
|
|
85443
85443
|
} catch (err) {
|
|
85444
85444
|
try {
|
|
85445
|
-
|
|
85445
|
+
syncFs.rmSync(temp, { force: true });
|
|
85446
85446
|
} catch {}
|
|
85447
85447
|
throw err;
|
|
85448
85448
|
}
|
|
@@ -85467,7 +85467,7 @@ function parseHolderSidecar(raw) {
|
|
|
85467
85467
|
function readHolderSidecar(sidecarPath) {
|
|
85468
85468
|
let raw;
|
|
85469
85469
|
try {
|
|
85470
|
-
raw =
|
|
85470
|
+
raw = syncFs.readFileSync(sidecarPath, "utf8");
|
|
85471
85471
|
} catch {
|
|
85472
85472
|
return;
|
|
85473
85473
|
}
|
|
@@ -85478,7 +85478,7 @@ async function readHolderSidecarBriefly(sidecarPath, timeoutMs = 1e3) {
|
|
|
85478
85478
|
for (;;) {
|
|
85479
85479
|
let raw;
|
|
85480
85480
|
try {
|
|
85481
|
-
raw =
|
|
85481
|
+
raw = syncFs.readFileSync(sidecarPath, "utf8");
|
|
85482
85482
|
} catch {
|
|
85483
85483
|
raw = void 0;
|
|
85484
85484
|
}
|
|
@@ -85642,7 +85642,7 @@ async function claimExclusivePartial(destPath) {
|
|
|
85642
85642
|
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
85643
85643
|
const candidate = `${destPath}.${process.pid}.${randomBytes(8).toString("hex")}.partial`;
|
|
85644
85644
|
try {
|
|
85645
|
-
await (await fs
|
|
85645
|
+
await (await fs.open(candidate, "wx", 384)).close();
|
|
85646
85646
|
return candidate;
|
|
85647
85647
|
} catch (err) {
|
|
85648
85648
|
if (err.code !== "EEXIST") throw err;
|
|
@@ -85661,7 +85661,7 @@ async function backupSqliteSessionDatabase(params) {
|
|
|
85661
85661
|
const dbPath = path.resolve(params.dbPath);
|
|
85662
85662
|
const destPath = path.resolve(params.destPath);
|
|
85663
85663
|
for (const guarded of protectedLivePaths(dbPath)) if (sameFile$1(destPath, guarded)) throw new Error("backup destination must not be the live database or its owner lock, holder sidecar, or journal files");
|
|
85664
|
-
await fs
|
|
85664
|
+
await fs.mkdir(path.dirname(destPath), {
|
|
85665
85665
|
recursive: true,
|
|
85666
85666
|
mode: 448
|
|
85667
85667
|
});
|
|
@@ -85673,14 +85673,14 @@ async function backupSqliteSessionDatabase(params) {
|
|
|
85673
85673
|
gated: sqliteBackupTestHooks.holdWorkerAtGate === true,
|
|
85674
85674
|
writableSource: false
|
|
85675
85675
|
});
|
|
85676
|
-
await fs
|
|
85676
|
+
await fs.rename(partialPath, destPath);
|
|
85677
85677
|
} catch (err) {
|
|
85678
|
-
await fs
|
|
85678
|
+
await fs.rm(partialPath, { force: true }).catch(() => {});
|
|
85679
85679
|
throw err;
|
|
85680
85680
|
}
|
|
85681
85681
|
return {
|
|
85682
85682
|
path: destPath,
|
|
85683
|
-
bytes: (await fs
|
|
85683
|
+
bytes: (await fs.stat(destPath)).size
|
|
85684
85684
|
};
|
|
85685
85685
|
}
|
|
85686
85686
|
|
|
@@ -85702,7 +85702,7 @@ const INCARNATION_SELECT_SQL = "SELECT id FROM ctx_legacy_import_incarnation LIM
|
|
|
85702
85702
|
async function readDbIncarnationId(dbPath) {
|
|
85703
85703
|
let db;
|
|
85704
85704
|
try {
|
|
85705
|
-
await fs
|
|
85705
|
+
await fs.stat(dbPath);
|
|
85706
85706
|
db = new DatabaseSync(dbPath);
|
|
85707
85707
|
const row = db.prepare(INCARNATION_SELECT_SQL).get();
|
|
85708
85708
|
return typeof row?.id === "string" ? row.id : void 0;
|
|
@@ -85754,7 +85754,7 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
85754
85754
|
const marked = await readSnapshotMarker(backupsDir, canonicalDbPath);
|
|
85755
85755
|
if (marked) return marked;
|
|
85756
85756
|
if ((await params.listReceipts()).length > 0) return;
|
|
85757
|
-
await fs
|
|
85757
|
+
await fs.mkdir(backupsDir, {
|
|
85758
85758
|
recursive: true,
|
|
85759
85759
|
mode: 448
|
|
85760
85760
|
});
|
|
@@ -85765,7 +85765,7 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
85765
85765
|
dbPath,
|
|
85766
85766
|
destPath
|
|
85767
85767
|
});
|
|
85768
|
-
if (dbId !== void 0) await fs
|
|
85768
|
+
if (dbId !== void 0) await fs.writeFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), `${JSON.stringify({
|
|
85769
85769
|
path: backup.path,
|
|
85770
85770
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
85771
85771
|
canonicalDbPath,
|
|
@@ -85783,17 +85783,17 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
85783
85783
|
*/
|
|
85784
85784
|
async function cleanupPartialLegacyBackups(stateDir) {
|
|
85785
85785
|
const backupsDir = path.join(stateDir, "backups");
|
|
85786
|
-
const names = await fs
|
|
85786
|
+
const names = await fs.readdir(backupsDir).catch(() => []);
|
|
85787
85787
|
for (const name of names) {
|
|
85788
85788
|
if (!name.endsWith(".partial")) continue;
|
|
85789
|
-
await fs
|
|
85789
|
+
await fs.rm(path.join(backupsDir, name), { force: true }).catch(() => void 0);
|
|
85790
85790
|
}
|
|
85791
85791
|
}
|
|
85792
85792
|
async function readSnapshotMarker(backupsDir, canonicalDbPath) {
|
|
85793
85793
|
const currentIncarnationId = await readDbIncarnationId(canonicalDbPath);
|
|
85794
85794
|
const keyed = await readMarkerFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), canonicalDbPath, currentIncarnationId);
|
|
85795
85795
|
if (keyed !== void 0) return keyed;
|
|
85796
|
-
const names = await fs
|
|
85796
|
+
const names = await fs.readdir(backupsDir).catch(() => []);
|
|
85797
85797
|
for (const name of names) {
|
|
85798
85798
|
if (!name.startsWith(SNAPSHOT_MARKER_PREFIX) || !name.endsWith(".json")) continue;
|
|
85799
85799
|
const found = await readMarkerFile(path.join(backupsDir, name), canonicalDbPath, currentIncarnationId);
|
|
@@ -85802,7 +85802,7 @@ async function readSnapshotMarker(backupsDir, canonicalDbPath) {
|
|
|
85802
85802
|
return readMarkerFile(path.join(backupsDir, SNAPSHOT_MARKER_FILE), canonicalDbPath, currentIncarnationId);
|
|
85803
85803
|
}
|
|
85804
85804
|
async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId) {
|
|
85805
|
-
const raw = await fs
|
|
85805
|
+
const raw = await fs.readFile(markerFile, "utf8").catch(() => void 0);
|
|
85806
85806
|
if (!raw) return;
|
|
85807
85807
|
try {
|
|
85808
85808
|
const parsed = JSON.parse(raw);
|
|
@@ -85814,7 +85814,7 @@ async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId)
|
|
|
85814
85814
|
if (currentIncarnationId !== void 0 && currentIncarnationId === markerId) return markerPath;
|
|
85815
85815
|
return;
|
|
85816
85816
|
}
|
|
85817
|
-
const [markerStat, dbStat] = await Promise.all([fs
|
|
85817
|
+
const [markerStat, dbStat] = await Promise.all([fs.stat(markerDbPath).catch(() => void 0), fs.stat(canonicalDbPath).catch(() => void 0)]);
|
|
85818
85818
|
if (markerStat !== void 0 && dbStat !== void 0 ? markerStat.dev === dbStat.dev && markerStat.ino === dbStat.ino : markerDbPath === canonicalDbPath) return markerPath;
|
|
85819
85819
|
}
|
|
85820
85820
|
} catch {}
|
|
@@ -86080,7 +86080,7 @@ const log$17 = createSubsystemLogger("config/sessions/legacy-import/index-import
|
|
|
86080
86080
|
async function readLegacyIndexStore(storePath) {
|
|
86081
86081
|
let raw;
|
|
86082
86082
|
try {
|
|
86083
|
-
raw = await fs
|
|
86083
|
+
raw = await fs.readFile(storePath, "utf8");
|
|
86084
86084
|
} catch (error) {
|
|
86085
86085
|
throw new Error(`legacy index source unreadable: ${storePath}`, { cause: error });
|
|
86086
86086
|
}
|
|
@@ -86319,7 +86319,7 @@ async function importLegacyIndex(runtime, source, opts = {}) {
|
|
|
86319
86319
|
actorExplicit: entry.actor !== void 0
|
|
86320
86320
|
}), opts.signal);
|
|
86321
86321
|
if (transcriptPath && opts.discoveredTranscripts && path.resolve(transcriptPath) !== path.resolve(source.path)) try {
|
|
86322
|
-
const stats = await fs
|
|
86322
|
+
const stats = await fs.stat(transcriptPath);
|
|
86323
86323
|
if (stats.isFile()) opts.discoveredTranscripts.push({
|
|
86324
86324
|
path: transcriptPath,
|
|
86325
86325
|
kind: "transcript",
|
|
@@ -86435,7 +86435,7 @@ async function loadSessionKeyOverrides(stateDir) {
|
|
|
86435
86435
|
const filePath = path.join(stateDir, "recovery", SESSION_KEY_OVERRIDES_FILENAME);
|
|
86436
86436
|
let raw;
|
|
86437
86437
|
try {
|
|
86438
|
-
raw = await fs
|
|
86438
|
+
raw = await fs.readFile(filePath, "utf8");
|
|
86439
86439
|
} catch (error) {
|
|
86440
86440
|
if (error.code !== "ENOENT") log$15.warn("session key overrides unreadable; ignoring", { error });
|
|
86441
86441
|
return /* @__PURE__ */ new Map();
|
|
@@ -87911,14 +87911,14 @@ function isGatewayArgv(args) {
|
|
|
87911
87911
|
}
|
|
87912
87912
|
function readLinuxCmdline(pid) {
|
|
87913
87913
|
try {
|
|
87914
|
-
return parseProcCmdline(
|
|
87914
|
+
return parseProcCmdline(syncFs.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
|
|
87915
87915
|
} catch {
|
|
87916
87916
|
return null;
|
|
87917
87917
|
}
|
|
87918
87918
|
}
|
|
87919
87919
|
function readLinuxStartTime(pid) {
|
|
87920
87920
|
try {
|
|
87921
|
-
const raw =
|
|
87921
|
+
const raw = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
|
|
87922
87922
|
const closeParen = raw.lastIndexOf(")");
|
|
87923
87923
|
if (closeParen < 0) return null;
|
|
87924
87924
|
const fields = raw.slice(closeParen + 1).trim().split(/\s+/);
|
|
@@ -87972,7 +87972,7 @@ async function resolveGatewayOwnerStatus(pid, payload, platform, port) {
|
|
|
87972
87972
|
}
|
|
87973
87973
|
async function readLockPayload(lockPath) {
|
|
87974
87974
|
try {
|
|
87975
|
-
const raw = await fs
|
|
87975
|
+
const raw = await fs.readFile(lockPath, "utf8");
|
|
87976
87976
|
const parsed = JSON.parse(raw);
|
|
87977
87977
|
if (typeof parsed.pid !== "number") return null;
|
|
87978
87978
|
if (typeof parsed.createdAt !== "string") return null;
|
|
@@ -88357,7 +88357,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
88357
88357
|
}
|
|
88358
88358
|
async function checkReadableFile(pathname) {
|
|
88359
88359
|
try {
|
|
88360
|
-
await fs
|
|
88360
|
+
await fs.access(pathname, syncFs.constants.R_OK);
|
|
88361
88361
|
return { exists: true };
|
|
88362
88362
|
} catch (err) {
|
|
88363
88363
|
const code = err.code;
|
|
@@ -88392,7 +88392,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
88392
88392
|
if (alt.issue) issues.push(alt.issue);
|
|
88393
88393
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
88394
88394
|
for (const extraPath of resolvedExtraPaths) try {
|
|
88395
|
-
if ((await fs
|
|
88395
|
+
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
88396
88396
|
const extraCheck = await checkReadableFile(extraPath);
|
|
88397
88397
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
88398
88398
|
} catch (err) {
|
|
@@ -88402,7 +88402,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
88402
88402
|
}
|
|
88403
88403
|
let dirReadable = null;
|
|
88404
88404
|
try {
|
|
88405
|
-
await fs
|
|
88405
|
+
await fs.access(memoryDir, syncFs.constants.R_OK);
|
|
88406
88406
|
dirReadable = true;
|
|
88407
88407
|
} catch (err) {
|
|
88408
88408
|
const code = err.code;
|
|
@@ -88450,7 +88450,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
88450
88450
|
if (!dbPath) return null;
|
|
88451
88451
|
let stat;
|
|
88452
88452
|
try {
|
|
88453
|
-
stat = await fs
|
|
88453
|
+
stat = await fs.stat(dbPath);
|
|
88454
88454
|
} catch (err) {
|
|
88455
88455
|
const code = err.code;
|
|
88456
88456
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -88929,7 +88929,7 @@ function createPluginRuntime(options = {}) {
|
|
|
88929
88929
|
workStates: readTaskWorkStates
|
|
88930
88930
|
},
|
|
88931
88931
|
resolveLearningWorkspaceDir: (agentId) => resolveLearningWorkspaceDir(loadConfig(), agentId),
|
|
88932
|
-
sessions: { startUserRun: async (params) => (await import("./user-run-recording-
|
|
88932
|
+
sessions: { startUserRun: async (params) => (await import("./user-run-recording-DIqKTo0U.js").then((n) => n.n)).startUserSessionRun(params) }
|
|
88933
88933
|
};
|
|
88934
88934
|
Object.defineProperty(runtime, "analysis", {
|
|
88935
88935
|
enumerable: true,
|
|
@@ -88972,7 +88972,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
88972
88972
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
88973
88973
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
88974
88974
|
const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
88975
|
-
for (const candidate of orderedCandidates) if (
|
|
88975
|
+
for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
|
|
88976
88976
|
const parent = path.dirname(cursor);
|
|
88977
88977
|
if (parent === cursor) break;
|
|
88978
88978
|
cursor = parent;
|
|
@@ -89525,7 +89525,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
89525
89525
|
continue;
|
|
89526
89526
|
}
|
|
89527
89527
|
const safeSource = opened.path;
|
|
89528
|
-
|
|
89528
|
+
syncFs.closeSync(opened.fd);
|
|
89529
89529
|
let mod = null;
|
|
89530
89530
|
try {
|
|
89531
89531
|
mod = getJiti()(safeSource);
|
|
@@ -89688,7 +89688,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
89688
89688
|
}
|
|
89689
89689
|
function safeRealpathOrResolve(value) {
|
|
89690
89690
|
try {
|
|
89691
|
-
return
|
|
89691
|
+
return syncFs.realpathSync(value);
|
|
89692
89692
|
} catch {
|
|
89693
89693
|
return path.resolve(value);
|
|
89694
89694
|
}
|
|
@@ -89846,7 +89846,7 @@ function resolvePluginWebSearchProviders(params) {
|
|
|
89846
89846
|
//#endregion
|
|
89847
89847
|
//#region src/agents/apply-patch-update.ts
|
|
89848
89848
|
async function defaultReadFile(filePath) {
|
|
89849
|
-
return fs
|
|
89849
|
+
return fs.readFile(filePath, "utf8");
|
|
89850
89850
|
}
|
|
89851
89851
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
89852
89852
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -90167,7 +90167,7 @@ function resolvePatchFileOps(options) {
|
|
|
90167
90167
|
const workspaceOnly = options.workspaceOnly !== false;
|
|
90168
90168
|
return {
|
|
90169
90169
|
readFile: async (filePath) => {
|
|
90170
|
-
if (!workspaceOnly) return await fs
|
|
90170
|
+
if (!workspaceOnly) return await fs.readFile(filePath, "utf8");
|
|
90171
90171
|
const opened = await openBoundaryFile({
|
|
90172
90172
|
absolutePath: filePath,
|
|
90173
90173
|
rootPath: options.cwd,
|
|
@@ -90175,14 +90175,14 @@ function resolvePatchFileOps(options) {
|
|
|
90175
90175
|
});
|
|
90176
90176
|
assertBoundaryRead(opened, filePath);
|
|
90177
90177
|
try {
|
|
90178
|
-
return
|
|
90178
|
+
return syncFs.readFileSync(opened.fd, "utf8");
|
|
90179
90179
|
} finally {
|
|
90180
|
-
|
|
90180
|
+
syncFs.closeSync(opened.fd);
|
|
90181
90181
|
}
|
|
90182
90182
|
},
|
|
90183
90183
|
writeFile: async (filePath, content) => {
|
|
90184
90184
|
if (!workspaceOnly) {
|
|
90185
|
-
await fs
|
|
90185
|
+
await fs.writeFile(filePath, content, "utf8");
|
|
90186
90186
|
return;
|
|
90187
90187
|
}
|
|
90188
90188
|
const relative = toRelativeSandboxPath(options.cwd, filePath);
|
|
@@ -90193,8 +90193,8 @@ function resolvePatchFileOps(options) {
|
|
|
90193
90193
|
encoding: "utf8"
|
|
90194
90194
|
});
|
|
90195
90195
|
},
|
|
90196
|
-
remove: (filePath) => fs
|
|
90197
|
-
mkdirp: (dir) => fs
|
|
90196
|
+
remove: (filePath) => fs.rm(filePath),
|
|
90197
|
+
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
90198
90198
|
};
|
|
90199
90199
|
}
|
|
90200
90200
|
async function ensureDir(filePath, ops) {
|
|
@@ -90473,7 +90473,7 @@ async function recordLoopOutcome(args) {
|
|
|
90473
90473
|
if (!args.ctx?.sessionKey) return;
|
|
90474
90474
|
try {
|
|
90475
90475
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DJQj3Ka7.js").then((n) => n.n);
|
|
90476
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
90476
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-BwJFCGqI.js");
|
|
90477
90477
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
90478
90478
|
sessionKey: args.ctx.sessionKey,
|
|
90479
90479
|
sessionId: args.ctx?.agentId
|
|
@@ -90500,8 +90500,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
90500
90500
|
const params = args.params;
|
|
90501
90501
|
if (args.ctx?.sessionKey) {
|
|
90502
90502
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-DJQj3Ka7.js").then((n) => n.n);
|
|
90503
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
90504
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
90503
|
+
const { logToolLoopAction } = await import("./diagnostic-BqFtliY1.js").then((n) => n.n);
|
|
90504
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-BwJFCGqI.js");
|
|
90505
90505
|
const sessionState = getDiagnosticSessionState({
|
|
90506
90506
|
sessionKey: args.ctx.sessionKey,
|
|
90507
90507
|
sessionId: args.ctx?.agentId
|
|
@@ -90719,7 +90719,7 @@ function wrapHostEditToolWithPostWriteRecovery(base, root) {
|
|
|
90719
90719
|
if (!pathParam || !newText) throw err;
|
|
90720
90720
|
try {
|
|
90721
90721
|
const absolutePath = resolveHostEditPath(root, pathParam);
|
|
90722
|
-
const content = await fs
|
|
90722
|
+
const content = await fs.readFile(absolutePath, "utf-8");
|
|
90723
90723
|
const hasNew = content.includes(newText);
|
|
90724
90724
|
const stillHasOld = oldText !== void 0 && oldText.length > 0 && content.includes(oldText);
|
|
90725
90725
|
if (hasNew && !stillHasOld) return {
|
|
@@ -91190,14 +91190,14 @@ function createSandboxEditOperations(params) {
|
|
|
91190
91190
|
}
|
|
91191
91191
|
async function writeHostFile(absolutePath, content) {
|
|
91192
91192
|
const resolved = path.resolve(absolutePath);
|
|
91193
|
-
await fs
|
|
91194
|
-
await fs
|
|
91193
|
+
await fs.mkdir(path.dirname(resolved), { recursive: true });
|
|
91194
|
+
await fs.writeFile(resolved, content, "utf-8");
|
|
91195
91195
|
}
|
|
91196
91196
|
function createHostWriteOperations(root, options) {
|
|
91197
91197
|
if (!(options?.workspaceOnly ?? false)) return {
|
|
91198
91198
|
mkdir: async (dir) => {
|
|
91199
91199
|
const resolved = path.resolve(dir);
|
|
91200
|
-
await fs
|
|
91200
|
+
await fs.mkdir(resolved, { recursive: true });
|
|
91201
91201
|
},
|
|
91202
91202
|
writeFile: writeHostFile
|
|
91203
91203
|
};
|
|
@@ -91210,7 +91210,7 @@ function createHostWriteOperations(root, options) {
|
|
|
91210
91210
|
cwd: root,
|
|
91211
91211
|
root
|
|
91212
91212
|
});
|
|
91213
|
-
await fs
|
|
91213
|
+
await fs.mkdir(resolved, { recursive: true });
|
|
91214
91214
|
},
|
|
91215
91215
|
writeFile: async (absolutePath, content) => {
|
|
91216
91216
|
await writeFileWithinRoot({
|
|
@@ -91226,12 +91226,12 @@ function createHostEditOperations(root, options) {
|
|
|
91226
91226
|
if (!(options?.workspaceOnly ?? false)) return {
|
|
91227
91227
|
readFile: async (absolutePath) => {
|
|
91228
91228
|
const resolved = path.resolve(absolutePath);
|
|
91229
|
-
return await fs
|
|
91229
|
+
return await fs.readFile(resolved);
|
|
91230
91230
|
},
|
|
91231
91231
|
writeFile: writeHostFile,
|
|
91232
91232
|
access: async (absolutePath) => {
|
|
91233
91233
|
const resolved = path.resolve(absolutePath);
|
|
91234
|
-
await fs
|
|
91234
|
+
await fs.access(resolved);
|
|
91235
91235
|
}
|
|
91236
91236
|
};
|
|
91237
91237
|
return {
|
|
@@ -92406,9 +92406,9 @@ async function readWorkspaceContextForSummary() {
|
|
|
92406
92406
|
if (!opened.ok) return "";
|
|
92407
92407
|
const sections = extractSections((() => {
|
|
92408
92408
|
try {
|
|
92409
|
-
return
|
|
92409
|
+
return syncFs.readFileSync(opened.fd, "utf-8");
|
|
92410
92410
|
} finally {
|
|
92411
|
-
|
|
92411
|
+
syncFs.closeSync(opened.fd);
|
|
92412
92412
|
}
|
|
92413
92413
|
})(), ["Session Startup", "Red Lines"]);
|
|
92414
92414
|
if (sections.length === 0) return "";
|
|
@@ -94040,14 +94040,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
94040
94040
|
if (!apiKeyInfo.apiKey) {
|
|
94041
94041
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
94042
94042
|
} else if (model.provider === "github-copilot") {
|
|
94043
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
94043
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-BJeEWDJb.js").then((n) => n.n);
|
|
94044
94044
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
94045
94045
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
94046
94046
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
94047
94047
|
} catch (err) {
|
|
94048
94048
|
return fail(describeUnknownError(err));
|
|
94049
94049
|
}
|
|
94050
|
-
await fs
|
|
94050
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
94051
94051
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
94052
94052
|
const sandbox = await resolveSandboxContext({
|
|
94053
94053
|
config: params.config,
|
|
@@ -94056,7 +94056,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
94056
94056
|
workspaceLane: params.workspaceLane
|
|
94057
94057
|
});
|
|
94058
94058
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
94059
|
-
await fs
|
|
94059
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
94060
94060
|
let restoreSkillEnv;
|
|
94061
94061
|
const releaseWorkspaceCwd = acquireWorkspaceCwd(effectiveWorkspace);
|
|
94062
94062
|
try {
|
|
@@ -95434,7 +95434,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
95434
95434
|
* Throws if the connection is not open.
|
|
95435
95435
|
*/
|
|
95436
95436
|
send(event) {
|
|
95437
|
-
if (!this.ws || this.ws.readyState !== WebSocket
|
|
95437
|
+
if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
|
|
95438
95438
|
this.ws.send(JSON.stringify(event));
|
|
95439
95439
|
}
|
|
95440
95440
|
/**
|
|
@@ -95451,7 +95451,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
95451
95451
|
* Returns true if the WebSocket is currently open and ready to send.
|
|
95452
95452
|
*/
|
|
95453
95453
|
isConnected() {
|
|
95454
|
-
return this.ws !== null && this.ws.readyState === WebSocket
|
|
95454
|
+
return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
|
|
95455
95455
|
}
|
|
95456
95456
|
/**
|
|
95457
95457
|
* Permanently closes the WebSocket connection and disables auto-reconnect.
|
|
@@ -95461,7 +95461,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
95461
95461
|
this._cancelRetryTimer();
|
|
95462
95462
|
if (this.ws) {
|
|
95463
95463
|
this.ws.removeAllListeners();
|
|
95464
|
-
if (this.ws.readyState === WebSocket
|
|
95464
|
+
if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
|
|
95465
95465
|
this.ws = null;
|
|
95466
95466
|
}
|
|
95467
95467
|
}
|
|
@@ -95471,7 +95471,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
|
|
|
95471
95471
|
reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
|
|
95472
95472
|
return;
|
|
95473
95473
|
}
|
|
95474
|
-
const socket = new WebSocket
|
|
95474
|
+
const socket = new WebSocket(this.wsUrl, { headers: {
|
|
95475
95475
|
Authorization: `Bearer ${this.apiKey}`,
|
|
95476
95476
|
"OpenAI-Beta": "responses-websocket=v1"
|
|
95477
95477
|
} });
|
|
@@ -100492,7 +100492,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
100492
100492
|
let embeddedAttemptBegun = false;
|
|
100493
100493
|
const runAbortController = new AbortController();
|
|
100494
100494
|
log$51.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
|
|
100495
|
-
await fs
|
|
100495
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
100496
100496
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
100497
100497
|
const toolSessionKey = params.toolSessionKey?.trim() || sandboxSessionKey;
|
|
100498
100498
|
const sandbox = params.skipSandbox ? null : await resolveSandboxContext({
|
|
@@ -100502,7 +100502,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
100502
100502
|
workspaceLane: params.workspaceLane
|
|
100503
100503
|
});
|
|
100504
100504
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
100505
|
-
await fs
|
|
100505
|
+
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
100506
100506
|
let restoreSkillEnv;
|
|
100507
100507
|
const releaseWorkspaceCwd = params.skipCwdChange ? void 0 : acquireWorkspaceCwd(effectiveWorkspace);
|
|
100508
100508
|
const rawToolResultStash = openRawToolResultStash(params.sessionId);
|
|
@@ -102179,7 +102179,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
102179
102179
|
await copilotTokenState.refreshInFlight;
|
|
102180
102180
|
return;
|
|
102181
102181
|
}
|
|
102182
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
102182
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-BJeEWDJb.js").then((n) => n.n);
|
|
102183
102183
|
copilotTokenState.refreshInFlight = (async () => {
|
|
102184
102184
|
const githubToken = copilotTokenState.githubToken.trim();
|
|
102185
102185
|
if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
|
|
@@ -102271,7 +102271,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
102271
102271
|
return;
|
|
102272
102272
|
}
|
|
102273
102273
|
if (model.provider === "github-copilot") {
|
|
102274
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
102274
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-BJeEWDJb.js").then((n) => n.n);
|
|
102275
102275
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
102276
102276
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
102277
102277
|
if (copilotTokenState) {
|
|
@@ -102393,7 +102393,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
102393
102393
|
const copilotAuthRetry = authRetryPending;
|
|
102394
102394
|
authRetryPending = false;
|
|
102395
102395
|
attemptedThinking.add(thinkLevel);
|
|
102396
|
-
await fs
|
|
102396
|
+
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
102397
102397
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
102398
102398
|
const attempt = await runEmbeddedAttempt({
|
|
102399
102399
|
sessionId: params.sessionId,
|