abtars 0.2.1-alpha.8 → 0.2.1

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 (257) hide show
  1. package/README.md +98 -42
  2. package/bundle/{_registry.generated-ADOYFJJ4.js → _registry.generated-FNJOX7VV.js} +19 -16
  3. package/bundle/{_registry.generated-ADOYFJJ4.js.map → _registry.generated-FNJOX7VV.js.map} +1 -1
  4. package/bundle/abtars-browser.js +5 -6
  5. package/bundle/abtars-browser.js.map +2 -2
  6. package/bundle/abtars-cli.js +339 -271
  7. package/bundle/abtars-cli.js.map +4 -4
  8. package/bundle/abtars-restart.js +4 -4
  9. package/bundle/abtars-rss.js +25 -81
  10. package/bundle/abtars-rss.js.map +2 -2
  11. package/bundle/abtars-task.js +4 -5
  12. package/bundle/abtars-task.js.map +2 -2
  13. package/bundle/abtars-todo.js +133 -0
  14. package/bundle/abtars-todo.js.map +7 -0
  15. package/bundle/abtars.js +239 -155
  16. package/bundle/abtars.js.map +3 -3
  17. package/bundle/action-gate-DYV2XQBP.js +191 -0
  18. package/bundle/action-gate-DYV2XQBP.js.map +7 -0
  19. package/bundle/{agent-api-rate-limit-C25WGSFF.js → agent-api-rate-limit-R2OFAQ3N.js} +4 -4
  20. package/bundle/{agent-registry-SYUFNSVB.js → agent-registry-S2MNHQYQ.js} +8 -8
  21. package/bundle/{bridge-lock-transport-HO545SBK.js → bridge-lock-transport-N6OGDOSE.js} +5 -5
  22. package/bundle/{browse-delivery-VTLEAVYA.js → browse-delivery-DXGMDMXA.js} +8 -7
  23. package/bundle/{browser-REIXOJ6S.js → browser-QMYGSP5W.js} +11 -10
  24. package/bundle/{capability-ILW3D5HS.js → capability-733TLH4W.js} +6 -6
  25. package/bundle/{chunk-ZVDVNSXK.js → chunk-2SWKJX64.js} +7 -7
  26. package/bundle/{chunk-PZE3J7ER.js → chunk-3OXQWII3.js} +2 -2
  27. package/bundle/{chunk-R36WIOYX.js → chunk-3X6VGRL6.js} +33 -6
  28. package/bundle/chunk-3X6VGRL6.js.map +7 -0
  29. package/bundle/{chunk-4KJ76TTE.js → chunk-4XW7YA3K.js} +3 -3
  30. package/bundle/{chunk-Q62SXS73.js → chunk-BBDKU4EH.js} +9 -9
  31. package/bundle/{chunk-EX2SRTUE.js → chunk-CYSGXNBY.js} +2 -2
  32. package/bundle/{chunk-LYEAHE5V.js → chunk-DCY7DGMT.js} +2 -2
  33. package/bundle/chunk-DGS7J4P6.js +13 -0
  34. package/bundle/chunk-DGS7J4P6.js.map +7 -0
  35. package/bundle/{chunk-LDKSCXGL.js → chunk-DHPFI7OF.js} +8 -6
  36. package/bundle/{chunk-LDKSCXGL.js.map → chunk-DHPFI7OF.js.map} +1 -1
  37. package/bundle/{chunk-G6IXMYIO.js → chunk-DO4INSXE.js} +2 -2
  38. package/bundle/{chunk-VA5WKN3Z.js → chunk-EGA6JQVV.js} +4 -4
  39. package/bundle/chunk-EKHNWFEQ.js +85 -0
  40. package/bundle/chunk-EKHNWFEQ.js.map +7 -0
  41. package/bundle/{chunk-URAQLQ2U.js → chunk-F3HMZFIL.js} +4 -4
  42. package/bundle/{chunk-OOKLEC6V.js → chunk-FY3QUO2L.js} +7 -7
  43. package/bundle/{chunk-2BY6I4P5.js → chunk-GUTRAMK3.js} +2 -2
  44. package/bundle/{chunk-GPL57SRN.js → chunk-H7RX7UCR.js} +3 -3
  45. package/bundle/{chunk-BYDUMHXT.js → chunk-HAF2AFBW.js} +2 -2
  46. package/bundle/{chunk-A5OJYQNU.js → chunk-HCYENZAB.js} +49 -22
  47. package/bundle/chunk-HCYENZAB.js.map +7 -0
  48. package/bundle/{chunk-OZ4IZFV4.js → chunk-HJQZP5CK.js} +9 -9
  49. package/bundle/{chunk-OZ4IZFV4.js.map → chunk-HJQZP5CK.js.map} +2 -2
  50. package/bundle/{chunk-HEHD3GG5.js → chunk-ITB2K6LI.js} +6 -13
  51. package/bundle/{chunk-HEHD3GG5.js.map → chunk-ITB2K6LI.js.map} +3 -3
  52. package/bundle/{chunk-KSEIWT4T.js → chunk-JFKOPNKL.js} +10 -10
  53. package/bundle/chunk-JFKOPNKL.js.map +7 -0
  54. package/bundle/{chunk-4BUOO6WI.js → chunk-KL5QRHHK.js} +31 -11
  55. package/bundle/chunk-KL5QRHHK.js.map +7 -0
  56. package/bundle/{chunk-KFENC7BM.js → chunk-L33WNMCP.js} +2 -2
  57. package/bundle/{chunk-JRG4EFMP.js → chunk-LBMETTUP.js} +3 -3
  58. package/bundle/{chunk-TYVI3ZWA.js → chunk-LJAG2URA.js} +10 -7
  59. package/bundle/chunk-LJAG2URA.js.map +7 -0
  60. package/bundle/{chunk-RV54J75Q.js → chunk-MHK4UPM6.js} +13 -12
  61. package/bundle/chunk-MHK4UPM6.js.map +7 -0
  62. package/bundle/chunk-NIYVCGBC.js +330 -0
  63. package/bundle/chunk-NIYVCGBC.js.map +7 -0
  64. package/bundle/{chunk-P2BZSLJJ.js → chunk-OGZXYN6E.js} +392 -125
  65. package/bundle/chunk-OGZXYN6E.js.map +7 -0
  66. package/bundle/{chunk-TOUZC6NR.js → chunk-OKMN6J4Z.js} +3 -3
  67. package/bundle/{chunk-CELR236Q.js → chunk-Q7CH5DA3.js} +2 -2
  68. package/bundle/{chunk-XZSYMCLF.js → chunk-QIAFGDRL.js} +7 -7
  69. package/bundle/chunk-RITEGAW6.js +138 -0
  70. package/bundle/chunk-RITEGAW6.js.map +7 -0
  71. package/bundle/{chunk-UDZIZB5F.js → chunk-RTL7HO3N.js} +3 -3
  72. package/bundle/{chunk-ITG6XGBS.js → chunk-SA44ITVX.js} +10 -10
  73. package/bundle/{chunk-3MO2MDXJ.js → chunk-SA6YEFNG.js} +3 -3
  74. package/bundle/{chunk-GBBTK6H2.js → chunk-SRFEIZQT.js} +4 -4
  75. package/bundle/{chunk-ELRAH7VL.js → chunk-VXUVKC66.js} +3 -3
  76. package/bundle/{chunk-X5FBUA53.js → chunk-WLAVZSVZ.js} +69 -30
  77. package/bundle/chunk-WLAVZSVZ.js.map +7 -0
  78. package/bundle/{chunk-RSWUPUNA.js → chunk-WMWI3SJ7.js} +30 -6
  79. package/bundle/chunk-WMWI3SJ7.js.map +7 -0
  80. package/bundle/{chunk-MJ6PHMOK.js → chunk-WW5F2DCO.js} +11 -2
  81. package/bundle/chunk-WW5F2DCO.js.map +7 -0
  82. package/bundle/chunk-YWZPKBO6.js +22 -0
  83. package/bundle/chunk-YWZPKBO6.js.map +7 -0
  84. package/bundle/{chunk-KWBGYWDO.js → chunk-Z4SWEFIY.js} +12 -14
  85. package/bundle/chunk-Z4SWEFIY.js.map +7 -0
  86. package/bundle/chunk-ZAA7B5BN.js +22 -0
  87. package/bundle/chunk-ZAA7B5BN.js.map +7 -0
  88. package/bundle/{commands-WUGPBPHI.js → commands-AXW7L2MZ.js} +15 -14
  89. package/bundle/{config-DQIGDX4W.js → config-NDEYF4AQ.js} +7 -7
  90. package/bundle/{daemon-NPKYZ3CJ.js → daemon-WOQXCKNL.js} +4 -4
  91. package/bundle/{delegation-tools-6FICZQ5G.js → delegation-tools-Z5OM3TXS.js} +5 -5
  92. package/bundle/{deploy-lib-import-SBKXDD3F.js → deploy-lib-import-6VJTYXEG.js} +2 -2
  93. package/bundle/{deps-HN6CEXA4.js → deps-65V7XXG4.js} +4 -4
  94. package/bundle/{direct-api-transport-TRV45NO6.js → direct-api-transport-LSAUIP5S.js} +27 -15
  95. package/bundle/direct-api-transport-LSAUIP5S.js.map +7 -0
  96. package/bundle/{discord-adapter-WA2MFRK3.js → discord-adapter-LNWTIOUK.js} +27 -24
  97. package/bundle/discord-adapter-LNWTIOUK.js.map +7 -0
  98. package/bundle/{dns-wakeup-RYOCQ6GR.js → dns-wakeup-N46RPU5E.js} +3 -3
  99. package/bundle/{doctor-R54GZPKL.js → doctor-PIPSGI3H.js} +18 -7
  100. package/bundle/{doctor-R54GZPKL.js.map → doctor-PIPSGI3H.js.map} +2 -2
  101. package/bundle/{ensure-invariants-BJIEOSJ2.js → ensure-invariants-3NOBCYWS.js} +4 -4
  102. package/bundle/{env-schema-XCPAJ6IZ.js → env-schema-T43X43BU.js} +4 -4
  103. package/bundle/{hook-system-POI5VRIX.js → hook-system-ZCVOFFRD.js} +4 -4
  104. package/bundle/hotskills-DTROJY6G.js +17 -0
  105. package/bundle/{install-GEXWJYJC.js → install-FZT43PTH.js} +3 -3
  106. package/bundle/{install-manifest-QRWID3KZ.js → install-manifest-KBYD7SAY.js} +3 -3
  107. package/bundle/{irc-adapter-AIEP6OX6.js → irc-adapter-HXO5D4SW.js} +3 -3
  108. package/bundle/{irc-config-6VY67UPQ.js → irc-config-XN5VW2V4.js} +5 -5
  109. package/bundle/{lazy-require-UFYFFX2R.js → lazy-require-R3JYCV5M.js} +4 -4
  110. package/bundle/{media-utils-MOE36VWY.js → media-utils-W7XW3SVV.js} +4 -4
  111. package/bundle/{message-pipeline-2MBT44FO.js → message-pipeline-QX272U5X.js} +17 -14
  112. package/bundle/meta.json +2965 -2294
  113. package/bundle/{notification-U6F5ZBSG.js → notification-ULESRDHB.js} +7 -6
  114. package/bundle/{openrouter-credits-7XXO6QGQ.js → openrouter-credits-PLIKRY5D.js} +4 -4
  115. package/bundle/{paths-ZJYIDND2.js → paths-QQM74XYT.js} +4 -2
  116. package/bundle/{peer-client-T44VI7NB.js → peer-client-D2F5QWRV.js} +8 -8
  117. package/bundle/{peer-config-D5A4454H.js → peer-config-5SUIBJLG.js} +5 -5
  118. package/bundle/{phase-transport-FEZ4SIJJ.js → phase-transport-BSGROTHY.js} +10 -10
  119. package/bundle/restore-Z6MF54HS.js +151 -0
  120. package/bundle/restore-Z6MF54HS.js.map +7 -0
  121. package/bundle/{install-SH4UVUXQ.js → rollback-5RXXLUD6.js} +5 -7
  122. package/bundle/{self-healer-utils-7NFH22VJ.js → self-healer-utils-WPKOVXJD.js} +4 -4
  123. package/bundle/{skill-stats-IPVKMWN3.js → skill-stats-NHNH47QW.js} +5 -5
  124. package/bundle/{sleep-BPWX3FCN.js → sleep-K7EXAFGW.js} +8 -8
  125. package/bundle/{soul-bundle-BRIUDEQ2.js → soul-bundle-QTPWDJB2.js} +7 -7
  126. package/bundle/{soul-loader-GBXJ7EBH.js → soul-loader-LCPTN4PK.js} +8 -8
  127. package/bundle/{sse-parser-anthropic-H42TTLBD.js → sse-parser-anthropic-PYDJM3UC.js} +4 -4
  128. package/bundle/{sse-parser-responses-WG2LY2ML.js → sse-parser-responses-FYT7A5WT.js} +4 -4
  129. package/bundle/{ssrf-guard-E2KBBC5E.js → ssrf-guard-R4P5OCTO.js} +4 -4
  130. package/bundle/{start-CBVKNEAT.js → start-4DNURGIY.js} +1 -1
  131. package/bundle/{stt-CF3CPFDC.js → stt-YN77NND6.js} +5 -5
  132. package/bundle/{subagent-runtime-4MTYUBIZ.js → subagent-runtime-FQAT3564.js} +5 -5
  133. package/bundle/system-event-buffer-OEPPNUGK.js +17 -0
  134. package/bundle/system-event-buffer-OEPPNUGK.js.map +7 -0
  135. package/bundle/{system-message-TALP6GP2.js → system-message-BRU267FW.js} +3 -3
  136. package/bundle/{system-status-GLYXXDE3.js → system-status-7K2QTH3J.js} +58 -51
  137. package/bundle/system-status-7K2QTH3J.js.map +7 -0
  138. package/bundle/{hotskills-6ECHLXTJ.js → task-failure-buffer-DPM5MWZ5.js} +8 -7
  139. package/bundle/{task-store-LC7ZMS72.js → task-store-VCBHAB43.js} +5 -5
  140. package/bundle/{telegram-adapter-BJJYXN7J.js → telegram-adapter-LXLSG4SK.js} +51 -33
  141. package/bundle/telegram-adapter-LXLSG4SK.js.map +7 -0
  142. package/bundle/{tool-registry-T7XLTI2Q.js → tool-registry-5PXNSYOI.js} +12 -9
  143. package/bundle/{tool-sandbox-OZMXJZLQ.js → tool-sandbox-TLAL55QP.js} +5 -5
  144. package/bundle/{transport-config-G5NKQXPJ.js → transport-config-JIKHB7GT.js} +8 -8
  145. package/bundle/update-check-AJMIBQGQ.js +81 -0
  146. package/bundle/update-check-AJMIBQGQ.js.map +7 -0
  147. package/bundle/{user-registry-NUVNEHJU.js → user-registry-PEFDZ5AV.js} +5 -5
  148. package/core/skills/tools/rss/SKILL.md +51 -0
  149. package/install-manifest.json +4 -2
  150. package/package.json +4 -4
  151. package/scripts/build-and-deploy.sh +28 -0
  152. package/scripts/daily-backup.sh +1 -79
  153. package/scripts/doctor.sh +38 -0
  154. package/scripts/emergency-deploy.sh +95 -0
  155. package/scripts/watchdog.sh +51 -5
  156. package/bundle/chunk-4BUOO6WI.js.map +0 -7
  157. package/bundle/chunk-A5OJYQNU.js.map +0 -7
  158. package/bundle/chunk-JX3ZZU3O.js +0 -82
  159. package/bundle/chunk-JX3ZZU3O.js.map +0 -7
  160. package/bundle/chunk-KJOCXWJ5.js +0 -131
  161. package/bundle/chunk-KJOCXWJ5.js.map +0 -7
  162. package/bundle/chunk-KSEIWT4T.js.map +0 -7
  163. package/bundle/chunk-KWBGYWDO.js.map +0 -7
  164. package/bundle/chunk-MJ6PHMOK.js.map +0 -7
  165. package/bundle/chunk-P2BZSLJJ.js.map +0 -7
  166. package/bundle/chunk-R36WIOYX.js.map +0 -7
  167. package/bundle/chunk-RE3F3CFW.js +0 -300
  168. package/bundle/chunk-RE3F3CFW.js.map +0 -7
  169. package/bundle/chunk-RJJWPMUZ.js +0 -411
  170. package/bundle/chunk-RJJWPMUZ.js.map +0 -7
  171. package/bundle/chunk-RSWUPUNA.js.map +0 -7
  172. package/bundle/chunk-RV54J75Q.js.map +0 -7
  173. package/bundle/chunk-RVERPUHT.js +0 -289
  174. package/bundle/chunk-RVERPUHT.js.map +0 -7
  175. package/bundle/chunk-TYVI3ZWA.js.map +0 -7
  176. package/bundle/chunk-X5FBUA53.js.map +0 -7
  177. package/bundle/deploy-lib-import-HCMZCKZD.js +0 -50
  178. package/bundle/direct-api-transport-TRV45NO6.js.map +0 -7
  179. package/bundle/discord-adapter-WA2MFRK3.js.map +0 -7
  180. package/bundle/restore-ROJF22R2.js +0 -47
  181. package/bundle/restore-ROJF22R2.js.map +0 -7
  182. package/bundle/system-status-GLYXXDE3.js.map +0 -7
  183. package/bundle/telegram-adapter-BJJYXN7J.js.map +0 -7
  184. package/bundle/update-check-O5MS6B3L.js +0 -13
  185. package/bundle/user-registry-NUVNEHJU.js.map +0 -7
  186. /package/bundle/{agent-api-rate-limit-C25WGSFF.js.map → agent-api-rate-limit-R2OFAQ3N.js.map} +0 -0
  187. /package/bundle/{agent-registry-SYUFNSVB.js.map → agent-registry-S2MNHQYQ.js.map} +0 -0
  188. /package/bundle/{bridge-lock-transport-HO545SBK.js.map → bridge-lock-transport-N6OGDOSE.js.map} +0 -0
  189. /package/bundle/{browse-delivery-VTLEAVYA.js.map → browse-delivery-DXGMDMXA.js.map} +0 -0
  190. /package/bundle/{browser-REIXOJ6S.js.map → browser-QMYGSP5W.js.map} +0 -0
  191. /package/bundle/{capability-ILW3D5HS.js.map → capability-733TLH4W.js.map} +0 -0
  192. /package/bundle/{chunk-ZVDVNSXK.js.map → chunk-2SWKJX64.js.map} +0 -0
  193. /package/bundle/{chunk-PZE3J7ER.js.map → chunk-3OXQWII3.js.map} +0 -0
  194. /package/bundle/{chunk-4KJ76TTE.js.map → chunk-4XW7YA3K.js.map} +0 -0
  195. /package/bundle/{chunk-Q62SXS73.js.map → chunk-BBDKU4EH.js.map} +0 -0
  196. /package/bundle/{chunk-EX2SRTUE.js.map → chunk-CYSGXNBY.js.map} +0 -0
  197. /package/bundle/{chunk-LYEAHE5V.js.map → chunk-DCY7DGMT.js.map} +0 -0
  198. /package/bundle/{chunk-G6IXMYIO.js.map → chunk-DO4INSXE.js.map} +0 -0
  199. /package/bundle/{chunk-VA5WKN3Z.js.map → chunk-EGA6JQVV.js.map} +0 -0
  200. /package/bundle/{chunk-URAQLQ2U.js.map → chunk-F3HMZFIL.js.map} +0 -0
  201. /package/bundle/{chunk-OOKLEC6V.js.map → chunk-FY3QUO2L.js.map} +0 -0
  202. /package/bundle/{chunk-2BY6I4P5.js.map → chunk-GUTRAMK3.js.map} +0 -0
  203. /package/bundle/{chunk-GPL57SRN.js.map → chunk-H7RX7UCR.js.map} +0 -0
  204. /package/bundle/{chunk-BYDUMHXT.js.map → chunk-HAF2AFBW.js.map} +0 -0
  205. /package/bundle/{chunk-KFENC7BM.js.map → chunk-L33WNMCP.js.map} +0 -0
  206. /package/bundle/{chunk-JRG4EFMP.js.map → chunk-LBMETTUP.js.map} +0 -0
  207. /package/bundle/{chunk-TOUZC6NR.js.map → chunk-OKMN6J4Z.js.map} +0 -0
  208. /package/bundle/{chunk-CELR236Q.js.map → chunk-Q7CH5DA3.js.map} +0 -0
  209. /package/bundle/{chunk-XZSYMCLF.js.map → chunk-QIAFGDRL.js.map} +0 -0
  210. /package/bundle/{chunk-UDZIZB5F.js.map → chunk-RTL7HO3N.js.map} +0 -0
  211. /package/bundle/{chunk-ITG6XGBS.js.map → chunk-SA44ITVX.js.map} +0 -0
  212. /package/bundle/{chunk-3MO2MDXJ.js.map → chunk-SA6YEFNG.js.map} +0 -0
  213. /package/bundle/{chunk-GBBTK6H2.js.map → chunk-SRFEIZQT.js.map} +0 -0
  214. /package/bundle/{chunk-ELRAH7VL.js.map → chunk-VXUVKC66.js.map} +0 -0
  215. /package/bundle/{commands-WUGPBPHI.js.map → commands-AXW7L2MZ.js.map} +0 -0
  216. /package/bundle/{config-DQIGDX4W.js.map → config-NDEYF4AQ.js.map} +0 -0
  217. /package/bundle/{daemon-NPKYZ3CJ.js.map → daemon-WOQXCKNL.js.map} +0 -0
  218. /package/bundle/{delegation-tools-6FICZQ5G.js.map → delegation-tools-Z5OM3TXS.js.map} +0 -0
  219. /package/bundle/{deploy-lib-import-HCMZCKZD.js.map → deploy-lib-import-6VJTYXEG.js.map} +0 -0
  220. /package/bundle/{deps-HN6CEXA4.js.map → deps-65V7XXG4.js.map} +0 -0
  221. /package/bundle/{dns-wakeup-RYOCQ6GR.js.map → dns-wakeup-N46RPU5E.js.map} +0 -0
  222. /package/bundle/{ensure-invariants-BJIEOSJ2.js.map → ensure-invariants-3NOBCYWS.js.map} +0 -0
  223. /package/bundle/{deploy-lib-import-SBKXDD3F.js.map → env-schema-T43X43BU.js.map} +0 -0
  224. /package/bundle/{env-schema-XCPAJ6IZ.js.map → hook-system-ZCVOFFRD.js.map} +0 -0
  225. /package/bundle/{hook-system-POI5VRIX.js.map → hotskills-DTROJY6G.js.map} +0 -0
  226. /package/bundle/{hotskills-6ECHLXTJ.js.map → install-FZT43PTH.js.map} +0 -0
  227. /package/bundle/{install-manifest-QRWID3KZ.js.map → install-manifest-KBYD7SAY.js.map} +0 -0
  228. /package/bundle/{irc-adapter-AIEP6OX6.js.map → irc-adapter-HXO5D4SW.js.map} +0 -0
  229. /package/bundle/{irc-config-6VY67UPQ.js.map → irc-config-XN5VW2V4.js.map} +0 -0
  230. /package/bundle/{install-GEXWJYJC.js.map → lazy-require-R3JYCV5M.js.map} +0 -0
  231. /package/bundle/{media-utils-MOE36VWY.js.map → media-utils-W7XW3SVV.js.map} +0 -0
  232. /package/bundle/{install-SH4UVUXQ.js.map → message-pipeline-QX272U5X.js.map} +0 -0
  233. /package/bundle/{lazy-require-UFYFFX2R.js.map → notification-ULESRDHB.js.map} +0 -0
  234. /package/bundle/{openrouter-credits-7XXO6QGQ.js.map → openrouter-credits-PLIKRY5D.js.map} +0 -0
  235. /package/bundle/{message-pipeline-2MBT44FO.js.map → paths-QQM74XYT.js.map} +0 -0
  236. /package/bundle/{peer-client-T44VI7NB.js.map → peer-client-D2F5QWRV.js.map} +0 -0
  237. /package/bundle/{notification-U6F5ZBSG.js.map → peer-config-5SUIBJLG.js.map} +0 -0
  238. /package/bundle/{paths-ZJYIDND2.js.map → phase-transport-BSGROTHY.js.map} +0 -0
  239. /package/bundle/{peer-config-D5A4454H.js.map → rollback-5RXXLUD6.js.map} +0 -0
  240. /package/bundle/{self-healer-utils-7NFH22VJ.js.map → self-healer-utils-WPKOVXJD.js.map} +0 -0
  241. /package/bundle/{phase-transport-FEZ4SIJJ.js.map → skill-stats-NHNH47QW.js.map} +0 -0
  242. /package/bundle/{skill-stats-IPVKMWN3.js.map → sleep-K7EXAFGW.js.map} +0 -0
  243. /package/bundle/{sleep-BPWX3FCN.js.map → soul-bundle-QTPWDJB2.js.map} +0 -0
  244. /package/bundle/{soul-bundle-BRIUDEQ2.js.map → soul-loader-LCPTN4PK.js.map} +0 -0
  245. /package/bundle/{sse-parser-anthropic-H42TTLBD.js.map → sse-parser-anthropic-PYDJM3UC.js.map} +0 -0
  246. /package/bundle/{sse-parser-responses-WG2LY2ML.js.map → sse-parser-responses-FYT7A5WT.js.map} +0 -0
  247. /package/bundle/{ssrf-guard-E2KBBC5E.js.map → ssrf-guard-R4P5OCTO.js.map} +0 -0
  248. /package/bundle/{start-CBVKNEAT.js.map → start-4DNURGIY.js.map} +0 -0
  249. /package/bundle/{soul-loader-GBXJ7EBH.js.map → stt-YN77NND6.js.map} +0 -0
  250. /package/bundle/{stt-CF3CPFDC.js.map → subagent-runtime-FQAT3564.js.map} +0 -0
  251. /package/bundle/{system-message-TALP6GP2.js.map → system-message-BRU267FW.js.map} +0 -0
  252. /package/bundle/{subagent-runtime-4MTYUBIZ.js.map → task-failure-buffer-DPM5MWZ5.js.map} +0 -0
  253. /package/bundle/{task-store-LC7ZMS72.js.map → task-store-VCBHAB43.js.map} +0 -0
  254. /package/bundle/{tool-registry-T7XLTI2Q.js.map → tool-registry-5PXNSYOI.js.map} +0 -0
  255. /package/bundle/{tool-sandbox-OZMXJZLQ.js.map → tool-sandbox-TLAL55QP.js.map} +0 -0
  256. /package/bundle/{transport-config-G5NKQXPJ.js.map → transport-config-JIKHB7GT.js.map} +0 -0
  257. /package/bundle/{update-check-O5MS6B3L.js.map → user-registry-PEFDZ5AV.js.map} +0 -0
package/bundle/abtars.js CHANGED
@@ -3,20 +3,18 @@
3
3
  import {
4
4
  checkCron,
5
5
  clearPendingReminders,
6
- localDate,
7
6
  readPendingReminders,
8
7
  recordRun as recordRun2,
9
8
  require_main
10
- } from "./chunk-HEHD3GG5.js";
9
+ } from "./chunk-ITB2K6LI.js";
11
10
  import {
12
11
  SessionManager,
13
12
  SessionRegistry,
14
13
  cleanResponse,
15
14
  loadNLMConfig,
16
- sanitizeOutbound,
17
15
  setIdleCompactReset,
18
16
  startSession
19
- } from "./chunk-P2BZSLJJ.js";
17
+ } from "./chunk-OGZXYN6E.js";
20
18
  import {
21
19
  require_extension,
22
20
  require_permessage_deflate,
@@ -31,48 +29,51 @@ import {
31
29
  phaseTransport,
32
30
  resetAllCtxStarts,
33
31
  updateCtxStart
34
- } from "./chunk-A5OJYQNU.js";
35
- import "./chunk-3MO2MDXJ.js";
36
- import "./chunk-ZVDVNSXK.js";
37
- import "./chunk-RV54J75Q.js";
32
+ } from "./chunk-HCYENZAB.js";
33
+ import {
34
+ addTaskFailure
35
+ } from "./chunk-ZAA7B5BN.js";
36
+ import "./chunk-SA6YEFNG.js";
37
+ import {
38
+ loadAndValidateConfig
39
+ } from "./chunk-BBDKU4EH.js";
40
+ import "./chunk-2SWKJX64.js";
41
+ import "./chunk-MHK4UPM6.js";
38
42
  import {
39
43
  SubagentRuntime
40
- } from "./chunk-XZSYMCLF.js";
44
+ } from "./chunk-QIAFGDRL.js";
41
45
  import {
42
46
  createCapabilityRegistry
43
- } from "./chunk-OOKLEC6V.js";
47
+ } from "./chunk-FY3QUO2L.js";
44
48
  import {
45
49
  sendNotification,
46
50
  sendToMainChat
47
- } from "./chunk-TYVI3ZWA.js";
48
- import "./chunk-KFENC7BM.js";
49
- import "./chunk-OZ4IZFV4.js";
51
+ } from "./chunk-LJAG2URA.js";
50
52
  import {
51
- loadAndValidateConfig
52
- } from "./chunk-Q62SXS73.js";
53
- import {
54
- loadUsers
55
- } from "./chunk-GBBTK6H2.js";
53
+ sanitizeOutbound
54
+ } from "./chunk-YWZPKBO6.js";
55
+ import "./chunk-L33WNMCP.js";
56
+ import "./chunk-HJQZP5CK.js";
56
57
  import {
57
58
  init_peer_jwt,
58
59
  peer_jwt_exports
59
- } from "./chunk-CELR236Q.js";
60
+ } from "./chunk-Q7CH5DA3.js";
60
61
  import {
61
62
  setPeerActivityCallback
62
- } from "./chunk-X5FBUA53.js";
63
+ } from "./chunk-WLAVZSVZ.js";
63
64
  import {
64
65
  abmind,
65
66
  loadAbmind,
66
67
  resetAbmindCache
67
68
  } from "./chunk-JAJ3DUQ2.js";
68
- import "./chunk-G6IXMYIO.js";
69
+ import "./chunk-DO4INSXE.js";
69
70
  import {
70
71
  loadTransport,
71
72
  resolveAgent
72
- } from "./chunk-ITG6XGBS.js";
73
+ } from "./chunk-SA44ITVX.js";
73
74
  import {
74
75
  readEnvWithDefault
75
- } from "./chunk-BYDUMHXT.js";
76
+ } from "./chunk-HAF2AFBW.js";
76
77
  import {
77
78
  appendRestartTimestamp,
78
79
  initBridgeLock,
@@ -84,38 +85,41 @@ import {
84
85
  updateLastHeartbeat,
85
86
  writeRestartReason,
86
87
  writeSleepStatus
87
- } from "./chunk-UDZIZB5F.js";
88
+ } from "./chunk-RTL7HO3N.js";
88
89
  import {
89
90
  buildPolicy
90
- } from "./chunk-JRG4EFMP.js";
91
- import "./chunk-ELRAH7VL.js";
92
- import "./chunk-TOUZC6NR.js";
91
+ } from "./chunk-LBMETTUP.js";
92
+ import {
93
+ loadUsers
94
+ } from "./chunk-SRFEIZQT.js";
95
+ import "./chunk-VXUVKC66.js";
96
+ import "./chunk-OKMN6J4Z.js";
93
97
  import "./chunk-MV6CJFWR.js";
94
98
  import {
95
99
  init_peer_config,
96
100
  peer_config_exports
97
- } from "./chunk-VA5WKN3Z.js";
98
- import "./chunk-LYEAHE5V.js";
101
+ } from "./chunk-EGA6JQVV.js";
102
+ import "./chunk-DCY7DGMT.js";
99
103
  import "./chunk-TBLYGCPQ.js";
100
104
  import {
101
105
  readEntries,
102
106
  readEntry,
103
107
  recordRun,
104
108
  writeEntry
105
- } from "./chunk-GPL57SRN.js";
109
+ } from "./chunk-H7RX7UCR.js";
106
110
  import {
107
111
  localISO
108
112
  } from "./chunk-MZWMYN4O.js";
109
- import {
110
- init_log_and_swallow,
111
- logAndSwallow
112
- } from "./chunk-EX2SRTUE.js";
113
113
  import {
114
114
  _resetEnv,
115
115
  getEnv,
116
116
  initEnv,
117
117
  init_env_schema
118
- } from "./chunk-PZE3J7ER.js";
118
+ } from "./chunk-3OXQWII3.js";
119
+ import {
120
+ init_log_and_swallow,
121
+ logAndSwallow
122
+ } from "./chunk-CYSGXNBY.js";
119
123
  import {
120
124
  getLogFile,
121
125
  init_logger,
@@ -125,11 +129,14 @@ import {
125
129
  logInfo,
126
130
  logWarn,
127
131
  setLogLevel
128
- } from "./chunk-2BY6I4P5.js";
132
+ } from "./chunk-GUTRAMK3.js";
133
+ import {
134
+ localDate
135
+ } from "./chunk-DGS7J4P6.js";
129
136
  import {
130
137
  abtarsHome,
131
138
  init_paths
132
- } from "./chunk-MJ6PHMOK.js";
139
+ } from "./chunk-WW5F2DCO.js";
133
140
  import {
134
141
  __toCommonJS,
135
142
  __toESM
@@ -268,10 +275,7 @@ init_env_schema();
268
275
 
269
276
  // src/bridge-app.ts
270
277
  import { execFileSync } from "node:child_process";
271
- import { readlinkSync } from "node:fs";
272
278
  init_logger();
273
- import { join as join10, basename } from "node:path";
274
- import { homedir as homedir6 } from "node:os";
275
279
 
276
280
  // src/boot/context.ts
277
281
  init_env_schema();
@@ -403,7 +407,7 @@ var ServiceRegistry = class {
403
407
  if (state.lastError?.includes("EADDRINUSE")) {
404
408
  const portMatch = state.lastError.match(/:(\d+)/);
405
409
  if (portMatch) {
406
- const { healPort } = await import("./self-healer-utils-7NFH22VJ.js");
410
+ const { healPort } = await import("./self-healer-utils-WPKOVXJD.js");
407
411
  healPort(parseInt(portMatch[1], 10));
408
412
  }
409
413
  }
@@ -507,6 +511,7 @@ function createBootCtx(overrides = {}) {
507
511
  selfHealerTask: null,
508
512
  dashboardServer: null,
509
513
  agentApiServer: null,
514
+ actionGate: null,
510
515
  mcpDaemonStarted: false,
511
516
  // Callbacks
512
517
  isSleepActive: () => false,
@@ -608,7 +613,7 @@ async function phaseConfig(ctx) {
608
613
  } catch (err) {
609
614
  logAndSwallow("phase_config", "op", err);
610
615
  }
611
- const { loadHookConfig } = await import("./hook-system-POI5VRIX.js");
616
+ const { loadHookConfig } = await import("./hook-system-ZCVOFFRD.js");
612
617
  loadHookConfig();
613
618
  return "ran";
614
619
  }
@@ -653,7 +658,20 @@ var explicitMethods = {
653
658
  var nullMemory = new Proxy(explicitMethods, handler);
654
659
 
655
660
  // src/boot/phase-memory.ts
661
+ import { existsSync as existsSync4 } from "node:fs";
662
+ import { join as join3 } from "node:path";
663
+ import { homedir as homedir4 } from "node:os";
656
664
  async function phaseMemory(ctx) {
665
+ const home2 = process.env["ABTARS_HOME"] ?? join3(homedir4(), ".abtars");
666
+ const abmindPaths = [
667
+ join3(home2, "app", "node_modules", "abmind", "package.json"),
668
+ join3(home2, "app", "bundle", "node_modules", "abmind", "package.json")
669
+ ];
670
+ const existing = abmindPaths.filter((p) => existsSync4(p));
671
+ if (existing.length > 1) {
672
+ logError("boot", `FATAL: duplicate abmind at ${existing.map((p) => p.replace("/package.json", "")).join(" + ")}. Delete one to prevent dual DB connections. Refusing to start.`);
673
+ process.exit(1);
674
+ }
657
675
  const mod = await loadAbmind();
658
676
  if (!mod) {
659
677
  logWarn("main", "\u26A0\uFE0F abmind not available \u2014 running without persistent memory");
@@ -693,6 +711,16 @@ ${content}`);
693
711
  const ipcBackend = new SqliteBackend(ctx.memoryConfig);
694
712
  await ipcBackend.initialize();
695
713
  const memoryIpc = new MemoryIpcServer(ipcBackend);
714
+ if (ctx.actionGate) {
715
+ memoryIpc.setUnknownMethodHandler(async (method, params) => {
716
+ if (method === "auth-request" && ctx.actionGate) {
717
+ const { category, detail } = params;
718
+ const granted = await ctx.actionGate.requestAuth(category, detail || "");
719
+ return { granted };
720
+ }
721
+ throw new Error(`Unknown method: ${method}`);
722
+ });
723
+ }
696
724
  await memoryIpc.start();
697
725
  return "ran";
698
726
  }
@@ -702,14 +730,14 @@ init_log_and_swallow();
702
730
  init_paths();
703
731
  init_logger();
704
732
  import { spawn } from "node:child_process";
705
- import { existsSync as existsSync4, readFileSync as readFileSync2, statSync as statSync2, writeFileSync as writeFileSync3, mkdirSync } from "node:fs";
706
- import { resolve as resolve2, join as join3 } from "node:path";
707
- import { homedir as homedir4 } from "node:os";
733
+ import { existsSync as existsSync5, readFileSync as readFileSync2, readdirSync as readdirSync2, statSync as statSync2, writeFileSync as writeFileSync3, mkdirSync } from "node:fs";
734
+ import { resolve as resolve2, join as join4, dirname, basename } from "node:path";
735
+ import { homedir as homedir5 } from "node:os";
708
736
  var TAG3 = "cron-queue";
709
737
  var AGENT_TIMEOUT_MS = 30 * 60 * 1e3;
710
738
  var RETRY_DELAY_MS = 10 * 60 * 1e3;
711
739
  var PRIO_RANK = { high: 0, medium: 1, low: 2 };
712
- var STATE_FILE = join3(homedir4(), ".abtars", "state", "task-queue-state.json");
740
+ var STATE_FILE = join4(homedir5(), ".abtars", "state", "task-queue-state.json");
713
741
  function persistState(current, queue) {
714
742
  try {
715
743
  const state = {
@@ -724,7 +752,7 @@ function persistState(current, queue) {
724
752
  }
725
753
  function loadStaleState() {
726
754
  try {
727
- if (!existsSync4(STATE_FILE)) return null;
755
+ if (!existsSync5(STATE_FILE)) return null;
728
756
  const raw = JSON.parse(readFileSync2(STATE_FILE, "utf-8"));
729
757
  if (raw.pid === process.pid) return null;
730
758
  const sleepStatus = readBridgeLockField("sleepStatus");
@@ -740,9 +768,9 @@ function recordRunToFile(entryId, exitCode) {
740
768
  }
741
769
  function writeResultFile(entryId, content) {
742
770
  try {
743
- const dir = join3(abtarsHome(), "workspace", entryId);
771
+ const dir = join4(abtarsHome(), "workspace", entryId);
744
772
  mkdirSync(dir, { recursive: true });
745
- const file = join3(dir, `${entryId}-${localDate()}.md`);
773
+ const file = join4(dir, `${entryId}-${localDate()}.md`);
746
774
  writeFileSync3(file, content, "utf-8");
747
775
  return file;
748
776
  } catch (err) {
@@ -755,8 +783,8 @@ function todayStr() {
755
783
  return localDate();
756
784
  }
757
785
  function readTaskFile(taskFile) {
758
- const filePath = resolve2(taskFile.replace(/^~/, homedir4()));
759
- if (!existsSync4(filePath)) {
786
+ const filePath = resolve2(taskFile.replace(/^~/, homedir5()));
787
+ if (!existsSync5(filePath)) {
760
788
  logWarn(TAG3, `Task file not found: ${filePath}`);
761
789
  return null;
762
790
  }
@@ -764,10 +792,40 @@ function readTaskFile(taskFile) {
764
792
  const today = todayStr();
765
793
  const content = raw.replace(/\{today\}/g, today);
766
794
  const dodIdx = content.indexOf("## Definition of Done");
767
- if (dodIdx === -1) return { prompt: content.trim(), dodPaths: [] };
768
- const prompt = content.slice(0, dodIdx).trim();
769
- const dodSection = content.slice(dodIdx);
770
- const dodPaths = dodSection.split("\n").filter((l) => l.match(/^- /)).map((l) => l.replace(/^- /, "").trim()).map((p) => resolve2(p.replace(/^~/, homedir4())));
795
+ let prompt;
796
+ let dodPaths = [];
797
+ if (dodIdx === -1) {
798
+ prompt = content.trim();
799
+ } else {
800
+ prompt = content.slice(0, dodIdx).trim();
801
+ const dodSection = content.slice(dodIdx);
802
+ dodPaths = dodSection.split("\n").filter((l) => l.match(/^- /)).map((l) => l.replace(/^- /, "").trim()).map((p) => resolve2(p.replace(/^~/, homedir5())));
803
+ }
804
+ const dir = dirname(filePath);
805
+ const base = basename(filePath, ".md");
806
+ const associated = readdirSync2(dir).filter((f) => f.startsWith(base + "_")).sort();
807
+ if (associated.length > 0) {
808
+ let injected = "\n\n---\n## Associated files\n";
809
+ let totalChars = 0;
810
+ const CAP = 1e4;
811
+ for (const f of associated) {
812
+ const fc = readFileSync2(join4(dir, f), "utf-8");
813
+ if (totalChars + fc.length > CAP) {
814
+ injected += `
815
+ [${f}]: (truncated \u2014 full file at ${join4(dir, f)})
816
+ `;
817
+ break;
818
+ }
819
+ injected += `
820
+ ### ${f}
821
+ \`\`\`
822
+ ${fc}
823
+ \`\`\`
824
+ `;
825
+ totalChars += fc.length;
826
+ }
827
+ prompt += injected;
828
+ }
771
829
  return { prompt, dodPaths };
772
830
  }
773
831
  function checkDoD(paths) {
@@ -775,7 +833,7 @@ function checkDoD(paths) {
775
833
  const results = [];
776
834
  let allPassed = true;
777
835
  for (const p of paths) {
778
- if (!existsSync4(p)) {
836
+ if (!existsSync5(p)) {
779
837
  results.push(`\u2717 missing: ${p}`);
780
838
  allPassed = false;
781
839
  } else {
@@ -951,6 +1009,7 @@ var CronQueue = class {
951
1009
  scheduleRetry(entry, !!entry._retrying);
952
1010
  if (!paused && code !== 2) this.tryInjectFailure(entry, `${status}
953
1011
  ${(output || "(no output)").slice(0, 500)}`);
1012
+ addTaskFailure({ taskName: entry.title ?? entry.message.slice(0, 60), exitCode: code ?? 1, error: (output || "").slice(0, 100), timestamp: Date.now(), consecutiveFailures: entry.consecutiveFails ?? 1 });
954
1013
  }
955
1014
  if (!paused) {
956
1015
  if (code !== 0 || output.trim()) {
@@ -994,10 +1053,10 @@ ${(output || "(no output)").slice(0, 500)}`);
994
1053
  }
995
1054
  logInfo(TAG3, `\u25B6 Agent: "${entry.message.slice(0, 60)}"`);
996
1055
  this.setCurrent(entry, 0, "agent");
997
- const workspace = join3(abtarsHome(), "workspace", entry.id);
1056
+ const workspace = join4(abtarsHome(), "workspace", entry.id);
998
1057
  mkdirSync(workspace, { recursive: true });
999
1058
  process.env["WORKSPACE"] = workspace;
1000
- const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-4MTYUBIZ.js");
1059
+ const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-FQAT3564.js");
1001
1060
  const runtime = new SubagentRuntime2();
1002
1061
  this.timeout = setTimeout(() => {
1003
1062
  logWarn(TAG3, `\u23F1\uFE0F Agent "${entry.id}" timed out (30min) \u2014 shutting down runtime`);
@@ -1042,7 +1101,7 @@ ${dod.details}`);
1042
1101
  if (!paused) this.tryInjectFailure(entry, `${icon} ${summary}${dodResult}`);
1043
1102
  }
1044
1103
  if (!paused) {
1045
- const producedFiles = dodPaths.filter((p) => existsSync4(p));
1104
+ const producedFiles = dodPaths.filter((p) => existsSync5(p));
1046
1105
  onComplete?.(entry.chatId, entry.message, `${icon} ${summary}${dodResult}`, producedFiles.length > 0 ? producedFiles : void 0);
1047
1106
  }
1048
1107
  }).catch((err) => {
@@ -1066,7 +1125,7 @@ ${dod.details}`);
1066
1125
  // src/components/idle-save.ts
1067
1126
  init_logger();
1068
1127
  import { mkdirSync as mkdirSync2 } from "node:fs";
1069
- import { join as join4 } from "node:path";
1128
+ import { join as join5 } from "node:path";
1070
1129
  var CHAT_SAVE_IDLE_MS = 10 * 60 * 1e3;
1071
1130
  var IdleSave = class {
1072
1131
  timers = /* @__PURE__ */ new Map();
@@ -1093,9 +1152,9 @@ var IdleSave = class {
1093
1152
  if (!this.enabled) return;
1094
1153
  if (!("sendKeys" in this.transport)) return;
1095
1154
  const today = localDate();
1096
- const dir = join4(this.memoryDir, "working", today);
1155
+ const dir = join5(this.memoryDir, "working", today);
1097
1156
  mkdirSync2(dir, { recursive: true });
1098
- const dest = join4(dir, `transcript_${chatId}.chat`);
1157
+ const dest = join5(dir, `transcript_${chatId}.chat`);
1099
1158
  try {
1100
1159
  await this.transport.sendPrompt(sessionKey, `/chat save ${dest}`);
1101
1160
  logInfo("idle-save", `Chat saved to ${dest}`);
@@ -1150,7 +1209,7 @@ Result: ${result}${pending}
1150
1209
  Diagnose the root cause. If you can fix it programmatically (config change, script fix, token refresh), do it. If the fix requires human action (manual browser login, external service down), state clearly: "Requires human intervention: <reason>" \u2014 do NOT create a skill or suggest adding error handling (you ARE the error handling). Be concise.`;
1151
1210
  void (async () => {
1152
1211
  try {
1153
- const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-4MTYUBIZ.js");
1212
+ const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-FQAT3564.js");
1154
1213
  const runtime = new SubagentRuntime2();
1155
1214
  await runtime.complete("coding", msg, { sessionType: "S" });
1156
1215
  await runtime.shutdown();
@@ -1185,7 +1244,7 @@ Resume with: /task resume <id>`;
1185
1244
  });
1186
1245
  }
1187
1246
  }
1188
- import("./system-message-TALP6GP2.js").then(({ sendSystemMessage }) => {
1247
+ import("./system-message-BRU267FW.js").then(({ sendSystemMessage }) => {
1189
1248
  const summary = result.length > 500 ? result.slice(0, 500) + "\u2026" : result;
1190
1249
  const status = result.length > 4e3 ? "truncated" : "complete";
1191
1250
  sendSystemMessage(`[SYSTEM] [TASK RESULT] Task "${message}" \u2014 ${status}.
@@ -1193,7 +1252,7 @@ Output: ${summary}`).catch((err) => logWarn("main", `Task result injection faile
1193
1252
  }).catch(() => {
1194
1253
  });
1195
1254
  };
1196
- const { setEnqueueCron, setSecretGetDb } = await import("./tool-registry-T7XLTI2Q.js");
1255
+ const { setEnqueueCron, setSecretGetDb } = await import("./tool-registry-5PXNSYOI.js");
1197
1256
  setEnqueueCron((id, manual) => {
1198
1257
  try {
1199
1258
  const entry = readEntry(id);
@@ -1238,7 +1297,7 @@ Output: ${summary}`).catch((err) => logWarn("main", `Task result injection faile
1238
1297
  selfHealerTask: null,
1239
1298
  hailMary: ctx.hailMary,
1240
1299
  rebuildTransport: async () => {
1241
- const { rebuildTransport } = await import("./phase-transport-FEZ4SIJJ.js");
1300
+ const { rebuildTransport } = await import("./phase-transport-BSGROTHY.js");
1242
1301
  await rebuildTransport(ctx);
1243
1302
  },
1244
1303
  phaseHealth: ctx.phaseHealth,
@@ -1288,10 +1347,10 @@ async function phasePlatforms(ctx) {
1288
1347
  registry.register("telegram", {
1289
1348
  configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
1290
1349
  async create() {
1291
- const { TelegramAdapter } = await import("./telegram-adapter-BJJYXN7J.js");
1350
+ const { TelegramAdapter } = await import("./telegram-adapter-LXLSG4SK.js");
1292
1351
  const adapter = new TelegramAdapter(
1293
1352
  { botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
1294
- { pipeline: pipelineDeps, conversationBuffer, transport, memory, sessionManager: ctx.sessionManager }
1353
+ { pipeline: pipelineDeps, conversationBuffer, transport, memory, sessionManager: ctx.sessionManager, actionGate: ctx.actionGate }
1295
1354
  );
1296
1355
  ctx.telegramAdapter = adapter;
1297
1356
  platformAdapters.set("telegram", adapter);
@@ -1313,8 +1372,19 @@ async function phasePlatforms(ctx) {
1313
1372
  logInfo("main", "\u{1F4E1} Telegram polling started");
1314
1373
  const mainChatId = config.mainChatId;
1315
1374
  if (mainChatId && ctx.telegramAdapter) {
1316
- const { setSendDocument } = await import("./tool-registry-T7XLTI2Q.js");
1375
+ const { setSendDocument } = await import("./tool-registry-5PXNSYOI.js");
1317
1376
  setSendDocument((path, caption) => ctx.telegramAdapter.sendDocument(String(mainChatId), path, caption));
1377
+ if (ctx.actionGate) {
1378
+ const api = ctx.telegramAdapter.api;
1379
+ const chatId = String(mainChatId);
1380
+ ctx.actionGate.setNotify(async (text, buttons) => {
1381
+ const opts = {};
1382
+ if (buttons.length > 0) {
1383
+ opts.reply_markup = { inline_keyboard: [buttons.map((b) => ({ text: b.text, callback_data: b.data }))] };
1384
+ }
1385
+ await api.sendMessage(chatId, text, opts);
1386
+ });
1387
+ }
1318
1388
  }
1319
1389
  } else if (result.retryingInBackground) {
1320
1390
  logWarn("main", `Telegram failed to start: ${result.error} \u2014 retrying in background`);
@@ -1327,7 +1397,7 @@ async function phasePlatforms(ctx) {
1327
1397
  registry.register("discord", {
1328
1398
  configured: Boolean(config.discord.enabled && config.discord.botToken),
1329
1399
  async create() {
1330
- const { DiscordAdapter } = await import("./discord-adapter-WA2MFRK3.js");
1400
+ const { DiscordAdapter } = await import("./discord-adapter-LNWTIOUK.js");
1331
1401
  const adapter = new DiscordAdapter(
1332
1402
  {
1333
1403
  botToken: config.discord.botToken,
@@ -1367,9 +1437,9 @@ async function phasePlatforms(ctx) {
1367
1437
  registry.register("irc", {
1368
1438
  configured: platforms.irc,
1369
1439
  async create() {
1370
- const { loadIrcConfig } = await import("./irc-config-6VY67UPQ.js");
1371
- const { IrcAdapter } = await import("./irc-adapter-AIEP6OX6.js");
1372
- const { handleInboundMessage } = await import("./message-pipeline-2MBT44FO.js");
1440
+ const { loadIrcConfig } = await import("./irc-config-XN5VW2V4.js");
1441
+ const { IrcAdapter } = await import("./irc-adapter-HXO5D4SW.js");
1442
+ const { handleInboundMessage } = await import("./message-pipeline-QX272U5X.js");
1373
1443
  const ircConfig = loadIrcConfig();
1374
1444
  if (!ircConfig) throw new Error("irc.json missing or empty");
1375
1445
  const adapter = new IrcAdapter(ircConfig, {
@@ -1391,7 +1461,7 @@ async function phasePlatforms(ctx) {
1391
1461
  const result = await registry.start("irc", { backgroundRetry: true });
1392
1462
  if (result.ok) {
1393
1463
  logInfo("main", "\u{1F4E1} IRC started");
1394
- const { setIrcSend } = await import("./tool-registry-T7XLTI2Q.js");
1464
+ const { setIrcSend } = await import("./tool-registry-5PXNSYOI.js");
1395
1465
  const ircAdapter = platformAdapters.get("irc");
1396
1466
  if (ircAdapter) setIrcSend((channel, message) => {
1397
1467
  ircAdapter.sendMessage(channel, message);
@@ -1414,19 +1484,19 @@ async function phaseCapabilities(ctx) {
1414
1484
  logWarn("boot", `${phaseCapabilities.name}: skipping \u2014 transport not available`);
1415
1485
  return "skipped";
1416
1486
  }
1417
- const { createCapabilityApi } = await import("./capability-ILW3D5HS.js");
1418
- const { getEnv: getEnv2 } = await import("./env-schema-XCPAJ6IZ.js");
1487
+ const { createCapabilityApi } = await import("./capability-733TLH4W.js");
1488
+ const { getEnv: getEnv2 } = await import("./env-schema-T43X43BU.js");
1419
1489
  const disabled = new Set(getEnv2().disabledCapabilities.split(",").map((s) => s.trim()).filter(Boolean));
1420
1490
  let loaded = [];
1421
1491
  let staticCaps;
1422
1492
  try {
1423
- ({ capabilities: staticCaps } = await import("./_registry.generated-ADOYFJJ4.js"));
1493
+ ({ capabilities: staticCaps } = await import("./_registry.generated-FNJOX7VV.js"));
1424
1494
  } catch (err) {
1425
1495
  logError("capabilities", `Registry import failed: ${err instanceof Error ? err.message : String(err)}. Loading individually.`);
1426
1496
  staticCaps = [];
1427
1497
  const individualCaps = [
1428
- { name: "hotskills", load: () => import("./hotskills-6ECHLXTJ.js") },
1429
- { name: "browser", load: () => import("./browser-REIXOJ6S.js") }
1498
+ { name: "hotskills", load: () => import("./hotskills-DTROJY6G.js") },
1499
+ { name: "browser", load: () => import("./browser-QMYGSP5W.js") }
1430
1500
  ];
1431
1501
  for (const { name, load } of individualCaps) {
1432
1502
  if (disabled.has(name)) continue;
@@ -1459,9 +1529,10 @@ async function phaseCapabilities(ctx) {
1459
1529
  // src/boot/phase-startup-notification.ts
1460
1530
  init_logger();
1461
1531
  async function sendBackOnline(ctx) {
1532
+ const version = ctx.commit && ctx.commit !== "?" && !ctx.version.includes(ctx.commit) ? `v${ctx.version}-${ctx.commit}` : `v${ctx.version}`;
1462
1533
  const result = await sendToMainChat(
1463
1534
  { telegram: ctx.telegramAdapter, discord: ctx.discordAdapter },
1464
- "\u{1F504} Back online."
1535
+ `\u{1F504} Back online. ${version}`
1465
1536
  );
1466
1537
  if (result.ok) logInfo("main", "Startup: Back online notification sent");
1467
1538
  return result.ok;
@@ -1534,7 +1605,7 @@ async function phaseStartupNotification(ctx) {
1534
1605
  // src/boot/phase-heartbeat.ts
1535
1606
  init_env_schema();
1536
1607
  init_log_and_swallow();
1537
- import { join as join6 } from "node:path";
1608
+ import { join as join7 } from "node:path";
1538
1609
 
1539
1610
  // src/components/heartbeat-system.ts
1540
1611
  init_logger();
@@ -1701,7 +1772,7 @@ init_logger();
1701
1772
  init_logger();
1702
1773
  init_paths();
1703
1774
  import { readFileSync as readFileSync3, appendFileSync, mkdirSync as mkdirSync3 } from "node:fs";
1704
- import { join as join5 } from "node:path";
1775
+ import { join as join6 } from "node:path";
1705
1776
  var BLACKLIST = [
1706
1777
  "-32603",
1707
1778
  "Transient error",
@@ -1721,7 +1792,7 @@ var BLACKLIST = [
1721
1792
  ];
1722
1793
  function loadAutoFixRules() {
1723
1794
  try {
1724
- const p = join5(abtarsHome(), "config", "auto-fix.json");
1795
+ const p = join6(abtarsHome(), "config", "auto-fix.json");
1725
1796
  const rules = JSON.parse(readFileSync3(p, "utf-8"));
1726
1797
  return rules.filter((r) => r.enabled && r.pattern && r.instruction);
1727
1798
  } catch {
@@ -1735,14 +1806,14 @@ var CIRCUIT_BREAKER_RESET_MS = 24 * 60 * 60 * 1e3;
1735
1806
  var notificationsToday = 0;
1736
1807
  var notificationDayStart = 0;
1737
1808
  function logAutoFix(message) {
1738
- const dir = join5(abtarsHome(), "logs");
1809
+ const dir = join6(abtarsHome(), "logs");
1739
1810
  try {
1740
1811
  mkdirSync3(dir, { recursive: true });
1741
1812
  } catch (err) {
1742
1813
  logAndSwallow("self_healer", "op", err);
1743
1814
  }
1744
1815
  const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
1745
- appendFileSync(join5(dir, `autofix-${date}.log`), `${localISO()} ${message}
1816
+ appendFileSync(join6(dir, `autofix-${date}.log`), `${localISO()} ${message}
1746
1817
  `);
1747
1818
  }
1748
1819
  function createSelfHealerTask(getTelegramAdapter, allowedUserIds) {
@@ -1819,7 +1890,7 @@ function createSelfHealerTask(getTelegramAdapter, allowedUserIds) {
1819
1890
  autoFixRunning = false;
1820
1891
  }, 5 * 60 * 1e3);
1821
1892
  try {
1822
- const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-4MTYUBIZ.js");
1893
+ const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-FQAT3564.js");
1823
1894
  const runtime = new SubagentRuntime2();
1824
1895
  const result = await runtime.complete("coding", rule.instruction);
1825
1896
  await runtime.shutdown();
@@ -1984,9 +2055,13 @@ function createAgeCheckTask(deps) {
1984
2055
  function createDbIntegrityTask(memory) {
1985
2056
  let lastCheckAt = 0;
1986
2057
  const INTERVAL_MS = 60 * 60 * 1e3;
2058
+ const MAX_FAILURES = 5;
2059
+ let consecutiveFailures = 0;
2060
+ let escalated = false;
1987
2061
  return {
1988
2062
  name: "db-integrity",
1989
2063
  execute: async () => {
2064
+ if (escalated) return;
1990
2065
  if (Date.now() - lastCheckAt < INTERVAL_MS) return;
1991
2066
  lastCheckAt = Date.now();
1992
2067
  if (!memory) return;
@@ -1994,7 +2069,21 @@ function createDbIntegrityTask(memory) {
1994
2069
  if (result !== "ok") {
1995
2070
  logError("db-integrity", `Memory DB integrity check failed: ${result}`);
1996
2071
  const { rebuilt } = memory.rebuildFtsIndexes();
1997
- if (rebuilt.length > 0) logInfo("db-integrity", `Auto-rebuilt FTS indexes: ${rebuilt.join(", ")}`);
2072
+ if (rebuilt.length > 0) {
2073
+ logInfo("db-integrity", `Auto-rebuilt FTS indexes: ${rebuilt.join(", ")}`);
2074
+ consecutiveFailures = 0;
2075
+ } else {
2076
+ consecutiveFailures++;
2077
+ if (consecutiveFailures >= MAX_FAILURES) {
2078
+ escalated = true;
2079
+ const msg = `\u26A0\uFE0F FTS corruption persists after ${MAX_FAILURES} rebuild attempts. Needs manual fix.`;
2080
+ logError("db-integrity", msg);
2081
+ const { bufferSystemEvent } = await import("./system-event-buffer-OEPPNUGK.js");
2082
+ bufferSystemEvent(msg);
2083
+ }
2084
+ }
2085
+ } else {
2086
+ consecutiveFailures = 0;
1998
2087
  }
1999
2088
  }
2000
2089
  };
@@ -2004,10 +2093,10 @@ function createUpdateCheckTask(notify) {
2004
2093
  name: "update-check",
2005
2094
  async execute() {
2006
2095
  if (process.env["UPDATES_CHECK_ENABLED"] === "false") return;
2007
- const { checkForUpdate } = await import("./update-check-O5MS6B3L.js");
2096
+ const { checkForUpdate } = await import("./update-check-AJMIBQGQ.js");
2008
2097
  const { readFileSync: readFileSync7 } = await import("node:fs");
2009
2098
  const { join: join11 } = await import("node:path");
2010
- const { abtarsHome: abtarsHome2 } = await import("./paths-ZJYIDND2.js");
2099
+ const { abtarsHome: abtarsHome2 } = await import("./paths-QQM74XYT.js");
2011
2100
  let version = "0.0.0";
2012
2101
  try {
2013
2102
  const m = JSON.parse(readFileSync7(join11(abtarsHome2(), "manifest.json"), "utf-8"));
@@ -2026,7 +2115,7 @@ function createSkillStatsFlushTask() {
2026
2115
  return {
2027
2116
  name: "skill-stats-flush",
2028
2117
  execute: async () => {
2029
- const { flush } = await import("./skill-stats-IPVKMWN3.js");
2118
+ const { flush } = await import("./skill-stats-NHNH47QW.js");
2030
2119
  flush();
2031
2120
  }
2032
2121
  };
@@ -2039,13 +2128,13 @@ function createSkillTrashPruneTask() {
2039
2128
  execute: async () => {
2040
2129
  counter++;
2041
2130
  if (counter % 72 !== 0) return;
2042
- const { existsSync: existsSync8, readdirSync: readdirSync2, rmSync, statSync: statSync3 } = await import("node:fs");
2131
+ const { existsSync: existsSync9, readdirSync: readdirSync3, rmSync, statSync: statSync3 } = await import("node:fs");
2043
2132
  const { join: join11 } = await import("node:path");
2044
- const { abtarsHome: abtarsHome2 } = await import("./paths-ZJYIDND2.js");
2133
+ const { abtarsHome: abtarsHome2 } = await import("./paths-QQM74XYT.js");
2045
2134
  const trashPath = join11(abtarsHome2(), "skills", ".trash");
2046
- if (!existsSync8(trashPath)) return;
2135
+ if (!existsSync9(trashPath)) return;
2047
2136
  const now = Date.now();
2048
- for (const entry of readdirSync2(trashPath)) {
2137
+ for (const entry of readdirSync3(trashPath)) {
2049
2138
  try {
2050
2139
  const full = join11(trashPath, entry);
2051
2140
  const stat = statSync3(full);
@@ -2117,7 +2206,7 @@ function createModelHealthTask(ctx) {
2117
2206
  const execute = async () => {
2118
2207
  if (done) return;
2119
2208
  done = true;
2120
- const { loadTransport: loadTransport2, resolveAgent: resolveAgent2, consumeRepairs } = await import("./transport-config-G5NKQXPJ.js");
2209
+ const { loadTransport: loadTransport2, resolveAgent: resolveAgent2, consumeRepairs } = await import("./transport-config-JIKHB7GT.js");
2121
2210
  const tc = loadTransport2();
2122
2211
  if (!tc) return;
2123
2212
  const repairs = consumeRepairs();
@@ -2177,7 +2266,7 @@ function createModelHealthTask(ctx) {
2177
2266
  }
2178
2267
  }
2179
2268
  if (warnings.length > 0) {
2180
- const { sendNotification: sendNotification2 } = await import("./notification-U6F5ZBSG.js");
2269
+ const { sendNotification: sendNotification2 } = await import("./notification-ULESRDHB.js");
2181
2270
  sendNotification2(ctx, `\u{1F3E5} Model health check:
2182
2271
  ${warnings.join("\n")}
2183
2272
  Subagents will fall back to main model.`);
@@ -2196,7 +2285,7 @@ async function phaseHeartbeat(ctx) {
2196
2285
  return "skipped";
2197
2286
  }
2198
2287
  const cronCallback = createCronCallback(ctx);
2199
- const { init: initSkillStats } = await import("./skill-stats-IPVKMWN3.js");
2288
+ const { init: initSkillStats } = await import("./skill-stats-NHNH47QW.js");
2200
2289
  initSkillStats();
2201
2290
  updateBridgeLockField("startedAt", ctx.startedAt);
2202
2291
  const hbIntervalMs = Math.max(60, parseInt(readEnvWithDefault("HEARTBEAT_INTERVAL_SEC", "60", "heartbeat tick interval"), 10)) * 1e3;
@@ -2268,7 +2357,7 @@ async function phaseHeartbeat(ctx) {
2268
2357
  isSleepActive: ctx.isSleepActive
2269
2358
  }));
2270
2359
  }
2271
- const { initSystemMessage, sendSystemMessage } = await import("./system-message-TALP6GP2.js");
2360
+ const { initSystemMessage, sendSystemMessage } = await import("./system-message-BRU267FW.js");
2272
2361
  const masterUser = loadUsers().users.find((u) => u.role === "master");
2273
2362
  const masterUserId = masterUser?.userId ?? "master";
2274
2363
  initSystemMessage(async (prompt) => {
@@ -2276,7 +2365,7 @@ async function phaseHeartbeat(ctx) {
2276
2365
  const activeId = ctx.sessionManager.getActiveSessionId(masterUserId, "telegram");
2277
2366
  const response = await transport.sendPrompt(activeId, `[SYSTEM] ${prompt}`, void 0, masterUserId);
2278
2367
  if (response) {
2279
- const { sendNotification: sendNotification2 } = await import("./notification-U6F5ZBSG.js");
2368
+ const { sendNotification: sendNotification2 } = await import("./notification-ULESRDHB.js");
2280
2369
  sendNotification2(ctx, response);
2281
2370
  }
2282
2371
  } catch (err) {
@@ -2291,7 +2380,7 @@ async function phaseHeartbeat(ctx) {
2291
2380
  sleepMinute: SLEEP_MINUTE,
2292
2381
  sessions: ctx.sessions,
2293
2382
  isSleepActive: ctx.isSleepActive,
2294
- doctorPath: join6(abtarsHome(), "scripts", "doctor.sh"),
2383
+ doctorPath: join7(abtarsHome(), "scripts", "doctor.sh"),
2295
2384
  startSleep: () => {
2296
2385
  ctx.sleepHandle?.spawn();
2297
2386
  },
@@ -2304,7 +2393,7 @@ async function phaseHeartbeat(ctx) {
2304
2393
  heartbeat.registerTask(createSkillStatsFlushTask());
2305
2394
  heartbeat.registerTask(createSkillTrashPruneTask());
2306
2395
  heartbeat.registerTask(createUpdateCheckTask((msg) => {
2307
- import("./notification-U6F5ZBSG.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG7, "sendNotification update-check", err));
2396
+ import("./notification-ULESRDHB.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG7, "sendNotification update-check", err));
2308
2397
  }));
2309
2398
  if (transport.healthCheck) {
2310
2399
  heartbeat.registerTask({ name: "transport-health", execute: () => transport.healthCheck() });
@@ -2326,7 +2415,7 @@ async function phaseHeartbeat(ctx) {
2326
2415
  }
2327
2416
  ctx.selfHealerTask = selfHealerTask;
2328
2417
  pipelineDeps.selfHealerTask = selfHealerTask;
2329
- const { registerCommand } = await import("./commands-WUGPBPHI.js");
2418
+ const { registerCommand } = await import("./commands-AXW7L2MZ.js");
2330
2419
  for (const [name, handler2] of capabilities.commands) {
2331
2420
  registerCommand(name, handler2);
2332
2421
  }
@@ -2338,7 +2427,7 @@ async function phaseHeartbeat(ctx) {
2338
2427
  queueMicrotask(() => {
2339
2428
  runModelHealth().catch((err) => logAndSwallow(TAG7, "runModelHealth boot", err));
2340
2429
  });
2341
- const { checkBrowseTasks } = await import("./browse-delivery-VTLEAVYA.js");
2430
+ const { checkBrowseTasks } = await import("./browse-delivery-DXGMDMXA.js");
2342
2431
  checkBrowseTasks();
2343
2432
  heartbeat.start();
2344
2433
  memory?.setHeartbeat(heartbeat);
@@ -2356,11 +2445,11 @@ async function phaseSleep(ctx) {
2356
2445
  logWarn("boot", `${phaseSleep.name}: skipping \u2014 heartbeat not available`);
2357
2446
  return "skipped";
2358
2447
  }
2359
- const { createSleepHandle } = await import("./sleep-BPWX3FCN.js");
2360
- const { killWakeInhibit } = await import("./commands-WUGPBPHI.js");
2448
+ const { createSleepHandle } = await import("./sleep-K7EXAFGW.js");
2449
+ const { killWakeInhibit } = await import("./commands-AXW7L2MZ.js");
2361
2450
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
2362
2451
  let subagent = null;
2363
- const { getEnv: getEnv2 } = await import("./env-schema-XCPAJ6IZ.js");
2452
+ const { getEnv: getEnv2 } = await import("./env-schema-T43X43BU.js");
2364
2453
  const runtime = {
2365
2454
  async complete(prompt) {
2366
2455
  if (!subagent) subagent = new SubagentRuntime();
@@ -2384,14 +2473,14 @@ async function phaseSleep(ctx) {
2384
2473
  init_log_and_swallow();
2385
2474
  init_env_schema();
2386
2475
  init_logger();
2387
- import { join as join8 } from "node:path";
2476
+ import { join as join9 } from "node:path";
2388
2477
 
2389
2478
  // src/components/dashboard/dashboard-config.ts
2390
2479
  init_logger();
2391
2480
  init_paths();
2392
- import { existsSync as existsSync5 } from "node:fs";
2481
+ import { existsSync as existsSync6 } from "node:fs";
2393
2482
  import { resolve as resolve3 } from "node:path";
2394
- import { homedir as homedir5 } from "node:os";
2483
+ import { homedir as homedir6 } from "node:os";
2395
2484
  var DASHBOARD_DEFAULTS = {
2396
2485
  webPort: 3e3,
2397
2486
  webHost: "127.0.0.1",
@@ -2454,8 +2543,8 @@ function buildStatusSnapshot(refs) {
2454
2543
  heartbeat,
2455
2544
  cron: readCronStatus(),
2456
2545
  notebooklm: refs.notebooklm ? { enabled: true } : null,
2457
- gwsAuth: existsSync5(resolve3(homedir5(), ".config", "gws-cli", "token.json.enc")),
2458
- xAuth: existsSync5(resolve3(abtarsHome(), "secret", "cookies", "x-cookies.json")),
2546
+ gwsAuth: existsSync6(resolve3(homedir6(), ".config", "gws-cli", "token.json.enc")),
2547
+ xAuth: existsSync6(resolve3(abtarsHome(), "secret", "cookies", "x-cookies.json")),
2459
2548
  agentApi: refs.agentApi ? { traffic: refs.agentApi.getTrafficLog() } : null,
2460
2549
  model: refs.model ?? { name: "unknown", provider: "unknown", fallbackChain: [] },
2461
2550
  subsystems: refs.subsystems ?? []
@@ -2593,7 +2682,8 @@ var MemorySearchController = class {
2593
2682
  const webResults = result.results.map(hitToWebResult);
2594
2683
  const stageStatuses = {};
2595
2684
  for (const [name, stage] of Object.entries(result.stages)) {
2596
- stageStatuses[name] = { status: "ok", hits: stage.hits.length, ms: stage.ms };
2685
+ const s = stage;
2686
+ stageStatuses[name] = { status: "ok", hits: s.hits.length, ms: s.ms };
2597
2687
  }
2598
2688
  const response = { results: webResults, layers: stageStatuses };
2599
2689
  return { status: 200, body: response };
@@ -2628,8 +2718,8 @@ function parseOptionalNumber(val) {
2628
2718
  init_log_and_swallow();
2629
2719
  init_paths();
2630
2720
  import * as http from "node:http";
2631
- import { readFileSync as readFileSync5, existsSync as existsSync6 } from "node:fs";
2632
- import { join as join7, dirname } from "node:path";
2721
+ import { readFileSync as readFileSync5, existsSync as existsSync7 } from "node:fs";
2722
+ import { join as join8, dirname as dirname2 } from "node:path";
2633
2723
  import { fileURLToPath } from "node:url";
2634
2724
 
2635
2725
  // node_modules/ws/wrapper.mjs
@@ -2807,8 +2897,8 @@ var DashboardServer = class {
2807
2897
  const method = req.method ?? "GET";
2808
2898
  const pathname = url.split("?")[0];
2809
2899
  if (method === "GET" && pathname === "/") {
2810
- const indexPath = join7(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
2811
- if (existsSync6(indexPath)) {
2900
+ const indexPath = join8(dirname2(fileURLToPath(import.meta.url)), "public", "index.html");
2901
+ if (existsSync7(indexPath)) {
2812
2902
  let html = readFileSync5(indexPath, "utf-8");
2813
2903
  const agentApi = this.deps.agentApiConfig;
2814
2904
  if (agentApi) {
@@ -2826,15 +2916,15 @@ var DashboardServer = class {
2826
2916
  if (method === "GET" && /^\/(js|css|assets|[\w-]+\.(js|css|jpg|png|ico))/.test(pathname ?? "")) {
2827
2917
  const safePath = (pathname ?? "").replace(/\.\./g, "");
2828
2918
  if (safePath === "/assets/logo.png") {
2829
- const customLogo = join7(abtarsHome(), "logo", "logo.png");
2830
- if (existsSync6(customLogo)) {
2919
+ const customLogo = join8(abtarsHome(), "logo", "logo.png");
2920
+ if (existsSync7(customLogo)) {
2831
2921
  res.writeHead(200, { "Content-Type": "image/png" });
2832
2922
  res.end(readFileSync5(customLogo));
2833
2923
  return;
2834
2924
  }
2835
2925
  }
2836
- const filePath = join7(dirname(fileURLToPath(import.meta.url)), "public", safePath);
2837
- if (existsSync6(filePath)) {
2926
+ const filePath = join8(dirname2(fileURLToPath(import.meta.url)), "public", safePath);
2927
+ if (existsSync7(filePath)) {
2838
2928
  const ext = safePath.split(".").pop() ?? "";
2839
2929
  const mimeTypes = { js: "text/javascript", css: "text/css", jpg: "image/jpeg", png: "image/png", ico: "image/x-icon", html: "text/html" };
2840
2930
  res.writeHead(200, { "Content-Type": (mimeTypes[ext] ?? "application/octet-stream") + (["js", "css", "html"].includes(ext) ? "; charset=utf-8" : "") });
@@ -2934,7 +3024,7 @@ var DashboardServer = class {
2934
3024
  if (method === "GET" && pathname === "/api/cron") {
2935
3025
  if (!this.deps.authGate.guard(req, res)) return;
2936
3026
  try {
2937
- const { readEntries: readEntries2 } = await import("./task-store-LC7ZMS72.js");
3027
+ const { readEntries: readEntries2 } = await import("./task-store-VCBHAB43.js");
2938
3028
  res.writeHead(200, { "Content-Type": "application/json" });
2939
3029
  res.end(JSON.stringify({ ok: true, entries: readEntries2() }));
2940
3030
  } catch (err) {
@@ -2985,7 +3075,7 @@ var DashboardServer = class {
2985
3075
  };
2986
3076
  function readLogLines(cutoffMs, levelFilter, limit) {
2987
3077
  const logFile = getLogFile();
2988
- if (!existsSync6(logFile)) return [];
3078
+ if (!existsSync7(logFile)) return [];
2989
3079
  const content = readFileSync5(logFile, "utf-8");
2990
3080
  const allLines = content.split("\n").filter((l) => l.length > 0);
2991
3081
  const cutoffIso = localISO(new Date(cutoffMs));
@@ -3044,7 +3134,7 @@ async function phaseDashboard(ctx) {
3044
3134
  const token = randomBytes2(32).toString("hex");
3045
3135
  dashConfig.webAuthToken = token;
3046
3136
  process.env["WEB_AUTH_TOKEN"] = token;
3047
- const envPath = join8(process.cwd(), "config", ".env");
3137
+ const envPath = join9(process.cwd(), "config", ".env");
3048
3138
  try {
3049
3139
  let content = "";
3050
3140
  try {
@@ -3131,8 +3221,8 @@ init_log_and_swallow();
3131
3221
  init_paths();
3132
3222
  import { createServer as createServer2 } from "http";
3133
3223
  import { createServer as createHttpsServer } from "https";
3134
- import { readFileSync as readFileSync6, existsSync as existsSync7, appendFileSync as appendFileSync2, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
3135
- import { join as join9, dirname as dirname2 } from "path";
3224
+ import { readFileSync as readFileSync6, existsSync as existsSync8, appendFileSync as appendFileSync2, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
3225
+ import { join as join10, dirname as dirname3 } from "path";
3136
3226
  import { fileURLToPath as fileURLToPath2 } from "url";
3137
3227
  init_logger();
3138
3228
  init_logger();
@@ -3505,11 +3595,11 @@ var AgentApiServer = class {
3505
3595
  this.memory = deps.memory;
3506
3596
  this.runtime = deps.runtime;
3507
3597
  this.onPeerActivity = deps.onPeerActivity;
3508
- const configDir = join9(abtarsHome(), "config");
3509
- const identityCrtPath = join9(configDir, "identity.crt");
3510
- const identityKeyPath = join9(configDir, "identity.tls.key");
3598
+ const configDir = join10(abtarsHome(), "config");
3599
+ const identityCrtPath = join10(configDir, "identity.crt");
3600
+ const identityKeyPath = join10(configDir, "identity.tls.key");
3511
3601
  let hasTls = false;
3512
- if (existsSync7(identityCrtPath) && existsSync7(identityKeyPath)) {
3602
+ if (existsSync8(identityCrtPath) && existsSync8(identityKeyPath)) {
3513
3603
  try {
3514
3604
  this.server = createHttpsServer({
3515
3605
  key: readFileSync6(identityKeyPath),
@@ -3527,16 +3617,16 @@ var AgentApiServer = class {
3527
3617
  if (!hasTls) {
3528
3618
  this.server = createServer2((req, res) => this.handle(req, res));
3529
3619
  }
3530
- this.logDir = join9(abtarsHome(), "logs", "agents");
3620
+ this.logDir = join10(abtarsHome(), "logs", "agents");
3531
3621
  mkdirSync4(this.logDir, { recursive: true });
3532
3622
  this.logFile = this.newLogFile();
3533
3623
  try {
3534
- const base = dirname2(fileURLToPath2(import.meta.url));
3624
+ const base = dirname3(fileURLToPath2(import.meta.url));
3535
3625
  const name = deps.config.agentCodename;
3536
3626
  const candidates = [
3537
- join9(base, `agents/${name}.md`),
3538
- join9(base, `../../agents/${name}.md`),
3539
- join9(abtarsHome(), "agents", `${name}.md`)
3627
+ join10(base, `agents/${name}.md`),
3628
+ join10(base, `../../agents/${name}.md`),
3629
+ join10(abtarsHome(), "agents", `${name}.md`)
3540
3630
  ];
3541
3631
  this.agentRules = "";
3542
3632
  for (const p of candidates) {
@@ -3586,9 +3676,9 @@ var AgentApiServer = class {
3586
3676
  logInfo(TAG12, "A2A idle timeout \u2014 saving transcript, closing log, killing session");
3587
3677
  try {
3588
3678
  const today = localDate();
3589
- const dir = join9(this.workingDir, "memory", "working", today);
3679
+ const dir = join10(this.workingDir, "memory", "working", today);
3590
3680
  mkdirSync4(dir, { recursive: true });
3591
- const dest = join9(dir, "transcript_a2a.log");
3681
+ const dest = join10(dir, "transcript_a2a.log");
3592
3682
  const transcript = this.agentSession.getMessages?.()?.map((m) => `[${m.role}] ${m.content}`).join("\n") ?? "";
3593
3683
  writeFileSync4(dest, transcript, "utf-8");
3594
3684
  logInfo(TAG12, `A2A transcript saved to ${dest}`);
@@ -3612,7 +3702,7 @@ var AgentApiServer = class {
3612
3702
  newLogFile() {
3613
3703
  const ts = localIso().replace(/[:.]/g, "-");
3614
3704
  const name = this.config.agentCodename;
3615
- return join9(this.logDir, `${name}_${ts}.log`);
3705
+ return join10(this.logDir, `${name}_${ts}.log`);
3616
3706
  }
3617
3707
  log(role, content) {
3618
3708
  const ts = localIso();
@@ -3696,7 +3786,7 @@ var AgentApiServer = class {
3696
3786
  res.writeHead(429, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Peer hop limit reached", "loop_detected", "hop_exceeded")));
3697
3787
  return;
3698
3788
  }
3699
- const { checkRateLimit } = await import("./agent-api-rate-limit-C25WGSFF.js");
3789
+ const { checkRateLimit } = await import("./agent-api-rate-limit-R2OFAQ3N.js");
3700
3790
  const limit = checkRateLimit(caller);
3701
3791
  if (!limit.allowed) {
3702
3792
  const retryAfter = Math.ceil((limit.retryAfterMs ?? 6e4) / 1e3);
@@ -3704,7 +3794,7 @@ var AgentApiServer = class {
3704
3794
  logWarn(TAG12, `Rate limited ${caller} \u2014 retry in ${retryAfter}s`);
3705
3795
  return;
3706
3796
  }
3707
- const { setCurrentPeerHops } = await import("./peer-client-T44VI7NB.js");
3797
+ const { setCurrentPeerHops } = await import("./peer-client-D2F5QWRV.js");
3708
3798
  setCurrentPeerHops(hopValue);
3709
3799
  let body;
3710
3800
  try {
@@ -3720,7 +3810,7 @@ var AgentApiServer = class {
3720
3810
  const lastMsg = reqMessages?.[reqMessages.length - 1];
3721
3811
  if (lastMsg?.content) {
3722
3812
  const { verifyMessage } = await import("./digital-signature-PNY4TR2W.js");
3723
- const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-D5A4454H.js");
3813
+ const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-5SUIBJLG.js");
3724
3814
  const peerConfig2 = loadPeerConfig2();
3725
3815
  const peerEntry2 = peerConfig2.peers[caller];
3726
3816
  const hasSigTag = /\[sig:\d+:[A-Za-z0-9+/=]+\]$/.test(lastMsg.content);
@@ -3779,7 +3869,7 @@ var AgentApiServer = class {
3779
3869
  return;
3780
3870
  }
3781
3871
  }
3782
- const { loadPeerConfig } = await import("./peer-config-D5A4454H.js");
3872
+ const { loadPeerConfig } = await import("./peer-config-5SUIBJLG.js");
3783
3873
  const peerConfig = loadPeerConfig();
3784
3874
  const peerEntry = peerConfig.peers[caller];
3785
3875
  const policy = buildPolicy("peer", {
@@ -3886,9 +3976,9 @@ async function phaseAgentApi(ctx) {
3886
3976
  } else {
3887
3977
  logError("main", `Agent API failed to start: ${result.error}`);
3888
3978
  }
3889
- const { loadPeerConfig } = await import("./peer-config-D5A4454H.js");
3890
- const { startDnsWakeup } = await import("./dns-wakeup-RYOCQ6GR.js");
3891
- const { callPeer } = await import("./peer-client-T44VI7NB.js");
3979
+ const { loadPeerConfig } = await import("./peer-config-5SUIBJLG.js");
3980
+ const { startDnsWakeup } = await import("./dns-wakeup-N46RPU5E.js");
3981
+ const { callPeer } = await import("./peer-client-D2F5QWRV.js");
3892
3982
  const peerConfig = loadPeerConfig();
3893
3983
  const udpPort = peerConfig.self.udpPort ?? 5353;
3894
3984
  if (Object.keys(peerConfig.peers).length > 0) {
@@ -4022,16 +4112,10 @@ async function startBridge() {
4022
4112
  logError("boot", `\u2717 ${phaseConfig.name} failed \u2014 continuing with empty defaults`, err);
4023
4113
  }
4024
4114
  }
4025
- try {
4026
- const target = basename(readlinkSync(join10(homedir6(), ".abtars", "current")));
4027
- const dash = target.lastIndexOf("-");
4028
- if (dash > 0) {
4029
- ctx.version = target.slice(0, dash);
4030
- ctx.commit = target.slice(dash + 1);
4031
- }
4032
- } catch (err) {
4033
- }
4034
- initBridgeLock({ pid: process.pid, startedAt: Date.now(), version: `${ctx.version}-${ctx.commit}`, argv: process.argv.slice(2) });
4115
+ const deployed = (await import("./paths-QQM74XYT.js")).getDeployedVersion();
4116
+ ctx.version = deployed.version;
4117
+ ctx.commit = deployed.commit;
4118
+ initBridgeLock({ pid: process.pid, startedAt: Date.now(), version: `${ctx.version}${ctx.commit ? "-" + ctx.commit : ""}`, argv: process.argv.slice(2) });
4035
4119
  const bridge = new Bridge(ctx);
4036
4120
  ctx.isSleepActive = () => ctx.sleepHandle?.isActive === true;
4037
4121
  ctx.requestShutdownWithCode = (code) => bridge.requestShutdown(code);
@@ -4057,7 +4141,7 @@ async function startBridge() {
4057
4141
  logError("boot", `\u2717 ${phase.name} failed \u2014 continuing without it`, err);
4058
4142
  }
4059
4143
  }
4060
- const { hasHooks, fire } = await import("./hook-system-POI5VRIX.js");
4144
+ const { hasHooks, fire } = await import("./hook-system-ZCVOFFRD.js");
4061
4145
  if (hasHooks("BridgeStart")) {
4062
4146
  await fire("BridgeStart", { event: "BridgeStart", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: "", platform: "", userId: "" });
4063
4147
  }