abtars 0.2.1-alpha.9 → 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 (249) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/README.md +93 -34
  3. package/bundle/{_registry.generated-ADOYFJJ4.js → _registry.generated-FNJOX7VV.js} +19 -16
  4. package/bundle/{_registry.generated-ADOYFJJ4.js.map → _registry.generated-FNJOX7VV.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 +150 -176
  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 +224 -157
  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-S2MNHQYQ.js} +8 -8
  22. package/bundle/{bridge-lock-transport-HO545SBK.js → bridge-lock-transport-N6OGDOSE.js} +5 -5
  23. package/bundle/{browse-delivery-VTLEAVYA.js → browse-delivery-DXGMDMXA.js} +8 -7
  24. package/bundle/{browser-REIXOJ6S.js → browser-QMYGSP5W.js} +11 -10
  25. package/bundle/{capability-ILW3D5HS.js → capability-733TLH4W.js} +6 -6
  26. package/bundle/{chunk-ZVDVNSXK.js → chunk-2SWKJX64.js} +7 -7
  27. package/bundle/{chunk-PZE3J7ER.js → chunk-3OXQWII3.js} +2 -2
  28. package/bundle/{chunk-R36WIOYX.js → chunk-3X6VGRL6.js} +33 -6
  29. package/bundle/chunk-3X6VGRL6.js.map +7 -0
  30. package/bundle/{chunk-4KJ76TTE.js → chunk-4XW7YA3K.js} +3 -3
  31. package/bundle/{chunk-Q62SXS73.js → chunk-BBDKU4EH.js} +9 -9
  32. package/bundle/{chunk-EX2SRTUE.js → chunk-CYSGXNBY.js} +2 -2
  33. package/bundle/{chunk-LYEAHE5V.js → chunk-DCY7DGMT.js} +2 -2
  34. package/bundle/chunk-DGS7J4P6.js +13 -0
  35. package/bundle/chunk-DGS7J4P6.js.map +7 -0
  36. package/bundle/{chunk-LDKSCXGL.js → chunk-DHPFI7OF.js} +8 -6
  37. package/bundle/{chunk-LDKSCXGL.js.map → chunk-DHPFI7OF.js.map} +1 -1
  38. package/bundle/{chunk-G6IXMYIO.js → chunk-DO4INSXE.js} +2 -2
  39. package/bundle/{chunk-VA5WKN3Z.js → chunk-EGA6JQVV.js} +4 -4
  40. package/bundle/chunk-EKHNWFEQ.js +85 -0
  41. package/bundle/chunk-EKHNWFEQ.js.map +7 -0
  42. package/bundle/{chunk-URAQLQ2U.js → chunk-F3HMZFIL.js} +4 -4
  43. package/bundle/{chunk-OOKLEC6V.js → chunk-FY3QUO2L.js} +7 -7
  44. package/bundle/{chunk-2BY6I4P5.js → chunk-GUTRAMK3.js} +2 -2
  45. package/bundle/{chunk-GPL57SRN.js → chunk-H7RX7UCR.js} +3 -3
  46. package/bundle/{chunk-BYDUMHXT.js → chunk-HAF2AFBW.js} +2 -2
  47. package/bundle/{chunk-A5OJYQNU.js → chunk-HCYENZAB.js} +49 -22
  48. package/bundle/chunk-HCYENZAB.js.map +7 -0
  49. package/bundle/{chunk-OZ4IZFV4.js → chunk-HJQZP5CK.js} +9 -9
  50. package/bundle/{chunk-OZ4IZFV4.js.map → chunk-HJQZP5CK.js.map} +2 -2
  51. package/bundle/{chunk-HEHD3GG5.js → chunk-ITB2K6LI.js} +6 -13
  52. package/bundle/{chunk-HEHD3GG5.js.map → chunk-ITB2K6LI.js.map} +3 -3
  53. package/bundle/{chunk-KSEIWT4T.js → chunk-JFKOPNKL.js} +10 -10
  54. package/bundle/chunk-JFKOPNKL.js.map +7 -0
  55. package/bundle/{chunk-4BUOO6WI.js → chunk-KL5QRHHK.js} +31 -11
  56. package/bundle/chunk-KL5QRHHK.js.map +7 -0
  57. package/bundle/{chunk-KFENC7BM.js → chunk-L33WNMCP.js} +2 -2
  58. package/bundle/{chunk-JRG4EFMP.js → chunk-LBMETTUP.js} +3 -3
  59. package/bundle/{chunk-TYVI3ZWA.js → chunk-LJAG2URA.js} +10 -7
  60. package/bundle/chunk-LJAG2URA.js.map +7 -0
  61. package/bundle/{chunk-RV54J75Q.js → chunk-MHK4UPM6.js} +13 -12
  62. package/bundle/chunk-MHK4UPM6.js.map +7 -0
  63. package/bundle/chunk-NIYVCGBC.js +330 -0
  64. package/bundle/chunk-NIYVCGBC.js.map +7 -0
  65. package/bundle/{chunk-P2BZSLJJ.js → chunk-OGZXYN6E.js} +392 -125
  66. package/bundle/chunk-OGZXYN6E.js.map +7 -0
  67. package/bundle/{chunk-TOUZC6NR.js → chunk-OKMN6J4Z.js} +3 -3
  68. package/bundle/{chunk-CELR236Q.js → chunk-Q7CH5DA3.js} +2 -2
  69. package/bundle/{chunk-XZSYMCLF.js → chunk-QIAFGDRL.js} +7 -7
  70. package/bundle/chunk-RITEGAW6.js +138 -0
  71. package/bundle/chunk-RITEGAW6.js.map +7 -0
  72. package/bundle/{chunk-UDZIZB5F.js → chunk-RTL7HO3N.js} +3 -3
  73. package/bundle/{chunk-ITG6XGBS.js → chunk-SA44ITVX.js} +10 -10
  74. package/bundle/{chunk-3MO2MDXJ.js → chunk-SA6YEFNG.js} +3 -3
  75. package/bundle/{chunk-GBBTK6H2.js → chunk-SRFEIZQT.js} +4 -4
  76. package/bundle/{chunk-ELRAH7VL.js → chunk-VXUVKC66.js} +3 -3
  77. package/bundle/{chunk-X5FBUA53.js → chunk-WLAVZSVZ.js} +69 -30
  78. package/bundle/chunk-WLAVZSVZ.js.map +7 -0
  79. package/bundle/{chunk-RSWUPUNA.js → chunk-WMWI3SJ7.js} +30 -6
  80. package/bundle/chunk-WMWI3SJ7.js.map +7 -0
  81. package/bundle/{chunk-MJ6PHMOK.js → chunk-WW5F2DCO.js} +11 -2
  82. package/bundle/chunk-WW5F2DCO.js.map +7 -0
  83. package/bundle/chunk-YWZPKBO6.js +22 -0
  84. package/bundle/chunk-YWZPKBO6.js.map +7 -0
  85. package/bundle/{chunk-KWBGYWDO.js → chunk-Z4SWEFIY.js} +12 -14
  86. package/bundle/chunk-Z4SWEFIY.js.map +7 -0
  87. package/bundle/chunk-ZAA7B5BN.js +22 -0
  88. package/bundle/chunk-ZAA7B5BN.js.map +7 -0
  89. package/bundle/{commands-WUGPBPHI.js → commands-AXW7L2MZ.js} +15 -14
  90. package/bundle/{config-DQIGDX4W.js → config-NDEYF4AQ.js} +7 -7
  91. package/bundle/{daemon-NPKYZ3CJ.js → daemon-WOQXCKNL.js} +4 -4
  92. package/bundle/{delegation-tools-6FICZQ5G.js → delegation-tools-Z5OM3TXS.js} +5 -5
  93. package/bundle/{deploy-lib-import-SBKXDD3F.js → deploy-lib-import-6VJTYXEG.js} +2 -2
  94. package/bundle/{deps-HN6CEXA4.js → deps-65V7XXG4.js} +4 -4
  95. package/bundle/{direct-api-transport-TRV45NO6.js → direct-api-transport-LSAUIP5S.js} +27 -15
  96. package/bundle/direct-api-transport-LSAUIP5S.js.map +7 -0
  97. package/bundle/{discord-adapter-WA2MFRK3.js → discord-adapter-LNWTIOUK.js} +27 -24
  98. package/bundle/discord-adapter-LNWTIOUK.js.map +7 -0
  99. package/bundle/{dns-wakeup-RYOCQ6GR.js → dns-wakeup-N46RPU5E.js} +3 -3
  100. package/bundle/{doctor-R54GZPKL.js → doctor-PIPSGI3H.js} +18 -7
  101. package/bundle/{doctor-R54GZPKL.js.map → doctor-PIPSGI3H.js.map} +2 -2
  102. package/bundle/{ensure-invariants-BJIEOSJ2.js → ensure-invariants-3NOBCYWS.js} +4 -4
  103. package/bundle/{env-schema-XCPAJ6IZ.js → env-schema-T43X43BU.js} +4 -4
  104. package/bundle/{hook-system-POI5VRIX.js → hook-system-ZCVOFFRD.js} +4 -4
  105. package/bundle/hotskills-DTROJY6G.js +17 -0
  106. package/bundle/{install-SH4UVUXQ.js → install-FZT43PTH.js} +3 -3
  107. package/bundle/{install-manifest-QRWID3KZ.js → install-manifest-KBYD7SAY.js} +3 -3
  108. package/bundle/{irc-adapter-AIEP6OX6.js → irc-adapter-HXO5D4SW.js} +3 -3
  109. package/bundle/{irc-config-6VY67UPQ.js → irc-config-XN5VW2V4.js} +5 -5
  110. package/bundle/{lazy-require-UFYFFX2R.js → lazy-require-R3JYCV5M.js} +4 -4
  111. package/bundle/{media-utils-MOE36VWY.js → media-utils-W7XW3SVV.js} +4 -4
  112. package/bundle/{message-pipeline-2MBT44FO.js → message-pipeline-QX272U5X.js} +17 -14
  113. package/bundle/meta.json +2946 -2305
  114. package/bundle/{notification-U6F5ZBSG.js → notification-ULESRDHB.js} +7 -6
  115. package/bundle/{openrouter-credits-7XXO6QGQ.js → openrouter-credits-PLIKRY5D.js} +4 -4
  116. package/bundle/{paths-ZJYIDND2.js → paths-QQM74XYT.js} +4 -2
  117. package/bundle/{peer-client-T44VI7NB.js → peer-client-D2F5QWRV.js} +8 -8
  118. package/bundle/{peer-config-D5A4454H.js → peer-config-5SUIBJLG.js} +5 -5
  119. package/bundle/{phase-transport-FEZ4SIJJ.js → phase-transport-BSGROTHY.js} +10 -10
  120. package/bundle/{restore-MFSW3EBL.js → restore-Z6MF54HS.js} +4 -4
  121. package/bundle/{restore-MFSW3EBL.js.map → restore-Z6MF54HS.js.map} +2 -2
  122. package/bundle/{update-check-O5MS6B3L.js → rollback-5RXXLUD6.js} +5 -7
  123. package/bundle/{self-healer-utils-7NFH22VJ.js → self-healer-utils-WPKOVXJD.js} +4 -4
  124. package/bundle/{skill-stats-IPVKMWN3.js → skill-stats-NHNH47QW.js} +5 -5
  125. package/bundle/{sleep-BPWX3FCN.js → sleep-K7EXAFGW.js} +8 -8
  126. package/bundle/{soul-bundle-BRIUDEQ2.js → soul-bundle-QTPWDJB2.js} +7 -7
  127. package/bundle/{soul-loader-GBXJ7EBH.js → soul-loader-LCPTN4PK.js} +8 -8
  128. package/bundle/{sse-parser-anthropic-H42TTLBD.js → sse-parser-anthropic-PYDJM3UC.js} +4 -4
  129. package/bundle/{sse-parser-responses-WG2LY2ML.js → sse-parser-responses-FYT7A5WT.js} +4 -4
  130. package/bundle/{ssrf-guard-E2KBBC5E.js → ssrf-guard-R4P5OCTO.js} +4 -4
  131. package/bundle/{start-CBVKNEAT.js → start-4DNURGIY.js} +1 -1
  132. package/bundle/{stt-CF3CPFDC.js → stt-YN77NND6.js} +5 -5
  133. package/bundle/{subagent-runtime-4MTYUBIZ.js → subagent-runtime-FQAT3564.js} +5 -5
  134. package/bundle/system-event-buffer-OEPPNUGK.js +17 -0
  135. package/bundle/system-event-buffer-OEPPNUGK.js.map +7 -0
  136. package/bundle/{system-message-TALP6GP2.js → system-message-BRU267FW.js} +3 -3
  137. package/bundle/{system-status-GLYXXDE3.js → system-status-7K2QTH3J.js} +58 -51
  138. package/bundle/system-status-7K2QTH3J.js.map +7 -0
  139. package/bundle/{hotskills-6ECHLXTJ.js → task-failure-buffer-DPM5MWZ5.js} +8 -7
  140. package/bundle/{task-store-LC7ZMS72.js → task-store-VCBHAB43.js} +5 -5
  141. package/bundle/{telegram-adapter-BJJYXN7J.js → telegram-adapter-LXLSG4SK.js} +51 -33
  142. package/bundle/telegram-adapter-LXLSG4SK.js.map +7 -0
  143. package/bundle/{tool-registry-T7XLTI2Q.js → tool-registry-5PXNSYOI.js} +12 -9
  144. package/bundle/{tool-sandbox-OZMXJZLQ.js → tool-sandbox-TLAL55QP.js} +5 -5
  145. package/bundle/{transport-config-G5NKQXPJ.js → transport-config-JIKHB7GT.js} +8 -8
  146. package/bundle/update-check-AJMIBQGQ.js +81 -0
  147. package/bundle/update-check-AJMIBQGQ.js.map +7 -0
  148. package/bundle/{user-registry-NUVNEHJU.js → user-registry-PEFDZ5AV.js} +5 -5
  149. package/bundle/user-registry-PEFDZ5AV.js.map +7 -0
  150. package/core/skills/tools/gmail/SKILL.md +5 -14
  151. package/core/skills/tools/rss/SKILL.md +51 -0
  152. package/install-manifest.json +4 -2
  153. package/package.json +3 -2
  154. package/scripts/build-and-deploy.sh +28 -0
  155. package/scripts/doctor.sh +38 -0
  156. package/scripts/emergency-deploy.sh +95 -0
  157. package/scripts/watchdog.sh +51 -5
  158. package/bundle/chunk-4BUOO6WI.js.map +0 -7
  159. package/bundle/chunk-A5OJYQNU.js.map +0 -7
  160. package/bundle/chunk-JX3ZZU3O.js +0 -82
  161. package/bundle/chunk-JX3ZZU3O.js.map +0 -7
  162. package/bundle/chunk-KJOCXWJ5.js +0 -131
  163. package/bundle/chunk-KJOCXWJ5.js.map +0 -7
  164. package/bundle/chunk-KSEIWT4T.js.map +0 -7
  165. package/bundle/chunk-KWBGYWDO.js.map +0 -7
  166. package/bundle/chunk-MJ6PHMOK.js.map +0 -7
  167. package/bundle/chunk-P2BZSLJJ.js.map +0 -7
  168. package/bundle/chunk-R36WIOYX.js.map +0 -7
  169. package/bundle/chunk-RE3F3CFW.js +0 -300
  170. package/bundle/chunk-RE3F3CFW.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-TYVI3ZWA.js.map +0 -7
  174. package/bundle/chunk-X5FBUA53.js.map +0 -7
  175. package/bundle/direct-api-transport-TRV45NO6.js.map +0 -7
  176. package/bundle/discord-adapter-WA2MFRK3.js.map +0 -7
  177. package/bundle/system-status-GLYXXDE3.js.map +0 -7
  178. package/bundle/telegram-adapter-BJJYXN7J.js.map +0 -7
  179. /package/bundle/{agent-api-rate-limit-C25WGSFF.js.map → agent-api-rate-limit-R2OFAQ3N.js.map} +0 -0
  180. /package/bundle/{agent-registry-SYUFNSVB.js.map → agent-registry-S2MNHQYQ.js.map} +0 -0
  181. /package/bundle/{bridge-lock-transport-HO545SBK.js.map → bridge-lock-transport-N6OGDOSE.js.map} +0 -0
  182. /package/bundle/{browse-delivery-VTLEAVYA.js.map → browse-delivery-DXGMDMXA.js.map} +0 -0
  183. /package/bundle/{browser-REIXOJ6S.js.map → browser-QMYGSP5W.js.map} +0 -0
  184. /package/bundle/{capability-ILW3D5HS.js.map → capability-733TLH4W.js.map} +0 -0
  185. /package/bundle/{chunk-ZVDVNSXK.js.map → chunk-2SWKJX64.js.map} +0 -0
  186. /package/bundle/{chunk-PZE3J7ER.js.map → chunk-3OXQWII3.js.map} +0 -0
  187. /package/bundle/{chunk-4KJ76TTE.js.map → chunk-4XW7YA3K.js.map} +0 -0
  188. /package/bundle/{chunk-Q62SXS73.js.map → chunk-BBDKU4EH.js.map} +0 -0
  189. /package/bundle/{chunk-EX2SRTUE.js.map → chunk-CYSGXNBY.js.map} +0 -0
  190. /package/bundle/{chunk-LYEAHE5V.js.map → chunk-DCY7DGMT.js.map} +0 -0
  191. /package/bundle/{chunk-G6IXMYIO.js.map → chunk-DO4INSXE.js.map} +0 -0
  192. /package/bundle/{chunk-VA5WKN3Z.js.map → chunk-EGA6JQVV.js.map} +0 -0
  193. /package/bundle/{chunk-URAQLQ2U.js.map → chunk-F3HMZFIL.js.map} +0 -0
  194. /package/bundle/{chunk-OOKLEC6V.js.map → chunk-FY3QUO2L.js.map} +0 -0
  195. /package/bundle/{chunk-2BY6I4P5.js.map → chunk-GUTRAMK3.js.map} +0 -0
  196. /package/bundle/{chunk-GPL57SRN.js.map → chunk-H7RX7UCR.js.map} +0 -0
  197. /package/bundle/{chunk-BYDUMHXT.js.map → chunk-HAF2AFBW.js.map} +0 -0
  198. /package/bundle/{chunk-KFENC7BM.js.map → chunk-L33WNMCP.js.map} +0 -0
  199. /package/bundle/{chunk-JRG4EFMP.js.map → chunk-LBMETTUP.js.map} +0 -0
  200. /package/bundle/{chunk-TOUZC6NR.js.map → chunk-OKMN6J4Z.js.map} +0 -0
  201. /package/bundle/{chunk-CELR236Q.js.map → chunk-Q7CH5DA3.js.map} +0 -0
  202. /package/bundle/{chunk-XZSYMCLF.js.map → chunk-QIAFGDRL.js.map} +0 -0
  203. /package/bundle/{chunk-UDZIZB5F.js.map → chunk-RTL7HO3N.js.map} +0 -0
  204. /package/bundle/{chunk-ITG6XGBS.js.map → chunk-SA44ITVX.js.map} +0 -0
  205. /package/bundle/{chunk-3MO2MDXJ.js.map → chunk-SA6YEFNG.js.map} +0 -0
  206. /package/bundle/{chunk-GBBTK6H2.js.map → chunk-SRFEIZQT.js.map} +0 -0
  207. /package/bundle/{chunk-ELRAH7VL.js.map → chunk-VXUVKC66.js.map} +0 -0
  208. /package/bundle/{commands-WUGPBPHI.js.map → commands-AXW7L2MZ.js.map} +0 -0
  209. /package/bundle/{config-DQIGDX4W.js.map → config-NDEYF4AQ.js.map} +0 -0
  210. /package/bundle/{daemon-NPKYZ3CJ.js.map → daemon-WOQXCKNL.js.map} +0 -0
  211. /package/bundle/{delegation-tools-6FICZQ5G.js.map → delegation-tools-Z5OM3TXS.js.map} +0 -0
  212. /package/bundle/{deploy-lib-import-SBKXDD3F.js.map → deploy-lib-import-6VJTYXEG.js.map} +0 -0
  213. /package/bundle/{deps-HN6CEXA4.js.map → deps-65V7XXG4.js.map} +0 -0
  214. /package/bundle/{dns-wakeup-RYOCQ6GR.js.map → dns-wakeup-N46RPU5E.js.map} +0 -0
  215. /package/bundle/{ensure-invariants-BJIEOSJ2.js.map → ensure-invariants-3NOBCYWS.js.map} +0 -0
  216. /package/bundle/{env-schema-XCPAJ6IZ.js.map → env-schema-T43X43BU.js.map} +0 -0
  217. /package/bundle/{hook-system-POI5VRIX.js.map → hook-system-ZCVOFFRD.js.map} +0 -0
  218. /package/bundle/{hotskills-6ECHLXTJ.js.map → hotskills-DTROJY6G.js.map} +0 -0
  219. /package/bundle/{install-SH4UVUXQ.js.map → install-FZT43PTH.js.map} +0 -0
  220. /package/bundle/{install-manifest-QRWID3KZ.js.map → install-manifest-KBYD7SAY.js.map} +0 -0
  221. /package/bundle/{irc-adapter-AIEP6OX6.js.map → irc-adapter-HXO5D4SW.js.map} +0 -0
  222. /package/bundle/{irc-config-6VY67UPQ.js.map → irc-config-XN5VW2V4.js.map} +0 -0
  223. /package/bundle/{lazy-require-UFYFFX2R.js.map → lazy-require-R3JYCV5M.js.map} +0 -0
  224. /package/bundle/{media-utils-MOE36VWY.js.map → media-utils-W7XW3SVV.js.map} +0 -0
  225. /package/bundle/{message-pipeline-2MBT44FO.js.map → message-pipeline-QX272U5X.js.map} +0 -0
  226. /package/bundle/{notification-U6F5ZBSG.js.map → notification-ULESRDHB.js.map} +0 -0
  227. /package/bundle/{openrouter-credits-7XXO6QGQ.js.map → openrouter-credits-PLIKRY5D.js.map} +0 -0
  228. /package/bundle/{paths-ZJYIDND2.js.map → paths-QQM74XYT.js.map} +0 -0
  229. /package/bundle/{peer-client-T44VI7NB.js.map → peer-client-D2F5QWRV.js.map} +0 -0
  230. /package/bundle/{peer-config-D5A4454H.js.map → peer-config-5SUIBJLG.js.map} +0 -0
  231. /package/bundle/{phase-transport-FEZ4SIJJ.js.map → phase-transport-BSGROTHY.js.map} +0 -0
  232. /package/bundle/{skill-stats-IPVKMWN3.js.map → rollback-5RXXLUD6.js.map} +0 -0
  233. /package/bundle/{self-healer-utils-7NFH22VJ.js.map → self-healer-utils-WPKOVXJD.js.map} +0 -0
  234. /package/bundle/{sleep-BPWX3FCN.js.map → skill-stats-NHNH47QW.js.map} +0 -0
  235. /package/bundle/{soul-bundle-BRIUDEQ2.js.map → sleep-K7EXAFGW.js.map} +0 -0
  236. /package/bundle/{soul-loader-GBXJ7EBH.js.map → soul-bundle-QTPWDJB2.js.map} +0 -0
  237. /package/bundle/{stt-CF3CPFDC.js.map → soul-loader-LCPTN4PK.js.map} +0 -0
  238. /package/bundle/{sse-parser-anthropic-H42TTLBD.js.map → sse-parser-anthropic-PYDJM3UC.js.map} +0 -0
  239. /package/bundle/{sse-parser-responses-WG2LY2ML.js.map → sse-parser-responses-FYT7A5WT.js.map} +0 -0
  240. /package/bundle/{ssrf-guard-E2KBBC5E.js.map → ssrf-guard-R4P5OCTO.js.map} +0 -0
  241. /package/bundle/{start-CBVKNEAT.js.map → start-4DNURGIY.js.map} +0 -0
  242. /package/bundle/{subagent-runtime-4MTYUBIZ.js.map → stt-YN77NND6.js.map} +0 -0
  243. /package/bundle/{task-store-LC7ZMS72.js.map → subagent-runtime-FQAT3564.js.map} +0 -0
  244. /package/bundle/{system-message-TALP6GP2.js.map → system-message-BRU267FW.js.map} +0 -0
  245. /package/bundle/{tool-registry-T7XLTI2Q.js.map → task-failure-buffer-DPM5MWZ5.js.map} +0 -0
  246. /package/bundle/{tool-sandbox-OZMXJZLQ.js.map → task-store-VCBHAB43.js.map} +0 -0
  247. /package/bundle/{transport-config-G5NKQXPJ.js.map → tool-registry-5PXNSYOI.js.map} +0 -0
  248. /package/bundle/{update-check-O5MS6B3L.js.map → tool-sandbox-TLAL55QP.js.map} +0 -0
  249. /package/bundle/{user-registry-NUVNEHJU.js.map → transport-config-JIKHB7GT.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();
@@ -1981,7 +2052,7 @@ function createAgeCheckTask(deps) {
1981
2052
  }
1982
2053
  };
1983
2054
  }
1984
- function createDbIntegrityTask(memory, sendSystemMessage) {
2055
+ function createDbIntegrityTask(memory) {
1985
2056
  let lastCheckAt = 0;
1986
2057
  const INTERVAL_MS = 60 * 60 * 1e3;
1987
2058
  const MAX_FAILURES = 5;
@@ -2007,7 +2078,8 @@ function createDbIntegrityTask(memory, sendSystemMessage) {
2007
2078
  escalated = true;
2008
2079
  const msg = `\u26A0\uFE0F FTS corruption persists after ${MAX_FAILURES} rebuild attempts. Needs manual fix.`;
2009
2080
  logError("db-integrity", msg);
2010
- sendSystemMessage?.(msg);
2081
+ const { bufferSystemEvent } = await import("./system-event-buffer-OEPPNUGK.js");
2082
+ bufferSystemEvent(msg);
2011
2083
  }
2012
2084
  }
2013
2085
  } else {
@@ -2021,10 +2093,10 @@ function createUpdateCheckTask(notify) {
2021
2093
  name: "update-check",
2022
2094
  async execute() {
2023
2095
  if (process.env["UPDATES_CHECK_ENABLED"] === "false") return;
2024
- const { checkForUpdate } = await import("./update-check-O5MS6B3L.js");
2096
+ const { checkForUpdate } = await import("./update-check-AJMIBQGQ.js");
2025
2097
  const { readFileSync: readFileSync7 } = await import("node:fs");
2026
2098
  const { join: join11 } = await import("node:path");
2027
- const { abtarsHome: abtarsHome2 } = await import("./paths-ZJYIDND2.js");
2099
+ const { abtarsHome: abtarsHome2 } = await import("./paths-QQM74XYT.js");
2028
2100
  let version = "0.0.0";
2029
2101
  try {
2030
2102
  const m = JSON.parse(readFileSync7(join11(abtarsHome2(), "manifest.json"), "utf-8"));
@@ -2043,7 +2115,7 @@ function createSkillStatsFlushTask() {
2043
2115
  return {
2044
2116
  name: "skill-stats-flush",
2045
2117
  execute: async () => {
2046
- const { flush } = await import("./skill-stats-IPVKMWN3.js");
2118
+ const { flush } = await import("./skill-stats-NHNH47QW.js");
2047
2119
  flush();
2048
2120
  }
2049
2121
  };
@@ -2056,13 +2128,13 @@ function createSkillTrashPruneTask() {
2056
2128
  execute: async () => {
2057
2129
  counter++;
2058
2130
  if (counter % 72 !== 0) return;
2059
- 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");
2060
2132
  const { join: join11 } = await import("node:path");
2061
- const { abtarsHome: abtarsHome2 } = await import("./paths-ZJYIDND2.js");
2133
+ const { abtarsHome: abtarsHome2 } = await import("./paths-QQM74XYT.js");
2062
2134
  const trashPath = join11(abtarsHome2(), "skills", ".trash");
2063
- if (!existsSync8(trashPath)) return;
2135
+ if (!existsSync9(trashPath)) return;
2064
2136
  const now = Date.now();
2065
- for (const entry of readdirSync2(trashPath)) {
2137
+ for (const entry of readdirSync3(trashPath)) {
2066
2138
  try {
2067
2139
  const full = join11(trashPath, entry);
2068
2140
  const stat = statSync3(full);
@@ -2134,7 +2206,7 @@ function createModelHealthTask(ctx) {
2134
2206
  const execute = async () => {
2135
2207
  if (done) return;
2136
2208
  done = true;
2137
- 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");
2138
2210
  const tc = loadTransport2();
2139
2211
  if (!tc) return;
2140
2212
  const repairs = consumeRepairs();
@@ -2194,7 +2266,7 @@ function createModelHealthTask(ctx) {
2194
2266
  }
2195
2267
  }
2196
2268
  if (warnings.length > 0) {
2197
- const { sendNotification: sendNotification2 } = await import("./notification-U6F5ZBSG.js");
2269
+ const { sendNotification: sendNotification2 } = await import("./notification-ULESRDHB.js");
2198
2270
  sendNotification2(ctx, `\u{1F3E5} Model health check:
2199
2271
  ${warnings.join("\n")}
2200
2272
  Subagents will fall back to main model.`);
@@ -2213,7 +2285,7 @@ async function phaseHeartbeat(ctx) {
2213
2285
  return "skipped";
2214
2286
  }
2215
2287
  const cronCallback = createCronCallback(ctx);
2216
- const { init: initSkillStats } = await import("./skill-stats-IPVKMWN3.js");
2288
+ const { init: initSkillStats } = await import("./skill-stats-NHNH47QW.js");
2217
2289
  initSkillStats();
2218
2290
  updateBridgeLockField("startedAt", ctx.startedAt);
2219
2291
  const hbIntervalMs = Math.max(60, parseInt(readEnvWithDefault("HEARTBEAT_INTERVAL_SEC", "60", "heartbeat tick interval"), 10)) * 1e3;
@@ -2285,7 +2357,7 @@ async function phaseHeartbeat(ctx) {
2285
2357
  isSleepActive: ctx.isSleepActive
2286
2358
  }));
2287
2359
  }
2288
- const { initSystemMessage, sendSystemMessage } = await import("./system-message-TALP6GP2.js");
2360
+ const { initSystemMessage, sendSystemMessage } = await import("./system-message-BRU267FW.js");
2289
2361
  const masterUser = loadUsers().users.find((u) => u.role === "master");
2290
2362
  const masterUserId = masterUser?.userId ?? "master";
2291
2363
  initSystemMessage(async (prompt) => {
@@ -2293,7 +2365,7 @@ async function phaseHeartbeat(ctx) {
2293
2365
  const activeId = ctx.sessionManager.getActiveSessionId(masterUserId, "telegram");
2294
2366
  const response = await transport.sendPrompt(activeId, `[SYSTEM] ${prompt}`, void 0, masterUserId);
2295
2367
  if (response) {
2296
- const { sendNotification: sendNotification2 } = await import("./notification-U6F5ZBSG.js");
2368
+ const { sendNotification: sendNotification2 } = await import("./notification-ULESRDHB.js");
2297
2369
  sendNotification2(ctx, response);
2298
2370
  }
2299
2371
  } catch (err) {
@@ -2308,7 +2380,7 @@ async function phaseHeartbeat(ctx) {
2308
2380
  sleepMinute: SLEEP_MINUTE,
2309
2381
  sessions: ctx.sessions,
2310
2382
  isSleepActive: ctx.isSleepActive,
2311
- doctorPath: join6(abtarsHome(), "scripts", "doctor.sh"),
2383
+ doctorPath: join7(abtarsHome(), "scripts", "doctor.sh"),
2312
2384
  startSleep: () => {
2313
2385
  ctx.sleepHandle?.spawn();
2314
2386
  },
@@ -2317,11 +2389,11 @@ async function phaseHeartbeat(ctx) {
2317
2389
  },
2318
2390
  cronBusy: () => cronQueue.currentJob !== null || cronQueue.pending > 0
2319
2391
  }));
2320
- heartbeat.registerTask(createDbIntegrityTask(memory, sendSystemMessage));
2392
+ heartbeat.registerTask(createDbIntegrityTask(memory));
2321
2393
  heartbeat.registerTask(createSkillStatsFlushTask());
2322
2394
  heartbeat.registerTask(createSkillTrashPruneTask());
2323
2395
  heartbeat.registerTask(createUpdateCheckTask((msg) => {
2324
- 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));
2325
2397
  }));
2326
2398
  if (transport.healthCheck) {
2327
2399
  heartbeat.registerTask({ name: "transport-health", execute: () => transport.healthCheck() });
@@ -2343,7 +2415,7 @@ async function phaseHeartbeat(ctx) {
2343
2415
  }
2344
2416
  ctx.selfHealerTask = selfHealerTask;
2345
2417
  pipelineDeps.selfHealerTask = selfHealerTask;
2346
- const { registerCommand } = await import("./commands-WUGPBPHI.js");
2418
+ const { registerCommand } = await import("./commands-AXW7L2MZ.js");
2347
2419
  for (const [name, handler2] of capabilities.commands) {
2348
2420
  registerCommand(name, handler2);
2349
2421
  }
@@ -2355,7 +2427,7 @@ async function phaseHeartbeat(ctx) {
2355
2427
  queueMicrotask(() => {
2356
2428
  runModelHealth().catch((err) => logAndSwallow(TAG7, "runModelHealth boot", err));
2357
2429
  });
2358
- const { checkBrowseTasks } = await import("./browse-delivery-VTLEAVYA.js");
2430
+ const { checkBrowseTasks } = await import("./browse-delivery-DXGMDMXA.js");
2359
2431
  checkBrowseTasks();
2360
2432
  heartbeat.start();
2361
2433
  memory?.setHeartbeat(heartbeat);
@@ -2373,11 +2445,11 @@ async function phaseSleep(ctx) {
2373
2445
  logWarn("boot", `${phaseSleep.name}: skipping \u2014 heartbeat not available`);
2374
2446
  return "skipped";
2375
2447
  }
2376
- const { createSleepHandle } = await import("./sleep-BPWX3FCN.js");
2377
- const { killWakeInhibit } = await import("./commands-WUGPBPHI.js");
2448
+ const { createSleepHandle } = await import("./sleep-K7EXAFGW.js");
2449
+ const { killWakeInhibit } = await import("./commands-AXW7L2MZ.js");
2378
2450
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
2379
2451
  let subagent = null;
2380
- const { getEnv: getEnv2 } = await import("./env-schema-XCPAJ6IZ.js");
2452
+ const { getEnv: getEnv2 } = await import("./env-schema-T43X43BU.js");
2381
2453
  const runtime = {
2382
2454
  async complete(prompt) {
2383
2455
  if (!subagent) subagent = new SubagentRuntime();
@@ -2401,14 +2473,14 @@ async function phaseSleep(ctx) {
2401
2473
  init_log_and_swallow();
2402
2474
  init_env_schema();
2403
2475
  init_logger();
2404
- import { join as join8 } from "node:path";
2476
+ import { join as join9 } from "node:path";
2405
2477
 
2406
2478
  // src/components/dashboard/dashboard-config.ts
2407
2479
  init_logger();
2408
2480
  init_paths();
2409
- import { existsSync as existsSync5 } from "node:fs";
2481
+ import { existsSync as existsSync6 } from "node:fs";
2410
2482
  import { resolve as resolve3 } from "node:path";
2411
- import { homedir as homedir5 } from "node:os";
2483
+ import { homedir as homedir6 } from "node:os";
2412
2484
  var DASHBOARD_DEFAULTS = {
2413
2485
  webPort: 3e3,
2414
2486
  webHost: "127.0.0.1",
@@ -2471,8 +2543,8 @@ function buildStatusSnapshot(refs) {
2471
2543
  heartbeat,
2472
2544
  cron: readCronStatus(),
2473
2545
  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")),
2546
+ gwsAuth: existsSync6(resolve3(homedir6(), ".config", "gws-cli", "token.json.enc")),
2547
+ xAuth: existsSync6(resolve3(abtarsHome(), "secret", "cookies", "x-cookies.json")),
2476
2548
  agentApi: refs.agentApi ? { traffic: refs.agentApi.getTrafficLog() } : null,
2477
2549
  model: refs.model ?? { name: "unknown", provider: "unknown", fallbackChain: [] },
2478
2550
  subsystems: refs.subsystems ?? []
@@ -2610,7 +2682,8 @@ var MemorySearchController = class {
2610
2682
  const webResults = result.results.map(hitToWebResult);
2611
2683
  const stageStatuses = {};
2612
2684
  for (const [name, stage] of Object.entries(result.stages)) {
2613
- 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 };
2614
2687
  }
2615
2688
  const response = { results: webResults, layers: stageStatuses };
2616
2689
  return { status: 200, body: response };
@@ -2645,8 +2718,8 @@ function parseOptionalNumber(val) {
2645
2718
  init_log_and_swallow();
2646
2719
  init_paths();
2647
2720
  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";
2721
+ import { readFileSync as readFileSync5, existsSync as existsSync7 } from "node:fs";
2722
+ import { join as join8, dirname as dirname2 } from "node:path";
2650
2723
  import { fileURLToPath } from "node:url";
2651
2724
 
2652
2725
  // node_modules/ws/wrapper.mjs
@@ -2824,8 +2897,8 @@ var DashboardServer = class {
2824
2897
  const method = req.method ?? "GET";
2825
2898
  const pathname = url.split("?")[0];
2826
2899
  if (method === "GET" && pathname === "/") {
2827
- const indexPath = join7(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
2828
- if (existsSync6(indexPath)) {
2900
+ const indexPath = join8(dirname2(fileURLToPath(import.meta.url)), "public", "index.html");
2901
+ if (existsSync7(indexPath)) {
2829
2902
  let html = readFileSync5(indexPath, "utf-8");
2830
2903
  const agentApi = this.deps.agentApiConfig;
2831
2904
  if (agentApi) {
@@ -2843,15 +2916,15 @@ var DashboardServer = class {
2843
2916
  if (method === "GET" && /^\/(js|css|assets|[\w-]+\.(js|css|jpg|png|ico))/.test(pathname ?? "")) {
2844
2917
  const safePath = (pathname ?? "").replace(/\.\./g, "");
2845
2918
  if (safePath === "/assets/logo.png") {
2846
- const customLogo = join7(abtarsHome(), "logo", "logo.png");
2847
- if (existsSync6(customLogo)) {
2919
+ const customLogo = join8(abtarsHome(), "logo", "logo.png");
2920
+ if (existsSync7(customLogo)) {
2848
2921
  res.writeHead(200, { "Content-Type": "image/png" });
2849
2922
  res.end(readFileSync5(customLogo));
2850
2923
  return;
2851
2924
  }
2852
2925
  }
2853
- const filePath = join7(dirname(fileURLToPath(import.meta.url)), "public", safePath);
2854
- if (existsSync6(filePath)) {
2926
+ const filePath = join8(dirname2(fileURLToPath(import.meta.url)), "public", safePath);
2927
+ if (existsSync7(filePath)) {
2855
2928
  const ext = safePath.split(".").pop() ?? "";
2856
2929
  const mimeTypes = { js: "text/javascript", css: "text/css", jpg: "image/jpeg", png: "image/png", ico: "image/x-icon", html: "text/html" };
2857
2930
  res.writeHead(200, { "Content-Type": (mimeTypes[ext] ?? "application/octet-stream") + (["js", "css", "html"].includes(ext) ? "; charset=utf-8" : "") });
@@ -2951,7 +3024,7 @@ var DashboardServer = class {
2951
3024
  if (method === "GET" && pathname === "/api/cron") {
2952
3025
  if (!this.deps.authGate.guard(req, res)) return;
2953
3026
  try {
2954
- const { readEntries: readEntries2 } = await import("./task-store-LC7ZMS72.js");
3027
+ const { readEntries: readEntries2 } = await import("./task-store-VCBHAB43.js");
2955
3028
  res.writeHead(200, { "Content-Type": "application/json" });
2956
3029
  res.end(JSON.stringify({ ok: true, entries: readEntries2() }));
2957
3030
  } catch (err) {
@@ -3002,7 +3075,7 @@ var DashboardServer = class {
3002
3075
  };
3003
3076
  function readLogLines(cutoffMs, levelFilter, limit) {
3004
3077
  const logFile = getLogFile();
3005
- if (!existsSync6(logFile)) return [];
3078
+ if (!existsSync7(logFile)) return [];
3006
3079
  const content = readFileSync5(logFile, "utf-8");
3007
3080
  const allLines = content.split("\n").filter((l) => l.length > 0);
3008
3081
  const cutoffIso = localISO(new Date(cutoffMs));
@@ -3061,7 +3134,7 @@ async function phaseDashboard(ctx) {
3061
3134
  const token = randomBytes2(32).toString("hex");
3062
3135
  dashConfig.webAuthToken = token;
3063
3136
  process.env["WEB_AUTH_TOKEN"] = token;
3064
- const envPath = join8(process.cwd(), "config", ".env");
3137
+ const envPath = join9(process.cwd(), "config", ".env");
3065
3138
  try {
3066
3139
  let content = "";
3067
3140
  try {
@@ -3148,8 +3221,8 @@ init_log_and_swallow();
3148
3221
  init_paths();
3149
3222
  import { createServer as createServer2 } from "http";
3150
3223
  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";
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";
3153
3226
  import { fileURLToPath as fileURLToPath2 } from "url";
3154
3227
  init_logger();
3155
3228
  init_logger();
@@ -3522,11 +3595,11 @@ var AgentApiServer = class {
3522
3595
  this.memory = deps.memory;
3523
3596
  this.runtime = deps.runtime;
3524
3597
  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");
3598
+ const configDir = join10(abtarsHome(), "config");
3599
+ const identityCrtPath = join10(configDir, "identity.crt");
3600
+ const identityKeyPath = join10(configDir, "identity.tls.key");
3528
3601
  let hasTls = false;
3529
- if (existsSync7(identityCrtPath) && existsSync7(identityKeyPath)) {
3602
+ if (existsSync8(identityCrtPath) && existsSync8(identityKeyPath)) {
3530
3603
  try {
3531
3604
  this.server = createHttpsServer({
3532
3605
  key: readFileSync6(identityKeyPath),
@@ -3544,16 +3617,16 @@ var AgentApiServer = class {
3544
3617
  if (!hasTls) {
3545
3618
  this.server = createServer2((req, res) => this.handle(req, res));
3546
3619
  }
3547
- this.logDir = join9(abtarsHome(), "logs", "agents");
3620
+ this.logDir = join10(abtarsHome(), "logs", "agents");
3548
3621
  mkdirSync4(this.logDir, { recursive: true });
3549
3622
  this.logFile = this.newLogFile();
3550
3623
  try {
3551
- const base = dirname2(fileURLToPath2(import.meta.url));
3624
+ const base = dirname3(fileURLToPath2(import.meta.url));
3552
3625
  const name = deps.config.agentCodename;
3553
3626
  const candidates = [
3554
- join9(base, `agents/${name}.md`),
3555
- join9(base, `../../agents/${name}.md`),
3556
- join9(abtarsHome(), "agents", `${name}.md`)
3627
+ join10(base, `agents/${name}.md`),
3628
+ join10(base, `../../agents/${name}.md`),
3629
+ join10(abtarsHome(), "agents", `${name}.md`)
3557
3630
  ];
3558
3631
  this.agentRules = "";
3559
3632
  for (const p of candidates) {
@@ -3603,9 +3676,9 @@ var AgentApiServer = class {
3603
3676
  logInfo(TAG12, "A2A idle timeout \u2014 saving transcript, closing log, killing session");
3604
3677
  try {
3605
3678
  const today = localDate();
3606
- const dir = join9(this.workingDir, "memory", "working", today);
3679
+ const dir = join10(this.workingDir, "memory", "working", today);
3607
3680
  mkdirSync4(dir, { recursive: true });
3608
- const dest = join9(dir, "transcript_a2a.log");
3681
+ const dest = join10(dir, "transcript_a2a.log");
3609
3682
  const transcript = this.agentSession.getMessages?.()?.map((m) => `[${m.role}] ${m.content}`).join("\n") ?? "";
3610
3683
  writeFileSync4(dest, transcript, "utf-8");
3611
3684
  logInfo(TAG12, `A2A transcript saved to ${dest}`);
@@ -3629,7 +3702,7 @@ var AgentApiServer = class {
3629
3702
  newLogFile() {
3630
3703
  const ts = localIso().replace(/[:.]/g, "-");
3631
3704
  const name = this.config.agentCodename;
3632
- return join9(this.logDir, `${name}_${ts}.log`);
3705
+ return join10(this.logDir, `${name}_${ts}.log`);
3633
3706
  }
3634
3707
  log(role, content) {
3635
3708
  const ts = localIso();
@@ -3713,7 +3786,7 @@ var AgentApiServer = class {
3713
3786
  res.writeHead(429, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Peer hop limit reached", "loop_detected", "hop_exceeded")));
3714
3787
  return;
3715
3788
  }
3716
- const { checkRateLimit } = await import("./agent-api-rate-limit-C25WGSFF.js");
3789
+ const { checkRateLimit } = await import("./agent-api-rate-limit-R2OFAQ3N.js");
3717
3790
  const limit = checkRateLimit(caller);
3718
3791
  if (!limit.allowed) {
3719
3792
  const retryAfter = Math.ceil((limit.retryAfterMs ?? 6e4) / 1e3);
@@ -3721,7 +3794,7 @@ var AgentApiServer = class {
3721
3794
  logWarn(TAG12, `Rate limited ${caller} \u2014 retry in ${retryAfter}s`);
3722
3795
  return;
3723
3796
  }
3724
- const { setCurrentPeerHops } = await import("./peer-client-T44VI7NB.js");
3797
+ const { setCurrentPeerHops } = await import("./peer-client-D2F5QWRV.js");
3725
3798
  setCurrentPeerHops(hopValue);
3726
3799
  let body;
3727
3800
  try {
@@ -3737,7 +3810,7 @@ var AgentApiServer = class {
3737
3810
  const lastMsg = reqMessages?.[reqMessages.length - 1];
3738
3811
  if (lastMsg?.content) {
3739
3812
  const { verifyMessage } = await import("./digital-signature-PNY4TR2W.js");
3740
- const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-D5A4454H.js");
3813
+ const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-5SUIBJLG.js");
3741
3814
  const peerConfig2 = loadPeerConfig2();
3742
3815
  const peerEntry2 = peerConfig2.peers[caller];
3743
3816
  const hasSigTag = /\[sig:\d+:[A-Za-z0-9+/=]+\]$/.test(lastMsg.content);
@@ -3796,7 +3869,7 @@ var AgentApiServer = class {
3796
3869
  return;
3797
3870
  }
3798
3871
  }
3799
- const { loadPeerConfig } = await import("./peer-config-D5A4454H.js");
3872
+ const { loadPeerConfig } = await import("./peer-config-5SUIBJLG.js");
3800
3873
  const peerConfig = loadPeerConfig();
3801
3874
  const peerEntry = peerConfig.peers[caller];
3802
3875
  const policy = buildPolicy("peer", {
@@ -3903,9 +3976,9 @@ async function phaseAgentApi(ctx) {
3903
3976
  } else {
3904
3977
  logError("main", `Agent API failed to start: ${result.error}`);
3905
3978
  }
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");
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");
3909
3982
  const peerConfig = loadPeerConfig();
3910
3983
  const udpPort = peerConfig.self.udpPort ?? 5353;
3911
3984
  if (Object.keys(peerConfig.peers).length > 0) {
@@ -4039,16 +4112,10 @@ async function startBridge() {
4039
4112
  logError("boot", `\u2717 ${phaseConfig.name} failed \u2014 continuing with empty defaults`, err);
4040
4113
  }
4041
4114
  }
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) });
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) });
4052
4119
  const bridge = new Bridge(ctx);
4053
4120
  ctx.isSleepActive = () => ctx.sleepHandle?.isActive === true;
4054
4121
  ctx.requestShutdownWithCode = (code) => bridge.requestShutdown(code);
@@ -4074,7 +4141,7 @@ async function startBridge() {
4074
4141
  logError("boot", `\u2717 ${phase.name} failed \u2014 continuing without it`, err);
4075
4142
  }
4076
4143
  }
4077
- const { hasHooks, fire } = await import("./hook-system-POI5VRIX.js");
4144
+ const { hasHooks, fire } = await import("./hook-system-ZCVOFFRD.js");
4078
4145
  if (hasHooks("BridgeStart")) {
4079
4146
  await fire("BridgeStart", { event: "BridgeStart", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: "", platform: "", userId: "" });
4080
4147
  }