abtars 0.3.4-alpha.8 → 0.3.4
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/bundle/{_registry.generated-YP5GLSG7.js → _registry.generated-AVR7DK2A.js} +15 -15
- package/bundle/{abmind-lazy-7Z44NODV.js → abmind-lazy-E3YCFKQ5.js} +15 -5
- package/bundle/abtars-browser.js +4 -4
- package/bundle/abtars-cli.js +23 -13
- package/bundle/abtars-cli.js.map +2 -2
- package/bundle/abtars-restart.js +3 -3
- package/bundle/abtars-task.js +3 -3
- package/bundle/abtars.js +385 -466
- package/bundle/abtars.js.map +4 -4
- package/bundle/{acp-raw-client-E6FM45NC.js → acp-raw-client-UCNK3OTU.js} +2 -2
- package/bundle/{action-gate-G2V47NHW.js → action-gate-V4FCBHFB.js} +2 -2
- package/bundle/{agent-api-adapter-WRGEQ6DV.js → agent-api-adapter-7HEPYSIN.js} +3 -3
- package/bundle/{agent-api-rate-limit-WCFXJMGY.js → agent-api-rate-limit-RZSAM3SW.js} +4 -4
- package/bundle/{agent-registry-GHNG2PH3.js → agent-registry-46A2R5KP.js} +7 -7
- package/bundle/{bootstrap-PZIDBPEJ.js → bootstrap-MIHJJSWU.js} +2 -2
- package/bundle/{bridge-lock-transport-4ZH7QTJP.js → bridge-lock-transport-7RSN7OLJ.js} +4 -4
- package/bundle/{browser-D3LZV7ZK.js → browser-F6BCWJWW.js} +6 -6
- package/bundle/{budget-45QOBDWA.js → budget-WUM3SPKW.js} +3 -3
- package/bundle/{capability-JFWX3IQF.js → capability-QVRKGRFC.js} +5 -5
- package/bundle/{chunk-YSKCQH6E.js → chunk-2IYJ4I66.js} +2 -2
- package/bundle/{chunk-W2R2HFOQ.js → chunk-2NLUT5S2.js} +6 -6
- package/bundle/chunk-3BG3AIDP.js +191 -0
- package/bundle/chunk-3BG3AIDP.js.map +7 -0
- package/bundle/{chunk-OKAQICWY.js → chunk-3GQX34S2.js} +3 -3
- package/bundle/{chunk-QROWBWLL.js → chunk-3XZ773BS.js} +2 -2
- package/bundle/{chunk-DYBW4XXL.js → chunk-467SRLLR.js} +2 -2
- package/bundle/{chunk-374NCXFZ.js → chunk-4AILRHUI.js} +10 -8
- package/bundle/chunk-4AILRHUI.js.map +7 -0
- package/bundle/{chunk-GPZNXY2U.js → chunk-4S3H4OK7.js} +4 -4
- package/bundle/{chunk-NDCRWEEJ.js → chunk-4Y5MJQRE.js} +6 -6
- package/bundle/{chunk-FRKW6LWB.js → chunk-55UWKI5C.js} +3 -3
- package/bundle/{chunk-7JN2MMU7.js → chunk-5PNJFDSW.js} +8 -8
- package/bundle/{chunk-LUNA6PM5.js → chunk-5RVOEFGT.js} +4 -2
- package/bundle/{chunk-LUNA6PM5.js.map → chunk-5RVOEFGT.js.map} +2 -2
- package/bundle/{chunk-OXTSWQCX.js → chunk-5Y3FJ2Y7.js} +2 -2
- package/bundle/{chunk-TMUYFERL.js → chunk-6B5ZFUPD.js} +2 -2
- package/bundle/{chunk-65VCEC32.js → chunk-6PA5JBUU.js} +2 -2
- package/bundle/{chunk-C7K6VZNY.js → chunk-BNXV7SZI.js} +21 -12
- package/bundle/chunk-BNXV7SZI.js.map +7 -0
- package/bundle/{chunk-AFREM7FX.js → chunk-CK7YTA2F.js} +2 -2
- package/bundle/{chunk-NRUSRJXR.js → chunk-DZJ5QZFD.js} +2 -2
- package/bundle/{chunk-YRSMGJFP.js → chunk-E67KESEG.js} +2 -2
- package/bundle/{chunk-ZV4IWKDJ.js → chunk-E7XD5UGB.js} +3 -3
- package/bundle/{chunk-CXXU3HAU.js → chunk-EAX5ZZUL.js} +63 -39
- package/bundle/chunk-EAX5ZZUL.js.map +7 -0
- package/bundle/{chunk-PEDX56EL.js → chunk-EFGBM555.js} +2 -2
- package/bundle/{chunk-EQSG2CRM.js → chunk-FGYDIX54.js} +22 -15
- package/bundle/chunk-FGYDIX54.js.map +7 -0
- package/bundle/{chunk-YPAQEQSC.js → chunk-GF6NVNA7.js} +15 -5
- package/bundle/chunk-GF6NVNA7.js.map +7 -0
- package/bundle/{chunk-UNM3OXHB.js → chunk-HGSHCQ5F.js} +110 -72
- package/bundle/{chunk-UNM3OXHB.js.map → chunk-HGSHCQ5F.js.map} +2 -2
- package/bundle/{chunk-VXCETPZU.js → chunk-IMIGG5EO.js} +39 -39
- package/bundle/chunk-IMIGG5EO.js.map +7 -0
- package/bundle/{chunk-P2K2K6XL.js → chunk-ITOFPJAV.js} +44 -32
- package/bundle/chunk-ITOFPJAV.js.map +7 -0
- package/bundle/{chunk-75ATTOW4.js → chunk-IY6UKLPS.js} +3 -3
- package/bundle/{chunk-EUZDKV3C.js → chunk-J4RUFAPK.js} +3 -3
- package/bundle/{chunk-HZDLFLRP.js → chunk-J7DRPVMU.js} +35 -5
- package/bundle/chunk-J7DRPVMU.js.map +7 -0
- package/bundle/{chunk-EGL6UMAO.js → chunk-JG4BKXBN.js} +7 -1
- package/bundle/chunk-JG4BKXBN.js.map +7 -0
- package/bundle/{chunk-N4EB6LA7.js → chunk-JLWYPGWI.js} +5 -5
- package/bundle/{chunk-5QUTMUIK.js → chunk-JXYWDAHD.js} +12 -12
- package/bundle/{chunk-GRVWZO4C.js → chunk-KOSFXW2S.js} +24 -3
- package/bundle/{chunk-GRVWZO4C.js.map → chunk-KOSFXW2S.js.map} +1 -1
- package/bundle/{chunk-M3JEX6L4.js → chunk-L72RIPEC.js} +9 -9
- package/bundle/{chunk-TEFZ4JA4.js → chunk-NHPLD3C7.js} +2 -2
- package/bundle/{chunk-2KC5G3EA.js → chunk-OWUO5RS3.js} +5 -5
- package/bundle/{chunk-4MULJ5SS.js → chunk-OY4Q6AMY.js} +71 -49
- package/bundle/chunk-OY4Q6AMY.js.map +7 -0
- package/bundle/{chunk-WBTJ2E62.js → chunk-P3NODAHF.js} +2 -5
- package/bundle/{chunk-WBTJ2E62.js.map → chunk-P3NODAHF.js.map} +2 -2
- package/bundle/{chunk-SMPHE3ZM.js → chunk-PB5GF4FG.js} +215 -163
- package/bundle/chunk-PB5GF4FG.js.map +7 -0
- package/bundle/{chunk-WYHGNI56.js → chunk-PMD5BLFS.js} +6 -6
- package/bundle/{chunk-URQPDCK5.js → chunk-Q66LQMMZ.js} +3 -3
- package/bundle/{chunk-IHYKTDIP.js → chunk-SC2Y5NR2.js} +36 -119
- package/bundle/chunk-SC2Y5NR2.js.map +7 -0
- package/bundle/chunk-SFL4EPCZ.js +555 -0
- package/bundle/chunk-SFL4EPCZ.js.map +7 -0
- package/bundle/{chunk-LDUOOKQY.js → chunk-SJPUNDZ3.js} +5 -5
- package/bundle/{chunk-LDUOOKQY.js.map → chunk-SJPUNDZ3.js.map} +1 -1
- package/bundle/{chunk-JQDJPUHM.js → chunk-TWB2ZGVH.js} +2 -2
- package/bundle/{chunk-IJT4KWXT.js → chunk-U4U47YE7.js} +2 -2
- package/bundle/{chunk-2FAZIA37.js → chunk-W546CU3A.js} +3 -3
- package/bundle/chunk-WC5O5KOE.js +211 -0
- package/bundle/chunk-WC5O5KOE.js.map +7 -0
- package/bundle/{chunk-JNIHEDKF.js → chunk-XPWYDNWL.js} +2 -2
- package/bundle/{chunk-GWILHZPT.js → chunk-XRTXYN66.js} +10 -7
- package/bundle/{chunk-GWILHZPT.js.map → chunk-XRTXYN66.js.map} +2 -2
- package/bundle/{chunk-EFJVUJBE.js → chunk-Y5FEFKGM.js} +6 -6
- package/bundle/chunk-YJZE4OK3.js +169 -0
- package/bundle/chunk-YJZE4OK3.js.map +7 -0
- package/bundle/{chunk-GVM5YU5I.js → chunk-Z4FZPB42.js} +2 -2
- package/bundle/{chunk-7BSQ5UQO.js → chunk-ZSIDQ66D.js} +3 -3
- package/bundle/{chunk-XX6BGTPO.js → chunk-ZZZCJJEO.js} +4 -4
- package/bundle/{commands-OIISYHTD.js → commands-2ZW6CMLC.js} +17 -16
- package/bundle/{config-M3P5IOAI.js → config-YMY5YHKN.js} +6 -6
- package/bundle/{context-2RJHC2LE.js → context-CL2RSLII.js} +7 -5
- package/bundle/context-CL2RSLII.js.map +7 -0
- package/bundle/{daemon-TB23FFWY.js → daemon-D7SU63OY.js} +3 -3
- package/bundle/{delegation-tools-YATZFKYO.js → delegation-tools-WS7Z56KZ.js} +12 -12
- package/bundle/{deploy-T6R45OZJ.js → deploy-AMTVKIMU.js} +2 -2
- package/bundle/{deps-WVK553KF.js → deps-T63AVJKJ.js} +3 -3
- package/bundle/{direct-api-transport-S2RDH2I7.js → direct-api-transport-QNNY2WWP.js} +51 -32
- package/bundle/direct-api-transport-QNNY2WWP.js.map +7 -0
- package/bundle/{discord-adapter-UTXUWX3A.js → discord-adapter-ABAD56Y2.js} +21 -20
- package/bundle/{discord-adapter-UTXUWX3A.js.map → discord-adapter-ABAD56Y2.js.map} +1 -1
- package/bundle/{dns-wakeup-IDOJIXBX.js → dns-wakeup-V3LEFXPE.js} +9 -33
- package/bundle/dns-wakeup-V3LEFXPE.js.map +7 -0
- package/bundle/{doctor-probes-B54JFIW3.js → doctor-probes-O6YI6XSZ.js} +6 -2
- package/bundle/{env-schema-4JXQUOH4.js → env-schema-B5RB32DC.js} +3 -3
- package/bundle/{gossip-3C3BSNPN.js → gossip-SKRCPOBS.js} +9 -5
- package/bundle/{guardrails-DL7ZSWVN.js → guardrails-64GQ5Y5K.js} +4 -4
- package/bundle/{heartbeat-system-MVTRS4GP.js → heartbeat-system-X4MUTKJD.js} +6 -6
- package/bundle/{heartbeat-tier3-6KH45CL6.js → heartbeat-tier3-2PTPWEQQ.js} +53 -76
- package/bundle/heartbeat-tier3-2PTPWEQQ.js.map +7 -0
- package/bundle/{hook-system-M3POLUIB.js → hook-system-YB635OC4.js} +3 -3
- package/bundle/{hotskills-FWX4QI7V.js → hotskills-Q75D2DK3.js} +5 -5
- package/bundle/{install-OS3CU7NF.js → install-RFKKFSGS.js} +17 -30
- package/bundle/install-RFKKFSGS.js.map +7 -0
- package/bundle/{install-manifest-5PPWMD2W.js → install-manifest-J7ICPCJN.js} +2 -2
- package/bundle/{irc-adapter-PTTZD32W.js → irc-adapter-TVEV4R6H.js} +3 -3
- package/bundle/{irc-config-CP7ZMUOX.js → irc-config-M676FOFI.js} +4 -4
- package/bundle/{kanban-board-M326B2XJ.js → kanban-board-DLEJUCNN.js} +9 -7
- package/bundle/{kanban-channel-IJ52OMNA.js → kanban-channel-XOLUHJZJ.js} +6 -6
- package/bundle/kanban-delivery-C4QPBNPX.js +45 -0
- package/bundle/kanban-delivery-C4QPBNPX.js.map +7 -0
- package/bundle/{lazy-require-KCRVT4SI.js → lazy-require-JKQSALXN.js} +3 -3
- package/bundle/{logger-OWCSNYCA.js → logger-3EGHBD4R.js} +2 -2
- package/bundle/{main-chat-ZNUZCTNS.js → main-chat-3H63REKK.js} +4 -4
- package/bundle/{master-user-HSKM4ZFN.js → master-user-MUBUP3KD.js} +5 -5
- package/bundle/{media-utils-3ZYOD7SK.js → media-utils-HUUIALAJ.js} +3 -3
- package/bundle/{message-pipeline-AUIUNM5R.js → message-pipeline-GRDRWONR.js} +17 -16
- package/bundle/meta.json +2773 -2241
- package/bundle/{metrics-collector-L3VPEHII.js → metrics-collector-YMUGY3PI.js} +31 -2
- package/bundle/metrics-collector-YMUGY3PI.js.map +7 -0
- package/bundle/{model-health-registry-MLEIZSTV.js → model-health-registry-QADMFQFQ.js} +2 -2
- package/bundle/{nerve-IGSXBKZZ.js → nerve-QPAEBRKX.js} +3 -3
- package/bundle/{notification-BFSIEECG.js → notification-3JICGXWU.js} +6 -6
- package/bundle/{openrouter-credits-NTVZDRYM.js → openrouter-credits-7NEIPYJN.js} +3 -3
- package/bundle/{orc-tools-TOD4WHTM.js → orc-tools-UZVPONKY.js} +5 -3
- package/bundle/{peer-auth-QC4EF2PM.js → peer-auth-RI43DKJE.js} +24 -15
- package/bundle/{peer-client-RGEU5HOK.js → peer-client-UITTMWJ2.js} +34 -29
- package/bundle/peer-client-UITTMWJ2.js.map +7 -0
- package/bundle/{peer-config-TN55LFDC.js → peer-config-URM7DCW6.js} +9 -4
- package/bundle/{peer-transport-5VKK2I7P.js → peer-transport-SI7I72DB.js} +12 -10
- package/bundle/{phase-transport-FS6NL4A5.js → phase-transport-ESWWACZI.js} +17 -17
- package/bundle/{reconcile-CTFCLQRN.js → reconcile-GFDQYNBD.js} +3 -3
- package/bundle/{reconciler-NZ4O4BCP.js → reconciler-IEUJXJN2.js} +12 -12
- package/bundle/{restore-IFHPI7I7.js → restore-FARTGLQQ.js} +3 -3
- package/bundle/{rollback-ANRI3T5Z.js → rollback-GEWPZABG.js} +2 -2
- package/bundle/{sandbox-runtime-QROWHDCS.js → sandbox-runtime-DV6E25J6.js} +2 -2
- package/bundle/{self-healer-utils-IFAYOQO2.js → self-healer-utils-P4SKNNEM.js} +3 -3
- package/bundle/{sha-tracker-ZWBP6CIJ.js → sha-tracker-77SHLYNY.js} +3 -3
- package/bundle/{skill-session-VJXTKOKL.js → skill-session-5HSMXY54.js} +3 -3
- package/bundle/{skill-stats-JORH5DGM.js → skill-stats-MI3RSWWL.js} +4 -4
- package/bundle/{skill-watcher-E4MGLKLS.js → skill-watcher-5L7JE6TN.js} +4 -4
- package/bundle/{sleep-BEWAUFCL.js → sleep-I4JFASCY.js} +11 -11
- package/bundle/{soul-bundle-VWAVHCZ6.js → soul-bundle-522C3IRH.js} +9 -8
- package/bundle/{spin-E3ZDEDKT.js → spin-VHNGNWTD.js} +11 -11
- package/bundle/{spin-notifications-SE2HVZI7.js → spin-notifications-7NC5XZEM.js} +5 -5
- package/bundle/{spin-types-OIE67MJK.js → spin-types-C5KOQOPD.js} +7 -3
- package/bundle/{sse-parser-anthropic-A6R4Z2TB.js → sse-parser-anthropic-MMTVWHLI.js} +3 -3
- package/bundle/{sse-parser-responses-HSZY3QGJ.js → sse-parser-responses-3AOFN64C.js} +3 -3
- package/bundle/{ssrf-guard-O6SHIK6Q.js → ssrf-guard-U2JA72TC.js} +3 -3
- package/bundle/{start-7QZIWO3S.js → start-H5IUFAWF.js} +4 -2
- package/bundle/{start-7QZIWO3S.js.map → start-H5IUFAWF.js.map} +2 -2
- package/bundle/{stt-LGVPXMVR.js → stt-PSOPPBV4.js} +4 -4
- package/bundle/{system-status-FAVNIUFJ.js → system-status-4LYGOFNO.js} +38 -24
- package/bundle/system-status-4LYGOFNO.js.map +7 -0
- package/bundle/{task-store-W5BFIAIH.js → task-store-MNCW42BW.js} +4 -4
- package/bundle/{telegram-adapter-4TX7QWKC.js → telegram-adapter-O6KIZDY6.js} +62 -45
- package/bundle/telegram-adapter-O6KIZDY6.js.map +7 -0
- package/bundle/{tool-registry-7FK3OQGL.js → tool-registry-JJMWCQKZ.js} +26 -24
- package/bundle/{tool-sandbox-4UC6GAKA.js → tool-sandbox-CNL6V6IH.js} +4 -4
- package/bundle/{transport-config-KBF5W2DP.js → transport-config-6MB2K2XC.js} +7 -7
- package/bundle/tribe-GDTFYJTK.js +111 -0
- package/bundle/tribe-GDTFYJTK.js.map +7 -0
- package/bundle/{update-CKFP6LBE.js → update-HGQAOC5L.js} +3 -3
- package/bundle/{usage-tracker-NXD364VX.js → usage-tracker-SR4BI6ZT.js} +2 -2
- package/bundle/{user-registry-35BW4XKM.js → user-registry-4PACZJIJ.js} +4 -4
- package/bundle/wire-platform-KKPWNNNQ.js +88 -0
- package/bundle/wire-platform-KKPWNNNQ.js.map +7 -0
- package/bundle/ws-peer-client-U3NNPOK7.js +370 -0
- package/bundle/ws-peer-client-U3NNPOK7.js.map +7 -0
- package/package.json +1 -1
- package/scripts/abtars-watchdog.sh +1 -5
- package/scripts/emergency-deploy.sh +2 -2
- package/scripts/emergency-update.sh +36 -37
- package/bundle/chunk-374NCXFZ.js.map +0 -7
- package/bundle/chunk-4MULJ5SS.js.map +0 -7
- package/bundle/chunk-4S554KLW.js +0 -105
- package/bundle/chunk-4S554KLW.js.map +0 -7
- package/bundle/chunk-C7K6VZNY.js.map +0 -7
- package/bundle/chunk-CXXU3HAU.js.map +0 -7
- package/bundle/chunk-EGL6UMAO.js.map +0 -7
- package/bundle/chunk-EQSG2CRM.js.map +0 -7
- package/bundle/chunk-HT2BPTZY.js +0 -241
- package/bundle/chunk-HT2BPTZY.js.map +0 -7
- package/bundle/chunk-HZDLFLRP.js.map +0 -7
- package/bundle/chunk-IHYKTDIP.js.map +0 -7
- package/bundle/chunk-IKUZPMVA.js +0 -82
- package/bundle/chunk-IKUZPMVA.js.map +0 -7
- package/bundle/chunk-P2K2K6XL.js.map +0 -7
- package/bundle/chunk-PU5HSKWH.js +0 -257
- package/bundle/chunk-PU5HSKWH.js.map +0 -7
- package/bundle/chunk-RWRRGE4U.js +0 -72
- package/bundle/chunk-RWRRGE4U.js.map +0 -7
- package/bundle/chunk-SMPHE3ZM.js.map +0 -7
- package/bundle/chunk-VUIX5AGB.js +0 -65
- package/bundle/chunk-VUIX5AGB.js.map +0 -7
- package/bundle/chunk-VXCETPZU.js.map +0 -7
- package/bundle/chunk-YPAQEQSC.js.map +0 -7
- package/bundle/context-2RJHC2LE.js.map +0 -7
- package/bundle/direct-api-transport-S2RDH2I7.js.map +0 -7
- package/bundle/dns-wakeup-IDOJIXBX.js.map +0 -7
- package/bundle/heartbeat-tier3-6KH45CL6.js.map +0 -7
- package/bundle/install-OS3CU7NF.js.map +0 -7
- package/bundle/metrics-collector-L3VPEHII.js.map +0 -7
- package/bundle/peer-client-RGEU5HOK.js.map +0 -7
- package/bundle/peer-jwt-NCCPXJRX.js +0 -18
- package/bundle/stream-single-RFJNUTL6.js +0 -34
- package/bundle/stream-single-RFJNUTL6.js.map +0 -7
- package/bundle/system-status-FAVNIUFJ.js.map +0 -7
- package/bundle/telegram-adapter-4TX7QWKC.js.map +0 -7
- package/bundle/user-registry-35BW4XKM.js.map +0 -7
- package/bundle/ws-peer-client-AIXCXF7V.js +0 -173
- package/bundle/ws-peer-client-AIXCXF7V.js.map +0 -7
- /package/bundle/{_registry.generated-YP5GLSG7.js.map → _registry.generated-AVR7DK2A.js.map} +0 -0
- /package/bundle/{abmind-lazy-7Z44NODV.js.map → abmind-lazy-E3YCFKQ5.js.map} +0 -0
- /package/bundle/{acp-raw-client-E6FM45NC.js.map → acp-raw-client-UCNK3OTU.js.map} +0 -0
- /package/bundle/{action-gate-G2V47NHW.js.map → action-gate-V4FCBHFB.js.map} +0 -0
- /package/bundle/{agent-api-adapter-WRGEQ6DV.js.map → agent-api-adapter-7HEPYSIN.js.map} +0 -0
- /package/bundle/{agent-api-rate-limit-WCFXJMGY.js.map → agent-api-rate-limit-RZSAM3SW.js.map} +0 -0
- /package/bundle/{agent-registry-GHNG2PH3.js.map → agent-registry-46A2R5KP.js.map} +0 -0
- /package/bundle/{bootstrap-PZIDBPEJ.js.map → bootstrap-MIHJJSWU.js.map} +0 -0
- /package/bundle/{bridge-lock-transport-4ZH7QTJP.js.map → bridge-lock-transport-7RSN7OLJ.js.map} +0 -0
- /package/bundle/{browser-D3LZV7ZK.js.map → browser-F6BCWJWW.js.map} +0 -0
- /package/bundle/{budget-45QOBDWA.js.map → budget-WUM3SPKW.js.map} +0 -0
- /package/bundle/{capability-JFWX3IQF.js.map → capability-QVRKGRFC.js.map} +0 -0
- /package/bundle/{chunk-YSKCQH6E.js.map → chunk-2IYJ4I66.js.map} +0 -0
- /package/bundle/{chunk-W2R2HFOQ.js.map → chunk-2NLUT5S2.js.map} +0 -0
- /package/bundle/{chunk-OKAQICWY.js.map → chunk-3GQX34S2.js.map} +0 -0
- /package/bundle/{chunk-QROWBWLL.js.map → chunk-3XZ773BS.js.map} +0 -0
- /package/bundle/{chunk-DYBW4XXL.js.map → chunk-467SRLLR.js.map} +0 -0
- /package/bundle/{chunk-GPZNXY2U.js.map → chunk-4S3H4OK7.js.map} +0 -0
- /package/bundle/{chunk-NDCRWEEJ.js.map → chunk-4Y5MJQRE.js.map} +0 -0
- /package/bundle/{chunk-FRKW6LWB.js.map → chunk-55UWKI5C.js.map} +0 -0
- /package/bundle/{chunk-7JN2MMU7.js.map → chunk-5PNJFDSW.js.map} +0 -0
- /package/bundle/{chunk-OXTSWQCX.js.map → chunk-5Y3FJ2Y7.js.map} +0 -0
- /package/bundle/{chunk-TMUYFERL.js.map → chunk-6B5ZFUPD.js.map} +0 -0
- /package/bundle/{chunk-65VCEC32.js.map → chunk-6PA5JBUU.js.map} +0 -0
- /package/bundle/{chunk-AFREM7FX.js.map → chunk-CK7YTA2F.js.map} +0 -0
- /package/bundle/{chunk-NRUSRJXR.js.map → chunk-DZJ5QZFD.js.map} +0 -0
- /package/bundle/{chunk-YRSMGJFP.js.map → chunk-E67KESEG.js.map} +0 -0
- /package/bundle/{chunk-ZV4IWKDJ.js.map → chunk-E7XD5UGB.js.map} +0 -0
- /package/bundle/{chunk-PEDX56EL.js.map → chunk-EFGBM555.js.map} +0 -0
- /package/bundle/{chunk-75ATTOW4.js.map → chunk-IY6UKLPS.js.map} +0 -0
- /package/bundle/{chunk-EUZDKV3C.js.map → chunk-J4RUFAPK.js.map} +0 -0
- /package/bundle/{chunk-N4EB6LA7.js.map → chunk-JLWYPGWI.js.map} +0 -0
- /package/bundle/{chunk-5QUTMUIK.js.map → chunk-JXYWDAHD.js.map} +0 -0
- /package/bundle/{chunk-M3JEX6L4.js.map → chunk-L72RIPEC.js.map} +0 -0
- /package/bundle/{chunk-TEFZ4JA4.js.map → chunk-NHPLD3C7.js.map} +0 -0
- /package/bundle/{chunk-2KC5G3EA.js.map → chunk-OWUO5RS3.js.map} +0 -0
- /package/bundle/{chunk-WYHGNI56.js.map → chunk-PMD5BLFS.js.map} +0 -0
- /package/bundle/{chunk-URQPDCK5.js.map → chunk-Q66LQMMZ.js.map} +0 -0
- /package/bundle/{chunk-JQDJPUHM.js.map → chunk-TWB2ZGVH.js.map} +0 -0
- /package/bundle/{chunk-IJT4KWXT.js.map → chunk-U4U47YE7.js.map} +0 -0
- /package/bundle/{chunk-2FAZIA37.js.map → chunk-W546CU3A.js.map} +0 -0
- /package/bundle/{chunk-JNIHEDKF.js.map → chunk-XPWYDNWL.js.map} +0 -0
- /package/bundle/{chunk-EFJVUJBE.js.map → chunk-Y5FEFKGM.js.map} +0 -0
- /package/bundle/{chunk-GVM5YU5I.js.map → chunk-Z4FZPB42.js.map} +0 -0
- /package/bundle/{chunk-7BSQ5UQO.js.map → chunk-ZSIDQ66D.js.map} +0 -0
- /package/bundle/{chunk-XX6BGTPO.js.map → chunk-ZZZCJJEO.js.map} +0 -0
- /package/bundle/{commands-OIISYHTD.js.map → commands-2ZW6CMLC.js.map} +0 -0
- /package/bundle/{config-M3P5IOAI.js.map → config-YMY5YHKN.js.map} +0 -0
- /package/bundle/{daemon-TB23FFWY.js.map → daemon-D7SU63OY.js.map} +0 -0
- /package/bundle/{delegation-tools-YATZFKYO.js.map → delegation-tools-WS7Z56KZ.js.map} +0 -0
- /package/bundle/{deploy-T6R45OZJ.js.map → deploy-AMTVKIMU.js.map} +0 -0
- /package/bundle/{deps-WVK553KF.js.map → deps-T63AVJKJ.js.map} +0 -0
- /package/bundle/{doctor-probes-B54JFIW3.js.map → doctor-probes-O6YI6XSZ.js.map} +0 -0
- /package/bundle/{env-schema-4JXQUOH4.js.map → env-schema-B5RB32DC.js.map} +0 -0
- /package/bundle/{gossip-3C3BSNPN.js.map → gossip-SKRCPOBS.js.map} +0 -0
- /package/bundle/{guardrails-DL7ZSWVN.js.map → guardrails-64GQ5Y5K.js.map} +0 -0
- /package/bundle/{heartbeat-system-MVTRS4GP.js.map → heartbeat-system-X4MUTKJD.js.map} +0 -0
- /package/bundle/{hook-system-M3POLUIB.js.map → hook-system-YB635OC4.js.map} +0 -0
- /package/bundle/{hotskills-FWX4QI7V.js.map → hotskills-Q75D2DK3.js.map} +0 -0
- /package/bundle/{install-manifest-5PPWMD2W.js.map → install-manifest-J7ICPCJN.js.map} +0 -0
- /package/bundle/{irc-adapter-PTTZD32W.js.map → irc-adapter-TVEV4R6H.js.map} +0 -0
- /package/bundle/{irc-config-CP7ZMUOX.js.map → irc-config-M676FOFI.js.map} +0 -0
- /package/bundle/{kanban-board-M326B2XJ.js.map → kanban-board-DLEJUCNN.js.map} +0 -0
- /package/bundle/{kanban-channel-IJ52OMNA.js.map → kanban-channel-XOLUHJZJ.js.map} +0 -0
- /package/bundle/{lazy-require-KCRVT4SI.js.map → lazy-require-JKQSALXN.js.map} +0 -0
- /package/bundle/{logger-OWCSNYCA.js.map → logger-3EGHBD4R.js.map} +0 -0
- /package/bundle/{main-chat-ZNUZCTNS.js.map → main-chat-3H63REKK.js.map} +0 -0
- /package/bundle/{master-user-HSKM4ZFN.js.map → master-user-MUBUP3KD.js.map} +0 -0
- /package/bundle/{media-utils-3ZYOD7SK.js.map → media-utils-HUUIALAJ.js.map} +0 -0
- /package/bundle/{message-pipeline-AUIUNM5R.js.map → message-pipeline-GRDRWONR.js.map} +0 -0
- /package/bundle/{model-health-registry-MLEIZSTV.js.map → model-health-registry-QADMFQFQ.js.map} +0 -0
- /package/bundle/{nerve-IGSXBKZZ.js.map → nerve-QPAEBRKX.js.map} +0 -0
- /package/bundle/{notification-BFSIEECG.js.map → notification-3JICGXWU.js.map} +0 -0
- /package/bundle/{openrouter-credits-NTVZDRYM.js.map → openrouter-credits-7NEIPYJN.js.map} +0 -0
- /package/bundle/{orc-tools-TOD4WHTM.js.map → orc-tools-UZVPONKY.js.map} +0 -0
- /package/bundle/{peer-auth-QC4EF2PM.js.map → peer-auth-RI43DKJE.js.map} +0 -0
- /package/bundle/{peer-config-TN55LFDC.js.map → peer-config-URM7DCW6.js.map} +0 -0
- /package/bundle/{peer-jwt-NCCPXJRX.js.map → peer-transport-SI7I72DB.js.map} +0 -0
- /package/bundle/{peer-transport-5VKK2I7P.js.map → phase-transport-ESWWACZI.js.map} +0 -0
- /package/bundle/{phase-transport-FS6NL4A5.js.map → reconcile-GFDQYNBD.js.map} +0 -0
- /package/bundle/{reconciler-NZ4O4BCP.js.map → reconciler-IEUJXJN2.js.map} +0 -0
- /package/bundle/{restore-IFHPI7I7.js.map → restore-FARTGLQQ.js.map} +0 -0
- /package/bundle/{reconcile-CTFCLQRN.js.map → rollback-GEWPZABG.js.map} +0 -0
- /package/bundle/{sandbox-runtime-QROWHDCS.js.map → sandbox-runtime-DV6E25J6.js.map} +0 -0
- /package/bundle/{self-healer-utils-IFAYOQO2.js.map → self-healer-utils-P4SKNNEM.js.map} +0 -0
- /package/bundle/{rollback-ANRI3T5Z.js.map → sha-tracker-77SHLYNY.js.map} +0 -0
- /package/bundle/{skill-session-VJXTKOKL.js.map → skill-session-5HSMXY54.js.map} +0 -0
- /package/bundle/{sha-tracker-ZWBP6CIJ.js.map → skill-stats-MI3RSWWL.js.map} +0 -0
- /package/bundle/{skill-stats-JORH5DGM.js.map → skill-watcher-5L7JE6TN.js.map} +0 -0
- /package/bundle/{skill-watcher-E4MGLKLS.js.map → sleep-I4JFASCY.js.map} +0 -0
- /package/bundle/{sleep-BEWAUFCL.js.map → soul-bundle-522C3IRH.js.map} +0 -0
- /package/bundle/{soul-bundle-VWAVHCZ6.js.map → spin-VHNGNWTD.js.map} +0 -0
- /package/bundle/{spin-notifications-SE2HVZI7.js.map → spin-notifications-7NC5XZEM.js.map} +0 -0
- /package/bundle/{spin-E3ZDEDKT.js.map → spin-types-C5KOQOPD.js.map} +0 -0
- /package/bundle/{sse-parser-anthropic-A6R4Z2TB.js.map → sse-parser-anthropic-MMTVWHLI.js.map} +0 -0
- /package/bundle/{sse-parser-responses-HSZY3QGJ.js.map → sse-parser-responses-3AOFN64C.js.map} +0 -0
- /package/bundle/{ssrf-guard-O6SHIK6Q.js.map → ssrf-guard-U2JA72TC.js.map} +0 -0
- /package/bundle/{spin-types-OIE67MJK.js.map → stt-PSOPPBV4.js.map} +0 -0
- /package/bundle/{stt-LGVPXMVR.js.map → task-store-MNCW42BW.js.map} +0 -0
- /package/bundle/{task-store-W5BFIAIH.js.map → tool-registry-JJMWCQKZ.js.map} +0 -0
- /package/bundle/{tool-registry-7FK3OQGL.js.map → tool-sandbox-CNL6V6IH.js.map} +0 -0
- /package/bundle/{tool-sandbox-4UC6GAKA.js.map → transport-config-6MB2K2XC.js.map} +0 -0
- /package/bundle/{transport-config-KBF5W2DP.js.map → update-HGQAOC5L.js.map} +0 -0
- /package/bundle/{update-CKFP6LBE.js.map → usage-tracker-SR4BI6ZT.js.map} +0 -0
- /package/bundle/{usage-tracker-NXD364VX.js.map → user-registry-4PACZJIJ.js.map} +0 -0
|
@@ -5,21 +5,21 @@ import {
|
|
|
5
5
|
readBridgeLockField,
|
|
6
6
|
updateBridgeLockField,
|
|
7
7
|
updateLastHeartbeat
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KOSFXW2S.js";
|
|
9
9
|
import {
|
|
10
10
|
getEnv,
|
|
11
11
|
init_env_schema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6PA5JBUU.js";
|
|
13
13
|
import {
|
|
14
14
|
init_log_and_swallow,
|
|
15
15
|
logAndSwallow
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-2IYJ4I66.js";
|
|
17
17
|
import {
|
|
18
18
|
init_logger,
|
|
19
19
|
logDebug,
|
|
20
20
|
logInfo,
|
|
21
21
|
logWarn
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XRTXYN66.js";
|
|
23
23
|
import {
|
|
24
24
|
__esm,
|
|
25
25
|
__export
|
|
@@ -260,4 +260,4 @@ export {
|
|
|
260
260
|
heartbeat_system_exports,
|
|
261
261
|
init_heartbeat_system
|
|
262
262
|
};
|
|
263
|
-
//# sourceMappingURL=chunk-
|
|
263
|
+
//# sourceMappingURL=chunk-SJPUNDZ3.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/platform-detect.ts", "../src/components/heartbeat-system.ts"],
|
|
4
|
-
"sourcesContent": ["import { logAndSwallow } from \"./log-and-swallow.js\";\nimport { getEnv } from \"./env-schema.js\";\n/**\n * Platform-specific wake classification.\n * Detects whether a resume from sleep is a background wake (darkwake) or full user wake.\n *\n * Primary path: if bridge.lock.sleepStatus === \"hw_sleep\" (we put the machine to sleep),\n * use the sleep window to classify \u2014 inside window = dark (suppress), outside = full (morning restart).\n * No OS-specific parsing needed for the common case.\n *\n * Fallback: OS-specific detection for non-bridge-initiated sleeps (lid close, OS idle).\n */\nimport { execSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { platform } from \"node:os\";\nimport { readBridgeLockField } from \"./transport/bridge-lock-transport.js\";\n\n/** #1265: WSL detection \u2014 cached at module load since the platform never changes at runtime.\n * WSL kernels append \"microsoft\" or \"WSL\" to /proc/version. */\nlet _isWslCache: boolean | null = null;\nexport function isWsl(): boolean {\n if (_isWslCache !== null) return _isWslCache;\n try {\n const version = readFileSync(\"/proc/version\", \"utf-8\").toLowerCase();\n _isWslCache = version.includes(\"microsoft\") || version.includes(\"wsl\");\n } catch {\n _isWslCache = false;\n }\n return _isWslCache;\n}\n\n/** #1265: Standby gap threshold for WSL. Below 3h = host-sleep freeze (survived, no restart).\n * Above 3h = network state likely stale (DNS, TCP keepalives), restart is justified. */\nexport const WSL_STANDBY_THRESHOLD_MS = 180 * 60 * 1000;\n\nexport type ResumeKind = \"dark\" | \"full\" | \"unknown\";\n\n/** Classify the current wake state. Fast, non-throwing. */\nexport function classifyResume(): ResumeKind {\n // Primary: our own state \u2014 most reliable, no OS log parsing.\n const status = readBridgeLockField<string>(\"sleepStatus\");\n if (status === \"hw_sleep\") {\n const hour = new Date().getHours();\n const WAKE_HOUR = getEnv().wakeTime.hour;\n const BED_HOUR = getEnv().bedTime.hour;\n const inSleepWindow = (BED_HOUR < WAKE_HOUR)\n ? (hour >= BED_HOUR && hour < WAKE_HOUR)\n : (hour >= BED_HOUR || hour < WAKE_HOUR);\n return inSleepWindow ? \"dark\" : \"full\";\n }\n\n // Fallback: OS-specific for non-bridge-initiated sleeps (lid close, idle).\n const os = platform();\n if (os === \"darwin\") return classifyMacOS();\n if (os === \"linux\") return classifyLinux();\n return \"unknown\";\n}\n\nfunction classifyMacOS(): ResumeKind {\n try {\n const out = execSync(\"pmset -g log 2>/dev/null\", { timeout: 3000, encoding: \"utf-8\" });\n const lines = out.split(\"\\n\").filter(l => /\\bDarkWake\\b|\\bWake\\b/.test(l) && !l.includes(\"Notification\"));\n const last = lines.at(-1) ?? \"\";\n if (last.includes(\"DarkWake\")) return \"dark\";\n if (last.includes(\"Wake\")) return \"full\";\n } catch (err) { logAndSwallow(\"platform_detect\", \"op\", err); }\n return \"unknown\";\n}\n\nfunction classifyLinux(): ResumeKind {\n try {\n // Check if systemd logged a suspend resume within the last 5 minutes.\n // Linux has no darkwake \u2014 any suspend resume is a full wake.\n const out = execSync(\n \"journalctl -b -u systemd-suspend.service --since '5 min ago' --no-pager -q 2>/dev/null\",\n { timeout: 3000, encoding: \"utf-8\" },\n );\n if (out.trim().length > 0) return \"full\";\n } catch (err) { logAndSwallow(\"platform_detect\", \"op\", err); }\n return \"unknown\";\n}\n", "import { logInfo, logWarn, logDebug } from \"./logger.js\";\nimport { isWsl, WSL_STANDBY_THRESHOLD_MS } from \"./platform-detect.js\";\nimport { updateLastHeartbeat, updateBridgeLockField } from \"./transport/bridge-lock-transport.js\";\nimport type { HeartbeatTask } from \"../types/index.js\";\n\nexport type HeartbeatConfig = {\n enabled: boolean;\n intervalMs: number;\n bridgeLockPath: string;\n /** When true, skip all heavy tasks (e.g. sleep in progress \u2014 avoid model rate limits). */\n sleepActive?: () => boolean;\n /** Called when standby resume detected (gap > interval\u00D73). Bridge should doctor + exit. */\n onStandbyResume?: (gapMs: number) => void;\n /** Called after every successful tick \u2014 used to kick the watchdog. */\n onTick?: () => void;\n};\n\nconst TAG = \"heartbeat\";\nconst MIN_GUARD_MS = 3 * 60 * 1000; // 3 min minimum delay before first tick\n\nimport type { ITaskSlot } from \"./skeleton.js\";\n\nexport type TaskStatus = \"\u2713\" | \"\u2717\" | \"\u2014\" | \"?\";\n\nexport class HeartbeatSystem implements ITaskSlot {\n private timer: ReturnType<typeof setInterval> | null = null;\n private initTimeout: ReturnType<typeof setTimeout> | null = null;\n private tasks: HeartbeatTask[] = [];\n private running = false;\n private lastTickAt = 0;\n private tickCount = 0;\n private readonly taskStatuses = new Map<string, TaskStatus>();\n private _cronQueue: { enqueue: (entry: any, cb: any) => void } | null = null;\n private _notify: ((chatId: string, text: string) => void) | null = null;\n\n constructor(private config: HeartbeatConfig) {}\n\n /** Late-bind: attach cronQueue after construction (used by graph boot). */\n setCronQueue(queue: { enqueue: (entry: any, cb: any) => void }): void { this._cronQueue = queue; }\n get cronQueue() { return this._cronQueue; }\n\n /** Late-bind: attach notification sender after construction (used by graph boot). */\n setNotify(fn: (chatId: string, text: string) => void): void { this._notify = fn; }\n get notify() { return this._notify; }\n\n /** Register a task to run on each heartbeat tick. */\n registerTask(task: HeartbeatTask): void {\n this.tasks.push(task);\n }\n\n /** Start the heartbeat loop, aligned to wall-clock boundaries. */\n start(): void {\n if (this.running) return;\n if (!this.config.enabled) {\n logInfo(TAG, \"Heartbeat disabled by configuration\");\n return;\n }\n\n this.running = true;\n const taskNames = this.tasks.map((t) => t.name).join(\", \");\n const iv = this.config.intervalMs;\n\n // Align to next clock boundary (ceil(now / interval) * interval)\n const now = Date.now();\n let nextBoundary = Math.ceil(now / iv) * iv;\n let delay = nextBoundary - now;\n if (delay < MIN_GUARD_MS) {\n nextBoundary += iv;\n delay += iv;\n }\n\n const firstTickAt = new Date(nextBoundary).toTimeString().slice(0, 8);\n logInfo(TAG, `Starting heartbeat \u2014 interval=${iv}ms, first tick at ${firstTickAt} (${Math.round(delay / 1000)}s), tasks=[${taskNames}]`);\n\n this.lastTickAt = now; // seed for standby detection\n this.initTimeout = setTimeout(() => {\n this.lastTickAt = Date.now();\n void this.tick();\n this.timer = setInterval(() => {\n void this.tick();\n }, iv);\n }, delay);\n }\n\n /** Stop the heartbeat loop and clean up timers. */\n stop(): void {\n if (!this.running) return;\n if (this.initTimeout !== null) { clearTimeout(this.initTimeout); this.initTimeout = null; }\n if (this.timer !== null) { clearInterval(this.timer); this.timer = null; }\n this.running = false;\n logInfo(TAG, \"Heartbeat stopped\");\n }\n\n /** Whether the heartbeat loop is running. */\n get isRunning(): boolean { return this.running; }\n\n /** Configured interval in milliseconds. */\n get intervalMs(): number { return this.config.intervalMs; }\n\n /** Get registered task names. */\n getTaskNames(): string[] {\n return this.tasks.map(t => t.name);\n }\n\n /** Get last-run status for each task. */\n getTaskStatuses(): ReadonlyMap<string, TaskStatus> {\n return this.taskStatuses;\n }\n\n /** Execute all registered tasks with error isolation. */\n private async tick(): Promise<void> {\n const now = Date.now();\n const gap = now - this.lastTickAt;\n this.lastTickAt = now;\n\n // Standby detection: gap > threshold means process was suspended\n // #1265: on WSL, use 180min threshold (VM freeze from host sleep \u2260 real suspend).\n // On real Linux/Mac, 3\u00D7 interval (180s) is sufficient.\n const standbyThresholdMs = isWsl() ? WSL_STANDBY_THRESHOLD_MS : this.config.intervalMs * 3;\n if (gap > standbyThresholdMs) {\n const gapMin = Math.round(gap / 60000);\n logInfo(TAG, `Standby resume detected \u2014 suspended ${gapMin}min`);\n // Immediately update lastHeartbeat so external watchdog doesn't kill us\n updateLastHeartbeat();\n if (this.config.onStandbyResume) {\n this.config.onStandbyResume(gap);\n return; // skip all tasks this tick\n }\n }\n\n logDebug(TAG, `Tick \u2014 executing ${this.tasks.length} task(s)`);\n let heavyRan = false;\n const sleepBlocking = this.config.sleepActive?.() ?? false;\n\n for (const task of this.tasks) {\n try {\n if (task.heavy && (heavyRan || sleepBlocking)) {\n logDebug(TAG, `Skipping heavy task \"${task.name}\" \u2014 ${sleepBlocking ? \"sleep in progress\" : \"another heavy task already ran\"}`);\n this.taskStatuses.set(task.name, \"\u2014\");\n continue;\n }\n const result = await task.execute();\n if (task.heavy && result === true) heavyRan = true;\n this.taskStatuses.set(task.name, \"\u2713\");\n } catch (err) {\n const msg = err instanceof Error ? err.message : JSON.stringify(err);\n logWarn(TAG, `Task \"${task.name}\" failed: ${msg}`);\n this.taskStatuses.set(task.name, \"\u2717\");\n }\n }\n\n // Update bridge.lock with lastHeartbeat\n updateLastHeartbeat();\n\n // Heap stats \u2014 once per hour (every 60 ticks)\n this.tickCount++;\n if (this.tickCount % 60 === 0) {\n const heap = Math.round(process.memoryUsage().heapUsed / 1048576);\n updateBridgeLockField(\"heapUsedMB\", heap);\n if (heap > 820) {\n logWarn(TAG, `Heap high: ${heap}MB / 1024MB (80%+)`);\n } else {\n logDebug(TAG, `Heap: ${heap}MB / 1024MB`);\n }\n }\n\n // Kick the watchdog\n this.config.onTick?.();\n }\n}\n\n// #1181: Module-level singleton for local access (avoids circular dep via abmind)\nlet _instance: HeartbeatSystem | null = null;\nexport function setHeartbeatInstance(hb: HeartbeatSystem): void { _instance = hb; }\nexport function getHeartbeatInstance(): HeartbeatSystem | null { return _instance; }\n"],
|
|
4
|
+
"sourcesContent": ["import { logAndSwallow } from \"./log-and-swallow.js\";\nimport { getEnv } from \"./env-schema.js\";\n/**\n * Platform-specific wake classification.\n * Detects whether a resume from sleep is a background wake (darkwake) or full user wake.\n *\n * Primary path: if bridge.lock.sleepStatus === \"hw_sleep\" (we put the machine to sleep),\n * use the sleep window to classify \u2014 inside window = dark (suppress), outside = full (morning restart).\n * No OS-specific parsing needed for the common case.\n *\n * Fallback: OS-specific detection for non-bridge-initiated sleeps (lid close, OS idle).\n */\nimport { execSync } from \"node:child_process\";\nimport { readFileSync } from \"node:fs\";\nimport { platform } from \"node:os\";\nimport { readBridgeLockField } from \"./transport/bridge-lock-transport.js\";\n\n/** #1265: WSL detection \u2014 cached at module load since the platform never changes at runtime.\n * WSL kernels append \"microsoft\" or \"WSL\" to /proc/version. */\nlet _isWslCache: boolean | null = null;\nexport function isWsl(): boolean {\n if (_isWslCache !== null) return _isWslCache;\n try {\n const version = readFileSync(\"/proc/version\", \"utf-8\").toLowerCase();\n _isWslCache = version.includes(\"microsoft\") || version.includes(\"wsl\");\n } catch {\n _isWslCache = false;\n }\n return _isWslCache;\n}\n\n/** #1265: Standby gap threshold for WSL. Below 3h = host-sleep freeze (survived, no restart).\n * Above 3h = network state likely stale (DNS, TCP keepalives), restart is justified. */\nexport const WSL_STANDBY_THRESHOLD_MS = 180 * 60 * 1000;\n\nexport type ResumeKind = \"dark\" | \"full\" | \"unknown\";\n\n/** Classify the current wake state. Fast, non-throwing. */\nexport function classifyResume(): ResumeKind {\n // Primary: our own state \u2014 most reliable, no OS log parsing.\n const status = readBridgeLockField<string>(\"sleepStatus\");\n if (status === \"hw_sleep\") {\n const hour = new Date().getHours();\n const WAKE_HOUR = getEnv().wakeTime.hour;\n const BED_HOUR = getEnv().bedTime.hour;\n const inSleepWindow = (BED_HOUR < WAKE_HOUR)\n ? (hour >= BED_HOUR && hour < WAKE_HOUR)\n : (hour >= BED_HOUR || hour < WAKE_HOUR);\n return inSleepWindow ? \"dark\" : \"full\";\n }\n\n // Fallback: OS-specific for non-bridge-initiated sleeps (lid close, idle).\n const os = platform();\n if (os === \"darwin\") return classifyMacOS();\n if (os === \"linux\") return classifyLinux();\n return \"unknown\";\n}\n\nfunction classifyMacOS(): ResumeKind {\n try {\n const out = execSync(\"pmset -g log 2>/dev/null\", { timeout: 3000, encoding: \"utf-8\" });\n const lines = out.split(\"\\n\").filter(l => /\\bDarkWake\\b|\\bWake\\b/.test(l) && !l.includes(\"Notification\"));\n const last = lines.at(-1) ?? \"\";\n if (last.includes(\"DarkWake\")) return \"dark\";\n if (last.includes(\"Wake\")) return \"full\";\n } catch (err) { logAndSwallow(\"platform_detect\", \"op\", err); }\n return \"unknown\";\n}\n\nfunction classifyLinux(): ResumeKind {\n try {\n // Check if systemd logged a suspend resume within the last 5 minutes.\n // Linux has no darkwake \u2014 any suspend resume is a full wake.\n const out = execSync(\n \"journalctl -b -u systemd-suspend.service --since '5 min ago' --no-pager -q 2>/dev/null\",\n { timeout: 3000, encoding: \"utf-8\" },\n );\n if (out.trim().length > 0) return \"full\";\n } catch (err) { logAndSwallow(\"platform_detect\", \"op\", err); }\n return \"unknown\";\n}\n", "import { logInfo, logWarn, logDebug } from \"./logger.js\";\nimport { isWsl, WSL_STANDBY_THRESHOLD_MS } from \"./platform-detect.js\";\nimport { updateLastHeartbeat, updateBridgeLockField } from \"./transport/bridge-lock-transport.js\";\nimport type { HeartbeatTask } from \"../types/index.js\";\n\nexport type HeartbeatConfig = {\n enabled: boolean;\n intervalMs: number;\n bridgeLockPath: string;\n /** When true, skip all heavy tasks (e.g. sleep in progress \u2014 avoid model rate limits). */\n sleepActive?: () => boolean;\n /** Called when standby resume detected (gap > interval\u00D73). Bridge should exit (watchdog respawns). */\n onStandbyResume?: (gapMs: number) => void;\n /** Called after every successful tick \u2014 used to kick the watchdog. */\n onTick?: () => void;\n};\n\nconst TAG = \"heartbeat\";\nconst MIN_GUARD_MS = 3 * 60 * 1000; // 3 min minimum delay before first tick\n\nimport type { ITaskSlot } from \"./skeleton.js\";\n\nexport type TaskStatus = \"\u2713\" | \"\u2717\" | \"\u2014\" | \"?\";\n\nexport class HeartbeatSystem implements ITaskSlot {\n private timer: ReturnType<typeof setInterval> | null = null;\n private initTimeout: ReturnType<typeof setTimeout> | null = null;\n private tasks: HeartbeatTask[] = [];\n private running = false;\n private lastTickAt = 0;\n private tickCount = 0;\n private readonly taskStatuses = new Map<string, TaskStatus>();\n private _cronQueue: { enqueue: (entry: any, cb: any) => void } | null = null;\n private _notify: ((chatId: string, text: string) => void) | null = null;\n\n constructor(private config: HeartbeatConfig) {}\n\n /** Late-bind: attach cronQueue after construction (used by graph boot). */\n setCronQueue(queue: { enqueue: (entry: any, cb: any) => void }): void { this._cronQueue = queue; }\n get cronQueue() { return this._cronQueue; }\n\n /** Late-bind: attach notification sender after construction (used by graph boot). */\n setNotify(fn: (chatId: string, text: string) => void): void { this._notify = fn; }\n get notify() { return this._notify; }\n\n /** Register a task to run on each heartbeat tick. */\n registerTask(task: HeartbeatTask): void {\n this.tasks.push(task);\n }\n\n /** Start the heartbeat loop, aligned to wall-clock boundaries. */\n start(): void {\n if (this.running) return;\n if (!this.config.enabled) {\n logInfo(TAG, \"Heartbeat disabled by configuration\");\n return;\n }\n\n this.running = true;\n const taskNames = this.tasks.map((t) => t.name).join(\", \");\n const iv = this.config.intervalMs;\n\n // Align to next clock boundary (ceil(now / interval) * interval)\n const now = Date.now();\n let nextBoundary = Math.ceil(now / iv) * iv;\n let delay = nextBoundary - now;\n if (delay < MIN_GUARD_MS) {\n nextBoundary += iv;\n delay += iv;\n }\n\n const firstTickAt = new Date(nextBoundary).toTimeString().slice(0, 8);\n logInfo(TAG, `Starting heartbeat \u2014 interval=${iv}ms, first tick at ${firstTickAt} (${Math.round(delay / 1000)}s), tasks=[${taskNames}]`);\n\n this.lastTickAt = now; // seed for standby detection\n this.initTimeout = setTimeout(() => {\n this.lastTickAt = Date.now();\n void this.tick();\n this.timer = setInterval(() => {\n void this.tick();\n }, iv);\n }, delay);\n }\n\n /** Stop the heartbeat loop and clean up timers. */\n stop(): void {\n if (!this.running) return;\n if (this.initTimeout !== null) { clearTimeout(this.initTimeout); this.initTimeout = null; }\n if (this.timer !== null) { clearInterval(this.timer); this.timer = null; }\n this.running = false;\n logInfo(TAG, \"Heartbeat stopped\");\n }\n\n /** Whether the heartbeat loop is running. */\n get isRunning(): boolean { return this.running; }\n\n /** Configured interval in milliseconds. */\n get intervalMs(): number { return this.config.intervalMs; }\n\n /** Get registered task names. */\n getTaskNames(): string[] {\n return this.tasks.map(t => t.name);\n }\n\n /** Get last-run status for each task. */\n getTaskStatuses(): ReadonlyMap<string, TaskStatus> {\n return this.taskStatuses;\n }\n\n /** Execute all registered tasks with error isolation. */\n private async tick(): Promise<void> {\n const now = Date.now();\n const gap = now - this.lastTickAt;\n this.lastTickAt = now;\n\n // Standby detection: gap > threshold means process was suspended\n // #1265: on WSL, use 180min threshold (VM freeze from host sleep \u2260 real suspend).\n // On real Linux/Mac, 3\u00D7 interval (180s) is sufficient.\n const standbyThresholdMs = isWsl() ? WSL_STANDBY_THRESHOLD_MS : this.config.intervalMs * 3;\n if (gap > standbyThresholdMs) {\n const gapMin = Math.round(gap / 60000);\n logInfo(TAG, `Standby resume detected \u2014 suspended ${gapMin}min`);\n // Immediately update lastHeartbeat so external watchdog doesn't kill us\n updateLastHeartbeat();\n if (this.config.onStandbyResume) {\n this.config.onStandbyResume(gap);\n return; // skip all tasks this tick\n }\n }\n\n logDebug(TAG, `Tick \u2014 executing ${this.tasks.length} task(s)`);\n let heavyRan = false;\n const sleepBlocking = this.config.sleepActive?.() ?? false;\n\n for (const task of this.tasks) {\n try {\n if (task.heavy && (heavyRan || sleepBlocking)) {\n logDebug(TAG, `Skipping heavy task \"${task.name}\" \u2014 ${sleepBlocking ? \"sleep in progress\" : \"another heavy task already ran\"}`);\n this.taskStatuses.set(task.name, \"\u2014\");\n continue;\n }\n const result = await task.execute();\n if (task.heavy && result === true) heavyRan = true;\n this.taskStatuses.set(task.name, \"\u2713\");\n } catch (err) {\n const msg = err instanceof Error ? err.message : JSON.stringify(err);\n logWarn(TAG, `Task \"${task.name}\" failed: ${msg}`);\n this.taskStatuses.set(task.name, \"\u2717\");\n }\n }\n\n // Update bridge.lock with lastHeartbeat\n updateLastHeartbeat();\n\n // Heap stats \u2014 once per hour (every 60 ticks)\n this.tickCount++;\n if (this.tickCount % 60 === 0) {\n const heap = Math.round(process.memoryUsage().heapUsed / 1048576);\n updateBridgeLockField(\"heapUsedMB\", heap);\n if (heap > 820) {\n logWarn(TAG, `Heap high: ${heap}MB / 1024MB (80%+)`);\n } else {\n logDebug(TAG, `Heap: ${heap}MB / 1024MB`);\n }\n }\n\n // Kick the watchdog\n this.config.onTick?.();\n }\n}\n\n// #1181: Module-level singleton for local access (avoids circular dep via abmind)\nlet _instance: HeartbeatSystem | null = null;\nexport function setHeartbeatInstance(hb: HeartbeatSystem): void { _instance = hb; }\nexport function getHeartbeatInstance(): HeartbeatSystem | null { return _instance; }\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,SAAS,gBAAgB;AACzB,SAAS,oBAAoB;AAC7B,SAAS,gBAAgB;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AoB;AAAA,UACrD,OAAO;AACL,qBAAS,KAAK,SAAS,IAAI,aAAa;AAAA,UAC1C;AAAA,QACF;AAGA,aAAK,OAAO,SAAS;AAAA,MACvB;AAAA,IACF;AAGA,IAAI,YAAoC;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
init_log_and_swallow,
|
|
5
5
|
logAndSwallow
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-2IYJ4I66.js";
|
|
7
7
|
|
|
8
8
|
// src/boot/ctx-start.ts
|
|
9
9
|
init_log_and_swallow();
|
|
@@ -48,4 +48,4 @@ export {
|
|
|
48
48
|
updateCtxStart,
|
|
49
49
|
resetAllCtxStarts
|
|
50
50
|
};
|
|
51
|
-
//# sourceMappingURL=chunk-
|
|
51
|
+
//# sourceMappingURL=chunk-TWB2ZGVH.js.map
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
init_logger,
|
|
5
5
|
logDebug,
|
|
6
6
|
logWarn
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XRTXYN66.js";
|
|
8
8
|
|
|
9
9
|
// src/components/sha-tracker.ts
|
|
10
10
|
init_logger();
|
|
@@ -170,4 +170,4 @@ export {
|
|
|
170
170
|
isPolicyCorrupt,
|
|
171
171
|
reload
|
|
172
172
|
};
|
|
173
|
-
//# sourceMappingURL=chunk-
|
|
173
|
+
//# sourceMappingURL=chunk-U4U47YE7.js.map
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import { createRequire as __bundleCreateRequire } from 'node:module'; import { fileURLToPath as __bundleFileURLToPath } from 'node:url'; import { dirname as __bundleDirname } from 'node:path'; const require = __bundleCreateRequire(import.meta.url); const __chunk_filename = __bundleFileURLToPath(import.meta.url); const __chunk_dirname = __bundleDirname(__chunk_filename);
|
|
3
3
|
import {
|
|
4
4
|
init_log_and_swallow
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-2IYJ4I66.js";
|
|
6
6
|
import {
|
|
7
7
|
init_logger
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-XRTXYN66.js";
|
|
9
9
|
|
|
10
10
|
// src/components/command-registry.ts
|
|
11
11
|
var BOT_COMMANDS = [
|
|
@@ -279,4 +279,4 @@ export {
|
|
|
279
279
|
emojiToScore,
|
|
280
280
|
emojiToTag
|
|
281
281
|
};
|
|
282
|
-
//# sourceMappingURL=chunk-
|
|
282
|
+
//# sourceMappingURL=chunk-W546CU3A.js.map
|
|
@@ -0,0 +1,211 @@
|
|
|
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
|
+
__esm,
|
|
5
|
+
__export,
|
|
6
|
+
__require
|
|
7
|
+
} from "./chunk-7K2YZTLD.js";
|
|
8
|
+
|
|
9
|
+
// src/components/peer-transport/peer-auth.ts
|
|
10
|
+
var peer_auth_exports = {};
|
|
11
|
+
__export(peer_auth_exports, {
|
|
12
|
+
generateTlsCert: () => generateTlsCert,
|
|
13
|
+
isNonceSeen: () => isNonceSeen,
|
|
14
|
+
macTribe: () => macTribe,
|
|
15
|
+
recordNonce: () => recordNonce,
|
|
16
|
+
signAck: () => signAck,
|
|
17
|
+
signEnroll: () => signEnroll,
|
|
18
|
+
signRequest: () => signRequest,
|
|
19
|
+
verifyAck: () => verifyAck,
|
|
20
|
+
verifyEnroll: () => verifyEnroll,
|
|
21
|
+
verifyRequest: () => verifyRequest,
|
|
22
|
+
verifyServerCert: () => verifyServerCert
|
|
23
|
+
});
|
|
24
|
+
import {
|
|
25
|
+
createPrivateKey,
|
|
26
|
+
createPublicKey,
|
|
27
|
+
sign as cryptoSign,
|
|
28
|
+
verify as cryptoVerify,
|
|
29
|
+
createHmac,
|
|
30
|
+
createHash,
|
|
31
|
+
randomBytes,
|
|
32
|
+
timingSafeEqual
|
|
33
|
+
} from "node:crypto";
|
|
34
|
+
import { execSync } from "node:child_process";
|
|
35
|
+
import { writeFileSync, readFileSync, unlinkSync, mkdirSync } from "node:fs";
|
|
36
|
+
import { tmpdir } from "node:os";
|
|
37
|
+
import { join } from "node:path";
|
|
38
|
+
function pruneNonces() {
|
|
39
|
+
const cutoff = Date.now() - NONCE_TTL_MS;
|
|
40
|
+
for (const [nonce, ts] of nonceCache) {
|
|
41
|
+
if (ts < cutoff) nonceCache.delete(nonce);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function isNonceSeen(nonce) {
|
|
45
|
+
pruneNonces();
|
|
46
|
+
return nonceCache.has(nonce);
|
|
47
|
+
}
|
|
48
|
+
function recordNonce(nonce) {
|
|
49
|
+
nonceCache.set(nonce, Date.now());
|
|
50
|
+
}
|
|
51
|
+
function importPrivKey(signingKey) {
|
|
52
|
+
return createPrivateKey({ key: Buffer.from(signingKey, "base64"), format: "der", type: "pkcs8" });
|
|
53
|
+
}
|
|
54
|
+
function importPubKey(verifyKey) {
|
|
55
|
+
return createPublicKey({ key: Buffer.from(verifyKey, "base64"), format: "der", type: "spki" });
|
|
56
|
+
}
|
|
57
|
+
function edSign(signingKey, message) {
|
|
58
|
+
return cryptoSign(null, Buffer.from(message, "utf-8"), importPrivKey(signingKey)).toString("base64");
|
|
59
|
+
}
|
|
60
|
+
function edVerify(verifyKey, message, sigBase64) {
|
|
61
|
+
try {
|
|
62
|
+
return cryptoVerify(null, Buffer.from(message, "utf-8"), importPubKey(verifyKey), Buffer.from(sigBase64, "base64"));
|
|
63
|
+
} catch {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function signRequest(method, path, body, signingKey, selfName) {
|
|
68
|
+
const ts = String(Math.floor(Date.now() / 1e3));
|
|
69
|
+
const nonce = randomBytes(16).toString("hex");
|
|
70
|
+
const bodyHash = createHash("sha256").update(body, "utf-8").digest("hex");
|
|
71
|
+
const canonical = `abtars-req-v1
|
|
72
|
+
${method}
|
|
73
|
+
${path}
|
|
74
|
+
${ts}
|
|
75
|
+
${nonce}
|
|
76
|
+
${bodyHash}`;
|
|
77
|
+
const sig = edSign(signingKey, canonical);
|
|
78
|
+
return {
|
|
79
|
+
"X-Peer-Id": selfName,
|
|
80
|
+
"X-Peer-Ts": ts,
|
|
81
|
+
"X-Peer-Nonce": nonce,
|
|
82
|
+
"X-Peer-Sig": sig
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function verifyRequest(headers, method, path, body, verifyKey) {
|
|
86
|
+
const h = {};
|
|
87
|
+
for (const [k, v] of Object.entries(headers)) h[k.toLowerCase()] = v;
|
|
88
|
+
const peerId = h["x-peer-id"];
|
|
89
|
+
const tsHeader = h["x-peer-ts"];
|
|
90
|
+
const nonce = h["x-peer-nonce"];
|
|
91
|
+
const sig = h["x-peer-sig"];
|
|
92
|
+
if (typeof peerId !== "string" || typeof tsHeader !== "string" || typeof nonce !== "string" || typeof sig !== "string") {
|
|
93
|
+
return { ok: false, reason: "missing_headers" };
|
|
94
|
+
}
|
|
95
|
+
const ts = parseInt(tsHeader, 10);
|
|
96
|
+
if (isNaN(ts)) return { ok: false, reason: "invalid_ts" };
|
|
97
|
+
const nowSec = Math.floor(Date.now() / 1e3);
|
|
98
|
+
if (Math.abs(nowSec - ts) > 30) return { ok: false, reason: "stale_ts" };
|
|
99
|
+
if (isNonceSeen(nonce)) return { ok: false, reason: "nonce_replay" };
|
|
100
|
+
const bodyHash = createHash("sha256").update(body, "utf-8").digest("hex");
|
|
101
|
+
const canonical = `abtars-req-v1
|
|
102
|
+
${method}
|
|
103
|
+
${path}
|
|
104
|
+
${tsHeader}
|
|
105
|
+
${nonce}
|
|
106
|
+
${bodyHash}`;
|
|
107
|
+
if (!edVerify(verifyKey, canonical, sig)) return { ok: false, reason: "bad_sig" };
|
|
108
|
+
recordNonce(nonce);
|
|
109
|
+
return { ok: true };
|
|
110
|
+
}
|
|
111
|
+
function macTribe(tribeToken, ...parts) {
|
|
112
|
+
return createHmac("sha256", Buffer.from(tribeToken, "base64")).update(parts.join("")).digest("hex");
|
|
113
|
+
}
|
|
114
|
+
function signEnroll(signingKey, pubKeyI, nonceR, name) {
|
|
115
|
+
const canonical = `abtars-enroll-v1
|
|
116
|
+
${pubKeyI}
|
|
117
|
+
${nonceR}
|
|
118
|
+
${name}`;
|
|
119
|
+
return edSign(signingKey, canonical);
|
|
120
|
+
}
|
|
121
|
+
function verifyEnroll(selfSig, verifyKey, pubKeyI, nonceR, name) {
|
|
122
|
+
const canonical = `abtars-enroll-v1
|
|
123
|
+
${pubKeyI}
|
|
124
|
+
${nonceR}
|
|
125
|
+
${name}`;
|
|
126
|
+
return edVerify(verifyKey, canonical, selfSig);
|
|
127
|
+
}
|
|
128
|
+
function signAck(signingKey, nameR, pubKeyR, nonceR) {
|
|
129
|
+
const canonical = `abtars-enroll-v1
|
|
130
|
+
ack
|
|
131
|
+
${nameR}
|
|
132
|
+
${pubKeyR}
|
|
133
|
+
${nonceR}`;
|
|
134
|
+
return edSign(signingKey, canonical);
|
|
135
|
+
}
|
|
136
|
+
function verifyAck(ackSig, verifyKey, nameR, pubKeyR, nonceR) {
|
|
137
|
+
const canonical = `abtars-enroll-v1
|
|
138
|
+
ack
|
|
139
|
+
${nameR}
|
|
140
|
+
${pubKeyR}
|
|
141
|
+
${nonceR}`;
|
|
142
|
+
return edVerify(verifyKey, canonical, ackSig);
|
|
143
|
+
}
|
|
144
|
+
function generateTlsCert(signingKey, cn) {
|
|
145
|
+
const tmpDir = join(tmpdir(), `abtars-tls-${randomBytes(8).toString("hex")}`);
|
|
146
|
+
mkdirSync(tmpDir, { recursive: true });
|
|
147
|
+
const keyPemPath = join(tmpDir, "key.pem");
|
|
148
|
+
const certPath = join(tmpDir, "cert.pem");
|
|
149
|
+
try {
|
|
150
|
+
const privKeyObj = importPrivKey(signingKey);
|
|
151
|
+
const keyPem = privKeyObj.export({ type: "pkcs8", format: "pem" });
|
|
152
|
+
writeFileSync(keyPemPath, keyPem, { mode: 384 });
|
|
153
|
+
const safeCn = cn.replace(/[^A-Za-z0-9_\-.]/g, "_").slice(0, 64);
|
|
154
|
+
execSync(
|
|
155
|
+
`openssl req -x509 -key "${keyPemPath}" -out "${certPath}" -days 3650 -nodes -subj "/CN=${safeCn}"`,
|
|
156
|
+
{ stdio: "pipe" }
|
|
157
|
+
);
|
|
158
|
+
const key = readFileSync(keyPemPath, "utf-8");
|
|
159
|
+
const cert = readFileSync(certPath, "utf-8");
|
|
160
|
+
return { key, cert };
|
|
161
|
+
} finally {
|
|
162
|
+
try {
|
|
163
|
+
unlinkSync(keyPemPath);
|
|
164
|
+
} catch {
|
|
165
|
+
}
|
|
166
|
+
try {
|
|
167
|
+
unlinkSync(certPath);
|
|
168
|
+
} catch {
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
__require("node:fs").rmdirSync(tmpDir);
|
|
172
|
+
} catch {
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function verifyServerCert(cert, verifyKey) {
|
|
177
|
+
try {
|
|
178
|
+
const keyObj = createPublicKey({ key: cert, format: "pem" });
|
|
179
|
+
const certSpki = keyObj.export({ type: "spki", format: "der" }).toString("base64");
|
|
180
|
+
const expected = Buffer.from(verifyKey, "base64");
|
|
181
|
+
const actual = Buffer.from(certSpki, "base64");
|
|
182
|
+
if (expected.length !== actual.length) return false;
|
|
183
|
+
return timingSafeEqual(expected, actual);
|
|
184
|
+
} catch {
|
|
185
|
+
return false;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
var nonceCache, NONCE_TTL_MS;
|
|
189
|
+
var init_peer_auth = __esm({
|
|
190
|
+
"src/components/peer-transport/peer-auth.ts"() {
|
|
191
|
+
nonceCache = /* @__PURE__ */ new Map();
|
|
192
|
+
NONCE_TTL_MS = 6e4;
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
|
|
196
|
+
export {
|
|
197
|
+
isNonceSeen,
|
|
198
|
+
recordNonce,
|
|
199
|
+
signRequest,
|
|
200
|
+
verifyRequest,
|
|
201
|
+
macTribe,
|
|
202
|
+
signEnroll,
|
|
203
|
+
verifyEnroll,
|
|
204
|
+
signAck,
|
|
205
|
+
verifyAck,
|
|
206
|
+
generateTlsCert,
|
|
207
|
+
verifyServerCert,
|
|
208
|
+
peer_auth_exports,
|
|
209
|
+
init_peer_auth
|
|
210
|
+
};
|
|
211
|
+
//# sourceMappingURL=chunk-WC5O5KOE.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/components/peer-transport/peer-auth.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * peer-auth.ts \u2014 Ed25519 request signing, gossip, enrollment, and TLS helpers (#1293).\n *\n * Auth model (Option A): one Ed25519 keypair per host.\n * - Request signing: whole-request Ed25519 signature on every inbound/outbound peer route.\n * - TLS: self-signed cert whose key IS the identity key (confidentiality + server identity).\n * - Gossip: Ed25519-signed UDP packets.\n * - Enrollment: HMAC-SHA256 challenge-response using shared tribeToken.\n */\n\nimport {\n createPrivateKey,\n createPublicKey,\n sign as cryptoSign,\n verify as cryptoVerify,\n createHmac,\n createHash,\n randomBytes,\n timingSafeEqual,\n} from \"node:crypto\";\nimport { execSync } from \"node:child_process\";\nimport { writeFileSync, readFileSync, unlinkSync, mkdirSync } from \"node:fs\";\nimport { tmpdir } from \"node:os\";\nimport { join } from \"node:path\";\n\n// \u2500\u2500 Nonce cache (replay prevention) \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst nonceCache = new Map<string, number>(); // nonce \u2192 timestamp (ms)\nconst NONCE_TTL_MS = 60_000; // 60s \u2014 must be >= 30s ts window\n\nfunction pruneNonces(): void {\n const cutoff = Date.now() - NONCE_TTL_MS;\n for (const [nonce, ts] of nonceCache) {\n if (ts < cutoff) nonceCache.delete(nonce);\n }\n}\n\nexport function isNonceSeen(nonce: string): boolean {\n pruneNonces();\n return nonceCache.has(nonce);\n}\n\nexport function recordNonce(nonce: string): void {\n nonceCache.set(nonce, Date.now());\n}\n\n// \u2500\u2500 Key helpers \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/** Import a base64 PKCS8 DER private key into a KeyObject. */\nfunction importPrivKey(signingKey: string): ReturnType<typeof createPrivateKey> {\n return createPrivateKey({ key: Buffer.from(signingKey, \"base64\"), format: \"der\", type: \"pkcs8\" });\n}\n\n/** Import a base64 SPKI DER public key into a KeyObject. */\nfunction importPubKey(verifyKey: string): ReturnType<typeof createPublicKey> {\n return createPublicKey({ key: Buffer.from(verifyKey, \"base64\"), format: \"der\", type: \"spki\" });\n}\n\n/** Ed25519 sign: returns base64-encoded signature. */\nfunction edSign(signingKey: string, message: string): string {\n // Ed25519 uses null algorithm (prehash-free)\n return cryptoSign(null, Buffer.from(message, \"utf-8\"), importPrivKey(signingKey)).toString(\"base64\");\n}\n\n/** Ed25519 verify: returns true if signature is valid. */\nfunction edVerify(verifyKey: string, message: string, sigBase64: string): boolean {\n try {\n return cryptoVerify(null, Buffer.from(message, \"utf-8\"), importPubKey(verifyKey), Buffer.from(sigBase64, \"base64\"));\n } catch {\n return false;\n }\n}\n\n// \u2500\u2500 Request signing \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nconst TS_WINDOW_MS = 30_000; // reject requests older than 30s\n\n/**\n * Sign an outbound request. Returns headers to attach.\n *\n * Canonical string:\n * \"abtars-req-v1\\n\" + method + \"\\n\" + path + \"\\n\" + ts + \"\\n\" + nonce + \"\\n\" + hex(sha256(body))\n */\nexport function signRequest(\n method: string,\n path: string,\n body: string,\n signingKey: string,\n selfName: string,\n): Record<string, string> {\n const ts = String(Math.floor(Date.now() / 1000));\n const nonce = randomBytes(16).toString(\"hex\");\n const bodyHash = createHash(\"sha256\").update(body, \"utf-8\").digest(\"hex\");\n const canonical = `abtars-req-v1\\n${method}\\n${path}\\n${ts}\\n${nonce}\\n${bodyHash}`;\n const sig = edSign(signingKey, canonical);\n return {\n \"X-Peer-Id\": selfName,\n \"X-Peer-Ts\": ts,\n \"X-Peer-Nonce\": nonce,\n \"X-Peer-Sig\": sig,\n };\n}\n\nexport interface VerifyRequestResult {\n ok: boolean;\n reason?: string;\n}\n\n/**\n * Verify an inbound request's Ed25519 signature.\n */\nexport function verifyRequest(\n headers: Record<string, string | string[] | undefined>,\n method: string,\n path: string,\n body: string,\n verifyKey: string,\n): VerifyRequestResult {\n // Normalize to lowercase for compatibility with Node.js HTTP (which lowercases headers)\n const h: Record<string, string | string[] | undefined> = {};\n for (const [k, v] of Object.entries(headers)) h[k.toLowerCase()] = v;\n\n const peerId = h[\"x-peer-id\"];\n const tsHeader = h[\"x-peer-ts\"];\n const nonce = h[\"x-peer-nonce\"];\n const sig = h[\"x-peer-sig\"];\n\n if (\n typeof peerId !== \"string\" ||\n typeof tsHeader !== \"string\" ||\n typeof nonce !== \"string\" ||\n typeof sig !== \"string\"\n ) {\n return { ok: false, reason: \"missing_headers\" };\n }\n\n const ts = parseInt(tsHeader, 10);\n if (isNaN(ts)) return { ok: false, reason: \"invalid_ts\" };\n\n const nowSec = Math.floor(Date.now() / 1000);\n if (Math.abs(nowSec - ts) > 30) return { ok: false, reason: \"stale_ts\" };\n\n if (isNonceSeen(nonce)) return { ok: false, reason: \"nonce_replay\" };\n\n const bodyHash = createHash(\"sha256\").update(body, \"utf-8\").digest(\"hex\");\n const canonical = `abtars-req-v1\\n${method}\\n${path}\\n${tsHeader}\\n${nonce}\\n${bodyHash}`;\n\n if (!edVerify(verifyKey, canonical, sig)) return { ok: false, reason: \"bad_sig\" };\n\n recordNonce(nonce);\n return { ok: true };\n}\n\n// \u2500\u2500 Tribe HMAC \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * HMAC-SHA256 for tribe enrollment authentication.\n * Returns lowercase hex digest.\n */\nexport function macTribe(tribeToken: string, ...parts: string[]): string {\n return createHmac(\"sha256\", Buffer.from(tribeToken, \"base64\"))\n .update(parts.join(\"\"))\n .digest(\"hex\");\n}\n\n// \u2500\u2500 Enrollment signatures \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\n/**\n * Sign enrollment message (initiator).\n * canonical: \"abtars-enroll-v1\\n\" + pubKey_i + \"\\n\" + nonce_r + \"\\n\" + name\n */\nexport function signEnroll(signingKey: string, pubKeyI: string, nonceR: string, name: string): string {\n const canonical = `abtars-enroll-v1\\n${pubKeyI}\\n${nonceR}\\n${name}`;\n return edSign(signingKey, canonical);\n}\n\n/** Verify enrollment signature (responder verifies initiator). */\nexport function verifyEnroll(selfSig: string, verifyKey: string, pubKeyI: string, nonceR: string, name: string): boolean {\n const canonical = `abtars-enroll-v1\\n${pubKeyI}\\n${nonceR}\\n${name}`;\n return edVerify(verifyKey, canonical, selfSig);\n}\n\n/**\n * Sign acknowledgment (responder).\n * canonical: \"abtars-enroll-v1\\n\" + \"ack\\n\" + name_r + \"\\n\" + pubKey_r + \"\\n\" + nonce_r\n */\nexport function signAck(signingKey: string, nameR: string, pubKeyR: string, nonceR: string): string {\n const canonical = `abtars-enroll-v1\\nack\\n${nameR}\\n${pubKeyR}\\n${nonceR}`;\n return edSign(signingKey, canonical);\n}\n\n/** Verify acknowledgment signature (initiator verifies responder). */\nexport function verifyAck(ackSig: string, verifyKey: string, nameR: string, pubKeyR: string, nonceR: string): boolean {\n const canonical = `abtars-enroll-v1\\nack\\n${nameR}\\n${pubKeyR}\\n${nonceR}`;\n return edVerify(verifyKey, canonical, ackSig);\n}\n\n// \u2500\u2500 TLS cert generation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface TlsCertResult {\n key: string; // PEM \u2014 PKCS8 private key\n cert: string; // PEM \u2014 self-signed X.509 cert\n}\n\n/**\n * Generate a self-signed Ed25519 TLS cert from the identity signing key.\n * The private key used in the cert IS the identity key \u2014 same keypair.\n */\nexport function generateTlsCert(signingKey: string, cn: string): TlsCertResult {\n const tmpDir = join(tmpdir(), `abtars-tls-${randomBytes(8).toString(\"hex\")}`);\n mkdirSync(tmpDir, { recursive: true });\n\n const keyPemPath = join(tmpDir, \"key.pem\");\n const certPath = join(tmpDir, \"cert.pem\");\n\n try {\n // Export private key as PKCS8 PEM\n const privKeyObj = importPrivKey(signingKey);\n const keyPem = privKeyObj.export({ type: \"pkcs8\", format: \"pem\" }) as string;\n writeFileSync(keyPemPath, keyPem, { mode: 0o600 });\n\n // Generate self-signed cert using the identity key\n const safeCn = cn.replace(/[^A-Za-z0-9_\\-.]/g, \"_\").slice(0, 64);\n execSync(\n `openssl req -x509 -key \"${keyPemPath}\" -out \"${certPath}\" -days 3650 -nodes -subj \"/CN=${safeCn}\"`,\n { stdio: \"pipe\" },\n );\n\n const key = readFileSync(keyPemPath, \"utf-8\");\n const cert = readFileSync(certPath, \"utf-8\");\n return { key, cert };\n } finally {\n try { unlinkSync(keyPemPath); } catch { /* best effort */ }\n try { unlinkSync(certPath); } catch { /* best effort */ }\n try { require(\"node:fs\").rmdirSync(tmpDir); } catch { /* best effort */ }\n }\n}\n\n/**\n * Verify that the presented TLS cert's SPKI public key matches the enrolled verifyKey.\n * cert: PEM string. verifyKey: base64 SPKI DER.\n */\nexport function verifyServerCert(cert: string, verifyKey: string): boolean {\n try {\n const keyObj = createPublicKey({ key: cert, format: \"pem\" });\n const certSpki = (keyObj.export({ type: \"spki\", format: \"der\" }) as Buffer).toString(\"base64\");\n // Timing-safe comparison\n const expected = Buffer.from(verifyKey, \"base64\");\n const actual = Buffer.from(certSpki, \"base64\");\n if (expected.length !== actual.length) return false;\n return timingSafeEqual(expected, actual);\n } catch {\n return false;\n }\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,gBAAgB;AACzB,SAAS,eAAe,cAAc,YAAY,iBAAiB;AACnE,SAAS,cAAc;AACvB,SAAS,YAAY;AAOrB,SAAS,cAAoB;AAC3B,QAAM,SAAS,KAAK,IAAI,IAAI;AAC5B,aAAW,CAAC,OAAO,EAAE,KAAK,YAAY;AACpC,QAAI,KAAK,OAAQ,YAAW,OAAO,KAAK;AAAA,EAC1C;AACF;AAEO,SAAS,YAAY,OAAwB;AAClD,cAAY;AACZ,SAAO,WAAW,IAAI,KAAK;AAC7B;AAEO,SAAS,YAAY,OAAqB;AAC/C,aAAW,IAAI,OAAO,KAAK,IAAI,CAAC;AAClC;AAKA,SAAS,cAAc,YAAyD;AAC9E,SAAO,iBAAiB,EAAE,KAAK,OAAO,KAAK,YAAY,QAAQ,GAAG,QAAQ,OAAO,MAAM,QAAQ,CAAC;AAClG;AAGA,SAAS,aAAa,WAAuD;AAC3E,SAAO,gBAAgB,EAAE,KAAK,OAAO,KAAK,WAAW,QAAQ,GAAG,QAAQ,OAAO,MAAM,OAAO,CAAC;AAC/F;AAGA,SAAS,OAAO,YAAoB,SAAyB;AAE3D,SAAO,WAAW,MAAM,OAAO,KAAK,SAAS,OAAO,GAAG,cAAc,UAAU,CAAC,EAAE,SAAS,QAAQ;AACrG;AAGA,SAAS,SAAS,WAAmB,SAAiB,WAA4B;AAChF,MAAI;AACF,WAAO,aAAa,MAAM,OAAO,KAAK,SAAS,OAAO,GAAG,aAAa,SAAS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,QAAO;AAC9C,WAAO,gBAAgB,UAAU,MAAM;AAAA,EACzC,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AA9PA,IA2BM,YACA;AA5BN;AAAA;AA2BA,IAAM,aAAa,oBAAI,IAAoB;AAC3C,IAAM,eAAe;AAAA;AAAA;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import {
|
|
4
4
|
SkillWatcher,
|
|
5
5
|
init_skill_watcher
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-J4RUFAPK.js";
|
|
7
7
|
import {
|
|
8
8
|
abtarsHome,
|
|
9
9
|
init_paths
|
|
@@ -56,4 +56,4 @@ export {
|
|
|
56
56
|
hotskills_exports,
|
|
57
57
|
init_hotskills
|
|
58
58
|
};
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-XPWYDNWL.js.map
|
|
@@ -81,13 +81,13 @@ function formatLine(level, tag, msg) {
|
|
|
81
81
|
function logInfo(tag, msg) {
|
|
82
82
|
if (!shouldLog("low")) return;
|
|
83
83
|
const line = formatLine("info", tag, msg);
|
|
84
|
-
console.log(`[${tag}] ${msg}`);
|
|
84
|
+
if (process.stdout.isTTY) console.log(`[${tag}] ${msg}`);
|
|
85
85
|
writeToFile(line);
|
|
86
86
|
}
|
|
87
87
|
function logWarn(tag, msg) {
|
|
88
88
|
if (!shouldLog("low")) return;
|
|
89
89
|
const line = formatLine("warn", tag, msg);
|
|
90
|
-
console.warn(`[${tag}] ${msg}`);
|
|
90
|
+
if (process.stdout.isTTY) console.warn(`[${tag}] ${msg}`);
|
|
91
91
|
writeToFile(line);
|
|
92
92
|
}
|
|
93
93
|
function logError(tag, msg, err) {
|
|
@@ -95,20 +95,23 @@ function logError(tag, msg, err) {
|
|
|
95
95
|
const errStr = err instanceof Error ? err.message : typeof err === "object" && err !== null ? JSON.stringify(err) : String(err ?? "");
|
|
96
96
|
const fullMsg = errStr ? `${msg} \u2014 ${errStr}` : msg;
|
|
97
97
|
const line = formatLine("error", tag, fullMsg);
|
|
98
|
-
if (err)
|
|
99
|
-
|
|
98
|
+
if (err) {
|
|
99
|
+
if (process.stdout.isTTY) console.error(`[${tag}] ${msg}`, err);
|
|
100
|
+
} else {
|
|
101
|
+
if (process.stdout.isTTY) console.error(`[${tag}] ${msg}`);
|
|
102
|
+
}
|
|
100
103
|
writeToFile(line);
|
|
101
104
|
}
|
|
102
105
|
function logDebug(tag, msg) {
|
|
103
106
|
if (!shouldLog("debug")) return;
|
|
104
107
|
const line = formatLine("debug", tag, msg);
|
|
105
|
-
console.log(`[${tag}] ${msg}`);
|
|
108
|
+
if (process.stdout.isTTY) console.log(`[${tag}] ${msg}`);
|
|
106
109
|
writeToFile(line);
|
|
107
110
|
}
|
|
108
111
|
function logTrace(tag, msg) {
|
|
109
112
|
if (!shouldLog("trace")) return;
|
|
110
113
|
const line = formatLine("trace", tag, msg);
|
|
111
|
-
console.log(`[${tag}] ${msg}`);
|
|
114
|
+
if (process.stdout.isTTY) console.log(`[${tag}] ${msg}`);
|
|
112
115
|
writeToFile(line);
|
|
113
116
|
}
|
|
114
117
|
var LEVEL_ORDER, LOG_DIR, currentLevel, isTest, fileLogging, buffer, flushTimer, SECRET_PATTERNS, logFormat;
|
|
@@ -162,4 +165,4 @@ export {
|
|
|
162
165
|
logTrace,
|
|
163
166
|
init_logger
|
|
164
167
|
};
|
|
165
|
-
//# sourceMappingURL=chunk-
|
|
168
|
+
//# sourceMappingURL=chunk-XRTXYN66.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/components/logger.ts"],
|
|
4
|
-
"sourcesContent": ["import { appendFileSync, mkdirSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { abtarsHome } from \"../paths.js\";\n\n/** Log levels: OFF = silent, LOW = operational info, DEBUG = verbose trace, TRACE = debug + anomaly diagnostics */\nexport type LogLevel = \"off\" | \"low\" | \"debug\" | \"trace\";\n\nconst LEVEL_ORDER: Record<LogLevel, number> = { off: 0, low: 1, debug: 2, trace: 3 };\nconst LOG_DIR = join(abtarsHome(), \"logs\");\n\n/** Get today's log filename: bridge-YYYY-MM-DD.log */\nexport function getLogFile(): string {\n const d = new Date();\n const date = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, \"0\")}-${String(d.getDate()).padStart(2, \"0\")}`;\n return join(LOG_DIR, `bridge-${date}.log`);\n}\n\nlet currentLevel: LogLevel = \"low\";\nconst isTest = process.env.NODE_ENV === \"test\" || process.env.VITEST === \"true\";\nlet fileLogging = !isTest;\n\nexport function setLogLevel(level: LogLevel): void {\n currentLevel = level;\n}\n\n/** @internal \u2014 test-only override for file logging. */\nexport function setFileLogging(enabled: boolean): void {\n fileLogging = enabled;\n}\n\nfunction shouldLog(minLevel: LogLevel): boolean {\n return LEVEL_ORDER[currentLevel] >= LEVEL_ORDER[minLevel];\n}\n\nexport function isLogLevel(minLevel: LogLevel): boolean {\n return LEVEL_ORDER[currentLevel] >= LEVEL_ORDER[minLevel];\n}\n\n// \u2500\u2500 Buffered file writer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nlet buffer: string[] = [];\nlet flushTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction writeToFile(line: string): void {\n if (!fileLogging) return;\n buffer.push(redactSecrets(line));\n if (buffer.length >= 200) flush();\n else if (!flushTimer) {\n flushTimer = setTimeout(flush, 30000);\n flushTimer.unref();\n }\n}\n\nfunction flush(): void {\n if (flushTimer) { clearTimeout(flushTimer); flushTimer = null; }\n if (buffer.length === 0) return;\n const lines = buffer;\n buffer = [];\n try {\n mkdirSync(LOG_DIR, { recursive: true });\n appendFileSync(getLogFile(), lines.join(\"\\n\") + \"\\n\");\n } catch { /* silently ignore file write errors */ }\n}\n\n/** Flush buffered logs synchronously. Called on process exit. */\nexport function flushLogs(): void { flush(); }\n\nprocess.on(\"exit\", flush);\n\n// \u2500\u2500 Credential redaction \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n//\n// INTENTIONALLY DUPLICATED across abtars and abmind \u2014 they are\n// independent products that both need this utility. If you add or\n// modify a pattern here, also update the sibling file:\n// abtars/src/components/logger.ts (SECRET_PATTERNS + redactSecrets)\n// abmind/src/redact-secrets.ts (SECRET_PATTERNS + redactSecrets)\n//\n// Do NOT create an import relationship between them. Each product stays\n// independent so the bridge can run against a different memory backend\n// and abmind can ship as a standalone npm package without pulling\n// abtars in for a utility function.\n\nconst SECRET_PATTERNS: ReadonlyArray<[RegExp, string]> = [\n [/sk-[A-Za-z0-9_-]{20,}/g, \"sk-***REDACTED***\"],\n [/sk-or-[A-Za-z0-9_-]{20,}/g, \"sk-or-***REDACTED***\"],\n [/gsk_[A-Za-z0-9]{20,}/g, \"gsk_***REDACTED***\"],\n [/ghp_[A-Za-z0-9]{36,}/g, \"ghp_***REDACTED***\"],\n [/github_pat_[A-Za-z0-9_]{20,}/g, \"github_pat_***REDACTED***\"],\n [/xox[baprs]-[A-Za-z0-9-]{10,}/g, \"xox_-***REDACTED***\"],\n [/AIza[A-Za-z0-9_-]{30,}/g, \"AIza***REDACTED***\"],\n [/AKIA[A-Z0-9]{16}/g, \"AKIA***REDACTED***\"],\n [/\\d{8,12}:[A-Za-z0-9_-]{35,}/g, \"***BOT_TOKEN***\"],\n [/Bearer [A-Za-z0-9._-]{20,}/g, \"Bearer ***REDACTED***\"],\n [/eyJ[A-Za-z0-9_-]{20,}\\.eyJ[A-Za-z0-9_-]{20,}\\.[A-Za-z0-9_-]{20,}/g, \"***JWT_REDACTED***\"],\n [/hf_[A-Za-z0-9]{20,}/g, \"hf_***REDACTED***\"],\n [/npm_[A-Za-z0-9]{20,}/g, \"npm_***REDACTED***\"],\n [/sk_live_[A-Za-z0-9]{20,}/g, \"sk_live_***REDACTED***\"],\n [/sk_test_[A-Za-z0-9]{20,}/g, \"sk_test_***REDACTED***\"],\n [/SG\\.[A-Za-z0-9_-]{20,}/g, \"SG.***REDACTED***\"],\n [/(\"(?:api[_-]?key|token|secret|password|authorization|credential)\"\\s*:\\s*\")[^\"]{8,}\"/gi, '$1***REDACTED***\"'],\n [/([A-Z_]*(?:KEY|TOKEN|SECRET|PASSWORD)=)[^\\s]{8,}/g, \"$1***REDACTED***\"],\n];\n\n/** Strip known secret patterns from a log line. */\nexport function redactSecrets(text: string): string {\n let result = text;\n for (const [pattern, replacement] of SECRET_PATTERNS) {\n result = result.replace(pattern, replacement);\n }\n return result;\n}\n\n\nfunction ts(): string {\n const d = new Date();\n const pad2 = (n: number): string => String(n).padStart(2, \"0\");\n const local = `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}T${pad2(d.getHours())}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}.${String(d.getMilliseconds()).padStart(3, \"0\")}`;\n return isTest ? `${local} TEST` : local;\n}\n\n/** Local ISO-ish timestamp for user-facing messages. */\nexport function localIso(): string {\n const d = new Date();\n const pad2 = (n: number): string => String(n).padStart(2, \"0\");\n return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}T${pad2(d.getHours())}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}`;\n}\n\nlet logFormat: \"text\" | \"json\" = (process.env[\"LOG_FORMAT\"] as \"json\" | undefined) === \"json\" ? \"json\" : \"text\";\n\nfunction formatLine(level: string, tag: string, msg: string): string {\n if (logFormat === \"json\") {\n return JSON.stringify({ ts: ts(), level, tag, msg });\n }\n return `${ts()} ${level.toUpperCase().padEnd(5)} [${tag}] ${msg}`;\n}\n\n/** LOW: operational milestones \u2014 startup, connections, errors */\nexport function logInfo(tag: string, msg: string): void {\n if (!shouldLog(\"low\")) return;\n const line = formatLine(\"info\", tag, msg);\n console.log(`[${tag}] ${msg}`);\n writeToFile(line);\n}\n\n/** LOW: warnings */\nexport function logWarn(tag: string, msg: string): void {\n if (!shouldLog(\"low\")) return;\n const line = formatLine(\"warn\", tag, msg);\n console.warn(`[${tag}] ${msg}`);\n writeToFile(line);\n}\n\n/** LOW: errors (always shown unless OFF) */\nexport function logError(tag: string, msg: string, err?: unknown): void {\n if (!shouldLog(\"low\")) return;\n const errStr = err instanceof Error ? err.message : (typeof err === \"object\" && err !== null ? JSON.stringify(err) : String(err ?? \"\"));\n const fullMsg = errStr ? `${msg} \u2014 ${errStr}` : msg;\n const line = formatLine(\"error\", tag, fullMsg);\n if (err) console.error(`[${tag}] ${msg}`, err)
|
|
5
|
-
"mappings": ";;;;;;;;;;;AAAA,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,YAAY;AAUd,SAAS,aAAqB;AACnC,QAAM,IAAI,oBAAI,KAAK;AACnB,QAAM,OAAO,GAAG,EAAE,YAAY,CAAC,IAAI,OAAO,EAAE,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAO,EAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;AACpH,SAAO,KAAK,SAAS,UAAU,IAAI,MAAM;AAC3C;AAMO,SAAS,YAAY,OAAuB;AACjD,iBAAe;AACjB;AAGO,SAAS,eAAe,SAAwB;AACrD,gBAAc;AAChB;AAEA,SAAS,UAAU,UAA6B;AAC9C,SAAO,YAAY,YAAY,KAAK,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AAK,UAAU;AACpC;AAGO,SAAS,WAAmB;AACjC,QAAM,IAAI,oBAAI,KAAK;AACnB,QAAM,OAAO,CAAC,MAAsB,OAAO,CAAC,EAAE,SAAS,GAAG,GAAG;AAC7D,SAAO,GAAG,EAAE,YAAY,CAAC,IAAI,KAAK,EAAE,SAAS,IAAI,CAAC,CAAC,IAAI,KAAK,EAAE,QAAQ,CAAC,CAAC,IAAI,KAAK,EAAE,SAAS,CAAC,CAAC,IAAI,KAAK,EAAE,WAAW,CAAC,CAAC,IAAI,KAAK,EAAE,WAAW,CAAC,CAAC;AAChJ;AAIA,SAAS,WAAW,OAAe,KAAa,KAAqB;AACnE,MAAI,cAAc,QAAQ;AACxB,WAAO,KAAK,UAAU,EAAE,IAAI,GAAG,GAAG,OAAO,KAAK,IAAI,CAAC;AAAA,EACrD;AACA,SAAO,GAAG,GAAG,CAAC,IAAI,MAAM,YAAY,EAAE,OAAO,CAAC,CAAC,KAAK,GAAG,KAAK,GAAG;AACjE;AAGO,SAAS,QAAQ,KAAa,KAAmB;AACtD,MAAI,CAAC,UAAU,KAAK,EAAG;AACvB,QAAM,OAAO,WAAW,QAAQ,KAAK,GAAG;AACxC,
|
|
4
|
+
"sourcesContent": ["import { appendFileSync, mkdirSync } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { abtarsHome } from \"../paths.js\";\n\n/** Log levels: OFF = silent, LOW = operational info, DEBUG = verbose trace, TRACE = debug + anomaly diagnostics */\nexport type LogLevel = \"off\" | \"low\" | \"debug\" | \"trace\";\n\nconst LEVEL_ORDER: Record<LogLevel, number> = { off: 0, low: 1, debug: 2, trace: 3 };\nconst LOG_DIR = join(abtarsHome(), \"logs\");\n\n/** Get today's log filename: bridge-YYYY-MM-DD.log */\nexport function getLogFile(): string {\n const d = new Date();\n const date = `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, \"0\")}-${String(d.getDate()).padStart(2, \"0\")}`;\n return join(LOG_DIR, `bridge-${date}.log`);\n}\n\nlet currentLevel: LogLevel = \"low\";\nconst isTest = process.env.NODE_ENV === \"test\" || process.env.VITEST === \"true\";\nlet fileLogging = !isTest;\n\nexport function setLogLevel(level: LogLevel): void {\n currentLevel = level;\n}\n\n/** @internal \u2014 test-only override for file logging. */\nexport function setFileLogging(enabled: boolean): void {\n fileLogging = enabled;\n}\n\nfunction shouldLog(minLevel: LogLevel): boolean {\n return LEVEL_ORDER[currentLevel] >= LEVEL_ORDER[minLevel];\n}\n\nexport function isLogLevel(minLevel: LogLevel): boolean {\n return LEVEL_ORDER[currentLevel] >= LEVEL_ORDER[minLevel];\n}\n\n// \u2500\u2500 Buffered file writer \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\nlet buffer: string[] = [];\nlet flushTimer: ReturnType<typeof setTimeout> | null = null;\n\nfunction writeToFile(line: string): void {\n if (!fileLogging) return;\n buffer.push(redactSecrets(line));\n if (buffer.length >= 200) flush();\n else if (!flushTimer) {\n flushTimer = setTimeout(flush, 30000);\n flushTimer.unref();\n }\n}\n\nfunction flush(): void {\n if (flushTimer) { clearTimeout(flushTimer); flushTimer = null; }\n if (buffer.length === 0) return;\n const lines = buffer;\n buffer = [];\n try {\n mkdirSync(LOG_DIR, { recursive: true });\n appendFileSync(getLogFile(), lines.join(\"\\n\") + \"\\n\");\n } catch { /* silently ignore file write errors */ }\n}\n\n/** Flush buffered logs synchronously. Called on process exit. */\nexport function flushLogs(): void { flush(); }\n\nprocess.on(\"exit\", flush);\n\n// \u2500\u2500 Credential redaction \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n//\n// INTENTIONALLY DUPLICATED across abtars and abmind \u2014 they are\n// independent products that both need this utility. If you add or\n// modify a pattern here, also update the sibling file:\n// abtars/src/components/logger.ts (SECRET_PATTERNS + redactSecrets)\n// abmind/src/redact-secrets.ts (SECRET_PATTERNS + redactSecrets)\n//\n// Do NOT create an import relationship between them. Each product stays\n// independent so the bridge can run against a different memory backend\n// and abmind can ship as a standalone npm package without pulling\n// abtars in for a utility function.\n\nconst SECRET_PATTERNS: ReadonlyArray<[RegExp, string]> = [\n [/sk-[A-Za-z0-9_-]{20,}/g, \"sk-***REDACTED***\"],\n [/sk-or-[A-Za-z0-9_-]{20,}/g, \"sk-or-***REDACTED***\"],\n [/gsk_[A-Za-z0-9]{20,}/g, \"gsk_***REDACTED***\"],\n [/ghp_[A-Za-z0-9]{36,}/g, \"ghp_***REDACTED***\"],\n [/github_pat_[A-Za-z0-9_]{20,}/g, \"github_pat_***REDACTED***\"],\n [/xox[baprs]-[A-Za-z0-9-]{10,}/g, \"xox_-***REDACTED***\"],\n [/AIza[A-Za-z0-9_-]{30,}/g, \"AIza***REDACTED***\"],\n [/AKIA[A-Z0-9]{16}/g, \"AKIA***REDACTED***\"],\n [/\\d{8,12}:[A-Za-z0-9_-]{35,}/g, \"***BOT_TOKEN***\"],\n [/Bearer [A-Za-z0-9._-]{20,}/g, \"Bearer ***REDACTED***\"],\n [/eyJ[A-Za-z0-9_-]{20,}\\.eyJ[A-Za-z0-9_-]{20,}\\.[A-Za-z0-9_-]{20,}/g, \"***JWT_REDACTED***\"],\n [/hf_[A-Za-z0-9]{20,}/g, \"hf_***REDACTED***\"],\n [/npm_[A-Za-z0-9]{20,}/g, \"npm_***REDACTED***\"],\n [/sk_live_[A-Za-z0-9]{20,}/g, \"sk_live_***REDACTED***\"],\n [/sk_test_[A-Za-z0-9]{20,}/g, \"sk_test_***REDACTED***\"],\n [/SG\\.[A-Za-z0-9_-]{20,}/g, \"SG.***REDACTED***\"],\n [/(\"(?:api[_-]?key|token|secret|password|authorization|credential)\"\\s*:\\s*\")[^\"]{8,}\"/gi, '$1***REDACTED***\"'],\n [/([A-Z_]*(?:KEY|TOKEN|SECRET|PASSWORD)=)[^\\s]{8,}/g, \"$1***REDACTED***\"],\n];\n\n/** Strip known secret patterns from a log line. */\nexport function redactSecrets(text: string): string {\n let result = text;\n for (const [pattern, replacement] of SECRET_PATTERNS) {\n result = result.replace(pattern, replacement);\n }\n return result;\n}\n\n\nfunction ts(): string {\n const d = new Date();\n const pad2 = (n: number): string => String(n).padStart(2, \"0\");\n const local = `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}T${pad2(d.getHours())}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}.${String(d.getMilliseconds()).padStart(3, \"0\")}`;\n return isTest ? `${local} TEST` : local;\n}\n\n/** Local ISO-ish timestamp for user-facing messages. */\nexport function localIso(): string {\n const d = new Date();\n const pad2 = (n: number): string => String(n).padStart(2, \"0\");\n return `${d.getFullYear()}-${pad2(d.getMonth() + 1)}-${pad2(d.getDate())}T${pad2(d.getHours())}:${pad2(d.getMinutes())}:${pad2(d.getSeconds())}`;\n}\n\nlet logFormat: \"text\" | \"json\" = (process.env[\"LOG_FORMAT\"] as \"json\" | undefined) === \"json\" ? \"json\" : \"text\";\n\nfunction formatLine(level: string, tag: string, msg: string): string {\n if (logFormat === \"json\") {\n return JSON.stringify({ ts: ts(), level, tag, msg });\n }\n return `${ts()} ${level.toUpperCase().padEnd(5)} [${tag}] ${msg}`;\n}\n\n/** LOW: operational milestones \u2014 startup, connections, errors */\nexport function logInfo(tag: string, msg: string): void {\n if (!shouldLog(\"low\")) return;\n const line = formatLine(\"info\", tag, msg);\n if (process.stdout.isTTY) console.log(`[${tag}] ${msg}`);\n writeToFile(line);\n}\n\n/** LOW: warnings */\nexport function logWarn(tag: string, msg: string): void {\n if (!shouldLog(\"low\")) return;\n const line = formatLine(\"warn\", tag, msg);\n if (process.stdout.isTTY) console.warn(`[${tag}] ${msg}`);\n writeToFile(line);\n}\n\n/** LOW: errors (always shown unless OFF) */\nexport function logError(tag: string, msg: string, err?: unknown): void {\n if (!shouldLog(\"low\")) return;\n const errStr = err instanceof Error ? err.message : (typeof err === \"object\" && err !== null ? JSON.stringify(err) : String(err ?? \"\"));\n const fullMsg = errStr ? `${msg} \u2014 ${errStr}` : msg;\n const line = formatLine(\"error\", tag, fullMsg);\n if (err) { if (process.stdout.isTTY) console.error(`[${tag}] ${msg}`, err); }\n else { if (process.stdout.isTTY) console.error(`[${tag}] ${msg}`); }\n writeToFile(line);\n}\n\n/** DEBUG: message content, full payloads, verbose tracing */\nexport function logDebug(tag: string, msg: string): void {\n if (!shouldLog(\"debug\")) return;\n const line = formatLine(\"debug\", tag, msg);\n if (process.stdout.isTTY) console.log(`[${tag}] ${msg}`);\n writeToFile(line);\n}\n\n/** TRACE: debug + anomaly diagnostics (swallowed errors, catch-block traces) */\nexport function logTrace(tag: string, msg: string): void {\n if (!shouldLog(\"trace\")) return;\n const line = formatLine(\"trace\", tag, msg);\n if (process.stdout.isTTY) console.log(`[${tag}] ${msg}`);\n writeToFile(line);\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;AAAA,SAAS,gBAAgB,iBAAiB;AAC1C,SAAS,YAAY;AAUd,SAAS,aAAqB;AACnC,QAAM,IAAI,oBAAI,KAAK;AACnB,QAAM,OAAO,GAAG,EAAE,YAAY,CAAC,IAAI,OAAO,EAAE,SAAS,IAAI,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC,IAAI,OAAO,EAAE,QAAQ,CAAC,EAAE,SAAS,GAAG,GAAG,CAAC;AACpH,SAAO,KAAK,SAAS,UAAU,IAAI,MAAM;AAC3C;AAMO,SAAS,YAAY,OA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M,kBAAmD;AAAA,MACvD,CAAC,0BAA0B,mBAAmB;AAAA,MAC9C,CAAC,6BAA6B,sBAAsB;AAAA,MACpD,CAAC,yBAAyB,oBAAoB;AAAA,MAC9C,CAAC,yBAAyB,oBAAoB;AAAA,MAC9C,CAAC,iCAAiC,2BAA2B;AAAA,MAC7D,CAAC,iCAAiC,qBAAqB;AAAA,MACvD,CAAC,2BAA2B,oBAAoB;AAAA,MAChD,CAAC,qBAAqB,oBAAoB;AAAA,MAC1C,CAAC,gCAAgC,iBAAiB;AAAA,MAClD,CAAC,+BAA+B,uBAAuB;AAAA,MACvD,CAAC,qEAAqE,oBAAoB;AAAA,MAC1F,CAAC,wBAAwB,mBAAmB;AAAA,MAC5C,CAAC,yBAAyB,oBAAoB;AAAA,MAC9C,CAAC,6BAA6B,wBAAwB;AAAA,MACtD,CAAC,6BAA6B,wBAAwB;AAAA,MACtD,CAAC,2BAA2B,mBAAmB;AAAA,MAC/C,CAAC,yFAAyF,mBAAmB;AAAA,MAC7G,CAAC,qDAAqD,kBAAkB;AAAA,IAC1E;AA0BA,IAAI,YAA8B,QAAQ,IAAI,YAAY,MAA6B,SAAS,SAAS;AAAA;AAAA;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -4,26 +4,26 @@ import {
|
|
|
4
4
|
buildUsersBlock,
|
|
5
5
|
init_user_registry,
|
|
6
6
|
loadUsers
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E7XD5UGB.js";
|
|
8
8
|
import {
|
|
9
9
|
init_peer_config,
|
|
10
10
|
peer_config_exports
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3BG3AIDP.js";
|
|
12
12
|
import {
|
|
13
13
|
getEnv,
|
|
14
14
|
init_env_schema
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-6PA5JBUU.js";
|
|
16
16
|
import {
|
|
17
17
|
init_log_and_swallow,
|
|
18
18
|
logAndSwallow
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2IYJ4I66.js";
|
|
20
20
|
import {
|
|
21
21
|
init_logger,
|
|
22
22
|
logDebug,
|
|
23
23
|
logError,
|
|
24
24
|
logInfo,
|
|
25
25
|
logWarn
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-XRTXYN66.js";
|
|
27
27
|
import {
|
|
28
28
|
abtarsHome,
|
|
29
29
|
abtarsRoot,
|
|
@@ -175,4 +175,4 @@ export {
|
|
|
175
175
|
getInstanceName,
|
|
176
176
|
init_soul_bundle
|
|
177
177
|
};
|
|
178
|
-
//# sourceMappingURL=chunk-
|
|
178
|
+
//# sourceMappingURL=chunk-Y5FEFKGM.js.map
|