@agent-our/openclaw 2026.2.6-3
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 +1596 -0
- package/LICENSE +21 -0
- package/README-header.png +0 -0
- package/README.md +545 -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-B9umzy_R.js +250 -0
- package/dist/accounts-DkUtJa-O.js +251 -0
- package/dist/acp-cli-BBglTQii.js +923 -0
- package/dist/acp-cli-DrYibaVx.js +926 -0
- package/dist/agent-CbM7AbvV.js +704 -0
- package/dist/agent-DlzdY95q.js +704 -0
- package/dist/agent-scope-CB4YNu1h.js +613 -0
- package/dist/agent-scope-jAWKj2TP.js +371 -0
- package/dist/agent-scope-sKVRNONG.js +371 -0
- package/dist/archive-Dy3Ezb-5.js +85 -0
- package/dist/archive-ccN9aDgq.js +85 -0
- package/dist/audit-B2D3VRh8.js +1853 -0
- package/dist/audit-BdNhDEyo.js +1853 -0
- package/dist/auth-CMKwNo-f.js +192 -0
- package/dist/auth-DuZNzAAH.js +192 -0
- package/dist/auth-health-BNW1lZ8k.js +149 -0
- package/dist/auth-health-C3HJKHJi.js +149 -0
- package/dist/auth-profiles-DYdLc1cj.js +2981 -0
- package/dist/boolean-BgXe2hyu.js +30 -0
- package/dist/brew-CAcErcKz.js +46 -0
- package/dist/brew-CcZV0dSS.js +46 -0
- package/dist/build-info.json +5 -0
- package/dist/call-YdaudqMl.js +280 -0
- package/dist/call-wfwuMJe-.js +280 -0
- package/dist/canvas-host/a2ui/.bundle.hash +1 -0
- package/dist/canvas-host/a2ui/a2ui.bundle.js +17765 -0
- package/dist/canvas-host/a2ui/index.html +307 -0
- package/dist/channel-options-B-G7tzkB.js +32 -0
- package/dist/channel-options-jfcr7ChQ.js +62 -0
- package/dist/channel-selection-C5KQyVUF.js +51 -0
- package/dist/channel-selection-DXVHNo3U.js +51 -0
- package/dist/channel-summary-CFZImIiG.js +1120 -0
- package/dist/channel-summary-CoLmo1EU.js +1120 -0
- package/dist/channels-cli-Cc3MY52X.js +1413 -0
- package/dist/channels-cli-D2lTE59V.js +1415 -0
- package/dist/channels-status-issues-Dln8njuR.js +18 -0
- package/dist/channels-status-issues-ptsVdM7G.js +18 -0
- package/dist/chrome-B3IuUad-.js +1953 -0
- package/dist/chrome-BNSd7Bie.js +1973 -0
- package/dist/clack-prompter-B9yLhyOm.js +92 -0
- package/dist/clack-prompter-CEKDd_Vg.js +92 -0
- package/dist/cli/daemon-cli.js +2 -0
- package/dist/cli-Fq054ApO.js +89 -0
- package/dist/cli-rd9P_S1u.js +86 -0
- package/dist/cli-utils-BkRQdAoC.js +43 -0
- package/dist/cli-utils-DzrdzskQ.js +43 -0
- package/dist/client-DvWPgCi6.js +1815 -0
- package/dist/command-format-CFzL448l.js +52 -0
- package/dist/command-format-ChfKqObn.js +52 -0
- package/dist/command-format-ayFsmwwz.js +38 -0
- package/dist/command-options-qBrt237S.js +33 -0
- package/dist/commands-CQNsJDTA.js +230 -0
- package/dist/completion-cli-C5BH1XDk.js +773 -0
- package/dist/completion-cli-CNKrO4o0.js +434 -0
- package/dist/config-BEUgkMYH.js +4922 -0
- package/dist/config-BM_g3TBU.js +4921 -0
- package/dist/config-Ct91v0JZ.js +5662 -0
- package/dist/config-guard-C-ACw81n.js +5774 -0
- package/dist/configure-CcXcdOUM.js +896 -0
- package/dist/configure-DWMokcXD.js +895 -0
- package/dist/constants-CNTiY-ZN.js +65 -0
- package/dist/constants-HPrOsATF.js +65 -0
- package/dist/control-service-B3g4oucx.js +61 -0
- package/dist/control-service-Dh4DKu3S.js +61 -0
- package/dist/control-ui/apple-touch-icon.png +0 -0
- package/dist/control-ui/assets/index-Dm8pMa9P.js +11534 -0
- package/dist/control-ui/assets/index-Dm8pMa9P.js.map +1 -0
- package/dist/control-ui/assets/index-eofFRbdc.css +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-Bx6joqjI.js +454 -0
- package/dist/cron-cli-C5k_pz71.js +457 -0
- package/dist/daemon-cli-D-Gm28gZ.js +758 -0
- package/dist/daemon-cli-DQ5dlrIR.js +757 -0
- package/dist/daemon-runtime-C648Lhju.js +517 -0
- package/dist/daemon-runtime-Chcfufn1.js +517 -0
- package/dist/deliver-DBiz1Usy.js +2557 -0
- package/dist/deliver-DmpRwa2w.js +2587 -0
- package/dist/deliver-X5yjr56P.js +2587 -0
- package/dist/deps-DlFoECb7.js +27 -0
- package/dist/deps-UZ0CMWoo.js +27 -0
- package/dist/devices-cli-CpGSCere.js +207 -0
- package/dist/devices-cli-DIZJXWIY.js +204 -0
- package/dist/directory-cli-DhC1uA2S.js +247 -0
- package/dist/directory-cli-ZDXb1dmk.js +244 -0
- package/dist/dispatcher-DLhpc7HC.js +160 -0
- package/dist/dns-cli-B7Xi-izZ.js +198 -0
- package/dist/dns-cli-BsvKw0iq.js +201 -0
- package/dist/docs-cli-Bi5BtLfY.js +161 -0
- package/dist/docs-cli-CkczsV22.js +159 -0
- package/dist/doctor-CN9WxbwV.js +2586 -0
- package/dist/doctor-ClCw8y0M.js +2588 -0
- package/dist/entry.js +1330 -0
- package/dist/env-0_mKbEWW.js +32 -0
- package/dist/errors-CZ9opC6L.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-D4ny1TmX.js +1043 -0
- package/dist/exec-approvals-DmzWB9Zy.js +1043 -0
- package/dist/exec-approvals-cli-DPD2Z2Cg.js +385 -0
- package/dist/exec-approvals-cli-Dl4Y4IqE.js +388 -0
- package/dist/extensionAPI.js +68146 -0
- package/dist/format-8citvr_1.js +34 -0
- package/dist/format-tlvh4-cQ.js +34 -0
- package/dist/gateway-cli-B_lqsPIR.js +18017 -0
- package/dist/gateway-cli-D1Jvi6Ab.js +18016 -0
- package/dist/gateway-rpc-CYPgf43u.js +28 -0
- package/dist/gateway-rpc-CzWTXOHS.js +28 -0
- package/dist/github-copilot-auth-BcnJgC7r.js +1256 -0
- package/dist/github-copilot-auth-OEOMPahq.js +1256 -0
- package/dist/github-copilot-token-B3SA95yo.js +103 -0
- package/dist/github-copilot-token-SLWintYd.js +103 -0
- package/dist/github-copilot-token-pGSmVaW-.js +103 -0
- package/dist/gmail-setup-utils-CwS9GsIM.js +428 -0
- package/dist/gmail-setup-utils-D3Wa2Tx_.js +428 -0
- package/dist/health-format-CbDB25L0.js +1388 -0
- package/dist/health-format-DIJjpCDL.js +1389 -0
- package/dist/help-format-BlaVZH29.js +17 -0
- package/dist/help-format-DuMTLWZ-.js +17 -0
- package/dist/helpers-BiyEksaK.js +25 -0
- package/dist/helpers-CSZtxHTa.js +10 -0
- package/dist/helpers-CxHtCvId.js +10 -0
- package/dist/helpers-azbX_hrI.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-BuNzxQ-L.js +1058 -0
- package/dist/hooks-cli-D-QCmmC9.js +1061 -0
- package/dist/hooks-status-BvbcN-ho.js +443 -0
- package/dist/hooks-status-CH1ZdZs5.js +443 -0
- package/dist/image-BP1mAJzN.js +1421 -0
- package/dist/image-DMNGdVWb.js +629 -0
- package/dist/image-E_i8K6Vq.js +629 -0
- package/dist/index.js +5957 -0
- package/dist/installs-BcBaI60O.js +425 -0
- package/dist/installs-BhEjOqPy.js +425 -0
- package/dist/is-main-B6kCyqsv.js +25 -0
- package/dist/is-main-PYGa3tDA.js +25 -0
- package/dist/links-B4nk2iDf.js +15 -0
- package/dist/links-B5pRdmo1.js +15 -0
- package/dist/loader-DqiCudFO.js +64754 -0
- package/dist/logging-6zx7VGt-.js +15 -0
- package/dist/logging-BWRYHvLp.js +1 -0
- package/dist/logging-TXWhN8jG.js +15 -0
- package/dist/logging-pqyrk15z.js +1 -0
- package/dist/login-qr-Bo7zzLWd.js +478 -0
- package/dist/login-qr-CFw3hF2h.js +478 -0
- package/dist/login-qr-UmMP2m6M.js +475 -0
- package/dist/logs-cli-BBPaaFhF.js +230 -0
- package/dist/logs-cli-DTo-7DxM.js +227 -0
- package/dist/manager-B365Xcjg.js +3218 -0
- package/dist/manager-BtFI9Zdc.js +3216 -0
- package/dist/manager-Bwpep10z.js +3216 -0
- package/dist/manifest-registry-C69Z-I4v.js +668 -0
- package/dist/manifest-registry-DHaa1SJb.js +668 -0
- package/dist/message-channel-Bpfe5l5f.js +110 -0
- package/dist/message-channel-CQ6DgRUw.js +110 -0
- package/dist/model-selection-BXhwukLK.js +2734 -0
- package/dist/model-selection-CjiXwYEH.js +2983 -0
- package/dist/models-cli-DQKO_tWR.js +2542 -0
- package/dist/models-cli-k41kE3Yo.js +2545 -0
- package/dist/net-5DEH6AJK.js +1815 -0
- package/dist/node-cli-BXYXe5FE.js +1456 -0
- package/dist/node-cli-D7W69MZm.js +1459 -0
- package/dist/node-service-BTKxbzYo.js +67 -0
- package/dist/node-service-BoC2MKaK.js +67 -0
- package/dist/nodes-cli-MDb6jux3.js +1210 -0
- package/dist/nodes-cli-q-rHzVBz.js +1207 -0
- package/dist/nodes-screen-DT5HvhJV.js +157 -0
- package/dist/nodes-screen-DtXuFQdk.js +157 -0
- package/dist/note-B5HnoeZX.js +73 -0
- package/dist/note-_C44YfAQ.js +73 -0
- package/dist/onboard-channels-CKzF9fxT.js +671 -0
- package/dist/onboard-channels-Dr4FB1Sm.js +671 -0
- package/dist/onboard-skills-F6Kw1jrV.js +3452 -0
- package/dist/onboard-skills-aY4SkANg.js +3452 -0
- package/dist/onboarding-Do6ghpyS.js +3269 -0
- package/dist/openclaw-root-9ILYSmJ9.js +84 -0
- package/dist/openclaw-root-Cvotktkd.js +84 -0
- package/dist/pairing-cli-BUGQkncg.js +114 -0
- package/dist/pairing-cli-C63BXADO.js +117 -0
- package/dist/pairing-labels-DERlP-Wr.js +9 -0
- package/dist/pairing-labels-DhY2DQey.js +9 -0
- package/dist/pairing-store-D9vodPRR.js +391 -0
- package/dist/pairing-store-DWX2hYou.js +391 -0
- package/dist/parse-BZz5lHzQ.js +23 -0
- package/dist/parse-DqAvJRIf.js +23 -0
- package/dist/parse-log-line-BnB7770k.js +44 -0
- package/dist/parse-log-line-DSvJi17i.js +44 -0
- package/dist/parse-timeout-DV8NQQWk.js +16 -0
- package/dist/parse-timeout-Du-wHHNi.js +16 -0
- package/dist/path-env-DP3DsVge.js +77 -0
- package/dist/path-env-h3xp5PqO.js +77 -0
- package/dist/paths-B1kfl4h5.js +164 -0
- package/dist/paths-BT8VDsrj.js +43 -0
- package/dist/paths-BveE45t9.js +40 -0
- package/dist/paths-CR6bsrfc.js +43 -0
- package/dist/paths-scjhy7N2.js +180 -0
- package/dist/pi-embedded-helpers-BBIlv_VS.js +1303 -0
- package/dist/pi-embedded-helpers-CgGWSZV9.js +8480 -0
- package/dist/pi-embedded-helpers-CvujKXfr.js +1303 -0
- package/dist/pi-model-discovery-CV2V1HHz.js +20 -0
- package/dist/pi-model-discovery-DzEIEgHL.js +20 -0
- package/dist/pi-model-discovery-EhM2JAQo.js +20 -0
- package/dist/pi-tools.policy-JNsnW6cw.js +230 -0
- package/dist/plugin-auto-enable-CKBWhy8V.js +460 -0
- package/dist/plugin-auto-enable-D7FGzrWo.js +460 -0
- package/dist/plugin-sdk/agents/agent-paths.d.ts +2 -0
- package/dist/plugin-sdk/agents/agent-scope.d.ts +37 -0
- package/dist/plugin-sdk/agents/anthropic-payload-log.d.ts +16 -0
- package/dist/plugin-sdk/agents/apply-patch-update.d.ts +8 -0
- package/dist/plugin-sdk/agents/apply-patch.d.ts +24 -0
- package/dist/plugin-sdk/agents/auth-profiles/constants.d.ts +20 -0
- package/dist/plugin-sdk/agents/auth-profiles/display.d.ts +7 -0
- package/dist/plugin-sdk/agents/auth-profiles/doctor.d.ts +8 -0
- package/dist/plugin-sdk/agents/auth-profiles/external-cli-sync.d.ts +7 -0
- package/dist/plugin-sdk/agents/auth-profiles/oauth.d.ts +12 -0
- package/dist/plugin-sdk/agents/auth-profiles/order.d.ts +8 -0
- package/dist/plugin-sdk/agents/auth-profiles/paths.d.ts +4 -0
- package/dist/plugin-sdk/agents/auth-profiles/profiles.d.ts +18 -0
- package/dist/plugin-sdk/agents/auth-profiles/repair.d.ts +14 -0
- package/dist/plugin-sdk/agents/auth-profiles/session-override.d.ts +18 -0
- package/dist/plugin-sdk/agents/auth-profiles/store.d.ts +10 -0
- package/dist/plugin-sdk/agents/auth-profiles/types.d.ts +60 -0
- package/dist/plugin-sdk/agents/auth-profiles/usage.d.ts +47 -0
- package/dist/plugin-sdk/agents/auth-profiles.d.ts +11 -0
- package/dist/plugin-sdk/agents/bash-process-registry.d.ts +68 -0
- package/dist/plugin-sdk/agents/bash-tools.d.ts +4 -0
- package/dist/plugin-sdk/agents/bash-tools.exec.d.ts +54 -0
- package/dist/plugin-sdk/agents/bash-tools.process.d.ts +7 -0
- package/dist/plugin-sdk/agents/bash-tools.shared.d.ts +46 -0
- package/dist/plugin-sdk/agents/bedrock-discovery.d.ts +9 -0
- package/dist/plugin-sdk/agents/bootstrap-files.d.ts +25 -0
- package/dist/plugin-sdk/agents/bootstrap-hooks.d.ts +10 -0
- package/dist/plugin-sdk/agents/cache-trace.d.ts +51 -0
- package/dist/plugin-sdk/agents/channel-tools.d.ts +27 -0
- package/dist/plugin-sdk/agents/chutes-oauth.d.ts +46 -0
- package/dist/plugin-sdk/agents/cli-backends.d.ts +8 -0
- package/dist/plugin-sdk/agents/cli-credentials.d.ts +82 -0
- package/dist/plugin-sdk/agents/cli-runner/helpers.d.ts +76 -0
- package/dist/plugin-sdk/agents/cli-runner.d.ts +41 -0
- package/dist/plugin-sdk/agents/cli-session.d.ts +3 -0
- package/dist/plugin-sdk/agents/cloudflare-ai-gateway.d.ts +22 -0
- package/dist/plugin-sdk/agents/context-window-guard.d.ts +24 -0
- package/dist/plugin-sdk/agents/context.d.ts +1 -0
- package/dist/plugin-sdk/agents/date-time.d.ts +13 -0
- package/dist/plugin-sdk/agents/defaults.d.ts +3 -0
- package/dist/plugin-sdk/agents/docs-path.d.ts +6 -0
- package/dist/plugin-sdk/agents/failover-error.d.ts +33 -0
- package/dist/plugin-sdk/agents/identity.d.ts +25 -0
- package/dist/plugin-sdk/agents/lanes.d.ts +3 -0
- package/dist/plugin-sdk/agents/memory-search.d.ts +66 -0
- package/dist/plugin-sdk/agents/minimax-vlm.d.ts +7 -0
- package/dist/plugin-sdk/agents/model-auth.d.ts +36 -0
- package/dist/plugin-sdk/agents/model-catalog.d.ts +25 -0
- package/dist/plugin-sdk/agents/model-compat.d.ts +2 -0
- package/dist/plugin-sdk/agents/model-fallback.d.ts +49 -0
- package/dist/plugin-sdk/agents/model-selection.d.ts +93 -0
- package/dist/plugin-sdk/agents/models-config.d.ts +5 -0
- package/dist/plugin-sdk/agents/models-config.providers.d.ts +26 -0
- package/dist/plugin-sdk/agents/openclaw-tools.d.ts +44 -0
- package/dist/plugin-sdk/agents/pi-embedded-block-chunker.d.ts +19 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/bootstrap.d.ts +28 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/errors.d.ts +47 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/google.d.ts +8 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/images.d.ts +20 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/messaging-dedupe.d.ts +10 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/openai.d.ts +9 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/thinking.d.ts +5 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/turns.d.ts +20 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers/types.d.ts +5 -0
- package/dist/plugin-sdk/agents/pi-embedded-helpers.d.ts +11 -0
- package/dist/plugin-sdk/agents/pi-embedded-messaging.d.ts +8 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/abort.d.ts +1 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/cache-ttl.d.ts +9 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/compact.d.ts +50 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/extensions.d.ts +12 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/extra-params.d.ts +22 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/google.d.ts +39 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/history.d.ts +12 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/lanes.d.ts +3 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/logger.d.ts +1 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/model.d.ts +22 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/attempt.d.ts +5 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/images.d.ts +83 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +116 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/payloads.d.ts +34 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run/types.d.ts +133 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/run.d.ts +3 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/runs.d.ts +14 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/sandbox-info.d.ts +4 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/session-manager-cache.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/session-manager-init.d.ts +17 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/system-prompt.d.ts +51 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/tool-result-truncation.d.ts +65 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/tool-split.d.ts +11 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/types.d.ts +70 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner/utils.d.ts +8 -0
- package/dist/plugin-sdk/agents/pi-embedded-runner.d.ts +12 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.d.ts +20 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.lifecycle.d.ts +8 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.messages.d.ts +12 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.tools.d.ts +18 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.handlers.types.d.ts +108 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.raw-stream.d.ts +1 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.tools.d.ts +6 -0
- package/dist/plugin-sdk/agents/pi-embedded-subscribe.types.d.ts +44 -0
- package/dist/plugin-sdk/agents/pi-embedded-utils.d.ts +38 -0
- package/dist/plugin-sdk/agents/pi-embedded.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-extensions/compaction-safeguard-runtime.d.ts +6 -0
- package/dist/plugin-sdk/agents/pi-extensions/context-pruning/runtime.d.ts +9 -0
- package/dist/plugin-sdk/agents/pi-extensions/context-pruning/settings.d.ts +44 -0
- package/dist/plugin-sdk/agents/pi-extensions/context-pruning/tools.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-model-discovery.d.ts +4 -0
- package/dist/plugin-sdk/agents/pi-settings.d.ts +19 -0
- package/dist/plugin-sdk/agents/pi-tool-definition-adapter.d.ts +10 -0
- package/dist/plugin-sdk/agents/pi-tools.abort.d.ts +2 -0
- package/dist/plugin-sdk/agents/pi-tools.before-tool-call.d.ts +25 -0
- package/dist/plugin-sdk/agents/pi-tools.d.ts +69 -0
- package/dist/plugin-sdk/agents/pi-tools.policy.d.ts +37 -0
- package/dist/plugin-sdk/agents/pi-tools.read.d.ts +35 -0
- package/dist/plugin-sdk/agents/pi-tools.schema.d.ts +3 -0
- package/dist/plugin-sdk/agents/pi-tools.types.d.ts +2 -0
- package/dist/plugin-sdk/agents/pty-dsr.d.ts +5 -0
- package/dist/plugin-sdk/agents/pty-keys.d.ts +13 -0
- package/dist/plugin-sdk/agents/sandbox/browser-bridges.d.ts +5 -0
- package/dist/plugin-sdk/agents/sandbox/browser.d.ts +8 -0
- package/dist/plugin-sdk/agents/sandbox/config-hash.d.ts +9 -0
- package/dist/plugin-sdk/agents/sandbox/config.d.ts +22 -0
- package/dist/plugin-sdk/agents/sandbox/constants.d.ts +19 -0
- package/dist/plugin-sdk/agents/sandbox/context.d.ts +12 -0
- package/dist/plugin-sdk/agents/sandbox/docker.d.ts +28 -0
- package/dist/plugin-sdk/agents/sandbox/manage.d.ts +13 -0
- package/dist/plugin-sdk/agents/sandbox/prune.d.ts +3 -0
- package/dist/plugin-sdk/agents/sandbox/registry.d.ts +30 -0
- package/dist/plugin-sdk/agents/sandbox/runtime-status.d.ts +18 -0
- package/dist/plugin-sdk/agents/sandbox/shared.d.ts +4 -0
- package/dist/plugin-sdk/agents/sandbox/tool-policy.d.ts +4 -0
- package/dist/plugin-sdk/agents/sandbox/types.d.ts +73 -0
- package/dist/plugin-sdk/agents/sandbox/types.docker.d.ts +25 -0
- package/dist/plugin-sdk/agents/sandbox/workspace.d.ts +1 -0
- package/dist/plugin-sdk/agents/sandbox-paths.d.ts +21 -0
- package/dist/plugin-sdk/agents/sandbox.d.ts +8 -0
- package/dist/plugin-sdk/agents/schema/clean-for-gemini.d.ts +2 -0
- package/dist/plugin-sdk/agents/schema/typebox.d.ts +14 -0
- package/dist/plugin-sdk/agents/session-file-repair.d.ts +11 -0
- package/dist/plugin-sdk/agents/session-slug.d.ts +1 -0
- package/dist/plugin-sdk/agents/session-tool-result-guard-wrapper.d.ts +14 -0
- package/dist/plugin-sdk/agents/session-tool-result-guard.d.ts +21 -0
- package/dist/plugin-sdk/agents/session-transcript-repair.d.ts +26 -0
- package/dist/plugin-sdk/agents/session-write-lock.d.ts +21 -0
- package/dist/plugin-sdk/agents/shell-utils.d.ts +7 -0
- package/dist/plugin-sdk/agents/skills/bundled-dir.d.ts +7 -0
- package/dist/plugin-sdk/agents/skills/config.d.ts +14 -0
- package/dist/plugin-sdk/agents/skills/env-overrides.d.ts +10 -0
- package/dist/plugin-sdk/agents/skills/frontmatter.d.ts +6 -0
- package/dist/plugin-sdk/agents/skills/plugin-skills.d.ts +5 -0
- package/dist/plugin-sdk/agents/skills/refresh.d.ts +19 -0
- package/dist/plugin-sdk/agents/skills/serialize.d.ts +1 -0
- package/dist/plugin-sdk/agents/skills/types.d.ts +80 -0
- package/dist/plugin-sdk/agents/skills/workspace.d.ts +49 -0
- package/dist/plugin-sdk/agents/skills.d.ts +7 -0
- package/dist/plugin-sdk/agents/subagent-announce-queue.d.ts +22 -0
- package/dist/plugin-sdk/agents/subagent-announce.d.ts +30 -0
- package/dist/plugin-sdk/agents/subagent-registry.d.ts +35 -0
- package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +5 -0
- package/dist/plugin-sdk/agents/synthetic-models.d.ts +153 -0
- package/dist/plugin-sdk/agents/system-prompt-params.d.ts +30 -0
- package/dist/plugin-sdk/agents/system-prompt-report.d.ts +20 -0
- package/dist/plugin-sdk/agents/system-prompt.d.ts +77 -0
- package/dist/plugin-sdk/agents/timeout.d.ts +8 -0
- package/dist/plugin-sdk/agents/tool-call-id.d.ts +17 -0
- package/dist/plugin-sdk/agents/tool-display.d.ts +15 -0
- package/dist/plugin-sdk/agents/tool-images.d.ts +19 -0
- package/dist/plugin-sdk/agents/tool-policy.d.ts +39 -0
- package/dist/plugin-sdk/agents/tool-summaries.d.ts +2 -0
- package/dist/plugin-sdk/agents/tools/agent-step.d.ts +12 -0
- package/dist/plugin-sdk/agents/tools/agents-list-tool.d.ts +6 -0
- package/dist/plugin-sdk/agents/tools/browser-tool.d.ts +5 -0
- package/dist/plugin-sdk/agents/tools/browser-tool.schema.d.ts +50 -0
- package/dist/plugin-sdk/agents/tools/canvas-tool.d.ts +2 -0
- package/dist/plugin-sdk/agents/tools/common.d.ts +52 -0
- package/dist/plugin-sdk/agents/tools/cron-tool.d.ts +6 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-guild.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-messaging.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-moderation.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions-presence.d.ts +4 -0
- package/dist/plugin-sdk/agents/tools/discord-actions.d.ts +3 -0
- package/dist/plugin-sdk/agents/tools/gateway-tool.d.ts +6 -0
- package/dist/plugin-sdk/agents/tools/gateway.d.ts +14 -0
- package/dist/plugin-sdk/agents/tools/image-tool.d.ts +26 -0
- package/dist/plugin-sdk/agents/tools/image-tool.helpers.d.ts +21 -0
- package/dist/plugin-sdk/agents/tools/memory-tool.d.ts +10 -0
- package/dist/plugin-sdk/agents/tools/message-tool.d.ts +18 -0
- package/dist/plugin-sdk/agents/tools/nodes-tool.d.ts +6 -0
- package/dist/plugin-sdk/agents/tools/nodes-utils.d.ts +20 -0
- package/dist/plugin-sdk/agents/tools/session-status-tool.d.ts +6 -0
- package/dist/plugin-sdk/agents/tools/sessions-announce-target.d.ts +5 -0
- package/dist/plugin-sdk/agents/tools/sessions-helpers.d.ts +90 -0
- package/dist/plugin-sdk/agents/tools/sessions-history-tool.d.ts +5 -0
- package/dist/plugin-sdk/agents/tools/sessions-list-tool.d.ts +5 -0
- package/dist/plugin-sdk/agents/tools/sessions-send-helpers.d.ts +34 -0
- package/dist/plugin-sdk/agents/tools/sessions-send-tool.a2a.d.ts +12 -0
- package/dist/plugin-sdk/agents/tools/sessions-send-tool.d.ts +7 -0
- package/dist/plugin-sdk/agents/tools/sessions-spawn-tool.d.ts +15 -0
- package/dist/plugin-sdk/agents/tools/slack-actions.d.ts +15 -0
- package/dist/plugin-sdk/agents/tools/telegram-actions.d.ts +9 -0
- package/dist/plugin-sdk/agents/tools/tts-tool.d.ts +7 -0
- package/dist/plugin-sdk/agents/tools/web-fetch-utils.d.ts +18 -0
- package/dist/plugin-sdk/agents/tools/web-fetch.d.ts +25 -0
- package/dist/plugin-sdk/agents/tools/web-search.d.ts +22 -0
- package/dist/plugin-sdk/agents/tools/web-shared.d.ts +17 -0
- package/dist/plugin-sdk/agents/tools/web-tools.d.ts +2 -0
- package/dist/plugin-sdk/agents/tools/whatsapp-actions.d.ts +3 -0
- package/dist/plugin-sdk/agents/transcript-policy.d.ts +23 -0
- package/dist/plugin-sdk/agents/usage.d.ts +35 -0
- package/dist/plugin-sdk/agents/venice-models.d.ts +238 -0
- package/dist/plugin-sdk/agents/workspace-run.d.ts +18 -0
- package/dist/plugin-sdk/agents/workspace-templates.d.ts +6 -0
- package/dist/plugin-sdk/agents/workspace.d.ts +33 -0
- package/dist/plugin-sdk/auto-reply/chunk.d.ts +45 -0
- package/dist/plugin-sdk/auto-reply/command-auth.d.ts +17 -0
- package/dist/plugin-sdk/auto-reply/command-detection.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/commands-args.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/commands-registry.d.ts +54 -0
- package/dist/plugin-sdk/auto-reply/commands-registry.data.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/commands-registry.types.d.ts +66 -0
- package/dist/plugin-sdk/auto-reply/dispatch.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/envelope.d.ts +59 -0
- package/dist/plugin-sdk/auto-reply/group-activation.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +26 -0
- package/dist/plugin-sdk/auto-reply/inbound-debounce.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/media-note.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/model.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/abort.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-execution.d.ts +49 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-helpers.d.ts +17 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-memory.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-payloads.d.ts +25 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +30 -0
- package/dist/plugin-sdk/auto-reply/reply/agent-runner.d.ts +38 -0
- package/dist/plugin-sdk/auto-reply/reply/bash-command.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/block-reply-pipeline.d.ts +31 -0
- package/dist/plugin-sdk/auto-reply/reply/block-streaming.d.ts +22 -0
- package/dist/plugin-sdk/auto-reply/reply/body.d.ts +11 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-allowlist.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-approve.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-bash.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-compact.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-config.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-context-report.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-context.d.ts +12 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-core.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-info.d.ts +10 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-models.d.ts +23 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-plugin.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-session.d.ts +7 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +24 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-subagents.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-tts.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +60 -0
- package/dist/plugin-sdk/auto-reply/reply/commands.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/config-commands.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/config-value.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/debug-commands.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.auth.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.fast-lane.d.ts +47 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.impl.d.ts +36 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.model-picker.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.model.d.ts +42 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +62 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +37 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
- package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +38 -0
- package/dist/plugin-sdk/auto-reply/reply/dispatch-from-config.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/exec/directive.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/exec.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/followup-runner.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +64 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +91 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +59 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +69 -0
- package/dist/plugin-sdk/auto-reply/reply/get-reply.d.ts +4 -0
- package/dist/plugin-sdk/auto-reply/reply/groups.d.ts +16 -0
- package/dist/plugin-sdk/auto-reply/reply/history.d.ts +72 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-context.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-dedupe.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-sender-meta.d.ts +5 -0
- package/dist/plugin-sdk/auto-reply/reply/inbound-text.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply/line-directives.d.ts +22 -0
- package/dist/plugin-sdk/auto-reply/reply/memory-flush.d.ts +23 -0
- package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +18 -0
- package/dist/plugin-sdk/auto-reply/reply/model-selection.d.ts +61 -0
- package/dist/plugin-sdk/auto-reply/reply/normalize-reply.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/provider-dispatcher.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/cleanup.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/directive.d.ts +15 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/drain.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/enqueue.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/normalize.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/settings.d.ts +2 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/state.d.ts +19 -0
- package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +84 -0
- package/dist/plugin-sdk/auto-reply/reply/queue.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-directives.d.ts +14 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +51 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-elevated.d.ts +23 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-inline.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-payloads.d.ts +22 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-reference.d.ts +20 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-tags.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/reply/reply-threading.d.ts +9 -0
- package/dist/plugin-sdk/auto-reply/reply/response-prefix-template.d.ts +51 -0
- package/dist/plugin-sdk/auto-reply/reply/route-reply.d.ts +56 -0
- package/dist/plugin-sdk/auto-reply/reply/session-reset-model.d.ts +24 -0
- package/dist/plugin-sdk/auto-reply/reply/session-updates.d.ts +34 -0
- package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +13 -0
- package/dist/plugin-sdk/auto-reply/reply/session.d.ts +26 -0
- package/dist/plugin-sdk/auto-reply/reply/stage-sandbox-media.d.ts +9 -0
- package/dist/plugin-sdk/auto-reply/reply/streaming-directives.d.ts +10 -0
- package/dist/plugin-sdk/auto-reply/reply/subagents-utils.d.ts +9 -0
- package/dist/plugin-sdk/auto-reply/reply/typing-mode.d.ts +27 -0
- package/dist/plugin-sdk/auto-reply/reply/typing.d.ts +18 -0
- package/dist/plugin-sdk/auto-reply/reply/untrusted-context.d.ts +1 -0
- package/dist/plugin-sdk/auto-reply/reply.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/send-policy.d.ts +6 -0
- package/dist/plugin-sdk/auto-reply/skill-commands.d.ts +18 -0
- package/dist/plugin-sdk/auto-reply/status.d.ts +53 -0
- package/dist/plugin-sdk/auto-reply/templating.d.ts +140 -0
- package/dist/plugin-sdk/auto-reply/thinking.d.ts +22 -0
- package/dist/plugin-sdk/auto-reply/tokens.d.ts +3 -0
- package/dist/plugin-sdk/auto-reply/tool-meta.d.ts +8 -0
- package/dist/plugin-sdk/auto-reply/types.d.ts +57 -0
- package/dist/plugin-sdk/browser/bridge-server.d.ts +17 -0
- package/dist/plugin-sdk/browser/cdp.d.ts +123 -0
- package/dist/plugin-sdk/browser/cdp.helpers.d.ts +11 -0
- package/dist/plugin-sdk/browser/chrome.d.ts +20 -0
- package/dist/plugin-sdk/browser/chrome.executables.d.ts +9 -0
- package/dist/plugin-sdk/browser/chrome.profile-decoration.d.ts +10 -0
- package/dist/plugin-sdk/browser/client-actions-core.d.ts +143 -0
- package/dist/plugin-sdk/browser/client-actions-observe.d.ts +68 -0
- package/dist/plugin-sdk/browser/client-actions-state.d.ts +90 -0
- package/dist/plugin-sdk/browser/client-actions-types.d.ts +18 -0
- package/dist/plugin-sdk/browser/client-actions.d.ts +4 -0
- package/dist/plugin-sdk/browser/client-fetch.d.ts +3 -0
- package/dist/plugin-sdk/browser/client.d.ts +147 -0
- package/dist/plugin-sdk/browser/config.d.ts +39 -0
- package/dist/plugin-sdk/browser/constants.d.ts +8 -0
- package/dist/plugin-sdk/browser/control-service.d.ts +5 -0
- package/dist/plugin-sdk/browser/extension-relay.d.ts +15 -0
- package/dist/plugin-sdk/browser/profiles-service.d.ts +25 -0
- package/dist/plugin-sdk/browser/profiles.d.ts +30 -0
- package/dist/plugin-sdk/browser/pw-ai-module.d.ts +6 -0
- package/dist/plugin-sdk/browser/pw-ai.d.ts +2 -0
- package/dist/plugin-sdk/browser/pw-role-snapshot.d.ts +35 -0
- package/dist/plugin-sdk/browser/pw-session.d.ts +135 -0
- package/dist/plugin-sdk/browser/pw-tools-core.activity.d.ts +21 -0
- package/dist/plugin-sdk/browser/pw-tools-core.d.ts +8 -0
- package/dist/plugin-sdk/browser/pw-tools-core.downloads.d.ts +34 -0
- package/dist/plugin-sdk/browser/pw-tools-core.interactions.d.ts +112 -0
- package/dist/plugin-sdk/browser/pw-tools-core.responses.d.ts +13 -0
- package/dist/plugin-sdk/browser/pw-tools-core.shared.d.ts +6 -0
- package/dist/plugin-sdk/browser/pw-tools-core.snapshot.d.ts +64 -0
- package/dist/plugin-sdk/browser/pw-tools-core.state.d.ts +46 -0
- package/dist/plugin-sdk/browser/pw-tools-core.storage.d.ts +47 -0
- package/dist/plugin-sdk/browser/pw-tools-core.trace.d.ts +12 -0
- package/dist/plugin-sdk/browser/routes/agent.act.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/agent.act.shared.d.ts +10 -0
- package/dist/plugin-sdk/browser/routes/agent.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/agent.debug.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/agent.shared.d.ts +9 -0
- package/dist/plugin-sdk/browser/routes/agent.snapshot.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/agent.storage.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/basic.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/dispatcher.d.ts +15 -0
- package/dist/plugin-sdk/browser/routes/index.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/tabs.d.ts +3 -0
- package/dist/plugin-sdk/browser/routes/types.d.ts +15 -0
- package/dist/plugin-sdk/browser/routes/utils.d.ts +15 -0
- package/dist/plugin-sdk/browser/screenshot.d.ts +9 -0
- package/dist/plugin-sdk/browser/server-context.d.ts +3 -0
- package/dist/plugin-sdk/browser/server-context.types.d.ts +78 -0
- package/dist/plugin-sdk/browser/target-id.d.ts +11 -0
- package/dist/plugin-sdk/browser/trash.d.ts +1 -0
- package/dist/plugin-sdk/channel-web.d.ts +6 -0
- package/dist/plugin-sdk/channels/ack-reactions.d.ts +29 -0
- package/dist/plugin-sdk/channels/allowlist-match.d.ts +10 -0
- package/dist/plugin-sdk/channels/allowlists/resolve-utils.d.ts +6 -0
- package/dist/plugin-sdk/channels/channel-config.d.ts +39 -0
- package/dist/plugin-sdk/channels/chat-type.d.ts +2 -0
- package/dist/plugin-sdk/channels/command-gating.d.ts +20 -0
- package/dist/plugin-sdk/channels/conversation-label.d.ts +2 -0
- package/dist/plugin-sdk/channels/dock.d.ts +36 -0
- package/dist/plugin-sdk/channels/location.d.ts +21 -0
- package/dist/plugin-sdk/channels/logging.d.ts +20 -0
- package/dist/plugin-sdk/channels/mention-gating.d.ts +27 -0
- package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.d.ts +3 -0
- package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +9 -0
- package/dist/plugin-sdk/channels/plugins/actions/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/actions/signal.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/actions/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/agent-tools/whatsapp-login.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/allowlist-match.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/bluebubbles-actions.d.ts +48 -0
- package/dist/plugin-sdk/channels/plugins/channel-config.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/config-helpers.d.ts +14 -0
- package/dist/plugin-sdk/channels/plugins/config-schema.d.ts +3 -0
- package/dist/plugin-sdk/channels/plugins/config-writes.d.ts +7 -0
- package/dist/plugin-sdk/channels/plugins/directory-config.d.ts +16 -0
- package/dist/plugin-sdk/channels/plugins/group-mentions.d.ts +28 -0
- package/dist/plugin-sdk/channels/plugins/helpers.d.ts +8 -0
- package/dist/plugin-sdk/channels/plugins/index.d.ts +8 -0
- package/dist/plugin-sdk/channels/plugins/media-limits.d.ts +9 -0
- package/dist/plugin-sdk/channels/plugins/message-action-names.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/message-actions.d.ts +7 -0
- package/dist/plugin-sdk/channels/plugins/normalize/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/imessage.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/signal.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/slack.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/normalize/whatsapp.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/channel-access.d.ts +31 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/helpers.d.ts +3 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/imessage.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/slack.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding/whatsapp.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/onboarding-types.d.ts +77 -0
- package/dist/plugin-sdk/channels/plugins/outbound/load.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/pairing-message.d.ts +1 -0
- package/dist/plugin-sdk/channels/plugins/pairing.d.ts +16 -0
- package/dist/plugin-sdk/channels/plugins/setup-helpers.d.ts +13 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/discord.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/shared.d.ts +10 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/telegram.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/status-issues/whatsapp.d.ts +2 -0
- package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +294 -0
- package/dist/plugin-sdk/channels/plugins/types.core.d.ts +311 -0
- package/dist/plugin-sdk/channels/plugins/types.d.ts +6 -0
- package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +53 -0
- package/dist/plugin-sdk/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
- package/dist/plugin-sdk/channels/registry.d.ts +16 -0
- package/dist/plugin-sdk/channels/reply-prefix.d.ts +24 -0
- package/dist/plugin-sdk/channels/sender-label.d.ts +9 -0
- package/dist/plugin-sdk/channels/session.d.ts +18 -0
- package/dist/plugin-sdk/channels/targets.d.ts +25 -0
- package/dist/plugin-sdk/channels/typing.d.ts +12 -0
- package/dist/plugin-sdk/channels/web/index.d.ts +1 -0
- package/dist/plugin-sdk/cli/cli-name.d.ts +3 -0
- package/dist/plugin-sdk/cli/cli-utils.d.ts +18 -0
- package/dist/plugin-sdk/cli/command-format.d.ts +1 -0
- package/dist/plugin-sdk/cli/deps.d.ts +18 -0
- package/dist/plugin-sdk/cli/memory-cli.d.ts +12 -0
- package/dist/plugin-sdk/cli/nodes-camera.d.ts +26 -0
- package/dist/plugin-sdk/cli/nodes-canvas.d.ts +10 -0
- package/dist/plugin-sdk/cli/nodes-run.d.ts +3 -0
- package/dist/plugin-sdk/cli/nodes-screen.d.ts +18 -0
- package/dist/plugin-sdk/cli/parse-duration.d.ts +4 -0
- package/dist/plugin-sdk/cli/parse-timeout.d.ts +1 -0
- package/dist/plugin-sdk/cli/profile-utils.d.ts +2 -0
- package/dist/plugin-sdk/cli/progress.d.ts +24 -0
- package/dist/plugin-sdk/cli/wait.d.ts +1 -0
- package/dist/plugin-sdk/commands/agent/types.d.ts +75 -0
- package/dist/plugin-sdk/commands/daemon-runtime.d.ts +8 -0
- package/dist/plugin-sdk/commands/health.d.ts +63 -0
- package/dist/plugin-sdk/commands/oauth-flow.d.ts +21 -0
- package/dist/plugin-sdk/commands/onboard-helpers.d.ts +81 -0
- package/dist/plugin-sdk/commands/onboard-types.d.ts +67 -0
- package/dist/plugin-sdk/commands/signal-install.d.ts +8 -0
- package/dist/plugin-sdk/compat/legacy-names.d.ts +8 -0
- package/dist/plugin-sdk/config/agent-dirs.d.ts +14 -0
- package/dist/plugin-sdk/config/agent-limits.d.ts +5 -0
- package/dist/plugin-sdk/config/cache-utils.d.ts +6 -0
- package/dist/plugin-sdk/config/channel-capabilities.d.ts +6 -0
- package/dist/plugin-sdk/config/commands.d.ts +16 -0
- package/dist/plugin-sdk/config/config-paths.d.ts +10 -0
- package/dist/plugin-sdk/config/config.d.ts +7 -0
- package/dist/plugin-sdk/config/defaults.d.ts +18 -0
- package/dist/plugin-sdk/config/env-substitution.d.ts +35 -0
- package/dist/plugin-sdk/config/env-vars.d.ts +2 -0
- package/dist/plugin-sdk/config/group-policy.d.ts +44 -0
- package/dist/plugin-sdk/config/includes.d.ts +32 -0
- package/dist/plugin-sdk/config/io.d.ts +36 -0
- package/dist/plugin-sdk/config/legacy-migrate.d.ts +5 -0
- package/dist/plugin-sdk/config/legacy.d.ts +6 -0
- package/dist/plugin-sdk/config/legacy.migrations.d.ts +1 -0
- package/dist/plugin-sdk/config/legacy.migrations.part-1.d.ts +2 -0
- package/dist/plugin-sdk/config/legacy.migrations.part-2.d.ts +2 -0
- package/dist/plugin-sdk/config/legacy.migrations.part-3.d.ts +2 -0
- package/dist/plugin-sdk/config/legacy.rules.d.ts +2 -0
- package/dist/plugin-sdk/config/legacy.shared.d.ts +18 -0
- package/dist/plugin-sdk/config/markdown-tables.d.ts +7 -0
- package/dist/plugin-sdk/config/merge-config.d.ts +7 -0
- package/dist/plugin-sdk/config/normalize-paths.d.ts +8 -0
- package/dist/plugin-sdk/config/paths.d.ts +57 -0
- package/dist/plugin-sdk/config/port-defaults.d.ts +13 -0
- package/dist/plugin-sdk/config/runtime-overrides.d.ts +15 -0
- package/dist/plugin-sdk/config/sessions/group.d.ts +11 -0
- package/dist/plugin-sdk/config/sessions/main-session.d.ts +43 -0
- package/dist/plugin-sdk/config/sessions/metadata.d.ts +16 -0
- package/dist/plugin-sdk/config/sessions/paths.d.ts +11 -0
- package/dist/plugin-sdk/config/sessions/reset.d.ts +43 -0
- package/dist/plugin-sdk/config/sessions/session-key.d.ts +8 -0
- package/dist/plugin-sdk/config/sessions/store.d.ts +38 -0
- package/dist/plugin-sdk/config/sessions/transcript.d.ts +18 -0
- package/dist/plugin-sdk/config/sessions/types.d.ts +146 -0
- package/dist/plugin-sdk/config/sessions.d.ts +9 -0
- package/dist/plugin-sdk/config/talk.d.ts +11 -0
- package/dist/plugin-sdk/config/telegram-custom-commands.d.ts +24 -0
- package/dist/plugin-sdk/config/types.agent-defaults.d.ts +254 -0
- package/dist/plugin-sdk/config/types.agents.d.ts +77 -0
- package/dist/plugin-sdk/config/types.approvals.d.ts +26 -0
- package/dist/plugin-sdk/config/types.auth.d.ts +28 -0
- package/dist/plugin-sdk/config/types.base.d.ts +149 -0
- package/dist/plugin-sdk/config/types.browser.d.ts +41 -0
- package/dist/plugin-sdk/config/types.channels.d.ts +34 -0
- package/dist/plugin-sdk/config/types.cron.d.ts +5 -0
- package/dist/plugin-sdk/config/types.d.ts +29 -0
- package/dist/plugin-sdk/config/types.discord.d.ts +151 -0
- package/dist/plugin-sdk/config/types.gateway.d.ts +224 -0
- package/dist/plugin-sdk/config/types.googlechat.d.ts +100 -0
- package/dist/plugin-sdk/config/types.hooks.d.ts +106 -0
- package/dist/plugin-sdk/config/types.imessage.d.ts +71 -0
- package/dist/plugin-sdk/config/types.memory.d.ts +43 -0
- package/dist/plugin-sdk/config/types.messages.d.ts +106 -0
- package/dist/plugin-sdk/config/types.models.d.ts +47 -0
- package/dist/plugin-sdk/config/types.msteams.d.ts +101 -0
- package/dist/plugin-sdk/config/types.node-host.d.ts +10 -0
- package/dist/plugin-sdk/config/types.openclaw.d.ts +108 -0
- package/dist/plugin-sdk/config/types.plugins.d.ts +32 -0
- package/dist/plugin-sdk/config/types.queue.d.ts +13 -0
- package/dist/plugin-sdk/config/types.sandbox.d.ts +76 -0
- package/dist/plugin-sdk/config/types.signal.d.ts +86 -0
- package/dist/plugin-sdk/config/types.skills.d.ts +28 -0
- package/dist/plugin-sdk/config/types.slack.d.ts +138 -0
- package/dist/plugin-sdk/config/types.telegram.d.ts +160 -0
- package/dist/plugin-sdk/config/types.tools.d.ts +437 -0
- package/dist/plugin-sdk/config/types.tts.d.ts +78 -0
- package/dist/plugin-sdk/config/types.whatsapp.d.ts +157 -0
- package/dist/plugin-sdk/config/validation.d.ts +17 -0
- package/dist/plugin-sdk/config/version.d.ts +8 -0
- package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +245 -0
- package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +819 -0
- package/dist/plugin-sdk/config/zod-schema.agents.d.ts +493 -0
- package/dist/plugin-sdk/config/zod-schema.approvals.d.ts +15 -0
- package/dist/plugin-sdk/config/zod-schema.channels.d.ts +6 -0
- package/dist/plugin-sdk/config/zod-schema.core.d.ts +647 -0
- package/dist/plugin-sdk/config/zod-schema.d.ts +3085 -0
- package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +78 -0
- package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +2761 -0
- package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +231 -0
- package/dist/plugin-sdk/config/zod-schema.providers.d.ts +1662 -0
- package/dist/plugin-sdk/config/zod-schema.session.d.ts +183 -0
- package/dist/plugin-sdk/cron/delivery.d.ts +9 -0
- package/dist/plugin-sdk/cron/normalize.d.ts +9 -0
- package/dist/plugin-sdk/cron/parse.d.ts +1 -0
- package/dist/plugin-sdk/cron/payload-migration.d.ts +3 -0
- package/dist/plugin-sdk/cron/schedule.d.ts +2 -0
- package/dist/plugin-sdk/cron/service/jobs.d.ts +13 -0
- package/dist/plugin-sdk/cron/service/locked.d.ts +2 -0
- package/dist/plugin-sdk/cron/service/normalize.d.ts +17 -0
- package/dist/plugin-sdk/cron/service/ops.d.ts +43 -0
- package/dist/plugin-sdk/cron/service/state.d.ts +96 -0
- package/dist/plugin-sdk/cron/service/store.d.ts +9 -0
- package/dist/plugin-sdk/cron/service/timer.d.ts +23 -0
- package/dist/plugin-sdk/cron/service.d.ts +48 -0
- package/dist/plugin-sdk/cron/store.d.ts +6 -0
- package/dist/plugin-sdk/cron/types.d.ts +93 -0
- package/dist/plugin-sdk/daemon/constants.d.ts +30 -0
- package/dist/plugin-sdk/discord/accounts.d.ts +17 -0
- package/dist/plugin-sdk/discord/api.d.ts +11 -0
- package/dist/plugin-sdk/discord/audit.d.ts +29 -0
- package/dist/plugin-sdk/discord/chunk.d.ts +20 -0
- package/dist/plugin-sdk/discord/directory-live.d.ts +4 -0
- package/dist/plugin-sdk/discord/gateway-logging.d.ts +8 -0
- package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +137 -0
- package/dist/plugin-sdk/discord/monitor/exec-approvals.d.ts +70 -0
- package/dist/plugin-sdk/discord/monitor/format.d.ts +13 -0
- package/dist/plugin-sdk/discord/monitor/gateway-registry.d.ts +9 -0
- package/dist/plugin-sdk/discord/monitor/listeners.d.ts +49 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.d.ts +26 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.preflight.d.ts +3 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.preflight.types.d.ts +86 -0
- package/dist/plugin-sdk/discord/monitor/message-handler.process.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/message-utils.d.ts +31 -0
- package/dist/plugin-sdk/discord/monitor/native-command.d.ts +20 -0
- package/dist/plugin-sdk/discord/monitor/presence-cache.d.ts +9 -0
- package/dist/plugin-sdk/discord/monitor/provider.d.ts +13 -0
- package/dist/plugin-sdk/discord/monitor/reply-context.d.ts +13 -0
- package/dist/plugin-sdk/discord/monitor/reply-delivery.d.ts +18 -0
- package/dist/plugin-sdk/discord/monitor/sender-identity.d.ts +31 -0
- package/dist/plugin-sdk/discord/monitor/system-events.d.ts +2 -0
- package/dist/plugin-sdk/discord/monitor/threading.d.ts +101 -0
- package/dist/plugin-sdk/discord/monitor/typing.d.ts +5 -0
- package/dist/plugin-sdk/discord/monitor.d.ts +10 -0
- package/dist/plugin-sdk/discord/monitor.gateway.d.ts +12 -0
- package/dist/plugin-sdk/discord/pluralkit.d.ts +26 -0
- package/dist/plugin-sdk/discord/probe.d.ts +29 -0
- package/dist/plugin-sdk/discord/resolve-channels.d.ts +15 -0
- package/dist/plugin-sdk/discord/resolve-users.d.ts +14 -0
- package/dist/plugin-sdk/discord/send.channels.d.ts +17 -0
- package/dist/plugin-sdk/discord/send.d.ts +8 -0
- package/dist/plugin-sdk/discord/send.emojis-stickers.d.ts +4 -0
- package/dist/plugin-sdk/discord/send.guild.d.ts +24 -0
- package/dist/plugin-sdk/discord/send.messages.d.ts +18 -0
- package/dist/plugin-sdk/discord/send.outbound.d.ts +22 -0
- package/dist/plugin-sdk/discord/send.permissions.d.ts +4 -0
- package/dist/plugin-sdk/discord/send.reactions.d.ts +15 -0
- package/dist/plugin-sdk/discord/send.shared.d.ts +69 -0
- package/dist/plugin-sdk/discord/send.types.d.ts +130 -0
- package/dist/plugin-sdk/discord/targets.d.ts +18 -0
- package/dist/plugin-sdk/discord/token.d.ts +11 -0
- package/dist/plugin-sdk/gateway/call.d.ts +51 -0
- package/dist/plugin-sdk/gateway/chat-abort.d.ts +44 -0
- package/dist/plugin-sdk/gateway/chat-sanitize.d.ts +3 -0
- package/dist/plugin-sdk/gateway/client.d.ts +61 -0
- package/dist/plugin-sdk/gateway/control-ui-shared.d.ts +9 -0
- package/dist/plugin-sdk/gateway/device-auth.d.ts +12 -0
- package/dist/plugin-sdk/gateway/net.d.ts +40 -0
- package/dist/plugin-sdk/gateway/node-registry.d.ts +60 -0
- package/dist/plugin-sdk/gateway/protocol/client-info.d.ts +58 -0
- package/dist/plugin-sdk/gateway/protocol/index.d.ts +654 -0
- package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +72 -0
- package/dist/plugin-sdk/gateway/protocol/schema/agents-models-skills.d.ts +152 -0
- package/dist/plugin-sdk/gateway/protocol/schema/channels.d.ts +105 -0
- package/dist/plugin-sdk/gateway/protocol/schema/config.d.ts +51 -0
- package/dist/plugin-sdk/gateway/protocol/schema/cron.d.ts +353 -0
- package/dist/plugin-sdk/gateway/protocol/schema/devices.d.ts +38 -0
- package/dist/plugin-sdk/gateway/protocol/schema/error-codes.d.ts +14 -0
- package/dist/plugin-sdk/gateway/protocol/schema/exec-approvals.d.ts +162 -0
- package/dist/plugin-sdk/gateway/protocol/schema/frames.d.ts +163 -0
- package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +45 -0
- package/dist/plugin-sdk/gateway/protocol/schema/nodes.d.ts +64 -0
- package/dist/plugin-sdk/gateway/protocol/schema/primitives.d.ts +4 -0
- package/dist/plugin-sdk/gateway/protocol/schema/protocol-schemas.d.ts +3 -0
- package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +74 -0
- package/dist/plugin-sdk/gateway/protocol/schema/snapshot.d.ts +63 -0
- package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +122 -0
- package/dist/plugin-sdk/gateway/protocol/schema/wizard.d.ts +86 -0
- package/dist/plugin-sdk/gateway/protocol/schema.d.ts +16 -0
- package/dist/plugin-sdk/gateway/server/ws-types.d.ts +9 -0
- package/dist/plugin-sdk/gateway/server-channels.d.ts +24 -0
- package/dist/plugin-sdk/gateway/server-methods/types.d.ts +96 -0
- package/dist/plugin-sdk/gateway/server-shared.d.ts +7 -0
- package/dist/plugin-sdk/gateway/session-utils.d.ts +53 -0
- package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +11 -0
- package/dist/plugin-sdk/gateway/session-utils.types.d.ts +83 -0
- package/dist/plugin-sdk/globals.d.ts +11 -0
- package/dist/plugin-sdk/hooks/internal-hooks.d.ts +95 -0
- package/dist/plugin-sdk/hooks/types.d.ts +62 -0
- package/dist/plugin-sdk/imessage/accounts.d.ts +16 -0
- package/dist/plugin-sdk/imessage/client.d.ts +46 -0
- package/dist/plugin-sdk/imessage/constants.d.ts +2 -0
- package/dist/plugin-sdk/imessage/monitor/deliver.d.ts +17 -0
- package/dist/plugin-sdk/imessage/monitor/monitor-provider.d.ts +2 -0
- package/dist/plugin-sdk/imessage/monitor/runtime.d.ts +4 -0
- package/dist/plugin-sdk/imessage/monitor/types.d.ts +37 -0
- package/dist/plugin-sdk/imessage/monitor.d.ts +2 -0
- package/dist/plugin-sdk/imessage/probe.d.ts +18 -0
- package/dist/plugin-sdk/imessage/send.d.ts +18 -0
- package/dist/plugin-sdk/imessage/targets.d.ts +39 -0
- package/dist/plugin-sdk/index.d.ts +1 -0
- package/dist/plugin-sdk/index.js +24446 -0
- package/dist/plugin-sdk/infra/agent-events.d.ts +21 -0
- package/dist/plugin-sdk/infra/backoff.d.ts +8 -0
- package/dist/plugin-sdk/infra/channel-activity.d.ts +18 -0
- package/dist/plugin-sdk/infra/channel-summary.d.ts +7 -0
- package/dist/plugin-sdk/infra/dedupe.d.ts +11 -0
- package/dist/plugin-sdk/infra/device-auth-store.d.ts +23 -0
- package/dist/plugin-sdk/infra/device-identity.d.ts +11 -0
- package/dist/plugin-sdk/infra/diagnostic-events.d.ts +121 -0
- package/dist/plugin-sdk/infra/diagnostic-flags.d.ts +4 -0
- package/dist/plugin-sdk/infra/env.d.ts +11 -0
- package/dist/plugin-sdk/infra/errors.d.ts +3 -0
- package/dist/plugin-sdk/infra/exec-approvals.d.ts +155 -0
- package/dist/plugin-sdk/infra/exec-safety.d.ts +1 -0
- package/dist/plugin-sdk/infra/fetch.d.ts +2 -0
- package/dist/plugin-sdk/infra/format-duration.d.ts +10 -0
- package/dist/plugin-sdk/infra/git-commit.d.ts +4 -0
- package/dist/plugin-sdk/infra/heartbeat-events.d.ts +21 -0
- package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +44 -0
- package/dist/plugin-sdk/infra/heartbeat-visibility.d.ts +17 -0
- package/dist/plugin-sdk/infra/heartbeat-wake.d.ts +20 -0
- package/dist/plugin-sdk/infra/json-file.d.ts +2 -0
- package/dist/plugin-sdk/infra/machine-name.d.ts +1 -0
- package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +20 -0
- package/dist/plugin-sdk/infra/net/ssrf.d.ts +31 -0
- package/dist/plugin-sdk/infra/node-pairing.d.ts +62 -0
- package/dist/plugin-sdk/infra/node-shell.d.ts +1 -0
- package/dist/plugin-sdk/infra/openclaw-root.d.ts +10 -0
- package/dist/plugin-sdk/infra/outbound/channel-adapters.d.ts +6 -0
- package/dist/plugin-sdk/infra/outbound/channel-selection.d.ts +11 -0
- package/dist/plugin-sdk/infra/outbound/channel-target.d.ts +6 -0
- package/dist/plugin-sdk/infra/outbound/deliver.d.ts +69 -0
- package/dist/plugin-sdk/infra/outbound/directory-cache.d.ts +21 -0
- package/dist/plugin-sdk/infra/outbound/message-action-runner.d.ts +74 -0
- package/dist/plugin-sdk/infra/outbound/message-action-spec.d.ts +5 -0
- package/dist/plugin-sdk/infra/outbound/message.d.ts +76 -0
- package/dist/plugin-sdk/infra/outbound/outbound-policy.d.ts +31 -0
- package/dist/plugin-sdk/infra/outbound/outbound-send-service.d.ts +58 -0
- package/dist/plugin-sdk/infra/outbound/outbound-session.d.ts +31 -0
- package/dist/plugin-sdk/infra/outbound/payloads.d.ts +16 -0
- package/dist/plugin-sdk/infra/outbound/target-errors.d.ts +6 -0
- package/dist/plugin-sdk/infra/outbound/target-normalization.d.ts +4 -0
- package/dist/plugin-sdk/infra/outbound/target-resolver.d.ts +53 -0
- package/dist/plugin-sdk/infra/outbound/targets.d.ts +65 -0
- package/dist/plugin-sdk/infra/ports-format.d.ts +5 -0
- package/dist/plugin-sdk/infra/ports-inspect.d.ts +2 -0
- package/dist/plugin-sdk/infra/ports-lsof.d.ts +2 -0
- package/dist/plugin-sdk/infra/ports-types.d.ts +17 -0
- package/dist/plugin-sdk/infra/ports.d.ts +14 -0
- package/dist/plugin-sdk/infra/provider-usage.auth.d.ts +11 -0
- package/dist/plugin-sdk/infra/provider-usage.d.ts +4 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.antigravity.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.claude.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.codex.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.copilot.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.d.ts +7 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.gemini.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.minimax.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.shared.d.ts +1 -0
- package/dist/plugin-sdk/infra/provider-usage.fetch.zai.d.ts +2 -0
- package/dist/plugin-sdk/infra/provider-usage.format.d.ts +13 -0
- package/dist/plugin-sdk/infra/provider-usage.load.d.ts +12 -0
- package/dist/plugin-sdk/infra/provider-usage.shared.d.ts +8 -0
- package/dist/plugin-sdk/infra/provider-usage.types.d.ts +17 -0
- package/dist/plugin-sdk/infra/restart-sentinel.d.ts +50 -0
- package/dist/plugin-sdk/infra/restart.d.ts +28 -0
- package/dist/plugin-sdk/infra/retry-policy.d.ts +25 -0
- package/dist/plugin-sdk/infra/retry.d.ts +21 -0
- package/dist/plugin-sdk/infra/session-cost-usage.d.ts +160 -0
- package/dist/plugin-sdk/infra/shell-env.d.ts +33 -0
- package/dist/plugin-sdk/infra/skills-remote.d.ts +24 -0
- package/dist/plugin-sdk/infra/system-events.d.ts +16 -0
- package/dist/plugin-sdk/infra/tailnet.d.ts +7 -0
- package/dist/plugin-sdk/infra/tls/fingerprint.d.ts +1 -0
- package/dist/plugin-sdk/infra/tls/gateway.d.ts +16 -0
- package/dist/plugin-sdk/infra/transport-ready.d.ts +16 -0
- package/dist/plugin-sdk/infra/unhandled-rejections.d.ts +15 -0
- package/dist/plugin-sdk/infra/warnings.d.ts +1 -0
- package/dist/plugin-sdk/infra/ws.d.ts +2 -0
- package/dist/plugin-sdk/infra/wsl.d.ts +2 -0
- package/dist/plugin-sdk/line/accounts.d.ts +10 -0
- package/dist/plugin-sdk/line/auto-reply-delivery.d.ts +49 -0
- package/dist/plugin-sdk/line/bot-access.d.ts +15 -0
- package/dist/plugin-sdk/line/bot-handlers.d.ts +13 -0
- package/dist/plugin-sdk/line/bot-message-context.d.ts +102 -0
- package/dist/plugin-sdk/line/bot.d.ts +24 -0
- package/dist/plugin-sdk/line/config-schema.d.ts +64 -0
- package/dist/plugin-sdk/line/download.d.ts +7 -0
- package/dist/plugin-sdk/line/flex-templates.d.ts +195 -0
- package/dist/plugin-sdk/line/markdown-to-line.d.ts +72 -0
- package/dist/plugin-sdk/line/monitor.d.ts +28 -0
- package/dist/plugin-sdk/line/probe.d.ts +2 -0
- package/dist/plugin-sdk/line/reply-chunks.d.ts +24 -0
- package/dist/plugin-sdk/line/send.d.ts +118 -0
- package/dist/plugin-sdk/line/signature.d.ts +1 -0
- package/dist/plugin-sdk/line/template-messages.d.ts +119 -0
- package/dist/plugin-sdk/line/types.d.ts +125 -0
- package/dist/plugin-sdk/line/webhook.d.ts +19 -0
- package/dist/plugin-sdk/link-understanding/apply.d.ts +10 -0
- package/dist/plugin-sdk/link-understanding/defaults.d.ts +2 -0
- package/dist/plugin-sdk/link-understanding/detect.d.ts +3 -0
- package/dist/plugin-sdk/link-understanding/format.d.ts +4 -0
- package/dist/plugin-sdk/link-understanding/runner.d.ts +11 -0
- package/dist/plugin-sdk/logger.d.ts +6 -0
- package/dist/plugin-sdk/logging/config.d.ts +4 -0
- package/dist/plugin-sdk/logging/console.d.ts +19 -0
- package/dist/plugin-sdk/logging/diagnostic.d.ts +58 -0
- package/dist/plugin-sdk/logging/levels.d.ts +4 -0
- package/dist/plugin-sdk/logging/logger.d.ts +42 -0
- package/dist/plugin-sdk/logging/redact-identifier.d.ts +4 -0
- package/dist/plugin-sdk/logging/redact.d.ts +9 -0
- package/dist/plugin-sdk/logging/state.d.ts +17 -0
- package/dist/plugin-sdk/logging/subsystem.d.ts +16 -0
- package/dist/plugin-sdk/logging.d.ts +10 -0
- package/dist/plugin-sdk/markdown/code-spans.d.ts +10 -0
- package/dist/plugin-sdk/markdown/fences.d.ts +10 -0
- package/dist/plugin-sdk/markdown/frontmatter.d.ts +2 -0
- package/dist/plugin-sdk/markdown/ir.d.ts +32 -0
- package/dist/plugin-sdk/markdown/render.d.ts +18 -0
- package/dist/plugin-sdk/markdown/tables.d.ts +2 -0
- package/dist/plugin-sdk/media/audio-tags.d.ts +10 -0
- package/dist/plugin-sdk/media/audio.d.ts +4 -0
- package/dist/plugin-sdk/media/constants.d.ts +7 -0
- package/dist/plugin-sdk/media/fetch.d.ts +23 -0
- package/dist/plugin-sdk/media/image-ops.d.ts +39 -0
- package/dist/plugin-sdk/media/input-files.d.ts +76 -0
- package/dist/plugin-sdk/media/mime.d.ts +15 -0
- package/dist/plugin-sdk/media/parse.d.ts +8 -0
- package/dist/plugin-sdk/media/store.d.ts +18 -0
- package/dist/plugin-sdk/media-understanding/apply.d.ts +19 -0
- package/dist/plugin-sdk/media-understanding/attachments.d.ts +43 -0
- package/dist/plugin-sdk/media-understanding/concurrency.d.ts +1 -0
- package/dist/plugin-sdk/media-understanding/defaults.d.ts +10 -0
- package/dist/plugin-sdk/media-understanding/errors.d.ts +6 -0
- package/dist/plugin-sdk/media-understanding/format.d.ts +7 -0
- package/dist/plugin-sdk/media-understanding/providers/anthropic/index.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/deepgram/audio.d.ts +4 -0
- package/dist/plugin-sdk/media-understanding/providers/deepgram/index.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/google/audio.d.ts +3 -0
- package/dist/plugin-sdk/media-understanding/providers/google/index.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/google/video.d.ts +3 -0
- package/dist/plugin-sdk/media-understanding/providers/groq/index.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/image.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/index.d.ts +4 -0
- package/dist/plugin-sdk/media-understanding/providers/minimax/index.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/openai/audio.d.ts +3 -0
- package/dist/plugin-sdk/media-understanding/providers/openai/index.d.ts +2 -0
- package/dist/plugin-sdk/media-understanding/providers/shared.d.ts +10 -0
- package/dist/plugin-sdk/media-understanding/resolve.d.ts +44 -0
- package/dist/plugin-sdk/media-understanding/runner.d.ts +34 -0
- package/dist/plugin-sdk/media-understanding/scope.d.ts +9 -0
- package/dist/plugin-sdk/media-understanding/types.d.ts +92 -0
- package/dist/plugin-sdk/media-understanding/video.d.ts +2 -0
- package/dist/plugin-sdk/memory/backend-config.d.ts +48 -0
- package/dist/plugin-sdk/memory/batch-gemini.d.ts +55 -0
- package/dist/plugin-sdk/memory/batch-openai.d.ts +45 -0
- package/dist/plugin-sdk/memory/batch-voyage.d.ts +46 -0
- package/dist/plugin-sdk/memory/embeddings-gemini.d.ts +13 -0
- package/dist/plugin-sdk/memory/embeddings-openai.d.ts +13 -0
- package/dist/plugin-sdk/memory/embeddings-voyage.d.ts +13 -0
- package/dist/plugin-sdk/memory/embeddings.d.ts +39 -0
- package/dist/plugin-sdk/memory/hybrid.d.ts +34 -0
- package/dist/plugin-sdk/memory/index.d.ts +3 -0
- package/dist/plugin-sdk/memory/internal.d.ts +27 -0
- package/dist/plugin-sdk/memory/manager-search.d.ts +60 -0
- package/dist/plugin-sdk/memory/manager.d.ts +136 -0
- package/dist/plugin-sdk/memory/memory-schema.d.ts +10 -0
- package/dist/plugin-sdk/memory/node-llama.d.ts +8 -0
- package/dist/plugin-sdk/memory/qmd-manager.d.ts +85 -0
- package/dist/plugin-sdk/memory/search-manager.d.ts +10 -0
- package/dist/plugin-sdk/memory/session-files.d.ts +12 -0
- package/dist/plugin-sdk/memory/sqlite-vec.d.ts +9 -0
- package/dist/plugin-sdk/memory/sqlite.d.ts +1 -0
- package/dist/plugin-sdk/memory/types.d.ts +94 -0
- package/dist/plugin-sdk/pairing/pairing-labels.d.ts +2 -0
- package/dist/plugin-sdk/pairing/pairing-messages.d.ts +6 -0
- package/dist/plugin-sdk/pairing/pairing-store.d.ts +46 -0
- package/dist/plugin-sdk/pi-model-discovery-Dw3A6oXH.js +37 -0
- package/dist/plugin-sdk/plugin-sdk/index.d.ts +100 -0
- package/dist/plugin-sdk/plugins/bundled-dir.d.ts +1 -0
- package/dist/plugin-sdk/plugins/commands.d.ts +78 -0
- package/dist/plugin-sdk/plugins/config-schema.d.ts +2 -0
- package/dist/plugin-sdk/plugins/config-state.d.ts +33 -0
- package/dist/plugin-sdk/plugins/discovery.d.ts +22 -0
- package/dist/plugin-sdk/plugins/hook-runner-global.d.ts +31 -0
- package/dist/plugin-sdk/plugins/hooks.d.ts +41 -0
- package/dist/plugin-sdk/plugins/http-path.d.ts +1 -0
- package/dist/plugin-sdk/plugins/http-registry.d.ts +13 -0
- package/dist/plugin-sdk/plugins/loader.d.ts +14 -0
- package/dist/plugin-sdk/plugins/manifest-registry.d.ts +33 -0
- package/dist/plugin-sdk/plugins/manifest.d.ts +64 -0
- package/dist/plugin-sdk/plugins/registry.d.ts +130 -0
- package/dist/plugin-sdk/plugins/runtime/index.d.ts +3 -0
- package/dist/plugin-sdk/plugins/runtime/native-deps.d.ts +8 -0
- package/dist/plugin-sdk/plugins/runtime/types.d.ts +314 -0
- package/dist/plugin-sdk/plugins/runtime.d.ts +5 -0
- package/dist/plugin-sdk/plugins/schema-validator.d.ts +10 -0
- package/dist/plugin-sdk/plugins/slots.d.ts +24 -0
- package/dist/plugin-sdk/plugins/tools.d.ts +13 -0
- package/dist/plugin-sdk/plugins/types.d.ts +381 -0
- package/dist/plugin-sdk/polls.d.ts +21 -0
- package/dist/plugin-sdk/process/command-queue.d.ts +12 -0
- package/dist/plugin-sdk/process/exec.d.ts +22 -0
- package/dist/plugin-sdk/process/lanes.d.ts +6 -0
- package/dist/plugin-sdk/process/spawn-utils.d.ts +26 -0
- package/dist/plugin-sdk/providers/github-copilot-token.d.ts +19 -0
- package/dist/plugin-sdk/providers/qwen-portal-oauth.d.ts +2 -0
- package/dist/plugin-sdk/routing/bindings.d.ts +11 -0
- package/dist/plugin-sdk/routing/resolve-route.d.ts +38 -0
- package/dist/plugin-sdk/routing/session-key.d.ts +47 -0
- package/dist/plugin-sdk/runtime.d.ts +6 -0
- package/dist/plugin-sdk/security/channel-metadata.d.ts +6 -0
- package/dist/plugin-sdk/security/external-content.d.ts +67 -0
- package/dist/plugin-sdk/sessions/level-overrides.d.ts +10 -0
- package/dist/plugin-sdk/sessions/model-overrides.d.ts +14 -0
- package/dist/plugin-sdk/sessions/send-policy.d.ts +11 -0
- package/dist/plugin-sdk/sessions/session-key-utils.d.ts +8 -0
- package/dist/plugin-sdk/sessions/session-label.d.ts +9 -0
- package/dist/plugin-sdk/sessions/transcript-events.d.ts +7 -0
- package/dist/plugin-sdk/shared/text/reasoning-tags.d.ts +6 -0
- package/dist/plugin-sdk/signal/accounts.d.ts +17 -0
- package/dist/plugin-sdk/signal/client.d.ts +32 -0
- package/dist/plugin-sdk/signal/daemon.d.ts +18 -0
- package/dist/plugin-sdk/signal/format.d.ts +17 -0
- package/dist/plugin-sdk/signal/identity.d.ts +23 -0
- package/dist/plugin-sdk/signal/index.d.ts +5 -0
- package/dist/plugin-sdk/signal/monitor/event-handler.d.ts +5 -0
- package/dist/plugin-sdk/signal/monitor/event-handler.types.d.ts +117 -0
- package/dist/plugin-sdk/signal/monitor.d.ts +23 -0
- package/dist/plugin-sdk/signal/probe.d.ts +8 -0
- package/dist/plugin-sdk/signal/reaction-level.d.ts +24 -0
- package/dist/plugin-sdk/signal/send-reactions.d.ts +32 -0
- package/dist/plugin-sdk/signal/send.d.ts +24 -0
- package/dist/plugin-sdk/signal/sse-reconnect.d.ts +13 -0
- package/dist/plugin-sdk/slack/accounts.d.ts +32 -0
- package/dist/plugin-sdk/slack/actions.d.ts +53 -0
- package/dist/plugin-sdk/slack/channel-migration.d.ts +20 -0
- package/dist/plugin-sdk/slack/client.d.ts +4 -0
- package/dist/plugin-sdk/slack/directory-live.d.ts +4 -0
- package/dist/plugin-sdk/slack/format.d.ts +7 -0
- package/dist/plugin-sdk/slack/http/index.d.ts +1 -0
- package/dist/plugin-sdk/slack/http/registry.d.ts +12 -0
- package/dist/plugin-sdk/slack/index.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/allow-list.d.ts +20 -0
- package/dist/plugin-sdk/slack/monitor/auth.d.ts +10 -0
- package/dist/plugin-sdk/slack/monitor/channel-config.d.ts +40 -0
- package/dist/plugin-sdk/slack/monitor/commands.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/context.d.ts +109 -0
- package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/members.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/messages.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +4 -0
- package/dist/plugin-sdk/slack/monitor/events.d.ts +8 -0
- package/dist/plugin-sdk/slack/monitor/media.d.ts +29 -0
- package/dist/plugin-sdk/slack/monitor/message-handler/dispatch.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/message-handler/prepare.d.ts +13 -0
- package/dist/plugin-sdk/slack/monitor/message-handler/types.d.ts +22 -0
- package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +11 -0
- package/dist/plugin-sdk/slack/monitor/policy.d.ts +5 -0
- package/dist/plugin-sdk/slack/monitor/provider.d.ts +2 -0
- package/dist/plugin-sdk/slack/monitor/replies.d.ts +50 -0
- package/dist/plugin-sdk/slack/monitor/slash.d.ts +6 -0
- package/dist/plugin-sdk/slack/monitor/thread-resolution.d.ts +12 -0
- package/dist/plugin-sdk/slack/monitor/types.d.ts +97 -0
- package/dist/plugin-sdk/slack/monitor.d.ts +5 -0
- package/dist/plugin-sdk/slack/probe.d.ts +15 -0
- package/dist/plugin-sdk/slack/resolve-channels.d.ts +19 -0
- package/dist/plugin-sdk/slack/resolve-users.d.ts +26 -0
- package/dist/plugin-sdk/slack/send.d.ts +14 -0
- package/dist/plugin-sdk/slack/targets.d.ts +7 -0
- package/dist/plugin-sdk/slack/threading-tool-context.d.ts +10 -0
- package/dist/plugin-sdk/slack/threading.d.ts +20 -0
- package/dist/plugin-sdk/slack/token.d.ts +3 -0
- package/dist/plugin-sdk/slack/types.d.ts +36 -0
- package/dist/plugin-sdk/telegram/accounts.d.ts +17 -0
- package/dist/plugin-sdk/telegram/allowed-updates.d.ts +4 -0
- package/dist/plugin-sdk/telegram/api-logging.d.ts +11 -0
- package/dist/plugin-sdk/telegram/audit.d.ts +29 -0
- package/dist/plugin-sdk/telegram/bot/delivery.d.ts +34 -0
- package/dist/plugin-sdk/telegram/bot/helpers.d.ts +93 -0
- package/dist/plugin-sdk/telegram/bot/types.d.ts +28 -0
- package/dist/plugin-sdk/telegram/bot-access.d.ts +24 -0
- package/dist/plugin-sdk/telegram/bot-handlers.d.ts +2 -0
- package/dist/plugin-sdk/telegram/bot-message-context.d.ts +130 -0
- package/dist/plugin-sdk/telegram/bot-message-dispatch.d.ts +21 -0
- package/dist/plugin-sdk/telegram/bot-message.d.ts +21 -0
- package/dist/plugin-sdk/telegram/bot-native-commands.d.ts +59 -0
- package/dist/plugin-sdk/telegram/bot-updates.d.ts +27 -0
- package/dist/plugin-sdk/telegram/bot.d.ts +54 -0
- package/dist/plugin-sdk/telegram/caption.d.ts +5 -0
- package/dist/plugin-sdk/telegram/draft-chunking.d.ts +6 -0
- package/dist/plugin-sdk/telegram/draft-stream.d.ts +17 -0
- package/dist/plugin-sdk/telegram/fetch.d.ts +4 -0
- package/dist/plugin-sdk/telegram/format.d.ts +16 -0
- package/dist/plugin-sdk/telegram/group-migration.d.ts +20 -0
- package/dist/plugin-sdk/telegram/inline-buttons.d.ts +11 -0
- package/dist/plugin-sdk/telegram/model-buttons.d.ts +63 -0
- package/dist/plugin-sdk/telegram/monitor.d.ts +18 -0
- package/dist/plugin-sdk/telegram/network-config.d.ts +12 -0
- package/dist/plugin-sdk/telegram/network-errors.d.ts +5 -0
- package/dist/plugin-sdk/telegram/probe.d.ts +18 -0
- package/dist/plugin-sdk/telegram/proxy.d.ts +1 -0
- package/dist/plugin-sdk/telegram/reaction-level.d.ts +18 -0
- package/dist/plugin-sdk/telegram/send.d.ts +96 -0
- package/dist/plugin-sdk/telegram/sent-message-cache.d.ts +16 -0
- package/dist/plugin-sdk/telegram/sticker-cache.d.ts +46 -0
- package/dist/plugin-sdk/telegram/targets.d.ts +14 -0
- package/dist/plugin-sdk/telegram/token.d.ts +13 -0
- package/dist/plugin-sdk/telegram/update-offset-store.d.ts +9 -0
- package/dist/plugin-sdk/telegram/voice.d.ts +20 -0
- package/dist/plugin-sdk/telegram/webhook.d.ts +20 -0
- package/dist/plugin-sdk/terminal/ansi.d.ts +2 -0
- package/dist/plugin-sdk/terminal/links.d.ts +6 -0
- package/dist/plugin-sdk/terminal/palette.d.ts +10 -0
- package/dist/plugin-sdk/terminal/progress-line.d.ts +3 -0
- package/dist/plugin-sdk/terminal/prompt-style.d.ts +3 -0
- package/dist/plugin-sdk/terminal/restore.d.ts +1 -0
- package/dist/plugin-sdk/terminal/theme.d.ts +15 -0
- package/dist/plugin-sdk/tts/tts.d.ts +198 -0
- package/dist/plugin-sdk/tui/tui-formatters.d.ts +31 -0
- package/dist/plugin-sdk/utils/account-id.d.ts +1 -0
- package/dist/plugin-sdk/utils/boolean.d.ts +5 -0
- package/dist/plugin-sdk/utils/delivery-context.d.ts +29 -0
- package/dist/plugin-sdk/utils/directive-tags.d.ts +16 -0
- package/dist/plugin-sdk/utils/message-channel.d.ts +27 -0
- package/dist/plugin-sdk/utils/provider-utils.d.ts +9 -0
- package/dist/plugin-sdk/utils/queue-helpers.d.ts +41 -0
- package/dist/plugin-sdk/utils/shell-argv.d.ts +1 -0
- package/dist/plugin-sdk/utils/transcript-tools.d.ts +8 -0
- package/dist/plugin-sdk/utils/usage-format.d.ts +26 -0
- package/dist/plugin-sdk/utils.d.ts +43 -0
- package/dist/plugin-sdk/version.d.ts +4 -0
- package/dist/plugin-sdk/web/accounts.d.ts +39 -0
- package/dist/plugin-sdk/web/active-listener.d.ts +24 -0
- package/dist/plugin-sdk/web/auth-store.d.ts +25 -0
- package/dist/plugin-sdk/web/auto-reply/constants.d.ts +1 -0
- package/dist/plugin-sdk/web/auto-reply/deliver-reply.d.ts +18 -0
- package/dist/plugin-sdk/web/auto-reply/heartbeat-runner.d.ts +20 -0
- package/dist/plugin-sdk/web/auto-reply/loggers.d.ts +4 -0
- package/dist/plugin-sdk/web/auto-reply/mentions.d.ts +19 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/ack-reaction.d.ts +13 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/broadcast.d.ts +16 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/commands.d.ts +2 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/echo.d.ts +17 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/group-activation.d.ts +9 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/group-gating.d.ts +29 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/group-members.d.ts +6 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/last-route.d.ts +15 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/message-line.d.ts +11 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/on-message.d.ts +24 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/peer.d.ts +2 -0
- package/dist/plugin-sdk/web/auto-reply/monitor/process-message.d.ts +40 -0
- package/dist/plugin-sdk/web/auto-reply/monitor.d.ts +5 -0
- package/dist/plugin-sdk/web/auto-reply/session-snapshot.d.ts +17 -0
- package/dist/plugin-sdk/web/auto-reply/types.d.ts +28 -0
- package/dist/plugin-sdk/web/auto-reply/util.d.ts +2 -0
- package/dist/plugin-sdk/web/auto-reply.d.ts +1 -0
- package/dist/plugin-sdk/web/auto-reply.impl.d.ts +6 -0
- package/dist/plugin-sdk/web/inbound/access-control.d.ts +24 -0
- package/dist/plugin-sdk/web/inbound/dedupe.d.ts +2 -0
- package/dist/plugin-sdk/web/inbound/extract.d.ts +13 -0
- package/dist/plugin-sdk/web/inbound/media.d.ts +6 -0
- package/dist/plugin-sdk/web/inbound/monitor.d.ts +30 -0
- package/dist/plugin-sdk/web/inbound/send-api.d.ts +22 -0
- package/dist/plugin-sdk/web/inbound/types.d.ts +40 -0
- package/dist/plugin-sdk/web/inbound.d.ts +4 -0
- package/dist/plugin-sdk/web/login-qr.d.ts +19 -0
- package/dist/plugin-sdk/web/login.d.ts +3 -0
- package/dist/plugin-sdk/web/media.d.ts +25 -0
- package/dist/plugin-sdk/web/outbound.d.ts +23 -0
- package/dist/plugin-sdk/web/qr-image.d.ts +4 -0
- package/dist/plugin-sdk/web/reconnect.d.ts +12 -0
- package/dist/plugin-sdk/web/session.d.ts +14 -0
- package/dist/plugin-sdk/web/vcard.d.ts +6 -0
- package/dist/plugin-sdk/whatsapp/normalize.d.ts +6 -0
- package/dist/plugin-sdk/wizard/prompts.d.ts +42 -0
- package/dist/plugin-sdk/wizard/session.d.ts +42 -0
- package/dist/plugins-DWuabtET.js +495 -0
- package/dist/plugins-DrjfSaQw.js +496 -0
- package/dist/plugins-cli-BEi_3gUD.js +444 -0
- package/dist/plugins-cli-DOE3sFNh.js +441 -0
- package/dist/ports-LFe1-ds4.js +96 -0
- package/dist/program-Mm9gwxgw.js +191 -0
- package/dist/progress-Bcjniu7m.js +133 -0
- package/dist/progress-xpLtQsNY.js +133 -0
- package/dist/prompt-style-CFsleyxV.js +9 -0
- package/dist/prompt-style-vzh0MGHs.js +9 -0
- package/dist/prompts-CudpZgTI.js +10 -0
- package/dist/prompts-FbZThK8w.js +10 -0
- package/dist/pw-ai-B7Fvw8DW.js +1649 -0
- package/dist/pw-ai-BpFK57Lc.js +1651 -0
- package/dist/pw-ai-tNPuRNn3.js +1649 -0
- package/dist/qmd-manager-CazydCuO.js +676 -0
- package/dist/qmd-manager-D13fgvkg.js +677 -0
- package/dist/qmd-manager-QixCK9Sh.js +674 -0
- package/dist/redact-BIMJ3ntQ.js +94 -0
- package/dist/redact-Bt-krp_b.js +97 -0
- package/dist/redact-DJCFY628.js +97 -0
- package/dist/register.subclis-DpdKOrqR.js +348 -0
- package/dist/reply-Nagr9G73.js +64757 -0
- package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
- package/dist/routes-B5LAoQFO.js +2411 -0
- package/dist/routes-B9mYGJET.js +2411 -0
- package/dist/rpc-70nwvcmj.js +95 -0
- package/dist/rpc-zvkrerfj.js +95 -0
- package/dist/run-main-Y7DVYcUu.js +194 -0
- package/dist/sandbox-BwaFbMul.js +2943 -0
- package/dist/sandbox-CFJ-0soL.js +2942 -0
- package/dist/sandbox-cli-35JWqRj-.js +460 -0
- package/dist/sandbox-cli-DcGwU3Oa.js +463 -0
- package/dist/security-cli-D-EgVOaA.js +505 -0
- package/dist/security-cli-VON7qTOf.js +508 -0
- package/dist/server-context-C8xKLc0L.js +740 -0
- package/dist/server-context-yKyxyxOJ.js +740 -0
- package/dist/server-node-events-CK-3iTzR.js +219 -0
- package/dist/server-node-events-D0VSL_HV.js +216 -0
- package/dist/service-DMUKaGTV.js +680 -0
- package/dist/service-W6pWyB7g.js +680 -0
- package/dist/service-audit-BTHjbAs2.js +542 -0
- package/dist/service-audit-GvE18NCt.js +542 -0
- package/dist/session-cost-usage-C5MMXOZi.js +692 -0
- package/dist/session-cost-usage-CTuGqn7n.js +692 -0
- package/dist/session-key-Dk6vSAOv.js +183 -0
- package/dist/session-key-ezJ78bLC.js +183 -0
- package/dist/shared-BG2E-mTe.js +74 -0
- package/dist/shared-Boip_I0l.js +152 -0
- package/dist/shared-C-yRLI1r.js +74 -0
- package/dist/shared-CF5YSjfr.js +152 -0
- package/dist/skill-scanner-BoGjHXUZ.js +255 -0
- package/dist/skill-scanner-COatt01v.js +255 -0
- package/dist/skills-B7bCWSck.js +693 -0
- package/dist/skills-D5JDj3TR.js +694 -0
- package/dist/skills-cli-D8i8lW-Y.js +290 -0
- package/dist/skills-cli-OwKnGglX.js +287 -0
- package/dist/skills-status-D83jBWaq.js +187 -0
- package/dist/skills-status-DPwsDMVS.js +187 -0
- package/dist/sqlite-BW8p11HW.js +239 -0
- package/dist/sqlite-BjhYBODp.js +221 -0
- package/dist/sqlite-D1XZ7Oej.js +239 -0
- package/dist/status-BF8IVV7c.js +21 -0
- package/dist/status-CWDof7Cn.js +21 -0
- package/dist/status-CgdwqWHT.js +3177 -0
- package/dist/status-DqF0Asv5.js +27 -0
- package/dist/status-Dqs6r0p6.js +27 -0
- package/dist/subsystem-CAq3uyo7.js +834 -0
- package/dist/system-cli-Bv347a4x.js +83 -0
- package/dist/system-cli-CV1yMDPJ.js +80 -0
- package/dist/systemd-D5s01yMo.js +438 -0
- package/dist/systemd-LmtH96vm.js +438 -0
- package/dist/systemd-hints-3-E4ndGf.js +19 -0
- package/dist/systemd-hints-D3nZ6-tA.js +19 -0
- package/dist/systemd-linger-D4Z0ePWs.js +75 -0
- package/dist/systemd-linger-DFHJcGck.js +75 -0
- package/dist/table-BGYjbJbA.js +279 -0
- package/dist/table-CM9lV0GA.js +279 -0
- package/dist/tailnet-Byp3obcc.js +42 -0
- package/dist/tailnet-DLDGNuH2.js +42 -0
- package/dist/tailscale-9MusRvOi.js +225 -0
- package/dist/tailscale-BVGD9gSD.js +252 -0
- package/dist/tool-display-BxZG0o1b.js +795 -0
- package/dist/tool-display-PgbqPY5M.js +795 -0
- package/dist/transcript-events-Bv_eRVym.js +17 -0
- package/dist/transcript-events-ChU6IQwp.js +17 -0
- package/dist/transcript-events-JLH5W4He.js +17 -0
- package/dist/tui-CSu3OIP_.js +2671 -0
- package/dist/tui-DhzN4YmH.js +2672 -0
- package/dist/tui-cli-Do9zFynn.js +55 -0
- package/dist/tui-cli-awwGCxKR.js +58 -0
- package/dist/update-DBMfgR7g.js +317 -0
- package/dist/update-Nc1UGXeU.js +317 -0
- package/dist/update-cli-DKJswr-w.js +1035 -0
- package/dist/update-cli-LmAKEOiJ.js +1033 -0
- package/dist/update-runner-DQwdSxkJ.js +1458 -0
- package/dist/update-runner-kfvB4_XO.js +1458 -0
- package/dist/usage-format-BcU1flOY.js +36 -0
- package/dist/usage-format-DvowRSs-.js +36 -0
- package/dist/utils-CKSrBNwq.js +192 -0
- package/dist/utils-DX85MiPR.js +188 -0
- package/dist/webhooks-cli--t1jf_uP.js +309 -0
- package/dist/webhooks-cli-DAMZGMPC.js +312 -0
- package/dist/widearea-dns-Bf5ongWC.js +127 -0
- package/dist/widearea-dns-DDNQMGyz.js +127 -0
- package/dist/ws-CEcdsnN9.js +13 -0
- package/dist/ws-D091yo4M.js +13 -0
- package/dist/ws-log-B0dVho23.js +267 -0
- package/dist/ws-log-CBrAJIdp.js +267 -0
- package/dist/wsl-D4fz-38s.js +160 -0
- package/docs/.i18n/README.md +31 -0
- package/docs/.i18n/glossary.zh-CN.json +210 -0
- package/docs/.i18n/zh-CN.tm.jsonl +1329 -0
- package/docs/CNAME +1 -0
- package/docs/assets/macos-onboarding/01-macos-warning.jpeg +0 -0
- package/docs/assets/macos-onboarding/02-local-networks.jpeg +0 -0
- package/docs/assets/macos-onboarding/03-security-notice.png +0 -0
- package/docs/assets/macos-onboarding/04-choose-gateway.png +0 -0
- package/docs/assets/macos-onboarding/05-permissions.png +0 -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/automation/auth-monitoring.md +44 -0
- package/docs/automation/cron-jobs.md +478 -0
- package/docs/automation/cron-vs-heartbeat.md +282 -0
- package/docs/automation/gmail-pubsub.md +256 -0
- package/docs/automation/hooks.md +916 -0
- package/docs/automation/poll.md +69 -0
- package/docs/automation/troubleshooting.md +122 -0
- package/docs/automation/webhook.md +163 -0
- package/docs/brave-search.md +41 -0
- package/docs/channels/bluebubbles.md +340 -0
- package/docs/channels/broadcast-groups.md +442 -0
- package/docs/channels/channel-routing.md +114 -0
- package/docs/channels/discord.md +476 -0
- package/docs/channels/feishu.md +579 -0
- package/docs/channels/googlechat.md +252 -0
- package/docs/channels/grammy.md +31 -0
- package/docs/channels/group-messages.md +84 -0
- package/docs/channels/groups.md +374 -0
- package/docs/channels/imessage.md +321 -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 +259 -0
- package/docs/channels/mattermost.md +138 -0
- package/docs/channels/msteams.md +769 -0
- package/docs/channels/nextcloud-talk.md +138 -0
- package/docs/channels/nostr.md +233 -0
- package/docs/channels/pairing.md +86 -0
- package/docs/channels/signal.md +228 -0
- package/docs/channels/slack.md +574 -0
- package/docs/channels/telegram.md +770 -0
- package/docs/channels/tlon.md +132 -0
- package/docs/channels/troubleshooting.md +116 -0
- package/docs/channels/twitch.md +379 -0
- package/docs/channels/whatsapp.md +406 -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 +44 -0
- package/docs/cli/dashboard.md +16 -0
- package/docs/cli/devices.md +70 -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 +202 -0
- package/docs/cli/health.md +21 -0
- package/docs/cli/hooks.md +304 -0
- package/docs/cli/index.md +1031 -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 +43 -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 +131 -0
- package/docs/concepts/compaction.md +61 -0
- package/docs/concepts/context.md +161 -0
- package/docs/concepts/features.md +53 -0
- package/docs/concepts/markdown-formatting.md +130 -0
- package/docs/concepts/memory.md +556 -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 +204 -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 +85 -0
- package/docs/diagnostics/flags.md +91 -0
- package/docs/docs.json +1802 -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 +170 -0
- package/docs/gateway/bridge-protocol.md +89 -0
- package/docs/gateway/cli-backends.md +225 -0
- package/docs/gateway/configuration-examples.md +606 -0
- package/docs/gateway/configuration.md +3416 -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 +364 -0
- package/docs/gateway/index.md +330 -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/network-model.md +17 -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 +129 -0
- package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +128 -0
- package/docs/gateway/sandboxing.md +193 -0
- package/docs/gateway/security/index.md +829 -0
- package/docs/gateway/tailscale.md +127 -0
- package/docs/gateway/tools-invoke-http-api.md +85 -0
- package/docs/gateway/troubleshooting.md +318 -0
- package/docs/help/debugging.md +162 -0
- package/docs/help/environment.md +81 -0
- package/docs/help/faq.md +2848 -0
- package/docs/help/index.md +21 -0
- package/docs/help/scripts.md +28 -0
- package/docs/help/submitting-a-pr.md +398 -0
- package/docs/help/submitting-an-issue.md +152 -0
- package/docs/help/testing.md +368 -0
- package/docs/help/troubleshooting.md +265 -0
- package/docs/hooks/soul-evil.md +69 -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 +192 -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/exe-dev.md +126 -0
- package/docs/install/fly.md +486 -0
- package/docs/install/gcp.md +504 -0
- package/docs/install/hetzner.md +330 -0
- package/docs/install/index.md +203 -0
- package/docs/install/installer.md +385 -0
- package/docs/install/macos-vm.md +281 -0
- package/docs/install/migrating.md +192 -0
- package/docs/install/nix.md +96 -0
- package/docs/install/node.md +138 -0
- package/docs/install/northflank.mdx +53 -0
- package/docs/install/railway.mdx +99 -0
- package/docs/install/render.mdx +159 -0
- package/docs/install/uninstall.md +128 -0
- package/docs/install/updating.md +231 -0
- package/docs/logging.md +350 -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 +342 -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/troubleshooting.md +112 -0
- package/docs/nodes/voicewake.md +65 -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 +151 -0
- package/docs/platforms/digitalocean.md +262 -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 +104 -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 +50 -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 +43 -0
- package/docs/platforms/mac/xpc.md +61 -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/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/bedrock.md +176 -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 +64 -0
- package/docs/providers/minimax.md +208 -0
- package/docs/providers/models.md +52 -0
- package/docs/providers/moonshot.md +142 -0
- package/docs/providers/ollama.md +277 -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/qianfan.md +38 -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/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 +123 -0
- package/docs/reference/RELEASING.md +120 -0
- package/docs/reference/api-usage-costs.md +138 -0
- package/docs/reference/credits.md +27 -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 +29 -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 +23 -0
- package/docs/reference/test.md +50 -0
- package/docs/reference/token-use.md +112 -0
- package/docs/reference/transcript-hygiene.md +129 -0
- package/docs/reference/wizard.md +269 -0
- package/docs/security/formal-verification.md +164 -0
- package/docs/start/bootstrapping.md +41 -0
- package/docs/start/docs-directory.md +64 -0
- package/docs/start/getting-started.md +120 -0
- package/docs/start/hubs.md +197 -0
- package/docs/start/lore.md +219 -0
- package/docs/start/onboarding.md +80 -0
- package/docs/start/openclaw.md +224 -0
- package/docs/start/quickstart.md +22 -0
- package/docs/start/setup.md +162 -0
- package/docs/start/showcase.md +416 -0
- package/docs/start/wizard-cli-automation.md +141 -0
- package/docs/start/wizard-cli-reference.md +247 -0
- package/docs/start/wizard.md +108 -0
- package/docs/style.css +3 -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 +67 -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 +512 -0
- package/docs/tools/llm-task.md +115 -0
- package/docs/tools/lobster.md +342 -0
- package/docs/tools/multi-agent-sandbox-tools.md +396 -0
- package/docs/tools/plugin.md +664 -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 +74 -0
- package/docs/tools/web.md +261 -0
- package/docs/tts.md +396 -0
- package/docs/vps.md +43 -0
- package/docs/web/control-ui.md +223 -0
- package/docs/web/dashboard.md +46 -0
- package/docs/web/index.md +116 -0
- package/docs/web/tui.md +162 -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/hooks.md +919 -0
- package/docs/zh-CN/automation/poll.md +76 -0
- package/docs/zh-CN/automation/troubleshooting.md +8 -0
- package/docs/zh-CN/automation/webhook.md +163 -0
- package/docs/zh-CN/brave-search.md +48 -0
- package/docs/zh-CN/channels/bluebubbles.md +271 -0
- package/docs/zh-CN/channels/broadcast-groups.md +449 -0
- package/docs/zh-CN/channels/channel-routing.md +117 -0
- package/docs/zh-CN/channels/discord.md +468 -0
- package/docs/zh-CN/channels/feishu.md +629 -0
- package/docs/zh-CN/channels/googlechat.md +257 -0
- package/docs/zh-CN/channels/grammy.md +38 -0
- package/docs/zh-CN/channels/group-messages.md +91 -0
- package/docs/zh-CN/channels/groups.md +379 -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/pairing.md +89 -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/compaction.md +67 -0
- package/docs/zh-CN/concepts/context.md +168 -0
- package/docs/zh-CN/concepts/features.md +59 -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/diagnostics/flags.md +98 -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/network-model.md +23 -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/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/debugging.md +160 -0
- package/docs/zh-CN/help/environment.md +88 -0
- package/docs/zh-CN/help/faq.md +2628 -0
- package/docs/zh-CN/help/index.md +28 -0
- package/docs/zh-CN/help/scripts.md +35 -0
- package/docs/zh-CN/help/submitting-a-pr.md +8 -0
- package/docs/zh-CN/help/submitting-an-issue.md +8 -0
- package/docs/zh-CN/help/testing.md +375 -0
- package/docs/zh-CN/help/troubleshooting.md +104 -0
- package/docs/zh-CN/hooks/soul-evil.md +72 -0
- package/docs/zh-CN/index.md +186 -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/exe-dev.md +127 -0
- package/docs/zh-CN/install/fly.md +490 -0
- package/docs/zh-CN/install/gcp.md +510 -0
- package/docs/zh-CN/install/hetzner.md +337 -0
- package/docs/zh-CN/install/index.md +193 -0
- package/docs/zh-CN/install/installer.md +128 -0
- package/docs/zh-CN/install/macos-vm.md +288 -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 +8 -0
- package/docs/zh-CN/install/northflank.mdx +60 -0
- package/docs/zh-CN/install/railway.mdx +106 -0
- package/docs/zh-CN/install/render.mdx +169 -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/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/troubleshooting.md +8 -0
- package/docs/zh-CN/nodes/voicewake.md +72 -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/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.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/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/bedrock.md +170 -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/qianfan.md +8 -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/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/credits.md +34 -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 +36 -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/token-use.md +119 -0
- package/docs/zh-CN/reference/transcript-hygiene.md +109 -0
- package/docs/zh-CN/reference/wizard.md +9 -0
- package/docs/zh-CN/security/formal-verification.md +171 -0
- package/docs/zh-CN/start/bootstrapping.md +9 -0
- package/docs/zh-CN/start/docs-directory.md +70 -0
- package/docs/zh-CN/start/getting-started.md +206 -0
- package/docs/zh-CN/start/hubs.md +200 -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/quickstart.md +88 -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/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/multi-agent-sandbox-tools.md +401 -0
- package/docs/zh-CN/tools/plugin.md +639 -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/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/tui.md +166 -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 +302 -0
- package/extensions/bluebubbles/src/channel.ts +414 -0
- package/extensions/bluebubbles/src/chat.test.ts +461 -0
- package/extensions/bluebubbles/src/chat.ts +382 -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 +2384 -0
- package/extensions/bluebubbles/src/monitor.ts +2517 -0
- package/extensions/bluebubbles/src/onboarding.ts +352 -0
- package/extensions/bluebubbles/src/probe.ts +144 -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 +889 -0
- package/extensions/bluebubbles/src/send.ts +474 -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 +149 -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/acorn +21 -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/index.ts +63 -0
- package/extensions/feishu/node_modules/.bin/openclaw +21 -0
- package/extensions/feishu/openclaw.plugin.json +10 -0
- package/extensions/feishu/package.json +37 -0
- package/extensions/feishu/skills/feishu-doc/SKILL.md +105 -0
- package/extensions/feishu/skills/feishu-doc/references/block-types.md +103 -0
- package/extensions/feishu/skills/feishu-drive/SKILL.md +97 -0
- package/extensions/feishu/skills/feishu-perm/SKILL.md +119 -0
- package/extensions/feishu/skills/feishu-wiki/SKILL.md +111 -0
- package/extensions/feishu/src/accounts.ts +144 -0
- package/extensions/feishu/src/bitable.ts +459 -0
- package/extensions/feishu/src/bot.ts +871 -0
- package/extensions/feishu/src/channel.ts +341 -0
- package/extensions/feishu/src/client.ts +118 -0
- package/extensions/feishu/src/config-schema.ts +172 -0
- package/extensions/feishu/src/directory.ts +177 -0
- package/extensions/feishu/src/doc-schema.ts +47 -0
- package/extensions/feishu/src/docx.ts +521 -0
- package/extensions/feishu/src/drive-schema.ts +46 -0
- package/extensions/feishu/src/drive.ts +227 -0
- package/extensions/feishu/src/media.ts +527 -0
- package/extensions/feishu/src/mention.ts +126 -0
- package/extensions/feishu/src/monitor.ts +190 -0
- package/extensions/feishu/src/onboarding.ts +356 -0
- package/extensions/feishu/src/outbound.ts +40 -0
- package/extensions/feishu/src/perm-schema.ts +52 -0
- package/extensions/feishu/src/perm.ts +173 -0
- package/extensions/feishu/src/policy.ts +104 -0
- package/extensions/feishu/src/probe.ts +44 -0
- package/extensions/feishu/src/reactions.ts +160 -0
- package/extensions/feishu/src/reply-dispatcher.ts +184 -0
- package/extensions/feishu/src/runtime.ts +14 -0
- package/extensions/feishu/src/send.ts +358 -0
- package/extensions/feishu/src/targets.ts +78 -0
- package/extensions/feishu/src/tools-config.ts +21 -0
- package/extensions/feishu/src/types.ts +75 -0
- package/extensions/feishu/src/typing.ts +80 -0
- package/extensions/feishu/src/wiki-schema.ts +55 -0
- package/extensions/feishu/src/wiki.ts +232 -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 +137 -0
- package/extensions/googlechat/src/channel.ts +583 -0
- package/extensions/googlechat/src/monitor.test.ts +22 -0
- package/extensions/googlechat/src/monitor.ts +960 -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 +111 -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 +63 -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 +665 -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 +147 -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 +97 -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 +72 -0
- package/extensions/mattermost/src/channel.ts +337 -0
- package/extensions/mattermost/src/config-schema.ts +56 -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 +991 -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 +52 -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 +253 -0
- package/extensions/memory-lancedb/index.ts +622 -0
- package/extensions/memory-lancedb/node_modules/.bin/arrow2csv +21 -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 +107 -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 +641 -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 +132 -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 +79 -0
- package/extensions/nextcloud-talk/src/format.ts +79 -0
- package/extensions/nextcloud-talk/src/inbound.ts +327 -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 +215 -0
- package/extensions/nextcloud-talk/src/signature.ts +72 -0
- package/extensions/nextcloud-talk/src/types.ts +181 -0
- package/extensions/nostr/CHANGELOG.md +98 -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/node_modules/.bin/tsc +21 -0
- package/extensions/nostr/node_modules/.bin/tsserver +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 +546 -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 +45 -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 +580 -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 +106 -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 +69 -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 +84 -0
- package/extensions/twitch/src/config.test.ts +87 -0
- package/extensions/twitch/src/config.ts +116 -0
- package/extensions/twitch/src/monitor.ts +272 -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 +143 -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 +133 -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 +224 -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 +516 -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 +113 -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 +25 -0
- package/extensions/zalo/src/monitor.ts +764 -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 +44 -0
- package/extensions/zalouser/CHANGELOG.md +85 -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 +28 -0
- package/extensions/zalouser/src/monitor.ts +601 -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 +110 -0
- package/extensions/zalouser/src/zca.ts +202 -0
- package/openclaw.mjs +33 -0
- package/package.json +234 -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/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/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/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,3177 @@
|
|
|
1
|
+
import { I as DEFAULT_GATEWAY_PORT, O as isRich, W as resolveGatewayPort, k as theme, m as restoreTerminalState, p as defaultRuntime, y as info } from "./entry.js";
|
|
2
|
+
import { N as resolveConfiguredModelRef, _ as ensureAuthProfileStore, bt as DEFAULT_PROVIDER, vt as DEFAULT_CONTEXT_TOKENS, yt as DEFAULT_MODEL } from "./auth-profiles-DYdLc1cj.js";
|
|
3
|
+
import { r as resolveCliName, t as formatCliCommand } from "./command-format-ayFsmwwz.js";
|
|
4
|
+
import { l as normalizeAgentId, v as parseAgentSessionKey } from "./session-key-Dk6vSAOv.js";
|
|
5
|
+
import { m as resolveUserPath } from "./utils-DX85MiPR.js";
|
|
6
|
+
import { n as runExec } from "./exec-B8JKbXKW.js";
|
|
7
|
+
import { t as resolveOpenClawPackageRoot } from "./openclaw-root-9ILYSmJ9.js";
|
|
8
|
+
import { c as resolveDefaultAgentId, h as DEFAULT_IDENTITY_FILENAME, p as DEFAULT_BOOTSTRAP_FILENAME, r as resolveAgentDir, s as resolveAgentWorkspaceDir } from "./agent-scope-jAWKj2TP.js";
|
|
9
|
+
import { c as writeConfigFile, i as loadConfig, j as VERSION, o as readConfigFileSnapshot } from "./config-BM_g3TBU.js";
|
|
10
|
+
import { f as inspectPortUsage, m as formatPortDiagnostics } from "./errors-CZ9opC6L.js";
|
|
11
|
+
import { a as findTailscaleBinary, o as getTailnetHostname, s as readTailscaleStatusJson } from "./tailscale-9MusRvOi.js";
|
|
12
|
+
import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-wfwuMJe-.js";
|
|
13
|
+
import { n as listChannelPlugins } from "./plugins-DWuabtET.js";
|
|
14
|
+
import { $n as peekSystemEvents, At as sha256HexPrefix, Ln as readRestartSentinel, Pr as getMemorySearchManager, Rn as summarizeRestartSentinel, Xt as loadProviderUsageSummary, Zt as formatUsageReportLines, _ as randomToken, a as applyWizardMetadata, b as summarizeExistingConfig, c as ensureWorkspaceAndSessions, d as handleReset, en as listAgentsForGateway, g as probeGatewayReachable, h as printWizardHeader, i as DEFAULT_WORKSPACE, l as formatControlUiSshHint, m as openUrl, p as normalizeGatewayTokenInput, pn as lookupContextTokens, q as getRemoteSkillEligibility, s as detectBrowserOpenSupport, v as resolveControlUiLinks, w as normalizeControlUiBasePath, x as waitForGatewayReachable } from "./loader-DqiCudFO.js";
|
|
15
|
+
import { n as withProgress } from "./progress-Bcjniu7m.js";
|
|
16
|
+
import { t as WizardCancelledError } from "./prompts-CudpZgTI.js";
|
|
17
|
+
import { t as resolveChannelDefaultAccountId } from "./helpers-CxHtCvId.js";
|
|
18
|
+
import { n as setupChannels } from "./onboard-channels-Dr4FB1Sm.js";
|
|
19
|
+
import { o as resolveStorePath } from "./paths-BT8VDsrj.js";
|
|
20
|
+
import { I as resolveMainSessionKey, d as loadSessionStore } from "./sandbox-CFJ-0soL.js";
|
|
21
|
+
import { t as buildChannelSummary } from "./channel-summary-CoLmo1EU.js";
|
|
22
|
+
import { t as collectChannelStatusIssues } from "./channels-status-issues-Dln8njuR.js";
|
|
23
|
+
import { r as installCompletion } from "./completion-cli-CNKrO4o0.js";
|
|
24
|
+
import { a as gatewayInstallErrorHint, i as buildGatewayInstallPlan, n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-Chcfufn1.js";
|
|
25
|
+
import { o as resolveGatewayLogPaths, t as resolveGatewayService } from "./service-W6pWyB7g.js";
|
|
26
|
+
import { r as isSystemdUserServiceAvailable } from "./systemd-LmtH96vm.js";
|
|
27
|
+
import { o as readLastGatewayErrorLine } from "./service-audit-BTHjbAs2.js";
|
|
28
|
+
import { t as renderTable } from "./table-BGYjbJbA.js";
|
|
29
|
+
import { i as probeGateway, t as runSecurityAudit } from "./audit-BdNhDEyo.js";
|
|
30
|
+
import { d as applyAuthChoice, h as promptAuthChoiceGrouped, l as resolvePreferredProviderForAuthChoice, o as applyPrimaryModel, r as promptRemoteGatewayConfig, s as promptDefaultModel, t as setupSkills, u as warnIfModelConfigLooksOff } from "./onboard-skills-F6Kw1jrV.js";
|
|
31
|
+
import { l as healthCommand, n as ensureControlUiAssetsBuilt, s as formatHealthChannelLines, t as formatHealthCheckFailure, u as resolveHeartbeatSummaryForAgent } from "./health-format-CbDB25L0.js";
|
|
32
|
+
import { C as resolveEffectiveUpdateChannel, S as normalizeUpdateChannel, c as formatUpdateOneLiner, d as checkShellCompletionStatus, h as compareSemverStrings, l as getUpdateCheckResult, m as checkUpdateStatus, p as ensureCompletionCacheExists, s as formatUpdateAvailableHint, u as resolveUpdateAvailability, x as formatUpdateChannelLabel } from "./update-runner-kfvB4_XO.js";
|
|
33
|
+
import { n as logConfigUpdated } from "./logging-6zx7VGt-.js";
|
|
34
|
+
import { t as buildWorkspaceHookStatus } from "./hooks-status-CH1ZdZs5.js";
|
|
35
|
+
import { t as buildWorkspaceSkillStatus } from "./skills-status-D83jBWaq.js";
|
|
36
|
+
import { t as runTui } from "./tui-CSu3OIP_.js";
|
|
37
|
+
import { t as resolveNodeService } from "./node-service-BoC2MKaK.js";
|
|
38
|
+
import { i as redactSecrets, n as formatDuration$1, r as formatGatewayAuthUsed, t as formatAge$1 } from "./format-tlvh4-cQ.js";
|
|
39
|
+
import { spawnSync } from "node:child_process";
|
|
40
|
+
import path from "node:path";
|
|
41
|
+
import os from "node:os";
|
|
42
|
+
import fs from "node:fs";
|
|
43
|
+
import fs$1 from "node:fs/promises";
|
|
44
|
+
|
|
45
|
+
//#region src/commands/onboard-hooks.ts
|
|
46
|
+
async function setupInternalHooks(cfg, runtime, prompter) {
|
|
47
|
+
await prompter.note([
|
|
48
|
+
"Hooks let you automate actions when agent commands are issued.",
|
|
49
|
+
"Example: Save session context to memory when you issue /new.",
|
|
50
|
+
"",
|
|
51
|
+
"Learn more: https://docs.openclaw.ai/hooks"
|
|
52
|
+
].join("\n"), "Hooks");
|
|
53
|
+
const eligibleHooks = buildWorkspaceHookStatus(resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)), { config: cfg }).hooks.filter((h) => h.eligible);
|
|
54
|
+
if (eligibleHooks.length === 0) {
|
|
55
|
+
await prompter.note("No eligible hooks found. You can configure hooks later in your config.", "No Hooks Available");
|
|
56
|
+
return cfg;
|
|
57
|
+
}
|
|
58
|
+
const selected = (await prompter.multiselect({
|
|
59
|
+
message: "Enable hooks?",
|
|
60
|
+
options: [{
|
|
61
|
+
value: "__skip__",
|
|
62
|
+
label: "Skip for now"
|
|
63
|
+
}, ...eligibleHooks.map((hook) => ({
|
|
64
|
+
value: hook.name,
|
|
65
|
+
label: `${hook.emoji ?? "🔗"} ${hook.name}`,
|
|
66
|
+
hint: hook.description
|
|
67
|
+
}))]
|
|
68
|
+
})).filter((name) => name !== "__skip__");
|
|
69
|
+
if (selected.length === 0) return cfg;
|
|
70
|
+
const entries = { ...cfg.hooks?.internal?.entries };
|
|
71
|
+
for (const name of selected) entries[name] = { enabled: true };
|
|
72
|
+
const next = {
|
|
73
|
+
...cfg,
|
|
74
|
+
hooks: {
|
|
75
|
+
...cfg.hooks,
|
|
76
|
+
internal: {
|
|
77
|
+
enabled: true,
|
|
78
|
+
entries
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
await prompter.note([
|
|
83
|
+
`Enabled ${selected.length} hook${selected.length > 1 ? "s" : ""}: ${selected.join(", ")}`,
|
|
84
|
+
"",
|
|
85
|
+
"You can manage hooks later with:",
|
|
86
|
+
` ${formatCliCommand("openclaw hooks list")}`,
|
|
87
|
+
` ${formatCliCommand("openclaw hooks enable <name>")}`,
|
|
88
|
+
` ${formatCliCommand("openclaw hooks disable <name>")}`
|
|
89
|
+
].join("\n"), "Hooks Configured");
|
|
90
|
+
return next;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
//#endregion
|
|
94
|
+
//#region src/wizard/onboarding.finalize.ts
|
|
95
|
+
async function finalizeOnboardingWizard(options) {
|
|
96
|
+
const { flow, opts, baseConfig, nextConfig, settings, prompter, runtime } = options;
|
|
97
|
+
const withWizardProgress = async (label, options, work) => {
|
|
98
|
+
const progress = prompter.progress(label);
|
|
99
|
+
try {
|
|
100
|
+
return await work(progress);
|
|
101
|
+
} finally {
|
|
102
|
+
progress.stop(options.doneMessage);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
const systemdAvailable = process.platform === "linux" ? await isSystemdUserServiceAvailable() : true;
|
|
106
|
+
if (process.platform === "linux" && !systemdAvailable) await prompter.note("Systemd user services are unavailable. Skipping lingering checks and service install.", "Systemd");
|
|
107
|
+
if (process.platform === "linux" && systemdAvailable) {
|
|
108
|
+
const { ensureSystemdUserLingerInteractive } = await import("./systemd-linger-D4Z0ePWs.js").then((n) => n.r);
|
|
109
|
+
await ensureSystemdUserLingerInteractive({
|
|
110
|
+
runtime,
|
|
111
|
+
prompter: {
|
|
112
|
+
confirm: prompter.confirm,
|
|
113
|
+
note: prompter.note
|
|
114
|
+
},
|
|
115
|
+
reason: "Linux installs use a systemd user service by default. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.",
|
|
116
|
+
requireConfirm: false
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
const explicitInstallDaemon = typeof opts.installDaemon === "boolean" ? opts.installDaemon : void 0;
|
|
120
|
+
let installDaemon;
|
|
121
|
+
if (explicitInstallDaemon !== void 0) installDaemon = explicitInstallDaemon;
|
|
122
|
+
else if (process.platform === "linux" && !systemdAvailable) installDaemon = false;
|
|
123
|
+
else if (flow === "quickstart") installDaemon = true;
|
|
124
|
+
else installDaemon = await prompter.confirm({
|
|
125
|
+
message: "Install Gateway service (recommended)",
|
|
126
|
+
initialValue: true
|
|
127
|
+
});
|
|
128
|
+
if (process.platform === "linux" && !systemdAvailable && installDaemon) {
|
|
129
|
+
await prompter.note("Systemd user services are unavailable; skipping service install. Use your container supervisor or `docker compose up -d`.", "Gateway service");
|
|
130
|
+
installDaemon = false;
|
|
131
|
+
}
|
|
132
|
+
if (installDaemon) {
|
|
133
|
+
const daemonRuntime = flow === "quickstart" ? DEFAULT_GATEWAY_DAEMON_RUNTIME : await prompter.select({
|
|
134
|
+
message: "Gateway service runtime",
|
|
135
|
+
options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
|
|
136
|
+
initialValue: opts.daemonRuntime ?? DEFAULT_GATEWAY_DAEMON_RUNTIME
|
|
137
|
+
});
|
|
138
|
+
if (flow === "quickstart") await prompter.note("QuickStart uses Node for the Gateway service (stable + supported).", "Gateway service runtime");
|
|
139
|
+
const service = resolveGatewayService();
|
|
140
|
+
const loaded = await service.isLoaded({ env: process.env });
|
|
141
|
+
if (loaded) {
|
|
142
|
+
const action = await prompter.select({
|
|
143
|
+
message: "Gateway service already installed",
|
|
144
|
+
options: [
|
|
145
|
+
{
|
|
146
|
+
value: "restart",
|
|
147
|
+
label: "Restart"
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
value: "reinstall",
|
|
151
|
+
label: "Reinstall"
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
value: "skip",
|
|
155
|
+
label: "Skip"
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
});
|
|
159
|
+
if (action === "restart") await withWizardProgress("Gateway service", { doneMessage: "Gateway service restarted." }, async (progress) => {
|
|
160
|
+
progress.update("Restarting Gateway service…");
|
|
161
|
+
await service.restart({
|
|
162
|
+
env: process.env,
|
|
163
|
+
stdout: process.stdout
|
|
164
|
+
});
|
|
165
|
+
});
|
|
166
|
+
else if (action === "reinstall") await withWizardProgress("Gateway service", { doneMessage: "Gateway service uninstalled." }, async (progress) => {
|
|
167
|
+
progress.update("Uninstalling Gateway service…");
|
|
168
|
+
await service.uninstall({
|
|
169
|
+
env: process.env,
|
|
170
|
+
stdout: process.stdout
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
if (!loaded || loaded && !await service.isLoaded({ env: process.env })) {
|
|
175
|
+
const progress = prompter.progress("Gateway service");
|
|
176
|
+
let installError = null;
|
|
177
|
+
try {
|
|
178
|
+
progress.update("Preparing Gateway service…");
|
|
179
|
+
const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
|
|
180
|
+
env: process.env,
|
|
181
|
+
port: settings.port,
|
|
182
|
+
token: settings.gatewayToken,
|
|
183
|
+
runtime: daemonRuntime,
|
|
184
|
+
warn: (message, title) => prompter.note(message, title),
|
|
185
|
+
config: nextConfig
|
|
186
|
+
});
|
|
187
|
+
progress.update("Installing Gateway service…");
|
|
188
|
+
await service.install({
|
|
189
|
+
env: process.env,
|
|
190
|
+
stdout: process.stdout,
|
|
191
|
+
programArguments,
|
|
192
|
+
workingDirectory,
|
|
193
|
+
environment
|
|
194
|
+
});
|
|
195
|
+
} catch (err) {
|
|
196
|
+
installError = err instanceof Error ? err.message : String(err);
|
|
197
|
+
} finally {
|
|
198
|
+
progress.stop(installError ? "Gateway service install failed." : "Gateway service installed.");
|
|
199
|
+
}
|
|
200
|
+
if (installError) {
|
|
201
|
+
await prompter.note(`Gateway service install failed: ${installError}`, "Gateway");
|
|
202
|
+
await prompter.note(gatewayInstallErrorHint(), "Gateway");
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
if (!opts.skipHealth) {
|
|
207
|
+
await waitForGatewayReachable({
|
|
208
|
+
url: resolveControlUiLinks({
|
|
209
|
+
bind: nextConfig.gateway?.bind ?? "loopback",
|
|
210
|
+
port: settings.port,
|
|
211
|
+
customBindHost: nextConfig.gateway?.customBindHost,
|
|
212
|
+
basePath: void 0
|
|
213
|
+
}).wsUrl,
|
|
214
|
+
token: settings.gatewayToken,
|
|
215
|
+
deadlineMs: 15e3
|
|
216
|
+
});
|
|
217
|
+
try {
|
|
218
|
+
await healthCommand({
|
|
219
|
+
json: false,
|
|
220
|
+
timeoutMs: 1e4
|
|
221
|
+
}, runtime);
|
|
222
|
+
} catch (err) {
|
|
223
|
+
runtime.error(formatHealthCheckFailure(err));
|
|
224
|
+
await prompter.note([
|
|
225
|
+
"Docs:",
|
|
226
|
+
"https://docs.openclaw.ai/gateway/health",
|
|
227
|
+
"https://docs.openclaw.ai/gateway/troubleshooting"
|
|
228
|
+
].join("\n"), "Health check help");
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
const controlUiEnabled = nextConfig.gateway?.controlUi?.enabled ?? baseConfig.gateway?.controlUi?.enabled ?? true;
|
|
232
|
+
if (!opts.skipUi && controlUiEnabled) {
|
|
233
|
+
const controlUiAssets = await ensureControlUiAssetsBuilt(runtime);
|
|
234
|
+
if (!controlUiAssets.ok && controlUiAssets.message) runtime.error(controlUiAssets.message);
|
|
235
|
+
}
|
|
236
|
+
await prompter.note([
|
|
237
|
+
"Add nodes for extra features:",
|
|
238
|
+
"- macOS app (system + notifications)",
|
|
239
|
+
"- iOS app (camera/canvas)",
|
|
240
|
+
"- Android app (camera/canvas)"
|
|
241
|
+
].join("\n"), "Optional apps");
|
|
242
|
+
const controlUiBasePath = nextConfig.gateway?.controlUi?.basePath ?? baseConfig.gateway?.controlUi?.basePath;
|
|
243
|
+
const links = resolveControlUiLinks({
|
|
244
|
+
bind: settings.bind,
|
|
245
|
+
port: settings.port,
|
|
246
|
+
customBindHost: settings.customBindHost,
|
|
247
|
+
basePath: controlUiBasePath
|
|
248
|
+
});
|
|
249
|
+
const authedUrl = settings.authMode === "token" && settings.gatewayToken ? `${links.httpUrl}#token=${encodeURIComponent(settings.gatewayToken)}` : links.httpUrl;
|
|
250
|
+
const gatewayProbe = await probeGatewayReachable({
|
|
251
|
+
url: links.wsUrl,
|
|
252
|
+
token: settings.authMode === "token" ? settings.gatewayToken : void 0,
|
|
253
|
+
password: settings.authMode === "password" ? nextConfig.gateway?.auth?.password : ""
|
|
254
|
+
});
|
|
255
|
+
const gatewayStatusLine = gatewayProbe.ok ? "Gateway: reachable" : `Gateway: not detected${gatewayProbe.detail ? ` (${gatewayProbe.detail})` : ""}`;
|
|
256
|
+
const bootstrapPath = path.join(resolveUserPath(options.workspaceDir), DEFAULT_BOOTSTRAP_FILENAME);
|
|
257
|
+
const hasBootstrap = await fs$1.access(bootstrapPath).then(() => true).catch(() => false);
|
|
258
|
+
await prompter.note([
|
|
259
|
+
`Web UI: ${links.httpUrl}`,
|
|
260
|
+
settings.authMode === "token" && settings.gatewayToken ? `Web UI (with token): ${authedUrl}` : void 0,
|
|
261
|
+
`Gateway WS: ${links.wsUrl}`,
|
|
262
|
+
gatewayStatusLine,
|
|
263
|
+
"Docs: https://docs.openclaw.ai/web/control-ui"
|
|
264
|
+
].filter(Boolean).join("\n"), "Control UI");
|
|
265
|
+
let controlUiOpened = false;
|
|
266
|
+
let controlUiOpenHint;
|
|
267
|
+
let hatchChoice = null;
|
|
268
|
+
let launchedTui = false;
|
|
269
|
+
if (!opts.skipUi && gatewayProbe.ok) {
|
|
270
|
+
if (hasBootstrap) await prompter.note([
|
|
271
|
+
"This is the defining action that makes your agent you.",
|
|
272
|
+
"Please take your time.",
|
|
273
|
+
"The more you tell it, the better the experience will be.",
|
|
274
|
+
"We will send: \"Wake up, my friend!\""
|
|
275
|
+
].join("\n"), "Start TUI (best option!)");
|
|
276
|
+
await prompter.note([
|
|
277
|
+
"Gateway token: shared auth for the Gateway + Control UI.",
|
|
278
|
+
"Stored in: ~/.openclaw/openclaw.json (gateway.auth.token) or OPENCLAW_GATEWAY_TOKEN.",
|
|
279
|
+
`View token: ${formatCliCommand("openclaw config get gateway.auth.token")}`,
|
|
280
|
+
`Generate token: ${formatCliCommand("openclaw doctor --generate-gateway-token")}`,
|
|
281
|
+
"Web UI stores a copy in this browser's localStorage (openclaw.control.settings.v1).",
|
|
282
|
+
`Open the dashboard anytime: ${formatCliCommand("openclaw dashboard --no-open")}`,
|
|
283
|
+
"If prompted: paste the token into Control UI settings (or use the tokenized dashboard URL)."
|
|
284
|
+
].join("\n"), "Token");
|
|
285
|
+
hatchChoice = await prompter.select({
|
|
286
|
+
message: "How do you want to hatch your bot?",
|
|
287
|
+
options: [
|
|
288
|
+
{
|
|
289
|
+
value: "tui",
|
|
290
|
+
label: "Hatch in TUI (recommended)"
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
value: "web",
|
|
294
|
+
label: "Open the Web UI"
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
value: "later",
|
|
298
|
+
label: "Do this later"
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
initialValue: "tui"
|
|
302
|
+
});
|
|
303
|
+
if (hatchChoice === "tui") {
|
|
304
|
+
restoreTerminalState("pre-onboarding tui");
|
|
305
|
+
await runTui({
|
|
306
|
+
url: links.wsUrl,
|
|
307
|
+
token: settings.authMode === "token" ? settings.gatewayToken : void 0,
|
|
308
|
+
password: settings.authMode === "password" ? nextConfig.gateway?.auth?.password : "",
|
|
309
|
+
deliver: false,
|
|
310
|
+
message: hasBootstrap ? "Wake up, my friend!" : void 0
|
|
311
|
+
});
|
|
312
|
+
launchedTui = true;
|
|
313
|
+
} else if (hatchChoice === "web") {
|
|
314
|
+
if ((await detectBrowserOpenSupport()).ok) {
|
|
315
|
+
controlUiOpened = await openUrl(authedUrl);
|
|
316
|
+
if (!controlUiOpened) controlUiOpenHint = formatControlUiSshHint({
|
|
317
|
+
port: settings.port,
|
|
318
|
+
basePath: controlUiBasePath,
|
|
319
|
+
token: settings.authMode === "token" ? settings.gatewayToken : void 0
|
|
320
|
+
});
|
|
321
|
+
} else controlUiOpenHint = formatControlUiSshHint({
|
|
322
|
+
port: settings.port,
|
|
323
|
+
basePath: controlUiBasePath,
|
|
324
|
+
token: settings.authMode === "token" ? settings.gatewayToken : void 0
|
|
325
|
+
});
|
|
326
|
+
await prompter.note([
|
|
327
|
+
`Dashboard link (with token): ${authedUrl}`,
|
|
328
|
+
controlUiOpened ? "Opened in your browser. Keep that tab to control OpenClaw." : "Copy/paste this URL in a browser on this machine to control OpenClaw.",
|
|
329
|
+
controlUiOpenHint
|
|
330
|
+
].filter(Boolean).join("\n"), "Dashboard ready");
|
|
331
|
+
} else await prompter.note(`When you're ready: ${formatCliCommand("openclaw dashboard --no-open")}`, "Later");
|
|
332
|
+
} else if (opts.skipUi) await prompter.note("Skipping Control UI/TUI prompts.", "Control UI");
|
|
333
|
+
await prompter.note(["Back up your agent workspace.", "Docs: https://docs.openclaw.ai/concepts/agent-workspace"].join("\n"), "Workspace backup");
|
|
334
|
+
await prompter.note("Running agents on your computer is risky — harden your setup: https://docs.openclaw.ai/security", "Security");
|
|
335
|
+
const cliName = resolveCliName();
|
|
336
|
+
const completionStatus = await checkShellCompletionStatus(cliName);
|
|
337
|
+
if (completionStatus.usesSlowPattern) {
|
|
338
|
+
if (await ensureCompletionCacheExists(cliName)) await installCompletion(completionStatus.shell, true, cliName);
|
|
339
|
+
} else if (completionStatus.profileInstalled && !completionStatus.cacheExists) await ensureCompletionCacheExists(cliName);
|
|
340
|
+
else if (!completionStatus.profileInstalled) {
|
|
341
|
+
if (await prompter.confirm({
|
|
342
|
+
message: `Enable ${completionStatus.shell} shell completion for ${cliName}?`,
|
|
343
|
+
initialValue: true
|
|
344
|
+
})) if (await ensureCompletionCacheExists(cliName)) {
|
|
345
|
+
await installCompletion(completionStatus.shell, true, cliName);
|
|
346
|
+
const profileHint = completionStatus.shell === "zsh" ? "~/.zshrc" : completionStatus.shell === "bash" ? "~/.bashrc" : "~/.config/fish/config.fish";
|
|
347
|
+
await prompter.note(`Shell completion installed. Restart your shell or run: source ${profileHint}`, "Shell completion");
|
|
348
|
+
} else await prompter.note(`Failed to generate completion cache. Run \`${cliName} completion --install\` later.`, "Shell completion");
|
|
349
|
+
}
|
|
350
|
+
if (!opts.skipUi && settings.authMode === "token" && Boolean(settings.gatewayToken) && hatchChoice === null) {
|
|
351
|
+
if ((await detectBrowserOpenSupport()).ok) {
|
|
352
|
+
controlUiOpened = await openUrl(authedUrl);
|
|
353
|
+
if (!controlUiOpened) controlUiOpenHint = formatControlUiSshHint({
|
|
354
|
+
port: settings.port,
|
|
355
|
+
basePath: controlUiBasePath,
|
|
356
|
+
token: settings.gatewayToken
|
|
357
|
+
});
|
|
358
|
+
} else controlUiOpenHint = formatControlUiSshHint({
|
|
359
|
+
port: settings.port,
|
|
360
|
+
basePath: controlUiBasePath,
|
|
361
|
+
token: settings.gatewayToken
|
|
362
|
+
});
|
|
363
|
+
await prompter.note([
|
|
364
|
+
`Dashboard link (with token): ${authedUrl}`,
|
|
365
|
+
controlUiOpened ? "Opened in your browser. Keep that tab to control OpenClaw." : "Copy/paste this URL in a browser on this machine to control OpenClaw.",
|
|
366
|
+
controlUiOpenHint
|
|
367
|
+
].filter(Boolean).join("\n"), "Dashboard ready");
|
|
368
|
+
}
|
|
369
|
+
const webSearchKey = (nextConfig.tools?.web?.search?.apiKey ?? "").trim();
|
|
370
|
+
const webSearchEnv = (process.env.BRAVE_API_KEY ?? "").trim();
|
|
371
|
+
const hasWebSearchKey = Boolean(webSearchKey || webSearchEnv);
|
|
372
|
+
await prompter.note(hasWebSearchKey ? [
|
|
373
|
+
"Web search is enabled, so your agent can look things up online when needed.",
|
|
374
|
+
"",
|
|
375
|
+
webSearchKey ? "API key: stored in config (tools.web.search.apiKey)." : "API key: provided via BRAVE_API_KEY env var (Gateway environment).",
|
|
376
|
+
"Docs: https://docs.openclaw.ai/tools/web"
|
|
377
|
+
].join("\n") : [
|
|
378
|
+
"If you want your agent to be able to search the web, you’ll need an API key.",
|
|
379
|
+
"",
|
|
380
|
+
"OpenClaw uses Brave Search for the `web_search` tool. Without a Brave Search API key, web search won’t work.",
|
|
381
|
+
"",
|
|
382
|
+
"Set it up interactively:",
|
|
383
|
+
`- Run: ${formatCliCommand("openclaw configure --section web")}`,
|
|
384
|
+
"- Enable web_search and paste your Brave Search API key",
|
|
385
|
+
"",
|
|
386
|
+
"Alternative: set BRAVE_API_KEY in the Gateway environment (no config changes).",
|
|
387
|
+
"Docs: https://docs.openclaw.ai/tools/web"
|
|
388
|
+
].join("\n"), "Web search (optional)");
|
|
389
|
+
await prompter.note("What now: https://openclaw.ai/showcase (\"What People Are Building\").", "What now");
|
|
390
|
+
await prompter.outro(controlUiOpened ? "Onboarding complete. Dashboard opened; keep that tab to control OpenClaw." : "Onboarding complete. Use the dashboard link above to control OpenClaw.");
|
|
391
|
+
return { launchedTui };
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
//#endregion
|
|
395
|
+
//#region src/wizard/onboarding.gateway-config.ts
|
|
396
|
+
async function configureGatewayForOnboarding(opts) {
|
|
397
|
+
const { flow, localPort, quickstartGateway, prompter } = opts;
|
|
398
|
+
let { nextConfig } = opts;
|
|
399
|
+
const port = flow === "quickstart" ? quickstartGateway.port : Number.parseInt(String(await prompter.text({
|
|
400
|
+
message: "Gateway port",
|
|
401
|
+
initialValue: String(localPort),
|
|
402
|
+
validate: (value) => Number.isFinite(Number(value)) ? void 0 : "Invalid port"
|
|
403
|
+
})), 10);
|
|
404
|
+
let bind = flow === "quickstart" ? quickstartGateway.bind : await prompter.select({
|
|
405
|
+
message: "Gateway bind",
|
|
406
|
+
options: [
|
|
407
|
+
{
|
|
408
|
+
value: "loopback",
|
|
409
|
+
label: "Loopback (127.0.0.1)"
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
value: "lan",
|
|
413
|
+
label: "LAN (0.0.0.0)"
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
value: "tailnet",
|
|
417
|
+
label: "Tailnet (Tailscale IP)"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
value: "auto",
|
|
421
|
+
label: "Auto (Loopback → LAN)"
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
value: "custom",
|
|
425
|
+
label: "Custom IP"
|
|
426
|
+
}
|
|
427
|
+
]
|
|
428
|
+
});
|
|
429
|
+
let customBindHost = quickstartGateway.customBindHost;
|
|
430
|
+
if (bind === "custom") {
|
|
431
|
+
if (flow !== "quickstart" || !customBindHost) {
|
|
432
|
+
const input = await prompter.text({
|
|
433
|
+
message: "Custom IP address",
|
|
434
|
+
placeholder: "192.168.1.100",
|
|
435
|
+
initialValue: customBindHost ?? "",
|
|
436
|
+
validate: (value) => {
|
|
437
|
+
if (!value) return "IP address is required for custom bind mode";
|
|
438
|
+
const parts = value.trim().split(".");
|
|
439
|
+
if (parts.length !== 4) return "Invalid IPv4 address (e.g., 192.168.1.100)";
|
|
440
|
+
if (parts.every((part) => {
|
|
441
|
+
const n = parseInt(part, 10);
|
|
442
|
+
return !Number.isNaN(n) && n >= 0 && n <= 255 && part === String(n);
|
|
443
|
+
})) return;
|
|
444
|
+
return "Invalid IPv4 address (each octet must be 0-255)";
|
|
445
|
+
}
|
|
446
|
+
});
|
|
447
|
+
customBindHost = typeof input === "string" ? input.trim() : void 0;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
let authMode = flow === "quickstart" ? quickstartGateway.authMode : await prompter.select({
|
|
451
|
+
message: "Gateway auth",
|
|
452
|
+
options: [{
|
|
453
|
+
value: "token",
|
|
454
|
+
label: "Token",
|
|
455
|
+
hint: "Recommended default (local + remote)"
|
|
456
|
+
}, {
|
|
457
|
+
value: "password",
|
|
458
|
+
label: "Password"
|
|
459
|
+
}],
|
|
460
|
+
initialValue: "token"
|
|
461
|
+
});
|
|
462
|
+
const tailscaleMode = flow === "quickstart" ? quickstartGateway.tailscaleMode : await prompter.select({
|
|
463
|
+
message: "Tailscale exposure",
|
|
464
|
+
options: [
|
|
465
|
+
{
|
|
466
|
+
value: "off",
|
|
467
|
+
label: "Off",
|
|
468
|
+
hint: "No Tailscale exposure"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
value: "serve",
|
|
472
|
+
label: "Serve",
|
|
473
|
+
hint: "Private HTTPS for your tailnet (devices on Tailscale)"
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
value: "funnel",
|
|
477
|
+
label: "Funnel",
|
|
478
|
+
hint: "Public HTTPS via Tailscale Funnel (internet)"
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
});
|
|
482
|
+
if (tailscaleMode !== "off") {
|
|
483
|
+
if (!await findTailscaleBinary()) await prompter.note([
|
|
484
|
+
"Tailscale binary not found in PATH or /Applications.",
|
|
485
|
+
"Ensure Tailscale is installed from:",
|
|
486
|
+
" https://tailscale.com/download/mac",
|
|
487
|
+
"",
|
|
488
|
+
"You can continue setup, but serve/funnel will fail at runtime."
|
|
489
|
+
].join("\n"), "Tailscale Warning");
|
|
490
|
+
}
|
|
491
|
+
let tailscaleResetOnExit = flow === "quickstart" ? quickstartGateway.tailscaleResetOnExit : false;
|
|
492
|
+
if (tailscaleMode !== "off" && flow !== "quickstart") {
|
|
493
|
+
await prompter.note([
|
|
494
|
+
"Docs:",
|
|
495
|
+
"https://docs.openclaw.ai/gateway/tailscale",
|
|
496
|
+
"https://docs.openclaw.ai/web"
|
|
497
|
+
].join("\n"), "Tailscale");
|
|
498
|
+
tailscaleResetOnExit = Boolean(await prompter.confirm({
|
|
499
|
+
message: "Reset Tailscale serve/funnel on exit?",
|
|
500
|
+
initialValue: false
|
|
501
|
+
}));
|
|
502
|
+
}
|
|
503
|
+
if (tailscaleMode !== "off" && bind !== "loopback") {
|
|
504
|
+
await prompter.note("Tailscale requires bind=loopback. Adjusting bind to loopback.", "Note");
|
|
505
|
+
bind = "loopback";
|
|
506
|
+
customBindHost = void 0;
|
|
507
|
+
}
|
|
508
|
+
if (tailscaleMode === "funnel" && authMode !== "password") {
|
|
509
|
+
await prompter.note("Tailscale funnel requires password auth.", "Note");
|
|
510
|
+
authMode = "password";
|
|
511
|
+
}
|
|
512
|
+
let gatewayToken;
|
|
513
|
+
if (authMode === "token") if (flow === "quickstart") gatewayToken = quickstartGateway.token ?? randomToken();
|
|
514
|
+
else gatewayToken = normalizeGatewayTokenInput(await prompter.text({
|
|
515
|
+
message: "Gateway token (blank to generate)",
|
|
516
|
+
placeholder: "Needed for multi-machine or non-loopback access",
|
|
517
|
+
initialValue: quickstartGateway.token ?? ""
|
|
518
|
+
})) || randomToken();
|
|
519
|
+
if (authMode === "password") {
|
|
520
|
+
const password = flow === "quickstart" && quickstartGateway.password ? quickstartGateway.password : await prompter.text({
|
|
521
|
+
message: "Gateway password",
|
|
522
|
+
validate: (value) => value?.trim() ? void 0 : "Required"
|
|
523
|
+
});
|
|
524
|
+
nextConfig = {
|
|
525
|
+
...nextConfig,
|
|
526
|
+
gateway: {
|
|
527
|
+
...nextConfig.gateway,
|
|
528
|
+
auth: {
|
|
529
|
+
...nextConfig.gateway?.auth,
|
|
530
|
+
mode: "password",
|
|
531
|
+
password: String(password).trim()
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
};
|
|
535
|
+
} else if (authMode === "token") nextConfig = {
|
|
536
|
+
...nextConfig,
|
|
537
|
+
gateway: {
|
|
538
|
+
...nextConfig.gateway,
|
|
539
|
+
auth: {
|
|
540
|
+
...nextConfig.gateway?.auth,
|
|
541
|
+
mode: "token",
|
|
542
|
+
token: gatewayToken
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
nextConfig = {
|
|
547
|
+
...nextConfig,
|
|
548
|
+
gateway: {
|
|
549
|
+
...nextConfig.gateway,
|
|
550
|
+
port,
|
|
551
|
+
bind,
|
|
552
|
+
...bind === "custom" && customBindHost ? { customBindHost } : {},
|
|
553
|
+
tailscale: {
|
|
554
|
+
...nextConfig.gateway?.tailscale,
|
|
555
|
+
mode: tailscaleMode,
|
|
556
|
+
resetOnExit: tailscaleResetOnExit
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
return {
|
|
561
|
+
nextConfig,
|
|
562
|
+
settings: {
|
|
563
|
+
port,
|
|
564
|
+
bind,
|
|
565
|
+
customBindHost: bind === "custom" ? customBindHost : void 0,
|
|
566
|
+
authMode,
|
|
567
|
+
gatewayToken,
|
|
568
|
+
tailscaleMode,
|
|
569
|
+
tailscaleResetOnExit
|
|
570
|
+
}
|
|
571
|
+
};
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
//#endregion
|
|
575
|
+
//#region src/wizard/onboarding.ts
|
|
576
|
+
async function requireRiskAcknowledgement(params) {
|
|
577
|
+
if (params.opts.acceptRisk === true) return;
|
|
578
|
+
await params.prompter.note([
|
|
579
|
+
"Security warning — please read.",
|
|
580
|
+
"",
|
|
581
|
+
"OpenClaw is a hobby project and still in beta. Expect sharp edges.",
|
|
582
|
+
"This bot can read files and run actions if tools are enabled.",
|
|
583
|
+
"A bad prompt can trick it into doing unsafe things.",
|
|
584
|
+
"",
|
|
585
|
+
"If you’re not comfortable with basic security and access control, don’t run OpenClaw.",
|
|
586
|
+
"Ask someone experienced to help before enabling tools or exposing it to the internet.",
|
|
587
|
+
"",
|
|
588
|
+
"Recommended baseline:",
|
|
589
|
+
"- Pairing/allowlists + mention gating.",
|
|
590
|
+
"- Sandbox + least-privilege tools.",
|
|
591
|
+
"- Keep secrets out of the agent’s reachable filesystem.",
|
|
592
|
+
"- Use the strongest available model for any bot with tools or untrusted inboxes.",
|
|
593
|
+
"",
|
|
594
|
+
"Run regularly:",
|
|
595
|
+
"openclaw security audit --deep",
|
|
596
|
+
"openclaw security audit --fix",
|
|
597
|
+
"",
|
|
598
|
+
"Must read: https://docs.openclaw.ai/gateway/security"
|
|
599
|
+
].join("\n"), "Security");
|
|
600
|
+
if (!await params.prompter.confirm({
|
|
601
|
+
message: "I understand this is powerful and inherently risky. Continue?",
|
|
602
|
+
initialValue: false
|
|
603
|
+
})) throw new WizardCancelledError("risk not accepted");
|
|
604
|
+
}
|
|
605
|
+
async function runOnboardingWizard(opts, runtime = defaultRuntime, prompter) {
|
|
606
|
+
printWizardHeader(runtime);
|
|
607
|
+
await prompter.intro("OpenClaw onboarding");
|
|
608
|
+
await requireRiskAcknowledgement({
|
|
609
|
+
opts,
|
|
610
|
+
prompter
|
|
611
|
+
});
|
|
612
|
+
const snapshot = await readConfigFileSnapshot();
|
|
613
|
+
let baseConfig = snapshot.valid ? snapshot.config : {};
|
|
614
|
+
if (snapshot.exists && !snapshot.valid) {
|
|
615
|
+
await prompter.note(summarizeExistingConfig(baseConfig), "Invalid config");
|
|
616
|
+
if (snapshot.issues.length > 0) await prompter.note([
|
|
617
|
+
...snapshot.issues.map((iss) => `- ${iss.path}: ${iss.message}`),
|
|
618
|
+
"",
|
|
619
|
+
"Docs: https://docs.openclaw.ai/gateway/configuration"
|
|
620
|
+
].join("\n"), "Config issues");
|
|
621
|
+
await prompter.outro(`Config invalid. Run \`${formatCliCommand("openclaw doctor")}\` to repair it, then re-run onboarding.`);
|
|
622
|
+
runtime.exit(1);
|
|
623
|
+
return;
|
|
624
|
+
}
|
|
625
|
+
const quickstartHint = `Configure details later via ${formatCliCommand("openclaw configure")}.`;
|
|
626
|
+
const manualHint = "Configure port, network, Tailscale, and auth options.";
|
|
627
|
+
const explicitFlowRaw = opts.flow?.trim();
|
|
628
|
+
const normalizedExplicitFlow = explicitFlowRaw === "manual" ? "advanced" : explicitFlowRaw;
|
|
629
|
+
if (normalizedExplicitFlow && normalizedExplicitFlow !== "quickstart" && normalizedExplicitFlow !== "advanced") {
|
|
630
|
+
runtime.error("Invalid --flow (use quickstart, manual, or advanced).");
|
|
631
|
+
runtime.exit(1);
|
|
632
|
+
return;
|
|
633
|
+
}
|
|
634
|
+
let flow = (normalizedExplicitFlow === "quickstart" || normalizedExplicitFlow === "advanced" ? normalizedExplicitFlow : void 0) ?? await prompter.select({
|
|
635
|
+
message: "Onboarding mode",
|
|
636
|
+
options: [{
|
|
637
|
+
value: "quickstart",
|
|
638
|
+
label: "QuickStart",
|
|
639
|
+
hint: quickstartHint
|
|
640
|
+
}, {
|
|
641
|
+
value: "advanced",
|
|
642
|
+
label: "Manual",
|
|
643
|
+
hint: manualHint
|
|
644
|
+
}],
|
|
645
|
+
initialValue: "quickstart"
|
|
646
|
+
});
|
|
647
|
+
if (opts.mode === "remote" && flow === "quickstart") {
|
|
648
|
+
await prompter.note("QuickStart only supports local gateways. Switching to Manual mode.", "QuickStart");
|
|
649
|
+
flow = "advanced";
|
|
650
|
+
}
|
|
651
|
+
if (snapshot.exists) {
|
|
652
|
+
await prompter.note(summarizeExistingConfig(baseConfig), "Existing config detected");
|
|
653
|
+
if (await prompter.select({
|
|
654
|
+
message: "Config handling",
|
|
655
|
+
options: [
|
|
656
|
+
{
|
|
657
|
+
value: "keep",
|
|
658
|
+
label: "Use existing values"
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
value: "modify",
|
|
662
|
+
label: "Update values"
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
value: "reset",
|
|
666
|
+
label: "Reset"
|
|
667
|
+
}
|
|
668
|
+
]
|
|
669
|
+
}) === "reset") {
|
|
670
|
+
const workspaceDefault = baseConfig.agents?.defaults?.workspace ?? DEFAULT_WORKSPACE;
|
|
671
|
+
await handleReset(await prompter.select({
|
|
672
|
+
message: "Reset scope",
|
|
673
|
+
options: [
|
|
674
|
+
{
|
|
675
|
+
value: "config",
|
|
676
|
+
label: "Config only"
|
|
677
|
+
},
|
|
678
|
+
{
|
|
679
|
+
value: "config+creds+sessions",
|
|
680
|
+
label: "Config + creds + sessions"
|
|
681
|
+
},
|
|
682
|
+
{
|
|
683
|
+
value: "full",
|
|
684
|
+
label: "Full reset (config + creds + sessions + workspace)"
|
|
685
|
+
}
|
|
686
|
+
]
|
|
687
|
+
}), resolveUserPath(workspaceDefault), runtime);
|
|
688
|
+
baseConfig = {};
|
|
689
|
+
}
|
|
690
|
+
}
|
|
691
|
+
const quickstartGateway = (() => {
|
|
692
|
+
const hasExisting = typeof baseConfig.gateway?.port === "number" || baseConfig.gateway?.bind !== void 0 || baseConfig.gateway?.auth?.mode !== void 0 || baseConfig.gateway?.auth?.token !== void 0 || baseConfig.gateway?.auth?.password !== void 0 || baseConfig.gateway?.customBindHost !== void 0 || baseConfig.gateway?.tailscale?.mode !== void 0;
|
|
693
|
+
const bindRaw = baseConfig.gateway?.bind;
|
|
694
|
+
const bind = bindRaw === "loopback" || bindRaw === "lan" || bindRaw === "auto" || bindRaw === "custom" || bindRaw === "tailnet" ? bindRaw : "loopback";
|
|
695
|
+
let authMode = "token";
|
|
696
|
+
if (baseConfig.gateway?.auth?.mode === "token" || baseConfig.gateway?.auth?.mode === "password") authMode = baseConfig.gateway.auth.mode;
|
|
697
|
+
else if (baseConfig.gateway?.auth?.token) authMode = "token";
|
|
698
|
+
else if (baseConfig.gateway?.auth?.password) authMode = "password";
|
|
699
|
+
const tailscaleRaw = baseConfig.gateway?.tailscale?.mode;
|
|
700
|
+
const tailscaleMode = tailscaleRaw === "off" || tailscaleRaw === "serve" || tailscaleRaw === "funnel" ? tailscaleRaw : "off";
|
|
701
|
+
return {
|
|
702
|
+
hasExisting,
|
|
703
|
+
port: resolveGatewayPort(baseConfig),
|
|
704
|
+
bind,
|
|
705
|
+
authMode,
|
|
706
|
+
tailscaleMode,
|
|
707
|
+
token: baseConfig.gateway?.auth?.token,
|
|
708
|
+
password: baseConfig.gateway?.auth?.password,
|
|
709
|
+
customBindHost: baseConfig.gateway?.customBindHost,
|
|
710
|
+
tailscaleResetOnExit: baseConfig.gateway?.tailscale?.resetOnExit ?? false
|
|
711
|
+
};
|
|
712
|
+
})();
|
|
713
|
+
if (flow === "quickstart") {
|
|
714
|
+
const formatBind = (value) => {
|
|
715
|
+
if (value === "loopback") return "Loopback (127.0.0.1)";
|
|
716
|
+
if (value === "lan") return "LAN";
|
|
717
|
+
if (value === "custom") return "Custom IP";
|
|
718
|
+
if (value === "tailnet") return "Tailnet (Tailscale IP)";
|
|
719
|
+
return "Auto";
|
|
720
|
+
};
|
|
721
|
+
const formatAuth = (value) => {
|
|
722
|
+
if (value === "token") return "Token (default)";
|
|
723
|
+
return "Password";
|
|
724
|
+
};
|
|
725
|
+
const formatTailscale = (value) => {
|
|
726
|
+
if (value === "off") return "Off";
|
|
727
|
+
if (value === "serve") return "Serve";
|
|
728
|
+
return "Funnel";
|
|
729
|
+
};
|
|
730
|
+
const quickstartLines = quickstartGateway.hasExisting ? [
|
|
731
|
+
"Keeping your current gateway settings:",
|
|
732
|
+
`Gateway port: ${quickstartGateway.port}`,
|
|
733
|
+
`Gateway bind: ${formatBind(quickstartGateway.bind)}`,
|
|
734
|
+
...quickstartGateway.bind === "custom" && quickstartGateway.customBindHost ? [`Gateway custom IP: ${quickstartGateway.customBindHost}`] : [],
|
|
735
|
+
`Gateway auth: ${formatAuth(quickstartGateway.authMode)}`,
|
|
736
|
+
`Tailscale exposure: ${formatTailscale(quickstartGateway.tailscaleMode)}`,
|
|
737
|
+
"Direct to chat channels."
|
|
738
|
+
] : [
|
|
739
|
+
`Gateway port: ${DEFAULT_GATEWAY_PORT}`,
|
|
740
|
+
"Gateway bind: Loopback (127.0.0.1)",
|
|
741
|
+
"Gateway auth: Token (default)",
|
|
742
|
+
"Tailscale exposure: Off",
|
|
743
|
+
"Direct to chat channels."
|
|
744
|
+
];
|
|
745
|
+
await prompter.note(quickstartLines.join("\n"), "QuickStart");
|
|
746
|
+
}
|
|
747
|
+
const localPort = resolveGatewayPort(baseConfig);
|
|
748
|
+
const localUrl = `ws://127.0.0.1:${localPort}`;
|
|
749
|
+
const localProbe = await probeGatewayReachable({
|
|
750
|
+
url: localUrl,
|
|
751
|
+
token: baseConfig.gateway?.auth?.token ?? process.env.OPENCLAW_GATEWAY_TOKEN,
|
|
752
|
+
password: baseConfig.gateway?.auth?.password ?? process.env.OPENCLAW_GATEWAY_PASSWORD
|
|
753
|
+
});
|
|
754
|
+
const remoteUrl = baseConfig.gateway?.remote?.url?.trim() ?? "";
|
|
755
|
+
const remoteProbe = remoteUrl ? await probeGatewayReachable({
|
|
756
|
+
url: remoteUrl,
|
|
757
|
+
token: baseConfig.gateway?.remote?.token
|
|
758
|
+
}) : null;
|
|
759
|
+
const mode = opts.mode ?? (flow === "quickstart" ? "local" : await prompter.select({
|
|
760
|
+
message: "What do you want to set up?",
|
|
761
|
+
options: [{
|
|
762
|
+
value: "local",
|
|
763
|
+
label: "Local gateway (this machine)",
|
|
764
|
+
hint: localProbe.ok ? `Gateway reachable (${localUrl})` : `No gateway detected (${localUrl})`
|
|
765
|
+
}, {
|
|
766
|
+
value: "remote",
|
|
767
|
+
label: "Remote gateway (info-only)",
|
|
768
|
+
hint: !remoteUrl ? "No remote URL configured yet" : remoteProbe?.ok ? `Gateway reachable (${remoteUrl})` : `Configured but unreachable (${remoteUrl})`
|
|
769
|
+
}]
|
|
770
|
+
}));
|
|
771
|
+
if (mode === "remote") {
|
|
772
|
+
let nextConfig = await promptRemoteGatewayConfig(baseConfig, prompter);
|
|
773
|
+
nextConfig = applyWizardMetadata(nextConfig, {
|
|
774
|
+
command: "onboard",
|
|
775
|
+
mode
|
|
776
|
+
});
|
|
777
|
+
await writeConfigFile(nextConfig);
|
|
778
|
+
logConfigUpdated(runtime);
|
|
779
|
+
await prompter.outro("Remote gateway configured.");
|
|
780
|
+
return;
|
|
781
|
+
}
|
|
782
|
+
const workspaceDir = resolveUserPath((opts.workspace ?? (flow === "quickstart" ? baseConfig.agents?.defaults?.workspace ?? DEFAULT_WORKSPACE : await prompter.text({
|
|
783
|
+
message: "Workspace directory",
|
|
784
|
+
initialValue: baseConfig.agents?.defaults?.workspace ?? DEFAULT_WORKSPACE
|
|
785
|
+
}))).trim() || DEFAULT_WORKSPACE);
|
|
786
|
+
let nextConfig = {
|
|
787
|
+
...baseConfig,
|
|
788
|
+
agents: {
|
|
789
|
+
...baseConfig.agents,
|
|
790
|
+
defaults: {
|
|
791
|
+
...baseConfig.agents?.defaults,
|
|
792
|
+
workspace: workspaceDir
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
gateway: {
|
|
796
|
+
...baseConfig.gateway,
|
|
797
|
+
mode: "local"
|
|
798
|
+
}
|
|
799
|
+
};
|
|
800
|
+
const authStore = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false });
|
|
801
|
+
const authChoiceFromPrompt = opts.authChoice === void 0;
|
|
802
|
+
const authChoice = opts.authChoice ?? await promptAuthChoiceGrouped({
|
|
803
|
+
prompter,
|
|
804
|
+
store: authStore,
|
|
805
|
+
includeSkip: true
|
|
806
|
+
});
|
|
807
|
+
nextConfig = (await applyAuthChoice({
|
|
808
|
+
authChoice,
|
|
809
|
+
config: nextConfig,
|
|
810
|
+
prompter,
|
|
811
|
+
runtime,
|
|
812
|
+
setDefaultModel: true,
|
|
813
|
+
opts: {
|
|
814
|
+
tokenProvider: opts.tokenProvider,
|
|
815
|
+
token: opts.authChoice === "apiKey" && opts.token ? opts.token : void 0
|
|
816
|
+
}
|
|
817
|
+
})).config;
|
|
818
|
+
if (authChoiceFromPrompt) {
|
|
819
|
+
const modelSelection = await promptDefaultModel({
|
|
820
|
+
config: nextConfig,
|
|
821
|
+
prompter,
|
|
822
|
+
allowKeep: true,
|
|
823
|
+
ignoreAllowlist: true,
|
|
824
|
+
preferredProvider: resolvePreferredProviderForAuthChoice(authChoice)
|
|
825
|
+
});
|
|
826
|
+
if (modelSelection.model) nextConfig = applyPrimaryModel(nextConfig, modelSelection.model);
|
|
827
|
+
}
|
|
828
|
+
await warnIfModelConfigLooksOff(nextConfig, prompter);
|
|
829
|
+
const gateway = await configureGatewayForOnboarding({
|
|
830
|
+
flow,
|
|
831
|
+
baseConfig,
|
|
832
|
+
nextConfig,
|
|
833
|
+
localPort,
|
|
834
|
+
quickstartGateway,
|
|
835
|
+
prompter,
|
|
836
|
+
runtime
|
|
837
|
+
});
|
|
838
|
+
nextConfig = gateway.nextConfig;
|
|
839
|
+
const settings = gateway.settings;
|
|
840
|
+
if (opts.skipChannels ?? opts.skipProviders) await prompter.note("Skipping channel setup.", "Channels");
|
|
841
|
+
else {
|
|
842
|
+
const quickstartAllowFromChannels = flow === "quickstart" ? listChannelPlugins().filter((plugin) => plugin.meta.quickstartAllowFrom).map((plugin) => plugin.id) : [];
|
|
843
|
+
nextConfig = await setupChannels(nextConfig, runtime, prompter, {
|
|
844
|
+
allowSignalInstall: true,
|
|
845
|
+
forceAllowFromChannels: quickstartAllowFromChannels,
|
|
846
|
+
skipDmPolicyPrompt: flow === "quickstart",
|
|
847
|
+
skipConfirm: flow === "quickstart",
|
|
848
|
+
quickstartDefaults: flow === "quickstart"
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
await writeConfigFile(nextConfig);
|
|
852
|
+
logConfigUpdated(runtime);
|
|
853
|
+
await ensureWorkspaceAndSessions(workspaceDir, runtime, { skipBootstrap: Boolean(nextConfig.agents?.defaults?.skipBootstrap) });
|
|
854
|
+
if (opts.skipSkills) await prompter.note("Skipping skills setup.", "Skills");
|
|
855
|
+
else nextConfig = await setupSkills(nextConfig, workspaceDir, runtime, prompter);
|
|
856
|
+
nextConfig = await setupInternalHooks(nextConfig, runtime, prompter);
|
|
857
|
+
nextConfig = applyWizardMetadata(nextConfig, {
|
|
858
|
+
command: "onboard",
|
|
859
|
+
mode
|
|
860
|
+
});
|
|
861
|
+
await writeConfigFile(nextConfig);
|
|
862
|
+
const { launchedTui } = await finalizeOnboardingWizard({
|
|
863
|
+
flow,
|
|
864
|
+
opts,
|
|
865
|
+
baseConfig,
|
|
866
|
+
nextConfig,
|
|
867
|
+
workspaceDir,
|
|
868
|
+
settings,
|
|
869
|
+
prompter,
|
|
870
|
+
runtime
|
|
871
|
+
});
|
|
872
|
+
if (launchedTui) return;
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
//#endregion
|
|
876
|
+
//#region src/agents/identity-file.ts
|
|
877
|
+
const IDENTITY_PLACEHOLDER_VALUES = new Set([
|
|
878
|
+
"pick something you like",
|
|
879
|
+
"ai? robot? familiar? ghost in the machine? something weirder?",
|
|
880
|
+
"how do you come across? sharp? warm? chaotic? calm?",
|
|
881
|
+
"your signature - pick one that feels right",
|
|
882
|
+
"workspace-relative path, http(s) url, or data uri"
|
|
883
|
+
]);
|
|
884
|
+
function normalizeIdentityValue(value) {
|
|
885
|
+
let normalized = value.trim();
|
|
886
|
+
normalized = normalized.replace(/^[*_]+|[*_]+$/g, "").trim();
|
|
887
|
+
if (normalized.startsWith("(") && normalized.endsWith(")")) normalized = normalized.slice(1, -1).trim();
|
|
888
|
+
normalized = normalized.replace(/[\u2013\u2014]/g, "-");
|
|
889
|
+
normalized = normalized.replace(/\s+/g, " ").toLowerCase();
|
|
890
|
+
return normalized;
|
|
891
|
+
}
|
|
892
|
+
function isIdentityPlaceholder(value) {
|
|
893
|
+
const normalized = normalizeIdentityValue(value);
|
|
894
|
+
return IDENTITY_PLACEHOLDER_VALUES.has(normalized);
|
|
895
|
+
}
|
|
896
|
+
function parseIdentityMarkdown(content) {
|
|
897
|
+
const identity = {};
|
|
898
|
+
const lines = content.split(/\r?\n/);
|
|
899
|
+
for (const line of lines) {
|
|
900
|
+
const cleaned = line.trim().replace(/^\s*-\s*/, "");
|
|
901
|
+
const colonIndex = cleaned.indexOf(":");
|
|
902
|
+
if (colonIndex === -1) continue;
|
|
903
|
+
const label = cleaned.slice(0, colonIndex).replace(/[*_]/g, "").trim().toLowerCase();
|
|
904
|
+
const value = cleaned.slice(colonIndex + 1).replace(/^[*_]+|[*_]+$/g, "").trim();
|
|
905
|
+
if (!value) continue;
|
|
906
|
+
if (isIdentityPlaceholder(value)) continue;
|
|
907
|
+
if (label === "name") identity.name = value;
|
|
908
|
+
if (label === "emoji") identity.emoji = value;
|
|
909
|
+
if (label === "creature") identity.creature = value;
|
|
910
|
+
if (label === "vibe") identity.vibe = value;
|
|
911
|
+
if (label === "theme") identity.theme = value;
|
|
912
|
+
if (label === "avatar") identity.avatar = value;
|
|
913
|
+
}
|
|
914
|
+
return identity;
|
|
915
|
+
}
|
|
916
|
+
function identityHasValues(identity) {
|
|
917
|
+
return Boolean(identity.name || identity.emoji || identity.theme || identity.creature || identity.vibe || identity.avatar);
|
|
918
|
+
}
|
|
919
|
+
function loadIdentityFromFile(identityPath) {
|
|
920
|
+
try {
|
|
921
|
+
const parsed = parseIdentityMarkdown(fs.readFileSync(identityPath, "utf-8"));
|
|
922
|
+
if (!identityHasValues(parsed)) return null;
|
|
923
|
+
return parsed;
|
|
924
|
+
} catch {
|
|
925
|
+
return null;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
function loadAgentIdentityFromWorkspace(workspace) {
|
|
929
|
+
return loadIdentityFromFile(path.join(workspace, DEFAULT_IDENTITY_FILENAME));
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
//#endregion
|
|
933
|
+
//#region src/commands/agents.config.ts
|
|
934
|
+
function listAgentEntries(cfg) {
|
|
935
|
+
const list = cfg.agents?.list;
|
|
936
|
+
if (!Array.isArray(list)) return [];
|
|
937
|
+
return list.filter((entry) => Boolean(entry && typeof entry === "object"));
|
|
938
|
+
}
|
|
939
|
+
function findAgentEntryIndex(list, agentId) {
|
|
940
|
+
const id = normalizeAgentId(agentId);
|
|
941
|
+
return list.findIndex((entry) => normalizeAgentId(entry.id) === id);
|
|
942
|
+
}
|
|
943
|
+
function resolveAgentName(cfg, agentId) {
|
|
944
|
+
return listAgentEntries(cfg).find((agent) => normalizeAgentId(agent.id) === normalizeAgentId(agentId))?.name?.trim() || void 0;
|
|
945
|
+
}
|
|
946
|
+
function resolveAgentModel(cfg, agentId) {
|
|
947
|
+
const entry = listAgentEntries(cfg).find((agent) => normalizeAgentId(agent.id) === normalizeAgentId(agentId));
|
|
948
|
+
if (entry?.model) {
|
|
949
|
+
if (typeof entry.model === "string" && entry.model.trim()) return entry.model.trim();
|
|
950
|
+
if (typeof entry.model === "object") {
|
|
951
|
+
const primary = entry.model.primary?.trim();
|
|
952
|
+
if (primary) return primary;
|
|
953
|
+
}
|
|
954
|
+
}
|
|
955
|
+
const raw = cfg.agents?.defaults?.model;
|
|
956
|
+
if (typeof raw === "string") return raw;
|
|
957
|
+
return raw?.primary?.trim() || void 0;
|
|
958
|
+
}
|
|
959
|
+
function loadAgentIdentity(workspace) {
|
|
960
|
+
const parsed = loadAgentIdentityFromWorkspace(workspace);
|
|
961
|
+
if (!parsed) return null;
|
|
962
|
+
return identityHasValues(parsed) ? parsed : null;
|
|
963
|
+
}
|
|
964
|
+
function buildAgentSummaries(cfg) {
|
|
965
|
+
const defaultAgentId = normalizeAgentId(resolveDefaultAgentId(cfg));
|
|
966
|
+
const configuredAgents = listAgentEntries(cfg);
|
|
967
|
+
const orderedIds = configuredAgents.length > 0 ? configuredAgents.map((agent) => normalizeAgentId(agent.id)) : [defaultAgentId];
|
|
968
|
+
const bindingCounts = /* @__PURE__ */ new Map();
|
|
969
|
+
for (const binding of cfg.bindings ?? []) {
|
|
970
|
+
const agentId = normalizeAgentId(binding.agentId);
|
|
971
|
+
bindingCounts.set(agentId, (bindingCounts.get(agentId) ?? 0) + 1);
|
|
972
|
+
}
|
|
973
|
+
return orderedIds.filter((id, index) => orderedIds.indexOf(id) === index).map((id) => {
|
|
974
|
+
const workspace = resolveAgentWorkspaceDir(cfg, id);
|
|
975
|
+
const identity = loadAgentIdentity(workspace);
|
|
976
|
+
const configIdentity = configuredAgents.find((agent) => normalizeAgentId(agent.id) === id)?.identity;
|
|
977
|
+
const identityName = identity?.name ?? configIdentity?.name?.trim();
|
|
978
|
+
const identityEmoji = identity?.emoji ?? configIdentity?.emoji?.trim();
|
|
979
|
+
const identitySource = identity ? "identity" : configIdentity && (identityName || identityEmoji) ? "config" : void 0;
|
|
980
|
+
return {
|
|
981
|
+
id,
|
|
982
|
+
name: resolveAgentName(cfg, id),
|
|
983
|
+
identityName,
|
|
984
|
+
identityEmoji,
|
|
985
|
+
identitySource,
|
|
986
|
+
workspace,
|
|
987
|
+
agentDir: resolveAgentDir(cfg, id),
|
|
988
|
+
model: resolveAgentModel(cfg, id),
|
|
989
|
+
bindings: bindingCounts.get(id) ?? 0,
|
|
990
|
+
isDefault: id === defaultAgentId
|
|
991
|
+
};
|
|
992
|
+
});
|
|
993
|
+
}
|
|
994
|
+
function applyAgentConfig(cfg, params) {
|
|
995
|
+
const agentId = normalizeAgentId(params.agentId);
|
|
996
|
+
const name = params.name?.trim();
|
|
997
|
+
const list = listAgentEntries(cfg);
|
|
998
|
+
const index = findAgentEntryIndex(list, agentId);
|
|
999
|
+
const nextEntry = {
|
|
1000
|
+
...index >= 0 ? list[index] : { id: agentId },
|
|
1001
|
+
...name ? { name } : {},
|
|
1002
|
+
...params.workspace ? { workspace: params.workspace } : {},
|
|
1003
|
+
...params.agentDir ? { agentDir: params.agentDir } : {},
|
|
1004
|
+
...params.model ? { model: params.model } : {}
|
|
1005
|
+
};
|
|
1006
|
+
const nextList = [...list];
|
|
1007
|
+
if (index >= 0) nextList[index] = nextEntry;
|
|
1008
|
+
else {
|
|
1009
|
+
if (nextList.length === 0 && agentId !== normalizeAgentId(resolveDefaultAgentId(cfg))) nextList.push({ id: resolveDefaultAgentId(cfg) });
|
|
1010
|
+
nextList.push(nextEntry);
|
|
1011
|
+
}
|
|
1012
|
+
return {
|
|
1013
|
+
...cfg,
|
|
1014
|
+
agents: {
|
|
1015
|
+
...cfg.agents,
|
|
1016
|
+
list: nextList
|
|
1017
|
+
}
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
function pruneAgentConfig(cfg, agentId) {
|
|
1021
|
+
const id = normalizeAgentId(agentId);
|
|
1022
|
+
const nextAgentsList = listAgentEntries(cfg).filter((entry) => normalizeAgentId(entry.id) !== id);
|
|
1023
|
+
const nextAgents = nextAgentsList.length > 0 ? nextAgentsList : void 0;
|
|
1024
|
+
const bindings = cfg.bindings ?? [];
|
|
1025
|
+
const filteredBindings = bindings.filter((binding) => normalizeAgentId(binding.agentId) !== id);
|
|
1026
|
+
const allow = cfg.tools?.agentToAgent?.allow ?? [];
|
|
1027
|
+
const filteredAllow = allow.filter((entry) => entry !== id);
|
|
1028
|
+
const nextAgentsConfig = cfg.agents ? {
|
|
1029
|
+
...cfg.agents,
|
|
1030
|
+
list: nextAgents
|
|
1031
|
+
} : nextAgents ? { list: nextAgents } : void 0;
|
|
1032
|
+
const nextTools = cfg.tools?.agentToAgent ? {
|
|
1033
|
+
...cfg.tools,
|
|
1034
|
+
agentToAgent: {
|
|
1035
|
+
...cfg.tools.agentToAgent,
|
|
1036
|
+
allow: filteredAllow.length > 0 ? filteredAllow : void 0
|
|
1037
|
+
}
|
|
1038
|
+
} : cfg.tools;
|
|
1039
|
+
return {
|
|
1040
|
+
config: {
|
|
1041
|
+
...cfg,
|
|
1042
|
+
agents: nextAgentsConfig,
|
|
1043
|
+
bindings: filteredBindings.length > 0 ? filteredBindings : void 0,
|
|
1044
|
+
tools: nextTools
|
|
1045
|
+
},
|
|
1046
|
+
removedBindings: bindings.length - filteredBindings.length,
|
|
1047
|
+
removedAllow: allow.length - filteredAllow.length
|
|
1048
|
+
};
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
//#endregion
|
|
1052
|
+
//#region src/memory/status-format.ts
|
|
1053
|
+
function resolveMemoryVectorState(vector) {
|
|
1054
|
+
if (!vector.enabled) return {
|
|
1055
|
+
tone: "muted",
|
|
1056
|
+
state: "disabled"
|
|
1057
|
+
};
|
|
1058
|
+
if (vector.available === true) return {
|
|
1059
|
+
tone: "ok",
|
|
1060
|
+
state: "ready"
|
|
1061
|
+
};
|
|
1062
|
+
if (vector.available === false) return {
|
|
1063
|
+
tone: "warn",
|
|
1064
|
+
state: "unavailable"
|
|
1065
|
+
};
|
|
1066
|
+
return {
|
|
1067
|
+
tone: "muted",
|
|
1068
|
+
state: "unknown"
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
function resolveMemoryFtsState(fts) {
|
|
1072
|
+
if (!fts.enabled) return {
|
|
1073
|
+
tone: "muted",
|
|
1074
|
+
state: "disabled"
|
|
1075
|
+
};
|
|
1076
|
+
return fts.available ? {
|
|
1077
|
+
tone: "ok",
|
|
1078
|
+
state: "ready"
|
|
1079
|
+
} : {
|
|
1080
|
+
tone: "warn",
|
|
1081
|
+
state: "unavailable"
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
function resolveMemoryCacheSummary(cache) {
|
|
1085
|
+
if (!cache.enabled) return {
|
|
1086
|
+
tone: "muted",
|
|
1087
|
+
text: "cache off"
|
|
1088
|
+
};
|
|
1089
|
+
return {
|
|
1090
|
+
tone: "ok",
|
|
1091
|
+
text: `cache on${typeof cache.entries === "number" ? ` (${cache.entries})` : ""}`
|
|
1092
|
+
};
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
//#endregion
|
|
1096
|
+
//#region src/infra/os-summary.ts
|
|
1097
|
+
function safeTrim(value) {
|
|
1098
|
+
return typeof value === "string" ? value.trim() : "";
|
|
1099
|
+
}
|
|
1100
|
+
function macosVersion() {
|
|
1101
|
+
return safeTrim(spawnSync("sw_vers", ["-productVersion"], { encoding: "utf-8" }).stdout) || os.release();
|
|
1102
|
+
}
|
|
1103
|
+
function resolveOsSummary() {
|
|
1104
|
+
const platform = os.platform();
|
|
1105
|
+
const release = os.release();
|
|
1106
|
+
const arch = os.arch();
|
|
1107
|
+
return {
|
|
1108
|
+
platform,
|
|
1109
|
+
arch,
|
|
1110
|
+
release,
|
|
1111
|
+
label: (() => {
|
|
1112
|
+
if (platform === "darwin") return `macos ${macosVersion()} (${arch})`;
|
|
1113
|
+
if (platform === "win32") return `windows ${release} (${arch})`;
|
|
1114
|
+
return `${platform} ${release} (${arch})`;
|
|
1115
|
+
})()
|
|
1116
|
+
};
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
//#endregion
|
|
1120
|
+
//#region src/commands/status-all/agents.ts
|
|
1121
|
+
async function fileExists$1(p) {
|
|
1122
|
+
try {
|
|
1123
|
+
await fs$1.access(p);
|
|
1124
|
+
return true;
|
|
1125
|
+
} catch {
|
|
1126
|
+
return false;
|
|
1127
|
+
}
|
|
1128
|
+
}
|
|
1129
|
+
async function getAgentLocalStatuses$1(cfg) {
|
|
1130
|
+
const agentList = listAgentsForGateway(cfg);
|
|
1131
|
+
const now = Date.now();
|
|
1132
|
+
const agents = await Promise.all(agentList.agents.map(async (agent) => {
|
|
1133
|
+
const workspaceDir = (() => {
|
|
1134
|
+
try {
|
|
1135
|
+
return resolveAgentWorkspaceDir(cfg, agent.id);
|
|
1136
|
+
} catch {
|
|
1137
|
+
return null;
|
|
1138
|
+
}
|
|
1139
|
+
})();
|
|
1140
|
+
const bootstrapPending = workspaceDir != null ? await fileExists$1(path.join(workspaceDir, "BOOTSTRAP.md")) : null;
|
|
1141
|
+
const sessionsPath = resolveStorePath(cfg.session?.store, { agentId: agent.id });
|
|
1142
|
+
const store = (() => {
|
|
1143
|
+
try {
|
|
1144
|
+
return loadSessionStore(sessionsPath);
|
|
1145
|
+
} catch {
|
|
1146
|
+
return {};
|
|
1147
|
+
}
|
|
1148
|
+
})();
|
|
1149
|
+
const updatedAt = Object.values(store).reduce((max, entry) => Math.max(max, entry?.updatedAt ?? 0), 0);
|
|
1150
|
+
const lastUpdatedAt = updatedAt > 0 ? updatedAt : null;
|
|
1151
|
+
const lastActiveAgeMs = lastUpdatedAt ? now - lastUpdatedAt : null;
|
|
1152
|
+
const sessionsCount = Object.keys(store).filter((k) => k !== "global" && k !== "unknown").length;
|
|
1153
|
+
return {
|
|
1154
|
+
id: agent.id,
|
|
1155
|
+
name: agent.name,
|
|
1156
|
+
workspaceDir,
|
|
1157
|
+
bootstrapPending,
|
|
1158
|
+
sessionsPath,
|
|
1159
|
+
sessionsCount,
|
|
1160
|
+
lastUpdatedAt,
|
|
1161
|
+
lastActiveAgeMs
|
|
1162
|
+
};
|
|
1163
|
+
}));
|
|
1164
|
+
const totalSessions = agents.reduce((sum, a) => sum + a.sessionsCount, 0);
|
|
1165
|
+
const bootstrapPendingCount = agents.reduce((sum, a) => sum + (a.bootstrapPending ? 1 : 0), 0);
|
|
1166
|
+
return {
|
|
1167
|
+
defaultId: agentList.defaultId,
|
|
1168
|
+
agents,
|
|
1169
|
+
totalSessions,
|
|
1170
|
+
bootstrapPendingCount
|
|
1171
|
+
};
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
//#endregion
|
|
1175
|
+
//#region src/commands/status-all/channels.ts
|
|
1176
|
+
const asRecord = (value) => value && typeof value === "object" ? value : {};
|
|
1177
|
+
function summarizeSources(sources) {
|
|
1178
|
+
const counts = /* @__PURE__ */ new Map();
|
|
1179
|
+
for (const s of sources) {
|
|
1180
|
+
const key = s?.trim() ? s.trim() : "unknown";
|
|
1181
|
+
counts.set(key, (counts.get(key) ?? 0) + 1);
|
|
1182
|
+
}
|
|
1183
|
+
const parts = [...counts.entries()].toSorted((a, b) => b[1] - a[1]).map(([key, n]) => `${key}${n > 1 ? `×${n}` : ""}`);
|
|
1184
|
+
return {
|
|
1185
|
+
label: parts.length > 0 ? parts.join("+") : "unknown",
|
|
1186
|
+
parts
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
function existsSyncMaybe(p) {
|
|
1190
|
+
const path = p?.trim() || "";
|
|
1191
|
+
if (!path) return null;
|
|
1192
|
+
try {
|
|
1193
|
+
return fs.existsSync(path);
|
|
1194
|
+
} catch {
|
|
1195
|
+
return null;
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
function formatTokenHint(token, opts) {
|
|
1199
|
+
const t = token.trim();
|
|
1200
|
+
if (!t) return "empty";
|
|
1201
|
+
if (!opts.showSecrets) return `sha256:${sha256HexPrefix(t, 8)} · len ${t.length}`;
|
|
1202
|
+
const head = t.slice(0, 4);
|
|
1203
|
+
const tail = t.slice(-4);
|
|
1204
|
+
if (t.length <= 10) return `${t} · len ${t.length}`;
|
|
1205
|
+
return `${head}…${tail} · len ${t.length}`;
|
|
1206
|
+
}
|
|
1207
|
+
const formatAccountLabel = (params) => {
|
|
1208
|
+
const base = params.accountId || "default";
|
|
1209
|
+
if (params.name?.trim()) return `${base} (${params.name.trim()})`;
|
|
1210
|
+
return base;
|
|
1211
|
+
};
|
|
1212
|
+
const resolveAccountEnabled = (plugin, account, cfg) => {
|
|
1213
|
+
if (plugin.config.isEnabled) return plugin.config.isEnabled(account, cfg);
|
|
1214
|
+
return asRecord(account).enabled !== false;
|
|
1215
|
+
};
|
|
1216
|
+
const resolveAccountConfigured = async (plugin, account, cfg) => {
|
|
1217
|
+
if (plugin.config.isConfigured) return await plugin.config.isConfigured(account, cfg);
|
|
1218
|
+
return asRecord(account).configured !== false;
|
|
1219
|
+
};
|
|
1220
|
+
const buildAccountSnapshot = (params) => {
|
|
1221
|
+
const described = params.plugin.config.describeAccount?.(params.account, params.cfg);
|
|
1222
|
+
return {
|
|
1223
|
+
enabled: params.enabled,
|
|
1224
|
+
configured: params.configured,
|
|
1225
|
+
...described,
|
|
1226
|
+
accountId: params.accountId
|
|
1227
|
+
};
|
|
1228
|
+
};
|
|
1229
|
+
const formatAllowFrom = (params) => {
|
|
1230
|
+
if (params.plugin.config.formatAllowFrom) return params.plugin.config.formatAllowFrom({
|
|
1231
|
+
cfg: params.cfg,
|
|
1232
|
+
accountId: params.accountId,
|
|
1233
|
+
allowFrom: params.allowFrom
|
|
1234
|
+
});
|
|
1235
|
+
return params.allowFrom.map((entry) => String(entry).trim()).filter(Boolean);
|
|
1236
|
+
};
|
|
1237
|
+
const buildAccountNotes = (params) => {
|
|
1238
|
+
const { plugin, cfg, entry } = params;
|
|
1239
|
+
const notes = [];
|
|
1240
|
+
const snapshot = entry.snapshot;
|
|
1241
|
+
if (snapshot.enabled === false) notes.push("disabled");
|
|
1242
|
+
if (snapshot.dmPolicy) notes.push(`dm:${snapshot.dmPolicy}`);
|
|
1243
|
+
if (snapshot.tokenSource && snapshot.tokenSource !== "none") notes.push(`token:${snapshot.tokenSource}`);
|
|
1244
|
+
if (snapshot.botTokenSource && snapshot.botTokenSource !== "none") notes.push(`bot:${snapshot.botTokenSource}`);
|
|
1245
|
+
if (snapshot.appTokenSource && snapshot.appTokenSource !== "none") notes.push(`app:${snapshot.appTokenSource}`);
|
|
1246
|
+
if (snapshot.baseUrl) notes.push(snapshot.baseUrl);
|
|
1247
|
+
if (snapshot.port != null) notes.push(`port:${snapshot.port}`);
|
|
1248
|
+
if (snapshot.cliPath) notes.push(`cli:${snapshot.cliPath}`);
|
|
1249
|
+
if (snapshot.dbPath) notes.push(`db:${snapshot.dbPath}`);
|
|
1250
|
+
const allowFrom = plugin.config.resolveAllowFrom?.({
|
|
1251
|
+
cfg,
|
|
1252
|
+
accountId: snapshot.accountId
|
|
1253
|
+
}) ?? snapshot.allowFrom;
|
|
1254
|
+
if (allowFrom?.length) {
|
|
1255
|
+
const formatted = formatAllowFrom({
|
|
1256
|
+
plugin,
|
|
1257
|
+
cfg,
|
|
1258
|
+
accountId: snapshot.accountId,
|
|
1259
|
+
allowFrom
|
|
1260
|
+
}).slice(0, 3);
|
|
1261
|
+
if (formatted.length > 0) notes.push(`allow:${formatted.join(",")}`);
|
|
1262
|
+
}
|
|
1263
|
+
return notes;
|
|
1264
|
+
};
|
|
1265
|
+
function resolveLinkFields(summary) {
|
|
1266
|
+
const rec = asRecord(summary);
|
|
1267
|
+
const linked = typeof rec.linked === "boolean" ? rec.linked : null;
|
|
1268
|
+
const authAgeMs = typeof rec.authAgeMs === "number" ? rec.authAgeMs : null;
|
|
1269
|
+
const self = asRecord(rec.self);
|
|
1270
|
+
return {
|
|
1271
|
+
linked,
|
|
1272
|
+
authAgeMs,
|
|
1273
|
+
selfE164: typeof self.e164 === "string" && self.e164.trim() ? self.e164.trim() : null
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
function collectMissingPaths(accounts) {
|
|
1277
|
+
const missing = [];
|
|
1278
|
+
for (const entry of accounts) {
|
|
1279
|
+
const accountRec = asRecord(entry.account);
|
|
1280
|
+
const snapshotRec = asRecord(entry.snapshot);
|
|
1281
|
+
for (const key of [
|
|
1282
|
+
"tokenFile",
|
|
1283
|
+
"botTokenFile",
|
|
1284
|
+
"appTokenFile",
|
|
1285
|
+
"cliPath",
|
|
1286
|
+
"dbPath",
|
|
1287
|
+
"authDir"
|
|
1288
|
+
]) {
|
|
1289
|
+
const raw = accountRec[key] ?? snapshotRec[key];
|
|
1290
|
+
if (existsSyncMaybe(raw) === false) missing.push(String(raw));
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
return missing;
|
|
1294
|
+
}
|
|
1295
|
+
function summarizeTokenConfig(params) {
|
|
1296
|
+
const enabled = params.accounts.filter((a) => a.enabled);
|
|
1297
|
+
if (enabled.length === 0) return {
|
|
1298
|
+
state: null,
|
|
1299
|
+
detail: null
|
|
1300
|
+
};
|
|
1301
|
+
const accountRecs = enabled.map((a) => asRecord(a.account));
|
|
1302
|
+
const hasBotOrAppTokenFields = accountRecs.some((r) => "botToken" in r || "appToken" in r);
|
|
1303
|
+
const hasTokenField = accountRecs.some((r) => "token" in r);
|
|
1304
|
+
if (!hasBotOrAppTokenFields && !hasTokenField) return {
|
|
1305
|
+
state: null,
|
|
1306
|
+
detail: null
|
|
1307
|
+
};
|
|
1308
|
+
if (hasBotOrAppTokenFields) {
|
|
1309
|
+
const ready = enabled.filter((a) => {
|
|
1310
|
+
const rec = asRecord(a.account);
|
|
1311
|
+
const bot = typeof rec.botToken === "string" ? rec.botToken.trim() : "";
|
|
1312
|
+
const app = typeof rec.appToken === "string" ? rec.appToken.trim() : "";
|
|
1313
|
+
return Boolean(bot) && Boolean(app);
|
|
1314
|
+
});
|
|
1315
|
+
const partial = enabled.filter((a) => {
|
|
1316
|
+
const rec = asRecord(a.account);
|
|
1317
|
+
const bot = typeof rec.botToken === "string" ? rec.botToken.trim() : "";
|
|
1318
|
+
const app = typeof rec.appToken === "string" ? rec.appToken.trim() : "";
|
|
1319
|
+
const hasBot = Boolean(bot);
|
|
1320
|
+
const hasApp = Boolean(app);
|
|
1321
|
+
return hasBot && !hasApp || !hasBot && hasApp;
|
|
1322
|
+
});
|
|
1323
|
+
if (partial.length > 0) return {
|
|
1324
|
+
state: "warn",
|
|
1325
|
+
detail: `partial tokens (need bot+app) · accounts ${partial.length}`
|
|
1326
|
+
};
|
|
1327
|
+
if (ready.length === 0) return {
|
|
1328
|
+
state: "setup",
|
|
1329
|
+
detail: "no tokens (need bot+app)"
|
|
1330
|
+
};
|
|
1331
|
+
const botSources = summarizeSources(ready.map((a) => a.snapshot.botTokenSource ?? "none"));
|
|
1332
|
+
const appSources = summarizeSources(ready.map((a) => a.snapshot.appTokenSource ?? "none"));
|
|
1333
|
+
const sample = ready[0]?.account ? asRecord(ready[0].account) : {};
|
|
1334
|
+
const botToken = typeof sample.botToken === "string" ? sample.botToken : "";
|
|
1335
|
+
const appToken = typeof sample.appToken === "string" ? sample.appToken : "";
|
|
1336
|
+
const botHint = botToken.trim() ? formatTokenHint(botToken, { showSecrets: params.showSecrets }) : "";
|
|
1337
|
+
const appHint = appToken.trim() ? formatTokenHint(appToken, { showSecrets: params.showSecrets }) : "";
|
|
1338
|
+
const hint = botHint || appHint ? ` (bot ${botHint || "?"}, app ${appHint || "?"})` : "";
|
|
1339
|
+
return {
|
|
1340
|
+
state: "ok",
|
|
1341
|
+
detail: `tokens ok (bot ${botSources.label}, app ${appSources.label})${hint} · accounts ${ready.length}/${enabled.length || 1}`
|
|
1342
|
+
};
|
|
1343
|
+
}
|
|
1344
|
+
const ready = enabled.filter((a) => {
|
|
1345
|
+
const rec = asRecord(a.account);
|
|
1346
|
+
return typeof rec.token === "string" ? Boolean(rec.token.trim()) : false;
|
|
1347
|
+
});
|
|
1348
|
+
if (ready.length === 0) return {
|
|
1349
|
+
state: "setup",
|
|
1350
|
+
detail: "no token"
|
|
1351
|
+
};
|
|
1352
|
+
const sources = summarizeSources(ready.map((a) => a.snapshot.tokenSource));
|
|
1353
|
+
const sample = ready[0]?.account ? asRecord(ready[0].account) : {};
|
|
1354
|
+
const token = typeof sample.token === "string" ? sample.token : "";
|
|
1355
|
+
const hint = token.trim() ? ` (${formatTokenHint(token, { showSecrets: params.showSecrets })})` : "";
|
|
1356
|
+
return {
|
|
1357
|
+
state: "ok",
|
|
1358
|
+
detail: `token ${sources.label}${hint} · accounts ${ready.length}/${enabled.length || 1}`
|
|
1359
|
+
};
|
|
1360
|
+
}
|
|
1361
|
+
async function buildChannelsTable(cfg, opts) {
|
|
1362
|
+
const showSecrets = opts?.showSecrets === true;
|
|
1363
|
+
const rows = [];
|
|
1364
|
+
const details = [];
|
|
1365
|
+
for (const plugin of listChannelPlugins()) {
|
|
1366
|
+
const accountIds = plugin.config.listAccountIds(cfg);
|
|
1367
|
+
const defaultAccountId = resolveChannelDefaultAccountId({
|
|
1368
|
+
plugin,
|
|
1369
|
+
cfg,
|
|
1370
|
+
accountIds
|
|
1371
|
+
});
|
|
1372
|
+
const resolvedAccountIds = accountIds.length > 0 ? accountIds : [defaultAccountId];
|
|
1373
|
+
const accounts = [];
|
|
1374
|
+
for (const accountId of resolvedAccountIds) {
|
|
1375
|
+
const account = plugin.config.resolveAccount(cfg, accountId);
|
|
1376
|
+
const enabled = resolveAccountEnabled(plugin, account, cfg);
|
|
1377
|
+
const configured = await resolveAccountConfigured(plugin, account, cfg);
|
|
1378
|
+
const snapshot = buildAccountSnapshot({
|
|
1379
|
+
plugin,
|
|
1380
|
+
cfg,
|
|
1381
|
+
accountId,
|
|
1382
|
+
account,
|
|
1383
|
+
enabled,
|
|
1384
|
+
configured
|
|
1385
|
+
});
|
|
1386
|
+
accounts.push({
|
|
1387
|
+
accountId,
|
|
1388
|
+
account,
|
|
1389
|
+
enabled,
|
|
1390
|
+
configured,
|
|
1391
|
+
snapshot
|
|
1392
|
+
});
|
|
1393
|
+
}
|
|
1394
|
+
const anyEnabled = accounts.some((a) => a.enabled);
|
|
1395
|
+
const enabledAccounts = accounts.filter((a) => a.enabled);
|
|
1396
|
+
const configuredAccounts = enabledAccounts.filter((a) => a.configured);
|
|
1397
|
+
const defaultEntry = accounts.find((a) => a.accountId === defaultAccountId) ?? accounts[0];
|
|
1398
|
+
const link = resolveLinkFields(plugin.status?.buildChannelSummary ? await plugin.status.buildChannelSummary({
|
|
1399
|
+
account: defaultEntry?.account ?? {},
|
|
1400
|
+
cfg,
|
|
1401
|
+
defaultAccountId,
|
|
1402
|
+
snapshot: defaultEntry?.snapshot ?? { accountId: defaultAccountId }
|
|
1403
|
+
}) : void 0);
|
|
1404
|
+
const missingPaths = collectMissingPaths(enabledAccounts);
|
|
1405
|
+
const tokenSummary = summarizeTokenConfig({
|
|
1406
|
+
plugin,
|
|
1407
|
+
cfg,
|
|
1408
|
+
accounts,
|
|
1409
|
+
showSecrets
|
|
1410
|
+
});
|
|
1411
|
+
const issues = plugin.status?.collectStatusIssues ? plugin.status.collectStatusIssues(accounts.map((a) => a.snapshot)) : [];
|
|
1412
|
+
const label = plugin.meta.label ?? plugin.id;
|
|
1413
|
+
const state = (() => {
|
|
1414
|
+
if (!anyEnabled) return "off";
|
|
1415
|
+
if (missingPaths.length > 0) return "warn";
|
|
1416
|
+
if (issues.length > 0) return "warn";
|
|
1417
|
+
if (link.linked === false) return "setup";
|
|
1418
|
+
if (tokenSummary.state) return tokenSummary.state;
|
|
1419
|
+
if (link.linked === true) return "ok";
|
|
1420
|
+
if (configuredAccounts.length > 0) return "ok";
|
|
1421
|
+
return "setup";
|
|
1422
|
+
})();
|
|
1423
|
+
const detail = (() => {
|
|
1424
|
+
if (!anyEnabled) {
|
|
1425
|
+
if (!defaultEntry) return "disabled";
|
|
1426
|
+
return plugin.config.disabledReason?.(defaultEntry.account, cfg) ?? "disabled";
|
|
1427
|
+
}
|
|
1428
|
+
if (missingPaths.length > 0) return `missing file (${missingPaths[0]})`;
|
|
1429
|
+
if (issues.length > 0) return issues[0]?.message ?? "misconfigured";
|
|
1430
|
+
if (link.linked !== null) {
|
|
1431
|
+
const base = link.linked ? "linked" : "not linked";
|
|
1432
|
+
const extra = [];
|
|
1433
|
+
if (link.linked && link.selfE164) extra.push(link.selfE164);
|
|
1434
|
+
if (link.linked && link.authAgeMs != null && link.authAgeMs >= 0) extra.push(`auth ${formatAge$1(link.authAgeMs)}`);
|
|
1435
|
+
if (accounts.length > 1 || plugin.meta.forceAccountBinding) extra.push(`accounts ${accounts.length || 1}`);
|
|
1436
|
+
return extra.length > 0 ? `${base} · ${extra.join(" · ")}` : base;
|
|
1437
|
+
}
|
|
1438
|
+
if (tokenSummary.detail) return tokenSummary.detail;
|
|
1439
|
+
if (configuredAccounts.length > 0) {
|
|
1440
|
+
const head = "configured";
|
|
1441
|
+
if (accounts.length <= 1 && !plugin.meta.forceAccountBinding) return head;
|
|
1442
|
+
return `${head} · accounts ${configuredAccounts.length}/${enabledAccounts.length || 1}`;
|
|
1443
|
+
}
|
|
1444
|
+
return (defaultEntry && plugin.config.unconfiguredReason ? plugin.config.unconfiguredReason(defaultEntry.account, cfg) : null) ?? "not configured";
|
|
1445
|
+
})();
|
|
1446
|
+
rows.push({
|
|
1447
|
+
id: plugin.id,
|
|
1448
|
+
label,
|
|
1449
|
+
enabled: anyEnabled,
|
|
1450
|
+
state,
|
|
1451
|
+
detail
|
|
1452
|
+
});
|
|
1453
|
+
if (configuredAccounts.length > 0) details.push({
|
|
1454
|
+
title: `${label} accounts`,
|
|
1455
|
+
columns: [
|
|
1456
|
+
"Account",
|
|
1457
|
+
"Status",
|
|
1458
|
+
"Notes"
|
|
1459
|
+
],
|
|
1460
|
+
rows: configuredAccounts.map((entry) => {
|
|
1461
|
+
const notes = buildAccountNotes({
|
|
1462
|
+
plugin,
|
|
1463
|
+
cfg,
|
|
1464
|
+
entry
|
|
1465
|
+
});
|
|
1466
|
+
return {
|
|
1467
|
+
Account: formatAccountLabel({
|
|
1468
|
+
accountId: entry.accountId,
|
|
1469
|
+
name: entry.snapshot.name
|
|
1470
|
+
}),
|
|
1471
|
+
Status: entry.enabled ? "OK" : "WARN",
|
|
1472
|
+
Notes: notes.join(" · ")
|
|
1473
|
+
};
|
|
1474
|
+
})
|
|
1475
|
+
});
|
|
1476
|
+
}
|
|
1477
|
+
return {
|
|
1478
|
+
rows,
|
|
1479
|
+
details
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
//#endregion
|
|
1484
|
+
//#region src/commands/status-all/gateway.ts
|
|
1485
|
+
async function readFileTailLines(filePath, maxLines) {
|
|
1486
|
+
const raw = await fs$1.readFile(filePath, "utf8").catch(() => "");
|
|
1487
|
+
if (!raw.trim()) return [];
|
|
1488
|
+
const lines = raw.replace(/\r/g, "").split("\n");
|
|
1489
|
+
return lines.slice(Math.max(0, lines.length - maxLines)).map((line) => line.trimEnd()).filter((line) => line.trim().length > 0);
|
|
1490
|
+
}
|
|
1491
|
+
function countMatches(haystack, needle) {
|
|
1492
|
+
if (!haystack || !needle) return 0;
|
|
1493
|
+
return haystack.split(needle).length - 1;
|
|
1494
|
+
}
|
|
1495
|
+
function shorten(message, maxLen) {
|
|
1496
|
+
const cleaned = message.replace(/\s+/g, " ").trim();
|
|
1497
|
+
if (cleaned.length <= maxLen) return cleaned;
|
|
1498
|
+
return `${cleaned.slice(0, Math.max(0, maxLen - 1))}…`;
|
|
1499
|
+
}
|
|
1500
|
+
function normalizeGwsLine(line) {
|
|
1501
|
+
return line.replace(/\s+runId=[^\s]+/g, "").replace(/\s+conn=[^\s]+/g, "").replace(/\s+id=[^\s]+/g, "").replace(/\s+error=Error:.*$/g, "").trim();
|
|
1502
|
+
}
|
|
1503
|
+
function consumeJsonBlock(lines, startIndex) {
|
|
1504
|
+
const startLine = lines[startIndex] ?? "";
|
|
1505
|
+
const braceAt = startLine.indexOf("{");
|
|
1506
|
+
if (braceAt < 0) return null;
|
|
1507
|
+
const parts = [startLine.slice(braceAt)];
|
|
1508
|
+
let depth = countMatches(parts[0] ?? "", "{") - countMatches(parts[0] ?? "", "}");
|
|
1509
|
+
let i = startIndex;
|
|
1510
|
+
while (depth > 0 && i + 1 < lines.length) {
|
|
1511
|
+
i += 1;
|
|
1512
|
+
const next = lines[i] ?? "";
|
|
1513
|
+
parts.push(next);
|
|
1514
|
+
depth += countMatches(next, "{") - countMatches(next, "}");
|
|
1515
|
+
}
|
|
1516
|
+
return {
|
|
1517
|
+
json: parts.join("\n"),
|
|
1518
|
+
endIndex: i
|
|
1519
|
+
};
|
|
1520
|
+
}
|
|
1521
|
+
function summarizeLogTail(rawLines, opts) {
|
|
1522
|
+
const maxLines = Math.max(6, opts?.maxLines ?? 26);
|
|
1523
|
+
const out = [];
|
|
1524
|
+
const groups = /* @__PURE__ */ new Map();
|
|
1525
|
+
const addGroup = (key, base) => {
|
|
1526
|
+
const existing = groups.get(key);
|
|
1527
|
+
if (existing) {
|
|
1528
|
+
existing.count += 1;
|
|
1529
|
+
return;
|
|
1530
|
+
}
|
|
1531
|
+
groups.set(key, {
|
|
1532
|
+
count: 1,
|
|
1533
|
+
index: out.length,
|
|
1534
|
+
base
|
|
1535
|
+
});
|
|
1536
|
+
out.push(base);
|
|
1537
|
+
};
|
|
1538
|
+
const addLine = (line) => {
|
|
1539
|
+
const trimmed = line.trimEnd();
|
|
1540
|
+
if (!trimmed) return;
|
|
1541
|
+
out.push(trimmed);
|
|
1542
|
+
};
|
|
1543
|
+
const lines = rawLines.map((line) => line.trimEnd()).filter(Boolean);
|
|
1544
|
+
for (let i = 0; i < lines.length; i += 1) {
|
|
1545
|
+
const line = lines[i] ?? "";
|
|
1546
|
+
const trimmedStart = line.trimStart();
|
|
1547
|
+
if ((trimmedStart.startsWith("\"") || trimmedStart === "}" || trimmedStart === "{" || trimmedStart.startsWith("}") || trimmedStart.startsWith("{")) && !trimmedStart.startsWith("[") && !trimmedStart.startsWith("#")) continue;
|
|
1548
|
+
const tokenRefresh = line.match(/^\[([^\]]+)\]\s+Token refresh failed:\s*(\d+)\s*(\{)?\s*$/);
|
|
1549
|
+
if (tokenRefresh) {
|
|
1550
|
+
const tag = tokenRefresh[1] ?? "unknown";
|
|
1551
|
+
const status = tokenRefresh[2] ?? "unknown";
|
|
1552
|
+
const block = consumeJsonBlock(lines, i);
|
|
1553
|
+
if (block) {
|
|
1554
|
+
i = block.endIndex;
|
|
1555
|
+
const parsed = (() => {
|
|
1556
|
+
try {
|
|
1557
|
+
return JSON.parse(block.json);
|
|
1558
|
+
} catch {
|
|
1559
|
+
return null;
|
|
1560
|
+
}
|
|
1561
|
+
})();
|
|
1562
|
+
const code = parsed?.error?.code?.trim() || null;
|
|
1563
|
+
const msg = parsed?.error?.message?.trim() || null;
|
|
1564
|
+
const msgShort = msg ? msg.toLowerCase().includes("signing in again") ? "re-auth required" : shorten(msg, 52) : null;
|
|
1565
|
+
const base = `[${tag}] token refresh ${status}${code ? ` ${code}` : ""}${msgShort ? ` · ${msgShort}` : ""}`;
|
|
1566
|
+
addGroup(`token:${tag}:${status}:${code ?? ""}:${msgShort ?? ""}`, base);
|
|
1567
|
+
continue;
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
const embedded = line.match(/^Embedded agent failed before reply:\s+OAuth token refresh failed for ([^:]+):/);
|
|
1571
|
+
if (embedded) {
|
|
1572
|
+
const provider = embedded[1]?.trim() || "unknown";
|
|
1573
|
+
addGroup(`embedded:${provider}`, `Embedded agent: OAuth token refresh failed (${provider})`);
|
|
1574
|
+
continue;
|
|
1575
|
+
}
|
|
1576
|
+
if (line.startsWith("[gws]") && line.includes("errorCode=UNAVAILABLE") && line.includes("OAuth token refresh failed")) {
|
|
1577
|
+
const normalized = normalizeGwsLine(line);
|
|
1578
|
+
addGroup(`gws:${normalized}`, normalized);
|
|
1579
|
+
continue;
|
|
1580
|
+
}
|
|
1581
|
+
addLine(line);
|
|
1582
|
+
}
|
|
1583
|
+
for (const g of groups.values()) {
|
|
1584
|
+
if (g.count <= 1) continue;
|
|
1585
|
+
out[g.index] = `${g.base} ×${g.count}`;
|
|
1586
|
+
}
|
|
1587
|
+
const deduped = [];
|
|
1588
|
+
for (const line of out) {
|
|
1589
|
+
if (deduped[deduped.length - 1] === line) continue;
|
|
1590
|
+
deduped.push(line);
|
|
1591
|
+
}
|
|
1592
|
+
if (deduped.length <= maxLines) return deduped;
|
|
1593
|
+
const head = Math.min(6, Math.floor(maxLines / 3));
|
|
1594
|
+
const tail = Math.max(1, maxLines - head - 1);
|
|
1595
|
+
return [
|
|
1596
|
+
...deduped.slice(0, head),
|
|
1597
|
+
`… ${deduped.length - head - tail} lines omitted …`,
|
|
1598
|
+
...deduped.slice(-tail)
|
|
1599
|
+
];
|
|
1600
|
+
}
|
|
1601
|
+
function pickGatewaySelfPresence$1(presence) {
|
|
1602
|
+
if (!Array.isArray(presence)) return null;
|
|
1603
|
+
const self = presence.find((e) => e.mode === "gateway" && e.reason === "self") ?? null;
|
|
1604
|
+
if (!self) return null;
|
|
1605
|
+
return {
|
|
1606
|
+
host: typeof self.host === "string" ? self.host : void 0,
|
|
1607
|
+
ip: typeof self.ip === "string" ? self.ip : void 0,
|
|
1608
|
+
version: typeof self.version === "string" ? self.version : void 0,
|
|
1609
|
+
platform: typeof self.platform === "string" ? self.platform : void 0
|
|
1610
|
+
};
|
|
1611
|
+
}
|
|
1612
|
+
|
|
1613
|
+
//#endregion
|
|
1614
|
+
//#region src/commands/status-all/diagnosis.ts
|
|
1615
|
+
async function appendStatusAllDiagnosis(params) {
|
|
1616
|
+
const { lines, muted, ok, warn, fail } = params;
|
|
1617
|
+
const emitCheck = (label, status) => {
|
|
1618
|
+
const icon = status === "ok" ? ok("✓") : status === "warn" ? warn("!") : fail("✗");
|
|
1619
|
+
const colored = status === "ok" ? ok(label) : status === "warn" ? warn(label) : fail(label);
|
|
1620
|
+
lines.push(`${icon} ${colored}`);
|
|
1621
|
+
};
|
|
1622
|
+
lines.push("");
|
|
1623
|
+
lines.push(muted("Gateway connection details:"));
|
|
1624
|
+
for (const line of redactSecrets(params.connectionDetailsForReport).split("\n").map((l) => l.trimEnd())) lines.push(` ${muted(line)}`);
|
|
1625
|
+
lines.push("");
|
|
1626
|
+
if (params.snap) {
|
|
1627
|
+
const status = !params.snap.exists ? "fail" : params.snap.valid ? "ok" : "warn";
|
|
1628
|
+
emitCheck(`Config: ${params.snap.path ?? "(unknown)"}`, status);
|
|
1629
|
+
const issues = [...params.snap.legacyIssues ?? [], ...params.snap.issues ?? []];
|
|
1630
|
+
const uniqueIssues = issues.filter((issue, index) => issues.findIndex((x) => x.path === issue.path && x.message === issue.message) === index);
|
|
1631
|
+
for (const issue of uniqueIssues.slice(0, 12)) lines.push(` - ${issue.path}: ${issue.message}`);
|
|
1632
|
+
if (uniqueIssues.length > 12) lines.push(` ${muted(`… +${uniqueIssues.length - 12} more`)}`);
|
|
1633
|
+
} else emitCheck("Config: read failed", "warn");
|
|
1634
|
+
if (params.remoteUrlMissing) {
|
|
1635
|
+
lines.push("");
|
|
1636
|
+
emitCheck("Gateway remote mode misconfigured (gateway.remote.url missing)", "warn");
|
|
1637
|
+
lines.push(` ${muted("Fix: set gateway.remote.url, or set gateway.mode=local.")}`);
|
|
1638
|
+
}
|
|
1639
|
+
if (params.sentinel?.payload) {
|
|
1640
|
+
emitCheck("Restart sentinel present", "warn");
|
|
1641
|
+
lines.push(` ${muted(`${summarizeRestartSentinel(params.sentinel.payload)} · ${formatAge$1(Date.now() - params.sentinel.payload.ts)}`)}`);
|
|
1642
|
+
} else emitCheck("Restart sentinel: none", "ok");
|
|
1643
|
+
const lastErrClean = params.lastErr?.trim() ?? "";
|
|
1644
|
+
const isTrivialLastErr = lastErrClean.length < 8 || lastErrClean === "}" || lastErrClean === "{";
|
|
1645
|
+
if (lastErrClean && !isTrivialLastErr) {
|
|
1646
|
+
lines.push("");
|
|
1647
|
+
lines.push(muted("Gateway last log line:"));
|
|
1648
|
+
lines.push(` ${muted(redactSecrets(lastErrClean))}`);
|
|
1649
|
+
}
|
|
1650
|
+
if (params.portUsage) {
|
|
1651
|
+
const portOk = params.portUsage.listeners.length === 0;
|
|
1652
|
+
emitCheck(`Port ${params.port}`, portOk ? "ok" : "warn");
|
|
1653
|
+
if (!portOk) for (const line of formatPortDiagnostics(params.portUsage)) lines.push(` ${muted(line)}`);
|
|
1654
|
+
}
|
|
1655
|
+
{
|
|
1656
|
+
const backend = params.tailscale.backendState ?? "unknown";
|
|
1657
|
+
const okBackend = backend === "Running";
|
|
1658
|
+
const hasDns = Boolean(params.tailscale.dnsName);
|
|
1659
|
+
emitCheck(params.tailscaleMode === "off" ? `Tailscale: off · ${backend}${params.tailscale.dnsName ? ` · ${params.tailscale.dnsName}` : ""}` : `Tailscale: ${params.tailscaleMode} · ${backend}${params.tailscale.dnsName ? ` · ${params.tailscale.dnsName}` : ""}`, okBackend && (params.tailscaleMode === "off" || hasDns) ? "ok" : "warn");
|
|
1660
|
+
if (params.tailscale.error) lines.push(` ${muted(`error: ${params.tailscale.error}`)}`);
|
|
1661
|
+
if (params.tailscale.ips.length > 0) lines.push(` ${muted(`ips: ${params.tailscale.ips.slice(0, 3).join(", ")}${params.tailscale.ips.length > 3 ? "…" : ""}`)}`);
|
|
1662
|
+
if (params.tailscaleHttpsUrl) lines.push(` ${muted(`https: ${params.tailscaleHttpsUrl}`)}`);
|
|
1663
|
+
}
|
|
1664
|
+
if (params.skillStatus) {
|
|
1665
|
+
const eligible = params.skillStatus.skills.filter((s) => s.eligible).length;
|
|
1666
|
+
const missing = params.skillStatus.skills.filter((s) => s.eligible && Object.values(s.missing).some((arr) => arr.length)).length;
|
|
1667
|
+
emitCheck(`Skills: ${eligible} eligible · ${missing} missing · ${params.skillStatus.workspaceDir}`, missing === 0 ? "ok" : "warn");
|
|
1668
|
+
}
|
|
1669
|
+
params.progress.setLabel("Reading logs…");
|
|
1670
|
+
const logPaths = (() => {
|
|
1671
|
+
try {
|
|
1672
|
+
return resolveGatewayLogPaths(process.env);
|
|
1673
|
+
} catch {
|
|
1674
|
+
return null;
|
|
1675
|
+
}
|
|
1676
|
+
})();
|
|
1677
|
+
if (logPaths) {
|
|
1678
|
+
params.progress.setLabel("Reading logs…");
|
|
1679
|
+
const [stderrTail, stdoutTail] = await Promise.all([readFileTailLines(logPaths.stderrPath, 40).catch(() => []), readFileTailLines(logPaths.stdoutPath, 40).catch(() => [])]);
|
|
1680
|
+
if (stderrTail.length > 0 || stdoutTail.length > 0) {
|
|
1681
|
+
lines.push("");
|
|
1682
|
+
lines.push(muted(`Gateway logs (tail, summarized): ${logPaths.logDir}`));
|
|
1683
|
+
lines.push(` ${muted(`# stderr: ${logPaths.stderrPath}`)}`);
|
|
1684
|
+
for (const line of summarizeLogTail(stderrTail, { maxLines: 22 }).map(redactSecrets)) lines.push(` ${muted(line)}`);
|
|
1685
|
+
lines.push(` ${muted(`# stdout: ${logPaths.stdoutPath}`)}`);
|
|
1686
|
+
for (const line of summarizeLogTail(stdoutTail, { maxLines: 22 }).map(redactSecrets)) lines.push(` ${muted(line)}`);
|
|
1687
|
+
}
|
|
1688
|
+
}
|
|
1689
|
+
params.progress.tick();
|
|
1690
|
+
if (params.channelsStatus) {
|
|
1691
|
+
emitCheck(`Channel issues (${params.channelIssues.length || "none"})`, params.channelIssues.length === 0 ? "ok" : "warn");
|
|
1692
|
+
for (const issue of params.channelIssues.slice(0, 12)) {
|
|
1693
|
+
const fixText = issue.fix ? ` · fix: ${issue.fix}` : "";
|
|
1694
|
+
lines.push(` - ${issue.channel}[${issue.accountId}] ${issue.kind}: ${issue.message}${fixText}`);
|
|
1695
|
+
}
|
|
1696
|
+
if (params.channelIssues.length > 12) lines.push(` ${muted(`… +${params.channelIssues.length - 12} more`)}`);
|
|
1697
|
+
} else emitCheck(`Channel issues skipped (gateway ${params.gatewayReachable ? "query failed" : "unreachable"})`, "warn");
|
|
1698
|
+
const healthErr = (() => {
|
|
1699
|
+
if (!params.health || typeof params.health !== "object") return "";
|
|
1700
|
+
const record = params.health;
|
|
1701
|
+
if (!("error" in record)) return "";
|
|
1702
|
+
const value = record.error;
|
|
1703
|
+
if (!value) return "";
|
|
1704
|
+
if (typeof value === "string") return value;
|
|
1705
|
+
try {
|
|
1706
|
+
return JSON.stringify(value, null, 2);
|
|
1707
|
+
} catch {
|
|
1708
|
+
return "[unserializable error]";
|
|
1709
|
+
}
|
|
1710
|
+
})();
|
|
1711
|
+
if (healthErr) {
|
|
1712
|
+
lines.push("");
|
|
1713
|
+
lines.push(muted("Gateway health:"));
|
|
1714
|
+
lines.push(` ${muted(redactSecrets(healthErr))}`);
|
|
1715
|
+
}
|
|
1716
|
+
lines.push("");
|
|
1717
|
+
lines.push(muted("Pasteable debug report. Auth tokens redacted."));
|
|
1718
|
+
lines.push("Troubleshooting: https://docs.openclaw.ai/troubleshooting");
|
|
1719
|
+
lines.push("");
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
//#endregion
|
|
1723
|
+
//#region src/commands/status-all/report-lines.ts
|
|
1724
|
+
async function buildStatusAllReportLines(params) {
|
|
1725
|
+
const rich = isRich();
|
|
1726
|
+
const heading = (text) => rich ? theme.heading(text) : text;
|
|
1727
|
+
const ok = (text) => rich ? theme.success(text) : text;
|
|
1728
|
+
const warn = (text) => rich ? theme.warn(text) : text;
|
|
1729
|
+
const fail = (text) => rich ? theme.error(text) : text;
|
|
1730
|
+
const muted = (text) => rich ? theme.muted(text) : text;
|
|
1731
|
+
const tableWidth = Math.max(60, (process.stdout.columns ?? 120) - 1);
|
|
1732
|
+
const overview = renderTable({
|
|
1733
|
+
width: tableWidth,
|
|
1734
|
+
columns: [{
|
|
1735
|
+
key: "Item",
|
|
1736
|
+
header: "Item",
|
|
1737
|
+
minWidth: 10
|
|
1738
|
+
}, {
|
|
1739
|
+
key: "Value",
|
|
1740
|
+
header: "Value",
|
|
1741
|
+
flex: true,
|
|
1742
|
+
minWidth: 24
|
|
1743
|
+
}],
|
|
1744
|
+
rows: params.overviewRows
|
|
1745
|
+
});
|
|
1746
|
+
const channelRows = params.channels.rows.map((row) => ({
|
|
1747
|
+
channelId: row.id,
|
|
1748
|
+
Channel: row.label,
|
|
1749
|
+
Enabled: row.enabled ? ok("ON") : muted("OFF"),
|
|
1750
|
+
State: row.state === "ok" ? ok("OK") : row.state === "warn" ? warn("WARN") : row.state === "off" ? muted("OFF") : theme.accentDim("SETUP"),
|
|
1751
|
+
Detail: row.detail
|
|
1752
|
+
}));
|
|
1753
|
+
const channelIssuesByChannel = (() => {
|
|
1754
|
+
const map = /* @__PURE__ */ new Map();
|
|
1755
|
+
for (const issue of params.channelIssues) {
|
|
1756
|
+
const key = issue.channel;
|
|
1757
|
+
const list = map.get(key);
|
|
1758
|
+
if (list) list.push(issue);
|
|
1759
|
+
else map.set(key, [issue]);
|
|
1760
|
+
}
|
|
1761
|
+
return map;
|
|
1762
|
+
})();
|
|
1763
|
+
const channelsTable = renderTable({
|
|
1764
|
+
width: tableWidth,
|
|
1765
|
+
columns: [
|
|
1766
|
+
{
|
|
1767
|
+
key: "Channel",
|
|
1768
|
+
header: "Channel",
|
|
1769
|
+
minWidth: 10
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
key: "Enabled",
|
|
1773
|
+
header: "Enabled",
|
|
1774
|
+
minWidth: 7
|
|
1775
|
+
},
|
|
1776
|
+
{
|
|
1777
|
+
key: "State",
|
|
1778
|
+
header: "State",
|
|
1779
|
+
minWidth: 8
|
|
1780
|
+
},
|
|
1781
|
+
{
|
|
1782
|
+
key: "Detail",
|
|
1783
|
+
header: "Detail",
|
|
1784
|
+
flex: true,
|
|
1785
|
+
minWidth: 28
|
|
1786
|
+
}
|
|
1787
|
+
],
|
|
1788
|
+
rows: channelRows.map((row) => {
|
|
1789
|
+
const issues = channelIssuesByChannel.get(row.channelId) ?? [];
|
|
1790
|
+
if (issues.length === 0) return row;
|
|
1791
|
+
const issue = issues[0];
|
|
1792
|
+
const suffix = ` · ${warn(`gateway: ${String(issue.message).slice(0, 90)}`)}`;
|
|
1793
|
+
return {
|
|
1794
|
+
...row,
|
|
1795
|
+
State: warn("WARN"),
|
|
1796
|
+
Detail: `${row.Detail}${suffix}`
|
|
1797
|
+
};
|
|
1798
|
+
})
|
|
1799
|
+
});
|
|
1800
|
+
const agentsTable = renderTable({
|
|
1801
|
+
width: tableWidth,
|
|
1802
|
+
columns: [
|
|
1803
|
+
{
|
|
1804
|
+
key: "Agent",
|
|
1805
|
+
header: "Agent",
|
|
1806
|
+
minWidth: 12
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
key: "Bootstrap",
|
|
1810
|
+
header: "Bootstrap",
|
|
1811
|
+
minWidth: 10
|
|
1812
|
+
},
|
|
1813
|
+
{
|
|
1814
|
+
key: "Sessions",
|
|
1815
|
+
header: "Sessions",
|
|
1816
|
+
align: "right",
|
|
1817
|
+
minWidth: 8
|
|
1818
|
+
},
|
|
1819
|
+
{
|
|
1820
|
+
key: "Active",
|
|
1821
|
+
header: "Active",
|
|
1822
|
+
minWidth: 10
|
|
1823
|
+
},
|
|
1824
|
+
{
|
|
1825
|
+
key: "Store",
|
|
1826
|
+
header: "Store",
|
|
1827
|
+
flex: true,
|
|
1828
|
+
minWidth: 34
|
|
1829
|
+
}
|
|
1830
|
+
],
|
|
1831
|
+
rows: params.agentStatus.agents.map((a) => ({
|
|
1832
|
+
Agent: a.name?.trim() ? `${a.id} (${a.name.trim()})` : a.id,
|
|
1833
|
+
Bootstrap: a.bootstrapPending === true ? warn("PENDING") : a.bootstrapPending === false ? ok("OK") : "unknown",
|
|
1834
|
+
Sessions: String(a.sessionsCount),
|
|
1835
|
+
Active: a.lastActiveAgeMs != null ? formatAge$1(a.lastActiveAgeMs) : "unknown",
|
|
1836
|
+
Store: a.sessionsPath
|
|
1837
|
+
}))
|
|
1838
|
+
});
|
|
1839
|
+
const lines = [];
|
|
1840
|
+
lines.push(heading("OpenClaw status --all"));
|
|
1841
|
+
lines.push("");
|
|
1842
|
+
lines.push(heading("Overview"));
|
|
1843
|
+
lines.push(overview.trimEnd());
|
|
1844
|
+
lines.push("");
|
|
1845
|
+
lines.push(heading("Channels"));
|
|
1846
|
+
lines.push(channelsTable.trimEnd());
|
|
1847
|
+
for (const detail of params.channels.details) {
|
|
1848
|
+
lines.push("");
|
|
1849
|
+
lines.push(heading(detail.title));
|
|
1850
|
+
lines.push(renderTable({
|
|
1851
|
+
width: tableWidth,
|
|
1852
|
+
columns: detail.columns.map((c) => ({
|
|
1853
|
+
key: c,
|
|
1854
|
+
header: c,
|
|
1855
|
+
flex: c === "Notes",
|
|
1856
|
+
minWidth: c === "Notes" ? 28 : 10
|
|
1857
|
+
})),
|
|
1858
|
+
rows: detail.rows.map((r) => ({
|
|
1859
|
+
...r,
|
|
1860
|
+
...r.Status === "OK" ? { Status: ok("OK") } : r.Status === "WARN" ? { Status: warn("WARN") } : {}
|
|
1861
|
+
}))
|
|
1862
|
+
}).trimEnd());
|
|
1863
|
+
}
|
|
1864
|
+
lines.push("");
|
|
1865
|
+
lines.push(heading("Agents"));
|
|
1866
|
+
lines.push(agentsTable.trimEnd());
|
|
1867
|
+
lines.push("");
|
|
1868
|
+
lines.push(heading("Diagnosis (read-only)"));
|
|
1869
|
+
await appendStatusAllDiagnosis({
|
|
1870
|
+
lines,
|
|
1871
|
+
progress: params.progress,
|
|
1872
|
+
muted,
|
|
1873
|
+
ok,
|
|
1874
|
+
warn,
|
|
1875
|
+
fail,
|
|
1876
|
+
connectionDetailsForReport: params.connectionDetailsForReport,
|
|
1877
|
+
...params.diagnosis
|
|
1878
|
+
});
|
|
1879
|
+
return lines;
|
|
1880
|
+
}
|
|
1881
|
+
|
|
1882
|
+
//#endregion
|
|
1883
|
+
//#region src/commands/status-all.ts
|
|
1884
|
+
async function statusAllCommand(runtime, opts) {
|
|
1885
|
+
await withProgress({
|
|
1886
|
+
label: "Scanning status --all…",
|
|
1887
|
+
total: 11
|
|
1888
|
+
}, async (progress) => {
|
|
1889
|
+
progress.setLabel("Loading config…");
|
|
1890
|
+
const cfg = loadConfig();
|
|
1891
|
+
const osSummary = resolveOsSummary();
|
|
1892
|
+
const snap = await readConfigFileSnapshot().catch(() => null);
|
|
1893
|
+
progress.tick();
|
|
1894
|
+
progress.setLabel("Checking Tailscale…");
|
|
1895
|
+
const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
|
|
1896
|
+
const tailscale = await (async () => {
|
|
1897
|
+
try {
|
|
1898
|
+
const parsed = await readTailscaleStatusJson(runExec, { timeoutMs: 1200 });
|
|
1899
|
+
const backendState = typeof parsed.BackendState === "string" ? parsed.BackendState : null;
|
|
1900
|
+
const self = typeof parsed.Self === "object" && parsed.Self !== null ? parsed.Self : null;
|
|
1901
|
+
const dnsNameRaw = self && typeof self.DNSName === "string" ? self.DNSName : null;
|
|
1902
|
+
return {
|
|
1903
|
+
ok: true,
|
|
1904
|
+
backendState,
|
|
1905
|
+
dnsName: dnsNameRaw ? dnsNameRaw.replace(/\.$/, "") : null,
|
|
1906
|
+
ips: self && Array.isArray(self.TailscaleIPs) ? self.TailscaleIPs.filter((v) => typeof v === "string" && v.trim().length > 0).map((v) => v.trim()) : [],
|
|
1907
|
+
error: null
|
|
1908
|
+
};
|
|
1909
|
+
} catch (err) {
|
|
1910
|
+
return {
|
|
1911
|
+
ok: false,
|
|
1912
|
+
backendState: null,
|
|
1913
|
+
dnsName: null,
|
|
1914
|
+
ips: [],
|
|
1915
|
+
error: String(err)
|
|
1916
|
+
};
|
|
1917
|
+
}
|
|
1918
|
+
})();
|
|
1919
|
+
const tailscaleHttpsUrl = tailscaleMode !== "off" && tailscale.dnsName ? `https://${tailscale.dnsName}${normalizeControlUiBasePath(cfg.gateway?.controlUi?.basePath)}` : null;
|
|
1920
|
+
progress.tick();
|
|
1921
|
+
progress.setLabel("Checking for updates…");
|
|
1922
|
+
const update = await checkUpdateStatus({
|
|
1923
|
+
root: await resolveOpenClawPackageRoot({
|
|
1924
|
+
moduleUrl: import.meta.url,
|
|
1925
|
+
argv1: process.argv[1],
|
|
1926
|
+
cwd: process.cwd()
|
|
1927
|
+
}),
|
|
1928
|
+
timeoutMs: 6500,
|
|
1929
|
+
fetchGit: true,
|
|
1930
|
+
includeRegistry: true
|
|
1931
|
+
});
|
|
1932
|
+
const channelInfo = resolveEffectiveUpdateChannel({
|
|
1933
|
+
configChannel: normalizeUpdateChannel(cfg.update?.channel),
|
|
1934
|
+
installKind: update.installKind,
|
|
1935
|
+
git: update.git ? {
|
|
1936
|
+
tag: update.git.tag,
|
|
1937
|
+
branch: update.git.branch
|
|
1938
|
+
} : void 0
|
|
1939
|
+
});
|
|
1940
|
+
const channelLabel = formatUpdateChannelLabel({
|
|
1941
|
+
channel: channelInfo.channel,
|
|
1942
|
+
source: channelInfo.source,
|
|
1943
|
+
gitTag: update.git?.tag ?? null,
|
|
1944
|
+
gitBranch: update.git?.branch ?? null
|
|
1945
|
+
});
|
|
1946
|
+
const gitLabel = update.installKind === "git" ? (() => {
|
|
1947
|
+
const shortSha = update.git?.sha ? update.git.sha.slice(0, 8) : null;
|
|
1948
|
+
const branch = update.git?.branch && update.git.branch !== "HEAD" ? update.git.branch : null;
|
|
1949
|
+
const tag = update.git?.tag ?? null;
|
|
1950
|
+
return [
|
|
1951
|
+
branch ?? (tag ? "detached" : "git"),
|
|
1952
|
+
tag ? `tag ${tag}` : null,
|
|
1953
|
+
shortSha ? `@ ${shortSha}` : null
|
|
1954
|
+
].filter(Boolean).join(" · ");
|
|
1955
|
+
})() : null;
|
|
1956
|
+
progress.tick();
|
|
1957
|
+
progress.setLabel("Probing gateway…");
|
|
1958
|
+
const connection = buildGatewayConnectionDetails({ config: cfg });
|
|
1959
|
+
const isRemoteMode = cfg.gateway?.mode === "remote";
|
|
1960
|
+
const remoteUrlRaw = typeof cfg.gateway?.remote?.url === "string" ? cfg.gateway.remote.url.trim() : "";
|
|
1961
|
+
const remoteUrlMissing = isRemoteMode && !remoteUrlRaw;
|
|
1962
|
+
const gatewayMode = isRemoteMode ? "remote" : "local";
|
|
1963
|
+
const resolveProbeAuth = (mode) => {
|
|
1964
|
+
const authToken = cfg.gateway?.auth?.token;
|
|
1965
|
+
const authPassword = cfg.gateway?.auth?.password;
|
|
1966
|
+
const remote = cfg.gateway?.remote;
|
|
1967
|
+
return {
|
|
1968
|
+
token: mode === "remote" ? typeof remote?.token === "string" && remote.token.trim() ? remote.token.trim() : void 0 : process.env.OPENCLAW_GATEWAY_TOKEN?.trim() || (typeof authToken === "string" && authToken.trim() ? authToken.trim() : void 0),
|
|
1969
|
+
password: process.env.OPENCLAW_GATEWAY_PASSWORD?.trim() || (mode === "remote" ? typeof remote?.password === "string" && remote.password.trim() ? remote.password.trim() : void 0 : typeof authPassword === "string" && authPassword.trim() ? authPassword.trim() : void 0)
|
|
1970
|
+
};
|
|
1971
|
+
};
|
|
1972
|
+
const localFallbackAuth = resolveProbeAuth("local");
|
|
1973
|
+
const remoteAuth = resolveProbeAuth("remote");
|
|
1974
|
+
const probeAuth = isRemoteMode && !remoteUrlMissing ? remoteAuth : localFallbackAuth;
|
|
1975
|
+
const gatewayProbe = await probeGateway({
|
|
1976
|
+
url: connection.url,
|
|
1977
|
+
auth: probeAuth,
|
|
1978
|
+
timeoutMs: Math.min(5e3, opts?.timeoutMs ?? 1e4)
|
|
1979
|
+
}).catch(() => null);
|
|
1980
|
+
const gatewayReachable = gatewayProbe?.ok === true;
|
|
1981
|
+
const gatewaySelf = pickGatewaySelfPresence$1(gatewayProbe?.presence ?? null);
|
|
1982
|
+
progress.tick();
|
|
1983
|
+
progress.setLabel("Checking services…");
|
|
1984
|
+
const readServiceSummary = async (service) => {
|
|
1985
|
+
try {
|
|
1986
|
+
const [loaded, runtimeInfo, command] = await Promise.all([
|
|
1987
|
+
service.isLoaded({ env: process.env }).catch(() => false),
|
|
1988
|
+
service.readRuntime(process.env).catch(() => void 0),
|
|
1989
|
+
service.readCommand(process.env).catch(() => null)
|
|
1990
|
+
]);
|
|
1991
|
+
const installed = command != null;
|
|
1992
|
+
return {
|
|
1993
|
+
label: service.label,
|
|
1994
|
+
installed,
|
|
1995
|
+
loaded,
|
|
1996
|
+
loadedText: loaded ? service.loadedText : service.notLoadedText,
|
|
1997
|
+
runtime: runtimeInfo
|
|
1998
|
+
};
|
|
1999
|
+
} catch {
|
|
2000
|
+
return null;
|
|
2001
|
+
}
|
|
2002
|
+
};
|
|
2003
|
+
const daemon = await readServiceSummary(resolveGatewayService());
|
|
2004
|
+
const nodeService = await readServiceSummary(resolveNodeService());
|
|
2005
|
+
progress.tick();
|
|
2006
|
+
progress.setLabel("Scanning agents…");
|
|
2007
|
+
const agentStatus = await getAgentLocalStatuses$1(cfg);
|
|
2008
|
+
progress.tick();
|
|
2009
|
+
progress.setLabel("Summarizing channels…");
|
|
2010
|
+
const channels = await buildChannelsTable(cfg, { showSecrets: false });
|
|
2011
|
+
progress.tick();
|
|
2012
|
+
const connectionDetailsForReport = (() => {
|
|
2013
|
+
if (!remoteUrlMissing) return connection.message;
|
|
2014
|
+
const bindMode = cfg.gateway?.bind ?? "loopback";
|
|
2015
|
+
return [
|
|
2016
|
+
"Gateway mode: remote",
|
|
2017
|
+
"Gateway target: (missing gateway.remote.url)",
|
|
2018
|
+
`Config: ${snap?.path?.trim() ? snap.path.trim() : "(unknown config path)"}`,
|
|
2019
|
+
`Bind: ${bindMode}`,
|
|
2020
|
+
`Local fallback (used for probes): ${connection.url}`,
|
|
2021
|
+
"Fix: set gateway.remote.url, or set gateway.mode=local."
|
|
2022
|
+
].join("\n");
|
|
2023
|
+
})();
|
|
2024
|
+
const callOverrides = remoteUrlMissing ? {
|
|
2025
|
+
url: connection.url,
|
|
2026
|
+
token: localFallbackAuth.token,
|
|
2027
|
+
password: localFallbackAuth.password
|
|
2028
|
+
} : {};
|
|
2029
|
+
progress.setLabel("Querying gateway…");
|
|
2030
|
+
const health = gatewayReachable ? await callGateway({
|
|
2031
|
+
method: "health",
|
|
2032
|
+
timeoutMs: Math.min(8e3, opts?.timeoutMs ?? 1e4),
|
|
2033
|
+
...callOverrides
|
|
2034
|
+
}).catch((err) => ({ error: String(err) })) : { error: gatewayProbe?.error ?? "gateway unreachable" };
|
|
2035
|
+
const channelsStatus = gatewayReachable ? await callGateway({
|
|
2036
|
+
method: "channels.status",
|
|
2037
|
+
params: {
|
|
2038
|
+
probe: false,
|
|
2039
|
+
timeoutMs: opts?.timeoutMs ?? 1e4
|
|
2040
|
+
},
|
|
2041
|
+
timeoutMs: Math.min(8e3, opts?.timeoutMs ?? 1e4),
|
|
2042
|
+
...callOverrides
|
|
2043
|
+
}).catch(() => null) : null;
|
|
2044
|
+
const channelIssues = channelsStatus ? collectChannelStatusIssues(channelsStatus) : [];
|
|
2045
|
+
progress.tick();
|
|
2046
|
+
progress.setLabel("Checking local state…");
|
|
2047
|
+
const sentinel = await readRestartSentinel().catch(() => null);
|
|
2048
|
+
const lastErr = await readLastGatewayErrorLine(process.env).catch(() => null);
|
|
2049
|
+
const port = resolveGatewayPort(cfg);
|
|
2050
|
+
const portUsage = await inspectPortUsage(port).catch(() => null);
|
|
2051
|
+
progress.tick();
|
|
2052
|
+
const defaultWorkspace = agentStatus.agents.find((a) => a.id === agentStatus.defaultId)?.workspaceDir ?? agentStatus.agents[0]?.workspaceDir ?? null;
|
|
2053
|
+
const skillStatus = defaultWorkspace != null ? (() => {
|
|
2054
|
+
try {
|
|
2055
|
+
return buildWorkspaceSkillStatus(defaultWorkspace, {
|
|
2056
|
+
config: cfg,
|
|
2057
|
+
eligibility: { remote: getRemoteSkillEligibility() }
|
|
2058
|
+
});
|
|
2059
|
+
} catch {
|
|
2060
|
+
return null;
|
|
2061
|
+
}
|
|
2062
|
+
})() : null;
|
|
2063
|
+
const dashboard = cfg.gateway?.controlUi?.enabled ?? true ? resolveControlUiLinks({
|
|
2064
|
+
port,
|
|
2065
|
+
bind: cfg.gateway?.bind,
|
|
2066
|
+
customBindHost: cfg.gateway?.customBindHost,
|
|
2067
|
+
basePath: cfg.gateway?.controlUi?.basePath
|
|
2068
|
+
}).httpUrl : null;
|
|
2069
|
+
const updateLine = (() => {
|
|
2070
|
+
if (update.installKind === "git" && update.git) {
|
|
2071
|
+
const parts = [];
|
|
2072
|
+
parts.push(update.git.branch ? `git ${update.git.branch}` : "git");
|
|
2073
|
+
if (update.git.upstream) parts.push(`↔ ${update.git.upstream}`);
|
|
2074
|
+
if (update.git.dirty) parts.push("dirty");
|
|
2075
|
+
if (update.git.behind != null && update.git.ahead != null) if (update.git.behind === 0 && update.git.ahead === 0) parts.push("up to date");
|
|
2076
|
+
else if (update.git.behind > 0 && update.git.ahead === 0) parts.push(`behind ${update.git.behind}`);
|
|
2077
|
+
else if (update.git.behind === 0 && update.git.ahead > 0) parts.push(`ahead ${update.git.ahead}`);
|
|
2078
|
+
else parts.push(`diverged (ahead ${update.git.ahead}, behind ${update.git.behind})`);
|
|
2079
|
+
if (update.git.fetchOk === false) parts.push("fetch failed");
|
|
2080
|
+
const latest = update.registry?.latestVersion;
|
|
2081
|
+
if (latest) {
|
|
2082
|
+
const cmp = compareSemverStrings(VERSION, latest);
|
|
2083
|
+
if (cmp === 0) parts.push(`npm latest ${latest}`);
|
|
2084
|
+
else if (cmp != null && cmp < 0) parts.push(`npm update ${latest}`);
|
|
2085
|
+
else parts.push(`npm latest ${latest} (local newer)`);
|
|
2086
|
+
} else if (update.registry?.error) parts.push("npm latest unknown");
|
|
2087
|
+
if (update.deps?.status === "ok") parts.push("deps ok");
|
|
2088
|
+
if (update.deps?.status === "stale") parts.push("deps stale");
|
|
2089
|
+
if (update.deps?.status === "missing") parts.push("deps missing");
|
|
2090
|
+
return parts.join(" · ");
|
|
2091
|
+
}
|
|
2092
|
+
const parts = [];
|
|
2093
|
+
parts.push(update.packageManager !== "unknown" ? update.packageManager : "pkg");
|
|
2094
|
+
const latest = update.registry?.latestVersion;
|
|
2095
|
+
if (latest) {
|
|
2096
|
+
const cmp = compareSemverStrings(VERSION, latest);
|
|
2097
|
+
if (cmp === 0) parts.push(`npm latest ${latest}`);
|
|
2098
|
+
else if (cmp != null && cmp < 0) parts.push(`npm update ${latest}`);
|
|
2099
|
+
else parts.push(`npm latest ${latest} (local newer)`);
|
|
2100
|
+
} else if (update.registry?.error) parts.push("npm latest unknown");
|
|
2101
|
+
if (update.deps?.status === "ok") parts.push("deps ok");
|
|
2102
|
+
if (update.deps?.status === "stale") parts.push("deps stale");
|
|
2103
|
+
if (update.deps?.status === "missing") parts.push("deps missing");
|
|
2104
|
+
return parts.join(" · ");
|
|
2105
|
+
})();
|
|
2106
|
+
const gatewayTarget = remoteUrlMissing ? `fallback ${connection.url}` : connection.url;
|
|
2107
|
+
const gatewayStatus = gatewayReachable ? `reachable ${formatDuration$1(gatewayProbe?.connectLatencyMs)}` : gatewayProbe?.error ? `unreachable (${gatewayProbe.error})` : "unreachable";
|
|
2108
|
+
const gatewayAuth = gatewayReachable ? ` · auth ${formatGatewayAuthUsed(probeAuth)}` : "";
|
|
2109
|
+
const gatewaySelfLine = gatewaySelf?.host || gatewaySelf?.ip || gatewaySelf?.version || gatewaySelf?.platform ? [
|
|
2110
|
+
gatewaySelf.host ? gatewaySelf.host : null,
|
|
2111
|
+
gatewaySelf.ip ? `(${gatewaySelf.ip})` : null,
|
|
2112
|
+
gatewaySelf.version ? `app ${gatewaySelf.version}` : null,
|
|
2113
|
+
gatewaySelf.platform ? gatewaySelf.platform : null
|
|
2114
|
+
].filter(Boolean).join(" ") : null;
|
|
2115
|
+
const aliveThresholdMs = 10 * 6e4;
|
|
2116
|
+
const aliveAgents = agentStatus.agents.filter((a) => a.lastActiveAgeMs != null && a.lastActiveAgeMs <= aliveThresholdMs).length;
|
|
2117
|
+
const lines = await buildStatusAllReportLines({
|
|
2118
|
+
progress,
|
|
2119
|
+
overviewRows: [
|
|
2120
|
+
{
|
|
2121
|
+
Item: "Version",
|
|
2122
|
+
Value: VERSION
|
|
2123
|
+
},
|
|
2124
|
+
{
|
|
2125
|
+
Item: "OS",
|
|
2126
|
+
Value: osSummary.label
|
|
2127
|
+
},
|
|
2128
|
+
{
|
|
2129
|
+
Item: "Node",
|
|
2130
|
+
Value: process.versions.node
|
|
2131
|
+
},
|
|
2132
|
+
{
|
|
2133
|
+
Item: "Config",
|
|
2134
|
+
Value: snap?.path?.trim() ? snap.path.trim() : "(unknown config path)"
|
|
2135
|
+
},
|
|
2136
|
+
dashboard ? {
|
|
2137
|
+
Item: "Dashboard",
|
|
2138
|
+
Value: dashboard
|
|
2139
|
+
} : {
|
|
2140
|
+
Item: "Dashboard",
|
|
2141
|
+
Value: "disabled"
|
|
2142
|
+
},
|
|
2143
|
+
{
|
|
2144
|
+
Item: "Tailscale",
|
|
2145
|
+
Value: tailscaleMode === "off" ? `off${tailscale.backendState ? ` · ${tailscale.backendState}` : ""}${tailscale.dnsName ? ` · ${tailscale.dnsName}` : ""}` : tailscale.dnsName && tailscaleHttpsUrl ? `${tailscaleMode} · ${tailscale.backendState ?? "unknown"} · ${tailscale.dnsName} · ${tailscaleHttpsUrl}` : `${tailscaleMode} · ${tailscale.backendState ?? "unknown"} · magicdns unknown`
|
|
2146
|
+
},
|
|
2147
|
+
{
|
|
2148
|
+
Item: "Channel",
|
|
2149
|
+
Value: channelLabel
|
|
2150
|
+
},
|
|
2151
|
+
...gitLabel ? [{
|
|
2152
|
+
Item: "Git",
|
|
2153
|
+
Value: gitLabel
|
|
2154
|
+
}] : [],
|
|
2155
|
+
{
|
|
2156
|
+
Item: "Update",
|
|
2157
|
+
Value: updateLine
|
|
2158
|
+
},
|
|
2159
|
+
{
|
|
2160
|
+
Item: "Gateway",
|
|
2161
|
+
Value: `${gatewayMode}${remoteUrlMissing ? " (remote.url missing)" : ""} · ${gatewayTarget} (${connection.urlSource}) · ${gatewayStatus}${gatewayAuth}`
|
|
2162
|
+
},
|
|
2163
|
+
{
|
|
2164
|
+
Item: "Security",
|
|
2165
|
+
Value: `Run: ${formatCliCommand("openclaw security audit --deep")}`
|
|
2166
|
+
},
|
|
2167
|
+
gatewaySelfLine ? {
|
|
2168
|
+
Item: "Gateway self",
|
|
2169
|
+
Value: gatewaySelfLine
|
|
2170
|
+
} : {
|
|
2171
|
+
Item: "Gateway self",
|
|
2172
|
+
Value: "unknown"
|
|
2173
|
+
},
|
|
2174
|
+
daemon ? {
|
|
2175
|
+
Item: "Gateway service",
|
|
2176
|
+
Value: !daemon.installed ? `${daemon.label} not installed` : `${daemon.label} ${daemon.installed ? "installed · " : ""}${daemon.loadedText}${daemon.runtime?.status ? ` · ${daemon.runtime.status}` : ""}${daemon.runtime?.pid ? ` (pid ${daemon.runtime.pid})` : ""}`
|
|
2177
|
+
} : {
|
|
2178
|
+
Item: "Gateway service",
|
|
2179
|
+
Value: "unknown"
|
|
2180
|
+
},
|
|
2181
|
+
nodeService ? {
|
|
2182
|
+
Item: "Node service",
|
|
2183
|
+
Value: !nodeService.installed ? `${nodeService.label} not installed` : `${nodeService.label} ${nodeService.installed ? "installed · " : ""}${nodeService.loadedText}${nodeService.runtime?.status ? ` · ${nodeService.runtime.status}` : ""}${nodeService.runtime?.pid ? ` (pid ${nodeService.runtime.pid})` : ""}`
|
|
2184
|
+
} : {
|
|
2185
|
+
Item: "Node service",
|
|
2186
|
+
Value: "unknown"
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
Item: "Agents",
|
|
2190
|
+
Value: `${agentStatus.agents.length} total · ${agentStatus.bootstrapPendingCount} bootstrapping · ${aliveAgents} active · ${agentStatus.totalSessions} sessions`
|
|
2191
|
+
}
|
|
2192
|
+
],
|
|
2193
|
+
channels,
|
|
2194
|
+
channelIssues: channelIssues.map((issue) => ({
|
|
2195
|
+
channel: issue.channel,
|
|
2196
|
+
message: issue.message
|
|
2197
|
+
})),
|
|
2198
|
+
agentStatus,
|
|
2199
|
+
connectionDetailsForReport,
|
|
2200
|
+
diagnosis: {
|
|
2201
|
+
snap,
|
|
2202
|
+
remoteUrlMissing,
|
|
2203
|
+
sentinel,
|
|
2204
|
+
lastErr,
|
|
2205
|
+
port,
|
|
2206
|
+
portUsage,
|
|
2207
|
+
tailscaleMode,
|
|
2208
|
+
tailscale,
|
|
2209
|
+
tailscaleHttpsUrl,
|
|
2210
|
+
skillStatus,
|
|
2211
|
+
channelsStatus,
|
|
2212
|
+
channelIssues,
|
|
2213
|
+
gatewayReachable,
|
|
2214
|
+
health
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2217
|
+
progress.setLabel("Rendering…");
|
|
2218
|
+
runtime.log(lines.join("\n"));
|
|
2219
|
+
progress.tick();
|
|
2220
|
+
});
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
//#endregion
|
|
2224
|
+
//#region src/commands/status.format.ts
|
|
2225
|
+
const formatKTokens = (value) => `${(value / 1e3).toFixed(value >= 1e4 ? 0 : 1)}k`;
|
|
2226
|
+
const formatAge = (ms) => {
|
|
2227
|
+
if (!ms || ms < 0) return "unknown";
|
|
2228
|
+
const minutes = Math.round(ms / 6e4);
|
|
2229
|
+
if (minutes < 1) return "just now";
|
|
2230
|
+
if (minutes < 60) return `${minutes}m ago`;
|
|
2231
|
+
const hours = Math.round(minutes / 60);
|
|
2232
|
+
if (hours < 48) return `${hours}h ago`;
|
|
2233
|
+
return `${Math.round(hours / 24)}d ago`;
|
|
2234
|
+
};
|
|
2235
|
+
const formatDuration = (ms) => {
|
|
2236
|
+
if (ms == null || !Number.isFinite(ms)) return "unknown";
|
|
2237
|
+
if (ms < 1e3) return `${Math.round(ms)}ms`;
|
|
2238
|
+
return `${(ms / 1e3).toFixed(1)}s`;
|
|
2239
|
+
};
|
|
2240
|
+
const shortenText = (value, maxLen) => {
|
|
2241
|
+
const chars = Array.from(value);
|
|
2242
|
+
if (chars.length <= maxLen) return value;
|
|
2243
|
+
return `${chars.slice(0, Math.max(0, maxLen - 1)).join("")}…`;
|
|
2244
|
+
};
|
|
2245
|
+
const formatTokensCompact = (sess) => {
|
|
2246
|
+
const used = sess.totalTokens ?? 0;
|
|
2247
|
+
const ctx = sess.contextTokens;
|
|
2248
|
+
if (!ctx) return `${formatKTokens(used)} used`;
|
|
2249
|
+
const pctLabel = sess.percentUsed != null ? `${sess.percentUsed}%` : "?%";
|
|
2250
|
+
return `${formatKTokens(used)}/${formatKTokens(ctx)} (${pctLabel})`;
|
|
2251
|
+
};
|
|
2252
|
+
const formatDaemonRuntimeShort = (runtime) => {
|
|
2253
|
+
if (!runtime) return null;
|
|
2254
|
+
const status = runtime.status ?? "unknown";
|
|
2255
|
+
const details = [];
|
|
2256
|
+
if (runtime.pid) details.push(`pid ${runtime.pid}`);
|
|
2257
|
+
if (runtime.state && runtime.state.toLowerCase() !== status) details.push(`state ${runtime.state}`);
|
|
2258
|
+
const detail = runtime.detail?.replace(/\s+/g, " ").trim() || "";
|
|
2259
|
+
const noisyLaunchctlDetail = runtime.missingUnit === true && detail.toLowerCase().includes("could not find service");
|
|
2260
|
+
if (detail && !noisyLaunchctlDetail) details.push(detail);
|
|
2261
|
+
return details.length > 0 ? `${status} (${details.join(", ")})` : status;
|
|
2262
|
+
};
|
|
2263
|
+
|
|
2264
|
+
//#endregion
|
|
2265
|
+
//#region src/commands/status.daemon.ts
|
|
2266
|
+
async function buildDaemonStatusSummary(service, fallbackLabel) {
|
|
2267
|
+
try {
|
|
2268
|
+
const [loaded, runtime, command] = await Promise.all([
|
|
2269
|
+
service.isLoaded({ env: process.env }).catch(() => false),
|
|
2270
|
+
service.readRuntime(process.env).catch(() => void 0),
|
|
2271
|
+
service.readCommand(process.env).catch(() => null)
|
|
2272
|
+
]);
|
|
2273
|
+
const installed = command != null;
|
|
2274
|
+
const loadedText = loaded ? service.loadedText : service.notLoadedText;
|
|
2275
|
+
const runtimeShort = formatDaemonRuntimeShort(runtime);
|
|
2276
|
+
return {
|
|
2277
|
+
label: service.label,
|
|
2278
|
+
installed,
|
|
2279
|
+
loadedText,
|
|
2280
|
+
runtimeShort
|
|
2281
|
+
};
|
|
2282
|
+
} catch {
|
|
2283
|
+
return {
|
|
2284
|
+
label: fallbackLabel,
|
|
2285
|
+
installed: null,
|
|
2286
|
+
loadedText: "unknown",
|
|
2287
|
+
runtimeShort: null
|
|
2288
|
+
};
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2291
|
+
async function getDaemonStatusSummary() {
|
|
2292
|
+
return await buildDaemonStatusSummary(resolveGatewayService(), "Daemon");
|
|
2293
|
+
}
|
|
2294
|
+
async function getNodeDaemonStatusSummary() {
|
|
2295
|
+
return await buildDaemonStatusSummary(resolveNodeService(), "Node");
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
//#endregion
|
|
2299
|
+
//#region src/commands/status.gateway-probe.ts
|
|
2300
|
+
function resolveGatewayProbeAuth(cfg) {
|
|
2301
|
+
const isRemoteMode = cfg.gateway?.mode === "remote";
|
|
2302
|
+
const remote = isRemoteMode ? cfg.gateway?.remote : void 0;
|
|
2303
|
+
const authToken = cfg.gateway?.auth?.token;
|
|
2304
|
+
const authPassword = cfg.gateway?.auth?.password;
|
|
2305
|
+
return {
|
|
2306
|
+
token: isRemoteMode ? typeof remote?.token === "string" && remote.token.trim().length > 0 ? remote.token.trim() : void 0 : process.env.OPENCLAW_GATEWAY_TOKEN?.trim() || (typeof authToken === "string" && authToken.trim().length > 0 ? authToken.trim() : void 0),
|
|
2307
|
+
password: process.env.OPENCLAW_GATEWAY_PASSWORD?.trim() || (isRemoteMode ? typeof remote?.password === "string" && remote.password.trim().length > 0 ? remote.password.trim() : void 0 : typeof authPassword === "string" && authPassword.trim().length > 0 ? authPassword.trim() : void 0)
|
|
2308
|
+
};
|
|
2309
|
+
}
|
|
2310
|
+
function pickGatewaySelfPresence(presence) {
|
|
2311
|
+
if (!Array.isArray(presence)) return null;
|
|
2312
|
+
const self = presence.find((e) => e.mode === "gateway" && e.reason === "self") ?? null;
|
|
2313
|
+
if (!self) return null;
|
|
2314
|
+
return {
|
|
2315
|
+
host: typeof self.host === "string" ? self.host : void 0,
|
|
2316
|
+
ip: typeof self.ip === "string" ? self.ip : void 0,
|
|
2317
|
+
version: typeof self.version === "string" ? self.version : void 0,
|
|
2318
|
+
platform: typeof self.platform === "string" ? self.platform : void 0
|
|
2319
|
+
};
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
//#endregion
|
|
2323
|
+
//#region src/commands/status.agent-local.ts
|
|
2324
|
+
async function fileExists(p) {
|
|
2325
|
+
try {
|
|
2326
|
+
await fs$1.access(p);
|
|
2327
|
+
return true;
|
|
2328
|
+
} catch {
|
|
2329
|
+
return false;
|
|
2330
|
+
}
|
|
2331
|
+
}
|
|
2332
|
+
async function getAgentLocalStatuses() {
|
|
2333
|
+
const cfg = loadConfig();
|
|
2334
|
+
const agentList = listAgentsForGateway(cfg);
|
|
2335
|
+
const now = Date.now();
|
|
2336
|
+
const statuses = [];
|
|
2337
|
+
for (const agent of agentList.agents) {
|
|
2338
|
+
const agentId = agent.id;
|
|
2339
|
+
const workspaceDir = (() => {
|
|
2340
|
+
try {
|
|
2341
|
+
return resolveAgentWorkspaceDir(cfg, agentId);
|
|
2342
|
+
} catch {
|
|
2343
|
+
return null;
|
|
2344
|
+
}
|
|
2345
|
+
})();
|
|
2346
|
+
const bootstrapPath = workspaceDir != null ? path.join(workspaceDir, "BOOTSTRAP.md") : null;
|
|
2347
|
+
const bootstrapPending = bootstrapPath != null ? await fileExists(bootstrapPath) : null;
|
|
2348
|
+
const sessionsPath = resolveStorePath(cfg.session?.store, { agentId });
|
|
2349
|
+
const store = (() => {
|
|
2350
|
+
try {
|
|
2351
|
+
return loadSessionStore(sessionsPath);
|
|
2352
|
+
} catch {
|
|
2353
|
+
return {};
|
|
2354
|
+
}
|
|
2355
|
+
})();
|
|
2356
|
+
const sessions = Object.entries(store).filter(([key]) => key !== "global" && key !== "unknown").map(([, entry]) => entry);
|
|
2357
|
+
const sessionsCount = sessions.length;
|
|
2358
|
+
const lastUpdatedAt = sessions.reduce((max, e) => Math.max(max, e?.updatedAt ?? 0), 0);
|
|
2359
|
+
const resolvedLastUpdatedAt = lastUpdatedAt > 0 ? lastUpdatedAt : null;
|
|
2360
|
+
const lastActiveAgeMs = resolvedLastUpdatedAt ? now - resolvedLastUpdatedAt : null;
|
|
2361
|
+
statuses.push({
|
|
2362
|
+
id: agentId,
|
|
2363
|
+
name: agent.name,
|
|
2364
|
+
workspaceDir,
|
|
2365
|
+
bootstrapPending,
|
|
2366
|
+
sessionsPath,
|
|
2367
|
+
sessionsCount,
|
|
2368
|
+
lastUpdatedAt: resolvedLastUpdatedAt,
|
|
2369
|
+
lastActiveAgeMs
|
|
2370
|
+
});
|
|
2371
|
+
}
|
|
2372
|
+
const totalSessions = statuses.reduce((sum, s) => sum + s.sessionsCount, 0);
|
|
2373
|
+
const bootstrapPendingCount = statuses.reduce((sum, s) => sum + (s.bootstrapPending ? 1 : 0), 0);
|
|
2374
|
+
return {
|
|
2375
|
+
defaultId: agentList.defaultId,
|
|
2376
|
+
agents: statuses,
|
|
2377
|
+
totalSessions,
|
|
2378
|
+
bootstrapPendingCount
|
|
2379
|
+
};
|
|
2380
|
+
}
|
|
2381
|
+
|
|
2382
|
+
//#endregion
|
|
2383
|
+
//#region src/commands/status.link-channel.ts
|
|
2384
|
+
async function resolveLinkChannelContext(cfg) {
|
|
2385
|
+
for (const plugin of listChannelPlugins()) {
|
|
2386
|
+
const defaultAccountId = resolveChannelDefaultAccountId({
|
|
2387
|
+
plugin,
|
|
2388
|
+
cfg,
|
|
2389
|
+
accountIds: plugin.config.listAccountIds(cfg)
|
|
2390
|
+
});
|
|
2391
|
+
const account = plugin.config.resolveAccount(cfg, defaultAccountId);
|
|
2392
|
+
const enabled = plugin.config.isEnabled ? plugin.config.isEnabled(account, cfg) : true;
|
|
2393
|
+
const configured = plugin.config.isConfigured ? await plugin.config.isConfigured(account, cfg) : true;
|
|
2394
|
+
const snapshot = plugin.config.describeAccount ? plugin.config.describeAccount(account, cfg) : {
|
|
2395
|
+
accountId: defaultAccountId,
|
|
2396
|
+
enabled,
|
|
2397
|
+
configured
|
|
2398
|
+
};
|
|
2399
|
+
const summaryRecord = plugin.status?.buildChannelSummary ? await plugin.status.buildChannelSummary({
|
|
2400
|
+
account,
|
|
2401
|
+
cfg,
|
|
2402
|
+
defaultAccountId,
|
|
2403
|
+
snapshot
|
|
2404
|
+
}) : void 0;
|
|
2405
|
+
const linked = summaryRecord && typeof summaryRecord.linked === "boolean" ? summaryRecord.linked : null;
|
|
2406
|
+
if (linked === null) continue;
|
|
2407
|
+
return {
|
|
2408
|
+
linked,
|
|
2409
|
+
authAgeMs: summaryRecord && typeof summaryRecord.authAgeMs === "number" ? summaryRecord.authAgeMs : null,
|
|
2410
|
+
account,
|
|
2411
|
+
accountId: defaultAccountId,
|
|
2412
|
+
plugin
|
|
2413
|
+
};
|
|
2414
|
+
}
|
|
2415
|
+
return null;
|
|
2416
|
+
}
|
|
2417
|
+
|
|
2418
|
+
//#endregion
|
|
2419
|
+
//#region src/commands/status.summary.ts
|
|
2420
|
+
const classifyKey = (key, entry) => {
|
|
2421
|
+
if (key === "global") return "global";
|
|
2422
|
+
if (key === "unknown") return "unknown";
|
|
2423
|
+
if (entry?.chatType === "group" || entry?.chatType === "channel") return "group";
|
|
2424
|
+
if (key.includes(":group:") || key.includes(":channel:")) return "group";
|
|
2425
|
+
return "direct";
|
|
2426
|
+
};
|
|
2427
|
+
const buildFlags = (entry) => {
|
|
2428
|
+
if (!entry) return [];
|
|
2429
|
+
const flags = [];
|
|
2430
|
+
const think = entry?.thinkingLevel;
|
|
2431
|
+
if (typeof think === "string" && think.length > 0) flags.push(`think:${think}`);
|
|
2432
|
+
const verbose = entry?.verboseLevel;
|
|
2433
|
+
if (typeof verbose === "string" && verbose.length > 0) flags.push(`verbose:${verbose}`);
|
|
2434
|
+
const reasoning = entry?.reasoningLevel;
|
|
2435
|
+
if (typeof reasoning === "string" && reasoning.length > 0) flags.push(`reasoning:${reasoning}`);
|
|
2436
|
+
const elevated = entry?.elevatedLevel;
|
|
2437
|
+
if (typeof elevated === "string" && elevated.length > 0) flags.push(`elevated:${elevated}`);
|
|
2438
|
+
if (entry?.systemSent) flags.push("system");
|
|
2439
|
+
if (entry?.abortedLastRun) flags.push("aborted");
|
|
2440
|
+
const sessionId = entry?.sessionId;
|
|
2441
|
+
if (typeof sessionId === "string" && sessionId.length > 0) flags.push(`id:${sessionId}`);
|
|
2442
|
+
return flags;
|
|
2443
|
+
};
|
|
2444
|
+
async function getStatusSummary() {
|
|
2445
|
+
const cfg = loadConfig();
|
|
2446
|
+
const linkContext = await resolveLinkChannelContext(cfg);
|
|
2447
|
+
const agentList = listAgentsForGateway(cfg);
|
|
2448
|
+
const heartbeatAgents = agentList.agents.map((agent) => {
|
|
2449
|
+
const summary = resolveHeartbeatSummaryForAgent(cfg, agent.id);
|
|
2450
|
+
return {
|
|
2451
|
+
agentId: agent.id,
|
|
2452
|
+
enabled: summary.enabled,
|
|
2453
|
+
every: summary.every,
|
|
2454
|
+
everyMs: summary.everyMs
|
|
2455
|
+
};
|
|
2456
|
+
});
|
|
2457
|
+
const channelSummary = await buildChannelSummary(cfg, {
|
|
2458
|
+
colorize: true,
|
|
2459
|
+
includeAllowFrom: true
|
|
2460
|
+
});
|
|
2461
|
+
const queuedSystemEvents = peekSystemEvents(resolveMainSessionKey(cfg));
|
|
2462
|
+
const configModel = resolveConfiguredModelRef({
|
|
2463
|
+
cfg,
|
|
2464
|
+
defaultProvider: DEFAULT_PROVIDER,
|
|
2465
|
+
defaultModel: DEFAULT_MODEL
|
|
2466
|
+
}).model ?? DEFAULT_MODEL;
|
|
2467
|
+
const configContextTokens = cfg.agents?.defaults?.contextTokens ?? lookupContextTokens(configModel) ?? DEFAULT_CONTEXT_TOKENS;
|
|
2468
|
+
const now = Date.now();
|
|
2469
|
+
const storeCache = /* @__PURE__ */ new Map();
|
|
2470
|
+
const loadStore = (storePath) => {
|
|
2471
|
+
const cached = storeCache.get(storePath);
|
|
2472
|
+
if (cached) return cached;
|
|
2473
|
+
const store = loadSessionStore(storePath);
|
|
2474
|
+
storeCache.set(storePath, store);
|
|
2475
|
+
return store;
|
|
2476
|
+
};
|
|
2477
|
+
const buildSessionRows = (store, opts = {}) => Object.entries(store).filter(([key]) => key !== "global" && key !== "unknown").map(([key, entry]) => {
|
|
2478
|
+
const updatedAt = entry?.updatedAt ?? null;
|
|
2479
|
+
const age = updatedAt ? now - updatedAt : null;
|
|
2480
|
+
const model = entry?.model ?? configModel ?? null;
|
|
2481
|
+
const contextTokens = entry?.contextTokens ?? lookupContextTokens(model) ?? configContextTokens ?? null;
|
|
2482
|
+
const input = entry?.inputTokens ?? 0;
|
|
2483
|
+
const output = entry?.outputTokens ?? 0;
|
|
2484
|
+
const total = entry?.totalTokens ?? input + output;
|
|
2485
|
+
const remaining = contextTokens != null ? Math.max(0, contextTokens - total) : null;
|
|
2486
|
+
const pct = contextTokens && contextTokens > 0 ? Math.min(999, Math.round(total / contextTokens * 100)) : null;
|
|
2487
|
+
const parsedAgentId = parseAgentSessionKey(key)?.agentId;
|
|
2488
|
+
return {
|
|
2489
|
+
agentId: opts.agentIdOverride ?? parsedAgentId,
|
|
2490
|
+
key,
|
|
2491
|
+
kind: classifyKey(key, entry),
|
|
2492
|
+
sessionId: entry?.sessionId,
|
|
2493
|
+
updatedAt,
|
|
2494
|
+
age,
|
|
2495
|
+
thinkingLevel: entry?.thinkingLevel,
|
|
2496
|
+
verboseLevel: entry?.verboseLevel,
|
|
2497
|
+
reasoningLevel: entry?.reasoningLevel,
|
|
2498
|
+
elevatedLevel: entry?.elevatedLevel,
|
|
2499
|
+
systemSent: entry?.systemSent,
|
|
2500
|
+
abortedLastRun: entry?.abortedLastRun,
|
|
2501
|
+
inputTokens: entry?.inputTokens,
|
|
2502
|
+
outputTokens: entry?.outputTokens,
|
|
2503
|
+
totalTokens: total ?? null,
|
|
2504
|
+
remainingTokens: remaining,
|
|
2505
|
+
percentUsed: pct,
|
|
2506
|
+
model,
|
|
2507
|
+
contextTokens,
|
|
2508
|
+
flags: buildFlags(entry)
|
|
2509
|
+
};
|
|
2510
|
+
}).sort((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
|
|
2511
|
+
const paths = /* @__PURE__ */ new Set();
|
|
2512
|
+
const byAgent = agentList.agents.map((agent) => {
|
|
2513
|
+
const storePath = resolveStorePath(cfg.session?.store, { agentId: agent.id });
|
|
2514
|
+
paths.add(storePath);
|
|
2515
|
+
const sessions = buildSessionRows(loadStore(storePath), { agentIdOverride: agent.id });
|
|
2516
|
+
return {
|
|
2517
|
+
agentId: agent.id,
|
|
2518
|
+
path: storePath,
|
|
2519
|
+
count: sessions.length,
|
|
2520
|
+
recent: sessions.slice(0, 10)
|
|
2521
|
+
};
|
|
2522
|
+
});
|
|
2523
|
+
const allSessions = Array.from(paths).flatMap((storePath) => buildSessionRows(loadStore(storePath))).toSorted((a, b) => (b.updatedAt ?? 0) - (a.updatedAt ?? 0));
|
|
2524
|
+
const recent = allSessions.slice(0, 10);
|
|
2525
|
+
const totalSessions = allSessions.length;
|
|
2526
|
+
return {
|
|
2527
|
+
linkChannel: linkContext ? {
|
|
2528
|
+
id: linkContext.plugin.id,
|
|
2529
|
+
label: linkContext.plugin.meta.label ?? "Channel",
|
|
2530
|
+
linked: linkContext.linked,
|
|
2531
|
+
authAgeMs: linkContext.authAgeMs
|
|
2532
|
+
} : void 0,
|
|
2533
|
+
heartbeat: {
|
|
2534
|
+
defaultAgentId: agentList.defaultId,
|
|
2535
|
+
agents: heartbeatAgents
|
|
2536
|
+
},
|
|
2537
|
+
channelSummary,
|
|
2538
|
+
queuedSystemEvents,
|
|
2539
|
+
sessions: {
|
|
2540
|
+
paths: Array.from(paths),
|
|
2541
|
+
count: totalSessions,
|
|
2542
|
+
defaults: {
|
|
2543
|
+
model: configModel ?? null,
|
|
2544
|
+
contextTokens: configContextTokens ?? null
|
|
2545
|
+
},
|
|
2546
|
+
recent,
|
|
2547
|
+
byAgent
|
|
2548
|
+
}
|
|
2549
|
+
};
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
//#endregion
|
|
2553
|
+
//#region src/commands/status.scan.ts
|
|
2554
|
+
function resolveMemoryPluginStatus(cfg) {
|
|
2555
|
+
if (!(cfg.plugins?.enabled !== false)) return {
|
|
2556
|
+
enabled: false,
|
|
2557
|
+
slot: null,
|
|
2558
|
+
reason: "plugins disabled"
|
|
2559
|
+
};
|
|
2560
|
+
const raw = typeof cfg.plugins?.slots?.memory === "string" ? cfg.plugins.slots.memory.trim() : "";
|
|
2561
|
+
if (raw && raw.toLowerCase() === "none") return {
|
|
2562
|
+
enabled: false,
|
|
2563
|
+
slot: null,
|
|
2564
|
+
reason: "plugins.slots.memory=\"none\""
|
|
2565
|
+
};
|
|
2566
|
+
return {
|
|
2567
|
+
enabled: true,
|
|
2568
|
+
slot: raw || "memory-core"
|
|
2569
|
+
};
|
|
2570
|
+
}
|
|
2571
|
+
async function scanStatus(opts, _runtime) {
|
|
2572
|
+
return await withProgress({
|
|
2573
|
+
label: "Scanning status…",
|
|
2574
|
+
total: 10,
|
|
2575
|
+
enabled: opts.json !== true
|
|
2576
|
+
}, async (progress) => {
|
|
2577
|
+
progress.setLabel("Loading config…");
|
|
2578
|
+
const cfg = loadConfig();
|
|
2579
|
+
const osSummary = resolveOsSummary();
|
|
2580
|
+
progress.tick();
|
|
2581
|
+
progress.setLabel("Checking Tailscale…");
|
|
2582
|
+
const tailscaleMode = cfg.gateway?.tailscale?.mode ?? "off";
|
|
2583
|
+
const tailscaleDns = tailscaleMode === "off" ? null : await getTailnetHostname((cmd, args) => runExec(cmd, args, {
|
|
2584
|
+
timeoutMs: 1200,
|
|
2585
|
+
maxBuffer: 2e5
|
|
2586
|
+
})).catch(() => null);
|
|
2587
|
+
const tailscaleHttpsUrl = tailscaleMode !== "off" && tailscaleDns ? `https://${tailscaleDns}${normalizeControlUiBasePath(cfg.gateway?.controlUi?.basePath)}` : null;
|
|
2588
|
+
progress.tick();
|
|
2589
|
+
progress.setLabel("Checking for updates…");
|
|
2590
|
+
const update = await getUpdateCheckResult({
|
|
2591
|
+
timeoutMs: opts.all ? 6500 : 2500,
|
|
2592
|
+
fetchGit: true,
|
|
2593
|
+
includeRegistry: true
|
|
2594
|
+
});
|
|
2595
|
+
progress.tick();
|
|
2596
|
+
progress.setLabel("Resolving agents…");
|
|
2597
|
+
const agentStatus = await getAgentLocalStatuses();
|
|
2598
|
+
progress.tick();
|
|
2599
|
+
progress.setLabel("Probing gateway…");
|
|
2600
|
+
const gatewayConnection = buildGatewayConnectionDetails();
|
|
2601
|
+
const isRemoteMode = cfg.gateway?.mode === "remote";
|
|
2602
|
+
const remoteUrlRaw = typeof cfg.gateway?.remote?.url === "string" ? cfg.gateway.remote.url : "";
|
|
2603
|
+
const remoteUrlMissing = isRemoteMode && !remoteUrlRaw.trim();
|
|
2604
|
+
const gatewayMode = isRemoteMode ? "remote" : "local";
|
|
2605
|
+
const gatewayProbe = remoteUrlMissing ? null : await probeGateway({
|
|
2606
|
+
url: gatewayConnection.url,
|
|
2607
|
+
auth: resolveGatewayProbeAuth(cfg),
|
|
2608
|
+
timeoutMs: Math.min(opts.all ? 5e3 : 2500, opts.timeoutMs ?? 1e4)
|
|
2609
|
+
}).catch(() => null);
|
|
2610
|
+
const gatewayReachable = gatewayProbe?.ok === true;
|
|
2611
|
+
const gatewaySelf = gatewayProbe?.presence ? pickGatewaySelfPresence(gatewayProbe.presence) : null;
|
|
2612
|
+
progress.tick();
|
|
2613
|
+
progress.setLabel("Querying channel status…");
|
|
2614
|
+
const channelsStatus = gatewayReachable ? await callGateway({
|
|
2615
|
+
method: "channels.status",
|
|
2616
|
+
params: {
|
|
2617
|
+
probe: false,
|
|
2618
|
+
timeoutMs: Math.min(8e3, opts.timeoutMs ?? 1e4)
|
|
2619
|
+
},
|
|
2620
|
+
timeoutMs: Math.min(opts.all ? 5e3 : 2500, opts.timeoutMs ?? 1e4)
|
|
2621
|
+
}).catch(() => null) : null;
|
|
2622
|
+
const channelIssues = channelsStatus ? collectChannelStatusIssues(channelsStatus) : [];
|
|
2623
|
+
progress.tick();
|
|
2624
|
+
progress.setLabel("Summarizing channels…");
|
|
2625
|
+
const channels = await buildChannelsTable(cfg, { showSecrets: process.env.CLAWDBOT_SHOW_SECRETS?.trim() !== "0" });
|
|
2626
|
+
progress.tick();
|
|
2627
|
+
progress.setLabel("Checking memory…");
|
|
2628
|
+
const memoryPlugin = resolveMemoryPluginStatus(cfg);
|
|
2629
|
+
const memory = await (async () => {
|
|
2630
|
+
if (!memoryPlugin.enabled) return null;
|
|
2631
|
+
if (memoryPlugin.slot !== "memory-core") return null;
|
|
2632
|
+
const agentId = agentStatus.defaultId ?? "main";
|
|
2633
|
+
const { manager } = await getMemorySearchManager({
|
|
2634
|
+
cfg,
|
|
2635
|
+
agentId
|
|
2636
|
+
});
|
|
2637
|
+
if (!manager) return null;
|
|
2638
|
+
try {
|
|
2639
|
+
await manager.probeVectorAvailability();
|
|
2640
|
+
} catch {}
|
|
2641
|
+
const status = manager.status();
|
|
2642
|
+
await manager.close?.().catch(() => {});
|
|
2643
|
+
return {
|
|
2644
|
+
agentId,
|
|
2645
|
+
...status
|
|
2646
|
+
};
|
|
2647
|
+
})();
|
|
2648
|
+
progress.tick();
|
|
2649
|
+
progress.setLabel("Reading sessions…");
|
|
2650
|
+
const summary = await getStatusSummary();
|
|
2651
|
+
progress.tick();
|
|
2652
|
+
progress.setLabel("Rendering…");
|
|
2653
|
+
progress.tick();
|
|
2654
|
+
return {
|
|
2655
|
+
cfg,
|
|
2656
|
+
osSummary,
|
|
2657
|
+
tailscaleMode,
|
|
2658
|
+
tailscaleDns,
|
|
2659
|
+
tailscaleHttpsUrl,
|
|
2660
|
+
update,
|
|
2661
|
+
gatewayConnection,
|
|
2662
|
+
remoteUrlMissing,
|
|
2663
|
+
gatewayMode,
|
|
2664
|
+
gatewayProbe,
|
|
2665
|
+
gatewayReachable,
|
|
2666
|
+
gatewaySelf,
|
|
2667
|
+
channelIssues,
|
|
2668
|
+
agentStatus,
|
|
2669
|
+
channels,
|
|
2670
|
+
summary,
|
|
2671
|
+
memory,
|
|
2672
|
+
memoryPlugin
|
|
2673
|
+
};
|
|
2674
|
+
});
|
|
2675
|
+
}
|
|
2676
|
+
|
|
2677
|
+
//#endregion
|
|
2678
|
+
//#region src/commands/status.command.ts
|
|
2679
|
+
async function statusCommand(opts, runtime) {
|
|
2680
|
+
if (opts.all && !opts.json) {
|
|
2681
|
+
await statusAllCommand(runtime, { timeoutMs: opts.timeoutMs });
|
|
2682
|
+
return;
|
|
2683
|
+
}
|
|
2684
|
+
const { cfg, osSummary, tailscaleMode, tailscaleDns, tailscaleHttpsUrl, update, gatewayConnection, remoteUrlMissing, gatewayMode, gatewayProbe, gatewayReachable, gatewaySelf, channelIssues, agentStatus, channels, summary, memory, memoryPlugin } = await scanStatus({
|
|
2685
|
+
json: opts.json,
|
|
2686
|
+
timeoutMs: opts.timeoutMs,
|
|
2687
|
+
all: opts.all
|
|
2688
|
+
}, runtime);
|
|
2689
|
+
const securityAudit = await withProgress({
|
|
2690
|
+
label: "Running security audit…",
|
|
2691
|
+
indeterminate: true,
|
|
2692
|
+
enabled: opts.json !== true
|
|
2693
|
+
}, async () => await runSecurityAudit({
|
|
2694
|
+
config: cfg,
|
|
2695
|
+
deep: false,
|
|
2696
|
+
includeFilesystem: true,
|
|
2697
|
+
includeChannelSecurity: true
|
|
2698
|
+
}));
|
|
2699
|
+
const usage = opts.usage ? await withProgress({
|
|
2700
|
+
label: "Fetching usage snapshot…",
|
|
2701
|
+
indeterminate: true,
|
|
2702
|
+
enabled: opts.json !== true
|
|
2703
|
+
}, async () => await loadProviderUsageSummary({ timeoutMs: opts.timeoutMs })) : void 0;
|
|
2704
|
+
const health = opts.deep ? await withProgress({
|
|
2705
|
+
label: "Checking gateway health…",
|
|
2706
|
+
indeterminate: true,
|
|
2707
|
+
enabled: opts.json !== true
|
|
2708
|
+
}, async () => await callGateway({
|
|
2709
|
+
method: "health",
|
|
2710
|
+
params: { probe: true },
|
|
2711
|
+
timeoutMs: opts.timeoutMs
|
|
2712
|
+
})) : void 0;
|
|
2713
|
+
const lastHeartbeat = opts.deep && gatewayReachable ? await callGateway({
|
|
2714
|
+
method: "last-heartbeat",
|
|
2715
|
+
params: {},
|
|
2716
|
+
timeoutMs: opts.timeoutMs
|
|
2717
|
+
}).catch(() => null) : null;
|
|
2718
|
+
const channelInfo = resolveEffectiveUpdateChannel({
|
|
2719
|
+
configChannel: normalizeUpdateChannel(cfg.update?.channel),
|
|
2720
|
+
installKind: update.installKind,
|
|
2721
|
+
git: update.git ? {
|
|
2722
|
+
tag: update.git.tag,
|
|
2723
|
+
branch: update.git.branch
|
|
2724
|
+
} : void 0
|
|
2725
|
+
});
|
|
2726
|
+
if (opts.json) {
|
|
2727
|
+
const [daemon, nodeDaemon] = await Promise.all([getDaemonStatusSummary(), getNodeDaemonStatusSummary()]);
|
|
2728
|
+
runtime.log(JSON.stringify({
|
|
2729
|
+
...summary,
|
|
2730
|
+
os: osSummary,
|
|
2731
|
+
update,
|
|
2732
|
+
updateChannel: channelInfo.channel,
|
|
2733
|
+
updateChannelSource: channelInfo.source,
|
|
2734
|
+
memory,
|
|
2735
|
+
memoryPlugin,
|
|
2736
|
+
gateway: {
|
|
2737
|
+
mode: gatewayMode,
|
|
2738
|
+
url: gatewayConnection.url,
|
|
2739
|
+
urlSource: gatewayConnection.urlSource,
|
|
2740
|
+
misconfigured: remoteUrlMissing,
|
|
2741
|
+
reachable: gatewayReachable,
|
|
2742
|
+
connectLatencyMs: gatewayProbe?.connectLatencyMs ?? null,
|
|
2743
|
+
self: gatewaySelf,
|
|
2744
|
+
error: gatewayProbe?.error ?? null
|
|
2745
|
+
},
|
|
2746
|
+
gatewayService: daemon,
|
|
2747
|
+
nodeService: nodeDaemon,
|
|
2748
|
+
agents: agentStatus,
|
|
2749
|
+
securityAudit,
|
|
2750
|
+
...health || usage || lastHeartbeat ? {
|
|
2751
|
+
health,
|
|
2752
|
+
usage,
|
|
2753
|
+
lastHeartbeat
|
|
2754
|
+
} : {}
|
|
2755
|
+
}, null, 2));
|
|
2756
|
+
return;
|
|
2757
|
+
}
|
|
2758
|
+
const muted = (value) => theme.muted(value);
|
|
2759
|
+
const ok = (value) => theme.success(value);
|
|
2760
|
+
const warn = (value) => theme.warn(value);
|
|
2761
|
+
if (opts.verbose) {
|
|
2762
|
+
const details = buildGatewayConnectionDetails();
|
|
2763
|
+
runtime.log(info("Gateway connection:"));
|
|
2764
|
+
for (const line of details.message.split("\n")) runtime.log(` ${line}`);
|
|
2765
|
+
runtime.log("");
|
|
2766
|
+
}
|
|
2767
|
+
const tableWidth = Math.max(60, (process.stdout.columns ?? 120) - 1);
|
|
2768
|
+
const dashboard = (() => {
|
|
2769
|
+
if (!(cfg.gateway?.controlUi?.enabled ?? true)) return "disabled";
|
|
2770
|
+
return resolveControlUiLinks({
|
|
2771
|
+
port: resolveGatewayPort(cfg),
|
|
2772
|
+
bind: cfg.gateway?.bind,
|
|
2773
|
+
customBindHost: cfg.gateway?.customBindHost,
|
|
2774
|
+
basePath: cfg.gateway?.controlUi?.basePath
|
|
2775
|
+
}).httpUrl;
|
|
2776
|
+
})();
|
|
2777
|
+
const gatewayValue = (() => {
|
|
2778
|
+
const target = remoteUrlMissing ? `fallback ${gatewayConnection.url}` : `${gatewayConnection.url}${gatewayConnection.urlSource ? ` (${gatewayConnection.urlSource})` : ""}`;
|
|
2779
|
+
const reach = remoteUrlMissing ? warn("misconfigured (remote.url missing)") : gatewayReachable ? ok(`reachable ${formatDuration(gatewayProbe?.connectLatencyMs)}`) : warn(gatewayProbe?.error ? `unreachable (${gatewayProbe.error})` : "unreachable");
|
|
2780
|
+
const auth = gatewayReachable && !remoteUrlMissing ? ` · auth ${formatGatewayAuthUsed(resolveGatewayProbeAuth(cfg))}` : "";
|
|
2781
|
+
const self = gatewaySelf?.host || gatewaySelf?.version || gatewaySelf?.platform ? [
|
|
2782
|
+
gatewaySelf?.host ? gatewaySelf.host : null,
|
|
2783
|
+
gatewaySelf?.ip ? `(${gatewaySelf.ip})` : null,
|
|
2784
|
+
gatewaySelf?.version ? `app ${gatewaySelf.version}` : null,
|
|
2785
|
+
gatewaySelf?.platform ? gatewaySelf.platform : null
|
|
2786
|
+
].filter(Boolean).join(" ") : null;
|
|
2787
|
+
return `${gatewayMode} · ${target} · ${reach}${auth}${self ? ` · ${self}` : ""}`;
|
|
2788
|
+
})();
|
|
2789
|
+
const agentsValue = (() => {
|
|
2790
|
+
const pending = agentStatus.bootstrapPendingCount > 0 ? `${agentStatus.bootstrapPendingCount} bootstrapping` : "no bootstraps";
|
|
2791
|
+
const def = agentStatus.agents.find((a) => a.id === agentStatus.defaultId);
|
|
2792
|
+
const defActive = def?.lastActiveAgeMs != null ? formatAge(def.lastActiveAgeMs) : "unknown";
|
|
2793
|
+
const defSuffix = def ? ` · default ${def.id} active ${defActive}` : "";
|
|
2794
|
+
return `${agentStatus.agents.length} · ${pending} · sessions ${agentStatus.totalSessions}${defSuffix}`;
|
|
2795
|
+
})();
|
|
2796
|
+
const [daemon, nodeDaemon] = await Promise.all([getDaemonStatusSummary(), getNodeDaemonStatusSummary()]);
|
|
2797
|
+
const daemonValue = (() => {
|
|
2798
|
+
if (daemon.installed === false) return `${daemon.label} not installed`;
|
|
2799
|
+
const installedPrefix = daemon.installed === true ? "installed · " : "";
|
|
2800
|
+
return `${daemon.label} ${installedPrefix}${daemon.loadedText}${daemon.runtimeShort ? ` · ${daemon.runtimeShort}` : ""}`;
|
|
2801
|
+
})();
|
|
2802
|
+
const nodeDaemonValue = (() => {
|
|
2803
|
+
if (nodeDaemon.installed === false) return `${nodeDaemon.label} not installed`;
|
|
2804
|
+
const installedPrefix = nodeDaemon.installed === true ? "installed · " : "";
|
|
2805
|
+
return `${nodeDaemon.label} ${installedPrefix}${nodeDaemon.loadedText}${nodeDaemon.runtimeShort ? ` · ${nodeDaemon.runtimeShort}` : ""}`;
|
|
2806
|
+
})();
|
|
2807
|
+
const defaults = summary.sessions.defaults;
|
|
2808
|
+
const defaultCtx = defaults.contextTokens ? ` (${formatKTokens(defaults.contextTokens)} ctx)` : "";
|
|
2809
|
+
const eventsValue = summary.queuedSystemEvents.length > 0 ? `${summary.queuedSystemEvents.length} queued` : "none";
|
|
2810
|
+
const probesValue = health ? ok("enabled") : muted("skipped (use --deep)");
|
|
2811
|
+
const heartbeatValue = (() => {
|
|
2812
|
+
const parts = summary.heartbeat.agents.map((agent) => {
|
|
2813
|
+
if (!agent.enabled || !agent.everyMs) return `disabled (${agent.agentId})`;
|
|
2814
|
+
return `${agent.every} (${agent.agentId})`;
|
|
2815
|
+
}).filter(Boolean);
|
|
2816
|
+
return parts.length > 0 ? parts.join(", ") : "disabled";
|
|
2817
|
+
})();
|
|
2818
|
+
const lastHeartbeatValue = (() => {
|
|
2819
|
+
if (!opts.deep) return null;
|
|
2820
|
+
if (!gatewayReachable) return warn("unavailable");
|
|
2821
|
+
if (!lastHeartbeat) return muted("none");
|
|
2822
|
+
const age = formatAge(Date.now() - lastHeartbeat.ts);
|
|
2823
|
+
const channel = lastHeartbeat.channel ?? "unknown";
|
|
2824
|
+
const accountLabel = lastHeartbeat.accountId ? `account ${lastHeartbeat.accountId}` : null;
|
|
2825
|
+
return [
|
|
2826
|
+
lastHeartbeat.status,
|
|
2827
|
+
`${age} ago`,
|
|
2828
|
+
channel,
|
|
2829
|
+
accountLabel
|
|
2830
|
+
].filter(Boolean).join(" · ");
|
|
2831
|
+
})();
|
|
2832
|
+
const storeLabel = summary.sessions.paths.length > 1 ? `${summary.sessions.paths.length} stores` : summary.sessions.paths[0] ?? "unknown";
|
|
2833
|
+
const memoryValue = (() => {
|
|
2834
|
+
if (!memoryPlugin.enabled) return muted(`disabled${memoryPlugin.reason ? ` (${memoryPlugin.reason})` : ""}`);
|
|
2835
|
+
if (!memory) return muted(`enabled (${memoryPlugin.slot ? `plugin ${memoryPlugin.slot}` : "plugin"}) · unavailable`);
|
|
2836
|
+
const parts = [];
|
|
2837
|
+
const dirtySuffix = memory.dirty ? ` · ${warn("dirty")}` : "";
|
|
2838
|
+
parts.push(`${memory.files} files · ${memory.chunks} chunks${dirtySuffix}`);
|
|
2839
|
+
if (memory.sources?.length) parts.push(`sources ${memory.sources.join(", ")}`);
|
|
2840
|
+
if (memoryPlugin.slot) parts.push(`plugin ${memoryPlugin.slot}`);
|
|
2841
|
+
const colorByTone = (tone, text) => tone === "ok" ? ok(text) : tone === "warn" ? warn(text) : muted(text);
|
|
2842
|
+
const vector = memory.vector;
|
|
2843
|
+
if (vector) {
|
|
2844
|
+
const state = resolveMemoryVectorState(vector);
|
|
2845
|
+
const label = state.state === "disabled" ? "vector off" : `vector ${state.state}`;
|
|
2846
|
+
parts.push(colorByTone(state.tone, label));
|
|
2847
|
+
}
|
|
2848
|
+
const fts = memory.fts;
|
|
2849
|
+
if (fts) {
|
|
2850
|
+
const state = resolveMemoryFtsState(fts);
|
|
2851
|
+
const label = state.state === "disabled" ? "fts off" : `fts ${state.state}`;
|
|
2852
|
+
parts.push(colorByTone(state.tone, label));
|
|
2853
|
+
}
|
|
2854
|
+
const cache = memory.cache;
|
|
2855
|
+
if (cache) {
|
|
2856
|
+
const summary = resolveMemoryCacheSummary(cache);
|
|
2857
|
+
parts.push(colorByTone(summary.tone, summary.text));
|
|
2858
|
+
}
|
|
2859
|
+
return parts.join(" · ");
|
|
2860
|
+
})();
|
|
2861
|
+
const updateAvailability = resolveUpdateAvailability(update);
|
|
2862
|
+
const updateLine = formatUpdateOneLiner(update).replace(/^Update:\s*/i, "");
|
|
2863
|
+
const channelLabel = formatUpdateChannelLabel({
|
|
2864
|
+
channel: channelInfo.channel,
|
|
2865
|
+
source: channelInfo.source,
|
|
2866
|
+
gitTag: update.git?.tag ?? null,
|
|
2867
|
+
gitBranch: update.git?.branch ?? null
|
|
2868
|
+
});
|
|
2869
|
+
const gitLabel = update.installKind === "git" ? (() => {
|
|
2870
|
+
const shortSha = update.git?.sha ? update.git.sha.slice(0, 8) : null;
|
|
2871
|
+
const branch = update.git?.branch && update.git.branch !== "HEAD" ? update.git.branch : null;
|
|
2872
|
+
const tag = update.git?.tag ?? null;
|
|
2873
|
+
return [
|
|
2874
|
+
branch ?? (tag ? "detached" : "git"),
|
|
2875
|
+
tag ? `tag ${tag}` : null,
|
|
2876
|
+
shortSha ? `@ ${shortSha}` : null
|
|
2877
|
+
].filter(Boolean).join(" · ");
|
|
2878
|
+
})() : null;
|
|
2879
|
+
const overviewRows = [
|
|
2880
|
+
{
|
|
2881
|
+
Item: "Dashboard",
|
|
2882
|
+
Value: dashboard
|
|
2883
|
+
},
|
|
2884
|
+
{
|
|
2885
|
+
Item: "OS",
|
|
2886
|
+
Value: `${osSummary.label} · node ${process.versions.node}`
|
|
2887
|
+
},
|
|
2888
|
+
{
|
|
2889
|
+
Item: "Tailscale",
|
|
2890
|
+
Value: tailscaleMode === "off" ? muted("off") : tailscaleDns && tailscaleHttpsUrl ? `${tailscaleMode} · ${tailscaleDns} · ${tailscaleHttpsUrl}` : warn(`${tailscaleMode} · magicdns unknown`)
|
|
2891
|
+
},
|
|
2892
|
+
{
|
|
2893
|
+
Item: "Channel",
|
|
2894
|
+
Value: channelLabel
|
|
2895
|
+
},
|
|
2896
|
+
...gitLabel ? [{
|
|
2897
|
+
Item: "Git",
|
|
2898
|
+
Value: gitLabel
|
|
2899
|
+
}] : [],
|
|
2900
|
+
{
|
|
2901
|
+
Item: "Update",
|
|
2902
|
+
Value: updateAvailability.available ? warn(`available · ${updateLine}`) : updateLine
|
|
2903
|
+
},
|
|
2904
|
+
{
|
|
2905
|
+
Item: "Gateway",
|
|
2906
|
+
Value: gatewayValue
|
|
2907
|
+
},
|
|
2908
|
+
{
|
|
2909
|
+
Item: "Gateway service",
|
|
2910
|
+
Value: daemonValue
|
|
2911
|
+
},
|
|
2912
|
+
{
|
|
2913
|
+
Item: "Node service",
|
|
2914
|
+
Value: nodeDaemonValue
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
Item: "Agents",
|
|
2918
|
+
Value: agentsValue
|
|
2919
|
+
},
|
|
2920
|
+
{
|
|
2921
|
+
Item: "Memory",
|
|
2922
|
+
Value: memoryValue
|
|
2923
|
+
},
|
|
2924
|
+
{
|
|
2925
|
+
Item: "Probes",
|
|
2926
|
+
Value: probesValue
|
|
2927
|
+
},
|
|
2928
|
+
{
|
|
2929
|
+
Item: "Events",
|
|
2930
|
+
Value: eventsValue
|
|
2931
|
+
},
|
|
2932
|
+
{
|
|
2933
|
+
Item: "Heartbeat",
|
|
2934
|
+
Value: heartbeatValue
|
|
2935
|
+
},
|
|
2936
|
+
...lastHeartbeatValue ? [{
|
|
2937
|
+
Item: "Last heartbeat",
|
|
2938
|
+
Value: lastHeartbeatValue
|
|
2939
|
+
}] : [],
|
|
2940
|
+
{
|
|
2941
|
+
Item: "Sessions",
|
|
2942
|
+
Value: `${summary.sessions.count} active · default ${defaults.model ?? "unknown"}${defaultCtx} · ${storeLabel}`
|
|
2943
|
+
}
|
|
2944
|
+
];
|
|
2945
|
+
runtime.log(theme.heading("OpenClaw status"));
|
|
2946
|
+
runtime.log("");
|
|
2947
|
+
runtime.log(theme.heading("Overview"));
|
|
2948
|
+
runtime.log(renderTable({
|
|
2949
|
+
width: tableWidth,
|
|
2950
|
+
columns: [{
|
|
2951
|
+
key: "Item",
|
|
2952
|
+
header: "Item",
|
|
2953
|
+
minWidth: 12
|
|
2954
|
+
}, {
|
|
2955
|
+
key: "Value",
|
|
2956
|
+
header: "Value",
|
|
2957
|
+
flex: true,
|
|
2958
|
+
minWidth: 32
|
|
2959
|
+
}],
|
|
2960
|
+
rows: overviewRows
|
|
2961
|
+
}).trimEnd());
|
|
2962
|
+
runtime.log("");
|
|
2963
|
+
runtime.log(theme.heading("Security audit"));
|
|
2964
|
+
const fmtSummary = (value) => {
|
|
2965
|
+
return [
|
|
2966
|
+
theme.error(`${value.critical} critical`),
|
|
2967
|
+
theme.warn(`${value.warn} warn`),
|
|
2968
|
+
theme.muted(`${value.info} info`)
|
|
2969
|
+
].join(" · ");
|
|
2970
|
+
};
|
|
2971
|
+
runtime.log(theme.muted(`Summary: ${fmtSummary(securityAudit.summary)}`));
|
|
2972
|
+
const importantFindings = securityAudit.findings.filter((f) => f.severity === "critical" || f.severity === "warn");
|
|
2973
|
+
if (importantFindings.length === 0) runtime.log(theme.muted("No critical or warn findings detected."));
|
|
2974
|
+
else {
|
|
2975
|
+
const severityLabel = (sev) => {
|
|
2976
|
+
if (sev === "critical") return theme.error("CRITICAL");
|
|
2977
|
+
if (sev === "warn") return theme.warn("WARN");
|
|
2978
|
+
return theme.muted("INFO");
|
|
2979
|
+
};
|
|
2980
|
+
const sevRank = (sev) => sev === "critical" ? 0 : sev === "warn" ? 1 : 2;
|
|
2981
|
+
const sorted = [...importantFindings].toSorted((a, b) => sevRank(a.severity) - sevRank(b.severity));
|
|
2982
|
+
const shown = sorted.slice(0, 6);
|
|
2983
|
+
for (const f of shown) {
|
|
2984
|
+
runtime.log(` ${severityLabel(f.severity)} ${f.title}`);
|
|
2985
|
+
runtime.log(` ${shortenText(f.detail.replaceAll("\n", " "), 160)}`);
|
|
2986
|
+
if (f.remediation?.trim()) runtime.log(` ${theme.muted(`Fix: ${f.remediation.trim()}`)}`);
|
|
2987
|
+
}
|
|
2988
|
+
if (sorted.length > shown.length) runtime.log(theme.muted(`… +${sorted.length - shown.length} more`));
|
|
2989
|
+
}
|
|
2990
|
+
runtime.log(theme.muted(`Full report: ${formatCliCommand("openclaw security audit")}`));
|
|
2991
|
+
runtime.log(theme.muted(`Deep probe: ${formatCliCommand("openclaw security audit --deep")}`));
|
|
2992
|
+
runtime.log("");
|
|
2993
|
+
runtime.log(theme.heading("Channels"));
|
|
2994
|
+
const channelIssuesByChannel = (() => {
|
|
2995
|
+
const map = /* @__PURE__ */ new Map();
|
|
2996
|
+
for (const issue of channelIssues) {
|
|
2997
|
+
const key = issue.channel;
|
|
2998
|
+
const list = map.get(key);
|
|
2999
|
+
if (list) list.push(issue);
|
|
3000
|
+
else map.set(key, [issue]);
|
|
3001
|
+
}
|
|
3002
|
+
return map;
|
|
3003
|
+
})();
|
|
3004
|
+
runtime.log(renderTable({
|
|
3005
|
+
width: tableWidth,
|
|
3006
|
+
columns: [
|
|
3007
|
+
{
|
|
3008
|
+
key: "Channel",
|
|
3009
|
+
header: "Channel",
|
|
3010
|
+
minWidth: 10
|
|
3011
|
+
},
|
|
3012
|
+
{
|
|
3013
|
+
key: "Enabled",
|
|
3014
|
+
header: "Enabled",
|
|
3015
|
+
minWidth: 7
|
|
3016
|
+
},
|
|
3017
|
+
{
|
|
3018
|
+
key: "State",
|
|
3019
|
+
header: "State",
|
|
3020
|
+
minWidth: 8
|
|
3021
|
+
},
|
|
3022
|
+
{
|
|
3023
|
+
key: "Detail",
|
|
3024
|
+
header: "Detail",
|
|
3025
|
+
flex: true,
|
|
3026
|
+
minWidth: 24
|
|
3027
|
+
}
|
|
3028
|
+
],
|
|
3029
|
+
rows: channels.rows.map((row) => {
|
|
3030
|
+
const issues = channelIssuesByChannel.get(row.id) ?? [];
|
|
3031
|
+
const effectiveState = row.state === "off" ? "off" : issues.length > 0 ? "warn" : row.state;
|
|
3032
|
+
const issueSuffix = issues.length > 0 ? ` · ${warn(`gateway: ${shortenText(issues[0]?.message ?? "issue", 84)}`)}` : "";
|
|
3033
|
+
return {
|
|
3034
|
+
Channel: row.label,
|
|
3035
|
+
Enabled: row.enabled ? ok("ON") : muted("OFF"),
|
|
3036
|
+
State: effectiveState === "ok" ? ok("OK") : effectiveState === "warn" ? warn("WARN") : effectiveState === "off" ? muted("OFF") : theme.accentDim("SETUP"),
|
|
3037
|
+
Detail: `${row.detail}${issueSuffix}`
|
|
3038
|
+
};
|
|
3039
|
+
})
|
|
3040
|
+
}).trimEnd());
|
|
3041
|
+
runtime.log("");
|
|
3042
|
+
runtime.log(theme.heading("Sessions"));
|
|
3043
|
+
runtime.log(renderTable({
|
|
3044
|
+
width: tableWidth,
|
|
3045
|
+
columns: [
|
|
3046
|
+
{
|
|
3047
|
+
key: "Key",
|
|
3048
|
+
header: "Key",
|
|
3049
|
+
minWidth: 20,
|
|
3050
|
+
flex: true
|
|
3051
|
+
},
|
|
3052
|
+
{
|
|
3053
|
+
key: "Kind",
|
|
3054
|
+
header: "Kind",
|
|
3055
|
+
minWidth: 6
|
|
3056
|
+
},
|
|
3057
|
+
{
|
|
3058
|
+
key: "Age",
|
|
3059
|
+
header: "Age",
|
|
3060
|
+
minWidth: 9
|
|
3061
|
+
},
|
|
3062
|
+
{
|
|
3063
|
+
key: "Model",
|
|
3064
|
+
header: "Model",
|
|
3065
|
+
minWidth: 14
|
|
3066
|
+
},
|
|
3067
|
+
{
|
|
3068
|
+
key: "Tokens",
|
|
3069
|
+
header: "Tokens",
|
|
3070
|
+
minWidth: 16
|
|
3071
|
+
}
|
|
3072
|
+
],
|
|
3073
|
+
rows: summary.sessions.recent.length > 0 ? summary.sessions.recent.map((sess) => ({
|
|
3074
|
+
Key: shortenText(sess.key, 32),
|
|
3075
|
+
Kind: sess.kind,
|
|
3076
|
+
Age: sess.updatedAt ? formatAge(sess.age) : "no activity",
|
|
3077
|
+
Model: sess.model ?? "unknown",
|
|
3078
|
+
Tokens: formatTokensCompact(sess)
|
|
3079
|
+
})) : [{
|
|
3080
|
+
Key: muted("no sessions yet"),
|
|
3081
|
+
Kind: "",
|
|
3082
|
+
Age: "",
|
|
3083
|
+
Model: "",
|
|
3084
|
+
Tokens: ""
|
|
3085
|
+
}]
|
|
3086
|
+
}).trimEnd());
|
|
3087
|
+
if (summary.queuedSystemEvents.length > 0) {
|
|
3088
|
+
runtime.log("");
|
|
3089
|
+
runtime.log(theme.heading("System events"));
|
|
3090
|
+
runtime.log(renderTable({
|
|
3091
|
+
width: tableWidth,
|
|
3092
|
+
columns: [{
|
|
3093
|
+
key: "Event",
|
|
3094
|
+
header: "Event",
|
|
3095
|
+
flex: true,
|
|
3096
|
+
minWidth: 24
|
|
3097
|
+
}],
|
|
3098
|
+
rows: summary.queuedSystemEvents.slice(0, 5).map((event) => ({ Event: event }))
|
|
3099
|
+
}).trimEnd());
|
|
3100
|
+
if (summary.queuedSystemEvents.length > 5) runtime.log(muted(`… +${summary.queuedSystemEvents.length - 5} more`));
|
|
3101
|
+
}
|
|
3102
|
+
if (health) {
|
|
3103
|
+
runtime.log("");
|
|
3104
|
+
runtime.log(theme.heading("Health"));
|
|
3105
|
+
const rows = [];
|
|
3106
|
+
rows.push({
|
|
3107
|
+
Item: "Gateway",
|
|
3108
|
+
Status: ok("reachable"),
|
|
3109
|
+
Detail: `${health.durationMs}ms`
|
|
3110
|
+
});
|
|
3111
|
+
for (const line of formatHealthChannelLines(health, { accountMode: "all" })) {
|
|
3112
|
+
const colon = line.indexOf(":");
|
|
3113
|
+
if (colon === -1) continue;
|
|
3114
|
+
const item = line.slice(0, colon).trim();
|
|
3115
|
+
const detail = line.slice(colon + 1).trim();
|
|
3116
|
+
const normalized = detail.toLowerCase();
|
|
3117
|
+
const status = (() => {
|
|
3118
|
+
if (normalized.startsWith("ok")) return ok("OK");
|
|
3119
|
+
if (normalized.startsWith("failed")) return warn("WARN");
|
|
3120
|
+
if (normalized.startsWith("not configured")) return muted("OFF");
|
|
3121
|
+
if (normalized.startsWith("configured")) return ok("OK");
|
|
3122
|
+
if (normalized.startsWith("linked")) return ok("LINKED");
|
|
3123
|
+
if (normalized.startsWith("not linked")) return warn("UNLINKED");
|
|
3124
|
+
return warn("WARN");
|
|
3125
|
+
})();
|
|
3126
|
+
rows.push({
|
|
3127
|
+
Item: item,
|
|
3128
|
+
Status: status,
|
|
3129
|
+
Detail: detail
|
|
3130
|
+
});
|
|
3131
|
+
}
|
|
3132
|
+
runtime.log(renderTable({
|
|
3133
|
+
width: tableWidth,
|
|
3134
|
+
columns: [
|
|
3135
|
+
{
|
|
3136
|
+
key: "Item",
|
|
3137
|
+
header: "Item",
|
|
3138
|
+
minWidth: 10
|
|
3139
|
+
},
|
|
3140
|
+
{
|
|
3141
|
+
key: "Status",
|
|
3142
|
+
header: "Status",
|
|
3143
|
+
minWidth: 8
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
key: "Detail",
|
|
3147
|
+
header: "Detail",
|
|
3148
|
+
flex: true,
|
|
3149
|
+
minWidth: 28
|
|
3150
|
+
}
|
|
3151
|
+
],
|
|
3152
|
+
rows
|
|
3153
|
+
}).trimEnd());
|
|
3154
|
+
}
|
|
3155
|
+
if (usage) {
|
|
3156
|
+
runtime.log("");
|
|
3157
|
+
runtime.log(theme.heading("Usage"));
|
|
3158
|
+
for (const line of formatUsageReportLines(usage)) runtime.log(line);
|
|
3159
|
+
}
|
|
3160
|
+
runtime.log("");
|
|
3161
|
+
runtime.log("FAQ: https://docs.openclaw.ai/faq");
|
|
3162
|
+
runtime.log("Troubleshooting: https://docs.openclaw.ai/troubleshooting");
|
|
3163
|
+
runtime.log("");
|
|
3164
|
+
const updateHint = formatUpdateAvailableHint(update);
|
|
3165
|
+
if (updateHint) {
|
|
3166
|
+
runtime.log(theme.warn(updateHint));
|
|
3167
|
+
runtime.log("");
|
|
3168
|
+
}
|
|
3169
|
+
runtime.log("Next steps:");
|
|
3170
|
+
runtime.log(` Need to share? ${formatCliCommand("openclaw status --all")}`);
|
|
3171
|
+
runtime.log(` Need to debug live? ${formatCliCommand("openclaw logs --follow")}`);
|
|
3172
|
+
if (gatewayReachable) runtime.log(` Need to test channels? ${formatCliCommand("openclaw status --deep")}`);
|
|
3173
|
+
else runtime.log(` Fix reachability first: ${formatCliCommand("openclaw gateway probe")}`);
|
|
3174
|
+
}
|
|
3175
|
+
|
|
3176
|
+
//#endregion
|
|
3177
|
+
export { findAgentEntryIndex as a, pruneAgentConfig as c, parseIdentityMarkdown as d, runOnboardingWizard as f, buildAgentSummaries as i, identityHasValues as l, getStatusSummary as n, listAgentEntries as o, applyAgentConfig as r, loadAgentIdentity as s, statusCommand as t, loadAgentIdentityFromWorkspace as u };
|