@quantumclaw/quantumclaw 2026.3.22
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 +4601 -0
- package/LICENSE +21 -0
- package/README.md +559 -0
- package/assets/avatar-placeholder.svg +19 -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/dmg-background-small.png +0 -0
- package/assets/dmg-background.png +0 -0
- package/docs/.i18n/README.md +31 -0
- package/docs/.i18n/glossary.ja-JP.json +14 -0
- package/docs/.i18n/glossary.zh-CN.json +302 -0
- package/docs/.i18n/ja-JP.tm.jsonl +0 -0
- package/docs/assets/install-script.svg +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/pixel-lobster.svg +60 -0
- package/docs/assets/quantumclaw-logo-text-dark.png +0 -0
- package/docs/assets/quantumclaw-logo-text-dark.svg +418 -0
- package/docs/assets/quantumclaw-logo-text.png +0 -0
- package/docs/assets/quantumclaw-logo-text.svg +418 -0
- package/docs/assets/showcase/agents-ui.jpg +0 -0
- package/docs/assets/showcase/bambu-cli.png +0 -0
- package/docs/assets/showcase/codexmonitor.png +0 -0
- package/docs/assets/showcase/gohome-grafana.png +0 -0
- package/docs/assets/showcase/ios-testflight.jpg +0 -0
- package/docs/assets/showcase/oura-health.png +0 -0
- package/docs/assets/showcase/padel-cli.svg +11 -0
- package/docs/assets/showcase/padel-screenshot.jpg +0 -0
- package/docs/assets/showcase/papla-tts.jpg +0 -0
- package/docs/assets/showcase/pr-review-telegram.jpg +0 -0
- package/docs/assets/showcase/roborock-screenshot.jpg +0 -0
- package/docs/assets/showcase/roborock-status.svg +13 -0
- package/docs/assets/showcase/roof-camera-sky.jpg +0 -0
- package/docs/assets/showcase/snag.png +0 -0
- package/docs/assets/showcase/tesco-shop.jpg +0 -0
- package/docs/assets/showcase/wienerlinien.png +0 -0
- package/docs/assets/showcase/wine-cellar-skill.jpg +0 -0
- package/docs/assets/showcase/winix-air-purifier.jpg +0 -0
- package/docs/assets/showcase/xuezh-pronunciation.jpeg +0 -0
- package/docs/assets/sponsors/blacksmith.svg +14 -0
- package/docs/assets/sponsors/convex.svg +16 -0
- package/docs/assets/sponsors/openai.svg +3 -0
- package/docs/assets/sponsors/vercel.svg +5 -0
- package/docs/auth-credential-semantics.md +53 -0
- package/docs/automation/auth-monitoring.md +44 -0
- package/docs/automation/cron-jobs.md +727 -0
- package/docs/automation/cron-vs-heartbeat.md +286 -0
- package/docs/automation/gmail-pubsub.md +256 -0
- package/docs/automation/hooks.md +1056 -0
- package/docs/automation/poll.md +86 -0
- package/docs/automation/standing-orders.md +251 -0
- package/docs/automation/troubleshooting.md +122 -0
- package/docs/automation/webhook.md +217 -0
- package/docs/brave-search.md +93 -0
- package/docs/channels/bluebubbles.md +347 -0
- package/docs/channels/broadcast-groups.md +442 -0
- package/docs/channels/channel-routing.md +139 -0
- package/docs/channels/discord.md +1229 -0
- package/docs/channels/feishu.md +747 -0
- package/docs/channels/googlechat.md +261 -0
- package/docs/channels/group-messages.md +84 -0
- package/docs/channels/groups.md +379 -0
- package/docs/channels/imessage.md +367 -0
- package/docs/channels/index.md +47 -0
- package/docs/channels/irc.md +242 -0
- package/docs/channels/line.md +194 -0
- package/docs/channels/location.md +56 -0
- package/docs/channels/matrix.md +677 -0
- package/docs/channels/mattermost.md +427 -0
- package/docs/channels/msteams.md +780 -0
- package/docs/channels/nextcloud-talk.md +138 -0
- package/docs/channels/nostr.md +249 -0
- package/docs/channels/pairing.md +114 -0
- package/docs/channels/signal.md +329 -0
- package/docs/channels/slack.md +603 -0
- package/docs/channels/synology-chat.md +134 -0
- package/docs/channels/telegram.md +987 -0
- package/docs/channels/tlon.md +276 -0
- package/docs/channels/troubleshooting.md +118 -0
- package/docs/channels/twitch.md +379 -0
- package/docs/channels/whatsapp.md +460 -0
- package/docs/channels/zalo.md +243 -0
- package/docs/channels/zalouser.md +181 -0
- package/docs/ci.md +55 -0
- package/docs/cli/acp.md +288 -0
- package/docs/cli/agent.md +29 -0
- package/docs/cli/agents.md +123 -0
- package/docs/cli/approvals.md +50 -0
- package/docs/cli/backup.md +76 -0
- package/docs/cli/browser.md +106 -0
- package/docs/cli/channels.md +102 -0
- package/docs/cli/clawbot.md +21 -0
- package/docs/cli/completion.md +35 -0
- package/docs/cli/config.md +295 -0
- package/docs/cli/configure.md +36 -0
- package/docs/cli/cron.md +77 -0
- package/docs/cli/daemon.md +53 -0
- package/docs/cli/dashboard.md +22 -0
- package/docs/cli/devices.md +139 -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 +48 -0
- package/docs/cli/gateway.md +235 -0
- package/docs/cli/health.md +21 -0
- package/docs/cli/hooks.md +329 -0
- package/docs/cli/index.md +1150 -0
- package/docs/cli/logs.md +28 -0
- package/docs/cli/memory.md +66 -0
- package/docs/cli/message.md +278 -0
- package/docs/cli/models.md +81 -0
- package/docs/cli/node.md +127 -0
- package/docs/cli/nodes.md +75 -0
- package/docs/cli/onboard.md +157 -0
- package/docs/cli/pairing.md +32 -0
- package/docs/cli/plugins.md +210 -0
- package/docs/cli/qr.md +46 -0
- package/docs/cli/reset.md +20 -0
- package/docs/cli/sandbox.md +197 -0
- package/docs/cli/secrets.md +188 -0
- package/docs/cli/security.md +79 -0
- package/docs/cli/sessions.md +110 -0
- package/docs/cli/setup.md +29 -0
- package/docs/cli/skills.md +36 -0
- package/docs/cli/status.md +30 -0
- package/docs/cli/system.md +60 -0
- package/docs/cli/tui.md +30 -0
- package/docs/cli/uninstall.md +20 -0
- package/docs/cli/update.md +103 -0
- package/docs/cli/voicecall.md +34 -0
- package/docs/cli/webhooks.md +25 -0
- package/docs/concepts/agent-loop.md +148 -0
- package/docs/concepts/agent-workspace.md +236 -0
- package/docs/concepts/agent.md +122 -0
- package/docs/concepts/architecture.md +137 -0
- package/docs/concepts/compaction.md +123 -0
- package/docs/concepts/context-engine.md +268 -0
- package/docs/concepts/context.md +172 -0
- package/docs/concepts/delegate-architecture.md +296 -0
- package/docs/concepts/features.md +73 -0
- package/docs/concepts/markdown-formatting.md +130 -0
- package/docs/concepts/memory.md +108 -0
- package/docs/concepts/messages.md +154 -0
- package/docs/concepts/model-failover.md +152 -0
- package/docs/concepts/model-providers.md +607 -0
- package/docs/concepts/models.md +225 -0
- package/docs/concepts/multi-agent.md +552 -0
- package/docs/concepts/oauth.md +158 -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 +121 -0
- package/docs/concepts/session-tool.md +242 -0
- package/docs/concepts/session.md +310 -0
- package/docs/concepts/streaming.md +155 -0
- package/docs/concepts/system-prompt.md +132 -0
- package/docs/concepts/timezone.md +91 -0
- package/docs/concepts/typebox.md +291 -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 +2078 -0
- package/docs/gateway/authentication.md +179 -0
- package/docs/gateway/background-process.md +97 -0
- package/docs/gateway/bonjour.md +177 -0
- package/docs/gateway/bridge-protocol.md +91 -0
- package/docs/gateway/cli-backends.md +225 -0
- package/docs/gateway/configuration-examples.md +651 -0
- package/docs/gateway/configuration-reference.md +3123 -0
- package/docs/gateway/configuration.md +633 -0
- package/docs/gateway/discovery.md +123 -0
- package/docs/gateway/doctor.md +362 -0
- package/docs/gateway/gateway-lock.md +34 -0
- package/docs/gateway/health.md +44 -0
- package/docs/gateway/heartbeat.md +393 -0
- package/docs/gateway/index.md +261 -0
- package/docs/gateway/local-models.md +152 -0
- package/docs/gateway/logging.md +113 -0
- package/docs/gateway/multiple-gateways.md +112 -0
- package/docs/gateway/network-model.md +22 -0
- package/docs/gateway/openai-http-api.md +132 -0
- package/docs/gateway/openresponses-http-api.md +295 -0
- package/docs/gateway/openshell.md +307 -0
- package/docs/gateway/pairing.md +99 -0
- package/docs/gateway/protocol.md +267 -0
- package/docs/gateway/remote-gateway-readme.md +158 -0
- package/docs/gateway/remote.md +153 -0
- package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +134 -0
- package/docs/gateway/sandboxing.md +469 -0
- package/docs/gateway/secrets-plan-contract.md +116 -0
- package/docs/gateway/secrets.md +503 -0
- package/docs/gateway/security/index.md +1220 -0
- package/docs/gateway/tailscale.md +132 -0
- package/docs/gateway/tools-invoke-http-api.md +118 -0
- package/docs/gateway/troubleshooting.md +378 -0
- package/docs/gateway/trusted-proxy-auth.md +330 -0
- package/docs/help/debugging.md +168 -0
- package/docs/help/environment.md +163 -0
- package/docs/help/faq.md +2997 -0
- package/docs/help/index.md +28 -0
- package/docs/help/scripts.md +28 -0
- package/docs/help/testing.md +526 -0
- package/docs/help/troubleshooting.md +297 -0
- package/docs/images/configure-model-picker-unsearchable.png +0 -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/feishu-verification-token.png +0 -0
- package/docs/images/groups-flow.svg +52 -0
- package/docs/images/mobile-ui-screenshot.png +0 -0
- package/docs/index.md +196 -0
- package/docs/install/ansible.md +230 -0
- package/docs/install/azure.md +311 -0
- package/docs/install/bun.md +55 -0
- package/docs/install/development-channels.md +120 -0
- package/docs/install/digitalocean.md +129 -0
- package/docs/install/docker-vm-runtime.md +142 -0
- package/docs/install/docker.md +375 -0
- package/docs/install/exe-dev.md +126 -0
- package/docs/install/fly.md +501 -0
- package/docs/install/gcp.md +402 -0
- package/docs/install/hetzner.md +251 -0
- package/docs/install/index.md +183 -0
- package/docs/install/installer.md +415 -0
- package/docs/install/kubernetes.md +191 -0
- package/docs/install/macos-vm.md +281 -0
- package/docs/install/migrating-matrix.md +346 -0
- package/docs/install/migrating.md +110 -0
- package/docs/install/nix.md +89 -0
- package/docs/install/node.md +138 -0
- package/docs/install/northflank.mdx +54 -0
- package/docs/install/oracle.md +156 -0
- package/docs/install/podman.md +133 -0
- package/docs/install/railway.mdx +100 -0
- package/docs/install/raspberry-pi.md +159 -0
- package/docs/install/render.mdx +169 -0
- package/docs/install/uninstall.md +128 -0
- package/docs/install/updating.md +128 -0
- package/docs/ja-JP/index.md +186 -0
- package/docs/ja-JP/start/getting-started.md +125 -0
- package/docs/ja-JP/start/wizard.md +77 -0
- package/docs/logging.md +352 -0
- package/docs/nav-tabs-underline.js +100 -0
- package/docs/network.md +54 -0
- package/docs/nodes/audio.md +187 -0
- package/docs/nodes/camera.md +162 -0
- package/docs/nodes/images.md +72 -0
- package/docs/nodes/index.md +393 -0
- package/docs/nodes/location-command.md +98 -0
- package/docs/nodes/media-understanding.md +394 -0
- package/docs/nodes/talk.md +92 -0
- package/docs/nodes/troubleshooting.md +114 -0
- package/docs/nodes/voicewake.md +66 -0
- package/docs/perplexity.md +174 -0
- package/docs/pi-dev.md +80 -0
- package/docs/pi.md +567 -0
- package/docs/platforms/android.md +168 -0
- package/docs/platforms/digitalocean.md +266 -0
- package/docs/platforms/index.md +54 -0
- package/docs/platforms/ios.md +220 -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/remote.md +84 -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 +226 -0
- package/docs/platforms/oracle.md +303 -0
- package/docs/platforms/raspberry-pi.md +412 -0
- package/docs/platforms/windows.md +241 -0
- package/docs/plugins/agent-tools.md +10 -0
- package/docs/plugins/architecture.md +1366 -0
- package/docs/plugins/building-extensions.md +10 -0
- package/docs/plugins/building-plugins.md +239 -0
- package/docs/plugins/bundles.md +181 -0
- package/docs/plugins/community.md +145 -0
- package/docs/plugins/manifest.md +241 -0
- package/docs/plugins/sdk-channel-plugins.md +370 -0
- package/docs/plugins/sdk-entrypoints.md +161 -0
- package/docs/plugins/sdk-migration.md +172 -0
- package/docs/plugins/sdk-overview.md +196 -0
- package/docs/plugins/sdk-provider-plugins.md +370 -0
- package/docs/plugins/sdk-runtime.md +345 -0
- package/docs/plugins/sdk-setup.md +331 -0
- package/docs/plugins/sdk-testing.md +263 -0
- package/docs/plugins/voice-call.md +380 -0
- package/docs/plugins/zalouser.md +77 -0
- package/docs/prose.md +134 -0
- package/docs/providers/anthropic.md +259 -0
- package/docs/providers/bedrock.md +176 -0
- package/docs/providers/claude-max-api-proxy.md +154 -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 +43 -0
- package/docs/providers/google.md +78 -0
- package/docs/providers/groq.md +96 -0
- package/docs/providers/huggingface.md +209 -0
- package/docs/providers/index.md +69 -0
- package/docs/providers/kilocode.md +74 -0
- package/docs/providers/litellm.md +154 -0
- package/docs/providers/minimax.md +224 -0
- package/docs/providers/mistral.md +54 -0
- package/docs/providers/models.md +45 -0
- package/docs/providers/modelstudio.md +66 -0
- package/docs/providers/moonshot.md +175 -0
- package/docs/providers/nvidia.md +55 -0
- package/docs/providers/ollama.md +352 -0
- package/docs/providers/openai.md +303 -0
- package/docs/providers/opencode-go.md +45 -0
- package/docs/providers/opencode.md +64 -0
- package/docs/providers/openrouter.md +37 -0
- package/docs/providers/perplexity-provider.md +62 -0
- package/docs/providers/qianfan.md +38 -0
- package/docs/providers/qwen.md +53 -0
- package/docs/providers/sglang.md +104 -0
- package/docs/providers/synthetic.md +99 -0
- package/docs/providers/together.md +66 -0
- package/docs/providers/venice.md +282 -0
- package/docs/providers/vercel-ai-gateway.md +60 -0
- package/docs/providers/vllm.md +92 -0
- package/docs/providers/volcengine.md +74 -0
- package/docs/providers/xai.md +60 -0
- package/docs/providers/xiaomi.md +86 -0
- package/docs/providers/zai.md +46 -0
- package/docs/reference/AGENTS.default.md +126 -0
- package/docs/reference/RELEASING.md +42 -0
- package/docs/reference/api-usage-costs.md +144 -0
- package/docs/reference/credits.md +30 -0
- package/docs/reference/device-models.md +47 -0
- package/docs/reference/memory-config.md +711 -0
- package/docs/reference/prompt-caching.md +185 -0
- package/docs/reference/rpc.md +43 -0
- package/docs/reference/secretref-credential-surface.md +140 -0
- package/docs/reference/secretref-user-supplied-credentials-matrix.json +563 -0
- package/docs/reference/session-management-compaction.md +324 -0
- package/docs/reference/templates/AGENTS.dev.md +83 -0
- package/docs/reference/templates/AGENTS.md +219 -0
- package/docs/reference/templates/BOOT.md +11 -0
- package/docs/reference/templates/BOOTSTRAP.md +62 -0
- package/docs/reference/templates/HEARTBEAT.md +14 -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 +43 -0
- package/docs/reference/templates/TOOLS.dev.md +24 -0
- package/docs/reference/templates/TOOLS.md +47 -0
- package/docs/reference/templates/USER.dev.md +18 -0
- package/docs/reference/templates/USER.md +23 -0
- package/docs/reference/test.md +90 -0
- package/docs/reference/token-use.md +175 -0
- package/docs/reference/transcript-hygiene.md +151 -0
- package/docs/reference/wizard.md +235 -0
- package/docs/security/CONTRIBUTING-THREAT-MODEL.md +98 -0
- package/docs/security/THREAT-MODEL-ATLAS.md +611 -0
- package/docs/security/formal-verification.md +167 -0
- package/docs/start/bootstrapping.md +41 -0
- package/docs/start/docs-directory.md +66 -0
- package/docs/start/getting-started.md +116 -0
- package/docs/start/hubs.md +198 -0
- package/docs/start/lore.md +219 -0
- package/docs/start/onboarding-overview.md +67 -0
- package/docs/start/onboarding.md +91 -0
- package/docs/start/openclaw.md +221 -0
- package/docs/start/quickstart.md +22 -0
- package/docs/start/setup.md +164 -0
- package/docs/start/showcase.md +418 -0
- package/docs/start/wizard-cli-automation.md +215 -0
- package/docs/start/wizard-cli-reference.md +299 -0
- package/docs/start/wizard.md +125 -0
- package/docs/style.css +37 -0
- package/docs/tools/acp-agents.md +623 -0
- package/docs/tools/agent-send.md +100 -0
- package/docs/tools/apply-patch.md +51 -0
- package/docs/tools/brave-search.md +93 -0
- package/docs/tools/browser-linux-troubleshooting.md +138 -0
- package/docs/tools/browser-login.md +73 -0
- package/docs/tools/browser-wsl2-windows-remote-cdp-troubleshooting.md +211 -0
- package/docs/tools/browser.md +731 -0
- package/docs/tools/btw.md +142 -0
- package/docs/tools/capability-cookbook.md +119 -0
- package/docs/tools/clawhub.md +298 -0
- package/docs/tools/creating-skills.md +117 -0
- package/docs/tools/diffs.md +386 -0
- package/docs/tools/elevated.md +114 -0
- package/docs/tools/exec-approvals.md +430 -0
- package/docs/tools/exec.md +207 -0
- package/docs/tools/firecrawl.md +140 -0
- package/docs/tools/index.md +137 -0
- package/docs/tools/llm-task.md +119 -0
- package/docs/tools/lobster.md +340 -0
- package/docs/tools/loop-detection.md +100 -0
- package/docs/tools/multi-agent-sandbox-tools.md +364 -0
- package/docs/tools/pdf.md +156 -0
- package/docs/tools/perplexity-search.md +174 -0
- package/docs/tools/plugin.md +255 -0
- package/docs/tools/reactions.md +64 -0
- package/docs/tools/skills-config.md +86 -0
- package/docs/tools/skills.md +309 -0
- package/docs/tools/slash-commands.md +294 -0
- package/docs/tools/subagents.md +295 -0
- package/docs/tools/tavily.md +125 -0
- package/docs/tools/thinking.md +96 -0
- package/docs/tools/tts.md +406 -0
- package/docs/tools/web.md +516 -0
- package/docs/tts.md +406 -0
- package/docs/vps.md +112 -0
- package/docs/web/control-ui.md +275 -0
- package/docs/web/dashboard.md +54 -0
- package/docs/web/index.md +120 -0
- package/docs/web/tui.md +170 -0
- package/docs/web/webchat.md +61 -0
- package/docs/whatsapp-openclaw-ai-zh.jpg +0 -0
- package/docs/whatsapp-openclaw.jpg +0 -0
- package/docs/zh-CN/AGENTS.md +61 -0
- package/docs/zh-CN/automation/auth-monitoring.md +47 -0
- package/docs/zh-CN/automation/cron-jobs.md +435 -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 +1051 -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 +60 -0
- package/docs/zh-CN/channels/bluebubbles.md +354 -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 +728 -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 +249 -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/synology-chat.md +138 -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 +298 -0
- package/docs/zh-CN/cli/index.md +1143 -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 +164 -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 +606 -0
- package/docs/zh-CN/concepts/models.md +225 -0
- package/docs/zh-CN/concepts/multi-agent.md +372 -0
- package/docs/zh-CN/concepts/oauth.md +164 -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/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/gateway/authentication.md +184 -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-reference.md +3103 -0
- package/docs/zh-CN/gateway/configuration.md +640 -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 +159 -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 +2640 -0
- package/docs/zh-CN/help/index.md +28 -0
- package/docs/zh-CN/help/scripts.md +35 -0
- package/docs/zh-CN/help/testing.md +375 -0
- package/docs/zh-CN/help/troubleshooting.md +104 -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 +133 -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 +235 -0
- package/docs/zh-CN/install/installer.md +422 -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 +102 -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 +273 -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 +100 -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/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 +416 -0
- package/docs/zh-CN/platforms/windows.md +247 -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 +265 -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/cloudflare-ai-gateway.md +78 -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 +50 -0
- package/docs/zh-CN/providers/huggingface.md +216 -0
- package/docs/zh-CN/providers/index.md +69 -0
- package/docs/zh-CN/providers/kilocode.md +80 -0
- package/docs/zh-CN/providers/litellm.md +160 -0
- package/docs/zh-CN/providers/minimax.md +222 -0
- package/docs/zh-CN/providers/mistral.md +61 -0
- package/docs/zh-CN/providers/models.md +51 -0
- package/docs/zh-CN/providers/moonshot.md +182 -0
- package/docs/zh-CN/providers/nvidia.md +62 -0
- package/docs/zh-CN/providers/ollama.md +359 -0
- package/docs/zh-CN/providers/openai.md +308 -0
- package/docs/zh-CN/providers/opencode-go.md +52 -0
- package/docs/zh-CN/providers/opencode.md +71 -0
- package/docs/zh-CN/providers/openrouter.md +44 -0
- package/docs/zh-CN/providers/qianfan.md +45 -0
- package/docs/zh-CN/providers/qwen.md +55 -0
- package/docs/zh-CN/providers/sglang.md +111 -0
- package/docs/zh-CN/providers/synthetic.md +106 -0
- package/docs/zh-CN/providers/together.md +72 -0
- package/docs/zh-CN/providers/venice.md +289 -0
- package/docs/zh-CN/providers/vercel-ai-gateway.md +66 -0
- package/docs/zh-CN/providers/xiaomi.md +93 -0
- package/docs/zh-CN/providers/zai.md +53 -0
- package/docs/zh-CN/reference/AGENTS.default.md +131 -0
- package/docs/zh-CN/reference/RELEASING.md +48 -0
- package/docs/zh-CN/reference/api-usage-costs.md +141 -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 +242 -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 +143 -0
- package/docs/zh-CN/start/hubs.md +194 -0
- package/docs/zh-CN/start/lore.md +226 -0
- package/docs/zh-CN/start/onboarding-overview.md +58 -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-cli-automation.md +222 -0
- package/docs/zh-CN/start/wizard-cli-reference.md +306 -0
- package/docs/zh-CN/start/wizard.md +132 -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 +1612 -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 +167 -0
- package/docs/zh-CN/tools/thinking.md +80 -0
- package/docs/zh-CN/tools/web.md +289 -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/package.json +841 -0
- package/quantumclaw.mjs +135 -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 +118 -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 +295 -0
- package/skills/discord/SKILL.md +197 -0
- package/skills/eightctl/SKILL.md +50 -0
- package/skills/gemini/SKILL.md +43 -0
- package/skills/gh-issues/SKILL.md +865 -0
- package/skills/gifgrep/SKILL.md +79 -0
- package/skills/github/SKILL.md +163 -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 +122 -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 +320 -0
- package/skills/model-usage/scripts/test_model_usage.py +40 -0
- package/skills/nano-pdf/SKILL.md +38 -0
- package/skills/node-connect/SKILL.md +142 -0
- package/skills/notion/SKILL.md +174 -0
- package/skills/obsidian/SKILL.md +81 -0
- package/skills/openai-image-gen/SKILL.md +92 -0
- package/skills/openai-image-gen/scripts/gen.py +328 -0
- package/skills/openai-image-gen/scripts/test_gen.py +140 -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 +112 -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 +372 -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 +139 -0
- package/skills/skill-creator/scripts/quick_validate.py +159 -0
- package/skills/skill-creator/scripts/test_package_skill.py +160 -0
- package/skills/skill-creator/scripts/test_quick_validate.py +72 -0
- package/skills/slack/SKILL.md +144 -0
- package/skills/songsee/SKILL.md +49 -0
- package/skills/sonoscli/SKILL.md +65 -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 +153 -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 +112 -0
- package/skills/xurl/SKILL.md +461 -0
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
---
|
|
2
|
+
read_when:
|
|
3
|
+
- 调整心跳频率或消息时
|
|
4
|
+
- 在心跳和 cron 之间选择定时任务方案时
|
|
5
|
+
summary: 心跳轮询消息和通知规则
|
|
6
|
+
title: 心跳
|
|
7
|
+
x-i18n:
|
|
8
|
+
generated_at: "2026-02-03T07:48:57Z"
|
|
9
|
+
model: claude-opus-4-5
|
|
10
|
+
provider: pi
|
|
11
|
+
source_hash: 18b017066aa2c41811b985564dd389834906f4576e85b576fb357a0eff482e69
|
|
12
|
+
source_path: gateway/heartbeat.md
|
|
13
|
+
workflow: 15
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
# 心跳(Gateway 网关)
|
|
17
|
+
|
|
18
|
+
> **心跳 vs Cron?** 参见 [Cron vs 心跳](/automation/cron-vs-heartbeat) 了解何时使用哪种方案。
|
|
19
|
+
|
|
20
|
+
心跳在主会话中运行**周期性智能体轮次**,使模型能够在不打扰你的情况下提醒需要关注的事项。
|
|
21
|
+
|
|
22
|
+
## 快速开始(新手)
|
|
23
|
+
|
|
24
|
+
1. 保持心跳启用(默认 `30m`,Anthropic OAuth/setup-token 为 `1h`)或设置你自己的频率。
|
|
25
|
+
2. 在智能体工作区创建一个简单的 `HEARTBEAT.md` 检查清单(可选但推荐)。
|
|
26
|
+
3. 决定心跳消息发送到哪里(默认 `target: "last"`)。
|
|
27
|
+
4. 可选:启用心跳推理内容发送以提高透明度。
|
|
28
|
+
5. 可选:将心跳限制在活动时段(本地时间)。
|
|
29
|
+
|
|
30
|
+
配置示例:
|
|
31
|
+
|
|
32
|
+
```json5
|
|
33
|
+
{
|
|
34
|
+
agents: {
|
|
35
|
+
defaults: {
|
|
36
|
+
heartbeat: {
|
|
37
|
+
every: "30m",
|
|
38
|
+
target: "last",
|
|
39
|
+
// activeHours: { start: "08:00", end: "24:00" },
|
|
40
|
+
// includeReasoning: true, // 可选:同时发送单独的 `Reasoning:` 消息
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## 默认值
|
|
48
|
+
|
|
49
|
+
- 间隔:`30m`(当检测到的认证模式为 Anthropic OAuth/setup-token 时为 `1h`)。设置 `agents.defaults.heartbeat.every` 或单智能体 `agents.list[].heartbeat.every`;使用 `0m` 禁用。
|
|
50
|
+
- 提示内容(可通过 `agents.defaults.heartbeat.prompt` 配置):
|
|
51
|
+
`Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`
|
|
52
|
+
- 心跳提示**原样**作为用户消息发送。系统提示包含"Heartbeat"部分,运行在内部被标记。
|
|
53
|
+
- 活动时段(`heartbeat.activeHours`)按配置的时区检查。在时段外,心跳会被跳过直到下一个时段内的时钟周期。
|
|
54
|
+
|
|
55
|
+
## 心跳提示的用途
|
|
56
|
+
|
|
57
|
+
默认提示故意设计得比较宽泛:
|
|
58
|
+
|
|
59
|
+
- **后台任务**:"Consider outstanding tasks"促使智能体审查待办事项(收件箱、日历、提醒、排队工作)并提醒任何紧急事项。
|
|
60
|
+
- **人类签到**:"Checkup sometimes on your human during day time"促使偶尔发送轻量级的"有什么需要帮助的吗?"消息,但通过使用你配置的本地时区避免夜间打扰(参见 [/concepts/timezone](/concepts/timezone))。
|
|
61
|
+
|
|
62
|
+
如果你希望心跳执行非常具体的任务(例如"检查 Gmail PubSub 统计"或"验证 Gateway 网关健康状态"),将 `agents.defaults.heartbeat.prompt`(或 `agents.list[].heartbeat.prompt`)设置为自定义内容(原样发送)。
|
|
63
|
+
|
|
64
|
+
## 响应约定
|
|
65
|
+
|
|
66
|
+
- 如果没有需要关注的事项,回复 **`HEARTBEAT_OK`**。
|
|
67
|
+
- 在心跳运行期间,当 `HEARTBEAT_OK` 出现在回复的**开头或结尾**时,QuantumClaw 将其视为确认。该标记会被移除,如果剩余内容 **≤ `ackMaxChars`**(默认:300),则回复被丢弃。
|
|
68
|
+
- 如果 `HEARTBEAT_OK` 出现在回复的**中间**,则不会被特殊处理。
|
|
69
|
+
- 对于警报,**不要**包含 `HEARTBEAT_OK`;只返回警报文本。
|
|
70
|
+
|
|
71
|
+
在心跳之外,消息开头/结尾的意外 `HEARTBEAT_OK` 会被移除并记录日志;仅包含 `HEARTBEAT_OK` 的消息会被丢弃。
|
|
72
|
+
|
|
73
|
+
## 配置
|
|
74
|
+
|
|
75
|
+
```json5
|
|
76
|
+
{
|
|
77
|
+
agents: {
|
|
78
|
+
defaults: {
|
|
79
|
+
heartbeat: {
|
|
80
|
+
every: "30m", // 默认:30m(0m 禁用)
|
|
81
|
+
model: "anthropic/claude-opus-4-5",
|
|
82
|
+
includeReasoning: false, // 默认:false(可用时发送单独的 Reasoning: 消息)
|
|
83
|
+
target: "last", // last | none | <channel id>(核心或插件,例如 "bluebubbles")
|
|
84
|
+
to: "+15551234567", // 可选的渠道特定覆盖
|
|
85
|
+
prompt: "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.",
|
|
86
|
+
ackMaxChars: 300, // HEARTBEAT_OK 后允许的最大字符数
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
},
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 作用域和优先级
|
|
94
|
+
|
|
95
|
+
- `agents.defaults.heartbeat` 设置全局心跳行为。
|
|
96
|
+
- `agents.list[].heartbeat` 在其之上合并;如果任何智能体有 `heartbeat` 块,**只有这些智能体**运行心跳。
|
|
97
|
+
- `channels.defaults.heartbeat` 为所有渠道设置可见性默认值。
|
|
98
|
+
- `channels.<channel>.heartbeat` 覆盖渠道默认值。
|
|
99
|
+
- `channels.<channel>.accounts.<id>.heartbeat`(多账户渠道)覆盖单渠道设置。
|
|
100
|
+
|
|
101
|
+
### 单智能体心跳
|
|
102
|
+
|
|
103
|
+
如果任何 `agents.list[]` 条目包含 `heartbeat` 块,**只有这些智能体**运行心跳。单智能体块在 `agents.defaults.heartbeat` 之上合并(因此你可以设置一次共享默认值,然后按智能体覆盖)。
|
|
104
|
+
|
|
105
|
+
示例:两个智能体,只有第二个智能体运行心跳。
|
|
106
|
+
|
|
107
|
+
```json5
|
|
108
|
+
{
|
|
109
|
+
agents: {
|
|
110
|
+
defaults: {
|
|
111
|
+
heartbeat: {
|
|
112
|
+
every: "30m",
|
|
113
|
+
target: "last",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
list: [
|
|
117
|
+
{ id: "main", default: true },
|
|
118
|
+
{
|
|
119
|
+
id: "ops",
|
|
120
|
+
heartbeat: {
|
|
121
|
+
every: "1h",
|
|
122
|
+
target: "whatsapp",
|
|
123
|
+
to: "+15551234567",
|
|
124
|
+
prompt: "Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 字段说明
|
|
133
|
+
|
|
134
|
+
- `every`:心跳间隔(时长字符串;默认单位 = 分钟)。
|
|
135
|
+
- `model`:心跳运行的可选模型覆盖(`provider/model`)。
|
|
136
|
+
- `includeReasoning`:启用时,也会发送单独的 `Reasoning:` 消息(如果可用)(与 `/reasoning on` 格式相同)。
|
|
137
|
+
- `session`:心跳运行的可选会话键。
|
|
138
|
+
- `main`(默认):智能体主会话。
|
|
139
|
+
- 显式会话键(从 `quantumclaw sessions --json` 或 [sessions CLI](/cli/sessions) 复制)。
|
|
140
|
+
- 会话键格式:参见[会话](/concepts/session)和[群组](/channels/groups)。
|
|
141
|
+
- `target`:
|
|
142
|
+
- `last`(默认):发送到最后使用的外部渠道。
|
|
143
|
+
- 显式渠道:`whatsapp` / `telegram` / `discord` / `googlechat` / `slack` / `msteams` / `signal` / `imessage`。
|
|
144
|
+
- `none`:运行心跳但**不发送**到外部。
|
|
145
|
+
- `to`:可选的收件人覆盖(渠道特定 ID,例如 WhatsApp 的 E.164 或 Telegram 聊天 ID)。
|
|
146
|
+
- `prompt`:覆盖默认提示内容(不合并)。
|
|
147
|
+
- `ackMaxChars`:`HEARTBEAT_OK` 后在发送前允许的最大字符数。
|
|
148
|
+
|
|
149
|
+
## 发送行为
|
|
150
|
+
|
|
151
|
+
- 心跳默认在智能体主会话中运行(`agent:<id>:<mainKey>`),或当 `session.scope = "global"` 时在 `global` 中运行。设置 `session` 可覆盖为特定渠道会话(Discord/WhatsApp 等)。
|
|
152
|
+
- `session` 只影响运行上下文;发送由 `target` 和 `to` 控制。
|
|
153
|
+
- 要发送到特定渠道/收件人,设置 `target` + `to`。使用 `target: "last"` 时,发送使用该会话的最后一个外部渠道。
|
|
154
|
+
- 如果主队列繁忙,心跳会被跳过并稍后重试。
|
|
155
|
+
- 如果 `target` 解析为无外部目标,运行仍会发生但不会发送出站消息。
|
|
156
|
+
- 仅心跳回复**不会**保持会话活跃;最后的 `updatedAt` 会被恢复,因此空闲过期正常工作。
|
|
157
|
+
|
|
158
|
+
## 可见性控制
|
|
159
|
+
|
|
160
|
+
默认情况下,`HEARTBEAT_OK` 确认会被抑制,而警报内容会被发送。你可以按渠道或按账户调整:
|
|
161
|
+
|
|
162
|
+
```yaml
|
|
163
|
+
channels:
|
|
164
|
+
defaults:
|
|
165
|
+
heartbeat:
|
|
166
|
+
showOk: false # 隐藏 HEARTBEAT_OK(默认)
|
|
167
|
+
showAlerts: true # 显示警报消息(默认)
|
|
168
|
+
useIndicator: true # 发出指示器事件(默认)
|
|
169
|
+
telegram:
|
|
170
|
+
heartbeat:
|
|
171
|
+
showOk: true # 在 Telegram 上显示 OK 确认
|
|
172
|
+
whatsapp:
|
|
173
|
+
accounts:
|
|
174
|
+
work:
|
|
175
|
+
heartbeat:
|
|
176
|
+
showAlerts: false # 为此账户抑制警报发送
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
优先级:单账户 → 单渠道 → 渠道默认值 → 内置默认值。
|
|
180
|
+
|
|
181
|
+
### 各标志的作用
|
|
182
|
+
|
|
183
|
+
- `showOk`:当模型返回仅 OK 的回复时,发送 `HEARTBEAT_OK` 确认。
|
|
184
|
+
- `showAlerts`:当模型返回非 OK 回复时,发送警报内容。
|
|
185
|
+
- `useIndicator`:为 UI 状态界面发出指示器事件。
|
|
186
|
+
|
|
187
|
+
如果**所有三个**都为 false,QuantumClaw 会完全跳过心跳运行(不调用模型)。
|
|
188
|
+
|
|
189
|
+
### 单渠道 vs 单账户示例
|
|
190
|
+
|
|
191
|
+
```yaml
|
|
192
|
+
channels:
|
|
193
|
+
defaults:
|
|
194
|
+
heartbeat:
|
|
195
|
+
showOk: false
|
|
196
|
+
showAlerts: true
|
|
197
|
+
useIndicator: true
|
|
198
|
+
slack:
|
|
199
|
+
heartbeat:
|
|
200
|
+
showOk: true # 所有 Slack 账户
|
|
201
|
+
accounts:
|
|
202
|
+
ops:
|
|
203
|
+
heartbeat:
|
|
204
|
+
showAlerts: false # 仅为 ops 账户抑制警报
|
|
205
|
+
telegram:
|
|
206
|
+
heartbeat:
|
|
207
|
+
showOk: true
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### 常见模式
|
|
211
|
+
|
|
212
|
+
| 目标 | 配置 |
|
|
213
|
+
| ----------------------------- | ---------------------------------------------------------------------------------------- |
|
|
214
|
+
| 默认行为(静默 OK,警报开启) | _(无需配置)_ |
|
|
215
|
+
| 完全静默(无消息,无指示器) | `channels.defaults.heartbeat: { showOk: false, showAlerts: false, useIndicator: false }` |
|
|
216
|
+
| 仅指示器(无消息) | `channels.defaults.heartbeat: { showOk: false, showAlerts: false, useIndicator: true }` |
|
|
217
|
+
| 仅在一个渠道显示 OK | `channels.telegram.heartbeat: { showOk: true }` |
|
|
218
|
+
|
|
219
|
+
## HEARTBEAT.md(可选)
|
|
220
|
+
|
|
221
|
+
如果工作区中存在 `HEARTBEAT.md` 文件,默认提示会告诉智能体读取它。把它想象成你的"心跳检查清单":小巧、稳定,可以安全地每 30 分钟包含一次。
|
|
222
|
+
|
|
223
|
+
如果 `HEARTBEAT.md` 存在但实际上是空的(只有空行和 markdown 标题如 `# Heading`),QuantumClaw 会跳过心跳运行以节省 API 调用。如果文件不存在,心跳仍会运行,由模型决定做什么。
|
|
224
|
+
|
|
225
|
+
保持它小巧(简短的检查清单或提醒)以避免提示膨胀。
|
|
226
|
+
|
|
227
|
+
`HEARTBEAT.md` 示例:
|
|
228
|
+
|
|
229
|
+
```md
|
|
230
|
+
# Heartbeat checklist
|
|
231
|
+
|
|
232
|
+
- Quick scan: anything urgent in inboxes?
|
|
233
|
+
- If it's daytime, do a lightweight check-in if nothing else is pending.
|
|
234
|
+
- If a task is blocked, write down _what is missing_ and ask Peter next time.
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
### 智能体可以更新 HEARTBEAT.md 吗?
|
|
238
|
+
|
|
239
|
+
可以 — 如果你要求它这样做。
|
|
240
|
+
|
|
241
|
+
`HEARTBEAT.md` 只是智能体工作区中的普通文件,所以你可以在普通聊天中告诉智能体:
|
|
242
|
+
|
|
243
|
+
- "更新 `HEARTBEAT.md` 添加每日日历检查。"
|
|
244
|
+
- "重写 `HEARTBEAT.md`,使其更短并专注于收件箱跟进。"
|
|
245
|
+
|
|
246
|
+
如果你希望这主动发生,你也可以在心跳提示中包含明确的一行,如:"If the checklist becomes stale, update HEARTBEAT.md with a better one."
|
|
247
|
+
|
|
248
|
+
安全提示:不要在 `HEARTBEAT.md` 中放置密钥(API 密钥、电话号码、私有令牌)— 它会成为提示上下文的一部分。
|
|
249
|
+
|
|
250
|
+
## 手动唤醒(按需)
|
|
251
|
+
|
|
252
|
+
你可以排队一个系统事件并触发即时心跳:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
quantumclaw system event --text "Check for urgent follow-ups" --mode now
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
如果多个智能体配置了 `heartbeat`,手动唤醒会立即运行每个智能体的心跳。
|
|
259
|
+
|
|
260
|
+
使用 `--mode next-heartbeat` 等待下一个计划的时钟周期。
|
|
261
|
+
|
|
262
|
+
## 推理内容发送(可选)
|
|
263
|
+
|
|
264
|
+
默认情况下,心跳只发送最终的"答案"负载。
|
|
265
|
+
|
|
266
|
+
如果你想要透明度,请启用:
|
|
267
|
+
|
|
268
|
+
- `agents.defaults.heartbeat.includeReasoning: true`
|
|
269
|
+
|
|
270
|
+
启用后,心跳还会发送一条以 `Reasoning:` 为前缀的单独消息(与 `/reasoning on` 格式相同)。当智能体管理多个会话/代码库并且你想了解它为什么决定联系你时,这很有用 — 但它也可能泄露比你想要的更多内部细节。在群聊中建议保持关闭。
|
|
271
|
+
|
|
272
|
+
## 成本意识
|
|
273
|
+
|
|
274
|
+
心跳运行完整的智能体轮次。更短的间隔消耗更多 token。保持 `HEARTBEAT.md` 小巧,如果你只想要内部状态更新,考虑使用更便宜的 `model` 或 `target: "none"`。
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
---
|
|
2
|
+
read_when:
|
|
3
|
+
- 运行或调试 Gateway 网关进程时
|
|
4
|
+
summary: Gateway 网关服务、生命周期和运维的运行手册
|
|
5
|
+
title: Gateway 网关运行手册
|
|
6
|
+
x-i18n:
|
|
7
|
+
generated_at: "2026-02-03T07:50:03Z"
|
|
8
|
+
model: claude-opus-4-5
|
|
9
|
+
provider: pi
|
|
10
|
+
source_hash: 497d58090faaa6bdae62780ce887b40a1ad81e2e99ff186ea2a5c2249c35d9ba
|
|
11
|
+
source_path: gateway/index.md
|
|
12
|
+
workflow: 15
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Gateway 网关服务运行手册
|
|
16
|
+
|
|
17
|
+
最后更新:2025-12-09
|
|
18
|
+
|
|
19
|
+
## 是什么
|
|
20
|
+
|
|
21
|
+
- 拥有单一 Baileys/Telegram 连接和控制/事件平面的常驻进程。
|
|
22
|
+
- 替代旧版 `gateway` 命令。CLI 入口点:`quantumclaw gateway`。
|
|
23
|
+
- 运行直到停止;出现致命错误时以非零退出码退出,以便 supervisor 重启它。
|
|
24
|
+
|
|
25
|
+
## 如何运行(本地)
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
quantumclaw gateway --port 18789
|
|
29
|
+
# 在 stdio 中获取完整的调试/追踪日志:
|
|
30
|
+
quantumclaw gateway --port 18789 --verbose
|
|
31
|
+
# 如果端口被占用,终止监听器然后启动:
|
|
32
|
+
quantumclaw gateway --force
|
|
33
|
+
# 开发循环(TS 更改时自动重载):
|
|
34
|
+
pnpm gateway:watch
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
- 配置热重载监视 `~/.quantumclaw/quantumclaw.json`(或 `QUANTUMCLAW_CONFIG_PATH`)。
|
|
38
|
+
- 默认模式:`gateway.reload.mode="hybrid"`(热应用安全更改,关键更改时重启)。
|
|
39
|
+
- 热重载在需要时通过 **SIGUSR1** 使用进程内重启。
|
|
40
|
+
- 使用 `gateway.reload.mode="off"` 禁用。
|
|
41
|
+
- 将 WebSocket 控制平面绑定到 `127.0.0.1:<port>`(默认 18789)。
|
|
42
|
+
- 同一端口也提供 HTTP 服务(控制界面、hooks、A2UI)。单端口多路复用。
|
|
43
|
+
- OpenAI Chat Completions(HTTP):[`/v1/chat/completions`](/gateway/openai-http-api)。
|
|
44
|
+
- OpenResponses(HTTP):[`/v1/responses`](/gateway/openresponses-http-api)。
|
|
45
|
+
- Tools Invoke(HTTP):[`/tools/invoke`](/gateway/tools-invoke-http-api)。
|
|
46
|
+
- 默认在 `canvasHost.port`(默认 `18793`)上启动 Canvas 文件服务器,从 `~/.quantumclaw/workspace/canvas` 提供 `http://<gateway-host>:18793/__quantumclaw__/canvas/`。使用 `canvasHost.enabled=false` 或 `QUANTUMCLAW_SKIP_CANVAS_HOST=1` 禁用。
|
|
47
|
+
- 输出日志到 stdout;使用 launchd/systemd 保持运行并轮转日志。
|
|
48
|
+
- 故障排除时传递 `--verbose` 以将调试日志(握手、请求/响应、事件)从日志文件镜像到 stdio。
|
|
49
|
+
- `--force` 使用 `lsof` 查找所选端口上的监听器,发送 SIGTERM,记录它终止了什么,然后启动 Gateway 网关(如果缺少 `lsof` 则快速失败)。
|
|
50
|
+
- 如果你在 supervisor(launchd/systemd/mac 应用子进程模式)下运行,stop/restart 通常发送 **SIGTERM**;旧版本可能将其显示为 `pnpm` `ELIFECYCLE` 退出码 **143**(SIGTERM),这是正常关闭,不是崩溃。
|
|
51
|
+
- **SIGUSR1** 在授权时触发进程内重启(Gateway 网关工具/配置应用/更新,或启用 `commands.restart` 以进行手动重启)。
|
|
52
|
+
- 默认需要 Gateway 网关认证:设置 `gateway.auth.token`(或 `QUANTUMCLAW_GATEWAY_TOKEN`)或 `gateway.auth.password`。客户端必须发送 `connect.params.auth.token/password`,除非使用 Tailscale Serve 身份。
|
|
53
|
+
- 向导现在默认生成令牌,即使在 loopback 上也是如此。
|
|
54
|
+
- 端口优先级:`--port` > `QUANTUMCLAW_GATEWAY_PORT` > `gateway.port` > 默认 `18789`。
|
|
55
|
+
|
|
56
|
+
## 远程访问
|
|
57
|
+
|
|
58
|
+
- 首选 Tailscale/VPN;否则使用 SSH 隧道:
|
|
59
|
+
```bash
|
|
60
|
+
ssh -N -L 18789:127.0.0.1:18789 user@host
|
|
61
|
+
```
|
|
62
|
+
- 然后客户端通过隧道连接到 `ws://127.0.0.1:18789`。
|
|
63
|
+
- 如果配置了令牌,即使通过隧道,客户端也必须在 `connect.params.auth.token` 中包含它。
|
|
64
|
+
|
|
65
|
+
## 多个 Gateway 网关(同一主机)
|
|
66
|
+
|
|
67
|
+
通常不需要:一个 Gateway 网关可以服务多个消息渠道和智能体。仅在需要冗余或严格隔离(例如:救援机器人)时使用多个 Gateway 网关。
|
|
68
|
+
|
|
69
|
+
如果你隔离状态 + 配置并使用唯一端口,则支持。完整指南:[多个 Gateway 网关](/gateway/multiple-gateways)。
|
|
70
|
+
|
|
71
|
+
服务名称是配置文件感知的:
|
|
72
|
+
|
|
73
|
+
- macOS:`bot.molt.<profile>`(旧版 `com.quantumclaw.*` 可能仍然存在)
|
|
74
|
+
- Linux:`quantumclaw-gateway-<profile>.service`
|
|
75
|
+
- Windows:`QuantumClaw Gateway (<profile>)`
|
|
76
|
+
|
|
77
|
+
安装元数据嵌入在服务配置中:
|
|
78
|
+
|
|
79
|
+
- `QUANTUMCLAW_SERVICE_MARKER=quantumclaw`
|
|
80
|
+
- `QUANTUMCLAW_SERVICE_KIND=gateway`
|
|
81
|
+
- `QUANTUMCLAW_SERVICE_VERSION=<version>`
|
|
82
|
+
|
|
83
|
+
救援机器人模式:保持第二个 Gateway 网关隔离,使用自己的配置文件、状态目录、工作区和基础端口间隔。完整指南:[救援机器人指南](/gateway/multiple-gateways#rescue-bot-guide)。
|
|
84
|
+
|
|
85
|
+
### Dev 配置文件(`--dev`)
|
|
86
|
+
|
|
87
|
+
快速路径:运行完全隔离的 dev 实例(配置/状态/工作区)而不触及你的主设置。
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
quantumclaw --dev setup
|
|
91
|
+
quantumclaw --dev gateway --allow-unconfigured
|
|
92
|
+
# 然后定位到 dev 实例:
|
|
93
|
+
quantumclaw --dev status
|
|
94
|
+
quantumclaw --dev health
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
默认值(可通过 env/flags/config 覆盖):
|
|
98
|
+
|
|
99
|
+
- `QUANTUMCLAW_STATE_DIR=~/.quantumclaw-dev`
|
|
100
|
+
- `QUANTUMCLAW_CONFIG_PATH=~/.quantumclaw-dev/quantumclaw.json`
|
|
101
|
+
- `QUANTUMCLAW_GATEWAY_PORT=19001`(Gateway 网关 WS + HTTP)
|
|
102
|
+
- 浏览器控制服务端口 = `19003`(派生:`gateway.port+2`,仅 loopback)
|
|
103
|
+
- `canvasHost.port=19005`(派生:`gateway.port+4`)
|
|
104
|
+
- 当你在 `--dev` 下运行 `setup`/`onboard` 时,`agents.defaults.workspace` 默认变为 `~/.quantumclaw/workspace-dev`。
|
|
105
|
+
|
|
106
|
+
派生端口(经验法则):
|
|
107
|
+
|
|
108
|
+
- 基础端口 = `gateway.port`(或 `QUANTUMCLAW_GATEWAY_PORT` / `--port`)
|
|
109
|
+
- 浏览器控制服务端口 = 基础 + 2(仅 loopback)
|
|
110
|
+
- `canvasHost.port = 基础 + 4`(或 `QUANTUMCLAW_CANVAS_HOST_PORT` / 配置覆盖)
|
|
111
|
+
- 浏览器配置文件 CDP 端口从 `browser.controlPort + 9 .. + 108` 自动分配(按配置文件持久化)。
|
|
112
|
+
|
|
113
|
+
每个实例的检查清单:
|
|
114
|
+
|
|
115
|
+
- 唯一的 `gateway.port`
|
|
116
|
+
- 唯一的 `QUANTUMCLAW_CONFIG_PATH`
|
|
117
|
+
- 唯一的 `QUANTUMCLAW_STATE_DIR`
|
|
118
|
+
- 唯一的 `agents.defaults.workspace`
|
|
119
|
+
- 单独的 WhatsApp 号码(如果使用 WA)
|
|
120
|
+
|
|
121
|
+
按配置文件安装服务:
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
quantumclaw --profile main gateway install
|
|
125
|
+
quantumclaw --profile rescue gateway install
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
示例:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
QUANTUMCLAW_CONFIG_PATH=~/.quantumclaw/a.json QUANTUMCLAW_STATE_DIR=~/.quantumclaw-a quantumclaw gateway --port 19001
|
|
132
|
+
QUANTUMCLAW_CONFIG_PATH=~/.quantumclaw/b.json QUANTUMCLAW_STATE_DIR=~/.quantumclaw-b quantumclaw gateway --port 19002
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## 协议(运维视角)
|
|
136
|
+
|
|
137
|
+
- 完整文档:[Gateway 网关协议](/gateway/protocol) 和 [Bridge 协议(旧版)](/gateway/bridge-protocol)。
|
|
138
|
+
- 客户端必须发送的第一帧:`req {type:"req", id, method:"connect", params:{minProtocol,maxProtocol,client:{id,displayName?,version,platform,deviceFamily?,modelIdentifier?,mode,instanceId?}, caps, auth?, locale?, userAgent? } }`。
|
|
139
|
+
- Gateway 网关回复 `res {type:"res", id, ok:true, payload:hello-ok }`(或 `ok:false` 带错误,然后关闭)。
|
|
140
|
+
- 握手后:
|
|
141
|
+
- 请求:`{type:"req", id, method, params}` → `{type:"res", id, ok, payload|error}`
|
|
142
|
+
- 事件:`{type:"event", event, payload, seq?, stateVersion?}`
|
|
143
|
+
- 结构化 presence 条目:`{host, ip, version, platform?, deviceFamily?, modelIdentifier?, mode, lastInputSeconds?, ts, reason?, tags?[], instanceId? }`(对于 WS 客户端,`instanceId` 来自 `connect.client.instanceId`)。
|
|
144
|
+
- `agent` 响应是两阶段的:首先 `res` 确认 `{runId,status:"accepted"}`,然后在运行完成后发送最终 `res` `{runId,status:"ok"|"error",summary}`;流式输出作为 `event:"agent"` 到达。
|
|
145
|
+
|
|
146
|
+
## 方法(初始集)
|
|
147
|
+
|
|
148
|
+
- `health` — 完整健康快照(与 `quantumclaw health --json` 形状相同)。
|
|
149
|
+
- `status` — 简短摘要。
|
|
150
|
+
- `system-presence` — 当前 presence 列表。
|
|
151
|
+
- `system-event` — 发布 presence/系统注释(结构化)。
|
|
152
|
+
- `send` — 通过活跃渠道发送消息。
|
|
153
|
+
- `agent` — 运行智能体轮次(在同一连接上流回事件)。
|
|
154
|
+
- `node.list` — 列出已配对 + 当前连接的节点(包括 `caps`、`deviceFamily`、`modelIdentifier`、`paired`、`connected` 和广播的 `commands`)。
|
|
155
|
+
- `node.describe` — 描述节点(能力 + 支持的 `node.invoke` 命令;适用于已配对节点和当前连接的未配对节点)。
|
|
156
|
+
- `node.invoke` — 在节点上调用命令(例如 `canvas.*`、`camera.*`)。
|
|
157
|
+
- `node.pair.*` — 配对生命周期(`request`、`list`、`approve`、`reject`、`verify`)。
|
|
158
|
+
|
|
159
|
+
另见:[Presence](/concepts/presence) 了解 presence 如何产生/去重以及为什么稳定的 `client.instanceId` 很重要。
|
|
160
|
+
|
|
161
|
+
## 事件
|
|
162
|
+
|
|
163
|
+
- `agent` — 来自智能体运行的流式工具/输出事件(带 seq 标记)。
|
|
164
|
+
- `presence` — presence 更新(带 stateVersion 的增量)推送到所有连接的客户端。
|
|
165
|
+
- `tick` — 定期保活/无操作以确认活跃。
|
|
166
|
+
- `shutdown` — Gateway 网关正在退出;payload 包括 `reason` 和可选的 `restartExpectedMs`。客户端应重新连接。
|
|
167
|
+
|
|
168
|
+
## WebChat 集成
|
|
169
|
+
|
|
170
|
+
- WebChat 是原生 SwiftUI UI,直接与 Gateway 网关 WebSocket 通信以获取历史记录、发送、中止和事件。
|
|
171
|
+
- 远程使用通过相同的 SSH/Tailscale 隧道;如果配置了 Gateway 网关令牌,客户端在 `connect` 期间包含它。
|
|
172
|
+
- macOS 应用通过单个 WS 连接(共享连接);它从初始快照填充 presence 并监听 `presence` 事件以更新 UI。
|
|
173
|
+
|
|
174
|
+
## 类型和验证
|
|
175
|
+
|
|
176
|
+
- 服务器使用 AJV 根据从协议定义发出的 JSON Schema 验证每个入站帧。
|
|
177
|
+
- 客户端(TS/Swift)消费生成的类型(TS 直接使用;Swift 通过仓库的生成器)。
|
|
178
|
+
- 协议定义是真实来源;使用以下命令重新生成 schema/模型:
|
|
179
|
+
- `pnpm protocol:gen`
|
|
180
|
+
- `pnpm protocol:gen:swift`
|
|
181
|
+
|
|
182
|
+
## 连接快照
|
|
183
|
+
|
|
184
|
+
- `hello-ok` 包含带有 `presence`、`health`、`stateVersion` 和 `uptimeMs` 的 `snapshot`,以及 `policy {maxPayload,maxBufferedBytes,tickIntervalMs}`,这样客户端无需额外请求即可立即渲染。
|
|
185
|
+
- `health`/`system-presence` 仍可用于手动刷新,但在连接时不是必需的。
|
|
186
|
+
|
|
187
|
+
## 错误码(res.error 形状)
|
|
188
|
+
|
|
189
|
+
- 错误使用 `{ code, message, details?, retryable?, retryAfterMs? }`。
|
|
190
|
+
- 标准码:
|
|
191
|
+
- `NOT_LINKED` — WhatsApp 未认证。
|
|
192
|
+
- `AGENT_TIMEOUT` — 智能体未在配置的截止时间内响应。
|
|
193
|
+
- `INVALID_REQUEST` — schema/参数验证失败。
|
|
194
|
+
- `UNAVAILABLE` — Gateway 网关正在关闭或依赖项不可用。
|
|
195
|
+
|
|
196
|
+
## 保活行为
|
|
197
|
+
|
|
198
|
+
- `tick` 事件(或 WS ping/pong)定期发出,以便客户端知道即使没有流量时 Gateway 网关也是活跃的。
|
|
199
|
+
- 发送/智能体确认保持为单独的响应;不要为发送重载 tick。
|
|
200
|
+
|
|
201
|
+
## 重放 / 间隙
|
|
202
|
+
|
|
203
|
+
- 事件不会重放。客户端检测 seq 间隙,应在继续之前刷新(`health` + `system-presence`)。WebChat 和 macOS 客户端现在会在间隙时自动刷新。
|
|
204
|
+
|
|
205
|
+
## 监管(macOS 示例)
|
|
206
|
+
|
|
207
|
+
- 使用 launchd 保持服务存活:
|
|
208
|
+
- Program:`quantumclaw` 的路径
|
|
209
|
+
- Arguments:`gateway`
|
|
210
|
+
- KeepAlive:true
|
|
211
|
+
- StandardOut/Err:文件路径或 `syslog`
|
|
212
|
+
- 失败时,launchd 重启;致命的配置错误应保持退出,以便运维人员注意到。
|
|
213
|
+
- LaunchAgents 是按用户的,需要已登录的会话;对于无头设置,使用自定义 LaunchDaemon(未随附)。
|
|
214
|
+
- `quantumclaw gateway install` 写入 `~/Library/LaunchAgents/bot.molt.gateway.plist`
|
|
215
|
+
(或 `bot.molt.<profile>.plist`;旧版 `com.quantumclaw.*` 会被清理)。
|
|
216
|
+
- `quantumclaw doctor` 审计 LaunchAgent 配置,可以将其更新为当前默认值。
|
|
217
|
+
|
|
218
|
+
## Gateway 网关服务管理(CLI)
|
|
219
|
+
|
|
220
|
+
使用 Gateway 网关 CLI 进行 install/start/stop/restart/status:
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
quantumclaw gateway status
|
|
224
|
+
quantumclaw gateway install
|
|
225
|
+
quantumclaw gateway stop
|
|
226
|
+
quantumclaw gateway restart
|
|
227
|
+
quantumclaw logs --follow
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
注意事项:
|
|
231
|
+
|
|
232
|
+
- `gateway status` 默认使用服务解析的端口/配置探测 Gateway 网关 RPC(使用 `--url` 覆盖)。
|
|
233
|
+
- `gateway status --deep` 添加系统级扫描(LaunchDaemons/系统单元)。
|
|
234
|
+
- `gateway status --no-probe` 跳过 RPC 探测(在网络故障时有用)。
|
|
235
|
+
- `gateway status --json` 对脚本是稳定的。
|
|
236
|
+
- `gateway status` 将 **supervisor 运行时**(launchd/systemd 运行中)与 **RPC 可达性**(WS 连接 + status RPC)分开报告。
|
|
237
|
+
- `gateway status` 打印配置路径 + 探测目标以避免"localhost vs LAN 绑定"混淆和配置文件不匹配。
|
|
238
|
+
- `gateway status` 在服务看起来正在运行但端口已关闭时包含最后一行 Gateway 网关错误。
|
|
239
|
+
- `logs` 通过 RPC 尾随 Gateway 网关文件日志(无需手动 `tail`/`grep`)。
|
|
240
|
+
- 如果检测到其他类似 Gateway 网关的服务,CLI 会发出警告,除非它们是 QuantumClaw 配置文件服务。
|
|
241
|
+
我们仍然建议大多数设置**每台机器一个 Gateway 网关**;使用隔离的配置文件/端口进行冗余或救援机器人。参见[多个 Gateway 网关](/gateway/multiple-gateways)。
|
|
242
|
+
- 清理:`quantumclaw gateway uninstall`(当前服务)和 `quantumclaw doctor`(旧版迁移)。
|
|
243
|
+
- `gateway install` 在已安装时是无操作的;使用 `quantumclaw gateway install --force` 重新安装(配置文件/env/路径更改)。
|
|
244
|
+
|
|
245
|
+
捆绑的 mac 应用:
|
|
246
|
+
|
|
247
|
+
- QuantumClaw.app 可以捆绑基于 Node 的 Gateway 网关中继并安装标记为
|
|
248
|
+
`bot.molt.gateway`(或 `bot.molt.<profile>`;旧版 `com.quantumclaw.*` 标签仍能干净卸载)的按用户 LaunchAgent。
|
|
249
|
+
- 要干净地停止它,使用 `quantumclaw gateway stop`(或 `launchctl bootout gui/$UID/bot.molt.gateway`)。
|
|
250
|
+
- 要重启,使用 `quantumclaw gateway restart`(或 `launchctl kickstart -k gui/$UID/bot.molt.gateway`)。
|
|
251
|
+
- `launchctl` 仅在 LaunchAgent 已安装时有效;否则先使用 `quantumclaw gateway install`。
|
|
252
|
+
- 运行命名配置文件时,将标签替换为 `bot.molt.<profile>`。
|
|
253
|
+
|
|
254
|
+
## 监管(systemd 用户单元)
|
|
255
|
+
|
|
256
|
+
QuantumClaw 在 Linux/WSL2 上默认安装 **systemd 用户服务**。我们
|
|
257
|
+
建议单用户机器使用用户服务(更简单的 env,按用户配置)。
|
|
258
|
+
对于多用户或常驻服务器使用**系统服务**(无需 lingering,
|
|
259
|
+
共享监管)。
|
|
260
|
+
|
|
261
|
+
`quantumclaw gateway install` 写入用户单元。`quantumclaw doctor` 审计
|
|
262
|
+
单元并可以将其更新以匹配当前推荐的默认值。
|
|
263
|
+
|
|
264
|
+
创建 `~/.config/systemd/user/quantumclaw-gateway[-<profile>].service`:
|
|
265
|
+
|
|
266
|
+
```
|
|
267
|
+
[Unit]
|
|
268
|
+
Description=QuantumClaw Gateway (profile: <profile>, v<version>)
|
|
269
|
+
After=network-online.target
|
|
270
|
+
Wants=network-online.target
|
|
271
|
+
|
|
272
|
+
[Service]
|
|
273
|
+
ExecStart=/usr/local/bin/quantumclaw gateway --port 18789
|
|
274
|
+
Restart=always
|
|
275
|
+
RestartSec=5
|
|
276
|
+
Environment=QUANTUMCLAW_GATEWAY_TOKEN=
|
|
277
|
+
WorkingDirectory=/home/youruser
|
|
278
|
+
|
|
279
|
+
[Install]
|
|
280
|
+
WantedBy=default.target
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
启用 lingering(必需,以便用户服务在登出/空闲后继续存活):
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
sudo loginctl enable-linger youruser
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
新手引导在 Linux/WSL2 上运行此命令(可能提示输入 sudo;写入 `/var/lib/systemd/linger`)。
|
|
290
|
+
然后启用服务:
|
|
291
|
+
|
|
292
|
+
```
|
|
293
|
+
systemctl --user enable --now quantumclaw-gateway[-<profile>].service
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
**替代方案(系统服务)** - 对于常驻或多用户服务器,你可以
|
|
297
|
+
安装 systemd **系统**单元而不是用户单元(无需 lingering)。
|
|
298
|
+
创建 `/etc/systemd/system/quantumclaw-gateway[-<profile>].service`(复制上面的单元,
|
|
299
|
+
切换 `WantedBy=multi-user.target`,设置 `User=` + `WorkingDirectory=`),然后:
|
|
300
|
+
|
|
301
|
+
```
|
|
302
|
+
sudo systemctl daemon-reload
|
|
303
|
+
sudo systemctl enable --now quantumclaw-gateway[-<profile>].service
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## Windows(WSL2)
|
|
307
|
+
|
|
308
|
+
Windows 安装应使用 **WSL2** 并遵循上面的 Linux systemd 部分。
|
|
309
|
+
|
|
310
|
+
## 运维检查
|
|
311
|
+
|
|
312
|
+
- 存活检查:打开 WS 并发送 `req:connect` → 期望收到带有 `payload.type="hello-ok"`(带快照)的 `res`。
|
|
313
|
+
- 就绪检查:调用 `health` → 期望 `ok: true` 并在 `linkChannel` 中有已关联的渠道(适用时)。
|
|
314
|
+
- 调试:订阅 `tick` 和 `presence` 事件;确保 `status` 显示已关联/认证时间;presence 条目显示 Gateway 网关主机和已连接的客户端。
|
|
315
|
+
|
|
316
|
+
## 安全保证
|
|
317
|
+
|
|
318
|
+
- 默认假设每台主机一个 Gateway 网关;如果你运行多个配置文件,隔离端口/状态并定位到正确的实例。
|
|
319
|
+
- 不会回退到直接 Baileys 连接;如果 Gateway 网关关闭,发送会快速失败。
|
|
320
|
+
- 非 connect 的第一帧或格式错误的 JSON 会被拒绝并关闭 socket。
|
|
321
|
+
- 优雅关闭:关闭前发出 `shutdown` 事件;客户端必须处理关闭 + 重新连接。
|
|
322
|
+
|
|
323
|
+
## CLI 辅助工具
|
|
324
|
+
|
|
325
|
+
- `quantumclaw gateway health|status` — 通过 Gateway 网关 WS 请求 health/status。
|
|
326
|
+
- `quantumclaw message send --target <num> --message "hi" [--media ...]` — 通过 Gateway 网关发送(对 WhatsApp 是幂等的)。
|
|
327
|
+
- `quantumclaw agent --message "hi" --to <num>` — 运行智能体轮次(默认等待最终结果)。
|
|
328
|
+
- `quantumclaw gateway call <method> --params '{"k":"v"}'` — 用于调试的原始方法调用器。
|
|
329
|
+
- `quantumclaw gateway stop|restart` — 停止/重启受监管的 Gateway 网关服务(launchd/systemd)。
|
|
330
|
+
- Gateway 网关辅助子命令假设 `--url` 上有运行中的 Gateway 网关;它们不再自动生成一个。
|
|
331
|
+
|
|
332
|
+
## 迁移指南
|
|
333
|
+
|
|
334
|
+
- 淘汰 `quantumclaw gateway` 和旧版 TCP 控制端口的使用。
|
|
335
|
+
- 更新客户端以使用带有强制 connect 和结构化 presence 的 WS 协议。
|