wednesdayai 0.5.1-dev.21 → 0.5.1-dev.23
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/{acp-cli-BmhbACSZ.js → acp-cli-D7pT9Bao.js} +2 -2
- package/dist/{acp-cli-Dblp7m2Z.js → acp-cli-DFqeyWQJ.js} +2 -2
- package/dist/{agent-scope-CeLIuOpq.js → agent-scope-DCgndASv.js} +3 -3
- package/dist/{agent-turn-enqueue-IiwTs8II.js → agent-turn-enqueue-B30hT0x-.js} +5 -5
- package/dist/{agent-turn-enqueue-DK8QApSV.js → agent-turn-enqueue-CI-A0Cuo.js} +5 -5
- package/dist/{agent-turn-execute-3cc3W1hp.js → agent-turn-execute-CFwfJKy2.js} +39 -37
- package/dist/{agent-turn-recovery-adapter-BkoX8bcd.js → agent-turn-recovery-adapter-DWGzJ2s-.js} +1 -1
- package/dist/{agent-turn-recovery-adapter-B909sIMD.js → agent-turn-recovery-adapter-TKOtg3bA.js} +1 -1
- package/dist/{agent-turn-runner-DUKUxZcn.js → agent-turn-runner-12Exv9CB.js} +1 -1
- package/dist/{agent-turn-runner-C3Buntbu.js → agent-turn-runner-Btk5sBH0.js} +1 -1
- package/dist/{agent-turn-runner-BglHs_p0.js → agent-turn-runner-CpsTt9uv.js} +6 -6
- package/dist/{agent-turn-runner-BTBy1i8Z.js → agent-turn-runner-XPJ75h7l.js} +4 -4
- package/dist/{agents-DJ_ssbNO.js → agents-BcHFvOHE.js} +6 -6
- package/dist/{agents.config-D-yD07v8.js → agents.config-C_4HsmOy.js} +1 -1
- package/dist/{agents.config-BcBusEWj.js → agents.config-DwW88u5f.js} +1 -1
- package/dist/{api-key-rotation-DQY1fynd.js → api-key-rotation-dv2YbGr8.js} +2 -2
- package/dist/{audio-preflight-DMq3PMsW.js → audio-preflight-Cv1eSuSU.js} +6 -6
- package/dist/{audio-preflight-DZdCHEnu.js → audio-preflight-DGyrDCsN.js} +7 -7
- package/dist/{audio-preflight-C0VnQEEN.js → audio-preflight-DKR8c6Qw.js} +7 -7
- package/dist/{audio-preflight-BTQmKMCZ.js → audio-preflight-DnuyzcBj.js} +29 -29
- package/dist/{audio-transcription-runner-C_DRSo6Z.js → audio-transcription-runner-BnmmtXUh.js} +1 -1
- package/dist/{audio-transcription-runner-C9Ld3zXw.js → audio-transcription-runner-CRxHRlMX.js} +1 -1
- package/dist/{audio-transcription-runner-BeC-knyy.js → audio-transcription-runner-DZa96tEn.js} +26 -26
- package/dist/{audio-transcription-runner-9GXPmTBK.js → audio-transcription-runner-DsqwKJ49.js} +1 -1
- package/dist/{audit-CmZAI3_9.js → audit-Dk69ufby.js} +6 -6
- package/dist/{audit-CH1D3iBG.js → audit-DkY9yUsn.js} +6 -6
- package/dist/{auth-choice-dWGUA_8g.js → auth-choice-BkWEr-Pe.js} +2 -2
- package/dist/{auth-choice-CEOnAk7f.js → auth-choice-kkL-bZp9.js} +2 -2
- package/dist/{banner-DWHiEk1H.js → banner-DOesQn79.js} +1 -1
- package/dist/{browser-cli-CfoUYSxy.js → browser-cli-Cy6LJQhv.js} +3 -3
- package/dist/{browser-cli-P7SKIutx.js → browser-cli-Mbn8pYZZ.js} +3 -3
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +60 -60
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-journal/handler.js +60 -60
- package/dist/bundled/session-memory/handler.js +60 -60
- package/dist/{call-xB0MOQUF.js → call-B1surxJJ.js} +3 -1
- package/dist/{call-CUY8VoHh.js → call-CsmPnXmY.js} +3 -1
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-DoBHFita.js → channel-activity-Kn1_ykXE.js} +3 -3
- package/dist/{channel-options-DCKEbe7Z.js → channel-options-Am9ZvwKB.js} +1 -1
- package/dist/{channel-options-DfjYj7oi.js → channel-options-TBxP7o5K.js} +1 -1
- package/dist/{channels-cli-DrcS29Pk.js → channels-cli-3ihKjjtq.js} +33 -33
- package/dist/{channels-cli-DHvavLcJ.js → channels-cli-CGWblqhQ.js} +32 -32
- package/dist/{chat-content-hesA0q3j.js → chat-content-B_nVIplC.js} +4 -4
- package/dist/{chat-content-BZeW5ciD.js → chat-content-C7_U4hJq.js} +34 -34
- package/dist/{chrome-DZ6ejAmp.js → chrome-Bukcguhv.js} +23 -23
- package/dist/{chrome-C2xK35m5.js → chrome-DNh94Pjx.js} +8 -8
- package/dist/{chunk-DOckmOyp.js → chunk-CEygNI3g.js} +3 -3
- package/dist/{clawbot-cli-CLz6KuWz.js → clawbot-cli-BRicu1s1.js} +5 -5
- package/dist/{clawbot-cli-CzDwX-gU.js → clawbot-cli-Be313PY0.js} +5 -5
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/{cli-D2tBPn1z.js → cli-BFoMFw-E.js} +28 -28
- package/dist/{cli-DBqTAu56.js → cli-BcIWokUA.js} +29 -29
- package/dist/{client-CIDXfGgo.js → client-DA6hPHoC.js} +4 -1
- package/dist/{client-BCYzc-y7.js → client-MNdGt1bC.js} +4 -1
- package/dist/{client-profiles-BaJqyqVb.js → client-profiles-BkQpgWwd.js} +1 -1
- package/dist/{client-profiles-DGW7rrdk.js → client-profiles-CZqoxT_J.js} +1 -1
- package/dist/{command-queue-uNIrlK4C.js → command-queue-BiT79iw_.js} +1 -1
- package/dist/{command-queue-3hrr088f.js → command-queue-C4uOOl0Z.js} +1 -1
- package/dist/{command-queue-D360YW1L.js → command-queue-Cd0AajLX.js} +1 -1
- package/dist/{command-queue-D2t-RCzv.js → command-queue-DnPEEtOJ.js} +1 -1
- package/dist/{command-registry-DuGYq06B.js → command-registry-CKhdmVgi.js} +13 -13
- package/dist/{command-secret-targets-DAtwJ6C7.js → command-secret-targets-9z88Sdd9.js} +2 -2
- package/dist/{command-secret-targets-j8KBmpix.js → command-secret-targets-r25GrCux.js} +2 -2
- package/dist/{commands-registry-CZGO6Zk0.js → commands-registry-Cof4HjvY.js} +2 -2
- package/dist/{completion-cli-BmLGd23K.js → completion-cli-DCm06gIy.js} +2 -2
- package/dist/{completion-cli-DuJJOsOD.js → completion-cli-DPC7jSts.js} +1 -1
- package/dist/{config-cli-DmPS8dHv.js → config-cli-DSSYHC1h.js} +1 -1
- package/dist/{config-cli-D7Km0W0t.js → config-cli-DzKCSgly.js} +1 -1
- package/dist/{configure-Cv8WHggj.js → configure-c7eXMXPC.js} +6 -6
- package/dist/{configure-Dp_BDe0p.js → configure-ev80kp3h.js} +6 -6
- package/dist/contracts/gateway-protocol.schema.json +23 -0
- package/dist/control-ui/assets/{dreams-5cpOLdgU.js → dreams-CFX8_iO7.js} +2 -2
- package/dist/control-ui/assets/{dreams-5cpOLdgU.js.map → dreams-CFX8_iO7.js.map} +1 -1
- package/dist/control-ui/assets/{index-D6XwnS7I.js → index-CambJeDO.js} +4 -4
- package/dist/control-ui/assets/{index-D6XwnS7I.js.map → index-CambJeDO.js.map} +1 -1
- package/dist/control-ui/assets/{learning-BORaiTQ4.js → learning-XJj58fEK.js} +2 -2
- package/dist/control-ui/assets/{learning-BORaiTQ4.js.map → learning-XJj58fEK.js.map} +1 -1
- package/dist/control-ui/assets/{view-chat-ByDyhnLw.js → view-chat-DCakYJRB.js} +3 -3
- package/dist/control-ui/assets/{view-chat-ByDyhnLw.js.map → view-chat-DCakYJRB.js.map} +1 -1
- package/dist/control-ui/index.html +1 -1
- package/dist/{cron-cli-DcatymNM.js → cron-cli-B7av_Qj-.js} +3 -3
- package/dist/{cron-cli-Bxd1ztzh.js → cron-cli-D-MXQLbx.js} +3 -3
- package/dist/{daemon-cli-P_665VBl.js → daemon-cli-C0X7BA3B.js} +2 -2
- package/dist/{daemon-cli-sdDY3Rkr.js → daemon-cli-D-zUFs16.js} +2 -2
- package/dist/daemon-cli.js +5 -0
- package/dist/{deliver-BGZedjpd.js → deliver-CD-qJ08p.js} +7 -5
- package/dist/{deliver-C0DKFL-c.js → deliver-CpY1AlyA.js} +29 -29
- package/dist/{deliver-Lga2gynK.js → deliver-Czj8jts5.js} +5 -5
- package/dist/{deliver-6pCupDgE.js → deliver-D3zKg0i3.js} +4 -4
- package/dist/{devices-cli-5NqagsuD.js → devices-cli-Bx1kF97H.js} +2 -2
- package/dist/{devices-cli-D6FG7yBy.js → devices-cli-D55ggw6F.js} +2 -2
- package/dist/{diagnostic-DBospa-B.js → diagnostic-Bu6Kxc66.js} +1 -1
- package/dist/{diagnostic-CdJb6i0b.js → diagnostic-BzGocbak.js} +1 -1
- package/dist/{diagnostic-uYRm3RAs.js → diagnostic-CKFgwhkU.js} +5 -5
- package/dist/{diagnostic-BP20aK6Y.js → diagnostic-CWdhJ9KR.js} +1 -1
- package/dist/{dm-policy-shared-C8iB_a-f.js → dm-policy-shared-JZebmiY8.js} +1 -1
- package/dist/{doctor-completion-BtJqYgVS.js → doctor-completion-Bx2Vu53y.js} +1 -1
- package/dist/{doctor-completion-Br2pHonN.js → doctor-completion-C1c_Fm0b.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/{errors-83K08uTq.js → errors-COs_vQr3.js} +1 -1
- package/dist/{exec-approvals-cli-DzJlH70p.js → exec-approvals-cli-RX2L6dhB.js} +4 -4
- package/dist/{exec-approvals-cli-D61d8hgT.js → exec-approvals-cli-U1avv2dD.js} +4 -4
- package/dist/extensionAPI.js +16 -16
- package/dist/{fetch-fObya4WR.js → fetch-B1ohBh6A.js} +8 -8
- package/dist/{fetch-guard-BucfWGi8.js → fetch-guard-BXzVwvnJ.js} +3 -3
- package/dist/{frontmatter-IfoWyoLV.js → frontmatter-Cw_6jMAR.js} +5 -5
- package/dist/{fs-safe-joAzTKB9.js → fs-safe-BK5ALzKD.js} +26 -26
- package/dist/{gateway-cli-BZFHtE2A.js → gateway-cli-CrFsVy3G.js} +53 -50
- package/dist/{gateway-cli-CzrTOBz5.js → gateway-cli-rJFjYA1c.js} +54 -51
- package/dist/{gateway-rpc-D36kXOsx.js → gateway-rpc-BArMTxJU.js} +1 -1
- package/dist/{gateway-rpc-hfUfa0T-.js → gateway-rpc-k1CUY-d7.js} +1 -1
- package/dist/github-copilot-token-DYYKoDuV.js +106 -0
- package/dist/{health-CVUuZRpQ.js → health-DjlQU_Tv.js} +4 -4
- package/dist/{health-K3ylOag4.js → health-jZPF8weC.js} +4 -4
- package/dist/{hooks-cli-CNlH_Ckf.js → hooks-cli-CVygK2yq.js} +30 -30
- package/dist/{hooks-cli-BTxvzxSG.js → hooks-cli-b4k2GboY.js} +29 -29
- package/dist/{image-ops-DlAa1zGf.js → image-ops-C-5VgbLB.js} +1 -1
- package/dist/index.js +32 -32
- package/dist/{ir-Cs9qeaeL.js → ir-DioI2VyB.js} +5 -5
- package/dist/{legacy-names-Dh4RlQMQ.js → legacy-names-CghFcfry.js} +1 -1
- package/dist/llm-slug-generator.js +60 -60
- package/dist/{logger-vVASmiVr.js → logger-J4xjy-6D.js} +1 -1
- package/dist/{logs-cli-ZXfvpQn5.js → logs-cli-BeLB-Xck.js} +3 -3
- package/dist/{logs-cli-DwpuZXwp.js → logs-cli-CvF3EIE2.js} +3 -3
- package/dist/{manager-CTeCpzGz.js → manager-D728Thsn.js} +18 -18
- package/dist/{manager-CsTeZuhu.js → manager-DCXdygsq.js} +1 -1
- package/dist/{manager-d_jLZwIa.js → manager-gw84UdyQ.js} +1 -1
- package/dist/{markdown-tables-BQLg3bjX.js → markdown-tables-DfLMw9ti.js} +2 -2
- package/dist/{memory-cli-C6IsfNdf.js → memory-cli-BcjjHcwL.js} +2 -2
- package/dist/{memory-cli-Dm4vpHAU.js → memory-cli-H4nCh_8v.js} +2 -2
- package/dist/{model-selection-UX4A5pdj.js → model-selection-BHGpQSa9.js} +87 -87
- package/dist/{models-FSASF0m5.js → models-BBZ_Tvpf.js} +3 -3
- package/dist/{models-cli-CqhUy9E-.js → models-cli-7V9N158Z.js} +30 -30
- package/dist/{models-cli-BIWkA9C9.js → models-cli-BJK0d_IM.js} +28 -28
- package/dist/{models-config-CNw9rdH1.js → models-config-CJUMccZW.js} +2 -2
- package/dist/{node-cli-BsB2z4rN.js → node-cli-BUV9i73l.js} +4 -4
- package/dist/{node-cli-DFxjiUT-.js → node-cli-DEVZws2K.js} +4 -4
- package/dist/{node-command-policy-BG0trkgo.js → node-command-policy-C0OmboTh.js} +1 -1
- package/dist/{node-command-policy-CVGtgIFJ.js → node-command-policy-Dbm2r7IP.js} +1 -1
- package/dist/{nodes-cli-BbRJxfod.js → nodes-cli-CYpc3Yvq.js} +3 -3
- package/dist/{nodes-cli-Cos0b-Pr.js → nodes-cli-Chp9WqRe.js} +3 -3
- package/dist/{npm-resolution-CwoZ0zIw.js → npm-resolution-BNpY_aOs.js} +1 -1
- package/dist/{npm-resolution-BKhZg_qE.js → npm-resolution-DaXE7ULy.js} +1 -1
- package/dist/{onboard-Bhpqg04u.js → onboard-BOhVuXUR.js} +3 -3
- package/dist/{onboard-qzS9Ex3E.js → onboard-C-KqZZqX.js} +3 -3
- package/dist/{onboard-channels-CdETO6vp.js → onboard-channels-B89jrN2Y.js} +2 -2
- package/dist/{onboard-channels-DqqM-gZ4.js → onboard-channels-DmJGOEPI.js} +2 -2
- package/dist/{onboard-helpers-CyLVkn7p.js → onboard-helpers-BHTSdqFW.js} +1 -1
- package/dist/{onboard-helpers-BjlBFVLF.js → onboard-helpers-DFWV67fv.js} +1 -1
- package/dist/{onboard-remote-BoobabMS.js → onboard-remote-BL2_Vzie.js} +1 -1
- package/dist/{onboard-remote-CGfCa4Gn.js → onboard-remote-aFlQukcN.js} +1 -1
- package/dist/{onboard-skills-qXATWBbv.js → onboard-skills-DBsUD_Fs.js} +1 -1
- package/dist/{onboard-skills-CA3vVftf.js → onboard-skills-fb0X7sb5.js} +1 -1
- package/dist/{onboarding-9F7Zrfos.js → onboarding-C6Xs7G9Y.js} +7 -7
- package/dist/{onboarding-B0tWDl2D.js → onboarding-DjYLPv7p.js} +7 -7
- package/dist/{onboarding.finalize-D-GEVbwy.js → onboarding.finalize-BzPTRheS.js} +35 -35
- package/dist/{onboarding.finalize-DZaf33cl.js → onboarding.finalize-Sx0H879S.js} +33 -33
- package/dist/{onboarding.gateway-config-D2JKnTD-.js → onboarding.gateway-config-CkoaBZS4.js} +5 -5
- package/dist/{onboarding.gateway-config-BjNFm5qL.js → onboarding.gateway-config-DFk1lZ7k.js} +5 -5
- package/dist/{operator-commands-Cak1KHXQ.js → operator-commands-CMLC3NdV.js} +2 -2
- package/dist/{operator-commands-QumqWQQg.js → operator-commands-DWyDwJ5E.js} +2 -2
- package/dist/{outbound-attachment-CFHAAdf4.js → outbound-attachment-DtVXUXnX.js} +2 -2
- package/dist/{outbound-message-hooks-DD51nZnK.js → outbound-message-hooks-8LGAoYF_.js} +1 -1
- package/dist/{outbound-message-hooks-ZPwBUN_R.js → outbound-message-hooks-CsYq3_vL.js} +1 -1
- package/dist/{outbound-message-hooks-WWLXsRwc.js → outbound-message-hooks-DUHpZ2aL.js} +5 -5
- package/dist/{outbound-message-hooks-DC75UHT4.js → outbound-message-hooks-tjGZZOYq.js} +1 -1
- package/dist/{path-alias-guards-BzCkdlOk.js → path-alias-guards-E9ntDORB.js} +1 -1
- package/dist/paths-BIDPYPVC.js +233 -0
- package/dist/{pi-embedded-BSXEJok2.js → pi-embedded--18wTN8q.js} +279 -272
- package/dist/{pi-embedded-helpers-D7uD-CgK.js → pi-embedded-helpers-Brv2iTWi.js} +2 -2
- package/dist/{pi-embedded-helpers-StwgdB31.js → pi-embedded-helpers-ClJpdsSV.js} +2 -2
- package/dist/{pi-embedded-recovery-adapter-D7px7ESy.js → pi-embedded-recovery-adapter-BEKLsxLt.js} +10 -10
- package/dist/{pi-embedded-recovery-adapter-CfgLn9QF.js → pi-embedded-recovery-adapter-dQZ-gtY4.js} +10 -10
- package/dist/{pi-embedded-utils-DjVnTKKi.js → pi-embedded-utils-C-FQE63E.js} +1 -1
- package/dist/{pi-embedded-utils-BjqdCUkA.js → pi-embedded-utils-C7ErjdjF.js} +3 -3
- package/dist/{pi-embedded-utils-B8Raycd6.js → pi-embedded-utils-CKxA8dqZ.js} +1 -1
- package/dist/{pi-embedded-utils-CR3tST8r.js → pi-embedded-utils-D7vaAoE6.js} +1 -1
- package/dist/{pi-embedded-BhsFkp5Y.js → pi-embedded-vIZchQTO.js} +42 -35
- package/dist/{pi-model-discovery-CQdUMRm4.js → pi-model-discovery-BaH_6win.js} +7 -7
- package/dist/{pi-tools.policy-DXLQHQAj.js → pi-tools.policy-BSgFR5ag.js} +1 -1
- package/dist/{plugin-registry-DH7Hnw6l.js → plugin-registry-CDj1s2Qo.js} +1 -1
- package/dist/{plugin-registry-DgIkh9ii.js → plugin-registry-CmiGMpCp.js} +1 -1
- package/dist/plugin-sdk/{agent-turn-execute-CW7LtXMC.js → agent-turn-execute-DRGUpyj_.js} +15 -15
- package/dist/plugin-sdk/{agent-turn-execute-BxdAt_ht.js → agent-turn-execute-vNMPaEsb.js} +15 -15
- package/dist/plugin-sdk/{agent-turn-runner-orbrCxRO.js → agent-turn-runner-B48Ac2Mq.js} +5 -5
- package/dist/plugin-sdk/{agent-turn-runner-sOn9sAG9.js → agent-turn-runner-CJ061NAh.js} +4 -4
- package/dist/plugin-sdk/{agent-turn-runner-CRaNFFTm.js → agent-turn-runner-xP1KK6u-.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-CBBGdhe1.js → audio-preflight-BDZ7cLko.js} +5 -5
- package/dist/plugin-sdk/{audio-preflight-BZXIHlnM.js → audio-preflight-COb5kXAH.js} +6 -6
- package/dist/plugin-sdk/{audio-preflight-CNU5kpWj.js → audio-preflight-DpIgQPUE.js} +1 -1
- package/dist/plugin-sdk/{audio-transcription-runner-D5dYI82C.js → audio-transcription-runner-DqbgqKuA.js} +1 -1
- package/dist/plugin-sdk/{audio-transcription-runner-D8y2D8k8.js → audio-transcription-runner-tMxFDdPy.js} +1 -1
- package/dist/plugin-sdk/{chat-content-DB5Wz2lG.js → chat-content-B4kExRGx.js} +1 -1
- package/dist/plugin-sdk/{chat-content-aOAkouil.js → chat-content-CmG6uniC.js} +1 -1
- package/dist/plugin-sdk/{command-detection-AlAuh3r9.js → command-detection-Cx5GspTs.js} +37 -30
- package/dist/plugin-sdk/{command-queue-JvIhb__x.js → command-queue-BrpT-5Sy.js} +1 -1
- package/dist/plugin-sdk/{command-queue-J8WWtdem.js → command-queue-mdn12mZN.js} +2 -2
- package/dist/plugin-sdk/{command-queue-DMJXMFU-.js → command-queue-uRF0EuVO.js} +1 -1
- package/dist/plugin-sdk/{deliver-D77qfyGv.js → deliver-CckI3OJ8.js} +4 -4
- package/dist/plugin-sdk/{deliver-46BXvvk5.js → deliver-D3X61EfY.js} +4 -4
- package/dist/plugin-sdk/{deliver-tcGRRL8s.js → deliver-DOj7WTIw.js} +5 -5
- package/dist/plugin-sdk/{deliver-BOyf6UPp.js → deliver-qMYtKe1O.js} +5 -5
- package/dist/plugin-sdk/{diagnostic-DVk1j05H.js → diagnostic-BQhPQdFK.js} +1 -1
- package/dist/plugin-sdk/{diagnostic-C-BgFx1S.js → diagnostic-CcNUspD1.js} +1 -1
- package/dist/plugin-sdk/{diagnostic-CLyicI69.js → diagnostic-I0XYqjlG.js} +1 -1
- package/dist/plugin-sdk/index.js +16 -16
- package/dist/plugin-sdk/{monitor-D9AzoNHs.js → monitor-CjGR673h.js} +36 -29
- package/dist/plugin-sdk/{pi-embedded-utils-Bj86frFf.js → pi-embedded-utils-BeDAZIRN.js} +1 -1
- package/dist/plugin-sdk/{pi-embedded-utils-gWjx_FJu.js → pi-embedded-utils-CXRILg4X.js} +1 -1
- package/dist/plugin-sdk/{provider-dispatcher-BkgqrySb.js → provider-dispatcher-CaEeja4a.js} +15 -15
- package/dist/plugin-sdk/{provider-dispatcher-RG1EJhMg.js → provider-dispatcher-CwOOkcSh.js} +15 -15
- package/dist/plugin-sdk/{provider-image-CK8PByo3.js → provider-image-1--b__Rf.js} +1 -1
- package/dist/plugin-sdk/{provider-image-BRuhIUH4.js → provider-image-CWR1baFo.js} +4 -4
- package/dist/plugin-sdk/{provider-image-BsvAEUj7.js → provider-image-D3L7uRQL.js} +4 -4
- package/dist/plugin-sdk/{provider-image-BRiO1hJO.js → provider-image-DfMOZvCj.js} +1 -1
- package/dist/plugin-sdk/{replies-CNJcNn1X.js → replies-Bvgbr4Gl.js} +2 -2
- package/dist/plugin-sdk/{replies-CmfWsSdE.js → replies-DpAL4lju.js} +2 -2
- package/dist/plugin-sdk/{replies-Diq1jozB.js → replies-K0SP92k3.js} +3 -3
- package/dist/plugin-sdk/{replies-3-6UUC2y.js → replies-S7-hIwEu.js} +3 -3
- package/dist/plugin-sdk/{reply-directives-C_nV536z.js → reply-directives-3w5Sb0-K.js} +1 -1
- package/dist/plugin-sdk/{reply-directives--THCb2vc.js → reply-directives-CCmYO5TU.js} +1 -1
- package/dist/plugin-sdk/{runs-CmbFSwOD.js → runs-Bh-TSTul.js} +6 -6
- package/dist/plugin-sdk/{runs-nP6hONs2.js → runs-Ciq2OtzT.js} +5 -5
- package/dist/plugin-sdk/{runs-Cu-M6Lh7.js → runs-DgLRRHnl.js} +6 -6
- package/dist/plugin-sdk/{runs-BU1Eppml.js → runs-lzwgSAQQ.js} +5 -5
- package/dist/plugin-sdk/{send-LkmFhgsK.js → send-4L6l04nt.js} +2 -2
- package/dist/plugin-sdk/{send-D7UktRfh.js → send-DKVsq9M4.js} +1 -1
- package/dist/plugin-sdk/{send-C2QGhDII.js → send-RnIEnr9s.js} +2 -2
- package/dist/plugin-sdk/{send-aiyKj-5V.js → send-T7FFZ4GT.js} +1 -1
- package/dist/plugin-sdk/{session-context-DLi5r0L8.js → session-context-Ct8StxcQ.js} +1 -1
- package/dist/plugin-sdk/{session-context-D79uWb-f.js → session-context-DLVW1kjd.js} +1 -1
- package/dist/plugin-sdk/{session-meta-DwqjC-No.js → session-meta-CjpVFrUg.js} +1 -1
- package/dist/plugin-sdk/{sessions-D9WFZu21.js → sessions-55u1Rz4h.js} +1 -0
- package/dist/plugin-sdk/{sessions-CmLCbwdv.js → sessions-DgJUTr39.js} +1 -0
- package/dist/plugin-sdk/src/agents/tool-display-common.d.ts +10 -0
- package/dist/plugin-sdk/src/gateway/protocol/index.d.ts +3 -0
- package/dist/plugin-sdk/src/gateway/protocol/schema/protocol-schemas.d.ts +6 -0
- package/dist/plugin-sdk/src/gateway/protocol/schema/sessions.d.ts +6 -0
- package/dist/plugin-sdk/src/gateway/protocol/schema/types.d.ts +2 -0
- package/dist/plugin-sdk/src/gateway/session-utils.types.d.ts +2 -0
- package/dist/plugin-sdk/src/shared/session-visibility.d.ts +1 -1
- package/dist/plugin-sdk/src/tts/tts.d.ts +2 -0
- package/dist/plugin-sdk/{subagent-registry-D-9HI-_X.js → subagent-registry-CfMU3EOY.js} +15 -15
- package/dist/plugin-sdk/{subagent-registry-CuACJDRa.js → subagent-registry-n7onkQYC.js} +15 -15
- package/dist/plugin-sdk/testing.js +15 -15
- package/dist/{plugins-cli-D2epBFli.js → plugins-cli-BfVyfDVB.js} +30 -30
- package/dist/{plugins-cli-YMB3dwun.js → plugins-cli-RYPupoUU.js} +29 -29
- package/dist/{program-context-C0OAcdai.js → program-context-Bd6intne.js} +37 -37
- package/dist/{program-DhncJMbr.js → program-vHNIwjM_.js} +35 -35
- package/dist/{prompt-select-styled-pBLBu3w7.js → prompt-select-styled-BwIQiRks.js} +11 -11
- package/dist/{prompt-select-styled-B0HZWrVy.js → prompt-select-styled-CvmUNFDK.js} +11 -11
- package/dist/{provider-image-CApPjEsW.js → provider-image-BvBYtGGJ.js} +1 -1
- package/dist/{provider-image-D2FrDW-X.js → provider-image-DVTuOv92.js} +6 -6
- package/dist/{provider-image-CAWS0JMV.js → provider-image-KmAZWQje.js} +1 -1
- package/dist/{provider-image-B-KFl1me.js → provider-image-n0L8CIDm.js} +1 -1
- package/dist/{proxy-CPi-EHQf.js → proxy-CrSpy5Aw.js} +1 -1
- package/dist/{proxy-env-1eta-137.js → proxy-env-BxR4m86L.js} +1 -1
- package/dist/{proxy-fetch-SAeVJOzX.js → proxy-fetch-g109vqdt.js} +1 -1
- package/dist/{push-apns-BAZsfMOy.js → push-apns--0fj47Qj.js} +2 -2
- package/dist/{push-apns-PAONdNH4.js → push-apns-Cb0sjE90.js} +2 -2
- package/dist/{pw-ai-DtPiMDW2.js → pw-ai-BJiiE3V8.js} +1 -1
- package/dist/{pw-ai-Czj8Ud3z.js → pw-ai-CC8qsp4R.js} +1 -1
- package/dist/{pw-ai-D9Y__zb9.js → pw-ai-CNTt9O_x.js} +14 -14
- package/dist/{pw-ai-BZjpW2LJ.js → pw-ai-DMPGyJxJ.js} +1 -1
- package/dist/{qmd-manager-C0SNPJNQ.js → qmd-manager-CU9iEql0.js} +12 -12
- package/dist/{qr-cli-DAghVVtT.js → qr-cli-B1vszJrL.js} +3 -3
- package/dist/{qr-cli-C8WFS-12.js → qr-cli-BZy4AXuc.js} +3 -3
- package/dist/{query-expansion-lPFsJzxE.js → query-expansion-B_2rETEo.js} +13 -13
- package/dist/{recorder-Dtl7MFGH.js → recorder-Clg9Kbqu.js} +2 -2
- package/dist/{recovery-adapter-CZUNVpQO.js → recovery-adapter-D3YllPfB.js} +2 -2
- package/dist/{recovery-adapter-CRSPS8I2.js → recovery-adapter-Dyk72MfJ.js} +2 -2
- package/dist/{recovery-adapter-BSdwo2OS.js → recovery-adapter-Hdhf6HDW.js} +1 -1
- package/dist/{recovery-adapter-BpJ8BscF.js → recovery-adapter-y0rKMaw8.js} +1 -1
- package/dist/{redact-Da2jd8m8.js → redact-DpE5Tg36.js} +1 -1
- package/dist/{register.agent-FDTmtEUr.js → register.agent-CgPP5ADX.js} +31 -31
- package/dist/{register.agent-C4f6rhJo.js → register.agent-DfScK2hV.js} +33 -33
- package/dist/{register.configure-Dv5O2Xb5.js → register.configure-C8uYH0Yy.js} +35 -35
- package/dist/{register.configure-Hw_sXK-z.js → register.configure-dflFJ7N_.js} +34 -34
- package/dist/{register.maintenance-D8jjjhHB.js → register.maintenance-DYrx2td9.js} +35 -35
- package/dist/{register.maintenance-DK1PJ9oQ.js → register.maintenance-DplgYMC9.js} +37 -37
- package/dist/{register.message-D2APO70t.js → register.message-BBQ6Wdt9.js} +29 -29
- package/dist/{register.message-GNpuxvGM.js → register.message-jvrIPxVV.js} +30 -30
- package/dist/{register.onboard-0G3JduCW.js → register.onboard-eC1JSQFQ.js} +6 -6
- package/dist/{register.onboard-DONtll3f.js → register.onboard-mi8eEWxH.js} +6 -6
- package/dist/{register.setup-Ru94mK0C.js → register.setup-DZYxFj5L.js} +6 -6
- package/dist/{register.setup-BhN2hAJ-.js → register.setup-F0XMwrOq.js} +6 -6
- package/dist/{register.status-health-sessions-cUGfN2jZ.js → register.status-health-sessions-B-IdUdif.js} +33 -33
- package/dist/{register.status-health-sessions-BugOGdEq.js → register.status-health-sessions-DbjCFLPT.js} +35 -35
- package/dist/{register.subclis-BXGoL8Qv.js → register.subclis-Dobk1vvB.js} +25 -25
- package/dist/{replies-qljs_NZI.js → replies-B7XXdKjN.js} +2 -2
- package/dist/{replies-DS1VGy4W.js → replies-BKdOqGC9.js} +5 -5
- package/dist/{replies-CHagfAgN.js → replies-DrGGa5se.js} +2 -2
- package/dist/{replies-BuO733xx.js → replies-gGgLXY8D.js} +2 -2
- package/dist/{reply-CqYQeNjd.js → reply-BSMDupOw.js} +38 -36
- package/dist/{reply-directives-CJoSirgd.js → reply-directives-Bz18fvJe.js} +1 -1
- package/dist/{reply-directives-DBZR0dTg.js → reply-directives-CtSqkSzr.js} +2 -2
- package/dist/{reply-directives-B9hX-LBz.js → reply-directives-bPMJNW1Q.js} +1 -1
- package/dist/{reply-directives-GcBlocvi.js → reply-directives-tE0PyBK-.js} +1 -1
- package/dist/{reply-prefix-DfeMrD4g.js → reply-prefix-C-DjHvQK.js} +1 -1
- package/dist/{resolve-route-CAuL1p_4.js → resolve-route-DKZiteo6.js} +5 -5
- package/dist/{rpc-DJ9VPO9A.js → rpc-BZtZb4-6.js} +1 -1
- package/dist/{rpc-BoZa3Ve8.js → rpc-Ft_DUdSG.js} +1 -1
- package/dist/{run-main-08KWAl9e.js → run-main-BJFVebkS.js} +44 -44
- package/dist/{runs-DRxbDl12.js → runs-BIt97Q-K.js} +9 -9
- package/dist/{runs-CoWBHyeo.js → runs-BUywHXga.js} +4 -4
- package/dist/{runs-vCw_F2ZO.js → runs-TPOj4wqX.js} +4 -4
- package/dist/{runs-yIaQUPae.js → runs-wDxw0TX4.js} +5 -5
- package/dist/{sandbox-BijP-jd2.js → sandbox-389fAlDt.js} +2 -2
- package/dist/{sandbox-Cf0p0qcn.js → sandbox-CEDb7iCz.js} +2 -2
- package/dist/{sandbox-cli-DFLg4dmY.js → sandbox-cli-BJ4Z1CEE.js} +6 -6
- package/dist/{sandbox-cli-B0TGsg0B.js → sandbox-cli-kfxS44rH.js} +6 -6
- package/dist/{secrets-cli-BoYG9Zi_.js → secrets-cli-CgpBwEA_.js} +3 -3
- package/dist/{secrets-cli-CL3R38dk.js → secrets-cli-DFuIPeQ8.js} +3 -3
- package/dist/{security-cli-BuOut78W.js → security-cli-bxcpjEyc.js} +8 -8
- package/dist/{security-cli-DFTi9A0s.js → security-cli-zcQ5Hc8L.js} +8 -8
- package/dist/{send-Bmp8wi9T.js → send-Bf4geLyV.js} +8 -8
- package/dist/{send-DRJrureq.js → send-Ch1ruPj9.js} +1 -1
- package/dist/{send-DFasc8l1.js → send-CsDSBjFo.js} +6 -6
- package/dist/{send-CtSLexxo.js → send-DBqe2mPq.js} +30 -30
- package/dist/{send-DFAmNsWX.js → send-DQvfLvpJ.js} +6 -6
- package/dist/{send-DSRl6F0O.js → send-bwKTbNlJ.js} +7 -7
- package/dist/{send-DxkjyjYg.js → send-cRef_6f-.js} +1 -1
- package/dist/{send-7pf6IvCv.js → send-xXKNMsLi.js} +1 -1
- package/dist/{server-CRI0-vWV.js → server-CggrpKmd.js} +4 -4
- package/dist/{server-ks1TmG7W.js → server-D7EeBwPd.js} +4 -4
- package/dist/{server-context-DgKj77jj.js → server-context-CV1udh3Y.js} +2 -2
- package/dist/{server-context-BIoSfzI_.js → server-context-Dv15RG_H.js} +2 -2
- package/dist/{server-lifecycle-fJG-u89x.js → server-lifecycle-BIH58Hoe.js} +1 -1
- package/dist/{server-lifecycle-Cd0b010a.js → server-lifecycle-D8mfFIYf.js} +1 -1
- package/dist/{server-node-events-Ba1YD79n.js → server-node-events-C_xoK9Xb.js} +29 -29
- package/dist/{server-node-events-CqQhTT1T.js → server-node-events-mxzClNCx.js} +30 -30
- package/dist/{session-meta-BlSJMcbU.js → session-meta-5XI6vLtM.js} +1 -1
- package/dist/{session-storage-B-ES9i1k.js → session-storage-269JGGQ0.js} +1 -1
- package/dist/{session-storage-7x9X6Db3.js → session-storage-BbpL12Su.js} +1 -1
- package/dist/{session-storage-owner-DLQ3vsAz.js → session-storage-owner-ClZPCWep.js} +2 -2
- package/dist/{session-storage-owner-1-cQlOCZ.js → session-storage-owner-M7vbUIWw.js} +2 -2
- package/dist/{session-utils-BeYzkx__.js → session-utils-Be7zx7oZ.js} +4 -2
- package/dist/{sessions-BIgPumZV.js → sessions-BV1UJJsg.js} +37 -11
- package/dist/{sessions-rMRfoN3f.js → sessions-CIWeBs1M.js} +1 -0
- package/dist/{sessions-9SvxsXWP.js → sessions-CLcDtAGY.js} +1 -0
- package/dist/{sessions-bZHjdfaW.js → sessions-C_dBu7XC.js} +6 -5
- package/dist/{sessions-CLXwtR8F.js → sessions-CpqHo_Lm.js} +37 -11
- package/dist/{sessions-B03PIf-m.js → sessions-D4geZIf4.js} +1 -0
- package/dist/{sessions-DvCgCqqN.js → sessions-DR_ebiSs.js} +2 -2
- package/dist/{sessions-claims-status-DMdo7H9e.js → sessions-claims-status-CCWxZ_uS.js} +2 -2
- package/dist/{sessions-claims-status-CJ4Z16C-.js → sessions-claims-status-DcgKqzSM.js} +2 -2
- package/dist/{skill-commands-RBvFNztU.js → skill-commands-CAOvM2sb.js} +8 -8
- package/dist/{skills-Dj2sTIvh.js → skills-VN1CJK6W.js} +21 -21
- package/dist/{status-D_sJaQfK.js → status-B8Al6FzI.js} +18 -18
- package/dist/{status-Ccz-BtS_.js → status-Cuo3rz1n.js} +18 -18
- package/dist/{store-WpdMrmch.js → store-HgGweM4u.js} +7 -7
- package/dist/{subsystem-D_zHSy02.js → subsystem-BZy3aWdW.js} +71 -71
- package/dist/{system-cli-BGa0j96s.js → system-cli-Ba9jGCiM.js} +3 -3
- package/dist/{system-cli-CnsRY21W.js → system-cli-DcjUJVa8.js} +3 -3
- package/dist/{tables--lm0TIoo.js → tables-DkwNUhx1.js} +1 -1
- package/dist/{task-pipeline-boot-BMwRQ8Fe.js → task-pipeline-boot-C1v58b1_.js} +30 -30
- package/dist/{task-pipeline-boot-D5tuNVHj.js → task-pipeline-boot-Kxi1hpUn.js} +29 -29
- package/dist/{task-runlog-retention-D0XabfJk.js → task-runlog-retention-BdLkqRCi.js} +3 -3
- package/dist/{task-runlog-retention-vP8bhD14.js → task-runlog-retention-CJeUxN8v.js} +3 -3
- package/dist/{tasks-DEye0RYH.js → tasks-BIqKTj4l.js} +2 -2
- package/dist/{tasks-DIa6KmEw.js → tasks-nrh4KjHH.js} +2 -2
- package/dist/{tokens-B3OPeQh5.js → tokens-PMai9bNL.js} +1 -1
- package/dist/{tool-loop-detection-ST5jhih3.js → tool-loop-detection-BqyMjpvr.js} +2 -2
- package/dist/{tui-YpVnb92B.js → tui-DC-J_38B.js} +3 -3
- package/dist/{tui-DvN9w3dz.js → tui-DrLsIQv0.js} +3 -3
- package/dist/{tui-cli-B9yDRbjk.js → tui-cli-CAtLTzIA.js} +7 -7
- package/dist/{tui-cli-DoocDTJG.js → tui-cli-De9rMj3R.js} +7 -7
- package/dist/{update-cli-CUltMNat.js → update-cli-BEm9qrlV.js} +38 -38
- package/dist/{update-cli-DzokCnPQ.js → update-cli-CGSSTKTT.js} +36 -36
- package/dist/{update-runner-BOwq67Zr.js → update-runner-BMCWrif2.js} +1 -1
- package/dist/{update-runner-B2S-ijWA.js → update-runner-BUO6D2tP.js} +1 -1
- package/dist/{user-run-recording--_IhK-gN.js → user-run-recording-B1HujJiT.js} +2 -2
- package/dist/{validation-cli-C3tmcqKI.js → validation-cli-DHwddKWw.js} +29 -29
- package/dist/{validation-cli-BVO3QQdD.js → validation-cli-IGbMryvI.js} +30 -30
- package/dist/{with-timeout-BWtea6IA.js → with-timeout-BBKlU1es.js} +2 -2
- package/dist/{with-timeout-i0aj653V.js → with-timeout-CkVVKMZ5.js} +2 -2
- package/dist/{workspace-rViTESnr.js → workspace-Bj1Jegt-.js} +27 -27
- 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/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
|
@@ -1,84 +1,84 @@
|
|
|
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, n as STATE_DIR, o as resolveGatewayPort, r as resolveConfigPath, 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, dt as sleep$3, et as ensureDir$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-DCgndASv.js";
|
|
3
|
+
import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, n as STATE_DIR, o as resolveGatewayPort, r as resolveConfigPath, u as expandHomePrefix } from "./paths-BIDPYPVC.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, dt as sleep$3, et as ensureDir$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-BZy3aWdW.js";
|
|
5
5
|
import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
|
|
6
|
-
import { $ as resolveThreadParentSessionKey, A as isValidAgentId, B as DEFAULT_ACCOUNT_ID, C as buildAgentMainSessionKey, F as resolveConfiguredCanonicalIdentity, G as WAKE_GATE_SESSION_KEY_SEGMENT, H as normalizeOptionalAccountId, I as resolveThreadSessionKeys, J as isAcpSessionKey, K as deriveSessionChatType, L as sanitizeAgentId, M as normalizeMainKey, N as resolveAgentIdFromSessionKey, P as resolveCanonicalIdentity, Q as parseAgentSessionKey, R as sessionKeyAgentMatches, T as classifySessionKeyShape, V as normalizeAccountId$3, Y as isCronSessionKey, Z as isSubagentSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, j as normalizeAgentId, k as isKnownAgentMainSessionKey, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, q as getSubagentDepth, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as DEVICE_SENDER_PREFIX, y as DEFAULT_AGENT_ID, z as toAgentStoreSessionKey } from "./workspace-
|
|
7
|
-
import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-
|
|
8
|
-
import { $i as isNonEmptyString, $n as normalizeHyphenSlug, $t as normalizePluginHttpPath, A as requireApiKey, Aa as DEFAULT_MODEL, Ai as splitCommandChain, An as setSessionRuntimeModel, Ar as deliveryContextFromSession, At as normalizePluginsConfig, B as resolveProfilesUnavailableReason, Bi as splitShellArgs, Bn as resolveSessionFilePathOptions, Br as listDeliverableMessageChannels, Bt as normalizeAnyChannelId, C as createOllamaStreamFn, Ca as normalizeSecretInput, Ci as isTrustedSafeBinPath, Cn as updateLastRoute, Cr as listEnabledDiscordAccounts, Ct as isPathWithinRoot, D as buildUsageWithNoCost, Da as resolveSecretInputRef, Di as analyzeShellCommand, Dn as DEFAULT_RESET_TRIGGERS, Dr as resolveChannelGroupRequireMention, Dt as BUNDLED_ENABLED_BY_DEFAULT, E as buildStreamErrorAssistantMessage, Ea as normalizeResolvedSecretInputString, Ei as validateSafeBinArgv, Er as resolveChannelGroupPolicy, Et as loadPluginManifestRegistry, F as resolveAuthProfileOrder, Fi as extractShellWrapperInlineCommand, Fr as INTERNAL_MESSAGE_CHANNEL, Ft as safeStatSync, Gi as isSafeExecutableValue, Gn as resolveGroupSessionKey, Gr as GATEWAY_CLIENT_MODES, Gt as getActivePluginRegistry, Hi as normalizeSafeBinProfileFixtures, Hr as resolveGatewayMessageChannel, Ht as normalizeChatChannelId, I as getSoonestCooldownExpiry, Ii as isDispatchWrapperExecutable, In as SAFE_SESSION_ID_RE, Ir as isDeliverableMessageChannel, J as TELEGRAM_COMMAND_NAME_PATTERN, Ji as resolveSlackNativeStreaming, Jn as normalizeChannelId$1, Jr as acquireSessionWriteLock, Jt as requireActivePluginRegistry, K as writeConfigFile, Ki as mapStreamingModeToSlackLegacyDraftStreamMode, Kn as getChannelPlugin, Kr as GATEWAY_CLIENT_NAMES, Kt as getActivePluginRegistryKey, L as isProfileInCooldown, Li as isShellWrapperExecutable, Ln as SESSION_RUN_STORE_FILE_NAME, Lr as isGatewayMessageChannel, Lt as CHAT_CHANNEL_ORDER, M as resolveEnvApiKey, Mi as matchAllowlist, Mn as parseSessionIndexRecordKey, Mr as mergeDeliveryContext, Mt as resolveMemorySlotDecision, N as resolveModelAuthMode, Ni as resolveAllowlistCandidatePath, Nr as normalizeDeliveryContext, Nt as discoverOpenClawPlugins, O as getApiKeyForModel, Oa as splitTrailingAuthProfile, Oi as buildEnforcedShellCommand, On as mergeSessionEntry, Or as resolveChannelGroupToolsPolicy, Ot as applyTestPluginDefaults, Pi as resolveCommandResolutionFromArgv, Pr as normalizeSessionDeliveryFields, Pt as isPathInside, Q as isInboundPathAllowed, Qi as describeUnknownError$1, Qn as normalizeAtHashSlug, Qt as createPluginRegistry, R as markAuthProfileFailure, Ri as unwrapKnownDispatchWrapperInvocation, Rr as isInternalMessageChannel, Rt as getChatChannelMeta, S as OLLAMA_NATIVE_BASE_URL, Si as getTrustedSafeBinDirs, Sn as refreshConfiguredSessionBindingEntry, Sr as createDiscordActionGate, St as isAvatarHttpUrl, T as buildAssistantMessageWithZeroUsage, Ta as hasConfiguredSecretInput, Ti as normalizeTrustedSafeBinDirs, Tn as updateSessionStoreEntry, Tr as normalizeDiscordToken, Tt as validateJsonSchemaValue, U as loadConfig, Ui as resolveSafeBinProfiles, Un as resolveStorePath, Ur as resolveMessageChannel, Ut as resolveChannelConfigId, V as resolveApiKeyForProfile, Vi as SAFE_BIN_PROFILES, Vn as resolveSessionTranscriptPath, Vr as normalizeMessageChannel, Vt as normalizeChannelId$2, W as readConfigFileSnapshot, Wi as applyMergePatch, Wn as deriveSessionMetaPatch, Wr as GATEWAY_CLIENT_IDS, Wt as getActiveGatewayPluginRegistry, X as resolveTelegramCustomCommands, Xn as listChannelDocks, Xr as CtxProjectionCorruptionError, Xt as addRegisteredPluginApi, Y as normalizeTelegramCommandName, Yi as resolveSlackStreamingMode, Yn as getChannelDock, Yr as resolveSessionLockMaxHoldFromTimeout, Yt as setActivePluginRegistry, Zi as resolveSecretRefValues, Zn as normalizeSignalMessagingTarget, Zr as readTaskWorkStates, Zt as clearRegisteredPluginApis, _a as withFileLock, _i as unsetConfigOverride, _n as loadSessionStore, _r as hasAnyWhatsAppAuth, a as isCliProvider, aa as resolveAgentMaxConcurrent, ai as stringEnum, an as matchPluginCommand, ar as resolveTelegramAccount, at as resolveExecPolicyPreset, ba as readProcessElapsedSeconds, bi as setConfigValueAtPath, bn as readSessionUpdatedAt, br as resolveCliName, bt as AVATAR_MAX_BYTES, c as normalizeProviderId, ca as resolveShellEnvFallbackTimeoutMs, ci as actionRequiresTarget, cn as createConversationReadQuery, d as resolveDefaultModelForAgent, da as dedupeProfileIds, di as listBufferedPluginTaskPasses, dn as requireSessionStorageRuntime, dr as resolveSlackAppToken, ea as isRecord$2, en as buildPluginHealthReport, er as normalizeStringEntries, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fa as listProfilesForProvider, fi as replaceBufferedPluginTaskPasses, fn as closeConfiguredSessionStorageRuntime, fr as resolveSlackBotToken, ga as resolveOpenClawAgentDir, gi as setConfigOverride, gr as normalizeWhatsAppTarget, h as resolveThinkingDefault, ha as resolveAuthStorePathForDisplay, hi as resetConfigOverrides, hn as getConfiguredSessionStorageRuntime, hr as isWhatsAppGroupJid, i as findNormalizedProviderValue, ia as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, ii as optionalStringEnum, in as listPluginCommands, ir as listTelegramAccountIds, it as ASSISTANT_IDENTITY_COLORS, j as resolveApiKeyForProvider, ja as DEFAULT_PROVIDER, ji as DEFAULT_SAFE_BINS, jn as parseDurationMs, jr as deliveryContextKey, jt as resolveEffectiveEnableState, k as getCustomProviderApiKey, ka as DEFAULT_CONTEXT_TOKENS, ki as isWindowsPlatform, kn as resolveFreshSessionTotalTokens, kr as resolveAccountEntry, kt as isBundledChannelEnabledByChannelConfig, l as parseModelRef, la as isTruthyEnvValue, ln as getConversationReadQuery, lr as resolveSlackAccount, m as resolveSubagentSpawnModelSelection, ma as ensureAuthProfileStore, mi as getConfigOverrides, mn as commitPreparedConfiguredSessionStorageRuntimeActivation, mr as resolveSignalAccount, n as buildConfiguredAllowlistKeys, na as secretRefKey, ni as channelTargetSchema, nn as executePluginCommand, nr as createTelegramActionGate, nt as normalizeScpRemoteHost, o as modelKey, oa as VERSION, oi as applyTargetToParams, on as registerPluginCommand, or as resolveTelegramToken, p as resolveReasoningDefault, pa as markAuthProfileGood, pi as RecoveryAdmissionError, pn as closeReplacedConfiguredSessionStorageRuntime, pr as listEnabledSignalAccounts, q as validateConfigObjectWithPlugins, qi as resolveDiscordPreviewStreamMode, qn as listChannelPlugins, qr as normalizeAccountId$4, r as buildModelAliasIndex, ra as runTasksWithConcurrency, ri as channelTargetsSchema, rn as getPluginCommandSpecs, rr as listEnabledTelegramAccounts, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sa as getShellPathFromLoginShell, si as actionHasTarget, sn as StorageReadAccessError, sr as buildChannelAccountBindings, t as buildAllowedModelSet, ta as parseDotPath, tn as clearPluginCommands, tr as normalizeStringEntriesLower, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, ua as resolveOwnerDisplaySetting, ui as discardBufferedPluginTaskPasses, ur as resolveSlackReplyToMode, va as resolveProcessScopedMap, vi as getConfigValueAtPath, vn as loadSessionStoreFromDisk, vr as resolveWhatsAppAccount, w as buildAssistantMessage, wa as coerceSecretRef, wi as listWritableExplicitTrustedSafeBinDirs, wn as updateSessionStore, wr as resolveDiscordAccount, wt as isSupportedLocalAvatarExtension, x as retryAsync, xa as resolveAuthProfileDisplayLabel, xi as unsetConfigValueAtPath, xn as recordSessionMetaFromInbound, xr as resolveIMessageAccount, xt as isAvatarDataUrl, ya as isPidAlive, yi as parseConfigPath, yn as prepareConfiguredSessionStorageRuntimeActivation, yr as formatCliCommand, z as markAuthProfileUsed, zi as unwrapKnownShellMultiplexerInvocation, zn as resolveSessionFilePath, zr as isMarkdownCapableMessageChannel, zt as listChatChannels } from "./model-selection-
|
|
9
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-
|
|
10
|
-
import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-
|
|
6
|
+
import { $ as resolveThreadParentSessionKey, A as isValidAgentId, B as DEFAULT_ACCOUNT_ID, C as buildAgentMainSessionKey, F as resolveConfiguredCanonicalIdentity, G as WAKE_GATE_SESSION_KEY_SEGMENT, H as normalizeOptionalAccountId, I as resolveThreadSessionKeys, J as isAcpSessionKey, K as deriveSessionChatType, L as sanitizeAgentId, M as normalizeMainKey, N as resolveAgentIdFromSessionKey, P as resolveCanonicalIdentity, Q as parseAgentSessionKey, R as sessionKeyAgentMatches, T as classifySessionKeyShape, V as normalizeAccountId$3, Y as isCronSessionKey, Z as isSubagentSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, j as normalizeAgentId, k as isKnownAgentMainSessionKey, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, q as getSubagentDepth, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as DEVICE_SENDER_PREFIX, y as DEFAULT_AGENT_ID, z as toAgentStoreSessionKey } from "./workspace-Bj1Jegt-.js";
|
|
7
|
+
import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-J4xjy-6D.js";
|
|
8
|
+
import { $i as isNonEmptyString, $n as normalizeHyphenSlug, $t as normalizePluginHttpPath, A as requireApiKey, Aa as DEFAULT_MODEL, Ai as splitCommandChain, An as setSessionRuntimeModel, Ar as deliveryContextFromSession, At as normalizePluginsConfig, B as resolveProfilesUnavailableReason, Bi as splitShellArgs, Bn as resolveSessionFilePathOptions, Br as listDeliverableMessageChannels, Bt as normalizeAnyChannelId, C as createOllamaStreamFn, Ca as normalizeSecretInput, Ci as isTrustedSafeBinPath, Cn as updateLastRoute, Cr as listEnabledDiscordAccounts, Ct as isPathWithinRoot, D as buildUsageWithNoCost, Da as resolveSecretInputRef, Di as analyzeShellCommand, Dn as DEFAULT_RESET_TRIGGERS, Dr as resolveChannelGroupRequireMention, Dt as BUNDLED_ENABLED_BY_DEFAULT, E as buildStreamErrorAssistantMessage, Ea as normalizeResolvedSecretInputString, Ei as validateSafeBinArgv, Er as resolveChannelGroupPolicy, Et as loadPluginManifestRegistry, F as resolveAuthProfileOrder, Fi as extractShellWrapperInlineCommand, Fr as INTERNAL_MESSAGE_CHANNEL, Ft as safeStatSync, Gi as isSafeExecutableValue, Gn as resolveGroupSessionKey, Gr as GATEWAY_CLIENT_MODES, Gt as getActivePluginRegistry, Hi as normalizeSafeBinProfileFixtures, Hr as resolveGatewayMessageChannel, Ht as normalizeChatChannelId, I as getSoonestCooldownExpiry, Ii as isDispatchWrapperExecutable, In as SAFE_SESSION_ID_RE, Ir as isDeliverableMessageChannel, J as TELEGRAM_COMMAND_NAME_PATTERN, Ji as resolveSlackNativeStreaming, Jn as normalizeChannelId$1, Jr as acquireSessionWriteLock, Jt as requireActivePluginRegistry, K as writeConfigFile, Ki as mapStreamingModeToSlackLegacyDraftStreamMode, Kn as getChannelPlugin, Kr as GATEWAY_CLIENT_NAMES, Kt as getActivePluginRegistryKey, L as isProfileInCooldown, Li as isShellWrapperExecutable, Ln as SESSION_RUN_STORE_FILE_NAME, Lr as isGatewayMessageChannel, Lt as CHAT_CHANNEL_ORDER, M as resolveEnvApiKey, Mi as matchAllowlist, Mn as parseSessionIndexRecordKey, Mr as mergeDeliveryContext, Mt as resolveMemorySlotDecision, N as resolveModelAuthMode, Ni as resolveAllowlistCandidatePath, Nr as normalizeDeliveryContext, Nt as discoverOpenClawPlugins, O as getApiKeyForModel, Oa as splitTrailingAuthProfile, Oi as buildEnforcedShellCommand, On as mergeSessionEntry, Or as resolveChannelGroupToolsPolicy, Ot as applyTestPluginDefaults, Pi as resolveCommandResolutionFromArgv, Pr as normalizeSessionDeliveryFields, Pt as isPathInside, Q as isInboundPathAllowed, Qi as describeUnknownError$1, Qn as normalizeAtHashSlug, Qt as createPluginRegistry, R as markAuthProfileFailure, Ri as unwrapKnownDispatchWrapperInvocation, Rr as isInternalMessageChannel, Rt as getChatChannelMeta, S as OLLAMA_NATIVE_BASE_URL, Si as getTrustedSafeBinDirs, Sn as refreshConfiguredSessionBindingEntry, Sr as createDiscordActionGate, St as isAvatarHttpUrl, T as buildAssistantMessageWithZeroUsage, Ta as hasConfiguredSecretInput, Ti as normalizeTrustedSafeBinDirs, Tn as updateSessionStoreEntry, Tr as normalizeDiscordToken, Tt as validateJsonSchemaValue, U as loadConfig, Ui as resolveSafeBinProfiles, Un as resolveStorePath, Ur as resolveMessageChannel, Ut as resolveChannelConfigId, V as resolveApiKeyForProfile, Vi as SAFE_BIN_PROFILES, Vn as resolveSessionTranscriptPath, Vr as normalizeMessageChannel, Vt as normalizeChannelId$2, W as readConfigFileSnapshot, Wi as applyMergePatch, Wn as deriveSessionMetaPatch, Wr as GATEWAY_CLIENT_IDS, Wt as getActiveGatewayPluginRegistry, X as resolveTelegramCustomCommands, Xn as listChannelDocks, Xr as CtxProjectionCorruptionError, Xt as addRegisteredPluginApi, Y as normalizeTelegramCommandName, Yi as resolveSlackStreamingMode, Yn as getChannelDock, Yr as resolveSessionLockMaxHoldFromTimeout, Yt as setActivePluginRegistry, Zi as resolveSecretRefValues, Zn as normalizeSignalMessagingTarget, Zr as readTaskWorkStates, Zt as clearRegisteredPluginApis, _a as withFileLock, _i as unsetConfigOverride, _n as loadSessionStore, _r as hasAnyWhatsAppAuth, a as isCliProvider, aa as resolveAgentMaxConcurrent, ai as stringEnum, an as matchPluginCommand, ar as resolveTelegramAccount, at as resolveExecPolicyPreset, ba as readProcessElapsedSeconds, bi as setConfigValueAtPath, bn as readSessionUpdatedAt, br as resolveCliName, bt as AVATAR_MAX_BYTES, c as normalizeProviderId, ca as resolveShellEnvFallbackTimeoutMs, ci as actionRequiresTarget, cn as createConversationReadQuery, d as resolveDefaultModelForAgent, da as dedupeProfileIds, di as listBufferedPluginTaskPasses, dn as requireSessionStorageRuntime, dr as resolveSlackAppToken, ea as isRecord$2, en as buildPluginHealthReport, er as normalizeStringEntries, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fa as listProfilesForProvider, fi as replaceBufferedPluginTaskPasses, fn as closeConfiguredSessionStorageRuntime, fr as resolveSlackBotToken, ga as resolveOpenClawAgentDir, gi as setConfigOverride, gr as normalizeWhatsAppTarget, h as resolveThinkingDefault, ha as resolveAuthStorePathForDisplay, hi as resetConfigOverrides, hn as getConfiguredSessionStorageRuntime, hr as isWhatsAppGroupJid, i as findNormalizedProviderValue, ia as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, ii as optionalStringEnum, in as listPluginCommands, ir as listTelegramAccountIds, it as ASSISTANT_IDENTITY_COLORS, j as resolveApiKeyForProvider, ja as DEFAULT_PROVIDER, ji as DEFAULT_SAFE_BINS, jn as parseDurationMs, jr as deliveryContextKey, jt as resolveEffectiveEnableState, k as getCustomProviderApiKey, ka as DEFAULT_CONTEXT_TOKENS, ki as isWindowsPlatform, kn as resolveFreshSessionTotalTokens, kr as resolveAccountEntry, kt as isBundledChannelEnabledByChannelConfig, l as parseModelRef, la as isTruthyEnvValue, ln as getConversationReadQuery, lr as resolveSlackAccount, m as resolveSubagentSpawnModelSelection, ma as ensureAuthProfileStore, mi as getConfigOverrides, mn as commitPreparedConfiguredSessionStorageRuntimeActivation, mr as resolveSignalAccount, n as buildConfiguredAllowlistKeys, na as secretRefKey, ni as channelTargetSchema, nn as executePluginCommand, nr as createTelegramActionGate, nt as normalizeScpRemoteHost, o as modelKey, oa as VERSION, oi as applyTargetToParams, on as registerPluginCommand, or as resolveTelegramToken, p as resolveReasoningDefault, pa as markAuthProfileGood, pi as RecoveryAdmissionError, pn as closeReplacedConfiguredSessionStorageRuntime, pr as listEnabledSignalAccounts, q as validateConfigObjectWithPlugins, qi as resolveDiscordPreviewStreamMode, qn as listChannelPlugins, qr as normalizeAccountId$4, r as buildModelAliasIndex, ra as runTasksWithConcurrency, ri as channelTargetsSchema, rn as getPluginCommandSpecs, rr as listEnabledTelegramAccounts, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sa as getShellPathFromLoginShell, si as actionHasTarget, sn as StorageReadAccessError, sr as buildChannelAccountBindings, t as buildAllowedModelSet, ta as parseDotPath, tn as clearPluginCommands, tr as normalizeStringEntriesLower, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, ua as resolveOwnerDisplaySetting, ui as discardBufferedPluginTaskPasses, ur as resolveSlackReplyToMode, va as resolveProcessScopedMap, vi as getConfigValueAtPath, vn as loadSessionStoreFromDisk, vr as resolveWhatsAppAccount, w as buildAssistantMessage, wa as coerceSecretRef, wi as listWritableExplicitTrustedSafeBinDirs, wn as updateSessionStore, wr as resolveDiscordAccount, wt as isSupportedLocalAvatarExtension, x as retryAsync, xa as resolveAuthProfileDisplayLabel, xi as unsetConfigValueAtPath, xn as recordSessionMetaFromInbound, xr as resolveIMessageAccount, xt as isAvatarDataUrl, ya as isPidAlive, yi as parseConfigPath, yn as prepareConfiguredSessionStorageRuntimeActivation, yr as formatCliCommand, z as markAuthProfileUsed, zi as unwrapKnownShellMultiplexerInvocation, zn as resolveSessionFilePath, zr as isMarkdownCapableMessageChannel, zt as listChatChannels } from "./model-selection-BHGpQSa9.js";
|
|
9
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-DYYKoDuV.js";
|
|
10
|
+
import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-CghFcfry.js";
|
|
11
11
|
import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-CrORLc0j.js";
|
|
12
|
-
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-
|
|
13
|
-
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-
|
|
14
|
-
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-
|
|
15
|
-
import { $ as messageTime, A as resolveChannelResetConfig, At as sanitizeToolCallIdsForCloudCodeAssist, B as openDbSessionManager, Bt as buildPluginTurnIdentity, C as deriveSessionTotalTokens, Ct as guardSessionManager, D as SESSION_RUN_STATUSES, Dt as sanitizeToolUseResultPairing, E as normalizeUsage, Et as sanitizeToolCallInputs, F as resolveAgentMainSessionKey, Ft as getGlobalPluginRegistry, G as sha256, Gt as toJsonValue$1, H as drainPendingPrimaryWrites, Ht as resolveProviderRuntimeIdentity, I as resolveExplicitAgentSessionKey, It as initializeGlobalHookRunner, J as collectInboundUserContext, K as userIdFromSessionKey, L as resolveMainSessionKey, Lt as hasHookForPlugin, M as resolveSessionResetType, Mt as hasInterSessionUserProvenance, N as resolveThreadFlag, Nt as normalizeInputProvenance, O as resolveSessionKey, Ot as stripToolResultDetails, P as canonicalizeMainSessionAlias, Pt as getGlobalHookRunner, Q as isRepresentableEpochMs, R as isPrimarySessionTranscriptFileName, Rt as promptBuildResultToContribution, S as derivePromptTokens, St as isToolResultMessage, T as makeZeroUsageSnapshot, Tt as repairToolUseResultPairing, U as extractLegacyTranscriptEntryFields, Ut as createCurrentUserPromptEnvelope, V as runSerializedBySession, Vt as resolveProviderPromptCacheKey, W as sanitizeJsonb, Wt as mergePromptContributions, X as attachMessageIngress, Y as renderInboundUserContext, Z as getMessageIngress, _ as inferLegacyName, _t as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, a as resolveMirroredTranscriptText, at as DB_SESSION_HYDRATION_LIMIT, b as resolveDefaultCronStaggerMs, bt as estimateMessageCharsCached, c as createSessionStorageRuntimeFromConfig, ct as HIDDEN_HEARTBEAT_CUSTOM_TYPE, d as TASK_RUN_MODES, dt as sessionLikelyHasOversizedToolResults, et as stripMessageCarriers, f as TASK_RUN_STATUSES, ft as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, g as sanitizeAppendEntry, gt as CHARS_PER_TOKEN_ESTIMATE$2, h as deriveLegacyActorIdentity, ht as truncateToolResultToChars, i as appendAssistantMessageToSessionTranscript, it as resolveSenderLabel, j as resolveSessionResetPolicy, jt as INPUT_PROVENANCE_KIND_VALUES, k as evaluateSessionFreshness, kt as canonicalToolCallIdBase, l as resolveSessionStorageConfig, lt as capToolResultContent, m as CREATE_CTX_STORAGE_OWNER_SQL, mt as truncateTextHeadTail, n as parseSessionThreadInfo, nt as formatZonedTimestamp, o as parseInlineDirectives$1, ot as eventOrder, p as buildEqualityProjection, pt as TOOL_RESULT_TEXT_WEIGHT, q as buildInboundMetaSystemPrompt, r as resolveAndPersistSessionFile, rt as resolveTimezone, s as attachPgPoolErrorListeners, st as pickLeaf, t as extractDeliveryInfo, tt as formatMessageStamp, u as validateCtxStorage, ut as HARD_MAX_TOOL_RESULT_CHARS, v as normalizeHttpWebhookUrl, vt as createMessageCharEstimateCache, w as hasNonzeroUsage, wt as openRawToolResultStash, x as parseAbsoluteTimeMs, xt as getToolResultText$1, y as normalizeCronStaggerMs, yt as estimateContextChars$1, z as isSessionArchiveArtifactName, zt as buildPluginRuntimeIdentity } from "./sessions-
|
|
12
|
+
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-bwKTbNlJ.js";
|
|
13
|
+
import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-Bf4geLyV.js";
|
|
14
|
+
import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-PMai9bNL.js";
|
|
15
|
+
import { $ as messageTime, A as resolveChannelResetConfig, At as sanitizeToolCallIdsForCloudCodeAssist, B as openDbSessionManager, Bt as buildPluginTurnIdentity, C as deriveSessionTotalTokens, Ct as guardSessionManager, D as SESSION_RUN_STATUSES, Dt as sanitizeToolUseResultPairing, E as normalizeUsage, Et as sanitizeToolCallInputs, F as resolveAgentMainSessionKey, Ft as getGlobalPluginRegistry, G as sha256, Gt as toJsonValue$1, H as drainPendingPrimaryWrites, Ht as resolveProviderRuntimeIdentity, I as resolveExplicitAgentSessionKey, It as initializeGlobalHookRunner, J as collectInboundUserContext, K as userIdFromSessionKey, L as resolveMainSessionKey, Lt as hasHookForPlugin, M as resolveSessionResetType, Mt as hasInterSessionUserProvenance, N as resolveThreadFlag, Nt as normalizeInputProvenance, O as resolveSessionKey, Ot as stripToolResultDetails, P as canonicalizeMainSessionAlias, Pt as getGlobalHookRunner, Q as isRepresentableEpochMs, R as isPrimarySessionTranscriptFileName, Rt as promptBuildResultToContribution, S as derivePromptTokens, St as isToolResultMessage, T as makeZeroUsageSnapshot, Tt as repairToolUseResultPairing, U as extractLegacyTranscriptEntryFields, Ut as createCurrentUserPromptEnvelope, V as runSerializedBySession, Vt as resolveProviderPromptCacheKey, W as sanitizeJsonb, Wt as mergePromptContributions, X as attachMessageIngress, Y as renderInboundUserContext, Z as getMessageIngress, _ as inferLegacyName, _t as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, a as resolveMirroredTranscriptText, at as DB_SESSION_HYDRATION_LIMIT, b as resolveDefaultCronStaggerMs, bt as estimateMessageCharsCached, c as createSessionStorageRuntimeFromConfig, ct as HIDDEN_HEARTBEAT_CUSTOM_TYPE, d as TASK_RUN_MODES, dt as sessionLikelyHasOversizedToolResults, et as stripMessageCarriers, f as TASK_RUN_STATUSES, ft as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, g as sanitizeAppendEntry, gt as CHARS_PER_TOKEN_ESTIMATE$2, h as deriveLegacyActorIdentity, ht as truncateToolResultToChars, i as appendAssistantMessageToSessionTranscript, it as resolveSenderLabel, j as resolveSessionResetPolicy, jt as INPUT_PROVENANCE_KIND_VALUES, k as evaluateSessionFreshness, kt as canonicalToolCallIdBase, l as resolveSessionStorageConfig, lt as capToolResultContent, m as CREATE_CTX_STORAGE_OWNER_SQL, mt as truncateTextHeadTail, n as parseSessionThreadInfo, nt as formatZonedTimestamp, o as parseInlineDirectives$1, ot as eventOrder, p as buildEqualityProjection, pt as TOOL_RESULT_TEXT_WEIGHT, q as buildInboundMetaSystemPrompt, r as resolveAndPersistSessionFile, rt as resolveTimezone, s as attachPgPoolErrorListeners, st as pickLeaf, t as extractDeliveryInfo, tt as formatMessageStamp, u as validateCtxStorage, ut as HARD_MAX_TOOL_RESULT_CHARS, v as normalizeHttpWebhookUrl, vt as createMessageCharEstimateCache, w as hasNonzeroUsage, wt as openRawToolResultStash, x as parseAbsoluteTimeMs, xt as getToolResultText$1, y as normalizeCronStaggerMs, yt as estimateContextChars$1, z as isSessionArchiveArtifactName, zt as buildPluginRuntimeIdentity } from "./sessions-C_dBu7XC.js";
|
|
16
16
|
import { n as isDiagnosticsEnabled, t as emitDiagnosticEvent } from "./diagnostic-events-DGRcTqIH.js";
|
|
17
17
|
import { n as onSessionTranscriptUpdate } from "./transcript-events-C9cNWasT.js";
|
|
18
18
|
import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-BEYczWtd.js";
|
|
19
|
-
import { A as boundDiagnosticContent, C as logWebhookError, D as refreshRunProgress, E as recordSystemPromptHashComparison, M as resetCommandPollCount, O as startDiagnosticHeartbeat, S as logToolExecutionStarted, T as logWebhookReceived, b as logToolExecutionBlocked, d as logRunCompleted, f as logRunStarted, j as recordCommandPoll, k as stopDiagnosticHeartbeat, l as logModelCallError, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, w as logWebhookProcessed, x as logToolExecutionCompleted } from "./diagnostic-
|
|
19
|
+
import { A as boundDiagnosticContent, C as logWebhookError, D as refreshRunProgress, E as recordSystemPromptHashComparison, M as resetCommandPollCount, O as startDiagnosticHeartbeat, S as logToolExecutionStarted, T as logWebhookReceived, b as logToolExecutionBlocked, d as logRunCompleted, f as logRunStarted, j as recordCommandPoll, k as stopDiagnosticHeartbeat, l as logModelCallError, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, w as logWebhookProcessed, x as logToolExecutionCompleted } from "./diagnostic-CKFgwhkU.js";
|
|
20
20
|
import { r as getDiagnosticSessionState, s as redactChannelCorrelation } from "./diagnostic-session-state-Bnyx-w0F.js";
|
|
21
21
|
import { t as redactIdentifier } from "./redact-identifier-WYElxwAZ.js";
|
|
22
|
-
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-
|
|
22
|
+
import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-DpE5Tg36.js";
|
|
23
23
|
import { t as CommandLane } from "./lanes-DTaUAkeG.js";
|
|
24
|
-
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-
|
|
25
|
-
import { $ as resolveTelegramReplyId, A as resolveTelegramFetch, B as buildTelegramGroupPeerId, C as getTelegramFleetSupervisor, D as recordWebhook, E as recordUpdate, F as resolveCronStorePath, G as expandTextLinks, H as buildTelegramThreadParams, I as buildGroupLabel, J as normalizeForwardedContext, K as extractTelegramLocation, L as buildSenderLabel, M as formatTelegramErrorMessage, N as withTelegramApiErrorLogging, O as registerAccount, P as loadCronStore, Q as resolveTelegramMediaPlaceholder, R as buildSenderName, S as fingerprintTelegramToken, St as resolveTelegramTargetChatType, T as recordState, U as buildTypingThreadParams, V as buildTelegramParentPeer, W as describeReplyTarget, X as resolveTelegramForumThreadId, Y as resolveTelegramDirectPeerId, Z as resolveTelegramGroupAllowFromContext, _ as isTelegramEditMayHaveLandedError, _t as writeJsonFileAtomically, a as reactMessageTelegram, at as resolveSenderAllowMatch$1, b as renderTelegramHtmlText, bt as isVoiceCompatibleAudio, c as sendStickerTelegram, ct as mergeDmAllowFromSources, d as wasSentByBot, dt as toLocationContext, et as resolveTelegramStreamMode, f as extractTelegramErrorText, ft as addChannelAllowFromStoreEntry, g as isTelegramClientRejection, gt as readJsonFileWithFallback, h as isSafeToRetrySendError, ht as upsertChannelPairingRequest, i as editMessageTelegram, it as normalizeDmAllowFromWithStore$1, j as splitTelegramCaption, k as releaseAccountOwner, lt as resolveGroupAllowFromSources, m as isRecoverableTelegramNetworkError, mt as removeChannelAllowFromStoreEntry, n as createForumTopicTelegram, nt as isSenderAllowed$1, o as sendMessageTelegram, ot as firstDefined$1, p as isDefiniteTelegramRequestNonDeliveryError, pt as readChannelAllowFromStore, q as hasBotMention, r as deleteMessageTelegram, rt as normalizeAllowFrom$2, s as sendPollTelegram, st as isSenderIdAllowed, t as buildInlineKeyboard, tt as resolveTelegramThreadSpec, u as resolveTelegramVoiceSend, ut as formatLocationText, v as markdownToTelegramChunks, vt as getPairingAdapter, w as recordApiRequest, x as wrapFileReferencesInHtml, xt as parseTelegramTarget, y as markdownToTelegramHtml, yt as listPairingChannels, z as buildTelegramGroupFrom } from "./send-
|
|
26
|
-
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-
|
|
27
|
-
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-
|
|
28
|
-
import { $ as buildPluginToolGroups, 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 applyOwnerOnlyToolPolicy, R as isTimeoutErrorMessage, S as getApiErrorPayloadFingerprint, T as isCloudCodeAssistFormatError, U as registerBrowserRoutes, V as resolveSandboxRuntimeStatus, W as resolveBrowserConfig, X as trimToUndefined$1, Y as resolveGatewayCredentialsFromConfig, Z as resolveSandboxConfigForAgent, _ as BILLING_ERROR_USER_MESSAGE, at as normalizeToolName, b as formatBillingErrorMessage, c as sanitizeSessionMessagesImages, ct as matchesAnyGlobPattern, d as resolveImageSanitizationLimits, dt as resolveBootstrapTotalMaxChars, et as collectExplicitAllowlist, f as canonicalizeBase64, ft as sanitizeGoogleTurnOrdering, g as isGoogleModelApi, h as downgradeOpenAIReasoningBlocks, i as pickFallbackThinkingLevel, it as expandToolGroups, j as isRateLimitAssistantError, k as isFailoverErrorMessage, l as sanitizeImageBlocks, lt as buildBootstrapContextFiles, m as downgradeOpenAIFunctionCallReasoningPairs, n as validateAnthropicTurns, nt as mergeAlsoAllowPolicy, o as isMessagingToolDuplicateNormalized, ot as resolveToolProfilePolicy, p as estimateBase64DecodedBytes, q as ensureBrowserControlAuth, r as validateGeminiTurns, rt as stripPluginOnlyAllowlist, s as normalizeTextForComparison, st as compileGlobPatterns, t as extractTextFromChatContent, tt as expandPolicyWithPluginGroups, u as sanitizeToolResultImages, ut as resolveBootstrapMaxChars, v as classifyFailoverReason, w as isBillingAssistantError, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as ensureSandboxWorkspaceForSession } from "./chat-content-
|
|
29
|
-
import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, V as resolveClientIp, W as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-
|
|
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 { a as formatUncaughtError, c as readErrorName, i as formatErrorMessage, o as hasErrnoCode, r as formatErrorChainMessage, t as collectErrorGraphCandidates } 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-
|
|
24
|
+
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-Cd0AajLX.js";
|
|
25
|
+
import { $ as resolveTelegramReplyId, A as resolveTelegramFetch, B as buildTelegramGroupPeerId, C as getTelegramFleetSupervisor, D as recordWebhook, E as recordUpdate, F as resolveCronStorePath, G as expandTextLinks, H as buildTelegramThreadParams, I as buildGroupLabel, J as normalizeForwardedContext, K as extractTelegramLocation, L as buildSenderLabel, M as formatTelegramErrorMessage, N as withTelegramApiErrorLogging, O as registerAccount, P as loadCronStore, Q as resolveTelegramMediaPlaceholder, R as buildSenderName, S as fingerprintTelegramToken, St as resolveTelegramTargetChatType, T as recordState, U as buildTypingThreadParams, V as buildTelegramParentPeer, W as describeReplyTarget, X as resolveTelegramForumThreadId, Y as resolveTelegramDirectPeerId, Z as resolveTelegramGroupAllowFromContext, _ as isTelegramEditMayHaveLandedError, _t as writeJsonFileAtomically, a as reactMessageTelegram, at as resolveSenderAllowMatch$1, b as renderTelegramHtmlText, bt as isVoiceCompatibleAudio, c as sendStickerTelegram, ct as mergeDmAllowFromSources, d as wasSentByBot, dt as toLocationContext, et as resolveTelegramStreamMode, f as extractTelegramErrorText, ft as addChannelAllowFromStoreEntry, g as isTelegramClientRejection, gt as readJsonFileWithFallback, h as isSafeToRetrySendError, ht as upsertChannelPairingRequest, i as editMessageTelegram, it as normalizeDmAllowFromWithStore$1, j as splitTelegramCaption, k as releaseAccountOwner, lt as resolveGroupAllowFromSources, m as isRecoverableTelegramNetworkError, mt as removeChannelAllowFromStoreEntry, n as createForumTopicTelegram, nt as isSenderAllowed$1, o as sendMessageTelegram, ot as firstDefined$1, p as isDefiniteTelegramRequestNonDeliveryError, pt as readChannelAllowFromStore, q as hasBotMention, r as deleteMessageTelegram, rt as normalizeAllowFrom$2, s as sendPollTelegram, st as isSenderIdAllowed, t as buildInlineKeyboard, tt as resolveTelegramThreadSpec, u as resolveTelegramVoiceSend, ut as formatLocationText, v as markdownToTelegramChunks, vt as getPairingAdapter, w as recordApiRequest, x as wrapFileReferencesInHtml, xt as parseTelegramTarget, y as markdownToTelegramHtml, yt as listPairingChannels, z as buildTelegramGroupFrom } from "./send-DBqe2mPq.js";
|
|
26
|
+
import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-C-5VgbLB.js";
|
|
27
|
+
import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BaH_6win.js";
|
|
28
|
+
import { $ as buildPluginToolGroups, 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 applyOwnerOnlyToolPolicy, R as isTimeoutErrorMessage, S as getApiErrorPayloadFingerprint, T as isCloudCodeAssistFormatError, U as registerBrowserRoutes, V as resolveSandboxRuntimeStatus, W as resolveBrowserConfig, X as trimToUndefined$1, Y as resolveGatewayCredentialsFromConfig, Z as resolveSandboxConfigForAgent, _ as BILLING_ERROR_USER_MESSAGE, at as normalizeToolName, b as formatBillingErrorMessage, c as sanitizeSessionMessagesImages, ct as matchesAnyGlobPattern, d as resolveImageSanitizationLimits, dt as resolveBootstrapTotalMaxChars, et as collectExplicitAllowlist, f as canonicalizeBase64, ft as sanitizeGoogleTurnOrdering, g as isGoogleModelApi, h as downgradeOpenAIReasoningBlocks, i as pickFallbackThinkingLevel, it as expandToolGroups, j as isRateLimitAssistantError, k as isFailoverErrorMessage, l as sanitizeImageBlocks, lt as buildBootstrapContextFiles, m as downgradeOpenAIFunctionCallReasoningPairs, n as validateAnthropicTurns, nt as mergeAlsoAllowPolicy, o as isMessagingToolDuplicateNormalized, ot as resolveToolProfilePolicy, p as estimateBase64DecodedBytes, q as ensureBrowserControlAuth, r as validateGeminiTurns, rt as stripPluginOnlyAllowlist, s as normalizeTextForComparison, st as compileGlobPatterns, t as extractTextFromChatContent, tt as expandPolicyWithPluginGroups, u as sanitizeToolResultImages, ut as resolveBootstrapMaxChars, v as classifyFailoverReason, w as isBillingAssistantError, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as ensureSandboxWorkspaceForSession } from "./chat-content-C7_U4hJq.js";
|
|
29
|
+
import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, V as resolveClientIp, W as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-Bukcguhv.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-VN1CJK6W.js";
|
|
31
|
+
import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-E9ntDORB.js";
|
|
32
|
+
import { a as formatUncaughtError, c as readErrorName, i as formatErrorMessage, o as hasErrnoCode, r as formatErrorChainMessage, t as collectErrorGraphCandidates } from "./errors-COs_vQr3.js";
|
|
33
|
+
import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-BK5ALzKD.js";
|
|
34
|
+
import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-BxR4m86L.js";
|
|
35
|
+
import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-HgGweM4u.js";
|
|
36
36
|
import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-Cj-XaaTu.js";
|
|
37
37
|
import { n as readJsonFile, r as writeJsonAtomic, t as createAsyncLock } 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 { t as ensureOpenClawModelsJson } from "./models-config-
|
|
40
|
-
import { C as loadModelCatalog, S as findModelInCatalog, _ as stripCarriedTranscriptFromBody, a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as modelSupportsVision, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-
|
|
41
|
-
import { a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, g as isInsideCode, h as findCodeRegions, 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-
|
|
42
|
-
import { a as coerceImageModelConfig, i as coerceImageAssistantText, o as decodeDataUrl, r as minimaxUnderstandImage, s as resolveProviderVisionModelFromConfig } from "./provider-image-
|
|
43
|
-
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-
|
|
39
|
+
import { t as ensureOpenClawModelsJson } from "./models-config-CJUMccZW.js";
|
|
40
|
+
import { C as loadModelCatalog, S as findModelInCatalog, _ as stripCarriedTranscriptFromBody, a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as modelSupportsVision, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-DZa96tEn.js";
|
|
41
|
+
import { a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, g as isInsideCode, h as findCodeRegions, 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-C7ErjdjF.js";
|
|
42
|
+
import { a as coerceImageModelConfig, i as coerceImageAssistantText, o as decodeDataUrl, r as minimaxUnderstandImage, s as resolveProviderVisionModelFromConfig } from "./provider-image-DVTuOv92.js";
|
|
43
|
+
import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-B1ohBh6A.js";
|
|
44
44
|
import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Dyj5Y_Ss.js";
|
|
45
|
-
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-
|
|
46
|
-
import { r as makeProxyFetch } from "./proxy-fetch-
|
|
47
|
-
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-
|
|
45
|
+
import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-BXzVwvnJ.js";
|
|
46
|
+
import { r as makeProxyFetch } from "./proxy-fetch-g109vqdt.js";
|
|
47
|
+
import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-C-DjHvQK.js";
|
|
48
48
|
import { n as isSafeFenceBreak, r as parseFenceSpans, t as findFenceSpanAt } from "./fences-RrqZTgHp.js";
|
|
49
|
-
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-
|
|
50
|
-
import { n as resolveMarkdownTableMode } from "./markdown-tables-
|
|
51
|
-
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-
|
|
52
|
-
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-
|
|
53
|
-
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording
|
|
54
|
-
import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-
|
|
55
|
-
import { a as clearDelayedReleaseHold, c as mergeDelayedAgentTurn, d as WORKSPACE_LANE_DENIED_REASON, f as KeyedAsyncQueue, i as agentTurnIdempotencyKey, l as peekDelayedAgentTurn, n as getAgentTurnRuntime, o as enqueueAgentTurn, r as tryGetAgentTurnRuntime, s as isClaimableAgentTurnWorkId, u as setDelayedReleaseHold } from "./agent-turn-runner-
|
|
56
|
-
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-
|
|
57
|
-
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-
|
|
58
|
-
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-
|
|
59
|
-
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-
|
|
49
|
+
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-CEygNI3g.js";
|
|
50
|
+
import { n as resolveMarkdownTableMode } from "./markdown-tables-DfLMw9ti.js";
|
|
51
|
+
import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-DioI2VyB.js";
|
|
52
|
+
import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-Cof4HjvY.js";
|
|
53
|
+
import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-B1HujJiT.js";
|
|
54
|
+
import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-Clg9Kbqu.js";
|
|
55
|
+
import { a as clearDelayedReleaseHold, c as mergeDelayedAgentTurn, d as WORKSPACE_LANE_DENIED_REASON, f as KeyedAsyncQueue, i as agentTurnIdempotencyKey, l as peekDelayedAgentTurn, n as getAgentTurnRuntime, o as enqueueAgentTurn, r as tryGetAgentTurnRuntime, s as isClaimableAgentTurnWorkId, u as setDelayedReleaseHold } from "./agent-turn-runner-CpsTt9uv.js";
|
|
56
|
+
import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-CAOvM2sb.js";
|
|
57
|
+
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-BIt97Q-K.js";
|
|
58
|
+
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-DUHpZ2aL.js";
|
|
59
|
+
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-CpY1AlyA.js";
|
|
60
60
|
import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-CYjjc71l.js";
|
|
61
61
|
import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-BVyUaG_D.js";
|
|
62
|
-
import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-
|
|
62
|
+
import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-Kn1_ykXE.js";
|
|
63
63
|
import { t as buildOutboundMediaLoadOptions } from "./load-options-CkQ1z00p.js";
|
|
64
|
-
import { t as convertMarkdownTables } from "./tables
|
|
65
|
-
import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-
|
|
66
|
-
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-
|
|
67
|
-
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-
|
|
68
|
-
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-
|
|
69
|
-
import { t as createTelegramPollingTransport } from "./proxy-
|
|
70
|
-
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-
|
|
71
|
-
import { t as recordInboundSessionMetaSafe } from "./session-meta-
|
|
72
|
-
import { n as resolveMemorySearchConfig } from "./manager-
|
|
73
|
-
import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-
|
|
64
|
+
import { t as convertMarkdownTables } from "./tables-DkwNUhx1.js";
|
|
65
|
+
import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-CtSqkSzr.js";
|
|
66
|
+
import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-CsDSBjFo.js";
|
|
67
|
+
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-DQvfLvpJ.js";
|
|
68
|
+
import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-DKZiteo6.js";
|
|
69
|
+
import { t as createTelegramPollingTransport } from "./proxy-CrSpy5Aw.js";
|
|
70
|
+
import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-BKdOqGC9.js";
|
|
71
|
+
import { t as recordInboundSessionMetaSafe } from "./session-meta-5XI6vLtM.js";
|
|
72
|
+
import { n as resolveMemorySearchConfig } from "./manager-D728Thsn.js";
|
|
73
|
+
import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-B_2rETEo.js";
|
|
74
74
|
import { createRequire } from "node:module";
|
|
75
75
|
import * as path$1 from "node:path";
|
|
76
76
|
import path, { basename, isAbsolute, join } from "node:path";
|
|
77
|
-
import
|
|
77
|
+
import fs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
|
|
78
78
|
import os, { homedir } from "node:os";
|
|
79
|
-
import
|
|
80
|
-
import * as fs$
|
|
81
|
-
import fs, { open } from "node:fs/promises";
|
|
79
|
+
import JSON5 from "json5";
|
|
80
|
+
import * as fs$2 from "node:fs/promises";
|
|
81
|
+
import fs$1, { open } from "node:fs/promises";
|
|
82
82
|
import { inspect, isDeepStrictEqual, promisify } from "node:util";
|
|
83
83
|
import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
|
|
84
84
|
import { fileURLToPath } from "node:url";
|
|
@@ -2851,7 +2851,8 @@ async function textToSpeech(params) {
|
|
|
2851
2851
|
latencyMs: Date.now() - providerStart,
|
|
2852
2852
|
provider,
|
|
2853
2853
|
outputFormat: edgeResult.outputFormat,
|
|
2854
|
-
voiceCompatible
|
|
2854
|
+
voiceCompatible,
|
|
2855
|
+
...errors.length > 0 ? { fallbackErrors: [...errors] } : {}
|
|
2855
2856
|
};
|
|
2856
2857
|
}
|
|
2857
2858
|
const apiKey = resolveTtsApiKey(config, provider);
|
|
@@ -2911,7 +2912,8 @@ async function textToSpeech(params) {
|
|
|
2911
2912
|
latencyMs,
|
|
2912
2913
|
provider,
|
|
2913
2914
|
outputFormat: provider === "openai" ? output.openai : output.elevenlabs,
|
|
2914
|
-
voiceCompatible: output.voiceCompatible
|
|
2915
|
+
voiceCompatible: output.voiceCompatible,
|
|
2916
|
+
...errors.length > 0 ? { fallbackErrors: [...errors] } : {}
|
|
2915
2917
|
};
|
|
2916
2918
|
} catch (err) {
|
|
2917
2919
|
errors.push(formatTtsProviderError(provider, err));
|
|
@@ -3255,7 +3257,7 @@ function setPromptSourceCacheEntry(key, entry) {
|
|
|
3255
3257
|
}
|
|
3256
3258
|
function readOpenFileUtf8(fd) {
|
|
3257
3259
|
return new Promise((resolve, reject) => {
|
|
3258
|
-
|
|
3260
|
+
fs.readFile(fd, "utf-8", (error, data) => {
|
|
3259
3261
|
if (error) {
|
|
3260
3262
|
reject(error);
|
|
3261
3263
|
return;
|
|
@@ -3266,7 +3268,7 @@ function readOpenFileUtf8(fd) {
|
|
|
3266
3268
|
}
|
|
3267
3269
|
function closeOpenFile(fd) {
|
|
3268
3270
|
return new Promise((resolve, reject) => {
|
|
3269
|
-
|
|
3271
|
+
fs.close(fd, (error) => {
|
|
3270
3272
|
if (error) {
|
|
3271
3273
|
reject(error);
|
|
3272
3274
|
return;
|
|
@@ -3675,7 +3677,7 @@ function resolveWorkspaceLane(params) {
|
|
|
3675
3677
|
}
|
|
3676
3678
|
async function pathExists(targetPath) {
|
|
3677
3679
|
try {
|
|
3678
|
-
await fs.access(targetPath);
|
|
3680
|
+
await fs$1.access(targetPath);
|
|
3679
3681
|
return true;
|
|
3680
3682
|
} catch {
|
|
3681
3683
|
return false;
|
|
@@ -3683,7 +3685,7 @@ async function pathExists(targetPath) {
|
|
|
3683
3685
|
}
|
|
3684
3686
|
async function getExistingPathState(targetPath) {
|
|
3685
3687
|
try {
|
|
3686
|
-
const stats = await fs.lstat(targetPath);
|
|
3688
|
+
const stats = await fs$1.lstat(targetPath);
|
|
3687
3689
|
if (stats.isSymbolicLink()) return "other";
|
|
3688
3690
|
return stats.isDirectory() ? "directory" : "other";
|
|
3689
3691
|
} catch {
|
|
@@ -3692,7 +3694,7 @@ async function getExistingPathState(targetPath) {
|
|
|
3692
3694
|
}
|
|
3693
3695
|
async function pathLexicallyExists(targetPath) {
|
|
3694
3696
|
try {
|
|
3695
|
-
await fs.lstat(targetPath);
|
|
3697
|
+
await fs$1.lstat(targetPath);
|
|
3696
3698
|
return true;
|
|
3697
3699
|
} catch {
|
|
3698
3700
|
return false;
|
|
@@ -3713,9 +3715,9 @@ async function copyIfMissing(params) {
|
|
|
3713
3715
|
if (!opened.ok) return opened.reason === "path" ? "missing-source" : "invalid";
|
|
3714
3716
|
let content;
|
|
3715
3717
|
try {
|
|
3716
|
-
content =
|
|
3718
|
+
content = fs.readFileSync(opened.fd);
|
|
3717
3719
|
} finally {
|
|
3718
|
-
|
|
3720
|
+
fs.closeSync(opened.fd);
|
|
3719
3721
|
}
|
|
3720
3722
|
try {
|
|
3721
3723
|
await writeFileWithinRoot({
|
|
@@ -3759,7 +3761,7 @@ async function resolveWorkspaceLaneForTurn(params) {
|
|
|
3759
3761
|
const config = resolveWorkspaceLaneConfig(params.cfg, resolution.agentId);
|
|
3760
3762
|
if ((config?.create ?? "on-first-message") !== "on-first-message") return resolution;
|
|
3761
3763
|
const existed = pathState === "directory";
|
|
3762
|
-
if (!existed) await fs.mkdir(resolution.effectiveWorkspaceDir, { recursive: true });
|
|
3764
|
+
if (!existed) await fs$1.mkdir(resolution.effectiveWorkspaceDir, { recursive: true });
|
|
3763
3765
|
for (const file of config?.copiedOnCreate ?? DEFAULT_COPIED_ON_CREATE_FILES) {
|
|
3764
3766
|
const decision = await copyIfMissing({
|
|
3765
3767
|
sourceRoot: resolution.personaWorkspaceDir,
|
|
@@ -4083,7 +4085,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
4083
4085
|
const workspaceDir = params.workspaceDir?.trim();
|
|
4084
4086
|
if (workspaceDir) {
|
|
4085
4087
|
const workspaceDocs = path.join(workspaceDir, "docs");
|
|
4086
|
-
if (
|
|
4088
|
+
if (fs.existsSync(workspaceDocs)) return workspaceDocs;
|
|
4087
4089
|
}
|
|
4088
4090
|
const packageRoot = await resolveOpenClawPackageRoot({
|
|
4089
4091
|
cwd: params.cwd,
|
|
@@ -4092,7 +4094,7 @@ async function resolveOpenClawDocsPath(params) {
|
|
|
4092
4094
|
});
|
|
4093
4095
|
if (packageRoot) {
|
|
4094
4096
|
const packageDocs = path.join(packageRoot, "docs");
|
|
4095
|
-
if (
|
|
4097
|
+
if (fs.existsSync(path.join(packageDocs, "docs.json"))) return packageDocs;
|
|
4096
4098
|
}
|
|
4097
4099
|
return DOCS_SITE_URL;
|
|
4098
4100
|
}
|
|
@@ -6566,7 +6568,7 @@ async function imageResult(params) {
|
|
|
6566
6568
|
}, params.label, params.imageSanitization);
|
|
6567
6569
|
}
|
|
6568
6570
|
async function imageResultFromFile(params) {
|
|
6569
|
-
const buf = await fs.readFile(params.path);
|
|
6571
|
+
const buf = await fs$1.readFile(params.path);
|
|
6570
6572
|
const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
|
|
6571
6573
|
return await imageResult({
|
|
6572
6574
|
label: params.label,
|
|
@@ -7477,7 +7479,7 @@ async function resolveAgentSessionDirs(stateDir) {
|
|
|
7477
7479
|
const agentsDir = path.join(stateDir, "agents");
|
|
7478
7480
|
let entries = [];
|
|
7479
7481
|
try {
|
|
7480
|
-
entries = await fs.readdir(agentsDir, { withFileTypes: true });
|
|
7482
|
+
entries = await fs$1.readdir(agentsDir, { withFileTypes: true });
|
|
7481
7483
|
} catch (err) {
|
|
7482
7484
|
if (err.code === "ENOENT") return [];
|
|
7483
7485
|
throw err;
|
|
@@ -8939,7 +8941,7 @@ function resolveDefaultIdentityPath() {
|
|
|
8939
8941
|
return path.join(resolveStateDir(), "identity", "device.json");
|
|
8940
8942
|
}
|
|
8941
8943
|
function ensureDir$2(filePath) {
|
|
8942
|
-
|
|
8944
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
8943
8945
|
}
|
|
8944
8946
|
const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
|
|
8945
8947
|
function base64UrlEncode(buf) {
|
|
@@ -8975,8 +8977,8 @@ function generateIdentity() {
|
|
|
8975
8977
|
}
|
|
8976
8978
|
function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
8977
8979
|
try {
|
|
8978
|
-
if (
|
|
8979
|
-
const raw =
|
|
8980
|
+
if (fs.existsSync(filePath)) {
|
|
8981
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
8980
8982
|
const parsed = JSON.parse(raw);
|
|
8981
8983
|
if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
|
|
8982
8984
|
const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
|
|
@@ -8985,9 +8987,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
8985
8987
|
...parsed,
|
|
8986
8988
|
deviceId: derivedId
|
|
8987
8989
|
};
|
|
8988
|
-
|
|
8990
|
+
fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
|
|
8989
8991
|
try {
|
|
8990
|
-
|
|
8992
|
+
fs.chmodSync(filePath, 384);
|
|
8991
8993
|
} catch {}
|
|
8992
8994
|
return {
|
|
8993
8995
|
deviceId: derivedId,
|
|
@@ -9012,9 +9014,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
|
|
|
9012
9014
|
privateKeyPem: identity.privateKeyPem,
|
|
9013
9015
|
createdAtMs: Date.now()
|
|
9014
9016
|
};
|
|
9015
|
-
|
|
9017
|
+
fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
|
|
9016
9018
|
try {
|
|
9017
|
-
|
|
9019
|
+
fs.chmodSync(filePath, 384);
|
|
9018
9020
|
} catch {}
|
|
9019
9021
|
return identity;
|
|
9020
9022
|
}
|
|
@@ -9037,7 +9039,7 @@ function normalizeFingerprint(input) {
|
|
|
9037
9039
|
const execFileAsync = promisify(execFile);
|
|
9038
9040
|
async function fileExists(filePath) {
|
|
9039
9041
|
try {
|
|
9040
|
-
await fs.access(filePath);
|
|
9042
|
+
await fs$1.access(filePath);
|
|
9041
9043
|
return true;
|
|
9042
9044
|
} catch {
|
|
9043
9045
|
return false;
|
|
@@ -9064,8 +9066,8 @@ async function generateSelfSignedCert(params) {
|
|
|
9064
9066
|
"-subj",
|
|
9065
9067
|
"/CN=openclaw-gateway"
|
|
9066
9068
|
]);
|
|
9067
|
-
await fs.chmod(params.keyPath, 384).catch(() => {});
|
|
9068
|
-
await fs.chmod(params.certPath, 384).catch(() => {});
|
|
9069
|
+
await fs$1.chmod(params.keyPath, 384).catch(() => {});
|
|
9070
|
+
await fs$1.chmod(params.certPath, 384).catch(() => {});
|
|
9069
9071
|
params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
|
|
9070
9072
|
}
|
|
9071
9073
|
async function loadGatewayTlsRuntime(cfg, log) {
|
|
@@ -9103,9 +9105,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
|
|
|
9103
9105
|
error: "gateway tls: cert/key missing"
|
|
9104
9106
|
};
|
|
9105
9107
|
try {
|
|
9106
|
-
const cert = await fs.readFile(certPath, "utf8");
|
|
9107
|
-
const key = await fs.readFile(keyPath, "utf8");
|
|
9108
|
-
const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
|
|
9108
|
+
const cert = await fs$1.readFile(certPath, "utf8");
|
|
9109
|
+
const key = await fs$1.readFile(keyPath, "utf8");
|
|
9110
|
+
const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
|
|
9109
9111
|
const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
|
|
9110
9112
|
if (!fingerprintSha256) return {
|
|
9111
9113
|
enabled: false,
|
|
@@ -9206,8 +9208,8 @@ function resolveDeviceAuthPath(env = process.env) {
|
|
|
9206
9208
|
}
|
|
9207
9209
|
function readStore(filePath) {
|
|
9208
9210
|
try {
|
|
9209
|
-
if (!
|
|
9210
|
-
const raw =
|
|
9211
|
+
if (!fs.existsSync(filePath)) return null;
|
|
9212
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
9211
9213
|
const parsed = JSON.parse(raw);
|
|
9212
9214
|
if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
|
|
9213
9215
|
if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
|
|
@@ -9217,10 +9219,10 @@ function readStore(filePath) {
|
|
|
9217
9219
|
}
|
|
9218
9220
|
}
|
|
9219
9221
|
function writeStore(filePath, store) {
|
|
9220
|
-
|
|
9221
|
-
|
|
9222
|
+
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
9223
|
+
fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
|
|
9222
9224
|
try {
|
|
9223
|
-
|
|
9225
|
+
fs.chmodSync(filePath, 384);
|
|
9224
9226
|
} catch {}
|
|
9225
9227
|
}
|
|
9226
9228
|
function loadDeviceAuthToken(params) {
|
|
@@ -10917,6 +10919,8 @@ const SessionsPreviewParamsSchema = Type.Object({
|
|
|
10917
10919
|
limit: Type.Optional(Type.Integer({ minimum: 1 })),
|
|
10918
10920
|
maxChars: Type.Optional(Type.Integer({ minimum: 20 }))
|
|
10919
10921
|
}, { additionalProperties: false });
|
|
10922
|
+
const SessionsDirectParamsSchema = Type.Object({ agentId: Type.Optional(NonEmptyString) }, { additionalProperties: false });
|
|
10923
|
+
const SessionsDirectResultSchema = Type.Object({ key: NonEmptyString }, { additionalProperties: false });
|
|
10920
10924
|
const SessionsResolveParamsSchema = Type.Object({
|
|
10921
10925
|
key: Type.Optional(NonEmptyString),
|
|
10922
10926
|
sessionId: Type.Optional(NonEmptyString),
|
|
@@ -11583,6 +11587,7 @@ const validateSessionsInterruptParams = ajv.compile(SessionsInterruptParamsSchem
|
|
|
11583
11587
|
const validateSessionsRunsContinueParams = ajv.compile(SessionsRunsContinueParamsSchema);
|
|
11584
11588
|
const validateSessionsRunsCancelParams = ajv.compile(SessionsRunsCancelParamsSchema);
|
|
11585
11589
|
const validateSessionsPreviewParams = ajv.compile(SessionsPreviewParamsSchema);
|
|
11590
|
+
const validateSessionsDirectParams = ajv.compile(SessionsDirectParamsSchema);
|
|
11586
11591
|
const validateSessionsResolveParams = ajv.compile(SessionsResolveParamsSchema);
|
|
11587
11592
|
const validateSessionsPatchParams = ajv.compile(SessionsPatchParamsSchema);
|
|
11588
11593
|
const validateSessionsTitlePrepareParams = ajv.compile(SessionsTitlePrepareParamsSchema);
|
|
@@ -12119,6 +12124,7 @@ const METHOD_SCOPE_GROUPS = {
|
|
|
12119
12124
|
"sessions.compaction.list",
|
|
12120
12125
|
"sessions.export",
|
|
12121
12126
|
"sessions.preview",
|
|
12127
|
+
"sessions.direct",
|
|
12122
12128
|
"sessions.resolve",
|
|
12123
12129
|
"sessions.usage",
|
|
12124
12130
|
"sessions.usage.timeseries",
|
|
@@ -12275,6 +12281,7 @@ const NARROW_SESSION_READ_METHODS = [
|
|
|
12275
12281
|
"sessions.describe",
|
|
12276
12282
|
"sessions.compaction.list",
|
|
12277
12283
|
"sessions.resolve",
|
|
12284
|
+
"sessions.direct",
|
|
12278
12285
|
"sessions.subscribe",
|
|
12279
12286
|
"chat.history",
|
|
12280
12287
|
"chat.surfaces.list",
|
|
@@ -13464,7 +13471,7 @@ async function routeReply(params) {
|
|
|
13464
13471
|
const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
|
|
13465
13472
|
const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
|
|
13466
13473
|
try {
|
|
13467
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
13474
|
+
const { deliverOutboundPayloads } = await import("./deliver-CpY1AlyA.js").then((n) => n.n);
|
|
13468
13475
|
const outboundSession = buildOutboundSessionContext({
|
|
13469
13476
|
cfg,
|
|
13470
13477
|
agentId: resolvedAgentId,
|
|
@@ -15086,7 +15093,7 @@ async function sendTranscriptEcho(params) {
|
|
|
15086
15093
|
}
|
|
15087
15094
|
const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
|
|
15088
15095
|
try {
|
|
15089
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
15096
|
+
const { deliverOutboundPayloads } = await import("./deliver-CpY1AlyA.js").then((n) => n.n);
|
|
15090
15097
|
await deliverOutboundPayloads({
|
|
15091
15098
|
cfg,
|
|
15092
15099
|
channel: normalizedChannel,
|
|
@@ -19379,7 +19386,7 @@ function mergeLegacyAgent(current, legacy) {
|
|
|
19379
19386
|
}
|
|
19380
19387
|
function ensureDir$1(filePath) {
|
|
19381
19388
|
const dir = path.dirname(filePath);
|
|
19382
|
-
|
|
19389
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
19383
19390
|
}
|
|
19384
19391
|
function coerceAllowlistEntries(allowlist) {
|
|
19385
19392
|
if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
|
|
@@ -19449,11 +19456,11 @@ function generateToken() {
|
|
|
19449
19456
|
function loadExecApprovals() {
|
|
19450
19457
|
const filePath = resolveExecApprovalsPath();
|
|
19451
19458
|
try {
|
|
19452
|
-
if (!
|
|
19459
|
+
if (!fs.existsSync(filePath)) return normalizeExecApprovals({
|
|
19453
19460
|
version: 1,
|
|
19454
19461
|
agents: {}
|
|
19455
19462
|
});
|
|
19456
|
-
const raw =
|
|
19463
|
+
const raw = fs.readFileSync(filePath, "utf8");
|
|
19457
19464
|
const parsed = JSON.parse(raw);
|
|
19458
19465
|
if (parsed?.version !== 1) return normalizeExecApprovals({
|
|
19459
19466
|
version: 1,
|
|
@@ -19470,9 +19477,9 @@ function loadExecApprovals() {
|
|
|
19470
19477
|
function saveExecApprovals(file) {
|
|
19471
19478
|
const filePath = resolveExecApprovalsPath();
|
|
19472
19479
|
ensureDir$1(filePath);
|
|
19473
|
-
|
|
19480
|
+
fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
|
|
19474
19481
|
try {
|
|
19475
|
-
|
|
19482
|
+
fs.chmodSync(filePath, 384);
|
|
19476
19483
|
} catch {}
|
|
19477
19484
|
}
|
|
19478
19485
|
function ensureExecApprovals() {
|
|
@@ -20038,18 +20045,18 @@ function peekSystemEventEntries(sessionKey) {
|
|
|
20038
20045
|
function resolvePowerShellPath() {
|
|
20039
20046
|
const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
|
|
20040
20047
|
const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
|
|
20041
|
-
if (
|
|
20048
|
+
if (fs.existsSync(pwsh7)) return pwsh7;
|
|
20042
20049
|
const programW6432 = process.env.ProgramW6432;
|
|
20043
20050
|
if (programW6432 && programW6432 !== programFiles) {
|
|
20044
20051
|
const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
|
|
20045
|
-
if (
|
|
20052
|
+
if (fs.existsSync(pwsh7Alt)) return pwsh7Alt;
|
|
20046
20053
|
}
|
|
20047
20054
|
const pwshInPath = resolveShellFromPath("pwsh");
|
|
20048
20055
|
if (pwshInPath) return pwshInPath;
|
|
20049
20056
|
const systemRoot = process.env.SystemRoot || process.env.WINDIR;
|
|
20050
20057
|
if (systemRoot) {
|
|
20051
20058
|
const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
|
|
20052
|
-
if (
|
|
20059
|
+
if (fs.existsSync(candidate)) return candidate;
|
|
20053
20060
|
}
|
|
20054
20061
|
return "powershell.exe";
|
|
20055
20062
|
}
|
|
@@ -20087,7 +20094,7 @@ function resolveShellFromPath(name) {
|
|
|
20087
20094
|
for (const entry of entries) {
|
|
20088
20095
|
const candidate = path.join(entry, name);
|
|
20089
20096
|
try {
|
|
20090
|
-
|
|
20097
|
+
fs.accessSync(candidate, fs.constants.X_OK);
|
|
20091
20098
|
return candidate;
|
|
20092
20099
|
} catch {}
|
|
20093
20100
|
}
|
|
@@ -21025,7 +21032,7 @@ async function resolveSandboxWorkdir(params) {
|
|
|
21025
21032
|
cwd: process.cwd(),
|
|
21026
21033
|
root: params.sandbox.workspaceDir
|
|
21027
21034
|
});
|
|
21028
|
-
if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
21035
|
+
if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
|
|
21029
21036
|
const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
|
|
21030
21037
|
const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
|
|
21031
21038
|
return {
|
|
@@ -22415,13 +22422,13 @@ async function validateScriptFileForShellBleed(params) {
|
|
|
22415
22422
|
cwd: params.workdir,
|
|
22416
22423
|
root: params.workdir
|
|
22417
22424
|
});
|
|
22418
|
-
stat = await fs.stat(absPath);
|
|
22425
|
+
stat = await fs$1.stat(absPath);
|
|
22419
22426
|
} catch {
|
|
22420
22427
|
return;
|
|
22421
22428
|
}
|
|
22422
22429
|
if (!stat.isFile()) return;
|
|
22423
22430
|
if (stat.size > 512 * 1024) return;
|
|
22424
|
-
const content = await fs.readFile(absPath, "utf-8");
|
|
22431
|
+
const content = await fs$1.readFile(absPath, "utf-8");
|
|
22425
22432
|
const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
|
|
22426
22433
|
if (first) {
|
|
22427
22434
|
const idx = first.index;
|
|
@@ -23864,7 +23871,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
|
|
|
23864
23871
|
function hasGitMarker(repoRoot) {
|
|
23865
23872
|
const gitPath = path.join(repoRoot, ".git");
|
|
23866
23873
|
try {
|
|
23867
|
-
const stat =
|
|
23874
|
+
const stat = fs.statSync(gitPath);
|
|
23868
23875
|
return stat.isDirectory() || stat.isFile();
|
|
23869
23876
|
} catch {
|
|
23870
23877
|
return false;
|
|
@@ -23876,10 +23883,10 @@ function findGitRoot(startDir, opts = {}) {
|
|
|
23876
23883
|
function resolveGitDirFromMarker(repoRoot) {
|
|
23877
23884
|
const gitPath = path.join(repoRoot, ".git");
|
|
23878
23885
|
try {
|
|
23879
|
-
const stat =
|
|
23886
|
+
const stat = fs.statSync(gitPath);
|
|
23880
23887
|
if (stat.isDirectory()) return gitPath;
|
|
23881
23888
|
if (!stat.isFile()) return null;
|
|
23882
|
-
const match =
|
|
23889
|
+
const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
|
|
23883
23890
|
if (!match?.[1]) return null;
|
|
23884
23891
|
return path.resolve(repoRoot, match[1].trim());
|
|
23885
23892
|
} catch {
|
|
@@ -23946,7 +23953,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
23946
23953
|
cachedCommit = null;
|
|
23947
23954
|
return cachedCommit;
|
|
23948
23955
|
}
|
|
23949
|
-
const head =
|
|
23956
|
+
const head = fs.readFileSync(headPath, "utf-8").trim();
|
|
23950
23957
|
if (!head) {
|
|
23951
23958
|
cachedCommit = null;
|
|
23952
23959
|
return cachedCommit;
|
|
@@ -23954,7 +23961,7 @@ const resolveCommitHash = (options = {}) => {
|
|
|
23954
23961
|
if (head.startsWith("ref:")) {
|
|
23955
23962
|
const ref = head.replace(/^ref:\s*/i, "").trim();
|
|
23956
23963
|
const refPath = path.resolve(path.dirname(headPath), ref);
|
|
23957
|
-
cachedCommit = formatCommit(
|
|
23964
|
+
cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
|
|
23958
23965
|
return cachedCommit;
|
|
23959
23966
|
}
|
|
23960
23967
|
cachedCommit = formatCommit(head);
|
|
@@ -28564,7 +28571,7 @@ function resolveRepoRoot(params) {
|
|
|
28564
28571
|
const configured = params.config?.agents?.defaults?.repoRoot?.trim();
|
|
28565
28572
|
if (configured) try {
|
|
28566
28573
|
const resolved = path.resolve(configured);
|
|
28567
|
-
if (
|
|
28574
|
+
if (fs.statSync(resolved).isDirectory()) return resolved;
|
|
28568
28575
|
} catch {}
|
|
28569
28576
|
const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
|
|
28570
28577
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -29081,7 +29088,7 @@ async function readForwardAndSort(query, sessionId) {
|
|
|
29081
29088
|
//#region src/auto-reply/reply/commands-export-session.ts
|
|
29082
29089
|
const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
|
|
29083
29090
|
function loadTemplate(fileName) {
|
|
29084
|
-
return
|
|
29091
|
+
return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
|
|
29085
29092
|
}
|
|
29086
29093
|
function generateHtml(sessionData) {
|
|
29087
29094
|
const template = loadTemplate("template.html");
|
|
@@ -29184,8 +29191,8 @@ async function buildExportSessionReply(params) {
|
|
|
29184
29191
|
const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
|
|
29185
29192
|
const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
|
|
29186
29193
|
const outputDir = path.dirname(outputPath);
|
|
29187
|
-
if (!
|
|
29188
|
-
|
|
29194
|
+
if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
|
|
29195
|
+
fs.writeFileSync(outputPath, html, "utf-8");
|
|
29189
29196
|
const relativePath = path.relative(params.workspaceDir, outputPath);
|
|
29190
29197
|
return { text: [
|
|
29191
29198
|
"✅ Session exported!",
|
|
@@ -29360,8 +29367,8 @@ function resolveZaiApiKey() {
|
|
|
29360
29367
|
}
|
|
29361
29368
|
try {
|
|
29362
29369
|
const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
|
|
29363
|
-
if (!
|
|
29364
|
-
const data = JSON.parse(
|
|
29370
|
+
if (!fs.existsSync(authPath)) return;
|
|
29371
|
+
const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
|
|
29365
29372
|
return data["z-ai"]?.access || data.zai?.access;
|
|
29366
29373
|
} catch {
|
|
29367
29374
|
return;
|
|
@@ -31178,7 +31185,7 @@ function shouldPersistAnyBindingState() {
|
|
|
31178
31185
|
}
|
|
31179
31186
|
function shouldPersistBindingMutations() {
|
|
31180
31187
|
if (shouldPersistAnyBindingState()) return true;
|
|
31181
|
-
return
|
|
31188
|
+
return fs.existsSync(resolveThreadBindingsPath());
|
|
31182
31189
|
}
|
|
31183
31190
|
function saveBindingsToDisk(params = {}) {
|
|
31184
31191
|
if (!params.force && !shouldPersistAnyBindingState()) return;
|
|
@@ -33785,8 +33792,8 @@ function normalizeSessionKey(value) {
|
|
|
33785
33792
|
}
|
|
33786
33793
|
function readSessionStore(storePath) {
|
|
33787
33794
|
try {
|
|
33788
|
-
const raw =
|
|
33789
|
-
const parsed =
|
|
33795
|
+
const raw = fs.readFileSync(storePath, "utf-8");
|
|
33796
|
+
const parsed = JSON5.parse(raw);
|
|
33790
33797
|
if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
|
|
33791
33798
|
} catch {}
|
|
33792
33799
|
return {};
|
|
@@ -35460,7 +35467,7 @@ async function createModelSelectionState(params) {
|
|
|
35460
35467
|
}
|
|
35461
35468
|
}
|
|
35462
35469
|
if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
|
|
35463
|
-
const { ensureAuthProfileStore } = await import("./model-selection-
|
|
35470
|
+
const { ensureAuthProfileStore } = await import("./model-selection-BHGpQSa9.js").then((n) => n.P);
|
|
35464
35471
|
const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
|
|
35465
35472
|
const providerKey = normalizeProviderId(provider);
|
|
35466
35473
|
if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
|
|
@@ -38983,7 +38990,7 @@ function asBoolean(value) {
|
|
|
38983
38990
|
}
|
|
38984
38991
|
function resolveTempPathParts(opts) {
|
|
38985
38992
|
const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
|
|
38986
|
-
if (!opts.tmpDir)
|
|
38993
|
+
if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
|
|
38987
38994
|
recursive: true,
|
|
38988
38995
|
mode: 448
|
|
38989
38996
|
});
|
|
@@ -39069,7 +39076,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
39069
39076
|
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}`);
|
|
39070
39077
|
const body = res.body;
|
|
39071
39078
|
if (!body) throw new Error(`failed to download ${url}: empty response body`);
|
|
39072
|
-
const fileHandle = await fs$
|
|
39079
|
+
const fileHandle = await fs$2.open(filePath, "w");
|
|
39073
39080
|
let thrown;
|
|
39074
39081
|
try {
|
|
39075
39082
|
const reader = body.getReader();
|
|
@@ -39087,7 +39094,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
39087
39094
|
await fileHandle.close();
|
|
39088
39095
|
}
|
|
39089
39096
|
if (thrown) {
|
|
39090
|
-
await fs$
|
|
39097
|
+
await fs$2.unlink(filePath).catch(() => {});
|
|
39091
39098
|
throw thrown;
|
|
39092
39099
|
}
|
|
39093
39100
|
} finally {
|
|
@@ -39100,7 +39107,7 @@ async function writeUrlToFile(filePath, url, opts) {
|
|
|
39100
39107
|
}
|
|
39101
39108
|
async function writeBase64ToFile(filePath, base64) {
|
|
39102
39109
|
const buf = Buffer.from(base64, "base64");
|
|
39103
|
-
await fs$
|
|
39110
|
+
await fs$2.writeFile(filePath, buf);
|
|
39104
39111
|
return {
|
|
39105
39112
|
path: filePath,
|
|
39106
39113
|
bytes: buf.length
|
|
@@ -39185,7 +39192,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
39185
39192
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
|
|
39186
39193
|
throw new Error("jsonlPath outside allowed roots");
|
|
39187
39194
|
}
|
|
39188
|
-
const canonical = await fs.realpath(resolved).catch(() => resolved);
|
|
39195
|
+
const canonical = await fs$1.realpath(resolved).catch(() => resolved);
|
|
39189
39196
|
if (!isInboundPathAllowed({
|
|
39190
39197
|
filePath: canonical,
|
|
39191
39198
|
roots
|
|
@@ -39193,7 +39200,7 @@ async function readJsonlFromPath(jsonlPath) {
|
|
|
39193
39200
|
if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
|
|
39194
39201
|
throw new Error("jsonlPath outside allowed roots");
|
|
39195
39202
|
}
|
|
39196
|
-
return await fs.readFile(canonical, "utf8");
|
|
39203
|
+
return await fs$1.readFile(canonical, "utf8");
|
|
39197
39204
|
}
|
|
39198
39205
|
const CanvasToolSchema = Type.Object({
|
|
39199
39206
|
action: stringEnum(CANVAS_ACTIONS),
|
|
@@ -40044,12 +40051,12 @@ function resolveRestartSentinelPath(env = process.env) {
|
|
|
40044
40051
|
}
|
|
40045
40052
|
async function writeRestartSentinel(payload, env = process.env) {
|
|
40046
40053
|
const filePath = resolveRestartSentinelPath(env);
|
|
40047
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
40054
|
+
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
40048
40055
|
const data = {
|
|
40049
40056
|
version: 1,
|
|
40050
40057
|
payload
|
|
40051
40058
|
};
|
|
40052
|
-
await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
40059
|
+
await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
|
|
40053
40060
|
return filePath;
|
|
40054
40061
|
}
|
|
40055
40062
|
|
|
@@ -42491,9 +42498,9 @@ function loadExternalCatalogEntries(options) {
|
|
|
42491
42498
|
const entries = [];
|
|
42492
42499
|
for (const rawPath of paths) {
|
|
42493
42500
|
const resolved = resolveUserPath(rawPath);
|
|
42494
|
-
if (!
|
|
42501
|
+
if (!fs.existsSync(resolved)) continue;
|
|
42495
42502
|
try {
|
|
42496
|
-
const payload = JSON.parse(
|
|
42503
|
+
const payload = JSON.parse(fs.readFileSync(resolved, "utf-8"));
|
|
42497
42504
|
entries.push(...parseCatalogEntries(payload));
|
|
42498
42505
|
} catch {}
|
|
42499
42506
|
}
|
|
@@ -51556,18 +51563,18 @@ function appendImagePathsToPrompt(prompt, paths) {
|
|
|
51556
51563
|
return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
|
|
51557
51564
|
}
|
|
51558
51565
|
async function writeCliImages(images) {
|
|
51559
|
-
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
|
|
51566
|
+
const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
|
|
51560
51567
|
const paths = [];
|
|
51561
51568
|
for (let i = 0; i < images.length; i += 1) {
|
|
51562
51569
|
const image = images[i];
|
|
51563
51570
|
const ext = resolveImageExtension(image.mimeType);
|
|
51564
51571
|
const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
|
|
51565
51572
|
const buffer = Buffer.from(image.data, "base64");
|
|
51566
|
-
await fs.writeFile(filePath, buffer, { mode: 384 });
|
|
51573
|
+
await fs$1.writeFile(filePath, buffer, { mode: 384 });
|
|
51567
51574
|
paths.push(filePath);
|
|
51568
51575
|
}
|
|
51569
51576
|
const cleanup = async () => {
|
|
51570
|
-
await fs.rm(tempDir, {
|
|
51577
|
+
await fs$1.rm(tempDir, {
|
|
51571
51578
|
recursive: true,
|
|
51572
51579
|
force: true
|
|
51573
51580
|
});
|
|
@@ -53991,9 +53998,9 @@ async function readPostCompactionContext(workspaceDir) {
|
|
|
53991
53998
|
if (!opened.ok) return null;
|
|
53992
53999
|
const sections = extractSections((() => {
|
|
53993
54000
|
try {
|
|
53994
|
-
return
|
|
54001
|
+
return fs.readFileSync(opened.fd, "utf-8");
|
|
53995
54002
|
} finally {
|
|
53996
|
-
|
|
54003
|
+
fs.closeSync(opened.fd);
|
|
53997
54004
|
}
|
|
53998
54005
|
})(), ["Session Startup", "Red Lines"]);
|
|
53999
54006
|
if (sections.length === 0) return null;
|
|
@@ -55234,7 +55241,7 @@ async function deliverSessionMaintenanceWarning(params) {
|
|
|
55234
55241
|
return;
|
|
55235
55242
|
}
|
|
55236
55243
|
try {
|
|
55237
|
-
const { deliverOutboundPayloads } = await import("./deliver-
|
|
55244
|
+
const { deliverOutboundPayloads } = await import("./deliver-CpY1AlyA.js").then((n) => n.n);
|
|
55238
55245
|
const outboundSession = buildOutboundSessionContext({
|
|
55239
55246
|
cfg: params.cfg,
|
|
55240
55247
|
sessionKey: params.sessionKey
|
|
@@ -56191,7 +56198,7 @@ async function stageSandboxMedia(params) {
|
|
|
56191
56198
|
const remoteMediaCacheDir = ctx.MediaRemoteHost ? path.join(workspaceDir, ".openclaw", "media", "remote-cache", sessionKey) : null;
|
|
56192
56199
|
const effectiveWorkspaceDir = sandbox?.workspaceDir ?? remoteMediaCacheDir;
|
|
56193
56200
|
if (!effectiveWorkspaceDir) return;
|
|
56194
|
-
await fs.mkdir(effectiveWorkspaceDir, { recursive: true });
|
|
56201
|
+
await fs$1.mkdir(effectiveWorkspaceDir, { recursive: true });
|
|
56195
56202
|
const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
|
|
56196
56203
|
cfg,
|
|
56197
56204
|
accountId: ctx.AccountId
|
|
@@ -56250,8 +56257,8 @@ async function stageLocalFileIntoRoot(params) {
|
|
|
56250
56257
|
}
|
|
56251
56258
|
async function stageRemoteFileIntoRoot(params) {
|
|
56252
56259
|
const tmpRoot = resolvePreferredOpenClawTmpDir();
|
|
56253
|
-
await fs.mkdir(tmpRoot, { recursive: true });
|
|
56254
|
-
const tmpDir = await fs.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
|
|
56260
|
+
await fs$1.mkdir(tmpRoot, { recursive: true });
|
|
56261
|
+
const tmpDir = await fs$1.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
|
|
56255
56262
|
const tmpPath = path.join(tmpDir, "download");
|
|
56256
56263
|
try {
|
|
56257
56264
|
await scpFile(params.remoteHost, params.remotePath, tmpPath);
|
|
@@ -56262,7 +56269,7 @@ async function stageRemoteFileIntoRoot(params) {
|
|
|
56262
56269
|
maxBytes: params.maxBytes
|
|
56263
56270
|
});
|
|
56264
56271
|
} finally {
|
|
56265
|
-
await fs.rm(tmpDir, {
|
|
56272
|
+
await fs$1.rm(tmpDir, {
|
|
56266
56273
|
recursive: true,
|
|
56267
56274
|
force: true
|
|
56268
56275
|
}).catch(() => {});
|
|
@@ -57431,7 +57438,7 @@ async function runModelGate(spec, ctx) {
|
|
|
57431
57438
|
const isolatedSessionId = randomNonce;
|
|
57432
57439
|
const isolatedRunId = randomNonce;
|
|
57433
57440
|
const tmpBaseDir = resolvePreferredOpenClawTmpDir();
|
|
57434
|
-
tmpDir = await fs.mkdtemp(path.join(tmpBaseDir, "wake-gate-"));
|
|
57441
|
+
tmpDir = await fs$1.mkdtemp(path.join(tmpBaseDir, "wake-gate-"));
|
|
57435
57442
|
const workspaceDir = tmpDir;
|
|
57436
57443
|
const prompt = spec.prompt ?? DEFAULT_MODEL_PROMPT;
|
|
57437
57444
|
const timeoutMs = spec.timeoutMs ?? DEFAULT_MODEL_TIMEOUT_MS;
|
|
@@ -57489,7 +57496,7 @@ async function runModelGate(spec, ctx) {
|
|
|
57489
57496
|
log$35.warn("model gate error", { error: err instanceof Error ? err.message : String(err) });
|
|
57490
57497
|
return { wake: false };
|
|
57491
57498
|
} finally {
|
|
57492
|
-
if (tmpDir) await fs.rm(tmpDir, {
|
|
57499
|
+
if (tmpDir) await fs$1.rm(tmpDir, {
|
|
57493
57500
|
recursive: true,
|
|
57494
57501
|
force: true
|
|
57495
57502
|
}).catch(() => void 0);
|
|
@@ -57719,7 +57726,7 @@ async function resolveHeartbeatPreflight(params) {
|
|
|
57719
57726
|
const workspaceDir = resolveAgentWorkspaceDir(params.cfg, params.agentId);
|
|
57720
57727
|
const heartbeatFilePath = path.join(workspaceDir, DEFAULT_HEARTBEAT_FILENAME);
|
|
57721
57728
|
try {
|
|
57722
|
-
if (isHeartbeatContentEffectivelyEmpty(await fs.readFile(heartbeatFilePath, "utf-8"))) return {
|
|
57729
|
+
if (isHeartbeatContentEffectivelyEmpty(await fs$1.readFile(heartbeatFilePath, "utf-8"))) return {
|
|
57723
57730
|
...basePreflight,
|
|
57724
57731
|
skipReason: "empty-heartbeat-file"
|
|
57725
57732
|
};
|
|
@@ -64957,8 +64964,8 @@ async function describeStickerImage(params) {
|
|
|
64957
64964
|
const { provider, model } = resolved;
|
|
64958
64965
|
logVerbose(`telegram: describing sticker with ${provider}/${model}`);
|
|
64959
64966
|
try {
|
|
64960
|
-
const buffer = await fs.readFile(imagePath);
|
|
64961
|
-
const { describeImageWithModel } = await import("./provider-image-
|
|
64967
|
+
const buffer = await fs$1.readFile(imagePath);
|
|
64968
|
+
const { describeImageWithModel } = await import("./provider-image-DVTuOv92.js").then((n) => n.n);
|
|
64962
64969
|
return (await describeImageWithModel({
|
|
64963
64970
|
buffer,
|
|
64964
64971
|
fileName: "sticker.webp",
|
|
@@ -66671,7 +66678,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
|
|
|
66671
66678
|
let transcript;
|
|
66672
66679
|
let carry;
|
|
66673
66680
|
if (needsPreflightTranscription) try {
|
|
66674
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
66681
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DnuyzcBj.js");
|
|
66675
66682
|
const uploadable = audioAttachments.filter((att) => typeof att.url === "string" && att.url.length > 0);
|
|
66676
66683
|
if (uploadable.length > 0) {
|
|
66677
66684
|
const preflight = await transcribeFirstAudio({
|
|
@@ -68132,7 +68139,7 @@ function identityHasValues(identity) {
|
|
|
68132
68139
|
}
|
|
68133
68140
|
function loadIdentityFromFile(identityPath) {
|
|
68134
68141
|
try {
|
|
68135
|
-
const parsed = parseIdentityMarkdown(
|
|
68142
|
+
const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
|
|
68136
68143
|
if (!identityHasValues(parsed)) return null;
|
|
68137
68144
|
return parsed;
|
|
68138
68145
|
} catch {
|
|
@@ -68156,7 +68163,7 @@ function resolveAvatarSource(cfg, agentId) {
|
|
|
68156
68163
|
}
|
|
68157
68164
|
function resolveExistingPath(value) {
|
|
68158
68165
|
try {
|
|
68159
|
-
return
|
|
68166
|
+
return fs.realpathSync(value);
|
|
68160
68167
|
} catch {
|
|
68161
68168
|
return path.resolve(value);
|
|
68162
68169
|
}
|
|
@@ -68174,7 +68181,7 @@ function resolveLocalAvatarPath(params) {
|
|
|
68174
68181
|
reason: "unsupported_extension"
|
|
68175
68182
|
};
|
|
68176
68183
|
try {
|
|
68177
|
-
const stat =
|
|
68184
|
+
const stat = fs.statSync(realPath);
|
|
68178
68185
|
if (!stat.isFile()) return {
|
|
68179
68186
|
ok: false,
|
|
68180
68187
|
reason: "missing"
|
|
@@ -73916,23 +73923,23 @@ function createDefaultDeps() {
|
|
|
73916
73923
|
};
|
|
73917
73924
|
},
|
|
73918
73925
|
sendMessageTelegram: async (...args) => {
|
|
73919
|
-
const { sendMessageTelegram } = await import("./send-
|
|
73926
|
+
const { sendMessageTelegram } = await import("./send-DBqe2mPq.js").then((n) => n.l);
|
|
73920
73927
|
return await sendMessageTelegram(...args);
|
|
73921
73928
|
},
|
|
73922
73929
|
sendMessageDiscord: async (...args) => {
|
|
73923
|
-
const { sendMessageDiscord } = await import("./send-
|
|
73930
|
+
const { sendMessageDiscord } = await import("./send-Bf4geLyV.js").then((n) => n.t);
|
|
73924
73931
|
return await sendMessageDiscord(...args);
|
|
73925
73932
|
},
|
|
73926
73933
|
sendMessageSlack: async (...args) => {
|
|
73927
|
-
const { sendMessageSlack } = await import("./send-
|
|
73934
|
+
const { sendMessageSlack } = await import("./send-bwKTbNlJ.js").then((n) => n.n);
|
|
73928
73935
|
return await sendMessageSlack(...args);
|
|
73929
73936
|
},
|
|
73930
73937
|
sendMessageSignal: async (...args) => {
|
|
73931
|
-
const { sendMessageSignal } = await import("./send-
|
|
73938
|
+
const { sendMessageSignal } = await import("./send-CsDSBjFo.js").then((n) => n.i);
|
|
73932
73939
|
return await sendMessageSignal(...args);
|
|
73933
73940
|
},
|
|
73934
73941
|
sendMessageIMessage: async (...args) => {
|
|
73935
|
-
const { sendMessageIMessage } = await import("./send-
|
|
73942
|
+
const { sendMessageIMessage } = await import("./send-DQvfLvpJ.js").then((n) => n.n);
|
|
73936
73943
|
return await sendMessageIMessage(...args);
|
|
73937
73944
|
}
|
|
73938
73945
|
};
|
|
@@ -75177,10 +75184,10 @@ function estimateDurationSeconds(pcm) {
|
|
|
75177
75184
|
return pcm.length / (bytesPerSample * SAMPLE_RATE);
|
|
75178
75185
|
}
|
|
75179
75186
|
async function writeWavFile(pcm) {
|
|
75180
|
-
const tempDir = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "discord-voice-"));
|
|
75187
|
+
const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "discord-voice-"));
|
|
75181
75188
|
const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
|
|
75182
75189
|
const wav = buildWavBuffer(pcm);
|
|
75183
|
-
await fs.writeFile(filePath, wav);
|
|
75190
|
+
await fs$1.writeFile(filePath, wav);
|
|
75184
75191
|
scheduleTempCleanup(tempDir);
|
|
75185
75192
|
return {
|
|
75186
75193
|
path: filePath,
|
|
@@ -75189,7 +75196,7 @@ async function writeWavFile(pcm) {
|
|
|
75189
75196
|
}
|
|
75190
75197
|
function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
|
|
75191
75198
|
setTimeout(() => {
|
|
75192
|
-
fs.rm(tempDir, {
|
|
75199
|
+
fs$1.rm(tempDir, {
|
|
75193
75200
|
recursive: true,
|
|
75194
75201
|
force: true
|
|
75195
75202
|
}).catch((err) => {
|
|
@@ -78970,7 +78977,7 @@ async function detectBinary(name) {
|
|
|
78970
78977
|
if (!isSafeExecutableValue(name)) return false;
|
|
78971
78978
|
const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
|
|
78972
78979
|
if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
|
|
78973
|
-
await fs.access(resolved);
|
|
78980
|
+
await fs$1.access(resolved);
|
|
78974
78981
|
return true;
|
|
78975
78982
|
} catch {
|
|
78976
78983
|
return false;
|
|
@@ -79634,7 +79641,7 @@ function normalizeAllowList$1(list) {
|
|
|
79634
79641
|
async function detectRemoteHostFromCliPath(cliPath) {
|
|
79635
79642
|
try {
|
|
79636
79643
|
const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
|
|
79637
|
-
const content = await fs.readFile(expanded, "utf8");
|
|
79644
|
+
const content = await fs$1.readFile(expanded, "utf8");
|
|
79638
79645
|
const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
|
|
79639
79646
|
if (userHostMatch) return userHostMatch[1];
|
|
79640
79647
|
return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
|
|
@@ -79970,7 +79977,7 @@ async function monitorIMessageProvider(opts = {}) {
|
|
|
79970
79977
|
function readFileIfExists(filePath) {
|
|
79971
79978
|
if (!filePath) return;
|
|
79972
79979
|
try {
|
|
79973
|
-
return
|
|
79980
|
+
return fs.readFileSync(filePath, "utf-8").trim();
|
|
79974
79981
|
} catch {
|
|
79975
79982
|
return;
|
|
79976
79983
|
}
|
|
@@ -80591,7 +80598,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
|
|
|
80591
80598
|
prefix: "line-media",
|
|
80592
80599
|
extension: getExtensionForContentType(contentType)
|
|
80593
80600
|
});
|
|
80594
|
-
await
|
|
80601
|
+
await fs.promises.writeFile(filePath, buffer);
|
|
80595
80602
|
logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
|
|
80596
80603
|
return {
|
|
80597
80604
|
path: filePath,
|
|
@@ -86403,7 +86410,7 @@ function readSlackExternalArgMenuToken(raw) {
|
|
|
86403
86410
|
}
|
|
86404
86411
|
let commandsRegistry;
|
|
86405
86412
|
async function getCommandsRegistry() {
|
|
86406
|
-
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-
|
|
86413
|
+
if (!commandsRegistry) commandsRegistry = await import("./commands-registry-Cof4HjvY.js").then((n) => n.n);
|
|
86407
86414
|
return commandsRegistry;
|
|
86408
86415
|
}
|
|
86409
86416
|
function encodeSlackCommandArgValue(parts) {
|
|
@@ -86733,14 +86740,14 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
86733
86740
|
const channelName = channelInfo?.name;
|
|
86734
86741
|
const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
|
|
86735
86742
|
const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
|
|
86736
|
-
import("./resolve-route-
|
|
86743
|
+
import("./resolve-route-DKZiteo6.js").then((n) => n.r),
|
|
86737
86744
|
import("./inbound-context-CYjjc71l.js").then((n) => n.n),
|
|
86738
86745
|
Promise.resolve().then(() => provider_dispatcher_exports)
|
|
86739
86746
|
]);
|
|
86740
86747
|
const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
|
|
86741
86748
|
import("./conversation-label-CrORLc0j.js").then((n) => n.t),
|
|
86742
|
-
import("./reply-prefix-
|
|
86743
|
-
import("./session-meta-
|
|
86749
|
+
import("./reply-prefix-C-DjHvQK.js").then((n) => n.n),
|
|
86750
|
+
import("./session-meta-5XI6vLtM.js").then((n) => n.n)
|
|
86744
86751
|
]);
|
|
86745
86752
|
const route = resolveAgentRoute({
|
|
86746
86753
|
cfg,
|
|
@@ -86805,9 +86812,9 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
86805
86812
|
});
|
|
86806
86813
|
const deliverSlashPayloads = async (replies) => {
|
|
86807
86814
|
const [{ deliverSlackSlashReplies }, { resolveChunkMode, resolveChunkNewlinePacking }, { resolveMarkdownTableMode }] = await Promise.all([
|
|
86808
|
-
import("./replies-
|
|
86809
|
-
import("./chunk-
|
|
86810
|
-
import("./markdown-tables-
|
|
86815
|
+
import("./replies-BKdOqGC9.js").then((n) => n.r),
|
|
86816
|
+
import("./chunk-CEygNI3g.js").then((n) => n.s),
|
|
86817
|
+
import("./markdown-tables-DfLMw9ti.js").then((n) => n.t)
|
|
86811
86818
|
]);
|
|
86812
86819
|
await deliverSlackSlashReplies({
|
|
86813
86820
|
replies,
|
|
@@ -86861,7 +86868,7 @@ async function registerSlackMonitorSlashCommands(params) {
|
|
|
86861
86868
|
let nativeCommands = [];
|
|
86862
86869
|
if (nativeEnabled) {
|
|
86863
86870
|
reg = await getCommandsRegistry();
|
|
86864
|
-
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-
|
|
86871
|
+
const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-CAOvM2sb.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
|
|
86865
86872
|
nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
|
|
86866
86873
|
skillCommands,
|
|
86867
86874
|
provider: "slack"
|
|
@@ -87380,7 +87387,7 @@ async function auditTelegramGroupMembership(params) {
|
|
|
87380
87387
|
groups: [],
|
|
87381
87388
|
elapsedMs: Date.now() - started
|
|
87382
87389
|
};
|
|
87383
|
-
const fetcher = params.proxyUrl ? (await import("./proxy-
|
|
87390
|
+
const fetcher = params.proxyUrl ? (await import("./proxy-CrSpy5Aw.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
|
|
87384
87391
|
const { fetchWithTimeout } = await import("./fetch-timeout-Dyj5Y_Ss.js").then((n) => n.r);
|
|
87385
87392
|
const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
|
|
87386
87393
|
const groups = [];
|
|
@@ -89939,7 +89946,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
|
|
|
89939
89946
|
let audioPreflightCarry;
|
|
89940
89947
|
const audioConfigEnabled = cfg.tools?.media?.audio && cfg.tools.media.audio.enabled !== false;
|
|
89941
89948
|
if (hasAudio && !hasUserText && !disableAudioPreflight && (isGroup && requireMention && mentionRegexes.length > 0 || audioConfigEnabled === true)) try {
|
|
89942
|
-
const { transcribeFirstAudio } = await import("./audio-preflight-
|
|
89949
|
+
const { transcribeFirstAudio } = await import("./audio-preflight-DnuyzcBj.js");
|
|
89943
89950
|
const preflight = await transcribeFirstAudio({
|
|
89944
89951
|
ctx: {
|
|
89945
89952
|
MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
|
|
@@ -91411,7 +91418,7 @@ function resolveCommandHashPath(accountId, botIdentity) {
|
|
|
91411
91418
|
}
|
|
91412
91419
|
async function readCachedCommandHash(accountId, botIdentity) {
|
|
91413
91420
|
try {
|
|
91414
|
-
return (await fs.readFile(resolveCommandHashPath(accountId, botIdentity), "utf-8")).trim();
|
|
91421
|
+
return (await fs$1.readFile(resolveCommandHashPath(accountId, botIdentity), "utf-8")).trim();
|
|
91415
91422
|
} catch {
|
|
91416
91423
|
return null;
|
|
91417
91424
|
}
|
|
@@ -91419,8 +91426,8 @@ async function readCachedCommandHash(accountId, botIdentity) {
|
|
|
91419
91426
|
async function writeCachedCommandHash(accountId, botIdentity, hash) {
|
|
91420
91427
|
const filePath = resolveCommandHashPath(accountId, botIdentity);
|
|
91421
91428
|
try {
|
|
91422
|
-
await fs.mkdir(path.dirname(filePath), { recursive: true });
|
|
91423
|
-
await fs.writeFile(filePath, hash, "utf-8");
|
|
91429
|
+
await fs$1.mkdir(path.dirname(filePath), { recursive: true });
|
|
91430
|
+
await fs$1.writeFile(filePath, hash, "utf-8");
|
|
91424
91431
|
} catch {}
|
|
91425
91432
|
}
|
|
91426
91433
|
async function syncTelegramMenuCommands(params) {
|
|
@@ -92685,7 +92692,7 @@ function safeParseState(raw) {
|
|
|
92685
92692
|
async function readTelegramUpdateOffset(params) {
|
|
92686
92693
|
const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
|
|
92687
92694
|
try {
|
|
92688
|
-
const parsed = safeParseState(await fs.readFile(filePath, "utf-8"));
|
|
92695
|
+
const parsed = safeParseState(await fs$1.readFile(filePath, "utf-8"));
|
|
92689
92696
|
const expectedBotId = extractBotIdFromToken(params.botToken);
|
|
92690
92697
|
if (expectedBotId && parsed?.botId && parsed.botId !== expectedBotId) return null;
|
|
92691
92698
|
if (expectedBotId && parsed?.botId === null) return null;
|
|
@@ -94408,7 +94415,7 @@ async function getMemorySearchManager(params) {
|
|
|
94408
94415
|
if (cached) return { manager: cached };
|
|
94409
94416
|
}
|
|
94410
94417
|
try {
|
|
94411
|
-
const { QmdMemoryManager } = await import("./qmd-manager-
|
|
94418
|
+
const { QmdMemoryManager } = await import("./qmd-manager-CU9iEql0.js");
|
|
94412
94419
|
const primary = await QmdMemoryManager.create({
|
|
94413
94420
|
cfg: params.cfg,
|
|
94414
94421
|
agentId: params.agentId,
|
|
@@ -94420,7 +94427,7 @@ async function getMemorySearchManager(params) {
|
|
|
94420
94427
|
const wrapper = new FallbackMemoryManager({
|
|
94421
94428
|
primary,
|
|
94422
94429
|
fallbackFactory: async () => {
|
|
94423
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
94430
|
+
const { MemoryIndexManager } = await import("./manager-D728Thsn.js").then((n) => n.t);
|
|
94424
94431
|
return await MemoryIndexManager.get(params);
|
|
94425
94432
|
}
|
|
94426
94433
|
}, () => {
|
|
@@ -94435,7 +94442,7 @@ async function getMemorySearchManager(params) {
|
|
|
94435
94442
|
}
|
|
94436
94443
|
}
|
|
94437
94444
|
try {
|
|
94438
|
-
const { MemoryIndexManager } = await import("./manager-
|
|
94445
|
+
const { MemoryIndexManager } = await import("./manager-D728Thsn.js").then((n) => n.t);
|
|
94439
94446
|
return { manager: await MemoryIndexManager.get(params) };
|
|
94440
94447
|
} catch (err) {
|
|
94441
94448
|
return {
|
|
@@ -94785,7 +94792,7 @@ const LEGACY_ARCHIVE_DEFAULT_RETENTION_MS = 720 * 60 * 60 * 1e3;
|
|
|
94785
94792
|
const log$24 = createSubsystemLogger("config/sessions/legacy-import/archive");
|
|
94786
94793
|
/** SHA-256 over the file's bytes; null when the file is gone (ENOENT). Other errors propagate. */
|
|
94787
94794
|
async function sourceIdentity(filePath) {
|
|
94788
|
-
const handle = await fs.open(filePath, "r").catch((error) => {
|
|
94795
|
+
const handle = await fs$1.open(filePath, "r").catch((error) => {
|
|
94789
94796
|
if (error.code === "ENOENT") return null;
|
|
94790
94797
|
throw error;
|
|
94791
94798
|
});
|
|
@@ -94838,9 +94845,9 @@ function fallbackArchiveDest(source, archiveRoot) {
|
|
|
94838
94845
|
async function copyVerifiedTo(sourcePath, dest, expected) {
|
|
94839
94846
|
const tmp = `${dest}.tmp-${randomUUID()}`;
|
|
94840
94847
|
try {
|
|
94841
|
-
const handle = await fs.open(tmp, "wx", 384);
|
|
94848
|
+
const handle = await fs$1.open(tmp, "wx", 384);
|
|
94842
94849
|
try {
|
|
94843
|
-
const sourceHandle = await fs.open(sourcePath, "r");
|
|
94850
|
+
const sourceHandle = await fs$1.open(sourcePath, "r");
|
|
94844
94851
|
try {
|
|
94845
94852
|
const chunk = Buffer.allocUnsafe(256 * 1024);
|
|
94846
94853
|
let size = 0;
|
|
@@ -94857,18 +94864,18 @@ async function copyVerifiedTo(sourcePath, dest, expected) {
|
|
|
94857
94864
|
} finally {
|
|
94858
94865
|
await handle.close();
|
|
94859
94866
|
}
|
|
94860
|
-
await fs.chmod(tmp, 384);
|
|
94867
|
+
await fs$1.chmod(tmp, 384);
|
|
94861
94868
|
const copied = await identityOf(tmp);
|
|
94862
94869
|
if (!copied || copied.fingerprint !== expected.fingerprint) throw new Error(`legacy archive cross-device copy diverged from the imported bytes: ${dest}`);
|
|
94863
94870
|
try {
|
|
94864
|
-
await fs.link(tmp, dest);
|
|
94871
|
+
await fs$1.link(tmp, dest);
|
|
94865
94872
|
} catch (error) {
|
|
94866
94873
|
if (error.code !== "EEXIST") throw error;
|
|
94867
94874
|
const existing = await identityOf(dest);
|
|
94868
94875
|
if (!existing || existing.fingerprint !== expected.fingerprint) throw new Error(`legacy archive destination exists with different content: ${dest}`, { cause: error });
|
|
94869
94876
|
}
|
|
94870
94877
|
} finally {
|
|
94871
|
-
await fs.rm(tmp, { force: true });
|
|
94878
|
+
await fs$1.rm(tmp, { force: true });
|
|
94872
94879
|
}
|
|
94873
94880
|
}
|
|
94874
94881
|
/**
|
|
@@ -94884,7 +94891,7 @@ async function planLegacyArchiveDest(source, archiveRoot, expected) {
|
|
|
94884
94891
|
const resolvedRoot = path.resolve(archiveRoot);
|
|
94885
94892
|
const { dir, dest } = archivePathsFor(source, resolvedRoot);
|
|
94886
94893
|
try {
|
|
94887
|
-
await fs.mkdir(dir, {
|
|
94894
|
+
await fs$1.mkdir(dir, {
|
|
94888
94895
|
recursive: true,
|
|
94889
94896
|
mode: 448
|
|
94890
94897
|
});
|
|
@@ -94924,7 +94931,7 @@ async function archiveLegacySource(source, archiveRoot, expected) {
|
|
|
94924
94931
|
*/
|
|
94925
94932
|
async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
94926
94933
|
const resolvedRoot = path.resolve(archiveRoot);
|
|
94927
|
-
await fs.mkdir(path.dirname(dest), {
|
|
94934
|
+
await fs$1.mkdir(path.dirname(dest), {
|
|
94928
94935
|
recursive: true,
|
|
94929
94936
|
mode: 448
|
|
94930
94937
|
});
|
|
@@ -94934,14 +94941,14 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
94934
94941
|
const expectedIdentity = expected ?? sourceIdentityValue;
|
|
94935
94942
|
if (sourceIdentityValue.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy source changed after import; failing closed: ${source.path}`);
|
|
94936
94943
|
const destInodeVerified = async (destPath) => {
|
|
94937
|
-
const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath).catch(() => void 0)]);
|
|
94944
|
+
const [sourceStat, destStat] = await Promise.all([fs$1.stat(source.path), fs$1.stat(destPath).catch(() => void 0)]);
|
|
94938
94945
|
return destStat !== void 0 && destStat.dev === sourceStat.dev && destStat.ino === sourceStat.ino;
|
|
94939
94946
|
};
|
|
94940
94947
|
const moveInto = async (destPath) => {
|
|
94941
94948
|
let moved = false;
|
|
94942
94949
|
let independentArchive = false;
|
|
94943
94950
|
try {
|
|
94944
|
-
await fs.link(source.path, destPath);
|
|
94951
|
+
await fs$1.link(source.path, destPath);
|
|
94945
94952
|
moved = true;
|
|
94946
94953
|
} catch (error) {
|
|
94947
94954
|
const code = error.code;
|
|
@@ -94949,7 +94956,7 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
94949
94956
|
const existing = await identityOf(destPath);
|
|
94950
94957
|
if (existing && existing.fingerprint === expectedIdentity.fingerprint) {
|
|
94951
94958
|
moved = true;
|
|
94952
|
-
const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath)]);
|
|
94959
|
+
const [sourceStat, destStat] = await Promise.all([fs$1.stat(source.path), fs$1.stat(destPath)]);
|
|
94953
94960
|
independentArchive = sourceStat.dev !== destStat.dev || sourceStat.ino !== destStat.ino;
|
|
94954
94961
|
} else return {
|
|
94955
94962
|
moved: false,
|
|
@@ -94970,13 +94977,13 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
|
|
|
94970
94977
|
};
|
|
94971
94978
|
const outcome = await moveInto(dest);
|
|
94972
94979
|
if (outcome.divergent) throw new Error(`legacy archive destination exists with different content: ${dest}`);
|
|
94973
|
-
await fs.chmod(dest, 384);
|
|
94980
|
+
await fs$1.chmod(dest, 384);
|
|
94974
94981
|
if (!await destInodeVerified(dest)) {
|
|
94975
94982
|
const archived = await identityOf(dest);
|
|
94976
94983
|
if (!archived || archived.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy archive verification failed: ${dest}`);
|
|
94977
94984
|
}
|
|
94978
94985
|
if (outcome.moved) if (outcome.independentArchive) await unlinkSourceIfUnchanged(source.path, expectedIdentity);
|
|
94979
|
-
else await fs.unlink(source.path);
|
|
94986
|
+
else await fs$1.unlink(source.path);
|
|
94980
94987
|
return dest;
|
|
94981
94988
|
}
|
|
94982
94989
|
/**
|
|
@@ -94990,12 +94997,12 @@ async function unlinkSourceIfUnchanged(sourcePath, expected) {
|
|
|
94990
94997
|
const current = await sourceIdentity(sourcePath);
|
|
94991
94998
|
if (!current) return;
|
|
94992
94999
|
if (current.fingerprint !== expected.fingerprint) throw new Error(`legacy source changed before removal; failing closed: ${sourcePath}`);
|
|
94993
|
-
await fs.unlink(sourcePath);
|
|
95000
|
+
await fs$1.unlink(sourcePath);
|
|
94994
95001
|
}
|
|
94995
95002
|
async function chmodDirs(dir, stopAt) {
|
|
94996
95003
|
let current = dir;
|
|
94997
95004
|
while (current.startsWith(stopAt) && current !== stopAt) {
|
|
94998
|
-
await fs.chmod(current, 448).catch(() => void 0);
|
|
95005
|
+
await fs$1.chmod(current, 448).catch(() => void 0);
|
|
94999
95006
|
const parent = path.dirname(current);
|
|
95000
95007
|
if (parent === current) return;
|
|
95001
95008
|
current = parent;
|
|
@@ -95024,11 +95031,11 @@ async function purgeExpiredLegacyArchives(runtime, opts) {
|
|
|
95024
95031
|
log$24.warn("skipping legacy archive outside the archive root", { sourcePath: receipt.sourcePath });
|
|
95025
95032
|
continue;
|
|
95026
95033
|
}
|
|
95027
|
-
if (!await fs.stat(archivePath).then(() => true).catch((error) => {
|
|
95034
|
+
if (!await fs$1.stat(archivePath).then(() => true).catch((error) => {
|
|
95028
95035
|
if (error.code === "ENOENT") return false;
|
|
95029
95036
|
throw error;
|
|
95030
95037
|
})) continue;
|
|
95031
|
-
await fs.rm(archivePath, { force: true });
|
|
95038
|
+
await fs$1.rm(archivePath, { force: true });
|
|
95032
95039
|
purged += 1;
|
|
95033
95040
|
await pruneEmptyArchiveDirs(path.dirname(archivePath), archiveRoot);
|
|
95034
95041
|
}
|
|
@@ -95039,12 +95046,12 @@ async function pruneEmptyArchiveDirs(dir, stopAt) {
|
|
|
95039
95046
|
while (current.startsWith(stopAt + path.sep)) {
|
|
95040
95047
|
let entries;
|
|
95041
95048
|
try {
|
|
95042
|
-
entries = await fs.readdir(current);
|
|
95049
|
+
entries = await fs$1.readdir(current);
|
|
95043
95050
|
} catch {
|
|
95044
95051
|
return;
|
|
95045
95052
|
}
|
|
95046
95053
|
if (entries.length > 0) return;
|
|
95047
|
-
await fs.rmdir(current).catch(() => void 0);
|
|
95054
|
+
await fs$1.rmdir(current).catch(() => void 0);
|
|
95048
95055
|
current = path.dirname(current);
|
|
95049
95056
|
}
|
|
95050
95057
|
}
|
|
@@ -95327,7 +95334,7 @@ function byPath(a, b) {
|
|
|
95327
95334
|
}
|
|
95328
95335
|
function readDirents(dirPath) {
|
|
95329
95336
|
try {
|
|
95330
|
-
return
|
|
95337
|
+
return fs.readdirSync(dirPath, { withFileTypes: true });
|
|
95331
95338
|
} catch {
|
|
95332
95339
|
return [];
|
|
95333
95340
|
}
|
|
@@ -95340,7 +95347,7 @@ function isUnderQuarantine(rootDir, candidatePath) {
|
|
|
95340
95347
|
}
|
|
95341
95348
|
function statSource(filePath) {
|
|
95342
95349
|
try {
|
|
95343
|
-
const stats =
|
|
95350
|
+
const stats = fs.statSync(filePath);
|
|
95344
95351
|
if (!stats.isFile()) return;
|
|
95345
95352
|
return {
|
|
95346
95353
|
mtimeMs: stats.mtimeMs,
|
|
@@ -95531,12 +95538,12 @@ async function censusLegacySources(cfg, env) {
|
|
|
95531
95538
|
for (const agentDir of readDirents(agentsRoot).filter((entry) => entry.isDirectory()).toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
95532
95539
|
const agentId = normalizeAgentId(agentDir.name);
|
|
95533
95540
|
const sessionsDir = path.join(agentsRoot, agentDir.name, LEGACY_SESSIONS_DIR_NAME);
|
|
95534
|
-
if (
|
|
95541
|
+
if (fs.existsSync(sessionsDir)) censusAgentDir(sessionsDir, agentId);
|
|
95535
95542
|
}
|
|
95536
95543
|
const legacyRoot = path.join(stateDir, LEGACY_SESSIONS_DIR_NAME);
|
|
95537
|
-
if (
|
|
95544
|
+
if (fs.existsSync(legacyRoot)) censusAgentDir(legacyRoot, defaultAgent);
|
|
95538
95545
|
const recoveryDir = path.join(stateDir, RECOVERY_DIR_NAME);
|
|
95539
|
-
if (
|
|
95546
|
+
if (fs.existsSync(recoveryDir)) censusRecoveryTree(sources, recoveryDir);
|
|
95540
95547
|
return sources.values();
|
|
95541
95548
|
}
|
|
95542
95549
|
/**
|
|
@@ -95620,7 +95627,7 @@ async function admitDurableKeyMappings(registry, listKeys, opts) {
|
|
|
95620
95627
|
await opts?.clearMappingSourcePath?.(mapping.agentId, mapping.sessionId).catch(() => void 0);
|
|
95621
95628
|
continue;
|
|
95622
95629
|
}
|
|
95623
|
-
const stats = await fs.stat(mapping.sourcePath).catch(() => void 0);
|
|
95630
|
+
const stats = await fs$1.stat(mapping.sourcePath).catch(() => void 0);
|
|
95624
95631
|
if (!stats?.isFile()) continue;
|
|
95625
95632
|
registry.admit({
|
|
95626
95633
|
path: mapping.sourcePath,
|
|
@@ -95820,7 +95827,7 @@ function createLegacySourceRegistry() {
|
|
|
95820
95827
|
if (!isSettledReceipt(receipt, source.sizeBytes)) trackPendingPath(key, source);
|
|
95821
95828
|
return;
|
|
95822
95829
|
}
|
|
95823
|
-
const stats = await fs.stat(key).catch(() => void 0);
|
|
95830
|
+
const stats = await fs$1.stat(key).catch(() => void 0);
|
|
95824
95831
|
if (!stats?.isFile() && receipt.status !== "imported") return;
|
|
95825
95832
|
admit({
|
|
95826
95833
|
path: key,
|
|
@@ -96037,12 +96044,12 @@ function canonicalSqliteIdentityPathSync(sqlitePath) {
|
|
|
96037
96044
|
for (let hops = 0; hops < MAX_SYMLINK_HOPS; hops += 1) {
|
|
96038
96045
|
let stats;
|
|
96039
96046
|
try {
|
|
96040
|
-
stats =
|
|
96047
|
+
stats = fs.lstatSync(current);
|
|
96041
96048
|
} catch {
|
|
96042
96049
|
return canonicalPathSync(current);
|
|
96043
96050
|
}
|
|
96044
96051
|
if (!stats.isSymbolicLink()) return canonicalPathSync(current);
|
|
96045
|
-
current = path.resolve(canonicalPathSync(path.dirname(current)),
|
|
96052
|
+
current = path.resolve(canonicalPathSync(path.dirname(current)), fs.readlinkSync(current));
|
|
96046
96053
|
}
|
|
96047
96054
|
return canonicalPathSync(sqlitePath);
|
|
96048
96055
|
}
|
|
@@ -96056,12 +96063,12 @@ function sleep$1(ms) {
|
|
|
96056
96063
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
96057
96064
|
}
|
|
96058
96065
|
function acquireKernelOwnerLock(lock) {
|
|
96059
|
-
|
|
96066
|
+
fs.mkdirSync(path.dirname(lock.lockPath), {
|
|
96060
96067
|
recursive: true,
|
|
96061
96068
|
mode: 448
|
|
96062
96069
|
});
|
|
96063
96070
|
try {
|
|
96064
|
-
|
|
96071
|
+
fs.closeSync(fs.openSync(lock.lockPath, "wx", 384));
|
|
96065
96072
|
} catch (err) {
|
|
96066
96073
|
if (err.code !== "EEXIST") throw err;
|
|
96067
96074
|
}
|
|
@@ -96095,7 +96102,7 @@ function closeSqliteQuietly(db) {
|
|
|
96095
96102
|
function releaseKernelOwnerLock(lock, db, info) {
|
|
96096
96103
|
try {
|
|
96097
96104
|
const current = readHolderSidecar(lock.sidecarPath);
|
|
96098
|
-
if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt)
|
|
96105
|
+
if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt) fs.rmSync(lock.sidecarPath, { force: true });
|
|
96099
96106
|
} finally {
|
|
96100
96107
|
closeSqliteQuietly(db);
|
|
96101
96108
|
}
|
|
@@ -96103,17 +96110,17 @@ function releaseKernelOwnerLock(lock, db, info) {
|
|
|
96103
96110
|
function writeHolderSidecar(sidecarPath, info) {
|
|
96104
96111
|
const temp = `${sidecarPath}.${process.pid}.tmp`;
|
|
96105
96112
|
try {
|
|
96106
|
-
const fd =
|
|
96113
|
+
const fd = fs.openSync(temp, "w", 384);
|
|
96107
96114
|
try {
|
|
96108
|
-
|
|
96109
|
-
|
|
96115
|
+
fs.writeFileSync(fd, `${JSON.stringify(info)}\n`);
|
|
96116
|
+
fs.fsyncSync(fd);
|
|
96110
96117
|
} finally {
|
|
96111
|
-
|
|
96118
|
+
fs.closeSync(fd);
|
|
96112
96119
|
}
|
|
96113
|
-
|
|
96120
|
+
fs.renameSync(temp, sidecarPath);
|
|
96114
96121
|
} catch (err) {
|
|
96115
96122
|
try {
|
|
96116
|
-
|
|
96123
|
+
fs.rmSync(temp, { force: true });
|
|
96117
96124
|
} catch {}
|
|
96118
96125
|
throw err;
|
|
96119
96126
|
}
|
|
@@ -96138,7 +96145,7 @@ function parseHolderSidecar(raw) {
|
|
|
96138
96145
|
function readHolderSidecar(sidecarPath) {
|
|
96139
96146
|
let raw;
|
|
96140
96147
|
try {
|
|
96141
|
-
raw =
|
|
96148
|
+
raw = fs.readFileSync(sidecarPath, "utf8");
|
|
96142
96149
|
} catch {
|
|
96143
96150
|
return;
|
|
96144
96151
|
}
|
|
@@ -96149,7 +96156,7 @@ async function readHolderSidecarBriefly(sidecarPath, timeoutMs = 1e3) {
|
|
|
96149
96156
|
for (;;) {
|
|
96150
96157
|
let raw;
|
|
96151
96158
|
try {
|
|
96152
|
-
raw =
|
|
96159
|
+
raw = fs.readFileSync(sidecarPath, "utf8");
|
|
96153
96160
|
} catch {
|
|
96154
96161
|
raw = void 0;
|
|
96155
96162
|
}
|
|
@@ -96313,7 +96320,7 @@ async function claimExclusivePartial(destPath) {
|
|
|
96313
96320
|
for (let attempt = 0; attempt < 3; attempt += 1) {
|
|
96314
96321
|
const candidate = `${destPath}.${process.pid}.${randomBytes(8).toString("hex")}.partial`;
|
|
96315
96322
|
try {
|
|
96316
|
-
await (await fs.open(candidate, "wx", 384)).close();
|
|
96323
|
+
await (await fs$1.open(candidate, "wx", 384)).close();
|
|
96317
96324
|
return candidate;
|
|
96318
96325
|
} catch (err) {
|
|
96319
96326
|
if (err.code !== "EEXIST") throw err;
|
|
@@ -96332,7 +96339,7 @@ async function backupSqliteSessionDatabase(params) {
|
|
|
96332
96339
|
const dbPath = path.resolve(params.dbPath);
|
|
96333
96340
|
const destPath = path.resolve(params.destPath);
|
|
96334
96341
|
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");
|
|
96335
|
-
await fs.mkdir(path.dirname(destPath), {
|
|
96342
|
+
await fs$1.mkdir(path.dirname(destPath), {
|
|
96336
96343
|
recursive: true,
|
|
96337
96344
|
mode: 448
|
|
96338
96345
|
});
|
|
@@ -96344,14 +96351,14 @@ async function backupSqliteSessionDatabase(params) {
|
|
|
96344
96351
|
gated: sqliteBackupTestHooks.holdWorkerAtGate === true,
|
|
96345
96352
|
writableSource: false
|
|
96346
96353
|
});
|
|
96347
|
-
await fs.rename(partialPath, destPath);
|
|
96354
|
+
await fs$1.rename(partialPath, destPath);
|
|
96348
96355
|
} catch (err) {
|
|
96349
|
-
await fs.rm(partialPath, { force: true }).catch(() => {});
|
|
96356
|
+
await fs$1.rm(partialPath, { force: true }).catch(() => {});
|
|
96350
96357
|
throw err;
|
|
96351
96358
|
}
|
|
96352
96359
|
return {
|
|
96353
96360
|
path: destPath,
|
|
96354
|
-
bytes: (await fs.stat(destPath)).size
|
|
96361
|
+
bytes: (await fs$1.stat(destPath)).size
|
|
96355
96362
|
};
|
|
96356
96363
|
}
|
|
96357
96364
|
|
|
@@ -96373,7 +96380,7 @@ const INCARNATION_SELECT_SQL = "SELECT id FROM ctx_legacy_import_incarnation LIM
|
|
|
96373
96380
|
async function readDbIncarnationId(dbPath) {
|
|
96374
96381
|
let db;
|
|
96375
96382
|
try {
|
|
96376
|
-
await fs.stat(dbPath);
|
|
96383
|
+
await fs$1.stat(dbPath);
|
|
96377
96384
|
db = new DatabaseSync(dbPath);
|
|
96378
96385
|
const row = db.prepare(INCARNATION_SELECT_SQL).get();
|
|
96379
96386
|
return typeof row?.id === "string" ? row.id : void 0;
|
|
@@ -96425,7 +96432,7 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
96425
96432
|
const marked = await readSnapshotMarker(backupsDir, canonicalDbPath);
|
|
96426
96433
|
if (marked) return marked;
|
|
96427
96434
|
if ((await params.listReceipts()).length > 0) return;
|
|
96428
|
-
await fs.mkdir(backupsDir, {
|
|
96435
|
+
await fs$1.mkdir(backupsDir, {
|
|
96429
96436
|
recursive: true,
|
|
96430
96437
|
mode: 448
|
|
96431
96438
|
});
|
|
@@ -96436,7 +96443,7 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
96436
96443
|
dbPath,
|
|
96437
96444
|
destPath
|
|
96438
96445
|
});
|
|
96439
|
-
if (dbId !== void 0) await fs.writeFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), `${JSON.stringify({
|
|
96446
|
+
if (dbId !== void 0) await fs$1.writeFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), `${JSON.stringify({
|
|
96440
96447
|
path: backup.path,
|
|
96441
96448
|
createdAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
96442
96449
|
canonicalDbPath,
|
|
@@ -96454,17 +96461,17 @@ async function takePreImportLegacySnapshot(params) {
|
|
|
96454
96461
|
*/
|
|
96455
96462
|
async function cleanupPartialLegacyBackups(stateDir) {
|
|
96456
96463
|
const backupsDir = path.join(stateDir, "backups");
|
|
96457
|
-
const names = await fs.readdir(backupsDir).catch(() => []);
|
|
96464
|
+
const names = await fs$1.readdir(backupsDir).catch(() => []);
|
|
96458
96465
|
for (const name of names) {
|
|
96459
96466
|
if (!name.endsWith(".partial")) continue;
|
|
96460
|
-
await fs.rm(path.join(backupsDir, name), { force: true }).catch(() => void 0);
|
|
96467
|
+
await fs$1.rm(path.join(backupsDir, name), { force: true }).catch(() => void 0);
|
|
96461
96468
|
}
|
|
96462
96469
|
}
|
|
96463
96470
|
async function readSnapshotMarker(backupsDir, canonicalDbPath) {
|
|
96464
96471
|
const currentIncarnationId = await readDbIncarnationId(canonicalDbPath);
|
|
96465
96472
|
const keyed = await readMarkerFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), canonicalDbPath, currentIncarnationId);
|
|
96466
96473
|
if (keyed !== void 0) return keyed;
|
|
96467
|
-
const names = await fs.readdir(backupsDir).catch(() => []);
|
|
96474
|
+
const names = await fs$1.readdir(backupsDir).catch(() => []);
|
|
96468
96475
|
for (const name of names) {
|
|
96469
96476
|
if (!name.startsWith(SNAPSHOT_MARKER_PREFIX) || !name.endsWith(".json")) continue;
|
|
96470
96477
|
const found = await readMarkerFile(path.join(backupsDir, name), canonicalDbPath, currentIncarnationId);
|
|
@@ -96473,7 +96480,7 @@ async function readSnapshotMarker(backupsDir, canonicalDbPath) {
|
|
|
96473
96480
|
return readMarkerFile(path.join(backupsDir, SNAPSHOT_MARKER_FILE), canonicalDbPath, currentIncarnationId);
|
|
96474
96481
|
}
|
|
96475
96482
|
async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId) {
|
|
96476
|
-
const raw = await fs.readFile(markerFile, "utf8").catch(() => void 0);
|
|
96483
|
+
const raw = await fs$1.readFile(markerFile, "utf8").catch(() => void 0);
|
|
96477
96484
|
if (!raw) return;
|
|
96478
96485
|
try {
|
|
96479
96486
|
const parsed = JSON.parse(raw);
|
|
@@ -96485,7 +96492,7 @@ async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId)
|
|
|
96485
96492
|
if (currentIncarnationId !== void 0 && currentIncarnationId === markerId) return markerPath;
|
|
96486
96493
|
return;
|
|
96487
96494
|
}
|
|
96488
|
-
const [markerStat, dbStat] = await Promise.all([fs.stat(markerDbPath).catch(() => void 0), fs.stat(canonicalDbPath).catch(() => void 0)]);
|
|
96495
|
+
const [markerStat, dbStat] = await Promise.all([fs$1.stat(markerDbPath).catch(() => void 0), fs$1.stat(canonicalDbPath).catch(() => void 0)]);
|
|
96489
96496
|
if (markerStat !== void 0 && dbStat !== void 0 ? markerStat.dev === dbStat.dev && markerStat.ino === dbStat.ino : markerDbPath === canonicalDbPath) return markerPath;
|
|
96490
96497
|
}
|
|
96491
96498
|
} catch {}
|
|
@@ -96751,7 +96758,7 @@ const log$16 = createSubsystemLogger("config/sessions/legacy-import/index-import
|
|
|
96751
96758
|
async function readLegacyIndexStore(storePath) {
|
|
96752
96759
|
let raw;
|
|
96753
96760
|
try {
|
|
96754
|
-
raw = await fs.readFile(storePath, "utf8");
|
|
96761
|
+
raw = await fs$1.readFile(storePath, "utf8");
|
|
96755
96762
|
} catch (error) {
|
|
96756
96763
|
throw new Error(`legacy index source unreadable: ${storePath}`, { cause: error });
|
|
96757
96764
|
}
|
|
@@ -96990,7 +96997,7 @@ async function importLegacyIndex(runtime, source, opts = {}) {
|
|
|
96990
96997
|
actorExplicit: entry.actor !== void 0
|
|
96991
96998
|
}), opts.signal);
|
|
96992
96999
|
if (transcriptPath && opts.discoveredTranscripts && path.resolve(transcriptPath) !== path.resolve(source.path)) try {
|
|
96993
|
-
const stats = await fs.stat(transcriptPath);
|
|
97000
|
+
const stats = await fs$1.stat(transcriptPath);
|
|
96994
97001
|
if (stats.isFile()) opts.discoveredTranscripts.push({
|
|
96995
97002
|
path: transcriptPath,
|
|
96996
97003
|
kind: "transcript",
|
|
@@ -97106,7 +97113,7 @@ async function loadSessionKeyOverrides(stateDir) {
|
|
|
97106
97113
|
const filePath = path.join(stateDir, "recovery", SESSION_KEY_OVERRIDES_FILENAME);
|
|
97107
97114
|
let raw;
|
|
97108
97115
|
try {
|
|
97109
|
-
raw = await fs.readFile(filePath, "utf8");
|
|
97116
|
+
raw = await fs$1.readFile(filePath, "utf8");
|
|
97110
97117
|
} catch (error) {
|
|
97111
97118
|
if (error.code !== "ENOENT") log$14.warn("session key overrides unreadable; ignoring", { error });
|
|
97112
97119
|
return /* @__PURE__ */ new Map();
|
|
@@ -98575,14 +98582,14 @@ function isGatewayArgv(args) {
|
|
|
98575
98582
|
}
|
|
98576
98583
|
function readLinuxCmdline(pid) {
|
|
98577
98584
|
try {
|
|
98578
|
-
return parseProcCmdline(
|
|
98585
|
+
return parseProcCmdline(fs.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
|
|
98579
98586
|
} catch {
|
|
98580
98587
|
return null;
|
|
98581
98588
|
}
|
|
98582
98589
|
}
|
|
98583
98590
|
function readLinuxStartTime(pid) {
|
|
98584
98591
|
try {
|
|
98585
|
-
const raw =
|
|
98592
|
+
const raw = fs.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
|
|
98586
98593
|
const closeParen = raw.lastIndexOf(")");
|
|
98587
98594
|
if (closeParen < 0) return null;
|
|
98588
98595
|
const fields = raw.slice(closeParen + 1).trim().split(/\s+/);
|
|
@@ -98636,7 +98643,7 @@ async function resolveGatewayOwnerStatus(pid, payload, platform, port) {
|
|
|
98636
98643
|
}
|
|
98637
98644
|
async function readLockPayload(lockPath) {
|
|
98638
98645
|
try {
|
|
98639
|
-
const raw = await fs.readFile(lockPath, "utf8");
|
|
98646
|
+
const raw = await fs$1.readFile(lockPath, "utf8");
|
|
98640
98647
|
const parsed = JSON.parse(raw);
|
|
98641
98648
|
if (typeof parsed.pid !== "number") return null;
|
|
98642
98649
|
if (typeof parsed.createdAt !== "string") return null;
|
|
@@ -99021,7 +99028,7 @@ async function withMemoryManagerForAgent(params) {
|
|
|
99021
99028
|
}
|
|
99022
99029
|
async function checkReadableFile(pathname) {
|
|
99023
99030
|
try {
|
|
99024
|
-
await fs.access(pathname,
|
|
99031
|
+
await fs$1.access(pathname, fs.constants.R_OK);
|
|
99025
99032
|
return { exists: true };
|
|
99026
99033
|
} catch (err) {
|
|
99027
99034
|
const code = err.code;
|
|
@@ -99056,7 +99063,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
99056
99063
|
if (alt.issue) issues.push(alt.issue);
|
|
99057
99064
|
const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
|
|
99058
99065
|
for (const extraPath of resolvedExtraPaths) try {
|
|
99059
|
-
if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
|
|
99066
|
+
if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
|
|
99060
99067
|
const extraCheck = await checkReadableFile(extraPath);
|
|
99061
99068
|
if (extraCheck.issue) issues.push(extraCheck.issue);
|
|
99062
99069
|
} catch (err) {
|
|
@@ -99066,7 +99073,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
|
|
|
99066
99073
|
}
|
|
99067
99074
|
let dirReadable = null;
|
|
99068
99075
|
try {
|
|
99069
|
-
await fs.access(memoryDir,
|
|
99076
|
+
await fs$1.access(memoryDir, fs.constants.R_OK);
|
|
99070
99077
|
dirReadable = true;
|
|
99071
99078
|
} catch (err) {
|
|
99072
99079
|
const code = err.code;
|
|
@@ -99114,7 +99121,7 @@ async function summarizeQmdIndexArtifact(manager) {
|
|
|
99114
99121
|
if (!dbPath) return null;
|
|
99115
99122
|
let stat;
|
|
99116
99123
|
try {
|
|
99117
|
-
stat = await fs.stat(dbPath);
|
|
99124
|
+
stat = await fs$1.stat(dbPath);
|
|
99118
99125
|
} catch (err) {
|
|
99119
99126
|
const code = err.code;
|
|
99120
99127
|
if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
|
|
@@ -99581,7 +99588,7 @@ function createPluginRuntime(options = {}) {
|
|
|
99581
99588
|
workStates: readTaskWorkStates
|
|
99582
99589
|
},
|
|
99583
99590
|
resolveLearningWorkspaceDir: (agentId) => resolveLearningWorkspaceDir(loadConfig(), agentId),
|
|
99584
|
-
sessions: { startUserRun: async (params) => (await import("./user-run-recording
|
|
99591
|
+
sessions: { startUserRun: async (params) => (await import("./user-run-recording-B1HujJiT.js").then((n) => n.n)).startUserSessionRun(params) }
|
|
99585
99592
|
};
|
|
99586
99593
|
Object.defineProperty(runtime, "analysis", {
|
|
99587
99594
|
enumerable: true,
|
|
@@ -99624,7 +99631,7 @@ const resolvePluginSdkAliasFile = (params) => {
|
|
|
99624
99631
|
const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
|
|
99625
99632
|
const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
|
|
99626
99633
|
const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
|
|
99627
|
-
for (const candidate of orderedCandidates) if (
|
|
99634
|
+
for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
|
|
99628
99635
|
const parent = path.dirname(cursor);
|
|
99629
99636
|
if (parent === cursor) break;
|
|
99630
99637
|
cursor = parent;
|
|
@@ -100167,7 +100174,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
100167
100174
|
continue;
|
|
100168
100175
|
}
|
|
100169
100176
|
const safeSource = opened.path;
|
|
100170
|
-
|
|
100177
|
+
fs.closeSync(opened.fd);
|
|
100171
100178
|
let mod = null;
|
|
100172
100179
|
try {
|
|
100173
100180
|
mod = getJiti()(safeSource);
|
|
@@ -100330,7 +100337,7 @@ function loadOpenClawPlugins(options = {}) {
|
|
|
100330
100337
|
}
|
|
100331
100338
|
function safeRealpathOrResolve(value) {
|
|
100332
100339
|
try {
|
|
100333
|
-
return
|
|
100340
|
+
return fs.realpathSync(value);
|
|
100334
100341
|
} catch {
|
|
100335
100342
|
return path.resolve(value);
|
|
100336
100343
|
}
|
|
@@ -100488,7 +100495,7 @@ function resolvePluginWebSearchProviders(params) {
|
|
|
100488
100495
|
//#endregion
|
|
100489
100496
|
//#region src/agents/apply-patch-update.ts
|
|
100490
100497
|
async function defaultReadFile(filePath) {
|
|
100491
|
-
return fs.readFile(filePath, "utf8");
|
|
100498
|
+
return fs$1.readFile(filePath, "utf8");
|
|
100492
100499
|
}
|
|
100493
100500
|
async function applyUpdateHunk(filePath, chunks, options) {
|
|
100494
100501
|
const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
|
|
@@ -100809,7 +100816,7 @@ function resolvePatchFileOps(options) {
|
|
|
100809
100816
|
const workspaceOnly = options.workspaceOnly !== false;
|
|
100810
100817
|
return {
|
|
100811
100818
|
readFile: async (filePath) => {
|
|
100812
|
-
if (!workspaceOnly) return await fs.readFile(filePath, "utf8");
|
|
100819
|
+
if (!workspaceOnly) return await fs$1.readFile(filePath, "utf8");
|
|
100813
100820
|
const opened = await openBoundaryFile({
|
|
100814
100821
|
absolutePath: filePath,
|
|
100815
100822
|
rootPath: options.cwd,
|
|
@@ -100817,14 +100824,14 @@ function resolvePatchFileOps(options) {
|
|
|
100817
100824
|
});
|
|
100818
100825
|
assertBoundaryRead(opened, filePath);
|
|
100819
100826
|
try {
|
|
100820
|
-
return
|
|
100827
|
+
return fs.readFileSync(opened.fd, "utf8");
|
|
100821
100828
|
} finally {
|
|
100822
|
-
|
|
100829
|
+
fs.closeSync(opened.fd);
|
|
100823
100830
|
}
|
|
100824
100831
|
},
|
|
100825
100832
|
writeFile: async (filePath, content) => {
|
|
100826
100833
|
if (!workspaceOnly) {
|
|
100827
|
-
await fs.writeFile(filePath, content, "utf8");
|
|
100834
|
+
await fs$1.writeFile(filePath, content, "utf8");
|
|
100828
100835
|
return;
|
|
100829
100836
|
}
|
|
100830
100837
|
const relative = toRelativeSandboxPath(options.cwd, filePath);
|
|
@@ -100835,8 +100842,8 @@ function resolvePatchFileOps(options) {
|
|
|
100835
100842
|
encoding: "utf8"
|
|
100836
100843
|
});
|
|
100837
100844
|
},
|
|
100838
|
-
remove: (filePath) => fs.rm(filePath),
|
|
100839
|
-
mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
|
|
100845
|
+
remove: (filePath) => fs$1.rm(filePath),
|
|
100846
|
+
mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
|
|
100840
100847
|
};
|
|
100841
100848
|
}
|
|
100842
100849
|
async function ensureDir(filePath, ops) {
|
|
@@ -101115,7 +101122,7 @@ async function recordLoopOutcome(args) {
|
|
|
101115
101122
|
if (!args.ctx?.sessionKey) return;
|
|
101116
101123
|
try {
|
|
101117
101124
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bnyx-w0F.js").then((n) => n.n);
|
|
101118
|
-
const { recordToolCallOutcome } = await import("./tool-loop-detection-
|
|
101125
|
+
const { recordToolCallOutcome } = await import("./tool-loop-detection-BqyMjpvr.js");
|
|
101119
101126
|
recordToolCallOutcome(getDiagnosticSessionState({
|
|
101120
101127
|
sessionKey: args.ctx.sessionKey,
|
|
101121
101128
|
sessionId: args.ctx?.agentId
|
|
@@ -101142,8 +101149,8 @@ async function runBeforeToolCallHook(args) {
|
|
|
101142
101149
|
const params = args.params;
|
|
101143
101150
|
if (args.ctx?.sessionKey) {
|
|
101144
101151
|
const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bnyx-w0F.js").then((n) => n.n);
|
|
101145
|
-
const { logToolLoopAction } = await import("./diagnostic-
|
|
101146
|
-
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-
|
|
101152
|
+
const { logToolLoopAction } = await import("./diagnostic-CKFgwhkU.js").then((n) => n.n);
|
|
101153
|
+
const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-BqyMjpvr.js");
|
|
101147
101154
|
const sessionState = getDiagnosticSessionState({
|
|
101148
101155
|
sessionKey: args.ctx.sessionKey,
|
|
101149
101156
|
sessionId: args.ctx?.agentId
|
|
@@ -101361,7 +101368,7 @@ function wrapHostEditToolWithPostWriteRecovery(base, root) {
|
|
|
101361
101368
|
if (!pathParam || !newText) throw err;
|
|
101362
101369
|
try {
|
|
101363
101370
|
const absolutePath = resolveHostEditPath(root, pathParam);
|
|
101364
|
-
const content = await fs.readFile(absolutePath, "utf-8");
|
|
101371
|
+
const content = await fs$1.readFile(absolutePath, "utf-8");
|
|
101365
101372
|
const hasNew = content.includes(newText);
|
|
101366
101373
|
const stillHasOld = oldText !== void 0 && oldText.length > 0 && content.includes(oldText);
|
|
101367
101374
|
if (hasNew && !stillHasOld) return {
|
|
@@ -101832,14 +101839,14 @@ function createSandboxEditOperations(params) {
|
|
|
101832
101839
|
}
|
|
101833
101840
|
async function writeHostFile(absolutePath, content) {
|
|
101834
101841
|
const resolved = path.resolve(absolutePath);
|
|
101835
|
-
await fs.mkdir(path.dirname(resolved), { recursive: true });
|
|
101836
|
-
await fs.writeFile(resolved, content, "utf-8");
|
|
101842
|
+
await fs$1.mkdir(path.dirname(resolved), { recursive: true });
|
|
101843
|
+
await fs$1.writeFile(resolved, content, "utf-8");
|
|
101837
101844
|
}
|
|
101838
101845
|
function createHostWriteOperations(root, options) {
|
|
101839
101846
|
if (!(options?.workspaceOnly ?? false)) return {
|
|
101840
101847
|
mkdir: async (dir) => {
|
|
101841
101848
|
const resolved = path.resolve(dir);
|
|
101842
|
-
await fs.mkdir(resolved, { recursive: true });
|
|
101849
|
+
await fs$1.mkdir(resolved, { recursive: true });
|
|
101843
101850
|
},
|
|
101844
101851
|
writeFile: writeHostFile
|
|
101845
101852
|
};
|
|
@@ -101852,7 +101859,7 @@ function createHostWriteOperations(root, options) {
|
|
|
101852
101859
|
cwd: root,
|
|
101853
101860
|
root
|
|
101854
101861
|
});
|
|
101855
|
-
await fs.mkdir(resolved, { recursive: true });
|
|
101862
|
+
await fs$1.mkdir(resolved, { recursive: true });
|
|
101856
101863
|
},
|
|
101857
101864
|
writeFile: async (absolutePath, content) => {
|
|
101858
101865
|
await writeFileWithinRoot({
|
|
@@ -101868,12 +101875,12 @@ function createHostEditOperations(root, options) {
|
|
|
101868
101875
|
if (!(options?.workspaceOnly ?? false)) return {
|
|
101869
101876
|
readFile: async (absolutePath) => {
|
|
101870
101877
|
const resolved = path.resolve(absolutePath);
|
|
101871
|
-
return await fs.readFile(resolved);
|
|
101878
|
+
return await fs$1.readFile(resolved);
|
|
101872
101879
|
},
|
|
101873
101880
|
writeFile: writeHostFile,
|
|
101874
101881
|
access: async (absolutePath) => {
|
|
101875
101882
|
const resolved = path.resolve(absolutePath);
|
|
101876
|
-
await fs.access(resolved);
|
|
101883
|
+
await fs$1.access(resolved);
|
|
101877
101884
|
}
|
|
101878
101885
|
};
|
|
101879
101886
|
return {
|
|
@@ -103048,9 +103055,9 @@ async function readWorkspaceContextForSummary() {
|
|
|
103048
103055
|
if (!opened.ok) return "";
|
|
103049
103056
|
const sections = extractSections((() => {
|
|
103050
103057
|
try {
|
|
103051
|
-
return
|
|
103058
|
+
return fs.readFileSync(opened.fd, "utf-8");
|
|
103052
103059
|
} finally {
|
|
103053
|
-
|
|
103060
|
+
fs.closeSync(opened.fd);
|
|
103054
103061
|
}
|
|
103055
103062
|
})(), ["Session Startup", "Red Lines"]);
|
|
103056
103063
|
if (sections.length === 0) return "";
|
|
@@ -104575,14 +104582,14 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
104575
104582
|
if (!apiKeyInfo.apiKey) {
|
|
104576
104583
|
if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
|
|
104577
104584
|
} else if (model.provider === "github-copilot") {
|
|
104578
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
104585
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DYYKoDuV.js").then((n) => n.n);
|
|
104579
104586
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
104580
104587
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
104581
104588
|
} else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
|
|
104582
104589
|
} catch (err) {
|
|
104583
104590
|
return fail(describeUnknownError(err));
|
|
104584
104591
|
}
|
|
104585
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
104592
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
104586
104593
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
104587
104594
|
const sandbox = await resolveSandboxContext({
|
|
104588
104595
|
config: params.config,
|
|
@@ -104591,7 +104598,7 @@ async function compactEmbeddedPiSessionDirect(params) {
|
|
|
104591
104598
|
workspaceLane: params.workspaceLane
|
|
104592
104599
|
});
|
|
104593
104600
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
104594
|
-
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
104601
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
104595
104602
|
let restoreSkillEnv;
|
|
104596
104603
|
const releaseWorkspaceCwd = acquireWorkspaceCwd(effectiveWorkspace);
|
|
104597
104604
|
try {
|
|
@@ -110968,7 +110975,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
110968
110975
|
let embeddedAttemptBegun = false;
|
|
110969
110976
|
const runAbortController = new AbortController();
|
|
110970
110977
|
log$52.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"}`);
|
|
110971
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
110978
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
110972
110979
|
const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
|
|
110973
110980
|
const toolSessionKey = params.toolSessionKey?.trim() || sandboxSessionKey;
|
|
110974
110981
|
const sandbox = params.skipSandbox ? null : await resolveSandboxContext({
|
|
@@ -110978,7 +110985,7 @@ async function runEmbeddedAttempt(params) {
|
|
|
110978
110985
|
workspaceLane: params.workspaceLane
|
|
110979
110986
|
});
|
|
110980
110987
|
const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
|
|
110981
|
-
await fs.mkdir(effectiveWorkspace, { recursive: true });
|
|
110988
|
+
await fs$1.mkdir(effectiveWorkspace, { recursive: true });
|
|
110982
110989
|
let restoreSkillEnv;
|
|
110983
110990
|
const releaseWorkspaceCwd = params.skipCwdChange ? void 0 : acquireWorkspaceCwd(effectiveWorkspace);
|
|
110984
110991
|
const rawToolResultStash = openRawToolResultStash(params.sessionId);
|
|
@@ -112628,7 +112635,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
112628
112635
|
await copilotTokenState.refreshInFlight;
|
|
112629
112636
|
return;
|
|
112630
112637
|
}
|
|
112631
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
112638
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DYYKoDuV.js").then((n) => n.n);
|
|
112632
112639
|
copilotTokenState.refreshInFlight = (async () => {
|
|
112633
112640
|
const githubToken = copilotTokenState.githubToken.trim();
|
|
112634
112641
|
if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
|
|
@@ -112720,7 +112727,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
112720
112727
|
return;
|
|
112721
112728
|
}
|
|
112722
112729
|
if (model.provider === "github-copilot") {
|
|
112723
|
-
const { resolveCopilotApiToken } = await import("./github-copilot-token-
|
|
112730
|
+
const { resolveCopilotApiToken } = await import("./github-copilot-token-DYYKoDuV.js").then((n) => n.n);
|
|
112724
112731
|
const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
|
|
112725
112732
|
authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
|
|
112726
112733
|
if (copilotTokenState) {
|
|
@@ -112842,7 +112849,7 @@ async function runEmbeddedPiAgent(params) {
|
|
|
112842
112849
|
const copilotAuthRetry = authRetryPending;
|
|
112843
112850
|
authRetryPending = false;
|
|
112844
112851
|
attemptedThinking.add(thinkLevel);
|
|
112845
|
-
await fs.mkdir(resolvedWorkspace, { recursive: true });
|
|
112852
|
+
await fs$1.mkdir(resolvedWorkspace, { recursive: true });
|
|
112846
112853
|
const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
|
|
112847
112854
|
const attempt = await runEmbeddedAttempt({
|
|
112848
112855
|
sessionId: params.sessionId,
|