@symerian/symi 2.8.13 → 2.8.14

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 (295) hide show
  1. package/dist/{accounts-BuZxOb3B.js → accounts-Bsg6r6H7.js} +1 -1
  2. package/dist/{accounts-BRw8yhIW.js → accounts-BsgY6sda.js} +21 -21
  3. package/dist/{accounts-3dCrO3oZ.js → accounts-wWWkC0JH.js} +1 -1
  4. package/dist/{active-listener-BVZOh2T1.js → active-listener-AVNn5_U9.js} +1 -1
  5. package/dist/{agent-scope-CpEJ0B88.js → agent-scope-Cpm7a9ss.js} +3 -3
  6. package/dist/{agents-CgCg4syn.js → agents-DlAvDWxz.js} +4 -4
  7. package/dist/{agents.config-BnPC7uct.js → agents.config-BKKMbeeE.js} +1 -1
  8. package/dist/{agents.config-DqWxpgkX.js → agents.config-Dd-11klq.js} +1 -1
  9. package/dist/{audio-preflight-NdNUAZ0y.js → audio-preflight-C6vpFnOG.js} +4 -4
  10. package/dist/{audio-preflight-Cb-T0r6e.js → audio-preflight-rrz8KyHd.js} +29 -29
  11. package/dist/{audit-Bi9Je9FZ.js → audit-BhCJV2l6.js} +1 -1
  12. package/dist/{audit-Oa5dsn5p.js → audit-CB97BqHJ.js} +1 -1
  13. package/dist/{auth-choice-BKwypsnS.js → auth-choice-C6woT6k2.js} +1 -1
  14. package/dist/{auth-choice-BIlBt2d0.js → auth-choice-CRQRPwQt.js} +1 -1
  15. package/dist/{auth-profiles-C2vj6htZ.js → auth-profiles-BzB_Exeq.js} +17 -17
  16. package/dist/{banner-CX5CuLWQ.js → banner-DrNha2_N.js} +1 -1
  17. package/dist/{bindings-BsHoBLIE.js → bindings-xcRox9xM.js} +2 -2
  18. package/dist/build-info.json +3 -3
  19. package/dist/bundled/boot-md/handler.js +54 -54
  20. package/dist/bundled/bootstrap-extra-files/handler.js +5 -5
  21. package/dist/bundled/command-logger/handler.js +1 -1
  22. package/dist/bundled/session-memory/handler.js +54 -54
  23. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  24. package/dist/{channel-activity-D8QD7GoV.js → channel-activity-CzHaIUAp.js} +1 -1
  25. package/dist/{channel-options-mUKQVJQl.js → channel-options-D8q9En4T.js} +1 -1
  26. package/dist/{channel-options-7y9EuPLO.js → channel-options-DYy2sCfN.js} +1 -1
  27. package/dist/{channel-web-Dldh4zVI.js → channel-web-CRBU4eZk.js} +1 -1
  28. package/dist/{channels-cli-Dz9vV1KL.js → channels-cli-BUk43hHR.js} +7 -7
  29. package/dist/{channels-cli-Q6Q8LokG.js → channels-cli-Dk3kUw9A.js} +7 -7
  30. package/dist/{chrome-ROtrXlNs.js → chrome-B14NNyfm.js} +5 -5
  31. package/dist/{chrome-BUT--ob3.js → chrome-DwXnykXR.js} +23 -23
  32. package/dist/{chunk-BRe1o4Af.js → chunk-BcxcL1U3.js} +1 -1
  33. package/dist/{cli-DMsLCQbO.js → cli-5gWsnsB7.js} +4 -4
  34. package/dist/{cli-D4WYEtu4.js → cli-DjZzJy3t.js} +4 -4
  35. package/dist/{command-registry-cEqGIx4b.js → command-registry-LjFltTU9.js} +10 -10
  36. package/dist/{commands-registry-DxbSTLNQ.js → commands-registry-ByGkL6hs.js} +4 -4
  37. package/dist/{completion-cli-Bw0jbNaG.js → completion-cli-BVTGy8th.js} +1 -1
  38. package/dist/{completion-cli-C5GCKfKT.js → completion-cli-Cf6fYZWL.js} +2 -2
  39. package/dist/{config-BkZ9HOKT.js → config-C4WnAd-c.js} +17 -17
  40. package/dist/{config-cli-DP0hP7WR.js → config-cli-C7DIbGxx.js} +1 -1
  41. package/dist/{config-cli-DgHooQ4_.js → config-cli-EgWrCemi.js} +1 -1
  42. package/dist/{configure-OUiXvgMg.js → configure-B67uIawm.js} +3 -3
  43. package/dist/{configure-BQUkaPdS.js → configure-Bk-snuxh.js} +3 -3
  44. package/dist/{consolidate-07QMweFF.js → consolidate-DRtVvG2U.js} +4 -4
  45. package/dist/{deliver-B_Q_nWJV.js → deliver-D0bWiRCg.js} +1 -1
  46. package/dist/{deliver-B0OUq6RP.js → deliver-SLYAWE19.js} +20 -20
  47. package/dist/{diagnostic-BUcR3Meg.js → diagnostic-DTkZsRNM.js} +1 -1
  48. package/dist/{doctor-completion-DlKvncR9.js → doctor-completion-By066O3p.js} +1 -1
  49. package/dist/{doctor-completion-BSMAyCq_.js → doctor-completion-lE_33xaY.js} +1 -1
  50. package/dist/entry.js +1 -1
  51. package/dist/{env-BDXYbTKj.js → env-CB65jmJQ.js} +1 -1
  52. package/dist/extensionAPI.js +7 -7
  53. package/dist/{frontmatter-CTR5f_Ez.js → frontmatter-CT1M0pRK.js} +4 -4
  54. package/dist/{gateway-cli-BlRNLVfU.js → gateway-cli-C6uT2x34.js} +13 -13
  55. package/dist/{gateway-cli-NI7W2QxR.js → gateway-cli-DqEgqVKC.js} +13 -13
  56. package/dist/{gemini-auth-BefM10YB.js → gemini-auth-D80BsXr2.js} +1 -1
  57. package/dist/{github-copilot-token-cCYzSU9h.js → github-copilot-token-B8B2pmph.js} +7 -7
  58. package/dist/{glass-ui-ws-BBkFBsKB.js → glass-ui-ws-77TY57IO.js} +11 -11
  59. package/dist/{glass-ui-ws-DxrESDzy.js → glass-ui-ws-CLAUHeZR.js} +11 -11
  60. package/dist/{health-fOu0S75U.js → health-2jkjZxY8.js} +1 -1
  61. package/dist/{health-D4vU-wV-.js → health-CvMHgR-L.js} +1 -1
  62. package/dist/{hooks-cli-BdgnXYmw.js → hooks-cli-CRZySOiz.js} +5 -5
  63. package/dist/{hooks-cli-DdSggQYs.js → hooks-cli-DSaezFsD.js} +5 -5
  64. package/dist/{image-BuVL0jHI.js → image-BHF_fnIp.js} +4 -4
  65. package/dist/{image-tzIqIuKx.js → image-MNvheU8U.js} +1 -1
  66. package/dist/{plugin-sdk/image-ops-BlQR__MN.js → image-ops-CY7v6vvp.js} +17 -17
  67. package/dist/index.js +9 -9
  68. package/dist/{internal-DjnxpF_K.js → internal-FNqguZSK.js} +11 -11
  69. package/dist/{ir-7tMVY7D_.js → ir-D6MiJpAy.js} +4 -4
  70. package/dist/llm-slug-generator.js +54 -54
  71. package/dist/{local-roots-ClipCZ9s.js → local-roots-tcdaIEhh.js} +5 -5
  72. package/dist/{login-D4rZWBXe.js → login-D4ZkmSrY.js} +7 -7
  73. package/dist/{login-qr-DdAVHOEC.js → login-qr-C9ftIq3n.js} +12 -12
  74. package/dist/{manager-DRrGn88w.js → manager-BtWtmpxN.js} +1 -1
  75. package/dist/{manager-syNf_ZrI.js → manager-DDELj5o9.js} +1 -1
  76. package/dist/{manager-TOeH0D8K.js → manager-DrmlegR2.js} +1 -1
  77. package/dist/{manager-_RGWWymD.js → manager-DxCmjSfP.js} +24 -24
  78. package/dist/{manifest-registry-CBCGTsIb.js → manifest-registry-BvGv6lp9.js} +19 -19
  79. package/dist/{markdown-tables-x2Xe2UXh.js → markdown-tables-CE-qSMGB.js} +1 -1
  80. package/dist/{memory-cli-0jm-n36m.js → memory-cli-ENCASZJk.js} +3 -3
  81. package/dist/{memory-cli-BSOOwpt1.js → memory-cli-Qgbcxvuf.js} +3 -3
  82. package/dist/{plugin-sdk/message-channel-COTAJzHd.js → message-channel-lwVT8QjK.js} +1 -1
  83. package/dist/{models-sGeWQOmg.js → models-COhUz7M9.js} +2 -2
  84. package/dist/{models-cli-CtkoEyh3.js → models-cli-CCxYcF4R.js} +5 -5
  85. package/dist/{models-cli-DV-J1cm0.js → models-cli-CYvXBvmZ.js} +6 -6
  86. package/dist/{onboard-FeTHeA1y.js → onboard-CQNUYBIp.js} +2 -2
  87. package/dist/{onboard-channels-DpZkjldS.js → onboard-channels-9erx07qe.js} +1 -1
  88. package/dist/{onboard-channels-D8bDJYPc.js → onboard-channels-CWw8G-6n.js} +1 -1
  89. package/dist/{onboard-CWBYuaCm.js → onboard-fVpLVnwg.js} +2 -2
  90. package/dist/{onboarding-BsPnnH5g.js → onboarding-CtEiH9WG.js} +3 -3
  91. package/dist/{onboarding-c2qhwP0x.js → onboarding-D-OIkDwZ.js} +3 -3
  92. package/dist/{onboarding.finalize-7St3fmk2.js → onboarding.finalize-BY3HNjX4.js} +9 -9
  93. package/dist/{onboarding.finalize-id9EHg1P.js → onboarding.finalize-DTbpLV-T.js} +8 -8
  94. package/dist/{outbound-Zmd7UyQH.js → outbound-C6Gm22UF.js} +7 -7
  95. package/dist/{outbound-attachment-DeCnZT-8.js → outbound-attachment-BWyKV1Gy.js} +2 -2
  96. package/dist/paths-CYmyCDsE.js +212 -0
  97. package/dist/{paths-CbQV9WEg.js → paths-DEuVuViW.js} +1 -1
  98. package/dist/{pi-auth-json-RXOlh8ar.js → pi-auth-json-Bv1NzJdR.js} +1 -1
  99. package/dist/{pi-embedded-DCBB1_SC.js → pi-embedded-CdOdQw2i.js} +278 -23
  100. package/dist/{pi-embedded-helpers-D1_Sab0M.js → pi-embedded-helpers-DwQ9wJeT.js} +73 -73
  101. package/dist/{pi-embedded-helpers-DjSdA5BG.js → pi-embedded-helpers-TcYQOZAY.js} +4 -4
  102. package/dist/{pi-tools.policy-BZrM6a-w.js → pi-tools.policy-Bx5zp45n.js} +2 -0
  103. package/dist/{pi-tools.policy-QIVWAVVI.js → pi-tools.policy-o0ytjRqu.js} +2 -0
  104. package/dist/{plugin-registry-BJSfTT8c.js → plugin-registry-BrJ0-qlu.js} +1 -1
  105. package/dist/{plugin-registry-Cy1kfzAy.js → plugin-registry-Cuc8ORuR.js} +1 -1
  106. package/dist/plugin-sdk/{accounts-BtaOa4z_.js → accounts-BToL3HlP.js} +1 -1
  107. package/dist/plugin-sdk/{accounts-Ddm33hQm.js → accounts-D9zGZU5t.js} +3 -3
  108. package/dist/plugin-sdk/{accounts-s-AdhXVR.js → accounts-Dtszw3Zn.js} +1 -1
  109. package/dist/plugin-sdk/{active-listener-DYjn3fML.js → active-listener-CJuvR4C2.js} +1 -1
  110. package/dist/plugin-sdk/{agent-scope-CYYpcO9W.js → agent-scope-C3gMMKCU.js} +2 -2
  111. package/dist/plugin-sdk/agents/pi-embedded-runner/long-task-prompt.d.ts +7 -0
  112. package/dist/plugin-sdk/agents/tools/task-tool.d.ts +7 -0
  113. package/dist/plugin-sdk/{api-key-rotation-DGJZ8SVa.js → api-key-rotation-CBsLb_4V.js} +1 -1
  114. package/dist/plugin-sdk/{audio-preflight-CiVw8470.js → audio-preflight-DucGa8w7.js} +24 -24
  115. package/dist/plugin-sdk/{bindings-C7hRtgYW.js → bindings-BbwoUGPx.js} +2 -2
  116. package/dist/plugin-sdk/{channel-activity-DoC1xtDu.js → channel-activity-Ji7f0gqq.js} +1 -1
  117. package/dist/plugin-sdk/{channel-web-BSDjZSwm.js → channel-web-t8UOP6Zu.js} +22 -22
  118. package/dist/plugin-sdk/{chrome-CEqfiEs0.js → chrome-D9kN9org.js} +3 -3
  119. package/dist/plugin-sdk/{chunk-Dw2XBYXv.js → chunk-jvk9axTQ.js} +1 -1
  120. package/dist/plugin-sdk/{command-format-GKSevep4.js → command-format-DSdvQ_M5.js} +1 -1
  121. package/dist/plugin-sdk/{commands-registry-BhW_oGNt.js → commands-registry-BuYpmEx-.js} +4 -4
  122. package/dist/plugin-sdk/{config-Ckum15iC.js → config-BzupW6LN.js} +9 -9
  123. package/dist/plugin-sdk/{consolidate-COuTEt4Z.js → consolidate-CafShdsH.js} +2 -2
  124. package/dist/plugin-sdk/{deliver-B8Y2t-RH.js → deliver-CKgFosI5.js} +10 -10
  125. package/dist/plugin-sdk/{diagnostic-BR07buTm.js → diagnostic-_oc91gNi.js} +1 -1
  126. package/dist/plugin-sdk/{image-CCmNHDV0.js → image-DFyINnvE.js} +4 -4
  127. package/dist/{image-ops-C7CauEK8.js → plugin-sdk/image-ops-Bnp6LXEx.js} +2 -2
  128. package/dist/plugin-sdk/index.js +54 -54
  129. package/dist/plugin-sdk/{ir-BJ6BHE5b.js → ir-Fb3qpcis.js} +4 -4
  130. package/dist/plugin-sdk/{local-roots-BHLNSI8U.js → local-roots-Ckk1QfzI.js} +3 -3
  131. package/dist/plugin-sdk/{login-g_rQAcuM.js → login-K1YB_7-t.js} +7 -7
  132. package/dist/plugin-sdk/{login-qr-BOUmLSY3.js → login-qr-lMl_OqDj.js} +9 -9
  133. package/dist/plugin-sdk/{manager-B9GigLWj.js → manager-BPm5oefC.js} +9 -9
  134. package/dist/plugin-sdk/{manifest-registry-BRx4JDK0.js → manifest-registry-hy3Bn-r9.js} +1 -1
  135. package/dist/plugin-sdk/{markdown-tables-BoYFajMu.js → markdown-tables-Dfaqilz6.js} +1 -1
  136. package/dist/{message-channel-OlFBYAw8.js → plugin-sdk/message-channel-BdI5Ra9S.js} +1 -1
  137. package/dist/plugin-sdk/{model-selection-Bbs4XGPG.js → model-selection-CtVwtb6y.js} +4 -4
  138. package/dist/plugin-sdk/{outbound-BVhSNFy0.js → outbound-DW3cqlQW.js} +7 -7
  139. package/dist/plugin-sdk/{outbound-attachment-B56R1Wi4.js → outbound-attachment-D7ME_Kib.js} +2 -2
  140. package/dist/plugin-sdk/{pi-auth-json-CB2bV0Jd.js → pi-auth-json-DiyK6bgV.js} +1 -1
  141. package/dist/plugin-sdk/{pi-embedded-helpers-dd3G9Hfi.js → pi-embedded-helpers-BL7ZRhGv.js} +17 -17
  142. package/dist/plugin-sdk/{plugins-BNByVCIH.js → plugins-BbAvhC25.js} +4 -4
  143. package/dist/plugin-sdk/{pw-ai-BXeOYCz_.js → pw-ai-B3T0mTHr.js} +8 -8
  144. package/dist/plugin-sdk/{qmd-manager-wIr8qz2n.js → qmd-manager-BlUikj9s.js} +4 -4
  145. package/dist/plugin-sdk/{registry-D0xTnUWt.js → registry--_pGht6S.js} +2 -2
  146. package/dist/plugin-sdk/{replies-CQ4szNhV.js → replies-BR2TPTVW.js} +3 -3
  147. package/dist/plugin-sdk/{reply-DD8z_dUW.js → reply-BKAHTugL.js} +337 -82
  148. package/dist/plugin-sdk/{reply-prefix-uxfMZW4p.js → reply-prefix-BHuV5t70.js} +1 -1
  149. package/dist/plugin-sdk/{resolve-outbound-target-BiyAyTWz.js → resolve-outbound-target-BkCUbYGV.js} +2 -2
  150. package/dist/plugin-sdk/{resolve-route-CWfcnhza.js → resolve-route-CHQ7BTlU.js} +3 -3
  151. package/dist/plugin-sdk/{retry-CwQ_iIj8.js → retry-ilSJqnz9.js} +1 -1
  152. package/dist/plugin-sdk/{runner-BuxCHv_O.js → runner-BhifC1J_.js} +9 -9
  153. package/dist/plugin-sdk/{send-fNRDT21N.js → send-BP5pSPaZ.js} +6 -6
  154. package/dist/plugin-sdk/{send-BtO-7fHs.js → send-CGhw9mO3.js} +6 -6
  155. package/dist/plugin-sdk/{send-CKXzQuXo.js → send-DLO_yV5_.js} +10 -10
  156. package/dist/plugin-sdk/{send-Djq5IPRa.js → send-ZhAe1nXO.js} +10 -10
  157. package/dist/plugin-sdk/{send-XSuwT1PC.js → send-jsofmTfJ.js} +7 -7
  158. package/dist/plugin-sdk/{session-ARbcLHE9.js → session-BfyK_04G.js} +4 -4
  159. package/dist/plugin-sdk/{skill-commands-yzJVuTIW.js → skill-commands-DEfqC_kJ.js} +5 -5
  160. package/dist/plugin-sdk/{skills-BfsaS1F9.js → skills-C9DbB-Kp.js} +7 -7
  161. package/dist/plugin-sdk/{sqlite-A3wGzttn.js → sqlite-CmVrFEYD.js} +1 -1
  162. package/dist/plugin-sdk/{store-BdrNabcU.js → store-Do3t33-c.js} +2 -2
  163. package/dist/plugin-sdk/{subsystem-B2uDN3TV.js → subsystem-Coz2AgU8.js} +1 -1
  164. package/dist/plugin-sdk/{synthesis-Dv5GwSky.js → synthesis-CVF7Fwhd.js} +49 -49
  165. package/dist/plugin-sdk/{tables-DNwXwNFa.js → tables-DR0NmBeH.js} +1 -1
  166. package/dist/{target-errors-DeJTztcq.js → plugin-sdk/target-errors-B7YyMnIi.js} +2 -2
  167. package/dist/plugin-sdk/{thinking-CXqf7WTe.js → thinking-DCNUIAHY.js} +5 -5
  168. package/dist/{tokens-W0JzCJJM.js → plugin-sdk/tokens-CWMflosr.js} +1 -1
  169. package/dist/plugin-sdk/{tool-images-HJ2sfZDV.js → tool-images-D7Lno-TE.js} +2 -2
  170. package/dist/plugin-sdk/{tool-loop-detection-gmtzSlNZ.js → tool-loop-detection-DseOlBug.js} +2 -2
  171. package/dist/plugin-sdk/web-D0DsmFvw.js +66 -0
  172. package/dist/plugin-sdk/{whatsapp-actions-B_1l8JMU.js → whatsapp-actions-eTefsWhW.js} +21 -21
  173. package/dist/{plugins-cli-6UYkZBH0.js → plugins-cli-BDalhI46.js} +5 -5
  174. package/dist/{plugins-cli-DPetEhfv.js → plugins-cli-DFmriy-c.js} +5 -5
  175. package/dist/{plugins-BzmbgY7s.js → plugins-v8k1XVOy.js} +9 -9
  176. package/dist/{program-CVy9LVoS.js → program-DKh41c2a.js} +10 -10
  177. package/dist/{program-context-CBI6gIf-.js → program-context-Cq7pqOrw.js} +19 -19
  178. package/dist/{prompt-select-styled-BlXl_Qf7.js → prompt-select-styled-BFCAZLwK.js} +6 -6
  179. package/dist/{prompt-select-styled-Bv675D48.js → prompt-select-styled-DvvSE_ni.js} +6 -6
  180. package/dist/{provider-auth-helpers-RUQD5XAm.js → provider-auth-helpers-B-LkDxxi.js} +1 -1
  181. package/dist/{provider-auth-helpers-BB1lhCy5.js → provider-auth-helpers-DXppgV1l.js} +1 -1
  182. package/dist/{push-apns-Cr-a1KBt.js → push-apns-DCA47WA5.js} +1 -1
  183. package/dist/{push-apns-rPetW5cI.js → push-apns-DvudhEAb.js} +1 -1
  184. package/dist/{pw-ai-CQtaPvM8.js → pw-ai-40Jf9QIb.js} +1 -1
  185. package/dist/{pw-ai-DWkC5eGA.js → pw-ai-XGqnSWju.js} +11 -11
  186. package/dist/{qmd-manager-BXkbA8Y9.js → qmd-manager-CbRJhonG.js} +8 -8
  187. package/dist/{register.agent-DKDwNHQi.js → register.agent-_BV5KyFb.js} +9 -9
  188. package/dist/{register.agent-j6OlKEU-.js → register.agent-aFj_SMi3.js} +8 -8
  189. package/dist/{register.configure-CopgSygi.js → register.configure-CvOoD5gE.js} +9 -9
  190. package/dist/{register.configure-BgIXIq9d.js → register.configure-Dx0Uhmlz.js} +9 -9
  191. package/dist/{register.maintenance-DjaGkVtr.js → register.maintenance-BuZpoSik.js} +10 -10
  192. package/dist/{register.maintenance-BKsCM6NG.js → register.maintenance-CMeJR7DG.js} +11 -11
  193. package/dist/{register.message-C3oHvmdl.js → register.message-qysZPg3G.js} +5 -5
  194. package/dist/{register.message-bxhUcSyj.js → register.message-xxGePuRC.js} +5 -5
  195. package/dist/{register.onboard-DijWH8Vd.js → register.onboard-1MP2I0q4.js} +7 -7
  196. package/dist/{register.onboard-D0DHcb20.js → register.onboard-D4Aow7Gc.js} +7 -7
  197. package/dist/{register.setup-XlCTnTm_.js → register.setup-BT74aXzA.js} +7 -7
  198. package/dist/{register.setup-CrFzd94c.js → register.setup-DzliKkWh.js} +7 -7
  199. package/dist/{register.status-health-sessions-VwvDWUxZ.js → register.status-health-sessions-B3K2gZ72.js} +7 -7
  200. package/dist/{register.status-health-sessions-AWCg_uLf.js → register.status-health-sessions-D7VYZlrU.js} +7 -7
  201. package/dist/{register.subclis-Bw8k5Z5C.js → register.subclis-BCy0IDRv.js} +10 -10
  202. package/dist/{registry-DYq1AYOv.js → registry-X6fUE0K7.js} +19 -19
  203. package/dist/{replies-CUWXgyx2.js → replies-86F3PldM.js} +3 -3
  204. package/dist/{reply-D7_t00Jt.js → reply-Dg1ZU3DZ.js} +262 -9
  205. package/dist/{reply-prefix-CvEIl6_d.js → reply-prefix-CI_IdwqH.js} +1 -1
  206. package/dist/{resolve-route-Jy5dFY67.js → resolve-route-BgSuN9c6.js} +4 -4
  207. package/dist/{retry-B-y5suGA.js → retry-4oEAHckB.js} +1 -1
  208. package/dist/{run-main-7BEaNeDG.js → run-main-OS2aFAJ2.js} +18 -18
  209. package/dist/{runner-ecX1WzDt.js → runner-B5oNTtgf.js} +22 -22
  210. package/dist/{runner-Dpjulwnm.js → runner-DFuAePEr.js} +1 -1
  211. package/dist/{security-cli-BpnzAB5_.js → security-cli-BadXDWTh.js} +2 -2
  212. package/dist/{security-cli-D9WEiEjD.js → security-cli-D5y28-RH.js} +2 -2
  213. package/dist/{send-DFtnbzqy.js → send-ASDB3AzC.js} +7 -7
  214. package/dist/{send-Bb4it0te.js → send-BTfqlrYd.js} +18 -18
  215. package/dist/{send-C0QjmPaf.js → send-CSydU49L.js} +10 -10
  216. package/dist/{send-Cpk3Ti6-.js → send-Du-IfSne.js} +6 -6
  217. package/dist/{send-BKo1T3HF.js → send-cCTQjuOZ.js} +6 -6
  218. package/dist/{server-methods-CTeJHJSZ.js → server-methods-BszFAkbJ.js} +8 -8
  219. package/dist/{server-methods-FQ-PqiVC.js → server-methods-D_iKJ-sj.js} +8 -8
  220. package/dist/{server-node-events-BqvcHbuK.js → server-node-events-CENHuAVz.js} +5 -5
  221. package/dist/{server-node-events-Z7epDloV.js → server-node-events-uBu3XOjd.js} +5 -5
  222. package/dist/{session-BTeY6Gn2.js → session-D8qLj_xN.js} +8 -8
  223. package/dist/{skill-commands-DG2lcozb.js → skill-commands-BcOduw6G.js} +16 -16
  224. package/dist/{skills-CXxrn_e2.js → skills-BrYDT4Jr.js} +24 -24
  225. package/dist/{sqlite-BN_hIcmu.js → sqlite-P-gMg7fi.js} +3 -3
  226. package/dist/{status-CKROJwI2.js → status-BvbJavmh.js} +1 -1
  227. package/dist/{status-DLFbpd9v.js → status-CA0mUJld.js} +4 -4
  228. package/dist/{status-DMigoL7q.js → status-CBnCPUMG.js} +4 -4
  229. package/dist/{status-x7WCSVhG.js → status-DJAeKN4G.js} +1 -1
  230. package/dist/{store-01F_JM7O.js → store-Ceagbc4L.js} +6 -6
  231. package/dist/{subagent-registry-BvP8AGdE.js → subagent-registry-C1OyZl-M.js} +262 -9
  232. package/dist/{subsystem-BjyjJF-d.js → subsystem-CzXhCdeY.js} +1 -1
  233. package/dist/{synthesis-DgQz6kPf.js → synthesis-DNTyB7JY.js} +7 -7
  234. package/dist/{synthesis-E4flT91F.js → synthesis-DuqSkHEr.js} +54 -54
  235. package/dist/{synthesis-DDId6n26.js → synthesis-brHrnNF2.js} +4 -4
  236. package/dist/{synthesis-By7KPUAm.js → synthesis-z5B41p_r.js} +4 -4
  237. package/dist/{tables-DoG-pFrf.js → tables-qbCoZrYA.js} +1 -1
  238. package/dist/{plugin-sdk/target-errors-Paro1BjP.js → target-errors-uNitqCCT.js} +2 -2
  239. package/dist/{thinking-BprCy23Z.js → thinking-BV7SCNJP.js} +5 -5
  240. package/dist/{plugin-sdk/tokens-bC3UVmVH.js → tokens-Bl5R3wPD.js} +1 -1
  241. package/dist/{tool-images-SqqWIT22.js → tool-images-JxNglLSr.js} +2 -2
  242. package/dist/{tool-loop-detection-Dj9h1ogr.js → tool-loop-detection-dfE771kg.js} +3 -3
  243. package/dist/{unified-runner-DaSb-TsZ.js → unified-runner-Czg3pdBc.js} +488 -233
  244. package/dist/{update-cli-D0relAZw.js → update-cli-0lyGyl31.js} +11 -11
  245. package/dist/{update-cli-C5H6DkNM.js → update-cli-CIzkVfmj.js} +10 -10
  246. package/dist/{update-runner-D99V_zHX.js → update-runner-D7-LDziQ.js} +1 -1
  247. package/dist/{update-runner-B_yVOk8Z.js → update-runner-aYPcKYAN.js} +1 -1
  248. package/dist/{web-BBz1kF_9.js → web-B90A99YU.js} +58 -58
  249. package/dist/{web-Bdebat5l.js → web-BJ5dUZso.js} +5 -5
  250. package/dist/{web-BQh2S6oq.js → web-CN7wnU7w.js} +4 -4
  251. package/dist/{web-CiYoJfrl.js → web-Wk1ay1eQ.js} +7 -7
  252. package/dist/{whatsapp-actions-DmVpLXmh.js → whatsapp-actions-llk0IUn2.js} +23 -23
  253. package/dist/{workspace-DscDraUb.js → workspace-CywO4ayZ.js} +27 -27
  254. package/extensions/bluebubbles/package.json +1 -1
  255. package/extensions/copilot-proxy/package.json +1 -1
  256. package/extensions/diagnostics-otel/package.json +1 -1
  257. package/extensions/discord/package.json +1 -1
  258. package/extensions/feishu/package.json +1 -1
  259. package/extensions/google-antigravity-auth/package.json +1 -1
  260. package/extensions/google-gemini-cli-auth/package.json +1 -1
  261. package/extensions/googlechat/package.json +1 -1
  262. package/extensions/imessage/package.json +1 -1
  263. package/extensions/irc/package.json +1 -1
  264. package/extensions/learning-loop/package.json +1 -1
  265. package/extensions/line/package.json +1 -1
  266. package/extensions/llm-task/package.json +1 -1
  267. package/extensions/matrix/CHANGELOG.md +6 -0
  268. package/extensions/matrix/package.json +1 -1
  269. package/extensions/mattermost/package.json +1 -1
  270. package/extensions/memory-core/package.json +1 -1
  271. package/extensions/memory-lancedb/package.json +1 -1
  272. package/extensions/minimax-portal-auth/package.json +1 -1
  273. package/extensions/msteams/CHANGELOG.md +6 -0
  274. package/extensions/msteams/package.json +1 -1
  275. package/extensions/nextcloud-talk/package.json +1 -1
  276. package/extensions/nostr/CHANGELOG.md +6 -0
  277. package/extensions/nostr/package.json +1 -1
  278. package/extensions/open-prose/package.json +1 -1
  279. package/extensions/outlook/package.json +1 -1
  280. package/extensions/pipeline/package.json +1 -1
  281. package/extensions/signal/package.json +1 -1
  282. package/extensions/slack/package.json +1 -1
  283. package/extensions/telegram/package.json +1 -1
  284. package/extensions/tlon/package.json +1 -1
  285. package/extensions/twitch/CHANGELOG.md +6 -0
  286. package/extensions/twitch/package.json +1 -1
  287. package/extensions/voice-call/CHANGELOG.md +6 -0
  288. package/extensions/voice-call/package.json +1 -1
  289. package/extensions/whatsapp/package.json +1 -1
  290. package/extensions/zalo/CHANGELOG.md +6 -0
  291. package/extensions/zalo/package.json +1 -1
  292. package/extensions/zalouser/CHANGELOG.md +6 -0
  293. package/extensions/zalouser/package.json +1 -1
  294. package/package.json +1 -1
  295. package/dist/plugin-sdk/web-CmKqZEsX.js +0 -66
@@ -1,77 +1,77 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
- import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CE7eVGHg.js";
2
+ import { c as expandHomePrefix, i as resolveGatewayPort, n as resolveConfigPath, s as resolveStateDir, t as STATE_DIR, u as resolveRequiredHomeDir } from "./paths-CYmyCDsE.js";
3
3
  import { _ as isCronSessionKey, b as resolveThreadParentSessionKey, c as normalizeMainKey, d as sanitizeAgentId, f as DEFAULT_ACCOUNT_ID, g as isAcpSessionKey, h as getSubagentDepth, l as resolveAgentIdFromSessionKey, o as classifySessionKeyShape, p as normalizeAccountId$2, r as buildAgentMainSessionKey, s as normalizeAgentId, t as DEFAULT_AGENT_ID, u as resolveThreadSessionKeys, v as isSubagentSessionKey, y as parseAgentSessionKey } from "./session-key-BCzIW1Y2.js";
4
- import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-DYq1AYOv.js";
5
- import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-CpEJ0B88.js";
6
- import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-BjyjJF-d.js";
7
- import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-DscDraUb.js";
8
- import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-CbQV9WEg.js";
9
- import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-C2vj6htZ.js";
10
- import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-BDXYbTKj.js";
11
- import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-cCYzSU9h.js";
4
+ import { $ as warn, B as sleep$1, D as escapeRegExp, E as ensureDir$3, G as danger, I as resolveUserPath, J as logVerbose, M as normalizeE164, O as formatTerminalLink, R as shortenHomeInString, S as CONFIG_DIR, U as truncateUtf16Safe, V as sliceUtf16Safe, W as isPlainObject, X as setVerbose, Z as shouldLogVerbose, _ as matchPluginCommand, a as normalizeAnyChannelId, d as createPluginRegistry, dt as resolvePreferredSymiTmpDir, et as colorize, f as normalizePluginHttpPath, g as listPluginCommands, h as getPluginCommandSpecs, k as isRecord$1, l as requireActivePluginRegistry, lt as normalizeLogLevel, m as executePluginCommand, n as CHAT_CHANNEL_ORDER, nt as theme, o as normalizeChannelId, p as clearPluginCommands, r as DEFAULT_CHAT_CHANNEL, rt as getChildLogger, tt as isRich, u as setActivePluginRegistry, v as createInternalHookEvent, w as clampInt, x as triggerInternalHook, z as shortenHomePath } from "./registry-X6fUE0K7.js";
5
+ import { a as resolveAgentModelPrimary, c as resolveDefaultAgentId, d as resolveSessionAgentIds, i as resolveAgentModelFallbacksOverride, l as resolveEffectiveModelFallbacks, n as resolveAgentConfig, o as resolveAgentSkillsFilter, r as resolveAgentDir, s as resolveAgentWorkspaceDir, t as listAgentIds, u as resolveSessionAgentId } from "./agent-scope-Cpm7a9ss.js";
6
+ import { a as registerActiveProgressLine, i as clearActiveProgressLine, n as createNonExitingRuntime, o as unregisterActiveProgressLine, r as defaultRuntime, t as createSubsystemLogger } from "./subsystem-CzXhCdeY.js";
7
+ import { S as logWarn, _ as runExec, b as logError, f as loadWorkspaceBootstrapFiles, g as runCommandWithTimeout, i as DEFAULT_IDENTITY_FILENAME, l as ensureAgentWorkspace, m as resolveSymiPackageRoot, n as DEFAULT_AGENT_WORKSPACE_DIR, r as DEFAULT_BOOTSTRAP_FILENAME, u as filterBootstrapFilesForSession, v as spawnWithFallback, x as logInfo, y as logDebug } from "./workspace-CywO4ayZ.js";
8
+ import { i as resolveSessionTranscriptPath, n as resolveSessionFilePath, o as resolveSessionTranscriptsDirForAgent, r as resolveSessionFilePathOptions, s as resolveStorePath, t as resolveDefaultSessionStorePath } from "./paths-DEuVuViW.js";
9
+ import { $ as resolveAuthProfileDisplayLabel, B as resolveApiKeyForProvider, C as normalizeProviderId, D as resolveModelRefFromString, E as resolveDefaultModelForAgent, F as OLLAMA_NATIVE_BASE_URL, G as getShellPathFromLoginShell, H as resolveModelAuthMode, I as createOllamaStreamFn, L as getApiKeyForModel, O as resolveSubagentSpawnModelSelection, Q as DEFAULT_PROVIDER, R as getCustomProviderApiKey, S as normalizeModelRef$2, T as resolveConfiguredModelRef, V as resolveEnvApiKey, W as normalizeSecretInput, X as DEFAULT_CONTEXT_TOKENS, Z as DEFAULT_MODEL, _ as buildConfiguredAllowlistKeys, a as markAuthProfileFailure, b as isCliProvider, c as dedupeProfileIds, d as ensureAuthProfileStore, et as resolveSymiAgentDir, f as resolveAuthStorePathForDisplay, g as buildAllowedModelSet, i as isProfileInCooldown, k as resolveThinkingDefault, l as listProfilesForProvider, n as resolveAuthProfileOrder, o as markAuthProfileUsed, p as withFileLock, q as resolveShellEnvFallbackTimeoutMs, r as getSoonestCooldownExpiry, s as resolveApiKeyForProfile, u as markAuthProfileGood, v as buildModelAliasIndex, x as modelKey, y as findNormalizedProviderValue, z as requireApiKey } from "./auth-profiles-BzB_Exeq.js";
10
+ import { n as formatCliCommand, r as resolveCliName, t as isTruthyEnvValue } from "./env-CB65jmJQ.js";
11
+ import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-B8B2pmph.js";
12
12
  import { t as parseBooleanValue$1 } from "./boolean-CE7i9tBR.js";
13
- import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-D1_Sab0M.js";
14
- import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-BkZ9HOKT.js";
15
- import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-CBCGTsIb.js";
16
- import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-ROtrXlNs.js";
17
- 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-CXxrn_e2.js";
13
+ import { $ as normalizeDeliveryContext, A as isTransientHttpError, At as DEFAULT_UPLOAD_DIR, Bt as expandToolGroups, C as isContextOverflowError, Ct as resolveGroupSessionKey, D as isRateLimitAssistantError, Dt as registerBrowserRoutes, E as isLikelyContextOverflowError, Et as createBrowserRouteContext, F as resolveSandboxContext, Ft as resolveSandboxConfigForAgent, G as updateLastRoute, Gt as compileGlobPatterns, H as loadSessionStore, Ht as normalizeToolName, I as resolveSandboxRuntimeStatus, It as applyOwnerOnlyToolPolicy, J as isCacheEnabled, Jt as ensureSessionHeader, K as updateSessionStore, Kt as matchesAnyGlobPattern, L as extractDeliveryInfo, Lt as buildPluginToolGroups, M as parseImageSizeError, Mt as getBridgeAuthForPort, N as sanitizeUserFacingText, Nt as ensureBrowserControlAuth, O as isRawApiErrorPayload, Ot as resolveBrowserConfig, P as ensureSandboxWorkspaceForSession, Pt as resolveBrowserControlAuth, Q as mergeDeliveryContext, R as parseSessionThreadInfo, Rt as collectExplicitAllowlist, S as isCompactionFailureError, St as deriveSessionMetaPatch, T as isFailoverErrorMessage, Tt as resolveSessionLockMaxHoldFromTimeout, U as readSessionUpdatedAt, Ut as resolveToolProfilePolicy, V as resolveAndPersistSessionFile, Vt as mergeAlsoAllowPolicy, W as recordSessionMetaFromInbound, Wt as stripPluginOnlyAllowlist, X as deliveryContextFromSession, Xt as resolveBootstrapTotalMaxChars, Y as resolveCacheTtlMs$1, Yt as resolveBootstrapMaxChars, Z as deliveryContextKey, Zt as sanitizeGoogleTurnOrdering, _ as formatRawAssistantErrorForUi, _t as resolveFreshSessionTotalTokens, a as isMessagingToolDuplicateNormalized, at as extractToolCallNames, b as isBillingAssistantError, bt as resolveExplicitAgentSessionKey, c as extractToolCallsFromAssistant, ct as hasInterSessionUserProvenance, d as isAntigravityClaude, dt as evaluateSessionFreshness, et as normalizeSessionDeliveryFields, f as isGoogleModelApi, ft as resolveChannelResetConfig, g as formatBillingErrorMessage, gt as DEFAULT_RESET_TRIGGERS, h as formatAssistantErrorText, ht as resolveThreadFlag, it as countToolResults, j as parseImageDimensionError, jt as resolveExistingPathsWithinRoot, k as isTimeoutErrorMessage, kt as resolveProfile, l as extractToolResultId, lt as normalizeInputProvenance, m as classifyFailoverReason, mt as resolveSessionResetType, n as validateGeminiTurns, nt as archiveSessionTranscripts, o as normalizeTextForComparison, ot as INPUT_PROVENANCE_KIND_VALUES, p as BILLING_ERROR_USER_MESSAGE, pt as resolveSessionResetPolicy, q as updateSessionStoreEntry, qt as buildBootstrapContextFiles, r as pickFallbackThinkingLevel, rt as capArrayByJsonBytes, s as sanitizeSessionMessagesImages, st as applyInputProvenanceToUserMessage, t as validateAnthropicTurns, tt as normalizeAccountId$3, u as downgradeOpenAIReasoningBlocks, ut as resolveSessionKey, v as getApiErrorPayloadFingerprint, vt as canonicalizeMainSessionAlias, w as isFailoverAssistantError, wt as acquireSessionWriteLock, x as isCloudCodeAssistFormatError, xt as resolveMainSessionKey, y as isAuthAssistantError, z as appendAssistantMessageToSessionTranscript, zt as expandPolicyWithPluginGroups } from "./pi-embedded-helpers-DwQ9wJeT.js";
14
+ import { A as VERSION, C as getConfigValueAtPath, D as isSafeExecutableValue, E as unsetConfigValueAtPath, O as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, S as unsetConfigOverride, T as setConfigValueAtPath, _ as parseDurationMs, a as writeConfigFile, b as resetConfigOverrides, c as TELEGRAM_COMMAND_NAME_PATTERN, f as isInboundPathAllowed, g as normalizeScpRemoteHost, h as resolveIMessageRemoteAttachmentRoots, i as resolveConfigSnapshotHash, k as resolveAgentMaxConcurrent, l as normalizeTelegramCommandName, m as resolveIMessageAttachmentRoots, n as loadConfig, o as validateConfigObjectWithPlugins, r as readConfigFileSnapshot, u as resolveTelegramCustomCommands, v as validateJsonSchemaValue, w as parseConfigPath, x as setConfigOverride, y as getConfigOverrides } from "./config-C4WnAd-c.js";
15
+ import { a as applyTestPluginDefaults, c as resolveMemorySlotDecision, d as isDangerousHostEnvVarName, i as safeStatSync, n as discoverSymiPlugins, o as normalizePluginsConfig, r as isPathInside, s as resolveEnableState, t as loadPluginManifestRegistry, u as isPathInsideWithRealpath } from "./manifest-registry-BvGv6lp9.js";
16
+ import { C as rawDataToString, O as DEFAULT_AI_SNAPSHOT_MAX_CHARS, T as isSecureWebSocketUrl, x as ensureChromeExtensionRelayServer } from "./chrome-DwXnykXR.js";
17
+ 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-BrYDT4Jr.js";
18
18
  import { n as formatErrorMessage, r as formatUncaughtError } from "./errors-XIsvXeC-.js";
19
- import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-C7CauEK8.js";
19
+ import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-CY7v6vvp.js";
20
20
  import { i as isBlockedHostnameOrIp, o as normalizeHostname, t as SsrFBlockedError } from "./ssrf-DpUUUgkK.js";
21
- import { n as getMediaDir, r as saveMediaBuffer } from "./store-01F_JM7O.js";
22
- 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-BprCy23Z.js";
23
- import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-OlFBYAw8.js";
21
+ import { n as getMediaDir, r as saveMediaBuffer } from "./store-Ceagbc4L.js";
22
+ 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-BV7SCNJP.js";
23
+ import { a as isMarkdownCapableMessageChannel, c as resolveGatewayMessageChannel, d as GATEWAY_CLIENT_MODES, f as GATEWAY_CLIENT_NAMES, i as isInternalMessageChannel, l as resolveMessageChannel, n as isDeliverableMessageChannel, o as listDeliverableMessageChannels, r as isGatewayMessageChannel, s as normalizeMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as GATEWAY_CLIENT_IDS } from "./message-channel-lwVT8QjK.js";
24
24
  import { t as normalizeChatType } from "./chat-type-3FRbbjbq.js";
25
25
  import { n as resolveConversationLabel } from "./conversation-label-Onz2hiJh.js";
26
- import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-BzmbgY7s.js";
27
- import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-BRw8yhIW.js";
28
- import { t as resolveIMessageAccount } from "./accounts-3dCrO3oZ.js";
29
- import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-BuZxOb3B.js";
30
- import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-BKo1T3HF.js";
31
- import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-C0QjmPaf.js";
26
+ import { _ as resolveDiscordAccount, a as normalizeWhatsAppTarget, c as listTelegramAccountIds, d as resolveSlackAccount, g as listEnabledDiscordAccounts, h as createDiscordActionGate, i as isWhatsAppGroupJid, l as resolveTelegramAccount, m as resolveSlackBotToken, n as listChannelPlugins, o as createTelegramActionGate, p as resolveSlackAppToken, r as normalizeChannelId$1, s as listEnabledTelegramAccounts, t as getChannelPlugin, u as resolveTelegramToken, v as normalizeDiscordToken } from "./plugins-v8k1XVOy.js";
27
+ import { a as logoutWeb, i as logWebSelfId, l as readWebSelfId, p as webAuthExists, r as getWebAuthAgeMs, t as resolveWhatsAppAccount } from "./accounts-BsgY6sda.js";
28
+ import { t as resolveIMessageAccount } from "./accounts-wWWkC0JH.js";
29
+ import { n as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-Bsg6r6H7.js";
30
+ import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, o as parseSlackBlocksInput, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-cCTQjuOZ.js";
31
+ import { $ as fetchChannelPermissionsDiscord, A as unpinMessageDiscord, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveTimestampMs, D as pinMessageDiscord, Dt as normalizeChannelSlug, E as listThreadsDiscord, Et as buildChannelKeyCandidates, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as resolveChannelEntryMatchWithFallback, P as fetchChannelInfoDiscord, Q as stripUndefinedFields, R as kickMemberDiscord, S as deleteMessageDiscord, St as resolveDiscordSystemLocation, T as listPinsDiscord, Tt as applyChannelMatchMeta, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendPollDiscord, _t as resolveDiscordShouldRequireMention, a as removeReactionDiscord, at as resolveDiscordChannelId, b as sendWebhookMessageDiscord, bt as formatDiscordReactionEmoji, c as formatDiscordComponentEventText, ct as allowListMatches$1, d as parseDiscordModalCustomId, dt as normalizeDiscordSlug, et as hasAnyGuildPermissionDiscord, f as parseDiscordModalCustomIdForCarbon, ft as resolveDiscordAllowListMatch, g as sendMessageDiscord, gt as resolveDiscordOwnerAllowFrom, h as resolveDiscordModalEntry, ht as resolveDiscordMemberAccessState, i as removeOwnReactionsDiscord, it as parseDiscordTarget, j as addRoleDiscord, k as searchMessagesDiscord, l as parseDiscordComponentCustomId, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordComponentEntry, mt as resolveDiscordGuildEntry, n as fetchReactionsDiscord, nt as createDiscordClient, o as sendDiscordComponentMessage, ot as listDiscordDirectoryGroupsLive, p as readDiscordComponentSpec, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as reactMessageDiscord, rt as createDiscordRestClient, s as createDiscordFormModal, st as listDiscordDirectoryPeersLive, tt as chunkDiscordTextWithMode, u as parseDiscordComponentCustomIdForCarbon, ut as normalizeDiscordAllowList, v as sendStickerDiscord, vt as resolveGroupDmAllow, w as fetchMessageDiscord, wt as fetchDiscord, x as createThreadDiscord, xt as formatDiscordUserTag, y as sendVoiceMessageDiscord, yt as shouldEmitDiscordReactionNotification, z as listGuildChannelsDiscord } from "./send-CSydU49L.js";
32
32
  import { t as emitSessionTranscriptUpdate } from "./transcript-events-BBh3Gsrx.js";
33
- import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-SqqWIT22.js";
34
- import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-B0OUq6RP.js";
35
- import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-BUcR3Meg.js";
33
+ import { i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, r as sanitizeToolResultImages } from "./tool-images-JxNglLSr.js";
34
+ import { C as getGlobalHookRunner, S as parseInlineDirectives$1, _ as normalizeTargetForProvider, a as normalizeOutboundPayloadsForJson, b as MEDIA_TOKEN_RE, c as applyReplyThreading, d as isRenderablePayload, f as shouldSuppressMessagingToolReplies, g as normalizeChannelTargetInput, h as buildTargetResolverSignature, i as normalizeOutboundPayloads, l as filterMessagingToolDuplicates, m as resolveReplyToMode, o as normalizeReplyPayloadsForDelivery, p as createReplyToModeFilterForChannel, r as formatOutboundPayloadLog, s as applyReplyTagsToPayload, t as deliverOutboundPayloads, u as filterMessagingToolMediaDuplicates, v as throwIfAborted, w as initializeGlobalHookRunner, x as splitMediaFromOutput, y as parseReplyDirectives } from "./deliver-SLYAWE19.js";
35
+ import { a as logMessageProcessed, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, i as logLaneEnqueue, l as logWebhookProcessed, m as isDiagnosticsEnabled, o as logMessageQueued, p as emitDiagnosticEvent, r as logLaneDequeue, s as logSessionStateChange, t as diag, u as logWebhookReceived } from "./diagnostic-DTkZsRNM.js";
36
36
  import { r as getDiagnosticSessionState } from "./diagnostic-session-state-Zw87xFym.js";
37
- import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-BuVL0jHI.js";
38
- import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-RXOlh8ar.js";
39
- import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-W0JzCJJM.js";
40
- import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-Bb4it0te.js";
37
+ import { S as ensureSymiModelsJson, _ as stripMinimaxToolCallXml, a as decodeDataUrl, b as stripReasoningTagsFromText, c as extractAssistantText$1, d as extractThinkingFromTaggedText, f as formatReasoningMessage, g as stripDowngradedToolCallText, h as promoteThinkingTagsToBlocks, i as coerceImageModelConfig, l as extractAssistantThinking, m as isAssistantMessage, o as resolveProviderVisionModelFromConfig, p as inferToolMetaFromArgs, r as coerceImageAssistantText, s as minimaxUnderstandImage, u as extractThinkingFromTaggedStream, v as stripThinkingTagsFromText, x as extractTextFromChatContent, y as resolveToolDisplay } from "./image-BHF_fnIp.js";
38
+ import { t as ensurePiAuthJsonFromAuthProfiles } from "./pi-auth-json-Bv1NzJdR.js";
39
+ import { a as isSilentReplyText, i as isSilentReplyPrefixText, n as SILENT_REPLY_TOKEN, r as SYMIPULSE_TOKEN, t as HEARTBEAT_TOKEN } from "./tokens-Bl5R3wPD.js";
40
+ import { $ as isVoiceCompatibleAudio, A as extractTelegramLocation, B as normalizeAllowFromWithStore$1, C as buildTelegramGroupFrom, D as buildTypingThreadParams, E as buildTelegramThreadParams, F as resolveTelegramMediaPlaceholder, G as formatLocationText, H as firstDefined$1, I as resolveTelegramReplyId, J as readChannelAllowFromStore, K as toLocationContext, L as resolveTelegramStreamMode, M as normalizeForwardedContext, N as resolveTelegramForumThreadId, O as describeReplyTarget, P as resolveTelegramGroupAllowFromContext, Q as listPairingChannels, R as resolveTelegramThreadSpec, S as buildSenderName, T as buildTelegramParentPeer, U as isSenderIdAllowed, V as resolveSenderAllowMatch, W as mergeAllowFromSources, X as upsertChannelPairingRequest, Y as removeChannelAllowFromStoreEntry, Z as getPairingAdapter, _ as resolveTelegramFetch, a as reactMessageTelegram, b as buildGroupLabel, c as sendStickerTelegram, d as wasSentByBot, et as parseTelegramTarget, f as isRecoverableTelegramNetworkError, g as wrapFileReferencesInHtml, h as renderTelegramHtmlText, i as editMessageTelegram, j as hasBotMention, k as expandTextLinks, m as markdownToTelegramHtml, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramChunks, q as addChannelAllowFromStoreEntry, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, tt as resolveTelegramTargetChatType, u as resolveTelegramVoiceSend, v as splitTelegramCaption, w as buildTelegramGroupPeerId, x as buildSenderLabel, y as withTelegramApiErrorLogging, z as isSenderAllowed$1 } from "./send-BTfqlrYd.js";
41
41
  import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-CuZX_Q4t.js";
42
- import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CvEIl6_d.js";
43
- import { a as resolveMemorySearchConfig, i as resolveOllamaBaseUrl, r as probeOllamaEmbeddingModels, t as MemoryIndexManager } from "./manager-_RGWWymD.js";
44
- import { c as normalizeExtraMemoryPaths, f as runTasksWithConcurrency, s as listMemoryFiles } from "./internal-DjnxpF_K.js";
45
- import { n as retryAsync } from "./retry-B-y5suGA.js";
46
- import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-DeJTztcq.js";
47
- import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-BRe1o4Af.js";
48
- import { n as resolveMarkdownTableMode } from "./markdown-tables-x2Xe2UXh.js";
42
+ import { a as resolveAgentIdentity, i as resolveAckReaction, o as resolveEffectiveMessagesConfig, r as resolveResponsePrefixTemplate, s as resolveHumanDelayConfig, t as createReplyPrefixOptions } from "./reply-prefix-CI_IdwqH.js";
43
+ import { a as resolveMemorySearchConfig, i as resolveOllamaBaseUrl, r as probeOllamaEmbeddingModels, t as MemoryIndexManager } from "./manager-DxCmjSfP.js";
44
+ import { c as normalizeExtraMemoryPaths, f as runTasksWithConcurrency, s as listMemoryFiles } from "./internal-FNqguZSK.js";
45
+ import { n as retryAsync } from "./retry-4oEAHckB.js";
46
+ import { a as createActionGate, c as jsonResult, d as readReactionParams, f as readStringArrayParam, l as parseAvailableTags, m as readStringParam, n as missingTargetError, o as imageResult, p as readStringOrNumberParam, r as unknownTargetError, s as imageResultFromFile, t as ambiguousTargetError, u as readNumberParam } from "./target-errors-uNitqCCT.js";
47
+ import { a as chunkText, c as resolveChunkMode, d as isSafeFenceBreak, f as parseFenceSpans, i as chunkMarkdownTextWithMode, l as resolveTextChunkLimit, o as chunkTextWithMode, r as chunkMarkdownText, t as chunkByNewline, u as findFenceSpanAt } from "./chunk-BcxcL1U3.js";
48
+ import { n as resolveMarkdownTableMode } from "./markdown-tables-CE-qSMGB.js";
49
49
  import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-CVCBkyv1.js";
50
- import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-ClipCZ9s.js";
51
- import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-7tMVY7D_.js";
52
- import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-DxbSTLNQ.js";
53
- import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-ecX1WzDt.js";
54
- import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-DG2lcozb.js";
50
+ import { a as readResponseWithLimit, i as fetchRemoteMedia, n as getDefaultMediaLocalRoots, o as fetchWithSsrFGuard, t as getAgentScopedMediaLocalRoots } from "./local-roots-tcdaIEhh.js";
51
+ import { a as loadWebMedia, i as getDefaultLocalRoots } from "./ir-D6MiJpAy.js";
52
+ import { _ as resolveNativeCommandsEnabled, a as listChatCommandsForConfig, c as normalizeCommandBody, d as resolveCommandArgMenu, f as serializeCommandArgs, g as isRestartEnabled, h as isNativeCommandsExplicitlyDisabled, i as listChatCommands, l as parseCommandArgs, m as isCommandFlagEnabled, o as listNativeCommandSpecs, p as shouldHandleTextCommands, r as findCommandByNativeName, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as resolveCommandArgChoices, v as resolveNativeSkillsEnabled } from "./commands-registry-ByGkL6hs.js";
53
+ import { _ as CLI_OUTPUT_MAX_BUFFER, a as resolveMediaAttachmentLocalRoots, c as loadModelCatalog, d as resolveAttachmentKind, f as buildRandomTempFilePath, g as resolveMediaUnderstandingScope, h as normalizeMediaUnderstandingChatType, i as resolveAutoImageModel, l as modelSupportsVision, m as resolveTimeoutMs$1, n as createMediaAttachmentCache, o as runCapability, p as resolveConcurrency, r as normalizeMediaAttachments, s as findModelInCatalog, t as buildProviderRegistry, v as applyTemplate, y as registerUnhandledRejectionHandler } from "./runner-B5oNTtgf.js";
54
+ import { c as getSkillsSnapshotVersion, d as createAsyncLock, f as readJsonFile, i as resolveSkillCommandInvocation, l as pruneExpiredPending, n as listSkillCommandsForAgents, o as getRemoteSkillEligibility, p as writeJsonAtomic, r as listSkillCommandsForWorkspace, s as ensureSkillsWatcher, t as listReservedChatSlashCommandNames, u as resolvePairingPaths } from "./skill-commands-BcOduw6G.js";
55
55
  import { r as normalizeInboundTextNewlines, t as finalizeInboundContext } from "./inbound-context-DZQU0r3y.js";
56
56
  import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-ClslA6GS.js";
57
57
  import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-q0xAK3nQ.js";
58
- import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-D8QD7GoV.js";
58
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-CzHaIUAp.js";
59
59
  import { n as normalizePollInput } from "./polls-Kt7OzYCK.js";
60
- import { t as convertMarkdownTables } from "./tables-DoG-pFrf.js";
61
- import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-Cpk3Ti6-.js";
62
- import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-DFtnbzqy.js";
63
- import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-Jy5dFY67.js";
60
+ import { t as convertMarkdownTables } from "./tables-qbCoZrYA.js";
61
+ import { a as resolveSignalRpcContext, c as streamSignalEvents, n as sendReadReceiptSignal, o as signalCheck, r as sendTypingSignal, s as signalRpcRequest, t as sendMessageSignal } from "./send-Du-IfSne.js";
62
+ import { a as formatIMessageChatTarget, c as parseIMessageTarget, i as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, o as isAllowedIMessageSender, r as createIMessageRpcClient, s as normalizeIMessageHandle, t as sendMessageIMessage } from "./send-ASDB3AzC.js";
63
+ import { n as resolveAgentRoute, t as buildAgentSessionKey } from "./resolve-route-BgSuN9c6.js";
64
64
  import { t as makeProxyFetch } from "./proxy-d9fklNTC.js";
65
- import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-CUWXgyx2.js";
66
- import { t as getActiveWebListener } from "./active-listener-BVZOh2T1.js";
65
+ import { a as createReplyReferencePlanner, i as resolveSlackThreadTs, n as deliverReplies$3, t as createSlackReplyDeliveryPlan } from "./replies-86F3PldM.js";
66
+ import { t as getActiveWebListener } from "./active-listener-AVNn5_U9.js";
67
67
  import { createRequire } from "node:module";
68
68
  import * as path$1 from "node:path";
69
69
  import path from "node:path";
70
- import fs, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
70
+ import fsSync, { existsSync, mkdirSync, mkdtempSync, readFileSync, renameSync, rmSync, statSync, unlinkSync, writeFileSync } from "node:fs";
71
71
  import os, { homedir } from "node:os";
72
- import JSON5 from "json5";
73
- import * as fs$2 from "node:fs/promises";
74
- import fs$1 from "node:fs/promises";
72
+ import json5 from "json5";
73
+ import * as fs$1 from "node:fs/promises";
74
+ import fs from "node:fs/promises";
75
75
  import { execFile, execFileSync, spawn, spawnSync } from "node:child_process";
76
76
  import { inspect, promisify } from "node:util";
77
77
  import { fileURLToPath } from "node:url";
@@ -4010,7 +4010,7 @@ async function resolveSymiDocsPath(params) {
4010
4010
  const workspaceDir = params.workspaceDir?.trim();
4011
4011
  if (workspaceDir) {
4012
4012
  const workspaceDocs = path.join(workspaceDir, "docs");
4013
- if (fs.existsSync(workspaceDocs)) return workspaceDocs;
4013
+ if (fsSync.existsSync(workspaceDocs)) return workspaceDocs;
4014
4014
  }
4015
4015
  const packageRoot = await resolveSymiPackageRoot({
4016
4016
  cwd: params.cwd,
@@ -4019,7 +4019,7 @@ async function resolveSymiDocsPath(params) {
4019
4019
  });
4020
4020
  if (!packageRoot) return null;
4021
4021
  const packageDocs = path.join(packageRoot, "docs");
4022
- return fs.existsSync(packageDocs) ? packageDocs : null;
4022
+ return fsSync.existsSync(packageDocs) ? packageDocs : null;
4023
4023
  }
4024
4024
 
4025
4025
  //#endregion
@@ -4328,7 +4328,7 @@ async function getMemorySearchManager(params) {
4328
4328
  if (cached) return { manager: cached };
4329
4329
  }
4330
4330
  try {
4331
- const { QmdMemoryManager } = await import("./qmd-manager-BXkbA8Y9.js");
4331
+ const { QmdMemoryManager } = await import("./qmd-manager-CbRJhonG.js");
4332
4332
  const primary = await QmdMemoryManager.create({
4333
4333
  cfg: params.cfg,
4334
4334
  agentId: params.agentId,
@@ -4340,7 +4340,7 @@ async function getMemorySearchManager(params) {
4340
4340
  const wrapper = new FallbackMemoryManager({
4341
4341
  primary,
4342
4342
  fallbackFactory: async () => {
4343
- const { MemoryIndexManager } = await import("./manager-_RGWWymD.js").then((n) => n.n);
4343
+ const { MemoryIndexManager } = await import("./manager-DxCmjSfP.js").then((n) => n.n);
4344
4344
  return await MemoryIndexManager.get(params);
4345
4345
  }
4346
4346
  }, () => QMD_MANAGER_CACHE.delete(cacheKey));
@@ -4353,7 +4353,7 @@ async function getMemorySearchManager(params) {
4353
4353
  }
4354
4354
  }
4355
4355
  try {
4356
- const { MemoryIndexManager } = await import("./manager-_RGWWymD.js").then((n) => n.n);
4356
+ const { MemoryIndexManager } = await import("./manager-DxCmjSfP.js").then((n) => n.n);
4357
4357
  return { manager: await MemoryIndexManager.get(params) };
4358
4358
  } catch (err) {
4359
4359
  return {
@@ -7027,7 +7027,7 @@ async function recordLoopOutcome(args) {
7027
7027
  if (!args.ctx?.sessionKey) return;
7028
7028
  try {
7029
7029
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
7030
- const { recordToolCallOutcome } = await import("./tool-loop-detection-Dj9h1ogr.js");
7030
+ const { recordToolCallOutcome } = await import("./tool-loop-detection-dfE771kg.js");
7031
7031
  recordToolCallOutcome(getDiagnosticSessionState({
7032
7032
  sessionKey: args.ctx.sessionKey,
7033
7033
  sessionId: args.ctx?.agentId
@@ -7048,8 +7048,8 @@ async function runBeforeToolCallHook(args) {
7048
7048
  const params = args.params;
7049
7049
  if (args.ctx?.sessionKey) {
7050
7050
  const { getDiagnosticSessionState } = await import("./diagnostic-session-state-Zw87xFym.js").then((n) => n.n);
7051
- const { logToolLoopAction } = await import("./diagnostic-BUcR3Meg.js").then((n) => n.n);
7052
- const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-Dj9h1ogr.js");
7051
+ const { logToolLoopAction } = await import("./diagnostic-DTkZsRNM.js").then((n) => n.n);
7052
+ const { detectToolCallLoop, recordToolCall } = await import("./tool-loop-detection-dfE771kg.js");
7053
7053
  const sessionState = getDiagnosticSessionState({
7054
7054
  sessionKey: args.ctx.sessionKey,
7055
7055
  sessionId: args.ctx?.agentId
@@ -7336,7 +7336,7 @@ function resolveDefaultIdentityPath() {
7336
7336
  return path.join(resolveStateDir(), "identity", "device.json");
7337
7337
  }
7338
7338
  function ensureDir$2(filePath) {
7339
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
7339
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
7340
7340
  }
7341
7341
  const ED25519_SPKI_PREFIX = Buffer.from("302a300506032b6570032100", "hex");
7342
7342
  function base64UrlEncode(buf) {
@@ -7372,8 +7372,8 @@ function generateIdentity() {
7372
7372
  }
7373
7373
  function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7374
7374
  try {
7375
- if (fs.existsSync(filePath)) {
7376
- const raw = fs.readFileSync(filePath, "utf8");
7375
+ if (fsSync.existsSync(filePath)) {
7376
+ const raw = fsSync.readFileSync(filePath, "utf8");
7377
7377
  const parsed = JSON.parse(raw);
7378
7378
  if (parsed?.version === 1 && typeof parsed.deviceId === "string" && typeof parsed.publicKeyPem === "string" && typeof parsed.privateKeyPem === "string") {
7379
7379
  const derivedId = fingerprintPublicKey(parsed.publicKeyPem);
@@ -7382,9 +7382,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7382
7382
  ...parsed,
7383
7383
  deviceId: derivedId
7384
7384
  };
7385
- fs.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
7385
+ fsSync.writeFileSync(filePath, `${JSON.stringify(updated, null, 2)}\n`, { mode: 384 });
7386
7386
  try {
7387
- fs.chmodSync(filePath, 384);
7387
+ fsSync.chmodSync(filePath, 384);
7388
7388
  } catch {}
7389
7389
  return {
7390
7390
  deviceId: derivedId,
@@ -7409,9 +7409,9 @@ function loadOrCreateDeviceIdentity(filePath = resolveDefaultIdentityPath()) {
7409
7409
  privateKeyPem: identity.privateKeyPem,
7410
7410
  createdAtMs: Date.now()
7411
7411
  };
7412
- fs.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
7412
+ fsSync.writeFileSync(filePath, `${JSON.stringify(stored, null, 2)}\n`, { mode: 384 });
7413
7413
  try {
7414
- fs.chmodSync(filePath, 384);
7414
+ fsSync.chmodSync(filePath, 384);
7415
7415
  } catch {}
7416
7416
  return identity;
7417
7417
  }
@@ -7434,7 +7434,7 @@ function normalizeFingerprint(input) {
7434
7434
  const execFileAsync = promisify(execFile);
7435
7435
  async function fileExists(filePath) {
7436
7436
  try {
7437
- await fs$1.access(filePath);
7437
+ await fs.access(filePath);
7438
7438
  return true;
7439
7439
  } catch {
7440
7440
  return false;
@@ -7461,8 +7461,8 @@ async function generateSelfSignedCert(params) {
7461
7461
  "-subj",
7462
7462
  "/CN=symi-gateway"
7463
7463
  ]);
7464
- await fs$1.chmod(params.keyPath, 384).catch(() => {});
7465
- await fs$1.chmod(params.certPath, 384).catch(() => {});
7464
+ await fs.chmod(params.keyPath, 384).catch(() => {});
7465
+ await fs.chmod(params.certPath, 384).catch(() => {});
7466
7466
  params.log?.info?.(`gateway tls: generated self-signed cert at ${shortenHomeInString(params.certPath)}`);
7467
7467
  }
7468
7468
  async function loadGatewayTlsRuntime(cfg, log) {
@@ -7500,9 +7500,9 @@ async function loadGatewayTlsRuntime(cfg, log) {
7500
7500
  error: "gateway tls: cert/key missing"
7501
7501
  };
7502
7502
  try {
7503
- const cert = await fs$1.readFile(certPath, "utf8");
7504
- const key = await fs$1.readFile(keyPath, "utf8");
7505
- const ca = caPath ? await fs$1.readFile(caPath, "utf8") : void 0;
7503
+ const cert = await fs.readFile(certPath, "utf8");
7504
+ const key = await fs.readFile(keyPath, "utf8");
7505
+ const ca = caPath ? await fs.readFile(caPath, "utf8") : void 0;
7506
7506
  const fingerprintSha256 = normalizeFingerprint(new X509Certificate(cert).fingerprint256 ?? "");
7507
7507
  if (!fingerprintSha256) return {
7508
7508
  enabled: false,
@@ -7561,8 +7561,8 @@ function resolveDeviceAuthPath(env = process.env) {
7561
7561
  }
7562
7562
  function readStore(filePath) {
7563
7563
  try {
7564
- if (!fs.existsSync(filePath)) return null;
7565
- const raw = fs.readFileSync(filePath, "utf8");
7564
+ if (!fsSync.existsSync(filePath)) return null;
7565
+ const raw = fsSync.readFileSync(filePath, "utf8");
7566
7566
  const parsed = JSON.parse(raw);
7567
7567
  if (parsed?.version !== 1 || typeof parsed.deviceId !== "string") return null;
7568
7568
  if (!parsed.tokens || typeof parsed.tokens !== "object") return null;
@@ -7572,10 +7572,10 @@ function readStore(filePath) {
7572
7572
  }
7573
7573
  }
7574
7574
  function writeStore(filePath, store) {
7575
- fs.mkdirSync(path.dirname(filePath), { recursive: true });
7576
- fs.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
7575
+ fsSync.mkdirSync(path.dirname(filePath), { recursive: true });
7576
+ fsSync.writeFileSync(filePath, `${JSON.stringify(store, null, 2)}\n`, { mode: 384 });
7577
7577
  try {
7578
- fs.chmodSync(filePath, 384);
7578
+ fsSync.chmodSync(filePath, 384);
7579
7579
  } catch {}
7580
7580
  }
7581
7581
  function loadDeviceAuthToken(params) {
@@ -10380,7 +10380,7 @@ async function routeReply(params) {
10380
10380
  const resolvedReplyToId = replyToId ?? (channelId === "slack" && threadId != null && threadId !== "" ? String(threadId) : void 0);
10381
10381
  const resolvedThreadId = channelId === "slack" ? null : threadId ?? null;
10382
10382
  try {
10383
- const { deliverOutboundPayloads } = await import("./deliver-B0OUq6RP.js").then((n) => n.n);
10383
+ const { deliverOutboundPayloads } = await import("./deliver-SLYAWE19.js").then((n) => n.n);
10384
10384
  return {
10385
10385
  ok: true,
10386
10386
  messageId: (await deliverOutboundPayloads({
@@ -10776,8 +10776,8 @@ function normalizeSessionKey(value) {
10776
10776
  }
10777
10777
  function readSessionStore(storePath) {
10778
10778
  try {
10779
- const raw = fs.readFileSync(storePath, "utf-8");
10780
- const parsed = JSON5.parse(raw);
10779
+ const raw = fsSync.readFileSync(storePath, "utf-8");
10780
+ const parsed = json5.parse(raw);
10781
10781
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) return parsed;
10782
10782
  } catch {}
10783
10783
  return {};
@@ -15835,7 +15835,7 @@ async function createModelSelectionState(params) {
15835
15835
  }
15836
15836
  }
15837
15837
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
15838
- const { ensureAuthProfileStore } = await import("./auth-profiles-C2vj6htZ.js").then((n) => n.t);
15838
+ const { ensureAuthProfileStore } = await import("./auth-profiles-BzB_Exeq.js").then((n) => n.t);
15839
15839
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
15840
15840
  const providerKey = normalizeProviderId(provider);
15841
15841
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -18208,8 +18208,8 @@ const DEFAULT_SAFE_BINS = [
18208
18208
  ];
18209
18209
  function isExecutableFile(filePath) {
18210
18210
  try {
18211
- if (!fs.statSync(filePath).isFile()) return false;
18212
- if (process.platform !== "win32") fs.accessSync(filePath, fs.constants.X_OK);
18211
+ if (!fsSync.statSync(filePath).isFile()) return false;
18212
+ if (process.platform !== "win32") fsSync.accessSync(filePath, fsSync.constants.X_OK);
18213
18213
  return true;
18214
18214
  } catch {
18215
18215
  return false;
@@ -18247,7 +18247,7 @@ function normalizeMatchTarget(value) {
18247
18247
  }
18248
18248
  function tryRealpath(value) {
18249
18249
  try {
18250
- return fs.realpathSync(value);
18250
+ return fsSync.realpathSync(value);
18251
18251
  } catch {
18252
18252
  return null;
18253
18253
  }
@@ -19479,7 +19479,7 @@ function mergeLegacyAgent(current, legacy) {
19479
19479
  }
19480
19480
  function ensureDir$1(filePath) {
19481
19481
  const dir = path.dirname(filePath);
19482
- fs.mkdirSync(dir, { recursive: true });
19482
+ fsSync.mkdirSync(dir, { recursive: true });
19483
19483
  }
19484
19484
  function coerceAllowlistEntries(allowlist) {
19485
19485
  if (!Array.isArray(allowlist) || allowlist.length === 0) return Array.isArray(allowlist) ? allowlist : void 0;
@@ -19549,11 +19549,11 @@ function generateToken() {
19549
19549
  function loadExecApprovals() {
19550
19550
  const filePath = resolveExecApprovalsPath();
19551
19551
  try {
19552
- if (!fs.existsSync(filePath)) return normalizeExecApprovals({
19552
+ if (!fsSync.existsSync(filePath)) return normalizeExecApprovals({
19553
19553
  version: 1,
19554
19554
  agents: {}
19555
19555
  });
19556
- const raw = fs.readFileSync(filePath, "utf8");
19556
+ const raw = fsSync.readFileSync(filePath, "utf8");
19557
19557
  const parsed = JSON.parse(raw);
19558
19558
  if (parsed?.version !== 1) return normalizeExecApprovals({
19559
19559
  version: 1,
@@ -19570,9 +19570,9 @@ function loadExecApprovals() {
19570
19570
  function saveExecApprovals(file) {
19571
19571
  const filePath = resolveExecApprovalsPath();
19572
19572
  ensureDir$1(filePath);
19573
- fs.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19573
+ fsSync.writeFileSync(filePath, `${JSON.stringify(file, null, 2)}\n`, { mode: 384 });
19574
19574
  try {
19575
- fs.chmodSync(filePath, 384);
19575
+ fsSync.chmodSync(filePath, 384);
19576
19576
  } catch {}
19577
19577
  }
19578
19578
  function ensureExecApprovals() {
@@ -19893,7 +19893,7 @@ function resolvePowerShellPath() {
19893
19893
  const systemRoot = process.env.SystemRoot || process.env.WINDIR;
19894
19894
  if (systemRoot) {
19895
19895
  const candidate = path.join(systemRoot, "System32", "WindowsPowerShell", "v1.0", "powershell.exe");
19896
- if (fs.existsSync(candidate)) return candidate;
19896
+ if (fsSync.existsSync(candidate)) return candidate;
19897
19897
  }
19898
19898
  return "powershell.exe";
19899
19899
  }
@@ -19931,7 +19931,7 @@ function resolveShellFromPath(name) {
19931
19931
  for (const entry of entries) {
19932
19932
  const candidate = path.join(entry, name);
19933
19933
  try {
19934
- fs.accessSync(candidate, fs.constants.X_OK);
19934
+ fsSync.accessSync(candidate, fsSync.constants.X_OK);
19935
19935
  return candidate;
19936
19936
  } catch {}
19937
19937
  }
@@ -20679,7 +20679,7 @@ async function resolveSandboxWorkdir(params) {
20679
20679
  cwd: process.cwd(),
20680
20680
  root: params.sandbox.workspaceDir
20681
20681
  });
20682
- if (!(await fs$1.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
20682
+ if (!(await fs.stat(resolved.resolved)).isDirectory()) throw new Error("workdir is not a directory");
20683
20683
  const relative = resolved.relative ? resolved.relative.split(path.sep).join(path.posix.sep) : "";
20684
20684
  const containerWorkdir = relative ? path.posix.join(params.sandbox.containerWorkdir, relative) : params.sandbox.containerWorkdir;
20685
20685
  return {
@@ -20694,7 +20694,7 @@ async function resolveSandboxWorkdir(params) {
20694
20694
  };
20695
20695
  }
20696
20696
  }
20697
- function resolveWorkdir(workdir, warnings) {
20697
+ function resolveWorkdir$1(workdir, warnings) {
20698
20698
  const fallback = safeCwd() ?? homedir();
20699
20699
  try {
20700
20700
  if (statSync(workdir).isDirectory()) return workdir;
@@ -21730,13 +21730,13 @@ async function validateScriptFileForShellBleed(params) {
21730
21730
  cwd: params.workdir,
21731
21731
  root: params.workdir
21732
21732
  });
21733
- stat = await fs$1.stat(absPath);
21733
+ stat = await fs.stat(absPath);
21734
21734
  } catch {
21735
21735
  return;
21736
21736
  }
21737
21737
  if (!stat.isFile()) return;
21738
21738
  if (stat.size > 512 * 1024) return;
21739
- const content = await fs$1.readFile(absPath, "utf-8");
21739
+ const content = await fs.readFile(absPath, "utf-8");
21740
21740
  const first = /\$[A-Z_][A-Z0-9_]{1,}/g.exec(content);
21741
21741
  if (first) {
21742
21742
  const idx = first.index;
@@ -21836,7 +21836,7 @@ function createExecTool(defaults) {
21836
21836
  });
21837
21837
  workdir = resolved.hostWorkdir;
21838
21838
  containerWorkdir = resolved.containerWorkdir;
21839
- } else workdir = resolveWorkdir(rawWorkdir, warnings);
21839
+ } else workdir = resolveWorkdir$1(rawWorkdir, warnings);
21840
21840
  const baseEnv = coerceEnv(process.env);
21841
21841
  if (host !== "sandbox" && params.env) validateHostEnv(params.env);
21842
21842
  const mergedEnv = params.env ? {
@@ -22987,7 +22987,7 @@ function walkUpFrom(startDir, opts, resolveAtDir) {
22987
22987
  function hasGitMarker(repoRoot) {
22988
22988
  const gitPath = path.join(repoRoot, ".git");
22989
22989
  try {
22990
- const stat = fs.statSync(gitPath);
22990
+ const stat = fsSync.statSync(gitPath);
22991
22991
  return stat.isDirectory() || stat.isFile();
22992
22992
  } catch {
22993
22993
  return false;
@@ -22999,10 +22999,10 @@ function findGitRoot(startDir, opts = {}) {
22999
22999
  function resolveGitDirFromMarker(repoRoot) {
23000
23000
  const gitPath = path.join(repoRoot, ".git");
23001
23001
  try {
23002
- const stat = fs.statSync(gitPath);
23002
+ const stat = fsSync.statSync(gitPath);
23003
23003
  if (stat.isDirectory()) return gitPath;
23004
23004
  if (!stat.isFile()) return null;
23005
- const match = fs.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
23005
+ const match = fsSync.readFileSync(gitPath, "utf-8").match(/gitdir:\s*(.+)/i);
23006
23006
  if (!match?.[1]) return null;
23007
23007
  return path.resolve(repoRoot, match[1].trim());
23008
23008
  } catch {
@@ -23069,7 +23069,7 @@ const resolveCommitHash = (options = {}) => {
23069
23069
  cachedCommit = null;
23070
23070
  return cachedCommit;
23071
23071
  }
23072
- const head = fs.readFileSync(headPath, "utf-8").trim();
23072
+ const head = fsSync.readFileSync(headPath, "utf-8").trim();
23073
23073
  if (!head) {
23074
23074
  cachedCommit = null;
23075
23075
  return cachedCommit;
@@ -23077,7 +23077,7 @@ const resolveCommitHash = (options = {}) => {
23077
23077
  if (head.startsWith("ref:")) {
23078
23078
  const ref = head.replace(/^ref:\s*/i, "").trim();
23079
23079
  const refPath = path.resolve(path.dirname(headPath), ref);
23080
- cachedCommit = formatCommit(fs.readFileSync(refPath, "utf-8").trim());
23080
+ cachedCommit = formatCommit(fsSync.readFileSync(refPath, "utf-8").trim());
23081
23081
  return cachedCommit;
23082
23082
  }
23083
23083
  cachedCommit = formatCommit(head);
@@ -23281,9 +23281,9 @@ const readUsageFromSessionLog = (sessionId, sessionEntry, agentId, sessionKey, s
23281
23281
  } catch {
23282
23282
  return;
23283
23283
  }
23284
- if (!fs.existsSync(logPath)) return;
23284
+ if (!fsSync.existsSync(logPath)) return;
23285
23285
  try {
23286
- const lines = fs.readFileSync(logPath, "utf-8").split(/\n+/);
23286
+ const lines = fsSync.readFileSync(logPath, "utf-8").split(/\n+/);
23287
23287
  let input = 0;
23288
23288
  let output = 0;
23289
23289
  let promptTokens = 0;
@@ -24523,7 +24523,7 @@ function resolveRepoRoot(params) {
24523
24523
  const configured = params.config?.agents?.defaults?.repoRoot?.trim();
24524
24524
  if (configured) try {
24525
24525
  const resolved = path.resolve(configured);
24526
- if (fs.statSync(resolved).isDirectory()) return resolved;
24526
+ if (fsSync.statSync(resolved).isDirectory()) return resolved;
24527
24527
  } catch {}
24528
24528
  const candidates = [params.workspaceDir, params.cwd].map((value) => value?.trim()).filter(Boolean);
24529
24529
  const seen = /* @__PURE__ */ new Set();
@@ -24842,7 +24842,7 @@ async function buildContextReply(params) {
24842
24842
  //#region src/auto-reply/reply/commands-export-session.ts
24843
24843
  const EXPORT_HTML_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "export-html");
24844
24844
  function loadTemplate(fileName) {
24845
- return fs.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24845
+ return fsSync.readFileSync(path.join(EXPORT_HTML_DIR, fileName), "utf-8");
24846
24846
  }
24847
24847
  function generateHtml(sessionData) {
24848
24848
  const template = loadTemplate("template.html");
@@ -24916,7 +24916,7 @@ async function buildExportSessionReply(params) {
24916
24916
  } catch (err) {
24917
24917
  return { text: `❌ Failed to resolve session file: ${err instanceof Error ? err.message : String(err)}` };
24918
24918
  }
24919
- if (!fs.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24919
+ if (!fsSync.existsSync(sessionFile)) return { text: `❌ Session file not found: ${sessionFile}` };
24920
24920
  const sessionManager = SessionManager.open(sessionFile);
24921
24921
  const entries = sessionManager.getEntries();
24922
24922
  const header = sessionManager.getHeader();
@@ -24937,8 +24937,8 @@ async function buildExportSessionReply(params) {
24937
24937
  const defaultFileName = `symi-session-${entry.sessionId.slice(0, 8)}-${timestamp}.html`;
24938
24938
  const outputPath = args.outputPath ? path.resolve(args.outputPath.startsWith("~") ? args.outputPath.replace("~", process.env.HOME ?? "") : args.outputPath) : path.join(params.workspaceDir, defaultFileName);
24939
24939
  const outputDir = path.dirname(outputPath);
24940
- if (!fs.existsSync(outputDir)) fs.mkdirSync(outputDir, { recursive: true });
24941
- fs.writeFileSync(outputPath, html, "utf-8");
24940
+ if (!fsSync.existsSync(outputDir)) fsSync.mkdirSync(outputDir, { recursive: true });
24941
+ fsSync.writeFileSync(outputPath, html, "utf-8");
24942
24942
  const relativePath = path.relative(params.workspaceDir, outputPath);
24943
24943
  return { text: [
24944
24944
  "✅ Session exported!",
@@ -25052,8 +25052,8 @@ function resolveZaiApiKey() {
25052
25052
  }
25053
25053
  try {
25054
25054
  const authPath = path.join(os.homedir(), ".pi", "agent", "auth.json");
25055
- if (!fs.existsSync(authPath)) return;
25056
- const data = JSON.parse(fs.readFileSync(authPath, "utf-8"));
25055
+ if (!fsSync.existsSync(authPath)) return;
25056
+ const data = JSON.parse(fsSync.readFileSync(authPath, "utf-8"));
25057
25057
  return data["z-ai"]?.access || data.zai?.access;
25058
25058
  } catch {
25059
25059
  return;
@@ -26618,7 +26618,7 @@ function shouldPersistAnyBindingState() {
26618
26618
  }
26619
26619
  function shouldPersistBindingMutations() {
26620
26620
  if (shouldPersistAnyBindingState()) return true;
26621
- return fs.existsSync(resolveThreadBindingsPath());
26621
+ return fsSync.existsSync(resolveThreadBindingsPath());
26622
26622
  }
26623
26623
  function saveBindingsToDisk(params = {}) {
26624
26624
  if (!params.force && !shouldPersistAnyBindingState()) return;
@@ -27606,7 +27606,7 @@ const applyCostTotal = (totals, costTotal) => {
27606
27606
  totals.totalCost += costTotal;
27607
27607
  };
27608
27608
  async function* readJsonlRecords(filePath) {
27609
- const fileStream = fs.createReadStream(filePath, { encoding: "utf-8" });
27609
+ const fileStream = fsSync.createReadStream(filePath, { encoding: "utf-8" });
27610
27610
  const rl = readline.createInterface({
27611
27611
  input: fileStream,
27612
27612
  crlfDelay: Infinity
@@ -27678,10 +27678,10 @@ async function loadCostUsageSummary(params) {
27678
27678
  const dailyMap = /* @__PURE__ */ new Map();
27679
27679
  const totals = emptyTotals();
27680
27680
  const sessionsDir = resolveSessionTranscriptsDirForAgent(params?.agentId);
27681
- const entries = await fs.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
27681
+ const entries = await fsSync.promises.readdir(sessionsDir, { withFileTypes: true }).catch(() => []);
27682
27682
  const files = (await Promise.all(entries.filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).map(async (entry) => {
27683
27683
  const filePath = path.join(sessionsDir, entry.name);
27684
- const stats = await fs.promises.stat(filePath).catch(() => null);
27684
+ const stats = await fsSync.promises.stat(filePath).catch(() => null);
27685
27685
  if (!stats) return null;
27686
27686
  if (stats.mtimeMs < sinceTime) return null;
27687
27687
  return filePath;
@@ -27714,7 +27714,7 @@ async function loadCostUsageSummary(params) {
27714
27714
  }
27715
27715
  async function loadSessionCostSummary(params) {
27716
27716
  const sessionFile = params.sessionFile ?? (params.sessionId ? resolveSessionFilePath(params.sessionId, params.sessionEntry, { agentId: params.agentId }) : void 0);
27717
- if (!sessionFile || !fs.existsSync(sessionFile)) return null;
27717
+ if (!sessionFile || !fsSync.existsSync(sessionFile)) return null;
27718
27718
  const totals = emptyTotals();
27719
27719
  let firstActivity;
27720
27720
  let lastActivity;
@@ -29586,7 +29586,7 @@ async function handleCommands(params) {
29586
29586
  try {
29587
29587
  const messages = [];
29588
29588
  if (sessionFile) {
29589
- const content = await fs$1.readFile(sessionFile, "utf-8");
29589
+ const content = await fs.readFile(sessionFile, "utf-8");
29590
29590
  for (const line of content.split("\n")) {
29591
29591
  if (!line.trim()) continue;
29592
29592
  try {
@@ -31920,7 +31920,7 @@ function asBoolean(value) {
31920
31920
  }
31921
31921
  function resolveTempPathParts(opts) {
31922
31922
  const tmpDir = opts.tmpDir ?? resolvePreferredSymiTmpDir();
31923
- if (!opts.tmpDir) fs.mkdirSync(tmpDir, {
31923
+ if (!opts.tmpDir) fsSync.mkdirSync(tmpDir, {
31924
31924
  recursive: true,
31925
31925
  mode: 448
31926
31926
  });
@@ -31986,7 +31986,7 @@ async function writeUrlToFile(filePath, url) {
31986
31986
  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}`);
31987
31987
  const body = res.body;
31988
31988
  if (!body) throw new Error(`failed to download ${url}: empty response body`);
31989
- const fileHandle = await fs$2.open(filePath, "w");
31989
+ const fileHandle = await fs$1.open(filePath, "w");
31990
31990
  let bytes = 0;
31991
31991
  let thrown;
31992
31992
  try {
@@ -32005,7 +32005,7 @@ async function writeUrlToFile(filePath, url) {
32005
32005
  await fileHandle.close();
32006
32006
  }
32007
32007
  if (thrown) {
32008
- await fs$2.unlink(filePath).catch(() => {});
32008
+ await fs$1.unlink(filePath).catch(() => {});
32009
32009
  throw thrown;
32010
32010
  }
32011
32011
  return {
@@ -32015,7 +32015,7 @@ async function writeUrlToFile(filePath, url) {
32015
32015
  }
32016
32016
  async function writeBase64ToFile(filePath, base64) {
32017
32017
  const buf = Buffer.from(base64, "base64");
32018
- await fs$2.writeFile(filePath, buf);
32018
+ await fs$1.writeFile(filePath, buf);
32019
32019
  return {
32020
32020
  path: filePath,
32021
32021
  bytes: buf.length
@@ -32081,7 +32081,7 @@ async function readJsonlFromPath(jsonlPath) {
32081
32081
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${resolved}`);
32082
32082
  throw new Error("jsonlPath outside allowed roots");
32083
32083
  }
32084
- const canonical = await fs$1.realpath(resolved).catch(() => resolved);
32084
+ const canonical = await fs.realpath(resolved).catch(() => resolved);
32085
32085
  if (!isInboundPathAllowed({
32086
32086
  filePath: canonical,
32087
32087
  roots
@@ -32089,7 +32089,7 @@ async function readJsonlFromPath(jsonlPath) {
32089
32089
  if (shouldLogVerbose()) logVerbose(`Blocked canvas jsonlPath outside allowed roots: ${canonical}`);
32090
32090
  throw new Error("jsonlPath outside allowed roots");
32091
32091
  }
32092
- return await fs$1.readFile(canonical, "utf8");
32092
+ return await fs.readFile(canonical, "utf8");
32093
32093
  }
32094
32094
  const CanvasToolSchema = Type.Object({
32095
32095
  action: stringEnum(CANVAS_ACTIONS),
@@ -32893,12 +32893,12 @@ function resolveRestartSentinelPath(env = process.env) {
32893
32893
  }
32894
32894
  async function writeRestartSentinel(payload, env = process.env) {
32895
32895
  const filePath = resolveRestartSentinelPath(env);
32896
- await fs$1.mkdir(path.dirname(filePath), { recursive: true });
32896
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
32897
32897
  const data = {
32898
32898
  version: 1,
32899
32899
  payload
32900
32900
  };
32901
- await fs$1.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
32901
+ await fs.writeFile(filePath, `${JSON.stringify(data, null, 2)}\n`, "utf-8");
32902
32902
  return filePath;
32903
32903
  }
32904
32904
 
@@ -33713,7 +33713,7 @@ async function hydrateAttachmentPayload(params) {
33713
33713
  accountId: params.accountId
33714
33714
  }),
33715
33715
  sandboxValidated: true,
33716
- readFile: (filePath) => fs$1.readFile(filePath)
33716
+ readFile: (filePath) => fs.readFile(filePath)
33717
33717
  });
33718
33718
  params.args.buffer = media.buffer.toString("base64");
33719
33719
  if (!contentTypeParam && media.contentType) params.args.contentType = media.contentType;
@@ -36998,7 +36998,7 @@ function listExistingAgentIdsFromDisk() {
36998
36998
  const root = resolveStateDir();
36999
36999
  const agentsDir = path.join(root, "agents");
37000
37000
  try {
37001
- return fs.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
37001
+ return fsSync.readdirSync(agentsDir, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => normalizeAgentId(entry.name)).filter(Boolean);
37002
37002
  } catch {
37003
37003
  return [];
37004
37004
  }
@@ -38765,6 +38765,254 @@ function createSubagentsTool(opts) {
38765
38765
  };
38766
38766
  }
38767
38767
 
38768
+ //#endregion
38769
+ //#region src/agents/tools/task-tool.ts
38770
+ /**
38771
+ * Long-task management tools (task_list, task_cancel).
38772
+ *
38773
+ * Companions to the detach-task pattern in skills/long-task. The detach
38774
+ * script writes task-<id>.{pid,cmd,started,log,status} state files into
38775
+ * the agent's workspace; these tools read and act on those files so the
38776
+ * agent can answer "what's running?" and kill a task without needing
38777
+ * shell access.
38778
+ *
38779
+ * task-id allow-list mirrors detach-task.sh: 1–60 chars from
38780
+ * [a-zA-Z0-9._-], must not start with '.' or '-'. Diverging would let the
38781
+ * agent kill processes it never spawned via path traversal.
38782
+ */
38783
+ const TASK_FILE_PREFIX = "task-";
38784
+ const TASK_ID_RE = /^[a-zA-Z0-9_][a-zA-Z0-9._-]{0,59}$/;
38785
+ const TASK_FILE_SUFFIXES = [
38786
+ ".pid",
38787
+ ".status",
38788
+ ".started",
38789
+ ".cmd",
38790
+ ".log"
38791
+ ];
38792
+ const ALLOWED_SIGNALS = new Set([
38793
+ "SIGTERM",
38794
+ "SIGINT",
38795
+ "SIGHUP",
38796
+ "SIGQUIT",
38797
+ "SIGKILL",
38798
+ "SIGUSR1",
38799
+ "SIGUSR2"
38800
+ ]);
38801
+ const TaskListSchema = Type.Object({ workdir: Type.Optional(Type.String()) });
38802
+ const TaskCancelSchema = Type.Object({
38803
+ taskId: Type.String(),
38804
+ workdir: Type.Optional(Type.String()),
38805
+ signal: Type.Optional(Type.String())
38806
+ });
38807
+ function normaliseSignal(input) {
38808
+ if (!input) return "SIGTERM";
38809
+ const upper = input.trim().toUpperCase();
38810
+ const candidate = upper.startsWith("SIG") ? upper : `SIG${upper}`;
38811
+ if (ALLOWED_SIGNALS.has(candidate)) return candidate;
38812
+ throw new Error(`Unsupported signal: ${input}. Allowed: TERM, INT, HUP, QUIT, KILL, USR1, USR2.`);
38813
+ }
38814
+ function isPidAlive(pid) {
38815
+ try {
38816
+ process.kill(pid, 0);
38817
+ return true;
38818
+ } catch (err) {
38819
+ if (err.code === "EPERM") return true;
38820
+ return false;
38821
+ }
38822
+ }
38823
+ async function safeRead(filePath) {
38824
+ try {
38825
+ return (await fsSync.promises.readFile(filePath, "utf8")).trim();
38826
+ } catch {
38827
+ return null;
38828
+ }
38829
+ }
38830
+ function resolveWorkdir(deps, override) {
38831
+ const raw = override?.trim();
38832
+ if (!raw) return deps.workspaceDir;
38833
+ if (!path.isAbsolute(raw)) throw new Error(`workdir must be an absolute path (got: ${raw})`);
38834
+ return raw;
38835
+ }
38836
+ async function readTaskInfo(workdir, id) {
38837
+ const pidPath = path.join(workdir, `${TASK_FILE_PREFIX}${id}.pid`);
38838
+ const [pidText, status, started, cmd] = await Promise.all([
38839
+ safeRead(pidPath),
38840
+ safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.status`)),
38841
+ safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.started`)),
38842
+ safeRead(path.join(workdir, `${TASK_FILE_PREFIX}${id}.cmd`))
38843
+ ]);
38844
+ let pid = null;
38845
+ if (pidText) {
38846
+ const parsed = Number.parseInt(pidText, 10);
38847
+ if (Number.isFinite(parsed) && parsed > 0) pid = parsed;
38848
+ }
38849
+ return {
38850
+ id,
38851
+ pid,
38852
+ alive: pid !== null && isPidAlive(pid),
38853
+ status: status ?? "missing",
38854
+ started,
38855
+ cmd,
38856
+ pidPath,
38857
+ statusPath: path.join(workdir, `${TASK_FILE_PREFIX}${id}.status`),
38858
+ logPath: path.join(workdir, `${TASK_FILE_PREFIX}${id}.log`)
38859
+ };
38860
+ }
38861
+ function createTaskListTool(deps) {
38862
+ return {
38863
+ label: "Task List",
38864
+ name: "task_list",
38865
+ description: `List long-running detached tasks in the agent's workspace.
38866
+
38867
+ Globs task-<id>.{pid,status,started,cmd,log} files, reads their state, and
38868
+ checks each PID's liveness. Use this to find the task-id of a running
38869
+ detach-task before calling task_cancel, or to answer "what's running right
38870
+ now?" without re-asking the user.
38871
+
38872
+ Returns: { workdir, tasks: [{ id, pid, alive, status, started, cmd, pidPath, statusPath, logPath }] }.
38873
+ Tasks whose .pid file is missing are still listed (alive=false, pid=null) so
38874
+ the agent can spot orphan state files.`,
38875
+ parameters: TaskListSchema,
38876
+ execute: async (_toolCallId, args) => {
38877
+ const override = readStringParam(args, "workdir");
38878
+ let workdir;
38879
+ try {
38880
+ workdir = resolveWorkdir(deps, override);
38881
+ } catch (err) {
38882
+ return jsonResult({
38883
+ workdir: override ?? deps.workspaceDir,
38884
+ tasks: [],
38885
+ error: err instanceof Error ? err.message : String(err)
38886
+ });
38887
+ }
38888
+ let entries;
38889
+ try {
38890
+ entries = await fsSync.promises.readdir(workdir);
38891
+ } catch (err) {
38892
+ if (err.code === "ENOENT") return jsonResult({
38893
+ workdir,
38894
+ tasks: []
38895
+ });
38896
+ return jsonResult({
38897
+ workdir,
38898
+ tasks: [],
38899
+ error: err instanceof Error ? err.message : String(err)
38900
+ });
38901
+ }
38902
+ const taskIds = /* @__PURE__ */ new Set();
38903
+ for (const entry of entries) {
38904
+ if (!entry.startsWith(TASK_FILE_PREFIX)) continue;
38905
+ for (const suffix of TASK_FILE_SUFFIXES) if (entry.endsWith(suffix)) {
38906
+ const id = entry.slice(5, -suffix.length);
38907
+ if (id.length > 0 && TASK_ID_RE.test(id)) taskIds.add(id);
38908
+ break;
38909
+ }
38910
+ }
38911
+ const tasks = await Promise.all([...taskIds].toSorted().map((id) => readTaskInfo(workdir, id)));
38912
+ return jsonResult({
38913
+ workdir,
38914
+ tasks
38915
+ });
38916
+ }
38917
+ };
38918
+ }
38919
+ function createTaskCancelTool(deps) {
38920
+ return {
38921
+ label: "Task Cancel",
38922
+ name: "task_cancel",
38923
+ description: `Send a signal (default SIGTERM) to a running detached task.
38924
+
38925
+ Reads task-<id>.pid in the workdir, validates the recorded PID is alive,
38926
+ and sends the signal via process.kill. The task's TERM/INT/HUP trap will
38927
+ write an "aborted" status before exiting, so a follow-up task_list call
38928
+ sees the canonical end state.
38929
+
38930
+ task-id must match the same allow-list as detach-task.sh: 1–60 chars from
38931
+ [a-zA-Z0-9._-], no leading '.' or '-'. signal accepts TERM (default), INT,
38932
+ HUP, QUIT, KILL, USR1, USR2 — with or without the "SIG" prefix.
38933
+
38934
+ Returns: { ok, taskId, pid, sentSignal, alreadyDead?, error? }.`,
38935
+ parameters: TaskCancelSchema,
38936
+ execute: async (_toolCallId, args) => {
38937
+ const params = args;
38938
+ const taskId = readStringParam(params, "taskId", { required: true });
38939
+ if (!TASK_ID_RE.test(taskId)) return jsonResult({
38940
+ ok: false,
38941
+ taskId,
38942
+ error: "taskId must be 1–60 chars from [a-zA-Z0-9._-] and must not start with '.' or '-'."
38943
+ });
38944
+ const override = readStringParam(params, "workdir");
38945
+ let workdir;
38946
+ try {
38947
+ workdir = resolveWorkdir(deps, override);
38948
+ } catch (err) {
38949
+ return jsonResult({
38950
+ ok: false,
38951
+ taskId,
38952
+ error: err instanceof Error ? err.message : String(err)
38953
+ });
38954
+ }
38955
+ const signalRaw = readStringParam(params, "signal");
38956
+ let signal;
38957
+ try {
38958
+ signal = normaliseSignal(signalRaw);
38959
+ } catch (err) {
38960
+ return jsonResult({
38961
+ ok: false,
38962
+ taskId,
38963
+ error: err instanceof Error ? err.message : String(err)
38964
+ });
38965
+ }
38966
+ const pidPath = path.join(workdir, `${TASK_FILE_PREFIX}${taskId}.pid`);
38967
+ let pidText;
38968
+ try {
38969
+ pidText = (await fsSync.promises.readFile(pidPath, "utf8")).trim();
38970
+ } catch (err) {
38971
+ if (err.code === "ENOENT") return jsonResult({
38972
+ ok: false,
38973
+ taskId,
38974
+ error: `no pid file at ${pidPath} — task is unknown or already cleaned up`
38975
+ });
38976
+ return jsonResult({
38977
+ ok: false,
38978
+ taskId,
38979
+ error: err instanceof Error ? err.message : String(err)
38980
+ });
38981
+ }
38982
+ const pid = Number.parseInt(pidText, 10);
38983
+ if (!Number.isFinite(pid) || pid <= 0) return jsonResult({
38984
+ ok: false,
38985
+ taskId,
38986
+ error: `pid file at ${pidPath} did not contain a positive integer`
38987
+ });
38988
+ if (!isPidAlive(pid)) return jsonResult({
38989
+ ok: false,
38990
+ taskId,
38991
+ pid,
38992
+ alreadyDead: true,
38993
+ error: "process is no longer running"
38994
+ });
38995
+ try {
38996
+ process.kill(pid, signal);
38997
+ } catch (err) {
38998
+ return jsonResult({
38999
+ ok: false,
39000
+ taskId,
39001
+ pid,
39002
+ sentSignal: signal,
39003
+ error: err instanceof Error ? err.message : String(err)
39004
+ });
39005
+ }
39006
+ return jsonResult({
39007
+ ok: true,
39008
+ taskId,
39009
+ pid,
39010
+ sentSignal: signal
39011
+ });
39012
+ }
39013
+ };
39014
+ }
39015
+
38768
39016
  //#endregion
38769
39017
  //#region src/agents/tools/tts-tool.ts
38770
39018
  const TtsToolSchema = Type.Object({
@@ -40065,6 +40313,8 @@ function createSymiTools(options) {
40065
40313
  config: options?.config
40066
40314
  }),
40067
40315
  createCronTool({ agentSessionKey: options?.agentSessionKey }),
40316
+ createTaskListTool({ workspaceDir }),
40317
+ createTaskCancelTool({ workspaceDir }),
40068
40318
  ...messageTool ? [messageTool] : [],
40069
40319
  createTtsTool({
40070
40320
  agentChannel: options?.agentChannel,
@@ -40866,18 +41116,18 @@ function appendImagePathsToPrompt(prompt, paths) {
40866
41116
  return `${trimmed}${trimmed ? "\n\n" : ""}${paths.join("\n")}`;
40867
41117
  }
40868
41118
  async function writeCliImages(images) {
40869
- const tempDir = await fs$1.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
41119
+ const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "symi-cli-images-"));
40870
41120
  const paths = [];
40871
41121
  for (let i = 0; i < images.length; i += 1) {
40872
41122
  const image = images[i];
40873
41123
  const ext = resolveImageExtension(image.mimeType);
40874
41124
  const filePath = path.join(tempDir, `image-${i + 1}.${ext}`);
40875
41125
  const buffer = Buffer.from(image.data, "base64");
40876
- await fs$1.writeFile(filePath, buffer, { mode: 384 });
41126
+ await fs.writeFile(filePath, buffer, { mode: 384 });
40877
41127
  paths.push(filePath);
40878
41128
  }
40879
41129
  const cleanup = async () => {
40880
- await fs$1.rm(tempDir, {
41130
+ await fs.rm(tempDir, {
40881
41131
  recursive: true,
40882
41132
  force: true
40883
41133
  });
@@ -41951,7 +42201,7 @@ async function runAgentTurnWithFallback(params) {
41951
42201
  if (corruptedSessionId) {
41952
42202
  const transcriptPath = resolveSessionTranscriptPath(corruptedSessionId);
41953
42203
  try {
41954
- fs.unlinkSync(transcriptPath);
42204
+ fsSync.unlinkSync(transcriptPath);
41955
42205
  } catch {}
41956
42206
  }
41957
42207
  delete params.activeSessionStore[sessionKey];
@@ -42690,9 +42940,9 @@ function auditPostCompactionReads(readFilePaths, workspaceDir, requiredReads = D
42690
42940
  * Returns messages from the last N lines (default 100).
42691
42941
  */
42692
42942
  function readSessionMessages(sessionFile, maxLines = 100) {
42693
- if (!fs.existsSync(sessionFile)) return [];
42943
+ if (!fsSync.existsSync(sessionFile)) return [];
42694
42944
  try {
42695
- const recentLines = fs.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
42945
+ const recentLines = fsSync.readFileSync(sessionFile, "utf-8").trim().split("\n").slice(-maxLines);
42696
42946
  const messages = [];
42697
42947
  for (const line of recentLines) try {
42698
42948
  const entry = JSON.parse(line);
@@ -42733,8 +42983,8 @@ const MAX_CONTEXT_CHARS = 3e3;
42733
42983
  async function readPostCompactionContext(workspaceDir) {
42734
42984
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
42735
42985
  try {
42736
- if (!fs.existsSync(agentsPath)) return null;
42737
- const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
42986
+ if (!fsSync.existsSync(agentsPath)) return null;
42987
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
42738
42988
  if (sections.length === 0) return null;
42739
42989
  const combined = sections.join("\n\n");
42740
42990
  return "[Post-compaction context refresh]\n\nSession was just compacted. The conversation summary above is a hint, NOT a substitute for your startup sequence. Execute your Session Startup sequence now — read the required files before responding to the user.\n\nCritical rules from AGENTS.md:\n\n" + (combined.length > MAX_CONTEXT_CHARS ? combined.slice(0, MAX_CONTEXT_CHARS) + "\n...[truncated]..." : combined);
@@ -42938,7 +43188,7 @@ async function runReplyAgent(params) {
42938
43188
  if (resolved) transcriptCandidates.add(resolved);
42939
43189
  transcriptCandidates.add(resolveSessionTranscriptPath(prevSessionId, agentId));
42940
43190
  for (const candidate of transcriptCandidates) try {
42941
- fs.unlinkSync(candidate);
43191
+ fsSync.unlinkSync(candidate);
42942
43192
  } catch {}
42943
43193
  }
42944
43194
  return true;
@@ -43844,7 +44094,7 @@ async function deliverSessionMaintenanceWarning(params) {
43844
44094
  return;
43845
44095
  }
43846
44096
  try {
43847
- const { deliverOutboundPayloads } = await import("./deliver-B0OUq6RP.js").then((n) => n.n);
44097
+ const { deliverOutboundPayloads } = await import("./deliver-SLYAWE19.js").then((n) => n.n);
43848
44098
  await deliverOutboundPayloads({
43849
44099
  cfg: params.cfg,
43850
44100
  channel,
@@ -43870,7 +44120,7 @@ function forkSessionFromParent(params) {
43870
44120
  agentId: params.agentId,
43871
44121
  sessionsDir: params.sessionsDir
43872
44122
  });
43873
- if (!parentSessionFile || !fs.existsSync(parentSessionFile)) return null;
44123
+ if (!parentSessionFile || !fsSync.existsSync(parentSessionFile)) return null;
43874
44124
  try {
43875
44125
  const manager = SessionManager.open(parentSessionFile);
43876
44126
  const leafId = manager.getLeafId();
@@ -43894,7 +44144,7 @@ function forkSessionFromParent(params) {
43894
44144
  cwd: manager.getCwd(),
43895
44145
  parentSession: parentSessionFile
43896
44146
  };
43897
- fs.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
44147
+ fsSync.writeFileSync(sessionFile, `${JSON.stringify(header)}\n`, "utf-8");
43898
44148
  return {
43899
44149
  sessionId,
43900
44150
  sessionFile
@@ -44219,7 +44469,7 @@ async function stageSandboxMedia(params) {
44219
44469
  };
44220
44470
  try {
44221
44471
  const destDir = sandbox ? path.join(effectiveWorkspaceDir, "media", "inbound") : effectiveWorkspaceDir;
44222
- await fs$1.mkdir(destDir, { recursive: true });
44472
+ await fs.mkdir(destDir, { recursive: true });
44223
44473
  const remoteAttachmentRoots = resolveIMessageRemoteAttachmentRoots({
44224
44474
  cfg,
44225
44475
  accountId: ctx.AccountId
@@ -44269,7 +44519,7 @@ async function stageSandboxMedia(params) {
44269
44519
  usedNames.add(fileName);
44270
44520
  const dest = path.join(destDir, fileName);
44271
44521
  if (ctx.MediaRemoteHost) await scpFile(ctx.MediaRemoteHost, source, dest);
44272
- else await fs$1.copyFile(source, dest);
44522
+ else await fs.copyFile(source, dest);
44273
44523
  const stagedPath = sandbox ? path.posix.join("media", "inbound", fileName) : dest;
44274
44524
  staged.set(source, stagedPath);
44275
44525
  }
@@ -47289,8 +47539,8 @@ async function describeStickerImage(params) {
47289
47539
  const { provider, model } = resolved;
47290
47540
  logVerbose(`telegram: describing sticker with ${provider}/${model}`);
47291
47541
  try {
47292
- const buffer = await fs$1.readFile(imagePath);
47293
- const { describeImageWithModel } = await import("./image-BuVL0jHI.js").then((n) => n.n);
47542
+ const buffer = await fs.readFile(imagePath);
47543
+ const { describeImageWithModel } = await import("./image-BHF_fnIp.js").then((n) => n.n);
47294
47544
  return (await describeImageWithModel({
47295
47545
  buffer,
47296
47546
  fileName: "sticker.webp",
@@ -47713,7 +47963,7 @@ function createWhatsAppLoginTool() {
47713
47963
  force: Type.Optional(Type.Boolean())
47714
47964
  }),
47715
47965
  execute: async (_toolCallId, args) => {
47716
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-DdAVHOEC.js");
47966
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-C9ftIq3n.js");
47717
47967
  if ((args?.action ?? "start") === "wait") {
47718
47968
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
47719
47969
  return {
@@ -47995,7 +48245,7 @@ async function withMemoryManagerForAgent(params) {
47995
48245
  }
47996
48246
  async function checkReadableFile(pathname) {
47997
48247
  try {
47998
- await fs$1.access(pathname, fs.constants.R_OK);
48248
+ await fs.access(pathname, fsSync.constants.R_OK);
47999
48249
  return { exists: true };
48000
48250
  } catch (err) {
48001
48251
  const code = err.code;
@@ -48012,7 +48262,7 @@ async function scanSessionFiles(agentId) {
48012
48262
  try {
48013
48263
  return {
48014
48264
  source: "sessions",
48015
- totalFiles: (await fs$1.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
48265
+ totalFiles: (await fs.readdir(sessionsDir, { withFileTypes: true })).filter((entry) => entry.isFile() && entry.name.endsWith(".jsonl")).length,
48016
48266
  issues
48017
48267
  };
48018
48268
  } catch (err) {
@@ -48044,7 +48294,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
48044
48294
  if (alt.issue) issues.push(alt.issue);
48045
48295
  const resolvedExtraPaths = normalizeExtraMemoryPaths(workspaceDir, extraPaths);
48046
48296
  for (const extraPath of resolvedExtraPaths) try {
48047
- if ((await fs$1.lstat(extraPath)).isSymbolicLink()) continue;
48297
+ if ((await fs.lstat(extraPath)).isSymbolicLink()) continue;
48048
48298
  const extraCheck = await checkReadableFile(extraPath);
48049
48299
  if (extraCheck.issue) issues.push(extraCheck.issue);
48050
48300
  } catch (err) {
@@ -48054,7 +48304,7 @@ async function scanMemoryFiles(workspaceDir, extraPaths = []) {
48054
48304
  }
48055
48305
  let dirReadable = null;
48056
48306
  try {
48057
- await fs$1.access(memoryDir, fs.constants.R_OK);
48307
+ await fs.access(memoryDir, fsSync.constants.R_OK);
48058
48308
  dirReadable = true;
48059
48309
  } catch (err) {
48060
48310
  const code = err.code;
@@ -48102,7 +48352,7 @@ async function summarizeQmdIndexArtifact(manager) {
48102
48352
  if (!dbPath) return null;
48103
48353
  let stat;
48104
48354
  try {
48105
- stat = await fs$1.stat(dbPath);
48355
+ stat = await fs.stat(dbPath);
48106
48356
  } catch (err) {
48107
48357
  const code = err.code;
48108
48358
  if (code === "ENOENT") throw new Error(`QMD index file not found: ${shortenHomePath(dbPath)}`, { cause: err });
@@ -50039,7 +50289,7 @@ async function preflightDiscordMessage(params) {
50039
50289
  let preflightTranscript;
50040
50290
  const hasAudioAttachment = message.attachments?.some((att) => att.contentType?.startsWith("audio/"));
50041
50291
  if (!isDirectMessage && shouldRequireMention && hasAudioAttachment && !baseText && mentionRegexes.length > 0) try {
50042
- const { transcribeFirstAudio } = await import("./audio-preflight-Cb-T0r6e.js");
50292
+ const { transcribeFirstAudio } = await import("./audio-preflight-rrz8KyHd.js");
50043
50293
  const audioPaths = message.attachments?.filter((att) => att.contentType?.startsWith("audio/")).map((att) => att.url) ?? [];
50044
50294
  if (audioPaths.length > 0) preflightTranscript = await transcribeFirstAudio({
50045
50295
  ctx: {
@@ -51002,7 +51252,7 @@ function identityHasValues(identity) {
51002
51252
  }
51003
51253
  function loadIdentityFromFile(identityPath) {
51004
51254
  try {
51005
- const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
51255
+ const parsed = parseIdentityMarkdown(fsSync.readFileSync(identityPath, "utf-8"));
51006
51256
  if (!identityHasValues(parsed)) return null;
51007
51257
  return parsed;
51008
51258
  } catch {
@@ -51041,7 +51291,7 @@ function isDataAvatar(value) {
51041
51291
  }
51042
51292
  function resolveExistingPath(value) {
51043
51293
  try {
51044
- return fs.realpathSync(value);
51294
+ return fsSync.realpathSync(value);
51045
51295
  } catch {
51046
51296
  return path.resolve(value);
51047
51297
  }
@@ -51065,7 +51315,7 @@ function resolveLocalAvatarPath(params) {
51065
51315
  reason: "unsupported_extension"
51066
51316
  };
51067
51317
  try {
51068
- if (!fs.statSync(realPath).isFile()) return {
51318
+ if (!fsSync.statSync(realPath).isFile()) return {
51069
51319
  ok: false,
51070
51320
  reason: "missing"
51071
51321
  };
@@ -51928,7 +52178,7 @@ function sanitizeRecentModels(models, limit) {
51928
52178
  }
51929
52179
  async function readJsonFileWithFallback(filePath, fallback) {
51930
52180
  try {
51931
- const raw = await fs.promises.readFile(filePath, "utf-8");
52181
+ const raw = await fsSync.promises.readFile(filePath, "utf-8");
51932
52182
  return {
51933
52183
  value: JSON.parse(raw),
51934
52184
  exists: true
@@ -51946,14 +52196,14 @@ async function readJsonFileWithFallback(filePath, fallback) {
51946
52196
  }
51947
52197
  async function writeJsonFileAtomically(filePath, value) {
51948
52198
  const dir = path.dirname(filePath);
51949
- await fs.promises.mkdir(dir, {
52199
+ await fsSync.promises.mkdir(dir, {
51950
52200
  recursive: true,
51951
52201
  mode: 448
51952
52202
  });
51953
52203
  const tmp = path.join(dir, `${path.basename(filePath)}.${crypto.randomUUID()}.tmp`);
51954
- await fs.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
51955
- await fs.promises.chmod(tmp, 384);
51956
- await fs.promises.rename(tmp, filePath);
52204
+ await fsSync.promises.writeFile(tmp, `${JSON.stringify(value, null, 2)}\n`, "utf-8");
52205
+ await fsSync.promises.chmod(tmp, 384);
52206
+ await fsSync.promises.rename(tmp, filePath);
51957
52207
  }
51958
52208
  async function readPreferencesStore(filePath) {
51959
52209
  const { value } = await readJsonFileWithFallback(filePath, {
@@ -54045,27 +54295,27 @@ function isVoiceChannelType(type) {
54045
54295
  function createDefaultDeps() {
54046
54296
  return {
54047
54297
  sendMessageWhatsApp: async (...args) => {
54048
- const { sendMessageWhatsApp } = await import("./web-BBz1kF_9.js");
54298
+ const { sendMessageWhatsApp } = await import("./web-B90A99YU.js");
54049
54299
  return await sendMessageWhatsApp(...args);
54050
54300
  },
54051
54301
  sendMessageTelegram: async (...args) => {
54052
- const { sendMessageTelegram } = await import("./send-Bb4it0te.js").then((n) => n.l);
54302
+ const { sendMessageTelegram } = await import("./send-BTfqlrYd.js").then((n) => n.l);
54053
54303
  return await sendMessageTelegram(...args);
54054
54304
  },
54055
54305
  sendMessageDiscord: async (...args) => {
54056
- const { sendMessageDiscord } = await import("./send-C0QjmPaf.js").then((n) => n.t);
54306
+ const { sendMessageDiscord } = await import("./send-CSydU49L.js").then((n) => n.t);
54057
54307
  return await sendMessageDiscord(...args);
54058
54308
  },
54059
54309
  sendMessageSlack: async (...args) => {
54060
- const { sendMessageSlack } = await import("./send-BKo1T3HF.js").then((n) => n.n);
54310
+ const { sendMessageSlack } = await import("./send-cCTQjuOZ.js").then((n) => n.n);
54061
54311
  return await sendMessageSlack(...args);
54062
54312
  },
54063
54313
  sendMessageSignal: async (...args) => {
54064
- const { sendMessageSignal } = await import("./send-Cpk3Ti6-.js").then((n) => n.i);
54314
+ const { sendMessageSignal } = await import("./send-Du-IfSne.js").then((n) => n.i);
54065
54315
  return await sendMessageSignal(...args);
54066
54316
  },
54067
54317
  sendMessageIMessage: async (...args) => {
54068
- const { sendMessageIMessage } = await import("./send-DFtnbzqy.js").then((n) => n.n);
54318
+ const { sendMessageIMessage } = await import("./send-ASDB3AzC.js").then((n) => n.n);
54069
54319
  return await sendMessageIMessage(...args);
54070
54320
  }
54071
54321
  };
@@ -54974,10 +55224,10 @@ function estimateDurationSeconds(pcm) {
54974
55224
  return pcm.length / (bytesPerSample * SAMPLE_RATE);
54975
55225
  }
54976
55226
  async function writeWavFile(pcm) {
54977
- const tempDir = await fs$1.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
55227
+ const tempDir = await fs.mkdtemp(path.join(resolvePreferredSymiTmpDir(), "discord-voice-"));
54978
55228
  const filePath = path.join(tempDir, `segment-${randomUUID()}.wav`);
54979
55229
  const wav = buildWavBuffer(pcm);
54980
- await fs$1.writeFile(filePath, wav);
55230
+ await fs.writeFile(filePath, wav);
54981
55231
  scheduleTempCleanup(tempDir);
54982
55232
  return {
54983
55233
  path: filePath,
@@ -54986,7 +55236,7 @@ async function writeWavFile(pcm) {
54986
55236
  }
54987
55237
  function scheduleTempCleanup(tempDir, delayMs = 1800 * 1e3) {
54988
55238
  setTimeout(() => {
54989
- fs$1.rm(tempDir, {
55239
+ fs.rm(tempDir, {
54990
55240
  recursive: true,
54991
55241
  force: true
54992
55242
  }).catch((err) => {
@@ -58050,7 +58300,7 @@ async function detectBinary(name) {
58050
58300
  if (!isSafeExecutableValue(name)) return false;
58051
58301
  const resolved = name.startsWith("~") ? resolveUserPath(name) : name;
58052
58302
  if (path.isAbsolute(resolved) || resolved.startsWith(".") || resolved.includes("/") || resolved.includes("\\")) try {
58053
- await fs$1.access(resolved);
58303
+ await fs.access(resolved);
58054
58304
  return true;
58055
58305
  } catch {
58056
58306
  return false;
@@ -58600,7 +58850,7 @@ function normalizeAllowList$1(list) {
58600
58850
  async function detectRemoteHostFromCliPath(cliPath) {
58601
58851
  try {
58602
58852
  const expanded = cliPath.startsWith("~") ? cliPath.replace(/^~/, process.env.HOME ?? "") : cliPath;
58603
- const content = await fs$1.readFile(expanded, "utf8");
58853
+ const content = await fs.readFile(expanded, "utf8");
58604
58854
  const userHostMatch = content.match(/\bssh\b[^\n]*?\s+([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+)/);
58605
58855
  if (userHostMatch) return userHostMatch[1];
58606
58856
  return content.match(/\bssh\b[^\n]*?\s+([a-zA-Z][a-zA-Z0-9._-]*)\s+\S*\bimsg\b/)?.[1];
@@ -58944,7 +59194,7 @@ async function monitorIMessageProvider(opts = {}) {
58944
59194
  function readFileIfExists(filePath) {
58945
59195
  if (!filePath) return;
58946
59196
  try {
58947
- return fs.readFileSync(filePath, "utf-8").trim();
59197
+ return fsSync.readFileSync(filePath, "utf-8").trim();
58948
59198
  } catch {
58949
59199
  return;
58950
59200
  }
@@ -59505,7 +59755,7 @@ async function downloadLineMedia(messageId, channelAccessToken, maxBytes = 10 *
59505
59755
  prefix: "line-media",
59506
59756
  extension: getExtensionForContentType(contentType)
59507
59757
  });
59508
- await fs.promises.writeFile(filePath, buffer);
59758
+ await fsSync.promises.writeFile(filePath, buffer);
59509
59759
  logVerbose(`line: downloaded media ${messageId} to ${filePath} (${buffer.length} bytes)`);
59510
59760
  return {
59511
59761
  path: filePath,
@@ -64492,7 +64742,7 @@ function readSlackExternalArgMenuToken(raw) {
64492
64742
  }
64493
64743
  let commandsRegistry;
64494
64744
  async function getCommandsRegistry() {
64495
- if (!commandsRegistry) commandsRegistry = await import("./commands-registry-DxbSTLNQ.js").then((n) => n.n);
64745
+ if (!commandsRegistry) commandsRegistry = await import("./commands-registry-ByGkL6hs.js").then((n) => n.n);
64496
64746
  return commandsRegistry;
64497
64747
  }
64498
64748
  function encodeSlackCommandArgValue(parts) {
@@ -64834,11 +65084,11 @@ async function registerSlackMonitorSlashCommands(params) {
64834
65084
  const channelName = channelInfo?.name;
64835
65085
  const roomLabel = channelName ? `#${channelName}` : `#${command.channel_id}`;
64836
65086
  const [{ resolveAgentRoute }, { finalizeInboundContext }, { dispatchReplyWithDispatcher }] = await Promise.all([
64837
- import("./resolve-route-Jy5dFY67.js").then((n) => n.r),
65087
+ import("./resolve-route-BgSuN9c6.js").then((n) => n.r),
64838
65088
  import("./inbound-context-DZQU0r3y.js").then((n) => n.n),
64839
65089
  Promise.resolve().then(() => provider_dispatcher_exports)
64840
65090
  ]);
64841
- const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-CvEIl6_d.js").then((n) => n.n)]);
65091
+ const [{ resolveConversationLabel }, { createReplyPrefixOptions }] = await Promise.all([import("./conversation-label-Onz2hiJh.js").then((n) => n.t), import("./reply-prefix-CI_IdwqH.js").then((n) => n.n)]);
64842
65092
  const route = resolveAgentRoute({
64843
65093
  cfg,
64844
65094
  channel: "slack",
@@ -64895,9 +65145,9 @@ async function registerSlackMonitorSlashCommands(params) {
64895
65145
  });
64896
65146
  const deliverSlashPayloads = async (replies) => {
64897
65147
  const [{ deliverSlackSlashReplies }, { resolveChunkMode }, { resolveMarkdownTableMode }] = await Promise.all([
64898
- import("./replies-CUWXgyx2.js").then((n) => n.r),
64899
- import("./chunk-BRe1o4Af.js").then((n) => n.s),
64900
- import("./markdown-tables-x2Xe2UXh.js").then((n) => n.t)
65148
+ import("./replies-86F3PldM.js").then((n) => n.r),
65149
+ import("./chunk-BcxcL1U3.js").then((n) => n.s),
65150
+ import("./markdown-tables-CE-qSMGB.js").then((n) => n.t)
64901
65151
  ]);
64902
65152
  await deliverSlackSlashReplies({
64903
65153
  replies,
@@ -64950,7 +65200,7 @@ async function registerSlackMonitorSlashCommands(params) {
64950
65200
  let nativeCommands = [];
64951
65201
  if (nativeEnabled) {
64952
65202
  reg = await getCommandsRegistry();
64953
- const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-DG2lcozb.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
65203
+ const skillCommands = nativeSkillsEnabled ? (await import("./skill-commands-BcOduw6G.js").then((n) => n.a)).listSkillCommandsForAgents({ cfg }) : [];
64954
65204
  nativeCommands = reg.listNativeCommandSpecsForConfig(cfg, {
64955
65205
  skillCommands,
64956
65206
  provider: "slack"
@@ -67168,7 +67418,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, storeAllowFro
67168
67418
  const hasAudio = allMedia.some((media) => media.contentType?.startsWith("audio/"));
67169
67419
  let preflightTranscript;
67170
67420
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0) try {
67171
- const { transcribeFirstAudio } = await import("./audio-preflight-Cb-T0r6e.js");
67421
+ const { transcribeFirstAudio } = await import("./audio-preflight-rrz8KyHd.js");
67172
67422
  preflightTranscript = await transcribeFirstAudio({
67173
67423
  ctx: {
67174
67424
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -68936,7 +69186,7 @@ function safeParseState(raw) {
68936
69186
  async function readTelegramUpdateOffset(params) {
68937
69187
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
68938
69188
  try {
68939
- return safeParseState(await fs$1.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
69189
+ return safeParseState(await fs.readFile(filePath, "utf-8"))?.lastUpdateId ?? null;
68940
69190
  } catch (err) {
68941
69191
  if (err.code === "ENOENT") return null;
68942
69192
  return null;
@@ -68945,7 +69195,7 @@ async function readTelegramUpdateOffset(params) {
68945
69195
  async function writeTelegramUpdateOffset(params) {
68946
69196
  const filePath = resolveTelegramUpdateOffsetPath(params.accountId, params.env);
68947
69197
  const dir = path.dirname(filePath);
68948
- await fs$1.mkdir(dir, {
69198
+ await fs.mkdir(dir, {
68949
69199
  recursive: true,
68950
69200
  mode: 448
68951
69201
  });
@@ -68954,9 +69204,9 @@ async function writeTelegramUpdateOffset(params) {
68954
69204
  version: STORE_VERSION,
68955
69205
  lastUpdateId: params.updateId
68956
69206
  };
68957
- await fs$1.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
68958
- await fs$1.chmod(tmp, 384);
68959
- await fs$1.rename(tmp, filePath);
69207
+ await fs.writeFile(tmp, `${JSON.stringify(payload, null, 2)}\n`, { encoding: "utf-8" });
69208
+ await fs.chmod(tmp, 384);
69209
+ await fs.rename(tmp, filePath);
68960
69210
  }
68961
69211
 
68962
69212
  //#endregion
@@ -69313,23 +69563,23 @@ let webLoginQrPromise = null;
69313
69563
  let webChannelPromise = null;
69314
69564
  let whatsappActionsPromise = null;
69315
69565
  function loadWebOutbound() {
69316
- webOutboundPromise ??= import("./outbound-Zmd7UyQH.js").then((n) => n.t);
69566
+ webOutboundPromise ??= import("./outbound-C6Gm22UF.js").then((n) => n.t);
69317
69567
  return webOutboundPromise;
69318
69568
  }
69319
69569
  function loadWebLogin() {
69320
- webLoginPromise ??= import("./login-D4rZWBXe.js").then((n) => n.n);
69570
+ webLoginPromise ??= import("./login-D4ZkmSrY.js").then((n) => n.n);
69321
69571
  return webLoginPromise;
69322
69572
  }
69323
69573
  function loadWebLoginQr() {
69324
- webLoginQrPromise ??= import("./login-qr-DdAVHOEC.js");
69574
+ webLoginQrPromise ??= import("./login-qr-C9ftIq3n.js");
69325
69575
  return webLoginQrPromise;
69326
69576
  }
69327
69577
  function loadWebChannel() {
69328
- webChannelPromise ??= import("./web-BBz1kF_9.js");
69578
+ webChannelPromise ??= import("./web-B90A99YU.js");
69329
69579
  return webChannelPromise;
69330
69580
  }
69331
69581
  function loadWhatsAppActions() {
69332
- whatsappActionsPromise ??= import("./whatsapp-actions-DmVpLXmh.js");
69582
+ whatsappActionsPromise ??= import("./whatsapp-actions-llk0IUn2.js");
69333
69583
  return whatsappActionsPromise;
69334
69584
  }
69335
69585
  function createPluginRuntime() {
@@ -69552,7 +69802,7 @@ const resolvePluginSdkAliasFile = (params) => {
69552
69802
  const srcCandidate = path.join(cursor, "src", "plugin-sdk", params.srcFile);
69553
69803
  const distCandidate = path.join(cursor, "dist", "plugin-sdk", params.distFile);
69554
69804
  const orderedCandidates = isTest ? [distCandidate, srcCandidate] : [distCandidate];
69555
- for (const candidate of orderedCandidates) if (fs.existsSync(candidate)) return candidate;
69805
+ for (const candidate of orderedCandidates) if (fsSync.existsSync(candidate)) return candidate;
69556
69806
  const parent = path.dirname(cursor);
69557
69807
  if (parent === cursor) break;
69558
69808
  cursor = parent;
@@ -70098,7 +70348,7 @@ function resolvePluginTools(params) {
70098
70348
  //#endregion
70099
70349
  //#region src/agents/apply-patch-update.ts
70100
70350
  async function defaultReadFile(filePath) {
70101
- return fs$1.readFile(filePath, "utf8");
70351
+ return fs.readFile(filePath, "utf8");
70102
70352
  }
70103
70353
  async function applyUpdateHunk(filePath, chunks, options) {
70104
70354
  const originalLines = (await (options?.readFile ?? defaultReadFile)(filePath).catch((err) => {
@@ -70342,10 +70592,10 @@ function resolvePatchFileOps(options) {
70342
70592
  };
70343
70593
  }
70344
70594
  return {
70345
- readFile: (filePath) => fs$1.readFile(filePath, "utf8"),
70346
- writeFile: (filePath, content) => fs$1.writeFile(filePath, content, "utf8"),
70347
- remove: (filePath) => fs$1.rm(filePath),
70348
- mkdirp: (dir) => fs$1.mkdir(dir, { recursive: true }).then(() => {})
70595
+ readFile: (filePath) => fs.readFile(filePath, "utf8"),
70596
+ writeFile: (filePath, content) => fs.writeFile(filePath, content, "utf8"),
70597
+ remove: (filePath) => fs.rm(filePath),
70598
+ mkdirp: (dir) => fs.mkdir(dir, { recursive: true }).then(() => {})
70349
70599
  };
70350
70600
  }
70351
70601
  async function ensureDir(filePath, ops) {
@@ -70635,6 +70885,8 @@ const SUBAGENT_TOOL_DENY_ALWAYS = [
70635
70885
  "whatsapp_login",
70636
70886
  "session_status",
70637
70887
  "cron",
70888
+ "task_list",
70889
+ "task_cancel",
70638
70890
  "memory_search",
70639
70891
  "memory_get",
70640
70892
  "memory_pin",
@@ -71599,7 +71851,7 @@ async function repairSessionFileIfNeeded(params) {
71599
71851
  };
71600
71852
  let content;
71601
71853
  try {
71602
- content = await fs$1.readFile(sessionFile, "utf-8");
71854
+ content = await fs.readFile(sessionFile, "utf-8");
71603
71855
  } catch (err) {
71604
71856
  if (err?.code === "ENOENT") return {
71605
71857
  repaired: false,
@@ -71647,15 +71899,15 @@ async function repairSessionFileIfNeeded(params) {
71647
71899
  const backupPath = `${sessionFile}.bak-${process.pid}-${Date.now()}`;
71648
71900
  const tmpPath = `${sessionFile}.repair-${process.pid}-${Date.now()}.tmp`;
71649
71901
  try {
71650
- const stat = await fs$1.stat(sessionFile).catch(() => null);
71651
- await fs$1.writeFile(backupPath, content, "utf-8");
71652
- if (stat) await fs$1.chmod(backupPath, stat.mode);
71653
- await fs$1.writeFile(tmpPath, cleaned, "utf-8");
71654
- if (stat) await fs$1.chmod(tmpPath, stat.mode);
71655
- await fs$1.rename(tmpPath, sessionFile);
71902
+ const stat = await fs.stat(sessionFile).catch(() => null);
71903
+ await fs.writeFile(backupPath, content, "utf-8");
71904
+ if (stat) await fs.chmod(backupPath, stat.mode);
71905
+ await fs.writeFile(tmpPath, cleaned, "utf-8");
71906
+ if (stat) await fs.chmod(tmpPath, stat.mode);
71907
+ await fs.rename(tmpPath, sessionFile);
71656
71908
  } catch (err) {
71657
71909
  try {
71658
- await fs$1.unlink(tmpPath);
71910
+ await fs.unlink(tmpPath);
71659
71911
  } catch (cleanupErr) {
71660
71912
  params.warn?.(`session file repair cleanup failed: ${cleanupErr instanceof Error ? cleanupErr.message : "unknown error"} (${path.basename(tmpPath)})`);
71661
71913
  }
@@ -72343,8 +72595,8 @@ async function readWorkspaceContextForSummary() {
72343
72595
  const workspaceDir = process.cwd();
72344
72596
  const agentsPath = path.join(workspaceDir, "AGENTS.md");
72345
72597
  try {
72346
- if (!fs.existsSync(agentsPath)) return "";
72347
- const sections = extractSections(await fs.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
72598
+ if (!fsSync.existsSync(agentsPath)) return "";
72599
+ const sections = extractSections(await fsSync.promises.readFile(agentsPath, "utf-8"), ["Session Startup", "Red Lines"]);
72348
72600
  if (sections.length === 0) return "";
72349
72601
  const combined = sections.join("\n\n");
72350
72602
  return `\n\n<workspace-critical-rules>\n${combined.length > MAX_SUMMARY_CONTEXT_CHARS ? combined.slice(0, MAX_SUMMARY_CONTEXT_CHARS) + "\n...[truncated]..." : combined}\n</workspace-critical-rules>`;
@@ -72900,7 +73152,7 @@ async function prewarmSessionFile(sessionFile) {
72900
73152
  if (!isSessionManagerCacheEnabled()) return;
72901
73153
  if (isSessionManagerCached(sessionFile)) return;
72902
73154
  try {
72903
- const handle = await fs$1.open(sessionFile, "r");
73155
+ const handle = await fs.open(sessionFile, "r");
72904
73156
  try {
72905
73157
  const buffer = Buffer$1.alloc(4096);
72906
73158
  await handle.read(buffer, 0, buffer.length, 0);
@@ -73033,14 +73285,14 @@ async function compactEmbeddedPiSessionDirect(params) {
73033
73285
  if (!apiKeyInfo.apiKey) {
73034
73286
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
73035
73287
  } else if (model.provider === "github-copilot") {
73036
- const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
73288
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
73037
73289
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
73038
73290
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
73039
73291
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
73040
73292
  } catch (err) {
73041
73293
  return fail(describeUnknownError(err));
73042
73294
  }
73043
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
73295
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
73044
73296
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
73045
73297
  const sandbox = await resolveSandboxContext({
73046
73298
  config: params.config,
@@ -73048,7 +73300,7 @@ async function compactEmbeddedPiSessionDirect(params) {
73048
73300
  workspaceDir: resolvedWorkspace
73049
73301
  });
73050
73302
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
73051
- await fs$1.mkdir(effectiveWorkspace, { recursive: true });
73303
+ await fs.mkdir(effectiveWorkspace, { recursive: true });
73052
73304
  await ensureSessionHeader({
73053
73305
  sessionFile: params.sessionFile,
73054
73306
  sessionId: params.sessionId,
@@ -73402,12 +73654,12 @@ function getQueuedFileWriter(writers, filePath) {
73402
73654
  const existing = writers.get(filePath);
73403
73655
  if (existing) return existing;
73404
73656
  const dir = path.dirname(filePath);
73405
- const ready = fs$1.mkdir(dir, { recursive: true }).catch(() => void 0);
73657
+ const ready = fs.mkdir(dir, { recursive: true }).catch(() => void 0);
73406
73658
  let queue = Promise.resolve();
73407
73659
  const writer = {
73408
73660
  filePath,
73409
73661
  write: (line) => {
73410
- queue = queue.then(() => ready).then(() => fs$1.appendFile(filePath, line, "utf8")).catch(() => void 0);
73662
+ queue = queue.then(() => ready).then(() => fs.appendFile(filePath, line, "utf8")).catch(() => void 0);
73411
73663
  }
73412
73664
  };
73413
73665
  writers.set(filePath, writer);
@@ -74436,11 +74688,11 @@ function appendRawStream(payload) {
74436
74688
  if (!rawStreamReady) {
74437
74689
  rawStreamReady = true;
74438
74690
  try {
74439
- fs.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
74691
+ fsSync.mkdirSync(path.dirname(RAW_STREAM_PATH), { recursive: true });
74440
74692
  } catch {}
74441
74693
  }
74442
74694
  try {
74443
- fs.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
74695
+ fsSync.promises.appendFile(RAW_STREAM_PATH, `${JSON.stringify(payload)}\n`);
74444
74696
  } catch {}
74445
74697
  }
74446
74698
 
@@ -76249,7 +76501,7 @@ Use the message tool with buttons:
76249
76501
  */
76250
76502
  async function readSessionFile(sessionFile) {
76251
76503
  try {
76252
- return await fs$1.readFile(sessionFile, "utf-8");
76504
+ return await fs.readFile(sessionFile, "utf-8");
76253
76505
  } catch {
76254
76506
  return null;
76255
76507
  }
@@ -76258,8 +76510,8 @@ async function writeAtomically(sessionFile, text) {
76258
76510
  const dir = path.dirname(sessionFile);
76259
76511
  const base = path.basename(sessionFile);
76260
76512
  const tmp = path.join(dir, `.${base}.prune-${process.pid}-${Date.now()}.tmp`);
76261
- await fs$1.writeFile(tmp, text, "utf-8");
76262
- await fs$1.rename(tmp, sessionFile);
76513
+ await fs.writeFile(tmp, text, "utf-8");
76514
+ await fs.rename(tmp, sessionFile);
76263
76515
  }
76264
76516
  /**
76265
76517
  * Remove empty assistant JSONL entries from the session file.
@@ -76361,7 +76613,7 @@ function isInPoisonRange(version) {
76361
76613
  */
76362
76614
  async function checkSessionPoison(sessionFile) {
76363
76615
  try {
76364
- const firstLine = (await fs$1.readFile(sessionFile, "utf-8")).split("\n")[0];
76616
+ const firstLine = (await fs.readFile(sessionFile, "utf-8")).split("\n")[0];
76365
76617
  if (!firstLine) return null;
76366
76618
  const header = JSON.parse(firstLine);
76367
76619
  if (header.type !== "session") return null;
@@ -76379,7 +76631,7 @@ async function checkSessionPoison(sessionFile) {
76379
76631
  */
76380
76632
  async function archivePoisonedSession(sessionFile) {
76381
76633
  const archiveName = `${sessionFile}.archived-poison.${(/* @__PURE__ */ new Date()).toISOString().replace(/[:.]/g, "-")}`;
76382
- await fs$1.rename(sessionFile, archiveName);
76634
+ await fs.rename(sessionFile, archiveName);
76383
76635
  return archiveName;
76384
76636
  }
76385
76637
  /**
@@ -76388,14 +76640,14 @@ async function archivePoisonedSession(sessionFile) {
76388
76640
  */
76389
76641
  async function stampSessionVersion(sessionFile) {
76390
76642
  try {
76391
- const lines = (await fs$1.readFile(sessionFile, "utf-8")).split("\n");
76643
+ const lines = (await fs.readFile(sessionFile, "utf-8")).split("\n");
76392
76644
  if (lines.length === 0) return;
76393
76645
  const header = JSON.parse(lines[0]);
76394
76646
  if (header.type !== "session") return;
76395
76647
  if (header.symiVersion === VERSION) return;
76396
76648
  header.symiVersion = VERSION;
76397
76649
  lines[0] = JSON.stringify(header);
76398
- await fs$1.writeFile(sessionFile, lines.join("\n"), "utf-8");
76650
+ await fs.writeFile(sessionFile, lines.join("\n"), "utf-8");
76399
76651
  } catch {}
76400
76652
  }
76401
76653
  /**
@@ -76562,7 +76814,7 @@ const SCRIPT_REL_PATH = "skills/long-task/scripts/detach-task.sh";
76562
76814
  let cachedScriptPath;
76563
76815
  function isExecutable(candidatePath) {
76564
76816
  try {
76565
- fs.accessSync(candidatePath, fs.constants.X_OK);
76817
+ fsSync.accessSync(candidatePath, fsSync.constants.X_OK);
76566
76818
  return true;
76567
76819
  } catch {
76568
76820
  return false;
@@ -76587,12 +76839,12 @@ async function resolveDetachScriptPath(params) {
76587
76839
  return null;
76588
76840
  }
76589
76841
  const candidate = path.join(packageRoot, SCRIPT_REL_PATH);
76590
- if (!fs.existsSync(candidate)) {
76842
+ if (!fsSync.existsSync(candidate)) {
76591
76843
  cachedScriptPath = null;
76592
76844
  return null;
76593
76845
  }
76594
76846
  if (!isExecutable(candidate)) try {
76595
- fs.chmodSync(candidate, 493);
76847
+ fsSync.chmodSync(candidate, 493);
76596
76848
  } catch {
76597
76849
  cachedScriptPath = null;
76598
76850
  return null;
@@ -76601,6 +76853,7 @@ async function resolveDetachScriptPath(params) {
76601
76853
  return cachedScriptPath;
76602
76854
  }
76603
76855
  async function buildLongTaskPromptSuffix(params) {
76856
+ if (params.cronEnabled === false) return "";
76604
76857
  const scriptPath = await resolveDetachScriptPath(params);
76605
76858
  if (!scriptPath) return "";
76606
76859
  return "\n\n" + [
@@ -76620,7 +76873,8 @@ async function buildLongTaskPromptSuffix(params) {
76620
76873
  " • If status begins with `running`: tail -n 20 <log>, post a one-sentence progress line.",
76621
76874
  " • If status begins with `complete`: post a final summary with rc and tail, then call cron action=remove on this job id.",
76622
76875
  " • If status begins with `aborted`: post a failure summary with signal and tail, then call cron action=remove.",
76623
- " • Never leave stale monitors running after the task finishes."
76876
+ " • Never leave stale monitors running after the task finishes.",
76877
+ "- Inspecting and killing tasks: use `task_list` to enumerate detached tasks in the workspace (returns id/pid/alive/status/started for each), and `task_cancel` with `taskId` (and optional `signal`, default SIGTERM) to terminate a running task. Prefer these over raw `kill`/`ps` exec calls — they share the detach script's task-id allow-list and report alreadyDead cleanly."
76624
76878
  ].join("\n");
76625
76879
  }
76626
76880
 
@@ -76647,7 +76901,7 @@ async function prepareSessionManagerForRun(params) {
76647
76901
  return;
76648
76902
  }
76649
76903
  if (params.hadSessionFile && header && !hasAssistant) {
76650
- await fs$1.writeFile(params.sessionFile, "", "utf-8");
76904
+ await fs.writeFile(params.sessionFile, "", "utf-8");
76651
76905
  sm.fileEntries = [header];
76652
76906
  sm.byId?.clear?.();
76653
76907
  sm.labelsById?.clear?.();
@@ -77205,7 +77459,7 @@ async function runEmbeddedAttempt(params) {
77205
77459
  const prevCwd = process.cwd();
77206
77460
  const runAbortController = new AbortController();
77207
77461
  log$9.debug(`embedded run start: runId=${params.runId} sessionId=${params.sessionId} provider=${params.provider} model=${params.modelId} thinking=${params.thinkLevel} messageChannel=${params.messageChannel ?? params.messageProvider ?? "unknown"}`);
77208
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
77462
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
77209
77463
  const sandboxSessionKey = params.sessionKey?.trim() || params.sessionId;
77210
77464
  const sandbox = await resolveSandboxContext({
77211
77465
  config: params.config,
@@ -77213,7 +77467,7 @@ async function runEmbeddedAttempt(params) {
77213
77467
  workspaceDir: resolvedWorkspace
77214
77468
  });
77215
77469
  const effectiveWorkspace = sandbox?.enabled ? sandbox.workspaceAccess === "rw" ? resolvedWorkspace : sandbox.workspaceDir : resolvedWorkspace;
77216
- await fs$1.mkdir(effectiveWorkspace, { recursive: true });
77470
+ await fs.mkdir(effectiveWorkspace, { recursive: true });
77217
77471
  let restoreSkillEnv;
77218
77472
  process.chdir(effectiveWorkspace);
77219
77473
  try {
@@ -77434,7 +77688,8 @@ async function runEmbeddedAttempt(params) {
77434
77688
  const longTaskSuffix = await buildLongTaskPromptSuffix({
77435
77689
  argv1: process.argv[1],
77436
77690
  cwd: process.cwd(),
77437
- moduleUrl: import.meta.url
77691
+ moduleUrl: import.meta.url,
77692
+ cronEnabled: process.env.SYMI_SKIP_CRON !== "1" && params.config?.cron?.enabled !== false
77438
77693
  });
77439
77694
  const emailCapabilitySuffix = buildEmailCapabilityPromptSuffix();
77440
77695
  const systemPromptText = createSystemPromptOverride(appendPrompt + longTaskSuffix + emailCapabilitySuffix + profilePromptSuffix)();
@@ -77450,7 +77705,7 @@ async function runEmbeddedAttempt(params) {
77450
77705
  sessionFile: params.sessionFile,
77451
77706
  warn: (message) => log$9.warn(message)
77452
77707
  });
77453
- const hadSessionFile = await fs$1.stat(params.sessionFile).then(() => true).catch(() => false);
77708
+ const hadSessionFile = await fs.stat(params.sessionFile).then(() => true).catch(() => false);
77454
77709
  const transcriptPolicy = resolveTranscriptPolicy({
77455
77710
  modelApi: params.model?.api,
77456
77711
  provider: params.provider,
@@ -78457,7 +78712,7 @@ async function runEmbeddedPiAgent(params) {
78457
78712
  return;
78458
78713
  }
78459
78714
  if (model.provider === "github-copilot") {
78460
- const { resolveCopilotApiToken } = await import("./github-copilot-token-cCYzSU9h.js").then((n) => n.n);
78715
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-B8B2pmph.js").then((n) => n.n);
78461
78716
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
78462
78717
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
78463
78718
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -78542,7 +78797,7 @@ async function runEmbeddedPiAgent(params) {
78542
78797
  }
78543
78798
  runLoopIterations += 1;
78544
78799
  attemptedThinking.add(thinkLevel);
78545
- await fs$1.mkdir(resolvedWorkspace, { recursive: true });
78800
+ await fs.mkdir(resolvedWorkspace, { recursive: true });
78546
78801
  const prompt = provider === "anthropic" ? scrubAnthropicRefusalMagic(params.prompt) : params.prompt;
78547
78802
  const attempt = await runEmbeddedAttempt({
78548
78803
  sessionId: params.sessionId,