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
@@ -0,0 +1,384 @@
1
+ /* Memory Universe — 3D visualization of extracted memories */
2
+ /* Standalone module, loaded on demand by dashboard */
3
+
4
+ (function() {
5
+ 'use strict';
6
+
7
+ var V = '0.183.2';
8
+ var CDN = 'https://cdn.jsdelivr.net/npm/three@' + V;
9
+
10
+ var TYPE_COLORS = {
11
+ fact: [0.0, 0.9, 0.9], // cyan
12
+ decision: [0.7, 0.3, 1.0], // purple
13
+ preference: [1.0, 0.6, 0.1], // amber
14
+ event: [0.2, 1.0, 0.4], // green
15
+ lesson: [1.0, 0.15, 0.15], // red
16
+ feedback: [1.0, 0.85, 0.2], // gold
17
+ story: [0.3, 0.5, 1.0], // blue
18
+ };
19
+
20
+ window.initMemoryUniverse = function(token) {
21
+ // Create overlay
22
+ var overlay = document.createElement('div');
23
+ overlay.id = 'memory-universe-overlay';
24
+ overlay.style.cssText = 'position:fixed;top:0;left:0;width:100%;height:100%;z-index:10000;background:#000;';
25
+ overlay.innerHTML = '<div id="mu-loading" style="position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);color:#0ff;font-family:monospace;font-size:18px;">Loading Memory Universe...</div>' +
26
+ '<div id="mu-info" style="display:none;position:absolute;right:0;top:0;width:340px;height:100%;background:rgba(0,0,0,0.85);border-left:1px solid #0ff3;padding:20px;overflow-y:auto;font-family:monospace;color:#e0e0e0;font-size:15px;"></div>' +
27
+ '<div id="mu-tooltip" style="display:none;position:absolute;pointer-events:none;background:rgba(0,10,20,0.9);border:1px solid #0ff5;padding:8px 12px;border-radius:4px;color:#e0e0e0;font-family:monospace;font-size:12px;max-width:300px;"></div>' +
28
+ '<button id="mu-close" style="position:absolute;top:16px;left:16px;z-index:10001;background:none;border:none;color:#0ff6;font-size:16px;cursor:pointer;padding:6px 10px;font-family:monospace;">← back</button>' +
29
+ '<div id="mu-stats" style="position:absolute;bottom:16px;left:16px;color:#0ff8;font-family:monospace;font-size:12px;"></div>';
30
+ document.body.appendChild(overlay);
31
+
32
+ var closeBtn = document.getElementById('mu-close');
33
+ closeBtn.onclick = destroy;
34
+ document.addEventListener('keydown', onEsc);
35
+
36
+ function onEsc(e) { if (e.key === 'Escape') destroy(); }
37
+ function destroy() {
38
+ document.removeEventListener('keydown', onEsc);
39
+ if (animId) cancelAnimationFrame(animId);
40
+ overlay.remove();
41
+ }
42
+
43
+ var animId = null;
44
+ var memories = [], entities = [], links = [];
45
+ var particleData = [];
46
+
47
+ // Fetch data then load Three.js
48
+ fetch('/api/memory/all', { headers: { 'Authorization': 'Bearer ' + token } })
49
+ .then(function(r) { return r.json(); })
50
+ .then(function(data) {
51
+ memories = data.memories || [];
52
+ // #225: entities + memory_entities dropped. Viz renders memories only;
53
+ // entity-cluster and link code below is now dead-but-harmless (no-ops
54
+ // on empty arrays). Future: simplify or repurpose viz — separate ticket.
55
+ entities = data.entities || [];
56
+ links = data.links || [];
57
+ document.getElementById('mu-stats').textContent = memories.length + ' memories';
58
+ // Inject import map for Three.js ES modules
59
+ var im = document.createElement('script');
60
+ im.type = 'importmap';
61
+ im.textContent = JSON.stringify({ imports: {
62
+ "three": CDN + "/build/three.module.min.js",
63
+ "three/addons/": CDN + "/examples/jsm/"
64
+ }});
65
+ document.head.appendChild(im);
66
+ return import(CDN + "/build/three.module.min.js");
67
+ })
68
+ .then(function(THREE) {
69
+ return Promise.all([
70
+ import(CDN + "/examples/jsm/controls/OrbitControls.js"),
71
+ import(CDN + "/examples/jsm/postprocessing/EffectComposer.js"),
72
+ import(CDN + "/examples/jsm/postprocessing/RenderPass.js"),
73
+ import(CDN + "/examples/jsm/postprocessing/UnrealBloomPass.js"),
74
+ ]).then(function(mods) {
75
+ return { THREE: THREE, OrbitControls: mods[0].OrbitControls, EffectComposer: mods[1].EffectComposer, RenderPass: mods[2].RenderPass, UnrealBloomPass: mods[3].UnrealBloomPass };
76
+ });
77
+ })
78
+ .then(function(m) { buildScene(m); })
79
+ .catch(function(err) {
80
+ document.getElementById('mu-loading').textContent = 'Error: ' + err.message;
81
+ });
82
+
83
+ function buildScene(m) {
84
+ var THREE = m.THREE;
85
+ document.getElementById('mu-loading').style.display = 'none';
86
+
87
+ var w = window.innerWidth, h = window.innerHeight;
88
+ var scene = new THREE.Scene();
89
+ scene.background = new THREE.Color(0x000008);
90
+
91
+ var camera = new THREE.PerspectiveCamera(60, w / h, 0.1, 1000);
92
+ camera.position.set(0, 5, 25);
93
+
94
+ var renderer = new THREE.WebGLRenderer({ antialias: true });
95
+ renderer.setSize(w, h);
96
+ renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
97
+ renderer.toneMapping = THREE.ACESFilmicToneMapping;
98
+ renderer.toneMappingExposure = 1.2;
99
+ overlay.insertBefore(renderer.domElement, overlay.firstChild);
100
+
101
+ // Post-processing: bloom
102
+ var composer = new m.EffectComposer(renderer);
103
+ composer.addPass(new m.RenderPass(scene, camera));
104
+ var bloom = new m.UnrealBloomPass(new THREE.Vector2(w, h), 0.8, 0.3, 0.6);
105
+ composer.addPass(bloom);
106
+
107
+ // Controls
108
+ var controls = new m.OrbitControls(camera, renderer.domElement);
109
+ controls.enableDamping = true;
110
+ controls.dampingFactor = 0.05;
111
+ controls.autoRotate = true;
112
+ controls.autoRotateSpeed = 0.3;
113
+
114
+ // Starfield background
115
+ var starGeo = new THREE.BufferGeometry();
116
+ var starPos = new Float32Array(3000 * 3);
117
+ for (var i = 0; i < 3000; i++) {
118
+ starPos[i * 3] = (Math.random() - 0.5) * 200;
119
+ starPos[i * 3 + 1] = (Math.random() - 0.5) * 200;
120
+ starPos[i * 3 + 2] = (Math.random() - 0.5) * 200;
121
+ }
122
+ starGeo.setAttribute('position', new THREE.BufferAttribute(starPos, 3));
123
+ var starMat = new THREE.ShaderMaterial({
124
+ vertexShader: 'void main() { vec4 mv = modelViewMatrix * vec4(position,1.0); gl_PointSize = 1.5; gl_Position = projectionMatrix * mv; }',
125
+ fragmentShader: 'void main() { float d = length(gl_PointCoord-vec2(0.5)); if(d>0.5) discard; gl_FragColor = vec4(0.2,0.27,0.4, 1.0-d*2.0); }',
126
+ transparent: true, depthWrite: false,
127
+ });
128
+ scene.add(new THREE.Points(starGeo, starMat));
129
+
130
+ // Build entity clusters — assign positions
131
+ var entityPositions = {};
132
+ entities.forEach(function(e, i) {
133
+ var angle = (i / Math.max(entities.length, 1)) * Math.PI * 2;
134
+ var r = 6 + Math.random() * 4;
135
+ entityPositions[e.id] = { x: Math.cos(angle) * r, y: (Math.random() - 0.5) * 4, z: Math.sin(angle) * r };
136
+ });
137
+
138
+ // Map memory→entities
139
+ var memEntityMap = {};
140
+ links.forEach(function(l) {
141
+ if (!memEntityMap[l.memory_id]) memEntityMap[l.memory_id] = [];
142
+ memEntityMap[l.memory_id].push(l.entity_id);
143
+ });
144
+
145
+ // Memory particles
146
+ var count = memories.length;
147
+ var positions = new Float32Array(count * 3);
148
+ var colors = new Float32Array(count * 3);
149
+ var sizes = new Float32Array(count);
150
+ var opacities = new Float32Array(count);
151
+ var pulseRates = new Float32Array(count);
152
+ var brightnesses = new Float32Array(count);
153
+ var hasEmbeddings = new Float32Array(count);
154
+
155
+ var now = Date.now();
156
+ var oldest = memories.reduce(function(a, m) { return Math.min(a, m.created_at || now); }, now);
157
+ var timeSpan = Math.max(now - oldest, 1);
158
+
159
+ memories.forEach(function(mem, i) {
160
+ var c = TYPE_COLORS[mem.memory_type] || TYPE_COLORS.fact;
161
+
162
+ // Position: entity cluster or random sphere
163
+ var px, py, pz;
164
+ var memEntities = memEntityMap[mem.id];
165
+ if (memEntities && memEntities.length > 0) {
166
+ var ep = entityPositions[memEntities[0]];
167
+ if (ep) {
168
+ px = ep.x + (Math.random() - 0.5) * 3;
169
+ py = ep.y + (Math.random() - 0.5) * 2;
170
+ pz = ep.z + (Math.random() - 0.5) * 3;
171
+ }
172
+ }
173
+ if (px === undefined) {
174
+ var theta = Math.random() * Math.PI * 2;
175
+ var phi = Math.acos(2 * Math.random() - 1);
176
+ var rad = 4 + Math.random() * 10;
177
+ px = rad * Math.sin(phi) * Math.cos(theta);
178
+ py = ((mem.created_at - oldest) / timeSpan) * 12 - 6 + (Math.random() - 0.5) * 2;
179
+ pz = rad * Math.sin(phi) * Math.sin(theta);
180
+ }
181
+
182
+ positions[i * 3] = px;
183
+ positions[i * 3 + 1] = py;
184
+ positions[i * 3 + 2] = pz;
185
+
186
+ colors[i * 3] = c[0];
187
+ colors[i * 3 + 1] = c[1];
188
+ colors[i * 3 + 2] = c[2];
189
+
190
+ sizes[i] = Math.max(0.8, Math.min(4.0, 0.8 + (mem.recall_count || 0) * 0.3));
191
+
192
+ // Credibility → opacity: 1=confirmed(1.0), 6=unknown(0.3)
193
+ opacities[i] = Math.max(0.3, 1.0 - ((mem.credibility || 6) - 1) * 0.14);
194
+
195
+ // Pulse: emotion intensity (further from 0 = faster)
196
+ pulseRates[i] = Math.abs(mem.emotion_score || 0) * 0.6;
197
+
198
+ // Brightness: classification (S=1.5, C=1.1, R=0.8, U=0.5)
199
+ brightnesses[i] = 0.5 + (mem.classification || 0) * 0.33;
200
+
201
+ // Trust → core dot: 3=bright, 0=none
202
+ hasEmbeddings[i] = (mem.trust || 0) / 3.0;
203
+
204
+ particleData.push({
205
+ index: i,
206
+ memory: mem,
207
+ basePos: { x: px, y: py, z: pz },
208
+ entities: memEntities || [],
209
+ });
210
+ });
211
+
212
+ var geo = new THREE.BufferGeometry();
213
+ geo.setAttribute('position', new THREE.BufferAttribute(positions, 3));
214
+ geo.setAttribute('color', new THREE.BufferAttribute(colors, 3));
215
+ geo.setAttribute('size', new THREE.BufferAttribute(sizes, 1));
216
+ geo.setAttribute('opacity', new THREE.BufferAttribute(opacities, 1));
217
+ geo.setAttribute('pulseRate', new THREE.BufferAttribute(pulseRates, 1));
218
+ geo.setAttribute('brightness', new THREE.BufferAttribute(brightnesses, 1));
219
+ geo.setAttribute('hasEmbed', new THREE.BufferAttribute(hasEmbeddings, 1));
220
+
221
+ var vertexShader = [
222
+ 'attribute float size;',
223
+ 'attribute float opacity;',
224
+ 'attribute float pulseRate;',
225
+ 'attribute float brightness;',
226
+ 'attribute float hasEmbed;',
227
+ 'uniform float uTime;',
228
+ 'varying vec3 vColor;',
229
+ 'varying float vOpacity;',
230
+ 'varying float vHasEmbed;',
231
+ 'void main() {',
232
+ ' float pulse = pulseRate > 0.0 ? 0.85 + 0.15 * sin(uTime * pulseRate + float(gl_VertexID) * 1.7) : 1.0;',
233
+ ' vColor = color * brightness * pulse;',
234
+ ' vOpacity = opacity;',
235
+ ' vHasEmbed = hasEmbed;',
236
+ ' vec4 mvPosition = modelViewMatrix * vec4(position, 1.0);',
237
+ ' gl_PointSize = size * pulse * (400.0 / -mvPosition.z);',
238
+ ' gl_Position = projectionMatrix * mvPosition;',
239
+ '}',
240
+ ].join('\n');
241
+
242
+ var fragmentShader = [
243
+ 'varying vec3 vColor;',
244
+ 'varying float vOpacity;',
245
+ 'varying float vHasEmbed;',
246
+ 'void main() {',
247
+ ' float d = length(gl_PointCoord - vec2(0.5));',
248
+ ' if (d > 0.5) discard;',
249
+ ' float glow = exp(-d * 12.0);',
250
+ // Core dot for trust
251
+ ' float core = vHasEmbed * smoothstep(0.08, 0.0, d) * 0.8;',
252
+ ' vec3 col = vColor * glow + vec3(core);',
253
+ ' gl_FragColor = vec4(col, glow * vOpacity + core);',
254
+ '}',
255
+ ].join('\n');
256
+
257
+ var mat = new THREE.ShaderMaterial({
258
+ vertexShader: vertexShader,
259
+ fragmentShader: fragmentShader,
260
+ uniforms: { uTime: { value: 0.0 } },
261
+ vertexColors: true,
262
+ transparent: true,
263
+ blending: THREE.AdditiveBlending,
264
+ depthWrite: false,
265
+ });
266
+
267
+ var points = new THREE.Points(geo, mat);
268
+ scene.add(points);
269
+
270
+ // Entity connection lines
271
+ var lineMat = new THREE.LineBasicMaterial({ color: 0x0066aa, transparent: true, opacity: 0.08 });
272
+ links.forEach(function(l) {
273
+ var mems = particleData.filter(function(p) { return p.entities.indexOf(l.entity_id) >= 0; });
274
+ for (var a = 0; a < mems.length; a++) {
275
+ for (var b = a + 1; b < mems.length && b < a + 3; b++) {
276
+ var lineGeo = new THREE.BufferGeometry().setFromPoints([
277
+ new THREE.Vector3(mems[a].basePos.x, mems[a].basePos.y, mems[a].basePos.z),
278
+ new THREE.Vector3(mems[b].basePos.x, mems[b].basePos.y, mems[b].basePos.z),
279
+ ]);
280
+ scene.add(new THREE.Line(lineGeo, lineMat));
281
+ }
282
+ }
283
+ });
284
+
285
+ // Raycaster for interaction
286
+ var raycaster = new THREE.Raycaster();
287
+ raycaster.params.Points.threshold = 0.5;
288
+ var mouse = new THREE.Vector2();
289
+ var tooltip = document.getElementById('mu-tooltip');
290
+ var infoPanel = document.getElementById('mu-info');
291
+ var hoveredIdx = -1;
292
+
293
+ renderer.domElement.addEventListener('mousemove', function(e) {
294
+ mouse.x = (e.clientX / w) * 2 - 1;
295
+ mouse.y = -(e.clientY / h) * 2 + 1;
296
+ raycaster.setFromCamera(mouse, camera);
297
+ var intersects = raycaster.intersectObject(points);
298
+ if (intersects.length > 0) {
299
+ var idx = intersects[0].index;
300
+ if (idx !== hoveredIdx && idx < particleData.length) {
301
+ hoveredIdx = idx;
302
+ var mem = particleData[idx].memory;
303
+ tooltip.style.display = 'block';
304
+ tooltip.style.left = (e.clientX + 16) + 'px';
305
+ tooltip.style.top = (e.clientY - 10) + 'px';
306
+ tooltip.textContent = mem.content_en ? mem.content_en.substring(0, 120) + (mem.content_en.length > 120 ? '...' : '') : '(empty)';
307
+ }
308
+ } else {
309
+ hoveredIdx = -1;
310
+ tooltip.style.display = 'none';
311
+ }
312
+ });
313
+
314
+ renderer.domElement.addEventListener('click', function(e) {
315
+ raycaster.setFromCamera(mouse, camera);
316
+ var intersects = raycaster.intersectObject(points);
317
+ if (intersects.length > 0 && intersects[0].index < particleData.length) {
318
+ var mem = particleData[intersects[0].index].memory;
319
+ var entNames = particleData[intersects[0].index].entities.map(function(eid) {
320
+ var ent = entities.find(function(e) { return e.id === eid; });
321
+ return ent ? ent.name : '?';
322
+ });
323
+ var typeColorMap = { fact: '#0ee', decision: '#b44ff', preference: '#fa0', event: '#3f4', lesson: '#f22', feedback: '#fd3' };
324
+ var typeColor = typeColorMap[mem.memory_type] || '#fff';
325
+ infoPanel.style.display = 'block';
326
+ infoPanel.innerHTML =
327
+ '<div style="margin-bottom:16px;"><button onclick="document.getElementById(\'mu-info\').style.display=\'none\'" style="background:none;border:1px solid #0ff5;color:#0ff;cursor:pointer;padding:4px 10px;border-radius:3px;">✕</button></div>' +
328
+ '<div style="color:#0ff;font-size:11px;margin-bottom:8px;">MEMORY #' + mem.id + '</div>' +
329
+ '<div style="margin-bottom:12px;line-height:1.5;">' + escHtml(mem.content_en || '') + '</div>' +
330
+ (mem.content_original && mem.content_original !== mem.content_en ? '<div style="color:#888;font-size:11px;margin-bottom:12px;">' + escHtml(mem.content_original) + '</div>' : '') +
331
+ '<div style="display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:12px;">' +
332
+ '<div>Type: <span style="color:' + typeColor + ';">' + (mem.memory_type || '?') + '</span></div>' +
333
+ '<div>Class: <span style="color:' + (['#0ff','#66f','#fa0','#f22'][mem.classification || 0] || '#fff') + ';">' + (['U','R','C','S'][mem.classification || 0] || '?') + '</span></div>' +
334
+ '<div>Emotion: <span style="color:' + (mem.emotion_score > 0 ? '#4f4' : mem.emotion_score < 0 ? '#f44' : '#888') + ';">' + (mem.emotion_score || 0) + '</span></div>' +
335
+ '<div>Recall: <span style="color:#0ff;">' + (mem.recall_count || 0) + '</span></div>' +
336
+ '<div>Trust: ' + (mem.trust ?? '?') + '</div>' +
337
+ '<div>Integrity: ' + (mem.integrity ?? '?') + '</div>' +
338
+ '<div>Credibility: ' + (mem.credibility ?? '?') + '</div>' +
339
+ '<div>Relevance: ' + (mem.relevance_score || 0) + '</div>' +
340
+ '</div>' +
341
+ (entNames.length > 0 ? '<div style="margin-top:12px;color:#0ff8;font-size:11px;">Entities: ' + entNames.join(', ') + '</div>' : '') +
342
+ '<div style="margin-top:12px;color:#666;font-size:10px;">Created: ' + new Date(mem.created_at).toLocaleString() + '</div>';
343
+ }
344
+ });
345
+
346
+ // Animation
347
+ var clock = new THREE.Clock();
348
+ function animate() {
349
+ animId = requestAnimationFrame(animate);
350
+ var t = clock.getElapsedTime();
351
+ var posAttr = geo.attributes.position;
352
+
353
+ for (var i = 0; i < particleData.length; i++) {
354
+ var p = particleData[i];
355
+ var drift = 0.15;
356
+ posAttr.array[i * 3] = p.basePos.x + Math.sin(t * 0.3 + i * 0.7) * drift;
357
+ posAttr.array[i * 3 + 1] = p.basePos.y + Math.cos(t * 0.2 + i * 1.1) * drift;
358
+ posAttr.array[i * 3 + 2] = p.basePos.z + Math.sin(t * 0.25 + i * 0.5) * drift;
359
+ }
360
+ posAttr.needsUpdate = true;
361
+
362
+ mat.uniforms.uTime.value = t;
363
+ controls.update();
364
+ composer.render();
365
+ }
366
+ animate();
367
+
368
+ // Resize
369
+ window.addEventListener('resize', function() {
370
+ w = window.innerWidth; h = window.innerHeight;
371
+ camera.aspect = w / h;
372
+ camera.updateProjectionMatrix();
373
+ renderer.setSize(w, h);
374
+ composer.setSize(w, h);
375
+ });
376
+ }
377
+
378
+ function escHtml(s) {
379
+ var d = document.createElement('div');
380
+ d.textContent = s;
381
+ return d.innerHTML;
382
+ }
383
+ };
384
+ })();
@@ -3,12 +3,13 @@
3
3
  import {
4
4
  migrate,
5
5
  reconcile
6
- } from "./chunk-P5O6QZDC.js";
7
- import "./chunk-OOKNHOCB.js";
8
- import "./chunk-H2K23MOF.js";
6
+ } from "./chunk-QROWBWLL.js";
7
+ import "./chunk-GWILHZPT.js";
8
+ import "./chunk-GALQBVKO.js";
9
+ import "./chunk-O7KQG6ME.js";
9
10
  import "./chunk-7K2YZTLD.js";
10
11
  export {
11
12
  migrate,
12
13
  reconcile
13
14
  };
14
- //# sourceMappingURL=reconcile-2EUXJ6W5.js.map
15
+ //# sourceMappingURL=reconcile-CTFCLQRN.js.map
@@ -3,12 +3,14 @@
3
3
  import {
4
4
  init_spin,
5
5
  spin
6
- } from "./chunk-GCFIK6OB.js";
6
+ } from "./chunk-AO32N2VB.js";
7
7
  import {
8
8
  init_kanban_channel,
9
9
  kanban_channel_exports
10
- } from "./chunk-SESM4GBM.js";
11
- import "./chunk-T7TAWGBX.js";
10
+ } from "./chunk-KTYGKPYM.js";
11
+ import "./chunk-AFREM7FX.js";
12
+ import "./chunk-ZV4IWKDJ.js";
13
+ import "./chunk-Y76VUJSF.js";
12
14
  import {
13
15
  cascadeFail,
14
16
  init_kanban_board,
@@ -19,20 +21,21 @@ import {
19
21
  kanbanGetChildren,
20
22
  kanbanList,
21
23
  kanbanUpdate
22
- } from "./chunk-S6HEHCCG.js";
24
+ } from "./chunk-EQSG2CRM.js";
25
+ import "./chunk-GVM5YU5I.js";
23
26
  import {
24
27
  init_nerve,
25
28
  nerve
26
- } from "./chunk-YME7NRGP.js";
27
- import "./chunk-TY26WMQY.js";
28
- import "./chunk-43DKPXTP.js";
29
- import "./chunk-SSCGWDIC.js";
29
+ } from "./chunk-OXTSWQCX.js";
30
+ import "./chunk-65VCEC32.js";
31
+ import "./chunk-YSKCQH6E.js";
30
32
  import {
31
33
  init_logger,
32
34
  logInfo,
33
35
  logWarn
34
- } from "./chunk-OOKNHOCB.js";
35
- import "./chunk-H2K23MOF.js";
36
+ } from "./chunk-GWILHZPT.js";
37
+ import "./chunk-GALQBVKO.js";
38
+ import "./chunk-O7KQG6ME.js";
36
39
  import {
37
40
  __toCommonJS
38
41
  } from "./chunk-7K2YZTLD.js";
@@ -137,4 +140,4 @@ function isStale(card) {
137
140
  export {
138
141
  startReconciler
139
142
  };
140
- //# sourceMappingURL=reconciler-FFQGV4DO.js.map
143
+ //# sourceMappingURL=reconciler-FHESO6OC.js.map
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/components/reconciler.ts"],
4
4
  "sourcesContent": ["/**\n * reconciler.ts \u2014 K8s-inspired reconciliation loop for the Orc.\n *\n * Subscribes to Nerve events. On every state change, checks active projects\n * and fixes drift: dispatch queued, retry failed, kill stale, abort on limits.\n */\n\nimport { nerve } from \"./nerve.js\";\nimport { spin } from \"./spin.js\";\nimport {\n kanbanList, kanbanFail, kanbanComplete, kanbanUpdate,\n kanbanGetCard, kanbanGetChildren, isUnblocked, cascadeFail, type KanbanCard,\n} from \"./tasks/kanban-board.js\";\nimport { logInfo, logWarn } from \"./logger.js\";\n\nconst TAG = \"reconciler\";\nconst MAX_RETRIES = 3;\nconst MAX_WORKERS = 10;\nconst MAX_WALL_CLOCK_MS = 30 * 60 * 1000;\nconst STALE_MS = 5 * 60 * 1000;\nconst REMOTE_STALE_MS = 10 * 60 * 1000;\nconst REMOTE_WARN_MS = 7 * 60 * 1000;\n\nexport function startReconciler(): void {\n nerve.on(\"card:done\", reconcile);\n nerve.on(\"card:failed\", reconcile);\n nerve.on(\"card:queued\", reconcile);\n logInfo(TAG, \"Reconciler started\");\n}\n\nfunction reconcile(): void {\n const projects = kanbanList(\"running\", \"status\")\n .filter(c => c.type === \"O\");\n\n for (const project of projects) {\n reconcileProject(project.id);\n }\n}\n\nfunction reconcileProject(projectId: number): void {\n const children = kanbanGetChildren(projectId);\n if (children.length === 0) return;\n\n const project = kanbanGetCard(projectId);\n if (!project) return;\n\n const now = Date.now();\n const projectStart = new Date(project.created_at + \"Z\").getTime();\n\n // Circuit breaker: wall-clock\n if (now - projectStart > MAX_WALL_CLOCK_MS) {\n abortProject(projectId, children, \"wall-clock exceeded (30min)\");\n return;\n }\n\n // Circuit breaker: token budget\n if (project.max_tokens && (project.tokens_used ?? 0) >= project.max_tokens) {\n abortProject(projectId, children, `budget exceeded (${project.tokens_used}/${project.max_tokens} tokens)`);\n return;\n }\n\n // Circuit breaker: too many workers\n if (children.length > MAX_WORKERS) {\n abortProject(projectId, children, `too many workers (${children.length})`);\n return;\n }\n\n let totalRetries = 0;\n\n for (const card of children) {\n const retries = card.delivery_attempts ?? 0; // reuse delivery_attempts as retry_count\n totalRetries += retries;\n\n if (card.status === \"queued\") {\n if (!isUnblocked(card)) continue;\n spin.dispatch({ type: \"W\", goal: card.notes || card.title, source: \"agent\", cardId: card.id, parentCardId: projectId });\n }\n\n if (card.status === \"failed\" && retries < MAX_RETRIES) {\n logInfo(TAG, `Retrying card ${card.id} (attempt ${retries + 1}/${MAX_RETRIES})`);\n kanbanUpdate(card.id, { status: \"queued\" });\n spin.dispatch({ type: \"W\", goal: card.notes || card.title, source: \"agent\", cardId: card.id, parentCardId: projectId });\n } else if (card.status === \"failed\" && retries >= MAX_RETRIES) {\n // Permanent failure \u2014 cascade to downstream cards\n cascadeFail(card.id, children);\n }\n\n if (card.status === \"running\" && card.type !== \"remote\" && isStale(card)) {\n logWarn(TAG, `Card ${card.id} stale (${STALE_MS / 1000}s no activity) \u2014 marking failed`);\n kanbanFail(card.id, \"stale \u2014 no activity\");\n }\n\n // #949: Remote cards get longer timeout (10min) + channel warning before failure\n if (card.status === \"running\" && card.type === \"remote\" && card.source_peer) {\n const age = Date.now() - new Date(card.updated_at + \"Z\").getTime();\n if (age > REMOTE_STALE_MS) {\n logWarn(TAG, `Remote card ${card.id} stale (${REMOTE_STALE_MS / 1000}s) \u2014 marking failed`);\n kanbanFail(card.id, \"remote worker unresponsive\");\n } else if (age > REMOTE_WARN_MS && !card.labels?.includes(\"stale-warned\")) {\n const { channelPost } = require(\"./tasks/kanban-channel.js\") as typeof import(\"./tasks/kanban-channel.js\");\n channelPost(card.id, \"SYSTEM\", \"ALL\", \"Remote worker unresponsive \u2014 consider cancelling\");\n kanbanUpdate(card.id, { labels: [card.labels, \"stale-warned\"].filter(Boolean).join(\",\") });\n }\n }\n }\n\n // Circuit breaker: total retries\n if (totalRetries > MAX_RETRIES * 3) {\n abortProject(projectId, children, `too many total retries (${totalRetries})`);\n return;\n }\n\n // All done?\n if (children.every(c => c.status === \"done\" || c.status === \"delivered\")) {\n logInfo(TAG, `Project ${projectId}: all children done`);\n const summaries = children.map(c => c.result_summary).filter(Boolean).join(\"\\n\");\n kanbanComplete(projectId, null, summaries.slice(0, 500));\n }\n}\n\nfunction abortProject(projectId: number, children: KanbanCard[], reason: string): void {\n logWarn(TAG, `ABORT project ${projectId}: ${reason}`);\n for (const card of children) {\n if (card.status === \"running\" || card.status === \"queued\") {\n kanbanFail(card.id, `project aborted: ${reason}`);\n }\n }\n kanbanFail(projectId, reason);\n}\n\nfunction isStale(card: KanbanCard): boolean {\n const lastActivity = new Date(card.updated_at + \"Z\").getTime();\n return Date.now() - lastActivity > STALE_MS;\n}\n\n// Remote card polling moved to spin.tick() (#980)\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA;AACA;AACA;AAIA;AAEA,IAAM,MAAM;AACZ,IAAM,cAAc;AACpB,IAAM,cAAc;AACpB,IAAM,oBAAoB,KAAK,KAAK;AACpC,IAAM,WAAW,IAAI,KAAK;AAC1B,IAAM,kBAAkB,KAAK,KAAK;AAClC,IAAM,iBAAiB,IAAI,KAAK;AAEzB,SAAS,kBAAwB;AACtC,QAAM,GAAG,aAAa,SAAS;AAC/B,QAAM,GAAG,eAAe,SAAS;AACjC,QAAM,GAAG,eAAe,SAAS;AACjC,UAAQ,KAAK,oBAAoB;AACnC;AAEA,SAAS,YAAkB;AACzB,QAAM,WAAW,WAAW,WAAW,QAAQ,EAC5C,OAAO,OAAK,EAAE,SAAS,GAAG;AAE7B,aAAW,WAAW,UAAU;AAC9B,qBAAiB,QAAQ,EAAE;AAAA,EAC7B;AACF;AAEA,SAAS,iBAAiB,WAAyB;AACjD,QAAM,WAAW,kBAAkB,SAAS;AAC5C,MAAI,SAAS,WAAW,EAAG;AAE3B,QAAM,UAAU,cAAc,SAAS;AACvC,MAAI,CAAC,QAAS;AAEd,QAAM,MAAM,KAAK,IAAI;AACrB,QAAM,gBAAe,oBAAI,KAAK,QAAQ,aAAa,GAAG,GAAE,QAAQ;AAGhE,MAAI,MAAM,eAAe,mBAAmB;AAC1C,iBAAa,WAAW,UAAU,6BAA6B;AAC/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EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAAE,CAAC;AAAA,MAC3F;AAAA,IACF;AAAA,EACF;AAGA,MAAI,eAAe,cAAc,GAAG;AAClC,iBAAa,WAAW,UAAU,2BAA2B,YAAY,GAAG;AAC5E;AAAA,EACF;AAGA,MAAI,SAAS,MAAM,OAAK,EAAE,WAAW,UAAU,EAAE,WAAW,WAAW,GAAG;AACxE,YAAQ,KAAK,WAAW,SAAS,qBAAqB;AACtD,UAAM,YAAY,SAAS,IAAI,OAAK,EAAE,cAAc,EAAE,OAAO,OAAO,EAAE,KAAK,IAAI;AAC/E,mBAAe,WAAW,MAAM,UAAU,MAAM,GAAG,GAAG,CAAC;AAAA,EACzD;AACF;AAEA,SAAS,aAAa,WAAmB,UAAwB,QAAsB;AACrF,UAAQ,KAAK,iBAAiB,SAAS,KAAK,MAAM,EAAE;AACpD,aAAW,QAAQ,UAAU;AAC3B,QAAI,KAAK,WAAW,aAAa,KAAK,WAAW,UAAU;AACzD,iBAAW,KAAK,IAAI,oBAAoB,MAAM,EAAE;AAAA,IAClD;AAAA,EACF;AACA,aAAW,WAAW,MAAM;AAC9B;AAEA,SAAS,QAAQ,MAA2B;AAC1C,QAAM,gBAAe,oBAAI,KAAK,KAAK,aAAa,GAAG,GAAE,QAAQ;AAC7D,SAAO,KAAK,IAAI,IAAI,eAAe;AACrC;",
6
6
  "names": []
7
7
  }
@@ -2,18 +2,21 @@
2
2
  import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
3
3
  import {
4
4
  reconcile
5
- } from "./chunk-P5O6QZDC.js";
5
+ } from "./chunk-QROWBWLL.js";
6
6
  import {
7
7
  printBanner
8
- } from "./chunk-TVSPVZTX.js";
9
- import "./chunk-EDZGF6BC.js";
10
- import "./chunk-C3EYYJN3.js";
11
- import "./chunk-OOKNHOCB.js";
8
+ } from "./chunk-YDY6QVWJ.js";
9
+ import "./chunk-5NY2YULC.js";
10
+ import "./chunk-GWILHZPT.js";
12
11
  import {
13
12
  abmindHome,
14
13
  abtarsHome,
15
- init_paths
16
- } from "./chunk-H2K23MOF.js";
14
+ init_paths as init_paths2
15
+ } from "./chunk-GALQBVKO.js";
16
+ import {
17
+ init_paths,
18
+ resolveReleasesDir
19
+ } from "./chunk-O7KQG6ME.js";
17
20
  import "./chunk-7K2YZTLD.js";
18
21
 
19
22
  // src/cli/commands/restore.ts
@@ -22,6 +25,7 @@ import { join, dirname, basename } from "node:path";
22
25
  import { homedir } from "node:os";
23
26
  import { spawnSync } from "node:child_process";
24
27
  import { createDecipheriv, hkdfSync } from "node:crypto";
28
+ init_paths2();
25
29
  init_paths();
26
30
  async function restore(archivePath, opts = {}) {
27
31
  await printBanner("restore");
@@ -151,7 +155,7 @@ function extractZip(archivePath, destDir) {
151
155
  process.stderr.write("Restore extract failed\n");
152
156
  return 1;
153
157
  }
154
- const templatesSrc = join(homedir(), ".abtars-releases", "src", "abtars", "templates");
158
+ const templatesSrc = join(resolveReleasesDir(), "src", "abtars", "templates");
155
159
  reconcile(templatesSrc, destDir);
156
160
  process.stdout.write(`\u2713 Restored to ${destDir}
157
161
  `);
@@ -197,4 +201,4 @@ function decryptFile(inputPath, outputPath, keyPath) {
197
201
  export {
198
202
  restore
199
203
  };
200
- //# sourceMappingURL=restore-NFDE2RG6.js.map
204
+ //# sourceMappingURL=restore-IFHPI7I7.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/cli/commands/restore.ts"],
4
- "sourcesContent": ["import { printBanner } from './banner.js';\n/**\n * `abtars restore` \u2014 restore from backup archive, auto-detect type.\n *\n * .abm \u2192 delegate to abmind restore\n * .zip/.7z \u2192 extract to ~/.abtars/ + find sibling .abm \u2192 restore both\n * .enc \u2192 find sibling .abm first (restore \u2192 key exists) \u2192 decrypt \u2192 extract\n * --config \u2192 zip only, skip abmind\n * --passphrase \u2192 passed through to abmind restore\n */\n\nimport { existsSync, readdirSync, readFileSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { join, dirname, basename } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { spawnSync } from \"node:child_process\";\nimport { createDecipheriv, hkdfSync } from \"node:crypto\";\nimport { reconcile } from \"../deploy-lib/reconcile.js\";\nimport { abtarsHome, abmindHome as resolveAbmindHome } from \"../../paths.js\";\n\nexport interface RestoreOpts {\n config?: boolean;\n passphrase?: string;\n}\n\nexport async function restore(archivePath: string, opts: RestoreOpts = {}): Promise<number> {\n await printBanner(\"restore\");\n if (!archivePath) {\n process.stderr.write(\"Usage: abtars restore <file.zip|.7z|.abm|.enc> [--config] [--passphrase <p>]\\n\");\n return 1;\n }\n if (!existsSync(archivePath)) {\n process.stderr.write(`File not found: ${archivePath}\\n`);\n return 1;\n }\n\n // Direct .abm \u2192 delegate entirely to abmind restore\n if (archivePath.endsWith(\".abm\")) {\n return restoreAbmind(archivePath, opts.passphrase);\n }\n\n // .enc \u2192 restore sibling .abm first (ensures key exists), then decrypt\n if (archivePath.endsWith(\".enc\")) {\n // Find sibling .abm\n const date = extractDate(archivePath);\n const dir = dirname(archivePath);\n const sibling = findSiblingAbm(dir, date);\n\n if (!opts.config && sibling) {\n const rc = restoreAbmind(sibling, opts.passphrase);\n if (rc !== 0) return rc;\n }\n\n // Decrypt .enc \u2192 temp zip\n const abmindHome = resolveAbmindHome();\n const keyPath = join(abmindHome, \"secret\", \"abmind.key\");\n if (!existsSync(keyPath)) {\n process.stderr.write(\"Error: abmind.key not found \u2014 run `abmind restore <file.abm>` first to recreate it, then retry.\\n\");\n return 1;\n }\n\n const tmpZip = join(process.env[\"TMPDIR\"] ?? \"/tmp\", `abtars-restore-${Date.now()}.zip`);\n const ok = decryptFile(archivePath, tmpZip, keyPath);\n if (!ok) return 1;\n process.stdout.write(\"\u2713 decrypted\\n\");\n\n // Extract the decrypted zip\n const rc = extractZip(tmpZip, abtarsHome());\n try { unlinkSync(tmpZip); } catch { /* ignore */ }\n return rc;\n }\n\n // .zip/.7z\n if (!opts.config) {\n // Restore sibling .abm first\n const date = extractDate(archivePath);\n const dir = dirname(archivePath);\n const sibling = findSiblingAbm(dir, date);\n if (sibling) {\n const rc = restoreAbmindSibling(sibling, opts.passphrase);\n if (rc !== 0) {\n // Continue with abtars restore, print prominent message at the end\n const abmFile = sibling.endsWith(\".abm\") ? sibling : null;\n process.on(\"exit\", () => {\n process.stderr.write(\"\\n\\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\\n\");\n process.stderr.write(\"\u26A0 MEMORY NOT RESTORED \u2014 wrong passphrase.\\n\");\n process.stderr.write(\"Fix: abmind restore \" + (abmFile ?? \"<file.abm>\") + \" --passphrase <original>\\n\");\n process.stderr.write(\"\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\\n\");\n });\n }\n } else {\n process.stdout.write(\"\u2139 no sibling .abm found \u2014 memory not restored\\n\");\n }\n }\n\n // Extract zip to ~/.abtars/ (overlays existing \u2014 bridge keeps running)\n return extractZip(archivePath, abtarsHome());\n}\n\nfunction restoreAbmind(abmPath: string, passphrase?: string): number {\n const args = [\"restore\", abmPath, \"--mode\", \"merge\"];\n if (passphrase) args.push(\"--passphrase\", passphrase);\n\n const envPassphrase = process.env[\"ABMIND_BACKUP_PASSPHRASE\"];\n const env = { ...process.env };\n if (!passphrase && envPassphrase) {\n env[\"ABMIND_BACKUP_PASSPHRASE\"] = envPassphrase;\n }\n\n const result = spawnSync(\"abmind\", args, { encoding: \"utf-8\", stdio: \"inherit\", env });\n if (result.status !== 0) {\n process.stderr.write(\"abmind restore failed\\n\");\n return 1;\n }\n process.stdout.write(\"\u2713 abmind memory restored\\n\");\n return 0;\n}\n\n/** Handle abmind sibling: .abm direct, .7z/.zip \u2192 extract to ~/.abmind + find .abm inside */\nfunction restoreAbmindSibling(siblingPath: string, passphrase?: string): number {\n if (siblingPath.endsWith(\".abm\")) return restoreAbmind(siblingPath, passphrase);\n\n // .7z or .zip: extract filesystem to ~/.abmind/, then find .abm inside and restore memories\n const abmindHome = resolveAbmindHome();\n const is7z = siblingPath.endsWith(\".7z\");\n const extractResult = is7z\n ? spawnSync(\"7z\", [\"x\", `-o${abmindHome}`, \"-aoa\", \"-bso0\", siblingPath], { encoding: \"utf-8\", stdio: \"pipe\" })\n : spawnSync(\"unzip\", [\"-oq\", siblingPath, \"-d\", abmindHome], { encoding: \"utf-8\", stdio: \"pipe\" });\n if (extractResult.status !== 0) {\n process.stderr.write(\"abmind archive extract failed\\n\");\n return 1;\n }\n process.stdout.write(\"\u2713 abmind files restored\\n\");\n\n // Find .abm file extracted into abmindHome\n const abmFile = readdirSync(abmindHome).find(f => f.endsWith(\".abm\"));\n if (abmFile) {\n const abmPath = join(abmindHome, abmFile);\n const rc = restoreAbmind(abmPath, passphrase);\n try { unlinkSync(abmPath); } catch {} // cleanup extracted .abm\n return rc;\n }\n process.stdout.write(\"\u2139 no .abm in archive \u2014 files restored but memories not imported\\n\");\n return 0;\n}\n\nfunction extractZip(archivePath: string, destDir: string): number {\n // Avoid \"getcwd: cannot access parent directories\" if CWD is inside destDir\n try { process.chdir(homedir()); } catch {}\n const is7z = archivePath.endsWith(\".7z\");\n const listCmd = is7z\n ? spawnSync(\"7z\", [\"l\", archivePath], { encoding: \"utf-8\" })\n : spawnSync(\"unzip\", [\"-l\", archivePath], { encoding: \"utf-8\" });\n if (!listCmd.stdout?.includes(\"config/\")) {\n process.stderr.write(\"Error: archive does not contain config/ \u2014 not a valid abtars backup\\n\");\n return 1;\n }\n\n // Extract, excluding binary dirs + manifest (install state, not user data)\n let result;\n if (is7z) {\n result = spawnSync(\"7z\", [\"x\", `-o${destDir}`, \"-aoa\", \"-bso0\", \"-xr!releases\", \"-xr!current\", \"-xr!bin\", \"-xr!manifest.json\", archivePath],\n { encoding: \"utf-8\", stdio: \"pipe\" });\n } else {\n result = spawnSync(\"unzip\", [\"-oq\", archivePath, \"-d\", destDir, \"-x\", \"releases/*\", \"current/*\", \"bin/*\", \"manifest.json\"],\n { encoding: \"utf-8\", stdio: \"pipe\" });\n }\n\n if (result.status !== 0) {\n process.stderr.write(\"Restore extract failed\\n\");\n return 1;\n }\n\n // Reconcile runtime tree (skills/core, prompts, config seeds)\n const templatesSrc = join(homedir(), \".abtars-releases\", \"src\", \"abtars\", \"templates\");\n reconcile(templatesSrc, destDir);\n\n process.stdout.write(`\u2713 Restored to ${destDir}\\n`);\n return 0;\n}\n\nfunction extractDate(filePath: string): string | null {\n const name = basename(filePath);\n const match = name.match(/(\\d{8}-\\d{4})/);\n return match?.[1] ?? null;\n}\n\nfunction findSiblingAbm(dir: string, date: string | null): string | null {\n if (!existsSync(dir)) return null;\n // Look for abmind zip first, then .abm\n const files = readdirSync(dir).filter(f => f.startsWith(\"abmind-\") && (f.endsWith(\".zip\") || f.endsWith(\".7z\") || f.endsWith(\".abm\")));\n if (date) {\n const exact = files.find(f => f.includes(date));\n if (exact) return join(dir, exact);\n }\n const sorted = files.sort().reverse();\n return sorted[0] ? join(dir, sorted[0]) : null;\n}\n\nfunction decryptFile(inputPath: string, outputPath: string, keyPath: string): boolean {\n const master = Buffer.from(readFileSync(keyPath, \"utf-8\").trim(), \"hex\");\n const key = Buffer.from(hkdfSync(\"sha256\", master, \"\", \"abtars-backup-v1\", 32));\n\n const buf = readFileSync(inputPath);\n if (buf.length < 28) { // 12 iv + 16 tag minimum\n process.stderr.write(\"Error: encrypted file too small\\n\");\n return false;\n }\n\n const iv = buf.subarray(0, 12);\n const tag = buf.subarray(buf.length - 16);\n const ciphertext = buf.subarray(12, buf.length - 16);\n\n try {\n const decipher = createDecipheriv(\"aes-256-gcm\", key, iv);\n decipher.setAuthTag(tag);\n const decrypted = Buffer.concat([decipher.update(ciphertext), decipher.final()]);\n writeFileSync(outputPath, decrypted);\n return true;\n } catch {\n process.stderr.write(\"Error: decryption failed \u2014 wrong key or corrupted file\\n\");\n return false;\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAWA,SAAS,YAAY,aAAa,cAAc,YAAY,qBAAqB;AACjF,SAAS,MAAM,SAAS,gBAAgB;AACxC,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB,gBAAgB;AAE3C;AAOA,eAAsB,QAAQ,aAAqB,OAAoB,CAAC,GAAoB;AAC1F,QAAM,YAAY,SAAS;AAC3B,MAAI,CAAC,aAAa;AAChB,YAAQ,OAAO,MAAM,gFAAgF;AACrG,WAAO;AAAA,EACT;AACA,MAAI,CAAC,WAAW,WAAW,GAAG;AAC5B,YAAQ,OAAO,MAAM,mBAAmB,WAAW;AAAA,CAAI;AACvD,WAAO;AAAA,EACT;AAGA,MAAI,YAAY,SAAS,MAAM,GAAG;AAChC,WAAO,cAAc,aAAa,KAAK,UAAU;AAAA,EACnD;AAGA,MAAI,YAAY,SAAS,MAAM,GAAG;AAEhC,UAAM,OAAO,YAAY,WAAW;AACpC,UAAM,MAAM,QAAQ,WAAW;AAC/B,UAAM,UAAU,eAAe,KAAK,IAAI;AAExC,QAAI,CAAC,KAAK,UAAU,SAAS;AAC3B,YAAMA,MAAK,cAAc,SAAS,KAAK,UAAU;AACjD,UAAIA,QAAO,E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AE,OAAO,OAAK,EAAE,WAAW,SAAS,MAAM,EAAE,SAAS,MAAM,KAAK,EAAE,SAAS,KAAK,KAAK,EAAE,SAAS,MAAM,EAAE;AACrI,MAAI,MAAM;AACR,UAAM,QAAQ,MAAM,KAAK,OAAK,EAAE,SAAS,IAAI,CAAC;AAC9C,QAAI,MAAO,QAAO,KAAK,KAAK,KAAK;AAAA,EACnC;AACA,QAAM,SAAS,MAAM,KAAK,EAAE,QAAQ;AACpC,SAAO,OAAO,CAAC,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,IAAI;AAC5C;AAEA,SAAS,YAAY,WAAmB,YAAoB,SAA0B;AACpF,QAAM,SAAS,OAAO,KAAK,aAAa,SAAS,OAAO,EAAE,KAAK,GAAG,KAAK;AACvE,QAAM,MAAM,OAAO,KAAK,SAAS,UAAU,QAAQ,IAAI,oBAAoB,EAAE,CAAC;AAE9E,QAAM,MAAM,aAAa,SAAS;AAClC,MAAI,IAAI,SAAS,IAAI;AACnB,YAAQ,OAAO,MAAM,mCAAmC;AACxD,WAAO;AAAA,EACT;AAEA,QAAM,KAAK,IAAI,SAAS,GAAG,EAAE;AAC7B,QAAM,MAAM,IAAI,SAAS,IAAI,SAAS,EAAE;AACxC,QAAM,aAAa,IAAI,SAAS,IAAI,IAAI,SAAS,EAAE;AAEnD,MAAI;AACF,UAAM,WAAW,iBAAiB,eAAe,KAAK,EAAE;AACxD,aAAS,WAAW,GAAG;AACvB,UAAM,YAAY,OAAO,OAAO,CAAC,SAAS,OAAO,UAAU,GAAG,SAAS,MAAM,CAAC,CAAC;AAC/E,kBAAc,YAAY,SAAS;AACnC,WAAO;AAAA,EACT,QAAQ;AACN,YAAQ,OAAO,MAAM,+DAA0D;AAC/E,WAAO;AAAA,EACT;AACF;",
6
- "names": ["rc", "abmindHome"]
4
+ "sourcesContent": ["import { printBanner } from './banner.js';\n/**\n * `abtars restore` \u2014 restore from backup archive, auto-detect type.\n *\n * .abm \u2192 delegate to abmind restore\n * .zip/.7z \u2192 extract to ~/.abtars/ + find sibling .abm \u2192 restore both\n * .enc \u2192 find sibling .abm first (restore \u2192 key exists) \u2192 decrypt \u2192 extract\n * --config \u2192 zip only, skip abmind\n * --passphrase \u2192 passed through to abmind restore\n */\n\nimport { existsSync, readdirSync, readFileSync, unlinkSync, writeFileSync } from \"node:fs\";\nimport { join, dirname, basename } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { spawnSync } from \"node:child_process\";\nimport { createDecipheriv, hkdfSync } from \"node:crypto\";\nimport { reconcile } from \"../deploy-lib/reconcile.js\";\nimport { abtarsHome, abmindHome as resolveAbmindHome } from \"../../paths.js\";\nimport { resolveReleasesDir } from \"../deploy-lib/paths.js\";\n\nexport interface RestoreOpts {\n config?: boolean;\n passphrase?: string;\n}\n\nexport async function restore(archivePath: string, opts: RestoreOpts = {}): Promise<number> {\n await printBanner(\"restore\");\n if (!archivePath) {\n process.stderr.write(\"Usage: abtars restore <file.zip|.7z|.abm|.enc> [--config] [--passphrase <p>]\\n\");\n return 1;\n }\n if (!existsSync(archivePath)) {\n process.stderr.write(`File not found: ${archivePath}\\n`);\n return 1;\n }\n\n // Direct .abm \u2192 delegate entirely to abmind restore\n if (archivePath.endsWith(\".abm\")) {\n return restoreAbmind(archivePath, opts.passphrase);\n }\n\n // .enc \u2192 restore sibling .abm first (ensures key exists), then decrypt\n if (archivePath.endsWith(\".enc\")) {\n // Find sibling .abm\n const date = extractDate(archivePath);\n const dir = dirname(archivePath);\n const sibling = findSiblingAbm(dir, date);\n\n if (!opts.config && sibling) {\n const rc = restoreAbmind(sibling, opts.passphrase);\n if (rc !== 0) return rc;\n }\n\n // Decrypt .enc \u2192 temp zip\n const abmindHome = resolveAbmindHome();\n const keyPath = join(abmindHome, \"secret\", \"abmind.key\");\n if (!existsSync(keyPath)) {\n process.stderr.write(\"Error: abmind.key not found \u2014 run `abmind restore <file.abm>` first to recreate it, then retry.\\n\");\n return 1;\n }\n\n const tmpZip = join(process.env[\"TMPDIR\"] ?? \"/tmp\", `abtars-restore-${Date.now()}.zip`);\n const ok = decryptFile(archivePath, tmpZip, keyPath);\n if (!ok) return 1;\n process.stdout.write(\"\u2713 decrypted\\n\");\n\n // Extract the decrypted zip\n const rc = extractZip(tmpZip, abtarsHome());\n try { unlinkSync(tmpZip); } catch { /* ignore */ }\n return rc;\n }\n\n // .zip/.7z\n if (!opts.config) {\n // Restore sibling .abm first\n const date = extractDate(archivePath);\n const dir = dirname(archivePath);\n const sibling = findSiblingAbm(dir, date);\n if (sibling) {\n const rc = restoreAbmindSibling(sibling, opts.passphrase);\n if (rc !== 0) {\n // Continue with abtars restore, print prominent message at the end\n const abmFile = sibling.endsWith(\".abm\") ? sibling : null;\n process.on(\"exit\", () => {\n process.stderr.write(\"\\n\\n\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\\n\");\n process.stderr.write(\"\u26A0 MEMORY NOT RESTORED \u2014 wrong passphrase.\\n\");\n process.stderr.write(\"Fix: abmind restore \" + (abmFile ?? \"<file.abm>\") + \" --passphrase <original>\\n\");\n process.stderr.write(\"\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\\n\");\n });\n }\n } else {\n process.stdout.write(\"\u2139 no sibling .abm found \u2014 memory not restored\\n\");\n }\n }\n\n // Extract zip to ~/.abtars/ (overlays existing \u2014 bridge keeps running)\n return extractZip(archivePath, abtarsHome());\n}\n\nfunction restoreAbmind(abmPath: string, passphrase?: string): number {\n const args = [\"restore\", abmPath, \"--mode\", \"merge\"];\n if (passphrase) args.push(\"--passphrase\", passphrase);\n\n const envPassphrase = process.env[\"ABMIND_BACKUP_PASSPHRASE\"];\n const env = { ...process.env };\n if (!passphrase && envPassphrase) {\n env[\"ABMIND_BACKUP_PASSPHRASE\"] = envPassphrase;\n }\n\n const result = spawnSync(\"abmind\", args, { encoding: \"utf-8\", stdio: \"inherit\", env });\n if (result.status !== 0) {\n process.stderr.write(\"abmind restore failed\\n\");\n return 1;\n }\n process.stdout.write(\"\u2713 abmind memory restored\\n\");\n return 0;\n}\n\n/** Handle abmind sibling: .abm direct, .7z/.zip \u2192 extract to ~/.abmind + find .abm inside */\nfunction restoreAbmindSibling(siblingPath: string, passphrase?: string): number {\n if (siblingPath.endsWith(\".abm\")) return restoreAbmind(siblingPath, passphrase);\n\n // .7z or .zip: extract filesystem to ~/.abmind/, then find .abm inside and restore memories\n const abmindHome = resolveAbmindHome();\n const is7z = siblingPath.endsWith(\".7z\");\n const extractResult = is7z\n ? spawnSync(\"7z\", [\"x\", `-o${abmindHome}`, \"-aoa\", \"-bso0\", siblingPath], { encoding: \"utf-8\", stdio: \"pipe\" })\n : spawnSync(\"unzip\", [\"-oq\", siblingPath, \"-d\", abmindHome], { encoding: \"utf-8\", stdio: \"pipe\" });\n if (extractResult.status !== 0) {\n process.stderr.write(\"abmind archive extract failed\\n\");\n return 1;\n }\n process.stdout.write(\"\u2713 abmind files restored\\n\");\n\n // Find .abm file extracted into abmindHome\n const abmFile = readdirSync(abmindHome).find(f => f.endsWith(\".abm\"));\n if (abmFile) {\n const abmPath = join(abmindHome, abmFile);\n const rc = restoreAbmind(abmPath, passphrase);\n try { unlinkSync(abmPath); } catch {} // cleanup extracted .abm\n return rc;\n }\n process.stdout.write(\"\u2139 no .abm in archive \u2014 files restored but memories not imported\\n\");\n return 0;\n}\n\nfunction extractZip(archivePath: string, destDir: string): number {\n // Avoid \"getcwd: cannot access parent directories\" if CWD is inside destDir\n try { process.chdir(homedir()); } catch {}\n const is7z = archivePath.endsWith(\".7z\");\n const listCmd = is7z\n ? spawnSync(\"7z\", [\"l\", archivePath], { encoding: \"utf-8\" })\n : spawnSync(\"unzip\", [\"-l\", archivePath], { encoding: \"utf-8\" });\n if (!listCmd.stdout?.includes(\"config/\")) {\n process.stderr.write(\"Error: archive does not contain config/ \u2014 not a valid abtars backup\\n\");\n return 1;\n }\n\n // Extract, excluding binary dirs + manifest (install state, not user data)\n let result;\n if (is7z) {\n result = spawnSync(\"7z\", [\"x\", `-o${destDir}`, \"-aoa\", \"-bso0\", \"-xr!releases\", \"-xr!current\", \"-xr!bin\", \"-xr!manifest.json\", archivePath],\n { encoding: \"utf-8\", stdio: \"pipe\" });\n } else {\n result = spawnSync(\"unzip\", [\"-oq\", archivePath, \"-d\", destDir, \"-x\", \"releases/*\", \"current/*\", \"bin/*\", \"manifest.json\"],\n { encoding: \"utf-8\", stdio: \"pipe\" });\n }\n\n if (result.status !== 0) {\n process.stderr.write(\"Restore extract failed\\n\");\n return 1;\n }\n\n // Reconcile runtime tree (skills/core, prompts, config seeds)\n const templatesSrc = join(resolveReleasesDir(), \"src\", \"abtars\", \"templates\");\n reconcile(templatesSrc, destDir);\n\n process.stdout.write(`\u2713 Restored to ${destDir}\\n`);\n return 0;\n}\n\nfunction extractDate(filePath: string): string | null {\n const name = basename(filePath);\n const match = name.match(/(\\d{8}-\\d{4})/);\n return match?.[1] ?? null;\n}\n\nfunction findSiblingAbm(dir: string, date: string | null): string | null {\n if (!existsSync(dir)) return null;\n // Look for abmind zip first, then .abm\n const files = readdirSync(dir).filter(f => f.startsWith(\"abmind-\") && (f.endsWith(\".zip\") || f.endsWith(\".7z\") || f.endsWith(\".abm\")));\n if (date) {\n const exact = files.find(f => f.includes(date));\n if (exact) return join(dir, exact);\n }\n const sorted = files.sort().reverse();\n return sorted[0] ? join(dir, sorted[0]) : null;\n}\n\nfunction decryptFile(inputPath: string, outputPath: string, keyPath: string): boolean {\n const master = Buffer.from(readFileSync(keyPath, \"utf-8\").trim(), \"hex\");\n const key = Buffer.from(hkdfSync(\"sha256\", master, \"\", \"abtars-backup-v1\", 32));\n\n const buf = readFileSync(inputPath);\n if (buf.length < 28) { // 12 iv + 16 tag minimum\n process.stderr.write(\"Error: encrypted file too small\\n\");\n return false;\n }\n\n const iv = buf.subarray(0, 12);\n const tag = buf.subarray(buf.length - 16);\n const ciphertext = buf.subarray(12, buf.length - 16);\n\n try {\n const decipher = createDecipheriv(\"aes-256-gcm\", key, iv);\n decipher.setAuthTag(tag);\n const decrypted = Buffer.concat([decipher.update(ciphertext), decipher.final()]);\n writeFileSync(outputPath, decrypted);\n return true;\n } catch {\n process.stderr.write(\"Error: decryption failed \u2014 wrong key or corrupted file\\n\");\n return false;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAWA,SAAS,YAAY,aAAa,cAAc,YAAY,qBAAqB;AACjF,SAAS,MAAM,SAAS,gBAAgB;AACxC,SAAS,eAAe;AACxB,SAAS,iBAAiB;AAC1B,SAAS,kBAAkB,gBAAgB;AAE3CA;AACA;AAOA,eAAsB,QAAQ,aAAqB,OAAoB,CAAC,GAAoB;AAC1F,QAAM,YAAY,SAAS;AAC3B,MAAI,CAAC,aAAa;AAChB,YAAQ,OAAO,MAAM,gFAAgF;AACrG,WAAO;AAAA,EACT;AACA,MAAI,CAAC,WAAW,WAAW,GAAG;AAC5B,YAAQ,OAAO,MAAM,mBAAmB,WAAW;AAAA,CAAI;AACvD,WAAO;AAAA,EACT;AAGA,MAAI,YAAY,SAAS,MAAM,GAAG;AAChC,WAAO,cAAc,aAAa,KAAK,UAAU;AAAA,EACnD;AAGA,MAAI,YAAY,SAAS,MAAM,GAAG;AAEhC,UAAM,OAAO,YAAY,WAAW;AACpC,UAAM,MAAM,QAAQ,WAAW;AAC/B,UAAM,UAAU,eAAe,KAAK,IA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
  }
@@ -2,12 +2,12 @@
2
2
  import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
3
3
  import {
4
4
  rollback
5
- } from "./chunk-BU7LTI2W.js";
6
- import "./chunk-TVSPVZTX.js";
7
- import "./chunk-EDZGF6BC.js";
8
- import "./chunk-C3EYYJN3.js";
5
+ } from "./chunk-HZDLFLRP.js";
6
+ import "./chunk-YDY6QVWJ.js";
7
+ import "./chunk-5NY2YULC.js";
8
+ import "./chunk-O7KQG6ME.js";
9
9
  import "./chunk-7K2YZTLD.js";
10
10
  export {
11
11
  rollback
12
12
  };
13
- //# sourceMappingURL=rollback-MVZ53XS4.js.map
13
+ //# sourceMappingURL=rollback-ANRI3T5Z.js.map