wednesdayai 0.5.1-dev.24 → 0.5.1-dev.25

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 (266) hide show
  1. package/dist/{agent-scope-DCgndASv.js → agent-scope-BKsGMXqc.js} +3 -3
  2. package/dist/{agent-turn-runner-CEjdyv-R.js → agent-turn-runner-LKV3FMwQ.js} +6 -6
  3. package/dist/{api-key-rotation-dv2YbGr8.js → api-key-rotation-DZNFm4xG.js} +2 -2
  4. package/dist/{audio-preflight-C4_SRws-.js → audio-preflight-DQous9JR.js} +29 -29
  5. package/dist/{audio-transcription-runner-Ct0kBrps.js → audio-transcription-runner-BK3cV_ad.js} +26 -26
  6. package/dist/build-info.json +3 -3
  7. package/dist/bundled/boot-md/handler.js +60 -60
  8. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  9. package/dist/bundled/command-logger/handler.js +2 -2
  10. package/dist/bundled/session-journal/handler.js +60 -60
  11. package/dist/bundled/session-memory/handler.js +60 -60
  12. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  13. package/dist/{channel-activity-Kn1_ykXE.js → channel-activity-BAxUpg5h.js} +3 -3
  14. package/dist/{chat-content-1fhcKTem.js → chat-content-BWkiC3u3.js} +34 -34
  15. package/dist/{chrome-DIGxu4IF.js → chrome-Dzgbe0zH.js} +23 -23
  16. package/dist/{chunk-CEygNI3g.js → chunk-Bvf22vTh.js} +3 -3
  17. package/dist/{command-queue-BIc3C-hI.js → command-queue-BOMFLCHM.js} +1 -1
  18. package/dist/{commands-registry-Cof4HjvY.js → commands-registry-Da3c0MbL.js} +2 -2
  19. package/dist/config.js +9 -9
  20. package/dist/{deliver-DrYdFhBN.js → deliver-CJjQbaJE.js} +29 -29
  21. package/dist/{diagnostic-N82VS3Qp.js → diagnostic-Dn_o8RGN.js} +5 -5
  22. package/dist/{plugin-sdk/errors-B671D37F.js → errors-1FTZDNVR.js} +1 -1
  23. package/dist/{fetch-B1ohBh6A.js → fetch-CnDdghbc.js} +8 -8
  24. package/dist/{fetch-guard-BXzVwvnJ.js → fetch-guard-B6BYdjiQ.js} +3 -3
  25. package/dist/{frontmatter-Cw_6jMAR.js → frontmatter-DvbDhvt1.js} +3 -3
  26. package/dist/{fs-safe-BK5ALzKD.js → fs-safe-IYMDplSg.js} +26 -26
  27. package/dist/{image-ops-C-5VgbLB.js → image-ops-BuzZGoUm.js} +1 -1
  28. package/dist/{ir-DioI2VyB.js → ir-CBsM7qoP.js} +5 -5
  29. package/dist/{legacy-names-CghFcfry.js → legacy-names-Ckds5WWe.js} +1 -1
  30. package/dist/llm-slug-generator.js +60 -60
  31. package/dist/{logger-J4xjy-6D.js → logger-BeXVb5cn.js} +1 -1
  32. package/dist/{manager-D728Thsn.js → manager-BujYLKny.js} +18 -18
  33. package/dist/{markdown-tables-DfLMw9ti.js → markdown-tables-WuCFdPlC.js} +2 -2
  34. package/dist/{model-selection-BHGpQSa9.js → model-selection-CHi8o17y.js} +83 -83
  35. package/dist/{models-config-CJUMccZW.js → models-config-CAlyknIh.js} +2 -2
  36. package/dist/{outbound-attachment-DtVXUXnX.js → outbound-attachment-C6mfyze2.js} +2 -2
  37. package/dist/{outbound-message-hooks-7ErHCBLv.js → outbound-message-hooks-jUzcd2OQ.js} +5 -5
  38. package/dist/{path-alias-guards-E9ntDORB.js → path-alias-guards-BgOxr6f8.js} +1 -1
  39. package/dist/{pi-embedded-C1EQ2NQD.js → pi-embedded-aOKwlbog.js} +268 -268
  40. package/dist/{pi-embedded-utils-j-G6as7X.js → pi-embedded-utils-BGvDJMAA.js} +3 -3
  41. package/dist/{pi-model-discovery-BaH_6win.js → pi-model-discovery-CYfRyzsD.js} +7 -7
  42. package/dist/plugin-sdk/{agent-scope-BNKfH4PO.js → agent-scope-B5NskkwN.js} +2 -2
  43. package/dist/plugin-sdk/{agent-turn-execute-Dg4sVJSk.js → agent-turn-execute-C6g1y27e.js} +12 -12
  44. package/dist/plugin-sdk/agent-turn-execute-PXSa6POm.js +64 -0
  45. package/dist/plugin-sdk/{agent-turn-runner-CD9Y0Gsf.js → agent-turn-runner-BkP71ySA.js} +4 -4
  46. package/dist/plugin-sdk/agent-turn-runner-Cwg_qJSY.js +11 -0
  47. package/dist/plugin-sdk/{agent-turn-runner-D9SfXrDG.js → agent-turn-runner-DTwcFLVR.js} +7 -7
  48. package/dist/plugin-sdk/{api-key-rotation-BoeGT5k6.js → api-key-rotation-Dd5GYq7W.js} +2 -2
  49. package/dist/plugin-sdk/{audio-preflight-DpVKYTBy.js → audio-preflight-BTA2w6a8.js} +2 -2
  50. package/dist/plugin-sdk/{audio-preflight-GgmY1Zte.js → audio-preflight-CsMLbzm_.js} +5 -5
  51. package/dist/plugin-sdk/audio-preflight-OHqqRPPw.js +31 -0
  52. package/dist/plugin-sdk/{audio-transcription-runner-0gef4Ef0.js → audio-transcription-runner-2bpzZm3F.js} +1 -1
  53. package/dist/plugin-sdk/{audio-transcription-runner-BhFy0i3B.js → audio-transcription-runner-CW4PtJOr.js} +11 -11
  54. package/dist/plugin-sdk/{auth-profiles-DhZNx6fQ.js → auth-profiles-CxOZbtpA.js} +4 -4
  55. package/dist/plugin-sdk/{channel-activity-BlGuAYdc.js → channel-activity-WL5SZ4Ub.js} +3 -3
  56. package/dist/plugin-sdk/{chat-content-Dpzf2nbZ.js → chat-content-CCOQCwrz.js} +3 -3
  57. package/dist/plugin-sdk/{chat-content-BnSpex4r.js → chat-content-Csto0UEZ.js} +13 -13
  58. package/dist/plugin-sdk/{chrome-D9DwZOSC.js → chrome-C2bUQR0d.js} +8 -8
  59. package/dist/plugin-sdk/{chrome-CBH4Uiy-.js → chrome-DzzIT4YD.js} +13 -13
  60. package/dist/plugin-sdk/{chunk-DKwQiXuF.js → chunk-CWDKrXV-.js} +3 -3
  61. package/dist/plugin-sdk/{chunk-jn4LDLDQ.js → chunk-C_GT4tj0.js} +5 -5
  62. package/dist/plugin-sdk/{command-detection--t4OkqFt.js → command-detection-YLMxiTkq.js} +95 -95
  63. package/dist/plugin-sdk/{command-queue-Dd0-b1-g.js → command-queue-84-UYysZ.js} +1 -1
  64. package/dist/plugin-sdk/{command-queue-DfIjyemM.js → command-queue-BlcsvUrS.js} +7 -7
  65. package/dist/plugin-sdk/{command-queue-Cm8QKC0F.js → command-queue-J0ZpvnYU.js} +1 -1
  66. package/dist/plugin-sdk/{commands-registry-COgT-iaa.js → commands-registry-Bq1VWa2x.js} +2 -2
  67. package/dist/plugin-sdk/{commands-registry-C6FHOrPa.js → commands-registry-oILscT9a.js} +5 -5
  68. package/dist/plugin-sdk/{config-D2katwYr.js → config-Cp7sIoSP.js} +6 -6
  69. package/dist/plugin-sdk/{deliver-CeWz5Axp.js → deliver-1ptGm5gu.js} +14 -14
  70. package/dist/plugin-sdk/{deliver-CZVPDUrt.js → deliver-CT3Lk2kq.js} +1 -1
  71. package/dist/plugin-sdk/{deliver-D6hs0zDt.js → deliver-dkNTCb3Z.js} +3 -3
  72. package/dist/plugin-sdk/deliver-vvTRXMdO.js +35 -0
  73. package/dist/plugin-sdk/{diagnostic-ZVJ6ZVA6.js → diagnostic-BCs9q4kf.js} +6 -6
  74. package/dist/plugin-sdk/{diagnostic-Bi52EuT5.js → diagnostic-C-Clqb63.js} +1 -1
  75. package/dist/plugin-sdk/{diagnostic-DD94QWnh.js → diagnostic-W-ES89_S.js} +5 -5
  76. package/dist/{errors-COs_vQr3.js → plugin-sdk/errors-BAcXagTa.js} +1 -1
  77. package/dist/plugin-sdk/{fetch-guard-DWRMXy-Z.js → fetch-guard-5esEIw3C.js} +3 -3
  78. package/dist/plugin-sdk/{fs-safe-CR39I5to.js → fs-safe-Qut4VUn8.js} +3 -3
  79. package/dist/plugin-sdk/{image-ops-C0wvHJkm.js → image-ops-B9MP8BwT.js} +1 -1
  80. package/dist/plugin-sdk/index.js +56 -56
  81. package/dist/plugin-sdk/{ir-CRNn4Wzv.js → ir-D6Bn5lOZ.js} +5 -5
  82. package/dist/plugin-sdk/{local-roots-D2LPLxOo.js → local-roots-1beRdBcS.js} +7 -7
  83. package/dist/plugin-sdk/{logger-F5PKgK4h.js → logger-DYxRK_FZ.js} +1 -1
  84. package/dist/plugin-sdk/manager-BgK1sRAg.js +16 -0
  85. package/dist/plugin-sdk/{manager-WrO0qTfU.js → manager-Dxv2YpgS.js} +7 -7
  86. package/dist/plugin-sdk/{markdown-tables-DunxiRpT.js → markdown-tables-5CSf45sS.js} +2 -2
  87. package/dist/plugin-sdk/markdown-tables-Q5ogPPem.js +9 -0
  88. package/dist/plugin-sdk/{models-config-DJUNPvmU.js → models-config-Dj4jLPMw.js} +2 -2
  89. package/dist/plugin-sdk/{monitor-BrUwRgsT.js → monitor-BHeL2-is.js} +32 -32
  90. package/dist/plugin-sdk/{outbound-attachment-Bw8Ac2Eh.js → outbound-attachment-DiQNpfYY.js} +2 -2
  91. package/dist/plugin-sdk/{path-alias-guards-DvB3vS9N.js → path-alias-guards-Cr_8wxeu.js} +1 -1
  92. package/dist/plugin-sdk/{pi-embedded-utils-CeNVVYT3.js → pi-embedded-utils-BmeLQMRx.js} +1 -1
  93. package/dist/plugin-sdk/{pi-embedded-utils-DCbfW5pR.js → pi-embedded-utils-Bx8SkKxs.js} +3 -3
  94. package/dist/plugin-sdk/{pi-model-discovery-_OwU2G2N.js → pi-model-discovery-CHCoH08E.js} +1 -1
  95. package/dist/plugin-sdk/{pi-model-discovery-Bt6iAhJo.js → pi-model-discovery-mXT8DqbW.js} +5 -5
  96. package/dist/plugin-sdk/provider-dispatcher-Bg7ik_9P.js +64 -0
  97. package/dist/plugin-sdk/{provider-dispatcher-Bx_RMlu-.js → provider-dispatcher-BkEWKVLB.js} +12 -12
  98. package/dist/plugin-sdk/{provider-image-DH8Jro3J.js → provider-image-BSV8WjkR.js} +1 -1
  99. package/dist/plugin-sdk/{provider-image-Cp4O6erC.js → provider-image-M3j6w2Xu.js} +6 -6
  100. package/dist/plugin-sdk/{provider-image-CBXOs7yQ.js → provider-image-QDVfXKph.js} +4 -4
  101. package/dist/plugin-sdk/provider-image-fv7acwPs.js +25 -0
  102. package/dist/plugin-sdk/{proxy-DhVCl72V.js → proxy-K3jUjtIm.js} +1 -1
  103. package/dist/plugin-sdk/proxy-LKdqVD6u.js +7 -0
  104. package/dist/plugin-sdk/{proxy-fetch-BSTGvynk.js → proxy-fetch-Dt3HV6r3.js} +1 -1
  105. package/dist/plugin-sdk/{pw-ai-BAIve7qq.js → pw-ai-CsU7HGvR.js} +10 -10
  106. package/dist/plugin-sdk/{pw-ai-BP4Kwaqc.js → pw-ai-QlS2E2LB.js} +1 -1
  107. package/dist/plugin-sdk/{qmd-manager-Dk95qYn7.js → qmd-manager-BHhDDFrn.js} +8 -8
  108. package/dist/plugin-sdk/{query-expansion-CmmZw3Kz.js → query-expansion-BY2L8oSD.js} +2 -2
  109. package/dist/plugin-sdk/{recorder-CSYSJRCO.js → recorder-B_7zTSFA.js} +2 -2
  110. package/dist/plugin-sdk/{redact-YbcPIGWf.js → redact-C9Eu_AUI.js} +1 -1
  111. package/dist/plugin-sdk/{replies-CXs4_abR.js → replies-B3XUIs0b.js} +5 -5
  112. package/dist/plugin-sdk/replies-C4T9Nsqz.js +27 -0
  113. package/dist/plugin-sdk/{reply-directives-DjbLtWjg.js → reply-directives-D1IqpiHJ.js} +2 -2
  114. package/dist/plugin-sdk/{reply-prefix-DA4xCsnL.js → reply-prefix-Bf8Iqq8v.js} +1 -1
  115. package/dist/plugin-sdk/reply-prefix-C38vv65Y.js +7 -0
  116. package/dist/plugin-sdk/{resolve-route-Ouh7ZVw1.js → resolve-route-D0I4Llwy.js} +4 -4
  117. package/dist/plugin-sdk/{resolve-route-BDoLW8xr.js → resolve-route-JQF7nqo1.js} +5 -5
  118. package/dist/plugin-sdk/{runs-C1Lvxfri.js → runs-8iACp6xv.js} +3 -3
  119. package/dist/plugin-sdk/{runs-s1XnmHHC.js → runs-C75mB4si.js} +8 -8
  120. package/dist/plugin-sdk/{runs-DG49eFuR.js → runs-D0UdtKVI.js} +5 -5
  121. package/dist/plugin-sdk/runs-S1n4U4AS.js +27 -0
  122. package/dist/plugin-sdk/send--m_QWAPO.js +23 -0
  123. package/dist/plugin-sdk/{send-sl6DLsL2.js → send-4vK7xjJW.js} +15 -15
  124. package/dist/plugin-sdk/{send-YzrHr_2V.js → send-7iASSBg6.js} +6 -6
  125. package/dist/plugin-sdk/{send-BguPpGBL.js → send-BP8o2l4w.js} +2 -2
  126. package/dist/plugin-sdk/send-C4wz_kt5.js +28 -0
  127. package/dist/plugin-sdk/{send-DlYcVutL.js → send-CRZe2naD.js} +8 -8
  128. package/dist/plugin-sdk/{send-CcEF6VcP.js → send-CYZi6dwK.js} +1 -1
  129. package/dist/plugin-sdk/{send-Dzf8uETw.js → send-CzU3DnG8.js} +7 -7
  130. package/dist/plugin-sdk/send-D9H-XXzx.js +25 -0
  131. package/dist/plugin-sdk/{send-C6oFuvTF.js → send-DHH7532s.js} +6 -6
  132. package/dist/plugin-sdk/{send-BRN7Zt5N.js → send-Dhapzixp.js} +19 -19
  133. package/dist/plugin-sdk/send-DnFCjogv.js +24 -0
  134. package/dist/plugin-sdk/{session-context-BKcnHr0H.js → session-context-DVrSm2pD.js} +4 -4
  135. package/dist/plugin-sdk/session-meta-CT3hQSl7.js +13 -0
  136. package/dist/plugin-sdk/{session-meta-Ov3Sv55D.js → session-meta-Cho9XVh8.js} +1 -1
  137. package/dist/plugin-sdk/{sessions-CLYE50YG.js → sessions-D5KTt-gq.js} +4 -4
  138. package/dist/plugin-sdk/{skill-commands-B3IuCuE6.js → skill-commands-Bv0tfv2Q.js} +4 -4
  139. package/dist/plugin-sdk/skill-commands-Clq-qaMe.js +13 -0
  140. package/dist/plugin-sdk/{skills-DcowK80n.js → skills-DO7OTK36.js} +6 -6
  141. package/dist/plugin-sdk/{ssrf-CkGpmmN1.js → ssrf-DPY1teOB.js} +1 -1
  142. package/dist/plugin-sdk/{store-B5Jssa25.js → store-nKIf4x6Y.js} +2 -2
  143. package/dist/plugin-sdk/{subagent-registry-B4EmS6cu.js → subagent-registry-DA50ITkO.js} +12 -12
  144. package/dist/plugin-sdk/subagent-registry-DSh4cze1.js +64 -0
  145. package/dist/plugin-sdk/{subsystem-C-lWCqvG.js → subsystem-CPqF9wja.js} +4 -4
  146. package/dist/plugin-sdk/{tables-CG00Lb4u.js → tables-CatynEzT.js} +1 -1
  147. package/dist/plugin-sdk/testing.js +12 -12
  148. package/dist/plugin-sdk/{tokens-Ctmmv-sn.js → tokens-DdbQh5HH.js} +1 -1
  149. package/dist/plugin-sdk/{tool-loop-detection-ys8oxWQM.js → tool-loop-detection-DazBiexb.js} +1 -1
  150. package/dist/plugin-sdk/{user-run-recording-CTKs_Jv9.js → user-run-recording-BXyHfYg3.js} +2 -2
  151. package/dist/plugin-sdk/user-run-recording-D80GJNVP.js +11 -0
  152. package/dist/{provider-image-CFq0C_z0.js → provider-image-CNBkTbhu.js} +6 -6
  153. package/dist/{proxy-CrSpy5Aw.js → proxy-Ds4gxPy8.js} +1 -1
  154. package/dist/{proxy-env-BxR4m86L.js → proxy-env-DAf-b2bM.js} +1 -1
  155. package/dist/{proxy-fetch-g109vqdt.js → proxy-fetch-M3YAp_Kv.js} +1 -1
  156. package/dist/{pw-ai-Dhm8_p5G.js → pw-ai-BcibeG9a.js} +14 -14
  157. package/dist/{qmd-manager-CU9iEql0.js → qmd-manager-C3UBJiCk.js} +12 -12
  158. package/dist/{query-expansion-B_2rETEo.js → query-expansion-BT5lS0um.js} +13 -13
  159. package/dist/{recorder-Clg9Kbqu.js → recorder-B08vNxya.js} +2 -2
  160. package/dist/{redact-DpE5Tg36.js → redact-CKI6SufO.js} +1 -1
  161. package/dist/{replies-Cty02S3t.js → replies-BHkXhmOj.js} +5 -5
  162. package/dist/{reply-directives-BIh2AkNd.js → reply-directives-DkfwzHl4.js} +2 -2
  163. package/dist/{reply-prefix-C-DjHvQK.js → reply-prefix-DS2s69iC.js} +1 -1
  164. package/dist/{resolve-route-DKZiteo6.js → resolve-route-DxuZn3_M.js} +5 -5
  165. package/dist/{runs-Ot6reoKK.js → runs-DFvW_PVw.js} +9 -9
  166. package/dist/{send-BXHsjIHr.js → send-2aTk7PU-.js} +28 -28
  167. package/dist/{send-Bf4geLyV.js → send-D2WSE41A.js} +8 -8
  168. package/dist/{send-CsDSBjFo.js → send-mILKKt54.js} +6 -6
  169. package/dist/{send-bwKTbNlJ.js → send-odd2G3DX.js} +7 -7
  170. package/dist/{send-DQvfLvpJ.js → send-yIxOvEiz.js} +6 -6
  171. package/dist/{session-meta-5XI6vLtM.js → session-meta-B8B6RwSE.js} +1 -1
  172. package/dist/{sessions-DF9biCmh.js → sessions-DC7A0bw-.js} +5 -5
  173. package/dist/{skill-commands-CAOvM2sb.js → skill-commands-DdVSQNce.js} +8 -8
  174. package/dist/{skills-VN1CJK6W.js → skills-BXMjgvRl.js} +21 -21
  175. package/dist/{store-HgGweM4u.js → store-BVdeIl7N.js} +7 -7
  176. package/dist/{tables-DkwNUhx1.js → tables-yHwb0GsI.js} +1 -1
  177. package/dist/{tokens-PMai9bNL.js → tokens-CXBau-U0.js} +1 -1
  178. package/dist/{tool-loop-detection-BqyMjpvr.js → tool-loop-detection-Bw8B0hV3.js} +2 -2
  179. package/dist/{user-run-recording-B1HujJiT.js → user-run-recording-8MZq1Us4.js} +2 -2
  180. package/dist/{workspace-Bj1Jegt-.js → workspace-DK2ZEkpT.js} +27 -27
  181. package/extensions/acpx/package.json +1 -1
  182. package/extensions/anthropic/package.json +1 -1
  183. package/extensions/bifrost/package.json +1 -1
  184. package/extensions/bluebubbles/package.json +1 -1
  185. package/extensions/copilot-proxy/package.json +1 -1
  186. package/extensions/deepgram/package.json +1 -1
  187. package/extensions/deepinfra/package.json +1 -1
  188. package/extensions/diagnostics-otel/package.json +1 -1
  189. package/extensions/diffs/package.json +1 -1
  190. package/extensions/discord/package.json +1 -1
  191. package/extensions/dream-cycle/package.json +1 -1
  192. package/extensions/elevenlabs/package.json +1 -1
  193. package/extensions/feishu/package.json +1 -1
  194. package/extensions/gemini-search/package.json +1 -1
  195. package/extensions/google/package.json +1 -1
  196. package/extensions/google-gemini-cli-auth/package.json +1 -1
  197. package/extensions/googlechat/package.json +1 -1
  198. package/extensions/grok-search/package.json +1 -1
  199. package/extensions/groq/package.json +1 -1
  200. package/extensions/imessage/package.json +1 -1
  201. package/extensions/irc/package.json +1 -1
  202. package/extensions/kimi-search/package.json +1 -1
  203. package/extensions/learning-core/package.json +1 -1
  204. package/extensions/line/package.json +1 -1
  205. package/extensions/llm-task/package.json +1 -1
  206. package/extensions/lobster/package.json +1 -1
  207. package/extensions/matrix/CHANGELOG.md +1 -1
  208. package/extensions/matrix/package.json +1 -1
  209. package/extensions/mattermost/package.json +1 -1
  210. package/extensions/memory-core/package.json +1 -1
  211. package/extensions/memory-lancedb/package.json +1 -1
  212. package/extensions/minimax/package.json +1 -1
  213. package/extensions/minimax-portal-auth/package.json +1 -1
  214. package/extensions/mistral/package.json +1 -1
  215. package/extensions/moonshot/package.json +1 -1
  216. package/extensions/msteams/CHANGELOG.md +1 -1
  217. package/extensions/msteams/package.json +1 -1
  218. package/extensions/nextcloud-talk/package.json +1 -1
  219. package/extensions/nostr/CHANGELOG.md +1 -1
  220. package/extensions/nostr/package.json +1 -1
  221. package/extensions/open-prose/package.json +1 -1
  222. package/extensions/openai/package.json +1 -1
  223. package/extensions/openai-realtime/package.json +1 -1
  224. package/extensions/openrouter/package.json +1 -1
  225. package/extensions/perplexity-search/package.json +1 -1
  226. package/extensions/searxng-search/package.json +1 -1
  227. package/extensions/signal/package.json +1 -1
  228. package/extensions/slack/package.json +1 -1
  229. package/extensions/synology-chat/package.json +1 -1
  230. package/extensions/telegram/package.json +1 -1
  231. package/extensions/tlon/package.json +1 -1
  232. package/extensions/twitch/CHANGELOG.md +1 -1
  233. package/extensions/twitch/package.json +1 -1
  234. package/extensions/ui-surfaces/package.json +1 -1
  235. package/extensions/voice-call/CHANGELOG.md +1 -1
  236. package/extensions/voice-call/package.json +1 -1
  237. package/extensions/whatsapp/package.json +1 -1
  238. package/extensions/zai/package.json +1 -1
  239. package/extensions/zalo/CHANGELOG.md +1 -1
  240. package/extensions/zalo/package.json +1 -1
  241. package/extensions/zalouser/CHANGELOG.md +1 -1
  242. package/extensions/zalouser/package.json +1 -1
  243. package/package.json +1 -1
  244. package/dist/github-copilot-token-DYYKoDuV.js +0 -106
  245. package/dist/paths-BIDPYPVC.js +0 -233
  246. package/dist/plugin-sdk/agent-turn-execute-W6H2j8kO.js +0 -64
  247. package/dist/plugin-sdk/agent-turn-runner-BTedsvG2.js +0 -11
  248. package/dist/plugin-sdk/audio-preflight-CJ3oP-bs.js +0 -31
  249. package/dist/plugin-sdk/deliver-DaxxC7pS.js +0 -35
  250. package/dist/plugin-sdk/manager-DsV_4p9J.js +0 -16
  251. package/dist/plugin-sdk/markdown-tables-xTvb6uxj.js +0 -9
  252. package/dist/plugin-sdk/provider-dispatcher-BVBAjHBR.js +0 -64
  253. package/dist/plugin-sdk/provider-image-Wa7xYnAo.js +0 -25
  254. package/dist/plugin-sdk/proxy-BFnRHQ1U.js +0 -7
  255. package/dist/plugin-sdk/replies-RqNUByIO.js +0 -27
  256. package/dist/plugin-sdk/reply-prefix-30s91NpV.js +0 -7
  257. package/dist/plugin-sdk/runs-XrgntIht.js +0 -27
  258. package/dist/plugin-sdk/send-8sjelrtn.js +0 -25
  259. package/dist/plugin-sdk/send-BjroMkud.js +0 -24
  260. package/dist/plugin-sdk/send-CwcdQ1wT.js +0 -28
  261. package/dist/plugin-sdk/send-DuyWQ4Q4.js +0 -23
  262. package/dist/plugin-sdk/session-meta-JkAHgftu.js +0 -13
  263. package/dist/plugin-sdk/skill-commands-CZKr2EYZ.js +0 -13
  264. package/dist/plugin-sdk/subagent-registry-28cuPTO-.js +0 -64
  265. package/dist/plugin-sdk/user-run-recording-DIcSd0VJ.js +0 -11
  266. package/dist/subsystem-BZy3aWdW.js +0 -2761
@@ -1,84 +1,84 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as resolveSessionAgentIds, r as resolveAgentConfig, s as resolveAgentSkillsFilter, t as hasConfiguredModelFallbacks, u as resolveEffectiveModelFallbacks } from "./agent-scope-DCgndASv.js";
3
- import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, n as STATE_DIR, o as resolveGatewayPort, r as resolveConfigPath, u as expandHomePrefix } from "./paths-BIDPYPVC.js";
4
- import { C as appendFileLog, F as openBoundaryFileSync, K as isDangerousHostEnvVarName, O as INCLUDE_KEY, P as openBoundaryFile, Q as clampInt, T as normalizeLogLevel, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, dt as sleep$3, et as ensureDir$3, f as logVerbose, ft as sliceUtf16Safe, g as warn, h as shouldLogVerbose, it as normalizeE164, j as isBlockedObjectKey, l as unregisterActiveProgressLine, lt as shortenHomeInString, m as setVerbose, mt as resolvePreferredOpenClawTmpDir, nt as formatTerminalLink, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$1, s as clearActiveProgressLine, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, u as danger, ut as shortenHomePath, v as isRich, y as theme } from "./subsystem-BZy3aWdW.js";
2
+ import { _ as toAgentModelListLike, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentDir, l as resolveDefaultAgentId, n as listAgentIds, p as resolveSessionAgentIds, r as resolveAgentConfig, s as resolveAgentSkillsFilter, t as hasConfiguredModelFallbacks, u as resolveEffectiveModelFallbacks } from "./agent-scope-BKsGMXqc.js";
3
+ import { a as resolveGatewayLockDir, f as resolveRequiredHomeDir, l as resolveStateDir, n as STATE_DIR, o as resolveGatewayPort, r as resolveConfigPath, u as expandHomePrefix } from "./paths-B_gs59ga.js";
4
+ import { C as appendFileLog, F as openBoundaryFileSync, K as isDangerousHostEnvVarName, O as INCLUDE_KEY, P as openBoundaryFile, Q as clampInt, T as normalizeLogLevel, W as normalizeWindowsPathForComparison, Z as CONFIG_DIR, _ as colorize, a as createNonExitingRuntime, b as getChildLogger, c as registerActiveProgressLine, dt as sleep$3, et as ensureDir$3, f as logVerbose, ft as sliceUtf16Safe, g as warn, h as shouldLogVerbose, it as normalizeE164, j as isBlockedObjectKey, l as unregisterActiveProgressLine, lt as shortenHomeInString, m as setVerbose, mt as resolvePreferredOpenClawTmpDir, nt as formatTerminalLink, o as defaultRuntime, pt as truncateUtf16Safe, rt as isRecord$1, s as clearActiveProgressLine, st as resolveUserPath, t as createSubsystemLogger, tt as escapeRegExp, u as danger, ut as shortenHomePath, v as isRich, y as theme } from "./subsystem-BaT-AAVZ.js";
5
5
  import { t as isPlainObject } from "./plain-object-CLm2c5Nu.js";
6
- import { $ as resolveThreadParentSessionKey, A as isValidAgentId, B as DEFAULT_ACCOUNT_ID, C as buildAgentMainSessionKey, F as resolveConfiguredCanonicalIdentity, G as WAKE_GATE_SESSION_KEY_SEGMENT, H as normalizeOptionalAccountId, I as resolveThreadSessionKeys, J as isAcpSessionKey, K as deriveSessionChatType, L as sanitizeAgentId, M as normalizeMainKey, N as resolveAgentIdFromSessionKey, P as resolveCanonicalIdentity, Q as parseAgentSessionKey, R as sessionKeyAgentMatches, T as classifySessionKeyShape, V as normalizeAccountId$3, Y as isCronSessionKey, Z as isSubagentSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, j as normalizeAgentId, k as isKnownAgentMainSessionKey, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, q as getSubagentDepth, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as DEVICE_SENDER_PREFIX, y as DEFAULT_AGENT_ID, z as toAgentStoreSessionKey } from "./workspace-Bj1Jegt-.js";
7
- import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-J4xjy-6D.js";
8
- import { $i as isNonEmptyString, $n as normalizeHyphenSlug, $t as normalizePluginHttpPath, A as requireApiKey, Aa as DEFAULT_MODEL, Ai as splitCommandChain, An as setSessionRuntimeModel, Ar as deliveryContextFromSession, At as normalizePluginsConfig, B as resolveProfilesUnavailableReason, Bi as splitShellArgs, Bn as resolveSessionFilePathOptions, Br as listDeliverableMessageChannels, Bt as normalizeAnyChannelId, C as createOllamaStreamFn, Ca as normalizeSecretInput, Ci as isTrustedSafeBinPath, Cn as updateLastRoute, Cr as listEnabledDiscordAccounts, Ct as isPathWithinRoot, D as buildUsageWithNoCost, Da as resolveSecretInputRef, Di as analyzeShellCommand, Dn as DEFAULT_RESET_TRIGGERS, Dr as resolveChannelGroupRequireMention, Dt as BUNDLED_ENABLED_BY_DEFAULT, E as buildStreamErrorAssistantMessage, Ea as normalizeResolvedSecretInputString, Ei as validateSafeBinArgv, Er as resolveChannelGroupPolicy, Et as loadPluginManifestRegistry, F as resolveAuthProfileOrder, Fi as extractShellWrapperInlineCommand, Fr as INTERNAL_MESSAGE_CHANNEL, Ft as safeStatSync, Gi as isSafeExecutableValue, Gn as resolveGroupSessionKey, Gr as GATEWAY_CLIENT_MODES, Gt as getActivePluginRegistry, Hi as normalizeSafeBinProfileFixtures, Hr as resolveGatewayMessageChannel, Ht as normalizeChatChannelId, I as getSoonestCooldownExpiry, Ii as isDispatchWrapperExecutable, In as SAFE_SESSION_ID_RE, Ir as isDeliverableMessageChannel, J as TELEGRAM_COMMAND_NAME_PATTERN, Ji as resolveSlackNativeStreaming, Jn as normalizeChannelId$1, Jr as acquireSessionWriteLock, Jt as requireActivePluginRegistry, K as writeConfigFile, Ki as mapStreamingModeToSlackLegacyDraftStreamMode, Kn as getChannelPlugin, Kr as GATEWAY_CLIENT_NAMES, Kt as getActivePluginRegistryKey, L as isProfileInCooldown, Li as isShellWrapperExecutable, Ln as SESSION_RUN_STORE_FILE_NAME, Lr as isGatewayMessageChannel, Lt as CHAT_CHANNEL_ORDER, M as resolveEnvApiKey, Mi as matchAllowlist, Mn as parseSessionIndexRecordKey, Mr as mergeDeliveryContext, Mt as resolveMemorySlotDecision, N as resolveModelAuthMode, Ni as resolveAllowlistCandidatePath, Nr as normalizeDeliveryContext, Nt as discoverOpenClawPlugins, O as getApiKeyForModel, Oa as splitTrailingAuthProfile, Oi as buildEnforcedShellCommand, On as mergeSessionEntry, Or as resolveChannelGroupToolsPolicy, Ot as applyTestPluginDefaults, Pi as resolveCommandResolutionFromArgv, Pr as normalizeSessionDeliveryFields, Pt as isPathInside, Q as isInboundPathAllowed, Qi as describeUnknownError$1, Qn as normalizeAtHashSlug, Qt as createPluginRegistry, R as markAuthProfileFailure, Ri as unwrapKnownDispatchWrapperInvocation, Rr as isInternalMessageChannel, Rt as getChatChannelMeta, S as OLLAMA_NATIVE_BASE_URL, Si as getTrustedSafeBinDirs, Sn as refreshConfiguredSessionBindingEntry, Sr as createDiscordActionGate, St as isAvatarHttpUrl, T as buildAssistantMessageWithZeroUsage, Ta as hasConfiguredSecretInput, Ti as normalizeTrustedSafeBinDirs, Tn as updateSessionStoreEntry, Tr as normalizeDiscordToken, Tt as validateJsonSchemaValue, U as loadConfig, Ui as resolveSafeBinProfiles, Un as resolveStorePath, Ur as resolveMessageChannel, Ut as resolveChannelConfigId, V as resolveApiKeyForProfile, Vi as SAFE_BIN_PROFILES, Vn as resolveSessionTranscriptPath, Vr as normalizeMessageChannel, Vt as normalizeChannelId$2, W as readConfigFileSnapshot, Wi as applyMergePatch, Wn as deriveSessionMetaPatch, Wr as GATEWAY_CLIENT_IDS, Wt as getActiveGatewayPluginRegistry, X as resolveTelegramCustomCommands, Xn as listChannelDocks, Xr as CtxProjectionCorruptionError, Xt as addRegisteredPluginApi, Y as normalizeTelegramCommandName, Yi as resolveSlackStreamingMode, Yn as getChannelDock, Yr as resolveSessionLockMaxHoldFromTimeout, Yt as setActivePluginRegistry, Zi as resolveSecretRefValues, Zn as normalizeSignalMessagingTarget, Zr as readTaskWorkStates, Zt as clearRegisteredPluginApis, _a as withFileLock, _i as unsetConfigOverride, _n as loadSessionStore, _r as hasAnyWhatsAppAuth, a as isCliProvider, aa as resolveAgentMaxConcurrent, ai as stringEnum, an as matchPluginCommand, ar as resolveTelegramAccount, at as resolveExecPolicyPreset, ba as readProcessElapsedSeconds, bi as setConfigValueAtPath, bn as readSessionUpdatedAt, br as resolveCliName, bt as AVATAR_MAX_BYTES, c as normalizeProviderId, ca as resolveShellEnvFallbackTimeoutMs, ci as actionRequiresTarget, cn as createConversationReadQuery, d as resolveDefaultModelForAgent, da as dedupeProfileIds, di as listBufferedPluginTaskPasses, dn as requireSessionStorageRuntime, dr as resolveSlackAppToken, ea as isRecord$2, en as buildPluginHealthReport, er as normalizeStringEntries, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fa as listProfilesForProvider, fi as replaceBufferedPluginTaskPasses, fn as closeConfiguredSessionStorageRuntime, fr as resolveSlackBotToken, ga as resolveOpenClawAgentDir, gi as setConfigOverride, gr as normalizeWhatsAppTarget, h as resolveThinkingDefault, ha as resolveAuthStorePathForDisplay, hi as resetConfigOverrides, hn as getConfiguredSessionStorageRuntime, hr as isWhatsAppGroupJid, i as findNormalizedProviderValue, ia as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, ii as optionalStringEnum, in as listPluginCommands, ir as listTelegramAccountIds, it as ASSISTANT_IDENTITY_COLORS, j as resolveApiKeyForProvider, ja as DEFAULT_PROVIDER, ji as DEFAULT_SAFE_BINS, jn as parseDurationMs, jr as deliveryContextKey, jt as resolveEffectiveEnableState, k as getCustomProviderApiKey, ka as DEFAULT_CONTEXT_TOKENS, ki as isWindowsPlatform, kn as resolveFreshSessionTotalTokens, kr as resolveAccountEntry, kt as isBundledChannelEnabledByChannelConfig, l as parseModelRef, la as isTruthyEnvValue, ln as getConversationReadQuery, lr as resolveSlackAccount, m as resolveSubagentSpawnModelSelection, ma as ensureAuthProfileStore, mi as getConfigOverrides, mn as commitPreparedConfiguredSessionStorageRuntimeActivation, mr as resolveSignalAccount, n as buildConfiguredAllowlistKeys, na as secretRefKey, ni as channelTargetSchema, nn as executePluginCommand, nr as createTelegramActionGate, nt as normalizeScpRemoteHost, o as modelKey, oa as VERSION, oi as applyTargetToParams, on as registerPluginCommand, or as resolveTelegramToken, p as resolveReasoningDefault, pa as markAuthProfileGood, pi as RecoveryAdmissionError, pn as closeReplacedConfiguredSessionStorageRuntime, pr as listEnabledSignalAccounts, q as validateConfigObjectWithPlugins, qi as resolveDiscordPreviewStreamMode, qn as listChannelPlugins, qr as normalizeAccountId$4, r as buildModelAliasIndex, ra as runTasksWithConcurrency, ri as channelTargetsSchema, rn as getPluginCommandSpecs, rr as listEnabledTelegramAccounts, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sa as getShellPathFromLoginShell, si as actionHasTarget, sn as StorageReadAccessError, sr as buildChannelAccountBindings, t as buildAllowedModelSet, ta as parseDotPath, tn as clearPluginCommands, tr as normalizeStringEntriesLower, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, ua as resolveOwnerDisplaySetting, ui as discardBufferedPluginTaskPasses, ur as resolveSlackReplyToMode, va as resolveProcessScopedMap, vi as getConfigValueAtPath, vn as loadSessionStoreFromDisk, vr as resolveWhatsAppAccount, w as buildAssistantMessage, wa as coerceSecretRef, wi as listWritableExplicitTrustedSafeBinDirs, wn as updateSessionStore, wr as resolveDiscordAccount, wt as isSupportedLocalAvatarExtension, x as retryAsync, xa as resolveAuthProfileDisplayLabel, xi as unsetConfigValueAtPath, xn as recordSessionMetaFromInbound, xr as resolveIMessageAccount, xt as isAvatarDataUrl, ya as isPidAlive, yi as parseConfigPath, yn as prepareConfiguredSessionStorageRuntimeActivation, yr as formatCliCommand, z as markAuthProfileUsed, zi as unwrapKnownShellMultiplexerInvocation, zn as resolveSessionFilePath, zr as isMarkdownCapableMessageChannel, zt as listChatChannels } from "./model-selection-BHGpQSa9.js";
9
- import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-DYYKoDuV.js";
10
- import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-CghFcfry.js";
6
+ import { $ as resolveThreadParentSessionKey, A as isValidAgentId, B as DEFAULT_ACCOUNT_ID, C as buildAgentMainSessionKey, F as resolveConfiguredCanonicalIdentity, G as WAKE_GATE_SESSION_KEY_SEGMENT, H as normalizeOptionalAccountId, I as resolveThreadSessionKeys, J as isAcpSessionKey, K as deriveSessionChatType, L as sanitizeAgentId, M as normalizeMainKey, N as resolveAgentIdFromSessionKey, P as resolveCanonicalIdentity, Q as parseAgentSessionKey, R as sessionKeyAgentMatches, T as classifySessionKeyShape, V as normalizeAccountId$3, Y as isCronSessionKey, Z as isSubagentSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_HEARTBEAT_FILENAME, j as normalizeAgentId, k as isKnownAgentMainSessionKey, l as ensureAgentWorkspace, m as resolveOpenClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, q as getSubagentDepth, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as DEVICE_SENDER_PREFIX, y as DEFAULT_AGENT_ID, z as toAgentStoreSessionKey } from "./workspace-DK2ZEkpT.js";
7
+ import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-BeXVb5cn.js";
8
+ import { $i as isNonEmptyString, $n as normalizeHyphenSlug, $t as normalizePluginHttpPath, A as requireApiKey, Aa as DEFAULT_MODEL, Ai as splitCommandChain, An as setSessionRuntimeModel, Ar as deliveryContextFromSession, At as normalizePluginsConfig, B as resolveProfilesUnavailableReason, Bi as splitShellArgs, Bn as resolveSessionFilePathOptions, Br as listDeliverableMessageChannels, Bt as normalizeAnyChannelId, C as createOllamaStreamFn, Ca as normalizeSecretInput, Ci as isTrustedSafeBinPath, Cn as updateLastRoute, Cr as listEnabledDiscordAccounts, Ct as isPathWithinRoot, D as buildUsageWithNoCost, Da as resolveSecretInputRef, Di as analyzeShellCommand, Dn as DEFAULT_RESET_TRIGGERS, Dr as resolveChannelGroupRequireMention, Dt as BUNDLED_ENABLED_BY_DEFAULT, E as buildStreamErrorAssistantMessage, Ea as normalizeResolvedSecretInputString, Ei as validateSafeBinArgv, Er as resolveChannelGroupPolicy, Et as loadPluginManifestRegistry, F as resolveAuthProfileOrder, Fi as extractShellWrapperInlineCommand, Fr as INTERNAL_MESSAGE_CHANNEL, Ft as safeStatSync, Gi as isSafeExecutableValue, Gn as resolveGroupSessionKey, Gr as GATEWAY_CLIENT_MODES, Gt as getActivePluginRegistry, Hi as normalizeSafeBinProfileFixtures, Hr as resolveGatewayMessageChannel, Ht as normalizeChatChannelId, I as getSoonestCooldownExpiry, Ii as isDispatchWrapperExecutable, In as SAFE_SESSION_ID_RE, Ir as isDeliverableMessageChannel, J as TELEGRAM_COMMAND_NAME_PATTERN, Ji as resolveSlackNativeStreaming, Jn as normalizeChannelId$1, Jr as acquireSessionWriteLock, Jt as requireActivePluginRegistry, K as writeConfigFile, Ki as mapStreamingModeToSlackLegacyDraftStreamMode, Kn as getChannelPlugin, Kr as GATEWAY_CLIENT_NAMES, Kt as getActivePluginRegistryKey, L as isProfileInCooldown, Li as isShellWrapperExecutable, Ln as SESSION_RUN_STORE_FILE_NAME, Lr as isGatewayMessageChannel, Lt as CHAT_CHANNEL_ORDER, M as resolveEnvApiKey, Mi as matchAllowlist, Mn as parseSessionIndexRecordKey, Mr as mergeDeliveryContext, Mt as resolveMemorySlotDecision, N as resolveModelAuthMode, Ni as resolveAllowlistCandidatePath, Nr as normalizeDeliveryContext, Nt as discoverOpenClawPlugins, O as getApiKeyForModel, Oa as splitTrailingAuthProfile, Oi as buildEnforcedShellCommand, On as mergeSessionEntry, Or as resolveChannelGroupToolsPolicy, Ot as applyTestPluginDefaults, Pi as resolveCommandResolutionFromArgv, Pr as normalizeSessionDeliveryFields, Pt as isPathInside, Q as isInboundPathAllowed, Qi as describeUnknownError$1, Qn as normalizeAtHashSlug, Qt as createPluginRegistry, R as markAuthProfileFailure, Ri as unwrapKnownDispatchWrapperInvocation, Rr as isInternalMessageChannel, Rt as getChatChannelMeta, S as OLLAMA_NATIVE_BASE_URL, Si as getTrustedSafeBinDirs, Sn as refreshConfiguredSessionBindingEntry, Sr as createDiscordActionGate, St as isAvatarHttpUrl, T as buildAssistantMessageWithZeroUsage, Ta as hasConfiguredSecretInput, Ti as normalizeTrustedSafeBinDirs, Tn as updateSessionStoreEntry, Tr as normalizeDiscordToken, Tt as validateJsonSchemaValue, U as loadConfig, Ui as resolveSafeBinProfiles, Un as resolveStorePath, Ur as resolveMessageChannel, Ut as resolveChannelConfigId, V as resolveApiKeyForProfile, Vi as SAFE_BIN_PROFILES, Vn as resolveSessionTranscriptPath, Vr as normalizeMessageChannel, Vt as normalizeChannelId$2, W as readConfigFileSnapshot, Wi as applyMergePatch, Wn as deriveSessionMetaPatch, Wr as GATEWAY_CLIENT_IDS, Wt as getActiveGatewayPluginRegistry, X as resolveTelegramCustomCommands, Xn as listChannelDocks, Xr as CtxProjectionCorruptionError, Xt as addRegisteredPluginApi, Y as normalizeTelegramCommandName, Yi as resolveSlackStreamingMode, Yn as getChannelDock, Yr as resolveSessionLockMaxHoldFromTimeout, Yt as setActivePluginRegistry, Zi as resolveSecretRefValues, Zn as normalizeSignalMessagingTarget, Zr as readTaskWorkStates, Zt as clearRegisteredPluginApis, _a as withFileLock, _i as unsetConfigOverride, _n as loadSessionStore, _r as hasAnyWhatsAppAuth, a as isCliProvider, aa as resolveAgentMaxConcurrent, ai as stringEnum, an as matchPluginCommand, ar as resolveTelegramAccount, at as resolveExecPolicyPreset, ba as readProcessElapsedSeconds, bi as setConfigValueAtPath, bn as readSessionUpdatedAt, br as resolveCliName, bt as AVATAR_MAX_BYTES, c as normalizeProviderId, ca as resolveShellEnvFallbackTimeoutMs, ci as actionRequiresTarget, cn as createConversationReadQuery, d as resolveDefaultModelForAgent, da as dedupeProfileIds, di as listBufferedPluginTaskPasses, dn as requireSessionStorageRuntime, dr as resolveSlackAppToken, ea as isRecord$2, en as buildPluginHealthReport, er as normalizeStringEntries, et as resolveIMessageAttachmentRoots, f as resolveModelRefFromString, fa as listProfilesForProvider, fi as replaceBufferedPluginTaskPasses, fn as closeConfiguredSessionStorageRuntime, fr as resolveSlackBotToken, ga as resolveOpenClawAgentDir, gi as setConfigOverride, gr as normalizeWhatsAppTarget, h as resolveThinkingDefault, ha as resolveAuthStorePathForDisplay, hi as resetConfigOverrides, hn as getConfiguredSessionStorageRuntime, hr as isWhatsAppGroupJid, i as findNormalizedProviderValue, ia as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, ii as optionalStringEnum, in as listPluginCommands, ir as listTelegramAccountIds, it as ASSISTANT_IDENTITY_COLORS, j as resolveApiKeyForProvider, ja as DEFAULT_PROVIDER, ji as DEFAULT_SAFE_BINS, jn as parseDurationMs, jr as deliveryContextKey, jt as resolveEffectiveEnableState, k as getCustomProviderApiKey, ka as DEFAULT_CONTEXT_TOKENS, ki as isWindowsPlatform, kn as resolveFreshSessionTotalTokens, kr as resolveAccountEntry, kt as isBundledChannelEnabledByChannelConfig, l as parseModelRef, la as isTruthyEnvValue, ln as getConversationReadQuery, lr as resolveSlackAccount, m as resolveSubagentSpawnModelSelection, ma as ensureAuthProfileStore, mi as getConfigOverrides, mn as commitPreparedConfiguredSessionStorageRuntimeActivation, mr as resolveSignalAccount, n as buildConfiguredAllowlistKeys, na as secretRefKey, ni as channelTargetSchema, nn as executePluginCommand, nr as createTelegramActionGate, nt as normalizeScpRemoteHost, o as modelKey, oa as VERSION, oi as applyTargetToParams, on as registerPluginCommand, or as resolveTelegramToken, p as resolveReasoningDefault, pa as markAuthProfileGood, pi as RecoveryAdmissionError, pn as closeReplacedConfiguredSessionStorageRuntime, pr as listEnabledSignalAccounts, q as validateConfigObjectWithPlugins, qi as resolveDiscordPreviewStreamMode, qn as listChannelPlugins, qr as normalizeAccountId$4, r as buildModelAliasIndex, ra as runTasksWithConcurrency, ri as channelTargetsSchema, rn as getPluginCommandSpecs, rr as listEnabledTelegramAccounts, rt as parseNonNegativeByteSize, s as normalizeModelRef$2, sa as getShellPathFromLoginShell, si as actionHasTarget, sn as StorageReadAccessError, sr as buildChannelAccountBindings, t as buildAllowedModelSet, ta as parseDotPath, tn as clearPluginCommands, tr as normalizeStringEntriesLower, tt as resolveIMessageRemoteAttachmentRoots, u as resolveConfiguredModelRef, ua as resolveOwnerDisplaySetting, ui as discardBufferedPluginTaskPasses, ur as resolveSlackReplyToMode, va as resolveProcessScopedMap, vi as getConfigValueAtPath, vn as loadSessionStoreFromDisk, vr as resolveWhatsAppAccount, w as buildAssistantMessage, wa as coerceSecretRef, wi as listWritableExplicitTrustedSafeBinDirs, wn as updateSessionStore, wr as resolveDiscordAccount, wt as isSupportedLocalAvatarExtension, x as retryAsync, xa as resolveAuthProfileDisplayLabel, xi as unsetConfigValueAtPath, xn as recordSessionMetaFromInbound, xr as resolveIMessageAccount, xt as isAvatarDataUrl, ya as isPidAlive, yi as parseConfigPath, yn as prepareConfiguredSessionStorageRuntimeActivation, yr as formatCliCommand, z as markAuthProfileUsed, zi as unwrapKnownShellMultiplexerInvocation, zn as resolveSessionFilePath, zr as isMarkdownCapableMessageChannel, zt as listChatChannels } from "./model-selection-CHi8o17y.js";
9
+ import { a as saveJsonFile, i as loadJsonFile, r as resolveCopilotApiToken } from "./github-copilot-token-DHoyZ4I0.js";
10
+ import { n as createInternalHookEvent, o as triggerInternalHook, s as parseBooleanValue$1, t as readManifestNamespace } from "./legacy-names-Ckds5WWe.js";
11
11
  import { n as resolveConversationLabel, r as normalizeChatType } from "./conversation-label-CrORLc0j.js";
12
- import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-bwKTbNlJ.js";
13
- import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-Bf4geLyV.js";
14
- import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-PMai9bNL.js";
15
- import { $ as messageTime, A as resolveChannelResetConfig, At as sanitizeToolCallIdsForCloudCodeAssist, B as openDbSessionManager, Bt as buildPluginTurnIdentity, C as deriveSessionTotalTokens, Ct as guardSessionManager, D as SESSION_RUN_STATUSES, Dt as sanitizeToolUseResultPairing, E as normalizeUsage, Et as sanitizeToolCallInputs, F as resolveAgentMainSessionKey, Ft as getGlobalPluginRegistry, G as sha256, Gt as toJsonValue$1, H as drainPendingPrimaryWrites, Ht as resolveProviderRuntimeIdentity, I as resolveExplicitAgentSessionKey, It as initializeGlobalHookRunner, J as collectInboundUserContext, K as userIdFromSessionKey, L as resolveMainSessionKey, Lt as hasHookForPlugin, M as resolveSessionResetType, Mt as hasInterSessionUserProvenance, N as resolveThreadFlag, Nt as normalizeInputProvenance, O as resolveSessionKey, Ot as stripToolResultDetails, P as canonicalizeMainSessionAlias, Pt as getGlobalHookRunner, Q as isRepresentableEpochMs, R as isPrimarySessionTranscriptFileName, Rt as promptBuildResultToContribution, S as derivePromptTokens, St as isToolResultMessage, T as makeZeroUsageSnapshot, Tt as repairToolUseResultPairing, U as extractLegacyTranscriptEntryFields, Ut as createCurrentUserPromptEnvelope, V as runSerializedBySession, Vt as resolveProviderPromptCacheKey, W as sanitizeJsonb, Wt as mergePromptContributions, X as attachMessageIngress, Y as renderInboundUserContext, Z as getMessageIngress, _ as inferLegacyName, _t as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, a as resolveMirroredTranscriptText, at as DB_SESSION_HYDRATION_LIMIT, b as resolveDefaultCronStaggerMs, bt as estimateMessageCharsCached, c as createSessionStorageRuntimeFromConfig, ct as HIDDEN_HEARTBEAT_CUSTOM_TYPE, d as TASK_RUN_MODES, dt as sessionLikelyHasOversizedToolResults, et as stripMessageCarriers, f as TASK_RUN_STATUSES, ft as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, g as sanitizeAppendEntry, gt as CHARS_PER_TOKEN_ESTIMATE$2, h as deriveLegacyActorIdentity, ht as truncateToolResultToChars, i as appendAssistantMessageToSessionTranscript, it as resolveSenderLabel, j as resolveSessionResetPolicy, jt as INPUT_PROVENANCE_KIND_VALUES, k as evaluateSessionFreshness, kt as canonicalToolCallIdBase, l as resolveSessionStorageConfig, lt as capToolResultContent, m as CREATE_CTX_STORAGE_OWNER_SQL, mt as truncateTextHeadTail, n as parseSessionThreadInfo, nt as formatZonedTimestamp, o as parseInlineDirectives$1, ot as eventOrder, p as buildEqualityProjection, pt as TOOL_RESULT_TEXT_WEIGHT, q as buildInboundMetaSystemPrompt, r as resolveAndPersistSessionFile, rt as resolveTimezone, s as attachPgPoolErrorListeners, st as pickLeaf, t as extractDeliveryInfo, tt as formatMessageStamp, u as validateCtxStorage, ut as HARD_MAX_TOOL_RESULT_CHARS, v as normalizeHttpWebhookUrl, vt as createMessageCharEstimateCache, w as hasNonzeroUsage, wt as openRawToolResultStash, x as parseAbsoluteTimeMs, xt as getToolResultText$1, y as normalizeCronStaggerMs, yt as estimateContextChars$1, z as isSessionArchiveArtifactName, zt as buildPluginRuntimeIdentity } from "./sessions-DF9biCmh.js";
12
+ import { a as createSlackWebClient, c as validateSlackBlocksArray, d as resolveSlackChannelId, i as normalizeSlackOutboundText, l as buildSlackBlocksFallbackText, o as resolveSlackWebClientOptions, s as parseSlackBlocksInput, t as sendMessageSlack, u as parseSlackTarget } from "./send-odd2G3DX.js";
13
+ import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as isDiscordGroupAllowedByPolicy, d as parseDiscordModalCustomId, dt as resolveDiscordAllowListMatch, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordChannelConfigWithFallback, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordOwnerAccess, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as normalizeDiscordAllowList, m as resolveDiscordComponentEntry, mt as resolveDiscordMemberAccessState, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordGuildEntry, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordSlug, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-D2WSE41A.js";
14
+ import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-CXBau-U0.js";
15
+ import { $ as messageTime, A as resolveChannelResetConfig, At as sanitizeToolCallIdsForCloudCodeAssist, B as openDbSessionManager, Bt as buildPluginTurnIdentity, C as deriveSessionTotalTokens, Ct as guardSessionManager, D as SESSION_RUN_STATUSES, Dt as sanitizeToolUseResultPairing, E as normalizeUsage, Et as sanitizeToolCallInputs, F as resolveAgentMainSessionKey, Ft as getGlobalPluginRegistry, G as sha256, Gt as toJsonValue$1, H as drainPendingPrimaryWrites, Ht as resolveProviderRuntimeIdentity, I as resolveExplicitAgentSessionKey, It as initializeGlobalHookRunner, J as collectInboundUserContext, K as userIdFromSessionKey, L as resolveMainSessionKey, Lt as hasHookForPlugin, M as resolveSessionResetType, Mt as hasInterSessionUserProvenance, N as resolveThreadFlag, Nt as normalizeInputProvenance, O as resolveSessionKey, Ot as stripToolResultDetails, P as canonicalizeMainSessionAlias, Pt as getGlobalHookRunner, Q as isRepresentableEpochMs, R as isPrimarySessionTranscriptFileName, Rt as promptBuildResultToContribution, S as derivePromptTokens, St as isToolResultMessage, T as makeZeroUsageSnapshot, Tt as repairToolUseResultPairing, U as extractLegacyTranscriptEntryFields, Ut as createCurrentUserPromptEnvelope, V as runSerializedBySession, Vt as resolveProviderPromptCacheKey, W as sanitizeJsonb, Wt as mergePromptContributions, X as attachMessageIngress, Y as renderInboundUserContext, Z as getMessageIngress, _ as inferLegacyName, _t as TOOL_RESULT_CHARS_PER_TOKEN_ESTIMATE, a as resolveMirroredTranscriptText, at as DB_SESSION_HYDRATION_LIMIT, b as resolveDefaultCronStaggerMs, bt as estimateMessageCharsCached, c as createSessionStorageRuntimeFromConfig, ct as HIDDEN_HEARTBEAT_CUSTOM_TYPE, d as TASK_RUN_MODES, dt as sessionLikelyHasOversizedToolResults, et as stripMessageCarriers, f as TASK_RUN_STATUSES, ft as PREEMPTIVE_TOOL_RESULT_COMPACTION_PLACEHOLDER, g as sanitizeAppendEntry, gt as CHARS_PER_TOKEN_ESTIMATE$2, h as deriveLegacyActorIdentity, ht as truncateToolResultToChars, i as appendAssistantMessageToSessionTranscript, it as resolveSenderLabel, j as resolveSessionResetPolicy, jt as INPUT_PROVENANCE_KIND_VALUES, k as evaluateSessionFreshness, kt as canonicalToolCallIdBase, l as resolveSessionStorageConfig, lt as capToolResultContent, m as CREATE_CTX_STORAGE_OWNER_SQL, mt as truncateTextHeadTail, n as parseSessionThreadInfo, nt as formatZonedTimestamp, o as parseInlineDirectives$1, ot as eventOrder, p as buildEqualityProjection, pt as TOOL_RESULT_TEXT_WEIGHT, q as buildInboundMetaSystemPrompt, r as resolveAndPersistSessionFile, rt as resolveTimezone, s as attachPgPoolErrorListeners, st as pickLeaf, t as extractDeliveryInfo, tt as formatMessageStamp, u as validateCtxStorage, ut as HARD_MAX_TOOL_RESULT_CHARS, v as normalizeHttpWebhookUrl, vt as createMessageCharEstimateCache, w as hasNonzeroUsage, wt as openRawToolResultStash, x as parseAbsoluteTimeMs, xt as getToolResultText$1, y as normalizeCronStaggerMs, yt as estimateContextChars$1, z as isSessionArchiveArtifactName, zt as buildPluginRuntimeIdentity } from "./sessions-DC7A0bw-.js";
16
16
  import { n as isDiagnosticsEnabled, t as emitDiagnosticEvent } from "./diagnostic-events-DGRcTqIH.js";
17
17
  import { n as onSessionTranscriptUpdate } from "./transcript-events-C9cNWasT.js";
18
18
  import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-BEYczWtd.js";
19
- import { A as boundDiagnosticContent, C as logWebhookError, D as refreshRunProgress, E as recordSystemPromptHashComparison, M as resetCommandPollCount, O as startDiagnosticHeartbeat, S as logToolExecutionStarted, T as logWebhookReceived, b as logToolExecutionBlocked, d as logRunCompleted, f as logRunStarted, j as recordCommandPoll, k as stopDiagnosticHeartbeat, l as logModelCallError, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, w as logWebhookProcessed, x as logToolExecutionCompleted } from "./diagnostic-N82VS3Qp.js";
19
+ import { A as boundDiagnosticContent, C as logWebhookError, D as refreshRunProgress, E as recordSystemPromptHashComparison, M as resetCommandPollCount, O as startDiagnosticHeartbeat, S as logToolExecutionStarted, T as logWebhookReceived, b as logToolExecutionBlocked, d as logRunCompleted, f as logRunStarted, j as recordCommandPoll, k as stopDiagnosticHeartbeat, l as logModelCallError, o as logMessageProcessed, p as logSessionStateChange, s as logMessageQueued, w as logWebhookProcessed, x as logToolExecutionCompleted } from "./diagnostic-Dn_o8RGN.js";
20
20
  import { r as getDiagnosticSessionState, s as redactChannelCorrelation } from "./diagnostic-session-state-Bnyx-w0F.js";
21
21
  import { t as redactIdentifier } from "./redact-identifier-WYElxwAZ.js";
22
- import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-DpE5Tg36.js";
22
+ import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-CKI6SufO.js";
23
23
  import { t as CommandLane } from "./lanes-DTaUAkeG.js";
24
- import { a as getCommandLaneSnapshots, c as isQueuedCommandCancellation, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isGatewayDraining, t as CommandLaneAbortedError } from "./command-queue-BIc3C-hI.js";
25
- import { $ as resolveTelegramReplyId, A as resolveTelegramFetch, B as buildTelegramGroupPeerId, C as getTelegramFleetSupervisor, D as recordWebhook, E as recordUpdate, F as resolveCronStorePath, G as expandTextLinks, H as buildTelegramThreadParams, I as buildGroupLabel, J as normalizeForwardedContext, K as extractTelegramLocation, L as buildSenderLabel, M as formatTelegramErrorMessage, N as withTelegramApiErrorLogging, O as registerAccount, P as loadCronStore, Q as resolveTelegramMediaPlaceholder, R as buildSenderName, S as fingerprintTelegramToken, St as resolveTelegramTargetChatType, T as recordState, U as buildTypingThreadParams, V as buildTelegramParentPeer, W as describeReplyTarget, X as resolveTelegramForumThreadId, Y as resolveTelegramDirectPeerId, Z as resolveTelegramGroupAllowFromContext, _ as isTelegramEditMayHaveLandedError, _t as writeJsonFileAtomically, a as reactMessageTelegram, at as resolveSenderAllowMatch$1, b as renderTelegramHtmlText, bt as isVoiceCompatibleAudio, c as sendStickerTelegram, ct as mergeDmAllowFromSources, d as wasSentByBot, dt as toLocationContext, et as resolveTelegramStreamMode, f as extractTelegramErrorText, ft as addChannelAllowFromStoreEntry, g as isTelegramClientRejection, gt as readJsonFileWithFallback, h as isSafeToRetrySendError, ht as upsertChannelPairingRequest, i as editMessageTelegram, it as normalizeDmAllowFromWithStore$1, j as splitTelegramCaption, k as releaseAccountOwner, lt as resolveGroupAllowFromSources, m as isRecoverableTelegramNetworkError, mt as removeChannelAllowFromStoreEntry, n as createForumTopicTelegram, nt as isSenderAllowed$1, o as sendMessageTelegram, ot as firstDefined$1, p as isDefiniteTelegramRequestNonDeliveryError, pt as readChannelAllowFromStore, q as hasBotMention, r as deleteMessageTelegram, rt as normalizeAllowFrom$2, s as sendPollTelegram, st as isSenderIdAllowed, t as buildInlineKeyboard, tt as resolveTelegramThreadSpec, u as resolveTelegramVoiceSend, ut as formatLocationText, v as markdownToTelegramChunks, vt as getPairingAdapter, w as recordApiRequest, x as wrapFileReferencesInHtml, xt as parseTelegramTarget, y as markdownToTelegramHtml, yt as listPairingChannels, z as buildTelegramGroupFrom } from "./send-BXHsjIHr.js";
26
- import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-C-5VgbLB.js";
27
- import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BaH_6win.js";
28
- import { $ as buildPluginToolGroups, A as isLikelyContextOverflowError, B as resolveSandboxContext, C as isAuthAssistantError, D as isContextOverflowError, E as isCompactionFailureError, F as parseImageSizeError, G as resolveProfile, H as createBrowserRouteContext, I as sanitizeUserFacingText, J as resolveBrowserControlAuth, K as getBridgeAuthForPort, L as isAuthPermanentErrorMessage, M as isRawApiErrorPayload, N as isTransientHttpError, O as isFailoverAssistantError, P as parseImageDimensionError, Q as applyOwnerOnlyToolPolicy, R as isTimeoutErrorMessage, S as getApiErrorPayloadFingerprint, T as isCloudCodeAssistFormatError, U as registerBrowserRoutes, V as resolveSandboxRuntimeStatus, W as resolveBrowserConfig, X as trimToUndefined$1, Y as resolveGatewayCredentialsFromConfig, Z as resolveSandboxConfigForAgent, _ as BILLING_ERROR_USER_MESSAGE, at as normalizeToolName, b as formatBillingErrorMessage, c as sanitizeSessionMessagesImages, ct as matchesAnyGlobPattern, d as resolveImageSanitizationLimits, dt as resolveBootstrapTotalMaxChars, et as collectExplicitAllowlist, f as canonicalizeBase64, ft as sanitizeGoogleTurnOrdering, g as isGoogleModelApi, h as downgradeOpenAIReasoningBlocks, i as pickFallbackThinkingLevel, it as expandToolGroups, j as isRateLimitAssistantError, k as isFailoverErrorMessage, l as sanitizeImageBlocks, lt as buildBootstrapContextFiles, m as downgradeOpenAIFunctionCallReasoningPairs, n as validateAnthropicTurns, nt as mergeAlsoAllowPolicy, o as isMessagingToolDuplicateNormalized, ot as resolveToolProfilePolicy, p as estimateBase64DecodedBytes, q as ensureBrowserControlAuth, r as validateGeminiTurns, rt as stripPluginOnlyAllowlist, s as normalizeTextForComparison, st as compileGlobPatterns, t as extractTextFromChatContent, tt as expandPolicyWithPluginGroups, u as sanitizeToolResultImages, ut as resolveBootstrapMaxChars, v as classifyFailoverReason, w as isBillingAssistantError, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as ensureSandboxWorkspaceForSession } from "./chat-content-1fhcKTem.js";
29
- import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, V as resolveClientIp, W as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-DIGxu4IF.js";
30
- import { a as skillsSnapshotSourceDiffers, c as assertMediaNotDataUrl, f as resolveSandboxedMediaSource, i as resolveSkillsPromptForRun, l as assertSandboxPath, m as applySkillEnvOverridesFromSnapshot, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverrides, r as loadWorkspaceSkillEntries, u as resolveSandboxInputPath } from "./skills-VN1CJK6W.js";
31
- import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-E9ntDORB.js";
32
- import { a as formatUncaughtError, c as readErrorName, i as formatErrorMessage, o as hasErrnoCode, r as formatErrorChainMessage, t as collectErrorGraphCandidates } from "./errors-COs_vQr3.js";
33
- import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-BK5ALzKD.js";
34
- import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-BxR4m86L.js";
35
- import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-HgGweM4u.js";
24
+ import { a as getCommandLaneSnapshots, c as isQueuedCommandCancellation, i as enqueueCommandInLane, n as clearCommandLane, o as getQueueSize, s as isGatewayDraining, t as CommandLaneAbortedError } from "./command-queue-BOMFLCHM.js";
25
+ import { $ as resolveTelegramReplyId, A as resolveTelegramFetch, B as buildTelegramGroupPeerId, C as getTelegramFleetSupervisor, D as recordWebhook, E as recordUpdate, F as resolveCronStorePath, G as expandTextLinks, H as buildTelegramThreadParams, I as buildGroupLabel, J as normalizeForwardedContext, K as extractTelegramLocation, L as buildSenderLabel, M as formatTelegramErrorMessage, N as withTelegramApiErrorLogging, O as registerAccount, P as loadCronStore, Q as resolveTelegramMediaPlaceholder, R as buildSenderName, S as fingerprintTelegramToken, St as resolveTelegramTargetChatType, T as recordState, U as buildTypingThreadParams, V as buildTelegramParentPeer, W as describeReplyTarget, X as resolveTelegramForumThreadId, Y as resolveTelegramDirectPeerId, Z as resolveTelegramGroupAllowFromContext, _ as isTelegramEditMayHaveLandedError, _t as writeJsonFileAtomically, a as reactMessageTelegram, at as resolveSenderAllowMatch$1, b as renderTelegramHtmlText, bt as isVoiceCompatibleAudio, c as sendStickerTelegram, ct as mergeDmAllowFromSources, d as wasSentByBot, dt as toLocationContext, et as resolveTelegramStreamMode, f as extractTelegramErrorText, ft as addChannelAllowFromStoreEntry, g as isTelegramClientRejection, gt as readJsonFileWithFallback, h as isSafeToRetrySendError, ht as upsertChannelPairingRequest, i as editMessageTelegram, it as normalizeDmAllowFromWithStore$1, j as splitTelegramCaption, k as releaseAccountOwner, lt as resolveGroupAllowFromSources, m as isRecoverableTelegramNetworkError, mt as removeChannelAllowFromStoreEntry, n as createForumTopicTelegram, nt as isSenderAllowed$1, o as sendMessageTelegram, ot as firstDefined$1, p as isDefiniteTelegramRequestNonDeliveryError, pt as readChannelAllowFromStore, q as hasBotMention, r as deleteMessageTelegram, rt as normalizeAllowFrom$2, s as sendPollTelegram, st as isSenderIdAllowed, t as buildInlineKeyboard, tt as resolveTelegramThreadSpec, u as resolveTelegramVoiceSend, ut as formatLocationText, v as markdownToTelegramChunks, vt as getPairingAdapter, w as recordApiRequest, x as wrapFileReferencesInHtml, xt as parseTelegramTarget, y as markdownToTelegramHtml, yt as listPairingChannels, z as buildTelegramGroupFrom } from "./send-2aTk7PU-.js";
26
+ import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-BuzZGoUm.js";
27
+ import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CYfRyzsD.js";
28
+ import { $ as buildPluginToolGroups, A as isLikelyContextOverflowError, B as resolveSandboxContext, C as isAuthAssistantError, D as isContextOverflowError, E as isCompactionFailureError, F as parseImageSizeError, G as resolveProfile, H as createBrowserRouteContext, I as sanitizeUserFacingText, J as resolveBrowserControlAuth, K as getBridgeAuthForPort, L as isAuthPermanentErrorMessage, M as isRawApiErrorPayload, N as isTransientHttpError, O as isFailoverAssistantError, P as parseImageDimensionError, Q as applyOwnerOnlyToolPolicy, R as isTimeoutErrorMessage, S as getApiErrorPayloadFingerprint, T as isCloudCodeAssistFormatError, U as registerBrowserRoutes, V as resolveSandboxRuntimeStatus, W as resolveBrowserConfig, X as trimToUndefined$1, Y as resolveGatewayCredentialsFromConfig, Z as resolveSandboxConfigForAgent, _ as BILLING_ERROR_USER_MESSAGE, at as normalizeToolName, b as formatBillingErrorMessage, c as sanitizeSessionMessagesImages, ct as matchesAnyGlobPattern, d as resolveImageSanitizationLimits, dt as resolveBootstrapTotalMaxChars, et as collectExplicitAllowlist, f as canonicalizeBase64, ft as sanitizeGoogleTurnOrdering, g as isGoogleModelApi, h as downgradeOpenAIReasoningBlocks, i as pickFallbackThinkingLevel, it as expandToolGroups, j as isRateLimitAssistantError, k as isFailoverErrorMessage, l as sanitizeImageBlocks, lt as buildBootstrapContextFiles, m as downgradeOpenAIFunctionCallReasoningPairs, n as validateAnthropicTurns, nt as mergeAlsoAllowPolicy, o as isMessagingToolDuplicateNormalized, ot as resolveToolProfilePolicy, p as estimateBase64DecodedBytes, q as ensureBrowserControlAuth, r as validateGeminiTurns, rt as stripPluginOnlyAllowlist, s as normalizeTextForComparison, st as compileGlobPatterns, t as extractTextFromChatContent, tt as expandPolicyWithPluginGroups, u as sanitizeToolResultImages, ut as resolveBootstrapMaxChars, v as classifyFailoverReason, w as isBillingAssistantError, x as formatRawAssistantErrorForUi, y as formatAssistantErrorText, z as ensureSandboxWorkspaceForSession } from "./chat-content-BWkiC3u3.js";
29
+ import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, V as resolveClientIp, W as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-Dzgbe0zH.js";
30
+ import { a as skillsSnapshotSourceDiffers, c as assertMediaNotDataUrl, f as resolveSandboxedMediaSource, i as resolveSkillsPromptForRun, l as assertSandboxPath, m as applySkillEnvOverridesFromSnapshot, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverrides, r as loadWorkspaceSkillEntries, u as resolveSandboxInputPath } from "./skills-BXMjgvRl.js";
31
+ import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-BgOxr6f8.js";
32
+ import { a as formatUncaughtError, c as readErrorName, i as formatErrorMessage, o as hasErrnoCode, r as formatErrorChainMessage, t as collectErrorGraphCandidates } from "./errors-1FTZDNVR.js";
33
+ import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-IYMDplSg.js";
34
+ import { a as isBlockedHostnameOrIp, l as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-DAf-b2bM.js";
35
+ import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-BVdeIl7N.js";
36
36
  import { t as resolveNetworkSsrFPolicy } from "./ssrf-config-Cj-XaaTu.js";
37
37
  import { n as readJsonFile, r as writeJsonAtomic, t as createAsyncLock } from "./json-files-DBtcstGX.js";
38
38
  import { a as normalizeReasoningLevel, c as normalizeVerboseLevel, i as normalizeElevatedLevel, l as resolveResponseUsageMode, n as formatXHighModelHint, o as normalizeThinkLevel, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking } from "./thinking-CcoiS9V4.js";
39
- import { t as ensureOpenClawModelsJson } from "./models-config-CJUMccZW.js";
40
- import { C as loadModelCatalog, S as findModelInCatalog, _ as stripCarriedTranscriptFromBody, a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as modelSupportsVision, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-Ct0kBrps.js";
41
- import { a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, g as isInsideCode, h as findCodeRegions, l as stripDowngradedToolCallText, m as stripReasoningTagsFromText, n as extractAssistantThinking, o as inferToolMetaFromArgs, p as resolveToolDisplay, s as isAssistantMessage, t as extractAssistantText$1, u as stripMinimaxToolCallXml } from "./pi-embedded-utils-j-G6as7X.js";
42
- import { a as coerceImageModelConfig, i as coerceImageAssistantText, o as decodeDataUrl, r as minimaxUnderstandImage, s as resolveProviderVisionModelFromConfig } from "./provider-image-CFq0C_z0.js";
43
- import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-B1ohBh6A.js";
39
+ import { t as ensureOpenClawModelsJson } from "./models-config-CAlyknIh.js";
40
+ import { C as loadModelCatalog, S as findModelInCatalog, _ as stripCarriedTranscriptFromBody, a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, i as normalizeMediaAttachments, l as resolveConcurrency, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as buildRandomTempFilePath, w as modelSupportsVision, x as resolveAttachmentKind, y as registerUnhandledRejectionHandler } from "./audio-transcription-runner-BK3cV_ad.js";
41
+ import { a as formatReasoningMessage, d as stripThinkingTagsFromText, f as formatToolSummary, g as isInsideCode, h as findCodeRegions, l as stripDowngradedToolCallText, m as stripReasoningTagsFromText, n as extractAssistantThinking, o as inferToolMetaFromArgs, p as resolveToolDisplay, s as isAssistantMessage, t as extractAssistantText$1, u as stripMinimaxToolCallXml } from "./pi-embedded-utils-BGvDJMAA.js";
42
+ import { a as coerceImageModelConfig, i as coerceImageAssistantText, o as decodeDataUrl, r as minimaxUnderstandImage, s as resolveProviderVisionModelFromConfig } from "./provider-image-CNBkTbhu.js";
43
+ import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-CnDdghbc.js";
44
44
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Dyj5Y_Ss.js";
45
- import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-BXzVwvnJ.js";
46
- import { r as makeProxyFetch } from "./proxy-fetch-g109vqdt.js";
47
- import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-C-DjHvQK.js";
45
+ import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-B6BYdjiQ.js";
46
+ import { r as makeProxyFetch } from "./proxy-fetch-M3YAp_Kv.js";
47
+ import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-DS2s69iC.js";
48
48
  import { n as isSafeFenceBreak, r as parseFenceSpans, t as findFenceSpanAt } from "./fences-RrqZTgHp.js";
49
- import { a as chunkText, c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as resolveChunkNewlinePacking } from "./chunk-CEygNI3g.js";
50
- import { n as resolveMarkdownTableMode } from "./markdown-tables-DfLMw9ti.js";
51
- import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-DioI2VyB.js";
52
- import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-Cof4HjvY.js";
53
- import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-B1HujJiT.js";
54
- import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-Clg9Kbqu.js";
55
- import { a as clearDelayedReleaseHold, c as mergeDelayedAgentTurn, d as WORKSPACE_LANE_DENIED_REASON, f as KeyedAsyncQueue, i as agentTurnIdempotencyKey, l as peekDelayedAgentTurn, n as getAgentTurnRuntime, o as enqueueAgentTurn, r as tryGetAgentTurnRuntime, s as isClaimableAgentTurnWorkId, u as setDelayedReleaseHold } from "./agent-turn-runner-CEjdyv-R.js";
56
- import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-CAOvM2sb.js";
57
- import { _ as endModelCall, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as createInlineCodeState, h as buildCodeSpanIndex, i as endInFlightEmbeddedAttempt, l as setActiveEmbeddedRun, m as emitEmbeddedAgentEvent, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, v as clearAgentRunContext, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-Ot6reoKK.js";
58
- import { a as toInternalMessageReceivedContext, c as toPluginMessageReceivedEvent, d as resolveOutboundSessionId, i as toInternalMessagePreprocessedContext, l as fireAndForgetHook, n as createMessageSentEmitter, o as toInternalMessageTranscribedContext, r as deriveInboundMessageHookContext, s as toPluginMessageContext, t as applyMessageSendingHook, u as buildOutboundSessionContext } from "./outbound-message-hooks-7ErHCBLv.js";
59
- import { A as createReplyToModeFilterForChannel, C as applyReplyTagsToPayload, D as isRenderablePayload, E as filterMessagingToolMediaDuplicates, M as buildTargetResolverSignature, N as normalizeChannelTargetInput, O as shouldSuppressMessagingToolReplies, P as normalizeTargetForProvider, S as transcriptEntriesToMessages, T as filterMessagingToolDuplicates, _ as resolveContextTokensForModel, a as normalizeOutboundPayloadsForJson, c as loadCombinedSessionStoreForGateway, d as throwIfAborted, f as loadChannelOutboundAdapter, g as lookupContextTokens, h as stripLeadingInboundMetadata, i as normalizeOutboundPayloads, j as resolveReplyToMode, k as shouldSuppressReasoningPayload, l as capArrayByJsonBytes, m as extractToolCallNames, o as normalizeReplyPayloadsForDelivery, p as countToolResults, r as formatOutboundPayloadLog, s as stampReplyActivity, t as deliverOutboundPayloads, u as jsonUtf8Bytes, v as computeBackoff, w as applyReplyThreading, x as readFullTranscriptEntriesFromBackend, y as sleepWithAbort } from "./deliver-DrYdFhBN.js";
49
+ import { a as chunkText, c as resolveChunkDelivery, d as resolveTextChunkLimit, i as chunkMarkdownTextWithMode, l as resolveChunkMode, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as resolveChunkNewlinePacking } from "./chunk-Bvf22vTh.js";
50
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-WuCFdPlC.js";
51
+ import { a as loadWebMedia, i as getDefaultLocalRoots, o as loadWebMediaRaw } from "./ir-CBsM7qoP.js";
52
+ import { _ as isNativeCommandsExplicitlyDisabled, a as listChatCommands, b as resolveNativeSkillsEnabled, c as listNativeCommandSpecsForConfig, d as parseCommandArgs, f as resolveCommandArgChoices, g as isCommandFlagEnabled, h as shouldHandleTextCommands, i as isCommandEnabled, l as maybeResolveTextAlias, m as serializeCommandArgs, o as listChatCommandsForConfig, p as resolveCommandArgMenu, r as findCommandByNativeName, s as listNativeCommandSpecs, t as buildCommandTextFromArgs, u as normalizeCommandBody, v as isRestartEnabled, y as resolveNativeCommandsEnabled } from "./commands-registry-Da3c0MbL.js";
53
+ import { i as AGENT_LANE_SUBAGENT, r as AGENT_LANE_NESTED, t as startUserSessionRun } from "./user-run-recording-8MZq1Us4.js";
54
+ import { a as getGatewayInstanceId, n as deriveSessionRunId, o as resolveSessionRunStore, r as inferSessionRunKind, t as createSessionRunRecorder } from "./recorder-B08vNxya.js";
55
+ import { a as clearDelayedReleaseHold, c as mergeDelayedAgentTurn, d as WORKSPACE_LANE_DENIED_REASON, f as KeyedAsyncQueue, i as agentTurnIdempotencyKey, l as peekDelayedAgentTurn, n as getAgentTurnRuntime, o as enqueueAgentTurn, r as tryGetAgentTurnRuntime, s as isClaimableAgentTurnWorkId, u as setDelayedReleaseHold } from "./agent-turn-runner-LKV3FMwQ.js";
56
+ import { c as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-DdVSQNce.js";
57
+ import { _ as endModelCall, a as isEmbeddedPiRunActive, b as onAgentEvent, d as handleMessageEnd, f as handleMessageStart, g as createInlineCodeState, h as buildCodeSpanIndex, i as endInFlightEmbeddedAttempt, l as setActiveEmbeddedRun, m as emitEmbeddedAgentEvent, n as beginInFlightEmbeddedAttempt, o as isEmbeddedPiRunStreaming, p as handleMessageUpdate, r as clearActiveEmbeddedRun, s as queueEmbeddedPiMessage, t as abortEmbeddedPiRun, u as waitForEmbeddedPiRunEnd, v as clearAgentRunContext, x as registerAgentRunContext, y as emitAgentEvent } from "./runs-DFvW_PVw.js";
58
+ import { a as toInternalMessageReceivedContext, c as toPluginMessageReceivedEvent, d as resolveOutboundSessionId, i as toInternalMessagePreprocessedContext, l as fireAndForgetHook, n as createMessageSentEmitter, o as toInternalMessageTranscribedContext, r as deriveInboundMessageHookContext, s as toPluginMessageContext, t as applyMessageSendingHook, u as buildOutboundSessionContext } from "./outbound-message-hooks-jUzcd2OQ.js";
59
+ import { A as createReplyToModeFilterForChannel, C as applyReplyTagsToPayload, D as isRenderablePayload, E as filterMessagingToolMediaDuplicates, M as buildTargetResolverSignature, N as normalizeChannelTargetInput, O as shouldSuppressMessagingToolReplies, P as normalizeTargetForProvider, S as transcriptEntriesToMessages, T as filterMessagingToolDuplicates, _ as resolveContextTokensForModel, a as normalizeOutboundPayloadsForJson, c as loadCombinedSessionStoreForGateway, d as throwIfAborted, f as loadChannelOutboundAdapter, g as lookupContextTokens, h as stripLeadingInboundMetadata, i as normalizeOutboundPayloads, j as resolveReplyToMode, k as shouldSuppressReasoningPayload, l as capArrayByJsonBytes, m as extractToolCallNames, o as normalizeReplyPayloadsForDelivery, p as countToolResults, r as formatOutboundPayloadLog, s as stampReplyActivity, t as deliverOutboundPayloads, u as jsonUtf8Bytes, v as computeBackoff, w as applyReplyThreading, x as readFullTranscriptEntriesFromBackend, y as sleepWithAbort } from "./deliver-CJjQbaJE.js";
60
60
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-CYjjc71l.js";
61
61
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-BVyUaG_D.js";
62
- import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-Kn1_ykXE.js";
62
+ import { a as createDiscordRetryRunner, i as normalizePollInput, n as recordChannelActivity, t as getChannelActivity } from "./channel-activity-BAxUpg5h.js";
63
63
  import { t as buildOutboundMediaLoadOptions } from "./load-options-CkQ1z00p.js";
64
- import { t as convertMarkdownTables } from "./tables-DkwNUhx1.js";
65
- import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-BIh2AkNd.js";
66
- import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-CsDSBjFo.js";
67
- import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-DQvfLvpJ.js";
68
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-DKZiteo6.js";
69
- import { t as createTelegramPollingTransport } from "./proxy-CrSpy5Aw.js";
70
- import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-Cty02S3t.js";
71
- import { t as recordInboundSessionMetaSafe } from "./session-meta-5XI6vLtM.js";
72
- import { n as resolveMemorySearchConfig } from "./manager-D728Thsn.js";
73
- import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-B_2rETEo.js";
64
+ import { t as convertMarkdownTables } from "./tables-yHwb0GsI.js";
65
+ import { n as splitMediaFromOutput, t as parseReplyDirectives } from "./reply-directives-DkfwzHl4.js";
66
+ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-mILKKt54.js";
67
+ import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-yIxOvEiz.js";
68
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-DxuZn3_M.js";
69
+ import { t as createTelegramPollingTransport } from "./proxy-Ds4gxPy8.js";
70
+ import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-BHkXhmOj.js";
71
+ import { t as recordInboundSessionMetaSafe } from "./session-meta-B8B6RwSE.js";
72
+ import { n as resolveMemorySearchConfig } from "./manager-BujYLKny.js";
73
+ import { m as normalizeExtraMemoryPaths, p as listMemoryFiles } from "./query-expansion-BT5lS0um.js";
74
74
  import { createRequire } from "node:module";
75
75
  import * as path$1 from "node:path";
76
76
  import path, { basename, isAbsolute, join } from "node:path";
77
- import fs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
77
+ import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, realpathSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
78
78
  import os, { homedir } from "node:os";
79
79
  import JSON5 from "json5";
80
- import * as fs$2 from "node:fs/promises";
81
- import fs$1, { open } from "node:fs/promises";
80
+ import * as fs$1 from "node:fs/promises";
81
+ import fs, { open } from "node:fs/promises";
82
82
  import { inspect, isDeepStrictEqual, promisify } from "node:util";
83
83
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
84
84
  import { fileURLToPath } from "node:url";
@@ -3257,7 +3257,7 @@ function setPromptSourceCacheEntry(key, entry) {
3257
3257
  }
3258
3258
  function readOpenFileUtf8(fd) {
3259
3259
  return new Promise((resolve, reject) => {
3260
- fs.readFile(fd, "utf-8", (error, data) => {
3260
+ syncFs.readFile(fd, "utf-8", (error, data) => {
3261
3261
  if (error) {
3262
3262
  reject(error);
3263
3263
  return;
@@ -3268,7 +3268,7 @@ function readOpenFileUtf8(fd) {
3268
3268
  }
3269
3269
  function closeOpenFile(fd) {
3270
3270
  return new Promise((resolve, reject) => {
3271
- fs.close(fd, (error) => {
3271
+ syncFs.close(fd, (error) => {
3272
3272
  if (error) {
3273
3273
  reject(error);
3274
3274
  return;
@@ -3677,7 +3677,7 @@ function resolveWorkspaceLane(params) {
3677
3677
  }
3678
3678
  async function pathExists(targetPath) {
3679
3679
  try {
3680
- await fs$1.access(targetPath);
3680
+ await fs.access(targetPath);
3681
3681
  return true;
3682
3682
  } catch {
3683
3683
  return false;
@@ -3685,7 +3685,7 @@ async function pathExists(targetPath) {
3685
3685
  }
3686
3686
  async function getExistingPathState(targetPath) {
3687
3687
  try {
3688
- const stats = await fs$1.lstat(targetPath);
3688
+ const stats = await fs.lstat(targetPath);
3689
3689
  if (stats.isSymbolicLink()) return "other";
3690
3690
  return stats.isDirectory() ? "directory" : "other";
3691
3691
  } catch {
@@ -3694,7 +3694,7 @@ async function getExistingPathState(targetPath) {
3694
3694
  }
3695
3695
  async function pathLexicallyExists(targetPath) {
3696
3696
  try {
3697
- await fs$1.lstat(targetPath);
3697
+ await fs.lstat(targetPath);
3698
3698
  return true;
3699
3699
  } catch {
3700
3700
  return false;
@@ -3715,9 +3715,9 @@ async function copyIfMissing(params) {
3715
3715
  if (!opened.ok) return opened.reason === "path" ? "missing-source" : "invalid";
3716
3716
  let content;
3717
3717
  try {
3718
- content = fs.readFileSync(opened.fd);
3718
+ content = syncFs.readFileSync(opened.fd);
3719
3719
  } finally {
3720
- fs.closeSync(opened.fd);
3720
+ syncFs.closeSync(opened.fd);
3721
3721
  }
3722
3722
  try {
3723
3723
  await writeFileWithinRoot({
@@ -3761,7 +3761,7 @@ async function resolveWorkspaceLaneForTurn(params) {
3761
3761
  const config = resolveWorkspaceLaneConfig(params.cfg, resolution.agentId);
3762
3762
  if ((config?.create ?? "on-first-message") !== "on-first-message") return resolution;
3763
3763
  const existed = pathState === "directory";
3764
- if (!existed) await fs$1.mkdir(resolution.effectiveWorkspaceDir, { recursive: true });
3764
+ if (!existed) await fs.mkdir(resolution.effectiveWorkspaceDir, { recursive: true });
3765
3765
  for (const file of config?.copiedOnCreate ?? DEFAULT_COPIED_ON_CREATE_FILES) {
3766
3766
  const decision = await copyIfMissing({
3767
3767
  sourceRoot: resolution.personaWorkspaceDir,
@@ -4085,7 +4085,7 @@ async function resolveOpenClawDocsPath(params) {
4085
4085
  const workspaceDir = params.workspaceDir?.trim();
4086
4086
  if (workspaceDir) {
4087
4087
  const workspaceDocs = path.join(workspaceDir, "docs");
4088
- if (fs.existsSync(workspaceDocs)) return workspaceDocs;
4088
+ if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
4089
4089
  }
4090
4090
  const packageRoot = await resolveOpenClawPackageRoot({
4091
4091
  cwd: params.cwd,
@@ -4094,7 +4094,7 @@ async function resolveOpenClawDocsPath(params) {
4094
4094
  });
4095
4095
  if (packageRoot) {
4096
4096
  const packageDocs = path.join(packageRoot, "docs");
4097
- if (fs.existsSync(path.join(packageDocs, "docs.json"))) return packageDocs;
4097
+ if (syncFs.existsSync(path.join(packageDocs, "docs.json"))) return packageDocs;
4098
4098
  }
4099
4099
  return DOCS_SITE_URL;
4100
4100
  }
@@ -6568,7 +6568,7 @@ async function imageResult(params) {
6568
6568
  }, params.label, params.imageSanitization);
6569
6569
  }
6570
6570
  async function imageResultFromFile(params) {
6571
- const buf = await fs$1.readFile(params.path);
6571
+ const buf = await fs.readFile(params.path);
6572
6572
  const mimeType = await detectMime({ buffer: buf.slice(0, 256) }) ?? "image/png";
6573
6573
  return await imageResult({
6574
6574
  label: params.label,
@@ -7479,7 +7479,7 @@ async function resolveAgentSessionDirs(stateDir) {
7479
7479
  const agentsDir = path.join(stateDir, "agents");
7480
7480
  let entries = [];
7481
7481
  try {
7482
- entries = await fs$1.readdir(agentsDir, { withFileTypes: true });
7482
+ entries = await fs.readdir(agentsDir, { withFileTypes: true });
7483
7483
  } catch (err) {
7484
7484
  if (err.code === "ENOENT") return [];
7485
7485
  throw err;
@@ -8941,7 +8941,7 @@ function resolveDefaultIdentityPath() {
8941
8941
  return path.join(resolveStateDir(), "identity", "device.json");
8942
8942
  }
8943
8943
  function ensureDir$2(filePath) {
8944
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
8944
+ syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
8945
8945
  }
8946
8946
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
8947
8947
  function base64UrlEncode(buf) {
@@ -8977,8 +8977,8 @@ function generateIdentity() {
8977
8977
  }
8978
8978
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
8979
8979
  try {
8980
- if (fs.existsSync(filePath)) {
8981
- const raw = fs.readFileSync(filePath, "utf8");
8980
+ if (syncFs.existsSync(filePath)) {
8981
+ const raw = syncFs.readFileSync(filePath, "utf8");
8982
8982
  const parsed = JSON.parse(raw);
8983
8983
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
8984
8984
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -8987,9 +8987,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
8987
8987
  ...parsed,
8988
8988
  deviceId: derivedId
8989
8989
  };
8990
- fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
8990
+ syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
8991
8991
  try {
8992
- fs.chmodSync(filePath, 384);
8992
+ syncFs.chmodSync(filePath, 384);
8993
8993
  } catch {}
8994
8994
  return {
8995
8995
  deviceId: derivedId,
@@ -9014,9 +9014,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
9014
9014
  privateKeyPem: identity.privateKeyPem,
9015
9015
  createdAtMs: Date.now()
9016
9016
  };
9017
- fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
9017
+ syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
9018
9018
  try {
9019
- fs.chmodSync(filePath, 384);
9019
+ syncFs.chmodSync(filePath, 384);
9020
9020
  } catch {}
9021
9021
  return identity;
9022
9022
  }
@@ -9039,7 +9039,7 @@ function normalizeFingerprint(input) {
9039
9039
  const execFileAsync = promisify(execFile);
9040
9040
  async function fileExists(filePath) {
9041
9041
  try {
9042
- await fs$1.access(filePath);
9042
+ await fs.access(filePath);
9043
9043
  return true;
9044
9044
  } catch {
9045
9045
  return false;
@@ -9066,8 +9066,8 @@ async function generateSelfSignedCert(params) {
9066
9066
  "-subj",
9067
9067
  "/CN=openclaw-gateway"
9068
9068
  ]);
9069
- await fs$1.chmod(params.keyPath, 384).catch(() => {});
9070
- await fs$1.chmod(params.certPath, 384).catch(() => {});
9069
+ await fs.chmod(params.keyPath, 384).catch(() => {});
9070
+ await fs.chmod(params.certPath, 384).catch(() => {});
9071
9071
  params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
9072
9072
  }
9073
9073
  async function loadGatewayTlsRuntime(cfg, log) {
@@ -9105,9 +9105,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
9105
9105
  error: "gateway tls: cert/key missing"
9106
9106
  };
9107
9107
  try {
9108
- const cert = await fs$1.readFile(certPath, "utf8");
9109
- const key = await fs$1.readFile(keyPath, "utf8");
9110
- const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
9108
+ const cert = await fs.readFile(certPath, "utf8");
9109
+ const key = await fs.readFile(keyPath, "utf8");
9110
+ const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
9111
9111
  const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
9112
9112
  if (!fingerprintSha256) return {
9113
9113
  enabled: false,
@@ -9208,8 +9208,8 @@ function resolveDeviceAuthPath(env = process.env) {
9208
9208
  }
9209
9209
  function readStore(filePath) {
9210
9210
  try {
9211
- if (!fs.existsSync(filePath)) return null;
9212
- const raw = fs.readFileSync(filePath, "utf8");
9211
+ if (!syncFs.existsSync(filePath)) return null;
9212
+ const raw = syncFs.readFileSync(filePath, "utf8");
9213
9213
  const parsed = JSON.parse(raw);
9214
9214
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
9215
9215
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -9219,10 +9219,10 @@ function readStore(filePath) {
9219
9219
  }
9220
9220
  }
9221
9221
  function writeStore(filePath, store) {
9222
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
9223
- fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
9222
+ syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
9223
+ syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
9224
9224
  try {
9225
- fs.chmodSync(filePath, 384);
9225
+ syncFs.chmodSync(filePath, 384);
9226
9226
  } catch {}
9227
9227
  }
9228
9228
  function loadDeviceAuthToken(params) {
@@ -13473,7 +13473,7 @@ async function routeReply(params) {
13473
13473
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
13474
13474
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
13475
13475
  try {
13476
- const { deliverOutboundPayloads } = await import("./deliver-DrYdFhBN.js").then((n) => n.n);
13476
+ const { deliverOutboundPayloads } = await import("./deliver-CJjQbaJE.js").then((n) => n.n);
13477
13477
  const outboundSession = buildOutboundSessionContext({
13478
13478
  cfg,
13479
13479
  agentId: resolvedAgentId,
@@ -15095,7 +15095,7 @@ async function sendTranscriptEcho(params) {
15095
15095
  }
15096
15096
  const text = formatEchoTranscript(transcript, params.format ?? DEFAULT_ECHO_TRANSCRIPT_FORMAT);
15097
15097
  try {
15098
- const { deliverOutboundPayloads } = await import("./deliver-DrYdFhBN.js").then((n) => n.n);
15098
+ const { deliverOutboundPayloads } = await import("./deliver-CJjQbaJE.js").then((n) => n.n);
15099
15099
  await deliverOutboundPayloads({
15100
15100
  cfg,
15101
15101
  channel: normalizedChannel,
@@ -19388,7 +19388,7 @@ function mergeLegacyAgent(current, legacy) {
19388
19388
  }
19389
19389
  function ensureDir$1(filePath) {
19390
19390
  const dir = path.dirname(filePath);
19391
- fs.mkdirSync(dir, { recursive: true });
19391
+ syncFs.mkdirSync(dir, { recursive: true });
19392
19392
  }
19393
19393
  function coerceAllowlistEntries(allowlist) {
19394
19394
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -19458,11 +19458,11 @@ function generateToken() {
19458
19458
  function loadExecApprovals() {
19459
19459
  const filePath = resolveExecApprovalsPath();
19460
19460
  try {
19461
- if (!fs.existsSync(filePath)) return normalizeExecApprovals({
19461
+ if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
19462
19462
  version: 1,
19463
19463
  agents: {}
19464
19464
  });
19465
- const raw = fs.readFileSync(filePath, "utf8");
19465
+ const raw = syncFs.readFileSync(filePath, "utf8");
19466
19466
  const parsed = JSON.parse(raw);
19467
19467
  if (parsed?.version !== 1) return normalizeExecApprovals({
19468
19468
  version: 1,
@@ -19479,9 +19479,9 @@ function loadExecApprovals() {
19479
19479
  function saveExecApprovals(file) {
19480
19480
  const filePath = resolveExecApprovalsPath();
19481
19481
  ensureDir$1(filePath);
19482
- fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19482
+ syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19483
19483
  try {
19484
- fs.chmodSync(filePath, 384);
19484
+ syncFs.chmodSync(filePath, 384);
19485
19485
  } catch {}
19486
19486
  }
19487
19487
  function ensureExecApprovals() {
@@ -20047,18 +20047,18 @@ function peekSystemEventEntries(sessionKey) {
20047
20047
  function resolvePowerShellPath() {
20048
20048
  const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
20049
20049
  const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
20050
- if (fs.existsSync(pwsh7)) return pwsh7;
20050
+ if (syncFs.existsSync(pwsh7)) return pwsh7;
20051
20051
  const programW6432 = process.env.ProgramW6432;
20052
20052
  if (programW6432 && programW6432 !== programFiles) {
20053
20053
  const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
20054
- if (fs.existsSync(pwsh7Alt)) return pwsh7Alt;
20054
+ if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
20055
20055
  }
20056
20056
  const pwshInPath = resolveShellFromPath("pwsh");
20057
20057
  if (pwshInPath) return pwshInPath;
20058
20058
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
20059
20059
  if (systemRoot) {
20060
20060
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
20061
- if (fs.existsSync(candidate)) return candidate;
20061
+ if (syncFs.existsSync(candidate)) return candidate;
20062
20062
  }
20063
20063
  return "powershell.exe";
20064
20064
  }
@@ -20096,7 +20096,7 @@ function resolveShellFromPath(name) {
20096
20096
  for (const entry of entries) {
20097
20097
  const candidate = path.join(entry, name);
20098
20098
  try {
20099
- fs.accessSync(candidate, fs.constants.X_OK);
20099
+ syncFs.accessSync(candidate, syncFs.constants.X_OK);
20100
20100
  return candidate;
20101
20101
  } catch {}
20102
20102
  }
@@ -21034,7 +21034,7 @@ async function resolveSandboxWorkdir(params) {
21034
21034
  cwd: process.cwd(),
21035
21035
  root: params.sandbox.workspaceDir
21036
21036
  });
21037
- if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
21037
+ if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
21038
21038
  const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
21039
21039
  const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
21040
21040
  return {
@@ -22424,13 +22424,13 @@ async function validateScriptFileForShellBleed(params) {
22424
22424
  cwd: params.workdir,
22425
22425
  root: params.workdir
22426
22426
  });
22427
- stat = await fs$1.stat(absPath);
22427
+ stat = await fs.stat(absPath);
22428
22428
  } catch {
22429
22429
  return;
22430
22430
  }
22431
22431
  if (!stat.isFile()) return;
22432
22432
  if (stat.size > 512 * 1024) return;
22433
- const content = await fs$1.readFile(absPath, "utf-8");
22433
+ const content = await fs.readFile(absPath, "utf-8");
22434
22434
  const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
22435
22435
  if (first) {
22436
22436
  const idx = first.index;
@@ -23873,7 +23873,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
23873
23873
  function hasGitMarker(repoRoot) {
23874
23874
  const gitPath = path.join(repoRoot, ".git");
23875
23875
  try {
23876
- const stat = fs.statSync(gitPath);
23876
+ const stat = syncFs.statSync(gitPath);
23877
23877
  return stat.isDirectory() || stat.isFile();
23878
23878
  } catch {
23879
23879
  return false;
@@ -23885,10 +23885,10 @@ function findGitRoot(startDir, opts = {}) {
23885
23885
  function resolveGitDirFromMarker(repoRoot) {
23886
23886
  const gitPath = path.join(repoRoot, ".git");
23887
23887
  try {
23888
- const stat = fs.statSync(gitPath);
23888
+ const stat = syncFs.statSync(gitPath);
23889
23889
  if (stat.isDirectory()) return gitPath;
23890
23890
  if (!stat.isFile()) return null;
23891
- const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
23891
+ const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
23892
23892
  if (!match?.[1]) return null;
23893
23893
  return path.resolve(repoRoot, match[1].trim());
23894
23894
  } catch {
@@ -23955,7 +23955,7 @@ const resolveCommitHash = (options = {}) => {
23955
23955
  cachedCommit = null;
23956
23956
  return cachedCommit;
23957
23957
  }
23958
- const head = fs.readFileSync(headPath, "utf-8").trim();
23958
+ const head = syncFs.readFileSync(headPath, "utf-8").trim();
23959
23959
  if (!head) {
23960
23960
  cachedCommit = null;
23961
23961
  return cachedCommit;
@@ -23963,7 +23963,7 @@ const resolveCommitHash = (options = {}) => {
23963
23963
  if (head.startsWith("ref:")) {
23964
23964
  const ref = head.replace(/^ref:\s*/i, "").trim();
23965
23965
  const refPath = path.resolve(path.dirname(headPath), ref);
23966
- cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
23966
+ cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
23967
23967
  return cachedCommit;
23968
23968
  }
23969
23969
  cachedCommit = formatCommit(head);
@@ -28573,7 +28573,7 @@ function resolveRepoRoot(params) {
28573
28573
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
28574
28574
  if (configured) try {
28575
28575
  const resolved = path.resolve(configured);
28576
- if (fs.statSync(resolved).isDirectory()) return resolved;
28576
+ if (syncFs.statSync(resolved).isDirectory()) return resolved;
28577
28577
  } catch {}
28578
28578
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
28579
28579
  const seen = /* @__PURE__ */ new Set();
@@ -29090,7 +29090,7 @@ async function readForwardAndSort(query, sessionId) {
29090
29090
  //#region src/auto-reply/reply/commands-export-session.ts
29091
29091
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
29092
29092
  function loadTemplate(fileName) {
29093
- return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
29093
+ return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
29094
29094
  }
29095
29095
  function generateHtml(sessionData) {
29096
29096
  const template = loadTemplate("template.html");
@@ -29193,8 +29193,8 @@ async function buildExportSessionReply(params) {
29193
29193
  const defaultFileName = `openclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
29194
29194
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
29195
29195
  const outputDir = path.dirname(outputPath);
29196
- if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
29197
- fs.writeFileSync(outputPath, html, "utf-8");
29196
+ if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
29197
+ syncFs.writeFileSync(outputPath, html, "utf-8");
29198
29198
  const relativePath = path.relative(params.workspaceDir, outputPath);
29199
29199
  return { text: [
29200
29200
  "✅ Session exported!",
@@ -29369,8 +29369,8 @@ function resolveZaiApiKey() {
29369
29369
  }
29370
29370
  try {
29371
29371
  const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
29372
- if (!fs.existsSync(authPath)) return;
29373
- const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
29372
+ if (!syncFs.existsSync(authPath)) return;
29373
+ const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
29374
29374
  return data["z-ai"]?.access || data.zai?.access;
29375
29375
  } catch {
29376
29376
  return;
@@ -31187,7 +31187,7 @@ function shouldPersistAnyBindingState() {
31187
31187
  }
31188
31188
  function shouldPersistBindingMutations() {
31189
31189
  if (shouldPersistAnyBindingState()) return true;
31190
- return fs.existsSync(resolveThreadBindingsPath());
31190
+ return syncFs.existsSync(resolveThreadBindingsPath());
31191
31191
  }
31192
31192
  function saveBindingsToDisk(params = {}) {
31193
31193
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -33794,7 +33794,7 @@ function normalizeSessionKey(value) {
33794
33794
  }
33795
33795
  function readSessionStore(storePath) {
33796
33796
  try {
33797
- const raw = fs.readFileSync(storePath, "utf-8");
33797
+ const raw = syncFs.readFileSync(storePath, "utf-8");
33798
33798
  const parsed = JSON5.parse(raw);
33799
33799
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
33800
33800
  } catch {}
@@ -35469,7 +35469,7 @@ async function createModelSelectionState(params) {
35469
35469
  }
35470
35470
  }
35471
35471
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
35472
- const { ensureAuthProfileStore } = await import("./model-selection-BHGpQSa9.js").then((n) => n.P);
35472
+ const { ensureAuthProfileStore } = await import("./model-selection-CHi8o17y.js").then((n) => n.P);
35473
35473
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
35474
35474
  const providerKey = normalizeProviderId(provider);
35475
35475
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -38992,7 +38992,7 @@ function asBoolean(value) {
38992
38992
  }
38993
38993
  function resolveTempPathParts(opts) {
38994
38994
  const tmpDir = opts.tmpDir ?? resolvePreferredOpenClawTmpDir();
38995
- if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
38995
+ if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
38996
38996
  recursive: true,
38997
38997
  mode: 448
38998
38998
  });
@@ -39078,7 +39078,7 @@ async function writeUrlToFile(filePath, url, opts) {
39078
39078
  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}`);
39079
39079
  const body = res.body;
39080
39080
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
39081
- const fileHandle = await fs$2.open(filePath, "w");
39081
+ const fileHandle = await fs$1.open(filePath, "w");
39082
39082
  let thrown;
39083
39083
  try {
39084
39084
  const reader = body.getReader();
@@ -39096,7 +39096,7 @@ async function writeUrlToFile(filePath, url, opts) {
39096
39096
  await fileHandle.close();
39097
39097
  }
39098
39098
  if (thrown) {
39099
- await fs$2.unlink(filePath).catch(() => {});
39099
+ await fs$1.unlink(filePath).catch(() => {});
39100
39100
  throw thrown;
39101
39101
  }
39102
39102
  } finally {
@@ -39109,7 +39109,7 @@ async function writeUrlToFile(filePath, url, opts) {
39109
39109
  }
39110
39110
  async function writeBase64ToFile(filePath, base64) {
39111
39111
  const buf = Buffer.from(base64, "base64");
39112
- await fs$2.writeFile(filePath, buf);
39112
+ await fs$1.writeFile(filePath, buf);
39113
39113
  return {
39114
39114
  path: filePath,
39115
39115
  bytes: buf.length
@@ -39194,7 +39194,7 @@ async function readJsonlFromPath(jsonlPath) {
39194
39194
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
39195
39195
  throw new Error("jsonlPath outside allowed roots");
39196
39196
  }
39197
- const canonical = await fs$1.realpath(resolved).catch(() => resolved);
39197
+ const canonical = await fs.realpath(resolved).catch(() => resolved);
39198
39198
  if (!isInboundPathAllowed({
39199
39199
  filePath: canonical,
39200
39200
  roots
@@ -39202,7 +39202,7 @@ async function readJsonlFromPath(jsonlPath) {
39202
39202
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
39203
39203
  throw new Error("jsonlPath outside allowed roots");
39204
39204
  }
39205
- return await fs$1.readFile(canonical, "utf8");
39205
+ return await fs.readFile(canonical, "utf8");
39206
39206
  }
39207
39207
  const CanvasToolSchema = Type.Object({
39208
39208
  action: stringEnum(CANVAS_ACTIONS),
@@ -40053,12 +40053,12 @@ function resolveRestartSentinelPath(env = process.env) {
40053
40053
  }
40054
40054
  async function writeRestartSentinel(payload, env = process.env) {
40055
40055
  const filePath = resolveRestartSentinelPath(env);
40056
- await fs$1.mkdir(path.dirname(filePath), { recursive: true });
40056
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
40057
40057
  const data = {
40058
40058
  version: 1,
40059
40059
  payload
40060
40060
  };
40061
- await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
40061
+ await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
40062
40062
  return filePath;
40063
40063
  }
40064
40064
 
@@ -42500,9 +42500,9 @@ function loadExternalCatalogEntries(options) {
42500
42500
  const entries = [];
42501
42501
  for (const rawPath of paths) {
42502
42502
  const resolved = resolveUserPath(rawPath);
42503
- if (!fs.existsSync(resolved)) continue;
42503
+ if (!syncFs.existsSync(resolved)) continue;
42504
42504
  try {
42505
- const payload = JSON.parse(fs.readFileSync(resolved, "utf-8"));
42505
+ const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
42506
42506
  entries.push(...parseCatalogEntries(payload));
42507
42507
  } catch {}
42508
42508
  }
@@ -51565,18 +51565,18 @@ function appendImagePathsToPrompt(prompt, paths) {
51565
51565
  return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
51566
51566
  }
51567
51567
  async function writeCliImages(images) {
51568
- const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
51568
+ const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cli-images-"));
51569
51569
  const paths = [];
51570
51570
  for (let i = 0; i < images.length; i += 1) {
51571
51571
  const image = images[i];
51572
51572
  const ext = resolveImageExtension(image.mimeType);
51573
51573
  const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
51574
51574
  const buffer = Buffer.from(image.data, "base64");
51575
- await fs$1.writeFile(filePath, buffer, { mode: 384 });
51575
+ await fs.writeFile(filePath, buffer, { mode: 384 });
51576
51576
  paths.push(filePath);
51577
51577
  }
51578
51578
  const cleanup = async () => {
51579
- await fs$1.rm(tempDir, {
51579
+ await fs.rm(tempDir, {
51580
51580
  recursive: true,
51581
51581
  force: true
51582
51582
  });
@@ -54000,9 +54000,9 @@ async function readPostCompactionContext(workspaceDir) {
54000
54000
  if (!opened.ok) return null;
54001
54001
  const sections = extractSections((() => {
54002
54002
  try {
54003
- return fs.readFileSync(opened.fd, "utf-8");
54003
+ return syncFs.readFileSync(opened.fd, "utf-8");
54004
54004
  } finally {
54005
- fs.closeSync(opened.fd);
54005
+ syncFs.closeSync(opened.fd);
54006
54006
  }
54007
54007
  })(), ["Session Startup", "Red Lines"]);
54008
54008
  if (sections.length === 0) return null;
@@ -55243,7 +55243,7 @@ async function deliverSessionMaintenanceWarning(params) {
55243
55243
  return;
55244
55244
  }
55245
55245
  try {
55246
- const { deliverOutboundPayloads } = await import("./deliver-DrYdFhBN.js").then((n) => n.n);
55246
+ const { deliverOutboundPayloads } = await import("./deliver-CJjQbaJE.js").then((n) => n.n);
55247
55247
  const outboundSession = buildOutboundSessionContext({
55248
55248
  cfg: params.cfg,
55249
55249
  sessionKey: params.sessionKey
@@ -56200,7 +56200,7 @@ async function stageSandboxMedia(params) {
56200
56200
  const remoteMediaCacheDir = ctx.MediaRemoteHost ? path.join(workspaceDir, ".openclaw", "media", "remote-cache", sessionKey) : null;
56201
56201
  const effectiveWorkspaceDir = sandbox?.workspaceDir ?? remoteMediaCacheDir;
56202
56202
  if (!effectiveWorkspaceDir) return;
56203
- await fs$1.mkdir(effectiveWorkspaceDir, { recursive: true });
56203
+ await fs.mkdir(effectiveWorkspaceDir, { recursive: true });
56204
56204
  const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
56205
56205
  cfg,
56206
56206
  accountId: ctx.AccountId
@@ -56259,8 +56259,8 @@ async function stageLocalFileIntoRoot(params) {
56259
56259
  }
56260
56260
  async function stageRemoteFileIntoRoot(params) {
56261
56261
  const tmpRoot = resolvePreferredOpenClawTmpDir();
56262
- await fs$1.mkdir(tmpRoot, { recursive: true });
56263
- const tmpDir = await fs$1.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
56262
+ await fs.mkdir(tmpRoot, { recursive: true });
56263
+ const tmpDir = await fs.mkdtemp(path.join(tmpRoot, "stage-sandbox-media-"));
56264
56264
  const tmpPath = path.join(tmpDir, "download");
56265
56265
  try {
56266
56266
  await scpFile(params.remoteHost, params.remotePath, tmpPath);
@@ -56271,7 +56271,7 @@ async function stageRemoteFileIntoRoot(params) {
56271
56271
  maxBytes: params.maxBytes
56272
56272
  });
56273
56273
  } finally {
56274
- await fs$1.rm(tmpDir, {
56274
+ await fs.rm(tmpDir, {
56275
56275
  recursive: true,
56276
56276
  force: true
56277
56277
  }).catch(() => {});
@@ -57440,7 +57440,7 @@ async function runModelGate(spec, ctx) {
57440
57440
  const isolatedSessionId = randomNonce;
57441
57441
  const isolatedRunId = randomNonce;
57442
57442
  const tmpBaseDir = resolvePreferredOpenClawTmpDir();
57443
- tmpDir = await fs$1.mkdtemp(path.join(tmpBaseDir, "wake-gate-"));
57443
+ tmpDir = await fs.mkdtemp(path.join(tmpBaseDir, "wake-gate-"));
57444
57444
  const workspaceDir = tmpDir;
57445
57445
  const prompt = spec.prompt ?? DEFAULT_MODEL_PROMPT;
57446
57446
  const timeoutMs = spec.timeoutMs ?? DEFAULT_MODEL_TIMEOUT_MS;
@@ -57498,7 +57498,7 @@ async function runModelGate(spec, ctx) {
57498
57498
  log$35.warn("model gate error", { error: err instanceof Error ? err.message : String(err) });
57499
57499
  return { wake: false };
57500
57500
  } finally {
57501
- if (tmpDir) await fs$1.rm(tmpDir, {
57501
+ if (tmpDir) await fs.rm(tmpDir, {
57502
57502
  recursive: true,
57503
57503
  force: true
57504
57504
  }).catch(() => void 0);
@@ -57728,7 +57728,7 @@ async function resolveHeartbeatPreflight(params) {
57728
57728
  const workspaceDir = resolveAgentWorkspaceDir(params.cfg, params.agentId);
57729
57729
  const heartbeatFilePath = path.join(workspaceDir, DEFAULT_HEARTBEAT_FILENAME);
57730
57730
  try {
57731
- if (isHeartbeatContentEffectivelyEmpty(await fs$1.readFile(heartbeatFilePath, "utf-8"))) return {
57731
+ if (isHeartbeatContentEffectivelyEmpty(await fs.readFile(heartbeatFilePath, "utf-8"))) return {
57732
57732
  ...basePreflight,
57733
57733
  skipReason: "empty-heartbeat-file"
57734
57734
  };
@@ -64966,8 +64966,8 @@ async function describeStickerImage(params) {
64966
64966
  const { provider, model } = resolved;
64967
64967
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
64968
64968
  try {
64969
- const buffer = await fs$1.readFile(imagePath);
64970
- const { describeImageWithModel } = await import("./provider-image-CFq0C_z0.js").then((n) => n.n);
64969
+ const buffer = await fs.readFile(imagePath);
64970
+ const { describeImageWithModel } = await import("./provider-image-CNBkTbhu.js").then((n) => n.n);
64971
64971
  return (await describeImageWithModel({
64972
64972
  buffer,
64973
64973
  fileName: "sticker.webp",
@@ -66680,7 +66680,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
66680
66680
  let transcript;
66681
66681
  let carry;
66682
66682
  if (needsPreflightTranscription) try {
66683
- const { transcribeFirstAudio } = await import("./audio-preflight-C4_SRws-.js");
66683
+ const { transcribeFirstAudio } = await import("./audio-preflight-DQous9JR.js");
66684
66684
  const uploadable = audioAttachments.filter((att) => typeof att.url === "string" && att.url.length > 0);
66685
66685
  if (uploadable.length > 0) {
66686
66686
  const preflight = await transcribeFirstAudio({
@@ -68141,7 +68141,7 @@ function identityHasValues(identity) {
68141
68141
  }
68142
68142
  function loadIdentityFromFile(identityPath) {
68143
68143
  try {
68144
- const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
68144
+ const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
68145
68145
  if (!identityHasValues(parsed)) return null;
68146
68146
  return parsed;
68147
68147
  } catch {
@@ -68165,7 +68165,7 @@ function resolveAvatarSource(cfg, agentId) {
68165
68165
  }
68166
68166
  function resolveExistingPath(value) {
68167
68167
  try {
68168
- return fs.realpathSync(value);
68168
+ return syncFs.realpathSync(value);
68169
68169
  } catch {
68170
68170
  return path.resolve(value);
68171
68171
  }
@@ -68183,7 +68183,7 @@ function resolveLocalAvatarPath(params) {
68183
68183
  reason: "unsupported_extension"
68184
68184
  };
68185
68185
  try {
68186
- const stat = fs.statSync(realPath);
68186
+ const stat = syncFs.statSync(realPath);
68187
68187
  if (!stat.isFile()) return {
68188
68188
  ok: false,
68189
68189
  reason: "missing"
@@ -73925,23 +73925,23 @@ function createDefaultDeps() {
73925
73925
  };
73926
73926
  },
73927
73927
  sendMessageTelegram: async (...args) => {
73928
- const { sendMessageTelegram } = await import("./send-BXHsjIHr.js").then((n) => n.l);
73928
+ const { sendMessageTelegram } = await import("./send-2aTk7PU-.js").then((n) => n.l);
73929
73929
  return await sendMessageTelegram(...args);
73930
73930
  },
73931
73931
  sendMessageDiscord: async (...args) => {
73932
- const { sendMessageDiscord } = await import("./send-Bf4geLyV.js").then((n) => n.t);
73932
+ const { sendMessageDiscord } = await import("./send-D2WSE41A.js").then((n) => n.t);
73933
73933
  return await sendMessageDiscord(...args);
73934
73934
  },
73935
73935
  sendMessageSlack: async (...args) => {
73936
- const { sendMessageSlack } = await import("./send-bwKTbNlJ.js").then((n) => n.n);
73936
+ const { sendMessageSlack } = await import("./send-odd2G3DX.js").then((n) => n.n);
73937
73937
  return await sendMessageSlack(...args);
73938
73938
  },
73939
73939
  sendMessageSignal: async (...args) => {
73940
- const { sendMessageSignal } = await import("./send-CsDSBjFo.js").then((n) => n.i);
73940
+ const { sendMessageSignal } = await import("./send-mILKKt54.js").then((n) => n.i);
73941
73941
  return await sendMessageSignal(...args);
73942
73942
  },
73943
73943
  sendMessageIMessage: async (...args) => {
73944
- const { sendMessageIMessage } = await import("./send-DQvfLvpJ.js").then((n) => n.n);
73944
+ const { sendMessageIMessage } = await import("./send-yIxOvEiz.js").then((n) => n.n);
73945
73945
  return await sendMessageIMessage(...args);
73946
73946
  }
73947
73947
  };
@@ -75186,10 +75186,10 @@ function estimateDurationSeconds(pcm) {
75186
75186
  return pcm.length / (bytesPerSample * SAMPLE_RATE);
75187
75187
  }
75188
75188
  async function writeWavFile(pcm) {
75189
- const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "discord-voice-"));
75189
+ const tempDir = await fs.mkdtemp(path.join(resolvePreferredOpenClawTmpDir(), "discord-voice-"));
75190
75190
  const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
75191
75191
  const wav = buildWavBuffer(pcm);
75192
- await fs$1.writeFile(filePath, wav);
75192
+ await fs.writeFile(filePath, wav);
75193
75193
  scheduleTempCleanup(tempDir);
75194
75194
  return {
75195
75195
  path: filePath,
@@ -75198,7 +75198,7 @@ async function writeWavFile(pcm) {
75198
75198
  }
75199
75199
  function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
75200
75200
  setTimeout(() => {
75201
- fs$1.rm(tempDir, {
75201
+ fs.rm(tempDir, {
75202
75202
  recursive: true,
75203
75203
  force: true
75204
75204
  }).catch((err) => {
@@ -78979,7 +78979,7 @@ async function detectBinary(name) {
78979
78979
  if (!isSafeExecutableValue(name)) return false;
78980
78980
  const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
78981
78981
  if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
78982
- await fs$1.access(resolved);
78982
+ await fs.access(resolved);
78983
78983
  return true;
78984
78984
  } catch {
78985
78985
  return false;
@@ -79643,7 +79643,7 @@ function normalizeAllowList$1(list) {
79643
79643
  async function detectRemoteHostFromCliPath(cliPath) {
79644
79644
  try {
79645
79645
  const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
79646
- const content = await fs$1.readFile(expanded, "utf8");
79646
+ const content = await fs.readFile(expanded, "utf8");
79647
79647
  const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
79648
79648
  if (userHostMatch) return userHostMatch[1];
79649
79649
  return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
@@ -79979,7 +79979,7 @@ async function monitorIMessageProvider(opts = {}) {
79979
79979
  function readFileIfExists(filePath) {
79980
79980
  if (!filePath) return;
79981
79981
  try {
79982
- return fs.readFileSync(filePath, "utf-8").trim();
79982
+ return syncFs.readFileSync(filePath, "utf-8").trim();
79983
79983
  } catch {
79984
79984
  return;
79985
79985
  }
@@ -80600,7 +80600,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
80600
80600
  prefix: "line-media",
80601
80601
  extension: getExtensionForContentType(contentType)
80602
80602
  });
80603
- await fs.promises.writeFile(filePath, buffer);
80603
+ await syncFs.promises.writeFile(filePath, buffer);
80604
80604
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
80605
80605
  return {
80606
80606
  path: filePath,
@@ -86412,7 +86412,7 @@ function readSlackExternalArgMenuToken(raw) {
86412
86412
  }
86413
86413
  let commandsRegistry;
86414
86414
  async function getCommandsRegistry() {
86415
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-Cof4HjvY.js").then((n) => n.n);
86415
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-Da3c0MbL.js").then((n) => n.n);
86416
86416
  return commandsRegistry;
86417
86417
  }
86418
86418
  function encodeSlackCommandArgValue(parts) {
@@ -86742,14 +86742,14 @@ async function registerSlackMonitorSlashCommands(params) {
86742
86742
  const channelName = channelInfo?.name;
86743
86743
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
86744
86744
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
86745
- import("./resolve-route-DKZiteo6.js").then((n) => n.r),
86745
+ import("./resolve-route-DxuZn3_M.js").then((n) => n.r),
86746
86746
  import("./inbound-context-CYjjc71l.js").then((n) => n.n),
86747
86747
  Promise.resolve().then(() => provider_dispatcher_exports)
86748
86748
  ]);
86749
86749
  const [{ resolveConversationLabel }, { createReplyPrefixOptions }, { recordInboundSessionMetaSafe }] = await Promise.all([
86750
86750
  import("./conversation-label-CrORLc0j.js").then((n) => n.t),
86751
- import("./reply-prefix-C-DjHvQK.js").then((n) => n.n),
86752
- import("./session-meta-5XI6vLtM.js").then((n) => n.n)
86751
+ import("./reply-prefix-DS2s69iC.js").then((n) => n.n),
86752
+ import("./session-meta-B8B6RwSE.js").then((n) => n.n)
86753
86753
  ]);
86754
86754
  const route = resolveAgentRoute({
86755
86755
  cfg,
@@ -86814,9 +86814,9 @@ async function registerSlackMonitorSlashCommands(params) {
86814
86814
  });
86815
86815
  const deliverSlashPayloads = async (replies) => {
86816
86816
  const [{ deliverSlackSlashReplies }, { resolveChunkMode, resolveChunkNewlinePacking }, { resolveMarkdownTableMode }] = await Promise.all([
86817
- import("./replies-Cty02S3t.js").then((n) => n.r),
86818
- import("./chunk-CEygNI3g.js").then((n) => n.s),
86819
- import("./markdown-tables-DfLMw9ti.js").then((n) => n.t)
86817
+ import("./replies-BHkXhmOj.js").then((n) => n.r),
86818
+ import("./chunk-Bvf22vTh.js").then((n) => n.s),
86819
+ import("./markdown-tables-WuCFdPlC.js").then((n) => n.t)
86820
86820
  ]);
86821
86821
  await deliverSlackSlashReplies({
86822
86822
  replies,
@@ -86870,7 +86870,7 @@ async function registerSlackMonitorSlashCommands(params) {
86870
86870
  let nativeCommands = [];
86871
86871
  if (nativeEnabled) {
86872
86872
  reg = await getCommandsRegistry();
86873
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-CAOvM2sb.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
86873
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-DdVSQNce.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
86874
86874
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
86875
86875
  skillCommands,
86876
86876
  provider: "slack"
@@ -87389,7 +87389,7 @@ async function auditTelegramGroupMembership(params) {
87389
87389
  groups: [],
87390
87390
  elapsedMs: Date.now() - started
87391
87391
  };
87392
- const fetcher = params.proxyUrl ? (await import("./proxy-CrSpy5Aw.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
87392
+ const fetcher = params.proxyUrl ? (await import("./proxy-Ds4gxPy8.js").then((n) => n.n)).makeProxyFetch(params.proxyUrl) : fetch;
87393
87393
  const { fetchWithTimeout } = await import("./fetch-timeout-Dyj5Y_Ss.js").then((n) => n.r);
87394
87394
  const base = `${TELEGRAM_API_BASE$1}/bot${token}`;
87395
87395
  const groups = [];
@@ -89948,7 +89948,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
89948
89948
  let audioPreflightCarry;
89949
89949
  const audioConfigEnabled = cfg.tools?.media?.audio && cfg.tools.media.audio.enabled !== false;
89950
89950
  if (hasAudio && !hasUserText && !disableAudioPreflight && (isGroup && requireMention && mentionRegexes.length > 0 || audioConfigEnabled === true)) try {
89951
- const { transcribeFirstAudio } = await import("./audio-preflight-C4_SRws-.js");
89951
+ const { transcribeFirstAudio } = await import("./audio-preflight-DQous9JR.js");
89952
89952
  const preflight = await transcribeFirstAudio({
89953
89953
  ctx: {
89954
89954
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -91420,7 +91420,7 @@ function resolveCommandHashPath(accountId, botIdentity) {
91420
91420
  }
91421
91421
  async function readCachedCommandHash(accountId, botIdentity) {
91422
91422
  try {
91423
- return (await fs$1.readFile(resolveCommandHashPath(accountId, botIdentity), "utf-8")).trim();
91423
+ return (await fs.readFile(resolveCommandHashPath(accountId, botIdentity), "utf-8")).trim();
91424
91424
  } catch {
91425
91425
  return null;
91426
91426
  }
@@ -91428,8 +91428,8 @@ async function readCachedCommandHash(accountId, botIdentity) {
91428
91428
  async function writeCachedCommandHash(accountId, botIdentity, hash) {
91429
91429
  const filePath = resolveCommandHashPath(accountId, botIdentity);
91430
91430
  try {
91431
- await fs$1.mkdir(path.dirname(filePath), { recursive: true });
91432
- await fs$1.writeFile(filePath, hash, "utf-8");
91431
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
91432
+ await fs.writeFile(filePath, hash, "utf-8");
91433
91433
  } catch {}
91434
91434
  }
91435
91435
  async function syncTelegramMenuCommands(params) {
@@ -92694,7 +92694,7 @@ function safeParseState(raw) {
92694
92694
  async function readTelegramUpdateOffset(params) {
92695
92695
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
92696
92696
  try {
92697
- const parsed = safeParseState(await fs$1.readFile(filePath, "utf-8"));
92697
+ const parsed = safeParseState(await fs.readFile(filePath, "utf-8"));
92698
92698
  const expectedBotId = extractBotIdFromToken(params.botToken);
92699
92699
  if (expectedBotId && parsed?.botId && parsed.botId !== expectedBotId) return null;
92700
92700
  if (expectedBotId && parsed?.botId === null) return null;
@@ -94417,7 +94417,7 @@ async function getMemorySearchManager(params) {
94417
94417
  if (cached) return { manager: cached };
94418
94418
  }
94419
94419
  try {
94420
- const { QmdMemoryManager } = await import("./qmd-manager-CU9iEql0.js");
94420
+ const { QmdMemoryManager } = await import("./qmd-manager-C3UBJiCk.js");
94421
94421
  const primary = await QmdMemoryManager.create({
94422
94422
  cfg: params.cfg,
94423
94423
  agentId: params.agentId,
@@ -94429,7 +94429,7 @@ async function getMemorySearchManager(params) {
94429
94429
  const wrapper = new FallbackMemoryManager({
94430
94430
  primary,
94431
94431
  fallbackFactory: async () => {
94432
- const { MemoryIndexManager } = await import("./manager-D728Thsn.js").then((n) => n.t);
94432
+ const { MemoryIndexManager } = await import("./manager-BujYLKny.js").then((n) => n.t);
94433
94433
  return await MemoryIndexManager.get(params);
94434
94434
  }
94435
94435
  }, () => {
@@ -94444,7 +94444,7 @@ async function getMemorySearchManager(params) {
94444
94444
  }
94445
94445
  }
94446
94446
  try {
94447
- const { MemoryIndexManager } = await import("./manager-D728Thsn.js").then((n) => n.t);
94447
+ const { MemoryIndexManager } = await import("./manager-BujYLKny.js").then((n) => n.t);
94448
94448
  return { manager: await MemoryIndexManager.get(params) };
94449
94449
  } catch (err) {
94450
94450
  return {
@@ -94794,7 +94794,7 @@ const LEGACY_ARCHIVE_DEFAULT_RETENTION_MS = 720 * 60 * 60 * 1e3;
94794
94794
  const log$24 = createSubsystemLogger("config/sessions/legacy-import/archive");
94795
94795
  /** SHA-256 over the file's bytes; null when the file is gone (ENOENT). Other errors propagate. */
94796
94796
  async function sourceIdentity(filePath) {
94797
- const handle = await fs$1.open(filePath, "r").catch((error) => {
94797
+ const handle = await fs.open(filePath, "r").catch((error) => {
94798
94798
  if (error.code === "ENOENT") return null;
94799
94799
  throw error;
94800
94800
  });
@@ -94847,9 +94847,9 @@ function fallbackArchiveDest(source, archiveRoot) {
94847
94847
  async function copyVerifiedTo(sourcePath, dest, expected) {
94848
94848
  const tmp = `${dest}.tmp-${randomUUID()}`;
94849
94849
  try {
94850
- const handle = await fs$1.open(tmp, "wx", 384);
94850
+ const handle = await fs.open(tmp, "wx", 384);
94851
94851
  try {
94852
- const sourceHandle = await fs$1.open(sourcePath, "r");
94852
+ const sourceHandle = await fs.open(sourcePath, "r");
94853
94853
  try {
94854
94854
  const chunk = Buffer.allocUnsafe(256 * 1024);
94855
94855
  let size = 0;
@@ -94866,18 +94866,18 @@ async function copyVerifiedTo(sourcePath, dest, expected) {
94866
94866
  } finally {
94867
94867
  await handle.close();
94868
94868
  }
94869
- await fs$1.chmod(tmp, 384);
94869
+ await fs.chmod(tmp, 384);
94870
94870
  const copied = await identityOf(tmp);
94871
94871
  if (!copied || copied.fingerprint !== expected.fingerprint) throw new Error(`legacy archive cross-device copy diverged from the imported bytes: ${dest}`);
94872
94872
  try {
94873
- await fs$1.link(tmp, dest);
94873
+ await fs.link(tmp, dest);
94874
94874
  } catch (error) {
94875
94875
  if (error.code !== "EEXIST") throw error;
94876
94876
  const existing = await identityOf(dest);
94877
94877
  if (!existing || existing.fingerprint !== expected.fingerprint) throw new Error(`legacy archive destination exists with different content: ${dest}`, { cause: error });
94878
94878
  }
94879
94879
  } finally {
94880
- await fs$1.rm(tmp, { force: true });
94880
+ await fs.rm(tmp, { force: true });
94881
94881
  }
94882
94882
  }
94883
94883
  /**
@@ -94893,7 +94893,7 @@ async function planLegacyArchiveDest(source, archiveRoot, expected) {
94893
94893
  const resolvedRoot = path.resolve(archiveRoot);
94894
94894
  const { dir, dest } = archivePathsFor(source, resolvedRoot);
94895
94895
  try {
94896
- await fs$1.mkdir(dir, {
94896
+ await fs.mkdir(dir, {
94897
94897
  recursive: true,
94898
94898
  mode: 448
94899
94899
  });
@@ -94933,7 +94933,7 @@ async function archiveLegacySource(source, archiveRoot, expected) {
94933
94933
  */
94934
94934
  async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
94935
94935
  const resolvedRoot = path.resolve(archiveRoot);
94936
- await fs$1.mkdir(path.dirname(dest), {
94936
+ await fs.mkdir(path.dirname(dest), {
94937
94937
  recursive: true,
94938
94938
  mode: 448
94939
94939
  });
@@ -94943,14 +94943,14 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
94943
94943
  const expectedIdentity = expected ?? sourceIdentityValue;
94944
94944
  if (sourceIdentityValue.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy source changed after import; failing closed: ${source.path}`);
94945
94945
  const destInodeVerified = async (destPath) => {
94946
- const [sourceStat, destStat] = await Promise.all([fs$1.stat(source.path), fs$1.stat(destPath).catch(() => void 0)]);
94946
+ const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath).catch(() => void 0)]);
94947
94947
  return destStat !== void 0 && destStat.dev === sourceStat.dev && destStat.ino === sourceStat.ino;
94948
94948
  };
94949
94949
  const moveInto = async (destPath) => {
94950
94950
  let moved = false;
94951
94951
  let independentArchive = false;
94952
94952
  try {
94953
- await fs$1.link(source.path, destPath);
94953
+ await fs.link(source.path, destPath);
94954
94954
  moved = true;
94955
94955
  } catch (error) {
94956
94956
  const code = error.code;
@@ -94958,7 +94958,7 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
94958
94958
  const existing = await identityOf(destPath);
94959
94959
  if (existing && existing.fingerprint === expectedIdentity.fingerprint) {
94960
94960
  moved = true;
94961
- const [sourceStat, destStat] = await Promise.all([fs$1.stat(source.path), fs$1.stat(destPath)]);
94961
+ const [sourceStat, destStat] = await Promise.all([fs.stat(source.path), fs.stat(destPath)]);
94962
94962
  independentArchive = sourceStat.dev !== destStat.dev || sourceStat.ino !== destStat.ino;
94963
94963
  } else return {
94964
94964
  moved: false,
@@ -94979,13 +94979,13 @@ async function archiveLegacySourceTo(source, dest, archiveRoot, expected) {
94979
94979
  };
94980
94980
  const outcome = await moveInto(dest);
94981
94981
  if (outcome.divergent) throw new Error(`legacy archive destination exists with different content: ${dest}`);
94982
- await fs$1.chmod(dest, 384);
94982
+ await fs.chmod(dest, 384);
94983
94983
  if (!await destInodeVerified(dest)) {
94984
94984
  const archived = await identityOf(dest);
94985
94985
  if (!archived || archived.fingerprint !== expectedIdentity.fingerprint) throw new Error(`legacy archive verification failed: ${dest}`);
94986
94986
  }
94987
94987
  if (outcome.moved) if (outcome.independentArchive) await unlinkSourceIfUnchanged(source.path, expectedIdentity);
94988
- else await fs$1.unlink(source.path);
94988
+ else await fs.unlink(source.path);
94989
94989
  return dest;
94990
94990
  }
94991
94991
  /**
@@ -94999,12 +94999,12 @@ async function unlinkSourceIfUnchanged(sourcePath, expected) {
94999
94999
  const current = await sourceIdentity(sourcePath);
95000
95000
  if (!current) return;
95001
95001
  if (current.fingerprint !== expected.fingerprint) throw new Error(`legacy source changed before removal; failing closed: ${sourcePath}`);
95002
- await fs$1.unlink(sourcePath);
95002
+ await fs.unlink(sourcePath);
95003
95003
  }
95004
95004
  async function chmodDirs(dir, stopAt) {
95005
95005
  let current = dir;
95006
95006
  while (current.startsWith(stopAt) && current !== stopAt) {
95007
- await fs$1.chmod(current, 448).catch(() => void 0);
95007
+ await fs.chmod(current, 448).catch(() => void 0);
95008
95008
  const parent = path.dirname(current);
95009
95009
  if (parent === current) return;
95010
95010
  current = parent;
@@ -95033,11 +95033,11 @@ async function purgeExpiredLegacyArchives(runtime, opts) {
95033
95033
  log$24.warn("skipping legacy archive outside the archive root", { sourcePath: receipt.sourcePath });
95034
95034
  continue;
95035
95035
  }
95036
- if (!await fs$1.stat(archivePath).then(() => true).catch((error) => {
95036
+ if (!await fs.stat(archivePath).then(() => true).catch((error) => {
95037
95037
  if (error.code === "ENOENT") return false;
95038
95038
  throw error;
95039
95039
  })) continue;
95040
- await fs$1.rm(archivePath, { force: true });
95040
+ await fs.rm(archivePath, { force: true });
95041
95041
  purged += 1;
95042
95042
  await pruneEmptyArchiveDirs(path.dirname(archivePath), archiveRoot);
95043
95043
  }
@@ -95048,12 +95048,12 @@ async function pruneEmptyArchiveDirs(dir, stopAt) {
95048
95048
  while (current.startsWith(stopAt + path.sep)) {
95049
95049
  let entries;
95050
95050
  try {
95051
- entries = await fs$1.readdir(current);
95051
+ entries = await fs.readdir(current);
95052
95052
  } catch {
95053
95053
  return;
95054
95054
  }
95055
95055
  if (entries.length > 0) return;
95056
- await fs$1.rmdir(current).catch(() => void 0);
95056
+ await fs.rmdir(current).catch(() => void 0);
95057
95057
  current = path.dirname(current);
95058
95058
  }
95059
95059
  }
@@ -95336,7 +95336,7 @@ function byPath(a, b) {
95336
95336
  }
95337
95337
  function readDirents(dirPath) {
95338
95338
  try {
95339
- return fs.readdirSync(dirPath, { withFileTypes: true });
95339
+ return syncFs.readdirSync(dirPath, { withFileTypes: true });
95340
95340
  } catch {
95341
95341
  return [];
95342
95342
  }
@@ -95349,7 +95349,7 @@ function isUnderQuarantine(rootDir, candidatePath) {
95349
95349
  }
95350
95350
  function statSource(filePath) {
95351
95351
  try {
95352
- const stats = fs.statSync(filePath);
95352
+ const stats = syncFs.statSync(filePath);
95353
95353
  if (!stats.isFile()) return;
95354
95354
  return {
95355
95355
  mtimeMs: stats.mtimeMs,
@@ -95540,12 +95540,12 @@ async function censusLegacySources(cfg, env) {
95540
95540
  for (const agentDir of readDirents(agentsRoot).filter((entry) => entry.isDirectory()).toSorted((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
95541
95541
  const agentId = normalizeAgentId(agentDir.name);
95542
95542
  const sessionsDir = path.join(agentsRoot, agentDir.name, LEGACY_SESSIONS_DIR_NAME);
95543
- if (fs.existsSync(sessionsDir)) censusAgentDir(sessionsDir, agentId);
95543
+ if (syncFs.existsSync(sessionsDir)) censusAgentDir(sessionsDir, agentId);
95544
95544
  }
95545
95545
  const legacyRoot = path.join(stateDir, LEGACY_SESSIONS_DIR_NAME);
95546
- if (fs.existsSync(legacyRoot)) censusAgentDir(legacyRoot, defaultAgent);
95546
+ if (syncFs.existsSync(legacyRoot)) censusAgentDir(legacyRoot, defaultAgent);
95547
95547
  const recoveryDir = path.join(stateDir, RECOVERY_DIR_NAME);
95548
- if (fs.existsSync(recoveryDir)) censusRecoveryTree(sources, recoveryDir);
95548
+ if (syncFs.existsSync(recoveryDir)) censusRecoveryTree(sources, recoveryDir);
95549
95549
  return sources.values();
95550
95550
  }
95551
95551
  /**
@@ -95629,7 +95629,7 @@ async function admitDurableKeyMappings(registry, listKeys, opts) {
95629
95629
  await opts?.clearMappingSourcePath?.(mapping.agentId, mapping.sessionId).catch(() => void 0);
95630
95630
  continue;
95631
95631
  }
95632
- const stats = await fs$1.stat(mapping.sourcePath).catch(() => void 0);
95632
+ const stats = await fs.stat(mapping.sourcePath).catch(() => void 0);
95633
95633
  if (!stats?.isFile()) continue;
95634
95634
  registry.admit({
95635
95635
  path: mapping.sourcePath,
@@ -95829,7 +95829,7 @@ function createLegacySourceRegistry() {
95829
95829
  if (!isSettledReceipt(receipt, source.sizeBytes)) trackPendingPath(key, source);
95830
95830
  return;
95831
95831
  }
95832
- const stats = await fs$1.stat(key).catch(() => void 0);
95832
+ const stats = await fs.stat(key).catch(() => void 0);
95833
95833
  if (!stats?.isFile() && receipt.status !== "imported") return;
95834
95834
  admit({
95835
95835
  path: key,
@@ -96046,12 +96046,12 @@ function canonicalSqliteIdentityPathSync(sqlitePath) {
96046
96046
  for (let hops = 0; hops < MAX_SYMLINK_HOPS; hops += 1) {
96047
96047
  let stats;
96048
96048
  try {
96049
- stats = fs.lstatSync(current);
96049
+ stats = syncFs.lstatSync(current);
96050
96050
  } catch {
96051
96051
  return canonicalPathSync(current);
96052
96052
  }
96053
96053
  if (!stats.isSymbolicLink()) return canonicalPathSync(current);
96054
- current = path.resolve(canonicalPathSync(path.dirname(current)), fs.readlinkSync(current));
96054
+ current = path.resolve(canonicalPathSync(path.dirname(current)), syncFs.readlinkSync(current));
96055
96055
  }
96056
96056
  return canonicalPathSync(sqlitePath);
96057
96057
  }
@@ -96065,12 +96065,12 @@ function sleep$1(ms) {
96065
96065
  return new Promise((resolve) => setTimeout(resolve, ms));
96066
96066
  }
96067
96067
  function acquireKernelOwnerLock(lock) {
96068
- fs.mkdirSync(path.dirname(lock.lockPath), {
96068
+ syncFs.mkdirSync(path.dirname(lock.lockPath), {
96069
96069
  recursive: true,
96070
96070
  mode: 448
96071
96071
  });
96072
96072
  try {
96073
- fs.closeSync(fs.openSync(lock.lockPath, "wx", 384));
96073
+ syncFs.closeSync(syncFs.openSync(lock.lockPath, "wx", 384));
96074
96074
  } catch (err) {
96075
96075
  if (err.code !== "EEXIST") throw err;
96076
96076
  }
@@ -96104,7 +96104,7 @@ function closeSqliteQuietly(db) {
96104
96104
  function releaseKernelOwnerLock(lock, db, info) {
96105
96105
  try {
96106
96106
  const current = readHolderSidecar(lock.sidecarPath);
96107
- if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt) fs.rmSync(lock.sidecarPath, { force: true });
96107
+ if (current !== void 0 && current.pid === info.pid && current.startedAt === info.startedAt) syncFs.rmSync(lock.sidecarPath, { force: true });
96108
96108
  } finally {
96109
96109
  closeSqliteQuietly(db);
96110
96110
  }
@@ -96112,17 +96112,17 @@ function releaseKernelOwnerLock(lock, db, info) {
96112
96112
  function writeHolderSidecar(sidecarPath, info) {
96113
96113
  const temp = `${sidecarPath}.${process.pid}.tmp`;
96114
96114
  try {
96115
- const fd = fs.openSync(temp, "w", 384);
96115
+ const fd = syncFs.openSync(temp, "w", 384);
96116
96116
  try {
96117
- fs.writeFileSync(fd, `${JSON.stringify(info)}\n`);
96118
- fs.fsyncSync(fd);
96117
+ syncFs.writeFileSync(fd, `${JSON.stringify(info)}\n`);
96118
+ syncFs.fsyncSync(fd);
96119
96119
  } finally {
96120
- fs.closeSync(fd);
96120
+ syncFs.closeSync(fd);
96121
96121
  }
96122
- fs.renameSync(temp, sidecarPath);
96122
+ syncFs.renameSync(temp, sidecarPath);
96123
96123
  } catch (err) {
96124
96124
  try {
96125
- fs.rmSync(temp, { force: true });
96125
+ syncFs.rmSync(temp, { force: true });
96126
96126
  } catch {}
96127
96127
  throw err;
96128
96128
  }
@@ -96147,7 +96147,7 @@ function parseHolderSidecar(raw) {
96147
96147
  function readHolderSidecar(sidecarPath) {
96148
96148
  let raw;
96149
96149
  try {
96150
- raw = fs.readFileSync(sidecarPath, "utf8");
96150
+ raw = syncFs.readFileSync(sidecarPath, "utf8");
96151
96151
  } catch {
96152
96152
  return;
96153
96153
  }
@@ -96158,7 +96158,7 @@ async function readHolderSidecarBriefly(sidecarPath, timeoutMs = 1e3) {
96158
96158
  for (;;) {
96159
96159
  let raw;
96160
96160
  try {
96161
- raw = fs.readFileSync(sidecarPath, "utf8");
96161
+ raw = syncFs.readFileSync(sidecarPath, "utf8");
96162
96162
  } catch {
96163
96163
  raw = void 0;
96164
96164
  }
@@ -96322,7 +96322,7 @@ async function claimExclusivePartial(destPath) {
96322
96322
  for (let attempt = 0; attempt < 3; attempt += 1) {
96323
96323
  const candidate = `${destPath}.${process.pid}.${randomBytes(8).toString("hex")}.partial`;
96324
96324
  try {
96325
- await (await fs$1.open(candidate, "wx", 384)).close();
96325
+ await (await fs.open(candidate, "wx", 384)).close();
96326
96326
  return candidate;
96327
96327
  } catch (err) {
96328
96328
  if (err.code !== "EEXIST") throw err;
@@ -96341,7 +96341,7 @@ async function backupSqliteSessionDatabase(params) {
96341
96341
  const dbPath = path.resolve(params.dbPath);
96342
96342
  const destPath = path.resolve(params.destPath);
96343
96343
  for (const guarded of protectedLivePaths(dbPath)) if (sameFile$1(destPath, guarded)) throw new Error("backup destination must not be the live database or its owner lock, holder sidecar, or journal files");
96344
- await fs$1.mkdir(path.dirname(destPath), {
96344
+ await fs.mkdir(path.dirname(destPath), {
96345
96345
  recursive: true,
96346
96346
  mode: 448
96347
96347
  });
@@ -96353,14 +96353,14 @@ async function backupSqliteSessionDatabase(params) {
96353
96353
  gated: sqliteBackupTestHooks.holdWorkerAtGate === true,
96354
96354
  writableSource: false
96355
96355
  });
96356
- await fs$1.rename(partialPath, destPath);
96356
+ await fs.rename(partialPath, destPath);
96357
96357
  } catch (err) {
96358
- await fs$1.rm(partialPath, { force: true }).catch(() => {});
96358
+ await fs.rm(partialPath, { force: true }).catch(() => {});
96359
96359
  throw err;
96360
96360
  }
96361
96361
  return {
96362
96362
  path: destPath,
96363
- bytes: (await fs$1.stat(destPath)).size
96363
+ bytes: (await fs.stat(destPath)).size
96364
96364
  };
96365
96365
  }
96366
96366
 
@@ -96382,7 +96382,7 @@ const INCARNATION_SELECT_SQL = "SELECT id FROM ctx_legacy_import_incarnation LIM
96382
96382
  async function readDbIncarnationId(dbPath) {
96383
96383
  let db;
96384
96384
  try {
96385
- await fs$1.stat(dbPath);
96385
+ await fs.stat(dbPath);
96386
96386
  db = new DatabaseSync(dbPath);
96387
96387
  const row = db.prepare(INCARNATION_SELECT_SQL).get();
96388
96388
  return typeof row?.id === "string" ? row.id : void 0;
@@ -96434,7 +96434,7 @@ async function takePreImportLegacySnapshot(params) {
96434
96434
  const marked = await readSnapshotMarker(backupsDir, canonicalDbPath);
96435
96435
  if (marked) return marked;
96436
96436
  if ((await params.listReceipts()).length > 0) return;
96437
- await fs$1.mkdir(backupsDir, {
96437
+ await fs.mkdir(backupsDir, {
96438
96438
  recursive: true,
96439
96439
  mode: 448
96440
96440
  });
@@ -96445,7 +96445,7 @@ async function takePreImportLegacySnapshot(params) {
96445
96445
  dbPath,
96446
96446
  destPath
96447
96447
  });
96448
- if (dbId !== void 0) await fs$1.writeFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), `${JSON.stringify({
96448
+ if (dbId !== void 0) await fs.writeFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), `${JSON.stringify({
96449
96449
  path: backup.path,
96450
96450
  createdAt: (/* @__PURE__ */ new Date()).toISOString(),
96451
96451
  canonicalDbPath,
@@ -96463,17 +96463,17 @@ async function takePreImportLegacySnapshot(params) {
96463
96463
  */
96464
96464
  async function cleanupPartialLegacyBackups(stateDir) {
96465
96465
  const backupsDir = path.join(stateDir, "backups");
96466
- const names = await fs$1.readdir(backupsDir).catch(() => []);
96466
+ const names = await fs.readdir(backupsDir).catch(() => []);
96467
96467
  for (const name of names) {
96468
96468
  if (!name.endsWith(".partial")) continue;
96469
- await fs$1.rm(path.join(backupsDir, name), { force: true }).catch(() => void 0);
96469
+ await fs.rm(path.join(backupsDir, name), { force: true }).catch(() => void 0);
96470
96470
  }
96471
96471
  }
96472
96472
  async function readSnapshotMarker(backupsDir, canonicalDbPath) {
96473
96473
  const currentIncarnationId = await readDbIncarnationId(canonicalDbPath);
96474
96474
  const keyed = await readMarkerFile(path.join(backupsDir, snapshotMarkerFile(canonicalDbPath)), canonicalDbPath, currentIncarnationId);
96475
96475
  if (keyed !== void 0) return keyed;
96476
- const names = await fs$1.readdir(backupsDir).catch(() => []);
96476
+ const names = await fs.readdir(backupsDir).catch(() => []);
96477
96477
  for (const name of names) {
96478
96478
  if (!name.startsWith(SNAPSHOT_MARKER_PREFIX) || !name.endsWith(".json")) continue;
96479
96479
  const found = await readMarkerFile(path.join(backupsDir, name), canonicalDbPath, currentIncarnationId);
@@ -96482,7 +96482,7 @@ async function readSnapshotMarker(backupsDir, canonicalDbPath) {
96482
96482
  return readMarkerFile(path.join(backupsDir, SNAPSHOT_MARKER_FILE), canonicalDbPath, currentIncarnationId);
96483
96483
  }
96484
96484
  async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId) {
96485
- const raw = await fs$1.readFile(markerFile, "utf8").catch(() => void 0);
96485
+ const raw = await fs.readFile(markerFile, "utf8").catch(() => void 0);
96486
96486
  if (!raw) return;
96487
96487
  try {
96488
96488
  const parsed = JSON.parse(raw);
@@ -96494,7 +96494,7 @@ async function readMarkerFile(markerFile, canonicalDbPath, currentIncarnationId)
96494
96494
  if (currentIncarnationId !== void 0 && currentIncarnationId === markerId) return markerPath;
96495
96495
  return;
96496
96496
  }
96497
- const [markerStat, dbStat] = await Promise.all([fs$1.stat(markerDbPath).catch(() => void 0), fs$1.stat(canonicalDbPath).catch(() => void 0)]);
96497
+ const [markerStat, dbStat] = await Promise.all([fs.stat(markerDbPath).catch(() => void 0), fs.stat(canonicalDbPath).catch(() => void 0)]);
96498
96498
  if (markerStat !== void 0 && dbStat !== void 0 ? markerStat.dev === dbStat.dev && markerStat.ino === dbStat.ino : markerDbPath === canonicalDbPath) return markerPath;
96499
96499
  }
96500
96500
  } catch {}
@@ -96760,7 +96760,7 @@ const log$16 = createSubsystemLogger("config/sessions/legacy-import/index-import
96760
96760
  async function readLegacyIndexStore(storePath) {
96761
96761
  let raw;
96762
96762
  try {
96763
- raw = await fs$1.readFile(storePath, "utf8");
96763
+ raw = await fs.readFile(storePath, "utf8");
96764
96764
  } catch (error) {
96765
96765
  throw new Error(`legacy index source unreadable: ${storePath}`, { cause: error });
96766
96766
  }
@@ -96999,7 +96999,7 @@ async function importLegacyIndex(runtime, source, opts = {}) {
96999
96999
  actorExplicit: entry.actor !== void 0
97000
97000
  }), opts.signal);
97001
97001
  if (transcriptPath && opts.discoveredTranscripts && path.resolve(transcriptPath) !== path.resolve(source.path)) try {
97002
- const stats = await fs$1.stat(transcriptPath);
97002
+ const stats = await fs.stat(transcriptPath);
97003
97003
  if (stats.isFile()) opts.discoveredTranscripts.push({
97004
97004
  path: transcriptPath,
97005
97005
  kind: "transcript",
@@ -97115,7 +97115,7 @@ async function loadSessionKeyOverrides(stateDir) {
97115
97115
  const filePath = path.join(stateDir, "recovery", SESSION_KEY_OVERRIDES_FILENAME);
97116
97116
  let raw;
97117
97117
  try {
97118
- raw = await fs$1.readFile(filePath, "utf8");
97118
+ raw = await fs.readFile(filePath, "utf8");
97119
97119
  } catch (error) {
97120
97120
  if (error.code !== "ENOENT") log$14.warn("session key overrides unreadable; ignoring", { error });
97121
97121
  return /* @__PURE__ */ new Map();
@@ -98584,14 +98584,14 @@ function isGatewayArgv(args) {
98584
98584
  }
98585
98585
  function readLinuxCmdline(pid) {
98586
98586
  try {
98587
- return parseProcCmdline(fs.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
98587
+ return parseProcCmdline(syncFs.readFileSync(`/proc/${pid}/cmdline`, "utf8"));
98588
98588
  } catch {
98589
98589
  return null;
98590
98590
  }
98591
98591
  }
98592
98592
  function readLinuxStartTime(pid) {
98593
98593
  try {
98594
- const raw = fs.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
98594
+ const raw = syncFs.readFileSync(`/proc/${pid}/stat`, "utf8").trim();
98595
98595
  const closeParen = raw.lastIndexOf(")");
98596
98596
  if (closeParen < 0) return null;
98597
98597
  const fields = raw.slice(closeParen + 1).trim().split(/\s+/);
@@ -98645,7 +98645,7 @@ async function resolveGatewayOwnerStatus(pid, payload, platform, port) {
98645
98645
  }
98646
98646
  async function readLockPayload(lockPath) {
98647
98647
  try {
98648
- const raw = await fs$1.readFile(lockPath, "utf8");
98648
+ const raw = await fs.readFile(lockPath, "utf8");
98649
98649
  const parsed = JSON.parse(raw);
98650
98650
  if (typeof parsed.pid !== "number") return null;
98651
98651
  if (typeof parsed.createdAt !== "string") return null;
@@ -99030,7 +99030,7 @@ async function withMemoryManagerForAgent(params) {
99030
99030
  }
99031
99031
  async function checkReadableFile(pathname) {
99032
99032
  try {
99033
- await fs$1.access(pathname, fs.constants.R_OK);
99033
+ await fs.access(pathname, syncFs.constants.R_OK);
99034
99034
  return { exists: true };
99035
99035
  } catch (err) {
99036
99036
  const code = err.code;
@@ -99065,7 +99065,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
99065
99065
  if (alt.issue) issues.push(alt.issue);
99066
99066
  const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
99067
99067
  for (const extraPath of resolvedExtraPaths) try {
99068
- if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
99068
+ if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
99069
99069
  const extraCheck = await checkReadableFile(extraPath);
99070
99070
  if (extraCheck.issue) issues.push(extraCheck.issue);
99071
99071
  } catch (err) {
@@ -99075,7 +99075,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
99075
99075
  }
99076
99076
  let dirReadable = null;
99077
99077
  try {
99078
- await fs$1.access(memoryDir, fs.constants.R_OK);
99078
+ await fs.access(memoryDir, syncFs.constants.R_OK);
99079
99079
  dirReadable = true;
99080
99080
  } catch (err) {
99081
99081
  const code = err.code;
@@ -99123,7 +99123,7 @@ async function summarizeQmdIndexArtifact(manager) {
99123
99123
  if (!dbPath) return null;
99124
99124
  let stat;
99125
99125
  try {
99126
- stat = await fs$1.stat(dbPath);
99126
+ stat = await fs.stat(dbPath);
99127
99127
  } catch (err) {
99128
99128
  const code = err.code;
99129
99129
  if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
@@ -99590,7 +99590,7 @@ function createPluginRuntime(options = {}) {
99590
99590
  workStates: readTaskWorkStates
99591
99591
  },
99592
99592
  resolveLearningWorkspaceDir: (agentId) => resolveLearningWorkspaceDir(loadConfig(), agentId),
99593
- sessions: { startUserRun: async (params) => (await import("./user-run-recording-B1HujJiT.js").then((n) => n.n)).startUserSessionRun(params) }
99593
+ sessions: { startUserRun: async (params) => (await import("./user-run-recording-8MZq1Us4.js").then((n) => n.n)).startUserSessionRun(params) }
99594
99594
  };
99595
99595
  Object.defineProperty(runtime, "analysis", {
99596
99596
  enumerable: true,
@@ -99633,7 +99633,7 @@ const resolvePluginSdkAliasFile = (params) => {
99633
99633
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
99634
99634
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
99635
99635
  const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
99636
- for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
99636
+ for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
99637
99637
  const parent = path.dirname(cursor);
99638
99638
  if (parent === cursor) break;
99639
99639
  cursor = parent;
@@ -100176,7 +100176,7 @@ function loadOpenClawPlugins(options = {}) {
100176
100176
  continue;
100177
100177
  }
100178
100178
  const safeSource = opened.path;
100179
- fs.closeSync(opened.fd);
100179
+ syncFs.closeSync(opened.fd);
100180
100180
  let mod = null;
100181
100181
  try {
100182
100182
  mod = getJiti()(safeSource);
@@ -100339,7 +100339,7 @@ function loadOpenClawPlugins(options = {}) {
100339
100339
  }
100340
100340
  function safeRealpathOrResolve(value) {
100341
100341
  try {
100342
- return fs.realpathSync(value);
100342
+ return syncFs.realpathSync(value);
100343
100343
  } catch {
100344
100344
  return path.resolve(value);
100345
100345
  }
@@ -100497,7 +100497,7 @@ function resolvePluginWebSearchProviders(params) {
100497
100497
  //#endregion
100498
100498
  //#region src/agents/apply-patch-update.ts
100499
100499
  async function defaultReadFile(filePath) {
100500
- return fs$1.readFile(filePath, "utf8");
100500
+ return fs.readFile(filePath, "utf8");
100501
100501
  }
100502
100502
  async function applyUpdateHunk(filePath, chunks, options) {
100503
100503
  const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
@@ -100818,7 +100818,7 @@ function resolvePatchFileOps(options) {
100818
100818
  const workspaceOnly = options.workspaceOnly !== false;
100819
100819
  return {
100820
100820
  readFile: async (filePath) => {
100821
- if (!workspaceOnly) return await fs$1.readFile(filePath, "utf8");
100821
+ if (!workspaceOnly) return await fs.readFile(filePath, "utf8");
100822
100822
  const opened = await openBoundaryFile({
100823
100823
  absolutePath: filePath,
100824
100824
  rootPath: options.cwd,
@@ -100826,14 +100826,14 @@ function resolvePatchFileOps(options) {
100826
100826
  });
100827
100827
  assertBoundaryRead(opened, filePath);
100828
100828
  try {
100829
- return fs.readFileSync(opened.fd, "utf8");
100829
+ return syncFs.readFileSync(opened.fd, "utf8");
100830
100830
  } finally {
100831
- fs.closeSync(opened.fd);
100831
+ syncFs.closeSync(opened.fd);
100832
100832
  }
100833
100833
  },
100834
100834
  writeFile: async (filePath, content) => {
100835
100835
  if (!workspaceOnly) {
100836
- await fs$1.writeFile(filePath, content, "utf8");
100836
+ await fs.writeFile(filePath, content, "utf8");
100837
100837
  return;
100838
100838
  }
100839
100839
  const relative = toRelativeSandboxPath(options.cwd, filePath);
@@ -100844,8 +100844,8 @@ function resolvePatchFileOps(options) {
100844
100844
  encoding: "utf8"
100845
100845
  });
100846
100846
  },
100847
- remove: (filePath) => fs$1.rm(filePath),
100848
- mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
100847
+ remove: (filePath) => fs.rm(filePath),
100848
+ mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
100849
100849
  };
100850
100850
  }
100851
100851
  async function ensureDir(filePath, ops) {
@@ -101124,7 +101124,7 @@ async function recordLoopOutcome(args) {
101124
101124
  if (!args.ctx?.sessionKey) return;
101125
101125
  try {
101126
101126
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bnyx-w0F.js").then((n) => n.n);
101127
- const { recordToolCallOutcome } = await import("./tool-loop-detection-BqyMjpvr.js");
101127
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-Bw8B0hV3.js");
101128
101128
  recordToolCallOutcome(getDiagnosticSessionState({
101129
101129
  sessionKey: args.ctx.sessionKey,
101130
101130
  sessionId: args.ctx?.agentId
@@ -101151,8 +101151,8 @@ async function runBeforeToolCallHook(args) {
101151
101151
  const params = args.params;
101152
101152
  if (args.ctx?.sessionKey) {
101153
101153
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Bnyx-w0F.js").then((n) => n.n);
101154
- const { logToolLoopAction } = await import("./diagnostic-N82VS3Qp.js").then((n) => n.n);
101155
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-BqyMjpvr.js");
101154
+ const { logToolLoopAction } = await import("./diagnostic-Dn_o8RGN.js").then((n) => n.n);
101155
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Bw8B0hV3.js");
101156
101156
  const sessionState = getDiagnosticSessionState({
101157
101157
  sessionKey: args.ctx.sessionKey,
101158
101158
  sessionId: args.ctx?.agentId
@@ -101370,7 +101370,7 @@ function wrapHostEditToolWithPostWriteRecovery(base, root) {
101370
101370
  if (!pathParam || !newText) throw err;
101371
101371
  try {
101372
101372
  const absolutePath = resolveHostEditPath(root, pathParam);
101373
- const content = await fs$1.readFile(absolutePath, "utf-8");
101373
+ const content = await fs.readFile(absolutePath, "utf-8");
101374
101374
  const hasNew = content.includes(newText);
101375
101375
  const stillHasOld = oldText !== void 0 && oldText.length > 0 && content.includes(oldText);
101376
101376
  if (hasNew && !stillHasOld) return {
@@ -101841,14 +101841,14 @@ function createSandboxEditOperations(params) {
101841
101841
  }
101842
101842
  async function writeHostFile(absolutePath, content) {
101843
101843
  const resolved = path.resolve(absolutePath);
101844
- await fs$1.mkdir(path.dirname(resolved), { recursive: true });
101845
- await fs$1.writeFile(resolved, content, "utf-8");
101844
+ await fs.mkdir(path.dirname(resolved), { recursive: true });
101845
+ await fs.writeFile(resolved, content, "utf-8");
101846
101846
  }
101847
101847
  function createHostWriteOperations(root, options) {
101848
101848
  if (!(options?.workspaceOnly ?? false)) return {
101849
101849
  mkdir: async (dir) => {
101850
101850
  const resolved = path.resolve(dir);
101851
- await fs$1.mkdir(resolved, { recursive: true });
101851
+ await fs.mkdir(resolved, { recursive: true });
101852
101852
  },
101853
101853
  writeFile: writeHostFile
101854
101854
  };
@@ -101861,7 +101861,7 @@ function createHostWriteOperations(root, options) {
101861
101861
  cwd: root,
101862
101862
  root
101863
101863
  });
101864
- await fs$1.mkdir(resolved, { recursive: true });
101864
+ await fs.mkdir(resolved, { recursive: true });
101865
101865
  },
101866
101866
  writeFile: async (absolutePath, content) => {
101867
101867
  await writeFileWithinRoot({
@@ -101877,12 +101877,12 @@ function createHostEditOperations(root, options) {
101877
101877
  if (!(options?.workspaceOnly ?? false)) return {
101878
101878
  readFile: async (absolutePath) => {
101879
101879
  const resolved = path.resolve(absolutePath);
101880
- return await fs$1.readFile(resolved);
101880
+ return await fs.readFile(resolved);
101881
101881
  },
101882
101882
  writeFile: writeHostFile,
101883
101883
  access: async (absolutePath) => {
101884
101884
  const resolved = path.resolve(absolutePath);
101885
- await fs$1.access(resolved);
101885
+ await fs.access(resolved);
101886
101886
  }
101887
101887
  };
101888
101888
  return {
@@ -103057,9 +103057,9 @@ async function readWorkspaceContextForSummary() {
103057
103057
  if (!opened.ok) return "";
103058
103058
  const sections = extractSections((() => {
103059
103059
  try {
103060
- return fs.readFileSync(opened.fd, "utf-8");
103060
+ return syncFs.readFileSync(opened.fd, "utf-8");
103061
103061
  } finally {
103062
- fs.closeSync(opened.fd);
103062
+ syncFs.closeSync(opened.fd);
103063
103063
  }
103064
103064
  })(), ["Session Startup", "Red Lines"]);
103065
103065
  if (sections.length === 0) return "";
@@ -104584,14 +104584,14 @@ async function compactEmbeddedPiSessionDirect(params) {
104584
104584
  if (!apiKeyInfo.apiKey) {
104585
104585
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
104586
104586
  } else if (model.provider === "github-copilot") {
104587
- const { resolveCopilotApiToken } = await import("./github-copilot-token-DYYKoDuV.js").then((n) => n.n);
104587
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DHoyZ4I0.js").then((n) => n.n);
104588
104588
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
104589
104589
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
104590
104590
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
104591
104591
  } catch (err) {
104592
104592
  return fail(describeUnknownError(err));
104593
104593
  }
104594
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
104594
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
104595
104595
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
104596
104596
  const sandbox = await resolveSandboxContext({
104597
104597
  config: params.config,
@@ -104600,7 +104600,7 @@ async function compactEmbeddedPiSessionDirect(params) {
104600
104600
  workspaceLane: params.workspaceLane
104601
104601
  });
104602
104602
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
104603
- await fs$1.mkdir(effectiveWorkspace, { recursive: true });
104603
+ await fs.mkdir(effectiveWorkspace, { recursive: true });
104604
104604
  let restoreSkillEnv;
104605
104605
  const releaseWorkspaceCwd = acquireWorkspaceCwd(effectiveWorkspace);
104606
104606
  try {
@@ -110977,7 +110977,7 @@ async function runEmbeddedAttempt(params) {
110977
110977
  let embeddedAttemptBegun = false;
110978
110978
  const runAbortController = new AbortController();
110979
110979
  log$52.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
110980
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
110980
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
110981
110981
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
110982
110982
  const toolSessionKey = params.toolSessionKey?.trim() || sandboxSessionKey;
110983
110983
  const sandbox = params.skipSandbox ? null : await resolveSandboxContext({
@@ -110987,7 +110987,7 @@ async function runEmbeddedAttempt(params) {
110987
110987
  workspaceLane: params.workspaceLane
110988
110988
  });
110989
110989
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
110990
- await fs$1.mkdir(effectiveWorkspace, { recursive: true });
110990
+ await fs.mkdir(effectiveWorkspace, { recursive: true });
110991
110991
  let restoreSkillEnv;
110992
110992
  const releaseWorkspaceCwd = params.skipCwdChange ? void 0 : acquireWorkspaceCwd(effectiveWorkspace);
110993
110993
  const rawToolResultStash = openRawToolResultStash(params.sessionId);
@@ -112637,7 +112637,7 @@ async function runEmbeddedPiAgent(params) {
112637
112637
  await copilotTokenState.refreshInFlight;
112638
112638
  return;
112639
112639
  }
112640
- const { resolveCopilotApiToken } = await import("./github-copilot-token-DYYKoDuV.js").then((n) => n.n);
112640
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DHoyZ4I0.js").then((n) => n.n);
112641
112641
  copilotTokenState.refreshInFlight = (async () => {
112642
112642
  const githubToken = copilotTokenState.githubToken.trim();
112643
112643
  if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
@@ -112729,7 +112729,7 @@ async function runEmbeddedPiAgent(params) {
112729
112729
  return;
112730
112730
  }
112731
112731
  if (model.provider === "github-copilot") {
112732
- const { resolveCopilotApiToken } = await import("./github-copilot-token-DYYKoDuV.js").then((n) => n.n);
112732
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-DHoyZ4I0.js").then((n) => n.n);
112733
112733
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
112734
112734
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
112735
112735
  if (copilotTokenState) {
@@ -112851,7 +112851,7 @@ async function runEmbeddedPiAgent(params) {
112851
112851
  const copilotAuthRetry = authRetryPending;
112852
112852
  authRetryPending = false;
112853
112853
  attemptedThinking.add(thinkLevel);
112854
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
112854
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
112855
112855
  const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
112856
112856
  const attempt = await runEmbeddedAttempt({
112857
112857
  sessionId: params.sessionId,