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,292 @@
|
|
|
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
|
+
init_log_and_swallow,
|
|
5
|
+
logAndSwallow
|
|
6
|
+
} from "./chunk-EX2SRTUE.js";
|
|
7
|
+
import "./chunk-2BY6I4P5.js";
|
|
8
|
+
import "./chunk-MJ6PHMOK.js";
|
|
9
|
+
import "./chunk-7K2YZTLD.js";
|
|
10
|
+
|
|
11
|
+
// src/cli/commands/daemon.ts
|
|
12
|
+
init_log_and_swallow();
|
|
13
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
14
|
+
import { join, dirname } from "node:path";
|
|
15
|
+
import { fileURLToPath } from "node:url";
|
|
16
|
+
function abtarsHome() {
|
|
17
|
+
return process.env["ABTARS_HOME"] ?? join(process.env["HOME"] ?? "", ".abtars");
|
|
18
|
+
}
|
|
19
|
+
function isWSL() {
|
|
20
|
+
try {
|
|
21
|
+
return readFileSync("/proc/version", "utf-8").toLowerCase().includes("microsoft");
|
|
22
|
+
} catch {
|
|
23
|
+
return false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function detectScope() {
|
|
27
|
+
if (existsSync("/etc/systemd/system/abtars.service")) return "system";
|
|
28
|
+
const userUnit = join(process.env["HOME"] ?? "", ".config", "systemd", "user", "abtars-watchdog.service");
|
|
29
|
+
if (existsSync(userUnit)) return "user";
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
function unitName(scope) {
|
|
33
|
+
return scope === "user" ? "abtars-watchdog" : "abtars";
|
|
34
|
+
}
|
|
35
|
+
async function daemonInstall() {
|
|
36
|
+
const platform = process.platform;
|
|
37
|
+
const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), "..");
|
|
38
|
+
if (platform === "linux" && isWSL()) {
|
|
39
|
+
process.stderr.write(`\u2139\uFE0F WSL detected \u2014 ensure systemd is enabled (wsl.conf: [boot] systemd=true)
|
|
40
|
+
`);
|
|
41
|
+
}
|
|
42
|
+
const sudoUser = process.env["SUDO_USER"];
|
|
43
|
+
if (process.getuid?.() !== 0) {
|
|
44
|
+
process.stderr.write(
|
|
45
|
+
`Requires sudo for system-scope service registration.
|
|
46
|
+
Run: sudo -k $(which abtars) daemon install
|
|
47
|
+
`
|
|
48
|
+
);
|
|
49
|
+
return 2;
|
|
50
|
+
}
|
|
51
|
+
if (!sudoUser) {
|
|
52
|
+
process.stderr.write(`Cannot determine target user \u2014 $SUDO_USER is not set.
|
|
53
|
+
`);
|
|
54
|
+
return 2;
|
|
55
|
+
}
|
|
56
|
+
const { execSync: execSyncHome } = await import("node:child_process");
|
|
57
|
+
const userHome = execSyncHome(`eval echo ~${sudoUser}`, { encoding: "utf-8" }).trim();
|
|
58
|
+
const home = join(userHome, ".abtars");
|
|
59
|
+
const currentLink = join(home, "current");
|
|
60
|
+
if (!existsSync(currentLink)) {
|
|
61
|
+
process.stderr.write(`No release staged. Run 'abtars install' first.
|
|
62
|
+
`);
|
|
63
|
+
return 2;
|
|
64
|
+
}
|
|
65
|
+
if (platform === "darwin") {
|
|
66
|
+
const { execSync, execFileSync } = await import("node:child_process");
|
|
67
|
+
let group = sudoUser;
|
|
68
|
+
try {
|
|
69
|
+
group = execSync(`id -gn ${sudoUser}`, { encoding: "utf-8" }).trim();
|
|
70
|
+
} catch (err) {
|
|
71
|
+
logAndSwallow("daemon", "op", err);
|
|
72
|
+
}
|
|
73
|
+
const plistSrc = join(pkgRoot, "scripts", "com.abtars.daemon.plist");
|
|
74
|
+
if (!existsSync(plistSrc)) {
|
|
75
|
+
process.stderr.write(`Template not found: ${plistSrc}
|
|
76
|
+
`);
|
|
77
|
+
return 1;
|
|
78
|
+
}
|
|
79
|
+
let content = readFileSync(plistSrc, "utf-8");
|
|
80
|
+
content = content.replaceAll("{{USER}}", sudoUser).replaceAll("{{GROUP}}", group);
|
|
81
|
+
const dst = "/Library/LaunchDaemons/com.abtars.daemon.plist";
|
|
82
|
+
const { writeFileSync, chmodSync } = await import("node:fs");
|
|
83
|
+
writeFileSync(dst, content);
|
|
84
|
+
chmodSync(dst, 420);
|
|
85
|
+
try {
|
|
86
|
+
execFileSync("launchctl", ["bootstrap", "system", dst]);
|
|
87
|
+
} catch (err) {
|
|
88
|
+
logAndSwallow("daemon", "op", err);
|
|
89
|
+
}
|
|
90
|
+
process.stdout.write(`\u2713 LaunchDaemon installed at ${dst}
|
|
91
|
+
`);
|
|
92
|
+
process.stdout.write(`\u2713 bridge runs as ${sudoUser}, survives logout + reboot
|
|
93
|
+
`);
|
|
94
|
+
return 0;
|
|
95
|
+
}
|
|
96
|
+
if (platform === "linux") {
|
|
97
|
+
const { execSync, execFileSync } = await import("node:child_process");
|
|
98
|
+
try {
|
|
99
|
+
execSync("systemctl --version", { stdio: "ignore" });
|
|
100
|
+
} catch {
|
|
101
|
+
process.stderr.write(`systemctl not found \u2014 requires systemd.
|
|
102
|
+
`);
|
|
103
|
+
return 2;
|
|
104
|
+
}
|
|
105
|
+
const unitSrc = join(pkgRoot, "scripts", "abtars-daemon.service");
|
|
106
|
+
if (!existsSync(unitSrc)) {
|
|
107
|
+
process.stderr.write(`Template not found: ${unitSrc}
|
|
108
|
+
`);
|
|
109
|
+
return 1;
|
|
110
|
+
}
|
|
111
|
+
let content = readFileSync(unitSrc, "utf-8");
|
|
112
|
+
content = content.replaceAll("{{USER}}", sudoUser);
|
|
113
|
+
let userPath = `/usr/local/bin:/usr/bin:/bin`;
|
|
114
|
+
try {
|
|
115
|
+
userPath = execSyncHome(`su - ${sudoUser} -c 'echo $PATH'`, { encoding: "utf-8" }).trim();
|
|
116
|
+
} catch {
|
|
117
|
+
}
|
|
118
|
+
content = content.replaceAll("{{PATH}}", userPath);
|
|
119
|
+
const dst = "/etc/systemd/system/abtars.service";
|
|
120
|
+
const { writeFileSync } = await import("node:fs");
|
|
121
|
+
writeFileSync(dst, content);
|
|
122
|
+
execFileSync("systemctl", ["daemon-reload"]);
|
|
123
|
+
execFileSync("systemctl", ["enable", "--now", "abtars"]);
|
|
124
|
+
const manifestPath = join(home, "manifest.json");
|
|
125
|
+
try {
|
|
126
|
+
const { readFileSync: rfs, writeFileSync: wfs } = await import("node:fs");
|
|
127
|
+
const mf = JSON.parse(rfs(manifestPath, "utf-8"));
|
|
128
|
+
mf.installMode = "supervised-daemon";
|
|
129
|
+
wfs(manifestPath, JSON.stringify(mf, null, 2) + "\n");
|
|
130
|
+
} catch {
|
|
131
|
+
}
|
|
132
|
+
process.stdout.write(`\u2713 systemd unit installed at ${dst}
|
|
133
|
+
`);
|
|
134
|
+
process.stdout.write(`\u2713 bridge runs as ${sudoUser}, survives logout + reboot
|
|
135
|
+
`);
|
|
136
|
+
return 0;
|
|
137
|
+
}
|
|
138
|
+
process.stderr.write(`Unsupported platform: ${platform}
|
|
139
|
+
`);
|
|
140
|
+
return 2;
|
|
141
|
+
}
|
|
142
|
+
async function daemonUninstall() {
|
|
143
|
+
const scope = detectScope();
|
|
144
|
+
if (!scope) {
|
|
145
|
+
process.stderr.write("No daemon service found.\n");
|
|
146
|
+
return 1;
|
|
147
|
+
}
|
|
148
|
+
if (scope === "system") {
|
|
149
|
+
if (process.getuid?.() !== 0) {
|
|
150
|
+
process.stderr.write(`Requires sudo: sudo -k $(which abtars) daemon uninstall
|
|
151
|
+
`);
|
|
152
|
+
return 2;
|
|
153
|
+
}
|
|
154
|
+
const { execFileSync } = await import("node:child_process");
|
|
155
|
+
const { unlinkSync } = await import("node:fs");
|
|
156
|
+
try {
|
|
157
|
+
execFileSync("systemctl", ["stop", "abtars"]);
|
|
158
|
+
} catch (err) {
|
|
159
|
+
logAndSwallow("daemon", "op", err);
|
|
160
|
+
}
|
|
161
|
+
try {
|
|
162
|
+
execFileSync("systemctl", ["disable", "abtars"]);
|
|
163
|
+
} catch (err) {
|
|
164
|
+
logAndSwallow("daemon", "op", err);
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
unlinkSync("/etc/systemd/system/abtars.service");
|
|
168
|
+
} catch (err) {
|
|
169
|
+
logAndSwallow("daemon", "op", err);
|
|
170
|
+
}
|
|
171
|
+
try {
|
|
172
|
+
execFileSync("systemctl", ["daemon-reload"]);
|
|
173
|
+
} catch (err) {
|
|
174
|
+
logAndSwallow("daemon", "op", err);
|
|
175
|
+
}
|
|
176
|
+
process.stdout.write("\u2713 system service removed\n");
|
|
177
|
+
} else {
|
|
178
|
+
const { execFileSync } = await import("node:child_process");
|
|
179
|
+
const { unlinkSync } = await import("node:fs");
|
|
180
|
+
const unit = join(process.env["HOME"] ?? "", ".config", "systemd", "user", "abtars-watchdog.service");
|
|
181
|
+
try {
|
|
182
|
+
execFileSync("systemctl", ["--user", "stop", "abtars-watchdog"]);
|
|
183
|
+
} catch (err) {
|
|
184
|
+
logAndSwallow("daemon", "op", err);
|
|
185
|
+
}
|
|
186
|
+
try {
|
|
187
|
+
execFileSync("systemctl", ["--user", "disable", "abtars-watchdog"]);
|
|
188
|
+
} catch (err) {
|
|
189
|
+
logAndSwallow("daemon", "op", err);
|
|
190
|
+
}
|
|
191
|
+
try {
|
|
192
|
+
unlinkSync(unit);
|
|
193
|
+
} catch (err) {
|
|
194
|
+
logAndSwallow("daemon", "op", err);
|
|
195
|
+
}
|
|
196
|
+
try {
|
|
197
|
+
execFileSync("systemctl", ["--user", "daemon-reload"]);
|
|
198
|
+
} catch (err) {
|
|
199
|
+
logAndSwallow("daemon", "op", err);
|
|
200
|
+
}
|
|
201
|
+
process.stdout.write("\u2713 user service removed\n");
|
|
202
|
+
}
|
|
203
|
+
return 0;
|
|
204
|
+
}
|
|
205
|
+
async function daemonControl(action) {
|
|
206
|
+
const scope = detectScope();
|
|
207
|
+
if (!scope) {
|
|
208
|
+
process.stderr.write("No daemon service found. Run: abtars daemon install\n");
|
|
209
|
+
return 1;
|
|
210
|
+
}
|
|
211
|
+
const { execFileSync } = await import("node:child_process");
|
|
212
|
+
const unit = unitName(scope);
|
|
213
|
+
const args = scope === "user" ? ["--user", action, unit] : [action, unit];
|
|
214
|
+
try {
|
|
215
|
+
execFileSync("systemctl", args, { stdio: "inherit" });
|
|
216
|
+
process.stdout.write(`\u2713 ${action} ${unit}
|
|
217
|
+
`);
|
|
218
|
+
} catch {
|
|
219
|
+
process.stderr.write(`\u2717 ${action} failed
|
|
220
|
+
`);
|
|
221
|
+
return 1;
|
|
222
|
+
}
|
|
223
|
+
return 0;
|
|
224
|
+
}
|
|
225
|
+
async function daemonStatus() {
|
|
226
|
+
const scope = detectScope();
|
|
227
|
+
if (!scope) {
|
|
228
|
+
process.stdout.write("No daemon service installed.\n");
|
|
229
|
+
process.stdout.write(" Install: sudo $(which abtars) daemon install\n");
|
|
230
|
+
return 0;
|
|
231
|
+
}
|
|
232
|
+
const { spawnSync } = await import("node:child_process");
|
|
233
|
+
const unit = unitName(scope);
|
|
234
|
+
const args = scope === "user" ? ["--user", "status", unit] : ["status", unit];
|
|
235
|
+
const r = spawnSync("systemctl", args, { encoding: "utf-8", stdio: ["ignore", "pipe", "pipe"] });
|
|
236
|
+
const output = r.stdout || r.stderr || "";
|
|
237
|
+
const activeMatch = output.match(/Active:\s+(.+)/);
|
|
238
|
+
const pidMatch = output.match(/Main PID:\s+(\d+)/);
|
|
239
|
+
process.stdout.write(`\u25CF ${unit} (${scope} scope)
|
|
240
|
+
`);
|
|
241
|
+
process.stdout.write(` ${activeMatch?.[1] ?? "unknown"}
|
|
242
|
+
`);
|
|
243
|
+
if (pidMatch) process.stdout.write(` PID: ${pidMatch[1]}
|
|
244
|
+
`);
|
|
245
|
+
const home = abtarsHome();
|
|
246
|
+
const lockPath = join(home, "bridge.lock");
|
|
247
|
+
if (existsSync(lockPath)) {
|
|
248
|
+
try {
|
|
249
|
+
const lock = JSON.parse(readFileSync(lockPath, "utf-8"));
|
|
250
|
+
if (lock.pid) process.stdout.write(` Bridge PID: ${lock.pid}
|
|
251
|
+
`);
|
|
252
|
+
if (lock.startedAt) {
|
|
253
|
+
const upMs = Date.now() - new Date(lock.startedAt).getTime();
|
|
254
|
+
const upMin = Math.round(upMs / 6e4);
|
|
255
|
+
process.stdout.write(` Uptime: ${upMin >= 60 ? `${Math.floor(upMin / 60)}h ${upMin % 60}m` : `${upMin}m`}
|
|
256
|
+
`);
|
|
257
|
+
}
|
|
258
|
+
if (lock.version) process.stdout.write(` Version: ${lock.version}
|
|
259
|
+
`);
|
|
260
|
+
if (lock.restartReason) process.stdout.write(` Last restart: ${lock.restartReason}
|
|
261
|
+
`);
|
|
262
|
+
} catch {
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
return 0;
|
|
266
|
+
}
|
|
267
|
+
async function daemon(args) {
|
|
268
|
+
const sub = args[0] ?? "status";
|
|
269
|
+
switch (sub) {
|
|
270
|
+
case "install":
|
|
271
|
+
return daemonInstall();
|
|
272
|
+
case "uninstall":
|
|
273
|
+
return daemonUninstall();
|
|
274
|
+
case "start":
|
|
275
|
+
return daemonControl("start");
|
|
276
|
+
case "stop":
|
|
277
|
+
return daemonControl("stop");
|
|
278
|
+
case "restart":
|
|
279
|
+
return daemonControl("restart");
|
|
280
|
+
case "status":
|
|
281
|
+
return daemonStatus();
|
|
282
|
+
default:
|
|
283
|
+
process.stderr.write(`Unknown: abtars daemon ${sub}
|
|
284
|
+
Usage: abtars daemon [install|uninstall|start|stop|restart|status]
|
|
285
|
+
`);
|
|
286
|
+
return 1;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
export {
|
|
290
|
+
daemon
|
|
291
|
+
};
|
|
292
|
+
//# sourceMappingURL=daemon-NPKYZ3CJ.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/cli/commands/daemon.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * `abtars daemon` \u2014 manage the system service (install/uninstall/start/stop/restart/status).\n */\nimport { existsSync, readFileSync } from \"node:fs\";\nimport { join, dirname } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\nimport { logAndSwallow } from \"../../components/log-and-swallow.js\";\n\nfunction abtarsHome(): string {\n return process.env[\"ABTARS_HOME\"] ?? join(process.env[\"HOME\"] ?? \"\", \".abtars\");\n}\n\nfunction isWSL(): boolean {\n try { return readFileSync(\"/proc/version\", \"utf-8\").toLowerCase().includes(\"microsoft\"); } catch { return false; }\n}\n\ntype Scope = \"system\" | \"user\" | null;\n\nfunction detectScope(): Scope {\n if (existsSync(\"/etc/systemd/system/abtars.service\")) return \"system\";\n const userUnit = join(process.env[\"HOME\"] ?? \"\", \".config\", \"systemd\", \"user\", \"abtars-watchdog.service\");\n if (existsSync(userUnit)) return \"user\";\n return null;\n}\nfunction unitName(scope: Scope): string {\n return scope === \"user\" ? \"abtars-watchdog\" : \"abtars\";\n}\n\n// \u2500\u2500 install \u2500\u2500\n\nasync function daemonInstall(): Promise<number> {\n const platform = process.platform;\n const pkgRoot = join(dirname(fileURLToPath(import.meta.url)), \"..\");\n\n if (platform === \"linux\" && isWSL()) {\n process.stderr.write(`\u2139\uFE0F WSL detected \u2014 ensure systemd is enabled (wsl.conf: [boot] systemd=true)\\n`);\n }\n\n const sudoUser = process.env[\"SUDO_USER\"];\n if (process.getuid?.() !== 0) {\n process.stderr.write(\n `Requires sudo for system-scope service registration.\\n` +\n `Run: sudo -k $(which abtars) daemon install\\n`,\n );\n return 2;\n }\n if (!sudoUser) {\n process.stderr.write(`Cannot determine target user \u2014 $SUDO_USER is not set.\\n`);\n return 2;\n }\n\n // Resolve the SUDO_USER's home, not root's\n const { execSync: execSyncHome } = await import(\"node:child_process\");\n const userHome = execSyncHome(`eval echo ~${sudoUser}`, { encoding: \"utf-8\" }).trim();\n const home = join(userHome, \".abtars\");\n\n const currentLink = join(home, \"current\");\n if (!existsSync(currentLink)) {\n process.stderr.write(`No release staged. Run 'abtars install' first.\\n`);\n return 2;\n }\n\n if (platform === \"darwin\") {\n const { execSync, execFileSync } = await import(\"node:child_process\");\n let group = sudoUser;\n try { group = execSync(`id -gn ${sudoUser}`, { encoding: \"utf-8\" }).trim(); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n\n const plistSrc = join(pkgRoot, \"scripts\", \"com.abtars.daemon.plist\");\n if (!existsSync(plistSrc)) { process.stderr.write(`Template not found: ${plistSrc}\\n`); return 1; }\n let content = readFileSync(plistSrc, \"utf-8\");\n content = content.replaceAll(\"{{USER}}\", sudoUser).replaceAll(\"{{GROUP}}\", group);\n const dst = \"/Library/LaunchDaemons/com.abtars.daemon.plist\";\n\n const { writeFileSync, chmodSync } = await import(\"node:fs\");\n writeFileSync(dst, content);\n chmodSync(dst, 0o644);\n try { execFileSync(\"launchctl\", [\"bootstrap\", \"system\", dst]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n process.stdout.write(`\u2713 LaunchDaemon installed at ${dst}\\n`);\n process.stdout.write(`\u2713 bridge runs as ${sudoUser}, survives logout + reboot\\n`);\n return 0;\n }\n\n if (platform === \"linux\") {\n const { execSync, execFileSync } = await import(\"node:child_process\");\n try { execSync(\"systemctl --version\", { stdio: \"ignore\" }); } catch {\n process.stderr.write(`systemctl not found \u2014 requires systemd.\\n`);\n return 2;\n }\n\n const unitSrc = join(pkgRoot, \"scripts\", \"abtars-daemon.service\");\n if (!existsSync(unitSrc)) { process.stderr.write(`Template not found: ${unitSrc}\\n`); return 1; }\n let content = readFileSync(unitSrc, \"utf-8\");\n content = content.replaceAll(\"{{USER}}\", sudoUser);\n // Get the user's full login PATH (includes nvm, cargo, etc.)\n let userPath = `/usr/local/bin:/usr/bin:/bin`;\n try { userPath = execSyncHome(`su - ${sudoUser} -c 'echo $PATH'`, { encoding: \"utf-8\" }).trim(); } catch { /* fallback */ }\n content = content.replaceAll(\"{{PATH}}\", userPath);\n const dst = \"/etc/systemd/system/abtars.service\";\n\n const { writeFileSync } = await import(\"node:fs\");\n writeFileSync(dst, content);\n execFileSync(\"systemctl\", [\"daemon-reload\"]);\n execFileSync(\"systemctl\", [\"enable\", \"--now\", \"abtars\"]);\n // Update manifest mode\n const manifestPath = join(home, \"manifest.json\");\n try {\n const { readFileSync: rfs, writeFileSync: wfs } = await import(\"node:fs\");\n const mf = JSON.parse(rfs(manifestPath, \"utf-8\"));\n mf.installMode = \"supervised-daemon\";\n wfs(manifestPath, JSON.stringify(mf, null, 2) + \"\\n\");\n } catch { /* best effort */ }\n process.stdout.write(`\u2713 systemd unit installed at ${dst}\\n`);\n process.stdout.write(`\u2713 bridge runs as ${sudoUser}, survives logout + reboot\\n`);\n return 0;\n }\n\n process.stderr.write(`Unsupported platform: ${platform}\\n`);\n return 2;\n}\n\n// \u2500\u2500 uninstall \u2500\u2500\n\nasync function daemonUninstall(): Promise<number> {\n const scope = detectScope();\n if (!scope) { process.stderr.write(\"No daemon service found.\\n\"); return 1; }\n\n if (scope === \"system\") {\n if (process.getuid?.() !== 0) {\n process.stderr.write(`Requires sudo: sudo -k $(which abtars) daemon uninstall\\n`);\n return 2;\n }\n const { execFileSync } = await import(\"node:child_process\");\n const { unlinkSync } = await import(\"node:fs\");\n try { execFileSync(\"systemctl\", [\"stop\", \"abtars\"]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n try { execFileSync(\"systemctl\", [\"disable\", \"abtars\"]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n try { unlinkSync(\"/etc/systemd/system/abtars.service\"); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n try { execFileSync(\"systemctl\", [\"daemon-reload\"]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n process.stdout.write(\"\u2713 system service removed\\n\");\n } else {\n const { execFileSync } = await import(\"node:child_process\");\n const { unlinkSync } = await import(\"node:fs\");\n const unit = join(process.env[\"HOME\"] ?? \"\", \".config\", \"systemd\", \"user\", \"abtars-watchdog.service\");\n try { execFileSync(\"systemctl\", [\"--user\", \"stop\", \"abtars-watchdog\"]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n try { execFileSync(\"systemctl\", [\"--user\", \"disable\", \"abtars-watchdog\"]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n try { unlinkSync(unit); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n try { execFileSync(\"systemctl\", [\"--user\", \"daemon-reload\"]); } catch (err) { logAndSwallow(\"daemon\", \"op\", err); }\n process.stdout.write(\"\u2713 user service removed\\n\");\n }\n return 0;\n}\n\n// \u2500\u2500 start/stop/restart \u2500\u2500\n\nasync function daemonControl(action: \"start\" | \"stop\" | \"restart\"): Promise<number> {\n const scope = detectScope();\n if (!scope) { process.stderr.write(\"No daemon service found. Run: abtars daemon install\\n\"); return 1; }\n const { execFileSync } = await import(\"node:child_process\");\n const unit = unitName(scope);\n const args = scope === \"user\" ? [\"--user\", action, unit] : [action, unit];\n try {\n execFileSync(\"systemctl\", args, { stdio: \"inherit\" });\n process.stdout.write(`\u2713 ${action} ${unit}\\n`);\n } catch {\n process.stderr.write(`\u2717 ${action} failed\\n`);\n return 1;\n }\n return 0;\n}\n\n// \u2500\u2500 status \u2500\u2500\n\nasync function daemonStatus(): Promise<number> {\n const scope = detectScope();\n if (!scope) {\n process.stdout.write(\"No daemon service installed.\\n\");\n process.stdout.write(\" Install: sudo $(which abtars) daemon install\\n\");\n return 0;\n }\n\n const { spawnSync } = await import(\"node:child_process\");\n const unit = unitName(scope);\n const args = scope === \"user\" ? [\"--user\", \"status\", unit] : [\"status\", unit];\n const r = spawnSync(\"systemctl\", args, { encoding: \"utf-8\", stdio: [\"ignore\", \"pipe\", \"pipe\"] });\n const output = r.stdout || r.stderr || \"\";\n\n // Parse active state\n const activeMatch = output.match(/Active:\\s+(.+)/);\n const pidMatch = output.match(/Main PID:\\s+(\\d+)/);\n\n process.stdout.write(`\u25CF ${unit} (${scope} scope)\\n`);\n process.stdout.write(` ${activeMatch?.[1] ?? \"unknown\"}\\n`);\n if (pidMatch) process.stdout.write(` PID: ${pidMatch[1]}\\n`);\n\n // Bridge info from bridge.lock\n const home = abtarsHome();\n const lockPath = join(home, \"bridge.lock\");\n if (existsSync(lockPath)) {\n try {\n const lock = JSON.parse(readFileSync(lockPath, \"utf-8\"));\n if (lock.pid) process.stdout.write(` Bridge PID: ${lock.pid}\\n`);\n if (lock.startedAt) {\n const upMs = Date.now() - new Date(lock.startedAt).getTime();\n const upMin = Math.round(upMs / 60000);\n process.stdout.write(` Uptime: ${upMin >= 60 ? `${Math.floor(upMin / 60)}h ${upMin % 60}m` : `${upMin}m`}\\n`);\n }\n if (lock.version) process.stdout.write(` Version: ${lock.version}\\n`);\n if (lock.restartReason) process.stdout.write(` Last restart: ${lock.restartReason}\\n`);\n } catch { /* ignore */ }\n }\n return 0;\n}\n\n// \u2500\u2500 router \u2500\u2500\n\nexport async function daemon(args: string[]): Promise<number> {\n const sub = args[0] ?? \"status\";\n switch (sub) {\n case \"install\": return daemonInstall();\n case \"uninstall\": return daemonUninstall();\n case \"start\": return daemonControl(\"start\");\n case \"stop\": return daemonControl(\"stop\");\n case \"restart\": return daemonControl(\"restart\");\n case \"status\": return daemonStatus();\n default:\n process.stderr.write(`Unknown: abtars daemon ${sub}\\nUsage: abtars daemon [install|uninstall|start|stop|restart|status]\\n`);\n return 1;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAMA;AAHA,SAAS,YAAY,oBAAoB;AACzC,SAAS,MAAM,eAAe;AAC9B,SAAS,qBAAqB;AAG9B,SAAS,aAAqB;AAC5B,SAAO,QAAQ,IAAI,aAAa,KAAK,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,SAAS;AAChF;AAEA,SAAS,QAAiB;AACxB,MAAI;AAAE,WAAO,aAAa,iBAAiB,OAAO,EAAE,YAAY,EAAE,SAAS,WAAW;AAAA,EAAG,QAAQ;AAAE,WAAO;AAAA,EAAO;AACnH;AAIA,SAAS,cAAqB;AAC5B,MAAI,WAAW,oCAAoC,EAAG,QAAO;AAC7D,QAAM,WAAW,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,WAAW,WAAW,QAAQ,yBAAyB;AACxG,MAAI,WAAW,QAAQ,EAAG,QAAO;AACjC,SAAO;AACT;AACA,SAAS,SAAS,OAAsB;AACtC,SAAO,UAAU,SAAS,oBAAoB;AAChD;AAIA,eAAe,gBAAiC;AAC9C,QAAM,WAAW,QAAQ;AACzB,QAAM,UAAU,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC,GAAG,IAAI;AAElE,MAAI,aAAa,WAAW,MAAM,GAAG;AACnC,YAAQ,OAAO,MAAM;AAAA,CAAgF;AAAA,EACvG;AAEA,QAAM,WAAW,QAAQ,IAAI,WAAW;AACxC,MAAI,QAAQ,SAAS,MAAM,GAAG;AAC5B,YAAQ,OAAO;AAAA,MACb;AAAA;AAAA;AAAA,I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AA,CAAI;AAAA,IACxF,QAAQ;AAAA,IAAe;AAAA,EACzB;AACA,SAAO;AACT;AAIA,eAAsB,OAAO,MAAiC;AAC5D,QAAM,MAAM,KAAK,CAAC,KAAK;AACvB,UAAQ,KAAK;AAAA,IACX,KAAK;AAAW,aAAO,cAAc;AAAA,IACrC,KAAK;AAAa,aAAO,gBAAgB;AAAA,IACzC,KAAK;AAAS,aAAO,cAAc,OAAO;AAAA,IAC1C,KAAK;AAAQ,aAAO,cAAc,MAAM;AAAA,IACxC,KAAK;AAAW,aAAO,cAAc,SAAS;AAAA,IAC9C,KAAK;AAAU,aAAO,aAAa;AAAA,IACnC;AACE,cAAQ,OAAO,MAAM,0BAA0B,GAAG;AAAA;AAAA,CAAwE;AAC1H,aAAO;AAAA,EACX;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
checkSessionTool,
|
|
5
|
+
consumePendingInstruction,
|
|
6
|
+
getActiveBackgrounds,
|
|
7
|
+
getDelegationTools,
|
|
8
|
+
sendToSessionTool,
|
|
9
|
+
setDelegationDeps,
|
|
10
|
+
spawnSessionTool,
|
|
11
|
+
terminateSessionTool
|
|
12
|
+
} from "./chunk-L7YHV5DL.js";
|
|
13
|
+
import "./chunk-MV6CJFWR.js";
|
|
14
|
+
import "./chunk-AQVOAQQI.js";
|
|
15
|
+
import "./chunk-2BY6I4P5.js";
|
|
16
|
+
import "./chunk-MJ6PHMOK.js";
|
|
17
|
+
import "./chunk-7K2YZTLD.js";
|
|
18
|
+
export {
|
|
19
|
+
checkSessionTool,
|
|
20
|
+
consumePendingInstruction,
|
|
21
|
+
getActiveBackgrounds,
|
|
22
|
+
getDelegationTools,
|
|
23
|
+
sendToSessionTool,
|
|
24
|
+
setDelegationDeps,
|
|
25
|
+
spawnSessionTool,
|
|
26
|
+
terminateSessionTool
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=delegation-tools-PF7RD2RW.js.map
|
|
@@ -1,4 +1,5 @@
|
|
|
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
|
LockHeldError,
|
|
4
5
|
RETENTION,
|
|
@@ -21,8 +22,8 @@ import {
|
|
|
21
22
|
resolveUserBinDir,
|
|
22
23
|
safeCopyTree,
|
|
23
24
|
writeManifest
|
|
24
|
-
} from "./chunk-
|
|
25
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-HXJRZWKA.js";
|
|
26
|
+
import "./chunk-7K2YZTLD.js";
|
|
26
27
|
export {
|
|
27
28
|
LockHeldError,
|
|
28
29
|
RETENTION,
|
|
@@ -46,4 +47,4 @@ export {
|
|
|
46
47
|
safeCopyTree,
|
|
47
48
|
writeManifest
|
|
48
49
|
};
|
|
49
|
-
//# sourceMappingURL=deploy-lib-import-
|
|
50
|
+
//# sourceMappingURL=deploy-lib-import-ODLDL2DB.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
|
+
signMessage,
|
|
5
|
+
stripSigTag,
|
|
6
|
+
verifyMessage
|
|
7
|
+
} from "./chunk-SY67HM2Y.js";
|
|
8
|
+
import "./chunk-7K2YZTLD.js";
|
|
9
|
+
export {
|
|
10
|
+
signMessage,
|
|
11
|
+
stripSigTag,
|
|
12
|
+
verifyMessage
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=digital-signature-PNY4TR2W.js.map
|
|
@@ -1,36 +1,37 @@
|
|
|
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
|
classifyError
|
|
4
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CUQA2AJT.js";
|
|
5
6
|
import {
|
|
6
7
|
recordUsage
|
|
7
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-OW64RUE5.js";
|
|
8
9
|
import {
|
|
9
10
|
executeToolCall,
|
|
10
11
|
getToolSchemas
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-JU3UBWLN.js";
|
|
13
|
+
import "./chunk-JAJ3DUQ2.js";
|
|
14
|
+
import "./chunk-JRG4EFMP.js";
|
|
15
|
+
import "./chunk-ELRAH7VL.js";
|
|
16
|
+
import "./chunk-L7YHV5DL.js";
|
|
17
|
+
import "./chunk-MV6CJFWR.js";
|
|
17
18
|
import {
|
|
18
19
|
init_log_and_swallow,
|
|
19
20
|
logAndSwallow
|
|
20
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EX2SRTUE.js";
|
|
21
22
|
import {
|
|
22
23
|
getEnv,
|
|
23
24
|
init_env_schema
|
|
24
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-AQVOAQQI.js";
|
|
25
26
|
import {
|
|
26
27
|
init_logger,
|
|
27
28
|
logDebug,
|
|
28
29
|
logInfo,
|
|
29
30
|
logTrace,
|
|
30
31
|
logWarn
|
|
31
|
-
} from "./chunk-
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
32
|
+
} from "./chunk-2BY6I4P5.js";
|
|
33
|
+
import "./chunk-MJ6PHMOK.js";
|
|
34
|
+
import "./chunk-7K2YZTLD.js";
|
|
34
35
|
|
|
35
36
|
// src/components/transport/direct-api-transport.ts
|
|
36
37
|
init_env_schema();
|
|
@@ -384,7 +385,7 @@ var DirectApiTransport = class {
|
|
|
384
385
|
return await this.sendWithPolicy(session, ac.signal);
|
|
385
386
|
} finally {
|
|
386
387
|
const durationMs = Date.now() - (this._promptStartedAt ?? Date.now());
|
|
387
|
-
import("./hook-system-
|
|
388
|
+
import("./hook-system-POI5VRIX.js").then(({ hasHooks, fire }) => {
|
|
388
389
|
if (!hasHooks("AfterPrompt")) return;
|
|
389
390
|
fire("AfterPrompt", {
|
|
390
391
|
event: "AfterPrompt",
|
|
@@ -599,8 +600,8 @@ ${summary}`);
|
|
|
599
600
|
const composed = AbortSignal.any([signal, timeoutCtrl.signal]);
|
|
600
601
|
try {
|
|
601
602
|
if (this.config.apiFormat === "responses") {
|
|
602
|
-
const { toResponsesRequest } = await import("./responses-adapter-
|
|
603
|
-
const { parseResponsesSSE } = await import("./sse-parser-responses-
|
|
603
|
+
const { toResponsesRequest } = await import("./responses-adapter-DAV2JUL7.js");
|
|
604
|
+
const { parseResponsesSSE } = await import("./sse-parser-responses-WG2LY2ML.js");
|
|
604
605
|
const msgs = session.messages.map((m) => ({ role: m.role, content: m.content ?? "" }));
|
|
605
606
|
const reqBody = { ...toResponsesRequest(this.activeModel, msgs, getToolSchemas(this.sandboxPolicy), this.config.maxOutput), stream: true };
|
|
606
607
|
const hdrs = { "Content-Type": "application/json" };
|
|
@@ -638,8 +639,8 @@ ${summary}`);
|
|
|
638
639
|
return { content: content2 || null, toolCalls: toolCalls2, usage: usage2 };
|
|
639
640
|
}
|
|
640
641
|
if (this.config.apiFormat === "anthropic") {
|
|
641
|
-
const { toAnthropicRequest, buildAnthropicHeaders } = await import("./anthropic-adapter-
|
|
642
|
-
const { parseAnthropicSSE } = await import("./sse-parser-anthropic-
|
|
642
|
+
const { toAnthropicRequest, buildAnthropicHeaders } = await import("./anthropic-adapter-IBY3NPXW.js");
|
|
643
|
+
const { parseAnthropicSSE } = await import("./sse-parser-anthropic-H42TTLBD.js");
|
|
643
644
|
const msgs = session.messages.map((m) => ({ role: m.role, content: m.content ?? "", tool_call_id: m.tool_call_id }));
|
|
644
645
|
const reqBody = { ...toAnthropicRequest(this.activeModel, msgs, this.config.maxOutput, getToolSchemas(this.sandboxPolicy)), stream: true };
|
|
645
646
|
const hdrs = buildAnthropicHeaders(this.activeApiKey ?? "");
|
|
@@ -857,4 +858,4 @@ export {
|
|
|
857
858
|
DirectApiTransport,
|
|
858
859
|
normalizeToolCalls
|
|
859
860
|
};
|
|
860
|
-
//# sourceMappingURL=direct-api-transport-
|
|
861
|
+
//# sourceMappingURL=direct-api-transport-EADHM67Z.js.map
|