abtars 0.1.0-alpha.2 → 0.1.0-alpha.21

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 (386) hide show
  1. package/CHANGELOG.md +64 -0
  2. package/bundle/_registry.generated-KQODGKTQ.js +36 -0
  3. package/bundle/{_registry.generated-M4WY2MMI.js.map → _registry.generated-KQODGKTQ.js.map} +1 -1
  4. package/bundle/abtars-browser.js +8 -7
  5. package/bundle/abtars-browser.js.map +1 -1
  6. package/bundle/abtars-cli.js +646 -73
  7. package/bundle/abtars-cli.js.map +4 -4
  8. package/bundle/abtars-restart.js +7 -6
  9. package/bundle/abtars-rss.js +2 -1
  10. package/bundle/abtars-rss.js.map +1 -1
  11. package/bundle/abtars-task.js +9 -8
  12. package/bundle/abtars-task.js.map +1 -1
  13. package/bundle/abtars.js +103 -96
  14. package/bundle/abtars.js.map +2 -2
  15. package/bundle/{agent-api-rate-limit-OQNFMXTZ.js → agent-api-rate-limit-7R5TX2F2.js} +7 -6
  16. package/bundle/{agent-api-rate-limit-OQNFMXTZ.js.map → agent-api-rate-limit-7R5TX2F2.js.map} +1 -1
  17. package/bundle/agent-registry-5M77ZOMV.js +19 -0
  18. package/bundle/agent-registry-VJMNIQ5W.js +19 -0
  19. package/bundle/{anthropic-adapter-2APTH3LA.js → anthropic-adapter-IBY3NPXW.js} +4 -3
  20. package/bundle/{anthropic-adapter-2APTH3LA.js.map → anthropic-adapter-IBY3NPXW.js.map} +1 -1
  21. package/bundle/{bridge-lock-transport-4AC2G5G6.js → bridge-lock-transport-HO545SBK.js} +9 -8
  22. package/bundle/browse-delivery-64GQIUHG.js +18 -0
  23. package/bundle/browser-EXR5OQGK.js +19 -0
  24. package/bundle/capability-HIE7UGFU.js +18 -0
  25. package/bundle/{chunk-BUUVFUPO.js → chunk-2BY6I4P5.js} +5 -4
  26. package/bundle/{chunk-BUUVFUPO.js.map → chunk-2BY6I4P5.js.map} +1 -1
  27. package/bundle/{chunk-Y6XAEX2Q.js → chunk-2F6XKG7Y.js} +15 -9
  28. package/bundle/chunk-2F6XKG7Y.js.map +7 -0
  29. package/bundle/{chunk-V76TVMCM.js → chunk-3MO2MDXJ.js} +5 -4
  30. package/bundle/{chunk-V76TVMCM.js.map → chunk-3MO2MDXJ.js.map} +1 -1
  31. package/bundle/{chunk-6UCRKRWR.js → chunk-6XX4OAAM.js} +22 -21
  32. package/bundle/chunk-6XX4OAAM.js.map +7 -0
  33. package/bundle/{chunk-XREWVCUO.js → chunk-7CHLS36W.js} +16 -148
  34. package/bundle/chunk-7CHLS36W.js.map +7 -0
  35. package/bundle/{chunk-NWDBD4PA.js → chunk-7K2YZTLD.js} +3 -2
  36. package/bundle/{chunk-JCJS4ZIB.js → chunk-AQVOAQQI.js} +5 -4
  37. package/bundle/{chunk-JCJS4ZIB.js.map → chunk-AQVOAQQI.js.map} +1 -1
  38. package/bundle/chunk-AUQD2PKM.js +136 -0
  39. package/bundle/chunk-AUQD2PKM.js.map +7 -0
  40. package/bundle/{chunk-YOCTDKKL.js → chunk-BYDUMHXT.js} +4 -3
  41. package/bundle/{chunk-YOCTDKKL.js.map → chunk-BYDUMHXT.js.map} +1 -1
  42. package/bundle/{chunk-RVE2N7FA.js → chunk-CELR236Q.js} +5 -4
  43. package/bundle/{chunk-RVE2N7FA.js.map → chunk-CELR236Q.js.map} +1 -1
  44. package/bundle/{chunk-2XU2X4OI.js → chunk-CUQA2AJT.js} +3 -2
  45. package/bundle/{chunk-2XU2X4OI.js.map → chunk-CUQA2AJT.js.map} +1 -1
  46. package/bundle/chunk-DMPR5MYT.js +183 -0
  47. package/bundle/chunk-DMPR5MYT.js.map +7 -0
  48. package/bundle/{chunk-BHMZ4RCC.js → chunk-DY3R7LDW.js} +55 -54
  49. package/bundle/{chunk-BHMZ4RCC.js.map → chunk-DY3R7LDW.js.map} +1 -1
  50. package/bundle/{chunk-AR6GO6YC.js → chunk-ELRAH7VL.js} +5 -4
  51. package/bundle/{chunk-AR6GO6YC.js.map → chunk-ELRAH7VL.js.map} +1 -1
  52. package/bundle/{chunk-FMWKEPM7.js → chunk-EX2SRTUE.js} +5 -4
  53. package/bundle/{chunk-FMWKEPM7.js.map → chunk-EX2SRTUE.js.map} +1 -1
  54. package/bundle/{chunk-JW6RU47G.js → chunk-FVQGP5YO.js} +8 -7
  55. package/bundle/{chunk-JW6RU47G.js.map → chunk-FVQGP5YO.js.map} +1 -1
  56. package/bundle/{chunk-GRNENTPA.js → chunk-G6IXMYIO.js} +4 -3
  57. package/bundle/{chunk-GRNENTPA.js.map → chunk-G6IXMYIO.js.map} +1 -1
  58. package/bundle/{chunk-6NR3OHEW.js → chunk-H2RZ4NEJ.js} +6 -5
  59. package/bundle/{chunk-6NR3OHEW.js.map → chunk-H2RZ4NEJ.js.map} +1 -1
  60. package/bundle/chunk-HVKJN3AG.js +189 -0
  61. package/bundle/chunk-HVKJN3AG.js.map +7 -0
  62. package/bundle/{chunk-265TPOPC.js → chunk-HXJRZWKA.js} +3 -2
  63. package/bundle/{chunk-265TPOPC.js.map → chunk-HXJRZWKA.js.map} +1 -1
  64. package/bundle/chunk-IU3RI5E4.js +645 -0
  65. package/bundle/chunk-IU3RI5E4.js.map +7 -0
  66. package/bundle/{chunk-GST5T3WZ.js → chunk-J5YIMCLT.js} +6 -5
  67. package/bundle/{chunk-GST5T3WZ.js.map → chunk-J5YIMCLT.js.map} +1 -1
  68. package/bundle/chunk-JAJ3DUQ2.js +30 -0
  69. package/bundle/{chunk-OP7BTAWY.js.map → chunk-JAJ3DUQ2.js.map} +1 -1
  70. package/bundle/chunk-JHF25OOG.js +645 -0
  71. package/bundle/chunk-JHF25OOG.js.map +7 -0
  72. package/bundle/{chunk-MPX525QO.js → chunk-JRG4EFMP.js} +5 -4
  73. package/bundle/{chunk-MPX525QO.js.map → chunk-JRG4EFMP.js.map} +1 -1
  74. package/bundle/{chunk-VVEDVGCR.js → chunk-JU3UBWLN.js} +17 -16
  75. package/bundle/{chunk-VVEDVGCR.js.map → chunk-JU3UBWLN.js.map} +1 -1
  76. package/bundle/{chunk-QBGBT5QS.js → chunk-JX3ZZU3O.js} +5 -4
  77. package/bundle/{chunk-QBGBT5QS.js.map → chunk-JX3ZZU3O.js.map} +1 -1
  78. package/bundle/{chunk-6SETMHNN.js → chunk-K7P74UNQ.js} +8 -7
  79. package/bundle/{chunk-6SETMHNN.js.map → chunk-K7P74UNQ.js.map} +1 -1
  80. package/bundle/{chunk-AZJIODTQ.js → chunk-KED3G7HS.js} +6 -5
  81. package/bundle/{chunk-AZJIODTQ.js.map → chunk-KED3G7HS.js.map} +1 -1
  82. package/bundle/chunk-KI2ROWAH.js +3707 -0
  83. package/bundle/chunk-KI2ROWAH.js.map +7 -0
  84. package/bundle/{chunk-UHRP745J.js → chunk-L7YHV5DL.js} +6 -5
  85. package/bundle/{chunk-UHRP745J.js.map → chunk-L7YHV5DL.js.map} +1 -1
  86. package/bundle/{chunk-BSSBCSCL.js → chunk-LD5BMLHG.js} +11 -10
  87. package/bundle/{chunk-BSSBCSCL.js.map → chunk-LD5BMLHG.js.map} +1 -1
  88. package/bundle/{chunk-2UPU3OW6.js → chunk-LYEAHE5V.js} +5 -4
  89. package/bundle/{chunk-2UPU3OW6.js.map → chunk-LYEAHE5V.js.map} +1 -1
  90. package/bundle/{chunk-3B7BBE4F.js → chunk-MCGEXAG5.js} +8 -7
  91. package/bundle/{chunk-3B7BBE4F.js.map → chunk-MCGEXAG5.js.map} +1 -1
  92. package/bundle/{chunk-X76UX47U.js → chunk-MJ6PHMOK.js} +4 -3
  93. package/bundle/{chunk-X76UX47U.js.map → chunk-MJ6PHMOK.js.map} +1 -1
  94. package/bundle/{chunk-LSPKJQCI.js → chunk-MV6CJFWR.js} +3 -2
  95. package/bundle/{chunk-LSPKJQCI.js.map → chunk-MV6CJFWR.js.map} +1 -1
  96. package/bundle/chunk-MZWMYN4O.js +17 -0
  97. package/bundle/{chunk-M6VBAPNT.js.map → chunk-MZWMYN4O.js.map} +1 -1
  98. package/bundle/{chunk-HX7Y7EYP.js → chunk-NIRYBWUW.js} +4 -3
  99. package/bundle/{chunk-HX7Y7EYP.js.map → chunk-NIRYBWUW.js.map} +1 -1
  100. package/bundle/{chunk-3E545J66.js → chunk-OW64RUE5.js} +3 -2
  101. package/bundle/{chunk-3E545J66.js.map → chunk-OW64RUE5.js.map} +1 -1
  102. package/bundle/chunk-P56PLAIC.js +126 -0
  103. package/bundle/chunk-P56PLAIC.js.map +7 -0
  104. package/bundle/{chunk-TZHIDLDS.js → chunk-P6PN34XD.js} +5 -4
  105. package/bundle/{chunk-TZHIDLDS.js.map → chunk-P6PN34XD.js.map} +1 -1
  106. package/bundle/{chunk-2UENBO6M.js → chunk-PF5UQ64X.js} +9 -8
  107. package/bundle/{chunk-2UENBO6M.js.map → chunk-PF5UQ64X.js.map} +1 -1
  108. package/bundle/{chunk-6CPN4IGS.js → chunk-PQ62LZNA.js} +9 -8
  109. package/bundle/{chunk-6CPN4IGS.js.map → chunk-PQ62LZNA.js.map} +1 -1
  110. package/bundle/{chunk-UCQ2WC3B.js → chunk-PQW5QBPY.js} +15 -8
  111. package/bundle/chunk-PQW5QBPY.js.map +7 -0
  112. package/bundle/{chunk-D2DCBO6M.js → chunk-R36WIOYX.js} +3 -2
  113. package/bundle/{chunk-D2DCBO6M.js.map → chunk-R36WIOYX.js.map} +1 -1
  114. package/bundle/chunk-RB3X66KM.js +386 -0
  115. package/bundle/chunk-RB3X66KM.js.map +7 -0
  116. package/bundle/{chunk-GUQVJC3U.js → chunk-RE3F3CFW.js} +7 -6
  117. package/bundle/{chunk-GUQVJC3U.js.map → chunk-RE3F3CFW.js.map} +1 -1
  118. package/bundle/chunk-RWUINZUQ.js +19 -0
  119. package/bundle/chunk-RWUINZUQ.js.map +7 -0
  120. package/bundle/{chunk-NT3OBORC.js → chunk-S54DBUZ4.js} +10 -9
  121. package/bundle/{chunk-NT3OBORC.js.map → chunk-S54DBUZ4.js.map} +1 -1
  122. package/bundle/{chunk-CWOHNFUV.js → chunk-SY67HM2Y.js} +3 -2
  123. package/bundle/{chunk-CWOHNFUV.js.map → chunk-SY67HM2Y.js.map} +1 -1
  124. package/bundle/{chunk-BQ2L4GMG.js → chunk-TBLYGCPQ.js} +4 -3
  125. package/bundle/{chunk-BQ2L4GMG.js.map → chunk-TBLYGCPQ.js.map} +1 -1
  126. package/bundle/chunk-TCBMBX3Z.js +183 -0
  127. package/bundle/chunk-TCBMBX3Z.js.map +7 -0
  128. package/bundle/chunk-TXRWQIQQ.js +3707 -0
  129. package/bundle/chunk-TXRWQIQQ.js.map +7 -0
  130. package/bundle/chunk-U34CSHFS.js +645 -0
  131. package/bundle/chunk-U34CSHFS.js.map +7 -0
  132. package/bundle/{chunk-CEVRHKJY.js → chunk-UDZIZB5F.js} +6 -5
  133. package/bundle/{chunk-CEVRHKJY.js.map → chunk-UDZIZB5F.js.map} +1 -1
  134. package/bundle/{chunk-W6FAL35D.js → chunk-VA5WKN3Z.js} +7 -6
  135. package/bundle/{chunk-W6FAL35D.js.map → chunk-VA5WKN3Z.js.map} +1 -1
  136. package/bundle/{chunk-X6TERNVJ.js → chunk-WX7GHGFX.js} +10 -9
  137. package/bundle/{chunk-X6TERNVJ.js.map → chunk-WX7GHGFX.js.map} +1 -1
  138. package/bundle/{chunk-PNEDC45Y.js → chunk-XETTJVEU.js} +4 -3
  139. package/bundle/{chunk-PNEDC45Y.js.map → chunk-XETTJVEU.js.map} +1 -1
  140. package/bundle/{chunk-PLCY3GFH.js → chunk-XLLSPBBT.js} +5 -4
  141. package/bundle/{chunk-PLCY3GFH.js.map → chunk-XLLSPBBT.js.map} +1 -1
  142. package/bundle/{chunk-ZXPXCDA6.js → chunk-XOCP5BMO.js} +6 -5
  143. package/bundle/{chunk-ZXPXCDA6.js.map → chunk-XOCP5BMO.js.map} +1 -1
  144. package/bundle/chunk-ZEY6YZAB.js +138 -0
  145. package/bundle/chunk-ZEY6YZAB.js.map +7 -0
  146. package/bundle/{chunk-MW6WDLU7.js → chunk-ZZR3JZHR.js} +10 -9
  147. package/bundle/{chunk-MW6WDLU7.js.map → chunk-ZZR3JZHR.js.map} +1 -1
  148. package/bundle/commands-AIL4XOIZ.js +33 -0
  149. package/bundle/commands-K77NVSXZ.js +32 -0
  150. package/bundle/commands-V6RSVC4Y.js +32 -0
  151. package/bundle/completion-buffer-S3LXDZG2.js +14 -0
  152. package/bundle/config-C6VHRJQ7.js +20 -0
  153. package/bundle/{config-show-ERTATR6E.js → config-show-ZTXX27FW.js} +4 -3
  154. package/bundle/{config-show-ERTATR6E.js.map → config-show-ZTXX27FW.js.map} +1 -1
  155. package/bundle/{context-HCEGZNDC.js → context-OCS7HLJP.js} +5 -4
  156. package/bundle/{context-HCEGZNDC.js.map → context-OCS7HLJP.js.map} +1 -1
  157. package/bundle/daemon-NPKYZ3CJ.js +292 -0
  158. package/bundle/daemon-NPKYZ3CJ.js.map +7 -0
  159. package/bundle/delegation-tools-PF7RD2RW.js +28 -0
  160. package/bundle/{deploy-lib-import-32ZFKHWP.js → deploy-lib-import-ODLDL2DB.js} +5 -4
  161. package/bundle/digital-signature-PNY4TR2W.js +14 -0
  162. package/bundle/{direct-api-transport-YR7SXXNN.js → direct-api-transport-EADHM67Z.js} +21 -20
  163. package/bundle/{direct-api-transport-YR7SXXNN.js.map → direct-api-transport-EADHM67Z.js.map} +1 -1
  164. package/bundle/direct-api-transport-SLJ2Z6NX.js +861 -0
  165. package/bundle/direct-api-transport-SLJ2Z6NX.js.map +7 -0
  166. package/bundle/{discord-adapter-YYWVMPPU.js → discord-adapter-FBJOJSTW.js} +25 -24
  167. package/bundle/{discord-adapter-YYWVMPPU.js.map → discord-adapter-FBJOJSTW.js.map} +1 -1
  168. package/bundle/discord-adapter-IJISVHUE.js +585 -0
  169. package/bundle/discord-adapter-IJISVHUE.js.map +7 -0
  170. package/bundle/discord-adapter-UYOCKRDF.js +586 -0
  171. package/bundle/discord-adapter-UYOCKRDF.js.map +7 -0
  172. package/bundle/{dist-MTMKARCP.js → dist-J3T4XVKX.js} +4 -3
  173. package/bundle/{dist-MTMKARCP.js.map → dist-J3T4XVKX.js.map} +1 -1
  174. package/bundle/{dns-wakeup-27M7D2MR.js → dns-wakeup-RYOCQ6GR.js} +6 -5
  175. package/bundle/{dns-wakeup-27M7D2MR.js.map → dns-wakeup-RYOCQ6GR.js.map} +1 -1
  176. package/bundle/{doctor-QNUSDY73.js → doctor-R54GZPKL.js} +10 -9
  177. package/bundle/{doctor-QNUSDY73.js.map → doctor-R54GZPKL.js.map} +1 -1
  178. package/bundle/{ensure-invariants-NMXNS476.js → ensure-invariants-K2ZUZ6NR.js} +7 -6
  179. package/bundle/{ensure-invariants-NMXNS476.js.map → ensure-invariants-K2ZUZ6NR.js.map} +1 -1
  180. package/bundle/ensure-invariants-KUXIW73S.js +50 -0
  181. package/bundle/ensure-invariants-KUXIW73S.js.map +7 -0
  182. package/bundle/env-schema-DGD6QWPA.js +20 -0
  183. package/bundle/{esm-DDP6NCZG.js → esm-PFOJARXA.js} +5 -4
  184. package/bundle/{esm-DDP6NCZG.js.map → esm-PFOJARXA.js.map} +1 -1
  185. package/bundle/{fallback-policy-L4QV2PEJ.js → fallback-policy-SR6ED5I3.js} +4 -3
  186. package/bundle/{fallback-policy-L4QV2PEJ.js.map → fallback-policy-SR6ED5I3.js.map} +1 -1
  187. package/bundle/{health-check-SPA7NT6N.js → health-check-RJ2SUJYL.js} +4 -3
  188. package/bundle/{health-check-SPA7NT6N.js.map → health-check-RJ2SUJYL.js.map} +1 -1
  189. package/bundle/hook-system-POI5VRIX.js +18 -0
  190. package/bundle/hotskills-6ECHLXTJ.js +13 -0
  191. package/bundle/install-24XR5FO5.js +13 -0
  192. package/bundle/install-AJ7VW76P.js +13 -0
  193. package/bundle/{install-log-IAPHYKD4.js → install-log-Q6RUHKWC.js} +4 -3
  194. package/bundle/{install-log-IAPHYKD4.js.map → install-log-Q6RUHKWC.js.map} +1 -1
  195. package/bundle/{install-manifest-SPQRUNXL.js → install-manifest-MCJCAYSR.js} +9 -7
  196. package/bundle/install-manifest-MCJCAYSR.js.map +7 -0
  197. package/bundle/install-manifest-ZETY4AFS.js +104 -0
  198. package/bundle/install-manifest-ZETY4AFS.js.map +7 -0
  199. package/bundle/{install-validate-PVLZXYLQ.js → install-validate-H74LUCE2.js} +4 -3
  200. package/bundle/{install-validate-PVLZXYLQ.js.map → install-validate-H74LUCE2.js.map} +1 -1
  201. package/bundle/{irc-adapter-OI5UZSQF.js → irc-adapter-RKRUSZXB.js} +7 -6
  202. package/bundle/{irc-adapter-OI5UZSQF.js.map → irc-adapter-RKRUSZXB.js.map} +1 -1
  203. package/bundle/{irc-config-55YO6EGB.js → irc-config-6VY67UPQ.js} +8 -7
  204. package/bundle/{irc-config-55YO6EGB.js.map → irc-config-6VY67UPQ.js.map} +1 -1
  205. package/bundle/{logs-ZNYXX5PA.js → logs-EK4HYRKR.js} +4 -3
  206. package/bundle/{logs-ZNYXX5PA.js.map → logs-EK4HYRKR.js.map} +1 -1
  207. package/bundle/{media-utils-XNNDTYFI.js → media-utils-QBY5WBF3.js} +8 -7
  208. package/bundle/{media-utils-XNNDTYFI.js.map → media-utils-QBY5WBF3.js.map} +1 -1
  209. package/bundle/message-pipeline-ANSMPK5O.js +34 -0
  210. package/bundle/message-pipeline-HXZMRGXZ.js +34 -0
  211. package/bundle/message-pipeline-XUUTGPFH.js +35 -0
  212. package/bundle/meta.json +1828 -1650
  213. package/bundle/model-health-registry-7ECZFCW4.js +12 -0
  214. package/bundle/model-health-registry-LDC76RPP.js +12 -0
  215. package/bundle/notification-OJ4YE4VG.js +14 -0
  216. package/bundle/{openrouter-credits-EDY7ETAU.js → openrouter-credits-L45SYKT3.js} +7 -6
  217. package/bundle/{openrouter-credits-EDY7ETAU.js.map → openrouter-credits-L45SYKT3.js.map} +1 -1
  218. package/bundle/{passwd-RRFV4CC5.js → passwd-QSHZJ2CG.js} +4 -3
  219. package/bundle/{passwd-RRFV4CC5.js.map → passwd-QSHZJ2CG.js.map} +1 -1
  220. package/bundle/paths-ZJYIDND2.js +18 -0
  221. package/bundle/{peer-client-52XYMNI7.js → peer-client-T44VI7NB.js} +13 -12
  222. package/bundle/{peer-client-52XYMNI7.js.map → peer-client-T44VI7NB.js.map} +1 -1
  223. package/bundle/peer-config-D5A4454H.js +17 -0
  224. package/bundle/{peer-sessions-EAXTNQ36.js → peer-sessions-MY2YVXHC.js} +4 -3
  225. package/bundle/{peer-sessions-EAXTNQ36.js.map → peer-sessions-MY2YVXHC.js.map} +1 -1
  226. package/bundle/{pending-callback-RIMQZ7FJ.js → pending-callback-6KLBSHLX.js} +4 -3
  227. package/bundle/{pending-callback-RIMQZ7FJ.js.map → pending-callback-6KLBSHLX.js.map} +1 -1
  228. package/bundle/phase-transport-43NP5XBK.js +23 -0
  229. package/bundle/phase-transport-GNUZI6EW.js +23 -0
  230. package/bundle/phase-transport-Q7K6V3VZ.js +23 -0
  231. package/bundle/phase-transport-SLJXIAY5.js +23 -0
  232. package/bundle/{responses-adapter-AAQTY3K4.js → responses-adapter-DAV2JUL7.js} +4 -3
  233. package/bundle/{responses-adapter-AAQTY3K4.js.map → responses-adapter-DAV2JUL7.js.map} +1 -1
  234. package/bundle/{restore-ZE3SEPSS.js → restore-ROJF22R2.js} +5 -4
  235. package/bundle/{restore-ZE3SEPSS.js.map → restore-ROJF22R2.js.map} +1 -1
  236. package/bundle/{self-healer-utils-DMUUXC47.js → self-healer-utils-7NFH22VJ.js} +7 -6
  237. package/bundle/{self-healer-utils-DMUUXC47.js.map → self-healer-utils-7NFH22VJ.js.map} +1 -1
  238. package/bundle/skill-stats-IPVKMWN3.js +23 -0
  239. package/bundle/sleep-4NVWZHVN.js +20 -0
  240. package/bundle/soul-bundle-7EYTEKFE.js +15 -0
  241. package/bundle/soul-loader-7FN7WDHM.js +18 -0
  242. package/bundle/soul-loader-K237NP4T.js +17 -0
  243. package/bundle/soul-loader-K237NP4T.js.map +7 -0
  244. package/bundle/soul-loader-UVJ6HZM3.js +17 -0
  245. package/bundle/soul-loader-UVJ6HZM3.js.map +7 -0
  246. package/bundle/src-Z3WR7SRT.js +9 -0
  247. package/bundle/src-Z3WR7SRT.js.map +7 -0
  248. package/bundle/{sse-parser-anthropic-P7CE2MH2.js → sse-parser-anthropic-H42TTLBD.js} +7 -6
  249. package/bundle/{sse-parser-anthropic-P7CE2MH2.js.map → sse-parser-anthropic-H42TTLBD.js.map} +1 -1
  250. package/bundle/{sse-parser-responses-EQQA5FWN.js → sse-parser-responses-WG2LY2ML.js} +7 -6
  251. package/bundle/{sse-parser-responses-EQQA5FWN.js.map → sse-parser-responses-WG2LY2ML.js.map} +1 -1
  252. package/bundle/{ssrf-guard-FZCBYIVW.js → ssrf-guard-E2KBBC5E.js} +7 -6
  253. package/bundle/{ssrf-guard-FZCBYIVW.js.map → ssrf-guard-E2KBBC5E.js.map} +1 -1
  254. package/bundle/{start-FH3GRMJ4.js → start-4IWBKLWO.js} +4 -3
  255. package/bundle/{start-FH3GRMJ4.js.map → start-4IWBKLWO.js.map} +1 -1
  256. package/bundle/{stream-single-WSG4D53C.js → stream-single-RFJNUTL6.js} +4 -3
  257. package/bundle/{stream-single-WSG4D53C.js.map → stream-single-RFJNUTL6.js.map} +1 -1
  258. package/bundle/stt-CF3CPFDC.js +15 -0
  259. package/bundle/stt-CF3CPFDC.js.map +7 -0
  260. package/bundle/subagent-runtime-P7GCFBM3.js +13 -0
  261. package/bundle/subagent-runtime-P7GCFBM3.js.map +7 -0
  262. package/bundle/subagent-runtime-USNPO4WF.js +13 -0
  263. package/bundle/subagent-runtime-USNPO4WF.js.map +7 -0
  264. package/bundle/subagent-runtime-XS2ZXYOZ.js +13 -0
  265. package/bundle/subagent-runtime-XS2ZXYOZ.js.map +7 -0
  266. package/bundle/{system-message-T5R3EYYN.js → system-message-TALP6GP2.js} +6 -5
  267. package/bundle/{system-message-T5R3EYYN.js.map → system-message-TALP6GP2.js.map} +1 -1
  268. package/bundle/{system-status-KQ6KHFJ6.js → system-status-2CR5OUDY.js} +10 -9
  269. package/bundle/{system-status-KQ6KHFJ6.js.map → system-status-2CR5OUDY.js.map} +1 -1
  270. package/bundle/task-store-KIBFZL5A.js +23 -0
  271. package/bundle/task-store-KIBFZL5A.js.map +7 -0
  272. package/bundle/{telegram-adapter-2V3XUMT5.js → telegram-adapter-ISQRW7PN.js} +34 -33
  273. package/bundle/{telegram-adapter-2V3XUMT5.js.map → telegram-adapter-ISQRW7PN.js.map} +1 -1
  274. package/bundle/telegram-adapter-QCD7AG5D.js +1062 -0
  275. package/bundle/telegram-adapter-QCD7AG5D.js.map +7 -0
  276. package/bundle/telegram-adapter-Y3PVA25S.js +1061 -0
  277. package/bundle/telegram-adapter-Y3PVA25S.js.map +7 -0
  278. package/bundle/telegram-adapter-YAXSK2RT.js +1062 -0
  279. package/bundle/telegram-adapter-YAXSK2RT.js.map +7 -0
  280. package/bundle/tool-registry-DFCCGZCB.js +39 -0
  281. package/bundle/tool-registry-DFCCGZCB.js.map +7 -0
  282. package/bundle/tool-sandbox-OZMXJZLQ.js +21 -0
  283. package/bundle/tool-sandbox-OZMXJZLQ.js.map +7 -0
  284. package/bundle/{transport-config-YLXU33RO.js → transport-config-ANPS2RYT.js} +11 -10
  285. package/bundle/transport-config-ANPS2RYT.js.map +7 -0
  286. package/bundle/update-check-O5MS6B3L.js +13 -0
  287. package/bundle/update-check-O5MS6B3L.js.map +7 -0
  288. package/bundle/usage-tracker-S4Z2G2K5.js +18 -0
  289. package/bundle/usage-tracker-S4Z2G2K5.js.map +7 -0
  290. package/bundle/user-registry-GTAJIW6E.js +17 -0
  291. package/bundle/user-registry-GTAJIW6E.js.map +7 -0
  292. package/config/.env +2 -0
  293. package/config/auto-fix.json +14 -0
  294. package/config/irc.json.example +30 -0
  295. package/config/models.json.example +229 -0
  296. package/config/peers.json.example +12 -0
  297. package/config/schemas/irc.schema.json +42 -0
  298. package/config/schemas/models.schema.json +17 -0
  299. package/config/schemas/peers.schema.json +35 -0
  300. package/config/schemas/transport.schema.json +35 -0
  301. package/config/schemas/users.schema.json +22 -0
  302. package/config/transport.default.json +30 -0
  303. package/config/transport.json.example +102 -0
  304. package/config/users.json.example +11 -0
  305. package/install-manifest.json +148 -0
  306. package/package.json +4 -2
  307. package/scripts/abtars-daemon.service +1 -0
  308. package/scripts/watchdog.sh +1 -1
  309. package/bundle/_registry.generated-M4WY2MMI.js +0 -35
  310. package/bundle/agent-registry-LT4JNQH6.js +0 -18
  311. package/bundle/browse-delivery-JXBY36GK.js +0 -17
  312. package/bundle/browser-ELNDVPLC.js +0 -18
  313. package/bundle/capability-CIL3G4FI.js +0 -17
  314. package/bundle/chunk-5R2ANXQ7.js +0 -510
  315. package/bundle/chunk-5R2ANXQ7.js.map +0 -7
  316. package/bundle/chunk-6UCRKRWR.js.map +0 -7
  317. package/bundle/chunk-M6VBAPNT.js +0 -16
  318. package/bundle/chunk-OP7BTAWY.js +0 -29
  319. package/bundle/chunk-UCQ2WC3B.js.map +0 -7
  320. package/bundle/chunk-XREWVCUO.js.map +0 -7
  321. package/bundle/chunk-Y6XAEX2Q.js.map +0 -7
  322. package/bundle/commands-BHVUOU3V.js +0 -31
  323. package/bundle/completion-buffer-P253ONKF.js +0 -13
  324. package/bundle/config-RGSDAPZN.js +0 -19
  325. package/bundle/delegation-tools-GYTS2D6A.js +0 -27
  326. package/bundle/digital-signature-OFCGSHWO.js +0 -13
  327. package/bundle/env-schema-2KBHBDGN.js +0 -19
  328. package/bundle/hook-system-6Q5YTR53.js +0 -17
  329. package/bundle/hotskills-K7BM4YLB.js +0 -12
  330. package/bundle/install-6HRZVKUM.js +0 -15
  331. package/bundle/install-manifest-SPQRUNXL.js.map +0 -7
  332. package/bundle/message-pipeline-LLH5SYMO.js +0 -33
  333. package/bundle/model-health-registry-35LQNVQR.js +0 -11
  334. package/bundle/notification-Y5S5MMLV.js +0 -13
  335. package/bundle/paths-G33RZWZ7.js +0 -17
  336. package/bundle/peer-config-VK6EDLN5.js +0 -16
  337. package/bundle/phase-transport-KYERDL2O.js +0 -22
  338. package/bundle/skill-stats-LLEXEXLR.js +0 -22
  339. package/bundle/sleep-OYIUOVQD.js +0 -19
  340. package/bundle/soul-loader-54WCVNLJ.js +0 -16
  341. package/bundle/src-JL4PVO23.js +0 -8
  342. package/bundle/stt-2UH3RITX.js +0 -14
  343. package/bundle/subagent-runtime-LE2ZXH3G.js +0 -12
  344. package/bundle/task-store-K7CQDEPI.js +0 -22
  345. package/bundle/tool-registry-MU3OX4UI.js +0 -38
  346. package/bundle/tool-sandbox-VYOK4ZOA.js +0 -20
  347. package/bundle/update-QCW5LXRN.js +0 -13
  348. package/bundle/update-check-27KZSAP6.js +0 -12
  349. package/bundle/usage-tracker-OVVEVMOY.js +0 -17
  350. package/bundle/user-registry-D4SD73UV.js +0 -16
  351. /package/bundle/{agent-registry-LT4JNQH6.js.map → agent-registry-5M77ZOMV.js.map} +0 -0
  352. /package/bundle/{bridge-lock-transport-4AC2G5G6.js.map → agent-registry-VJMNIQ5W.js.map} +0 -0
  353. /package/bundle/{browse-delivery-JXBY36GK.js.map → bridge-lock-transport-HO545SBK.js.map} +0 -0
  354. /package/bundle/{browser-ELNDVPLC.js.map → browse-delivery-64GQIUHG.js.map} +0 -0
  355. /package/bundle/{capability-CIL3G4FI.js.map → browser-EXR5OQGK.js.map} +0 -0
  356. /package/bundle/{chunk-NWDBD4PA.js.map → capability-HIE7UGFU.js.map} +0 -0
  357. /package/bundle/{commands-BHVUOU3V.js.map → chunk-7K2YZTLD.js.map} +0 -0
  358. /package/bundle/{completion-buffer-P253ONKF.js.map → commands-AIL4XOIZ.js.map} +0 -0
  359. /package/bundle/{config-RGSDAPZN.js.map → commands-K77NVSXZ.js.map} +0 -0
  360. /package/bundle/{delegation-tools-GYTS2D6A.js.map → commands-V6RSVC4Y.js.map} +0 -0
  361. /package/bundle/{deploy-lib-import-32ZFKHWP.js.map → completion-buffer-S3LXDZG2.js.map} +0 -0
  362. /package/bundle/{digital-signature-OFCGSHWO.js.map → config-C6VHRJQ7.js.map} +0 -0
  363. /package/bundle/{env-schema-2KBHBDGN.js.map → delegation-tools-PF7RD2RW.js.map} +0 -0
  364. /package/bundle/{hook-system-6Q5YTR53.js.map → deploy-lib-import-ODLDL2DB.js.map} +0 -0
  365. /package/bundle/{hotskills-K7BM4YLB.js.map → digital-signature-PNY4TR2W.js.map} +0 -0
  366. /package/bundle/{install-6HRZVKUM.js.map → env-schema-DGD6QWPA.js.map} +0 -0
  367. /package/bundle/{message-pipeline-LLH5SYMO.js.map → hook-system-POI5VRIX.js.map} +0 -0
  368. /package/bundle/{model-health-registry-35LQNVQR.js.map → hotskills-6ECHLXTJ.js.map} +0 -0
  369. /package/bundle/{notification-Y5S5MMLV.js.map → install-24XR5FO5.js.map} +0 -0
  370. /package/bundle/{paths-G33RZWZ7.js.map → install-AJ7VW76P.js.map} +0 -0
  371. /package/bundle/{peer-config-VK6EDLN5.js.map → message-pipeline-ANSMPK5O.js.map} +0 -0
  372. /package/bundle/{phase-transport-KYERDL2O.js.map → message-pipeline-HXZMRGXZ.js.map} +0 -0
  373. /package/bundle/{skill-stats-LLEXEXLR.js.map → message-pipeline-XUUTGPFH.js.map} +0 -0
  374. /package/bundle/{sleep-OYIUOVQD.js.map → model-health-registry-7ECZFCW4.js.map} +0 -0
  375. /package/bundle/{soul-loader-54WCVNLJ.js.map → model-health-registry-LDC76RPP.js.map} +0 -0
  376. /package/bundle/{src-JL4PVO23.js.map → notification-OJ4YE4VG.js.map} +0 -0
  377. /package/bundle/{stt-2UH3RITX.js.map → paths-ZJYIDND2.js.map} +0 -0
  378. /package/bundle/{subagent-runtime-LE2ZXH3G.js.map → peer-config-D5A4454H.js.map} +0 -0
  379. /package/bundle/{task-store-K7CQDEPI.js.map → phase-transport-43NP5XBK.js.map} +0 -0
  380. /package/bundle/{tool-registry-MU3OX4UI.js.map → phase-transport-GNUZI6EW.js.map} +0 -0
  381. /package/bundle/{tool-sandbox-VYOK4ZOA.js.map → phase-transport-Q7K6V3VZ.js.map} +0 -0
  382. /package/bundle/{transport-config-YLXU33RO.js.map → phase-transport-SLJXIAY5.js.map} +0 -0
  383. /package/bundle/{update-QCW5LXRN.js.map → skill-stats-IPVKMWN3.js.map} +0 -0
  384. /package/bundle/{update-check-27KZSAP6.js.map → sleep-4NVWZHVN.js.map} +0 -0
  385. /package/bundle/{usage-tracker-OVVEVMOY.js.map → soul-bundle-7EYTEKFE.js.map} +0 -0
  386. /package/bundle/{user-registry-D4SD73UV.js.map → soul-loader-7FN7WDHM.js.map} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "abtars",
3
- "version": "0.1.0-alpha.2",
3
+ "version": "0.1.0-alpha.21",
4
4
  "description": "Standalone agent bridging Telegram to Kiro CLI via tmux/ACP",
5
5
  "type": "module",
6
6
  "main": "bundle/abtars.js",
@@ -54,6 +54,8 @@
54
54
  "scripts/",
55
55
  "README.md",
56
56
  "LICENSE",
57
- "CHANGELOG.md"
57
+ "CHANGELOG.md",
58
+ "install-manifest.json",
59
+ "config/"
58
60
  ]
59
61
  }
@@ -12,6 +12,7 @@ ExecStart=/home/{{USER}}/.abtars/watchdog.sh
12
12
  Restart=always
13
13
  RestartSec=5
14
14
  Environment=NODE_ENV=production
15
+ Environment=PATH={{PATH}}
15
16
  Environment=ABTARS_HOME=/home/{{USER}}/.abtars
16
17
  Environment=ABMIND_HOME=/home/{{USER}}/.abmind
17
18
  Environment=SUPERVISION=systemd
@@ -222,7 +222,7 @@ BRIDGE_ARGS=("$@")
222
222
  trap 'graceful_restart' USR1
223
223
  # Exit non-zero on TERM/INT so launchd KeepAlive restarts us even if a policy
224
224
  # variant treats exit 0 as "intentional shutdown, do not restart".
225
- trap 'kill_bridge "watchdog exit"; rm -f "$WD_LOCK"; exit 1' TERM INT
225
+ trap 'kill_bridge "watchdog exit"; rm -f "$WD_LOCK"; exit 0' TERM INT
226
226
 
227
227
  # ── Startup ──
228
228
  log "Watchdog starting (stale=${STALE_SEC}s, poll=${POLL_SEC}s, circuit=${CIRCUIT_MAX}/${CIRCUIT_WINDOW}s)"
@@ -1,35 +0,0 @@
1
- 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);
2
- import {
3
- browser_exports
4
- } from "./chunk-MW6WDLU7.js";
5
- import "./chunk-6SETMHNN.js";
6
- import {
7
- hotskills_exports
8
- } from "./chunk-GUQVJC3U.js";
9
- import {
10
- sleep_exports
11
- } from "./chunk-NT3OBORC.js";
12
- import "./chunk-6CPN4IGS.js";
13
- import "./chunk-OP7BTAWY.js";
14
- import "./chunk-YOCTDKKL.js";
15
- import "./chunk-CEVRHKJY.js";
16
- import "./chunk-BQ2L4GMG.js";
17
- import "./chunk-PLCY3GFH.js";
18
- import "./chunk-M6VBAPNT.js";
19
- import "./chunk-3B7BBE4F.js";
20
- import "./chunk-FMWKEPM7.js";
21
- import "./chunk-JCJS4ZIB.js";
22
- import "./chunk-BUUVFUPO.js";
23
- import "./chunk-X76UX47U.js";
24
- import "./chunk-NWDBD4PA.js";
25
-
26
- // src/capabilities/_registry.generated.ts
27
- var capabilities = [
28
- { name: "browser", module: browser_exports },
29
- { name: "hotskills", module: hotskills_exports },
30
- { name: "sleep", module: sleep_exports }
31
- ];
32
- export {
33
- capabilities
34
- };
35
- //# sourceMappingURL=_registry.generated-M4WY2MMI.js.map
@@ -1,18 +0,0 @@
1
- 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);
2
- import {
3
- createAgentTransport,
4
- createSubagentTransport
5
- } from "./chunk-BSSBCSCL.js";
6
- import "./chunk-X6TERNVJ.js";
7
- import "./chunk-CEVRHKJY.js";
8
- import "./chunk-M6VBAPNT.js";
9
- import "./chunk-FMWKEPM7.js";
10
- import "./chunk-JCJS4ZIB.js";
11
- import "./chunk-BUUVFUPO.js";
12
- import "./chunk-X76UX47U.js";
13
- import "./chunk-NWDBD4PA.js";
14
- export {
15
- createAgentTransport,
16
- createSubagentTransport
17
- };
18
- //# sourceMappingURL=agent-registry-LT4JNQH6.js.map
@@ -1,17 +0,0 @@
1
- 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);
2
- import {
3
- checkBrowseTasks,
4
- deliverBrowseResult
5
- } from "./chunk-6SETMHNN.js";
6
- import "./chunk-6CPN4IGS.js";
7
- import "./chunk-BQ2L4GMG.js";
8
- import "./chunk-PLCY3GFH.js";
9
- import "./chunk-FMWKEPM7.js";
10
- import "./chunk-BUUVFUPO.js";
11
- import "./chunk-X76UX47U.js";
12
- import "./chunk-NWDBD4PA.js";
13
- export {
14
- checkBrowseTasks,
15
- deliverBrowseResult
16
- };
17
- //# sourceMappingURL=browse-delivery-JXBY36GK.js.map
@@ -1,18 +0,0 @@
1
- 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);
2
- import {
3
- register
4
- } from "./chunk-MW6WDLU7.js";
5
- import "./chunk-6SETMHNN.js";
6
- import "./chunk-6CPN4IGS.js";
7
- import "./chunk-BQ2L4GMG.js";
8
- import "./chunk-PLCY3GFH.js";
9
- import "./chunk-3B7BBE4F.js";
10
- import "./chunk-FMWKEPM7.js";
11
- import "./chunk-JCJS4ZIB.js";
12
- import "./chunk-BUUVFUPO.js";
13
- import "./chunk-X76UX47U.js";
14
- import "./chunk-NWDBD4PA.js";
15
- export {
16
- register
17
- };
18
- //# sourceMappingURL=browser-ELNDVPLC.js.map
@@ -1,17 +0,0 @@
1
- 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);
2
- import {
3
- createCapabilityApi,
4
- createCapabilityRegistry,
5
- discoverCapabilities
6
- } from "./chunk-6NR3OHEW.js";
7
- import "./chunk-FMWKEPM7.js";
8
- import "./chunk-JCJS4ZIB.js";
9
- import "./chunk-BUUVFUPO.js";
10
- import "./chunk-X76UX47U.js";
11
- import "./chunk-NWDBD4PA.js";
12
- export {
13
- createCapabilityApi,
14
- createCapabilityRegistry,
15
- discoverCapabilities
16
- };
17
- //# sourceMappingURL=capability-CIL3G4FI.js.map
@@ -1,510 +0,0 @@
1
- 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);
2
- import {
3
- RETENTION,
4
- acquireLock,
5
- activate,
6
- emptyManifest,
7
- hashFile,
8
- packagePaths,
9
- pruneReleases,
10
- readManifest,
11
- writeManifest
12
- } from "./chunk-265TPOPC.js";
13
- import {
14
- init_log_and_swallow,
15
- logAndSwallow
16
- } from "./chunk-FMWKEPM7.js";
17
-
18
- // src/cli/commands/update.ts
19
- init_log_and_swallow();
20
- import { hostname } from "node:os";
21
- import { join as join4 } from "node:path";
22
- import { readFileSync as readFileSync3, existsSync as existsSync4, mkdirSync } from "node:fs";
23
- import { copyFile as copyFile2, mkdir as mkdir3, chmod, readdir, readFile as readFile2, writeFile as writeFile2 } from "node:fs/promises";
24
-
25
- // src/cli/update-sources/local.ts
26
- import { spawnSync } from "node:child_process";
27
- import { existsSync } from "node:fs";
28
- import { copyFile, cp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
29
- import { join } from "node:path";
30
- var LocalBuildError = class extends Error {
31
- constructor(message, hint) {
32
- super(hint ? `${message}
33
-
34
- ${hint}` : message);
35
- this.hint = hint;
36
- this.name = "LocalBuildError";
37
- }
38
- };
39
- function runCmd(cmd, args, cwd) {
40
- const r = spawnSync(cmd, args, { cwd, encoding: "utf-8" });
41
- if (r.error) throw new LocalBuildError(`${cmd} ${args.join(" ")} failed: ${r.error.message}`);
42
- if (r.status !== 0) {
43
- throw new LocalBuildError(
44
- `${cmd} ${args.join(" ")} exited with status ${r.status}`,
45
- r.stderr?.trim() || void 0
46
- );
47
- }
48
- return r.stdout.trim();
49
- }
50
- function tryCmd(cmd, args, cwd) {
51
- const r = spawnSync(cmd, args, { cwd, encoding: "utf-8" });
52
- if (r.status !== 0) return null;
53
- return r.stdout.trim();
54
- }
55
- function checkStaleness(repoRoot, allowStale) {
56
- const commit = runCmd("git", ["rev-parse", "--short", "HEAD"], repoRoot);
57
- const branch = tryCmd("git", ["rev-parse", "--abbrev-ref", "HEAD"], repoRoot);
58
- if (allowStale) return { commit, branch: branch === "HEAD" ? null : branch };
59
- if (branch === "HEAD" || branch === null) {
60
- throw new LocalBuildError(
61
- "Working tree is in detached HEAD (no current branch).",
62
- "Cannot check for staleness. Pass --from-local to proceed with the current tree."
63
- );
64
- }
65
- runCmd("git", ["fetch", "--quiet"], repoRoot);
66
- const upstream = tryCmd("git", ["rev-parse", "--abbrev-ref", `${branch}@{upstream}`], repoRoot);
67
- if (upstream === null) {
68
- throw new LocalBuildError(
69
- `Branch '${branch}' has no upstream configured.`,
70
- "Cannot check for staleness. Push the branch, or pass --from-local to proceed with the current tree."
71
- );
72
- }
73
- const behindStr = tryCmd("git", ["rev-list", "--count", `HEAD..${upstream}`], repoRoot);
74
- const behind = behindStr === null ? null : Number(behindStr);
75
- if (behind === null || !Number.isFinite(behind)) {
76
- throw new LocalBuildError(
77
- `Could not determine how far HEAD is behind ${upstream}.`,
78
- "Pass --from-local to proceed anyway."
79
- );
80
- }
81
- if (behind > 0) {
82
- throw new LocalBuildError(
83
- `Current branch: ${branch} (${commit})
84
- ${upstream} is ahead by ${behind} commit${behind === 1 ? "" : "s"}.`,
85
- `Run 'git pull' first, or pass --from-local to build from the current tree.`
86
- );
87
- }
88
- return { commit, branch };
89
- }
90
- async function readPackageVersion(repoRoot) {
91
- const pkg = JSON.parse(await readFile(join(repoRoot, "package.json"), "utf-8"));
92
- if (typeof pkg.version !== "string") {
93
- throw new LocalBuildError("package.json has no version field.");
94
- }
95
- return pkg.version;
96
- }
97
- function makeLocalBuildSource(opts = {}) {
98
- const repoRoot = opts.repoRoot ?? process.cwd();
99
- return {
100
- name: "local",
101
- async prepare(ctx) {
102
- const { commit, branch } = checkStaleness(repoRoot, opts.allowStale === true || ctx.allowStale);
103
- const pkgVersion = await readPackageVersion(repoRoot);
104
- const version = `${pkgVersion}-${commit}`;
105
- if (opts.skipInstall !== true) {
106
- runCmd("npm", ["install", "--no-audit", "--no-fund"], repoRoot);
107
- }
108
- const useBundle = process.env["AGENTBRIDGE_BUILD_MODE"] !== "tsc";
109
- if (useBundle) {
110
- runCmd("npm", ["run", "bundle"], repoRoot);
111
- const stagedPath2 = join(ctx.releasesDir, version);
112
- await rm(stagedPath2, { recursive: true, force: true });
113
- await mkdir(stagedPath2, { recursive: true });
114
- await cp(join(repoRoot, "bundle"), join(stagedPath2, "bundle"), { recursive: true });
115
- const coreSkillsSrc = join(repoRoot, "core", "skills");
116
- if (existsSync(coreSkillsSrc)) {
117
- await cp(coreSkillsSrc, join(stagedPath2, "core", "skills"), { recursive: true });
118
- }
119
- await writeFile(join(stagedPath2, "package.json"), JSON.stringify({ type: "module", name: "abtars", version }, null, 2) + "\n");
120
- await copyFile(join(repoRoot, "install-manifest.json"), join(stagedPath2, "install-manifest.json"));
121
- const packageLockHash2 = await hashFile(join(repoRoot, "package-lock.json"));
122
- return { version, stagedPath: stagedPath2, commit, branch, packageLockHash: packageLockHash2, source: "local" };
123
- }
124
- runCmd("npm", ["run", "build"], repoRoot);
125
- const stagedPath = join(ctx.releasesDir, version);
126
- await rm(stagedPath, { recursive: true, force: true });
127
- await mkdir(stagedPath, { recursive: true });
128
- await cp(join(repoRoot, "dist"), join(stagedPath, "dist"), { recursive: true });
129
- await copyFile(join(repoRoot, "install-manifest.json"), join(stagedPath, "install-manifest.json"));
130
- await rm(ctx.nodeModulesDir, { recursive: true, force: true });
131
- await mkdir(ctx.nodeModulesDir, { recursive: true });
132
- const rsyncResult = spawnSync(
133
- "rsync",
134
- ["-aL", "--quiet", `${join(repoRoot, "node_modules")}/`, `${ctx.nodeModulesDir}/`],
135
- { stdio: "inherit" }
136
- );
137
- if (rsyncResult.status !== 0) {
138
- throw new LocalBuildError(
139
- `rsync of node_modules failed (status ${rsyncResult.status ?? -1})`,
140
- `Ensure rsync is installed. Falling back to node cp would re-create symlinks.`
141
- );
142
- }
143
- const packageLockHash = await hashFile(join(repoRoot, "package-lock.json"));
144
- return { version, stagedPath, commit, branch, packageLockHash, source: "local" };
145
- }
146
- };
147
- }
148
-
149
- // src/cli/update-sources/npm.ts
150
- import { spawnSync as spawnSync2 } from "node:child_process";
151
- import { existsSync as existsSync2, readFileSync, unlinkSync } from "node:fs";
152
- import { mkdir as mkdir2, rm as rm2 } from "node:fs/promises";
153
- import { join as join2 } from "node:path";
154
- var TIMEOUT_MS = 6e4;
155
- function run(cmd, args, cwd) {
156
- const r = spawnSync2(cmd, args, { cwd, encoding: "utf-8", timeout: TIMEOUT_MS });
157
- if (r.error) throw new Error(`${cmd} ${args.join(" ")}: ${r.error.message}`);
158
- if (r.status !== 0) throw new Error(`${cmd} ${args.join(" ")} exited ${r.status}: ${r.stderr?.trim()}`);
159
- return r.stdout.trim();
160
- }
161
- function readLocalVersion(home) {
162
- try {
163
- const pkg = JSON.parse(readFileSync(join2(home, "current", "package.json"), "utf-8"));
164
- return pkg.version ?? null;
165
- } catch {
166
- return null;
167
- }
168
- }
169
- function makeNpmSource(packageName) {
170
- return {
171
- name: "npm",
172
- async prepare(ctx) {
173
- const latest = run("npm", ["view", packageName, "version"], ctx.home);
174
- const current = readLocalVersion(ctx.home);
175
- if (latest === current) {
176
- throw new Error(`Already at latest version (${latest}). Nothing to update.`);
177
- }
178
- const stagedPath = join2(ctx.releasesDir, latest);
179
- await rm2(stagedPath, { recursive: true, force: true });
180
- await mkdir2(stagedPath, { recursive: true });
181
- run("npm", ["pack", `${packageName}@${latest}`, "--pack-destination", stagedPath], stagedPath);
182
- const tgzName = `${packageName}-${latest}.tgz`.replace("@", "").replace("/", "-");
183
- const tgzPath = join2(stagedPath, tgzName);
184
- run("tar", ["-xzf", tgzPath, "--strip-components=1"], stagedPath);
185
- if (existsSync2(tgzPath)) unlinkSync(tgzPath);
186
- run("npm", ["install", "--omit=dev", "--no-audit", "--no-fund"], stagedPath);
187
- return { version: latest, stagedPath, commit: null, branch: null, packageLockHash: null, source: "npm" };
188
- }
189
- };
190
- }
191
-
192
- // src/components/hints.ts
193
- import { existsSync as existsSync3, readFileSync as readFileSync2, writeFileSync, renameSync } from "node:fs";
194
- import { join as join3 } from "node:path";
195
- function manifestPath() {
196
- const home = process.env["ABTARS_HOME"] ?? join3(process.env["HOME"] ?? "", ".abtars");
197
- return join3(home, "manifest.json");
198
- }
199
- function readManifest2() {
200
- const path = manifestPath();
201
- if (!existsSync3(path)) return {};
202
- try {
203
- return JSON.parse(readFileSync2(path, "utf-8"));
204
- } catch {
205
- return {};
206
- }
207
- }
208
- function writeManifestAtomic(data) {
209
- const path = manifestPath();
210
- const tmp = path + ".tmp";
211
- writeFileSync(tmp, JSON.stringify(data, null, 2) + "\n");
212
- renameSync(tmp, path);
213
- }
214
- function showHintOnce(id, text) {
215
- const manifest = readManifest2();
216
- const seen = manifest["hintsSeen"] ?? {};
217
- if (seen[id]) return;
218
- process.stderr.write(`
219
- \u{1F4A1} ${text}
220
-
221
- `);
222
- seen[id] = (/* @__PURE__ */ new Date()).toISOString();
223
- manifest["hintsSeen"] = seen;
224
- writeManifestAtomic(manifest);
225
- }
226
-
227
- // src/cli/commands/update.ts
228
- function readJsonField(file, field) {
229
- try {
230
- return JSON.parse(readFileSync3(file, "utf-8"))[field];
231
- } catch {
232
- return void 0;
233
- }
234
- }
235
- async function update(opts) {
236
- if (opts.source !== "local" && opts.source !== "npm") {
237
- process.stderr.write(`--source ${opts.source} is not yet supported.
238
- Use --source local (default) or --source npm.
239
- `);
240
- return 2;
241
- }
242
- const paths = packagePaths("abtars");
243
- if (!existsSync4(paths.releases) && existsSync4(join4(paths.home, "current"))) {
244
- process.stdout.write("Migrating old layout \u2192 releases/...\n");
245
- mkdirSync(paths.releases, { recursive: true });
246
- }
247
- const release = await acquireLock(paths.lock, `update --source ${opts.source}`);
248
- try {
249
- const source = opts.source === "npm" ? makeNpmSource("abtars") : makeLocalBuildSource({ repoRoot: process.cwd(), allowStale: opts.fromLocal });
250
- if (opts.fromLocal) {
251
- showHintOnce("update-from-local", "Building from working copy (--from-local). To sync with remote first: git pull && abtars update");
252
- }
253
- process.stdout.write(`Building from local checkout (${process.cwd()})...
254
- `);
255
- const staged = await source.prepare({
256
- releasesDir: paths.releases,
257
- nodeModulesDir: paths.nodeModules,
258
- home: paths.home,
259
- allowStale: opts.fromLocal
260
- });
261
- process.stdout.write(`\u2713 staged ${staged.version} at ${staged.stagedPath}
262
- `);
263
- {
264
- const pkgPath = join4(staged.stagedPath, "package.json");
265
- const { readFileSync: readFileSync4, writeFileSync: writeFileSync2 } = await import("node:fs");
266
- try {
267
- const pkg = JSON.parse(readFileSync4(pkgPath, "utf-8"));
268
- const externals = { patchright: "^1.59.4", "rettiwt-api": "^4.1.3" };
269
- pkg.dependencies = { ...pkg.dependencies, ...externals };
270
- writeFileSync2(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
271
- const { execSync } = await import("node:child_process");
272
- execSync("npm install --omit=dev --ignore-scripts 2>/dev/null", { cwd: staged.stagedPath, timeout: 6e4 });
273
- process.stdout.write(`\u2713 external deps installed
274
- `);
275
- } catch (err) {
276
- process.stdout.write(`\u26A0 external deps install failed: ${err instanceof Error ? err.message : String(err)}
277
- `);
278
- }
279
- }
280
- {
281
- const { existsSync: existsSync5, unlinkSync: unlinkSync2, symlinkSync } = await import("node:fs");
282
- const mainLink = join4(staged.stagedPath, "main.js");
283
- try {
284
- unlinkSync2(mainLink);
285
- } catch (err) {
286
- logAndSwallow("update", "op", err);
287
- }
288
- const entry = existsSync5(join4(staged.stagedPath, "bundle", "abtars.js")) ? "bundle/abtars.js" : "dist/main.js";
289
- symlinkSync(entry, mainLink);
290
- }
291
- const { existsSync: ex2, lstatSync, readlinkSync, symlinkSync: sl2, mkdirSync: mk2 } = await import("node:fs");
292
- const oldNm = join4(paths.home, "current", "node_modules");
293
- const preservedLinks = [];
294
- if (ex2(oldNm)) {
295
- for (const name of ["abmind", "better-sqlite3"]) {
296
- const p = join4(oldNm, name);
297
- try {
298
- if (ex2(p) && lstatSync(p).isSymbolicLink()) preservedLinks.push({ name, target: readlinkSync(p) });
299
- } catch {
300
- }
301
- }
302
- }
303
- await activate(paths.current, staged.version);
304
- process.stdout.write(`\u2713 current -> releases/${staged.version}
305
- `);
306
- if (preservedLinks.length > 0) {
307
- const newNm = join4(paths.home, "current", "node_modules");
308
- mk2(newNm, { recursive: true });
309
- for (const { name, target } of preservedLinks) {
310
- try {
311
- sl2(target, join4(newNm, name));
312
- } catch {
313
- }
314
- }
315
- }
316
- const prior = await readManifest(paths.manifest);
317
- const now = (/* @__PURE__ */ new Date()).toISOString();
318
- const newPriorReleases = prior?.version ? [
319
- {
320
- version: prior.version,
321
- commit: prior.commit,
322
- activatedAt: prior.activatedAt,
323
- packageLockHash: prior.packageLockHash
324
- },
325
- ...prior.priorReleases ?? []
326
- ].slice(0, RETENTION - 1) : prior?.priorReleases ?? [];
327
- await writeManifest(paths.manifest, {
328
- ...prior ?? emptyManifest("abtars", hostname()),
329
- version: staged.version,
330
- commit: staged.commit,
331
- branch: staged.branch,
332
- packageLockHash: staged.packageLockHash,
333
- activatedAt: now,
334
- source: "local",
335
- priorReleases: newPriorReleases
336
- });
337
- process.stdout.write(`\u2713 manifest updated
338
- `);
339
- const pruned = await pruneReleases(
340
- paths.releases,
341
- [staged.version, ...newPriorReleases.map((r) => r.version)],
342
- staged.version,
343
- RETENTION
344
- );
345
- if (pruned.length > 0) {
346
- process.stdout.write(`\u2713 pruned ${pruned.length} old release${pruned.length === 1 ? "" : "s"}: ${pruned.join(", ")}
347
- `);
348
- }
349
- process.stdout.write(`
350
- Update complete: ${staged.version}
351
- `);
352
- const { loadManifest } = await import("./install-manifest-SPQRUNXL.js");
353
- const installManifest = loadManifest(process.cwd());
354
- const repoScripts = join4(process.cwd(), "scripts");
355
- const destScripts = join4(paths.home, "scripts");
356
- await mkdir3(destScripts, { recursive: true });
357
- const allScriptFiles = await readdir(repoScripts).catch(() => []);
358
- const matchesInclude = (name) => installManifest.scripts.include.some((pattern) => {
359
- const ext = pattern.replace("*", "");
360
- return name.endsWith(ext);
361
- });
362
- const scriptFiles = allScriptFiles.filter(matchesInclude);
363
- const home = process.env["HOME"] ?? "";
364
- let serviceChanged = false;
365
- const installMode = (await readManifest(paths.manifest))?.installMode ?? "supervised";
366
- const isExecutable = (name) => {
367
- const ext = installManifest.scripts.executable.replace("*", "");
368
- return name.endsWith(ext);
369
- };
370
- for (const name of scriptFiles) {
371
- await copyFile2(join4(repoScripts, name), join4(destScripts, name));
372
- if (isExecutable(name)) await chmod(join4(destScripts, name), 493);
373
- if (isExecutable(name)) {
374
- await copyFile2(join4(repoScripts, name), join4(paths.home, name));
375
- await chmod(join4(paths.home, name), 493);
376
- }
377
- const macService = installManifest.services.supervised.macos;
378
- if (macService && name === macService.plist && process.platform === "darwin" && home && installMode === "supervised") {
379
- const launchAgentsDir = join4(home, "Library", "LaunchAgents");
380
- await mkdir3(launchAgentsDir, { recursive: true });
381
- const dst = join4(launchAgentsDir, name);
382
- const oldContent = await readFile2(dst, "utf-8").catch(() => "");
383
- let templated = await readFile2(join4(repoScripts, name), "utf-8");
384
- for (const ph of macService.placeholders) templated = templated.replaceAll(ph, home);
385
- await writeFile2(dst, templated);
386
- if (oldContent !== templated) serviceChanged = true;
387
- }
388
- const linuxService = installManifest.services.supervised.linux;
389
- if (linuxService?.units.includes(name) && process.platform === "linux" && home && installMode === "supervised") {
390
- const systemdDir = join4(home, ".config", "systemd", "user");
391
- await mkdir3(systemdDir, { recursive: true });
392
- const dst = join4(systemdDir, name);
393
- const oldContent = await readFile2(dst, "utf-8").catch(() => "");
394
- await copyFile2(join4(repoScripts, name), dst);
395
- const newContent = await readFile2(dst, "utf-8").catch(() => "");
396
- if (oldContent !== newContent) serviceChanged = true;
397
- }
398
- }
399
- process.stdout.write(`\u2713 scripts refreshed (${scriptFiles.length} files)
400
- `);
401
- const { writeWrapper } = await import("./install-6HRZVKUM.js");
402
- await mkdir3(paths.bin, { recursive: true });
403
- for (const name of installManifest.cliWrappers) {
404
- await writeWrapper(paths.bin, name, paths.current, false);
405
- }
406
- process.stdout.write(`\u2713 wrappers refreshed (${installManifest.cliWrappers.length} files)
407
- `);
408
- const { rmSync, cpSync, readdirSync } = await import("node:fs");
409
- const skillsCoreSrc = join4(staged.stagedPath, "core", "skills");
410
- const skillsCoreDst = join4(paths.home, "skills", "core");
411
- if (existsSync4(skillsCoreSrc)) {
412
- rmSync(skillsCoreDst, { recursive: true, force: true });
413
- cpSync(skillsCoreSrc, skillsCoreDst, { recursive: true });
414
- const files = readdirSync(skillsCoreDst, { recursive: true });
415
- const count = files.filter((f) => f.endsWith("SKILL.md")).length;
416
- process.stdout.write(`\u2713 skills/core synced (${count} skills)
417
- `);
418
- }
419
- for (const d of ["custom", "downloaded", "self"]) {
420
- await mkdir3(join4(paths.home, "skills", d), { recursive: true });
421
- }
422
- for (const stale of ["memory", "ops", "tools", "coding"]) {
423
- const p = join4(paths.home, "skills", stale);
424
- if (existsSync4(p)) {
425
- rmSync(p, { recursive: true, force: true });
426
- }
427
- }
428
- if (serviceChanged) {
429
- if (process.platform === "darwin") {
430
- process.stdout.write(`\u26A0\uFE0F LaunchAgent plist updated \u2014 reload with: launchctl bootout gui/$(id -u)/com.abtars.watchdog && launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.abtars.watchdog.plist
431
- `);
432
- } else {
433
- process.stdout.write(`\u26A0\uFE0F systemd service updated \u2014 reload with: systemctl --user daemon-reload && systemctl --user restart abtars-watchdog
434
- `);
435
- }
436
- }
437
- void hashFile;
438
- const { ensureInstallInvariants } = await import("./ensure-invariants-NMXNS476.js");
439
- const invariantResults = await ensureInstallInvariants(process.cwd(), paths.home);
440
- if (invariantResults.length > 0) {
441
- process.stdout.write(`\u2713 invariants: ${invariantResults.join(", ")}
442
- `);
443
- }
444
- const doctorPath = join4(paths.home, "scripts", "doctor.sh");
445
- if (existsSync4(doctorPath)) {
446
- process.stdout.write("\n\u{1FA7A} Health check...\n");
447
- try {
448
- const { execSync } = await import("node:child_process");
449
- execSync(`bash "${doctorPath}" --fix`, { stdio: "inherit", timeout: 3e4 });
450
- } catch (err) {
451
- process.stderr.write(`\u26A0\uFE0F doctor --fix failed: ${err instanceof Error ? err.message : String(err)}
452
- `);
453
- }
454
- }
455
- const manifestForRestart = await readManifest(paths.manifest);
456
- const restartMode = manifestForRestart?.installMode;
457
- if (!restartMode) {
458
- process.stderr.write("\u274C installMode not set in manifest.json. Run 'abtars install' first.\n");
459
- return 1;
460
- }
461
- if (restartMode === "supervised-daemon" || restartMode === "supervised") {
462
- process.stdout.write("\nRestarting bridge via watchdog...\n");
463
- const wdLock = join4(paths.home, "watchdog.lock");
464
- const wdPid = readJsonField(wdLock, "pid");
465
- if (wdPid && wdPid > 0) {
466
- try {
467
- process.kill(wdPid, "SIGUSR1");
468
- process.stdout.write(`\u267B\uFE0F USR1 sent to watchdog (PID ${wdPid}) \u2014 bridge will restart
469
- `);
470
- } catch {
471
- process.stdout.write(`\u26A0\uFE0F Could not signal watchdog (PID ${wdPid}). Restart manually:
472
- `);
473
- if (process.platform === "darwin") {
474
- process.stdout.write(` launchctl kickstart -k gui/$(id -u)/com.abtars.watchdog
475
- `);
476
- } else {
477
- process.stdout.write(` systemctl --user restart abtars-watchdog
478
- `);
479
- }
480
- }
481
- } else {
482
- process.stdout.write(`\u26A0\uFE0F Watchdog not running. Cold restart...
483
- `);
484
- const { restart } = await import("./abtars-restart.js");
485
- await restart({ cold: true }).catch((err) => {
486
- process.stderr.write(`\u26A0\uFE0F Restart failed: ${err instanceof Error ? err.message : String(err)}
487
- `);
488
- });
489
- }
490
- } else {
491
- process.stdout.write("\nRestarting bridge...\n");
492
- const { restart } = await import("./abtars-restart.js");
493
- await restart({ cold: true }).catch((err) => {
494
- process.stderr.write(`\u26A0\uFE0F Restart failed: ${err instanceof Error ? err.message : String(err)}
495
- `);
496
- });
497
- }
498
- const { printHealthSummary } = await import("./health-check-SPA7NT6N.js");
499
- printHealthSummary(paths.home);
500
- return 0;
501
- } finally {
502
- await release();
503
- }
504
- }
505
-
506
- export {
507
- showHintOnce,
508
- update
509
- };
510
- //# sourceMappingURL=chunk-5R2ANXQ7.js.map