@captain-app/openclaw 2026.2.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/CHANGELOG.md +1528 -0
- package/LICENSE +21 -0
- package/README-header.png +0 -0
- package/README.md +539 -0
- package/assets/avatar-placeholder.svg +19 -0
- package/assets/chrome-extension/README.md +22 -0
- package/assets/chrome-extension/background.js +438 -0
- package/assets/chrome-extension/icons/icon128.png +0 -0
- package/assets/chrome-extension/icons/icon16.png +0 -0
- package/assets/chrome-extension/icons/icon32.png +0 -0
- package/assets/chrome-extension/icons/icon48.png +0 -0
- package/assets/chrome-extension/manifest.json +25 -0
- package/assets/chrome-extension/options.html +196 -0
- package/assets/chrome-extension/options.js +59 -0
- package/assets/dmg-background-small.png +0 -0
- package/assets/dmg-background.png +0 -0
- package/dist/accounts-ClnuDahN.js +250 -0
- package/dist/accounts-DzBgAM3C.js +251 -0
- package/dist/acp-cli-BEDDkzXH.js +926 -0
- package/dist/acp-cli-CwV4mdnW.js +923 -0
- package/dist/agent-CArjbSeE.js +695 -0
- package/dist/agent-CB7x5HLT.js +695 -0
- package/dist/agent-scope-BbT4OG2N.js +545 -0
- package/dist/agent-scope-C_O6Vpl0.js +545 -0
- package/dist/agent-scope-Csu2B6AM.js +606 -0
- package/dist/archive-CWrnG1CH.js +85 -0
- package/dist/archive-ccN9aDgq.js +85 -0
- package/dist/audit-DXPkQ275.js +1686 -0
- package/dist/audit-eH7nwgsM.js +1686 -0
- package/dist/auth-health-Bj7Gjbv0.js +149 -0
- package/dist/auth-health-CjjJhHey.js +149 -0
- package/dist/auth-nnRYiqpH.js +192 -0
- package/dist/auth-profiles-DVLfuixr.js +2954 -0
- package/dist/auth-y1BLPUhX.js +192 -0
- package/dist/boolean-Wzu0-e0P.js +30 -0
- package/dist/brew-Cqi8b49_.js +46 -0
- package/dist/brew-DyBGNK8A.js +46 -0
- package/dist/build-info.json +5 -0
- package/dist/call-B7EveN4V.js +252 -0
- package/dist/call-vuUQIjOj.js +252 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -0
- package/dist/canvas-host/a2ui/a2ui.bundle.js +17780 -0
- package/dist/canvas-host/a2ui/index.html +307 -0
- package/dist/channel-options-CJfmOkol.js +32 -0
- package/dist/channel-options-lFguMTz1.js +62 -0
- package/dist/channel-selection-BmND9mWj.js +51 -0
- package/dist/channel-selection-cGhL9G0c.js +51 -0
- package/dist/channel-summary-B4G513Eb.js +1154 -0
- package/dist/channel-summary-MCwBCa5y.js +1154 -0
- package/dist/channels-cli-C2Of1mZG.js +1411 -0
- package/dist/channels-cli-DFynrP1H.js +1413 -0
- package/dist/channels-status-issues-YohTjZ-I.js +18 -0
- package/dist/channels-status-issues-ZcR1U-m5.js +18 -0
- package/dist/chrome-B3IuUad-.js +1953 -0
- package/dist/chrome-BZ9K48w9.js +1973 -0
- package/dist/clack-prompter-B9yLhyOm.js +92 -0
- package/dist/clack-prompter-BybM9xdL.js +92 -0
- package/dist/cli/daemon-cli.js +2 -0
- package/dist/cli-BJZdJwug.js +89 -0
- package/dist/cli-BQSoKu3d.js +86 -0
- package/dist/cli-utils-CO4jEMn0.js +43 -0
- package/dist/cli-utils-gtE-0a0D.js +43 -0
- package/dist/client-DPqNOpK3.js +1609 -0
- package/dist/client-DySXIFCA.js +1609 -0
- package/dist/command-format-CFzL448l.js +52 -0
- package/dist/command-format-DELazozB.js +52 -0
- package/dist/command-format-ayFsmwwz.js +38 -0
- package/dist/command-options-CsjxK4cZ.js +33 -0
- package/dist/commands-BRe9VTyU.js +229 -0
- package/dist/completion-cli-DlkjK0iC.js +390 -0
- package/dist/completion-cli-E6Pt41AL.js +387 -0
- package/dist/config-BtSTwPcH.js +4882 -0
- package/dist/config-DfMIMT-f.js +4881 -0
- package/dist/config-_d7_WcRv.js +5623 -0
- package/dist/config-guard-wSnm-U8a.js +5628 -0
- package/dist/configure-CPHAFKlg.js +895 -0
- package/dist/configure-DK1XgXYx.js +894 -0
- package/dist/constants-CNTiY-ZN.js +65 -0
- package/dist/constants-hpmbslG7.js +65 -0
- package/dist/control-service-CqX5g_ko.js +61 -0
- package/dist/control-service-o6xe3hEb.js +61 -0
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/index-RwcW4Xl0.css +1 -0
- package/dist/control-ui/assets/index-ryaCcbyp.js +4584 -0
- package/dist/control-ui/assets/index-ryaCcbyp.js.map +1 -0
- package/dist/control-ui/favicon-32.png +0 -0
- package/dist/control-ui/favicon.ico +0 -0
- package/dist/control-ui/favicon.svg +22 -0
- package/dist/control-ui/index.html +17 -0
- package/dist/cron-cli-BoSaDgvH.js +453 -0
- package/dist/cron-cli-qVandvsD.js +456 -0
- package/dist/daemon-cli-C4gGWa15.js +760 -0
- package/dist/daemon-cli-DV_X0Krf.js +761 -0
- package/dist/daemon-runtime-D5hbSrdO.js +460 -0
- package/dist/daemon-runtime-DXUfrXBC.js +460 -0
- package/dist/deliver-BxK5nI2P.js +2587 -0
- package/dist/deliver-Dwzg9LUd.js +2557 -0
- package/dist/deliver-qpYZp20m.js +2587 -0
- package/dist/deps-CUXtMV9d.js +27 -0
- package/dist/deps-WBvZpFV_.js +27 -0
- package/dist/devices-cli-B2s18Qrh.js +207 -0
- package/dist/devices-cli-D1UEtMUJ.js +204 -0
- package/dist/directory-cli-BXQbrkfM.js +247 -0
- package/dist/directory-cli-CqA7tRbq.js +244 -0
- package/dist/dispatcher-Dyv7T-1r.js +160 -0
- package/dist/dns-cli-CWxKD22D.js +198 -0
- package/dist/dns-cli-CzKr_Fxj.js +201 -0
- package/dist/docs-cli-BNyxUbWr.js +159 -0
- package/dist/docs-cli-DYpTbo3i.js +161 -0
- package/dist/doctor-C8fDYZLq.js +2583 -0
- package/dist/doctor-hYcqp7c0.js +2585 -0
- package/dist/entry.js +1326 -0
- package/dist/env-l7QVNj6j.js +32 -0
- package/dist/errors-CMCg46fK.js +1952 -0
- package/dist/exec-B8JKbXKW.js +246 -0
- package/dist/exec-BMnoMcZW.js +1099 -0
- package/dist/exec-HEWTMJ7j.js +246 -0
- package/dist/exec-approvals-DtrnHx6M.js +1026 -0
- package/dist/exec-approvals-Y42bE8ud.js +1026 -0
- package/dist/exec-approvals-cli-CIedYxP3.js +385 -0
- package/dist/exec-approvals-cli-xpbxnj4O.js +388 -0
- package/dist/extensionAPI.js +66572 -0
- package/dist/format-Dzy9uRLE.js +34 -0
- package/dist/format-sj0fELBK.js +34 -0
- package/dist/gateway-cli-5A-KNLEC.js +16635 -0
- package/dist/gateway-cli-B8kS4chb.js +16637 -0
- package/dist/gateway-rpc-15n38Ize.js +28 -0
- package/dist/gateway-rpc-TMVRgGfj.js +28 -0
- package/dist/github-copilot-auth-DVZj4Zgh.js +1104 -0
- package/dist/github-copilot-auth-DeGYyLY9.js +1104 -0
- package/dist/github-copilot-token-B3SA95yo.js +103 -0
- package/dist/github-copilot-token-C8XFYz0i.js +103 -0
- package/dist/github-copilot-token-CnxakiSC.js +103 -0
- package/dist/gmail-setup-utils-CWPC386a.js +428 -0
- package/dist/gmail-setup-utils-eJVB5Ewp.js +428 -0
- package/dist/health-format-B0tMTk3C.js +1189 -0
- package/dist/health-format-DaURVaUn.js +1188 -0
- package/dist/help-format-CEsRHU2f.js +17 -0
- package/dist/help-format-GuCWws6r.js +17 -0
- package/dist/helpers-BEJ-phFf.js +25 -0
- package/dist/helpers-BtbBZVKZ.js +10 -0
- package/dist/helpers-C12w9zxf.js +10 -0
- package/dist/helpers-CzjGJZmJ.js +25 -0
- package/dist/hooks/bundled/boot-md/HOOK.md +19 -0
- package/dist/hooks/bundled/command-logger/HOOK.md +122 -0
- package/dist/hooks/bundled/session-memory/HOOK.md +109 -0
- package/dist/hooks/bundled/soul-evil/HOOK.md +71 -0
- package/dist/hooks-cli-BZCMAnW2.js +1058 -0
- package/dist/hooks-cli-D0CEFg3P.js +1061 -0
- package/dist/hooks-status-Bn7_O8PM.js +443 -0
- package/dist/hooks-status-BrWVfIn0.js +443 -0
- package/dist/image-BS022pvv.js +1421 -0
- package/dist/image-BzJtY34J.js +629 -0
- package/dist/image-CBqmIbQQ.js +629 -0
- package/dist/index.js +5809 -0
- package/dist/installs-BP4K5L33.js +388 -0
- package/dist/installs-DOpTt7VZ.js +388 -0
- package/dist/is-main-B4o72sqg.js +25 -0
- package/dist/is-main-PYGa3tDA.js +25 -0
- package/dist/links-B4nk2iDf.js +15 -0
- package/dist/links-DwjRqxgR.js +15 -0
- package/dist/loader-Cn4EV_pf.js +63690 -0
- package/dist/logging-CS3tbYDj.js +15 -0
- package/dist/logging-CY-Q5cwf.js +1 -0
- package/dist/logging-DhiLkhLw.js +15 -0
- package/dist/logging-pqyrk15z.js +1 -0
- package/dist/login-qr-CD164Aw1.js +478 -0
- package/dist/login-qr-D7Zdgji2.js +478 -0
- package/dist/login-qr-YgILJ4VC.js +475 -0
- package/dist/logs-cli-BdS0Uv0I.js +227 -0
- package/dist/logs-cli-CqSN1GzB.js +230 -0
- package/dist/manager-CfGY5zND.js +2870 -0
- package/dist/manager-CjuBqFRL.js +2870 -0
- package/dist/manager-CoBEAQKm.js +2872 -0
- package/dist/manifest-registry-Bwjq9Iev.js +668 -0
- package/dist/manifest-registry-D2Yntqcb.js +668 -0
- package/dist/message-channel-Cjsiqxok.js +105 -0
- package/dist/message-channel-D6v_oPAg.js +105 -0
- package/dist/model-selection-Cv5Ox_tY.js +2956 -0
- package/dist/model-selection-Dr-5U5-l.js +2708 -0
- package/dist/models-cli-B39ckynD.js +2541 -0
- package/dist/models-cli-DoiYsBYw.js +2544 -0
- package/dist/net-CFCxaipF.js +137 -0
- package/dist/net-DKJPqXuW.js +137 -0
- package/dist/node-cli-C_FYF-RA.js +1456 -0
- package/dist/node-cli-DWPoNsQS.js +1459 -0
- package/dist/node-service-DcJREOww.js +67 -0
- package/dist/node-service-DuZ9Us9h.js +67 -0
- package/dist/nodes-cli-Elo6tlen.js +1210 -0
- package/dist/nodes-cli-zqryRUWB.js +1207 -0
- package/dist/nodes-screen-C4aCrxie.js +157 -0
- package/dist/nodes-screen-D4PSynkR.js +157 -0
- package/dist/note-CQhSvgQv.js +73 -0
- package/dist/note-_C44YfAQ.js +73 -0
- package/dist/onboard-channels-CHBDi-ZA.js +670 -0
- package/dist/onboard-channels-DOEKyxaL.js +670 -0
- package/dist/onboard-skills-BUTXREDZ.js +3327 -0
- package/dist/onboard-skills-CSLYZmZA.js +3327 -0
- package/dist/onboarding-CgKb8b39.js +3232 -0
- package/dist/openclaw-root-9ILYSmJ9.js +84 -0
- package/dist/openclaw-root-Cvotktkd.js +84 -0
- package/dist/pairing-cli-B4UGR2at.js +114 -0
- package/dist/pairing-cli-BWDDl8cf.js +117 -0
- package/dist/pairing-labels-ClZ-fTWT.js +9 -0
- package/dist/pairing-labels-Ds7BPOkj.js +9 -0
- package/dist/pairing-store-DDLNuzmx.js +391 -0
- package/dist/pairing-store-DRn08lZD.js +391 -0
- package/dist/parse-87ybtYW1.js +23 -0
- package/dist/parse-OCFfznr3.js +23 -0
- package/dist/parse-log-line-C9aL5PUL.js +44 -0
- package/dist/parse-log-line-DxRaGzQb.js +44 -0
- package/dist/parse-timeout-CFqNj7No.js +16 -0
- package/dist/parse-timeout-DV8NQQWk.js +16 -0
- package/dist/path-env-C7kiJUgG.js +77 -0
- package/dist/path-env-DEj4CiFN.js +77 -0
- package/dist/paths-B-q1nXdY.js +43 -0
- package/dist/paths-B1kfl4h5.js +164 -0
- package/dist/paths-B4kigINg.js +40 -0
- package/dist/paths-CHGbP1-A.js +43 -0
- package/dist/paths-scjhy7N2.js +180 -0
- package/dist/pi-embedded-helpers-C19wUpMB.js +8451 -0
- package/dist/pi-embedded-helpers-CT5VuLCb.js +1293 -0
- package/dist/pi-embedded-helpers-Dl8e5Rf8.js +1293 -0
- package/dist/pi-model-discovery-B6CsmK6Y.js +20 -0
- package/dist/pi-model-discovery-DsRqYJLy.js +20 -0
- package/dist/pi-model-discovery-EhM2JAQo.js +20 -0
- package/dist/pi-tools.policy-BvkSDFDN.js +229 -0
- package/dist/plugin-auto-enable-Bd_StZzz.js +461 -0
- package/dist/plugin-auto-enable-DBhXb_0x.js +461 -0
- package/dist/plugin-sdk/agent-scope-DdwUKIOe.js +606 -0
- package/dist/plugin-sdk/chrome-G8apFa5p.js +1953 -0
- package/dist/plugin-sdk/command-format-qUVxzqYm.js +52 -0
- package/dist/plugin-sdk/config-Cm1M7tgH.js +5623 -0
- package/dist/plugin-sdk/deliver-Cl8uowiO.js +2557 -0
- package/dist/plugin-sdk/exec-Cm9b2r9Q.js +1107 -0
- package/dist/plugin-sdk/github-copilot-token-BHNcM4_B.js +103 -0
- package/dist/plugin-sdk/image-7PgoS2VD.js +1421 -0
- package/dist/plugin-sdk/index.d.ts +8908 -0
- package/dist/plugin-sdk/index.js +70888 -0
- package/dist/plugin-sdk/login-qr-qTALvWi2.js +475 -0
- package/dist/plugin-sdk/manager-Cs3EQZCb.js +2870 -0
- package/dist/plugin-sdk/model-selection-BgC1E1a7.js +2708 -0
- package/dist/plugin-sdk/paths-BYpoyRv5.js +164 -0
- package/dist/plugin-sdk/paths-DNQE-bvr.js +40 -0
- package/dist/plugin-sdk/pi-embedded-helpers-5jNqW_dE.js +8755 -0
- package/dist/plugin-sdk/pi-model-discovery-BUGEht9A.js +20 -0
- package/dist/plugin-sdk/pw-ai-COTtei4a.js +1649 -0
- package/dist/plugin-sdk/qmd-manager-ClSwiAJl.js +615 -0
- package/dist/plugin-sdk/redact-2AzjOfk2.js +94 -0
- package/dist/plugin-sdk/rolldown-runtime-Cbj13DAv.js +20 -0
- package/dist/plugin-sdk/sqlite-gCW7MlLs.js +215 -0
- package/dist/plugin-sdk/transcript-events-DGF257vD.js +17 -0
- package/dist/plugins-C3Bm-HQV.js +494 -0
- package/dist/plugins-QJjTXliB.js +495 -0
- package/dist/plugins-cli-DTci0JQb.js +443 -0
- package/dist/plugins-cli-wJsN1HHK.js +440 -0
- package/dist/ports-CiW9dmMq.js +96 -0
- package/dist/program-BWpTHh1I.js +188 -0
- package/dist/progress-Bcjniu7m.js +133 -0
- package/dist/progress-CvaSPjS9.js +133 -0
- package/dist/prompt-style-CFsleyxV.js +9 -0
- package/dist/prompt-style-DYJdrXyV.js +9 -0
- package/dist/prompts-Bt9fwsg2.js +10 -0
- package/dist/prompts-CudpZgTI.js +10 -0
- package/dist/pw-ai-08F3GD-3.js +1649 -0
- package/dist/pw-ai-ZmHxHQnx.js +1651 -0
- package/dist/pw-ai-tNPuRNn3.js +1649 -0
- package/dist/qmd-manager-2r-4n3sP.js +617 -0
- package/dist/qmd-manager-CF52nuBg.js +615 -0
- package/dist/qmd-manager-HEm5H2mk.js +616 -0
- package/dist/redact-BICFkpn7.js +97 -0
- package/dist/redact-BIMJ3ntQ.js +94 -0
- package/dist/redact-KzWHRS5J.js +97 -0
- package/dist/register.subclis-D2K25c84.js +348 -0
- package/dist/register.subclis-Dd8LbOLi.js +342 -0
- package/dist/reply-5UNWRwMn.js +63693 -0
- package/dist/restart-sentinel-Cr0vUxB8.js +65 -0
- package/dist/restart-sentinel-DUemCjgU.js +65 -0
- package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
- package/dist/routes-C6UpTPas.js +2410 -0
- package/dist/routes-ClNyEvlm.js +2410 -0
- package/dist/rpc-D0mf7DIw.js +95 -0
- package/dist/rpc-DYdOrgd9.js +95 -0
- package/dist/run-main-CojI7gWx.js +194 -0
- package/dist/runtime-guard-68M_evhb.js +60 -0
- package/dist/runtime-guard-DkjmhnBD.js +60 -0
- package/dist/sandbox-Ca81z3Tw.js +2924 -0
- package/dist/sandbox-cli-D75GApgp.js +459 -0
- package/dist/sandbox-cli-E4SJsC1C.js +462 -0
- package/dist/sandbox-knontqD9.js +2925 -0
- package/dist/security-cli-BLihvXO-.js +503 -0
- package/dist/security-cli-IGQCsK4g.js +506 -0
- package/dist/server-context-B9GX5GOI.js +740 -0
- package/dist/server-context-BFH7HB_M.js +740 -0
- package/dist/server-node-events-CTdHBiEA.js +218 -0
- package/dist/server-node-events-DAV14qPr.js +215 -0
- package/dist/service-BZNBq9hq.js +680 -0
- package/dist/service-C-BLXx9U.js +680 -0
- package/dist/service-audit-BfJv4NqZ.js +542 -0
- package/dist/service-audit-Bw3M2OEI.js +542 -0
- package/dist/shared-5SH-45AX.js +74 -0
- package/dist/shared-BxRm5uLU.js +74 -0
- package/dist/shared-C80Rmxsd.js +150 -0
- package/dist/shared-fGK6_D2v.js +150 -0
- package/dist/skills-Bhp0l6UK.js +693 -0
- package/dist/skills-Tky2kCMO.js +694 -0
- package/dist/skills-cli-6rCClAE4.js +287 -0
- package/dist/skills-cli-C4nLCrLw.js +290 -0
- package/dist/skills-status-CENcKr3I.js +187 -0
- package/dist/skills-status-DX1eUYvk.js +187 -0
- package/dist/sqlite-CmdZSZRx.js +197 -0
- package/dist/sqlite-Dnmf3LS7.js +215 -0
- package/dist/sqlite-QDf0yuU0.js +215 -0
- package/dist/status-BSfGAp2D.js +27 -0
- package/dist/status-Bp_2NMjt.js +27 -0
- package/dist/status-C0ANDr0T.js +3140 -0
- package/dist/status-CCHBIZnm.js +21 -0
- package/dist/status-Vuqbw2Bb.js +21 -0
- package/dist/status.update-BZW5r8Su.js +79 -0
- package/dist/status.update-BnD93_O8.js +79 -0
- package/dist/subsystem-CAq3uyo7.js +834 -0
- package/dist/system-cli-Bb9zmCO1.js +83 -0
- package/dist/system-cli-TIIQ04ls.js +80 -0
- package/dist/systemd-0Qa_nGqe.js +438 -0
- package/dist/systemd-Czb0Xsm7.js +438 -0
- package/dist/systemd-hints-CWoEOQRb.js +19 -0
- package/dist/systemd-hints-Cv3RN_mZ.js +19 -0
- package/dist/systemd-linger-CsdvcIoS.js +75 -0
- package/dist/systemd-linger-DKUFHcLn.js +75 -0
- package/dist/table-DNPESyNj.js +279 -0
- package/dist/table-DS4-gmkV.js +279 -0
- package/dist/tailnet-Bg_vE5qi.js +42 -0
- package/dist/tailnet-CrNWlQRJ.js +42 -0
- package/dist/tailscale-CBv58toW.js +252 -0
- package/dist/tailscale-DCnMs7_q.js +225 -0
- package/dist/tool-display-BEACy9rK.js +795 -0
- package/dist/tool-display-NYQnSpdo.js +795 -0
- package/dist/transcript-events-CsB1Saa6.js +17 -0
- package/dist/transcript-events-DDYvbmRV.js +17 -0
- package/dist/transcript-events-JLH5W4He.js +17 -0
- package/dist/tui--NY0rnjr.js +2542 -0
- package/dist/tui-DqJfGtvM.js +2543 -0
- package/dist/tui-cli-BuHNY6wF.js +54 -0
- package/dist/tui-cli-LMFV982e.js +57 -0
- package/dist/update-CRpHtCgz.js +317 -0
- package/dist/update-D3qruxhj.js +317 -0
- package/dist/update-cli-CFF-pslM.js +948 -0
- package/dist/update-cli-cn9pEMX7.js +951 -0
- package/dist/update-runner-CxGU142L.js +1221 -0
- package/dist/update-runner-DNobz_ft.js +1221 -0
- package/dist/utils-CKSrBNwq.js +192 -0
- package/dist/utils-DX85MiPR.js +188 -0
- package/dist/webhooks-cli-BGtt2HAR.js +312 -0
- package/dist/webhooks-cli-DHLZrEO_.js +309 -0
- package/dist/widearea-dns-BpG7ATO8.js +127 -0
- package/dist/widearea-dns-D4wkCJly.js +127 -0
- package/dist/ws-3zr8WUwL.js +13 -0
- package/dist/ws-log-BXcT2xQk.js +267 -0
- package/dist/ws-log-DbDIUsgz.js +267 -0
- package/dist/ws-lzrgabja.js +13 -0
- package/dist/wsl-D2O2qOrl.js +160 -0
- package/docs/.i18n/README.md +31 -0
- package/docs/.i18n/glossary.zh-CN.json +190 -0
- package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
- package/docs/CNAME +1 -0
- package/docs/_config.yml +53 -0
- package/docs/_layouts/default.html +145 -0
- package/docs/assets/markdown.css +179 -0
- package/docs/assets/openclaw-logo-text-dark.png +0 -0
- package/docs/assets/openclaw-logo-text.png +0 -0
- package/docs/assets/pixel-lobster.svg +60 -0
- package/docs/assets/showcase/agents-ui.jpg +0 -0
- package/docs/assets/showcase/bambu-cli.png +0 -0
- package/docs/assets/showcase/codexmonitor.png +0 -0
- package/docs/assets/showcase/gohome-grafana.png +0 -0
- package/docs/assets/showcase/ios-testflight.jpg +0 -0
- package/docs/assets/showcase/oura-health.png +0 -0
- package/docs/assets/showcase/padel-cli.svg +11 -0
- package/docs/assets/showcase/padel-screenshot.jpg +0 -0
- package/docs/assets/showcase/papla-tts.jpg +0 -0
- package/docs/assets/showcase/pr-review-telegram.jpg +0 -0
- package/docs/assets/showcase/roborock-screenshot.jpg +0 -0
- package/docs/assets/showcase/roborock-status.svg +13 -0
- package/docs/assets/showcase/roof-camera-sky.jpg +0 -0
- package/docs/assets/showcase/snag.png +0 -0
- package/docs/assets/showcase/tesco-shop.jpg +0 -0
- package/docs/assets/showcase/wienerlinien.png +0 -0
- package/docs/assets/showcase/wine-cellar-skill.jpg +0 -0
- package/docs/assets/showcase/winix-air-purifier.jpg +0 -0
- package/docs/assets/showcase/xuezh-pronunciation.jpeg +0 -0
- package/docs/assets/terminal.css +473 -0
- package/docs/assets/theme.js +55 -0
- package/docs/automation/auth-monitoring.md +44 -0
- package/docs/automation/cron-jobs.md +468 -0
- package/docs/automation/cron-vs-heartbeat.md +282 -0
- package/docs/automation/gmail-pubsub.md +256 -0
- package/docs/automation/poll.md +69 -0
- package/docs/automation/webhook.md +163 -0
- package/docs/bedrock.md +176 -0
- package/docs/brave-search.md +41 -0
- package/docs/broadcast-groups.md +442 -0
- package/docs/channels/bluebubbles.md +338 -0
- package/docs/channels/discord.md +475 -0
- package/docs/channels/feishu.md +507 -0
- package/docs/channels/googlechat.md +250 -0
- package/docs/channels/grammy.md +31 -0
- package/docs/channels/imessage.md +299 -0
- package/docs/channels/index.md +46 -0
- package/docs/channels/line.md +186 -0
- package/docs/channels/location.md +56 -0
- package/docs/channels/matrix.md +233 -0
- package/docs/channels/mattermost.md +138 -0
- package/docs/channels/msteams.md +768 -0
- package/docs/channels/nextcloud-talk.md +136 -0
- package/docs/channels/nostr.md +233 -0
- package/docs/channels/signal.md +202 -0
- package/docs/channels/slack.md +548 -0
- package/docs/channels/telegram.md +750 -0
- package/docs/channels/tlon.md +132 -0
- package/docs/channels/troubleshooting.md +29 -0
- package/docs/channels/twitch.md +379 -0
- package/docs/channels/whatsapp.md +404 -0
- package/docs/channels/zalo.md +189 -0
- package/docs/channels/zalouser.md +140 -0
- package/docs/cli/acp.md +170 -0
- package/docs/cli/agent.md +24 -0
- package/docs/cli/agents.md +75 -0
- package/docs/cli/approvals.md +50 -0
- package/docs/cli/browser.md +107 -0
- package/docs/cli/channels.md +79 -0
- package/docs/cli/config.md +50 -0
- package/docs/cli/configure.md +33 -0
- package/docs/cli/cron.md +42 -0
- package/docs/cli/dashboard.md +16 -0
- package/docs/cli/devices.md +67 -0
- package/docs/cli/directory.md +63 -0
- package/docs/cli/dns.md +23 -0
- package/docs/cli/docs.md +15 -0
- package/docs/cli/doctor.md +41 -0
- package/docs/cli/gateway.md +199 -0
- package/docs/cli/health.md +21 -0
- package/docs/cli/hooks.md +304 -0
- package/docs/cli/index.md +1029 -0
- package/docs/cli/logs.md +24 -0
- package/docs/cli/memory.md +45 -0
- package/docs/cli/message.md +239 -0
- package/docs/cli/models.md +79 -0
- package/docs/cli/node.md +112 -0
- package/docs/cli/nodes.md +73 -0
- package/docs/cli/onboard.md +29 -0
- package/docs/cli/pairing.md +21 -0
- package/docs/cli/plugins.md +62 -0
- package/docs/cli/reset.md +17 -0
- package/docs/cli/sandbox.md +152 -0
- package/docs/cli/security.md +26 -0
- package/docs/cli/sessions.md +16 -0
- package/docs/cli/setup.md +29 -0
- package/docs/cli/skills.md +26 -0
- package/docs/cli/status.md +26 -0
- package/docs/cli/system.md +60 -0
- package/docs/cli/tui.md +23 -0
- package/docs/cli/uninstall.md +17 -0
- package/docs/cli/update.md +98 -0
- package/docs/cli/voicecall.md +34 -0
- package/docs/cli/webhooks.md +25 -0
- package/docs/concepts/agent-loop.md +146 -0
- package/docs/concepts/agent-workspace.md +233 -0
- package/docs/concepts/agent.md +123 -0
- package/docs/concepts/architecture.md +129 -0
- package/docs/concepts/channel-routing.md +114 -0
- package/docs/concepts/compaction.md +61 -0
- package/docs/concepts/context.md +161 -0
- package/docs/concepts/group-messages.md +84 -0
- package/docs/concepts/groups.md +373 -0
- package/docs/concepts/markdown-formatting.md +130 -0
- package/docs/concepts/memory.md +546 -0
- package/docs/concepts/messages.md +154 -0
- package/docs/concepts/model-failover.md +149 -0
- package/docs/concepts/model-providers.md +316 -0
- package/docs/concepts/models.md +208 -0
- package/docs/concepts/multi-agent.md +376 -0
- package/docs/concepts/oauth.md +145 -0
- package/docs/concepts/presence.md +102 -0
- package/docs/concepts/queue.md +89 -0
- package/docs/concepts/retry.md +69 -0
- package/docs/concepts/session-pruning.md +122 -0
- package/docs/concepts/session-tool.md +193 -0
- package/docs/concepts/session.md +188 -0
- package/docs/concepts/sessions.md +10 -0
- package/docs/concepts/streaming.md +135 -0
- package/docs/concepts/system-prompt.md +115 -0
- package/docs/concepts/timezone.md +91 -0
- package/docs/concepts/typebox.md +289 -0
- package/docs/concepts/typing-indicators.md +68 -0
- package/docs/concepts/usage-tracking.md +35 -0
- package/docs/date-time.md +128 -0
- package/docs/debug/node-issue.md +83 -0
- package/docs/debugging.md +162 -0
- package/docs/diagnostics/flags.md +91 -0
- package/docs/docs.json +1587 -0
- package/docs/environment.md +81 -0
- package/docs/experiments/onboarding-config-protocol.md +40 -0
- package/docs/experiments/plans/cron-add-hardening.md +63 -0
- package/docs/experiments/plans/group-policy-hardening.md +40 -0
- package/docs/experiments/plans/openresponses-gateway.md +123 -0
- package/docs/experiments/proposals/model-config.md +36 -0
- package/docs/experiments/research/memory.md +228 -0
- package/docs/gateway/authentication.md +145 -0
- package/docs/gateway/background-process.md +93 -0
- package/docs/gateway/bonjour.md +167 -0
- package/docs/gateway/bridge-protocol.md +89 -0
- package/docs/gateway/cli-backends.md +223 -0
- package/docs/gateway/configuration-examples.md +606 -0
- package/docs/gateway/configuration.md +3393 -0
- package/docs/gateway/discovery.md +116 -0
- package/docs/gateway/doctor.md +282 -0
- package/docs/gateway/gateway-lock.md +34 -0
- package/docs/gateway/health.md +35 -0
- package/docs/gateway/heartbeat.md +302 -0
- package/docs/gateway/index.md +328 -0
- package/docs/gateway/local-models.md +150 -0
- package/docs/gateway/logging.md +113 -0
- package/docs/gateway/multiple-gateways.md +112 -0
- package/docs/gateway/openai-http-api.md +118 -0
- package/docs/gateway/openresponses-http-api.md +317 -0
- package/docs/gateway/pairing.md +99 -0
- package/docs/gateway/protocol.md +221 -0
- package/docs/gateway/remote-gateway-readme.md +157 -0
- package/docs/gateway/remote.md +127 -0
- package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +128 -0
- package/docs/gateway/sandboxing.md +193 -0
- package/docs/gateway/security/formal-verification.md +164 -0
- package/docs/gateway/security/index.md +825 -0
- package/docs/gateway/tailscale.md +127 -0
- package/docs/gateway/tools-invoke-http-api.md +85 -0
- package/docs/gateway/troubleshooting.md +767 -0
- package/docs/help/faq.md +2830 -0
- package/docs/help/index.md +21 -0
- package/docs/help/troubleshooting.md +98 -0
- package/docs/hooks/soul-evil.md +69 -0
- package/docs/hooks.md +913 -0
- package/docs/images/feishu-step2-create-app.png +0 -0
- package/docs/images/feishu-step3-credentials.png +0 -0
- package/docs/images/feishu-step4-permissions.png +0 -0
- package/docs/images/feishu-step5-bot-capability.png +0 -0
- package/docs/images/feishu-step6-event-subscription.png +0 -0
- package/docs/images/groups-flow.svg +52 -0
- package/docs/images/mobile-ui-screenshot.png +0 -0
- package/docs/index.md +258 -0
- package/docs/install/ansible.md +208 -0
- package/docs/install/bun.md +59 -0
- package/docs/install/development-channels.md +75 -0
- package/docs/install/docker.md +567 -0
- package/docs/install/index.md +185 -0
- package/docs/install/installer.md +123 -0
- package/docs/install/migrating.md +192 -0
- package/docs/install/nix.md +96 -0
- package/docs/install/node.md +78 -0
- package/docs/install/uninstall.md +128 -0
- package/docs/install/updating.md +228 -0
- package/docs/logging.md +350 -0
- package/docs/multi-agent-sandbox-tools.md +395 -0
- package/docs/network.md +54 -0
- package/docs/nodes/audio.md +114 -0
- package/docs/nodes/camera.md +156 -0
- package/docs/nodes/images.md +72 -0
- package/docs/nodes/index.md +341 -0
- package/docs/nodes/location-command.md +113 -0
- package/docs/nodes/media-understanding.md +379 -0
- package/docs/nodes/talk.md +90 -0
- package/docs/nodes/voicewake.md +65 -0
- package/docs/northflank.mdx +53 -0
- package/docs/perplexity.md +80 -0
- package/docs/pi-dev.md +70 -0
- package/docs/pi.md +612 -0
- package/docs/platforms/android.md +148 -0
- package/docs/platforms/digitalocean.md +262 -0
- package/docs/platforms/exe-dev.md +125 -0
- package/docs/platforms/fly.md +486 -0
- package/docs/platforms/gcp.md +503 -0
- package/docs/platforms/hetzner.md +330 -0
- package/docs/platforms/index.md +53 -0
- package/docs/platforms/ios.md +107 -0
- package/docs/platforms/linux.md +94 -0
- package/docs/platforms/mac/bundled-gateway.md +73 -0
- package/docs/platforms/mac/canvas.md +125 -0
- package/docs/platforms/mac/child-process.md +69 -0
- package/docs/platforms/mac/dev-setup.md +102 -0
- package/docs/platforms/mac/health.md +34 -0
- package/docs/platforms/mac/icon.md +31 -0
- package/docs/platforms/mac/logging.md +57 -0
- package/docs/platforms/mac/menu-bar.md +81 -0
- package/docs/platforms/mac/peekaboo.md +65 -0
- package/docs/platforms/mac/permissions.md +44 -0
- package/docs/platforms/mac/release.md +85 -0
- package/docs/platforms/mac/remote.md +83 -0
- package/docs/platforms/mac/signing.md +47 -0
- package/docs/platforms/mac/skills.md +33 -0
- package/docs/platforms/mac/voice-overlay.md +60 -0
- package/docs/platforms/mac/voicewake.md +67 -0
- package/docs/platforms/mac/webchat.md +41 -0
- package/docs/platforms/mac/xpc.md +61 -0
- package/docs/platforms/macos-vm.md +281 -0
- package/docs/platforms/macos.md +203 -0
- package/docs/platforms/oracle.md +303 -0
- package/docs/platforms/raspberry-pi.md +358 -0
- package/docs/platforms/windows.md +159 -0
- package/docs/plugin.md +664 -0
- package/docs/plugins/agent-tools.md +99 -0
- package/docs/plugins/manifest.md +71 -0
- package/docs/plugins/voice-call.md +284 -0
- package/docs/plugins/zalouser.md +81 -0
- package/docs/prose.md +134 -0
- package/docs/providers/anthropic.md +152 -0
- package/docs/providers/claude-max-api-proxy.md +148 -0
- package/docs/providers/cloudflare-ai-gateway.md +71 -0
- package/docs/providers/deepgram.md +93 -0
- package/docs/providers/github-copilot.md +72 -0
- package/docs/providers/glm.md +33 -0
- package/docs/providers/index.md +63 -0
- package/docs/providers/minimax.md +208 -0
- package/docs/providers/models.md +51 -0
- package/docs/providers/moonshot.md +142 -0
- package/docs/providers/ollama.md +223 -0
- package/docs/providers/openai.md +62 -0
- package/docs/providers/opencode.md +36 -0
- package/docs/providers/openrouter.md +37 -0
- package/docs/providers/qwen.md +53 -0
- package/docs/providers/synthetic.md +99 -0
- package/docs/providers/venice.md +267 -0
- package/docs/providers/vercel-ai-gateway.md +50 -0
- package/docs/providers/xiaomi.md +64 -0
- package/docs/providers/zai.md +36 -0
- package/docs/railway.mdx +99 -0
- package/docs/refactor/clawnet.md +417 -0
- package/docs/refactor/exec-host.md +316 -0
- package/docs/refactor/outbound-session-mirroring.md +85 -0
- package/docs/refactor/plugin-sdk.md +214 -0
- package/docs/refactor/strict-config.md +93 -0
- package/docs/reference/AGENTS.default.md +124 -0
- package/docs/reference/RELEASING.md +120 -0
- package/docs/reference/api-usage-costs.md +137 -0
- package/docs/reference/device-models.md +47 -0
- package/docs/reference/rpc.md +43 -0
- package/docs/reference/session-management-compaction.md +285 -0
- package/docs/reference/templates/AGENTS.dev.md +83 -0
- package/docs/reference/templates/AGENTS.md +218 -0
- package/docs/reference/templates/BOOT.md +10 -0
- package/docs/reference/templates/BOOTSTRAP.md +61 -0
- package/docs/reference/templates/HEARTBEAT.md +11 -0
- package/docs/reference/templates/IDENTITY.dev.md +47 -0
- package/docs/reference/templates/IDENTITY.md +27 -0
- package/docs/reference/templates/SOUL.dev.md +76 -0
- package/docs/reference/templates/SOUL.md +42 -0
- package/docs/reference/templates/TOOLS.dev.md +24 -0
- package/docs/reference/templates/TOOLS.md +46 -0
- package/docs/reference/templates/USER.dev.md +18 -0
- package/docs/reference/templates/USER.md +22 -0
- package/docs/reference/test.md +50 -0
- package/docs/reference/transcript-hygiene.md +129 -0
- package/docs/render.mdx +165 -0
- package/docs/scripts.md +28 -0
- package/docs/security/formal-verification.md +164 -0
- package/docs/start/getting-started.md +208 -0
- package/docs/start/hubs.md +185 -0
- package/docs/start/lore.md +219 -0
- package/docs/start/onboarding.md +110 -0
- package/docs/start/openclaw.md +241 -0
- package/docs/start/pairing.md +86 -0
- package/docs/start/setup.md +149 -0
- package/docs/start/showcase.md +416 -0
- package/docs/start/wizard.md +349 -0
- package/docs/testing.md +368 -0
- package/docs/token-use.md +112 -0
- package/docs/tools/agent-send.md +53 -0
- package/docs/tools/apply-patch.md +50 -0
- package/docs/tools/browser-linux-troubleshooting.md +139 -0
- package/docs/tools/browser-login.md +68 -0
- package/docs/tools/browser.md +576 -0
- package/docs/tools/chrome-extension.md +178 -0
- package/docs/tools/clawhub.md +257 -0
- package/docs/tools/creating-skills.md +54 -0
- package/docs/tools/elevated.md +57 -0
- package/docs/tools/exec-approvals.md +246 -0
- package/docs/tools/exec.md +179 -0
- package/docs/tools/firecrawl.md +61 -0
- package/docs/tools/index.md +509 -0
- package/docs/tools/llm-task.md +115 -0
- package/docs/tools/lobster.md +342 -0
- package/docs/tools/reactions.md +22 -0
- package/docs/tools/skills-config.md +76 -0
- package/docs/tools/skills.md +300 -0
- package/docs/tools/slash-commands.md +198 -0
- package/docs/tools/subagents.md +151 -0
- package/docs/tools/thinking.md +73 -0
- package/docs/tools/web.md +261 -0
- package/docs/tts.md +396 -0
- package/docs/tui.md +159 -0
- package/docs/vps.md +43 -0
- package/docs/web/control-ui.md +221 -0
- package/docs/web/dashboard.md +46 -0
- package/docs/web/index.md +116 -0
- package/docs/web/webchat.md +49 -0
- package/docs/whatsapp-openclaw-ai-zh.jpg +0 -0
- package/docs/whatsapp-openclaw.jpg +0 -0
- package/docs/zh-CN/AGENTS.md +59 -0
- package/docs/zh-CN/automation/auth-monitoring.md +47 -0
- package/docs/zh-CN/automation/cron-jobs.md +424 -0
- package/docs/zh-CN/automation/cron-vs-heartbeat.md +286 -0
- package/docs/zh-CN/automation/gmail-pubsub.md +249 -0
- package/docs/zh-CN/automation/poll.md +76 -0
- package/docs/zh-CN/automation/webhook.md +163 -0
- package/docs/zh-CN/bedrock.md +170 -0
- package/docs/zh-CN/brave-search.md +48 -0
- package/docs/zh-CN/broadcast-groups.md +449 -0
- package/docs/zh-CN/channels/bluebubbles.md +271 -0
- package/docs/zh-CN/channels/discord.md +468 -0
- package/docs/zh-CN/channels/feishu.md +513 -0
- package/docs/zh-CN/channels/googlechat.md +257 -0
- package/docs/zh-CN/channels/grammy.md +38 -0
- package/docs/zh-CN/channels/imessage.md +302 -0
- package/docs/zh-CN/channels/index.md +53 -0
- package/docs/zh-CN/channels/line.md +180 -0
- package/docs/zh-CN/channels/location.md +63 -0
- package/docs/zh-CN/channels/matrix.md +221 -0
- package/docs/zh-CN/channels/mattermost.md +144 -0
- package/docs/zh-CN/channels/msteams.md +775 -0
- package/docs/zh-CN/channels/nextcloud-talk.md +142 -0
- package/docs/zh-CN/channels/nostr.md +240 -0
- package/docs/zh-CN/channels/signal.md +209 -0
- package/docs/zh-CN/channels/slack.md +531 -0
- package/docs/zh-CN/channels/telegram.md +751 -0
- package/docs/zh-CN/channels/tlon.md +136 -0
- package/docs/zh-CN/channels/troubleshooting.md +36 -0
- package/docs/zh-CN/channels/twitch.md +385 -0
- package/docs/zh-CN/channels/whatsapp.md +411 -0
- package/docs/zh-CN/channels/zalo.md +196 -0
- package/docs/zh-CN/channels/zalouser.md +147 -0
- package/docs/zh-CN/cli/acp.md +173 -0
- package/docs/zh-CN/cli/agent.md +30 -0
- package/docs/zh-CN/cli/agents.md +82 -0
- package/docs/zh-CN/cli/approvals.md +57 -0
- package/docs/zh-CN/cli/browser.md +114 -0
- package/docs/zh-CN/cli/channels.md +86 -0
- package/docs/zh-CN/cli/config.md +57 -0
- package/docs/zh-CN/cli/configure.md +38 -0
- package/docs/zh-CN/cli/cron.md +43 -0
- package/docs/zh-CN/cli/dashboard.md +23 -0
- package/docs/zh-CN/cli/devices.md +74 -0
- package/docs/zh-CN/cli/directory.md +70 -0
- package/docs/zh-CN/cli/dns.md +30 -0
- package/docs/zh-CN/cli/docs.md +22 -0
- package/docs/zh-CN/cli/doctor.md +48 -0
- package/docs/zh-CN/cli/gateway.md +206 -0
- package/docs/zh-CN/cli/health.md +28 -0
- package/docs/zh-CN/cli/hooks.md +311 -0
- package/docs/zh-CN/cli/index.md +1032 -0
- package/docs/zh-CN/cli/logs.md +31 -0
- package/docs/zh-CN/cli/memory.md +52 -0
- package/docs/zh-CN/cli/message.md +246 -0
- package/docs/zh-CN/cli/models.md +85 -0
- package/docs/zh-CN/cli/node.md +115 -0
- package/docs/zh-CN/cli/nodes.md +80 -0
- package/docs/zh-CN/cli/onboard.md +36 -0
- package/docs/zh-CN/cli/pairing.md +28 -0
- package/docs/zh-CN/cli/plugins.md +66 -0
- package/docs/zh-CN/cli/reset.md +24 -0
- package/docs/zh-CN/cli/sandbox.md +158 -0
- package/docs/zh-CN/cli/security.md +33 -0
- package/docs/zh-CN/cli/sessions.md +23 -0
- package/docs/zh-CN/cli/setup.md +36 -0
- package/docs/zh-CN/cli/skills.md +33 -0
- package/docs/zh-CN/cli/status.md +33 -0
- package/docs/zh-CN/cli/system.md +63 -0
- package/docs/zh-CN/cli/tui.md +30 -0
- package/docs/zh-CN/cli/uninstall.md +24 -0
- package/docs/zh-CN/cli/update.md +101 -0
- package/docs/zh-CN/cli/voicecall.md +41 -0
- package/docs/zh-CN/cli/webhooks.md +32 -0
- package/docs/zh-CN/concepts/agent-loop.md +146 -0
- package/docs/zh-CN/concepts/agent-workspace.md +219 -0
- package/docs/zh-CN/concepts/agent.md +115 -0
- package/docs/zh-CN/concepts/architecture.md +123 -0
- package/docs/zh-CN/concepts/channel-routing.md +117 -0
- package/docs/zh-CN/concepts/compaction.md +67 -0
- package/docs/zh-CN/concepts/context.md +168 -0
- package/docs/zh-CN/concepts/group-messages.md +91 -0
- package/docs/zh-CN/concepts/groups.md +379 -0
- package/docs/zh-CN/concepts/markdown-formatting.md +117 -0
- package/docs/zh-CN/concepts/memory.md +412 -0
- package/docs/zh-CN/concepts/messages.md +141 -0
- package/docs/zh-CN/concepts/model-failover.md +145 -0
- package/docs/zh-CN/concepts/model-providers.md +320 -0
- package/docs/zh-CN/concepts/models.md +196 -0
- package/docs/zh-CN/concepts/multi-agent.md +372 -0
- package/docs/zh-CN/concepts/oauth.md +151 -0
- package/docs/zh-CN/concepts/presence.md +99 -0
- package/docs/zh-CN/concepts/queue.md +94 -0
- package/docs/zh-CN/concepts/retry.md +76 -0
- package/docs/zh-CN/concepts/session-pruning.md +129 -0
- package/docs/zh-CN/concepts/session-tool.md +200 -0
- package/docs/zh-CN/concepts/session.md +166 -0
- package/docs/zh-CN/concepts/sessions.md +17 -0
- package/docs/zh-CN/concepts/streaming.md +133 -0
- package/docs/zh-CN/concepts/system-prompt.md +101 -0
- package/docs/zh-CN/concepts/timezone.md +96 -0
- package/docs/zh-CN/concepts/typebox.md +284 -0
- package/docs/zh-CN/concepts/typing-indicators.md +74 -0
- package/docs/zh-CN/concepts/usage-tracking.md +42 -0
- package/docs/zh-CN/date-time.md +129 -0
- package/docs/zh-CN/debug/node-issue.md +90 -0
- package/docs/zh-CN/debugging.md +160 -0
- package/docs/zh-CN/diagnostics/flags.md +98 -0
- package/docs/zh-CN/environment.md +88 -0
- package/docs/zh-CN/experiments/onboarding-config-protocol.md +47 -0
- package/docs/zh-CN/experiments/plans/cron-add-hardening.md +70 -0
- package/docs/zh-CN/experiments/plans/group-policy-hardening.md +45 -0
- package/docs/zh-CN/experiments/plans/openresponses-gateway.md +121 -0
- package/docs/zh-CN/experiments/proposals/model-config.md +42 -0
- package/docs/zh-CN/experiments/research/memory.md +235 -0
- package/docs/zh-CN/gateway/authentication.md +142 -0
- package/docs/zh-CN/gateway/background-process.md +100 -0
- package/docs/zh-CN/gateway/bonjour.md +174 -0
- package/docs/zh-CN/gateway/bridge-protocol.md +86 -0
- package/docs/zh-CN/gateway/cli-backends.md +213 -0
- package/docs/zh-CN/gateway/configuration-examples.md +587 -0
- package/docs/zh-CN/gateway/configuration.md +3332 -0
- package/docs/zh-CN/gateway/discovery.md +123 -0
- package/docs/zh-CN/gateway/doctor.md +238 -0
- package/docs/zh-CN/gateway/gateway-lock.md +41 -0
- package/docs/zh-CN/gateway/health.md +42 -0
- package/docs/zh-CN/gateway/heartbeat.md +274 -0
- package/docs/zh-CN/gateway/index.md +335 -0
- package/docs/zh-CN/gateway/local-models.md +157 -0
- package/docs/zh-CN/gateway/logging.md +114 -0
- package/docs/zh-CN/gateway/multiple-gateways.md +119 -0
- package/docs/zh-CN/gateway/openai-http-api.md +125 -0
- package/docs/zh-CN/gateway/openresponses-http-api.md +317 -0
- package/docs/zh-CN/gateway/pairing.md +99 -0
- package/docs/zh-CN/gateway/protocol.md +220 -0
- package/docs/zh-CN/gateway/remote-gateway-readme.md +164 -0
- package/docs/zh-CN/gateway/remote.md +133 -0
- package/docs/zh-CN/gateway/sandbox-vs-tool-policy-vs-elevated.md +135 -0
- package/docs/zh-CN/gateway/sandboxing.md +188 -0
- package/docs/zh-CN/gateway/security/formal-verification.md +169 -0
- package/docs/zh-CN/gateway/security/index.md +777 -0
- package/docs/zh-CN/gateway/tailscale.md +124 -0
- package/docs/zh-CN/gateway/tools-invoke-http-api.md +92 -0
- package/docs/zh-CN/gateway/troubleshooting.md +771 -0
- package/docs/zh-CN/help/faq.md +2628 -0
- package/docs/zh-CN/help/index.md +28 -0
- package/docs/zh-CN/help/troubleshooting.md +104 -0
- package/docs/zh-CN/hooks/soul-evil.md +72 -0
- package/docs/zh-CN/hooks.md +919 -0
- package/docs/zh-CN/index.md +264 -0
- package/docs/zh-CN/install/ansible.md +215 -0
- package/docs/zh-CN/install/bun.md +65 -0
- package/docs/zh-CN/install/development-channels.md +81 -0
- package/docs/zh-CN/install/docker.md +532 -0
- package/docs/zh-CN/install/index.md +193 -0
- package/docs/zh-CN/install/installer.md +128 -0
- package/docs/zh-CN/install/migrating.md +199 -0
- package/docs/zh-CN/install/nix.md +99 -0
- package/docs/zh-CN/install/node.md +85 -0
- package/docs/zh-CN/install/uninstall.md +135 -0
- package/docs/zh-CN/install/updating.md +233 -0
- package/docs/zh-CN/logging.md +329 -0
- package/docs/zh-CN/multi-agent-sandbox-tools.md +401 -0
- package/docs/zh-CN/network.md +59 -0
- package/docs/zh-CN/nodes/audio.md +120 -0
- package/docs/zh-CN/nodes/camera.md +162 -0
- package/docs/zh-CN/nodes/images.md +79 -0
- package/docs/zh-CN/nodes/index.md +348 -0
- package/docs/zh-CN/nodes/location-command.md +120 -0
- package/docs/zh-CN/nodes/media-understanding.md +380 -0
- package/docs/zh-CN/nodes/talk.md +97 -0
- package/docs/zh-CN/nodes/voicewake.md +72 -0
- package/docs/zh-CN/northflank.mdx +60 -0
- package/docs/zh-CN/perplexity.md +84 -0
- package/docs/zh-CN/pi-dev.md +77 -0
- package/docs/zh-CN/pi.md +619 -0
- package/docs/zh-CN/platforms/android.md +155 -0
- package/docs/zh-CN/platforms/digitalocean.md +269 -0
- package/docs/zh-CN/platforms/exe-dev.md +127 -0
- package/docs/zh-CN/platforms/fly.md +490 -0
- package/docs/zh-CN/platforms/gcp.md +510 -0
- package/docs/zh-CN/platforms/hetzner.md +337 -0
- package/docs/zh-CN/platforms/index.md +60 -0
- package/docs/zh-CN/platforms/ios.md +114 -0
- package/docs/zh-CN/platforms/linux.md +101 -0
- package/docs/zh-CN/platforms/mac/bundled-gateway.md +75 -0
- package/docs/zh-CN/platforms/mac/canvas.md +128 -0
- package/docs/zh-CN/platforms/mac/child-process.md +73 -0
- package/docs/zh-CN/platforms/mac/dev-setup.md +109 -0
- package/docs/zh-CN/platforms/mac/health.md +41 -0
- package/docs/zh-CN/platforms/mac/icon.md +38 -0
- package/docs/zh-CN/platforms/mac/logging.md +64 -0
- package/docs/zh-CN/platforms/mac/menu-bar.md +88 -0
- package/docs/zh-CN/platforms/mac/peekaboo.md +62 -0
- package/docs/zh-CN/platforms/mac/permissions.md +46 -0
- package/docs/zh-CN/platforms/mac/release.md +92 -0
- package/docs/zh-CN/platforms/mac/remote.md +90 -0
- package/docs/zh-CN/platforms/mac/signing.md +54 -0
- package/docs/zh-CN/platforms/mac/skills.md +40 -0
- package/docs/zh-CN/platforms/mac/voice-overlay.md +67 -0
- package/docs/zh-CN/platforms/mac/voicewake.md +74 -0
- package/docs/zh-CN/platforms/mac/webchat.md +43 -0
- package/docs/zh-CN/platforms/mac/xpc.md +68 -0
- package/docs/zh-CN/platforms/macos-vm.md +288 -0
- package/docs/zh-CN/platforms/macos.md +193 -0
- package/docs/zh-CN/platforms/oracle.md +310 -0
- package/docs/zh-CN/platforms/raspberry-pi.md +365 -0
- package/docs/zh-CN/platforms/windows.md +156 -0
- package/docs/zh-CN/plugin.md +639 -0
- package/docs/zh-CN/plugins/agent-tools.md +99 -0
- package/docs/zh-CN/plugins/manifest.md +68 -0
- package/docs/zh-CN/plugins/voice-call.md +250 -0
- package/docs/zh-CN/plugins/zalouser.md +88 -0
- package/docs/zh-CN/prose.md +141 -0
- package/docs/zh-CN/providers/anthropic.md +159 -0
- package/docs/zh-CN/providers/claude-max-api-proxy.md +155 -0
- package/docs/zh-CN/providers/deepgram.md +97 -0
- package/docs/zh-CN/providers/github-copilot.md +67 -0
- package/docs/zh-CN/providers/glm.md +39 -0
- package/docs/zh-CN/providers/index.md +68 -0
- package/docs/zh-CN/providers/minimax.md +206 -0
- package/docs/zh-CN/providers/models.md +55 -0
- package/docs/zh-CN/providers/moonshot.md +145 -0
- package/docs/zh-CN/providers/ollama.md +230 -0
- package/docs/zh-CN/providers/openai.md +68 -0
- package/docs/zh-CN/providers/opencode.md +41 -0
- package/docs/zh-CN/providers/openrouter.md +43 -0
- package/docs/zh-CN/providers/qwen.md +55 -0
- package/docs/zh-CN/providers/synthetic.md +102 -0
- package/docs/zh-CN/providers/venice.md +274 -0
- package/docs/zh-CN/providers/vercel-ai-gateway.md +57 -0
- package/docs/zh-CN/providers/xiaomi.md +68 -0
- package/docs/zh-CN/providers/zai.md +41 -0
- package/docs/zh-CN/railway.mdx +106 -0
- package/docs/zh-CN/refactor/clawnet.md +424 -0
- package/docs/zh-CN/refactor/exec-host.md +323 -0
- package/docs/zh-CN/refactor/outbound-session-mirroring.md +92 -0
- package/docs/zh-CN/refactor/plugin-sdk.md +221 -0
- package/docs/zh-CN/refactor/strict-config.md +100 -0
- package/docs/zh-CN/reference/AGENTS.default.md +131 -0
- package/docs/zh-CN/reference/RELEASING.md +123 -0
- package/docs/zh-CN/reference/api-usage-costs.md +136 -0
- package/docs/zh-CN/reference/device-models.md +54 -0
- package/docs/zh-CN/reference/rpc.md +48 -0
- package/docs/zh-CN/reference/session-management-compaction.md +287 -0
- package/docs/zh-CN/reference/templates/AGENTS.dev.md +89 -0
- package/docs/zh-CN/reference/templates/AGENTS.md +225 -0
- package/docs/zh-CN/reference/templates/BOOT.md +17 -0
- package/docs/zh-CN/reference/templates/BOOTSTRAP.md +68 -0
- package/docs/zh-CN/reference/templates/HEARTBEAT.md +18 -0
- package/docs/zh-CN/reference/templates/IDENTITY.dev.md +54 -0
- package/docs/zh-CN/reference/templates/IDENTITY.md +35 -0
- package/docs/zh-CN/reference/templates/SOUL.dev.md +83 -0
- package/docs/zh-CN/reference/templates/SOUL.md +49 -0
- package/docs/zh-CN/reference/templates/TOOLS.dev.md +31 -0
- package/docs/zh-CN/reference/templates/TOOLS.md +53 -0
- package/docs/zh-CN/reference/templates/USER.dev.md +25 -0
- package/docs/zh-CN/reference/templates/USER.md +30 -0
- package/docs/zh-CN/reference/test.md +57 -0
- package/docs/zh-CN/reference/transcript-hygiene.md +109 -0
- package/docs/zh-CN/render.mdx +169 -0
- package/docs/zh-CN/scripts.md +35 -0
- package/docs/zh-CN/security/formal-verification.md +171 -0
- package/docs/zh-CN/start/getting-started.md +206 -0
- package/docs/zh-CN/start/hubs.md +191 -0
- package/docs/zh-CN/start/lore.md +226 -0
- package/docs/zh-CN/start/onboarding.md +105 -0
- package/docs/zh-CN/start/openclaw.md +248 -0
- package/docs/zh-CN/start/pairing.md +89 -0
- package/docs/zh-CN/start/setup.md +153 -0
- package/docs/zh-CN/start/showcase.md +423 -0
- package/docs/zh-CN/start/wizard.md +331 -0
- package/docs/zh-CN/testing.md +375 -0
- package/docs/zh-CN/token-use.md +119 -0
- package/docs/zh-CN/tools/agent-send.md +59 -0
- package/docs/zh-CN/tools/apply-patch.md +57 -0
- package/docs/zh-CN/tools/browser-linux-troubleshooting.md +144 -0
- package/docs/zh-CN/tools/browser-login.md +75 -0
- package/docs/zh-CN/tools/browser.md +553 -0
- package/docs/zh-CN/tools/chrome-extension.md +183 -0
- package/docs/zh-CN/tools/clawhub.md +209 -0
- package/docs/zh-CN/tools/creating-skills.md +61 -0
- package/docs/zh-CN/tools/elevated.md +64 -0
- package/docs/zh-CN/tools/exec-approvals.md +234 -0
- package/docs/zh-CN/tools/exec.md +169 -0
- package/docs/zh-CN/tools/firecrawl.md +68 -0
- package/docs/zh-CN/tools/index.md +515 -0
- package/docs/zh-CN/tools/llm-task.md +117 -0
- package/docs/zh-CN/tools/lobster.md +349 -0
- package/docs/zh-CN/tools/reactions.md +29 -0
- package/docs/zh-CN/tools/skills-config.md +78 -0
- package/docs/zh-CN/tools/skills.md +279 -0
- package/docs/zh-CN/tools/slash-commands.md +205 -0
- package/docs/zh-CN/tools/subagents.md +156 -0
- package/docs/zh-CN/tools/thinking.md +80 -0
- package/docs/zh-CN/tools/web.md +257 -0
- package/docs/zh-CN/tts.md +375 -0
- package/docs/zh-CN/tui.md +166 -0
- package/docs/zh-CN/vps.md +47 -0
- package/docs/zh-CN/web/control-ui.md +191 -0
- package/docs/zh-CN/web/dashboard.md +53 -0
- package/docs/zh-CN/web/index.md +118 -0
- package/docs/zh-CN/web/webchat.md +56 -0
- package/extensions/bluebubbles/README.md +45 -0
- package/extensions/bluebubbles/index.ts +19 -0
- package/extensions/bluebubbles/node_modules/.bin/openclaw +21 -0
- package/extensions/bluebubbles/openclaw.plugin.json +9 -0
- package/extensions/bluebubbles/package.json +36 -0
- package/extensions/bluebubbles/src/accounts.ts +88 -0
- package/extensions/bluebubbles/src/actions.test.ts +650 -0
- package/extensions/bluebubbles/src/actions.ts +438 -0
- package/extensions/bluebubbles/src/attachments.test.ts +345 -0
- package/extensions/bluebubbles/src/attachments.ts +300 -0
- package/extensions/bluebubbles/src/channel.ts +414 -0
- package/extensions/bluebubbles/src/chat.test.ts +461 -0
- package/extensions/bluebubbles/src/chat.ts +378 -0
- package/extensions/bluebubbles/src/config-schema.ts +51 -0
- package/extensions/bluebubbles/src/media-send.ts +174 -0
- package/extensions/bluebubbles/src/monitor.test.ts +2342 -0
- package/extensions/bluebubbles/src/monitor.ts +2490 -0
- package/extensions/bluebubbles/src/onboarding.ts +352 -0
- package/extensions/bluebubbles/src/probe.ts +135 -0
- package/extensions/bluebubbles/src/reactions.test.ts +392 -0
- package/extensions/bluebubbles/src/reactions.ts +188 -0
- package/extensions/bluebubbles/src/runtime.ts +14 -0
- package/extensions/bluebubbles/src/send.test.ts +808 -0
- package/extensions/bluebubbles/src/send.ts +467 -0
- package/extensions/bluebubbles/src/targets.test.ts +183 -0
- package/extensions/bluebubbles/src/targets.ts +422 -0
- package/extensions/bluebubbles/src/types.ts +127 -0
- package/extensions/copilot-proxy/README.md +24 -0
- package/extensions/copilot-proxy/index.ts +148 -0
- package/extensions/copilot-proxy/node_modules/.bin/openclaw +21 -0
- package/extensions/copilot-proxy/openclaw.plugin.json +9 -0
- package/extensions/copilot-proxy/package.json +14 -0
- package/extensions/diagnostics-otel/index.ts +15 -0
- package/extensions/diagnostics-otel/node_modules/.bin/openclaw +21 -0
- package/extensions/diagnostics-otel/openclaw.plugin.json +8 -0
- package/extensions/diagnostics-otel/package.json +27 -0
- package/extensions/diagnostics-otel/src/service.test.ts +226 -0
- package/extensions/diagnostics-otel/src/service.ts +635 -0
- package/extensions/discord/index.ts +17 -0
- package/extensions/discord/node_modules/.bin/openclaw +21 -0
- package/extensions/discord/openclaw.plugin.json +9 -0
- package/extensions/discord/package.json +14 -0
- package/extensions/discord/src/channel.ts +422 -0
- package/extensions/discord/src/runtime.ts +14 -0
- package/extensions/feishu/README.md +47 -0
- package/extensions/feishu/index.ts +15 -0
- package/extensions/feishu/node_modules/.bin/openclaw +21 -0
- package/extensions/feishu/openclaw.plugin.json +9 -0
- package/extensions/feishu/package.json +33 -0
- package/extensions/feishu/src/channel.ts +276 -0
- package/extensions/feishu/src/config-schema.ts +46 -0
- package/extensions/feishu/src/onboarding.ts +278 -0
- package/extensions/google-antigravity-auth/README.md +24 -0
- package/extensions/google-antigravity-auth/index.ts +461 -0
- package/extensions/google-antigravity-auth/node_modules/.bin/openclaw +21 -0
- package/extensions/google-antigravity-auth/openclaw.plugin.json +9 -0
- package/extensions/google-antigravity-auth/package.json +14 -0
- package/extensions/google-gemini-cli-auth/README.md +35 -0
- package/extensions/google-gemini-cli-auth/index.ts +88 -0
- package/extensions/google-gemini-cli-auth/node_modules/.bin/openclaw +21 -0
- package/extensions/google-gemini-cli-auth/oauth.test.ts +240 -0
- package/extensions/google-gemini-cli-auth/oauth.ts +662 -0
- package/extensions/google-gemini-cli-auth/openclaw.plugin.json +9 -0
- package/extensions/google-gemini-cli-auth/package.json +14 -0
- package/extensions/googlechat/index.ts +19 -0
- package/extensions/googlechat/node_modules/.bin/openclaw +21 -0
- package/extensions/googlechat/openclaw.plugin.json +9 -0
- package/extensions/googlechat/package.json +39 -0
- package/extensions/googlechat/src/accounts.ts +147 -0
- package/extensions/googlechat/src/actions.ts +181 -0
- package/extensions/googlechat/src/api.test.ts +61 -0
- package/extensions/googlechat/src/api.ts +282 -0
- package/extensions/googlechat/src/auth.ts +123 -0
- package/extensions/googlechat/src/channel.ts +583 -0
- package/extensions/googlechat/src/monitor.test.ts +22 -0
- package/extensions/googlechat/src/monitor.ts +949 -0
- package/extensions/googlechat/src/onboarding.ts +269 -0
- package/extensions/googlechat/src/runtime.ts +14 -0
- package/extensions/googlechat/src/targets.test.ts +32 -0
- package/extensions/googlechat/src/targets.ts +65 -0
- package/extensions/googlechat/src/types.config.ts +3 -0
- package/extensions/googlechat/src/types.ts +73 -0
- package/extensions/imessage/index.ts +17 -0
- package/extensions/imessage/node_modules/.bin/openclaw +21 -0
- package/extensions/imessage/openclaw.plugin.json +9 -0
- package/extensions/imessage/package.json +14 -0
- package/extensions/imessage/src/channel.ts +294 -0
- package/extensions/imessage/src/runtime.ts +14 -0
- package/extensions/line/index.ts +19 -0
- package/extensions/line/node_modules/.bin/openclaw +21 -0
- package/extensions/line/openclaw.plugin.json +9 -0
- package/extensions/line/package.json +29 -0
- package/extensions/line/src/card-command.ts +344 -0
- package/extensions/line/src/channel.logout.test.ts +99 -0
- package/extensions/line/src/channel.sendPayload.test.ts +306 -0
- package/extensions/line/src/channel.ts +780 -0
- package/extensions/line/src/runtime.ts +14 -0
- package/extensions/llm-task/README.md +97 -0
- package/extensions/llm-task/index.ts +6 -0
- package/extensions/llm-task/node_modules/.bin/openclaw +21 -0
- package/extensions/llm-task/openclaw.plugin.json +21 -0
- package/extensions/llm-task/package.json +14 -0
- package/extensions/llm-task/src/llm-task-tool.test.ts +138 -0
- package/extensions/llm-task/src/llm-task-tool.ts +245 -0
- package/extensions/lobster/README.md +75 -0
- package/extensions/lobster/SKILL.md +97 -0
- package/extensions/lobster/index.ts +14 -0
- package/extensions/lobster/node_modules/.bin/openclaw +21 -0
- package/extensions/lobster/openclaw.plugin.json +10 -0
- package/extensions/lobster/package.json +14 -0
- package/extensions/lobster/src/lobster-tool.test.ts +247 -0
- package/extensions/lobster/src/lobster-tool.ts +328 -0
- package/extensions/matrix/CHANGELOG.md +87 -0
- package/extensions/matrix/index.ts +17 -0
- package/extensions/matrix/node_modules/.bin/markdown-it +21 -0
- package/extensions/matrix/node_modules/.bin/openclaw +21 -0
- package/extensions/matrix/openclaw.plugin.json +9 -0
- package/extensions/matrix/package.json +36 -0
- package/extensions/matrix/src/actions.ts +195 -0
- package/extensions/matrix/src/channel.directory.test.ts +64 -0
- package/extensions/matrix/src/channel.ts +439 -0
- package/extensions/matrix/src/config-schema.ts +62 -0
- package/extensions/matrix/src/directory-live.ts +188 -0
- package/extensions/matrix/src/group-mentions.ts +66 -0
- package/extensions/matrix/src/matrix/accounts.test.ts +82 -0
- package/extensions/matrix/src/matrix/accounts.ts +65 -0
- package/extensions/matrix/src/matrix/actions/client.ts +57 -0
- package/extensions/matrix/src/matrix/actions/messages.ts +128 -0
- package/extensions/matrix/src/matrix/actions/pins.ts +76 -0
- package/extensions/matrix/src/matrix/actions/reactions.ts +96 -0
- package/extensions/matrix/src/matrix/actions/room.ts +85 -0
- package/extensions/matrix/src/matrix/actions/summary.ts +75 -0
- package/extensions/matrix/src/matrix/actions/types.ts +84 -0
- package/extensions/matrix/src/matrix/actions.ts +15 -0
- package/extensions/matrix/src/matrix/active-client.ts +11 -0
- package/extensions/matrix/src/matrix/client/config.ts +160 -0
- package/extensions/matrix/src/matrix/client/create-client.ts +123 -0
- package/extensions/matrix/src/matrix/client/logging.ts +36 -0
- package/extensions/matrix/src/matrix/client/runtime.ts +4 -0
- package/extensions/matrix/src/matrix/client/shared.ts +170 -0
- package/extensions/matrix/src/matrix/client/storage.ts +131 -0
- package/extensions/matrix/src/matrix/client/types.ts +34 -0
- package/extensions/matrix/src/matrix/client.test.ts +56 -0
- package/extensions/matrix/src/matrix/client.ts +5 -0
- package/extensions/matrix/src/matrix/credentials.ts +105 -0
- package/extensions/matrix/src/matrix/deps.ts +60 -0
- package/extensions/matrix/src/matrix/format.test.ts +33 -0
- package/extensions/matrix/src/matrix/format.ts +22 -0
- package/extensions/matrix/src/matrix/index.ts +11 -0
- package/extensions/matrix/src/matrix/monitor/allowlist.test.ts +45 -0
- package/extensions/matrix/src/matrix/monitor/allowlist.ts +103 -0
- package/extensions/matrix/src/matrix/monitor/auto-join.ts +71 -0
- package/extensions/matrix/src/matrix/monitor/direct.ts +104 -0
- package/extensions/matrix/src/matrix/monitor/events.ts +101 -0
- package/extensions/matrix/src/matrix/monitor/handler.ts +661 -0
- package/extensions/matrix/src/matrix/monitor/index.ts +338 -0
- package/extensions/matrix/src/matrix/monitor/location.ts +100 -0
- package/extensions/matrix/src/matrix/monitor/media.test.ts +102 -0
- package/extensions/matrix/src/matrix/monitor/media.ts +113 -0
- package/extensions/matrix/src/matrix/monitor/mentions.ts +31 -0
- package/extensions/matrix/src/matrix/monitor/replies.ts +97 -0
- package/extensions/matrix/src/matrix/monitor/room-info.ts +55 -0
- package/extensions/matrix/src/matrix/monitor/rooms.test.ts +39 -0
- package/extensions/matrix/src/matrix/monitor/rooms.ts +47 -0
- package/extensions/matrix/src/matrix/monitor/threads.ts +68 -0
- package/extensions/matrix/src/matrix/monitor/types.ts +39 -0
- package/extensions/matrix/src/matrix/poll-types.test.ts +21 -0
- package/extensions/matrix/src/matrix/poll-types.ts +166 -0
- package/extensions/matrix/src/matrix/probe.ts +70 -0
- package/extensions/matrix/src/matrix/send/client.ts +66 -0
- package/extensions/matrix/src/matrix/send/formatting.ts +89 -0
- package/extensions/matrix/src/matrix/send/media.ts +229 -0
- package/extensions/matrix/src/matrix/send/targets.test.ts +98 -0
- package/extensions/matrix/src/matrix/send/targets.ts +136 -0
- package/extensions/matrix/src/matrix/send/types.ts +109 -0
- package/extensions/matrix/src/matrix/send.test.ts +171 -0
- package/extensions/matrix/src/matrix/send.ts +260 -0
- package/extensions/matrix/src/onboarding.ts +449 -0
- package/extensions/matrix/src/outbound.ts +52 -0
- package/extensions/matrix/src/resolve-targets.test.ts +48 -0
- package/extensions/matrix/src/resolve-targets.ts +135 -0
- package/extensions/matrix/src/runtime.ts +14 -0
- package/extensions/matrix/src/tool-actions.ts +164 -0
- package/extensions/matrix/src/types.ts +95 -0
- package/extensions/mattermost/index.ts +17 -0
- package/extensions/mattermost/node_modules/.bin/openclaw +21 -0
- package/extensions/mattermost/openclaw.plugin.json +9 -0
- package/extensions/mattermost/package.json +28 -0
- package/extensions/mattermost/src/channel.test.ts +48 -0
- package/extensions/mattermost/src/channel.ts +337 -0
- package/extensions/mattermost/src/config-schema.ts +55 -0
- package/extensions/mattermost/src/group-mentions.ts +15 -0
- package/extensions/mattermost/src/mattermost/accounts.ts +128 -0
- package/extensions/mattermost/src/mattermost/client.ts +220 -0
- package/extensions/mattermost/src/mattermost/index.ts +9 -0
- package/extensions/mattermost/src/mattermost/monitor-helpers.ts +166 -0
- package/extensions/mattermost/src/mattermost/monitor.ts +987 -0
- package/extensions/mattermost/src/mattermost/probe.ts +74 -0
- package/extensions/mattermost/src/mattermost/send.ts +231 -0
- package/extensions/mattermost/src/normalize.ts +46 -0
- package/extensions/mattermost/src/onboarding-helpers.ts +44 -0
- package/extensions/mattermost/src/onboarding.ts +186 -0
- package/extensions/mattermost/src/runtime.ts +14 -0
- package/extensions/mattermost/src/types.ts +50 -0
- package/extensions/memory-core/index.ts +38 -0
- package/extensions/memory-core/node_modules/.bin/openclaw +21 -0
- package/extensions/memory-core/openclaw.plugin.json +9 -0
- package/extensions/memory-core/package.json +17 -0
- package/extensions/memory-lancedb/config.ts +139 -0
- package/extensions/memory-lancedb/index.test.ts +295 -0
- package/extensions/memory-lancedb/index.ts +608 -0
- package/extensions/memory-lancedb/node_modules/.bin/openai +21 -0
- package/extensions/memory-lancedb/node_modules/.bin/openclaw +21 -0
- package/extensions/memory-lancedb/openclaw.plugin.json +60 -0
- package/extensions/memory-lancedb/package.json +19 -0
- package/extensions/minimax-portal-auth/README.md +33 -0
- package/extensions/minimax-portal-auth/index.ts +155 -0
- package/extensions/minimax-portal-auth/node_modules/.bin/openclaw +21 -0
- package/extensions/minimax-portal-auth/oauth.ts +247 -0
- package/extensions/minimax-portal-auth/openclaw.plugin.json +9 -0
- package/extensions/minimax-portal-auth/package.json +14 -0
- package/extensions/msteams/CHANGELOG.md +83 -0
- package/extensions/msteams/index.ts +17 -0
- package/extensions/msteams/node_modules/.bin/openclaw +21 -0
- package/extensions/msteams/openclaw.plugin.json +9 -0
- package/extensions/msteams/package.json +39 -0
- package/extensions/msteams/src/attachments/download.ts +283 -0
- package/extensions/msteams/src/attachments/graph.ts +353 -0
- package/extensions/msteams/src/attachments/html.ts +90 -0
- package/extensions/msteams/src/attachments/payload.ts +22 -0
- package/extensions/msteams/src/attachments/shared.ts +291 -0
- package/extensions/msteams/src/attachments/types.ts +37 -0
- package/extensions/msteams/src/attachments.test.ts +459 -0
- package/extensions/msteams/src/attachments.ts +18 -0
- package/extensions/msteams/src/channel.directory.test.ts +48 -0
- package/extensions/msteams/src/channel.ts +459 -0
- package/extensions/msteams/src/conversation-store-fs.test.ts +88 -0
- package/extensions/msteams/src/conversation-store-fs.ts +165 -0
- package/extensions/msteams/src/conversation-store-memory.ts +47 -0
- package/extensions/msteams/src/conversation-store.ts +41 -0
- package/extensions/msteams/src/directory-live.ts +205 -0
- package/extensions/msteams/src/errors.test.ts +45 -0
- package/extensions/msteams/src/errors.ts +190 -0
- package/extensions/msteams/src/file-consent-helpers.test.ts +243 -0
- package/extensions/msteams/src/file-consent-helpers.ts +73 -0
- package/extensions/msteams/src/file-consent.ts +126 -0
- package/extensions/msteams/src/graph-chat.ts +53 -0
- package/extensions/msteams/src/graph-upload.ts +453 -0
- package/extensions/msteams/src/inbound.test.ts +66 -0
- package/extensions/msteams/src/inbound.ts +48 -0
- package/extensions/msteams/src/index.ts +4 -0
- package/extensions/msteams/src/media-helpers.test.ts +189 -0
- package/extensions/msteams/src/media-helpers.ts +86 -0
- package/extensions/msteams/src/messenger.test.ts +248 -0
- package/extensions/msteams/src/messenger.ts +495 -0
- package/extensions/msteams/src/monitor-handler/inbound-media.ts +128 -0
- package/extensions/msteams/src/monitor-handler/message-handler.ts +640 -0
- package/extensions/msteams/src/monitor-handler.ts +162 -0
- package/extensions/msteams/src/monitor-types.ts +5 -0
- package/extensions/msteams/src/monitor.ts +295 -0
- package/extensions/msteams/src/onboarding.ts +431 -0
- package/extensions/msteams/src/outbound.ts +46 -0
- package/extensions/msteams/src/pending-uploads.ts +89 -0
- package/extensions/msteams/src/policy.test.ts +209 -0
- package/extensions/msteams/src/policy.ts +273 -0
- package/extensions/msteams/src/polls-store-memory.ts +32 -0
- package/extensions/msteams/src/polls-store.test.ts +38 -0
- package/extensions/msteams/src/polls.test.ts +72 -0
- package/extensions/msteams/src/polls.ts +315 -0
- package/extensions/msteams/src/probe.test.ts +58 -0
- package/extensions/msteams/src/probe.ts +107 -0
- package/extensions/msteams/src/reply-dispatcher.ts +130 -0
- package/extensions/msteams/src/resolve-allowlist.ts +297 -0
- package/extensions/msteams/src/runtime.ts +14 -0
- package/extensions/msteams/src/sdk-types.ts +19 -0
- package/extensions/msteams/src/sdk.ts +33 -0
- package/extensions/msteams/src/send-context.ts +164 -0
- package/extensions/msteams/src/send.ts +519 -0
- package/extensions/msteams/src/sent-message-cache.test.ts +15 -0
- package/extensions/msteams/src/sent-message-cache.ts +47 -0
- package/extensions/msteams/src/storage.ts +25 -0
- package/extensions/msteams/src/store-fs.ts +83 -0
- package/extensions/msteams/src/token.ts +19 -0
- package/extensions/nextcloud-talk/index.ts +17 -0
- package/extensions/nextcloud-talk/node_modules/.bin/openclaw +21 -0
- package/extensions/nextcloud-talk/openclaw.plugin.json +9 -0
- package/extensions/nextcloud-talk/package.json +33 -0
- package/extensions/nextcloud-talk/src/accounts.ts +174 -0
- package/extensions/nextcloud-talk/src/channel.ts +409 -0
- package/extensions/nextcloud-talk/src/config-schema.ts +78 -0
- package/extensions/nextcloud-talk/src/format.ts +79 -0
- package/extensions/nextcloud-talk/src/inbound.ts +317 -0
- package/extensions/nextcloud-talk/src/monitor.ts +246 -0
- package/extensions/nextcloud-talk/src/normalize.ts +39 -0
- package/extensions/nextcloud-talk/src/onboarding.ts +343 -0
- package/extensions/nextcloud-talk/src/policy.test.ts +33 -0
- package/extensions/nextcloud-talk/src/policy.ts +180 -0
- package/extensions/nextcloud-talk/src/room-info.ts +125 -0
- package/extensions/nextcloud-talk/src/runtime.ts +14 -0
- package/extensions/nextcloud-talk/src/send.ts +210 -0
- package/extensions/nextcloud-talk/src/signature.ts +72 -0
- package/extensions/nextcloud-talk/src/types.ts +179 -0
- package/extensions/nostr/CHANGELOG.md +74 -0
- package/extensions/nostr/README.md +136 -0
- package/extensions/nostr/index.ts +68 -0
- package/extensions/nostr/node_modules/.bin/openclaw +21 -0
- package/extensions/nostr/openclaw.plugin.json +9 -0
- package/extensions/nostr/package.json +34 -0
- package/extensions/nostr/src/channel.test.ts +151 -0
- package/extensions/nostr/src/channel.ts +353 -0
- package/extensions/nostr/src/config-schema.ts +90 -0
- package/extensions/nostr/src/metrics.ts +478 -0
- package/extensions/nostr/src/nostr-bus.fuzz.test.ts +533 -0
- package/extensions/nostr/src/nostr-bus.integration.test.ts +448 -0
- package/extensions/nostr/src/nostr-bus.test.ts +199 -0
- package/extensions/nostr/src/nostr-bus.ts +715 -0
- package/extensions/nostr/src/nostr-profile-http.test.ts +378 -0
- package/extensions/nostr/src/nostr-profile-http.ts +519 -0
- package/extensions/nostr/src/nostr-profile-import.test.ts +119 -0
- package/extensions/nostr/src/nostr-profile-import.ts +262 -0
- package/extensions/nostr/src/nostr-profile.fuzz.test.ts +477 -0
- package/extensions/nostr/src/nostr-profile.test.ts +410 -0
- package/extensions/nostr/src/nostr-profile.ts +277 -0
- package/extensions/nostr/src/nostr-state-store.test.ts +131 -0
- package/extensions/nostr/src/nostr-state-store.ts +226 -0
- package/extensions/nostr/src/runtime.ts +14 -0
- package/extensions/nostr/src/seen-tracker.ts +303 -0
- package/extensions/nostr/src/types.test.ts +157 -0
- package/extensions/nostr/src/types.ts +101 -0
- package/extensions/nostr/test/setup.ts +5 -0
- package/extensions/open-prose/README.md +25 -0
- package/extensions/open-prose/index.ts +5 -0
- package/extensions/open-prose/node_modules/.bin/openclaw +21 -0
- package/extensions/open-prose/openclaw.plugin.json +11 -0
- package/extensions/open-prose/package.json +14 -0
- package/extensions/open-prose/skills/prose/LICENSE +21 -0
- package/extensions/open-prose/skills/prose/SKILL.md +323 -0
- package/extensions/open-prose/skills/prose/alt-borges.md +141 -0
- package/extensions/open-prose/skills/prose/alts/arabian-nights.md +358 -0
- package/extensions/open-prose/skills/prose/alts/borges.md +360 -0
- package/extensions/open-prose/skills/prose/alts/folk.md +322 -0
- package/extensions/open-prose/skills/prose/alts/homer.md +346 -0
- package/extensions/open-prose/skills/prose/alts/kafka.md +373 -0
- package/extensions/open-prose/skills/prose/compiler.md +2971 -0
- package/extensions/open-prose/skills/prose/examples/01-hello-world.prose +4 -0
- package/extensions/open-prose/skills/prose/examples/02-research-and-summarize.prose +6 -0
- package/extensions/open-prose/skills/prose/examples/03-code-review.prose +17 -0
- package/extensions/open-prose/skills/prose/examples/04-write-and-refine.prose +14 -0
- package/extensions/open-prose/skills/prose/examples/05-debug-issue.prose +20 -0
- package/extensions/open-prose/skills/prose/examples/06-explain-codebase.prose +17 -0
- package/extensions/open-prose/skills/prose/examples/07-refactor.prose +20 -0
- package/extensions/open-prose/skills/prose/examples/08-blog-post.prose +20 -0
- package/extensions/open-prose/skills/prose/examples/09-research-with-agents.prose +25 -0
- package/extensions/open-prose/skills/prose/examples/10-code-review-agents.prose +32 -0
- package/extensions/open-prose/skills/prose/examples/11-skills-and-imports.prose +27 -0
- package/extensions/open-prose/skills/prose/examples/12-secure-agent-permissions.prose +43 -0
- package/extensions/open-prose/skills/prose/examples/13-variables-and-context.prose +51 -0
- package/extensions/open-prose/skills/prose/examples/14-composition-blocks.prose +48 -0
- package/extensions/open-prose/skills/prose/examples/15-inline-sequences.prose +23 -0
- package/extensions/open-prose/skills/prose/examples/16-parallel-reviews.prose +19 -0
- package/extensions/open-prose/skills/prose/examples/17-parallel-research.prose +19 -0
- package/extensions/open-prose/skills/prose/examples/18-mixed-parallel-sequential.prose +36 -0
- package/extensions/open-prose/skills/prose/examples/19-advanced-parallel.prose +71 -0
- package/extensions/open-prose/skills/prose/examples/20-fixed-loops.prose +20 -0
- package/extensions/open-prose/skills/prose/examples/21-pipeline-operations.prose +35 -0
- package/extensions/open-prose/skills/prose/examples/22-error-handling.prose +51 -0
- package/extensions/open-prose/skills/prose/examples/23-retry-with-backoff.prose +63 -0
- package/extensions/open-prose/skills/prose/examples/24-choice-blocks.prose +86 -0
- package/extensions/open-prose/skills/prose/examples/25-conditionals.prose +114 -0
- package/extensions/open-prose/skills/prose/examples/26-parameterized-blocks.prose +100 -0
- package/extensions/open-prose/skills/prose/examples/27-string-interpolation.prose +105 -0
- package/extensions/open-prose/skills/prose/examples/28-automated-pr-review.prose +37 -0
- package/extensions/open-prose/skills/prose/examples/28-gas-town.prose +1572 -0
- package/extensions/open-prose/skills/prose/examples/29-captains-chair.prose +218 -0
- package/extensions/open-prose/skills/prose/examples/30-captains-chair-simple.prose +42 -0
- package/extensions/open-prose/skills/prose/examples/31-captains-chair-with-memory.prose +145 -0
- package/extensions/open-prose/skills/prose/examples/33-pr-review-autofix.prose +168 -0
- package/extensions/open-prose/skills/prose/examples/34-content-pipeline.prose +204 -0
- package/extensions/open-prose/skills/prose/examples/35-feature-factory.prose +296 -0
- package/extensions/open-prose/skills/prose/examples/36-bug-hunter.prose +237 -0
- package/extensions/open-prose/skills/prose/examples/37-the-forge.prose +1474 -0
- package/extensions/open-prose/skills/prose/examples/38-skill-scan.prose +455 -0
- package/extensions/open-prose/skills/prose/examples/39-architect-by-simulation.prose +277 -0
- package/extensions/open-prose/skills/prose/examples/40-rlm-self-refine.prose +32 -0
- package/extensions/open-prose/skills/prose/examples/41-rlm-divide-conquer.prose +38 -0
- package/extensions/open-prose/skills/prose/examples/42-rlm-filter-recurse.prose +46 -0
- package/extensions/open-prose/skills/prose/examples/43-rlm-pairwise.prose +50 -0
- package/extensions/open-prose/skills/prose/examples/44-run-endpoint-ux-test.prose +261 -0
- package/extensions/open-prose/skills/prose/examples/45-plugin-release.prose +159 -0
- package/extensions/open-prose/skills/prose/examples/45-run-endpoint-ux-test-with-remediation.prose +637 -0
- package/extensions/open-prose/skills/prose/examples/46-run-endpoint-ux-test-fast.prose +148 -0
- package/extensions/open-prose/skills/prose/examples/46-workflow-crystallizer.prose +225 -0
- package/extensions/open-prose/skills/prose/examples/47-language-self-improvement.prose +356 -0
- package/extensions/open-prose/skills/prose/examples/48-habit-miner.prose +445 -0
- package/extensions/open-prose/skills/prose/examples/49-prose-run-retrospective.prose +210 -0
- package/extensions/open-prose/skills/prose/examples/README.md +391 -0
- package/extensions/open-prose/skills/prose/examples/roadmap/README.md +22 -0
- package/extensions/open-prose/skills/prose/examples/roadmap/iterative-refinement.prose +20 -0
- package/extensions/open-prose/skills/prose/examples/roadmap/parallel-review.prose +18 -0
- package/extensions/open-prose/skills/prose/examples/roadmap/simple-pipeline.prose +17 -0
- package/extensions/open-prose/skills/prose/examples/roadmap/syntax/open-prose-syntax.prose +223 -0
- package/extensions/open-prose/skills/prose/guidance/antipatterns.md +951 -0
- package/extensions/open-prose/skills/prose/guidance/patterns.md +700 -0
- package/extensions/open-prose/skills/prose/guidance/system-prompt.md +180 -0
- package/extensions/open-prose/skills/prose/help.md +144 -0
- package/extensions/open-prose/skills/prose/lib/README.md +108 -0
- package/extensions/open-prose/skills/prose/lib/calibrator.prose +215 -0
- package/extensions/open-prose/skills/prose/lib/cost-analyzer.prose +174 -0
- package/extensions/open-prose/skills/prose/lib/error-forensics.prose +250 -0
- package/extensions/open-prose/skills/prose/lib/inspector.prose +196 -0
- package/extensions/open-prose/skills/prose/lib/profiler.prose +460 -0
- package/extensions/open-prose/skills/prose/lib/program-improver.prose +275 -0
- package/extensions/open-prose/skills/prose/lib/project-memory.prose +118 -0
- package/extensions/open-prose/skills/prose/lib/user-memory.prose +93 -0
- package/extensions/open-prose/skills/prose/lib/vm-improver.prose +243 -0
- package/extensions/open-prose/skills/prose/primitives/session.md +593 -0
- package/extensions/open-prose/skills/prose/prose.md +1237 -0
- package/extensions/open-prose/skills/prose/state/filesystem.md +498 -0
- package/extensions/open-prose/skills/prose/state/in-context.md +384 -0
- package/extensions/open-prose/skills/prose/state/postgres.md +880 -0
- package/extensions/open-prose/skills/prose/state/sqlite.md +574 -0
- package/extensions/qwen-portal-auth/README.md +24 -0
- package/extensions/qwen-portal-auth/index.ts +130 -0
- package/extensions/qwen-portal-auth/oauth.ts +190 -0
- package/extensions/qwen-portal-auth/openclaw.plugin.json +9 -0
- package/extensions/signal/index.ts +17 -0
- package/extensions/signal/node_modules/.bin/openclaw +21 -0
- package/extensions/signal/openclaw.plugin.json +9 -0
- package/extensions/signal/package.json +14 -0
- package/extensions/signal/src/channel.ts +315 -0
- package/extensions/signal/src/runtime.ts +14 -0
- package/extensions/slack/index.ts +17 -0
- package/extensions/slack/node_modules/.bin/openclaw +21 -0
- package/extensions/slack/openclaw.plugin.json +9 -0
- package/extensions/slack/package.json +14 -0
- package/extensions/slack/src/channel.ts +604 -0
- package/extensions/slack/src/runtime.ts +14 -0
- package/extensions/telegram/index.ts +17 -0
- package/extensions/telegram/node_modules/.bin/openclaw +21 -0
- package/extensions/telegram/openclaw.plugin.json +9 -0
- package/extensions/telegram/package.json +14 -0
- package/extensions/telegram/src/channel.ts +482 -0
- package/extensions/telegram/src/runtime.ts +14 -0
- package/extensions/tlon/README.md +5 -0
- package/extensions/tlon/index.ts +17 -0
- package/extensions/tlon/node_modules/.bin/openclaw +21 -0
- package/extensions/tlon/openclaw.plugin.json +9 -0
- package/extensions/tlon/package.json +33 -0
- package/extensions/tlon/src/channel.ts +392 -0
- package/extensions/tlon/src/config-schema.test.ts +31 -0
- package/extensions/tlon/src/config-schema.ts +43 -0
- package/extensions/tlon/src/monitor/discovery.ts +76 -0
- package/extensions/tlon/src/monitor/history.ts +90 -0
- package/extensions/tlon/src/monitor/index.ts +553 -0
- package/extensions/tlon/src/monitor/processed-messages.test.ts +23 -0
- package/extensions/tlon/src/monitor/processed-messages.ts +46 -0
- package/extensions/tlon/src/monitor/utils.ts +105 -0
- package/extensions/tlon/src/onboarding.ts +214 -0
- package/extensions/tlon/src/runtime.ts +14 -0
- package/extensions/tlon/src/targets.ts +89 -0
- package/extensions/tlon/src/types.ts +92 -0
- package/extensions/tlon/src/urbit/auth.ts +18 -0
- package/extensions/tlon/src/urbit/http-api.ts +38 -0
- package/extensions/tlon/src/urbit/send.test.ts +38 -0
- package/extensions/tlon/src/urbit/send.ts +131 -0
- package/extensions/tlon/src/urbit/sse-client.test.ts +40 -0
- package/extensions/tlon/src/urbit/sse-client.ts +395 -0
- package/extensions/twitch/CHANGELOG.md +45 -0
- package/extensions/twitch/README.md +89 -0
- package/extensions/twitch/index.ts +20 -0
- package/extensions/twitch/node_modules/.bin/openclaw +21 -0
- package/extensions/twitch/openclaw.plugin.json +9 -0
- package/extensions/twitch/package.json +20 -0
- package/extensions/twitch/src/access-control.test.ts +489 -0
- package/extensions/twitch/src/access-control.ts +166 -0
- package/extensions/twitch/src/actions.ts +173 -0
- package/extensions/twitch/src/client-manager-registry.ts +115 -0
- package/extensions/twitch/src/config-schema.ts +82 -0
- package/extensions/twitch/src/config.test.ts +87 -0
- package/extensions/twitch/src/config.ts +116 -0
- package/extensions/twitch/src/monitor.ts +261 -0
- package/extensions/twitch/src/onboarding.test.ts +311 -0
- package/extensions/twitch/src/onboarding.ts +417 -0
- package/extensions/twitch/src/outbound.test.ts +373 -0
- package/extensions/twitch/src/outbound.ts +184 -0
- package/extensions/twitch/src/plugin.test.ts +39 -0
- package/extensions/twitch/src/plugin.ts +274 -0
- package/extensions/twitch/src/probe.test.ts +195 -0
- package/extensions/twitch/src/probe.ts +120 -0
- package/extensions/twitch/src/resolver.ts +137 -0
- package/extensions/twitch/src/runtime.ts +14 -0
- package/extensions/twitch/src/send.test.ts +289 -0
- package/extensions/twitch/src/send.ts +136 -0
- package/extensions/twitch/src/status.test.ts +270 -0
- package/extensions/twitch/src/status.ts +178 -0
- package/extensions/twitch/src/token.test.ts +171 -0
- package/extensions/twitch/src/token.ts +91 -0
- package/extensions/twitch/src/twitch-client.test.ts +589 -0
- package/extensions/twitch/src/twitch-client.ts +277 -0
- package/extensions/twitch/src/types.ts +141 -0
- package/extensions/twitch/src/utils/markdown.ts +98 -0
- package/extensions/twitch/src/utils/twitch.ts +78 -0
- package/extensions/twitch/test/setup.ts +7 -0
- package/extensions/voice-call/CHANGELOG.md +109 -0
- package/extensions/voice-call/README.md +139 -0
- package/extensions/voice-call/index.ts +493 -0
- package/extensions/voice-call/node_modules/.bin/openclaw +21 -0
- package/extensions/voice-call/openclaw.plugin.json +559 -0
- package/extensions/voice-call/package.json +19 -0
- package/extensions/voice-call/src/allowlist.ts +19 -0
- package/extensions/voice-call/src/cli.ts +279 -0
- package/extensions/voice-call/src/config.test.ts +234 -0
- package/extensions/voice-call/src/config.ts +523 -0
- package/extensions/voice-call/src/core-bridge.ts +159 -0
- package/extensions/voice-call/src/manager/context.ts +21 -0
- package/extensions/voice-call/src/manager/events.ts +188 -0
- package/extensions/voice-call/src/manager/lookup.ts +35 -0
- package/extensions/voice-call/src/manager/outbound.ts +275 -0
- package/extensions/voice-call/src/manager/state.ts +48 -0
- package/extensions/voice-call/src/manager/store.ts +91 -0
- package/extensions/voice-call/src/manager/timers.ts +89 -0
- package/extensions/voice-call/src/manager/twiml.ts +9 -0
- package/extensions/voice-call/src/manager.test.ts +194 -0
- package/extensions/voice-call/src/manager.ts +887 -0
- package/extensions/voice-call/src/media-stream.test.ts +96 -0
- package/extensions/voice-call/src/media-stream.ts +411 -0
- package/extensions/voice-call/src/providers/base.ts +67 -0
- package/extensions/voice-call/src/providers/index.ts +10 -0
- package/extensions/voice-call/src/providers/mock.ts +165 -0
- package/extensions/voice-call/src/providers/plivo.test.ts +27 -0
- package/extensions/voice-call/src/providers/plivo.ts +515 -0
- package/extensions/voice-call/src/providers/stt-openai-realtime.ts +311 -0
- package/extensions/voice-call/src/providers/telnyx.ts +371 -0
- package/extensions/voice-call/src/providers/tts-openai.ts +259 -0
- package/extensions/voice-call/src/providers/twilio/api.ts +42 -0
- package/extensions/voice-call/src/providers/twilio/webhook.ts +32 -0
- package/extensions/voice-call/src/providers/twilio.test.ts +60 -0
- package/extensions/voice-call/src/providers/twilio.ts +626 -0
- package/extensions/voice-call/src/response-generator.ts +158 -0
- package/extensions/voice-call/src/runtime.ts +212 -0
- package/extensions/voice-call/src/telephony-audio.ts +90 -0
- package/extensions/voice-call/src/telephony-tts.ts +104 -0
- package/extensions/voice-call/src/tunnel.ts +314 -0
- package/extensions/voice-call/src/types.ts +272 -0
- package/extensions/voice-call/src/utils.ts +14 -0
- package/extensions/voice-call/src/voice-mapping.ts +67 -0
- package/extensions/voice-call/src/webhook-security.test.ts +377 -0
- package/extensions/voice-call/src/webhook-security.ts +689 -0
- package/extensions/voice-call/src/webhook.ts +491 -0
- package/extensions/whatsapp/index.ts +17 -0
- package/extensions/whatsapp/node_modules/.bin/openclaw +21 -0
- package/extensions/whatsapp/openclaw.plugin.json +9 -0
- package/extensions/whatsapp/package.json +14 -0
- package/extensions/whatsapp/src/channel.ts +508 -0
- package/extensions/whatsapp/src/runtime.ts +14 -0
- package/extensions/zalo/CHANGELOG.md +89 -0
- package/extensions/zalo/README.md +50 -0
- package/extensions/zalo/index.ts +19 -0
- package/extensions/zalo/node_modules/.bin/openclaw +21 -0
- package/extensions/zalo/openclaw.plugin.json +9 -0
- package/extensions/zalo/package.json +36 -0
- package/extensions/zalo/src/accounts.ts +80 -0
- package/extensions/zalo/src/actions.ts +67 -0
- package/extensions/zalo/src/api.ts +208 -0
- package/extensions/zalo/src/channel.directory.test.ts +43 -0
- package/extensions/zalo/src/channel.ts +414 -0
- package/extensions/zalo/src/config-schema.ts +24 -0
- package/extensions/zalo/src/monitor.ts +753 -0
- package/extensions/zalo/src/monitor.webhook.test.ts +73 -0
- package/extensions/zalo/src/onboarding.ts +401 -0
- package/extensions/zalo/src/probe.ts +46 -0
- package/extensions/zalo/src/proxy.ts +21 -0
- package/extensions/zalo/src/runtime.ts +14 -0
- package/extensions/zalo/src/send.ts +124 -0
- package/extensions/zalo/src/status-issues.ts +53 -0
- package/extensions/zalo/src/token.ts +63 -0
- package/extensions/zalo/src/types.ts +42 -0
- package/extensions/zalouser/CHANGELOG.md +61 -0
- package/extensions/zalouser/README.md +225 -0
- package/extensions/zalouser/index.ts +31 -0
- package/extensions/zalouser/node_modules/.bin/openclaw +21 -0
- package/extensions/zalouser/openclaw.plugin.json +9 -0
- package/extensions/zalouser/package.json +36 -0
- package/extensions/zalouser/src/accounts.ts +135 -0
- package/extensions/zalouser/src/channel.test.ts +18 -0
- package/extensions/zalouser/src/channel.ts +686 -0
- package/extensions/zalouser/src/config-schema.ts +27 -0
- package/extensions/zalouser/src/monitor.ts +590 -0
- package/extensions/zalouser/src/onboarding.ts +504 -0
- package/extensions/zalouser/src/probe.ts +28 -0
- package/extensions/zalouser/src/runtime.ts +14 -0
- package/extensions/zalouser/src/send.ts +160 -0
- package/extensions/zalouser/src/status-issues.test.ts +57 -0
- package/extensions/zalouser/src/status-issues.ts +89 -0
- package/extensions/zalouser/src/tool.ts +164 -0
- package/extensions/zalouser/src/types.ts +108 -0
- package/extensions/zalouser/src/zca.ts +202 -0
- package/openclaw.mjs +14 -0
- package/package.json +245 -0
- package/skills/1password/SKILL.md +70 -0
- package/skills/1password/references/cli-examples.md +29 -0
- package/skills/1password/references/get-started.md +17 -0
- package/skills/apple-notes/SKILL.md +77 -0
- package/skills/apple-reminders/SKILL.md +96 -0
- package/skills/bear-notes/SKILL.md +107 -0
- package/skills/bird/SKILL.md +224 -0
- package/skills/blogwatcher/SKILL.md +69 -0
- package/skills/blucli/SKILL.md +47 -0
- package/skills/bluebubbles/SKILL.md +131 -0
- package/skills/camsnap/SKILL.md +45 -0
- package/skills/canvas/SKILL.md +198 -0
- package/skills/clawhub/SKILL.md +77 -0
- package/skills/coding-agent/SKILL.md +284 -0
- package/skills/discord/SKILL.md +578 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/food-order/SKILL.md +48 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/ghostly-projects/SKILL.md +160 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/github/SKILL.md +77 -0
- package/skills/gog/SKILL.md +116 -0
- package/skills/goplaces/SKILL.md +52 -0
- package/skills/healthcheck/SKILL.md +245 -0
- package/skills/himalaya/SKILL.md +257 -0
- package/skills/himalaya/references/configuration.md +184 -0
- package/skills/himalaya/references/message-composition.md +199 -0
- package/skills/imsg/SKILL.md +74 -0
- package/skills/linear/SKILL.md +111 -0
- package/skills/linear/linear.sh +204 -0
- package/skills/local-places/SERVER_README.md +101 -0
- package/skills/local-places/SKILL.md +102 -0
- package/skills/local-places/pyproject.toml +21 -0
- package/skills/local-places/src/local_places/__init__.py +2 -0
- package/skills/local-places/src/local_places/google_places.py +314 -0
- package/skills/local-places/src/local_places/main.py +65 -0
- package/skills/local-places/src/local_places/schemas.py +107 -0
- package/skills/mcporter/SKILL.md +61 -0
- package/skills/model-usage/SKILL.md +69 -0
- package/skills/model-usage/references/codexbar-cli.md +33 -0
- package/skills/model-usage/scripts/model_usage.py +310 -0
- package/skills/nano-banana-pro/SKILL.md +58 -0
- package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/notion/SKILL.md +172 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-image-gen/SKILL.md +89 -0
- package/skills/openai-image-gen/scripts/gen.py +240 -0
- package/skills/openai-whisper/SKILL.md +38 -0
- package/skills/openai-whisper-api/SKILL.md +52 -0
- package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
- package/skills/openhue/SKILL.md +51 -0
- package/skills/oracle/SKILL.md +125 -0
- package/skills/ordercli/SKILL.md +78 -0
- package/skills/peekaboo/SKILL.md +190 -0
- package/skills/sag/SKILL.md +87 -0
- package/skills/session-logs/SKILL.md +115 -0
- package/skills/sherpa-onnx-tts/SKILL.md +103 -0
- package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
- package/skills/skill-creator/SKILL.md +370 -0
- package/skills/skill-creator/license.txt +202 -0
- package/skills/skill-creator/scripts/init_skill.py +378 -0
- package/skills/skill-creator/scripts/package_skill.py +111 -0
- package/skills/skill-creator/scripts/quick_validate.py +101 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +46 -0
- package/skills/spotify-player/SKILL.md +64 -0
- package/skills/summarize/SKILL.md +87 -0
- package/skills/things-mac/SKILL.md +86 -0
- package/skills/tmux/SKILL.md +135 -0
- package/skills/tmux/scripts/find-sessions.sh +112 -0
- package/skills/tmux/scripts/wait-for-text.sh +83 -0
- package/skills/trello/SKILL.md +95 -0
- package/skills/video-frames/SKILL.md +46 -0
- package/skills/video-frames/scripts/frame.sh +81 -0
- package/skills/voice-call/SKILL.md +45 -0
- package/skills/wacli/SKILL.md +72 -0
- package/skills/weather/SKILL.md +54 -0
|
@@ -0,0 +1,1411 @@
|
|
|
1
|
+
import { $ as DEFAULT_CHAT_CHANNEL, C as setVerbose, M as getResolvedLoggerSettings, k as theme, p as defaultRuntime, v as danger } from "./entry.js";
|
|
2
|
+
import { v as loadAuthProfileStore } from "./auth-profiles-DVLfuixr.js";
|
|
3
|
+
import { t as formatCliCommand } from "./command-format-ayFsmwwz.js";
|
|
4
|
+
import { E as DEFAULT_ACCOUNT_ID, M as normalizeAccountId, c as resolveDefaultAgentId, s as resolveAgentWorkspaceDir } from "./agent-scope-C_O6Vpl0.js";
|
|
5
|
+
import "./utils-DX85MiPR.js";
|
|
6
|
+
import "./exec-B8JKbXKW.js";
|
|
7
|
+
import "./github-copilot-token-C8XFYz0i.js";
|
|
8
|
+
import "./pi-model-discovery-DsRqYJLy.js";
|
|
9
|
+
import { c as writeConfigFile, i as loadConfig, o as readConfigFileSnapshot } from "./config-DfMIMT-f.js";
|
|
10
|
+
import "./manifest-registry-Bwjq9Iev.js";
|
|
11
|
+
import "./server-context-BFH7HB_M.js";
|
|
12
|
+
import "./errors-CMCg46fK.js";
|
|
13
|
+
import "./control-service-o6xe3hEb.js";
|
|
14
|
+
import "./client-DPqNOpK3.js";
|
|
15
|
+
import { n as callGateway } from "./call-vuUQIjOj.js";
|
|
16
|
+
import "./message-channel-Cjsiqxok.js";
|
|
17
|
+
import { t as formatDocsLink } from "./links-B4nk2iDf.js";
|
|
18
|
+
import { i as listChannelPluginCatalogEntries } from "./plugin-auto-enable-Bd_StZzz.js";
|
|
19
|
+
import { n as listChannelPlugins, r as normalizeChannelId, t as getChannelPlugin } from "./plugins-C3Bm-HQV.js";
|
|
20
|
+
import "./logging-pqyrk15z.js";
|
|
21
|
+
import "./accounts-ClnuDahN.js";
|
|
22
|
+
import { Jt as loadProviderUsageSummary, L as fetchChannelPermissionsDiscord, Yt as formatUsageReportLines, xr as createSlackWebClient, yn as parseDiscordTarget } from "./loader-Cn4EV_pf.js";
|
|
23
|
+
import { n as withProgress } from "./progress-Bcjniu7m.js";
|
|
24
|
+
import "./prompt-style-CFsleyxV.js";
|
|
25
|
+
import "./note-_C44YfAQ.js";
|
|
26
|
+
import { t as createClackPrompter } from "./clack-prompter-B9yLhyOm.js";
|
|
27
|
+
import { t as resolveChannelDefaultAccountId } from "./helpers-C12w9zxf.js";
|
|
28
|
+
import { i as reloadOnboardingPluginRegistry, n as setupChannels, r as ensureOnboardingPluginInstalled } from "./onboard-channels-CHBDi-ZA.js";
|
|
29
|
+
import "./archive-ccN9aDgq.js";
|
|
30
|
+
import "./installs-BP4K5L33.js";
|
|
31
|
+
import "./manager-CfGY5zND.js";
|
|
32
|
+
import "./paths-CHGbP1-A.js";
|
|
33
|
+
import "./sqlite-CmdZSZRx.js";
|
|
34
|
+
import "./routes-C6UpTPas.js";
|
|
35
|
+
import "./pi-embedded-helpers-CT5VuLCb.js";
|
|
36
|
+
import "./deliver-BxK5nI2P.js";
|
|
37
|
+
import "./sandbox-Ca81z3Tw.js";
|
|
38
|
+
import { n as formatAge } from "./channel-summary-B4G513Eb.js";
|
|
39
|
+
import "./wsl-D2O2qOrl.js";
|
|
40
|
+
import "./skills-Bhp0l6UK.js";
|
|
41
|
+
import "./image-BzJtY34J.js";
|
|
42
|
+
import "./redact-BICFkpn7.js";
|
|
43
|
+
import "./tool-display-NYQnSpdo.js";
|
|
44
|
+
import "./restart-sentinel-Cr0vUxB8.js";
|
|
45
|
+
import { n as resolveMessageChannelSelection } from "./channel-selection-cGhL9G0c.js";
|
|
46
|
+
import "./commands-BRe9VTyU.js";
|
|
47
|
+
import "./pairing-store-DRn08lZD.js";
|
|
48
|
+
import "./login-qr-D7Zdgji2.js";
|
|
49
|
+
import { r as runCommandWithRuntime } from "./cli-utils-CO4jEMn0.js";
|
|
50
|
+
import "./pairing-labels-Ds7BPOkj.js";
|
|
51
|
+
import { t as buildChannelAccountSnapshot } from "./status-Vuqbw2Bb.js";
|
|
52
|
+
import { t as parseLogLine } from "./parse-log-line-DxRaGzQb.js";
|
|
53
|
+
import { t as collectChannelStatusIssues } from "./channels-status-issues-ZcR1U-m5.js";
|
|
54
|
+
import { t as hasExplicitOptions } from "./command-options-CsjxK4cZ.js";
|
|
55
|
+
import { t as formatCliChannelOptions } from "./channel-options-CJfmOkol.js";
|
|
56
|
+
import fs from "node:fs/promises";
|
|
57
|
+
|
|
58
|
+
//#region src/commands/channels/add-mutators.ts
|
|
59
|
+
function applyAccountName(params) {
|
|
60
|
+
const accountId = normalizeAccountId(params.accountId);
|
|
61
|
+
const apply = getChannelPlugin(params.channel)?.setup?.applyAccountName;
|
|
62
|
+
return apply ? apply({
|
|
63
|
+
cfg: params.cfg,
|
|
64
|
+
accountId,
|
|
65
|
+
name: params.name
|
|
66
|
+
}) : params.cfg;
|
|
67
|
+
}
|
|
68
|
+
function applyChannelAccountConfig(params) {
|
|
69
|
+
const accountId = normalizeAccountId(params.accountId);
|
|
70
|
+
const apply = getChannelPlugin(params.channel)?.setup?.applyAccountConfig;
|
|
71
|
+
if (!apply) return params.cfg;
|
|
72
|
+
const input = {
|
|
73
|
+
name: params.name,
|
|
74
|
+
token: params.token,
|
|
75
|
+
tokenFile: params.tokenFile,
|
|
76
|
+
botToken: params.botToken,
|
|
77
|
+
appToken: params.appToken,
|
|
78
|
+
signalNumber: params.signalNumber,
|
|
79
|
+
cliPath: params.cliPath,
|
|
80
|
+
dbPath: params.dbPath,
|
|
81
|
+
service: params.service,
|
|
82
|
+
region: params.region,
|
|
83
|
+
authDir: params.authDir,
|
|
84
|
+
httpUrl: params.httpUrl,
|
|
85
|
+
httpHost: params.httpHost,
|
|
86
|
+
httpPort: params.httpPort,
|
|
87
|
+
webhookPath: params.webhookPath,
|
|
88
|
+
webhookUrl: params.webhookUrl,
|
|
89
|
+
audienceType: params.audienceType,
|
|
90
|
+
audience: params.audience,
|
|
91
|
+
useEnv: params.useEnv,
|
|
92
|
+
homeserver: params.homeserver,
|
|
93
|
+
userId: params.userId,
|
|
94
|
+
accessToken: params.accessToken,
|
|
95
|
+
password: params.password,
|
|
96
|
+
deviceName: params.deviceName,
|
|
97
|
+
initialSyncLimit: params.initialSyncLimit,
|
|
98
|
+
ship: params.ship,
|
|
99
|
+
url: params.url,
|
|
100
|
+
code: params.code,
|
|
101
|
+
groupChannels: params.groupChannels,
|
|
102
|
+
dmAllowlist: params.dmAllowlist,
|
|
103
|
+
autoDiscoverChannels: params.autoDiscoverChannels
|
|
104
|
+
};
|
|
105
|
+
return apply({
|
|
106
|
+
cfg: params.cfg,
|
|
107
|
+
accountId,
|
|
108
|
+
input
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
//#endregion
|
|
113
|
+
//#region src/commands/channels/shared.ts
|
|
114
|
+
async function requireValidConfig(runtime = defaultRuntime) {
|
|
115
|
+
const snapshot = await readConfigFileSnapshot();
|
|
116
|
+
if (snapshot.exists && !snapshot.valid) {
|
|
117
|
+
const issues = snapshot.issues.length > 0 ? snapshot.issues.map((issue) => `- ${issue.path}: ${issue.message}`).join("\n") : "Unknown validation issue.";
|
|
118
|
+
runtime.error(`Config invalid:\n${issues}`);
|
|
119
|
+
runtime.error(`Fix the config or run ${formatCliCommand("openclaw doctor")}.`);
|
|
120
|
+
runtime.exit(1);
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
return snapshot.config;
|
|
124
|
+
}
|
|
125
|
+
function formatAccountLabel(params) {
|
|
126
|
+
const base = params.accountId || DEFAULT_ACCOUNT_ID;
|
|
127
|
+
if (params.name?.trim()) return `${base} (${params.name.trim()})`;
|
|
128
|
+
return base;
|
|
129
|
+
}
|
|
130
|
+
const channelLabel = (channel) => {
|
|
131
|
+
return getChannelPlugin(channel)?.meta.label ?? channel;
|
|
132
|
+
};
|
|
133
|
+
function formatChannelAccountLabel(params) {
|
|
134
|
+
const channelText = channelLabel(params.channel);
|
|
135
|
+
const accountText = formatAccountLabel({
|
|
136
|
+
accountId: params.accountId,
|
|
137
|
+
name: params.name
|
|
138
|
+
});
|
|
139
|
+
return `${params.channelStyle ? params.channelStyle(channelText) : channelText} ${params.accountStyle ? params.accountStyle(accountText) : accountText}`;
|
|
140
|
+
}
|
|
141
|
+
function shouldUseWizard(params) {
|
|
142
|
+
return params?.hasFlags === false;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region src/commands/channels/add.ts
|
|
147
|
+
function parseList(value) {
|
|
148
|
+
if (!value?.trim()) return;
|
|
149
|
+
const parsed = value.split(/[\n,;]+/g).map((entry) => entry.trim()).filter(Boolean);
|
|
150
|
+
return parsed.length > 0 ? parsed : void 0;
|
|
151
|
+
}
|
|
152
|
+
function resolveCatalogChannelEntry(raw, cfg) {
|
|
153
|
+
const trimmed = raw.trim().toLowerCase();
|
|
154
|
+
if (!trimmed) return;
|
|
155
|
+
return listChannelPluginCatalogEntries({ workspaceDir: cfg ? resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)) : void 0 }).find((entry) => {
|
|
156
|
+
if (entry.id.toLowerCase() === trimmed) return true;
|
|
157
|
+
return (entry.meta.aliases ?? []).some((alias) => alias.trim().toLowerCase() === trimmed);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
async function channelsAddCommand(opts, runtime = defaultRuntime, params) {
|
|
161
|
+
const cfg = await requireValidConfig(runtime);
|
|
162
|
+
if (!cfg) return;
|
|
163
|
+
let nextConfig = cfg;
|
|
164
|
+
if (shouldUseWizard(params)) {
|
|
165
|
+
const prompter = createClackPrompter();
|
|
166
|
+
let selection = [];
|
|
167
|
+
const accountIds = {};
|
|
168
|
+
await prompter.intro("Channel setup");
|
|
169
|
+
let nextConfig = await setupChannels(cfg, runtime, prompter, {
|
|
170
|
+
allowDisable: false,
|
|
171
|
+
allowSignalInstall: true,
|
|
172
|
+
promptAccountIds: true,
|
|
173
|
+
onSelection: (value) => {
|
|
174
|
+
selection = value;
|
|
175
|
+
},
|
|
176
|
+
onAccountId: (channel, accountId) => {
|
|
177
|
+
accountIds[channel] = accountId;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
if (selection.length === 0) {
|
|
181
|
+
await prompter.outro("No channels selected.");
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (await prompter.confirm({
|
|
185
|
+
message: "Add display names for these accounts? (optional)",
|
|
186
|
+
initialValue: false
|
|
187
|
+
})) for (const channel of selection) {
|
|
188
|
+
const accountId = accountIds[channel] ?? DEFAULT_ACCOUNT_ID;
|
|
189
|
+
const plugin = getChannelPlugin(channel);
|
|
190
|
+
const account = plugin?.config.resolveAccount(nextConfig, accountId);
|
|
191
|
+
const existingName = (plugin?.config.describeAccount?.(account, nextConfig))?.name ?? account?.name;
|
|
192
|
+
const name = await prompter.text({
|
|
193
|
+
message: `${channel} account name (${accountId})`,
|
|
194
|
+
initialValue: existingName
|
|
195
|
+
});
|
|
196
|
+
if (name?.trim()) nextConfig = applyAccountName({
|
|
197
|
+
cfg: nextConfig,
|
|
198
|
+
channel,
|
|
199
|
+
accountId,
|
|
200
|
+
name
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
await writeConfigFile(nextConfig);
|
|
204
|
+
await prompter.outro("Channels updated.");
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
const rawChannel = String(opts.channel ?? "");
|
|
208
|
+
let channel = normalizeChannelId(rawChannel);
|
|
209
|
+
let catalogEntry = channel ? void 0 : resolveCatalogChannelEntry(rawChannel, nextConfig);
|
|
210
|
+
if (!channel && catalogEntry) {
|
|
211
|
+
const prompter = createClackPrompter();
|
|
212
|
+
const workspaceDir = resolveAgentWorkspaceDir(nextConfig, resolveDefaultAgentId(nextConfig));
|
|
213
|
+
const result = await ensureOnboardingPluginInstalled({
|
|
214
|
+
cfg: nextConfig,
|
|
215
|
+
entry: catalogEntry,
|
|
216
|
+
prompter,
|
|
217
|
+
runtime,
|
|
218
|
+
workspaceDir
|
|
219
|
+
});
|
|
220
|
+
nextConfig = result.cfg;
|
|
221
|
+
if (!result.installed) return;
|
|
222
|
+
reloadOnboardingPluginRegistry({
|
|
223
|
+
cfg: nextConfig,
|
|
224
|
+
runtime,
|
|
225
|
+
workspaceDir
|
|
226
|
+
});
|
|
227
|
+
channel = normalizeChannelId(catalogEntry.id) ?? catalogEntry.id;
|
|
228
|
+
}
|
|
229
|
+
if (!channel) {
|
|
230
|
+
const hint = catalogEntry ? `Plugin ${catalogEntry.meta.label} could not be loaded after install.` : `Unknown channel: ${String(opts.channel ?? "")}`;
|
|
231
|
+
runtime.error(hint);
|
|
232
|
+
runtime.exit(1);
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const plugin = getChannelPlugin(channel);
|
|
236
|
+
if (!plugin?.setup?.applyAccountConfig) {
|
|
237
|
+
runtime.error(`Channel ${channel} does not support add.`);
|
|
238
|
+
runtime.exit(1);
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
const accountId = plugin.setup.resolveAccountId?.({
|
|
242
|
+
cfg: nextConfig,
|
|
243
|
+
accountId: opts.account
|
|
244
|
+
}) ?? normalizeAccountId(opts.account);
|
|
245
|
+
const useEnv = opts.useEnv === true;
|
|
246
|
+
const initialSyncLimit = typeof opts.initialSyncLimit === "number" ? opts.initialSyncLimit : typeof opts.initialSyncLimit === "string" && opts.initialSyncLimit.trim() ? Number.parseInt(opts.initialSyncLimit, 10) : void 0;
|
|
247
|
+
const groupChannels = parseList(opts.groupChannels);
|
|
248
|
+
const dmAllowlist = parseList(opts.dmAllowlist);
|
|
249
|
+
const validationError = plugin.setup.validateInput?.({
|
|
250
|
+
cfg: nextConfig,
|
|
251
|
+
accountId,
|
|
252
|
+
input: {
|
|
253
|
+
name: opts.name,
|
|
254
|
+
token: opts.token,
|
|
255
|
+
tokenFile: opts.tokenFile,
|
|
256
|
+
botToken: opts.botToken,
|
|
257
|
+
appToken: opts.appToken,
|
|
258
|
+
signalNumber: opts.signalNumber,
|
|
259
|
+
cliPath: opts.cliPath,
|
|
260
|
+
dbPath: opts.dbPath,
|
|
261
|
+
service: opts.service,
|
|
262
|
+
region: opts.region,
|
|
263
|
+
authDir: opts.authDir,
|
|
264
|
+
httpUrl: opts.httpUrl,
|
|
265
|
+
httpHost: opts.httpHost,
|
|
266
|
+
httpPort: opts.httpPort,
|
|
267
|
+
webhookPath: opts.webhookPath,
|
|
268
|
+
webhookUrl: opts.webhookUrl,
|
|
269
|
+
audienceType: opts.audienceType,
|
|
270
|
+
audience: opts.audience,
|
|
271
|
+
homeserver: opts.homeserver,
|
|
272
|
+
userId: opts.userId,
|
|
273
|
+
accessToken: opts.accessToken,
|
|
274
|
+
password: opts.password,
|
|
275
|
+
deviceName: opts.deviceName,
|
|
276
|
+
initialSyncLimit,
|
|
277
|
+
useEnv,
|
|
278
|
+
ship: opts.ship,
|
|
279
|
+
url: opts.url,
|
|
280
|
+
code: opts.code,
|
|
281
|
+
groupChannels,
|
|
282
|
+
dmAllowlist,
|
|
283
|
+
autoDiscoverChannels: opts.autoDiscoverChannels
|
|
284
|
+
}
|
|
285
|
+
});
|
|
286
|
+
if (validationError) {
|
|
287
|
+
runtime.error(validationError);
|
|
288
|
+
runtime.exit(1);
|
|
289
|
+
return;
|
|
290
|
+
}
|
|
291
|
+
nextConfig = applyChannelAccountConfig({
|
|
292
|
+
cfg: nextConfig,
|
|
293
|
+
channel,
|
|
294
|
+
accountId,
|
|
295
|
+
name: opts.name,
|
|
296
|
+
token: opts.token,
|
|
297
|
+
tokenFile: opts.tokenFile,
|
|
298
|
+
botToken: opts.botToken,
|
|
299
|
+
appToken: opts.appToken,
|
|
300
|
+
signalNumber: opts.signalNumber,
|
|
301
|
+
cliPath: opts.cliPath,
|
|
302
|
+
dbPath: opts.dbPath,
|
|
303
|
+
service: opts.service,
|
|
304
|
+
region: opts.region,
|
|
305
|
+
authDir: opts.authDir,
|
|
306
|
+
httpUrl: opts.httpUrl,
|
|
307
|
+
httpHost: opts.httpHost,
|
|
308
|
+
httpPort: opts.httpPort,
|
|
309
|
+
webhookPath: opts.webhookPath,
|
|
310
|
+
webhookUrl: opts.webhookUrl,
|
|
311
|
+
audienceType: opts.audienceType,
|
|
312
|
+
audience: opts.audience,
|
|
313
|
+
homeserver: opts.homeserver,
|
|
314
|
+
userId: opts.userId,
|
|
315
|
+
accessToken: opts.accessToken,
|
|
316
|
+
password: opts.password,
|
|
317
|
+
deviceName: opts.deviceName,
|
|
318
|
+
initialSyncLimit,
|
|
319
|
+
useEnv,
|
|
320
|
+
ship: opts.ship,
|
|
321
|
+
url: opts.url,
|
|
322
|
+
code: opts.code,
|
|
323
|
+
groupChannels,
|
|
324
|
+
dmAllowlist,
|
|
325
|
+
autoDiscoverChannels: opts.autoDiscoverChannels
|
|
326
|
+
});
|
|
327
|
+
await writeConfigFile(nextConfig);
|
|
328
|
+
runtime.log(`Added ${channelLabel(channel)} account "${accountId}".`);
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
//#endregion
|
|
332
|
+
//#region src/slack/scopes.ts
|
|
333
|
+
function isRecord(value) {
|
|
334
|
+
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
335
|
+
}
|
|
336
|
+
function collectScopes(value, into) {
|
|
337
|
+
if (!value) return;
|
|
338
|
+
if (Array.isArray(value)) {
|
|
339
|
+
for (const entry of value) if (typeof entry === "string" && entry.trim()) into.push(entry.trim());
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
if (typeof value === "string") {
|
|
343
|
+
const raw = value.trim();
|
|
344
|
+
if (!raw) return;
|
|
345
|
+
const parts = raw.split(/[,\s]+/).map((part) => part.trim());
|
|
346
|
+
for (const part of parts) if (part) into.push(part);
|
|
347
|
+
return;
|
|
348
|
+
}
|
|
349
|
+
if (!isRecord(value)) return;
|
|
350
|
+
for (const entry of Object.values(value)) if (Array.isArray(entry) || typeof entry === "string") collectScopes(entry, into);
|
|
351
|
+
}
|
|
352
|
+
function normalizeScopes(scopes) {
|
|
353
|
+
return Array.from(new Set(scopes.map((scope) => scope.trim()).filter(Boolean))).toSorted();
|
|
354
|
+
}
|
|
355
|
+
function extractScopes(payload) {
|
|
356
|
+
if (!isRecord(payload)) return [];
|
|
357
|
+
const scopes = [];
|
|
358
|
+
collectScopes(payload.scopes, scopes);
|
|
359
|
+
collectScopes(payload.scope, scopes);
|
|
360
|
+
if (isRecord(payload.info)) {
|
|
361
|
+
collectScopes(payload.info.scopes, scopes);
|
|
362
|
+
collectScopes(payload.info.scope, scopes);
|
|
363
|
+
collectScopes(payload.info.user_scopes, scopes);
|
|
364
|
+
collectScopes(payload.info.bot_scopes, scopes);
|
|
365
|
+
}
|
|
366
|
+
return normalizeScopes(scopes);
|
|
367
|
+
}
|
|
368
|
+
function readError(payload) {
|
|
369
|
+
if (!isRecord(payload)) return;
|
|
370
|
+
const error = payload.error;
|
|
371
|
+
return typeof error === "string" && error.trim() ? error.trim() : void 0;
|
|
372
|
+
}
|
|
373
|
+
async function callSlack(client, method) {
|
|
374
|
+
try {
|
|
375
|
+
const result = await client.apiCall(method);
|
|
376
|
+
return isRecord(result) ? result : null;
|
|
377
|
+
} catch (err) {
|
|
378
|
+
return {
|
|
379
|
+
ok: false,
|
|
380
|
+
error: err instanceof Error ? err.message : String(err)
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
async function fetchSlackScopes(token, timeoutMs) {
|
|
385
|
+
const client = createSlackWebClient(token, { timeout: timeoutMs });
|
|
386
|
+
const attempts = ["auth.scopes", "apps.permissions.info"];
|
|
387
|
+
const errors = [];
|
|
388
|
+
for (const method of attempts) {
|
|
389
|
+
const result = await callSlack(client, method);
|
|
390
|
+
const scopes = extractScopes(result);
|
|
391
|
+
if (scopes.length > 0) return {
|
|
392
|
+
ok: true,
|
|
393
|
+
scopes,
|
|
394
|
+
source: method
|
|
395
|
+
};
|
|
396
|
+
const error = readError(result);
|
|
397
|
+
if (error) errors.push(`${method}: ${error}`);
|
|
398
|
+
}
|
|
399
|
+
return {
|
|
400
|
+
ok: false,
|
|
401
|
+
error: errors.length > 0 ? errors.join(" | ") : "no scopes returned"
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
//#endregion
|
|
406
|
+
//#region src/commands/channels/capabilities.ts
|
|
407
|
+
const REQUIRED_DISCORD_PERMISSIONS = ["ViewChannel", "SendMessages"];
|
|
408
|
+
const TEAMS_GRAPH_PERMISSION_HINTS = {
|
|
409
|
+
"ChannelMessage.Read.All": "channel history",
|
|
410
|
+
"Chat.Read.All": "chat history",
|
|
411
|
+
"Channel.ReadBasic.All": "channel list",
|
|
412
|
+
"Team.ReadBasic.All": "team list",
|
|
413
|
+
"TeamsActivity.Read.All": "teams activity",
|
|
414
|
+
"Sites.Read.All": "files (SharePoint)",
|
|
415
|
+
"Files.Read.All": "files (OneDrive)"
|
|
416
|
+
};
|
|
417
|
+
function normalizeTimeout(raw, fallback = 1e4) {
|
|
418
|
+
const value = typeof raw === "string" ? Number(raw) : Number(raw);
|
|
419
|
+
if (!Number.isFinite(value) || value <= 0) return fallback;
|
|
420
|
+
return value;
|
|
421
|
+
}
|
|
422
|
+
function formatSupport(capabilities) {
|
|
423
|
+
if (!capabilities) return "unknown";
|
|
424
|
+
const bits = [];
|
|
425
|
+
if (capabilities.chatTypes?.length) bits.push(`chatTypes=${capabilities.chatTypes.join(",")}`);
|
|
426
|
+
if (capabilities.polls) bits.push("polls");
|
|
427
|
+
if (capabilities.reactions) bits.push("reactions");
|
|
428
|
+
if (capabilities.edit) bits.push("edit");
|
|
429
|
+
if (capabilities.unsend) bits.push("unsend");
|
|
430
|
+
if (capabilities.reply) bits.push("reply");
|
|
431
|
+
if (capabilities.effects) bits.push("effects");
|
|
432
|
+
if (capabilities.groupManagement) bits.push("groupManagement");
|
|
433
|
+
if (capabilities.threads) bits.push("threads");
|
|
434
|
+
if (capabilities.media) bits.push("media");
|
|
435
|
+
if (capabilities.nativeCommands) bits.push("nativeCommands");
|
|
436
|
+
if (capabilities.blockStreaming) bits.push("blockStreaming");
|
|
437
|
+
return bits.length ? bits.join(" ") : "none";
|
|
438
|
+
}
|
|
439
|
+
function summarizeDiscordTarget(raw) {
|
|
440
|
+
if (!raw) return;
|
|
441
|
+
const target = parseDiscordTarget(raw, { defaultKind: "channel" });
|
|
442
|
+
if (!target) return { raw };
|
|
443
|
+
if (target.kind === "channel") return {
|
|
444
|
+
raw,
|
|
445
|
+
normalized: target.normalized,
|
|
446
|
+
kind: "channel",
|
|
447
|
+
channelId: target.id
|
|
448
|
+
};
|
|
449
|
+
if (target.kind === "user") return {
|
|
450
|
+
raw,
|
|
451
|
+
normalized: target.normalized,
|
|
452
|
+
kind: "user"
|
|
453
|
+
};
|
|
454
|
+
return {
|
|
455
|
+
raw,
|
|
456
|
+
normalized: target.normalized
|
|
457
|
+
};
|
|
458
|
+
}
|
|
459
|
+
function formatDiscordIntents(intents) {
|
|
460
|
+
if (!intents) return "unknown";
|
|
461
|
+
return [
|
|
462
|
+
`messageContent=${intents.messageContent ?? "unknown"}`,
|
|
463
|
+
`guildMembers=${intents.guildMembers ?? "unknown"}`,
|
|
464
|
+
`presence=${intents.presence ?? "unknown"}`
|
|
465
|
+
].join(" ");
|
|
466
|
+
}
|
|
467
|
+
function formatProbeLines(channelId, probe) {
|
|
468
|
+
const lines = [];
|
|
469
|
+
if (!probe || typeof probe !== "object") return lines;
|
|
470
|
+
const probeObj = probe;
|
|
471
|
+
if (channelId === "discord") {
|
|
472
|
+
const bot = probeObj.bot;
|
|
473
|
+
if (bot?.username) {
|
|
474
|
+
const botId = bot.id ? ` (${bot.id})` : "";
|
|
475
|
+
lines.push(`Bot: ${theme.accent(`@${bot.username}`)}${botId}`);
|
|
476
|
+
}
|
|
477
|
+
const app = probeObj.application;
|
|
478
|
+
if (app?.intents) lines.push(`Intents: ${formatDiscordIntents(app.intents)}`);
|
|
479
|
+
}
|
|
480
|
+
if (channelId === "telegram") {
|
|
481
|
+
const bot = probeObj.bot;
|
|
482
|
+
if (bot?.username) {
|
|
483
|
+
const botId = bot.id ? ` (${bot.id})` : "";
|
|
484
|
+
lines.push(`Bot: ${theme.accent(`@${bot.username}`)}${botId}`);
|
|
485
|
+
}
|
|
486
|
+
const flags = [];
|
|
487
|
+
const canJoinGroups = bot?.canJoinGroups;
|
|
488
|
+
const canReadAll = bot?.canReadAllGroupMessages;
|
|
489
|
+
const inlineQueries = bot?.supportsInlineQueries;
|
|
490
|
+
if (typeof canJoinGroups === "boolean") flags.push(`joinGroups=${canJoinGroups}`);
|
|
491
|
+
if (typeof canReadAll === "boolean") flags.push(`readAllGroupMessages=${canReadAll}`);
|
|
492
|
+
if (typeof inlineQueries === "boolean") flags.push(`inlineQueries=${inlineQueries}`);
|
|
493
|
+
if (flags.length > 0) lines.push(`Flags: ${flags.join(" ")}`);
|
|
494
|
+
const webhook = probeObj.webhook;
|
|
495
|
+
if (webhook?.url !== void 0) lines.push(`Webhook: ${webhook.url || "none"}`);
|
|
496
|
+
}
|
|
497
|
+
if (channelId === "slack") {
|
|
498
|
+
const bot = probeObj.bot;
|
|
499
|
+
const team = probeObj.team;
|
|
500
|
+
if (bot?.name) lines.push(`Bot: ${theme.accent(`@${bot.name}`)}`);
|
|
501
|
+
if (team?.name || team?.id) {
|
|
502
|
+
const id = team?.id ? ` (${team.id})` : "";
|
|
503
|
+
lines.push(`Team: ${team?.name ?? "unknown"}${id}`);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
if (channelId === "signal") {
|
|
507
|
+
const version = probeObj.version;
|
|
508
|
+
if (version) lines.push(`Signal daemon: ${version}`);
|
|
509
|
+
}
|
|
510
|
+
if (channelId === "msteams") {
|
|
511
|
+
const appId = typeof probeObj.appId === "string" ? probeObj.appId.trim() : "";
|
|
512
|
+
if (appId) lines.push(`App: ${theme.accent(appId)}`);
|
|
513
|
+
const graph = probeObj.graph;
|
|
514
|
+
if (graph) {
|
|
515
|
+
const roles = Array.isArray(graph.roles) ? graph.roles.map((role) => String(role).trim()).filter(Boolean) : [];
|
|
516
|
+
const scopes = typeof graph.scopes === "string" ? graph.scopes.split(/\s+/).map((scope) => scope.trim()).filter(Boolean) : Array.isArray(graph.scopes) ? graph.scopes.map((scope) => String(scope).trim()).filter(Boolean) : [];
|
|
517
|
+
if (graph.ok === false) lines.push(`Graph: ${theme.error(graph.error ?? "failed")}`);
|
|
518
|
+
else if (roles.length > 0 || scopes.length > 0) {
|
|
519
|
+
const formatPermission = (permission) => {
|
|
520
|
+
const hint = TEAMS_GRAPH_PERMISSION_HINTS[permission];
|
|
521
|
+
return hint ? `${permission} (${hint})` : permission;
|
|
522
|
+
};
|
|
523
|
+
if (roles.length > 0) lines.push(`Graph roles: ${roles.map(formatPermission).join(", ")}`);
|
|
524
|
+
if (scopes.length > 0) lines.push(`Graph scopes: ${scopes.map(formatPermission).join(", ")}`);
|
|
525
|
+
} else if (graph.ok === true) lines.push("Graph: ok");
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
const ok = typeof probeObj.ok === "boolean" ? probeObj.ok : void 0;
|
|
529
|
+
if (ok === true && lines.length === 0) lines.push("Probe: ok");
|
|
530
|
+
if (ok === false) {
|
|
531
|
+
const error = typeof probeObj.error === "string" && probeObj.error ? ` (${probeObj.error})` : "";
|
|
532
|
+
lines.push(`Probe: ${theme.error(`failed${error}`)}`);
|
|
533
|
+
}
|
|
534
|
+
return lines;
|
|
535
|
+
}
|
|
536
|
+
async function buildDiscordPermissions(params) {
|
|
537
|
+
const target = summarizeDiscordTarget(params.target?.trim());
|
|
538
|
+
if (!target) return {};
|
|
539
|
+
if (target.kind !== "channel" || !target.channelId) return {
|
|
540
|
+
target,
|
|
541
|
+
report: { error: "Target looks like a DM user; pass channel:<id> to audit channel permissions." }
|
|
542
|
+
};
|
|
543
|
+
const token = params.account.token?.trim();
|
|
544
|
+
if (!token) return {
|
|
545
|
+
target,
|
|
546
|
+
report: {
|
|
547
|
+
channelId: target.channelId,
|
|
548
|
+
error: "Discord bot token missing for permission audit."
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
try {
|
|
552
|
+
const perms = await fetchChannelPermissionsDiscord(target.channelId, {
|
|
553
|
+
token,
|
|
554
|
+
accountId: params.account.accountId ?? void 0
|
|
555
|
+
});
|
|
556
|
+
const missing = REQUIRED_DISCORD_PERMISSIONS.filter((permission) => !perms.permissions.includes(permission));
|
|
557
|
+
return {
|
|
558
|
+
target,
|
|
559
|
+
report: {
|
|
560
|
+
channelId: perms.channelId,
|
|
561
|
+
guildId: perms.guildId,
|
|
562
|
+
isDm: perms.isDm,
|
|
563
|
+
channelType: perms.channelType,
|
|
564
|
+
permissions: perms.permissions,
|
|
565
|
+
missingRequired: missing.length ? missing : [],
|
|
566
|
+
raw: perms.raw
|
|
567
|
+
}
|
|
568
|
+
};
|
|
569
|
+
} catch (err) {
|
|
570
|
+
return {
|
|
571
|
+
target,
|
|
572
|
+
report: {
|
|
573
|
+
channelId: target.channelId,
|
|
574
|
+
error: err instanceof Error ? err.message : String(err)
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
}
|
|
579
|
+
async function resolveChannelReports(params) {
|
|
580
|
+
const { plugin, cfg, timeoutMs } = params;
|
|
581
|
+
const accountIds = params.accountOverride ? [params.accountOverride] : (() => {
|
|
582
|
+
const ids = plugin.config.listAccountIds(cfg);
|
|
583
|
+
return ids.length > 0 ? ids : [resolveChannelDefaultAccountId({
|
|
584
|
+
plugin,
|
|
585
|
+
cfg,
|
|
586
|
+
accountIds: ids
|
|
587
|
+
})];
|
|
588
|
+
})();
|
|
589
|
+
const reports = [];
|
|
590
|
+
const listedActions = plugin.actions?.listActions?.({ cfg }) ?? [];
|
|
591
|
+
const actions = Array.from(new Set([
|
|
592
|
+
"send",
|
|
593
|
+
"broadcast",
|
|
594
|
+
...listedActions.map((action) => String(action))
|
|
595
|
+
]));
|
|
596
|
+
for (const accountId of accountIds) {
|
|
597
|
+
const resolvedAccount = plugin.config.resolveAccount(cfg, accountId);
|
|
598
|
+
const configured = plugin.config.isConfigured ? await plugin.config.isConfigured(resolvedAccount, cfg) : Boolean(resolvedAccount);
|
|
599
|
+
const enabled = plugin.config.isEnabled ? plugin.config.isEnabled(resolvedAccount, cfg) : resolvedAccount.enabled !== false;
|
|
600
|
+
let probe;
|
|
601
|
+
if (configured && enabled && plugin.status?.probeAccount) try {
|
|
602
|
+
probe = await plugin.status.probeAccount({
|
|
603
|
+
account: resolvedAccount,
|
|
604
|
+
timeoutMs,
|
|
605
|
+
cfg
|
|
606
|
+
});
|
|
607
|
+
} catch (err) {
|
|
608
|
+
probe = {
|
|
609
|
+
ok: false,
|
|
610
|
+
error: err instanceof Error ? err.message : String(err)
|
|
611
|
+
};
|
|
612
|
+
}
|
|
613
|
+
let slackScopes;
|
|
614
|
+
if (plugin.id === "slack" && configured && enabled) {
|
|
615
|
+
const botToken = resolvedAccount.botToken?.trim();
|
|
616
|
+
const userToken = resolvedAccount.config?.userToken?.trim();
|
|
617
|
+
const scopeReports = [];
|
|
618
|
+
if (botToken) scopeReports.push({
|
|
619
|
+
tokenType: "bot",
|
|
620
|
+
result: await fetchSlackScopes(botToken, timeoutMs)
|
|
621
|
+
});
|
|
622
|
+
else scopeReports.push({
|
|
623
|
+
tokenType: "bot",
|
|
624
|
+
result: {
|
|
625
|
+
ok: false,
|
|
626
|
+
error: "Slack bot token missing."
|
|
627
|
+
}
|
|
628
|
+
});
|
|
629
|
+
if (userToken) scopeReports.push({
|
|
630
|
+
tokenType: "user",
|
|
631
|
+
result: await fetchSlackScopes(userToken, timeoutMs)
|
|
632
|
+
});
|
|
633
|
+
slackScopes = scopeReports;
|
|
634
|
+
}
|
|
635
|
+
let discordTarget;
|
|
636
|
+
let discordPermissions;
|
|
637
|
+
if (plugin.id === "discord" && params.target) {
|
|
638
|
+
const perms = await buildDiscordPermissions({
|
|
639
|
+
account: resolvedAccount,
|
|
640
|
+
target: params.target
|
|
641
|
+
});
|
|
642
|
+
discordTarget = perms.target;
|
|
643
|
+
discordPermissions = perms.report;
|
|
644
|
+
}
|
|
645
|
+
reports.push({
|
|
646
|
+
channel: plugin.id,
|
|
647
|
+
accountId,
|
|
648
|
+
accountName: typeof resolvedAccount.name === "string" ? resolvedAccount.name?.trim() || void 0 : void 0,
|
|
649
|
+
configured,
|
|
650
|
+
enabled,
|
|
651
|
+
support: plugin.capabilities,
|
|
652
|
+
probe,
|
|
653
|
+
target: discordTarget,
|
|
654
|
+
channelPermissions: discordPermissions,
|
|
655
|
+
actions,
|
|
656
|
+
slackScopes
|
|
657
|
+
});
|
|
658
|
+
}
|
|
659
|
+
return reports;
|
|
660
|
+
}
|
|
661
|
+
async function channelsCapabilitiesCommand(opts, runtime = defaultRuntime) {
|
|
662
|
+
const cfg = await requireValidConfig(runtime);
|
|
663
|
+
if (!cfg) return;
|
|
664
|
+
const timeoutMs = normalizeTimeout(opts.timeout, 1e4);
|
|
665
|
+
const rawChannel = typeof opts.channel === "string" ? opts.channel.trim().toLowerCase() : "";
|
|
666
|
+
const rawTarget = typeof opts.target === "string" ? opts.target.trim() : "";
|
|
667
|
+
if (opts.account && (!rawChannel || rawChannel === "all")) {
|
|
668
|
+
runtime.error(danger("--account requires a specific --channel."));
|
|
669
|
+
runtime.exit(1);
|
|
670
|
+
return;
|
|
671
|
+
}
|
|
672
|
+
if (rawTarget && rawChannel !== "discord") {
|
|
673
|
+
runtime.error(danger("--target requires --channel discord."));
|
|
674
|
+
runtime.exit(1);
|
|
675
|
+
return;
|
|
676
|
+
}
|
|
677
|
+
const plugins = listChannelPlugins();
|
|
678
|
+
const selected = !rawChannel || rawChannel === "all" ? plugins : (() => {
|
|
679
|
+
const plugin = getChannelPlugin(rawChannel);
|
|
680
|
+
if (!plugin) return null;
|
|
681
|
+
return [plugin];
|
|
682
|
+
})();
|
|
683
|
+
if (!selected || selected.length === 0) {
|
|
684
|
+
runtime.error(danger(`Unknown channel "${rawChannel}".`));
|
|
685
|
+
runtime.exit(1);
|
|
686
|
+
return;
|
|
687
|
+
}
|
|
688
|
+
const reports = [];
|
|
689
|
+
for (const plugin of selected) {
|
|
690
|
+
const accountOverride = opts.account?.trim() || void 0;
|
|
691
|
+
reports.push(...await resolveChannelReports({
|
|
692
|
+
plugin,
|
|
693
|
+
cfg,
|
|
694
|
+
timeoutMs,
|
|
695
|
+
accountOverride,
|
|
696
|
+
target: rawTarget && plugin.id === "discord" ? rawTarget : void 0
|
|
697
|
+
}));
|
|
698
|
+
}
|
|
699
|
+
if (opts.json) {
|
|
700
|
+
runtime.log(JSON.stringify({ channels: reports }, null, 2));
|
|
701
|
+
return;
|
|
702
|
+
}
|
|
703
|
+
const lines = [];
|
|
704
|
+
for (const report of reports) {
|
|
705
|
+
const label = formatChannelAccountLabel({
|
|
706
|
+
channel: report.channel,
|
|
707
|
+
accountId: report.accountId,
|
|
708
|
+
name: report.accountName,
|
|
709
|
+
channelStyle: theme.accent,
|
|
710
|
+
accountStyle: theme.heading
|
|
711
|
+
});
|
|
712
|
+
lines.push(theme.heading(label));
|
|
713
|
+
lines.push(`Support: ${formatSupport(report.support)}`);
|
|
714
|
+
if (report.actions && report.actions.length > 0) lines.push(`Actions: ${report.actions.join(", ")}`);
|
|
715
|
+
if (report.configured === false || report.enabled === false) {
|
|
716
|
+
const configuredLabel = report.configured === false ? "not configured" : "configured";
|
|
717
|
+
const enabledLabel = report.enabled === false ? "disabled" : "enabled";
|
|
718
|
+
lines.push(`Status: ${configuredLabel}, ${enabledLabel}`);
|
|
719
|
+
}
|
|
720
|
+
const probeLines = formatProbeLines(report.channel, report.probe);
|
|
721
|
+
if (probeLines.length > 0) lines.push(...probeLines);
|
|
722
|
+
else if (report.configured && report.enabled) lines.push(theme.muted("Probe: unavailable"));
|
|
723
|
+
if (report.channel === "slack" && report.slackScopes) for (const entry of report.slackScopes) {
|
|
724
|
+
const source = entry.result.source ? ` (${entry.result.source})` : "";
|
|
725
|
+
const label = entry.tokenType === "user" ? "User scopes" : "Bot scopes";
|
|
726
|
+
if (entry.result.ok && entry.result.scopes?.length) lines.push(`${label}${source}: ${entry.result.scopes.join(", ")}`);
|
|
727
|
+
else if (entry.result.error) lines.push(`${label}: ${theme.error(entry.result.error)}`);
|
|
728
|
+
}
|
|
729
|
+
if (report.channel === "discord" && report.channelPermissions) {
|
|
730
|
+
const perms = report.channelPermissions;
|
|
731
|
+
if (perms.error) lines.push(`Permissions: ${theme.error(perms.error)}`);
|
|
732
|
+
else {
|
|
733
|
+
const list = perms.permissions?.length ? perms.permissions.join(", ") : "none";
|
|
734
|
+
const label = perms.channelId ? ` (${perms.channelId})` : "";
|
|
735
|
+
lines.push(`Permissions${label}: ${list}`);
|
|
736
|
+
if (perms.missingRequired && perms.missingRequired.length > 0) lines.push(`${theme.warn("Missing required:")} ${perms.missingRequired.join(", ")}`);
|
|
737
|
+
else lines.push(theme.success("Missing required: none"));
|
|
738
|
+
}
|
|
739
|
+
} else if (report.channel === "discord" && rawTarget && !report.channelPermissions) lines.push(theme.muted("Permissions: skipped (no target)."));
|
|
740
|
+
lines.push("");
|
|
741
|
+
}
|
|
742
|
+
runtime.log(lines.join("\n").trimEnd());
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
//#endregion
|
|
746
|
+
//#region src/commands/channels/list.ts
|
|
747
|
+
const colorValue = (value) => {
|
|
748
|
+
if (value === "none") return theme.error(value);
|
|
749
|
+
if (value === "env") return theme.accent(value);
|
|
750
|
+
return theme.success(value);
|
|
751
|
+
};
|
|
752
|
+
function formatEnabled(value) {
|
|
753
|
+
return value === false ? theme.error("disabled") : theme.success("enabled");
|
|
754
|
+
}
|
|
755
|
+
function formatConfigured(value) {
|
|
756
|
+
return value ? theme.success("configured") : theme.warn("not configured");
|
|
757
|
+
}
|
|
758
|
+
function formatTokenSource(source) {
|
|
759
|
+
return `token=${colorValue(source || "none")}`;
|
|
760
|
+
}
|
|
761
|
+
function formatSource(label, source) {
|
|
762
|
+
return `${label}=${colorValue(source || "none")}`;
|
|
763
|
+
}
|
|
764
|
+
function formatLinked(value) {
|
|
765
|
+
return value ? theme.success("linked") : theme.warn("not linked");
|
|
766
|
+
}
|
|
767
|
+
function shouldShowConfigured(channel) {
|
|
768
|
+
return channel.meta.showConfigured !== false;
|
|
769
|
+
}
|
|
770
|
+
function formatAccountLine(params) {
|
|
771
|
+
const { channel, snapshot } = params;
|
|
772
|
+
const label = formatChannelAccountLabel({
|
|
773
|
+
channel: channel.id,
|
|
774
|
+
accountId: snapshot.accountId,
|
|
775
|
+
name: snapshot.name,
|
|
776
|
+
channelStyle: theme.accent,
|
|
777
|
+
accountStyle: theme.heading
|
|
778
|
+
});
|
|
779
|
+
const bits = [];
|
|
780
|
+
if (snapshot.linked !== void 0) bits.push(formatLinked(snapshot.linked));
|
|
781
|
+
if (shouldShowConfigured(channel) && typeof snapshot.configured === "boolean") bits.push(formatConfigured(snapshot.configured));
|
|
782
|
+
if (snapshot.tokenSource) bits.push(formatTokenSource(snapshot.tokenSource));
|
|
783
|
+
if (snapshot.botTokenSource) bits.push(formatSource("bot", snapshot.botTokenSource));
|
|
784
|
+
if (snapshot.appTokenSource) bits.push(formatSource("app", snapshot.appTokenSource));
|
|
785
|
+
if (snapshot.baseUrl) bits.push(`base=${theme.muted(snapshot.baseUrl)}`);
|
|
786
|
+
if (typeof snapshot.enabled === "boolean") bits.push(formatEnabled(snapshot.enabled));
|
|
787
|
+
return `- ${label}: ${bits.join(", ")}`;
|
|
788
|
+
}
|
|
789
|
+
async function loadUsageWithProgress(runtime) {
|
|
790
|
+
try {
|
|
791
|
+
return await withProgress({
|
|
792
|
+
label: "Fetching usage snapshot…",
|
|
793
|
+
indeterminate: true,
|
|
794
|
+
enabled: true
|
|
795
|
+
}, async () => await loadProviderUsageSummary());
|
|
796
|
+
} catch (err) {
|
|
797
|
+
runtime.error(String(err));
|
|
798
|
+
return null;
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
async function channelsListCommand(opts, runtime = defaultRuntime) {
|
|
802
|
+
const cfg = await requireValidConfig(runtime);
|
|
803
|
+
if (!cfg) return;
|
|
804
|
+
const includeUsage = opts.usage !== false;
|
|
805
|
+
const plugins = listChannelPlugins();
|
|
806
|
+
const authStore = loadAuthProfileStore();
|
|
807
|
+
const authProfiles = Object.entries(authStore.profiles).map(([profileId, profile]) => ({
|
|
808
|
+
id: profileId,
|
|
809
|
+
provider: profile.provider,
|
|
810
|
+
type: profile.type,
|
|
811
|
+
isExternal: false
|
|
812
|
+
}));
|
|
813
|
+
if (opts.json) {
|
|
814
|
+
const usage = includeUsage ? await loadProviderUsageSummary() : void 0;
|
|
815
|
+
const chat = {};
|
|
816
|
+
for (const plugin of plugins) chat[plugin.id] = plugin.config.listAccountIds(cfg);
|
|
817
|
+
const payload = {
|
|
818
|
+
chat,
|
|
819
|
+
auth: authProfiles,
|
|
820
|
+
...usage ? { usage } : {}
|
|
821
|
+
};
|
|
822
|
+
runtime.log(JSON.stringify(payload, null, 2));
|
|
823
|
+
return;
|
|
824
|
+
}
|
|
825
|
+
const lines = [];
|
|
826
|
+
lines.push(theme.heading("Chat channels:"));
|
|
827
|
+
for (const plugin of plugins) {
|
|
828
|
+
const accounts = plugin.config.listAccountIds(cfg);
|
|
829
|
+
if (!accounts || accounts.length === 0) continue;
|
|
830
|
+
for (const accountId of accounts) {
|
|
831
|
+
const snapshot = await buildChannelAccountSnapshot({
|
|
832
|
+
plugin,
|
|
833
|
+
cfg,
|
|
834
|
+
accountId
|
|
835
|
+
});
|
|
836
|
+
lines.push(formatAccountLine({
|
|
837
|
+
channel: plugin,
|
|
838
|
+
snapshot
|
|
839
|
+
}));
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
lines.push("");
|
|
843
|
+
lines.push(theme.heading("Auth providers (OAuth + API keys):"));
|
|
844
|
+
if (authProfiles.length === 0) lines.push(theme.muted("- none"));
|
|
845
|
+
else for (const profile of authProfiles) {
|
|
846
|
+
const external = profile.isExternal ? theme.muted(" (synced)") : "";
|
|
847
|
+
lines.push(`- ${theme.accent(profile.id)} (${theme.success(profile.type)}${external})`);
|
|
848
|
+
}
|
|
849
|
+
runtime.log(lines.join("\n"));
|
|
850
|
+
if (includeUsage) {
|
|
851
|
+
runtime.log("");
|
|
852
|
+
const usage = await loadUsageWithProgress(runtime);
|
|
853
|
+
if (usage) {
|
|
854
|
+
const usageLines = formatUsageReportLines(usage);
|
|
855
|
+
if (usageLines.length > 0) {
|
|
856
|
+
usageLines[0] = theme.accent(usageLines[0]);
|
|
857
|
+
runtime.log(usageLines.join("\n"));
|
|
858
|
+
}
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
runtime.log("");
|
|
862
|
+
runtime.log(`Docs: ${formatDocsLink("/gateway/configuration", "gateway/configuration")}`);
|
|
863
|
+
}
|
|
864
|
+
|
|
865
|
+
//#endregion
|
|
866
|
+
//#region src/commands/channels/logs.ts
|
|
867
|
+
const DEFAULT_LIMIT = 200;
|
|
868
|
+
const MAX_BYTES = 1e6;
|
|
869
|
+
const getChannelSet = () => new Set([...listChannelPlugins().map((plugin) => plugin.id), "all"]);
|
|
870
|
+
function parseChannelFilter(raw) {
|
|
871
|
+
const trimmed = raw?.trim().toLowerCase();
|
|
872
|
+
if (!trimmed) return "all";
|
|
873
|
+
return getChannelSet().has(trimmed) ? trimmed : "all";
|
|
874
|
+
}
|
|
875
|
+
function matchesChannel(line, channel) {
|
|
876
|
+
if (channel === "all") return true;
|
|
877
|
+
const needle = `gateway/channels/${channel}`;
|
|
878
|
+
if (line.subsystem?.includes(needle)) return true;
|
|
879
|
+
if (line.module?.includes(channel)) return true;
|
|
880
|
+
return false;
|
|
881
|
+
}
|
|
882
|
+
async function readTailLines(file, limit) {
|
|
883
|
+
const stat = await fs.stat(file).catch(() => null);
|
|
884
|
+
if (!stat) return [];
|
|
885
|
+
const size = stat.size;
|
|
886
|
+
const start = Math.max(0, size - MAX_BYTES);
|
|
887
|
+
const handle = await fs.open(file, "r");
|
|
888
|
+
try {
|
|
889
|
+
const length = Math.max(0, size - start);
|
|
890
|
+
if (length === 0) return [];
|
|
891
|
+
const buffer = Buffer.alloc(length);
|
|
892
|
+
const readResult = await handle.read(buffer, 0, length, start);
|
|
893
|
+
let lines = buffer.toString("utf8", 0, readResult.bytesRead).split("\n");
|
|
894
|
+
if (start > 0) lines = lines.slice(1);
|
|
895
|
+
if (lines.length && lines[lines.length - 1] === "") lines = lines.slice(0, -1);
|
|
896
|
+
if (lines.length > limit) lines = lines.slice(lines.length - limit);
|
|
897
|
+
return lines;
|
|
898
|
+
} finally {
|
|
899
|
+
await handle.close();
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
async function channelsLogsCommand(opts, runtime = defaultRuntime) {
|
|
903
|
+
const channel = parseChannelFilter(opts.channel);
|
|
904
|
+
const limitRaw = typeof opts.lines === "string" ? Number(opts.lines) : opts.lines;
|
|
905
|
+
const limit = typeof limitRaw === "number" && Number.isFinite(limitRaw) && limitRaw > 0 ? Math.floor(limitRaw) : DEFAULT_LIMIT;
|
|
906
|
+
const file = getResolvedLoggerSettings().file;
|
|
907
|
+
const filtered = (await readTailLines(file, limit * 4)).map(parseLogLine).filter((line) => Boolean(line)).filter((line) => matchesChannel(line, channel));
|
|
908
|
+
const lines = filtered.slice(Math.max(0, filtered.length - limit));
|
|
909
|
+
if (opts.json) {
|
|
910
|
+
runtime.log(JSON.stringify({
|
|
911
|
+
file,
|
|
912
|
+
channel,
|
|
913
|
+
lines
|
|
914
|
+
}, null, 2));
|
|
915
|
+
return;
|
|
916
|
+
}
|
|
917
|
+
runtime.log(theme.info(`Log file: ${file}`));
|
|
918
|
+
if (channel !== "all") runtime.log(theme.info(`Channel: ${channel}`));
|
|
919
|
+
if (lines.length === 0) {
|
|
920
|
+
runtime.log(theme.muted("No matching log lines."));
|
|
921
|
+
return;
|
|
922
|
+
}
|
|
923
|
+
for (const line of lines) {
|
|
924
|
+
const ts = line.time ? `${line.time} ` : "";
|
|
925
|
+
const level = line.level ? `${line.level.toLowerCase()} ` : "";
|
|
926
|
+
runtime.log(`${ts}${level}${line.message}`.trim());
|
|
927
|
+
}
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
//#endregion
|
|
931
|
+
//#region src/commands/channels/remove.ts
|
|
932
|
+
function listAccountIds(cfg, channel) {
|
|
933
|
+
const plugin = getChannelPlugin(channel);
|
|
934
|
+
if (!plugin) return [];
|
|
935
|
+
return plugin.config.listAccountIds(cfg);
|
|
936
|
+
}
|
|
937
|
+
async function channelsRemoveCommand(opts, runtime = defaultRuntime, params) {
|
|
938
|
+
const cfg = await requireValidConfig(runtime);
|
|
939
|
+
if (!cfg) return;
|
|
940
|
+
const useWizard = shouldUseWizard(params);
|
|
941
|
+
const prompter = useWizard ? createClackPrompter() : null;
|
|
942
|
+
let channel = normalizeChannelId(opts.channel);
|
|
943
|
+
let accountId = normalizeAccountId(opts.account);
|
|
944
|
+
const deleteConfig = Boolean(opts.delete);
|
|
945
|
+
if (useWizard && prompter) {
|
|
946
|
+
await prompter.intro("Remove channel account");
|
|
947
|
+
const selectedChannel = await prompter.select({
|
|
948
|
+
message: "Channel",
|
|
949
|
+
options: listChannelPlugins().map((plugin) => ({
|
|
950
|
+
value: plugin.id,
|
|
951
|
+
label: plugin.meta.label
|
|
952
|
+
}))
|
|
953
|
+
});
|
|
954
|
+
channel = selectedChannel;
|
|
955
|
+
accountId = await (async () => {
|
|
956
|
+
const ids = listAccountIds(cfg, selectedChannel);
|
|
957
|
+
return normalizeAccountId(await prompter.select({
|
|
958
|
+
message: "Account",
|
|
959
|
+
options: ids.map((id) => ({
|
|
960
|
+
value: id,
|
|
961
|
+
label: id === DEFAULT_ACCOUNT_ID ? "default (primary)" : id
|
|
962
|
+
})),
|
|
963
|
+
initialValue: ids[0] ?? DEFAULT_ACCOUNT_ID
|
|
964
|
+
}));
|
|
965
|
+
})();
|
|
966
|
+
if (!await prompter.confirm({
|
|
967
|
+
message: `Disable ${channelLabel(selectedChannel)} account "${accountId}"? (keeps config)`,
|
|
968
|
+
initialValue: true
|
|
969
|
+
})) {
|
|
970
|
+
await prompter.outro("Cancelled.");
|
|
971
|
+
return;
|
|
972
|
+
}
|
|
973
|
+
} else {
|
|
974
|
+
if (!channel) {
|
|
975
|
+
runtime.error("Channel is required. Use --channel <name>.");
|
|
976
|
+
runtime.exit(1);
|
|
977
|
+
return;
|
|
978
|
+
}
|
|
979
|
+
if (!deleteConfig) {
|
|
980
|
+
if (!await createClackPrompter().confirm({
|
|
981
|
+
message: `Disable ${channelLabel(channel)} account "${accountId}"? (keeps config)`,
|
|
982
|
+
initialValue: true
|
|
983
|
+
})) return;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
const plugin = getChannelPlugin(channel);
|
|
987
|
+
if (!plugin) {
|
|
988
|
+
runtime.error(`Unknown channel: ${channel}`);
|
|
989
|
+
runtime.exit(1);
|
|
990
|
+
return;
|
|
991
|
+
}
|
|
992
|
+
const resolvedAccountId = normalizeAccountId(accountId) ?? resolveChannelDefaultAccountId({
|
|
993
|
+
plugin,
|
|
994
|
+
cfg
|
|
995
|
+
});
|
|
996
|
+
const accountKey = resolvedAccountId || DEFAULT_ACCOUNT_ID;
|
|
997
|
+
let next = { ...cfg };
|
|
998
|
+
if (deleteConfig) {
|
|
999
|
+
if (!plugin.config.deleteAccount) {
|
|
1000
|
+
runtime.error(`Channel ${channel} does not support delete.`);
|
|
1001
|
+
runtime.exit(1);
|
|
1002
|
+
return;
|
|
1003
|
+
}
|
|
1004
|
+
next = plugin.config.deleteAccount({
|
|
1005
|
+
cfg: next,
|
|
1006
|
+
accountId: resolvedAccountId
|
|
1007
|
+
});
|
|
1008
|
+
} else {
|
|
1009
|
+
if (!plugin.config.setAccountEnabled) {
|
|
1010
|
+
runtime.error(`Channel ${channel} does not support disable.`);
|
|
1011
|
+
runtime.exit(1);
|
|
1012
|
+
return;
|
|
1013
|
+
}
|
|
1014
|
+
next = plugin.config.setAccountEnabled({
|
|
1015
|
+
cfg: next,
|
|
1016
|
+
accountId: resolvedAccountId,
|
|
1017
|
+
enabled: false
|
|
1018
|
+
});
|
|
1019
|
+
}
|
|
1020
|
+
await writeConfigFile(next);
|
|
1021
|
+
if (useWizard && prompter) await prompter.outro(deleteConfig ? `Deleted ${channelLabel(channel)} account "${accountKey}".` : `Disabled ${channelLabel(channel)} account "${accountKey}".`);
|
|
1022
|
+
else runtime.log(deleteConfig ? `Deleted ${channelLabel(channel)} account "${accountKey}".` : `Disabled ${channelLabel(channel)} account "${accountKey}".`);
|
|
1023
|
+
}
|
|
1024
|
+
|
|
1025
|
+
//#endregion
|
|
1026
|
+
//#region src/commands/channels/resolve.ts
|
|
1027
|
+
function resolvePreferredKind(kind) {
|
|
1028
|
+
if (!kind || kind === "auto") return;
|
|
1029
|
+
if (kind === "user") return "user";
|
|
1030
|
+
return "group";
|
|
1031
|
+
}
|
|
1032
|
+
function detectAutoKind(input) {
|
|
1033
|
+
const trimmed = input.trim();
|
|
1034
|
+
if (!trimmed) return "group";
|
|
1035
|
+
if (trimmed.startsWith("@")) return "user";
|
|
1036
|
+
if (/^<@!?/.test(trimmed)) return "user";
|
|
1037
|
+
if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(trimmed)) return "user";
|
|
1038
|
+
if (/^(user|discord|slack|matrix|msteams|teams|zalo|zalouser|googlechat|google-chat|gchat):/i.test(trimmed)) return "user";
|
|
1039
|
+
return "group";
|
|
1040
|
+
}
|
|
1041
|
+
function formatResolveResult(result) {
|
|
1042
|
+
if (!result.resolved || !result.id) return `${result.input} -> unresolved`;
|
|
1043
|
+
const name = result.name ? ` (${result.name})` : "";
|
|
1044
|
+
const note = result.note ? ` [${result.note}]` : "";
|
|
1045
|
+
return `${result.input} -> ${result.id}${name}${note}`;
|
|
1046
|
+
}
|
|
1047
|
+
async function channelsResolveCommand(opts, runtime) {
|
|
1048
|
+
const cfg = loadConfig();
|
|
1049
|
+
const entries = (opts.entries ?? []).map((entry) => entry.trim()).filter(Boolean);
|
|
1050
|
+
if (entries.length === 0) throw new Error("At least one entry is required.");
|
|
1051
|
+
const selection = await resolveMessageChannelSelection({
|
|
1052
|
+
cfg,
|
|
1053
|
+
channel: opts.channel ?? null
|
|
1054
|
+
});
|
|
1055
|
+
const plugin = getChannelPlugin(selection.channel);
|
|
1056
|
+
if (!plugin?.resolver?.resolveTargets) throw new Error(`Channel ${selection.channel} does not support resolve.`);
|
|
1057
|
+
const preferredKind = resolvePreferredKind(opts.kind);
|
|
1058
|
+
let results = [];
|
|
1059
|
+
if (preferredKind) results = (await plugin.resolver.resolveTargets({
|
|
1060
|
+
cfg,
|
|
1061
|
+
accountId: opts.account ?? null,
|
|
1062
|
+
inputs: entries,
|
|
1063
|
+
kind: preferredKind,
|
|
1064
|
+
runtime
|
|
1065
|
+
})).map((entry) => ({
|
|
1066
|
+
input: entry.input,
|
|
1067
|
+
resolved: entry.resolved,
|
|
1068
|
+
id: entry.id,
|
|
1069
|
+
name: entry.name,
|
|
1070
|
+
note: entry.note
|
|
1071
|
+
}));
|
|
1072
|
+
else {
|
|
1073
|
+
const byKind = /* @__PURE__ */ new Map();
|
|
1074
|
+
for (const entry of entries) {
|
|
1075
|
+
const kind = detectAutoKind(entry);
|
|
1076
|
+
byKind.set(kind, [...byKind.get(kind) ?? [], entry]);
|
|
1077
|
+
}
|
|
1078
|
+
const resolved = [];
|
|
1079
|
+
for (const [kind, inputs] of byKind.entries()) {
|
|
1080
|
+
const batch = await plugin.resolver.resolveTargets({
|
|
1081
|
+
cfg,
|
|
1082
|
+
accountId: opts.account ?? null,
|
|
1083
|
+
inputs,
|
|
1084
|
+
kind,
|
|
1085
|
+
runtime
|
|
1086
|
+
});
|
|
1087
|
+
resolved.push(...batch);
|
|
1088
|
+
}
|
|
1089
|
+
const byInput = new Map(resolved.map((entry) => [entry.input, entry]));
|
|
1090
|
+
results = entries.map((input) => {
|
|
1091
|
+
const entry = byInput.get(input);
|
|
1092
|
+
return {
|
|
1093
|
+
input,
|
|
1094
|
+
resolved: entry?.resolved ?? false,
|
|
1095
|
+
id: entry?.id,
|
|
1096
|
+
name: entry?.name,
|
|
1097
|
+
note: entry?.note
|
|
1098
|
+
};
|
|
1099
|
+
});
|
|
1100
|
+
}
|
|
1101
|
+
if (opts.json) {
|
|
1102
|
+
runtime.log(JSON.stringify(results, null, 2));
|
|
1103
|
+
return;
|
|
1104
|
+
}
|
|
1105
|
+
for (const result of results) if (result.resolved && result.id) runtime.log(formatResolveResult(result));
|
|
1106
|
+
else runtime.error(danger(`${result.input} -> unresolved${result.error ? ` (${result.error})` : result.note ? ` (${result.note})` : ""}`));
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
//#endregion
|
|
1110
|
+
//#region src/commands/channels/status.ts
|
|
1111
|
+
function formatGatewayChannelsStatusLines(payload) {
|
|
1112
|
+
const lines = [];
|
|
1113
|
+
lines.push(theme.success("Gateway reachable."));
|
|
1114
|
+
const accountLines = (provider, accounts) => accounts.map((account) => {
|
|
1115
|
+
const bits = [];
|
|
1116
|
+
if (typeof account.enabled === "boolean") bits.push(account.enabled ? "enabled" : "disabled");
|
|
1117
|
+
if (typeof account.configured === "boolean") bits.push(account.configured ? "configured" : "not configured");
|
|
1118
|
+
if (typeof account.linked === "boolean") bits.push(account.linked ? "linked" : "not linked");
|
|
1119
|
+
if (typeof account.running === "boolean") bits.push(account.running ? "running" : "stopped");
|
|
1120
|
+
if (typeof account.connected === "boolean") bits.push(account.connected ? "connected" : "disconnected");
|
|
1121
|
+
const inboundAt = typeof account.lastInboundAt === "number" && Number.isFinite(account.lastInboundAt) ? account.lastInboundAt : null;
|
|
1122
|
+
const outboundAt = typeof account.lastOutboundAt === "number" && Number.isFinite(account.lastOutboundAt) ? account.lastOutboundAt : null;
|
|
1123
|
+
if (inboundAt) bits.push(`in:${formatAge(Date.now() - inboundAt)}`);
|
|
1124
|
+
if (outboundAt) bits.push(`out:${formatAge(Date.now() - outboundAt)}`);
|
|
1125
|
+
if (typeof account.mode === "string" && account.mode.length > 0) bits.push(`mode:${account.mode}`);
|
|
1126
|
+
const botUsername = (() => {
|
|
1127
|
+
const bot = account.bot;
|
|
1128
|
+
const probeBot = account.probe?.bot;
|
|
1129
|
+
const raw = bot?.username ?? probeBot?.username ?? "";
|
|
1130
|
+
if (typeof raw !== "string") return "";
|
|
1131
|
+
const trimmed = raw.trim();
|
|
1132
|
+
if (!trimmed) return "";
|
|
1133
|
+
return trimmed.startsWith("@") ? trimmed : `@${trimmed}`;
|
|
1134
|
+
})();
|
|
1135
|
+
if (botUsername) bits.push(`bot:${botUsername}`);
|
|
1136
|
+
if (typeof account.dmPolicy === "string" && account.dmPolicy.length > 0) bits.push(`dm:${account.dmPolicy}`);
|
|
1137
|
+
if (Array.isArray(account.allowFrom) && account.allowFrom.length > 0) bits.push(`allow:${account.allowFrom.slice(0, 2).join(",")}`);
|
|
1138
|
+
if (typeof account.tokenSource === "string" && account.tokenSource) bits.push(`token:${account.tokenSource}`);
|
|
1139
|
+
if (typeof account.botTokenSource === "string" && account.botTokenSource) bits.push(`bot:${account.botTokenSource}`);
|
|
1140
|
+
if (typeof account.appTokenSource === "string" && account.appTokenSource) bits.push(`app:${account.appTokenSource}`);
|
|
1141
|
+
const messageContent = account.application?.intents?.messageContent;
|
|
1142
|
+
if (typeof messageContent === "string" && messageContent.length > 0 && messageContent !== "enabled") bits.push(`intents:content=${messageContent}`);
|
|
1143
|
+
if (account.allowUnmentionedGroups === true) bits.push("groups:unmentioned");
|
|
1144
|
+
if (typeof account.baseUrl === "string" && account.baseUrl) bits.push(`url:${account.baseUrl}`);
|
|
1145
|
+
const probe = account.probe;
|
|
1146
|
+
if (probe && typeof probe.ok === "boolean") bits.push(probe.ok ? "works" : "probe failed");
|
|
1147
|
+
const audit = account.audit;
|
|
1148
|
+
if (audit && typeof audit.ok === "boolean") bits.push(audit.ok ? "audit ok" : "audit failed");
|
|
1149
|
+
if (typeof account.lastError === "string" && account.lastError) bits.push(`error:${account.lastError}`);
|
|
1150
|
+
return `- ${formatChannelAccountLabel({
|
|
1151
|
+
channel: provider,
|
|
1152
|
+
accountId: typeof account.accountId === "string" ? account.accountId : "default",
|
|
1153
|
+
name: (typeof account.name === "string" ? account.name.trim() : "") || void 0
|
|
1154
|
+
})}: ${bits.join(", ")}`;
|
|
1155
|
+
});
|
|
1156
|
+
const plugins = listChannelPlugins();
|
|
1157
|
+
const accountsByChannel = payload.channelAccounts;
|
|
1158
|
+
const accountPayloads = {};
|
|
1159
|
+
for (const plugin of plugins) {
|
|
1160
|
+
const raw = accountsByChannel?.[plugin.id];
|
|
1161
|
+
if (Array.isArray(raw)) accountPayloads[plugin.id] = raw;
|
|
1162
|
+
}
|
|
1163
|
+
for (const plugin of plugins) {
|
|
1164
|
+
const accounts = accountPayloads[plugin.id];
|
|
1165
|
+
if (accounts && accounts.length > 0) lines.push(...accountLines(plugin.id, accounts));
|
|
1166
|
+
}
|
|
1167
|
+
lines.push("");
|
|
1168
|
+
const issues = collectChannelStatusIssues(payload);
|
|
1169
|
+
if (issues.length > 0) {
|
|
1170
|
+
lines.push(theme.warn("Warnings:"));
|
|
1171
|
+
for (const issue of issues) lines.push(`- ${issue.channel} ${issue.accountId}: ${issue.message}${issue.fix ? ` (${issue.fix})` : ""}`);
|
|
1172
|
+
lines.push(`- Run: ${formatCliCommand("openclaw doctor")}`);
|
|
1173
|
+
lines.push("");
|
|
1174
|
+
}
|
|
1175
|
+
lines.push(`Tip: ${formatDocsLink("/cli#status", "status --deep")} adds gateway health probes to status output (requires a reachable gateway).`);
|
|
1176
|
+
return lines;
|
|
1177
|
+
}
|
|
1178
|
+
async function formatConfigChannelsStatusLines(cfg, meta) {
|
|
1179
|
+
const lines = [];
|
|
1180
|
+
lines.push(theme.warn("Gateway not reachable; showing config-only status."));
|
|
1181
|
+
if (meta.path) lines.push(`Config: ${meta.path}`);
|
|
1182
|
+
if (meta.mode) lines.push(`Mode: ${meta.mode}`);
|
|
1183
|
+
if (meta.path || meta.mode) lines.push("");
|
|
1184
|
+
const accountLines = (provider, accounts) => accounts.map((account) => {
|
|
1185
|
+
const bits = [];
|
|
1186
|
+
if (typeof account.enabled === "boolean") bits.push(account.enabled ? "enabled" : "disabled");
|
|
1187
|
+
if (typeof account.configured === "boolean") bits.push(account.configured ? "configured" : "not configured");
|
|
1188
|
+
if (typeof account.linked === "boolean") bits.push(account.linked ? "linked" : "not linked");
|
|
1189
|
+
if (typeof account.mode === "string" && account.mode.length > 0) bits.push(`mode:${account.mode}`);
|
|
1190
|
+
if (typeof account.tokenSource === "string" && account.tokenSource) bits.push(`token:${account.tokenSource}`);
|
|
1191
|
+
if (typeof account.botTokenSource === "string" && account.botTokenSource) bits.push(`bot:${account.botTokenSource}`);
|
|
1192
|
+
if (typeof account.appTokenSource === "string" && account.appTokenSource) bits.push(`app:${account.appTokenSource}`);
|
|
1193
|
+
if (typeof account.baseUrl === "string" && account.baseUrl) bits.push(`url:${account.baseUrl}`);
|
|
1194
|
+
return `- ${formatChannelAccountLabel({
|
|
1195
|
+
channel: provider,
|
|
1196
|
+
accountId: typeof account.accountId === "string" ? account.accountId : "default",
|
|
1197
|
+
name: (typeof account.name === "string" ? account.name.trim() : "") || void 0
|
|
1198
|
+
})}: ${bits.join(", ")}`;
|
|
1199
|
+
});
|
|
1200
|
+
const plugins = listChannelPlugins();
|
|
1201
|
+
for (const plugin of plugins) {
|
|
1202
|
+
const accountIds = plugin.config.listAccountIds(cfg);
|
|
1203
|
+
if (!accountIds.length) continue;
|
|
1204
|
+
const snapshots = [];
|
|
1205
|
+
for (const accountId of accountIds) {
|
|
1206
|
+
const snapshot = await buildChannelAccountSnapshot({
|
|
1207
|
+
plugin,
|
|
1208
|
+
cfg,
|
|
1209
|
+
accountId
|
|
1210
|
+
});
|
|
1211
|
+
snapshots.push(snapshot);
|
|
1212
|
+
}
|
|
1213
|
+
if (snapshots.length > 0) lines.push(...accountLines(plugin.id, snapshots));
|
|
1214
|
+
}
|
|
1215
|
+
lines.push("");
|
|
1216
|
+
lines.push(`Tip: ${formatDocsLink("/cli#status", "status --deep")} adds gateway health probes to status output (requires a reachable gateway).`);
|
|
1217
|
+
return lines;
|
|
1218
|
+
}
|
|
1219
|
+
async function channelsStatusCommand(opts, runtime = defaultRuntime) {
|
|
1220
|
+
const timeoutMs = Number(opts.timeout ?? 1e4);
|
|
1221
|
+
const statusLabel = opts.probe ? "Checking channel status (probe)…" : "Checking channel status…";
|
|
1222
|
+
if (opts.json !== true && !process.stderr.isTTY) runtime.log(statusLabel);
|
|
1223
|
+
try {
|
|
1224
|
+
const payload = await withProgress({
|
|
1225
|
+
label: statusLabel,
|
|
1226
|
+
indeterminate: true,
|
|
1227
|
+
enabled: opts.json !== true
|
|
1228
|
+
}, async () => await callGateway({
|
|
1229
|
+
method: "channels.status",
|
|
1230
|
+
params: {
|
|
1231
|
+
probe: Boolean(opts.probe),
|
|
1232
|
+
timeoutMs
|
|
1233
|
+
},
|
|
1234
|
+
timeoutMs
|
|
1235
|
+
}));
|
|
1236
|
+
if (opts.json) {
|
|
1237
|
+
runtime.log(JSON.stringify(payload, null, 2));
|
|
1238
|
+
return;
|
|
1239
|
+
}
|
|
1240
|
+
runtime.log(formatGatewayChannelsStatusLines(payload).join("\n"));
|
|
1241
|
+
} catch (err) {
|
|
1242
|
+
runtime.error(`Gateway not reachable: ${String(err)}`);
|
|
1243
|
+
const cfg = await requireValidConfig(runtime);
|
|
1244
|
+
if (!cfg) return;
|
|
1245
|
+
const snapshot = await readConfigFileSnapshot();
|
|
1246
|
+
const mode = cfg.gateway?.mode === "remote" ? "remote" : "local";
|
|
1247
|
+
runtime.log((await formatConfigChannelsStatusLines(cfg, {
|
|
1248
|
+
path: snapshot.path,
|
|
1249
|
+
mode
|
|
1250
|
+
})).join("\n"));
|
|
1251
|
+
}
|
|
1252
|
+
}
|
|
1253
|
+
|
|
1254
|
+
//#endregion
|
|
1255
|
+
//#region src/cli/channel-auth.ts
|
|
1256
|
+
async function runChannelLogin(opts, runtime = defaultRuntime) {
|
|
1257
|
+
const channelInput = opts.channel ?? DEFAULT_CHAT_CHANNEL;
|
|
1258
|
+
const channelId = normalizeChannelId(channelInput);
|
|
1259
|
+
if (!channelId) throw new Error(`Unsupported channel: ${channelInput}`);
|
|
1260
|
+
const plugin = getChannelPlugin(channelId);
|
|
1261
|
+
if (!plugin?.auth?.login) throw new Error(`Channel ${channelId} does not support login`);
|
|
1262
|
+
setVerbose(Boolean(opts.verbose));
|
|
1263
|
+
const cfg = loadConfig();
|
|
1264
|
+
const accountId = opts.account?.trim() || resolveChannelDefaultAccountId({
|
|
1265
|
+
plugin,
|
|
1266
|
+
cfg
|
|
1267
|
+
});
|
|
1268
|
+
await plugin.auth.login({
|
|
1269
|
+
cfg,
|
|
1270
|
+
accountId,
|
|
1271
|
+
runtime,
|
|
1272
|
+
verbose: Boolean(opts.verbose),
|
|
1273
|
+
channelInput
|
|
1274
|
+
});
|
|
1275
|
+
}
|
|
1276
|
+
async function runChannelLogout(opts, runtime = defaultRuntime) {
|
|
1277
|
+
const channelInput = opts.channel ?? DEFAULT_CHAT_CHANNEL;
|
|
1278
|
+
const channelId = normalizeChannelId(channelInput);
|
|
1279
|
+
if (!channelId) throw new Error(`Unsupported channel: ${channelInput}`);
|
|
1280
|
+
const plugin = getChannelPlugin(channelId);
|
|
1281
|
+
if (!plugin?.gateway?.logoutAccount) throw new Error(`Channel ${channelId} does not support logout`);
|
|
1282
|
+
const cfg = loadConfig();
|
|
1283
|
+
const accountId = opts.account?.trim() || resolveChannelDefaultAccountId({
|
|
1284
|
+
plugin,
|
|
1285
|
+
cfg
|
|
1286
|
+
});
|
|
1287
|
+
const account = plugin.config.resolveAccount(cfg, accountId);
|
|
1288
|
+
await plugin.gateway.logoutAccount({
|
|
1289
|
+
cfg,
|
|
1290
|
+
accountId,
|
|
1291
|
+
account,
|
|
1292
|
+
runtime
|
|
1293
|
+
});
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
//#endregion
|
|
1297
|
+
//#region src/cli/channels-cli.ts
|
|
1298
|
+
const optionNamesAdd = [
|
|
1299
|
+
"channel",
|
|
1300
|
+
"account",
|
|
1301
|
+
"name",
|
|
1302
|
+
"token",
|
|
1303
|
+
"tokenFile",
|
|
1304
|
+
"botToken",
|
|
1305
|
+
"appToken",
|
|
1306
|
+
"signalNumber",
|
|
1307
|
+
"cliPath",
|
|
1308
|
+
"dbPath",
|
|
1309
|
+
"service",
|
|
1310
|
+
"region",
|
|
1311
|
+
"authDir",
|
|
1312
|
+
"httpUrl",
|
|
1313
|
+
"httpHost",
|
|
1314
|
+
"httpPort",
|
|
1315
|
+
"webhookPath",
|
|
1316
|
+
"webhookUrl",
|
|
1317
|
+
"audienceType",
|
|
1318
|
+
"audience",
|
|
1319
|
+
"useEnv",
|
|
1320
|
+
"homeserver",
|
|
1321
|
+
"userId",
|
|
1322
|
+
"accessToken",
|
|
1323
|
+
"password",
|
|
1324
|
+
"deviceName",
|
|
1325
|
+
"initialSyncLimit",
|
|
1326
|
+
"ship",
|
|
1327
|
+
"url",
|
|
1328
|
+
"code",
|
|
1329
|
+
"groupChannels",
|
|
1330
|
+
"dmAllowlist",
|
|
1331
|
+
"autoDiscoverChannels"
|
|
1332
|
+
];
|
|
1333
|
+
const optionNamesRemove = [
|
|
1334
|
+
"channel",
|
|
1335
|
+
"account",
|
|
1336
|
+
"delete"
|
|
1337
|
+
];
|
|
1338
|
+
function runChannelsCommand(action) {
|
|
1339
|
+
return runCommandWithRuntime(defaultRuntime, action);
|
|
1340
|
+
}
|
|
1341
|
+
function runChannelsCommandWithDanger(action, label) {
|
|
1342
|
+
return runCommandWithRuntime(defaultRuntime, action, (err) => {
|
|
1343
|
+
defaultRuntime.error(danger(`${label}: ${String(err)}`));
|
|
1344
|
+
defaultRuntime.exit(1);
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
function registerChannelsCli(program) {
|
|
1348
|
+
const channelNames = formatCliChannelOptions();
|
|
1349
|
+
const channels = program.command("channels").description("Manage chat channel accounts").addHelpText("after", () => `\n${theme.muted("Docs:")} ${formatDocsLink("/cli/channels", "docs.openclaw.ai/cli/channels")}\n`);
|
|
1350
|
+
channels.command("list").description("List configured channels + auth profiles").option("--no-usage", "Skip model provider usage/quota snapshots").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1351
|
+
await runChannelsCommand(async () => {
|
|
1352
|
+
await channelsListCommand(opts, defaultRuntime);
|
|
1353
|
+
});
|
|
1354
|
+
});
|
|
1355
|
+
channels.command("status").description("Show gateway channel status (use status --deep for local)").option("--probe", "Probe channel credentials", false).option("--timeout <ms>", "Timeout in ms", "10000").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1356
|
+
await runChannelsCommand(async () => {
|
|
1357
|
+
await channelsStatusCommand(opts, defaultRuntime);
|
|
1358
|
+
});
|
|
1359
|
+
});
|
|
1360
|
+
channels.command("capabilities").description("Show provider capabilities (intents/scopes + supported features)").option("--channel <name>", `Channel (${formatCliChannelOptions(["all"])})`).option("--account <id>", "Account id (only with --channel)").option("--target <dest>", "Channel target for permission audit (Discord channel:<id>)").option("--timeout <ms>", "Timeout in ms", "10000").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1361
|
+
await runChannelsCommand(async () => {
|
|
1362
|
+
await channelsCapabilitiesCommand(opts, defaultRuntime);
|
|
1363
|
+
});
|
|
1364
|
+
});
|
|
1365
|
+
channels.command("resolve").description("Resolve channel/user names to IDs").argument("<entries...>", "Entries to resolve (names or ids)").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (accountId)").option("--kind <kind>", "Target kind (auto|user|group)", "auto").option("--json", "Output JSON", false).action(async (entries, opts) => {
|
|
1366
|
+
await runChannelsCommand(async () => {
|
|
1367
|
+
await channelsResolveCommand({
|
|
1368
|
+
channel: opts.channel,
|
|
1369
|
+
account: opts.account,
|
|
1370
|
+
kind: opts.kind,
|
|
1371
|
+
json: Boolean(opts.json),
|
|
1372
|
+
entries: Array.isArray(entries) ? entries : [String(entries)]
|
|
1373
|
+
}, defaultRuntime);
|
|
1374
|
+
});
|
|
1375
|
+
});
|
|
1376
|
+
channels.command("logs").description("Show recent channel logs from the gateway log file").option("--channel <name>", `Channel (${formatCliChannelOptions(["all"])})`, "all").option("--lines <n>", "Number of lines (default: 200)", "200").option("--json", "Output JSON", false).action(async (opts) => {
|
|
1377
|
+
await runChannelsCommand(async () => {
|
|
1378
|
+
await channelsLogsCommand(opts, defaultRuntime);
|
|
1379
|
+
});
|
|
1380
|
+
});
|
|
1381
|
+
channels.command("add").description("Add or update a channel account").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (default when omitted)").option("--name <name>", "Display name for this account").option("--token <token>", "Bot token (Telegram/Discord)").option("--token-file <path>", "Bot token file (Telegram)").option("--bot-token <token>", "Slack bot token (xoxb-...)").option("--app-token <token>", "Slack app token (xapp-...)").option("--signal-number <e164>", "Signal account number (E.164)").option("--cli-path <path>", "CLI path (signal-cli or imsg)").option("--db-path <path>", "iMessage database path").option("--service <service>", "iMessage service (imessage|sms|auto)").option("--region <region>", "iMessage region (for SMS)").option("--auth-dir <path>", "WhatsApp auth directory override").option("--http-url <url>", "Signal HTTP daemon base URL").option("--http-host <host>", "Signal HTTP host").option("--http-port <port>", "Signal HTTP port").option("--webhook-path <path>", "Webhook path (Google Chat/BlueBubbles)").option("--webhook-url <url>", "Google Chat webhook URL").option("--audience-type <type>", "Google Chat audience type (app-url|project-number)").option("--audience <value>", "Google Chat audience value (app URL or project number)").option("--homeserver <url>", "Matrix homeserver URL").option("--user-id <id>", "Matrix user ID").option("--access-token <token>", "Matrix access token").option("--password <password>", "Matrix password").option("--device-name <name>", "Matrix device name").option("--initial-sync-limit <n>", "Matrix initial sync limit").option("--ship <ship>", "Tlon ship name (~sampel-palnet)").option("--url <url>", "Tlon ship URL").option("--code <code>", "Tlon login code").option("--group-channels <list>", "Tlon group channels (comma-separated)").option("--dm-allowlist <list>", "Tlon DM allowlist (comma-separated ships)").option("--auto-discover-channels", "Tlon auto-discover group channels").option("--no-auto-discover-channels", "Disable Tlon auto-discovery").option("--use-env", "Use env token (default account only)", false).action(async (opts, command) => {
|
|
1382
|
+
await runChannelsCommand(async () => {
|
|
1383
|
+
await channelsAddCommand(opts, defaultRuntime, { hasFlags: hasExplicitOptions(command, optionNamesAdd) });
|
|
1384
|
+
});
|
|
1385
|
+
});
|
|
1386
|
+
channels.command("remove").description("Disable or delete a channel account").option("--channel <name>", `Channel (${channelNames})`).option("--account <id>", "Account id (default when omitted)").option("--delete", "Delete config entries (no prompt)", false).action(async (opts, command) => {
|
|
1387
|
+
await runChannelsCommand(async () => {
|
|
1388
|
+
await channelsRemoveCommand(opts, defaultRuntime, { hasFlags: hasExplicitOptions(command, optionNamesRemove) });
|
|
1389
|
+
});
|
|
1390
|
+
});
|
|
1391
|
+
channels.command("login").description("Link a channel account (if supported)").option("--channel <channel>", "Channel alias (default: whatsapp)").option("--account <id>", "Account id (accountId)").option("--verbose", "Verbose connection logs", false).action(async (opts) => {
|
|
1392
|
+
await runChannelsCommandWithDanger(async () => {
|
|
1393
|
+
await runChannelLogin({
|
|
1394
|
+
channel: opts.channel,
|
|
1395
|
+
account: opts.account,
|
|
1396
|
+
verbose: Boolean(opts.verbose)
|
|
1397
|
+
}, defaultRuntime);
|
|
1398
|
+
}, "Channel login failed");
|
|
1399
|
+
});
|
|
1400
|
+
channels.command("logout").description("Log out of a channel session (if supported)").option("--channel <channel>", "Channel alias (default: whatsapp)").option("--account <id>", "Account id (accountId)").action(async (opts) => {
|
|
1401
|
+
await runChannelsCommandWithDanger(async () => {
|
|
1402
|
+
await runChannelLogout({
|
|
1403
|
+
channel: opts.channel,
|
|
1404
|
+
account: opts.account
|
|
1405
|
+
}, defaultRuntime);
|
|
1406
|
+
}, "Channel logout failed");
|
|
1407
|
+
});
|
|
1408
|
+
}
|
|
1409
|
+
|
|
1410
|
+
//#endregion
|
|
1411
|
+
export { registerChannelsCli };
|