abtars 0.3.4-alpha.0 → 0.3.4-alpha.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 (392) hide show
  1. package/bundle/{_registry.generated-7DRCE4V6.js → _registry.generated-RC6PEH6Z.js} +16 -15
  2. package/bundle/{_registry.generated-7DRCE4V6.js.map → _registry.generated-RC6PEH6Z.js.map} +1 -1
  3. package/bundle/abtars-browser.js +6 -5
  4. package/bundle/abtars-browser.js.map +1 -1
  5. package/bundle/abtars-cli.js +73 -46
  6. package/bundle/abtars-cli.js.map +3 -3
  7. package/bundle/abtars-restart.js +7 -7
  8. package/bundle/abtars-rss.js +2 -1
  9. package/bundle/abtars-rss.js.map +2 -2
  10. package/bundle/abtars-task.js +6 -5
  11. package/bundle/abtars-task.js.map +1 -1
  12. package/bundle/abtars-todo.js +2 -1
  13. package/bundle/abtars-todo.js.map +1 -1
  14. package/bundle/abtars.js +307 -212
  15. package/bundle/abtars.js.map +4 -4
  16. package/bundle/{acp-raw-client-AZJCEB6S.js → acp-raw-client-E6FM45NC.js} +4 -3
  17. package/bundle/{acp-raw-client-AZJCEB6S.js.map → acp-raw-client-E6FM45NC.js.map} +1 -1
  18. package/bundle/{action-gate-QYJL57IX.js → action-gate-G2V47NHW.js} +4 -3
  19. package/bundle/{action-gate-QYJL57IX.js.map → action-gate-G2V47NHW.js.map} +1 -1
  20. package/bundle/{agent-api-adapter-PYMNQXHE.js → agent-api-adapter-PTJYZKQK.js} +5 -4
  21. package/bundle/{agent-api-adapter-PYMNQXHE.js.map → agent-api-adapter-PTJYZKQK.js.map} +1 -1
  22. package/bundle/{agent-api-rate-limit-4GEZ4YN5.js → agent-api-rate-limit-WCFXJMGY.js} +6 -5
  23. package/bundle/{agent-registry-563P4EUJ.js → agent-registry-GU7ABOK5.js} +9 -8
  24. package/bundle/bootstrap-POWWTU6I.js +63 -0
  25. package/bundle/bootstrap-POWWTU6I.js.map +7 -0
  26. package/bundle/{bridge-lock-transport-LXCF2IVN.js → bridge-lock-transport-4ZH7QTJP.js} +6 -5
  27. package/bundle/{browser-2VZOGOGX.js → browser-EJNS35NT.js} +8 -7
  28. package/bundle/{budget-PPA7WY3D.js → budget-45QOBDWA.js} +5 -4
  29. package/bundle/{budget-PPA7WY3D.js.map → budget-45QOBDWA.js.map} +1 -1
  30. package/bundle/{capability-WXEA2WFK.js → capability-JFWX3IQF.js} +7 -6
  31. package/bundle/{chunk-CB6S3ZRF.js → chunk-2FAZIA37.js} +3 -3
  32. package/bundle/{chunk-VJATH7AN.js → chunk-2KC5G3EA.js} +9 -8
  33. package/bundle/chunk-2KC5G3EA.js.map +7 -0
  34. package/bundle/{chunk-OY2HAK33.js → chunk-36ZEYDKZ.js} +1 -1
  35. package/bundle/chunk-36ZEYDKZ.js.map +7 -0
  36. package/bundle/{chunk-2FZJDMAF.js → chunk-3CACHBDI.js} +10 -10
  37. package/bundle/{chunk-O4GKI3Q3.js → chunk-4S554KLW.js} +4 -4
  38. package/bundle/{chunk-3QW2K53E.js → chunk-5GCLBUBS.js} +11 -19
  39. package/bundle/chunk-5GCLBUBS.js.map +7 -0
  40. package/bundle/{chunk-RJX45XIC.js → chunk-5HDSQFT6.js} +9 -4
  41. package/bundle/chunk-5HDSQFT6.js.map +7 -0
  42. package/bundle/{chunk-EDZGF6BC.js → chunk-5NY2YULC.js} +11 -4
  43. package/bundle/chunk-5NY2YULC.js.map +7 -0
  44. package/bundle/{chunk-LE23VPN3.js → chunk-63A7ZRIH.js} +4 -4
  45. package/bundle/{chunk-LE23VPN3.js.map → chunk-63A7ZRIH.js.map} +1 -1
  46. package/bundle/{chunk-SSCGWDIC.js → chunk-65VCEC32.js} +2 -2
  47. package/bundle/{chunk-V2QIAXWZ.js → chunk-7BSQ5UQO.js} +3 -3
  48. package/bundle/{chunk-E7MV7WFT.js → chunk-7Z3HBPRY.js} +6 -6
  49. package/bundle/{chunk-TY26WMQY.js → chunk-AFREM7FX.js} +2 -2
  50. package/bundle/{chunk-GCFIK6OB.js → chunk-AO32N2VB.js} +92 -20
  51. package/bundle/chunk-AO32N2VB.js.map +7 -0
  52. package/bundle/{chunk-N5VROZ7A.js → chunk-B6ZN6COK.js} +5 -5
  53. package/bundle/{chunk-M6Q3IQ4H.js → chunk-BFDBGESM.js} +259 -122
  54. package/bundle/chunk-BFDBGESM.js.map +7 -0
  55. package/bundle/{chunk-YEOZN5IE.js → chunk-DYBW4XXL.js} +2 -2
  56. package/bundle/{chunk-56D3Y44D.js → chunk-EFJVUJBE.js} +10 -10
  57. package/bundle/{chunk-S6HEHCCG.js → chunk-EQSG2CRM.js} +83 -46
  58. package/bundle/chunk-EQSG2CRM.js.map +7 -0
  59. package/bundle/{chunk-FIAVVKGN.js → chunk-EUZDKV3C.js} +3 -3
  60. package/bundle/{chunk-2LKQV2ND.js → chunk-FRKW6LWB.js} +3 -3
  61. package/bundle/{chunk-H2K23MOF.js → chunk-GALQBVKO.js} +21 -5
  62. package/bundle/chunk-GALQBVKO.js.map +7 -0
  63. package/bundle/{chunk-DNDYD5SL.js → chunk-GP4XUKI5.js} +3 -3
  64. package/bundle/{chunk-SXNY6HC4.js → chunk-GPZNXY2U.js} +6 -6
  65. package/bundle/chunk-GPZNXY2U.js.map +7 -0
  66. package/bundle/{chunk-W726UGI6.js → chunk-GRVWZO4C.js} +3 -3
  67. package/bundle/{chunk-IXKQ4JMX.js → chunk-GVM5YU5I.js} +33 -17
  68. package/bundle/chunk-GVM5YU5I.js.map +7 -0
  69. package/bundle/{chunk-OOKNHOCB.js → chunk-GWILHZPT.js} +2 -2
  70. package/bundle/{chunk-3LQOJVTB.js → chunk-HFOCNYEO.js} +1842 -1220
  71. package/bundle/{chunk-3LQOJVTB.js.map → chunk-HFOCNYEO.js.map} +4 -4
  72. package/bundle/{chunk-NP72ZB7P.js → chunk-HMKVL7AX.js} +53 -47
  73. package/bundle/chunk-HMKVL7AX.js.map +7 -0
  74. package/bundle/{chunk-BNBC4T45.js → chunk-HT2BPTZY.js} +3 -3
  75. package/bundle/{chunk-BU7LTI2W.js → chunk-HZDLFLRP.js} +6 -7
  76. package/bundle/chunk-HZDLFLRP.js.map +7 -0
  77. package/bundle/{chunk-FVUL44T4.js → chunk-IJT4KWXT.js} +2 -2
  78. package/bundle/{chunk-IK4R3RBZ.js → chunk-JNIHEDKF.js} +3 -3
  79. package/bundle/{chunk-J5NOL4DB.js → chunk-JQDJPUHM.js} +16 -6
  80. package/bundle/chunk-JQDJPUHM.js.map +7 -0
  81. package/bundle/{chunk-SESM4GBM.js → chunk-KTYGKPYM.js} +52 -25
  82. package/bundle/chunk-KTYGKPYM.js.map +7 -0
  83. package/bundle/chunk-LME23AA2.js +37 -0
  84. package/bundle/chunk-LME23AA2.js.map +7 -0
  85. package/bundle/{chunk-4PIVWXUJ.js → chunk-LUNA6PM5.js} +2 -2
  86. package/bundle/{chunk-37EX63K4.js → chunk-LUW62WGO.js} +6998 -3621
  87. package/bundle/chunk-LUW62WGO.js.map +7 -0
  88. package/bundle/{chunk-MV5KOWOR.js → chunk-NDCRWEEJ.js} +7 -7
  89. package/bundle/{chunk-7WHXTCVD.js → chunk-NRUSRJXR.js} +8 -3
  90. package/bundle/chunk-NRUSRJXR.js.map +7 -0
  91. package/bundle/{chunk-C3EYYJN3.js → chunk-O7KQG6ME.js} +17 -5
  92. package/bundle/chunk-O7KQG6ME.js.map +7 -0
  93. package/bundle/{chunk-ZOCEBV62.js → chunk-OKAQICWY.js} +3 -3
  94. package/bundle/{chunk-TCI6FZTP.js → chunk-OLAURO5G.js} +9 -9
  95. package/bundle/{chunk-YME7NRGP.js → chunk-OXTSWQCX.js} +2 -2
  96. package/bundle/{chunk-HDOFJVFS.js → chunk-PEDX56EL.js} +3 -3
  97. package/bundle/{chunk-7RAGSHSH.js → chunk-PROPYS3P.js} +12 -10
  98. package/bundle/chunk-PROPYS3P.js.map +7 -0
  99. package/bundle/{chunk-ASYX43OU.js → chunk-Q32H6VPU.js} +26 -26
  100. package/bundle/{chunk-P5O6QZDC.js → chunk-QROWBWLL.js} +10 -6
  101. package/bundle/chunk-QROWBWLL.js.map +7 -0
  102. package/bundle/{chunk-S7ZIGIR5.js → chunk-R76K6L6H.js} +27 -27
  103. package/bundle/{chunk-S7ZIGIR5.js.map → chunk-R76K6L6H.js.map} +1 -1
  104. package/bundle/{chunk-MQJG7OJX.js → chunk-RIHQ37U5.js} +38 -36
  105. package/bundle/chunk-RIHQ37U5.js.map +7 -0
  106. package/bundle/{chunk-IQKADER4.js → chunk-RWRRGE4U.js} +2 -2
  107. package/bundle/{chunk-72T2Q7IG.js → chunk-S5GD5EJ5.js} +271 -282
  108. package/bundle/chunk-S5GD5EJ5.js.map +7 -0
  109. package/bundle/{chunk-ULO2PX3T.js → chunk-TEFZ4JA4.js} +3 -3
  110. package/bundle/{chunk-2RGR3LSV.js → chunk-TMUYFERL.js} +2 -2
  111. package/bundle/{chunk-KBPVJGD7.js → chunk-URQPDCK5.js} +3 -3
  112. package/bundle/chunk-UUIHL65U.js +77 -0
  113. package/bundle/chunk-UUIHL65U.js.map +7 -0
  114. package/bundle/{chunk-FJF42RZY.js → chunk-VUIX5AGB.js} +3 -3
  115. package/bundle/{chunk-5V4VHKEA.js → chunk-WBTJ2E62.js} +5 -4
  116. package/bundle/chunk-WBTJ2E62.js.map +7 -0
  117. package/bundle/{chunk-ZY6DH2S4.js → chunk-WTIGZO3N.js} +80 -70
  118. package/bundle/chunk-WTIGZO3N.js.map +7 -0
  119. package/bundle/{chunk-4HNCOQSK.js → chunk-WYHGNI56.js} +7 -7
  120. package/bundle/{chunk-24V4A6RP.js → chunk-XX6BGTPO.js} +4 -4
  121. package/bundle/{chunk-T7TAWGBX.js → chunk-Y76VUJSF.js} +2 -2
  122. package/bundle/{chunk-TVSPVZTX.js → chunk-YDY6QVWJ.js} +3 -3
  123. package/bundle/{chunk-V6CV3QPH.js → chunk-YRSMGJFP.js} +2 -2
  124. package/bundle/{chunk-WP7FZHMI.js → chunk-YSKCQH6E.js} +2 -2
  125. package/bundle/{chunk-NGZVJ52F.js → chunk-ZKJOFASV.js} +7 -7
  126. package/bundle/{chunk-WGWM4IZM.js → chunk-ZT5ZBGWS.js} +4 -4
  127. package/bundle/{chunk-WGWM4IZM.js.map → chunk-ZT5ZBGWS.js.map} +1 -1
  128. package/bundle/{chunk-43DKPXTP.js → chunk-ZV4IWKDJ.js} +4 -4
  129. package/bundle/{commands-XXFU2ZF7.js → commands-EWA4HNCM.js} +20 -20
  130. package/bundle/{config-EWDZ234X.js → config-M3P5IOAI.js} +8 -7
  131. package/bundle/{config-show-6J33O4TE.js → config-show-3DHPP26D.js} +5 -5
  132. package/bundle/{context-OCS7HLJP.js → context-5P7IYYU2.js} +5 -2
  133. package/bundle/{context-OCS7HLJP.js.map → context-5P7IYYU2.js.map} +1 -1
  134. package/bundle/{daemon-LTDAXNA2.js → daemon-TB23FFWY.js} +7 -7
  135. package/bundle/{delegation-tools-YDTWQMZD.js → delegation-tools-P2SCNL23.js} +14 -11
  136. package/bundle/{registry-client-VN2MM2HI.js → deploy-YYUCGGP3.js} +10 -6
  137. package/bundle/{deploy-lib-import-RGZJ3CGC.js → deploy-lib-import-T3UP4G6G.js} +5 -3
  138. package/bundle/{deps-PHSLIA77.js → deps-WVK553KF.js} +21 -19
  139. package/bundle/deps-WVK553KF.js.map +7 -0
  140. package/bundle/{direct-api-transport-OAKYQBJR.js → direct-api-transport-WQ6HA5OX.js} +30 -28
  141. package/bundle/direct-api-transport-WQ6HA5OX.js.map +7 -0
  142. package/bundle/{discord-adapter-WUNYPTDE.js → discord-adapter-4TTETYDI.js} +26 -26
  143. package/bundle/{dist-7HEHHQI2.js → dist-KMK7TZGN.js} +376 -348
  144. package/bundle/dist-KMK7TZGN.js.map +7 -0
  145. package/bundle/{dns-wakeup-F55ALHXJ.js → dns-wakeup-IDOJIXBX.js} +4 -3
  146. package/bundle/{dns-wakeup-F55ALHXJ.js.map → dns-wakeup-IDOJIXBX.js.map} +1 -1
  147. package/bundle/{doctor-probes-3SLIUGKS.js → doctor-probes-VDWFJKUB.js} +4 -3
  148. package/bundle/{env-schema-MSDP2YBO.js → env-schema-4JXQUOH4.js} +5 -4
  149. package/bundle/{gossip-CS3G3447.js → gossip-3C3BSNPN.js} +7 -6
  150. package/bundle/{guardrails-24XK2COI.js → guardrails-DL7ZSWVN.js} +6 -5
  151. package/bundle/{health-check-FRUNRVNQ.js → health-check-YKWFD2LZ.js} +5 -6
  152. package/bundle/{health-check-FRUNRVNQ.js.map → health-check-YKWFD2LZ.js.map} +2 -2
  153. package/bundle/{heartbeat-system-G4IFQXT6.js → heartbeat-system-TDDIOVTC.js} +7 -6
  154. package/bundle/{heartbeat-tier3-3ZO3EVXP.js → heartbeat-tier3-55T2HUNE.js} +45 -44
  155. package/bundle/heartbeat-tier3-55T2HUNE.js.map +7 -0
  156. package/bundle/{hook-system-X6INNJGV.js → hook-system-M3POLUIB.js} +5 -4
  157. package/bundle/{hotskills-6FQYTJIO.js → hotskills-FWX4QI7V.js} +7 -6
  158. package/bundle/{install-ZAHTZ5M5.js → install-4MXBYIUG.js} +23 -20
  159. package/bundle/install-4MXBYIUG.js.map +7 -0
  160. package/bundle/{install-manifest-QX7KVDCA.js → install-manifest-5PPWMD2W.js} +4 -3
  161. package/bundle/{install-manifest-QX7KVDCA.js.map → install-manifest-5PPWMD2W.js.map} +1 -1
  162. package/bundle/{irc-adapter-IEJQKKJF.js → irc-adapter-PTTZD32W.js} +5 -4
  163. package/bundle/{irc-adapter-IEJQKKJF.js.map → irc-adapter-PTTZD32W.js.map} +1 -1
  164. package/bundle/{irc-config-TTWNYFLH.js → irc-config-CP7ZMUOX.js} +6 -5
  165. package/bundle/{irc-config-TTWNYFLH.js.map → irc-config-CP7ZMUOX.js.map} +1 -1
  166. package/bundle/{kanban-board-J6RO3ZU7.js → kanban-board-M326B2XJ.js} +7 -5
  167. package/bundle/{kanban-channel-5EIXBFSA.js → kanban-channel-IJ52OMNA.js} +8 -6
  168. package/bundle/{lazy-require-V6EFUATC.js → lazy-require-KCRVT4SI.js} +11 -6
  169. package/bundle/{logger-Y3VILPRH.js → logger-OWCSNYCA.js} +4 -3
  170. package/bundle/{logs-YS3GDURO.js → logs-FXS4SCEM.js} +5 -5
  171. package/bundle/{main-chat-YLZDNQPO.js → main-chat-ZNUZCTNS.js} +6 -5
  172. package/bundle/{master-user-Z4M7KCJE.js → master-user-HSKM4ZFN.js} +7 -6
  173. package/bundle/{media-utils-P6RZ2K3U.js → media-utils-3ZYOD7SK.js} +44 -43
  174. package/bundle/{media-utils-P6RZ2K3U.js.map → media-utils-3ZYOD7SK.js.map} +2 -2
  175. package/bundle/{message-pipeline-MHEBDJLH.js → message-pipeline-KSONH4MT.js} +20 -20
  176. package/bundle/meta.json +9327 -8582
  177. package/bundle/{migrate-layout-RJJQLVGR.js → migrate-layout-IJIEJY3A.js} +8 -4
  178. package/bundle/migrate-layout-IJIEJY3A.js.map +7 -0
  179. package/bundle/{nerve-VZNMFDGY.js → nerve-IGSXBKZZ.js} +5 -4
  180. package/bundle/{notification-VV2OR6NW.js → notification-BFSIEECG.js} +8 -7
  181. package/bundle/{openrouter-credits-LXC7P4G6.js → openrouter-credits-NTVZDRYM.js} +5 -4
  182. package/bundle/{openrouter-credits-LXC7P4G6.js.map → openrouter-credits-NTVZDRYM.js.map} +1 -1
  183. package/bundle/{orc-KC4USP55.js → orc-EIGVTHAV.js} +4 -4
  184. package/bundle/{orc-tools-CHRSXSAS.js → orc-tools-A3G7WCSJ.js} +5 -4
  185. package/bundle/{paths-EDK6KWHG.js → paths-3ZVW3NFL.js} +6 -2
  186. package/bundle/{paths-RZF6WDMG.js → paths-X4LRYUI6.js} +3 -2
  187. package/bundle/{peer-auth-SRONOLNG.js → peer-auth-QC4EF2PM.js} +9 -8
  188. package/bundle/{peer-client-VOF77T6C.js → peer-client-RGEU5HOK.js} +9 -8
  189. package/bundle/{peer-client-VOF77T6C.js.map → peer-client-RGEU5HOK.js.map} +1 -1
  190. package/bundle/{peer-config-FRWLEYQ5.js → peer-config-TN55LFDC.js} +6 -5
  191. package/bundle/{peer-jwt-XY3XRIA2.js → peer-jwt-NCCPXJRX.js} +6 -5
  192. package/bundle/{peer-transport-UBBXTDRP.js → peer-transport-I6JPLFZ2.js} +8 -7
  193. package/bundle/{phase-transport-4NQHZX75.js → phase-transport-2BRWACDF.js} +18 -16
  194. package/bundle/public/css/dashboard.css +542 -0
  195. package/bundle/public/index.html +180 -0
  196. package/bundle/public/js/app.js +437 -0
  197. package/bundle/public/memory-universe.js +384 -0
  198. package/bundle/{reconcile-2EUXJ6W5.js → reconcile-CTFCLQRN.js} +5 -4
  199. package/bundle/{reconciler-FFQGV4DO.js → reconciler-FHESO6OC.js} +14 -11
  200. package/bundle/{reconciler-FFQGV4DO.js.map → reconciler-FHESO6OC.js.map} +1 -1
  201. package/bundle/{restore-NFDE2RG6.js → restore-IFHPI7I7.js} +13 -9
  202. package/bundle/{restore-NFDE2RG6.js.map → restore-IFHPI7I7.js.map} +3 -3
  203. package/bundle/{rollback-MVZ53XS4.js → rollback-ANRI3T5Z.js} +5 -5
  204. package/bundle/{chunk-SKY6656M.js → sandbox-runtime-QROWHDCS.js} +11 -28
  205. package/bundle/{chunk-SKY6656M.js.map → sandbox-runtime-QROWHDCS.js.map} +1 -1
  206. package/bundle/{self-healer-utils-KD6LV63S.js → self-healer-utils-IFAYOQO2.js} +5 -4
  207. package/bundle/{self-healer-utils-KD6LV63S.js.map → self-healer-utils-IFAYOQO2.js.map} +1 -1
  208. package/bundle/{sha-tracker-2DB4R2TW.js → sha-tracker-ZWBP6CIJ.js} +5 -4
  209. package/bundle/{skill-session-BPDVA6ZG.js → skill-session-AXBDQSLQ.js} +5 -4
  210. package/bundle/{skill-session-BPDVA6ZG.js.map → skill-session-AXBDQSLQ.js.map} +1 -1
  211. package/bundle/{skill-stats-TPD2NROA.js → skill-stats-JORH5DGM.js} +6 -5
  212. package/bundle/{skill-watcher-D7QYYYON.js → skill-watcher-E4MGLKLS.js} +6 -5
  213. package/bundle/{sleep-GH6DLBJJ.js → sleep-SRCSXY6T.js} +10 -9
  214. package/bundle/{soul-bundle-GXLMDBCC.js → soul-bundle-VWAVHCZ6.js} +10 -9
  215. package/bundle/{spin-4DBYHS3E.js → spin-IMW2MZOH.js} +13 -10
  216. package/bundle/{spin-notifications-IKYJPER5.js → spin-notifications-SE2HVZI7.js} +7 -5
  217. package/bundle/{spin-notifications-IKYJPER5.js.map → spin-notifications-SE2HVZI7.js.map} +1 -1
  218. package/bundle/{spin-types-PLJH3SIK.js → spin-types-BLPYAETA.js} +5 -4
  219. package/bundle/{src-SUFZ27S5.js → src-6BTCMOD3.js} +4 -4
  220. package/bundle/{sse-parser-anthropic-U7ILHOY5.js → sse-parser-anthropic-A6R4Z2TB.js} +5 -4
  221. package/bundle/{sse-parser-anthropic-U7ILHOY5.js.map → sse-parser-anthropic-A6R4Z2TB.js.map} +1 -1
  222. package/bundle/{sse-parser-responses-OI73R3AH.js → sse-parser-responses-HSZY3QGJ.js} +5 -4
  223. package/bundle/{sse-parser-responses-OI73R3AH.js.map → sse-parser-responses-HSZY3QGJ.js.map} +1 -1
  224. package/bundle/{ssrf-guard-6GP4QYVA.js → ssrf-guard-O6SHIK6Q.js} +5 -4
  225. package/bundle/{ssrf-guard-6GP4QYVA.js.map → ssrf-guard-O6SHIK6Q.js.map} +1 -1
  226. package/bundle/{start-JT2BPMSW.js → start-7QZIWO3S.js} +5 -5
  227. package/bundle/start-7QZIWO3S.js.map +7 -0
  228. package/bundle/{stt-KD3AABKG.js → stt-LGVPXMVR.js} +6 -5
  229. package/bundle/{subagent-runtime-LVECAUPV.js → subagent-runtime-3UJB4HUB.js} +6 -5
  230. package/bundle/system-status-ATGKRRQI.js +349 -0
  231. package/bundle/system-status-ATGKRRQI.js.map +7 -0
  232. package/bundle/{task-store-2XRDM3AW.js → task-store-W5BFIAIH.js} +6 -5
  233. package/bundle/{telegram-adapter-UJ3RYYV6.js → telegram-adapter-7G773NII.js} +35 -35
  234. package/bundle/{tool-registry-YU6WBXPA.js → tool-registry-J6TE3I2T.js} +25 -23
  235. package/bundle/{tool-sandbox-RNNPDR5M.js → tool-sandbox-4UC6GAKA.js} +6 -5
  236. package/bundle/{transport-config-OK3MZPJK.js → transport-config-KBF5W2DP.js} +9 -8
  237. package/bundle/{update-ENNPRW7Y.js → update-424ZZQQ6.js} +6 -6
  238. package/bundle/{update-check-SJB6GV3A.js → update-check-7UWKBJOP.js} +3 -2
  239. package/bundle/{update-check-SJB6GV3A.js.map → update-check-7UWKBJOP.js.map} +1 -1
  240. package/bundle/{usage-tracker-HRSGC7QC.js → usage-tracker-NXD364VX.js} +2 -2
  241. package/bundle/{user-registry-6PUJJ5J2.js → user-registry-35BW4XKM.js} +6 -5
  242. package/bundle/{wrapper-WLHLG4MI.js → wrapper-W66YICNZ.js} +3 -3
  243. package/bundle/{ws-peer-client-WHW3RJTD.js → ws-peer-client-AIXCXF7V.js} +15 -14
  244. package/bundle/{ws-peer-client-WHW3RJTD.js.map → ws-peer-client-AIXCXF7V.js.map} +2 -2
  245. package/package.json +4 -8
  246. package/scripts/emergency-deploy.sh +11 -8
  247. package/scripts/emergency-update.sh +156 -23
  248. package/templates/config/.env +1 -1
  249. package/templates/config/models.json +13 -0
  250. package/bundle/chunk-37EX63K4.js.map +0 -7
  251. package/bundle/chunk-3QW2K53E.js.map +0 -7
  252. package/bundle/chunk-5V4VHKEA.js.map +0 -7
  253. package/bundle/chunk-72T2Q7IG.js.map +0 -7
  254. package/bundle/chunk-7RAGSHSH.js.map +0 -7
  255. package/bundle/chunk-7WHXTCVD.js.map +0 -7
  256. package/bundle/chunk-BU7LTI2W.js.map +0 -7
  257. package/bundle/chunk-C3EYYJN3.js.map +0 -7
  258. package/bundle/chunk-CAOIIVFP.js +0 -110
  259. package/bundle/chunk-CAOIIVFP.js.map +0 -7
  260. package/bundle/chunk-EDZGF6BC.js.map +0 -7
  261. package/bundle/chunk-GCFIK6OB.js.map +0 -7
  262. package/bundle/chunk-H2K23MOF.js.map +0 -7
  263. package/bundle/chunk-HAZHNBBY.js +0 -156
  264. package/bundle/chunk-HAZHNBBY.js.map +0 -7
  265. package/bundle/chunk-IXKQ4JMX.js.map +0 -7
  266. package/bundle/chunk-J5NOL4DB.js.map +0 -7
  267. package/bundle/chunk-JAJ3DUQ2.js +0 -30
  268. package/bundle/chunk-JAJ3DUQ2.js.map +0 -7
  269. package/bundle/chunk-KMFR5AVY.js +0 -45
  270. package/bundle/chunk-KMFR5AVY.js.map +0 -7
  271. package/bundle/chunk-M6Q3IQ4H.js.map +0 -7
  272. package/bundle/chunk-MQJG7OJX.js.map +0 -7
  273. package/bundle/chunk-NP72ZB7P.js.map +0 -7
  274. package/bundle/chunk-OY2HAK33.js.map +0 -7
  275. package/bundle/chunk-P5O6QZDC.js.map +0 -7
  276. package/bundle/chunk-RJX45XIC.js.map +0 -7
  277. package/bundle/chunk-S6HEHCCG.js.map +0 -7
  278. package/bundle/chunk-SESM4GBM.js.map +0 -7
  279. package/bundle/chunk-SXNY6HC4.js.map +0 -7
  280. package/bundle/chunk-VJATH7AN.js.map +0 -7
  281. package/bundle/chunk-ZY6DH2S4.js.map +0 -7
  282. package/bundle/deps-PHSLIA77.js.map +0 -7
  283. package/bundle/direct-api-transport-OAKYQBJR.js.map +0 -7
  284. package/bundle/dist-7HEHHQI2.js.map +0 -7
  285. package/bundle/heartbeat-tier3-3ZO3EVXP.js.map +0 -7
  286. package/bundle/install-ZAHTZ5M5.js.map +0 -7
  287. package/bundle/migrate-layout-RJJQLVGR.js.map +0 -7
  288. package/bundle/phase-config-V4XETN5F.js +0 -18
  289. package/bundle/sandbox-runtime-WHACQLLN.js +0 -22
  290. package/bundle/start-JT2BPMSW.js.map +0 -7
  291. package/bundle/system-status-XXJWTVJN.js +0 -243
  292. package/bundle/system-status-XXJWTVJN.js.map +0 -7
  293. package/bundle/user-registry-6PUJJ5J2.js.map +0 -7
  294. package/bundle/wrapper-WLHLG4MI.js.map +0 -7
  295. /package/bundle/{agent-api-rate-limit-4GEZ4YN5.js.map → agent-api-rate-limit-WCFXJMGY.js.map} +0 -0
  296. /package/bundle/{agent-registry-563P4EUJ.js.map → agent-registry-GU7ABOK5.js.map} +0 -0
  297. /package/bundle/{bridge-lock-transport-LXCF2IVN.js.map → bridge-lock-transport-4ZH7QTJP.js.map} +0 -0
  298. /package/bundle/{browser-2VZOGOGX.js.map → browser-EJNS35NT.js.map} +0 -0
  299. /package/bundle/{capability-WXEA2WFK.js.map → capability-JFWX3IQF.js.map} +0 -0
  300. /package/bundle/{chunk-CB6S3ZRF.js.map → chunk-2FAZIA37.js.map} +0 -0
  301. /package/bundle/{chunk-2FZJDMAF.js.map → chunk-3CACHBDI.js.map} +0 -0
  302. /package/bundle/{chunk-O4GKI3Q3.js.map → chunk-4S554KLW.js.map} +0 -0
  303. /package/bundle/{chunk-SSCGWDIC.js.map → chunk-65VCEC32.js.map} +0 -0
  304. /package/bundle/{chunk-V2QIAXWZ.js.map → chunk-7BSQ5UQO.js.map} +0 -0
  305. /package/bundle/{chunk-E7MV7WFT.js.map → chunk-7Z3HBPRY.js.map} +0 -0
  306. /package/bundle/{chunk-TY26WMQY.js.map → chunk-AFREM7FX.js.map} +0 -0
  307. /package/bundle/{chunk-N5VROZ7A.js.map → chunk-B6ZN6COK.js.map} +0 -0
  308. /package/bundle/{chunk-YEOZN5IE.js.map → chunk-DYBW4XXL.js.map} +0 -0
  309. /package/bundle/{chunk-56D3Y44D.js.map → chunk-EFJVUJBE.js.map} +0 -0
  310. /package/bundle/{chunk-FIAVVKGN.js.map → chunk-EUZDKV3C.js.map} +0 -0
  311. /package/bundle/{chunk-2LKQV2ND.js.map → chunk-FRKW6LWB.js.map} +0 -0
  312. /package/bundle/{chunk-DNDYD5SL.js.map → chunk-GP4XUKI5.js.map} +0 -0
  313. /package/bundle/{chunk-W726UGI6.js.map → chunk-GRVWZO4C.js.map} +0 -0
  314. /package/bundle/{chunk-OOKNHOCB.js.map → chunk-GWILHZPT.js.map} +0 -0
  315. /package/bundle/{chunk-BNBC4T45.js.map → chunk-HT2BPTZY.js.map} +0 -0
  316. /package/bundle/{chunk-FVUL44T4.js.map → chunk-IJT4KWXT.js.map} +0 -0
  317. /package/bundle/{chunk-IK4R3RBZ.js.map → chunk-JNIHEDKF.js.map} +0 -0
  318. /package/bundle/{chunk-4PIVWXUJ.js.map → chunk-LUNA6PM5.js.map} +0 -0
  319. /package/bundle/{chunk-MV5KOWOR.js.map → chunk-NDCRWEEJ.js.map} +0 -0
  320. /package/bundle/{chunk-ZOCEBV62.js.map → chunk-OKAQICWY.js.map} +0 -0
  321. /package/bundle/{chunk-TCI6FZTP.js.map → chunk-OLAURO5G.js.map} +0 -0
  322. /package/bundle/{chunk-YME7NRGP.js.map → chunk-OXTSWQCX.js.map} +0 -0
  323. /package/bundle/{chunk-HDOFJVFS.js.map → chunk-PEDX56EL.js.map} +0 -0
  324. /package/bundle/{chunk-ASYX43OU.js.map → chunk-Q32H6VPU.js.map} +0 -0
  325. /package/bundle/{chunk-IQKADER4.js.map → chunk-RWRRGE4U.js.map} +0 -0
  326. /package/bundle/{chunk-ULO2PX3T.js.map → chunk-TEFZ4JA4.js.map} +0 -0
  327. /package/bundle/{chunk-2RGR3LSV.js.map → chunk-TMUYFERL.js.map} +0 -0
  328. /package/bundle/{chunk-KBPVJGD7.js.map → chunk-URQPDCK5.js.map} +0 -0
  329. /package/bundle/{chunk-FJF42RZY.js.map → chunk-VUIX5AGB.js.map} +0 -0
  330. /package/bundle/{chunk-4HNCOQSK.js.map → chunk-WYHGNI56.js.map} +0 -0
  331. /package/bundle/{chunk-24V4A6RP.js.map → chunk-XX6BGTPO.js.map} +0 -0
  332. /package/bundle/{chunk-T7TAWGBX.js.map → chunk-Y76VUJSF.js.map} +0 -0
  333. /package/bundle/{chunk-TVSPVZTX.js.map → chunk-YDY6QVWJ.js.map} +0 -0
  334. /package/bundle/{chunk-V6CV3QPH.js.map → chunk-YRSMGJFP.js.map} +0 -0
  335. /package/bundle/{chunk-WP7FZHMI.js.map → chunk-YSKCQH6E.js.map} +0 -0
  336. /package/bundle/{chunk-NGZVJ52F.js.map → chunk-ZKJOFASV.js.map} +0 -0
  337. /package/bundle/{chunk-43DKPXTP.js.map → chunk-ZV4IWKDJ.js.map} +0 -0
  338. /package/bundle/{commands-XXFU2ZF7.js.map → commands-EWA4HNCM.js.map} +0 -0
  339. /package/bundle/{config-EWDZ234X.js.map → config-M3P5IOAI.js.map} +0 -0
  340. /package/bundle/{config-show-6J33O4TE.js.map → config-show-3DHPP26D.js.map} +0 -0
  341. /package/bundle/{daemon-LTDAXNA2.js.map → daemon-TB23FFWY.js.map} +0 -0
  342. /package/bundle/{delegation-tools-YDTWQMZD.js.map → delegation-tools-P2SCNL23.js.map} +0 -0
  343. /package/bundle/{deploy-lib-import-RGZJ3CGC.js.map → deploy-YYUCGGP3.js.map} +0 -0
  344. /package/bundle/{doctor-probes-3SLIUGKS.js.map → deploy-lib-import-T3UP4G6G.js.map} +0 -0
  345. /package/bundle/{discord-adapter-WUNYPTDE.js.map → discord-adapter-4TTETYDI.js.map} +0 -0
  346. /package/bundle/{env-schema-MSDP2YBO.js.map → doctor-probes-VDWFJKUB.js.map} +0 -0
  347. /package/bundle/{gossip-CS3G3447.js.map → env-schema-4JXQUOH4.js.map} +0 -0
  348. /package/bundle/{guardrails-24XK2COI.js.map → gossip-3C3BSNPN.js.map} +0 -0
  349. /package/bundle/{heartbeat-system-G4IFQXT6.js.map → guardrails-DL7ZSWVN.js.map} +0 -0
  350. /package/bundle/{hook-system-X6INNJGV.js.map → heartbeat-system-TDDIOVTC.js.map} +0 -0
  351. /package/bundle/{hotskills-6FQYTJIO.js.map → hook-system-M3POLUIB.js.map} +0 -0
  352. /package/bundle/{kanban-board-J6RO3ZU7.js.map → hotskills-FWX4QI7V.js.map} +0 -0
  353. /package/bundle/{kanban-channel-5EIXBFSA.js.map → kanban-board-M326B2XJ.js.map} +0 -0
  354. /package/bundle/{lazy-require-V6EFUATC.js.map → kanban-channel-IJ52OMNA.js.map} +0 -0
  355. /package/bundle/{logger-Y3VILPRH.js.map → lazy-require-KCRVT4SI.js.map} +0 -0
  356. /package/bundle/{main-chat-YLZDNQPO.js.map → logger-OWCSNYCA.js.map} +0 -0
  357. /package/bundle/{logs-YS3GDURO.js.map → logs-FXS4SCEM.js.map} +0 -0
  358. /package/bundle/{master-user-Z4M7KCJE.js.map → main-chat-ZNUZCTNS.js.map} +0 -0
  359. /package/bundle/{message-pipeline-MHEBDJLH.js.map → master-user-HSKM4ZFN.js.map} +0 -0
  360. /package/bundle/{nerve-VZNMFDGY.js.map → message-pipeline-KSONH4MT.js.map} +0 -0
  361. /package/bundle/{notification-VV2OR6NW.js.map → nerve-IGSXBKZZ.js.map} +0 -0
  362. /package/bundle/{orc-tools-CHRSXSAS.js.map → notification-BFSIEECG.js.map} +0 -0
  363. /package/bundle/{orc-KC4USP55.js.map → orc-EIGVTHAV.js.map} +0 -0
  364. /package/bundle/{paths-EDK6KWHG.js.map → orc-tools-A3G7WCSJ.js.map} +0 -0
  365. /package/bundle/{paths-RZF6WDMG.js.map → paths-3ZVW3NFL.js.map} +0 -0
  366. /package/bundle/{peer-auth-SRONOLNG.js.map → paths-X4LRYUI6.js.map} +0 -0
  367. /package/bundle/{peer-config-FRWLEYQ5.js.map → peer-auth-QC4EF2PM.js.map} +0 -0
  368. /package/bundle/{peer-jwt-XY3XRIA2.js.map → peer-config-TN55LFDC.js.map} +0 -0
  369. /package/bundle/{peer-transport-UBBXTDRP.js.map → peer-jwt-NCCPXJRX.js.map} +0 -0
  370. /package/bundle/{phase-config-V4XETN5F.js.map → peer-transport-I6JPLFZ2.js.map} +0 -0
  371. /package/bundle/{phase-transport-4NQHZX75.js.map → phase-transport-2BRWACDF.js.map} +0 -0
  372. /package/bundle/{reconcile-2EUXJ6W5.js.map → reconcile-CTFCLQRN.js.map} +0 -0
  373. /package/bundle/{registry-client-VN2MM2HI.js.map → rollback-ANRI3T5Z.js.map} +0 -0
  374. /package/bundle/{rollback-MVZ53XS4.js.map → sha-tracker-ZWBP6CIJ.js.map} +0 -0
  375. /package/bundle/{sandbox-runtime-WHACQLLN.js.map → skill-stats-JORH5DGM.js.map} +0 -0
  376. /package/bundle/{sha-tracker-2DB4R2TW.js.map → skill-watcher-E4MGLKLS.js.map} +0 -0
  377. /package/bundle/{skill-stats-TPD2NROA.js.map → sleep-SRCSXY6T.js.map} +0 -0
  378. /package/bundle/{skill-watcher-D7QYYYON.js.map → soul-bundle-VWAVHCZ6.js.map} +0 -0
  379. /package/bundle/{sleep-GH6DLBJJ.js.map → spin-IMW2MZOH.js.map} +0 -0
  380. /package/bundle/{soul-bundle-GXLMDBCC.js.map → spin-types-BLPYAETA.js.map} +0 -0
  381. /package/bundle/{spin-4DBYHS3E.js.map → src-6BTCMOD3.js.map} +0 -0
  382. /package/bundle/{spin-types-PLJH3SIK.js.map → stt-LGVPXMVR.js.map} +0 -0
  383. /package/bundle/{src-SUFZ27S5.js.map → subagent-runtime-3UJB4HUB.js.map} +0 -0
  384. /package/bundle/{stt-KD3AABKG.js.map → task-store-W5BFIAIH.js.map} +0 -0
  385. /package/bundle/{telegram-adapter-UJ3RYYV6.js.map → telegram-adapter-7G773NII.js.map} +0 -0
  386. /package/bundle/{subagent-runtime-LVECAUPV.js.map → tool-registry-J6TE3I2T.js.map} +0 -0
  387. /package/bundle/{task-store-2XRDM3AW.js.map → tool-sandbox-4UC6GAKA.js.map} +0 -0
  388. /package/bundle/{tool-registry-YU6WBXPA.js.map → transport-config-KBF5W2DP.js.map} +0 -0
  389. /package/bundle/{tool-sandbox-RNNPDR5M.js.map → update-424ZZQQ6.js.map} +0 -0
  390. /package/bundle/{transport-config-OK3MZPJK.js.map → usage-tracker-NXD364VX.js.map} +0 -0
  391. /package/bundle/{update-ENNPRW7Y.js.map → user-registry-35BW4XKM.js.map} +0 -0
  392. /package/bundle/{usage-tracker-HRSGC7QC.js.map → wrapper-W66YICNZ.js.map} +0 -0
package/bundle/abtars.js CHANGED
@@ -13,98 +13,103 @@ import {
13
13
  import {
14
14
  agent_api_rate_limit_exports,
15
15
  init_agent_api_rate_limit
16
- } from "./chunk-YEOZN5IE.js";
16
+ } from "./chunk-DYBW4XXL.js";
17
17
  import {
18
18
  createSkillReloadTask,
19
19
  createSkillStatsFlushTask,
20
20
  createUpdateCheckTask,
21
21
  phasePipelineDeps
22
- } from "./chunk-NP72ZB7P.js";
23
- import "./chunk-M6Q3IQ4H.js";
24
- import "./chunk-LE23VPN3.js";
22
+ } from "./chunk-HMKVL7AX.js";
23
+ import {
24
+ loadNLMConfig
25
+ } from "./chunk-BFDBGESM.js";
26
+ import "./chunk-63A7ZRIH.js";
25
27
  import {
26
28
  HeartbeatSystem,
27
29
  init_heartbeat_system,
28
30
  setHeartbeatInstance
29
- } from "./chunk-DNDYD5SL.js";
31
+ } from "./chunk-GP4XUKI5.js";
30
32
  import {
31
33
  phaseTransport
32
- } from "./chunk-ASYX43OU.js";
34
+ } from "./chunk-Q32H6VPU.js";
33
35
  import {
34
36
  resetAllCtxStarts
35
- } from "./chunk-J5NOL4DB.js";
37
+ } from "./chunk-JQDJPUHM.js";
36
38
  import "./chunk-ZAA7B5BN.js";
37
- import "./chunk-ZOCEBV62.js";
38
- import "./chunk-NGZVJ52F.js";
39
- import "./chunk-37EX63K4.js";
39
+ import "./chunk-OKAQICWY.js";
40
+ import {
41
+ loadAndValidateConfig
42
+ } from "./chunk-NDCRWEEJ.js";
43
+ import "./chunk-ZKJOFASV.js";
44
+ import "./chunk-LUW62WGO.js";
40
45
  import {
41
46
  SubagentRuntime
42
- } from "./chunk-2FZJDMAF.js";
47
+ } from "./chunk-3CACHBDI.js";
43
48
  import {
44
49
  createCapabilityRegistry
45
- } from "./chunk-24V4A6RP.js";
50
+ } from "./chunk-XX6BGTPO.js";
46
51
  import {
47
52
  sendNotification
48
- } from "./chunk-V2QIAXWZ.js";
53
+ } from "./chunk-7BSQ5UQO.js";
54
+ import "./chunk-WYHGNI56.js";
55
+ import {
56
+ readEnvWithDefault
57
+ } from "./chunk-YRSMGJFP.js";
49
58
  import {
50
59
  setPeerActivityCallback
51
- } from "./chunk-MQJG7OJX.js";
60
+ } from "./chunk-RIHQ37U5.js";
52
61
  import {
53
62
  abmind,
54
63
  loadAbmind,
55
64
  resetAbmindCache
56
- } from "./chunk-JAJ3DUQ2.js";
57
- import "./chunk-7WHXTCVD.js";
58
- import {
59
- phaseConfig
60
- } from "./chunk-CAOIIVFP.js";
61
- import "./chunk-HAZHNBBY.js";
62
- import "./chunk-MV5KOWOR.js";
63
- import "./chunk-KBPVJGD7.js";
65
+ } from "./chunk-UUIHL65U.js";
66
+ import "./chunk-B6ZN6COK.js";
67
+ import "./chunk-URQPDCK5.js";
64
68
  import "./chunk-VOLAZHA2.js";
65
- import "./chunk-2LKQV2ND.js";
66
- import "./chunk-YWZPKBO6.js";
67
- import {
68
- buildPolicy
69
- } from "./chunk-5V4VHKEA.js";
70
- import "./chunk-ULO2PX3T.js";
71
- import "./chunk-N5VROZ7A.js";
69
+ import "./chunk-NRUSRJXR.js";
70
+ import "./chunk-PROPYS3P.js";
72
71
  import {
73
72
  init_spin,
74
73
  spin
75
- } from "./chunk-GCFIK6OB.js";
76
- import "./chunk-MV6CJFWR.js";
77
- import "./chunk-4HNCOQSK.js";
74
+ } from "./chunk-AO32N2VB.js";
75
+ import "./chunk-FRKW6LWB.js";
76
+ import "./chunk-YWZPKBO6.js";
78
77
  import {
79
- readEnvWithDefault
80
- } from "./chunk-V6CV3QPH.js";
78
+ buildPolicy
79
+ } from "./chunk-WBTJ2E62.js";
80
+ import "./chunk-TEFZ4JA4.js";
81
+ import "./chunk-MV6CJFWR.js";
81
82
  import {
82
83
  init_kanban_channel,
83
84
  kanban_channel_exports
84
- } from "./chunk-SESM4GBM.js";
85
- import "./chunk-3QW2K53E.js";
86
- import "./chunk-56D3Y44D.js";
87
- import "./chunk-7RAGSHSH.js";
88
- import "./chunk-T7TAWGBX.js";
85
+ } from "./chunk-KTYGKPYM.js";
86
+ import "./chunk-5GCLBUBS.js";
87
+ import "./chunk-EFJVUJBE.js";
88
+ import "./chunk-AFREM7FX.js";
89
+ import {
90
+ init_user_registry,
91
+ loadUsers
92
+ } from "./chunk-ZV4IWKDJ.js";
93
+ import "./chunk-Y76VUJSF.js";
89
94
  import {
90
95
  gossip_exports,
91
96
  init_gossip
92
- } from "./chunk-BNBC4T45.js";
97
+ } from "./chunk-HT2BPTZY.js";
98
+ import {
99
+ init_peer_config,
100
+ peer_config_exports
101
+ } from "./chunk-4S554KLW.js";
102
+ import "./chunk-LUNA6PM5.js";
93
103
  import {
94
104
  import_websocket,
95
105
  import_websocket_server,
96
106
  init_wrapper
97
- } from "./chunk-WGWM4IZM.js";
98
- import "./chunk-S7ZIGIR5.js";
99
- import {
100
- init_peer_config,
101
- peer_config_exports
102
- } from "./chunk-O4GKI3Q3.js";
103
- import "./chunk-4PIVWXUJ.js";
107
+ } from "./chunk-ZT5ZBGWS.js";
108
+ import "./chunk-R76K6L6H.js";
104
109
  import {
105
110
  init_peer_jwt,
106
111
  peer_jwt_exports
107
- } from "./chunk-IQKADER4.js";
112
+ } from "./chunk-RWRRGE4U.js";
108
113
  import {
109
114
  appendRestartTimestamp,
110
115
  initBridgeLock,
@@ -115,30 +120,26 @@ import {
115
120
  updateBridgeLockField,
116
121
  writeRestartReason,
117
122
  writeSleepStatus
118
- } from "./chunk-W726UGI6.js";
123
+ } from "./chunk-GRVWZO4C.js";
119
124
  import {
120
125
  init_kanban_board,
121
126
  kanban_board_exports
122
- } from "./chunk-S6HEHCCG.js";
123
- import "./chunk-YME7NRGP.js";
124
- import "./chunk-TY26WMQY.js";
125
- import {
126
- init_user_registry,
127
- loadUsers
128
- } from "./chunk-43DKPXTP.js";
127
+ } from "./chunk-EQSG2CRM.js";
128
+ import "./chunk-GVM5YU5I.js";
129
+ import "./chunk-OXTSWQCX.js";
129
130
  import {
130
131
  decrypt,
131
132
  deriveKey,
132
133
  encrypt,
133
134
  loadKey,
134
135
  validateKey
135
- } from "./chunk-OY2HAK33.js";
136
- import "./chunk-ZY6DH2S4.js";
136
+ } from "./chunk-36ZEYDKZ.js";
137
+ import "./chunk-WTIGZO3N.js";
137
138
  import {
138
139
  readEntries,
139
140
  readEntry,
140
141
  writeEntry
141
- } from "./chunk-HDOFJVFS.js";
142
+ } from "./chunk-PEDX56EL.js";
142
143
  import {
143
144
  init_local_time,
144
145
  localISO
@@ -148,11 +149,11 @@ import {
148
149
  getEnv,
149
150
  initEnv,
150
151
  init_env_schema
151
- } from "./chunk-SSCGWDIC.js";
152
+ } from "./chunk-65VCEC32.js";
152
153
  import {
153
154
  init_log_and_swallow,
154
155
  logAndSwallow
155
- } from "./chunk-WP7FZHMI.js";
156
+ } from "./chunk-YSKCQH6E.js";
156
157
  import {
157
158
  getLogFile,
158
159
  init_logger,
@@ -161,16 +162,23 @@ import {
161
162
  logError,
162
163
  logInfo,
163
164
  logTrace,
164
- logWarn
165
- } from "./chunk-OOKNHOCB.js";
165
+ logWarn,
166
+ setLogLevel
167
+ } from "./chunk-GWILHZPT.js";
166
168
  import {
167
169
  localDate
168
170
  } from "./chunk-DGS7J4P6.js";
169
171
  import {
172
+ abmindHome,
170
173
  abtarsHome,
171
174
  abtarsRoot,
172
- init_paths
173
- } from "./chunk-H2K23MOF.js";
175
+ init_paths as init_paths2
176
+ } from "./chunk-GALQBVKO.js";
177
+ import {
178
+ init_paths,
179
+ resolveAbtarsHome,
180
+ resolveReleasesDir
181
+ } from "./chunk-O7KQG6ME.js";
174
182
  import {
175
183
  __commonJS,
176
184
  __require,
@@ -178,9 +186,9 @@ import {
178
186
  __toESM
179
187
  } from "./chunk-7K2YZTLD.js";
180
188
 
181
- // node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
189
+ // node_modules/dotenv/package.json
182
190
  var require_package = __commonJS({
183
- "node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json"(exports, module) {
191
+ "node_modules/dotenv/package.json"(exports, module) {
184
192
  module.exports = {
185
193
  name: "dotenv",
186
194
  version: "16.6.1",
@@ -246,9 +254,9 @@ var require_package = __commonJS({
246
254
  }
247
255
  });
248
256
 
249
- // node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js
257
+ // node_modules/dotenv/lib/main.js
250
258
  var require_main = __commonJS({
251
- "node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js"(exports, module) {
259
+ "node_modules/dotenv/lib/main.js"(exports, module) {
252
260
  var fs = __require("fs");
253
261
  var path = __require("path");
254
262
  var os = __require("os");
@@ -771,7 +779,7 @@ var ServiceRegistry = class {
771
779
  if (state.lastError?.includes("EADDRINUSE")) {
772
780
  const portMatch = state.lastError.match(/:(\d+)/);
773
781
  if (portMatch) {
774
- const { healPort } = await import("./self-healer-utils-KD6LV63S.js");
782
+ const { healPort } = await import("./self-healer-utils-IFAYOQO2.js");
775
783
  healPort(parseInt(portMatch[1], 10));
776
784
  }
777
785
  }
@@ -893,6 +901,85 @@ function createBootCtx(overrides = {}) {
893
901
  return { ...defaults, ...overrides };
894
902
  }
895
903
 
904
+ // src/boot/phase-config.ts
905
+ init_log_and_swallow();
906
+ import { writeFileSync as writeFileSync2 } from "node:fs";
907
+ import { join as join2 } from "node:path";
908
+ import { homedir as homedir3 } from "node:os";
909
+
910
+ // src/components/cli-flags.ts
911
+ import { existsSync as existsSync2 } from "node:fs";
912
+ import { join } from "node:path";
913
+ import { homedir as homedir2 } from "node:os";
914
+ function envBool(key) {
915
+ const v = process.env[key];
916
+ if (v === void 0 || v === "") return void 0;
917
+ return v === "true" || v === "1";
918
+ }
919
+ function parsePlatformFlags(args) {
920
+ const argv = args ?? process.argv.slice(2);
921
+ const transport = argv.includes("--acp") ? "acp" : argv.includes("--tmux") ? "tmux" : void 0;
922
+ if (argv.includes("--telegram") || argv.includes("--discord") || argv.includes("--irc") || argv.includes("--web") || argv.includes("--agent")) {
923
+ return {
924
+ telegram: argv.includes("--telegram"),
925
+ discord: argv.includes("--discord"),
926
+ irc: argv.includes("--irc"),
927
+ web: argv.includes("--web"),
928
+ agent: argv.includes("--agent"),
929
+ transport
930
+ };
931
+ }
932
+ const home2 = process.env["ABTARS_HOME"] ?? join(homedir2(), ".abtars");
933
+ const configDir = join(home2, "config");
934
+ const telegram = envBool("TELEGRAM_ENABLED") ?? !!process.env["TELEGRAM_BOT_TOKEN"];
935
+ const discord = envBool("DISCORD_ENABLED") ?? !!process.env["DISCORD_TOKEN"];
936
+ const irc = envBool("IRC_ENABLED") ?? existsSync2(join(configDir, "irc.json"));
937
+ const web = envBool("ENABLE_DASHBOARD") ?? false;
938
+ const agent = envBool("ENABLE_AGENT_API") ?? false;
939
+ return { telegram, discord, irc, web, agent, transport };
940
+ }
941
+
942
+ // src/boot/phase-config.ts
943
+ init_logger();
944
+ init_env_schema();
945
+ init_paths2();
946
+ async function phaseConfig(ctx) {
947
+ const binDir = join2(homedir3(), ".local", "bin");
948
+ if (!process.env["PATH"]?.includes(binDir)) {
949
+ process.env["PATH"] = `${binDir}:${process.env["PATH"] ?? ""}`;
950
+ }
951
+ ctx.platforms = parsePlatformFlags();
952
+ ctx.config = await loadAndValidateConfig();
953
+ setLogLevel(ctx.config.logLevel);
954
+ const provider = getEnv().memory;
955
+ const memoryEnabled = provider !== "none";
956
+ const memoryDir = memoryEnabled ? join2(abmindHome(), "memory") : "";
957
+ ctx.memoryConfig = { memoryEnabled, memoryDir };
958
+ ctx.bridgeLockPath = join2(abtarsHome(), "bridge.lock");
959
+ ctx.sleepAuditDir = memoryDir ? join2(memoryDir, "sleep") : "";
960
+ const { initUsageTracker } = await import("./usage-tracker-NXD364VX.js");
961
+ initUsageTracker(abtarsHome());
962
+ ctx.sttConfig = ctx.config.voice.sttEnabled ? { provider: "groq", apiKey: ctx.config.voice.groqApiKey, model: ctx.config.voice.sttModel } : null;
963
+ ctx.ttsConfig = ctx.config.voice.ttsEnabled ? { voice: ctx.config.voice.ttsVoice } : null;
964
+ ctx.nlmConfig = loadNLMConfig();
965
+ const enabledList = [
966
+ ctx.platforms.telegram && "telegram",
967
+ ctx.platforms.discord && "discord"
968
+ ].filter(Boolean).join(", ");
969
+ logInfo("main", "\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 BRIDGE START \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500");
970
+ logInfo("main", `v${ctx.version}${ctx.commit ? "-" + ctx.commit : ""} (platforms=${enabledList}, log=${ctx.config.logLevel})`);
971
+ if (ctx.sttConfig) logInfo("main", `\u{1F3A4} STT enabled (${ctx.sttConfig.provider}/${ctx.sttConfig.model || "whisper-large-v3"})`);
972
+ if (ctx.ttsConfig) logInfo("main", `\u{1F50A} TTS enabled (Edge TTS / ${ctx.ttsConfig.voice})`);
973
+ try {
974
+ writeFileSync2(join2(abtarsHome(), "logs", "launchd.log"), "", "utf-8");
975
+ } catch (err) {
976
+ logAndSwallow("phase_config", "op", err);
977
+ }
978
+ const { loadHookConfig } = await import("./hook-system-M3POLUIB.js");
979
+ loadHookConfig();
980
+ return "ran";
981
+ }
982
+
896
983
  // src/boot/phase-memory.ts
897
984
  init_logger();
898
985
 
@@ -935,29 +1022,34 @@ var explicitMethods = {
935
1022
  var nullMemory = new Proxy(explicitMethods, handler);
936
1023
 
937
1024
  // src/boot/phase-memory.ts
938
- import { existsSync as existsSync2 } from "node:fs";
939
- import { join } from "node:path";
940
- import { homedir as homedir2 } from "node:os";
1025
+ import { existsSync as existsSync3 } from "node:fs";
1026
+ import { join as join3 } from "node:path";
1027
+ import { homedir as homedir4 } from "node:os";
941
1028
  async function phaseMemory(ctx) {
942
- const home2 = process.env["ABTARS_HOME"] ?? join(homedir2(), ".abtars");
943
- const abmindPaths = [
944
- join(home2, "app", "node_modules", "abmind", "package.json"),
945
- join(home2, "app", "bundle", "node_modules", "abmind", "package.json")
946
- ];
947
- const existing = abmindPaths.filter((p) => existsSync2(p));
948
- if (existing.length > 1) {
949
- logError("boot", `FATAL: duplicate abmind at ${existing.map((p) => p.replace("/package.json", "")).join(" + ")}. Delete one to prevent dual DB connections. Refusing to start.`);
1029
+ const home2 = process.env["ABTARS_HOME"] ?? join3(homedir4(), ".abtars");
1030
+ const legacyAbmindPkgs = [
1031
+ join3(home2, "app", "bundle", "node_modules", "abmind", "package.json"),
1032
+ join3(home2, "app", "node_modules", "abmind", "package.json")
1033
+ ].filter((p) => existsSync3(p));
1034
+ const mod = await loadAbmind();
1035
+ if (legacyAbmindPkgs.length > 1) {
1036
+ logError("boot", `FATAL: duplicate bundled abmind at ${legacyAbmindPkgs.map((p) => p.replace("/package.json", "")).join(" + ")}. Delete one to prevent dual DB connections. Refusing to start.`);
1037
+ process.exit(1);
1038
+ }
1039
+ if (legacyAbmindPkgs.length === 1 && !mod) {
1040
+ logError("boot", `FATAL: legacy bundled abmind at ${legacyAbmindPkgs[0].replace("/package.json", "")} but no global abmind is resolvable. #1243 ships abmind separately \u2014 install it first: npm install -g abmind@latest. Refusing to start without memory.`);
950
1041
  process.exit(1);
951
1042
  }
952
- const mod = await loadAbmind();
953
1043
  if (!mod) {
954
- logWarn("main", "\u26A0\uFE0F abmind not available \u2014 running without persistent memory");
955
1044
  ctx.memory = nullMemory;
1045
+ ctx.memoryConfig.memoryEnabled = false;
1046
+ ctx.memoryConfig.memoryDir = "";
956
1047
  return "skipped";
957
1048
  }
958
1049
  if (!ctx.memoryConfig.memoryEnabled) {
959
1050
  logInfo("main", "\u{1F9E0} Memory disabled");
960
1051
  ctx.memory = nullMemory;
1052
+ ctx.memoryConfig.memoryDir = "";
961
1053
  return "skipped";
962
1054
  }
963
1055
  try {
@@ -969,15 +1061,17 @@ async function phaseMemory(ctx) {
969
1061
  } catch (err) {
970
1062
  logWarn("main", `\u26A0\uFE0F Memory init failed: ${err instanceof Error ? err.message : String(err)}. Running without persistent memory.`);
971
1063
  ctx.memory = nullMemory;
1064
+ ctx.memoryConfig.memoryEnabled = false;
1065
+ ctx.memoryConfig.memoryDir = "";
972
1066
  return "skipped";
973
1067
  }
974
1068
  }
975
1069
 
976
1070
  // src/boot/phase-memory-ipc.ts
977
1071
  async function phaseMemoryIpc(ctx) {
978
- if (!ctx.memory) return "skipped";
979
- const { MemoryIpcServer } = await import("abmind");
980
- const { SqliteBackend } = await import("abmind");
1072
+ const mod = abmind() ?? await loadAbmind();
1073
+ if (!mod) return "skipped";
1074
+ const { MemoryIpcServer, SqliteBackend } = mod;
981
1075
  const ipcBackend = new SqliteBackend(ctx.memoryConfig);
982
1076
  await ipcBackend.initialize();
983
1077
  const memoryIpc = new MemoryIpcServer(ipcBackend);
@@ -1051,7 +1145,7 @@ async function phasePlatformsConnect(ctx) {
1051
1145
  registry.register("telegram", {
1052
1146
  configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
1053
1147
  async create() {
1054
- const { TelegramAdapter } = await import("./telegram-adapter-UJ3RYYV6.js");
1148
+ const { TelegramAdapter } = await import("./telegram-adapter-7G773NII.js");
1055
1149
  const adapter = new TelegramAdapter(
1056
1150
  { botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
1057
1151
  { pipeline: { handleInbound: (msg) => recovery.handle(msg, adapter) }, conversationBuffer: ctx.conversationBuffer, transport: null, memory: null, sessionManager: ctx.sessionManager, actionGate: ctx.actionGate }
@@ -1079,11 +1173,11 @@ async function phasePlatformsConnect(ctx) {
1079
1173
  registry.register("discord", {
1080
1174
  configured: Boolean(config.discord.enabled && config.discord.botToken && config.discord.allowedUserIds?.size),
1081
1175
  async create() {
1082
- const { isValidSnowflake } = await import("./config-EWDZ234X.js");
1176
+ const { isValidSnowflake } = await import("./config-M3P5IOAI.js");
1083
1177
  if (!config.discord.appId || !isValidSnowflake(config.discord.appId)) {
1084
1178
  throw new Error("DISCORD_APP_ID missing or invalid \u2014 Discord disabled");
1085
1179
  }
1086
- const { DiscordAdapter } = await import("./discord-adapter-WUNYPTDE.js");
1180
+ const { DiscordAdapter } = await import("./discord-adapter-4TTETYDI.js");
1087
1181
  const adapter = new DiscordAdapter(
1088
1182
  { botToken: config.discord.botToken, appId: config.discord.appId, allowedUserIds: config.discord.allowedUserIds },
1089
1183
  { pipeline: { handleInbound: (msg) => recovery.handle(msg, adapter) }, transport: null, memory: null, conversationBuffer: ctx.conversationBuffer }
@@ -1112,8 +1206,8 @@ async function phasePlatformsConnect(ctx) {
1112
1206
  registry.register("irc", {
1113
1207
  configured: platforms.irc,
1114
1208
  async create() {
1115
- const { loadIrcConfig } = await import("./irc-config-TTWNYFLH.js");
1116
- const { IrcAdapter } = await import("./irc-adapter-IEJQKKJF.js");
1209
+ const { loadIrcConfig } = await import("./irc-config-CP7ZMUOX.js");
1210
+ const { IrcAdapter } = await import("./irc-adapter-PTTZD32W.js");
1117
1211
  const ircConfig = loadIrcConfig();
1118
1212
  if (!ircConfig) throw new Error("irc.json missing or empty");
1119
1213
  const adapter = new IrcAdapter(ircConfig, { onMessage: (msg) => recovery.handle(msg, adapter) });
@@ -1143,10 +1237,10 @@ init_logger();
1143
1237
  async function phaseCapabilities(ctx) {
1144
1238
  const { config, memory, transport, runtime, capabilities, pipelineDeps } = ctx;
1145
1239
  try {
1146
- const { SkillWatcher } = await import("./skill-watcher-D7QYYYON.js");
1147
- const { abtarsHome: abtarsHome2 } = await import("./paths-RZF6WDMG.js");
1148
- const { join: join7 } = await import("node:path");
1149
- const sw = new SkillWatcher(join7(abtarsHome2(), "skills"), join7(abtarsHome2(), "skills", "skills_catalog.md"));
1240
+ const { SkillWatcher } = await import("./skill-watcher-E4MGLKLS.js");
1241
+ const { abtarsHome: abtarsHome2 } = await import("./paths-X4LRYUI6.js");
1242
+ const { join: join9 } = await import("node:path");
1243
+ const sw = new SkillWatcher(join9(abtarsHome2(), "skills"), join9(abtarsHome2(), "skills", "skills_catalog.md"));
1150
1244
  sw.generateCatalog();
1151
1245
  } catch {
1152
1246
  }
@@ -1155,24 +1249,24 @@ async function phaseCapabilities(ctx) {
1155
1249
  logWarn("boot", `${phaseCapabilities.name}: skipping \u2014 transport not available`);
1156
1250
  return "skipped";
1157
1251
  }
1158
- const { createCapabilityApi } = await import("./capability-WXEA2WFK.js");
1159
- const { getEnv: getEnv2 } = await import("./env-schema-MSDP2YBO.js");
1252
+ const { createCapabilityApi } = await import("./capability-JFWX3IQF.js");
1253
+ const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
1160
1254
  const disabled = new Set(getEnv2().disabledCapabilities.split(",").map((s) => s.trim()).filter(Boolean));
1161
1255
  let loaded = [];
1162
1256
  let staticCaps;
1163
1257
  try {
1164
- ({ capabilities: staticCaps } = await import("./_registry.generated-7DRCE4V6.js"));
1258
+ ({ capabilities: staticCaps } = await import("./_registry.generated-RC6PEH6Z.js"));
1165
1259
  } catch (err) {
1166
1260
  logError("capabilities", `Registry import failed: ${err instanceof Error ? err.message : String(err)}. Loading individually.`);
1167
1261
  staticCaps = [];
1168
1262
  const individualCaps = [
1169
- { name: "hotskills", load: () => import("./hotskills-6FQYTJIO.js") },
1170
- { name: "browser", load: () => import("./browser-2VZOGOGX.js") }
1263
+ { name: "hotskills", load: () => import("./hotskills-FWX4QI7V.js") },
1264
+ { name: "browser", load: () => import("./browser-EJNS35NT.js") }
1171
1265
  ];
1172
1266
  for (const { name, load } of individualCaps) {
1173
1267
  if (disabled.has(name)) continue;
1174
1268
  try {
1175
- const { shouldAttempt } = await import("./sha-tracker-2DB4R2TW.js");
1269
+ const { shouldAttempt } = await import("./sha-tracker-ZWBP6CIJ.js");
1176
1270
  if (!shouldAttempt("missing-dep", name)) {
1177
1271
  logDebug("capabilities", `Skipped "${name}": SHA cooldown active`);
1178
1272
  continue;
@@ -1180,7 +1274,7 @@ async function phaseCapabilities(ctx) {
1180
1274
  const mod = await load();
1181
1275
  staticCaps.push({ name, module: mod });
1182
1276
  } catch (e) {
1183
- const { recordResult } = await import("./sha-tracker-2DB4R2TW.js");
1277
+ const { recordResult } = await import("./sha-tracker-ZWBP6CIJ.js");
1184
1278
  recordResult("missing-dep", name, false, e instanceof Error ? e.message : String(e));
1185
1279
  logWarn("capabilities", `Skipped "${name}": ${e instanceof Error ? e.message : String(e)}`);
1186
1280
  }
@@ -1306,7 +1400,7 @@ function startInProcWatchdog(opts) {
1306
1400
  // src/boot/phase-heartbeat.ts
1307
1401
  var TAG3 = "heartbeat";
1308
1402
  async function phaseHeartbeat(ctx) {
1309
- const { init: initSkillStats } = await import("./skill-stats-TPD2NROA.js");
1403
+ const { init: initSkillStats } = await import("./skill-stats-JORH5DGM.js");
1310
1404
  initSkillStats();
1311
1405
  updateBridgeLockField("startedAt", ctx.startedAt);
1312
1406
  const hbIntervalMs = Math.max(60, parseInt(readEnvWithDefault("HEARTBEAT_INTERVAL_SEC", "60", "heartbeat tick interval"), 10)) * 1e3;
@@ -1338,7 +1432,7 @@ async function phaseHeartbeat(ctx) {
1338
1432
  heartbeat.registerTask(createSkillStatsFlushTask());
1339
1433
  heartbeat.registerTask(createSkillReloadTask());
1340
1434
  heartbeat.registerTask(createUpdateCheckTask((msg) => {
1341
- import("./notification-VV2OR6NW.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG3, "sendNotification update-check", err));
1435
+ import("./notification-BFSIEECG.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG3, "sendNotification update-check", err));
1342
1436
  }));
1343
1437
  heartbeat.registerTask({
1344
1438
  name: "restart-check",
@@ -1350,14 +1444,14 @@ async function phaseHeartbeat(ctx) {
1350
1444
  }
1351
1445
  }
1352
1446
  });
1353
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
1447
+ const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
1354
1448
  const masterUser = loadUsers().users.find((u) => u.role === "master");
1355
1449
  const masterUserId = masterUser?.userId ?? "master";
1356
1450
  ctx.sendSystemMessage = async (prompt) => {
1357
1451
  try {
1358
1452
  const response = await spin2.inject(masterUserId, `[SYSTEM] ${prompt}`, { deliver: true });
1359
1453
  if (response) {
1360
- const { sendNotification: sendNotification2 } = await import("./notification-VV2OR6NW.js");
1454
+ const { sendNotification: sendNotification2 } = await import("./notification-BFSIEECG.js");
1361
1455
  sendNotification2(ctx, response);
1362
1456
  }
1363
1457
  } catch (err) {
@@ -1378,11 +1472,11 @@ async function phaseSleep(ctx) {
1378
1472
  logWarn("boot", `${phaseSleep.name}: skipping \u2014 heartbeat not available`);
1379
1473
  return "skipped";
1380
1474
  }
1381
- const { createSleepHandle } = await import("./sleep-GH6DLBJJ.js");
1382
- const { killWakeInhibit } = await import("./commands-XXFU2ZF7.js");
1475
+ const { createSleepHandle } = await import("./sleep-SRCSXY6T.js");
1476
+ const { killWakeInhibit } = await import("./commands-EWA4HNCM.js");
1383
1477
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
1384
1478
  let subagent = null;
1385
- const { getEnv: getEnv2 } = await import("./env-schema-MSDP2YBO.js");
1479
+ const { getEnv: getEnv2 } = await import("./env-schema-4JXQUOH4.js");
1386
1480
  const runtime = {
1387
1481
  async complete(prompt) {
1388
1482
  if (!subagent) subagent = new SubagentRuntime();
@@ -1406,14 +1500,14 @@ async function phaseSleep(ctx) {
1406
1500
  init_log_and_swallow();
1407
1501
  init_env_schema();
1408
1502
  init_logger();
1409
- import { join as join3 } from "node:path";
1503
+ import { join as join5 } from "node:path";
1410
1504
 
1411
1505
  // src/components/dashboard/dashboard-config.ts
1412
1506
  init_logger();
1413
- init_paths();
1414
- import { existsSync as existsSync3 } from "node:fs";
1507
+ init_paths2();
1508
+ import { existsSync as existsSync4 } from "node:fs";
1415
1509
  import { resolve as resolve2 } from "node:path";
1416
- import { homedir as homedir3 } from "node:os";
1510
+ import { homedir as homedir5 } from "node:os";
1417
1511
  var DASHBOARD_DEFAULTS = {
1418
1512
  webPort: 3e3,
1419
1513
  webHost: "127.0.0.1",
@@ -1476,8 +1570,8 @@ function buildStatusSnapshot(refs) {
1476
1570
  heartbeat,
1477
1571
  cron: readCronStatus(),
1478
1572
  notebooklm: refs.notebooklm ? { enabled: true } : null,
1479
- gwsAuth: existsSync3(resolve2(homedir3(), ".config", "gws-cli", "token.json.enc")),
1480
- xAuth: existsSync3(resolve2(abtarsHome(), "secret", "cookies", "x-cookies.json")),
1573
+ gwsAuth: existsSync4(resolve2(homedir5(), ".config", "gws-cli", "token.json.enc")),
1574
+ xAuth: existsSync4(resolve2(abtarsHome(), "secret", "cookies", "x-cookies.json")),
1481
1575
  agentApi: refs.agentApi ? { traffic: refs.agentApi.getTrafficLog() } : null,
1482
1576
  model: refs.model ?? { name: "unknown", provider: "unknown", fallbackChain: [] },
1483
1577
  subsystems: refs.subsystems ?? []
@@ -1650,11 +1744,11 @@ function parseOptionalNumber(val) {
1650
1744
  // src/components/dashboard/dashboard-server.ts
1651
1745
  init_log_and_swallow();
1652
1746
  init_local_time();
1653
- init_paths();
1747
+ init_paths2();
1654
1748
  init_wrapper();
1655
1749
  import * as http from "node:http";
1656
- import { readFileSync as readFileSync2, existsSync as existsSync4 } from "node:fs";
1657
- import { join as join2, dirname } from "node:path";
1750
+ import { readFileSync as readFileSync2, existsSync as existsSync5 } from "node:fs";
1751
+ import { join as join4, dirname } from "node:path";
1658
1752
  import { fileURLToPath } from "node:url";
1659
1753
 
1660
1754
  // src/components/status-broadcaster.ts
@@ -1778,7 +1872,7 @@ var DashboardServer = class {
1778
1872
  }
1779
1873
  /** Start listening on the configured host and port. */
1780
1874
  start() {
1781
- return new Promise((resolve4, reject) => {
1875
+ return new Promise((resolve3, reject) => {
1782
1876
  const { config } = this.deps;
1783
1877
  this.server = http.createServer((req, res) => {
1784
1878
  this.handleRequest(req, res);
@@ -1791,13 +1885,13 @@ var DashboardServer = class {
1791
1885
  });
1792
1886
  this.server.listen(config.webPort, config.webHost, () => {
1793
1887
  logInfo(TAG5, `Dashboard listening on ${config.webHost}:${config.webPort}`);
1794
- resolve4();
1888
+ resolve3();
1795
1889
  });
1796
1890
  });
1797
1891
  }
1798
1892
  /** Close all WebSocket connections and stop the HTTP server. */
1799
1893
  stop() {
1800
- return new Promise((resolve4) => {
1894
+ return new Promise((resolve3) => {
1801
1895
  this._broadcaster.shutdown();
1802
1896
  for (const client of this.wss.clients) {
1803
1897
  try {
@@ -1809,9 +1903,9 @@ var DashboardServer = class {
1809
1903
  this.wss.close(() => {
1810
1904
  if (this.server) {
1811
1905
  this.server.closeAllConnections();
1812
- this.server.close(() => resolve4());
1906
+ this.server.close(() => resolve3());
1813
1907
  } else {
1814
- resolve4();
1908
+ resolve3();
1815
1909
  }
1816
1910
  });
1817
1911
  });
@@ -1823,8 +1917,8 @@ var DashboardServer = class {
1823
1917
  const method = req.method ?? "GET";
1824
1918
  const pathname = url.split("?")[0];
1825
1919
  if (method === "GET" && pathname === "/") {
1826
- const indexPath = join2(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
1827
- if (existsSync4(indexPath)) {
1920
+ const indexPath = join4(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
1921
+ if (existsSync5(indexPath)) {
1828
1922
  let html = readFileSync2(indexPath, "utf-8");
1829
1923
  const agentApi = this.deps.agentApiConfig;
1830
1924
  if (agentApi) {
@@ -1842,15 +1936,15 @@ var DashboardServer = class {
1842
1936
  if (method === "GET" && /^\/(js|css|assets|[\w-]+\.(js|css|jpg|png|ico))/.test(pathname ?? "")) {
1843
1937
  const safePath = (pathname ?? "").replace(/\.\./g, "");
1844
1938
  if (safePath === "/assets/logo.png") {
1845
- const customLogo = join2(abtarsHome(), "logo", "logo.png");
1846
- if (existsSync4(customLogo)) {
1939
+ const customLogo = join4(abtarsHome(), "logo", "logo.png");
1940
+ if (existsSync5(customLogo)) {
1847
1941
  res.writeHead(200, { "Content-Type": "image/png" });
1848
1942
  res.end(readFileSync2(customLogo));
1849
1943
  return;
1850
1944
  }
1851
1945
  }
1852
- const filePath = join2(dirname(fileURLToPath(import.meta.url)), "public", safePath);
1853
- if (existsSync4(filePath)) {
1946
+ const filePath = join4(dirname(fileURLToPath(import.meta.url)), "public", safePath);
1947
+ if (existsSync5(filePath)) {
1854
1948
  const ext = safePath.split(".").pop() ?? "";
1855
1949
  const mimeTypes = { js: "text/javascript", css: "text/css", jpg: "image/jpeg", png: "image/png", ico: "image/x-icon", html: "text/html" };
1856
1950
  res.writeHead(200, { "Content-Type": (mimeTypes[ext] ?? "application/octet-stream") + (["js", "css", "html"].includes(ext) ? "; charset=utf-8" : "") });
@@ -1950,7 +2044,7 @@ var DashboardServer = class {
1950
2044
  if (method === "GET" && pathname === "/api/cron") {
1951
2045
  if (!this.deps.authGate.guard(req, res)) return;
1952
2046
  try {
1953
- const { readEntries: readEntries2 } = await import("./task-store-2XRDM3AW.js");
2047
+ const { readEntries: readEntries2 } = await import("./task-store-W5BFIAIH.js");
1954
2048
  res.writeHead(200, { "Content-Type": "application/json" });
1955
2049
  res.end(JSON.stringify({ ok: true, entries: readEntries2() }));
1956
2050
  } catch (err) {
@@ -2001,7 +2095,7 @@ var DashboardServer = class {
2001
2095
  };
2002
2096
  function readLogLines(cutoffMs, levelFilter, limit) {
2003
2097
  const logFile = getLogFile();
2004
- if (!existsSync4(logFile)) return [];
2098
+ if (!existsSync5(logFile)) return [];
2005
2099
  const content = readFileSync2(logFile, "utf-8");
2006
2100
  const allLines = content.split("\n").filter((l) => l.length > 0);
2007
2101
  const cutoffIso = localISO(new Date(cutoffMs));
@@ -2060,7 +2154,7 @@ async function phaseDashboard(ctx) {
2060
2154
  const token = randomBytes(32).toString("hex");
2061
2155
  dashConfig.webAuthToken = token;
2062
2156
  process.env["WEB_AUTH"] = token;
2063
- const envPath = join3(process.cwd(), "config", ".env");
2157
+ const envPath = join5(process.cwd(), "config", ".env");
2064
2158
  try {
2065
2159
  let content = "";
2066
2160
  try {
@@ -2175,11 +2269,11 @@ WEB_AUTH=${token}
2175
2269
 
2176
2270
  // src/components/agent-api-server.ts
2177
2271
  init_log_and_swallow();
2178
- init_paths();
2272
+ init_paths2();
2179
2273
  import { createServer as createServer2 } from "http";
2180
2274
  import { createServer as createHttpsServer } from "https";
2181
- import { readFileSync as readFileSync3, existsSync as existsSync5, appendFileSync, mkdirSync, writeFileSync as writeFileSync2 } from "fs";
2182
- import { join as join4 } from "path";
2275
+ import { readFileSync as readFileSync3, existsSync as existsSync6, appendFileSync, mkdirSync, writeFileSync as writeFileSync3 } from "fs";
2276
+ import { join as join6 } from "path";
2183
2277
  init_logger();
2184
2278
  init_logger();
2185
2279
 
@@ -2388,7 +2482,7 @@ function normalizeIp(raw) {
2388
2482
  }
2389
2483
  var MAX_BODY_BYTES = 6 * 1024 * 1024;
2390
2484
  function readBody(req) {
2391
- return new Promise((resolve4, reject) => {
2485
+ return new Promise((resolve3, reject) => {
2392
2486
  const chunks = [];
2393
2487
  let size = 0;
2394
2488
  req.on("data", (c) => {
@@ -2400,7 +2494,7 @@ function readBody(req) {
2400
2494
  }
2401
2495
  chunks.push(c);
2402
2496
  });
2403
- req.on("end", () => resolve4(Buffer.concat(chunks).toString()));
2497
+ req.on("end", () => resolve3(Buffer.concat(chunks).toString()));
2404
2498
  req.on("error", reject);
2405
2499
  });
2406
2500
  }
@@ -2430,11 +2524,11 @@ var AgentApiServer = class {
2430
2524
  this.runtime = deps.runtime;
2431
2525
  this.onPeerActivity = deps.onPeerActivity;
2432
2526
  this.a2aAdapter = deps.a2aAdapter;
2433
- const configDir = join4(abtarsHome(), "config");
2434
- const identityCrtPath = join4(configDir, "identity.crt");
2435
- const identityKeyPath = join4(configDir, "identity.tls.key");
2527
+ const configDir = join6(abtarsHome(), "config");
2528
+ const identityCrtPath = join6(configDir, "identity.crt");
2529
+ const identityKeyPath = join6(configDir, "identity.tls.key");
2436
2530
  let hasTls = false;
2437
- if (existsSync5(identityCrtPath) && existsSync5(identityKeyPath)) {
2531
+ if (existsSync6(identityCrtPath) && existsSync6(identityKeyPath)) {
2438
2532
  try {
2439
2533
  this.server = createHttpsServer({
2440
2534
  key: readFileSync3(identityKeyPath),
@@ -2453,14 +2547,14 @@ var AgentApiServer = class {
2453
2547
  if (!hasTls) {
2454
2548
  this.server = createServer2((req, res) => this.handle(req, res));
2455
2549
  }
2456
- this.logDir = join4(abtarsHome(), "logs", "agents");
2550
+ this.logDir = join6(abtarsHome(), "logs", "agents");
2457
2551
  mkdirSync(this.logDir, { recursive: true });
2458
2552
  this.logFile = this.newLogFile();
2459
2553
  try {
2460
2554
  const name = deps.config.agentCodename;
2461
2555
  const candidates = [
2462
- join4(abtarsRoot(), "prompts", `agent_${name}.md`),
2463
- join4(abtarsRoot(), "prompts", "agent_default.md")
2556
+ join6(abtarsRoot(), "prompts", `agent_${name}.md`),
2557
+ join6(abtarsRoot(), "prompts", "agent_default.md")
2464
2558
  ];
2465
2559
  this.agentRules = "";
2466
2560
  for (const p of candidates) {
@@ -2477,7 +2571,7 @@ var AgentApiServer = class {
2477
2571
  }
2478
2572
  }
2479
2573
  async start() {
2480
- const { WebSocketServer: WebSocketServer2 } = await import("./wrapper-WLHLG4MI.js");
2574
+ const { WebSocketServer: WebSocketServer2 } = await import("./wrapper-W66YICNZ.js");
2481
2575
  this.peerWss = new WebSocketServer2({ noServer: true });
2482
2576
  this.server.on("upgrade", (req, socket, head) => {
2483
2577
  if (req.url !== "/v1/ws") {
@@ -2491,12 +2585,12 @@ var AgentApiServer = class {
2491
2585
  return;
2492
2586
  }
2493
2587
  const token = auth.slice(7);
2494
- import("./peer-jwt-XY3XRIA2.js").then(({ verifyJwt }) => {
2495
- import("./peer-config-FRWLEYQ5.js").then(({ loadPeerConfig }) => {
2588
+ import("./peer-jwt-NCCPXJRX.js").then(({ verifyJwt }) => {
2589
+ import("./peer-config-TN55LFDC.js").then(({ loadPeerConfig }) => {
2496
2590
  const config = loadPeerConfig();
2497
2591
  for (const [name, entry] of Object.entries(config.peers)) {
2498
2592
  const result = verifyJwt(token, entry.token, config.self.name);
2499
- if (result.status === "valid") {
2593
+ if (result.ok) {
2500
2594
  this.peerWss.handleUpgrade(req, socket, head, (ws) => {
2501
2595
  this.peerWsConnections.set(name, ws);
2502
2596
  logInfo(TAG8, `Peer WS connected: ${name}`);
@@ -2525,9 +2619,9 @@ var AgentApiServer = class {
2525
2619
  socket.destroy();
2526
2620
  });
2527
2621
  });
2528
- return new Promise((resolve4, reject) => {
2622
+ return new Promise((resolve3, reject) => {
2529
2623
  this.server.on("error", (err) => reject(err));
2530
- this.server.listen(this.config.port, () => resolve4());
2624
+ this.server.listen(this.config.port, () => resolve3());
2531
2625
  });
2532
2626
  }
2533
2627
  async stop() {
@@ -2535,7 +2629,7 @@ var AgentApiServer = class {
2535
2629
  for (const ws of this.peerWsConnections.values()) ws.close();
2536
2630
  this.peerWsConnections.clear();
2537
2631
  this.server.closeAllConnections();
2538
- return new Promise((resolve4) => this.server.close(() => resolve4()));
2632
+ return new Promise((resolve3) => this.server.close(() => resolve3()));
2539
2633
  }
2540
2634
  /** Push a message to a connected peer via WS. Returns true if delivered. */
2541
2635
  pushToPeer(peerName, method, payload) {
@@ -2559,12 +2653,12 @@ var AgentApiServer = class {
2559
2653
  if (!ws || ws.readyState !== ws.OPEN) return;
2560
2654
  let result = { error: "unknown method" };
2561
2655
  if (msg.method === "delegate") {
2562
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
2656
+ const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
2563
2657
  const p = msg.payload;
2564
2658
  const { cardId } = spin2.dispatch({ type: "W", goal: p.goal, title: p.goal.slice(0, 60), source: "peer", priority: p.priority ?? "MEDIUM" });
2565
2659
  result = { ok: true, taskId: cardId };
2566
2660
  } else if (msg.method === "check") {
2567
- const { kanbanGetCard } = await import("./kanban-board-J6RO3ZU7.js");
2661
+ const { kanbanGetCard } = await import("./kanban-board-M326B2XJ.js");
2568
2662
  const card = kanbanGetCard(msg.payload.taskId);
2569
2663
  result = card ? { taskId: card.id, status: card.status, result: card.result_summary, error: card.error } : { error: "not found" };
2570
2664
  }
@@ -2593,11 +2687,11 @@ var AgentApiServer = class {
2593
2687
  logInfo(TAG8, "A2A idle timeout \u2014 saving transcript, closing log, killing session");
2594
2688
  try {
2595
2689
  const today = localDate();
2596
- const dir = join4(this.workingDir, "memory", "working", today);
2690
+ const dir = join6(this.workingDir, "memory", "working", today);
2597
2691
  mkdirSync(dir, { recursive: true });
2598
- const dest = join4(dir, "transcript_a2a.log");
2692
+ const dest = join6(dir, "transcript_a2a.log");
2599
2693
  const transcript = this.agentSession.getMessages?.()?.map((m) => `[${m.role}] ${m.content}`).join("\n") ?? "";
2600
- writeFileSync2(dest, transcript, "utf-8");
2694
+ writeFileSync3(dest, transcript, "utf-8");
2601
2695
  logInfo(TAG8, `A2A transcript saved to ${dest}`);
2602
2696
  } catch (e) {
2603
2697
  logWarn(TAG8, `A2A transcript save failed: ${e}`);
@@ -2619,7 +2713,7 @@ var AgentApiServer = class {
2619
2713
  newLogFile() {
2620
2714
  const ts = localIso().replace(/[:.]/g, "-");
2621
2715
  const name = this.config.agentCodename;
2622
- return join4(this.logDir, `${name}_${ts}.log`);
2716
+ return join6(this.logDir, `${name}_${ts}.log`);
2623
2717
  }
2624
2718
  log(role, content) {
2625
2719
  const ts = localIso();
@@ -2726,7 +2820,7 @@ var AgentApiServer = class {
2726
2820
  }
2727
2821
  async handleOrcRoute(url, method, req, res) {
2728
2822
  try {
2729
- const { getOrcTools } = await import("./orc-tools-CHRSXSAS.js");
2823
+ const { getOrcTools } = await import("./orc-tools-A3G7WCSJ.js");
2730
2824
  if (url === "/v1/orc/spawn" && method === "POST") {
2731
2825
  const body = JSON.parse(await readBody(req));
2732
2826
  const tool = getOrcTools().find((t) => t.name === "spawn_worker");
@@ -2754,7 +2848,7 @@ var AgentApiServer = class {
2754
2848
  res.writeHead(400, { "Content-Type": "application/json" }).end(JSON.stringify({ ok: false, error: "peer and goal required" }));
2755
2849
  return;
2756
2850
  }
2757
- const { getPeerTransport } = await import("./peer-transport-UBBXTDRP.js");
2851
+ const { getPeerTransport } = await import("./peer-transport-I6JPLFZ2.js");
2758
2852
  const transport = getPeerTransport();
2759
2853
  const remoteId = await transport.delegateTask(peer, goal, { priority: "MEDIUM", context: title });
2760
2854
  res.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify({ ok: true, result: `Delegated to ${peer} \u2014 remote card #${remoteId}` }));
@@ -2815,7 +2909,7 @@ var AgentApiServer = class {
2815
2909
  res.writeHead(429, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Peer hop limit reached", "loop_detected", "hop_exceeded")));
2816
2910
  return;
2817
2911
  }
2818
- const { checkRateLimit } = await import("./agent-api-rate-limit-4GEZ4YN5.js");
2912
+ const { checkRateLimit } = await import("./agent-api-rate-limit-WCFXJMGY.js");
2819
2913
  const limit = checkRateLimit(caller);
2820
2914
  if (!limit.allowed) {
2821
2915
  const retryAfter = Math.ceil((limit.retryAfterMs ?? 6e4) / 1e3);
@@ -2823,7 +2917,7 @@ var AgentApiServer = class {
2823
2917
  logWarn(TAG8, `Rate limited ${caller} \u2014 retry in ${retryAfter}s`);
2824
2918
  return;
2825
2919
  }
2826
- const { setCurrentPeerHops } = await import("./peer-client-VOF77T6C.js");
2920
+ const { setCurrentPeerHops } = await import("./peer-client-RGEU5HOK.js");
2827
2921
  setCurrentPeerHops(hopValue);
2828
2922
  let body;
2829
2923
  try {
@@ -2839,7 +2933,7 @@ var AgentApiServer = class {
2839
2933
  const lastMsg = reqMessages?.[reqMessages.length - 1];
2840
2934
  if (lastMsg?.content) {
2841
2935
  const { verifyMessage } = await import("./digital-signature-4JH7SRW2.js");
2842
- const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-FRWLEYQ5.js");
2936
+ const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-TN55LFDC.js");
2843
2937
  const peerConfig2 = loadPeerConfig2();
2844
2938
  const peerEntry2 = peerConfig2.peers[caller];
2845
2939
  const hasSigTag = /\[sig:\d+:[A-Za-z0-9+/=]+\]$/.test(lastMsg.content);
@@ -2891,7 +2985,7 @@ var AgentApiServer = class {
2891
2985
  logInfo(TAG8, `Peer call: ${caller} \u2192 ${this.config.agentCodename} [${commsType}]`);
2892
2986
  const secLabel = `${this.tlsEnabled ? "tls" : "http"}+${commsType === "signed" ? "signed" : "jwt"}`;
2893
2987
  this.onPeerActivity?.(`\u{1F916} Agents: ${caller} \u2192 ${this.config.agentCodename} [${secLabel}]`);
2894
- const { loadPeerConfig } = await import("./peer-config-FRWLEYQ5.js");
2988
+ const { loadPeerConfig } = await import("./peer-config-TN55LFDC.js");
2895
2989
  const peerConfig = loadPeerConfig();
2896
2990
  const peerEntry = peerConfig.peers[caller];
2897
2991
  const trust = peerEntry?.trust ?? 0;
@@ -2989,7 +3083,7 @@ var AgentApiServer = class {
2989
3083
  res.writeHead(400, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Missing 'goal' field", "invalid_request_error", "missing_field")));
2990
3084
  return;
2991
3085
  }
2992
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
3086
+ const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
2993
3087
  const { cardId, sessionId } = spin2.dispatch({
2994
3088
  type: "O",
2995
3089
  goal: body.context ? `${goal}
@@ -3003,11 +3097,11 @@ Context: ${body.context}` : goal,
3003
3097
  });
3004
3098
  if (body.artifacts?.length) {
3005
3099
  const { basename: bn } = await import("node:path");
3006
- const dir = join4(abtarsHome(), "workspace", "cards", String(cardId));
3100
+ const dir = join6(abtarsHome(), "workspace", "cards", String(cardId));
3007
3101
  mkdirSync(dir, { recursive: true });
3008
3102
  for (const art of body.artifacts) {
3009
3103
  const safeName = bn(art.name);
3010
- writeFileSync2(join4(dir, safeName), Buffer.from(art.content, "base64"));
3104
+ writeFileSync3(join6(dir, safeName), Buffer.from(art.content, "base64"));
3011
3105
  }
3012
3106
  logDebug(TAG8, `Wrote ${body.artifacts.length} artifact(s) to card#${cardId} workspace`);
3013
3107
  }
@@ -3072,7 +3166,8 @@ Context: ${body.context}` : goal,
3072
3166
  /** #949 — GET /v1/tasks/:cardId/messages?since=: pull messages for catch-up. */
3073
3167
  handleChannelPull(url, res, cardId) {
3074
3168
  const sinceMatch = url.match(/[?&]since=([^&]+)/);
3075
- const since = sinceMatch ? decodeURIComponent(sinceMatch[1]) : "1970-01-01";
3169
+ const sinceRaw = sinceMatch?.[1];
3170
+ const since = sinceRaw ? decodeURIComponent(sinceRaw) : "1970-01-01";
3076
3171
  const { channelGetSince } = (init_kanban_channel(), __toCommonJS(kanban_channel_exports));
3077
3172
  const messages = channelGetSince(cardId, since);
3078
3173
  res.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify({ messages }));
@@ -3112,11 +3207,11 @@ Context: ${body.context}` : goal,
3112
3207
  const card = remoteCards[0];
3113
3208
  if (body.artifacts?.length) {
3114
3209
  const { basename: bn } = await import("node:path");
3115
- const dir = join4(abtarsHome(), "workspace", "cards", String(card.id));
3210
+ const dir = join6(abtarsHome(), "workspace", "cards", String(card.id));
3116
3211
  mkdirSync(dir, { recursive: true });
3117
3212
  for (const art of body.artifacts) {
3118
3213
  const safeName = bn(art.name);
3119
- writeFileSync2(join4(dir, safeName), Buffer.from(art.content, "base64"));
3214
+ writeFileSync3(join6(dir, safeName), Buffer.from(art.content, "base64"));
3120
3215
  }
3121
3216
  logDebug(TAG8, `Wrote ${body.artifacts.length} result artifact(s) to local card#${card.id}`);
3122
3217
  }
@@ -3132,7 +3227,7 @@ Context: ${body.context}` : goal,
3132
3227
  kanbanAddTokens(card.id, body.tokens_used);
3133
3228
  }
3134
3229
  try {
3135
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
3230
+ const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
3136
3231
  const meta = JSON.parse(card.notes ?? "{}");
3137
3232
  if (meta.remote_session_id) {
3138
3233
  const hollow = spin2.listAllSessions().find((s) => s.peer === caller && s.remoteSessionId === meta.remote_session_id);
@@ -3167,7 +3262,7 @@ async function phaseAgentApi(ctx) {
3167
3262
  sendNotification(ctx, msg);
3168
3263
  };
3169
3264
  setPeerActivityCallback(notifyPeer);
3170
- const { AgentApiAdapter } = await import("./agent-api-adapter-PYMNQXHE.js");
3265
+ const { AgentApiAdapter } = await import("./agent-api-adapter-PTJYZKQK.js");
3171
3266
  const a2aAdapter = new AgentApiAdapter();
3172
3267
  registry.register("agent-api", {
3173
3268
  configured: Boolean(agentConfig.port),
@@ -3201,17 +3296,17 @@ async function phaseAgentApi(ctx) {
3201
3296
  } else {
3202
3297
  logError("main", `Agent API failed to start: ${result.error}`);
3203
3298
  }
3204
- const { loadPeerConfig } = await import("./peer-config-FRWLEYQ5.js");
3205
- const { startDnsWakeup } = await import("./dns-wakeup-F55ALHXJ.js");
3206
- const { startGossipListener } = await import("./gossip-CS3G3447.js");
3207
- const { callPeer } = await import("./peer-client-VOF77T6C.js");
3299
+ const { loadPeerConfig } = await import("./peer-config-TN55LFDC.js");
3300
+ const { startDnsWakeup } = await import("./dns-wakeup-IDOJIXBX.js");
3301
+ const { startGossipListener } = await import("./gossip-3C3BSNPN.js");
3302
+ const { callPeer } = await import("./peer-client-RGEU5HOK.js");
3208
3303
  const peerConfig = loadPeerConfig();
3209
3304
  const udpPort = peerConfig.self.udpPort ?? 5353;
3210
3305
  if (Object.keys(peerConfig.peers).length > 0) {
3211
3306
  startGossipListener();
3212
3307
  }
3213
3308
  if (Object.keys(peerConfig.peers).length > 0) {
3214
- import("./peer-transport-UBBXTDRP.js").then(({ initPeerTransport }) => initPeerTransport()).catch(() => {
3309
+ import("./peer-transport-I6JPLFZ2.js").then(({ initPeerTransport }) => initPeerTransport()).catch(() => {
3215
3310
  });
3216
3311
  }
3217
3312
  if (Object.keys(peerConfig.peers).length > 0) {
@@ -3221,17 +3316,17 @@ async function phaseAgentApi(ctx) {
3221
3316
  const prompt = await callPeer(peerName, "callback: you requested a call-back via wake-up signal", peerConfig.maxHops, { skipWakeup: true });
3222
3317
  if (!prompt || prompt.trim() === "") return;
3223
3318
  const http2 = await import("node:http");
3224
- const answer = await new Promise((resolve4, reject) => {
3319
+ const answer = await new Promise((resolve3, reject) => {
3225
3320
  const body = JSON.stringify({ model: "default", messages: [{ role: "user", content: prompt }] });
3226
3321
  const req = http2.request({ hostname: "127.0.0.1", port: agentConfig.port, path: "/v1/chat/completions", method: "POST", headers: { "Content-Type": "application/json", "Content-Length": Buffer.byteLength(body), "Authorization": `Bearer ${process.env["AGENT_API_TOKEN"] ?? ""}` }, timeout: 55e3 }, (res) => {
3227
3322
  let data = "";
3228
3323
  res.on("data", (c) => data += c);
3229
3324
  res.on("end", () => {
3230
3325
  try {
3231
- resolve4(JSON.parse(data)?.choices?.[0]?.message?.content ?? "");
3326
+ resolve3(JSON.parse(data)?.choices?.[0]?.message?.content ?? "");
3232
3327
  } catch (err) {
3233
3328
  logAndSwallow(TAG9, "JSON.parse agent-api response", err);
3234
- resolve4("");
3329
+ resolve3("");
3235
3330
  }
3236
3331
  });
3237
3332
  });
@@ -3268,7 +3363,7 @@ async function phaseShutdown(ctx, bridge) {
3268
3363
  logWarn("main", `${signal} received (pid=${process.pid} ppid=${process.ppid} parent="${parent}")`);
3269
3364
  }
3270
3365
  if (ctx.sandboxEnabled) {
3271
- import("./sandbox-runtime-WHACQLLN.js").then((m) => m.killAllSandboxes()).catch(() => {
3366
+ import("./sandbox-runtime-QROWHDCS.js").then((m) => m.killAllSandboxes()).catch(() => {
3272
3367
  });
3273
3368
  }
3274
3369
  bridge.requestShutdown(code);
@@ -3286,14 +3381,14 @@ async function bootGraph(nodes, ctx) {
3286
3381
  const nodeMap = new Map(nodes.map((n) => [n.name, n]));
3287
3382
  const t0Global = Date.now();
3288
3383
  logTrace("boot", `bootGraph: starting ${nodes.length} nodes [${nodes.map((n) => n.name).join(", ")}]`);
3289
- function resolve4(node) {
3384
+ function resolve3(node) {
3290
3385
  if (resolved.has(node.name)) return resolved.get(node.name);
3291
3386
  const p = (async () => {
3292
3387
  logTrace("boot", `${node.name}: waiting for deps [${node.deps.join(", ") || "none"}]`);
3293
3388
  for (const dep of node.deps) {
3294
3389
  const depNode = nodeMap.get(dep);
3295
3390
  if (!depNode) throw new Error(`Boot node "${node.name}" depends on unknown node "${dep}"`);
3296
- await resolve4(depNode);
3391
+ await resolve3(depNode);
3297
3392
  const depStatus = report.get(dep);
3298
3393
  if (depStatus && depStatus.status !== "ok") {
3299
3394
  report.set(node.name, { status: "skipped", blockedBy: dep });
@@ -3307,7 +3402,7 @@ async function bootGraph(nodes, ctx) {
3307
3402
  }
3308
3403
  for (const dep of node.optionalDeps ?? []) {
3309
3404
  const depNode = nodeMap.get(dep);
3310
- if (depNode) await resolve4(depNode).catch(() => {
3405
+ if (depNode) await resolve3(depNode).catch(() => {
3311
3406
  });
3312
3407
  }
3313
3408
  const t0 = Date.now();
@@ -3328,7 +3423,7 @@ async function bootGraph(nodes, ctx) {
3328
3423
  resolved.set(node.name, p);
3329
3424
  return p;
3330
3425
  }
3331
- await Promise.allSettled(nodes.map((n) => resolve4(n)));
3426
+ await Promise.allSettled(nodes.map((n) => resolve3(n)));
3332
3427
  logTrace("boot", `bootGraph: complete in ${Date.now() - t0Global}ms \u2014 ${[...report].filter(([, v]) => v.status === "ok").length} ok, ${[...report].filter(([, v]) => v.status === "failed").length} failed, ${[...report].filter(([, v]) => v.status === "skipped").length} skipped`);
3333
3428
  ctx.phaseHealth = new Map([...report].map(([k, v]) => [k, { status: v.status === "ok" ? "ok" : v.status, error: v.error ?? v.blockedBy }]));
3334
3429
  return report;
@@ -3391,15 +3486,15 @@ var Bridge = class {
3391
3486
  execFileSync("mcporter", ["daemon", "stop"], { stdio: "pipe" });
3392
3487
  });
3393
3488
  }
3394
- const { flushUsage } = await import("./usage-tracker-HRSGC7QC.js");
3489
+ const { flushUsage } = await import("./usage-tracker-NXD364VX.js");
3395
3490
  flushUsage();
3396
3491
  clearTimeout(forceTimer);
3397
3492
  this._resolve?.(this._exitCode);
3398
3493
  }
3399
3494
  /** Returns a promise that resolves with the exit code when shutdown completes. */
3400
3495
  waitForExit() {
3401
- return new Promise((resolve4) => {
3402
- this._resolve = resolve4;
3496
+ return new Promise((resolve3) => {
3497
+ this._resolve = resolve3;
3403
3498
  });
3404
3499
  }
3405
3500
  };
@@ -3417,11 +3512,11 @@ async function startBridge() {
3417
3512
  }
3418
3513
  }
3419
3514
  try {
3420
- const { runFixes } = await import("./doctor-probes-3SLIUGKS.js");
3515
+ const { runFixes } = await import("./doctor-probes-VDWFJKUB.js");
3421
3516
  await runFixes();
3422
3517
  } catch {
3423
3518
  }
3424
- const deployed = (await import("./paths-RZF6WDMG.js")).getDeployedVersion();
3519
+ const deployed = (await import("./paths-X4LRYUI6.js")).getDeployedVersion();
3425
3520
  ctx.version = deployed.version;
3426
3521
  ctx.commit = deployed.commit;
3427
3522
  const startReason = process.env["ABTARS_START_REASON"] ?? "unknown";
@@ -3441,19 +3536,19 @@ async function startBridge() {
3441
3536
  logError("boot", `\u2717 ${phaseShutdown.name} failed`, err);
3442
3537
  }
3443
3538
  }
3444
- const { hasHooks, fire } = await import("./hook-system-X6INNJGV.js");
3539
+ const { hasHooks, fire } = await import("./hook-system-M3POLUIB.js");
3445
3540
  if (hasHooks("BridgeStart")) {
3446
3541
  await fire("BridgeStart", { event: "BridgeStart", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: "", platform: "", userId: "" });
3447
3542
  }
3448
3543
  if (ctx.telegramAdapter || ctx.discordAdapter) {
3449
3544
  try {
3450
- const { sendToMainChat } = await import("./main-chat-YLZDNQPO.js");
3545
+ const { sendToMainChat } = await import("./main-chat-ZNUZCTNS.js");
3451
3546
  const version = ctx.commit && ctx.commit !== "?" && !ctx.version.includes(ctx.commit) ? `v${ctx.version}-${ctx.commit}` : `v${ctx.version}`;
3452
3547
  let deployNote = "";
3453
3548
  try {
3454
3549
  const { readFileSync: readFileSync7 } = await import("node:fs");
3455
- const { join: join7 } = await import("node:path");
3456
- const state = JSON.parse(readFileSync7(join7(process.env["HOME"] ?? "", ".abtars", "deploy.state"), "utf-8"));
3550
+ const { join: join9 } = await import("node:path");
3551
+ const state = JSON.parse(readFileSync7(join9(process.env["HOME"] ?? "", ".abtars", "deploy.state"), "utf-8"));
3457
3552
  if (state.completedAt && Date.now() - new Date(state.completedAt).getTime() < 5 * 6e4) {
3458
3553
  deployNote = state.status === "success" ? " (updated)" : ` (update ${state.status})`;
3459
3554
  }
@@ -3472,7 +3567,7 @@ ${lines.join("\n")}`);
3472
3567
  }
3473
3568
  }
3474
3569
  if (ctx.telegramAdapter) {
3475
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
3570
+ const { spin: spin2 } = await import("./spin-IMW2MZOH.js");
3476
3571
  spin2.setGreetingAdapter(ctx.telegramAdapter);
3477
3572
  }
3478
3573
  return bridge.waitForExit();
@@ -3482,22 +3577,22 @@ ${lines.join("\n")}`);
3482
3577
  init_logger();
3483
3578
 
3484
3579
  // src/boot/circuit-breaker.ts
3485
- import { readFileSync as readFileSync5, existsSync as existsSync6, writeFileSync as writeFileSync3, unlinkSync, symlinkSync } from "node:fs";
3486
- import { join as join5, resolve as resolve3 } from "node:path";
3487
- import { homedir as homedir4 } from "node:os";
3580
+ init_paths();
3581
+ import { readFileSync as readFileSync5, existsSync as existsSync7, writeFileSync as writeFileSync4, unlinkSync, symlinkSync } from "node:fs";
3582
+ import { join as join7 } from "node:path";
3488
3583
  var MAX_DEATHS = 4;
3489
3584
  function checkCircuitBreaker() {
3490
- const home2 = process.env["ABTARS_HOME"] ?? join5(process.env["HOME"] ?? "/tmp", ".abtars");
3491
- const releasesDir = resolve3(homedir4(), ".abtars-releases");
3492
- const stateFile = join5(home2, "deploy.state");
3493
- const historyFile = join5(releasesDir, "history.json");
3494
- const currentLink = join5(releasesDir, "current");
3585
+ const home2 = resolveAbtarsHome();
3586
+ const releasesDir = resolveReleasesDir();
3587
+ const stateFile = join7(home2, "deploy.state");
3588
+ const historyFile = join7(releasesDir, "history.json");
3589
+ const currentLink = join7(releasesDir, "current");
3495
3590
  const reason = process.env["ABTARS_START_REASON"] ?? "watchdog-respawn";
3496
3591
  if (reason.startsWith("update:") || reason === "user-restart" || reason.startsWith("rollback:") || reason.startsWith("auto-rollback:")) {
3497
3592
  try {
3498
3593
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3499
3594
  state.restartCount = 0;
3500
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3595
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3501
3596
  } catch {
3502
3597
  }
3503
3598
  return;
@@ -3518,19 +3613,19 @@ function checkCircuitBreaker() {
3518
3613
  try {
3519
3614
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3520
3615
  state.restartCount = 0;
3521
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3616
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3522
3617
  } catch {
3523
3618
  }
3524
3619
  return;
3525
3620
  }
3526
3621
  const target = history[1];
3527
- const targetDir = join5(releasesDir, target);
3528
- if (!existsSync6(targetDir)) {
3622
+ const targetDir = join7(releasesDir, target);
3623
+ if (!existsSync7(targetDir)) {
3529
3624
  console.error(`[circuit-breaker] history[1] dir ${target} not found \u2014 continuing anyway`);
3530
3625
  try {
3531
3626
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3532
3627
  state.restartCount = 0;
3533
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3628
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3534
3629
  } catch {
3535
3630
  }
3536
3631
  return;
@@ -3540,7 +3635,7 @@ function checkCircuitBreaker() {
3540
3635
  } catch {
3541
3636
  }
3542
3637
  symlinkSync(targetDir, currentLink);
3543
- const appLink = join5(home2, "app");
3638
+ const appLink = join7(home2, "app");
3544
3639
  try {
3545
3640
  unlinkSync(appLink);
3546
3641
  } catch {
@@ -3552,7 +3647,7 @@ function checkCircuitBreaker() {
3552
3647
  try {
3553
3648
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3554
3649
  state.restartCount = 0;
3555
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3650
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3556
3651
  } catch {
3557
3652
  }
3558
3653
  console.error(`[circuit-breaker] ${restartCount} unplanned deaths \u2014 rolled back to ${target}`);
@@ -3561,13 +3656,13 @@ function checkCircuitBreaker() {
3561
3656
 
3562
3657
  // src/main.ts
3563
3658
  import { readFileSync as readFileSync6 } from "node:fs";
3564
- import { join as join6 } from "node:path";
3659
+ import { join as join8 } from "node:path";
3565
3660
  process.umask(63);
3566
3661
  initEnv();
3567
3662
  checkCircuitBreaker();
3568
3663
  try {
3569
- const home2 = process.env["ABTARS_HOME"] ?? join6(process.env["HOME"] ?? "/tmp", ".abtars");
3570
- const lock = JSON.parse(readFileSync6(join6(home2, "bridge.lock"), "utf-8"));
3664
+ const home2 = process.env["ABTARS_HOME"] ?? join8(process.env["HOME"] ?? "/tmp", ".abtars");
3665
+ const lock = JSON.parse(readFileSync6(join8(home2, "bridge.lock"), "utf-8"));
3571
3666
  if (lock.pid && lock.pid !== process.pid) {
3572
3667
  process.kill(lock.pid, 0);
3573
3668
  console.error(`[FATAL] Another bridge running (PID ${lock.pid}) \u2014 exiting`);