@bitseek/claw 1.3.6 → 1.3.8-beta.1

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 (180) hide show
  1. package/dist/{accounts-CX1yOBOk.js → accounts-BTexwKe8.js} +1 -1
  2. package/dist/{accounts-Bwq1wvds.js → accounts-DMvETf-t.js} +1 -1
  3. package/dist/{accounts-CaiECgq3.js → accounts-ubG6irXZ.js} +16 -16
  4. package/dist/{active-listener-neKWQsOO.js → active-listener-Hd9sOu9T.js} +1 -1
  5. package/dist/{agent-scope-CTbRzU1C.js → agent-scope-C6hps0r3.js} +4 -4
  6. package/dist/{agents-BqONdWNu.js → agents-4yiCX5vO.js} +4 -4
  7. package/dist/{agents.config-2cTTTDPj.js → agents.config-C26BMyOA.js} +1 -1
  8. package/dist/{agents.config-DhIvFsFv.js → agents.config-C4xJzUcO.js} +1 -1
  9. package/dist/{api-key-rotation-BbZD-rsQ.js → api-key-rotation-Cv5_SG_o.js} +2 -2
  10. package/dist/{audio-preflight-C5Crv38h.js → audio-preflight-C2pZmbnM.js} +39 -39
  11. package/dist/{audio-transcription-runner-eVtEKUPC.js → audio-transcription-runner-CQ4BMvGX.js} +11 -11
  12. package/dist/{auth-choice-D6WGnKQk.js → auth-choice-Cpai95xS.js} +1 -1
  13. package/dist/{auth-choice-lhaABxGx.js → auth-choice-D9W2yx7x.js} +1 -1
  14. package/dist/{banner-CMCfl-_K.js → banner-DtaJorEc.js} +1 -1
  15. package/dist/{bindings-Daa-Etag.js → bindings-CsIiIjqN.js} +2 -2
  16. package/dist/build-info.json +2 -2
  17. package/dist/bundled/boot-md/handler.js +65 -65
  18. package/dist/bundled/bootstrap-extra-files/handler.js +7 -7
  19. package/dist/bundled/command-logger/handler.js +2 -2
  20. package/dist/bundled/session-memory/handler.js +65 -65
  21. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  22. package/dist/{channel-activity-D0BHmeoE.js → channel-activity-Dwc2BBvs.js} +3 -3
  23. package/dist/{channel-options-gDhT85r4.js → channel-options-D3Ck-1W2.js} +1 -1
  24. package/dist/{channel-options-Didnr81h.js → channel-options-DffMDeTp.js} +1 -1
  25. package/dist/{channel-web-C45x6ahP.js → channel-web-BB66exAr.js} +1 -1
  26. package/dist/{channel-web-rP0VBNIt.js → channel-web-zni8DLt7.js} +1 -1
  27. package/dist/{channels-cli-CZQbGl-H.js → channels-cli-D_gj850i.js} +6 -6
  28. package/dist/{channels-cli-BpiA2BQE.js → channels-cli-IQCAixeN.js} +6 -6
  29. package/dist/{chrome-BRjY_MCc.js → chrome-DWfXErGH.js} +26 -26
  30. package/dist/{chunk-Dfkbh8wX.js → chunk-2ZxftpDd.js} +1 -1
  31. package/dist/{cli-Cvdtw0CY.js → cli-BlPS7kZ9.js} +1 -1
  32. package/dist/{cli-D5yg1LCm.js → cli-CrgfzbyT.js} +1 -1
  33. package/dist/{command-registry-BSN6zVlZ.js → command-registry-CjTwwZuF.js} +11 -11
  34. package/dist/{commands-registry-NyRDVN7s.js → commands-registry-CTkboeeC.js} +5 -5
  35. package/dist/{completion-cli-BDeiV4p9.js → completion-cli-CgjnsXtn.js} +1 -1
  36. package/dist/{completion-cli-lZ6S6oKA.js → completion-cli-Clj1_156.js} +2 -2
  37. package/dist/{config-cli-C-yIXgGr.js → config-cli-CE1eTqAM.js} +1 -1
  38. package/dist/{config-cli-BtvOIDkG.js → config-cli-DwKVeQtE.js} +1 -1
  39. package/dist/{configure-DflayaB2.js → configure-BCUvl2Zf.js} +3 -3
  40. package/dist/{configure-CgbTpfrx.js → configure-D2KyFnr8.js} +3 -3
  41. package/dist/{deliver-DlLNT2iR.js → deliver-zrYSWfQ5.js} +22 -22
  42. package/dist/{diagnostic-DpOlXoSr.js → diagnostic-BO1GQJJf.js} +2 -2
  43. package/dist/{dock-DXlPVrMo.js → dock-Bm23mfim.js} +6 -6
  44. package/dist/{doctor-completion-BKCOmkBi.js → doctor-completion-BoZbJ2cC.js} +1 -1
  45. package/dist/{doctor-completion-Bim4XRFT.js → doctor-completion-CACrVkvp.js} +1 -1
  46. package/dist/entry.js +2 -2
  47. package/dist/{env-Bn6pmvjK.js → env-DNMZEG57.js} +2 -2
  48. package/dist/{errors-Ct2kCLWx.js → errors-B11yhRo6.js} +1 -1
  49. package/dist/extensionAPI.js +1 -1
  50. package/dist/{fetch-2cO0rj7X.js → fetch-4RonjgqX.js} +5 -5
  51. package/dist/{fetch-guard-iigSYt3Q.js → fetch-guard-B1EGEHan.js} +2 -2
  52. package/dist/{frontmatter-rlCI8Hmw.js → frontmatter-D6vByAHn.js} +2 -2
  53. package/dist/{fs-safe-CM9EhGvi.js → fs-safe-C77EShMC.js} +4 -4
  54. package/dist/{gateway-cli-CDgld1qp.js → gateway-cli-BUFxEad5.js} +8 -8
  55. package/dist/{gateway-cli-8DmbQc9V.js → gateway-cli-D9mIlXNc.js} +8 -8
  56. package/dist/{github-copilot-token-CPjAmbfr.js → github-copilot-token-DLGN-8YS.js} +7 -7
  57. package/dist/{health-Gkd0akfz.js → health-Cjj_F37M.js} +1 -1
  58. package/dist/{health-DaN3xECS.js → health-CpbNiL9A.js} +1 -1
  59. package/dist/{hooks-cli-gRM8FMyG.js → hooks-cli-C0lC4Kj0.js} +2 -2
  60. package/dist/{hooks-cli-n5Weiheq.js → hooks-cli-DRkHJxMs.js} +2 -2
  61. package/dist/{image-BWlmyhr-.js → image-DnxYCkHO.js} +6 -6
  62. package/dist/{image-ops-jvmQoiyw.js → image-ops-DCpyia_K.js} +1 -1
  63. package/dist/index.js +6 -6
  64. package/dist/{internal-hooks-oLQ2m8YT.js → internal-hooks-yQe6H47q.js} +1 -1
  65. package/dist/{ir-pR36nI-3.js → ir-DcDVAFj3.js} +6 -6
  66. package/dist/llm-slug-generator.js +65 -65
  67. package/dist/{logger-DelEB7MK.js → logger-BlH5MJiV.js} +1 -1
  68. package/dist/{login-Cm2zDfEU.js → login-CgEHUE7h.js} +6 -6
  69. package/dist/{login-qr-iS1jPDpP.js → login-qr-DUJfhbUe.js} +13 -13
  70. package/dist/{manager-BX3KtavU.js → manager-tozHviEd.js} +15 -15
  71. package/dist/{markdown-tables-pfs_NCNh.js → markdown-tables-BHONoo6S.js} +1 -1
  72. package/dist/{message-channel-DB68nc40.js → message-channel-pbgFFUNm.js} +1 -1
  73. package/dist/{model-selection-DfZMxaX3.js → model-selection-D_Si2Ict.js} +44 -44
  74. package/dist/{models-CJodAVSF.js → models-De_qVfBK.js} +2 -2
  75. package/dist/{models-cli-B1Dwj01V.js → models-cli-By7lFchJ.js} +2 -2
  76. package/dist/{models-cli-Ceb37L0t.js → models-cli-aJswKT_o.js} +3 -3
  77. package/dist/{npm-resolution-B5fqS6mO.js → npm-resolution-BiJCUhct.js} +1 -1
  78. package/dist/{npm-resolution-dNC8uD0I.js → npm-resolution-Ez_78UD2.js} +1 -1
  79. package/dist/{onboard-sKY5jwsH.js → onboard-CIrRD9vz.js} +2 -2
  80. package/dist/{onboard-BcaFvsav.js → onboard-DQJ6ZB5N.js} +2 -2
  81. package/dist/{onboard-channels-DPIysHDh.js → onboard-channels-AbBziYo3.js} +1 -1
  82. package/dist/{onboard-channels-DQ1rkv4c.js → onboard-channels-yslMqzIm.js} +1 -1
  83. package/dist/{onboarding-BRfS3PSa.js → onboarding-CIsQzEx6.js} +3 -3
  84. package/dist/{onboarding-JNyox6ZE.js → onboarding-exdNo-8e.js} +3 -3
  85. package/dist/{onboarding.finalize-CG9tTRyw.js → onboarding.finalize-BqpH39L7.js} +5 -5
  86. package/dist/{onboarding.finalize-hBg4b8IC.js → onboarding.finalize-spYqvVP0.js} +6 -6
  87. package/dist/{outbound-N9_vLIGT.js → outbound-9rXkgGZM.js} +7 -7
  88. package/dist/{outbound-attachment-CEt49GWZ.js → outbound-attachment-Cy8rvvJE.js} +2 -2
  89. package/dist/{path-alias-guards-xY_GOJVd.js → path-alias-guards-Cpb5gMG6.js} +1 -1
  90. package/dist/{paths-Bi8MJ8NM.js → paths-BHEVctLd.js} +3 -3
  91. package/dist/{paths-DKuX7-1L.js → paths-aGRLvQx9.js} +5 -5
  92. package/dist/{pi-embedded-cmJctBve.js → pi-embedded-BW8O-Z_R.js} +109 -15
  93. package/dist/{pi-embedded-CDXssetE.js → pi-embedded-DLrpQftt.js} +292 -198
  94. package/dist/{pi-embedded-helpers-DSPiPpLM.js → pi-embedded-helpers-Bo7e-QzJ.js} +29 -29
  95. package/dist/{pi-model-discovery-N7o4F93J.js → pi-model-discovery-DA46fxhD.js} +7 -7
  96. package/dist/{plugin-registry-NaHPDM1s.js → plugin-registry-CgjiDSJy.js} +1 -1
  97. package/dist/{plugin-registry-2CmN8Jv2.js → plugin-registry-DXEjCmXY.js} +1 -1
  98. package/dist/plugin-sdk/agents/pi-tools.read.d.ts +1 -0
  99. package/dist/plugin-sdk/{channel-web-Dn5fneOY.js → channel-web-BhgjzJX5.js} +1 -1
  100. package/dist/plugin-sdk/index.js +2 -2
  101. package/dist/plugin-sdk/{reply-rsLB0nJs.js → reply-CLQkx08P.js} +107 -13
  102. package/dist/plugin-sdk/{web-RBob4uU1.js → web-D5yQYvYF.js} +2 -2
  103. package/dist/{plugins-D63QYxW6.js → plugins-CJoaoIHc.js} +11 -11
  104. package/dist/{plugins-cli-DwKgp7q7.js → plugins-cli-CpSINdz-.js} +2 -2
  105. package/dist/{plugins-cli-o6KJO4Qe.js → plugins-cli-DKIC54hQ.js} +2 -2
  106. package/dist/{program-B_-eFyJE.js → program-R4eCXcVV.js} +7 -7
  107. package/dist/{program-context-BJQXRZ1w.js → program-context-XIBDpYkH.js} +19 -19
  108. package/dist/{prompt-select-styled-QH4mD93d.js → prompt-select-styled-CSGsMtmW.js} +4 -4
  109. package/dist/{prompt-select-styled-asxoqY78.js → prompt-select-styled-CxcE42jh.js} +4 -4
  110. package/dist/{provider-auth-helpers-hI1pbI9r.js → provider-auth-helpers-BPwzCB_M.js} +1 -1
  111. package/dist/{provider-auth-helpers-CzSm0FSu.js → provider-auth-helpers-BqRZaAgE.js} +1 -1
  112. package/dist/{proxy-jINniQBi.js → proxy-DfJJLvch.js} +1 -1
  113. package/dist/{proxy-env-Drg9J503.js → proxy-env-ynOWOBHx.js} +1 -1
  114. package/dist/{proxy-fetch-AvkSvetA.js → proxy-fetch-xlbVQYN_.js} +1 -1
  115. package/dist/{push-apns-DZ0qaSFA.js → push-apns-BFPYim-z.js} +1 -1
  116. package/dist/{push-apns-DMeB2M_b.js → push-apns-D_JirvZj.js} +1 -1
  117. package/dist/{pw-ai-gDXxKGzT.js → pw-ai-Cu3cnNF0.js} +17 -17
  118. package/dist/{qmd-manager-DXbV8CPG.js → qmd-manager-n4jauq3A.js} +11 -11
  119. package/dist/{query-expansion-C0A4WwZX.js → query-expansion-CdDUaBcQ.js} +5 -5
  120. package/dist/{redact-BC9R18Uw.js → redact-CaZQhKzI.js} +1 -1
  121. package/dist/{register.agent-D9rmYCMS.js → register.agent-Cls5qjTc.js} +6 -6
  122. package/dist/{register.agent-BBOmACUM.js → register.agent-rU2v36L0.js} +7 -7
  123. package/dist/{register.configure-CZF2XAPO.js → register.configure-BMDzBahu.js} +7 -7
  124. package/dist/{register.configure-BJ7l1h-A.js → register.configure-BUhyYBGQ.js} +7 -7
  125. package/dist/{register.init-BdPckTb9.js → register.init-CFdcOH88.js} +1 -0
  126. package/dist/{register.init-CNKrbvCo.js → register.init-pWy0PRza.js} +1 -0
  127. package/dist/{register.maintenance-B0nZqqML.js → register.maintenance-CofdyNUx.js} +7 -7
  128. package/dist/{register.maintenance-DvWoKstb.js → register.maintenance-Cy17SXVH.js} +8 -8
  129. package/dist/{register.message-BME4m1Jr.js → register.message-3BQdcipC.js} +2 -2
  130. package/dist/{register.message-Cs0mwtTw.js → register.message-Ce33qQCZ.js} +2 -2
  131. package/dist/{register.onboard-DOhvWYV7.js → register.onboard-BlcK7F0u.js} +2 -2
  132. package/dist/{register.onboard-B1-O21vU.js → register.onboard-ESEjBMtx.js} +2 -2
  133. package/dist/{register.setup-ixDBzvTR.js → register.setup-CUxHFPRL.js} +2 -2
  134. package/dist/{register.setup-KPZYo_I1.js → register.setup-N8V5bjG1.js} +2 -2
  135. package/dist/{register.start-Df91ZVJJ.js → register.start-CI8ol0Mk.js} +1 -1
  136. package/dist/{register.start-DErNT3nQ.js → register.start-D5trBtN0.js} +1 -1
  137. package/dist/{register.status-health-sessions-Czq26k6E.js → register.status-health-sessions-BKFS62CW.js} +3 -3
  138. package/dist/{register.status-health-sessions-wp3A615j.js → register.status-health-sessions-Bj4rUQRe.js} +3 -3
  139. package/dist/{register.subclis-BSGvOwqU.js → register.subclis-lEqV1Knw.js} +9 -9
  140. package/dist/{registry-C2GEGa2t.js → registry-CJCkqTms.js} +3 -3
  141. package/dist/{replies-B6I1tT5t.js → replies-D6zARd6r.js} +3 -3
  142. package/dist/{reply-OEcNPoWd.js → reply-CAA6gLtt.js} +109 -15
  143. package/dist/{reply-prefix-9mzt89Cf.js → reply-prefix-DK1i6bCJ.js} +1 -1
  144. package/dist/{resolve-route-BNElrVxR.js → resolve-route-C5hVstLo.js} +4 -4
  145. package/dist/{retry-Ayb7e4XG.js → retry-DTeP7C3h.js} +1 -1
  146. package/dist/{run-main-CdI1kXKr.js → run-main-BTmP3wme.js} +14 -14
  147. package/dist/{send-BMzVXosN.js → send--Gq-Uh-l.js} +7 -7
  148. package/dist/{send-DC_e_Iev.js → send-BpyiQEov.js} +6 -6
  149. package/dist/{send-B6QQ8XfC.js → send-CcQZM0c7.js} +8 -8
  150. package/dist/{send-Buidj_8L.js → send-D2zYssqK.js} +27 -27
  151. package/dist/{send-BQETStDl.js → send-DcL81tZr.js} +10 -10
  152. package/dist/{server-node-events-BE-B31Iv.js → server-node-events-CD_Wo8L4.js} +2 -2
  153. package/dist/{server-node-events-h5NyibKC.js → server-node-events-ap09x8RZ.js} +2 -2
  154. package/dist/{session-meta-DAMj6ZRX.js → session-meta-BbCwXniv.js} +2 -2
  155. package/dist/{session-TVb8hgJP.js → session-xKPVUYQP.js} +9 -9
  156. package/dist/{sessions-Ck4ZR4dY.js → sessions-D7EjW0sG.js} +31 -31
  157. package/dist/{skill-commands-KesfMtZ9.js → skill-commands-Cea3CZFF.js} +9 -9
  158. package/dist/{skills-BYmEoxNo.js → skills-BttlqUXr.js} +22 -22
  159. package/dist/{status-CmNVuywF.js → status-CB2Fs5iL.js} +2 -2
  160. package/dist/{status-D_I-fLJF.js → status-DCtLhxlh.js} +2 -2
  161. package/dist/{store-KLMMBnKE.js → store-B7PaqfvZ.js} +2 -2
  162. package/dist/{subagent-registry-D4xGq2uc.js → subagent-registry-B4xJjOu2.js} +109 -15
  163. package/dist/{subsystem-CAatx5oo.js → subsystem-BRjuJbbM.js} +14 -14
  164. package/dist/{tables-DqechQWF.js → tables-BJ0XAman.js} +1 -1
  165. package/dist/{target-errors-C-KolUyX.js → target-errors-Dad0aUFR.js} +2 -2
  166. package/dist/{tokens-BvzZdrVJ.js → tokens-B9EDT4jv.js} +1 -1
  167. package/dist/{tool-images-DiKIlElg.js → tool-images-ArXzv82F.js} +2 -2
  168. package/dist/{tool-loop-detection-C4V990MS.js → tool-loop-detection-CLoYKYIq.js} +3 -3
  169. package/dist/{update-cli-CfeiDzYx.js → update-cli-BIMys5Ua.js} +7 -7
  170. package/dist/{update-cli-DKmrzt8l.js → update-cli-BuVnlit7.js} +8 -8
  171. package/dist/{update-runner-D5vyQGte.js → update-runner-C4bLqctv.js} +1 -1
  172. package/dist/{update-runner-BUth8QlB.js → update-runner-DGqZqXVF.js} +1 -1
  173. package/dist/{utils-Bo1RFF0l.js → utils-BFZnl-5N.js} +6 -6
  174. package/dist/{web-CQqnJkMB.js → web-BCpNE4aE.js} +2 -2
  175. package/dist/{web-BYeS4JNp.js → web-BJQKWHqO.js} +1 -1
  176. package/dist/{web-BPI4HIht.js → web-Bun-T89j.js} +69 -69
  177. package/dist/{web-Bc1AWW4q.js → web-Cb4sindp.js} +2 -2
  178. package/dist/{whatsapp-actions-Bf61u88d.js → whatsapp-actions-Be9uvUUL.js} +28 -28
  179. package/dist/{workspace-CswOYN9T.js → workspace-D6mrCnXi.js} +21 -21
  180. package/package.json +1 -1
@@ -31,7 +31,7 @@ import "./accounts-C0g5--0e.js";
31
31
  import "./bindings-C2tByF8e.js";
32
32
  import "./send-BaweV9LV.js";
33
33
  import "./send-aCOVuBQ6.js";
34
- import "./subagent-registry-D4xGq2uc.js";
34
+ import "./subagent-registry-B4xJjOu2.js";
35
35
  import "./paths-CFzDnbY4.js";
36
36
  import "./chat-envelope-AUuZAcrC.js";
37
37
  import "./client-D3Y8sx9i.js";
@@ -123,9 +123,9 @@ import "./context-window-guard-BqrKjiIm.js";
123
123
  import { t as ensureOpenClawCliOnPath } from "./path-env-S7Od8UBX.js";
124
124
  import "./note-qHayYqee.js";
125
125
  import "./issue-format-Bm-71lmf.js";
126
- import { t as ensurePluginRegistryLoaded } from "./plugin-registry-NaHPDM1s.js";
126
+ import { t as ensurePluginRegistryLoaded } from "./plugin-registry-CgjiDSJy.js";
127
127
  import { t as assertSupportedRuntime } from "./runtime-guard-DzZMAUj_.js";
128
- import { t as emitCliBanner } from "./banner-CMCfl-_K.js";
128
+ import { t as emitCliBanner } from "./banner-DtaJorEc.js";
129
129
  import "./doctor-config-flow-DhnDuMG9.js";
130
130
  import { n as ensureConfigReady } from "./config-guard-D3uYbBeN.js";
131
131
  import process$1 from "node:process";
@@ -140,7 +140,7 @@ const routeHealth = {
140
140
  const verbose = getVerboseFlag(argv, { includeDebug: true });
141
141
  const timeoutMs = getPositiveIntFlagValue(argv, "--timeout");
142
142
  if (timeoutMs === null) return false;
143
- const { healthCommand } = await import("./health-Gkd0akfz.js").then((n) => n.i);
143
+ const { healthCommand } = await import("./health-Cjj_F37M.js").then((n) => n.i);
144
144
  await healthCommand({
145
145
  json,
146
146
  timeoutMs,
@@ -160,7 +160,7 @@ const routeStatus = {
160
160
  const verbose = getVerboseFlag(argv, { includeDebug: true });
161
161
  const timeoutMs = getPositiveIntFlagValue(argv, "--timeout");
162
162
  if (timeoutMs === null) return false;
163
- const { statusCommand } = await import("./status-D_I-fLJF.js").then((n) => n.t);
163
+ const { statusCommand } = await import("./status-DCtLhxlh.js").then((n) => n.t);
164
164
  await statusCommand({
165
165
  json,
166
166
  deep,
@@ -199,7 +199,7 @@ const routeAgentsList = {
199
199
  run: async (argv) => {
200
200
  const json = hasFlag(argv, "--json");
201
201
  const bindings = hasFlag(argv, "--bindings");
202
- const { agentsListCommand } = await import("./agents-BqONdWNu.js").then((n) => n.t);
202
+ const { agentsListCommand } = await import("./agents-4yiCX5vO.js").then((n) => n.t);
203
203
  await agentsListCommand({
204
204
  json,
205
205
  bindings
@@ -265,7 +265,7 @@ const routes = [
265
265
  const pathArg = positionals[0];
266
266
  if (!pathArg) return false;
267
267
  const json = hasFlag(argv, "--json");
268
- const { runConfigGet } = await import("./config-cli-BtvOIDkG.js");
268
+ const { runConfigGet } = await import("./config-cli-DwKVeQtE.js");
269
269
  await runConfigGet({
270
270
  path: pathArg,
271
271
  json
@@ -280,7 +280,7 @@ const routes = [
280
280
  if (!positionals || positionals.length !== 1) return false;
281
281
  const pathArg = positionals[0];
282
282
  if (!pathArg) return false;
283
- const { runConfigUnset } = await import("./config-cli-BtvOIDkG.js");
283
+ const { runConfigUnset } = await import("./config-cli-DwKVeQtE.js");
284
284
  await runConfigUnset({ path: pathArg });
285
285
  return true;
286
286
  }
@@ -294,7 +294,7 @@ const routes = [
294
294
  const local = hasFlag(argv, "--local");
295
295
  const json = hasFlag(argv, "--json");
296
296
  const plain = hasFlag(argv, "--plain");
297
- const { modelsListCommand } = await import("./models-CJodAVSF.js").then((n) => n.t);
297
+ const { modelsListCommand } = await import("./models-De_qVfBK.js").then((n) => n.t);
298
298
  await modelsListCommand({
299
299
  all,
300
300
  local,
@@ -325,7 +325,7 @@ const routes = [
325
325
  const plain = hasFlag(argv, "--plain");
326
326
  const check = hasFlag(argv, "--check");
327
327
  const probe = hasFlag(argv, "--probe");
328
- const { modelsStatusCommand } = await import("./models-CJodAVSF.js").then((n) => n.t);
328
+ const { modelsStatusCommand } = await import("./models-De_qVfBK.js").then((n) => n.t);
329
329
  await modelsStatusCommand({
330
330
  json,
331
331
  plain,
@@ -410,7 +410,7 @@ async function runCli(argv = process$1.argv) {
410
410
  assertSupportedRuntime();
411
411
  if (await tryRouteCli(normalizedArgv)) return;
412
412
  enableConsoleCapture();
413
- const { buildProgram } = await import("./program-B_-eFyJE.js");
413
+ const { buildProgram } = await import("./program-R4eCXcVV.js");
414
414
  const program = buildProgram();
415
415
  installUnhandledRejectionHandler();
416
416
  process$1.on("uncaughtException", (error) => {
@@ -423,10 +423,10 @@ async function runCli(argv = process$1.argv) {
423
423
  const { getProgramContext } = await import("./program-context-BqyLhTGk.js").then((n) => n.n);
424
424
  const ctx = getProgramContext(program);
425
425
  if (ctx) {
426
- const { registerCoreCliByName } = await import("./command-registry-BSN6zVlZ.js").then((n) => n.t);
426
+ const { registerCoreCliByName } = await import("./command-registry-CjTwwZuF.js").then((n) => n.t);
427
427
  await registerCoreCliByName(program, ctx, primary, parseArgv);
428
428
  }
429
- const { registerSubCliByName } = await import("./register.subclis-BSGvOwqU.js").then((n) => n.a);
429
+ const { registerSubCliByName } = await import("./register.subclis-lEqV1Knw.js").then((n) => n.a);
430
430
  await registerSubCliByName(program, primary);
431
431
  }
432
432
  if (!shouldSkipPluginCommandRegistration({
@@ -434,7 +434,7 @@ async function runCli(argv = process$1.argv) {
434
434
  primary,
435
435
  hasBuiltinPrimary: primary !== null && program.commands.some((command) => command.name() === primary)
436
436
  })) {
437
- const { registerPluginCliCommands } = await import("./cli-D5yg1LCm.js");
437
+ const { registerPluginCliCommands } = await import("./cli-CrgfzbyT.js");
438
438
  const { loadConfig } = await import("./auth-profiles-Ncv1fyN5.js").then((n) => n.O);
439
439
  registerPluginCliCommands(program, loadConfig());
440
440
  }
@@ -1,11 +1,11 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { d as normalizeE164, h as resolveUserPath } from "./utils-Bo1RFF0l.js";
3
- import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
4
- import { m as kindFromMime } from "./image-ops-jvmQoiyw.js";
5
- import { t as resolveIMessageAccount } from "./accounts-Bwq1wvds.js";
6
- import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
7
- import { t as convertMarkdownTables } from "./tables-DqechQWF.js";
8
- import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-CEt49GWZ.js";
2
+ import { d as normalizeE164, h as resolveUserPath } from "./utils-BFZnl-5N.js";
3
+ import { H as loadConfig } from "./model-selection-D_Si2Ict.js";
4
+ import { m as kindFromMime } from "./image-ops-DCpyia_K.js";
5
+ import { t as resolveIMessageAccount } from "./accounts-DMvETf-t.js";
6
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
7
+ import { t as convertMarkdownTables } from "./tables-BJ0XAman.js";
8
+ import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-Cy8rvvJE.js";
9
9
  import { spawn } from "node:child_process";
10
10
  import { createInterface } from "node:readline";
11
11
 
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
2
+ import { H as loadConfig } from "./model-selection-D_Si2Ict.js";
3
3
  import { n as generateSecureUuid } from "./secure-random-CY3Mg7Dp.js";
4
- import { n as resolveSignalAccount } from "./accounts-CX1yOBOk.js";
5
- import { m as kindFromMime } from "./image-ops-jvmQoiyw.js";
4
+ import { n as resolveSignalAccount } from "./accounts-BTexwKe8.js";
5
+ import { m as kindFromMime } from "./image-ops-DCpyia_K.js";
6
6
  import { n as fetchWithTimeout } from "./fetch-timeout-CYFFedEH.js";
7
- import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
8
- import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-pR36nI-3.js";
7
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
8
+ import { n as markdownToIR, t as chunkMarkdownIR } from "./ir-DcDVAFj3.js";
9
9
  import { t as resolveFetch } from "./fetch-CIXnD4u2.js";
10
- import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-CEt49GWZ.js";
10
+ import { t as resolveOutboundAttachmentFromUrl } from "./outbound-attachment-Cy8rvvJE.js";
11
11
 
12
12
  //#region src/signal/format.ts
13
13
  function normalizeUrlForComparison(url) {
@@ -1,13 +1,13 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { u as logVerbose } from "./subsystem-CAatx5oo.js";
3
- import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
4
- import { i as isSilentReplyText } from "./tokens-BvzZdrVJ.js";
5
- import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-D63QYxW6.js";
2
+ import { u as logVerbose } from "./subsystem-BRjuJbbM.js";
3
+ import { H as loadConfig } from "./model-selection-D_Si2Ict.js";
4
+ import { i as isSilentReplyText } from "./tokens-B9EDT4jv.js";
5
+ import { d as resolveSlackAccount, m as resolveSlackBotToken } from "./plugins-CJoaoIHc.js";
6
6
  import { i as requireTargetKind, n as ensureTargetId, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Ci42d9xO.js";
7
- import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-iigSYt3Q.js";
8
- import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-Dfkbh8wX.js";
9
- import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
10
- import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-pR36nI-3.js";
7
+ import { r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-B1EGEHan.js";
8
+ import { c as resolveChunkMode, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit } from "./chunk-2ZxftpDd.js";
9
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
10
+ import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-DcDVAFj3.js";
11
11
  import { t as renderMarkdownWithMarkers } from "./render-flG67HhW.js";
12
12
  import { WebClient } from "@slack/web-api";
13
13
 
@@ -1,28 +1,28 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-DKuX7-1L.js";
3
- import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-CAatx5oo.js";
2
+ import { c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, o as resolveOAuthDir } from "./paths-aGRLvQx9.js";
3
+ import { c as danger, t as createSubsystemLogger, u as logVerbose } from "./subsystem-BRjuJbbM.js";
4
4
  import { m as normalizeAccountId, p as DEFAULT_ACCOUNT_ID } from "./session-key-a6av96Fj.js";
5
- import { g as safeParseJson, t as CONFIG_DIR } from "./utils-Bo1RFF0l.js";
6
- import { An as withFileLock$1, H as loadConfig, K as writeConfigFile, W as readConfigFileSnapshotForWrite, mn as resolveTelegramPreviewStreamMode } from "./model-selection-DfZMxaX3.js";
7
- import { t as isTruthyEnvValue } from "./env-Bn6pmvjK.js";
8
- import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-D63QYxW6.js";
9
- import { h as normalizeMimeType, m as kindFromMime, p as isGifMedia, u as getFileExtension } from "./image-ops-jvmQoiyw.js";
10
- import { t as redactSensitiveText } from "./redact-BC9R18Uw.js";
11
- import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-Ct2kCLWx.js";
12
- import { t as hasProxyEnvConfigured } from "./proxy-env-Drg9J503.js";
5
+ import { g as safeParseJson, t as CONFIG_DIR } from "./utils-BFZnl-5N.js";
6
+ import { An as withFileLock$1, H as loadConfig, K as writeConfigFile, W as readConfigFileSnapshotForWrite, mn as resolveTelegramPreviewStreamMode } from "./model-selection-D_Si2Ict.js";
7
+ import { t as isTruthyEnvValue } from "./env-DNMZEG57.js";
8
+ import { l as resolveTelegramAccount, n as listChannelPlugins, t as getChannelPlugin } from "./plugins-CJoaoIHc.js";
9
+ import { h as normalizeMimeType, m as kindFromMime, p as isGifMedia, u as getFileExtension } from "./image-ops-DCpyia_K.js";
10
+ import { t as redactSensitiveText } from "./redact-CaZQhKzI.js";
11
+ import { i as formatUncaughtError, n as extractErrorCode, o as readErrorName, r as formatErrorMessage, t as collectErrorGraphCandidates } from "./errors-B11yhRo6.js";
12
+ import { t as hasProxyEnvConfigured } from "./proxy-env-ynOWOBHx.js";
13
13
  import { r as writeJsonAtomic } from "./json-files-BpxTFudd.js";
14
- import { t as makeProxyFetch } from "./proxy-fetch-AvkSvetA.js";
15
- import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
16
- import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-pR36nI-3.js";
14
+ import { t as makeProxyFetch } from "./proxy-fetch-xlbVQYN_.js";
15
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
16
+ import { a as loadWebMedia, n as markdownToIR, t as chunkMarkdownIR } from "./ir-DcDVAFj3.js";
17
17
  import { t as renderMarkdownWithMarkers } from "./render-flG67HhW.js";
18
18
  import { t as resolveFetch } from "./fetch-CIXnD4u2.js";
19
- import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-D0BHmeoE.js";
19
+ import { i as createTelegramRetryRunner, n as recordChannelActivity } from "./channel-activity-Dwc2BBvs.js";
20
20
  import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
21
21
  import { n as normalizePollInput } from "./polls-an_kOejR.js";
22
22
  import fs from "node:fs/promises";
23
23
  import os from "node:os";
24
24
  import path from "node:path";
25
- import fs$1, { readFileSync } from "node:fs";
25
+ import syncFs, { readFileSync } from "node:fs";
26
26
  import JSON5 from "json5";
27
27
  import process$1 from "node:process";
28
28
  import crypto, { randomBytes } from "node:crypto";
@@ -161,7 +161,7 @@ function getPairingAdapter(channelId) {
161
161
  //#region src/plugin-sdk/json-store.ts
162
162
  async function readJsonFileWithFallback(filePath, fallback) {
163
163
  try {
164
- const parsed = safeParseJson(await fs$1.promises.readFile(filePath, "utf-8"));
164
+ const parsed = safeParseJson(await syncFs.promises.readFile(filePath, "utf-8"));
165
165
  if (parsed == null) return {
166
166
  value: fallback,
167
167
  exists: true
@@ -248,7 +248,7 @@ async function readPairingRequests(filePath) {
248
248
  }
249
249
  async function ensureJsonFile(filePath, fallback) {
250
250
  try {
251
- await fs$1.promises.access(filePath);
251
+ await syncFs.promises.access(filePath);
252
252
  } catch {
253
253
  await writeJsonFile(filePath, fallback);
254
254
  }
@@ -404,7 +404,7 @@ function resolveAllowFromReadCacheOrMissing(filePath, stat) {
404
404
  async function readAllowFromStateForPathWithExists(channel, filePath) {
405
405
  let stat = null;
406
406
  try {
407
- stat = await fs$1.promises.stat(filePath);
407
+ stat = await syncFs.promises.stat(filePath);
408
408
  } catch (err) {
409
409
  if (err.code !== "ENOENT") throw err;
410
410
  }
@@ -447,7 +447,7 @@ async function writeAllowFromState(filePath, allowFrom) {
447
447
  });
448
448
  let stat = null;
449
449
  try {
450
- stat = await fs$1.promises.stat(filePath);
450
+ stat = await syncFs.promises.stat(filePath);
451
451
  } catch {}
452
452
  setAllowFromReadCache(filePath, {
453
453
  exists: true,
@@ -1054,7 +1054,7 @@ function resolveCronStorePath(storePath) {
1054
1054
  }
1055
1055
  async function loadCronStore(storePath) {
1056
1056
  try {
1057
- const raw = await fs$1.promises.readFile(storePath, "utf-8");
1057
+ const raw = await syncFs.promises.readFile(storePath, "utf-8");
1058
1058
  let parsed;
1059
1059
  try {
1060
1060
  parsed = JSON5.parse(raw);
@@ -1080,13 +1080,13 @@ async function loadCronStore(storePath) {
1080
1080
  }
1081
1081
  }
1082
1082
  async function saveCronStore(storePath, store) {
1083
- await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
1083
+ await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
1084
1084
  const json = JSON.stringify(store, null, 2);
1085
1085
  const cached = serializedStoreCache.get(storePath);
1086
1086
  if (cached === json) return;
1087
1087
  let previous = cached ?? null;
1088
1088
  if (previous === null) try {
1089
- previous = await fs$1.promises.readFile(storePath, "utf-8");
1089
+ previous = await syncFs.promises.readFile(storePath, "utf-8");
1090
1090
  } catch (err) {
1091
1091
  if (err.code !== "ENOENT") throw err;
1092
1092
  }
@@ -1095,9 +1095,9 @@ async function saveCronStore(storePath, store) {
1095
1095
  return;
1096
1096
  }
1097
1097
  const tmp = `${storePath}.${process.pid}.${randomBytes(8).toString("hex")}.tmp`;
1098
- await fs$1.promises.writeFile(tmp, json, "utf-8");
1098
+ await syncFs.promises.writeFile(tmp, json, "utf-8");
1099
1099
  if (previous !== null) try {
1100
- await fs$1.promises.copyFile(storePath, `${storePath}.bak`);
1100
+ await syncFs.promises.copyFile(storePath, `${storePath}.bak`);
1101
1101
  } catch {}
1102
1102
  await renameWithRetry(tmp, storePath);
1103
1103
  serializedStoreCache.set(storePath, json);
@@ -1106,7 +1106,7 @@ const RENAME_MAX_RETRIES = 3;
1106
1106
  const RENAME_BASE_DELAY_MS = 50;
1107
1107
  async function renameWithRetry(src, dest) {
1108
1108
  for (let attempt = 0; attempt <= RENAME_MAX_RETRIES; attempt++) try {
1109
- await fs$1.promises.rename(src, dest);
1109
+ await syncFs.promises.rename(src, dest);
1110
1110
  return;
1111
1111
  } catch (err) {
1112
1112
  const code = err.code;
@@ -1115,8 +1115,8 @@ async function renameWithRetry(src, dest) {
1115
1115
  continue;
1116
1116
  }
1117
1117
  if (code === "EPERM" || code === "EEXIST") {
1118
- await fs$1.promises.copyFile(src, dest);
1119
- await fs$1.promises.unlink(src).catch(() => {});
1118
+ await syncFs.promises.copyFile(src, dest);
1119
+ await syncFs.promises.unlink(src).catch(() => {});
1120
1120
  return;
1121
1121
  }
1122
1122
  throw err;
@@ -1,18 +1,18 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-CAatx5oo.js";
3
- import { H as loadConfig } from "./model-selection-DfZMxaX3.js";
4
- import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-D63QYxW6.js";
2
+ import { w as resolvePreferredOpenClawTmpDir } from "./subsystem-BRjuJbbM.js";
3
+ import { H as loadConfig } from "./model-selection-D_Si2Ict.js";
4
+ import { _ as resolveDiscordAccount, v as normalizeDiscordToken } from "./plugins-CJoaoIHc.js";
5
5
  import { i as requireTargetKind, r as parseMentionPrefixOrAtUserTarget, t as buildMessagingTarget } from "./targets-Ci42d9xO.js";
6
- import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-jvmQoiyw.js";
7
- import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-Dfkbh8wX.js";
8
- import { n as resolveMarkdownTableMode } from "./markdown-tables-pfs_NCNh.js";
9
- import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-pR36nI-3.js";
6
+ import { _ as maxBytesForKind, l as extensionForMime } from "./image-ops-DCpyia_K.js";
7
+ import { c as resolveChunkMode, i as chunkMarkdownTextWithMode } from "./chunk-2ZxftpDd.js";
8
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-BHONoo6S.js";
9
+ import { a as loadWebMedia, o as loadWebMediaRaw } from "./ir-DcDVAFj3.js";
10
10
  import { t as resolveFetch } from "./fetch-CIXnD4u2.js";
11
- import { n as retryAsync, t as resolveRetryConfig } from "./retry-Ayb7e4XG.js";
12
- import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-D0BHmeoE.js";
11
+ import { n as retryAsync, t as resolveRetryConfig } from "./retry-DTeP7C3h.js";
12
+ import { n as recordChannelActivity, r as createDiscordRetryRunner } from "./channel-activity-Dwc2BBvs.js";
13
13
  import { t as buildOutboundMediaLoadOptions } from "./load-options-xFTRYZAO.js";
14
14
  import { n as normalizePollInput, t as normalizePollDurationHours } from "./polls-an_kOejR.js";
15
- import { t as convertMarkdownTables } from "./tables-DqechQWF.js";
15
+ import { t as convertMarkdownTables } from "./tables-BJ0XAman.js";
16
16
  import fs from "node:fs/promises";
17
17
  import path from "node:path";
18
18
  import { promisify } from "node:util";
@@ -31,7 +31,7 @@ import "./accounts-C0g5--0e.js";
31
31
  import "./bindings-C2tByF8e.js";
32
32
  import "./send-BaweV9LV.js";
33
33
  import "./send-aCOVuBQ6.js";
34
- import { A as agentCommandFromIngress, P as createOutboundSendDeps, Pn as enqueueSystemEvent, Rn as requestHeartbeatNow, bt as resolveOutboundTarget, ln as buildOutboundSessionContext } from "./subagent-registry-D4xGq2uc.js";
34
+ import { A as agentCommandFromIngress, P as createOutboundSendDeps, Pn as enqueueSystemEvent, Rn as requestHeartbeatNow, bt as resolveOutboundTarget, ln as buildOutboundSessionContext } from "./subagent-registry-B4xJjOu2.js";
35
35
  import "./paths-CFzDnbY4.js";
36
36
  import "./chat-envelope-AUuZAcrC.js";
37
37
  import "./client-D3Y8sx9i.js";
@@ -120,7 +120,7 @@ import "./help-format-Bf46Qqc-.js";
120
120
  import "./progress-BkZzF3Qm.js";
121
121
  import "./constants-D1Q8yQ1_.js";
122
122
  import "./context-window-guard-BqrKjiIm.js";
123
- import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-DMeB2M_b.js";
123
+ import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-D_JirvZj.js";
124
124
  import { randomUUID } from "node:crypto";
125
125
 
126
126
  //#region src/gateway/server-node-events.ts
@@ -2,7 +2,7 @@ import "./paths-BYr-iJJ9.js";
2
2
  import "./globals-uLeGcRW1.js";
3
3
  import "./utils-CP51tiAi.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import { Ar as enqueueSystemEvent, D as pruneLegacyStoreKeys, E as loadSessionEntry, Ft as createOutboundSendDeps, Jn as buildOutboundSessionContext, O as resolveGatewaySessionStoreTarget, Pr as requestHeartbeatNow, jt as agentCommandFromIngress, kn as resolveOutboundTarget } from "./reply-OEcNPoWd.js";
5
+ import { Ar as enqueueSystemEvent, D as pruneLegacyStoreKeys, E as loadSessionEntry, Ft as createOutboundSendDeps, Jn as buildOutboundSessionContext, O as resolveGatewaySessionStoreTarget, Pr as requestHeartbeatNow, jt as agentCommandFromIngress, kn as resolveOutboundTarget } from "./reply-CAA6gLtt.js";
6
6
  import "./agent-scope-CiBV1K6b.js";
7
7
  import { d as defaultRuntime } from "./subsystem-BT74-yyS.js";
8
8
  import { l as normalizeMainKey } from "./session-key-C9z4VQtw.js";
@@ -119,7 +119,7 @@ import "./server-lifecycle-Dn1WcypX.js";
119
119
  import "./stagger-BIZMWR_z.js";
120
120
  import "./constants-BJMtcGm_.js";
121
121
  import "./context-window-guard-DfLcl4Sl.js";
122
- import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-DZ0qaSFA.js";
122
+ import { c as parseMessageWithAttachments, l as formatForLog, r as registerApnsToken, s as normalizeRpcAttachmentsToChatAttachments } from "./push-apns-BFPYim-z.js";
123
123
  import { randomUUID } from "node:crypto";
124
124
 
125
125
  //#region src/gateway/server-node-events.ts
@@ -1,6 +1,6 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as recordSessionMetaFromInbound } from "./sessions-Ck4ZR4dY.js";
3
- import { s as resolveStorePath } from "./paths-Bi8MJ8NM.js";
2
+ import { c as recordSessionMetaFromInbound } from "./sessions-D7EjW0sG.js";
3
+ import { s as resolveStorePath } from "./paths-BHEVctLd.js";
4
4
 
5
5
  //#region src/channels/session-meta.ts
6
6
  var session_meta_exports = /* @__PURE__ */ __exportAll({ recordInboundSessionMetaSafe: () => recordInboundSessionMetaSafe });
@@ -1,9 +1,9 @@
1
- import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-CAatx5oo.js";
2
- import { a as ensureDir, h as resolveUserPath } from "./utils-Bo1RFF0l.js";
3
- import { yn as VERSION } from "./model-selection-DfZMxaX3.js";
4
- import { n as formatCliCommand } from "./env-Bn6pmvjK.js";
5
- import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-CaiECgq3.js";
6
- import fs from "node:fs";
1
+ import { c as danger, m as success, x as toPinoLikeLogger, y as getChildLogger } from "./subsystem-BRjuJbbM.js";
2
+ import { a as ensureDir, h as resolveUserPath } from "./utils-BFZnl-5N.js";
3
+ import { yn as VERSION } from "./model-selection-D_Si2Ict.js";
4
+ import { n as formatCliCommand } from "./env-DNMZEG57.js";
5
+ import { d as resolveDefaultWebAuthDir, f as resolveWebCredsBackupPath, l as readCredsJsonRaw, p as resolveWebCredsPath, s as maybeRestoreCredsFromBackup } from "./accounts-ubG6irXZ.js";
6
+ import syncFs from "node:fs";
7
7
  import { randomUUID } from "node:crypto";
8
8
  import { DisconnectReason, fetchLatestBaileysVersion, makeCacheableSignalKeyStore, makeWASocket, useMultiFileAuthState } from "@whiskeysockets/baileys";
9
9
  import qrcode from "qrcode-terminal";
@@ -22,16 +22,16 @@ async function safeSaveCreds(authDir, saveCreds, logger) {
22
22
  const raw = readCredsJsonRaw(credsPath);
23
23
  if (raw) try {
24
24
  JSON.parse(raw);
25
- fs.copyFileSync(credsPath, backupPath);
25
+ syncFs.copyFileSync(credsPath, backupPath);
26
26
  try {
27
- fs.chmodSync(backupPath, 384);
27
+ syncFs.chmodSync(backupPath, 384);
28
28
  } catch {}
29
29
  } catch {}
30
30
  } catch {}
31
31
  try {
32
32
  await Promise.resolve(saveCreds());
33
33
  try {
34
- fs.chmodSync(resolveWebCredsPath(authDir), 384);
34
+ syncFs.chmodSync(resolveWebCredsPath(authDir), 384);
35
35
  } catch {}
36
36
  } catch (err) {
37
37
  logger.warn({ error: String(err) }, "failed saving WhatsApp creds");
@@ -1,20 +1,20 @@
1
- import { d as resolveRequiredHomeDir } from "./paths-DKuX7-1L.js";
2
- import { t as createSubsystemLogger } from "./subsystem-CAatx5oo.js";
1
+ import { d as resolveRequiredHomeDir } from "./paths-aGRLvQx9.js";
2
+ import { t as createSubsystemLogger } from "./subsystem-BRjuJbbM.js";
3
3
  import { c as normalizeAgentId, h as normalizeOptionalAccountId, l as normalizeMainKey, r as buildAgentMainSessionKey, t as DEFAULT_AGENT_ID } from "./session-key-a6av96Fj.js";
4
- import { d as normalizeE164 } from "./utils-Bo1RFF0l.js";
5
- import { H as loadConfig, Mn as getProcessStartTime, Nn as isPidAlive, at as parseDurationMs, jn as resolveProcessScopedMap, ot as parseByteSize } from "./model-selection-DfZMxaX3.js";
6
- import { c as normalizeHyphenSlug, t as getChannelDock } from "./dock-DXlPVrMo.js";
7
- import { r as normalizeChannelId } from "./plugins-D63QYxW6.js";
4
+ import { d as normalizeE164 } from "./utils-BFZnl-5N.js";
5
+ import { H as loadConfig, Mn as getProcessStartTime, Nn as isPidAlive, at as parseDurationMs, jn as resolveProcessScopedMap, ot as parseByteSize } from "./model-selection-D_Si2Ict.js";
6
+ import { c as normalizeHyphenSlug, t as getChannelDock } from "./dock-Bm23mfim.js";
7
+ import { r as normalizeChannelId } from "./plugins-CJoaoIHc.js";
8
8
  import { t as normalizeChatType } from "./chat-type-DKb2TlGZ.js";
9
- import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-DB68nc40.js";
9
+ import { o as listDeliverableMessageChannels, s as normalizeMessageChannel } from "./message-channel-pbgFFUNm.js";
10
10
  import { i as writeTextAtomic } from "./json-files-BpxTFudd.js";
11
11
  import { n as resolveConversationLabel } from "./conversation-label-Dyk7sOSM.js";
12
- import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-Bi8MJ8NM.js";
12
+ import { a as resolveSessionTranscriptPathInDir, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-BHEVctLd.js";
13
13
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-ByYgonIF.js";
14
14
  import fs from "node:fs/promises";
15
15
  import os from "node:os";
16
16
  import path from "node:path";
17
- import fs$1 from "node:fs";
17
+ import syncFs from "node:fs";
18
18
  import crypto from "node:crypto";
19
19
  import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
20
20
 
@@ -103,7 +103,7 @@ function releaseAllLocksSync() {
103
103
  if (typeof held.handle.close === "function") held.handle.close().catch(() => {});
104
104
  } catch {}
105
105
  try {
106
- fs$1.rmSync(held.lockPath, { force: true });
106
+ syncFs.rmSync(held.lockPath, { force: true });
107
107
  } catch {}
108
108
  HELD_LOCKS.delete(sessionFile);
109
109
  }
@@ -908,14 +908,14 @@ function resolveSessionTranscriptCandidates(sessionId, storePath, sessionFile, a
908
908
  function canonicalizePathForComparison$1(filePath) {
909
909
  const resolved = path.resolve(filePath);
910
910
  try {
911
- return fs$1.realpathSync(resolved);
911
+ return syncFs.realpathSync(resolved);
912
912
  } catch {
913
913
  return resolved;
914
914
  }
915
915
  }
916
916
  function archiveFileOnDisk(filePath, reason) {
917
917
  const archived = `${filePath}.${reason}.${formatSessionArchiveTimestamp()}`;
918
- fs$1.renameSync(filePath, archived);
918
+ syncFs.renameSync(filePath, archived);
919
919
  return archived;
920
920
  }
921
921
  /**
@@ -931,7 +931,7 @@ function archiveSessionTranscripts(opts) {
931
931
  const relative = path.relative(storeDir, candidatePath);
932
932
  if (!relative || relative.startsWith("..") || path.isAbsolute(relative)) continue;
933
933
  }
934
- if (!fs$1.existsSync(candidatePath)) continue;
934
+ if (!syncFs.existsSync(candidatePath)) continue;
935
935
  try {
936
936
  archived.push(archiveFileOnDisk(candidatePath, opts.reason));
937
937
  } catch {}
@@ -949,15 +949,15 @@ async function cleanupArchivedSessionTranscripts(opts) {
949
949
  let removed = 0;
950
950
  let scanned = 0;
951
951
  for (const dir of directories) {
952
- const entries = await fs$1.promises.readdir(dir).catch(() => []);
952
+ const entries = await syncFs.promises.readdir(dir).catch(() => []);
953
953
  for (const entry of entries) {
954
954
  const timestamp = parseSessionArchiveTimestamp(entry, reason);
955
955
  if (timestamp == null) continue;
956
956
  scanned += 1;
957
957
  if (now - timestamp <= opts.olderThanMs) continue;
958
958
  const fullPath = path.join(dir, entry);
959
- if (!(await fs$1.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
960
- await fs$1.promises.rm(fullPath).catch(() => void 0);
959
+ if (!(await syncFs.promises.stat(fullPath).catch(() => null))?.isFile()) continue;
960
+ await syncFs.promises.rm(fullPath).catch(() => void 0);
961
961
  removed += 1;
962
962
  }
963
963
  }
@@ -1086,7 +1086,7 @@ function isCacheEnabled(ttlMs) {
1086
1086
  }
1087
1087
  function getFileStatSnapshot(filePath) {
1088
1088
  try {
1089
- const stats = fs$1.statSync(filePath);
1089
+ const stats = syncFs.statSync(filePath);
1090
1090
  return {
1091
1091
  mtimeMs: stats.mtimeMs,
1092
1092
  sizeBytes: stats.size
@@ -1105,7 +1105,7 @@ const NOOP_LOGGER = {
1105
1105
  function canonicalizePathForComparison(filePath) {
1106
1106
  const resolved = path.resolve(filePath);
1107
1107
  try {
1108
- return fs$1.realpathSync(resolved);
1108
+ return syncFs.realpathSync(resolved);
1109
1109
  } catch {
1110
1110
  return resolved;
1111
1111
  }
@@ -1163,12 +1163,12 @@ function resolveReferencedSessionTranscriptPaths(params) {
1163
1163
  return referenced;
1164
1164
  }
1165
1165
  async function readSessionsDirFiles(sessionsDir) {
1166
- const dirEntries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
1166
+ const dirEntries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
1167
1167
  const files = [];
1168
1168
  for (const dirent of dirEntries) {
1169
1169
  if (!dirent.isFile()) continue;
1170
1170
  const filePath = path.join(sessionsDir, dirent.name);
1171
- const stat = await fs$1.promises.stat(filePath).catch(() => null);
1171
+ const stat = await syncFs.promises.stat(filePath).catch(() => null);
1172
1172
  if (!stat?.isFile()) continue;
1173
1173
  files.push({
1174
1174
  path: filePath,
@@ -1181,9 +1181,9 @@ async function readSessionsDirFiles(sessionsDir) {
1181
1181
  return files;
1182
1182
  }
1183
1183
  async function removeFileIfExists(filePath) {
1184
- const stat = await fs$1.promises.stat(filePath).catch(() => null);
1184
+ const stat = await syncFs.promises.stat(filePath).catch(() => null);
1185
1185
  if (!stat?.isFile()) return 0;
1186
- await fs$1.promises.rm(filePath, { force: true }).catch(() => void 0);
1186
+ await syncFs.promises.rm(filePath, { force: true }).catch(() => void 0);
1187
1187
  return stat.size;
1188
1188
  }
1189
1189
  async function removeFileForBudget(params) {
@@ -1542,7 +1542,7 @@ function capEntryCount(store, overrideMax, opts = {}) {
1542
1542
  }
1543
1543
  async function getSessionFileSize(storePath) {
1544
1544
  try {
1545
- return (await fs$1.promises.stat(storePath)).size;
1545
+ return (await syncFs.promises.stat(storePath)).size;
1546
1546
  } catch {
1547
1547
  return null;
1548
1548
  }
@@ -1559,7 +1559,7 @@ async function rotateSessionFile(storePath, overrideBytes) {
1559
1559
  if (fileSize <= maxBytes) return false;
1560
1560
  const backupPath = `${storePath}.bak.${Date.now()}`;
1561
1561
  try {
1562
- await fs$1.promises.rename(storePath, backupPath);
1562
+ await syncFs.promises.rename(storePath, backupPath);
1563
1563
  log$1.info("rotated session store file", {
1564
1564
  backupPath: path.basename(backupPath),
1565
1565
  sizeBytes: fileSize
@@ -1570,11 +1570,11 @@ async function rotateSessionFile(storePath, overrideBytes) {
1570
1570
  try {
1571
1571
  const dir = path.dirname(storePath);
1572
1572
  const baseName = path.basename(storePath);
1573
- const backups = (await fs$1.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
1573
+ const backups = (await syncFs.promises.readdir(dir)).filter((f) => f.startsWith(`${baseName}.bak.`)).toSorted().toReversed();
1574
1574
  const maxBackups = 3;
1575
1575
  if (backups.length > maxBackups) {
1576
1576
  const toDelete = backups.slice(maxBackups);
1577
- for (const old of toDelete) await fs$1.promises.unlink(path.join(dir, old)).catch(() => void 0);
1577
+ for (const old of toDelete) await syncFs.promises.unlink(path.join(dir, old)).catch(() => void 0);
1578
1578
  log$1.info("cleaned up old session store backups", { deleted: toDelete.length });
1579
1579
  }
1580
1580
  } catch {}
@@ -1697,7 +1697,7 @@ function loadSessionStore(storePath, opts = {}) {
1697
1697
  const maxReadAttempts = process.platform === "win32" ? 3 : 1;
1698
1698
  const retryBuf = maxReadAttempts > 1 ? new Int32Array(new SharedArrayBuffer(4)) : void 0;
1699
1699
  for (let attempt = 0; attempt < maxReadAttempts; attempt++) try {
1700
- const raw = fs$1.readFileSync(storePath, "utf-8");
1700
+ const raw = syncFs.readFileSync(storePath, "utf-8");
1701
1701
  if (raw.length === 0 && attempt < maxReadAttempts - 1) {
1702
1702
  Atomics.wait(retryBuf, 0, 0, 50);
1703
1703
  continue;
@@ -1851,7 +1851,7 @@ async function saveSessionStoreUnlocked(storePath, store, opts) {
1851
1851
  });
1852
1852
  }
1853
1853
  }
1854
- await fs$1.promises.mkdir(path.dirname(storePath), { recursive: true });
1854
+ await syncFs.promises.mkdir(path.dirname(storePath), { recursive: true });
1855
1855
  const json = JSON.stringify(store, null, 2);
1856
1856
  if (getSerializedSessionStore(storePath) === json) {
1857
1857
  updateSessionStoreWriteCaches({
@@ -2173,8 +2173,8 @@ function resolveMirroredTranscriptText(params) {
2173
2173
  return trimmed ? trimmed : null;
2174
2174
  }
2175
2175
  async function ensureSessionHeader(params) {
2176
- if (fs$1.existsSync(params.sessionFile)) return;
2177
- await fs$1.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
2176
+ if (syncFs.existsSync(params.sessionFile)) return;
2177
+ await syncFs.promises.mkdir(path.dirname(params.sessionFile), { recursive: true });
2178
2178
  const header = {
2179
2179
  type: "session",
2180
2180
  version: CURRENT_SESSION_VERSION,
@@ -2182,7 +2182,7 @@ async function ensureSessionHeader(params) {
2182
2182
  timestamp: (/* @__PURE__ */ new Date()).toISOString(),
2183
2183
  cwd: process.cwd()
2184
2184
  };
2185
- await fs$1.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
2185
+ await syncFs.promises.writeFile(params.sessionFile, `${JSON.stringify(header)}\n`, {
2186
2186
  encoding: "utf-8",
2187
2187
  mode: 384
2188
2188
  });