abtars 0.2.1-alpha.9 → 0.2.2
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-KYX63MGY.js} +19 -16
- package/bundle/{_registry.generated-ADOYFJJ4.js.map → _registry.generated-KYX63MGY.js.map} +1 -1
- package/bundle/abtars-browser.js +5 -6
- package/bundle/abtars-browser.js.map +2 -2
- package/bundle/abtars-cli.js +205 -179
- 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 +305 -182
- 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-5VL5KI6U.js} +8 -8
- package/bundle/agent-registry-PIS5XJHX.js +19 -0
- 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-3IPMKYYH.js +672 -0
- package/bundle/chunk-3IPMKYYH.js.map +7 -0
- package/bundle/{chunk-PZE3J7ER.js → chunk-3OXQWII3.js} +2 -2
- package/bundle/{chunk-X5FBUA53.js → chunk-4WKWPU6U.js} +137 -30
- package/bundle/chunk-4WKWPU6U.js.map +7 -0
- package/bundle/{chunk-4KJ76TTE.js → chunk-4XW7YA3K.js} +3 -3
- package/bundle/{chunk-A5OJYQNU.js → chunk-5WFIAUQC.js} +49 -22
- package/bundle/chunk-5WFIAUQC.js.map +7 -0
- package/bundle/{chunk-ZVDVNSXK.js → chunk-7WFE2JI5.js} +7 -7
- package/bundle/{chunk-R36WIOYX.js → chunk-B52YRWR6.js} +34 -6
- package/bundle/chunk-B52YRWR6.js.map +7 -0
- package/bundle/{chunk-Q62SXS73.js → chunk-BBDKU4EH.js} +9 -9
- package/bundle/chunk-BBTQKKDO.js +258 -0
- package/bundle/chunk-BBTQKKDO.js.map +7 -0
- 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-GXKJKYU4.js +1089 -0
- package/bundle/chunk-GXKJKYU4.js.map +7 -0
- package/bundle/{chunk-GPL57SRN.js → chunk-H7RX7UCR.js} +3 -3
- package/bundle/{chunk-BYDUMHXT.js → chunk-HAF2AFBW.js} +2 -2
- package/bundle/chunk-HAS5NEK7.js +189 -0
- package/bundle/chunk-HAS5NEK7.js.map +7 -0
- package/bundle/chunk-HB54S5OY.js +4036 -0
- package/bundle/chunk-HB54S5OY.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-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-KWBGYWDO.js → chunk-N24ROESF.js} +15 -17
- package/bundle/chunk-N24ROESF.js.map +7 -0
- package/bundle/{chunk-P2BZSLJJ.js → chunk-N7UG4FID.js} +448 -129
- package/bundle/chunk-N7UG4FID.js.map +7 -0
- package/bundle/chunk-NIYVCGBC.js +330 -0
- package/bundle/chunk-NIYVCGBC.js.map +7 -0
- package/bundle/{chunk-TOUZC6NR.js → chunk-OKMN6J4Z.js} +3 -3
- package/bundle/{chunk-RV54J75Q.js → chunk-PKHYCNTT.js} +13 -12
- package/bundle/chunk-PKHYCNTT.js.map +7 -0
- package/bundle/{chunk-XZSYMCLF.js → chunk-PUDGA4RR.js} +7 -7
- package/bundle/{chunk-CELR236Q.js → chunk-Q7CH5DA3.js} +2 -2
- package/bundle/chunk-QSC6QZ44.js +183 -0
- package/bundle/chunk-QSC6QZ44.js.map +7 -0
- 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-4BUOO6WI.js → chunk-SMZQDMSZ.js} +31 -11
- package/bundle/chunk-SMZQDMSZ.js.map +7 -0
- package/bundle/{chunk-GBBTK6H2.js → chunk-SRFEIZQT.js} +4 -4
- package/bundle/{chunk-ELRAH7VL.js → chunk-VXUVKC66.js} +3 -3
- package/bundle/chunk-VY2BUO6L.js +4035 -0
- package/bundle/chunk-VY2BUO6L.js.map +7 -0
- package/bundle/chunk-W6ELWLAR.js +143 -0
- package/bundle/chunk-W6ELWLAR.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-Y2XBDQP3.js +4055 -0
- package/bundle/chunk-Y2XBDQP3.js.map +7 -0
- package/bundle/chunk-YMGX6HNP.js +131 -0
- package/bundle/chunk-YMGX6HNP.js.map +7 -0
- package/bundle/chunk-YWZPKBO6.js +22 -0
- package/bundle/chunk-YWZPKBO6.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-IGRSOSK6.js} +15 -14
- package/bundle/commands-LAWVNQTO.js +34 -0
- package/bundle/commands-RBWY7YXB.js +34 -0
- package/bundle/commands-XFZNMZN6.js +34 -0
- 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-OZICXTWQ.js} +43 -15
- package/bundle/direct-api-transport-OZICXTWQ.js.map +7 -0
- package/bundle/direct-api-transport-QIWA5ES2.js +889 -0
- package/bundle/direct-api-transport-QIWA5ES2.js.map +7 -0
- package/bundle/{discord-adapter-WA2MFRK3.js → discord-adapter-JFIIVG34.js} +27 -24
- package/bundle/discord-adapter-JFIIVG34.js.map +7 -0
- package/bundle/discord-adapter-U3FA5OTY.js +589 -0
- package/bundle/discord-adapter-U3FA5OTY.js.map +7 -0
- package/bundle/discord-adapter-W6L5KJ6T.js +589 -0
- package/bundle/discord-adapter-W6L5KJ6T.js.map +7 -0
- package/bundle/discord-adapter-WWM6ROTW.js +589 -0
- package/bundle/discord-adapter-WWM6ROTW.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-I3CXVW52.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/kanban-board-6Q5E5GEB.js +31 -0
- package/bundle/kanban-board-I52RHNHQ.js +31 -0
- 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-4CTBJ6K2.js} +17 -14
- package/bundle/message-pipeline-4KL7OWUH.js +38 -0
- package/bundle/message-pipeline-GFKSHRFU.js +38 -0
- package/bundle/message-pipeline-TGI2WJJM.js +38 -0
- package/bundle/meta.json +3181 -2356
- 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-INFD6ELA.js} +10 -10
- package/bundle/phase-transport-KXFZ5BVF.js +23 -0
- 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-ENFZFUJJ.js} +8 -8
- package/bundle/sleep-ENFZFUJJ.js.map +7 -0
- package/bundle/{soul-bundle-BRIUDEQ2.js → soul-bundle-QTPWDJB2.js} +7 -7
- package/bundle/soul-bundle-QTPWDJB2.js.map +7 -0
- package/bundle/{soul-loader-GBXJ7EBH.js → soul-loader-LCPTN4PK.js} +8 -8
- package/bundle/soul-loader-LCPTN4PK.js.map +7 -0
- 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/stt-YN77NND6.js.map +7 -0
- package/bundle/{subagent-runtime-4MTYUBIZ.js → subagent-runtime-5AYOXOU2.js} +5 -5
- package/bundle/subagent-runtime-5AYOXOU2.js.map +7 -0
- package/bundle/subagent-runtime-VKTX6Q2M.js +13 -0
- package/bundle/subagent-runtime-VKTX6Q2M.js.map +7 -0
- 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-failure-buffer-DPM5MWZ5.js.map +7 -0
- package/bundle/{task-store-LC7ZMS72.js → task-store-VCBHAB43.js} +5 -5
- package/bundle/task-store-VCBHAB43.js.map +7 -0
- package/bundle/{telegram-adapter-BJJYXN7J.js → telegram-adapter-4KI4CJPG.js} +51 -33
- package/bundle/telegram-adapter-4KI4CJPG.js.map +7 -0
- package/bundle/telegram-adapter-76B4JRJJ.js +1080 -0
- package/bundle/telegram-adapter-76B4JRJJ.js.map +7 -0
- package/bundle/telegram-adapter-VZA74EMT.js +1080 -0
- package/bundle/telegram-adapter-VZA74EMT.js.map +7 -0
- package/bundle/telegram-adapter-ZO2CLU22.js +1080 -0
- package/bundle/telegram-adapter-ZO2CLU22.js.map +7 -0
- package/bundle/{tool-registry-T7XLTI2Q.js → tool-registry-CG7GIS64.js} +13 -9
- package/bundle/tool-registry-CG7GIS64.js.map +7 -0
- package/bundle/tool-registry-TGNU5AMG.js +43 -0
- package/bundle/tool-registry-TGNU5AMG.js.map +7 -0
- package/bundle/{tool-sandbox-OZMXJZLQ.js → tool-sandbox-TLAL55QP.js} +5 -5
- package/bundle/tool-sandbox-TLAL55QP.js.map +7 -0
- package/bundle/{transport-config-G5NKQXPJ.js → transport-config-JIKHB7GT.js} +8 -8
- package/bundle/transport-config-JIKHB7GT.js.map +7 -0
- 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 +8 -2
- package/package.json +4 -2
- package/scripts/abtars-daemon.service +3 -0
- package/scripts/abtars@.service +3 -0
- package/scripts/build-and-deploy.sh +68 -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-5VL5KI6U.js.map} +0 -0
- /package/bundle/{bridge-lock-transport-HO545SBK.js.map → agent-registry-PIS5XJHX.js.map} +0 -0
- /package/bundle/{browse-delivery-VTLEAVYA.js.map → bridge-lock-transport-N6OGDOSE.js.map} +0 -0
- /package/bundle/{browser-REIXOJ6S.js.map → browse-delivery-DXGMDMXA.js.map} +0 -0
- /package/bundle/{capability-ILW3D5HS.js.map → browser-QMYGSP5W.js.map} +0 -0
- /package/bundle/{commands-WUGPBPHI.js.map → capability-733TLH4W.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-ZVDVNSXK.js.map → chunk-7WFE2JI5.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-XZSYMCLF.js.map → chunk-PUDGA4RR.js.map} +0 -0
- /package/bundle/{chunk-CELR236Q.js.map → chunk-Q7CH5DA3.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/{config-DQIGDX4W.js.map → commands-IGRSOSK6.js.map} +0 -0
- /package/bundle/{delegation-tools-6FICZQ5G.js.map → commands-LAWVNQTO.js.map} +0 -0
- /package/bundle/{deploy-lib-import-SBKXDD3F.js.map → commands-RBWY7YXB.js.map} +0 -0
- /package/bundle/{env-schema-XCPAJ6IZ.js.map → commands-XFZNMZN6.js.map} +0 -0
- /package/bundle/{hook-system-POI5VRIX.js.map → config-NDEYF4AQ.js.map} +0 -0
- /package/bundle/{daemon-NPKYZ3CJ.js.map → daemon-WOQXCKNL.js.map} +0 -0
- /package/bundle/{hotskills-6ECHLXTJ.js.map → delegation-tools-Z5OM3TXS.js.map} +0 -0
- /package/bundle/{install-SH4UVUXQ.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/{lazy-require-UFYFFX2R.js.map → env-schema-T43X43BU.js.map} +0 -0
- /package/bundle/{message-pipeline-2MBT44FO.js.map → hook-system-ZCVOFFRD.js.map} +0 -0
- /package/bundle/{notification-U6F5ZBSG.js.map → hotskills-DTROJY6G.js.map} +0 -0
- /package/bundle/{paths-ZJYIDND2.js.map → install-I3CXVW52.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/{peer-config-D5A4454H.js.map → kanban-board-6Q5E5GEB.js.map} +0 -0
- /package/bundle/{phase-transport-FEZ4SIJJ.js.map → kanban-board-I52RHNHQ.js.map} +0 -0
- /package/bundle/{skill-stats-IPVKMWN3.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/{sleep-BPWX3FCN.js.map → message-pipeline-4CTBJ6K2.js.map} +0 -0
- /package/bundle/{soul-bundle-BRIUDEQ2.js.map → message-pipeline-4KL7OWUH.js.map} +0 -0
- /package/bundle/{soul-loader-GBXJ7EBH.js.map → message-pipeline-GFKSHRFU.js.map} +0 -0
- /package/bundle/{stt-CF3CPFDC.js.map → message-pipeline-TGI2WJJM.js.map} +0 -0
- /package/bundle/{subagent-runtime-4MTYUBIZ.js.map → notification-ULESRDHB.js.map} +0 -0
- /package/bundle/{openrouter-credits-7XXO6QGQ.js.map → openrouter-credits-PLIKRY5D.js.map} +0 -0
- /package/bundle/{task-store-LC7ZMS72.js.map → paths-QQM74XYT.js.map} +0 -0
- /package/bundle/{peer-client-T44VI7NB.js.map → peer-client-D2F5QWRV.js.map} +0 -0
- /package/bundle/{tool-registry-T7XLTI2Q.js.map → peer-config-5SUIBJLG.js.map} +0 -0
- /package/bundle/{tool-sandbox-OZMXJZLQ.js.map → phase-transport-INFD6ELA.js.map} +0 -0
- /package/bundle/{transport-config-G5NKQXPJ.js.map → phase-transport-KXFZ5BVF.js.map} +0 -0
- /package/bundle/{update-check-O5MS6B3L.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/{user-registry-NUVNEHJU.js.map → skill-stats-NHNH47QW.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/{system-message-TALP6GP2.js.map → system-message-BRU267FW.js.map} +0 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
3
|
+
import {
|
|
4
|
+
abtarsHome,
|
|
5
|
+
init_paths
|
|
6
|
+
} from "./chunk-WW5F2DCO.js";
|
|
7
|
+
import {
|
|
8
|
+
__require
|
|
9
|
+
} from "./chunk-7K2YZTLD.js";
|
|
10
|
+
|
|
11
|
+
// src/components/tasks/kanban-board.ts
|
|
12
|
+
init_paths();
|
|
13
|
+
import { join } from "node:path";
|
|
14
|
+
import { mkdirSync } from "node:fs";
|
|
15
|
+
var _db = null;
|
|
16
|
+
function db() {
|
|
17
|
+
if (!_db) {
|
|
18
|
+
const dir = join(abtarsHome(), "kanban");
|
|
19
|
+
mkdirSync(dir, { recursive: true });
|
|
20
|
+
const Database = __require("better-sqlite3");
|
|
21
|
+
_db = new Database(join(dir, "kanban.db"));
|
|
22
|
+
_db.pragma("journal_mode = WAL");
|
|
23
|
+
_db.exec(`CREATE TABLE IF NOT EXISTS kanban_board (
|
|
24
|
+
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
|
25
|
+
title TEXT NOT NULL,
|
|
26
|
+
source TEXT NOT NULL,
|
|
27
|
+
source_id TEXT,
|
|
28
|
+
assignee TEXT DEFAULT 'local',
|
|
29
|
+
priority TEXT NOT NULL DEFAULT 'MEDIUM' CHECK(priority IN ('CRITICAL','HIGH','MEDIUM','LOW')),
|
|
30
|
+
status TEXT NOT NULL DEFAULT 'queued' CHECK(status IN ('queued','running','done','failed','delivering','delivered')),
|
|
31
|
+
type TEXT,
|
|
32
|
+
notes TEXT,
|
|
33
|
+
result_summary TEXT,
|
|
34
|
+
result_path TEXT,
|
|
35
|
+
error TEXT,
|
|
36
|
+
delivery_attempts INTEGER DEFAULT 0,
|
|
37
|
+
approval TEXT CHECK(approval IS NULL OR approval IN ('pending','approved','rejected')),
|
|
38
|
+
due_at TEXT,
|
|
39
|
+
labels TEXT,
|
|
40
|
+
parent_id INTEGER REFERENCES kanban_board(id),
|
|
41
|
+
blocked_by INTEGER REFERENCES kanban_board(id),
|
|
42
|
+
created_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
43
|
+
updated_at TEXT NOT NULL DEFAULT (datetime('now')),
|
|
44
|
+
completed_at TEXT,
|
|
45
|
+
delivered_at TEXT
|
|
46
|
+
)`);
|
|
47
|
+
}
|
|
48
|
+
return _db;
|
|
49
|
+
}
|
|
50
|
+
function kanbanEnqueue(title, source, sourceId, opts) {
|
|
51
|
+
const stmt = db().prepare(
|
|
52
|
+
`INSERT INTO kanban_board (title, source, source_id, priority, type, labels, due_at, parent_id, notes)
|
|
53
|
+
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`
|
|
54
|
+
);
|
|
55
|
+
const result = stmt.run(title, source, sourceId ?? null, opts?.priority ?? "MEDIUM", opts?.type ?? null, opts?.labels ?? null, opts?.due_at ?? null, opts?.parent_id ?? null, opts?.notes ?? null);
|
|
56
|
+
return Number(result.lastInsertRowid);
|
|
57
|
+
}
|
|
58
|
+
function kanbanRunning(id) {
|
|
59
|
+
db().prepare(`UPDATE kanban_board SET status = 'running', updated_at = datetime('now') WHERE id = ?`).run(id);
|
|
60
|
+
}
|
|
61
|
+
function kanbanComplete(id, resultPath, summary) {
|
|
62
|
+
db().prepare(
|
|
63
|
+
`UPDATE kanban_board SET status = 'done', result_path = ?, result_summary = ?, completed_at = datetime('now'), updated_at = datetime('now') WHERE id = ?`
|
|
64
|
+
).run(resultPath, summary.slice(0, 500), id);
|
|
65
|
+
}
|
|
66
|
+
function kanbanFail(id, error) {
|
|
67
|
+
db().prepare(
|
|
68
|
+
`UPDATE kanban_board SET status = 'failed', error = ?, completed_at = datetime('now'), updated_at = datetime('now') WHERE id = ?`
|
|
69
|
+
).run(error.slice(0, 1e3), id);
|
|
70
|
+
}
|
|
71
|
+
function kanbanPending() {
|
|
72
|
+
return db().prepare(
|
|
73
|
+
`SELECT * FROM kanban_board WHERE status = 'done' AND delivery_attempts < 3 ORDER BY priority = 'CRITICAL' DESC, priority = 'HIGH' DESC, created_at ASC`
|
|
74
|
+
).all();
|
|
75
|
+
}
|
|
76
|
+
function kanbanSetDelivering(id) {
|
|
77
|
+
db().prepare(`UPDATE kanban_board SET status = 'delivering', updated_at = datetime('now') WHERE id = ?`).run(id);
|
|
78
|
+
}
|
|
79
|
+
function kanbanMarkDelivered(id) {
|
|
80
|
+
db().prepare(
|
|
81
|
+
`UPDATE kanban_board SET status = 'delivered', delivered_at = datetime('now'), updated_at = datetime('now') WHERE id = ?`
|
|
82
|
+
).run(id);
|
|
83
|
+
}
|
|
84
|
+
function kanbanDeliveryFailed(id) {
|
|
85
|
+
const card = db().prepare(`SELECT delivery_attempts FROM kanban_board WHERE id = ?`).get(id);
|
|
86
|
+
const attempts = (card?.delivery_attempts ?? 0) + 1;
|
|
87
|
+
if (attempts >= 3) {
|
|
88
|
+
db().prepare(`UPDATE kanban_board SET status = 'failed', error = 'delivery failed after 3 attempts', delivery_attempts = ?, updated_at = datetime('now') WHERE id = ?`).run(attempts, id);
|
|
89
|
+
} else {
|
|
90
|
+
db().prepare(`UPDATE kanban_board SET status = 'done', delivery_attempts = ?, updated_at = datetime('now') WHERE id = ?`).run(attempts, id);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
function kanbanList(status) {
|
|
94
|
+
if (status) {
|
|
95
|
+
return db().prepare(`SELECT * FROM kanban_board WHERE status = ? ORDER BY created_at DESC LIMIT 50`).all(status);
|
|
96
|
+
}
|
|
97
|
+
return db().prepare(`SELECT * FROM kanban_board WHERE status NOT IN ('delivered') ORDER BY status = 'running' DESC, priority = 'CRITICAL' DESC, created_at DESC LIMIT 50`).all();
|
|
98
|
+
}
|
|
99
|
+
function kanbanUpdate(id, fields) {
|
|
100
|
+
const sets = ["updated_at = datetime('now')"];
|
|
101
|
+
const vals = [];
|
|
102
|
+
for (const [k, v] of Object.entries(fields)) {
|
|
103
|
+
if (v !== void 0) {
|
|
104
|
+
sets.push(`${k} = ?`);
|
|
105
|
+
vals.push(v);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
vals.push(id);
|
|
109
|
+
db().prepare(`UPDATE kanban_board SET ${sets.join(", ")} WHERE id = ?`).run(...vals);
|
|
110
|
+
}
|
|
111
|
+
function kanbanCleanup(olderThanDays = 7) {
|
|
112
|
+
const result = db().prepare(
|
|
113
|
+
`DELETE FROM kanban_board WHERE status = 'delivered' AND delivered_at < datetime('now', '-' || ? || ' days')`
|
|
114
|
+
).run(olderThanDays);
|
|
115
|
+
return result.changes;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export {
|
|
119
|
+
kanbanEnqueue,
|
|
120
|
+
kanbanRunning,
|
|
121
|
+
kanbanComplete,
|
|
122
|
+
kanbanFail,
|
|
123
|
+
kanbanPending,
|
|
124
|
+
kanbanSetDelivering,
|
|
125
|
+
kanbanMarkDelivered,
|
|
126
|
+
kanbanDeliveryFailed,
|
|
127
|
+
kanbanList,
|
|
128
|
+
kanbanUpdate,
|
|
129
|
+
kanbanCleanup
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=chunk-YMGX6HNP.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/tasks/kanban-board.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * kanban-board.ts \u2014 Local Kanban board backed by SQLite.\n *\n * Workers write completion; main agent polls and delivers.\n * DB lives at ~/.abtars/kanban/kanban.db\n */\n\nimport { join } from \"node:path\";\nimport { mkdirSync } from \"node:fs\";\nimport { abtarsHome } from \"../../paths.js\";\n\n// better-sqlite3 is external (native module, available at runtime via abmind)\ntype SqliteDb = { prepare(sql: string): any; exec(sql: string): void; pragma(s: string): void };\n\nexport interface KanbanCard {\n id: number;\n title: string;\n source: string;\n source_id: string | null;\n assignee: string;\n priority: string;\n status: string;\n type: string | null;\n notes: string | null;\n result_summary: string | null;\n result_path: string | null;\n error: string | null;\n delivery_attempts: number;\n approval: string | null;\n due_at: string | null;\n labels: string | null;\n parent_id: number | null;\n blocked_by: number | null;\n created_at: string;\n updated_at: string;\n completed_at: string | null;\n delivered_at: string | null;\n}\n\nlet _db: SqliteDb | null = null;\n\nfunction db(): SqliteDb {\n if (!_db) {\n const dir = join(abtarsHome(), \"kanban\");\n mkdirSync(dir, { recursive: true });\n // eslint-disable-next-line @typescript-eslint/no-require-imports\n const Database = require(\"better-sqlite3\");\n _db = new Database(join(dir, \"kanban.db\")) as SqliteDb;\n _db.pragma(\"journal_mode = WAL\");\n _db.exec(`CREATE TABLE IF NOT EXISTS kanban_board (\n id INTEGER PRIMARY KEY AUTOINCREMENT,\n title TEXT NOT NULL,\n source TEXT NOT NULL,\n source_id TEXT,\n assignee TEXT DEFAULT 'local',\n priority TEXT NOT NULL DEFAULT 'MEDIUM' CHECK(priority IN ('CRITICAL','HIGH','MEDIUM','LOW')),\n status TEXT NOT NULL DEFAULT 'queued' CHECK(status IN ('queued','running','done','failed','delivering','delivered')),\n type TEXT,\n notes TEXT,\n result_summary TEXT,\n result_path TEXT,\n error TEXT,\n delivery_attempts INTEGER DEFAULT 0,\n approval TEXT CHECK(approval IS NULL OR approval IN ('pending','approved','rejected')),\n due_at TEXT,\n labels TEXT,\n parent_id INTEGER REFERENCES kanban_board(id),\n blocked_by INTEGER REFERENCES kanban_board(id),\n created_at TEXT NOT NULL DEFAULT (datetime('now')),\n updated_at TEXT NOT NULL DEFAULT (datetime('now')),\n completed_at TEXT,\n delivered_at TEXT\n )`);\n }\n return _db;\n}\n\nexport function kanbanEnqueue(title: string, source: string, sourceId?: string, opts?: { priority?: string; type?: string; labels?: string; due_at?: string; parent_id?: number; notes?: string }): number {\n const stmt = db().prepare(\n `INSERT INTO kanban_board (title, source, source_id, priority, type, labels, due_at, parent_id, notes)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`\n );\n const result = stmt.run(title, source, sourceId ?? null, opts?.priority ?? \"MEDIUM\", opts?.type ?? null, opts?.labels ?? null, opts?.due_at ?? null, opts?.parent_id ?? null, opts?.notes ?? null);\n return Number(result.lastInsertRowid);\n}\n\nexport function kanbanRunning(id: number): void {\n db().prepare(`UPDATE kanban_board SET status = 'running', updated_at = datetime('now') WHERE id = ?`).run(id);\n}\n\nexport function kanbanComplete(id: number, resultPath: string | null, summary: string): void {\n db().prepare(\n `UPDATE kanban_board SET status = 'done', result_path = ?, result_summary = ?, completed_at = datetime('now'), updated_at = datetime('now') WHERE id = ?`\n ).run(resultPath, summary.slice(0, 500), id);\n}\n\nexport function kanbanFail(id: number, error: string): void {\n db().prepare(\n `UPDATE kanban_board SET status = 'failed', error = ?, completed_at = datetime('now'), updated_at = datetime('now') WHERE id = ?`\n ).run(error.slice(0, 1000), id);\n}\n\nexport function kanbanPending(): KanbanCard[] {\n return db().prepare(\n `SELECT * FROM kanban_board WHERE status = 'done' AND delivery_attempts < 3 ORDER BY priority = 'CRITICAL' DESC, priority = 'HIGH' DESC, created_at ASC`\n ).all() as KanbanCard[];\n}\n\nexport function kanbanSetDelivering(id: number): void {\n db().prepare(`UPDATE kanban_board SET status = 'delivering', updated_at = datetime('now') WHERE id = ?`).run(id);\n}\n\nexport function kanbanMarkDelivered(id: number): void {\n db().prepare(\n `UPDATE kanban_board SET status = 'delivered', delivered_at = datetime('now'), updated_at = datetime('now') WHERE id = ?`\n ).run(id);\n}\n\nexport function kanbanDeliveryFailed(id: number): void {\n const card = db().prepare(`SELECT delivery_attempts FROM kanban_board WHERE id = ?`).get(id) as { delivery_attempts: number } | undefined;\n const attempts = (card?.delivery_attempts ?? 0) + 1;\n if (attempts >= 3) {\n db().prepare(`UPDATE kanban_board SET status = 'failed', error = 'delivery failed after 3 attempts', delivery_attempts = ?, updated_at = datetime('now') WHERE id = ?`).run(attempts, id);\n } else {\n db().prepare(`UPDATE kanban_board SET status = 'done', delivery_attempts = ?, updated_at = datetime('now') WHERE id = ?`).run(attempts, id);\n }\n}\n\nexport function kanbanList(status?: string): KanbanCard[] {\n if (status) {\n return db().prepare(`SELECT * FROM kanban_board WHERE status = ? ORDER BY created_at DESC LIMIT 50`).all(status) as KanbanCard[];\n }\n return db().prepare(`SELECT * FROM kanban_board WHERE status NOT IN ('delivered') ORDER BY status = 'running' DESC, priority = 'CRITICAL' DESC, created_at DESC LIMIT 50`).all() as KanbanCard[];\n}\n\nexport function kanbanUpdate(id: number, fields: Partial<Pick<KanbanCard, \"title\" | \"status\" | \"priority\" | \"type\" | \"labels\" | \"due_at\" | \"notes\" | \"parent_id\" | \"approval\">>): void {\n const sets: string[] = [\"updated_at = datetime('now')\"];\n const vals: unknown[] = [];\n for (const [k, v] of Object.entries(fields)) {\n if (v !== undefined) { sets.push(`${k} = ?`); vals.push(v); }\n }\n vals.push(id);\n db().prepare(`UPDATE kanban_board SET ${sets.join(\", \")} WHERE id = ?`).run(...vals);\n}\n\nexport function kanbanCleanup(olderThanDays = 7): number {\n const result = db().prepare(\n `DELETE FROM kanban_board WHERE status = 'delivered' AND delivered_at < datetime('now', '-' || ? || ' days')`\n ).run(olderThanDays);\n return result.changes;\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AASA;AAFA,SAAS,YAAY;AACrB,SAAS,iBAAiB;AA+B1B,IAAI,MAAuB;AAE3B,SAAS,KAAe;AACtB,MAAI,CAAC,KAAK;AACR,UAAM,MAAM,KAAK,WAAW,GAAG,QAAQ;AACvC,cAAU,KAAK,EAAE,WAAW,KAAK,CAAC;AAElC,UAAM,WAAW,UAAQ,gBAAgB;AACzC,UAAM,IAAI,SAAS,KAAK,KAAK,WAAW,CAAC;AACzC,QAAI,OAAO,oBAAoB;AAC/B,QAAI,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAuBP;AAAA,EACJ;AACA,SAAO;AACT;AAEO,SAAS,cAAc,OAAe,QAAgB,UAAmB,MAA2H;AACzM,QAAM,OAAO,GAAG,EAAE;AAAA,IAChB;AAAA;AAAA,EAEF;AACA,QAAM,SAAS,KAAK,IAAI,OAAO,QAAQ,YAAY,MAAM,MAAM,YAAY,UAAU,MAAM,QAAQ,MAAM,MAAM,UAAU,MAAM,MAAM,UAAU,MAAM,MAAM,aAAa,MAAM,MAAM,SAAS,IAAI;AACjM,SAAO,OAAO,OAAO,eAAe;AACtC;AAEO,SAAS,cAAc,IAAkB;AAC9C,KAAG,EAAE,QAAQ,uFAAuF,EAAE,IAAI,EAAE;AAC9G;AAEO,SAAS,eAAe,IAAY,YAA2B,SAAuB;AAC3F,KAAG,EAAE;AAAA,IACH;AAAA,EACF,EAAE,IAAI,YAAY,QAAQ,MAAM,GAAG,GAAG,GAAG,EAAE;AAC7C;AAEO,SAAS,WAAW,IAAY,OAAqB;AAC1D,KAAG,EAAE;AAAA,IACH;AAAA,EACF,EAAE,IAAI,MAAM,MAAM,GAAG,GAAI,GAAG,EAAE;AAChC;AAEO,SAAS,gBAA8B;AAC5C,SAAO,GAAG,EAAE;AAAA,IACV;AAAA,EACF,EAAE,IAAI;AACR;AAEO,SAAS,oBAAoB,IAAkB;AACpD,KAAG,EAAE,QAAQ,0FAA0F,EAAE,IAAI,EAAE;AACjH;AAEO,SAAS,oBAAoB,IAAkB;AACpD,KAAG,EAAE;AAAA,IACH;AAAA,EACF,EAAE,IAAI,EAAE;AACV;AAEO,SAAS,qBAAqB,IAAkB;AACrD,QAAM,OAAO,GAAG,EAAE,QAAQ,yDAAyD,EAAE,IAAI,EAAE;AAC3F,QAAM,YAAY,MAAM,qBAAqB,KAAK;AAClD,MAAI,YAAY,GAAG;AACjB,OAAG,EAAE,QAAQ,yJAAyJ,EAAE,IAAI,UAAU,EAAE;AAAA,EAC1L,OAAO;AACL,OAAG,EAAE,QAAQ,2GAA2G,EAAE,IAAI,UAAU,EAAE;AAAA,EAC5I;AACF;AAEO,SAAS,WAAW,QAA+B;AACxD,MAAI,QAAQ;AACV,WAAO,GAAG,EAAE,QAAQ,+EAA+E,EAAE,IAAI,MAAM;AAAA,EACjH;AACA,SAAO,GAAG,EAAE,QAAQ,qJAAqJ,EAAE,IAAI;AACjL;AAEO,SAAS,aAAa,IAAY,QAA8I;AACrL,QAAM,OAAiB,CAAC,8BAA8B;AACtD,QAAM,OAAkB,CAAC;AACzB,aAAW,CAAC,GAAG,CAAC,KAAK,OAAO,QAAQ,MAAM,GAAG;AAC3C,QAAI,MAAM,QAAW;AAAE,WAAK,KAAK,GAAG,CAAC,MAAM;AAAG,WAAK,KAAK,CAAC;AAAA,IAAG;AAAA,EAC9D;AACA,OAAK,KAAK,EAAE;AACZ,KAAG,EAAE,QAAQ,2BAA2B,KAAK,KAAK,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,IAAI;AACrF;AAEO,SAAS,cAAc,gBAAgB,GAAW;AACvD,QAAM,SAAS,GAAG,EAAE;AAAA,IAClB;AAAA,EACF,EAAE,IAAI,aAAa;AACnB,SAAO,OAAO;AAChB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
3
|
+
|
|
4
|
+
// src/components/sanitize-outbound.ts
|
|
5
|
+
var STRIP = [
|
|
6
|
+
/\s*\[TOPICS:\s*.+?\]/gi,
|
|
7
|
+
/\s*\[NO_REPLY\]\s*/gi,
|
|
8
|
+
/\s*\[REACT:.+?\]\s*/gi
|
|
9
|
+
];
|
|
10
|
+
function sanitizeOutbound(text) {
|
|
11
|
+
let out = text;
|
|
12
|
+
for (const re of STRIP) {
|
|
13
|
+
re.lastIndex = 0;
|
|
14
|
+
out = out.replace(re, "");
|
|
15
|
+
}
|
|
16
|
+
return out.trim();
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
sanitizeOutbound
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-YWZPKBO6.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/sanitize-outbound.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * sanitize-outbound.ts \u2014 Strip internal tags before delivering to user.\n */\nconst STRIP = [\n /\\s*\\[TOPICS:\\s*.+?\\]/gi,\n /\\s*\\[NO_REPLY\\]\\s*/gi,\n /\\s*\\[REACT:.+?\\]\\s*/gi,\n];\n\nexport function sanitizeOutbound(text: string): string {\n let out = text;\n for (const re of STRIP) { re.lastIndex = 0; out = out.replace(re, \"\"); }\n return out.trim();\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAGA,IAAM,QAAQ;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AACF;AAEO,SAAS,iBAAiB,MAAsB;AACrD,MAAI,MAAM;AACV,aAAW,MAAM,OAAO;AAAE,OAAG,YAAY;AAAG,UAAM,IAAI,QAAQ,IAAI,EAAE;AAAA,EAAG;AACvE,SAAO,IAAI,KAAK;AAClB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
3
|
+
|
|
4
|
+
// src/components/tasks/task-failure-buffer.ts
|
|
5
|
+
var buffer = [];
|
|
6
|
+
function addTaskFailure(entry) {
|
|
7
|
+
buffer.push(entry);
|
|
8
|
+
}
|
|
9
|
+
function drainTaskFailures() {
|
|
10
|
+
const entries = buffer.splice(0);
|
|
11
|
+
return entries;
|
|
12
|
+
}
|
|
13
|
+
function hasTaskFailures() {
|
|
14
|
+
return buffer.length > 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
addTaskFailure,
|
|
19
|
+
drainTaskFailures,
|
|
20
|
+
hasTaskFailures
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=chunk-ZAA7B5BN.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/tasks/task-failure-buffer.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * task-failure-buffer.ts \u2014 Buffers task failure notifications for injection (#646).\n * Drained before each prompt in the message pipeline.\n */\n\nexport interface TaskFailureEntry {\n taskName: string;\n exitCode: number;\n error?: string;\n timestamp: number;\n consecutiveFailures: number;\n}\n\nconst buffer: TaskFailureEntry[] = [];\n\nexport function addTaskFailure(entry: TaskFailureEntry): void {\n buffer.push(entry);\n}\n\n/** Drain all pending failures (consumed once on next prompt). */\nexport function drainTaskFailures(): TaskFailureEntry[] {\n const entries = buffer.splice(0);\n return entries;\n}\n\nexport function hasTaskFailures(): boolean {\n return buffer.length > 0;\n}\n"],
|
|
5
|
+
"mappings": ";;;;AAaA,IAAM,SAA6B,CAAC;AAE7B,SAAS,eAAe,OAA+B;AAC5D,SAAO,KAAK,KAAK;AACnB;AAGO,SAAS,oBAAwC;AACtD,QAAM,UAAU,OAAO,OAAO,CAAC;AAC/B,SAAO;AACT;AAEO,SAAS,kBAA2B;AACzC,SAAO,OAAO,SAAS;AACzB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -6,22 +6,23 @@ import {
|
|
|
6
6
|
registerCommand,
|
|
7
7
|
triggerNewSession,
|
|
8
8
|
triggerResetSession
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-N7UG4FID.js";
|
|
10
10
|
import "./chunk-NIRYBWUW.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-L33WNMCP.js";
|
|
12
|
+
import "./chunk-SA6YEFNG.js";
|
|
13
|
+
import "./chunk-PKHYCNTT.js";
|
|
14
|
+
import "./chunk-HJQZP5CK.js";
|
|
15
|
+
import "./chunk-YWZPKBO6.js";
|
|
16
16
|
import "./chunk-JAJ3DUQ2.js";
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-DO4INSXE.js";
|
|
18
|
+
import "./chunk-RTL7HO3N.js";
|
|
19
|
+
import "./chunk-SRFEIZQT.js";
|
|
20
|
+
import "./chunk-H7RX7UCR.js";
|
|
20
21
|
import "./chunk-MZWMYN4O.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-3OXQWII3.js";
|
|
23
|
+
import "./chunk-CYSGXNBY.js";
|
|
24
|
+
import "./chunk-GUTRAMK3.js";
|
|
25
|
+
import "./chunk-WW5F2DCO.js";
|
|
25
26
|
import "./chunk-7K2YZTLD.js";
|
|
26
27
|
export {
|
|
27
28
|
handleCommand,
|
|
@@ -30,4 +31,4 @@ export {
|
|
|
30
31
|
triggerNewSession,
|
|
31
32
|
triggerResetSession
|
|
32
33
|
};
|
|
33
|
-
//# sourceMappingURL=commands-
|
|
34
|
+
//# sourceMappingURL=commands-IGRSOSK6.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
handleCommand,
|
|
5
|
+
killWakeInhibit,
|
|
6
|
+
registerCommand,
|
|
7
|
+
triggerNewSession,
|
|
8
|
+
triggerResetSession
|
|
9
|
+
} from "./chunk-VY2BUO6L.js";
|
|
10
|
+
import "./chunk-NIRYBWUW.js";
|
|
11
|
+
import "./chunk-L33WNMCP.js";
|
|
12
|
+
import "./chunk-SA6YEFNG.js";
|
|
13
|
+
import "./chunk-PKHYCNTT.js";
|
|
14
|
+
import "./chunk-HJQZP5CK.js";
|
|
15
|
+
import "./chunk-YWZPKBO6.js";
|
|
16
|
+
import "./chunk-JAJ3DUQ2.js";
|
|
17
|
+
import "./chunk-DO4INSXE.js";
|
|
18
|
+
import "./chunk-RTL7HO3N.js";
|
|
19
|
+
import "./chunk-SRFEIZQT.js";
|
|
20
|
+
import "./chunk-H7RX7UCR.js";
|
|
21
|
+
import "./chunk-MZWMYN4O.js";
|
|
22
|
+
import "./chunk-3OXQWII3.js";
|
|
23
|
+
import "./chunk-CYSGXNBY.js";
|
|
24
|
+
import "./chunk-GUTRAMK3.js";
|
|
25
|
+
import "./chunk-WW5F2DCO.js";
|
|
26
|
+
import "./chunk-7K2YZTLD.js";
|
|
27
|
+
export {
|
|
28
|
+
handleCommand,
|
|
29
|
+
killWakeInhibit,
|
|
30
|
+
registerCommand,
|
|
31
|
+
triggerNewSession,
|
|
32
|
+
triggerResetSession
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=commands-LAWVNQTO.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
handleCommand,
|
|
5
|
+
killWakeInhibit,
|
|
6
|
+
registerCommand,
|
|
7
|
+
triggerNewSession,
|
|
8
|
+
triggerResetSession
|
|
9
|
+
} from "./chunk-Y2XBDQP3.js";
|
|
10
|
+
import "./chunk-NIRYBWUW.js";
|
|
11
|
+
import "./chunk-L33WNMCP.js";
|
|
12
|
+
import "./chunk-SA6YEFNG.js";
|
|
13
|
+
import "./chunk-PKHYCNTT.js";
|
|
14
|
+
import "./chunk-HJQZP5CK.js";
|
|
15
|
+
import "./chunk-YWZPKBO6.js";
|
|
16
|
+
import "./chunk-JAJ3DUQ2.js";
|
|
17
|
+
import "./chunk-DO4INSXE.js";
|
|
18
|
+
import "./chunk-RTL7HO3N.js";
|
|
19
|
+
import "./chunk-SRFEIZQT.js";
|
|
20
|
+
import "./chunk-H7RX7UCR.js";
|
|
21
|
+
import "./chunk-MZWMYN4O.js";
|
|
22
|
+
import "./chunk-3OXQWII3.js";
|
|
23
|
+
import "./chunk-CYSGXNBY.js";
|
|
24
|
+
import "./chunk-GUTRAMK3.js";
|
|
25
|
+
import "./chunk-WW5F2DCO.js";
|
|
26
|
+
import "./chunk-7K2YZTLD.js";
|
|
27
|
+
export {
|
|
28
|
+
handleCommand,
|
|
29
|
+
killWakeInhibit,
|
|
30
|
+
registerCommand,
|
|
31
|
+
triggerNewSession,
|
|
32
|
+
triggerResetSession
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=commands-RBWY7YXB.js.map
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
handleCommand,
|
|
5
|
+
killWakeInhibit,
|
|
6
|
+
registerCommand,
|
|
7
|
+
triggerNewSession,
|
|
8
|
+
triggerResetSession
|
|
9
|
+
} from "./chunk-HB54S5OY.js";
|
|
10
|
+
import "./chunk-NIRYBWUW.js";
|
|
11
|
+
import "./chunk-L33WNMCP.js";
|
|
12
|
+
import "./chunk-SA6YEFNG.js";
|
|
13
|
+
import "./chunk-PKHYCNTT.js";
|
|
14
|
+
import "./chunk-HJQZP5CK.js";
|
|
15
|
+
import "./chunk-YWZPKBO6.js";
|
|
16
|
+
import "./chunk-JAJ3DUQ2.js";
|
|
17
|
+
import "./chunk-DO4INSXE.js";
|
|
18
|
+
import "./chunk-RTL7HO3N.js";
|
|
19
|
+
import "./chunk-SRFEIZQT.js";
|
|
20
|
+
import "./chunk-H7RX7UCR.js";
|
|
21
|
+
import "./chunk-MZWMYN4O.js";
|
|
22
|
+
import "./chunk-3OXQWII3.js";
|
|
23
|
+
import "./chunk-CYSGXNBY.js";
|
|
24
|
+
import "./chunk-GUTRAMK3.js";
|
|
25
|
+
import "./chunk-WW5F2DCO.js";
|
|
26
|
+
import "./chunk-7K2YZTLD.js";
|
|
27
|
+
export {
|
|
28
|
+
handleCommand,
|
|
29
|
+
killWakeInhibit,
|
|
30
|
+
registerCommand,
|
|
31
|
+
triggerNewSession,
|
|
32
|
+
triggerResetSession
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=commands-XFZNMZN6.js.map
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
import {
|
|
4
4
|
isValidSnowflake,
|
|
5
5
|
loadAndValidateConfig
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-BBDKU4EH.js";
|
|
7
|
+
import "./chunk-HAF2AFBW.js";
|
|
8
|
+
import "./chunk-SRFEIZQT.js";
|
|
9
|
+
import "./chunk-3OXQWII3.js";
|
|
10
|
+
import "./chunk-GUTRAMK3.js";
|
|
11
11
|
import {
|
|
12
12
|
abtarsHome
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-WW5F2DCO.js";
|
|
14
14
|
import "./chunk-7K2YZTLD.js";
|
|
15
15
|
export {
|
|
16
16
|
abtarsHome,
|
|
17
17
|
isValidSnowflake,
|
|
18
18
|
loadAndValidateConfig
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=config-
|
|
20
|
+
//# sourceMappingURL=config-NDEYF4AQ.js.map
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
import {
|
|
4
4
|
init_log_and_swallow,
|
|
5
5
|
logAndSwallow
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-CYSGXNBY.js";
|
|
7
|
+
import "./chunk-GUTRAMK3.js";
|
|
8
|
+
import "./chunk-WW5F2DCO.js";
|
|
9
9
|
import "./chunk-7K2YZTLD.js";
|
|
10
10
|
|
|
11
11
|
// src/cli/commands/daemon.ts
|
|
@@ -289,4 +289,4 @@ Usage: abtars daemon [install|uninstall|start|stop|restart|status]
|
|
|
289
289
|
export {
|
|
290
290
|
daemon
|
|
291
291
|
};
|
|
292
|
-
//# sourceMappingURL=daemon-
|
|
292
|
+
//# sourceMappingURL=daemon-WOQXCKNL.js.map
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
setDelegationDeps,
|
|
10
10
|
spawnSessionTool,
|
|
11
11
|
terminateSessionTool
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-OKMN6J4Z.js";
|
|
13
13
|
import "./chunk-MV6CJFWR.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-3OXQWII3.js";
|
|
15
|
+
import "./chunk-GUTRAMK3.js";
|
|
16
|
+
import "./chunk-WW5F2DCO.js";
|
|
17
17
|
import "./chunk-7K2YZTLD.js";
|
|
18
18
|
export {
|
|
19
19
|
checkSessionTool,
|
|
@@ -25,4 +25,4 @@ export {
|
|
|
25
25
|
spawnSessionTool,
|
|
26
26
|
terminateSessionTool
|
|
27
27
|
};
|
|
28
|
-
//# sourceMappingURL=delegation-tools-
|
|
28
|
+
//# sourceMappingURL=delegation-tools-Z5OM3TXS.js.map
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
safeCopyTree,
|
|
24
24
|
writeManifest,
|
|
25
25
|
writeSentinel
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WMWI3SJ7.js";
|
|
27
27
|
import "./chunk-7K2YZTLD.js";
|
|
28
28
|
export {
|
|
29
29
|
LockHeldError,
|
|
@@ -49,4 +49,4 @@ export {
|
|
|
49
49
|
writeManifest,
|
|
50
50
|
writeSentinel
|
|
51
51
|
};
|
|
52
|
-
//# sourceMappingURL=deploy-lib-import-
|
|
52
|
+
//# sourceMappingURL=deploy-lib-import-6VJTYXEG.js.map
|
|
@@ -4,12 +4,12 @@ import {
|
|
|
4
4
|
OPTIONAL_DEPS,
|
|
5
5
|
installPackages,
|
|
6
6
|
isInstalled
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
7
|
+
} from "./chunk-4XW7YA3K.js";
|
|
8
|
+
import "./chunk-GUTRAMK3.js";
|
|
9
9
|
import {
|
|
10
10
|
abtarsHome,
|
|
11
11
|
init_paths
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-WW5F2DCO.js";
|
|
13
13
|
import "./chunk-7K2YZTLD.js";
|
|
14
14
|
|
|
15
15
|
// src/cli/commands/deps.ts
|
|
@@ -102,4 +102,4 @@ Usage: abtars deps [list|install|remove]
|
|
|
102
102
|
export {
|
|
103
103
|
deps
|
|
104
104
|
};
|
|
105
|
-
//# sourceMappingURL=deps-
|
|
105
|
+
//# sourceMappingURL=deps-65V7XXG4.js.map
|
|
@@ -9,28 +9,30 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
executeToolCall,
|
|
11
11
|
getToolSchemas
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-4WKWPU6U.js";
|
|
13
13
|
import "./chunk-JAJ3DUQ2.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-LBMETTUP.js";
|
|
15
|
+
import "./chunk-SRFEIZQT.js";
|
|
16
|
+
import "./chunk-VXUVKC66.js";
|
|
17
|
+
import "./chunk-OKMN6J4Z.js";
|
|
17
18
|
import "./chunk-MV6CJFWR.js";
|
|
18
|
-
import
|
|
19
|
-
init_log_and_swallow,
|
|
20
|
-
logAndSwallow
|
|
21
|
-
} from "./chunk-EX2SRTUE.js";
|
|
19
|
+
import "./chunk-YMGX6HNP.js";
|
|
22
20
|
import {
|
|
23
21
|
getEnv,
|
|
24
22
|
init_env_schema
|
|
25
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-3OXQWII3.js";
|
|
24
|
+
import {
|
|
25
|
+
init_log_and_swallow,
|
|
26
|
+
logAndSwallow
|
|
27
|
+
} from "./chunk-CYSGXNBY.js";
|
|
26
28
|
import {
|
|
27
29
|
init_logger,
|
|
28
30
|
logDebug,
|
|
29
31
|
logInfo,
|
|
30
32
|
logTrace,
|
|
31
33
|
logWarn
|
|
32
|
-
} from "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
+
} from "./chunk-GUTRAMK3.js";
|
|
35
|
+
import "./chunk-WW5F2DCO.js";
|
|
34
36
|
import "./chunk-7K2YZTLD.js";
|
|
35
37
|
|
|
36
38
|
// src/components/transport/direct-api-transport.ts
|
|
@@ -79,6 +81,8 @@ async function withRetry(fn, policy) {
|
|
|
79
81
|
var ConversationSession = class {
|
|
80
82
|
messages = [];
|
|
81
83
|
totalPromptTokens = 0;
|
|
84
|
+
reasoningEffort = null;
|
|
85
|
+
showReasoning = false;
|
|
82
86
|
maxContext;
|
|
83
87
|
constructor(systemPrompt, maxContext) {
|
|
84
88
|
this.maxContext = maxContext;
|
|
@@ -112,6 +116,8 @@ var ConversationSession = class {
|
|
|
112
116
|
reset(systemPrompt) {
|
|
113
117
|
this.messages = [{ role: "system", content: systemPrompt }];
|
|
114
118
|
this.totalPromptTokens = 0;
|
|
119
|
+
this.reasoningEffort = null;
|
|
120
|
+
this.showReasoning = false;
|
|
115
121
|
}
|
|
116
122
|
/** Roll back to last user message — remove everything after it for clean fallback. */
|
|
117
123
|
rollbackToLastUser() {
|
|
@@ -324,6 +330,8 @@ var DirectApiTransport = class {
|
|
|
324
330
|
getPendingInstruction;
|
|
325
331
|
/** Context orchestrator — when set, messages are built from DB instead of in-memory session. */
|
|
326
332
|
contextOrchestrator;
|
|
333
|
+
/** Memory backend — used for hydrating sessions after restart (#843). */
|
|
334
|
+
memoryBackend;
|
|
327
335
|
policy;
|
|
328
336
|
emergencyOverride = null;
|
|
329
337
|
/** Activate emergency (hailMary) mode — next prompts bypass the fallback policy. */
|
|
@@ -359,6 +367,15 @@ var DirectApiTransport = class {
|
|
|
359
367
|
const session = this.getOrCreateSession(sessionKey);
|
|
360
368
|
this._activeSessionKey = sessionKey;
|
|
361
369
|
this._activeUserId = userId || "master";
|
|
370
|
+
if (session.messages.length === 1 && this.memoryBackend && !this.contextOrchestrator && this.config.maxContext >= 64e3) {
|
|
371
|
+
const sixHoursAgo = Date.now() - 6 * 60 * 6e4;
|
|
372
|
+
const recent = this.memoryBackend.getRecentConversation(userId || "master", sixHoursAgo, 16);
|
|
373
|
+
for (const msg of recent) {
|
|
374
|
+
if (msg.role === "user") session.addUser(msg.content);
|
|
375
|
+
else if (msg.role === "assistant") session.addAssistant(msg.content);
|
|
376
|
+
}
|
|
377
|
+
if (recent.length > 0) logInfo(TAG3, `Hydrated session with ${recent.length} messages from DB`);
|
|
378
|
+
}
|
|
362
379
|
if (this.contextOrchestrator) {
|
|
363
380
|
try {
|
|
364
381
|
const ctx = await this.contextOrchestrator.getContext(sessionKey, this.config.maxContext);
|
|
@@ -385,7 +402,7 @@ var DirectApiTransport = class {
|
|
|
385
402
|
return await this.sendWithPolicy(session, ac.signal);
|
|
386
403
|
} finally {
|
|
387
404
|
const durationMs = Date.now() - (this._promptStartedAt ?? Date.now());
|
|
388
|
-
import("./hook-system-
|
|
405
|
+
import("./hook-system-ZCVOFFRD.js").then(({ hasHooks, fire }) => {
|
|
389
406
|
if (!hasHooks("AfterPrompt")) return;
|
|
390
407
|
fire("AfterPrompt", {
|
|
391
408
|
event: "AfterPrompt",
|
|
@@ -601,7 +618,7 @@ ${summary}`);
|
|
|
601
618
|
try {
|
|
602
619
|
if (this.config.apiFormat === "responses") {
|
|
603
620
|
const { toResponsesRequest } = await import("./responses-adapter-DAV2JUL7.js");
|
|
604
|
-
const { parseResponsesSSE } = await import("./sse-parser-responses-
|
|
621
|
+
const { parseResponsesSSE } = await import("./sse-parser-responses-FYT7A5WT.js");
|
|
605
622
|
const msgs = session.messages.map((m) => ({ role: m.role, content: m.content ?? "" }));
|
|
606
623
|
const reqBody = { ...toResponsesRequest(this.activeModel, msgs, getToolSchemas(this.sandboxPolicy), this.config.maxOutput), stream: true };
|
|
607
624
|
const hdrs = { "Content-Type": "application/json" };
|
|
@@ -640,7 +657,7 @@ ${summary}`);
|
|
|
640
657
|
}
|
|
641
658
|
if (this.config.apiFormat === "anthropic") {
|
|
642
659
|
const { toAnthropicRequest, buildAnthropicHeaders } = await import("./anthropic-adapter-IBY3NPXW.js");
|
|
643
|
-
const { parseAnthropicSSE } = await import("./sse-parser-anthropic-
|
|
660
|
+
const { parseAnthropicSSE } = await import("./sse-parser-anthropic-PYDJM3UC.js");
|
|
644
661
|
const msgs = session.messages.map((m) => ({ role: m.role, content: m.content ?? "", tool_call_id: m.tool_call_id }));
|
|
645
662
|
const reqBody = { ...toAnthropicRequest(this.activeModel, msgs, this.config.maxOutput, getToolSchemas(this.sandboxPolicy)), stream: true };
|
|
646
663
|
const hdrs = buildAnthropicHeaders(this.activeApiKey ?? "");
|
|
@@ -691,6 +708,14 @@ ${summary}`);
|
|
|
691
708
|
body.thinking = { type: "enabled", budget_tokens: this.config.thinking.default };
|
|
692
709
|
}
|
|
693
710
|
}
|
|
711
|
+
if (session.reasoningEffort) {
|
|
712
|
+
const BUDGET_MAP = { low: 1024, medium: 4096, high: 16384 };
|
|
713
|
+
if (this.config.apiFormat === "anthropic") {
|
|
714
|
+
body.thinking = { type: "enabled", budget_tokens: BUDGET_MAP[session.reasoningEffort] ?? 4096 };
|
|
715
|
+
} else {
|
|
716
|
+
body.reasoning_effort = session.reasoningEffort;
|
|
717
|
+
}
|
|
718
|
+
}
|
|
694
719
|
const headers = { "Content-Type": "application/json" };
|
|
695
720
|
if (this.activeApiKey) headers["Authorization"] = `Bearer ${this.activeApiKey}`;
|
|
696
721
|
const response = await withRetry(
|
|
@@ -802,6 +827,9 @@ ${summary}`);
|
|
|
802
827
|
get answerOnly() {
|
|
803
828
|
return this._lastAnswer;
|
|
804
829
|
}
|
|
830
|
+
getActiveSession() {
|
|
831
|
+
return this.sessions.get(this._activeSessionKey) ?? null;
|
|
832
|
+
}
|
|
805
833
|
get toolCallsSucceeded() {
|
|
806
834
|
return this._toolCallsSucceeded;
|
|
807
835
|
}
|
|
@@ -858,4 +886,4 @@ export {
|
|
|
858
886
|
DirectApiTransport,
|
|
859
887
|
normalizeToolCalls
|
|
860
888
|
};
|
|
861
|
-
//# sourceMappingURL=direct-api-transport-
|
|
889
|
+
//# sourceMappingURL=direct-api-transport-OZICXTWQ.js.map
|