abtars 0.3.3 → 0.3.4-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (384) hide show
  1. package/bundle/{_registry.generated-7DRCE4V6.js → _registry.generated-ZJBAZMXN.js} +16 -15
  2. package/bundle/{_registry.generated-7DRCE4V6.js.map → _registry.generated-ZJBAZMXN.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 +47 -39
  6. package/bundle/abtars-cli.js.map +2 -2
  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 +299 -209
  15. package/bundle/abtars.js.map +4 -4
  16. package/bundle/{acp-raw-client-AZJCEB6S.js → acp-raw-client-YTBGFN4S.js} +4 -3
  17. package/bundle/{acp-raw-client-AZJCEB6S.js.map → acp-raw-client-YTBGFN4S.js.map} +1 -1
  18. package/bundle/{action-gate-QYJL57IX.js → action-gate-YISTP773.js} +4 -3
  19. package/bundle/{action-gate-QYJL57IX.js.map → action-gate-YISTP773.js.map} +1 -1
  20. package/bundle/{agent-api-adapter-PYMNQXHE.js → agent-api-adapter-E4HWVJ32.js} +5 -4
  21. package/bundle/{agent-api-adapter-PYMNQXHE.js.map → agent-api-adapter-E4HWVJ32.js.map} +1 -1
  22. package/bundle/{agent-api-rate-limit-4GEZ4YN5.js → agent-api-rate-limit-VENFGOAD.js} +6 -5
  23. package/bundle/{agent-registry-563P4EUJ.js → agent-registry-DL7UT272.js} +9 -8
  24. package/bundle/bootstrap-V5MROD3X.js +62 -0
  25. package/bundle/bootstrap-V5MROD3X.js.map +7 -0
  26. package/bundle/{bridge-lock-transport-LXCF2IVN.js → bridge-lock-transport-BJAMHMXW.js} +6 -5
  27. package/bundle/{browser-2VZOGOGX.js → browser-PT54UWSW.js} +8 -7
  28. package/bundle/{budget-PPA7WY3D.js → budget-QNK6IIT6.js} +5 -4
  29. package/bundle/{budget-PPA7WY3D.js.map → budget-QNK6IIT6.js.map} +1 -1
  30. package/bundle/{capability-WXEA2WFK.js → capability-EKPGHQIO.js} +7 -6
  31. package/bundle/{chunk-C3EYYJN3.js → chunk-2BXXQG7P.js} +16 -4
  32. package/bundle/chunk-2BXXQG7P.js.map +7 -0
  33. package/bundle/{chunk-4PIVWXUJ.js → chunk-2ZD7VQRW.js} +2 -2
  34. package/bundle/{chunk-OY2HAK33.js → chunk-36ZEYDKZ.js} +1 -1
  35. package/bundle/chunk-36ZEYDKZ.js.map +7 -0
  36. package/bundle/{chunk-3QW2K53E.js → chunk-4IGLXZCC.js} +11 -19
  37. package/bundle/chunk-4IGLXZCC.js.map +7 -0
  38. package/bundle/{chunk-T7TAWGBX.js → chunk-52PQM4EZ.js} +2 -2
  39. package/bundle/{chunk-2RGR3LSV.js → chunk-5P5HF7IJ.js} +2 -2
  40. package/bundle/{chunk-LE23VPN3.js → chunk-63A7ZRIH.js} +4 -4
  41. package/bundle/{chunk-LE23VPN3.js.map → chunk-63A7ZRIH.js.map} +1 -1
  42. package/bundle/chunk-6IB3GVXK.js +77 -0
  43. package/bundle/chunk-6IB3GVXK.js.map +7 -0
  44. package/bundle/{chunk-OOKNHOCB.js → chunk-6S3G6GPO.js} +2 -2
  45. package/bundle/{chunk-E7MV7WFT.js → chunk-6VTHSN4V.js} +6 -6
  46. package/bundle/{chunk-NGZVJ52F.js → chunk-76YN7O3U.js} +7 -7
  47. package/bundle/{chunk-43DKPXTP.js → chunk-7LORCJCQ.js} +4 -4
  48. package/bundle/{chunk-HDOFJVFS.js → chunk-7OI46MH7.js} +3 -3
  49. package/bundle/{chunk-H2K23MOF.js → chunk-7XXISOHU.js} +21 -5
  50. package/bundle/chunk-7XXISOHU.js.map +7 -0
  51. package/bundle/{chunk-CB6S3ZRF.js → chunk-AFFW2LRY.js} +3 -3
  52. package/bundle/{chunk-TCI6FZTP.js → chunk-AHJDG6OM.js} +9 -9
  53. package/bundle/{chunk-NP72ZB7P.js → chunk-AMUJEP6L.js} +45 -45
  54. package/bundle/{chunk-NP72ZB7P.js.map → chunk-AMUJEP6L.js.map} +2 -2
  55. package/bundle/{chunk-BU7LTI2W.js → chunk-AWCO3DQ3.js} +6 -7
  56. package/bundle/chunk-AWCO3DQ3.js.map +7 -0
  57. package/bundle/{chunk-YME7NRGP.js → chunk-B2TIRDZC.js} +2 -2
  58. package/bundle/{chunk-SSCGWDIC.js → chunk-BWJ37KMW.js} +2 -2
  59. package/bundle/{chunk-ULO2PX3T.js → chunk-CCZ43JB7.js} +3 -3
  60. package/bundle/{chunk-FVUL44T4.js → chunk-CNENVY37.js} +2 -2
  61. package/bundle/{chunk-J5NOL4DB.js → chunk-DJOSXXM2.js} +2 -2
  62. package/bundle/{chunk-7RAGSHSH.js → chunk-DMDX35YT.js} +12 -10
  63. package/bundle/chunk-DMDX35YT.js.map +7 -0
  64. package/bundle/{chunk-DNDYD5SL.js → chunk-E7DZYCSF.js} +3 -3
  65. package/bundle/{chunk-M6Q3IQ4H.js → chunk-FF2F7ENH.js} +250 -118
  66. package/bundle/chunk-FF2F7ENH.js.map +7 -0
  67. package/bundle/{chunk-GCFIK6OB.js → chunk-FSGICOCX.js} +21 -21
  68. package/bundle/{chunk-IXKQ4JMX.js → chunk-GFAJSPMD.js} +33 -17
  69. package/bundle/chunk-GFAJSPMD.js.map +7 -0
  70. package/bundle/{chunk-FJF42RZY.js → chunk-GHRLO2UL.js} +3 -3
  71. package/bundle/{chunk-3LQOJVTB.js → chunk-HFOCNYEO.js} +1842 -1220
  72. package/bundle/{chunk-3LQOJVTB.js.map → chunk-HFOCNYEO.js.map} +4 -4
  73. package/bundle/{chunk-7WHXTCVD.js → chunk-HWFN7JGU.js} +2 -2
  74. package/bundle/{chunk-KBPVJGD7.js → chunk-IXGDDDAB.js} +3 -3
  75. package/bundle/chunk-JHLKEUHE.js +37 -0
  76. package/bundle/chunk-JHLKEUHE.js.map +7 -0
  77. package/bundle/{chunk-YEOZN5IE.js → chunk-JRGEEGZF.js} +2 -2
  78. package/bundle/{chunk-56D3Y44D.js → chunk-KLG4SCF7.js} +10 -10
  79. package/bundle/{chunk-ASYX43OU.js → chunk-LB43Q7G6.js} +26 -26
  80. package/bundle/{chunk-TVSPVZTX.js → chunk-LN5MNDSA.js} +3 -3
  81. package/bundle/{chunk-RJX45XIC.js → chunk-LPF2HELD.js} +9 -4
  82. package/bundle/chunk-LPF2HELD.js.map +7 -0
  83. package/bundle/{chunk-72T2Q7IG.js → chunk-MJACYH7A.js} +270 -282
  84. package/bundle/chunk-MJACYH7A.js.map +7 -0
  85. package/bundle/{chunk-SESM4GBM.js → chunk-MPQ2PJQX.js} +52 -25
  86. package/bundle/chunk-MPQ2PJQX.js.map +7 -0
  87. package/bundle/{chunk-FIAVVKGN.js → chunk-MTE32OQH.js} +3 -3
  88. package/bundle/{chunk-MV5KOWOR.js → chunk-N3Q3TASM.js} +7 -7
  89. package/bundle/{chunk-IQKADER4.js → chunk-O4YBJS2K.js} +2 -2
  90. package/bundle/{chunk-VJATH7AN.js → chunk-OOUCUCUW.js} +9 -8
  91. package/bundle/chunk-OOUCUCUW.js.map +7 -0
  92. package/bundle/{chunk-5V4VHKEA.js → chunk-OT6HLPEA.js} +3 -3
  93. package/bundle/{chunk-V6CV3QPH.js → chunk-OWPQIBAO.js} +2 -2
  94. package/bundle/{chunk-EDZGF6BC.js → chunk-QJPDBJDP.js} +11 -4
  95. package/bundle/chunk-QJPDBJDP.js.map +7 -0
  96. package/bundle/{chunk-N5VROZ7A.js → chunk-QMP2KC4W.js} +5 -5
  97. package/bundle/{chunk-4HNCOQSK.js → chunk-QOGZ7BFL.js} +7 -7
  98. package/bundle/{chunk-2LKQV2ND.js → chunk-R23FHZRY.js} +3 -3
  99. package/bundle/{chunk-SXNY6HC4.js → chunk-R4GYWVCR.js} +6 -6
  100. package/bundle/chunk-R4GYWVCR.js.map +7 -0
  101. package/bundle/{chunk-S7ZIGIR5.js → chunk-R76K6L6H.js} +27 -27
  102. package/bundle/{chunk-S7ZIGIR5.js.map → chunk-R76K6L6H.js.map} +1 -1
  103. package/bundle/{chunk-TY26WMQY.js → chunk-RCWQ34QR.js} +2 -2
  104. package/bundle/{chunk-MQJG7OJX.js → chunk-RJ2OUNFU.js} +38 -36
  105. package/bundle/chunk-RJ2OUNFU.js.map +7 -0
  106. package/bundle/{chunk-S6HEHCCG.js → chunk-RO3TAYBR.js} +83 -46
  107. package/bundle/chunk-RO3TAYBR.js.map +7 -0
  108. package/bundle/{chunk-ZOCEBV62.js → chunk-UU3RLJSD.js} +3 -3
  109. package/bundle/{chunk-P5O6QZDC.js → chunk-V7Y2LFO4.js} +10 -6
  110. package/bundle/chunk-V7Y2LFO4.js.map +7 -0
  111. package/bundle/{chunk-WP7FZHMI.js → chunk-W2PSVV2T.js} +2 -2
  112. package/bundle/{chunk-V2QIAXWZ.js → chunk-WEGFRA6G.js} +3 -3
  113. package/bundle/{chunk-ZY6DH2S4.js → chunk-WTIGZO3N.js} +80 -70
  114. package/bundle/chunk-WTIGZO3N.js.map +7 -0
  115. package/bundle/{chunk-O4GKI3Q3.js → chunk-X7DLKIQM.js} +4 -4
  116. package/bundle/{chunk-BNBC4T45.js → chunk-XZ4ZBDM5.js} +3 -3
  117. package/bundle/{chunk-24V4A6RP.js → chunk-YI2KSYB4.js} +4 -4
  118. package/bundle/{chunk-37EX63K4.js → chunk-YWHJJHJ2.js} +6998 -3621
  119. package/bundle/chunk-YWHJJHJ2.js.map +7 -0
  120. package/bundle/{chunk-IK4R3RBZ.js → chunk-YZCOA4DC.js} +3 -3
  121. package/bundle/{chunk-2FZJDMAF.js → chunk-ZGNSCJWH.js} +10 -10
  122. package/bundle/{chunk-W726UGI6.js → chunk-ZKMKAO75.js} +3 -3
  123. package/bundle/{chunk-WGWM4IZM.js → chunk-ZT5ZBGWS.js} +4 -4
  124. package/bundle/{chunk-WGWM4IZM.js.map → chunk-ZT5ZBGWS.js.map} +1 -1
  125. package/bundle/{commands-XXFU2ZF7.js → commands-2JQ5YTJX.js} +20 -20
  126. package/bundle/{config-EWDZ234X.js → config-ZEWIM5Z2.js} +8 -7
  127. package/bundle/{config-show-6J33O4TE.js → config-show-WBJPQPRD.js} +5 -5
  128. package/bundle/{context-OCS7HLJP.js → context-V75QNXB5.js} +5 -2
  129. package/bundle/{context-OCS7HLJP.js.map → context-V75QNXB5.js.map} +1 -1
  130. package/bundle/{daemon-LTDAXNA2.js → daemon-W7VQOSZC.js} +7 -7
  131. package/bundle/{delegation-tools-YDTWQMZD.js → delegation-tools-VGTRFQBF.js} +13 -11
  132. package/bundle/{registry-client-VN2MM2HI.js → deploy-5AGIULM2.js} +10 -6
  133. package/bundle/{deploy-lib-import-RGZJ3CGC.js → deploy-lib-import-ZBDYORN4.js} +5 -3
  134. package/bundle/{deps-PHSLIA77.js → deps-VB3S3RLF.js} +21 -19
  135. package/bundle/deps-VB3S3RLF.js.map +7 -0
  136. package/bundle/{direct-api-transport-OAKYQBJR.js → direct-api-transport-YSROTC35.js} +30 -28
  137. package/bundle/direct-api-transport-YSROTC35.js.map +7 -0
  138. package/bundle/{discord-adapter-WUNYPTDE.js → discord-adapter-LKBSIFLV.js} +26 -26
  139. package/bundle/{dist-7HEHHQI2.js → dist-KMK7TZGN.js} +376 -348
  140. package/bundle/dist-KMK7TZGN.js.map +7 -0
  141. package/bundle/{dns-wakeup-F55ALHXJ.js → dns-wakeup-KIURCCFJ.js} +4 -3
  142. package/bundle/{dns-wakeup-F55ALHXJ.js.map → dns-wakeup-KIURCCFJ.js.map} +1 -1
  143. package/bundle/{doctor-probes-3SLIUGKS.js → doctor-probes-46UKIROK.js} +4 -3
  144. package/bundle/{env-schema-MSDP2YBO.js → env-schema-YGHCKX5B.js} +5 -4
  145. package/bundle/{gossip-CS3G3447.js → gossip-VSEY2HSE.js} +7 -6
  146. package/bundle/{guardrails-24XK2COI.js → guardrails-U7M6H2GE.js} +6 -5
  147. package/bundle/{health-check-FRUNRVNQ.js → health-check-ASRLUJE5.js} +6 -2
  148. package/bundle/health-check-ASRLUJE5.js.map +7 -0
  149. package/bundle/{heartbeat-system-G4IFQXT6.js → heartbeat-system-MUXLT4E6.js} +7 -6
  150. package/bundle/{heartbeat-tier3-3ZO3EVXP.js → heartbeat-tier3-636ZMM4E.js} +45 -44
  151. package/bundle/heartbeat-tier3-636ZMM4E.js.map +7 -0
  152. package/bundle/{hook-system-X6INNJGV.js → hook-system-Z4XD6IM5.js} +5 -4
  153. package/bundle/{hotskills-6FQYTJIO.js → hotskills-AOUWVTQB.js} +7 -6
  154. package/bundle/{install-ZAHTZ5M5.js → install-3GGZUN22.js} +23 -20
  155. package/bundle/install-3GGZUN22.js.map +7 -0
  156. package/bundle/{install-manifest-QX7KVDCA.js → install-manifest-624KOB4S.js} +4 -3
  157. package/bundle/{install-manifest-QX7KVDCA.js.map → install-manifest-624KOB4S.js.map} +1 -1
  158. package/bundle/{irc-adapter-IEJQKKJF.js → irc-adapter-SA7GLJGR.js} +5 -4
  159. package/bundle/{irc-adapter-IEJQKKJF.js.map → irc-adapter-SA7GLJGR.js.map} +1 -1
  160. package/bundle/{irc-config-TTWNYFLH.js → irc-config-PG4X2I4M.js} +6 -5
  161. package/bundle/{irc-config-TTWNYFLH.js.map → irc-config-PG4X2I4M.js.map} +1 -1
  162. package/bundle/{kanban-board-J6RO3ZU7.js → kanban-board-4AI5Z6B5.js} +7 -5
  163. package/bundle/{kanban-channel-5EIXBFSA.js → kanban-channel-JMBYWGWD.js} +8 -6
  164. package/bundle/{lazy-require-V6EFUATC.js → lazy-require-GURNBC3C.js} +11 -6
  165. package/bundle/{logger-Y3VILPRH.js → logger-UQJPZMYV.js} +4 -3
  166. package/bundle/{logs-YS3GDURO.js → logs-2WTDLMB5.js} +5 -5
  167. package/bundle/{main-chat-YLZDNQPO.js → main-chat-EID5Y6H2.js} +6 -5
  168. package/bundle/{master-user-Z4M7KCJE.js → master-user-TKA7M2GL.js} +7 -6
  169. package/bundle/{media-utils-P6RZ2K3U.js → media-utils-X3UN342B.js} +44 -43
  170. package/bundle/{media-utils-P6RZ2K3U.js.map → media-utils-X3UN342B.js.map} +2 -2
  171. package/bundle/{message-pipeline-MHEBDJLH.js → message-pipeline-TAWXNEVS.js} +20 -20
  172. package/bundle/meta.json +9264 -8575
  173. package/bundle/{migrate-layout-RJJQLVGR.js → migrate-layout-KEAIIN26.js} +8 -4
  174. package/bundle/migrate-layout-KEAIIN26.js.map +7 -0
  175. package/bundle/{nerve-VZNMFDGY.js → nerve-TC34H4EL.js} +5 -4
  176. package/bundle/{notification-VV2OR6NW.js → notification-JQNVGICN.js} +8 -7
  177. package/bundle/{openrouter-credits-LXC7P4G6.js → openrouter-credits-5Q3EYWE5.js} +5 -4
  178. package/bundle/{openrouter-credits-LXC7P4G6.js.map → openrouter-credits-5Q3EYWE5.js.map} +1 -1
  179. package/bundle/{orc-KC4USP55.js → orc-74Z62W7B.js} +4 -4
  180. package/bundle/{orc-tools-CHRSXSAS.js → orc-tools-GME3DKIN.js} +5 -4
  181. package/bundle/{paths-EDK6KWHG.js → paths-BAUNPLNJ.js} +6 -2
  182. package/bundle/{paths-RZF6WDMG.js → paths-MZC2KU2C.js} +3 -2
  183. package/bundle/{peer-auth-SRONOLNG.js → peer-auth-VRO3JYL5.js} +9 -8
  184. package/bundle/{peer-client-VOF77T6C.js → peer-client-WLK5GZQS.js} +9 -8
  185. package/bundle/{peer-client-VOF77T6C.js.map → peer-client-WLK5GZQS.js.map} +1 -1
  186. package/bundle/{peer-config-FRWLEYQ5.js → peer-config-24WILLCJ.js} +6 -5
  187. package/bundle/{peer-jwt-XY3XRIA2.js → peer-jwt-ZR6RF3XM.js} +6 -5
  188. package/bundle/{peer-transport-UBBXTDRP.js → peer-transport-BK5VHI2M.js} +8 -7
  189. package/bundle/{phase-transport-4NQHZX75.js → phase-transport-7QJM7J6V.js} +18 -16
  190. package/bundle/{reconcile-2EUXJ6W5.js → reconcile-7N7OE2GU.js} +5 -4
  191. package/bundle/{reconciler-FFQGV4DO.js → reconciler-7LOOUK43.js} +13 -11
  192. package/bundle/{reconciler-FFQGV4DO.js.map → reconciler-7LOOUK43.js.map} +1 -1
  193. package/bundle/{restore-NFDE2RG6.js → restore-MENZ3I3K.js} +13 -9
  194. package/bundle/{restore-NFDE2RG6.js.map → restore-MENZ3I3K.js.map} +3 -3
  195. package/bundle/{rollback-MVZ53XS4.js → rollback-JOHY6KWW.js} +5 -5
  196. package/bundle/{chunk-SKY6656M.js → sandbox-runtime-T7RF4WJD.js} +11 -28
  197. package/bundle/{chunk-SKY6656M.js.map → sandbox-runtime-T7RF4WJD.js.map} +1 -1
  198. package/bundle/{self-healer-utils-KD6LV63S.js → self-healer-utils-OR2N6RLD.js} +5 -4
  199. package/bundle/{self-healer-utils-KD6LV63S.js.map → self-healer-utils-OR2N6RLD.js.map} +1 -1
  200. package/bundle/{sha-tracker-2DB4R2TW.js → sha-tracker-BXOLWZJL.js} +5 -4
  201. package/bundle/{skill-session-BPDVA6ZG.js → skill-session-H6EQ4NGN.js} +5 -4
  202. package/bundle/{skill-session-BPDVA6ZG.js.map → skill-session-H6EQ4NGN.js.map} +1 -1
  203. package/bundle/{skill-stats-TPD2NROA.js → skill-stats-7O777ZSZ.js} +6 -5
  204. package/bundle/{skill-watcher-D7QYYYON.js → skill-watcher-ZGLTDPG5.js} +6 -5
  205. package/bundle/{sleep-GH6DLBJJ.js → sleep-3LFZH727.js} +10 -9
  206. package/bundle/{soul-bundle-GXLMDBCC.js → soul-bundle-RQ2YQMJW.js} +10 -9
  207. package/bundle/{spin-4DBYHS3E.js → spin-76K4R6FK.js} +12 -10
  208. package/bundle/{spin-notifications-IKYJPER5.js → spin-notifications-LD46B4K5.js} +7 -5
  209. package/bundle/{spin-notifications-IKYJPER5.js.map → spin-notifications-LD46B4K5.js.map} +1 -1
  210. package/bundle/{spin-types-PLJH3SIK.js → spin-types-MOKTZXGB.js} +5 -4
  211. package/bundle/{src-SUFZ27S5.js → src-6BTCMOD3.js} +4 -4
  212. package/bundle/{sse-parser-anthropic-U7ILHOY5.js → sse-parser-anthropic-NV2CGBIT.js} +5 -4
  213. package/bundle/{sse-parser-anthropic-U7ILHOY5.js.map → sse-parser-anthropic-NV2CGBIT.js.map} +1 -1
  214. package/bundle/{sse-parser-responses-OI73R3AH.js → sse-parser-responses-FC3PFHQ5.js} +5 -4
  215. package/bundle/{sse-parser-responses-OI73R3AH.js.map → sse-parser-responses-FC3PFHQ5.js.map} +1 -1
  216. package/bundle/{ssrf-guard-6GP4QYVA.js → ssrf-guard-E2YPLW6G.js} +5 -4
  217. package/bundle/{ssrf-guard-6GP4QYVA.js.map → ssrf-guard-E2YPLW6G.js.map} +1 -1
  218. package/bundle/{start-JT2BPMSW.js → start-HPO5LYJP.js} +5 -5
  219. package/bundle/start-HPO5LYJP.js.map +7 -0
  220. package/bundle/{stt-KD3AABKG.js → stt-UE7EOYD7.js} +6 -5
  221. package/bundle/{subagent-runtime-LVECAUPV.js → subagent-runtime-4X3UHF4H.js} +6 -5
  222. package/bundle/system-status-PLPWV4RF.js +346 -0
  223. package/bundle/system-status-PLPWV4RF.js.map +7 -0
  224. package/bundle/{task-store-2XRDM3AW.js → task-store-RAFMDQ7N.js} +6 -5
  225. package/bundle/{telegram-adapter-UJ3RYYV6.js → telegram-adapter-PPXKTGOP.js} +35 -35
  226. package/bundle/{tool-registry-YU6WBXPA.js → tool-registry-NKIPNJZ5.js} +25 -23
  227. package/bundle/{tool-sandbox-RNNPDR5M.js → tool-sandbox-DQCP3UTU.js} +6 -5
  228. package/bundle/{transport-config-OK3MZPJK.js → transport-config-SF6GBV47.js} +9 -8
  229. package/bundle/{update-ENNPRW7Y.js → update-QOOGMFSJ.js} +6 -6
  230. package/bundle/{update-check-SJB6GV3A.js → update-check-LPZG3K5P.js} +3 -2
  231. package/bundle/{update-check-SJB6GV3A.js.map → update-check-LPZG3K5P.js.map} +1 -1
  232. package/bundle/{usage-tracker-HRSGC7QC.js → usage-tracker-TBDM4KE6.js} +2 -2
  233. package/bundle/{user-registry-6PUJJ5J2.js → user-registry-OYJVAHDD.js} +6 -5
  234. package/bundle/{wrapper-WLHLG4MI.js → wrapper-W66YICNZ.js} +3 -3
  235. package/bundle/{ws-peer-client-WHW3RJTD.js → ws-peer-client-G5QHOF6K.js} +15 -14
  236. package/bundle/{ws-peer-client-WHW3RJTD.js.map → ws-peer-client-G5QHOF6K.js.map} +2 -2
  237. package/package.json +3 -7
  238. package/scripts/emergency-deploy.sh +11 -8
  239. package/scripts/emergency-update.sh +156 -23
  240. package/templates/config/.env +1 -1
  241. package/templates/config/models.json +13 -0
  242. package/bundle/chunk-37EX63K4.js.map +0 -7
  243. package/bundle/chunk-3QW2K53E.js.map +0 -7
  244. package/bundle/chunk-72T2Q7IG.js.map +0 -7
  245. package/bundle/chunk-7RAGSHSH.js.map +0 -7
  246. package/bundle/chunk-BU7LTI2W.js.map +0 -7
  247. package/bundle/chunk-C3EYYJN3.js.map +0 -7
  248. package/bundle/chunk-CAOIIVFP.js +0 -110
  249. package/bundle/chunk-CAOIIVFP.js.map +0 -7
  250. package/bundle/chunk-EDZGF6BC.js.map +0 -7
  251. package/bundle/chunk-H2K23MOF.js.map +0 -7
  252. package/bundle/chunk-HAZHNBBY.js +0 -156
  253. package/bundle/chunk-HAZHNBBY.js.map +0 -7
  254. package/bundle/chunk-IXKQ4JMX.js.map +0 -7
  255. package/bundle/chunk-JAJ3DUQ2.js +0 -30
  256. package/bundle/chunk-JAJ3DUQ2.js.map +0 -7
  257. package/bundle/chunk-KMFR5AVY.js +0 -45
  258. package/bundle/chunk-KMFR5AVY.js.map +0 -7
  259. package/bundle/chunk-M6Q3IQ4H.js.map +0 -7
  260. package/bundle/chunk-MQJG7OJX.js.map +0 -7
  261. package/bundle/chunk-OY2HAK33.js.map +0 -7
  262. package/bundle/chunk-P5O6QZDC.js.map +0 -7
  263. package/bundle/chunk-RJX45XIC.js.map +0 -7
  264. package/bundle/chunk-S6HEHCCG.js.map +0 -7
  265. package/bundle/chunk-SESM4GBM.js.map +0 -7
  266. package/bundle/chunk-SXNY6HC4.js.map +0 -7
  267. package/bundle/chunk-VJATH7AN.js.map +0 -7
  268. package/bundle/chunk-ZY6DH2S4.js.map +0 -7
  269. package/bundle/deps-PHSLIA77.js.map +0 -7
  270. package/bundle/direct-api-transport-OAKYQBJR.js.map +0 -7
  271. package/bundle/dist-7HEHHQI2.js.map +0 -7
  272. package/bundle/health-check-FRUNRVNQ.js.map +0 -7
  273. package/bundle/heartbeat-tier3-3ZO3EVXP.js.map +0 -7
  274. package/bundle/install-ZAHTZ5M5.js.map +0 -7
  275. package/bundle/migrate-layout-RJJQLVGR.js.map +0 -7
  276. package/bundle/phase-config-V4XETN5F.js +0 -18
  277. package/bundle/sandbox-runtime-WHACQLLN.js +0 -22
  278. package/bundle/start-JT2BPMSW.js.map +0 -7
  279. package/bundle/system-status-XXJWTVJN.js +0 -243
  280. package/bundle/system-status-XXJWTVJN.js.map +0 -7
  281. package/bundle/user-registry-6PUJJ5J2.js.map +0 -7
  282. package/bundle/wrapper-WLHLG4MI.js.map +0 -7
  283. /package/bundle/{agent-api-rate-limit-4GEZ4YN5.js.map → agent-api-rate-limit-VENFGOAD.js.map} +0 -0
  284. /package/bundle/{agent-registry-563P4EUJ.js.map → agent-registry-DL7UT272.js.map} +0 -0
  285. /package/bundle/{bridge-lock-transport-LXCF2IVN.js.map → bridge-lock-transport-BJAMHMXW.js.map} +0 -0
  286. /package/bundle/{browser-2VZOGOGX.js.map → browser-PT54UWSW.js.map} +0 -0
  287. /package/bundle/{capability-WXEA2WFK.js.map → capability-EKPGHQIO.js.map} +0 -0
  288. /package/bundle/{chunk-4PIVWXUJ.js.map → chunk-2ZD7VQRW.js.map} +0 -0
  289. /package/bundle/{chunk-T7TAWGBX.js.map → chunk-52PQM4EZ.js.map} +0 -0
  290. /package/bundle/{chunk-2RGR3LSV.js.map → chunk-5P5HF7IJ.js.map} +0 -0
  291. /package/bundle/{chunk-OOKNHOCB.js.map → chunk-6S3G6GPO.js.map} +0 -0
  292. /package/bundle/{chunk-E7MV7WFT.js.map → chunk-6VTHSN4V.js.map} +0 -0
  293. /package/bundle/{chunk-NGZVJ52F.js.map → chunk-76YN7O3U.js.map} +0 -0
  294. /package/bundle/{chunk-43DKPXTP.js.map → chunk-7LORCJCQ.js.map} +0 -0
  295. /package/bundle/{chunk-HDOFJVFS.js.map → chunk-7OI46MH7.js.map} +0 -0
  296. /package/bundle/{chunk-CB6S3ZRF.js.map → chunk-AFFW2LRY.js.map} +0 -0
  297. /package/bundle/{chunk-TCI6FZTP.js.map → chunk-AHJDG6OM.js.map} +0 -0
  298. /package/bundle/{chunk-YME7NRGP.js.map → chunk-B2TIRDZC.js.map} +0 -0
  299. /package/bundle/{chunk-SSCGWDIC.js.map → chunk-BWJ37KMW.js.map} +0 -0
  300. /package/bundle/{chunk-ULO2PX3T.js.map → chunk-CCZ43JB7.js.map} +0 -0
  301. /package/bundle/{chunk-FVUL44T4.js.map → chunk-CNENVY37.js.map} +0 -0
  302. /package/bundle/{chunk-J5NOL4DB.js.map → chunk-DJOSXXM2.js.map} +0 -0
  303. /package/bundle/{chunk-DNDYD5SL.js.map → chunk-E7DZYCSF.js.map} +0 -0
  304. /package/bundle/{chunk-GCFIK6OB.js.map → chunk-FSGICOCX.js.map} +0 -0
  305. /package/bundle/{chunk-FJF42RZY.js.map → chunk-GHRLO2UL.js.map} +0 -0
  306. /package/bundle/{chunk-7WHXTCVD.js.map → chunk-HWFN7JGU.js.map} +0 -0
  307. /package/bundle/{chunk-KBPVJGD7.js.map → chunk-IXGDDDAB.js.map} +0 -0
  308. /package/bundle/{chunk-YEOZN5IE.js.map → chunk-JRGEEGZF.js.map} +0 -0
  309. /package/bundle/{chunk-56D3Y44D.js.map → chunk-KLG4SCF7.js.map} +0 -0
  310. /package/bundle/{chunk-ASYX43OU.js.map → chunk-LB43Q7G6.js.map} +0 -0
  311. /package/bundle/{chunk-TVSPVZTX.js.map → chunk-LN5MNDSA.js.map} +0 -0
  312. /package/bundle/{chunk-FIAVVKGN.js.map → chunk-MTE32OQH.js.map} +0 -0
  313. /package/bundle/{chunk-MV5KOWOR.js.map → chunk-N3Q3TASM.js.map} +0 -0
  314. /package/bundle/{chunk-IQKADER4.js.map → chunk-O4YBJS2K.js.map} +0 -0
  315. /package/bundle/{chunk-5V4VHKEA.js.map → chunk-OT6HLPEA.js.map} +0 -0
  316. /package/bundle/{chunk-V6CV3QPH.js.map → chunk-OWPQIBAO.js.map} +0 -0
  317. /package/bundle/{chunk-N5VROZ7A.js.map → chunk-QMP2KC4W.js.map} +0 -0
  318. /package/bundle/{chunk-4HNCOQSK.js.map → chunk-QOGZ7BFL.js.map} +0 -0
  319. /package/bundle/{chunk-2LKQV2ND.js.map → chunk-R23FHZRY.js.map} +0 -0
  320. /package/bundle/{chunk-TY26WMQY.js.map → chunk-RCWQ34QR.js.map} +0 -0
  321. /package/bundle/{chunk-ZOCEBV62.js.map → chunk-UU3RLJSD.js.map} +0 -0
  322. /package/bundle/{chunk-WP7FZHMI.js.map → chunk-W2PSVV2T.js.map} +0 -0
  323. /package/bundle/{chunk-V2QIAXWZ.js.map → chunk-WEGFRA6G.js.map} +0 -0
  324. /package/bundle/{chunk-O4GKI3Q3.js.map → chunk-X7DLKIQM.js.map} +0 -0
  325. /package/bundle/{chunk-BNBC4T45.js.map → chunk-XZ4ZBDM5.js.map} +0 -0
  326. /package/bundle/{chunk-24V4A6RP.js.map → chunk-YI2KSYB4.js.map} +0 -0
  327. /package/bundle/{chunk-IK4R3RBZ.js.map → chunk-YZCOA4DC.js.map} +0 -0
  328. /package/bundle/{chunk-2FZJDMAF.js.map → chunk-ZGNSCJWH.js.map} +0 -0
  329. /package/bundle/{chunk-W726UGI6.js.map → chunk-ZKMKAO75.js.map} +0 -0
  330. /package/bundle/{commands-XXFU2ZF7.js.map → commands-2JQ5YTJX.js.map} +0 -0
  331. /package/bundle/{config-EWDZ234X.js.map → config-ZEWIM5Z2.js.map} +0 -0
  332. /package/bundle/{config-show-6J33O4TE.js.map → config-show-WBJPQPRD.js.map} +0 -0
  333. /package/bundle/{daemon-LTDAXNA2.js.map → daemon-W7VQOSZC.js.map} +0 -0
  334. /package/bundle/{delegation-tools-YDTWQMZD.js.map → delegation-tools-VGTRFQBF.js.map} +0 -0
  335. /package/bundle/{deploy-lib-import-RGZJ3CGC.js.map → deploy-5AGIULM2.js.map} +0 -0
  336. /package/bundle/{doctor-probes-3SLIUGKS.js.map → deploy-lib-import-ZBDYORN4.js.map} +0 -0
  337. /package/bundle/{discord-adapter-WUNYPTDE.js.map → discord-adapter-LKBSIFLV.js.map} +0 -0
  338. /package/bundle/{env-schema-MSDP2YBO.js.map → doctor-probes-46UKIROK.js.map} +0 -0
  339. /package/bundle/{gossip-CS3G3447.js.map → env-schema-YGHCKX5B.js.map} +0 -0
  340. /package/bundle/{guardrails-24XK2COI.js.map → gossip-VSEY2HSE.js.map} +0 -0
  341. /package/bundle/{heartbeat-system-G4IFQXT6.js.map → guardrails-U7M6H2GE.js.map} +0 -0
  342. /package/bundle/{hook-system-X6INNJGV.js.map → heartbeat-system-MUXLT4E6.js.map} +0 -0
  343. /package/bundle/{hotskills-6FQYTJIO.js.map → hook-system-Z4XD6IM5.js.map} +0 -0
  344. /package/bundle/{kanban-board-J6RO3ZU7.js.map → hotskills-AOUWVTQB.js.map} +0 -0
  345. /package/bundle/{kanban-channel-5EIXBFSA.js.map → kanban-board-4AI5Z6B5.js.map} +0 -0
  346. /package/bundle/{lazy-require-V6EFUATC.js.map → kanban-channel-JMBYWGWD.js.map} +0 -0
  347. /package/bundle/{logger-Y3VILPRH.js.map → lazy-require-GURNBC3C.js.map} +0 -0
  348. /package/bundle/{main-chat-YLZDNQPO.js.map → logger-UQJPZMYV.js.map} +0 -0
  349. /package/bundle/{logs-YS3GDURO.js.map → logs-2WTDLMB5.js.map} +0 -0
  350. /package/bundle/{master-user-Z4M7KCJE.js.map → main-chat-EID5Y6H2.js.map} +0 -0
  351. /package/bundle/{message-pipeline-MHEBDJLH.js.map → master-user-TKA7M2GL.js.map} +0 -0
  352. /package/bundle/{nerve-VZNMFDGY.js.map → message-pipeline-TAWXNEVS.js.map} +0 -0
  353. /package/bundle/{notification-VV2OR6NW.js.map → nerve-TC34H4EL.js.map} +0 -0
  354. /package/bundle/{orc-tools-CHRSXSAS.js.map → notification-JQNVGICN.js.map} +0 -0
  355. /package/bundle/{orc-KC4USP55.js.map → orc-74Z62W7B.js.map} +0 -0
  356. /package/bundle/{paths-EDK6KWHG.js.map → orc-tools-GME3DKIN.js.map} +0 -0
  357. /package/bundle/{paths-RZF6WDMG.js.map → paths-BAUNPLNJ.js.map} +0 -0
  358. /package/bundle/{peer-auth-SRONOLNG.js.map → paths-MZC2KU2C.js.map} +0 -0
  359. /package/bundle/{peer-config-FRWLEYQ5.js.map → peer-auth-VRO3JYL5.js.map} +0 -0
  360. /package/bundle/{peer-jwt-XY3XRIA2.js.map → peer-config-24WILLCJ.js.map} +0 -0
  361. /package/bundle/{peer-transport-UBBXTDRP.js.map → peer-jwt-ZR6RF3XM.js.map} +0 -0
  362. /package/bundle/{phase-config-V4XETN5F.js.map → peer-transport-BK5VHI2M.js.map} +0 -0
  363. /package/bundle/{phase-transport-4NQHZX75.js.map → phase-transport-7QJM7J6V.js.map} +0 -0
  364. /package/bundle/{reconcile-2EUXJ6W5.js.map → reconcile-7N7OE2GU.js.map} +0 -0
  365. /package/bundle/{registry-client-VN2MM2HI.js.map → rollback-JOHY6KWW.js.map} +0 -0
  366. /package/bundle/{rollback-MVZ53XS4.js.map → sha-tracker-BXOLWZJL.js.map} +0 -0
  367. /package/bundle/{sandbox-runtime-WHACQLLN.js.map → skill-stats-7O777ZSZ.js.map} +0 -0
  368. /package/bundle/{sha-tracker-2DB4R2TW.js.map → skill-watcher-ZGLTDPG5.js.map} +0 -0
  369. /package/bundle/{skill-stats-TPD2NROA.js.map → sleep-3LFZH727.js.map} +0 -0
  370. /package/bundle/{skill-watcher-D7QYYYON.js.map → soul-bundle-RQ2YQMJW.js.map} +0 -0
  371. /package/bundle/{sleep-GH6DLBJJ.js.map → spin-76K4R6FK.js.map} +0 -0
  372. /package/bundle/{soul-bundle-GXLMDBCC.js.map → spin-types-MOKTZXGB.js.map} +0 -0
  373. /package/bundle/{spin-4DBYHS3E.js.map → src-6BTCMOD3.js.map} +0 -0
  374. /package/bundle/{spin-types-PLJH3SIK.js.map → stt-UE7EOYD7.js.map} +0 -0
  375. /package/bundle/{src-SUFZ27S5.js.map → subagent-runtime-4X3UHF4H.js.map} +0 -0
  376. /package/bundle/{stt-KD3AABKG.js.map → task-store-RAFMDQ7N.js.map} +0 -0
  377. /package/bundle/{telegram-adapter-UJ3RYYV6.js.map → telegram-adapter-PPXKTGOP.js.map} +0 -0
  378. /package/bundle/{subagent-runtime-LVECAUPV.js.map → tool-registry-NKIPNJZ5.js.map} +0 -0
  379. /package/bundle/{task-store-2XRDM3AW.js.map → tool-sandbox-DQCP3UTU.js.map} +0 -0
  380. /package/bundle/{tool-registry-YU6WBXPA.js.map → transport-config-SF6GBV47.js.map} +0 -0
  381. /package/bundle/{tool-sandbox-RNNPDR5M.js.map → update-QOOGMFSJ.js.map} +0 -0
  382. /package/bundle/{transport-config-OK3MZPJK.js.map → usage-tracker-TBDM4KE6.js.map} +0 -0
  383. /package/bundle/{update-ENNPRW7Y.js.map → user-registry-OYJVAHDD.js.map} +0 -0
  384. /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-JRGEEGZF.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-AMUJEP6L.js";
23
+ import {
24
+ loadNLMConfig
25
+ } from "./chunk-FF2F7ENH.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-E7DZYCSF.js";
30
32
  import {
31
33
  phaseTransport
32
- } from "./chunk-ASYX43OU.js";
34
+ } from "./chunk-LB43Q7G6.js";
33
35
  import {
34
36
  resetAllCtxStarts
35
- } from "./chunk-J5NOL4DB.js";
37
+ } from "./chunk-DJOSXXM2.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-UU3RLJSD.js";
40
+ import {
41
+ loadAndValidateConfig
42
+ } from "./chunk-N3Q3TASM.js";
43
+ import "./chunk-76YN7O3U.js";
44
+ import "./chunk-YWHJJHJ2.js";
40
45
  import {
41
46
  SubagentRuntime
42
- } from "./chunk-2FZJDMAF.js";
47
+ } from "./chunk-ZGNSCJWH.js";
43
48
  import {
44
49
  createCapabilityRegistry
45
- } from "./chunk-24V4A6RP.js";
50
+ } from "./chunk-YI2KSYB4.js";
46
51
  import {
47
52
  sendNotification
48
- } from "./chunk-V2QIAXWZ.js";
53
+ } from "./chunk-WEGFRA6G.js";
54
+ import "./chunk-QOGZ7BFL.js";
55
+ import {
56
+ readEnvWithDefault
57
+ } from "./chunk-OWPQIBAO.js";
49
58
  import {
50
59
  setPeerActivityCallback
51
- } from "./chunk-MQJG7OJX.js";
60
+ } from "./chunk-RJ2OUNFU.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-6IB3GVXK.js";
66
+ import "./chunk-QMP2KC4W.js";
67
+ import "./chunk-IXGDDDAB.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-HWFN7JGU.js";
70
+ import "./chunk-DMDX35YT.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-FSGICOCX.js";
75
+ import "./chunk-R23FHZRY.js";
76
+ import "./chunk-YWZPKBO6.js";
78
77
  import {
79
- readEnvWithDefault
80
- } from "./chunk-V6CV3QPH.js";
78
+ buildPolicy
79
+ } from "./chunk-OT6HLPEA.js";
80
+ import "./chunk-CCZ43JB7.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-MPQ2PJQX.js";
86
+ import "./chunk-4IGLXZCC.js";
87
+ import "./chunk-KLG4SCF7.js";
88
+ import "./chunk-RCWQ34QR.js";
89
+ import {
90
+ init_user_registry,
91
+ loadUsers
92
+ } from "./chunk-7LORCJCQ.js";
93
+ import "./chunk-52PQM4EZ.js";
89
94
  import {
90
95
  gossip_exports,
91
96
  init_gossip
92
- } from "./chunk-BNBC4T45.js";
97
+ } from "./chunk-XZ4ZBDM5.js";
98
+ import {
99
+ init_peer_config,
100
+ peer_config_exports
101
+ } from "./chunk-X7DLKIQM.js";
102
+ import "./chunk-2ZD7VQRW.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-O4YBJS2K.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-ZKMKAO75.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-RO3TAYBR.js";
128
+ import "./chunk-GFAJSPMD.js";
129
+ import "./chunk-B2TIRDZC.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-7OI46MH7.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-BWJ37KMW.js";
152
153
  import {
153
154
  init_log_and_swallow,
154
155
  logAndSwallow
155
- } from "./chunk-WP7FZHMI.js";
156
+ } from "./chunk-W2PSVV2T.js";
156
157
  import {
157
158
  getLogFile,
158
159
  init_logger,
@@ -161,16 +162,22 @@ import {
161
162
  logError,
162
163
  logInfo,
163
164
  logTrace,
164
- logWarn
165
- } from "./chunk-OOKNHOCB.js";
165
+ logWarn,
166
+ setLogLevel
167
+ } from "./chunk-6S3G6GPO.js";
166
168
  import {
167
169
  localDate
168
170
  } from "./chunk-DGS7J4P6.js";
169
171
  import {
170
172
  abtarsHome,
171
173
  abtarsRoot,
172
- init_paths
173
- } from "./chunk-H2K23MOF.js";
174
+ init_paths as init_paths2
175
+ } from "./chunk-7XXISOHU.js";
176
+ import {
177
+ init_paths,
178
+ resolveAbtarsHome,
179
+ resolveReleasesDir
180
+ } from "./chunk-2BXXQG7P.js";
174
181
  import {
175
182
  __commonJS,
176
183
  __require,
@@ -178,9 +185,9 @@ import {
178
185
  __toESM
179
186
  } from "./chunk-7K2YZTLD.js";
180
187
 
181
- // node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json
188
+ // node_modules/dotenv/package.json
182
189
  var require_package = __commonJS({
183
- "node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/package.json"(exports, module) {
190
+ "node_modules/dotenv/package.json"(exports, module) {
184
191
  module.exports = {
185
192
  name: "dotenv",
186
193
  version: "16.6.1",
@@ -246,9 +253,9 @@ var require_package = __commonJS({
246
253
  }
247
254
  });
248
255
 
249
- // node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js
256
+ // node_modules/dotenv/lib/main.js
250
257
  var require_main = __commonJS({
251
- "node_modules/.pnpm/dotenv@16.6.1/node_modules/dotenv/lib/main.js"(exports, module) {
258
+ "node_modules/dotenv/lib/main.js"(exports, module) {
252
259
  var fs = __require("fs");
253
260
  var path = __require("path");
254
261
  var os = __require("os");
@@ -771,7 +778,7 @@ var ServiceRegistry = class {
771
778
  if (state.lastError?.includes("EADDRINUSE")) {
772
779
  const portMatch = state.lastError.match(/:(\d+)/);
773
780
  if (portMatch) {
774
- const { healPort } = await import("./self-healer-utils-KD6LV63S.js");
781
+ const { healPort } = await import("./self-healer-utils-OR2N6RLD.js");
775
782
  healPort(parseInt(portMatch[1], 10));
776
783
  }
777
784
  }
@@ -893,6 +900,86 @@ function createBootCtx(overrides = {}) {
893
900
  return { ...defaults, ...overrides };
894
901
  }
895
902
 
903
+ // src/boot/phase-config.ts
904
+ init_log_and_swallow();
905
+ import { writeFileSync as writeFileSync2 } from "node:fs";
906
+ import { join as join2 } from "node:path";
907
+ import { homedir as homedir3 } from "node:os";
908
+
909
+ // src/components/cli-flags.ts
910
+ import { existsSync as existsSync2 } from "node:fs";
911
+ import { join } from "node:path";
912
+ import { homedir as homedir2 } from "node:os";
913
+ function envBool(key) {
914
+ const v = process.env[key];
915
+ if (v === void 0 || v === "") return void 0;
916
+ return v === "true" || v === "1";
917
+ }
918
+ function parsePlatformFlags(args) {
919
+ const argv = args ?? process.argv.slice(2);
920
+ const transport = argv.includes("--acp") ? "acp" : argv.includes("--tmux") ? "tmux" : void 0;
921
+ if (argv.includes("--telegram") || argv.includes("--discord") || argv.includes("--irc") || argv.includes("--web") || argv.includes("--agent")) {
922
+ return {
923
+ telegram: argv.includes("--telegram"),
924
+ discord: argv.includes("--discord"),
925
+ irc: argv.includes("--irc"),
926
+ web: argv.includes("--web"),
927
+ agent: argv.includes("--agent"),
928
+ transport
929
+ };
930
+ }
931
+ const home2 = process.env["ABTARS_HOME"] ?? join(homedir2(), ".abtars");
932
+ const configDir = join(home2, "config");
933
+ const telegram = envBool("TELEGRAM_ENABLED") ?? !!process.env["TELEGRAM_BOT_TOKEN"];
934
+ const discord = envBool("DISCORD_ENABLED") ?? !!process.env["DISCORD_TOKEN"];
935
+ const irc = envBool("IRC_ENABLED") ?? existsSync2(join(configDir, "irc.json"));
936
+ const web = envBool("ENABLE_DASHBOARD") ?? false;
937
+ const agent = envBool("ENABLE_AGENT_API") ?? false;
938
+ return { telegram, discord, irc, web, agent, transport };
939
+ }
940
+
941
+ // src/boot/phase-config.ts
942
+ init_logger();
943
+ init_env_schema();
944
+ init_paths2();
945
+ async function phaseConfig(ctx) {
946
+ const binDir = join2(homedir3(), ".local", "bin");
947
+ if (!process.env["PATH"]?.includes(binDir)) {
948
+ process.env["PATH"] = `${binDir}:${process.env["PATH"] ?? ""}`;
949
+ }
950
+ ctx.platforms = parsePlatformFlags();
951
+ ctx.config = await loadAndValidateConfig();
952
+ setLogLevel(ctx.config.logLevel);
953
+ const provider = getEnv().memory;
954
+ const memoryEnabled = provider !== "none";
955
+ const abmindHome = process.env["ABMIND_HOME"] || join2(homedir3(), ".abmind");
956
+ const memoryDir = memoryEnabled ? join2(abmindHome, "memory") : "";
957
+ ctx.memoryConfig = { memoryEnabled, memoryDir };
958
+ ctx.bridgeLockPath = join2(abtarsHome(), "bridge.lock");
959
+ ctx.sleepAuditDir = join2(memoryDir || join2(homedir3(), ".abmind", "memory"), "sleep");
960
+ const { initUsageTracker } = await import("./usage-tracker-TBDM4KE6.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-Z4XD6IM5.js");
979
+ loadHookConfig();
980
+ return "ran";
981
+ }
982
+
896
983
  // src/boot/phase-memory.ts
897
984
  init_logger();
898
985
 
@@ -935,23 +1022,25 @@ 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;
956
1045
  return "skipped";
957
1046
  }
@@ -1051,7 +1140,7 @@ async function phasePlatformsConnect(ctx) {
1051
1140
  registry.register("telegram", {
1052
1141
  configured: Boolean(config.telegram.botToken && config.telegram.allowedUserIds.size > 0),
1053
1142
  async create() {
1054
- const { TelegramAdapter } = await import("./telegram-adapter-UJ3RYYV6.js");
1143
+ const { TelegramAdapter } = await import("./telegram-adapter-PPXKTGOP.js");
1055
1144
  const adapter = new TelegramAdapter(
1056
1145
  { botToken: config.telegram.botToken, allowedUserIds: config.telegram.allowedUserIds, pollTimeoutS: config.telegram.pollTimeoutS },
1057
1146
  { pipeline: { handleInbound: (msg) => recovery.handle(msg, adapter) }, conversationBuffer: ctx.conversationBuffer, transport: null, memory: null, sessionManager: ctx.sessionManager, actionGate: ctx.actionGate }
@@ -1079,11 +1168,11 @@ async function phasePlatformsConnect(ctx) {
1079
1168
  registry.register("discord", {
1080
1169
  configured: Boolean(config.discord.enabled && config.discord.botToken && config.discord.allowedUserIds?.size),
1081
1170
  async create() {
1082
- const { isValidSnowflake } = await import("./config-EWDZ234X.js");
1171
+ const { isValidSnowflake } = await import("./config-ZEWIM5Z2.js");
1083
1172
  if (!config.discord.appId || !isValidSnowflake(config.discord.appId)) {
1084
1173
  throw new Error("DISCORD_APP_ID missing or invalid \u2014 Discord disabled");
1085
1174
  }
1086
- const { DiscordAdapter } = await import("./discord-adapter-WUNYPTDE.js");
1175
+ const { DiscordAdapter } = await import("./discord-adapter-LKBSIFLV.js");
1087
1176
  const adapter = new DiscordAdapter(
1088
1177
  { botToken: config.discord.botToken, appId: config.discord.appId, allowedUserIds: config.discord.allowedUserIds },
1089
1178
  { pipeline: { handleInbound: (msg) => recovery.handle(msg, adapter) }, transport: null, memory: null, conversationBuffer: ctx.conversationBuffer }
@@ -1112,8 +1201,8 @@ async function phasePlatformsConnect(ctx) {
1112
1201
  registry.register("irc", {
1113
1202
  configured: platforms.irc,
1114
1203
  async create() {
1115
- const { loadIrcConfig } = await import("./irc-config-TTWNYFLH.js");
1116
- const { IrcAdapter } = await import("./irc-adapter-IEJQKKJF.js");
1204
+ const { loadIrcConfig } = await import("./irc-config-PG4X2I4M.js");
1205
+ const { IrcAdapter } = await import("./irc-adapter-SA7GLJGR.js");
1117
1206
  const ircConfig = loadIrcConfig();
1118
1207
  if (!ircConfig) throw new Error("irc.json missing or empty");
1119
1208
  const adapter = new IrcAdapter(ircConfig, { onMessage: (msg) => recovery.handle(msg, adapter) });
@@ -1143,10 +1232,10 @@ init_logger();
1143
1232
  async function phaseCapabilities(ctx) {
1144
1233
  const { config, memory, transport, runtime, capabilities, pipelineDeps } = ctx;
1145
1234
  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"));
1235
+ const { SkillWatcher } = await import("./skill-watcher-ZGLTDPG5.js");
1236
+ const { abtarsHome: abtarsHome2 } = await import("./paths-MZC2KU2C.js");
1237
+ const { join: join9 } = await import("node:path");
1238
+ const sw = new SkillWatcher(join9(abtarsHome2(), "skills"), join9(abtarsHome2(), "skills", "skills_catalog.md"));
1150
1239
  sw.generateCatalog();
1151
1240
  } catch {
1152
1241
  }
@@ -1155,24 +1244,24 @@ async function phaseCapabilities(ctx) {
1155
1244
  logWarn("boot", `${phaseCapabilities.name}: skipping \u2014 transport not available`);
1156
1245
  return "skipped";
1157
1246
  }
1158
- const { createCapabilityApi } = await import("./capability-WXEA2WFK.js");
1159
- const { getEnv: getEnv2 } = await import("./env-schema-MSDP2YBO.js");
1247
+ const { createCapabilityApi } = await import("./capability-EKPGHQIO.js");
1248
+ const { getEnv: getEnv2 } = await import("./env-schema-YGHCKX5B.js");
1160
1249
  const disabled = new Set(getEnv2().disabledCapabilities.split(",").map((s) => s.trim()).filter(Boolean));
1161
1250
  let loaded = [];
1162
1251
  let staticCaps;
1163
1252
  try {
1164
- ({ capabilities: staticCaps } = await import("./_registry.generated-7DRCE4V6.js"));
1253
+ ({ capabilities: staticCaps } = await import("./_registry.generated-ZJBAZMXN.js"));
1165
1254
  } catch (err) {
1166
1255
  logError("capabilities", `Registry import failed: ${err instanceof Error ? err.message : String(err)}. Loading individually.`);
1167
1256
  staticCaps = [];
1168
1257
  const individualCaps = [
1169
- { name: "hotskills", load: () => import("./hotskills-6FQYTJIO.js") },
1170
- { name: "browser", load: () => import("./browser-2VZOGOGX.js") }
1258
+ { name: "hotskills", load: () => import("./hotskills-AOUWVTQB.js") },
1259
+ { name: "browser", load: () => import("./browser-PT54UWSW.js") }
1171
1260
  ];
1172
1261
  for (const { name, load } of individualCaps) {
1173
1262
  if (disabled.has(name)) continue;
1174
1263
  try {
1175
- const { shouldAttempt } = await import("./sha-tracker-2DB4R2TW.js");
1264
+ const { shouldAttempt } = await import("./sha-tracker-BXOLWZJL.js");
1176
1265
  if (!shouldAttempt("missing-dep", name)) {
1177
1266
  logDebug("capabilities", `Skipped "${name}": SHA cooldown active`);
1178
1267
  continue;
@@ -1180,7 +1269,7 @@ async function phaseCapabilities(ctx) {
1180
1269
  const mod = await load();
1181
1270
  staticCaps.push({ name, module: mod });
1182
1271
  } catch (e) {
1183
- const { recordResult } = await import("./sha-tracker-2DB4R2TW.js");
1272
+ const { recordResult } = await import("./sha-tracker-BXOLWZJL.js");
1184
1273
  recordResult("missing-dep", name, false, e instanceof Error ? e.message : String(e));
1185
1274
  logWarn("capabilities", `Skipped "${name}": ${e instanceof Error ? e.message : String(e)}`);
1186
1275
  }
@@ -1306,7 +1395,7 @@ function startInProcWatchdog(opts) {
1306
1395
  // src/boot/phase-heartbeat.ts
1307
1396
  var TAG3 = "heartbeat";
1308
1397
  async function phaseHeartbeat(ctx) {
1309
- const { init: initSkillStats } = await import("./skill-stats-TPD2NROA.js");
1398
+ const { init: initSkillStats } = await import("./skill-stats-7O777ZSZ.js");
1310
1399
  initSkillStats();
1311
1400
  updateBridgeLockField("startedAt", ctx.startedAt);
1312
1401
  const hbIntervalMs = Math.max(60, parseInt(readEnvWithDefault("HEARTBEAT_INTERVAL_SEC", "60", "heartbeat tick interval"), 10)) * 1e3;
@@ -1338,7 +1427,7 @@ async function phaseHeartbeat(ctx) {
1338
1427
  heartbeat.registerTask(createSkillStatsFlushTask());
1339
1428
  heartbeat.registerTask(createSkillReloadTask());
1340
1429
  heartbeat.registerTask(createUpdateCheckTask((msg) => {
1341
- import("./notification-VV2OR6NW.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG3, "sendNotification update-check", err));
1430
+ import("./notification-JQNVGICN.js").then(({ sendNotification: sendNotification2 }) => sendNotification2(ctx, msg)).catch((err) => logAndSwallow(TAG3, "sendNotification update-check", err));
1342
1431
  }));
1343
1432
  heartbeat.registerTask({
1344
1433
  name: "restart-check",
@@ -1350,14 +1439,14 @@ async function phaseHeartbeat(ctx) {
1350
1439
  }
1351
1440
  }
1352
1441
  });
1353
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
1442
+ const { spin: spin2 } = await import("./spin-76K4R6FK.js");
1354
1443
  const masterUser = loadUsers().users.find((u) => u.role === "master");
1355
1444
  const masterUserId = masterUser?.userId ?? "master";
1356
1445
  ctx.sendSystemMessage = async (prompt) => {
1357
1446
  try {
1358
1447
  const response = await spin2.inject(masterUserId, `[SYSTEM] ${prompt}`, { deliver: true });
1359
1448
  if (response) {
1360
- const { sendNotification: sendNotification2 } = await import("./notification-VV2OR6NW.js");
1449
+ const { sendNotification: sendNotification2 } = await import("./notification-JQNVGICN.js");
1361
1450
  sendNotification2(ctx, response);
1362
1451
  }
1363
1452
  } catch (err) {
@@ -1378,11 +1467,11 @@ async function phaseSleep(ctx) {
1378
1467
  logWarn("boot", `${phaseSleep.name}: skipping \u2014 heartbeat not available`);
1379
1468
  return "skipped";
1380
1469
  }
1381
- const { createSleepHandle } = await import("./sleep-GH6DLBJJ.js");
1382
- const { killWakeInhibit } = await import("./commands-XXFU2ZF7.js");
1470
+ const { createSleepHandle } = await import("./sleep-3LFZH727.js");
1471
+ const { killWakeInhibit } = await import("./commands-2JQ5YTJX.js");
1383
1472
  const SLEEP_HOUR = parseInt(readEnvWithDefault("BED_TIME", "2", "bedtime hour").split(":")[0] ?? "2", 10);
1384
1473
  let subagent = null;
1385
- const { getEnv: getEnv2 } = await import("./env-schema-MSDP2YBO.js");
1474
+ const { getEnv: getEnv2 } = await import("./env-schema-YGHCKX5B.js");
1386
1475
  const runtime = {
1387
1476
  async complete(prompt) {
1388
1477
  if (!subagent) subagent = new SubagentRuntime();
@@ -1406,14 +1495,14 @@ async function phaseSleep(ctx) {
1406
1495
  init_log_and_swallow();
1407
1496
  init_env_schema();
1408
1497
  init_logger();
1409
- import { join as join3 } from "node:path";
1498
+ import { join as join5 } from "node:path";
1410
1499
 
1411
1500
  // src/components/dashboard/dashboard-config.ts
1412
1501
  init_logger();
1413
- init_paths();
1414
- import { existsSync as existsSync3 } from "node:fs";
1502
+ init_paths2();
1503
+ import { existsSync as existsSync4 } from "node:fs";
1415
1504
  import { resolve as resolve2 } from "node:path";
1416
- import { homedir as homedir3 } from "node:os";
1505
+ import { homedir as homedir5 } from "node:os";
1417
1506
  var DASHBOARD_DEFAULTS = {
1418
1507
  webPort: 3e3,
1419
1508
  webHost: "127.0.0.1",
@@ -1476,8 +1565,8 @@ function buildStatusSnapshot(refs) {
1476
1565
  heartbeat,
1477
1566
  cron: readCronStatus(),
1478
1567
  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")),
1568
+ gwsAuth: existsSync4(resolve2(homedir5(), ".config", "gws-cli", "token.json.enc")),
1569
+ xAuth: existsSync4(resolve2(abtarsHome(), "secret", "cookies", "x-cookies.json")),
1481
1570
  agentApi: refs.agentApi ? { traffic: refs.agentApi.getTrafficLog() } : null,
1482
1571
  model: refs.model ?? { name: "unknown", provider: "unknown", fallbackChain: [] },
1483
1572
  subsystems: refs.subsystems ?? []
@@ -1650,11 +1739,11 @@ function parseOptionalNumber(val) {
1650
1739
  // src/components/dashboard/dashboard-server.ts
1651
1740
  init_log_and_swallow();
1652
1741
  init_local_time();
1653
- init_paths();
1742
+ init_paths2();
1654
1743
  init_wrapper();
1655
1744
  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";
1745
+ import { readFileSync as readFileSync2, existsSync as existsSync5 } from "node:fs";
1746
+ import { join as join4, dirname } from "node:path";
1658
1747
  import { fileURLToPath } from "node:url";
1659
1748
 
1660
1749
  // src/components/status-broadcaster.ts
@@ -1778,7 +1867,7 @@ var DashboardServer = class {
1778
1867
  }
1779
1868
  /** Start listening on the configured host and port. */
1780
1869
  start() {
1781
- return new Promise((resolve4, reject) => {
1870
+ return new Promise((resolve3, reject) => {
1782
1871
  const { config } = this.deps;
1783
1872
  this.server = http.createServer((req, res) => {
1784
1873
  this.handleRequest(req, res);
@@ -1791,13 +1880,13 @@ var DashboardServer = class {
1791
1880
  });
1792
1881
  this.server.listen(config.webPort, config.webHost, () => {
1793
1882
  logInfo(TAG5, `Dashboard listening on ${config.webHost}:${config.webPort}`);
1794
- resolve4();
1883
+ resolve3();
1795
1884
  });
1796
1885
  });
1797
1886
  }
1798
1887
  /** Close all WebSocket connections and stop the HTTP server. */
1799
1888
  stop() {
1800
- return new Promise((resolve4) => {
1889
+ return new Promise((resolve3) => {
1801
1890
  this._broadcaster.shutdown();
1802
1891
  for (const client of this.wss.clients) {
1803
1892
  try {
@@ -1809,9 +1898,9 @@ var DashboardServer = class {
1809
1898
  this.wss.close(() => {
1810
1899
  if (this.server) {
1811
1900
  this.server.closeAllConnections();
1812
- this.server.close(() => resolve4());
1901
+ this.server.close(() => resolve3());
1813
1902
  } else {
1814
- resolve4();
1903
+ resolve3();
1815
1904
  }
1816
1905
  });
1817
1906
  });
@@ -1823,8 +1912,8 @@ var DashboardServer = class {
1823
1912
  const method = req.method ?? "GET";
1824
1913
  const pathname = url.split("?")[0];
1825
1914
  if (method === "GET" && pathname === "/") {
1826
- const indexPath = join2(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
1827
- if (existsSync4(indexPath)) {
1915
+ const indexPath = join4(dirname(fileURLToPath(import.meta.url)), "public", "index.html");
1916
+ if (existsSync5(indexPath)) {
1828
1917
  let html = readFileSync2(indexPath, "utf-8");
1829
1918
  const agentApi = this.deps.agentApiConfig;
1830
1919
  if (agentApi) {
@@ -1842,15 +1931,15 @@ var DashboardServer = class {
1842
1931
  if (method === "GET" && /^\/(js|css|assets|[\w-]+\.(js|css|jpg|png|ico))/.test(pathname ?? "")) {
1843
1932
  const safePath = (pathname ?? "").replace(/\.\./g, "");
1844
1933
  if (safePath === "/assets/logo.png") {
1845
- const customLogo = join2(abtarsHome(), "logo", "logo.png");
1846
- if (existsSync4(customLogo)) {
1934
+ const customLogo = join4(abtarsHome(), "logo", "logo.png");
1935
+ if (existsSync5(customLogo)) {
1847
1936
  res.writeHead(200, { "Content-Type": "image/png" });
1848
1937
  res.end(readFileSync2(customLogo));
1849
1938
  return;
1850
1939
  }
1851
1940
  }
1852
- const filePath = join2(dirname(fileURLToPath(import.meta.url)), "public", safePath);
1853
- if (existsSync4(filePath)) {
1941
+ const filePath = join4(dirname(fileURLToPath(import.meta.url)), "public", safePath);
1942
+ if (existsSync5(filePath)) {
1854
1943
  const ext = safePath.split(".").pop() ?? "";
1855
1944
  const mimeTypes = { js: "text/javascript", css: "text/css", jpg: "image/jpeg", png: "image/png", ico: "image/x-icon", html: "text/html" };
1856
1945
  res.writeHead(200, { "Content-Type": (mimeTypes[ext] ?? "application/octet-stream") + (["js", "css", "html"].includes(ext) ? "; charset=utf-8" : "") });
@@ -1950,7 +2039,7 @@ var DashboardServer = class {
1950
2039
  if (method === "GET" && pathname === "/api/cron") {
1951
2040
  if (!this.deps.authGate.guard(req, res)) return;
1952
2041
  try {
1953
- const { readEntries: readEntries2 } = await import("./task-store-2XRDM3AW.js");
2042
+ const { readEntries: readEntries2 } = await import("./task-store-RAFMDQ7N.js");
1954
2043
  res.writeHead(200, { "Content-Type": "application/json" });
1955
2044
  res.end(JSON.stringify({ ok: true, entries: readEntries2() }));
1956
2045
  } catch (err) {
@@ -2001,7 +2090,7 @@ var DashboardServer = class {
2001
2090
  };
2002
2091
  function readLogLines(cutoffMs, levelFilter, limit) {
2003
2092
  const logFile = getLogFile();
2004
- if (!existsSync4(logFile)) return [];
2093
+ if (!existsSync5(logFile)) return [];
2005
2094
  const content = readFileSync2(logFile, "utf-8");
2006
2095
  const allLines = content.split("\n").filter((l) => l.length > 0);
2007
2096
  const cutoffIso = localISO(new Date(cutoffMs));
@@ -2060,7 +2149,7 @@ async function phaseDashboard(ctx) {
2060
2149
  const token = randomBytes(32).toString("hex");
2061
2150
  dashConfig.webAuthToken = token;
2062
2151
  process.env["WEB_AUTH"] = token;
2063
- const envPath = join3(process.cwd(), "config", ".env");
2152
+ const envPath = join5(process.cwd(), "config", ".env");
2064
2153
  try {
2065
2154
  let content = "";
2066
2155
  try {
@@ -2175,11 +2264,11 @@ WEB_AUTH=${token}
2175
2264
 
2176
2265
  // src/components/agent-api-server.ts
2177
2266
  init_log_and_swallow();
2178
- init_paths();
2267
+ init_paths2();
2179
2268
  import { createServer as createServer2 } from "http";
2180
2269
  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";
2270
+ import { readFileSync as readFileSync3, existsSync as existsSync6, appendFileSync, mkdirSync, writeFileSync as writeFileSync3 } from "fs";
2271
+ import { join as join6 } from "path";
2183
2272
  init_logger();
2184
2273
  init_logger();
2185
2274
 
@@ -2388,7 +2477,7 @@ function normalizeIp(raw) {
2388
2477
  }
2389
2478
  var MAX_BODY_BYTES = 6 * 1024 * 1024;
2390
2479
  function readBody(req) {
2391
- return new Promise((resolve4, reject) => {
2480
+ return new Promise((resolve3, reject) => {
2392
2481
  const chunks = [];
2393
2482
  let size = 0;
2394
2483
  req.on("data", (c) => {
@@ -2400,7 +2489,7 @@ function readBody(req) {
2400
2489
  }
2401
2490
  chunks.push(c);
2402
2491
  });
2403
- req.on("end", () => resolve4(Buffer.concat(chunks).toString()));
2492
+ req.on("end", () => resolve3(Buffer.concat(chunks).toString()));
2404
2493
  req.on("error", reject);
2405
2494
  });
2406
2495
  }
@@ -2430,11 +2519,11 @@ var AgentApiServer = class {
2430
2519
  this.runtime = deps.runtime;
2431
2520
  this.onPeerActivity = deps.onPeerActivity;
2432
2521
  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");
2522
+ const configDir = join6(abtarsHome(), "config");
2523
+ const identityCrtPath = join6(configDir, "identity.crt");
2524
+ const identityKeyPath = join6(configDir, "identity.tls.key");
2436
2525
  let hasTls = false;
2437
- if (existsSync5(identityCrtPath) && existsSync5(identityKeyPath)) {
2526
+ if (existsSync6(identityCrtPath) && existsSync6(identityKeyPath)) {
2438
2527
  try {
2439
2528
  this.server = createHttpsServer({
2440
2529
  key: readFileSync3(identityKeyPath),
@@ -2453,14 +2542,14 @@ var AgentApiServer = class {
2453
2542
  if (!hasTls) {
2454
2543
  this.server = createServer2((req, res) => this.handle(req, res));
2455
2544
  }
2456
- this.logDir = join4(abtarsHome(), "logs", "agents");
2545
+ this.logDir = join6(abtarsHome(), "logs", "agents");
2457
2546
  mkdirSync(this.logDir, { recursive: true });
2458
2547
  this.logFile = this.newLogFile();
2459
2548
  try {
2460
2549
  const name = deps.config.agentCodename;
2461
2550
  const candidates = [
2462
- join4(abtarsRoot(), "prompts", `agent_${name}.md`),
2463
- join4(abtarsRoot(), "prompts", "agent_default.md")
2551
+ join6(abtarsRoot(), "prompts", `agent_${name}.md`),
2552
+ join6(abtarsRoot(), "prompts", "agent_default.md")
2464
2553
  ];
2465
2554
  this.agentRules = "";
2466
2555
  for (const p of candidates) {
@@ -2477,7 +2566,7 @@ var AgentApiServer = class {
2477
2566
  }
2478
2567
  }
2479
2568
  async start() {
2480
- const { WebSocketServer: WebSocketServer2 } = await import("./wrapper-WLHLG4MI.js");
2569
+ const { WebSocketServer: WebSocketServer2 } = await import("./wrapper-W66YICNZ.js");
2481
2570
  this.peerWss = new WebSocketServer2({ noServer: true });
2482
2571
  this.server.on("upgrade", (req, socket, head) => {
2483
2572
  if (req.url !== "/v1/ws") {
@@ -2491,12 +2580,12 @@ var AgentApiServer = class {
2491
2580
  return;
2492
2581
  }
2493
2582
  const token = auth.slice(7);
2494
- import("./peer-jwt-XY3XRIA2.js").then(({ verifyJwt }) => {
2495
- import("./peer-config-FRWLEYQ5.js").then(({ loadPeerConfig }) => {
2583
+ import("./peer-jwt-ZR6RF3XM.js").then(({ verifyJwt }) => {
2584
+ import("./peer-config-24WILLCJ.js").then(({ loadPeerConfig }) => {
2496
2585
  const config = loadPeerConfig();
2497
2586
  for (const [name, entry] of Object.entries(config.peers)) {
2498
2587
  const result = verifyJwt(token, entry.token, config.self.name);
2499
- if (result.status === "valid") {
2588
+ if (result.ok) {
2500
2589
  this.peerWss.handleUpgrade(req, socket, head, (ws) => {
2501
2590
  this.peerWsConnections.set(name, ws);
2502
2591
  logInfo(TAG8, `Peer WS connected: ${name}`);
@@ -2525,9 +2614,9 @@ var AgentApiServer = class {
2525
2614
  socket.destroy();
2526
2615
  });
2527
2616
  });
2528
- return new Promise((resolve4, reject) => {
2617
+ return new Promise((resolve3, reject) => {
2529
2618
  this.server.on("error", (err) => reject(err));
2530
- this.server.listen(this.config.port, () => resolve4());
2619
+ this.server.listen(this.config.port, () => resolve3());
2531
2620
  });
2532
2621
  }
2533
2622
  async stop() {
@@ -2535,7 +2624,7 @@ var AgentApiServer = class {
2535
2624
  for (const ws of this.peerWsConnections.values()) ws.close();
2536
2625
  this.peerWsConnections.clear();
2537
2626
  this.server.closeAllConnections();
2538
- return new Promise((resolve4) => this.server.close(() => resolve4()));
2627
+ return new Promise((resolve3) => this.server.close(() => resolve3()));
2539
2628
  }
2540
2629
  /** Push a message to a connected peer via WS. Returns true if delivered. */
2541
2630
  pushToPeer(peerName, method, payload) {
@@ -2559,12 +2648,12 @@ var AgentApiServer = class {
2559
2648
  if (!ws || ws.readyState !== ws.OPEN) return;
2560
2649
  let result = { error: "unknown method" };
2561
2650
  if (msg.method === "delegate") {
2562
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
2651
+ const { spin: spin2 } = await import("./spin-76K4R6FK.js");
2563
2652
  const p = msg.payload;
2564
2653
  const { cardId } = spin2.dispatch({ type: "W", goal: p.goal, title: p.goal.slice(0, 60), source: "peer", priority: p.priority ?? "MEDIUM" });
2565
2654
  result = { ok: true, taskId: cardId };
2566
2655
  } else if (msg.method === "check") {
2567
- const { kanbanGetCard } = await import("./kanban-board-J6RO3ZU7.js");
2656
+ const { kanbanGetCard } = await import("./kanban-board-4AI5Z6B5.js");
2568
2657
  const card = kanbanGetCard(msg.payload.taskId);
2569
2658
  result = card ? { taskId: card.id, status: card.status, result: card.result_summary, error: card.error } : { error: "not found" };
2570
2659
  }
@@ -2593,11 +2682,11 @@ var AgentApiServer = class {
2593
2682
  logInfo(TAG8, "A2A idle timeout \u2014 saving transcript, closing log, killing session");
2594
2683
  try {
2595
2684
  const today = localDate();
2596
- const dir = join4(this.workingDir, "memory", "working", today);
2685
+ const dir = join6(this.workingDir, "memory", "working", today);
2597
2686
  mkdirSync(dir, { recursive: true });
2598
- const dest = join4(dir, "transcript_a2a.log");
2687
+ const dest = join6(dir, "transcript_a2a.log");
2599
2688
  const transcript = this.agentSession.getMessages?.()?.map((m) => `[${m.role}] ${m.content}`).join("\n") ?? "";
2600
- writeFileSync2(dest, transcript, "utf-8");
2689
+ writeFileSync3(dest, transcript, "utf-8");
2601
2690
  logInfo(TAG8, `A2A transcript saved to ${dest}`);
2602
2691
  } catch (e) {
2603
2692
  logWarn(TAG8, `A2A transcript save failed: ${e}`);
@@ -2619,7 +2708,7 @@ var AgentApiServer = class {
2619
2708
  newLogFile() {
2620
2709
  const ts = localIso().replace(/[:.]/g, "-");
2621
2710
  const name = this.config.agentCodename;
2622
- return join4(this.logDir, `${name}_${ts}.log`);
2711
+ return join6(this.logDir, `${name}_${ts}.log`);
2623
2712
  }
2624
2713
  log(role, content) {
2625
2714
  const ts = localIso();
@@ -2726,7 +2815,7 @@ var AgentApiServer = class {
2726
2815
  }
2727
2816
  async handleOrcRoute(url, method, req, res) {
2728
2817
  try {
2729
- const { getOrcTools } = await import("./orc-tools-CHRSXSAS.js");
2818
+ const { getOrcTools } = await import("./orc-tools-GME3DKIN.js");
2730
2819
  if (url === "/v1/orc/spawn" && method === "POST") {
2731
2820
  const body = JSON.parse(await readBody(req));
2732
2821
  const tool = getOrcTools().find((t) => t.name === "spawn_worker");
@@ -2754,7 +2843,7 @@ var AgentApiServer = class {
2754
2843
  res.writeHead(400, { "Content-Type": "application/json" }).end(JSON.stringify({ ok: false, error: "peer and goal required" }));
2755
2844
  return;
2756
2845
  }
2757
- const { getPeerTransport } = await import("./peer-transport-UBBXTDRP.js");
2846
+ const { getPeerTransport } = await import("./peer-transport-BK5VHI2M.js");
2758
2847
  const transport = getPeerTransport();
2759
2848
  const remoteId = await transport.delegateTask(peer, goal, { priority: "MEDIUM", context: title });
2760
2849
  res.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify({ ok: true, result: `Delegated to ${peer} \u2014 remote card #${remoteId}` }));
@@ -2815,7 +2904,7 @@ var AgentApiServer = class {
2815
2904
  res.writeHead(429, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Peer hop limit reached", "loop_detected", "hop_exceeded")));
2816
2905
  return;
2817
2906
  }
2818
- const { checkRateLimit } = await import("./agent-api-rate-limit-4GEZ4YN5.js");
2907
+ const { checkRateLimit } = await import("./agent-api-rate-limit-VENFGOAD.js");
2819
2908
  const limit = checkRateLimit(caller);
2820
2909
  if (!limit.allowed) {
2821
2910
  const retryAfter = Math.ceil((limit.retryAfterMs ?? 6e4) / 1e3);
@@ -2823,7 +2912,7 @@ var AgentApiServer = class {
2823
2912
  logWarn(TAG8, `Rate limited ${caller} \u2014 retry in ${retryAfter}s`);
2824
2913
  return;
2825
2914
  }
2826
- const { setCurrentPeerHops } = await import("./peer-client-VOF77T6C.js");
2915
+ const { setCurrentPeerHops } = await import("./peer-client-WLK5GZQS.js");
2827
2916
  setCurrentPeerHops(hopValue);
2828
2917
  let body;
2829
2918
  try {
@@ -2839,7 +2928,7 @@ var AgentApiServer = class {
2839
2928
  const lastMsg = reqMessages?.[reqMessages.length - 1];
2840
2929
  if (lastMsg?.content) {
2841
2930
  const { verifyMessage } = await import("./digital-signature-4JH7SRW2.js");
2842
- const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-FRWLEYQ5.js");
2931
+ const { loadPeerConfig: loadPeerConfig2 } = await import("./peer-config-24WILLCJ.js");
2843
2932
  const peerConfig2 = loadPeerConfig2();
2844
2933
  const peerEntry2 = peerConfig2.peers[caller];
2845
2934
  const hasSigTag = /\[sig:\d+:[A-Za-z0-9+/=]+\]$/.test(lastMsg.content);
@@ -2891,7 +2980,7 @@ var AgentApiServer = class {
2891
2980
  logInfo(TAG8, `Peer call: ${caller} \u2192 ${this.config.agentCodename} [${commsType}]`);
2892
2981
  const secLabel = `${this.tlsEnabled ? "tls" : "http"}+${commsType === "signed" ? "signed" : "jwt"}`;
2893
2982
  this.onPeerActivity?.(`\u{1F916} Agents: ${caller} \u2192 ${this.config.agentCodename} [${secLabel}]`);
2894
- const { loadPeerConfig } = await import("./peer-config-FRWLEYQ5.js");
2983
+ const { loadPeerConfig } = await import("./peer-config-24WILLCJ.js");
2895
2984
  const peerConfig = loadPeerConfig();
2896
2985
  const peerEntry = peerConfig.peers[caller];
2897
2986
  const trust = peerEntry?.trust ?? 0;
@@ -2989,7 +3078,7 @@ var AgentApiServer = class {
2989
3078
  res.writeHead(400, { "Content-Type": "application/json" }).end(JSON.stringify(openaiError("Missing 'goal' field", "invalid_request_error", "missing_field")));
2990
3079
  return;
2991
3080
  }
2992
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
3081
+ const { spin: spin2 } = await import("./spin-76K4R6FK.js");
2993
3082
  const { cardId, sessionId } = spin2.dispatch({
2994
3083
  type: "O",
2995
3084
  goal: body.context ? `${goal}
@@ -3003,11 +3092,11 @@ Context: ${body.context}` : goal,
3003
3092
  });
3004
3093
  if (body.artifacts?.length) {
3005
3094
  const { basename: bn } = await import("node:path");
3006
- const dir = join4(abtarsHome(), "workspace", "cards", String(cardId));
3095
+ const dir = join6(abtarsHome(), "workspace", "cards", String(cardId));
3007
3096
  mkdirSync(dir, { recursive: true });
3008
3097
  for (const art of body.artifacts) {
3009
3098
  const safeName = bn(art.name);
3010
- writeFileSync2(join4(dir, safeName), Buffer.from(art.content, "base64"));
3099
+ writeFileSync3(join6(dir, safeName), Buffer.from(art.content, "base64"));
3011
3100
  }
3012
3101
  logDebug(TAG8, `Wrote ${body.artifacts.length} artifact(s) to card#${cardId} workspace`);
3013
3102
  }
@@ -3072,7 +3161,8 @@ Context: ${body.context}` : goal,
3072
3161
  /** #949 — GET /v1/tasks/:cardId/messages?since=: pull messages for catch-up. */
3073
3162
  handleChannelPull(url, res, cardId) {
3074
3163
  const sinceMatch = url.match(/[?&]since=([^&]+)/);
3075
- const since = sinceMatch ? decodeURIComponent(sinceMatch[1]) : "1970-01-01";
3164
+ const sinceRaw = sinceMatch?.[1];
3165
+ const since = sinceRaw ? decodeURIComponent(sinceRaw) : "1970-01-01";
3076
3166
  const { channelGetSince } = (init_kanban_channel(), __toCommonJS(kanban_channel_exports));
3077
3167
  const messages = channelGetSince(cardId, since);
3078
3168
  res.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify({ messages }));
@@ -3112,11 +3202,11 @@ Context: ${body.context}` : goal,
3112
3202
  const card = remoteCards[0];
3113
3203
  if (body.artifacts?.length) {
3114
3204
  const { basename: bn } = await import("node:path");
3115
- const dir = join4(abtarsHome(), "workspace", "cards", String(card.id));
3205
+ const dir = join6(abtarsHome(), "workspace", "cards", String(card.id));
3116
3206
  mkdirSync(dir, { recursive: true });
3117
3207
  for (const art of body.artifacts) {
3118
3208
  const safeName = bn(art.name);
3119
- writeFileSync2(join4(dir, safeName), Buffer.from(art.content, "base64"));
3209
+ writeFileSync3(join6(dir, safeName), Buffer.from(art.content, "base64"));
3120
3210
  }
3121
3211
  logDebug(TAG8, `Wrote ${body.artifacts.length} result artifact(s) to local card#${card.id}`);
3122
3212
  }
@@ -3132,7 +3222,7 @@ Context: ${body.context}` : goal,
3132
3222
  kanbanAddTokens(card.id, body.tokens_used);
3133
3223
  }
3134
3224
  try {
3135
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
3225
+ const { spin: spin2 } = await import("./spin-76K4R6FK.js");
3136
3226
  const meta = JSON.parse(card.notes ?? "{}");
3137
3227
  if (meta.remote_session_id) {
3138
3228
  const hollow = spin2.listAllSessions().find((s) => s.peer === caller && s.remoteSessionId === meta.remote_session_id);
@@ -3167,7 +3257,7 @@ async function phaseAgentApi(ctx) {
3167
3257
  sendNotification(ctx, msg);
3168
3258
  };
3169
3259
  setPeerActivityCallback(notifyPeer);
3170
- const { AgentApiAdapter } = await import("./agent-api-adapter-PYMNQXHE.js");
3260
+ const { AgentApiAdapter } = await import("./agent-api-adapter-E4HWVJ32.js");
3171
3261
  const a2aAdapter = new AgentApiAdapter();
3172
3262
  registry.register("agent-api", {
3173
3263
  configured: Boolean(agentConfig.port),
@@ -3201,17 +3291,17 @@ async function phaseAgentApi(ctx) {
3201
3291
  } else {
3202
3292
  logError("main", `Agent API failed to start: ${result.error}`);
3203
3293
  }
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");
3294
+ const { loadPeerConfig } = await import("./peer-config-24WILLCJ.js");
3295
+ const { startDnsWakeup } = await import("./dns-wakeup-KIURCCFJ.js");
3296
+ const { startGossipListener } = await import("./gossip-VSEY2HSE.js");
3297
+ const { callPeer } = await import("./peer-client-WLK5GZQS.js");
3208
3298
  const peerConfig = loadPeerConfig();
3209
3299
  const udpPort = peerConfig.self.udpPort ?? 5353;
3210
3300
  if (Object.keys(peerConfig.peers).length > 0) {
3211
3301
  startGossipListener();
3212
3302
  }
3213
3303
  if (Object.keys(peerConfig.peers).length > 0) {
3214
- import("./peer-transport-UBBXTDRP.js").then(({ initPeerTransport }) => initPeerTransport()).catch(() => {
3304
+ import("./peer-transport-BK5VHI2M.js").then(({ initPeerTransport }) => initPeerTransport()).catch(() => {
3215
3305
  });
3216
3306
  }
3217
3307
  if (Object.keys(peerConfig.peers).length > 0) {
@@ -3221,17 +3311,17 @@ async function phaseAgentApi(ctx) {
3221
3311
  const prompt = await callPeer(peerName, "callback: you requested a call-back via wake-up signal", peerConfig.maxHops, { skipWakeup: true });
3222
3312
  if (!prompt || prompt.trim() === "") return;
3223
3313
  const http2 = await import("node:http");
3224
- const answer = await new Promise((resolve4, reject) => {
3314
+ const answer = await new Promise((resolve3, reject) => {
3225
3315
  const body = JSON.stringify({ model: "default", messages: [{ role: "user", content: prompt }] });
3226
3316
  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
3317
  let data = "";
3228
3318
  res.on("data", (c) => data += c);
3229
3319
  res.on("end", () => {
3230
3320
  try {
3231
- resolve4(JSON.parse(data)?.choices?.[0]?.message?.content ?? "");
3321
+ resolve3(JSON.parse(data)?.choices?.[0]?.message?.content ?? "");
3232
3322
  } catch (err) {
3233
3323
  logAndSwallow(TAG9, "JSON.parse agent-api response", err);
3234
- resolve4("");
3324
+ resolve3("");
3235
3325
  }
3236
3326
  });
3237
3327
  });
@@ -3268,7 +3358,7 @@ async function phaseShutdown(ctx, bridge) {
3268
3358
  logWarn("main", `${signal} received (pid=${process.pid} ppid=${process.ppid} parent="${parent}")`);
3269
3359
  }
3270
3360
  if (ctx.sandboxEnabled) {
3271
- import("./sandbox-runtime-WHACQLLN.js").then((m) => m.killAllSandboxes()).catch(() => {
3361
+ import("./sandbox-runtime-T7RF4WJD.js").then((m) => m.killAllSandboxes()).catch(() => {
3272
3362
  });
3273
3363
  }
3274
3364
  bridge.requestShutdown(code);
@@ -3286,14 +3376,14 @@ async function bootGraph(nodes, ctx) {
3286
3376
  const nodeMap = new Map(nodes.map((n) => [n.name, n]));
3287
3377
  const t0Global = Date.now();
3288
3378
  logTrace("boot", `bootGraph: starting ${nodes.length} nodes [${nodes.map((n) => n.name).join(", ")}]`);
3289
- function resolve4(node) {
3379
+ function resolve3(node) {
3290
3380
  if (resolved.has(node.name)) return resolved.get(node.name);
3291
3381
  const p = (async () => {
3292
3382
  logTrace("boot", `${node.name}: waiting for deps [${node.deps.join(", ") || "none"}]`);
3293
3383
  for (const dep of node.deps) {
3294
3384
  const depNode = nodeMap.get(dep);
3295
3385
  if (!depNode) throw new Error(`Boot node "${node.name}" depends on unknown node "${dep}"`);
3296
- await resolve4(depNode);
3386
+ await resolve3(depNode);
3297
3387
  const depStatus = report.get(dep);
3298
3388
  if (depStatus && depStatus.status !== "ok") {
3299
3389
  report.set(node.name, { status: "skipped", blockedBy: dep });
@@ -3307,7 +3397,7 @@ async function bootGraph(nodes, ctx) {
3307
3397
  }
3308
3398
  for (const dep of node.optionalDeps ?? []) {
3309
3399
  const depNode = nodeMap.get(dep);
3310
- if (depNode) await resolve4(depNode).catch(() => {
3400
+ if (depNode) await resolve3(depNode).catch(() => {
3311
3401
  });
3312
3402
  }
3313
3403
  const t0 = Date.now();
@@ -3328,7 +3418,7 @@ async function bootGraph(nodes, ctx) {
3328
3418
  resolved.set(node.name, p);
3329
3419
  return p;
3330
3420
  }
3331
- await Promise.allSettled(nodes.map((n) => resolve4(n)));
3421
+ await Promise.allSettled(nodes.map((n) => resolve3(n)));
3332
3422
  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
3423
  ctx.phaseHealth = new Map([...report].map(([k, v]) => [k, { status: v.status === "ok" ? "ok" : v.status, error: v.error ?? v.blockedBy }]));
3334
3424
  return report;
@@ -3391,15 +3481,15 @@ var Bridge = class {
3391
3481
  execFileSync("mcporter", ["daemon", "stop"], { stdio: "pipe" });
3392
3482
  });
3393
3483
  }
3394
- const { flushUsage } = await import("./usage-tracker-HRSGC7QC.js");
3484
+ const { flushUsage } = await import("./usage-tracker-TBDM4KE6.js");
3395
3485
  flushUsage();
3396
3486
  clearTimeout(forceTimer);
3397
3487
  this._resolve?.(this._exitCode);
3398
3488
  }
3399
3489
  /** Returns a promise that resolves with the exit code when shutdown completes. */
3400
3490
  waitForExit() {
3401
- return new Promise((resolve4) => {
3402
- this._resolve = resolve4;
3491
+ return new Promise((resolve3) => {
3492
+ this._resolve = resolve3;
3403
3493
  });
3404
3494
  }
3405
3495
  };
@@ -3417,11 +3507,11 @@ async function startBridge() {
3417
3507
  }
3418
3508
  }
3419
3509
  try {
3420
- const { runFixes } = await import("./doctor-probes-3SLIUGKS.js");
3510
+ const { runFixes } = await import("./doctor-probes-46UKIROK.js");
3421
3511
  await runFixes();
3422
3512
  } catch {
3423
3513
  }
3424
- const deployed = (await import("./paths-RZF6WDMG.js")).getDeployedVersion();
3514
+ const deployed = (await import("./paths-MZC2KU2C.js")).getDeployedVersion();
3425
3515
  ctx.version = deployed.version;
3426
3516
  ctx.commit = deployed.commit;
3427
3517
  const startReason = process.env["ABTARS_START_REASON"] ?? "unknown";
@@ -3441,19 +3531,19 @@ async function startBridge() {
3441
3531
  logError("boot", `\u2717 ${phaseShutdown.name} failed`, err);
3442
3532
  }
3443
3533
  }
3444
- const { hasHooks, fire } = await import("./hook-system-X6INNJGV.js");
3534
+ const { hasHooks, fire } = await import("./hook-system-Z4XD6IM5.js");
3445
3535
  if (hasHooks("BridgeStart")) {
3446
3536
  await fire("BridgeStart", { event: "BridgeStart", timestamp: (/* @__PURE__ */ new Date()).toISOString(), sessionKey: "", platform: "", userId: "" });
3447
3537
  }
3448
3538
  if (ctx.telegramAdapter || ctx.discordAdapter) {
3449
3539
  try {
3450
- const { sendToMainChat } = await import("./main-chat-YLZDNQPO.js");
3540
+ const { sendToMainChat } = await import("./main-chat-EID5Y6H2.js");
3451
3541
  const version = ctx.commit && ctx.commit !== "?" && !ctx.version.includes(ctx.commit) ? `v${ctx.version}-${ctx.commit}` : `v${ctx.version}`;
3452
3542
  let deployNote = "";
3453
3543
  try {
3454
3544
  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"));
3545
+ const { join: join9 } = await import("node:path");
3546
+ const state = JSON.parse(readFileSync7(join9(process.env["HOME"] ?? "", ".abtars", "deploy.state"), "utf-8"));
3457
3547
  if (state.completedAt && Date.now() - new Date(state.completedAt).getTime() < 5 * 6e4) {
3458
3548
  deployNote = state.status === "success" ? " (updated)" : ` (update ${state.status})`;
3459
3549
  }
@@ -3472,7 +3562,7 @@ ${lines.join("\n")}`);
3472
3562
  }
3473
3563
  }
3474
3564
  if (ctx.telegramAdapter) {
3475
- const { spin: spin2 } = await import("./spin-4DBYHS3E.js");
3565
+ const { spin: spin2 } = await import("./spin-76K4R6FK.js");
3476
3566
  spin2.setGreetingAdapter(ctx.telegramAdapter);
3477
3567
  }
3478
3568
  return bridge.waitForExit();
@@ -3482,22 +3572,22 @@ ${lines.join("\n")}`);
3482
3572
  init_logger();
3483
3573
 
3484
3574
  // 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";
3575
+ init_paths();
3576
+ import { readFileSync as readFileSync5, existsSync as existsSync7, writeFileSync as writeFileSync4, unlinkSync, symlinkSync } from "node:fs";
3577
+ import { join as join7 } from "node:path";
3488
3578
  var MAX_DEATHS = 4;
3489
3579
  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");
3580
+ const home2 = resolveAbtarsHome();
3581
+ const releasesDir = resolveReleasesDir();
3582
+ const stateFile = join7(home2, "deploy.state");
3583
+ const historyFile = join7(releasesDir, "history.json");
3584
+ const currentLink = join7(releasesDir, "current");
3495
3585
  const reason = process.env["ABTARS_START_REASON"] ?? "watchdog-respawn";
3496
3586
  if (reason.startsWith("update:") || reason === "user-restart" || reason.startsWith("rollback:") || reason.startsWith("auto-rollback:")) {
3497
3587
  try {
3498
3588
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3499
3589
  state.restartCount = 0;
3500
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3590
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3501
3591
  } catch {
3502
3592
  }
3503
3593
  return;
@@ -3518,19 +3608,19 @@ function checkCircuitBreaker() {
3518
3608
  try {
3519
3609
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3520
3610
  state.restartCount = 0;
3521
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3611
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3522
3612
  } catch {
3523
3613
  }
3524
3614
  return;
3525
3615
  }
3526
3616
  const target = history[1];
3527
- const targetDir = join5(releasesDir, target);
3528
- if (!existsSync6(targetDir)) {
3617
+ const targetDir = join7(releasesDir, target);
3618
+ if (!existsSync7(targetDir)) {
3529
3619
  console.error(`[circuit-breaker] history[1] dir ${target} not found \u2014 continuing anyway`);
3530
3620
  try {
3531
3621
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3532
3622
  state.restartCount = 0;
3533
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3623
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3534
3624
  } catch {
3535
3625
  }
3536
3626
  return;
@@ -3540,7 +3630,7 @@ function checkCircuitBreaker() {
3540
3630
  } catch {
3541
3631
  }
3542
3632
  symlinkSync(targetDir, currentLink);
3543
- const appLink = join5(home2, "app");
3633
+ const appLink = join7(home2, "app");
3544
3634
  try {
3545
3635
  unlinkSync(appLink);
3546
3636
  } catch {
@@ -3552,7 +3642,7 @@ function checkCircuitBreaker() {
3552
3642
  try {
3553
3643
  const state = JSON.parse(readFileSync5(stateFile, "utf-8"));
3554
3644
  state.restartCount = 0;
3555
- writeFileSync3(stateFile, JSON.stringify(state) + "\n");
3645
+ writeFileSync4(stateFile, JSON.stringify(state) + "\n");
3556
3646
  } catch {
3557
3647
  }
3558
3648
  console.error(`[circuit-breaker] ${restartCount} unplanned deaths \u2014 rolled back to ${target}`);
@@ -3561,13 +3651,13 @@ function checkCircuitBreaker() {
3561
3651
 
3562
3652
  // src/main.ts
3563
3653
  import { readFileSync as readFileSync6 } from "node:fs";
3564
- import { join as join6 } from "node:path";
3654
+ import { join as join8 } from "node:path";
3565
3655
  process.umask(63);
3566
3656
  initEnv();
3567
3657
  checkCircuitBreaker();
3568
3658
  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"));
3659
+ const home2 = process.env["ABTARS_HOME"] ?? join8(process.env["HOME"] ?? "/tmp", ".abtars");
3660
+ const lock = JSON.parse(readFileSync6(join8(home2, "bridge.lock"), "utf-8"));
3571
3661
  if (lock.pid && lock.pid !== process.pid) {
3572
3662
  process.kill(lock.pid, 0);
3573
3663
  console.error(`[FATAL] Another bridge running (PID ${lock.pid}) \u2014 exiting`);