@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.
Files changed (821) hide show
  1. package/CHANGELOG.md +4601 -0
  2. package/LICENSE +21 -0
  3. package/README.md +559 -0
  4. package/assets/avatar-placeholder.svg +19 -0
  5. package/assets/chrome-extension/icons/icon128.png +0 -0
  6. package/assets/chrome-extension/icons/icon16.png +0 -0
  7. package/assets/chrome-extension/icons/icon32.png +0 -0
  8. package/assets/chrome-extension/icons/icon48.png +0 -0
  9. package/assets/dmg-background-small.png +0 -0
  10. package/assets/dmg-background.png +0 -0
  11. package/docs/.i18n/README.md +31 -0
  12. package/docs/.i18n/glossary.ja-JP.json +14 -0
  13. package/docs/.i18n/glossary.zh-CN.json +302 -0
  14. package/docs/.i18n/ja-JP.tm.jsonl +0 -0
  15. package/docs/assets/install-script.svg +1 -0
  16. package/docs/assets/macos-onboarding/01-macos-warning.jpeg +0 -0
  17. package/docs/assets/macos-onboarding/02-local-networks.jpeg +0 -0
  18. package/docs/assets/macos-onboarding/03-security-notice.png +0 -0
  19. package/docs/assets/macos-onboarding/04-choose-gateway.png +0 -0
  20. package/docs/assets/macos-onboarding/05-permissions.png +0 -0
  21. package/docs/assets/pixel-lobster.svg +60 -0
  22. package/docs/assets/quantumclaw-logo-text-dark.png +0 -0
  23. package/docs/assets/quantumclaw-logo-text-dark.svg +418 -0
  24. package/docs/assets/quantumclaw-logo-text.png +0 -0
  25. package/docs/assets/quantumclaw-logo-text.svg +418 -0
  26. package/docs/assets/showcase/agents-ui.jpg +0 -0
  27. package/docs/assets/showcase/bambu-cli.png +0 -0
  28. package/docs/assets/showcase/codexmonitor.png +0 -0
  29. package/docs/assets/showcase/gohome-grafana.png +0 -0
  30. package/docs/assets/showcase/ios-testflight.jpg +0 -0
  31. package/docs/assets/showcase/oura-health.png +0 -0
  32. package/docs/assets/showcase/padel-cli.svg +11 -0
  33. package/docs/assets/showcase/padel-screenshot.jpg +0 -0
  34. package/docs/assets/showcase/papla-tts.jpg +0 -0
  35. package/docs/assets/showcase/pr-review-telegram.jpg +0 -0
  36. package/docs/assets/showcase/roborock-screenshot.jpg +0 -0
  37. package/docs/assets/showcase/roborock-status.svg +13 -0
  38. package/docs/assets/showcase/roof-camera-sky.jpg +0 -0
  39. package/docs/assets/showcase/snag.png +0 -0
  40. package/docs/assets/showcase/tesco-shop.jpg +0 -0
  41. package/docs/assets/showcase/wienerlinien.png +0 -0
  42. package/docs/assets/showcase/wine-cellar-skill.jpg +0 -0
  43. package/docs/assets/showcase/winix-air-purifier.jpg +0 -0
  44. package/docs/assets/showcase/xuezh-pronunciation.jpeg +0 -0
  45. package/docs/assets/sponsors/blacksmith.svg +14 -0
  46. package/docs/assets/sponsors/convex.svg +16 -0
  47. package/docs/assets/sponsors/openai.svg +3 -0
  48. package/docs/assets/sponsors/vercel.svg +5 -0
  49. package/docs/auth-credential-semantics.md +53 -0
  50. package/docs/automation/auth-monitoring.md +44 -0
  51. package/docs/automation/cron-jobs.md +727 -0
  52. package/docs/automation/cron-vs-heartbeat.md +286 -0
  53. package/docs/automation/gmail-pubsub.md +256 -0
  54. package/docs/automation/hooks.md +1056 -0
  55. package/docs/automation/poll.md +86 -0
  56. package/docs/automation/standing-orders.md +251 -0
  57. package/docs/automation/troubleshooting.md +122 -0
  58. package/docs/automation/webhook.md +217 -0
  59. package/docs/brave-search.md +93 -0
  60. package/docs/channels/bluebubbles.md +347 -0
  61. package/docs/channels/broadcast-groups.md +442 -0
  62. package/docs/channels/channel-routing.md +139 -0
  63. package/docs/channels/discord.md +1229 -0
  64. package/docs/channels/feishu.md +747 -0
  65. package/docs/channels/googlechat.md +261 -0
  66. package/docs/channels/group-messages.md +84 -0
  67. package/docs/channels/groups.md +379 -0
  68. package/docs/channels/imessage.md +367 -0
  69. package/docs/channels/index.md +47 -0
  70. package/docs/channels/irc.md +242 -0
  71. package/docs/channels/line.md +194 -0
  72. package/docs/channels/location.md +56 -0
  73. package/docs/channels/matrix.md +677 -0
  74. package/docs/channels/mattermost.md +427 -0
  75. package/docs/channels/msteams.md +780 -0
  76. package/docs/channels/nextcloud-talk.md +138 -0
  77. package/docs/channels/nostr.md +249 -0
  78. package/docs/channels/pairing.md +114 -0
  79. package/docs/channels/signal.md +329 -0
  80. package/docs/channels/slack.md +603 -0
  81. package/docs/channels/synology-chat.md +134 -0
  82. package/docs/channels/telegram.md +987 -0
  83. package/docs/channels/tlon.md +276 -0
  84. package/docs/channels/troubleshooting.md +118 -0
  85. package/docs/channels/twitch.md +379 -0
  86. package/docs/channels/whatsapp.md +460 -0
  87. package/docs/channels/zalo.md +243 -0
  88. package/docs/channels/zalouser.md +181 -0
  89. package/docs/ci.md +55 -0
  90. package/docs/cli/acp.md +288 -0
  91. package/docs/cli/agent.md +29 -0
  92. package/docs/cli/agents.md +123 -0
  93. package/docs/cli/approvals.md +50 -0
  94. package/docs/cli/backup.md +76 -0
  95. package/docs/cli/browser.md +106 -0
  96. package/docs/cli/channels.md +102 -0
  97. package/docs/cli/clawbot.md +21 -0
  98. package/docs/cli/completion.md +35 -0
  99. package/docs/cli/config.md +295 -0
  100. package/docs/cli/configure.md +36 -0
  101. package/docs/cli/cron.md +77 -0
  102. package/docs/cli/daemon.md +53 -0
  103. package/docs/cli/dashboard.md +22 -0
  104. package/docs/cli/devices.md +139 -0
  105. package/docs/cli/directory.md +63 -0
  106. package/docs/cli/dns.md +23 -0
  107. package/docs/cli/docs.md +15 -0
  108. package/docs/cli/doctor.md +48 -0
  109. package/docs/cli/gateway.md +235 -0
  110. package/docs/cli/health.md +21 -0
  111. package/docs/cli/hooks.md +329 -0
  112. package/docs/cli/index.md +1150 -0
  113. package/docs/cli/logs.md +28 -0
  114. package/docs/cli/memory.md +66 -0
  115. package/docs/cli/message.md +278 -0
  116. package/docs/cli/models.md +81 -0
  117. package/docs/cli/node.md +127 -0
  118. package/docs/cli/nodes.md +75 -0
  119. package/docs/cli/onboard.md +157 -0
  120. package/docs/cli/pairing.md +32 -0
  121. package/docs/cli/plugins.md +210 -0
  122. package/docs/cli/qr.md +46 -0
  123. package/docs/cli/reset.md +20 -0
  124. package/docs/cli/sandbox.md +197 -0
  125. package/docs/cli/secrets.md +188 -0
  126. package/docs/cli/security.md +79 -0
  127. package/docs/cli/sessions.md +110 -0
  128. package/docs/cli/setup.md +29 -0
  129. package/docs/cli/skills.md +36 -0
  130. package/docs/cli/status.md +30 -0
  131. package/docs/cli/system.md +60 -0
  132. package/docs/cli/tui.md +30 -0
  133. package/docs/cli/uninstall.md +20 -0
  134. package/docs/cli/update.md +103 -0
  135. package/docs/cli/voicecall.md +34 -0
  136. package/docs/cli/webhooks.md +25 -0
  137. package/docs/concepts/agent-loop.md +148 -0
  138. package/docs/concepts/agent-workspace.md +236 -0
  139. package/docs/concepts/agent.md +122 -0
  140. package/docs/concepts/architecture.md +137 -0
  141. package/docs/concepts/compaction.md +123 -0
  142. package/docs/concepts/context-engine.md +268 -0
  143. package/docs/concepts/context.md +172 -0
  144. package/docs/concepts/delegate-architecture.md +296 -0
  145. package/docs/concepts/features.md +73 -0
  146. package/docs/concepts/markdown-formatting.md +130 -0
  147. package/docs/concepts/memory.md +108 -0
  148. package/docs/concepts/messages.md +154 -0
  149. package/docs/concepts/model-failover.md +152 -0
  150. package/docs/concepts/model-providers.md +607 -0
  151. package/docs/concepts/models.md +225 -0
  152. package/docs/concepts/multi-agent.md +552 -0
  153. package/docs/concepts/oauth.md +158 -0
  154. package/docs/concepts/presence.md +102 -0
  155. package/docs/concepts/queue.md +89 -0
  156. package/docs/concepts/retry.md +69 -0
  157. package/docs/concepts/session-pruning.md +121 -0
  158. package/docs/concepts/session-tool.md +242 -0
  159. package/docs/concepts/session.md +310 -0
  160. package/docs/concepts/streaming.md +155 -0
  161. package/docs/concepts/system-prompt.md +132 -0
  162. package/docs/concepts/timezone.md +91 -0
  163. package/docs/concepts/typebox.md +291 -0
  164. package/docs/concepts/typing-indicators.md +68 -0
  165. package/docs/concepts/usage-tracking.md +35 -0
  166. package/docs/date-time.md +128 -0
  167. package/docs/debug/node-issue.md +85 -0
  168. package/docs/diagnostics/flags.md +91 -0
  169. package/docs/docs.json +2078 -0
  170. package/docs/gateway/authentication.md +179 -0
  171. package/docs/gateway/background-process.md +97 -0
  172. package/docs/gateway/bonjour.md +177 -0
  173. package/docs/gateway/bridge-protocol.md +91 -0
  174. package/docs/gateway/cli-backends.md +225 -0
  175. package/docs/gateway/configuration-examples.md +651 -0
  176. package/docs/gateway/configuration-reference.md +3123 -0
  177. package/docs/gateway/configuration.md +633 -0
  178. package/docs/gateway/discovery.md +123 -0
  179. package/docs/gateway/doctor.md +362 -0
  180. package/docs/gateway/gateway-lock.md +34 -0
  181. package/docs/gateway/health.md +44 -0
  182. package/docs/gateway/heartbeat.md +393 -0
  183. package/docs/gateway/index.md +261 -0
  184. package/docs/gateway/local-models.md +152 -0
  185. package/docs/gateway/logging.md +113 -0
  186. package/docs/gateway/multiple-gateways.md +112 -0
  187. package/docs/gateway/network-model.md +22 -0
  188. package/docs/gateway/openai-http-api.md +132 -0
  189. package/docs/gateway/openresponses-http-api.md +295 -0
  190. package/docs/gateway/openshell.md +307 -0
  191. package/docs/gateway/pairing.md +99 -0
  192. package/docs/gateway/protocol.md +267 -0
  193. package/docs/gateway/remote-gateway-readme.md +158 -0
  194. package/docs/gateway/remote.md +153 -0
  195. package/docs/gateway/sandbox-vs-tool-policy-vs-elevated.md +134 -0
  196. package/docs/gateway/sandboxing.md +469 -0
  197. package/docs/gateway/secrets-plan-contract.md +116 -0
  198. package/docs/gateway/secrets.md +503 -0
  199. package/docs/gateway/security/index.md +1220 -0
  200. package/docs/gateway/tailscale.md +132 -0
  201. package/docs/gateway/tools-invoke-http-api.md +118 -0
  202. package/docs/gateway/troubleshooting.md +378 -0
  203. package/docs/gateway/trusted-proxy-auth.md +330 -0
  204. package/docs/help/debugging.md +168 -0
  205. package/docs/help/environment.md +163 -0
  206. package/docs/help/faq.md +2997 -0
  207. package/docs/help/index.md +28 -0
  208. package/docs/help/scripts.md +28 -0
  209. package/docs/help/testing.md +526 -0
  210. package/docs/help/troubleshooting.md +297 -0
  211. package/docs/images/configure-model-picker-unsearchable.png +0 -0
  212. package/docs/images/feishu-step2-create-app.png +0 -0
  213. package/docs/images/feishu-step3-credentials.png +0 -0
  214. package/docs/images/feishu-step4-permissions.png +0 -0
  215. package/docs/images/feishu-step5-bot-capability.png +0 -0
  216. package/docs/images/feishu-step6-event-subscription.png +0 -0
  217. package/docs/images/feishu-verification-token.png +0 -0
  218. package/docs/images/groups-flow.svg +52 -0
  219. package/docs/images/mobile-ui-screenshot.png +0 -0
  220. package/docs/index.md +196 -0
  221. package/docs/install/ansible.md +230 -0
  222. package/docs/install/azure.md +311 -0
  223. package/docs/install/bun.md +55 -0
  224. package/docs/install/development-channels.md +120 -0
  225. package/docs/install/digitalocean.md +129 -0
  226. package/docs/install/docker-vm-runtime.md +142 -0
  227. package/docs/install/docker.md +375 -0
  228. package/docs/install/exe-dev.md +126 -0
  229. package/docs/install/fly.md +501 -0
  230. package/docs/install/gcp.md +402 -0
  231. package/docs/install/hetzner.md +251 -0
  232. package/docs/install/index.md +183 -0
  233. package/docs/install/installer.md +415 -0
  234. package/docs/install/kubernetes.md +191 -0
  235. package/docs/install/macos-vm.md +281 -0
  236. package/docs/install/migrating-matrix.md +346 -0
  237. package/docs/install/migrating.md +110 -0
  238. package/docs/install/nix.md +89 -0
  239. package/docs/install/node.md +138 -0
  240. package/docs/install/northflank.mdx +54 -0
  241. package/docs/install/oracle.md +156 -0
  242. package/docs/install/podman.md +133 -0
  243. package/docs/install/railway.mdx +100 -0
  244. package/docs/install/raspberry-pi.md +159 -0
  245. package/docs/install/render.mdx +169 -0
  246. package/docs/install/uninstall.md +128 -0
  247. package/docs/install/updating.md +128 -0
  248. package/docs/ja-JP/index.md +186 -0
  249. package/docs/ja-JP/start/getting-started.md +125 -0
  250. package/docs/ja-JP/start/wizard.md +77 -0
  251. package/docs/logging.md +352 -0
  252. package/docs/nav-tabs-underline.js +100 -0
  253. package/docs/network.md +54 -0
  254. package/docs/nodes/audio.md +187 -0
  255. package/docs/nodes/camera.md +162 -0
  256. package/docs/nodes/images.md +72 -0
  257. package/docs/nodes/index.md +393 -0
  258. package/docs/nodes/location-command.md +98 -0
  259. package/docs/nodes/media-understanding.md +394 -0
  260. package/docs/nodes/talk.md +92 -0
  261. package/docs/nodes/troubleshooting.md +114 -0
  262. package/docs/nodes/voicewake.md +66 -0
  263. package/docs/perplexity.md +174 -0
  264. package/docs/pi-dev.md +80 -0
  265. package/docs/pi.md +567 -0
  266. package/docs/platforms/android.md +168 -0
  267. package/docs/platforms/digitalocean.md +266 -0
  268. package/docs/platforms/index.md +54 -0
  269. package/docs/platforms/ios.md +220 -0
  270. package/docs/platforms/linux.md +94 -0
  271. package/docs/platforms/mac/bundled-gateway.md +73 -0
  272. package/docs/platforms/mac/canvas.md +125 -0
  273. package/docs/platforms/mac/child-process.md +69 -0
  274. package/docs/platforms/mac/dev-setup.md +104 -0
  275. package/docs/platforms/mac/health.md +34 -0
  276. package/docs/platforms/mac/icon.md +31 -0
  277. package/docs/platforms/mac/logging.md +57 -0
  278. package/docs/platforms/mac/menu-bar.md +81 -0
  279. package/docs/platforms/mac/peekaboo.md +65 -0
  280. package/docs/platforms/mac/permissions.md +50 -0
  281. package/docs/platforms/mac/remote.md +84 -0
  282. package/docs/platforms/mac/signing.md +47 -0
  283. package/docs/platforms/mac/skills.md +33 -0
  284. package/docs/platforms/mac/voice-overlay.md +60 -0
  285. package/docs/platforms/mac/voicewake.md +67 -0
  286. package/docs/platforms/mac/webchat.md +43 -0
  287. package/docs/platforms/mac/xpc.md +61 -0
  288. package/docs/platforms/macos.md +226 -0
  289. package/docs/platforms/oracle.md +303 -0
  290. package/docs/platforms/raspberry-pi.md +412 -0
  291. package/docs/platforms/windows.md +241 -0
  292. package/docs/plugins/agent-tools.md +10 -0
  293. package/docs/plugins/architecture.md +1366 -0
  294. package/docs/plugins/building-extensions.md +10 -0
  295. package/docs/plugins/building-plugins.md +239 -0
  296. package/docs/plugins/bundles.md +181 -0
  297. package/docs/plugins/community.md +145 -0
  298. package/docs/plugins/manifest.md +241 -0
  299. package/docs/plugins/sdk-channel-plugins.md +370 -0
  300. package/docs/plugins/sdk-entrypoints.md +161 -0
  301. package/docs/plugins/sdk-migration.md +172 -0
  302. package/docs/plugins/sdk-overview.md +196 -0
  303. package/docs/plugins/sdk-provider-plugins.md +370 -0
  304. package/docs/plugins/sdk-runtime.md +345 -0
  305. package/docs/plugins/sdk-setup.md +331 -0
  306. package/docs/plugins/sdk-testing.md +263 -0
  307. package/docs/plugins/voice-call.md +380 -0
  308. package/docs/plugins/zalouser.md +77 -0
  309. package/docs/prose.md +134 -0
  310. package/docs/providers/anthropic.md +259 -0
  311. package/docs/providers/bedrock.md +176 -0
  312. package/docs/providers/claude-max-api-proxy.md +154 -0
  313. package/docs/providers/cloudflare-ai-gateway.md +71 -0
  314. package/docs/providers/deepgram.md +93 -0
  315. package/docs/providers/github-copilot.md +72 -0
  316. package/docs/providers/glm.md +43 -0
  317. package/docs/providers/google.md +78 -0
  318. package/docs/providers/groq.md +96 -0
  319. package/docs/providers/huggingface.md +209 -0
  320. package/docs/providers/index.md +69 -0
  321. package/docs/providers/kilocode.md +74 -0
  322. package/docs/providers/litellm.md +154 -0
  323. package/docs/providers/minimax.md +224 -0
  324. package/docs/providers/mistral.md +54 -0
  325. package/docs/providers/models.md +45 -0
  326. package/docs/providers/modelstudio.md +66 -0
  327. package/docs/providers/moonshot.md +175 -0
  328. package/docs/providers/nvidia.md +55 -0
  329. package/docs/providers/ollama.md +352 -0
  330. package/docs/providers/openai.md +303 -0
  331. package/docs/providers/opencode-go.md +45 -0
  332. package/docs/providers/opencode.md +64 -0
  333. package/docs/providers/openrouter.md +37 -0
  334. package/docs/providers/perplexity-provider.md +62 -0
  335. package/docs/providers/qianfan.md +38 -0
  336. package/docs/providers/qwen.md +53 -0
  337. package/docs/providers/sglang.md +104 -0
  338. package/docs/providers/synthetic.md +99 -0
  339. package/docs/providers/together.md +66 -0
  340. package/docs/providers/venice.md +282 -0
  341. package/docs/providers/vercel-ai-gateway.md +60 -0
  342. package/docs/providers/vllm.md +92 -0
  343. package/docs/providers/volcengine.md +74 -0
  344. package/docs/providers/xai.md +60 -0
  345. package/docs/providers/xiaomi.md +86 -0
  346. package/docs/providers/zai.md +46 -0
  347. package/docs/reference/AGENTS.default.md +126 -0
  348. package/docs/reference/RELEASING.md +42 -0
  349. package/docs/reference/api-usage-costs.md +144 -0
  350. package/docs/reference/credits.md +30 -0
  351. package/docs/reference/device-models.md +47 -0
  352. package/docs/reference/memory-config.md +711 -0
  353. package/docs/reference/prompt-caching.md +185 -0
  354. package/docs/reference/rpc.md +43 -0
  355. package/docs/reference/secretref-credential-surface.md +140 -0
  356. package/docs/reference/secretref-user-supplied-credentials-matrix.json +563 -0
  357. package/docs/reference/session-management-compaction.md +324 -0
  358. package/docs/reference/templates/AGENTS.dev.md +83 -0
  359. package/docs/reference/templates/AGENTS.md +219 -0
  360. package/docs/reference/templates/BOOT.md +11 -0
  361. package/docs/reference/templates/BOOTSTRAP.md +62 -0
  362. package/docs/reference/templates/HEARTBEAT.md +14 -0
  363. package/docs/reference/templates/IDENTITY.dev.md +47 -0
  364. package/docs/reference/templates/IDENTITY.md +29 -0
  365. package/docs/reference/templates/SOUL.dev.md +76 -0
  366. package/docs/reference/templates/SOUL.md +43 -0
  367. package/docs/reference/templates/TOOLS.dev.md +24 -0
  368. package/docs/reference/templates/TOOLS.md +47 -0
  369. package/docs/reference/templates/USER.dev.md +18 -0
  370. package/docs/reference/templates/USER.md +23 -0
  371. package/docs/reference/test.md +90 -0
  372. package/docs/reference/token-use.md +175 -0
  373. package/docs/reference/transcript-hygiene.md +151 -0
  374. package/docs/reference/wizard.md +235 -0
  375. package/docs/security/CONTRIBUTING-THREAT-MODEL.md +98 -0
  376. package/docs/security/THREAT-MODEL-ATLAS.md +611 -0
  377. package/docs/security/formal-verification.md +167 -0
  378. package/docs/start/bootstrapping.md +41 -0
  379. package/docs/start/docs-directory.md +66 -0
  380. package/docs/start/getting-started.md +116 -0
  381. package/docs/start/hubs.md +198 -0
  382. package/docs/start/lore.md +219 -0
  383. package/docs/start/onboarding-overview.md +67 -0
  384. package/docs/start/onboarding.md +91 -0
  385. package/docs/start/openclaw.md +221 -0
  386. package/docs/start/quickstart.md +22 -0
  387. package/docs/start/setup.md +164 -0
  388. package/docs/start/showcase.md +418 -0
  389. package/docs/start/wizard-cli-automation.md +215 -0
  390. package/docs/start/wizard-cli-reference.md +299 -0
  391. package/docs/start/wizard.md +125 -0
  392. package/docs/style.css +37 -0
  393. package/docs/tools/acp-agents.md +623 -0
  394. package/docs/tools/agent-send.md +100 -0
  395. package/docs/tools/apply-patch.md +51 -0
  396. package/docs/tools/brave-search.md +93 -0
  397. package/docs/tools/browser-linux-troubleshooting.md +138 -0
  398. package/docs/tools/browser-login.md +73 -0
  399. package/docs/tools/browser-wsl2-windows-remote-cdp-troubleshooting.md +211 -0
  400. package/docs/tools/browser.md +731 -0
  401. package/docs/tools/btw.md +142 -0
  402. package/docs/tools/capability-cookbook.md +119 -0
  403. package/docs/tools/clawhub.md +298 -0
  404. package/docs/tools/creating-skills.md +117 -0
  405. package/docs/tools/diffs.md +386 -0
  406. package/docs/tools/elevated.md +114 -0
  407. package/docs/tools/exec-approvals.md +430 -0
  408. package/docs/tools/exec.md +207 -0
  409. package/docs/tools/firecrawl.md +140 -0
  410. package/docs/tools/index.md +137 -0
  411. package/docs/tools/llm-task.md +119 -0
  412. package/docs/tools/lobster.md +340 -0
  413. package/docs/tools/loop-detection.md +100 -0
  414. package/docs/tools/multi-agent-sandbox-tools.md +364 -0
  415. package/docs/tools/pdf.md +156 -0
  416. package/docs/tools/perplexity-search.md +174 -0
  417. package/docs/tools/plugin.md +255 -0
  418. package/docs/tools/reactions.md +64 -0
  419. package/docs/tools/skills-config.md +86 -0
  420. package/docs/tools/skills.md +309 -0
  421. package/docs/tools/slash-commands.md +294 -0
  422. package/docs/tools/subagents.md +295 -0
  423. package/docs/tools/tavily.md +125 -0
  424. package/docs/tools/thinking.md +96 -0
  425. package/docs/tools/tts.md +406 -0
  426. package/docs/tools/web.md +516 -0
  427. package/docs/tts.md +406 -0
  428. package/docs/vps.md +112 -0
  429. package/docs/web/control-ui.md +275 -0
  430. package/docs/web/dashboard.md +54 -0
  431. package/docs/web/index.md +120 -0
  432. package/docs/web/tui.md +170 -0
  433. package/docs/web/webchat.md +61 -0
  434. package/docs/whatsapp-openclaw-ai-zh.jpg +0 -0
  435. package/docs/whatsapp-openclaw.jpg +0 -0
  436. package/docs/zh-CN/AGENTS.md +61 -0
  437. package/docs/zh-CN/automation/auth-monitoring.md +47 -0
  438. package/docs/zh-CN/automation/cron-jobs.md +435 -0
  439. package/docs/zh-CN/automation/cron-vs-heartbeat.md +286 -0
  440. package/docs/zh-CN/automation/gmail-pubsub.md +249 -0
  441. package/docs/zh-CN/automation/hooks.md +1051 -0
  442. package/docs/zh-CN/automation/poll.md +76 -0
  443. package/docs/zh-CN/automation/troubleshooting.md +8 -0
  444. package/docs/zh-CN/automation/webhook.md +163 -0
  445. package/docs/zh-CN/brave-search.md +60 -0
  446. package/docs/zh-CN/channels/bluebubbles.md +354 -0
  447. package/docs/zh-CN/channels/broadcast-groups.md +449 -0
  448. package/docs/zh-CN/channels/channel-routing.md +117 -0
  449. package/docs/zh-CN/channels/discord.md +468 -0
  450. package/docs/zh-CN/channels/feishu.md +728 -0
  451. package/docs/zh-CN/channels/googlechat.md +257 -0
  452. package/docs/zh-CN/channels/grammy.md +38 -0
  453. package/docs/zh-CN/channels/group-messages.md +91 -0
  454. package/docs/zh-CN/channels/groups.md +379 -0
  455. package/docs/zh-CN/channels/imessage.md +302 -0
  456. package/docs/zh-CN/channels/index.md +53 -0
  457. package/docs/zh-CN/channels/line.md +180 -0
  458. package/docs/zh-CN/channels/location.md +63 -0
  459. package/docs/zh-CN/channels/matrix.md +221 -0
  460. package/docs/zh-CN/channels/mattermost.md +144 -0
  461. package/docs/zh-CN/channels/msteams.md +775 -0
  462. package/docs/zh-CN/channels/nextcloud-talk.md +142 -0
  463. package/docs/zh-CN/channels/nostr.md +249 -0
  464. package/docs/zh-CN/channels/pairing.md +89 -0
  465. package/docs/zh-CN/channels/signal.md +209 -0
  466. package/docs/zh-CN/channels/slack.md +531 -0
  467. package/docs/zh-CN/channels/synology-chat.md +138 -0
  468. package/docs/zh-CN/channels/telegram.md +751 -0
  469. package/docs/zh-CN/channels/tlon.md +136 -0
  470. package/docs/zh-CN/channels/troubleshooting.md +36 -0
  471. package/docs/zh-CN/channels/twitch.md +385 -0
  472. package/docs/zh-CN/channels/whatsapp.md +411 -0
  473. package/docs/zh-CN/channels/zalo.md +196 -0
  474. package/docs/zh-CN/channels/zalouser.md +147 -0
  475. package/docs/zh-CN/cli/acp.md +173 -0
  476. package/docs/zh-CN/cli/agent.md +30 -0
  477. package/docs/zh-CN/cli/agents.md +82 -0
  478. package/docs/zh-CN/cli/approvals.md +57 -0
  479. package/docs/zh-CN/cli/browser.md +114 -0
  480. package/docs/zh-CN/cli/channels.md +86 -0
  481. package/docs/zh-CN/cli/config.md +57 -0
  482. package/docs/zh-CN/cli/configure.md +38 -0
  483. package/docs/zh-CN/cli/cron.md +43 -0
  484. package/docs/zh-CN/cli/dashboard.md +23 -0
  485. package/docs/zh-CN/cli/devices.md +74 -0
  486. package/docs/zh-CN/cli/directory.md +70 -0
  487. package/docs/zh-CN/cli/dns.md +30 -0
  488. package/docs/zh-CN/cli/docs.md +22 -0
  489. package/docs/zh-CN/cli/doctor.md +48 -0
  490. package/docs/zh-CN/cli/gateway.md +206 -0
  491. package/docs/zh-CN/cli/health.md +28 -0
  492. package/docs/zh-CN/cli/hooks.md +298 -0
  493. package/docs/zh-CN/cli/index.md +1143 -0
  494. package/docs/zh-CN/cli/logs.md +31 -0
  495. package/docs/zh-CN/cli/memory.md +52 -0
  496. package/docs/zh-CN/cli/message.md +246 -0
  497. package/docs/zh-CN/cli/models.md +85 -0
  498. package/docs/zh-CN/cli/node.md +115 -0
  499. package/docs/zh-CN/cli/nodes.md +80 -0
  500. package/docs/zh-CN/cli/onboard.md +164 -0
  501. package/docs/zh-CN/cli/pairing.md +28 -0
  502. package/docs/zh-CN/cli/plugins.md +66 -0
  503. package/docs/zh-CN/cli/reset.md +24 -0
  504. package/docs/zh-CN/cli/sandbox.md +158 -0
  505. package/docs/zh-CN/cli/security.md +33 -0
  506. package/docs/zh-CN/cli/sessions.md +23 -0
  507. package/docs/zh-CN/cli/setup.md +36 -0
  508. package/docs/zh-CN/cli/skills.md +33 -0
  509. package/docs/zh-CN/cli/status.md +33 -0
  510. package/docs/zh-CN/cli/system.md +63 -0
  511. package/docs/zh-CN/cli/tui.md +30 -0
  512. package/docs/zh-CN/cli/uninstall.md +24 -0
  513. package/docs/zh-CN/cli/update.md +101 -0
  514. package/docs/zh-CN/cli/voicecall.md +41 -0
  515. package/docs/zh-CN/cli/webhooks.md +32 -0
  516. package/docs/zh-CN/concepts/agent-loop.md +146 -0
  517. package/docs/zh-CN/concepts/agent-workspace.md +219 -0
  518. package/docs/zh-CN/concepts/agent.md +115 -0
  519. package/docs/zh-CN/concepts/architecture.md +123 -0
  520. package/docs/zh-CN/concepts/compaction.md +67 -0
  521. package/docs/zh-CN/concepts/context.md +168 -0
  522. package/docs/zh-CN/concepts/features.md +59 -0
  523. package/docs/zh-CN/concepts/markdown-formatting.md +117 -0
  524. package/docs/zh-CN/concepts/memory.md +412 -0
  525. package/docs/zh-CN/concepts/messages.md +141 -0
  526. package/docs/zh-CN/concepts/model-failover.md +145 -0
  527. package/docs/zh-CN/concepts/model-providers.md +606 -0
  528. package/docs/zh-CN/concepts/models.md +225 -0
  529. package/docs/zh-CN/concepts/multi-agent.md +372 -0
  530. package/docs/zh-CN/concepts/oauth.md +164 -0
  531. package/docs/zh-CN/concepts/presence.md +99 -0
  532. package/docs/zh-CN/concepts/queue.md +94 -0
  533. package/docs/zh-CN/concepts/retry.md +76 -0
  534. package/docs/zh-CN/concepts/session-pruning.md +129 -0
  535. package/docs/zh-CN/concepts/session-tool.md +200 -0
  536. package/docs/zh-CN/concepts/session.md +166 -0
  537. package/docs/zh-CN/concepts/streaming.md +133 -0
  538. package/docs/zh-CN/concepts/system-prompt.md +101 -0
  539. package/docs/zh-CN/concepts/timezone.md +96 -0
  540. package/docs/zh-CN/concepts/typebox.md +284 -0
  541. package/docs/zh-CN/concepts/typing-indicators.md +74 -0
  542. package/docs/zh-CN/concepts/usage-tracking.md +42 -0
  543. package/docs/zh-CN/date-time.md +129 -0
  544. package/docs/zh-CN/debug/node-issue.md +90 -0
  545. package/docs/zh-CN/diagnostics/flags.md +98 -0
  546. package/docs/zh-CN/gateway/authentication.md +184 -0
  547. package/docs/zh-CN/gateway/background-process.md +100 -0
  548. package/docs/zh-CN/gateway/bonjour.md +174 -0
  549. package/docs/zh-CN/gateway/bridge-protocol.md +86 -0
  550. package/docs/zh-CN/gateway/cli-backends.md +213 -0
  551. package/docs/zh-CN/gateway/configuration-examples.md +587 -0
  552. package/docs/zh-CN/gateway/configuration-reference.md +3103 -0
  553. package/docs/zh-CN/gateway/configuration.md +640 -0
  554. package/docs/zh-CN/gateway/discovery.md +123 -0
  555. package/docs/zh-CN/gateway/doctor.md +238 -0
  556. package/docs/zh-CN/gateway/gateway-lock.md +41 -0
  557. package/docs/zh-CN/gateway/health.md +42 -0
  558. package/docs/zh-CN/gateway/heartbeat.md +274 -0
  559. package/docs/zh-CN/gateway/index.md +335 -0
  560. package/docs/zh-CN/gateway/local-models.md +159 -0
  561. package/docs/zh-CN/gateway/logging.md +114 -0
  562. package/docs/zh-CN/gateway/multiple-gateways.md +119 -0
  563. package/docs/zh-CN/gateway/network-model.md +23 -0
  564. package/docs/zh-CN/gateway/openai-http-api.md +125 -0
  565. package/docs/zh-CN/gateway/openresponses-http-api.md +317 -0
  566. package/docs/zh-CN/gateway/pairing.md +99 -0
  567. package/docs/zh-CN/gateway/protocol.md +220 -0
  568. package/docs/zh-CN/gateway/remote-gateway-readme.md +164 -0
  569. package/docs/zh-CN/gateway/remote.md +133 -0
  570. package/docs/zh-CN/gateway/sandbox-vs-tool-policy-vs-elevated.md +135 -0
  571. package/docs/zh-CN/gateway/sandboxing.md +188 -0
  572. package/docs/zh-CN/gateway/security/index.md +777 -0
  573. package/docs/zh-CN/gateway/tailscale.md +124 -0
  574. package/docs/zh-CN/gateway/tools-invoke-http-api.md +92 -0
  575. package/docs/zh-CN/gateway/troubleshooting.md +771 -0
  576. package/docs/zh-CN/help/debugging.md +160 -0
  577. package/docs/zh-CN/help/environment.md +88 -0
  578. package/docs/zh-CN/help/faq.md +2640 -0
  579. package/docs/zh-CN/help/index.md +28 -0
  580. package/docs/zh-CN/help/scripts.md +35 -0
  581. package/docs/zh-CN/help/testing.md +375 -0
  582. package/docs/zh-CN/help/troubleshooting.md +104 -0
  583. package/docs/zh-CN/index.md +186 -0
  584. package/docs/zh-CN/install/ansible.md +215 -0
  585. package/docs/zh-CN/install/bun.md +65 -0
  586. package/docs/zh-CN/install/development-channels.md +81 -0
  587. package/docs/zh-CN/install/docker.md +532 -0
  588. package/docs/zh-CN/install/exe-dev.md +133 -0
  589. package/docs/zh-CN/install/fly.md +490 -0
  590. package/docs/zh-CN/install/gcp.md +510 -0
  591. package/docs/zh-CN/install/hetzner.md +337 -0
  592. package/docs/zh-CN/install/index.md +235 -0
  593. package/docs/zh-CN/install/installer.md +422 -0
  594. package/docs/zh-CN/install/macos-vm.md +288 -0
  595. package/docs/zh-CN/install/migrating.md +199 -0
  596. package/docs/zh-CN/install/nix.md +99 -0
  597. package/docs/zh-CN/install/node.md +8 -0
  598. package/docs/zh-CN/install/northflank.mdx +60 -0
  599. package/docs/zh-CN/install/railway.mdx +106 -0
  600. package/docs/zh-CN/install/render.mdx +169 -0
  601. package/docs/zh-CN/install/uninstall.md +135 -0
  602. package/docs/zh-CN/install/updating.md +233 -0
  603. package/docs/zh-CN/logging.md +329 -0
  604. package/docs/zh-CN/network.md +59 -0
  605. package/docs/zh-CN/nodes/audio.md +120 -0
  606. package/docs/zh-CN/nodes/camera.md +162 -0
  607. package/docs/zh-CN/nodes/images.md +79 -0
  608. package/docs/zh-CN/nodes/index.md +348 -0
  609. package/docs/zh-CN/nodes/location-command.md +120 -0
  610. package/docs/zh-CN/nodes/media-understanding.md +380 -0
  611. package/docs/zh-CN/nodes/talk.md +97 -0
  612. package/docs/zh-CN/nodes/troubleshooting.md +8 -0
  613. package/docs/zh-CN/nodes/voicewake.md +72 -0
  614. package/docs/zh-CN/perplexity.md +102 -0
  615. package/docs/zh-CN/pi-dev.md +77 -0
  616. package/docs/zh-CN/pi.md +619 -0
  617. package/docs/zh-CN/platforms/android.md +155 -0
  618. package/docs/zh-CN/platforms/digitalocean.md +273 -0
  619. package/docs/zh-CN/platforms/index.md +60 -0
  620. package/docs/zh-CN/platforms/ios.md +114 -0
  621. package/docs/zh-CN/platforms/linux.md +100 -0
  622. package/docs/zh-CN/platforms/mac/bundled-gateway.md +75 -0
  623. package/docs/zh-CN/platforms/mac/canvas.md +128 -0
  624. package/docs/zh-CN/platforms/mac/child-process.md +73 -0
  625. package/docs/zh-CN/platforms/mac/dev-setup.md +109 -0
  626. package/docs/zh-CN/platforms/mac/health.md +41 -0
  627. package/docs/zh-CN/platforms/mac/icon.md +38 -0
  628. package/docs/zh-CN/platforms/mac/logging.md +64 -0
  629. package/docs/zh-CN/platforms/mac/menu-bar.md +88 -0
  630. package/docs/zh-CN/platforms/mac/peekaboo.md +62 -0
  631. package/docs/zh-CN/platforms/mac/permissions.md +46 -0
  632. package/docs/zh-CN/platforms/mac/remote.md +90 -0
  633. package/docs/zh-CN/platforms/mac/signing.md +54 -0
  634. package/docs/zh-CN/platforms/mac/skills.md +40 -0
  635. package/docs/zh-CN/platforms/mac/voice-overlay.md +67 -0
  636. package/docs/zh-CN/platforms/mac/voicewake.md +74 -0
  637. package/docs/zh-CN/platforms/mac/webchat.md +43 -0
  638. package/docs/zh-CN/platforms/mac/xpc.md +68 -0
  639. package/docs/zh-CN/platforms/macos.md +193 -0
  640. package/docs/zh-CN/platforms/oracle.md +310 -0
  641. package/docs/zh-CN/platforms/raspberry-pi.md +416 -0
  642. package/docs/zh-CN/platforms/windows.md +247 -0
  643. package/docs/zh-CN/plugins/agent-tools.md +99 -0
  644. package/docs/zh-CN/plugins/manifest.md +68 -0
  645. package/docs/zh-CN/plugins/voice-call.md +250 -0
  646. package/docs/zh-CN/plugins/zalouser.md +88 -0
  647. package/docs/zh-CN/prose.md +141 -0
  648. package/docs/zh-CN/providers/anthropic.md +265 -0
  649. package/docs/zh-CN/providers/bedrock.md +170 -0
  650. package/docs/zh-CN/providers/claude-max-api-proxy.md +155 -0
  651. package/docs/zh-CN/providers/cloudflare-ai-gateway.md +78 -0
  652. package/docs/zh-CN/providers/deepgram.md +97 -0
  653. package/docs/zh-CN/providers/github-copilot.md +67 -0
  654. package/docs/zh-CN/providers/glm.md +50 -0
  655. package/docs/zh-CN/providers/huggingface.md +216 -0
  656. package/docs/zh-CN/providers/index.md +69 -0
  657. package/docs/zh-CN/providers/kilocode.md +80 -0
  658. package/docs/zh-CN/providers/litellm.md +160 -0
  659. package/docs/zh-CN/providers/minimax.md +222 -0
  660. package/docs/zh-CN/providers/mistral.md +61 -0
  661. package/docs/zh-CN/providers/models.md +51 -0
  662. package/docs/zh-CN/providers/moonshot.md +182 -0
  663. package/docs/zh-CN/providers/nvidia.md +62 -0
  664. package/docs/zh-CN/providers/ollama.md +359 -0
  665. package/docs/zh-CN/providers/openai.md +308 -0
  666. package/docs/zh-CN/providers/opencode-go.md +52 -0
  667. package/docs/zh-CN/providers/opencode.md +71 -0
  668. package/docs/zh-CN/providers/openrouter.md +44 -0
  669. package/docs/zh-CN/providers/qianfan.md +45 -0
  670. package/docs/zh-CN/providers/qwen.md +55 -0
  671. package/docs/zh-CN/providers/sglang.md +111 -0
  672. package/docs/zh-CN/providers/synthetic.md +106 -0
  673. package/docs/zh-CN/providers/together.md +72 -0
  674. package/docs/zh-CN/providers/venice.md +289 -0
  675. package/docs/zh-CN/providers/vercel-ai-gateway.md +66 -0
  676. package/docs/zh-CN/providers/xiaomi.md +93 -0
  677. package/docs/zh-CN/providers/zai.md +53 -0
  678. package/docs/zh-CN/reference/AGENTS.default.md +131 -0
  679. package/docs/zh-CN/reference/RELEASING.md +48 -0
  680. package/docs/zh-CN/reference/api-usage-costs.md +141 -0
  681. package/docs/zh-CN/reference/credits.md +34 -0
  682. package/docs/zh-CN/reference/device-models.md +54 -0
  683. package/docs/zh-CN/reference/rpc.md +48 -0
  684. package/docs/zh-CN/reference/session-management-compaction.md +287 -0
  685. package/docs/zh-CN/reference/templates/AGENTS.dev.md +89 -0
  686. package/docs/zh-CN/reference/templates/AGENTS.md +225 -0
  687. package/docs/zh-CN/reference/templates/BOOT.md +17 -0
  688. package/docs/zh-CN/reference/templates/BOOTSTRAP.md +68 -0
  689. package/docs/zh-CN/reference/templates/HEARTBEAT.md +18 -0
  690. package/docs/zh-CN/reference/templates/IDENTITY.dev.md +54 -0
  691. package/docs/zh-CN/reference/templates/IDENTITY.md +36 -0
  692. package/docs/zh-CN/reference/templates/SOUL.dev.md +83 -0
  693. package/docs/zh-CN/reference/templates/SOUL.md +49 -0
  694. package/docs/zh-CN/reference/templates/TOOLS.dev.md +31 -0
  695. package/docs/zh-CN/reference/templates/TOOLS.md +53 -0
  696. package/docs/zh-CN/reference/templates/USER.dev.md +25 -0
  697. package/docs/zh-CN/reference/templates/USER.md +30 -0
  698. package/docs/zh-CN/reference/test.md +57 -0
  699. package/docs/zh-CN/reference/token-use.md +119 -0
  700. package/docs/zh-CN/reference/transcript-hygiene.md +109 -0
  701. package/docs/zh-CN/reference/wizard.md +242 -0
  702. package/docs/zh-CN/security/formal-verification.md +171 -0
  703. package/docs/zh-CN/start/bootstrapping.md +9 -0
  704. package/docs/zh-CN/start/docs-directory.md +70 -0
  705. package/docs/zh-CN/start/getting-started.md +143 -0
  706. package/docs/zh-CN/start/hubs.md +194 -0
  707. package/docs/zh-CN/start/lore.md +226 -0
  708. package/docs/zh-CN/start/onboarding-overview.md +58 -0
  709. package/docs/zh-CN/start/onboarding.md +105 -0
  710. package/docs/zh-CN/start/openclaw.md +248 -0
  711. package/docs/zh-CN/start/quickstart.md +88 -0
  712. package/docs/zh-CN/start/setup.md +153 -0
  713. package/docs/zh-CN/start/showcase.md +423 -0
  714. package/docs/zh-CN/start/wizard-cli-automation.md +222 -0
  715. package/docs/zh-CN/start/wizard-cli-reference.md +306 -0
  716. package/docs/zh-CN/start/wizard.md +132 -0
  717. package/docs/zh-CN/tools/agent-send.md +59 -0
  718. package/docs/zh-CN/tools/apply-patch.md +57 -0
  719. package/docs/zh-CN/tools/browser-linux-troubleshooting.md +144 -0
  720. package/docs/zh-CN/tools/browser-login.md +75 -0
  721. package/docs/zh-CN/tools/browser.md +553 -0
  722. package/docs/zh-CN/tools/chrome-extension.md +183 -0
  723. package/docs/zh-CN/tools/clawhub.md +209 -0
  724. package/docs/zh-CN/tools/creating-skills.md +61 -0
  725. package/docs/zh-CN/tools/elevated.md +64 -0
  726. package/docs/zh-CN/tools/exec-approvals.md +234 -0
  727. package/docs/zh-CN/tools/exec.md +169 -0
  728. package/docs/zh-CN/tools/firecrawl.md +68 -0
  729. package/docs/zh-CN/tools/index.md +515 -0
  730. package/docs/zh-CN/tools/llm-task.md +117 -0
  731. package/docs/zh-CN/tools/lobster.md +349 -0
  732. package/docs/zh-CN/tools/multi-agent-sandbox-tools.md +401 -0
  733. package/docs/zh-CN/tools/plugin.md +1612 -0
  734. package/docs/zh-CN/tools/reactions.md +29 -0
  735. package/docs/zh-CN/tools/skills-config.md +78 -0
  736. package/docs/zh-CN/tools/skills.md +279 -0
  737. package/docs/zh-CN/tools/slash-commands.md +205 -0
  738. package/docs/zh-CN/tools/subagents.md +167 -0
  739. package/docs/zh-CN/tools/thinking.md +80 -0
  740. package/docs/zh-CN/tools/web.md +289 -0
  741. package/docs/zh-CN/tts.md +375 -0
  742. package/docs/zh-CN/vps.md +47 -0
  743. package/docs/zh-CN/web/control-ui.md +191 -0
  744. package/docs/zh-CN/web/dashboard.md +53 -0
  745. package/docs/zh-CN/web/index.md +118 -0
  746. package/docs/zh-CN/web/tui.md +166 -0
  747. package/docs/zh-CN/web/webchat.md +56 -0
  748. package/package.json +841 -0
  749. package/quantumclaw.mjs +135 -0
  750. package/skills/1password/SKILL.md +70 -0
  751. package/skills/1password/references/cli-examples.md +29 -0
  752. package/skills/1password/references/get-started.md +17 -0
  753. package/skills/apple-notes/SKILL.md +77 -0
  754. package/skills/apple-reminders/SKILL.md +118 -0
  755. package/skills/bear-notes/SKILL.md +107 -0
  756. package/skills/blogwatcher/SKILL.md +69 -0
  757. package/skills/blucli/SKILL.md +47 -0
  758. package/skills/bluebubbles/SKILL.md +131 -0
  759. package/skills/camsnap/SKILL.md +45 -0
  760. package/skills/canvas/SKILL.md +198 -0
  761. package/skills/clawhub/SKILL.md +77 -0
  762. package/skills/coding-agent/SKILL.md +295 -0
  763. package/skills/discord/SKILL.md +197 -0
  764. package/skills/eightctl/SKILL.md +50 -0
  765. package/skills/gemini/SKILL.md +43 -0
  766. package/skills/gh-issues/SKILL.md +865 -0
  767. package/skills/gifgrep/SKILL.md +79 -0
  768. package/skills/github/SKILL.md +163 -0
  769. package/skills/gog/SKILL.md +116 -0
  770. package/skills/goplaces/SKILL.md +52 -0
  771. package/skills/healthcheck/SKILL.md +245 -0
  772. package/skills/himalaya/SKILL.md +257 -0
  773. package/skills/himalaya/references/configuration.md +184 -0
  774. package/skills/himalaya/references/message-composition.md +199 -0
  775. package/skills/imsg/SKILL.md +122 -0
  776. package/skills/mcporter/SKILL.md +61 -0
  777. package/skills/model-usage/SKILL.md +69 -0
  778. package/skills/model-usage/references/codexbar-cli.md +33 -0
  779. package/skills/model-usage/scripts/model_usage.py +320 -0
  780. package/skills/model-usage/scripts/test_model_usage.py +40 -0
  781. package/skills/nano-pdf/SKILL.md +38 -0
  782. package/skills/node-connect/SKILL.md +142 -0
  783. package/skills/notion/SKILL.md +174 -0
  784. package/skills/obsidian/SKILL.md +81 -0
  785. package/skills/openai-image-gen/SKILL.md +92 -0
  786. package/skills/openai-image-gen/scripts/gen.py +328 -0
  787. package/skills/openai-image-gen/scripts/test_gen.py +140 -0
  788. package/skills/openai-whisper/SKILL.md +38 -0
  789. package/skills/openai-whisper-api/SKILL.md +52 -0
  790. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  791. package/skills/openhue/SKILL.md +112 -0
  792. package/skills/oracle/SKILL.md +125 -0
  793. package/skills/ordercli/SKILL.md +78 -0
  794. package/skills/peekaboo/SKILL.md +190 -0
  795. package/skills/sag/SKILL.md +87 -0
  796. package/skills/session-logs/SKILL.md +115 -0
  797. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  798. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
  799. package/skills/skill-creator/SKILL.md +372 -0
  800. package/skills/skill-creator/license.txt +202 -0
  801. package/skills/skill-creator/scripts/init_skill.py +378 -0
  802. package/skills/skill-creator/scripts/package_skill.py +139 -0
  803. package/skills/skill-creator/scripts/quick_validate.py +159 -0
  804. package/skills/skill-creator/scripts/test_package_skill.py +160 -0
  805. package/skills/skill-creator/scripts/test_quick_validate.py +72 -0
  806. package/skills/slack/SKILL.md +144 -0
  807. package/skills/songsee/SKILL.md +49 -0
  808. package/skills/sonoscli/SKILL.md +65 -0
  809. package/skills/spotify-player/SKILL.md +64 -0
  810. package/skills/summarize/SKILL.md +87 -0
  811. package/skills/things-mac/SKILL.md +86 -0
  812. package/skills/tmux/SKILL.md +153 -0
  813. package/skills/tmux/scripts/find-sessions.sh +112 -0
  814. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  815. package/skills/trello/SKILL.md +95 -0
  816. package/skills/video-frames/SKILL.md +46 -0
  817. package/skills/video-frames/scripts/frame.sh +81 -0
  818. package/skills/voice-call/SKILL.md +45 -0
  819. package/skills/wacli/SKILL.md +72 -0
  820. package/skills/weather/SKILL.md +112 -0
  821. package/skills/xurl/SKILL.md +461 -0
@@ -0,0 +1,3123 @@
1
+ ---
2
+ title: "Configuration Reference"
3
+ summary: "Complete reference for every QuantumClaw config key, defaults, and channel settings"
4
+ read_when:
5
+ - You need exact field-level config semantics or defaults
6
+ - You are validating channel, model, gateway, or tool config blocks
7
+ ---
8
+
9
+ # Configuration Reference
10
+
11
+ Every field available in `~/.quantumclaw/quantumclaw.json`. For a task-oriented overview, see [Configuration](/gateway/configuration).
12
+
13
+ Config format is **JSON5** (comments + trailing commas allowed). All fields are optional — QuantumClaw uses safe defaults when omitted.
14
+
15
+ ---
16
+
17
+ ## Channels
18
+
19
+ Each channel starts automatically when its config section exists (unless `enabled: false`).
20
+
21
+ ### DM and group access
22
+
23
+ All channels support DM policies and group policies:
24
+
25
+ | DM policy | Behavior |
26
+ | ------------------- | --------------------------------------------------------------- |
27
+ | `pairing` (default) | Unknown senders get a one-time pairing code; owner must approve |
28
+ | `allowlist` | Only senders in `allowFrom` (or paired allow store) |
29
+ | `open` | Allow all inbound DMs (requires `allowFrom: ["*"]`) |
30
+ | `disabled` | Ignore all inbound DMs |
31
+
32
+ | Group policy | Behavior |
33
+ | --------------------- | ------------------------------------------------------ |
34
+ | `allowlist` (default) | Only groups matching the configured allowlist |
35
+ | `open` | Bypass group allowlists (mention-gating still applies) |
36
+ | `disabled` | Block all group/room messages |
37
+
38
+ <Note>
39
+ `channels.defaults.groupPolicy` sets the default when a provider's `groupPolicy` is unset.
40
+ Pairing codes expire after 1 hour. Pending DM pairing requests are capped at **3 per channel**.
41
+ If a provider block is missing entirely (`channels.<provider>` absent), runtime group policy falls back to `allowlist` (fail-closed) with a startup warning.
42
+ </Note>
43
+
44
+ ### Channel model overrides
45
+
46
+ Use `channels.modelByChannel` to pin specific channel IDs to a model. Values accept `provider/model` or configured model aliases. The channel mapping applies when a session does not already have a model override (for example, set via `/model`).
47
+
48
+ ```json5
49
+ {
50
+ channels: {
51
+ modelByChannel: {
52
+ discord: {
53
+ "123456789012345678": "anthropic/claude-opus-4-6",
54
+ },
55
+ slack: {
56
+ C1234567890: "openai/gpt-4.1",
57
+ },
58
+ telegram: {
59
+ "-1001234567890": "openai/gpt-4.1-mini",
60
+ "-1001234567890:topic:99": "anthropic/claude-sonnet-4-6",
61
+ },
62
+ },
63
+ },
64
+ }
65
+ ```
66
+
67
+ ### Channel defaults and heartbeat
68
+
69
+ Use `channels.defaults` for shared group-policy and heartbeat behavior across providers:
70
+
71
+ ```json5
72
+ {
73
+ channels: {
74
+ defaults: {
75
+ groupPolicy: "allowlist", // open | allowlist | disabled
76
+ heartbeat: {
77
+ showOk: false,
78
+ showAlerts: true,
79
+ useIndicator: true,
80
+ },
81
+ },
82
+ },
83
+ }
84
+ ```
85
+
86
+ - `channels.defaults.groupPolicy`: fallback group policy when a provider-level `groupPolicy` is unset.
87
+ - `channels.defaults.heartbeat.showOk`: include healthy channel statuses in heartbeat output.
88
+ - `channels.defaults.heartbeat.showAlerts`: include degraded/error statuses in heartbeat output.
89
+ - `channels.defaults.heartbeat.useIndicator`: render compact indicator-style heartbeat output.
90
+
91
+ ### WhatsApp
92
+
93
+ WhatsApp runs through the gateway's web channel (Baileys Web). It starts automatically when a linked session exists.
94
+
95
+ ```json5
96
+ {
97
+ channels: {
98
+ whatsapp: {
99
+ dmPolicy: "pairing", // pairing | allowlist | open | disabled
100
+ allowFrom: ["+15555550123", "+447700900123"],
101
+ textChunkLimit: 4000,
102
+ chunkMode: "length", // length | newline
103
+ mediaMaxMb: 50,
104
+ sendReadReceipts: true, // blue ticks (false in self-chat mode)
105
+ groups: {
106
+ "*": { requireMention: true },
107
+ },
108
+ groupPolicy: "allowlist",
109
+ groupAllowFrom: ["+15551234567"],
110
+ },
111
+ },
112
+ web: {
113
+ enabled: true,
114
+ heartbeatSeconds: 60,
115
+ reconnect: {
116
+ initialMs: 2000,
117
+ maxMs: 120000,
118
+ factor: 1.4,
119
+ jitter: 0.2,
120
+ maxAttempts: 0,
121
+ },
122
+ },
123
+ }
124
+ ```
125
+
126
+ <Accordion title="Multi-account WhatsApp">
127
+
128
+ ```json5
129
+ {
130
+ channels: {
131
+ whatsapp: {
132
+ accounts: {
133
+ default: {},
134
+ personal: {},
135
+ biz: {
136
+ // authDir: "~/.quantumclaw/credentials/whatsapp/biz",
137
+ },
138
+ },
139
+ },
140
+ },
141
+ }
142
+ ```
143
+
144
+ - Outbound commands default to account `default` if present; otherwise the first configured account id (sorted).
145
+ - Optional `channels.whatsapp.defaultAccount` overrides that fallback default account selection when it matches a configured account id.
146
+ - Legacy single-account Baileys auth dir is migrated by `quantumclaw doctor` into `whatsapp/default`.
147
+ - Per-account overrides: `channels.whatsapp.accounts.<id>.sendReadReceipts`, `channels.whatsapp.accounts.<id>.dmPolicy`, `channels.whatsapp.accounts.<id>.allowFrom`.
148
+
149
+ </Accordion>
150
+
151
+ ### Telegram
152
+
153
+ ```json5
154
+ {
155
+ channels: {
156
+ telegram: {
157
+ enabled: true,
158
+ botToken: "your-bot-token",
159
+ dmPolicy: "pairing",
160
+ allowFrom: ["tg:123456789"],
161
+ groups: {
162
+ "*": { requireMention: true },
163
+ "-1001234567890": {
164
+ allowFrom: ["@admin"],
165
+ systemPrompt: "Keep answers brief.",
166
+ topics: {
167
+ "99": {
168
+ requireMention: false,
169
+ skills: ["search"],
170
+ systemPrompt: "Stay on topic.",
171
+ },
172
+ },
173
+ },
174
+ },
175
+ customCommands: [
176
+ { command: "backup", description: "Git backup" },
177
+ { command: "generate", description: "Create an image" },
178
+ ],
179
+ historyLimit: 50,
180
+ replyToMode: "first", // off | first | all
181
+ linkPreview: true,
182
+ streaming: "partial", // off | partial | block | progress (default: off)
183
+ actions: { reactions: true, sendMessage: true },
184
+ reactionNotifications: "own", // off | own | all
185
+ mediaMaxMb: 100,
186
+ retry: {
187
+ attempts: 3,
188
+ minDelayMs: 400,
189
+ maxDelayMs: 30000,
190
+ jitter: 0.1,
191
+ },
192
+ network: {
193
+ autoSelectFamily: true,
194
+ dnsResultOrder: "ipv4first",
195
+ },
196
+ proxy: "socks5://localhost:9050",
197
+ webhookUrl: "https://example.com/telegram-webhook",
198
+ webhookSecret: "secret",
199
+ webhookPath: "/telegram-webhook",
200
+ },
201
+ },
202
+ }
203
+ ```
204
+
205
+ - Bot token: `channels.telegram.botToken` or `channels.telegram.tokenFile` (regular file only; symlinks rejected), with `TELEGRAM_BOT_TOKEN` as fallback for the default account.
206
+ - Optional `channels.telegram.defaultAccount` overrides default account selection when it matches a configured account id.
207
+ - In multi-account setups (2+ account ids), set an explicit default (`channels.telegram.defaultAccount` or `channels.telegram.accounts.default`) to avoid fallback routing; `quantumclaw doctor` warns when this is missing or invalid.
208
+ - `configWrites: false` blocks Telegram-initiated config writes (supergroup ID migrations, `/config set|unset`).
209
+ - Top-level `bindings[]` entries with `type: "acp"` configure persistent ACP bindings for forum topics (use canonical `chatId:topic:topicId` in `match.peer.id`). Field semantics are shared in [ACP Agents](/tools/acp-agents#channel-specific-settings).
210
+ - Telegram stream previews use `sendMessage` + `editMessageText` (works in direct and group chats).
211
+ - Retry policy: see [Retry policy](/concepts/retry).
212
+
213
+ ### Discord
214
+
215
+ ```json5
216
+ {
217
+ channels: {
218
+ discord: {
219
+ enabled: true,
220
+ token: "your-bot-token",
221
+ mediaMaxMb: 8,
222
+ allowBots: false,
223
+ actions: {
224
+ reactions: true,
225
+ stickers: true,
226
+ polls: true,
227
+ permissions: true,
228
+ messages: true,
229
+ threads: true,
230
+ pins: true,
231
+ search: true,
232
+ memberInfo: true,
233
+ roleInfo: true,
234
+ roles: false,
235
+ channelInfo: true,
236
+ voiceStatus: true,
237
+ events: true,
238
+ moderation: false,
239
+ },
240
+ replyToMode: "off", // off | first | all
241
+ dmPolicy: "pairing",
242
+ allowFrom: ["1234567890", "123456789012345678"],
243
+ dm: { enabled: true, groupEnabled: false, groupChannels: ["quantumclaw-dm"] },
244
+ guilds: {
245
+ "123456789012345678": {
246
+ slug: "friends-of-quantumclaw",
247
+ requireMention: false,
248
+ ignoreOtherMentions: true,
249
+ reactionNotifications: "own",
250
+ users: ["987654321098765432"],
251
+ channels: {
252
+ general: { allow: true },
253
+ help: {
254
+ allow: true,
255
+ requireMention: true,
256
+ users: ["987654321098765432"],
257
+ skills: ["docs"],
258
+ systemPrompt: "Short answers only.",
259
+ },
260
+ },
261
+ },
262
+ },
263
+ historyLimit: 20,
264
+ textChunkLimit: 2000,
265
+ chunkMode: "length", // length | newline
266
+ streaming: "off", // off | partial | block | progress (progress maps to partial on Discord)
267
+ maxLinesPerMessage: 17,
268
+ ui: {
269
+ components: {
270
+ accentColor: "#5865F2",
271
+ },
272
+ },
273
+ threadBindings: {
274
+ enabled: true,
275
+ idleHours: 24,
276
+ maxAgeHours: 0,
277
+ spawnSubagentSessions: false, // opt-in for sessions_spawn({ thread: true })
278
+ },
279
+ voice: {
280
+ enabled: true,
281
+ autoJoin: [
282
+ {
283
+ guildId: "123456789012345678",
284
+ channelId: "234567890123456789",
285
+ },
286
+ ],
287
+ daveEncryption: true,
288
+ decryptionFailureTolerance: 24,
289
+ tts: {
290
+ provider: "openai",
291
+ openai: { voice: "alloy" },
292
+ },
293
+ },
294
+ retry: {
295
+ attempts: 3,
296
+ minDelayMs: 500,
297
+ maxDelayMs: 30000,
298
+ jitter: 0.1,
299
+ },
300
+ },
301
+ },
302
+ }
303
+ ```
304
+
305
+ - Token: `channels.discord.token`, with `DISCORD_BOT_TOKEN` as fallback for the default account.
306
+ - Direct outbound calls that provide an explicit Discord `token` use that token for the call; account retry/policy settings still come from the selected account in the active runtime snapshot.
307
+ - Optional `channels.discord.defaultAccount` overrides default account selection when it matches a configured account id.
308
+ - Use `user:<id>` (DM) or `channel:<id>` (guild channel) for delivery targets; bare numeric IDs are rejected.
309
+ - Guild slugs are lowercase with spaces replaced by `-`; channel keys use the slugged name (no `#`). Prefer guild IDs.
310
+ - Bot-authored messages are ignored by default. `allowBots: true` enables them; use `allowBots: "mentions"` to only accept bot messages that mention the bot (own messages still filtered).
311
+ - `channels.discord.guilds.<id>.ignoreOtherMentions` (and channel overrides) drops messages that mention another user or role but not the bot (excluding @everyone/@here).
312
+ - `maxLinesPerMessage` (default 17) splits tall messages even when under 2000 chars.
313
+ - `channels.discord.threadBindings` controls Discord thread-bound routing:
314
+ - `enabled`: Discord override for thread-bound session features (`/focus`, `/unfocus`, `/agents`, `/session idle`, `/session max-age`, and bound delivery/routing)
315
+ - `idleHours`: Discord override for inactivity auto-unfocus in hours (`0` disables)
316
+ - `maxAgeHours`: Discord override for hard max age in hours (`0` disables)
317
+ - `spawnSubagentSessions`: opt-in switch for `sessions_spawn({ thread: true })` auto thread creation/binding
318
+ - Top-level `bindings[]` entries with `type: "acp"` configure persistent ACP bindings for channels and threads (use channel/thread id in `match.peer.id`). Field semantics are shared in [ACP Agents](/tools/acp-agents#channel-specific-settings).
319
+ - `channels.discord.ui.components.accentColor` sets the accent color for Discord components v2 containers.
320
+ - `channels.discord.voice` enables Discord voice channel conversations and optional auto-join + TTS overrides.
321
+ - `channels.discord.voice.daveEncryption` and `channels.discord.voice.decryptionFailureTolerance` pass through to `@discordjs/voice` DAVE options (`true` and `24` by default).
322
+ - QuantumClaw additionally attempts voice receive recovery by leaving/rejoining a voice session after repeated decrypt failures.
323
+ - `channels.discord.streaming` is the canonical stream mode key. Legacy `streamMode` and boolean `streaming` values are auto-migrated.
324
+ - `channels.discord.autoPresence` maps runtime availability to bot presence (healthy => online, degraded => idle, exhausted => dnd) and allows optional status text overrides.
325
+ - `channels.discord.dangerouslyAllowNameMatching` re-enables mutable name/tag matching (break-glass compatibility mode).
326
+
327
+ **Reaction notification modes:** `off` (none), `own` (bot's messages, default), `all` (all messages), `allowlist` (from `guilds.<id>.users` on all messages).
328
+
329
+ ### Google Chat
330
+
331
+ ```json5
332
+ {
333
+ channels: {
334
+ googlechat: {
335
+ enabled: true,
336
+ serviceAccountFile: "/path/to/service-account.json",
337
+ audienceType: "app-url", // app-url | project-number
338
+ audience: "https://gateway.example.com/googlechat",
339
+ webhookPath: "/googlechat",
340
+ botUser: "users/1234567890",
341
+ dm: {
342
+ enabled: true,
343
+ policy: "pairing",
344
+ allowFrom: ["users/1234567890"],
345
+ },
346
+ groupPolicy: "allowlist",
347
+ groups: {
348
+ "spaces/AAAA": { allow: true, requireMention: true },
349
+ },
350
+ actions: { reactions: true },
351
+ typingIndicator: "message",
352
+ mediaMaxMb: 20,
353
+ },
354
+ },
355
+ }
356
+ ```
357
+
358
+ - Service account JSON: inline (`serviceAccount`) or file-based (`serviceAccountFile`).
359
+ - Service account SecretRef is also supported (`serviceAccountRef`).
360
+ - Env fallbacks: `GOOGLE_CHAT_SERVICE_ACCOUNT` or `GOOGLE_CHAT_SERVICE_ACCOUNT_FILE`.
361
+ - Use `spaces/<spaceId>` or `users/<userId>` for delivery targets.
362
+ - `channels.googlechat.dangerouslyAllowNameMatching` re-enables mutable email principal matching (break-glass compatibility mode).
363
+
364
+ ### Slack
365
+
366
+ ```json5
367
+ {
368
+ channels: {
369
+ slack: {
370
+ enabled: true,
371
+ botToken: "xoxb-...",
372
+ appToken: "xapp-...",
373
+ dmPolicy: "pairing",
374
+ allowFrom: ["U123", "U456", "*"],
375
+ dm: { enabled: true, groupEnabled: false, groupChannels: ["G123"] },
376
+ channels: {
377
+ C123: { allow: true, requireMention: true, allowBots: false },
378
+ "#general": {
379
+ allow: true,
380
+ requireMention: true,
381
+ allowBots: false,
382
+ users: ["U123"],
383
+ skills: ["docs"],
384
+ systemPrompt: "Short answers only.",
385
+ },
386
+ },
387
+ historyLimit: 50,
388
+ allowBots: false,
389
+ reactionNotifications: "own",
390
+ reactionAllowlist: ["U123"],
391
+ replyToMode: "off", // off | first | all
392
+ thread: {
393
+ historyScope: "thread", // thread | channel
394
+ inheritParent: false,
395
+ },
396
+ actions: {
397
+ reactions: true,
398
+ messages: true,
399
+ pins: true,
400
+ memberInfo: true,
401
+ emojiList: true,
402
+ },
403
+ slashCommand: {
404
+ enabled: true,
405
+ name: "quantumclaw",
406
+ sessionPrefix: "slack:slash",
407
+ ephemeral: true,
408
+ },
409
+ typingReaction: "hourglass_flowing_sand",
410
+ textChunkLimit: 4000,
411
+ chunkMode: "length",
412
+ streaming: "partial", // off | partial | block | progress (preview mode)
413
+ nativeStreaming: true, // use Slack native streaming API when streaming=partial
414
+ mediaMaxMb: 20,
415
+ },
416
+ },
417
+ }
418
+ ```
419
+
420
+ - **Socket mode** requires both `botToken` and `appToken` (`SLACK_BOT_TOKEN` + `SLACK_APP_TOKEN` for default account env fallback).
421
+ - **HTTP mode** requires `botToken` plus `signingSecret` (at root or per-account).
422
+ - `configWrites: false` blocks Slack-initiated config writes.
423
+ - Optional `channels.slack.defaultAccount` overrides default account selection when it matches a configured account id.
424
+ - `channels.slack.streaming` is the canonical stream mode key. Legacy `streamMode` and boolean `streaming` values are auto-migrated.
425
+ - Use `user:<id>` (DM) or `channel:<id>` for delivery targets.
426
+
427
+ **Reaction notification modes:** `off`, `own` (default), `all`, `allowlist` (from `reactionAllowlist`).
428
+
429
+ **Thread session isolation:** `thread.historyScope` is per-thread (default) or shared across channel. `thread.inheritParent` copies parent channel transcript to new threads.
430
+
431
+ - `typingReaction` adds a temporary reaction to the inbound Slack message while a reply is running, then removes it on completion. Use a Slack emoji shortcode such as `"hourglass_flowing_sand"`.
432
+
433
+ | Action group | Default | Notes |
434
+ | ------------ | ------- | ---------------------- |
435
+ | reactions | enabled | React + list reactions |
436
+ | messages | enabled | Read/send/edit/delete |
437
+ | pins | enabled | Pin/unpin/list |
438
+ | memberInfo | enabled | Member info |
439
+ | emojiList | enabled | Custom emoji list |
440
+
441
+ ### Mattermost
442
+
443
+ Mattermost ships as a plugin: `quantumclaw plugins install @quantumclaw/mattermost`.
444
+
445
+ ```json5
446
+ {
447
+ channels: {
448
+ mattermost: {
449
+ enabled: true,
450
+ botToken: "mm-token",
451
+ baseUrl: "https://chat.example.com",
452
+ dmPolicy: "pairing",
453
+ chatmode: "oncall", // oncall | onmessage | onchar
454
+ oncharPrefixes: [">", "!"],
455
+ commands: {
456
+ native: true, // opt-in
457
+ nativeSkills: true,
458
+ callbackPath: "/api/channels/mattermost/command",
459
+ // Optional explicit URL for reverse-proxy/public deployments
460
+ callbackUrl: "https://gateway.example.com/api/channels/mattermost/command",
461
+ },
462
+ textChunkLimit: 4000,
463
+ chunkMode: "length",
464
+ },
465
+ },
466
+ }
467
+ ```
468
+
469
+ Chat modes: `oncall` (respond on @-mention, default), `onmessage` (every message), `onchar` (messages starting with trigger prefix).
470
+
471
+ When Mattermost native commands are enabled:
472
+
473
+ - `commands.callbackPath` must be a path (for example `/api/channels/mattermost/command`), not a full URL.
474
+ - `commands.callbackUrl` must resolve to the QuantumClaw gateway endpoint and be reachable from the Mattermost server.
475
+ - For private/tailnet/internal callback hosts, Mattermost may require
476
+ `ServiceSettings.AllowedUntrustedInternalConnections` to include the callback host/domain.
477
+ Use host/domain values, not full URLs.
478
+ - `channels.mattermost.configWrites`: allow or deny Mattermost-initiated config writes.
479
+ - `channels.mattermost.requireMention`: require `@mention` before replying in channels.
480
+ - Optional `channels.mattermost.defaultAccount` overrides default account selection when it matches a configured account id.
481
+
482
+ ### Signal
483
+
484
+ ```json5
485
+ {
486
+ channels: {
487
+ signal: {
488
+ enabled: true,
489
+ account: "+15555550123", // optional account binding
490
+ dmPolicy: "pairing",
491
+ allowFrom: ["+15551234567", "uuid:123e4567-e89b-12d3-a456-426614174000"],
492
+ configWrites: true,
493
+ reactionNotifications: "own", // off | own | all | allowlist
494
+ reactionAllowlist: ["+15551234567", "uuid:123e4567-e89b-12d3-a456-426614174000"],
495
+ historyLimit: 50,
496
+ },
497
+ },
498
+ }
499
+ ```
500
+
501
+ **Reaction notification modes:** `off`, `own` (default), `all`, `allowlist` (from `reactionAllowlist`).
502
+
503
+ - `channels.signal.account`: pin channel startup to a specific Signal account identity.
504
+ - `channels.signal.configWrites`: allow or deny Signal-initiated config writes.
505
+ - Optional `channels.signal.defaultAccount` overrides default account selection when it matches a configured account id.
506
+
507
+ ### BlueBubbles
508
+
509
+ BlueBubbles is the recommended iMessage path (plugin-backed, configured under `channels.bluebubbles`).
510
+
511
+ ```json5
512
+ {
513
+ channels: {
514
+ bluebubbles: {
515
+ enabled: true,
516
+ dmPolicy: "pairing",
517
+ // serverUrl, password, webhookPath, group controls, and advanced actions:
518
+ // see /channels/bluebubbles
519
+ },
520
+ },
521
+ }
522
+ ```
523
+
524
+ - Core key paths covered here: `channels.bluebubbles`, `channels.bluebubbles.dmPolicy`.
525
+ - Optional `channels.bluebubbles.defaultAccount` overrides default account selection when it matches a configured account id.
526
+ - Full BlueBubbles channel configuration is documented in [BlueBubbles](/channels/bluebubbles).
527
+
528
+ ### iMessage
529
+
530
+ QuantumClaw spawns `imsg rpc` (JSON-RPC over stdio). No daemon or port required.
531
+
532
+ ```json5
533
+ {
534
+ channels: {
535
+ imessage: {
536
+ enabled: true,
537
+ cliPath: "imsg",
538
+ dbPath: "~/Library/Messages/chat.db",
539
+ remoteHost: "user@gateway-host",
540
+ dmPolicy: "pairing",
541
+ allowFrom: ["+15555550123", "user@example.com", "chat_id:123"],
542
+ historyLimit: 50,
543
+ includeAttachments: false,
544
+ attachmentRoots: ["/Users/*/Library/Messages/Attachments"],
545
+ remoteAttachmentRoots: ["/Users/*/Library/Messages/Attachments"],
546
+ mediaMaxMb: 16,
547
+ service: "auto",
548
+ region: "US",
549
+ },
550
+ },
551
+ }
552
+ ```
553
+
554
+ - Optional `channels.imessage.defaultAccount` overrides default account selection when it matches a configured account id.
555
+
556
+ - Requires Full Disk Access to the Messages DB.
557
+ - Prefer `chat_id:<id>` targets. Use `imsg chats --limit 20` to list chats.
558
+ - `cliPath` can point to an SSH wrapper; set `remoteHost` (`host` or `user@host`) for SCP attachment fetching.
559
+ - `attachmentRoots` and `remoteAttachmentRoots` restrict inbound attachment paths (default: `/Users/*/Library/Messages/Attachments`).
560
+ - SCP uses strict host-key checking, so ensure the relay host key already exists in `~/.ssh/known_hosts`.
561
+ - `channels.imessage.configWrites`: allow or deny iMessage-initiated config writes.
562
+
563
+ <Accordion title="iMessage SSH wrapper example">
564
+
565
+ ```bash
566
+ #!/usr/bin/env bash
567
+ exec ssh -T gateway-host imsg "$@"
568
+ ```
569
+
570
+ </Accordion>
571
+
572
+ ### Microsoft Teams
573
+
574
+ Microsoft Teams is extension-backed and configured under `channels.msteams`.
575
+
576
+ ```json5
577
+ {
578
+ channels: {
579
+ msteams: {
580
+ enabled: true,
581
+ configWrites: true,
582
+ // appId, appPassword, tenantId, webhook, team/channel policies:
583
+ // see /channels/msteams
584
+ },
585
+ },
586
+ }
587
+ ```
588
+
589
+ - Core key paths covered here: `channels.msteams`, `channels.msteams.configWrites`.
590
+ - Full Teams config (credentials, webhook, DM/group policy, per-team/per-channel overrides) is documented in [Microsoft Teams](/channels/msteams).
591
+
592
+ ### IRC
593
+
594
+ IRC is extension-backed and configured under `channels.irc`.
595
+
596
+ ```json5
597
+ {
598
+ channels: {
599
+ irc: {
600
+ enabled: true,
601
+ dmPolicy: "pairing",
602
+ configWrites: true,
603
+ nickserv: {
604
+ enabled: true,
605
+ service: "NickServ",
606
+ password: "${IRC_NICKSERV_PASSWORD}",
607
+ register: false,
608
+ registerEmail: "bot@example.com",
609
+ },
610
+ },
611
+ },
612
+ }
613
+ ```
614
+
615
+ - Core key paths covered here: `channels.irc`, `channels.irc.dmPolicy`, `channels.irc.configWrites`, `channels.irc.nickserv.*`.
616
+ - Optional `channels.irc.defaultAccount` overrides default account selection when it matches a configured account id.
617
+ - Full IRC channel configuration (host/port/TLS/channels/allowlists/mention gating) is documented in [IRC](/channels/irc).
618
+
619
+ ### Multi-account (all channels)
620
+
621
+ Run multiple accounts per channel (each with its own `accountId`):
622
+
623
+ ```json5
624
+ {
625
+ channels: {
626
+ telegram: {
627
+ accounts: {
628
+ default: {
629
+ name: "Primary bot",
630
+ botToken: "123456:ABC...",
631
+ },
632
+ alerts: {
633
+ name: "Alerts bot",
634
+ botToken: "987654:XYZ...",
635
+ },
636
+ },
637
+ },
638
+ },
639
+ }
640
+ ```
641
+
642
+ - `default` is used when `accountId` is omitted (CLI + routing).
643
+ - Env tokens only apply to the **default** account.
644
+ - Base channel settings apply to all accounts unless overridden per account.
645
+ - Use `bindings[].match.accountId` to route each account to a different agent.
646
+ - If you add a non-default account via `quantumclaw channels add` (or channel onboarding) while still on a single-account top-level channel config, QuantumClaw moves account-scoped top-level single-account values into `channels.<channel>.accounts.default` first so the original account keeps working.
647
+ - Existing channel-only bindings (no `accountId`) keep matching the default account; account-scoped bindings remain optional.
648
+ - `quantumclaw doctor --fix` also repairs mixed shapes by moving account-scoped top-level single-account values into `accounts.default` when named accounts exist but `default` is missing.
649
+
650
+ ### Other extension channels
651
+
652
+ Many extension channels are configured as `channels.<id>` and documented in their dedicated channel pages (for example Feishu, Matrix, LINE, Nostr, Zalo, Nextcloud Talk, Synology Chat, and Twitch).
653
+ See the full channel index: [Channels](/channels).
654
+
655
+ ### Group chat mention gating
656
+
657
+ Group messages default to **require mention** (metadata mention or safe regex patterns). Applies to WhatsApp, Telegram, Discord, Google Chat, and iMessage group chats.
658
+
659
+ **Mention types:**
660
+
661
+ - **Metadata mentions**: Native platform @-mentions. Ignored in WhatsApp self-chat mode.
662
+ - **Text patterns**: Safe regex patterns in `agents.list[].groupChat.mentionPatterns`. Invalid patterns and unsafe nested repetition are ignored.
663
+ - Mention gating is enforced only when detection is possible (native mentions or at least one pattern).
664
+
665
+ ```json5
666
+ {
667
+ messages: {
668
+ groupChat: { historyLimit: 50 },
669
+ },
670
+ agents: {
671
+ list: [{ id: "main", groupChat: { mentionPatterns: ["@quantumclaw", "quantumclaw"] } }],
672
+ },
673
+ }
674
+ ```
675
+
676
+ `messages.groupChat.historyLimit` sets the global default. Channels can override with `channels.<channel>.historyLimit` (or per-account). Set `0` to disable.
677
+
678
+ #### DM history limits
679
+
680
+ ```json5
681
+ {
682
+ channels: {
683
+ telegram: {
684
+ dmHistoryLimit: 30,
685
+ dms: {
686
+ "123456789": { historyLimit: 50 },
687
+ },
688
+ },
689
+ },
690
+ }
691
+ ```
692
+
693
+ Resolution: per-DM override → provider default → no limit (all retained).
694
+
695
+ Supported: `telegram`, `whatsapp`, `discord`, `slack`, `signal`, `imessage`, `msteams`.
696
+
697
+ #### Self-chat mode
698
+
699
+ Include your own number in `allowFrom` to enable self-chat mode (ignores native @-mentions, only responds to text patterns):
700
+
701
+ ```json5
702
+ {
703
+ channels: {
704
+ whatsapp: {
705
+ allowFrom: ["+15555550123"],
706
+ groups: { "*": { requireMention: true } },
707
+ },
708
+ },
709
+ agents: {
710
+ list: [
711
+ {
712
+ id: "main",
713
+ groupChat: { mentionPatterns: ["reisponde", "@quantumclaw"] },
714
+ },
715
+ ],
716
+ },
717
+ }
718
+ ```
719
+
720
+ ### Commands (chat command handling)
721
+
722
+ ```json5
723
+ {
724
+ commands: {
725
+ native: "auto", // register native commands when supported
726
+ text: true, // parse /commands in chat messages
727
+ bash: false, // allow ! (alias: /bash)
728
+ bashForegroundMs: 2000,
729
+ config: false, // allow /config
730
+ debug: false, // allow /debug
731
+ restart: false, // allow /restart + gateway restart tool
732
+ allowFrom: {
733
+ "*": ["user1"],
734
+ discord: ["user:123"],
735
+ },
736
+ useAccessGroups: true,
737
+ },
738
+ }
739
+ ```
740
+
741
+ <Accordion title="Command details">
742
+
743
+ - Text commands must be **standalone** messages with leading `/`.
744
+ - `native: "auto"` turns on native commands for Discord/Telegram, leaves Slack off.
745
+ - Override per channel: `channels.discord.commands.native` (bool or `"auto"`). `false` clears previously registered commands.
746
+ - `channels.telegram.customCommands` adds extra Telegram bot menu entries.
747
+ - `bash: true` enables `! <cmd>` for host shell. Requires `tools.elevated.enabled` and sender in `tools.elevated.allowFrom.<channel>`.
748
+ - `config: true` enables `/config` (reads/writes `quantumclaw.json`). For gateway `chat.send` clients, persistent `/config set|unset` writes also require `operator.admin`; read-only `/config show` stays available to normal write-scoped operator clients.
749
+ - `channels.<provider>.configWrites` gates config mutations per channel (default: true).
750
+ - For multi-account channels, `channels.<provider>.accounts.<id>.configWrites` also gates writes that target that account (for example `/allowlist --config --account <id>` or `/config set channels.<provider>.accounts.<id>...`).
751
+ - `allowFrom` is per-provider. When set, it is the **only** authorization source (channel allowlists/pairing and `useAccessGroups` are ignored).
752
+ - `useAccessGroups: false` allows commands to bypass access-group policies when `allowFrom` is not set.
753
+
754
+ </Accordion>
755
+
756
+ ---
757
+
758
+ ## Agent defaults
759
+
760
+ ### `agents.defaults.workspace`
761
+
762
+ Default: `~/.quantumclaw/workspace`.
763
+
764
+ ```json5
765
+ {
766
+ agents: { defaults: { workspace: "~/.quantumclaw/workspace" } },
767
+ }
768
+ ```
769
+
770
+ ### `agents.defaults.repoRoot`
771
+
772
+ Optional repository root shown in the system prompt's Runtime line. If unset, QuantumClaw auto-detects by walking upward from the workspace.
773
+
774
+ ```json5
775
+ {
776
+ agents: { defaults: { repoRoot: "~/Projects/quantumclaw" } },
777
+ }
778
+ ```
779
+
780
+ ### `agents.defaults.skipBootstrap`
781
+
782
+ Disables automatic creation of workspace bootstrap files (`AGENTS.md`, `SOUL.md`, `TOOLS.md`, `IDENTITY.md`, `USER.md`, `HEARTBEAT.md`, `BOOTSTRAP.md`).
783
+
784
+ ```json5
785
+ {
786
+ agents: { defaults: { skipBootstrap: true } },
787
+ }
788
+ ```
789
+
790
+ ### `agents.defaults.bootstrapMaxChars`
791
+
792
+ Max characters per workspace bootstrap file before truncation. Default: `20000`.
793
+
794
+ ```json5
795
+ {
796
+ agents: { defaults: { bootstrapMaxChars: 20000 } },
797
+ }
798
+ ```
799
+
800
+ ### `agents.defaults.bootstrapTotalMaxChars`
801
+
802
+ Max total characters injected across all workspace bootstrap files. Default: `150000`.
803
+
804
+ ```json5
805
+ {
806
+ agents: { defaults: { bootstrapTotalMaxChars: 150000 } },
807
+ }
808
+ ```
809
+
810
+ ### `agents.defaults.bootstrapPromptTruncationWarning`
811
+
812
+ Controls agent-visible warning text when bootstrap context is truncated.
813
+ Default: `"once"`.
814
+
815
+ - `"off"`: never inject warning text into the system prompt.
816
+ - `"once"`: inject warning once per unique truncation signature (recommended).
817
+ - `"always"`: inject warning on every run when truncation exists.
818
+
819
+ ```json5
820
+ {
821
+ agents: { defaults: { bootstrapPromptTruncationWarning: "once" } }, // off | once | always
822
+ }
823
+ ```
824
+
825
+ ### `agents.defaults.imageMaxDimensionPx`
826
+
827
+ Max pixel size for the longest image side in transcript/tool image blocks before provider calls.
828
+ Default: `1200`.
829
+
830
+ Lower values usually reduce vision-token usage and request payload size for screenshot-heavy runs.
831
+ Higher values preserve more visual detail.
832
+
833
+ ```json5
834
+ {
835
+ agents: { defaults: { imageMaxDimensionPx: 1200 } },
836
+ }
837
+ ```
838
+
839
+ ### `agents.defaults.userTimezone`
840
+
841
+ Timezone for system prompt context (not message timestamps). Falls back to host timezone.
842
+
843
+ ```json5
844
+ {
845
+ agents: { defaults: { userTimezone: "America/Chicago" } },
846
+ }
847
+ ```
848
+
849
+ ### `agents.defaults.timeFormat`
850
+
851
+ Time format in system prompt. Default: `auto` (OS preference).
852
+
853
+ ```json5
854
+ {
855
+ agents: { defaults: { timeFormat: "auto" } }, // auto | 12 | 24
856
+ }
857
+ ```
858
+
859
+ ### `agents.defaults.model`
860
+
861
+ ```json5
862
+ {
863
+ agents: {
864
+ defaults: {
865
+ models: {
866
+ "anthropic/claude-opus-4-6": { alias: "opus" },
867
+ "minimax/MiniMax-M2.7": { alias: "minimax" },
868
+ },
869
+ model: {
870
+ primary: "anthropic/claude-opus-4-6",
871
+ fallbacks: ["minimax/MiniMax-M2.7"],
872
+ },
873
+ imageModel: {
874
+ primary: "openrouter/qwen/qwen-2.5-vl-72b-instruct:free",
875
+ fallbacks: ["openrouter/google/gemini-2.0-flash-vision:free"],
876
+ },
877
+ imageGenerationModel: {
878
+ primary: "openai/gpt-image-1",
879
+ fallbacks: ["google/gemini-3.1-flash-image-preview"],
880
+ },
881
+ pdfModel: {
882
+ primary: "anthropic/claude-opus-4-6",
883
+ fallbacks: ["openai/gpt-5-mini"],
884
+ },
885
+ pdfMaxBytesMb: 10,
886
+ pdfMaxPages: 20,
887
+ thinkingDefault: "low",
888
+ verboseDefault: "off",
889
+ elevatedDefault: "on",
890
+ timeoutSeconds: 600,
891
+ mediaMaxMb: 5,
892
+ contextTokens: 200000,
893
+ maxConcurrent: 3,
894
+ },
895
+ },
896
+ }
897
+ ```
898
+
899
+ - `model`: accepts either a string (`"provider/model"`) or an object (`{ primary, fallbacks }`).
900
+ - String form sets only the primary model.
901
+ - Object form sets primary plus ordered failover models.
902
+ - `imageModel`: accepts either a string (`"provider/model"`) or an object (`{ primary, fallbacks }`).
903
+ - Used by the `image` tool path as its vision-model config.
904
+ - Also used as fallback routing when the selected/default model cannot accept image input.
905
+ - `imageGenerationModel`: accepts either a string (`"provider/model"`) or an object (`{ primary, fallbacks }`).
906
+ - Used by the shared image-generation capability and any future tool/plugin surface that generates images.
907
+ - Typical values: `google/gemini-3-pro-image-preview` for the native Nano Banana-style flow, `fal/fal-ai/flux/dev` for fal, or `openai/gpt-image-1` for OpenAI Images.
908
+ - If omitted, `image_generate` can still infer a best-effort provider default from compatible auth-backed image-generation providers.
909
+ - Typical values: `google/gemini-3-pro-image-preview`, `fal/fal-ai/flux/dev`, `openai/gpt-image-1`.
910
+ - `pdfModel`: accepts either a string (`"provider/model"`) or an object (`{ primary, fallbacks }`).
911
+ - Used by the `pdf` tool for model routing.
912
+ - If omitted, the PDF tool falls back to `imageModel`, then to best-effort provider defaults.
913
+ - `pdfMaxBytesMb`: default PDF size limit for the `pdf` tool when `maxBytesMb` is not passed at call time.
914
+ - `pdfMaxPages`: default maximum pages considered by extraction fallback mode in the `pdf` tool.
915
+ - `model.primary`: format `provider/model` (e.g. `anthropic/claude-opus-4-6`). If you omit the provider, QuantumClaw assumes `anthropic` (deprecated).
916
+ - `models`: the configured model catalog and allowlist for `/model`. Each entry can include `alias` (shortcut) and `params` (provider-specific, for example `temperature`, `maxTokens`, `cacheRetention`, `context1m`).
917
+ - `params` merge precedence (config): `agents.defaults.models["provider/model"].params` is the base, then `agents.list[].params` (matching agent id) overrides by key.
918
+ - Config writers that mutate these fields (for example `/models set`, `/models set-image`, and fallback add/remove commands) save canonical object form and preserve existing fallback lists when possible.
919
+ - `maxConcurrent`: max parallel agent runs across sessions (each session still serialized). Default: 1.
920
+
921
+ **Built-in alias shorthands** (only apply when the model is in `agents.defaults.models`):
922
+
923
+ | Alias | Model |
924
+ | ------------------- | -------------------------------------- |
925
+ | `opus` | `anthropic/claude-opus-4-6` |
926
+ | `sonnet` | `anthropic/claude-sonnet-4-6` |
927
+ | `gpt` | `openai/gpt-5.4` |
928
+ | `gpt-mini` | `openai/gpt-5-mini` |
929
+ | `gemini` | `google/gemini-3.1-pro-preview` |
930
+ | `gemini-flash` | `google/gemini-3-flash-preview` |
931
+ | `gemini-flash-lite` | `google/gemini-3.1-flash-lite-preview` |
932
+
933
+ Your configured aliases always win over defaults.
934
+
935
+ Z.AI GLM-4.x models automatically enable thinking mode unless you set `--thinking off` or define `agents.defaults.models["zai/<model>"].params.thinking` yourself.
936
+ Z.AI models enable `tool_stream` by default for tool call streaming. Set `agents.defaults.models["zai/<model>"].params.tool_stream` to `false` to disable it.
937
+ Anthropic Claude 4.6 models default to `adaptive` thinking when no explicit thinking level is set.
938
+
939
+ ### `agents.defaults.cliBackends`
940
+
941
+ Optional CLI backends for text-only fallback runs (no tool calls). Useful as a backup when API providers fail.
942
+
943
+ ```json5
944
+ {
945
+ agents: {
946
+ defaults: {
947
+ cliBackends: {
948
+ "claude-cli": {
949
+ command: "/opt/homebrew/bin/claude",
950
+ },
951
+ "my-cli": {
952
+ command: "my-cli",
953
+ args: ["--json"],
954
+ output: "json",
955
+ modelArg: "--model",
956
+ sessionArg: "--session",
957
+ sessionMode: "existing",
958
+ systemPromptArg: "--system",
959
+ systemPromptWhen: "first",
960
+ imageArg: "--image",
961
+ imageMode: "repeat",
962
+ },
963
+ },
964
+ },
965
+ },
966
+ }
967
+ ```
968
+
969
+ - CLI backends are text-first; tools are always disabled.
970
+ - Sessions supported when `sessionArg` is set.
971
+ - Image pass-through supported when `imageArg` accepts file paths.
972
+
973
+ ### `agents.defaults.heartbeat`
974
+
975
+ Periodic heartbeat runs.
976
+
977
+ ```json5
978
+ {
979
+ agents: {
980
+ defaults: {
981
+ heartbeat: {
982
+ every: "30m", // 0m disables
983
+ model: "openai/gpt-5.2-mini",
984
+ includeReasoning: false,
985
+ lightContext: false, // default: false; true keeps only HEARTBEAT.md from workspace bootstrap files
986
+ isolatedSession: false, // default: false; true runs each heartbeat in a fresh session (no conversation history)
987
+ session: "main",
988
+ to: "+15555550123",
989
+ directPolicy: "allow", // allow (default) | block
990
+ target: "none", // default: none | options: last | whatsapp | telegram | discord | ...
991
+ prompt: "Read HEARTBEAT.md if it exists...",
992
+ ackMaxChars: 300,
993
+ suppressToolErrorWarnings: false,
994
+ },
995
+ },
996
+ },
997
+ }
998
+ ```
999
+
1000
+ - `every`: duration string (ms/s/m/h). Default: `30m`.
1001
+ - `suppressToolErrorWarnings`: when true, suppresses tool error warning payloads during heartbeat runs.
1002
+ - `directPolicy`: direct/DM delivery policy. `allow` (default) permits direct-target delivery. `block` suppresses direct-target delivery and emits `reason=dm-blocked`.
1003
+ - `lightContext`: when true, heartbeat runs use lightweight bootstrap context and keep only `HEARTBEAT.md` from workspace bootstrap files.
1004
+ - `isolatedSession`: when true, each heartbeat runs in a fresh session with no prior conversation history. Same isolation pattern as cron `sessionTarget: "isolated"`. Reduces per-heartbeat token cost from ~100K to ~2-5K tokens.
1005
+ - Per-agent: set `agents.list[].heartbeat`. When any agent defines `heartbeat`, **only those agents** run heartbeats.
1006
+ - Heartbeats run full agent turns — shorter intervals burn more tokens.
1007
+
1008
+ ### `agents.defaults.compaction`
1009
+
1010
+ ```json5
1011
+ {
1012
+ agents: {
1013
+ defaults: {
1014
+ compaction: {
1015
+ mode: "safeguard", // default | safeguard
1016
+ timeoutSeconds: 900,
1017
+ reserveTokensFloor: 24000,
1018
+ identifierPolicy: "strict", // strict | off | custom
1019
+ identifierInstructions: "Preserve deployment IDs, ticket IDs, and host:port pairs exactly.", // used when identifierPolicy=custom
1020
+ postCompactionSections: ["Session Startup", "Red Lines"], // [] disables reinjection
1021
+ model: "openrouter/anthropic/claude-sonnet-4-6", // optional compaction-only model override
1022
+ memoryFlush: {
1023
+ enabled: true,
1024
+ softThresholdTokens: 6000,
1025
+ systemPrompt: "Session nearing compaction. Store durable memories now.",
1026
+ prompt: "Write any lasting notes to memory/YYYY-MM-DD.md; reply with NO_REPLY if nothing to store.",
1027
+ },
1028
+ },
1029
+ },
1030
+ },
1031
+ }
1032
+ ```
1033
+
1034
+ - `mode`: `default` or `safeguard` (chunked summarization for long histories). See [Compaction](/concepts/compaction).
1035
+ - `timeoutSeconds`: maximum seconds allowed for a single compaction operation before QuantumClaw aborts it. Default: `900`.
1036
+ - `identifierPolicy`: `strict` (default), `off`, or `custom`. `strict` prepends built-in opaque identifier retention guidance during compaction summarization.
1037
+ - `identifierInstructions`: optional custom identifier-preservation text used when `identifierPolicy=custom`.
1038
+ - `postCompactionSections`: optional AGENTS.md H2/H3 section names to re-inject after compaction. Defaults to `["Session Startup", "Red Lines"]`; set `[]` to disable reinjection. When unset or explicitly set to that default pair, older `Every Session`/`Safety` headings are also accepted as a legacy fallback.
1039
+ - `model`: optional `provider/model-id` override for compaction summarization only. Use this when the main session should keep one model but compaction summaries should run on another; when unset, compaction uses the session's primary model.
1040
+ - `memoryFlush`: silent agentic turn before auto-compaction to store durable memories. Skipped when workspace is read-only.
1041
+
1042
+ ### `agents.defaults.contextPruning`
1043
+
1044
+ Prunes **old tool results** from in-memory context before sending to the LLM. Does **not** modify session history on disk.
1045
+
1046
+ ```json5
1047
+ {
1048
+ agents: {
1049
+ defaults: {
1050
+ contextPruning: {
1051
+ mode: "cache-ttl", // off | cache-ttl
1052
+ ttl: "1h", // duration (ms/s/m/h), default unit: minutes
1053
+ keepLastAssistants: 3,
1054
+ softTrimRatio: 0.3,
1055
+ hardClearRatio: 0.5,
1056
+ minPrunableToolChars: 50000,
1057
+ softTrim: { maxChars: 4000, headChars: 1500, tailChars: 1500 },
1058
+ hardClear: { enabled: true, placeholder: "[Old tool result content cleared]" },
1059
+ tools: { deny: ["browser", "canvas"] },
1060
+ },
1061
+ },
1062
+ },
1063
+ }
1064
+ ```
1065
+
1066
+ <Accordion title="cache-ttl mode behavior">
1067
+
1068
+ - `mode: "cache-ttl"` enables pruning passes.
1069
+ - `ttl` controls how often pruning can run again (after the last cache touch).
1070
+ - Pruning soft-trims oversized tool results first, then hard-clears older tool results if needed.
1071
+
1072
+ **Soft-trim** keeps beginning + end and inserts `...` in the middle.
1073
+
1074
+ **Hard-clear** replaces the entire tool result with the placeholder.
1075
+
1076
+ Notes:
1077
+
1078
+ - Image blocks are never trimmed/cleared.
1079
+ - Ratios are character-based (approximate), not exact token counts.
1080
+ - If fewer than `keepLastAssistants` assistant messages exist, pruning is skipped.
1081
+
1082
+ </Accordion>
1083
+
1084
+ See [Session Pruning](/concepts/session-pruning) for behavior details.
1085
+
1086
+ ### Block streaming
1087
+
1088
+ ```json5
1089
+ {
1090
+ agents: {
1091
+ defaults: {
1092
+ blockStreamingDefault: "off", // on | off
1093
+ blockStreamingBreak: "text_end", // text_end | message_end
1094
+ blockStreamingChunk: { minChars: 800, maxChars: 1200 },
1095
+ blockStreamingCoalesce: { idleMs: 1000 },
1096
+ humanDelay: { mode: "natural" }, // off | natural | custom (use minMs/maxMs)
1097
+ },
1098
+ },
1099
+ }
1100
+ ```
1101
+
1102
+ - Non-Telegram channels require explicit `*.blockStreaming: true` to enable block replies.
1103
+ - Channel overrides: `channels.<channel>.blockStreamingCoalesce` (and per-account variants). Signal/Slack/Discord/Google Chat default `minChars: 1500`.
1104
+ - `humanDelay`: randomized pause between block replies. `natural` = 800–2500ms. Per-agent override: `agents.list[].humanDelay`.
1105
+
1106
+ See [Streaming](/concepts/streaming) for behavior + chunking details.
1107
+
1108
+ ### Typing indicators
1109
+
1110
+ ```json5
1111
+ {
1112
+ agents: {
1113
+ defaults: {
1114
+ typingMode: "instant", // never | instant | thinking | message
1115
+ typingIntervalSeconds: 6,
1116
+ },
1117
+ },
1118
+ }
1119
+ ```
1120
+
1121
+ - Defaults: `instant` for direct chats/mentions, `message` for unmentioned group chats.
1122
+ - Per-session overrides: `session.typingMode`, `session.typingIntervalSeconds`.
1123
+
1124
+ See [Typing Indicators](/concepts/typing-indicators).
1125
+
1126
+ ### `agents.defaults.sandbox`
1127
+
1128
+ Optional sandboxing for the embedded agent. See [Sandboxing](/gateway/sandboxing) for the full guide.
1129
+
1130
+ ```json5
1131
+ {
1132
+ agents: {
1133
+ defaults: {
1134
+ sandbox: {
1135
+ mode: "non-main", // off | non-main | all
1136
+ backend: "docker", // docker | ssh | openshell
1137
+ scope: "agent", // session | agent | shared
1138
+ workspaceAccess: "none", // none | ro | rw
1139
+ workspaceRoot: "~/.quantumclaw/sandboxes",
1140
+ docker: {
1141
+ image: "quantumclaw-sandbox:bookworm-slim",
1142
+ containerPrefix: "quantumclaw-sbx-",
1143
+ workdir: "/workspace",
1144
+ readOnlyRoot: true,
1145
+ tmpfs: ["/tmp", "/var/tmp", "/run"],
1146
+ network: "none",
1147
+ user: "1000:1000",
1148
+ capDrop: ["ALL"],
1149
+ env: { LANG: "C.UTF-8" },
1150
+ setupCommand: "apt-get update && apt-get install -y git curl jq",
1151
+ pidsLimit: 256,
1152
+ memory: "1g",
1153
+ memorySwap: "2g",
1154
+ cpus: 1,
1155
+ ulimits: {
1156
+ nofile: { soft: 1024, hard: 2048 },
1157
+ nproc: 256,
1158
+ },
1159
+ seccompProfile: "/path/to/seccomp.json",
1160
+ apparmorProfile: "quantumclaw-sandbox",
1161
+ dns: ["1.1.1.1", "8.8.8.8"],
1162
+ extraHosts: ["internal.service:10.0.0.5"],
1163
+ binds: ["/home/user/source:/source:rw"],
1164
+ },
1165
+ ssh: {
1166
+ target: "user@gateway-host:22",
1167
+ command: "ssh",
1168
+ workspaceRoot: "/tmp/quantumclaw-sandboxes",
1169
+ strictHostKeyChecking: true,
1170
+ updateHostKeys: true,
1171
+ identityFile: "~/.ssh/id_ed25519",
1172
+ certificateFile: "~/.ssh/id_ed25519-cert.pub",
1173
+ knownHostsFile: "~/.ssh/known_hosts",
1174
+ // SecretRefs / inline contents also supported:
1175
+ // identityData: { source: "env", provider: "default", id: "SSH_IDENTITY" },
1176
+ // certificateData: { source: "env", provider: "default", id: "SSH_CERTIFICATE" },
1177
+ // knownHostsData: { source: "env", provider: "default", id: "SSH_KNOWN_HOSTS" },
1178
+ },
1179
+ browser: {
1180
+ enabled: false,
1181
+ image: "quantumclaw-sandbox-browser:bookworm-slim",
1182
+ network: "quantumclaw-sandbox-browser",
1183
+ cdpPort: 9222,
1184
+ cdpSourceRange: "172.21.0.1/32",
1185
+ vncPort: 5900,
1186
+ noVncPort: 6080,
1187
+ headless: false,
1188
+ enableNoVnc: true,
1189
+ allowHostControl: false,
1190
+ autoStart: true,
1191
+ autoStartTimeoutMs: 12000,
1192
+ },
1193
+ prune: {
1194
+ idleHours: 24,
1195
+ maxAgeDays: 7,
1196
+ },
1197
+ },
1198
+ },
1199
+ },
1200
+ tools: {
1201
+ sandbox: {
1202
+ tools: {
1203
+ allow: [
1204
+ "exec",
1205
+ "process",
1206
+ "read",
1207
+ "write",
1208
+ "edit",
1209
+ "apply_patch",
1210
+ "sessions_list",
1211
+ "sessions_history",
1212
+ "sessions_send",
1213
+ "sessions_spawn",
1214
+ "session_status",
1215
+ ],
1216
+ deny: ["browser", "canvas", "nodes", "cron", "discord", "gateway"],
1217
+ },
1218
+ },
1219
+ },
1220
+ }
1221
+ ```
1222
+
1223
+ <Accordion title="Sandbox details">
1224
+
1225
+ **Backend:**
1226
+
1227
+ - `docker`: local Docker runtime (default)
1228
+ - `ssh`: generic SSH-backed remote runtime
1229
+ - `openshell`: OpenShell runtime
1230
+
1231
+ When `backend: "openshell"` is selected, runtime-specific settings move to
1232
+ `plugins.entries.openshell.config`.
1233
+
1234
+ **SSH backend config:**
1235
+
1236
+ - `target`: SSH target in `user@host[:port]` form
1237
+ - `command`: SSH client command (default: `ssh`)
1238
+ - `workspaceRoot`: absolute remote root used for per-scope workspaces
1239
+ - `identityFile` / `certificateFile` / `knownHostsFile`: existing local files passed to OpenSSH
1240
+ - `identityData` / `certificateData` / `knownHostsData`: inline contents or SecretRefs that QuantumClaw materializes into temp files at runtime
1241
+ - `strictHostKeyChecking` / `updateHostKeys`: OpenSSH host-key policy knobs
1242
+
1243
+ **SSH auth precedence:**
1244
+
1245
+ - `identityData` wins over `identityFile`
1246
+ - `certificateData` wins over `certificateFile`
1247
+ - `knownHostsData` wins over `knownHostsFile`
1248
+ - SecretRef-backed `*Data` values are resolved from the active secrets runtime snapshot before the sandbox session starts
1249
+
1250
+ **SSH backend behavior:**
1251
+
1252
+ - seeds the remote workspace once after create or recreate
1253
+ - then keeps the remote SSH workspace canonical
1254
+ - routes `exec`, file tools, and media paths over SSH
1255
+ - does not sync remote changes back to the host automatically
1256
+ - does not support sandbox browser containers
1257
+
1258
+ **Workspace access:**
1259
+
1260
+ - `none`: per-scope sandbox workspace under `~/.quantumclaw/sandboxes`
1261
+ - `ro`: sandbox workspace at `/workspace`, agent workspace mounted read-only at `/agent`
1262
+ - `rw`: agent workspace mounted read/write at `/workspace`
1263
+
1264
+ **Scope:**
1265
+
1266
+ - `session`: per-session container + workspace
1267
+ - `agent`: one container + workspace per agent (default)
1268
+ - `shared`: shared container and workspace (no cross-session isolation)
1269
+
1270
+ **OpenShell plugin config:**
1271
+
1272
+ ```json5
1273
+ {
1274
+ plugins: {
1275
+ entries: {
1276
+ openshell: {
1277
+ enabled: true,
1278
+ config: {
1279
+ mode: "mirror", // mirror | remote
1280
+ from: "quantumclaw",
1281
+ remoteWorkspaceDir: "/sandbox",
1282
+ remoteAgentWorkspaceDir: "/agent",
1283
+ gateway: "lab", // optional
1284
+ gatewayEndpoint: "https://lab.example", // optional
1285
+ policy: "strict", // optional OpenShell policy id
1286
+ providers: ["openai"], // optional
1287
+ autoProviders: true,
1288
+ timeoutSeconds: 120,
1289
+ },
1290
+ },
1291
+ },
1292
+ },
1293
+ }
1294
+ ```
1295
+
1296
+ **OpenShell mode:**
1297
+
1298
+ - `mirror`: seed remote from local before exec, sync back after exec; local workspace stays canonical
1299
+ - `remote`: seed remote once when the sandbox is created, then keep the remote workspace canonical
1300
+
1301
+ In `remote` mode, host-local edits made outside QuantumClaw are not synced into the sandbox automatically after the seed step.
1302
+ Transport is SSH into the OpenShell sandbox, but the plugin owns sandbox lifecycle and optional mirror sync.
1303
+
1304
+ **`setupCommand`** runs once after container creation (via `sh -lc`). Needs network egress, writable root, root user.
1305
+
1306
+ **Containers default to `network: "none"`** — set to `"bridge"` (or a custom bridge network) if the agent needs outbound access.
1307
+ `"host"` is blocked. `"container:<id>"` is blocked by default unless you explicitly set
1308
+ `sandbox.docker.dangerouslyAllowContainerNamespaceJoin: true` (break-glass).
1309
+
1310
+ **Inbound attachments** are staged into `media/inbound/*` in the active workspace.
1311
+
1312
+ **`docker.binds`** mounts additional host directories; global and per-agent binds are merged.
1313
+
1314
+ **Sandboxed browser** (`sandbox.browser.enabled`): Chromium + CDP in a container. noVNC URL injected into system prompt. Does not require `browser.enabled` in `quantumclaw.json`.
1315
+ noVNC observer access uses VNC auth by default and QuantumClaw emits a short-lived token URL (instead of exposing the password in the shared URL).
1316
+
1317
+ - `allowHostControl: false` (default) blocks sandboxed sessions from targeting the host browser.
1318
+ - `network` defaults to `quantumclaw-sandbox-browser` (dedicated bridge network). Set to `bridge` only when you explicitly want global bridge connectivity.
1319
+ - `cdpSourceRange` optionally restricts CDP ingress at the container edge to a CIDR range (for example `172.21.0.1/32`).
1320
+ - `sandbox.browser.binds` mounts additional host directories into the sandbox browser container only. When set (including `[]`), it replaces `docker.binds` for the browser container.
1321
+ - Launch defaults are defined in `scripts/sandbox-browser-entrypoint.sh` and tuned for container hosts:
1322
+ - `--remote-debugging-address=127.0.0.1`
1323
+ - `--remote-debugging-port=<derived from QUANTUMCLAW_BROWSER_CDP_PORT>`
1324
+ - `--user-data-dir=${HOME}/.chrome`
1325
+ - `--no-first-run`
1326
+ - `--no-default-browser-check`
1327
+ - `--disable-3d-apis`
1328
+ - `--disable-gpu`
1329
+ - `--disable-software-rasterizer`
1330
+ - `--disable-dev-shm-usage`
1331
+ - `--disable-background-networking`
1332
+ - `--disable-features=TranslateUI`
1333
+ - `--disable-breakpad`
1334
+ - `--disable-crash-reporter`
1335
+ - `--renderer-process-limit=2`
1336
+ - `--no-zygote`
1337
+ - `--metrics-recording-only`
1338
+ - `--disable-extensions` (default enabled)
1339
+ - `--disable-3d-apis`, `--disable-software-rasterizer`, and `--disable-gpu` are
1340
+ enabled by default and can be disabled with
1341
+ `QUANTUMCLAW_BROWSER_DISABLE_GRAPHICS_FLAGS=0` if WebGL/3D usage requires it.
1342
+ - `QUANTUMCLAW_BROWSER_DISABLE_EXTENSIONS=0` re-enables extensions if your workflow
1343
+ depends on them.
1344
+ - `--renderer-process-limit=2` can be changed with
1345
+ `QUANTUMCLAW_BROWSER_RENDERER_PROCESS_LIMIT=<N>`; set `0` to use Chromium's
1346
+ default process limit.
1347
+ - plus `--no-sandbox` and `--disable-setuid-sandbox` when `noSandbox` is enabled.
1348
+ - Defaults are the container image baseline; use a custom browser image with a custom
1349
+ entrypoint to change container defaults.
1350
+
1351
+ </Accordion>
1352
+
1353
+ Browser sandboxing and `sandbox.docker.binds` are currently Docker-only.
1354
+
1355
+ Build images:
1356
+
1357
+ ```bash
1358
+ scripts/sandbox-setup.sh # main sandbox image
1359
+ scripts/sandbox-browser-setup.sh # optional browser image
1360
+ ```
1361
+
1362
+ ### `agents.list` (per-agent overrides)
1363
+
1364
+ ```json5
1365
+ {
1366
+ agents: {
1367
+ list: [
1368
+ {
1369
+ id: "main",
1370
+ default: true,
1371
+ name: "Main Agent",
1372
+ workspace: "~/.quantumclaw/workspace",
1373
+ agentDir: "~/.quantumclaw/agents/main/agent",
1374
+ model: "anthropic/claude-opus-4-6", // or { primary, fallbacks }
1375
+ thinkingDefault: "high", // per-agent thinking level override
1376
+ reasoningDefault: "on", // per-agent reasoning visibility override
1377
+ fastModeDefault: false, // per-agent fast mode override
1378
+ params: { cacheRetention: "none" }, // overrides matching defaults.models params by key
1379
+ identity: {
1380
+ name: "Samantha",
1381
+ theme: "helpful sloth",
1382
+ emoji: "🦥",
1383
+ avatar: "avatars/samantha.png",
1384
+ },
1385
+ groupChat: { mentionPatterns: ["@quantumclaw"] },
1386
+ sandbox: { mode: "off" },
1387
+ runtime: {
1388
+ type: "acp",
1389
+ acp: {
1390
+ agent: "codex",
1391
+ backend: "acpx",
1392
+ mode: "persistent",
1393
+ cwd: "/workspace/quantumclaw",
1394
+ },
1395
+ },
1396
+ subagents: { allowAgents: ["*"] },
1397
+ tools: {
1398
+ profile: "coding",
1399
+ allow: ["browser"],
1400
+ deny: ["canvas"],
1401
+ elevated: { enabled: true },
1402
+ },
1403
+ },
1404
+ ],
1405
+ },
1406
+ }
1407
+ ```
1408
+
1409
+ - `id`: stable agent id (required).
1410
+ - `default`: when multiple are set, first wins (warning logged). If none set, first list entry is default.
1411
+ - `model`: string form overrides `primary` only; object form `{ primary, fallbacks }` overrides both (`[]` disables global fallbacks). Cron jobs that only override `primary` still inherit default fallbacks unless you set `fallbacks: []`.
1412
+ - `params`: per-agent stream params merged over the selected model entry in `agents.defaults.models`. Use this for agent-specific overrides like `cacheRetention`, `temperature`, or `maxTokens` without duplicating the whole model catalog.
1413
+ - `thinkingDefault`: optional per-agent default thinking level (`off | minimal | low | medium | high | xhigh | adaptive`). Overrides `agents.defaults.thinkingDefault` for this agent when no per-message or session override is set.
1414
+ - `reasoningDefault`: optional per-agent default reasoning visibility (`on | off | stream`). Applies when no per-message or session reasoning override is set.
1415
+ - `fastModeDefault`: optional per-agent default for fast mode (`true | false`). Applies when no per-message or session fast-mode override is set.
1416
+ - `runtime`: optional per-agent runtime descriptor. Use `type: "acp"` with `runtime.acp` defaults (`agent`, `backend`, `mode`, `cwd`) when the agent should default to ACP harness sessions.
1417
+ - `identity.avatar`: workspace-relative path, `http(s)` URL, or `data:` URI.
1418
+ - `identity` derives defaults: `ackReaction` from `emoji`, `mentionPatterns` from `name`/`emoji`.
1419
+ - `subagents.allowAgents`: allowlist of agent ids for `sessions_spawn` (`["*"]` = any; default: same agent only).
1420
+ - Sandbox inheritance guard: if the requester session is sandboxed, `sessions_spawn` rejects targets that would run unsandboxed.
1421
+
1422
+ ---
1423
+
1424
+ ## Multi-agent routing
1425
+
1426
+ Run multiple isolated agents inside one Gateway. See [Multi-Agent](/concepts/multi-agent).
1427
+
1428
+ ```json5
1429
+ {
1430
+ agents: {
1431
+ list: [
1432
+ { id: "home", default: true, workspace: "~/.quantumclaw/workspace-home" },
1433
+ { id: "work", workspace: "~/.quantumclaw/workspace-work" },
1434
+ ],
1435
+ },
1436
+ bindings: [
1437
+ { agentId: "home", match: { channel: "whatsapp", accountId: "personal" } },
1438
+ { agentId: "work", match: { channel: "whatsapp", accountId: "biz" } },
1439
+ ],
1440
+ }
1441
+ ```
1442
+
1443
+ ### Binding match fields
1444
+
1445
+ - `type` (optional): `route` for normal routing (missing type defaults to route), `acp` for persistent ACP conversation bindings.
1446
+ - `match.channel` (required)
1447
+ - `match.accountId` (optional; `*` = any account; omitted = default account)
1448
+ - `match.peer` (optional; `{ kind: direct|group|channel, id }`)
1449
+ - `match.guildId` / `match.teamId` (optional; channel-specific)
1450
+ - `acp` (optional; only for `type: "acp"`): `{ mode, label, cwd, backend }`
1451
+
1452
+ **Deterministic match order:**
1453
+
1454
+ 1. `match.peer`
1455
+ 2. `match.guildId`
1456
+ 3. `match.teamId`
1457
+ 4. `match.accountId` (exact, no peer/guild/team)
1458
+ 5. `match.accountId: "*"` (channel-wide)
1459
+ 6. Default agent
1460
+
1461
+ Within each tier, the first matching `bindings` entry wins.
1462
+
1463
+ For `type: "acp"` entries, QuantumClaw resolves by exact conversation identity (`match.channel` + account + `match.peer.id`) and does not use the route binding tier order above.
1464
+
1465
+ ### Per-agent access profiles
1466
+
1467
+ <Accordion title="Full access (no sandbox)">
1468
+
1469
+ ```json5
1470
+ {
1471
+ agents: {
1472
+ list: [
1473
+ {
1474
+ id: "personal",
1475
+ workspace: "~/.quantumclaw/workspace-personal",
1476
+ sandbox: { mode: "off" },
1477
+ },
1478
+ ],
1479
+ },
1480
+ }
1481
+ ```
1482
+
1483
+ </Accordion>
1484
+
1485
+ <Accordion title="Read-only tools + workspace">
1486
+
1487
+ ```json5
1488
+ {
1489
+ agents: {
1490
+ list: [
1491
+ {
1492
+ id: "family",
1493
+ workspace: "~/.quantumclaw/workspace-family",
1494
+ sandbox: { mode: "all", scope: "agent", workspaceAccess: "ro" },
1495
+ tools: {
1496
+ allow: [
1497
+ "read",
1498
+ "sessions_list",
1499
+ "sessions_history",
1500
+ "sessions_send",
1501
+ "sessions_spawn",
1502
+ "session_status",
1503
+ ],
1504
+ deny: ["write", "edit", "apply_patch", "exec", "process", "browser"],
1505
+ },
1506
+ },
1507
+ ],
1508
+ },
1509
+ }
1510
+ ```
1511
+
1512
+ </Accordion>
1513
+
1514
+ <Accordion title="No filesystem access (messaging only)">
1515
+
1516
+ ```json5
1517
+ {
1518
+ agents: {
1519
+ list: [
1520
+ {
1521
+ id: "public",
1522
+ workspace: "~/.quantumclaw/workspace-public",
1523
+ sandbox: { mode: "all", scope: "agent", workspaceAccess: "none" },
1524
+ tools: {
1525
+ allow: [
1526
+ "sessions_list",
1527
+ "sessions_history",
1528
+ "sessions_send",
1529
+ "sessions_spawn",
1530
+ "session_status",
1531
+ "whatsapp",
1532
+ "telegram",
1533
+ "slack",
1534
+ "discord",
1535
+ "gateway",
1536
+ ],
1537
+ deny: [
1538
+ "read",
1539
+ "write",
1540
+ "edit",
1541
+ "apply_patch",
1542
+ "exec",
1543
+ "process",
1544
+ "browser",
1545
+ "canvas",
1546
+ "nodes",
1547
+ "cron",
1548
+ "gateway",
1549
+ "image",
1550
+ ],
1551
+ },
1552
+ },
1553
+ ],
1554
+ },
1555
+ }
1556
+ ```
1557
+
1558
+ </Accordion>
1559
+
1560
+ See [Multi-Agent Sandbox & Tools](/tools/multi-agent-sandbox-tools) for precedence details.
1561
+
1562
+ ---
1563
+
1564
+ ## Session
1565
+
1566
+ ```json5
1567
+ {
1568
+ session: {
1569
+ scope: "per-sender",
1570
+ dmScope: "main", // main | per-peer | per-channel-peer | per-account-channel-peer
1571
+ identityLinks: {
1572
+ alice: ["telegram:123456789", "discord:987654321012345678"],
1573
+ },
1574
+ reset: {
1575
+ mode: "daily", // daily | idle
1576
+ atHour: 4,
1577
+ idleMinutes: 60,
1578
+ },
1579
+ resetByType: {
1580
+ thread: { mode: "daily", atHour: 4 },
1581
+ direct: { mode: "idle", idleMinutes: 240 },
1582
+ group: { mode: "idle", idleMinutes: 120 },
1583
+ },
1584
+ resetTriggers: ["/new", "/reset"],
1585
+ store: "~/.quantumclaw/agents/{agentId}/sessions/sessions.json",
1586
+ parentForkMaxTokens: 100000, // skip parent-thread fork above this token count (0 disables)
1587
+ maintenance: {
1588
+ mode: "warn", // warn | enforce
1589
+ pruneAfter: "30d",
1590
+ maxEntries: 500,
1591
+ rotateBytes: "10mb",
1592
+ resetArchiveRetention: "30d", // duration or false
1593
+ maxDiskBytes: "500mb", // optional hard budget
1594
+ highWaterBytes: "400mb", // optional cleanup target
1595
+ },
1596
+ threadBindings: {
1597
+ enabled: true,
1598
+ idleHours: 24, // default inactivity auto-unfocus in hours (`0` disables)
1599
+ maxAgeHours: 0, // default hard max age in hours (`0` disables)
1600
+ },
1601
+ mainKey: "main", // legacy (runtime always uses "main")
1602
+ agentToAgent: { maxPingPongTurns: 5 },
1603
+ sendPolicy: {
1604
+ rules: [{ action: "deny", match: { channel: "discord", chatType: "group" } }],
1605
+ default: "allow",
1606
+ },
1607
+ },
1608
+ }
1609
+ ```
1610
+
1611
+ <Accordion title="Session field details">
1612
+
1613
+ - **`dmScope`**: how DMs are grouped.
1614
+ - `main`: all DMs share the main session.
1615
+ - `per-peer`: isolate by sender id across channels.
1616
+ - `per-channel-peer`: isolate per channel + sender (recommended for multi-user inboxes).
1617
+ - `per-account-channel-peer`: isolate per account + channel + sender (recommended for multi-account).
1618
+ - **`identityLinks`**: map canonical ids to provider-prefixed peers for cross-channel session sharing.
1619
+ - **`reset`**: primary reset policy. `daily` resets at `atHour` local time; `idle` resets after `idleMinutes`. When both configured, whichever expires first wins.
1620
+ - **`resetByType`**: per-type overrides (`direct`, `group`, `thread`). Legacy `dm` accepted as alias for `direct`.
1621
+ - **`parentForkMaxTokens`**: max parent-session `totalTokens` allowed when creating a forked thread session (default `100000`).
1622
+ - If parent `totalTokens` is above this value, QuantumClaw starts a fresh thread session instead of inheriting parent transcript history.
1623
+ - Set `0` to disable this guard and always allow parent forking.
1624
+ - **`mainKey`**: legacy field. Runtime now always uses `"main"` for the main direct-chat bucket.
1625
+ - **`sendPolicy`**: match by `channel`, `chatType` (`direct|group|channel`, with legacy `dm` alias), `keyPrefix`, or `rawKeyPrefix`. First deny wins.
1626
+ - **`maintenance`**: session-store cleanup + retention controls.
1627
+ - `mode`: `warn` emits warnings only; `enforce` applies cleanup.
1628
+ - `pruneAfter`: age cutoff for stale entries (default `30d`).
1629
+ - `maxEntries`: maximum number of entries in `sessions.json` (default `500`).
1630
+ - `rotateBytes`: rotate `sessions.json` when it exceeds this size (default `10mb`).
1631
+ - `resetArchiveRetention`: retention for `*.reset.<timestamp>` transcript archives. Defaults to `pruneAfter`; set `false` to disable.
1632
+ - `maxDiskBytes`: optional sessions-directory disk budget. In `warn` mode it logs warnings; in `enforce` mode it removes oldest artifacts/sessions first.
1633
+ - `highWaterBytes`: optional target after budget cleanup. Defaults to `80%` of `maxDiskBytes`.
1634
+ - **`threadBindings`**: global defaults for thread-bound session features.
1635
+ - `enabled`: master default switch (providers can override; Discord uses `channels.discord.threadBindings.enabled`)
1636
+ - `idleHours`: default inactivity auto-unfocus in hours (`0` disables; providers can override)
1637
+ - `maxAgeHours`: default hard max age in hours (`0` disables; providers can override)
1638
+
1639
+ </Accordion>
1640
+
1641
+ ---
1642
+
1643
+ ## Messages
1644
+
1645
+ ```json5
1646
+ {
1647
+ messages: {
1648
+ responsePrefix: "🦞", // or "auto"
1649
+ ackReaction: "👀",
1650
+ ackReactionScope: "group-mentions", // group-mentions | group-all | direct | all
1651
+ removeAckAfterReply: false,
1652
+ queue: {
1653
+ mode: "collect", // steer | followup | collect | steer-backlog | steer+backlog | queue | interrupt
1654
+ debounceMs: 1000,
1655
+ cap: 20,
1656
+ drop: "summarize", // old | new | summarize
1657
+ byChannel: {
1658
+ whatsapp: "collect",
1659
+ telegram: "collect",
1660
+ },
1661
+ },
1662
+ inbound: {
1663
+ debounceMs: 2000, // 0 disables
1664
+ byChannel: {
1665
+ whatsapp: 5000,
1666
+ slack: 1500,
1667
+ },
1668
+ },
1669
+ },
1670
+ }
1671
+ ```
1672
+
1673
+ ### Response prefix
1674
+
1675
+ Per-channel/account overrides: `channels.<channel>.responsePrefix`, `channels.<channel>.accounts.<id>.responsePrefix`.
1676
+
1677
+ Resolution (most specific wins): account → channel → global. `""` disables and stops cascade. `"auto"` derives `[{identity.name}]`.
1678
+
1679
+ **Template variables:**
1680
+
1681
+ | Variable | Description | Example |
1682
+ | ----------------- | ---------------------- | --------------------------- |
1683
+ | `{model}` | Short model name | `claude-opus-4-6` |
1684
+ | `{modelFull}` | Full model identifier | `anthropic/claude-opus-4-6` |
1685
+ | `{provider}` | Provider name | `anthropic` |
1686
+ | `{thinkingLevel}` | Current thinking level | `high`, `low`, `off` |
1687
+ | `{identity.name}` | Agent identity name | (same as `"auto"`) |
1688
+
1689
+ Variables are case-insensitive. `{think}` is an alias for `{thinkingLevel}`.
1690
+
1691
+ ### Ack reaction
1692
+
1693
+ - Defaults to active agent's `identity.emoji`, otherwise `"👀"`. Set `""` to disable.
1694
+ - Per-channel overrides: `channels.<channel>.ackReaction`, `channels.<channel>.accounts.<id>.ackReaction`.
1695
+ - Resolution order: account → channel → `messages.ackReaction` → identity fallback.
1696
+ - Scope: `group-mentions` (default), `group-all`, `direct`, `all`.
1697
+ - `removeAckAfterReply`: removes ack after reply (Slack/Discord/Telegram/Google Chat only).
1698
+
1699
+ ### Inbound debounce
1700
+
1701
+ Batches rapid text-only messages from the same sender into a single agent turn. Media/attachments flush immediately. Control commands bypass debouncing.
1702
+
1703
+ ### TTS (text-to-speech)
1704
+
1705
+ ```json5
1706
+ {
1707
+ messages: {
1708
+ tts: {
1709
+ auto: "always", // off | always | inbound | tagged
1710
+ mode: "final", // final | all
1711
+ provider: "elevenlabs",
1712
+ summaryModel: "openai/gpt-4.1-mini",
1713
+ modelOverrides: { enabled: true },
1714
+ maxTextLength: 4000,
1715
+ timeoutMs: 30000,
1716
+ prefsPath: "~/.quantumclaw/settings/tts.json",
1717
+ elevenlabs: {
1718
+ apiKey: "elevenlabs_api_key",
1719
+ baseUrl: "https://api.elevenlabs.io",
1720
+ voiceId: "voice_id",
1721
+ modelId: "eleven_multilingual_v2",
1722
+ seed: 42,
1723
+ applyTextNormalization: "auto",
1724
+ languageCode: "en",
1725
+ voiceSettings: {
1726
+ stability: 0.5,
1727
+ similarityBoost: 0.75,
1728
+ style: 0.0,
1729
+ useSpeakerBoost: true,
1730
+ speed: 1.0,
1731
+ },
1732
+ },
1733
+ openai: {
1734
+ apiKey: "openai_api_key",
1735
+ baseUrl: "https://api.openai.com/v1",
1736
+ model: "gpt-4o-mini-tts",
1737
+ voice: "alloy",
1738
+ },
1739
+ },
1740
+ },
1741
+ }
1742
+ ```
1743
+
1744
+ - `auto` controls auto-TTS. `/tts off|always|inbound|tagged` overrides per session.
1745
+ - `summaryModel` overrides `agents.defaults.model.primary` for auto-summary.
1746
+ - `modelOverrides` is enabled by default; `modelOverrides.allowProvider` defaults to `false` (opt-in).
1747
+ - API keys fall back to `ELEVENLABS_API_KEY`/`XI_API_KEY` and `OPENAI_API_KEY`.
1748
+ - `openai.baseUrl` overrides the OpenAI TTS endpoint. Resolution order is config, then `OPENAI_TTS_BASE_URL`, then `https://api.openai.com/v1`.
1749
+ - When `openai.baseUrl` points to a non-OpenAI endpoint, QuantumClaw treats it as an OpenAI-compatible TTS server and relaxes model/voice validation.
1750
+
1751
+ ---
1752
+
1753
+ ## Talk
1754
+
1755
+ Defaults for Talk mode (macOS/iOS/Android).
1756
+
1757
+ ```json5
1758
+ {
1759
+ talk: {
1760
+ voiceId: "elevenlabs_voice_id",
1761
+ voiceAliases: {
1762
+ Clawd: "EXAVITQu4vr4xnSDxMaL",
1763
+ Roger: "CwhRBWXzGAHq8TQ4Fs17",
1764
+ },
1765
+ modelId: "eleven_v3",
1766
+ outputFormat: "mp3_44100_128",
1767
+ apiKey: "elevenlabs_api_key",
1768
+ silenceTimeoutMs: 1500,
1769
+ interruptOnSpeech: true,
1770
+ },
1771
+ }
1772
+ ```
1773
+
1774
+ - Voice IDs fall back to `ELEVENLABS_VOICE_ID` or `SAG_VOICE_ID`.
1775
+ - `apiKey` and `providers.*.apiKey` accept plaintext strings or SecretRef objects.
1776
+ - `ELEVENLABS_API_KEY` fallback applies only when no Talk API key is configured.
1777
+ - `voiceAliases` lets Talk directives use friendly names.
1778
+ - `silenceTimeoutMs` controls how long Talk mode waits after user silence before it sends the transcript. Unset keeps the platform default pause window (`700 ms on macOS and Android, 900 ms on iOS`).
1779
+
1780
+ ---
1781
+
1782
+ ## Tools
1783
+
1784
+ ### Tool profiles
1785
+
1786
+ `tools.profile` sets a base allowlist before `tools.allow`/`tools.deny`:
1787
+
1788
+ Local onboarding defaults new local configs to `tools.profile: "coding"` when unset (existing explicit profiles are preserved).
1789
+
1790
+ | Profile | Includes |
1791
+ | ----------- | ----------------------------------------------------------------------------------------- |
1792
+ | `minimal` | `session_status` only |
1793
+ | `coding` | `group:fs`, `group:runtime`, `group:sessions`, `group:memory`, `image` |
1794
+ | `messaging` | `group:messaging`, `sessions_list`, `sessions_history`, `sessions_send`, `session_status` |
1795
+ | `full` | No restriction (same as unset) |
1796
+
1797
+ ### Tool groups
1798
+
1799
+ | Group | Tools |
1800
+ | ------------------ | ---------------------------------------------------------------------------------------- |
1801
+ | `group:runtime` | `exec`, `process` (`bash` is accepted as an alias for `exec`) |
1802
+ | `group:fs` | `read`, `write`, `edit`, `apply_patch` |
1803
+ | `group:sessions` | `sessions_list`, `sessions_history`, `sessions_send`, `sessions_spawn`, `session_status` |
1804
+ | `group:memory` | `memory_search`, `memory_get` |
1805
+ | `group:web` | `web_search`, `web_fetch` |
1806
+ | `group:ui` | `browser`, `canvas` |
1807
+ | `group:automation` | `cron`, `gateway` |
1808
+ | `group:messaging` | `message` |
1809
+ | `group:nodes` | `nodes` |
1810
+ | `group:quantumclaw` | All built-in tools (excludes provider plugins) |
1811
+
1812
+ ### `tools.allow` / `tools.deny`
1813
+
1814
+ Global tool allow/deny policy (deny wins). Case-insensitive, supports `*` wildcards. Applied even when Docker sandbox is off.
1815
+
1816
+ ```json5
1817
+ {
1818
+ tools: { deny: ["browser", "canvas"] },
1819
+ }
1820
+ ```
1821
+
1822
+ ### `tools.byProvider`
1823
+
1824
+ Further restrict tools for specific providers or models. Order: base profile → provider profile → allow/deny.
1825
+
1826
+ ```json5
1827
+ {
1828
+ tools: {
1829
+ profile: "coding",
1830
+ byProvider: {
1831
+ "google-antigravity": { profile: "minimal" },
1832
+ "openai/gpt-5.2": { allow: ["group:fs", "sessions_list"] },
1833
+ },
1834
+ },
1835
+ }
1836
+ ```
1837
+
1838
+ ### `tools.elevated`
1839
+
1840
+ Controls elevated (host) exec access:
1841
+
1842
+ ```json5
1843
+ {
1844
+ tools: {
1845
+ elevated: {
1846
+ enabled: true,
1847
+ allowFrom: {
1848
+ whatsapp: ["+15555550123"],
1849
+ discord: ["1234567890123", "987654321098765432"],
1850
+ },
1851
+ },
1852
+ },
1853
+ }
1854
+ ```
1855
+
1856
+ - Per-agent override (`agents.list[].tools.elevated`) can only further restrict.
1857
+ - `/elevated on|off|ask|full` stores state per session; inline directives apply to single message.
1858
+ - Elevated `exec` runs on the host, bypasses sandboxing.
1859
+
1860
+ ### `tools.exec`
1861
+
1862
+ ```json5
1863
+ {
1864
+ tools: {
1865
+ exec: {
1866
+ backgroundMs: 10000,
1867
+ timeoutSec: 1800,
1868
+ cleanupMs: 1800000,
1869
+ notifyOnExit: true,
1870
+ notifyOnExitEmptySuccess: false,
1871
+ applyPatch: {
1872
+ enabled: false,
1873
+ allowModels: ["gpt-5.2"],
1874
+ },
1875
+ },
1876
+ },
1877
+ }
1878
+ ```
1879
+
1880
+ ### `tools.loopDetection`
1881
+
1882
+ Tool-loop safety checks are **disabled by default**. Set `enabled: true` to activate detection.
1883
+ Settings can be defined globally in `tools.loopDetection` and overridden per-agent at `agents.list[].tools.loopDetection`.
1884
+
1885
+ ```json5
1886
+ {
1887
+ tools: {
1888
+ loopDetection: {
1889
+ enabled: true,
1890
+ historySize: 30,
1891
+ warningThreshold: 10,
1892
+ criticalThreshold: 20,
1893
+ globalCircuitBreakerThreshold: 30,
1894
+ detectors: {
1895
+ genericRepeat: true,
1896
+ knownPollNoProgress: true,
1897
+ pingPong: true,
1898
+ },
1899
+ },
1900
+ },
1901
+ }
1902
+ ```
1903
+
1904
+ - `historySize`: max tool-call history retained for loop analysis.
1905
+ - `warningThreshold`: repeating no-progress pattern threshold for warnings.
1906
+ - `criticalThreshold`: higher repeating threshold for blocking critical loops.
1907
+ - `globalCircuitBreakerThreshold`: hard stop threshold for any no-progress run.
1908
+ - `detectors.genericRepeat`: warn on repeated same-tool/same-args calls.
1909
+ - `detectors.knownPollNoProgress`: warn/block on known poll tools (`process.poll`, `command_status`, etc.).
1910
+ - `detectors.pingPong`: warn/block on alternating no-progress pair patterns.
1911
+ - If `warningThreshold >= criticalThreshold` or `criticalThreshold >= globalCircuitBreakerThreshold`, validation fails.
1912
+
1913
+ ### `tools.web`
1914
+
1915
+ ```json5
1916
+ {
1917
+ tools: {
1918
+ web: {
1919
+ search: {
1920
+ enabled: true,
1921
+ apiKey: "brave_api_key", // or BRAVE_API_KEY env
1922
+ maxResults: 5,
1923
+ timeoutSeconds: 30,
1924
+ cacheTtlMinutes: 15,
1925
+ },
1926
+ fetch: {
1927
+ enabled: true,
1928
+ maxChars: 50000,
1929
+ maxCharsCap: 50000,
1930
+ timeoutSeconds: 30,
1931
+ cacheTtlMinutes: 15,
1932
+ userAgent: "custom-ua",
1933
+ },
1934
+ },
1935
+ },
1936
+ }
1937
+ ```
1938
+
1939
+ ### `tools.media`
1940
+
1941
+ Configures inbound media understanding (image/audio/video):
1942
+
1943
+ ```json5
1944
+ {
1945
+ tools: {
1946
+ media: {
1947
+ concurrency: 2,
1948
+ audio: {
1949
+ enabled: true,
1950
+ maxBytes: 20971520,
1951
+ scope: {
1952
+ default: "deny",
1953
+ rules: [{ action: "allow", match: { chatType: "direct" } }],
1954
+ },
1955
+ models: [
1956
+ { provider: "openai", model: "gpt-4o-mini-transcribe" },
1957
+ { type: "cli", command: "whisper", args: ["--model", "base", "{{MediaPath}}"] },
1958
+ ],
1959
+ },
1960
+ video: {
1961
+ enabled: true,
1962
+ maxBytes: 52428800,
1963
+ models: [{ provider: "google", model: "gemini-3-flash-preview" }],
1964
+ },
1965
+ },
1966
+ },
1967
+ }
1968
+ ```
1969
+
1970
+ <Accordion title="Media model entry fields">
1971
+
1972
+ **Provider entry** (`type: "provider"` or omitted):
1973
+
1974
+ - `provider`: API provider id (`openai`, `anthropic`, `google`/`gemini`, `groq`, etc.)
1975
+ - `model`: model id override
1976
+ - `profile` / `preferredProfile`: `auth-profiles.json` profile selection
1977
+
1978
+ **CLI entry** (`type: "cli"`):
1979
+
1980
+ - `command`: executable to run
1981
+ - `args`: templated args (supports `{{MediaPath}}`, `{{Prompt}}`, `{{MaxChars}}`, etc.)
1982
+
1983
+ **Common fields:**
1984
+
1985
+ - `capabilities`: optional list (`image`, `audio`, `video`). Defaults: `openai`/`anthropic`/`minimax` → image, `google` → image+audio+video, `groq` → audio.
1986
+ - `prompt`, `maxChars`, `maxBytes`, `timeoutSeconds`, `language`: per-entry overrides.
1987
+ - Failures fall back to the next entry.
1988
+
1989
+ Provider auth follows standard order: `auth-profiles.json` → env vars → `models.providers.*.apiKey`.
1990
+
1991
+ </Accordion>
1992
+
1993
+ ### `tools.agentToAgent`
1994
+
1995
+ ```json5
1996
+ {
1997
+ tools: {
1998
+ agentToAgent: {
1999
+ enabled: false,
2000
+ allow: ["home", "work"],
2001
+ },
2002
+ },
2003
+ }
2004
+ ```
2005
+
2006
+ ### `tools.sessions`
2007
+
2008
+ Controls which sessions can be targeted by the session tools (`sessions_list`, `sessions_history`, `sessions_send`).
2009
+
2010
+ Default: `tree` (current session + sessions spawned by it, such as subagents).
2011
+
2012
+ ```json5
2013
+ {
2014
+ tools: {
2015
+ sessions: {
2016
+ // "self" | "tree" | "agent" | "all"
2017
+ visibility: "tree",
2018
+ },
2019
+ },
2020
+ }
2021
+ ```
2022
+
2023
+ Notes:
2024
+
2025
+ - `self`: only the current session key.
2026
+ - `tree`: current session + sessions spawned by the current session (subagents).
2027
+ - `agent`: any session belonging to the current agent id (can include other users if you run per-sender sessions under the same agent id).
2028
+ - `all`: any session. Cross-agent targeting still requires `tools.agentToAgent`.
2029
+ - Sandbox clamp: when the current session is sandboxed and `agents.defaults.sandbox.sessionToolsVisibility="spawned"`, visibility is forced to `tree` even if `tools.sessions.visibility="all"`.
2030
+
2031
+ ### `tools.sessions_spawn`
2032
+
2033
+ Controls inline attachment support for `sessions_spawn`.
2034
+
2035
+ ```json5
2036
+ {
2037
+ tools: {
2038
+ sessions_spawn: {
2039
+ attachments: {
2040
+ enabled: false, // opt-in: set true to allow inline file attachments
2041
+ maxTotalBytes: 5242880, // 5 MB total across all files
2042
+ maxFiles: 50,
2043
+ maxFileBytes: 1048576, // 1 MB per file
2044
+ retainOnSessionKeep: false, // keep attachments when cleanup="keep"
2045
+ },
2046
+ },
2047
+ },
2048
+ }
2049
+ ```
2050
+
2051
+ Notes:
2052
+
2053
+ - Attachments are only supported for `runtime: "subagent"`. ACP runtime rejects them.
2054
+ - Files are materialized into the child workspace at `.quantumclaw/attachments/<uuid>/` with a `.manifest.json`.
2055
+ - Attachment content is automatically redacted from transcript persistence.
2056
+ - Base64 inputs are validated with strict alphabet/padding checks and a pre-decode size guard.
2057
+ - File permissions are `0700` for directories and `0600` for files.
2058
+ - Cleanup follows the `cleanup` policy: `delete` always removes attachments; `keep` retains them only when `retainOnSessionKeep: true`.
2059
+
2060
+ ### `tools.subagents`
2061
+
2062
+ ```json5
2063
+ {
2064
+ agents: {
2065
+ defaults: {
2066
+ subagents: {
2067
+ model: "minimax/MiniMax-M2.7",
2068
+ maxConcurrent: 1,
2069
+ runTimeoutSeconds: 900,
2070
+ archiveAfterMinutes: 60,
2071
+ },
2072
+ },
2073
+ },
2074
+ }
2075
+ ```
2076
+
2077
+ - `model`: default model for spawned sub-agents. If omitted, sub-agents inherit the caller's model.
2078
+ - `runTimeoutSeconds`: default timeout (seconds) for `sessions_spawn` when the tool call omits `runTimeoutSeconds`. `0` means no timeout.
2079
+ - Per-subagent tool policy: `tools.subagents.tools.allow` / `tools.subagents.tools.deny`.
2080
+
2081
+ ---
2082
+
2083
+ ## Custom providers and base URLs
2084
+
2085
+ QuantumClaw uses the pi-coding-agent model catalog. Add custom providers via `models.providers` in config or `~/.quantumclaw/agents/<agentId>/agent/models.json`.
2086
+
2087
+ ```json5
2088
+ {
2089
+ models: {
2090
+ mode: "merge", // merge (default) | replace
2091
+ providers: {
2092
+ "custom-proxy": {
2093
+ baseUrl: "http://localhost:4000/v1",
2094
+ apiKey: "LITELLM_KEY",
2095
+ api: "openai-completions", // openai-completions | openai-responses | anthropic-messages | google-generative-ai
2096
+ models: [
2097
+ {
2098
+ id: "llama-3.1-8b",
2099
+ name: "Llama 3.1 8B",
2100
+ reasoning: false,
2101
+ input: ["text"],
2102
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
2103
+ contextWindow: 128000,
2104
+ maxTokens: 32000,
2105
+ },
2106
+ ],
2107
+ },
2108
+ },
2109
+ },
2110
+ }
2111
+ ```
2112
+
2113
+ - Use `authHeader: true` + `headers` for custom auth needs.
2114
+ - Override agent config root with `QUANTUMCLAW_AGENT_DIR` (or `PI_CODING_AGENT_DIR`).
2115
+ - Merge precedence for matching provider IDs:
2116
+ - Non-empty agent `models.json` `baseUrl` values win.
2117
+ - Non-empty agent `apiKey` values win only when that provider is not SecretRef-managed in current config/auth-profile context.
2118
+ - SecretRef-managed provider `apiKey` values are refreshed from source markers (`ENV_VAR_NAME` for env refs, `secretref-managed` for file/exec refs) instead of persisting resolved secrets.
2119
+ - SecretRef-managed provider header values are refreshed from source markers (`secretref-env:ENV_VAR_NAME` for env refs, `secretref-managed` for file/exec refs).
2120
+ - Empty or missing agent `apiKey`/`baseUrl` fall back to `models.providers` in config.
2121
+ - Matching model `contextWindow`/`maxTokens` use the higher value between explicit config and implicit catalog values.
2122
+ - Use `models.mode: "replace"` when you want config to fully rewrite `models.json`.
2123
+ - Marker persistence is source-authoritative: markers are written from the active source config snapshot (pre-resolution), not from resolved runtime secret values.
2124
+
2125
+ ### Provider field details
2126
+
2127
+ - `models.mode`: provider catalog behavior (`merge` or `replace`).
2128
+ - `models.providers`: custom provider map keyed by provider id.
2129
+ - `models.providers.*.api`: request adapter (`openai-completions`, `openai-responses`, `anthropic-messages`, `google-generative-ai`, etc).
2130
+ - `models.providers.*.apiKey`: provider credential (prefer SecretRef/env substitution).
2131
+ - `models.providers.*.auth`: auth strategy (`api-key`, `token`, `oauth`, `aws-sdk`).
2132
+ - `models.providers.*.injectNumCtxForOpenAICompat`: for Ollama + `openai-completions`, inject `options.num_ctx` into requests (default: `true`).
2133
+ - `models.providers.*.authHeader`: force credential transport in the `Authorization` header when required.
2134
+ - `models.providers.*.baseUrl`: upstream API base URL.
2135
+ - `models.providers.*.headers`: extra static headers for proxy/tenant routing.
2136
+ - `models.providers.*.models`: explicit provider model catalog entries.
2137
+ - `models.providers.*.models.*.compat.supportsDeveloperRole`: optional compatibility hint. For `api: "openai-completions"` with a non-empty non-native `baseUrl` (host not `api.openai.com`), QuantumClaw forces this to `false` at runtime. Empty/omitted `baseUrl` keeps default OpenAI behavior.
2138
+ - `models.bedrockDiscovery`: Bedrock auto-discovery settings root.
2139
+ - `models.bedrockDiscovery.enabled`: turn discovery polling on/off.
2140
+ - `models.bedrockDiscovery.region`: AWS region for discovery.
2141
+ - `models.bedrockDiscovery.providerFilter`: optional provider-id filter for targeted discovery.
2142
+ - `models.bedrockDiscovery.refreshInterval`: polling interval for discovery refresh.
2143
+ - `models.bedrockDiscovery.defaultContextWindow`: fallback context window for discovered models.
2144
+ - `models.bedrockDiscovery.defaultMaxTokens`: fallback max output tokens for discovered models.
2145
+
2146
+ ### Provider examples
2147
+
2148
+ <Accordion title="Cerebras (GLM 4.6 / 4.7)">
2149
+
2150
+ ```json5
2151
+ {
2152
+ env: { CEREBRAS_API_KEY: "sk-..." },
2153
+ agents: {
2154
+ defaults: {
2155
+ model: {
2156
+ primary: "cerebras/zai-glm-4.7",
2157
+ fallbacks: ["cerebras/zai-glm-4.6"],
2158
+ },
2159
+ models: {
2160
+ "cerebras/zai-glm-4.7": { alias: "GLM 4.7 (Cerebras)" },
2161
+ "cerebras/zai-glm-4.6": { alias: "GLM 4.6 (Cerebras)" },
2162
+ },
2163
+ },
2164
+ },
2165
+ models: {
2166
+ mode: "merge",
2167
+ providers: {
2168
+ cerebras: {
2169
+ baseUrl: "https://api.cerebras.ai/v1",
2170
+ apiKey: "${CEREBRAS_API_KEY}",
2171
+ api: "openai-completions",
2172
+ models: [
2173
+ { id: "zai-glm-4.7", name: "GLM 4.7 (Cerebras)" },
2174
+ { id: "zai-glm-4.6", name: "GLM 4.6 (Cerebras)" },
2175
+ ],
2176
+ },
2177
+ },
2178
+ },
2179
+ }
2180
+ ```
2181
+
2182
+ Use `cerebras/zai-glm-4.7` for Cerebras; `zai/glm-4.7` for Z.AI direct.
2183
+
2184
+ </Accordion>
2185
+
2186
+ <Accordion title="OpenCode">
2187
+
2188
+ ```json5
2189
+ {
2190
+ agents: {
2191
+ defaults: {
2192
+ model: { primary: "opencode/claude-opus-4-6" },
2193
+ models: { "opencode/claude-opus-4-6": { alias: "Opus" } },
2194
+ },
2195
+ },
2196
+ }
2197
+ ```
2198
+
2199
+ Set `OPENCODE_API_KEY` (or `OPENCODE_ZEN_API_KEY`). Use `opencode/...` refs for the Zen catalog or `opencode-go/...` refs for the Go catalog. Shortcut: `quantumclaw onboard --auth-choice opencode-zen` or `quantumclaw onboard --auth-choice opencode-go`.
2200
+
2201
+ </Accordion>
2202
+
2203
+ <Accordion title="Z.AI (GLM-4.7)">
2204
+
2205
+ ```json5
2206
+ {
2207
+ agents: {
2208
+ defaults: {
2209
+ model: { primary: "zai/glm-4.7" },
2210
+ models: { "zai/glm-4.7": {} },
2211
+ },
2212
+ },
2213
+ }
2214
+ ```
2215
+
2216
+ Set `ZAI_API_KEY`. `z.ai/*` and `z-ai/*` are accepted aliases. Shortcut: `quantumclaw onboard --auth-choice zai-api-key`.
2217
+
2218
+ - General endpoint: `https://api.z.ai/api/paas/v4`
2219
+ - Coding endpoint (default): `https://api.z.ai/api/coding/paas/v4`
2220
+ - For the general endpoint, define a custom provider with the base URL override.
2221
+
2222
+ </Accordion>
2223
+
2224
+ <Accordion title="Moonshot AI (Kimi)">
2225
+
2226
+ ```json5
2227
+ {
2228
+ env: { MOONSHOT_API_KEY: "sk-..." },
2229
+ agents: {
2230
+ defaults: {
2231
+ model: { primary: "moonshot/kimi-k2.5" },
2232
+ models: { "moonshot/kimi-k2.5": { alias: "Kimi K2.5" } },
2233
+ },
2234
+ },
2235
+ models: {
2236
+ mode: "merge",
2237
+ providers: {
2238
+ moonshot: {
2239
+ baseUrl: "https://api.moonshot.ai/v1",
2240
+ apiKey: "${MOONSHOT_API_KEY}",
2241
+ api: "openai-completions",
2242
+ models: [
2243
+ {
2244
+ id: "kimi-k2.5",
2245
+ name: "Kimi K2.5",
2246
+ reasoning: false,
2247
+ input: ["text"],
2248
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
2249
+ contextWindow: 256000,
2250
+ maxTokens: 8192,
2251
+ },
2252
+ ],
2253
+ },
2254
+ },
2255
+ },
2256
+ }
2257
+ ```
2258
+
2259
+ For the China endpoint: `baseUrl: "https://api.moonshot.cn/v1"` or `quantumclaw onboard --auth-choice moonshot-api-key-cn`.
2260
+
2261
+ </Accordion>
2262
+
2263
+ <Accordion title="Kimi Coding">
2264
+
2265
+ ```json5
2266
+ {
2267
+ env: { KIMI_API_KEY: "sk-..." },
2268
+ agents: {
2269
+ defaults: {
2270
+ model: { primary: "kimi-coding/k2p5" },
2271
+ models: { "kimi-coding/k2p5": { alias: "Kimi K2.5" } },
2272
+ },
2273
+ },
2274
+ }
2275
+ ```
2276
+
2277
+ Anthropic-compatible, built-in provider. Shortcut: `quantumclaw onboard --auth-choice kimi-code-api-key`.
2278
+
2279
+ </Accordion>
2280
+
2281
+ <Accordion title="Synthetic (Anthropic-compatible)">
2282
+
2283
+ ```json5
2284
+ {
2285
+ env: { SYNTHETIC_API_KEY: "sk-..." },
2286
+ agents: {
2287
+ defaults: {
2288
+ model: { primary: "synthetic/hf:MiniMaxAI/MiniMax-M2.5" },
2289
+ models: { "synthetic/hf:MiniMaxAI/MiniMax-M2.5": { alias: "MiniMax M2.5" } },
2290
+ },
2291
+ },
2292
+ models: {
2293
+ mode: "merge",
2294
+ providers: {
2295
+ synthetic: {
2296
+ baseUrl: "https://api.synthetic.new/anthropic",
2297
+ apiKey: "${SYNTHETIC_API_KEY}",
2298
+ api: "anthropic-messages",
2299
+ models: [
2300
+ {
2301
+ id: "hf:MiniMaxAI/MiniMax-M2.5",
2302
+ name: "MiniMax M2.5",
2303
+ reasoning: true,
2304
+ input: ["text"],
2305
+ cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
2306
+ contextWindow: 192000,
2307
+ maxTokens: 65536,
2308
+ },
2309
+ ],
2310
+ },
2311
+ },
2312
+ },
2313
+ }
2314
+ ```
2315
+
2316
+ Base URL should omit `/v1` (Anthropic client appends it). Shortcut: `quantumclaw onboard --auth-choice synthetic-api-key`.
2317
+
2318
+ </Accordion>
2319
+
2320
+ <Accordion title="MiniMax M2.7 (direct)">
2321
+
2322
+ ```json5
2323
+ {
2324
+ agents: {
2325
+ defaults: {
2326
+ model: { primary: "minimax/MiniMax-M2.7" },
2327
+ models: {
2328
+ "minimax/MiniMax-M2.7": { alias: "Minimax" },
2329
+ },
2330
+ },
2331
+ },
2332
+ models: {
2333
+ mode: "merge",
2334
+ providers: {
2335
+ minimax: {
2336
+ baseUrl: "https://api.minimax.io/anthropic",
2337
+ apiKey: "${MINIMAX_API_KEY}",
2338
+ api: "anthropic-messages",
2339
+ models: [
2340
+ {
2341
+ id: "MiniMax-M2.7",
2342
+ name: "MiniMax M2.7",
2343
+ reasoning: true,
2344
+ input: ["text"],
2345
+ cost: { input: 0.3, output: 1.2, cacheRead: 0.03, cacheWrite: 0.12 },
2346
+ contextWindow: 200000,
2347
+ maxTokens: 8192,
2348
+ },
2349
+ ],
2350
+ },
2351
+ },
2352
+ },
2353
+ }
2354
+ ```
2355
+
2356
+ Set `MINIMAX_API_KEY`. Shortcut: `quantumclaw onboard --auth-choice minimax-api`.
2357
+ `MiniMax-M2.5` and `MiniMax-M2.5-highspeed` remain available if you prefer the older text models.
2358
+
2359
+ </Accordion>
2360
+
2361
+ <Accordion title="Local models (LM Studio)">
2362
+
2363
+ See [Local Models](/gateway/local-models). TL;DR: run MiniMax M2.5 via LM Studio Responses API on serious hardware; keep hosted models merged for fallback.
2364
+
2365
+ </Accordion>
2366
+
2367
+ ---
2368
+
2369
+ ## Skills
2370
+
2371
+ ```json5
2372
+ {
2373
+ skills: {
2374
+ allowBundled: ["gemini", "peekaboo"],
2375
+ load: {
2376
+ extraDirs: ["~/Projects/agent-scripts/skills"],
2377
+ },
2378
+ install: {
2379
+ preferBrew: true,
2380
+ nodeManager: "npm", // npm | pnpm | yarn
2381
+ },
2382
+ entries: {
2383
+ "image-lab": {
2384
+ apiKey: { source: "env", provider: "default", id: "GEMINI_API_KEY" }, // or plaintext string
2385
+ env: { GEMINI_API_KEY: "GEMINI_KEY_HERE" },
2386
+ },
2387
+ peekaboo: { enabled: true },
2388
+ sag: { enabled: false },
2389
+ },
2390
+ },
2391
+ }
2392
+ ```
2393
+
2394
+ - `allowBundled`: optional allowlist for bundled skills only (managed/workspace skills unaffected).
2395
+ - `entries.<skillKey>.enabled: false` disables a skill even if bundled/installed.
2396
+ - `entries.<skillKey>.apiKey`: convenience for skills declaring a primary env var (plaintext string or SecretRef object).
2397
+
2398
+ ---
2399
+
2400
+ ## Plugins
2401
+
2402
+ ```json5
2403
+ {
2404
+ plugins: {
2405
+ enabled: true,
2406
+ allow: ["voice-call"],
2407
+ deny: [],
2408
+ load: {
2409
+ paths: ["~/Projects/oss/voice-call-extension"],
2410
+ },
2411
+ entries: {
2412
+ "voice-call": {
2413
+ enabled: true,
2414
+ hooks: {
2415
+ allowPromptInjection: false,
2416
+ },
2417
+ config: { provider: "twilio" },
2418
+ },
2419
+ },
2420
+ },
2421
+ }
2422
+ ```
2423
+
2424
+ - Loaded from `~/.quantumclaw/extensions`, `<workspace>/.quantumclaw/extensions`, plus `plugins.load.paths`.
2425
+ - Discovery accepts native QuantumClaw plugins plus compatible Codex bundles and Claude bundles, including manifestless Claude default-layout bundles.
2426
+ - **Config changes require a gateway restart.**
2427
+ - `allow`: optional allowlist (only listed plugins load). `deny` wins.
2428
+ - `plugins.entries.<id>.apiKey`: plugin-level API key convenience field (when supported by the plugin).
2429
+ - `plugins.entries.<id>.env`: plugin-scoped env var map.
2430
+ - `plugins.entries.<id>.hooks.allowPromptInjection`: when `false`, core blocks `before_prompt_build` and ignores prompt-mutating fields from legacy `before_agent_start`, while preserving legacy `modelOverride` and `providerOverride`. Applies to native plugin hooks and supported bundle-provided hook directories.
2431
+ - `plugins.entries.<id>.subagent.allowModelOverride`: explicitly trust this plugin to request per-run `provider` and `model` overrides for background subagent runs.
2432
+ - `plugins.entries.<id>.subagent.allowedModels`: optional allowlist of canonical `provider/model` targets for trusted subagent overrides. Use `"*"` only when you intentionally want to allow any model.
2433
+ - `plugins.entries.<id>.config`: plugin-defined config object (validated by native QuantumClaw plugin schema when available).
2434
+ - Enabled Claude bundle plugins can also contribute embedded Pi defaults from `settings.json`; QuantumClaw applies those as sanitized agent settings, not as raw QuantumClaw config patches.
2435
+ - `plugins.slots.memory`: pick the active memory plugin id, or `"none"` to disable memory plugins.
2436
+ - `plugins.slots.contextEngine`: pick the active context engine plugin id; defaults to `"legacy"` unless you install and select another engine.
2437
+ - `plugins.installs`: CLI-managed install metadata used by `quantumclaw plugins update`.
2438
+ - Includes `source`, `spec`, `sourcePath`, `installPath`, `version`, `resolvedName`, `resolvedVersion`, `resolvedSpec`, `integrity`, `shasum`, `resolvedAt`, `installedAt`.
2439
+ - Treat `plugins.installs.*` as managed state; prefer CLI commands over manual edits.
2440
+
2441
+ See [Plugins](/tools/plugin).
2442
+
2443
+ ---
2444
+
2445
+ ## Browser
2446
+
2447
+ ```json5
2448
+ {
2449
+ browser: {
2450
+ enabled: true,
2451
+ evaluateEnabled: true,
2452
+ defaultProfile: "user",
2453
+ ssrfPolicy: {
2454
+ dangerouslyAllowPrivateNetwork: true, // default trusted-network mode
2455
+ // allowPrivateNetwork: true, // legacy alias
2456
+ // hostnameAllowlist: ["*.example.com", "example.com"],
2457
+ // allowedHostnames: ["localhost"],
2458
+ },
2459
+ profiles: {
2460
+ quantumclaw: { cdpPort: 18800, color: "#FF4500" },
2461
+ work: { cdpPort: 18801, color: "#0066CC" },
2462
+ user: { driver: "existing-session", attachOnly: true, color: "#00AA00" },
2463
+ brave: {
2464
+ driver: "existing-session",
2465
+ attachOnly: true,
2466
+ userDataDir: "~/Library/Application Support/BraveSoftware/Brave-Browser",
2467
+ color: "#FB542B",
2468
+ },
2469
+ remote: { cdpUrl: "http://10.0.0.42:9222", color: "#00AA00" },
2470
+ },
2471
+ color: "#FF4500",
2472
+ // headless: false,
2473
+ // noSandbox: false,
2474
+ // extraArgs: [],
2475
+ // executablePath: "/Applications/Brave Browser.app/Contents/MacOS/Brave Browser",
2476
+ // attachOnly: false,
2477
+ },
2478
+ }
2479
+ ```
2480
+
2481
+ - `evaluateEnabled: false` disables `act:evaluate` and `wait --fn`.
2482
+ - `ssrfPolicy.dangerouslyAllowPrivateNetwork` defaults to `true` when unset (trusted-network model).
2483
+ - Set `ssrfPolicy.dangerouslyAllowPrivateNetwork: false` for strict public-only browser navigation.
2484
+ - In strict mode, remote CDP profile endpoints (`profiles.*.cdpUrl`) are subject to the same private-network blocking during reachability/discovery checks.
2485
+ - `ssrfPolicy.allowPrivateNetwork` remains supported as a legacy alias.
2486
+ - In strict mode, use `ssrfPolicy.hostnameAllowlist` and `ssrfPolicy.allowedHostnames` for explicit exceptions.
2487
+ - Remote profiles are attach-only (start/stop/reset disabled).
2488
+ - `existing-session` profiles are host-only and use Chrome MCP instead of CDP.
2489
+ - `existing-session` profiles can set `userDataDir` to target a specific
2490
+ Chromium-based browser profile such as Brave or Edge.
2491
+ - Auto-detect order: default browser if Chromium-based → Chrome → Brave → Edge → Chromium → Chrome Canary.
2492
+ - Control service: loopback only (port derived from `gateway.port`, default `18791`).
2493
+ - `extraArgs` appends extra launch flags to local Chromium startup (for example
2494
+ `--disable-gpu`, window sizing, or debug flags).
2495
+
2496
+ ---
2497
+
2498
+ ## UI
2499
+
2500
+ ```json5
2501
+ {
2502
+ ui: {
2503
+ seamColor: "#FF4500",
2504
+ assistant: {
2505
+ name: "QuantumClaw",
2506
+ avatar: "CB", // emoji, short text, image URL, or data URI
2507
+ },
2508
+ },
2509
+ }
2510
+ ```
2511
+
2512
+ - `seamColor`: accent color for native app UI chrome (Talk Mode bubble tint, etc.).
2513
+ - `assistant`: Control UI identity override. Falls back to active agent identity.
2514
+
2515
+ ---
2516
+
2517
+ ## Gateway
2518
+
2519
+ ```json5
2520
+ {
2521
+ gateway: {
2522
+ mode: "local", // local | remote
2523
+ port: 18789,
2524
+ bind: "loopback",
2525
+ auth: {
2526
+ mode: "token", // none | token | password | trusted-proxy
2527
+ token: "your-token",
2528
+ // password: "your-password", // or QUANTUMCLAW_GATEWAY_PASSWORD
2529
+ // trustedProxy: { userHeader: "x-forwarded-user" }, // for mode=trusted-proxy; see /gateway/trusted-proxy-auth
2530
+ allowTailscale: true,
2531
+ rateLimit: {
2532
+ maxAttempts: 10,
2533
+ windowMs: 60000,
2534
+ lockoutMs: 300000,
2535
+ exemptLoopback: true,
2536
+ },
2537
+ },
2538
+ tailscale: {
2539
+ mode: "off", // off | serve | funnel
2540
+ resetOnExit: false,
2541
+ },
2542
+ controlUi: {
2543
+ enabled: true,
2544
+ basePath: "/quantumclaw",
2545
+ // root: "dist/control-ui",
2546
+ // allowedOrigins: ["https://control.example.com"], // required for non-loopback Control UI
2547
+ // dangerouslyAllowHostHeaderOriginFallback: false, // dangerous Host-header origin fallback mode
2548
+ // allowInsecureAuth: false,
2549
+ // dangerouslyDisableDeviceAuth: false,
2550
+ },
2551
+ remote: {
2552
+ url: "ws://gateway.tailnet:18789",
2553
+ transport: "ssh", // ssh | direct
2554
+ token: "your-token",
2555
+ // password: "your-password",
2556
+ },
2557
+ trustedProxies: ["10.0.0.1"],
2558
+ // Optional. Default false.
2559
+ allowRealIpFallback: false,
2560
+ tools: {
2561
+ // Additional /tools/invoke HTTP denies
2562
+ deny: ["browser"],
2563
+ // Remove tools from the default HTTP deny list
2564
+ allow: ["gateway"],
2565
+ },
2566
+ push: {
2567
+ apns: {
2568
+ relay: {
2569
+ baseUrl: "https://relay.example.com",
2570
+ timeoutMs: 10000,
2571
+ },
2572
+ },
2573
+ },
2574
+ },
2575
+ }
2576
+ ```
2577
+
2578
+ <Accordion title="Gateway field details">
2579
+
2580
+ - `mode`: `local` (run gateway) or `remote` (connect to remote gateway). Gateway refuses to start unless `local`.
2581
+ - `port`: single multiplexed port for WS + HTTP. Precedence: `--port` > `QUANTUMCLAW_GATEWAY_PORT` > `gateway.port` > `18789`.
2582
+ - `bind`: `auto`, `loopback` (default), `lan` (`0.0.0.0`), `tailnet` (Tailscale IP only), or `custom`.
2583
+ - **Legacy bind aliases**: use bind mode values in `gateway.bind` (`auto`, `loopback`, `lan`, `tailnet`, `custom`), not host aliases (`0.0.0.0`, `127.0.0.1`, `localhost`, `::`, `::1`).
2584
+ - **Docker note**: the default `loopback` bind listens on `127.0.0.1` inside the container. With Docker bridge networking (`-p 18789:18789`), traffic arrives on `eth0`, so the gateway is unreachable. Use `--network host`, or set `bind: "lan"` (or `bind: "custom"` with `customBindHost: "0.0.0.0"`) to listen on all interfaces.
2585
+ - **Auth**: required by default. Non-loopback binds require a shared token/password. Onboarding wizard generates a token by default.
2586
+ - If both `gateway.auth.token` and `gateway.auth.password` are configured (including SecretRefs), set `gateway.auth.mode` explicitly to `token` or `password`. Startup and service install/repair flows fail when both are configured and mode is unset.
2587
+ - `gateway.auth.mode: "none"`: explicit no-auth mode. Use only for trusted local loopback setups; this is intentionally not offered by onboarding prompts.
2588
+ - `gateway.auth.mode: "trusted-proxy"`: delegate auth to an identity-aware reverse proxy and trust identity headers from `gateway.trustedProxies` (see [Trusted Proxy Auth](/gateway/trusted-proxy-auth)).
2589
+ - `gateway.auth.allowTailscale`: when `true`, Tailscale Serve identity headers can satisfy Control UI/WebSocket auth (verified via `tailscale whois`); HTTP API endpoints still require token/password auth. This tokenless flow assumes the gateway host is trusted. Defaults to `true` when `tailscale.mode = "serve"`.
2590
+ - `gateway.auth.rateLimit`: optional failed-auth limiter. Applies per client IP and per auth scope (shared-secret and device-token are tracked independently). Blocked attempts return `429` + `Retry-After`.
2591
+ - `gateway.auth.rateLimit.exemptLoopback` defaults to `true`; set `false` when you intentionally want localhost traffic rate-limited too (for test setups or strict proxy deployments).
2592
+ - Browser-origin WS auth attempts are always throttled with loopback exemption disabled (defense-in-depth against browser-based localhost brute force).
2593
+ - `tailscale.mode`: `serve` (tailnet only, loopback bind) or `funnel` (public, requires auth).
2594
+ - `controlUi.allowedOrigins`: explicit browser-origin allowlist for Gateway WebSocket connects. Required when browser clients are expected from non-loopback origins.
2595
+ - `controlUi.dangerouslyAllowHostHeaderOriginFallback`: dangerous mode that enables Host-header origin fallback for deployments that intentionally rely on Host-header origin policy.
2596
+ - `remote.transport`: `ssh` (default) or `direct` (ws/wss). For `direct`, `remote.url` must be `ws://` or `wss://`.
2597
+ - `QUANTUMCLAW_ALLOW_INSECURE_PRIVATE_WS=1`: client-side break-glass override that allows plaintext `ws://` to trusted private-network IPs; default remains loopback-only for plaintext.
2598
+ - `gateway.remote.token` / `.password` are remote-client credential fields. They do not configure gateway auth by themselves.
2599
+ - `gateway.push.apns.relay.baseUrl`: base HTTPS URL for the external APNs relay used by official/TestFlight iOS builds after they publish relay-backed registrations to the gateway. This URL must match the relay URL compiled into the iOS build.
2600
+ - `gateway.push.apns.relay.timeoutMs`: gateway-to-relay send timeout in milliseconds. Defaults to `10000`.
2601
+ - Relay-backed registrations are delegated to a specific gateway identity. The paired iOS app fetches `gateway.identity.get`, includes that identity in the relay registration, and forwards a registration-scoped send grant to the gateway. Another gateway cannot reuse that stored registration.
2602
+ - `QUANTUMCLAW_APNS_RELAY_BASE_URL` / `QUANTUMCLAW_APNS_RELAY_TIMEOUT_MS`: temporary env overrides for the relay config above.
2603
+ - `QUANTUMCLAW_APNS_RELAY_ALLOW_HTTP=true`: development-only escape hatch for loopback HTTP relay URLs. Production relay URLs should stay on HTTPS.
2604
+ - `gateway.channelHealthCheckMinutes`: channel health-monitor interval in minutes. Set `0` to disable health-monitor restarts globally. Default: `5`.
2605
+ - `gateway.channelStaleEventThresholdMinutes`: stale-socket threshold in minutes. Keep this greater than or equal to `gateway.channelHealthCheckMinutes`. Default: `30`.
2606
+ - `gateway.channelMaxRestartsPerHour`: maximum health-monitor restarts per channel/account in a rolling hour. Default: `10`.
2607
+ - `channels.<provider>.healthMonitor.enabled`: per-channel opt-out for health-monitor restarts while keeping the global monitor enabled.
2608
+ - `channels.<provider>.accounts.<accountId>.healthMonitor.enabled`: per-account override for multi-account channels. When set, it takes precedence over the channel-level override.
2609
+ - Local gateway call paths can use `gateway.remote.*` as fallback only when `gateway.auth.*` is unset.
2610
+ - If `gateway.auth.token` / `gateway.auth.password` is explicitly configured via SecretRef and unresolved, resolution fails closed (no remote fallback masking).
2611
+ - `trustedProxies`: reverse proxy IPs that terminate TLS. Only list proxies you control.
2612
+ - `allowRealIpFallback`: when `true`, the gateway accepts `X-Real-IP` if `X-Forwarded-For` is missing. Default `false` for fail-closed behavior.
2613
+ - `gateway.tools.deny`: extra tool names blocked for HTTP `POST /tools/invoke` (extends default deny list).
2614
+ - `gateway.tools.allow`: remove tool names from the default HTTP deny list.
2615
+
2616
+ </Accordion>
2617
+
2618
+ ### OpenAI-compatible endpoints
2619
+
2620
+ - Chat Completions: disabled by default. Enable with `gateway.http.endpoints.chatCompletions.enabled: true`.
2621
+ - Responses API: `gateway.http.endpoints.responses.enabled`.
2622
+ - Responses URL-input hardening:
2623
+ - `gateway.http.endpoints.responses.maxUrlParts`
2624
+ - `gateway.http.endpoints.responses.files.urlAllowlist`
2625
+ - `gateway.http.endpoints.responses.images.urlAllowlist`
2626
+ Empty allowlists are treated as unset; use `gateway.http.endpoints.responses.files.allowUrl=false`
2627
+ and/or `gateway.http.endpoints.responses.images.allowUrl=false` to disable URL fetching.
2628
+ - Optional response hardening header:
2629
+ - `gateway.http.securityHeaders.strictTransportSecurity` (set only for HTTPS origins you control; see [Trusted Proxy Auth](/gateway/trusted-proxy-auth#tls-termination-and-hsts))
2630
+
2631
+ ### Multi-instance isolation
2632
+
2633
+ Run multiple gateways on one host with unique ports and state dirs:
2634
+
2635
+ ```bash
2636
+ QUANTUMCLAW_CONFIG_PATH=~/.quantumclaw/a.json \
2637
+ QUANTUMCLAW_STATE_DIR=~/.quantumclaw-a \
2638
+ quantumclaw gateway --port 19001
2639
+ ```
2640
+
2641
+ Convenience flags: `--dev` (uses `~/.quantumclaw-dev` + port `19001`), `--profile <name>` (uses `~/.quantumclaw-<name>`).
2642
+
2643
+ See [Multiple Gateways](/gateway/multiple-gateways).
2644
+
2645
+ ---
2646
+
2647
+ ## Hooks
2648
+
2649
+ ```json5
2650
+ {
2651
+ hooks: {
2652
+ enabled: true,
2653
+ token: "shared-secret",
2654
+ path: "/hooks",
2655
+ maxBodyBytes: 262144,
2656
+ defaultSessionKey: "hook:ingress",
2657
+ allowRequestSessionKey: false,
2658
+ allowedSessionKeyPrefixes: ["hook:"],
2659
+ allowedAgentIds: ["hooks", "main"],
2660
+ presets: ["gmail"],
2661
+ transformsDir: "~/.quantumclaw/hooks/transforms",
2662
+ mappings: [
2663
+ {
2664
+ match: { path: "gmail" },
2665
+ action: "agent",
2666
+ agentId: "hooks",
2667
+ wakeMode: "now",
2668
+ name: "Gmail",
2669
+ sessionKey: "hook:gmail:{{messages[0].id}}",
2670
+ messageTemplate: "From: {{messages[0].from}}\nSubject: {{messages[0].subject}}\n{{messages[0].snippet}}",
2671
+ deliver: true,
2672
+ channel: "last",
2673
+ model: "openai/gpt-5.2-mini",
2674
+ },
2675
+ ],
2676
+ },
2677
+ }
2678
+ ```
2679
+
2680
+ Auth: `Authorization: Bearer <token>` or `x-quantumclaw-token: <token>`.
2681
+
2682
+ **Endpoints:**
2683
+
2684
+ - `POST /hooks/wake` → `{ text, mode?: "now"|"next-heartbeat" }`
2685
+ - `POST /hooks/agent` → `{ message, name?, agentId?, sessionKey?, wakeMode?, deliver?, channel?, to?, model?, thinking?, timeoutSeconds? }`
2686
+ - `sessionKey` from request payload is accepted only when `hooks.allowRequestSessionKey=true` (default: `false`).
2687
+ - `POST /hooks/<name>` → resolved via `hooks.mappings`
2688
+
2689
+ <Accordion title="Mapping details">
2690
+
2691
+ - `match.path` matches sub-path after `/hooks` (e.g. `/hooks/gmail` → `gmail`).
2692
+ - `match.source` matches a payload field for generic paths.
2693
+ - Templates like `{{messages[0].subject}}` read from the payload.
2694
+ - `transform` can point to a JS/TS module returning a hook action.
2695
+ - `transform.module` must be a relative path and stays within `hooks.transformsDir` (absolute paths and traversal are rejected).
2696
+ - `agentId` routes to a specific agent; unknown IDs fall back to default.
2697
+ - `allowedAgentIds`: restricts explicit routing (`*` or omitted = allow all, `[]` = deny all).
2698
+ - `defaultSessionKey`: optional fixed session key for hook agent runs without explicit `sessionKey`.
2699
+ - `allowRequestSessionKey`: allow `/hooks/agent` callers to set `sessionKey` (default: `false`).
2700
+ - `allowedSessionKeyPrefixes`: optional prefix allowlist for explicit `sessionKey` values (request + mapping), e.g. `["hook:"]`.
2701
+ - `deliver: true` sends final reply to a channel; `channel` defaults to `last`.
2702
+ - `model` overrides LLM for this hook run (must be allowed if model catalog is set).
2703
+
2704
+ </Accordion>
2705
+
2706
+ ### Gmail integration
2707
+
2708
+ ```json5
2709
+ {
2710
+ hooks: {
2711
+ gmail: {
2712
+ account: "quantumclaw@gmail.com",
2713
+ topic: "projects/<project-id>/topics/gog-gmail-watch",
2714
+ subscription: "gog-gmail-watch-push",
2715
+ pushToken: "shared-push-token",
2716
+ hookUrl: "http://127.0.0.1:18789/hooks/gmail",
2717
+ includeBody: true,
2718
+ maxBytes: 20000,
2719
+ renewEveryMinutes: 720,
2720
+ serve: { bind: "127.0.0.1", port: 8788, path: "/" },
2721
+ tailscale: { mode: "funnel", path: "/gmail-pubsub" },
2722
+ model: "openrouter/meta-llama/llama-3.3-70b-instruct:free",
2723
+ thinking: "off",
2724
+ },
2725
+ },
2726
+ }
2727
+ ```
2728
+
2729
+ - Gateway auto-starts `gog gmail watch serve` on boot when configured. Set `QUANTUMCLAW_SKIP_GMAIL_WATCHER=1` to disable.
2730
+ - Don't run a separate `gog gmail watch serve` alongside the Gateway.
2731
+
2732
+ ---
2733
+
2734
+ ## Canvas host
2735
+
2736
+ ```json5
2737
+ {
2738
+ canvasHost: {
2739
+ root: "~/.quantumclaw/workspace/canvas",
2740
+ liveReload: true,
2741
+ // enabled: false, // or QUANTUMCLAW_SKIP_CANVAS_HOST=1
2742
+ },
2743
+ }
2744
+ ```
2745
+
2746
+ - Serves agent-editable HTML/CSS/JS and A2UI over HTTP under the Gateway port:
2747
+ - `http://<gateway-host>:<gateway.port>/__quantumclaw__/canvas/`
2748
+ - `http://<gateway-host>:<gateway.port>/__quantumclaw__/a2ui/`
2749
+ - Local-only: keep `gateway.bind: "loopback"` (default).
2750
+ - Non-loopback binds: canvas routes require Gateway auth (token/password/trusted-proxy), same as other Gateway HTTP surfaces.
2751
+ - Node WebViews typically don't send auth headers; after a node is paired and connected, the Gateway advertises node-scoped capability URLs for canvas/A2UI access.
2752
+ - Capability URLs are bound to the active node WS session and expire quickly. IP-based fallback is not used.
2753
+ - Injects live-reload client into served HTML.
2754
+ - Auto-creates starter `index.html` when empty.
2755
+ - Also serves A2UI at `/__quantumclaw__/a2ui/`.
2756
+ - Changes require a gateway restart.
2757
+ - Disable live reload for large directories or `EMFILE` errors.
2758
+
2759
+ ---
2760
+
2761
+ ## Discovery
2762
+
2763
+ ### mDNS (Bonjour)
2764
+
2765
+ ```json5
2766
+ {
2767
+ discovery: {
2768
+ mdns: {
2769
+ mode: "minimal", // minimal | full | off
2770
+ },
2771
+ },
2772
+ }
2773
+ ```
2774
+
2775
+ - `minimal` (default): omit `cliPath` + `sshPort` from TXT records.
2776
+ - `full`: include `cliPath` + `sshPort`.
2777
+ - Hostname defaults to `quantumclaw`. Override with `QUANTUMCLAW_MDNS_HOSTNAME`.
2778
+
2779
+ ### Wide-area (DNS-SD)
2780
+
2781
+ ```json5
2782
+ {
2783
+ discovery: {
2784
+ wideArea: { enabled: true },
2785
+ },
2786
+ }
2787
+ ```
2788
+
2789
+ Writes a unicast DNS-SD zone under `~/.quantumclaw/dns/`. For cross-network discovery, pair with a DNS server (CoreDNS recommended) + Tailscale split DNS.
2790
+
2791
+ Setup: `quantumclaw dns setup --apply`.
2792
+
2793
+ ---
2794
+
2795
+ ## Environment
2796
+
2797
+ ### `env` (inline env vars)
2798
+
2799
+ ```json5
2800
+ {
2801
+ env: {
2802
+ OPENROUTER_API_KEY: "sk-or-...",
2803
+ vars: {
2804
+ GROQ_API_KEY: "gsk-...",
2805
+ },
2806
+ shellEnv: {
2807
+ enabled: true,
2808
+ timeoutMs: 15000,
2809
+ },
2810
+ },
2811
+ }
2812
+ ```
2813
+
2814
+ - Inline env vars are only applied if the process env is missing the key.
2815
+ - `.env` files: CWD `.env` + `~/.quantumclaw/.env` (neither overrides existing vars).
2816
+ - `shellEnv`: imports missing expected keys from your login shell profile.
2817
+ - See [Environment](/help/environment) for full precedence.
2818
+
2819
+ ### Env var substitution
2820
+
2821
+ Reference env vars in any config string with `${VAR_NAME}`:
2822
+
2823
+ ```json5
2824
+ {
2825
+ gateway: {
2826
+ auth: { token: "${QUANTUMCLAW_GATEWAY_TOKEN}" },
2827
+ },
2828
+ }
2829
+ ```
2830
+
2831
+ - Only uppercase names matched: `[A-Z_][A-Z0-9_]*`.
2832
+ - Missing/empty vars throw an error at config load.
2833
+ - Escape with `$${VAR}` for a literal `${VAR}`.
2834
+ - Works with `$include`.
2835
+
2836
+ ---
2837
+
2838
+ ## Secrets
2839
+
2840
+ Secret refs are additive: plaintext values still work.
2841
+
2842
+ ### `SecretRef`
2843
+
2844
+ Use one object shape:
2845
+
2846
+ ```json5
2847
+ { source: "env" | "file" | "exec", provider: "default", id: "..." }
2848
+ ```
2849
+
2850
+ Validation:
2851
+
2852
+ - `provider` pattern: `^[a-z][a-z0-9_-]{0,63}$`
2853
+ - `source: "env"` id pattern: `^[A-Z][A-Z0-9_]{0,127}$`
2854
+ - `source: "file"` id: absolute JSON pointer (for example `"/providers/openai/apiKey"`)
2855
+ - `source: "exec"` id pattern: `^[A-Za-z0-9][A-Za-z0-9._:/-]{0,255}$`
2856
+ - `source: "exec"` ids must not contain `.` or `..` slash-delimited path segments (for example `a/../b` is rejected)
2857
+
2858
+ ### Supported credential surface
2859
+
2860
+ - Canonical matrix: [SecretRef Credential Surface](/reference/secretref-credential-surface)
2861
+ - `secrets apply` targets supported `quantumclaw.json` credential paths.
2862
+ - `auth-profiles.json` refs are included in runtime resolution and audit coverage.
2863
+
2864
+ ### Secret providers config
2865
+
2866
+ ```json5
2867
+ {
2868
+ secrets: {
2869
+ providers: {
2870
+ default: { source: "env" }, // optional explicit env provider
2871
+ filemain: {
2872
+ source: "file",
2873
+ path: "~/.quantumclaw/secrets.json",
2874
+ mode: "json",
2875
+ timeoutMs: 5000,
2876
+ },
2877
+ vault: {
2878
+ source: "exec",
2879
+ command: "/usr/local/bin/quantumclaw-vault-resolver",
2880
+ passEnv: ["PATH", "VAULT_ADDR"],
2881
+ },
2882
+ },
2883
+ defaults: {
2884
+ env: "default",
2885
+ file: "filemain",
2886
+ exec: "vault",
2887
+ },
2888
+ },
2889
+ }
2890
+ ```
2891
+
2892
+ Notes:
2893
+
2894
+ - `file` provider supports `mode: "json"` and `mode: "singleValue"` (`id` must be `"value"` in singleValue mode).
2895
+ - `exec` provider requires an absolute `command` path and uses protocol payloads on stdin/stdout.
2896
+ - By default, symlink command paths are rejected. Set `allowSymlinkCommand: true` to allow symlink paths while validating the resolved target path.
2897
+ - If `trustedDirs` is configured, the trusted-dir check applies to the resolved target path.
2898
+ - `exec` child environment is minimal by default; pass required variables explicitly with `passEnv`.
2899
+ - Secret refs are resolved at activation time into an in-memory snapshot, then request paths read the snapshot only.
2900
+ - Active-surface filtering applies during activation: unresolved refs on enabled surfaces fail startup/reload, while inactive surfaces are skipped with diagnostics.
2901
+
2902
+ ---
2903
+
2904
+ ## Auth storage
2905
+
2906
+ ```json5
2907
+ {
2908
+ auth: {
2909
+ profiles: {
2910
+ "anthropic:me@example.com": { provider: "anthropic", mode: "oauth", email: "me@example.com" },
2911
+ "anthropic:work": { provider: "anthropic", mode: "api_key" },
2912
+ },
2913
+ order: {
2914
+ anthropic: ["anthropic:me@example.com", "anthropic:work"],
2915
+ },
2916
+ },
2917
+ }
2918
+ ```
2919
+
2920
+ - Per-agent profiles are stored at `<agentDir>/auth-profiles.json`.
2921
+ - `auth-profiles.json` supports value-level refs (`keyRef` for `api_key`, `tokenRef` for `token`).
2922
+ - Static runtime credentials come from in-memory resolved snapshots; legacy static `auth.json` entries are scrubbed when discovered.
2923
+ - Legacy OAuth imports from `~/.quantumclaw/credentials/oauth.json`.
2924
+ - See [OAuth](/concepts/oauth).
2925
+ - Secrets runtime behavior and `audit/configure/apply` tooling: [Secrets Management](/gateway/secrets).
2926
+
2927
+ ---
2928
+
2929
+ ## Logging
2930
+
2931
+ ```json5
2932
+ {
2933
+ logging: {
2934
+ level: "info",
2935
+ file: "/tmp/quantumclaw/quantumclaw.log",
2936
+ consoleLevel: "info",
2937
+ consoleStyle: "pretty", // pretty | compact | json
2938
+ redactSensitive: "tools", // off | tools
2939
+ redactPatterns: ["\\bTOKEN\\b\\s*[=:]\\s*([\"']?)([^\\s\"']+)\\1"],
2940
+ },
2941
+ }
2942
+ ```
2943
+
2944
+ - Default log file: `/tmp/quantumclaw/quantumclaw-YYYY-MM-DD.log`.
2945
+ - Set `logging.file` for a stable path.
2946
+ - `consoleLevel` bumps to `debug` when `--verbose`.
2947
+
2948
+ ---
2949
+
2950
+ ## CLI
2951
+
2952
+ ```json5
2953
+ {
2954
+ cli: {
2955
+ banner: {
2956
+ taglineMode: "off", // random | default | off
2957
+ },
2958
+ },
2959
+ }
2960
+ ```
2961
+
2962
+ - `cli.banner.taglineMode` controls banner tagline style:
2963
+ - `"random"` (default): rotating funny/seasonal taglines.
2964
+ - `"default"`: fixed neutral tagline (`All your chats, one QuantumClaw.`).
2965
+ - `"off"`: no tagline text (banner title/version still shown).
2966
+ - To hide the entire banner (not just taglines), set env `QUANTUMCLAW_HIDE_BANNER=1`.
2967
+
2968
+ ---
2969
+
2970
+ ## Wizard
2971
+
2972
+ Metadata written by CLI guided setup flows (`onboard`, `configure`, `doctor`):
2973
+
2974
+ ```json5
2975
+ {
2976
+ wizard: {
2977
+ lastRunAt: "2026-01-01T00:00:00.000Z",
2978
+ lastRunVersion: "2026.1.4",
2979
+ lastRunCommit: "abc1234",
2980
+ lastRunCommand: "configure",
2981
+ lastRunMode: "local",
2982
+ },
2983
+ }
2984
+ ```
2985
+
2986
+ ---
2987
+
2988
+ ## Identity
2989
+
2990
+ ```json5
2991
+ {
2992
+ agents: {
2993
+ list: [
2994
+ {
2995
+ id: "main",
2996
+ identity: {
2997
+ name: "Samantha",
2998
+ theme: "helpful sloth",
2999
+ emoji: "🦥",
3000
+ avatar: "avatars/samantha.png",
3001
+ },
3002
+ },
3003
+ ],
3004
+ },
3005
+ }
3006
+ ```
3007
+
3008
+ Written by the macOS onboarding assistant. Derives defaults:
3009
+
3010
+ - `messages.ackReaction` from `identity.emoji` (falls back to 👀)
3011
+ - `mentionPatterns` from `identity.name`/`identity.emoji`
3012
+ - `avatar` accepts: workspace-relative path, `http(s)` URL, or `data:` URI
3013
+
3014
+ ---
3015
+
3016
+ ## Bridge (legacy, removed)
3017
+
3018
+ Current builds no longer include the TCP bridge. Nodes connect over the Gateway WebSocket. `bridge.*` keys are no longer part of the config schema (validation fails until removed; `quantumclaw doctor --fix` can strip unknown keys).
3019
+
3020
+ <Accordion title="Legacy bridge config (historical reference)">
3021
+
3022
+ ```json
3023
+ {
3024
+ "bridge": {
3025
+ "enabled": true,
3026
+ "port": 18790,
3027
+ "bind": "tailnet",
3028
+ "tls": {
3029
+ "enabled": true,
3030
+ "autoGenerate": true
3031
+ }
3032
+ }
3033
+ }
3034
+ ```
3035
+
3036
+ </Accordion>
3037
+
3038
+ ---
3039
+
3040
+ ## Cron
3041
+
3042
+ ```json5
3043
+ {
3044
+ cron: {
3045
+ enabled: true,
3046
+ maxConcurrentRuns: 2,
3047
+ webhook: "https://example.invalid/legacy", // deprecated fallback for stored notify:true jobs
3048
+ webhookToken: "replace-with-dedicated-token", // optional bearer token for outbound webhook auth
3049
+ sessionRetention: "24h", // duration string or false
3050
+ runLog: {
3051
+ maxBytes: "2mb", // default 2_000_000 bytes
3052
+ keepLines: 2000, // default 2000
3053
+ },
3054
+ },
3055
+ }
3056
+ ```
3057
+
3058
+ - `sessionRetention`: how long to keep completed isolated cron run sessions before pruning from `sessions.json`. Also controls cleanup of archived deleted cron transcripts. Default: `24h`; set `false` to disable.
3059
+ - `runLog.maxBytes`: max size per run log file (`cron/runs/<jobId>.jsonl`) before pruning. Default: `2_000_000` bytes.
3060
+ - `runLog.keepLines`: newest lines retained when run-log pruning is triggered. Default: `2000`.
3061
+ - `webhookToken`: bearer token used for cron webhook POST delivery (`delivery.mode = "webhook"`), if omitted no auth header is sent.
3062
+ - `webhook`: deprecated legacy fallback webhook URL (http/https) used only for stored jobs that still have `notify: true`.
3063
+
3064
+ See [Cron Jobs](/automation/cron-jobs).
3065
+
3066
+ ---
3067
+
3068
+ ## Media model template variables
3069
+
3070
+ Template placeholders expanded in `tools.media.models[].args`:
3071
+
3072
+ | Variable | Description |
3073
+ | ------------------ | ------------------------------------------------- |
3074
+ | `{{Body}}` | Full inbound message body |
3075
+ | `{{RawBody}}` | Raw body (no history/sender wrappers) |
3076
+ | `{{BodyStripped}}` | Body with group mentions stripped |
3077
+ | `{{From}}` | Sender identifier |
3078
+ | `{{To}}` | Destination identifier |
3079
+ | `{{MessageSid}}` | Channel message id |
3080
+ | `{{SessionId}}` | Current session UUID |
3081
+ | `{{IsNewSession}}` | `"true"` when new session created |
3082
+ | `{{MediaUrl}}` | Inbound media pseudo-URL |
3083
+ | `{{MediaPath}}` | Local media path |
3084
+ | `{{MediaType}}` | Media type (image/audio/document/…) |
3085
+ | `{{Transcript}}` | Audio transcript |
3086
+ | `{{Prompt}}` | Resolved media prompt for CLI entries |
3087
+ | `{{MaxChars}}` | Resolved max output chars for CLI entries |
3088
+ | `{{ChatType}}` | `"direct"` or `"group"` |
3089
+ | `{{GroupSubject}}` | Group subject (best effort) |
3090
+ | `{{GroupMembers}}` | Group members preview (best effort) |
3091
+ | `{{SenderName}}` | Sender display name (best effort) |
3092
+ | `{{SenderE164}}` | Sender phone number (best effort) |
3093
+ | `{{Provider}}` | Provider hint (whatsapp, telegram, discord, etc.) |
3094
+
3095
+ ---
3096
+
3097
+ ## Config includes (`$include`)
3098
+
3099
+ Split config into multiple files:
3100
+
3101
+ ```json5
3102
+ // ~/.quantumclaw/quantumclaw.json
3103
+ {
3104
+ gateway: { port: 18789 },
3105
+ agents: { $include: "./agents.json5" },
3106
+ broadcast: {
3107
+ $include: ["./clients/mueller.json5", "./clients/schmidt.json5"],
3108
+ },
3109
+ }
3110
+ ```
3111
+
3112
+ **Merge behavior:**
3113
+
3114
+ - Single file: replaces the containing object.
3115
+ - Array of files: deep-merged in order (later overrides earlier).
3116
+ - Sibling keys: merged after includes (override included values).
3117
+ - Nested includes: up to 10 levels deep.
3118
+ - Paths: resolved relative to the including file, but must stay inside the top-level config directory (`dirname` of `quantumclaw.json`). Absolute/`../` forms are allowed only when they still resolve inside that boundary.
3119
+ - Errors: clear messages for missing files, parse errors, and circular includes.
3120
+
3121
+ ---
3122
+
3123
+ _Related: [Configuration](/gateway/configuration) · [Configuration Examples](/gateway/configuration-examples) · [Doctor](/gateway/doctor)_