abtars 0.1.0-alpha.2 → 0.1.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/bundle/_registry.generated-KQODGKTQ.js +36 -0
- package/bundle/{_registry.generated-M4WY2MMI.js.map → _registry.generated-KQODGKTQ.js.map} +1 -1
- package/bundle/abtars-browser.js +8 -7
- package/bundle/abtars-browser.js.map +1 -1
- package/bundle/abtars-cli.js +646 -73
- package/bundle/abtars-cli.js.map +4 -4
- package/bundle/abtars-restart.js +7 -6
- package/bundle/abtars-rss.js +2 -1
- package/bundle/abtars-rss.js.map +1 -1
- package/bundle/abtars-task.js +9 -8
- package/bundle/abtars-task.js.map +1 -1
- package/bundle/abtars.js +103 -96
- package/bundle/abtars.js.map +2 -2
- package/bundle/{agent-api-rate-limit-OQNFMXTZ.js → agent-api-rate-limit-7R5TX2F2.js} +7 -6
- package/bundle/{agent-api-rate-limit-OQNFMXTZ.js.map → agent-api-rate-limit-7R5TX2F2.js.map} +1 -1
- package/bundle/agent-registry-5M77ZOMV.js +19 -0
- package/bundle/agent-registry-VJMNIQ5W.js +19 -0
- package/bundle/{anthropic-adapter-2APTH3LA.js → anthropic-adapter-IBY3NPXW.js} +4 -3
- package/bundle/{anthropic-adapter-2APTH3LA.js.map → anthropic-adapter-IBY3NPXW.js.map} +1 -1
- package/bundle/{bridge-lock-transport-4AC2G5G6.js → bridge-lock-transport-HO545SBK.js} +9 -8
- package/bundle/browse-delivery-64GQIUHG.js +18 -0
- package/bundle/browser-EXR5OQGK.js +19 -0
- package/bundle/capability-HIE7UGFU.js +18 -0
- package/bundle/{chunk-BUUVFUPO.js → chunk-2BY6I4P5.js} +5 -4
- package/bundle/{chunk-BUUVFUPO.js.map → chunk-2BY6I4P5.js.map} +1 -1
- package/bundle/{chunk-Y6XAEX2Q.js → chunk-2F6XKG7Y.js} +15 -9
- package/bundle/chunk-2F6XKG7Y.js.map +7 -0
- package/bundle/{chunk-V76TVMCM.js → chunk-3MO2MDXJ.js} +5 -4
- package/bundle/{chunk-V76TVMCM.js.map → chunk-3MO2MDXJ.js.map} +1 -1
- package/bundle/{chunk-6UCRKRWR.js → chunk-6XX4OAAM.js} +22 -21
- package/bundle/chunk-6XX4OAAM.js.map +7 -0
- package/bundle/{chunk-XREWVCUO.js → chunk-7CHLS36W.js} +16 -148
- package/bundle/chunk-7CHLS36W.js.map +7 -0
- package/bundle/{chunk-NWDBD4PA.js → chunk-7K2YZTLD.js} +3 -2
- package/bundle/{chunk-JCJS4ZIB.js → chunk-AQVOAQQI.js} +5 -4
- package/bundle/{chunk-JCJS4ZIB.js.map → chunk-AQVOAQQI.js.map} +1 -1
- package/bundle/chunk-AUQD2PKM.js +136 -0
- package/bundle/chunk-AUQD2PKM.js.map +7 -0
- package/bundle/{chunk-YOCTDKKL.js → chunk-BYDUMHXT.js} +4 -3
- package/bundle/{chunk-YOCTDKKL.js.map → chunk-BYDUMHXT.js.map} +1 -1
- package/bundle/{chunk-RVE2N7FA.js → chunk-CELR236Q.js} +5 -4
- package/bundle/{chunk-RVE2N7FA.js.map → chunk-CELR236Q.js.map} +1 -1
- package/bundle/{chunk-2XU2X4OI.js → chunk-CUQA2AJT.js} +3 -2
- package/bundle/{chunk-2XU2X4OI.js.map → chunk-CUQA2AJT.js.map} +1 -1
- package/bundle/chunk-DMPR5MYT.js +183 -0
- package/bundle/chunk-DMPR5MYT.js.map +7 -0
- package/bundle/{chunk-BHMZ4RCC.js → chunk-DY3R7LDW.js} +55 -54
- package/bundle/{chunk-BHMZ4RCC.js.map → chunk-DY3R7LDW.js.map} +1 -1
- package/bundle/{chunk-AR6GO6YC.js → chunk-ELRAH7VL.js} +5 -4
- package/bundle/{chunk-AR6GO6YC.js.map → chunk-ELRAH7VL.js.map} +1 -1
- package/bundle/{chunk-FMWKEPM7.js → chunk-EX2SRTUE.js} +5 -4
- package/bundle/{chunk-FMWKEPM7.js.map → chunk-EX2SRTUE.js.map} +1 -1
- package/bundle/{chunk-JW6RU47G.js → chunk-FVQGP5YO.js} +8 -7
- package/bundle/{chunk-JW6RU47G.js.map → chunk-FVQGP5YO.js.map} +1 -1
- package/bundle/{chunk-GRNENTPA.js → chunk-G6IXMYIO.js} +4 -3
- package/bundle/{chunk-GRNENTPA.js.map → chunk-G6IXMYIO.js.map} +1 -1
- package/bundle/{chunk-6NR3OHEW.js → chunk-H2RZ4NEJ.js} +6 -5
- package/bundle/{chunk-6NR3OHEW.js.map → chunk-H2RZ4NEJ.js.map} +1 -1
- package/bundle/chunk-HVKJN3AG.js +189 -0
- package/bundle/chunk-HVKJN3AG.js.map +7 -0
- package/bundle/{chunk-265TPOPC.js → chunk-HXJRZWKA.js} +3 -2
- package/bundle/{chunk-265TPOPC.js.map → chunk-HXJRZWKA.js.map} +1 -1
- package/bundle/chunk-IU3RI5E4.js +645 -0
- package/bundle/chunk-IU3RI5E4.js.map +7 -0
- package/bundle/{chunk-GST5T3WZ.js → chunk-J5YIMCLT.js} +6 -5
- package/bundle/{chunk-GST5T3WZ.js.map → chunk-J5YIMCLT.js.map} +1 -1
- package/bundle/chunk-JAJ3DUQ2.js +30 -0
- package/bundle/{chunk-OP7BTAWY.js.map → chunk-JAJ3DUQ2.js.map} +1 -1
- package/bundle/chunk-JHF25OOG.js +645 -0
- package/bundle/chunk-JHF25OOG.js.map +7 -0
- package/bundle/{chunk-MPX525QO.js → chunk-JRG4EFMP.js} +5 -4
- package/bundle/{chunk-MPX525QO.js.map → chunk-JRG4EFMP.js.map} +1 -1
- package/bundle/{chunk-VVEDVGCR.js → chunk-JU3UBWLN.js} +17 -16
- package/bundle/{chunk-VVEDVGCR.js.map → chunk-JU3UBWLN.js.map} +1 -1
- package/bundle/{chunk-QBGBT5QS.js → chunk-JX3ZZU3O.js} +5 -4
- package/bundle/{chunk-QBGBT5QS.js.map → chunk-JX3ZZU3O.js.map} +1 -1
- package/bundle/{chunk-6SETMHNN.js → chunk-K7P74UNQ.js} +8 -7
- package/bundle/{chunk-6SETMHNN.js.map → chunk-K7P74UNQ.js.map} +1 -1
- package/bundle/{chunk-AZJIODTQ.js → chunk-KED3G7HS.js} +6 -5
- package/bundle/{chunk-AZJIODTQ.js.map → chunk-KED3G7HS.js.map} +1 -1
- package/bundle/chunk-KI2ROWAH.js +3707 -0
- package/bundle/chunk-KI2ROWAH.js.map +7 -0
- package/bundle/{chunk-UHRP745J.js → chunk-L7YHV5DL.js} +6 -5
- package/bundle/{chunk-UHRP745J.js.map → chunk-L7YHV5DL.js.map} +1 -1
- package/bundle/{chunk-BSSBCSCL.js → chunk-LD5BMLHG.js} +11 -10
- package/bundle/{chunk-BSSBCSCL.js.map → chunk-LD5BMLHG.js.map} +1 -1
- package/bundle/{chunk-2UPU3OW6.js → chunk-LYEAHE5V.js} +5 -4
- package/bundle/{chunk-2UPU3OW6.js.map → chunk-LYEAHE5V.js.map} +1 -1
- package/bundle/{chunk-3B7BBE4F.js → chunk-MCGEXAG5.js} +8 -7
- package/bundle/{chunk-3B7BBE4F.js.map → chunk-MCGEXAG5.js.map} +1 -1
- package/bundle/{chunk-X76UX47U.js → chunk-MJ6PHMOK.js} +4 -3
- package/bundle/{chunk-X76UX47U.js.map → chunk-MJ6PHMOK.js.map} +1 -1
- package/bundle/{chunk-LSPKJQCI.js → chunk-MV6CJFWR.js} +3 -2
- package/bundle/{chunk-LSPKJQCI.js.map → chunk-MV6CJFWR.js.map} +1 -1
- package/bundle/chunk-MZWMYN4O.js +17 -0
- package/bundle/{chunk-M6VBAPNT.js.map → chunk-MZWMYN4O.js.map} +1 -1
- package/bundle/{chunk-HX7Y7EYP.js → chunk-NIRYBWUW.js} +4 -3
- package/bundle/{chunk-HX7Y7EYP.js.map → chunk-NIRYBWUW.js.map} +1 -1
- package/bundle/{chunk-3E545J66.js → chunk-OW64RUE5.js} +3 -2
- package/bundle/{chunk-3E545J66.js.map → chunk-OW64RUE5.js.map} +1 -1
- package/bundle/chunk-P56PLAIC.js +126 -0
- package/bundle/chunk-P56PLAIC.js.map +7 -0
- package/bundle/{chunk-TZHIDLDS.js → chunk-P6PN34XD.js} +5 -4
- package/bundle/{chunk-TZHIDLDS.js.map → chunk-P6PN34XD.js.map} +1 -1
- package/bundle/{chunk-2UENBO6M.js → chunk-PF5UQ64X.js} +9 -8
- package/bundle/{chunk-2UENBO6M.js.map → chunk-PF5UQ64X.js.map} +1 -1
- package/bundle/{chunk-6CPN4IGS.js → chunk-PQ62LZNA.js} +9 -8
- package/bundle/{chunk-6CPN4IGS.js.map → chunk-PQ62LZNA.js.map} +1 -1
- package/bundle/{chunk-UCQ2WC3B.js → chunk-PQW5QBPY.js} +15 -8
- package/bundle/chunk-PQW5QBPY.js.map +7 -0
- package/bundle/{chunk-D2DCBO6M.js → chunk-R36WIOYX.js} +3 -2
- package/bundle/{chunk-D2DCBO6M.js.map → chunk-R36WIOYX.js.map} +1 -1
- package/bundle/chunk-RB3X66KM.js +386 -0
- package/bundle/chunk-RB3X66KM.js.map +7 -0
- package/bundle/{chunk-GUQVJC3U.js → chunk-RE3F3CFW.js} +7 -6
- package/bundle/{chunk-GUQVJC3U.js.map → chunk-RE3F3CFW.js.map} +1 -1
- package/bundle/chunk-RWUINZUQ.js +19 -0
- package/bundle/chunk-RWUINZUQ.js.map +7 -0
- package/bundle/{chunk-NT3OBORC.js → chunk-S54DBUZ4.js} +10 -9
- package/bundle/{chunk-NT3OBORC.js.map → chunk-S54DBUZ4.js.map} +1 -1
- package/bundle/{chunk-CWOHNFUV.js → chunk-SY67HM2Y.js} +3 -2
- package/bundle/{chunk-CWOHNFUV.js.map → chunk-SY67HM2Y.js.map} +1 -1
- package/bundle/{chunk-BQ2L4GMG.js → chunk-TBLYGCPQ.js} +4 -3
- package/bundle/{chunk-BQ2L4GMG.js.map → chunk-TBLYGCPQ.js.map} +1 -1
- package/bundle/chunk-TCBMBX3Z.js +183 -0
- package/bundle/chunk-TCBMBX3Z.js.map +7 -0
- package/bundle/chunk-TXRWQIQQ.js +3707 -0
- package/bundle/chunk-TXRWQIQQ.js.map +7 -0
- package/bundle/chunk-U34CSHFS.js +645 -0
- package/bundle/chunk-U34CSHFS.js.map +7 -0
- package/bundle/{chunk-CEVRHKJY.js → chunk-UDZIZB5F.js} +6 -5
- package/bundle/{chunk-CEVRHKJY.js.map → chunk-UDZIZB5F.js.map} +1 -1
- package/bundle/{chunk-W6FAL35D.js → chunk-VA5WKN3Z.js} +7 -6
- package/bundle/{chunk-W6FAL35D.js.map → chunk-VA5WKN3Z.js.map} +1 -1
- package/bundle/{chunk-X6TERNVJ.js → chunk-WX7GHGFX.js} +10 -9
- package/bundle/{chunk-X6TERNVJ.js.map → chunk-WX7GHGFX.js.map} +1 -1
- package/bundle/{chunk-PNEDC45Y.js → chunk-XETTJVEU.js} +4 -3
- package/bundle/{chunk-PNEDC45Y.js.map → chunk-XETTJVEU.js.map} +1 -1
- package/bundle/{chunk-PLCY3GFH.js → chunk-XLLSPBBT.js} +5 -4
- package/bundle/{chunk-PLCY3GFH.js.map → chunk-XLLSPBBT.js.map} +1 -1
- package/bundle/{chunk-ZXPXCDA6.js → chunk-XOCP5BMO.js} +6 -5
- package/bundle/{chunk-ZXPXCDA6.js.map → chunk-XOCP5BMO.js.map} +1 -1
- package/bundle/chunk-ZEY6YZAB.js +138 -0
- package/bundle/chunk-ZEY6YZAB.js.map +7 -0
- package/bundle/{chunk-MW6WDLU7.js → chunk-ZZR3JZHR.js} +10 -9
- package/bundle/{chunk-MW6WDLU7.js.map → chunk-ZZR3JZHR.js.map} +1 -1
- package/bundle/commands-AIL4XOIZ.js +33 -0
- package/bundle/commands-K77NVSXZ.js +32 -0
- package/bundle/commands-V6RSVC4Y.js +32 -0
- package/bundle/completion-buffer-S3LXDZG2.js +14 -0
- package/bundle/config-C6VHRJQ7.js +20 -0
- package/bundle/{config-show-ERTATR6E.js → config-show-ZTXX27FW.js} +4 -3
- package/bundle/{config-show-ERTATR6E.js.map → config-show-ZTXX27FW.js.map} +1 -1
- package/bundle/{context-HCEGZNDC.js → context-OCS7HLJP.js} +5 -4
- package/bundle/{context-HCEGZNDC.js.map → context-OCS7HLJP.js.map} +1 -1
- package/bundle/daemon-NPKYZ3CJ.js +292 -0
- package/bundle/daemon-NPKYZ3CJ.js.map +7 -0
- package/bundle/delegation-tools-PF7RD2RW.js +28 -0
- package/bundle/{deploy-lib-import-32ZFKHWP.js → deploy-lib-import-ODLDL2DB.js} +5 -4
- package/bundle/digital-signature-PNY4TR2W.js +14 -0
- package/bundle/{direct-api-transport-YR7SXXNN.js → direct-api-transport-EADHM67Z.js} +21 -20
- package/bundle/{direct-api-transport-YR7SXXNN.js.map → direct-api-transport-EADHM67Z.js.map} +1 -1
- package/bundle/direct-api-transport-SLJ2Z6NX.js +861 -0
- package/bundle/direct-api-transport-SLJ2Z6NX.js.map +7 -0
- package/bundle/{discord-adapter-YYWVMPPU.js → discord-adapter-FBJOJSTW.js} +25 -24
- package/bundle/{discord-adapter-YYWVMPPU.js.map → discord-adapter-FBJOJSTW.js.map} +1 -1
- package/bundle/discord-adapter-IJISVHUE.js +585 -0
- package/bundle/discord-adapter-IJISVHUE.js.map +7 -0
- package/bundle/discord-adapter-UYOCKRDF.js +586 -0
- package/bundle/discord-adapter-UYOCKRDF.js.map +7 -0
- package/bundle/{dist-MTMKARCP.js → dist-J3T4XVKX.js} +4 -3
- package/bundle/{dist-MTMKARCP.js.map → dist-J3T4XVKX.js.map} +1 -1
- package/bundle/{dns-wakeup-27M7D2MR.js → dns-wakeup-RYOCQ6GR.js} +6 -5
- package/bundle/{dns-wakeup-27M7D2MR.js.map → dns-wakeup-RYOCQ6GR.js.map} +1 -1
- package/bundle/{doctor-QNUSDY73.js → doctor-R54GZPKL.js} +10 -9
- package/bundle/{doctor-QNUSDY73.js.map → doctor-R54GZPKL.js.map} +1 -1
- package/bundle/{ensure-invariants-NMXNS476.js → ensure-invariants-K2ZUZ6NR.js} +7 -6
- package/bundle/{ensure-invariants-NMXNS476.js.map → ensure-invariants-K2ZUZ6NR.js.map} +1 -1
- package/bundle/ensure-invariants-KUXIW73S.js +50 -0
- package/bundle/ensure-invariants-KUXIW73S.js.map +7 -0
- package/bundle/env-schema-DGD6QWPA.js +20 -0
- package/bundle/{esm-DDP6NCZG.js → esm-PFOJARXA.js} +5 -4
- package/bundle/{esm-DDP6NCZG.js.map → esm-PFOJARXA.js.map} +1 -1
- package/bundle/{fallback-policy-L4QV2PEJ.js → fallback-policy-SR6ED5I3.js} +4 -3
- package/bundle/{fallback-policy-L4QV2PEJ.js.map → fallback-policy-SR6ED5I3.js.map} +1 -1
- package/bundle/{health-check-SPA7NT6N.js → health-check-RJ2SUJYL.js} +4 -3
- package/bundle/{health-check-SPA7NT6N.js.map → health-check-RJ2SUJYL.js.map} +1 -1
- package/bundle/hook-system-POI5VRIX.js +18 -0
- package/bundle/hotskills-6ECHLXTJ.js +13 -0
- package/bundle/install-24XR5FO5.js +13 -0
- package/bundle/install-AJ7VW76P.js +13 -0
- package/bundle/{install-log-IAPHYKD4.js → install-log-Q6RUHKWC.js} +4 -3
- package/bundle/{install-log-IAPHYKD4.js.map → install-log-Q6RUHKWC.js.map} +1 -1
- package/bundle/{install-manifest-SPQRUNXL.js → install-manifest-MCJCAYSR.js} +9 -7
- package/bundle/install-manifest-MCJCAYSR.js.map +7 -0
- package/bundle/install-manifest-ZETY4AFS.js +104 -0
- package/bundle/install-manifest-ZETY4AFS.js.map +7 -0
- package/bundle/{install-validate-PVLZXYLQ.js → install-validate-H74LUCE2.js} +4 -3
- package/bundle/{install-validate-PVLZXYLQ.js.map → install-validate-H74LUCE2.js.map} +1 -1
- package/bundle/{irc-adapter-OI5UZSQF.js → irc-adapter-RKRUSZXB.js} +7 -6
- package/bundle/{irc-adapter-OI5UZSQF.js.map → irc-adapter-RKRUSZXB.js.map} +1 -1
- package/bundle/{irc-config-55YO6EGB.js → irc-config-6VY67UPQ.js} +8 -7
- package/bundle/{irc-config-55YO6EGB.js.map → irc-config-6VY67UPQ.js.map} +1 -1
- package/bundle/{logs-ZNYXX5PA.js → logs-EK4HYRKR.js} +4 -3
- package/bundle/{logs-ZNYXX5PA.js.map → logs-EK4HYRKR.js.map} +1 -1
- package/bundle/{media-utils-XNNDTYFI.js → media-utils-QBY5WBF3.js} +8 -7
- package/bundle/{media-utils-XNNDTYFI.js.map → media-utils-QBY5WBF3.js.map} +1 -1
- package/bundle/message-pipeline-ANSMPK5O.js +34 -0
- package/bundle/message-pipeline-HXZMRGXZ.js +34 -0
- package/bundle/message-pipeline-XUUTGPFH.js +35 -0
- package/bundle/meta.json +1828 -1650
- package/bundle/model-health-registry-7ECZFCW4.js +12 -0
- package/bundle/model-health-registry-LDC76RPP.js +12 -0
- package/bundle/notification-OJ4YE4VG.js +14 -0
- package/bundle/{openrouter-credits-EDY7ETAU.js → openrouter-credits-L45SYKT3.js} +7 -6
- package/bundle/{openrouter-credits-EDY7ETAU.js.map → openrouter-credits-L45SYKT3.js.map} +1 -1
- package/bundle/{passwd-RRFV4CC5.js → passwd-QSHZJ2CG.js} +4 -3
- package/bundle/{passwd-RRFV4CC5.js.map → passwd-QSHZJ2CG.js.map} +1 -1
- package/bundle/paths-ZJYIDND2.js +18 -0
- package/bundle/{peer-client-52XYMNI7.js → peer-client-T44VI7NB.js} +13 -12
- package/bundle/{peer-client-52XYMNI7.js.map → peer-client-T44VI7NB.js.map} +1 -1
- package/bundle/peer-config-D5A4454H.js +17 -0
- package/bundle/{peer-sessions-EAXTNQ36.js → peer-sessions-MY2YVXHC.js} +4 -3
- package/bundle/{peer-sessions-EAXTNQ36.js.map → peer-sessions-MY2YVXHC.js.map} +1 -1
- package/bundle/{pending-callback-RIMQZ7FJ.js → pending-callback-6KLBSHLX.js} +4 -3
- package/bundle/{pending-callback-RIMQZ7FJ.js.map → pending-callback-6KLBSHLX.js.map} +1 -1
- package/bundle/phase-transport-43NP5XBK.js +23 -0
- package/bundle/phase-transport-GNUZI6EW.js +23 -0
- package/bundle/phase-transport-Q7K6V3VZ.js +23 -0
- package/bundle/phase-transport-SLJXIAY5.js +23 -0
- package/bundle/{responses-adapter-AAQTY3K4.js → responses-adapter-DAV2JUL7.js} +4 -3
- package/bundle/{responses-adapter-AAQTY3K4.js.map → responses-adapter-DAV2JUL7.js.map} +1 -1
- package/bundle/{restore-ZE3SEPSS.js → restore-ROJF22R2.js} +5 -4
- package/bundle/{restore-ZE3SEPSS.js.map → restore-ROJF22R2.js.map} +1 -1
- package/bundle/{self-healer-utils-DMUUXC47.js → self-healer-utils-7NFH22VJ.js} +7 -6
- package/bundle/{self-healer-utils-DMUUXC47.js.map → self-healer-utils-7NFH22VJ.js.map} +1 -1
- package/bundle/skill-stats-IPVKMWN3.js +23 -0
- package/bundle/sleep-4NVWZHVN.js +20 -0
- package/bundle/soul-bundle-7EYTEKFE.js +15 -0
- package/bundle/soul-loader-7FN7WDHM.js +18 -0
- package/bundle/soul-loader-K237NP4T.js +17 -0
- package/bundle/soul-loader-K237NP4T.js.map +7 -0
- package/bundle/soul-loader-UVJ6HZM3.js +17 -0
- package/bundle/soul-loader-UVJ6HZM3.js.map +7 -0
- package/bundle/src-Z3WR7SRT.js +9 -0
- package/bundle/src-Z3WR7SRT.js.map +7 -0
- package/bundle/{sse-parser-anthropic-P7CE2MH2.js → sse-parser-anthropic-H42TTLBD.js} +7 -6
- package/bundle/{sse-parser-anthropic-P7CE2MH2.js.map → sse-parser-anthropic-H42TTLBD.js.map} +1 -1
- package/bundle/{sse-parser-responses-EQQA5FWN.js → sse-parser-responses-WG2LY2ML.js} +7 -6
- package/bundle/{sse-parser-responses-EQQA5FWN.js.map → sse-parser-responses-WG2LY2ML.js.map} +1 -1
- package/bundle/{ssrf-guard-FZCBYIVW.js → ssrf-guard-E2KBBC5E.js} +7 -6
- package/bundle/{ssrf-guard-FZCBYIVW.js.map → ssrf-guard-E2KBBC5E.js.map} +1 -1
- package/bundle/{start-FH3GRMJ4.js → start-4IWBKLWO.js} +4 -3
- package/bundle/{start-FH3GRMJ4.js.map → start-4IWBKLWO.js.map} +1 -1
- package/bundle/{stream-single-WSG4D53C.js → stream-single-RFJNUTL6.js} +4 -3
- package/bundle/{stream-single-WSG4D53C.js.map → stream-single-RFJNUTL6.js.map} +1 -1
- package/bundle/stt-CF3CPFDC.js +15 -0
- package/bundle/stt-CF3CPFDC.js.map +7 -0
- package/bundle/subagent-runtime-P7GCFBM3.js +13 -0
- package/bundle/subagent-runtime-P7GCFBM3.js.map +7 -0
- package/bundle/subagent-runtime-USNPO4WF.js +13 -0
- package/bundle/subagent-runtime-USNPO4WF.js.map +7 -0
- package/bundle/subagent-runtime-XS2ZXYOZ.js +13 -0
- package/bundle/subagent-runtime-XS2ZXYOZ.js.map +7 -0
- package/bundle/{system-message-T5R3EYYN.js → system-message-TALP6GP2.js} +6 -5
- package/bundle/{system-message-T5R3EYYN.js.map → system-message-TALP6GP2.js.map} +1 -1
- package/bundle/{system-status-KQ6KHFJ6.js → system-status-2CR5OUDY.js} +10 -9
- package/bundle/{system-status-KQ6KHFJ6.js.map → system-status-2CR5OUDY.js.map} +1 -1
- package/bundle/task-store-KIBFZL5A.js +23 -0
- package/bundle/task-store-KIBFZL5A.js.map +7 -0
- package/bundle/{telegram-adapter-2V3XUMT5.js → telegram-adapter-ISQRW7PN.js} +34 -33
- package/bundle/{telegram-adapter-2V3XUMT5.js.map → telegram-adapter-ISQRW7PN.js.map} +1 -1
- package/bundle/telegram-adapter-QCD7AG5D.js +1062 -0
- package/bundle/telegram-adapter-QCD7AG5D.js.map +7 -0
- package/bundle/telegram-adapter-Y3PVA25S.js +1061 -0
- package/bundle/telegram-adapter-Y3PVA25S.js.map +7 -0
- package/bundle/telegram-adapter-YAXSK2RT.js +1062 -0
- package/bundle/telegram-adapter-YAXSK2RT.js.map +7 -0
- package/bundle/tool-registry-DFCCGZCB.js +39 -0
- package/bundle/tool-registry-DFCCGZCB.js.map +7 -0
- package/bundle/tool-sandbox-OZMXJZLQ.js +21 -0
- package/bundle/tool-sandbox-OZMXJZLQ.js.map +7 -0
- package/bundle/{transport-config-YLXU33RO.js → transport-config-ANPS2RYT.js} +11 -10
- package/bundle/transport-config-ANPS2RYT.js.map +7 -0
- package/bundle/update-check-O5MS6B3L.js +13 -0
- package/bundle/update-check-O5MS6B3L.js.map +7 -0
- package/bundle/usage-tracker-S4Z2G2K5.js +18 -0
- package/bundle/usage-tracker-S4Z2G2K5.js.map +7 -0
- package/bundle/user-registry-GTAJIW6E.js +17 -0
- package/bundle/user-registry-GTAJIW6E.js.map +7 -0
- package/config/.env +2 -0
- package/config/auto-fix.json +14 -0
- package/config/irc.json.example +30 -0
- package/config/models.json.example +229 -0
- package/config/peers.json.example +12 -0
- package/config/schemas/irc.schema.json +42 -0
- package/config/schemas/models.schema.json +17 -0
- package/config/schemas/peers.schema.json +35 -0
- package/config/schemas/transport.schema.json +35 -0
- package/config/schemas/users.schema.json +22 -0
- package/config/transport.default.json +30 -0
- package/config/transport.json.example +102 -0
- package/config/users.json.example +11 -0
- package/install-manifest.json +148 -0
- package/package.json +4 -2
- package/scripts/abtars-daemon.service +1 -0
- package/scripts/watchdog.sh +1 -1
- package/bundle/_registry.generated-M4WY2MMI.js +0 -35
- package/bundle/agent-registry-LT4JNQH6.js +0 -18
- package/bundle/browse-delivery-JXBY36GK.js +0 -17
- package/bundle/browser-ELNDVPLC.js +0 -18
- package/bundle/capability-CIL3G4FI.js +0 -17
- package/bundle/chunk-5R2ANXQ7.js +0 -510
- package/bundle/chunk-5R2ANXQ7.js.map +0 -7
- package/bundle/chunk-6UCRKRWR.js.map +0 -7
- package/bundle/chunk-M6VBAPNT.js +0 -16
- package/bundle/chunk-OP7BTAWY.js +0 -29
- package/bundle/chunk-UCQ2WC3B.js.map +0 -7
- package/bundle/chunk-XREWVCUO.js.map +0 -7
- package/bundle/chunk-Y6XAEX2Q.js.map +0 -7
- package/bundle/commands-BHVUOU3V.js +0 -31
- package/bundle/completion-buffer-P253ONKF.js +0 -13
- package/bundle/config-RGSDAPZN.js +0 -19
- package/bundle/delegation-tools-GYTS2D6A.js +0 -27
- package/bundle/digital-signature-OFCGSHWO.js +0 -13
- package/bundle/env-schema-2KBHBDGN.js +0 -19
- package/bundle/hook-system-6Q5YTR53.js +0 -17
- package/bundle/hotskills-K7BM4YLB.js +0 -12
- package/bundle/install-6HRZVKUM.js +0 -15
- package/bundle/install-manifest-SPQRUNXL.js.map +0 -7
- package/bundle/message-pipeline-LLH5SYMO.js +0 -33
- package/bundle/model-health-registry-35LQNVQR.js +0 -11
- package/bundle/notification-Y5S5MMLV.js +0 -13
- package/bundle/paths-G33RZWZ7.js +0 -17
- package/bundle/peer-config-VK6EDLN5.js +0 -16
- package/bundle/phase-transport-KYERDL2O.js +0 -22
- package/bundle/skill-stats-LLEXEXLR.js +0 -22
- package/bundle/sleep-OYIUOVQD.js +0 -19
- package/bundle/soul-loader-54WCVNLJ.js +0 -16
- package/bundle/src-JL4PVO23.js +0 -8
- package/bundle/stt-2UH3RITX.js +0 -14
- package/bundle/subagent-runtime-LE2ZXH3G.js +0 -12
- package/bundle/task-store-K7CQDEPI.js +0 -22
- package/bundle/tool-registry-MU3OX4UI.js +0 -38
- package/bundle/tool-sandbox-VYOK4ZOA.js +0 -20
- package/bundle/update-QCW5LXRN.js +0 -13
- package/bundle/update-check-27KZSAP6.js +0 -12
- package/bundle/usage-tracker-OVVEVMOY.js +0 -17
- package/bundle/user-registry-D4SD73UV.js +0 -16
- /package/bundle/{agent-registry-LT4JNQH6.js.map → agent-registry-5M77ZOMV.js.map} +0 -0
- /package/bundle/{bridge-lock-transport-4AC2G5G6.js.map → agent-registry-VJMNIQ5W.js.map} +0 -0
- /package/bundle/{browse-delivery-JXBY36GK.js.map → bridge-lock-transport-HO545SBK.js.map} +0 -0
- /package/bundle/{browser-ELNDVPLC.js.map → browse-delivery-64GQIUHG.js.map} +0 -0
- /package/bundle/{capability-CIL3G4FI.js.map → browser-EXR5OQGK.js.map} +0 -0
- /package/bundle/{chunk-NWDBD4PA.js.map → capability-HIE7UGFU.js.map} +0 -0
- /package/bundle/{commands-BHVUOU3V.js.map → chunk-7K2YZTLD.js.map} +0 -0
- /package/bundle/{completion-buffer-P253ONKF.js.map → commands-AIL4XOIZ.js.map} +0 -0
- /package/bundle/{config-RGSDAPZN.js.map → commands-K77NVSXZ.js.map} +0 -0
- /package/bundle/{delegation-tools-GYTS2D6A.js.map → commands-V6RSVC4Y.js.map} +0 -0
- /package/bundle/{deploy-lib-import-32ZFKHWP.js.map → completion-buffer-S3LXDZG2.js.map} +0 -0
- /package/bundle/{digital-signature-OFCGSHWO.js.map → config-C6VHRJQ7.js.map} +0 -0
- /package/bundle/{env-schema-2KBHBDGN.js.map → delegation-tools-PF7RD2RW.js.map} +0 -0
- /package/bundle/{hook-system-6Q5YTR53.js.map → deploy-lib-import-ODLDL2DB.js.map} +0 -0
- /package/bundle/{hotskills-K7BM4YLB.js.map → digital-signature-PNY4TR2W.js.map} +0 -0
- /package/bundle/{install-6HRZVKUM.js.map → env-schema-DGD6QWPA.js.map} +0 -0
- /package/bundle/{message-pipeline-LLH5SYMO.js.map → hook-system-POI5VRIX.js.map} +0 -0
- /package/bundle/{model-health-registry-35LQNVQR.js.map → hotskills-6ECHLXTJ.js.map} +0 -0
- /package/bundle/{notification-Y5S5MMLV.js.map → install-24XR5FO5.js.map} +0 -0
- /package/bundle/{paths-G33RZWZ7.js.map → install-AJ7VW76P.js.map} +0 -0
- /package/bundle/{peer-config-VK6EDLN5.js.map → message-pipeline-ANSMPK5O.js.map} +0 -0
- /package/bundle/{phase-transport-KYERDL2O.js.map → message-pipeline-HXZMRGXZ.js.map} +0 -0
- /package/bundle/{skill-stats-LLEXEXLR.js.map → message-pipeline-XUUTGPFH.js.map} +0 -0
- /package/bundle/{sleep-OYIUOVQD.js.map → model-health-registry-7ECZFCW4.js.map} +0 -0
- /package/bundle/{soul-loader-54WCVNLJ.js.map → model-health-registry-LDC76RPP.js.map} +0 -0
- /package/bundle/{src-JL4PVO23.js.map → notification-OJ4YE4VG.js.map} +0 -0
- /package/bundle/{stt-2UH3RITX.js.map → paths-ZJYIDND2.js.map} +0 -0
- /package/bundle/{subagent-runtime-LE2ZXH3G.js.map → peer-config-D5A4454H.js.map} +0 -0
- /package/bundle/{task-store-K7CQDEPI.js.map → phase-transport-43NP5XBK.js.map} +0 -0
- /package/bundle/{tool-registry-MU3OX4UI.js.map → phase-transport-GNUZI6EW.js.map} +0 -0
- /package/bundle/{tool-sandbox-VYOK4ZOA.js.map → phase-transport-Q7K6V3VZ.js.map} +0 -0
- /package/bundle/{transport-config-YLXU33RO.js.map → phase-transport-SLJXIAY5.js.map} +0 -0
- /package/bundle/{update-QCW5LXRN.js.map → skill-stats-IPVKMWN3.js.map} +0 -0
- /package/bundle/{update-check-27KZSAP6.js.map → sleep-4NVWZHVN.js.map} +0 -0
- /package/bundle/{usage-tracker-OVVEVMOY.js.map → soul-bundle-7EYTEKFE.js.map} +0 -0
- /package/bundle/{user-registry-D4SD73UV.js.map → soul-loader-7FN7WDHM.js.map} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
ModelHealthRegistry,
|
|
5
|
+
classifyError
|
|
6
|
+
} from "./chunk-ZEY6YZAB.js";
|
|
7
|
+
import "./chunk-7K2YZTLD.js";
|
|
8
|
+
export {
|
|
9
|
+
ModelHealthRegistry,
|
|
10
|
+
classifyError
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=model-health-registry-7ECZFCW4.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
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
|
+
ModelHealthRegistry,
|
|
5
|
+
classifyError
|
|
6
|
+
} from "./chunk-CUQA2AJT.js";
|
|
7
|
+
import "./chunk-7K2YZTLD.js";
|
|
8
|
+
export {
|
|
9
|
+
ModelHealthRegistry,
|
|
10
|
+
classifyError
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=model-health-registry-LDC76RPP.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
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
|
+
sendNotification
|
|
5
|
+
} from "./chunk-KED3G7HS.js";
|
|
6
|
+
import "./chunk-EX2SRTUE.js";
|
|
7
|
+
import "./chunk-AQVOAQQI.js";
|
|
8
|
+
import "./chunk-2BY6I4P5.js";
|
|
9
|
+
import "./chunk-MJ6PHMOK.js";
|
|
10
|
+
import "./chunk-7K2YZTLD.js";
|
|
11
|
+
export {
|
|
12
|
+
sendNotification
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=notification-OJ4YE4VG.js.map
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
|
|
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);
|
|
2
3
|
import {
|
|
3
4
|
getEnv,
|
|
4
5
|
init_env_schema
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-AQVOAQQI.js";
|
|
7
|
+
import "./chunk-2BY6I4P5.js";
|
|
8
|
+
import "./chunk-MJ6PHMOK.js";
|
|
9
|
+
import "./chunk-7K2YZTLD.js";
|
|
9
10
|
|
|
10
11
|
// src/components/openrouter-credits.ts
|
|
11
12
|
init_env_schema();
|
|
@@ -29,4 +30,4 @@ async function fetchOpenRouterCredits() {
|
|
|
29
30
|
export {
|
|
30
31
|
fetchOpenRouterCredits
|
|
31
32
|
};
|
|
32
|
-
//# sourceMappingURL=openrouter-credits-
|
|
33
|
+
//# sourceMappingURL=openrouter-credits-L45SYKT3.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/openrouter-credits.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * openrouter-credits.ts \u2014 Fetch OpenRouter account credits via API.\n */\nimport { getEnv } from \"./env-schema.js\";\n\nexport interface OpenRouterCredits {\n purchased: number;\n used: number;\n remaining: number;\n}\n\nexport async function fetchOpenRouterCredits(): Promise<OpenRouterCredits | null> {\n const apiKey = getEnv().getApiKey(\"OPENROUTER_API_KEY\");\n if (!apiKey) return null;\n try {\n const res = await fetch(\"https://openrouter.ai/api/v1/credits\", {\n headers: { Authorization: `Bearer ${apiKey}` },\n signal: AbortSignal.timeout(5000),\n });\n if (!res.ok) return null;\n const data = await res.json() as { data?: { total_credits?: number; total_usage?: number } };\n const purchased = data.data?.total_credits ?? 0;\n const used = data.data?.total_usage ?? 0;\n return { purchased, used, remaining: purchased - used };\n } catch { return null; }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAGA;AAQA,eAAsB,yBAA4D;AAChF,QAAM,SAAS,OAAO,EAAE,UAAU,oBAAoB;AACtD,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI;AACF,UAAM,MAAM,MAAM,MAAM,wCAAwC;AAAA,MAC9D,SAAS,EAAE,eAAe,UAAU,MAAM,GAAG;AAAA,MAC7C,QAAQ,YAAY,QAAQ,GAAI;AAAA,IAClC,CAAC;AACD,QAAI,CAAC,IAAI,GAAI,QAAO;AACpB,UAAM,OAAO,MAAM,IAAI,KAAK;AAC5B,UAAM,YAAY,KAAK,MAAM,iBAAiB;AAC9C,UAAM,OAAO,KAAK,MAAM,eAAe;AACvC,WAAO,EAAE,WAAW,MAAM,WAAW,YAAY,KAAK;AAAA,EACxD,QAAQ;AAAE,WAAO;AAAA,EAAM;AACzB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
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 "./chunk-7K2YZTLD.js";
|
|
3
4
|
|
|
4
5
|
// src/cli/commands/passwd.ts
|
|
5
6
|
import { createInterface } from "node:readline";
|
|
@@ -130,4 +131,4 @@ ABMIND_KEY=${newKey.toString("hex")}`);
|
|
|
130
131
|
export {
|
|
131
132
|
passwd
|
|
132
133
|
};
|
|
133
|
-
//# sourceMappingURL=passwd-
|
|
134
|
+
//# sourceMappingURL=passwd-QSHZJ2CG.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/cli/commands/passwd.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * abtars passwd \u2014 set or change encryption passphrase (#607).\n *\n * - Empty old passphrase = migration from key file\n * - Non-empty old passphrase = password change\n * Re-encrypts: abmind DB memories + ~/.abtars/secret/ files.\n */\n\nimport { createInterface } from \"node:readline\";\nimport { existsSync, readFileSync, writeFileSync, readdirSync, statSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { homedir } from \"node:os\";\nimport { createDecipheriv, createCipheriv, randomBytes, hkdfSync } from \"node:crypto\";\n\nfunction ask(rl: ReturnType<typeof createInterface>, question: string): Promise<string> {\n return new Promise(resolve => rl.question(question, resolve));\n}\n\nexport async function passwd(): Promise<number> {\n const { deriveFromPassphrase, writeKeyVerify, validateKey, loadKeyFromFile, _resetKeyCache } = await import(\"abmind\");\n const { writeToKeyring } = await import(\"abmind\");\n\n const keyFile = join(homedir(), \".abmind\", \"secret\", \"abmind.key\");\n const verifyFile = join(homedir(), \".abmind\", \"secret\", \"key.verify\");\n const secretDir = join(homedir(), \".abtars\", \"secret\");\n\n const rl = createInterface({ input: process.stdin, output: process.stdout });\n try {\n // Username\n const username = await ask(rl, \"Username (same on all machines): \");\n if (!username.trim()) { console.error(\"Username cannot be empty.\"); return 1; }\n\n // Old key: from passphrase or from file\n let oldKey: Buffer;\n const oldPass = await ask(rl, \"Current passphrase (empty = migrate from key file): \");\n if (oldPass) {\n oldKey = deriveFromPassphrase(oldPass, username.trim());\n if (!existsSync(verifyFile)) {\n console.error(\"No key.verify file \u2014 cannot validate passphrase. Run migration with empty old passphrase first.\"); return 1;\n }\n if (!validateKey(oldKey)) {\n console.error(\"Wrong passphrase.\"); return 1;\n }\n } else {\n if (!existsSync(keyFile)) { console.error(`No key file at ${keyFile} and no passphrase. Run 'abtars install' first.`); return 1; }\n oldKey = loadKeyFromFile(keyFile);\n }\n\n // New passphrase\n const newPass = await ask(rl, \"New passphrase (min 6 chars): \");\n if (newPass.length < 6) { console.error(\"Too short.\"); return 1; }\n const confirm = await ask(rl, \"Confirm: \");\n if (newPass !== confirm) { console.error(\"Mismatch.\"); return 1; }\n\n const newKey = deriveFromPassphrase(newPass, username.trim());\n\n // Re-encrypt DB memories\n let dbCount = 0;\n try {\n const memDir = process.env[\"ABMIND_HOME\"] ?? join(homedir(), \".abmind\");\n const dbPath = join(memDir, \"memory\", \"memory.db\");\n if (existsSync(dbPath)) {\n const oldDbKey = Buffer.from(hkdfSync(\"sha256\", oldKey, \"\", \"abmind-secrets-v1\", 32));\n const newDbKey = Buffer.from(hkdfSync(\"sha256\", newKey, \"\", \"abmind-secrets-v1\", 32));\n const { loadNative } = await import(\"abmind\");\n const Database = loadNative(\"better-sqlite3\") as any;\n const db = new Database(dbPath, { readonly: false });\n const rows = db.prepare(\"SELECT id, content_en FROM extracted_memories WHERE classification = 3\").all() as Array<{ id: number; content_en: string }>;\n const update = db.prepare(\"UPDATE extracted_memories SET content_en = ? WHERE id = ?\");\n for (const row of rows) {\n try {\n const buf = Buffer.from(row.content_en, \"base64\");\n const iv = buf.subarray(0, 12);\n const tag = buf.subarray(buf.length - 16);\n const ct = buf.subarray(12, buf.length - 16);\n const d = createDecipheriv(\"aes-256-gcm\", oldDbKey, iv);\n d.setAuthTag(tag);\n const plain = d.update(ct, undefined, \"utf-8\") + d.final(\"utf-8\");\n const newIv = randomBytes(12);\n const c = createCipheriv(\"aes-256-gcm\", newDbKey, newIv);\n const enc = Buffer.concat([c.update(plain, \"utf-8\"), c.final()]);\n update.run(Buffer.concat([newIv, enc, c.getAuthTag()]).toString(\"base64\"), row.id);\n dbCount++;\n } catch { /* skip */ }\n }\n db.close();\n }\n } catch { /* DB not available */ }\n\n // Re-encrypt file-based secrets\n let fileCount = 0;\n if (existsSync(secretDir)) {\n const oldPurpose = Buffer.from(hkdfSync(\"sha256\", oldKey, \"\", \"abtars-secrets-files-v1\", 32));\n const newPurpose = Buffer.from(hkdfSync(\"sha256\", newKey, \"\", \"abtars-secrets-files-v1\", 32));\n for (const f of readdirSync(secretDir)) {\n const fp = join(secretDir, f);\n if (statSync(fp).isDirectory()) continue;\n const raw = readFileSync(fp, \"utf-8\").trim();\n if (!raw.startsWith(\"ENC:\")) continue;\n try {\n const buf = Buffer.from(raw.slice(4), \"base64\");\n const iv = buf.subarray(1, 13);\n const tag = buf.subarray(buf.length - 16);\n const ct = buf.subarray(13, buf.length - 16);\n const d = createDecipheriv(\"aes-256-gcm\", oldPurpose, iv);\n d.setAuthTag(tag);\n const plain = d.update(ct, undefined, \"utf-8\") + d.final(\"utf-8\");\n const newIv = randomBytes(12);\n const c = createCipheriv(\"aes-256-gcm\", newPurpose, newIv);\n const enc = Buffer.concat([c.update(plain, \"utf-8\"), c.final()]);\n const blob = \"ENC:\" + Buffer.concat([Buffer.from([0x01]), newIv, enc, c.getAuthTag()]).toString(\"base64\");\n writeFileSync(fp, blob, { mode: 0o600 });\n fileCount++;\n } catch { /* skip */ }\n }\n }\n\n // Finalize \u2014 write key file + key.verify atomically\n _resetKeyCache();\n writeFileSync(keyFile, newKey.toString(\"hex\") + \"\\n\", { mode: 0o600 });\n writeKeyVerify(newKey);\n const stored = writeToKeyring(newPass);\n\n console.log(`\u2713 Done. ${dbCount} memories + ${fileCount} secrets re-encrypted.`);\n console.log(`\\nABMIND_KEY=${newKey.toString(\"hex\")}`);\n if (stored) console.log(\"\u2713 Passphrase stored in OS keyring.\");\n else console.log(\"Set ABMIND_KEY as OS env var for daemon mode.\");\n return 0;\n } finally { rl.close(); }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;AAQA,SAAS,uBAAuB;AAChC,SAAS,YAAY,cAAc,eAAe,aAAa,gBAAgB;AAC/E,SAAS,YAAY;AACrB,SAAS,eAAe;AACxB,SAAS,kBAAkB,gBAAgB,aAAa,gBAAgB;AAExE,SAAS,IAAI,IAAwC,UAAmC;AACtF,SAAO,IAAI,QAAQ,aAAW,GAAG,SAAS,UAAU,OAAO,CAAC;AAC9D;AAEA,eAAsB,SAA0B;AAC9C,QAAM,EAAE,sBAAsB,gBAAgB,aAAa,iBAAiB,eAAe,IAAI,MA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,QAAa;AAAA,MACvB;AAAA,IACF;AAGA,mBAAe;AACf,kBAAc,SAAS,OAAO,SAAS,KAAK,IAAI,MAAM,EAAE,MAAM,IAAM,CAAC;AACrE,mBAAe,MAAM;AACrB,UAAM,SAAS,eAAe,OAAO;AAErC,YAAQ,IAAI,gBAAW,OAAO,eAAe,SAAS,wBAAwB;AAC9E,YAAQ,IAAI;AAAA,aAAgB,OAAO,SAAS,KAAK,CAAC,EAAE;AACpD,QAAI,OAAQ,SAAQ,IAAI,yCAAoC;AAAA,QACvD,SAAQ,IAAI,+CAA+C;AAChE,WAAO;AAAA,EACT,UAAE;AAAU,OAAG,MAAM;AAAA,EAAG;AAC1B;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
abtarsHome,
|
|
5
|
+
ensureDir,
|
|
6
|
+
init_paths,
|
|
7
|
+
reportsDir,
|
|
8
|
+
setLazyRoots
|
|
9
|
+
} from "./chunk-MJ6PHMOK.js";
|
|
10
|
+
import "./chunk-7K2YZTLD.js";
|
|
11
|
+
init_paths();
|
|
12
|
+
export {
|
|
13
|
+
abtarsHome,
|
|
14
|
+
ensureDir,
|
|
15
|
+
reportsDir,
|
|
16
|
+
setLazyRoots
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=paths-ZJYIDND2.js.map
|
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
|
|
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);
|
|
2
3
|
import {
|
|
3
4
|
init_peer_jwt,
|
|
4
5
|
peer_jwt_exports
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-CELR236Q.js";
|
|
6
7
|
import {
|
|
7
8
|
init_peer_config,
|
|
8
9
|
loadPeerConfig
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-VA5WKN3Z.js";
|
|
11
|
+
import "./chunk-LYEAHE5V.js";
|
|
12
|
+
import "./chunk-EX2SRTUE.js";
|
|
12
13
|
import {
|
|
13
14
|
init_logger,
|
|
14
15
|
logInfo
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-2BY6I4P5.js";
|
|
17
|
+
import "./chunk-MJ6PHMOK.js";
|
|
17
18
|
import {
|
|
18
19
|
__require,
|
|
19
20
|
__toCommonJS
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7K2YZTLD.js";
|
|
21
22
|
|
|
22
23
|
// src/components/peer-client.ts
|
|
23
24
|
init_peer_config();
|
|
@@ -48,7 +49,7 @@ async function callPeer(peerName, prompt, hops, opts) {
|
|
|
48
49
|
}
|
|
49
50
|
let signedPrompt = prompt;
|
|
50
51
|
if (config.self.signingKey) {
|
|
51
|
-
const { signMessage } = await import("./digital-signature-
|
|
52
|
+
const { signMessage } = await import("./digital-signature-PNY4TR2W.js");
|
|
52
53
|
const { tag } = signMessage(config.self.signingKey, config.self.name, peerName, prompt);
|
|
53
54
|
signedPrompt = `${prompt} ${tag}`;
|
|
54
55
|
}
|
|
@@ -60,8 +61,8 @@ async function callPeer(peerName, prompt, hops, opts) {
|
|
|
60
61
|
} catch (err) {
|
|
61
62
|
if (err instanceof PeerCallError && (err.code === "unreachable" || err.code === "timeout") && peer.udpPort && !opts?.skipWakeup) {
|
|
62
63
|
logInfo(TAG, `Direct call failed (${err.code}) \u2014 UDP callback request \u2192 ${peerKey}`);
|
|
63
|
-
const { registerPending, rejectPending } = await import("./pending-callback-
|
|
64
|
-
const { sendWakeup } = await import("./dns-wakeup-
|
|
64
|
+
const { registerPending, rejectPending } = await import("./pending-callback-6KLBSHLX.js");
|
|
65
|
+
const { sendWakeup } = await import("./dns-wakeup-RYOCQ6GR.js");
|
|
65
66
|
const resultPromise = registerPending(peerKey, signedPrompt);
|
|
66
67
|
sendWakeup(peerKey, peer.host, peer.udpPort, peer.token);
|
|
67
68
|
const timeout = setTimeout(() => rejectPending(peerKey, "callback timeout (60s)"), 6e4);
|
|
@@ -153,4 +154,4 @@ export {
|
|
|
153
154
|
getCurrentPeerHops,
|
|
154
155
|
setCurrentPeerHops
|
|
155
156
|
};
|
|
156
|
-
//# sourceMappingURL=peer-client-
|
|
157
|
+
//# sourceMappingURL=peer-client-T44VI7NB.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/peer-client.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * peer-client.ts \u2014 HTTP client for peer_session tool (#392).\n * POST /v1/chat/completions with bearer + X-Peer-Hops.\n */\n\nimport { request as httpsRequest } from \"node:https\";\nimport { loadPeerConfig, type PeerEntry } from \"./peer-config.js\";\nimport { logInfo } from \"./logger.js\";\n\nconst TAG = \"peer-client\";\n\nexport type PeerError = \"timeout\" | \"unreachable\" | \"hop_exceeded\" | \"auth_failed\" | \"peer_error\" | \"unknown_peer\";\n\n/**\n * Module-level hop budget for the current request. Set by agent-api-server\n * before dispatching a prompt that came with X-Peer-Hops. Read by peer_session\n * tool to know what hops value to forward. Safe in single-threaded Node\n * because agent-api-server processes one prompt at a time per session.\n */\nlet _currentHops: number | null = null;\nexport function setCurrentPeerHops(hops: number | null): void { _currentHops = hops; }\nexport function getCurrentPeerHops(): number | null { return _currentHops; }\n\nexport class PeerCallError extends Error {\n constructor(public readonly code: PeerError, message: string) {\n super(message);\n this.name = \"PeerCallError\";\n }\n}\n\n/**\n * Call a peer's /v1/chat/completions endpoint.\n * @param peerName \u2014 key in peers.json\n * @param prompt \u2014 user message to send\n * @param hops \u2014 remaining hop budget (decremented before sending)\n */\nexport async function callPeer(peerName: string, prompt: string, hops: number, opts?: { skipWakeup?: boolean }): Promise<string> {\n const config = loadPeerConfig();\n const peerKey = Object.keys(config.peers).find(k => k.toLowerCase() === peerName.toLowerCase());\n const peer = peerKey ? config.peers[peerKey] : undefined;\n if (!peer) {\n const available = Object.keys(config.peers).join(\", \") || \"(none)\";\n throw new PeerCallError(\"unknown_peer\", `Unknown peer '${peerName}'. Available: ${available}`);\n }\n\n // Sign outgoing message if we have a signing key (#416)\n let signedPrompt = prompt;\n if (config.self.signingKey) {\n const { signMessage } = await import(\"./digital-signature.js\");\n const { tag } = signMessage(config.self.signingKey, config.self.name, peerName, prompt);\n signedPrompt = `${prompt} ${tag}`;\n }\n\n const start = Date.now();\n try {\n const response = await postCompletion(peer, peerName, signedPrompt, hops, config.timeoutMs, config.self.name);\n logInfo(TAG, `PEER_CALL ${peerName} \u2014 ${prompt.length}ch \u2192 ${response.length}ch (${Date.now() - start}ms, hops=${hops})`);\n return response;\n } catch (err) {\n if (err instanceof PeerCallError && (err.code === \"unreachable\" || err.code === \"timeout\") && peer.udpPort && !opts?.skipWakeup) {\n logInfo(TAG, `Direct call failed (${err.code}) \u2014 UDP callback request \u2192 ${peerKey}`);\n const { registerPending, rejectPending } = await import(\"./pending-callback.js\");\n const { sendWakeup } = await import(\"./dns-wakeup.js\");\n const resultPromise = registerPending(peerKey!, signedPrompt);\n sendWakeup(peerKey!, peer.host, peer.udpPort, peer.token);\n // Wait up to 60s for the peer to call back with the answer\n const timeout = setTimeout(() => rejectPending(peerKey!, \"callback timeout (60s)\"), 60000);\n try {\n const answer = await resultPromise;\n clearTimeout(timeout);\n logInfo(TAG, `PEER_CALL ${peerName} (via callback) \u2014 ${prompt.length}ch \u2192 ${answer.length}ch (${Date.now() - start}ms)`);\n return answer;\n } catch (cbErr) {\n clearTimeout(timeout);\n throw new PeerCallError(\"timeout\", `Callback failed: ${cbErr instanceof Error ? cbErr.message : String(cbErr)}`);\n }\n }\n throw err;\n }\n}\n\nfunction postCompletion(peer: PeerEntry, peerName: string, prompt: string, hops: number, timeoutMs: number, selfName: string): Promise<string> {\n const { signJwt } = require(\"./peer-jwt.js\") as typeof import(\"./peer-jwt.js\");\n const now = Math.floor(Date.now() / 1000);\n const jwt = signJwt({ iss: selfName, aud: peerName, iat: now, exp: now + 60 }, peer.token);\n\n const body = JSON.stringify({\n model: \"default\",\n messages: [{ role: \"user\", content: prompt }],\n });\n\n return new Promise((resolve, reject) => {\n const useTls = !!(peer.certFingerprint || peer.certPem);\n const requestFn = useTls ? httpsRequest : require(\"node:http\").request;\n\n const tlsOpts = useTls ? {\n minVersion: \"TLSv1.3\" as const,\n rejectUnauthorized: true,\n ...(peer.certPem ? { ca: [peer.certPem] } : {}),\n checkServerIdentity: (_hostname: string, cert: { fingerprint256?: string }) => {\n if (peer.certFingerprint && cert.fingerprint256 !== peer.certFingerprint) {\n return new Error(`Cert fingerprint mismatch: expected ${peer.certFingerprint}, got ${cert.fingerprint256}`);\n }\n return undefined;\n },\n } : {};\n\n const req = requestFn({\n hostname: peer.host,\n port: peer.port,\n path: \"/v1/chat/completions\",\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n \"Content-Length\": Buffer.byteLength(body),\n \"Authorization\": `Bearer ${jwt}`,\n \"X-Peer-Hops\": String(hops),\n },\n timeout: timeoutMs,\n ...tlsOpts,\n } as any, (res: any) => {\n let data = \"\";\n res.on(\"data\", (c: any) => data += c);\n res.on(\"end\", () => {\n if (res.statusCode === 401 || res.statusCode === 403) {\n reject(new PeerCallError(\"auth_failed\", `Peer rejected auth (${res.statusCode})`));\n return;\n }\n if (res.statusCode === 429 || res.statusCode === 508) {\n reject(new PeerCallError(\"hop_exceeded\", `Peer refused \u2014 hop limit reached`));\n return;\n }\n if (res.statusCode && res.statusCode >= 400) {\n reject(new PeerCallError(\"peer_error\", `Peer returned ${res.statusCode}: ${data.slice(0, 200)}`));\n return;\n }\n try {\n const parsed = JSON.parse(data);\n const content = parsed?.choices?.[0]?.message?.content ?? \"\";\n resolve(content);\n } catch {\n reject(new PeerCallError(\"peer_error\", `Peer returned non-JSON: ${data.slice(0, 100)}`));\n }\n });\n });\n req.on(\"timeout\", () => { req.destroy(); reject(new PeerCallError(\"timeout\", `Peer '${peer.host}:${peer.port}' timed out (${timeoutMs}ms)`)); });\n req.on(\"error\", (err: Error) => reject(new PeerCallError(\"unreachable\", `Peer unreachable: ${err.message}`)));\n req.write(body);\n req.end();\n });\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAMA;AACA;AAFA,SAAS,WAAW,oBAAoB;AAIxC,IAAM,MAAM;AAUZ,IAAI,eAA8B;AAC3B,SAAS,mBAAmB,MAA2B;AAAE,iBAAe;AAAM;AAC9E,SAAS,qBAAoC;AAAE,SAAO;AAAc;AAEpE,IAAM,gBAAN,cAA4B,MAAM;AAAA,EACvC,YAA4B,MAAiB,SAAiB;AAC5D,UAAM,OAAO;AADa;AAE1B,SAAK,OAAO;AAAA,EACd;AACF;AAQA,eAAsB,SAAS,UAAkB,QAAgB,MAAc,MAAkD;AAC/H,QAAM,SAAS,eAAe;AAC9B,QAAM,UAAU,OAAO,KAAK,OAAO,KAAK,EAAE,KAAK,OAAK,EAAE,YAAY,MAAM,SAAS,YAAY,CAAC;AAC9F,QAAM,OAAO,UAAU,OAAO,MAAM,OAAO,IAAI;AAC/C,MAAI,CAAC,MAAM;AACT,UAAM,YAAY,OAAO,KAAK,OAAO,KAAK,EAAE,KAAK,IAAI,KAAK;AAC1D,UAAM,IAAI,cAAc,gBAAgB,iBAAiB,QAAQ,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
|
|
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
|
+
clearPeerConfigCache,
|
|
5
|
+
init_peer_config,
|
|
6
|
+
loadPeerConfig
|
|
7
|
+
} from "./chunk-VA5WKN3Z.js";
|
|
8
|
+
import "./chunk-LYEAHE5V.js";
|
|
9
|
+
import "./chunk-2BY6I4P5.js";
|
|
10
|
+
import "./chunk-MJ6PHMOK.js";
|
|
11
|
+
import "./chunk-7K2YZTLD.js";
|
|
12
|
+
init_peer_config();
|
|
13
|
+
export {
|
|
14
|
+
clearPeerConfigCache,
|
|
15
|
+
loadPeerConfig
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=peer-config-D5A4454H.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
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 "./chunk-7K2YZTLD.js";
|
|
3
4
|
|
|
4
5
|
// src/components/peer-sessions.ts
|
|
5
6
|
var sessions = /* @__PURE__ */ new Map();
|
|
@@ -46,4 +47,4 @@ export {
|
|
|
46
47
|
getOrCreateSession,
|
|
47
48
|
isEnded
|
|
48
49
|
};
|
|
49
|
-
//# sourceMappingURL=peer-sessions-
|
|
50
|
+
//# sourceMappingURL=peer-sessions-MY2YVXHC.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/peer-sessions.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * peer-sessions.ts \u2014 in-memory multi-turn peer chat sessions (#428).\n * Sessions expire after 5 min idle. Max 10 turns. No persistence.\n */\n\nexport interface PeerChatSession {\n id: string;\n peerName: string;\n messages: Array<{ role: \"user\" | \"assistant\"; content: string }>;\n createdAt: number;\n lastActivityAt: number;\n}\n\nconst sessions = new Map<string, PeerChatSession>();\nconst MAX_TURNS = 10;\nconst TTL_MS = 5 * 60 * 1000;\n\nexport function getOrCreateSession(sessionId: string | undefined, peerName: string): PeerChatSession {\n if (sessionId && sessions.has(sessionId)) {\n const s = sessions.get(sessionId)!;\n s.lastActivityAt = Date.now();\n return s;\n }\n const id = sessionId ?? `pc-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 6)}`;\n const session: PeerChatSession = { id, peerName, messages: [], createdAt: Date.now(), lastActivityAt: Date.now() };\n sessions.set(id, session);\n return session;\n}\n\nexport function addTurn(session: PeerChatSession, role: \"user\" | \"assistant\", content: string): void {\n session.messages.push({ role, content });\n session.lastActivityAt = Date.now();\n}\n\nexport function isEnded(session: PeerChatSession, response: string): { ended: boolean; reason?: string } {\n if (/\\[NO-REPLY\\]/i.test(response) || /\\[END\\]/i.test(response)) return { ended: true, reason: \"peer-signal\" };\n if (session.messages.length >= MAX_TURNS * 2) return { ended: true, reason: \"max-turns\" };\n return { ended: false };\n}\n\nexport function destroySession(id: string): void {\n sessions.delete(id);\n}\n\n// Cleanup expired sessions (called from heartbeat or lazily)\nexport function cleanupExpired(): number {\n const now = Date.now();\n let cleaned = 0;\n for (const [id, s] of sessions) {\n if (now - s.lastActivityAt > TTL_MS) { sessions.delete(id); cleaned++; }\n }\n return cleaned;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;AAaA,IAAM,WAAW,oBAAI,IAA6B;AAClD,IAAM,YAAY;AAClB,IAAM,SAAS,IAAI,KAAK;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|
|
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 "./chunk-7K2YZTLD.js";
|
|
3
4
|
|
|
4
5
|
// src/components/pending-callback.ts
|
|
5
6
|
var pending = /* @__PURE__ */ new Map();
|
|
@@ -37,4 +38,4 @@ export {
|
|
|
37
38
|
rejectPending,
|
|
38
39
|
resolvePending
|
|
39
40
|
};
|
|
40
|
-
//# sourceMappingURL=pending-callback-
|
|
41
|
+
//# sourceMappingURL=pending-callback-6KLBSHLX.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/pending-callback.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * pending-callback.ts \u2014 Store pending prompts for callback-based A2A (#451).\n * When direct peer_session fails, the prompt is stored here. When the peer calls back,\n * agent-api-server returns the pending prompt instead of LLM-processing.\n */\n\ntype PendingEntry = { prompt: string; resolve: (answer: string) => void; reject: (err: Error) => void };\n\nconst pending = new Map<string, PendingEntry>();\n\n/** Store a pending prompt and return a promise that resolves when the answer arrives. */\nexport function registerPending(peerName: string, prompt: string): Promise<string> {\n // Clear any stale entry\n if (pending.has(peerName)) pending.get(peerName)!.reject(new Error(\"superseded\"));\n return new Promise((resolve, reject) => {\n pending.set(peerName.toLowerCase(), { prompt, resolve, reject });\n });\n}\n\n/** Check if there's a pending prompt for this peer. */\nexport function hasPending(peerName: string): boolean {\n return pending.has(peerName.toLowerCase());\n}\n\n/** Get and remove the pending prompt (peer called back). */\nexport function popPendingPrompt(peerName: string): string | null {\n const entry = pending.get(peerName.toLowerCase());\n if (!entry) return null;\n return entry.prompt;\n}\n\n/** Deliver the answer (peer sent the response back). */\nexport function resolvePending(peerName: string, answer: string): boolean {\n const entry = pending.get(peerName.toLowerCase());\n if (!entry) return false;\n pending.delete(peerName.toLowerCase());\n entry.resolve(answer);\n return true;\n}\n\n/** Timeout \u2014 reject the pending promise. */\nexport function rejectPending(peerName: string, reason: string): void {\n const entry = pending.get(peerName.toLowerCase());\n if (!entry) return;\n pending.delete(peerName.toLowerCase());\n entry.reject(new Error(reason));\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;AAQA,IAAM,UAAU,oBAAI,IAA0B;AAGvC,SAAS,gBAAgB,UAAkB,QAAiC;AAEjF,MAAI,QAAQ,IAAI,QAAQ,EAAG,SAAQ,IAAI,QAAQ,EAAG,OAAO,IAAI,MAAM,YAAY,CAAC;AAChF,SAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACtC,YAAQ,IAAI,SAAS,YAAY,GAAG,EAAE,QAAQ,SAAS,OAAO,CAAC;AAAA,EACjE,CAAC;AACH;AAGO,SAAS,WAAW,UAA2B;AACpD,SAAO,QAAQ,IAAI,SAAS,YAAY,CAAC;AAC3C;AAGO,SAAS,iBAAiB,UAAiC;AAChE,QAAM,QAAQ,QAAQ,IAAI,SAAS,YAAY,CAAC;AAChD,MAAI,CAAC,MAAO,QAAO;AACnB,SAAO,MAAM;AACf;AAGO,SAAS,eAAe,UAAkB,QAAyB;AACxE,QAAM,QAAQ,QAAQ,IAAI,SAAS,YAAY,CAAC;AAChD,MAAI,CAAC,MAAO,QAAO;AACnB,UAAQ,OAAO,SAAS,YAAY,CAAC;AACrC,QAAM,QAAQ,MAAM;AACpB,SAAO;AACT;AAGO,SAAS,cAAc,UAAkB,QAAsB;AACpE,QAAM,QAAQ,QAAQ,IAAI,SAAS,YAAY,CAAC;AAChD,MAAI,CAAC,MAAO;AACZ,UAAQ,OAAO,SAAS,YAAY,CAAC;AACrC,QAAM,OAAO,IAAI,MAAM,MAAM,CAAC;AAChC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
buildTransport,
|
|
5
|
+
phaseTransport,
|
|
6
|
+
rebuildTransport
|
|
7
|
+
} from "./chunk-U34CSHFS.js";
|
|
8
|
+
import "./chunk-HVKJN3AG.js";
|
|
9
|
+
import "./chunk-WX7GHGFX.js";
|
|
10
|
+
import "./chunk-J5YIMCLT.js";
|
|
11
|
+
import "./chunk-UDZIZB5F.js";
|
|
12
|
+
import "./chunk-MZWMYN4O.js";
|
|
13
|
+
import "./chunk-EX2SRTUE.js";
|
|
14
|
+
import "./chunk-AQVOAQQI.js";
|
|
15
|
+
import "./chunk-2BY6I4P5.js";
|
|
16
|
+
import "./chunk-MJ6PHMOK.js";
|
|
17
|
+
import "./chunk-7K2YZTLD.js";
|
|
18
|
+
export {
|
|
19
|
+
buildTransport,
|
|
20
|
+
phaseTransport,
|
|
21
|
+
rebuildTransport
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=phase-transport-43NP5XBK.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
buildTransport,
|
|
5
|
+
phaseTransport,
|
|
6
|
+
rebuildTransport
|
|
7
|
+
} from "./chunk-JHF25OOG.js";
|
|
8
|
+
import "./chunk-LD5BMLHG.js";
|
|
9
|
+
import "./chunk-WX7GHGFX.js";
|
|
10
|
+
import "./chunk-J5YIMCLT.js";
|
|
11
|
+
import "./chunk-UDZIZB5F.js";
|
|
12
|
+
import "./chunk-MZWMYN4O.js";
|
|
13
|
+
import "./chunk-EX2SRTUE.js";
|
|
14
|
+
import "./chunk-AQVOAQQI.js";
|
|
15
|
+
import "./chunk-2BY6I4P5.js";
|
|
16
|
+
import "./chunk-MJ6PHMOK.js";
|
|
17
|
+
import "./chunk-7K2YZTLD.js";
|
|
18
|
+
export {
|
|
19
|
+
buildTransport,
|
|
20
|
+
phaseTransport,
|
|
21
|
+
rebuildTransport
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=phase-transport-GNUZI6EW.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
buildTransport,
|
|
5
|
+
phaseTransport,
|
|
6
|
+
rebuildTransport
|
|
7
|
+
} from "./chunk-IU3RI5E4.js";
|
|
8
|
+
import "./chunk-LD5BMLHG.js";
|
|
9
|
+
import "./chunk-WX7GHGFX.js";
|
|
10
|
+
import "./chunk-J5YIMCLT.js";
|
|
11
|
+
import "./chunk-UDZIZB5F.js";
|
|
12
|
+
import "./chunk-MZWMYN4O.js";
|
|
13
|
+
import "./chunk-EX2SRTUE.js";
|
|
14
|
+
import "./chunk-AQVOAQQI.js";
|
|
15
|
+
import "./chunk-2BY6I4P5.js";
|
|
16
|
+
import "./chunk-MJ6PHMOK.js";
|
|
17
|
+
import "./chunk-7K2YZTLD.js";
|
|
18
|
+
export {
|
|
19
|
+
buildTransport,
|
|
20
|
+
phaseTransport,
|
|
21
|
+
rebuildTransport
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=phase-transport-Q7K6V3VZ.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
buildTransport,
|
|
5
|
+
phaseTransport,
|
|
6
|
+
rebuildTransport
|
|
7
|
+
} from "./chunk-6XX4OAAM.js";
|
|
8
|
+
import "./chunk-LD5BMLHG.js";
|
|
9
|
+
import "./chunk-WX7GHGFX.js";
|
|
10
|
+
import "./chunk-J5YIMCLT.js";
|
|
11
|
+
import "./chunk-UDZIZB5F.js";
|
|
12
|
+
import "./chunk-MZWMYN4O.js";
|
|
13
|
+
import "./chunk-EX2SRTUE.js";
|
|
14
|
+
import "./chunk-AQVOAQQI.js";
|
|
15
|
+
import "./chunk-2BY6I4P5.js";
|
|
16
|
+
import "./chunk-MJ6PHMOK.js";
|
|
17
|
+
import "./chunk-7K2YZTLD.js";
|
|
18
|
+
export {
|
|
19
|
+
buildTransport,
|
|
20
|
+
phaseTransport,
|
|
21
|
+
rebuildTransport
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=phase-transport-SLJXIAY5.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
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 "./chunk-7K2YZTLD.js";
|
|
3
4
|
|
|
4
5
|
// src/components/transport/responses-adapter.ts
|
|
5
6
|
function toResponsesRequest(model, messages, tools, maxTokens) {
|
|
@@ -27,4 +28,4 @@ export {
|
|
|
27
28
|
fromResponsesResponse,
|
|
28
29
|
toResponsesRequest
|
|
29
30
|
};
|
|
30
|
-
//# sourceMappingURL=responses-adapter-
|
|
31
|
+
//# sourceMappingURL=responses-adapter-DAV2JUL7.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/transport/responses-adapter.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * responses-adapter.ts \u2014 OpenAI Responses API format adapter (#465).\n * Converts between our internal chat format and the Responses API wire format.\n */\n\nexport interface ResponsesRequest {\n model: string;\n input: string;\n instructions?: string;\n tools?: unknown[];\n max_output_tokens?: number;\n}\n\nexport interface ResponsesResponse {\n id: string;\n output: Array<{ type: string; content?: Array<{ type: string; text?: string }>; name?: string; arguments?: string }>;\n}\n\n/** Convert chat/completions-style messages to Responses API request. */\nexport function toResponsesRequest(\n model: string,\n messages: Array<{ role: string; content: string | unknown[] }>,\n tools?: unknown[],\n maxTokens?: number,\n): ResponsesRequest {\n // System message \u2192 instructions, rest \u2192 concatenated input\n const system = messages.find(m => m.role === \"system\");\n const userMessages = messages.filter(m => m.role !== \"system\");\n const input = userMessages.map(m => typeof m.content === \"string\" ? m.content : JSON.stringify(m.content)).join(\"\\n\\n\");\n\n return {\n model,\n input,\n ...(system ? { instructions: typeof system.content === \"string\" ? system.content : \"\" } : {}),\n ...(tools?.length ? { tools } : {}),\n ...(maxTokens ? { max_output_tokens: maxTokens } : {}),\n };\n}\n\n/** Extract text content from Responses API response. */\nexport function fromResponsesResponse(resp: ResponsesResponse): string {\n for (const item of resp.output) {\n if (item.type === \"message\" && item.content) {\n const text = item.content.find(c => c.type === \"text\");\n if (text?.text) return text.text;\n }\n }\n return \"\";\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;AAmBO,SAAS,mBACd,OACA,UACA,OACA,WACkB;AAElB,QAAM,SAAS,SAAS,KAAK,OAAK,EAAE,SAAS,QAAQ;AACrD,QAAM,eAAe,SAAS,OAAO,OAAK,EAAE,SAAS,QAAQ;AAC7D,QAAM,QAAQ,aAAa,IAAI,OAAK,OAAO,EAAE,YAAY,WAAW,EAAE,UAAU,KAAK,UAAU,EAAE,OAAO,CAAC,EAAE,KAAK,MAAM;AAEtH,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA,GAAI,SAAS,EAAE,cAAc,OAAO,OAAO,YAAY,WAAW,OAAO,UAAU,GAAG,IAAI,CAAC;AAAA,IAC3F,GAAI,OAAO,SAAS,EAAE,MAAM,IAAI,CAAC;AAAA,IACjC,GAAI,YAAY,EAAE,mBAAmB,UAAU,IAAI,CAAC;AAAA,EACtD;AACF;AAGO,SAAS,sBAAsB,MAAiC;AACrE,aAAW,QAAQ,KAAK,QAAQ;AAC9B,QAAI,KAAK,SAAS,aAAa,KAAK,SAAS;AAC3C,YAAM,OAAO,KAAK,QAAQ,KAAK,OAAK,EAAE,SAAS,MAAM;AACrD,UAAI,MAAM,KAAM,QAAO,KAAK;AAAA,IAC9B;AAAA,EACF;AACA,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
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);
|
|
2
3
|
import {
|
|
3
4
|
abtarsHome,
|
|
4
5
|
init_paths
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-MJ6PHMOK.js";
|
|
7
|
+
import "./chunk-7K2YZTLD.js";
|
|
7
8
|
|
|
8
9
|
// src/cli/commands/restore.ts
|
|
9
10
|
init_paths();
|
|
@@ -43,4 +44,4 @@ async function restore(archivePath) {
|
|
|
43
44
|
export {
|
|
44
45
|
restore
|
|
45
46
|
};
|
|
46
|
-
//# sourceMappingURL=restore-
|
|
47
|
+
//# sourceMappingURL=restore-ROJF22R2.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/cli/commands/restore.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * `abtars restore` \u2014 extract user data from backup archive to ~/.abtars/\n */\n\nimport { existsSync } from \"node:fs\";\nimport { spawnSync } from \"node:child_process\";\nimport { abtarsHome } from \"../../paths.js\";\n\nexport async function restore(archivePath: string): Promise<number> {\n if (!archivePath) {\n process.stderr.write(\"Usage: abtars restore <file.zip|.7z>\\n\");\n return 1;\n }\n if (!existsSync(archivePath)) {\n process.stderr.write(`File not found: ${archivePath}\\n`);\n return 1;\n }\n\n const home = abtarsHome();\n const is7z = archivePath.endsWith(\".7z\");\n\n // Sanity check: verify archive contains config/\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\n let result;\n if (is7z) {\n result = spawnSync(\"7z\", [\"x\", `-o${home}`, \"-aoa\", archivePath], { encoding: \"utf-8\", stdio: \"inherit\" });\n } else {\n result = spawnSync(\"unzip\", [\"-o\", archivePath, \"-d\", home], { encoding: \"utf-8\", stdio: \"inherit\" });\n }\n\n if (result.status !== 0) {\n process.stderr.write(\"Restore failed\\n\");\n return 1;\n }\n\n process.stdout.write(`\u2713 Restored to ${home}\\n`);\n return 0;\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;AAMA;AAFA,SAAS,kBAAkB;AAC3B,SAAS,iBAAiB;AAG1B,eAAsB,QAAQ,aAAsC;AAClE,MAAI,CAAC,aAAa;AAChB,YAAQ,OAAO,MAAM,wCAAwC;AAC7D,WAAO;AAAA,EACT;AACA,MAAI,CAAC,WAAW,WAAW,GAAG;AAC5B,YAAQ,OAAO,MAAM,mBAAmB,WAAW;AAAA,CAAI;AACvD,WAAO;AAAA,EACT;AAEA,QAAM,OAAO,WAAW;AACxB,QAAM,OAAO,YAAY,SAAS,KAAK;AAGvC,QAAM,UAAU,OACZ,UAAU,MAAM,CAAC,KAAK,WAAW,GAAG,EAAE,UAAU,QAAQ,CAAC,IACzD,UAAU,SAAS,CAAC,MAAM,WAAW,GAAG,EAAE,UAAU,QAAQ,CAAC;AACjE,MAAI,CAAC,QAAQ,QAAQ,SAAS,SAAS,GAAG;AACxC,YAAQ,OAAO,MAAM,4EAAuE;AAC5F,WAAO;AAAA,EACT;AAGA,MAAI;AACJ,MAAI,MAAM;AACR,aAAS,UAAU,MAAM,CAAC,KAAK,KAAK,IAAI,IAAI,QAAQ,WAAW,GAAG,EAAE,UAAU,SAAS,OAAO,UAAU,CAAC;AAAA,EAC3G,OAAO;AACL,aAAS,UAAU,SAAS,CAAC,MAAM,aAAa,MAAM,IAAI,GAAG,EAAE,UAAU,SAAS,OAAO,UAAU,CAAC;AAAA,EACtG;AAEA,MAAI,OAAO,WAAW,GAAG;AACvB,YAAQ,OAAO,MAAM,kBAAkB;AACvC,WAAO;AAAA,EACT;AAEA,UAAQ,OAAO,MAAM,sBAAiB,IAAI;AAAA,CAAI;AAC9C,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
|
|
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);
|
|
2
3
|
import {
|
|
3
4
|
init_log_and_swallow,
|
|
4
5
|
logAndSwallow
|
|
5
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-EX2SRTUE.js";
|
|
6
7
|
import {
|
|
7
8
|
init_logger,
|
|
8
9
|
logInfo
|
|
9
|
-
} from "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
10
|
+
} from "./chunk-2BY6I4P5.js";
|
|
11
|
+
import "./chunk-MJ6PHMOK.js";
|
|
12
|
+
import "./chunk-7K2YZTLD.js";
|
|
12
13
|
|
|
13
14
|
// src/components/self-healer-utils.ts
|
|
14
15
|
init_logger();
|
|
@@ -40,4 +41,4 @@ function healPort(port) {
|
|
|
40
41
|
export {
|
|
41
42
|
healPort
|
|
42
43
|
};
|
|
43
|
-
//# sourceMappingURL=self-healer-utils-
|
|
44
|
+
//# sourceMappingURL=self-healer-utils-7NFH22VJ.js.map
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/self-healer-utils.ts"],
|
|
4
4
|
"sourcesContent": ["/**\n * Shared healing utilities \u2014 called by service-registry during background retry.\n */\nimport { execFileSync } from \"node:child_process\";\nimport { logInfo } from \"./logger.js\";\nimport { logAndSwallow } from \"./log-and-swallow.js\";\n\nconst TAG = \"self-healer\";\n\n/** Kill the process holding a port. Returns true if killed, false if nothing found. */\nexport function healPort(port: number): boolean {\n try {\n const cmd = process.platform === \"darwin\" ? \"lsof\" : \"fuser\";\n const args = process.platform === \"darwin\" ? [\"-ti\", `:${port}`] : [`${port}/tcp`];\n const out = execFileSync(cmd, args, { encoding: \"utf-8\", timeout: 5000 }).trim();\n if (!out) return false;\n const pids = out.split(/\\s+/).map(Number).filter(p => p > 0 && p !== process.pid);\n if (pids.length === 0) return false;\n for (const pid of pids) {\n try { process.kill(pid, \"SIGKILL\"); } catch (err) { logAndSwallow(TAG, \"kill pid\", err); }\n }\n logInfo(TAG, `healPort(${port}): killed PID ${pids.join(\", \")}`);\n return true;\n } catch (err) {\n logAndSwallow(TAG, \"healPort\", err);\n return false;\n }\n}\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;AAIA;AACA;AAFA,SAAS,oBAAoB;AAI7B,IAAM,MAAM;AAGL,SAAS,SAAS,MAAuB;AAC9C,MAAI;AACF,UAAM,MAAM,QAAQ,aAAa,WAAW,SAAS;AACrD,UAAM,OAAO,QAAQ,aAAa,WAAW,CAAC,OAAO,IAAI,IAAI,EAAE,IAAI,CAAC,GAAG,IAAI,MAAM;AACjF,UAAM,MAAM,aAAa,KAAK,MAAM,EAAE,UAAU,SAAS,SAAS,IAAK,CAAC,EAAE,KAAK;AAC/E,QAAI,CAAC,IAAK,QAAO;AACjB,UAAM,OAAO,IAAI,MAAM,KAAK,EAAE,IAAI,MAAM,EAAE,OAAO,OAAK,IAAI,KAAK,MAAM,QAAQ,GAAG;AAChF,QAAI,KAAK,WAAW,EAAG,QAAO;AAC9B,eAAW,OAAO,MAAM;AACtB,UAAI;AAAE,gBAAQ,KAAK,KAAK,SAAS;AAAA,MAAG,SAAS,KAAK;AAAE,sBAAc,KAAK,YAAY,GAAG;AAAA,MAAG;AAAA,IAC3F;AACA,YAAQ,KAAK,YAAY,IAAI,iBAAiB,KAAK,KAAK,IAAI,CAAC,EAAE;AAC/D,WAAO;AAAA,EACT,SAAS,KAAK;AACZ,kBAAc,KAAK,YAAY,GAAG;AAClC,WAAO;AAAA,EACT;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
_getStats,
|
|
5
|
+
_reset,
|
|
6
|
+
bumpRead,
|
|
7
|
+
flush,
|
|
8
|
+
init,
|
|
9
|
+
setProvenance
|
|
10
|
+
} from "./chunk-ELRAH7VL.js";
|
|
11
|
+
import "./chunk-EX2SRTUE.js";
|
|
12
|
+
import "./chunk-2BY6I4P5.js";
|
|
13
|
+
import "./chunk-MJ6PHMOK.js";
|
|
14
|
+
import "./chunk-7K2YZTLD.js";
|
|
15
|
+
export {
|
|
16
|
+
_getStats,
|
|
17
|
+
_reset,
|
|
18
|
+
bumpRead,
|
|
19
|
+
flush,
|
|
20
|
+
init,
|
|
21
|
+
setProvenance
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=skill-stats-IPVKMWN3.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
createSleepHandle,
|
|
5
|
+
register
|
|
6
|
+
} from "./chunk-S54DBUZ4.js";
|
|
7
|
+
import "./chunk-JAJ3DUQ2.js";
|
|
8
|
+
import "./chunk-BYDUMHXT.js";
|
|
9
|
+
import "./chunk-UDZIZB5F.js";
|
|
10
|
+
import "./chunk-MZWMYN4O.js";
|
|
11
|
+
import "./chunk-EX2SRTUE.js";
|
|
12
|
+
import "./chunk-AQVOAQQI.js";
|
|
13
|
+
import "./chunk-2BY6I4P5.js";
|
|
14
|
+
import "./chunk-MJ6PHMOK.js";
|
|
15
|
+
import "./chunk-7K2YZTLD.js";
|
|
16
|
+
export {
|
|
17
|
+
createSleepHandle,
|
|
18
|
+
register
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=sleep-4NVWZHVN.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
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
|
+
buildSoulBundle
|
|
5
|
+
} from "./chunk-P56PLAIC.js";
|
|
6
|
+
import "./chunk-J5YIMCLT.js";
|
|
7
|
+
import "./chunk-EX2SRTUE.js";
|
|
8
|
+
import "./chunk-AQVOAQQI.js";
|
|
9
|
+
import "./chunk-2BY6I4P5.js";
|
|
10
|
+
import "./chunk-MJ6PHMOK.js";
|
|
11
|
+
import "./chunk-7K2YZTLD.js";
|
|
12
|
+
export {
|
|
13
|
+
buildSoulBundle
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=soul-bundle-7EYTEKFE.js.map
|