{"id":124,"date":"2026-03-21T22:47:18","date_gmt":"2026-03-21T14:47:18","guid":{"rendered":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-doctor\/"},"modified":"2026-03-21T23:29:04","modified_gmt":"2026-03-21T15:29:04","slug":"gateway-doctor","status":"publish","type":"post","link":"https:\/\/pa.yingzhi8.cn\/index.php\/2026\/03\/21\/gateway-doctor\/","title":{"rendered":"Doctor"},"content":{"rendered":"<h1>Doctor<\/h1>\n<p><code>openclaw doctor<\/code> \u662f OpenClaw \u7684\u4fee\u590d + \u8fc1\u79fb\u5de5\u5177\u3002\u5b83\u4fee\u590d\u8fc7\u65f6\u7684\u914d\u7f6e\/\u72b6\u6001\uff0c\u68c0\u67e5\u5065\u5eb7\u72b6\u51b5\uff0c\u5e76\u63d0\u4f9b\u53ef\u64cd\u4f5c\u7684\u4fee\u590d\u6b65\u9aa4\u3002<\/p>\n<h2>\u5feb\u901f\u5f00\u59cb<\/h2>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw doctor<\/p>\n<pre><code>\n### \u65e0\u5934\/\u81ea\u52a8\u5316\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw doctor --yes\n<\/code><\/pre>\n<p>\u65e0\u9700\u63d0\u793a\u63a5\u53d7\u9ed8\u8ba4\u503c\uff08\u5305\u62ec\u9002\u7528\u65f6\u7684\u91cd\u542f\/\u670d\u52a1\/\u6c99\u7bb1\u4fee\u590d\u6b65\u9aa4\uff09\u3002<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw doctor &#8211;repair<\/p>\n<pre><code>\n\u65e0\u9700\u63d0\u793a\u5e94\u7528\u63a8\u8350\u7684\u4fee\u590d\uff08\u5b89\u5168\u65f6\u8fdb\u884c\u4fee\u590d + \u91cd\u542f\uff09\u3002\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw doctor --repair --force\n<\/code><\/pre>\n<p>\u4e5f\u5e94\u7528\u6fc0\u8fdb\u7684\u4fee\u590d\uff08\u8986\u76d6\u81ea\u5b9a\u4e49 supervisor \u914d\u7f6e\uff09\u3002<\/p>\n<p>&#8220;`bash  theme={&#8220;theme&#8221;:{&#8220;light&#8221;:&#8221;min-light&#8221;,&#8221;dark&#8221;:&#8221;min-dark&#8221;}}<br \/>\nopenclaw doctor &#8211;non-interactive<\/p>\n<pre><code>\n\u65e0\u9700\u63d0\u793a\u8fd0\u884c\uff0c\u4ec5\u5e94\u7528\u5b89\u5168\u8fc1\u79fb\uff08\u914d\u7f6e\u89c4\u8303\u5316 + \u78c1\u76d8\u72b6\u6001\u79fb\u52a8\uff09\u3002\u8df3\u8fc7\u9700\u8981\u4eba\u5de5\u786e\u8ba4\u7684\u91cd\u542f\/\u670d\u52a1\/\u6c99\u7bb1\u64cd\u4f5c\u3002\n\u68c0\u6d4b\u5230\u65f6\u81ea\u52a8\u8fd0\u884c\u9057\u7559\u72b6\u6001\u8fc1\u79fb\u3002\n\n```bash  theme={&quot;theme&quot;:{&quot;light&quot;:&quot;min-light&quot;,&quot;dark&quot;:&quot;min-dark&quot;}}\nopenclaw doctor --deep\n<\/code><\/pre>\n<p>\u626b\u63cf\u7cfb\u7edf\u670d\u52a1\u4ee5\u67e5\u627e\u989d\u5916\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u5b89\u88c5\uff08launchd\/systemd\/schtasks\uff09\u3002<\/p>\n<p>\u5982\u679c\u4f60\u60f3\u5728\u5199\u5165\u524d\u67e5\u770b\u66f4\u6539\uff0c\u8bf7\u5148\u6253\u5f00\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<p><code>bash  theme={\"theme\":{\"light\":\"min-light\",\"dark\":\"min-dark\"}}<br \/>\ncat ~\/.openclaw\/openclaw.json<\/code><\/p>\n<h2>\u529f\u80fd\u6982\u8ff0<\/h2>\n<ul>\n<li>git \u5b89\u88c5\u7684\u53ef\u9009\u9884\u68c0\u66f4\u65b0\uff08\u4ec5\u4ea4\u4e92\u6a21\u5f0f\uff09\u3002<\/li>\n<li>UI \u534f\u8bae\u65b0\u9c9c\u5ea6\u68c0\u67e5\uff08\u5f53\u534f\u8bae schema \u8f83\u65b0\u65f6\u91cd\u5efa Control UI\uff09\u3002<\/li>\n<li>\u5065\u5eb7\u68c0\u67e5 + \u91cd\u542f\u63d0\u793a\u3002<\/li>\n<li>Skills \u72b6\u6001\u6458\u8981\uff08\u7b26\u5408\u6761\u4ef6\/\u7f3a\u5931\/\u88ab\u963b\u6b62\uff09\u3002<\/li>\n<li>\u9057\u7559\u503c\u7684\u914d\u7f6e\u89c4\u8303\u5316\u3002<\/li>\n<li>OpenCode Zen \u63d0\u4f9b\u5546\u8986\u76d6\u8b66\u544a\uff08<code>models.providers.opencode<\/code>\uff09\u3002<\/li>\n<li>\u9057\u7559\u78c1\u76d8\u72b6\u6001\u8fc1\u79fb\uff08\u4f1a\u8bdd\/\u667a\u80fd\u4f53\u76ee\u5f55\/WhatsApp \u8ba4\u8bc1\uff09\u3002<\/li>\n<li>\u72b6\u6001\u5b8c\u6574\u6027\u548c\u6743\u9650\u68c0\u67e5\uff08\u4f1a\u8bdd\u3001\u8bb0\u5f55\u3001\u72b6\u6001\u76ee\u5f55\uff09\u3002<\/li>\n<li>\u672c\u5730\u8fd0\u884c\u65f6\u7684\u914d\u7f6e\u6587\u4ef6\u6743\u9650\u68c0\u67e5\uff08chmod 600\uff09\u3002<\/li>\n<li>\u6a21\u578b\u8ba4\u8bc1\u5065\u5eb7\uff1a\u68c0\u67e5 OAuth \u8fc7\u671f\uff0c\u53ef\u5237\u65b0\u5373\u5c06\u8fc7\u671f\u7684 token\uff0c\u5e76\u62a5\u544a\u8ba4\u8bc1\u914d\u7f6e\u6587\u4ef6\u51b7\u5374\/\u7981\u7528\u72b6\u6001\u3002<\/li>\n<li>\u989d\u5916\u5de5\u4f5c\u533a\u76ee\u5f55\u68c0\u6d4b\uff08<code>~\/openclaw<\/code>\uff09\u3002<\/li>\n<li>\u542f\u7528\u6c99\u7bb1\u9694\u79bb\u65f6\u7684\u6c99\u7bb1\u955c\u50cf\u4fee\u590d\u3002<\/li>\n<li>\u9057\u7559\u670d\u52a1\u8fc1\u79fb\u548c\u989d\u5916 Gateway \u7f51\u5173 \u7f51\u5173\u68c0\u6d4b\u3002<\/li>\n<li>Gateway \u7f51\u5173 \u7f51\u5173\u8fd0\u884c\u65f6\u68c0\u67e5\uff08\u670d\u52a1\u5df2\u5b89\u88c5\u4f46\u672a\u8fd0\u884c\uff1b\u7f13\u5b58\u7684 launchd \u6807\u7b7e\uff09\u3002<\/li>\n<li>\u6e20\u9053\u72b6\u6001\u8b66\u544a\uff08\u4ece\u8fd0\u884c\u4e2d\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u63a2\u6d4b\uff09\u3002<\/li>\n<li>Supervisor \u914d\u7f6e\u5ba1\u8ba1\uff08launchd\/systemd\/schtasks\uff09\u53ca\u53ef\u9009\u4fee\u590d\u3002<\/li>\n<li>Gateway \u7f51\u5173 \u7f51\u5173\u8fd0\u884c\u65f6\u6700\u4f73\u5b9e\u8df5\u68c0\u67e5\uff08Node vs Bun\uff0c\u7248\u672c\u7ba1\u7406\u5668\u8def\u5f84\uff09\u3002<\/li>\n<li>Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u53e3\u51b2\u7a81\u8bca\u65ad\uff08\u9ed8\u8ba4 <code>18789<\/code>\uff09\u3002<\/li>\n<li>\u5f00\u653e\u79c1\u4fe1\u7b56\u7565\u7684\u5b89\u5168\u8b66\u544a\u3002<\/li>\n<li>\u672a\u8bbe\u7f6e <code>gateway.auth.token<\/code> \u65f6\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u8ba4\u8bc1\u8b66\u544a\uff08\u672c\u5730\u6a21\u5f0f\uff1b\u63d0\u4f9b token \u751f\u6210\uff09\u3002<\/li>\n<li>Linux \u4e0a\u7684 systemd linger \u68c0\u67e5\u3002<\/li>\n<li>\u6e90\u7801\u5b89\u88c5\u68c0\u67e5\uff08pnpm workspace \u4e0d\u5339\u914d\u3001\u7f3a\u5931 UI \u8d44\u4ea7\u3001\u7f3a\u5931 tsx \u4e8c\u8fdb\u5236\u6587\u4ef6\uff09\u3002<\/li>\n<li>\u5199\u5165\u66f4\u65b0\u540e\u7684\u914d\u7f6e + \u5411\u5bfc\u5143\u6570\u636e\u3002<\/li>\n<\/ul>\n<h2>\u8be6\u7ec6\u884c\u4e3a\u548c\u539f\u7406<\/h2>\n<h3>0\uff09\u53ef\u9009\u66f4\u65b0\uff08git \u5b89\u88c5\uff09<\/h3>\n<p>\u5982\u679c\u8fd9\u662f git \u68c0\u51fa\u4e14 doctor \u4ee5\u4ea4\u4e92\u6a21\u5f0f\u8fd0\u884c\uff0c\u5b83\u4f1a\u5728\u8fd0\u884c doctor \u4e4b\u524d\u63d0\u4f9b\u66f4\u65b0\uff08fetch\/rebase\/build\uff09\u3002<\/p>\n<h3>1\uff09\u914d\u7f6e\u89c4\u8303\u5316<\/h3>\n<p>\u5982\u679c\u914d\u7f6e\u5305\u542b\u9057\u7559\u503c\u5f62\u5f0f\uff08\u4f8b\u5982\u6ca1\u6709\u6e20\u9053\u7279\u5b9a\u8986\u76d6\u7684 <code>messages.ackReaction<\/code>\uff09\uff0cdoctor \u4f1a\u5c06\u5b83\u4eec\u89c4\u8303\u5316\u4e3a\u5f53\u524d schema\u3002<\/p>\n<h3>2\uff09\u9057\u7559\u914d\u7f6e\u952e\u8fc1\u79fb<\/h3>\n<p>\u5f53\u914d\u7f6e\u5305\u542b\u5df2\u5f03\u7528\u7684\u952e\u65f6\uff0c\u5176\u4ed6\u547d\u4ee4\u4f1a\u62d2\u7edd\u8fd0\u884c\u5e76\u8981\u6c42\u4f60\u8fd0\u884c <code>openclaw doctor<\/code>\u3002<\/p>\n<p>Doctor \u5c06\uff1a<\/p>\n<ul>\n<li>\u89e3\u91ca\u627e\u5230\u4e86\u54ea\u4e9b\u9057\u7559\u952e\u3002<\/li>\n<li>\u663e\u793a\u5b83\u5e94\u7528\u7684\u8fc1\u79fb\u3002<\/li>\n<li>\u4f7f\u7528\u66f4\u65b0\u540e\u7684 schema \u91cd\u5199 <code>~\/.openclaw\/openclaw.json<\/code>\u3002<\/li>\n<\/ul>\n<p>Gateway \u7f51\u5173 \u7f51\u5173\u5728\u68c0\u6d4b\u5230\u9057\u7559\u914d\u7f6e\u683c\u5f0f\u65f6\u4e5f\u4f1a\u5728\u542f\u52a8\u65f6\u81ea\u52a8\u8fd0\u884c doctor \u8fc1\u79fb\uff0c\u56e0\u6b64\u8fc7\u65f6\u7684\u914d\u7f6e\u65e0\u9700\u624b\u52a8\u5e72\u9884\u5373\u53ef\u4fee\u590d\u3002<\/p>\n<p>\u5f53\u524d\u8fc1\u79fb\uff1a<\/p>\n<ul>\n<li><code>routing.allowFrom<\/code> \u2192 <code>channels.whatsapp.allowFrom<\/code><\/li>\n<li><code>routing.groupChat.requireMention<\/code> \u2192 <code>channels.whatsapp\/telegram\/imessage.groups.\"*\".requireMention<\/code><\/li>\n<li><code>routing.groupChat.historyLimit<\/code> \u2192 <code>messages.groupChat.historyLimit<\/code><\/li>\n<li><code>routing.groupChat.mentionPatterns<\/code> \u2192 <code>messages.groupChat.mentionPatterns<\/code><\/li>\n<li><code>routing.queue<\/code> \u2192 <code>messages.queue<\/code><\/li>\n<li><code>routing.bindings<\/code> \u2192 \u9876\u7ea7 <code>bindings<\/code><\/li>\n<li><code>routing.agents<\/code>\/<code>routing.defaultAgentId<\/code> \u2192 <code>agents.list<\/code> + <code>agents.list[].default<\/code><\/li>\n<li><code>routing.agentToAgent<\/code> \u2192 <code>tools.agentToAgent<\/code><\/li>\n<li><code>routing.transcribeAudio<\/code> \u2192 <code>tools.media.audio.models<\/code><\/li>\n<li><code>bindings[].match.accountID<\/code> \u2192 <code>bindings[].match.accountId<\/code><\/li>\n<li><code>identity<\/code> \u2192 <code>agents.list[].identity<\/code><\/li>\n<li><code>agent.*<\/code> \u2192 <code>agents.defaults<\/code> + <code>tools.*<\/code>\uff08tools\/elevated\/exec\/sandbox\/subagents\uff09<\/li>\n<li><code>agent.model<\/code>\/<code>allowedModels<\/code>\/<code>modelAliases<\/code>\/<code>modelFallbacks<\/code>\/<code>imageModelFallbacks<\/code><br \/>\n  \u2192 <code>agents.defaults.models<\/code> + <code>agents.defaults.model.primary\/fallbacks<\/code> + <code>agents.defaults.imageModel.primary\/fallbacks<\/code><\/li>\n<\/ul>\n<h3>2b\uff09OpenCode Zen \u63d0\u4f9b\u5546\u8986\u76d6<\/h3>\n<p>\u5982\u679c\u4f60\u624b\u52a8\u6dfb\u52a0\u4e86 <code>models.providers.opencode<\/code>\uff08\u6216 <code>opencode-zen<\/code>\uff09\uff0c\u5b83\u4f1a\u8986\u76d6 <code>@mariozechner\/pi-ai<\/code> \u4e2d\u5185\u7f6e\u7684 OpenCode Zen \u76ee\u5f55\u3002\u8fd9\u53ef\u80fd\u4f1a\u5f3a\u5236\u5c06\u6bcf\u4e2a\u6a21\u578b\u653e\u5230\u5355\u4e2a API \u4e0a\u6216\u5c06\u6210\u672c\u5f52\u96f6\u3002Doctor \u4f1a\u53d1\u51fa\u8b66\u544a\uff0c\u4ee5\u4fbf\u4f60\u53ef\u4ee5\u79fb\u9664\u8986\u76d6\u5e76\u6062\u590d\u6bcf\u6a21\u578b API \u8def\u7531 + \u6210\u672c\u3002<\/p>\n<h3>3\uff09\u9057\u7559\u72b6\u6001\u8fc1\u79fb\uff08\u78c1\u76d8\u5e03\u5c40\uff09<\/h3>\n<p>Doctor \u53ef\u4ee5\u5c06\u65e7\u7684\u78c1\u76d8\u5e03\u5c40\u8fc1\u79fb\u5230\u5f53\u524d\u7ed3\u6784\uff1a<\/p>\n<ul>\n<li>\u4f1a\u8bdd\u5b58\u50a8 + \u8bb0\u5f55\uff1a<\/li>\n<li>\u4ece <code>~\/.openclaw\/sessions\/<\/code> \u5230 <code>~\/.openclaw\/agents\/&lt;agentId&gt;\/sessions\/<\/code><\/li>\n<li>\u667a\u80fd\u4f53\u76ee\u5f55\uff1a<\/li>\n<li>\u4ece <code>~\/.openclaw\/agent\/<\/code> \u5230 <code>~\/.openclaw\/agents\/&lt;agentId&gt;\/agent\/<\/code><\/li>\n<li>WhatsApp \u8ba4\u8bc1\u72b6\u6001\uff08Baileys\uff09\uff1a<\/li>\n<li>\u4ece\u9057\u7559\u7684 <code>~\/.openclaw\/credentials\/*.json<\/code>\uff08\u9664 <code>oauth.json<\/code> \u5916\uff09<\/li>\n<li>\u5230 <code>~\/.openclaw\/credentials\/whatsapp\/&lt;accountId&gt;\/...<\/code>\uff08\u9ed8\u8ba4\u8d26\u6237 id\uff1a<code>default<\/code>\uff09<\/li>\n<\/ul>\n<p>\u8fd9\u4e9b\u8fc1\u79fb\u662f\u5c3d\u529b\u800c\u4e3a\u4e14\u5e42\u7b49\u7684\uff1b\u5f53 doctor \u5c06\u4efb\u4f55\u9057\u7559\u6587\u4ef6\u5939\u4f5c\u4e3a\u5907\u4efd\u4fdd\u7559\u65f6\u4f1a\u53d1\u51fa\u8b66\u544a\u3002Gateway \u7f51\u5173 \u7f51\u5173\/CLI \u4e5f\u4f1a\u5728\u542f\u52a8\u65f6\u81ea\u52a8\u8fc1\u79fb\u9057\u7559\u4f1a\u8bdd + \u667a\u80fd\u4f53\u76ee\u5f55\uff0c\u56e0\u6b64\u5386\u53f2\/\u8ba4\u8bc1\/\u6a21\u578b\u4f1a\u843d\u5728\u6bcf\u667a\u80fd\u4f53\u8def\u5f84\u4e2d\uff0c\u65e0\u9700\u624b\u52a8\u8fd0\u884c doctor\u3002WhatsApp \u8ba4\u8bc1\u6709\u610f\u4ec5\u901a\u8fc7 <code>openclaw doctor<\/code> \u8fc1\u79fb\u3002<\/p>\n<h3>4\uff09\u72b6\u6001\u5b8c\u6574\u6027\u68c0\u67e5\uff08\u4f1a\u8bdd\u6301\u4e45\u5316\u3001\u8def\u7531\u548c\u5b89\u5168\uff09<\/h3>\n<p>\u72b6\u6001\u76ee\u5f55\u662f\u64cd\u4f5c\u7684\u6838\u5fc3\u3002\u5982\u679c\u5b83\u6d88\u5931\uff0c\u4f60\u4f1a\u4e22\u5931\u4f1a\u8bdd\u3001\u51ed\u8bc1\u3001\u65e5\u5fd7\u548c\u914d\u7f6e\uff08\u9664\u975e\u4f60\u5728\u522b\u5904\u6709\u5907\u4efd\uff09\u3002<\/p>\n<p>Doctor \u68c0\u67e5\uff1a<\/p>\n<ul>\n<li><strong>\u72b6\u6001\u76ee\u5f55\u7f3a\u5931<\/strong>\uff1a\u8b66\u544a\u707e\u96be\u6027\u72b6\u6001\u4e22\u5931\uff0c\u63d0\u793a\u91cd\u65b0\u521b\u5efa\u76ee\u5f55\uff0c\u5e76\u63d0\u9192\u4f60\u5b83\u65e0\u6cd5\u6062\u590d\u4e22\u5931\u7684\u6570\u636e\u3002<\/li>\n<li><strong>\u72b6\u6001\u76ee\u5f55\u6743\u9650<\/strong>\uff1a\u9a8c\u8bc1\u53ef\u5199\u6027\uff1b\u63d0\u4f9b\u4fee\u590d\u6743\u9650\uff08\u5e76\u5728\u68c0\u6d4b\u5230\u6240\u6709\u8005\/\u7ec4\u4e0d\u5339\u914d\u65f6\u53d1\u51fa <code>chown<\/code> \u63d0\u793a\uff09\u3002<\/li>\n<li><strong>\u4f1a\u8bdd\u76ee\u5f55\u7f3a\u5931<\/strong>\uff1a<code>sessions\/<\/code> \u548c\u4f1a\u8bdd\u5b58\u50a8\u76ee\u5f55\u662f\u6301\u4e45\u5316\u5386\u53f2\u548c\u907f\u514d <code>ENOENT<\/code> \u5d29\u6e83\u6240\u5fc5\u9700\u7684\u3002<\/li>\n<li><strong>\u8bb0\u5f55\u4e0d\u5339\u914d<\/strong>\uff1a\u5f53\u6700\u8fd1\u7684\u4f1a\u8bdd\u6761\u76ee\u7f3a\u5c11\u8bb0\u5f55\u6587\u4ef6\u65f6\u53d1\u51fa\u8b66\u544a\u3002<\/li>\n<li><strong>\u4e3b\u4f1a\u8bdd&#8221;1 \u884c JSONL&#8221;<\/strong>\uff1a\u5f53\u4e3b\u8bb0\u5f55\u53ea\u6709\u4e00\u884c\u65f6\u6807\u8bb0\uff08\u5386\u53f2\u672a\u7d2f\u79ef\uff09\u3002<\/li>\n<li><strong>\u591a\u4e2a\u72b6\u6001\u76ee\u5f55<\/strong>\uff1a\u5f53\u591a\u4e2a <code>~\/.openclaw<\/code> \u6587\u4ef6\u5939\u5b58\u5728\u4e8e\u4e0d\u540c home \u76ee\u5f55\u6216\u5f53 <code>OPENCLAW_STATE_DIR<\/code> \u6307\u5411\u522b\u5904\u65f6\u53d1\u51fa\u8b66\u544a\uff08\u5386\u53f2\u53ef\u80fd\u5728\u5b89\u88c5\u4e4b\u95f4\u5206\u88c2\uff09\u3002<\/li>\n<li><strong>\u8fdc\u7a0b\u6a21\u5f0f\u63d0\u9192<\/strong>\uff1a\u5982\u679c <code>gateway.mode=remote<\/code>\uff0cdoctor \u4f1a\u63d0\u9192\u4f60\u5728\u8fdc\u7a0b\u4e3b\u673a\u4e0a\u8fd0\u884c\u5b83\uff08\u72b6\u6001\u5728\u90a3\u91cc\uff09\u3002<\/li>\n<li><strong>\u914d\u7f6e\u6587\u4ef6\u6743\u9650<\/strong>\uff1a\u5f53 <code>~\/.openclaw\/openclaw.json<\/code> \u5bf9\u7ec4\/\u5176\u4ed6\u7528\u6237\u53ef\u8bfb\u65f6\u53d1\u51fa\u8b66\u544a\uff0c\u5e76\u63d0\u4f9b\u6536\u7d27\u5230 <code>600<\/code> \u7684\u9009\u9879\u3002<\/li>\n<\/ul>\n<h3>5\uff09\u6a21\u578b\u8ba4\u8bc1\u5065\u5eb7\uff08OAuth \u8fc7\u671f\uff09<\/h3>\n<p>Doctor \u68c0\u67e5\u8ba4\u8bc1\u5b58\u50a8\u4e2d\u7684 OAuth \u914d\u7f6e\u6587\u4ef6\uff0c\u5728 token \u5373\u5c06\u8fc7\u671f\/\u5df2\u8fc7\u671f\u65f6\u53d1\u51fa\u8b66\u544a\uff0c\u5e76\u5728\u5b89\u5168\u65f6\u5237\u65b0\u5b83\u4eec\u3002\u5982\u679c Anthropic Claude Code \u914d\u7f6e\u6587\u4ef6\u8fc7\u65f6\uff0c\u5b83\u4f1a\u5efa\u8bae\u8fd0\u884c <code>claude setup-token<\/code>\uff08\u6216\u7c98\u8d34 setup-token\uff09\u3002<br \/>\n\u5237\u65b0\u63d0\u793a\u4ec5\u5728\u4ea4\u4e92\u8fd0\u884c\uff08TTY\uff09\u65f6\u51fa\u73b0\uff1b<code>--non-interactive<\/code> \u8df3\u8fc7\u5237\u65b0\u5c1d\u8bd5\u3002<\/p>\n<p>Doctor \u8fd8\u4f1a\u62a5\u544a\u7531\u4e8e\u4ee5\u4e0b\u539f\u56e0\u6682\u65f6\u4e0d\u53ef\u7528\u7684\u8ba4\u8bc1\u914d\u7f6e\u6587\u4ef6\uff1a<\/p>\n<ul>\n<li>\u77ed\u51b7\u5374\uff08\u901f\u7387\u9650\u5236\/\u8d85\u65f6\/\u8ba4\u8bc1\u5931\u8d25\uff09<\/li>\n<li>\u957f\u7981\u7528\uff08\u8d26\u5355\/\u4fe1\u7528\u5931\u8d25\uff09<\/li>\n<\/ul>\n<h3>6\uff09Hooks \u6a21\u578b\u9a8c\u8bc1<\/h3>\n<p>\u5982\u679c\u8bbe\u7f6e\u4e86 <code>hooks.gmail.model<\/code>\uff0cdoctor \u4f1a\u6839\u636e\u76ee\u5f55\u548c\u5141\u8bb8\u5217\u8868\u9a8c\u8bc1\u6a21\u578b\u5f15\u7528\uff0c\u5e76\u5728\u65e0\u6cd5\u89e3\u6790\u6216\u4e0d\u5141\u8bb8\u65f6\u53d1\u51fa\u8b66\u544a\u3002<\/p>\n<h3>7\uff09\u6c99\u7bb1\u955c\u50cf\u4fee\u590d<\/h3>\n<p>\u5f53\u542f\u7528\u6c99\u7bb1\u9694\u79bb\u65f6\uff0cdoctor \u68c0\u67e5 Docker \u955c\u50cf\uff0c\u5e76\u5728\u5f53\u524d\u955c\u50cf\u7f3a\u5931\u65f6\u63d0\u4f9b\u6784\u5efa\u6216\u5207\u6362\u5230\u9057\u7559\u540d\u79f0\u7684\u9009\u9879\u3002<\/p>\n<h3>8\uff09Gateway \u7f51\u5173 \u7f51\u5173\u670d\u52a1\u8fc1\u79fb\u548c\u6e05\u7406\u63d0\u793a<\/h3>\n<p>Doctor \u68c0\u6d4b\u9057\u7559\u7684 Gateway \u7f51\u5173 \u7f51\u5173\u670d\u52a1\uff08launchd\/systemd\/schtasks\uff09\uff0c\u5e76\u63d0\u4f9b\u5220\u9664\u5b83\u4eec\u5e76\u4f7f\u7528\u5f53\u524d Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u53e3\u5b89\u88c5 OpenClaw \u670d\u52a1\u7684\u9009\u9879\u3002\u5b83\u8fd8\u53ef\u4ee5\u626b\u63cf\u989d\u5916\u7684\u7c7b Gateway \u7f51\u5173 \u7f51\u5173\u670d\u52a1\u5e76\u6253\u5370\u6e05\u7406\u63d0\u793a\u3002<br \/>\n\u914d\u7f6e\u6587\u4ef6\u547d\u540d\u7684 OpenClaw Gateway \u7f51\u5173 \u7f51\u5173\u670d\u52a1\u88ab\u89c6\u4e3a\u4e00\u7b49\u516c\u6c11\uff0c\u4e0d\u4f1a\u88ab\u6807\u8bb0\u4e3a&#8221;\u989d\u5916\u7684&#8221;\u3002<\/p>\n<h3>9\uff09\u5b89\u5168\u8b66\u544a<\/h3>\n<p>\u5f53\u63d0\u4f9b\u5546\u5bf9\u79c1\u4fe1\u5f00\u653e\u800c\u6ca1\u6709\u5141\u8bb8\u5217\u8868\uff0c\u6216\u5f53\u7b56\u7565\u4ee5\u5371\u9669\u65b9\u5f0f\u914d\u7f6e\u65f6\uff0cDoctor \u4f1a\u53d1\u51fa\u8b66\u544a\u3002<\/p>\n<h3>10\uff09systemd linger\uff08Linux\uff09<\/h3>\n<p>\u5982\u679c\u4f5c\u4e3a systemd \u7528\u6237\u670d\u52a1\u8fd0\u884c\uff0cdoctor \u8bf7\u786e\u4fdd\u542f\u7528 lingering\uff0c\u4ee5\u4fbf Gateway \u7f51\u5173 \u7f51\u5173\u5728\u6ce8\u9500\u540e\u4fdd\u6301\u6d3b\u52a8\u3002<\/p>\n<h3>11\uff09Skills \u72b6\u6001<\/h3>\n<p>Doctor \u6253\u5370\u5f53\u524d\u5de5\u4f5c\u533a\u7b26\u5408\u6761\u4ef6\/\u7f3a\u5931\/\u88ab\u963b\u6b62\u7684 Skills \u7684\u5feb\u901f\u6458\u8981\u3002<\/p>\n<h3>12\uff09Gateway \u7f51\u5173 \u7f51\u5173\u8ba4\u8bc1\u68c0\u67e5\uff08\u672c\u5730 token\uff09<\/h3>\n<p>\u5f53\u672c\u5730 Gateway \u7f51\u5173 \u7f51\u5173\u7f3a\u5c11 <code>gateway.auth<\/code> \u65f6\uff0cDoctor \u4f1a\u53d1\u51fa\u8b66\u544a\u5e76\u63d0\u4f9b\u751f\u6210 token \u7684\u9009\u9879\u3002\u4f7f\u7528 <code>openclaw doctor --generate-gateway-token<\/code> \u5728\u81ea\u52a8\u5316\u4e2d\u5f3a\u5236\u521b\u5efa token\u3002<\/p>\n<h3>13\uff09Gateway \u7f51\u5173 \u7f51\u5173\u5065\u5eb7\u68c0\u67e5 + \u91cd\u542f<\/h3>\n<p>Doctor \u8fd0\u884c\u5065\u5eb7\u68c0\u67e5\uff0c\u5e76\u5728 Gateway \u7f51\u5173 \u7f51\u5173\u770b\u8d77\u6765\u4e0d\u5065\u5eb7\u65f6\u63d0\u4f9b\u91cd\u542f\u9009\u9879\u3002<\/p>\n<h3>14\uff09\u6e20\u9053\u72b6\u6001\u8b66\u544a<\/h3>\n<p>\u5982\u679c Gateway \u7f51\u5173 \u7f51\u5173\u5065\u5eb7\uff0cdoctor \u8fd0\u884c\u6e20\u9053\u72b6\u6001\u63a2\u6d4b\u5e76\u62a5\u544a\u8b66\u544a\u53ca\u5efa\u8bae\u7684\u4fee\u590d\u3002<\/p>\n<h3>15\uff09Supervisor \u914d\u7f6e\u5ba1\u8ba1 + \u4fee\u590d<\/h3>\n<p>Doctor \u68c0\u67e5\u5df2\u5b89\u88c5\u7684 supervisor \u914d\u7f6e\uff08launchd\/systemd\/schtasks\uff09\u662f\u5426\u6709\u7f3a\u5931\u6216\u8fc7\u65f6\u7684\u9ed8\u8ba4\u503c\uff08\u4f8b\u5982 systemd network-online \u4f9d\u8d56\u548c\u91cd\u542f\u5ef6\u8fdf\uff09\u3002\u5f53\u53d1\u73b0\u4e0d\u5339\u914d\u65f6\uff0c\u5b83\u4f1a\u63a8\u8350\u66f4\u65b0\uff0c\u5e76\u53ef\u4ee5\u5c06\u670d\u52a1\u6587\u4ef6\/\u4efb\u52a1\u91cd\u5199\u4e3a\u5f53\u524d\u9ed8\u8ba4\u503c\u3002<\/p>\n<p>\u6ce8\u610f\u4e8b\u9879\uff1a<\/p>\n<ul>\n<li><code>openclaw doctor<\/code> \u5728\u91cd\u5199 supervisor \u914d\u7f6e\u524d\u63d0\u793a\u3002<\/li>\n<li><code>openclaw doctor --yes<\/code> \u63a5\u53d7\u9ed8\u8ba4\u4fee\u590d\u63d0\u793a\u3002<\/li>\n<li><code>openclaw doctor --repair<\/code> \u65e0\u9700\u63d0\u793a\u5e94\u7528\u63a8\u8350\u7684\u4fee\u590d\u3002<\/li>\n<li><code>openclaw doctor --repair --force<\/code> \u8986\u76d6\u81ea\u5b9a\u4e49 supervisor \u914d\u7f6e\u3002<\/li>\n<li>\u4f60\u59cb\u7ec8\u53ef\u4ee5\u901a\u8fc7 <code>openclaw gateway install --force<\/code> \u5f3a\u5236\u5b8c\u5168\u91cd\u5199\u3002<\/li>\n<\/ul>\n<h3>16\uff09Gateway \u7f51\u5173 \u7f51\u5173\u8fd0\u884c\u65f6 + \u7aef\u53e3\u8bca\u65ad<\/h3>\n<p>Doctor \u68c0\u67e5\u670d\u52a1\u8fd0\u884c\u65f6\uff08PID\u3001\u4e0a\u6b21\u9000\u51fa\u72b6\u6001\uff09\uff0c\u5e76\u5728\u670d\u52a1\u5df2\u5b89\u88c5\u4f46\u5b9e\u9645\u672a\u8fd0\u884c\u65f6\u53d1\u51fa\u8b66\u544a\u3002\u5b83\u8fd8\u68c0\u67e5 Gateway \u7f51\u5173 \u7f51\u5173\u7aef\u53e3\uff08\u9ed8\u8ba4 <code>18789<\/code>\uff09\u4e0a\u7684\u7aef\u53e3\u51b2\u7a81\uff0c\u5e76\u62a5\u544a\u53ef\u80fd\u7684\u539f\u56e0\uff08Gateway \u7f51\u5173 \u7f51\u5173\u5df2\u5728\u8fd0\u884c\u3001SSH \u96a7\u9053\uff09\u3002<\/p>\n<h3>17\uff09Gateway \u7f51\u5173 \u7f51\u5173\u8fd0\u884c\u65f6\u6700\u4f73\u5b9e\u8df5<\/h3>\n<p>\u5f53 Gateway \u7f51\u5173 \u7f51\u5173\u670d\u52a1\u5728 Bun \u6216\u7248\u672c\u7ba1\u7406\u5668\u7ba1\u7406\u7684 Node \u8def\u5f84\uff08<code>nvm<\/code>\u3001<code>fnm<\/code>\u3001<code>volta<\/code>\u3001<code>asdf<\/code> \u7b49\uff09\u4e0a\u8fd0\u884c\u65f6\uff0cDoctor \u4f1a\u53d1\u51fa\u8b66\u544a\u3002WhatsApp + Telegram \u6e20\u9053\u9700\u8981 Node\uff0c\u7248\u672c\u7ba1\u7406\u5668\u8def\u5f84\u5728\u5347\u7ea7\u540e\u53ef\u80fd\u4f1a\u4e2d\u65ad\uff0c\u56e0\u4e3a\u670d\u52a1\u4e0d\u4f1a\u52a0\u8f7d\u4f60\u7684 shell init\u3002Doctor \u4f1a\u5728\u53ef\u7528\u65f6\u63d0\u4f9b\u8fc1\u79fb\u5230\u7cfb\u7edf Node \u5b89\u88c5\u7684\u9009\u9879\uff08Homebrew\/apt\/choco\uff09\u3002<\/p>\n<h3>18\uff09\u914d\u7f6e\u5199\u5165 + \u5411\u5bfc\u5143\u6570\u636e<\/h3>\n<p>Doctor \u6301\u4e45\u5316\u4efb\u4f55\u914d\u7f6e\u66f4\u6539\uff0c\u5e76\u6807\u8bb0\u5411\u5bfc\u5143\u6570\u636e\u4ee5\u8bb0\u5f55 doctor \u8fd0\u884c\u3002<\/p>\n<h3>19\uff09\u5de5\u4f5c\u533a\u63d0\u793a\uff08\u5907\u4efd + \u8bb0\u5fc6\u7cfb\u7edf\uff09<\/h3>\n<p>\u5f53\u7f3a\u5931\u65f6\uff0cDoctor \u5efa\u8bae\u4f7f\u7528\u5de5\u4f5c\u533a\u8bb0\u5fc6\u7cfb\u7edf\uff0c\u5e76\u5728\u5de5\u4f5c\u533a\u5c1a\u672a\u5728 git \u4e0b\u65f6\u6253\u5370\u5907\u4efd\u63d0\u793a\u3002<\/p>\n<p>\u53c2\u89c1 <a href=\"https:\/\/pa.yingzhi8.cn\/?p=87\">\/concepts\/agent-workspace<\/a> \u4e86\u89e3\u5de5\u4f5c\u533a\u7ed3\u6784\u548c git \u5907\u4efd\u7684\u5b8c\u6574\u6307\u5357\uff08\u63a8\u8350\u79c1\u6709 GitHub \u6216 GitLab\uff09\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Doctor openclaw doctor \u662f OpenClaw \u7684\u4fee\u590d + \u8fc1\u79fb\u5de5\u5177\u3002\u5b83\u4fee\u590d\u8fc7\u65f6\u7684\u914d\u7f6e\/\u72b6 [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-124","post","type-post","status-publish","format-standard","hentry","category-docs"],"_links":{"self":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/124","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"replies":[{"embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/comments?post=124"}],"version-history":[{"count":2,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/124\/revisions"}],"predecessor-version":[{"id":837,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/posts\/124\/revisions\/837"}],"wp:attachment":[{"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/media?parent=124"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/categories?post=124"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pa.yingzhi8.cn\/index.php\/wp-json\/wp\/v2\/tags?post=124"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}