abtars 0.2.1-alpha.8 → 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/README.md +98 -42
- 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 +339 -271
- 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 +239 -155
- 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-GEXWJYJC.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 +2965 -2294
- 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-Z6MF54HS.js +151 -0
- package/bundle/restore-Z6MF54HS.js.map +7 -0
- package/bundle/{install-SH4UVUXQ.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/core/skills/tools/rss/SKILL.md +51 -0
- package/install-manifest.json +4 -2
- package/package.json +4 -4
- package/scripts/build-and-deploy.sh +28 -0
- package/scripts/daily-backup.sh +1 -79
- 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-RJJWPMUZ.js +0 -411
- package/bundle/chunk-RJJWPMUZ.js.map +0 -7
- package/bundle/chunk-RSWUPUNA.js.map +0 -7
- package/bundle/chunk-RV54J75Q.js.map +0 -7
- package/bundle/chunk-RVERPUHT.js +0 -289
- package/bundle/chunk-RVERPUHT.js.map +0 -7
- package/bundle/chunk-TYVI3ZWA.js.map +0 -7
- package/bundle/chunk-X5FBUA53.js.map +0 -7
- package/bundle/deploy-lib-import-HCMZCKZD.js +0 -50
- package/bundle/direct-api-transport-TRV45NO6.js.map +0 -7
- package/bundle/discord-adapter-WA2MFRK3.js.map +0 -7
- package/bundle/restore-ROJF22R2.js +0 -47
- package/bundle/restore-ROJF22R2.js.map +0 -7
- package/bundle/system-status-GLYXXDE3.js.map +0 -7
- package/bundle/telegram-adapter-BJJYXN7J.js.map +0 -7
- package/bundle/update-check-O5MS6B3L.js +0 -13
- package/bundle/user-registry-NUVNEHJU.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-HCMZCKZD.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/{deploy-lib-import-SBKXDD3F.js.map → env-schema-T43X43BU.js.map} +0 -0
- /package/bundle/{env-schema-XCPAJ6IZ.js.map → hook-system-ZCVOFFRD.js.map} +0 -0
- /package/bundle/{hook-system-POI5VRIX.js.map → hotskills-DTROJY6G.js.map} +0 -0
- /package/bundle/{hotskills-6ECHLXTJ.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/{install-GEXWJYJC.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/{install-SH4UVUXQ.js.map → message-pipeline-QX272U5X.js.map} +0 -0
- /package/bundle/{lazy-require-UFYFFX2R.js.map → notification-ULESRDHB.js.map} +0 -0
- /package/bundle/{openrouter-credits-7XXO6QGQ.js.map → openrouter-credits-PLIKRY5D.js.map} +0 -0
- /package/bundle/{message-pipeline-2MBT44FO.js.map → paths-QQM74XYT.js.map} +0 -0
- /package/bundle/{peer-client-T44VI7NB.js.map → peer-client-D2F5QWRV.js.map} +0 -0
- /package/bundle/{notification-U6F5ZBSG.js.map → peer-config-5SUIBJLG.js.map} +0 -0
- /package/bundle/{paths-ZJYIDND2.js.map → phase-transport-BSGROTHY.js.map} +0 -0
- /package/bundle/{peer-config-D5A4454H.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/{phase-transport-FEZ4SIJJ.js.map → skill-stats-NHNH47QW.js.map} +0 -0
- /package/bundle/{skill-stats-IPVKMWN3.js.map → sleep-K7EXAFGW.js.map} +0 -0
- /package/bundle/{sleep-BPWX3FCN.js.map → soul-bundle-QTPWDJB2.js.map} +0 -0
- /package/bundle/{soul-bundle-BRIUDEQ2.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/{soul-loader-GBXJ7EBH.js.map → stt-YN77NND6.js.map} +0 -0
- /package/bundle/{stt-CF3CPFDC.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/{subagent-runtime-4MTYUBIZ.js.map → task-failure-buffer-DPM5MWZ5.js.map} +0 -0
- /package/bundle/{task-store-LC7ZMS72.js.map → task-store-VCBHAB43.js.map} +0 -0
- /package/bundle/{tool-registry-T7XLTI2Q.js.map → tool-registry-5PXNSYOI.js.map} +0 -0
- /package/bundle/{tool-sandbox-OZMXJZLQ.js.map → tool-sandbox-TLAL55QP.js.map} +0 -0
- /package/bundle/{transport-config-G5NKQXPJ.js.map → transport-config-JIKHB7GT.js.map} +0 -0
- /package/bundle/{update-check-O5MS6B3L.js.map → user-registry-PEFDZ5AV.js.map} +0 -0
|
@@ -0,0 +1,191 @@
|
|
|
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_logger,
|
|
5
|
+
logError,
|
|
6
|
+
logInfo,
|
|
7
|
+
logWarn
|
|
8
|
+
} from "./chunk-GUTRAMK3.js";
|
|
9
|
+
import "./chunk-WW5F2DCO.js";
|
|
10
|
+
import "./chunk-7K2YZTLD.js";
|
|
11
|
+
|
|
12
|
+
// src/components/action-gate.ts
|
|
13
|
+
init_logger();
|
|
14
|
+
import { randomBytes } from "node:crypto";
|
|
15
|
+
import { readFileSync, writeFileSync, mkdirSync, appendFileSync, existsSync } from "node:fs";
|
|
16
|
+
import { join } from "node:path";
|
|
17
|
+
var TAG = "action-gate";
|
|
18
|
+
var ActionGate = class {
|
|
19
|
+
tokens = /* @__PURE__ */ new Map();
|
|
20
|
+
pending = /* @__PURE__ */ new Map();
|
|
21
|
+
rules = [];
|
|
22
|
+
rulesPath;
|
|
23
|
+
auditPath;
|
|
24
|
+
notify = null;
|
|
25
|
+
constructor(authDir) {
|
|
26
|
+
this.rulesPath = join(authDir, "rules.json");
|
|
27
|
+
this.auditPath = join(authDir, "audit.jsonl");
|
|
28
|
+
mkdirSync(authDir, { recursive: true });
|
|
29
|
+
this.loadRules();
|
|
30
|
+
}
|
|
31
|
+
setNotify(fn) {
|
|
32
|
+
this.notify = fn;
|
|
33
|
+
}
|
|
34
|
+
/** Check if a rule already allows/denies this action. */
|
|
35
|
+
checkRules(category, pattern) {
|
|
36
|
+
for (const rule of this.rules) {
|
|
37
|
+
if (rule.category !== category) continue;
|
|
38
|
+
if (rule.pattern === "*" || rule.pattern === pattern) {
|
|
39
|
+
return rule.action;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Request authorization for a privileged action.
|
|
46
|
+
* Returns true if granted, false if denied/timed out.
|
|
47
|
+
*/
|
|
48
|
+
async requestAuth(category, detail) {
|
|
49
|
+
const rule = this.checkRules(category, detail);
|
|
50
|
+
if (rule === "allow") {
|
|
51
|
+
this.audit(category, detail, "allowed-by-rule");
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
if (rule === "deny") {
|
|
55
|
+
this.audit(category, detail, "denied-by-rule");
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
if (!this.notify) {
|
|
59
|
+
logWarn(TAG, `No notify function \u2014 auto-denying ${category}: ${detail.slice(0, 80)}`);
|
|
60
|
+
this.audit(category, detail, "denied-no-notify");
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const requestId = randomBytes(8).toString("hex");
|
|
64
|
+
const message = this.formatMessage(category, detail);
|
|
65
|
+
return new Promise((resolve) => {
|
|
66
|
+
const timer = setTimeout(() => {
|
|
67
|
+
this.pending.delete(requestId);
|
|
68
|
+
logWarn(TAG, `Auth request timed out: ${category} ${detail.slice(0, 60)}`);
|
|
69
|
+
this.audit(category, detail, "denied-timeout");
|
|
70
|
+
resolve(false);
|
|
71
|
+
}, 12e4);
|
|
72
|
+
const reminderTimer = setTimeout(() => {
|
|
73
|
+
const req = this.pending.get(requestId);
|
|
74
|
+
if (req && !req.reminderSent) {
|
|
75
|
+
req.reminderSent = true;
|
|
76
|
+
this.notify?.("\u23F3 Still waiting for authorization...", []).catch(() => {
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
}, 6e4);
|
|
80
|
+
this.pending.set(requestId, { id: requestId, category, detail, resolve: (granted) => {
|
|
81
|
+
clearTimeout(timer);
|
|
82
|
+
clearTimeout(reminderTimer);
|
|
83
|
+
this.pending.delete(requestId);
|
|
84
|
+
resolve(granted);
|
|
85
|
+
}, timer, reminderSent: false });
|
|
86
|
+
this.notify(message, [
|
|
87
|
+
{ text: "\u2705 Allow once", data: `auth:${requestId}:once` },
|
|
88
|
+
{ text: "\u{1F513} Always allow", data: `auth:${requestId}:always` },
|
|
89
|
+
{ text: "\u274C Deny", data: `auth:${requestId}:deny` }
|
|
90
|
+
]).catch((err) => {
|
|
91
|
+
logError(TAG, `Failed to send auth request: ${err}`);
|
|
92
|
+
clearTimeout(timer);
|
|
93
|
+
clearTimeout(reminderTimer);
|
|
94
|
+
this.pending.delete(requestId);
|
|
95
|
+
this.audit(category, detail, "denied-send-failed");
|
|
96
|
+
resolve(false);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
/** Handle callback from Telegram button press. */
|
|
101
|
+
handleCallback(data) {
|
|
102
|
+
const match = data.match(/^auth:([a-f0-9]+):(once|always|deny)$/);
|
|
103
|
+
if (!match) return false;
|
|
104
|
+
const [, requestId, action] = match;
|
|
105
|
+
const req = this.pending.get(requestId);
|
|
106
|
+
if (!req) return false;
|
|
107
|
+
if (action === "once") {
|
|
108
|
+
this.audit(req.category, req.detail, "allowed-once");
|
|
109
|
+
req.resolve(true);
|
|
110
|
+
} else if (action === "always") {
|
|
111
|
+
this.storeRule(req.category, req.detail, "allow");
|
|
112
|
+
this.audit(req.category, req.detail, "allowed-always");
|
|
113
|
+
req.resolve(true);
|
|
114
|
+
} else {
|
|
115
|
+
this.audit(req.category, req.detail, "denied");
|
|
116
|
+
req.resolve(false);
|
|
117
|
+
}
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
/** Generate a one-use token for external CLI callers. */
|
|
121
|
+
generateToken(category, pattern) {
|
|
122
|
+
const id = randomBytes(16).toString("hex");
|
|
123
|
+
this.tokens.set(id, {
|
|
124
|
+
id,
|
|
125
|
+
category,
|
|
126
|
+
pattern,
|
|
127
|
+
expiresAt: Date.now() + 12e4,
|
|
128
|
+
consumed: false
|
|
129
|
+
});
|
|
130
|
+
return id;
|
|
131
|
+
}
|
|
132
|
+
/** Validate and consume a token. */
|
|
133
|
+
validateToken(tokenId) {
|
|
134
|
+
const token = this.tokens.get(tokenId);
|
|
135
|
+
if (!token) return false;
|
|
136
|
+
if (token.consumed || Date.now() > token.expiresAt) {
|
|
137
|
+
this.tokens.delete(tokenId);
|
|
138
|
+
return false;
|
|
139
|
+
}
|
|
140
|
+
token.consumed = true;
|
|
141
|
+
this.tokens.delete(tokenId);
|
|
142
|
+
return true;
|
|
143
|
+
}
|
|
144
|
+
storeRule(category, pattern, action) {
|
|
145
|
+
this.rules.push({ category, pattern, action, createdAt: (/* @__PURE__ */ new Date()).toISOString() });
|
|
146
|
+
writeFileSync(this.rulesPath, JSON.stringify({ rules: this.rules }, null, 2) + "\n");
|
|
147
|
+
logInfo(TAG, `Stored rule: ${action} ${category}:${pattern}`);
|
|
148
|
+
}
|
|
149
|
+
loadRules() {
|
|
150
|
+
if (!existsSync(this.rulesPath)) {
|
|
151
|
+
this.rules = [];
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
const data = JSON.parse(readFileSync(this.rulesPath, "utf-8"));
|
|
156
|
+
this.rules = data.rules ?? [];
|
|
157
|
+
} catch {
|
|
158
|
+
this.rules = [];
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
audit(category, detail, outcome) {
|
|
162
|
+
const entry = JSON.stringify({ ts: (/* @__PURE__ */ new Date()).toISOString(), category, detail: detail.slice(0, 200), outcome });
|
|
163
|
+
try {
|
|
164
|
+
appendFileSync(this.auditPath, entry + "\n");
|
|
165
|
+
} catch {
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
formatMessage(category, detail) {
|
|
169
|
+
switch (category) {
|
|
170
|
+
case "secret-recall":
|
|
171
|
+
return `\u{1F510} Agent wants SECRET memory:
|
|
172
|
+
"${detail.slice(0, 100)}"
|
|
173
|
+
|
|
174
|
+
Authorize?`;
|
|
175
|
+
case "bash-auth":
|
|
176
|
+
return `\u26A0\uFE0F Agent wants to run:
|
|
177
|
+
\`${detail.slice(0, 200)}\`
|
|
178
|
+
|
|
179
|
+
Authorize?`;
|
|
180
|
+
default:
|
|
181
|
+
return `\u{1F512} Agent requests: ${category}
|
|
182
|
+
${detail.slice(0, 150)}
|
|
183
|
+
|
|
184
|
+
Authorize?`;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
export {
|
|
189
|
+
ActionGate
|
|
190
|
+
};
|
|
191
|
+
//# sourceMappingURL=action-gate-DYV2XQBP.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/action-gate.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * action-gate.ts \u2014 Out-of-band authorization for privileged actions.\n * Agent requests a privileged action \u2192 Telegram inline keyboard to master \u2192 proceed/deny.\n */\n\nimport { randomBytes } from \"node:crypto\";\nimport { readFileSync, writeFileSync, mkdirSync, appendFileSync, existsSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { logInfo, logWarn, logError } from \"./logger.js\";\n\nconst TAG = \"action-gate\";\n\nexport interface AuthToken {\n id: string;\n category: string;\n pattern: string;\n expiresAt: number;\n consumed: boolean;\n}\n\nexport interface AuthRule {\n category: string;\n pattern: string;\n action: \"allow\" | \"deny\";\n createdAt: string;\n}\n\nexport interface AuthRequest {\n id: string;\n category: string;\n detail: string;\n resolve: (granted: boolean) => void;\n timer: ReturnType<typeof setTimeout>;\n reminderSent: boolean;\n}\n\nexport type NotifyFn = (text: string, buttons: Array<{ text: string; data: string }>) => Promise<void>;\n\nexport class ActionGate {\n private tokens = new Map<string, AuthToken>();\n private pending = new Map<string, AuthRequest>();\n private rules: AuthRule[] = [];\n private rulesPath: string;\n private auditPath: string;\n private notify: NotifyFn | null = null;\n\n constructor(authDir: string) {\n this.rulesPath = join(authDir, \"rules.json\");\n this.auditPath = join(authDir, \"audit.jsonl\");\n mkdirSync(authDir, { recursive: true });\n this.loadRules();\n }\n\n setNotify(fn: NotifyFn): void {\n this.notify = fn;\n }\n\n /** Check if a rule already allows/denies this action. */\n checkRules(category: string, pattern: string): \"allow\" | \"deny\" | null {\n for (const rule of this.rules) {\n if (rule.category !== category) continue;\n if (rule.pattern === \"*\" || rule.pattern === pattern) {\n return rule.action;\n }\n }\n return null;\n }\n\n /**\n * Request authorization for a privileged action.\n * Returns true if granted, false if denied/timed out.\n */\n async requestAuth(category: string, detail: string): Promise<boolean> {\n // Check persistent rules first\n const rule = this.checkRules(category, detail);\n if (rule === \"allow\") {\n this.audit(category, detail, \"allowed-by-rule\");\n return true;\n }\n if (rule === \"deny\") {\n this.audit(category, detail, \"denied-by-rule\");\n return false;\n }\n\n // No rule \u2014 ask master via Telegram\n if (!this.notify) {\n logWarn(TAG, `No notify function \u2014 auto-denying ${category}: ${detail.slice(0, 80)}`);\n this.audit(category, detail, \"denied-no-notify\");\n return false;\n }\n\n const requestId = randomBytes(8).toString(\"hex\");\n const message = this.formatMessage(category, detail);\n\n return new Promise<boolean>((resolve) => {\n const timer = setTimeout(() => {\n this.pending.delete(requestId);\n logWarn(TAG, `Auth request timed out: ${category} ${detail.slice(0, 60)}`);\n this.audit(category, detail, \"denied-timeout\");\n resolve(false);\n }, 120_000);\n\n // 60s reminder\n const reminderTimer = setTimeout(() => {\n const req = this.pending.get(requestId);\n if (req && !req.reminderSent) {\n req.reminderSent = true;\n this.notify?.(\"\u23F3 Still waiting for authorization...\", []).catch(() => {});\n }\n }, 60_000);\n\n this.pending.set(requestId, { id: requestId, category, detail, resolve: (granted) => {\n clearTimeout(timer);\n clearTimeout(reminderTimer);\n this.pending.delete(requestId);\n resolve(granted);\n }, timer, reminderSent: false });\n\n this.notify!(message, [\n { text: \"\u2705 Allow once\", data: `auth:${requestId}:once` },\n { text: \"\uD83D\uDD13 Always allow\", data: `auth:${requestId}:always` },\n { text: \"\u274C Deny\", data: `auth:${requestId}:deny` },\n ]).catch((err) => {\n logError(TAG, `Failed to send auth request: ${err}`);\n clearTimeout(timer);\n clearTimeout(reminderTimer);\n this.pending.delete(requestId);\n this.audit(category, detail, \"denied-send-failed\");\n resolve(false);\n });\n });\n }\n\n /** Handle callback from Telegram button press. */\n handleCallback(data: string): boolean {\n const match = data.match(/^auth:([a-f0-9]+):(once|always|deny)$/);\n if (!match) return false;\n\n const [, requestId, action] = match;\n const req = this.pending.get(requestId!);\n if (!req) return false;\n\n if (action === \"once\") {\n this.audit(req.category, req.detail, \"allowed-once\");\n req.resolve(true);\n } else if (action === \"always\") {\n this.storeRule(req.category, req.detail, \"allow\");\n this.audit(req.category, req.detail, \"allowed-always\");\n req.resolve(true);\n } else {\n this.audit(req.category, req.detail, \"denied\");\n req.resolve(false);\n }\n return true;\n }\n\n /** Generate a one-use token for external CLI callers. */\n generateToken(category: string, pattern: string): string {\n const id = randomBytes(16).toString(\"hex\");\n this.tokens.set(id, {\n id,\n category,\n pattern,\n expiresAt: Date.now() + 120_000,\n consumed: false,\n });\n return id;\n }\n\n /** Validate and consume a token. */\n validateToken(tokenId: string): boolean {\n const token = this.tokens.get(tokenId);\n if (!token) return false;\n if (token.consumed || Date.now() > token.expiresAt) {\n this.tokens.delete(tokenId);\n return false;\n }\n token.consumed = true;\n this.tokens.delete(tokenId);\n return true;\n }\n\n private storeRule(category: string, pattern: string, action: \"allow\" | \"deny\"): void {\n this.rules.push({ category, pattern, action, createdAt: new Date().toISOString() });\n writeFileSync(this.rulesPath, JSON.stringify({ rules: this.rules }, null, 2) + \"\\n\");\n logInfo(TAG, `Stored rule: ${action} ${category}:${pattern}`);\n }\n\n private loadRules(): void {\n if (!existsSync(this.rulesPath)) { this.rules = []; return; }\n try {\n const data = JSON.parse(readFileSync(this.rulesPath, \"utf-8\"));\n this.rules = data.rules ?? [];\n } catch { this.rules = []; }\n }\n\n private audit(category: string, detail: string, outcome: string): void {\n const entry = JSON.stringify({ ts: new Date().toISOString(), category, detail: detail.slice(0, 200), outcome });\n try { appendFileSync(this.auditPath, entry + \"\\n\"); } catch { /* best effort */ }\n }\n\n private formatMessage(category: string, detail: string): string {\n switch (category) {\n case \"secret-recall\": return `\uD83D\uDD10 Agent wants SECRET memory:\\n\"${detail.slice(0, 100)}\"\\n\\nAuthorize?`;\n case \"bash-auth\": return `\u26A0\uFE0F Agent wants to run:\\n\\`${detail.slice(0, 200)}\\`\\n\\nAuthorize?`;\n default: return `\uD83D\uDD12 Agent requests: ${category}\\n${detail.slice(0, 150)}\\n\\nAuthorize?`;\n }\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;AAQA;AAHA,SAAS,mBAAmB;AAC5B,SAAS,cAAc,eAAe,WAAW,gBAAgB,kBAAkB;AACnF,SAAS,YAAY;AAGrB,IAAM,MAAM;AA4BL,IAAM,aAAN,MAAiB;AAAA,EACd,SAAS,oBAAI,IAAuB;AAAA,EACpC,UAAU,oBAAI,IAAyB;AAAA,EACvC,QAAoB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA,SAA0B;AAAA,EAElC,YAAY,SAAiB;AAC3B,SAAK,YAAY,KAAK,SAAS,YAAY;AAC3C,SAAK,YAAY,KAAK,SAAS,aAAa;AAC5C,cAAU,SAAS,EAAE,WAAW,KAAK,CAAC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AQ;AAAE,WAAK,QAAQ,CAAC;AAAA,IAAG;AAAA,EAC7B;AAAA,EAEQ,MAAM,UAAkB,QAAgB,SAAuB;AACrE,UAAM,QAAQ,KAAK,UAAU,EAAE,KAAI,oBAAI,KAAK,GAAE,YAAY,GAAG,UAAU,QAAQ,OAAO,MAAM,GAAG,GAAG,GAAG,QAAQ,CAAC;AAC9G,QAAI;AAAE,qBAAe,KAAK,WAAW,QAAQ,IAAI;AAAA,IAAG,QAAQ;AAAA,IAAoB;AAAA,EAClF;AAAA,EAEQ,cAAc,UAAkB,QAAwB;AAC9D,YAAQ,UAAU;AAAA,MAChB,KAAK;AAAiB,eAAO;AAAA,GAAmC,OAAO,MAAM,GAAG,GAAG,CAAC;AAAA;AAAA;AAAA,MACpF,KAAK;AAAa,eAAO;AAAA,IAA6B,OAAO,MAAM,GAAG,GAAG,CAAC;AAAA;AAAA;AAAA,MAC1E;AAAS,eAAO,6BAAsB,QAAQ;AAAA,EAAK,OAAO,MAAM,GAAG,GAAG,CAAC;AAAA;AAAA;AAAA,IACzE;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import {
|
|
4
4
|
getEnv,
|
|
5
5
|
init_env_schema
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-3OXQWII3.js";
|
|
7
|
+
import "./chunk-GUTRAMK3.js";
|
|
8
|
+
import "./chunk-WW5F2DCO.js";
|
|
9
9
|
import "./chunk-7K2YZTLD.js";
|
|
10
10
|
|
|
11
11
|
// src/components/agent-api-rate-limit.ts
|
|
@@ -36,4 +36,4 @@ function checkRateLimit(caller) {
|
|
|
36
36
|
export {
|
|
37
37
|
checkRateLimit
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=agent-api-rate-limit-
|
|
39
|
+
//# sourceMappingURL=agent-api-rate-limit-R2OFAQ3N.js.map
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import {
|
|
4
4
|
createAgentTransport,
|
|
5
5
|
createSubagentTransport
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-2SWKJX64.js";
|
|
7
|
+
import "./chunk-MHK4UPM6.js";
|
|
8
|
+
import "./chunk-RTL7HO3N.js";
|
|
9
9
|
import "./chunk-MZWMYN4O.js";
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-3OXQWII3.js";
|
|
11
|
+
import "./chunk-CYSGXNBY.js";
|
|
12
|
+
import "./chunk-GUTRAMK3.js";
|
|
13
|
+
import "./chunk-WW5F2DCO.js";
|
|
14
14
|
import "./chunk-7K2YZTLD.js";
|
|
15
15
|
export {
|
|
16
16
|
createAgentTransport,
|
|
17
17
|
createSubagentTransport
|
|
18
18
|
};
|
|
19
|
-
//# sourceMappingURL=agent-registry-
|
|
19
|
+
//# sourceMappingURL=agent-registry-S2MNHQYQ.js.map
|
|
@@ -15,11 +15,11 @@ import {
|
|
|
15
15
|
writeRestartReason,
|
|
16
16
|
writeRestartRequested,
|
|
17
17
|
writeSleepStatus
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-RTL7HO3N.js";
|
|
19
19
|
import "./chunk-MZWMYN4O.js";
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-CYSGXNBY.js";
|
|
21
|
+
import "./chunk-GUTRAMK3.js";
|
|
22
|
+
import "./chunk-WW5F2DCO.js";
|
|
23
23
|
import "./chunk-7K2YZTLD.js";
|
|
24
24
|
export {
|
|
25
25
|
appendRestartTimestamp,
|
|
@@ -37,4 +37,4 @@ export {
|
|
|
37
37
|
writeRestartRequested,
|
|
38
38
|
writeSleepStatus
|
|
39
39
|
};
|
|
40
|
-
//# sourceMappingURL=bridge-lock-transport-
|
|
40
|
+
//# sourceMappingURL=bridge-lock-transport-N6OGDOSE.js.map
|
|
@@ -3,16 +3,17 @@
|
|
|
3
3
|
import {
|
|
4
4
|
checkBrowseTasks,
|
|
5
5
|
deliverBrowseResult
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-DHPFI7OF.js";
|
|
7
|
+
import "./chunk-ITB2K6LI.js";
|
|
8
8
|
import "./chunk-TBLYGCPQ.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-H7RX7UCR.js";
|
|
10
|
+
import "./chunk-CYSGXNBY.js";
|
|
11
|
+
import "./chunk-GUTRAMK3.js";
|
|
12
|
+
import "./chunk-DGS7J4P6.js";
|
|
13
|
+
import "./chunk-WW5F2DCO.js";
|
|
13
14
|
import "./chunk-7K2YZTLD.js";
|
|
14
15
|
export {
|
|
15
16
|
checkBrowseTasks,
|
|
16
17
|
deliverBrowseResult
|
|
17
18
|
};
|
|
18
|
-
//# sourceMappingURL=browse-delivery-
|
|
19
|
+
//# sourceMappingURL=browse-delivery-DXGMDMXA.js.map
|
|
@@ -2,18 +2,19 @@
|
|
|
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
|
register
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-RITEGAW6.js";
|
|
6
|
+
import "./chunk-DHPFI7OF.js";
|
|
7
|
+
import "./chunk-ITB2K6LI.js";
|
|
8
8
|
import "./chunk-TBLYGCPQ.js";
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-H7RX7UCR.js";
|
|
10
|
+
import "./chunk-JFKOPNKL.js";
|
|
11
|
+
import "./chunk-3OXQWII3.js";
|
|
12
|
+
import "./chunk-CYSGXNBY.js";
|
|
13
|
+
import "./chunk-GUTRAMK3.js";
|
|
14
|
+
import "./chunk-DGS7J4P6.js";
|
|
15
|
+
import "./chunk-WW5F2DCO.js";
|
|
15
16
|
import "./chunk-7K2YZTLD.js";
|
|
16
17
|
export {
|
|
17
18
|
register
|
|
18
19
|
};
|
|
19
|
-
//# sourceMappingURL=browser-
|
|
20
|
+
//# sourceMappingURL=browser-QMYGSP5W.js.map
|
|
@@ -4,15 +4,15 @@ import {
|
|
|
4
4
|
createCapabilityApi,
|
|
5
5
|
createCapabilityRegistry,
|
|
6
6
|
discoverCapabilities
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
11
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-FY3QUO2L.js";
|
|
8
|
+
import "./chunk-3OXQWII3.js";
|
|
9
|
+
import "./chunk-CYSGXNBY.js";
|
|
10
|
+
import "./chunk-GUTRAMK3.js";
|
|
11
|
+
import "./chunk-WW5F2DCO.js";
|
|
12
12
|
import "./chunk-7K2YZTLD.js";
|
|
13
13
|
export {
|
|
14
14
|
createCapabilityApi,
|
|
15
15
|
createCapabilityRegistry,
|
|
16
16
|
discoverCapabilities
|
|
17
17
|
};
|
|
18
|
-
//# sourceMappingURL=capability-
|
|
18
|
+
//# sourceMappingURL=capability-733TLH4W.js.map
|
|
@@ -2,16 +2,16 @@
|
|
|
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
|
AcpTransport
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MHK4UPM6.js";
|
|
6
6
|
import {
|
|
7
7
|
getEnv,
|
|
8
8
|
init_env_schema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3OXQWII3.js";
|
|
10
10
|
import {
|
|
11
11
|
init_logger,
|
|
12
12
|
logInfo,
|
|
13
13
|
logWarn
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-GUTRAMK3.js";
|
|
15
15
|
|
|
16
16
|
// src/components/agent-registry.ts
|
|
17
17
|
init_env_schema();
|
|
@@ -60,7 +60,7 @@ var SUBAGENT_ACP_ROLE = {
|
|
|
60
60
|
task: "task"
|
|
61
61
|
};
|
|
62
62
|
async function createSubagentTransport(role, registry, currentModel) {
|
|
63
|
-
const { resolveAgent, getEnvFallback, loadTransport } = await import("./transport-config-
|
|
63
|
+
const { resolveAgent, getEnvFallback, loadTransport } = await import("./transport-config-JIKHB7GT.js");
|
|
64
64
|
const tc = loadTransport();
|
|
65
65
|
const agentName = SUBAGENT_TO_AGENT[role];
|
|
66
66
|
const resolved = tc ? resolveAgent(agentName, tc) : null;
|
|
@@ -70,7 +70,7 @@ async function createSubagentTransport(role, registry, currentModel) {
|
|
|
70
70
|
return { model: fb.model, provider: fb.provider, providerName: fb.providerName, contextWindow: fb.contextWindow, maxOutput: fb.maxOutput, fallbacks: [] };
|
|
71
71
|
})();
|
|
72
72
|
if (agent.provider.transport === "api") {
|
|
73
|
-
const { DirectApiTransport } = await import("./direct-api-transport-
|
|
73
|
+
const { DirectApiTransport } = await import("./direct-api-transport-LSAUIP5S.js");
|
|
74
74
|
const { FallbackPolicy } = await import("./fallback-policy-SR6ED5I3.js");
|
|
75
75
|
const apiKey = getEnv().getApiKey(agent.provider.apiKeyEnv ?? "API_KEY");
|
|
76
76
|
const startModel = currentModel ?? agent.model;
|
|
@@ -154,7 +154,7 @@ async function createSubagentTransport(role, registry, currentModel) {
|
|
|
154
154
|
logInfo("subagent", `${role} transport: DirectAPI ${agent.providerName} (model=${startModel}, ${candidates.length} candidates, shared registry: ${!!registry})`);
|
|
155
155
|
return { transport, model: agent.model };
|
|
156
156
|
}
|
|
157
|
-
const { loadAndValidateConfig } = await import("./config-
|
|
157
|
+
const { loadAndValidateConfig } = await import("./config-NDEYF4AQ.js");
|
|
158
158
|
const config = await loadAndValidateConfig();
|
|
159
159
|
const chain = agent.provider.fallbackChain ?? [];
|
|
160
160
|
const modelsToTry = [agent.model, ...chain.filter((m) => m !== agent.model)];
|
|
@@ -186,4 +186,4 @@ export {
|
|
|
186
186
|
createAgentTransport,
|
|
187
187
|
createSubagentTransport
|
|
188
188
|
};
|
|
189
|
-
//# sourceMappingURL=chunk-
|
|
189
|
+
//# sourceMappingURL=chunk-2SWKJX64.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
init_logger,
|
|
5
5
|
logInfo,
|
|
6
6
|
logWarn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GUTRAMK3.js";
|
|
8
8
|
import {
|
|
9
9
|
__esm
|
|
10
10
|
} from "./chunk-7K2YZTLD.js";
|
|
@@ -296,4 +296,4 @@ export {
|
|
|
296
296
|
_resetEnv,
|
|
297
297
|
init_env_schema
|
|
298
298
|
};
|
|
299
|
-
//# sourceMappingURL=chunk-
|
|
299
|
+
//# sourceMappingURL=chunk-3OXQWII3.js.map
|
|
@@ -6,18 +6,19 @@ var BOT_COMMANDS = [
|
|
|
6
6
|
{ name: "reset", description: "Fresh session + exit coding" },
|
|
7
7
|
{ name: "session", description: "Session management" },
|
|
8
8
|
{ name: "compact", description: "Compact context window" },
|
|
9
|
-
{ name: "status", description: "
|
|
9
|
+
{ name: "status", description: "Operational health (PID, platforms, context)" },
|
|
10
|
+
{ name: "software", description: "Version, deploy info, rollback" },
|
|
11
|
+
{ name: "model", description: "Model configuration & switching" },
|
|
10
12
|
{ name: "doctor", description: "Deep healthcheck (probes all subsystems)" },
|
|
11
13
|
{ name: "mcp", description: "MCP server status" },
|
|
12
14
|
{ name: "hooks", description: "List configured hooks" },
|
|
13
15
|
{ name: "stop", description: "Stop current response" },
|
|
14
16
|
{ name: "wait", description: "Inject message mid-run (non-interrupting)" },
|
|
15
|
-
{ name: "
|
|
16
|
-
{ name: "change", description: "Switch model/provider" },
|
|
17
|
+
{ name: "update", description: "Pull & deploy latest code" },
|
|
17
18
|
{ name: "emergency", description: "Activate paid hailMary model" },
|
|
18
19
|
{ name: "heartbeat", description: "Heartbeat diagnostics" },
|
|
19
20
|
{ name: "memory", description: "Memory stats" },
|
|
20
|
-
{ name: "skills", description: "List skills" },
|
|
21
|
+
{ name: "skills", description: "List active skills" },
|
|
21
22
|
{ name: "skill", description: "Reload skills catalog" },
|
|
22
23
|
{ name: "tasks", description: "Scheduled tasks" },
|
|
23
24
|
{ name: "facts", description: "Core knowledge" },
|
|
@@ -25,6 +26,7 @@ var BOT_COMMANDS = [
|
|
|
25
26
|
{ name: "restart", description: "Restart bridge" },
|
|
26
27
|
{ name: "wakeup", description: "Wake Mac from sleep" },
|
|
27
28
|
{ name: "sleep", description: "Sleep status / resume / now" },
|
|
29
|
+
{ name: "whoami", description: "Your user info & clearance" },
|
|
28
30
|
{ name: "help", description: "Show all commands" }
|
|
29
31
|
];
|
|
30
32
|
|
|
@@ -219,11 +221,36 @@ var EMOJI_SCORES = {
|
|
|
219
221
|
function emojiToScore(emoji) {
|
|
220
222
|
return EMOJI_SCORES[emoji] ?? 1;
|
|
221
223
|
}
|
|
224
|
+
var EMOJI_TAGS = {
|
|
225
|
+
"\u2764\uFE0F": "love",
|
|
226
|
+
"\u2764": "love",
|
|
227
|
+
"\u{1F525}": "excitement",
|
|
228
|
+
"\u{1F389}": "joy",
|
|
229
|
+
"\u{1F44F}": "pride",
|
|
230
|
+
"\u{1F44D}": "gratitude",
|
|
231
|
+
"\u{1F602}": "humor",
|
|
232
|
+
"\u{1F929}": "excitement",
|
|
233
|
+
"\u{1F4AF}": "conviction",
|
|
234
|
+
"\u26A1": "determination",
|
|
235
|
+
"\u{1F60A}": "joy",
|
|
236
|
+
"\u{1F64F}": "gratitude",
|
|
237
|
+
"\u{1F914}": "curiosity",
|
|
238
|
+
"\u{1F62E}": "surprise",
|
|
239
|
+
"\u{1F44E}": "frustration",
|
|
240
|
+
"\u{1F622}": "grief",
|
|
241
|
+
"\u{1F621}": "anger",
|
|
242
|
+
"\u{1F92E}": "anger",
|
|
243
|
+
"\u{1F4A9}": "frustration"
|
|
244
|
+
};
|
|
245
|
+
function emojiToTag(emoji) {
|
|
246
|
+
return EMOJI_TAGS[emoji] ?? "gratitude";
|
|
247
|
+
}
|
|
222
248
|
|
|
223
249
|
export {
|
|
224
250
|
BOT_COMMANDS,
|
|
225
251
|
SecurityGate,
|
|
226
252
|
ResponseFormatter,
|
|
227
|
-
emojiToScore
|
|
253
|
+
emojiToScore,
|
|
254
|
+
emojiToTag
|
|
228
255
|
};
|
|
229
|
-
//# sourceMappingURL=chunk-
|
|
256
|
+
//# sourceMappingURL=chunk-3X6VGRL6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/command-registry.ts", "../src/components/security-gate.ts", "../src/components/response-formatter.ts", "../src/utils/emoji-score.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * command-registry.ts \u2014 Shared bot command definitions for all platforms.\n * Both Telegram (setMyCommands) and Discord (application commands) import from here.\n */\n\nexport interface BotCommand {\n readonly name: string;\n readonly description: string;\n}\n\n/** All registered bot commands. Discord requires: name \u226432 chars lowercase, description \u2264100 chars. */\nexport const BOT_COMMANDS: readonly BotCommand[] = [\n { name: \"reset\", description: \"Fresh session + exit coding\" },\n { name: \"session\", description: \"Session management\" },\n { name: \"compact\", description: \"Compact context window\" },\n { name: \"status\", description: \"Operational health (PID, platforms, context)\" },\n { name: \"software\", description: \"Version, deploy info, rollback\" },\n { name: \"model\", description: \"Model configuration & switching\" },\n { name: \"doctor\", description: \"Deep healthcheck (probes all subsystems)\" },\n { name: \"mcp\", description: \"MCP server status\" },\n { name: \"hooks\", description: \"List configured hooks\" },\n { name: \"stop\", description: \"Stop current response\" },\n { name: \"wait\", description: \"Inject message mid-run (non-interrupting)\" },\n { name: \"update\", description: \"Pull & deploy latest code\" },\n { name: \"emergency\", description: \"Activate paid hailMary model\" },\n { name: \"heartbeat\", description: \"Heartbeat diagnostics\" },\n { name: \"memory\", description: \"Memory stats\" },\n { name: \"skills\", description: \"List active skills\" },\n { name: \"skill\", description: \"Reload skills catalog\" },\n { name: \"tasks\", description: \"Scheduled tasks\" },\n { name: \"facts\", description: \"Core knowledge\" },\n { name: \"nlm\", description: \"Knowledge base\" },\n { name: \"restart\", description: \"Restart bridge\" },\n { name: \"wakeup\", description: \"Wake Mac from sleep\" },\n { name: \"sleep\", description: \"Sleep status / resume / now\" },\n { name: \"whoami\", description: \"Your user info & clearance\" },\n { name: \"help\", description: \"Show all commands\" },\n];\n", "/**\n * Fail-closed security gate that authorizes messages against the user registry.\n * Unauthorized messages are silently dropped \u2014 no response, no side effects.\n * Per-user channel gating via UserEntry.allowedChats.\n */\nimport type { UserEntry, UserRegistry } from \"./user-registry.js\";\n\nexport interface AuthResult {\n authorized: boolean;\n user?: UserEntry;\n}\n\nexport class SecurityGate {\n private readonly registry: UserRegistry;\n\n constructor(registry: UserRegistry) {\n if (registry.users.length === 0) {\n throw new Error(\"SecurityGate requires at least one user in registry\");\n }\n this.registry = registry;\n }\n\n /** Authorize a platform user. Checks allowedChats if set. */\n authorize(platformUserId: string, platform: string, channelId?: string): AuthResult {\n const key = `${platform}:${platformUserId}`;\n const user = this.registry.byPlatformId.get(key);\n if (!user) return { authorized: false };\n if (!this.chatAllowed(user, channelId)) return { authorized: false };\n return { authorized: true, user };\n }\n\n /** Authorize by platform user ID string (tries both platforms). */\n authorizeById(userId: string, channelId?: string): boolean {\n const tg = this.registry.byPlatformId.get(`telegram:${userId}`);\n const dc = this.registry.byPlatformId.get(`discord:${userId}`);\n const user = tg ?? dc;\n if (!user) return false;\n return this.chatAllowed(user, channelId);\n }\n\n private chatAllowed(user: UserEntry, channelId?: string): boolean {\n if (!user.allowedChats || user.allowedChats.length === 0) return true;\n if (!channelId) return true;\n return user.allowedChats.includes(channelId);\n }\n}\n", "import type { Platform } from \"../types/index.js\";\n\nconst TELEGRAM_MAX_LENGTH = 4096;\nconst DISCORD_MAX_LENGTH = 2000;\n\n/** Characters that must be escaped in Telegram MarkdownV2. */\nconst MARKDOWN_V2_ESCAPE = /([_*\\[\\]()~`>#+\\-=|{}.!\\\\])/g;\n\n/**\n * Collects streaming ACP response chunks and formats them\n * for Telegram delivery (chunking, Markdown conversion).\n */\nexport class ResponseFormatter {\n private buffers = new Map<string, string[]>();\n\n /** Accumulate a chunk for a session. */\n collectChunk(sessionId: string, chunk: string): void {\n const existing = this.buffers.get(sessionId);\n if (existing) {\n existing.push(chunk);\n } else {\n this.buffers.set(sessionId, [chunk]);\n }\n }\n\n /** Flush accumulated chunks for a session, returning Telegram-ready messages. */\n flush(sessionId: string): string[] {\n const chunks = this.buffers.get(sessionId);\n this.buffers.delete(sessionId);\n if (!chunks || chunks.length === 0) return [];\n const full = chunks.join(\"\");\n return this.chunkText(full);\n }\n\n /** Split text into chunks that fit Telegram's 4096-char limit. */\n chunkText(text: string): string[] {\n if (text.length <= TELEGRAM_MAX_LENGTH) {\n return [text];\n }\n\n const result: string[] = [];\n let remaining = text;\n\n while (remaining.length > 0) {\n if (remaining.length <= TELEGRAM_MAX_LENGTH) {\n result.push(remaining);\n break;\n }\n\n // Try to split at paragraph boundary\n let splitAt = remaining.lastIndexOf(\"\\n\\n\", TELEGRAM_MAX_LENGTH);\n if (splitAt <= 0) {\n // Try single newline\n splitAt = remaining.lastIndexOf(\"\\n\", TELEGRAM_MAX_LENGTH);\n }\n if (splitAt <= 0) {\n // Try space\n splitAt = remaining.lastIndexOf(\" \", TELEGRAM_MAX_LENGTH);\n }\n if (splitAt <= 0) {\n // Hard split\n splitAt = TELEGRAM_MAX_LENGTH;\n }\n\n result.push(remaining.slice(0, splitAt));\n remaining = remaining.slice(splitAt).trimStart();\n }\n\n return result;\n }\n\n /** Escape text for Telegram MarkdownV2 parse mode. */\n toTelegramMarkdown(markdown: string): string {\n // Preserve code blocks \u2014 don't escape inside them\n const parts = markdown.split(/(```[\\s\\S]*?```|`[^`]+`)/);\n return parts\n .map((part, i) => {\n // Odd indices are code blocks/inline code \u2014 leave as-is\n if (i % 2 === 1) return part;\n return part.replace(MARKDOWN_V2_ESCAPE, \"\\\\$1\");\n })\n .join(\"\");\n }\n\n /** Split text into chunks for Discord's 2000-char limit.\n * Respects paragraph and code block boundaries \u2014 never splits inside a fenced code block. */\n chunkTextForDiscord(text: string): string[] {\n if (text.length <= DISCORD_MAX_LENGTH) {\n return [text];\n }\n\n const result: string[] = [];\n let remaining = text;\n\n while (remaining.length > 0) {\n if (remaining.length <= DISCORD_MAX_LENGTH) {\n result.push(remaining);\n break;\n }\n\n // Check if there's an open code block in the window we're about to cut\n const window = remaining.slice(0, DISCORD_MAX_LENGTH);\n const fenceMatches = window.match(/```/g);\n const hasOpenCodeBlock = fenceMatches != null && fenceMatches.length % 2 !== 0;\n\n if (hasOpenCodeBlock) {\n // Find the start of the open code block (last unmatched ```)\n const lastFenceIdx = window.lastIndexOf(\"```\");\n // Try to split before the code block at a paragraph boundary\n let splitAt = remaining.lastIndexOf(\"\\n\\n\", lastFenceIdx);\n if (splitAt <= 0) {\n splitAt = remaining.lastIndexOf(\"\\n\", lastFenceIdx);\n }\n if (splitAt <= 0) {\n // Can't avoid splitting inside the code block \u2014 close and reopen\n splitAt = remaining.lastIndexOf(\"\\n\", DISCORD_MAX_LENGTH - 4); // leave room for closing ```\n if (splitAt <= 0) {\n splitAt = DISCORD_MAX_LENGTH - 4;\n }\n // Find the code fence language specifier for reopening\n const fenceStart = remaining.lastIndexOf(\"```\", splitAt);\n const fenceLine = remaining.slice(fenceStart, remaining.indexOf(\"\\n\", fenceStart));\n result.push(remaining.slice(0, splitAt) + \"\\n```\");\n remaining = fenceLine + \"\\n\" + remaining.slice(splitAt).trimStart();\n continue;\n }\n result.push(remaining.slice(0, splitAt));\n remaining = remaining.slice(splitAt).trimStart();\n continue;\n }\n\n // No open code block \u2014 split normally at paragraph/line boundaries\n let splitAt = remaining.lastIndexOf(\"\\n\\n\", DISCORD_MAX_LENGTH);\n if (splitAt <= 0) {\n splitAt = remaining.lastIndexOf(\"\\n\", DISCORD_MAX_LENGTH);\n }\n if (splitAt <= 0) {\n splitAt = remaining.lastIndexOf(\" \", DISCORD_MAX_LENGTH);\n }\n if (splitAt <= 0) {\n splitAt = DISCORD_MAX_LENGTH;\n }\n\n result.push(remaining.slice(0, splitAt));\n remaining = remaining.slice(splitAt).trimStart();\n }\n\n return result;\n }\n\n /** Split text for the appropriate platform. */\n chunkForPlatform(text: string, platform: Platform): string[] {\n if (platform === \"discord\") {\n return this.chunkTextForDiscord(text);\n }\n return this.chunkText(text);\n }\n\n /** Convert standard Markdown to Discord-compatible Markdown (mostly passthrough). */\n toDiscordMarkdown(text: string): string {\n return text;\n }\n\n /** Format a tool status update for the user. */\n formatToolStatus(toolName: string, status: \"start\" | \"done\" | \"error\"): string {\n switch (status) {\n case \"start\":\n return `\uD83D\uDD27 ${toolName}...`;\n case \"done\":\n return `\u2705 ${toolName}`;\n case \"error\":\n return `\u274C ${toolName} failed`;\n }\n }\n}\n", "/** Inline emoji-to-score map (avoids hard dep on abmind for adapters). */\nconst EMOJI_SCORES: Record<string, number> = {\n \"\u2764\uFE0F\": 4, \"\uD83D\uDD25\": 4, \"\uD83C\uDF89\": 3, \"\uD83D\uDC4F\": 4, \"\u2764\": 4,\n \"\uD83D\uDC4D\": 3, \"\uD83D\uDE02\": 3, \"\uD83E\uDD29\": 4, \"\uD83D\uDCAF\": 3, \"\u26A1\": 3,\n \"\uD83D\uDE0A\": 2, \"\uD83D\uDE4F\": 2, \"\uD83E\uDD14\": 1, \"\uD83D\uDE2E\": 1,\n \"\uD83D\uDC4E\": -3, \"\uD83D\uDE22\": -3, \"\uD83D\uDE21\": -4, \"\uD83E\uDD2E\": -4, \"\uD83D\uDCA9\": -5,\n};\n\nexport function emojiToScore(emoji: string): number {\n return EMOJI_SCORES[emoji] ?? 1;\n}\n\nconst EMOJI_TAGS: Record<string, string> = {\n \"\u2764\uFE0F\": \"love\", \"\u2764\": \"love\", \"\uD83D\uDD25\": \"excitement\", \"\uD83C\uDF89\": \"joy\",\n \"\uD83D\uDC4F\": \"pride\", \"\uD83D\uDC4D\": \"gratitude\", \"\uD83D\uDE02\": \"humor\", \"\uD83E\uDD29\": \"excitement\",\n \"\uD83D\uDCAF\": \"conviction\", \"\u26A1\": \"determination\", \"\uD83D\uDE0A\": \"joy\", \"\uD83D\uDE4F\": \"gratitude\",\n \"\uD83E\uDD14\": \"curiosity\", \"\uD83D\uDE2E\": \"surprise\",\n \"\uD83D\uDC4E\": \"frustration\", \"\uD83D\uDE22\": \"grief\", \"\uD83D\uDE21\": \"anger\", \"\uD83E\uDD2E\": \"anger\", \"\uD83D\uDCA9\": \"frustration\",\n};\n\nexport function emojiToTag(emoji: string): string {\n return EMOJI_TAGS[emoji] ?? \"gratitude\";\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAWO,IAAM,eAAsC;AAAA,EACjD,EAAE,MAAM,SAAS,aAAa,8BAA8B;AAAA,EAC5D,EAAE,MAAM,WAAW,aAAa,qBAAqB;AAAA,EACrD,EAAE,MAAM,WAAW,aAAa,yBAAyB;AAAA,EACzD,EAAE,MAAM,UAAU,aAAa,+CAA+C;AAAA,EAC9E,EAAE,MAAM,YAAY,aAAa,iCAA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
6
|
logWarn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GUTRAMK3.js";
|
|
8
8
|
import {
|
|
9
9
|
abtarsHome,
|
|
10
10
|
init_paths
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WW5F2DCO.js";
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
14
|
} from "./chunk-7K2YZTLD.js";
|
|
@@ -70,4 +70,4 @@ export {
|
|
|
70
70
|
installPackages,
|
|
71
71
|
lazyRequire
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=chunk-
|
|
73
|
+
//# sourceMappingURL=chunk-4XW7YA3K.js.map
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
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
|
-
import {
|
|
4
|
-
loadUsers
|
|
5
|
-
} from "./chunk-GBBTK6H2.js";
|
|
6
3
|
import {
|
|
7
4
|
readEnv
|
|
8
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HAF2AFBW.js";
|
|
6
|
+
import {
|
|
7
|
+
loadUsers
|
|
8
|
+
} from "./chunk-SRFEIZQT.js";
|
|
9
9
|
import {
|
|
10
10
|
getEnv,
|
|
11
11
|
init_env_schema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3OXQWII3.js";
|
|
13
13
|
import {
|
|
14
14
|
init_logger,
|
|
15
15
|
logError,
|
|
16
16
|
logWarn
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-GUTRAMK3.js";
|
|
18
18
|
import {
|
|
19
19
|
init_paths
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-WW5F2DCO.js";
|
|
21
21
|
|
|
22
22
|
// src/components/config.ts
|
|
23
23
|
import { access, stat, constants } from "node:fs/promises";
|
|
@@ -86,7 +86,7 @@ async function validateCliPath(cliPath) {
|
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
88
|
async function loadAndValidateConfig() {
|
|
89
|
-
const { loadTransport, validateAtStartup } = await import("./transport-config-
|
|
89
|
+
const { loadTransport, validateAtStartup } = await import("./transport-config-JIKHB7GT.js");
|
|
90
90
|
const tc = loadTransport();
|
|
91
91
|
if (tc) {
|
|
92
92
|
validateAtStartup();
|
|
@@ -221,4 +221,4 @@ export {
|
|
|
221
221
|
isValidSnowflake,
|
|
222
222
|
loadAndValidateConfig
|
|
223
223
|
};
|
|
224
|
-
//# sourceMappingURL=chunk-
|
|
224
|
+
//# sourceMappingURL=chunk-BBDKU4EH.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
logError,
|
|
6
6
|
logTrace,
|
|
7
7
|
logWarn
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-GUTRAMK3.js";
|
|
9
9
|
import {
|
|
10
10
|
__esm
|
|
11
11
|
} from "./chunk-7K2YZTLD.js";
|
|
@@ -29,4 +29,4 @@ export {
|
|
|
29
29
|
logAndSwallow,
|
|
30
30
|
init_log_and_swallow
|
|
31
31
|
};
|
|
32
|
-
//# sourceMappingURL=chunk-
|
|
32
|
+
//# sourceMappingURL=chunk-CYSGXNBY.js.map
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
init_logger,
|
|
5
5
|
logWarn
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-GUTRAMK3.js";
|
|
7
7
|
import {
|
|
8
8
|
__esm
|
|
9
9
|
} from "./chunk-7K2YZTLD.js";
|
|
@@ -65,4 +65,4 @@ export {
|
|
|
65
65
|
PEERS_SCHEMA,
|
|
66
66
|
init_config_validator
|
|
67
67
|
};
|
|
68
|
-
//# sourceMappingURL=chunk-
|
|
68
|
+
//# sourceMappingURL=chunk-DCY7DGMT.js.map
|