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
@@ -1,156 +0,0 @@
1
- #!/usr/bin/env node
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
- import {
4
- getEnv,
5
- init_env_schema
6
- } from "./chunk-SSCGWDIC.js";
7
- import {
8
- init_log_and_swallow,
9
- logAndSwallow
10
- } from "./chunk-WP7FZHMI.js";
11
- import {
12
- init_logger,
13
- logDebug,
14
- logError,
15
- logInfo
16
- } from "./chunk-OOKNHOCB.js";
17
-
18
- // src/components/nlm-command-handler.ts
19
- init_env_schema();
20
- init_logger();
21
- init_log_and_swallow();
22
- import { execFile } from "node:child_process";
23
- var TAG = "NLMCommand";
24
- var TIMEOUT_MS = 12e4;
25
- function loadNLMConfig() {
26
- const raw = String(getEnv().notebooklmEnabled);
27
- return {
28
- enabled: raw === "true" || raw === "1",
29
- defaultNotebook: getEnv().notebooklmDefaultNotebook
30
- };
31
- }
32
- function nlmExec(args) {
33
- const start = Date.now();
34
- logDebug(TAG, `nlm ${args.join(" ")}`);
35
- return new Promise((resolve) => {
36
- const ac = new AbortController();
37
- const timer = setTimeout(() => ac.abort(), TIMEOUT_MS);
38
- try {
39
- execFile("nlm", args, { signal: ac.signal, maxBuffer: 10 * 1024 * 1024 }, (err, stdout, stderr) => {
40
- clearTimeout(timer);
41
- logDebug(TAG, `nlm completed in ${Date.now() - start}ms`);
42
- if (err) {
43
- if (err.name === "AbortError" || err.code === "ABORT_ERR") {
44
- resolve({ ok: false, error: `Timeout after ${TIMEOUT_MS / 1e3}s` });
45
- return;
46
- }
47
- resolve({ ok: false, error: stderr?.trim() || err.message });
48
- return;
49
- }
50
- resolve({ ok: true, data: stdout.trim() });
51
- });
52
- } catch (err) {
53
- clearTimeout(timer);
54
- resolve({ ok: false, error: err instanceof Error ? err.message : String(err) });
55
- }
56
- });
57
- }
58
- async function handleNLMCommand(args, config) {
59
- if (!config.enabled) {
60
- return { text: "\u{1F4DA} Knowledge base is disabled." };
61
- }
62
- const parts = args.split(/\s+/).filter(Boolean);
63
- const sub = parts[0] ?? "";
64
- try {
65
- switch (sub) {
66
- case "list":
67
- return await handleList();
68
- case "create":
69
- return await handleCreate(parts.slice(1).join(" "));
70
- case "sources":
71
- return await handleSources(parts[1] ?? "");
72
- case "query":
73
- return await handleQuery(parts.slice(1).join(" "), config);
74
- default:
75
- return { text: "Usage: /nlm list | /nlm create <name> | /nlm sources <notebook-id> | /nlm query <question>" };
76
- }
77
- } catch (err) {
78
- logError(TAG, "NLM command failed", err);
79
- return { text: `\u274C NLM error: ${err instanceof Error ? err.message : String(err)}` };
80
- }
81
- }
82
- async function handleList() {
83
- const result = await nlmExec(["notebook", "list", "--json"]);
84
- if (!result.ok) return { text: `\u274C ${result.error}` };
85
- try {
86
- const notebooks = JSON.parse(result.data);
87
- if (!Array.isArray(notebooks) || notebooks.length === 0) return { text: "\u{1F4DA} No notebooks found." };
88
- const lines = notebooks.map(
89
- (n) => `\u2022 ${n.title ?? n.name ?? "?"} (${n.id ?? n.notebook_id ?? "?"})`
90
- );
91
- return { text: `\u{1F4DA} Notebooks:
92
-
93
- ${lines.join("\n")}` };
94
- } catch (err) {
95
- logAndSwallow(TAG, "JSON.parse notebook list", err);
96
- return { text: `\u{1F4DA} ${result.data}` };
97
- }
98
- }
99
- async function handleCreate(name) {
100
- if (!name) return { text: "Usage: /nlm create <name>" };
101
- const result = await nlmExec(["notebook", "create", name, "--json"]);
102
- if (!result.ok) return { text: `\u274C ${result.error}` };
103
- try {
104
- const parsed = JSON.parse(result.data);
105
- const id = parsed.notebook_id ?? parsed.id ?? "?";
106
- logInfo(TAG, `Created notebook "${name}" \u2192 ${id}`);
107
- return { text: `\u2713 Notebook "${name}" created (${id})` };
108
- } catch (err) {
109
- logAndSwallow(TAG, "JSON.parse notebook create", err);
110
- return { text: `\u2713 ${result.data}` };
111
- }
112
- }
113
- async function handleSources(notebookId) {
114
- if (!notebookId) return { text: "Usage: /nlm sources <notebook-id>" };
115
- const result = await nlmExec(["source", "list", notebookId, "--json"]);
116
- if (!result.ok) return { text: `\u274C ${result.error}` };
117
- try {
118
- const sources = JSON.parse(result.data);
119
- if (!Array.isArray(sources) || sources.length === 0) return { text: `\u{1F4C4} No sources in notebook.` };
120
- const lines = sources.map(
121
- (s) => `\u2022 [${s.type ?? s.source_type ?? "?"}] ${s.title ?? s.name ?? "?"}`
122
- );
123
- return { text: `\u{1F4C4} Sources:
124
-
125
- ${lines.join("\n")}` };
126
- } catch (err) {
127
- logAndSwallow(TAG, "JSON.parse source list", err);
128
- return { text: `\u{1F4C4} ${result.data}` };
129
- }
130
- }
131
- async function handleQuery(question, config) {
132
- if (!question) return { text: "Usage: /nlm query <question>" };
133
- const nbId = config.defaultNotebook;
134
- if (!nbId) return { text: "\u274C No default notebook configured (NOTEBOOKLM_DEFAULT_NOTEBOOK)." };
135
- const result = await nlmExec(["notebook", "query", nbId, question, "--json"]);
136
- if (!result.ok) return { text: `\u274C ${result.error}` };
137
- try {
138
- const parsed = JSON.parse(result.data);
139
- const answer = parsed.answer ?? parsed.response ?? result.data;
140
- const sources = parsed.sources_used ?? parsed.citations ?? [];
141
- const citations = Array.isArray(sources) && sources.length > 0 ? `
142
-
143
- \u{1F4CE} Sources: ${sources.map((s) => s.title ?? s.name ?? s.source_name ?? "?").join(", ")}` : "";
144
- logInfo(TAG, `Query OK \u2014 answerLen=${String(answer).length}`);
145
- return { text: `\u{1F4DA} ${answer}${citations}` };
146
- } catch (err) {
147
- logAndSwallow(TAG, "JSON.parse query result", err);
148
- return { text: `\u{1F4DA} ${result.data}` };
149
- }
150
- }
151
-
152
- export {
153
- loadNLMConfig,
154
- handleNLMCommand
155
- };
156
- //# sourceMappingURL=chunk-HAZHNBBY.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/components/nlm-command-handler.ts"],
4
- "sourcesContent": ["import { getEnv } from \"./env-schema.js\";\n/**\n * Telegram /nlm command handler \u2014 calls `nlm` CLI directly.\n *\n * Subcommands:\n * /nlm list \u2014 List notebooks\n * /nlm create <name> \u2014 Create a new notebook\n * /nlm sources <notebook> \u2014 List sources in a notebook\n * /nlm query <question> \u2014 Query the default notebook\n */\n\nimport { execFile } from \"node:child_process\";\nimport { logError, logDebug, logInfo } from \"./logger.js\";\nimport { logAndSwallow } from \"./log-and-swallow.js\";\n\nconst TAG = \"NLMCommand\";\nconst TIMEOUT_MS = 120_000; // 2 minutes \u2014 NLM queries can be slow\n\nexport type NLMCommandResult = { text: string };\n\nexport type NLMConfig = {\n enabled: boolean;\n defaultNotebook: string; // notebook ID (not name)\n};\n\nexport function loadNLMConfig(): NLMConfig {\n const raw = String(getEnv().notebooklmEnabled);\n return {\n enabled: raw === \"true\" || raw === \"1\",\n defaultNotebook: getEnv().notebooklmDefaultNotebook,\n };\n}\n\n/** Execute `nlm` CLI and return stdout. */\nfunction nlmExec(args: string[]): Promise<{ ok: true; data: string } | { ok: false; error: string }> {\n const start = Date.now();\n logDebug(TAG, `nlm ${args.join(\" \")}`);\n\n return new Promise((resolve) => {\n const ac = new AbortController();\n const timer = setTimeout(() => ac.abort(), TIMEOUT_MS);\n\n try {\n execFile(\"nlm\", args, { signal: ac.signal, maxBuffer: 10 * 1024 * 1024 }, (err, stdout, stderr) => {\n clearTimeout(timer);\n logDebug(TAG, `nlm completed in ${Date.now() - start}ms`);\n\n if (err) {\n if (err.name === \"AbortError\" || (err as NodeJS.ErrnoException).code === \"ABORT_ERR\") {\n resolve({ ok: false, error: `Timeout after ${TIMEOUT_MS / 1000}s` });\n return;\n }\n resolve({ ok: false, error: stderr?.trim() || err.message });\n return;\n }\n resolve({ ok: true, data: stdout.trim() });\n });\n } catch (err) {\n clearTimeout(timer);\n resolve({ ok: false, error: err instanceof Error ? err.message : String(err) });\n }\n });\n}\n\nexport async function handleNLMCommand(args: string, config: NLMConfig): Promise<NLMCommandResult> {\n if (!config.enabled) {\n return { text: \"\uD83D\uDCDA Knowledge base is disabled.\" };\n }\n\n const parts = args.split(/\\s+/).filter(Boolean);\n const sub = parts[0] ?? \"\";\n\n try {\n switch (sub) {\n case \"list\": return await handleList();\n case \"create\": return await handleCreate(parts.slice(1).join(\" \"));\n case \"sources\": return await handleSources(parts[1] ?? \"\");\n case \"query\": return await handleQuery(parts.slice(1).join(\" \"), config);\n default:\n return { text: \"Usage: /nlm list | /nlm create <name> | /nlm sources <notebook-id> | /nlm query <question>\" };\n }\n } catch (err) {\n logError(TAG, \"NLM command failed\", err);\n return { text: `\u274C NLM error: ${err instanceof Error ? err.message : String(err)}` };\n }\n}\n\nasync function handleList(): Promise<NLMCommandResult> {\n const result = await nlmExec([\"notebook\", \"list\", \"--json\"]);\n if (!result.ok) return { text: `\u274C ${result.error}` };\n\n try {\n const notebooks = JSON.parse(result.data);\n if (!Array.isArray(notebooks) || notebooks.length === 0) return { text: \"\uD83D\uDCDA No notebooks found.\" };\n const lines = notebooks.map((n: Record<string, unknown>) =>\n `\u2022 ${n.title ?? n.name ?? \"?\"} (${n.id ?? n.notebook_id ?? \"?\"})`\n );\n return { text: `\uD83D\uDCDA Notebooks:\\n\\n${lines.join(\"\\n\")}` };\n } catch (err) {\n logAndSwallow(TAG, \"JSON.parse notebook list\", err);\n return { text: `\uD83D\uDCDA ${result.data}` };\n }\n}\n\nasync function handleCreate(name: string): Promise<NLMCommandResult> {\n if (!name) return { text: \"Usage: /nlm create <name>\" };\n const result = await nlmExec([\"notebook\", \"create\", name, \"--json\"]);\n if (!result.ok) return { text: `\u274C ${result.error}` };\n\n try {\n const parsed = JSON.parse(result.data);\n const id = parsed.notebook_id ?? parsed.id ?? \"?\";\n logInfo(TAG, `Created notebook \"${name}\" \u2192 ${id}`);\n return { text: `\u2713 Notebook \"${name}\" created (${id})` };\n } catch (err) {\n logAndSwallow(TAG, \"JSON.parse notebook create\", err);\n return { text: `\u2713 ${result.data}` };\n }\n}\n\nasync function handleSources(notebookId: string): Promise<NLMCommandResult> {\n if (!notebookId) return { text: \"Usage: /nlm sources <notebook-id>\" };\n const result = await nlmExec([\"source\", \"list\", notebookId, \"--json\"]);\n if (!result.ok) return { text: `\u274C ${result.error}` };\n\n try {\n const sources = JSON.parse(result.data);\n if (!Array.isArray(sources) || sources.length === 0) return { text: `\uD83D\uDCC4 No sources in notebook.` };\n const lines = sources.map((s: Record<string, unknown>) =>\n `\u2022 [${s.type ?? s.source_type ?? \"?\"}] ${s.title ?? s.name ?? \"?\"}`\n );\n return { text: `\uD83D\uDCC4 Sources:\\n\\n${lines.join(\"\\n\")}` };\n } catch (err) {\n logAndSwallow(TAG, \"JSON.parse source list\", err);\n return { text: `\uD83D\uDCC4 ${result.data}` };\n }\n}\n\nasync function handleQuery(question: string, config: NLMConfig): Promise<NLMCommandResult> {\n if (!question) return { text: \"Usage: /nlm query <question>\" };\n const nbId = config.defaultNotebook;\n if (!nbId) return { text: \"\u274C No default notebook configured (NOTEBOOKLM_DEFAULT_NOTEBOOK).\" };\n\n const result = await nlmExec([\"notebook\", \"query\", nbId, question, \"--json\"]);\n if (!result.ok) return { text: `\u274C ${result.error}` };\n\n try {\n const parsed = JSON.parse(result.data);\n const answer = parsed.answer ?? parsed.response ?? result.data;\n const sources = parsed.sources_used ?? parsed.citations ?? [];\n const citations = Array.isArray(sources) && sources.length > 0\n ? `\\n\\n\uD83D\uDCCE Sources: ${sources.map((s: Record<string, unknown>) => s.title ?? s.name ?? s.source_name ?? \"?\").join(\", \")}`\n : \"\";\n logInfo(TAG, `Query OK \u2014 answerLen=${String(answer).length}`);\n return { text: `\uD83D\uDCDA ${answer}${citations}` };\n } catch (err) {\n logAndSwallow(TAG, \"JSON.parse query result\", err);\n return { text: `\uD83D\uDCDA ${result.data}` };\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAYA;AACA;AAFA,SAAS,gBAAgB;AAIzB,IAAM,MAAM;AACZ,IAAM,aAAa;AASZ,SAAS,gBAA2B;AACzC,QAAM,MAAM,OAAO,OAAO,EAAE,iBAAiB;AAC7C,SAAO;AAAA,IACL,SAAS,QAAQ,UAAU,QAAQ;AA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M,QAAO,EAAE,MAAM,uEAAkE;AAE5F,QAAM,SAAS,MAAM,QAAQ,CAAC,YAAY,SAAS,MAAM,UAAU,QAAQ,CAAC;AAC5E,MAAI,CAAC,OAAO,GAAI,QAAO,EAAE,MAAM,UAAK,OAAO,KAAK,GAAG;AAEnD,MAAI;AACF,UAAM,SAAS,KAAK,MAAM,OAAO,IAAI;AACrC,UAAM,SAAS,OAAO,UAAU,OAAO,YAAY,OAAO;AAC1D,UAAM,UAAU,OAAO,gBAAgB,OAAO,aAAa,CAAC;AAC5D,UAAM,YAAY,MAAM,QAAQ,OAAO,KAAK,QAAQ,SAAS,IACzD;AAAA;AAAA,qBAAmB,QAAQ,IAAI,CAAC,MAA+B,EAAE,SAAS,EAAE,QAAQ,EAAE,eAAe,GAAG,EAAE,KAAK,IAAI,CAAC,KACpH;AACJ,YAAQ,KAAK,6BAAwB,OAAO,MAAM,EAAE,MAAM,EAAE;AAC5D,WAAO,EAAE,MAAM,aAAM,MAAM,GAAG,SAAS,GAAG;AAAA,EAC5C,SAAS,KAAK;AACZ,kBAAc,KAAK,2BAA2B,GAAG;AACjD,WAAO,EAAE,MAAM,aAAM,OAAO,IAAI,GAAG;AAAA,EACrC;AACF;",
6
- "names": []
7
- }
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/utils/lazy-require.ts"],
4
- "sourcesContent": ["/**\n * lazy-require.ts \u2014 Install optional deps on first use.\n * Installs into ~/.abtars-releases/deps/node_modules/. Falls back gracefully.\n */\nimport { existsSync, mkdirSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { logInfo, logWarn } from \"../components/logger.js\";\nimport { abtarsHome } from \"../paths.js\";\n\nconst TAG = \"deps\";\n\nexport interface OptionalDep {\n readonly packages: readonly string[];\n readonly label: string;\n readonly postInstall?: string;\n}\n\nexport const OPTIONAL_DEPS: Record<string, OptionalDep> = {\n browser: { packages: [\"cloakbrowser\"], label: \"CloakBrowser (stealth Chromium)\" },\n twitter: { packages: [\"rettiwt-api\"], label: \"Twitter/X integration\" },\n pdf: { packages: [\"pdf-parse\"], label: \"PDF reading\" },\n youtube: { packages: [\"youtube-transcript\"], label: \"YouTube transcripts\" },\n image: { packages: [\"jimp\"], label: \"Image processing\" },\n};\n\nexport interface SystemDep {\n readonly bin: string;\n readonly label: string;\n readonly installHint: string;\n readonly platform?: \"linux\" | \"darwin\";\n}\n\nexport const SYSTEM_DEPS: Record<string, SystemDep> = {\n bwrap: { bin: \"bwrap\", label: \"Seatbelt sandbox (Linux)\", installHint: \"apt install bubblewrap\", platform: \"linux\" },\n lightpanda: { bin: \"lightpanda\", label: \"Web-fetch level 3\", installHint: \"see https://lightpanda.io\" },\n ollama: { bin: \"ollama\", label: \"Local embeddings\", installHint: \"curl -fsSL https://ollama.ai/install.sh | sh\" },\n};\n\nfunction libDir(): string {\n const d = join(homedir(), \".local\", \"lib\");\n mkdirSync(d, { recursive: true });\n return d;\n}\n\nfunction libNodeModules(): string {\n return join(libDir(), \"node_modules\");\n}\n\n/** Check if a package is installed in ~/.abtars-releases/deps/ */\nexport function isInstalled(pkg: string): boolean {\n return existsSync(join(libNodeModules(), pkg));\n}\n\n/** Install packages into ~/.abtars-releases/deps/ */\nexport function installPackages(packages: readonly string[]): void {\n const { execSync } = require(\"node:child_process\");\n const dir = libDir();\n execSync(`npm install --prefix \"${dir}\" ${packages.join(\" \")} --no-audit --no-fund`, { stdio: \"pipe\" });\n}\n\n/**\n * Lazy import \u2014 tries normal import, falls back to ~/.abtars/lib/, auto-installs if missing.\n */\nexport async function lazyRequire<T = any>(pkg: string, label?: string): Promise<T> {\n // Try normal resolution first (globally installed or in bundle)\n try { return await import(pkg); } catch { /* not found normally */ }\n\n // Try from ~/.abtars/lib/\n const libNm = libNodeModules();\n const pkgPath = join(libNm, pkg);\n if (existsSync(pkgPath)) {\n try { return await import(pkgPath); } catch { /* broken install */ }\n }\n\n // Auto-install\n logInfo(TAG, `Installing ${label ?? pkg}...`);\n try {\n installPackages([pkg]);\n return await import(join(libNm, pkg));\n } catch (err) {\n logWarn(TAG, `Failed to install ${pkg}: ${err instanceof Error ? err.message : String(err)}`);\n throw new Error(`Optional dependency \"${pkg}\" not available. Install with: abtars deps install ${label ?? pkg}`);\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;AAOA;AAHA,SAAS,YAAY,iBAAiB;AACtC,SAAS,YAAY;AACrB,SAAS,eAAe;AAIxB,IAAM,MAAM;AAQL,IAAM,gBAA6C;AAAA,EACxD,SAAS,EAAE,UAAU,CAAC,cAAc,GAAG,OAAO,kCAAkC;AAAA,EAChF,SAAS,EAAE,UAAU,CAAC,aAAa,GAAG,OAAO,wBAAwB;AAAA,EACrE,KAAK,EAAE,UAAU,CAAC,WAAW,GAAG,OAAO,cAAc;AAAA,EACrD,SAAS,EAAE,UAAU,CAAC,oBAAoB,GAAG,OAAO,sBAAsB;AAAA,EAC1E,OAAO,EAAE,UAAU,CAAC,MAAM,GAAG,OAAO,mBAAmB;AACzD;AASO,IAAM,cAAyC;AAAA,EACpD,OAAY,EAAE,KAAK,SAAc,OAAO,4BAA4B,aAAa,0BAA0B,UAAU,QAAQ;AAAA,EAC7H,YAAY,EAAE,KAAK,cAAc,OAAO,qBAA4B,aAAa,4BAA4B;AAAA,EAC7G,QAAY,EAAE,KAAK,UAAc,OAAO,oBAA4B,aAAa,+CAA+C;AAClI;AAEA,SAAS,SAAiB;AACxB,QAAM,IAAI,KAAK,QAAQ,GAAG,UAAU,KAAK;AACzC,YAAU,GAAG,EAAE,WAAW,KAAK,CAAC;AAChC,SAAO;AACT;AAEA,SAAS,iBAAyB;AAChC,SAAO,KAAK,OAAO,GAAG,cAAc;AACtC;AAGO,SAAS,YAAY,KAAsB;AAChD,SAAO,WAAW,KAAK,eAAe,GAAG,GAAG,CAAC;AAC/C;AAGO,SAAS,gBAAgB,UAAmC;AACjE,QAAM,EAAE,SAAS,IAAI,UAAQ,oBAAoB;AACjD,QAAM,MAAM,OAAO;AACnB,WAAS,yBAAyB,GAAG,KAAK,SAAS,KAAK,GAAG,CAAC,yBAAyB,EAAE,OAAO,OAAO,CAAC;AACxG;AAKA,eAAsB,YAAqB,KAAa,OAA4B;AAElF,MAAI;AAAE,WAAO,MAAM,OAAO;AAAA,EAAM,QAAQ;AAAA,EAA2B;AAGnE,QAAM,QAAQ,eAAe;AAC7B,QAAM,UAAU,KAAK,OAAO,GAAG;AAC/B,MAAI,WAAW,OAAO,GAAG;AACvB,QAAI;AAAE,aAAO,MAAM,OAAO;AAAA,IAAU,QAAQ;AAAA,IAAuB;AAAA,EACrE;AAGA,UAAQ,KAAK,cAAc,SAAS,GAAG,KAAK;AAC5C,MAAI;AACF,oBAAgB,CAAC,GAAG,CAAC;AACrB,WAAO,MAAM,OAAO,KAAK,OAAO,GAAG;AAAA,EACrC,SAAS,KAAK;AACZ,YAAQ,KAAK,qBAAqB,GAAG,KAAK,eAAe,QAAQ,IAAI,UAAU,OAAO,GAAG,CAAC,EAAE;AAC5F,UAAM,IAAI,MAAM,wBAAwB,GAAG,sDAAsD,SAAS,GAAG,EAAE;AAAA,EACjH;AACF;",
6
- "names": []
7
- }
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env node
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
-
4
- // src/utils/abmind-lazy.ts
5
- var _mod = null;
6
- var _loaded = false;
7
- function resetAbmindCache() {
8
- _mod = null;
9
- _loaded = false;
10
- }
11
- async function loadAbmind() {
12
- if (_loaded) return _mod;
13
- try {
14
- _mod = await import("abmind");
15
- } catch {
16
- _mod = null;
17
- }
18
- _loaded = true;
19
- return _mod;
20
- }
21
- function abmind() {
22
- return _mod;
23
- }
24
-
25
- export {
26
- resetAbmindCache,
27
- loadAbmind,
28
- abmind
29
- };
30
- //# sourceMappingURL=chunk-JAJ3DUQ2.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/utils/abmind-lazy.ts"],
4
- "sourcesContent": ["/**\n * Lazy abmind loader \u2014 pre-loaded once at boot, then available synchronously.\n * ALL runtime access to abmind goes through here.\n * If abmind is not installed, abmind() returns null.\n */\n\ntype AbmindModule = typeof import(\"abmind\");\n\nlet _mod: AbmindModule | null = null;\nlet _loaded = false;\n\n/** Reset cache \u2014 called on in-process restart. */\nexport function resetAbmindCache(): void {\n _mod = null;\n _loaded = false;\n}\n\n/** Call once at boot (phase-memory). Caches the module. */\nexport async function loadAbmind(): Promise<AbmindModule | null> {\n if (_loaded) return _mod;\n try {\n _mod = await import(\"abmind\");\n } catch {\n _mod = null;\n }\n _loaded = true;\n return _mod;\n}\n\n/** Synchronous access after loadAbmind() has been called. Returns null if unavailable. */\nexport function abmind(): AbmindModule | null {\n return _mod;\n}\n"],
5
- "mappings": ";;;;AAQA,IAAI,OAA4B;AAChC,IAAI,UAAU;AAGP,SAAS,mBAAyB;AACvC,SAAO;AACP,YAAU;AACZ;AAGA,eAAsB,aAA2C;AAC/D,MAAI,QAAS,QAAO;AACpB,MAAI;AACF,WAAO,MAAM,OAAO,QAAQ;AAAA,EAC9B,QAAQ;AACN,WAAO;AAAA,EACT;AACA,YAAU;AACV,SAAO;AACT;AAGO,SAAS,SAA8B;AAC5C,SAAO;AACT;",
6
- "names": []
7
- }
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env node
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
-
4
- // src/cli/update-sources/registry-client.ts
5
- import { writeFileSync } from "node:fs";
6
- var REGISTRY = "https://registry.npmjs.org";
7
- var METADATA_TIMEOUT_MS = 3e4;
8
- var TARBALL_TIMEOUT_MS = 12e4;
9
- async function resolveVersion(packageName, tag) {
10
- const controller = new AbortController();
11
- const timer = setTimeout(() => controller.abort(), METADATA_TIMEOUT_MS);
12
- try {
13
- const res = await fetch(`${REGISTRY}/${packageName}`, {
14
- headers: { Accept: "application/vnd.npm.install-v1+json" },
15
- signal: controller.signal
16
- });
17
- if (!res.ok) throw new Error(`Registry returned ${res.status} for ${packageName}`);
18
- const data = await res.json();
19
- const version = data["dist-tags"]?.[tag];
20
- if (!version) throw new Error(`No dist-tag '${tag}' for ${packageName}`);
21
- const tarballUrl = data.versions?.[version]?.dist?.tarball;
22
- if (!tarballUrl) throw new Error(`No tarball URL for ${packageName}@${version}`);
23
- return { version, tarballUrl };
24
- } finally {
25
- clearTimeout(timer);
26
- }
27
- }
28
- async function downloadTarball(url, destPath) {
29
- const controller = new AbortController();
30
- const timer = setTimeout(() => controller.abort(), TARBALL_TIMEOUT_MS);
31
- try {
32
- const res = await fetch(url, { signal: controller.signal });
33
- if (!res.ok) throw new Error(`Tarball download failed: ${res.status} ${url}`);
34
- const buf = Buffer.from(await res.arrayBuffer());
35
- writeFileSync(destPath, buf);
36
- } finally {
37
- clearTimeout(timer);
38
- }
39
- }
40
-
41
- export {
42
- resolveVersion,
43
- downloadTarball
44
- };
45
- //# sourceMappingURL=chunk-KMFR5AVY.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/cli/update-sources/registry-client.ts"],
4
- "sourcesContent": ["/**\n * registry-client.ts \u2014 Direct npm registry HTTP fetch (#1176).\n * No npm/pnpm CLI dependency. Pure fetch() + tar.\n */\nimport { writeFileSync } from \"node:fs\";\n\nconst REGISTRY = \"https://registry.npmjs.org\";\nconst METADATA_TIMEOUT_MS = 30_000;\nconst TARBALL_TIMEOUT_MS = 120_000;\n\nexport interface ResolvedVersion {\n version: string;\n tarballUrl: string;\n}\n\n/** Resolve a dist-tag (alpha, latest) to a concrete version + tarball URL. */\nexport async function resolveVersion(packageName: string, tag: string): Promise<ResolvedVersion> {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), METADATA_TIMEOUT_MS);\n try {\n const res = await fetch(`${REGISTRY}/${packageName}`, {\n headers: { Accept: \"application/vnd.npm.install-v1+json\" },\n signal: controller.signal,\n });\n if (!res.ok) throw new Error(`Registry returned ${res.status} for ${packageName}`);\n const data = await res.json() as { \"dist-tags\"?: Record<string, string>; versions?: Record<string, { dist?: { tarball?: string } }> };\n const version = data[\"dist-tags\"]?.[tag];\n if (!version) throw new Error(`No dist-tag '${tag}' for ${packageName}`);\n const tarballUrl = data.versions?.[version]?.dist?.tarball;\n if (!tarballUrl) throw new Error(`No tarball URL for ${packageName}@${version}`);\n return { version, tarballUrl };\n } finally {\n clearTimeout(timer);\n }\n}\n\n/** Download a tarball to a local file path. */\nexport async function downloadTarball(url: string, destPath: string): Promise<void> {\n const controller = new AbortController();\n const timer = setTimeout(() => controller.abort(), TARBALL_TIMEOUT_MS);\n try {\n const res = await fetch(url, { signal: controller.signal });\n if (!res.ok) throw new Error(`Tarball download failed: ${res.status} ${url}`);\n const buf = Buffer.from(await res.arrayBuffer());\n writeFileSync(destPath, buf);\n } finally {\n clearTimeout(timer);\n }\n}\n"],
5
- "mappings": ";;;;AAIA,SAAS,qBAAqB;AAE9B,IAAM,WAAW;AACjB,IAAM,sBAAsB;AAC5B,IAAM,qBAAqB;AAQ3B,eAAsB,eAAe,aAAqB,KAAuC;AAC/F,QAAM,aAAa,IAAI,gBAAgB;AACvC,QAAM,QAAQ,WAAW,MAAM,WAAW,MAAM,GAAG,mBAAmB;AACtE,MAAI;AACF,UAAM,MAAM,MAAM,MAAM,GAAG,QAAQ,IAAI,WAAW,IAAI;AAAA,MACpD,SAAS,EAAE,QAAQ,sCAAsC;AAAA,MACzD,QAAQ,WAAW;AAAA,IACrB,CAAC;AACD,QAAI,CAAC,IAAI,GAAI,OA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