abtars 0.3.4-alpha.7 → 0.3.4

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 (348) hide show
  1. package/bundle/{_registry.generated-WGR4WOPT.js → _registry.generated-AVR7DK2A.js} +17 -14
  2. package/bundle/{_registry.generated-WGR4WOPT.js.map → _registry.generated-AVR7DK2A.js.map} +1 -1
  3. package/bundle/{abmind-lazy-7Z44NODV.js → abmind-lazy-E3YCFKQ5.js} +15 -5
  4. package/bundle/abtars-browser.js +4 -4
  5. package/bundle/abtars-cli.js +23 -13
  6. package/bundle/abtars-cli.js.map +2 -2
  7. package/bundle/abtars-restart.js +3 -3
  8. package/bundle/abtars-task.js +3 -3
  9. package/bundle/abtars-task.js.map +2 -2
  10. package/bundle/abtars.js +610 -455
  11. package/bundle/abtars.js.map +4 -4
  12. package/bundle/{acp-raw-client-E6FM45NC.js → acp-raw-client-UCNK3OTU.js} +2 -2
  13. package/bundle/{action-gate-G2V47NHW.js → action-gate-V4FCBHFB.js} +2 -2
  14. package/bundle/{agent-api-adapter-YAHKQMMZ.js → agent-api-adapter-7HEPYSIN.js} +3 -3
  15. package/bundle/{agent-api-rate-limit-WCFXJMGY.js → agent-api-rate-limit-RZSAM3SW.js} +4 -4
  16. package/bundle/{agent-registry-GI6CLT3Z.js → agent-registry-46A2R5KP.js} +7 -7
  17. package/bundle/{bootstrap-X2QYIZIJ.js → bootstrap-MIHJJSWU.js} +2 -2
  18. package/bundle/{bridge-lock-transport-4ZH7QTJP.js → bridge-lock-transport-7RSN7OLJ.js} +4 -4
  19. package/bundle/{browser-DMARZJIN.js → browser-F6BCWJWW.js} +6 -6
  20. package/bundle/{budget-45QOBDWA.js → budget-WUM3SPKW.js} +3 -3
  21. package/bundle/{capability-JFWX3IQF.js → capability-QVRKGRFC.js} +5 -5
  22. package/bundle/{chunk-YSKCQH6E.js → chunk-2IYJ4I66.js} +2 -2
  23. package/bundle/{chunk-KTYGKPYM.js → chunk-2NLUT5S2.js} +6 -6
  24. package/bundle/chunk-3BG3AIDP.js +191 -0
  25. package/bundle/chunk-3BG3AIDP.js.map +7 -0
  26. package/bundle/{chunk-OKAQICWY.js → chunk-3GQX34S2.js} +3 -3
  27. package/bundle/{chunk-QROWBWLL.js → chunk-3XZ773BS.js} +2 -2
  28. package/bundle/{chunk-DYBW4XXL.js → chunk-467SRLLR.js} +2 -2
  29. package/bundle/{chunk-LGP6TYFI.js → chunk-4AILRHUI.js} +97 -8
  30. package/bundle/chunk-4AILRHUI.js.map +7 -0
  31. package/bundle/{chunk-GPZNXY2U.js → chunk-4S3H4OK7.js} +4 -4
  32. package/bundle/{chunk-NDCRWEEJ.js → chunk-4Y5MJQRE.js} +6 -6
  33. package/bundle/{chunk-FRKW6LWB.js → chunk-55UWKI5C.js} +3 -3
  34. package/bundle/{chunk-4UL3KINB.js → chunk-5PNJFDSW.js} +8 -8
  35. package/bundle/{chunk-LUNA6PM5.js → chunk-5RVOEFGT.js} +4 -2
  36. package/bundle/{chunk-LUNA6PM5.js.map → chunk-5RVOEFGT.js.map} +2 -2
  37. package/bundle/{chunk-OXTSWQCX.js → chunk-5Y3FJ2Y7.js} +2 -2
  38. package/bundle/{chunk-TMUYFERL.js → chunk-6B5ZFUPD.js} +2 -2
  39. package/bundle/{chunk-65VCEC32.js → chunk-6PA5JBUU.js} +2 -2
  40. package/bundle/chunk-BNXV7SZI.js +195 -0
  41. package/bundle/chunk-BNXV7SZI.js.map +7 -0
  42. package/bundle/{chunk-AFREM7FX.js → chunk-CK7YTA2F.js} +2 -2
  43. package/bundle/{chunk-NRUSRJXR.js → chunk-DZJ5QZFD.js} +2 -2
  44. package/bundle/{chunk-YRSMGJFP.js → chunk-E67KESEG.js} +2 -2
  45. package/bundle/{chunk-ZV4IWKDJ.js → chunk-E7XD5UGB.js} +3 -3
  46. package/bundle/{chunk-GXL7HJPT.js → chunk-EAX5ZZUL.js} +63 -39
  47. package/bundle/chunk-EAX5ZZUL.js.map +7 -0
  48. package/bundle/{chunk-PEDX56EL.js → chunk-EFGBM555.js} +2 -2
  49. package/bundle/{chunk-EQSG2CRM.js → chunk-FGYDIX54.js} +22 -15
  50. package/bundle/chunk-FGYDIX54.js.map +7 -0
  51. package/bundle/{chunk-XWRADSXO.js → chunk-GF6NVNA7.js} +15 -5
  52. package/bundle/chunk-GF6NVNA7.js.map +7 -0
  53. package/bundle/{chunk-SIFPBTI4.js → chunk-HGSHCQ5F.js} +113 -73
  54. package/bundle/chunk-HGSHCQ5F.js.map +7 -0
  55. package/bundle/{chunk-YRU2K3O6.js → chunk-IMIGG5EO.js} +39 -39
  56. package/bundle/chunk-IMIGG5EO.js.map +7 -0
  57. package/bundle/{chunk-W4EA4GCA.js → chunk-ITOFPJAV.js} +43 -31
  58. package/bundle/chunk-ITOFPJAV.js.map +7 -0
  59. package/bundle/{chunk-UPRZDU6T.js → chunk-IY6UKLPS.js} +3 -3
  60. package/bundle/{chunk-EUZDKV3C.js → chunk-J4RUFAPK.js} +3 -3
  61. package/bundle/{chunk-HZDLFLRP.js → chunk-J7DRPVMU.js} +35 -5
  62. package/bundle/chunk-J7DRPVMU.js.map +7 -0
  63. package/bundle/{chunk-EGL6UMAO.js → chunk-JG4BKXBN.js} +7 -1
  64. package/bundle/chunk-JG4BKXBN.js.map +7 -0
  65. package/bundle/{chunk-5B5B6EHL.js → chunk-JLWYPGWI.js} +5 -5
  66. package/bundle/{chunk-5QUTMUIK.js → chunk-JXYWDAHD.js} +12 -12
  67. package/bundle/{chunk-GRVWZO4C.js → chunk-KOSFXW2S.js} +24 -3
  68. package/bundle/{chunk-GRVWZO4C.js.map → chunk-KOSFXW2S.js.map} +1 -1
  69. package/bundle/{chunk-ONBF5DDU.js → chunk-L72RIPEC.js} +248 -182
  70. package/bundle/chunk-L72RIPEC.js.map +7 -0
  71. package/bundle/{chunk-TEFZ4JA4.js → chunk-NHPLD3C7.js} +2 -2
  72. package/bundle/{chunk-2KC5G3EA.js → chunk-OWUO5RS3.js} +5 -5
  73. package/bundle/{chunk-4MULJ5SS.js → chunk-OY4Q6AMY.js} +71 -49
  74. package/bundle/chunk-OY4Q6AMY.js.map +7 -0
  75. package/bundle/{chunk-WBTJ2E62.js → chunk-P3NODAHF.js} +2 -5
  76. package/bundle/{chunk-WBTJ2E62.js.map → chunk-P3NODAHF.js.map} +2 -2
  77. package/bundle/{chunk-BROFMHC2.js → chunk-PB5GF4FG.js} +334 -237
  78. package/bundle/chunk-PB5GF4FG.js.map +7 -0
  79. package/bundle/{chunk-WYHGNI56.js → chunk-PMD5BLFS.js} +6 -6
  80. package/bundle/{chunk-URQPDCK5.js → chunk-Q66LQMMZ.js} +3 -3
  81. package/bundle/{chunk-HKRSMUXJ.js → chunk-SC2Y5NR2.js} +71 -132
  82. package/bundle/chunk-SC2Y5NR2.js.map +7 -0
  83. package/bundle/chunk-SFL4EPCZ.js +555 -0
  84. package/bundle/chunk-SFL4EPCZ.js.map +7 -0
  85. package/bundle/{chunk-LDUOOKQY.js → chunk-SJPUNDZ3.js} +5 -5
  86. package/bundle/{chunk-LDUOOKQY.js.map → chunk-SJPUNDZ3.js.map} +1 -1
  87. package/bundle/{chunk-JQDJPUHM.js → chunk-TWB2ZGVH.js} +2 -2
  88. package/bundle/{chunk-IJT4KWXT.js → chunk-U4U47YE7.js} +2 -2
  89. package/bundle/{chunk-2FAZIA37.js → chunk-W546CU3A.js} +3 -3
  90. package/bundle/chunk-WC5O5KOE.js +211 -0
  91. package/bundle/chunk-WC5O5KOE.js.map +7 -0
  92. package/bundle/{chunk-JNIHEDKF.js → chunk-XPWYDNWL.js} +2 -2
  93. package/bundle/{chunk-GWILHZPT.js → chunk-XRTXYN66.js} +10 -7
  94. package/bundle/{chunk-GWILHZPT.js.map → chunk-XRTXYN66.js.map} +2 -2
  95. package/bundle/{chunk-EFJVUJBE.js → chunk-Y5FEFKGM.js} +6 -6
  96. package/bundle/chunk-YJZE4OK3.js +169 -0
  97. package/bundle/chunk-YJZE4OK3.js.map +7 -0
  98. package/bundle/{chunk-GVM5YU5I.js → chunk-Z4FZPB42.js} +2 -2
  99. package/bundle/{chunk-7BSQ5UQO.js → chunk-ZSIDQ66D.js} +3 -3
  100. package/bundle/{chunk-XX6BGTPO.js → chunk-ZZZCJJEO.js} +4 -4
  101. package/bundle/{commands-XYEGVUZF.js → commands-2ZW6CMLC.js} +17 -16
  102. package/bundle/{config-M3P5IOAI.js → config-YMY5YHKN.js} +6 -6
  103. package/bundle/{context-2RJHC2LE.js → context-CL2RSLII.js} +7 -5
  104. package/bundle/context-CL2RSLII.js.map +7 -0
  105. package/bundle/{daemon-TB23FFWY.js → daemon-D7SU63OY.js} +3 -3
  106. package/bundle/{delegation-tools-QKNYQGTQ.js → delegation-tools-WS7Z56KZ.js} +12 -12
  107. package/bundle/{deploy-EPDWNHJU.js → deploy-AMTVKIMU.js} +2 -2
  108. package/bundle/{deps-WVK553KF.js → deps-T63AVJKJ.js} +3 -3
  109. package/bundle/{direct-api-transport-E3LNDBJT.js → direct-api-transport-QNNY2WWP.js} +56 -33
  110. package/bundle/direct-api-transport-QNNY2WWP.js.map +7 -0
  111. package/bundle/{discord-adapter-IT3KP3VB.js → discord-adapter-ABAD56Y2.js} +21 -20
  112. package/bundle/{discord-adapter-IT3KP3VB.js.map → discord-adapter-ABAD56Y2.js.map} +1 -1
  113. package/bundle/{dns-wakeup-IDOJIXBX.js → dns-wakeup-V3LEFXPE.js} +9 -33
  114. package/bundle/dns-wakeup-V3LEFXPE.js.map +7 -0
  115. package/bundle/{doctor-probes-B54JFIW3.js → doctor-probes-O6YI6XSZ.js} +6 -2
  116. package/bundle/{env-schema-4JXQUOH4.js → env-schema-B5RB32DC.js} +3 -3
  117. package/bundle/{gossip-3C3BSNPN.js → gossip-SKRCPOBS.js} +9 -5
  118. package/bundle/{guardrails-DL7ZSWVN.js → guardrails-64GQ5Y5K.js} +4 -4
  119. package/bundle/{heartbeat-system-MVTRS4GP.js → heartbeat-system-X4MUTKJD.js} +6 -6
  120. package/bundle/{heartbeat-tier3-ABWL3P7M.js → heartbeat-tier3-2PTPWEQQ.js} +53 -76
  121. package/bundle/heartbeat-tier3-2PTPWEQQ.js.map +7 -0
  122. package/bundle/{hook-system-M3POLUIB.js → hook-system-YB635OC4.js} +3 -3
  123. package/bundle/{hotskills-FWX4QI7V.js → hotskills-Q75D2DK3.js} +5 -5
  124. package/bundle/{install-OS3CU7NF.js → install-RFKKFSGS.js} +17 -30
  125. package/bundle/install-RFKKFSGS.js.map +7 -0
  126. package/bundle/{install-manifest-5PPWMD2W.js → install-manifest-J7ICPCJN.js} +2 -2
  127. package/bundle/{irc-adapter-PTTZD32W.js → irc-adapter-TVEV4R6H.js} +3 -3
  128. package/bundle/{irc-config-CP7ZMUOX.js → irc-config-M676FOFI.js} +4 -4
  129. package/bundle/{kanban-board-M326B2XJ.js → kanban-board-DLEJUCNN.js} +9 -7
  130. package/bundle/{kanban-channel-IJ52OMNA.js → kanban-channel-XOLUHJZJ.js} +6 -6
  131. package/bundle/kanban-delivery-C4QPBNPX.js +45 -0
  132. package/bundle/kanban-delivery-C4QPBNPX.js.map +7 -0
  133. package/bundle/{lazy-require-KCRVT4SI.js → lazy-require-JKQSALXN.js} +3 -3
  134. package/bundle/{logger-OWCSNYCA.js → logger-3EGHBD4R.js} +2 -2
  135. package/bundle/{main-chat-ZNUZCTNS.js → main-chat-3H63REKK.js} +4 -4
  136. package/bundle/{master-user-HSKM4ZFN.js → master-user-MUBUP3KD.js} +5 -5
  137. package/bundle/{media-utils-3ZYOD7SK.js → media-utils-HUUIALAJ.js} +3 -3
  138. package/bundle/{message-pipeline-P5GAQU4Z.js → message-pipeline-GRDRWONR.js} +17 -16
  139. package/bundle/meta.json +3699 -3138
  140. package/bundle/{metrics-collector-L3VPEHII.js → metrics-collector-YMUGY3PI.js} +31 -2
  141. package/bundle/metrics-collector-YMUGY3PI.js.map +7 -0
  142. package/bundle/{model-health-registry-MLEIZSTV.js → model-health-registry-QADMFQFQ.js} +2 -2
  143. package/bundle/{nerve-IGSXBKZZ.js → nerve-QPAEBRKX.js} +3 -3
  144. package/bundle/{notification-BFSIEECG.js → notification-3JICGXWU.js} +6 -6
  145. package/bundle/{openrouter-credits-NTVZDRYM.js → openrouter-credits-7NEIPYJN.js} +3 -3
  146. package/bundle/{orc-tools-4CHEFWSN.js → orc-tools-UZVPONKY.js} +5 -3
  147. package/bundle/{peer-auth-QC4EF2PM.js → peer-auth-RI43DKJE.js} +24 -15
  148. package/bundle/{peer-client-RGEU5HOK.js → peer-client-UITTMWJ2.js} +34 -29
  149. package/bundle/peer-client-UITTMWJ2.js.map +7 -0
  150. package/bundle/{peer-config-TN55LFDC.js → peer-config-URM7DCW6.js} +9 -4
  151. package/bundle/{peer-transport-I6JPLFZ2.js → peer-transport-SI7I72DB.js} +12 -10
  152. package/bundle/{phase-transport-PGKU2KD4.js → phase-transport-ESWWACZI.js} +17 -17
  153. package/bundle/{reconcile-CTFCLQRN.js → reconcile-GFDQYNBD.js} +3 -3
  154. package/bundle/{reconciler-EBKH3JNU.js → reconciler-IEUJXJN2.js} +12 -12
  155. package/bundle/{restore-IFHPI7I7.js → restore-FARTGLQQ.js} +3 -3
  156. package/bundle/{rollback-ANRI3T5Z.js → rollback-GEWPZABG.js} +2 -2
  157. package/bundle/{sandbox-runtime-QROWHDCS.js → sandbox-runtime-DV6E25J6.js} +2 -2
  158. package/bundle/{self-healer-utils-IFAYOQO2.js → self-healer-utils-P4SKNNEM.js} +3 -3
  159. package/bundle/{sha-tracker-ZWBP6CIJ.js → sha-tracker-77SHLYNY.js} +3 -3
  160. package/bundle/{skill-session-BMSRQSHV.js → skill-session-5HSMXY54.js} +3 -3
  161. package/bundle/{skill-stats-JORH5DGM.js → skill-stats-MI3RSWWL.js} +4 -4
  162. package/bundle/{skill-watcher-E4MGLKLS.js → skill-watcher-5L7JE6TN.js} +4 -4
  163. package/bundle/{sleep-36XS6MHJ.js → sleep-I4JFASCY.js} +11 -8
  164. package/bundle/{soul-bundle-VWAVHCZ6.js → soul-bundle-522C3IRH.js} +9 -8
  165. package/bundle/{spin-TI3TSVVT.js → spin-VHNGNWTD.js} +11 -11
  166. package/bundle/{spin-notifications-SE2HVZI7.js → spin-notifications-7NC5XZEM.js} +5 -5
  167. package/bundle/{spin-types-BLPYAETA.js → spin-types-C5KOQOPD.js} +7 -3
  168. package/bundle/{sse-parser-anthropic-A6R4Z2TB.js → sse-parser-anthropic-MMTVWHLI.js} +3 -3
  169. package/bundle/{sse-parser-responses-HSZY3QGJ.js → sse-parser-responses-3AOFN64C.js} +3 -3
  170. package/bundle/{ssrf-guard-O6SHIK6Q.js → ssrf-guard-U2JA72TC.js} +3 -3
  171. package/bundle/{start-7QZIWO3S.js → start-H5IUFAWF.js} +4 -2
  172. package/bundle/{start-7QZIWO3S.js.map → start-H5IUFAWF.js.map} +2 -2
  173. package/bundle/{stt-LGVPXMVR.js → stt-PSOPPBV4.js} +4 -4
  174. package/bundle/{system-status-JZU5FO7B.js → system-status-4LYGOFNO.js} +38 -24
  175. package/bundle/system-status-4LYGOFNO.js.map +7 -0
  176. package/bundle/{task-store-W5BFIAIH.js → task-store-MNCW42BW.js} +4 -4
  177. package/bundle/{telegram-adapter-H6PMFPMB.js → telegram-adapter-O6KIZDY6.js} +69 -46
  178. package/bundle/telegram-adapter-O6KIZDY6.js.map +7 -0
  179. package/bundle/{tool-registry-IZX2IOBM.js → tool-registry-JJMWCQKZ.js} +26 -24
  180. package/bundle/{tool-sandbox-4UC6GAKA.js → tool-sandbox-CNL6V6IH.js} +4 -4
  181. package/bundle/{transport-config-KBF5W2DP.js → transport-config-6MB2K2XC.js} +7 -7
  182. package/bundle/tribe-GDTFYJTK.js +111 -0
  183. package/bundle/tribe-GDTFYJTK.js.map +7 -0
  184. package/bundle/{update-MESYO4LO.js → update-HGQAOC5L.js} +3 -3
  185. package/bundle/{usage-tracker-NXD364VX.js → usage-tracker-SR4BI6ZT.js} +2 -2
  186. package/bundle/{user-registry-35BW4XKM.js → user-registry-4PACZJIJ.js} +4 -4
  187. package/bundle/wire-platform-KKPWNNNQ.js +88 -0
  188. package/bundle/wire-platform-KKPWNNNQ.js.map +7 -0
  189. package/bundle/ws-peer-client-U3NNPOK7.js +370 -0
  190. package/bundle/ws-peer-client-U3NNPOK7.js.map +7 -0
  191. package/package.json +1 -1
  192. package/scripts/abtars-watchdog.service +2 -1
  193. package/scripts/abtars-watchdog.sh +1 -5
  194. package/scripts/emergency-deploy.sh +2 -2
  195. package/scripts/emergency-update.sh +88 -41
  196. package/bundle/chunk-3AAENI2K.js +0 -210
  197. package/bundle/chunk-3AAENI2K.js.map +0 -7
  198. package/bundle/chunk-4MULJ5SS.js.map +0 -7
  199. package/bundle/chunk-4S554KLW.js +0 -105
  200. package/bundle/chunk-4S554KLW.js.map +0 -7
  201. package/bundle/chunk-5GCLBUBS.js +0 -257
  202. package/bundle/chunk-5GCLBUBS.js.map +0 -7
  203. package/bundle/chunk-BROFMHC2.js.map +0 -7
  204. package/bundle/chunk-EGL6UMAO.js.map +0 -7
  205. package/bundle/chunk-EQSG2CRM.js.map +0 -7
  206. package/bundle/chunk-GXL7HJPT.js.map +0 -7
  207. package/bundle/chunk-HKRSMUXJ.js.map +0 -7
  208. package/bundle/chunk-HT2BPTZY.js +0 -241
  209. package/bundle/chunk-HT2BPTZY.js.map +0 -7
  210. package/bundle/chunk-HZDLFLRP.js.map +0 -7
  211. package/bundle/chunk-IKUZPMVA.js +0 -82
  212. package/bundle/chunk-IKUZPMVA.js.map +0 -7
  213. package/bundle/chunk-LGP6TYFI.js.map +0 -7
  214. package/bundle/chunk-ONBF5DDU.js.map +0 -7
  215. package/bundle/chunk-RWRRGE4U.js +0 -72
  216. package/bundle/chunk-RWRRGE4U.js.map +0 -7
  217. package/bundle/chunk-SIFPBTI4.js.map +0 -7
  218. package/bundle/chunk-VUIX5AGB.js +0 -65
  219. package/bundle/chunk-VUIX5AGB.js.map +0 -7
  220. package/bundle/chunk-W4EA4GCA.js.map +0 -7
  221. package/bundle/chunk-XWRADSXO.js.map +0 -7
  222. package/bundle/chunk-Y76VUJSF.js +0 -75
  223. package/bundle/chunk-Y76VUJSF.js.map +0 -7
  224. package/bundle/chunk-YRU2K3O6.js.map +0 -7
  225. package/bundle/context-2RJHC2LE.js.map +0 -7
  226. package/bundle/direct-api-transport-E3LNDBJT.js.map +0 -7
  227. package/bundle/dns-wakeup-IDOJIXBX.js.map +0 -7
  228. package/bundle/heartbeat-tier3-ABWL3P7M.js.map +0 -7
  229. package/bundle/install-OS3CU7NF.js.map +0 -7
  230. package/bundle/metrics-collector-L3VPEHII.js.map +0 -7
  231. package/bundle/peer-client-RGEU5HOK.js.map +0 -7
  232. package/bundle/peer-jwt-NCCPXJRX.js +0 -18
  233. package/bundle/public/css/dashboard.css +0 -542
  234. package/bundle/public/index.html +0 -180
  235. package/bundle/public/js/app.js +0 -437
  236. package/bundle/public/memory-universe.js +0 -384
  237. package/bundle/stream-single-RFJNUTL6.js +0 -34
  238. package/bundle/stream-single-RFJNUTL6.js.map +0 -7
  239. package/bundle/subagent-runtime-5QUVES3W.js +0 -14
  240. package/bundle/system-status-JZU5FO7B.js.map +0 -7
  241. package/bundle/telegram-adapter-H6PMFPMB.js.map +0 -7
  242. package/bundle/usage-tracker-NXD364VX.js.map +0 -7
  243. package/bundle/user-registry-35BW4XKM.js.map +0 -7
  244. package/bundle/ws-peer-client-AIXCXF7V.js +0 -173
  245. package/bundle/ws-peer-client-AIXCXF7V.js.map +0 -7
  246. /package/bundle/{abmind-lazy-7Z44NODV.js.map → abmind-lazy-E3YCFKQ5.js.map} +0 -0
  247. /package/bundle/{acp-raw-client-E6FM45NC.js.map → acp-raw-client-UCNK3OTU.js.map} +0 -0
  248. /package/bundle/{action-gate-G2V47NHW.js.map → action-gate-V4FCBHFB.js.map} +0 -0
  249. /package/bundle/{agent-api-adapter-YAHKQMMZ.js.map → agent-api-adapter-7HEPYSIN.js.map} +0 -0
  250. /package/bundle/{agent-api-rate-limit-WCFXJMGY.js.map → agent-api-rate-limit-RZSAM3SW.js.map} +0 -0
  251. /package/bundle/{agent-registry-GI6CLT3Z.js.map → agent-registry-46A2R5KP.js.map} +0 -0
  252. /package/bundle/{bootstrap-X2QYIZIJ.js.map → bootstrap-MIHJJSWU.js.map} +0 -0
  253. /package/bundle/{bridge-lock-transport-4ZH7QTJP.js.map → bridge-lock-transport-7RSN7OLJ.js.map} +0 -0
  254. /package/bundle/{browser-DMARZJIN.js.map → browser-F6BCWJWW.js.map} +0 -0
  255. /package/bundle/{budget-45QOBDWA.js.map → budget-WUM3SPKW.js.map} +0 -0
  256. /package/bundle/{capability-JFWX3IQF.js.map → capability-QVRKGRFC.js.map} +0 -0
  257. /package/bundle/{chunk-YSKCQH6E.js.map → chunk-2IYJ4I66.js.map} +0 -0
  258. /package/bundle/{chunk-KTYGKPYM.js.map → chunk-2NLUT5S2.js.map} +0 -0
  259. /package/bundle/{chunk-OKAQICWY.js.map → chunk-3GQX34S2.js.map} +0 -0
  260. /package/bundle/{chunk-QROWBWLL.js.map → chunk-3XZ773BS.js.map} +0 -0
  261. /package/bundle/{chunk-DYBW4XXL.js.map → chunk-467SRLLR.js.map} +0 -0
  262. /package/bundle/{chunk-GPZNXY2U.js.map → chunk-4S3H4OK7.js.map} +0 -0
  263. /package/bundle/{chunk-NDCRWEEJ.js.map → chunk-4Y5MJQRE.js.map} +0 -0
  264. /package/bundle/{chunk-FRKW6LWB.js.map → chunk-55UWKI5C.js.map} +0 -0
  265. /package/bundle/{chunk-4UL3KINB.js.map → chunk-5PNJFDSW.js.map} +0 -0
  266. /package/bundle/{chunk-OXTSWQCX.js.map → chunk-5Y3FJ2Y7.js.map} +0 -0
  267. /package/bundle/{chunk-TMUYFERL.js.map → chunk-6B5ZFUPD.js.map} +0 -0
  268. /package/bundle/{chunk-65VCEC32.js.map → chunk-6PA5JBUU.js.map} +0 -0
  269. /package/bundle/{chunk-AFREM7FX.js.map → chunk-CK7YTA2F.js.map} +0 -0
  270. /package/bundle/{chunk-NRUSRJXR.js.map → chunk-DZJ5QZFD.js.map} +0 -0
  271. /package/bundle/{chunk-YRSMGJFP.js.map → chunk-E67KESEG.js.map} +0 -0
  272. /package/bundle/{chunk-ZV4IWKDJ.js.map → chunk-E7XD5UGB.js.map} +0 -0
  273. /package/bundle/{chunk-PEDX56EL.js.map → chunk-EFGBM555.js.map} +0 -0
  274. /package/bundle/{chunk-UPRZDU6T.js.map → chunk-IY6UKLPS.js.map} +0 -0
  275. /package/bundle/{chunk-EUZDKV3C.js.map → chunk-J4RUFAPK.js.map} +0 -0
  276. /package/bundle/{chunk-5B5B6EHL.js.map → chunk-JLWYPGWI.js.map} +0 -0
  277. /package/bundle/{chunk-5QUTMUIK.js.map → chunk-JXYWDAHD.js.map} +0 -0
  278. /package/bundle/{chunk-TEFZ4JA4.js.map → chunk-NHPLD3C7.js.map} +0 -0
  279. /package/bundle/{chunk-2KC5G3EA.js.map → chunk-OWUO5RS3.js.map} +0 -0
  280. /package/bundle/{chunk-WYHGNI56.js.map → chunk-PMD5BLFS.js.map} +0 -0
  281. /package/bundle/{chunk-URQPDCK5.js.map → chunk-Q66LQMMZ.js.map} +0 -0
  282. /package/bundle/{chunk-JQDJPUHM.js.map → chunk-TWB2ZGVH.js.map} +0 -0
  283. /package/bundle/{chunk-IJT4KWXT.js.map → chunk-U4U47YE7.js.map} +0 -0
  284. /package/bundle/{chunk-2FAZIA37.js.map → chunk-W546CU3A.js.map} +0 -0
  285. /package/bundle/{chunk-JNIHEDKF.js.map → chunk-XPWYDNWL.js.map} +0 -0
  286. /package/bundle/{chunk-EFJVUJBE.js.map → chunk-Y5FEFKGM.js.map} +0 -0
  287. /package/bundle/{chunk-GVM5YU5I.js.map → chunk-Z4FZPB42.js.map} +0 -0
  288. /package/bundle/{chunk-7BSQ5UQO.js.map → chunk-ZSIDQ66D.js.map} +0 -0
  289. /package/bundle/{chunk-XX6BGTPO.js.map → chunk-ZZZCJJEO.js.map} +0 -0
  290. /package/bundle/{commands-XYEGVUZF.js.map → commands-2ZW6CMLC.js.map} +0 -0
  291. /package/bundle/{config-M3P5IOAI.js.map → config-YMY5YHKN.js.map} +0 -0
  292. /package/bundle/{daemon-TB23FFWY.js.map → daemon-D7SU63OY.js.map} +0 -0
  293. /package/bundle/{delegation-tools-QKNYQGTQ.js.map → delegation-tools-WS7Z56KZ.js.map} +0 -0
  294. /package/bundle/{deploy-EPDWNHJU.js.map → deploy-AMTVKIMU.js.map} +0 -0
  295. /package/bundle/{deps-WVK553KF.js.map → deps-T63AVJKJ.js.map} +0 -0
  296. /package/bundle/{doctor-probes-B54JFIW3.js.map → doctor-probes-O6YI6XSZ.js.map} +0 -0
  297. /package/bundle/{env-schema-4JXQUOH4.js.map → env-schema-B5RB32DC.js.map} +0 -0
  298. /package/bundle/{gossip-3C3BSNPN.js.map → gossip-SKRCPOBS.js.map} +0 -0
  299. /package/bundle/{guardrails-DL7ZSWVN.js.map → guardrails-64GQ5Y5K.js.map} +0 -0
  300. /package/bundle/{heartbeat-system-MVTRS4GP.js.map → heartbeat-system-X4MUTKJD.js.map} +0 -0
  301. /package/bundle/{hook-system-M3POLUIB.js.map → hook-system-YB635OC4.js.map} +0 -0
  302. /package/bundle/{hotskills-FWX4QI7V.js.map → hotskills-Q75D2DK3.js.map} +0 -0
  303. /package/bundle/{install-manifest-5PPWMD2W.js.map → install-manifest-J7ICPCJN.js.map} +0 -0
  304. /package/bundle/{irc-adapter-PTTZD32W.js.map → irc-adapter-TVEV4R6H.js.map} +0 -0
  305. /package/bundle/{irc-config-CP7ZMUOX.js.map → irc-config-M676FOFI.js.map} +0 -0
  306. /package/bundle/{kanban-board-M326B2XJ.js.map → kanban-board-DLEJUCNN.js.map} +0 -0
  307. /package/bundle/{kanban-channel-IJ52OMNA.js.map → kanban-channel-XOLUHJZJ.js.map} +0 -0
  308. /package/bundle/{lazy-require-KCRVT4SI.js.map → lazy-require-JKQSALXN.js.map} +0 -0
  309. /package/bundle/{logger-OWCSNYCA.js.map → logger-3EGHBD4R.js.map} +0 -0
  310. /package/bundle/{main-chat-ZNUZCTNS.js.map → main-chat-3H63REKK.js.map} +0 -0
  311. /package/bundle/{master-user-HSKM4ZFN.js.map → master-user-MUBUP3KD.js.map} +0 -0
  312. /package/bundle/{media-utils-3ZYOD7SK.js.map → media-utils-HUUIALAJ.js.map} +0 -0
  313. /package/bundle/{message-pipeline-P5GAQU4Z.js.map → message-pipeline-GRDRWONR.js.map} +0 -0
  314. /package/bundle/{model-health-registry-MLEIZSTV.js.map → model-health-registry-QADMFQFQ.js.map} +0 -0
  315. /package/bundle/{nerve-IGSXBKZZ.js.map → nerve-QPAEBRKX.js.map} +0 -0
  316. /package/bundle/{notification-BFSIEECG.js.map → notification-3JICGXWU.js.map} +0 -0
  317. /package/bundle/{openrouter-credits-NTVZDRYM.js.map → openrouter-credits-7NEIPYJN.js.map} +0 -0
  318. /package/bundle/{orc-tools-4CHEFWSN.js.map → orc-tools-UZVPONKY.js.map} +0 -0
  319. /package/bundle/{peer-auth-QC4EF2PM.js.map → peer-auth-RI43DKJE.js.map} +0 -0
  320. /package/bundle/{peer-config-TN55LFDC.js.map → peer-config-URM7DCW6.js.map} +0 -0
  321. /package/bundle/{peer-jwt-NCCPXJRX.js.map → peer-transport-SI7I72DB.js.map} +0 -0
  322. /package/bundle/{peer-transport-I6JPLFZ2.js.map → phase-transport-ESWWACZI.js.map} +0 -0
  323. /package/bundle/{phase-transport-PGKU2KD4.js.map → reconcile-GFDQYNBD.js.map} +0 -0
  324. /package/bundle/{reconciler-EBKH3JNU.js.map → reconciler-IEUJXJN2.js.map} +0 -0
  325. /package/bundle/{restore-IFHPI7I7.js.map → restore-FARTGLQQ.js.map} +0 -0
  326. /package/bundle/{reconcile-CTFCLQRN.js.map → rollback-GEWPZABG.js.map} +0 -0
  327. /package/bundle/{sandbox-runtime-QROWHDCS.js.map → sandbox-runtime-DV6E25J6.js.map} +0 -0
  328. /package/bundle/{self-healer-utils-IFAYOQO2.js.map → self-healer-utils-P4SKNNEM.js.map} +0 -0
  329. /package/bundle/{rollback-ANRI3T5Z.js.map → sha-tracker-77SHLYNY.js.map} +0 -0
  330. /package/bundle/{skill-session-BMSRQSHV.js.map → skill-session-5HSMXY54.js.map} +0 -0
  331. /package/bundle/{sha-tracker-ZWBP6CIJ.js.map → skill-stats-MI3RSWWL.js.map} +0 -0
  332. /package/bundle/{skill-stats-JORH5DGM.js.map → skill-watcher-5L7JE6TN.js.map} +0 -0
  333. /package/bundle/{skill-watcher-E4MGLKLS.js.map → sleep-I4JFASCY.js.map} +0 -0
  334. /package/bundle/{sleep-36XS6MHJ.js.map → soul-bundle-522C3IRH.js.map} +0 -0
  335. /package/bundle/{soul-bundle-VWAVHCZ6.js.map → spin-VHNGNWTD.js.map} +0 -0
  336. /package/bundle/{spin-notifications-SE2HVZI7.js.map → spin-notifications-7NC5XZEM.js.map} +0 -0
  337. /package/bundle/{spin-TI3TSVVT.js.map → spin-types-C5KOQOPD.js.map} +0 -0
  338. /package/bundle/{sse-parser-anthropic-A6R4Z2TB.js.map → sse-parser-anthropic-MMTVWHLI.js.map} +0 -0
  339. /package/bundle/{sse-parser-responses-HSZY3QGJ.js.map → sse-parser-responses-3AOFN64C.js.map} +0 -0
  340. /package/bundle/{ssrf-guard-O6SHIK6Q.js.map → ssrf-guard-U2JA72TC.js.map} +0 -0
  341. /package/bundle/{spin-types-BLPYAETA.js.map → stt-PSOPPBV4.js.map} +0 -0
  342. /package/bundle/{stt-LGVPXMVR.js.map → task-store-MNCW42BW.js.map} +0 -0
  343. /package/bundle/{subagent-runtime-5QUVES3W.js.map → tool-registry-JJMWCQKZ.js.map} +0 -0
  344. /package/bundle/{task-store-W5BFIAIH.js.map → tool-sandbox-CNL6V6IH.js.map} +0 -0
  345. /package/bundle/{tool-registry-IZX2IOBM.js.map → transport-config-6MB2K2XC.js.map} +0 -0
  346. /package/bundle/{tool-sandbox-4UC6GAKA.js.map → update-HGQAOC5L.js.map} +0 -0
  347. /package/bundle/{transport-config-KBF5W2DP.js.map → usage-tracker-SR4BI6ZT.js.map} +0 -0
  348. /package/bundle/{update-MESYO4LO.js.map → user-registry-4PACZJIJ.js.map} +0 -0
@@ -5,34 +5,34 @@ import {
5
5
  } from "./chunk-63A7ZRIH.js";
6
6
  import {
7
7
  transcribeAudio
8
- } from "./chunk-OKAQICWY.js";
8
+ } from "./chunk-3GQX34S2.js";
9
9
  import {
10
10
  ModelNotFoundError
11
- } from "./chunk-5QUTMUIK.js";
11
+ } from "./chunk-JXYWDAHD.js";
12
12
  import {
13
13
  fire,
14
14
  hasHooks
15
- } from "./chunk-NRUSRJXR.js";
15
+ } from "./chunk-DZJ5QZFD.js";
16
+ import {
17
+ init_spin_types,
18
+ parseSessionType,
19
+ sessionType,
20
+ typeLabel
21
+ } from "./chunk-BNXV7SZI.js";
16
22
  import {
17
23
  sanitizeOutbound
18
24
  } from "./chunk-YWZPKBO6.js";
19
25
  import {
20
26
  abmind
21
- } from "./chunk-IKUZPMVA.js";
27
+ } from "./chunk-YJZE4OK3.js";
22
28
  import {
23
29
  buildSoulBundle,
24
30
  init_soul_bundle
25
- } from "./chunk-EFJVUJBE.js";
31
+ } from "./chunk-Y5FEFKGM.js";
26
32
  import {
27
33
  init_user_registry,
28
34
  loadUsers
29
- } from "./chunk-ZV4IWKDJ.js";
30
- import {
31
- init_spin_types,
32
- parseSessionType,
33
- sessionType,
34
- typeLabel
35
- } from "./chunk-Y76VUJSF.js";
35
+ } from "./chunk-E7XD5UGB.js";
36
36
  import {
37
37
  init_bridge_lock_transport,
38
38
  readAndClearRestartReason,
@@ -40,10 +40,10 @@ import {
40
40
  updateBridgeLockField,
41
41
  writeForceSleep,
42
42
  writeSleepStatus
43
- } from "./chunk-GRVWZO4C.js";
43
+ } from "./chunk-KOSFXW2S.js";
44
44
  import {
45
45
  readEntries
46
- } from "./chunk-PEDX56EL.js";
46
+ } from "./chunk-EFGBM555.js";
47
47
  import {
48
48
  init_local_time,
49
49
  localTime
@@ -51,11 +51,11 @@ import {
51
51
  import {
52
52
  getEnv,
53
53
  init_env_schema
54
- } from "./chunk-65VCEC32.js";
54
+ } from "./chunk-6PA5JBUU.js";
55
55
  import {
56
56
  init_log_and_swallow,
57
57
  logAndSwallow
58
- } from "./chunk-YSKCQH6E.js";
58
+ } from "./chunk-2IYJ4I66.js";
59
59
  import {
60
60
  init_logger,
61
61
  logDebug,
@@ -63,7 +63,7 @@ import {
63
63
  logInfo,
64
64
  logTrace,
65
65
  logWarn
66
- } from "./chunk-GWILHZPT.js";
66
+ } from "./chunk-XRTXYN66.js";
67
67
  import {
68
68
  abtarsHome,
69
69
  init_paths
@@ -822,7 +822,7 @@ var commandMiddleware = async (ctx, next) => {
822
822
  updateCtxStart,
823
823
  conversationBuffer
824
824
  } = deps;
825
- const { spin } = await import("./spin-TI3TSVVT.js");
825
+ const { spin } = await import("./spin-VHNGNWTD.js");
826
826
  const registry = loadUsers();
827
827
  const resolvedUserId = msg.userId;
828
828
  const user = registry.byUserId.get(resolvedUserId);
@@ -917,7 +917,7 @@ var busyGuardMiddleware = async (ctx, next) => {
917
917
  const { msg, adapter, deps } = ctx;
918
918
  const userId = msg.userId;
919
919
  const activeId = deps.sessionManager.getActiveSessionId(userId, msg.platform);
920
- const { spin } = await import("./spin-TI3TSVVT.js");
920
+ const { spin } = await import("./spin-VHNGNWTD.js");
921
921
  const entry = spin.getSessionById(activeId);
922
922
  if (!entry) {
923
923
  await next();
@@ -1050,7 +1050,7 @@ async function buildPrompt(msg, text, deps, registry) {
1050
1050
  const userId = msg.userId;
1051
1051
  const sessionKey = deps.sessionManager.getActiveSessionId(userId, msg.platform);
1052
1052
  const bufKey = `${msg.platform}:${channelId}`;
1053
- const { spin } = await import("./spin-TI3TSVVT.js");
1053
+ const { spin } = await import("./spin-VHNGNWTD.js");
1054
1054
  const pSession = spin.getSessionById(sessionKey);
1055
1055
  let prompt = `[${localTime()}] ${text}`;
1056
1056
  let imageContent;
@@ -1398,7 +1398,7 @@ function setIdleCompactReset(fn) {
1398
1398
  async function resetAndPrepare(opts) {
1399
1399
  await opts.transport.resetSession(opts.sessionKey);
1400
1400
  if (opts.conversationBuffer && opts.bufKey) opts.conversationBuffer.clear(opts.bufKey);
1401
- const { spin } = await import("./spin-TI3TSVVT.js");
1401
+ const { spin } = await import("./spin-VHNGNWTD.js");
1402
1402
  const pSession = spin.getSessionById(opts.sessionKey);
1403
1403
  if (pSession) {
1404
1404
  pSession.seen = false;
@@ -1428,8 +1428,8 @@ async function handleInboundMessage(msg, adapter, deps) {
1428
1428
  return;
1429
1429
  }
1430
1430
  }
1431
- const { spin } = await import("./spin-TI3TSVVT.js");
1432
- const { sessionType: sessionType2 } = await import("./spin-types-BLPYAETA.js");
1431
+ const { spin } = await import("./spin-VHNGNWTD.js");
1432
+ const { sessionType: sessionType2 } = await import("./spin-types-C5KOQOPD.js");
1433
1433
  const switchedSession = spin.getActiveSession(msg.userId, msg.platform);
1434
1434
  const switchedToLive = switchedSession?.transport && sessionType2(switchedSession) !== "A" && switchedSession.status === "ready";
1435
1435
  if (switchedToLive) {
@@ -1521,7 +1521,7 @@ ${prompt}`;
1521
1521
  const sessionTransport = activeSession.transport ?? transport;
1522
1522
  logDebug(TAG3, `Route: session=${activeSessionId} type=${sessionType2(activeSession)} transport=${activeSession.transport ? "session" : "main"}`);
1523
1523
  if ("sandboxPolicy" in sessionTransport) {
1524
- const { buildPolicy } = await import("./tool-sandbox-4UC6GAKA.js");
1524
+ const { buildPolicy } = await import("./tool-sandbox-CNL6V6IH.js");
1525
1525
  sessionTransport.sandboxPolicy = buildPolicy("owner");
1526
1526
  }
1527
1527
  if ("isPaused" in sessionTransport) {
@@ -1535,7 +1535,16 @@ ${prompt}`;
1535
1535
  return pending;
1536
1536
  };
1537
1537
  }
1538
- const responsePromise = sessionTransport.sendPrompt(activeSessionId, prompt, imageContent, userId);
1538
+ const responsePromise = deps.sessionManager.spin({
1539
+ type: sessionType2(activeSession),
1540
+ sessionId: activeSessionId,
1541
+ prompt,
1542
+ imageContent,
1543
+ userId,
1544
+ await: true
1545
+ }).then((r) => r.result ?? "");
1546
+ void responsePromise.catch(() => {
1547
+ });
1539
1548
  if (!isVoice && adapter.setReaction && msg.messageId) {
1540
1549
  await adapter.setReaction(channelId, msg.messageId, "\u{1F440}");
1541
1550
  }
@@ -1799,19 +1808,21 @@ Use /model to switch.`, { threadId: msg.threadId });
1799
1808
  }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1800
1809
  }
1801
1810
  const errStr = String(err instanceof Error ? err.message : JSON.stringify(err));
1811
+ const SYNTHETIC_PREFIXES = ["[SESSION START]", "[SYSTEM]", "[TASK COMPLETE]"];
1812
+ const notifyUser = !SYNTHETIC_PREFIXES.some((p) => text.startsWith(p));
1802
1813
  const isContextOverflow = errStr.includes("ValidationException") || (errStr.includes("context window") || errStr.includes("token limit") || errStr.includes("maximum context"));
1803
1814
  const isTimeout = errStr.includes("timed out") || errStr.includes("Prompt already in progress");
1804
1815
  if (isContextOverflow) {
1805
1816
  logWarn(TAG3, `Context overflow detected \u2014 auto-resetting session`);
1806
1817
  await resetAndPrepare({ transport, sessionKey: activeSessionId, reason: `ctx-overflow: ${errStr.slice(0, 100)}` });
1807
- await adapter.sendMessage(channelId, "\u{1F504} Context window full \u2014 session reset. Send your message again.", { threadId: msg.threadId }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1818
+ if (notifyUser) await adapter.sendMessage(channelId, "\u{1F504} Context window full \u2014 session reset. Send your message again.", { threadId: msg.threadId }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1808
1819
  } else if (isTimeout) {
1809
1820
  logWarn(TAG3, `Request timeout \u2014 not resetting session`);
1810
- await adapter.sendMessage(channelId, "\u274C Model timed out.", { threadId: msg.threadId }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1821
+ if (notifyUser) await adapter.sendMessage(channelId, "\u274C Model timed out.", { threadId: msg.threadId }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1811
1822
  } else {
1812
1823
  logError(TAG3, `Pipeline error: ${errStr.slice(0, 500)}`);
1813
1824
  const reason = errStr.includes("credits") ? "OpenRouter credits exhausted \u2014 top up at openrouter.ai/credits" : errStr.includes("rate") || errStr.includes("429") ? "Rate limited." : errStr.includes("auth") || errStr.includes("401") || errStr.includes("403") ? "Authentication failed." : errStr.includes("connect") || errStr.includes("ECONNREFUSED") ? "Connection lost." : errStr.includes("exhausted") || errStr.includes("no candidates") ? "All models exhausted." : errStr.includes("aborted") || errStr.includes("code=20") ? "Request aborted \u2014 model connection dropped." : `Error: ${errStr.slice(0, 80)}`;
1814
- await adapter.sendMessage(channelId, `\u274C ${reason}`, { threadId: msg.threadId }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1825
+ if (notifyUser) await adapter.sendMessage(channelId, `\u274C ${reason}`, { threadId: msg.threadId }).catch((err2) => logAndSwallow(TAG3, "adapter call", err2));
1815
1826
  }
1816
1827
  } finally {
1817
1828
  clearInterval(typingInterval);
@@ -1867,7 +1878,7 @@ function registerCommand(name, handler) {
1867
1878
  registerExact(name, handler);
1868
1879
  }
1869
1880
  async function handleCommand(text, ctx) {
1870
- const isMaster = !ctx.userId || ctx.userId === "master" || (await import("./user-registry-35BW4XKM.js")).loadUsers().byUserId.get(ctx.userId)?.role === "master";
1881
+ const isMaster = !ctx.userId || ctx.userId === "master" || (await import("./user-registry-4PACZJIJ.js")).loadUsers().byUserId.get(ctx.userId)?.role === "master";
1871
1882
  if (!isMaster) {
1872
1883
  const cmd = text.split(/\s/)[0];
1873
1884
  if (cmd.startsWith("/") && !NON_MASTER_COMMANDS.has(cmd)) {
@@ -1901,7 +1912,7 @@ Type /help for available commands.`);
1901
1912
  return false;
1902
1913
  }
1903
1914
  async function triggerNewSession(ctx, reason = "new-session") {
1904
- const { hasHooks: hasHooks2, fire: fireHook } = await import("./hook-system-M3POLUIB.js");
1915
+ const { hasHooks: hasHooks2, fire: fireHook } = await import("./hook-system-YB635OC4.js");
1905
1916
  if (hasHooks2("SessionEnd")) {
1906
1917
  await fireHook("SessionEnd", { event: "SessionEnd", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: ctx.sessionKey, platform: ctx.platform, userId: ctx.userId, reason }).catch((err) => logAndSwallow(TAG4, "fireHook session", err));
1907
1918
  }
@@ -1919,12 +1930,12 @@ async function triggerNewSession(ctx, reason = "new-session") {
1919
1930
  }
1920
1931
  }
1921
1932
  async function triggerResetSession(ctx) {
1922
- const { hasHooks: hasHooks2, fire: fireHook } = await import("./hook-system-M3POLUIB.js");
1933
+ const { hasHooks: hasHooks2, fire: fireHook } = await import("./hook-system-YB635OC4.js");
1923
1934
  if (hasHooks2("SessionEnd")) {
1924
1935
  await fireHook("SessionEnd", { event: "SessionEnd", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: ctx.sessionKey, platform: ctx.platform, userId: ctx.userId, reason: "reset-transport" }).catch((err) => logAndSwallow(TAG4, "fireHook session", err));
1925
1936
  }
1926
1937
  await ctx.idleSave.save(ctx.sessionKey, ctx.chatId);
1927
- const { clearTransportCache } = await import("./transport-config-KBF5W2DP.js");
1938
+ const { clearTransportCache } = await import("./transport-config-6MB2K2XC.js");
1928
1939
  clearTransportCache();
1929
1940
  if (ctx.rebuildTransport) await ctx.rebuildTransport();
1930
1941
  await resetAndPrepare({
@@ -1988,7 +1999,7 @@ var TAG5 = "cmd";
1988
1999
  async function handleNewReset(text, ctx) {
1989
2000
  const isResetDefault = text.trim().toLowerCase() === "/reset default";
1990
2001
  if (isResetDefault) {
1991
- const { resetToDefaults } = await import("./transport-config-KBF5W2DP.js");
2002
+ const { resetToDefaults } = await import("./transport-config-6MB2K2XC.js");
1992
2003
  resetToDefaults();
1993
2004
  } else {
1994
2005
  try {
@@ -2010,17 +2021,29 @@ async function handleNewReset(text, ctx) {
2010
2021
  }
2011
2022
  async function handleCompact(_text, ctx) {
2012
2023
  try {
2024
+ const { isCompactable } = await import("./spin-types-C5KOQOPD.js");
2025
+ if (!isCompactable(ctx.sessionKey)) {
2026
+ await ctx.reply("Compaction not available for this session.");
2027
+ return true;
2028
+ }
2013
2029
  const transport = ctx.transport;
2014
2030
  if (transport.contextOrchestrator) {
2015
2031
  const budget = transport.config?.maxContext ?? 2e5;
2016
- const success = await transport.contextOrchestrator.forceCompact(ctx.sessionKey, budget);
2017
- await ctx.reply(success ? "\u{1F4E6} Compaction complete." : "\u{1F4E6} Nothing to compact.");
2032
+ const result = await transport.contextOrchestrator.forceCompact(ctx.sessionKey, budget);
2033
+ if (result.skipped) {
2034
+ await ctx.reply("Compaction skipped (recent passes saved little \u2014 retry in ~30 min).");
2035
+ } else if (result.ok) {
2036
+ const pct = Math.round(result.savingsPct * 100);
2037
+ await ctx.reply(`Compaction complete. ${result.tokensBefore}\u2192${result.tokensAfter} tokens (${pct}% saved).`);
2038
+ } else {
2039
+ await ctx.reply("Nothing to compact.");
2040
+ }
2018
2041
  } else {
2019
- await ctx.reply("\u{1F4E6} Context engine not active for this transport.");
2042
+ await ctx.reply("Context engine not active for this transport.");
2020
2043
  }
2021
2044
  } catch (err) {
2022
2045
  logError(TAG5, "Manual compaction failed", err);
2023
- await ctx.reply("\u274C Compaction failed.");
2046
+ await ctx.reply("Compaction failed.");
2024
2047
  }
2025
2048
  return true;
2026
2049
  }
@@ -2028,7 +2051,7 @@ async function handleEmergencyAlias(_text, ctx) {
2028
2051
  return handleModels("/model emergency", ctx);
2029
2052
  }
2030
2053
  async function handleModels(text, ctx) {
2031
- const { loadTransport, resolveAgent, getModelsForProvider, writeTransportConfig } = await import("./transport-config-KBF5W2DP.js");
2054
+ const { loadTransport, resolveAgent, getModelsForProvider, writeTransportConfig } = await import("./transport-config-6MB2K2XC.js");
2032
2055
  const tc = loadTransport();
2033
2056
  const prof = tc ? resolveAgent("professor", tc) : null;
2034
2057
  const currentModel = ("currentModel" in ctx.transport ? ctx.transport.currentModel : void 0) ?? prof?.model ?? "unknown";
@@ -2046,8 +2069,8 @@ async function handleModels(text, ctx) {
2046
2069
  if (tc) {
2047
2070
  const hmProvider = tc.hailMary ? tc.providers[tc.hailMary.provider] : void 0;
2048
2071
  if (hmProvider) {
2049
- const { validateProviderReady, formatValidationError } = await import("./transport-config-KBF5W2DP.js");
2050
- const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
2072
+ const { validateProviderReady, formatValidationError } = await import("./transport-config-6MB2K2XC.js");
2073
+ const { getEnv: getEnv2 } = await import("./env-schema-B5RB32DC.js");
2051
2074
  const result = validateProviderReady(tc.hailMary.provider, hmProvider, getEnv2());
2052
2075
  if (!result.ok) {
2053
2076
  await ctx.reply(formatValidationError(tc.hailMary.provider, result));
@@ -2060,7 +2083,7 @@ async function handleModels(text, ctx) {
2060
2083
  return true;
2061
2084
  }
2062
2085
  if (arg === "restore") {
2063
- const { restorePrevious } = await import("./transport-config-KBF5W2DP.js");
2086
+ const { restorePrevious } = await import("./transport-config-6MB2K2XC.js");
2064
2087
  const result = restorePrevious();
2065
2088
  if (!result.ok) {
2066
2089
  await ctx.reply(`\u274C ${result.error}`);
@@ -2072,7 +2095,7 @@ async function handleModels(text, ctx) {
2072
2095
  return true;
2073
2096
  }
2074
2097
  if (arg === "default") {
2075
- const { resetToDefaults } = await import("./transport-config-KBF5W2DP.js");
2098
+ const { resetToDefaults } = await import("./transport-config-6MB2K2XC.js");
2076
2099
  if (!resetToDefaults()) {
2077
2100
  await ctx.reply("\u274C Factory config not found \u2014 run abtars install to restore.");
2078
2101
  return true;
@@ -2080,15 +2103,15 @@ async function handleModels(text, ctx) {
2080
2103
  await ctx.reply("\u{1F504} Factory config restored.");
2081
2104
  return true;
2082
2105
  }
2083
- if (arg === "health reset" || arg === "primary") {
2106
+ if (arg === "health reset" || arg === "primary" || arg === "reset") {
2084
2107
  const t = ctx.transport;
2085
2108
  const wasEmergency = t.isEmergencyMode;
2086
2109
  t.setEmergencyMode?.(null);
2087
2110
  if (t.policy?.registry) {
2088
2111
  t.policy.registry.resetAll();
2089
- await ctx.reply(wasEmergency ? "\u{1F50C} Emergency mode cleared + model health reset \u2014 free models active." : "\u{1F50C} Model health reset \u2014 all models available.");
2112
+ await ctx.reply(wasEmergency ? "Model health reset + emergency mode cleared \u2014 primary model active." : "Model health reset \u2014 all models available (sticky credits/auth cleared).");
2090
2113
  } else {
2091
- await ctx.reply("\u{1F50C} No fallback policy configured.");
2114
+ await ctx.reply("No fallback policy configured.");
2092
2115
  }
2093
2116
  return true;
2094
2117
  }
@@ -2098,7 +2121,7 @@ async function handleModels(text, ctx) {
2098
2121
  return true;
2099
2122
  }
2100
2123
  const endpoint = prof.provider.endpoint ?? "http://localhost:11434/v1";
2101
- const apiKey = prof.provider.apiKeyEnv ? (await import("./env-schema-4JXQUOH4.js")).getEnv().getApiKey(prof.provider.apiKeyEnv) : void 0;
2124
+ const apiKey = prof.provider.apiKeyEnv ? (await import("./env-schema-B5RB32DC.js")).getEnv().getApiKey(prof.provider.apiKeyEnv) : void 0;
2102
2125
  const models = /* @__PURE__ */ new Set();
2103
2126
  for (const [, agent] of Object.entries(tc.agents)) {
2104
2127
  if (agent.provider === prof.providerName) models.add(agent.model);
@@ -2109,7 +2132,7 @@ async function handleModels(text, ctx) {
2109
2132
  if (tc.hailMary?.provider === prof.providerName) models.add(tc.hailMary.model);
2110
2133
  await ctx.reply(`\u{1FA7A} Checking ${models.size} models on ${prof.providerName}...`);
2111
2134
  const results = [];
2112
- const { loadModels } = await import("./transport-config-KBF5W2DP.js");
2135
+ const { loadModels } = await import("./transport-config-6MB2K2XC.js");
2113
2136
  const catalog = loadModels();
2114
2137
  for (const model of models) {
2115
2138
  try {
@@ -2147,7 +2170,7 @@ async function handleModels(text, ctx) {
2147
2170
  }
2148
2171
  const { writeFileSync: writeFileSync2 } = await import("node:fs");
2149
2172
  const { join: join4 } = await import("node:path");
2150
- const { configDir } = await import("./transport-config-KBF5W2DP.js");
2173
+ const { configDir } = await import("./transport-config-6MB2K2XC.js");
2151
2174
  writeFileSync2(join4(configDir(), "models.json"), JSON.stringify(catalog, null, 2) + "\n");
2152
2175
  await ctx.reply(`\u{1FA7A} Model Health:
2153
2176
  ${results.join("\n")}`);
@@ -2170,8 +2193,8 @@ ${results.join("\n")}`);
2170
2193
  return true;
2171
2194
  }
2172
2195
  {
2173
- const { validateProviderReady, formatValidationError } = await import("./transport-config-KBF5W2DP.js");
2174
- const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
2196
+ const { validateProviderReady, formatValidationError } = await import("./transport-config-6MB2K2XC.js");
2197
+ const { getEnv: getEnv2 } = await import("./env-schema-B5RB32DC.js");
2175
2198
  const result = validateProviderReady(prof.providerName, prof.provider, getEnv2());
2176
2199
  if (!result.ok) {
2177
2200
  await ctx.reply(formatValidationError(prof.providerName, result));
@@ -2179,7 +2202,7 @@ ${results.join("\n")}`);
2179
2202
  }
2180
2203
  }
2181
2204
  tc.agents["professor"].model = newModel;
2182
- const { cleanDemotedModels } = await import("./transport-config-KBF5W2DP.js");
2205
+ const { cleanDemotedModels } = await import("./transport-config-6MB2K2XC.js");
2183
2206
  cleanDemotedModels(tc, newModel);
2184
2207
  writeTransportConfig(tc, `professor model \u2192 ${newModel}`);
2185
2208
  if ("setModel" in ctx.transport) {
@@ -2190,7 +2213,7 @@ ${results.join("\n")}`);
2190
2213
  }
2191
2214
  if (arg === "list" || arg.startsWith("list ")) {
2192
2215
  const providerArg = arg.slice(5).trim();
2193
- const { getAvailableProviders, getModelsForProvider: getModels } = await import("./transport-config-KBF5W2DP.js");
2216
+ const { getAvailableProviders, getModelsForProvider: getModels } = await import("./transport-config-6MB2K2XC.js");
2194
2217
  if (!tc) {
2195
2218
  await ctx.reply("\u274C transport.json not loaded");
2196
2219
  return true;
@@ -2248,8 +2271,8 @@ Use /model quick <name> to switch.`);
2248
2271
  await ctx.reply(`\u274C Provider "${providerName}" not found. Available: ${Object.keys(tc.providers).join(", ")}`);
2249
2272
  return true;
2250
2273
  }
2251
- const { validateProviderReady, formatValidationError, loadProviderDefaults } = await import("./transport-config-KBF5W2DP.js");
2252
- const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
2274
+ const { validateProviderReady, formatValidationError, loadProviderDefaults } = await import("./transport-config-6MB2K2XC.js");
2275
+ const { getEnv: getEnv2 } = await import("./env-schema-B5RB32DC.js");
2253
2276
  const validation = validateProviderReady(providerName, provider2, getEnv2());
2254
2277
  if (!validation.ok) {
2255
2278
  await ctx.reply(formatValidationError(providerName, validation));
@@ -2325,12 +2348,13 @@ async function handleReasoning(text, ctx) {
2325
2348
  return true;
2326
2349
  }
2327
2350
  async function handleContinue(_text, ctx) {
2328
- const response = await ctx.transport.sendPrompt(
2329
- ctx.sessionKey,
2330
- "[SYSTEM] Something went wrong during your previous response. Continue from where you left off.",
2331
- void 0,
2332
- ctx.userId
2333
- );
2351
+ const { result: response } = await ctx.sessionManager.spin({
2352
+ type: "A",
2353
+ sessionId: ctx.sessionKey,
2354
+ prompt: "[SYSTEM] Something went wrong during your previous response. Continue from where you left off.",
2355
+ userId: ctx.userId,
2356
+ await: true
2357
+ });
2334
2358
  if (response) await ctx.reply(response);
2335
2359
  return true;
2336
2360
  }
@@ -2341,13 +2365,24 @@ init_log_and_swallow();
2341
2365
  import { readFileSync, readdirSync } from "node:fs";
2342
2366
  import { join as join2 } from "node:path";
2343
2367
  import { homedir } from "node:os";
2368
+
2369
+ // src/components/spawn-safe.ts
2370
+ init_logger();
2371
+ import { spawn } from "node:child_process";
2372
+ function spawnDetached(cmd, args, tag) {
2373
+ const child = spawn(cmd, args, { detached: true, stdio: "ignore" });
2374
+ child.on("error", (err) => logWarn(tag, `spawn ${cmd} failed (non-fatal): ${err.message}`));
2375
+ child.unref();
2376
+ }
2377
+
2378
+ // src/components/commands/handlers-system.ts
2344
2379
  init_paths();
2345
2380
  var TAG6 = "cmd";
2346
2381
  async function handleDoctor(_text, ctx) {
2347
2382
  const arg = _text.replace(/^\/(doctor|health)\s*/i, "").trim().toLowerCase();
2348
2383
  if (arg === "fix" || arg === "fix-full") {
2349
2384
  try {
2350
- const { runFixes, runAllProbes: runAllProbes2, renderHuman: renderHuman2 } = await import("./doctor-probes-B54JFIW3.js");
2385
+ const { runFixes, runAllProbes: runAllProbes2, renderHuman: renderHuman2 } = await import("./doctor-probes-O6YI6XSZ.js");
2351
2386
  const fixes = await runFixes();
2352
2387
  const fixLines = fixes.map((f) => ` ${f.success ? "+" : "x"} ${f.action}`).join("\n");
2353
2388
  const output2 = await runAllProbes2();
@@ -2361,14 +2396,14 @@ ${renderHuman2(output2)}`);
2361
2396
  return true;
2362
2397
  }
2363
2398
  await ctx.reply("\u{1FA7A} Running diagnostics...");
2364
- const { runAllProbes, renderHuman } = await import("./doctor-probes-B54JFIW3.js");
2399
+ const { runAllProbes, renderHuman } = await import("./doctor-probes-O6YI6XSZ.js");
2365
2400
  const output = await runAllProbes();
2366
2401
  await ctx.reply(renderHuman(output));
2367
2402
  return true;
2368
2403
  }
2369
2404
  async function handleStatus(_text, ctx) {
2370
2405
  if (ctx.phaseHealth && ctx.registry) {
2371
- const { getSystemStatus, renderStatusText } = await import("./system-status-JZU5FO7B.js");
2406
+ const { getSystemStatus, renderStatusText } = await import("./system-status-4LYGOFNO.js");
2372
2407
  const status = await getSystemStatus({
2373
2408
  phaseHealth: ctx.phaseHealth,
2374
2409
  registry: ctx.registry,
@@ -2379,7 +2414,7 @@ async function handleStatus(_text, ctx) {
2379
2414
  });
2380
2415
  let text = renderStatusText(status);
2381
2416
  if (_text.trim().toLowerCase() === "full") {
2382
- const { envDump } = await import("./env-schema-4JXQUOH4.js");
2417
+ const { envDump } = await import("./env-schema-B5RB32DC.js");
2383
2418
  const dump = envDump();
2384
2419
  const envLines = Object.entries(dump).slice(0, 30).map(([k, v]) => ` ${k}: ${v}`);
2385
2420
  text += "\n\n\u{1F4CB} Config (top 30):\n" + envLines.join("\n");
@@ -2401,7 +2436,7 @@ async function handleWait(text, ctx) {
2401
2436
  }
2402
2437
  async function handleStop(_text, ctx) {
2403
2438
  await ctx.transport.sendInterrupt();
2404
- const { spin } = await import("./spin-TI3TSVVT.js");
2439
+ const { spin } = await import("./spin-VHNGNWTD.js");
2405
2440
  const s = spin.getSessionById(ctx.sessionKey);
2406
2441
  if (s) s.busy = false;
2407
2442
  await ctx.reply("\u{1F6D1} Ctrl+C sent.");
@@ -2424,7 +2459,7 @@ async function handleRestart(_text, ctx) {
2424
2459
  return true;
2425
2460
  }
2426
2461
  async function handleHeartbeat(_text, ctx) {
2427
- const { getHeartbeatInstance } = await import("./heartbeat-system-MVTRS4GP.js");
2462
+ const { getHeartbeatInstance } = await import("./heartbeat-system-X4MUTKJD.js");
2428
2463
  const hb = getHeartbeatInstance();
2429
2464
  if (!hb) {
2430
2465
  await ctx.reply("\u{1F493} Heartbeat not available.");
@@ -2470,13 +2505,13 @@ async function handleHealing(text, ctx) {
2470
2505
  return true;
2471
2506
  }
2472
2507
  if (cmd === "reset") {
2473
- const { resetAutofixState } = await import("./sha-tracker-ZWBP6CIJ.js");
2508
+ const { resetAutofixState } = await import("./sha-tracker-77SHLYNY.js");
2474
2509
  resetAutofixState();
2475
2510
  await ctx.reply("\u{1FA7A} Autofix state reset \u2014 all suppressed faults re-enabled.");
2476
2511
  return true;
2477
2512
  }
2478
2513
  if (cmd === "list") {
2479
- const { loadFixes } = await import("./sha-tracker-ZWBP6CIJ.js");
2514
+ const { loadFixes } = await import("./sha-tracker-77SHLYNY.js");
2480
2515
  const { readFileSync: readFileSync3 } = await import("node:fs");
2481
2516
  const { join: join4 } = await import("node:path");
2482
2517
  const fixes = loadFixes();
@@ -2506,7 +2541,7 @@ ${lines.join("\n")}`);
2506
2541
  await ctx.reply("Usage: /healing approve <pattern>");
2507
2542
  return true;
2508
2543
  }
2509
- const { approveFix } = await import("./sha-tracker-ZWBP6CIJ.js");
2544
+ const { approveFix } = await import("./sha-tracker-77SHLYNY.js");
2510
2545
  const ok = approveFix(pattern);
2511
2546
  await ctx.reply(ok ? `\u2713 Approved: "${pattern}"` : `\u274C Pattern not found in self-rules.`);
2512
2547
  return true;
@@ -2517,7 +2552,7 @@ ${lines.join("\n")}`);
2517
2552
  await ctx.reply("Usage: /healing disable <pattern>");
2518
2553
  return true;
2519
2554
  }
2520
- const { disableFix } = await import("./sha-tracker-ZWBP6CIJ.js");
2555
+ const { disableFix } = await import("./sha-tracker-77SHLYNY.js");
2521
2556
  const ok = disableFix(pattern);
2522
2557
  await ctx.reply(ok ? `\u2713 Disabled: "${pattern}"` : `\u274C Pattern not found in self-rules.`);
2523
2558
  return true;
@@ -2532,7 +2567,7 @@ async function handleFull(_text, ctx) {
2532
2567
  await ctx.reply("\u{1F4FA} Full mode is only available on Telegram.");
2533
2568
  return true;
2534
2569
  }
2535
- const { spin } = await import("./spin-TI3TSVVT.js");
2570
+ const { spin } = await import("./spin-VHNGNWTD.js");
2536
2571
  const s = spin.getSessionById(ctx.sessionKey);
2537
2572
  if (s) s.fullMode = true;
2538
2573
  await ctx.reply("\u{1F4FA} Full mode \u2014 sending raw output, TTS disabled.");
@@ -2543,7 +2578,7 @@ async function handleShort(_text, ctx) {
2543
2578
  await ctx.reply("\u2702\uFE0F Short mode is only available on Telegram.");
2544
2579
  return true;
2545
2580
  }
2546
- const { spin } = await import("./spin-TI3TSVVT.js");
2581
+ const { spin } = await import("./spin-VHNGNWTD.js");
2547
2582
  const s = spin.getSessionById(ctx.sessionKey);
2548
2583
  if (s) s.fullMode = false;
2549
2584
  await ctx.reply("\u2702\uFE0F Short mode \u2014 clean responses, TTS enabled.");
@@ -2569,7 +2604,7 @@ async function buildStatusLines(ctx) {
2569
2604
  if ("currentModel" in ctx.transport) {
2570
2605
  model = ctx.transport.currentModel;
2571
2606
  } else {
2572
- const { loadTransport, resolveAgent } = await import("./transport-config-KBF5W2DP.js");
2607
+ const { loadTransport, resolveAgent } = await import("./transport-config-6MB2K2XC.js");
2573
2608
  const tc2 = loadTransport();
2574
2609
  const prof2 = tc2 ? resolveAgent("professor", tc2) : null;
2575
2610
  model = prof2?.model ?? "unknown";
@@ -2577,9 +2612,9 @@ async function buildStatusLines(ctx) {
2577
2612
  const transportStatus = ctx.transport.isReady ? "\u2713 Connected" : "\u274C Disconnected";
2578
2613
  const uptime = formatUptime(Date.now() - ctx.startedAt);
2579
2614
  const ctxPct = ctx.transport.contextPercent >= 0 ? `${ctx.transport.contextPercent}%` : "n/a";
2580
- const { getHeartbeatInstance } = await import("./heartbeat-system-MVTRS4GP.js");
2615
+ const { getHeartbeatInstance } = await import("./heartbeat-system-X4MUTKJD.js");
2581
2616
  const hb = getHeartbeatInstance();
2582
- const { loadTransport: lt, resolveAgent: ra } = await import("./transport-config-KBF5W2DP.js");
2617
+ const { loadTransport: lt, resolveAgent: ra } = await import("./transport-config-6MB2K2XC.js");
2583
2618
  const tc = lt();
2584
2619
  const prof = tc ? ra("professor", tc) : null;
2585
2620
  const provider = prof?.providerName ?? "unknown";
@@ -2652,8 +2687,8 @@ function formatUptime(ms) {
2652
2687
  return h > 0 ? `${h}h ${m}m` : `${m}m`;
2653
2688
  }
2654
2689
  async function handleUsage(_text, ctx) {
2655
- const { readUsage, resetUsage } = await import("./usage-tracker-NXD364VX.js");
2656
- const { loadModels } = await import("./transport-config-KBF5W2DP.js");
2690
+ const { readUsage, resetUsage } = await import("./usage-tracker-SR4BI6ZT.js");
2691
+ const { loadModels } = await import("./transport-config-6MB2K2XC.js");
2657
2692
  const arg = _text.replace("/usage", "").trim();
2658
2693
  if (arg === "reset") {
2659
2694
  resetUsage();
@@ -2704,13 +2739,13 @@ async function handleUsage(_text, ctx) {
2704
2739
  `;
2705
2740
  }
2706
2741
  }
2707
- const { fetchOpenRouterCredits } = await import("./openrouter-credits-NTVZDRYM.js");
2742
+ const { fetchOpenRouterCredits } = await import("./openrouter-credits-7NEIPYJN.js");
2708
2743
  const credits = await fetchOpenRouterCredits();
2709
2744
  if (credits) {
2710
2745
  msg += `
2711
2746
  \u{1F4B3} OpenRouter: $${credits.remaining.toFixed(2)} remaining ($${credits.purchased.toFixed(2)} purchased, $${credits.used.toFixed(2)} used)`;
2712
2747
  }
2713
- const { getBudgetStatus } = await import("./budget-45QOBDWA.js");
2748
+ const { getBudgetStatus } = await import("./budget-WUM3SPKW.js");
2714
2749
  const budgetItems = getBudgetStatus();
2715
2750
  if (budgetItems.length > 0) {
2716
2751
  msg += `
@@ -2727,7 +2762,7 @@ async function handleUsage(_text, ctx) {
2727
2762
  return true;
2728
2763
  }
2729
2764
  async function handleOpenRouter(_text, ctx) {
2730
- const { fetchOpenRouterCredits } = await import("./openrouter-credits-NTVZDRYM.js");
2765
+ const { fetchOpenRouterCredits } = await import("./openrouter-credits-7NEIPYJN.js");
2731
2766
  const credits = await fetchOpenRouterCredits();
2732
2767
  if (!credits) {
2733
2768
  await ctx.reply("\u274C OpenRouter API key not set or request failed.");
@@ -2743,7 +2778,7 @@ Remaining: $${credits.remaining.toFixed(2)}`
2743
2778
  return true;
2744
2779
  }
2745
2780
  async function handleWhoami(_text, ctx) {
2746
- const { loadUsers: loadUsers2 } = await import("./user-registry-35BW4XKM.js");
2781
+ const { loadUsers: loadUsers2 } = await import("./user-registry-4PACZJIJ.js");
2747
2782
  const reg = loadUsers2();
2748
2783
  const CLASS_NAMES = ["UNCLASSIFIED", "RESTRICTED", "CONFIDENTIAL", "SECRET"];
2749
2784
  const user = ctx.userId ? reg.byUserId.get(ctx.userId) : void 0;
@@ -2758,12 +2793,86 @@ chatId: ${ctx.chatId}`);
2758
2793
  }
2759
2794
  return true;
2760
2795
  }
2796
+ function makeExecHelper(spawnFn) {
2797
+ return (cmd, args, opts) => new Promise((resolve) => {
2798
+ let stdout = "", stderr = "";
2799
+ const proc = spawnFn(cmd, args, { cwd: opts.cwd, stdio: ["ignore", "pipe", "pipe"] });
2800
+ proc.stdout?.on("data", (d) => {
2801
+ stdout += d.toString();
2802
+ });
2803
+ proc.stderr?.on("data", (d) => {
2804
+ stderr += d.toString();
2805
+ });
2806
+ const timer = setTimeout(() => {
2807
+ proc.kill("SIGKILL");
2808
+ resolve({ stdout, stderr: stderr + "\n[timed out]", ok: false });
2809
+ }, opts.timeout);
2810
+ proc.on("close", (code) => {
2811
+ clearTimeout(timer);
2812
+ resolve({ stdout, stderr, ok: code === 0 });
2813
+ });
2814
+ proc.on("error", (e) => {
2815
+ clearTimeout(timer);
2816
+ resolve({ stdout, stderr: String(e), ok: false });
2817
+ });
2818
+ });
2819
+ }
2820
+ async function runDevUpdate(ctx, spawnFn, execHelper) {
2821
+ const releasesRoot = join2(process.env["HOME"] ?? "", ".abtars-releases", "src");
2822
+ const abtarsDir = join2(releasesRoot, "abtars");
2823
+ const execP = execHelper ?? makeExecHelper(spawnFn);
2824
+ await ctx.reply("Checking for updates...");
2825
+ const fetchResult = await execP("git", ["-C", abtarsDir, "fetch", "origin", "dev"], { timeout: 3e4 });
2826
+ if (!fetchResult.ok) {
2827
+ const detail = (fetchResult.stderr || fetchResult.stdout).slice(-300);
2828
+ logWarn("update", `git fetch failed: ${detail}`);
2829
+ await ctx.reply(`x git fetch failed \u2014 bridge left running. Retry /update dev.
2830
+ ${detail}`);
2831
+ return;
2832
+ }
2833
+ const originSha = (await execP("git", ["-C", abtarsDir, "rev-parse", "--short", "origin/dev"], { timeout: 5e3 })).stdout.trim();
2834
+ let deployedCommit = "";
2835
+ try {
2836
+ const mf = JSON.parse(readFileSync(join2(abtarsHome(), "manifest.json"), "utf-8"));
2837
+ deployedCommit = mf.commit ?? "";
2838
+ } catch {
2839
+ }
2840
+ if (originSha && deployedCommit && originSha === deployedCommit) {
2841
+ await ctx.reply("Already up to date.");
2842
+ return;
2843
+ }
2844
+ const range = deployedCommit ? `${deployedCommit}..origin/dev` : "HEAD..origin/dev";
2845
+ const logResult = await execP("git", ["-C", abtarsDir, "log", "--oneline", range], { timeout: 5e3 });
2846
+ const commits = logResult.stdout.trim();
2847
+ const header = commits ? `${commits.split("\n").length} new commit(s):
2848
+ ${commits.slice(0, 300)}
2849
+
2850
+ ` : "";
2851
+ await ctx.reply(`${header}Deploying...`);
2852
+ logInfo("update", "git update requested");
2853
+ try {
2854
+ const co = await execP("git", ["-C", abtarsDir, "checkout", "origin/dev"], { timeout: 1e4 });
2855
+ if (!co.ok) throw new Error(`checkout failed: ${co.stderr.slice(-300) || co.stdout.slice(-300)}`);
2856
+ const build = await execP("node", ["esbuild.config.js"], { cwd: abtarsDir, timeout: 18e4 });
2857
+ if (!build.ok) throw new Error(`build failed: ${build.stderr.slice(-400) || build.stdout.slice(-400)}`);
2858
+ } catch (err) {
2859
+ const msg = err instanceof Error ? err.message : String(err);
2860
+ logWarn("update", `update aborted: ${msg}`);
2861
+ await ctx.reply(`x Update aborted \u2014 bridge left running (old build still active). Retry /update dev.
2862
+ ${msg.slice(-400)}`);
2863
+ return;
2864
+ }
2865
+ const bundleCli = join2(abtarsDir, "bundle", "abtars-cli.js");
2866
+ const deployProc = spawnFn("node", [bundleCli, "update", "--dev", abtarsDir], { detached: true, stdio: "ignore" });
2867
+ deployProc.on("error", (err) => logWarn("update", `spawn deploy process failed (non-fatal): ${err.message}`));
2868
+ deployProc.unref();
2869
+ }
2761
2870
  async function handleSoftware(_text, ctx) {
2762
2871
  const { existsSync } = await import("node:fs");
2763
2872
  const { abtarsHome: abtarsHome2 } = await import("./paths-X4LRYUI6.js");
2764
2873
  const home = abtarsHome2();
2765
2874
  const arg = _text.replace(/^\/(software|update)\s*/i, "").trim();
2766
- const { loadUsers: loadUsers2 } = await import("./user-registry-35BW4XKM.js");
2875
+ const { loadUsers: loadUsers2 } = await import("./user-registry-4PACZJIJ.js");
2767
2876
  const user = loadUsers2().byUserId.get(ctx.userId);
2768
2877
  const isMaster = user?.role === "master";
2769
2878
  if (arg.startsWith("rollback")) {
@@ -2783,7 +2892,7 @@ async function handleSoftware(_text, ctx) {
2783
2892
  }
2784
2893
  await ctx.reply(`\u26A0\uFE0F Rolling back to slot ${asSlot}...`);
2785
2894
  try {
2786
- const { rollback } = await import("./rollback-ANRI3T5Z.js");
2895
+ const { rollback } = await import("./rollback-GEWPZABG.js");
2787
2896
  const code = await rollback({ to: asSlot });
2788
2897
  if (code !== 0) {
2789
2898
  await ctx.reply(`\u274C Rollback failed (exit ${code}).`);
@@ -2793,6 +2902,29 @@ async function handleSoftware(_text, ctx) {
2793
2902
  }
2794
2903
  return true;
2795
2904
  }
2905
+ if (arg === "abmind" || arg === "update abmind") {
2906
+ if (!isMaster) {
2907
+ await ctx.reply("Requires master role.");
2908
+ return true;
2909
+ }
2910
+ await ctx.reply("Updating abmind from dev (pull + build + install)...");
2911
+ logInfo("update", "abmind dev update requested");
2912
+ const { spawn: spawn3 } = await import("node:child_process");
2913
+ const child = spawn3("abmind", ["update", "--dev"], { stdio: ["ignore", "pipe", "pipe"] });
2914
+ let stderr = "";
2915
+ child.on("error", (err) => logWarn("update", `spawn abmind failed (non-fatal): ${err.message}`));
2916
+ child.stderr?.on("data", (d) => {
2917
+ stderr += d.toString();
2918
+ });
2919
+ child.on("close", (code) => {
2920
+ if (code !== 0 && code !== null) ctx.reply(`x abmind update failed (exit ${code}):
2921
+ ${stderr.slice(-300)}`).catch(() => {
2922
+ });
2923
+ else ctx.reply("+ abmind update complete \u2014 check /software").catch(() => {
2924
+ });
2925
+ });
2926
+ return true;
2927
+ }
2796
2928
  if (arg === "update" || arg === "update dev" || arg === "dev" || arg === "update git" || arg === "git" || arg === "update alpha" || arg === "alpha" || arg === "update stable" || arg === "stable" || arg === "update deploy" || arg === "deploy" || arg === "update pull" || arg === "pull" || arg === "update build" || arg === "build") {
2797
2929
  if (arg === "update") {
2798
2930
  await ctx.reply("Usage: /update dev | alpha | stable");
@@ -2804,97 +2936,15 @@ async function handleSoftware(_text, ctx) {
2804
2936
  return true;
2805
2937
  }
2806
2938
  if (channel === "dev") {
2807
- const { spawn: spawn2 } = await import("node:child_process");
2808
- const releasesRoot = join2(process.env["HOME"] ?? "", ".abtars-releases", "src");
2809
- const abtarsDir = join2(releasesRoot, "abtars");
2810
- const abmindDir = join2(releasesRoot, "abmind");
2811
- const execP = (cmd, args, opts) => new Promise((resolve) => {
2812
- const { spawn: sp } = __require("node:child_process");
2813
- let stdout = "";
2814
- const proc = sp(cmd, args, { cwd: opts.cwd, stdio: ["ignore", "pipe", "pipe"] });
2815
- proc.stdout?.on("data", (d) => {
2816
- stdout += d.toString();
2817
- });
2818
- const timer = setTimeout(() => {
2819
- proc.kill("SIGKILL");
2820
- resolve({ stdout, ok: false });
2821
- }, opts.timeout);
2822
- proc.on("close", (code) => {
2823
- clearTimeout(timer);
2824
- resolve({ stdout, ok: code === 0 });
2825
- });
2826
- proc.on("error", () => {
2827
- clearTimeout(timer);
2828
- resolve({ stdout, ok: false });
2829
- });
2830
- });
2831
- const emergencyScript = join2(abtarsDir, "scripts", "emergency-update.sh");
2832
- await ctx.reply("Checking for updates...");
2833
- const fetchResult = await execP("git", ["-C", abtarsDir, "fetch", "origin", "dev"], { timeout: 3e4 });
2834
- if (!fetchResult.ok) {
2835
- await ctx.reply("git fetch timed out \u2014 running emergency update.");
2836
- spawn2("bash", [emergencyScript], { detached: true, stdio: "ignore" }).unref();
2837
- return true;
2838
- }
2839
- const logResult = await execP("git", ["-C", abtarsDir, "log", "--oneline", "HEAD..origin/dev"], { timeout: 5e3 });
2840
- const commits = logResult.stdout.trim();
2841
- if (!commits) {
2842
- await ctx.reply("Already up to date.");
2843
- return true;
2844
- }
2845
- const lines2 = commits.split("\n");
2846
- await ctx.reply(`${lines2.length} new commit(s):
2847
- ${commits.slice(0, 300)}
2848
-
2849
- Deploying...`);
2850
- logInfo("update", "git update requested");
2851
- try {
2852
- const co = await execP("git", ["-C", abtarsDir, "checkout", "origin/dev"], { timeout: 1e4 });
2853
- if (!co.ok) throw new Error("checkout failed");
2854
- const abmindGit = join2(abmindDir, ".git");
2855
- if (!existsSync(abmindGit)) {
2856
- const cloneResult = await execP("git", ["clone", "--depth", "1", "-b", "dev", "https://github.com/aksika/abmind.git", abmindDir], { timeout: 12e4 });
2857
- if (!cloneResult.ok) logWarn("update", "abmind clone failed \u2014 skipping abmind update");
2858
- }
2859
- if (existsSync(abmindGit)) {
2860
- await execP("git", ["-C", abmindDir, "fetch", "origin", "dev"], { timeout: 3e4 });
2861
- await execP("git", ["-C", abmindDir, "checkout", "origin/dev"], { timeout: 1e4 });
2862
- }
2863
- const build = await execP("node", ["esbuild.config.js"], { cwd: abtarsDir, timeout: 6e4 });
2864
- if (!build.ok) throw new Error("build failed");
2865
- if (ctx.memoryConfig.memoryEnabled && existsSync(abmindGit)) {
2866
- let needAbmindUpdate = false;
2867
- try {
2868
- const manifestRaw = readFileSync(join2(homedir(), ".abmind", "manifest.json"), "utf-8");
2869
- const mf = JSON.parse(manifestRaw);
2870
- if (!mf.source) {
2871
- needAbmindUpdate = true;
2872
- } else if (mf.source === "npm") {
2873
- needAbmindUpdate = true;
2874
- } else {
2875
- const headCommit = (await execP("git", ["-C", abmindDir, "rev-parse", "--short", "HEAD"], { timeout: 5e3 })).stdout.trim();
2876
- if (!headCommit || headCommit !== (mf.commit ?? "")) needAbmindUpdate = true;
2877
- }
2878
- } catch {
2879
- needAbmindUpdate = true;
2880
- }
2881
- if (needAbmindUpdate) {
2882
- spawn2("abmind", ["update", "--dev", abmindDir], { detached: true, stdio: "ignore" }).unref();
2883
- }
2884
- }
2885
- } catch {
2886
- await ctx.reply("Build/checkout failed \u2014 running emergency update.");
2887
- spawn2("bash", [emergencyScript], { detached: true, stdio: "ignore" }).unref();
2888
- return true;
2889
- }
2890
- const bundleCli = join2(abtarsDir, "bundle", "abtars-cli.js");
2891
- spawn2("node", [bundleCli, "update", "--dev", abtarsDir], { detached: true, stdio: "ignore" }).unref();
2939
+ const { spawn: spawn3 } = await import("node:child_process");
2940
+ await runDevUpdate(ctx, spawn3);
2892
2941
  } else if (channel === "alpha") {
2893
2942
  await ctx.reply("Updating from npm (alpha)...");
2894
2943
  logInfo("update", "npm alpha update requested");
2895
- const { spawn: spawn2 } = await import("node:child_process");
2896
- const child = spawn2("abtars", ["update", "--source", "npm", "--tag", "alpha"], { stdio: ["ignore", "pipe", "pipe"] });
2944
+ const { spawn: spawn3 } = await import("node:child_process");
2945
+ const child = spawn3("abtars", ["update", "--source", "npm", "--tag", "alpha"], { stdio: ["ignore", "pipe", "pipe"] });
2897
2946
  let stderr = "";
2947
+ child.on("error", (err) => logWarn("update", `spawn abtars failed (non-fatal): ${err.message}`));
2898
2948
  child.stderr?.on("data", (d) => {
2899
2949
  stderr += d.toString();
2900
2950
  });
@@ -2903,15 +2953,13 @@ Deploying...`);
2903
2953
  ${stderr.slice(-300)}`).catch(() => {
2904
2954
  });
2905
2955
  });
2906
- if (ctx.memoryConfig.memoryEnabled) {
2907
- spawn2("abmind", ["update", "--alpha"], { detached: true, stdio: "ignore" }).unref();
2908
- }
2909
2956
  } else {
2910
2957
  await ctx.reply("Updating from npm (stable)...");
2911
2958
  logInfo("update", "npm stable update requested");
2912
- const { spawn: spawn2 } = await import("node:child_process");
2913
- const child = spawn2("abtars", ["update", "--source", "npm"], { stdio: ["ignore", "pipe", "pipe"] });
2959
+ const { spawn: spawn3 } = await import("node:child_process");
2960
+ const child = spawn3("abtars", ["update", "--source", "npm"], { stdio: ["ignore", "pipe", "pipe"] });
2914
2961
  let stderr = "";
2962
+ child.on("error", (err) => logWarn("update", `spawn abtars failed (non-fatal): ${err.message}`));
2915
2963
  child.stderr?.on("data", (d) => {
2916
2964
  stderr += d.toString();
2917
2965
  });
@@ -2920,9 +2968,6 @@ ${stderr.slice(-300)}`).catch(() => {
2920
2968
  ${stderr.slice(-300)}`).catch(() => {
2921
2969
  });
2922
2970
  });
2923
- if (ctx.memoryConfig.memoryEnabled) {
2924
- spawn2("abmind", ["update", "--stable"], { detached: true, stdio: "ignore" }).unref();
2925
- }
2926
2971
  }
2927
2972
  return true;
2928
2973
  }
@@ -2933,8 +2978,7 @@ ${stderr.slice(-300)}`).catch(() => {
2933
2978
  }
2934
2979
  logInfo("update", "npm alpha update (legacy /update npm)");
2935
2980
  await ctx.reply("Updating from npm (alpha)...");
2936
- const { spawn: spawn2 } = await import("node:child_process");
2937
- spawn2("abtars", ["update", "--source", "npm", "--tag", "alpha"], { detached: true, stdio: "ignore" }).unref();
2981
+ spawnDetached("abtars", ["update", "--source", "npm", "--tag", "alpha"], "update");
2938
2982
  return true;
2939
2983
  }
2940
2984
  if (arg === "check") {
@@ -2974,7 +3018,7 @@ ${stderr.slice(-300)}`).catch(() => {
2974
3018
  lines.push(" abtars: unknown");
2975
3019
  }
2976
3020
  lines.push("");
2977
- const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
3021
+ const { getEnv: getEnv2 } = await import("./env-schema-B5RB32DC.js");
2978
3022
  const memoryProvider = getEnv2().memory;
2979
3023
  if (memoryProvider === "abmind" || memoryProvider === "auto") {
2980
3024
  const abmindBundlePkg = join2(home, "app", "bundle", "node_modules", "abmind", "package.json");
@@ -3065,7 +3109,7 @@ ${stderr.slice(-300)}`).catch(() => {
3065
3109
  return true;
3066
3110
  }
3067
3111
  async function handleMetrics(_text, ctx) {
3068
- const { getMetricsSummary } = await import("./metrics-collector-L3VPEHII.js");
3112
+ const { getMetricsSummary } = await import("./metrics-collector-YMUGY3PI.js");
3069
3113
  const s = getMetricsSummary();
3070
3114
  const lines = ["Metrics (recent window):"];
3071
3115
  const models = Object.entries(s.llm);
@@ -3085,6 +3129,10 @@ Recall: p50=${s.recall.p50}ms p95=${s.recall.p95}ms (${s.recall.calls} calls)`);
3085
3129
  const rate = s.sleep.calls > 0 ? Math.round((1 - s.sleep.failures / s.sleep.calls) * 100) : 100;
3086
3130
  lines.push(`
3087
3131
  Sleep: ${s.sleep.calls} runs, ${rate}% success`);
3132
+ }
3133
+ if (s.compaction) {
3134
+ lines.push(`
3135
+ Compaction: ${s.compaction.count} passes (${s.compaction.failures} failed), p50=${s.compaction.p50}ms p95=${s.compaction.p95}ms, avg ${s.compaction.avgSavingsPct}% saved`);
3088
3136
  }
3089
3137
  lines.push(`
3090
3138
  Cron depth: avg=${s.cronDepth.avg} max=${s.cronDepth.max}`);
@@ -3283,7 +3331,7 @@ init_logger();
3283
3331
  init_log_and_swallow();
3284
3332
  init_env_schema();
3285
3333
  init_bridge_lock_transport();
3286
- import { spawn } from "node:child_process";
3334
+ import { spawn as spawn2 } from "node:child_process";
3287
3335
  import { readFileSync as readFileSync2, readdirSync as readdirSync2, unlinkSync } from "node:fs";
3288
3336
  import { join as join3 } from "node:path";
3289
3337
  import { platform } from "node:os";
@@ -3380,9 +3428,11 @@ async function handleWakeup(_text, ctx) {
3380
3428
  const os = platform();
3381
3429
  let child = null;
3382
3430
  if (os === "darwin") {
3383
- child = spawn("caffeinate", ["-su"], { stdio: "ignore", detached: true });
3431
+ child = spawn2("caffeinate", ["-su"], { stdio: "ignore", detached: true });
3432
+ child.on("error", (err) => logWarn("wakeup", `spawn caffeinate failed (non-fatal): ${err.message}`));
3384
3433
  } else if (os === "linux") {
3385
- child = spawn("systemd-inhibit", ["--what=idle:sleep", "sleep", "infinity"], { stdio: "ignore", detached: true });
3434
+ child = spawn2("systemd-inhibit", ["--what=idle:sleep", "sleep", "infinity"], { stdio: "ignore", detached: true });
3435
+ child.on("error", (err) => logWarn("wakeup", `spawn systemd-inhibit failed (non-fatal): ${err.message}`));
3386
3436
  }
3387
3437
  if (child?.pid) {
3388
3438
  child.unref();
@@ -3437,7 +3487,7 @@ async function handleTasksList(_text, ctx) {
3437
3487
  const now = (/* @__PURE__ */ new Date()).toLocaleString("en-GB", { timeZone: tz, dateStyle: "medium", timeStyle: "medium" });
3438
3488
  let listing;
3439
3489
  try {
3440
- const { readEntries: readEntries2 } = await import("./task-store-W5BFIAIH.js");
3490
+ const { readEntries: readEntries2 } = await import("./task-store-MNCW42BW.js");
3441
3491
  const entries = readEntries2();
3442
3492
  const active = entries.filter((e) => !e.fired);
3443
3493
  active.sort((a, b) => {
@@ -3502,7 +3552,7 @@ async function handleTasksTrigger(text, ctx) {
3502
3552
  return true;
3503
3553
  }
3504
3554
  let id = raw;
3505
- const { readEntry, readEntries: readEntries2 } = await import("./task-store-W5BFIAIH.js");
3555
+ const { readEntry, readEntries: readEntries2 } = await import("./task-store-MNCW42BW.js");
3506
3556
  if (!readEntry(id)) {
3507
3557
  const normalized = raw.toLowerCase().replace(/\s+/g, "-");
3508
3558
  if (readEntry(normalized)) {
@@ -3575,59 +3625,105 @@ async function handleTaskPause(text, ctx) {
3575
3625
  }
3576
3626
  async function handleKanban(text, ctx) {
3577
3627
  try {
3578
- const { kanbanList } = await import("./kanban-board-M326B2XJ.js");
3579
- const arg = text.replace(/^\/kanban\s*/, "").trim();
3580
- const ALLOWED_FILTERS = /* @__PURE__ */ new Set(["status", "source", "priority", "labels", "type"]);
3581
- let filterVal;
3582
- let filterKey;
3583
- let showAll = false;
3628
+ const { kanbanList, kanbanGetCard, kanbanSearch } = await import("./kanban-board-DLEJUCNN.js");
3629
+ const arg = text.replace(/^\/kanban\s*/i, "").trim().replace(/[\u201C\u201D\u201E\u201F]/g, '"');
3630
+ if (!arg) {
3631
+ const cards = kanbanList();
3632
+ if (cards.length === 0) {
3633
+ await ctx.reply("Kanban board is empty.");
3634
+ return true;
3635
+ }
3636
+ await ctx.reply(renderList(cards));
3637
+ return true;
3638
+ }
3584
3639
  if (arg === "all") {
3585
- showAll = true;
3586
- } else if (arg && arg.includes("=")) {
3587
- const [key, val] = arg.split("=", 2);
3588
- if (!key || !val || !ALLOWED_FILTERS.has(key)) {
3589
- await ctx.reply(`\u274C Invalid filter. Use: /kanban [all | status=X | source=X | priority=X | labels=X | type=X]`);
3640
+ const cards = kanbanList("*");
3641
+ if (cards.length === 0) {
3642
+ await ctx.reply("Kanban board is empty.");
3590
3643
  return true;
3591
3644
  }
3592
- filterKey = key;
3593
- filterVal = val.replace(/[^a-zA-Z0-9_,-]/g, "").slice(0, 30);
3594
- } else if (arg) {
3595
- filterVal = arg.replace(/[^a-zA-Z0-9_,-]/g, "").slice(0, 30);
3596
- }
3597
- const cards = showAll ? kanbanList("*") : kanbanList(filterVal, filterKey);
3598
- if (cards.length === 0) {
3599
- await ctx.reply("\u{1F4CB} Kanban board is empty.");
3645
+ await ctx.reply(renderList(cards));
3600
3646
  return true;
3601
3647
  }
3602
- const lines = cards.map((c) => {
3603
- const icon = c.status === "delivered" ? "\u2713" : c.status === "done" ? "+" : c.status === "running" ? "~" : c.status === "failed" ? "\u2717" : "-";
3604
- const due = c.due_at ? ` due:${c.due_at.slice(0, 10)}` : "";
3605
- const doneAt = c.delivered_at ? ` ${c.delivered_at.slice(2, 10).replace(/-/g, "")}:${c.delivered_at.slice(11, 16).replace(":", "")}` : "";
3606
- const title = c.title.length > 20 ? c.title.slice(0, 17) + "\u2026" : c.title;
3607
- return `${icon} #${c.id} ${title} (${c.source}/${c.priority})${doneAt}${due}`;
3608
- });
3609
- const header = `\u{1F4CB} Kanban Board (${cards.length}):
3610
- `;
3611
- let body = "";
3612
- for (const line of lines) {
3613
- if (header.length + body.length + line.length + 1 > 3900) {
3614
- body += `
3615
- \u2026 +${cards.length - body.split("\n").length} more`;
3616
- break;
3648
+ if (/^\d+$/.test(arg)) {
3649
+ const card = kanbanGetCard(Number(arg));
3650
+ if (!card) {
3651
+ await ctx.reply(`No card #${arg}.`);
3652
+ return true;
3617
3653
  }
3618
- body += (body ? "\n" : "") + line;
3654
+ await ctx.reply(renderDetail(card));
3655
+ return true;
3619
3656
  }
3620
- await ctx.reply(header + body);
3657
+ if (/^".*"$/.test(arg)) {
3658
+ const term = arg.slice(1, -1).trim();
3659
+ if (!term) {
3660
+ await ctx.reply(`Usage: /kanban "<search term>"`);
3661
+ return true;
3662
+ }
3663
+ const cards = kanbanSearch(term);
3664
+ if (cards.length === 0) {
3665
+ await ctx.reply(`No cards matching "${term}".`);
3666
+ return true;
3667
+ }
3668
+ await ctx.reply(renderList(cards));
3669
+ return true;
3670
+ }
3671
+ await ctx.reply(`Usage:
3672
+ /kanban \u2014 active cards
3673
+ /kanban all \u2014 all cards
3674
+ /kanban <id> \u2014 ticket detail
3675
+ /kanban "<term>" \u2014 search`);
3621
3676
  } catch (err) {
3622
- await ctx.reply(`\u274C Failed: ${err instanceof Error ? err.message : String(err)}`);
3677
+ await ctx.reply(`Failed: ${err instanceof Error ? err.message : String(err)}`);
3623
3678
  }
3624
3679
  return true;
3625
3680
  }
3681
+ function renderList(cards) {
3682
+ const lines = cards.map((c) => {
3683
+ const icon = c.status === "delivered" ? "\u2713" : c.status === "done" ? "+" : c.status === "running" ? "~" : c.status === "failed" ? "\u2717" : "-";
3684
+ const due = c.due_at ? ` due:${c.due_at.slice(0, 10)}` : "";
3685
+ const doneAt = c.delivered_at ? ` ${c.delivered_at.slice(2, 10).replace(/-/g, "")}:${c.delivered_at.slice(11, 16).replace(":", "")}` : "";
3686
+ const title = c.title.length > 20 ? c.title.slice(0, 17) + "\u2026" : c.title;
3687
+ return `${icon} #${c.id} ${title} (${c.source}/${c.priority})${doneAt}${due}`;
3688
+ });
3689
+ const header = `Kanban Board (${cards.length}):
3690
+ `;
3691
+ let body = "";
3692
+ for (const line of lines) {
3693
+ if (header.length + body.length + line.length + 1 > 3900) {
3694
+ body += `
3695
+ \u2026 +${cards.length - body.split("\n").length} more`;
3696
+ break;
3697
+ }
3698
+ body += (body ? "\n" : "") + line;
3699
+ }
3700
+ return header + body;
3701
+ }
3702
+ function renderDetail(c) {
3703
+ if (!c) return "(not found)";
3704
+ const icon = c.status === "delivered" ? "\u2713" : c.status === "done" ? "+" : c.status === "running" ? "~" : c.status === "failed" ? "\u2717" : "-";
3705
+ const lines = [
3706
+ `${icon} #${c.id}: ${c.title}`,
3707
+ `Status: ${c.status} | Priority: ${c.priority} | Source: ${c.source}`
3708
+ ];
3709
+ if (c.type) lines.push(`Type: ${c.type}`);
3710
+ if (c.labels) lines.push(`Labels: ${c.labels}`);
3711
+ if (c.assignee && c.assignee !== "professor") lines.push(`Assignee: ${c.assignee}`);
3712
+ if (c.due_at) lines.push(`Due: ${c.due_at.slice(0, 10)}`);
3713
+ lines.push(`Created: ${c.created_at.slice(0, 16)}`);
3714
+ if (c.completed_at) lines.push(`Completed:${c.completed_at.slice(0, 16)}`);
3715
+ if (c.delivered_at) lines.push(`Delivered:${c.delivered_at.slice(0, 16)}`);
3716
+ if (c.result_path) lines.push(`File: ${c.result_path}`);
3717
+ if (c.result_summary) lines.push(`Result: ${c.result_summary.slice(0, 300)}${c.result_summary.length > 300 ? "\u2026" : ""}`);
3718
+ if (c.error) lines.push(`Error: ${c.error.slice(0, 200)}`);
3719
+ if (c.notes) lines.push(`Notes: ${c.notes.slice(0, 100)}`);
3720
+ return lines.join("\n");
3721
+ }
3626
3722
  async function handleChannel(text, ctx) {
3627
3723
  const args = text.replace(/^\/channel\s*/i, "").trim();
3628
- const { channelRead, channelPost } = await import("./kanban-channel-IJ52OMNA.js");
3724
+ const { channelRead, channelPost } = await import("./kanban-channel-XOLUHJZJ.js");
3629
3725
  if (!args) {
3630
- const { kanbanList } = await import("./kanban-board-M326B2XJ.js");
3726
+ const { kanbanList } = await import("./kanban-board-DLEJUCNN.js");
3631
3727
  const active = kanbanList("running");
3632
3728
  if (active.length === 0) {
3633
3729
  await ctx.reply("No active channels.");
@@ -3692,7 +3788,7 @@ async function handleTodo(_text, ctx) {
3692
3788
  init_log_and_swallow();
3693
3789
  var TAG10 = "cmd_admin";
3694
3790
  async function handleUsers(text, ctx) {
3695
- const { loadUsers: loadUsers2 } = await import("./user-registry-35BW4XKM.js");
3791
+ const { loadUsers: loadUsers2 } = await import("./user-registry-4PACZJIJ.js");
3696
3792
  const parts = text.trim().split(/\s+/);
3697
3793
  const sub = parts[1];
3698
3794
  if (sub === "approve" && parts[2]) {
@@ -3753,19 +3849,19 @@ async function handleSkills(text, ctx) {
3753
3849
  await ctx.reply("Usage: /skill run <name>");
3754
3850
  return true;
3755
3851
  }
3756
- const { launchSkill } = await import("./skill-session-BMSRQSHV.js");
3852
+ const { launchSkill } = await import("./skill-session-5HSMXY54.js");
3757
3853
  const err = await launchSkill(skillName, ctx.userId, String(ctx.chatId));
3758
3854
  await ctx.reply(err ?? `* Skill "${skillName}" started.`);
3759
3855
  return true;
3760
3856
  }
3761
3857
  if (args === "stop") {
3762
- const { endSkillSession } = await import("./skill-session-BMSRQSHV.js");
3858
+ const { endSkillSession } = await import("./skill-session-5HSMXY54.js");
3763
3859
  const ended = await endSkillSession(String(ctx.chatId));
3764
3860
  await ctx.reply(ended ? "* Skill session ended." : "No active skill session.");
3765
3861
  return true;
3766
3862
  }
3767
3863
  if (args === "list") {
3768
- const { listRunnableSkills } = await import("./skill-session-BMSRQSHV.js");
3864
+ const { listRunnableSkills } = await import("./skill-session-5HSMXY54.js");
3769
3865
  const skills2 = listRunnableSkills();
3770
3866
  if (skills2.length === 0) {
3771
3867
  await ctx.reply("No runnable skills (no skill.json found).");
@@ -3779,12 +3875,12 @@ Use: /skill run <name>`);
3779
3875
  return true;
3780
3876
  }
3781
3877
  if (text.includes("reload")) {
3782
- const { reloadCatalog } = await import("./hotskills-FWX4QI7V.js");
3878
+ const { reloadCatalog } = await import("./hotskills-Q75D2DK3.js");
3783
3879
  const count = reloadCatalog();
3784
3880
  await ctx.reply(`Reloaded \u2014 ${count} skills available.`);
3785
3881
  return true;
3786
3882
  }
3787
- const { getSkillCache } = await import("./hotskills-FWX4QI7V.js");
3883
+ const { getSkillCache } = await import("./hotskills-Q75D2DK3.js");
3788
3884
  const skills = getSkillCache();
3789
3885
  if (skills.length === 0) {
3790
3886
  await ctx.reply("\u{1F4DA} No skills loaded.");
@@ -3811,7 +3907,7 @@ ${sections.join("\n\n")}`);
3811
3907
  return true;
3812
3908
  }
3813
3909
  async function handleHooks(_text, ctx) {
3814
- const { getHookSummary } = await import("./hook-system-M3POLUIB.js");
3910
+ const { getHookSummary } = await import("./hook-system-YB635OC4.js");
3815
3911
  const summary = getHookSummary();
3816
3912
  const lines = ["\u{1FA9D} Hooks:"];
3817
3913
  for (const { event, hooks } of summary) {
@@ -3827,7 +3923,7 @@ async function handleHooks(_text, ctx) {
3827
3923
  async function handleMcp(_text, ctx) {
3828
3924
  const arg = _text.replace(/^\/mcp\s*/i, "").trim().toLowerCase();
3829
3925
  if (arg === "start") {
3830
- const { loadUsers: loadUsers2 } = await import("./user-registry-35BW4XKM.js");
3926
+ const { loadUsers: loadUsers2 } = await import("./user-registry-4PACZJIJ.js");
3831
3927
  const registry = loadUsers2();
3832
3928
  const user = registry.byUserId.get(ctx.userId);
3833
3929
  if (user?.role !== "master") {
@@ -3890,6 +3986,7 @@ async function handleHelp(_text, ctx) {
3890
3986
  "/software update npm \u2014 Update from npm registry",
3891
3987
  "/software rollback <version|slot> \u2014 Roll back to previous version or slot (1-3)",
3892
3988
  "/update \u2014 Alias for /software update pull",
3989
+ "/update abmind \u2014 Update abmind from dev (pull + build + install)",
3893
3990
  "/model \u2014 Model configuration (provider, context, fallbacks)",
3894
3991
  "/model set <name> \u2014 Switch model",
3895
3992
  "/doctor \u2014 Deep probe all subsystems",
@@ -3935,7 +4032,7 @@ ${cmds.join("\n")}`);
3935
4032
  return true;
3936
4033
  }
3937
4034
  async function handlePeers(_text, ctx) {
3938
- const { getPeerTable } = await import("./gossip-3C3BSNPN.js");
4035
+ const { getPeerTable } = await import("./gossip-SKRCPOBS.js");
3939
4036
  const peers = getPeerTable(true);
3940
4037
  if (peers.length === 0) {
3941
4038
  await ctx.reply("No peers configured or gossip not started.");
@@ -3964,7 +4061,7 @@ var TAG11 = "cmd:session";
3964
4061
  async function handleSession(text, ctx) {
3965
4062
  const args = text.replace(/^\/session\s*/i, "").trim();
3966
4063
  if (!args) {
3967
- const { getMasterUserId } = await import("./master-user-HSKM4ZFN.js");
4064
+ const { getMasterUserId } = await import("./master-user-MUBUP3KD.js");
3968
4065
  const isMaster = ctx.userId === getMasterUserId();
3969
4066
  await ctx.reply(ctx.sessionManager.formatList(ctx.userId, ctx.platform, isMaster));
3970
4067
  return true;
@@ -4147,4 +4244,4 @@ export {
4147
4244
  resetAndPrepare,
4148
4245
  handleInboundMessage
4149
4246
  };
4150
- //# sourceMappingURL=chunk-BROFMHC2.js.map
4247
+ //# sourceMappingURL=chunk-PB5GF4FG.js.map