abtars 0.2.1-alpha.9 → 0.2.2

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 (309) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +93 -34
  3. package/bundle/{_registry.generated-ADOYFJJ4.js → _registry.generated-KYX63MGY.js} +19 -16
  4. package/bundle/{_registry.generated-ADOYFJJ4.js.map → _registry.generated-KYX63MGY.js.map} +1 -1
  5. package/bundle/abtars-browser.js +5 -6
  6. package/bundle/abtars-browser.js.map +2 -2
  7. package/bundle/abtars-cli.js +205 -179
  8. package/bundle/abtars-cli.js.map +4 -4
  9. package/bundle/abtars-restart.js +4 -4
  10. package/bundle/abtars-rss.js +25 -81
  11. package/bundle/abtars-rss.js.map +2 -2
  12. package/bundle/abtars-task.js +4 -5
  13. package/bundle/abtars-task.js.map +2 -2
  14. package/bundle/abtars-todo.js +133 -0
  15. package/bundle/abtars-todo.js.map +7 -0
  16. package/bundle/abtars.js +305 -182
  17. package/bundle/abtars.js.map +3 -3
  18. package/bundle/action-gate-DYV2XQBP.js +191 -0
  19. package/bundle/action-gate-DYV2XQBP.js.map +7 -0
  20. package/bundle/{agent-api-rate-limit-C25WGSFF.js → agent-api-rate-limit-R2OFAQ3N.js} +4 -4
  21. package/bundle/{agent-registry-SYUFNSVB.js → agent-registry-5VL5KI6U.js} +8 -8
  22. package/bundle/agent-registry-PIS5XJHX.js +19 -0
  23. package/bundle/{bridge-lock-transport-HO545SBK.js → bridge-lock-transport-N6OGDOSE.js} +5 -5
  24. package/bundle/{browse-delivery-VTLEAVYA.js → browse-delivery-DXGMDMXA.js} +8 -7
  25. package/bundle/{browser-REIXOJ6S.js → browser-QMYGSP5W.js} +11 -10
  26. package/bundle/{capability-ILW3D5HS.js → capability-733TLH4W.js} +6 -6
  27. package/bundle/chunk-3IPMKYYH.js +672 -0
  28. package/bundle/chunk-3IPMKYYH.js.map +7 -0
  29. package/bundle/{chunk-PZE3J7ER.js → chunk-3OXQWII3.js} +2 -2
  30. package/bundle/{chunk-X5FBUA53.js → chunk-4WKWPU6U.js} +137 -30
  31. package/bundle/chunk-4WKWPU6U.js.map +7 -0
  32. package/bundle/{chunk-4KJ76TTE.js → chunk-4XW7YA3K.js} +3 -3
  33. package/bundle/{chunk-A5OJYQNU.js → chunk-5WFIAUQC.js} +49 -22
  34. package/bundle/chunk-5WFIAUQC.js.map +7 -0
  35. package/bundle/{chunk-ZVDVNSXK.js → chunk-7WFE2JI5.js} +7 -7
  36. package/bundle/{chunk-R36WIOYX.js → chunk-B52YRWR6.js} +34 -6
  37. package/bundle/chunk-B52YRWR6.js.map +7 -0
  38. package/bundle/{chunk-Q62SXS73.js → chunk-BBDKU4EH.js} +9 -9
  39. package/bundle/chunk-BBTQKKDO.js +258 -0
  40. package/bundle/chunk-BBTQKKDO.js.map +7 -0
  41. package/bundle/{chunk-EX2SRTUE.js → chunk-CYSGXNBY.js} +2 -2
  42. package/bundle/{chunk-LYEAHE5V.js → chunk-DCY7DGMT.js} +2 -2
  43. package/bundle/chunk-DGS7J4P6.js +13 -0
  44. package/bundle/chunk-DGS7J4P6.js.map +7 -0
  45. package/bundle/{chunk-LDKSCXGL.js → chunk-DHPFI7OF.js} +8 -6
  46. package/bundle/{chunk-LDKSCXGL.js.map → chunk-DHPFI7OF.js.map} +1 -1
  47. package/bundle/{chunk-G6IXMYIO.js → chunk-DO4INSXE.js} +2 -2
  48. package/bundle/{chunk-VA5WKN3Z.js → chunk-EGA6JQVV.js} +4 -4
  49. package/bundle/chunk-EKHNWFEQ.js +85 -0
  50. package/bundle/chunk-EKHNWFEQ.js.map +7 -0
  51. package/bundle/{chunk-URAQLQ2U.js → chunk-F3HMZFIL.js} +4 -4
  52. package/bundle/{chunk-OOKLEC6V.js → chunk-FY3QUO2L.js} +7 -7
  53. package/bundle/{chunk-2BY6I4P5.js → chunk-GUTRAMK3.js} +2 -2
  54. package/bundle/chunk-GXKJKYU4.js +1089 -0
  55. package/bundle/chunk-GXKJKYU4.js.map +7 -0
  56. package/bundle/{chunk-GPL57SRN.js → chunk-H7RX7UCR.js} +3 -3
  57. package/bundle/{chunk-BYDUMHXT.js → chunk-HAF2AFBW.js} +2 -2
  58. package/bundle/chunk-HAS5NEK7.js +189 -0
  59. package/bundle/chunk-HAS5NEK7.js.map +7 -0
  60. package/bundle/chunk-HB54S5OY.js +4036 -0
  61. package/bundle/chunk-HB54S5OY.js.map +7 -0
  62. package/bundle/{chunk-OZ4IZFV4.js → chunk-HJQZP5CK.js} +9 -9
  63. package/bundle/{chunk-OZ4IZFV4.js.map → chunk-HJQZP5CK.js.map} +2 -2
  64. package/bundle/{chunk-HEHD3GG5.js → chunk-ITB2K6LI.js} +6 -13
  65. package/bundle/{chunk-HEHD3GG5.js.map → chunk-ITB2K6LI.js.map} +3 -3
  66. package/bundle/{chunk-KSEIWT4T.js → chunk-JFKOPNKL.js} +10 -10
  67. package/bundle/chunk-JFKOPNKL.js.map +7 -0
  68. package/bundle/{chunk-KFENC7BM.js → chunk-L33WNMCP.js} +2 -2
  69. package/bundle/{chunk-JRG4EFMP.js → chunk-LBMETTUP.js} +3 -3
  70. package/bundle/{chunk-TYVI3ZWA.js → chunk-LJAG2URA.js} +10 -7
  71. package/bundle/chunk-LJAG2URA.js.map +7 -0
  72. package/bundle/{chunk-KWBGYWDO.js → chunk-N24ROESF.js} +15 -17
  73. package/bundle/chunk-N24ROESF.js.map +7 -0
  74. package/bundle/{chunk-P2BZSLJJ.js → chunk-N7UG4FID.js} +448 -129
  75. package/bundle/chunk-N7UG4FID.js.map +7 -0
  76. package/bundle/chunk-NIYVCGBC.js +330 -0
  77. package/bundle/chunk-NIYVCGBC.js.map +7 -0
  78. package/bundle/{chunk-TOUZC6NR.js → chunk-OKMN6J4Z.js} +3 -3
  79. package/bundle/{chunk-RV54J75Q.js → chunk-PKHYCNTT.js} +13 -12
  80. package/bundle/chunk-PKHYCNTT.js.map +7 -0
  81. package/bundle/{chunk-XZSYMCLF.js → chunk-PUDGA4RR.js} +7 -7
  82. package/bundle/{chunk-CELR236Q.js → chunk-Q7CH5DA3.js} +2 -2
  83. package/bundle/chunk-QSC6QZ44.js +183 -0
  84. package/bundle/chunk-QSC6QZ44.js.map +7 -0
  85. package/bundle/chunk-RITEGAW6.js +138 -0
  86. package/bundle/chunk-RITEGAW6.js.map +7 -0
  87. package/bundle/{chunk-UDZIZB5F.js → chunk-RTL7HO3N.js} +3 -3
  88. package/bundle/{chunk-ITG6XGBS.js → chunk-SA44ITVX.js} +10 -10
  89. package/bundle/{chunk-3MO2MDXJ.js → chunk-SA6YEFNG.js} +3 -3
  90. package/bundle/{chunk-4BUOO6WI.js → chunk-SMZQDMSZ.js} +31 -11
  91. package/bundle/chunk-SMZQDMSZ.js.map +7 -0
  92. package/bundle/{chunk-GBBTK6H2.js → chunk-SRFEIZQT.js} +4 -4
  93. package/bundle/{chunk-ELRAH7VL.js → chunk-VXUVKC66.js} +3 -3
  94. package/bundle/chunk-VY2BUO6L.js +4035 -0
  95. package/bundle/chunk-VY2BUO6L.js.map +7 -0
  96. package/bundle/chunk-W6ELWLAR.js +143 -0
  97. package/bundle/chunk-W6ELWLAR.js.map +7 -0
  98. package/bundle/{chunk-RSWUPUNA.js → chunk-WMWI3SJ7.js} +30 -6
  99. package/bundle/chunk-WMWI3SJ7.js.map +7 -0
  100. package/bundle/{chunk-MJ6PHMOK.js → chunk-WW5F2DCO.js} +11 -2
  101. package/bundle/chunk-WW5F2DCO.js.map +7 -0
  102. package/bundle/chunk-Y2XBDQP3.js +4055 -0
  103. package/bundle/chunk-Y2XBDQP3.js.map +7 -0
  104. package/bundle/chunk-YMGX6HNP.js +131 -0
  105. package/bundle/chunk-YMGX6HNP.js.map +7 -0
  106. package/bundle/chunk-YWZPKBO6.js +22 -0
  107. package/bundle/chunk-YWZPKBO6.js.map +7 -0
  108. package/bundle/chunk-ZAA7B5BN.js +22 -0
  109. package/bundle/chunk-ZAA7B5BN.js.map +7 -0
  110. package/bundle/{commands-WUGPBPHI.js → commands-IGRSOSK6.js} +15 -14
  111. package/bundle/commands-LAWVNQTO.js +34 -0
  112. package/bundle/commands-RBWY7YXB.js +34 -0
  113. package/bundle/commands-XFZNMZN6.js +34 -0
  114. package/bundle/{config-DQIGDX4W.js → config-NDEYF4AQ.js} +7 -7
  115. package/bundle/{daemon-NPKYZ3CJ.js → daemon-WOQXCKNL.js} +4 -4
  116. package/bundle/{delegation-tools-6FICZQ5G.js → delegation-tools-Z5OM3TXS.js} +5 -5
  117. package/bundle/{deploy-lib-import-SBKXDD3F.js → deploy-lib-import-6VJTYXEG.js} +2 -2
  118. package/bundle/{deps-HN6CEXA4.js → deps-65V7XXG4.js} +4 -4
  119. package/bundle/{direct-api-transport-TRV45NO6.js → direct-api-transport-OZICXTWQ.js} +43 -15
  120. package/bundle/direct-api-transport-OZICXTWQ.js.map +7 -0
  121. package/bundle/direct-api-transport-QIWA5ES2.js +889 -0
  122. package/bundle/direct-api-transport-QIWA5ES2.js.map +7 -0
  123. package/bundle/{discord-adapter-WA2MFRK3.js → discord-adapter-JFIIVG34.js} +27 -24
  124. package/bundle/discord-adapter-JFIIVG34.js.map +7 -0
  125. package/bundle/discord-adapter-U3FA5OTY.js +589 -0
  126. package/bundle/discord-adapter-U3FA5OTY.js.map +7 -0
  127. package/bundle/discord-adapter-W6L5KJ6T.js +589 -0
  128. package/bundle/discord-adapter-W6L5KJ6T.js.map +7 -0
  129. package/bundle/discord-adapter-WWM6ROTW.js +589 -0
  130. package/bundle/discord-adapter-WWM6ROTW.js.map +7 -0
  131. package/bundle/{dns-wakeup-RYOCQ6GR.js → dns-wakeup-N46RPU5E.js} +3 -3
  132. package/bundle/{doctor-R54GZPKL.js → doctor-PIPSGI3H.js} +18 -7
  133. package/bundle/{doctor-R54GZPKL.js.map → doctor-PIPSGI3H.js.map} +2 -2
  134. package/bundle/{ensure-invariants-BJIEOSJ2.js → ensure-invariants-3NOBCYWS.js} +4 -4
  135. package/bundle/{env-schema-XCPAJ6IZ.js → env-schema-T43X43BU.js} +4 -4
  136. package/bundle/{hook-system-POI5VRIX.js → hook-system-ZCVOFFRD.js} +4 -4
  137. package/bundle/hotskills-DTROJY6G.js +17 -0
  138. package/bundle/{install-SH4UVUXQ.js → install-I3CXVW52.js} +3 -3
  139. package/bundle/{install-manifest-QRWID3KZ.js → install-manifest-KBYD7SAY.js} +3 -3
  140. package/bundle/{irc-adapter-AIEP6OX6.js → irc-adapter-HXO5D4SW.js} +3 -3
  141. package/bundle/{irc-config-6VY67UPQ.js → irc-config-XN5VW2V4.js} +5 -5
  142. package/bundle/kanban-board-6Q5E5GEB.js +31 -0
  143. package/bundle/kanban-board-I52RHNHQ.js +31 -0
  144. package/bundle/{lazy-require-UFYFFX2R.js → lazy-require-R3JYCV5M.js} +4 -4
  145. package/bundle/{media-utils-MOE36VWY.js → media-utils-W7XW3SVV.js} +4 -4
  146. package/bundle/{message-pipeline-2MBT44FO.js → message-pipeline-4CTBJ6K2.js} +17 -14
  147. package/bundle/message-pipeline-4KL7OWUH.js +38 -0
  148. package/bundle/message-pipeline-GFKSHRFU.js +38 -0
  149. package/bundle/message-pipeline-TGI2WJJM.js +38 -0
  150. package/bundle/meta.json +3181 -2356
  151. package/bundle/{notification-U6F5ZBSG.js → notification-ULESRDHB.js} +7 -6
  152. package/bundle/{openrouter-credits-7XXO6QGQ.js → openrouter-credits-PLIKRY5D.js} +4 -4
  153. package/bundle/{paths-ZJYIDND2.js → paths-QQM74XYT.js} +4 -2
  154. package/bundle/{peer-client-T44VI7NB.js → peer-client-D2F5QWRV.js} +8 -8
  155. package/bundle/{peer-config-D5A4454H.js → peer-config-5SUIBJLG.js} +5 -5
  156. package/bundle/{phase-transport-FEZ4SIJJ.js → phase-transport-INFD6ELA.js} +10 -10
  157. package/bundle/phase-transport-KXFZ5BVF.js +23 -0
  158. package/bundle/{restore-MFSW3EBL.js → restore-Z6MF54HS.js} +4 -4
  159. package/bundle/{restore-MFSW3EBL.js.map → restore-Z6MF54HS.js.map} +2 -2
  160. package/bundle/{update-check-O5MS6B3L.js → rollback-5RXXLUD6.js} +5 -7
  161. package/bundle/{self-healer-utils-7NFH22VJ.js → self-healer-utils-WPKOVXJD.js} +4 -4
  162. package/bundle/{skill-stats-IPVKMWN3.js → skill-stats-NHNH47QW.js} +5 -5
  163. package/bundle/{sleep-BPWX3FCN.js → sleep-ENFZFUJJ.js} +8 -8
  164. package/bundle/sleep-ENFZFUJJ.js.map +7 -0
  165. package/bundle/{soul-bundle-BRIUDEQ2.js → soul-bundle-QTPWDJB2.js} +7 -7
  166. package/bundle/soul-bundle-QTPWDJB2.js.map +7 -0
  167. package/bundle/{soul-loader-GBXJ7EBH.js → soul-loader-LCPTN4PK.js} +8 -8
  168. package/bundle/soul-loader-LCPTN4PK.js.map +7 -0
  169. package/bundle/{sse-parser-anthropic-H42TTLBD.js → sse-parser-anthropic-PYDJM3UC.js} +4 -4
  170. package/bundle/{sse-parser-responses-WG2LY2ML.js → sse-parser-responses-FYT7A5WT.js} +4 -4
  171. package/bundle/{ssrf-guard-E2KBBC5E.js → ssrf-guard-R4P5OCTO.js} +4 -4
  172. package/bundle/{start-CBVKNEAT.js → start-4DNURGIY.js} +1 -1
  173. package/bundle/{stt-CF3CPFDC.js → stt-YN77NND6.js} +5 -5
  174. package/bundle/stt-YN77NND6.js.map +7 -0
  175. package/bundle/{subagent-runtime-4MTYUBIZ.js → subagent-runtime-5AYOXOU2.js} +5 -5
  176. package/bundle/subagent-runtime-5AYOXOU2.js.map +7 -0
  177. package/bundle/subagent-runtime-VKTX6Q2M.js +13 -0
  178. package/bundle/subagent-runtime-VKTX6Q2M.js.map +7 -0
  179. package/bundle/system-event-buffer-OEPPNUGK.js +17 -0
  180. package/bundle/system-event-buffer-OEPPNUGK.js.map +7 -0
  181. package/bundle/{system-message-TALP6GP2.js → system-message-BRU267FW.js} +3 -3
  182. package/bundle/{system-status-GLYXXDE3.js → system-status-7K2QTH3J.js} +58 -51
  183. package/bundle/system-status-7K2QTH3J.js.map +7 -0
  184. package/bundle/{hotskills-6ECHLXTJ.js → task-failure-buffer-DPM5MWZ5.js} +8 -7
  185. package/bundle/task-failure-buffer-DPM5MWZ5.js.map +7 -0
  186. package/bundle/{task-store-LC7ZMS72.js → task-store-VCBHAB43.js} +5 -5
  187. package/bundle/task-store-VCBHAB43.js.map +7 -0
  188. package/bundle/{telegram-adapter-BJJYXN7J.js → telegram-adapter-4KI4CJPG.js} +51 -33
  189. package/bundle/telegram-adapter-4KI4CJPG.js.map +7 -0
  190. package/bundle/telegram-adapter-76B4JRJJ.js +1080 -0
  191. package/bundle/telegram-adapter-76B4JRJJ.js.map +7 -0
  192. package/bundle/telegram-adapter-VZA74EMT.js +1080 -0
  193. package/bundle/telegram-adapter-VZA74EMT.js.map +7 -0
  194. package/bundle/telegram-adapter-ZO2CLU22.js +1080 -0
  195. package/bundle/telegram-adapter-ZO2CLU22.js.map +7 -0
  196. package/bundle/{tool-registry-T7XLTI2Q.js → tool-registry-CG7GIS64.js} +13 -9
  197. package/bundle/tool-registry-CG7GIS64.js.map +7 -0
  198. package/bundle/tool-registry-TGNU5AMG.js +43 -0
  199. package/bundle/tool-registry-TGNU5AMG.js.map +7 -0
  200. package/bundle/{tool-sandbox-OZMXJZLQ.js → tool-sandbox-TLAL55QP.js} +5 -5
  201. package/bundle/tool-sandbox-TLAL55QP.js.map +7 -0
  202. package/bundle/{transport-config-G5NKQXPJ.js → transport-config-JIKHB7GT.js} +8 -8
  203. package/bundle/transport-config-JIKHB7GT.js.map +7 -0
  204. package/bundle/update-check-AJMIBQGQ.js +81 -0
  205. package/bundle/update-check-AJMIBQGQ.js.map +7 -0
  206. package/bundle/{user-registry-NUVNEHJU.js → user-registry-PEFDZ5AV.js} +5 -5
  207. package/bundle/user-registry-PEFDZ5AV.js.map +7 -0
  208. package/core/skills/tools/gmail/SKILL.md +5 -14
  209. package/core/skills/tools/rss/SKILL.md +51 -0
  210. package/install-manifest.json +8 -2
  211. package/package.json +4 -2
  212. package/scripts/abtars-daemon.service +3 -0
  213. package/scripts/abtars@.service +3 -0
  214. package/scripts/build-and-deploy.sh +68 -0
  215. package/scripts/doctor.sh +38 -0
  216. package/scripts/emergency-deploy.sh +95 -0
  217. package/scripts/watchdog.sh +51 -5
  218. package/bundle/chunk-4BUOO6WI.js.map +0 -7
  219. package/bundle/chunk-A5OJYQNU.js.map +0 -7
  220. package/bundle/chunk-JX3ZZU3O.js +0 -82
  221. package/bundle/chunk-JX3ZZU3O.js.map +0 -7
  222. package/bundle/chunk-KJOCXWJ5.js +0 -131
  223. package/bundle/chunk-KJOCXWJ5.js.map +0 -7
  224. package/bundle/chunk-KSEIWT4T.js.map +0 -7
  225. package/bundle/chunk-KWBGYWDO.js.map +0 -7
  226. package/bundle/chunk-MJ6PHMOK.js.map +0 -7
  227. package/bundle/chunk-P2BZSLJJ.js.map +0 -7
  228. package/bundle/chunk-R36WIOYX.js.map +0 -7
  229. package/bundle/chunk-RE3F3CFW.js +0 -300
  230. package/bundle/chunk-RE3F3CFW.js.map +0 -7
  231. package/bundle/chunk-RSWUPUNA.js.map +0 -7
  232. package/bundle/chunk-RV54J75Q.js.map +0 -7
  233. package/bundle/chunk-TYVI3ZWA.js.map +0 -7
  234. package/bundle/chunk-X5FBUA53.js.map +0 -7
  235. package/bundle/direct-api-transport-TRV45NO6.js.map +0 -7
  236. package/bundle/discord-adapter-WA2MFRK3.js.map +0 -7
  237. package/bundle/system-status-GLYXXDE3.js.map +0 -7
  238. package/bundle/telegram-adapter-BJJYXN7J.js.map +0 -7
  239. /package/bundle/{agent-api-rate-limit-C25WGSFF.js.map → agent-api-rate-limit-R2OFAQ3N.js.map} +0 -0
  240. /package/bundle/{agent-registry-SYUFNSVB.js.map → agent-registry-5VL5KI6U.js.map} +0 -0
  241. /package/bundle/{bridge-lock-transport-HO545SBK.js.map → agent-registry-PIS5XJHX.js.map} +0 -0
  242. /package/bundle/{browse-delivery-VTLEAVYA.js.map → bridge-lock-transport-N6OGDOSE.js.map} +0 -0
  243. /package/bundle/{browser-REIXOJ6S.js.map → browse-delivery-DXGMDMXA.js.map} +0 -0
  244. /package/bundle/{capability-ILW3D5HS.js.map → browser-QMYGSP5W.js.map} +0 -0
  245. /package/bundle/{commands-WUGPBPHI.js.map → capability-733TLH4W.js.map} +0 -0
  246. /package/bundle/{chunk-PZE3J7ER.js.map → chunk-3OXQWII3.js.map} +0 -0
  247. /package/bundle/{chunk-4KJ76TTE.js.map → chunk-4XW7YA3K.js.map} +0 -0
  248. /package/bundle/{chunk-ZVDVNSXK.js.map → chunk-7WFE2JI5.js.map} +0 -0
  249. /package/bundle/{chunk-Q62SXS73.js.map → chunk-BBDKU4EH.js.map} +0 -0
  250. /package/bundle/{chunk-EX2SRTUE.js.map → chunk-CYSGXNBY.js.map} +0 -0
  251. /package/bundle/{chunk-LYEAHE5V.js.map → chunk-DCY7DGMT.js.map} +0 -0
  252. /package/bundle/{chunk-G6IXMYIO.js.map → chunk-DO4INSXE.js.map} +0 -0
  253. /package/bundle/{chunk-VA5WKN3Z.js.map → chunk-EGA6JQVV.js.map} +0 -0
  254. /package/bundle/{chunk-URAQLQ2U.js.map → chunk-F3HMZFIL.js.map} +0 -0
  255. /package/bundle/{chunk-OOKLEC6V.js.map → chunk-FY3QUO2L.js.map} +0 -0
  256. /package/bundle/{chunk-2BY6I4P5.js.map → chunk-GUTRAMK3.js.map} +0 -0
  257. /package/bundle/{chunk-GPL57SRN.js.map → chunk-H7RX7UCR.js.map} +0 -0
  258. /package/bundle/{chunk-BYDUMHXT.js.map → chunk-HAF2AFBW.js.map} +0 -0
  259. /package/bundle/{chunk-KFENC7BM.js.map → chunk-L33WNMCP.js.map} +0 -0
  260. /package/bundle/{chunk-JRG4EFMP.js.map → chunk-LBMETTUP.js.map} +0 -0
  261. /package/bundle/{chunk-TOUZC6NR.js.map → chunk-OKMN6J4Z.js.map} +0 -0
  262. /package/bundle/{chunk-XZSYMCLF.js.map → chunk-PUDGA4RR.js.map} +0 -0
  263. /package/bundle/{chunk-CELR236Q.js.map → chunk-Q7CH5DA3.js.map} +0 -0
  264. /package/bundle/{chunk-UDZIZB5F.js.map → chunk-RTL7HO3N.js.map} +0 -0
  265. /package/bundle/{chunk-ITG6XGBS.js.map → chunk-SA44ITVX.js.map} +0 -0
  266. /package/bundle/{chunk-3MO2MDXJ.js.map → chunk-SA6YEFNG.js.map} +0 -0
  267. /package/bundle/{chunk-GBBTK6H2.js.map → chunk-SRFEIZQT.js.map} +0 -0
  268. /package/bundle/{chunk-ELRAH7VL.js.map → chunk-VXUVKC66.js.map} +0 -0
  269. /package/bundle/{config-DQIGDX4W.js.map → commands-IGRSOSK6.js.map} +0 -0
  270. /package/bundle/{delegation-tools-6FICZQ5G.js.map → commands-LAWVNQTO.js.map} +0 -0
  271. /package/bundle/{deploy-lib-import-SBKXDD3F.js.map → commands-RBWY7YXB.js.map} +0 -0
  272. /package/bundle/{env-schema-XCPAJ6IZ.js.map → commands-XFZNMZN6.js.map} +0 -0
  273. /package/bundle/{hook-system-POI5VRIX.js.map → config-NDEYF4AQ.js.map} +0 -0
  274. /package/bundle/{daemon-NPKYZ3CJ.js.map → daemon-WOQXCKNL.js.map} +0 -0
  275. /package/bundle/{hotskills-6ECHLXTJ.js.map → delegation-tools-Z5OM3TXS.js.map} +0 -0
  276. /package/bundle/{install-SH4UVUXQ.js.map → deploy-lib-import-6VJTYXEG.js.map} +0 -0
  277. /package/bundle/{deps-HN6CEXA4.js.map → deps-65V7XXG4.js.map} +0 -0
  278. /package/bundle/{dns-wakeup-RYOCQ6GR.js.map → dns-wakeup-N46RPU5E.js.map} +0 -0
  279. /package/bundle/{ensure-invariants-BJIEOSJ2.js.map → ensure-invariants-3NOBCYWS.js.map} +0 -0
  280. /package/bundle/{lazy-require-UFYFFX2R.js.map → env-schema-T43X43BU.js.map} +0 -0
  281. /package/bundle/{message-pipeline-2MBT44FO.js.map → hook-system-ZCVOFFRD.js.map} +0 -0
  282. /package/bundle/{notification-U6F5ZBSG.js.map → hotskills-DTROJY6G.js.map} +0 -0
  283. /package/bundle/{paths-ZJYIDND2.js.map → install-I3CXVW52.js.map} +0 -0
  284. /package/bundle/{install-manifest-QRWID3KZ.js.map → install-manifest-KBYD7SAY.js.map} +0 -0
  285. /package/bundle/{irc-adapter-AIEP6OX6.js.map → irc-adapter-HXO5D4SW.js.map} +0 -0
  286. /package/bundle/{irc-config-6VY67UPQ.js.map → irc-config-XN5VW2V4.js.map} +0 -0
  287. /package/bundle/{peer-config-D5A4454H.js.map → kanban-board-6Q5E5GEB.js.map} +0 -0
  288. /package/bundle/{phase-transport-FEZ4SIJJ.js.map → kanban-board-I52RHNHQ.js.map} +0 -0
  289. /package/bundle/{skill-stats-IPVKMWN3.js.map → lazy-require-R3JYCV5M.js.map} +0 -0
  290. /package/bundle/{media-utils-MOE36VWY.js.map → media-utils-W7XW3SVV.js.map} +0 -0
  291. /package/bundle/{sleep-BPWX3FCN.js.map → message-pipeline-4CTBJ6K2.js.map} +0 -0
  292. /package/bundle/{soul-bundle-BRIUDEQ2.js.map → message-pipeline-4KL7OWUH.js.map} +0 -0
  293. /package/bundle/{soul-loader-GBXJ7EBH.js.map → message-pipeline-GFKSHRFU.js.map} +0 -0
  294. /package/bundle/{stt-CF3CPFDC.js.map → message-pipeline-TGI2WJJM.js.map} +0 -0
  295. /package/bundle/{subagent-runtime-4MTYUBIZ.js.map → notification-ULESRDHB.js.map} +0 -0
  296. /package/bundle/{openrouter-credits-7XXO6QGQ.js.map → openrouter-credits-PLIKRY5D.js.map} +0 -0
  297. /package/bundle/{task-store-LC7ZMS72.js.map → paths-QQM74XYT.js.map} +0 -0
  298. /package/bundle/{peer-client-T44VI7NB.js.map → peer-client-D2F5QWRV.js.map} +0 -0
  299. /package/bundle/{tool-registry-T7XLTI2Q.js.map → peer-config-5SUIBJLG.js.map} +0 -0
  300. /package/bundle/{tool-sandbox-OZMXJZLQ.js.map → phase-transport-INFD6ELA.js.map} +0 -0
  301. /package/bundle/{transport-config-G5NKQXPJ.js.map → phase-transport-KXFZ5BVF.js.map} +0 -0
  302. /package/bundle/{update-check-O5MS6B3L.js.map → rollback-5RXXLUD6.js.map} +0 -0
  303. /package/bundle/{self-healer-utils-7NFH22VJ.js.map → self-healer-utils-WPKOVXJD.js.map} +0 -0
  304. /package/bundle/{user-registry-NUVNEHJU.js.map → skill-stats-NHNH47QW.js.map} +0 -0
  305. /package/bundle/{sse-parser-anthropic-H42TTLBD.js.map → sse-parser-anthropic-PYDJM3UC.js.map} +0 -0
  306. /package/bundle/{sse-parser-responses-WG2LY2ML.js.map → sse-parser-responses-FYT7A5WT.js.map} +0 -0
  307. /package/bundle/{ssrf-guard-E2KBBC5E.js.map → ssrf-guard-R4P5OCTO.js.map} +0 -0
  308. /package/bundle/{start-CBVKNEAT.js.map → start-4DNURGIY.js.map} +0 -0
  309. /package/bundle/{system-message-TALP6GP2.js.map → system-message-BRU267FW.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-Y2XBDQP3.js";
20
18
  import {
21
19
  require_extension,
22
20
  require_permessage_deflate,
@@ -27,52 +25,60 @@ import {
27
25
  require_websocket,
28
26
  require_websocket_server
29
27
  } from "./chunk-NIRYBWUW.js";
28
+ import "./chunk-L33WNMCP.js";
30
29
  import {
31
30
  phaseTransport,
32
31
  resetAllCtxStarts,
33
32
  updateCtxStart
34
- } from "./chunk-A5OJYQNU.js";
35
- import "./chunk-3MO2MDXJ.js";
36
- import "./chunk-ZVDVNSXK.js";
37
- import "./chunk-RV54J75Q.js";
33
+ } from "./chunk-3IPMKYYH.js";
34
+ import {
35
+ addTaskFailure
36
+ } from "./chunk-ZAA7B5BN.js";
37
+ import "./chunk-SA6YEFNG.js";
38
+ import {
39
+ loadAndValidateConfig
40
+ } from "./chunk-BBDKU4EH.js";
41
+ import "./chunk-7WFE2JI5.js";
42
+ import "./chunk-PKHYCNTT.js";
43
+ import "./chunk-HJQZP5CK.js";
38
44
  import {
39
45
  SubagentRuntime
40
- } from "./chunk-XZSYMCLF.js";
46
+ } from "./chunk-QSC6QZ44.js";
41
47
  import {
42
48
  createCapabilityRegistry
43
- } from "./chunk-OOKLEC6V.js";
49
+ } from "./chunk-FY3QUO2L.js";
44
50
  import {
45
51
  sendNotification,
46
52
  sendToMainChat
47
- } from "./chunk-TYVI3ZWA.js";
48
- import "./chunk-KFENC7BM.js";
49
- import "./chunk-OZ4IZFV4.js";
53
+ } from "./chunk-LJAG2URA.js";
50
54
  import {
51
- loadAndValidateConfig
52
- } from "./chunk-Q62SXS73.js";
55
+ sanitizeOutbound
56
+ } from "./chunk-YWZPKBO6.js";
53
57
  import {
54
- loadUsers
55
- } from "./chunk-GBBTK6H2.js";
58
+ loadTransport,
59
+ resolveAgent
60
+ } from "./chunk-SA44ITVX.js";
61
+ import {
62
+ readEnvWithDefault
63
+ } from "./chunk-HAF2AFBW.js";
56
64
  import {
57
65
  init_peer_jwt,
58
66
  peer_jwt_exports
59
- } from "./chunk-CELR236Q.js";
67
+ } from "./chunk-Q7CH5DA3.js";
68
+ import {
69
+ init_peer_config,
70
+ peer_config_exports
71
+ } from "./chunk-EGA6JQVV.js";
72
+ import "./chunk-DCY7DGMT.js";
60
73
  import {
61
74
  setPeerActivityCallback
62
- } from "./chunk-X5FBUA53.js";
75
+ } from "./chunk-GXKJKYU4.js";
63
76
  import {
64
77
  abmind,
65
78
  loadAbmind,
66
79
  resetAbmindCache
67
80
  } from "./chunk-JAJ3DUQ2.js";
68
- import "./chunk-G6IXMYIO.js";
69
- import {
70
- loadTransport,
71
- resolveAgent
72
- } from "./chunk-ITG6XGBS.js";
73
- import {
74
- readEnvWithDefault
75
- } from "./chunk-BYDUMHXT.js";
81
+ import "./chunk-DO4INSXE.js";
76
82
  import {
77
83
  appendRestartTimestamp,
78
84
  initBridgeLock,
@@ -84,38 +90,42 @@ import {
84
90
  updateLastHeartbeat,
85
91
  writeRestartReason,
86
92
  writeSleepStatus
87
- } from "./chunk-UDZIZB5F.js";
93
+ } from "./chunk-RTL7HO3N.js";
88
94
  import {
89
95
  buildPolicy
90
- } from "./chunk-JRG4EFMP.js";
91
- import "./chunk-ELRAH7VL.js";
92
- import "./chunk-TOUZC6NR.js";
96
+ } from "./chunk-LBMETTUP.js";
97
+ import {
98
+ loadUsers
99
+ } from "./chunk-SRFEIZQT.js";
100
+ import "./chunk-VXUVKC66.js";
101
+ import "./chunk-OKMN6J4Z.js";
93
102
  import "./chunk-MV6CJFWR.js";
94
103
  import {
95
- init_peer_config,
96
- peer_config_exports
97
- } from "./chunk-VA5WKN3Z.js";
98
- import "./chunk-LYEAHE5V.js";
104
+ kanbanComplete,
105
+ kanbanEnqueue,
106
+ kanbanFail,
107
+ kanbanRunning
108
+ } from "./chunk-W6ELWLAR.js";
99
109
  import "./chunk-TBLYGCPQ.js";
100
110
  import {
101
111
  readEntries,
102
112
  readEntry,
103
113
  recordRun,
104
114
  writeEntry
105
- } from "./chunk-GPL57SRN.js";
115
+ } from "./chunk-H7RX7UCR.js";
106
116
  import {
107
117
  localISO
108
118
  } from "./chunk-MZWMYN4O.js";
109
- import {
110
- init_log_and_swallow,
111
- logAndSwallow
112
- } from "./chunk-EX2SRTUE.js";
113
119
  import {
114
120
  _resetEnv,
115
121
  getEnv,
116
122
  initEnv,
117
123
  init_env_schema
118
- } from "./chunk-PZE3J7ER.js";
124
+ } from "./chunk-3OXQWII3.js";
125
+ import {
126
+ init_log_and_swallow,
127
+ logAndSwallow
128
+ } from "./chunk-CYSGXNBY.js";
119
129
  import {
120
130
  getLogFile,
121
131
  init_logger,
@@ -125,11 +135,14 @@ import {
125
135
  logInfo,
126
136
  logWarn,
127
137
  setLogLevel
128
- } from "./chunk-2BY6I4P5.js";
138
+ } from "./chunk-GUTRAMK3.js";
139
+ import {
140
+ localDate
141
+ } from "./chunk-DGS7J4P6.js";
129
142
  import {
130
143
  abtarsHome,
131
144
  init_paths
132
- } from "./chunk-MJ6PHMOK.js";
145
+ } from "./chunk-WW5F2DCO.js";
133
146
  import {
134
147
  __toCommonJS,
135
148
  __toESM
@@ -268,10 +281,7 @@ init_env_schema();
268
281
 
269
282
  // src/bridge-app.ts
270
283
  import { execFileSync } from "node:child_process";
271
- import { readlinkSync } from "node:fs";
272
284
  init_logger();
273
- import { join as join10, basename } from "node:path";
274
- import { homedir as homedir6 } from "node:os";
275
285
 
276
286
  // src/boot/context.ts
277
287
  init_env_schema();
@@ -403,7 +413,7 @@ var ServiceRegistry = class {
403
413
  if (state.lastError?.includes("EADDRINUSE")) {
404
414
  const portMatch = state.lastError.match(/:(\d+)/);
405
415
  if (portMatch) {
406
- const { healPort } = await import("./self-healer-utils-7NFH22VJ.js");
416
+ const { healPort } = await import("./self-healer-utils-WPKOVXJD.js");
407
417
  healPort(parseInt(portMatch[1], 10));
408
418
  }
409
419
  }
@@ -507,6 +517,7 @@ function createBootCtx(overrides = {}) {
507
517
  selfHealerTask: null,
508
518
  dashboardServer: null,
509
519
  agentApiServer: null,
520
+ actionGate: null,
510
521
  mcpDaemonStarted: false,
511
522
  // Callbacks
512
523
  isSleepActive: () => false,
@@ -608,7 +619,7 @@ async function phaseConfig(ctx) {
608
619
  } catch (err) {
609
620
  logAndSwallow("phase_config", "op", err);
610
621
  }
611
- const { loadHookConfig } = await import("./hook-system-POI5VRIX.js");
622
+ const { loadHookConfig } = await import("./hook-system-ZCVOFFRD.js");
612
623
  loadHookConfig();
613
624
  return "ran";
614
625
  }
@@ -653,7 +664,20 @@ var explicitMethods = {
653
664
  var nullMemory = new Proxy(explicitMethods, handler);
654
665
 
655
666
  // src/boot/phase-memory.ts
667
+ import { existsSync as existsSync4 } from "node:fs";
668
+ import { join as join3 } from "node:path";
669
+ import { homedir as homedir4 } from "node:os";
656
670
  async function phaseMemory(ctx) {
671
+ const home2 = process.env["ABTARS_HOME"] ?? join3(homedir4(), ".abtars");
672
+ const abmindPaths = [
673
+ join3(home2, "app", "node_modules", "abmind", "package.json"),
674
+ join3(home2, "app", "bundle", "node_modules", "abmind", "package.json")
675
+ ];
676
+ const existing = abmindPaths.filter((p) => existsSync4(p));
677
+ if (existing.length > 1) {
678
+ logError("boot", `FATAL: duplicate abmind at ${existing.map((p) => p.replace("/package.json", "")).join(" + ")}. Delete one to prevent dual DB connections. Refusing to start.`);
679
+ process.exit(1);
680
+ }
657
681
  const mod = await loadAbmind();
658
682
  if (!mod) {
659
683
  logWarn("main", "\u26A0\uFE0F abmind not available \u2014 running without persistent memory");
@@ -693,6 +717,16 @@ ${content}`);
693
717
  const ipcBackend = new SqliteBackend(ctx.memoryConfig);
694
718
  await ipcBackend.initialize();
695
719
  const memoryIpc = new MemoryIpcServer(ipcBackend);
720
+ if (ctx.actionGate) {
721
+ memoryIpc.setUnknownMethodHandler(async (method, params) => {
722
+ if (method === "auth-request" && ctx.actionGate) {
723
+ const { category, detail } = params;
724
+ const granted = await ctx.actionGate.requestAuth(category, detail || "");
725
+ return { granted };
726
+ }
727
+ throw new Error(`Unknown method: ${method}`);
728
+ });
729
+ }
696
730
  await memoryIpc.start();
697
731
  return "ran";
698
732
  }
@@ -702,14 +736,14 @@ init_log_and_swallow();
702
736
  init_paths();
703
737
  init_logger();
704
738
  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";
739
+ import { existsSync as existsSync5, readFileSync as readFileSync2, readdirSync as readdirSync2, statSync as statSync2, writeFileSync as writeFileSync3, mkdirSync } from "node:fs";
740
+ import { resolve as resolve2, join as join4, dirname, basename } from "node:path";
741
+ import { homedir as homedir5 } from "node:os";
708
742
  var TAG3 = "cron-queue";
709
743
  var AGENT_TIMEOUT_MS = 30 * 60 * 1e3;
710
744
  var RETRY_DELAY_MS = 10 * 60 * 1e3;
711
745
  var PRIO_RANK = { high: 0, medium: 1, low: 2 };
712
- var STATE_FILE = join3(homedir4(), ".abtars", "state", "task-queue-state.json");
746
+ var STATE_FILE = join4(homedir5(), ".abtars", "state", "task-queue-state.json");
713
747
  function persistState(current, queue) {
714
748
  try {
715
749
  const state = {
@@ -724,7 +758,7 @@ function persistState(current, queue) {
724
758
  }
725
759
  function loadStaleState() {
726
760
  try {
727
- if (!existsSync4(STATE_FILE)) return null;
761
+ if (!existsSync5(STATE_FILE)) return null;
728
762
  const raw = JSON.parse(readFileSync2(STATE_FILE, "utf-8"));
729
763
  if (raw.pid === process.pid) return null;
730
764
  const sleepStatus = readBridgeLockField("sleepStatus");
@@ -740,9 +774,9 @@ function recordRunToFile(entryId, exitCode) {
740
774
  }
741
775
  function writeResultFile(entryId, content) {
742
776
  try {
743
- const dir = join3(abtarsHome(), "workspace", entryId);
777
+ const dir = join4(abtarsHome(), "workspace", entryId);
744
778
  mkdirSync(dir, { recursive: true });
745
- const file = join3(dir, `${entryId}-${localDate()}.md`);
779
+ const file = join4(dir, `${entryId}-${localDate()}.md`);
746
780
  writeFileSync3(file, content, "utf-8");
747
781
  return file;
748
782
  } catch (err) {
@@ -755,8 +789,8 @@ function todayStr() {
755
789
  return localDate();
756
790
  }
757
791
  function readTaskFile(taskFile) {
758
- const filePath = resolve2(taskFile.replace(/^~/, homedir4()));
759
- if (!existsSync4(filePath)) {
792
+ const filePath = resolve2(taskFile.replace(/^~/, homedir5()));
793
+ if (!existsSync5(filePath)) {
760
794
  logWarn(TAG3, `Task file not found: ${filePath}`);
761
795
  return null;
762
796
  }
@@ -764,10 +798,40 @@ function readTaskFile(taskFile) {
764
798
  const today = todayStr();
765
799
  const content = raw.replace(/\{today\}/g, today);
766
800
  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())));
801
+ let prompt;
802
+ let dodPaths = [];
803
+ if (dodIdx === -1) {
804
+ prompt = content.trim();
805
+ } else {
806
+ prompt = content.slice(0, dodIdx).trim();
807
+ const dodSection = content.slice(dodIdx);
808
+ dodPaths = dodSection.split("\n").filter((l) => l.match(/^- /)).map((l) => l.replace(/^- /, "").trim()).map((p) => resolve2(p.replace(/^~/, homedir5())));
809
+ }
810
+ const dir = dirname(filePath);
811
+ const base = basename(filePath, ".md");
812
+ const associated = readdirSync2(dir).filter((f) => f.startsWith(base + "_")).sort();
813
+ if (associated.length > 0) {
814
+ let injected = "\n\n---\n## Associated files\n";
815
+ let totalChars = 0;
816
+ const CAP = 1e4;
817
+ for (const f of associated) {
818
+ const fc = readFileSync2(join4(dir, f), "utf-8");
819
+ if (totalChars + fc.length > CAP) {
820
+ injected += `
821
+ [${f}]: (truncated \u2014 full file at ${join4(dir, f)})
822
+ `;
823
+ break;
824
+ }
825
+ injected += `
826
+ ### ${f}
827
+ \`\`\`
828
+ ${fc}
829
+ \`\`\`
830
+ `;
831
+ totalChars += fc.length;
832
+ }
833
+ prompt += injected;
834
+ }
771
835
  return { prompt, dodPaths };
772
836
  }
773
837
  function checkDoD(paths) {
@@ -775,7 +839,7 @@ function checkDoD(paths) {
775
839
  const results = [];
776
840
  let allPassed = true;
777
841
  for (const p of paths) {
778
- if (!existsSync4(p)) {
842
+ if (!existsSync5(p)) {
779
843
  results.push(`\u2717 missing: ${p}`);
780
844
  allPassed = false;
781
845
  } else {
@@ -951,6 +1015,7 @@ var CronQueue = class {
951
1015
  scheduleRetry(entry, !!entry._retrying);
952
1016
  if (!paused && code !== 2) this.tryInjectFailure(entry, `${status}
953
1017
  ${(output || "(no output)").slice(0, 500)}`);
1018
+ 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
1019
  }
955
1020
  if (!paused) {
956
1021
  if (code !== 0 || output.trim()) {
@@ -994,10 +1059,12 @@ ${(output || "(no output)").slice(0, 500)}`);
994
1059
  }
995
1060
  logInfo(TAG3, `\u25B6 Agent: "${entry.message.slice(0, 60)}"`);
996
1061
  this.setCurrent(entry, 0, "agent");
997
- const workspace = join3(abtarsHome(), "workspace", entry.id);
1062
+ const boardId = kanbanEnqueue(entry.message, "task", entry.id);
1063
+ kanbanRunning(boardId);
1064
+ const workspace = join4(abtarsHome(), "workspace", entry.id);
998
1065
  mkdirSync(workspace, { recursive: true });
999
1066
  process.env["WORKSPACE"] = workspace;
1000
- const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-4MTYUBIZ.js");
1067
+ const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-5AYOXOU2.js");
1001
1068
  const runtime = new SubagentRuntime2();
1002
1069
  this.timeout = setTimeout(() => {
1003
1070
  logWarn(TAG3, `\u23F1\uFE0F Agent "${entry.id}" timed out (30min) \u2014 shutting down runtime`);
@@ -1033,6 +1100,11 @@ ${dod.details}`);
1033
1100
  }
1034
1101
  const resultPath = writeResultFile(entry.id, cleaned);
1035
1102
  if (resultPath) logInfo(TAG3, `\u25A0 Result: ${resultPath}`);
1103
+ if (exitCode === 0) {
1104
+ kanbanComplete(boardId, resultPath, summary);
1105
+ } else {
1106
+ kanbanFail(boardId, `${summary}${dodResult}`);
1107
+ }
1036
1108
  recordRunToFile(entry.id, exitCode);
1037
1109
  if (exitCode === 0) recordRun2(entry, 0);
1038
1110
  const paused = this.checkAutoPause(entry, exitCode, `${summary}${dodResult}`);
@@ -1042,11 +1114,12 @@ ${dod.details}`);
1042
1114
  if (!paused) this.tryInjectFailure(entry, `${icon} ${summary}${dodResult}`);
1043
1115
  }
1044
1116
  if (!paused) {
1045
- const producedFiles = dodPaths.filter((p) => existsSync4(p));
1117
+ const producedFiles = dodPaths.filter((p) => existsSync5(p));
1046
1118
  onComplete?.(entry.chatId, entry.message, `${icon} ${summary}${dodResult}`, producedFiles.length > 0 ? producedFiles : void 0);
1047
1119
  }
1048
1120
  }).catch((err) => {
1049
1121
  logWarn(TAG3, `Agent failed: ${err instanceof Error ? err.message : String(err)}`);
1122
+ kanbanFail(boardId, err instanceof Error ? err.message : String(err));
1050
1123
  recordRunToFile(entry.id, 1);
1051
1124
  const paused = this.checkAutoPause(entry, 1, err instanceof Error ? err.message : String(err));
1052
1125
  scheduleRetry(entry, !!entry._retrying);
@@ -1066,7 +1139,7 @@ ${dod.details}`);
1066
1139
  // src/components/idle-save.ts
1067
1140
  init_logger();
1068
1141
  import { mkdirSync as mkdirSync2 } from "node:fs";
1069
- import { join as join4 } from "node:path";
1142
+ import { join as join5 } from "node:path";
1070
1143
  var CHAT_SAVE_IDLE_MS = 10 * 60 * 1e3;
1071
1144
  var IdleSave = class {
1072
1145
  timers = /* @__PURE__ */ new Map();
@@ -1093,9 +1166,9 @@ var IdleSave = class {
1093
1166
  if (!this.enabled) return;
1094
1167
  if (!("sendKeys" in this.transport)) return;
1095
1168
  const today = localDate();
1096
- const dir = join4(this.memoryDir, "working", today);
1169
+ const dir = join5(this.memoryDir, "working", today);
1097
1170
  mkdirSync2(dir, { recursive: true });
1098
- const dest = join4(dir, `transcript_${chatId}.chat`);
1171
+ const dest = join5(dir, `transcript_${chatId}.chat`);
1099
1172
  try {
1100
1173
  await this.transport.sendPrompt(sessionKey, `/chat save ${dest}`);
1101
1174
  logInfo("idle-save", `Chat saved to ${dest}`);
@@ -1150,7 +1223,7 @@ Result: ${result}${pending}
1150
1223
  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
1224
  void (async () => {
1152
1225
  try {
1153
- const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-4MTYUBIZ.js");
1226
+ const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-5AYOXOU2.js");
1154
1227
  const runtime = new SubagentRuntime2();
1155
1228
  await runtime.complete("coding", msg, { sessionType: "S" });
1156
1229
  await runtime.shutdown();
@@ -1172,28 +1245,9 @@ Resume with: /task resume <id>`;
1172
1245
  }
1173
1246
  );
1174
1247
  ctx.cronQueue = cronQueue;
1175
- const cronCallback = (chatId, message, result, dodFiles) => {
1176
- if (!ctx.platforms.telegram || !ctx.telegramAdapter) return;
1177
- const adapter = ctx.telegramAdapter;
1178
- adapter.sendMessage(String(chatId), sanitizeOutbound(result)).catch((err) => {
1179
- logWarn("main", `Cron task TG report failed: ${err}`);
1180
- });
1181
- if (dodFiles?.length) {
1182
- for (const file of dodFiles) {
1183
- adapter.sendDocument(String(chatId), file, message.slice(0, 1024)).catch((err) => {
1184
- logWarn("main", `Cron task TG sendDocument failed: ${err}`);
1185
- });
1186
- }
1187
- }
1188
- import("./system-message-TALP6GP2.js").then(({ sendSystemMessage }) => {
1189
- const summary = result.length > 500 ? result.slice(0, 500) + "\u2026" : result;
1190
- const status = result.length > 4e3 ? "truncated" : "complete";
1191
- sendSystemMessage(`[SYSTEM] [TASK RESULT] Task "${message}" \u2014 ${status}.
1192
- Output: ${summary}`).catch((err) => logWarn("main", `Task result injection failed: ${err}`));
1193
- }).catch(() => {
1194
- });
1248
+ const cronCallback = (_chatId, _message, _result, _dodFiles) => {
1195
1249
  };
1196
- const { setEnqueueCron, setSecretGetDb } = await import("./tool-registry-T7XLTI2Q.js");
1250
+ const { setEnqueueCron, setSecretGetDb } = await import("./tool-registry-CG7GIS64.js");
1197
1251
  setEnqueueCron((id, manual) => {
1198
1252
  try {
1199
1253
  const entry = readEntry(id);
@@ -1238,7 +1292,7 @@ Output: ${summary}`).catch((err) => logWarn("main", `Task result injection faile
1238
1292
  selfHealerTask: null,
1239
1293
  hailMary: ctx.hailMary,
1240
1294
  rebuildTransport: async () => {
1241
- const { rebuildTransport } = await import("./phase-transport-FEZ4SIJJ.js");
1295
+ const { rebuildTransport } = await import("./phase-transport-KXFZ5BVF.js");
1242
1296
  await rebuildTransport(ctx);
1243
1297
  },
1244
1298
  phaseHealth: ctx.phaseHealth,
@@ -1288,10 +1342,10 @@ async function phasePlatforms(ctx) {
1288
1342
  registry.register("telegram", {
1289
1343
  configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
1290
1344
  async create() {
1291
- const { TelegramAdapter } = await import("./telegram-adapter-BJJYXN7J.js");
1345
+ const { TelegramAdapter } = await import("./telegram-adapter-4KI4CJPG.js");
1292
1346
  const adapter = new TelegramAdapter(
1293
1347
  { botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
1294
- { pipeline: pipelineDeps, conversationBuffer, transport, memory, sessionManager: ctx.sessionManager }
1348
+ { pipeline: pipelineDeps, conversationBuffer, transport, memory, sessionManager: ctx.sessionManager, actionGate: ctx.actionGate }
1295
1349
  );
1296
1350
  ctx.telegramAdapter = adapter;
1297
1351
  platformAdapters.set("telegram", adapter);
@@ -1313,8 +1367,19 @@ async function phasePlatforms(ctx) {
1313
1367
  logInfo("main", "\u{1F4E1} Telegram polling started");
1314
1368
  const mainChatId = config.mainChatId;
1315
1369
  if (mainChatId && ctx.telegramAdapter) {
1316
- const { setSendDocument } = await import("./tool-registry-T7XLTI2Q.js");
1370
+ const { setSendDocument } = await import("./tool-registry-CG7GIS64.js");
1317
1371
  setSendDocument((path, caption) => ctx.telegramAdapter.sendDocument(String(mainChatId), path, caption));
1372
+ if (ctx.actionGate) {
1373
+ const api = ctx.telegramAdapter.api;
1374
+ const chatId = String(mainChatId);
1375
+ ctx.actionGate.setNotify(async (text, buttons) => {
1376
+ const opts = {};
1377
+ if (buttons.length > 0) {
1378
+ opts.reply_markup = { inline_keyboard: [buttons.map((b) => ({ text: b.text, callback_data: b.data }))] };
1379
+ }
1380
+ await api.sendMessage(chatId, text, opts);
1381
+ });
1382
+ }
1318
1383
  }
1319
1384
  } else if (result.retryingInBackground) {
1320
1385
  logWarn("main", `Telegram failed to start: ${result.error} \u2014 retrying in background`);
@@ -1327,7 +1392,7 @@ async function phasePlatforms(ctx) {
1327
1392
  registry.register("discord", {
1328
1393
  configured: Boolean(config.discord.enabled && config.discord.botToken),
1329
1394
  async create() {
1330
- const { DiscordAdapter } = await import("./discord-adapter-WA2MFRK3.js");
1395
+ const { DiscordAdapter } = await import("./discord-adapter-U3FA5OTY.js");
1331
1396
  const adapter = new DiscordAdapter(
1332
1397
  {
1333
1398
  botToken: config.discord.botToken,
@@ -1367,9 +1432,9 @@ async function phasePlatforms(ctx) {
1367
1432
  registry.register("irc", {
1368
1433
  configured: platforms.irc,
1369
1434
  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");
1435
+ const { loadIrcConfig } = await import("./irc-config-XN5VW2V4.js");
1436
+ const { IrcAdapter } = await import("./irc-adapter-HXO5D4SW.js");
1437
+ const { handleInboundMessage } = await import("./message-pipeline-4CTBJ6K2.js");
1373
1438
  const ircConfig = loadIrcConfig();
1374
1439
  if (!ircConfig) throw new Error("irc.json missing or empty");
1375
1440
  const adapter = new IrcAdapter(ircConfig, {
@@ -1391,7 +1456,7 @@ async function phasePlatforms(ctx) {
1391
1456
  const result = await registry.start("irc", { backgroundRetry: true });
1392
1457
  if (result.ok) {
1393
1458
  logInfo("main", "\u{1F4E1} IRC started");
1394
- const { setIrcSend } = await import("./tool-registry-T7XLTI2Q.js");
1459
+ const { setIrcSend } = await import("./tool-registry-CG7GIS64.js");
1395
1460
  const ircAdapter = platformAdapters.get("irc");
1396
1461
  if (ircAdapter) setIrcSend((channel, message) => {
1397
1462
  ircAdapter.sendMessage(channel, message);
@@ -1414,19 +1479,19 @@ async function phaseCapabilities(ctx) {
1414
1479
  logWarn("boot", `${phaseCapabilities.name}: skipping \u2014 transport not available`);
1415
1480
  return "skipped";
1416
1481
  }
1417
- const { createCapabilityApi } = await import("./capability-ILW3D5HS.js");
1418
- const { getEnv: getEnv2 } = await import("./env-schema-XCPAJ6IZ.js");
1482
+ const { createCapabilityApi } = await import("./capability-733TLH4W.js");
1483
+ const { getEnv: getEnv2 } = await import("./env-schema-T43X43BU.js");
1419
1484
  const disabled = new Set(getEnv2().disabledCapabilities.split(",").map((s) => s.trim()).filter(Boolean));
1420
1485
  let loaded = [];
1421
1486
  let staticCaps;
1422
1487
  try {
1423
- ({ capabilities: staticCaps } = await import("./_registry.generated-ADOYFJJ4.js"));
1488
+ ({ capabilities: staticCaps } = await import("./_registry.generated-KYX63MGY.js"));
1424
1489
  } catch (err) {
1425
1490
  logError("capabilities", `Registry import failed: ${err instanceof Error ? err.message : String(err)}. Loading individually.`);
1426
1491
  staticCaps = [];
1427
1492
  const individualCaps = [
1428
- { name: "hotskills", load: () => import("./hotskills-6ECHLXTJ.js") },
1429
- { name: "browser", load: () => import("./browser-REIXOJ6S.js") }
1493
+ { name: "hotskills", load: () => import("./hotskills-DTROJY6G.js") },
1494
+ { name: "browser", load: () => import("./browser-QMYGSP5W.js") }
1430
1495
  ];
1431
1496
  for (const { name, load } of individualCaps) {
1432
1497
  if (disabled.has(name)) continue;
@@ -1459,9 +1524,10 @@ async function phaseCapabilities(ctx) {
1459
1524
  // src/boot/phase-startup-notification.ts
1460
1525
  init_logger();
1461
1526
  async function sendBackOnline(ctx) {
1527
+ const version = ctx.commit && ctx.commit !== "?" && !ctx.version.includes(ctx.commit) ? `v${ctx.version}-${ctx.commit}` : `v${ctx.version}`;
1462
1528
  const result = await sendToMainChat(
1463
1529
  { telegram: ctx.telegramAdapter, discord: ctx.discordAdapter },
1464
- "\u{1F504} Back online."
1530
+ `\u{1F504} Back online. ${version}`
1465
1531
  );
1466
1532
  if (result.ok) logInfo("main", "Startup: Back online notification sent");
1467
1533
  return result.ok;
@@ -1534,7 +1600,7 @@ async function phaseStartupNotification(ctx) {
1534
1600
  // src/boot/phase-heartbeat.ts
1535
1601
  init_env_schema();
1536
1602
  init_log_and_swallow();
1537
- import { join as join6 } from "node:path";
1603
+ import { join as join7 } from "node:path";
1538
1604
 
1539
1605
  // src/components/heartbeat-system.ts
1540
1606
  init_logger();
@@ -1701,7 +1767,7 @@ init_logger();
1701
1767
  init_logger();
1702
1768
  init_paths();
1703
1769
  import { readFileSync as readFileSync3, appendFileSync, mkdirSync as mkdirSync3 } from "node:fs";
1704
- import { join as join5 } from "node:path";
1770
+ import { join as join6 } from "node:path";
1705
1771
  var BLACKLIST = [
1706
1772
  "-32603",
1707
1773
  "Transient error",
@@ -1721,7 +1787,7 @@ var BLACKLIST = [
1721
1787
  ];
1722
1788
  function loadAutoFixRules() {
1723
1789
  try {
1724
- const p = join5(abtarsHome(), "config", "auto-fix.json");
1790
+ const p = join6(abtarsHome(), "config", "auto-fix.json");
1725
1791
  const rules = JSON.parse(readFileSync3(p, "utf-8"));
1726
1792
  return rules.filter((r) => r.enabled && r.pattern && r.instruction);
1727
1793
  } catch {
@@ -1735,14 +1801,14 @@ var CIRCUIT_BREAKER_RESET_MS = 24 * 60 * 60 * 1e3;
1735
1801
  var notificationsToday = 0;
1736
1802
  var notificationDayStart = 0;
1737
1803
  function logAutoFix(message) {
1738
- const dir = join5(abtarsHome(), "logs");
1804
+ const dir = join6(abtarsHome(), "logs");
1739
1805
  try {
1740
1806
  mkdirSync3(dir, { recursive: true });
1741
1807
  } catch (err) {
1742
1808
  logAndSwallow("self_healer", "op", err);
1743
1809
  }
1744
1810
  const date = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
1745
- appendFileSync(join5(dir, `autofix-${date}.log`), `${localISO()} ${message}
1811
+ appendFileSync(join6(dir, `autofix-${date}.log`), `${localISO()} ${message}
1746
1812
  `);
1747
1813
  }
1748
1814
  function createSelfHealerTask(getTelegramAdapter, allowedUserIds) {
@@ -1819,7 +1885,7 @@ function createSelfHealerTask(getTelegramAdapter, allowedUserIds) {
1819
1885
  autoFixRunning = false;
1820
1886
  }, 5 * 60 * 1e3);
1821
1887
  try {
1822
- const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-4MTYUBIZ.js");
1888
+ const { SubagentRuntime: SubagentRuntime2 } = await import("./subagent-runtime-5AYOXOU2.js");
1823
1889
  const runtime = new SubagentRuntime2();
1824
1890
  const result = await runtime.complete("coding", rule.instruction);
1825
1891
  await runtime.shutdown();
@@ -1981,7 +2047,7 @@ function createAgeCheckTask(deps) {
1981
2047
  }
1982
2048
  };
1983
2049
  }
1984
- function createDbIntegrityTask(memory, sendSystemMessage) {
2050
+ function createDbIntegrityTask(memory) {
1985
2051
  let lastCheckAt = 0;
1986
2052
  const INTERVAL_MS = 60 * 60 * 1e3;
1987
2053
  const MAX_FAILURES = 5;
@@ -2007,7 +2073,8 @@ function createDbIntegrityTask(memory, sendSystemMessage) {
2007
2073
  escalated = true;
2008
2074
  const msg = `\u26A0\uFE0F FTS corruption persists after ${MAX_FAILURES} rebuild attempts. Needs manual fix.`;
2009
2075
  logError("db-integrity", msg);
2010
- sendSystemMessage?.(msg);
2076
+ const { bufferSystemEvent } = await import("./system-event-buffer-OEPPNUGK.js");
2077
+ bufferSystemEvent(msg);
2011
2078
  }
2012
2079
  }
2013
2080
  } else {
@@ -2021,17 +2088,20 @@ function createUpdateCheckTask(notify) {
2021
2088
  name: "update-check",
2022
2089
  async execute() {
2023
2090
  if (process.env["UPDATES_CHECK_ENABLED"] === "false") return;
2024
- const { checkForUpdate } = await import("./update-check-O5MS6B3L.js");
2091
+ const { checkForUpdate } = await import("./update-check-AJMIBQGQ.js");
2025
2092
  const { readFileSync: readFileSync7 } = await import("node:fs");
2026
2093
  const { join: join11 } = await import("node:path");
2027
- const { abtarsHome: abtarsHome2 } = await import("./paths-ZJYIDND2.js");
2094
+ const { abtarsHome: abtarsHome2 } = await import("./paths-QQM74XYT.js");
2028
2095
  let version = "0.0.0";
2096
+ let source = "npm";
2029
2097
  try {
2030
2098
  const m = JSON.parse(readFileSync7(join11(abtarsHome2(), "manifest.json"), "utf-8"));
2031
2099
  version = m.version ?? "0.0.0";
2100
+ source = m.source ?? "npm";
2032
2101
  } catch (err) {
2033
2102
  logAndSwallow(TAG6, "read manifest.json", err);
2034
2103
  }
2104
+ if (source === "local") return;
2035
2105
  const result = checkForUpdate("abtars", version);
2036
2106
  if (result?.shouldNotify) {
2037
2107
  notify(`\u26A1 Update available: ${result.current} \u2192 ${result.latest}. Run: abtars update`);
@@ -2043,7 +2113,7 @@ function createSkillStatsFlushTask() {
2043
2113
  return {
2044
2114
  name: "skill-stats-flush",
2045
2115
  execute: async () => {
2046
- const { flush } = await import("./skill-stats-IPVKMWN3.js");
2116
+ const { flush } = await import("./skill-stats-NHNH47QW.js");
2047
2117
  flush();
2048
2118
  }
2049
2119
  };
@@ -2056,13 +2126,13 @@ function createSkillTrashPruneTask() {
2056
2126
  execute: async () => {
2057
2127
  counter++;
2058
2128
  if (counter % 72 !== 0) return;
2059
- const { existsSync: existsSync8, readdirSync: readdirSync2, rmSync, statSync: statSync3 } = await import("node:fs");
2129
+ const { existsSync: existsSync9, readdirSync: readdirSync3, rmSync, statSync: statSync3 } = await import("node:fs");
2060
2130
  const { join: join11 } = await import("node:path");
2061
- const { abtarsHome: abtarsHome2 } = await import("./paths-ZJYIDND2.js");
2131
+ const { abtarsHome: abtarsHome2 } = await import("./paths-QQM74XYT.js");
2062
2132
  const trashPath = join11(abtarsHome2(), "skills", ".trash");
2063
- if (!existsSync8(trashPath)) return;
2133
+ if (!existsSync9(trashPath)) return;
2064
2134
  const now = Date.now();
2065
- for (const entry of readdirSync2(trashPath)) {
2135
+ for (const entry of readdirSync3(trashPath)) {
2066
2136
  try {
2067
2137
  const full = join11(trashPath, entry);
2068
2138
  const stat = statSync3(full);
@@ -2077,6 +2147,54 @@ function createSkillTrashPruneTask() {
2077
2147
  }
2078
2148
  };
2079
2149
  }
2150
+ function createKanbanDeliveryTask(deps) {
2151
+ return {
2152
+ name: "kanban-delivery",
2153
+ execute: async () => {
2154
+ try {
2155
+ const { kanbanPending, kanbanSetDelivering, kanbanMarkDelivered, kanbanDeliveryFailed } = await import("./kanban-board-I52RHNHQ.js");
2156
+ const pending = kanbanPending();
2157
+ if (pending.length === 0) return;
2158
+ for (const card of pending) {
2159
+ kanbanSetDelivering(card.id);
2160
+ try {
2161
+ await deps.sendSystemMessage(
2162
+ `[SYSTEM] [TASK COMPLETE] Your task "${card.title}" is done. Announce completion briefly and tell the user to see the attached file. Do not reproduce the full content.
2163
+
2164
+ Summary for your memory: ${card.result_summary ?? "(no summary)"}`
2165
+ );
2166
+ if (card.result_path) {
2167
+ await deps.sendDocument(deps.chatId(), card.result_path, `\u{1F4C4} ${card.title}`);
2168
+ }
2169
+ kanbanMarkDelivered(card.id);
2170
+ } catch (err) {
2171
+ kanbanDeliveryFailed(card.id);
2172
+ logError(TAG6, `Kanban delivery failed for card ${card.id}: ${err}`);
2173
+ }
2174
+ }
2175
+ } catch (err) {
2176
+ logAndSwallow(TAG6, "kanban-delivery", err);
2177
+ }
2178
+ }
2179
+ };
2180
+ }
2181
+ function createKanbanCleanupTask() {
2182
+ let counter = 0;
2183
+ return {
2184
+ name: "kanban-cleanup",
2185
+ execute: async () => {
2186
+ counter++;
2187
+ if (counter % 72 !== 0) return;
2188
+ try {
2189
+ const { kanbanCleanup } = await import("./kanban-board-I52RHNHQ.js");
2190
+ const purged = kanbanCleanup(7);
2191
+ if (purged > 0) logInfo(TAG6, `Kanban: purged ${purged} delivered cards > 7d`);
2192
+ } catch (err) {
2193
+ logAndSwallow(TAG6, "kanban-cleanup", err);
2194
+ }
2195
+ }
2196
+ };
2197
+ }
2080
2198
 
2081
2199
  // src/boot/phase-heartbeat.ts
2082
2200
  init_logger();
@@ -2134,7 +2252,7 @@ function createModelHealthTask(ctx) {
2134
2252
  const execute = async () => {
2135
2253
  if (done) return;
2136
2254
  done = true;
2137
- const { loadTransport: loadTransport2, resolveAgent: resolveAgent2, consumeRepairs } = await import("./transport-config-G5NKQXPJ.js");
2255
+ const { loadTransport: loadTransport2, resolveAgent: resolveAgent2, consumeRepairs } = await import("./transport-config-JIKHB7GT.js");
2138
2256
  const tc = loadTransport2();
2139
2257
  if (!tc) return;
2140
2258
  const repairs = consumeRepairs();
@@ -2194,7 +2312,7 @@ function createModelHealthTask(ctx) {
2194
2312
  }
2195
2313
  }
2196
2314
  if (warnings.length > 0) {
2197
- const { sendNotification: sendNotification2 } = await import("./notification-U6F5ZBSG.js");
2315
+ const { sendNotification: sendNotification2 } = await import("./notification-ULESRDHB.js");
2198
2316
  sendNotification2(ctx, `\u{1F3E5} Model health check:
2199
2317
  ${warnings.join("\n")}
2200
2318
  Subagents will fall back to main model.`);
@@ -2213,7 +2331,7 @@ async function phaseHeartbeat(ctx) {
2213
2331
  return "skipped";
2214
2332
  }
2215
2333
  const cronCallback = createCronCallback(ctx);
2216
- const { init: initSkillStats } = await import("./skill-stats-IPVKMWN3.js");
2334
+ const { init: initSkillStats } = await import("./skill-stats-NHNH47QW.js");
2217
2335
  initSkillStats();
2218
2336
  updateBridgeLockField("startedAt", ctx.startedAt);
2219
2337
  const hbIntervalMs = Math.max(60, parseInt(readEnvWithDefault("HEARTBEAT_INTERVAL_SEC", "60", "heartbeat tick interval"), 10)) * 1e3;
@@ -2285,7 +2403,7 @@ async function phaseHeartbeat(ctx) {
2285
2403
  isSleepActive: ctx.isSleepActive
2286
2404
  }));
2287
2405
  }
2288
- const { initSystemMessage, sendSystemMessage } = await import("./system-message-TALP6GP2.js");
2406
+ const { initSystemMessage, sendSystemMessage } = await import("./system-message-BRU267FW.js");
2289
2407
  const masterUser = loadUsers().users.find((u) => u.role === "master");
2290
2408
  const masterUserId = masterUser?.userId ?? "master";
2291
2409
  initSystemMessage(async (prompt) => {
@@ -2293,7 +2411,7 @@ async function phaseHeartbeat(ctx) {
2293
2411
  const activeId = ctx.sessionManager.getActiveSessionId(masterUserId, "telegram");
2294
2412
  const response = await transport.sendPrompt(activeId, `[SYSTEM] ${prompt}`, void 0, masterUserId);
2295
2413
  if (response) {
2296
- const { sendNotification: sendNotification2 } = await import("./notification-U6F5ZBSG.js");
2414
+ const { sendNotification: sendNotification2 } = await import("./notification-ULESRDHB.js");
2297
2415
  sendNotification2(ctx, response);
2298
2416
  }
2299
2417
  } catch (err) {
@@ -2308,7 +2426,7 @@ async function phaseHeartbeat(ctx) {
2308
2426
  sleepMinute: SLEEP_MINUTE,
2309
2427
  sessions: ctx.sessions,
2310
2428
  isSleepActive: ctx.isSleepActive,
2311
- doctorPath: join6(abtarsHome(), "scripts", "doctor.sh"),
2429
+ doctorPath: join7(abtarsHome(), "scripts", "doctor.sh"),
2312
2430
  startSleep: () => {
2313
2431
  ctx.sleepHandle?.spawn();
2314
2432
  },
@@ -2317,11 +2435,21 @@ async function phaseHeartbeat(ctx) {
2317
2435
  },
2318
2436
  cronBusy: () => cronQueue.currentJob !== null || cronQueue.pending > 0
2319
2437
  }));
2320
- heartbeat.registerTask(createDbIntegrityTask(memory, sendSystemMessage));
2438
+ heartbeat.registerTask(createDbIntegrityTask(memory));
2321
2439
  heartbeat.registerTask(createSkillStatsFlushTask());
2322
2440
  heartbeat.registerTask(createSkillTrashPruneTask());
2441
+ const masterChatId = [...config.telegram.allowedUserIds][0] ?? 0;
2442
+ heartbeat.registerTask(createKanbanDeliveryTask({
2443
+ sendSystemMessage,
2444
+ sendDocument: async (chatId, filePath, caption) => {
2445
+ if (!ctx.telegramAdapter) return;
2446
+ await ctx.telegramAdapter.sendDocument(chatId, filePath, caption);
2447
+ },
2448
+ chatId: () => String(masterChatId)
2449
+ }));
2450
+ heartbeat.registerTask(createKanbanCleanupTask());
2323
2451
  heartbeat.registerTask(createUpdateCheckTask((msg) => {
2324
- import("./notification-U6F5ZBSG.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG7, "sendNotification update-check", err));
2452
+ import("./notification-ULESRDHB.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG7, "sendNotification update-check", err));
2325
2453
  }));
2326
2454
  if (transport.healthCheck) {
2327
2455
  heartbeat.registerTask({ name: "transport-health", execute: () => transport.healthCheck() });
@@ -2343,7 +2471,7 @@ async function phaseHeartbeat(ctx) {
2343
2471
  }
2344
2472
  ctx.selfHealerTask = selfHealerTask;
2345
2473
  pipelineDeps.selfHealerTask = selfHealerTask;
2346
- const { registerCommand } = await import("./commands-WUGPBPHI.js");
2474
+ const { registerCommand } = await import("./commands-RBWY7YXB.js");
2347
2475
  for (const [name, handler2] of capabilities.commands) {
2348
2476
  registerCommand(name, handler2);
2349
2477
  }
@@ -2355,7 +2483,7 @@ async function phaseHeartbeat(ctx) {
2355
2483
  queueMicrotask(() => {
2356
2484
  runModelHealth().catch((err) => logAndSwallow(TAG7, "runModelHealth boot", err));
2357
2485
  });
2358
- const { checkBrowseTasks } = await import("./browse-delivery-VTLEAVYA.js");
2486
+ const { checkBrowseTasks } = await import("./browse-delivery-DXGMDMXA.js");
2359
2487
  checkBrowseTasks();
2360
2488
  heartbeat.start();
2361
2489
  memory?.setHeartbeat(heartbeat);
@@ -2373,11 +2501,11 @@ async function phaseSleep(ctx) {
2373
2501
  logWarn("boot", `${phaseSleep.name}: skipping \u2014 heartbeat not available`);
2374
2502
  return "skipped";
2375
2503
  }
2376
- const { createSleepHandle } = await import("./sleep-BPWX3FCN.js");
2377
- const { killWakeInhibit } = await import("./commands-WUGPBPHI.js");
2504
+ const { createSleepHandle } = await import("./sleep-ENFZFUJJ.js");
2505
+ const { killWakeInhibit } = await import("./commands-RBWY7YXB.js");
2378
2506
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
2379
2507
  let subagent = null;
2380
- const { getEnv: getEnv2 } = await import("./env-schema-XCPAJ6IZ.js");
2508
+ const { getEnv: getEnv2 } = await import("./env-schema-T43X43BU.js");
2381
2509
  const runtime = {
2382
2510
  async complete(prompt) {
2383
2511
  if (!subagent) subagent = new SubagentRuntime();
@@ -2401,14 +2529,14 @@ async function phaseSleep(ctx) {
2401
2529
  init_log_and_swallow();
2402
2530
  init_env_schema();
2403
2531
  init_logger();
2404
- import { join as join8 } from "node:path";
2532
+ import { join as join9 } from "node:path";
2405
2533
 
2406
2534
  // src/components/dashboard/dashboard-config.ts
2407
2535
  init_logger();
2408
2536
  init_paths();
2409
- import { existsSync as existsSync5 } from "node:fs";
2537
+ import { existsSync as existsSync6 } from "node:fs";
2410
2538
  import { resolve as resolve3 } from "node:path";
2411
- import { homedir as homedir5 } from "node:os";
2539
+ import { homedir as homedir6 } from "node:os";
2412
2540
  var DASHBOARD_DEFAULTS = {
2413
2541
  webPort: 3e3,
2414
2542
  webHost: "127.0.0.1",
@@ -2471,8 +2599,8 @@ function buildStatusSnapshot(refs) {
2471
2599
  heartbeat,
2472
2600
  cron: readCronStatus(),
2473
2601
  notebooklm: refs.notebooklm ? { enabled: true } : null,
2474
- gwsAuth: existsSync5(resolve3(homedir5(), ".config", "gws-cli", "token.json.enc")),
2475
- xAuth: existsSync5(resolve3(abtarsHome(), "secret", "cookies", "x-cookies.json")),
2602
+ gwsAuth: existsSync6(resolve3(homedir6(), ".config", "gws-cli", "token.json.enc")),
2603
+ xAuth: existsSync6(resolve3(abtarsHome(), "secret", "cookies", "x-cookies.json")),
2476
2604
  agentApi: refs.agentApi ? { traffic: refs.agentApi.getTrafficLog() } : null,
2477
2605
  model: refs.model ?? { name: "unknown", provider: "unknown", fallbackChain: [] },
2478
2606
  subsystems: refs.subsystems ?? []
@@ -2610,7 +2738,8 @@ var MemorySearchController = class {
2610
2738
  const webResults = result.results.map(hitToWebResult);
2611
2739
  const stageStatuses = {};
2612
2740
  for (const [name, stage] of Object.entries(result.stages)) {
2613
- stageStatuses[name] = { status: "ok", hits: stage.hits.length, ms: stage.ms };
2741
+ const s = stage;
2742
+ stageStatuses[name] = { status: "ok", hits: s.hits.length, ms: s.ms };
2614
2743
  }
2615
2744
  const response = { results: webResults, layers: stageStatuses };
2616
2745
  return { status: 200, body: response };
@@ -2645,8 +2774,8 @@ function parseOptionalNumber(val) {
2645
2774
  init_log_and_swallow();
2646
2775
  init_paths();
2647
2776
  import * as http from "node:http";
2648
- import { readFileSync as readFileSync5, existsSync as existsSync6 } from "node:fs";
2649
- import { join as join7, dirname } from "node:path";
2777
+ import { readFileSync as readFileSync5, existsSync as existsSync7 } from "node:fs";
2778
+ import { join as join8, dirname as dirname2 } from "node:path";
2650
2779
  import { fileURLToPath } from "node:url";
2651
2780
 
2652
2781
  // node_modules/ws/wrapper.mjs
@@ -2824,8 +2953,8 @@ var DashboardServer = class {
2824
2953
  const method = req.method ?? "GET";
2825
2954
  const pathname = url.split("?")[0];
2826
2955
  if (method === "GET" && pathname === "/") {
2827
- const indexPath = join7(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
2828
- if (existsSync6(indexPath)) {
2956
+ const indexPath = join8(dirname2(fileURLToPath(import.meta.url)), "public", "index.html");
2957
+ if (existsSync7(indexPath)) {
2829
2958
  let html = readFileSync5(indexPath, "utf-8");
2830
2959
  const agentApi = this.deps.agentApiConfig;
2831
2960
  if (agentApi) {
@@ -2843,15 +2972,15 @@ var DashboardServer = class {
2843
2972
  if (method === "GET" && /^\/(js|css|assets|[\w-]+\.(js|css|jpg|png|ico))/.test(pathname ?? "")) {
2844
2973
  const safePath = (pathname ?? "").replace(/\.\./g, "");
2845
2974
  if (safePath === "/assets/logo.png") {
2846
- const customLogo = join7(abtarsHome(), "logo", "logo.png");
2847
- if (existsSync6(customLogo)) {
2975
+ const customLogo = join8(abtarsHome(), "logo", "logo.png");
2976
+ if (existsSync7(customLogo)) {
2848
2977
  res.writeHead(200, { "Content-Type": "image/png" });
2849
2978
  res.end(readFileSync5(customLogo));
2850
2979
  return;
2851
2980
  }
2852
2981
  }
2853
- const filePath = join7(dirname(fileURLToPath(import.meta.url)), "public", safePath);
2854
- if (existsSync6(filePath)) {
2982
+ const filePath = join8(dirname2(fileURLToPath(import.meta.url)), "public", safePath);
2983
+ if (existsSync7(filePath)) {
2855
2984
  const ext = safePath.split(".").pop() ?? "";
2856
2985
  const mimeTypes = { js: "text/javascript", css: "text/css", jpg: "image/jpeg", png: "image/png", ico: "image/x-icon", html: "text/html" };
2857
2986
  res.writeHead(200, { "Content-Type": (mimeTypes[ext] ?? "application/octet-stream") + (["js", "css", "html"].includes(ext) ? "; charset=utf-8" : "") });
@@ -2951,7 +3080,7 @@ var DashboardServer = class {
2951
3080
  if (method === "GET" && pathname === "/api/cron") {
2952
3081
  if (!this.deps.authGate.guard(req, res)) return;
2953
3082
  try {
2954
- const { readEntries: readEntries2 } = await import("./task-store-LC7ZMS72.js");
3083
+ const { readEntries: readEntries2 } = await import("./task-store-VCBHAB43.js");
2955
3084
  res.writeHead(200, { "Content-Type": "application/json" });
2956
3085
  res.end(JSON.stringify({ ok: true, entries: readEntries2() }));
2957
3086
  } catch (err) {
@@ -3002,7 +3131,7 @@ var DashboardServer = class {
3002
3131
  };
3003
3132
  function readLogLines(cutoffMs, levelFilter, limit) {
3004
3133
  const logFile = getLogFile();
3005
- if (!existsSync6(logFile)) return [];
3134
+ if (!existsSync7(logFile)) return [];
3006
3135
  const content = readFileSync5(logFile, "utf-8");
3007
3136
  const allLines = content.split("\n").filter((l) => l.length > 0);
3008
3137
  const cutoffIso = localISO(new Date(cutoffMs));
@@ -3061,7 +3190,7 @@ async function phaseDashboard(ctx) {
3061
3190
  const token = randomBytes2(32).toString("hex");
3062
3191
  dashConfig.webAuthToken = token;
3063
3192
  process.env["WEB_AUTH_TOKEN"] = token;
3064
- const envPath = join8(process.cwd(), "config", ".env");
3193
+ const envPath = join9(process.cwd(), "config", ".env");
3065
3194
  try {
3066
3195
  let content = "";
3067
3196
  try {
@@ -3148,8 +3277,8 @@ init_log_and_swallow();
3148
3277
  init_paths();
3149
3278
  import { createServer as createServer2 } from "http";
3150
3279
  import { createServer as createHttpsServer } from "https";
3151
- import { readFileSync as readFileSync6, existsSync as existsSync7, appendFileSync as appendFileSync2, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
3152
- import { join as join9, dirname as dirname2 } from "path";
3280
+ import { readFileSync as readFileSync6, existsSync as existsSync8, appendFileSync as appendFileSync2, mkdirSync as mkdirSync4, writeFileSync as writeFileSync4 } from "fs";
3281
+ import { join as join10, dirname as dirname3 } from "path";
3153
3282
  import { fileURLToPath as fileURLToPath2 } from "url";
3154
3283
  init_logger();
3155
3284
  init_logger();
@@ -3522,11 +3651,11 @@ var AgentApiServer = class {
3522
3651
  this.memory = deps.memory;
3523
3652
  this.runtime = deps.runtime;
3524
3653
  this.onPeerActivity = deps.onPeerActivity;
3525
- const configDir = join9(abtarsHome(), "config");
3526
- const identityCrtPath = join9(configDir, "identity.crt");
3527
- const identityKeyPath = join9(configDir, "identity.tls.key");
3654
+ const configDir = join10(abtarsHome(), "config");
3655
+ const identityCrtPath = join10(configDir, "identity.crt");
3656
+ const identityKeyPath = join10(configDir, "identity.tls.key");
3528
3657
  let hasTls = false;
3529
- if (existsSync7(identityCrtPath) && existsSync7(identityKeyPath)) {
3658
+ if (existsSync8(identityCrtPath) && existsSync8(identityKeyPath)) {
3530
3659
  try {
3531
3660
  this.server = createHttpsServer({
3532
3661
  key: readFileSync6(identityKeyPath),
@@ -3544,16 +3673,16 @@ var AgentApiServer = class {
3544
3673
  if (!hasTls) {
3545
3674
  this.server = createServer2((req, res) => this.handle(req, res));
3546
3675
  }
3547
- this.logDir = join9(abtarsHome(), "logs", "agents");
3676
+ this.logDir = join10(abtarsHome(), "logs", "agents");
3548
3677
  mkdirSync4(this.logDir, { recursive: true });
3549
3678
  this.logFile = this.newLogFile();
3550
3679
  try {
3551
- const base = dirname2(fileURLToPath2(import.meta.url));
3680
+ const base = dirname3(fileURLToPath2(import.meta.url));
3552
3681
  const name = deps.config.agentCodename;
3553
3682
  const candidates = [
3554
- join9(base, `agents/${name}.md`),
3555
- join9(base, `../../agents/${name}.md`),
3556
- join9(abtarsHome(), "agents", `${name}.md`)
3683
+ join10(base, `agents/${name}.md`),
3684
+ join10(base, `../../agents/${name}.md`),
3685
+ join10(abtarsHome(), "agents", `${name}.md`)
3557
3686
  ];
3558
3687
  this.agentRules = "";
3559
3688
  for (const p of candidates) {
@@ -3603,9 +3732,9 @@ var AgentApiServer = class {
3603
3732
  logInfo(TAG12, "A2A idle timeout \u2014 saving transcript, closing log, killing session");
3604
3733
  try {
3605
3734
  const today = localDate();
3606
- const dir = join9(this.workingDir, "memory", "working", today);
3735
+ const dir = join10(this.workingDir, "memory", "working", today);
3607
3736
  mkdirSync4(dir, { recursive: true });
3608
- const dest = join9(dir, "transcript_a2a.log");
3737
+ const dest = join10(dir, "transcript_a2a.log");
3609
3738
  const transcript = this.agentSession.getMessages?.()?.map((m) => `[${m.role}] ${m.content}`).join("\n") ?? "";
3610
3739
  writeFileSync4(dest, transcript, "utf-8");
3611
3740
  logInfo(TAG12, `A2A transcript saved to ${dest}`);
@@ -3629,7 +3758,7 @@ var AgentApiServer = class {
3629
3758
  newLogFile() {
3630
3759
  const ts = localIso().replace(/[:.]/g, "-");
3631
3760
  const name = this.config.agentCodename;
3632
- return join9(this.logDir, `${name}_${ts}.log`);
3761
+ return join10(this.logDir, `${name}_${ts}.log`);
3633
3762
  }
3634
3763
  log(role, content) {
3635
3764
  const ts = localIso();
@@ -3713,7 +3842,7 @@ var AgentApiServer = class {
3713
3842
  res.writeHead(429, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Peer hop limit reached", "loop_detected", "hop_exceeded")));
3714
3843
  return;
3715
3844
  }
3716
- const { checkRateLimit } = await import("./agent-api-rate-limit-C25WGSFF.js");
3845
+ const { checkRateLimit } = await import("./agent-api-rate-limit-R2OFAQ3N.js");
3717
3846
  const limit = checkRateLimit(caller);
3718
3847
  if (!limit.allowed) {
3719
3848
  const retryAfter = Math.ceil((limit.retryAfterMs ?? 6e4) / 1e3);
@@ -3721,7 +3850,7 @@ var AgentApiServer = class {
3721
3850
  logWarn(TAG12, `Rate limited ${caller} \u2014 retry in ${retryAfter}s`);
3722
3851
  return;
3723
3852
  }
3724
- const { setCurrentPeerHops } = await import("./peer-client-T44VI7NB.js");
3853
+ const { setCurrentPeerHops } = await import("./peer-client-D2F5QWRV.js");
3725
3854
  setCurrentPeerHops(hopValue);
3726
3855
  let body;
3727
3856
  try {
@@ -3737,7 +3866,7 @@ var AgentApiServer = class {
3737
3866
  const lastMsg = reqMessages?.[reqMessages.length - 1];
3738
3867
  if (lastMsg?.content) {
3739
3868
  const { verifyMessage } = await import("./digital-signature-PNY4TR2W.js");
3740
- const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-D5A4454H.js");
3869
+ const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-5SUIBJLG.js");
3741
3870
  const peerConfig2 = loadPeerConfig2();
3742
3871
  const peerEntry2 = peerConfig2.peers[caller];
3743
3872
  const hasSigTag = /\[sig:\d+:[A-Za-z0-9+/=]+\]$/.test(lastMsg.content);
@@ -3796,7 +3925,7 @@ var AgentApiServer = class {
3796
3925
  return;
3797
3926
  }
3798
3927
  }
3799
- const { loadPeerConfig } = await import("./peer-config-D5A4454H.js");
3928
+ const { loadPeerConfig } = await import("./peer-config-5SUIBJLG.js");
3800
3929
  const peerConfig = loadPeerConfig();
3801
3930
  const peerEntry = peerConfig.peers[caller];
3802
3931
  const policy = buildPolicy("peer", {
@@ -3903,9 +4032,9 @@ async function phaseAgentApi(ctx) {
3903
4032
  } else {
3904
4033
  logError("main", `Agent API failed to start: ${result.error}`);
3905
4034
  }
3906
- const { loadPeerConfig } = await import("./peer-config-D5A4454H.js");
3907
- const { startDnsWakeup } = await import("./dns-wakeup-RYOCQ6GR.js");
3908
- const { callPeer } = await import("./peer-client-T44VI7NB.js");
4035
+ const { loadPeerConfig } = await import("./peer-config-5SUIBJLG.js");
4036
+ const { startDnsWakeup } = await import("./dns-wakeup-N46RPU5E.js");
4037
+ const { callPeer } = await import("./peer-client-D2F5QWRV.js");
3909
4038
  const peerConfig = loadPeerConfig();
3910
4039
  const udpPort = peerConfig.self.udpPort ?? 5353;
3911
4040
  if (Object.keys(peerConfig.peers).length > 0) {
@@ -4039,16 +4168,10 @@ async function startBridge() {
4039
4168
  logError("boot", `\u2717 ${phaseConfig.name} failed \u2014 continuing with empty defaults`, err);
4040
4169
  }
4041
4170
  }
4042
- try {
4043
- const target = basename(readlinkSync(join10(homedir6(), ".abtars", "current")));
4044
- const dash = target.lastIndexOf("-");
4045
- if (dash > 0) {
4046
- ctx.version = target.slice(0, dash);
4047
- ctx.commit = target.slice(dash + 1);
4048
- }
4049
- } catch (err) {
4050
- }
4051
- initBridgeLock({ pid: process.pid, startedAt: Date.now(), version: `${ctx.version}-${ctx.commit}`, argv: process.argv.slice(2) });
4171
+ const deployed = (await import("./paths-QQM74XYT.js")).getDeployedVersion();
4172
+ ctx.version = deployed.version;
4173
+ ctx.commit = deployed.commit;
4174
+ initBridgeLock({ pid: process.pid, startedAt: Date.now(), version: `${ctx.version}${ctx.commit ? "-" + ctx.commit : ""}`, argv: process.argv.slice(2) });
4052
4175
  const bridge = new Bridge(ctx);
4053
4176
  ctx.isSleepActive = () => ctx.sleepHandle?.isActive === true;
4054
4177
  ctx.requestShutdownWithCode = (code) => bridge.requestShutdown(code);
@@ -4074,7 +4197,7 @@ async function startBridge() {
4074
4197
  logError("boot", `\u2717 ${phase.name} failed \u2014 continuing without it`, err);
4075
4198
  }
4076
4199
  }
4077
- const { hasHooks, fire } = await import("./hook-system-POI5VRIX.js");
4200
+ const { hasHooks, fire } = await import("./hook-system-ZCVOFFRD.js");
4078
4201
  if (hasHooks("BridgeStart")) {
4079
4202
  await fire("BridgeStart", { event: "BridgeStart", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: "", platform: "", userId: "" });
4080
4203
  }