@qqbrowser/openclaw-qbot 0.0.73 → 0.0.74
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/README.md +1 -1
- package/dist/{active-listener-DxNSGN9U.js → active-listener-CROf1Uy1.js} +2 -2
- package/dist/{agents-BV_FaMHU.js → agents-CYWlMAWH.js} +6 -6
- package/dist/{agents.config-B9V48rWk.js → agents.config-BJn6d6DN.js} +1 -1
- package/dist/{agents.config-GyCLMlbL.js → agents.config-wTj_OaU_.js} +1 -1
- package/dist/{api-key-rotation-CTQfWSIv.js → api-key-rotation-BbdgQk0n.js} +1 -1
- package/dist/{audio-preflight-CzCees3e.js → audio-preflight-Bn2FtPU3.js} +15 -15
- package/dist/{audio-transcription-runner-DNLKfdoM.js → audio-transcription-runner-8_mMc2YC.js} +10 -10
- package/dist/{audit-membership-runtime-CCJD0aBd.js → audit-membership-runtime-DvvzZwni.js} +6 -6
- package/dist/{auth-choice-DU5tc_h1.js → auth-choice-5BtdgzSI.js} +1 -1
- package/dist/{auth-choice-DBoi--mB.js → auth-choice-B5ngE4A2.js} +1 -1
- package/dist/{banner-C_4QrBWL.js → banner-BGXVW1A5.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +35 -35
- package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +35 -35
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-activity-C8YYzXcX.js → channel-activity-BUaFQGrv.js} +2 -2
- package/dist/{channel-options-CJsrr-rH.js → channel-options-BmYMsEjg.js} +1 -1
- package/dist/{channel-options-TMN7Iiqz.js → channel-options-nhLIf9WS.js} +1 -1
- package/dist/{channel-web-D5XrPlVy.js → channel-web-B0YjlQBG.js} +1 -1
- package/dist/{channel-web-6wYIjWUq.js → channel-web-DVCk5Fds.js} +1 -1
- package/dist/{channels-cli-BDSdy1VE.js → channels-cli-DI9o3gyE.js} +6 -6
- package/dist/{channels-cli-B6qHXKEd.js → channels-cli-DPtLHM0J.js} +6 -6
- package/dist/{cli-aFUGe8HU.js → cli-BrnCq769.js} +1 -1
- package/dist/{cli-DLhLAHco.js → cli-C4qSin3m.js} +1 -1
- package/dist/{command-registry-CwxQ7wlg.js → command-registry-Dc-Pr3ej.js} +9 -9
- package/dist/{commands-registry-CDA-YP5a.js → commands-registry-Clw9C2_Y.js} +2 -2
- package/dist/{compact-C64tGh1Q.js → compact-w86MjF5r.js} +6 -6
- package/dist/compact.runtime-BB3ne62u.js +39 -0
- package/dist/{compact.runtime-B3X4xckf.js → compact.runtime-C4VGJyzb.js} +1 -1
- package/dist/{compact.runtime-BoZUJOVD.js → compact.runtime-C7vtRrUH.js} +1 -1
- package/dist/{compact.runtime-CvcXbtEl.js → compact.runtime-D9TdYJL-.js} +1 -1
- package/dist/{completion-cli-DEvhh5Cf.js → completion-cli-C01aSJaG.js} +2 -2
- package/dist/{completion-cli-9KLIB7_X.js → completion-cli-DVgSnpx0.js} +1 -1
- package/dist/{config-cli-CrYtt78d.js → config-cli-DRN8Xk_M.js} +1 -1
- package/dist/{config-cli-BPUUTQvi.js → config-cli-DpWTFuhw.js} +1 -1
- package/dist/{configure-BkAlWi6d.js → configure-3u-AEpBv.js} +6 -6
- package/dist/{configure-BIqZBBEN.js → configure-Um8aXBGc.js} +6 -6
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/de-DuUYLvt1.js +2 -0
- package/dist/control-ui/assets/de-DuUYLvt1.js.map +1 -0
- package/dist/control-ui/assets/es-DHtyqUQZ.js +2 -0
- package/dist/control-ui/assets/es-DHtyqUQZ.js.map +1 -0
- package/dist/control-ui/assets/index-CYbiPp9k.js +8384 -0
- package/dist/control-ui/assets/index-CYbiPp9k.js.map +1 -0
- package/dist/control-ui/assets/index-C_GaJ8wS.css +1 -0
- package/dist/control-ui/assets/pt-BR-D2dJb9G8.js +2 -0
- package/dist/control-ui/assets/pt-BR-D2dJb9G8.js.map +1 -0
- package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js +2 -0
- package/dist/control-ui/assets/zh-CN-BgJ8_lE3.js.map +1 -0
- package/dist/control-ui/assets/zh-TW-cW5xB87I.js +2 -0
- package/dist/control-ui/assets/zh-TW-cW5xB87I.js.map +1 -0
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +22 -0
- package/dist/control-ui/index.html +17 -0
- package/dist/{deliver-C8ckP9ew.js → deliver-Bj-7Vo_A.js} +19 -19
- package/dist/deliver-runtime-BhtIY2eR.js +19 -0
- package/dist/deps-send-discord.runtime-CQ2BQVgx.js +19 -0
- package/dist/deps-send-imessage.runtime-CuiJDds-.js +18 -0
- package/dist/deps-send-signal.runtime-D6FW_3lV.js +17 -0
- package/dist/deps-send-slack.runtime-DMtZWnBE.js +17 -0
- package/dist/deps-send-telegram.runtime-FtgFHfzz.js +20 -0
- package/dist/{deps-send-whatsapp.runtime-Zlv01k3L.js → deps-send-whatsapp.runtime-BSjKIQ6-.js} +3 -3
- package/dist/deps-send-whatsapp.runtime-BrOASoRz.js +43 -0
- package/dist/{deps-send-whatsapp.runtime-B--hgVLj.js → deps-send-whatsapp.runtime-C0qrh-1q.js} +3 -3
- package/dist/{deps-send-whatsapp.runtime-C4jJ1cJr.js → deps-send-whatsapp.runtime-DKdcBa5f.js} +2 -2
- package/dist/{diagnostic-Dmrwg73v.js → diagnostic-qjjamhzV.js} +2 -2
- package/dist/{doctor-completion-11bEAfBi.js → doctor-completion-CcMQPwS8.js} +1 -1
- package/dist/{doctor-completion-CK8FANuP.js → doctor-completion-h4hJ8EC_.js} +1 -1
- package/dist/entry.js +2 -2
- package/dist/extensionAPI.js +1 -1
- package/dist/{fetch-Kd-ZkhaC.js → fetch-Bd6dZr3f.js} +4 -4
- package/dist/{fetch-guard-dSFwQVdY.js → fetch-guard-CcIHzaq9.js} +3 -3
- package/dist/{fetch-DB60S6Pe.js → fetch-jnMCAr8M.js} +3 -3
- package/dist/{frontmatter-D5wSndvU.js → frontmatter-B3DSwN7Q.js} +3 -3
- package/dist/{gateway-cli-BF0dwPvr.js → gateway-cli-EoE6lkiM.js} +8 -8
- package/dist/{gateway-cli-C1AaS4sS.js → gateway-cli-lxMPuiGp.js} +8 -8
- package/dist/{github-copilot-token-BsRMNR1J.js → github-copilot-token-Cv01j7Da.js} +7 -7
- package/dist/{health-CHSSafxz.js → health-CwrmDX6F.js} +1 -1
- package/dist/{health-DZC6FQVq.js → health-JkRatG0y.js} +1 -1
- package/dist/{hooks-cli-BD5QZVI0.js → hooks-cli-D31CYG6U.js} +2 -2
- package/dist/{hooks-cli-gMEa1lC5.js → hooks-cli-oX2gUZMg.js} +2 -2
- package/dist/{image-CzbVS4Px.js → image-CUHtH2ov.js} +4 -4
- package/dist/image-runtime-CyCflyrd.js +12 -0
- package/dist/index.js +6 -6
- package/dist/{ir-DpC-GTgx.js → ir-DqRr7hEM.js} +6 -6
- package/dist/llm-slug-generator.js +35 -35
- package/dist/{logger-6VOE82vC.js → logger-Dk0Ze7CZ.js} +7 -7
- package/dist/{login-C0Aj2wbv.js → login-ii3VsVTs.js} +4 -4
- package/dist/{login-qr-Bvddvj_q.js → login-qr-DtCHsF-S.js} +10 -10
- package/dist/{manager-BbQytYnR.js → manager-DSp4S63y.js} +12 -12
- package/dist/manager-runtime-BPcwKtWq.js +15 -0
- package/dist/{model-selection-Dv7kUD2t.js → model-selection-CTRvq26d.js} +120 -120
- package/dist/{models-BstWPD04.js → models-ClLAqwV2.js} +2 -2
- package/dist/{models-cli-BgafLcSs.js → models-cli-BoabFG-z.js} +2 -2
- package/dist/{models-cli-Ben00rns.js → models-cli-Cv4XnpgY.js} +3 -3
- package/dist/{npm-resolution-B-lXuFGR.js → npm-resolution-AC4pvDCN.js} +1 -1
- package/dist/{npm-resolution-DwGz5wym.js → npm-resolution-BfTmdPkZ.js} +1 -1
- package/dist/{onboard-Bx1a58T2.js → onboard-0NLi57Vh.js} +2 -2
- package/dist/{onboard-BT8SVF6e.js → onboard-8vbfU3ju.js} +2 -2
- package/dist/{onboard-channels-COD821xq.js → onboard-channels-B2leCjTi.js} +1 -1
- package/dist/{onboard-channels-CeptZCQY.js → onboard-channels-Bxw-iRlq.js} +1 -1
- package/dist/{onboarding-D8iKH6re.js → onboarding-D0MXwUPz.js} +3 -3
- package/dist/{onboarding-CKcNAv-6.js → onboarding-DJWOb_0C.js} +3 -3
- package/dist/{onboarding.finalize-df4t6_rY.js → onboarding.finalize-3NjT6e9z.js} +6 -6
- package/dist/{onboarding.finalize-CBGbT5-V.js → onboarding.finalize-Dw8u3Fwp.js} +5 -5
- package/dist/{outbound-CilWYThF.js → outbound-DOEYCXCG.js} +6 -6
- package/dist/{outbound-attachment-Cc92tlRX.js → outbound-attachment-D1EEHUb5.js} +2 -2
- package/dist/{paths-WADFVav-.js → paths-CqN6xa62.js} +7 -7
- package/dist/{paths-DLyW11Uc.js → paths-DH2q2Tz2.js} +5 -5
- package/dist/{pi-embedded-BBUpW_TK.js → pi-embedded-CU8OaUk7.js} +6 -6
- package/dist/{pi-embedded-D0Iyms7S.js → pi-embedded-DeLrT8gJ.js} +150 -150
- package/dist/{pi-model-discovery-DKNkGdYS.js → pi-model-discovery-CpH_dmZF.js} +7 -7
- package/dist/pi-model-discovery-runtime-BtVHvn2Z.js +12 -0
- package/dist/{pi-tools.before-tool-call.runtime-B9pxTmwu.js → pi-tools.before-tool-call.runtime-Cv-EQBKI.js} +10 -10
- package/dist/{plugin-registry-DsHpkm1z.js → plugin-registry-C6m72uQY.js} +1 -1
- package/dist/{plugin-registry-_w9cCLPf.js → plugin-registry-CPPgLat0.js} +1 -1
- package/dist/plugin-sdk/{active-listener-DHUCSwd_.js → active-listener-DneY0bNi.js} +2 -2
- package/dist/plugin-sdk/{api-key-rotation-C9Opm2pi.js → api-key-rotation-D8Ypq4t-.js} +1 -1
- package/dist/plugin-sdk/{audio-preflight-DgcACjGT.js → audio-preflight-FQFDI7o4.js} +10 -10
- package/dist/plugin-sdk/{audio-transcription-runner-DxPpYMb2.js → audio-transcription-runner-DrpD4ePb.js} +9 -9
- package/dist/plugin-sdk/{audit-membership-runtime-BANoF7Db.js → audit-membership-runtime-oS2QK_tV.js} +4 -4
- package/dist/plugin-sdk/{channel-activity-BhpE1hfX.js → channel-activity-DpLEjcVa.js} +2 -2
- package/dist/plugin-sdk/{channel-web-BwOMVdgC.js → channel-web-CWFhLqx-.js} +1 -1
- package/dist/plugin-sdk/{channel-web-kZltMKfK.js → channel-web-Do0vefZK.js} +1 -1
- package/dist/plugin-sdk/{commands-registry-CuA1Jtia.js → commands-registry-DPhO7gsj.js} +2 -2
- package/dist/plugin-sdk/compact.runtime-Bw3bBQRf.js +35 -0
- package/dist/plugin-sdk/{compact.runtime-D99h-K7Q.js → compact.runtime-C2sRr77b.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-XfJjLlGG.js → compact.runtime-CZpINwLk.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-D1gpvBez.js → compact.runtime-CqVArbOy.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-fX5K2yza.js → compact.runtime-DwpdEjMZ.js} +1 -1
- package/dist/plugin-sdk/{compact.runtime-BK7DkulA.js → compact.runtime-kXlwyoyQ.js} +1 -1
- package/dist/plugin-sdk/compat.js +2 -2
- package/dist/plugin-sdk/{deliver-XQ0wySLe.js → deliver-DH8opED3.js} +7 -7
- package/dist/plugin-sdk/deliver-runtime-C2AGd-Fx.js +15 -0
- package/dist/plugin-sdk/deps-send-discord.runtime-BldRteZ-.js +15 -0
- package/dist/plugin-sdk/deps-send-imessage.runtime-CJj8OonF.js +14 -0
- package/dist/plugin-sdk/deps-send-signal.runtime-BssZdgwz.js +13 -0
- package/dist/plugin-sdk/deps-send-slack.runtime-DNHUnl8Z.js +13 -0
- package/dist/plugin-sdk/deps-send-telegram.runtime-Rb_PHfoZ.js +16 -0
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-BxanPbyv.js → deps-send-whatsapp.runtime-C-h50AAy.js} +2 -2
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DLbe9BEI.js → deps-send-whatsapp.runtime-CLhapJ1n.js} +2 -2
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-CSdMSf4P.js +39 -0
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-zRy8zuUS.js → deps-send-whatsapp.runtime-DJgNi3YT.js} +2 -2
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-Bz-OzGha.js → deps-send-whatsapp.runtime-DRNsCqBq.js} +3 -3
- package/dist/plugin-sdk/{deps-send-whatsapp.runtime-DmnMuABt.js → deps-send-whatsapp.runtime-DdrmcA-s.js} +3 -3
- package/dist/plugin-sdk/{diagnostic-BhKlOjt1.js → diagnostic-CHUX2izx.js} +2 -2
- package/dist/plugin-sdk/{dispatch-ByQ4YKaP.js → dispatch-B0WozmFd.js} +6 -6
- package/dist/plugin-sdk/{dispatch-BqqcXgMT.js → dispatch-D0RGlExZ.js} +6 -6
- package/dist/plugin-sdk/{dispatch-BozdMzjL.js → dispatch-DEONo5y4.js} +6 -6
- package/dist/plugin-sdk/{dispatch-BJY_kIZN.js → dispatch-Dk3oVErV.js} +6 -6
- package/dist/plugin-sdk/{dispatch-DJzEpfLy.js → dispatch-HE08O-sT.js} +60 -60
- package/dist/plugin-sdk/{fetch-Bo_2gd3j.js → fetch-CCj4rGzv.js} +3 -3
- package/dist/plugin-sdk/{fetch-guard-Cuze2vRj.js → fetch-guard-DwKQhbjg.js} +3 -3
- package/dist/plugin-sdk/{image-BIWFJjhD.js → image-DcnZ7H0m.js} +4 -4
- package/dist/plugin-sdk/image-runtime-DwNHiZsc.js +8 -0
- package/dist/plugin-sdk/imessage.js +2 -2
- package/dist/plugin-sdk/index.js +2 -2
- package/dist/plugin-sdk/{ir-D5oLoLwO.js → ir-Wcn2MuS6.js} +4 -4
- package/dist/plugin-sdk/irc.js +1 -1
- package/dist/plugin-sdk/{local-roots-Ba-vCmST.js → local-roots-m3E1qh29.js} +3 -3
- package/dist/plugin-sdk/{logger-gkkSl4rm.js → logger-b49mPkXE.js} +2 -2
- package/dist/plugin-sdk/{login-hhWtd8wj.js → login-DSsXjZtA.js} +3 -3
- package/dist/plugin-sdk/{login-qr-BWJwYOch.js → login-qr-xhsSqelV.js} +5 -5
- package/dist/plugin-sdk/{manager-CDUT9HE2.js → manager-DqkhVP3P.js} +7 -7
- package/dist/plugin-sdk/manager-runtime-CJyxV92f.js +11 -0
- package/dist/plugin-sdk/matrix.js +1 -1
- package/dist/plugin-sdk/{model-auth-IPhZKXZh.js → model-auth-CyziUml9.js} +12 -12
- package/dist/plugin-sdk/msteams.js +30 -30
- package/dist/plugin-sdk/nextcloud-talk.js +1 -1
- package/dist/plugin-sdk/{outbound-DODmsGUJ.js → outbound-Qi0MhCES.js} +5 -5
- package/dist/plugin-sdk/{outbound-attachment-CtW_rarD.js → outbound-attachment-B7FfzWUQ.js} +2 -2
- package/dist/plugin-sdk/{paths-DKnAgHLh.js → paths-LTUtFCPb.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-BiXHqP7l.js → pi-model-discovery-AJ-yKYRw.js} +1 -1
- package/dist/plugin-sdk/{pi-model-discovery-runtime-BhwOfFKp.js → pi-model-discovery-runtime-By5bFml0.js} +5 -5
- package/dist/plugin-sdk/{pi-tools.before-tool-call.runtime-BIE7MANa.js → pi-tools.before-tool-call.runtime-c3yWR9gJ.js} +5 -5
- package/dist/plugin-sdk/{proxy-env-BDMQGH-A.js → proxy-env-CezuMQsC.js} +1 -1
- package/dist/{proxy-fetch-Hz2DPH2J.js → plugin-sdk/proxy-fetch-Dn-odmKS.js} +2 -2
- package/dist/plugin-sdk/{pw-ai-pMYERveQ.js → pw-ai-BaLlStd1.js} +4 -4
- package/dist/plugin-sdk/{qmd-manager-BebAIhGS.js → qmd-manager-KAGKwJXg.js} +3 -3
- package/dist/plugin-sdk/qqbrowser/system_prompt/custom-prompt.generated.d.ts +1 -1
- package/dist/plugin-sdk/{reply-BKVG6l__.js → reply-C0XujVAb.js} +6 -6
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-DxQrr1vf.js +9 -0
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-ezj35O_y.js +13 -0
- package/dist/plugin-sdk/{send-BmB0T72m.js → send-BgQuEvFO.js} +9 -9
- package/dist/plugin-sdk/{send-CNj3lvAP.js → send-BnfXefQY.js} +5 -5
- package/dist/plugin-sdk/{send-xpsFIt1O.js → send-Bt8Qf38T.js} +6 -6
- package/dist/plugin-sdk/{send-DeN-IpBX.js → send-CplTQ3JD.js} +4 -4
- package/dist/plugin-sdk/{send-BOGjU77W.js → send-DqdSIoGB.js} +6 -6
- package/dist/plugin-sdk/{session-QXpvYS-o.js → session-DkVTYkzA.js} +2 -2
- package/dist/plugin-sdk/signal.js +2 -2
- package/dist/plugin-sdk/{skill-commands-CCfIVnV4.js → skill-commands-C7MWJscC.js} +4 -4
- package/dist/plugin-sdk/{slash-commands.runtime-B3aqusJt.js → slash-commands.runtime-RvSO86D8.js} +5 -5
- package/dist/plugin-sdk/slash-dispatch.runtime-BnfWfK8c.js +35 -0
- package/dist/plugin-sdk/{slash-dispatch.runtime-Cf9xcn1e.js → slash-dispatch.runtime-CdKqAW34.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-DRNyRHzJ.js → slash-dispatch.runtime-CmI_GLXt.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-kG3WEn_Y.js → slash-dispatch.runtime-CntjZmOU.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-CUJ3PyIW.js → slash-dispatch.runtime-D8nUj6YM.js} +1 -1
- package/dist/plugin-sdk/{slash-dispatch.runtime-CVQBRjnm.js → slash-dispatch.runtime-DGc5dzf4.js} +1 -1
- package/dist/plugin-sdk/slash-skill-commands.runtime-DdVX1pxo.js +9 -0
- package/dist/plugin-sdk/{sqlite-xEi0CAvK.js → sqlite-Ep7zBzx2.js} +2 -2
- package/dist/plugin-sdk/{subagent-registry-runtime-gyWtGO2W.js → subagent-registry-runtime-6xQtRr93.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-x4W_TgfA.js → subagent-registry-runtime-BU6cqFa7.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-CB5zhN4l.js → subagent-registry-runtime-BVc9snlu.js} +1 -1
- package/dist/plugin-sdk/subagent-registry-runtime-D6u7_AUt.js +35 -0
- package/dist/plugin-sdk/{subagent-registry-runtime-DrMkyHPW.js → subagent-registry-runtime-gla7pFj7.js} +1 -1
- package/dist/plugin-sdk/{subagent-registry-runtime-8_NEpm08.js → subagent-registry-runtime-jaPacPP9.js} +1 -1
- package/dist/plugin-sdk/{tables-DnB_pxHh.js → tables-m7wUH5t9.js} +1 -1
- package/dist/plugin-sdk/{target-errors-CvpKDWhY.js → target-errors-BBDzJUoG.js} +2 -2
- package/dist/plugin-sdk/telegram.js +2 -2
- package/dist/{tokens-CVetWOS2.js → plugin-sdk/tokens-BKV1QCXt.js} +1 -1
- package/dist/plugin-sdk/{web-DKXHyg4V.js → web-8kSmEkNl.js} +1 -1
- package/dist/plugin-sdk/{web-Dq7rzGDp.js → web-BooFpwid.js} +2 -2
- package/dist/plugin-sdk/{web-HdySWqm5.js → web-Cgz1BvI7.js} +1 -1
- package/dist/plugin-sdk/{web-Ck6arE6Q.js → web-DG8OnguX.js} +2 -2
- package/dist/plugin-sdk/{web-wEgBmpK3.js → web-DVQg8GC6.js} +34 -34
- package/dist/plugin-sdk/{web-D3Z-AKng.js → web-DzDiDxMa.js} +1 -1
- package/dist/plugin-sdk/{whatsapp-actions-B03_B0tu.js → whatsapp-actions-Bk4kndY9.js} +10 -10
- package/dist/plugin-sdk/whatsapp.js +2 -2
- package/dist/{plugins-cli-DSIOOCUL.js → plugins-cli-Cp1cM9yu.js} +2 -2
- package/dist/{plugins-cli-PeTyq4CV.js → plugins-cli-D2Mqyo-n.js} +2 -2
- package/dist/{program-CFA9wIFl.js → program-BX3a8b7b.js} +7 -7
- package/dist/{program-context-CmgWgfyz.js → program-context-CXaJyU0p.js} +17 -17
- package/dist/{prompt-select-styled-BdzUQdk4.js → prompt-select-styled-0bncCYy7.js} +4 -4
- package/dist/{prompt-select-styled-CA9NHRFI.js → prompt-select-styled-DZWBMvgJ.js} +4 -4
- package/dist/{provider-auth-helpers-CdcMQChI.js → provider-auth-helpers-6qoMKvbS.js} +1 -1
- package/dist/{provider-auth-helpers-CxjLuoTn.js → provider-auth-helpers-C3qQvpRQ.js} +1 -1
- package/dist/{proxy-env-BONg_IRb.js → proxy-env-DgYLHn1g.js} +1 -1
- package/dist/{plugin-sdk/proxy-fetch-BRYObOFw.js → proxy-fetch-BjBqq0S4.js} +2 -2
- package/dist/{push-apns-MkMTH566.js → push-apns-C-Zj7LE6.js} +1 -1
- package/dist/{push-apns-BY5FzfVx.js → push-apns-CwfdCIaD.js} +1 -1
- package/dist/{pw-ai-BF0P8FMp.js → pw-ai-CLIIEeAR.js} +9 -9
- package/dist/{qmd-manager-B30UiQgm.js → qmd-manager-Cc9_yffU.js} +6 -6
- package/dist/{query-expansion-9YZHQs6q.js → query-expansion-V2e9egpC.js} +4 -4
- package/dist/{register.agent-yR9jfzCN.js → register.agent-DITgBVOG.js} +7 -7
- package/dist/{register.agent-CB6MWN6M.js → register.agent-H7lwExvJ.js} +6 -6
- package/dist/{register.configure-C_89ZtSZ.js → register.configure-BFquRP1q.js} +7 -7
- package/dist/{register.configure-DnaCdMI0.js → register.configure-BhIyf0OD.js} +7 -7
- package/dist/{register.maintenance-VsSCW4fQ.js → register.maintenance-BoSqsQVo.js} +8 -8
- package/dist/{register.maintenance-BVc3SCOZ.js → register.maintenance-DroeNM_X.js} +7 -7
- package/dist/{register.message-CFWGrYxn.js → register.message-B8vfflz0.js} +2 -2
- package/dist/{register.message-8zFXQKgC.js → register.message-BCBlgL41.js} +2 -2
- package/dist/{register.onboard-9zNrLLh9.js → register.onboard-C0xiFyU0.js} +2 -2
- package/dist/{register.onboard-CBzdfmxf.js → register.onboard-dARAkFg8.js} +2 -2
- package/dist/{register.setup-CLR-UW8R.js → register.setup-0uBLFjFi.js} +2 -2
- package/dist/{register.setup-C_DTG8gR.js → register.setup-B6QWE5lp.js} +2 -2
- package/dist/{register.status-health-sessions-rMAbUJlg.js → register.status-health-sessions-Cueh5dxB.js} +3 -3
- package/dist/{register.status-health-sessions-j-RyywjN.js → register.status-health-sessions-KKSKLq2h.js} +3 -3
- package/dist/{register.subclis-DgH_EwI_.js → register.subclis-BFtmge-U.js} +9 -9
- package/dist/{reply-Mgl_h9G3.js → reply-DmwD0IYg.js} +6 -6
- package/dist/{run-main-Cq4M3yM7.js → run-main-BgboK6f7.js} +15 -15
- package/dist/runtime-whatsapp-login.runtime-D-Rp1pTh.js +13 -0
- package/dist/runtime-whatsapp-outbound.runtime-DkxUInN9.js +17 -0
- package/dist/{send-BQ-Nw5o92.js → send-7RZ-_vAv2.js} +4 -4
- package/dist/{send-Bl_SVPlR.js → send-ByxspBIF.js} +7 -7
- package/dist/{send-Bja-rBOy.js → send-CVutquyB.js} +5 -5
- package/dist/{send-DeyYf_ua.js → send-DrNWTcOY.js} +25 -25
- package/dist/{send-goljIDwD.js → send-z8qRRlrK.js} +6 -6
- package/dist/{server-node-events-BYNOBkHr.js → server-node-events-CFAYug3Y.js} +2 -2
- package/dist/{server-node-events-B3qQLmud.js → server-node-events-CSYxGvqr.js} +2 -2
- package/dist/{session-DldhE9PT.js → session-C8WpWPX4.js} +7 -7
- package/dist/{skill-commands-GVIiyqZ8.js → skill-commands-BYYuxeuS.js} +8 -8
- package/dist/slash-commands.runtime-B3LvZpKf.js +12 -0
- package/dist/{slash-dispatch.runtime-Bh-pycwm.js → slash-dispatch.runtime-B0m_ytsf.js} +1 -1
- package/dist/slash-dispatch.runtime-BWLAbYRN.js +39 -0
- package/dist/{slash-dispatch.runtime-DDo70iAs.js → slash-dispatch.runtime-D8x2BDky.js} +1 -1
- package/dist/{slash-dispatch.runtime-BOatIfnU.js → slash-dispatch.runtime-awRYlRPW.js} +1 -1
- package/dist/slash-skill-commands.runtime-zU1kVi9u.js +13 -0
- package/dist/{status-Bpdz-6yW.js → status-Cg4qCb6L.js} +2 -2
- package/dist/{status-BCKTYN-b.js → status-OryV-dwh.js} +2 -2
- package/dist/{subagent-registry-runtime-DqvsjAYM.js → subagent-registry-runtime-D8RYoN0p.js} +1 -1
- package/dist/{subagent-registry-runtime-pX4vRbP9.js → subagent-registry-runtime-DWp2m4rb.js} +1 -1
- package/dist/{subagent-registry-runtime-8QMQdPQq.js → subagent-registry-runtime-DdFDqNPO.js} +1 -1
- package/dist/subagent-registry-runtime-sE41prmG.js +39 -0
- package/dist/{subsystem-DNNJDVQe.js → subsystem-BKsORW9w.js} +14 -14
- package/dist/{tables-DMsvolAm.js → tables-BU_H4nY6.js} +1 -1
- package/dist/{target-errors-8jjNoBL0.js → target-errors-BIzjX1fS.js} +2 -2
- package/dist/{plugin-sdk/tokens-C7z0GjTP.js → tokens-Bni6rpzF.js} +1 -1
- package/dist/{update-cli-DWYZ1tUm.js → update-cli-CEdR0Ynr.js} +7 -7
- package/dist/{update-cli-CL7uUgaP.js → update-cli-D1brJHee.js} +8 -8
- package/dist/{update-runner-BqSKGaJN.js → update-runner-BHJAqAWW.js} +1 -1
- package/dist/{update-runner-CEYdupYX.js → update-runner-VYVhCqYi.js} +1 -1
- package/dist/{web-BIi6BO7W.js → web-BiMwVGat.js} +39 -39
- package/dist/{web-BPbbgjpU.js → web-BkrHANg4.js} +2 -2
- package/dist/{web-DBq9huL6.js → web-C9AKRZah.js} +2 -2
- package/dist/{web-Bjan-Rsw.js → web-CPjSHqun.js} +1 -1
- package/dist/{whatsapp-actions-BxKgTbFB.js → whatsapp-actions-Dj7amXQf.js} +15 -15
- package/dist/{workspace-DbJSpu_1.js → workspace-DKFhGA36.js} +19 -19
- package/package.json +1 -1
- package/dist/compact.runtime-Dg0TmuzG.js +0 -39
- package/dist/deliver-runtime-DyMFu2FO.js +0 -19
- package/dist/deps-send-discord.runtime-gRnUgs2H.js +0 -19
- package/dist/deps-send-imessage.runtime-5FilPWGb.js +0 -18
- package/dist/deps-send-signal.runtime-gS6ZPRwB.js +0 -17
- package/dist/deps-send-slack.runtime-DTzQNAy6.js +0 -17
- package/dist/deps-send-telegram.runtime-Q2yCOTPa.js +0 -20
- package/dist/deps-send-whatsapp.runtime-Bvft5vAZ.js +0 -43
- package/dist/image-runtime-CpWYN3Ha.js +0 -12
- package/dist/manager-runtime-Fh2dlaK2.js +0 -15
- package/dist/pi-model-discovery-runtime-Gxda8_lc.js +0 -12
- package/dist/plugin-sdk/compact.runtime-DwmAb9nx.js +0 -35
- package/dist/plugin-sdk/deliver-runtime-DNOJ4OJQ.js +0 -15
- package/dist/plugin-sdk/deps-send-discord.runtime-BqvwEzKm.js +0 -15
- package/dist/plugin-sdk/deps-send-imessage.runtime-CbkVBXpM.js +0 -14
- package/dist/plugin-sdk/deps-send-signal.runtime-GuMM4vi_.js +0 -13
- package/dist/plugin-sdk/deps-send-slack.runtime-CyeC0GC4.js +0 -13
- package/dist/plugin-sdk/deps-send-telegram.runtime-B1OdPD47.js +0 -16
- package/dist/plugin-sdk/deps-send-whatsapp.runtime-CAGeTaCS.js +0 -39
- package/dist/plugin-sdk/image-runtime-DiLZ3JHF.js +0 -8
- package/dist/plugin-sdk/manager-runtime-Xfz0umAw.js +0 -11
- package/dist/plugin-sdk/runtime-whatsapp-login.runtime-DHmdnfYc.js +0 -9
- package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-Bc8wvDBD.js +0 -13
- package/dist/plugin-sdk/slash-dispatch.runtime-Sx51CCEH.js +0 -35
- package/dist/plugin-sdk/slash-skill-commands.runtime-CaZ-hyQx.js +0 -9
- package/dist/plugin-sdk/subagent-registry-runtime-ts_kQGiR.js +0 -35
- package/dist/runtime-whatsapp-login.runtime-CH0uHMT2.js +0 -13
- package/dist/runtime-whatsapp-outbound.runtime-DQrA9vyJ.js +0 -17
- package/dist/slash-commands.runtime-bre1xiAP.js +0 -12
- package/dist/slash-dispatch.runtime-DkGyW6Mw.js +0 -39
- package/dist/slash-skill-commands.runtime-DrY95thE.js +0 -13
- package/dist/subagent-registry-runtime-TRroxozR.js +0 -39
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
|
|
2
|
-
import { $ as normalizeHyphenSlug, A as PATH_ALIAS_POLICIES, B as resolveAgentConfig, G as resolveAgentWorkspaceDir, H as resolveAgentEffectiveModelPrimary, K as resolveDefaultAgentId, L as runTasksWithConcurrency, M as getDefaultRedactPatterns, N as redactSensitiveText, Q as normalizeAtHashSlug, T as openFileWithinRoot, Y as resolveSessionAgentId, Z as normalizeSkillFilter, a as resolveSessionTranscriptPathInDir, c as materializeWindowsSpawnProgram, d as extensionForMime, et as normalizeStringEntries, i as resolveSessionTranscriptPath, it as toAgentModelListLike, j as assertNoPathAliasEscape, l as resolveWindowsSpawnProgram, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, rt as resolveAgentModelPrimaryValue, s as resolveStorePath, t as resolveDefaultSessionStorePath, u as detectMime, x as SafeOpenError } from "./paths-
|
|
3
|
-
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, n as STATE_DIR, o as resolveOAuthDir, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-
|
|
4
|
-
import { E as resolvePreferredOpenClawTmpDir, T as readLoggingConfig, a as defaultRuntime, b as getChildLogger, d as logVerbose, h as success, n as sanitizeForLog, r as stripAnsi, t as createSubsystemLogger, u as info } from "./subsystem-
|
|
5
|
-
import { A as isNotFoundPathError, C as openBoundaryFileSync, H as normalizeMainKey, I as buildAgentMainSessionKey, J as DEFAULT_ACCOUNT_ID, O as resolvePathViaExistingAncestorSync, P as DEFAULT_AGENT_ID, S as openBoundaryFile, U as resolveAgentIdFromSessionKey, V as normalizeAgentId, X as normalizeOptionalAccountId, Y as normalizeAccountId$1, Z as isBlockedObjectKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, b as markOpenClawExecEnv, c as DEFAULT_USER_FILENAME, h as resolveOpenClawPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, j as isPathInside$2, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as openVerifiedFileSync, x as canUseBoundaryFileOpen } from "./workspace-
|
|
6
|
-
import { C as sleep, D as isPlainObject$2, E as truncateUtf16Safe, _ as resolveConfigDir, a as CONFIG_DIR, f as isRecord$4, h as normalizeE164, m as jidToE164, u as escapeRegExp, y as resolveUserPath } from "./logger-
|
|
7
|
-
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-
|
|
2
|
+
import { $ as normalizeHyphenSlug, A as PATH_ALIAS_POLICIES, B as resolveAgentConfig, G as resolveAgentWorkspaceDir, H as resolveAgentEffectiveModelPrimary, K as resolveDefaultAgentId, L as runTasksWithConcurrency, M as getDefaultRedactPatterns, N as redactSensitiveText, Q as normalizeAtHashSlug, T as openFileWithinRoot, Y as resolveSessionAgentId, Z as normalizeSkillFilter, a as resolveSessionTranscriptPathInDir, c as materializeWindowsSpawnProgram, d as extensionForMime, et as normalizeStringEntries, i as resolveSessionTranscriptPath, it as toAgentModelListLike, j as assertNoPathAliasEscape, l as resolveWindowsSpawnProgram, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, rt as resolveAgentModelPrimaryValue, s as resolveStorePath, t as resolveDefaultSessionStorePath, u as detectMime, x as SafeOpenError } from "./paths-CqN6xa62.js";
|
|
3
|
+
import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, i as resolveDefaultConfigCandidates, l as expandHomePrefix, n as STATE_DIR, o as resolveOAuthDir, r as resolveConfigPath, s as resolveOAuthPath, t as DEFAULT_GATEWAY_PORT } from "./paths-DH2q2Tz2.js";
|
|
4
|
+
import { E as resolvePreferredOpenClawTmpDir, T as readLoggingConfig, a as defaultRuntime, b as getChildLogger, d as logVerbose, h as success, n as sanitizeForLog, r as stripAnsi, t as createSubsystemLogger, u as info } from "./subsystem-BKsORW9w.js";
|
|
5
|
+
import { A as isNotFoundPathError, C as openBoundaryFileSync, H as normalizeMainKey, I as buildAgentMainSessionKey, J as DEFAULT_ACCOUNT_ID, O as resolvePathViaExistingAncestorSync, P as DEFAULT_AGENT_ID, S as openBoundaryFile, U as resolveAgentIdFromSessionKey, V as normalizeAgentId, X as normalizeOptionalAccountId, Y as normalizeAccountId$1, Z as isBlockedObjectKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, b as markOpenClawExecEnv, c as DEFAULT_USER_FILENAME, h as resolveOpenClawPackageRootSync, i as DEFAULT_HEARTBEAT_FILENAME, j as isPathInside$2, l as ensureAgentWorkspace, n as DEFAULT_AGENT_WORKSPACE_DIR, o as DEFAULT_SOUL_FILENAME, r as DEFAULT_BOOTSTRAP_FILENAME, s as DEFAULT_TOOLS_FILENAME, t as DEFAULT_AGENTS_FILENAME, w as openVerifiedFileSync, x as canUseBoundaryFileOpen } from "./workspace-DKFhGA36.js";
|
|
6
|
+
import { C as sleep, D as isPlainObject$2, E as truncateUtf16Safe, _ as resolveConfigDir, a as CONFIG_DIR, f as isRecord$4, h as normalizeE164, m as jidToE164, u as escapeRegExp, y as resolveUserPath } from "./logger-Dk0Ze7CZ.js";
|
|
7
|
+
import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken, t as DEFAULT_COPILOT_API_BASE_URL } from "./github-copilot-token-Cv01j7Da.js";
|
|
8
8
|
import { t as parseBooleanValue } from "./boolean-C7Ct_klp.js";
|
|
9
|
-
import { n as hasProxyEnvConfigured, r as isTruthyEnvValue } from "./proxy-env-
|
|
10
|
-
import { a as parseOpenClawManifestInstallBase, c as resolveOpenClawManifestOs, d as evaluateRuntimeEligibility, f as hasBinary, i as parseFrontmatterBool, l as resolveOpenClawManifestRequires, m as MANIFEST_KEY, n as getFrontmatterString, o as resolveOpenClawManifestBlock, p as isConfigPathTruthyWithDefaults, r as normalizeStringList$2, s as resolveOpenClawManifestInstall, t as applyOpenClawManifestInstallCommonFields, u as parseFrontmatterBlock, v as registerInternalHook } from "./frontmatter-
|
|
9
|
+
import { n as hasProxyEnvConfigured, r as isTruthyEnvValue } from "./proxy-env-DgYLHn1g.js";
|
|
10
|
+
import { a as parseOpenClawManifestInstallBase, c as resolveOpenClawManifestOs, d as evaluateRuntimeEligibility, f as hasBinary, i as parseFrontmatterBool, l as resolveOpenClawManifestRequires, m as MANIFEST_KEY, n as getFrontmatterString, o as resolveOpenClawManifestBlock, p as isConfigPathTruthyWithDefaults, r as normalizeStringList$2, s as resolveOpenClawManifestInstall, t as applyOpenClawManifestInstallCommonFields, u as parseFrontmatterBlock, v as registerInternalHook } from "./frontmatter-B3DSwN7Q.js";
|
|
11
11
|
import { createRequire } from "node:module";
|
|
12
12
|
import fs from "node:fs/promises";
|
|
13
13
|
import os from "node:os";
|
|
14
14
|
import path, { posix } from "node:path";
|
|
15
|
-
import
|
|
15
|
+
import syncFs from "node:fs";
|
|
16
16
|
import JSON5 from "json5";
|
|
17
17
|
import util, { isDeepStrictEqual } from "node:util";
|
|
18
18
|
import { execFileSync, spawn } from "node:child_process";
|
|
@@ -247,7 +247,7 @@ function isValidPid(pid) {
|
|
|
247
247
|
function isZombieProcess(pid) {
|
|
248
248
|
if (process.platform !== "linux") return false;
|
|
249
249
|
try {
|
|
250
|
-
return
|
|
250
|
+
return syncFs.readFileSync(`/proc/${pid}/status`, "utf8").match(/^State:\s+(\S)/m)?.[1] === "Z";
|
|
251
251
|
} catch {
|
|
252
252
|
return false;
|
|
253
253
|
}
|
|
@@ -274,7 +274,7 @@ function getProcessStartTime(pid) {
|
|
|
274
274
|
if (process.platform !== "linux") return null;
|
|
275
275
|
if (!isValidPid(pid)) return null;
|
|
276
276
|
try {
|
|
277
|
-
const stat =
|
|
277
|
+
const stat = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
278
278
|
const commEndIndex = stat.lastIndexOf(")");
|
|
279
279
|
if (commEndIndex < 0) return null;
|
|
280
280
|
const fields = stat.slice(commEndIndex + 1).trimStart().split(/\s+/);
|
|
@@ -535,7 +535,7 @@ function resolveAuthStorePathForDisplay(agentDir) {
|
|
|
535
535
|
return pathname.startsWith("~") ? pathname : resolveUserPath(pathname);
|
|
536
536
|
}
|
|
537
537
|
function ensureAuthStoreFile(pathname) {
|
|
538
|
-
if (
|
|
538
|
+
if (syncFs.existsSync(pathname)) return;
|
|
539
539
|
saveJsonFile(pathname, {
|
|
540
540
|
version: 1,
|
|
541
541
|
profiles: {}
|
|
@@ -796,7 +796,7 @@ function loadAuthProfileStoreForAgent(agentDir, options) {
|
|
|
796
796
|
if (shouldWrite && legacy !== null) {
|
|
797
797
|
const legacyPath = resolveLegacyAuthStorePath(agentDir);
|
|
798
798
|
try {
|
|
799
|
-
|
|
799
|
+
syncFs.unlinkSync(legacyPath);
|
|
800
800
|
} catch (err) {
|
|
801
801
|
if (err?.code !== "ENOENT") log$19.warn("failed to delete legacy auth.json after migration", {
|
|
802
802
|
err,
|
|
@@ -979,7 +979,7 @@ function loadDotEnv(opts) {
|
|
|
979
979
|
const quiet = opts?.quiet ?? true;
|
|
980
980
|
dotenv.config({ quiet });
|
|
981
981
|
const globalEnvPath = path.join(resolveConfigDir(process.env), ".env");
|
|
982
|
-
if (!
|
|
982
|
+
if (!syncFs.existsSync(globalEnvPath)) return;
|
|
983
983
|
dotenv.config({
|
|
984
984
|
quiet,
|
|
985
985
|
path: globalEnvPath,
|
|
@@ -1128,7 +1128,7 @@ function resolveTimeoutMs(timeoutMs) {
|
|
|
1128
1128
|
function readEtcShells() {
|
|
1129
1129
|
if (cachedEtcShells !== void 0) return cachedEtcShells;
|
|
1130
1130
|
try {
|
|
1131
|
-
const entries =
|
|
1131
|
+
const entries = syncFs.readFileSync("/etc/shells", "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line.length > 0 && !line.startsWith("#") && path.isAbsolute(line));
|
|
1132
1132
|
cachedEtcShells = new Set(entries);
|
|
1133
1133
|
} catch {
|
|
1134
1134
|
cachedEtcShells = null;
|
|
@@ -1589,7 +1589,7 @@ function resolveActiveTalkProviderConfig(talk) {
|
|
|
1589
1589
|
};
|
|
1590
1590
|
}
|
|
1591
1591
|
function readTalkApiKeyFromProfile(deps = {}) {
|
|
1592
|
-
const fsImpl = deps.fs ??
|
|
1592
|
+
const fsImpl = deps.fs ?? syncFs;
|
|
1593
1593
|
const osImpl = deps.os ?? os;
|
|
1594
1594
|
const pathImpl = deps.path ?? path;
|
|
1595
1595
|
const home = osImpl.homedir();
|
|
@@ -2239,7 +2239,7 @@ function isPathInside$1(basePath, candidatePath) {
|
|
|
2239
2239
|
}
|
|
2240
2240
|
function safeRealpathSync$1(filePath) {
|
|
2241
2241
|
try {
|
|
2242
|
-
return
|
|
2242
|
+
return syncFs.realpathSync(filePath);
|
|
2243
2243
|
} catch {
|
|
2244
2244
|
return null;
|
|
2245
2245
|
}
|
|
@@ -2346,7 +2346,7 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
2346
2346
|
const normalized = path.normalize(resolved);
|
|
2347
2347
|
if (!isPathInside$1(this.rootDir, normalized)) throw new ConfigIncludeError(`Include path escapes config directory: ${includePath} (root: ${this.rootDir})`, includePath);
|
|
2348
2348
|
try {
|
|
2349
|
-
const real =
|
|
2349
|
+
const real = syncFs.realpathSync(normalized);
|
|
2350
2350
|
if (!isPathInside$1(this.rootRealDir, real)) throw new ConfigIncludeError(`Include path resolves outside config directory (symlink): ${includePath} (root: ${this.rootDir})`, includePath);
|
|
2351
2351
|
} catch (err) {
|
|
2352
2352
|
if (err instanceof ConfigIncludeError) throw err;
|
|
@@ -2388,13 +2388,13 @@ var IncludeProcessor = class IncludeProcessor {
|
|
|
2388
2388
|
};
|
|
2389
2389
|
function safeRealpath(target) {
|
|
2390
2390
|
try {
|
|
2391
|
-
return
|
|
2391
|
+
return syncFs.realpathSync(target);
|
|
2392
2392
|
} catch {
|
|
2393
2393
|
return target;
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
2396
|
function readConfigIncludeFileWithGuards(params) {
|
|
2397
|
-
const ioFs = params.ioFs ??
|
|
2397
|
+
const ioFs = params.ioFs ?? syncFs;
|
|
2398
2398
|
const maxBytes = params.maxBytes ?? 2097152;
|
|
2399
2399
|
if (!canUseBoundaryFileOpen(ioFs)) return ioFs.readFileSync(params.resolvedPath, "utf-8");
|
|
2400
2400
|
const opened = openBoundaryFileSync({
|
|
@@ -2417,7 +2417,7 @@ function readConfigIncludeFileWithGuards(params) {
|
|
|
2417
2417
|
}
|
|
2418
2418
|
}
|
|
2419
2419
|
const defaultResolver = {
|
|
2420
|
-
readFile: (p) =>
|
|
2420
|
+
readFile: (p) => syncFs.readFileSync(p, "utf-8"),
|
|
2421
2421
|
readFileWithGuards: ({ includePath, resolvedPath, rootRealDir }) => readConfigIncludeFileWithGuards({
|
|
2422
2422
|
includePath,
|
|
2423
2423
|
resolvedPath,
|
|
@@ -4054,7 +4054,7 @@ function normalizeMatchTarget(value) {
|
|
|
4054
4054
|
}
|
|
4055
4055
|
function tryRealpath$1(value) {
|
|
4056
4056
|
try {
|
|
4057
|
-
return
|
|
4057
|
+
return syncFs.realpathSync(value);
|
|
4058
4058
|
} catch {
|
|
4059
4059
|
return null;
|
|
4060
4060
|
}
|
|
@@ -4612,8 +4612,8 @@ function resolveWindowsExecutableExtensions(executable, env) {
|
|
|
4612
4612
|
}
|
|
4613
4613
|
function isExecutableFile(filePath) {
|
|
4614
4614
|
try {
|
|
4615
|
-
if (!
|
|
4616
|
-
if (process.platform !== "win32")
|
|
4615
|
+
if (!syncFs.statSync(filePath).isFile()) return false;
|
|
4616
|
+
if (process.platform !== "win32") syncFs.accessSync(filePath, syncFs.constants.X_OK);
|
|
4617
4617
|
return true;
|
|
4618
4618
|
} catch {
|
|
4619
4619
|
return false;
|
|
@@ -4651,7 +4651,7 @@ const DEFAULT_SAFE_BINS = [
|
|
|
4651
4651
|
function tryResolveRealpath(filePath) {
|
|
4652
4652
|
if (!filePath) return;
|
|
4653
4653
|
try {
|
|
4654
|
-
return
|
|
4654
|
+
return syncFs.realpathSync(filePath);
|
|
4655
4655
|
} catch {
|
|
4656
4656
|
return;
|
|
4657
4657
|
}
|
|
@@ -5531,7 +5531,7 @@ function listWritableExplicitTrustedSafeBinDirs(entries) {
|
|
|
5531
5531
|
for (const dir of resolved) {
|
|
5532
5532
|
let stat;
|
|
5533
5533
|
try {
|
|
5534
|
-
stat =
|
|
5534
|
+
stat = syncFs.statSync(dir);
|
|
5535
5535
|
} catch {
|
|
5536
5536
|
continue;
|
|
5537
5537
|
}
|
|
@@ -6895,13 +6895,13 @@ function resolveBundledPluginsDir(env = process.env) {
|
|
|
6895
6895
|
try {
|
|
6896
6896
|
const execDir = path.dirname(process.execPath);
|
|
6897
6897
|
const sibling = path.join(execDir, "extensions");
|
|
6898
|
-
if (
|
|
6898
|
+
if (syncFs.existsSync(sibling)) return sibling;
|
|
6899
6899
|
} catch {}
|
|
6900
6900
|
try {
|
|
6901
6901
|
let cursor = path.dirname(fileURLToPath(import.meta.url));
|
|
6902
6902
|
for (let i = 0; i < 6; i += 1) {
|
|
6903
6903
|
const candidate = path.join(cursor, "extensions");
|
|
6904
|
-
if (
|
|
6904
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
6905
6905
|
const parent = path.dirname(cursor);
|
|
6906
6906
|
if (parent === cursor) break;
|
|
6907
6907
|
cursor = parent;
|
|
@@ -6919,7 +6919,7 @@ function normalizeStringList$1(value) {
|
|
|
6919
6919
|
function resolvePluginManifestPath(rootDir) {
|
|
6920
6920
|
for (const filename of PLUGIN_MANIFEST_FILENAMES) {
|
|
6921
6921
|
const candidate = path.join(rootDir, filename);
|
|
6922
|
-
if (
|
|
6922
|
+
if (syncFs.existsSync(candidate)) return candidate;
|
|
6923
6923
|
}
|
|
6924
6924
|
return path.join(rootDir, PLUGIN_MANIFEST_FILENAME);
|
|
6925
6925
|
}
|
|
@@ -6945,7 +6945,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
6945
6945
|
}
|
|
6946
6946
|
let raw;
|
|
6947
6947
|
try {
|
|
6948
|
-
raw = JSON.parse(
|
|
6948
|
+
raw = JSON.parse(syncFs.readFileSync(opened.fd, "utf-8"));
|
|
6949
6949
|
} catch (err) {
|
|
6950
6950
|
return {
|
|
6951
6951
|
ok: false,
|
|
@@ -6953,7 +6953,7 @@ function loadPluginManifest(rootDir, rejectHardlinks = true) {
|
|
|
6953
6953
|
manifestPath
|
|
6954
6954
|
};
|
|
6955
6955
|
} finally {
|
|
6956
|
-
|
|
6956
|
+
syncFs.closeSync(opened.fd);
|
|
6957
6957
|
}
|
|
6958
6958
|
if (!isRecord$4(raw)) return {
|
|
6959
6959
|
ok: false,
|
|
@@ -7033,7 +7033,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
7033
7033
|
const cached = cache?.get(targetPath);
|
|
7034
7034
|
if (cached) return cached;
|
|
7035
7035
|
try {
|
|
7036
|
-
const resolved =
|
|
7036
|
+
const resolved = syncFs.realpathSync(targetPath);
|
|
7037
7037
|
cache?.set(targetPath, resolved);
|
|
7038
7038
|
return resolved;
|
|
7039
7039
|
} catch {
|
|
@@ -7042,7 +7042,7 @@ function safeRealpathSync(targetPath, cache) {
|
|
|
7042
7042
|
}
|
|
7043
7043
|
function safeStatSync(targetPath) {
|
|
7044
7044
|
try {
|
|
7045
|
-
return
|
|
7045
|
+
return syncFs.statSync(targetPath);
|
|
7046
7046
|
} catch {
|
|
7047
7047
|
return null;
|
|
7048
7048
|
}
|
|
@@ -7118,7 +7118,7 @@ function checkPathStatAndPermissions(params) {
|
|
|
7118
7118
|
};
|
|
7119
7119
|
let modeBits = stat.mode & 511;
|
|
7120
7120
|
if ((modeBits & 2) !== 0 && params.origin === "bundled") try {
|
|
7121
|
-
|
|
7121
|
+
syncFs.chmodSync(targetPath, modeBits & -19);
|
|
7122
7122
|
const repairedStat = safeStatSync(targetPath);
|
|
7123
7123
|
if (!repairedStat) return {
|
|
7124
7124
|
reason: "path_stat_failed",
|
|
@@ -7203,12 +7203,12 @@ function readPackageManifest(dir, rejectHardlinks = true) {
|
|
|
7203
7203
|
});
|
|
7204
7204
|
if (!opened.ok) return null;
|
|
7205
7205
|
try {
|
|
7206
|
-
const raw =
|
|
7206
|
+
const raw = syncFs.readFileSync(opened.fd, "utf-8");
|
|
7207
7207
|
return JSON.parse(raw);
|
|
7208
7208
|
} catch {
|
|
7209
7209
|
return null;
|
|
7210
7210
|
} finally {
|
|
7211
|
-
|
|
7211
|
+
syncFs.closeSync(opened.fd);
|
|
7212
7212
|
}
|
|
7213
7213
|
}
|
|
7214
7214
|
function deriveIdHint(params) {
|
|
@@ -7261,14 +7261,14 @@ function resolvePackageEntrySource(params) {
|
|
|
7261
7261
|
return null;
|
|
7262
7262
|
}
|
|
7263
7263
|
const safeSource = opened.path;
|
|
7264
|
-
|
|
7264
|
+
syncFs.closeSync(opened.fd);
|
|
7265
7265
|
return safeSource;
|
|
7266
7266
|
}
|
|
7267
7267
|
function discoverInDirectory(params) {
|
|
7268
|
-
if (!
|
|
7268
|
+
if (!syncFs.existsSync(params.dir)) return;
|
|
7269
7269
|
let entries = [];
|
|
7270
7270
|
try {
|
|
7271
|
-
entries =
|
|
7271
|
+
entries = syncFs.readdirSync(params.dir, { withFileTypes: true });
|
|
7272
7272
|
} catch (err) {
|
|
7273
7273
|
params.diagnostics.push({
|
|
7274
7274
|
level: "warn",
|
|
@@ -7329,7 +7329,7 @@ function discoverInDirectory(params) {
|
|
|
7329
7329
|
}
|
|
7330
7330
|
continue;
|
|
7331
7331
|
}
|
|
7332
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) =>
|
|
7332
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(fullPath, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
7333
7333
|
if (indexFile && isExtensionFile(indexFile)) addCandidate({
|
|
7334
7334
|
candidates: params.candidates,
|
|
7335
7335
|
diagnostics: params.diagnostics,
|
|
@@ -7347,7 +7347,7 @@ function discoverInDirectory(params) {
|
|
|
7347
7347
|
}
|
|
7348
7348
|
function discoverFromPath(params) {
|
|
7349
7349
|
const resolved = resolveUserPath(params.rawPath);
|
|
7350
|
-
if (!
|
|
7350
|
+
if (!syncFs.existsSync(resolved)) {
|
|
7351
7351
|
params.diagnostics.push({
|
|
7352
7352
|
level: "error",
|
|
7353
7353
|
message: `plugin path not found: ${resolved}`,
|
|
@@ -7355,7 +7355,7 @@ function discoverFromPath(params) {
|
|
|
7355
7355
|
});
|
|
7356
7356
|
return;
|
|
7357
7357
|
}
|
|
7358
|
-
const stat =
|
|
7358
|
+
const stat = syncFs.statSync(resolved);
|
|
7359
7359
|
if (stat.isFile()) {
|
|
7360
7360
|
if (!isExtensionFile(resolved)) {
|
|
7361
7361
|
params.diagnostics.push({
|
|
@@ -7413,7 +7413,7 @@ function discoverFromPath(params) {
|
|
|
7413
7413
|
}
|
|
7414
7414
|
return;
|
|
7415
7415
|
}
|
|
7416
|
-
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) =>
|
|
7416
|
+
const indexFile = [...DEFAULT_PLUGIN_ENTRY_CANDIDATES].map((candidate) => path.join(resolved, candidate)).find((candidate) => syncFs.existsSync(candidate));
|
|
7417
7417
|
if (indexFile && isExtensionFile(indexFile)) {
|
|
7418
7418
|
addCandidate({
|
|
7419
7419
|
candidates: params.candidates,
|
|
@@ -7548,7 +7548,7 @@ function buildCacheKey$1(params) {
|
|
|
7548
7548
|
}
|
|
7549
7549
|
function safeStatMtimeMs(filePath) {
|
|
7550
7550
|
try {
|
|
7551
|
-
return
|
|
7551
|
+
return syncFs.statSync(filePath).mtimeMs;
|
|
7552
7552
|
} catch {
|
|
7553
7553
|
return null;
|
|
7554
7554
|
}
|
|
@@ -12789,7 +12789,7 @@ function resolveConfigPathForDeps(deps) {
|
|
|
12789
12789
|
}
|
|
12790
12790
|
function normalizeDeps(overrides = {}) {
|
|
12791
12791
|
return {
|
|
12792
|
-
fs: overrides.fs ??
|
|
12792
|
+
fs: overrides.fs ?? syncFs,
|
|
12793
12793
|
json5: overrides.json5 ?? JSON5,
|
|
12794
12794
|
env: overrides.env ?? process.env,
|
|
12795
12795
|
homedir: overrides.homedir ?? (() => resolveRequiredHomeDir(overrides.env ?? process.env, os.homedir)),
|
|
@@ -16960,13 +16960,13 @@ function shortPath(value) {
|
|
|
16960
16960
|
//#region src/agents/skills/bundled-dir.ts
|
|
16961
16961
|
function looksLikeSkillsDir(dir) {
|
|
16962
16962
|
try {
|
|
16963
|
-
const entries =
|
|
16963
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
16964
16964
|
for (const entry of entries) {
|
|
16965
16965
|
if (entry.name.startsWith(".")) continue;
|
|
16966
16966
|
const fullPath = path.join(dir, entry.name);
|
|
16967
16967
|
if (entry.isFile() && entry.name.endsWith(".md")) return true;
|
|
16968
16968
|
if (entry.isDirectory()) {
|
|
16969
|
-
if (
|
|
16969
|
+
if (syncFs.existsSync(path.join(fullPath, "SKILL.md"))) return true;
|
|
16970
16970
|
}
|
|
16971
16971
|
}
|
|
16972
16972
|
} catch {
|
|
@@ -16981,7 +16981,7 @@ function resolveBundledSkillsDir(opts = {}) {
|
|
|
16981
16981
|
const execPath = opts.execPath ?? process.execPath;
|
|
16982
16982
|
const execDir = path.dirname(execPath);
|
|
16983
16983
|
const sibling = path.join(execDir, "skills");
|
|
16984
|
-
if (
|
|
16984
|
+
if (syncFs.existsSync(sibling)) return sibling;
|
|
16985
16985
|
} catch {}
|
|
16986
16986
|
try {
|
|
16987
16987
|
const moduleUrl = opts.moduleUrl ?? import.meta.url;
|
|
@@ -17043,7 +17043,7 @@ function resolvePluginSkillDirs(params) {
|
|
|
17043
17043
|
const trimmed = raw.trim();
|
|
17044
17044
|
if (!trimmed) continue;
|
|
17045
17045
|
const candidate = path.resolve(record.rootDir, trimmed);
|
|
17046
|
-
if (!
|
|
17046
|
+
if (!syncFs.existsSync(candidate)) {
|
|
17047
17047
|
log$16.warn(`plugin skill path not found (${record.id}): ${candidate}`);
|
|
17048
17048
|
continue;
|
|
17049
17049
|
}
|
|
@@ -17072,7 +17072,7 @@ async function serializeByKey(key, task) {
|
|
|
17072
17072
|
}
|
|
17073
17073
|
//#endregion
|
|
17074
17074
|
//#region src/agents/skills/workspace.ts
|
|
17075
|
-
const fsp =
|
|
17075
|
+
const fsp = syncFs.promises;
|
|
17076
17076
|
const skillsLogger = createSubsystemLogger("skills");
|
|
17077
17077
|
const skillCommandDebugOnce = /* @__PURE__ */ new Set();
|
|
17078
17078
|
/**
|
|
@@ -17149,7 +17149,7 @@ function resolveSkillsLimits(config) {
|
|
|
17149
17149
|
}
|
|
17150
17150
|
function listChildDirectories(dir) {
|
|
17151
17151
|
try {
|
|
17152
|
-
const entries =
|
|
17152
|
+
const entries = syncFs.readdirSync(dir, { withFileTypes: true });
|
|
17153
17153
|
const dirs = [];
|
|
17154
17154
|
for (const entry of entries) {
|
|
17155
17155
|
if (entry.name.startsWith(".")) continue;
|
|
@@ -17160,7 +17160,7 @@ function listChildDirectories(dir) {
|
|
|
17160
17160
|
continue;
|
|
17161
17161
|
}
|
|
17162
17162
|
if (entry.isSymbolicLink()) try {
|
|
17163
|
-
if (
|
|
17163
|
+
if (syncFs.statSync(fullPath).isDirectory()) dirs.push(entry.name);
|
|
17164
17164
|
} catch {}
|
|
17165
17165
|
}
|
|
17166
17166
|
return dirs;
|
|
@@ -17170,7 +17170,7 @@ function listChildDirectories(dir) {
|
|
|
17170
17170
|
}
|
|
17171
17171
|
function tryRealpath(filePath) {
|
|
17172
17172
|
try {
|
|
17173
|
-
return
|
|
17173
|
+
return syncFs.realpathSync(filePath);
|
|
17174
17174
|
} catch {
|
|
17175
17175
|
return null;
|
|
17176
17176
|
}
|
|
@@ -17215,7 +17215,7 @@ function filterLoadedSkillsInsideRoot(params) {
|
|
|
17215
17215
|
function resolveNestedSkillsRoot(dir, opts) {
|
|
17216
17216
|
const nested = path.join(dir, "skills");
|
|
17217
17217
|
try {
|
|
17218
|
-
if (!
|
|
17218
|
+
if (!syncFs.existsSync(nested) || !syncFs.statSync(nested).isDirectory()) return { baseDir: dir };
|
|
17219
17219
|
} catch {
|
|
17220
17220
|
return { baseDir: dir };
|
|
17221
17221
|
}
|
|
@@ -17224,7 +17224,7 @@ function resolveNestedSkillsRoot(dir, opts) {
|
|
|
17224
17224
|
const toScan = scanLimit === 0 ? [] : nestedDirs.slice(0, Math.min(nestedDirs.length, scanLimit));
|
|
17225
17225
|
for (const name of toScan) {
|
|
17226
17226
|
const skillMd = path.join(nested, name, "SKILL.md");
|
|
17227
|
-
if (
|
|
17227
|
+
if (syncFs.existsSync(skillMd)) return {
|
|
17228
17228
|
baseDir: nested,
|
|
17229
17229
|
note: `Detected nested skills root at ${nested}`
|
|
17230
17230
|
};
|
|
@@ -17253,7 +17253,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
17253
17253
|
});
|
|
17254
17254
|
if (!baseDirRealPath) return [];
|
|
17255
17255
|
const rootSkillMd = path.join(baseDir, "SKILL.md");
|
|
17256
|
-
if (
|
|
17256
|
+
if (syncFs.existsSync(rootSkillMd)) {
|
|
17257
17257
|
const rootSkillRealPath = resolveContainedSkillPath({
|
|
17258
17258
|
source: params.source,
|
|
17259
17259
|
rootDir,
|
|
@@ -17262,7 +17262,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
17262
17262
|
});
|
|
17263
17263
|
if (!rootSkillRealPath) return [];
|
|
17264
17264
|
try {
|
|
17265
|
-
const size =
|
|
17265
|
+
const size = syncFs.statSync(rootSkillRealPath).size;
|
|
17266
17266
|
if (size > limits.maxSkillFileBytes) {
|
|
17267
17267
|
skillsLogger.warn("Skipping skills root due to oversized SKILL.md.", {
|
|
17268
17268
|
dir: baseDir,
|
|
@@ -17312,7 +17312,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
17312
17312
|
candidatePath: skillDir
|
|
17313
17313
|
})) continue;
|
|
17314
17314
|
const skillMd = path.join(skillDir, "SKILL.md");
|
|
17315
|
-
if (!
|
|
17315
|
+
if (!syncFs.existsSync(skillMd)) continue;
|
|
17316
17316
|
const skillMdRealPath = resolveContainedSkillPath({
|
|
17317
17317
|
source: params.source,
|
|
17318
17318
|
rootDir,
|
|
@@ -17321,7 +17321,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
17321
17321
|
});
|
|
17322
17322
|
if (!skillMdRealPath) continue;
|
|
17323
17323
|
try {
|
|
17324
|
-
const size =
|
|
17324
|
+
const size = syncFs.statSync(skillMdRealPath).size;
|
|
17325
17325
|
if (size > limits.maxSkillFileBytes) {
|
|
17326
17326
|
skillsLogger.warn("Skipping skill due to oversized SKILL.md.", {
|
|
17327
17327
|
skill: name,
|
|
@@ -17394,7 +17394,7 @@ function loadSkillEntries(workspaceDir, opts) {
|
|
|
17394
17394
|
return Array.from(merged.values()).map((skill) => {
|
|
17395
17395
|
let frontmatter = {};
|
|
17396
17396
|
try {
|
|
17397
|
-
frontmatter = parseFrontmatter(
|
|
17397
|
+
frontmatter = parseFrontmatter(syncFs.readFileSync(skill.filePath, "utf-8"));
|
|
17398
17398
|
} catch {}
|
|
17399
17399
|
return {
|
|
17400
17400
|
skill,
|
|
@@ -18027,7 +18027,7 @@ function isModuleNotFoundError(err) {
|
|
|
18027
18027
|
}
|
|
18028
18028
|
async function loadPwAiModule(mode) {
|
|
18029
18029
|
try {
|
|
18030
|
-
return await import("./pw-ai-
|
|
18030
|
+
return await import("./pw-ai-CLIIEeAR.js");
|
|
18031
18031
|
} catch (err) {
|
|
18032
18032
|
if (mode === "soft") return null;
|
|
18033
18033
|
if (isModuleNotFoundError(err)) return null;
|
|
@@ -19483,7 +19483,7 @@ function markPwAiLoaded() {}
|
|
|
19483
19483
|
const LSOF_CANDIDATES = process.platform === "darwin" ? ["/usr/sbin/lsof", "/usr/bin/lsof"] : ["/usr/bin/lsof", "/usr/sbin/lsof"];
|
|
19484
19484
|
function resolveLsofCommandSync() {
|
|
19485
19485
|
for (const candidate of LSOF_CANDIDATES) try {
|
|
19486
|
-
|
|
19486
|
+
syncFs.accessSync(candidate, syncFs.constants.X_OK);
|
|
19487
19487
|
return candidate;
|
|
19488
19488
|
} catch {}
|
|
19489
19489
|
return "lsof";
|
|
@@ -19595,7 +19595,7 @@ const CHROMIUM_EXE_NAMES = new Set([
|
|
|
19595
19595
|
]);
|
|
19596
19596
|
function exists$1(filePath) {
|
|
19597
19597
|
try {
|
|
19598
|
-
return
|
|
19598
|
+
return syncFs.existsSync(filePath);
|
|
19599
19599
|
} catch {
|
|
19600
19600
|
return false;
|
|
19601
19601
|
}
|
|
@@ -19738,7 +19738,7 @@ function findDesktopFilePath(desktopId) {
|
|
|
19738
19738
|
}
|
|
19739
19739
|
function readDesktopExecLine(desktopPath) {
|
|
19740
19740
|
try {
|
|
19741
|
-
const lines =
|
|
19741
|
+
const lines = syncFs.readFileSync(desktopPath, "utf8").split(/\r?\n/);
|
|
19742
19742
|
for (const line of lines) if (line.startsWith("Exec=")) return line.slice(5).trim();
|
|
19743
19743
|
} catch {}
|
|
19744
19744
|
return null;
|
|
@@ -19997,8 +19997,8 @@ function decoratedMarkerPath(userDataDir) {
|
|
|
19997
19997
|
}
|
|
19998
19998
|
function safeReadJson(filePath) {
|
|
19999
19999
|
try {
|
|
20000
|
-
if (!
|
|
20001
|
-
const raw =
|
|
20000
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
20001
|
+
const raw = syncFs.readFileSync(filePath, "utf-8");
|
|
20002
20002
|
const parsed = JSON.parse(raw);
|
|
20003
20003
|
if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) return null;
|
|
20004
20004
|
return parsed;
|
|
@@ -20007,8 +20007,8 @@ function safeReadJson(filePath) {
|
|
|
20007
20007
|
}
|
|
20008
20008
|
}
|
|
20009
20009
|
function safeWriteJson(filePath, data) {
|
|
20010
|
-
|
|
20011
|
-
|
|
20010
|
+
syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
20011
|
+
syncFs.writeFileSync(filePath, JSON.stringify(data, null, 2));
|
|
20012
20012
|
}
|
|
20013
20013
|
function setDeep(obj, keys, value) {
|
|
20014
20014
|
let node = obj;
|
|
@@ -20135,7 +20135,7 @@ function decorateOpenClawProfile(userDataDir, opts) {
|
|
|
20135
20135
|
}
|
|
20136
20136
|
safeWriteJson(preferencesPath, prefs);
|
|
20137
20137
|
try {
|
|
20138
|
-
|
|
20138
|
+
syncFs.writeFileSync(decoratedMarkerPath(userDataDir), `${Date.now()}\n`, "utf-8");
|
|
20139
20139
|
} catch {}
|
|
20140
20140
|
}
|
|
20141
20141
|
function ensureProfileCleanExit(userDataDir) {
|
|
@@ -20150,7 +20150,7 @@ function ensureProfileCleanExit(userDataDir) {
|
|
|
20150
20150
|
const log$15 = createSubsystemLogger("browser").child("chrome");
|
|
20151
20151
|
function exists(filePath) {
|
|
20152
20152
|
try {
|
|
20153
|
-
return
|
|
20153
|
+
return syncFs.existsSync(filePath);
|
|
20154
20154
|
} catch {
|
|
20155
20155
|
return false;
|
|
20156
20156
|
}
|
|
@@ -20262,7 +20262,7 @@ async function launchOpenClawChrome(resolved, profile) {
|
|
|
20262
20262
|
const exe = resolveBrowserExecutable(resolved);
|
|
20263
20263
|
if (!exe) throw new Error("No supported browser found (Chrome/Brave/Edge/Chromium on macOS, Linux, or Windows).");
|
|
20264
20264
|
const userDataDir = resolveOpenClawUserDataDir(profile.name);
|
|
20265
|
-
|
|
20265
|
+
syncFs.mkdirSync(userDataDir, { recursive: true });
|
|
20266
20266
|
const needsDecorate = !isProfileDecorated(userDataDir, profile.name, (profile.color ?? "#FF4500").toUpperCase());
|
|
20267
20267
|
const spawnOnce = () => {
|
|
20268
20268
|
const args = [
|
|
@@ -21308,7 +21308,7 @@ function createProfileAvailability({ opts, profile, state, getProfileState, setP
|
|
|
21308
21308
|
};
|
|
21309
21309
|
const closePlaywrightBrowserConnectionForProfile = async (cdpUrl) => {
|
|
21310
21310
|
try {
|
|
21311
|
-
await (await import("./pw-ai-
|
|
21311
|
+
await (await import("./pw-ai-CLIIEeAR.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
|
|
21312
21312
|
} catch {}
|
|
21313
21313
|
};
|
|
21314
21314
|
const reconcileProfileRuntime = async () => {
|
|
@@ -21417,11 +21417,11 @@ async function movePathToTrash(targetPath) {
|
|
|
21417
21417
|
return targetPath;
|
|
21418
21418
|
} catch {
|
|
21419
21419
|
const trashDir = path.join(os.homedir(), ".Trash");
|
|
21420
|
-
|
|
21420
|
+
syncFs.mkdirSync(trashDir, { recursive: true });
|
|
21421
21421
|
const base = path.basename(targetPath);
|
|
21422
21422
|
let dest = path.join(trashDir, `${base}-${Date.now()}`);
|
|
21423
|
-
if (
|
|
21424
|
-
|
|
21423
|
+
if (syncFs.existsSync(dest)) dest = path.join(trashDir, `${base}-${Date.now()}-${generateSecureToken(6)}`);
|
|
21424
|
+
syncFs.renameSync(targetPath, dest);
|
|
21425
21425
|
return dest;
|
|
21426
21426
|
}
|
|
21427
21427
|
}
|
|
@@ -21429,7 +21429,7 @@ async function movePathToTrash(targetPath) {
|
|
|
21429
21429
|
//#region src/browser/server-context.reset.ts
|
|
21430
21430
|
async function closePlaywrightBrowserConnectionForProfile(cdpUrl) {
|
|
21431
21431
|
try {
|
|
21432
|
-
await (await import("./pw-ai-
|
|
21432
|
+
await (await import("./pw-ai-CLIIEeAR.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
|
|
21433
21433
|
} catch {}
|
|
21434
21434
|
}
|
|
21435
21435
|
function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, isHttpReachable, resolveOpenClawUserDataDir }) {
|
|
@@ -21448,7 +21448,7 @@ function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, i
|
|
|
21448
21448
|
if (await isHttpReachable(300) && !profileState.running) await closePlaywrightBrowserConnectionForProfile(profile.cdpUrl);
|
|
21449
21449
|
if (profileState.running) await stopRunningBrowser();
|
|
21450
21450
|
await closePlaywrightBrowserConnectionForProfile(profile.cdpUrl);
|
|
21451
|
-
if (!
|
|
21451
|
+
if (!syncFs.existsSync(userDataDir)) return {
|
|
21452
21452
|
moved: false,
|
|
21453
21453
|
from: userDataDir
|
|
21454
21454
|
};
|
|
@@ -23669,7 +23669,7 @@ function createBrowserProfilesService(ctx) {
|
|
|
23669
23669
|
} catch {}
|
|
23670
23670
|
const userDataDir = resolveOpenClawUserDataDir(name);
|
|
23671
23671
|
const profileDir = path.dirname(userDataDir);
|
|
23672
|
-
if (
|
|
23672
|
+
if (syncFs.existsSync(profileDir)) {
|
|
23673
23673
|
await movePathToTrash(profileDir);
|
|
23674
23674
|
deleted = true;
|
|
23675
23675
|
}
|
|
@@ -24376,7 +24376,7 @@ function releaseAllLocksSync() {
|
|
|
24376
24376
|
if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
|
|
24377
24377
|
} catch {}
|
|
24378
24378
|
try {
|
|
24379
|
-
|
|
24379
|
+
syncFs.rmSync(held.lockPath, { force: true });
|
|
24380
24380
|
} catch {}
|
|
24381
24381
|
HELD_LOCKS.delete(sessionFile);
|
|
24382
24382
|
}
|
|
@@ -25964,7 +25964,7 @@ var SandboxFsPathGuard = class {
|
|
|
25964
25964
|
if (guarded.reason !== "path") {
|
|
25965
25965
|
if (!(options.allowedType === "directory" && this.pathIsExistingDirectory(target.hostPath))) throw guarded.error instanceof Error ? guarded.error : /* @__PURE__ */ new Error(`Sandbox boundary checks failed; cannot ${options.action}: ${target.containerPath}`);
|
|
25966
25966
|
}
|
|
25967
|
-
} else
|
|
25967
|
+
} else syncFs.closeSync(guarded.fd);
|
|
25968
25968
|
const canonicalContainerPath = await this.resolveCanonicalContainerPath({
|
|
25969
25969
|
containerPath: target.containerPath,
|
|
25970
25970
|
allowFinalSymlinkForUnlink: options.aliasPolicy?.allowFinalSymlinkForUnlink === true
|
|
@@ -26031,7 +26031,7 @@ var SandboxFsPathGuard = class {
|
|
|
26031
26031
|
}
|
|
26032
26032
|
pathIsExistingDirectory(hostPath) {
|
|
26033
26033
|
try {
|
|
26034
|
-
return
|
|
26034
|
+
return syncFs.statSync(hostPath).isDirectory();
|
|
26035
26035
|
} catch {
|
|
26036
26036
|
return false;
|
|
26037
26037
|
}
|
|
@@ -26381,9 +26381,9 @@ var SandboxFsBridgeImpl = class {
|
|
|
26381
26381
|
async readPinnedFile(target) {
|
|
26382
26382
|
const opened = await this.pathGuard.openReadableFile(target);
|
|
26383
26383
|
try {
|
|
26384
|
-
return
|
|
26384
|
+
return syncFs.readFileSync(opened.fd);
|
|
26385
26385
|
} finally {
|
|
26386
|
-
|
|
26386
|
+
syncFs.closeSync(opened.fd);
|
|
26387
26387
|
}
|
|
26388
26388
|
}
|
|
26389
26389
|
async runCheckedCommand(plan) {
|
|
@@ -27251,7 +27251,7 @@ function resolveWebCredsBackupPath(authDir) {
|
|
|
27251
27251
|
}
|
|
27252
27252
|
function hasWebCredsSync(authDir) {
|
|
27253
27253
|
try {
|
|
27254
|
-
const stats =
|
|
27254
|
+
const stats = syncFs.statSync(resolveWebCredsPath(authDir));
|
|
27255
27255
|
return stats.isFile() && stats.size > 1;
|
|
27256
27256
|
} catch {
|
|
27257
27257
|
return false;
|
|
@@ -27259,10 +27259,10 @@ function hasWebCredsSync(authDir) {
|
|
|
27259
27259
|
}
|
|
27260
27260
|
function readCredsJsonRaw(filePath) {
|
|
27261
27261
|
try {
|
|
27262
|
-
if (!
|
|
27263
|
-
const stats =
|
|
27262
|
+
if (!syncFs.existsSync(filePath)) return null;
|
|
27263
|
+
const stats = syncFs.statSync(filePath);
|
|
27264
27264
|
if (!stats.isFile() || stats.size <= 1) return null;
|
|
27265
|
-
return
|
|
27265
|
+
return syncFs.readFileSync(filePath, "utf-8");
|
|
27266
27266
|
} catch {
|
|
27267
27267
|
return null;
|
|
27268
27268
|
}
|
|
@@ -27280,9 +27280,9 @@ function maybeRestoreCredsFromBackup(authDir) {
|
|
|
27280
27280
|
const backupRaw = readCredsJsonRaw(backupPath);
|
|
27281
27281
|
if (!backupRaw) return;
|
|
27282
27282
|
JSON.parse(backupRaw);
|
|
27283
|
-
|
|
27283
|
+
syncFs.copyFileSync(backupPath, credsPath);
|
|
27284
27284
|
try {
|
|
27285
|
-
|
|
27285
|
+
syncFs.chmodSync(credsPath, 384);
|
|
27286
27286
|
} catch {}
|
|
27287
27287
|
logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
|
|
27288
27288
|
} catch {}
|
|
@@ -27338,11 +27338,11 @@ async function logoutWeb(params) {
|
|
|
27338
27338
|
function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
|
|
27339
27339
|
try {
|
|
27340
27340
|
const credsPath = resolveWebCredsPath(resolveUserPath(authDir));
|
|
27341
|
-
if (!
|
|
27341
|
+
if (!syncFs.existsSync(credsPath)) return {
|
|
27342
27342
|
e164: null,
|
|
27343
27343
|
jid: null
|
|
27344
27344
|
};
|
|
27345
|
-
const raw =
|
|
27345
|
+
const raw = syncFs.readFileSync(credsPath, "utf-8");
|
|
27346
27346
|
const jid = JSON.parse(raw)?.me?.id ?? null;
|
|
27347
27347
|
return {
|
|
27348
27348
|
e164: jid ? jidToE164(jid, { authDir }) : null,
|
|
@@ -27361,7 +27361,7 @@ function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
|
|
|
27361
27361
|
*/
|
|
27362
27362
|
function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
|
|
27363
27363
|
try {
|
|
27364
|
-
const stats =
|
|
27364
|
+
const stats = syncFs.statSync(resolveWebCredsPath(resolveUserPath(authDir)));
|
|
27365
27365
|
return Date.now() - stats.mtimeMs;
|
|
27366
27366
|
} catch {
|
|
27367
27367
|
return null;
|
|
@@ -27390,7 +27390,7 @@ function listWhatsAppAuthDirs(cfg) {
|
|
|
27390
27390
|
accountId
|
|
27391
27391
|
}).authDir);
|
|
27392
27392
|
try {
|
|
27393
|
-
const entries =
|
|
27393
|
+
const entries = syncFs.readdirSync(whatsappDir, { withFileTypes: true });
|
|
27394
27394
|
for (const entry of entries) {
|
|
27395
27395
|
if (!entry.isDirectory()) continue;
|
|
27396
27396
|
authDirs.add(path.join(whatsappDir, entry.name));
|
|
@@ -27412,7 +27412,7 @@ function resolveLegacyAuthDir() {
|
|
|
27412
27412
|
}
|
|
27413
27413
|
function legacyAuthExists(authDir) {
|
|
27414
27414
|
try {
|
|
27415
|
-
return
|
|
27415
|
+
return syncFs.existsSync(path.join(authDir, "creds.json"));
|
|
27416
27416
|
} catch {
|
|
27417
27417
|
return false;
|
|
27418
27418
|
}
|
|
@@ -27721,7 +27721,7 @@ function loadSecretFileSync(filePath, label, options = {}) {
|
|
|
27721
27721
|
const maxBytes = options.maxBytes ?? 16384;
|
|
27722
27722
|
let previewStat;
|
|
27723
27723
|
try {
|
|
27724
|
-
previewStat =
|
|
27724
|
+
previewStat = syncFs.lstatSync(resolvedPath);
|
|
27725
27725
|
} catch (error) {
|
|
27726
27726
|
return {
|
|
27727
27727
|
ok: false,
|
|
@@ -27760,7 +27760,7 @@ function loadSecretFileSync(filePath, label, options = {}) {
|
|
|
27760
27760
|
};
|
|
27761
27761
|
}
|
|
27762
27762
|
try {
|
|
27763
|
-
const secret =
|
|
27763
|
+
const secret = syncFs.readFileSync(opened.fd, "utf8").trim();
|
|
27764
27764
|
if (!secret) return {
|
|
27765
27765
|
ok: false,
|
|
27766
27766
|
resolvedPath,
|
|
@@ -27779,7 +27779,7 @@ function loadSecretFileSync(filePath, label, options = {}) {
|
|
|
27779
27779
|
message: `Failed to read ${label} file at ${resolvedPath}: ${String(error)}`
|
|
27780
27780
|
};
|
|
27781
27781
|
} finally {
|
|
27782
|
-
|
|
27782
|
+
syncFs.closeSync(opened.fd);
|
|
27783
27783
|
}
|
|
27784
27784
|
}
|
|
27785
27785
|
function tryReadSecretFileSync(filePath, label, options = {}) {
|
|
@@ -29553,14 +29553,14 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
|
|
|
29553
29553
|
function canonicalizePathForComparison$1(filePath) {
|
|
29554
29554
|
const resolved = path.resolve(filePath);
|
|
29555
29555
|
try {
|
|
29556
|
-
return
|
|
29556
|
+
return syncFs.realpathSync(resolved);
|
|
29557
29557
|
} catch {
|
|
29558
29558
|
return resolved;
|
|
29559
29559
|
}
|
|
29560
29560
|
}
|
|
29561
29561
|
function archiveFileOnDisk(filePath, reason) {
|
|
29562
29562
|
const archived = `${filePath}.${reason}.${formatSessionArchiveTimestamp()}`;
|
|
29563
|
-
|
|
29563
|
+
syncFs.renameSync(filePath, archived);
|
|
29564
29564
|
return archived;
|
|
29565
29565
|
}
|
|
29566
29566
|
/**
|
|
@@ -29576,7 +29576,7 @@ function archiveSessionTranscripts(opts) {
|
|
|
29576
29576
|
const relative = path.relative(storeDir, candidatePath);
|
|
29577
29577
|
if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
|
|
29578
29578
|
}
|
|
29579
|
-
if (!
|
|
29579
|
+
if (!syncFs.existsSync(candidatePath)) continue;
|
|
29580
29580
|
try {
|
|
29581
29581
|
archived.push(archiveFileOnDisk(candidatePath, opts.reason));
|
|
29582
29582
|
} catch {}
|
|
@@ -29594,15 +29594,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
|
|
|
29594
29594
|
let removed = 0;
|
|
29595
29595
|
let scanned = 0;
|
|
29596
29596
|
for (const dir of directories) {
|
|
29597
|
-
const entries = await
|
|
29597
|
+
const entries = await syncFs.promises.readdir(dir).catch(() => []);
|
|
29598
29598
|
for (const entry of entries) {
|
|
29599
29599
|
const timestamp = parseSessionArchiveTimestamp(entry, reason);
|
|
29600
29600
|
if (timestamp == null) continue;
|
|
29601
29601
|
scanned += 1;
|
|
29602
29602
|
if (now - timestamp <= opts.olderThanMs) continue;
|
|
29603
29603
|
const fullPath = path.join(dir, entry);
|
|
29604
|
-
if (!(await
|
|
29605
|
-
await
|
|
29604
|
+
if (!(await syncFs.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
|
|
29605
|
+
await syncFs.promises.rm(fullPath).catch(() => void 0);
|
|
29606
29606
|
removed += 1;
|
|
29607
29607
|
}
|
|
29608
29608
|
}
|
|
@@ -29749,7 +29749,7 @@ function isCacheEnabled(ttlMs) {
|
|
|
29749
29749
|
}
|
|
29750
29750
|
function getFileStatSnapshot(filePath) {
|
|
29751
29751
|
try {
|
|
29752
|
-
const stats =
|
|
29752
|
+
const stats = syncFs.statSync(filePath);
|
|
29753
29753
|
return {
|
|
29754
29754
|
mtimeMs: stats.mtimeMs,
|
|
29755
29755
|
sizeBytes: stats.size
|
|
@@ -29767,7 +29767,7 @@ const NOOP_LOGGER = {
|
|
|
29767
29767
|
function canonicalizePathForComparison(filePath) {
|
|
29768
29768
|
const resolved = path.resolve(filePath);
|
|
29769
29769
|
try {
|
|
29770
|
-
return
|
|
29770
|
+
return syncFs.realpathSync(resolved);
|
|
29771
29771
|
} catch {
|
|
29772
29772
|
return resolved;
|
|
29773
29773
|
}
|
|
@@ -29825,12 +29825,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
|
|
|
29825
29825
|
return referenced;
|
|
29826
29826
|
}
|
|
29827
29827
|
async function readSessionsDirFiles(sessionsDir) {
|
|
29828
|
-
const dirEntries = await
|
|
29828
|
+
const dirEntries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
|
|
29829
29829
|
const files = [];
|
|
29830
29830
|
for (const dirent of dirEntries) {
|
|
29831
29831
|
if (!dirent.isFile()) continue;
|
|
29832
29832
|
const filePath = path.join(sessionsDir, dirent.name);
|
|
29833
|
-
const stat = await
|
|
29833
|
+
const stat = await syncFs.promises.stat(filePath).catch(() => null);
|
|
29834
29834
|
if (!stat?.isFile()) continue;
|
|
29835
29835
|
files.push({
|
|
29836
29836
|
path: filePath,
|
|
@@ -29843,9 +29843,9 @@ async function readSessionsDirFiles(sessionsDir) {
|
|
|
29843
29843
|
return files;
|
|
29844
29844
|
}
|
|
29845
29845
|
async function removeFileIfExists(filePath) {
|
|
29846
|
-
const stat = await
|
|
29846
|
+
const stat = await syncFs.promises.stat(filePath).catch(() => null);
|
|
29847
29847
|
if (!stat?.isFile()) return 0;
|
|
29848
|
-
await
|
|
29848
|
+
await syncFs.promises.rm(filePath, { force: true }).catch(() => void 0);
|
|
29849
29849
|
return stat.size;
|
|
29850
29850
|
}
|
|
29851
29851
|
async function removeFileForBudget(params) {
|
|
@@ -30202,7 +30202,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
|
|
|
30202
30202
|
}
|
|
30203
30203
|
async function getSessionFileSize(storePath) {
|
|
30204
30204
|
try {
|
|
30205
|
-
return (await
|
|
30205
|
+
return (await syncFs.promises.stat(storePath)).size;
|
|
30206
30206
|
} catch {
|
|
30207
30207
|
return null;
|
|
30208
30208
|
}
|
|
@@ -30219,7 +30219,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
30219
30219
|
if (fileSize <= maxBytes) return false;
|
|
30220
30220
|
const backupPath = `${storePath}.bak.${Date.now()}`;
|
|
30221
30221
|
try {
|
|
30222
|
-
await
|
|
30222
|
+
await syncFs.promises.rename(storePath, backupPath);
|
|
30223
30223
|
log$12.info("rotated session store file", {
|
|
30224
30224
|
backupPath: path.basename(backupPath),
|
|
30225
30225
|
sizeBytes: fileSize
|
|
@@ -30230,11 +30230,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
|
|
|
30230
30230
|
try {
|
|
30231
30231
|
const dir = path.dirname(storePath);
|
|
30232
30232
|
const baseName = path.basename(storePath);
|
|
30233
|
-
const backups = (await
|
|
30233
|
+
const backups = (await syncFs.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
|
|
30234
30234
|
const maxBackups = 3;
|
|
30235
30235
|
if (backups.length > maxBackups) {
|
|
30236
30236
|
const toDelete = backups.slice(maxBackups);
|
|
30237
|
-
for (const old of toDelete) await
|
|
30237
|
+
for (const old of toDelete) await syncFs.promises.unlink(path.join(dir, old)).catch(() => void 0);
|
|
30238
30238
|
log$12.info("cleaned up old session store backups", { deleted: toDelete.length });
|
|
30239
30239
|
}
|
|
30240
30240
|
} catch {}
|
|
@@ -30355,7 +30355,7 @@ function loadSessionStore(storePath, opts = {}) {
|
|
|
30355
30355
|
const maxReadAttempts = process.platform === "win32" ? 3 : 1;
|
|
30356
30356
|
const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
|
|
30357
30357
|
for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
|
|
30358
|
-
const raw =
|
|
30358
|
+
const raw = syncFs.readFileSync(storePath, "utf-8");
|
|
30359
30359
|
if (raw.length === 0 && attempt < maxReadAttempts - 1) {
|
|
30360
30360
|
Atomics.wait(retryBuf, 0, 0, 50);
|
|
30361
30361
|
continue;
|
|
@@ -30505,7 +30505,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
|
|
|
30505
30505
|
});
|
|
30506
30506
|
}
|
|
30507
30507
|
}
|
|
30508
|
-
await
|
|
30508
|
+
await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
|
|
30509
30509
|
const json = JSON.stringify(store, null, 2);
|
|
30510
30510
|
if (getSerializedSessionStore(storePath) === json) {
|
|
30511
30511
|
updateSessionStoreWriteCaches({
|
|
@@ -30914,8 +30914,8 @@ function resolveMirroredTranscriptText(params) {
|
|
|
30914
30914
|
return trimmed ? trimmed : null;
|
|
30915
30915
|
}
|
|
30916
30916
|
async function ensureSessionHeader(params) {
|
|
30917
|
-
if (
|
|
30918
|
-
await
|
|
30917
|
+
if (syncFs.existsSync(params.sessionFile)) return;
|
|
30918
|
+
await syncFs.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
|
|
30919
30919
|
const header = {
|
|
30920
30920
|
type: "session",
|
|
30921
30921
|
version: CURRENT_SESSION_VERSION,
|
|
@@ -30923,7 +30923,7 @@ async function ensureSessionHeader(params) {
|
|
|
30923
30923
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
30924
30924
|
cwd: process.cwd()
|
|
30925
30925
|
};
|
|
30926
|
-
await
|
|
30926
|
+
await syncFs.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
|
|
30927
30927
|
encoding: "utf-8",
|
|
30928
30928
|
mode: 384
|
|
30929
30929
|
});
|
|
@@ -31141,13 +31141,13 @@ async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
|
|
|
31141
31141
|
});
|
|
31142
31142
|
if (!opened.ok) continue;
|
|
31143
31143
|
try {
|
|
31144
|
-
const content =
|
|
31144
|
+
const content = syncFs.readFileSync(opened.fd, "utf-8");
|
|
31145
31145
|
await fs.writeFile(dest, content, {
|
|
31146
31146
|
encoding: "utf-8",
|
|
31147
31147
|
flag: "wx"
|
|
31148
31148
|
});
|
|
31149
31149
|
} finally {
|
|
31150
|
-
|
|
31150
|
+
syncFs.closeSync(opened.fd);
|
|
31151
31151
|
}
|
|
31152
31152
|
} catch {}
|
|
31153
31153
|
}
|