squidclaw 3.0.19 → 3.0.20

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 (209) hide show
  1. package/dist/{agents-DL8uYsUq.js → agents-BOS_wASV.js} +4 -4
  2. package/dist/{agents.config-B4KAAVvR.js → agents.config-ChUZBohP.js} +1 -1
  3. package/dist/{agents.config-D93fF1eJ.js → agents.config-Dfsl4jNF.js} +1 -1
  4. package/dist/{audio-preflight-Bzo_zN4j.js → audio-preflight-lT9iRnYi.js} +4 -4
  5. package/dist/{audio-transcription-runner-Cp_lkLCv.js → audio-transcription-runner-YiR1ym3a.js} +1 -1
  6. package/dist/{auth-choice-Ba4AEm_k.js → auth-choice-B_pvWO2S.js} +1 -1
  7. package/dist/{auth-choice-ziFj5bXd.js → auth-choice-kUm2JAky.js} +1 -1
  8. package/dist/{banner-DDih2slD.js → banner-4LItBqCV.js} +1 -1
  9. package/dist/build-info.json +2 -2
  10. package/dist/bundled/boot-md/handler.js +1 -1
  11. package/dist/bundled/session-memory/handler.js +1 -1
  12. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  13. package/dist/{channel-options-DTDfU0R6.js → channel-options-DA-4IR6h.js} +1 -1
  14. package/dist/{channel-options-BBSsevyl.js → channel-options-DQeQl3Rk.js} +1 -1
  15. package/dist/{channel-web-BXl9jCKV.js → channel-web--dAjVoio.js} +1 -1
  16. package/dist/{channel-web-SF18oYqo.js → channel-web-DJ21CAFF.js} +1 -1
  17. package/dist/{channels-cli-BDLabpWH.js → channels-cli-DviJtKuS.js} +6 -6
  18. package/dist/{channels-cli-BiuWJpJu.js → channels-cli-QvrLGt6C.js} +6 -6
  19. package/dist/{chrome-CZQnp4VH.js → chrome-CuBHInKC.js} +8 -8
  20. package/dist/{cli-CfgDCCuC.js → cli-aCubMdJg.js} +1 -1
  21. package/dist/{cli-DAZ1MKrJ.js → cli-q7seQ2Xx.js} +1 -1
  22. package/dist/{command-registry-DkjNuW8w.js → command-registry-C_YMaVul.js} +9 -9
  23. package/dist/{completion-cli-DbNma3J9.js → completion-cli-CyKEJDPO.js} +1 -1
  24. package/dist/{completion-cli-Du8H92bM.js → completion-cli-w4XQjhDI.js} +2 -2
  25. package/dist/{config-cli-D16tlTWa.js → config-cli-BfhjWCvB.js} +1 -1
  26. package/dist/{config-cli-CQhQ8Bcc.js → config-cli-BhQXEuBv.js} +1 -1
  27. package/dist/{configure-B4TiK50K.js → configure-0xkYrQ0e.js} +3 -3
  28. package/dist/{configure-B9b3cQTC.js → configure-Dsg_0ymU.js} +3 -3
  29. package/dist/{deliver-B4WWPQvt.js → deliver-6zfT7daI.js} +1 -1
  30. package/dist/{deliver-runtime-CeE1X9si.js → deliver-runtime-MBexxUuG.js} +3 -3
  31. package/dist/{deps-send-whatsapp.runtime-Cw7U9orE.js → deps-send-whatsapp.runtime-B7GC68Cu.js} +2 -2
  32. package/dist/{deps-send-whatsapp.runtime-CFnZsKW0.js → deps-send-whatsapp.runtime-BGDIgEzh.js} +3 -3
  33. package/dist/{deps-send-whatsapp.runtime-B9uivfkM.js → deps-send-whatsapp.runtime-BNAJe11S.js} +3 -3
  34. package/dist/{deps-send-whatsapp.runtime-miTfQkK9.js → deps-send-whatsapp.runtime-qBpqM2k9.js} +7 -7
  35. package/dist/{doctor-completion-CEiVFPte.js → doctor-completion-BCQdm02b.js} +1 -1
  36. package/dist/{doctor-completion-ujZ_JdIz.js → doctor-completion-BlkbgU5h.js} +1 -1
  37. package/dist/entry.js +2 -2
  38. package/dist/extensionAPI.js +6 -6
  39. package/dist/{gateway-cli-NXeo-J8r.js → gateway-cli-tFwyE4a3.js} +8 -8
  40. package/dist/{gateway-cli-2jaWM_Ci.js → gateway-cli-uWj08vdf.js} +8 -8
  41. package/dist/{health-BPZALM__.js → health-BwC4Qe5W.js} +1 -1
  42. package/dist/{health-DFZKMrW2.js → health-DS3reqch.js} +1 -1
  43. package/dist/{hooks-cli-B3rkhWcT.js → hooks-cli-oei5kRQM.js} +2 -2
  44. package/dist/{hooks-cli-BO_gZJVD.js → hooks-cli-tp5LchRL.js} +2 -2
  45. package/dist/{image-DKkuLtZ4.js → image-VgwN31FZ.js} +1 -1
  46. package/dist/{image-runtime-BMavqm9n.js → image-runtime-CwMuTYvd.js} +3 -3
  47. package/dist/index.js +6 -6
  48. package/dist/llm-slug-generator.js +1 -1
  49. package/dist/{models-Bb-GYqHr.js → models-D9X4EUlY.js} +2 -2
  50. package/dist/{models-cli-CAIJM1Wh.js → models-cli-C1PLBYF7.js} +2 -2
  51. package/dist/{models-cli-DffAz0ji.js → models-cli-LGp-Tok9.js} +3 -3
  52. package/dist/{npm-resolution-D2_zGJM-.js → npm-resolution-BUvQm-e-.js} +1 -1
  53. package/dist/{npm-resolution-D5pBCkUw.js → npm-resolution-Dtkh26DG.js} +1 -1
  54. package/dist/{onboard-dhG2YBez.js → onboard-B0padonr.js} +2 -2
  55. package/dist/{onboard-DcVsL9Jx.js → onboard-DDD6GX8E.js} +2 -2
  56. package/dist/{onboard-channels-mNXKTvFs.js → onboard-channels-9My16AOy.js} +1 -1
  57. package/dist/{onboard-channels-C-cQFUBH.js → onboard-channels-Bm_NXV3z.js} +1 -1
  58. package/dist/{onboarding-B3-IwkNi.js → onboarding-dES4q9RV.js} +3 -3
  59. package/dist/{onboarding-Cl6kW_iq.js → onboarding-o-id7p0-.js} +3 -3
  60. package/dist/{onboarding.finalize-BZqsNG2H.js → onboarding.finalize-BFtOLT7n.js} +6 -6
  61. package/dist/{onboarding.finalize-CCU-ykTR.js → onboarding.finalize-dpgNgUt5.js} +5 -5
  62. package/dist/{pi-embedded-C5U8Qxn6.js → pi-embedded-B_4NAHxA.js} +4 -40
  63. package/dist/{pi-embedded-B79nZERv.js → pi-embedded-BpHQIzjg.js} +24 -60
  64. package/dist/{pi-embedded-helpers-CEHpGDRs.js → pi-embedded-helpers-A9VYPVCH.js} +3 -3
  65. package/dist/{plugin-registry-CB47SSz1.js → plugin-registry-CCeUDvxY.js} +1 -1
  66. package/dist/{plugin-registry-Gy_VByyf.js → plugin-registry-CCkpP8-I.js} +1 -1
  67. package/dist/plugin-sdk/{channel-web-vB3Dcd8-.js → channel-web-BQE2gJ5U.js} +1 -1
  68. package/dist/plugin-sdk/{channel-web-BrhP6FQO.js → channel-web-BtNgAS1G.js} +1 -1
  69. package/dist/plugin-sdk/compat.js +50 -50
  70. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-CuxKhIE0.js → deps-send-whatsapp.runtime-DPZSTh1j.js} +3 -3
  71. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-Ce4Gzz-J.js → deps-send-whatsapp.runtime-V0Jfat5S.js} +3 -3
  72. package/dist/plugin-sdk/index.js +2 -2
  73. package/dist/plugin-sdk/mattermost.js +3 -3
  74. package/dist/plugin-sdk/nextcloud-talk.js +2 -2
  75. package/dist/plugin-sdk/{reply-DxvpiQBp.js → reply-DJYA4ZNu.js} +4 -40
  76. package/dist/plugin-sdk/{reply-sFKB3ofA.js → reply-DeKKmUDh.js} +4 -40
  77. package/dist/plugin-sdk/{slash-dispatch.runtime-C7u7mlny.js → slash-dispatch.runtime-E6j8gkO2.js} +1 -1
  78. package/dist/plugin-sdk/{slash-dispatch.runtime-Dyb_EkUt.js → slash-dispatch.runtime-k8xSVYOI.js} +1 -1
  79. package/dist/plugin-sdk/{subagent-registry-runtime-B6l6PxqP.js → subagent-registry-runtime-Cca50Qld.js} +1 -1
  80. package/dist/plugin-sdk/{subagent-registry-runtime-hdnabonI.js → subagent-registry-runtime-D6cTAG2k.js} +1 -1
  81. package/dist/plugin-sdk/{web-Bnn82S4u.js → web-Be4JS3z8.js} +2 -2
  82. package/dist/plugin-sdk/{web-D9LAdsuU.js → web-DkbCMgLG.js} +2 -2
  83. package/dist/plugin-sdk/whatsapp.js +2 -2
  84. package/dist/{plugins-cli-gtgkmDcv.js → plugins-cli-CZCadI9y.js} +2 -2
  85. package/dist/{plugins-cli-BYnoJwF1.js → plugins-cli-DFpHU_xo.js} +2 -2
  86. package/dist/{program-BGlgDpHI.js → program-B4_o5EDH.js} +7 -7
  87. package/dist/{program-context-M4FTWqqg.js → program-context-CkfdLtpp.js} +17 -17
  88. package/dist/{prompt-select-styled-AL5Tm3yO.js → prompt-select-styled-C1DFrYuk.js} +4 -4
  89. package/dist/{prompt-select-styled-BVC2byQV.js → prompt-select-styled-CZJJ2rPA.js} +4 -4
  90. package/dist/{provider-auth-helpers-DDgrFku5.js → provider-auth-helpers-BlYwNWkq.js} +1 -1
  91. package/dist/{provider-auth-helpers-Q7aIhDgv.js → provider-auth-helpers-C5taJG0R.js} +1 -1
  92. package/dist/{push-apns-FyGbUyh2.js → push-apns-Bhk1_5ut.js} +1 -1
  93. package/dist/{push-apns-Ga8xvhkh.js → push-apns-Dkjfalec.js} +1 -1
  94. package/dist/{pw-ai-Du22SYoO.js → pw-ai-CM87tQwG.js} +1 -1
  95. package/dist/{register.agent-zP8a-sNB.js → register.agent-DOp4lbyc.js} +7 -7
  96. package/dist/{register.agent-koAXw1ay.js → register.agent-s2PqcoIS.js} +6 -6
  97. package/dist/{register.configure-CYrmyjlf.js → register.configure-BGfourxZ.js} +7 -7
  98. package/dist/{register.configure-CUuP5J8W.js → register.configure-DABoMBBf.js} +7 -7
  99. package/dist/{register.maintenance-BZuEljPU.js → register.maintenance-Bdr3bSAF.js} +8 -8
  100. package/dist/{register.maintenance-ByEQ2CVH.js → register.maintenance-DmP8sVxb.js} +7 -7
  101. package/dist/{register.message-BkSXhv9I.js → register.message-DF0InVCv.js} +2 -2
  102. package/dist/{register.message-CgHfmDHm.js → register.message-gz8DaAc1.js} +2 -2
  103. package/dist/{register.onboard-HcQwPAEK.js → register.onboard-Do14cwDQ.js} +2 -2
  104. package/dist/{register.onboard-4ke40MNP.js → register.onboard-auVLfmF3.js} +2 -2
  105. package/dist/{register.setup-xAb7Cvzy.js → register.setup-B3aVuPyo.js} +2 -2
  106. package/dist/{register.setup-B41xZb1r.js → register.setup-ZyGJlYOD.js} +2 -2
  107. package/dist/{register.status-health-sessions-CcOVL0x8.js → register.status-health-sessions-C-1HE5oP.js} +3 -3
  108. package/dist/{register.status-health-sessions-BbHAAKwv.js → register.status-health-sessions-vFpvdVS1.js} +3 -3
  109. package/dist/{register.subclis-_uSASnfC.js → register.subclis-BYiAuTiK.js} +9 -9
  110. package/dist/{reply-BFTOdZcK.js → reply-BaVB3YlN.js} +4 -40
  111. package/dist/{run-main-C1eZrW-5.js → run-main-DW-JR8hB.js} +14 -14
  112. package/dist/{server-node-events-DbS1jJ5j.js → server-node-events-D-EmiDyc.js} +2 -2
  113. package/dist/{server-node-events-pYrJmi9w.js → server-node-events-rumcq7j0.js} +2 -2
  114. package/dist/{slash-dispatch.runtime-BGXbtMX6.js → slash-dispatch.runtime-BeltKAMm.js} +6 -6
  115. package/dist/{slash-dispatch.runtime-DqZVfX4H.js → slash-dispatch.runtime-C7rHRQFg.js} +1 -1
  116. package/dist/{slash-dispatch.runtime-DmFVOi3w.js → slash-dispatch.runtime-DPRwMKXk.js} +1 -1
  117. package/dist/{slash-dispatch.runtime-PX9_08Hm.js → slash-dispatch.runtime-sVHNrSL1.js} +1 -1
  118. package/dist/{status-DtiapFqq.js → status-BeSD1NDD.js} +2 -2
  119. package/dist/{status-B4eVRJcO.js → status-DGF_ROMC.js} +2 -2
  120. package/dist/{subagent-registry-Ctrhw4X-.js → subagent-registry-CgUBOyi3.js} +4 -40
  121. package/dist/{subagent-registry-runtime-Cy7dsGqF.js → subagent-registry-runtime-BYpjZwjA.js} +1 -1
  122. package/dist/{subagent-registry-runtime-BIKGAzgI.js → subagent-registry-runtime-Bm5UEB8c.js} +1 -1
  123. package/dist/{subagent-registry-runtime-CezPaX9P.js → subagent-registry-runtime-Bxc5DYZt.js} +6 -6
  124. package/dist/{subagent-registry-runtime-CTjx4TK5.js → subagent-registry-runtime-Cx5vPpG8.js} +1 -1
  125. package/dist/{update-cli-DLOWRdjv.js → update-cli-BSIF-OEa.js} +8 -8
  126. package/dist/{update-cli-_FsTRdQZ.js → update-cli-Duy8S3Bj.js} +7 -7
  127. package/dist/{update-runner-BY3l7ytB.js → update-runner-CMpruPN8.js} +1 -1
  128. package/dist/{update-runner-BKWHnVYI.js → update-runner-D_nDdx7d.js} +1 -1
  129. package/dist/{web-BNfDYvlW.js → web-Bnr4YuWJ.js} +2 -2
  130. package/dist/{web-BdZ3mX3p.js → web-C-5RPkV9.js} +2 -2
  131. package/dist/{web-1D0d1RHD.js → web-C0xcHURK.js} +1 -1
  132. package/dist/{web-B46aOGK0.js → web-CKY0tK0k.js} +6 -6
  133. package/package.json +1 -1
  134. package/dist/plugin-sdk/accounts-CUEuUR3C.js +0 -46
  135. package/dist/plugin-sdk/accounts-D0W2pELU.js +0 -288
  136. package/dist/plugin-sdk/accounts-ucj0odJq.js +0 -35
  137. package/dist/plugin-sdk/active-listener-BO7eBEG_.js +0 -50
  138. package/dist/plugin-sdk/agents/agent-tier.d.ts +0 -13
  139. package/dist/plugin-sdk/api-key-rotation-C4C_mDsg.js +0 -181
  140. package/dist/plugin-sdk/audio-preflight-Cqdo0JKm.js +0 -69
  141. package/dist/plugin-sdk/audio-transcription-runner-DnEooIyE.js +0 -2176
  142. package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +0 -58
  143. package/dist/plugin-sdk/channel-activity-BMWLw4o2.js +0 -94
  144. package/dist/plugin-sdk/channel-web-D9WdAFlv.js +0 -2256
  145. package/dist/plugin-sdk/chrome-CV-q0Lmc.js +0 -2415
  146. package/dist/plugin-sdk/commands-registry-e7YoqrbP.js +0 -1125
  147. package/dist/plugin-sdk/config-B2B64aX0.js +0 -17911
  148. package/dist/plugin-sdk/deliver-BkyBtcLR.js +0 -1694
  149. package/dist/plugin-sdk/deliver-runtime-O4lwAWMw.js +0 -32
  150. package/dist/plugin-sdk/deps-send-discord.runtime-BAeeBldY.js +0 -23
  151. package/dist/plugin-sdk/deps-send-imessage.runtime-EL-CfikZ.js +0 -22
  152. package/dist/plugin-sdk/deps-send-signal.runtime-BeemHeUu.js +0 -21
  153. package/dist/plugin-sdk/deps-send-slack.runtime-DTttkC0N.js +0 -19
  154. package/dist/plugin-sdk/deps-send-telegram.runtime-Dsf9Cnka.js +0 -24
  155. package/dist/plugin-sdk/deps-send-whatsapp.runtime-CCS71r77.js +0 -57
  156. package/dist/plugin-sdk/diagnostic-DPRVoKTk.js +0 -319
  157. package/dist/plugin-sdk/errors-B8oJXuCF.js +0 -54
  158. package/dist/plugin-sdk/fetch-guard-F0Fnqisy.js +0 -156
  159. package/dist/plugin-sdk/fs-safe-Dqmpk-Fr.js +0 -352
  160. package/dist/plugin-sdk/image-cBW8L8pp.js +0 -2310
  161. package/dist/plugin-sdk/image-ops-BP8ix1GC.js +0 -584
  162. package/dist/plugin-sdk/image-runtime-9xkgSlNz.js +0 -25
  163. package/dist/plugin-sdk/ir-DWEc6zOp.js +0 -1296
  164. package/dist/plugin-sdk/local-roots-BIPT8uAO.js +0 -186
  165. package/dist/plugin-sdk/logger-DDdrdbDu.js +0 -1163
  166. package/dist/plugin-sdk/login-BMTiGutN.js +0 -57
  167. package/dist/plugin-sdk/login-qr-BFxqYUkc.js +0 -320
  168. package/dist/plugin-sdk/manager-BD-aYaZ8.js +0 -3917
  169. package/dist/plugin-sdk/manager-runtime-C5bRwUlz.js +0 -15
  170. package/dist/plugin-sdk/outbound-Bm07xvO6.js +0 -212
  171. package/dist/plugin-sdk/outbound-attachment-DLsaxDsc.js +0 -19
  172. package/dist/plugin-sdk/path-alias-guards-gBhrAn14.js +0 -43
  173. package/dist/plugin-sdk/paths-C6W4VHoa.js +0 -166
  174. package/dist/plugin-sdk/pi-embedded-helpers-BExwPvTh.js +0 -9627
  175. package/dist/plugin-sdk/pi-model-discovery-DdctvBeX.js +0 -134
  176. package/dist/plugin-sdk/pi-model-discovery-runtime-DrtpLJjk.js +0 -8
  177. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-rgTz3FBl.js +0 -354
  178. package/dist/plugin-sdk/plugins-BN64HHZA.js +0 -864
  179. package/dist/plugin-sdk/proxy-fetch-ZPEvp58f.js +0 -38
  180. package/dist/plugin-sdk/pw-ai-DBm3RdBK.js +0 -1938
  181. package/dist/plugin-sdk/qmd-manager-6bozlfFg.js +0 -1448
  182. package/dist/plugin-sdk/query-expansion-eeVz_aEm.js +0 -1011
  183. package/dist/plugin-sdk/redact-BoNEjbpF.js +0 -319
  184. package/dist/plugin-sdk/reply-CqXMy3Yd.js +0 -98731
  185. package/dist/plugin-sdk/resolve-outbound-target-DXfjGlZQ.js +0 -40
  186. package/dist/plugin-sdk/run-with-concurrency-5DMu9szx.js +0 -1994
  187. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-D2hkJBa-.js +0 -10
  188. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-C06I4adi.js +0 -19
  189. package/dist/plugin-sdk/send-B9xnwtQ-.js +0 -540
  190. package/dist/plugin-sdk/send-BxySs-Cu.js +0 -2587
  191. package/dist/plugin-sdk/send-D9THKp_J.js +0 -414
  192. package/dist/plugin-sdk/send-DCuaaP2w.js +0 -503
  193. package/dist/plugin-sdk/send-Dm_-_xje.js +0 -3135
  194. package/dist/plugin-sdk/session-DDzIZHxt.js +0 -169
  195. package/dist/plugin-sdk/skill-commands-DRvqtuFC.js +0 -342
  196. package/dist/plugin-sdk/skills-BWwlfbVj.js +0 -1428
  197. package/dist/plugin-sdk/slash-commands.runtime-BzYsaTST.js +0 -13
  198. package/dist/plugin-sdk/slash-dispatch.runtime-BC3IAF-I.js +0 -52
  199. package/dist/plugin-sdk/slash-skill-commands.runtime-sg98L8BK.js +0 -16
  200. package/dist/plugin-sdk/ssrf-DOBwjFow.js +0 -202
  201. package/dist/plugin-sdk/store-BKDR_-Qk.js +0 -81
  202. package/dist/plugin-sdk/subagent-registry-runtime-Ceu7AzWi.js +0 -52
  203. package/dist/plugin-sdk/tables-GIj79us5.js +0 -55
  204. package/dist/plugin-sdk/target-errors-jlLHihbX.js +0 -195
  205. package/dist/plugin-sdk/thinking-BgdUnMZ2.js +0 -1206
  206. package/dist/plugin-sdk/tokens-CTIYTLWu.js +0 -52
  207. package/dist/plugin-sdk/tool-images-GSlvf6RP.js +0 -274
  208. package/dist/plugin-sdk/web-BK2-uaOo.js +0 -56
  209. package/dist/plugin-sdk/whatsapp-actions-DQpK_5Ds.js +0 -80
@@ -32,7 +32,7 @@ import "./logging-CcxUDNcI.js";
32
32
  import "./accounts-KzgPbLHP.js";
33
33
  import "./send-z-sMjqvX.js";
34
34
  import "./send-DEs83M9V.js";
35
- import { zt as trimLogTail } from "./subagent-registry-Ctrhw4X-.js";
35
+ import { zt as trimLogTail } from "./subagent-registry-CgUBOyi3.js";
36
36
  import "./paths-Dn_rzeZN.js";
37
37
  import "./chat-envelope-thy05gXR.js";
38
38
  import "./client-G9E5HGM2.js";
@@ -122,9 +122,9 @@ import "./skill-scanner-CvS725eQ.js";
122
122
  import "./installs-BiQDtPF0.js";
123
123
  import { n as formatConfigIssueLines } from "./issue-format-DCcINW-9.js";
124
124
  import "./channels-status-issues-Dz1_R7Ah.js";
125
- import { r as installCompletion } from "./completion-cli-Du8H92bM.js";
126
- import "./register.subclis-_uSASnfC.js";
127
- import "./command-registry-DkjNuW8w.js";
125
+ import { r as installCompletion } from "./completion-cli-w4XQjhDI.js";
126
+ import "./register.subclis-BYiAuTiK.js";
127
+ import "./command-registry-C_YMaVul.js";
128
128
  import "./program-context-DKVuITe2.js";
129
129
  import "./daemon-install-helpers-CJtiW2RE.js";
130
130
  import { r as parseSemver } from "./runtime-guard-BPoq8vFM.js";
@@ -135,19 +135,19 @@ import "./systemd-hints-46PqJfaq.js";
135
135
  import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-kJfDhzr8.js";
136
136
  import "./diagnostics--O6mo6KH.js";
137
137
  import { t as renderTable } from "./table-DbDCX_6t.js";
138
- import "./health-DFZKMrW2.js";
138
+ import "./health-DS3reqch.js";
139
139
  import "./control-ui-assets-BYEy341x.js";
140
140
  import { _ as resolveUpdateChannelDisplay, c as DEFAULT_GIT_CHANNEL, d as channelToNpmTag, f as formatUpdateChannelLabel, g as resolveEffectiveUpdateChannel, h as normalizeUpdateChannel, i as fetchNpmTagVersion, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-CQ6rCiGI.js";
141
141
  import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-CiLU9RPF.js";
142
- import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-BY3l7ytB.js";
142
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-CMpruPN8.js";
143
143
  import "./logging-ZAeFsd9K.js";
144
144
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-1JhjCqjy.js";
145
145
  import "./doctor-config-flow-C-h3yV4z.js";
146
146
  import "./oauth-tls-preflight-6-9iUInB.js";
147
147
  import "./systemd-linger-6Jd9K5p2.js";
148
148
  import "./health-format-eNDYxTNS.js";
149
- import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-BVC2byQV.js";
150
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-ujZ_JdIz.js";
149
+ import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-CZJJ2rPA.js";
150
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BlkbgU5h.js";
151
151
  import { spawn, spawnSync } from "node:child_process";
152
152
  import os from "node:os";
153
153
  import path from "node:path";
@@ -2,7 +2,7 @@ import { g as resolveStateDir, n as DEFAULT_GATEWAY_PORT, u as resolveGatewayPor
2
2
  import { p as theme } from "./globals-xfUIfxbE.js";
3
3
  import { h as pathExists } from "./utils-DMGXr25O.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import { K as trimLogTail } from "./reply-BFTOdZcK.js";
5
+ import { K as trimLogTail } from "./reply-BaVB3YlN.js";
6
6
  import "./agent-scope-C1XMay0T.js";
7
7
  import { d as defaultRuntime } from "./subsystem-DC87CPVS.js";
8
8
  import { t as resolveSquidClawPackageRoot } from "./squidclaw-root-CnE19yKj.js";
@@ -113,7 +113,7 @@ import "./server-lifecycle-CnZYKJ9s.js";
113
113
  import "./stagger-DL-XRpny.js";
114
114
  import { f as resolveGatewaySystemdServiceName, l as resolveGatewayLaunchAgentLabel, p as resolveGatewayWindowsTaskName } from "./constants-JYGbA1vc.js";
115
115
  import { r as parseSemver } from "./runtime-guard-pMNmDPEU.js";
116
- import "./program-context-M4FTWqqg.js";
116
+ import "./program-context-CkfdLtpp.js";
117
117
  import "./skills-status-DQw98BkG.js";
118
118
  import { n as inheritOptionFromParent } from "./command-options-D0bXi5Pl.js";
119
119
  import "./note-CBt9wSWa.js";
@@ -123,7 +123,7 @@ import "./skill-scanner-rdr9cQew.js";
123
123
  import "./installs-CyjlehlR.js";
124
124
  import { n as formatConfigIssueLines } from "./issue-format-YJgN8cb0.js";
125
125
  import "./channels-status-issues-N9kzQrD8.js";
126
- import { r as installCompletion } from "./completion-cli-DbNma3J9.js";
126
+ import { r as installCompletion } from "./completion-cli-CyKEJDPO.js";
127
127
  import "./daemon-install-helpers-a4pGEsbA.js";
128
128
  import "./systemd-fP8tz4aL.js";
129
129
  import { t as resolveGatewayService } from "./service-D4y0_Q5Z.js";
@@ -132,19 +132,19 @@ import "./systemd-hints-BG_t__ZD.js";
132
132
  import { a as terminateStaleGatewayPids, i as renderRestartDiagnostics, o as waitForGatewayHealthyRestart, r as runDaemonRestart, s as runDaemonInstall } from "./daemon-cli-CrYurM7n.js";
133
133
  import "./diagnostics-DZ99A0EW.js";
134
134
  import { t as renderTable } from "./table-BPiDGg8F.js";
135
- import "./health-BPZALM__.js";
135
+ import "./health-BwC4Qe5W.js";
136
136
  import "./control-ui-assets-Bz7TCLpb.js";
137
137
  import { _ as resolveUpdateChannelDisplay, c as DEFAULT_GIT_CHANNEL, d as channelToNpmTag, f as formatUpdateChannelLabel, g as resolveEffectiveUpdateChannel, h as normalizeUpdateChannel, i as fetchNpmTagVersion, l as DEFAULT_PACKAGE_CHANNEL, n as checkUpdateStatus, o as resolveNpmChannelTag, r as compareSemverStrings } from "./channel-account-context-e4ysObLI.js";
138
138
  import { i as resolveUpdateAvailability, n as formatUpdateOneLiner, t as formatUpdateAvailableHint } from "./status.update-BNODJGA9.js";
139
- import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-BKWHnVYI.js";
139
+ import { a as globalInstallArgs, c as readPackageName, i as detectGlobalInstallManagerForRoot, l as readPackageVersion, n as cleanupGlobalRenameDirs, o as resolveGlobalPackageRoot, r as detectGlobalInstallManagerByPresence, s as normalizePackageTagInput, t as runGatewayUpdate } from "./update-runner-D_nDdx7d.js";
140
140
  import "./logging-AGpu_2Pc.js";
141
141
  import { n as updateNpmInstalledPlugins, t as syncPluginsForUpdateChannel } from "./update-blK9j2ag.js";
142
142
  import "./doctor-config-flow-D7kerJBZ.js";
143
143
  import "./oauth-tls-preflight-CqqomOFQ.js";
144
144
  import "./systemd-linger-DgK8uuKY.js";
145
145
  import "./health-format-B3bJdIC6.js";
146
- import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-AL5Tm3yO.js";
147
- import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-CEiVFPte.js";
146
+ import { n as doctorCommand, t as selectStyled } from "./prompt-select-styled-C1DFrYuk.js";
147
+ import { r as ensureCompletionCacheExists, t as checkShellCompletionStatus } from "./doctor-completion-BCQdm02b.js";
148
148
  import os from "node:os";
149
149
  import path from "node:path";
150
150
  import fs from "node:fs/promises";
@@ -1,6 +1,6 @@
1
1
  import { m as pathExists } from "./utils-D6vohX1h.js";
2
2
  import { t as runCommandWithTimeout } from "./exec-TSiqsZw1.js";
3
- import { zt as trimLogTail } from "./subagent-registry-Ctrhw4X-.js";
3
+ import { zt as trimLogTail } from "./subagent-registry-CgUBOyi3.js";
4
4
  import { p as resolveStableNodePath } from "./daemon-install-helpers-CJtiW2RE.js";
5
5
  import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-BYEy341x.js";
6
6
  import { d as channelToNpmTag, l as DEFAULT_PACKAGE_CHANNEL, m as isStableTag, p as isBetaTag, r as compareSemverStrings, s as detectPackageManager$1, u as DEV_BRANCH } from "./channel-account-context-CQ6rCiGI.js";
@@ -1,5 +1,5 @@
1
1
  import { h as pathExists } from "./utils-DMGXr25O.js";
2
- import { K as trimLogTail } from "./reply-BFTOdZcK.js";
2
+ import { K as trimLogTail } from "./reply-BaVB3YlN.js";
3
3
  import { t as runCommandWithTimeout } from "./exec-Dfgi8amS.js";
4
4
  import { p as resolveStableNodePath } from "./daemon-install-helpers-a4pGEsbA.js";
5
5
  import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-Bz7TCLpb.js";
@@ -2,7 +2,7 @@ import "./paths-mdt1HFK2.js";
2
2
  import "./globals-xfUIfxbE.js";
3
3
  import "./utils-DMGXr25O.js";
4
4
  import "./thinking-44rmAw5o.js";
5
- import "./reply-BFTOdZcK.js";
5
+ import "./reply-BaVB3YlN.js";
6
6
  import "./agent-scope-C1XMay0T.js";
7
7
  import "./subsystem-DC87CPVS.js";
8
8
  import "./squidclaw-root-CnE19yKj.js";
@@ -109,7 +109,7 @@ import "./help-format-BMkyP_P-.js";
109
109
  import "./progress-BHN121Ps.js";
110
110
  import "./server-lifecycle-CnZYKJ9s.js";
111
111
  import "./stagger-DL-XRpny.js";
112
- import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-BXl9jCKV.js";
112
+ import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web--dAjVoio.js";
113
113
  import { t as sendMessageWhatsApp } from "./outbound-DrQL-ly5.js";
114
114
  import { i as waitForWaConnection, t as createWaSocket } from "./session-CZJ5Ux6-.js";
115
115
  import { t as loginWeb } from "./login-yT1R2N54.js";
@@ -30,7 +30,7 @@ import "./logging-CcxUDNcI.js";
30
30
  import "./accounts-KzgPbLHP.js";
31
31
  import "./send-z-sMjqvX.js";
32
32
  import "./send-DEs83M9V.js";
33
- import "./subagent-registry-Ctrhw4X-.js";
33
+ import "./subagent-registry-CgUBOyi3.js";
34
34
  import "./paths-Dn_rzeZN.js";
35
35
  import "./chat-envelope-thy05gXR.js";
36
36
  import "./client-G9E5HGM2.js";
@@ -111,7 +111,7 @@ import "./cli-utils-BKqG4ZT-.js";
111
111
  import "./help-format-CpR5cEGe.js";
112
112
  import "./progress-DuhDspl6.js";
113
113
  import { t as sendMessageWhatsApp } from "./outbound-B7m9Vcd2.js";
114
- import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-SF18oYqo.js";
114
+ import { n as monitorWebInbox, t as monitorWebChannel } from "./channel-web-DJ21CAFF.js";
115
115
  import { i as waitForWaConnection, t as createWaSocket } from "./session-D0jodcgT.js";
116
116
  import { t as loginWeb } from "./login-zoeewfBu.js";
117
117
 
@@ -8,7 +8,7 @@ import "./github-copilot-token-Cw3tAXM9.js";
8
8
  import "./legacy-names-B0wgIP0Q.js";
9
9
  import { h as resolveChannelGroupRequireMention, m as resolveChannelGroupPolicy } from "./thinking-B-A99X3F.js";
10
10
  import "./tokens-D2XhLqIz.js";
11
- import { A as normalizeGroupActivation, B as normalizeMentionText, C as createInboundDebouncer, D as getReplyFromConfig, E as createDedupeCache, F as enqueueSystemEvent, I as finalizeInboundContext, K as resolveIdentityNamePrefix, L as hasControlCommand, M as computeBackoff, N as sleepWithAbort, O as buildAgentSessionKey, P as formatDurationPrecise, R as shouldComputeCommandAuthorized, T as formatInboundEnvelope, _ as resolveDmGroupAccessWithCommandGate, b as shouldAckReactionForWhatsApp, c as buildPairingReply, d as buildHistoryContextFromEntries, f as recordPendingHistoryEntryIfEnabled, g as readStoreAllowFromForDmPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, i as resolveInboundSessionEnvelopeContext, j as parseActivationCommand, k as resolveAgentRoute, l as resolveMentionGating, m as resolveOpenProviderRuntimeGroupPolicy, p as resolveDefaultGroupPolicy, q as resolveMessagePrefix, s as createReplyPrefixOptions, u as DEFAULT_GROUP_HISTORY_LIMIT, v as resolveDmGroupAccessWithLists, w as resolveInboundDebounceMs, x as dispatchReplyWithBufferedBlockDispatcher, y as resolvePinnedMainDmOwnerFromAllowlist, z as buildMentionRegexes } from "./pi-embedded-C5U8Qxn6.js";
11
+ import { A as normalizeGroupActivation, B as normalizeMentionText, C as createInboundDebouncer, D as getReplyFromConfig, E as createDedupeCache, F as enqueueSystemEvent, I as finalizeInboundContext, K as resolveIdentityNamePrefix, L as hasControlCommand, M as computeBackoff, N as sleepWithAbort, O as buildAgentSessionKey, P as formatDurationPrecise, R as shouldComputeCommandAuthorized, T as formatInboundEnvelope, _ as resolveDmGroupAccessWithCommandGate, b as shouldAckReactionForWhatsApp, c as buildPairingReply, d as buildHistoryContextFromEntries, f as recordPendingHistoryEntryIfEnabled, g as readStoreAllowFromForDmPolicy, h as warnMissingProviderGroupPolicyFallbackOnce, i as resolveInboundSessionEnvelopeContext, j as parseActivationCommand, k as resolveAgentRoute, l as resolveMentionGating, m as resolveOpenProviderRuntimeGroupPolicy, p as resolveDefaultGroupPolicy, q as resolveMessagePrefix, s as createReplyPrefixOptions, u as DEFAULT_GROUP_HISTORY_LIMIT, v as resolveDmGroupAccessWithLists, w as resolveInboundDebounceMs, x as dispatchReplyWithBufferedBlockDispatcher, y as resolvePinnedMainDmOwnerFromAllowlist, z as buildMentionRegexes } from "./pi-embedded-B_4NAHxA.js";
12
12
  import "./plugins-AqsVZZk3.js";
13
13
  import { a as logWebSelfId, c as pickWebChannel, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, r as WA_WEB_AUTH_DIR, u as readWebSelfId } from "./accounts-B6F_XCgS.js";
14
14
  import "./send-B9H0BkfO.js";
@@ -2,7 +2,7 @@ import { G as buildAgentMainSessionKey, W as DEFAULT_MAIN_KEY, X as normalizeAge
2
2
  import "./paths-Bxnm7jO8.js";
3
3
  import { C as sleep, G as getChildLogger, L as logVerbose, O as createSubsystemLogger, T as toWhatsappJid, h as normalizeE164, j as defaultRuntime, m as jidToE164, o as clamp, p as isSelfChatMode, v as resolveJidToE164, z as shouldLogVerbose } from "./logger-RMqzbo8v.js";
4
4
  import { Y as loadConfig, pr as formatCliCommand } from "./model-selection-BREqRzjS.js";
5
- import { A as computeBackoff, C as formatInboundEnvelope, D as resolveAgentRoute, E as buildAgentSessionKey, F as hasControlCommand, I as shouldComputeCommandAuthorized, K as resolveIdentityNamePrefix, L as buildMentionRegexes, M as formatDurationPrecise, N as enqueueSystemEvent, O as normalizeGroupActivation, P as finalizeInboundContext, R as normalizeMentionText, S as resolveInboundDebounceMs, T as getReplyFromConfig, _ as resolvePinnedMainDmOwnerFromAllowlist, a as createReplyPrefixOptions, c as DEFAULT_GROUP_HISTORY_LIMIT, d as resolveDefaultGroupPolicy, f as resolveOpenProviderRuntimeGroupPolicy, g as resolveDmGroupAccessWithLists, h as resolveDmGroupAccessWithCommandGate, i as resolveInboundSessionEnvelopeContext, j as sleepWithAbort, k as parseActivationCommand, l as buildHistoryContextFromEntries, m as readStoreAllowFromForDmPolicy, o as buildPairingReply, p as warnMissingProviderGroupPolicyFallbackOnce, q as resolveMessagePrefix, s as resolveMentionGating, u as recordPendingHistoryEntryIfEnabled, v as shouldAckReactionForWhatsApp, w as createDedupeCache, x as createInboundDebouncer, y as dispatchReplyWithBufferedBlockDispatcher } from "./pi-embedded-B79nZERv.js";
5
+ import { A as computeBackoff, C as formatInboundEnvelope, D as resolveAgentRoute, E as buildAgentSessionKey, F as hasControlCommand, I as shouldComputeCommandAuthorized, K as resolveIdentityNamePrefix, L as buildMentionRegexes, M as formatDurationPrecise, N as enqueueSystemEvent, O as normalizeGroupActivation, P as finalizeInboundContext, R as normalizeMentionText, S as resolveInboundDebounceMs, T as getReplyFromConfig, _ as resolvePinnedMainDmOwnerFromAllowlist, a as createReplyPrefixOptions, c as DEFAULT_GROUP_HISTORY_LIMIT, d as resolveDefaultGroupPolicy, f as resolveOpenProviderRuntimeGroupPolicy, g as resolveDmGroupAccessWithLists, h as resolveDmGroupAccessWithCommandGate, i as resolveInboundSessionEnvelopeContext, j as sleepWithAbort, k as parseActivationCommand, l as buildHistoryContextFromEntries, m as readStoreAllowFromForDmPolicy, o as buildPairingReply, p as warnMissingProviderGroupPolicyFallbackOnce, q as resolveMessagePrefix, s as resolveMentionGating, u as recordPendingHistoryEntryIfEnabled, v as shouldAckReactionForWhatsApp, w as createDedupeCache, x as createInboundDebouncer, y as dispatchReplyWithBufferedBlockDispatcher } from "./pi-embedded-BpHQIzjg.js";
6
6
  import "./github-copilot-token-BI4jINAR.js";
7
7
  import { h as resolveChannelGroupRequireMention, m as resolveChannelGroupPolicy } from "./thinking-Um9vuzkV.js";
8
8
  import "./tokens-DXTW31In.js";
@@ -10,14 +10,14 @@ import "./plugins-BxlUqxlx.js";
10
10
  import { a as logWebSelfId, c as pickWebChannel, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, r as WA_WEB_AUTH_DIR, u as readWebSelfId } from "./accounts-DpFVWw4d.js";
11
11
  import "./send-B1S2o3_t.js";
12
12
  import "./send-WA7QCsM4.js";
13
- import "./deliver-B4WWPQvt.js";
13
+ import "./deliver-6zfT7daI.js";
14
14
  import "./diagnostic-DKZWH846.js";
15
15
  import "./accounts-BVDcCQsz.js";
16
16
  import "./image-ops-Co3B94Bx.js";
17
17
  import { X as toLocationContext, Y as formatLocationText, et as upsertChannelPairingRequest } from "./send-Dv1Xtf-W.js";
18
18
  import "./pi-model-discovery-BEIYBmq-.js";
19
- import { At as resolveGroupSessionKey, J as updateLastRoute, K as recordSessionMetaFromInbound, W as loadSessionStore } from "./pi-embedded-helpers-CEHpGDRs.js";
20
- import "./chrome-CZQnp4VH.js";
19
+ import { At as resolveGroupSessionKey, J as updateLastRoute, K as recordSessionMetaFromInbound, W as loadSessionStore } from "./pi-embedded-helpers-A9VYPVCH.js";
20
+ import "./chrome-CuBHInKC.js";
21
21
  import "./skills-CjGoSoba.js";
22
22
  import "./path-alias-guards-DLHloUkx.js";
23
23
  import "./redact-kK-uDSQK.js";
@@ -28,8 +28,8 @@ import { i as saveMediaBuffer } from "./store-CSh2TRFG.js";
28
28
  import "./accounts-B5aNbLs5.js";
29
29
  import { s as resolveStorePath } from "./paths-BeCJt7wC.js";
30
30
  import "./tool-images-ZB2Mu1HF.js";
31
- import "./image-DKkuLtZ4.js";
32
- import { h as registerUnhandledRejectionHandler } from "./audio-transcription-runner-Cp_lkLCv.js";
31
+ import "./image-VgwN31FZ.js";
32
+ import { h as registerUnhandledRejectionHandler } from "./audio-transcription-runner-YiR1ym3a.js";
33
33
  import { i as getAgentScopedMediaLocalRoots } from "./fetch-VXOrovPC.js";
34
34
  import "./fetch-guard-DU7jYYlW.js";
35
35
  import "./api-key-rotation-DAwwDa1O.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "squidclaw",
3
- "version": "3.0.19",
3
+ "version": "3.0.20",
4
4
  "description": "AI agent platform with tentacles in every chat. WhatsApp, Telegram, and more.",
5
5
  "keywords": [
6
6
  "agent",
@@ -1,46 +0,0 @@
1
- import { ot as normalizeAccountId } from "./run-with-concurrency-5DMu9szx.js";
2
- import { v as resolveAccountEntry, y as createAccountListHelpers } from "./accounts-D0W2pELU.js";
3
-
4
- //#region src/signal/accounts.ts
5
- const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("signal");
6
- const listSignalAccountIds = listAccountIds;
7
- const resolveDefaultSignalAccountId = resolveDefaultAccountId;
8
- function resolveAccountConfig(cfg, accountId) {
9
- return resolveAccountEntry(cfg.channels?.signal?.accounts, accountId);
10
- }
11
- function mergeSignalAccountConfig(cfg, accountId) {
12
- const { accounts: _ignored, ...base } = cfg.channels?.signal ?? {};
13
- const account = resolveAccountConfig(cfg, accountId) ?? {};
14
- return {
15
- ...base,
16
- ...account
17
- };
18
- }
19
- function resolveSignalAccount(params) {
20
- const accountId = normalizeAccountId(params.accountId);
21
- const baseEnabled = params.cfg.channels?.signal?.enabled !== false;
22
- const merged = mergeSignalAccountConfig(params.cfg, accountId);
23
- const accountEnabled = merged.enabled !== false;
24
- const enabled = baseEnabled && accountEnabled;
25
- const host = merged.httpHost?.trim() || "127.0.0.1";
26
- const port = merged.httpPort ?? 8080;
27
- const baseUrl = merged.httpUrl?.trim() || `http://${host}:${port}`;
28
- const configured = Boolean(merged.account?.trim() || merged.httpUrl?.trim() || merged.cliPath?.trim() || merged.httpHost?.trim() || typeof merged.httpPort === "number" || typeof merged.autoStart === "boolean");
29
- return {
30
- accountId,
31
- enabled,
32
- name: merged.name?.trim() || void 0,
33
- baseUrl,
34
- configured,
35
- config: merged
36
- };
37
- }
38
- function listEnabledSignalAccounts(cfg) {
39
- return listSignalAccountIds(cfg).map((accountId) => resolveSignalAccount({
40
- cfg,
41
- accountId
42
- })).filter((account) => account.enabled);
43
- }
44
-
45
- //#endregion
46
- export { resolveSignalAccount as i, listSignalAccountIds as n, resolveDefaultSignalAccountId as r, listEnabledSignalAccounts as t };
@@ -1,288 +0,0 @@
1
- import { at as DEFAULT_ACCOUNT_ID, ot as normalizeAccountId, st as normalizeOptionalAccountId } from "./run-with-concurrency-5DMu9szx.js";
2
- import { o as resolveOAuthDir } from "./paths-8xF5kDne.js";
3
- import { Pr as formatCliCommand } from "./config-B2B64aX0.js";
4
- import { B as success, E as resolveUserPath, G as getChildLogger, I as info, c as defaultRuntime, x as jidToE164 } from "./logger-DDdrdbDu.js";
5
- import fs from "node:fs";
6
- import path from "node:path";
7
- import fs$1 from "node:fs/promises";
8
-
9
- //#region src/channels/plugins/account-helpers.ts
10
- function createAccountListHelpers(channelKey) {
11
- function resolveConfiguredDefaultAccountId(cfg) {
12
- const channel = cfg.channels?.[channelKey];
13
- const preferred = normalizeOptionalAccountId(typeof channel?.defaultAccount === "string" ? channel.defaultAccount : void 0);
14
- if (!preferred) return;
15
- if (listAccountIds(cfg).some((id) => normalizeAccountId(id) === preferred)) return preferred;
16
- }
17
- function listConfiguredAccountIds(cfg) {
18
- const accounts = (cfg.channels?.[channelKey])?.accounts;
19
- if (!accounts || typeof accounts !== "object") return [];
20
- return Object.keys(accounts).filter(Boolean);
21
- }
22
- function listAccountIds(cfg) {
23
- const ids = listConfiguredAccountIds(cfg);
24
- if (ids.length === 0) return [DEFAULT_ACCOUNT_ID];
25
- return ids.toSorted((a, b) => a.localeCompare(b));
26
- }
27
- function resolveDefaultAccountId(cfg) {
28
- const preferred = resolveConfiguredDefaultAccountId(cfg);
29
- if (preferred) return preferred;
30
- const ids = listAccountIds(cfg);
31
- if (ids.includes(DEFAULT_ACCOUNT_ID)) return DEFAULT_ACCOUNT_ID;
32
- return ids[0] ?? DEFAULT_ACCOUNT_ID;
33
- }
34
- return {
35
- listConfiguredAccountIds,
36
- listAccountIds,
37
- resolveDefaultAccountId
38
- };
39
- }
40
-
41
- //#endregion
42
- //#region src/routing/account-lookup.ts
43
- function resolveAccountEntry(accounts, accountId) {
44
- if (!accounts || typeof accounts !== "object") return;
45
- if (Object.hasOwn(accounts, accountId)) return accounts[accountId];
46
- const normalized = accountId.toLowerCase();
47
- const matchKey = Object.keys(accounts).find((key) => key.toLowerCase() === normalized);
48
- return matchKey ? accounts[matchKey] : void 0;
49
- }
50
-
51
- //#endregion
52
- //#region src/web/auth-store.ts
53
- function resolveDefaultWebAuthDir() {
54
- return path.join(resolveOAuthDir(), "whatsapp", DEFAULT_ACCOUNT_ID);
55
- }
56
- const WA_WEB_AUTH_DIR = resolveDefaultWebAuthDir();
57
- function resolveWebCredsPath(authDir) {
58
- return path.join(authDir, "creds.json");
59
- }
60
- function resolveWebCredsBackupPath(authDir) {
61
- return path.join(authDir, "creds.json.bak");
62
- }
63
- function hasWebCredsSync(authDir) {
64
- try {
65
- const stats = fs.statSync(resolveWebCredsPath(authDir));
66
- return stats.isFile() && stats.size > 1;
67
- } catch {
68
- return false;
69
- }
70
- }
71
- function readCredsJsonRaw(filePath) {
72
- try {
73
- if (!fs.existsSync(filePath)) return null;
74
- const stats = fs.statSync(filePath);
75
- if (!stats.isFile() || stats.size <= 1) return null;
76
- return fs.readFileSync(filePath, "utf-8");
77
- } catch {
78
- return null;
79
- }
80
- }
81
- function maybeRestoreCredsFromBackup(authDir) {
82
- const logger = getChildLogger({ module: "web-session" });
83
- try {
84
- const credsPath = resolveWebCredsPath(authDir);
85
- const backupPath = resolveWebCredsBackupPath(authDir);
86
- const raw = readCredsJsonRaw(credsPath);
87
- if (raw) {
88
- JSON.parse(raw);
89
- return;
90
- }
91
- const backupRaw = readCredsJsonRaw(backupPath);
92
- if (!backupRaw) return;
93
- JSON.parse(backupRaw);
94
- fs.copyFileSync(backupPath, credsPath);
95
- try {
96
- fs.chmodSync(credsPath, 384);
97
- } catch {}
98
- logger.warn({ credsPath }, "restored corrupted WhatsApp creds.json from backup");
99
- } catch {}
100
- }
101
- async function webAuthExists(authDir = resolveDefaultWebAuthDir()) {
102
- const resolvedAuthDir = resolveUserPath(authDir);
103
- maybeRestoreCredsFromBackup(resolvedAuthDir);
104
- const credsPath = resolveWebCredsPath(resolvedAuthDir);
105
- try {
106
- await fs$1.access(resolvedAuthDir);
107
- } catch {
108
- return false;
109
- }
110
- try {
111
- const stats = await fs$1.stat(credsPath);
112
- if (!stats.isFile() || stats.size <= 1) return false;
113
- const raw = await fs$1.readFile(credsPath, "utf-8");
114
- JSON.parse(raw);
115
- return true;
116
- } catch {
117
- return false;
118
- }
119
- }
120
- async function clearLegacyBaileysAuthState(authDir) {
121
- const entries = await fs$1.readdir(authDir, { withFileTypes: true });
122
- const shouldDelete = (name) => {
123
- if (name === "oauth.json") return false;
124
- if (name === "creds.json" || name === "creds.json.bak") return true;
125
- if (!name.endsWith(".json")) return false;
126
- return /^(app-state-sync|session|sender-key|pre-key)-/.test(name);
127
- };
128
- await Promise.all(entries.map(async (entry) => {
129
- if (!entry.isFile()) return;
130
- if (!shouldDelete(entry.name)) return;
131
- await fs$1.rm(path.join(authDir, entry.name), { force: true });
132
- }));
133
- }
134
- async function logoutWeb(params) {
135
- const runtime = params.runtime ?? defaultRuntime;
136
- const resolvedAuthDir = resolveUserPath(params.authDir ?? resolveDefaultWebAuthDir());
137
- if (!await webAuthExists(resolvedAuthDir)) {
138
- runtime.log(info("No WhatsApp Web session found; nothing to delete."));
139
- return false;
140
- }
141
- if (params.isLegacyAuthDir) await clearLegacyBaileysAuthState(resolvedAuthDir);
142
- else await fs$1.rm(resolvedAuthDir, {
143
- recursive: true,
144
- force: true
145
- });
146
- runtime.log(success("Cleared WhatsApp Web credentials."));
147
- return true;
148
- }
149
- function readWebSelfId(authDir = resolveDefaultWebAuthDir()) {
150
- try {
151
- const credsPath = resolveWebCredsPath(resolveUserPath(authDir));
152
- if (!fs.existsSync(credsPath)) return {
153
- e164: null,
154
- jid: null
155
- };
156
- const raw = fs.readFileSync(credsPath, "utf-8");
157
- const jid = JSON.parse(raw)?.me?.id ?? null;
158
- return {
159
- e164: jid ? jidToE164(jid, { authDir }) : null,
160
- jid
161
- };
162
- } catch {
163
- return {
164
- e164: null,
165
- jid: null
166
- };
167
- }
168
- }
169
- /**
170
- * Return the age (in milliseconds) of the cached WhatsApp web auth state, or null when missing.
171
- * Helpful for heartbeats/observability to spot stale credentials.
172
- */
173
- function getWebAuthAgeMs(authDir = resolveDefaultWebAuthDir()) {
174
- try {
175
- const stats = fs.statSync(resolveWebCredsPath(resolveUserPath(authDir)));
176
- return Date.now() - stats.mtimeMs;
177
- } catch {
178
- return null;
179
- }
180
- }
181
- function logWebSelfId(authDir = resolveDefaultWebAuthDir(), runtime = defaultRuntime, includeChannelPrefix = false) {
182
- const { e164, jid } = readWebSelfId(authDir);
183
- const details = e164 || jid ? `${e164 ?? "unknown"}${jid ? ` (jid ${jid})` : ""}` : "unknown";
184
- const prefix = includeChannelPrefix ? "Web Channel: " : "";
185
- runtime.log(info(`${prefix}${details}`));
186
- }
187
- async function pickWebChannel(pref, authDir = resolveDefaultWebAuthDir()) {
188
- const choice = pref === "auto" ? "web" : pref;
189
- if (!await webAuthExists(authDir)) throw new Error(`No WhatsApp Web session found. Run \`${formatCliCommand("squidclaw channels login --channel whatsapp --verbose")}\` to link.`);
190
- return choice;
191
- }
192
-
193
- //#endregion
194
- //#region src/web/accounts.ts
195
- const { listConfiguredAccountIds, listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("whatsapp");
196
- const listWhatsAppAccountIds = listAccountIds;
197
- const resolveDefaultWhatsAppAccountId = resolveDefaultAccountId;
198
- function listWhatsAppAuthDirs(cfg) {
199
- const oauthDir = resolveOAuthDir();
200
- const whatsappDir = path.join(oauthDir, "whatsapp");
201
- const authDirs = new Set([oauthDir, path.join(whatsappDir, DEFAULT_ACCOUNT_ID)]);
202
- const accountIds = listConfiguredAccountIds(cfg);
203
- for (const accountId of accountIds) authDirs.add(resolveWhatsAppAuthDir({
204
- cfg,
205
- accountId
206
- }).authDir);
207
- try {
208
- const entries = fs.readdirSync(whatsappDir, { withFileTypes: true });
209
- for (const entry of entries) {
210
- if (!entry.isDirectory()) continue;
211
- authDirs.add(path.join(whatsappDir, entry.name));
212
- }
213
- } catch {}
214
- return Array.from(authDirs);
215
- }
216
- function hasAnyWhatsAppAuth(cfg) {
217
- return listWhatsAppAuthDirs(cfg).some((authDir) => hasWebCredsSync(authDir));
218
- }
219
- function resolveAccountConfig(cfg, accountId) {
220
- return resolveAccountEntry(cfg.channels?.whatsapp?.accounts, accountId);
221
- }
222
- function resolveDefaultAuthDir(accountId) {
223
- return path.join(resolveOAuthDir(), "whatsapp", normalizeAccountId(accountId));
224
- }
225
- function resolveLegacyAuthDir() {
226
- return resolveOAuthDir();
227
- }
228
- function legacyAuthExists(authDir) {
229
- try {
230
- return fs.existsSync(path.join(authDir, "creds.json"));
231
- } catch {
232
- return false;
233
- }
234
- }
235
- function resolveWhatsAppAuthDir(params) {
236
- const accountId = params.accountId.trim() || DEFAULT_ACCOUNT_ID;
237
- const configured = resolveAccountConfig(params.cfg, accountId)?.authDir?.trim();
238
- if (configured) return {
239
- authDir: resolveUserPath(configured),
240
- isLegacy: false
241
- };
242
- const defaultDir = resolveDefaultAuthDir(accountId);
243
- if (accountId === DEFAULT_ACCOUNT_ID) {
244
- const legacyDir = resolveLegacyAuthDir();
245
- if (legacyAuthExists(legacyDir) && !legacyAuthExists(defaultDir)) return {
246
- authDir: legacyDir,
247
- isLegacy: true
248
- };
249
- }
250
- return {
251
- authDir: defaultDir,
252
- isLegacy: false
253
- };
254
- }
255
- function resolveWhatsAppAccount(params) {
256
- const rootCfg = params.cfg.channels?.whatsapp;
257
- const accountId = params.accountId?.trim() || resolveDefaultWhatsAppAccountId(params.cfg);
258
- const accountCfg = resolveAccountConfig(params.cfg, accountId);
259
- const enabled = accountCfg?.enabled !== false;
260
- const { authDir, isLegacy } = resolveWhatsAppAuthDir({
261
- cfg: params.cfg,
262
- accountId
263
- });
264
- return {
265
- accountId,
266
- name: accountCfg?.name?.trim() || void 0,
267
- enabled,
268
- sendReadReceipts: accountCfg?.sendReadReceipts ?? rootCfg?.sendReadReceipts ?? true,
269
- messagePrefix: accountCfg?.messagePrefix ?? rootCfg?.messagePrefix ?? params.cfg.messages?.messagePrefix,
270
- authDir,
271
- isLegacyAuthDir: isLegacy,
272
- selfChatMode: accountCfg?.selfChatMode ?? rootCfg?.selfChatMode,
273
- dmPolicy: accountCfg?.dmPolicy ?? rootCfg?.dmPolicy,
274
- allowFrom: accountCfg?.allowFrom ?? rootCfg?.allowFrom,
275
- groupAllowFrom: accountCfg?.groupAllowFrom ?? rootCfg?.groupAllowFrom,
276
- groupPolicy: accountCfg?.groupPolicy ?? rootCfg?.groupPolicy,
277
- textChunkLimit: accountCfg?.textChunkLimit ?? rootCfg?.textChunkLimit,
278
- chunkMode: accountCfg?.chunkMode ?? rootCfg?.chunkMode,
279
- mediaMaxMb: accountCfg?.mediaMaxMb ?? rootCfg?.mediaMaxMb,
280
- blockStreaming: accountCfg?.blockStreaming ?? rootCfg?.blockStreaming,
281
- ackReaction: accountCfg?.ackReaction ?? rootCfg?.ackReaction,
282
- groups: accountCfg?.groups ?? rootCfg?.groups,
283
- debounceMs: accountCfg?.debounceMs ?? rootCfg?.debounceMs
284
- };
285
- }
286
-
287
- //#endregion
288
- export { webAuthExists as _, resolveWhatsAppAuthDir as a, logWebSelfId as c, pickWebChannel as d, readCredsJsonRaw as f, resolveWebCredsPath as g, resolveWebCredsBackupPath as h, resolveWhatsAppAccount as i, logoutWeb as l, resolveDefaultWebAuthDir as m, listWhatsAppAccountIds as n, WA_WEB_AUTH_DIR as o, readWebSelfId as p, resolveDefaultWhatsAppAccountId as r, getWebAuthAgeMs as s, hasAnyWhatsAppAuth as t, maybeRestoreCredsFromBackup as u, resolveAccountEntry as v, createAccountListHelpers as y };
@@ -1,35 +0,0 @@
1
- import { ot as normalizeAccountId } from "./run-with-concurrency-5DMu9szx.js";
2
- import { v as resolveAccountEntry, y as createAccountListHelpers } from "./accounts-D0W2pELU.js";
3
-
4
- //#region src/imessage/accounts.ts
5
- const { listAccountIds, resolveDefaultAccountId } = createAccountListHelpers("imessage");
6
- const listIMessageAccountIds = listAccountIds;
7
- const resolveDefaultIMessageAccountId = resolveDefaultAccountId;
8
- function resolveAccountConfig(cfg, accountId) {
9
- return resolveAccountEntry(cfg.channels?.imessage?.accounts, accountId);
10
- }
11
- function mergeIMessageAccountConfig(cfg, accountId) {
12
- const { accounts: _ignored, ...base } = cfg.channels?.imessage ?? {};
13
- const account = resolveAccountConfig(cfg, accountId) ?? {};
14
- return {
15
- ...base,
16
- ...account
17
- };
18
- }
19
- function resolveIMessageAccount(params) {
20
- const accountId = normalizeAccountId(params.accountId);
21
- const baseEnabled = params.cfg.channels?.imessage?.enabled !== false;
22
- const merged = mergeIMessageAccountConfig(params.cfg, accountId);
23
- const accountEnabled = merged.enabled !== false;
24
- const configured = Boolean(merged.cliPath?.trim() || merged.dbPath?.trim() || merged.service || merged.region?.trim() || merged.allowFrom && merged.allowFrom.length > 0 || merged.groupAllowFrom && merged.groupAllowFrom.length > 0 || merged.dmPolicy || merged.groupPolicy || typeof merged.includeAttachments === "boolean" || merged.attachmentRoots && merged.attachmentRoots.length > 0 || merged.remoteAttachmentRoots && merged.remoteAttachmentRoots.length > 0 || typeof merged.mediaMaxMb === "number" || typeof merged.textChunkLimit === "number" || merged.groups && Object.keys(merged.groups).length > 0);
25
- return {
26
- accountId,
27
- enabled: baseEnabled && accountEnabled,
28
- name: merged.name?.trim() || void 0,
29
- config: merged,
30
- configured
31
- };
32
- }
33
-
34
- //#endregion
35
- export { resolveDefaultIMessageAccountId as n, resolveIMessageAccount as r, listIMessageAccountIds as t };
@@ -1,50 +0,0 @@
1
- import { at as DEFAULT_ACCOUNT_ID } from "./run-with-concurrency-5DMu9szx.js";
2
- import { Pr as formatCliCommand } from "./config-B2B64aX0.js";
3
- import crypto from "node:crypto";
4
-
5
- //#region src/logging/redact-identifier.ts
6
- function sha256HexPrefix(value, len = 12) {
7
- const safeLen = Number.isFinite(len) ? Math.max(1, Math.floor(len)) : 12;
8
- return crypto.createHash("sha256").update(value).digest("hex").slice(0, safeLen);
9
- }
10
- function redactIdentifier(value, opts) {
11
- const trimmed = value?.trim();
12
- if (!trimmed) return "-";
13
- return `sha256:${sha256HexPrefix(trimmed, opts?.len ?? 12)}`;
14
- }
15
-
16
- //#endregion
17
- //#region src/web/active-listener.ts
18
- const listeners = /* @__PURE__ */ new Map();
19
- function resolveWebAccountId(accountId) {
20
- return (accountId ?? "").trim() || DEFAULT_ACCOUNT_ID;
21
- }
22
- function requireActiveWebListener(accountId) {
23
- const id = resolveWebAccountId(accountId);
24
- const listener = listeners.get(id) ?? null;
25
- if (!listener) throw new Error(`No active WhatsApp Web listener (account: ${id}). Start the gateway, then link WhatsApp with: ${formatCliCommand(`squidclaw channels login --channel whatsapp --account ${id}`)}.`);
26
- return {
27
- accountId: id,
28
- listener
29
- };
30
- }
31
- function setActiveWebListener(accountIdOrListener, maybeListener) {
32
- const { accountId, listener } = typeof accountIdOrListener === "string" ? {
33
- accountId: accountIdOrListener,
34
- listener: maybeListener ?? null
35
- } : {
36
- accountId: DEFAULT_ACCOUNT_ID,
37
- listener: accountIdOrListener ?? null
38
- };
39
- const id = resolveWebAccountId(accountId);
40
- if (!listener) listeners.delete(id);
41
- else listeners.set(id, listener);
42
- if (id === DEFAULT_ACCOUNT_ID) {}
43
- }
44
- function getActiveWebListener(accountId) {
45
- const id = resolveWebAccountId(accountId);
46
- return listeners.get(id) ?? null;
47
- }
48
-
49
- //#endregion
50
- export { redactIdentifier as i, requireActiveWebListener as n, setActiveWebListener as r, getActiveWebListener as t };
@@ -1,13 +0,0 @@
1
- import type { SquidClawConfig } from "../config/config.js";
2
- export type AgentTier = "base" | "super";
3
- /**
4
- * Resolve the current agent tier.
5
- *
6
- * - "super": Paid provider configured and key present.
7
- * - "base": Local/free model only.
8
- */
9
- export declare function resolveAgentTier(params: {
10
- cfg: SquidClawConfig;
11
- agentDir?: string;
12
- }): AgentTier;
13
- export declare function formatAgentTierLabel(tier: AgentTier): string;