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
@@ -2,7 +2,10 @@
2
2
  import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
3
3
  import {
4
4
  install
5
- } from "./chunk-4BUOO6WI.js";
5
+ } from "./chunk-SMZQDMSZ.js";
6
+ import {
7
+ rollback
8
+ } from "./chunk-EKHNWFEQ.js";
6
9
  import {
7
10
  acquireLock,
8
11
  atomicSwap,
@@ -16,19 +19,19 @@ import {
16
19
  readSentinel,
17
20
  writeManifest,
18
21
  writeSentinel
19
- } from "./chunk-RSWUPUNA.js";
22
+ } from "./chunk-WMWI3SJ7.js";
20
23
  import {
21
24
  restart
22
- } from "./chunk-URAQLQ2U.js";
25
+ } from "./chunk-F3HMZFIL.js";
23
26
  import {
24
27
  init_log_and_swallow,
25
28
  logAndSwallow
26
- } from "./chunk-EX2SRTUE.js";
27
- import "./chunk-2BY6I4P5.js";
29
+ } from "./chunk-CYSGXNBY.js";
30
+ import "./chunk-GUTRAMK3.js";
28
31
  import {
29
32
  abtarsHome,
30
33
  init_paths
31
- } from "./chunk-MJ6PHMOK.js";
34
+ } from "./chunk-WW5F2DCO.js";
32
35
  import {
33
36
  __require
34
37
  } from "./chunk-7K2YZTLD.js";
@@ -311,13 +314,18 @@ var ABTARS_EXCLUDE = [
311
314
  "current",
312
315
  "bin",
313
316
  "app",
317
+ "app.prev*",
318
+ "app.staging",
319
+ "app.broken",
314
320
  "logs",
315
321
  "node_modules",
316
322
  "overflow",
317
323
  "browser-socket",
324
+ "src",
318
325
  "bridge.lock",
319
326
  "watchdog.lock",
320
327
  "browse-spawn.sock",
328
+ "manifest.json",
321
329
  "*.sock"
322
330
  ];
323
331
  var ABMIND_EXCLUDE = [
@@ -329,7 +337,7 @@ var ABMIND_EXCLUDE = [
329
337
  "*.db-wal",
330
338
  "*.db-shm"
331
339
  ];
332
- var CONFIG_DIRS = ["config", "secret", "tasks", "skills", "core", "agents"];
340
+ var CONFIG_DIRS = ["config", "secret", "tasks", "skills", "core", "agents", "kanban"];
333
341
  async function backup(opts = {}) {
334
342
  const abHome = abtarsHome();
335
343
  const abmindHome = process.env["ABMIND_HOME"] ?? join4(dirname(abHome), ".abmind");
@@ -574,7 +582,7 @@ async function runInteractive(existing) {
574
582
  const { intro, outro, text, select, confirm: confirm2, isCancel, cancel } = await import("./dist-J3T4XVKX.js");
575
583
  intro("abtars onboard \u2014 first-time setup");
576
584
  const noteEmpty = "press Enter to skip";
577
- const { packagePaths: pp, readManifest: rm3 } = await import("./deploy-lib-import-SBKXDD3F.js");
585
+ const { packagePaths: pp, readManifest: rm3 } = await import("./deploy-lib-import-6VJTYXEG.js");
578
586
  const mfPaths = pp("abtars");
579
587
  const mf = await rm3(mfPaths.manifest);
580
588
  const installMode = mf?.installMode ?? "supervised";
@@ -1010,7 +1018,7 @@ async function onboard(opts) {
1010
1018
  }
1011
1019
  if (secrets.length > 0) process.stdout.write(`\u2713 ${secrets.length} secrets \u2192 ${secretDirPath}
1012
1020
  `);
1013
- const { writeManifest: writeManifest2 } = await import("./deploy-lib-import-SBKXDD3F.js");
1021
+ const { writeManifest: writeManifest2 } = await import("./deploy-lib-import-6VJTYXEG.js");
1014
1022
  const mf = await readManifest(paths.manifest);
1015
1023
  if (mf) await writeManifest2(paths.manifest, { ...mf, installMode: answers.installMode });
1016
1024
  process.stdout.write(`\u2713 install mode: ${answers.installMode}
@@ -1141,8 +1149,8 @@ Next: 'abtars update' to build, then start the bridge.
1141
1149
  `);
1142
1150
  return 0;
1143
1151
  }
1144
- const { existsSync: existsSync10 } = await import("node:fs");
1145
- const hasRelease = existsSync10(join6(paths.home, "current"));
1152
+ const { existsSync: existsSync9 } = await import("node:fs");
1153
+ const hasRelease = existsSync9(join6(paths.home, "current"));
1146
1154
  if (!hasRelease) {
1147
1155
  process.stdout.write(`
1148
1156
  Next: run 'abtars update' to stage the release, then start the bridge.
@@ -1162,9 +1170,9 @@ Next: start the bridge
1162
1170
  return 0;
1163
1171
  }
1164
1172
  async function seedDefaultTasks(chatId, abtarsHome4) {
1165
- const { existsSync: existsSync10 } = await import("node:fs");
1173
+ const { existsSync: existsSync9 } = await import("node:fs");
1166
1174
  const tasksJson = join6(abtarsHome4, "tasks", "tasks.json");
1167
- if (existsSync10(tasksJson)) {
1175
+ if (existsSync9(tasksJson)) {
1168
1176
  process.stdout.write(`\u2022 tasks.json exists \u2014 skipping default-task seed
1169
1177
  `);
1170
1178
  return;
@@ -1177,7 +1185,7 @@ async function seedDefaultTasks(chatId, abtarsHome4) {
1177
1185
  ];
1178
1186
  let templatePath = null;
1179
1187
  for (const p of candidates) {
1180
- if (existsSync10(p)) {
1188
+ if (existsSync9(p)) {
1181
1189
  templatePath = p;
1182
1190
  break;
1183
1191
  }
@@ -1233,70 +1241,10 @@ async function seedDefaultTasks(chatId, abtarsHome4) {
1233
1241
  }
1234
1242
  }
1235
1243
 
1236
- // src/cli/commands/rollback.ts
1237
- import { existsSync as existsSync5, renameSync as renameSync3, rmSync as rmSync2 } from "node:fs";
1238
- import { join as join7 } from "node:path";
1239
- async function rollback() {
1240
- const paths = packagePaths("abtars");
1241
- const manifest = await readManifest(paths.manifest);
1242
- if (!existsSync5(paths.appPrev)) {
1243
- process.stderr.write(`Nothing to roll back to (no app.prev/ found).
1244
- `);
1245
- return 2;
1246
- }
1247
- if (!manifest?.version) {
1248
- process.stderr.write(`No active release in manifest; nothing to roll back.
1249
- `);
1250
- return 2;
1251
- }
1252
- const release = await acquireLock(paths.lock, "rollback");
1253
- try {
1254
- const brokenDir = join7(paths.home, "app.broken");
1255
- rmSync2(brokenDir, { recursive: true, force: true });
1256
- renameSync3(paths.app, brokenDir);
1257
- renameSync3(paths.appPrev, paths.app);
1258
- rmSync2(brokenDir, { recursive: true, force: true });
1259
- process.stdout.write(`\u2713 rolled back: app.prev/ \u2192 app/
1260
- `);
1261
- if (manifest.previousVersion) {
1262
- await writeManifest(paths.manifest, {
1263
- ...manifest,
1264
- version: manifest.previousVersion,
1265
- commit: manifest.previousCommit,
1266
- activatedAt: (/* @__PURE__ */ new Date()).toISOString(),
1267
- previousVersion: manifest.version,
1268
- previousCommit: manifest.commit
1269
- });
1270
- process.stdout.write(`\u2713 manifest: ${manifest.version} \u2192 ${manifest.previousVersion}
1271
- `);
1272
- }
1273
- const restartTs = Date.now();
1274
- const { restart: restart2 } = await import("./abtars-restart.js");
1275
- process.stdout.write(`\u267B\uFE0F Restarting bridge...
1276
- `);
1277
- await restart2({ cold: true }).catch(() => {
1278
- });
1279
- const health = await healthProbe(paths.home, restartTs, 6e4);
1280
- if (health.healthy) {
1281
- process.stdout.write(`\u2713 Bridge healthy (PID ${health.pid})
1282
- `);
1283
- } else {
1284
- process.stderr.write(`\u26A0\uFE0F Bridge may not have started. Check logs.
1285
- `);
1286
- }
1287
- process.stdout.write(`
1288
- Rollback complete.
1289
- `);
1290
- return 0;
1291
- } finally {
1292
- await release();
1293
- }
1294
- }
1295
-
1296
1244
  // src/cli/commands/status.ts
1297
- import { existsSync as existsSync6 } from "node:fs";
1245
+ import { existsSync as existsSync5 } from "node:fs";
1298
1246
  import { readFileSync as readFileSync4 } from "node:fs";
1299
- import { join as join8 } from "node:path";
1247
+ import { join as join7 } from "node:path";
1300
1248
  async function status() {
1301
1249
  const paths = packagePaths("abtars");
1302
1250
  const manifest = await readManifest(paths.manifest);
@@ -1308,8 +1256,8 @@ Run 'abtars install' to set up.
1308
1256
  );
1309
1257
  return 1;
1310
1258
  }
1311
- const appExists = existsSync6(paths.app);
1312
- const appPrevExists = existsSync6(paths.appPrev);
1259
+ const appExists = existsSync5(paths.app);
1260
+ const appPrevExists = existsSync5(paths.appPrev);
1313
1261
  const lines = [
1314
1262
  `abtars status`,
1315
1263
  ` home: ${paths.home}`,
@@ -1325,7 +1273,7 @@ Run 'abtars install' to set up.
1325
1273
  ` host: ${manifest.host}`
1326
1274
  ];
1327
1275
  try {
1328
- const bridgeLock = JSON.parse(readFileSync4(join8(paths.home, "bridge.lock"), "utf-8"));
1276
+ const bridgeLock = JSON.parse(readFileSync4(join7(paths.home, "bridge.lock"), "utf-8"));
1329
1277
  if (bridgeLock.pid) {
1330
1278
  const alive = (() => {
1331
1279
  try {
@@ -1365,16 +1313,16 @@ Run 'abtars install' to set up.
1365
1313
 
1366
1314
  // src/cli/commands/update.ts
1367
1315
  import { hostname } from "node:os";
1368
- import { join as join11 } from "node:path";
1369
- import { readFileSync as readFileSync6, existsSync as existsSync9 } from "node:fs";
1316
+ import { join as join10 } from "node:path";
1317
+ import { readFileSync as readFileSync6, writeFileSync as writeFileSync3, existsSync as existsSync8 } from "node:fs";
1370
1318
  import { copyFile as copyFile2, mkdir as mkdir4, chmod, readdir } from "node:fs/promises";
1371
- import { rmSync as rmSync3, cpSync, readdirSync as readdirSync3, mkdirSync as mkdirSync2 } from "node:fs";
1319
+ import { rmSync as rmSync2, cpSync as cpSync2, readdirSync as readdirSync3, mkdirSync as mkdirSync2, copyFileSync } from "node:fs";
1372
1320
 
1373
1321
  // src/cli/update-sources/local.ts
1374
1322
  import { spawnSync as spawnSync2 } from "node:child_process";
1375
- import { existsSync as existsSync7 } from "node:fs";
1323
+ import { existsSync as existsSync6, cpSync } from "node:fs";
1376
1324
  import { copyFile, cp, mkdir as mkdir2, readFile as readFile2, rm, writeFile as writeFile2 } from "node:fs/promises";
1377
- import { join as join9 } from "node:path";
1325
+ import { join as join8 } from "node:path";
1378
1326
  var LocalBuildError = class extends Error {
1379
1327
  constructor(message, hint) {
1380
1328
  super(hint ? `${message}
@@ -1436,7 +1384,7 @@ ${upstream} is ahead by ${behind} commit${behind === 1 ? "" : "s"}.`,
1436
1384
  return { commit, branch };
1437
1385
  }
1438
1386
  async function readPackageVersion(repoRoot) {
1439
- const pkg = JSON.parse(await readFile2(join9(repoRoot, "package.json"), "utf-8"));
1387
+ const pkg = JSON.parse(await readFile2(join8(repoRoot, "package.json"), "utf-8"));
1440
1388
  if (typeof pkg.version !== "string") {
1441
1389
  throw new LocalBuildError("package.json has no version field.");
1442
1390
  }
@@ -1444,13 +1392,13 @@ async function readPackageVersion(repoRoot) {
1444
1392
  }
1445
1393
  function makeLocalBuildSource(opts = {}) {
1446
1394
  const repoRoot = opts.repoRoot ?? process.cwd();
1447
- const isNpmPackage = !existsSync7(join9(repoRoot, ".git"));
1395
+ const isNpmPackage = !existsSync6(join8(repoRoot, ".git"));
1448
1396
  return {
1449
1397
  name: "local",
1450
1398
  async prepare(ctx) {
1451
1399
  if (isNpmPackage) {
1452
- const bundleDir = join9(repoRoot, "bundle");
1453
- if (!existsSync7(bundleDir)) {
1400
+ const bundleDir = join8(repoRoot, "bundle");
1401
+ if (!existsSync6(bundleDir)) {
1454
1402
  throw new Error(`No bundle/ found at ${repoRoot}. Run from the abtars npm package or a git checkout.`);
1455
1403
  }
1456
1404
  const pkgVersion2 = await readPackageVersion(repoRoot);
@@ -1458,16 +1406,16 @@ function makeLocalBuildSource(opts = {}) {
1458
1406
  const stagedPath2 = ctx.stagingDir;
1459
1407
  await rm(stagedPath2, { recursive: true, force: true });
1460
1408
  await mkdir2(stagedPath2, { recursive: true });
1461
- await cp(bundleDir, join9(stagedPath2, "bundle"), { recursive: true });
1462
- const coreDir = join9(repoRoot, "core");
1463
- if (existsSync7(coreDir)) await cp(coreDir, join9(stagedPath2, "core"), { recursive: true });
1464
- const scriptsSrc = join9(repoRoot, "scripts");
1465
- if (existsSync7(scriptsSrc)) await cp(scriptsSrc, join9(stagedPath2, "scripts"), { recursive: true });
1466
- const configSrc = join9(repoRoot, "config");
1467
- if (existsSync7(configSrc)) await cp(configSrc, join9(stagedPath2, "config"), { recursive: true });
1468
- const manifestSrc = join9(repoRoot, "install-manifest.json");
1469
- if (existsSync7(manifestSrc)) await copyFile(manifestSrc, join9(stagedPath2, "install-manifest.json"));
1470
- await writeFile2(join9(stagedPath2, "package.json"), JSON.stringify({ type: "module", name: "abtars", version: version2 }, null, 2) + "\n");
1409
+ await cp(bundleDir, join8(stagedPath2, "bundle"), { recursive: true });
1410
+ const coreDir = join8(repoRoot, "core");
1411
+ if (existsSync6(coreDir)) await cp(coreDir, join8(stagedPath2, "core"), { recursive: true });
1412
+ const scriptsSrc = join8(repoRoot, "scripts");
1413
+ if (existsSync6(scriptsSrc)) await cp(scriptsSrc, join8(stagedPath2, "scripts"), { recursive: true });
1414
+ const configSrc = join8(repoRoot, "config");
1415
+ if (existsSync6(configSrc)) await cp(configSrc, join8(stagedPath2, "config"), { recursive: true });
1416
+ const manifestSrc = join8(repoRoot, "install-manifest.json");
1417
+ if (existsSync6(manifestSrc)) await copyFile(manifestSrc, join8(stagedPath2, "install-manifest.json"));
1418
+ await writeFile2(join8(stagedPath2, "package.json"), JSON.stringify({ type: "module", name: "abtars", version: version2 }, null, 2) + "\n");
1471
1419
  process.stdout.write(`\u2713 staged ${version2} (from npm package)
1472
1420
  `);
1473
1421
  return { version: version2, stagedPath: stagedPath2, commit: null, branch: null, packageLockHash: null, source: "local" };
@@ -1478,18 +1426,22 @@ function makeLocalBuildSource(opts = {}) {
1478
1426
  if (opts.skipInstall !== true) {
1479
1427
  runCmd("npm", ["install", "--no-audit", "--no-fund"], repoRoot);
1480
1428
  }
1481
- runCmd("npm", ["run", "bundle"], repoRoot);
1429
+ runCmd("node", ["esbuild.config.js"], repoRoot);
1430
+ const publicSrc = join8(repoRoot, "src", "components", "dashboard", "public");
1431
+ if (existsSync6(publicSrc)) cpSync(publicSrc, join8(repoRoot, "bundle", "public"), { recursive: true });
1432
+ const agentsSrc = join8(repoRoot, "agents");
1433
+ if (existsSync6(agentsSrc)) cpSync(agentsSrc, join8(repoRoot, "bundle", "agents"), { recursive: true });
1482
1434
  const stagedPath = ctx.stagingDir;
1483
1435
  await rm(stagedPath, { recursive: true, force: true });
1484
1436
  await mkdir2(stagedPath, { recursive: true });
1485
- await cp(join9(repoRoot, "bundle"), join9(stagedPath, "bundle"), { recursive: true });
1486
- const coreSkillsSrc = join9(repoRoot, "core", "skills");
1487
- if (existsSync7(coreSkillsSrc)) {
1488
- await cp(coreSkillsSrc, join9(stagedPath, "core", "skills"), { recursive: true });
1437
+ await cp(join8(repoRoot, "bundle"), join8(stagedPath, "bundle"), { recursive: true });
1438
+ const coreSkillsSrc = join8(repoRoot, "core", "skills");
1439
+ if (existsSync6(coreSkillsSrc)) {
1440
+ await cp(coreSkillsSrc, join8(stagedPath, "core", "skills"), { recursive: true });
1489
1441
  }
1490
- await writeFile2(join9(stagedPath, "package.json"), JSON.stringify({ type: "module", name: "abtars", version }, null, 2) + "\n");
1491
- await copyFile(join9(repoRoot, "install-manifest.json"), join9(stagedPath, "install-manifest.json"));
1492
- const packageLockHash = await hashFile(join9(repoRoot, "package-lock.json"));
1442
+ await writeFile2(join8(stagedPath, "package.json"), JSON.stringify({ type: "module", name: "abtars", version }, null, 2) + "\n");
1443
+ await copyFile(join8(repoRoot, "install-manifest.json"), join8(stagedPath, "install-manifest.json"));
1444
+ const packageLockHash = await hashFile(join8(repoRoot, "package-lock.json"));
1493
1445
  return { version, stagedPath, commit, branch, packageLockHash, source: "local" };
1494
1446
  }
1495
1447
  };
@@ -1497,9 +1449,9 @@ function makeLocalBuildSource(opts = {}) {
1497
1449
 
1498
1450
  // src/cli/update-sources/npm.ts
1499
1451
  import { spawnSync as spawnSync3 } from "node:child_process";
1500
- import { existsSync as existsSync8, readFileSync as readFileSync5, unlinkSync as unlinkSync4 } from "node:fs";
1452
+ import { existsSync as existsSync7, readFileSync as readFileSync5, unlinkSync as unlinkSync4 } from "node:fs";
1501
1453
  import { mkdir as mkdir3, rm as rm2 } from "node:fs/promises";
1502
- import { join as join10 } from "node:path";
1454
+ import { join as join9 } from "node:path";
1503
1455
  var TIMEOUT_MS = 6e4;
1504
1456
  function run(cmd, args, cwd) {
1505
1457
  const r = spawnSync3(cmd, args, { cwd, encoding: "utf-8", timeout: TIMEOUT_MS });
@@ -1509,7 +1461,7 @@ function run(cmd, args, cwd) {
1509
1461
  }
1510
1462
  function readLocalVersion(home) {
1511
1463
  try {
1512
- const pkg = JSON.parse(readFileSync5(join10(home, "app", "package.json"), "utf-8"));
1464
+ const pkg = JSON.parse(readFileSync5(join9(home, "app", "package.json"), "utf-8"));
1513
1465
  return pkg.version ?? null;
1514
1466
  } catch {
1515
1467
  return null;
@@ -1529,9 +1481,9 @@ function makeNpmSource(packageName) {
1529
1481
  await mkdir3(stagedPath, { recursive: true });
1530
1482
  run("npm", ["pack", `${packageName}@${latest}`, "--pack-destination", stagedPath], stagedPath);
1531
1483
  const tgzName = `${packageName}-${latest}.tgz`.replace("@", "").replace("/", "-");
1532
- const tgzPath = join10(stagedPath, tgzName);
1484
+ const tgzPath = join9(stagedPath, tgzName);
1533
1485
  run("tar", ["-xzf", tgzPath, "--strip-components=1"], stagedPath);
1534
- if (existsSync8(tgzPath)) unlinkSync4(tgzPath);
1486
+ if (existsSync7(tgzPath)) unlinkSync4(tgzPath);
1535
1487
  run("npm", ["install", "--omit=dev", "--no-audit", "--no-fund"], stagedPath);
1536
1488
  return { version: latest, stagedPath, commit: null, branch: null, packageLockHash: null, source: "npm" };
1537
1489
  }
@@ -1569,8 +1521,8 @@ Use --source local (default) or --source npm.
1569
1521
  try {
1570
1522
  cleanStaleStaging(paths.appStaging);
1571
1523
  const cleanupHandler = () => {
1572
- if (existsSync9(paths.appStaging) && existsSync9(paths.app)) {
1573
- rmSync3(paths.appStaging, { recursive: true, force: true });
1524
+ if (existsSync8(paths.appStaging) && existsSync8(paths.app)) {
1525
+ rmSync2(paths.appStaging, { recursive: true, force: true });
1574
1526
  }
1575
1527
  };
1576
1528
  process.on("SIGHUP", () => {
@@ -1582,12 +1534,12 @@ Use --source local (default) or --source npm.
1582
1534
  process.exit(143);
1583
1535
  });
1584
1536
  let repoRoot = opts.repoRoot ?? process.cwd();
1585
- if (!opts.repoRoot && !existsSync9(join11(repoRoot, ".git"))) {
1537
+ if (!opts.repoRoot && !existsSync8(join10(repoRoot, ".git"))) {
1586
1538
  const { realpathSync } = await import("node:fs");
1587
1539
  const scriptPath = realpathSync(process.argv[1] ?? "");
1588
1540
  const { dirname: dirname3 } = await import("node:path");
1589
- const candidate = join11(dirname3(scriptPath), "..");
1590
- if (existsSync9(join11(candidate, "bundle"))) repoRoot = candidate;
1541
+ const candidate = join10(dirname3(scriptPath), "..");
1542
+ if (existsSync8(join10(candidate, "bundle"))) repoRoot = candidate;
1591
1543
  }
1592
1544
  const source = opts.source === "npm" ? makeNpmSource("abtars") : makeLocalBuildSource({ repoRoot, allowStale: opts.fromLocal });
1593
1545
  if (opts.fromLocal) {
@@ -1606,14 +1558,14 @@ Use --source local (default) or --source npm.
1606
1558
  process.stdout.write(`\u2713 staged ${staged.version}
1607
1559
  `);
1608
1560
  {
1609
- const pkgPath = join11(staged.stagedPath, "package.json");
1561
+ const pkgPath = join10(staged.stagedPath, "package.json");
1610
1562
  try {
1611
1563
  const pkg = JSON.parse(readFileSync6(pkgPath, "utf-8"));
1612
1564
  const externals = { patchright: "^1.59.4", "rettiwt-api": "^4.1.3" };
1613
1565
  pkg.dependencies = { ...pkg.dependencies, ...externals };
1614
1566
  if (pkg.dependencies?.abmind?.startsWith("file:")) delete pkg.dependencies.abmind;
1615
- const { writeFileSync: writeFileSync3 } = await import("node:fs");
1616
- writeFileSync3(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
1567
+ const { writeFileSync: writeFileSync4 } = await import("node:fs");
1568
+ writeFileSync4(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
1617
1569
  const { execSync } = await import("node:child_process");
1618
1570
  execSync("npm install --omit=dev --ignore-scripts 2>/dev/null", { cwd: staged.stagedPath, timeout: 6e4 });
1619
1571
  process.stdout.write(`\u2713 external deps installed
@@ -1624,8 +1576,8 @@ Use --source local (default) or --source npm.
1624
1576
  }
1625
1577
  }
1626
1578
  await copyAbmind(staged.stagedPath, repoRoot);
1627
- const entryPoint = join11(staged.stagedPath, "bundle", "abtars.js");
1628
- if (!existsSync9(entryPoint)) {
1579
+ const entryPoint = join10(staged.stagedPath, "bundle", "abtars.js");
1580
+ if (!existsSync8(entryPoint)) {
1629
1581
  process.stderr.write(`\u274C Entry point not found: ${entryPoint}
1630
1582
  `);
1631
1583
  return 1;
@@ -1633,10 +1585,6 @@ Use --source local (default) or --source npm.
1633
1585
  configSnapshot(paths.config);
1634
1586
  process.stdout.write(`\u2713 config snapshot (3-slot rotation)
1635
1587
  `);
1636
- atomicSwap(paths.app, paths.appPrev, paths.appStaging);
1637
- process.stdout.write(`\u2713 atomic swap: app.staging/ \u2192 app/
1638
- `);
1639
- await postSwapHousekeeping(paths, repoRoot, staged);
1640
1588
  const prior = await readManifest(paths.manifest);
1641
1589
  const sentinelData = {
1642
1590
  version: staged.version,
@@ -1645,6 +1593,10 @@ Use --source local (default) or --source npm.
1645
1593
  status: "pending"
1646
1594
  };
1647
1595
  writeSentinel(paths.home, sentinelData);
1596
+ atomicSwap(paths.app, paths.appPrev, paths.appStaging);
1597
+ process.stdout.write(`\u2713 atomic swap: app.staging/ \u2192 app/
1598
+ `);
1599
+ await postSwapHousekeeping(paths, repoRoot, staged);
1648
1600
  await writeManifest(paths.manifest, {
1649
1601
  ...prior ?? emptyManifest("abtars", hostname()),
1650
1602
  version: staged.version,
@@ -1654,7 +1606,9 @@ Use --source local (default) or --source npm.
1654
1606
  activatedAt: (/* @__PURE__ */ new Date()).toISOString(),
1655
1607
  source: "local",
1656
1608
  previousVersion: prior?.version ?? null,
1657
- previousCommit: prior?.commit ?? null
1609
+ previousCommit: prior?.commit ?? null,
1610
+ installMode: prior?.installMode ?? "supervised",
1611
+ repoRoot
1658
1612
  });
1659
1613
  process.stdout.write(`\u2713 manifest updated
1660
1614
  `);
@@ -1672,22 +1626,23 @@ Use --source local (default) or --source npm.
1672
1626
  writeSentinel(paths.home, { ...sentinelData, status: "success" });
1673
1627
  process.stdout.write(`\u2713 Bridge healthy (PID ${health.pid}, tick at ${new Date(health.heartbeat).toISOString()})
1674
1628
  `);
1629
+ await syncAssets(paths.home, staged.stagedPath);
1675
1630
  return 0;
1676
1631
  }
1677
1632
  process.stderr.write(`\u274C Bridge unhealthy after 60s. Auto-rolling back...
1678
1633
  `);
1679
- if (!existsSync9(paths.appPrev)) {
1680
- process.stderr.write(`\u274C No app.prev/ to roll back to. Manual intervention required.
1634
+ if (!existsSync8(paths.appPrev1)) {
1635
+ process.stderr.write(`\u274C No app.prev.1/ to roll back to. Manual intervention required.
1681
1636
  `);
1682
1637
  process.stderr.write(` Check: ~/.abtars/logs/bridge.log
1683
1638
  `);
1684
1639
  return 2;
1685
1640
  }
1686
- const brokenDir = join11(paths.home, "app.broken");
1687
- rmSync3(brokenDir, { recursive: true, force: true });
1688
- const { renameSync: renameSync4 } = await import("node:fs");
1689
- renameSync4(paths.app, brokenDir);
1690
- renameSync4(paths.appPrev, paths.app);
1641
+ const brokenDir = join10(paths.home, "app.broken");
1642
+ rmSync2(brokenDir, { recursive: true, force: true });
1643
+ const { renameSync: renameSync3 } = await import("node:fs");
1644
+ renameSync3(paths.app, brokenDir);
1645
+ renameSync3(paths.appPrev1, paths.app);
1691
1646
  if (prior) {
1692
1647
  await writeManifest(paths.manifest, prior);
1693
1648
  }
@@ -1697,7 +1652,7 @@ Use --source local (default) or --source npm.
1697
1652
  if (rollbackHealth.healthy) {
1698
1653
  process.stderr.write(`\u26A0\uFE0F Rolled back to previous version. Investigate ${brokenDir} for the failure.
1699
1654
  `);
1700
- rmSync3(brokenDir, { recursive: true, force: true });
1655
+ rmSync2(brokenDir, { recursive: true, force: true });
1701
1656
  return 1;
1702
1657
  }
1703
1658
  process.stderr.write(`\u274C Rollback also failed. Manual intervention required.
@@ -1714,17 +1669,31 @@ Use --source local (default) or --source npm.
1714
1669
  async function copyAbmind(stagedPath, repoRoot) {
1715
1670
  const candidates = [
1716
1671
  process.env["ABMIND_REPO"],
1717
- join11(repoRoot, "..", "abmind"),
1718
- join11(process.env["HOME"] ?? "", "abmind")
1672
+ join10(repoRoot, "..", "abmind"),
1673
+ join10(process.env["HOME"] ?? "", "abmind")
1719
1674
  ].filter(Boolean);
1720
1675
  for (const src of candidates) {
1721
- const distDir = join11(src, "dist");
1722
- if (existsSync9(distDir)) {
1723
- const dest = join11(stagedPath, "node_modules", "abmind");
1676
+ const distDir = join10(src, "dist");
1677
+ if (existsSync8(distDir)) {
1678
+ const dest = join10(stagedPath, "bundle", "node_modules", "abmind");
1724
1679
  mkdirSync2(dest, { recursive: true });
1725
- cpSync(distDir, join11(dest, "dist"), { recursive: true });
1726
- if (existsSync9(join11(src, "package.json"))) cpSync(join11(src, "package.json"), join11(dest, "package.json"));
1727
- if (existsSync9(join11(src, "prompts"))) cpSync(join11(src, "prompts"), join11(dest, "prompts"), { recursive: true });
1680
+ cpSync2(distDir, join10(dest, "dist"), { recursive: true });
1681
+ if (existsSync8(join10(src, "package.json"))) cpSync2(join10(src, "package.json"), join10(dest, "package.json"));
1682
+ if (existsSync8(join10(src, "prompts"))) cpSync2(join10(src, "prompts"), join10(dest, "prompts"), { recursive: true });
1683
+ const stalePath = join10(stagedPath, "node_modules", "abmind");
1684
+ if (existsSync8(stalePath)) rmSync2(stalePath, { recursive: true });
1685
+ try {
1686
+ const pkg = JSON.parse(readFileSync6(join10(dest, "package.json"), "utf-8"));
1687
+ const abmindHome = process.env["ABMIND_HOME"] ?? join10(process.env["HOME"] ?? "", ".abmind");
1688
+ mkdirSync2(abmindHome, { recursive: true });
1689
+ const { spawnSync: spawnSync4 } = await import("node:child_process");
1690
+ const gitResult = spawnSync4("git", ["-C", src, "rev-parse", "--short", "HEAD"], { encoding: "utf-8" });
1691
+ const commit = gitResult.status === 0 ? gitResult.stdout.trim() : "";
1692
+ const version = commit ? `${pkg.version}-${commit}` : pkg.version;
1693
+ const manifest = { version, activatedAt: (/* @__PURE__ */ new Date()).toISOString(), source: "local" };
1694
+ writeFileSync3(join10(abmindHome, "manifest.json"), JSON.stringify(manifest, null, 2) + "\n");
1695
+ } catch {
1696
+ }
1728
1697
  process.stdout.write(`\u2713 abmind copied from ${src}
1729
1698
  `);
1730
1699
  return;
@@ -1734,57 +1703,57 @@ async function copyAbmind(stagedPath, repoRoot) {
1734
1703
  `);
1735
1704
  }
1736
1705
  async function postSwapHousekeeping(paths, repoRoot, _staged) {
1737
- const { loadManifest } = await import("./install-manifest-QRWID3KZ.js");
1706
+ const { loadManifest } = await import("./install-manifest-KBYD7SAY.js");
1738
1707
  const installManifest = loadManifest(paths.app);
1739
- const repoScripts = join11(repoRoot, "scripts");
1740
- const destScripts = join11(paths.home, "scripts");
1708
+ const repoScripts = join10(repoRoot, "scripts");
1709
+ const destScripts = join10(paths.home, "scripts");
1741
1710
  await mkdir4(destScripts, { recursive: true });
1742
1711
  const allScriptFiles = await readdir(repoScripts).catch(() => []);
1743
1712
  const matchesInclude = (name) => installManifest.scripts.include.some((pattern) => name.endsWith(pattern.replace("*", "")));
1744
1713
  const scriptFiles = allScriptFiles.filter(matchesInclude);
1745
1714
  const isExecutable = (name) => name.endsWith(installManifest.scripts.executable.replace("*", ""));
1746
1715
  for (const name of scriptFiles) {
1747
- await copyFile2(join11(repoScripts, name), join11(destScripts, name));
1748
- if (isExecutable(name)) await chmod(join11(destScripts, name), 493);
1716
+ await copyFile2(join10(repoScripts, name), join10(destScripts, name));
1717
+ if (isExecutable(name)) await chmod(join10(destScripts, name), 493);
1749
1718
  }
1750
1719
  process.stdout.write(`\u2713 scripts refreshed (${scriptFiles.length} files)
1751
1720
  `);
1752
- const { writeWrapper } = await import("./install-SH4UVUXQ.js");
1721
+ const { writeWrapper } = await import("./install-I3CXVW52.js");
1753
1722
  await mkdir4(paths.bin, { recursive: true });
1754
1723
  for (const name of installManifest.cliWrappers) {
1755
1724
  await writeWrapper(paths.bin, name, paths.app, false);
1756
1725
  }
1757
1726
  process.stdout.write(`\u2713 wrappers refreshed (${installManifest.cliWrappers.length} files)
1758
1727
  `);
1759
- const skillsCoreSrc = join11(paths.app, "core", "skills");
1760
- const skillsCoreDst = join11(paths.home, "skills", "core");
1761
- if (existsSync9(skillsCoreSrc)) {
1762
- rmSync3(skillsCoreDst, { recursive: true, force: true });
1763
- cpSync(skillsCoreSrc, skillsCoreDst, { recursive: true });
1728
+ const skillsCoreSrc = join10(paths.app, "core", "skills");
1729
+ const skillsCoreDst = join10(paths.home, "skills", "core");
1730
+ if (existsSync8(skillsCoreSrc)) {
1731
+ rmSync2(skillsCoreDst, { recursive: true, force: true });
1732
+ cpSync2(skillsCoreSrc, skillsCoreDst, { recursive: true });
1764
1733
  const files = readdirSync3(skillsCoreDst, { recursive: true });
1765
1734
  const count = files.filter((f) => f.endsWith("SKILL.md")).length;
1766
1735
  process.stdout.write(`\u2713 skills/core synced (${count} skills)
1767
1736
  `);
1768
1737
  }
1769
1738
  for (const d of ["custom", "downloaded", "self"]) {
1770
- await mkdir4(join11(paths.home, "skills", d), { recursive: true });
1739
+ await mkdir4(join10(paths.home, "skills", d), { recursive: true });
1771
1740
  }
1772
- const releaseConfig = join11(paths.app, "config");
1773
- const destConfig = join11(paths.home, "config");
1774
- if (existsSync9(releaseConfig)) {
1741
+ const releaseConfig = join10(paths.app, "config");
1742
+ const destConfig = join10(paths.home, "config");
1743
+ if (existsSync8(releaseConfig)) {
1775
1744
  for (const f of readdirSync3(releaseConfig)) {
1776
- const src = join11(releaseConfig, f);
1745
+ const src = join10(releaseConfig, f);
1777
1746
  if (f.endsWith(".example")) {
1778
- cpSync(src, join11(destConfig, f));
1779
- const target = join11(destConfig, f.replace(".example", ""));
1780
- if (!existsSync9(target)) cpSync(src, target);
1747
+ cpSync2(src, join10(destConfig, f));
1748
+ const target = join10(destConfig, f.replace(".example", ""));
1749
+ if (!existsSync8(target)) cpSync2(src, target);
1781
1750
  }
1782
1751
  }
1783
- const defaultTransport = join11(releaseConfig, "transport.default.json");
1784
- if (existsSync9(defaultTransport)) cpSync(defaultTransport, join11(destConfig, "transport.default.json"));
1752
+ const defaultTransport = join10(releaseConfig, "transport.default.json");
1753
+ if (existsSync8(defaultTransport)) cpSync2(defaultTransport, join10(destConfig, "transport.default.json"));
1785
1754
  }
1786
- const transportJson = join11(paths.home, "config", "transport.json");
1787
- if (existsSync9(transportJson)) {
1755
+ const transportJson = join10(paths.home, "config", "transport.json");
1756
+ if (existsSync8(transportJson)) {
1788
1757
  try {
1789
1758
  const tc = JSON.parse(readFileSync6(transportJson, "utf-8"));
1790
1759
  let cleared = false;
@@ -1805,14 +1774,14 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
1805
1774
  }
1806
1775
  }
1807
1776
  if (cleared) {
1808
- const { writeFileSync: writeFileSync3 } = await import("node:fs");
1809
- writeFileSync3(transportJson, JSON.stringify(tc, null, 2) + "\n");
1777
+ const { writeFileSync: writeFileSync4 } = await import("node:fs");
1778
+ writeFileSync4(transportJson, JSON.stringify(tc, null, 2) + "\n");
1810
1779
  }
1811
1780
  } catch {
1812
1781
  }
1813
1782
  }
1814
- const doctorPath = join11(paths.home, "scripts", "doctor.sh");
1815
- if (existsSync9(doctorPath)) {
1783
+ const doctorPath = join10(paths.home, "scripts", "doctor.sh");
1784
+ if (existsSync8(doctorPath)) {
1816
1785
  process.stdout.write("\n\u{1FA7A} Health check...\n");
1817
1786
  try {
1818
1787
  const { execSync } = await import("node:child_process");
@@ -1822,7 +1791,7 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
1822
1791
  `);
1823
1792
  }
1824
1793
  }
1825
- const { ensureInstallInvariants } = await import("./ensure-invariants-BJIEOSJ2.js");
1794
+ const { ensureInstallInvariants } = await import("./ensure-invariants-3NOBCYWS.js");
1826
1795
  const invariantResults = await ensureInstallInvariants(process.cwd(), paths.home);
1827
1796
  if (invariantResults.length > 0) {
1828
1797
  process.stdout.write(`\u2713 invariants: ${invariantResults.join(", ")}
@@ -1839,7 +1808,7 @@ async function restartBridge(paths) {
1839
1808
  }
1840
1809
  if (mode === "supervised-daemon" || mode === "supervised") {
1841
1810
  process.stdout.write("\n\u267B\uFE0F Restarting bridge via watchdog...\n");
1842
- const wdLock = join11(paths.home, "watchdog.lock");
1811
+ const wdLock = join10(paths.home, "watchdog.lock");
1843
1812
  const wdPid = readJsonField2(wdLock, "pid");
1844
1813
  if (wdPid && wdPid > 0) {
1845
1814
  try {
@@ -1871,7 +1840,7 @@ function printDryRun(paths, repoRoot, opts) {
1871
1840
  const { spawnSync: spawnSync4 } = __require("node:child_process");
1872
1841
  const commit = spawnSync4("git", ["rev-parse", "--short", "HEAD"], { cwd: repoRoot, encoding: "utf-8" }).stdout?.trim() ?? "?";
1873
1842
  const branch = spawnSync4("git", ["rev-parse", "--abbrev-ref", "HEAD"], { cwd: repoRoot, encoding: "utf-8" }).stdout?.trim() ?? "?";
1874
- const wdLock = join11(paths.home, "watchdog.lock");
1843
+ const wdLock = join10(paths.home, "watchdog.lock");
1875
1844
  const wdPid = readJsonField2(wdLock, "pid");
1876
1845
  process.stdout.write(`
1877
1846
  Dry run \u2014 no changes will be made.
@@ -1887,7 +1856,7 @@ Dry run \u2014 no changes will be made.
1887
1856
  }
1888
1857
  async function checkForUpdates(home, opts) {
1889
1858
  const repoRoot = opts.repoRoot ?? process.cwd();
1890
- if (!existsSync9(join11(repoRoot, ".git"))) {
1859
+ if (!existsSync8(join10(repoRoot, ".git"))) {
1891
1860
  process.stderr.write("Not a git repository. --check requires a git checkout.\n");
1892
1861
  return 2;
1893
1862
  }
@@ -1895,7 +1864,7 @@ async function checkForUpdates(home, opts) {
1895
1864
  spawnSync4("git", ["fetch", "--quiet"], { cwd: repoRoot });
1896
1865
  const result = spawnSync4("git", ["rev-list", "--count", "HEAD..origin/dev"], { cwd: repoRoot, encoding: "utf-8" });
1897
1866
  const ahead = parseInt(result.stdout?.trim() ?? "0", 10);
1898
- const manifest = await readManifest(join11(home, "manifest.json"));
1867
+ const manifest = await readManifest(join10(home, "manifest.json"));
1899
1868
  process.stdout.write(`Current: ${manifest?.version ?? "unknown"} (deployed ${manifest?.activatedAt ?? "never"})
1900
1869
  `);
1901
1870
  if (ahead === 0) {
@@ -1909,6 +1878,49 @@ async function checkForUpdates(home, opts) {
1909
1878
  `);
1910
1879
  return 2;
1911
1880
  }
1881
+ async function syncAssets(home, stagedPath) {
1882
+ const abmindBundle = join10(home, "app", "bundle", "node_modules", "abmind");
1883
+ const abmindHome = process.env["ABMIND_HOME"] ?? join10(process.env["HOME"] ?? "", ".abmind");
1884
+ const coreDir = join10(abmindHome, "memory", "core");
1885
+ mkdirSync2(coreDir, { recursive: true });
1886
+ const mtSrc = join10(abmindBundle, "dist", "core", "memory-tools.md");
1887
+ if (existsSync8(mtSrc)) copyFileSync(mtSrc, join10(coreDir, "memory-tools.md"));
1888
+ for (const file of ["core_facts.md", "agent_notes.md"]) {
1889
+ const src = join10(abmindBundle, "templates", "core", file);
1890
+ if (!existsSync8(src)) continue;
1891
+ const live = join10(coreDir, file);
1892
+ if (!existsSync8(live)) {
1893
+ copyFileSync(src, live);
1894
+ } else {
1895
+ copyFileSync(src, join10(coreDir, file.replace(".md", ".template.md")));
1896
+ }
1897
+ }
1898
+ const sleepSrc = join10(abmindBundle, "prompts", "sleep");
1899
+ if (existsSync8(sleepSrc)) {
1900
+ const sleepDst = join10(abmindHome, "prompts", "sleep");
1901
+ mkdirSync2(sleepDst, { recursive: true });
1902
+ for (const f of readdirSync3(sleepSrc)) {
1903
+ copyFileSync(join10(sleepSrc, f), join10(sleepDst, f));
1904
+ }
1905
+ }
1906
+ const skillsSrc = join10(home, "app", "core", "skills");
1907
+ if (existsSync8(skillsSrc)) {
1908
+ const skillsDst = join10(home, "skills", "core");
1909
+ mkdirSync2(skillsDst, { recursive: true });
1910
+ cpSync2(skillsSrc, skillsDst, { recursive: true });
1911
+ }
1912
+ const agentSrc = join10(home, "app", "bundle", "agents", "default.md");
1913
+ if (existsSync8(agentSrc)) {
1914
+ const agentDst = join10(home, "agents");
1915
+ mkdirSync2(agentDst, { recursive: true });
1916
+ const live = join10(agentDst, "default.md");
1917
+ if (!existsSync8(live)) {
1918
+ copyFileSync(agentSrc, live);
1919
+ } else {
1920
+ copyFileSync(agentSrc, join10(agentDst, "default.template.md"));
1921
+ }
1922
+ }
1923
+ }
1912
1924
 
1913
1925
  // src/cli/abtars.ts
1914
1926
  process.umask(63);
@@ -1958,6 +1970,20 @@ Usage:
1958
1970
  );
1959
1971
  }
1960
1972
  async function main(argv) {
1973
+ if (argv[0] === "--version" || argv[0] === "-v" || argv[0] === "version") {
1974
+ const { readFileSync: readFileSync7 } = await import("node:fs");
1975
+ const { join: join11, dirname: dirname3 } = await import("node:path");
1976
+ const { fileURLToPath: fileURLToPath2 } = await import("node:url");
1977
+ const here = dirname3(fileURLToPath2(import.meta.url));
1978
+ try {
1979
+ const pkg = JSON.parse(readFileSync7(join11(here, "..", "package.json"), "utf-8"));
1980
+ process.stdout.write(`${pkg.version}
1981
+ `);
1982
+ } catch {
1983
+ process.stdout.write("unknown\n");
1984
+ }
1985
+ return 0;
1986
+ }
1961
1987
  const { command, flags } = parseArgs(argv);
1962
1988
  try {
1963
1989
  switch (command) {
@@ -1977,7 +2003,7 @@ async function main(argv) {
1977
2003
  allowAbmindMismatch: flags.get("allow-abmind-mismatch") === true
1978
2004
  });
1979
2005
  case "rollback":
1980
- return await rollback();
2006
+ return await rollback({ to: typeof flags.get("to") === "string" ? Number(flags.get("to")) : void 0 });
1981
2007
  case "backup":
1982
2008
  return await backup({
1983
2009
  config: flags.get("config") === true,
@@ -1986,7 +2012,7 @@ async function main(argv) {
1986
2012
  pruneDays: typeof flags.get("prune-days") === "string" ? Number(flags.get("prune-days")) : void 0
1987
2013
  });
1988
2014
  case "restore": {
1989
- const { restore } = await import("./restore-MFSW3EBL.js");
2015
+ const { restore } = await import("./restore-Z6MF54HS.js");
1990
2016
  return await restore(argv[1] ?? "", {
1991
2017
  config: flags.get("config") === true,
1992
2018
  passphrase: typeof flags.get("passphrase") === "string" ? flags.get("passphrase") : void 0
@@ -2013,15 +2039,15 @@ async function main(argv) {
2013
2039
  case "stop":
2014
2040
  return await stop({ force: flags.get("force") === true });
2015
2041
  case "start": {
2016
- const { start: startCmd } = await import("./start-CBVKNEAT.js");
2042
+ const { start: startCmd } = await import("./start-4DNURGIY.js");
2017
2043
  return await startCmd();
2018
2044
  }
2019
2045
  case "daemon": {
2020
- const { daemon: daemonCmd } = await import("./daemon-NPKYZ3CJ.js");
2046
+ const { daemon: daemonCmd } = await import("./daemon-WOQXCKNL.js");
2021
2047
  return await daemonCmd(argv.slice(1));
2022
2048
  }
2023
2049
  case "deps": {
2024
- const { deps: depsCmd } = await import("./deps-HN6CEXA4.js");
2050
+ const { deps: depsCmd } = await import("./deps-65V7XXG4.js");
2025
2051
  return await depsCmd(argv.slice(1));
2026
2052
  }
2027
2053
  case "logs": {