openclaw-multi-auto 1.7.6 → 1.7.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (224) hide show
  1. package/dist/{acp-cli-DMujSgSt.js → acp-cli-D2FsuxI4.js} +11 -11
  2. package/dist/{agent-CaQagdQ7.js → agent-B8D73rdQ.js} +8 -8
  3. package/dist/{agent-QkWi9ww5.js → agent-BomWJjOy.js} +7 -7
  4. package/dist/{agent-scope-sd1-3XH0.js → agent-scope-DmTcOjk4.js} +16 -16
  5. package/dist/{agents.config-DpC62EoF.js → agents.config-Crwrvv0Y.js} +3 -3
  6. package/dist/{audio-preflight-ByLQ-O2o.js → audio-preflight-CUgcQtbA.js} +1 -1
  7. package/dist/{audio-preflight-CKN-13f6.js → audio-preflight-CZHCr2-5.js} +1 -1
  8. package/dist/{audio-preflight-CxMkqmsz.js → audio-preflight-DUZyiet9.js} +10 -10
  9. package/dist/{audit-COOnp_TQ.js → audit-CX3KlHoS.js} +18 -18
  10. package/dist/{audit-membership-runtime-o16tAd90.js → audit-membership-runtime-DOqwbA7L.js} +1 -1
  11. package/dist/{auth-choice-CgIbQGAr.js → auth-choice-CuOI0DLZ.js} +8 -8
  12. package/dist/{auth-choice-B7hFRxC4.js → auth-choice-DZC8_SXk.js} +19 -19
  13. package/dist/{auth-choice-options-CaiEtgdy.js → auth-choice-options-C_poWj2I.js} +1 -1
  14. package/dist/{auth-choice-prompt-CyE2_iHL.js → auth-choice-prompt-Bjt463U7.js} +1 -1
  15. package/dist/{auth-choice.apply-helpers-BwI7_FDv.js → auth-choice.apply-helpers-BFZ8hPRq.js} +2 -2
  16. package/dist/{auth-choice.preferred-provider-BJFK05is.js → auth-choice.preferred-provider-CzDq9Lvp.js} +5 -5
  17. package/dist/{auth-profiles.runtime-Bp6HfAW4.js → auth-profiles.runtime-BEes_Rco.js} +1 -1
  18. package/dist/{auth-profiles.runtime-firEabaJ.js → auth-profiles.runtime-BWD0iDWZ.js} +10 -10
  19. package/dist/{auth-profiles.runtime-DHFZjArZ.js → auth-profiles.runtime-DNqCx0L5.js} +1 -1
  20. package/dist/{auth-token-Ca2ISBq6.js → auth-token-CnWG4-cB.js} +1 -1
  21. package/dist/{bonjour-discovery-CgQeXj94.js → bonjour-discovery-Cnl-PHZ4.js} +1 -1
  22. package/dist/{browser-cli-DfrP5czU.js → browser-cli-DLSYDvK2.js} +11 -11
  23. package/dist/build-info.json +3 -3
  24. package/dist/bundled/boot-md/handler.js +2 -2
  25. package/dist/bundled/session-memory/handler.js +1 -1
  26. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  27. package/dist/{channel-account-context-F18H2wEh.js → channel-account-context-DMK0G0sK.js} +7 -7
  28. package/dist/{channel-options-DR0IjcQw.js → channel-options-CsQMEhUD.js} +3 -3
  29. package/dist/{channel-web-B3yCvpab.js → channel-web-D7txUcfH.js} +4 -4
  30. package/dist/channels/plugins/actions/discord.js +1 -1
  31. package/dist/channels/plugins/actions/signal.js +1 -1
  32. package/dist/channels/plugins/actions/telegram.js +1 -1
  33. package/dist/channels/plugins/agent-tools/whatsapp-login.js +1 -1
  34. package/dist/{channels-cli-C9jvVDlM.js → channels-cli-DK-EFHka.js} +33 -33
  35. package/dist/{channels-status-issues-C6mRI9nP.js → channels-status-issues-B-PoQaOZ.js} +1 -1
  36. package/dist/{clack-prompter-CakorHf3.js → clack-prompter-COY2Efgu.js} +1 -1
  37. package/dist/{clawbot-cli-De1V5wKt.js → clawbot-cli-CYVkuLnO.js} +12 -12
  38. package/dist/{cleanup-utils-DZ-HVi66.js → cleanup-utils-DksMdp7C.js} +4 -4
  39. package/dist/cli/daemon-cli.js +1 -1
  40. package/dist/{cli-5Ap2oull.js → cli-BXEJJp6e.js} +10 -10
  41. package/dist/{cmd-argv-Dz5qUtqp.js → cmd-argv-BdNFwuhe.js} +1 -1
  42. package/dist/{compact.runtime-Dy7P2p35.js → compact.runtime-D9Tmp5YS.js} +1 -1
  43. package/dist/{compact.runtime-Bi0KAZxx.js → compact.runtime-Do9SwMzP.js} +10 -10
  44. package/dist/{compact.runtime-DoEYdXjJ.js → compact.runtime-pgjSlzSY.js} +1 -1
  45. package/dist/{completion-cli-DetW6vGx.js → completion-cli-BnHZnvaD.js} +12 -12
  46. package/dist/{config-cli-JmabBPbR.js → config-cli-BTyfFTwL.js} +13 -13
  47. package/dist/{config-guard-D0ly1tu3.js → config-guard-DXvConn_.js} +12 -12
  48. package/dist/{config-validation-DtOoaTl7.js → config-validation-ZC7mw4HJ.js} +3 -3
  49. package/dist/{configure-DNZVKth2.js → configure--3s3LTcF.js} +52 -52
  50. package/dist/{control-ui-assets-B9I2TpME.js → control-ui-assets-D5CuaZfV.js} +1 -1
  51. package/dist/{cron-cli-hA-3anvP.js → cron-cli-BTeTdxk8.js} +11 -11
  52. package/dist/{daemon-cli-CgEObThe.js → daemon-cli-TvT5eeIP.js} +13 -13
  53. package/dist/{daemon-install-e324s4no.js → daemon-install-CUvnebOQ.js} +16 -16
  54. package/dist/{daemon-install-plan.shared-g5FPfccc.js → daemon-install-plan.shared-BfFSRwqA.js} +12 -12
  55. package/dist/{deliver-runtime-CI-THBhi.js → deliver-runtime-CRO5x8jL.js} +10 -10
  56. package/dist/{deliver-runtime-DLAZp9H3.js → deliver-runtime-CjrGc3oj.js} +1 -1
  57. package/dist/{deliver-runtime-CqyJiuFQ.js → deliver-runtime-D4aWAXZ9.js} +1 -1
  58. package/dist/{deps-B6HgPp5e.js → deps-Cgw7M-k3.js} +6 -6
  59. package/dist/{device-bootstrap-oW1bwgs7.js → device-bootstrap-DSXbseT6.js} +1 -1
  60. package/dist/{device-pairing-CMxl0D-M.js → device-pairing-RZV6Mnep.js} +1 -1
  61. package/dist/{devices-cli-BPpKKc7g.js → devices-cli-DnvmJ-Sg.js} +11 -11
  62. package/dist/{diagnostics-iZHasrpQ.js → diagnostics-1AwcyuKi.js} +5 -5
  63. package/dist/{directory-cli-BP8WHXBG.js → directory-cli-CO5of3mT.js} +10 -10
  64. package/dist/{discord-C5GTGVrg.js → discord-DKZdsbTR.js} +42 -42
  65. package/dist/{dns-cli-CQl7AkL3.js → dns-cli-s2wuP3H0.js} +10 -10
  66. package/dist/{docs-cli-BWb05s-1.js → docs-cli-CZA-gAQf.js} +3 -3
  67. package/dist/{doctor-completion-CA3Zcz0O.js → doctor-completion-DvnTlsPK.js} +2 -2
  68. package/dist/{doctor-config-flow-C53lW8fK.js → doctor-config-flow-DOEjAAYV.js} +10 -10
  69. package/dist/{enable-CmddFDJP.js → enable-BSbXEyXD.js} +1 -1
  70. package/dist/{exec-approvals-cli-Cyhhh2cy.js → exec-approvals-cli-CsNqvj8p.js} +18 -18
  71. package/dist/{fetch-ggeyBJ4j.js → fetch-CGW2R_wh.js} +2 -2
  72. package/dist/{gateway-cli-vQfsLSPv.js → gateway-cli-Bq7xXLEB.js} +101 -101
  73. package/dist/{gateway-install-token-CQHd6wSt.js → gateway-install-token-C40ge2lh.js} +3 -3
  74. package/dist/{gateway-rpc-DrDqntyT.js → gateway-rpc-DUJcLoxb.js} +1 -1
  75. package/dist/{health-CTOG7Tdy.js → health-D_dD9-ET.js} +7 -7
  76. package/dist/{hooks-cli-CvrIbP3A.js → hooks-cli-YvIgaujr.js} +18 -18
  77. package/dist/{hooks-status-BiuMKGQP.js → hooks-status-C3wWva3H.js} +1 -1
  78. package/dist/{image-runtime-DuwNoMsX.js → image-runtime-Brryt_BU.js} +1 -1
  79. package/dist/{image-runtime-CidKJsqA.js → image-runtime-Cr6qZmyh.js} +1 -1
  80. package/dist/{image-runtime-Cen4jnt5.js → image-runtime-Cx4HaqrI.js} +10 -10
  81. package/dist/index.js +21 -21
  82. package/dist/{inspect-C0iPD7zZ.js → inspect-D3lV5ful.js} +4 -4
  83. package/dist/{install-safe-path-CnIWvuEU.js → install-safe-path-BvwKN_9n.js} +33 -33
  84. package/dist/{installs-BcQMkw3V.js → installs-BC5ieRDB.js} +8 -8
  85. package/dist/{ipv4-DHZnIX-K.js → ipv4-CwqOzc5W.js} +1 -1
  86. package/dist/{issue-format-CtBob7pd.js → issue-format-34LidjQQ.js} +1 -1
  87. package/dist/{launchd-D7vxtTg7.js → launchd-BLFV2ME0.js} +13 -13
  88. package/dist/{lifecycle-core-CKec6MyM.js → lifecycle-core-C07n1IOr.js} +6 -6
  89. package/dist/line/send.js +1 -1
  90. package/dist/llm-slug-generator.js +1 -1
  91. package/dist/{logging-B7i4YBpx.js → logging-DPEdtuNl.js} +1 -1
  92. package/dist/{login-CQ5pGFeF.js → login-BLC4Op_m.js} +3 -3
  93. package/dist/{login-rVmwSeBs.js → login-CIjIxi5t.js} +2 -2
  94. package/dist/{login-DC00cCmn.js → login-CKmmxErc.js} +2 -2
  95. package/dist/{login-qr-D3WKyrcm.js → login-qr-Djgtmdpd.js} +2 -2
  96. package/dist/{login-qr-C8iDYxXx.js → login-qr-DpxxtTBd.js} +11 -11
  97. package/dist/{login-qr-DB7lXNdD.js → login-qr-KVA4wuh0.js} +2 -2
  98. package/dist/{logs-cli-B8u30MKC.js → logs-cli-BKhTgUSN.js} +11 -11
  99. package/dist/{manager-runtime-DDc_xR6t.js → manager-runtime-B4ZbE6hq.js} +10 -10
  100. package/dist/{manager-runtime-DON5nkey.js → manager-runtime-CvM8JTRt.js} +1 -1
  101. package/dist/{manager-runtime-C04JB-55.js → manager-runtime-D9AEoM1M.js} +1 -1
  102. package/dist/{manager.runtime-y1RqEqxK.js → manager.runtime-BV-CBNb2.js} +2 -2
  103. package/dist/{manager.runtime-B8hc-v_R.js → manager.runtime-DbQBNTV4.js} +7 -7
  104. package/dist/{manager.runtime-sDKQexj4.js → manager.runtime-lHLhN5ro.js} +16 -16
  105. package/dist/{model-picker-iMZicrZb.js → model-picker-C5sQCeTo.js} +5 -5
  106. package/dist/{model-selection-Coo7zMJO.js → model-selection-CNRMBWfR.js} +43 -43
  107. package/dist/{models-cli-CHWqnmnX.js → models-cli-B7OdTj93.js} +21 -21
  108. package/dist/{node-cli-D2EGwHd2.js → node-cli-ArOhWB3h.js} +22 -22
  109. package/dist/{node-command-policy-C9YoIlNR.js → node-command-policy-BVIbeciX.js} +1 -1
  110. package/dist/{node-service-D7xRD6Op.js → node-service-ESc5ToCS.js} +1 -1
  111. package/dist/{nodes-cli-BaWA_a27.js → nodes-cli-BLneGv8c.js} +13 -13
  112. package/dist/{npm-pack-install-C7ntuYO8.js → npm-pack-install-DI_0G-Ju.js} +23 -23
  113. package/dist/{npm-resolution-BL-LzQ8q.js → npm-resolution-DowD_x7i.js} +3 -3
  114. package/dist/{onboard-1Vbkq-0q.js → onboard-Da0Gqg8E.js} +10 -10
  115. package/dist/{onboard-channels-C_RZQliP.js → onboard-channels-Dub92d1X.js} +16 -16
  116. package/dist/{onboard-custom-CyUm7NIR.js → onboard-custom-iC39HaRY.js} +5 -5
  117. package/dist/{onboard-hooks-Bx20a5uy.js → onboard-hooks-DUll1iq8.js} +4 -4
  118. package/dist/{onboard-remote-Dtm07eUX.js → onboard-remote-Cyc407f2.js} +3 -3
  119. package/dist/{onboard-skills-BOBtFqTc.js → onboard-skills-BqnqjDI3.js} +3 -3
  120. package/dist/{onboarding-CAQDdLGu.js → onboarding-BgeTWLi_.js} +17 -17
  121. package/dist/{onboarding.finalize-BAUMJZlu.js → onboarding.finalize-C4jEsWtC.js} +25 -25
  122. package/dist/{onboarding.gateway-config-BRSWuajr.js → onboarding.gateway-config-C2XdEUF3.js} +14 -14
  123. package/dist/{onboarding.secret-input-D75Xjj5j.js → onboarding.secret-input-OwIXA7An.js} +1 -1
  124. package/dist/{openai-codex-oauth-BjOz2DJZ.js → openai-codex-oauth-BUnBFHjs.js} +3 -3
  125. package/dist/{openclaw-root-dlCz9toZ.js → openclaw-root-B5jXk2td.js} +8 -8
  126. package/dist/{outbound-send-deps-Bid3Xegx.js → outbound-send-deps-dRaNZNE7.js} +1 -1
  127. package/dist/{pairing-cli-Dm_fH3zm.js → pairing-cli-pEJPQw6E.js} +10 -10
  128. package/dist/{path-alias-guards-B6owPyQX.js → path-alias-guards-BEqdGdn9.js} +3 -3
  129. package/dist/{path-safety-DN7L46Yk.js → path-safety-TRhr8lhQ.js} +1 -1
  130. package/dist/{pi-model-discovery-runtime-BRs3OnbK.js → pi-model-discovery-runtime-BkRq7f9h.js} +10 -10
  131. package/dist/{pi-model-discovery-runtime-Do-8n2s8.js → pi-model-discovery-runtime-BujN_d1_.js} +1 -1
  132. package/dist/{pi-model-discovery-runtime-DsZRIFOj.js → pi-model-discovery-runtime-CDKkuBYh.js} +1 -1
  133. package/dist/{pi-tools.before-tool-call.runtime-DpSw9nu5.js → pi-tools.before-tool-call.runtime-BYooFUjV.js} +1 -1
  134. package/dist/{pi-tools.before-tool-call.runtime-l0nSxXys.js → pi-tools.before-tool-call.runtime-DgAiY2la.js} +1 -1
  135. package/dist/{pi-tools.before-tool-call.runtime-Cz99nK1_.js → pi-tools.before-tool-call.runtime-Dt7ZWya_.js} +10 -10
  136. package/dist/{plugin-install-plan-tegfcs_j.js → plugin-install-plan-q0pKUAmp.js} +1 -1
  137. package/dist/{plugin-registry-D1UVdXNl.js → plugin-registry-DrrKSvdi.js} +2 -2
  138. package/dist/{plugins-cli-DMTK-3PI.js → plugins-cli-BWuwmlNA.js} +21 -21
  139. package/dist/{plugins-BVbKGpQJ.js → plugins-om7vnHk0.js} +9 -9
  140. package/dist/{ports-CrZzXxTl.js → ports-CVD9jTxH.js} +2 -2
  141. package/dist/{probe-auth-H1_HjX3c.js → probe-auth-CRm2yob0.js} +1 -1
  142. package/dist/{program-context--XQiK-Vv.js → program-context-BnNrq2_o.js} +42 -42
  143. package/dist/{prompt-select-styled-BzWw9bIh.js → prompt-select-styled-FpCuoi_9.js} +32 -32
  144. package/dist/{provider-auth-helpers-B5U-h2Ob.js → provider-auth-helpers-Dzq3SbTh.js} +4 -4
  145. package/dist/{provider-wizard-BgHYhBzK.js → provider-wizard-CRYUkbUG.js} +1 -1
  146. package/dist/{push-apns-DQdHdrq8.js → push-apns-6Yefl4vF.js} +3 -3
  147. package/dist/{pw-ai-R41XeePP.js → pw-ai-3ual6adI.js} +1 -1
  148. package/dist/{pw-ai-8OpaEmr4.js → pw-ai-Brk_ehKR.js} +15 -15
  149. package/dist/{pw-ai-B9F20k6L.js → pw-ai-C_IaVhUm.js} +1 -1
  150. package/dist/{qmd-manager-BMkECKpc.js → qmd-manager-Clny9vcj.js} +19 -19
  151. package/dist/{qr-cli-CZy0bldy.js → qr-cli-TsbdBlkh.js} +11 -11
  152. package/dist/{query-expansion-AnOnkIqf.js → query-expansion-BNb6Vys6.js} +48 -48
  153. package/dist/{redact-snapshot-lCMXNHo3.js → redact-snapshot-sudZsVoX.js} +1 -1
  154. package/dist/{register.agent-2yZ4uAHT.js → register.agent-BcYbZ3eF.js} +43 -43
  155. package/dist/{register.backup-Byyque4N.js → register.backup-DbtBtW_J.js} +26 -26
  156. package/dist/register.configure-CPWCrXrC.js +87 -0
  157. package/dist/{register.maintenance-BZ_V3Ubt.js → register.maintenance-Cdn2TwrI.js} +33 -33
  158. package/dist/{register.message-CJwTd37H.js → register.message-cHCXxeA6.js} +13 -13
  159. package/dist/{register.onboard-BY0T1WHb.js → register.onboard-Dbig7G2G.js} +17 -17
  160. package/dist/{register.setup-CA3ZUrN-.js → register.setup-DjHUcAcm.js} +18 -18
  161. package/dist/{register.status-health-sessions-PN0jxAPA.js → register.status-health-sessions-BMxJK45p.js} +26 -26
  162. package/dist/{reply-gX1XTS9Y.js → reply-Cf5Mm7vB.js} +226 -226
  163. package/dist/{restart-stale-pids-B6E7QavX.js → restart-stale-pids-ZfbSMILU.js} +2 -2
  164. package/dist/{rpc-B2PO3N0W.js → rpc-8YrBMBoD.js} +1 -1
  165. package/dist/{runtime-whatsapp-login.runtime-BAgknLYS.js → runtime-whatsapp-login.runtime-6yfwX0nq.js} +3 -3
  166. package/dist/{runtime-whatsapp-login.runtime-DKMtq6l9.js → runtime-whatsapp-login.runtime-Bo1HalYB.js} +12 -12
  167. package/dist/{runtime-whatsapp-login.runtime-C_E260pb.js → runtime-whatsapp-login.runtime-Br3SxDXL.js} +3 -3
  168. package/dist/{runtime-whatsapp-outbound.runtime-3elssz_a.js → runtime-whatsapp-outbound.runtime-BKesQQli.js} +2 -2
  169. package/dist/{runtime-whatsapp-outbound.runtime-Dv1HN4ha.js → runtime-whatsapp-outbound.runtime-Ch2o56Ey.js} +11 -11
  170. package/dist/{runtime-whatsapp-outbound.runtime-BdHcgl-R.js → runtime-whatsapp-outbound.runtime-L3Qkst0n.js} +2 -2
  171. package/dist/{sandbox-cli-SCYkP_qN.js → sandbox-cli-CoRe21Si.js} +10 -10
  172. package/dist/{secret-file-CuiwToxK.js → secret-file-7smmAVRV.js} +1 -1
  173. package/dist/{secrets-cli-C5O6Jw_4.js → secrets-cli-CHT1AjCX.js} +11 -11
  174. package/dist/{security-cli-CL4qtb9H.js → security-cli-DRqdmCtr.js} +20 -20
  175. package/dist/{send-hZxe8sP9.js → send-CHZ7WuOb.js} +2 -2
  176. package/dist/{send-BvAlpSvh.js → send-CXnKWzde.js} +1 -1
  177. package/dist/{send-t1epz3bc.js → send-pxKoZnv6.js} +1 -1
  178. package/dist/{server-Cnc4lO11.js → server-DiTziwvC.js} +10 -10
  179. package/dist/{server-node-events-aTSoNGTe.js → server-node-events-p5ykMQz-.js} +14 -14
  180. package/dist/{service-LNrViUVb.js → service-RXVSlLiU.js} +13 -13
  181. package/dist/{session-CndmPe2D.js → session-CXOhppV3.js} +2 -2
  182. package/dist/{session-BUpAKttt.js → session-D0j0Q_PW.js} +1 -1
  183. package/dist/{session-D7nweu0t.js → session-kt-bqE_z.js} +1 -1
  184. package/dist/{shared-c6JUv5At.js → shared-CoL161wD.js} +1 -1
  185. package/dist/{skill-scanner-DaUNX-tW.js → skill-scanner-BzjuMMKN.js} +6 -6
  186. package/dist/{skills-vhlUaliH.js → skills-Jz-BSwRd.js} +2 -2
  187. package/dist/{skills-cli-YqsScIM5.js → skills-cli-YajvWbjO.js} +11 -11
  188. package/dist/{skills-install-BnRu7wO4.js → skills-install-DFkV3GsC.js} +6 -6
  189. package/dist/{skills-status-DHMQ6A2H.js → skills-status-PMeXzDbC.js} +1 -1
  190. package/dist/{slash-commands.runtime-AZCJXo7S.js → slash-commands.runtime-BYfxn_xu.js} +1 -1
  191. package/dist/{slash-commands.runtime-D9GHahMO.js → slash-commands.runtime-_LrsMaI1.js} +10 -10
  192. package/dist/{slash-commands.runtime-YWtbFO1w.js → slash-commands.runtime-eZUYakkd.js} +1 -1
  193. package/dist/{slash-dispatch.runtime-DyUU1AG5.js → slash-dispatch.runtime-Cu8ghe1h.js} +1 -1
  194. package/dist/{slash-dispatch.runtime-QxpHMagD.js → slash-dispatch.runtime-D7ogJeRu.js} +1 -1
  195. package/dist/{slash-dispatch.runtime-DcISuJb0.js → slash-dispatch.runtime-neG4499W.js} +10 -10
  196. package/dist/{slash-skill-commands.runtime-Cv1NPjj6.js → slash-skill-commands.runtime-8dS5PTaH.js} +1 -1
  197. package/dist/{slash-skill-commands.runtime-Dt6QQJcX.js → slash-skill-commands.runtime-D0ohJN-V.js} +10 -10
  198. package/dist/{slash-skill-commands.runtime-Cgu35QuS.js → slash-skill-commands.runtime-iwoxGLKu.js} +1 -1
  199. package/dist/{status-D9mVTxuB.js → status-1patzIRq.js} +1 -1
  200. package/dist/{status-QQiIsfFq.js → status-BaLZ1uQV.js} +21 -21
  201. package/dist/{status.update-DY13od-q.js → status.update-DrzJ1YWu.js} +3 -3
  202. package/dist/{subagent-registry-runtime-CNgez4Yd.js → subagent-registry-runtime-BPxjP8o9.js} +1 -1
  203. package/dist/{subagent-registry-runtime-CoeW8s2P.js → subagent-registry-runtime-BTW1zlrG.js} +10 -10
  204. package/dist/{subagent-registry-runtime-N50VG-ay.js → subagent-registry-runtime-Z0fdsGSq.js} +1 -1
  205. package/dist/{system-cli-DMu6SZhn.js → system-cli-CndWL3sF.js} +11 -11
  206. package/dist/{systemd-DSK6B3bg.js → systemd-D47rkLi7.js} +11 -11
  207. package/dist/{systemd-hints-DsQTPBGt.js → systemd-hints-DHfXVo8k.js} +6 -6
  208. package/dist/{systemd-linger-BPISBIWJ.js → systemd-linger-DwmFZpci.js} +1 -1
  209. package/dist/{tui-DzNNH2rc.js → tui-CzYnfJxE.js} +2 -2
  210. package/dist/{tui-cli-D5JgcWb9.js → tui-cli-D47N0Kfm.js} +11 -11
  211. package/dist/{update-DL_359AR.js → update-BiUnc38r.js} +2 -2
  212. package/dist/{update-cli-BfjWjK3A.js → update-cli-CeqH2oQ-.js} +45 -45
  213. package/dist/{update-runner-CfkBU1BA.js → update-runner-oqYBjs5t.js} +16 -16
  214. package/dist/{web-BHO-XtPY.js → web-BRvkjVpk.js} +14 -14
  215. package/dist/{web-rZyV5Fxs.js → web-Bl0ih6N1.js} +4 -4
  216. package/dist/{web-B4n02Xhe.js → web-CXyjF_si.js} +4 -4
  217. package/dist/{webhooks-cli-C0kgprJJ.js → webhooks-cli-CnTKcfvh.js} +10 -10
  218. package/dist/{whatsapp-actions-JJEG8eF3.js → whatsapp-actions-BUvGEDSk.js} +2 -2
  219. package/dist/{whatsapp-actions-BC06Ug_d.js → whatsapp-actions-BXO9Bi7a.js} +11 -11
  220. package/dist/{whatsapp-actions-De9-kJMP.js → whatsapp-actions-Cpf6YROk.js} +2 -2
  221. package/dist/{workspace-BTsqd19h.js → workspace-CWne7yqK.js} +1 -1
  222. package/package.json +1 -1
  223. package/scripts/create-instance.sh +5 -9
  224. package/dist/register.configure-CrATD0tr.js +0 -87
@@ -2,10 +2,10 @@ import { t as __exportAll } from "./rolldown-runtime-DUslC3ob.js";
2
2
  import { _ as expandHomePrefix, a as resolveCanonicalConfigPath, b as resolveRequiredHomeDir, c as resolveDefaultConfigCandidates, d as resolveIsNixMode, f as resolveLegacyStateDirs, g as resolveStateDir, h as resolveOAuthPath, i as isNixMode, l as resolveGatewayLockDir, m as resolveOAuthDir, n as DEFAULT_GATEWAY_PORT, o as resolveConfigPath, p as resolveNewStateDir, r as STATE_DIR, s as resolveConfigPathCandidate, t as CONFIG_PATH, u as resolveGatewayPort } from "./paths-tuenh9TL.js";
3
3
  import { A as theme, D as warn, H as resolvePreferredOpenClawTmpDir, O as colorize, S as logVerbose, T as shouldLogVerbose, V as readLoggingConfig, Z as consumeRootOptionToken, _ as unregisterActiveProgressLine, b as isVerbose, c as sanitizeForLog, f as createNonExitingRuntime, g as registerActiveProgressLine, h as clearActiveProgressLine, j as getChildLogger, k as isRich, p as defaultRuntime, t as createSubsystemLogger, u as stripAnsi, v as danger, w as setVerbose, x as isYes, z as normalizeLogLevel } from "./subsystem-G54saDcg.js";
4
4
  import { C as sleep$2, D as isPlainObject$2, E as truncateUtf16Safe, S as shortenHomePath, a as clampNumber$1, b as safeParseJson, c as ensureDir$3, d as isRecord$6, g as resolveConfigDir, i as clampInt, l as escapeRegExp, m as normalizeE164, t as CONFIG_DIR, w as sliceUtf16Safe, x as shortenHomeInString, y as resolveUserPath } from "./utils-B8zCe27d.js";
5
- import { A as loadWorkspaceBootstrapFiles, D as ensureAgentWorkspace, E as DEFAULT_USER_FILENAME, F as toAgentModelListLike, N as resolveAgentModelFallbackValues, O as filterBootstrapFilesForSession, P as resolveAgentModelPrimaryValue, T as DEFAULT_TOOLS_FILENAME, _ as DEFAULT_AGENTS_FILENAME, a as resolveAgentDir, b as DEFAULT_HEARTBEAT_FILENAME, d as resolveAgentWorkspaceDir, f as resolveDefaultAgentId, g as resolveSessionAgentIds, h as resolveSessionAgentId, i as resolveAgentConfig, l as resolveAgentModelFallbacksOverride, m as resolveRunModelFallbacksOverride, o as resolveAgentEffectiveModelPrimary, r as listAgentIds, t as hasConfiguredModelFallbacks, u as resolveAgentSkillsFilter, v as DEFAULT_AGENT_WORKSPACE_DIR, w as DEFAULT_SOUL_FILENAME, x as DEFAULT_IDENTITY_FILENAME, y as DEFAULT_BOOTSTRAP_FILENAME } from "./agent-scope-sd1-3XH0.js";
5
+ import { A as loadWorkspaceBootstrapFiles, D as ensureAgentWorkspace, E as DEFAULT_USER_FILENAME, F as toAgentModelListLike, N as resolveAgentModelFallbackValues, O as filterBootstrapFilesForSession, P as resolveAgentModelPrimaryValue, T as DEFAULT_TOOLS_FILENAME, _ as DEFAULT_AGENTS_FILENAME, a as resolveAgentDir, b as DEFAULT_HEARTBEAT_FILENAME, d as resolveAgentWorkspaceDir, f as resolveDefaultAgentId, g as resolveSessionAgentIds, h as resolveSessionAgentId, i as resolveAgentConfig, l as resolveAgentModelFallbacksOverride, m as resolveRunModelFallbacksOverride, o as resolveAgentEffectiveModelPrimary, r as listAgentIds, t as hasConfiguredModelFallbacks, u as resolveAgentSkillsFilter, v as DEFAULT_AGENT_WORKSPACE_DIR, w as DEFAULT_SOUL_FILENAME, x as DEFAULT_IDENTITY_FILENAME, y as DEFAULT_BOOTSTRAP_FILENAME } from "./agent-scope-DmTcOjk4.js";
6
6
  import { C as isCronRunSessionKey, D as resolveThreadParentSessionKey, E as parseAgentSessionKey, S as isAcpSessionKey, T as isSubagentSessionKey, _ as normalizeAccountId$3, b as deriveSessionChatType, c as normalizeAgentId, d as resolveThreadSessionKeys, f as sanitizeAgentId, g as DEFAULT_ACCOUNT_ID, i as buildAgentPeerSessionKey, l as normalizeMainKey, m as toAgentRequestSessionKey, n as DEFAULT_MAIN_KEY, o as classifySessionKeyShape, p as scopedHeartbeatWakeOptions, r as buildAgentMainSessionKey, s as isValidAgentId, t as DEFAULT_AGENT_ID, u as resolveAgentIdFromSessionKey, v as normalizeOptionalAccountId, w as isCronSessionKey, x as getSubagentDepth, y as isBlockedObjectKey } from "./session-key-DjKQluAa.js";
7
7
  import { i as normalizeStringEntriesLower, n as normalizeHyphenSlug, r as normalizeStringEntries, t as normalizeAtHashSlug } from "./string-normalization-BxfC_3SE.js";
8
- import { a as openBoundaryFileSync, f as isNotFoundPathError, h as normalizeWindowsPathForComparison, i as openBoundaryFile, n as resolveOpenClawPackageRootSync, p as isPathInside, r as canUseBoundaryFileOpen, t as resolveOpenClawPackageRoot, u as resolvePathViaExistingAncestorSync } from "./openclaw-root-dlCz9toZ.js";
8
+ import { a as openBoundaryFileSync, f as isNotFoundPathError, h as normalizeWindowsPathForComparison, i as openBoundaryFile, n as resolveOpenClawPackageRootSync, p as isPathInside, r as canUseBoundaryFileOpen, t as resolveOpenClawPackageRoot, u as resolvePathViaExistingAncestorSync } from "./openclaw-root-B5jXk2td.js";
9
9
  import { t as markOpenClawExecEnv } from "./openclaw-exec-env-DNTFzmMi.js";
10
10
  import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-BohkHL0S.js";
11
11
  import { i as spawnWithFallback, n as runExec, r as resolveWindowsCommandShim, t as runCommandWithTimeout } from "./exec-CNtAq7Md.js";
@@ -17,16 +17,16 @@ import { t as isTruthyEnvValue } from "./env-CQxWwTMn.js";
17
17
  import { b as normalizeEnvVarKey, i as sanitizeEnvVars, n as applySkillEnvOverridesFromSnapshot, t as applySkillEnvOverrides, v as isDangerousHostEnvOverrideVarName, x as sanitizeHostExecEnv, y as isDangerousHostEnvVarName } from "./env-overrides-BYyMsIvB.js";
18
18
  import { n as isPathInside$1 } from "./scan-paths-B5Yx6Npu.js";
19
19
  import { A as triggerInternalHook, C as executePluginCommand, E as matchPluginCommand, M as resolveContextEngine, O as createInternalHookEvent, S as clearPluginCommands, T as listPluginCommands, _ as findOverlappingPluginHttpRoute, a as getChatChannelMeta, c as normalizeChannelId$1, d as getActivePluginRegistryKey, f as getActivePluginRegistryVersion, g as createPluginRegistry, j as registerContextEngine, l as normalizeChatChannelId, m as setActivePluginRegistry, n as CHAT_CHANNEL_ORDER, o as listChatChannels, p as requireActivePluginRegistry, s as normalizeAnyChannelId, t as CHANNEL_IDS, u as getActivePluginRegistry, w as getPluginCommandSpecs, x as normalizePluginHttpPath } from "./registry-aHEgjCIQ.js";
20
- import { D as resolveEffectiveEnableState, E as normalizePluginsConfig, O as resolveMemorySlotDecision, _ as discoverOpenClawPlugins, a as resolveSkillsPromptForRun, b as isPathInside$2, d as resolveSandboxInputPath, f as resolveSandboxPath, h as loadPluginManifestRegistry, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, n as buildWorkspaceSkillCommandSpecs, o as syncSkillsToWorkspace, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, s as resolvePluginSkillDirs, u as assertSandboxPath, v as resolvePluginCacheInputs, w as applyTestPluginDefaults, x as safeStatSync } from "./skills-vhlUaliH.js";
20
+ import { D as resolveEffectiveEnableState, E as normalizePluginsConfig, O as resolveMemorySlotDecision, _ as discoverOpenClawPlugins, a as resolveSkillsPromptForRun, b as isPathInside$2, d as resolveSandboxInputPath, f as resolveSandboxPath, h as loadPluginManifestRegistry, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, n as buildWorkspaceSkillCommandSpecs, o as syncSkillsToWorkspace, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, s as resolvePluginSkillDirs, u as assertSandboxPath, v as resolvePluginCacheInputs, w as applyTestPluginDefaults, x as safeStatSync } from "./skills-Jz-BSwRd.js";
21
21
  import { m as MANIFEST_KEY } from "./frontmatter-BngyYhS0.js";
22
- import { $ as listAcpBindings, A as readWebSelfId, B as listEnabledTelegramAccounts, Ct as EXEC_SECRET_REF_ID_JSON_SCHEMA_PATTERN, Dt as formatExecSecretRefIdValidationMessage, E as logoutWeb, Et as SINGLE_VALUE_FILE_REF_ID, G as resolveTelegramToken, L as resolveIMessageAccount, Mt as secretRefKey, Ot as isValidExecSecretRefId, P as webAuthExists, R as inspectTelegramAccount, St as normalizeChatType, T as logWebSelfId, Tt as SECRET_PROVIDER_ALIAS_PATTERN$1, U as resolveTelegramAccount, V as listTelegramAccountIds, W as resolveTelegramPollActionGateState, X as listBindings, Y as buildChannelAccountBindings, _ as hasAnyWhatsAppAuth, _t as resolveDiscordAccount, a as formatTrimmedAllowFromEntries, at as listSlackAccountIds, b as resolveWhatsAppAccount, bt as resolveAccountEntry, c as resolveIMessageConfigAllowFrom, ct as resolveSlackReplyToMode, d as resolveWhatsAppConfigAllowFrom, dt as inspectDiscordAccount, f as resolveWhatsAppConfigDefaultTo, ft as createDiscordActionGate, ht as mergeDiscordAccountConfig, it as inspectSlackAccount, jt as resolveDefaultSecretProviderAlias, kt as isValidFileSecretRefId, l as resolveIMessageConfigDefaultTo, lt as resolveSlackAppToken, m as normalizeWhatsAppTarget, mt as listEnabledDiscordAccounts, n as listChannelPlugins, o as formatWhatsAppConfigAllowFromEntries, p as isWhatsAppGroupJid, r as normalizeChannelId$2, rt as tryReadSecretFileSync, s as mapAllowFromEntries, st as resolveSlackAccount, t as getChannelPlugin, u as resolveOptionalConfigString, ut as resolveSlackBotToken, vt as resolveDiscordMaxLinesPerMessage, w as getWebAuthAgeMs, wt as FILE_SECRET_REF_ID_PATTERN, xt as createAccountListHelpers, yt as normalizeDiscordToken, z as createTelegramActionGate } from "./plugins-BVbKGpQJ.js";
23
- import { $ as writeFileWithinRoot, A as supportsMemoryMultimodalEmbeddings, B as normalizeMimeType$1, C as isFileMissingError, D as getMemoryMultimodalExtensions, E as classifyMemoryMultimodalPath, F as getFileExtension, G as appendFileWithinRoot, H as maxBytesForKind, I as imageMimeFromFormat, J as openFileWithinRoot, K as copyFileWithinRoot, L as isAudioFileName, M as resolveWindowsSpawnProgram, N as detectMime, O as isMemoryMultimodalEnabled, P as extensionForMime, R as isGifMedia, S as splitTextToUtf8ByteLimit, T as buildCaseInsensitiveExtensionGlob, U as mediaKindFromMime, V as MAX_IMAGE_BYTES$1, W as SafeOpenError, X as readFileWithinRoot, Z as readLocalFileSafely, _ as remapChunkLines, a as listSessionFilesForAgent, b as estimateStructuredEmbeddingInputBytes, c as buildMultimodalChunkForIndexing, d as ensureDir$4, et as runTasksWithConcurrency, f as hashText$1, g as parseEmbedding, h as normalizeExtraMemoryPaths, i as buildSessionEntry, j as materializeWindowsSpawnProgram, k as normalizeMemoryMultimodalSettings, l as chunkMarkdown, m as listMemoryFiles, n as isQueryStopWordToken, o as sessionPathForFile, p as isMemoryPath, q as createRootScopedReadFile, r as requireNodeSqlite, s as buildFileEntry, t as extractKeywords, u as cosineSimilarity, v as runWithConcurrency$1, w as statRegularFile, x as estimateUtf8Bytes, y as hasNonTextEmbeddingParts, z as kindFromMime } from "./query-expansion-AnOnkIqf.js";
22
+ import { $ as listAcpBindings, A as readWebSelfId, B as listEnabledTelegramAccounts, Ct as EXEC_SECRET_REF_ID_JSON_SCHEMA_PATTERN, Dt as formatExecSecretRefIdValidationMessage, E as logoutWeb, Et as SINGLE_VALUE_FILE_REF_ID, G as resolveTelegramToken, L as resolveIMessageAccount, Mt as secretRefKey, Ot as isValidExecSecretRefId, P as webAuthExists, R as inspectTelegramAccount, St as normalizeChatType, T as logWebSelfId, Tt as SECRET_PROVIDER_ALIAS_PATTERN$1, U as resolveTelegramAccount, V as listTelegramAccountIds, W as resolveTelegramPollActionGateState, X as listBindings, Y as buildChannelAccountBindings, _ as hasAnyWhatsAppAuth, _t as resolveDiscordAccount, a as formatTrimmedAllowFromEntries, at as listSlackAccountIds, b as resolveWhatsAppAccount, bt as resolveAccountEntry, c as resolveIMessageConfigAllowFrom, ct as resolveSlackReplyToMode, d as resolveWhatsAppConfigAllowFrom, dt as inspectDiscordAccount, f as resolveWhatsAppConfigDefaultTo, ft as createDiscordActionGate, ht as mergeDiscordAccountConfig, it as inspectSlackAccount, jt as resolveDefaultSecretProviderAlias, kt as isValidFileSecretRefId, l as resolveIMessageConfigDefaultTo, lt as resolveSlackAppToken, m as normalizeWhatsAppTarget, mt as listEnabledDiscordAccounts, n as listChannelPlugins, o as formatWhatsAppConfigAllowFromEntries, p as isWhatsAppGroupJid, r as normalizeChannelId$2, rt as tryReadSecretFileSync, s as mapAllowFromEntries, st as resolveSlackAccount, t as getChannelPlugin, u as resolveOptionalConfigString, ut as resolveSlackBotToken, vt as resolveDiscordMaxLinesPerMessage, w as getWebAuthAgeMs, wt as FILE_SECRET_REF_ID_PATTERN, xt as createAccountListHelpers, yt as normalizeDiscordToken, z as createTelegramActionGate } from "./plugins-om7vnHk0.js";
23
+ import { $ as writeFileWithinRoot, A as supportsMemoryMultimodalEmbeddings, B as normalizeMimeType$1, C as isFileMissingError, D as getMemoryMultimodalExtensions, E as classifyMemoryMultimodalPath, F as getFileExtension, G as appendFileWithinRoot, H as maxBytesForKind, I as imageMimeFromFormat, J as openFileWithinRoot, K as copyFileWithinRoot, L as isAudioFileName, M as resolveWindowsSpawnProgram, N as detectMime, O as isMemoryMultimodalEnabled, P as extensionForMime, R as isGifMedia, S as splitTextToUtf8ByteLimit, T as buildCaseInsensitiveExtensionGlob, U as mediaKindFromMime, V as MAX_IMAGE_BYTES$1, W as SafeOpenError, X as readFileWithinRoot, Z as readLocalFileSafely, _ as remapChunkLines, a as listSessionFilesForAgent, b as estimateStructuredEmbeddingInputBytes, c as buildMultimodalChunkForIndexing, d as ensureDir$4, et as runTasksWithConcurrency, f as hashText$1, g as parseEmbedding, h as normalizeExtraMemoryPaths, i as buildSessionEntry, j as materializeWindowsSpawnProgram, k as normalizeMemoryMultimodalSettings, l as chunkMarkdown, m as listMemoryFiles, n as isQueryStopWordToken, o as sessionPathForFile, p as isMemoryPath, q as createRootScopedReadFile, r as requireNodeSqlite, s as buildFileEntry, t as extractKeywords, u as cosineSimilarity, v as runWithConcurrency$1, w as statRegularFile, x as estimateUtf8Bytes, y as hasNonTextEmbeddingParts, z as kindFromMime } from "./query-expansion-BNb6Vys6.js";
24
24
  import { a as testRegexWithBoundedInput, i as compileSafeRegex, n as redactSensitiveText, r as redactToolDetail, t as getDefaultRedactPatterns } from "./redact-owRpqMhM.js";
25
- import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-B6owPyQX.js";
26
- import { c as makeProxyFetch, d as fetchWithTimeout, f as hasEnvHttpProxyConfigured, i as isWSL, l as resolveProxyFetchFromEnv, n as resolveTelegramTransport, o as resolveFetch, p as hasProxyEnvConfigured, r as shouldRetryTelegramIpv4Fallback, s as wrapFetchWithAbortSignal, t as resolveTelegramFetch, u as bindAbortRelay } from "./fetch-ggeyBJ4j.js";
25
+ import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-BEqdGdn9.js";
26
+ import { c as makeProxyFetch, d as fetchWithTimeout, f as hasEnvHttpProxyConfigured, i as isWSL, l as resolveProxyFetchFromEnv, n as resolveTelegramTransport, o as resolveFetch, p as hasProxyEnvConfigured, r as shouldRetryTelegramIpv4Fallback, s as wrapFetchWithAbortSignal, t as resolveTelegramFetch, u as bindAbortRelay } from "./fetch-CGW2R_wh.js";
27
27
  import { i as formatUncaughtError, n as extractErrorCode, r as formatErrorMessage, s as readErrorName, t as collectErrorGraphCandidates } from "./errors-DNKaAVHN.js";
28
- import { l as ensurePortAvailable, n as quoteCmdScriptArg, o as killProcessTree$1 } from "./cmd-argv-Dz5qUtqp.js";
29
- import { t as cleanStaleGatewayProcessesSync } from "./restart-stale-pids-B6E7QavX.js";
28
+ import { l as ensurePortAvailable, n as quoteCmdScriptArg, o as killProcessTree$1 } from "./cmd-argv-BdNFwuhe.js";
29
+ import { t as cleanStaleGatewayProcessesSync } from "./restart-stale-pids-ZfbSMILU.js";
30
30
  import { a as generateSecureToken, i as failDelivery, o as generateSecureUuid, r as enqueueDelivery, t as ackDelivery } from "./delivery-queue-B7zSt4zY.js";
31
31
  import { a as resolveSessionTranscriptPath$1, c as resolveSessionTranscriptsDirForAgent, i as resolveSessionFilePathOptions, l as resolveStorePath$1, n as resolveDefaultSessionStorePath, o as resolveSessionTranscriptPathInDir, r as resolveSessionFilePath, t as resolveAgentsDirFromSessionStorePath } from "./paths-CfmKJcO5.js";
32
32
  import { _ as extractInboundSenderLabel, b as extractToolCallNames, c as formatUsd, d as deriveSessionTotalTokens, f as hasNonzeroUsage, g as stripMessageIdHints, h as stripEnvelope, l as resolveModelCostConfig, m as normalizeUsage, n as loadCostUsageSummary, o as estimateUsageCost, p as makeZeroUsageSnapshot, r as loadSessionCostSummary, s as formatTokenCount$2, u as derivePromptTokens, v as stripInboundMetadata, x as hasToolCall } from "./session-cost-usage-C2jrTKxW.js";
@@ -44,8 +44,8 @@ import * as path$1 from "node:path";
44
44
  import path, { isAbsolute, join, posix } from "node:path";
45
45
  import JSON5 from "json5";
46
46
  import { inspect, isDeepStrictEqual, promisify } from "node:util";
47
- import * as fs$1 from "node:fs/promises";
48
- import fsPromises, { appendFile, mkdir } from "node:fs/promises";
47
+ import * as fs$2 from "node:fs/promises";
48
+ import fs$1, { appendFile, mkdir } from "node:fs/promises";
49
49
  import { execFile, execFileSync, execSync, spawn, spawnSync } from "node:child_process";
50
50
  import crypto, { X509Certificate, createHash, createHmac, randomBytes, randomUUID, timingSafeEqual } from "node:crypto";
51
51
  import { getOAuthApiKey, getOAuthProviders } from "@mariozechner/pi-ai/oauth";
@@ -789,7 +789,7 @@ function computeDelayMs(retries, attempt) {
789
789
  }
790
790
  async function readLockPayload$1(lockPath) {
791
791
  try {
792
- const raw = await fsPromises.readFile(lockPath, "utf8");
792
+ const raw = await fs$1.readFile(lockPath, "utf8");
793
793
  const parsed = JSON.parse(raw);
794
794
  if (typeof parsed.pid !== "number" || typeof parsed.createdAt !== "string") return null;
795
795
  return {
@@ -803,9 +803,9 @@ async function readLockPayload$1(lockPath) {
803
803
  async function resolveNormalizedFilePath(filePath) {
804
804
  const resolved = path.resolve(filePath);
805
805
  const dir = path.dirname(resolved);
806
- await fsPromises.mkdir(dir, { recursive: true });
806
+ await fs$1.mkdir(dir, { recursive: true });
807
807
  try {
808
- const realDir = await fsPromises.realpath(dir);
808
+ const realDir = await fs$1.realpath(dir);
809
809
  return path.join(realDir, path.basename(resolved));
810
810
  } catch {
811
811
  return resolved;
@@ -819,7 +819,7 @@ async function isStaleLock(lockPath, staleMs) {
819
819
  if (!Number.isFinite(createdAt) || Date.now() - createdAt > staleMs) return true;
820
820
  }
821
821
  try {
822
- const stat = await fsPromises.stat(lockPath);
822
+ const stat = await fs$1.stat(lockPath);
823
823
  return Date.now() - stat.mtimeMs > staleMs;
824
824
  } catch {
825
825
  return true;
@@ -832,7 +832,7 @@ async function releaseHeldLock$1(normalizedFile) {
832
832
  if (current.count > 0) return;
833
833
  HELD_LOCKS$1.delete(normalizedFile);
834
834
  await current.handle.close().catch(() => void 0);
835
- await fsPromises.rm(current.lockPath, { force: true }).catch(() => void 0);
835
+ await fs$1.rm(current.lockPath, { force: true }).catch(() => void 0);
836
836
  }
837
837
  async function acquireFileLock(filePath, options) {
838
838
  const normalizedFile = await resolveNormalizedFilePath(filePath);
@@ -847,7 +847,7 @@ async function acquireFileLock(filePath, options) {
847
847
  }
848
848
  const attempts = Math.max(1, options.retries.retries + 1);
849
849
  for (let attempt = 0; attempt < attempts; attempt += 1) try {
850
- const handle = await fsPromises.open(lockPath, "wx");
850
+ const handle = await fs$1.open(lockPath, "wx");
851
851
  await handle.writeFile(JSON.stringify({
852
852
  pid: process.pid,
853
853
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
@@ -864,7 +864,7 @@ async function acquireFileLock(filePath, options) {
864
864
  } catch (err) {
865
865
  if (err.code !== "EEXIST") throw err;
866
866
  if (await isStaleLock(lockPath, options.stale)) {
867
- await fsPromises.rm(lockPath, { force: true }).catch(() => void 0);
867
+ await fs$1.rm(lockPath, { force: true }).catch(() => void 0);
868
868
  continue;
869
869
  }
870
870
  if (attempt >= attempts - 1) break;
@@ -12676,7 +12676,7 @@ function createIcaclsResetCommand(targetPath, opts) {
12676
12676
  //#region src/security/audit-fs.ts
12677
12677
  async function safeStat(targetPath) {
12678
12678
  try {
12679
- const lst = await fsPromises.lstat(targetPath);
12679
+ const lst = await fs$1.lstat(targetPath);
12680
12680
  return {
12681
12681
  ok: true,
12682
12682
  isSymlink: lst.isSymbolicLink(),
@@ -12715,7 +12715,7 @@ async function inspectPathPermissions(targetPath, opts) {
12715
12715
  let effectiveMode = st.mode;
12716
12716
  let effectiveIsDir = st.isDir;
12717
12717
  if (st.isSymlink) try {
12718
- const target = await fsPromises.stat(targetPath);
12718
+ const target = await fs$1.stat(targetPath);
12719
12719
  effectiveMode = typeof target.mode === "number" ? target.mode : st.mode;
12720
12720
  effectiveIsDir = target.isDirectory();
12721
12721
  } catch {}
@@ -12984,7 +12984,7 @@ async function assertSecurePath(params) {
12984
12984
  if (stat.isSymlink) {
12985
12985
  if (!params.allowSymlinkPath) throw new Error(`${params.label} must not be a symlink: ${effectivePath}`);
12986
12986
  try {
12987
- effectivePath = await fsPromises.realpath(effectivePath);
12987
+ effectivePath = await fs$1.realpath(effectivePath);
12988
12988
  } catch {
12989
12989
  throw new Error(`${params.label} symlink target is not readable: ${params.targetPath}`);
12990
12990
  }
@@ -13030,7 +13030,7 @@ async function readFileProviderPayload(params) {
13030
13030
  }, timeoutMs);
13031
13031
  });
13032
13032
  try {
13033
- const payload = await Promise.race([fsPromises.readFile(secureFilePath, { signal: abortController.signal }), timeoutPromise]);
13033
+ const payload = await Promise.race([fs$1.readFile(secureFilePath, { signal: abortController.signal }), timeoutPromise]);
13034
13034
  if (payload.byteLength > maxBytes) throw new Error(`File provider "${params.providerName}" exceeded maxBytes (${maxBytes}).`);
13035
13035
  const text = payload.toString("utf8");
13036
13036
  if (params.providerConfig.mode === "singleValue") return text.replace(/\r?\n$/, "");
@@ -14103,10 +14103,10 @@ function clampToBudget(content, budget) {
14103
14103
  async function ensureSessionHeader$1(params) {
14104
14104
  const file = params.sessionFile;
14105
14105
  try {
14106
- await fsPromises.stat(file);
14106
+ await fs$1.stat(file);
14107
14107
  return;
14108
14108
  } catch {}
14109
- await fsPromises.mkdir(path.dirname(file), { recursive: true });
14109
+ await fs$1.mkdir(path.dirname(file), { recursive: true });
14110
14110
  const entry = {
14111
14111
  type: "session",
14112
14112
  version: 2,
@@ -14114,7 +14114,7 @@ async function ensureSessionHeader$1(params) {
14114
14114
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
14115
14115
  cwd: params.cwd
14116
14116
  };
14117
- await fsPromises.writeFile(file, `${JSON.stringify(entry)}\n`, "utf-8");
14117
+ await fs$1.writeFile(file, `${JSON.stringify(entry)}\n`, "utf-8");
14118
14118
  }
14119
14119
  function buildBootstrapContextFiles(files, opts) {
14120
14120
  const maxChars = opts?.maxChars ?? 2e4;
@@ -16993,12 +16993,12 @@ async function callTool(profileName, name, args = {}) {
16993
16993
  return result;
16994
16994
  }
16995
16995
  async function withTempFile(fn) {
16996
- const dir = await fsPromises.mkdtemp(path.join(os.tmpdir(), "openclaw-chrome-mcp-"));
16996
+ const dir = await fs$1.mkdtemp(path.join(os.tmpdir(), "openclaw-chrome-mcp-"));
16997
16997
  const filePath = path.join(dir, randomUUID());
16998
16998
  try {
16999
16999
  return await fn(filePath);
17000
17000
  } finally {
17001
- await fsPromises.rm(dir, {
17001
+ await fs$1.rm(dir, {
17002
17002
  recursive: true,
17003
17003
  force: true
17004
17004
  }).catch(() => {});
@@ -17070,7 +17070,7 @@ async function takeChromeMcpScreenshot(params) {
17070
17070
  ...params.uid ? { uid: params.uid } : {},
17071
17071
  ...params.fullPage ? { fullPage: true } : {}
17072
17072
  });
17073
- return await fsPromises.readFile(filePath);
17073
+ return await fs$1.readFile(filePath);
17074
17074
  });
17075
17075
  }
17076
17076
  async function clickChromeMcpElement(params) {
@@ -17248,7 +17248,7 @@ function isModuleNotFoundError(err) {
17248
17248
  }
17249
17249
  async function loadPwAiModule(mode) {
17250
17250
  try {
17251
- return await import("./pw-ai-8OpaEmr4.js");
17251
+ return await import("./pw-ai-Brk_ehKR.js");
17252
17252
  } catch (err) {
17253
17253
  if (mode === "soft") return null;
17254
17254
  if (isModuleNotFoundError(err)) return null;
@@ -17416,28 +17416,28 @@ function invalidPath(scopeLabel) {
17416
17416
  }
17417
17417
  async function resolveRealPathIfExists(targetPath) {
17418
17418
  try {
17419
- return await fsPromises.realpath(targetPath);
17419
+ return await fs$1.realpath(targetPath);
17420
17420
  } catch {
17421
17421
  return;
17422
17422
  }
17423
17423
  }
17424
17424
  async function resolveTrustedRootRealPath(rootDir) {
17425
17425
  try {
17426
- const rootLstat = await fsPromises.lstat(rootDir);
17426
+ const rootLstat = await fs$1.lstat(rootDir);
17427
17427
  if (!rootLstat.isDirectory() || rootLstat.isSymbolicLink()) return;
17428
- return await fsPromises.realpath(rootDir);
17428
+ return await fs$1.realpath(rootDir);
17429
17429
  } catch {
17430
17430
  return;
17431
17431
  }
17432
17432
  }
17433
17433
  async function validateCanonicalPathWithinRoot(params) {
17434
17434
  try {
17435
- const candidateLstat = await fsPromises.lstat(params.candidatePath);
17435
+ const candidateLstat = await fs$1.lstat(params.candidatePath);
17436
17436
  if (candidateLstat.isSymbolicLink()) return "invalid";
17437
17437
  if (params.expect === "directory" && !candidateLstat.isDirectory()) return "invalid";
17438
17438
  if (params.expect === "file" && !candidateLstat.isFile()) return "invalid";
17439
17439
  if (params.expect === "file" && candidateLstat.nlink > 1) return "invalid";
17440
- const candidateRealPath = await fsPromises.realpath(params.candidatePath);
17440
+ const candidateRealPath = await fs$1.realpath(params.candidatePath);
17441
17441
  return isPathInside(params.rootRealPath, candidateRealPath) ? "ok" : "invalid";
17442
17442
  } catch (err) {
17443
17443
  return isNotFoundPathError(err) ? "not-found" : "invalid";
@@ -17515,7 +17515,7 @@ async function resolveCheckedPathsWithinRoot(params) {
17515
17515
  };
17516
17516
  if (!rootRealPath || !raw || !path.isAbsolute(raw)) return lexicalPathResult;
17517
17517
  try {
17518
- const resolvedExistingPath = await fsPromises.realpath(raw);
17518
+ const resolvedExistingPath = await fs$1.realpath(raw);
17519
17519
  const relativePath = path.relative(rootRealPath, resolvedExistingPath);
17520
17520
  if (!isInRoot(relativePath)) return lexicalPathResult;
17521
17521
  return {
@@ -17566,7 +17566,7 @@ async function resolveCheckedPathsWithinRoot(params) {
17566
17566
  //#endregion
17567
17567
  //#region src/browser/routes/output-paths.ts
17568
17568
  async function ensureOutputRootDir(rootDir) {
17569
- await fsPromises.mkdir(rootDir, { recursive: true });
17569
+ await fs$1.mkdir(rootDir, { recursive: true });
17570
17570
  }
17571
17571
  async function resolveWritableOutputPathOrRespond(params) {
17572
17572
  if (params.ensureRootDir) await ensureOutputRootDir(params.rootDir);
@@ -18867,7 +18867,7 @@ function getMediaDir() {
18867
18867
  }
18868
18868
  async function ensureMediaDir() {
18869
18869
  const mediaDir = resolveMediaDir();
18870
- await fsPromises.mkdir(mediaDir, {
18870
+ await fs$1.mkdir(mediaDir, {
18871
18871
  recursive: true,
18872
18872
  mode: 448
18873
18873
  });
@@ -18881,7 +18881,7 @@ async function retryAfterRecreatingDir(dir, run) {
18881
18881
  return await run();
18882
18882
  } catch (err) {
18883
18883
  if (!isMissingPathError$1(err)) throw err;
18884
- await fsPromises.mkdir(dir, {
18884
+ await fs$1.mkdir(dir, {
18885
18885
  recursive: true,
18886
18886
  mode: 448
18887
18887
  });
@@ -18894,35 +18894,35 @@ async function cleanOldMedia(ttlMs = DEFAULT_TTL_MS, options = {}) {
18894
18894
  const recursive = options.recursive ?? false;
18895
18895
  const pruneEmptyDirs = recursive && (options.pruneEmptyDirs ?? false);
18896
18896
  const removeExpiredFilesInDir = async (dir) => {
18897
- const dirEntries = await fsPromises.readdir(dir).catch(() => null);
18897
+ const dirEntries = await fs$1.readdir(dir).catch(() => null);
18898
18898
  if (!dirEntries) return false;
18899
18899
  for (const entry of dirEntries) {
18900
18900
  const fullPath = path.join(dir, entry);
18901
- const stat = await fsPromises.lstat(fullPath).catch(() => null);
18901
+ const stat = await fs$1.lstat(fullPath).catch(() => null);
18902
18902
  if (!stat || stat.isSymbolicLink()) continue;
18903
18903
  if (stat.isDirectory()) {
18904
18904
  if (recursive) {
18905
- if (await removeExpiredFilesInDir(fullPath)) await fsPromises.rmdir(fullPath).catch(() => {});
18905
+ if (await removeExpiredFilesInDir(fullPath)) await fs$1.rmdir(fullPath).catch(() => {});
18906
18906
  }
18907
18907
  continue;
18908
18908
  }
18909
18909
  if (!stat.isFile()) continue;
18910
- if (now - stat.mtimeMs > ttlMs) await fsPromises.rm(fullPath, { force: true }).catch(() => {});
18910
+ if (now - stat.mtimeMs > ttlMs) await fs$1.rm(fullPath, { force: true }).catch(() => {});
18911
18911
  }
18912
18912
  if (!pruneEmptyDirs) return false;
18913
- const remainingEntries = await fsPromises.readdir(dir).catch(() => null);
18913
+ const remainingEntries = await fs$1.readdir(dir).catch(() => null);
18914
18914
  return remainingEntries !== null && remainingEntries.length === 0;
18915
18915
  };
18916
- const entries = await fsPromises.readdir(mediaDir).catch(() => []);
18916
+ const entries = await fs$1.readdir(mediaDir).catch(() => []);
18917
18917
  for (const file of entries) {
18918
18918
  const full = path.join(mediaDir, file);
18919
- const stat = await fsPromises.lstat(full).catch(() => null);
18919
+ const stat = await fs$1.lstat(full).catch(() => null);
18920
18920
  if (!stat || stat.isSymbolicLink()) continue;
18921
18921
  if (stat.isDirectory()) {
18922
- if (await removeExpiredFilesInDir(full)) await fsPromises.rmdir(full).catch(() => {});
18922
+ if (await removeExpiredFilesInDir(full)) await fs$1.rmdir(full).catch(() => {});
18923
18923
  continue;
18924
18924
  }
18925
- if (stat.isFile() && now - stat.mtimeMs > ttlMs) await fsPromises.rm(full, { force: true }).catch(() => {});
18925
+ if (stat.isFile() && now - stat.mtimeMs > ttlMs) await fs$1.rm(full, { force: true }).catch(() => {});
18926
18926
  }
18927
18927
  }
18928
18928
  function buildSavedMediaId(params) {
@@ -18941,13 +18941,13 @@ function buildSavedMediaResult(params) {
18941
18941
  }
18942
18942
  async function writeSavedMediaBuffer(params) {
18943
18943
  const dest = path.join(params.dir, params.id);
18944
- await retryAfterRecreatingDir(params.dir, () => fsPromises.writeFile(dest, params.buffer, { mode: MEDIA_FILE_MODE }));
18944
+ await retryAfterRecreatingDir(params.dir, () => fs$1.writeFile(dest, params.buffer, { mode: MEDIA_FILE_MODE }));
18945
18945
  return dest;
18946
18946
  }
18947
18947
  async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes = MAX_BYTES, originalFilename) {
18948
18948
  if (buffer.byteLength > maxBytes) throw new Error(`Media exceeds ${(maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
18949
18949
  const dir = path.join(resolveMediaDir(), subdir);
18950
- await fsPromises.mkdir(dir, {
18950
+ await fs$1.mkdir(dir, {
18951
18951
  recursive: true,
18952
18952
  mode: 448
18953
18953
  });
@@ -21142,7 +21142,7 @@ function createProfileAvailability({ opts, profile, state, getProfileState, setP
21142
21142
  };
21143
21143
  const closePlaywrightBrowserConnectionForProfile = async (cdpUrl) => {
21144
21144
  try {
21145
- await (await import("./pw-ai-8OpaEmr4.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
21145
+ await (await import("./pw-ai-Brk_ehKR.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
21146
21146
  } catch {}
21147
21147
  };
21148
21148
  const reconcileProfileRuntime = async () => {
@@ -21261,7 +21261,7 @@ async function movePathToTrash(targetPath) {
21261
21261
  //#region src/browser/server-context.reset.ts
21262
21262
  async function closePlaywrightBrowserConnectionForProfile(cdpUrl) {
21263
21263
  try {
21264
- await (await import("./pw-ai-8OpaEmr4.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
21264
+ await (await import("./pw-ai-Brk_ehKR.js")).closePlaywrightBrowserConnection(cdpUrl ? { cdpUrl } : void 0);
21265
21265
  } catch {}
21266
21266
  }
21267
21267
  function createProfileResetOps({ profile, getProfileState, stopRunningBrowser, isHttpReachable, resolveOpenClawUserDataDir }) {
@@ -21804,7 +21804,7 @@ async function stopBrowserRuntime(params) {
21804
21804
  params.clearState();
21805
21805
  if (!isPwAiLoaded()) return;
21806
21806
  try {
21807
- await (await import("./pw-ai-8OpaEmr4.js")).closePlaywrightBrowserConnection();
21807
+ await (await import("./pw-ai-Brk_ehKR.js")).closePlaywrightBrowserConnection();
21808
21808
  } catch {}
21809
21809
  }
21810
21810
  //#endregion
@@ -22943,11 +22943,11 @@ function readJpegExifOrientation(buffer) {
22943
22943
  return null;
22944
22944
  }
22945
22945
  async function withTempDir(fn) {
22946
- const dir = await fsPromises.mkdtemp(path.join(os.tmpdir(), "openclaw-img-"));
22946
+ const dir = await fs$1.mkdtemp(path.join(os.tmpdir(), "openclaw-img-"));
22947
22947
  try {
22948
22948
  return await fn(dir);
22949
22949
  } finally {
22950
- await fsPromises.rm(dir, {
22950
+ await fs$1.rm(dir, {
22951
22951
  recursive: true,
22952
22952
  force: true
22953
22953
  }).catch(() => {});
@@ -22956,7 +22956,7 @@ async function withTempDir(fn) {
22956
22956
  async function sipsMetadataFromBuffer(buffer) {
22957
22957
  return await withTempDir(async (dir) => {
22958
22958
  const input = path.join(dir, "in.img");
22959
- await fsPromises.writeFile(input, buffer);
22959
+ await fs$1.writeFile(input, buffer);
22960
22960
  const { stdout } = await runExec("/usr/bin/sips", [
22961
22961
  "-g",
22962
22962
  "pixelWidth",
@@ -22984,7 +22984,7 @@ async function sipsResizeToJpeg(params) {
22984
22984
  return await withTempDir(async (dir) => {
22985
22985
  const input = path.join(dir, "in.img");
22986
22986
  const output = path.join(dir, "out.jpg");
22987
- await fsPromises.writeFile(input, params.buffer);
22987
+ await fs$1.writeFile(input, params.buffer);
22988
22988
  await runExec("/usr/bin/sips", [
22989
22989
  "-Z",
22990
22990
  String(Math.max(1, Math.round(params.maxSide))),
@@ -23001,14 +23001,14 @@ async function sipsResizeToJpeg(params) {
23001
23001
  timeoutMs: 2e4,
23002
23002
  maxBuffer: 1024 * 1024
23003
23003
  });
23004
- return await fsPromises.readFile(output);
23004
+ return await fs$1.readFile(output);
23005
23005
  });
23006
23006
  }
23007
23007
  async function sipsConvertToJpeg(buffer) {
23008
23008
  return await withTempDir(async (dir) => {
23009
23009
  const input = path.join(dir, "in.heic");
23010
23010
  const output = path.join(dir, "out.jpg");
23011
- await fsPromises.writeFile(input, buffer);
23011
+ await fs$1.writeFile(input, buffer);
23012
23012
  await runExec("/usr/bin/sips", [
23013
23013
  "-s",
23014
23014
  "format",
@@ -23020,7 +23020,7 @@ async function sipsConvertToJpeg(buffer) {
23020
23020
  timeoutMs: 2e4,
23021
23021
  maxBuffer: 1024 * 1024
23022
23022
  });
23023
- return await fsPromises.readFile(output);
23023
+ return await fs$1.readFile(output);
23024
23024
  });
23025
23025
  }
23026
23026
  async function getImageMetadata(buffer) {
@@ -23071,7 +23071,7 @@ async function sipsApplyOrientation(buffer, orientation) {
23071
23071
  return await withTempDir(async (dir) => {
23072
23072
  const input = path.join(dir, "in.jpg");
23073
23073
  const output = path.join(dir, "out.jpg");
23074
- await fsPromises.writeFile(input, buffer);
23074
+ await fs$1.writeFile(input, buffer);
23075
23075
  await runExec("/usr/bin/sips", [
23076
23076
  ...ops,
23077
23077
  input,
@@ -23081,7 +23081,7 @@ async function sipsApplyOrientation(buffer, orientation) {
23081
23081
  timeoutMs: 2e4,
23082
23082
  maxBuffer: 1024 * 1024
23083
23083
  });
23084
- return await fsPromises.readFile(output);
23084
+ return await fs$1.readFile(output);
23085
23085
  });
23086
23086
  }
23087
23087
  async function resizeToJpeg(params) {
@@ -24801,7 +24801,7 @@ function computeHash(input) {
24801
24801
  //#region src/infra/json-files.ts
24802
24802
  async function readJsonFile$1(filePath) {
24803
24803
  try {
24804
- const raw = await fsPromises.readFile(filePath, "utf8");
24804
+ const raw = await fs$1.readFile(filePath, "utf8");
24805
24805
  return JSON.parse(raw);
24806
24806
  } catch {
24807
24807
  return null;
@@ -24819,22 +24819,22 @@ async function writeTextAtomic(filePath, content, options) {
24819
24819
  const payload = options?.appendTrailingNewline && !content.endsWith("\n") ? `${content}\n` : content;
24820
24820
  const mkdirOptions = { recursive: true };
24821
24821
  if (typeof options?.ensureDirMode === "number") mkdirOptions.mode = options.ensureDirMode;
24822
- await fsPromises.mkdir(path.dirname(filePath), mkdirOptions);
24822
+ await fs$1.mkdir(path.dirname(filePath), mkdirOptions);
24823
24823
  const tmp = `${filePath}.${randomUUID()}.tmp`;
24824
24824
  try {
24825
- await fsPromises.writeFile(tmp, payload, {
24825
+ await fs$1.writeFile(tmp, payload, {
24826
24826
  encoding: "utf8",
24827
24827
  mode
24828
24828
  });
24829
24829
  try {
24830
- await fsPromises.chmod(tmp, mode);
24830
+ await fs$1.chmod(tmp, mode);
24831
24831
  } catch {}
24832
- await fsPromises.rename(tmp, filePath);
24832
+ await fs$1.rename(tmp, filePath);
24833
24833
  try {
24834
- await fsPromises.chmod(filePath, mode);
24834
+ await fs$1.chmod(filePath, mode);
24835
24835
  } catch {}
24836
24836
  } finally {
24837
- await fsPromises.rm(tmp, { force: true }).catch(() => void 0);
24837
+ await fs$1.rm(tmp, { force: true }).catch(() => void 0);
24838
24838
  }
24839
24839
  }
24840
24840
  function createAsyncLock() {
@@ -24919,7 +24919,7 @@ async function releaseHeldLock(normalizedSessionFile, held, opts = {}) {
24919
24919
  await held.handle.close();
24920
24920
  } catch {}
24921
24921
  try {
24922
- await fsPromises.rm(held.lockPath, { force: true });
24922
+ await fs$1.rm(held.lockPath, { force: true });
24923
24923
  } catch {}
24924
24924
  })();
24925
24925
  try {
@@ -24998,7 +24998,7 @@ function registerCleanupHandlers() {
24998
24998
  }
24999
24999
  async function readLockPayload(lockPath) {
25000
25000
  try {
25001
- const raw = await fsPromises.readFile(lockPath, "utf8");
25001
+ const raw = await fs$1.readFile(lockPath, "utf8");
25002
25002
  const parsed = JSON.parse(raw);
25003
25003
  const payload = {};
25004
25004
  if (isValidLockNumber(parsed.pid) && parsed.pid > 0) payload.pid = parsed.pid;
@@ -25042,7 +25042,7 @@ async function shouldReclaimContendedLockFile(lockPath, details, staleMs, nowMs)
25042
25042
  if (!details.stale) return false;
25043
25043
  if (!lockInspectionNeedsMtimeStaleFallback(details)) return true;
25044
25044
  try {
25045
- const stat = await fsPromises.stat(lockPath);
25045
+ const stat = await fs$1.stat(lockPath);
25046
25046
  return Math.max(0, nowMs - stat.mtimeMs) > staleMs;
25047
25047
  } catch (error) {
25048
25048
  return error?.code !== "ENOENT";
@@ -25060,7 +25060,7 @@ async function cleanStaleLockFiles(params) {
25060
25060
  const nowMs = params.nowMs ?? Date.now();
25061
25061
  let entries = [];
25062
25062
  try {
25063
- entries = await fsPromises.readdir(sessionsDir, { withFileTypes: true });
25063
+ entries = await fs$1.readdir(sessionsDir, { withFileTypes: true });
25064
25064
  } catch (err) {
25065
25065
  if (err.code === "ENOENT") return {
25066
25066
  locks: [],
@@ -25079,7 +25079,7 @@ async function cleanStaleLockFiles(params) {
25079
25079
  removed: false
25080
25080
  };
25081
25081
  if (lockInfo.stale && removeStale) {
25082
- await fsPromises.rm(lockPath, { force: true });
25082
+ await fs$1.rm(lockPath, { force: true });
25083
25083
  lockInfo.removed = true;
25084
25084
  cleaned.push(lockInfo);
25085
25085
  params.log?.warn?.(`removed stale session lock: ${lockPath} (${lockInfo.staleReasons.join(", ") || "unknown"})`);
@@ -25098,10 +25098,10 @@ async function acquireSessionWriteLock(params) {
25098
25098
  const maxHoldMs = resolvePositiveMs(params.maxHoldMs, DEFAULT_MAX_HOLD_MS);
25099
25099
  const sessionFile = path.resolve(params.sessionFile);
25100
25100
  const sessionDir = path.dirname(sessionFile);
25101
- await fsPromises.mkdir(sessionDir, { recursive: true });
25101
+ await fs$1.mkdir(sessionDir, { recursive: true });
25102
25102
  let normalizedDir = sessionDir;
25103
25103
  try {
25104
- normalizedDir = await fsPromises.realpath(sessionDir);
25104
+ normalizedDir = await fs$1.realpath(sessionDir);
25105
25105
  } catch {}
25106
25106
  const normalizedSessionFile = path.join(normalizedDir, path.basename(sessionFile));
25107
25107
  const lockPath = `${normalizedSessionFile}.lock`;
@@ -25119,7 +25119,7 @@ async function acquireSessionWriteLock(params) {
25119
25119
  attempt += 1;
25120
25120
  let handle = null;
25121
25121
  try {
25122
- handle = await fsPromises.open(lockPath, "wx");
25122
+ handle = await fs$1.open(lockPath, "wx");
25123
25123
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
25124
25124
  const starttime = getProcessStartTime(process.pid);
25125
25125
  const lockPayload = {
@@ -25145,7 +25145,7 @@ async function acquireSessionWriteLock(params) {
25145
25145
  await handle.close();
25146
25146
  } catch {}
25147
25147
  try {
25148
- await fsPromises.rm(lockPath, { force: true });
25148
+ await fs$1.rm(lockPath, { force: true });
25149
25149
  } catch {}
25150
25150
  }
25151
25151
  if (err.code !== "EEXIST") throw err;
@@ -25160,7 +25160,7 @@ async function acquireSessionWriteLock(params) {
25160
25160
  stale: true,
25161
25161
  staleReasons: inspected.staleReasons.includes("orphan-self-pid") ? inspected.staleReasons : [...inspected.staleReasons, "orphan-self-pid"]
25162
25162
  } : inspected, staleMs, nowMs)) {
25163
- await fsPromises.rm(lockPath, { force: true });
25163
+ await fs$1.rm(lockPath, { force: true });
25164
25164
  continue;
25165
25165
  }
25166
25166
  const delay = Math.min(1e3, 50 * attempt);
@@ -25198,7 +25198,7 @@ async function withRegistryLock(registryPath, fn) {
25198
25198
  }
25199
25199
  async function readRegistryFromFile(registryPath, mode) {
25200
25200
  try {
25201
- const raw = await fsPromises.readFile(registryPath, "utf-8");
25201
+ const raw = await fs$1.readFile(registryPath, "utf-8");
25202
25202
  const parsed = JSON.parse(raw);
25203
25203
  if (isRegistryFile(parsed)) return parsed;
25204
25204
  if (mode === "fallback") return { entries: [] };
@@ -31038,7 +31038,7 @@ function mapAgentSessionDirs(agentsDir, entries) {
31038
31038
  async function resolveAgentSessionDirsFromAgentsDir(agentsDir) {
31039
31039
  let entries = [];
31040
31040
  try {
31041
- entries = await fsPromises.readdir(agentsDir, { withFileTypes: true });
31041
+ entries = await fs$1.readdir(agentsDir, { withFileTypes: true });
31042
31042
  } catch (err) {
31043
31043
  if (err.code === "ENOENT") return [];
31044
31044
  throw err;
@@ -31098,10 +31098,10 @@ function resolveValidatedDiscoveredStorePathSync(params) {
31098
31098
  async function resolveValidatedDiscoveredStorePath(params) {
31099
31099
  const storePath = path.join(params.sessionsDir, "sessions.json");
31100
31100
  try {
31101
- const stat = await fsPromises.lstat(storePath);
31101
+ const stat = await fs$1.lstat(storePath);
31102
31102
  if (stat.isSymbolicLink() || !stat.isFile()) return;
31103
- const realStorePath = await fsPromises.realpath(storePath);
31104
- return isWithinRoot(realStorePath, params.realAgentsRoot ?? await fsPromises.realpath(params.agentsRoot)) ? realStorePath : void 0;
31103
+ const realStorePath = await fs$1.realpath(storePath);
31104
+ return isWithinRoot(realStorePath, params.realAgentsRoot ?? await fs$1.realpath(params.agentsRoot)) ? realStorePath : void 0;
31105
31105
  } catch (err) {
31106
31106
  if (shouldSkipDiscoveryError(err)) return;
31107
31107
  throw err;
@@ -31186,7 +31186,7 @@ async function resolveAllAgentSessionStoreTargets(cfg, params = {}) {
31186
31186
  const cached = realAgentsRoots.get(agentsRoot);
31187
31187
  if (cached !== void 0) return cached;
31188
31188
  try {
31189
- const realAgentsRoot = await fsPromises.realpath(agentsRoot);
31189
+ const realAgentsRoot = await fs$1.realpath(agentsRoot);
31190
31190
  realAgentsRoots.set(agentsRoot, realAgentsRoot);
31191
31191
  return realAgentsRoot;
31192
31192
  } catch (err) {
@@ -31355,7 +31355,7 @@ function formatSandboxToolPolicyBlockedMessage(params) {
31355
31355
  //#endregion
31356
31356
  //#region src/agents/sandbox/workspace.ts
31357
31357
  async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
31358
- await fsPromises.mkdir(workspaceDir, { recursive: true });
31358
+ await fs$1.mkdir(workspaceDir, { recursive: true });
31359
31359
  if (seedFrom) {
31360
31360
  const seed = resolveUserPath(seedFrom);
31361
31361
  const files = [
@@ -31371,7 +31371,7 @@ async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
31371
31371
  const src = path.join(seed, name);
31372
31372
  const dest = path.join(workspaceDir, name);
31373
31373
  try {
31374
- await fsPromises.access(dest);
31374
+ await fs$1.access(dest);
31375
31375
  } catch {
31376
31376
  try {
31377
31377
  const opened = await openBoundaryFile({
@@ -31382,7 +31382,7 @@ async function ensureSandboxWorkspace(workspaceDir, seedFrom, skipBootstrap) {
31382
31382
  if (!opened.ok) continue;
31383
31383
  try {
31384
31384
  const content = fs.readFileSync(opened.fd, "utf-8");
31385
- await fsPromises.writeFile(dest, content, {
31385
+ await fs$1.writeFile(dest, content, {
31386
31386
  encoding: "utf-8",
31387
31387
  flag: "wx"
31388
31388
  });
@@ -31419,7 +31419,7 @@ async function ensureSandboxWorkspaceLayout(params) {
31419
31419
  const message = error instanceof Error ? error.message : JSON.stringify(error);
31420
31420
  defaultRuntime.error?.(`Sandbox skill sync failed: ${message}`);
31421
31421
  }
31422
- } else await fsPromises.mkdir(workspaceDir, { recursive: true });
31422
+ } else await fs$1.mkdir(workspaceDir, { recursive: true });
31423
31423
  return {
31424
31424
  agentWorkspaceDir,
31425
31425
  scopeKey,
@@ -31429,7 +31429,7 @@ async function ensureSandboxWorkspaceLayout(params) {
31429
31429
  }
31430
31430
  async function resolveSandboxDockerUser(params) {
31431
31431
  if (params.docker.user?.trim()) return params.docker;
31432
- const stat = params.stat ?? ((workspaceDir) => fsPromises.stat(workspaceDir));
31432
+ const stat = params.stat ?? ((workspaceDir) => fs$1.stat(workspaceDir));
31433
31433
  try {
31434
31434
  const workspaceStat = await stat(params.workspaceDir);
31435
31435
  const uid = Number.isInteger(workspaceStat.uid) ? workspaceStat.uid : null;
@@ -37378,7 +37378,7 @@ var models_config_exports = /* @__PURE__ */ __exportAll({ ensureOpenClawModelsJs
37378
37378
  const MODELS_JSON_WRITE_LOCKS = /* @__PURE__ */ new Map();
37379
37379
  async function readExistingModelsFile(pathname) {
37380
37380
  try {
37381
- const raw = await fsPromises.readFile(pathname, "utf8");
37381
+ const raw = await fs$1.readFile(pathname, "utf8");
37382
37382
  return {
37383
37383
  raw,
37384
37384
  parsed: JSON.parse(raw)
@@ -37391,12 +37391,12 @@ async function readExistingModelsFile(pathname) {
37391
37391
  }
37392
37392
  }
37393
37393
  async function ensureModelsFileMode(pathname) {
37394
- await fsPromises.chmod(pathname, 384).catch(() => {});
37394
+ await fs$1.chmod(pathname, 384).catch(() => {});
37395
37395
  }
37396
37396
  async function writeModelsFileAtomic(targetPath, contents) {
37397
37397
  const tempPath = `${targetPath}.${process.pid}.${Date.now()}.tmp`;
37398
- await fsPromises.writeFile(tempPath, contents, { mode: 384 });
37399
- await fsPromises.rename(tempPath, targetPath);
37398
+ await fs$1.writeFile(tempPath, contents, { mode: 384 });
37399
+ await fs$1.rename(tempPath, targetPath);
37400
37400
  }
37401
37401
  function resolveModelsConfigInput(config) {
37402
37402
  const runtimeSource = getRuntimeConfigSourceSnapshot();
@@ -37460,7 +37460,7 @@ async function ensureOpenClawModelsJson(config, agentDirOverride) {
37460
37460
  wrote: false
37461
37461
  };
37462
37462
  }
37463
- await fsPromises.mkdir(agentDir, {
37463
+ await fs$1.mkdir(agentDir, {
37464
37464
  recursive: true,
37465
37465
  mode: 448
37466
37466
  });
@@ -37477,7 +37477,7 @@ async function ensureOpenClawModelsJson(config, agentDirOverride) {
37477
37477
  const log$31 = createSubsystemLogger("model-catalog");
37478
37478
  let modelCatalogPromise = null;
37479
37479
  let hasLoggedModelCatalogError = false;
37480
- const defaultImportPiSdk = () => import("./pi-model-discovery-runtime-BRs3OnbK.js");
37480
+ const defaultImportPiSdk = () => import("./pi-model-discovery-runtime-BkRq7f9h.js");
37481
37481
  let importPiSdk = defaultImportPiSdk;
37482
37482
  const CODEX_PROVIDER = "openai-codex";
37483
37483
  const OPENAI_PROVIDER = "openai";
@@ -38447,7 +38447,7 @@ var MediaAttachmentCache = class {
38447
38447
  const size = await this.ensureLocalStat(entry);
38448
38448
  if (entry.resolvedPath) {
38449
38449
  if (size !== void 0 && size > params.maxBytes) throw new MediaUnderstandingSkipError("maxBytes", `Attachment ${params.attachmentIndex + 1} exceeds maxBytes ${params.maxBytes}`);
38450
- const buffer = await fsPromises.readFile(entry.resolvedPath);
38450
+ const buffer = await fs$1.readFile(entry.resolvedPath);
38451
38451
  entry.buffer = buffer;
38452
38452
  entry.bufferMime = entry.bufferMime ?? entry.attachment.mime ?? await detectMime({
38453
38453
  buffer,
@@ -38517,10 +38517,10 @@ var MediaAttachmentCache = class {
38517
38517
  prefix: "openclaw-media",
38518
38518
  extension: path.extname(bufferResult.fileName || "") || ""
38519
38519
  });
38520
- await fsPromises.writeFile(tmpPath, bufferResult.buffer);
38520
+ await fs$1.writeFile(tmpPath, bufferResult.buffer);
38521
38521
  entry.tempPath = tmpPath;
38522
38522
  entry.tempCleanup = async () => {
38523
- await fsPromises.unlink(tmpPath).catch(() => {});
38523
+ await fs$1.unlink(tmpPath).catch(() => {});
38524
38524
  };
38525
38525
  return {
38526
38526
  path: tmpPath,
@@ -38567,12 +38567,12 @@ var MediaAttachmentCache = class {
38567
38567
  if (entry.statSize !== void 0) return entry.statSize;
38568
38568
  try {
38569
38569
  const currentPath = entry.resolvedPath;
38570
- const stat = await fsPromises.stat(currentPath);
38570
+ const stat = await fs$1.stat(currentPath);
38571
38571
  if (!stat.isFile()) {
38572
38572
  entry.resolvedPath = void 0;
38573
38573
  return;
38574
38574
  }
38575
- const canonicalPath = await fsPromises.realpath(currentPath).catch(() => currentPath);
38575
+ const canonicalPath = await fs$1.realpath(currentPath).catch(() => currentPath);
38576
38576
  if (!isInboundPathAllowed({
38577
38577
  filePath: canonicalPath,
38578
38578
  roots: await this.getCanonicalLocalPathRoots()
@@ -38594,7 +38594,7 @@ var MediaAttachmentCache = class {
38594
38594
  if (this.canonicalLocalPathRoots) return await this.canonicalLocalPathRoots;
38595
38595
  this.canonicalLocalPathRoots = (async () => mergeInboundPathRoots(this.localPathRoots, await Promise.all(this.localPathRoots.map(async (root) => {
38596
38596
  if (root.includes("*")) return root;
38597
- return await fsPromises.realpath(root).catch(() => root);
38597
+ return await fs$1.realpath(root).catch(() => root);
38598
38598
  }))))();
38599
38599
  return await this.canonicalLocalPathRoots;
38600
38600
  }
@@ -38665,7 +38665,7 @@ const MIN_AUDIO_FILE_BYTES = 1024;
38665
38665
  async function fileExists$1(filePath) {
38666
38666
  if (!filePath) return false;
38667
38667
  try {
38668
- await fsPromises.stat(filePath);
38668
+ await fs$1.stat(filePath);
38669
38669
  return true;
38670
38670
  } catch {
38671
38671
  return false;
@@ -40797,7 +40797,7 @@ function resolveProviderVisionModelFromConfig(params) {
40797
40797
  //#region src/media-understanding/providers/image.ts
40798
40798
  let piModelDiscoveryRuntimePromise = null;
40799
40799
  function loadPiModelDiscoveryRuntime() {
40800
- piModelDiscoveryRuntimePromise ??= import("./pi-model-discovery-runtime-BRs3OnbK.js");
40800
+ piModelDiscoveryRuntimePromise ??= import("./pi-model-discovery-runtime-BkRq7f9h.js");
40801
40801
  return piModelDiscoveryRuntimePromise;
40802
40802
  }
40803
40803
  async function describeImageWithModel(params) {
@@ -41572,7 +41572,7 @@ async function resolveCliOutput(params) {
41572
41572
  const commandId = commandBase(params.command);
41573
41573
  const fileOutput = commandId === "whisper-cli" ? resolveWhisperCppOutputPath(params.args) : commandId === "whisper" ? resolveWhisperOutputPath(params.args, params.mediaPath) : commandId === "parakeet-mlx" ? resolveParakeetOutputPath(params.args, params.mediaPath) : null;
41574
41574
  if (fileOutput && await fileExists$1(fileOutput)) try {
41575
- const content = await fsPromises.readFile(fileOutput, "utf8");
41575
+ const content = await fs$1.readFile(fileOutput, "utf8");
41576
41576
  if (content.trim()) return content.trim();
41577
41577
  } catch {}
41578
41578
  if (commandId === "gemini") {
@@ -41881,10 +41881,10 @@ async function runCliEntry$1(params) {
41881
41881
  timeoutMs
41882
41882
  });
41883
41883
  if (capability === "audio") assertMinAudioSize({
41884
- size: (await fsPromises.stat(pathResult.path)).size,
41884
+ size: (await fs$1.stat(pathResult.path)).size,
41885
41885
  attachmentIndex: params.attachmentIndex
41886
41886
  });
41887
- const outputDir = await fsPromises.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "openclaw-media-cli-"));
41887
+ const outputDir = await fs$1.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "openclaw-media-cli-"));
41888
41888
  const mediaPath = pathResult.path;
41889
41889
  const outputBase = path.join(outputDir, path.parse(mediaPath).name);
41890
41890
  const templCtx = {
@@ -41918,7 +41918,7 @@ async function runCliEntry$1(params) {
41918
41918
  model: command
41919
41919
  };
41920
41920
  } finally {
41921
- await fsPromises.rm(outputDir, {
41921
+ await fs$1.rm(outputDir, {
41922
41922
  recursive: true,
41923
41923
  force: true
41924
41924
  }).catch(() => {});
@@ -41961,9 +41961,9 @@ function candidateBinaryNames(name) {
41961
41961
  }
41962
41962
  async function isExecutable(filePath) {
41963
41963
  try {
41964
- if (!(await fsPromises.stat(filePath)).isFile()) return false;
41964
+ if (!(await fs$1.stat(filePath)).isFile()) return false;
41965
41965
  if (process.platform === "win32") return true;
41966
- await fsPromises.access(filePath, constants.X_OK);
41966
+ await fs$1.access(filePath, constants.X_OK);
41967
41967
  return true;
41968
41968
  } catch {
41969
41969
  return false;
@@ -45671,7 +45671,7 @@ async function assertLocalMediaAllowed(mediaPath, localRoots) {
45671
45671
  const roots = localRoots ?? getDefaultLocalRoots();
45672
45672
  let resolved;
45673
45673
  try {
45674
- resolved = await fsPromises.realpath(mediaPath);
45674
+ resolved = await fs$1.realpath(mediaPath);
45675
45675
  } catch {
45676
45676
  resolved = path.resolve(mediaPath);
45677
45677
  }
@@ -45688,7 +45688,7 @@ async function assertLocalMediaAllowed(mediaPath, localRoots) {
45688
45688
  for (const root of roots) {
45689
45689
  let resolvedRoot;
45690
45690
  try {
45691
- resolvedRoot = await fsPromises.realpath(root);
45691
+ resolvedRoot = await fs$1.realpath(root);
45692
45692
  } catch {
45693
45693
  resolvedRoot = path.resolve(root);
45694
45694
  }
@@ -48780,7 +48780,7 @@ function convertMarkdownTables(markdown, mode) {
48780
48780
  async function unlinkIfExists(filePath) {
48781
48781
  if (!filePath) return;
48782
48782
  try {
48783
- await fsPromises.unlink(filePath);
48783
+ await fs$1.unlink(filePath);
48784
48784
  } catch {}
48785
48785
  }
48786
48786
  //#endregion
@@ -48954,7 +48954,7 @@ async function generateWaveformFromPcm(filePath) {
48954
48954
  "8000",
48955
48955
  tempPcm
48956
48956
  ]);
48957
- const pcmData = await fsPromises.readFile(tempPcm);
48957
+ const pcmData = await fs$1.readFile(tempPcm);
48958
48958
  const samples = new Int16Array(pcmData.buffer, pcmData.byteOffset, pcmData.byteLength / 2);
48959
48959
  const step = Math.max(1, Math.floor(samples.length / WAVEFORM_SAMPLES));
48960
48960
  const waveform = [];
@@ -49337,7 +49337,7 @@ async function materializeVoiceMessageInput(mediaUrl) {
49337
49337
  const ext = extFromName || extFromMime || ".bin";
49338
49338
  const tempDir = resolvePreferredOpenClawTmpDir();
49339
49339
  const filePath = path.join(tempDir, `voice-src-${crypto.randomUUID()}${ext}`);
49340
- await fsPromises.writeFile(filePath, media.buffer, { mode: 384 });
49340
+ await fs$1.writeFile(filePath, media.buffer, { mode: 384 });
49341
49341
  return { filePath };
49342
49342
  }
49343
49343
  /**
@@ -49373,7 +49373,7 @@ async function sendVoiceMessageDiscord(to, audioPath, opts = {}) {
49373
49373
  oggPath = ogg.path;
49374
49374
  oggCleanup = ogg.cleanup;
49375
49375
  const metadata = await getVoiceMessageMetadata(oggPath);
49376
- const audioBuffer = await fsPromises.readFile(oggPath);
49376
+ const audioBuffer = await fs$1.readFile(oggPath);
49377
49377
  const result = await sendDiscordVoiceMessage(rest, channelId, audioBuffer, metadata, opts.replyTo, request, opts.silent, token);
49378
49378
  recordChannelActivity({
49379
49379
  channel: "discord",
@@ -56558,7 +56558,7 @@ var LegacyContextEngine = class {
56558
56558
  }
56559
56559
  async afterTurn(_params) {}
56560
56560
  async compact(params) {
56561
- const { compactEmbeddedPiSessionDirect } = await import("./compact.runtime-Bi0KAZxx.js");
56561
+ const { compactEmbeddedPiSessionDirect } = await import("./compact.runtime-Do9SwMzP.js");
56562
56562
  const runtimeContext = params.runtimeContext ?? {};
56563
56563
  const currentTokenCount = params.currentTokenCount ?? (typeof runtimeContext.currentTokenCount === "number" && Number.isFinite(runtimeContext.currentTokenCount) && runtimeContext.currentTokenCount > 0 ? Math.floor(runtimeContext.currentTokenCount) : void 0);
56564
56564
  const result = await compactEmbeddedPiSessionDirect({
@@ -57765,7 +57765,7 @@ async function extractTimestamp(params) {
57765
57765
  if (!params.workspaceDir) return null;
57766
57766
  const absolutePath = path.isAbsolute(params.filePath) ? params.filePath : path.resolve(params.workspaceDir, params.filePath);
57767
57767
  try {
57768
- const stat = await fsPromises.stat(absolutePath);
57768
+ const stat = await fs$1.stat(absolutePath);
57769
57769
  if (!Number.isFinite(stat.mtimeMs)) return null;
57770
57770
  return new Date(stat.mtimeMs);
57771
57771
  } catch {
@@ -58916,7 +58916,7 @@ var MemoryManagerSyncOps = class {
58916
58916
  const source = `${sourceBase}${suffix}`;
58917
58917
  const target = `${targetBase}${suffix}`;
58918
58918
  try {
58919
- await fsPromises.rename(source, target);
58919
+ await fs$1.rename(source, target);
58920
58920
  } catch (err) {
58921
58921
  if (err.code !== "ENOENT") throw err;
58922
58922
  }
@@ -58927,7 +58927,7 @@ var MemoryManagerSyncOps = class {
58927
58927
  "",
58928
58928
  "-wal",
58929
58929
  "-shm"
58930
- ].map((suffix) => fsPromises.rm(`${basePath}${suffix}`, { force: true })));
58930
+ ].map((suffix) => fs$1.rm(`${basePath}${suffix}`, { force: true })));
58931
58931
  }
58932
58932
  ensureSchema() {
58933
58933
  const result = ensureMemoryIndexSchema({
@@ -59023,7 +59023,7 @@ var MemoryManagerSyncOps = class {
59023
59023
  if (!thresholds) return null;
59024
59024
  let stat;
59025
59025
  try {
59026
- stat = await fsPromises.stat(sessionFile);
59026
+ stat = await fs$1.stat(sessionFile);
59027
59027
  } catch {
59028
59028
  return null;
59029
59029
  }
@@ -59065,7 +59065,7 @@ var MemoryManagerSyncOps = class {
59065
59065
  if (end <= start) return 0;
59066
59066
  let handle;
59067
59067
  try {
59068
- handle = await fsPromises.open(absPath, "r");
59068
+ handle = await fs$1.open(absPath, "r");
59069
59069
  } catch (err) {
59070
59070
  if (isFileMissingError(err)) return 0;
59071
59071
  throw err;
@@ -60139,7 +60139,7 @@ var MemoryManagerEmbeddingOps = class extends MemoryManagerSyncOps {
60139
60139
  structuredInputBytes = multimodalChunk.structuredInputBytes;
60140
60140
  chunks = [multimodalChunk.chunk];
60141
60141
  } else {
60142
- const content = options.content ?? await fsPromises.readFile(entry.absPath, "utf-8");
60142
+ const content = options.content ?? await fs$1.readFile(entry.absPath, "utf-8");
60143
60143
  chunks = enforceEmbeddingMaxInputTokens(this.provider, chunkMarkdown(content, this.settings.chunking).filter((chunk) => chunk.text.trim().length > 0), EMBEDDING_BATCH_MAX_TOKENS);
60144
60144
  if (options.source === "sessions" && "lineMap" in entry) remapChunkLines(chunks, entry.lineMap);
60145
60145
  }
@@ -60603,7 +60603,7 @@ var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbedding
60603
60603
  if (!allowedWorkspace && this.settings.extraPaths.length > 0) {
60604
60604
  const additionalPaths = normalizeExtraMemoryPaths(this.workspaceDir, this.settings.extraPaths);
60605
60605
  for (const additionalPath of additionalPaths) try {
60606
- const stat = await fsPromises.lstat(additionalPath);
60606
+ const stat = await fs$1.lstat(additionalPath);
60607
60607
  if (stat.isSymbolicLink()) continue;
60608
60608
  if (stat.isDirectory()) {
60609
60609
  if (absPath === additionalPath || absPath.startsWith(`${additionalPath}${path.sep}`)) {
@@ -60628,7 +60628,7 @@ var MemoryIndexManager = class MemoryIndexManager extends MemoryManagerEmbedding
60628
60628
  };
60629
60629
  let content;
60630
60630
  try {
60631
- content = await fsPromises.readFile(absPath, "utf-8");
60631
+ content = await fs$1.readFile(absPath, "utf-8");
60632
60632
  } catch (err) {
60633
60633
  if (isFileMissingError(err)) return {
60634
60634
  text: "",
@@ -61001,7 +61001,7 @@ const log$24 = createSubsystemLogger("memory");
61001
61001
  const QMD_MANAGER_CACHE = /* @__PURE__ */ new Map();
61002
61002
  let managerRuntimePromise = null;
61003
61003
  function loadManagerRuntime() {
61004
- managerRuntimePromise ??= import("./manager-runtime-DDc_xR6t.js");
61004
+ managerRuntimePromise ??= import("./manager-runtime-B4ZbE6hq.js");
61005
61005
  return managerRuntimePromise;
61006
61006
  }
61007
61007
  async function getMemorySearchManager(params) {
@@ -61015,7 +61015,7 @@ async function getMemorySearchManager(params) {
61015
61015
  if (cached) return { manager: cached };
61016
61016
  }
61017
61017
  try {
61018
- const { QmdMemoryManager } = await import("./qmd-manager-BMkECKpc.js");
61018
+ const { QmdMemoryManager } = await import("./qmd-manager-Clny9vcj.js");
61019
61019
  const primary = await QmdMemoryManager.create({
61020
61020
  cfg: params.cfg,
61021
61021
  agentId: params.agentId,
@@ -62713,7 +62713,7 @@ function resolvePluginTools(params) {
62713
62713
  //#endregion
62714
62714
  //#region src/agents/apply-patch-update.ts
62715
62715
  async function defaultReadFile(filePath) {
62716
- return fsPromises.readFile(filePath, "utf8");
62716
+ return fs$1.readFile(filePath, "utf8");
62717
62717
  }
62718
62718
  async function applyUpdateHunk(filePath, chunks, options) {
62719
62719
  const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
@@ -63038,7 +63038,7 @@ function resolvePatchFileOps(options) {
63038
63038
  const workspaceOnly = options.workspaceOnly !== false;
63039
63039
  return {
63040
63040
  readFile: async (filePath) => {
63041
- if (!workspaceOnly) return await fsPromises.readFile(filePath, "utf8");
63041
+ if (!workspaceOnly) return await fs$1.readFile(filePath, "utf8");
63042
63042
  const opened = await openBoundaryFile({
63043
63043
  absolutePath: filePath,
63044
63044
  rootPath: options.cwd,
@@ -63053,7 +63053,7 @@ function resolvePatchFileOps(options) {
63053
63053
  },
63054
63054
  writeFile: async (filePath, content) => {
63055
63055
  if (!workspaceOnly) {
63056
- await fsPromises.writeFile(filePath, content, "utf8");
63056
+ await fs$1.writeFile(filePath, content, "utf8");
63057
63057
  return;
63058
63058
  }
63059
63059
  const relative = toRelativeSandboxPath(options.cwd, filePath);
@@ -63064,8 +63064,8 @@ function resolvePatchFileOps(options) {
63064
63064
  encoding: "utf8"
63065
63065
  });
63066
63066
  },
63067
- remove: (filePath) => fsPromises.rm(filePath),
63068
- mkdirp: (dir) => fsPromises.mkdir(dir, { recursive: true }).then(() => {})
63067
+ remove: (filePath) => fs$1.rm(filePath),
63068
+ mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
63069
63069
  };
63070
63070
  }
63071
63071
  async function ensureDir$2(filePath, ops) {
@@ -65104,7 +65104,7 @@ async function resolveSandboxWorkdir(params) {
65104
65104
  cwd: process.cwd(),
65105
65105
  root: params.sandbox.workspaceDir
65106
65106
  });
65107
- if (!(await fsPromises.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
65107
+ if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
65108
65108
  const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
65109
65109
  const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
65110
65110
  return {
@@ -65712,7 +65712,7 @@ function normalizeFingerprint(input) {
65712
65712
  const execFileAsync = promisify(execFile);
65713
65713
  async function fileExists(filePath) {
65714
65714
  try {
65715
- await fsPromises.access(filePath);
65715
+ await fs$1.access(filePath);
65716
65716
  return true;
65717
65717
  } catch {
65718
65718
  return false;
@@ -65739,8 +65739,8 @@ async function generateSelfSignedCert(params) {
65739
65739
  "-subj",
65740
65740
  "/CN=openclaw-gateway"
65741
65741
  ]);
65742
- await fsPromises.chmod(params.keyPath, 384).catch(() => {});
65743
- await fsPromises.chmod(params.certPath, 384).catch(() => {});
65742
+ await fs$1.chmod(params.keyPath, 384).catch(() => {});
65743
+ await fs$1.chmod(params.certPath, 384).catch(() => {});
65744
65744
  params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
65745
65745
  }
65746
65746
  async function loadGatewayTlsRuntime(cfg, log) {
@@ -65778,9 +65778,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
65778
65778
  error: "gateway tls: cert/key missing"
65779
65779
  };
65780
65780
  try {
65781
- const cert = await fsPromises.readFile(certPath, "utf8");
65782
- const key = await fsPromises.readFile(keyPath, "utf8");
65783
- const ca = caPath ? await fsPromises.readFile(caPath, "utf8") : void 0;
65781
+ const cert = await fs$1.readFile(certPath, "utf8");
65782
+ const key = await fs$1.readFile(keyPath, "utf8");
65783
+ const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
65784
65784
  const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
65785
65785
  if (!fingerprintSha256) return {
65786
65786
  enabled: false,
@@ -68843,7 +68843,7 @@ async function imageResult(params) {
68843
68843
  }, params.label, params.imageSanitization);
68844
68844
  }
68845
68845
  async function imageResultFromFile(params) {
68846
- const buf = await fsPromises.readFile(params.path);
68846
+ const buf = await fs$1.readFile(params.path);
68847
68847
  const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
68848
68848
  return await imageResult({
68849
68849
  label: params.label,
@@ -70460,13 +70460,13 @@ async function validateScriptFileForShellBleed(params) {
70460
70460
  cwd: params.workdir,
70461
70461
  root: params.workdir
70462
70462
  });
70463
- stat = await fsPromises.stat(absPath);
70463
+ stat = await fs$1.stat(absPath);
70464
70464
  } catch {
70465
70465
  return;
70466
70466
  }
70467
70467
  if (!stat.isFile()) return;
70468
70468
  if (stat.size > 512 * 1024) return;
70469
- const content = await fsPromises.readFile(absPath, "utf-8");
70469
+ const content = await fs$1.readFile(absPath, "utf-8");
70470
70470
  const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
70471
70471
  if (first) {
70472
70472
  const idx = first.index;
@@ -76566,7 +76566,7 @@ async function writeUrlToFile(filePath, url, opts) {
76566
76566
  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}`);
76567
76567
  const body = res.body;
76568
76568
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
76569
- const fileHandle = await fs$1.open(filePath, "w");
76569
+ const fileHandle = await fs$2.open(filePath, "w");
76570
76570
  let thrown;
76571
76571
  try {
76572
76572
  const reader = body.getReader();
@@ -76584,7 +76584,7 @@ async function writeUrlToFile(filePath, url, opts) {
76584
76584
  await fileHandle.close();
76585
76585
  }
76586
76586
  if (thrown) {
76587
- await fs$1.unlink(filePath).catch(() => {});
76587
+ await fs$2.unlink(filePath).catch(() => {});
76588
76588
  throw thrown;
76589
76589
  }
76590
76590
  } finally {
@@ -76597,7 +76597,7 @@ async function writeUrlToFile(filePath, url, opts) {
76597
76597
  }
76598
76598
  async function writeBase64ToFile(filePath, base64) {
76599
76599
  const buf = Buffer.from(base64, "base64");
76600
- await fs$1.writeFile(filePath, buf);
76600
+ await fs$2.writeFile(filePath, buf);
76601
76601
  return {
76602
76602
  path: filePath,
76603
76603
  bytes: buf.length
@@ -76680,7 +76680,7 @@ async function readJsonlFromPath(jsonlPath) {
76680
76680
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
76681
76681
  throw new Error("jsonlPath outside allowed roots");
76682
76682
  }
76683
- const canonical = await fsPromises.realpath(resolved).catch(() => resolved);
76683
+ const canonical = await fs$1.realpath(resolved).catch(() => resolved);
76684
76684
  if (!isInboundPathAllowed({
76685
76685
  filePath: canonical,
76686
76686
  roots
@@ -76688,7 +76688,7 @@ async function readJsonlFromPath(jsonlPath) {
76688
76688
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
76689
76689
  throw new Error("jsonlPath outside allowed roots");
76690
76690
  }
76691
- return await fsPromises.readFile(canonical, "utf8");
76691
+ return await fs$1.readFile(canonical, "utf8");
76692
76692
  }
76693
76693
  const CanvasToolSchema = Type.Object({
76694
76694
  action: stringEnum(CANVAS_ACTIONS),
@@ -77652,27 +77652,27 @@ function resolveRestartSentinelPath(env = process.env) {
77652
77652
  }
77653
77653
  async function writeRestartSentinel(payload, env = process.env) {
77654
77654
  const filePath = resolveRestartSentinelPath(env);
77655
- await fsPromises.mkdir(path.dirname(filePath), { recursive: true });
77655
+ await fs$1.mkdir(path.dirname(filePath), { recursive: true });
77656
77656
  const data = {
77657
77657
  version: 1,
77658
77658
  payload
77659
77659
  };
77660
- await fsPromises.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
77660
+ await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
77661
77661
  return filePath;
77662
77662
  }
77663
77663
  async function readRestartSentinel(env = process.env) {
77664
77664
  const filePath = resolveRestartSentinelPath(env);
77665
77665
  try {
77666
- const raw = await fsPromises.readFile(filePath, "utf-8");
77666
+ const raw = await fs$1.readFile(filePath, "utf-8");
77667
77667
  let parsed;
77668
77668
  try {
77669
77669
  parsed = JSON.parse(raw);
77670
77670
  } catch {
77671
- await fsPromises.unlink(filePath).catch(() => {});
77671
+ await fs$1.unlink(filePath).catch(() => {});
77672
77672
  return null;
77673
77673
  }
77674
77674
  if (!parsed || parsed.version !== 1 || !parsed.payload) {
77675
- await fsPromises.unlink(filePath).catch(() => {});
77675
+ await fs$1.unlink(filePath).catch(() => {});
77676
77676
  return null;
77677
77677
  }
77678
77678
  return parsed;
@@ -77684,7 +77684,7 @@ async function consumeRestartSentinel(env = process.env) {
77684
77684
  const filePath = resolveRestartSentinelPath(env);
77685
77685
  const parsed = await readRestartSentinel(env);
77686
77686
  if (!parsed) return null;
77687
- await fsPromises.unlink(filePath).catch(() => {});
77687
+ await fs$1.unlink(filePath).catch(() => {});
77688
77688
  return parsed;
77689
77689
  }
77690
77690
  function formatRestartSentinelMessage(payload) {
@@ -88146,7 +88146,7 @@ function normalizeReplyPayload(payload, opts = {}) {
88146
88146
  */
88147
88147
  let deliverRuntimePromise$2 = null;
88148
88148
  function loadDeliverRuntime$2() {
88149
- deliverRuntimePromise$2 ??= import("./deliver-runtime-CI-THBhi.js");
88149
+ deliverRuntimePromise$2 ??= import("./deliver-runtime-CRO5x8jL.js");
88150
88150
  return deliverRuntimePromise$2;
88151
88151
  }
88152
88152
  /**
@@ -88696,7 +88696,7 @@ function ensureContextWindowCacheLoaded() {
88696
88696
  await ensureOpenClawModelsJson(cfg);
88697
88697
  } catch {}
88698
88698
  try {
88699
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-BRs3OnbK.js");
88699
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-runtime-BkRq7f9h.js");
88700
88700
  const agentDir = resolveOpenClawAgentDir();
88701
88701
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
88702
88702
  applyDiscoveredContextWindows({
@@ -94218,7 +94218,7 @@ const MAX_TIMER_SAFE_TIMEOUT_MS = 2147e6;
94218
94218
  const GATEWAY_TIMEOUT_PATTERN = /gateway timeout/i;
94219
94219
  let subagentRegistryRuntimePromise = null;
94220
94220
  function loadSubagentRegistryRuntime() {
94221
- subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-CoeW8s2P.js");
94221
+ subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-BTW1zlrG.js");
94222
94222
  return subagentRegistryRuntimePromise;
94223
94223
  }
94224
94224
  const DIRECT_ANNOUNCE_TRANSIENT_RETRY_DELAYS_MS = FAST_TEST_MODE ? [
@@ -100302,7 +100302,7 @@ const LOOP_WARNING_BUCKET_SIZE = 10;
100302
100302
  const MAX_LOOP_WARNING_KEYS = 256;
100303
100303
  let beforeToolCallRuntimePromise = null;
100304
100304
  function loadBeforeToolCallRuntime() {
100305
- beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-Cz99nK1_.js");
100305
+ beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-Dt7ZWya_.js");
100306
100306
  return beforeToolCallRuntimePromise;
100307
100307
  }
100308
100308
  function buildAdjustedParamsKey(params) {
@@ -100778,7 +100778,7 @@ function wrapHostEditToolWithPostWriteRecovery(base, root) {
100778
100778
  if (!pathParam || !newText) throw err;
100779
100779
  try {
100780
100780
  const absolutePath = resolveHostEditPath(root, pathParam);
100781
- const content = await fsPromises.readFile(absolutePath, "utf-8");
100781
+ const content = await fs$1.readFile(absolutePath, "utf-8");
100782
100782
  const hasNew = content.includes(newText);
100783
100783
  const stillHasOld = oldText !== void 0 && oldText.length > 0 && content.includes(oldText);
100784
100784
  if (hasNew && !stillHasOld) return {
@@ -101159,7 +101159,7 @@ async function readOptionalUtf8File(params) {
101159
101159
  signal: params.signal
101160
101160
  })).toString("utf-8");
101161
101161
  }
101162
- return await fsPromises.readFile(params.absolutePath, "utf-8");
101162
+ return await fs$1.readFile(params.absolutePath, "utf-8");
101163
101163
  } catch (error) {
101164
101164
  if (error?.code === "ENOENT") return "";
101165
101165
  throw error;
@@ -101199,8 +101199,8 @@ async function appendMemoryFlushContent(params) {
101199
101199
  });
101200
101200
  return;
101201
101201
  }
101202
- await fsPromises.mkdir(path.dirname(params.absolutePath), { recursive: true });
101203
- await fsPromises.writeFile(params.absolutePath, next, "utf-8");
101202
+ await fs$1.mkdir(path.dirname(params.absolutePath), { recursive: true });
101203
+ await fs$1.writeFile(params.absolutePath, next, "utf-8");
101204
101204
  }
101205
101205
  function wrapToolMemoryFlushAppendOnlyWrite(tool, options) {
101206
101206
  const allowedAbsolutePath = path.resolve(options.root, options.relativePath);
@@ -101358,14 +101358,14 @@ function createSandboxEditOperations(params) {
101358
101358
  }
101359
101359
  async function writeHostFile(absolutePath, content) {
101360
101360
  const resolved = path.resolve(absolutePath);
101361
- await fsPromises.mkdir(path.dirname(resolved), { recursive: true });
101362
- await fsPromises.writeFile(resolved, content, "utf-8");
101361
+ await fs$1.mkdir(path.dirname(resolved), { recursive: true });
101362
+ await fs$1.writeFile(resolved, content, "utf-8");
101363
101363
  }
101364
101364
  function createHostWriteOperations(root, options) {
101365
101365
  if (!(options?.workspaceOnly ?? false)) return {
101366
101366
  mkdir: async (dir) => {
101367
101367
  const resolved = path.resolve(dir);
101368
- await fsPromises.mkdir(resolved, { recursive: true });
101368
+ await fs$1.mkdir(resolved, { recursive: true });
101369
101369
  },
101370
101370
  writeFile: writeHostFile
101371
101371
  };
@@ -101378,7 +101378,7 @@ function createHostWriteOperations(root, options) {
101378
101378
  cwd: root,
101379
101379
  root
101380
101380
  });
101381
- await fsPromises.mkdir(resolved, { recursive: true });
101381
+ await fs$1.mkdir(resolved, { recursive: true });
101382
101382
  },
101383
101383
  writeFile: async (absolutePath, content) => {
101384
101384
  await writeFileWithinRoot({
@@ -101394,12 +101394,12 @@ function createHostEditOperations(root, options) {
101394
101394
  if (!(options?.workspaceOnly ?? false)) return {
101395
101395
  readFile: async (absolutePath) => {
101396
101396
  const resolved = path.resolve(absolutePath);
101397
- return await fsPromises.readFile(resolved);
101397
+ return await fs$1.readFile(resolved);
101398
101398
  },
101399
101399
  writeFile: writeHostFile,
101400
101400
  access: async (absolutePath) => {
101401
101401
  const resolved = path.resolve(absolutePath);
101402
- await fsPromises.access(resolved);
101402
+ await fs$1.access(resolved);
101403
101403
  }
101404
101404
  };
101405
101405
  return {
@@ -102271,7 +102271,7 @@ async function repairSessionFileIfNeeded(params) {
102271
102271
  };
102272
102272
  let content;
102273
102273
  try {
102274
- content = await fsPromises.readFile(sessionFile, "utf-8");
102274
+ content = await fs$1.readFile(sessionFile, "utf-8");
102275
102275
  } catch (err) {
102276
102276
  if (err?.code === "ENOENT") return {
102277
102277
  repaired: false,
@@ -102319,15 +102319,15 @@ async function repairSessionFileIfNeeded(params) {
102319
102319
  const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
102320
102320
  const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
102321
102321
  try {
102322
- const stat = await fsPromises.stat(sessionFile).catch(() => null);
102323
- await fsPromises.writeFile(backupPath, content, "utf-8");
102324
- if (stat) await fsPromises.chmod(backupPath, stat.mode);
102325
- await fsPromises.writeFile(tmpPath, cleaned, "utf-8");
102326
- if (stat) await fsPromises.chmod(tmpPath, stat.mode);
102327
- await fsPromises.rename(tmpPath, sessionFile);
102322
+ const stat = await fs$1.stat(sessionFile).catch(() => null);
102323
+ await fs$1.writeFile(backupPath, content, "utf-8");
102324
+ if (stat) await fs$1.chmod(backupPath, stat.mode);
102325
+ await fs$1.writeFile(tmpPath, cleaned, "utf-8");
102326
+ if (stat) await fs$1.chmod(tmpPath, stat.mode);
102327
+ await fs$1.rename(tmpPath, sessionFile);
102328
102328
  } catch (err) {
102329
102329
  try {
102330
- await fsPromises.unlink(tmpPath);
102330
+ await fs$1.unlink(tmpPath);
102331
102331
  } catch (cleanupErr) {
102332
102332
  params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
102333
102333
  }
@@ -105319,7 +105319,7 @@ async function prewarmSessionFile(sessionFile) {
105319
105319
  if (!isSessionManagerCacheEnabled()) return;
105320
105320
  if (isSessionManagerCached(sessionFile)) return;
105321
105321
  try {
105322
- const handle = await fsPromises.open(sessionFile, "r");
105322
+ const handle = await fs$1.open(sessionFile, "r");
105323
105323
  try {
105324
105324
  const buffer = Buffer$1.alloc(4096);
105325
105325
  await handle.read(buffer, 0, buffer.length, 0);
@@ -106207,7 +106207,7 @@ async function compactEmbeddedPiSessionDirect(params) {
106207
106207
  } catch (err) {
106208
106208
  return fail(describeUnknownError(err));
106209
106209
  }
106210
- await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
106210
+ await fs$1.mkdir(resolvedWorkspace, { recursive: true });
106211
106211
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
106212
106212
  const sandbox = await resolveSandboxContext({
106213
106213
  config: params.config,
@@ -106215,7 +106215,7 @@ async function compactEmbeddedPiSessionDirect(params) {
106215
106215
  workspaceDir: resolvedWorkspace
106216
106216
  });
106217
106217
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
106218
- await fsPromises.mkdir(effectiveWorkspace, { recursive: true });
106218
+ await fs$1.mkdir(effectiveWorkspace, { recursive: true });
106219
106219
  await ensureSessionHeader$1({
106220
106220
  sessionFile: params.sessionFile,
106221
106221
  sessionId: params.sessionId,
@@ -107774,12 +107774,12 @@ function getQueuedFileWriter(writers, filePath) {
107774
107774
  const existing = writers.get(filePath);
107775
107775
  if (existing) return existing;
107776
107776
  const dir = path.dirname(filePath);
107777
- const ready = fsPromises.mkdir(dir, { recursive: true }).catch(() => void 0);
107777
+ const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
107778
107778
  let queue = Promise.resolve();
107779
107779
  const writer = {
107780
107780
  filePath,
107781
107781
  write: (line) => {
107782
- queue = queue.then(() => ready).then(() => fsPromises.appendFile(filePath, line, "utf8")).catch(() => void 0);
107782
+ queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
107783
107783
  }
107784
107784
  };
107785
107785
  writers.set(filePath, writer);
@@ -111525,7 +111525,7 @@ async function prepareSessionManagerForRun(params) {
111525
111525
  return;
111526
111526
  }
111527
111527
  if (params.hadSessionFile && header && !hasAssistant) {
111528
- await fsPromises.writeFile(params.sessionFile, "", "utf-8");
111528
+ await fs$1.writeFile(params.sessionFile, "", "utf-8");
111529
111529
  sm.fileEntries = [header];
111530
111530
  sm.byId?.clear?.();
111531
111531
  sm.labelsById?.clear?.();
@@ -112726,7 +112726,7 @@ async function runEmbeddedAttempt(params) {
112726
112726
  ensureGlobalUndiciEnvProxyDispatcher();
112727
112727
  ensureGlobalUndiciStreamTimeouts();
112728
112728
  log$13.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"}`);
112729
- await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
112729
+ await fs$1.mkdir(resolvedWorkspace, { recursive: true });
112730
112730
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
112731
112731
  const sandbox = await resolveSandboxContext({
112732
112732
  config: params.config,
@@ -112734,7 +112734,7 @@ async function runEmbeddedAttempt(params) {
112734
112734
  workspaceDir: resolvedWorkspace
112735
112735
  });
112736
112736
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
112737
- await fsPromises.mkdir(effectiveWorkspace, { recursive: true });
112737
+ await fs$1.mkdir(effectiveWorkspace, { recursive: true });
112738
112738
  let restoreSkillEnv;
112739
112739
  process.chdir(effectiveWorkspace);
112740
112740
  try {
@@ -113023,7 +113023,7 @@ async function runEmbeddedAttempt(params) {
113023
113023
  sessionFile: params.sessionFile,
113024
113024
  warn: (message) => log$13.warn(message)
113025
113025
  });
113026
- const hadSessionFile = await fsPromises.stat(params.sessionFile).then(() => true).catch(() => false);
113026
+ const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
113027
113027
  const transcriptPolicy = resolveTranscriptPolicy({
113028
113028
  modelApi: params.model?.api,
113029
113029
  provider: params.provider,
@@ -114433,7 +114433,7 @@ async function runEmbeddedPiAgent(params) {
114433
114433
  const copilotAuthRetry = authRetryPending;
114434
114434
  authRetryPending = false;
114435
114435
  attemptedThinking.add(thinkLevel);
114436
- await fsPromises.mkdir(resolvedWorkspace, { recursive: true });
114436
+ await fs$1.mkdir(resolvedWorkspace, { recursive: true });
114437
114437
  const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
114438
114438
  const attempt = await runEmbeddedAttempt({
114439
114439
  sessionId: params.sessionId,
@@ -116253,7 +116253,7 @@ async function runWithConcurrency(tasks, limit) {
116253
116253
  //#region src/media-understanding/echo-transcript.ts
116254
116254
  let deliverRuntimePromise$1 = null;
116255
116255
  function loadDeliverRuntime$1() {
116256
- deliverRuntimePromise$1 ??= import("./deliver-runtime-CI-THBhi.js");
116256
+ deliverRuntimePromise$1 ??= import("./deliver-runtime-CRO5x8jL.js");
116257
116257
  return deliverRuntimePromise$1;
116258
116258
  }
116259
116259
  function formatEchoTranscript(transcript, format) {
@@ -117611,12 +117611,12 @@ async function resolveAcpAttachments(ctx) {
117611
117611
  const filePath = normalizeAttachmentPath(attachment.path);
117612
117612
  if (!filePath) continue;
117613
117613
  try {
117614
- const stat = await fsPromises.stat(filePath);
117614
+ const stat = await fs$1.stat(filePath);
117615
117615
  if (stat.size > ACP_ATTACHMENT_MAX_BYTES) {
117616
117616
  logVerbose(`dispatch-acp: skipping attachment ${filePath} (${stat.size} bytes exceeds ${ACP_ATTACHMENT_MAX_BYTES} byte limit)`);
117617
117617
  continue;
117618
117618
  }
117619
- const buf = await fsPromises.readFile(filePath);
117619
+ const buf = await fs$1.readFile(filePath);
117620
117620
  results.push({
117621
117621
  mediaType,
117622
117622
  data: buf.toString("base64")
@@ -121567,7 +121567,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
121567
121567
  hasTypedText
121568
121568
  };
121569
121569
  try {
121570
- const { transcribeFirstAudio } = await import("./audio-preflight-CxMkqmsz.js");
121570
+ const { transcribeFirstAudio } = await import("./audio-preflight-DUZyiet9.js");
121571
121571
  if (params.abortSignal?.aborted) return {
121572
121572
  hasAudioAttachment,
121573
121573
  hasTypedText
@@ -123301,7 +123301,7 @@ async function createModelSelectionState(params) {
123301
123301
  }
123302
123302
  }
123303
123303
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
123304
- const { ensureAuthProfileStore } = await import("./auth-profiles.runtime-firEabaJ.js");
123304
+ const { ensureAuthProfileStore } = await import("./auth-profiles.runtime-BWD0iDWZ.js");
123305
123305
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
123306
123306
  const providerKey = normalizeProviderId(provider);
123307
123307
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -130301,7 +130301,7 @@ function resolveDiscordRestFetch(proxyUrl, runtime) {
130301
130301
  //#region extensions/discord/src/monitor/provider.ts
130302
130302
  let discordVoiceRuntimePromise;
130303
130303
  async function loadDiscordVoiceRuntime() {
130304
- discordVoiceRuntimePromise ??= import("./manager.runtime-sDKQexj4.js");
130304
+ discordVoiceRuntimePromise ??= import("./manager.runtime-lHLhN5ro.js");
130305
130305
  return await discordVoiceRuntimePromise;
130306
130306
  }
130307
130307
  function formatThreadBindingDurationForConfigLabel(durationMs) {
@@ -131379,7 +131379,7 @@ async function ensureWorkspaceAndSessions(workspaceDir, runtime, options) {
131379
131379
  });
131380
131380
  runtime.log(`Workspace OK: ${shortenHomePath(ws.dir)}`);
131381
131381
  const sessionsDir = resolveSessionTranscriptsDirForAgent(options?.agentId);
131382
- await fsPromises.mkdir(sessionsDir, { recursive: true });
131382
+ await fs$1.mkdir(sessionsDir, { recursive: true });
131383
131383
  runtime.log(`Sessions OK: ${shortenHomePath(sessionsDir)}`);
131384
131384
  }
131385
131385
  function resolveNodeManagerOptions() {
@@ -131401,7 +131401,7 @@ function resolveNodeManagerOptions() {
131401
131401
  async function moveToTrash(pathname, runtime) {
131402
131402
  if (!pathname) return;
131403
131403
  try {
131404
- await fsPromises.access(pathname);
131404
+ await fs$1.access(pathname);
131405
131405
  } catch {
131406
131406
  return;
131407
131407
  }
@@ -131424,7 +131424,7 @@ async function detectBinary(name) {
131424
131424
  if (!isSafeExecutableValue(name)) return false;
131425
131425
  const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
131426
131426
  if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
131427
- await fsPromises.access(resolved);
131427
+ await fs$1.access(resolved);
131428
131428
  return true;
131429
131429
  } catch {
131430
131430
  return false;
@@ -132442,7 +132442,7 @@ function createSelfChatCache() {
132442
132442
  async function detectRemoteHostFromCliPath(cliPath) {
132443
132443
  try {
132444
132444
  const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
132445
- const content = await fsPromises.readFile(expanded, "utf8");
132445
+ const content = await fs$1.readFile(expanded, "utf8");
132446
132446
  const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
132447
132447
  if (userHostMatch) return userHostMatch[1];
132448
132448
  return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
@@ -138883,15 +138883,15 @@ let slashCommandsRuntimePromise = null;
138883
138883
  let slashDispatchRuntimePromise = null;
138884
138884
  let slashSkillCommandsRuntimePromise = null;
138885
138885
  function loadSlashCommandsRuntime() {
138886
- slashCommandsRuntimePromise ??= import("./slash-commands.runtime-D9GHahMO.js");
138886
+ slashCommandsRuntimePromise ??= import("./slash-commands.runtime-_LrsMaI1.js");
138887
138887
  return slashCommandsRuntimePromise;
138888
138888
  }
138889
138889
  function loadSlashDispatchRuntime() {
138890
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-DcISuJb0.js");
138890
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-neG4499W.js");
138891
138891
  return slashDispatchRuntimePromise;
138892
138892
  }
138893
138893
  function loadSlashSkillCommandsRuntime() {
138894
- slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-Dt6QQJcX.js");
138894
+ slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-D0ohJN-V.js");
138895
138895
  return slashSkillCommandsRuntimePromise;
138896
138896
  }
138897
138897
  const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
@@ -139902,7 +139902,7 @@ function collectTelegramUnmentionedGroupIds(groups) {
139902
139902
  }
139903
139903
  let auditMembershipRuntimePromise = null;
139904
139904
  function loadAuditMembershipRuntime() {
139905
- auditMembershipRuntimePromise ??= import("./audit-membership-runtime-o16tAd90.js");
139905
+ auditMembershipRuntimePromise ??= import("./audit-membership-runtime-DOqwbA7L.js");
139906
139906
  return auditMembershipRuntimePromise;
139907
139907
  }
139908
139908
  async function auditTelegramGroupMembership(params) {
@@ -143298,7 +143298,7 @@ function getCacheStats() {
143298
143298
  const STICKER_DESCRIPTION_PROMPT = "Describe this sticker image in 1-2 sentences. Focus on what the sticker depicts (character, object, action, emotion). Be concise and objective.";
143299
143299
  let imageRuntimePromise = null;
143300
143300
  function loadImageRuntime() {
143301
- imageRuntimePromise ??= import("./image-runtime-Cen4jnt5.js");
143301
+ imageRuntimePromise ??= import("./image-runtime-Cx4HaqrI.js");
143302
143302
  return imageRuntimePromise;
143303
143303
  }
143304
143304
  /**
@@ -143364,7 +143364,7 @@ async function describeStickerImage(params) {
143364
143364
  const { provider, model } = resolved;
143365
143365
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
143366
143366
  try {
143367
- const buffer = await fsPromises.readFile(imagePath);
143367
+ const buffer = await fs$1.readFile(imagePath);
143368
143368
  const { describeImageWithModel } = await loadImageRuntime();
143369
143369
  return (await describeImageWithModel({
143370
143370
  buffer,
@@ -145030,7 +145030,7 @@ async function resolveTelegramInboundBody(params) {
145030
145030
  const disableAudioPreflight = (topicConfig?.disableAudioPreflight ?? groupConfig?.disableAudioPreflight) === true;
145031
145031
  let preflightTranscript;
145032
145032
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
145033
- const { transcribeFirstAudio } = await import("./audio-preflight-CxMkqmsz.js");
145033
+ const { transcribeFirstAudio } = await import("./audio-preflight-DUZyiet9.js");
145034
145034
  preflightTranscript = await transcribeFirstAudio({
145035
145035
  ctx: {
145036
145036
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -147127,7 +147127,7 @@ function resolveCommandHashPath(accountId, botIdentity) {
147127
147127
  }
147128
147128
  async function readCachedCommandHash(accountId, botIdentity) {
147129
147129
  try {
147130
- return (await fsPromises.readFile(resolveCommandHashPath(accountId, botIdentity), "utf-8")).trim();
147130
+ return (await fs$1.readFile(resolveCommandHashPath(accountId, botIdentity), "utf-8")).trim();
147131
147131
  } catch {
147132
147132
  return null;
147133
147133
  }
@@ -147135,8 +147135,8 @@ async function readCachedCommandHash(accountId, botIdentity) {
147135
147135
  async function writeCachedCommandHash(accountId, botIdentity, hash) {
147136
147136
  const filePath = resolveCommandHashPath(accountId, botIdentity);
147137
147137
  try {
147138
- await fsPromises.mkdir(path.dirname(filePath), { recursive: true });
147139
- await fsPromises.writeFile(filePath, hash, "utf-8");
147138
+ await fs$1.mkdir(path.dirname(filePath), { recursive: true });
147139
+ await fs$1.writeFile(filePath, hash, "utf-8");
147140
147140
  } catch {}
147141
147141
  }
147142
147142
  function syncTelegramMenuCommands(params) {
@@ -148789,7 +148789,7 @@ function safeParseState(raw) {
148789
148789
  async function readTelegramUpdateOffset(params) {
148790
148790
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
148791
148791
  try {
148792
- const parsed = safeParseState(await fsPromises.readFile(filePath, "utf-8"));
148792
+ const parsed = safeParseState(await fs$1.readFile(filePath, "utf-8"));
148793
148793
  const expectedBotId = extractBotIdFromToken(params.botToken);
148794
148794
  if (expectedBotId && parsed?.botId && parsed.botId !== expectedBotId) return null;
148795
148795
  if (expectedBotId && parsed?.botId === null) return null;
@@ -148814,7 +148814,7 @@ async function writeTelegramUpdateOffset(params) {
148814
148814
  async function deleteTelegramUpdateOffset(params) {
148815
148815
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
148816
148816
  try {
148817
- await fsPromises.unlink(filePath);
148817
+ await fs$1.unlink(filePath);
148818
148818
  } catch (err) {
148819
148819
  if (err.code === "ENOENT") return;
148820
148820
  throw err;
@@ -153606,7 +153606,7 @@ function createWhatsAppLoginTool() {
153606
153606
  force: Type.Optional(Type.Boolean())
153607
153607
  }),
153608
153608
  execute: async (_toolCallId, args) => {
153609
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-C8iDYxXx.js");
153609
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DpxxtTBd.js");
153610
153610
  if ((args?.action ?? "start") === "wait") {
153611
153611
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
153612
153612
  return {
@@ -153680,23 +153680,23 @@ let webOutboundPromise = null;
153680
153680
  let webLoginPromise = null;
153681
153681
  let whatsappActionsPromise = null;
153682
153682
  function loadWebOutbound() {
153683
- webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-Dv1HN4ha.js");
153683
+ webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-Ch2o56Ey.js");
153684
153684
  return webOutboundPromise;
153685
153685
  }
153686
153686
  function loadWebLogin() {
153687
- webLoginPromise ??= import("./runtime-whatsapp-login.runtime-DKMtq6l9.js");
153687
+ webLoginPromise ??= import("./runtime-whatsapp-login.runtime-Bo1HalYB.js");
153688
153688
  return webLoginPromise;
153689
153689
  }
153690
153690
  function loadWebLoginQr() {
153691
- webLoginQrPromise ??= import("./login-qr-C8iDYxXx.js");
153691
+ webLoginQrPromise ??= import("./login-qr-DpxxtTBd.js");
153692
153692
  return webLoginQrPromise;
153693
153693
  }
153694
153694
  function loadWebChannel() {
153695
- webChannelPromise ??= import("./web-BHO-XtPY.js");
153695
+ webChannelPromise ??= import("./web-BRvkjVpk.js");
153696
153696
  return webChannelPromise;
153697
153697
  }
153698
153698
  function loadWhatsAppActions() {
153699
- whatsappActionsPromise ??= import("./whatsapp-actions-BC06Ug_d.js");
153699
+ whatsappActionsPromise ??= import("./whatsapp-actions-BXO9Bi7a.js");
153700
153700
  return whatsappActionsPromise;
153701
153701
  }
153702
153702
  function createRuntimeWhatsApp() {
@@ -154727,7 +154727,7 @@ async function withMemoryManagerForAgent(params) {
154727
154727
  }
154728
154728
  async function checkReadableFile(pathname) {
154729
154729
  try {
154730
- await fsPromises.access(pathname, fs.constants.R_OK);
154730
+ await fs$1.access(pathname, fs.constants.R_OK);
154731
154731
  return { exists: true };
154732
154732
  } catch (err) {
154733
154733
  const code = err.code;
@@ -154744,7 +154744,7 @@ async function scanSessionFiles(agentId) {
154744
154744
  try {
154745
154745
  return {
154746
154746
  source: "sessions",
154747
- totalFiles: (await fsPromises.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
154747
+ totalFiles: (await fs$1.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
154748
154748
  issues
154749
154749
  };
154750
154750
  } catch (err) {
@@ -154776,7 +154776,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
154776
154776
  if (alt.issue) issues.push(alt.issue);
154777
154777
  const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
154778
154778
  for (const extraPath of resolvedExtraPaths) try {
154779
- if ((await fsPromises.lstat(extraPath)).isSymbolicLink()) continue;
154779
+ if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
154780
154780
  const extraCheck = await checkReadableFile(extraPath);
154781
154781
  if (extraCheck.issue) issues.push(extraCheck.issue);
154782
154782
  } catch (err) {
@@ -154786,7 +154786,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
154786
154786
  }
154787
154787
  let dirReadable = null;
154788
154788
  try {
154789
- await fsPromises.access(memoryDir, fs.constants.R_OK);
154789
+ await fs$1.access(memoryDir, fs.constants.R_OK);
154790
154790
  dirReadable = true;
154791
154791
  } catch (err) {
154792
154792
  const code = err.code;
@@ -154834,7 +154834,7 @@ async function summarizeQmdIndexArtifact(manager) {
154834
154834
  if (!dbPath) return null;
154835
154835
  let stat;
154836
154836
  try {
154837
- stat = await fsPromises.stat(dbPath);
154837
+ stat = await fs$1.stat(dbPath);
154838
154838
  } catch (err) {
154839
154839
  const code = err.code;
154840
154840
  if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
@@ -162009,7 +162009,7 @@ async function emitResetCommandHooks(params) {
162009
162009
  try {
162010
162010
  const messages = [];
162011
162011
  if (sessionFile) {
162012
- const content = await fsPromises.readFile(sessionFile, "utf-8");
162012
+ const content = await fs$1.readFile(sessionFile, "utf-8");
162013
162013
  for (const line of content.split("\n")) {
162014
162014
  if (!line.trim()) continue;
162015
162015
  try {
@@ -165101,18 +165101,18 @@ function appendImagePathsToPrompt(prompt, paths) {
165101
165101
  return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
165102
165102
  }
165103
165103
  async function writeCliImages(images) {
165104
- const tempDir = await fsPromises.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
165104
+ const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
165105
165105
  const paths = [];
165106
165106
  for (let i = 0; i < images.length; i += 1) {
165107
165107
  const image = images[i];
165108
165108
  const ext = resolveImageExtension(image.mimeType);
165109
165109
  const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
165110
165110
  const buffer = Buffer.from(image.data, "base64");
165111
- await fsPromises.writeFile(filePath, buffer, { mode: 384 });
165111
+ await fs$1.writeFile(filePath, buffer, { mode: 384 });
165112
165112
  paths.push(filePath);
165113
165113
  }
165114
165114
  const cleanup = async () => {
165115
- await fsPromises.rm(tempDir, {
165115
+ await fs$1.rm(tempDir, {
165116
165116
  recursive: true,
165117
165117
  force: true
165118
165118
  });
@@ -168251,7 +168251,7 @@ const warnedContexts = /* @__PURE__ */ new Map();
168251
168251
  const log$1 = createSubsystemLogger("session-maintenance-warning");
168252
168252
  let deliverRuntimePromise = null;
168253
168253
  function loadDeliverRuntime() {
168254
- deliverRuntimePromise ??= import("./deliver-runtime-CI-THBhi.js");
168254
+ deliverRuntimePromise ??= import("./deliver-runtime-CRO5x8jL.js");
168255
168255
  return deliverRuntimePromise;
168256
168256
  }
168257
168257
  function shouldSendWarning() {
@@ -168920,7 +168920,7 @@ async function stageSandboxMedia(params) {
168920
168920
  const remoteMediaCacheDir = ctx.MediaRemoteHost ? path.join(CONFIG_DIR, "media", "remote-cache", sessionKey) : null;
168921
168921
  const effectiveWorkspaceDir = sandbox?.workspaceDir ?? remoteMediaCacheDir;
168922
168922
  if (!effectiveWorkspaceDir) return;
168923
- await fsPromises.mkdir(effectiveWorkspaceDir, { recursive: true });
168923
+ await fs$1.mkdir(effectiveWorkspaceDir, { recursive: true });
168924
168924
  const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
168925
168925
  cfg,
168926
168926
  accountId: ctx.AccountId
@@ -168979,8 +168979,8 @@ async function stageLocalFileIntoRoot(params) {
168979
168979
  }
168980
168980
  async function stageRemoteFileIntoRoot(params) {
168981
168981
  const tmpRoot = resolvePreferredOpenClawTmpDir();
168982
- await fsPromises.mkdir(tmpRoot, { recursive: true });
168983
- const tmpDir = await fsPromises.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
168982
+ await fs$1.mkdir(tmpRoot, { recursive: true });
168983
+ const tmpDir = await fs$1.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
168984
168984
  const tmpPath = path.join(tmpDir, "download");
168985
168985
  try {
168986
168986
  await scpFile(params.remoteHost, params.remotePath, tmpPath);
@@ -168991,7 +168991,7 @@ async function stageRemoteFileIntoRoot(params) {
168991
168991
  maxBytes: params.maxBytes
168992
168992
  });
168993
168993
  } finally {
168994
- await fsPromises.rm(tmpDir, {
168994
+ await fs$1.rm(tmpDir, {
168995
168995
  recursive: true,
168996
168996
  force: true
168997
168997
  }).catch(() => {});