squidclaw 3.0.19 → 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 (407) 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-DL8uYsUq.js → agents-DXKtU4Il.js} +4 -4
  6. package/dist/{agents.config-B4KAAVvR.js → agents.config-BM-2SLCh.js} +1 -1
  7. package/dist/{agents.config-D93fF1eJ.js → agents.config-eMSUW-iw.js} +1 -1
  8. package/dist/{plugin-sdk/api-key-rotation-DyjMI2n3.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-preflight-Bzo_zN4j.js → audio-preflight-lT9iRnYi.js} +4 -4
  11. package/dist/{audio-transcription-runner-B3u2x_ja.js → audio-transcription-runner-Cv0Q47cM.js} +12 -12
  12. package/dist/{audio-transcription-runner-Cp_lkLCv.js → audio-transcription-runner-YiR1ym3a.js} +1 -1
  13. package/dist/{audit-membership-runtime-w23FnNAN.js → audit-membership-runtime-DyLj-uhz.js} +4 -4
  14. package/dist/{auth-choice-Ba4AEm_k.js → auth-choice-CXepQc7c.js} +1 -1
  15. package/dist/{auth-choice-ziFj5bXd.js → auth-choice-D2JrMJn-.js} +1 -1
  16. package/dist/{banner-DDih2slD.js → banner-DMfuBV69.js} +1 -1
  17. package/dist/build-info.json +3 -3
  18. package/dist/bundled/boot-md/handler.js +51 -51
  19. package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
  20. package/dist/bundled/command-logger/handler.js +2 -2
  21. package/dist/bundled/session-memory/handler.js +687 -51
  22. package/dist/canvas-host/a2ui/a2ui.bundle.js +1 -17815
  23. package/dist/{channel-activity-CxJbx4sD.js → channel-activity-CPpt4XaL.js} +3 -3
  24. package/dist/{channel-options-DTDfU0R6.js → channel-options-CQ-gER0J.js} +1 -1
  25. package/dist/{channel-options-BBSsevyl.js → channel-options-SijIkAlT.js} +1 -1
  26. package/dist/{channel-web-BXl9jCKV.js → channel-web-7t1a2N13.js} +1 -1
  27. package/dist/{channel-web-SF18oYqo.js → channel-web-LLzBxZrT.js} +1 -1
  28. package/dist/{channels-cli-BiuWJpJu.js → channels-cli-D4xUEYYC.js} +6 -6
  29. package/dist/{channels-cli-BDLabpWH.js → channels-cli-DYaFNMme.js} +6 -6
  30. package/dist/{chrome-CZQnp4VH.js → chrome-CuBHInKC.js} +8 -8
  31. package/dist/{chrome-Dxm25ptH.js → chrome-OgCChbC_.js} +26 -26
  32. package/dist/{cli-CfgDCCuC.js → cli-CAID9zkL.js} +1 -1
  33. package/dist/{cli-DAZ1MKrJ.js → cli-Dlc9IFWZ.js} +1 -1
  34. package/dist/{command-registry-DkjNuW8w.js → command-registry-AHS8_9da.js} +9 -9
  35. package/dist/{commands-registry-B44COZFz.js → commands-registry-BJjv8_oR.js} +4 -4
  36. package/dist/{completion-cli-DbNma3J9.js → completion-cli-B8xjpHDs.js} +1 -1
  37. package/dist/{completion-cli-Du8H92bM.js → completion-cli-BR1r9_h4.js} +2 -2
  38. package/dist/{config-cli-CQhQ8Bcc.js → config-cli-D0A8Awoo.js} +1 -1
  39. package/dist/{config-cli-D16tlTWa.js → config-cli-D4Rxoozg.js} +1 -1
  40. package/dist/{configure-B9b3cQTC.js → configure-DOiI8_8c.js} +3 -3
  41. package/dist/{configure-B4TiK50K.js → configure-XmOqwwy9.js} +3 -3
  42. package/dist/control-ui/assets/{index-cM5P_3w7.js → index-BqxuPQOl.js} +2 -2
  43. package/dist/control-ui/assets/{index-cM5P_3w7.js.map → index-BqxuPQOl.js.map} +1 -1
  44. package/dist/control-ui/index.html +1 -1
  45. package/dist/{deliver-B4WWPQvt.js → deliver-6zfT7daI.js} +1 -1
  46. package/dist/{deliver-BcnsjbAB.js → deliver-DMTUTpTM.js} +21 -21
  47. package/dist/deliver-runtime-B80olQwJ.js +36 -0
  48. package/dist/{deliver-runtime-CeE1X9si.js → deliver-runtime-MBexxUuG.js} +3 -3
  49. package/dist/deps-send-discord.runtime-GIuvX7Xw.js +26 -0
  50. package/dist/deps-send-imessage.runtime-B3TC7G80.js +25 -0
  51. package/dist/deps-send-signal.runtime-CuVJyw7n.js +24 -0
  52. package/dist/deps-send-slack.runtime-cbfFoLZ4.js +22 -0
  53. package/dist/deps-send-telegram.runtime-CRyP-xDQ.js +27 -0
  54. package/dist/deps-send-whatsapp.runtime-4aOUBP2J.js +60 -0
  55. package/dist/{deps-send-whatsapp.runtime-B9uivfkM.js → deps-send-whatsapp.runtime-CETLGt-t.js} +3 -3
  56. package/dist/{deps-send-whatsapp.runtime-miTfQkK9.js → deps-send-whatsapp.runtime-CrxkfP31.js} +7 -7
  57. package/dist/{deps-send-whatsapp.runtime-CFnZsKW0.js → deps-send-whatsapp.runtime-__ogpmJj.js} +3 -3
  58. package/dist/{diagnostic-C2lklhkn.js → diagnostic-CnVwZNbm.js} +2 -2
  59. package/dist/{doctor-completion-ujZ_JdIz.js → doctor-completion-CZoEdMS-.js} +1 -1
  60. package/dist/{doctor-completion-CEiVFPte.js → doctor-completion-DhLEFUhN.js} +1 -1
  61. package/dist/entry.js +2 -2
  62. package/dist/{plugin-sdk/errors-B8oJXuCF.js → errors-kkRuS2Cs.js} +1 -1
  63. package/dist/extensionAPI.js +6 -6
  64. package/dist/{fetch-b8tSR7_e.js → fetch-DP-JjB6Z.js} +5 -5
  65. package/dist/{fetch-guard-D16tjNsZ.js → fetch-guard-BDy975wP.js} +2 -2
  66. package/dist/{frontmatter-CjKtFduT.js → frontmatter-Cq1TcIQ2.js} +3 -3
  67. package/dist/{fs-safe-CwHbZdFH.js → fs-safe-BoB4X3GD.js} +4 -4
  68. package/dist/{gateway-cli-NXeo-J8r.js → gateway-cli-BJHBChfI.js} +8 -8
  69. package/dist/{gateway-cli-2jaWM_Ci.js → gateway-cli-BpHskeDd.js} +8 -8
  70. package/dist/{github-copilot-token-Cw3tAXM9.js → github-copilot-token-B5cPlwaz.js} +7 -7
  71. package/dist/{health-BPZALM__.js → health-TmpUGSqu.js} +1 -1
  72. package/dist/{health-DFZKMrW2.js → health-XFKFZ7ZJ.js} +1 -1
  73. package/dist/{hooks-cli-B3rkhWcT.js → hooks-cli-CXsZK8H9.js} +2 -2
  74. package/dist/{hooks-cli-BO_gZJVD.js → hooks-cli-DsDV-Pxz.js} +2 -2
  75. package/dist/{image-DKkuLtZ4.js → image-VgwN31FZ.js} +1 -1
  76. package/dist/{image-C-8Kd2Mh.js → image-kKMG59st.js} +6 -6
  77. package/dist/{image-ops-BoN1E_WZ.js → image-ops-Dg8iraUV.js} +2 -2
  78. package/dist/image-runtime-BqIv7p_K.js +29 -0
  79. package/dist/{image-runtime-BMavqm9n.js → image-runtime-CwMuTYvd.js} +3 -3
  80. package/dist/index.js +6 -6
  81. package/dist/{ir-Dut0zXyS.js → ir-CKK03mBV.js} +8 -8
  82. package/dist/{legacy-names-B0wgIP0Q.js → legacy-names-aGJJuzM_.js} +1 -1
  83. package/dist/llm-slug-generator.js +51 -51
  84. package/dist/{logger-oGKcCLZ5.js → logger-CnTSBL7T.js} +7 -7
  85. package/dist/{login-DJ357UQV.js → login-CeKDrz6_.js} +5 -5
  86. package/dist/{login-qr-C0fDBnpM.js → login-qr-KbOpR0GQ.js} +10 -10
  87. package/dist/{manager-BPGhs30n.js → manager-DINhLnMi.js} +13 -13
  88. package/dist/manager-runtime-D6ckUNSs.js +18 -0
  89. package/dist/{model-selection-CHnojCCK.js → model-selection-DuNLFQPR.js} +43 -43
  90. package/dist/{models-Bb-GYqHr.js → models-5VXwJBU2.js} +2 -2
  91. package/dist/{models-cli-DffAz0ji.js → models-cli-Br56IHfy.js} +3 -3
  92. package/dist/{models-cli-CAIJM1Wh.js → models-cli-CrR1RN3j.js} +2 -2
  93. package/dist/{npm-resolution-D2_zGJM-.js → npm-resolution-CKtyq4FH.js} +1 -1
  94. package/dist/{npm-resolution-D5pBCkUw.js → npm-resolution-CPk7dS7F.js} +1 -1
  95. package/dist/{onboard-DcVsL9Jx.js → onboard-DUnBamC0.js} +2 -2
  96. package/dist/{onboard-channels-mNXKTvFs.js → onboard-channels-D45grihx.js} +1 -1
  97. package/dist/{onboard-channels-C-cQFUBH.js → onboard-channels-_kVo3Apf.js} +1 -1
  98. package/dist/{onboard-dhG2YBez.js → onboard-lFwpCpC3.js} +2 -2
  99. package/dist/{onboarding-B3-IwkNi.js → onboarding-CyCSQ__q.js} +3 -3
  100. package/dist/{onboarding-Cl6kW_iq.js → onboarding-EEd_g8Zg.js} +3 -3
  101. package/dist/{onboarding.finalize-CCU-ykTR.js → onboarding.finalize-CbMq7C4K.js} +5 -5
  102. package/dist/{onboarding.finalize-BZqsNG2H.js → onboarding.finalize-Cs1ukjFN.js} +6 -6
  103. package/dist/{outbound-qTioiTJg.js → outbound-C9svt6RH.js} +6 -6
  104. package/dist/{outbound-attachment-rlW7G5df.js → outbound-attachment-DwupUxYF.js} +2 -2
  105. package/dist/{path-alias-guards-Cpsiv2KL.js → path-alias-guards-DORgbZ1w.js} +1 -1
  106. package/dist/{paths-CSdAWKDO.js → paths-DA5srn0U.js} +5 -5
  107. package/dist/{paths-CXClY8zC.js → paths-DSd911Oe.js} +4 -4
  108. package/dist/{pi-embedded-B79nZERv.js → pi-embedded-BN8fghaF.js} +123 -26
  109. package/dist/{pi-embedded-C5U8Qxn6.js → pi-embedded-BiC4tIJ8.js} +266 -169
  110. package/dist/{pi-embedded-helpers-CEHpGDRs.js → pi-embedded-helpers-A9VYPVCH.js} +3 -3
  111. package/dist/{pi-embedded-helpers-DQ7IaeOi.js → pi-embedded-helpers-Di58J7Eh.js} +52 -52
  112. package/dist/{pi-model-discovery-o-WX5w2t.js → pi-model-discovery-V-InbjOM.js} +7 -7
  113. package/dist/pi-model-discovery-runtime--t6tAlar.js +11 -0
  114. package/dist/{pi-tools.before-tool-call.runtime-B_LUttg1.js → pi-tools.before-tool-call.runtime-Bpk4qTgV.js} +9 -9
  115. package/dist/{plugin-registry-CB47SSz1.js → plugin-registry-CXm125Uz.js} +1 -1
  116. package/dist/{plugin-registry-Gy_VByyf.js → plugin-registry-D3PnPE1D.js} +1 -1
  117. package/dist/plugin-sdk/{accounts-0kF5cxkn.js → accounts-C5PAuCTj.js} +2 -2
  118. package/dist/plugin-sdk/{accounts-u0-JAHzj.js → accounts-DC5cbH9r.js} +2 -2
  119. package/dist/plugin-sdk/{accounts-xZOA23tQ.js → accounts-DncG0Hx9.js} +3 -3
  120. package/dist/plugin-sdk/{active-listener-BO7eBEG_.js → active-listener-Bd3HH2km.js} +2 -2
  121. package/dist/plugin-sdk/agents/agent-tier.d.ts +22 -2
  122. package/dist/plugin-sdk/{api-key-rotation-C4C_mDsg.js → api-key-rotation-BAZ0GD26.js} +2 -2
  123. package/dist/plugin-sdk/{audio-preflight-C0q7lu6y.js → audio-preflight-tpVm-t9O.js} +26 -26
  124. package/dist/plugin-sdk/{audio-transcription-runner-Ced47O1H.js → audio-transcription-runner-DSScb434.js} +11 -11
  125. package/dist/plugin-sdk/{audit-membership-runtime-Xl20kCBe.js → audit-membership-runtime-DHQDvH4u.js} +2 -2
  126. package/dist/plugin-sdk/{channel-activity-CNffKOEQ.js → channel-activity-cYEaofTH.js} +3 -3
  127. package/dist/plugin-sdk/{channel-web-vB3Dcd8-.js → channel-web-CbeCrQ4C.js} +18 -18
  128. package/dist/plugin-sdk/{channel-web-BrhP6FQO.js → channel-web-CqiSEc52.js} +1 -1
  129. package/dist/plugin-sdk/{chrome-DJQWo149.js → chrome-DB2h0uN0.js} +6 -6
  130. package/dist/plugin-sdk/{commands-registry-_kBPE22q.js → commands-registry-DGZ1oFXJ.js} +4 -4
  131. package/dist/plugin-sdk/{common-J8vIST9Q.js → common-D5lLWoCW.js} +2 -2
  132. package/dist/plugin-sdk/compat.js +50 -50
  133. package/dist/plugin-sdk/{config-CnZ1TlEw.js → config-Bt-c7PWF.js} +7 -7
  134. package/dist/plugin-sdk/{deliver-Xh6voz9H.js → deliver-MvrkIeKJ.js} +10 -10
  135. package/dist/plugin-sdk/deliver-runtime-i50kjcNM.js +32 -0
  136. package/dist/plugin-sdk/deps-send-discord.runtime-hOYq9ov0.js +23 -0
  137. package/dist/plugin-sdk/deps-send-imessage.runtime-D5n9DXyL.js +22 -0
  138. package/dist/plugin-sdk/deps-send-signal.runtime-CwEaRyJU.js +21 -0
  139. package/dist/plugin-sdk/deps-send-slack.runtime-DOZeLIaC.js +19 -0
  140. package/dist/plugin-sdk/deps-send-telegram.runtime-BW1hSPKh.js +24 -0
  141. package/dist/plugin-sdk/{deps-send-whatsapp.runtime-Ce4Gzz-J.js → deps-send-whatsapp.runtime-DvxhnHR_.js} +3 -3
  142. package/dist/plugin-sdk/deps-send-whatsapp.runtime-JKmTtCFM.js +57 -0
  143. package/dist/plugin-sdk/{diagnostic-DKsyROPi.js → diagnostic-B6F3BtCX.js} +2 -2
  144. package/dist/plugin-sdk/{errors-CgRPdp3o.js → errors-9oVz7reJ.js} +1 -1
  145. package/dist/plugin-sdk/{fetch-guard-BBAT8G-1.js → fetch-guard-cfPCfkrw.js} +2 -2
  146. package/dist/plugin-sdk/{fs-safe-DqCO1D4C.js → fs-safe-DFbwq9CS.js} +3 -3
  147. package/dist/plugin-sdk/{image-4ay2cw7G.js → image-FK5xhY5u.js} +6 -6
  148. package/dist/plugin-sdk/{image-ops-G8KoEfY8.js → image-ops-BSYgrL7E.js} +2 -2
  149. package/dist/plugin-sdk/image-runtime-B95EPFpg.js +25 -0
  150. package/dist/plugin-sdk/index.js +2 -2
  151. package/dist/plugin-sdk/{ir-DXj1KGnL.js → ir-CWmryq5f.js} +7 -7
  152. package/dist/plugin-sdk/{local-roots-ovKHgVSP.js → local-roots-U25IdeDH.js} +4 -4
  153. package/dist/plugin-sdk/{logger-DIb2cGHp.js → logger-Bg4vIUJn.js} +2 -2
  154. package/dist/plugin-sdk/{login-Cgtm70by.js → login-8qzl2H7G.js} +4 -4
  155. package/dist/plugin-sdk/{login-qr-BrixqhMx.js → login-qr-kalCTJEw.js} +5 -5
  156. package/dist/plugin-sdk/{manager-PEQ_cPYF.js → manager-ijYHktIt.js} +8 -8
  157. package/dist/plugin-sdk/manager-runtime--JrLQE03.js +15 -0
  158. package/dist/plugin-sdk/{outbound-BK75h9CQ.js → outbound-BIVf0aPq.js} +5 -5
  159. package/dist/plugin-sdk/{outbound-attachment-BI1QngTS.js → outbound-attachment-F5tzeNUD.js} +2 -2
  160. package/dist/plugin-sdk/{path-alias-guards-TnxupPQC.js → path-alias-guards-DA0MhfkG.js} +1 -1
  161. package/dist/plugin-sdk/{paths-B7_75Pdr.js → paths-CP67O8eN.js} +1 -1
  162. package/dist/plugin-sdk/{pi-embedded-helpers-BioULNev.js → pi-embedded-helpers-CxMnPQ37.js} +16 -16
  163. package/dist/plugin-sdk/{pi-model-discovery-BMmAbnil.js → pi-model-discovery-8OL77kCh.js} +1 -1
  164. package/dist/plugin-sdk/pi-model-discovery-runtime-DGRFpUfd.js +8 -0
  165. package/dist/plugin-sdk/{pi-tools.before-tool-call.runtime-rdRqZ9lk.js → pi-tools.before-tool-call.runtime-B7FW36KX.js} +4 -4
  166. package/dist/plugin-sdk/{plugins-BqKpJkqt.js → plugins-D3mrhffi.js} +4 -4
  167. package/dist/plugin-sdk/{proxy-env-C4s12rr8.js → proxy-env-CUUXO6rv.js} +1 -1
  168. package/dist/plugin-sdk/{proxy-fetch-ZPEvp58f.js → proxy-fetch-Cf3IUSDw.js} +1 -1
  169. package/dist/plugin-sdk/{pw-ai-Cb0ZDSq4.js → pw-ai-dPmKdw_w.js} +9 -9
  170. package/dist/plugin-sdk/{qmd-manager-Bei6TaFq.js → qmd-manager-Ov9ElEfG.js} +7 -7
  171. package/dist/plugin-sdk/{query-expansion-POz2za8a.js → query-expansion-CzjwW461.js} +4 -4
  172. package/dist/plugin-sdk/{redact-9WsNyb7S.js → redact-DfACyt0X.js} +1 -1
  173. package/dist/plugin-sdk/{reply-DxvpiQBp.js → reply-BczXGzC_.js} +137 -40
  174. package/dist/plugin-sdk/{reply-sFKB3ofA.js → reply-Dfjh1YtV.js} +206 -109
  175. package/dist/plugin-sdk/{resolve-outbound-target-DL1adXpk.js → resolve-outbound-target-BeIB_jm0.js} +2 -2
  176. package/dist/plugin-sdk/{run-with-concurrency-DmTrN5JG.js → run-with-concurrency-kVooFCVo.js} +1 -1
  177. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-B6EcC22F.js +10 -0
  178. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-DH8J0Ie7.js +19 -0
  179. package/dist/plugin-sdk/{send-BCVXt-3e.js → send-CgkNzAhS.js} +8 -8
  180. package/dist/plugin-sdk/{send-CAG0Or0G.js → send-CuENGOhq.js} +7 -7
  181. package/dist/plugin-sdk/{send-X6QuS7x0.js → send-D6Uh2D1D.js} +5 -5
  182. package/dist/plugin-sdk/{send-BNePC8CO.js → send-DV5kR0Hg.js} +6 -6
  183. package/dist/plugin-sdk/{send-DhGDAZnT.js → send-DtA6ngBJ.js} +13 -13
  184. package/dist/plugin-sdk/{session-CAqYQVhe.js → session-CnlZn-bR.js} +3 -3
  185. package/dist/plugin-sdk/{skill-commands-Bk-IFyNw.js → skill-commands-Ckfii7h8.js} +4 -4
  186. package/dist/plugin-sdk/{skills-C5bT9-q4.js → skills-v0WQqKTa.js} +6 -6
  187. package/dist/plugin-sdk/slash-commands.runtime-BYoxsxkX.js +13 -0
  188. package/dist/plugin-sdk/{slash-dispatch.runtime-Dyb_EkUt.js → slash-dispatch.runtime-DOo1IzuY.js} +1 -1
  189. package/dist/plugin-sdk/slash-dispatch.runtime-JfFr7bNy.js +52 -0
  190. package/dist/plugin-sdk/slash-skill-commands.runtime-D0399tia.js +16 -0
  191. package/dist/plugin-sdk/{store-D3lgWnS2.js → store-C_UrNuM3.js} +2 -2
  192. package/dist/plugin-sdk/{subagent-registry-runtime-hdnabonI.js → subagent-registry-runtime-DLvup9ph.js} +1 -1
  193. package/dist/plugin-sdk/subagent-registry-runtime-DVl5xKOW.js +52 -0
  194. package/dist/plugin-sdk/{tables-Dmlu4_q_.js → tables-CJP05iMa.js} +1 -1
  195. package/dist/plugin-sdk/{thinking-DRNOh5Xx.js → thinking-BhP3vn1l.js} +7 -7
  196. package/dist/plugin-sdk/{tokens-CTIYTLWu.js → tokens-DAL_5WHL.js} +1 -1
  197. package/dist/plugin-sdk/{tool-images-GSlvf6RP.js → tool-images-ZE5G5UM0.js} +2 -2
  198. package/dist/plugin-sdk/{web-D9LAdsuU.js → web-C2Sj2WW0.js} +2 -2
  199. package/dist/plugin-sdk/web-CNY_ky8h.js +56 -0
  200. package/dist/plugin-sdk/{whatsapp-actions-BCJYmWCB.js → whatsapp-actions-DJmx6ihj.js} +17 -17
  201. package/dist/plugin-sdk/whatsapp.js +50 -50
  202. package/dist/{plugins-AqsVZZk3.js → plugins-DvejjZnJ.js} +11 -11
  203. package/dist/{plugins-cli-BYnoJwF1.js → plugins-cli-BA_2daJe.js} +2 -2
  204. package/dist/{plugins-cli-gtgkmDcv.js → plugins-cli-C0WKWrZo.js} +2 -2
  205. package/dist/{program-BGlgDpHI.js → program-D_xdLzmM.js} +7 -7
  206. package/dist/{program-context-M4FTWqqg.js → program-context-DfmCIQ91.js} +17 -17
  207. package/dist/{prompt-select-styled-AL5Tm3yO.js → prompt-select-styled-ApPSadr5.js} +4 -4
  208. package/dist/{prompt-select-styled-BVC2byQV.js → prompt-select-styled-BsheNEnh.js} +4 -4
  209. package/dist/{provider-auth-helpers-DDgrFku5.js → provider-auth-helpers-B5kD4Lt6.js} +1 -1
  210. package/dist/{provider-auth-helpers-Q7aIhDgv.js → provider-auth-helpers-DpOFkV28.js} +1 -1
  211. package/dist/{proxy-env-DXXfs2WL.js → proxy-env-D-fike7s.js} +1 -1
  212. package/dist/{plugin-sdk/proxy-fetch-Dt5BedH8.js → proxy-fetch-lH6RsRTE.js} +1 -1
  213. package/dist/{push-apns-Ga8xvhkh.js → push-apns-BbenjEX4.js} +1 -1
  214. package/dist/{push-apns-FyGbUyh2.js → push-apns-Ci2sdIKf.js} +1 -1
  215. package/dist/{pw-ai-GOBxzChI.js → pw-ai-B8ymIYub.js} +14 -14
  216. package/dist/{pw-ai-Du22SYoO.js → pw-ai-CM87tQwG.js} +1 -1
  217. package/dist/{qmd-manager-CO-shcLU.js → qmd-manager-BN0siR2Z.js} +10 -10
  218. package/dist/{query-expansion-DlQOkf-g.js → query-expansion-Dzxt6kXo.js} +6 -6
  219. package/dist/{redact-NmPEVjIo.js → redact-DvzicBMu.js} +1 -1
  220. package/dist/{register.agent-koAXw1ay.js → register.agent-CY6R-7fn.js} +6 -6
  221. package/dist/{register.agent-zP8a-sNB.js → register.agent-Dk_5V5oA.js} +7 -7
  222. package/dist/{register.configure-CUuP5J8W.js → register.configure-C8OFfGln.js} +7 -7
  223. package/dist/{register.configure-CYrmyjlf.js → register.configure-DT1RLeTR.js} +7 -7
  224. package/dist/{register.maintenance-BZuEljPU.js → register.maintenance-CluQOq8b.js} +8 -8
  225. package/dist/{register.maintenance-ByEQ2CVH.js → register.maintenance-YHXmOQzf.js} +7 -7
  226. package/dist/{register.message-BkSXhv9I.js → register.message-BCTXT5yK.js} +2 -2
  227. package/dist/{register.message-CgHfmDHm.js → register.message-BuoFjRqA.js} +2 -2
  228. package/dist/{register.onboard-HcQwPAEK.js → register.onboard-BJaRMtxU.js} +2 -2
  229. package/dist/{register.onboard-4ke40MNP.js → register.onboard-C64oXnvq.js} +2 -2
  230. package/dist/{register.setup-B41xZb1r.js → register.setup-Dl3nk2Ui.js} +2 -2
  231. package/dist/{register.setup-xAb7Cvzy.js → register.setup-Drc55K_w.js} +2 -2
  232. package/dist/{register.status-health-sessions-CcOVL0x8.js → register.status-health-sessions-BHtbPeCO.js} +3 -3
  233. package/dist/{register.status-health-sessions-BbHAAKwv.js → register.status-health-sessions-xgC_gtEM.js} +3 -3
  234. package/dist/{register.subclis-_uSASnfC.js → register.subclis-CDMFyaKR.js} +9 -9
  235. package/dist/{reply-BFTOdZcK.js → reply-DwjHsBuj.js} +137 -40
  236. package/dist/{run-main-C1eZrW-5.js → run-main-BcA22Ipv.js} +14 -14
  237. package/dist/{run-with-concurrency-FczpX8ng.js → run-with-concurrency-BFR3ReeF.js} +4 -4
  238. package/dist/runtime-whatsapp-login.runtime-DxV9iv6l.js +13 -0
  239. package/dist/runtime-whatsapp-outbound.runtime-DQqIlwhS.js +22 -0
  240. package/dist/{send-Bx9CqcZr.js → send-4nRsZJXH.js} +7 -7
  241. package/dist/{send-D5D0ZGht.js → send-BGlcHjUD.js} +26 -26
  242. package/dist/{send-DtHQ7_6Z.js → send-BTUU1jWM.js} +8 -8
  243. package/dist/{send-B9H0BkfO.js → send-DdBbRpTP.js} +6 -6
  244. package/dist/{send-B5QEmMJ4.js → send-dTQd-IyJ.js} +5 -5
  245. package/dist/{server-node-events-pYrJmi9w.js → server-node-events-Q0cT2ifj.js} +2 -2
  246. package/dist/{server-node-events-DbS1jJ5j.js → server-node-events-YN5eJeHa.js} +2 -2
  247. package/dist/{session-DLTCuoUD.js → session-CnCwDJke.js} +8 -8
  248. package/dist/{skill-commands-BwTLQRR8.js → skill-commands-Cz45_nme.js} +9 -9
  249. package/dist/{skills-B9N2bqKU.js → skills-CdCS1HeL.js} +22 -22
  250. package/dist/slash-commands.runtime-CZz6v6b3.js +16 -0
  251. package/dist/{slash-dispatch.runtime-PX9_08Hm.js → slash-dispatch.runtime-BOMEVFk0.js} +1 -1
  252. package/dist/{slash-dispatch.runtime-DmFVOi3w.js → slash-dispatch.runtime-DB1QsBRc.js} +1 -1
  253. package/dist/slash-dispatch.runtime-SO7HOe8q.js +56 -0
  254. package/dist/{slash-dispatch.runtime-BGXbtMX6.js → slash-dispatch.runtime-sXaUYn4v.js} +6 -6
  255. package/dist/slash-skill-commands.runtime-Bawt7j0r.js +20 -0
  256. package/dist/{status-DtiapFqq.js → status-Bh5x6DsW.js} +2 -2
  257. package/dist/{status-B4eVRJcO.js → status-cU9cJReo.js} +2 -2
  258. package/dist/{store-CvQ41zCV.js → store-D9z0dn7D.js} +2 -2
  259. package/dist/{subagent-registry-Ctrhw4X-.js → subagent-registry-CIgFD2oi.js} +103 -6
  260. package/dist/{subagent-registry-runtime-CezPaX9P.js → subagent-registry-runtime-232sNNT6.js} +6 -6
  261. package/dist/subagent-registry-runtime-D2rUxU5J.js +56 -0
  262. package/dist/{subagent-registry-runtime-Cy7dsGqF.js → subagent-registry-runtime-D7ubAnDZ.js} +1 -1
  263. package/dist/{subagent-registry-runtime-CTjx4TK5.js → subagent-registry-runtime-DGTjU9Lb.js} +1 -1
  264. package/dist/{subsystem-BaLYRf7D.js → subsystem-6v7sWnAD.js} +14 -14
  265. package/dist/{tables-BRYYxYs7.js → tables-BTFiZyRU.js} +1 -1
  266. package/dist/{target-errors-D0ZJUbbf.js → target-errors-DgNRx3Nr.js} +2 -2
  267. package/dist/{thinking-B-A99X3F.js → thinking-B75CXkTT.js} +7 -7
  268. package/dist/{tokens-D2XhLqIz.js → tokens-DfbMVF9y.js} +1 -1
  269. package/dist/{tool-images-Zn6jVmkX.js → tool-images-Dp5OiXeA.js} +2 -2
  270. package/dist/{update-cli-_FsTRdQZ.js → update-cli-CktBOXZF.js} +7 -7
  271. package/dist/{update-cli-DLOWRdjv.js → update-cli-DM_dUip_.js} +8 -8
  272. package/dist/{update-runner-BY3l7ytB.js → update-runner-BBJZmfZ4.js} +1 -1
  273. package/dist/{update-runner-BKWHnVYI.js → update-runner-BYGPkHXG.js} +1 -1
  274. package/dist/{web-BdZ3mX3p.js → web-CZhZC1EA.js} +2 -2
  275. package/dist/{web-B46aOGK0.js → web-Chw1dtKA.js} +6 -6
  276. package/dist/{web-BNfDYvlW.js → web-DWRZAXj9.js} +2 -2
  277. package/dist/{web-1D0d1RHD.js → web-QsxgXbNK.js} +55 -55
  278. package/dist/{whatsapp-actions-Cuy0qeQK.js → whatsapp-actions-CzqsuSGx.js} +21 -21
  279. package/dist/{workspace-TqfVSQuO.js → workspace-kVMIaBrV.js} +20 -20
  280. package/extensions/acpx/node_modules/.bin/acpx +2 -2
  281. package/extensions/diagnostics-otel/node_modules/.bin/acorn +2 -2
  282. package/extensions/diffs/node_modules/.bin/playwright-core +2 -2
  283. package/extensions/googlechat/node_modules/.bin/squidclaw +2 -2
  284. package/extensions/matrix/node_modules/.bin/markdown-it +2 -2
  285. package/extensions/memory-core/node_modules/.bin/squidclaw +2 -2
  286. package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +2 -2
  287. package/extensions/memory-lancedb/node_modules/.bin/openai +2 -2
  288. package/extensions/nostr/node_modules/.bin/tsc +2 -2
  289. package/extensions/nostr/node_modules/.bin/tsserver +2 -2
  290. package/extensions/tlon/node_modules/.bin/tlon +2 -2
  291. package/package.json +1 -1
  292. package/dist/api-key-rotation-TRwuCWbu.js +0 -181
  293. package/dist/canvas-host/a2ui/.bundle.hash +0 -1
  294. package/dist/deliver-runtime-_mBfV_4S.js +0 -36
  295. package/dist/deps-send-discord.runtime-CUTAK2hy.js +0 -26
  296. package/dist/deps-send-imessage.runtime-CQOiEIuA.js +0 -25
  297. package/dist/deps-send-signal.runtime-wN7MkzLw.js +0 -24
  298. package/dist/deps-send-slack.runtime-HEEwW4uU.js +0 -22
  299. package/dist/deps-send-telegram.runtime-DHlcnjQO.js +0 -27
  300. package/dist/deps-send-whatsapp.runtime-Cw7U9orE.js +0 -60
  301. package/dist/errors-DfgAh2Ml.js +0 -54
  302. package/dist/export-html/vendor/highlight.min.js +0 -1213
  303. package/dist/export-html/vendor/marked.min.js +0 -6
  304. package/dist/image-runtime-D11wBIC8.js +0 -29
  305. package/dist/manager-runtime-BB9lcoFR.js +0 -18
  306. package/dist/pi-model-discovery-runtime-DBkQoIJw.js +0 -11
  307. package/dist/plugin-sdk/accounts-CUEuUR3C.js +0 -46
  308. package/dist/plugin-sdk/accounts-D0W2pELU.js +0 -288
  309. package/dist/plugin-sdk/accounts-ucj0odJq.js +0 -35
  310. package/dist/plugin-sdk/active-listener-C5xPUSTb.js +0 -50
  311. package/dist/plugin-sdk/audio-preflight-Cqdo0JKm.js +0 -69
  312. package/dist/plugin-sdk/audio-transcription-runner-DnEooIyE.js +0 -2176
  313. package/dist/plugin-sdk/audit-membership-runtime-B9b-zRwg.js +0 -58
  314. package/dist/plugin-sdk/channel-activity-BMWLw4o2.js +0 -94
  315. package/dist/plugin-sdk/channel-web-D9WdAFlv.js +0 -2256
  316. package/dist/plugin-sdk/chrome-CV-q0Lmc.js +0 -2415
  317. package/dist/plugin-sdk/commands-registry-e7YoqrbP.js +0 -1125
  318. package/dist/plugin-sdk/config-B2B64aX0.js +0 -17911
  319. package/dist/plugin-sdk/deliver-BkyBtcLR.js +0 -1694
  320. package/dist/plugin-sdk/deliver-runtime-5UVcSskg.js +0 -32
  321. package/dist/plugin-sdk/deliver-runtime-O4lwAWMw.js +0 -32
  322. package/dist/plugin-sdk/deps-send-discord.runtime-BAeeBldY.js +0 -23
  323. package/dist/plugin-sdk/deps-send-discord.runtime-DTspXSCt.js +0 -23
  324. package/dist/plugin-sdk/deps-send-imessage.runtime-EL-CfikZ.js +0 -22
  325. package/dist/plugin-sdk/deps-send-imessage.runtime-qThAwDEe.js +0 -22
  326. package/dist/plugin-sdk/deps-send-signal.runtime-BeemHeUu.js +0 -21
  327. package/dist/plugin-sdk/deps-send-signal.runtime-DnjnVzZF.js +0 -21
  328. package/dist/plugin-sdk/deps-send-slack.runtime-CbKevLnv.js +0 -19
  329. package/dist/plugin-sdk/deps-send-slack.runtime-DTttkC0N.js +0 -19
  330. package/dist/plugin-sdk/deps-send-telegram.runtime-C6y29O9E.js +0 -24
  331. package/dist/plugin-sdk/deps-send-telegram.runtime-Dsf9Cnka.js +0 -24
  332. package/dist/plugin-sdk/deps-send-whatsapp.runtime-CCS71r77.js +0 -57
  333. package/dist/plugin-sdk/deps-send-whatsapp.runtime-CuxKhIE0.js +0 -57
  334. package/dist/plugin-sdk/diagnostic-DPRVoKTk.js +0 -319
  335. package/dist/plugin-sdk/fetch-guard-F0Fnqisy.js +0 -156
  336. package/dist/plugin-sdk/fs-safe-Dqmpk-Fr.js +0 -352
  337. package/dist/plugin-sdk/image-cBW8L8pp.js +0 -2310
  338. package/dist/plugin-sdk/image-ops-BP8ix1GC.js +0 -584
  339. package/dist/plugin-sdk/image-runtime-9xkgSlNz.js +0 -25
  340. package/dist/plugin-sdk/image-runtime-CpfepTDc.js +0 -25
  341. package/dist/plugin-sdk/ir-DWEc6zOp.js +0 -1296
  342. package/dist/plugin-sdk/local-roots-BIPT8uAO.js +0 -186
  343. package/dist/plugin-sdk/logger-DDdrdbDu.js +0 -1163
  344. package/dist/plugin-sdk/login-BMTiGutN.js +0 -57
  345. package/dist/plugin-sdk/login-qr-BFxqYUkc.js +0 -320
  346. package/dist/plugin-sdk/manager-BD-aYaZ8.js +0 -3917
  347. package/dist/plugin-sdk/manager-runtime-BmgTeb5G.js +0 -15
  348. package/dist/plugin-sdk/manager-runtime-C5bRwUlz.js +0 -15
  349. package/dist/plugin-sdk/outbound-Bm07xvO6.js +0 -212
  350. package/dist/plugin-sdk/outbound-attachment-DLsaxDsc.js +0 -19
  351. package/dist/plugin-sdk/path-alias-guards-gBhrAn14.js +0 -43
  352. package/dist/plugin-sdk/paths-C6W4VHoa.js +0 -166
  353. package/dist/plugin-sdk/pi-embedded-helpers-BExwPvTh.js +0 -9627
  354. package/dist/plugin-sdk/pi-model-discovery-DdctvBeX.js +0 -134
  355. package/dist/plugin-sdk/pi-model-discovery-runtime-COnuGwZt.js +0 -8
  356. package/dist/plugin-sdk/pi-model-discovery-runtime-DrtpLJjk.js +0 -8
  357. package/dist/plugin-sdk/pi-tools.before-tool-call.runtime-rgTz3FBl.js +0 -354
  358. package/dist/plugin-sdk/plugins-BN64HHZA.js +0 -864
  359. package/dist/plugin-sdk/pw-ai-DBm3RdBK.js +0 -1938
  360. package/dist/plugin-sdk/qmd-manager-6bozlfFg.js +0 -1448
  361. package/dist/plugin-sdk/query-expansion-eeVz_aEm.js +0 -1011
  362. package/dist/plugin-sdk/redact-BoNEjbpF.js +0 -319
  363. package/dist/plugin-sdk/reply-CqXMy3Yd.js +0 -98731
  364. package/dist/plugin-sdk/resolve-outbound-target-DXfjGlZQ.js +0 -40
  365. package/dist/plugin-sdk/run-with-concurrency-5DMu9szx.js +0 -1994
  366. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-99sCh8RG.js +0 -10
  367. package/dist/plugin-sdk/runtime-whatsapp-login.runtime-D2hkJBa-.js +0 -10
  368. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-C06I4adi.js +0 -19
  369. package/dist/plugin-sdk/runtime-whatsapp-outbound.runtime-dTkDaXHl.js +0 -19
  370. package/dist/plugin-sdk/send-B9xnwtQ-.js +0 -540
  371. package/dist/plugin-sdk/send-BxySs-Cu.js +0 -2587
  372. package/dist/plugin-sdk/send-D9THKp_J.js +0 -414
  373. package/dist/plugin-sdk/send-DCuaaP2w.js +0 -503
  374. package/dist/plugin-sdk/send-Dm_-_xje.js +0 -3135
  375. package/dist/plugin-sdk/session-DDzIZHxt.js +0 -169
  376. package/dist/plugin-sdk/skill-commands-DRvqtuFC.js +0 -342
  377. package/dist/plugin-sdk/skills-BWwlfbVj.js +0 -1428
  378. package/dist/plugin-sdk/slash-commands.runtime-BzYsaTST.js +0 -13
  379. package/dist/plugin-sdk/slash-commands.runtime-EAZKpRKq.js +0 -13
  380. package/dist/plugin-sdk/slash-dispatch.runtime-BC3IAF-I.js +0 -52
  381. package/dist/plugin-sdk/slash-dispatch.runtime-C7u7mlny.js +0 -52
  382. package/dist/plugin-sdk/slash-skill-commands.runtime-DGd_JSWX.js +0 -16
  383. package/dist/plugin-sdk/slash-skill-commands.runtime-sg98L8BK.js +0 -16
  384. package/dist/plugin-sdk/ssrf-DOBwjFow.js +0 -202
  385. package/dist/plugin-sdk/store-BKDR_-Qk.js +0 -81
  386. package/dist/plugin-sdk/subagent-registry-runtime-B6l6PxqP.js +0 -52
  387. package/dist/plugin-sdk/subagent-registry-runtime-Ceu7AzWi.js +0 -52
  388. package/dist/plugin-sdk/tables-GIj79us5.js +0 -55
  389. package/dist/plugin-sdk/target-errors-jlLHihbX.js +0 -195
  390. package/dist/plugin-sdk/thinking-BgdUnMZ2.js +0 -1206
  391. package/dist/plugin-sdk/tokens-CLE20fRI.js +0 -52
  392. package/dist/plugin-sdk/tool-images-BY1gsRyE.js +0 -274
  393. package/dist/plugin-sdk/web-BK2-uaOo.js +0 -56
  394. package/dist/plugin-sdk/web-Bnn82S4u.js +0 -56
  395. package/dist/plugin-sdk/whatsapp-actions-DQpK_5Ds.js +0 -80
  396. package/dist/proxy-fetch-C2v-Utgg.js +0 -38
  397. package/dist/runtime-whatsapp-login.runtime-DumUjKRz.js +0 -13
  398. package/dist/runtime-whatsapp-outbound.runtime-Cgu2MfqR.js +0 -22
  399. package/dist/slash-commands.runtime-CjBXruwG.js +0 -16
  400. package/dist/slash-dispatch.runtime-DqZVfX4H.js +0 -56
  401. package/dist/slash-skill-commands.runtime-DYK20Lxf.js +0 -20
  402. package/dist/subagent-registry-runtime-BIKGAzgI.js +0 -56
  403. package/docs/reference/templates/IDENTITY.md +0 -29
  404. package/docs/reference/templates/USER.md +0 -23
  405. package/docs/zh-CN/reference/templates/IDENTITY.md +0 -36
  406. package/docs/zh-CN/reference/templates/USER.md +0 -30
  407. 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-BIKGAzgI.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({
@@ -22379,9 +22379,69 @@ function isPaidProvider(modelRef) {
22379
22379
  };
22380
22380
  }
22381
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
+ /**
22382
22441
  * Resolve the current agent tier.
22383
22442
  *
22384
- * - "super": Paid provider configured and key present.
22443
+ * - "super": Paid provider configured and last known working.
22444
+ * - "degraded": Paid provider configured but last attempt failed (no success since).
22385
22445
  * - "base": Local/free model only.
22386
22446
  */
22387
22447
  function resolveAgentTier(params) {
@@ -22390,11 +22450,22 @@ function resolveAgentTier(params) {
22390
22450
  const { isPaid, provider } = isPaidProvider(primary);
22391
22451
  if (!isPaid) return "base";
22392
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";
22393
22463
  return "super";
22394
22464
  }
22395
22465
  function formatAgentTierLabel(tier) {
22396
22466
  switch (tier) {
22397
22467
  case "super": return "🟢 Super Agent";
22468
+ case "degraded": return "🟠 Basic Agent (degraded)";
22398
22469
  case "base": return "🟡 Basic Agent";
22399
22470
  }
22400
22471
  }
@@ -22489,7 +22560,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22489
22560
  function hasGitMarker(repoRoot) {
22490
22561
  const gitPath = path.join(repoRoot, ".git");
22491
22562
  try {
22492
- const stat = fs$1.statSync(gitPath);
22563
+ const stat = syncFs.statSync(gitPath);
22493
22564
  return stat.isDirectory() || stat.isFile();
22494
22565
  } catch {
22495
22566
  return false;
@@ -22501,10 +22572,10 @@ function findGitRoot(startDir, opts = {}) {
22501
22572
  function resolveGitDirFromMarker(repoRoot) {
22502
22573
  const gitPath = path.join(repoRoot, ".git");
22503
22574
  try {
22504
- const stat = fs$1.statSync(gitPath);
22575
+ const stat = syncFs.statSync(gitPath);
22505
22576
  if (stat.isDirectory()) return gitPath;
22506
22577
  if (!stat.isFile()) return null;
22507
- const match = fs$1.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22578
+ const match = syncFs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
22508
22579
  if (!match?.[1]) return null;
22509
22580
  return path.resolve(repoRoot, match[1].trim());
22510
22581
  } catch {
@@ -22571,7 +22642,7 @@ const resolveCommitHash = (options = {}) => {
22571
22642
  cachedCommit = null;
22572
22643
  return cachedCommit;
22573
22644
  }
22574
- const head = fs$1.readFileSync(headPath, "utf-8").trim();
22645
+ const head = syncFs.readFileSync(headPath, "utf-8").trim();
22575
22646
  if (!head) {
22576
22647
  cachedCommit = null;
22577
22648
  return cachedCommit;
@@ -22579,7 +22650,7 @@ const resolveCommitHash = (options = {}) => {
22579
22650
  if (head.startsWith("ref:")) {
22580
22651
  const ref = head.replace(/^ref:\s*/i, "").trim();
22581
22652
  const refPath = path.resolve(path.dirname(headPath), ref);
22582
- cachedCommit = formatCommit(fs$1.readFileSync(refPath, "utf-8").trim());
22653
+ cachedCommit = formatCommit(syncFs.readFileSync(refPath, "utf-8").trim());
22583
22654
  return cachedCommit;
22584
22655
  }
22585
22656
  cachedCommit = formatCommit(head);
@@ -22839,17 +22910,17 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
22839
22910
  } catch {
22840
22911
  return;
22841
22912
  }
22842
- if (!fs$1.existsSync(logPath)) return;
22913
+ if (!syncFs.existsSync(logPath)) return;
22843
22914
  try {
22844
22915
  const TAIL_BYTES = 8192;
22845
- const stat = fs$1.statSync(logPath);
22916
+ const stat = syncFs.statSync(logPath);
22846
22917
  const offset = Math.max(0, stat.size - TAIL_BYTES);
22847
22918
  const buf = Buffer.alloc(Math.min(TAIL_BYTES, stat.size));
22848
- const fd = fs$1.openSync(logPath, "r");
22919
+ const fd = syncFs.openSync(logPath, "r");
22849
22920
  try {
22850
- fs$1.readSync(fd, buf, 0, buf.length, offset);
22921
+ syncFs.readSync(fd, buf, 0, buf.length, offset);
22851
22922
  } finally {
22852
- fs$1.closeSync(fd);
22923
+ syncFs.closeSync(fd);
22853
22924
  }
22854
22925
  const tail = buf.toString("utf-8");
22855
22926
  const lines = (offset > 0 ? tail.slice(tail.indexOf("\n") + 1) : tail).split(/\n+/);
@@ -23031,6 +23102,22 @@ function buildStatusMessage(args) {
23031
23102
  activeModelRef: activeModelLabel,
23032
23103
  state: entry
23033
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
+ }
23034
23121
  const effectiveCostAuthMode = fallbackState.active ? activeAuthMode : selectedAuthMode ?? activeAuthMode;
23035
23122
  const showCost = effectiveCostAuthMode === "api-key" || effectiveCostAuthMode === "mixed";
23036
23123
  const costConfig = showCost ? resolveModelCostConfig({
@@ -23087,7 +23174,11 @@ function buildStatusMessage(args) {
23087
23174
  const voiceLine = formatVoiceModeLine(args.config, args.sessionEntry);
23088
23175
  return [
23089
23176
  versionLine,
23090
- args.config ? formatAgentTierLabel(resolveAgentTier({ cfg: args.config })) : null,
23177
+ args.config ? formatAgentTierLabel((() => {
23178
+ const t = resolveAgentTier({ cfg: args.config });
23179
+ if (t === "super" && fallbackState.active) return "degraded";
23180
+ return t;
23181
+ })()) : null,
23091
23182
  args.timeLine,
23092
23183
  modelLine,
23093
23184
  fallbackLine,
@@ -24359,7 +24450,7 @@ function resolveRepoRoot(params) {
24359
24450
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
24360
24451
  if (configured) try {
24361
24452
  const resolved = path.resolve(configured);
24362
- if (fs$1.statSync(resolved).isDirectory()) return resolved;
24453
+ if (syncFs.statSync(resolved).isDirectory()) return resolved;
24363
24454
  } catch {}
24364
24455
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
24365
24456
  const seen = /* @__PURE__ */ new Set();
@@ -25145,7 +25236,7 @@ async function buildContextReply(params) {
25145
25236
  //#region src/auto-reply/reply/commands-export-session.ts
25146
25237
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
25147
25238
  function loadTemplate(fileName) {
25148
- return fs$1.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
25239
+ return syncFs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
25149
25240
  }
25150
25241
  function generateHtml(sessionData) {
25151
25242
  const template = loadTemplate("template.html");
@@ -25219,7 +25310,7 @@ async function buildExportSessionReply(params) {
25219
25310
  } catch (err) {
25220
25311
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
25221
25312
  }
25222
- if (!fs$1.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
25313
+ if (!syncFs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
25223
25314
  const sessionManager = SessionManager.open(sessionFile);
25224
25315
  const entries = sessionManager.getEntries();
25225
25316
  const header = sessionManager.getHeader();
@@ -25240,8 +25331,8 @@ async function buildExportSessionReply(params) {
25240
25331
  const defaultFileName = `squidclaw-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
25241
25332
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
25242
25333
  const outputDir = path.dirname(outputPath);
25243
- if (!fs$1.existsSync(outputDir)) fs$1.mkdirSync(outputDir, { recursive: true });
25244
- fs$1.writeFileSync(outputPath, html, "utf-8");
25334
+ if (!syncFs.existsSync(outputDir)) syncFs.mkdirSync(outputDir, { recursive: true });
25335
+ syncFs.writeFileSync(outputPath, html, "utf-8");
25245
25336
  const relativePath = path.relative(params.workspaceDir, outputPath);
25246
25337
  return { text: [
25247
25338
  "✅ Session exported!",
@@ -25388,8 +25479,8 @@ function resolveZaiApiKey() {
25388
25479
  }
25389
25480
  try {
25390
25481
  const authPath = path.join(resolveRequiredHomeDir(process.env, os.homedir), ".pi", "agent", "auth.json");
25391
- if (!fs$1.existsSync(authPath)) return;
25392
- 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"));
25393
25484
  return data["z-ai"]?.access || data.zai?.access;
25394
25485
  } catch {
25395
25486
  return;
@@ -27208,7 +27299,7 @@ function shouldPersistAnyBindingState() {
27208
27299
  }
27209
27300
  function shouldPersistBindingMutations() {
27210
27301
  if (shouldPersistAnyBindingState()) return true;
27211
- return fs$1.existsSync(resolveThreadBindingsPath());
27302
+ return syncFs.existsSync(resolveThreadBindingsPath());
27212
27303
  }
27213
27304
  function saveBindingsToDisk(params = {}) {
27214
27305
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -28676,7 +28767,7 @@ const applyCostTotal = (totals, costTotal) => {
28676
28767
  totals.totalCost += costTotal;
28677
28768
  };
28678
28769
  async function* readJsonlRecords(filePath) {
28679
- const fileStream = fs$1.createReadStream(filePath, { encoding: "utf-8" });
28770
+ const fileStream = syncFs.createReadStream(filePath, { encoding: "utf-8" });
28680
28771
  const rl = readline.createInterface({
28681
28772
  input: fileStream,
28682
28773
  crlfDelay: Infinity
@@ -28748,10 +28839,10 @@ async function loadCostUsageSummary(params) {
28748
28839
  const dailyMap = /* @__PURE__ */ new Map();
28749
28840
  const totals = emptyTotals();
28750
28841
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
28751
- const entries = await fs$1.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28842
+ const entries = await syncFs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
28752
28843
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
28753
28844
  const filePath = path.join(sessionsDir, entry.name);
28754
- const stats = await fs$1.promises.stat(filePath).catch(() => null);
28845
+ const stats = await syncFs.promises.stat(filePath).catch(() => null);
28755
28846
  if (!stats) return null;
28756
28847
  if (stats.mtimeMs < sinceTime) return null;
28757
28848
  return filePath;
@@ -28784,7 +28875,7 @@ async function loadCostUsageSummary(params) {
28784
28875
  }
28785
28876
  async function loadSessionCostSummary(params) {
28786
28877
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
28787
- if (!sessionFile || !fs$1.existsSync(sessionFile)) return null;
28878
+ if (!sessionFile || !syncFs.existsSync(sessionFile)) return null;
28788
28879
  const totals = emptyTotals();
28789
28880
  let firstActivity;
28790
28881
  let lastActivity;
@@ -30825,6 +30916,7 @@ function applyModelOverrideToSessionEntry(params) {
30825
30916
  }
30826
30917
  if (updated) {
30827
30918
  delete entry.fallbackNoticeSelectedModel;
30919
+ clearFallbackFlag();
30828
30920
  delete entry.fallbackNoticeActiveModel;
30829
30921
  delete entry.fallbackNoticeReason;
30830
30922
  entry.updatedAt = Date.now();
@@ -31307,7 +31399,7 @@ async function createModelSelectionState(params) {
31307
31399
  }
31308
31400
  }
31309
31401
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
31310
- 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);
31311
31403
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
31312
31404
  const providerKey = normalizeProviderId(provider);
31313
31405
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -34968,7 +35060,7 @@ function asBoolean(value) {
34968
35060
  }
34969
35061
  function resolveTempPathParts(opts) {
34970
35062
  const tmpDir = opts.tmpDir ?? resolvePreferredSquidClawTmpDir();
34971
- if (!opts.tmpDir) fs$1.mkdirSync(tmpDir, {
35063
+ if (!opts.tmpDir) syncFs.mkdirSync(tmpDir, {
34972
35064
  recursive: true,
34973
35065
  mode: 448
34974
35066
  });
@@ -35054,7 +35146,7 @@ async function writeUrlToFile(filePath, url, opts) {
35054
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}`);
35055
35147
  const body = res.body;
35056
35148
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
35057
- const fileHandle = await fs$2.open(filePath, "w");
35149
+ const fileHandle = await fs$1.open(filePath, "w");
35058
35150
  let thrown;
35059
35151
  try {
35060
35152
  const reader = body.getReader();
@@ -35072,7 +35164,7 @@ async function writeUrlToFile(filePath, url, opts) {
35072
35164
  await fileHandle.close();
35073
35165
  }
35074
35166
  if (thrown) {
35075
- await fs$2.unlink(filePath).catch(() => {});
35167
+ await fs$1.unlink(filePath).catch(() => {});
35076
35168
  throw thrown;
35077
35169
  }
35078
35170
  } finally {
@@ -35085,7 +35177,7 @@ async function writeUrlToFile(filePath, url, opts) {
35085
35177
  }
35086
35178
  async function writeBase64ToFile(filePath, base64) {
35087
35179
  const buf = Buffer.from(base64, "base64");
35088
- await fs$2.writeFile(filePath, buf);
35180
+ await fs$1.writeFile(filePath, buf);
35089
35181
  return {
35090
35182
  path: filePath,
35091
35183
  bytes: buf.length
@@ -38143,9 +38235,9 @@ function loadExternalCatalogEntries(options) {
38143
38235
  const entries = [];
38144
38236
  for (const rawPath of paths) {
38145
38237
  const resolved = resolveUserPath(rawPath);
38146
- if (!fs$1.existsSync(resolved)) continue;
38238
+ if (!syncFs.existsSync(resolved)) continue;
38147
38239
  try {
38148
- const payload = JSON.parse(fs$1.readFileSync(resolved, "utf-8"));
38240
+ const payload = JSON.parse(syncFs.readFileSync(resolved, "utf-8"));
38149
38241
  entries.push(...parseCatalogEntries(payload));
38150
38242
  } catch {}
38151
38243
  }
@@ -42337,7 +42429,7 @@ function listExistingAgentIdsFromDisk() {
42337
42429
  const root = resolveStateDir();
42338
42430
  const agentsDir = path.join(root, "agents");
42339
42431
  try {
42340
- 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);
42341
42433
  } catch {
42342
42434
  return [];
42343
42435
  }
@@ -48737,7 +48829,7 @@ async function runAgentTurnWithFallback(params) {
48737
48829
  if (corruptedSessionId) {
48738
48830
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
48739
48831
  try {
48740
- fs$1.unlinkSync(transcriptPath);
48832
+ syncFs.unlinkSync(transcriptPath);
48741
48833
  } catch {}
48742
48834
  }
48743
48835
  delete params.activeSessionStore[sessionKey];
@@ -49557,7 +49649,7 @@ async function readSessionLogSnapshot(params) {
49557
49649
  if (!logPath) return {};
49558
49650
  const snapshot = {};
49559
49651
  if (params.includeByteSize) try {
49560
- const stat = await fs$1.promises.stat(logPath);
49652
+ const stat = await syncFs.promises.stat(logPath);
49561
49653
  const size = Math.floor(stat.size);
49562
49654
  snapshot.byteSize = Number.isFinite(size) && size >= 0 ? size : void 0;
49563
49655
  } catch {
@@ -49571,7 +49663,7 @@ async function readSessionLogSnapshot(params) {
49571
49663
  return snapshot;
49572
49664
  }
49573
49665
  async function readLastNonzeroUsageFromSessionLog(logPath) {
49574
- const handle = await fs$1.promises.open(logPath, "r");
49666
+ const handle = await syncFs.promises.open(logPath, "r");
49575
49667
  try {
49576
49668
  let position = (await handle.stat()).size;
49577
49669
  let leadingPartial = "";
@@ -50268,9 +50360,9 @@ async function readPostCompactionContext(workspaceDir, cfg, nowMs) {
50268
50360
  if (!opened.ok) return null;
50269
50361
  const sections = extractSections((() => {
50270
50362
  try {
50271
- return fs$1.readFileSync(opened.fd, "utf-8");
50363
+ return syncFs.readFileSync(opened.fd, "utf-8");
50272
50364
  } finally {
50273
- fs$1.closeSync(opened.fd);
50365
+ syncFs.closeSync(opened.fd);
50274
50366
  }
50275
50367
  })(), ["Session Startup", "Red Lines"]);
50276
50368
  if (sections.length === 0) return null;
@@ -50492,7 +50584,7 @@ async function runReplyAgent(params) {
50492
50584
  if (resolved) transcriptCandidates.add(resolved);
50493
50585
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
50494
50586
  for (const candidate of transcriptCandidates) try {
50495
- fs$1.unlinkSync(candidate);
50587
+ syncFs.unlinkSync(candidate);
50496
50588
  } catch {}
50497
50589
  }
50498
50590
  return true;
@@ -50575,6 +50667,11 @@ async function runReplyAgent(params) {
50575
50667
  fallbackStateEntry.fallbackNoticeSelectedModel = fallbackTransition.nextState.selectedModel;
50576
50668
  fallbackStateEntry.fallbackNoticeActiveModel = fallbackTransition.nextState.activeModel;
50577
50669
  fallbackStateEntry.fallbackNoticeReason = fallbackTransition.nextState.reason;
50670
+ writeFallbackFlag({
50671
+ selectedModel: fallbackTransition.nextState.selectedModel,
50672
+ activeModel: fallbackTransition.nextState.activeModel,
50673
+ reason: fallbackTransition.nextState.reason
50674
+ });
50578
50675
  fallbackStateEntry.updatedAt = Date.now();
50579
50676
  activeSessionEntry = fallbackStateEntry;
50580
50677
  }
@@ -51438,7 +51535,7 @@ const warnedContexts = /* @__PURE__ */ new Map();
51438
51535
  const log$10 = createSubsystemLogger("session-maintenance-warning");
51439
51536
  let deliverRuntimePromise = null;
51440
51537
  function loadDeliverRuntime() {
51441
- deliverRuntimePromise ??= import("./deliver-runtime-_mBfV_4S.js");
51538
+ deliverRuntimePromise ??= import("./deliver-runtime-B80olQwJ.js");
51442
51539
  return deliverRuntimePromise;
51443
51540
  }
51444
51541
  function shouldSendWarning() {
@@ -51605,7 +51702,7 @@ function forkSessionFromParent(params) {
51605
51702
  agentId: params.agentId,
51606
51703
  sessionsDir: params.sessionsDir
51607
51704
  });
51608
- if (!parentSessionFile || !fs$1.existsSync(parentSessionFile)) return null;
51705
+ if (!parentSessionFile || !syncFs.existsSync(parentSessionFile)) return null;
51609
51706
  try {
51610
51707
  const manager = SessionManager.open(parentSessionFile);
51611
51708
  const leafId = manager.getLeafId();
@@ -51629,7 +51726,7 @@ function forkSessionFromParent(params) {
51629
51726
  cwd: manager.getCwd(),
51630
51727
  parentSession: parentSessionFile
51631
51728
  };
51632
- fs$1.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
51729
+ syncFs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
51633
51730
  return {
51634
51731
  sessionId,
51635
51732
  sessionFile
@@ -56415,7 +56512,7 @@ const VISION_PROVIDERS = [
56415
56512
  ];
56416
56513
  let imageRuntimePromise = null;
56417
56514
  function loadImageRuntime() {
56418
- imageRuntimePromise ??= import("./image-runtime-D11wBIC8.js");
56515
+ imageRuntimePromise ??= import("./image-runtime-BqIv7p_K.js");
56419
56516
  return imageRuntimePromise;
56420
56517
  }
56421
56518
  /**
@@ -58476,7 +58573,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
58476
58573
  hasTypedText
58477
58574
  };
58478
58575
  try {
58479
- const { transcribeFirstAudio } = await import("./audio-preflight-DZ1LNMJp.js");
58576
+ const { transcribeFirstAudio } = await import("./audio-preflight-BUCBED7N.js");
58480
58577
  if (params.abortSignal?.aborted) return {
58481
58578
  hasAudioAttachment,
58482
58579
  hasTypedText
@@ -60055,7 +60152,7 @@ function identityHasValues(identity) {
60055
60152
  }
60056
60153
  function loadIdentityFromFile(identityPath) {
60057
60154
  try {
60058
- const parsed = parseIdentityMarkdown(fs$1.readFileSync(identityPath, "utf-8"));
60155
+ const parsed = parseIdentityMarkdown(syncFs.readFileSync(identityPath, "utf-8"));
60059
60156
  if (!identityHasValues(parsed)) return null;
60060
60157
  return parsed;
60061
60158
  } catch {
@@ -60079,7 +60176,7 @@ function resolveAvatarSource(cfg, agentId) {
60079
60176
  }
60080
60177
  function resolveExistingPath(value) {
60081
60178
  try {
60082
- return fs$1.realpathSync(value);
60179
+ return syncFs.realpathSync(value);
60083
60180
  } catch {
60084
60181
  return path.resolve(value);
60085
60182
  }
@@ -60097,7 +60194,7 @@ function resolveLocalAvatarPath(params) {
60097
60194
  reason: "unsupported_extension"
60098
60195
  };
60099
60196
  try {
60100
- const stat = fs$1.statSync(realPath);
60197
+ const stat = syncFs.statSync(realPath);
60101
60198
  if (!stat.isFile()) return {
60102
60199
  ok: false,
60103
60200
  reason: "missing"
@@ -65870,27 +65967,27 @@ let slackSenderRuntimePromise = null;
65870
65967
  let signalSenderRuntimePromise = null;
65871
65968
  let imessageSenderRuntimePromise = null;
65872
65969
  function loadWhatsAppSenderRuntime() {
65873
- whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-Cw7U9orE.js");
65970
+ whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-4aOUBP2J.js");
65874
65971
  return whatsappSenderRuntimePromise;
65875
65972
  }
65876
65973
  function loadTelegramSenderRuntime() {
65877
- telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-DHlcnjQO.js");
65974
+ telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-CRyP-xDQ.js");
65878
65975
  return telegramSenderRuntimePromise;
65879
65976
  }
65880
65977
  function loadDiscordSenderRuntime() {
65881
- discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-CUTAK2hy.js");
65978
+ discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-GIuvX7Xw.js");
65882
65979
  return discordSenderRuntimePromise;
65883
65980
  }
65884
65981
  function loadSlackSenderRuntime() {
65885
- slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-HEEwW4uU.js");
65982
+ slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-cbfFoLZ4.js");
65886
65983
  return slackSenderRuntimePromise;
65887
65984
  }
65888
65985
  function loadSignalSenderRuntime() {
65889
- signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-wN7MkzLw.js");
65986
+ signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-CuVJyw7n.js");
65890
65987
  return signalSenderRuntimePromise;
65891
65988
  }
65892
65989
  function loadIMessageSenderRuntime() {
65893
- imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-CQOiEIuA.js");
65990
+ imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-B3TC7G80.js");
65894
65991
  return imessageSenderRuntimePromise;
65895
65992
  }
65896
65993
  function createDefaultDeps() {
@@ -69580,7 +69677,7 @@ function createDiscordGatewayPlugin(params) {
69580
69677
  return super.registerClient(client);
69581
69678
  }
69582
69679
  createWebSocket(url) {
69583
- return new WebSocket$1(url, { agent: wsAgent });
69680
+ return new WebSocket(url, { agent: wsAgent });
69584
69681
  }
69585
69682
  }
69586
69683
  return new ProxyGatewayPlugin();
@@ -72074,7 +72171,7 @@ async function monitorIMessageProvider(opts = {}) {
72074
72171
  function readFileIfExists(filePath) {
72075
72172
  if (!filePath) return;
72076
72173
  try {
72077
- return fs$1.readFileSync(filePath, "utf-8").trim();
72174
+ return syncFs.readFileSync(filePath, "utf-8").trim();
72078
72175
  } catch {
72079
72176
  return;
72080
72177
  }
@@ -72704,7 +72801,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
72704
72801
  prefix: "line-media",
72705
72802
  extension: getExtensionForContentType(contentType)
72706
72803
  });
72707
- await fs$1.promises.writeFile(filePath, buffer);
72804
+ await syncFs.promises.writeFile(filePath, buffer);
72708
72805
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
72709
72806
  return {
72710
72807
  path: filePath,
@@ -78727,15 +78824,15 @@ let slashCommandsRuntimePromise = null;
78727
78824
  let slashDispatchRuntimePromise = null;
78728
78825
  let slashSkillCommandsRuntimePromise = null;
78729
78826
  function loadSlashCommandsRuntime() {
78730
- slashCommandsRuntimePromise ??= import("./slash-commands.runtime-CjBXruwG.js");
78827
+ slashCommandsRuntimePromise ??= import("./slash-commands.runtime-CZz6v6b3.js");
78731
78828
  return slashCommandsRuntimePromise;
78732
78829
  }
78733
78830
  function loadSlashDispatchRuntime() {
78734
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-DqZVfX4H.js");
78831
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-SO7HOe8q.js");
78735
78832
  return slashDispatchRuntimePromise;
78736
78833
  }
78737
78834
  function loadSlashSkillCommandsRuntime() {
78738
- slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-DYK20Lxf.js");
78835
+ slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-Bawt7j0r.js");
78739
78836
  return slashSkillCommandsRuntimePromise;
78740
78837
  }
78741
78838
  const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
@@ -79725,7 +79822,7 @@ function collectTelegramUnmentionedGroupIds(groups) {
79725
79822
  }
79726
79823
  let auditMembershipRuntimePromise = null;
79727
79824
  function loadAuditMembershipRuntime() {
79728
- auditMembershipRuntimePromise ??= import("./audit-membership-runtime-w23FnNAN.js");
79825
+ auditMembershipRuntimePromise ??= import("./audit-membership-runtime-DyLj-uhz.js");
79729
79826
  return auditMembershipRuntimePromise;
79730
79827
  }
79731
79828
  async function auditTelegramGroupMembership(params) {
@@ -82100,7 +82197,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
82100
82197
  const disableAudioPreflight = firstDefined$1(topicConfig?.disableAudioPreflight, groupConfig?.disableAudioPreflight) === true;
82101
82198
  let preflightTranscript;
82102
82199
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
82103
- const { transcribeFirstAudio } = await import("./audio-preflight-DZ1LNMJp.js");
82200
+ const { transcribeFirstAudio } = await import("./audio-preflight-BUCBED7N.js");
82104
82201
  preflightTranscript = await transcribeFirstAudio({
82105
82202
  ctx: {
82106
82203
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -84939,7 +85036,7 @@ function createWhatsAppLoginTool() {
84939
85036
  force: Type.Optional(Type.Boolean())
84940
85037
  }),
84941
85038
  execute: async (_toolCallId, args) => {
84942
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-C0fDBnpM.js");
85039
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-KbOpR0GQ.js");
84943
85040
  if ((args?.action ?? "start") === "wait") {
84944
85041
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
84945
85042
  return {
@@ -85014,23 +85111,23 @@ let webOutboundPromise = null;
85014
85111
  let webLoginPromise = null;
85015
85112
  let whatsappActionsPromise = null;
85016
85113
  function loadWebOutbound() {
85017
- webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-Cgu2MfqR.js");
85114
+ webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-DQqIlwhS.js");
85018
85115
  return webOutboundPromise;
85019
85116
  }
85020
85117
  function loadWebLogin() {
85021
- webLoginPromise ??= import("./runtime-whatsapp-login.runtime-DumUjKRz.js");
85118
+ webLoginPromise ??= import("./runtime-whatsapp-login.runtime-DxV9iv6l.js");
85022
85119
  return webLoginPromise;
85023
85120
  }
85024
85121
  function loadWebLoginQr() {
85025
- webLoginQrPromise ??= import("./login-qr-C0fDBnpM.js");
85122
+ webLoginQrPromise ??= import("./login-qr-KbOpR0GQ.js");
85026
85123
  return webLoginQrPromise;
85027
85124
  }
85028
85125
  function loadWebChannel() {
85029
- webChannelPromise ??= import("./web-1D0d1RHD.js");
85126
+ webChannelPromise ??= import("./web-QsxgXbNK.js");
85030
85127
  return webChannelPromise;
85031
85128
  }
85032
85129
  function loadWhatsAppActions() {
85033
- whatsappActionsPromise ??= import("./whatsapp-actions-Cuy0qeQK.js");
85130
+ whatsappActionsPromise ??= import("./whatsapp-actions-CzqsuSGx.js");
85034
85131
  return whatsappActionsPromise;
85035
85132
  }
85036
85133
  function createRuntimeWhatsApp() {
@@ -85471,7 +85568,7 @@ const log$6 = createSubsystemLogger("memory");
85471
85568
  const QMD_MANAGER_CACHE = /* @__PURE__ */ new Map();
85472
85569
  let managerRuntimePromise = null;
85473
85570
  function loadManagerRuntime() {
85474
- managerRuntimePromise ??= import("./manager-runtime-BB9lcoFR.js");
85571
+ managerRuntimePromise ??= import("./manager-runtime-D6ckUNSs.js");
85475
85572
  return managerRuntimePromise;
85476
85573
  }
85477
85574
  async function getMemorySearchManager(params) {
@@ -85485,7 +85582,7 @@ async function getMemorySearchManager(params) {
85485
85582
  if (cached) return { manager: cached };
85486
85583
  }
85487
85584
  try {
85488
- const { QmdMemoryManager } = await import("./qmd-manager-CO-shcLU.js");
85585
+ const { QmdMemoryManager } = await import("./qmd-manager-BN0siR2Z.js");
85489
85586
  const primary = await QmdMemoryManager.create({
85490
85587
  cfg: params.cfg,
85491
85588
  agentId: params.agentId,
@@ -86059,7 +86156,7 @@ async function withMemoryManagerForAgent(params) {
86059
86156
  }
86060
86157
  async function checkReadableFile(pathname) {
86061
86158
  try {
86062
- await fs.access(pathname, fs$1.constants.R_OK);
86159
+ await fs.access(pathname, syncFs.constants.R_OK);
86063
86160
  return { exists: true };
86064
86161
  } catch (err) {
86065
86162
  const code = err.code;
@@ -86118,7 +86215,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
86118
86215
  }
86119
86216
  let dirReadable = null;
86120
86217
  try {
86121
- await fs.access(memoryDir, fs$1.constants.R_OK);
86218
+ await fs.access(memoryDir, syncFs.constants.R_OK);
86122
86219
  dirReadable = true;
86123
86220
  } catch (err) {
86124
86221
  const code = err.code;
@@ -86567,7 +86664,7 @@ const resolvePluginSdkAliasFile = (params) => {
86567
86664
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
86568
86665
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
86569
86666
  const orderedCandidates = isDistRuntime ? [distCandidate, srcCandidate] : isTest ? [distCandidate, srcCandidate] : [distCandidate];
86570
- for (const candidate of orderedCandidates) if (fs$1.existsSync(candidate)) return candidate;
86667
+ for (const candidate of orderedCandidates) if (syncFs.existsSync(candidate)) return candidate;
86571
86668
  const parent = path.dirname(cursor);
86572
86669
  if (parent === cursor) break;
86573
86670
  cursor = parent;
@@ -87173,7 +87270,7 @@ function loadSquidClawPlugins(options = {}) {
87173
87270
  continue;
87174
87271
  }
87175
87272
  const safeSource = opened.path;
87176
- fs$1.closeSync(opened.fd);
87273
+ syncFs.closeSync(opened.fd);
87177
87274
  let mod = null;
87178
87275
  try {
87179
87276
  mod = getJiti()(safeSource);
@@ -87291,7 +87388,7 @@ function loadSquidClawPlugins(options = {}) {
87291
87388
  }
87292
87389
  function safeRealpathOrResolve(value) {
87293
87390
  try {
87294
- return fs$1.realpathSync(value);
87391
+ return syncFs.realpathSync(value);
87295
87392
  } catch {
87296
87393
  return path.resolve(value);
87297
87394
  }
@@ -87730,9 +87827,9 @@ function resolvePatchFileOps(options) {
87730
87827
  });
87731
87828
  assertBoundaryRead(opened, filePath);
87732
87829
  try {
87733
- return fs$1.readFileSync(opened.fd, "utf8");
87830
+ return syncFs.readFileSync(opened.fd, "utf8");
87734
87831
  } finally {
87735
- fs$1.closeSync(opened.fd);
87832
+ syncFs.closeSync(opened.fd);
87736
87833
  }
87737
87834
  },
87738
87835
  writeFile: async (filePath, content) => {
@@ -88011,7 +88108,7 @@ const LOOP_WARNING_BUCKET_SIZE = 10;
88011
88108
  const MAX_LOOP_WARNING_KEYS = 256;
88012
88109
  let beforeToolCallRuntimePromise = null;
88013
88110
  function loadBeforeToolCallRuntime() {
88014
- beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-B_LUttg1.js");
88111
+ beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-Bpk4qTgV.js");
88015
88112
  return beforeToolCallRuntimePromise;
88016
88113
  }
88017
88114
  function buildAdjustedParamsKey(params) {
@@ -90693,9 +90790,9 @@ async function readWorkspaceContextForSummary() {
90693
90790
  if (!opened.ok) return "";
90694
90791
  const sections = extractSections((() => {
90695
90792
  try {
90696
- return fs$1.readFileSync(opened.fd, "utf-8");
90793
+ return syncFs.readFileSync(opened.fd, "utf-8");
90697
90794
  } finally {
90698
- fs$1.closeSync(opened.fd);
90795
+ syncFs.closeSync(opened.fd);
90699
90796
  }
90700
90797
  })(), ["Session Startup", "Red Lines"]);
90701
90798
  if (sections.length === 0) return "";
@@ -92064,7 +92161,7 @@ async function compactEmbeddedPiSessionDirect(params) {
92064
92161
  if (!apiKeyInfo.apiKey) {
92065
92162
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
92066
92163
  } else if (model.provider === "github-copilot") {
92067
- 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);
92068
92165
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
92069
92166
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
92070
92167
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -93289,7 +93386,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93289
93386
  * Throws if the connection is not open.
93290
93387
  */
93291
93388
  send(event) {
93292
- 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"})`);
93293
93390
  this.ws.send(JSON.stringify(event));
93294
93391
  }
93295
93392
  /**
@@ -93306,7 +93403,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93306
93403
  * Returns true if the WebSocket is currently open and ready to send.
93307
93404
  */
93308
93405
  isConnected() {
93309
- return this.ws !== null && this.ws.readyState === WebSocket$1.OPEN;
93406
+ return this.ws !== null && this.ws.readyState === WebSocket.OPEN;
93310
93407
  }
93311
93408
  /**
93312
93409
  * Permanently closes the WebSocket connection and disables auto-reconnect.
@@ -93316,7 +93413,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93316
93413
  this._cancelRetryTimer();
93317
93414
  if (this.ws) {
93318
93415
  this.ws.removeAllListeners();
93319
- 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");
93320
93417
  this.ws = null;
93321
93418
  }
93322
93419
  }
@@ -93326,7 +93423,7 @@ var OpenAIWebSocketManager = class extends EventEmitter {
93326
93423
  reject(/* @__PURE__ */ new Error("OpenAIWebSocketManager: apiKey is required before connecting."));
93327
93424
  return;
93328
93425
  }
93329
- const socket = new WebSocket$1(this.wsUrl, { headers: {
93426
+ const socket = new WebSocket(this.wsUrl, { headers: {
93330
93427
  Authorization: `Bearer ${this.apiKey}`,
93331
93428
  "OpenAI-Beta": "responses-websocket=v1"
93332
93429
  } });
@@ -94292,11 +94389,11 @@ function appendRawStream(payload) {
94292
94389
  if (!rawStreamReady) {
94293
94390
  rawStreamReady = true;
94294
94391
  try {
94295
- fs$1.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
94392
+ syncFs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
94296
94393
  } catch {}
94297
94394
  }
94298
94395
  try {
94299
- fs$1.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
94396
+ syncFs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
94300
94397
  } catch {}
94301
94398
  }
94302
94399
 
@@ -97801,7 +97898,7 @@ async function runEmbeddedPiAgent(params) {
97801
97898
  await copilotTokenState.refreshInFlight;
97802
97899
  return;
97803
97900
  }
97804
- 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);
97805
97902
  copilotTokenState.refreshInFlight = (async () => {
97806
97903
  const githubToken = copilotTokenState.githubToken.trim();
97807
97904
  if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
@@ -97893,7 +97990,7 @@ async function runEmbeddedPiAgent(params) {
97893
97990
  return;
97894
97991
  }
97895
97992
  if (model.provider === "github-copilot") {
97896
- 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);
97897
97994
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
97898
97995
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
97899
97996
  if (copilotTokenState) {