hyperclaw 5.2.0 → 5.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/README.md +227 -3
- package/dist/a2ui-protocol-A2xow5Ch.js +75 -0
- package/dist/a2ui-protocol-dTomAnFE.js +75 -0
- package/dist/agents-routing-95_s2yea.js +6 -0
- package/dist/agents-routing-Bz3SstlK.js +398 -0
- package/dist/agents-routing-DHDK2axt.js +6 -0
- package/dist/agents-routing-DRMS8Ol-.js +6 -0
- package/dist/agents-routing-biXULPch.js +398 -0
- package/dist/agents-routing-iQmIOe3k.js +398 -0
- package/dist/api-key-validation-BeQ2MZAT.js +64 -0
- package/dist/api-key-validation-C2WQk1oM.js +64 -0
- package/dist/api-keys-guide-2cD5Rf-K.js +149 -0
- package/dist/api-keys-guide-BdT2lfX6.js +149 -0
- package/dist/api-keys-guide-BwCIj8qd.js +149 -0
- package/dist/audit-1Anq45mH.js +441 -0
- package/dist/audit-BAVTInWP.js +441 -0
- package/dist/audit-CV0gLGaL.js +444 -0
- package/dist/audit-Dnt0XgZD.js +441 -0
- package/dist/audit-DqNGdIKU.js +441 -0
- package/dist/bounty-tools-Cx7BXUfz.js +211 -0
- package/dist/bounty-tools-DWvW3yc-.js +211 -0
- package/dist/bounty-tools-FI7DHmsS.js +211 -0
- package/dist/bounty-tools-cjmA3Hgk.js +211 -0
- package/dist/browser-tools-BGPBCApQ.js +5 -0
- package/dist/browser-tools-Btu_vB2d.js +179 -0
- package/dist/browser-tools-DF2nQ1hi.js +5 -0
- package/dist/browser-tools-DYx4p13A.js +179 -0
- package/dist/chat-4ZistSKP.js +310 -0
- package/dist/chat-BqiMMQc4.js +324 -0
- package/dist/chat-BxxYzPaz.js +324 -0
- package/dist/chat-C0W8lwhh.js +324 -0
- package/dist/chat-CKBxDWAQ.js +324 -0
- package/dist/chat-CkCcCkVG.js +324 -0
- package/dist/chat-DCOKsydK.js +310 -0
- package/dist/chat-DZcZ1Uli.js +310 -0
- package/dist/chat-DiIra4_i.js +324 -0
- package/dist/chat-R_NuOa1v.js +324 -0
- package/dist/claw-tasks-CIkuuhga.js +80 -0
- package/dist/claw-tasks-CquRilLP.js +80 -0
- package/dist/claw-tasks-xXtZpeY0.js +80 -0
- package/dist/config-BEz4yNRx.js +261 -0
- package/dist/config-Br73VMLb.js +261 -0
- package/dist/config-CXqmvq_H.js +7 -0
- package/dist/config-D5vF0kvV.js +261 -0
- package/dist/config-D_6MxFk3.js +7 -0
- package/dist/config-b2HmFrBr.js +7 -0
- package/dist/connector-1H0OW1h8.js +419 -0
- package/dist/connector-1qpQ5L-T.js +173 -0
- package/dist/connector-2OVpYt0c.js +213 -0
- package/dist/connector-8cFkE3X4.js +552 -0
- package/dist/connector-B2bZD1id.js +181 -0
- package/dist/connector-B3W7quzD.js +568 -0
- package/dist/connector-B4FWhOzd.js +189 -0
- package/dist/connector-B5fqvoZL.js +239 -0
- package/dist/connector-BA8ZbhPt.js +162 -0
- package/dist/connector-BFl0XIwB.js +182 -0
- package/dist/connector-BIGRhSuN.js +419 -0
- package/dist/connector-BK0qVbvh.js +498 -0
- package/dist/connector-BMtA4KSF.js +194 -0
- package/dist/connector-BPIrifW-.js +218 -0
- package/dist/connector-BRNU-rJ4.js +225 -0
- package/dist/connector-BS7lvyLd.js +213 -0
- package/dist/connector-BZ_-UPUL.js +305 -0
- package/dist/connector-Bd0NZ5bT.js +189 -0
- package/dist/connector-BjsPwu-Y.js +531 -0
- package/dist/connector-BnSsjz1D.js +167 -0
- package/dist/connector-BrogAqVQ.js +239 -0
- package/dist/connector-BsVTG3U3.js +181 -0
- package/dist/connector-By9pLJgR.js +340 -0
- package/dist/connector-C7c1ASzT.js +192 -0
- package/dist/connector-CIj28thK.js +182 -0
- package/dist/connector-CJkuYNd1.js +280 -0
- package/dist/connector-CPcUmIHz.js +552 -0
- package/dist/connector-CUlP4He3.js +194 -0
- package/dist/connector-CZg2I8Tn.js +350 -0
- package/dist/connector-C_NtpthL.js +498 -0
- package/dist/connector-CddDB9IK.js +192 -0
- package/dist/connector-ChQMspky.js +167 -0
- package/dist/connector-ClHFpI56.js +425 -0
- package/dist/connector-CmhUVhMT.js +531 -0
- package/dist/connector-CnX7lwCt.js +425 -0
- package/dist/connector-D36oGwnK.js +162 -0
- package/dist/connector-DDJ7Nxkq.js +286 -0
- package/dist/connector-DDn2QDuf.js +167 -0
- package/dist/connector-DO_bzgJn.js +167 -0
- package/dist/connector-DVcRo21Y.js +568 -0
- package/dist/connector-DhWs2anT.js +189 -0
- package/dist/connector-DsY1IXMz.js +508 -0
- package/dist/connector-DwRF3CQg.js +218 -0
- package/dist/connector-HG61cV9h.js +340 -0
- package/dist/connector-HR28FwA5.js +181 -0
- package/dist/connector-K0QGRYh5.js +85 -0
- package/dist/connector-NliR7NZZ.js +508 -0
- package/dist/connector-VolY_hP4.js +350 -0
- package/dist/connector-Wjx9ih70.js +286 -0
- package/dist/connector-dfqk7NYD.js +181 -0
- package/dist/connector-e0W4Mpmq.js +189 -0
- package/dist/connector-eK6_phVW.js +280 -0
- package/dist/connector-l7UmCYaL.js +225 -0
- package/dist/connector-n2YnOJYZ.js +305 -0
- package/dist/connector-orobFcqE.js +531 -0
- package/dist/connector-r1SRYSqX.js +173 -0
- package/dist/connector-tZgn5_Fk.js +85 -0
- package/dist/connector-wm4Oe1DK.js +181 -0
- package/dist/cost-tracker-DHTv6zpR.js +103 -0
- package/dist/cost-tracker-DJ1tiKcx.js +103 -0
- package/dist/cost-tracker-jbK_AoIV.js +103 -0
- package/dist/credentials-store-C0R-pQM7.js +5 -0
- package/dist/credentials-store-C9HwQSY2.js +5 -0
- package/dist/credentials-store-D5Xw3F75.js +89 -0
- package/dist/credentials-store-DIPxVk51.js +86 -0
- package/dist/credentials-store-DU2cVTiY.js +7 -0
- package/dist/credentials-store-Djqi3oXC.js +5 -0
- package/dist/credentials-store-HwLJ3GS2.js +87 -0
- package/dist/credentials-store-z16XvFZ2.js +86 -0
- package/dist/cron-tasks-4my0PJce.js +85 -0
- package/dist/cron-tasks-CJkI0lo3.js +82 -0
- package/dist/cron-tasks-DN1YjYhK.js +82 -0
- package/dist/cron-tasks-DuNdK89e.js +82 -0
- package/dist/daemon-3xj3FVuw.js +5 -0
- package/dist/daemon-3zd_nupj.js +333 -0
- package/dist/daemon-B9-h7ryw.js +7 -0
- package/dist/daemon-BLC4AL9L.js +401 -0
- package/dist/daemon-BR1uU7jH.js +333 -0
- package/dist/daemon-BRdtCOoC.js +7 -0
- package/dist/daemon-BnmNBHY5.js +384 -0
- package/dist/daemon-BwspQtiu.js +7 -0
- package/dist/daemon-Bx5HTGjk.js +404 -0
- package/dist/daemon-CCxpXxSb.js +7 -0
- package/dist/daemon-CEUxN3SQ.js +7 -0
- package/dist/daemon-CHk9_ezz.js +403 -0
- package/dist/daemon-CgrsZ0d9.js +320 -0
- package/dist/daemon-Cy7iD9au.js +7 -0
- package/dist/daemon-DCm9RCEz.js +401 -0
- package/dist/daemon-DNzuDyu8.js +7 -0
- package/dist/daemon-DWFWCLvh.js +7 -0
- package/dist/daemon-DgBZaFyi.js +355 -0
- package/dist/daemon-Dsyjad7g.js +7 -0
- package/dist/daemon-DwxPYrb6.js +404 -0
- package/dist/daemon-DxoPIGQG.js +333 -0
- package/dist/daemon-MXsEPeVa.js +7 -0
- package/dist/daemon-rpJ-J0bv.js +403 -0
- package/dist/daemon-sZVjFUoX.js +7 -0
- package/dist/delivery-8fo4GZ-j.js +95 -0
- package/dist/delivery-CkxNZIsF.js +95 -0
- package/dist/delivery-CtbHkJbB.js +95 -0
- package/dist/delivery-D1z3f3KW.js +4 -0
- package/dist/delivery-DKGpk5M4.js +4 -0
- package/dist/delivery-DReKOHyM.js +95 -0
- package/dist/delivery-Ddn-VajP.js +4 -0
- package/dist/delivery-DsoxcD2z.js +4 -0
- package/dist/destructive-gate-CEn4BsTd.js +101 -0
- package/dist/destructive-gate-CgCqfKuT.js +101 -0
- package/dist/destructive-gate-DcEpMEqP.js +101 -0
- package/dist/developer-keys-7rQ8M4Qo.js +127 -0
- package/dist/developer-keys-BeUpyenR.js +8 -0
- package/dist/developer-keys-CSmzA-dl.js +127 -0
- package/dist/developer-keys-KFGbGuZj.js +8 -0
- package/dist/device-auth-store-BDhzxuPc.js +5 -0
- package/dist/device-auth-store-Cjyn2XeY.js +86 -0
- package/dist/device-auth-store-DgSabRGa.js +7 -0
- package/dist/device-auth-store-LKgpU74c.js +88 -0
- package/dist/device-auth-store-UlkrF-9_.js +5 -0
- package/dist/device-auth-store-yvGLuYAl.js +86 -0
- package/dist/doctor-BcfmNAGV.js +233 -0
- package/dist/doctor-CEP3UQjn.js +227 -0
- package/dist/doctor-CmJh0JLr.js +6 -0
- package/dist/doctor-CtDvddSn.js +231 -0
- package/dist/doctor-DPoCaXsd.js +227 -0
- package/dist/doctor-DPvY68XB.js +6 -0
- package/dist/doctor-G6EMPukm.js +6 -0
- package/dist/doctor-tL9TXt9y.js +6 -0
- package/dist/engine-1fLMFUn2.js +7 -0
- package/dist/engine-7lSiOc0W.js +323 -0
- package/dist/engine-B83pxJM4.js +318 -0
- package/dist/engine-B8hxtYpN.js +323 -0
- package/dist/engine-BXqijc79.js +7 -0
- package/dist/engine-BfQ-vNqE.js +321 -0
- package/dist/engine-BlpKw8D4.js +7 -0
- package/dist/engine-BmN7L0jl.js +7 -0
- package/dist/engine-CRagwas6.js +321 -0
- package/dist/engine-CppTnNbG.js +7 -0
- package/dist/engine-CwAfDQbD.js +7 -0
- package/dist/engine-D5kY4hMJ.js +7 -0
- package/dist/engine-DJSfl_Hc.js +323 -0
- package/dist/engine-DQcMDIbU.js +305 -0
- package/dist/engine-W1I8kkgV.js +305 -0
- package/dist/engine-mVrq_pfQ.js +7 -0
- package/dist/env-resolve-BeamD7l5.js +10 -0
- package/dist/env-resolve-C0otwkgN.js +10 -0
- package/dist/env-resolve-CC_po9t5.js +10 -0
- package/dist/env-resolve-COjiKYD8.js +147 -0
- package/dist/env-resolve-CYiFHLAi.js +145 -0
- package/dist/env-resolve-ClZcv5-B.js +145 -0
- package/dist/env-resolve-DS92g2fk.js +151 -0
- package/dist/env-resolve-DkBUmcI3.js +10 -0
- package/dist/extraction-tools-6PREYSAK.js +5 -0
- package/dist/extraction-tools-B8F3nsLR.js +5 -0
- package/dist/extraction-tools-BX5HGgko.js +91 -0
- package/dist/extraction-tools-Co11UJdZ.js +91 -0
- package/dist/form_data-DDfyO9B0.js +8657 -0
- package/dist/form_data-DgWnyuDn.js +8657 -0
- package/dist/gateway-BfHcLG6d.js +194 -0
- package/dist/gateway-CzI8dnlS.js +196 -0
- package/dist/gateway-DNv10FFg.js +194 -0
- package/dist/gateway-DRh5v1KI.js +4 -0
- package/dist/gateway-DroPtqyM.js +6 -0
- package/dist/gateway-DyWwV0Nu.js +4 -0
- package/dist/gmail-watch-setup-BV4r_lgb.js +40 -0
- package/dist/gmail-watch-setup-CW_5D9g-.js +40 -0
- package/dist/gmail-watch-setup-xG9GkPwr.js +42 -0
- package/dist/health-CBy1PfzC.js +152 -0
- package/dist/health-Cq_yE5Ln.js +6 -0
- package/dist/heartbeat-engine-7I0dZeea.js +83 -0
- package/dist/heartbeat-engine-BZUNOanp.js +84 -0
- package/dist/heartbeat-engine-DNm8ggAs.js +83 -0
- package/dist/heartbeat-engine-tgK7xXmt.js +83 -0
- package/dist/hub-CI4qcd1b.js +515 -0
- package/dist/hub-CNQaC4JI.js +515 -0
- package/dist/hub-Co1SbxLs.js +6 -0
- package/dist/hub-eUh89obm.js +6 -0
- package/dist/hyperclawbot-Bkncybig.js +508 -0
- package/dist/hyperclawbot-C37Unss3.js +505 -0
- package/dist/hyperclawbot-CFHXZr12.js +505 -0
- package/dist/hyperclawbot-DGou0MZ6.js +508 -0
- package/dist/hyperclawbot-DnPIyjox.js +508 -0
- package/dist/hyperclawbot-GYFaTEgC.js +505 -0
- package/dist/hyperclawbot-mcLnyJyM.js +505 -0
- package/dist/hyperclawbot-xcastgTV.js +508 -0
- package/dist/hyperclawbot-y0i_joQK.js +505 -0
- package/dist/inference-BvmMO9dq.js +8 -0
- package/dist/inference-C2HOfRf8.js +2848 -0
- package/dist/inference-CKvR5Ik5.js +2841 -0
- package/dist/inference-DVVmhQn5.js +2841 -0
- package/dist/inference-DoM_iai-.js +2848 -0
- package/dist/inference-DwgXrvBb.js +6 -0
- package/dist/inference-Go1G6tnF.js +8 -0
- package/dist/inference-_ptQe0oG.js +2841 -0
- package/dist/inference-gK62s15E.js +6 -0
- package/dist/inference-lLDvSTR9.js +6 -0
- package/dist/knowledge-graph-4SxFnwEm.js +131 -0
- package/dist/knowledge-graph-BsH-HoUJ.js +131 -0
- package/dist/knowledge-graph-BxrAiV2B.js +134 -0
- package/dist/knowledge-graph-DCa91Nz5.js +131 -0
- package/dist/loader-7fz2fb92.js +400 -0
- package/dist/loader-B2jZXMBu.js +6 -0
- package/dist/loader-CbS0tIrR.js +4 -0
- package/dist/loader-Ckvv7vHF.js +410 -0
- package/dist/loader-CwOXDhFQ.js +400 -0
- package/dist/loader-DpEOgWXZ.js +4 -0
- package/dist/loader-DpYgmaul.js +4 -0
- package/dist/loader-DtyQP7wL.js +400 -0
- package/dist/logger-B3AqfQWG.js +84 -0
- package/dist/logger-B_q8yqmA.js +84 -0
- package/dist/logger-BxJklsDv.js +84 -0
- package/dist/logger-ry2oCfdf.js +86 -0
- package/dist/manager-9zwhTeQ5.js +233 -0
- package/dist/manager-B1RbCW6C.js +31 -0
- package/dist/manager-B90HEHxe.js +6 -0
- package/dist/manager-B94UWcTs.js +233 -0
- package/dist/manager-BDvL_oPs.js +4 -0
- package/dist/manager-BEatAtIB.js +31 -0
- package/dist/manager-BQf9drst.js +120 -0
- package/dist/manager-Bau1mIqb.js +6 -0
- package/dist/manager-BkqHak_e.js +247 -0
- package/dist/manager-BoFdZm-l.js +233 -0
- package/dist/manager-C2bq0AXc.js +233 -0
- package/dist/manager-CBe3W3eG.js +117 -0
- package/dist/manager-CoHr8_eJ.js +117 -0
- package/dist/manager-CuS13QUO.js +6 -0
- package/dist/manager-DO0pK2OI.js +117 -0
- package/dist/manager-DVetfBCH.js +6 -0
- package/dist/manager-Jd0qSzVe.js +35 -0
- package/dist/manager-TxFgaHT9.js +31 -0
- package/dist/manager-Yo6ZAofG.js +250 -0
- package/dist/mcp-B_WJiTZz.js +139 -0
- package/dist/mcp-DVhPLprc.js +139 -0
- package/dist/mcp-GWnLTVi-.js +142 -0
- package/dist/mcp-loader-B6xz7ftt.js +94 -0
- package/dist/mcp-loader-BLanJREp.js +94 -0
- package/dist/mcp-loader-Bx7FFxAU.js +94 -0
- package/dist/mcp-loader-CecsT-3O.js +93 -0
- package/dist/mcp-loader-Cr0LRQHE.js +93 -0
- package/dist/mcp-loader-D0rbtV3G.js +93 -0
- package/dist/memory-B47nvgOq.js +271 -0
- package/dist/memory-D-Py-cz5.js +273 -0
- package/dist/memory-D991eoj7.js +6 -0
- package/dist/memory-DoQoaHjo.js +4 -0
- package/dist/memory-auto-5aBZQJQY.js +5 -0
- package/dist/memory-auto-BTeOoLsb.js +306 -0
- package/dist/memory-auto-BvjfaflZ.js +5 -0
- package/dist/memory-auto-CSUt3aas.js +306 -0
- package/dist/memory-auto-CfpACu6s.js +306 -0
- package/dist/memory-auto-DI9Xpd-x.js +306 -0
- package/dist/memory-auto-D_mPVYqI.js +5 -0
- package/dist/memory-auto-PmKetZuo.js +5 -0
- package/dist/memory-auto-_Jv-Diw_.js +306 -0
- package/dist/memory-auto-rLBheyC0.js +5 -0
- package/dist/memory-integration-UFc6CdRA.js +91 -0
- package/dist/memory-integration-_NOy60Fj.js +91 -0
- package/dist/memory-integration-nbQ8esDu.js +91 -0
- package/dist/moltbook-B4znBD46.js +81 -0
- package/dist/moltbook-CGtA7Lb3.js +81 -0
- package/dist/moltbook-EZOfIwcN.js +81 -0
- package/dist/node-BvA5_2f_.js +222 -0
- package/dist/node-CRaZw_av.js +225 -0
- package/dist/node-CSOPY84m.js +222 -0
- package/dist/node-FPkFXYdU.js +225 -0
- package/dist/nodes-registry--DkZbn41.js +52 -0
- package/dist/nodes-registry-DYEH1aWn.js +52 -0
- package/dist/nodes-registry-jK7T0THg.js +52 -0
- package/dist/oauth-flow-B3S4T_SJ.js +147 -0
- package/dist/oauth-flow-CuQHP_RD.js +150 -0
- package/dist/oauth-flow-D_iqT6nr.js +150 -0
- package/dist/oauth-flow-Du2N6B2V.js +150 -0
- package/dist/oauth-provider-B2RBpiXg.js +111 -0
- package/dist/oauth-provider-C1qk9SI-.js +110 -0
- package/dist/oauth-provider-CDOMIZgF.js +110 -0
- package/dist/observability-4CyDqBWi.js +89 -0
- package/dist/observability-BfhV3r9r.js +89 -0
- package/dist/observability-DAnU8Ung.js +89 -0
- package/dist/onboard-3SoScSbC.js +11 -0
- package/dist/onboard-BAhuTUMO.js +4240 -0
- package/dist/onboard-BHKBzytX.js +13 -0
- package/dist/onboard-BVYo6E_l.js +3865 -0
- package/dist/onboard-Bf3ht6ct.js +11 -0
- package/dist/onboard-Bmpa_pxc.js +3865 -0
- package/dist/onboard-BwFFnEDj.js +13 -0
- package/dist/onboard-C-0A7RKN.js +4211 -0
- package/dist/onboard-CCuETEUr.js +3865 -0
- package/dist/onboard-CDi3B996.js +13 -0
- package/dist/onboard-CcXqOCHa.js +3862 -0
- package/dist/onboard-Cw85LmyN.js +13 -0
- package/dist/onboard-DU3acWAq.js +13 -0
- package/dist/onboard-DVEFIFRj.js +11 -0
- package/dist/onboard-DW8b3EUP.js +4250 -0
- package/dist/onboard-DfYWM7yN.js +13 -0
- package/dist/onboard-DiDTuD7m.js +13 -0
- package/dist/onboard-DqamkA0I.js +11 -0
- package/dist/onboard-DtDFU4lV.js +3865 -0
- package/dist/onboard-IdhgSexF.js +11 -0
- package/dist/onboard-Qh-qibLR.js +3861 -0
- package/dist/onboard-T54jLovz.js +13 -0
- package/dist/onboard-nQerZcpc.js +3862 -0
- package/dist/onboard-qXuXl5An.js +4250 -0
- package/dist/onboard-r2hLYfsL.js +3865 -0
- package/dist/onboard-xsSdyO6Y.js +3865 -0
- package/dist/onboard-yACJiQ6A.js +4215 -0
- package/dist/onboard-z1K8FTgh.js +13 -0
- package/dist/orchestrator-BIKrbOtx.js +6 -0
- package/dist/orchestrator-C71UI_0E.js +189 -0
- package/dist/orchestrator-C9I6EVhh.js +189 -0
- package/dist/orchestrator-CC6vuL6m.js +6 -0
- package/dist/orchestrator-CExmcac2.js +189 -0
- package/dist/orchestrator-CQm9v71d.js +6 -0
- package/dist/orchestrator-CSZnojZo.js +189 -0
- package/dist/orchestrator-Cc-gXExz.js +189 -0
- package/dist/orchestrator-CxySH0n5.js +6 -0
- package/dist/orchestrator-Cybvh-J0.js +189 -0
- package/dist/orchestrator-D-9pExNB.js +189 -0
- package/dist/orchestrator-DG-RjZIu.js +6 -0
- package/dist/orchestrator-DvEjhiJR.js +6 -0
- package/dist/orchestrator-FFpXJwSV.js +189 -0
- package/dist/orchestrator-f6IjivCr.js +6 -0
- package/dist/orchestrator-mPfwBFvX.js +6 -0
- package/dist/osint-BIGH02i8.js +277 -0
- package/dist/osint-Cc2Ju-o4.js +277 -0
- package/dist/osint-Cg3-CYHx.js +278 -0
- package/dist/pairing-BRPzVXzQ.js +198 -0
- package/dist/pairing-Cm78Tsdx.js +4 -0
- package/dist/pairing-D4sA3-Ha.js +6 -0
- package/dist/pairing-ouc_v-OX.js +196 -0
- package/dist/pc-access-BZvlAXYN.js +819 -0
- package/dist/pc-access-CziyndiO.js +8 -0
- package/dist/pc-access-D5k6dAfU.js +819 -0
- package/dist/pc-access-DoPSPiAK.js +8 -0
- package/dist/pending-approval-BaKZ0b_s.js +22 -0
- package/dist/pending-approval-CBVZcFJn.js +22 -0
- package/dist/pending-approval-DiZ96D8v.js +22 -0
- package/dist/providers-CFQC39vg.js +5 -0
- package/dist/providers-DP8T0QCR.js +1089 -0
- package/dist/reminders-store-BSIw5Y5z.js +58 -0
- package/dist/reminders-store-Bus52SjO.js +58 -0
- package/dist/renderer-CmMjrkqN.js +225 -0
- package/dist/renderer-_Y9mEqMM.js +225 -0
- package/dist/renderer-h3ar94cf.js +228 -0
- package/dist/rules-D3GcY_lt.js +103 -0
- package/dist/rules-DFoset7W.js +103 -0
- package/dist/rules-eJw9i4RF.js +106 -0
- package/dist/run-main.js +461 -333
- package/dist/runner-C-syOqBr.js +1273 -0
- package/dist/runner-C73am--A.js +1273 -0
- package/dist/runner-DKLq9jhv.js +1273 -0
- package/dist/runner-Im-aCXhh.js +1273 -0
- package/dist/runner-NvAzKXbv.js +1273 -0
- package/dist/security-2DPBzs5F.js +4 -0
- package/dist/security-BhhX8wJx.js +73 -0
- package/dist/server-7tmTtdPU.js +4 -0
- package/dist/server-A38RPbRE.js +1291 -0
- package/dist/server-B0k_pCt5.js +4 -0
- package/dist/server-BErPWJZ5.js +4 -0
- package/dist/server-BKo-zifC.js +4 -0
- package/dist/server-Bav63Eqx.js +4 -0
- package/dist/server-BbWQWOH4.js +4 -0
- package/dist/server-BfHtA0Y2.js +1278 -0
- package/dist/server-BiYaxlFV.js +1287 -0
- package/dist/server-C6htB4FI.js +4 -0
- package/dist/server-CB7cjcj4.js +1278 -0
- package/dist/server-CNiOi5dN.js +1285 -0
- package/dist/server-CSC4npaT.js +1285 -0
- package/dist/server-CZfP2Poz.js +1278 -0
- package/dist/server-C_YVts3e.js +4 -0
- package/dist/server-CbQl0M21.js +1278 -0
- package/dist/server-Cj45rxn-.js +1292 -0
- package/dist/server-Ct7Fl3SE.js +1285 -0
- package/dist/server-D9q-3mLF.js +1292 -0
- package/dist/server-DRc26z9e.js +4 -0
- package/dist/server-DT7JjjVD.js +4 -0
- package/dist/server-DacRJyZn.js +4 -0
- package/dist/server-PCtHMXe2.js +1292 -0
- package/dist/server-wXCH_TCU.js +4 -0
- package/dist/session-store-7ZPOoB81.js +5 -0
- package/dist/session-store-BOa2y_EQ.js +5 -0
- package/dist/session-store-BYEr8j52.js +139 -0
- package/dist/session-store-Bx7lBD_a.js +141 -0
- package/dist/session-store-C13h7I2r.js +136 -0
- package/dist/session-store-CUHgJ0Xr.js +5 -0
- package/dist/session-store-cbtK6hx9.js +136 -0
- package/dist/session-store-eecMioKI.js +5 -0
- package/dist/sessions-tools-B5_ow-s7.js +5 -0
- package/dist/sessions-tools-CG2mvJo6.js +95 -0
- package/dist/sessions-tools-DVSejkNU.js +95 -0
- package/dist/sessions-tools-fOL1N3Zu.js +5 -0
- package/dist/skill-loader-99egKAGN.js +160 -0
- package/dist/skill-loader-Bl6pYxNN.js +160 -0
- package/dist/skill-loader-D4D5kfDu.js +7 -0
- package/dist/skill-loader-DwbmjEDa.js +7 -0
- package/dist/skill-runtime-1CrUOOGv.js +5 -0
- package/dist/skill-runtime-B-2O7Vgb.js +102 -0
- package/dist/skill-runtime-B7PutgyZ.js +5 -0
- package/dist/skill-runtime-BGNtPD_L.js +102 -0
- package/dist/skill-runtime-BUhMkMzO.js +5 -0
- package/dist/skill-runtime-Bv7fCCx8.js +102 -0
- package/dist/skill-runtime-Bx2HHcta.js +102 -0
- package/dist/skill-runtime-C6HVvnmN.js +5 -0
- package/dist/skill-runtime-CtSykP3r.js +102 -0
- package/dist/skill-runtime-DUAt8JM_.js +5 -0
- package/dist/skill-runtime-DZ6uJXGW.js +102 -0
- package/dist/skill-runtime-DaLnq_Jm.js +5 -0
- package/dist/skill-runtime-DpDbjL7y.js +102 -0
- package/dist/skill-runtime-acmnZSq7.js +102 -0
- package/dist/skill-runtime-dzuLMVSw.js +5 -0
- package/dist/skill-runtime-wiVnzSoJ.js +5 -0
- package/dist/src-B5lCcPXX.js +63 -0
- package/dist/src-B7Kxqi35.js +20 -0
- package/dist/src-B8DEmVd6.js +458 -0
- package/dist/src-BqbwzQQj.js +63 -0
- package/dist/src-C63ECu1t.js +63 -0
- package/dist/src-C65-5rOW.js +458 -0
- package/dist/src-CbTAVbeI.js +20 -0
- package/dist/src-Cmnclt47.js +63 -0
- package/dist/src-D0kptBSa.js +458 -0
- package/dist/src-DZtpIvWJ.js +63 -0
- package/dist/src-DjzS20TD.js +63 -0
- package/dist/src-DmPjS2Z4.js +458 -0
- package/dist/src-DmbIgW0O.js +63 -0
- package/dist/src-DsaXFru7.js +63 -0
- package/dist/src-Dt0TXI8r.js +458 -0
- package/dist/src-PPagVWuK.js +63 -0
- package/dist/src-rktqvEBJ.js +458 -0
- package/dist/src-tI8EOp6-.js +458 -0
- package/dist/src-zUHOCQgl.js +458 -0
- package/dist/src-zWhGmJSN.js +458 -0
- package/dist/sub-agent-tools-9k60L5mn.js +39 -0
- package/dist/sub-agent-tools-BBJf8oPD.js +39 -0
- package/dist/sub-agent-tools-BVCARpnF.js +39 -0
- package/dist/sub-agent-tools-Cx5BB5IO.js +39 -0
- package/dist/sub-agent-tools-DMT7jjBc.js +39 -0
- package/dist/sub-agent-tools-F-04gxf8.js +39 -0
- package/dist/sub-agent-tools-iBQiRKg6.js +39 -0
- package/dist/sub-agent-tools-kr921YOA.js +39 -0
- package/dist/theme-CLXvI6Hr.js +183 -0
- package/dist/theme-DdZT-Bq4.js +10 -0
- package/dist/theme-GEpjn_0G.js +180 -0
- package/dist/theme-hOlG-hDL.js +8 -0
- package/dist/tool-policy-D1zWYBKm.js +189 -0
- package/dist/tool-policy-TmXx_fpp.js +189 -0
- package/dist/tool-policy-YgysHf5s.js +189 -0
- package/dist/tts-elevenlabs-BT4WrEwy.js +61 -0
- package/dist/tts-elevenlabs-C62Wnnrg.js +61 -0
- package/dist/tts-elevenlabs-DmEFFeR8.js +61 -0
- package/dist/update-check-BeAPt4-f.js +98 -0
- package/dist/update-check-CaHNCDqe.js +6 -0
- package/dist/vision-B5DQ5hYa.js +121 -0
- package/dist/vision-XOSSQe4m.js +121 -0
- package/dist/vision-sIO3kwFy.js +121 -0
- package/dist/vision-tools-BHogJPuK.js +5 -0
- package/dist/vision-tools-BZhV8wg3.js +51 -0
- package/dist/vision-tools-BiDKd0UA.js +5 -0
- package/dist/vision-tools-CdRxilYR.js +5 -0
- package/dist/vision-tools-DnUjpQhI.js +51 -0
- package/dist/vision-tools-gtUq6d-x.js +51 -0
- package/dist/voice-transcription-5_iQE-0C.js +138 -0
- package/dist/voice-transcription-C3SuzK96.js +138 -0
- package/dist/voice-transcription-CYFj4Iv3.js +138 -0
- package/dist/voice-transcription-ygmlOkky.js +138 -0
- package/dist/website-watch-tools-BF-wR0UI.js +5 -0
- package/dist/website-watch-tools-CVh7RA5-.js +139 -0
- package/dist/website-watch-tools-CthBrGPP.js +5 -0
- package/dist/website-watch-tools-Oxf8Mv4j.js +139 -0
- package/package.json +1 -1
|
@@ -0,0 +1,508 @@
|
|
|
1
|
+
const require_chunk = require('./chunk-jS-bbMI5.js');
|
|
2
|
+
const require_paths = require('./paths-AIyBxIzm.js');
|
|
3
|
+
const require_paths$1 = require('./paths-DPovhojT.js');
|
|
4
|
+
require('./browser-tools-Btu_vB2d.js');
|
|
5
|
+
require('./src-CbTAVbeI.js');
|
|
6
|
+
require('./engine-B8hxtYpN.js');
|
|
7
|
+
require('./extraction-tools-BX5HGgko.js');
|
|
8
|
+
require('./inference-C2HOfRf8.js');
|
|
9
|
+
require('./memory-auto-CSUt3aas.js');
|
|
10
|
+
require('./orchestrator-Cc-gXExz.js');
|
|
11
|
+
require('./pc-access-D5k6dAfU.js');
|
|
12
|
+
require('./session-store-cbtK6hx9.js');
|
|
13
|
+
require('./sessions-tools-DVSejkNU.js');
|
|
14
|
+
require('./skill-loader-99egKAGN.js');
|
|
15
|
+
require('./skill-runtime-Bx2HHcta.js');
|
|
16
|
+
require('./vision-tools-DnUjpQhI.js');
|
|
17
|
+
require('./website-watch-tools-Oxf8Mv4j.js');
|
|
18
|
+
const require_src$1 = require('./src-tI8EOp6-.js');
|
|
19
|
+
const chalk = require_chunk.__toESM(require("chalk"));
|
|
20
|
+
const fs_extra = require_chunk.__toESM(require("fs-extra"));
|
|
21
|
+
const path = require_chunk.__toESM(require("path"));
|
|
22
|
+
const axios = require_chunk.__toESM(require("axios"));
|
|
23
|
+
|
|
24
|
+
//#region src/bot/hyperclawbot.ts
|
|
25
|
+
require_paths$1.init_paths();
|
|
26
|
+
const getBotConfigFile = () => path.default.join(require_paths.getHyperClawDir(), "hyperclawbot.json");
|
|
27
|
+
const getBotPidFile = () => path.default.join(require_paths.getHyperClawDir(), "hyperclawbot.pid");
|
|
28
|
+
async function getGatewayStatus(gatewayUrl, token) {
|
|
29
|
+
try {
|
|
30
|
+
const headers = token ? { Authorization: `Bearer ${token}` } : {};
|
|
31
|
+
const res = await axios.default.get(`${gatewayUrl}/api/status`, {
|
|
32
|
+
headers,
|
|
33
|
+
timeout: 3e3
|
|
34
|
+
});
|
|
35
|
+
const d = res.data;
|
|
36
|
+
return `⚡ *Gateway Status*\n\n🟢 Running on port ${d.port}\n🦅 Agent: ${d.agentName || "unknown"}\n📱 Channels: ${(d.channels || []).join(", ") || "none"}\n👥 Sessions: ${d.sessions || 0}\n⏱ Uptime: ${d.uptime || "?"}\n🧠 Model: ${d.model || "unknown"}`;
|
|
37
|
+
} catch {
|
|
38
|
+
return "🔴 *Gateway Offline*\n\nStart with: `hyperclaw daemon start`";
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
async function getLogSummary(n = 20) {
|
|
42
|
+
const logFile = path.default.join(require_paths.getHyperClawDir(), "logs", "hyperclaw.log");
|
|
43
|
+
if (!await fs_extra.default.pathExists(logFile)) return "📋 No logs yet.";
|
|
44
|
+
const content = await fs_extra.default.readFile(logFile, "utf8");
|
|
45
|
+
const lines = content.trim().split("\n").slice(-n);
|
|
46
|
+
const formatted = lines.map((line) => {
|
|
47
|
+
try {
|
|
48
|
+
const e = JSON.parse(line);
|
|
49
|
+
const level = e.level?.toUpperCase() || "INFO";
|
|
50
|
+
const icon = {
|
|
51
|
+
ERROR: "🔴",
|
|
52
|
+
WARN: "🟡",
|
|
53
|
+
INFO: "🔵",
|
|
54
|
+
DEBUG: "⚪"
|
|
55
|
+
}[level] || "⚪";
|
|
56
|
+
return `${icon} ${e.ts?.slice(11, 19) || ""} [${e.module || "?"}] ${e.message || ""}`;
|
|
57
|
+
} catch {
|
|
58
|
+
return line;
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
return `📋 *Last ${n} log entries*\n\n\`\`\`\n${formatted.join("\n").slice(0, 3500)}\n\`\`\``;
|
|
62
|
+
}
|
|
63
|
+
async function approveCode(channelId, code) {
|
|
64
|
+
try {
|
|
65
|
+
const { PairingStore } = await Promise.resolve().then(() => require("./pairing-D4sA3-Ha.js"));
|
|
66
|
+
const store = new PairingStore(channelId);
|
|
67
|
+
await store.cliApprove(code);
|
|
68
|
+
return `✅ Approved pairing code *${code}* on *${channelId}*`;
|
|
69
|
+
} catch (e) {
|
|
70
|
+
return `❌ Failed: ${e.message}`;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
async function listChannels() {
|
|
74
|
+
try {
|
|
75
|
+
const cfg = await fs_extra.default.readJson(require_paths.getConfigPath());
|
|
76
|
+
const channels = Object.entries(cfg.channelConfigs || {}).map(([id]) => `• ${id}`).join("\n");
|
|
77
|
+
return `📱 *Active Channels*\n\n${channels || "(none configured)"}`;
|
|
78
|
+
} catch {
|
|
79
|
+
return "❌ Could not read config";
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
async function listHooks() {
|
|
83
|
+
try {
|
|
84
|
+
const { HookLoader } = await Promise.resolve().then(() => require("./loader-B2jZXMBu.js"));
|
|
85
|
+
const loader = new HookLoader();
|
|
86
|
+
loader.loadState();
|
|
87
|
+
const hooks = loader.getHooks().map((h) => `${h.enabled && h.eligible ? "✅" : "⬜"} ${h.id} — ${h.trigger}`).join("\n");
|
|
88
|
+
return `🪝 *Hooks*\n\n${hooks}`;
|
|
89
|
+
} catch {
|
|
90
|
+
return "❌ Could not load hooks";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
async function sendToAgent(message, gatewayUrl, gatewayToken, surface = "telegram") {
|
|
94
|
+
try {
|
|
95
|
+
const headers = gatewayToken ? { Authorization: `Bearer ${gatewayToken}` } : {};
|
|
96
|
+
const res = await axios.default.post(`${gatewayUrl}/api/chat`, {
|
|
97
|
+
message,
|
|
98
|
+
thinking: "none"
|
|
99
|
+
}, {
|
|
100
|
+
headers,
|
|
101
|
+
timeout: 3e4
|
|
102
|
+
});
|
|
103
|
+
const { formatAgentResponse } = (require_src$1.init_src(), require_chunk.__toCommonJS(require_src$1.src_exports));
|
|
104
|
+
return formatAgentResponse(res.data.response ?? "", surface);
|
|
105
|
+
} catch {
|
|
106
|
+
return "❌ Gateway unreachable — start with: `hyperclaw daemon start`";
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
function parseCommand(text) {
|
|
110
|
+
const parts = text.trim().split(/\s+/);
|
|
111
|
+
const cmd = parts[0].replace("/", "").toLowerCase();
|
|
112
|
+
return {
|
|
113
|
+
cmd,
|
|
114
|
+
args: parts.slice(1)
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
function getHelp(platform) {
|
|
118
|
+
const { getAgentHelp } = (require_src$1.init_src(), require_chunk.__toCommonJS(require_src$1.src_exports));
|
|
119
|
+
return getAgentHelp(platform === "discord" ? "discord" : "telegram");
|
|
120
|
+
}
|
|
121
|
+
var TelegramHyperClawBot = class {
|
|
122
|
+
config;
|
|
123
|
+
offset = 0;
|
|
124
|
+
running = false;
|
|
125
|
+
apiBase;
|
|
126
|
+
botUsername = "";
|
|
127
|
+
constructor(config) {
|
|
128
|
+
this.config = config;
|
|
129
|
+
this.apiBase = `https://api.telegram.org/bot${config.token}`;
|
|
130
|
+
}
|
|
131
|
+
async api(method, body) {
|
|
132
|
+
const res = await axios.default.post(`${this.apiBase}/${method}`, body, { timeout: 1e4 });
|
|
133
|
+
return res.data;
|
|
134
|
+
}
|
|
135
|
+
isAllowed(userId) {
|
|
136
|
+
if (this.config.allowedUsers.length === 0) return true;
|
|
137
|
+
return this.config.allowedUsers.includes(String(userId));
|
|
138
|
+
}
|
|
139
|
+
async sendMessage(chatId, text) {
|
|
140
|
+
await this.api("sendMessage", {
|
|
141
|
+
chat_id: chatId,
|
|
142
|
+
text: text.slice(0, 4096),
|
|
143
|
+
parse_mode: "Markdown"
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
async downloadAndTranscribeVoice(fileId) {
|
|
147
|
+
const fileRes = await this.api("getFile", { file_id: fileId });
|
|
148
|
+
const filePath = fileRes.result?.file_path;
|
|
149
|
+
if (!filePath) throw new Error("Could not get file path");
|
|
150
|
+
const url = `https://api.telegram.org/file/bot${this.config.token}/${filePath}`;
|
|
151
|
+
const res = await axios.default.get(url, { responseType: "arraybuffer" });
|
|
152
|
+
const buffer = Buffer.from(res.data);
|
|
153
|
+
const { transcribeVoiceNote } = await Promise.resolve().then(() => require("./voice-transcription-ygmlOkky.js"));
|
|
154
|
+
return transcribeVoiceNote(buffer);
|
|
155
|
+
}
|
|
156
|
+
shouldRespondInGroup(msg) {
|
|
157
|
+
const chatType = msg.chat.type || "";
|
|
158
|
+
if (chatType !== "group" && chatType !== "supergroup") return true;
|
|
159
|
+
if ((this.config.activationMode ?? "mention") === "always") return true;
|
|
160
|
+
if (msg.reply_to_message?.from?.is_bot) return true;
|
|
161
|
+
const mention = msg.entities?.find((e) => e.type === "mention" || e.type === "text_mention");
|
|
162
|
+
if (mention && msg.text) {
|
|
163
|
+
const mentioned = msg.text.slice(mention.offset, mention.offset + mention.length);
|
|
164
|
+
if (this.botUsername && mentioned.toLowerCase().includes(this.botUsername.toLowerCase())) return true;
|
|
165
|
+
}
|
|
166
|
+
return false;
|
|
167
|
+
}
|
|
168
|
+
async handleUpdate(update) {
|
|
169
|
+
const msg = update.message;
|
|
170
|
+
if (!msg) return;
|
|
171
|
+
const userId = msg.from?.id;
|
|
172
|
+
if (!userId || !this.isAllowed(userId)) {
|
|
173
|
+
await this.sendMessage(msg.chat.id, "🚫 Unauthorized");
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
if (!this.shouldRespondInGroup(msg)) return;
|
|
177
|
+
let text = msg.text || "";
|
|
178
|
+
let isFromVoice = false;
|
|
179
|
+
if (!text && msg.voice) try {
|
|
180
|
+
await this.sendMessage(msg.chat.id, "🎤 Transcribing...");
|
|
181
|
+
text = await this.downloadAndTranscribeVoice(msg.voice.file_id);
|
|
182
|
+
if (!text || text.startsWith("[")) {
|
|
183
|
+
await this.sendMessage(msg.chat.id, text || "❌ Transcription failed");
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
isFromVoice = true;
|
|
187
|
+
} catch (e) {
|
|
188
|
+
await this.sendMessage(msg.chat.id, `❌ Transcription failed: ${e.message}`);
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
if (!text.trim()) return;
|
|
192
|
+
const { cmd, args } = isFromVoice && !text.startsWith("/") ? {
|
|
193
|
+
cmd: "agent",
|
|
194
|
+
args: text.trim().split(/\s+/)
|
|
195
|
+
} : parseCommand(text);
|
|
196
|
+
const { gatewayUrl, gatewayToken } = this.config;
|
|
197
|
+
let response = "";
|
|
198
|
+
switch (cmd) {
|
|
199
|
+
case "start":
|
|
200
|
+
case "help":
|
|
201
|
+
response = getHelp(this.config.platform);
|
|
202
|
+
break;
|
|
203
|
+
case "status":
|
|
204
|
+
response = await getGatewayStatus(gatewayUrl, gatewayToken);
|
|
205
|
+
break;
|
|
206
|
+
case "logs":
|
|
207
|
+
response = await getLogSummary(parseInt(args[0]) || 20);
|
|
208
|
+
break;
|
|
209
|
+
case "approve":
|
|
210
|
+
if (args.length < 2) {
|
|
211
|
+
response = "❌ Usage: /approve <channel> <code>";
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
response = await approveCode(args[0], args[1]);
|
|
215
|
+
break;
|
|
216
|
+
case "channels":
|
|
217
|
+
response = await listChannels();
|
|
218
|
+
break;
|
|
219
|
+
case "hook":
|
|
220
|
+
if (args[0] === "list" || !args[0]) {
|
|
221
|
+
response = await listHooks();
|
|
222
|
+
break;
|
|
223
|
+
}
|
|
224
|
+
if ((args[0] === "on" || args[0] === "off") && args[1]) {
|
|
225
|
+
const { HookLoader } = await Promise.resolve().then(() => require("./loader-B2jZXMBu.js"));
|
|
226
|
+
const loader = new HookLoader();
|
|
227
|
+
loader.loadState();
|
|
228
|
+
if (args[0] === "on") await loader.enable(args[1]);
|
|
229
|
+
else await loader.disable(args[1]);
|
|
230
|
+
response = `${args[0] === "on" ? "✅" : "⬜"} Hook ${args[0] === "on" ? "enabled" : "disabled"}: ${args[1]}`;
|
|
231
|
+
break;
|
|
232
|
+
}
|
|
233
|
+
response = "❌ Usage: /hook list | /hook on <id> | /hook off <id>";
|
|
234
|
+
break;
|
|
235
|
+
case "restart":
|
|
236
|
+
response = "🔄 Restarting gateway...";
|
|
237
|
+
await this.sendMessage(msg.chat.id, response);
|
|
238
|
+
try {
|
|
239
|
+
const r = await axios.default.post(`${gatewayUrl}/api/remote/restart`, {}, {
|
|
240
|
+
headers: gatewayToken ? { Authorization: `Bearer ${gatewayToken}` } : {},
|
|
241
|
+
timeout: 5e3
|
|
242
|
+
});
|
|
243
|
+
response = (r.data?.restarted ? "✅ Gateway restarted" : r.data?.message) || "✅ Request accepted";
|
|
244
|
+
} catch {
|
|
245
|
+
response = "⚠️ Could not reach gateway to restart";
|
|
246
|
+
}
|
|
247
|
+
break;
|
|
248
|
+
case "agent":
|
|
249
|
+
if (!args.length) {
|
|
250
|
+
response = "❌ Usage: /agent <message>";
|
|
251
|
+
break;
|
|
252
|
+
}
|
|
253
|
+
response = await sendToAgent(args.join(" "), gatewayUrl, gatewayToken, "telegram");
|
|
254
|
+
break;
|
|
255
|
+
case "secrets":
|
|
256
|
+
response = "🔍 Run locally: `hyperclaw secrets audit`";
|
|
257
|
+
break;
|
|
258
|
+
case "security":
|
|
259
|
+
response = "🔐 Run locally: `hyperclaw security audit --deep`";
|
|
260
|
+
break;
|
|
261
|
+
case "activation": {
|
|
262
|
+
const mode = args[0]?.toLowerCase();
|
|
263
|
+
if (mode === "mention" || mode === "always") {
|
|
264
|
+
this.config.activationMode = mode;
|
|
265
|
+
await saveBotConfig(this.config);
|
|
266
|
+
response = `✅ Activation mode set to *${mode}*\n\n` + (mode === "always" ? "🔊 Bot will respond to _all_ messages in groups." : "🔇 Bot will only respond to @mentions and replies in groups.");
|
|
267
|
+
} else {
|
|
268
|
+
const current = this.config.activationMode ?? "mention";
|
|
269
|
+
response = `🎛 *Activation Mode*\n\nCurrent: *${current}*\n\n• /activation mention — respond only to @mentions and replies _(default)_\n• /activation always — respond to all messages in groups`;
|
|
270
|
+
}
|
|
271
|
+
break;
|
|
272
|
+
}
|
|
273
|
+
default: response = `❓ Unknown command: /${cmd}\n\nTry /help`;
|
|
274
|
+
}
|
|
275
|
+
await this.sendMessage(msg.chat.id, response);
|
|
276
|
+
}
|
|
277
|
+
async start() {
|
|
278
|
+
this.running = true;
|
|
279
|
+
try {
|
|
280
|
+
const me = await this.api("getMe");
|
|
281
|
+
this.botUsername = me.result?.username || "";
|
|
282
|
+
} catch {}
|
|
283
|
+
console.log(chalk.default.green("\n ✔ HyperClaw Bot (Telegram) started"));
|
|
284
|
+
console.log(chalk.default.gray(` Polling updates...\n Send /status to your bot to test.\n`));
|
|
285
|
+
while (this.running) try {
|
|
286
|
+
const result = await this.api("getUpdates", {
|
|
287
|
+
offset: this.offset,
|
|
288
|
+
timeout: 30,
|
|
289
|
+
allowed_updates: ["message"]
|
|
290
|
+
});
|
|
291
|
+
for (const update of result.result || []) {
|
|
292
|
+
this.offset = update.update_id + 1;
|
|
293
|
+
await this.handleUpdate(update).catch((e) => console.log(chalk.default.yellow(` ⚠ HyperClaw Bot error: ${e.message}`)));
|
|
294
|
+
}
|
|
295
|
+
} catch {
|
|
296
|
+
await new Promise((r) => setTimeout(r, 3e3));
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
stop() {
|
|
300
|
+
this.running = false;
|
|
301
|
+
}
|
|
302
|
+
};
|
|
303
|
+
var DiscordHyperClawBot = class {
|
|
304
|
+
config;
|
|
305
|
+
client;
|
|
306
|
+
running = false;
|
|
307
|
+
constructor(config) {
|
|
308
|
+
this.config = config;
|
|
309
|
+
this.client = null;
|
|
310
|
+
}
|
|
311
|
+
isAllowed(userId) {
|
|
312
|
+
if (this.config.allowedUsers.length === 0) return true;
|
|
313
|
+
return this.config.allowedUsers.includes(userId);
|
|
314
|
+
}
|
|
315
|
+
async handleCommand(cmd, args, reply) {
|
|
316
|
+
const { gatewayUrl, gatewayToken } = this.config;
|
|
317
|
+
let response = "";
|
|
318
|
+
switch (cmd) {
|
|
319
|
+
case "start":
|
|
320
|
+
case "help":
|
|
321
|
+
response = getHelp("discord");
|
|
322
|
+
break;
|
|
323
|
+
case "status":
|
|
324
|
+
response = (await getGatewayStatus(gatewayUrl, gatewayToken)).replace(/\*/g, "**");
|
|
325
|
+
break;
|
|
326
|
+
case "logs":
|
|
327
|
+
response = (await getLogSummary(parseInt(args[0]) || 20)).replace(/\*/g, "**");
|
|
328
|
+
break;
|
|
329
|
+
case "approve":
|
|
330
|
+
if (args.length < 2) {
|
|
331
|
+
response = "❌ Usage: /approve <channel> <code>";
|
|
332
|
+
break;
|
|
333
|
+
}
|
|
334
|
+
response = await approveCode(args[0], args[1]);
|
|
335
|
+
break;
|
|
336
|
+
case "channels":
|
|
337
|
+
response = (await listChannels()).replace(/\*/g, "**");
|
|
338
|
+
break;
|
|
339
|
+
case "hook":
|
|
340
|
+
if (args[0] === "list" || !args[0]) {
|
|
341
|
+
response = (await listHooks()).replace(/\*/g, "**");
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
if ((args[0] === "on" || args[0] === "off") && args[1]) {
|
|
345
|
+
const { HookLoader } = await Promise.resolve().then(() => require("./loader-B2jZXMBu.js"));
|
|
346
|
+
const loader = new HookLoader();
|
|
347
|
+
loader.loadState();
|
|
348
|
+
if (args[0] === "on") await loader.enable(args[1]);
|
|
349
|
+
else await loader.disable(args[1]);
|
|
350
|
+
response = `${args[0] === "on" ? "✅" : "⬜"} Hook ${args[0] === "on" ? "enabled" : "disabled"}: ${args[1]}`;
|
|
351
|
+
break;
|
|
352
|
+
}
|
|
353
|
+
response = "❌ Usage: /hook list | /hook on <id> | /hook off <id>";
|
|
354
|
+
break;
|
|
355
|
+
case "restart":
|
|
356
|
+
await reply("🔄 Restarting gateway...");
|
|
357
|
+
try {
|
|
358
|
+
const r = await axios.default.post(`${gatewayUrl}/api/remote/restart`, {}, {
|
|
359
|
+
headers: gatewayToken ? { Authorization: `Bearer ${gatewayToken}` } : {},
|
|
360
|
+
timeout: 5e3
|
|
361
|
+
});
|
|
362
|
+
response = (r.data?.restarted ? "✅ Gateway restarted" : r.data?.message) || "✅ Request accepted";
|
|
363
|
+
} catch {
|
|
364
|
+
response = "⚠️ Could not reach gateway to restart";
|
|
365
|
+
}
|
|
366
|
+
break;
|
|
367
|
+
case "agent":
|
|
368
|
+
if (!args.length) {
|
|
369
|
+
response = "❌ Usage: /agent <message>";
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
response = await sendToAgent(args.join(" "), gatewayUrl, gatewayToken, "discord");
|
|
373
|
+
break;
|
|
374
|
+
case "secrets":
|
|
375
|
+
response = "🔍 Run locally: `hyperclaw secrets audit`";
|
|
376
|
+
break;
|
|
377
|
+
case "security":
|
|
378
|
+
response = "🔐 Run locally: `hyperclaw security audit --deep`";
|
|
379
|
+
break;
|
|
380
|
+
case "activation": {
|
|
381
|
+
const mode = args[0]?.toLowerCase();
|
|
382
|
+
if (mode === "mention" || mode === "always") {
|
|
383
|
+
this.config.activationMode = mode;
|
|
384
|
+
await saveBotConfig(this.config);
|
|
385
|
+
response = `✅ Activation mode set to **${mode}**\n` + (mode === "always" ? "🔊 Bot will respond to _all_ messages in groups." : "🔇 Bot will only respond to @mentions and replies in groups.");
|
|
386
|
+
} else {
|
|
387
|
+
const current = this.config.activationMode ?? "mention";
|
|
388
|
+
response = `🎛 **Activation Mode**\nCurrent: **${current}**\n\n• /activation mention — @mentions and replies only _(default)_\n• /activation always — all messages in groups`;
|
|
389
|
+
}
|
|
390
|
+
break;
|
|
391
|
+
}
|
|
392
|
+
default: response = `❓ Unknown command: /${cmd}\n\nTry /help`;
|
|
393
|
+
}
|
|
394
|
+
await reply(response.slice(0, 2e3));
|
|
395
|
+
}
|
|
396
|
+
async start() {
|
|
397
|
+
try {
|
|
398
|
+
const { Client, GatewayIntentBits } = await import("discord.js");
|
|
399
|
+
this.client = new Client({ intents: [
|
|
400
|
+
GatewayIntentBits.Guilds,
|
|
401
|
+
GatewayIntentBits.GuildMessages,
|
|
402
|
+
GatewayIntentBits.DirectMessages,
|
|
403
|
+
GatewayIntentBits.MessageContent
|
|
404
|
+
] });
|
|
405
|
+
this.running = true;
|
|
406
|
+
this.client.on("ready", () => {
|
|
407
|
+
console.log(chalk.default.green(`\n ✔ HyperClaw Bot (Discord) started as ${this.client.user?.tag}`));
|
|
408
|
+
console.log(chalk.default.gray(` Send /status to your bot to test.\n`));
|
|
409
|
+
});
|
|
410
|
+
this.client.on("messageCreate", async (msg) => {
|
|
411
|
+
if (msg.author?.bot) return;
|
|
412
|
+
const userId = msg.author?.id;
|
|
413
|
+
if (!userId || !this.isAllowed(userId)) {
|
|
414
|
+
await msg.reply("🚫 Unauthorized").catch(() => {});
|
|
415
|
+
return;
|
|
416
|
+
}
|
|
417
|
+
const text = (msg.content || "").trim();
|
|
418
|
+
if (!text || !text.startsWith("/")) return;
|
|
419
|
+
const { cmd, args } = parseCommand(text);
|
|
420
|
+
const reply = async (t) => {
|
|
421
|
+
try {
|
|
422
|
+
await msg.reply({ content: t.slice(0, 2e3) });
|
|
423
|
+
} catch (e) {
|
|
424
|
+
console.log(chalk.default.yellow(` ⚠ Discord reply error: ${e.message}`));
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
await this.handleCommand(cmd, args, reply).catch((e) => console.log(chalk.default.yellow(` ⚠ HyperClaw Bot error: ${e.message}`)));
|
|
428
|
+
});
|
|
429
|
+
await this.client.login(this.config.token);
|
|
430
|
+
} catch (e) {
|
|
431
|
+
if (e.code === "MODULE_NOT_FOUND" || e.message?.includes("discord.js")) {
|
|
432
|
+
console.log(chalk.default.red("\n ✖ discord.js not installed. Run: npm install discord.js\n"));
|
|
433
|
+
process.exit(1);
|
|
434
|
+
}
|
|
435
|
+
throw e;
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
stop() {
|
|
439
|
+
this.running = false;
|
|
440
|
+
if (this.client) {
|
|
441
|
+
this.client.destroy().catch(() => {});
|
|
442
|
+
this.client = null;
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
async function loadBotConfig() {
|
|
447
|
+
try {
|
|
448
|
+
const cfg = await fs_extra.default.readJson(getBotConfigFile());
|
|
449
|
+
return cfg;
|
|
450
|
+
} catch {
|
|
451
|
+
try {
|
|
452
|
+
for (const p of [path.default.join(require_paths.getHyperClawDir(), "hyperclaw-bot.json"), path.default.join(require_paths.getHyperClawDir(), "bot-config.json")]) if (await fs_extra.default.pathExists(p)) return await fs_extra.default.readJson(p);
|
|
453
|
+
} catch {}
|
|
454
|
+
return null;
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
async function saveBotConfig(config) {
|
|
458
|
+
const botCfg = getBotConfigFile();
|
|
459
|
+
await fs_extra.default.ensureDir(path.default.dirname(botCfg));
|
|
460
|
+
await fs_extra.default.writeJson(botCfg, config, { spaces: 2 });
|
|
461
|
+
await fs_extra.default.chmod(botCfg, 384);
|
|
462
|
+
}
|
|
463
|
+
async function stopBotProcess() {
|
|
464
|
+
try {
|
|
465
|
+
const pidFile = getBotPidFile();
|
|
466
|
+
if (!await fs_extra.default.pathExists(pidFile)) return false;
|
|
467
|
+
const pid = parseInt(await fs_extra.default.readFile(pidFile, "utf8"), 10);
|
|
468
|
+
if (isNaN(pid)) return false;
|
|
469
|
+
try {
|
|
470
|
+
process.kill(pid, "SIGTERM");
|
|
471
|
+
} catch {}
|
|
472
|
+
await fs_extra.default.remove(getBotPidFile());
|
|
473
|
+
return true;
|
|
474
|
+
} catch {
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
478
|
+
async function writeBotPid(pid) {
|
|
479
|
+
const pidFile = getBotPidFile();
|
|
480
|
+
await fs_extra.default.ensureDir(path.default.dirname(pidFile));
|
|
481
|
+
await fs_extra.default.writeFile(pidFile, String(pid), "utf8");
|
|
482
|
+
}
|
|
483
|
+
async function showBotStatus() {
|
|
484
|
+
const cfg = await loadBotConfig();
|
|
485
|
+
console.log(chalk.default.bold.cyan("\n 🦅 HYPERCLAW BOT\n"));
|
|
486
|
+
if (!cfg || !cfg.enabled) {
|
|
487
|
+
console.log(chalk.default.gray(" HyperClaw Bot is not configured.\n"));
|
|
488
|
+
console.log(chalk.default.gray(" Setup: hyperclaw bot setup\n"));
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
console.log(` ${chalk.default.green("●")} ${chalk.default.white(cfg.platform === "telegram" ? "Telegram" : "Discord")} bot`);
|
|
492
|
+
console.log(` ${chalk.default.gray("Token:")} ${cfg.token.slice(0, 8)}...`);
|
|
493
|
+
console.log(` ${chalk.default.gray("Gateway:")} ${cfg.gatewayUrl}`);
|
|
494
|
+
console.log(` ${chalk.default.gray("Allowed users:")} ${cfg.allowedUsers.length === 0 ? "(anyone)" : cfg.allowedUsers.join(", ")}`);
|
|
495
|
+
console.log(` ${chalk.default.gray("Status:")} ${cfg.enabled ? chalk.default.green("enabled") : chalk.default.gray("disabled")}`);
|
|
496
|
+
console.log();
|
|
497
|
+
console.log(chalk.default.gray(" Commands: hyperclaw bot start | stop | setup"));
|
|
498
|
+
console.log();
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
//#endregion
|
|
502
|
+
exports.DiscordHyperClawBot = DiscordHyperClawBot;
|
|
503
|
+
exports.TelegramHyperClawBot = TelegramHyperClawBot;
|
|
504
|
+
exports.loadBotConfig = loadBotConfig;
|
|
505
|
+
exports.saveBotConfig = saveBotConfig;
|
|
506
|
+
exports.showBotStatus = showBotStatus;
|
|
507
|
+
exports.stopBotProcess = stopBotProcess;
|
|
508
|
+
exports.writeBotPid = writeBotPid;
|