squidclaw 3.0.20 → 3.0.21

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 (325) hide show
  1. package/dist/{accounts-s5e9zidf.js → accounts-C7pGQPcS.js} +2 -2
  2. package/dist/{accounts-Bkb-J8V6.js → accounts-DjhBQg_8.js} +2 -2
  3. package/dist/{accounts-B6F_XCgS.js → accounts-DwGoZKGm.js} +17 -17
  4. package/dist/{active-listener-6-Svu8Dx.js → active-listener-DPc_PGsA.js} +2 -2
  5. package/dist/{agents-BOS_wASV.js → agents-DXKtU4Il.js} +4 -4
  6. package/dist/{agents.config-ChUZBohP.js → agents.config-BM-2SLCh.js} +1 -1
  7. package/dist/{agents.config-Dfsl4jNF.js → agents.config-eMSUW-iw.js} +1 -1
  8. package/dist/{api-key-rotation-TRwuCWbu.js → api-key-rotation-DVyYtQxC.js} +2 -2
  9. package/dist/{audio-preflight-DZ1LNMJp.js → audio-preflight-BUCBED7N.js} +32 -32
  10. package/dist/{audio-transcription-runner-B3u2x_ja.js → audio-transcription-runner-Cv0Q47cM.js} +12 -12
  11. package/dist/{audit-membership-runtime-w23FnNAN.js → audit-membership-runtime-DyLj-uhz.js} +4 -4
  12. package/dist/{auth-choice-B_pvWO2S.js → auth-choice-CXepQc7c.js} +1 -1
  13. package/dist/{auth-choice-kUm2JAky.js → auth-choice-D2JrMJn-.js} +1 -1
  14. package/dist/{banner-4LItBqCV.js → banner-DMfuBV69.js} +1 -1
  15. package/dist/build-info.json +3 -3
  16. package/dist/bundled/boot-md/handler.js +51 -51
  17. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  18. package/dist/bundled/command-logger/handler.js +2 -2
  19. package/dist/bundled/session-memory/handler.js +687 -51
  20. package/dist/canvas-host/a2ui/a2ui.bundle.js +1 -17815
  21. package/dist/{channel-activity-CxJbx4sD.js → channel-activity-CPpt4XaL.js} +3 -3
  22. package/dist/{channel-options-DA-4IR6h.js → channel-options-CQ-gER0J.js} +1 -1
  23. package/dist/{channel-options-DQeQl3Rk.js → channel-options-SijIkAlT.js} +1 -1
  24. package/dist/{channel-web--dAjVoio.js → channel-web-7t1a2N13.js} +1 -1
  25. package/dist/{channel-web-DJ21CAFF.js → channel-web-LLzBxZrT.js} +1 -1
  26. package/dist/{channels-cli-QvrLGt6C.js → channels-cli-D4xUEYYC.js} +6 -6
  27. package/dist/{channels-cli-DviJtKuS.js → channels-cli-DYaFNMme.js} +6 -6
  28. package/dist/{chrome-Dxm25ptH.js → chrome-OgCChbC_.js} +26 -26
  29. package/dist/{cli-aCubMdJg.js → cli-CAID9zkL.js} +1 -1
  30. package/dist/{cli-q7seQ2Xx.js → cli-Dlc9IFWZ.js} +1 -1
  31. package/dist/{command-registry-C_YMaVul.js → command-registry-AHS8_9da.js} +9 -9
  32. package/dist/{commands-registry-B44COZFz.js → commands-registry-BJjv8_oR.js} +4 -4
  33. package/dist/{completion-cli-CyKEJDPO.js → completion-cli-B8xjpHDs.js} +1 -1
  34. package/dist/{completion-cli-w4XQjhDI.js → completion-cli-BR1r9_h4.js} +2 -2
  35. package/dist/{config-cli-BhQXEuBv.js → config-cli-D0A8Awoo.js} +1 -1
  36. package/dist/{config-cli-BfhjWCvB.js → config-cli-D4Rxoozg.js} +1 -1
  37. package/dist/{configure-Dsg_0ymU.js → configure-DOiI8_8c.js} +3 -3
  38. package/dist/{configure-0xkYrQ0e.js → configure-XmOqwwy9.js} +3 -3
  39. package/dist/control-ui/assets/{index-cM5P_3w7.js → index-BqxuPQOl.js} +2 -2
  40. package/dist/control-ui/assets/{index-cM5P_3w7.js.map → index-BqxuPQOl.js.map} +1 -1
  41. package/dist/control-ui/index.html +1 -1
  42. package/dist/{deliver-BcnsjbAB.js → deliver-DMTUTpTM.js} +21 -21
  43. package/dist/deliver-runtime-B80olQwJ.js +36 -0
  44. package/dist/deps-send-discord.runtime-GIuvX7Xw.js +26 -0
  45. package/dist/deps-send-imessage.runtime-B3TC7G80.js +25 -0
  46. package/dist/deps-send-signal.runtime-CuVJyw7n.js +24 -0
  47. package/dist/deps-send-slack.runtime-cbfFoLZ4.js +22 -0
  48. package/dist/deps-send-telegram.runtime-CRyP-xDQ.js +27 -0
  49. package/dist/deps-send-whatsapp.runtime-4aOUBP2J.js +60 -0
  50. package/dist/{deps-send-whatsapp.runtime-BNAJe11S.js → deps-send-whatsapp.runtime-CETLGt-t.js} +3 -3
  51. package/dist/{deps-send-whatsapp.runtime-qBpqM2k9.js → deps-send-whatsapp.runtime-CrxkfP31.js} +2 -2
  52. package/dist/{deps-send-whatsapp.runtime-BGDIgEzh.js → deps-send-whatsapp.runtime-__ogpmJj.js} +3 -3
  53. package/dist/{diagnostic-C2lklhkn.js → diagnostic-CnVwZNbm.js} +2 -2
  54. package/dist/{doctor-completion-BlkbgU5h.js → doctor-completion-CZoEdMS-.js} +1 -1
  55. package/dist/{doctor-completion-BCQdm02b.js → doctor-completion-DhLEFUhN.js} +1 -1
  56. package/dist/entry.js +2 -2
  57. package/dist/{plugin-sdk/errors-CgRPdp3o.js → errors-kkRuS2Cs.js} +1 -1
  58. package/dist/extensionAPI.js +1 -1
  59. package/dist/{fetch-b8tSR7_e.js → fetch-DP-JjB6Z.js} +5 -5
  60. package/dist/{fetch-guard-D16tjNsZ.js → fetch-guard-BDy975wP.js} +2 -2
  61. package/dist/{frontmatter-CjKtFduT.js → frontmatter-Cq1TcIQ2.js} +3 -3
  62. package/dist/{fs-safe-CwHbZdFH.js → fs-safe-BoB4X3GD.js} +4 -4
  63. package/dist/{gateway-cli-tFwyE4a3.js → gateway-cli-BJHBChfI.js} +8 -8
  64. package/dist/{gateway-cli-uWj08vdf.js → gateway-cli-BpHskeDd.js} +8 -8
  65. package/dist/{github-copilot-token-Cw3tAXM9.js → github-copilot-token-B5cPlwaz.js} +7 -7
  66. package/dist/{health-BwC4Qe5W.js → health-TmpUGSqu.js} +1 -1
  67. package/dist/{health-DS3reqch.js → health-XFKFZ7ZJ.js} +1 -1
  68. package/dist/{hooks-cli-oei5kRQM.js → hooks-cli-CXsZK8H9.js} +2 -2
  69. package/dist/{hooks-cli-tp5LchRL.js → hooks-cli-DsDV-Pxz.js} +2 -2
  70. package/dist/{image-C-8Kd2Mh.js → image-kKMG59st.js} +6 -6
  71. package/dist/{image-ops-BoN1E_WZ.js → image-ops-Dg8iraUV.js} +2 -2
  72. package/dist/image-runtime-BqIv7p_K.js +29 -0
  73. package/dist/index.js +6 -6
  74. package/dist/{ir-Dut0zXyS.js → ir-CKK03mBV.js} +8 -8
  75. package/dist/{legacy-names-B0wgIP0Q.js → legacy-names-aGJJuzM_.js} +1 -1
  76. package/dist/llm-slug-generator.js +51 -51
  77. package/dist/{logger-oGKcCLZ5.js → logger-CnTSBL7T.js} +7 -7
  78. package/dist/{login-DJ357UQV.js → login-CeKDrz6_.js} +5 -5
  79. package/dist/{login-qr-C0fDBnpM.js → login-qr-KbOpR0GQ.js} +10 -10
  80. package/dist/{manager-BPGhs30n.js → manager-DINhLnMi.js} +13 -13
  81. package/dist/manager-runtime-D6ckUNSs.js +18 -0
  82. package/dist/{model-selection-CHnojCCK.js → model-selection-DuNLFQPR.js} +43 -43
  83. package/dist/{models-D9X4EUlY.js → models-5VXwJBU2.js} +2 -2
  84. package/dist/{models-cli-LGp-Tok9.js → models-cli-Br56IHfy.js} +3 -3
  85. package/dist/{models-cli-C1PLBYF7.js → models-cli-CrR1RN3j.js} +2 -2
  86. package/dist/{npm-resolution-BUvQm-e-.js → npm-resolution-CKtyq4FH.js} +1 -1
  87. package/dist/{npm-resolution-Dtkh26DG.js → npm-resolution-CPk7dS7F.js} +1 -1
  88. package/dist/{onboard-DDD6GX8E.js → onboard-DUnBamC0.js} +2 -2
  89. package/dist/{onboard-channels-9My16AOy.js → onboard-channels-D45grihx.js} +1 -1
  90. package/dist/{onboard-channels-Bm_NXV3z.js → onboard-channels-_kVo3Apf.js} +1 -1
  91. package/dist/{onboard-B0padonr.js → onboard-lFwpCpC3.js} +2 -2
  92. package/dist/{onboarding-dES4q9RV.js → onboarding-CyCSQ__q.js} +3 -3
  93. package/dist/{onboarding-o-id7p0-.js → onboarding-EEd_g8Zg.js} +3 -3
  94. package/dist/{onboarding.finalize-dpgNgUt5.js → onboarding.finalize-CbMq7C4K.js} +5 -5
  95. package/dist/{onboarding.finalize-BFtOLT7n.js → onboarding.finalize-Cs1ukjFN.js} +6 -6
  96. package/dist/{outbound-qTioiTJg.js → outbound-C9svt6RH.js} +6 -6
  97. package/dist/{outbound-attachment-rlW7G5df.js → outbound-attachment-DwupUxYF.js} +2 -2
  98. package/dist/{path-alias-guards-Cpsiv2KL.js → path-alias-guards-DORgbZ1w.js} +1 -1
  99. package/dist/{paths-CSdAWKDO.js → paths-DA5srn0U.js} +5 -5
  100. package/dist/{paths-CXClY8zC.js → paths-DSd911Oe.js} +4 -4
  101. package/dist/{pi-embedded-BpHQIzjg.js → pi-embedded-BN8fghaF.js} +137 -4
  102. package/dist/{pi-embedded-B_4NAHxA.js → pi-embedded-BiC4tIJ8.js} +300 -167
  103. package/dist/{pi-embedded-helpers-DQ7IaeOi.js → pi-embedded-helpers-Di58J7Eh.js} +52 -52
  104. package/dist/{pi-model-discovery-o-WX5w2t.js → pi-model-discovery-V-InbjOM.js} +7 -7
  105. package/dist/pi-model-discovery-runtime--t6tAlar.js +11 -0
  106. package/dist/{pi-tools.before-tool-call.runtime-B_LUttg1.js → pi-tools.before-tool-call.runtime-Bpk4qTgV.js} +9 -9
  107. package/dist/{plugin-registry-CCeUDvxY.js → plugin-registry-CXm125Uz.js} +1 -1
  108. package/dist/{plugin-registry-CCkpP8-I.js → plugin-registry-D3PnPE1D.js} +1 -1
  109. package/dist/plugin-sdk/{accounts-0kF5cxkn.js → accounts-C5PAuCTj.js} +2 -2
  110. package/dist/plugin-sdk/{accounts-u0-JAHzj.js → accounts-DC5cbH9r.js} +2 -2
  111. package/dist/plugin-sdk/{accounts-xZOA23tQ.js → accounts-DncG0Hx9.js} +3 -3
  112. package/dist/plugin-sdk/{active-listener-C5xPUSTb.js → active-listener-Bd3HH2km.js} +2 -2
  113. package/dist/plugin-sdk/agents/agent-tier.d.ts +33 -0
  114. package/dist/plugin-sdk/{api-key-rotation-DyjMI2n3.js → api-key-rotation-BAZ0GD26.js} +2 -2
  115. package/dist/plugin-sdk/{audio-preflight-C0q7lu6y.js → audio-preflight-tpVm-t9O.js} +26 -26
  116. package/dist/plugin-sdk/{audio-transcription-runner-Ced47O1H.js → audio-transcription-runner-DSScb434.js} +11 -11
  117. package/dist/plugin-sdk/{audit-membership-runtime-Xl20kCBe.js → audit-membership-runtime-DHQDvH4u.js} +2 -2
  118. package/dist/plugin-sdk/{channel-activity-CNffKOEQ.js → channel-activity-cYEaofTH.js} +3 -3
  119. package/dist/plugin-sdk/{channel-web-BQE2gJ5U.js → channel-web-CbeCrQ4C.js} +18 -18
  120. package/dist/plugin-sdk/{channel-web-BtNgAS1G.js → channel-web-CqiSEc52.js} +1 -1
  121. package/dist/plugin-sdk/{chrome-DJQWo149.js → chrome-DB2h0uN0.js} +6 -6
  122. package/dist/plugin-sdk/{commands-registry-_kBPE22q.js → commands-registry-DGZ1oFXJ.js} +4 -4
  123. package/dist/plugin-sdk/{common-J8vIST9Q.js → common-D5lLWoCW.js} +2 -2
  124. package/dist/plugin-sdk/compat.js +2 -2
  125. package/dist/plugin-sdk/{config-CnZ1TlEw.js → config-Bt-c7PWF.js} +7 -7
  126. package/dist/plugin-sdk/{deliver-Xh6voz9H.js → deliver-MvrkIeKJ.js} +10 -10
  127. package/dist/plugin-sdk/deliver-runtime-i50kjcNM.js +32 -0
  128. package/dist/plugin-sdk/deps-send-discord.runtime-hOYq9ov0.js +23 -0
  129. package/dist/plugin-sdk/deps-send-imessage.runtime-D5n9DXyL.js +22 -0
  130. package/dist/plugin-sdk/deps-send-signal.runtime-CwEaRyJU.js +21 -0
  131. package/dist/plugin-sdk/deps-send-slack.runtime-DOZeLIaC.js +19 -0
  132. package/dist/plugin-sdk/deps-send-telegram.runtime-BW1hSPKh.js +24 -0
  133. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-V0Jfat5S.js → deps-send-whatsapp.runtime-DvxhnHR_.js} +3 -3
  134. package/dist/plugin-sdk/deps-send-whatsapp.runtime-JKmTtCFM.js +57 -0
  135. package/dist/plugin-sdk/{diagnostic-DKsyROPi.js → diagnostic-B6F3BtCX.js} +2 -2
  136. package/dist/{errors-DfgAh2Ml.js → plugin-sdk/errors-9oVz7reJ.js} +1 -1
  137. package/dist/plugin-sdk/{fetch-guard-BBAT8G-1.js → fetch-guard-cfPCfkrw.js} +2 -2
  138. package/dist/plugin-sdk/{fs-safe-DqCO1D4C.js → fs-safe-DFbwq9CS.js} +3 -3
  139. package/dist/plugin-sdk/{image-4ay2cw7G.js → image-FK5xhY5u.js} +6 -6
  140. package/dist/plugin-sdk/{image-ops-G8KoEfY8.js → image-ops-BSYgrL7E.js} +2 -2
  141. package/dist/plugin-sdk/image-runtime-B95EPFpg.js +25 -0
  142. package/dist/plugin-sdk/index.js +2 -2
  143. package/dist/plugin-sdk/{ir-DXj1KGnL.js → ir-CWmryq5f.js} +7 -7
  144. package/dist/plugin-sdk/{local-roots-ovKHgVSP.js → local-roots-U25IdeDH.js} +4 -4
  145. package/dist/plugin-sdk/{logger-DIb2cGHp.js → logger-Bg4vIUJn.js} +2 -2
  146. package/dist/plugin-sdk/{login-Cgtm70by.js → login-8qzl2H7G.js} +4 -4
  147. package/dist/plugin-sdk/{login-qr-BrixqhMx.js → login-qr-kalCTJEw.js} +5 -5
  148. package/dist/plugin-sdk/{manager-PEQ_cPYF.js → manager-ijYHktIt.js} +8 -8
  149. package/dist/plugin-sdk/manager-runtime--JrLQE03.js +15 -0
  150. package/dist/plugin-sdk/mattermost.js +3 -3
  151. package/dist/plugin-sdk/nextcloud-talk.js +2 -2
  152. package/dist/plugin-sdk/{outbound-BK75h9CQ.js → outbound-BIVf0aPq.js} +5 -5
  153. package/dist/plugin-sdk/{outbound-attachment-BI1QngTS.js → outbound-attachment-F5tzeNUD.js} +2 -2
  154. package/dist/plugin-sdk/{path-alias-guards-TnxupPQC.js → path-alias-guards-DA0MhfkG.js} +1 -1
  155. package/dist/plugin-sdk/{paths-B7_75Pdr.js → paths-CP67O8eN.js} +1 -1
  156. package/dist/plugin-sdk/{pi-embedded-helpers-BioULNev.js → pi-embedded-helpers-CxMnPQ37.js} +16 -16
  157. package/dist/plugin-sdk/{pi-model-discovery-BMmAbnil.js → pi-model-discovery-8OL77kCh.js} +1 -1
  158. package/dist/plugin-sdk/pi-model-discovery-runtime-DGRFpUfd.js +8 -0
  159. package/dist/plugin-sdk/{pi-tools.before-tool-call.runtime-rdRqZ9lk.js → pi-tools.before-tool-call.runtime-B7FW36KX.js} +4 -4
  160. package/dist/plugin-sdk/{plugins-BqKpJkqt.js → plugins-D3mrhffi.js} +4 -4
  161. package/dist/plugin-sdk/{proxy-env-C4s12rr8.js → proxy-env-CUUXO6rv.js} +1 -1
  162. package/dist/plugin-sdk/{proxy-fetch-Dt5BedH8.js → proxy-fetch-Cf3IUSDw.js} +1 -1
  163. package/dist/plugin-sdk/{pw-ai-Cb0ZDSq4.js → pw-ai-dPmKdw_w.js} +9 -9
  164. package/dist/plugin-sdk/{qmd-manager-Bei6TaFq.js → qmd-manager-Ov9ElEfG.js} +7 -7
  165. package/dist/plugin-sdk/{query-expansion-POz2za8a.js → query-expansion-CzjwW461.js} +4 -4
  166. package/dist/plugin-sdk/{redact-9WsNyb7S.js → redact-DfACyt0X.js} +1 -1
  167. package/dist/plugin-sdk/{reply-DJYA4ZNu.js → reply-BczXGzC_.js} +137 -4
  168. package/dist/plugin-sdk/{reply-DeKKmUDh.js → reply-Dfjh1YtV.js} +206 -73
  169. package/dist/plugin-sdk/{resolve-outbound-target-DL1adXpk.js → resolve-outbound-target-BeIB_jm0.js} +2 -2
  170. package/dist/plugin-sdk/{run-with-concurrency-DmTrN5JG.js → run-with-concurrency-kVooFCVo.js} +1 -1
  171. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-B6EcC22F.js +10 -0
  172. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-DH8J0Ie7.js +19 -0
  173. package/dist/plugin-sdk/{send-BCVXt-3e.js → send-CgkNzAhS.js} +8 -8
  174. package/dist/plugin-sdk/{send-CAG0Or0G.js → send-CuENGOhq.js} +7 -7
  175. package/dist/plugin-sdk/{send-X6QuS7x0.js → send-D6Uh2D1D.js} +5 -5
  176. package/dist/plugin-sdk/{send-BNePC8CO.js → send-DV5kR0Hg.js} +6 -6
  177. package/dist/plugin-sdk/{send-DhGDAZnT.js → send-DtA6ngBJ.js} +13 -13
  178. package/dist/plugin-sdk/{session-CAqYQVhe.js → session-CnlZn-bR.js} +3 -3
  179. package/dist/plugin-sdk/{skill-commands-Bk-IFyNw.js → skill-commands-Ckfii7h8.js} +4 -4
  180. package/dist/plugin-sdk/{skills-C5bT9-q4.js → skills-v0WQqKTa.js} +6 -6
  181. package/dist/plugin-sdk/slash-commands.runtime-BYoxsxkX.js +13 -0
  182. package/dist/plugin-sdk/{slash-dispatch.runtime-k8xSVYOI.js → slash-dispatch.runtime-DOo1IzuY.js} +1 -1
  183. package/dist/plugin-sdk/slash-dispatch.runtime-JfFr7bNy.js +52 -0
  184. package/dist/plugin-sdk/slash-skill-commands.runtime-D0399tia.js +16 -0
  185. package/dist/plugin-sdk/{store-D3lgWnS2.js → store-C_UrNuM3.js} +2 -2
  186. package/dist/plugin-sdk/{subagent-registry-runtime-D6cTAG2k.js → subagent-registry-runtime-DLvup9ph.js} +1 -1
  187. package/dist/plugin-sdk/subagent-registry-runtime-DVl5xKOW.js +52 -0
  188. package/dist/plugin-sdk/{tables-Dmlu4_q_.js → tables-CJP05iMa.js} +1 -1
  189. package/dist/plugin-sdk/{thinking-DRNOh5Xx.js → thinking-BhP3vn1l.js} +7 -7
  190. package/dist/plugin-sdk/{tokens-CLE20fRI.js → tokens-DAL_5WHL.js} +1 -1
  191. package/dist/plugin-sdk/{tool-images-BY1gsRyE.js → tool-images-ZE5G5UM0.js} +2 -2
  192. package/dist/plugin-sdk/{web-DkbCMgLG.js → web-C2Sj2WW0.js} +2 -2
  193. package/dist/plugin-sdk/web-CNY_ky8h.js +56 -0
  194. package/dist/plugin-sdk/{whatsapp-actions-BCJYmWCB.js → whatsapp-actions-DJmx6ihj.js} +17 -17
  195. package/dist/plugin-sdk/whatsapp.js +50 -50
  196. package/dist/{plugins-AqsVZZk3.js → plugins-DvejjZnJ.js} +11 -11
  197. package/dist/{plugins-cli-DFpHU_xo.js → plugins-cli-BA_2daJe.js} +2 -2
  198. package/dist/{plugins-cli-CZCadI9y.js → plugins-cli-C0WKWrZo.js} +2 -2
  199. package/dist/{program-B4_o5EDH.js → program-D_xdLzmM.js} +7 -7
  200. package/dist/{program-context-CkfdLtpp.js → program-context-DfmCIQ91.js} +17 -17
  201. package/dist/{prompt-select-styled-C1DFrYuk.js → prompt-select-styled-ApPSadr5.js} +4 -4
  202. package/dist/{prompt-select-styled-CZJJ2rPA.js → prompt-select-styled-BsheNEnh.js} +4 -4
  203. package/dist/{provider-auth-helpers-BlYwNWkq.js → provider-auth-helpers-B5kD4Lt6.js} +1 -1
  204. package/dist/{provider-auth-helpers-C5taJG0R.js → provider-auth-helpers-DpOFkV28.js} +1 -1
  205. package/dist/{proxy-env-DXXfs2WL.js → proxy-env-D-fike7s.js} +1 -1
  206. package/dist/{proxy-fetch-C2v-Utgg.js → proxy-fetch-lH6RsRTE.js} +1 -1
  207. package/dist/{push-apns-Dkjfalec.js → push-apns-BbenjEX4.js} +1 -1
  208. package/dist/{push-apns-Bhk1_5ut.js → push-apns-Ci2sdIKf.js} +1 -1
  209. package/dist/{pw-ai-GOBxzChI.js → pw-ai-B8ymIYub.js} +14 -14
  210. package/dist/{qmd-manager-CO-shcLU.js → qmd-manager-BN0siR2Z.js} +10 -10
  211. package/dist/{query-expansion-DlQOkf-g.js → query-expansion-Dzxt6kXo.js} +6 -6
  212. package/dist/{redact-NmPEVjIo.js → redact-DvzicBMu.js} +1 -1
  213. package/dist/{register.agent-s2PqcoIS.js → register.agent-CY6R-7fn.js} +6 -6
  214. package/dist/{register.agent-DOp4lbyc.js → register.agent-Dk_5V5oA.js} +7 -7
  215. package/dist/{register.configure-DABoMBBf.js → register.configure-C8OFfGln.js} +7 -7
  216. package/dist/{register.configure-BGfourxZ.js → register.configure-DT1RLeTR.js} +7 -7
  217. package/dist/{register.maintenance-Bdr3bSAF.js → register.maintenance-CluQOq8b.js} +8 -8
  218. package/dist/{register.maintenance-DmP8sVxb.js → register.maintenance-YHXmOQzf.js} +7 -7
  219. package/dist/{register.message-DF0InVCv.js → register.message-BCTXT5yK.js} +2 -2
  220. package/dist/{register.message-gz8DaAc1.js → register.message-BuoFjRqA.js} +2 -2
  221. package/dist/{register.onboard-Do14cwDQ.js → register.onboard-BJaRMtxU.js} +2 -2
  222. package/dist/{register.onboard-auVLfmF3.js → register.onboard-C64oXnvq.js} +2 -2
  223. package/dist/{register.setup-ZyGJlYOD.js → register.setup-Dl3nk2Ui.js} +2 -2
  224. package/dist/{register.setup-B3aVuPyo.js → register.setup-Drc55K_w.js} +2 -2
  225. package/dist/{register.status-health-sessions-C-1HE5oP.js → register.status-health-sessions-BHtbPeCO.js} +3 -3
  226. package/dist/{register.status-health-sessions-vFpvdVS1.js → register.status-health-sessions-xgC_gtEM.js} +3 -3
  227. package/dist/{register.subclis-BYiAuTiK.js → register.subclis-CDMFyaKR.js} +9 -9
  228. package/dist/{reply-BaVB3YlN.js → reply-DwjHsBuj.js} +137 -4
  229. package/dist/{run-main-DW-JR8hB.js → run-main-BcA22Ipv.js} +14 -14
  230. package/dist/{run-with-concurrency-FczpX8ng.js → run-with-concurrency-BFR3ReeF.js} +4 -4
  231. package/dist/runtime-whatsapp-login.runtime-DxV9iv6l.js +13 -0
  232. package/dist/runtime-whatsapp-outbound.runtime-DQqIlwhS.js +22 -0
  233. package/dist/{send-Bx9CqcZr.js → send-4nRsZJXH.js} +7 -7
  234. package/dist/{send-D5D0ZGht.js → send-BGlcHjUD.js} +26 -26
  235. package/dist/{send-DtHQ7_6Z.js → send-BTUU1jWM.js} +8 -8
  236. package/dist/{send-B9H0BkfO.js → send-DdBbRpTP.js} +6 -6
  237. package/dist/{send-B5QEmMJ4.js → send-dTQd-IyJ.js} +5 -5
  238. package/dist/{server-node-events-rumcq7j0.js → server-node-events-Q0cT2ifj.js} +2 -2
  239. package/dist/{server-node-events-D-EmiDyc.js → server-node-events-YN5eJeHa.js} +2 -2
  240. package/dist/{session-DLTCuoUD.js → session-CnCwDJke.js} +8 -8
  241. package/dist/{skill-commands-BwTLQRR8.js → skill-commands-Cz45_nme.js} +9 -9
  242. package/dist/{skills-B9N2bqKU.js → skills-CdCS1HeL.js} +22 -22
  243. package/dist/slash-commands.runtime-CZz6v6b3.js +16 -0
  244. package/dist/{slash-dispatch.runtime-sVHNrSL1.js → slash-dispatch.runtime-BOMEVFk0.js} +1 -1
  245. package/dist/{slash-dispatch.runtime-DPRwMKXk.js → slash-dispatch.runtime-DB1QsBRc.js} +1 -1
  246. package/dist/slash-dispatch.runtime-SO7HOe8q.js +56 -0
  247. package/dist/{slash-dispatch.runtime-BeltKAMm.js → slash-dispatch.runtime-sXaUYn4v.js} +1 -1
  248. package/dist/slash-skill-commands.runtime-Bawt7j0r.js +20 -0
  249. package/dist/{status-BeSD1NDD.js → status-Bh5x6DsW.js} +2 -2
  250. package/dist/{status-DGF_ROMC.js → status-cU9cJReo.js} +2 -2
  251. package/dist/{store-CvQ41zCV.js → store-D9z0dn7D.js} +2 -2
  252. package/dist/{subagent-registry-CgUBOyi3.js → subagent-registry-CIgFD2oi.js} +137 -4
  253. package/dist/{subagent-registry-runtime-Bxc5DYZt.js → subagent-registry-runtime-232sNNT6.js} +1 -1
  254. package/dist/subagent-registry-runtime-D2rUxU5J.js +56 -0
  255. package/dist/{subagent-registry-runtime-BYpjZwjA.js → subagent-registry-runtime-D7ubAnDZ.js} +1 -1
  256. package/dist/{subagent-registry-runtime-Cx5vPpG8.js → subagent-registry-runtime-DGTjU9Lb.js} +1 -1
  257. package/dist/{subsystem-BaLYRf7D.js → subsystem-6v7sWnAD.js} +14 -14
  258. package/dist/{tables-BRYYxYs7.js → tables-BTFiZyRU.js} +1 -1
  259. package/dist/{target-errors-D0ZJUbbf.js → target-errors-DgNRx3Nr.js} +2 -2
  260. package/dist/{thinking-B-A99X3F.js → thinking-B75CXkTT.js} +7 -7
  261. package/dist/{tokens-D2XhLqIz.js → tokens-DfbMVF9y.js} +1 -1
  262. package/dist/{tool-images-Zn6jVmkX.js → tool-images-Dp5OiXeA.js} +2 -2
  263. package/dist/{update-cli-Duy8S3Bj.js → update-cli-CktBOXZF.js} +7 -7
  264. package/dist/{update-cli-BSIF-OEa.js → update-cli-DM_dUip_.js} +8 -8
  265. package/dist/{update-runner-CMpruPN8.js → update-runner-BBJZmfZ4.js} +1 -1
  266. package/dist/{update-runner-D_nDdx7d.js → update-runner-BYGPkHXG.js} +1 -1
  267. package/dist/{web-C-5RPkV9.js → web-CZhZC1EA.js} +2 -2
  268. package/dist/{web-CKY0tK0k.js → web-Chw1dtKA.js} +1 -1
  269. package/dist/{web-Bnr4YuWJ.js → web-DWRZAXj9.js} +2 -2
  270. package/dist/{web-C0xcHURK.js → web-QsxgXbNK.js} +55 -55
  271. package/dist/{whatsapp-actions-Cuy0qeQK.js → whatsapp-actions-CzqsuSGx.js} +21 -21
  272. package/dist/{workspace-TqfVSQuO.js → workspace-kVMIaBrV.js} +20 -20
  273. package/extensions/acpx/node_modules/.bin/acpx +2 -2
  274. package/extensions/diagnostics-otel/node_modules/.bin/acorn +2 -2
  275. package/extensions/diffs/node_modules/.bin/playwright-core +2 -2
  276. package/extensions/googlechat/node_modules/.bin/squidclaw +2 -2
  277. package/extensions/matrix/node_modules/.bin/markdown-it +2 -2
  278. package/extensions/memory-core/node_modules/.bin/squidclaw +2 -2
  279. package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +2 -2
  280. package/extensions/memory-lancedb/node_modules/.bin/openai +2 -2
  281. package/extensions/nostr/node_modules/.bin/tsc +2 -2
  282. package/extensions/nostr/node_modules/.bin/tsserver +2 -2
  283. package/extensions/tlon/node_modules/.bin/tlon +2 -2
  284. package/package.json +1 -1
  285. package/dist/canvas-host/a2ui/.bundle.hash +0 -1
  286. package/dist/deliver-runtime-_mBfV_4S.js +0 -36
  287. package/dist/deps-send-discord.runtime-CUTAK2hy.js +0 -26
  288. package/dist/deps-send-imessage.runtime-CQOiEIuA.js +0 -25
  289. package/dist/deps-send-signal.runtime-wN7MkzLw.js +0 -24
  290. package/dist/deps-send-slack.runtime-HEEwW4uU.js +0 -22
  291. package/dist/deps-send-telegram.runtime-DHlcnjQO.js +0 -27
  292. package/dist/deps-send-whatsapp.runtime-B7GC68Cu.js +0 -60
  293. package/dist/export-html/vendor/highlight.min.js +0 -1213
  294. package/dist/export-html/vendor/marked.min.js +0 -6
  295. package/dist/image-runtime-D11wBIC8.js +0 -29
  296. package/dist/manager-runtime-BB9lcoFR.js +0 -18
  297. package/dist/pi-model-discovery-runtime-DBkQoIJw.js +0 -11
  298. package/dist/plugin-sdk/deliver-runtime-5UVcSskg.js +0 -32
  299. package/dist/plugin-sdk/deps-send-discord.runtime-DTspXSCt.js +0 -23
  300. package/dist/plugin-sdk/deps-send-imessage.runtime-qThAwDEe.js +0 -22
  301. package/dist/plugin-sdk/deps-send-signal.runtime-DnjnVzZF.js +0 -21
  302. package/dist/plugin-sdk/deps-send-slack.runtime-CbKevLnv.js +0 -19
  303. package/dist/plugin-sdk/deps-send-telegram.runtime-C6y29O9E.js +0 -24
  304. package/dist/plugin-sdk/deps-send-whatsapp.runtime-DPZSTh1j.js +0 -57
  305. package/dist/plugin-sdk/image-runtime-CpfepTDc.js +0 -25
  306. package/dist/plugin-sdk/manager-runtime-BmgTeb5G.js +0 -15
  307. package/dist/plugin-sdk/pi-model-discovery-runtime-COnuGwZt.js +0 -8
  308. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-99sCh8RG.js +0 -10
  309. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-dTkDaXHl.js +0 -19
  310. package/dist/plugin-sdk/slash-commands.runtime-EAZKpRKq.js +0 -13
  311. package/dist/plugin-sdk/slash-dispatch.runtime-E6j8gkO2.js +0 -52
  312. package/dist/plugin-sdk/slash-skill-commands.runtime-DGd_JSWX.js +0 -16
  313. package/dist/plugin-sdk/subagent-registry-runtime-Cca50Qld.js +0 -52
  314. package/dist/plugin-sdk/web-Be4JS3z8.js +0 -56
  315. package/dist/runtime-whatsapp-login.runtime-DumUjKRz.js +0 -13
  316. package/dist/runtime-whatsapp-outbound.runtime-Cgu2MfqR.js +0 -22
  317. package/dist/slash-commands.runtime-CjBXruwG.js +0 -16
  318. package/dist/slash-dispatch.runtime-C7rHRQFg.js +0 -56
  319. package/dist/slash-skill-commands.runtime-DYK20Lxf.js +0 -20
  320. package/dist/subagent-registry-runtime-Bm5UEB8c.js +0 -56
  321. package/docs/reference/templates/IDENTITY.md +0 -29
  322. package/docs/reference/templates/USER.md +0 -23
  323. package/docs/zh-CN/reference/templates/IDENTITY.md +0 -36
  324. package/docs/zh-CN/reference/templates/USER.md +0 -30
  325. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +0 -178
@@ -1,67 +1,67 @@
1
- import { _ as toAgentModelListLike, a as resolveAgentDir, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentConfig, l as resolveDefaultAgentId, n as hasConfiguredModelFallbacks, p as resolveSessionAgentIds, r as listAgentIds, s as resolveAgentSkillsFilter, t as runTasksWithConcurrency, u as resolveEffectiveModelFallbacks } from "./run-with-concurrency-FczpX8ng.js";
2
- import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, r as resolveConfigPath } from "./paths-CSdAWKDO.js";
3
- import { C as normalizeLogLevel, E as consumeRootOptionToken, T as FLAG_TERMINATOR, _ as isRich, a as clearActiveProgressLine, c as danger, f as setVerbose, g as colorize, h as warn, i as defaultRuntime, o as registerActiveProgressLine, p as shouldLogVerbose, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger, u as logVerbose, v as theme, w as resolvePreferredSquidClawTmpDir, y as getChildLogger } from "./subsystem-BaLYRf7D.js";
4
- import { $ as parseAgentSessionKey, A as normalizeWindowsPathForComparison, B as resolveAgentIdFromSessionKey, G as normalizeAccountId$2, H as sanitizeAgentId, I as classifySessionKeyShape, J as deriveSessionChatType, K as normalizeOptionalAccountId, L as isValidAgentId, M as DEFAULT_MAIN_KEY, N as buildAgentMainSessionKey, P as buildAgentPeerSessionKey, Q as isSubagentSessionKey, R as normalizeAgentId, U as scopedHeartbeatWakeOptions, V as resolveThreadSessionKeys, W as DEFAULT_ACCOUNT_ID, X as isAcpSessionKey, Y as getSubagentDepth, Z as isCronSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, b as openBoundaryFile, et as resolveThreadParentSessionKey, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, j as DEFAULT_AGENT_ID, l as ensureAgentWorkspace, m as resolveSquidClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, q as isBlockedObjectKey, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as openBoundaryFileSync, z as normalizeMainKey } from "./workspace-TqfVSQuO.js";
5
- import { C as sleep$1, D as isPlainObject, E as truncateUtf16Safe, S as shortenHomePath, a as CONFIG_DIR, d as formatTerminalLink, f as isRecord$1, h as normalizeE164, i as logWarn, l as ensureDir$3, n as logError, r as logInfo, s as clampInt, t as logDebug, u as escapeRegExp, w as sliceUtf16Safe, x as shortenHomeInString, y as resolveUserPath } from "./logger-oGKcCLZ5.js";
6
- import { $ as resolveConfigSnapshotHash, $n as dedupeProfileIds, $t as createPluginRegistry, A as getCustomProviderApiKey, An as unwrapKnownDispatchWrapperInvocation, At as isPathWithinRoot, B as markAuthProfileFailure, Bn as resolveSlackNativeStreaming, Bt as resolveMemorySlotDecision, C as OLLAMA_NATIVE_BASE_URL, Cn as DEFAULT_SAFE_BINS, D as buildStreamErrorAssistantMessage, Dn as extractShellWrapperInlineCommand, Dt as AVATAR_MAX_BYTES, E as buildAssistantMessageWithZeroUsage, En as resolveCommandResolutionFromArgv, Fn as resolveSafeBinProfiles, Ft as isPathInside, G as describeUnknownError$1, Gn as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Gt as normalizeAnyChannelId, H as resolveProfilesUnavailableReason, Ht as CHAT_CHANNEL_ORDER, I as resolveAuthProfileOrder, In as applyMergePatch, It as safeStatSync, J as parseDotPath, Jn as getShellPathFromLoginShell, Jt as getActivePluginRegistry, K as isNonEmptyString, Kn as resolveAgentMaxConcurrent, Kt as normalizeChannelId$1, L as clearExpiredCooldowns, Ln as isSafeExecutableValue, Lt as applyTestPluginDefaults, M as resolveApiKeyForProvider, Mn as splitShellArgs, Mt as validateJsonSchemaValue, N as resolveEnvApiKey, Nn as SAFE_BIN_PROFILES, Nt as loadPluginManifestRegistry, O as buildUsageWithNoCost, On as isDispatchWrapperExecutable, Ot as isAvatarDataUrl, P as resolveModelAuthMode, Pn as normalizeSafeBinProfileFixtures, Pt as discoverSquidClawPlugins, Qn as resolveOwnerDisplaySetting, Qt as setActivePluginRegistry, R as getSoonestCooldownExpiry, Rn as mapStreamingModeToSlackLegacyDraftStreamMode, Rt as normalizePluginsConfig, S as retryAsync, Sn as splitCommandChain, T as buildAssistantMessage, Tn as resolveAllowlistCandidatePath, U as resolveApiKeyForProfile, Ut as getChatChannelMeta, V as markAuthProfileUsed, Vn as resolveSlackStreamingMode, W as resolveSecretRefValues, Wt as listChatChannels, X as loadConfig, Xn as isDangerousHostEnvVarName, Yn as resolveShellEnvFallbackTimeoutMs, Yt as getActivePluginRegistryKey, Z as readConfigFileSnapshot, Zn as isTruthyEnvValue, Zt as requireActivePluginRegistry, _n as normalizeTrustedSafeBinDirs, _r as resolveSecretInputRef, a as isCliProvider, an as matchPluginCommand, ar as withFileLock, bn as buildEnforcedShellCommand, br as DEFAULT_MODEL, c as normalizeProviderId, cn as setConfigOverride, ct as resolveIMessageAttachmentRoots, d as resolveDefaultModelForAgent, dn as parseConfigPath, dr as resolveAuthProfileDisplayLabel, dt as parseNonNegativeByteSize, en as normalizePluginHttpPath, er as listProfilesForProvider, et as writeConfigFile, f as resolveModelRefFromString, fn as setConfigValueAtPath, ft as secretRefKey, gn as listWritableExplicitTrustedSafeBinDirs, gr as normalizeResolvedSecretInputString, h as resolveThinkingDefault, hn as isTrustedSafeBinPath, hr as hasConfiguredSecretInput, i as findNormalizedProviderValue, in as listPluginCommands, ir as resolveSquidClawAgentDir, it as resolveTelegramCustomCommands, j as requireApiKey, jn as unwrapKnownShellMultiplexerInvocation, jt as isSupportedLocalAvatarExtension, k as getApiKeyForModel, kn as isShellWrapperExecutable, kt as isAvatarHttpUrl, ln as unsetConfigOverride, lr as formatCliCommand, lt as resolveIMessageRemoteAttachmentRoots, m as resolveSubagentSpawnModelSelection, mn as getTrustedSafeBinDirs, mr as coerceSecretRef, mt as parseDurationMs, n as buildConfiguredAllowlistKeys, nn as executePluginCommand, nr as ensureAuthProfileStore, nt as TELEGRAM_COMMAND_NAME_PATTERN, o as modelKey, on as getConfigOverrides, ot as isInboundPathAllowed, p as resolveReasoningDefault, pn as unsetConfigValueAtPath, pr as normalizeSecretInput, q as isRecord$2, qn as VERSION, qt as normalizeChatChannelId, r as buildModelAliasIndex, rn as getPluginCommandSpecs, rr as resolveAuthStorePathForDisplay, rt as normalizeTelegramCommandName, s as normalizeModelRef$2, sn as resetConfigOverrides, t as buildAllowedModelSet, tn as clearPluginCommands, tr as markAuthProfileGood, tt as validateConfigObjectWithPlugins, u as resolveConfiguredModelRef, un as getConfigValueAtPath, ur as resolveCliName, ut as normalizeScpRemoteHost, vn as validateSafeBinArgv, vr as splitTrailingAuthProfile, w as createOllamaStreamFn, wn as matchAllowlist, x as resolveRetryConfig, xn as isWindowsPlatform, xr as DEFAULT_PROVIDER, yn as analyzeShellCommand, yr as DEFAULT_CONTEXT_TOKENS, z as isProfileInCooldown, zn as resolveDiscordPreviewStreamMode, zt as resolveEffectiveEnableState } from "./model-selection-CHnojCCK.js";
7
- import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-Cw3tAXM9.js";
8
- import { c as parseBooleanValue$1, n as MANIFEST_KEY, r as createInternalHookEvent, s as triggerInternalHook } from "./legacy-names-B0wgIP0Q.js";
9
- import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-B-A99X3F.js";
10
- import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-D2XhLqIz.js";
11
- import { _ as normalizeChatType, a as normalizeWhatsAppTarget, b as resolveDiscordAccount, c as listTelegramAccountIds, d as buildChannelAccountBindings, f as listBindings, g as resolveSlackBotToken, h as resolveSlackAppToken, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackReplyToMode, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAccount, r as normalizeChannelId$2, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as createDiscordActionGate, x as normalizeDiscordToken, y as listEnabledDiscordAccounts } from "./plugins-AqsVZZk3.js";
12
- import { a as logWebSelfId, h as resolveAccountEntry, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, t as hasAnyWhatsAppAuth, u as readWebSelfId } from "./accounts-B6F_XCgS.js";
13
- import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, n as markdownToSlackMrkdwnChunks, o as parseSlackBlocksInput, r as normalizeSlackOutboundText, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-B9H0BkfO.js";
14
- import { $ as stripUndefinedFields, A as unpinMessageDiscord, At as resolveChannelEntryMatchWithFallback, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveDiscordSystemLocation, D as pinMessageDiscord, Dt as applyChannelMatchMeta, E as listThreadsDiscord, Et as fetchDiscord, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as buildChannelKeyCandidates, P as fetchChannelInfoDiscord, Q as sendDiscordText, R as kickMemberDiscord, S as deleteMessageDiscord, St as formatDiscordUserTag, T as listPinsDiscord, Tt as DiscordApiError, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendStickerDiscord, _t as resolveDiscordOwnerAllowFrom, a as sendDiscordComponentMessage, at as parseDiscordTarget, b as formatMention, bt as shouldEmitDiscordReactionNotification, c as parseDiscordComponentCustomId, ct as listDiscordDirectoryPeersLive, d as parseDiscordModalCustomIdForCarbon, dt as normalizeDiscordSlug, et as fetchChannelPermissionsDiscord, f as readDiscordComponentSpec, ft as resolveDiscordAllowListMatch, g as sendPollDiscord, gt as resolveDiscordOwnerAccess, h as sendMessageDiscord, ht as resolveDiscordMemberAccessState, i as removeReactionDiscord, it as createDiscordRestClient, j as addRoleDiscord, k as searchMessagesDiscord, kt as normalizeChannelSlug, l as parseDiscordComponentCustomIdForCarbon, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordModalEntry, mt as resolveDiscordGuildEntry, n as reactMessageDiscord, nt as chunkDiscordTextWithMode, o as createDiscordFormModal, ot as resolveDiscordChannelId, p as resolveDiscordComponentEntry, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as removeOwnReactionsDiscord, rt as createDiscordClient, s as formatDiscordComponentEventText, st as listDiscordDirectoryGroupsLive, t as fetchReactionsDiscord, tt as hasAnyGuildPermissionDiscord, u as parseDiscordModalCustomId, ut as normalizeDiscordAllowList, v as sendVoiceMessageDiscord, vt as resolveDiscordShouldRequireMention, w as fetchMessageDiscord, wt as resolveTimestampMs, x as createThreadDiscord, xt as formatDiscordReactionEmoji, y as sendWebhookMessageDiscord, yt as resolveGroupDmAllow, z as listGuildChannelsDiscord } from "./send-DtHQ7_6Z.js";
1
+ import { _ as toAgentModelListLike, a as resolveAgentDir, c as resolveAgentWorkspaceDir, d as resolveRunModelFallbacksOverride, f as resolveSessionAgentId, g as resolveAgentModelPrimaryValue, h as resolveAgentModelFallbackValues, i as resolveAgentConfig, l as resolveDefaultAgentId, n as hasConfiguredModelFallbacks, p as resolveSessionAgentIds, r as listAgentIds, s as resolveAgentSkillsFilter, t as runTasksWithConcurrency, u as resolveEffectiveModelFallbacks } from "./run-with-concurrency-BFR3ReeF.js";
2
+ import { a as resolveGatewayPort, c as resolveStateDir, d as resolveRequiredHomeDir, l as expandHomePrefix, n as STATE_DIR, r as resolveConfigPath } from "./paths-DA5srn0U.js";
3
+ import { C as normalizeLogLevel, E as consumeRootOptionToken, T as FLAG_TERMINATOR, _ as isRich, a as clearActiveProgressLine, c as danger, f as setVerbose, g as colorize, h as warn, i as defaultRuntime, o as registerActiveProgressLine, p as shouldLogVerbose, r as createNonExitingRuntime, s as unregisterActiveProgressLine, t as createSubsystemLogger, u as logVerbose, v as theme, w as resolvePreferredSquidClawTmpDir, y as getChildLogger } from "./subsystem-6v7sWnAD.js";
4
+ import { $ as parseAgentSessionKey, A as normalizeWindowsPathForComparison, B as resolveAgentIdFromSessionKey, G as normalizeAccountId$2, H as sanitizeAgentId, I as classifySessionKeyShape, J as deriveSessionChatType, K as normalizeOptionalAccountId, L as isValidAgentId, M as DEFAULT_MAIN_KEY, N as buildAgentMainSessionKey, P as buildAgentPeerSessionKey, Q as isSubagentSessionKey, R as normalizeAgentId, U as scopedHeartbeatWakeOptions, V as resolveThreadSessionKeys, W as DEFAULT_ACCOUNT_ID, X as isAcpSessionKey, Y as getSubagentDepth, Z as isCronSessionKey, _ as runExec, a as DEFAULT_IDENTITY_FILENAME, b as openBoundaryFile, et as resolveThreadParentSessionKey, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, j as DEFAULT_AGENT_ID, l as ensureAgentWorkspace, m as resolveSquidClawPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, q as isBlockedObjectKey, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as openBoundaryFileSync, z as normalizeMainKey } from "./workspace-kVMIaBrV.js";
5
+ import { C as sleep$1, D as isPlainObject, E as truncateUtf16Safe, S as shortenHomePath, a as CONFIG_DIR, d as formatTerminalLink, f as isRecord$1, h as normalizeE164, i as logWarn, l as ensureDir$3, n as logError, r as logInfo, s as clampInt, t as logDebug, u as escapeRegExp, w as sliceUtf16Safe, x as shortenHomeInString, y as resolveUserPath } from "./logger-CnTSBL7T.js";
6
+ import { $ as resolveConfigSnapshotHash, $n as dedupeProfileIds, $t as createPluginRegistry, A as getCustomProviderApiKey, An as unwrapKnownDispatchWrapperInvocation, At as isPathWithinRoot, B as markAuthProfileFailure, Bn as resolveSlackNativeStreaming, Bt as resolveMemorySlotDecision, C as OLLAMA_NATIVE_BASE_URL, Cn as DEFAULT_SAFE_BINS, D as buildStreamErrorAssistantMessage, Dn as extractShellWrapperInlineCommand, Dt as AVATAR_MAX_BYTES, E as buildAssistantMessageWithZeroUsage, En as resolveCommandResolutionFromArgv, Fn as resolveSafeBinProfiles, Ft as isPathInside, G as describeUnknownError$1, Gn as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Gt as normalizeAnyChannelId, H as resolveProfilesUnavailableReason, Ht as CHAT_CHANNEL_ORDER, I as resolveAuthProfileOrder, In as applyMergePatch, It as safeStatSync, J as parseDotPath, Jn as getShellPathFromLoginShell, Jt as getActivePluginRegistry, K as isNonEmptyString, Kn as resolveAgentMaxConcurrent, Kt as normalizeChannelId$1, L as clearExpiredCooldowns, Ln as isSafeExecutableValue, Lt as applyTestPluginDefaults, M as resolveApiKeyForProvider, Mn as splitShellArgs, Mt as validateJsonSchemaValue, N as resolveEnvApiKey, Nn as SAFE_BIN_PROFILES, Nt as loadPluginManifestRegistry, O as buildUsageWithNoCost, On as isDispatchWrapperExecutable, Ot as isAvatarDataUrl, P as resolveModelAuthMode, Pn as normalizeSafeBinProfileFixtures, Pt as discoverSquidClawPlugins, Qn as resolveOwnerDisplaySetting, Qt as setActivePluginRegistry, R as getSoonestCooldownExpiry, Rn as mapStreamingModeToSlackLegacyDraftStreamMode, Rt as normalizePluginsConfig, S as retryAsync, Sn as splitCommandChain, T as buildAssistantMessage, Tn as resolveAllowlistCandidatePath, U as resolveApiKeyForProfile, Ut as getChatChannelMeta, V as markAuthProfileUsed, Vn as resolveSlackStreamingMode, W as resolveSecretRefValues, Wt as listChatChannels, X as loadConfig, Xn as isDangerousHostEnvVarName, Yn as resolveShellEnvFallbackTimeoutMs, Yt as getActivePluginRegistryKey, Z as readConfigFileSnapshot, Zn as isTruthyEnvValue, Zt as requireActivePluginRegistry, _n as normalizeTrustedSafeBinDirs, _r as resolveSecretInputRef, a as isCliProvider, an as matchPluginCommand, ar as withFileLock, bn as buildEnforcedShellCommand, br as DEFAULT_MODEL, c as normalizeProviderId, cn as setConfigOverride, ct as resolveIMessageAttachmentRoots, d as resolveDefaultModelForAgent, dn as parseConfigPath, dr as resolveAuthProfileDisplayLabel, dt as parseNonNegativeByteSize, en as normalizePluginHttpPath, er as listProfilesForProvider, et as writeConfigFile, f as resolveModelRefFromString, fn as setConfigValueAtPath, ft as secretRefKey, gn as listWritableExplicitTrustedSafeBinDirs, gr as normalizeResolvedSecretInputString, h as resolveThinkingDefault, hn as isTrustedSafeBinPath, hr as hasConfiguredSecretInput, i as findNormalizedProviderValue, in as listPluginCommands, ir as resolveSquidClawAgentDir, it as resolveTelegramCustomCommands, j as requireApiKey, jn as unwrapKnownShellMultiplexerInvocation, jt as isSupportedLocalAvatarExtension, k as getApiKeyForModel, kn as isShellWrapperExecutable, kt as isAvatarHttpUrl, ln as unsetConfigOverride, lr as formatCliCommand, lt as resolveIMessageRemoteAttachmentRoots, m as resolveSubagentSpawnModelSelection, mn as getTrustedSafeBinDirs, mr as coerceSecretRef, mt as parseDurationMs, n as buildConfiguredAllowlistKeys, nn as executePluginCommand, nr as ensureAuthProfileStore, nt as TELEGRAM_COMMAND_NAME_PATTERN, o as modelKey, on as getConfigOverrides, ot as isInboundPathAllowed, p as resolveReasoningDefault, pn as unsetConfigValueAtPath, pr as normalizeSecretInput, q as isRecord$2, qn as VERSION, qt as normalizeChatChannelId, r as buildModelAliasIndex, rn as getPluginCommandSpecs, rr as resolveAuthStorePathForDisplay, rt as normalizeTelegramCommandName, s as normalizeModelRef$2, sn as resetConfigOverrides, t as buildAllowedModelSet, tn as clearPluginCommands, tr as markAuthProfileGood, tt as validateConfigObjectWithPlugins, u as resolveConfiguredModelRef, un as getConfigValueAtPath, ur as resolveCliName, ut as normalizeScpRemoteHost, vn as validateSafeBinArgv, vr as splitTrailingAuthProfile, w as createOllamaStreamFn, wn as matchAllowlist, x as resolveRetryConfig, xn as isWindowsPlatform, xr as DEFAULT_PROVIDER, yn as analyzeShellCommand, yr as DEFAULT_CONTEXT_TOKENS, z as isProfileInCooldown, zn as resolveDiscordPreviewStreamMode, zt as resolveEffectiveEnableState } from "./model-selection-DuNLFQPR.js";
7
+ import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-B5cPlwaz.js";
8
+ import { c as parseBooleanValue$1, n as MANIFEST_KEY, r as createInternalHookEvent, s as triggerInternalHook } from "./legacy-names-aGJJuzM_.js";
9
+ import { _ as normalizeAtHashSlug, a as normalizeReasoningLevel, b as normalizeStringEntriesLower, c as normalizeVerboseLevel, d as getChannelDock, f as listChannelDocks, g as resolveChannelGroupToolsPolicy, h as resolveChannelGroupRequireMention, i as normalizeElevatedLevel, l as resolveResponseUsageMode, m as resolveChannelGroupPolicy, n as formatXHighModelHint, o as normalizeThinkLevel, p as normalizeSignalMessagingTarget, s as normalizeUsageDisplay, t as formatThinkingLevels, u as supportsXHighThinking, v as normalizeHyphenSlug, y as normalizeStringEntries } from "./thinking-B75CXkTT.js";
10
+ import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-DfbMVF9y.js";
11
+ import { _ as normalizeChatType, a as normalizeWhatsAppTarget, b as resolveDiscordAccount, c as listTelegramAccountIds, d as buildChannelAccountBindings, f as listBindings, g as resolveSlackBotToken, h as resolveSlackAppToken, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackReplyToMode, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAccount, r as normalizeChannelId$2, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as createDiscordActionGate, x as normalizeDiscordToken, y as listEnabledDiscordAccounts } from "./plugins-DvejjZnJ.js";
12
+ import { a as logWebSelfId, h as resolveAccountEntry, i as getWebAuthAgeMs, m as webAuthExists, n as resolveWhatsAppAccount, o as logoutWeb, t as hasAnyWhatsAppAuth, u as readWebSelfId } from "./accounts-DwGoZKGm.js";
13
+ import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, n as markdownToSlackMrkdwnChunks, o as parseSlackBlocksInput, r as normalizeSlackOutboundText, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-DdBbRpTP.js";
14
+ import { $ as stripUndefinedFields, A as unpinMessageDiscord, At as resolveChannelEntryMatchWithFallback, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveDiscordSystemLocation, D as pinMessageDiscord, Dt as applyChannelMatchMeta, E as listThreadsDiscord, Et as fetchDiscord, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as buildChannelKeyCandidates, P as fetchChannelInfoDiscord, Q as sendDiscordText, R as kickMemberDiscord, S as deleteMessageDiscord, St as formatDiscordUserTag, T as listPinsDiscord, Tt as DiscordApiError, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendStickerDiscord, _t as resolveDiscordOwnerAllowFrom, a as sendDiscordComponentMessage, at as parseDiscordTarget, b as formatMention, bt as shouldEmitDiscordReactionNotification, c as parseDiscordComponentCustomId, ct as listDiscordDirectoryPeersLive, d as parseDiscordModalCustomIdForCarbon, dt as normalizeDiscordSlug, et as fetchChannelPermissionsDiscord, f as readDiscordComponentSpec, ft as resolveDiscordAllowListMatch, g as sendPollDiscord, gt as resolveDiscordOwnerAccess, h as sendMessageDiscord, ht as resolveDiscordMemberAccessState, i as removeReactionDiscord, it as createDiscordRestClient, j as addRoleDiscord, k as searchMessagesDiscord, kt as normalizeChannelSlug, l as parseDiscordComponentCustomIdForCarbon, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordModalEntry, mt as resolveDiscordGuildEntry, n as reactMessageDiscord, nt as chunkDiscordTextWithMode, o as createDiscordFormModal, ot as resolveDiscordChannelId, p as resolveDiscordComponentEntry, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as removeOwnReactionsDiscord, rt as createDiscordClient, s as formatDiscordComponentEventText, st as listDiscordDirectoryGroupsLive, t as fetchReactionsDiscord, tt as hasAnyGuildPermissionDiscord, u as parseDiscordModalCustomId, ut as normalizeDiscordAllowList, v as sendVoiceMessageDiscord, vt as resolveDiscordShouldRequireMention, w as fetchMessageDiscord, wt as resolveTimestampMs, x as createThreadDiscord, xt as formatDiscordReactionEmoji, y as sendWebhookMessageDiscord, yt as resolveGroupDmAllow, z as listGuildChannelsDiscord } from "./send-BTUU1jWM.js";
15
15
  import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-CXrBi7Jq.js";
16
- import { C as createReplyToModeFilterForChannel, D as normalizeTargetForProvider, E as normalizeChannelTargetInput, O as getGlobalHookRunner, S as shouldSuppressReasoningPayload, T as buildTargetResolverSignature, _ as applyReplyThreading, a as normalizeReplyPayloadsForDelivery, b as isRenderablePayload, c as splitMediaFromOutput, d as toInternalMessageReceivedContext, f as toInternalMessageTranscribedContext, g as applyReplyTagsToPayload, h as fireAndForgetHook, i as normalizeOutboundPayloadsForJson, k as initializeGlobalHookRunner, l as deriveInboundMessageHookContext, m as toPluginMessageReceivedEvent, n as formatOutboundPayloadLog, o as throwIfAborted, p as toPluginMessageContext, r as normalizeOutboundPayloads, s as parseReplyDirectives, t as deliverOutboundPayloads, u as toInternalMessagePreprocessedContext, v as filterMessagingToolDuplicates, w as resolveReplyToMode, x as shouldSuppressMessagingToolReplies, y as filterMessagingToolMediaDuplicates } from "./deliver-BcnsjbAB.js";
17
- import { a as logMessageQueued, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, h as isDiagnosticsEnabled, i as logMessageProcessed, l as logWebhookProcessed, m as emitDiagnosticEvent, n as logLaneDequeue, o as logSessionStateChange, p as getDiagnosticSessionState, r as logLaneEnqueue, t as diag, u as logWebhookReceived } from "./diagnostic-C2lklhkn.js";
18
- import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-s5e9zidf.js";
16
+ import { C as createReplyToModeFilterForChannel, D as normalizeTargetForProvider, E as normalizeChannelTargetInput, O as getGlobalHookRunner, S as shouldSuppressReasoningPayload, T as buildTargetResolverSignature, _ as applyReplyThreading, a as normalizeReplyPayloadsForDelivery, b as isRenderablePayload, c as splitMediaFromOutput, d as toInternalMessageReceivedContext, f as toInternalMessageTranscribedContext, g as applyReplyTagsToPayload, h as fireAndForgetHook, i as normalizeOutboundPayloadsForJson, k as initializeGlobalHookRunner, l as deriveInboundMessageHookContext, m as toPluginMessageReceivedEvent, n as formatOutboundPayloadLog, o as throwIfAborted, p as toPluginMessageContext, r as normalizeOutboundPayloads, s as parseReplyDirectives, t as deliverOutboundPayloads, u as toInternalMessagePreprocessedContext, v as filterMessagingToolDuplicates, w as resolveReplyToMode, x as shouldSuppressMessagingToolReplies, y as filterMessagingToolMediaDuplicates } from "./deliver-DMTUTpTM.js";
17
+ import { a as logMessageQueued, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, h as isDiagnosticsEnabled, i as logMessageProcessed, l as logWebhookProcessed, m as emitDiagnosticEvent, n as logLaneDequeue, o as logSessionStateChange, p as getDiagnosticSessionState, r as logLaneEnqueue, t as diag, u as logWebhookReceived } from "./diagnostic-CnVwZNbm.js";
18
+ import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-C7pGQPcS.js";
19
19
  import { i as resolveTelegramTargetChatType, r as parseTelegramTarget } from "./targets-BiE9e9-P.js";
20
- import { A as mediaKindFromMime, C as imageMimeFromFormat, E as kindFromMime, O as MAX_IMAGE_BYTES, T as isGifMedia, _ as GATEWAY_CLIENT_IDS, b as detectMime, c as INTERNAL_MESSAGE_CHANNEL, d as isInternalMessageChannel, f as isMarkdownCapableMessageChannel, g as resolveMessageChannel, h as resolveGatewayMessageChannel, i as getImageMetadata, l as isDeliverableMessageChannel, m as normalizeMessageChannel, p as listDeliverableMessageChannels, s as resizeToJpeg, u as isGatewayMessageChannel, v as GATEWAY_CLIENT_MODES, w as isAudioFileName, x as extensionForMime, y as GATEWAY_CLIENT_NAMES } from "./image-ops-BoN1E_WZ.js";
21
- import { $ as removeChannelAllowFromStoreEntry, A as expandTextLinks, B as resolveTelegramThreadSpec, C as buildSenderName, D as buildTelegramThreadParams, E as buildTelegramParentPeer, F as resolveTelegramForumThreadId, G as firstDefined$1, H as normalizeAllowFrom$2, I as resolveTelegramGroupAllowFromContext, J as resolveGroupAllowFromSources, K as isSenderIdAllowed, L as resolveTelegramMediaPlaceholder, M as hasBotMention, N as normalizeForwardedContext, O as buildTypingThreadParams, P as resolveTelegramDirectPeerId, Q as readChannelAllowFromStore, R as resolveTelegramReplyId, S as buildSenderLabel, T as buildTelegramGroupPeerId, U as normalizeDmAllowFromWithStore$1, V as isSenderAllowed$1, W as resolveSenderAllowMatch$1, X as toLocationContext, Y as formatLocationText, Z as addChannelAllowFromStoreEntry, _ as splitTelegramCaption, a as reactMessageTelegram, at as isVoiceCompatibleAudio, b as resolveCronStorePath, c as sendStickerTelegram, d as isRecoverableTelegramNetworkError, et as upsertChannelPairingRequest, f as markdownToTelegramChunks, g as resolveTelegramFetch, h as wrapFileReferencesInHtml, i as editMessageTelegram, it as listPairingChannels, j as extractTelegramLocation, k as describeReplyTarget, l as resolveTelegramVoiceSend, m as renderTelegramHtmlText, n as createForumTopicTelegram, nt as writeJsonFileAtomically, o as sendMessageTelegram, p as markdownToTelegramHtml, q as mergeDmAllowFromSources, r as deleteMessageTelegram, rt as getPairingAdapter, s as sendPollTelegram, t as buildInlineKeyboard, tt as readJsonFileWithFallback, u as wasSentByBot, v as withTelegramApiErrorLogging, w as buildTelegramGroupFrom, x as buildGroupLabel, y as loadCronStore, z as resolveTelegramStreamMode } from "./send-D5D0ZGht.js";
22
- import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-o-WX5w2t.js";
23
- import { $ as deliveryContextKey, $t as matchesAnyGlobPattern, A as isTransientHttpError, At as resolveGroupSessionKey, B as parseSessionThreadInfo, Bt as resolveGatewayCredentialsFromConfig, C as isCompactionFailureError, Ct as setSessionRuntimeModel, D as isLikelyContextOverflowError, Dt as resolveMainSessionKey, E as isFailoverErrorMessage, Et as resolveExplicitAgentSessionKey, F as isTimeoutErrorMessage, Ft as resolveBrowserConfig, G as readSessionUpdatedAt, Gt as collectExplicitAllowlist, Ht as resolveSandboxConfigForAgent, I as ensureSandboxWorkspaceForSession, It as resolveProfile, J as updateSessionStore, Jt as stripPluginOnlyAllowlist, K as recordSessionMetaFromInbound, Kt as expandPolicyWithPluginGroups, L as resolveSandboxContext, Lt as getBridgeAuthForPort, M as parseImageSizeError, Mt as resolveSessionLockMaxHoldFromTimeout, N as sanitizeUserFacingText, Nt as createBrowserRouteContext, O as isRateLimitAssistantError, Ot as deriveSessionMetaPatch, P as isAuthPermanentErrorMessage, Pt as registerBrowserRoutes, Q as deliveryContextFromSession, Qt as compileGlobPatterns, R as resolveSandboxRuntimeStatus, Rt as ensureBrowserControlAuth, S as isCloudCodeAssistFormatError, St as resolveFreshSessionTotalTokens, T as isFailoverAssistantError, U as resolveAndPersistSessionFile, Ut as applyOwnerOnlyToolPolicy, V as appendAssistantMessageToSessionTranscript, Vt as trimToUndefined$1, W as loadSessionStore, Wt as buildPluginToolGroups, X as isCacheEnabled, Xt as normalizeToolName, Y as updateSessionStoreEntry, Yt as expandToolGroups, Z as resolveCacheTtlMs$1, Zt as resolveToolProfilePolicy, _ as formatBillingErrorMessage, _t as resolveSessionResetPolicy, a as isMessagingToolDuplicateNormalized, an as sanitizeGoogleTurnOrdering, at as capArrayByJsonBytes, b as isAuthAssistantError, bt as DEFAULT_RESET_TRIGGERS, c as extractToolCallsFromAssistant, ct as parseInlineDirectives$1, d as downgradeOpenAIFunctionCallReasoningPairs, dt as hasInterSessionUserProvenance, en as buildBootstrapContextFiles, et as mergeDeliveryContext, f as downgradeOpenAIReasoningBlocks, ft as normalizeInputProvenance, g as formatAssistantErrorText, gt as resolveChannelResetConfig, h as classifyFailoverReason, ht as evaluateSessionFreshness, in as resolveBootstrapTotalMaxChars, it as archiveSessionTranscripts, j as parseImageDimensionError, jt as acquireSessionWriteLock, k as isRawApiErrorPayload, kt as resolveConversationLabel, l as extractToolResultId, lt as INPUT_PROVENANCE_KIND_VALUES, m as BILLING_ERROR_USER_MESSAGE, mt as resolveSessionKey, n as validateGeminiTurns, nn as resolveBootstrapMaxChars, nt as normalizeSessionDeliveryFields, o as normalizeTextForComparison, ot as countToolResults, p as isGoogleModelApi, pt as jsonUtf8Bytes, q as updateLastRoute, qt as mergeAlsoAllowPolicy, r as pickFallbackThinkingLevel, rn as resolveBootstrapPromptTruncationWarningMode, rt as normalizeAccountId$3, s as sanitizeSessionMessagesImages, st as extractToolCallNames, t as validateAnthropicTurns, tn as ensureSessionHeader, tt as normalizeDeliveryContext, u as sanitizeToolCallIdsForCloudCodeAssist, ut as applyInputProvenanceToUserMessage, v as formatRawAssistantErrorForUi, vt as resolveSessionResetType, w as isContextOverflowError, wt as canonicalizeMainSessionAlias, x as isBillingAssistantError, xt as mergeSessionEntry, y as getApiErrorPayloadFingerprint, yt as resolveThreadFlag, z as extractDeliveryInfo, zt as resolveBrowserControlAuth } from "./pi-embedded-helpers-DQ7IaeOi.js";
24
- import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-Dxm25ptH.js";
25
- import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-B9N2bqKU.js";
26
- import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-Cpsiv2KL.js";
27
- import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-NmPEVjIo.js";
28
- import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-DfgAh2Ml.js";
29
- import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-CwHbZdFH.js";
30
- import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-DXXfs2WL.js";
31
- import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-CvQ41zCV.js";
20
+ import { A as mediaKindFromMime, C as imageMimeFromFormat, E as kindFromMime, O as MAX_IMAGE_BYTES, T as isGifMedia, _ as GATEWAY_CLIENT_IDS, b as detectMime, c as INTERNAL_MESSAGE_CHANNEL, d as isInternalMessageChannel, f as isMarkdownCapableMessageChannel, g as resolveMessageChannel, h as resolveGatewayMessageChannel, i as getImageMetadata, l as isDeliverableMessageChannel, m as normalizeMessageChannel, p as listDeliverableMessageChannels, s as resizeToJpeg, u as isGatewayMessageChannel, v as GATEWAY_CLIENT_MODES, w as isAudioFileName, x as extensionForMime, y as GATEWAY_CLIENT_NAMES } from "./image-ops-Dg8iraUV.js";
21
+ import { $ as removeChannelAllowFromStoreEntry, A as expandTextLinks, B as resolveTelegramThreadSpec, C as buildSenderName, D as buildTelegramThreadParams, E as buildTelegramParentPeer, F as resolveTelegramForumThreadId, G as firstDefined$1, H as normalizeAllowFrom$2, I as resolveTelegramGroupAllowFromContext, J as resolveGroupAllowFromSources, K as isSenderIdAllowed, L as resolveTelegramMediaPlaceholder, M as hasBotMention, N as normalizeForwardedContext, O as buildTypingThreadParams, P as resolveTelegramDirectPeerId, Q as readChannelAllowFromStore, R as resolveTelegramReplyId, S as buildSenderLabel, T as buildTelegramGroupPeerId, U as normalizeDmAllowFromWithStore$1, V as isSenderAllowed$1, W as resolveSenderAllowMatch$1, X as toLocationContext, Y as formatLocationText, Z as addChannelAllowFromStoreEntry, _ as splitTelegramCaption, a as reactMessageTelegram, at as isVoiceCompatibleAudio, b as resolveCronStorePath, c as sendStickerTelegram, d as isRecoverableTelegramNetworkError, et as upsertChannelPairingRequest, f as markdownToTelegramChunks, g as resolveTelegramFetch, h as wrapFileReferencesInHtml, i as editMessageTelegram, it as listPairingChannels, j as extractTelegramLocation, k as describeReplyTarget, l as resolveTelegramVoiceSend, m as renderTelegramHtmlText, n as createForumTopicTelegram, nt as writeJsonFileAtomically, o as sendMessageTelegram, p as markdownToTelegramHtml, q as mergeDmAllowFromSources, r as deleteMessageTelegram, rt as getPairingAdapter, s as sendPollTelegram, t as buildInlineKeyboard, tt as readJsonFileWithFallback, u as wasSentByBot, v as withTelegramApiErrorLogging, w as buildTelegramGroupFrom, x as buildGroupLabel, y as loadCronStore, z as resolveTelegramStreamMode } from "./send-BGlcHjUD.js";
22
+ import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-V-InbjOM.js";
23
+ import { $ as deliveryContextKey, $t as matchesAnyGlobPattern, A as isTransientHttpError, At as resolveGroupSessionKey, B as parseSessionThreadInfo, Bt as resolveGatewayCredentialsFromConfig, C as isCompactionFailureError, Ct as setSessionRuntimeModel, D as isLikelyContextOverflowError, Dt as resolveMainSessionKey, E as isFailoverErrorMessage, Et as resolveExplicitAgentSessionKey, F as isTimeoutErrorMessage, Ft as resolveBrowserConfig, G as readSessionUpdatedAt, Gt as collectExplicitAllowlist, Ht as resolveSandboxConfigForAgent, I as ensureSandboxWorkspaceForSession, It as resolveProfile, J as updateSessionStore, Jt as stripPluginOnlyAllowlist, K as recordSessionMetaFromInbound, Kt as expandPolicyWithPluginGroups, L as resolveSandboxContext, Lt as getBridgeAuthForPort, M as parseImageSizeError, Mt as resolveSessionLockMaxHoldFromTimeout, N as sanitizeUserFacingText, Nt as createBrowserRouteContext, O as isRateLimitAssistantError, Ot as deriveSessionMetaPatch, P as isAuthPermanentErrorMessage, Pt as registerBrowserRoutes, Q as deliveryContextFromSession, Qt as compileGlobPatterns, R as resolveSandboxRuntimeStatus, Rt as ensureBrowserControlAuth, S as isCloudCodeAssistFormatError, St as resolveFreshSessionTotalTokens, T as isFailoverAssistantError, U as resolveAndPersistSessionFile, Ut as applyOwnerOnlyToolPolicy, V as appendAssistantMessageToSessionTranscript, Vt as trimToUndefined$1, W as loadSessionStore, Wt as buildPluginToolGroups, X as isCacheEnabled, Xt as normalizeToolName, Y as updateSessionStoreEntry, Yt as expandToolGroups, Z as resolveCacheTtlMs$1, Zt as resolveToolProfilePolicy, _ as formatBillingErrorMessage, _t as resolveSessionResetPolicy, a as isMessagingToolDuplicateNormalized, an as sanitizeGoogleTurnOrdering, at as capArrayByJsonBytes, b as isAuthAssistantError, bt as DEFAULT_RESET_TRIGGERS, c as extractToolCallsFromAssistant, ct as parseInlineDirectives$1, d as downgradeOpenAIFunctionCallReasoningPairs, dt as hasInterSessionUserProvenance, en as buildBootstrapContextFiles, et as mergeDeliveryContext, f as downgradeOpenAIReasoningBlocks, ft as normalizeInputProvenance, g as formatAssistantErrorText, gt as resolveChannelResetConfig, h as classifyFailoverReason, ht as evaluateSessionFreshness, in as resolveBootstrapTotalMaxChars, it as archiveSessionTranscripts, j as parseImageDimensionError, jt as acquireSessionWriteLock, k as isRawApiErrorPayload, kt as resolveConversationLabel, l as extractToolResultId, lt as INPUT_PROVENANCE_KIND_VALUES, m as BILLING_ERROR_USER_MESSAGE, mt as resolveSessionKey, n as validateGeminiTurns, nn as resolveBootstrapMaxChars, nt as normalizeSessionDeliveryFields, o as normalizeTextForComparison, ot as countToolResults, p as isGoogleModelApi, pt as jsonUtf8Bytes, q as updateLastRoute, qt as mergeAlsoAllowPolicy, r as pickFallbackThinkingLevel, rn as resolveBootstrapPromptTruncationWarningMode, rt as normalizeAccountId$3, s as sanitizeSessionMessagesImages, st as extractToolCallNames, t as validateAnthropicTurns, tn as ensureSessionHeader, tt as normalizeDeliveryContext, u as sanitizeToolCallIdsForCloudCodeAssist, ut as applyInputProvenanceToUserMessage, v as formatRawAssistantErrorForUi, vt as resolveSessionResetType, w as isContextOverflowError, wt as canonicalizeMainSessionAlias, x as isBillingAssistantError, xt as mergeSessionEntry, y as getApiErrorPayloadFingerprint, yt as resolveThreadFlag, z as extractDeliveryInfo, zt as resolveBrowserControlAuth } from "./pi-embedded-helpers-Di58J7Eh.js";
24
+ import { A as rawDataToString, B as isSecureWebSocketUrl, C as ensureChromeExtensionRelayServer, N as DEFAULT_UPLOAD_DIR, P as resolveExistingPathsWithinRoot, U as DEFAULT_AI_SNAPSHOT_MAX_CHARS, s as resolveLsofCommandSync, z as isLoopbackHost } from "./chrome-OgCChbC_.js";
25
+ import { c as assertSandboxPath, d as resolveSandboxedMediaSource, f as applySkillEnvOverrides, i as resolveSkillsPromptForRun, l as resolveSandboxInputPath, n as buildWorkspaceSkillSnapshot, p as applySkillEnvOverridesFromSnapshot, r as loadWorkspaceSkillEntries, s as assertMediaNotDataUrl } from "./skills-CdCS1HeL.js";
26
+ import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-DORgbZ1w.js";
27
+ import { i as testRegexWithBoundedInput, r as compileSafeRegex, t as redactSensitiveText } from "./redact-DvzicBMu.js";
28
+ import { i as formatUncaughtError, o as readErrorName, r as formatErrorMessage } from "./errors-kkRuS2Cs.js";
29
+ import { a as readFileWithinRoot, c as writeFileWithinRoot, i as openFileWithinRoot, n as copyFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-BoB4X3GD.js";
30
+ import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-D-fike7s.js";
31
+ import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-D9z0dn7D.js";
32
32
  import { n as readJsonFile, r as writeJsonAtomic, t as createAsyncLock } from "./json-files-D7-rxoSr.js";
33
- import { t as resolveIMessageAccount } from "./accounts-Bkb-J8V6.js";
34
- import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CXClY8zC.js";
33
+ import { t as resolveIMessageAccount } from "./accounts-DjhBQg_8.js";
34
+ import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DSd911Oe.js";
35
35
  import { n as onSessionTranscriptUpdate, t as emitSessionTranscriptUpdate } from "./transcript-events-uYL2gEou.js";
36
- import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-Zn6jVmkX.js";
37
- import { C as minimaxUnderstandImage, S as extractTextFromChatContent, _ as formatToolSummary, a as resolveProviderVisionModelFromConfig, b as findCodeRegions, c as extractThinkingFromTaggedStream, d as inferToolMetaFromArgs, f as isAssistantMessage, g as stripThinkingTagsFromText, h as stripMinimaxToolCallXml, i as decodeDataUrl, l as extractThinkingFromTaggedText, m as stripDowngradedToolCallText, n as coerceImageAssistantText, o as extractAssistantText$1, p as promoteThinkingTagsToBlocks, r as coerceImageModelConfig, s as extractAssistantThinking, u as formatReasoningMessage, v as resolveToolDisplay, w as ensureSquidClawModelsJson, x as isInsideCode, y as stripReasoningTagsFromText } from "./image-C-8Kd2Mh.js";
38
- import { _ as resolveAttachmentKind, a as resolveAutoImageModel, b as modelSupportsVision, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, h as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as findModelInCatalog, y as loadModelCatalog } from "./audio-transcription-runner-B3u2x_ja.js";
39
- import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-b8tSR7_e.js";
36
+ import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-Dp5OiXeA.js";
37
+ import { C as minimaxUnderstandImage, S as extractTextFromChatContent, _ as formatToolSummary, a as resolveProviderVisionModelFromConfig, b as findCodeRegions, c as extractThinkingFromTaggedStream, d as inferToolMetaFromArgs, f as isAssistantMessage, g as stripThinkingTagsFromText, h as stripMinimaxToolCallXml, i as decodeDataUrl, l as extractThinkingFromTaggedText, m as stripDowngradedToolCallText, n as coerceImageAssistantText, o as extractAssistantText$1, p as promoteThinkingTagsToBlocks, r as coerceImageModelConfig, s as extractAssistantThinking, u as formatReasoningMessage, v as resolveToolDisplay, w as ensureSquidClawModelsJson, x as isInsideCode, y as stripReasoningTagsFromText } from "./image-kKMG59st.js";
38
+ import { _ as resolveAttachmentKind, a as resolveAutoImageModel, b as modelSupportsVision, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, h as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$2, v as findModelInCatalog, y as loadModelCatalog } from "./audio-transcription-runner-Cv0Q47cM.js";
39
+ import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-DP-JjB6Z.js";
40
40
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-Wgx3OXYj.js";
41
- import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-D16tjNsZ.js";
42
- import { t as makeProxyFetch } from "./proxy-fetch-C2v-Utgg.js";
43
- import { _ as isSafeFenceBreak, a as loadWebMedia, c as chunkByNewline, d as chunkMarkdownTextWithMode, f as chunkText, g as findFenceSpanAt, h as resolveTextChunkLimit, i as getDefaultLocalRoots, m as resolveChunkMode, o as loadWebMediaRaw, p as chunkTextWithMode, s as resolveMarkdownTableMode, u as chunkMarkdownText, v as parseFenceSpans } from "./ir-Dut0zXyS.js";
44
- import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-D0ZJUbbf.js";
45
- import { _ as isRestartEnabled, a as listChatCommandsForConfig, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, g as isNativeCommandsExplicitlyDisabled, h as isCommandFlagEnabled, i as listChatCommands, l as normalizeCommandBody, m as shouldHandleTextCommands, n as findCommandByNativeName, o as listNativeCommandSpecs, p as serializeCommandArgs, r as isCommandEnabled, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs, v as resolveNativeCommandsEnabled, y as resolveNativeSkillsEnabled } from "./commands-registry-B44COZFz.js";
46
- import { a as getRemoteSkillEligibility, c as pruneExpiredPending, i as resolveSkillCommandInvocation, l as resolvePairingPaths, n as listSkillCommandsForAgents, o as ensureSkillsWatcher, r as listSkillCommandsForWorkspace, s as getSkillsSnapshotVersion, t as listReservedChatSlashCommandNames } from "./skill-commands-BwTLQRR8.js";
41
+ import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-BDy975wP.js";
42
+ import { t as makeProxyFetch } from "./proxy-fetch-lH6RsRTE.js";
43
+ import { _ as isSafeFenceBreak, a as loadWebMedia, c as chunkByNewline, d as chunkMarkdownTextWithMode, f as chunkText, g as findFenceSpanAt, h as resolveTextChunkLimit, i as getDefaultLocalRoots, m as resolveChunkMode, o as loadWebMediaRaw, p as chunkTextWithMode, s as resolveMarkdownTableMode, u as chunkMarkdownText, v as parseFenceSpans } from "./ir-CKK03mBV.js";
44
+ import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-DgNRx3Nr.js";
45
+ import { _ as isRestartEnabled, a as listChatCommandsForConfig, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, g as isNativeCommandsExplicitlyDisabled, h as isCommandFlagEnabled, i as listChatCommands, l as normalizeCommandBody, m as shouldHandleTextCommands, n as findCommandByNativeName, o as listNativeCommandSpecs, p as serializeCommandArgs, r as isCommandEnabled, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs, v as resolveNativeCommandsEnabled, y as resolveNativeSkillsEnabled } from "./commands-registry-BJjv8_oR.js";
46
+ import { a as getRemoteSkillEligibility, c as pruneExpiredPending, i as resolveSkillCommandInvocation, l as resolvePairingPaths, n as listSkillCommandsForAgents, o as ensureSkillsWatcher, r as listSkillCommandsForWorkspace, s as getSkillsSnapshotVersion, t as listReservedChatSlashCommandNames } from "./skill-commands-Cz45_nme.js";
47
47
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-tZXOZ9FV.js";
48
48
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-CmCpeg5n.js";
49
- import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-CxJbx4sD.js";
49
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-CPpt4XaL.js";
50
50
  import { t as buildOutboundMediaLoadOptions } from "./load-options-BFUunM8u.js";
51
51
  import { n as normalizePollInput } from "./polls-CYTwXmA1.js";
52
- import { t as convertMarkdownTables } from "./tables-BRYYxYs7.js";
53
- import { a as signalCheck, i as resolveSignalRpcContext, n as sendReadReceiptSignal, o as signalRpcRequest, r as sendTypingSignal, s as streamSignalEvents, t as sendMessageSignal } from "./send-B5QEmMJ4.js";
54
- import { a as isAllowedIMessageSender, i as formatIMessageChatTarget, n as createIMessageRpcClient, o as normalizeIMessageHandle, r as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, s as parseIMessageTarget, t as sendMessageIMessage } from "./send-Bx9CqcZr.js";
55
- import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-6-Svu8Dx.js";
56
- import { n as resolveMemorySearchConfig } from "./manager-BPGhs30n.js";
57
- import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-DlQOkf-g.js";
52
+ import { t as convertMarkdownTables } from "./tables-BTFiZyRU.js";
53
+ import { a as signalCheck, i as resolveSignalRpcContext, n as sendReadReceiptSignal, o as signalRpcRequest, r as sendTypingSignal, s as streamSignalEvents, t as sendMessageSignal } from "./send-dTQd-IyJ.js";
54
+ import { a as isAllowedIMessageSender, i as formatIMessageChatTarget, n as createIMessageRpcClient, o as normalizeIMessageHandle, r as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, s as parseIMessageTarget, t as sendMessageIMessage } from "./send-4nRsZJXH.js";
55
+ import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-DPc_PGsA.js";
56
+ import { n as resolveMemorySearchConfig } from "./manager-DINhLnMi.js";
57
+ import { f as listMemoryFiles, p as normalizeExtraMemoryPaths } from "./query-expansion-Dzxt6kXo.js";
58
58
  import { createRequire } from "node:module";
59
- import * as fs$2 from "node:fs/promises";
59
+ import * as fs$1 from "node:fs/promises";
60
60
  import fs, { appendFile, mkdir } from "node:fs/promises";
61
61
  import os, { homedir } from "node:os";
62
62
  import * as path$1 from "node:path";
63
63
  import path, { isAbsolute } from "node:path";
64
- import fs$1, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
64
+ import syncFs, { existsSync, mkdirSync, mkdtempSync, promises, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
65
65
  import JSON5 from "json5";
66
66
  import { inspect, isDeepStrictEqual, promisify } from "node:util";
67
67
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
@@ -72,7 +72,7 @@ import { CURRENT_SESSION_VERSION, DefaultResourceLoader, SessionManager, Setting
72
72
  import { EdgeTTS } from "node-edge-tts";
73
73
  import { createServer } from "node:http";
74
74
  import { ProxyAgent, fetch as fetch$1 } from "undici";
75
- import WebSocket$1, { WebSocket } from "ws";
75
+ import WebSocket, { WebSocket as WebSocket$1 } from "ws";
76
76
  import { Buffer as Buffer$1 } from "node:buffer";
77
77
  import { createJiti } from "jiti";
78
78
  import AjvPkg from "ajv";
@@ -3285,7 +3285,7 @@ async function resolveSquidClawDocsPath(params) {
3285
3285
  const workspaceDir = params.workspaceDir?.trim();
3286
3286
  if (workspaceDir) {
3287
3287
  const workspaceDocs = path.join(workspaceDir, "docs");
3288
- if (fs$1.existsSync(workspaceDocs)) return workspaceDocs;
3288
+ if (syncFs.existsSync(workspaceDocs)) return workspaceDocs;
3289
3289
  }
3290
3290
  const packageRoot = await resolveSquidClawPackageRoot({
3291
3291
  cwd: params.cwd,
@@ -3294,7 +3294,7 @@ async function resolveSquidClawDocsPath(params) {
3294
3294
  });
3295
3295
  if (!packageRoot) return null;
3296
3296
  const packageDocs = path.join(packageRoot, "docs");
3297
- return fs$1.existsSync(packageDocs) ? packageDocs : null;
3297
+ return syncFs.existsSync(packageDocs) ? packageDocs : null;
3298
3298
  }
3299
3299
 
3300
3300
  //#endregion
@@ -6431,7 +6431,7 @@ function resolveDefaultIdentityPath() {
6431
6431
  return path.join(resolveStateDir(), "identity", "device.json");
6432
6432
  }
6433
6433
  function ensureDir$2(filePath) {
6434
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
6434
+ syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
6435
6435
  }
6436
6436
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
6437
6437
  function base64UrlEncode(buf) {
@@ -6467,8 +6467,8 @@ function generateIdentity() {
6467
6467
  }
6468
6468
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6469
6469
  try {
6470
- if (fs$1.existsSync(filePath)) {
6471
- const raw = fs$1.readFileSync(filePath, "utf8");
6470
+ if (syncFs.existsSync(filePath)) {
6471
+ const raw = syncFs.readFileSync(filePath, "utf8");
6472
6472
  const parsed = JSON.parse(raw);
6473
6473
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
6474
6474
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -6477,9 +6477,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6477
6477
  ...parsed,
6478
6478
  deviceId: derivedId
6479
6479
  };
6480
- fs$1.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
6480
+ syncFs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
6481
6481
  try {
6482
- fs$1.chmodSync(filePath, 384);
6482
+ syncFs.chmodSync(filePath, 384);
6483
6483
  } catch {}
6484
6484
  return {
6485
6485
  deviceId: derivedId,
@@ -6504,9 +6504,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
6504
6504
  privateKeyPem: identity.privateKeyPem,
6505
6505
  createdAtMs: Date.now()
6506
6506
  };
6507
- fs$1.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
6507
+ syncFs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
6508
6508
  try {
6509
- fs$1.chmodSync(filePath, 384);
6509
+ syncFs.chmodSync(filePath, 384);
6510
6510
  } catch {}
6511
6511
  return identity;
6512
6512
  }
@@ -6698,8 +6698,8 @@ function resolveDeviceAuthPath(env = process.env) {
6698
6698
  }
6699
6699
  function readStore(filePath) {
6700
6700
  try {
6701
- if (!fs$1.existsSync(filePath)) return null;
6702
- const raw = fs$1.readFileSync(filePath, "utf8");
6701
+ if (!syncFs.existsSync(filePath)) return null;
6702
+ const raw = syncFs.readFileSync(filePath, "utf8");
6703
6703
  const parsed = JSON.parse(raw);
6704
6704
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
6705
6705
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -6709,10 +6709,10 @@ function readStore(filePath) {
6709
6709
  }
6710
6710
  }
6711
6711
  function writeStore(filePath, store) {
6712
- fs$1.mkdirSync(path.dirname(filePath), { recursive: true });
6713
- fs$1.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
6712
+ syncFs.mkdirSync(path.dirname(filePath), { recursive: true });
6713
+ syncFs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
6714
6714
  try {
6715
- fs$1.chmodSync(filePath, 384);
6715
+ syncFs.chmodSync(filePath, 384);
6716
6716
  } catch {}
6717
6717
  }
6718
6718
  function loadDeviceAuthToken(params) {
@@ -8233,7 +8233,7 @@ var GatewayClient = class {
8233
8233
  if (fingerprint !== expected) return /* @__PURE__ */ new Error("gateway tls fingerprint mismatch");
8234
8234
  });
8235
8235
  }
8236
- this.ws = new WebSocket(url, wsOptions);
8236
+ this.ws = new WebSocket$1(url, wsOptions);
8237
8237
  this.ws.on("open", () => {
8238
8238
  if (url.startsWith("wss://") && this.opts.tlsFingerprint) {
8239
8239
  const tlsError = this.validateTlsFingerprint();
@@ -8429,7 +8429,7 @@ var GatewayClient = class {
8429
8429
  const connectChallengeTimeoutMs = typeof rawConnectDelayMs === "number" && Number.isFinite(rawConnectDelayMs) ? Math.max(250, Math.min(1e4, rawConnectDelayMs)) : 2e3;
8430
8430
  if (this.connectTimer) clearTimeout(this.connectTimer);
8431
8431
  this.connectTimer = setTimeout(() => {
8432
- if (this.connectSent || this.ws?.readyState !== WebSocket.OPEN) return;
8432
+ if (this.connectSent || this.ws?.readyState !== WebSocket$1.OPEN) return;
8433
8433
  this.opts.onConnectError?.(/* @__PURE__ */ new Error("gateway connect challenge timeout"));
8434
8434
  this.ws?.close(1008, "connect challenge timeout");
8435
8435
  }, connectChallengeTimeoutMs);
@@ -8471,7 +8471,7 @@ var GatewayClient = class {
8471
8471
  return null;
8472
8472
  }
8473
8473
  async request(method, params, opts) {
8474
- if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error("gateway not connected");
8474
+ if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error("gateway not connected");
8475
8475
  const id = randomUUID();
8476
8476
  const frame = {
8477
8477
  type: "req",
@@ -9893,7 +9893,7 @@ function normalizeReplyPayload(payload, opts = {}) {
9893
9893
  */
9894
9894
  let deliverRuntimePromise$2 = null;
9895
9895
  function loadDeliverRuntime$2() {
9896
- deliverRuntimePromise$2 ??= import("./deliver-runtime-_mBfV_4S.js");
9896
+ deliverRuntimePromise$2 ??= import("./deliver-runtime-B80olQwJ.js");
9897
9897
  return deliverRuntimePromise$2;
9898
9898
  }
9899
9899
  /**
@@ -10581,7 +10581,7 @@ function normalizeSessionKey(value) {
10581
10581
  }
10582
10582
  function readSessionStore(storePath) {
10583
10583
  try {
10584
- const raw = fs$1.readFileSync(storePath, "utf-8");
10584
+ const raw = syncFs.readFileSync(storePath, "utf-8");
10585
10585
  const parsed = JSON5.parse(raw);
10586
10586
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
10587
10587
  } catch {}
@@ -11181,7 +11181,7 @@ const DEFAULT_SUBAGENT_ANNOUNCE_TIMEOUT_MS = 6e4;
11181
11181
  const MAX_TIMER_SAFE_TIMEOUT_MS = 2147e6;
11182
11182
  let subagentRegistryRuntimePromise = null;
11183
11183
  function loadSubagentRegistryRuntime() {
11184
- subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-Bm5UEB8c.js");
11184
+ subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-D2rUxU5J.js");
11185
11185
  return subagentRegistryRuntimePromise;
11186
11186
  }
11187
11187
  const DIRECT_ANNOUNCE_TRANSIENT_RETRY_DELAYS_MS = FAST_TEST_MODE ? [
@@ -14535,7 +14535,7 @@ async function runWithConcurrency(tasks, limit) {
14535
14535
  //#region src/media-understanding/echo-transcript.ts
14536
14536
  let deliverRuntimePromise$1 = null;
14537
14537
  function loadDeliverRuntime$1() {
14538
- deliverRuntimePromise$1 ??= import("./deliver-runtime-_mBfV_4S.js");
14538
+ deliverRuntimePromise$1 ??= import("./deliver-runtime-B80olQwJ.js");
14539
14539
  return deliverRuntimePromise$1;
14540
14540
  }
14541
14541
  const DEFAULT_ECHO_TRANSCRIPT_FORMAT = "📝 \"{transcript}\"";
@@ -18184,7 +18184,7 @@ function mergeLegacyAgent(current, legacy) {
18184
18184
  }
18185
18185
  function ensureDir$1(filePath) {
18186
18186
  const dir = path.dirname(filePath);
18187
- fs$1.mkdirSync(dir, { recursive: true });
18187
+ syncFs.mkdirSync(dir, { recursive: true });
18188
18188
  }
18189
18189
  function coerceAllowlistEntries(allowlist) {
18190
18190
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -18254,11 +18254,11 @@ function generateToken() {
18254
18254
  function loadExecApprovals() {
18255
18255
  const filePath = resolveExecApprovalsPath();
18256
18256
  try {
18257
- if (!fs$1.existsSync(filePath)) return normalizeExecApprovals({
18257
+ if (!syncFs.existsSync(filePath)) return normalizeExecApprovals({
18258
18258
  version: 1,
18259
18259
  agents: {}
18260
18260
  });
18261
- const raw = fs$1.readFileSync(filePath, "utf8");
18261
+ const raw = syncFs.readFileSync(filePath, "utf8");
18262
18262
  const parsed = JSON.parse(raw);
18263
18263
  if (parsed?.version !== 1) return normalizeExecApprovals({
18264
18264
  version: 1,
@@ -18275,9 +18275,9 @@ function loadExecApprovals() {
18275
18275
  function saveExecApprovals(file) {
18276
18276
  const filePath = resolveExecApprovalsPath();
18277
18277
  ensureDir$1(filePath);
18278
- fs$1.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
18278
+ syncFs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
18279
18279
  try {
18280
- fs$1.chmodSync(filePath, 384);
18280
+ syncFs.chmodSync(filePath, 384);
18281
18281
  } catch {}
18282
18282
  }
18283
18283
  function ensureExecApprovals() {
@@ -18774,18 +18774,18 @@ function drainSystemEventEntries(sessionKey) {
18774
18774
  function resolvePowerShellPath() {
18775
18775
  const programFiles = process.env.ProgramFiles || process.env.PROGRAMFILES || "C:\\Program Files";
18776
18776
  const pwsh7 = path.join(programFiles, "PowerShell", "7", "pwsh.exe");
18777
- if (fs$1.existsSync(pwsh7)) return pwsh7;
18777
+ if (syncFs.existsSync(pwsh7)) return pwsh7;
18778
18778
  const programW6432 = process.env.ProgramW6432;
18779
18779
  if (programW6432 && programW6432 !== programFiles) {
18780
18780
  const pwsh7Alt = path.join(programW6432, "PowerShell", "7", "pwsh.exe");
18781
- if (fs$1.existsSync(pwsh7Alt)) return pwsh7Alt;
18781
+ if (syncFs.existsSync(pwsh7Alt)) return pwsh7Alt;
18782
18782
  }
18783
18783
  const pwshInPath = resolveShellFromPath("pwsh");
18784
18784
  if (pwshInPath) return pwshInPath;
18785
18785
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
18786
18786
  if (systemRoot) {
18787
18787
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
18788
- if (fs$1.existsSync(candidate)) return candidate;
18788
+ if (syncFs.existsSync(candidate)) return candidate;
18789
18789
  }
18790
18790
  return "powershell.exe";
18791
18791
  }
@@ -18823,7 +18823,7 @@ function resolveShellFromPath(name) {
18823
18823
  for (const entry of entries) {
18824
18824
  const candidate = path.join(entry, name);
18825
18825
  try {
18826
- fs$1.accessSync(candidate, fs$1.constants.X_OK);
18826
+ syncFs.accessSync(candidate, syncFs.constants.X_OK);
18827
18827
  return candidate;
18828
18828
  } catch {}
18829
18829
  }
@@ -22298,7 +22298,7 @@ function ensureContextWindowCacheLoaded() {
22298
22298
  await ensureSquidClawModelsJson(cfg);
22299
22299
  } catch {}
22300
22300
  try {
22301
- const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-o-WX5w2t.js").then((n) => n.r);
22301
+ const { discoverAuthStorage, discoverModels } = await import("./pi-model-discovery-V-InbjOM.js").then((n) => n.r);
22302
22302
  const agentDir = resolveSquidClawAgentDir();
22303
22303
  const modelRegistry = discoverModels(discoverAuthStorage(agentDir), agentDir);
22304
22304
  applyDiscoveredContextWindows({
@@ -22364,6 +22364,112 @@ function resolveContextTokensForModel(params) {
22364
22364
  return lookupContextTokens(params.model) ?? params.fallbackContextTokens;
22365
22365
  }
22366
22366
 
22367
+ //#endregion
22368
+ //#region src/agents/agent-tier.ts
22369
+ const PAID_PROVIDERS = ["anthropic", "openai"];
22370
+ function isPaidProvider(modelRef) {
22371
+ const trimmed = modelRef.trim().toLowerCase();
22372
+ for (const provider of PAID_PROVIDERS) if (trimmed.startsWith(provider + "/") || trimmed.startsWith(provider + ":")) return {
22373
+ isPaid: true,
22374
+ provider
22375
+ };
22376
+ return {
22377
+ isPaid: false,
22378
+ provider: ""
22379
+ };
22380
+ }
22381
+ /**
22382
+ * Check if the primary provider's last interaction was a failure
22383
+ * with no successful use after it.
22384
+ */
22385
+ function isPrimaryLastKnownBroken(store, profileIds, now) {
22386
+ for (const id of profileIds) {
22387
+ const stats = store.usageStats?.[id];
22388
+ if (!stats) continue;
22389
+ if (typeof stats.disabledUntil === "number" && stats.disabledUntil > now) return true;
22390
+ if (typeof stats.cooldownUntil === "number" && stats.cooldownUntil > now && (stats.errorCount ?? 0) > 0) return true;
22391
+ const lastFailure = stats.lastFailureAt ?? 0;
22392
+ const lastSuccess = stats.lastUsed ?? 0;
22393
+ if (lastFailure > 0 && lastFailure > lastSuccess) return true;
22394
+ }
22395
+ return false;
22396
+ }
22397
+ /**
22398
+ * Resolve the fallback flag file path.
22399
+ */
22400
+ function resolveFallbackFlagPath() {
22401
+ const dir = process.env.SQUIDCLAW_DIR || path.join(process.env.HOME || "/root", ".squidclaw");
22402
+ return path.join(dir, "fallback-active.json");
22403
+ }
22404
+ /**
22405
+ * Read the fallback flag file. Returns null if not present or invalid.
22406
+ */
22407
+ function readFallbackFlag() {
22408
+ try {
22409
+ const flagPath = resolveFallbackFlagPath();
22410
+ if (!syncFs.existsSync(flagPath)) return null;
22411
+ const data = JSON.parse(syncFs.readFileSync(flagPath, "utf8"));
22412
+ if (data && data.active) return data;
22413
+ return null;
22414
+ } catch {
22415
+ return null;
22416
+ }
22417
+ }
22418
+ /**
22419
+ * Write the fallback flag file when primary model fails.
22420
+ */
22421
+ function writeFallbackFlag(data) {
22422
+ try {
22423
+ const flagPath = resolveFallbackFlagPath();
22424
+ syncFs.writeFileSync(flagPath, JSON.stringify({
22425
+ active: true,
22426
+ ...data,
22427
+ since: Date.now()
22428
+ }));
22429
+ } catch {}
22430
+ }
22431
+ /**
22432
+ * Clear the fallback flag file when primary model recovers.
22433
+ */
22434
+ function clearFallbackFlag() {
22435
+ try {
22436
+ const flagPath = resolveFallbackFlagPath();
22437
+ if (syncFs.existsSync(flagPath)) syncFs.unlinkSync(flagPath);
22438
+ } catch {}
22439
+ }
22440
+ /**
22441
+ * Resolve the current agent tier.
22442
+ *
22443
+ * - "super": Paid provider configured and last known working.
22444
+ * - "degraded": Paid provider configured but last attempt failed (no success since).
22445
+ * - "base": Local/free model only.
22446
+ */
22447
+ function resolveAgentTier(params) {
22448
+ const primary = resolveAgentModelPrimaryValue(params.cfg?.agents?.defaults?.model);
22449
+ if (!primary) return "base";
22450
+ const { isPaid, provider } = isPaidProvider(primary);
22451
+ if (!isPaid) return "base";
22452
+ if (!resolveEnvApiKey(provider)) return "base";
22453
+ try {
22454
+ const authStore = ensureAuthProfileStore(params.agentDir ?? resolveSquidClawAgentDir(), { allowKeychainPrompt: false });
22455
+ const profileIds = resolveAuthProfileOrder({
22456
+ cfg: params.cfg,
22457
+ store: authStore,
22458
+ provider
22459
+ });
22460
+ if (profileIds.length > 0 && isPrimaryLastKnownBroken(authStore, profileIds, Date.now())) return "degraded";
22461
+ } catch {}
22462
+ if (readFallbackFlag()) return "degraded";
22463
+ return "super";
22464
+ }
22465
+ function formatAgentTierLabel(tier) {
22466
+ switch (tier) {
22467
+ case "super": return "🟢 Super Agent";
22468
+ case "degraded": return "🟠 Basic Agent (degraded)";
22469
+ case "base": return "🟡 Basic Agent";
22470
+ }
22471
+ }
22472
+
22367
22473
  //#endregion
22368
22474
  //#region src/agents/usage.ts
22369
22475
  function makeZeroUsageSnapshot() {
@@ -22454,7 +22560,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22454
22560
  function hasGitMarker(repoRoot) {
22455
22561
  const gitPath = path.join(repoRoot, ".git");
22456
22562
  try {
22457
- const stat = fs$1.statSync(gitPath);
22563
+ const stat = syncFs.statSync(gitPath);
22458
22564
  return stat.isDirectory() || stat.isFile();
22459
22565
  } catch {
22460
22566
  return false;
@@ -22466,10 +22572,10 @@ function findGitRoot(startDir, opts = {}) {
22466
22572
  function resolveGitDirFromMarker(repoRoot) {
22467
22573
  const gitPath = path.join(repoRoot, ".git");
22468
22574
  try {
22469
- const stat = fs$1.statSync(gitPath);
22575
+ const stat = syncFs.statSync(gitPath);
22470
22576
  if (stat.isDirectory()) return gitPath;
22471
22577
  if (!stat.isFile()) return null;
22472
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22578
+ const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22473
22579
  if (!match?.[1]) return null;
22474
22580
  return path.resolve(repoRoot, match[1].trim());
22475
22581
  } catch {
@@ -22536,7 +22642,7 @@ const resolveCommitHash = (options = {}) => {
22536
22642
  cachedCommit = null;
22537
22643
  return cachedCommit;
22538
22644
  }
22539
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
22645
+ const head = syncFs.readFileSync(headPath, "utf-8").trim();
22540
22646
  if (!head) {
22541
22647
  cachedCommit = null;
22542
22648
  return cachedCommit;
@@ -22544,7 +22650,7 @@ const resolveCommitHash = (options = {}) => {
22544
22650
  if (head.startsWith("ref:")) {
22545
22651
  const ref = head.replace(/^ref:\s*/i, "").trim();
22546
22652
  const refPath = path.resolve(path.dirname(headPath), ref);
22547
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
22653
+ cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
22548
22654
  return cachedCommit;
22549
22655
  }
22550
22656
  cachedCommit = formatCommit(head);
@@ -22804,17 +22910,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
22804
22910
  } catch {
22805
22911
  return;
22806
22912
  }
22807
- if (!fs$1.existsSync(logPath)) return;
22913
+ if (!syncFs.existsSync(logPath)) return;
22808
22914
  try {
22809
22915
  const TAIL_BYTES = 8192;
22810
- const stat = fs$1.statSync(logPath);
22916
+ const stat = syncFs.statSync(logPath);
22811
22917
  const offset = Math.max(0, stat.size - TAIL_BYTES);
22812
22918
  const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
22813
- const fd = fs$1.openSync(logPath, "r");
22919
+ const fd = syncFs.openSync(logPath, "r");
22814
22920
  try {
22815
- fs$1.readSync(fd, buf, 0, buf.length, offset);
22921
+ syncFs.readSync(fd, buf, 0, buf.length, offset);
22816
22922
  } finally {
22817
- fs$1.closeSync(fd);
22923
+ syncFs.closeSync(fd);
22818
22924
  }
22819
22925
  const tail = buf.toString("utf-8");
22820
22926
  const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
@@ -22996,6 +23102,22 @@ function buildStatusMessage(args) {
22996
23102
  activeModelRef: activeModelLabel,
22997
23103
  state: entry
22998
23104
  });
23105
+ if (!fallbackState.active) {
23106
+ const flag = readFallbackFlag();
23107
+ if (flag) {
23108
+ fallbackState = {
23109
+ active: true,
23110
+ reason: flag.reason || "primary unavailable"
23111
+ };
23112
+ if (flag.activeModel) {
23113
+ const parts = flag.activeModel.split("/");
23114
+ if (parts.length === 2) {
23115
+ activeProvider = parts[0];
23116
+ activeModel = parts[1];
23117
+ }
23118
+ }
23119
+ }
23120
+ }
22999
23121
  const effectiveCostAuthMode = fallbackState.active ? activeAuthMode : selectedAuthMode ?? activeAuthMode;
23000
23122
  const showCost = effectiveCostAuthMode === "api-key" || effectiveCostAuthMode === "mixed";
23001
23123
  const costConfig = showCost ? resolveModelCostConfig({
@@ -23052,6 +23174,11 @@ function buildStatusMessage(args) {
23052
23174
  const voiceLine = formatVoiceModeLine(args.config, args.sessionEntry);
23053
23175
  return [
23054
23176
  versionLine,
23177
+ args.config ? formatAgentTierLabel((() => {
23178
+ const t = resolveAgentTier({ cfg: args.config });
23179
+ if (t === "super" && fallbackState.active) return "degraded";
23180
+ return t;
23181
+ })()) : null,
23055
23182
  args.timeLine,
23056
23183
  modelLine,
23057
23184
  fallbackLine,
@@ -24323,7 +24450,7 @@ function resolveRepoRoot(params) {
24323
24450
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
24324
24451
  if (configured) try {
24325
24452
  const resolved = path.resolve(configured);
24326
- if (fs$1.statSync(resolved).isDirectory()) return resolved;
24453
+ if (syncFs.statSync(resolved).isDirectory()) return resolved;
24327
24454
  } catch {}
24328
24455
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
24329
24456
  const seen = /* @__PURE__ */ new Set();
@@ -25109,7 +25236,7 @@ async function buildContextReply(params) {
25109
25236
  //#region src/auto-reply/reply/commands-export-session.ts
25110
25237
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
25111
25238
  function loadTemplate(fileName) {
25112
- return fs$1.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
25239
+ return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
25113
25240
  }
25114
25241
  function generateHtml(sessionData) {
25115
25242
  const template = loadTemplate("template.html");
@@ -25183,7 +25310,7 @@ async function buildExportSessionReply(params) {
25183
25310
  } catch (err) {
25184
25311
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
25185
25312
  }
25186
- if (!fs$1.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
25313
+ if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
25187
25314
  const sessionManager = SessionManager.open(sessionFile);
25188
25315
  const entries = sessionManager.getEntries();
25189
25316
  const header = sessionManager.getHeader();
@@ -25204,8 +25331,8 @@ async function buildExportSessionReply(params) {
25204
25331
  const defaultFileName = `squidclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
25205
25332
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
25206
25333
  const outputDir = path.dirname(outputPath);
25207
- if (!fs$1.existsSync(outputDir)) fs$1.mkdirSync(outputDir, { recursive: true });
25208
- fs$1.writeFileSync(outputPath, html, "utf-8");
25334
+ if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
25335
+ syncFs.writeFileSync(outputPath, html, "utf-8");
25209
25336
  const relativePath = path.relative(params.workspaceDir, outputPath);
25210
25337
  return { text: [
25211
25338
  "✅ Session exported!",
@@ -25352,8 +25479,8 @@ function resolveZaiApiKey() {
25352
25479
  }
25353
25480
  try {
25354
25481
  const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
25355
- if (!fs$1.existsSync(authPath)) return;
25356
- const data = JSON.parse(fs$1.readFileSync(authPath, "utf-8"));
25482
+ if (!syncFs.existsSync(authPath)) return;
25483
+ const data = JSON.parse(syncFs.readFileSync(authPath, "utf-8"));
25357
25484
  return data["z-ai"]?.access || data.zai?.access;
25358
25485
  } catch {
25359
25486
  return;
@@ -27172,7 +27299,7 @@ function shouldPersistAnyBindingState() {
27172
27299
  }
27173
27300
  function shouldPersistBindingMutations() {
27174
27301
  if (shouldPersistAnyBindingState()) return true;
27175
- return fs$1.existsSync(resolveThreadBindingsPath());
27302
+ return syncFs.existsSync(resolveThreadBindingsPath());
27176
27303
  }
27177
27304
  function saveBindingsToDisk(params = {}) {
27178
27305
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -28640,7 +28767,7 @@ const applyCostTotal = (totals, costTotal) => {
28640
28767
  totals.totalCost += costTotal;
28641
28768
  };
28642
28769
  async function* readJsonlRecords(filePath) {
28643
- const fileStream = fs$1.createReadStream(filePath, { encoding: "utf-8" });
28770
+ const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
28644
28771
  const rl = readline.createInterface({
28645
28772
  input: fileStream,
28646
28773
  crlfDelay: Infinity
@@ -28712,10 +28839,10 @@ async function loadCostUsageSummary(params) {
28712
28839
  const dailyMap = /* @__PURE__ */ new Map();
28713
28840
  const totals = emptyTotals();
28714
28841
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
28715
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28842
+ const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28716
28843
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
28717
28844
  const filePath = path.join(sessionsDir, entry.name);
28718
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
28845
+ const stats = await syncFs.promises.stat(filePath).catch(() => null);
28719
28846
  if (!stats) return null;
28720
28847
  if (stats.mtimeMs < sinceTime) return null;
28721
28848
  return filePath;
@@ -28748,7 +28875,7 @@ async function loadCostUsageSummary(params) {
28748
28875
  }
28749
28876
  async function loadSessionCostSummary(params) {
28750
28877
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
28751
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
28878
+ if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
28752
28879
  const totals = emptyTotals();
28753
28880
  let firstActivity;
28754
28881
  let lastActivity;
@@ -30789,6 +30916,7 @@ function applyModelOverrideToSessionEntry(params) {
30789
30916
  }
30790
30917
  if (updated) {
30791
30918
  delete entry.fallbackNoticeSelectedModel;
30919
+ clearFallbackFlag();
30792
30920
  delete entry.fallbackNoticeActiveModel;
30793
30921
  delete entry.fallbackNoticeReason;
30794
30922
  entry.updatedAt = Date.now();
@@ -31271,7 +31399,7 @@ async function createModelSelectionState(params) {
31271
31399
  }
31272
31400
  }
31273
31401
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
31274
- const { ensureAuthProfileStore } = await import("./model-selection-CHnojCCK.js").then((n) => n.F);
31402
+ const { ensureAuthProfileStore } = await import("./model-selection-DuNLFQPR.js").then((n) => n.F);
31275
31403
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
31276
31404
  const providerKey = normalizeProviderId(provider);
31277
31405
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -34932,7 +35060,7 @@ function asBoolean(value) {
34932
35060
  }
34933
35061
  function resolveTempPathParts(opts) {
34934
35062
  const tmpDir = opts.tmpDir ?? resolvePreferredSquidClawTmpDir();
34935
- if (!opts.tmpDir) fs$1.mkdirSync(tmpDir, {
35063
+ if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
34936
35064
  recursive: true,
34937
35065
  mode: 448
34938
35066
  });
@@ -35018,7 +35146,7 @@ async function writeUrlToFile(filePath, url, opts) {
35018
35146
  if (typeof contentLength === "number" && Number.isFinite(contentLength) && contentLength > MAX_CAMERA_URL_DOWNLOAD_BYTES) throw new Error(`writeUrlToFile: content-length ${contentLength} exceeds max ${MAX_CAMERA_URL_DOWNLOAD_BYTES}`);
35019
35147
  const body = res.body;
35020
35148
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
35021
- const fileHandle = await fs$2.open(filePath, "w");
35149
+ const fileHandle = await fs$1.open(filePath, "w");
35022
35150
  let thrown;
35023
35151
  try {
35024
35152
  const reader = body.getReader();
@@ -35036,7 +35164,7 @@ async function writeUrlToFile(filePath, url, opts) {
35036
35164
  await fileHandle.close();
35037
35165
  }
35038
35166
  if (thrown) {
35039
- await fs$2.unlink(filePath).catch(() => {});
35167
+ await fs$1.unlink(filePath).catch(() => {});
35040
35168
  throw thrown;
35041
35169
  }
35042
35170
  } finally {
@@ -35049,7 +35177,7 @@ async function writeUrlToFile(filePath, url, opts) {
35049
35177
  }
35050
35178
  async function writeBase64ToFile(filePath, base64) {
35051
35179
  const buf = Buffer.from(base64, "base64");
35052
- await fs$2.writeFile(filePath, buf);
35180
+ await fs$1.writeFile(filePath, buf);
35053
35181
  return {
35054
35182
  path: filePath,
35055
35183
  bytes: buf.length
@@ -38107,9 +38235,9 @@ function loadExternalCatalogEntries(options) {
38107
38235
  const entries = [];
38108
38236
  for (const rawPath of paths) {
38109
38237
  const resolved = resolveUserPath(rawPath);
38110
- if (!fs$1.existsSync(resolved)) continue;
38238
+ if (!syncFs.existsSync(resolved)) continue;
38111
38239
  try {
38112
- const payload = JSON.parse(fs$1.readFileSync(resolved, "utf-8"));
38240
+ const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
38113
38241
  entries.push(...parseCatalogEntries(payload));
38114
38242
  } catch {}
38115
38243
  }
@@ -42301,7 +42429,7 @@ function listExistingAgentIdsFromDisk() {
42301
42429
  const root = resolveStateDir();
42302
42430
  const agentsDir = path.join(root, "agents");
42303
42431
  try {
42304
- return fs$1.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
42432
+ return syncFs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
42305
42433
  } catch {
42306
42434
  return [];
42307
42435
  }
@@ -48701,7 +48829,7 @@ async function runAgentTurnWithFallback(params) {
48701
48829
  if (corruptedSessionId) {
48702
48830
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
48703
48831
  try {
48704
- fs$1.unlinkSync(transcriptPath);
48832
+ syncFs.unlinkSync(transcriptPath);
48705
48833
  } catch {}
48706
48834
  }
48707
48835
  delete params.activeSessionStore[sessionKey];
@@ -49521,7 +49649,7 @@ async function readSessionLogSnapshot(params) {
49521
49649
  if (!logPath) return {};
49522
49650
  const snapshot = {};
49523
49651
  if (params.includeByteSize) try {
49524
- const stat = await fs$1.promises.stat(logPath);
49652
+ const stat = await syncFs.promises.stat(logPath);
49525
49653
  const size = Math.floor(stat.size);
49526
49654
  snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
49527
49655
  } catch {
@@ -49535,7 +49663,7 @@ async function readSessionLogSnapshot(params) {
49535
49663
  return snapshot;
49536
49664
  }
49537
49665
  async function readLastNonzeroUsageFromSessionLog(logPath) {
49538
- const handle = await fs$1.promises.open(logPath, "r");
49666
+ const handle = await syncFs.promises.open(logPath, "r");
49539
49667
  try {
49540
49668
  let position = (await handle.stat()).size;
49541
49669
  let leadingPartial = "";
@@ -50232,9 +50360,9 @@ async function readPostCompactionContext(workspaceDir, cfg, nowMs) {
50232
50360
  if (!opened.ok) return null;
50233
50361
  const sections = extractSections((() => {
50234
50362
  try {
50235
- return fs$1.readFileSync(opened.fd, "utf-8");
50363
+ return syncFs.readFileSync(opened.fd, "utf-8");
50236
50364
  } finally {
50237
- fs$1.closeSync(opened.fd);
50365
+ syncFs.closeSync(opened.fd);
50238
50366
  }
50239
50367
  })(), ["Session Startup", "Red Lines"]);
50240
50368
  if (sections.length === 0) return null;
@@ -50456,7 +50584,7 @@ async function runReplyAgent(params) {
50456
50584
  if (resolved) transcriptCandidates.add(resolved);
50457
50585
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
50458
50586
  for (const candidate of transcriptCandidates) try {
50459
- fs$1.unlinkSync(candidate);
50587
+ syncFs.unlinkSync(candidate);
50460
50588
  } catch {}
50461
50589
  }
50462
50590
  return true;
@@ -50539,6 +50667,11 @@ async function runReplyAgent(params) {
50539
50667
  fallbackStateEntry.fallbackNoticeSelectedModel = fallbackTransition.nextState.selectedModel;
50540
50668
  fallbackStateEntry.fallbackNoticeActiveModel = fallbackTransition.nextState.activeModel;
50541
50669
  fallbackStateEntry.fallbackNoticeReason = fallbackTransition.nextState.reason;
50670
+ writeFallbackFlag({
50671
+ selectedModel: fallbackTransition.nextState.selectedModel,
50672
+ activeModel: fallbackTransition.nextState.activeModel,
50673
+ reason: fallbackTransition.nextState.reason
50674
+ });
50542
50675
  fallbackStateEntry.updatedAt = Date.now();
50543
50676
  activeSessionEntry = fallbackStateEntry;
50544
50677
  }
@@ -51402,7 +51535,7 @@ const warnedContexts = /* @__PURE__ */ new Map();
51402
51535
  const log$10 = createSubsystemLogger("session-maintenance-warning");
51403
51536
  let deliverRuntimePromise = null;
51404
51537
  function loadDeliverRuntime() {
51405
- deliverRuntimePromise ??= import("./deliver-runtime-_mBfV_4S.js");
51538
+ deliverRuntimePromise ??= import("./deliver-runtime-B80olQwJ.js");
51406
51539
  return deliverRuntimePromise;
51407
51540
  }
51408
51541
  function shouldSendWarning() {
@@ -51569,7 +51702,7 @@ function forkSessionFromParent(params) {
51569
51702
  agentId: params.agentId,
51570
51703
  sessionsDir: params.sessionsDir
51571
51704
  });
51572
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
51705
+ if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
51573
51706
  try {
51574
51707
  const manager = SessionManager.open(parentSessionFile);
51575
51708
  const leafId = manager.getLeafId();
@@ -51593,7 +51726,7 @@ function forkSessionFromParent(params) {
51593
51726
  cwd: manager.getCwd(),
51594
51727
  parentSession: parentSessionFile
51595
51728
  };
51596
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
51729
+ syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
51597
51730
  return {
51598
51731
  sessionId,
51599
51732
  sessionFile
@@ -56379,7 +56512,7 @@ const VISION_PROVIDERS = [
56379
56512
  ];
56380
56513
  let imageRuntimePromise = null;
56381
56514
  function loadImageRuntime() {
56382
- imageRuntimePromise ??= import("./image-runtime-D11wBIC8.js");
56515
+ imageRuntimePromise ??= import("./image-runtime-BqIv7p_K.js");
56383
56516
  return imageRuntimePromise;
56384
56517
  }
56385
56518
  /**
@@ -58440,7 +58573,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
58440
58573
  hasTypedText
58441
58574
  };
58442
58575
  try {
58443
- const { transcribeFirstAudio } = await import("./audio-preflight-DZ1LNMJp.js");
58576
+ const { transcribeFirstAudio } = await import("./audio-preflight-BUCBED7N.js");
58444
58577
  if (params.abortSignal?.aborted) return {
58445
58578
  hasAudioAttachment,
58446
58579
  hasTypedText
@@ -60019,7 +60152,7 @@ function identityHasValues(identity) {
60019
60152
  }
60020
60153
  function loadIdentityFromFile(identityPath) {
60021
60154
  try {
60022
- const parsed = parseIdentityMarkdown(fs$1.readFileSync(identityPath, "utf-8"));
60155
+ const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
60023
60156
  if (!identityHasValues(parsed)) return null;
60024
60157
  return parsed;
60025
60158
  } catch {
@@ -60043,7 +60176,7 @@ function resolveAvatarSource(cfg, agentId) {
60043
60176
  }
60044
60177
  function resolveExistingPath(value) {
60045
60178
  try {
60046
- return fs$1.realpathSync(value);
60179
+ return syncFs.realpathSync(value);
60047
60180
  } catch {
60048
60181
  return path.resolve(value);
60049
60182
  }
@@ -60061,7 +60194,7 @@ function resolveLocalAvatarPath(params) {
60061
60194
  reason: "unsupported_extension"
60062
60195
  };
60063
60196
  try {
60064
- const stat = fs$1.statSync(realPath);
60197
+ const stat = syncFs.statSync(realPath);
60065
60198
  if (!stat.isFile()) return {
60066
60199
  ok: false,
60067
60200
  reason: "missing"
@@ -65834,27 +65967,27 @@ let slackSenderRuntimePromise = null;
65834
65967
  let signalSenderRuntimePromise = null;
65835
65968
  let imessageSenderRuntimePromise = null;
65836
65969
  function loadWhatsAppSenderRuntime() {
65837
- whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-B7GC68Cu.js");
65970
+ whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-4aOUBP2J.js");
65838
65971
  return whatsappSenderRuntimePromise;
65839
65972
  }
65840
65973
  function loadTelegramSenderRuntime() {
65841
- telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-DHlcnjQO.js");
65974
+ telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-CRyP-xDQ.js");
65842
65975
  return telegramSenderRuntimePromise;
65843
65976
  }
65844
65977
  function loadDiscordSenderRuntime() {
65845
- discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-CUTAK2hy.js");
65978
+ discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-GIuvX7Xw.js");
65846
65979
  return discordSenderRuntimePromise;
65847
65980
  }
65848
65981
  function loadSlackSenderRuntime() {
65849
- slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-HEEwW4uU.js");
65982
+ slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-cbfFoLZ4.js");
65850
65983
  return slackSenderRuntimePromise;
65851
65984
  }
65852
65985
  function loadSignalSenderRuntime() {
65853
- signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-wN7MkzLw.js");
65986
+ signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-CuVJyw7n.js");
65854
65987
  return signalSenderRuntimePromise;
65855
65988
  }
65856
65989
  function loadIMessageSenderRuntime() {
65857
- imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-CQOiEIuA.js");
65990
+ imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-B3TC7G80.js");
65858
65991
  return imessageSenderRuntimePromise;
65859
65992
  }
65860
65993
  function createDefaultDeps() {
@@ -69544,7 +69677,7 @@ function createDiscordGatewayPlugin(params) {
69544
69677
  return super.registerClient(client);
69545
69678
  }
69546
69679
  createWebSocket(url) {
69547
- return new WebSocket$1(url, { agent: wsAgent });
69680
+ return new WebSocket(url, { agent: wsAgent });
69548
69681
  }
69549
69682
  }
69550
69683
  return new ProxyGatewayPlugin();
@@ -72038,7 +72171,7 @@ async function monitorIMessageProvider(opts = {}) {
72038
72171
  function readFileIfExists(filePath) {
72039
72172
  if (!filePath) return;
72040
72173
  try {
72041
- return fs$1.readFileSync(filePath, "utf-8").trim();
72174
+ return syncFs.readFileSync(filePath, "utf-8").trim();
72042
72175
  } catch {
72043
72176
  return;
72044
72177
  }
@@ -72668,7 +72801,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
72668
72801
  prefix: "line-media",
72669
72802
  extension: getExtensionForContentType(contentType)
72670
72803
  });
72671
- await fs$1.promises.writeFile(filePath, buffer);
72804
+ await syncFs.promises.writeFile(filePath, buffer);
72672
72805
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
72673
72806
  return {
72674
72807
  path: filePath,
@@ -78691,15 +78824,15 @@ let slashCommandsRuntimePromise = null;
78691
78824
  let slashDispatchRuntimePromise = null;
78692
78825
  let slashSkillCommandsRuntimePromise = null;
78693
78826
  function loadSlashCommandsRuntime() {
78694
- slashCommandsRuntimePromise ??= import("./slash-commands.runtime-CjBXruwG.js");
78827
+ slashCommandsRuntimePromise ??= import("./slash-commands.runtime-CZz6v6b3.js");
78695
78828
  return slashCommandsRuntimePromise;
78696
78829
  }
78697
78830
  function loadSlashDispatchRuntime() {
78698
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-C7rHRQFg.js");
78831
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-SO7HOe8q.js");
78699
78832
  return slashDispatchRuntimePromise;
78700
78833
  }
78701
78834
  function loadSlashSkillCommandsRuntime() {
78702
- slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-DYK20Lxf.js");
78835
+ slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-Bawt7j0r.js");
78703
78836
  return slashSkillCommandsRuntimePromise;
78704
78837
  }
78705
78838
  const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
@@ -79689,7 +79822,7 @@ function collectTelegramUnmentionedGroupIds(groups) {
79689
79822
  }
79690
79823
  let auditMembershipRuntimePromise = null;
79691
79824
  function loadAuditMembershipRuntime() {
79692
- auditMembershipRuntimePromise ??= import("./audit-membership-runtime-w23FnNAN.js");
79825
+ auditMembershipRuntimePromise ??= import("./audit-membership-runtime-DyLj-uhz.js");
79693
79826
  return auditMembershipRuntimePromise;
79694
79827
  }
79695
79828
  async function auditTelegramGroupMembership(params) {
@@ -82064,7 +82197,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
82064
82197
  const disableAudioPreflight = firstDefined$1(topicConfig?.disableAudioPreflight, groupConfig?.disableAudioPreflight) === true;
82065
82198
  let preflightTranscript;
82066
82199
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
82067
- const { transcribeFirstAudio } = await import("./audio-preflight-DZ1LNMJp.js");
82200
+ const { transcribeFirstAudio } = await import("./audio-preflight-BUCBED7N.js");
82068
82201
  preflightTranscript = await transcribeFirstAudio({
82069
82202
  ctx: {
82070
82203
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -84903,7 +85036,7 @@ function createWhatsAppLoginTool() {
84903
85036
  force: Type.Optional(Type.Boolean())
84904
85037
  }),
84905
85038
  execute: async (_toolCallId, args) => {
84906
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-C0fDBnpM.js");
85039
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-KbOpR0GQ.js");
84907
85040
  if ((args?.action ?? "start") === "wait") {
84908
85041
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
84909
85042
  return {
@@ -84978,23 +85111,23 @@ let webOutboundPromise = null;
84978
85111
  let webLoginPromise = null;
84979
85112
  let whatsappActionsPromise = null;
84980
85113
  function loadWebOutbound() {
84981
- webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-Cgu2MfqR.js");
85114
+ webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-DQqIlwhS.js");
84982
85115
  return webOutboundPromise;
84983
85116
  }
84984
85117
  function loadWebLogin() {
84985
- webLoginPromise ??= import("./runtime-whatsapp-login.runtime-DumUjKRz.js");
85118
+ webLoginPromise ??= import("./runtime-whatsapp-login.runtime-DxV9iv6l.js");
84986
85119
  return webLoginPromise;
84987
85120
  }
84988
85121
  function loadWebLoginQr() {
84989
- webLoginQrPromise ??= import("./login-qr-C0fDBnpM.js");
85122
+ webLoginQrPromise ??= import("./login-qr-KbOpR0GQ.js");
84990
85123
  return webLoginQrPromise;
84991
85124
  }
84992
85125
  function loadWebChannel() {
84993
- webChannelPromise ??= import("./web-C0xcHURK.js");
85126
+ webChannelPromise ??= import("./web-QsxgXbNK.js");
84994
85127
  return webChannelPromise;
84995
85128
  }
84996
85129
  function loadWhatsAppActions() {
84997
- whatsappActionsPromise ??= import("./whatsapp-actions-Cuy0qeQK.js");
85130
+ whatsappActionsPromise ??= import("./whatsapp-actions-CzqsuSGx.js");
84998
85131
  return whatsappActionsPromise;
84999
85132
  }
85000
85133
  function createRuntimeWhatsApp() {
@@ -85435,7 +85568,7 @@ const log$6 = createSubsystemLogger("memory");
85435
85568
  const QMD_MANAGER_CACHE = /* @__PURE__ */ new Map();
85436
85569
  let managerRuntimePromise = null;
85437
85570
  function loadManagerRuntime() {
85438
- managerRuntimePromise ??= import("./manager-runtime-BB9lcoFR.js");
85571
+ managerRuntimePromise ??= import("./manager-runtime-D6ckUNSs.js");
85439
85572
  return managerRuntimePromise;
85440
85573
  }
85441
85574
  async function getMemorySearchManager(params) {
@@ -85449,7 +85582,7 @@ async function getMemorySearchManager(params) {
85449
85582
  if (cached) return { manager: cached };
85450
85583
  }
85451
85584
  try {
85452
- const { QmdMemoryManager } = await import("./qmd-manager-CO-shcLU.js");
85585
+ const { QmdMemoryManager } = await import("./qmd-manager-BN0siR2Z.js");
85453
85586
  const primary = await QmdMemoryManager.create({
85454
85587
  cfg: params.cfg,
85455
85588
  agentId: params.agentId,
@@ -86023,7 +86156,7 @@ async function withMemoryManagerForAgent(params) {
86023
86156
  }
86024
86157
  async function checkReadableFile(pathname) {
86025
86158
  try {
86026
- await fs.access(pathname, fs$1.constants.R_OK);
86159
+ await fs.access(pathname, syncFs.constants.R_OK);
86027
86160
  return { exists: true };
86028
86161
  } catch (err) {
86029
86162
  const code = err.code;
@@ -86082,7 +86215,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
86082
86215
  }
86083
86216
  let dirReadable = null;
86084
86217
  try {
86085
- await fs.access(memoryDir, fs$1.constants.R_OK);
86218
+ await fs.access(memoryDir, syncFs.constants.R_OK);
86086
86219
  dirReadable = true;
86087
86220
  } catch (err) {
86088
86221
  const code = err.code;
@@ -86531,7 +86664,7 @@ const resolvePluginSdkAliasFile = (params) => {
86531
86664
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
86532
86665
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
86533
86666
  const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
86534
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
86667
+ for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
86535
86668
  const parent = path.dirname(cursor);
86536
86669
  if (parent === cursor) break;
86537
86670
  cursor = parent;
@@ -87137,7 +87270,7 @@ function loadSquidClawPlugins(options = {}) {
87137
87270
  continue;
87138
87271
  }
87139
87272
  const safeSource = opened.path;
87140
- fs$1.closeSync(opened.fd);
87273
+ syncFs.closeSync(opened.fd);
87141
87274
  let mod = null;
87142
87275
  try {
87143
87276
  mod = getJiti()(safeSource);
@@ -87255,7 +87388,7 @@ function loadSquidClawPlugins(options = {}) {
87255
87388
  }
87256
87389
  function safeRealpathOrResolve(value) {
87257
87390
  try {
87258
- return fs$1.realpathSync(value);
87391
+ return syncFs.realpathSync(value);
87259
87392
  } catch {
87260
87393
  return path.resolve(value);
87261
87394
  }
@@ -87694,9 +87827,9 @@ function resolvePatchFileOps(options) {
87694
87827
  });
87695
87828
  assertBoundaryRead(opened, filePath);
87696
87829
  try {
87697
- return fs$1.readFileSync(opened.fd, "utf8");
87830
+ return syncFs.readFileSync(opened.fd, "utf8");
87698
87831
  } finally {
87699
- fs$1.closeSync(opened.fd);
87832
+ syncFs.closeSync(opened.fd);
87700
87833
  }
87701
87834
  },
87702
87835
  writeFile: async (filePath, content) => {
@@ -87975,7 +88108,7 @@ const LOOP_WARNING_BUCKET_SIZE = 10;
87975
88108
  const MAX_LOOP_WARNING_KEYS = 256;
87976
88109
  let beforeToolCallRuntimePromise = null;
87977
88110
  function loadBeforeToolCallRuntime() {
87978
- beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-B_LUttg1.js");
88111
+ beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-Bpk4qTgV.js");
87979
88112
  return beforeToolCallRuntimePromise;
87980
88113
  }
87981
88114
  function buildAdjustedParamsKey(params) {
@@ -90657,9 +90790,9 @@ async function readWorkspaceContextForSummary() {
90657
90790
  if (!opened.ok) return "";
90658
90791
  const sections = extractSections((() => {
90659
90792
  try {
90660
- return fs$1.readFileSync(opened.fd, "utf-8");
90793
+ return syncFs.readFileSync(opened.fd, "utf-8");
90661
90794
  } finally {
90662
- fs$1.closeSync(opened.fd);
90795
+ syncFs.closeSync(opened.fd);
90663
90796
  }
90664
90797
  })(), ["Session Startup", "Red Lines"]);
90665
90798
  if (sections.length === 0) return "";
@@ -92028,7 +92161,7 @@ async function compactEmbeddedPiSessionDirect(params) {
92028
92161
  if (!apiKeyInfo.apiKey) {
92029
92162
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
92030
92163
  } else if (model.provider === "github-copilot") {
92031
- const { resolveCopilotApiToken } = await import("./github-copilot-token-Cw3tAXM9.js").then((n) => n.n);
92164
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B5cPlwaz.js").then((n) => n.n);
92032
92165
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
92033
92166
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
92034
92167
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -93253,7 +93386,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93253
93386
  * Throws if the connection is not open.
93254
93387
  */
93255
93388
  send(event) {
93256
- if (!this.ws || this.ws.readyState !== WebSocket$1.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
93389
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN) throw new Error(`OpenAIWebSocketManager: cannot send — connection is not open (readyState=${this.ws?.readyState ?? "no socket"})`);
93257
93390
  this.ws.send(JSON.stringify(event));
93258
93391
  }
93259
93392
  /**
@@ -93270,7 +93403,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93270
93403
  * Returns true if the WebSocket is currently open and ready to send.
93271
93404
  */
93272
93405
  isConnected() {
93273
- return this.ws !== null && this.ws.readyState === WebSocket$1.OPEN;
93406
+ return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
93274
93407
  }
93275
93408
  /**
93276
93409
  * Permanently closes the WebSocket connection and disables auto-reconnect.
@@ -93280,7 +93413,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93280
93413
  this._cancelRetryTimer();
93281
93414
  if (this.ws) {
93282
93415
  this.ws.removeAllListeners();
93283
- if (this.ws.readyState === WebSocket$1.OPEN || this.ws.readyState === WebSocket$1.CONNECTING) this.ws.close(1e3, "Client closed");
93416
+ if (this.ws.readyState === WebSocket.OPEN || this.ws.readyState === WebSocket.CONNECTING) this.ws.close(1e3, "Client closed");
93284
93417
  this.ws = null;
93285
93418
  }
93286
93419
  }
@@ -93290,7 +93423,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93290
93423
  reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
93291
93424
  return;
93292
93425
  }
93293
- const socket = new WebSocket$1(this.wsUrl, { headers: {
93426
+ const socket = new WebSocket(this.wsUrl, { headers: {
93294
93427
  Authorization: `Bearer ${this.apiKey}`,
93295
93428
  "OpenAI-Beta": "responses-websocket=v1"
93296
93429
  } });
@@ -94256,11 +94389,11 @@ function appendRawStream(payload) {
94256
94389
  if (!rawStreamReady) {
94257
94390
  rawStreamReady = true;
94258
94391
  try {
94259
- fs$1.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
94392
+ syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
94260
94393
  } catch {}
94261
94394
  }
94262
94395
  try {
94263
- fs$1.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
94396
+ syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
94264
94397
  } catch {}
94265
94398
  }
94266
94399
 
@@ -97765,7 +97898,7 @@ async function runEmbeddedPiAgent(params) {
97765
97898
  await copilotTokenState.refreshInFlight;
97766
97899
  return;
97767
97900
  }
97768
- const { resolveCopilotApiToken } = await import("./github-copilot-token-Cw3tAXM9.js").then((n) => n.n);
97901
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B5cPlwaz.js").then((n) => n.n);
97769
97902
  copilotTokenState.refreshInFlight = (async () => {
97770
97903
  const githubToken = copilotTokenState.githubToken.trim();
97771
97904
  if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
@@ -97857,7 +97990,7 @@ async function runEmbeddedPiAgent(params) {
97857
97990
  return;
97858
97991
  }
97859
97992
  if (model.provider === "github-copilot") {
97860
- const { resolveCopilotApiToken } = await import("./github-copilot-token-Cw3tAXM9.js").then((n) => n.n);
97993
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B5cPlwaz.js").then((n) => n.n);
97861
97994
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
97862
97995
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
97863
97996
  if (copilotTokenState) {