abtars 0.2.1-alpha.9 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +64 -0
- package/README.md +93 -34
- package/bundle/{_registry.generated-ADOYFJJ4.js → _registry.generated-FNJOX7VV.js} +19 -16
- package/bundle/{_registry.generated-ADOYFJJ4.js.map → _registry.generated-FNJOX7VV.js.map} +1 -1
- package/bundle/abtars-browser.js +5 -6
- package/bundle/abtars-browser.js.map +2 -2
- package/bundle/abtars-cli.js +150 -176
- package/bundle/abtars-cli.js.map +4 -4
- package/bundle/abtars-restart.js +4 -4
- package/bundle/abtars-rss.js +25 -81
- package/bundle/abtars-rss.js.map +2 -2
- package/bundle/abtars-task.js +4 -5
- package/bundle/abtars-task.js.map +2 -2
- package/bundle/abtars-todo.js +133 -0
- package/bundle/abtars-todo.js.map +7 -0
- package/bundle/abtars.js +224 -157
- package/bundle/abtars.js.map +3 -3
- package/bundle/action-gate-DYV2XQBP.js +191 -0
- package/bundle/action-gate-DYV2XQBP.js.map +7 -0
- package/bundle/{agent-api-rate-limit-C25WGSFF.js → agent-api-rate-limit-R2OFAQ3N.js} +4 -4
- package/bundle/{agent-registry-SYUFNSVB.js → agent-registry-S2MNHQYQ.js} +8 -8
- package/bundle/{bridge-lock-transport-HO545SBK.js → bridge-lock-transport-N6OGDOSE.js} +5 -5
- package/bundle/{browse-delivery-VTLEAVYA.js → browse-delivery-DXGMDMXA.js} +8 -7
- package/bundle/{browser-REIXOJ6S.js → browser-QMYGSP5W.js} +11 -10
- package/bundle/{capability-ILW3D5HS.js → capability-733TLH4W.js} +6 -6
- package/bundle/{chunk-ZVDVNSXK.js → chunk-2SWKJX64.js} +7 -7
- package/bundle/{chunk-PZE3J7ER.js → chunk-3OXQWII3.js} +2 -2
- package/bundle/{chunk-R36WIOYX.js → chunk-3X6VGRL6.js} +33 -6
- package/bundle/chunk-3X6VGRL6.js.map +7 -0
- package/bundle/{chunk-4KJ76TTE.js → chunk-4XW7YA3K.js} +3 -3
- package/bundle/{chunk-Q62SXS73.js → chunk-BBDKU4EH.js} +9 -9
- package/bundle/{chunk-EX2SRTUE.js → chunk-CYSGXNBY.js} +2 -2
- package/bundle/{chunk-LYEAHE5V.js → chunk-DCY7DGMT.js} +2 -2
- package/bundle/chunk-DGS7J4P6.js +13 -0
- package/bundle/chunk-DGS7J4P6.js.map +7 -0
- package/bundle/{chunk-LDKSCXGL.js → chunk-DHPFI7OF.js} +8 -6
- package/bundle/{chunk-LDKSCXGL.js.map → chunk-DHPFI7OF.js.map} +1 -1
- package/bundle/{chunk-G6IXMYIO.js → chunk-DO4INSXE.js} +2 -2
- package/bundle/{chunk-VA5WKN3Z.js → chunk-EGA6JQVV.js} +4 -4
- package/bundle/chunk-EKHNWFEQ.js +85 -0
- package/bundle/chunk-EKHNWFEQ.js.map +7 -0
- package/bundle/{chunk-URAQLQ2U.js → chunk-F3HMZFIL.js} +4 -4
- package/bundle/{chunk-OOKLEC6V.js → chunk-FY3QUO2L.js} +7 -7
- package/bundle/{chunk-2BY6I4P5.js → chunk-GUTRAMK3.js} +2 -2
- package/bundle/{chunk-GPL57SRN.js → chunk-H7RX7UCR.js} +3 -3
- package/bundle/{chunk-BYDUMHXT.js → chunk-HAF2AFBW.js} +2 -2
- package/bundle/{chunk-A5OJYQNU.js → chunk-HCYENZAB.js} +49 -22
- package/bundle/chunk-HCYENZAB.js.map +7 -0
- package/bundle/{chunk-OZ4IZFV4.js → chunk-HJQZP5CK.js} +9 -9
- package/bundle/{chunk-OZ4IZFV4.js.map → chunk-HJQZP5CK.js.map} +2 -2
- package/bundle/{chunk-HEHD3GG5.js → chunk-ITB2K6LI.js} +6 -13
- package/bundle/{chunk-HEHD3GG5.js.map → chunk-ITB2K6LI.js.map} +3 -3
- package/bundle/{chunk-KSEIWT4T.js → chunk-JFKOPNKL.js} +10 -10
- package/bundle/chunk-JFKOPNKL.js.map +7 -0
- package/bundle/{chunk-4BUOO6WI.js → chunk-KL5QRHHK.js} +31 -11
- package/bundle/chunk-KL5QRHHK.js.map +7 -0
- package/bundle/{chunk-KFENC7BM.js → chunk-L33WNMCP.js} +2 -2
- package/bundle/{chunk-JRG4EFMP.js → chunk-LBMETTUP.js} +3 -3
- package/bundle/{chunk-TYVI3ZWA.js → chunk-LJAG2URA.js} +10 -7
- package/bundle/chunk-LJAG2URA.js.map +7 -0
- package/bundle/{chunk-RV54J75Q.js → chunk-MHK4UPM6.js} +13 -12
- package/bundle/chunk-MHK4UPM6.js.map +7 -0
- package/bundle/chunk-NIYVCGBC.js +330 -0
- package/bundle/chunk-NIYVCGBC.js.map +7 -0
- package/bundle/{chunk-P2BZSLJJ.js → chunk-OGZXYN6E.js} +392 -125
- package/bundle/chunk-OGZXYN6E.js.map +7 -0
- package/bundle/{chunk-TOUZC6NR.js → chunk-OKMN6J4Z.js} +3 -3
- package/bundle/{chunk-CELR236Q.js → chunk-Q7CH5DA3.js} +2 -2
- package/bundle/{chunk-XZSYMCLF.js → chunk-QIAFGDRL.js} +7 -7
- package/bundle/chunk-RITEGAW6.js +138 -0
- package/bundle/chunk-RITEGAW6.js.map +7 -0
- package/bundle/{chunk-UDZIZB5F.js → chunk-RTL7HO3N.js} +3 -3
- package/bundle/{chunk-ITG6XGBS.js → chunk-SA44ITVX.js} +10 -10
- package/bundle/{chunk-3MO2MDXJ.js → chunk-SA6YEFNG.js} +3 -3
- package/bundle/{chunk-GBBTK6H2.js → chunk-SRFEIZQT.js} +4 -4
- package/bundle/{chunk-ELRAH7VL.js → chunk-VXUVKC66.js} +3 -3
- package/bundle/{chunk-X5FBUA53.js → chunk-WLAVZSVZ.js} +69 -30
- package/bundle/chunk-WLAVZSVZ.js.map +7 -0
- package/bundle/{chunk-RSWUPUNA.js → chunk-WMWI3SJ7.js} +30 -6
- package/bundle/chunk-WMWI3SJ7.js.map +7 -0
- package/bundle/{chunk-MJ6PHMOK.js → chunk-WW5F2DCO.js} +11 -2
- package/bundle/chunk-WW5F2DCO.js.map +7 -0
- package/bundle/chunk-YWZPKBO6.js +22 -0
- package/bundle/chunk-YWZPKBO6.js.map +7 -0
- package/bundle/{chunk-KWBGYWDO.js → chunk-Z4SWEFIY.js} +12 -14
- package/bundle/chunk-Z4SWEFIY.js.map +7 -0
- package/bundle/chunk-ZAA7B5BN.js +22 -0
- package/bundle/chunk-ZAA7B5BN.js.map +7 -0
- package/bundle/{commands-WUGPBPHI.js → commands-AXW7L2MZ.js} +15 -14
- package/bundle/{config-DQIGDX4W.js → config-NDEYF4AQ.js} +7 -7
- package/bundle/{daemon-NPKYZ3CJ.js → daemon-WOQXCKNL.js} +4 -4
- package/bundle/{delegation-tools-6FICZQ5G.js → delegation-tools-Z5OM3TXS.js} +5 -5
- package/bundle/{deploy-lib-import-SBKXDD3F.js → deploy-lib-import-6VJTYXEG.js} +2 -2
- package/bundle/{deps-HN6CEXA4.js → deps-65V7XXG4.js} +4 -4
- package/bundle/{direct-api-transport-TRV45NO6.js → direct-api-transport-LSAUIP5S.js} +27 -15
- package/bundle/direct-api-transport-LSAUIP5S.js.map +7 -0
- package/bundle/{discord-adapter-WA2MFRK3.js → discord-adapter-LNWTIOUK.js} +27 -24
- package/bundle/discord-adapter-LNWTIOUK.js.map +7 -0
- package/bundle/{dns-wakeup-RYOCQ6GR.js → dns-wakeup-N46RPU5E.js} +3 -3
- package/bundle/{doctor-R54GZPKL.js → doctor-PIPSGI3H.js} +18 -7
- package/bundle/{doctor-R54GZPKL.js.map → doctor-PIPSGI3H.js.map} +2 -2
- package/bundle/{ensure-invariants-BJIEOSJ2.js → ensure-invariants-3NOBCYWS.js} +4 -4
- package/bundle/{env-schema-XCPAJ6IZ.js → env-schema-T43X43BU.js} +4 -4
- package/bundle/{hook-system-POI5VRIX.js → hook-system-ZCVOFFRD.js} +4 -4
- package/bundle/hotskills-DTROJY6G.js +17 -0
- package/bundle/{install-SH4UVUXQ.js → install-FZT43PTH.js} +3 -3
- package/bundle/{install-manifest-QRWID3KZ.js → install-manifest-KBYD7SAY.js} +3 -3
- package/bundle/{irc-adapter-AIEP6OX6.js → irc-adapter-HXO5D4SW.js} +3 -3
- package/bundle/{irc-config-6VY67UPQ.js → irc-config-XN5VW2V4.js} +5 -5
- package/bundle/{lazy-require-UFYFFX2R.js → lazy-require-R3JYCV5M.js} +4 -4
- package/bundle/{media-utils-MOE36VWY.js → media-utils-W7XW3SVV.js} +4 -4
- package/bundle/{message-pipeline-2MBT44FO.js → message-pipeline-QX272U5X.js} +17 -14
- package/bundle/meta.json +2946 -2305
- package/bundle/{notification-U6F5ZBSG.js → notification-ULESRDHB.js} +7 -6
- package/bundle/{openrouter-credits-7XXO6QGQ.js → openrouter-credits-PLIKRY5D.js} +4 -4
- package/bundle/{paths-ZJYIDND2.js → paths-QQM74XYT.js} +4 -2
- package/bundle/{peer-client-T44VI7NB.js → peer-client-D2F5QWRV.js} +8 -8
- package/bundle/{peer-config-D5A4454H.js → peer-config-5SUIBJLG.js} +5 -5
- package/bundle/{phase-transport-FEZ4SIJJ.js → phase-transport-BSGROTHY.js} +10 -10
- package/bundle/{restore-MFSW3EBL.js → restore-Z6MF54HS.js} +4 -4
- package/bundle/{restore-MFSW3EBL.js.map → restore-Z6MF54HS.js.map} +2 -2
- package/bundle/{update-check-O5MS6B3L.js → rollback-5RXXLUD6.js} +5 -7
- package/bundle/{self-healer-utils-7NFH22VJ.js → self-healer-utils-WPKOVXJD.js} +4 -4
- package/bundle/{skill-stats-IPVKMWN3.js → skill-stats-NHNH47QW.js} +5 -5
- package/bundle/{sleep-BPWX3FCN.js → sleep-K7EXAFGW.js} +8 -8
- package/bundle/{soul-bundle-BRIUDEQ2.js → soul-bundle-QTPWDJB2.js} +7 -7
- package/bundle/{soul-loader-GBXJ7EBH.js → soul-loader-LCPTN4PK.js} +8 -8
- package/bundle/{sse-parser-anthropic-H42TTLBD.js → sse-parser-anthropic-PYDJM3UC.js} +4 -4
- package/bundle/{sse-parser-responses-WG2LY2ML.js → sse-parser-responses-FYT7A5WT.js} +4 -4
- package/bundle/{ssrf-guard-E2KBBC5E.js → ssrf-guard-R4P5OCTO.js} +4 -4
- package/bundle/{start-CBVKNEAT.js → start-4DNURGIY.js} +1 -1
- package/bundle/{stt-CF3CPFDC.js → stt-YN77NND6.js} +5 -5
- package/bundle/{subagent-runtime-4MTYUBIZ.js → subagent-runtime-FQAT3564.js} +5 -5
- package/bundle/system-event-buffer-OEPPNUGK.js +17 -0
- package/bundle/system-event-buffer-OEPPNUGK.js.map +7 -0
- package/bundle/{system-message-TALP6GP2.js → system-message-BRU267FW.js} +3 -3
- package/bundle/{system-status-GLYXXDE3.js → system-status-7K2QTH3J.js} +58 -51
- package/bundle/system-status-7K2QTH3J.js.map +7 -0
- package/bundle/{hotskills-6ECHLXTJ.js → task-failure-buffer-DPM5MWZ5.js} +8 -7
- package/bundle/{task-store-LC7ZMS72.js → task-store-VCBHAB43.js} +5 -5
- package/bundle/{telegram-adapter-BJJYXN7J.js → telegram-adapter-LXLSG4SK.js} +51 -33
- package/bundle/telegram-adapter-LXLSG4SK.js.map +7 -0
- package/bundle/{tool-registry-T7XLTI2Q.js → tool-registry-5PXNSYOI.js} +12 -9
- package/bundle/{tool-sandbox-OZMXJZLQ.js → tool-sandbox-TLAL55QP.js} +5 -5
- package/bundle/{transport-config-G5NKQXPJ.js → transport-config-JIKHB7GT.js} +8 -8
- package/bundle/update-check-AJMIBQGQ.js +81 -0
- package/bundle/update-check-AJMIBQGQ.js.map +7 -0
- package/bundle/{user-registry-NUVNEHJU.js → user-registry-PEFDZ5AV.js} +5 -5
- package/bundle/user-registry-PEFDZ5AV.js.map +7 -0
- package/core/skills/tools/gmail/SKILL.md +5 -14
- package/core/skills/tools/rss/SKILL.md +51 -0
- package/install-manifest.json +4 -2
- package/package.json +3 -2
- package/scripts/build-and-deploy.sh +28 -0
- package/scripts/doctor.sh +38 -0
- package/scripts/emergency-deploy.sh +95 -0
- package/scripts/watchdog.sh +51 -5
- package/bundle/chunk-4BUOO6WI.js.map +0 -7
- package/bundle/chunk-A5OJYQNU.js.map +0 -7
- package/bundle/chunk-JX3ZZU3O.js +0 -82
- package/bundle/chunk-JX3ZZU3O.js.map +0 -7
- package/bundle/chunk-KJOCXWJ5.js +0 -131
- package/bundle/chunk-KJOCXWJ5.js.map +0 -7
- package/bundle/chunk-KSEIWT4T.js.map +0 -7
- package/bundle/chunk-KWBGYWDO.js.map +0 -7
- package/bundle/chunk-MJ6PHMOK.js.map +0 -7
- package/bundle/chunk-P2BZSLJJ.js.map +0 -7
- package/bundle/chunk-R36WIOYX.js.map +0 -7
- package/bundle/chunk-RE3F3CFW.js +0 -300
- package/bundle/chunk-RE3F3CFW.js.map +0 -7
- package/bundle/chunk-RSWUPUNA.js.map +0 -7
- package/bundle/chunk-RV54J75Q.js.map +0 -7
- package/bundle/chunk-TYVI3ZWA.js.map +0 -7
- package/bundle/chunk-X5FBUA53.js.map +0 -7
- package/bundle/direct-api-transport-TRV45NO6.js.map +0 -7
- package/bundle/discord-adapter-WA2MFRK3.js.map +0 -7
- package/bundle/system-status-GLYXXDE3.js.map +0 -7
- package/bundle/telegram-adapter-BJJYXN7J.js.map +0 -7
- /package/bundle/{agent-api-rate-limit-C25WGSFF.js.map → agent-api-rate-limit-R2OFAQ3N.js.map} +0 -0
- /package/bundle/{agent-registry-SYUFNSVB.js.map → agent-registry-S2MNHQYQ.js.map} +0 -0
- /package/bundle/{bridge-lock-transport-HO545SBK.js.map → bridge-lock-transport-N6OGDOSE.js.map} +0 -0
- /package/bundle/{browse-delivery-VTLEAVYA.js.map → browse-delivery-DXGMDMXA.js.map} +0 -0
- /package/bundle/{browser-REIXOJ6S.js.map → browser-QMYGSP5W.js.map} +0 -0
- /package/bundle/{capability-ILW3D5HS.js.map → capability-733TLH4W.js.map} +0 -0
- /package/bundle/{chunk-ZVDVNSXK.js.map → chunk-2SWKJX64.js.map} +0 -0
- /package/bundle/{chunk-PZE3J7ER.js.map → chunk-3OXQWII3.js.map} +0 -0
- /package/bundle/{chunk-4KJ76TTE.js.map → chunk-4XW7YA3K.js.map} +0 -0
- /package/bundle/{chunk-Q62SXS73.js.map → chunk-BBDKU4EH.js.map} +0 -0
- /package/bundle/{chunk-EX2SRTUE.js.map → chunk-CYSGXNBY.js.map} +0 -0
- /package/bundle/{chunk-LYEAHE5V.js.map → chunk-DCY7DGMT.js.map} +0 -0
- /package/bundle/{chunk-G6IXMYIO.js.map → chunk-DO4INSXE.js.map} +0 -0
- /package/bundle/{chunk-VA5WKN3Z.js.map → chunk-EGA6JQVV.js.map} +0 -0
- /package/bundle/{chunk-URAQLQ2U.js.map → chunk-F3HMZFIL.js.map} +0 -0
- /package/bundle/{chunk-OOKLEC6V.js.map → chunk-FY3QUO2L.js.map} +0 -0
- /package/bundle/{chunk-2BY6I4P5.js.map → chunk-GUTRAMK3.js.map} +0 -0
- /package/bundle/{chunk-GPL57SRN.js.map → chunk-H7RX7UCR.js.map} +0 -0
- /package/bundle/{chunk-BYDUMHXT.js.map → chunk-HAF2AFBW.js.map} +0 -0
- /package/bundle/{chunk-KFENC7BM.js.map → chunk-L33WNMCP.js.map} +0 -0
- /package/bundle/{chunk-JRG4EFMP.js.map → chunk-LBMETTUP.js.map} +0 -0
- /package/bundle/{chunk-TOUZC6NR.js.map → chunk-OKMN6J4Z.js.map} +0 -0
- /package/bundle/{chunk-CELR236Q.js.map → chunk-Q7CH5DA3.js.map} +0 -0
- /package/bundle/{chunk-XZSYMCLF.js.map → chunk-QIAFGDRL.js.map} +0 -0
- /package/bundle/{chunk-UDZIZB5F.js.map → chunk-RTL7HO3N.js.map} +0 -0
- /package/bundle/{chunk-ITG6XGBS.js.map → chunk-SA44ITVX.js.map} +0 -0
- /package/bundle/{chunk-3MO2MDXJ.js.map → chunk-SA6YEFNG.js.map} +0 -0
- /package/bundle/{chunk-GBBTK6H2.js.map → chunk-SRFEIZQT.js.map} +0 -0
- /package/bundle/{chunk-ELRAH7VL.js.map → chunk-VXUVKC66.js.map} +0 -0
- /package/bundle/{commands-WUGPBPHI.js.map → commands-AXW7L2MZ.js.map} +0 -0
- /package/bundle/{config-DQIGDX4W.js.map → config-NDEYF4AQ.js.map} +0 -0
- /package/bundle/{daemon-NPKYZ3CJ.js.map → daemon-WOQXCKNL.js.map} +0 -0
- /package/bundle/{delegation-tools-6FICZQ5G.js.map → delegation-tools-Z5OM3TXS.js.map} +0 -0
- /package/bundle/{deploy-lib-import-SBKXDD3F.js.map → deploy-lib-import-6VJTYXEG.js.map} +0 -0
- /package/bundle/{deps-HN6CEXA4.js.map → deps-65V7XXG4.js.map} +0 -0
- /package/bundle/{dns-wakeup-RYOCQ6GR.js.map → dns-wakeup-N46RPU5E.js.map} +0 -0
- /package/bundle/{ensure-invariants-BJIEOSJ2.js.map → ensure-invariants-3NOBCYWS.js.map} +0 -0
- /package/bundle/{env-schema-XCPAJ6IZ.js.map → env-schema-T43X43BU.js.map} +0 -0
- /package/bundle/{hook-system-POI5VRIX.js.map → hook-system-ZCVOFFRD.js.map} +0 -0
- /package/bundle/{hotskills-6ECHLXTJ.js.map → hotskills-DTROJY6G.js.map} +0 -0
- /package/bundle/{install-SH4UVUXQ.js.map → install-FZT43PTH.js.map} +0 -0
- /package/bundle/{install-manifest-QRWID3KZ.js.map → install-manifest-KBYD7SAY.js.map} +0 -0
- /package/bundle/{irc-adapter-AIEP6OX6.js.map → irc-adapter-HXO5D4SW.js.map} +0 -0
- /package/bundle/{irc-config-6VY67UPQ.js.map → irc-config-XN5VW2V4.js.map} +0 -0
- /package/bundle/{lazy-require-UFYFFX2R.js.map → lazy-require-R3JYCV5M.js.map} +0 -0
- /package/bundle/{media-utils-MOE36VWY.js.map → media-utils-W7XW3SVV.js.map} +0 -0
- /package/bundle/{message-pipeline-2MBT44FO.js.map → message-pipeline-QX272U5X.js.map} +0 -0
- /package/bundle/{notification-U6F5ZBSG.js.map → notification-ULESRDHB.js.map} +0 -0
- /package/bundle/{openrouter-credits-7XXO6QGQ.js.map → openrouter-credits-PLIKRY5D.js.map} +0 -0
- /package/bundle/{paths-ZJYIDND2.js.map → paths-QQM74XYT.js.map} +0 -0
- /package/bundle/{peer-client-T44VI7NB.js.map → peer-client-D2F5QWRV.js.map} +0 -0
- /package/bundle/{peer-config-D5A4454H.js.map → peer-config-5SUIBJLG.js.map} +0 -0
- /package/bundle/{phase-transport-FEZ4SIJJ.js.map → phase-transport-BSGROTHY.js.map} +0 -0
- /package/bundle/{skill-stats-IPVKMWN3.js.map → rollback-5RXXLUD6.js.map} +0 -0
- /package/bundle/{self-healer-utils-7NFH22VJ.js.map → self-healer-utils-WPKOVXJD.js.map} +0 -0
- /package/bundle/{sleep-BPWX3FCN.js.map → skill-stats-NHNH47QW.js.map} +0 -0
- /package/bundle/{soul-bundle-BRIUDEQ2.js.map → sleep-K7EXAFGW.js.map} +0 -0
- /package/bundle/{soul-loader-GBXJ7EBH.js.map → soul-bundle-QTPWDJB2.js.map} +0 -0
- /package/bundle/{stt-CF3CPFDC.js.map → soul-loader-LCPTN4PK.js.map} +0 -0
- /package/bundle/{sse-parser-anthropic-H42TTLBD.js.map → sse-parser-anthropic-PYDJM3UC.js.map} +0 -0
- /package/bundle/{sse-parser-responses-WG2LY2ML.js.map → sse-parser-responses-FYT7A5WT.js.map} +0 -0
- /package/bundle/{ssrf-guard-E2KBBC5E.js.map → ssrf-guard-R4P5OCTO.js.map} +0 -0
- /package/bundle/{start-CBVKNEAT.js.map → start-4DNURGIY.js.map} +0 -0
- /package/bundle/{subagent-runtime-4MTYUBIZ.js.map → stt-YN77NND6.js.map} +0 -0
- /package/bundle/{task-store-LC7ZMS72.js.map → subagent-runtime-FQAT3564.js.map} +0 -0
- /package/bundle/{system-message-TALP6GP2.js.map → system-message-BRU267FW.js.map} +0 -0
- /package/bundle/{tool-registry-T7XLTI2Q.js.map → task-failure-buffer-DPM5MWZ5.js.map} +0 -0
- /package/bundle/{tool-sandbox-OZMXJZLQ.js.map → task-store-VCBHAB43.js.map} +0 -0
- /package/bundle/{transport-config-G5NKQXPJ.js.map → tool-registry-5PXNSYOI.js.map} +0 -0
- /package/bundle/{update-check-O5MS6B3L.js.map → tool-sandbox-TLAL55QP.js.map} +0 -0
- /package/bundle/{user-registry-NUVNEHJU.js.map → transport-config-JIKHB7GT.js.map} +0 -0
package/bundle/abtars-cli.js
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
3
3
|
import {
|
|
4
4
|
install
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KL5QRHHK.js";
|
|
6
|
+
import {
|
|
7
|
+
rollback
|
|
8
|
+
} from "./chunk-EKHNWFEQ.js";
|
|
6
9
|
import {
|
|
7
10
|
acquireLock,
|
|
8
11
|
atomicSwap,
|
|
@@ -16,19 +19,19 @@ import {
|
|
|
16
19
|
readSentinel,
|
|
17
20
|
writeManifest,
|
|
18
21
|
writeSentinel
|
|
19
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WMWI3SJ7.js";
|
|
20
23
|
import {
|
|
21
24
|
restart
|
|
22
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-F3HMZFIL.js";
|
|
23
26
|
import {
|
|
24
27
|
init_log_and_swallow,
|
|
25
28
|
logAndSwallow
|
|
26
|
-
} from "./chunk-
|
|
27
|
-
import "./chunk-
|
|
29
|
+
} from "./chunk-CYSGXNBY.js";
|
|
30
|
+
import "./chunk-GUTRAMK3.js";
|
|
28
31
|
import {
|
|
29
32
|
abtarsHome,
|
|
30
33
|
init_paths
|
|
31
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-WW5F2DCO.js";
|
|
32
35
|
import {
|
|
33
36
|
__require
|
|
34
37
|
} from "./chunk-7K2YZTLD.js";
|
|
@@ -311,13 +314,18 @@ var ABTARS_EXCLUDE = [
|
|
|
311
314
|
"current",
|
|
312
315
|
"bin",
|
|
313
316
|
"app",
|
|
317
|
+
"app.prev*",
|
|
318
|
+
"app.staging",
|
|
319
|
+
"app.broken",
|
|
314
320
|
"logs",
|
|
315
321
|
"node_modules",
|
|
316
322
|
"overflow",
|
|
317
323
|
"browser-socket",
|
|
324
|
+
"src",
|
|
318
325
|
"bridge.lock",
|
|
319
326
|
"watchdog.lock",
|
|
320
327
|
"browse-spawn.sock",
|
|
328
|
+
"manifest.json",
|
|
321
329
|
"*.sock"
|
|
322
330
|
];
|
|
323
331
|
var ABMIND_EXCLUDE = [
|
|
@@ -574,7 +582,7 @@ async function runInteractive(existing) {
|
|
|
574
582
|
const { intro, outro, text, select, confirm: confirm2, isCancel, cancel } = await import("./dist-J3T4XVKX.js");
|
|
575
583
|
intro("abtars onboard \u2014 first-time setup");
|
|
576
584
|
const noteEmpty = "press Enter to skip";
|
|
577
|
-
const { packagePaths: pp, readManifest: rm3 } = await import("./deploy-lib-import-
|
|
585
|
+
const { packagePaths: pp, readManifest: rm3 } = await import("./deploy-lib-import-6VJTYXEG.js");
|
|
578
586
|
const mfPaths = pp("abtars");
|
|
579
587
|
const mf = await rm3(mfPaths.manifest);
|
|
580
588
|
const installMode = mf?.installMode ?? "supervised";
|
|
@@ -1010,7 +1018,7 @@ async function onboard(opts) {
|
|
|
1010
1018
|
}
|
|
1011
1019
|
if (secrets.length > 0) process.stdout.write(`\u2713 ${secrets.length} secrets \u2192 ${secretDirPath}
|
|
1012
1020
|
`);
|
|
1013
|
-
const { writeManifest: writeManifest2 } = await import("./deploy-lib-import-
|
|
1021
|
+
const { writeManifest: writeManifest2 } = await import("./deploy-lib-import-6VJTYXEG.js");
|
|
1014
1022
|
const mf = await readManifest(paths.manifest);
|
|
1015
1023
|
if (mf) await writeManifest2(paths.manifest, { ...mf, installMode: answers.installMode });
|
|
1016
1024
|
process.stdout.write(`\u2713 install mode: ${answers.installMode}
|
|
@@ -1141,8 +1149,8 @@ Next: 'abtars update' to build, then start the bridge.
|
|
|
1141
1149
|
`);
|
|
1142
1150
|
return 0;
|
|
1143
1151
|
}
|
|
1144
|
-
const { existsSync:
|
|
1145
|
-
const hasRelease =
|
|
1152
|
+
const { existsSync: existsSync9 } = await import("node:fs");
|
|
1153
|
+
const hasRelease = existsSync9(join6(paths.home, "current"));
|
|
1146
1154
|
if (!hasRelease) {
|
|
1147
1155
|
process.stdout.write(`
|
|
1148
1156
|
Next: run 'abtars update' to stage the release, then start the bridge.
|
|
@@ -1162,9 +1170,9 @@ Next: start the bridge
|
|
|
1162
1170
|
return 0;
|
|
1163
1171
|
}
|
|
1164
1172
|
async function seedDefaultTasks(chatId, abtarsHome4) {
|
|
1165
|
-
const { existsSync:
|
|
1173
|
+
const { existsSync: existsSync9 } = await import("node:fs");
|
|
1166
1174
|
const tasksJson = join6(abtarsHome4, "tasks", "tasks.json");
|
|
1167
|
-
if (
|
|
1175
|
+
if (existsSync9(tasksJson)) {
|
|
1168
1176
|
process.stdout.write(`\u2022 tasks.json exists \u2014 skipping default-task seed
|
|
1169
1177
|
`);
|
|
1170
1178
|
return;
|
|
@@ -1177,7 +1185,7 @@ async function seedDefaultTasks(chatId, abtarsHome4) {
|
|
|
1177
1185
|
];
|
|
1178
1186
|
let templatePath = null;
|
|
1179
1187
|
for (const p of candidates) {
|
|
1180
|
-
if (
|
|
1188
|
+
if (existsSync9(p)) {
|
|
1181
1189
|
templatePath = p;
|
|
1182
1190
|
break;
|
|
1183
1191
|
}
|
|
@@ -1233,70 +1241,10 @@ async function seedDefaultTasks(chatId, abtarsHome4) {
|
|
|
1233
1241
|
}
|
|
1234
1242
|
}
|
|
1235
1243
|
|
|
1236
|
-
// src/cli/commands/rollback.ts
|
|
1237
|
-
import { existsSync as existsSync5, renameSync as renameSync3, rmSync as rmSync2 } from "node:fs";
|
|
1238
|
-
import { join as join7 } from "node:path";
|
|
1239
|
-
async function rollback() {
|
|
1240
|
-
const paths = packagePaths("abtars");
|
|
1241
|
-
const manifest = await readManifest(paths.manifest);
|
|
1242
|
-
if (!existsSync5(paths.appPrev)) {
|
|
1243
|
-
process.stderr.write(`Nothing to roll back to (no app.prev/ found).
|
|
1244
|
-
`);
|
|
1245
|
-
return 2;
|
|
1246
|
-
}
|
|
1247
|
-
if (!manifest?.version) {
|
|
1248
|
-
process.stderr.write(`No active release in manifest; nothing to roll back.
|
|
1249
|
-
`);
|
|
1250
|
-
return 2;
|
|
1251
|
-
}
|
|
1252
|
-
const release = await acquireLock(paths.lock, "rollback");
|
|
1253
|
-
try {
|
|
1254
|
-
const brokenDir = join7(paths.home, "app.broken");
|
|
1255
|
-
rmSync2(brokenDir, { recursive: true, force: true });
|
|
1256
|
-
renameSync3(paths.app, brokenDir);
|
|
1257
|
-
renameSync3(paths.appPrev, paths.app);
|
|
1258
|
-
rmSync2(brokenDir, { recursive: true, force: true });
|
|
1259
|
-
process.stdout.write(`\u2713 rolled back: app.prev/ \u2192 app/
|
|
1260
|
-
`);
|
|
1261
|
-
if (manifest.previousVersion) {
|
|
1262
|
-
await writeManifest(paths.manifest, {
|
|
1263
|
-
...manifest,
|
|
1264
|
-
version: manifest.previousVersion,
|
|
1265
|
-
commit: manifest.previousCommit,
|
|
1266
|
-
activatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1267
|
-
previousVersion: manifest.version,
|
|
1268
|
-
previousCommit: manifest.commit
|
|
1269
|
-
});
|
|
1270
|
-
process.stdout.write(`\u2713 manifest: ${manifest.version} \u2192 ${manifest.previousVersion}
|
|
1271
|
-
`);
|
|
1272
|
-
}
|
|
1273
|
-
const restartTs = Date.now();
|
|
1274
|
-
const { restart: restart2 } = await import("./abtars-restart.js");
|
|
1275
|
-
process.stdout.write(`\u267B\uFE0F Restarting bridge...
|
|
1276
|
-
`);
|
|
1277
|
-
await restart2({ cold: true }).catch(() => {
|
|
1278
|
-
});
|
|
1279
|
-
const health = await healthProbe(paths.home, restartTs, 6e4);
|
|
1280
|
-
if (health.healthy) {
|
|
1281
|
-
process.stdout.write(`\u2713 Bridge healthy (PID ${health.pid})
|
|
1282
|
-
`);
|
|
1283
|
-
} else {
|
|
1284
|
-
process.stderr.write(`\u26A0\uFE0F Bridge may not have started. Check logs.
|
|
1285
|
-
`);
|
|
1286
|
-
}
|
|
1287
|
-
process.stdout.write(`
|
|
1288
|
-
Rollback complete.
|
|
1289
|
-
`);
|
|
1290
|
-
return 0;
|
|
1291
|
-
} finally {
|
|
1292
|
-
await release();
|
|
1293
|
-
}
|
|
1294
|
-
}
|
|
1295
|
-
|
|
1296
1244
|
// src/cli/commands/status.ts
|
|
1297
|
-
import { existsSync as
|
|
1245
|
+
import { existsSync as existsSync5 } from "node:fs";
|
|
1298
1246
|
import { readFileSync as readFileSync4 } from "node:fs";
|
|
1299
|
-
import { join as
|
|
1247
|
+
import { join as join7 } from "node:path";
|
|
1300
1248
|
async function status() {
|
|
1301
1249
|
const paths = packagePaths("abtars");
|
|
1302
1250
|
const manifest = await readManifest(paths.manifest);
|
|
@@ -1308,8 +1256,8 @@ Run 'abtars install' to set up.
|
|
|
1308
1256
|
);
|
|
1309
1257
|
return 1;
|
|
1310
1258
|
}
|
|
1311
|
-
const appExists =
|
|
1312
|
-
const appPrevExists =
|
|
1259
|
+
const appExists = existsSync5(paths.app);
|
|
1260
|
+
const appPrevExists = existsSync5(paths.appPrev);
|
|
1313
1261
|
const lines = [
|
|
1314
1262
|
`abtars status`,
|
|
1315
1263
|
` home: ${paths.home}`,
|
|
@@ -1325,7 +1273,7 @@ Run 'abtars install' to set up.
|
|
|
1325
1273
|
` host: ${manifest.host}`
|
|
1326
1274
|
];
|
|
1327
1275
|
try {
|
|
1328
|
-
const bridgeLock = JSON.parse(readFileSync4(
|
|
1276
|
+
const bridgeLock = JSON.parse(readFileSync4(join7(paths.home, "bridge.lock"), "utf-8"));
|
|
1329
1277
|
if (bridgeLock.pid) {
|
|
1330
1278
|
const alive = (() => {
|
|
1331
1279
|
try {
|
|
@@ -1365,16 +1313,16 @@ Run 'abtars install' to set up.
|
|
|
1365
1313
|
|
|
1366
1314
|
// src/cli/commands/update.ts
|
|
1367
1315
|
import { hostname } from "node:os";
|
|
1368
|
-
import { join as
|
|
1369
|
-
import { readFileSync as readFileSync6, existsSync as
|
|
1316
|
+
import { join as join10 } from "node:path";
|
|
1317
|
+
import { readFileSync as readFileSync6, writeFileSync as writeFileSync3, existsSync as existsSync8 } from "node:fs";
|
|
1370
1318
|
import { copyFile as copyFile2, mkdir as mkdir4, chmod, readdir } from "node:fs/promises";
|
|
1371
|
-
import { rmSync as
|
|
1319
|
+
import { rmSync as rmSync2, cpSync, readdirSync as readdirSync3, mkdirSync as mkdirSync2 } from "node:fs";
|
|
1372
1320
|
|
|
1373
1321
|
// src/cli/update-sources/local.ts
|
|
1374
1322
|
import { spawnSync as spawnSync2 } from "node:child_process";
|
|
1375
|
-
import { existsSync as
|
|
1323
|
+
import { existsSync as existsSync6 } from "node:fs";
|
|
1376
1324
|
import { copyFile, cp, mkdir as mkdir2, readFile as readFile2, rm, writeFile as writeFile2 } from "node:fs/promises";
|
|
1377
|
-
import { join as
|
|
1325
|
+
import { join as join8 } from "node:path";
|
|
1378
1326
|
var LocalBuildError = class extends Error {
|
|
1379
1327
|
constructor(message, hint) {
|
|
1380
1328
|
super(hint ? `${message}
|
|
@@ -1436,7 +1384,7 @@ ${upstream} is ahead by ${behind} commit${behind === 1 ? "" : "s"}.`,
|
|
|
1436
1384
|
return { commit, branch };
|
|
1437
1385
|
}
|
|
1438
1386
|
async function readPackageVersion(repoRoot) {
|
|
1439
|
-
const pkg = JSON.parse(await readFile2(
|
|
1387
|
+
const pkg = JSON.parse(await readFile2(join8(repoRoot, "package.json"), "utf-8"));
|
|
1440
1388
|
if (typeof pkg.version !== "string") {
|
|
1441
1389
|
throw new LocalBuildError("package.json has no version field.");
|
|
1442
1390
|
}
|
|
@@ -1444,13 +1392,13 @@ async function readPackageVersion(repoRoot) {
|
|
|
1444
1392
|
}
|
|
1445
1393
|
function makeLocalBuildSource(opts = {}) {
|
|
1446
1394
|
const repoRoot = opts.repoRoot ?? process.cwd();
|
|
1447
|
-
const isNpmPackage = !
|
|
1395
|
+
const isNpmPackage = !existsSync6(join8(repoRoot, ".git"));
|
|
1448
1396
|
return {
|
|
1449
1397
|
name: "local",
|
|
1450
1398
|
async prepare(ctx) {
|
|
1451
1399
|
if (isNpmPackage) {
|
|
1452
|
-
const bundleDir =
|
|
1453
|
-
if (!
|
|
1400
|
+
const bundleDir = join8(repoRoot, "bundle");
|
|
1401
|
+
if (!existsSync6(bundleDir)) {
|
|
1454
1402
|
throw new Error(`No bundle/ found at ${repoRoot}. Run from the abtars npm package or a git checkout.`);
|
|
1455
1403
|
}
|
|
1456
1404
|
const pkgVersion2 = await readPackageVersion(repoRoot);
|
|
@@ -1458,16 +1406,16 @@ function makeLocalBuildSource(opts = {}) {
|
|
|
1458
1406
|
const stagedPath2 = ctx.stagingDir;
|
|
1459
1407
|
await rm(stagedPath2, { recursive: true, force: true });
|
|
1460
1408
|
await mkdir2(stagedPath2, { recursive: true });
|
|
1461
|
-
await cp(bundleDir,
|
|
1462
|
-
const coreDir =
|
|
1463
|
-
if (
|
|
1464
|
-
const scriptsSrc =
|
|
1465
|
-
if (
|
|
1466
|
-
const configSrc =
|
|
1467
|
-
if (
|
|
1468
|
-
const manifestSrc =
|
|
1469
|
-
if (
|
|
1470
|
-
await writeFile2(
|
|
1409
|
+
await cp(bundleDir, join8(stagedPath2, "bundle"), { recursive: true });
|
|
1410
|
+
const coreDir = join8(repoRoot, "core");
|
|
1411
|
+
if (existsSync6(coreDir)) await cp(coreDir, join8(stagedPath2, "core"), { recursive: true });
|
|
1412
|
+
const scriptsSrc = join8(repoRoot, "scripts");
|
|
1413
|
+
if (existsSync6(scriptsSrc)) await cp(scriptsSrc, join8(stagedPath2, "scripts"), { recursive: true });
|
|
1414
|
+
const configSrc = join8(repoRoot, "config");
|
|
1415
|
+
if (existsSync6(configSrc)) await cp(configSrc, join8(stagedPath2, "config"), { recursive: true });
|
|
1416
|
+
const manifestSrc = join8(repoRoot, "install-manifest.json");
|
|
1417
|
+
if (existsSync6(manifestSrc)) await copyFile(manifestSrc, join8(stagedPath2, "install-manifest.json"));
|
|
1418
|
+
await writeFile2(join8(stagedPath2, "package.json"), JSON.stringify({ type: "module", name: "abtars", version: version2 }, null, 2) + "\n");
|
|
1471
1419
|
process.stdout.write(`\u2713 staged ${version2} (from npm package)
|
|
1472
1420
|
`);
|
|
1473
1421
|
return { version: version2, stagedPath: stagedPath2, commit: null, branch: null, packageLockHash: null, source: "local" };
|
|
@@ -1482,14 +1430,14 @@ function makeLocalBuildSource(opts = {}) {
|
|
|
1482
1430
|
const stagedPath = ctx.stagingDir;
|
|
1483
1431
|
await rm(stagedPath, { recursive: true, force: true });
|
|
1484
1432
|
await mkdir2(stagedPath, { recursive: true });
|
|
1485
|
-
await cp(
|
|
1486
|
-
const coreSkillsSrc =
|
|
1487
|
-
if (
|
|
1488
|
-
await cp(coreSkillsSrc,
|
|
1433
|
+
await cp(join8(repoRoot, "bundle"), join8(stagedPath, "bundle"), { recursive: true });
|
|
1434
|
+
const coreSkillsSrc = join8(repoRoot, "core", "skills");
|
|
1435
|
+
if (existsSync6(coreSkillsSrc)) {
|
|
1436
|
+
await cp(coreSkillsSrc, join8(stagedPath, "core", "skills"), { recursive: true });
|
|
1489
1437
|
}
|
|
1490
|
-
await writeFile2(
|
|
1491
|
-
await copyFile(
|
|
1492
|
-
const packageLockHash = await hashFile(
|
|
1438
|
+
await writeFile2(join8(stagedPath, "package.json"), JSON.stringify({ type: "module", name: "abtars", version }, null, 2) + "\n");
|
|
1439
|
+
await copyFile(join8(repoRoot, "install-manifest.json"), join8(stagedPath, "install-manifest.json"));
|
|
1440
|
+
const packageLockHash = await hashFile(join8(repoRoot, "package-lock.json"));
|
|
1493
1441
|
return { version, stagedPath, commit, branch, packageLockHash, source: "local" };
|
|
1494
1442
|
}
|
|
1495
1443
|
};
|
|
@@ -1497,9 +1445,9 @@ function makeLocalBuildSource(opts = {}) {
|
|
|
1497
1445
|
|
|
1498
1446
|
// src/cli/update-sources/npm.ts
|
|
1499
1447
|
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
1500
|
-
import { existsSync as
|
|
1448
|
+
import { existsSync as existsSync7, readFileSync as readFileSync5, unlinkSync as unlinkSync4 } from "node:fs";
|
|
1501
1449
|
import { mkdir as mkdir3, rm as rm2 } from "node:fs/promises";
|
|
1502
|
-
import { join as
|
|
1450
|
+
import { join as join9 } from "node:path";
|
|
1503
1451
|
var TIMEOUT_MS = 6e4;
|
|
1504
1452
|
function run(cmd, args, cwd) {
|
|
1505
1453
|
const r = spawnSync3(cmd, args, { cwd, encoding: "utf-8", timeout: TIMEOUT_MS });
|
|
@@ -1509,7 +1457,7 @@ function run(cmd, args, cwd) {
|
|
|
1509
1457
|
}
|
|
1510
1458
|
function readLocalVersion(home) {
|
|
1511
1459
|
try {
|
|
1512
|
-
const pkg = JSON.parse(readFileSync5(
|
|
1460
|
+
const pkg = JSON.parse(readFileSync5(join9(home, "app", "package.json"), "utf-8"));
|
|
1513
1461
|
return pkg.version ?? null;
|
|
1514
1462
|
} catch {
|
|
1515
1463
|
return null;
|
|
@@ -1529,9 +1477,9 @@ function makeNpmSource(packageName) {
|
|
|
1529
1477
|
await mkdir3(stagedPath, { recursive: true });
|
|
1530
1478
|
run("npm", ["pack", `${packageName}@${latest}`, "--pack-destination", stagedPath], stagedPath);
|
|
1531
1479
|
const tgzName = `${packageName}-${latest}.tgz`.replace("@", "").replace("/", "-");
|
|
1532
|
-
const tgzPath =
|
|
1480
|
+
const tgzPath = join9(stagedPath, tgzName);
|
|
1533
1481
|
run("tar", ["-xzf", tgzPath, "--strip-components=1"], stagedPath);
|
|
1534
|
-
if (
|
|
1482
|
+
if (existsSync7(tgzPath)) unlinkSync4(tgzPath);
|
|
1535
1483
|
run("npm", ["install", "--omit=dev", "--no-audit", "--no-fund"], stagedPath);
|
|
1536
1484
|
return { version: latest, stagedPath, commit: null, branch: null, packageLockHash: null, source: "npm" };
|
|
1537
1485
|
}
|
|
@@ -1569,8 +1517,8 @@ Use --source local (default) or --source npm.
|
|
|
1569
1517
|
try {
|
|
1570
1518
|
cleanStaleStaging(paths.appStaging);
|
|
1571
1519
|
const cleanupHandler = () => {
|
|
1572
|
-
if (
|
|
1573
|
-
|
|
1520
|
+
if (existsSync8(paths.appStaging) && existsSync8(paths.app)) {
|
|
1521
|
+
rmSync2(paths.appStaging, { recursive: true, force: true });
|
|
1574
1522
|
}
|
|
1575
1523
|
};
|
|
1576
1524
|
process.on("SIGHUP", () => {
|
|
@@ -1582,12 +1530,12 @@ Use --source local (default) or --source npm.
|
|
|
1582
1530
|
process.exit(143);
|
|
1583
1531
|
});
|
|
1584
1532
|
let repoRoot = opts.repoRoot ?? process.cwd();
|
|
1585
|
-
if (!opts.repoRoot && !
|
|
1533
|
+
if (!opts.repoRoot && !existsSync8(join10(repoRoot, ".git"))) {
|
|
1586
1534
|
const { realpathSync } = await import("node:fs");
|
|
1587
1535
|
const scriptPath = realpathSync(process.argv[1] ?? "");
|
|
1588
1536
|
const { dirname: dirname3 } = await import("node:path");
|
|
1589
|
-
const candidate =
|
|
1590
|
-
if (
|
|
1537
|
+
const candidate = join10(dirname3(scriptPath), "..");
|
|
1538
|
+
if (existsSync8(join10(candidate, "bundle"))) repoRoot = candidate;
|
|
1591
1539
|
}
|
|
1592
1540
|
const source = opts.source === "npm" ? makeNpmSource("abtars") : makeLocalBuildSource({ repoRoot, allowStale: opts.fromLocal });
|
|
1593
1541
|
if (opts.fromLocal) {
|
|
@@ -1606,14 +1554,14 @@ Use --source local (default) or --source npm.
|
|
|
1606
1554
|
process.stdout.write(`\u2713 staged ${staged.version}
|
|
1607
1555
|
`);
|
|
1608
1556
|
{
|
|
1609
|
-
const pkgPath =
|
|
1557
|
+
const pkgPath = join10(staged.stagedPath, "package.json");
|
|
1610
1558
|
try {
|
|
1611
1559
|
const pkg = JSON.parse(readFileSync6(pkgPath, "utf-8"));
|
|
1612
1560
|
const externals = { patchright: "^1.59.4", "rettiwt-api": "^4.1.3" };
|
|
1613
1561
|
pkg.dependencies = { ...pkg.dependencies, ...externals };
|
|
1614
1562
|
if (pkg.dependencies?.abmind?.startsWith("file:")) delete pkg.dependencies.abmind;
|
|
1615
|
-
const { writeFileSync:
|
|
1616
|
-
|
|
1563
|
+
const { writeFileSync: writeFileSync4 } = await import("node:fs");
|
|
1564
|
+
writeFileSync4(pkgPath, JSON.stringify(pkg, null, 2) + "\n");
|
|
1617
1565
|
const { execSync } = await import("node:child_process");
|
|
1618
1566
|
execSync("npm install --omit=dev --ignore-scripts 2>/dev/null", { cwd: staged.stagedPath, timeout: 6e4 });
|
|
1619
1567
|
process.stdout.write(`\u2713 external deps installed
|
|
@@ -1624,8 +1572,8 @@ Use --source local (default) or --source npm.
|
|
|
1624
1572
|
}
|
|
1625
1573
|
}
|
|
1626
1574
|
await copyAbmind(staged.stagedPath, repoRoot);
|
|
1627
|
-
const entryPoint =
|
|
1628
|
-
if (!
|
|
1575
|
+
const entryPoint = join10(staged.stagedPath, "bundle", "abtars.js");
|
|
1576
|
+
if (!existsSync8(entryPoint)) {
|
|
1629
1577
|
process.stderr.write(`\u274C Entry point not found: ${entryPoint}
|
|
1630
1578
|
`);
|
|
1631
1579
|
return 1;
|
|
@@ -1633,10 +1581,6 @@ Use --source local (default) or --source npm.
|
|
|
1633
1581
|
configSnapshot(paths.config);
|
|
1634
1582
|
process.stdout.write(`\u2713 config snapshot (3-slot rotation)
|
|
1635
1583
|
`);
|
|
1636
|
-
atomicSwap(paths.app, paths.appPrev, paths.appStaging);
|
|
1637
|
-
process.stdout.write(`\u2713 atomic swap: app.staging/ \u2192 app/
|
|
1638
|
-
`);
|
|
1639
|
-
await postSwapHousekeeping(paths, repoRoot, staged);
|
|
1640
1584
|
const prior = await readManifest(paths.manifest);
|
|
1641
1585
|
const sentinelData = {
|
|
1642
1586
|
version: staged.version,
|
|
@@ -1645,6 +1589,10 @@ Use --source local (default) or --source npm.
|
|
|
1645
1589
|
status: "pending"
|
|
1646
1590
|
};
|
|
1647
1591
|
writeSentinel(paths.home, sentinelData);
|
|
1592
|
+
atomicSwap(paths.app, paths.appPrev, paths.appStaging);
|
|
1593
|
+
process.stdout.write(`\u2713 atomic swap: app.staging/ \u2192 app/
|
|
1594
|
+
`);
|
|
1595
|
+
await postSwapHousekeeping(paths, repoRoot, staged);
|
|
1648
1596
|
await writeManifest(paths.manifest, {
|
|
1649
1597
|
...prior ?? emptyManifest("abtars", hostname()),
|
|
1650
1598
|
version: staged.version,
|
|
@@ -1654,7 +1602,9 @@ Use --source local (default) or --source npm.
|
|
|
1654
1602
|
activatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1655
1603
|
source: "local",
|
|
1656
1604
|
previousVersion: prior?.version ?? null,
|
|
1657
|
-
previousCommit: prior?.commit ?? null
|
|
1605
|
+
previousCommit: prior?.commit ?? null,
|
|
1606
|
+
installMode: prior?.installMode ?? "supervised",
|
|
1607
|
+
repoRoot
|
|
1658
1608
|
});
|
|
1659
1609
|
process.stdout.write(`\u2713 manifest updated
|
|
1660
1610
|
`);
|
|
@@ -1676,18 +1626,18 @@ Use --source local (default) or --source npm.
|
|
|
1676
1626
|
}
|
|
1677
1627
|
process.stderr.write(`\u274C Bridge unhealthy after 60s. Auto-rolling back...
|
|
1678
1628
|
`);
|
|
1679
|
-
if (!
|
|
1680
|
-
process.stderr.write(`\u274C No app.prev/ to roll back to. Manual intervention required.
|
|
1629
|
+
if (!existsSync8(paths.appPrev1)) {
|
|
1630
|
+
process.stderr.write(`\u274C No app.prev.1/ to roll back to. Manual intervention required.
|
|
1681
1631
|
`);
|
|
1682
1632
|
process.stderr.write(` Check: ~/.abtars/logs/bridge.log
|
|
1683
1633
|
`);
|
|
1684
1634
|
return 2;
|
|
1685
1635
|
}
|
|
1686
|
-
const brokenDir =
|
|
1687
|
-
|
|
1688
|
-
const { renameSync:
|
|
1689
|
-
|
|
1690
|
-
|
|
1636
|
+
const brokenDir = join10(paths.home, "app.broken");
|
|
1637
|
+
rmSync2(brokenDir, { recursive: true, force: true });
|
|
1638
|
+
const { renameSync: renameSync3 } = await import("node:fs");
|
|
1639
|
+
renameSync3(paths.app, brokenDir);
|
|
1640
|
+
renameSync3(paths.appPrev1, paths.app);
|
|
1691
1641
|
if (prior) {
|
|
1692
1642
|
await writeManifest(paths.manifest, prior);
|
|
1693
1643
|
}
|
|
@@ -1697,7 +1647,7 @@ Use --source local (default) or --source npm.
|
|
|
1697
1647
|
if (rollbackHealth.healthy) {
|
|
1698
1648
|
process.stderr.write(`\u26A0\uFE0F Rolled back to previous version. Investigate ${brokenDir} for the failure.
|
|
1699
1649
|
`);
|
|
1700
|
-
|
|
1650
|
+
rmSync2(brokenDir, { recursive: true, force: true });
|
|
1701
1651
|
return 1;
|
|
1702
1652
|
}
|
|
1703
1653
|
process.stderr.write(`\u274C Rollback also failed. Manual intervention required.
|
|
@@ -1714,17 +1664,27 @@ Use --source local (default) or --source npm.
|
|
|
1714
1664
|
async function copyAbmind(stagedPath, repoRoot) {
|
|
1715
1665
|
const candidates = [
|
|
1716
1666
|
process.env["ABMIND_REPO"],
|
|
1717
|
-
|
|
1718
|
-
|
|
1667
|
+
join10(repoRoot, "..", "abmind"),
|
|
1668
|
+
join10(process.env["HOME"] ?? "", "abmind")
|
|
1719
1669
|
].filter(Boolean);
|
|
1720
1670
|
for (const src of candidates) {
|
|
1721
|
-
const distDir =
|
|
1722
|
-
if (
|
|
1723
|
-
const dest =
|
|
1671
|
+
const distDir = join10(src, "dist");
|
|
1672
|
+
if (existsSync8(distDir)) {
|
|
1673
|
+
const dest = join10(stagedPath, "bundle", "node_modules", "abmind");
|
|
1724
1674
|
mkdirSync2(dest, { recursive: true });
|
|
1725
|
-
cpSync(distDir,
|
|
1726
|
-
if (
|
|
1727
|
-
if (
|
|
1675
|
+
cpSync(distDir, join10(dest, "dist"), { recursive: true });
|
|
1676
|
+
if (existsSync8(join10(src, "package.json"))) cpSync(join10(src, "package.json"), join10(dest, "package.json"));
|
|
1677
|
+
if (existsSync8(join10(src, "prompts"))) cpSync(join10(src, "prompts"), join10(dest, "prompts"), { recursive: true });
|
|
1678
|
+
const stalePath = join10(stagedPath, "node_modules", "abmind");
|
|
1679
|
+
if (existsSync8(stalePath)) rmSync2(stalePath, { recursive: true });
|
|
1680
|
+
try {
|
|
1681
|
+
const pkg = JSON.parse(readFileSync6(join10(dest, "package.json"), "utf-8"));
|
|
1682
|
+
const abmindHome = process.env["ABMIND_HOME"] ?? join10(process.env["HOME"] ?? "", ".abmind");
|
|
1683
|
+
mkdirSync2(abmindHome, { recursive: true });
|
|
1684
|
+
const manifest = { version: pkg.version, activatedAt: (/* @__PURE__ */ new Date()).toISOString(), source: "local" };
|
|
1685
|
+
writeFileSync3(join10(abmindHome, "manifest.json"), JSON.stringify(manifest, null, 2) + "\n");
|
|
1686
|
+
} catch {
|
|
1687
|
+
}
|
|
1728
1688
|
process.stdout.write(`\u2713 abmind copied from ${src}
|
|
1729
1689
|
`);
|
|
1730
1690
|
return;
|
|
@@ -1734,32 +1694,32 @@ async function copyAbmind(stagedPath, repoRoot) {
|
|
|
1734
1694
|
`);
|
|
1735
1695
|
}
|
|
1736
1696
|
async function postSwapHousekeeping(paths, repoRoot, _staged) {
|
|
1737
|
-
const { loadManifest } = await import("./install-manifest-
|
|
1697
|
+
const { loadManifest } = await import("./install-manifest-KBYD7SAY.js");
|
|
1738
1698
|
const installManifest = loadManifest(paths.app);
|
|
1739
|
-
const repoScripts =
|
|
1740
|
-
const destScripts =
|
|
1699
|
+
const repoScripts = join10(repoRoot, "scripts");
|
|
1700
|
+
const destScripts = join10(paths.home, "scripts");
|
|
1741
1701
|
await mkdir4(destScripts, { recursive: true });
|
|
1742
1702
|
const allScriptFiles = await readdir(repoScripts).catch(() => []);
|
|
1743
1703
|
const matchesInclude = (name) => installManifest.scripts.include.some((pattern) => name.endsWith(pattern.replace("*", "")));
|
|
1744
1704
|
const scriptFiles = allScriptFiles.filter(matchesInclude);
|
|
1745
1705
|
const isExecutable = (name) => name.endsWith(installManifest.scripts.executable.replace("*", ""));
|
|
1746
1706
|
for (const name of scriptFiles) {
|
|
1747
|
-
await copyFile2(
|
|
1748
|
-
if (isExecutable(name)) await chmod(
|
|
1707
|
+
await copyFile2(join10(repoScripts, name), join10(destScripts, name));
|
|
1708
|
+
if (isExecutable(name)) await chmod(join10(destScripts, name), 493);
|
|
1749
1709
|
}
|
|
1750
1710
|
process.stdout.write(`\u2713 scripts refreshed (${scriptFiles.length} files)
|
|
1751
1711
|
`);
|
|
1752
|
-
const { writeWrapper } = await import("./install-
|
|
1712
|
+
const { writeWrapper } = await import("./install-FZT43PTH.js");
|
|
1753
1713
|
await mkdir4(paths.bin, { recursive: true });
|
|
1754
1714
|
for (const name of installManifest.cliWrappers) {
|
|
1755
1715
|
await writeWrapper(paths.bin, name, paths.app, false);
|
|
1756
1716
|
}
|
|
1757
1717
|
process.stdout.write(`\u2713 wrappers refreshed (${installManifest.cliWrappers.length} files)
|
|
1758
1718
|
`);
|
|
1759
|
-
const skillsCoreSrc =
|
|
1760
|
-
const skillsCoreDst =
|
|
1761
|
-
if (
|
|
1762
|
-
|
|
1719
|
+
const skillsCoreSrc = join10(paths.app, "core", "skills");
|
|
1720
|
+
const skillsCoreDst = join10(paths.home, "skills", "core");
|
|
1721
|
+
if (existsSync8(skillsCoreSrc)) {
|
|
1722
|
+
rmSync2(skillsCoreDst, { recursive: true, force: true });
|
|
1763
1723
|
cpSync(skillsCoreSrc, skillsCoreDst, { recursive: true });
|
|
1764
1724
|
const files = readdirSync3(skillsCoreDst, { recursive: true });
|
|
1765
1725
|
const count = files.filter((f) => f.endsWith("SKILL.md")).length;
|
|
@@ -1767,24 +1727,24 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
|
|
|
1767
1727
|
`);
|
|
1768
1728
|
}
|
|
1769
1729
|
for (const d of ["custom", "downloaded", "self"]) {
|
|
1770
|
-
await mkdir4(
|
|
1730
|
+
await mkdir4(join10(paths.home, "skills", d), { recursive: true });
|
|
1771
1731
|
}
|
|
1772
|
-
const releaseConfig =
|
|
1773
|
-
const destConfig =
|
|
1774
|
-
if (
|
|
1732
|
+
const releaseConfig = join10(paths.app, "config");
|
|
1733
|
+
const destConfig = join10(paths.home, "config");
|
|
1734
|
+
if (existsSync8(releaseConfig)) {
|
|
1775
1735
|
for (const f of readdirSync3(releaseConfig)) {
|
|
1776
|
-
const src =
|
|
1736
|
+
const src = join10(releaseConfig, f);
|
|
1777
1737
|
if (f.endsWith(".example")) {
|
|
1778
|
-
cpSync(src,
|
|
1779
|
-
const target =
|
|
1780
|
-
if (!
|
|
1738
|
+
cpSync(src, join10(destConfig, f));
|
|
1739
|
+
const target = join10(destConfig, f.replace(".example", ""));
|
|
1740
|
+
if (!existsSync8(target)) cpSync(src, target);
|
|
1781
1741
|
}
|
|
1782
1742
|
}
|
|
1783
|
-
const defaultTransport =
|
|
1784
|
-
if (
|
|
1743
|
+
const defaultTransport = join10(releaseConfig, "transport.default.json");
|
|
1744
|
+
if (existsSync8(defaultTransport)) cpSync(defaultTransport, join10(destConfig, "transport.default.json"));
|
|
1785
1745
|
}
|
|
1786
|
-
const transportJson =
|
|
1787
|
-
if (
|
|
1746
|
+
const transportJson = join10(paths.home, "config", "transport.json");
|
|
1747
|
+
if (existsSync8(transportJson)) {
|
|
1788
1748
|
try {
|
|
1789
1749
|
const tc = JSON.parse(readFileSync6(transportJson, "utf-8"));
|
|
1790
1750
|
let cleared = false;
|
|
@@ -1805,14 +1765,14 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
|
|
|
1805
1765
|
}
|
|
1806
1766
|
}
|
|
1807
1767
|
if (cleared) {
|
|
1808
|
-
const { writeFileSync:
|
|
1809
|
-
|
|
1768
|
+
const { writeFileSync: writeFileSync4 } = await import("node:fs");
|
|
1769
|
+
writeFileSync4(transportJson, JSON.stringify(tc, null, 2) + "\n");
|
|
1810
1770
|
}
|
|
1811
1771
|
} catch {
|
|
1812
1772
|
}
|
|
1813
1773
|
}
|
|
1814
|
-
const doctorPath =
|
|
1815
|
-
if (
|
|
1774
|
+
const doctorPath = join10(paths.home, "scripts", "doctor.sh");
|
|
1775
|
+
if (existsSync8(doctorPath)) {
|
|
1816
1776
|
process.stdout.write("\n\u{1FA7A} Health check...\n");
|
|
1817
1777
|
try {
|
|
1818
1778
|
const { execSync } = await import("node:child_process");
|
|
@@ -1822,7 +1782,7 @@ async function postSwapHousekeeping(paths, repoRoot, _staged) {
|
|
|
1822
1782
|
`);
|
|
1823
1783
|
}
|
|
1824
1784
|
}
|
|
1825
|
-
const { ensureInstallInvariants } = await import("./ensure-invariants-
|
|
1785
|
+
const { ensureInstallInvariants } = await import("./ensure-invariants-3NOBCYWS.js");
|
|
1826
1786
|
const invariantResults = await ensureInstallInvariants(process.cwd(), paths.home);
|
|
1827
1787
|
if (invariantResults.length > 0) {
|
|
1828
1788
|
process.stdout.write(`\u2713 invariants: ${invariantResults.join(", ")}
|
|
@@ -1839,7 +1799,7 @@ async function restartBridge(paths) {
|
|
|
1839
1799
|
}
|
|
1840
1800
|
if (mode === "supervised-daemon" || mode === "supervised") {
|
|
1841
1801
|
process.stdout.write("\n\u267B\uFE0F Restarting bridge via watchdog...\n");
|
|
1842
|
-
const wdLock =
|
|
1802
|
+
const wdLock = join10(paths.home, "watchdog.lock");
|
|
1843
1803
|
const wdPid = readJsonField2(wdLock, "pid");
|
|
1844
1804
|
if (wdPid && wdPid > 0) {
|
|
1845
1805
|
try {
|
|
@@ -1871,7 +1831,7 @@ function printDryRun(paths, repoRoot, opts) {
|
|
|
1871
1831
|
const { spawnSync: spawnSync4 } = __require("node:child_process");
|
|
1872
1832
|
const commit = spawnSync4("git", ["rev-parse", "--short", "HEAD"], { cwd: repoRoot, encoding: "utf-8" }).stdout?.trim() ?? "?";
|
|
1873
1833
|
const branch = spawnSync4("git", ["rev-parse", "--abbrev-ref", "HEAD"], { cwd: repoRoot, encoding: "utf-8" }).stdout?.trim() ?? "?";
|
|
1874
|
-
const wdLock =
|
|
1834
|
+
const wdLock = join10(paths.home, "watchdog.lock");
|
|
1875
1835
|
const wdPid = readJsonField2(wdLock, "pid");
|
|
1876
1836
|
process.stdout.write(`
|
|
1877
1837
|
Dry run \u2014 no changes will be made.
|
|
@@ -1887,7 +1847,7 @@ Dry run \u2014 no changes will be made.
|
|
|
1887
1847
|
}
|
|
1888
1848
|
async function checkForUpdates(home, opts) {
|
|
1889
1849
|
const repoRoot = opts.repoRoot ?? process.cwd();
|
|
1890
|
-
if (!
|
|
1850
|
+
if (!existsSync8(join10(repoRoot, ".git"))) {
|
|
1891
1851
|
process.stderr.write("Not a git repository. --check requires a git checkout.\n");
|
|
1892
1852
|
return 2;
|
|
1893
1853
|
}
|
|
@@ -1895,7 +1855,7 @@ async function checkForUpdates(home, opts) {
|
|
|
1895
1855
|
spawnSync4("git", ["fetch", "--quiet"], { cwd: repoRoot });
|
|
1896
1856
|
const result = spawnSync4("git", ["rev-list", "--count", "HEAD..origin/dev"], { cwd: repoRoot, encoding: "utf-8" });
|
|
1897
1857
|
const ahead = parseInt(result.stdout?.trim() ?? "0", 10);
|
|
1898
|
-
const manifest = await readManifest(
|
|
1858
|
+
const manifest = await readManifest(join10(home, "manifest.json"));
|
|
1899
1859
|
process.stdout.write(`Current: ${manifest?.version ?? "unknown"} (deployed ${manifest?.activatedAt ?? "never"})
|
|
1900
1860
|
`);
|
|
1901
1861
|
if (ahead === 0) {
|
|
@@ -1958,6 +1918,20 @@ Usage:
|
|
|
1958
1918
|
);
|
|
1959
1919
|
}
|
|
1960
1920
|
async function main(argv) {
|
|
1921
|
+
if (argv[0] === "--version" || argv[0] === "-v" || argv[0] === "version") {
|
|
1922
|
+
const { readFileSync: readFileSync7 } = await import("node:fs");
|
|
1923
|
+
const { join: join11, dirname: dirname3 } = await import("node:path");
|
|
1924
|
+
const { fileURLToPath: fileURLToPath2 } = await import("node:url");
|
|
1925
|
+
const here = dirname3(fileURLToPath2(import.meta.url));
|
|
1926
|
+
try {
|
|
1927
|
+
const pkg = JSON.parse(readFileSync7(join11(here, "..", "package.json"), "utf-8"));
|
|
1928
|
+
process.stdout.write(`${pkg.version}
|
|
1929
|
+
`);
|
|
1930
|
+
} catch {
|
|
1931
|
+
process.stdout.write("unknown\n");
|
|
1932
|
+
}
|
|
1933
|
+
return 0;
|
|
1934
|
+
}
|
|
1961
1935
|
const { command, flags } = parseArgs(argv);
|
|
1962
1936
|
try {
|
|
1963
1937
|
switch (command) {
|
|
@@ -1977,7 +1951,7 @@ async function main(argv) {
|
|
|
1977
1951
|
allowAbmindMismatch: flags.get("allow-abmind-mismatch") === true
|
|
1978
1952
|
});
|
|
1979
1953
|
case "rollback":
|
|
1980
|
-
return await rollback();
|
|
1954
|
+
return await rollback({ to: typeof flags.get("to") === "string" ? Number(flags.get("to")) : void 0 });
|
|
1981
1955
|
case "backup":
|
|
1982
1956
|
return await backup({
|
|
1983
1957
|
config: flags.get("config") === true,
|
|
@@ -1986,7 +1960,7 @@ async function main(argv) {
|
|
|
1986
1960
|
pruneDays: typeof flags.get("prune-days") === "string" ? Number(flags.get("prune-days")) : void 0
|
|
1987
1961
|
});
|
|
1988
1962
|
case "restore": {
|
|
1989
|
-
const { restore } = await import("./restore-
|
|
1963
|
+
const { restore } = await import("./restore-Z6MF54HS.js");
|
|
1990
1964
|
return await restore(argv[1] ?? "", {
|
|
1991
1965
|
config: flags.get("config") === true,
|
|
1992
1966
|
passphrase: typeof flags.get("passphrase") === "string" ? flags.get("passphrase") : void 0
|
|
@@ -2013,15 +1987,15 @@ async function main(argv) {
|
|
|
2013
1987
|
case "stop":
|
|
2014
1988
|
return await stop({ force: flags.get("force") === true });
|
|
2015
1989
|
case "start": {
|
|
2016
|
-
const { start: startCmd } = await import("./start-
|
|
1990
|
+
const { start: startCmd } = await import("./start-4DNURGIY.js");
|
|
2017
1991
|
return await startCmd();
|
|
2018
1992
|
}
|
|
2019
1993
|
case "daemon": {
|
|
2020
|
-
const { daemon: daemonCmd } = await import("./daemon-
|
|
1994
|
+
const { daemon: daemonCmd } = await import("./daemon-WOQXCKNL.js");
|
|
2021
1995
|
return await daemonCmd(argv.slice(1));
|
|
2022
1996
|
}
|
|
2023
1997
|
case "deps": {
|
|
2024
|
-
const { deps: depsCmd } = await import("./deps-
|
|
1998
|
+
const { deps: depsCmd } = await import("./deps-65V7XXG4.js");
|
|
2025
1999
|
return await depsCmd(argv.slice(1));
|
|
2026
2000
|
}
|
|
2027
2001
|
case "logs": {
|