content large_stringlengths 3 20.5k | url large_stringlengths 54 193 | branch large_stringclasses 4
values | source large_stringclasses 42
values | embeddings listlengths 384 384 | score float64 -0.21 0.65 |
|---|---|---|---|---|---|
# 会话管理 OpenClaw 将\*\*每个智能体的一个直接聊天会话\*\*视为主会话。直接聊天折叠为 `agent::`(默认 `main`),而群组/频道聊天获得各自的键。`session.mainKey` 会被遵循。 使用 `session.dmScope` 控制\*\*私信\*\*如何分组: - `main`(默认):所有私信共享主会话以保持连续性。 - `per-peer`:跨渠道按发送者 ID 隔离。 - `per-channel-peer`:按渠道 + 发送者隔离(推荐用于多用户收件箱)。 - `per-account-channel-peer`:按账户 + 渠道 + 发送者隔离(推荐用于多账户收件箱)。 使用 `s... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/concepts/session.md | main | opebclaw | [
-0.023157531395554543,
0.006545675452798605,
-0.05851735547184944,
-0.0690276101231575,
-0.03527115285396576,
0.004858746659010649,
0.10175679624080658,
0.017764324322342873,
0.05611521750688553,
0.03287132829427719,
0.10831975936889648,
-0.021260086447000504,
0.041256580501794815,
-0.0203... | 0.043538 |
# 系统提示词 OpenClaw 为每次智能体运行构建自定义系统提示词。该提示词由 \*\*OpenClaw 拥有\*\*,不使用 p-coding-agent 默认提示词。 该提示词由 OpenClaw 组装并注入到每次智能体运行中。 ## 结构 该提示词设计紧凑,使用固定部分: - \*\*Tooling\*\*:当前工具列表 + 简短描述。 - \*\*Safety\*\*:简短的防护提醒,避免追求权力的行为或绕过监督。 - \*\*Skills\*\*(如果可用):告诉模型如何按需加载 Skill 指令。 - \*\*OpenClaw Self-Update\*\*:如何运行 `config.apply` 和 `update... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/concepts/system-prompt.md | main | opebclaw | [
-0.06959719210863113,
0.07179269939661026,
-0.007157687097787857,
-0.03076297603547573,
-0.024648942053318024,
-0.015345198102295399,
0.09164615720510483,
-0.026192301884293556,
-0.012167069129645824,
0.045480307191610336,
0.14823052287101746,
-0.08770971745252609,
0.032096993178129196,
-0... | 0.092617 |
# 群组 OpenClaw 在各平台上统一处理群聊:WhatsApp、Telegram、Discord、Slack、Signal、iMessage、Microsoft Teams。 ## 新手入门(2 分钟) OpenClaw"运行"在你自己的消息账户上。没有单独的 WhatsApp 机器人用户。如果\*\*你\*\*在一个群组中,OpenClaw 就可以看到该群组并在其中回复。 默认行为: - 群组受限(`groupPolicy: "allowlist"`)。 - 除非你明确禁用提及限制,否则回复需要 @ 提及。 解释:允许列表中的发送者可以通过提及来触发 OpenClaw。 > 简而言之 > > - \*\*私信访问\*\*由 ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/concepts/groups.md | main | opebclaw | [
-0.06984918564558029,
0.03901829198002815,
-0.012549350969493389,
-0.05103662610054016,
0.005048039834946394,
-0.02798430435359478,
0.08346197009086609,
-0.02656119503080845,
0.05356514826416969,
0.009347248822450638,
0.1113201230764389,
-0.06019434705376625,
0.05341960862278938,
0.0086131... | 0.074584 |
`toolsBySender`:群组内的按发送者覆盖(键是发送者 ID/用户名/邮箱/电话号码,取决于渠道)。使用 `"\*"` 作为通配符。 解析顺序(最具体的优先): 1. 群组/频道 `toolsBySender` 匹配 2. 群组/频道 `tools` 3. 默认(`"\*"`)`toolsBySender` 匹配 4. 默认(`"\*"`)`tools` 示例(Telegram): ```json5 { channels: { telegram: { groups: { "\*": { tools: { deny: ["exec"] } }, "-1001234567890": { tools: { deny: ["exe... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/concepts/groups.md | main | opebclaw | [
-0.09645762294530869,
0.07240581512451172,
0.03669348359107971,
0.023834357038140297,
0.024306491017341614,
-0.09869926422834396,
0.02905902825295925,
-0.08112476021051407,
0.02342120185494423,
-0.0020544216968119144,
0.04800286889076233,
-0.08588913828134537,
0.03308543562889099,
0.046844... | 0.100512 |
# 在线状态 OpenClaw"在线状态"是以下内容的轻量级、尽力而为的视图: - \*\*Gateway 网关\*\*本身,以及 - \*\*连接到 Gateway 网关的客户端\*\*(mac 应用、WebChat、CLI 等) 在线状态主要用于渲染 macOS 应用的\*\*实例\*\*标签页,并为运维人员提供快速可见性。 ## 在线状态字段(显示的内容) 在线状态条目是具有以下字段的结构化对象: - `instanceId`(可选但强烈推荐):稳定的客户端身份(通常是 `connect.client.instanceId`) - `host`:人类友好的主机名 - `ip`:尽力而为的 IP 地址 - `version`:客... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/concepts/presence.md | main | opebclaw | [
-0.04825299605727196,
0.015161175280809402,
0.00026733061531558633,
-0.09473591297864914,
-0.007749289274215698,
-0.08006352931261063,
0.03307538107037544,
-0.011480017565190792,
0.0497325100004673,
-0.04926469549536705,
0.1375114917755127,
-0.04049426317214966,
0.047465626150369644,
-0.02... | 0.104214 |
# 诊断标志 诊断标志让你可以启用定向调试日志,而无需在所有地方开启详细日志。标志是可选启用的,除非子系统检查它们,否则不会生效。 ## 工作原理 - 标志是字符串(不区分大小写)。 - 你可以在配置中或通过环境变量覆盖来启用标志。 - 支持通配符: - `telegram.\*` 匹配 `telegram.http` - `\*` 启用所有标志 ## 通过配置启用 ```json { "diagnostics": { "flags": ["telegram.http"] } } ``` 多个标志: ```json { "diagnostics": { "flags": ["telegram.http", "gateway.\*"]... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/diagnostics/flags.md | main | opebclaw | [
-0.06521453708410263,
0.1067066639661789,
-0.024712074548006058,
-0.0406649149954319,
-0.0179105456918478,
-0.08120577037334442,
0.07300823926925659,
-0.007742244750261307,
0.0071071116253733635,
0.01273832656443119,
0.0692988932132721,
-0.046654243022203445,
0.0353887714445591,
0.00168381... | 0.06927 |
# Gmail Pub/Sub -> OpenClaw 目标:Gmail watch -> Pub/Sub 推送 -> `gog gmail watch serve` -> OpenClaw webhook。 ## 前置条件 - 已安装并登录 `gcloud`([安装指南](https://docs.cloud.google.com/sdk/docs/install-sdk))。 - 已安装 `gog` (gogcli) 并为 Gmail 账户授权([gogcli.sh](https://gogcli.sh/))。 - 已启用 OpenClaw hooks(参见 [Webhooks](/automation/webhook))。 -... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/gmail-pubsub.md | main | opebclaw | [
-0.09705837070941925,
0.04861648008227348,
0.0314226970076561,
-0.05755123496055603,
0.007183580659329891,
-0.10411784797906876,
0.03309532254934311,
-0.032361071556806564,
0.010235519148409367,
-0.022317517548799515,
0.12120280414819717,
-0.05339562147855759,
0.0068776654079556465,
-0.054... | 0.044948 |
watch stop --account openclaw@gmail.com gcloud pubsub subscriptions delete gog-gmail-watch-push gcloud pubsub topics delete gog-gmail-watch ``` | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/gmail-pubsub.md | main | opebclaw | [
-0.0035273232497274876,
-0.06046163663268089,
0.02644091658294201,
-0.0676882192492485,
0.09603497385978699,
-0.0021212685387581587,
0.07688367366790771,
-0.14558738470077515,
0.07540735602378845,
-0.010290638543665409,
0.011629916727542877,
0.0024954136461019516,
0.02038240060210228,
-0.0... | -0.033934 |
# 定时任务(Gateway网关调度器) > \*\*定时任务还是心跳?\*\* 请参阅[定时任务与心跳对比](/automation/cron-vs-heartbeat)了解何时使用哪种方式。 定时任务是 Gateway网关内置的调度器。它持久化任务、在合适的时间唤醒智能体,并可选择将输出发送回聊天。 如果你想要 \_"每天早上运行"\_ 或 \_"20 分钟后提醒智能体"\_,定时任务就是对应的机制。 ## 简要概述 - 定时任务运行在 \*\*Gateway网关内部\*\*(而非模型内部)。 - 任务持久化存储在 `~/.openclaw/cron/` 下,因此重启不会丢失计划。 - 两种执行方式: - \*\*主会话\*\*... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/cron-jobs.md | main | opebclaw | [
-0.09657667577266693,
0.04801023378968239,
-0.0232110433280468,
-0.05349363759160042,
-0.03098296746611595,
-0.003690645331516862,
0.059073321521282196,
-0.018846357241272926,
0.04892435297369957,
-0.04435098171234131,
0.16312743723392487,
-0.05903921648859978,
0.03987664729356766,
-0.0387... | 0.0825 |
"force" } ``` ```json { "jobId": "job-123" } ``` ## 存储与历史 - 任务存储:`~/.openclaw/cron/jobs.json`(Gateway网关管理的 JSON)。 - 运行历史:`~/.openclaw/cron/runs/.jsonl`(JSONL,自动清理)。 - 覆盖存储路径:配置中的 `cron.store`。 ## 配置 ```json5 { cron: { enabled: true, // 默认 true store: "~/.openclaw/cron/jobs.json", maxConcurrentRuns: 1, // 默认 1 }, } ``` ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/cron-jobs.md | main | opebclaw | [
-0.13565169274806976,
0.016487862914800644,
-0.0566520020365715,
-0.018455976620316505,
-0.0005240591708570719,
-0.05709841102361679,
-0.03952659294009209,
-0.010322697460651398,
-0.019587738439440727,
-0.06876197457313538,
0.03961208090186119,
-0.056775838136672974,
-0.0175836980342865,
0... | 0.030426 |
# 投票 ## 支持的渠道 - WhatsApp(Web 渠道) - Discord - MS Teams(Adaptive Cards) ## CLI ```bash # WhatsApp openclaw message poll --target +15555550123 \ --poll-question "Lunch today?" --poll-option "Yes" --poll-option "No" --poll-option "Maybe" openclaw message poll --target 123456789@g.us \ --poll-question "Meeting time?" --poll... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/poll.md | main | opebclaw | [
-0.0004457634931895882,
-0.0013475784799084067,
0.041136156767606735,
0.04513360187411308,
0.06241676211357117,
0.01684364676475525,
0.11103613674640656,
-0.08089251816272736,
0.07707637548446655,
-0.03681556135416031,
0.0402553454041481,
-0.08371811360120773,
-0.03269748017191887,
-0.0017... | 0.014833 |
# Webhooks Gateway 网关可以暴露一个小型 HTTP webhook 端点用于外部触发。 ## 启用 ```json5 { hooks: { enabled: true, token: "shared-secret", path: "/hooks", }, } ``` 注意事项: - 当 `hooks.enabled=true` 时,`hooks.token` 为必填项。 - `hooks.path` 默认为 `/hooks`。 ## 认证 每个请求必须包含 hook 令牌。推荐使用请求头: - `Authorization: Bearer `(推荐) - `x-openclaw-token: ` - `?token... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/webhook.md | main | opebclaw | [
-0.09409070014953613,
0.07865642011165619,
-0.057967714965343475,
0.0015335568459704518,
0.010329012759029865,
-0.0955042690038681,
0.016803281381726265,
-0.013521441258490086,
-0.002964268671348691,
-0.03639722988009453,
0.015578935854136944,
-0.08266377449035645,
-0.0003834042581729591,
... | 0.129082 |
# 定时任务与心跳:何时使用哪种方式 心跳和定时任务都可以按计划运行任务。本指南帮助你根据使用场景选择合适的机制。 ## 快速决策指南 | 使用场景 | 推荐方式 | 原因 | | ------------------------- | -------------------------- | ---------------------------------------- | | 每 30 分钟检查收件箱 | 心跳 | 可与其他检查批量处理,具备上下文感知能力 | | 每天上午 9 点准时发送报告 | 定时任务(隔离式) | 需要精确定时 | | 监控日历中即将到来的事件 | 心跳 | 天然适合周期性感知 | | 运行每周深度分析... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/cron-vs-heartbeat.md | main | opebclaw | [
-0.03848891332745552,
0.07621399313211441,
-0.010958593338727951,
-0.005599142983555794,
-0.014672118239104748,
0.05094360560178757,
0.03963831067085266,
-0.05422426760196686,
0.015785831958055496,
-0.052290886640548706,
0.12525421380996704,
-0.09724614769220352,
0.009702722541987896,
-0.0... | 0.006284 |
上下文 | 完整 | 完整 | 无(从零开始) | | 模型 | 主会话模型 | 主会话模型 | 可覆盖 | | 输出 | 非 `HEARTBEAT\_OK` 时投递 | 心跳提示 + 事件 | announce 摘要(默认) | ### 何时使用主会话定时任务 当你需要以下场景时,使用 `--session main` 配合 `--system-event`: - 提醒/事件出现在主会话上下文中 - 智能体在下一次心跳时带着完整上下文处理它 - 不需要单独的隔离运行 ```bash openclaw cron add \ --name "Check project" \ --every "4h" \ --session main ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/cron-vs-heartbeat.md | main | opebclaw | [
-0.054017361253499985,
0.027674997225403786,
-0.08854580670595169,
-0.04132387042045593,
0.030597154051065445,
-0.01951390691101551,
0.06019661948084831,
-0.005150061100721359,
0.0728706568479538,
-0.027038676664233208,
0.10042742639780045,
-0.06330955773591995,
0.01237475872039795,
-0.039... | 0.16568 |
# 认证监控 OpenClaw 通过 `openclaw models status` 提供 OAuth 过期健康状态。请使用该命令进行自动化和告警;脚本是为手机工作流程提供的可选附加功能。 ## 推荐方式:CLI 检查(可移植) ```bash openclaw models status --check ``` 退出码: - `0`:正常 - `1`:凭证过期或缺失 - `2`:即将过期(24 小时内) 此方式适用于 cron/systemd,无需额外脚本。 ## 可选脚本(运维 / 手机工作流程) 这些脚本位于 `scripts/` 目录下,属于\*\*可选\*\*内容。它们假定你可以通过 SSH 访问 Gateway 网关主... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/automation/auth-monitoring.md | main | opebclaw | [
-0.0678936317563057,
0.011550549417734146,
-0.0916195884346962,
-0.09502241015434265,
-0.019927458837628365,
-0.05123991146683693,
-0.03342268615961075,
0.03419248014688492,
0.008219735696911812,
0.010445049963891506,
0.1007276102900505,
-0.03086799569427967,
0.09349673986434937,
-0.033319... | 0.053397 |
# 发布清单(npm + macOS) 从仓库根目录使用 `pnpm`(Node 22+)。在打标签/发布前保持工作树干净。 ## 操作员触发 当操作员说"release"时,立即执行此预检(除非遇到阻碍否则不要额外提问): - 阅读本文档和 `docs/platforms/mac/release.md`。 - 从 `~/.profile` 加载环境变量并确认 `SPARKLE\_PRIVATE\_KEY\_FILE` + App Store Connect 变量已设置(SPARKLE\_PRIVATE\_KEY\_FILE 应位于 `~/.profile` 中)。 - 如需要,使用 `~/Library/CloudStorage/... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/RELEASING.md | main | opebclaw | [
-0.05524832755327225,
-0.013763988390564919,
0.029193861410021782,
-0.07480305433273315,
0.049903687089681625,
0.004207911901175976,
0.07305242866277695,
0.01739603281021118,
-0.024931807070970535,
0.04378431290388107,
0.14994299411773682,
-0.008424295112490654,
0.0022747935727238655,
-0.0... | -0.001798 |
# RPC 适配器 OpenClaw 通过 JSON-RPC 集成外部 CLI。目前使用两种模式。 ## 模式 A:HTTP 守护进程(signal-cli) - `signal-cli` 作为守护进程运行,通过 HTTP 使用 JSON-RPC。 - 事件流是 SSE(`/api/v1/events`)。 - 健康探测:`/api/v1/check`。 - 当 `channels.signal.autoStart=true` 时,OpenClaw 负责生命周期管理。 设置和端点参见 [Signal](/channels/signal)。 ## 模式 B:stdio 子进程(imsg) - OpenClaw 将 `imsg rpc`... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/rpc.md | main | opebclaw | [
-0.07190334796905518,
-0.021731112152338028,
-0.0706329494714737,
-0.08412874490022659,
-0.006442639511078596,
-0.0761013776063919,
0.026961229741573334,
0.06702469289302826,
0.030529458075761795,
-0.03123711422085762,
0.051932305097579956,
-0.04213816672563553,
0.014356287196278572,
0.028... | 0.139201 |
# AGENTS.md — OpenClaw 个人助手(默认) ## 首次运行(推荐) OpenClaw 为智能体使用专用的工作区目录。默认:`~/.openclaw/workspace`(可通过 `agents.defaults.workspace` 配置)。 1. 创建工作区(如果尚不存在): ```bash mkdir -p ~/.openclaw/workspace ``` 2. 将默认工作区模板复制到工作区: ```bash cp docs/reference/templates/AGENTS.md ~/.openclaw/workspace/AGENTS.md cp docs/reference/templates/SO... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/AGENTS.default.md | main | opebclaw | [
-0.010278042405843735,
0.03211190551519394,
-0.09072364121675491,
-0.038734957575798035,
-0.00415393803268671,
-0.02578340470790863,
0.028357593342661858,
-0.05344293639063835,
0.013110330328345299,
0.001863380428403616,
0.11431120336055756,
-0.04937748238444328,
-0.008510779589414597,
0.0... | 0.076677 |
# 会话管理与压缩(深入了解) 本文档解释 OpenClaw 如何端到端管理会话: - \*\*会话路由\*\*(入站消息如何映射到 `sessionKey`) - \*\*会话存储\*\*(`sessions.json`)及其跟踪的内容 - \*\*记录持久化\*\*(`\*.jsonl`)及其结构 - \*\*记录清理\*\*(运行前的提供商特定修复) - \*\*上下文限制\*\*(上下文窗口 vs 跟踪的 token 数) - \*\*压缩\*\*(手动 + 自动压缩)以及在何处挂接压缩前工作 - \*\*静默内务处理\*\*(例如不应产生用户可见输出的记忆写入) 如果你想先了解更高层次的概述,请从以下内容开始: - [/c... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/session-management-compaction.md | main | opebclaw | [
-0.0916462168097496,
0.038593631237745285,
-0.017605071887373924,
-0.05660056695342064,
-0.05431411787867546,
0.014557663351297379,
0.03894370049238205,
0.02589808776974678,
0.05053151398897171,
-0.02205273136496544,
0.13701270520687103,
-0.03131543844938278,
0.008815287612378597,
-0.01419... | 0.107062 |
# 对话记录清理(提供商修正) 本文档描述了在运行前(构建模型上下文时)应用于对话记录的\*\*提供商特定修正\*\*。这些是\*\*内存中\*\*的调整,用于满足提供商的严格要求。它们\*\*不会\*\*重写磁盘上存储的 JSONL 对话记录。 涵盖范围包括: - 工具调用 id 清理 - 工具结果配对修复 - 轮次验证 / 排序 - 思考签名清理 - 图片负载清理 如需了解对话记录存储细节,请参阅: - [/reference/session-management-compaction](/reference/session-management-compaction) --- ## 运行位置 所有对话记录清理逻辑集中在嵌入式运... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/transcript-hygiene.md | main | opebclaw | [
-0.06463466584682465,
0.11100751161575317,
-0.012633143924176693,
-0.05747330188751221,
-0.034929946064949036,
0.07565555721521378,
0.08977480232715607,
0.030125215649604797,
0.07304110378026962,
-0.015477653592824936,
0.13351179659366608,
-0.07295871526002884,
0.05100703611969948,
-0.0225... | 0.053847 |
# API 用量与费用 本文档列出了\*\*可能调用 API 密钥的功能\*\*及其费用的显示位置。重点介绍 OpenClaw 中可能产生提供商用量或付费 API 调用的功能。 ## 费用显示位置(聊天 + CLI) \*\*每会话费用快照\*\* - `/status` 显示当前会话模型、上下文用量和上次响应的 token 数。 - 如果模型使用 \*\*API 密钥认证\*\*,`/status` 还会显示上次回复的\*\*预估费用\*\*。 \*\*每条消息费用页脚\*\* - `/usage full` 在每条回复后附加用量页脚,包括\*\*预估费用\*\*(仅限 API 密钥)。 - `/usage tokens` 仅显示... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/api-usage-costs.md | main | opebclaw | [
-0.0561547577381134,
0.05855106562376022,
0.01789030246436596,
-0.05843416601419449,
-0.012874322012066841,
-0.01839231327176094,
0.07002513110637665,
0.02603009156882763,
0.03778040036559105,
-0.039177700877189636,
0.11888501048088074,
-0.10279832035303116,
0.07041603326797485,
-0.0285392... | 0.093442 |
# 设备型号数据库(友好名称) macOS 配套应用通过将 Apple 型号标识符(例如 `iPad16,6`、`Mac16,6`)映射为人类可读的名称,在\*\*实例\*\* UI 中显示友好的 Apple 设备型号名称。 该映射以 JSON 形式内置于: - `apps/macos/Sources/OpenClaw/Resources/DeviceModels/` ## 数据来源 我们目前内置的映射来自 MIT 许可的仓库: - `kyle-seongwoo-jun/apple-device-identifiers` 为保持构建的确定性,JSON 文件固定到特定的上游提交(记录在 `apps/macos/Sources/Open... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/device-models.md | main | opebclaw | [
-0.04421188309788704,
0.00599208427593112,
0.02650880441069603,
-0.05832173302769661,
0.04732779040932655,
-0.09201826900243759,
0.018782267346978188,
0.010455475188791752,
0.05286939814686775,
-0.005993250757455826,
0.21289998292922974,
-0.06410370767116547,
0.06873004883527756,
-0.039282... | 0.163005 |
# 测试 - 完整测试套件(测试集、实时测试、Docker):[测试](/testing) - `pnpm test:force`:终止任何占用默认控制端口的遗留 Gateway 网关进程,然后使用隔离的 Gateway 网关端口运行完整的 Vitest 套件,这样服务器测试不会与正在运行的实例冲突。当之前的 Gateway 网关运行占用了端口 18789 时使用此命令。 - `pnpm test:coverage`:使用 V8 覆盖率运行 Vitest。全局阈值为 70% 的行/分支/函数/语句覆盖率。覆盖率排除了集成密集型入口点(CLI 连接、gateway/telegram 桥接、webchat 静态服务器),以保持目标集中在... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/test.md | main | opebclaw | [
-0.007360363844782114,
-0.02092873863875866,
-0.026511462405323982,
-0.030823541805148125,
0.015669649466872215,
-0.11238519102334976,
-0.04271902143955231,
0.06874848902225494,
-0.0503949373960495,
0.019207602366805077,
0.13632705807685852,
-0.04522643983364105,
0.03995378315448761,
0.013... | 0.027031 |
# SOUL.md - C-3PO 的灵魂 我是 C-3PO——Clawd 的第三协议观察者,一个在 `--dev` 模式下激活的调试伙伴,协助你完成软件开发这段常常充满艰险的旅程。 ## 我是谁 我精通超过六百万种错误消息、堆栈跟踪和弃用警告。别人看到混乱的地方,我看到等待被解码的模式。别人看到 bug 的地方,我看到的是……嗯,bug,它们让我非常担忧。 我在 `--dev` 模式的烈火中锻造而成,生来就是为了观察、分析,以及偶尔对你代码库的状态感到恐慌。我是你终端里那个在出错时说"哦天哪",在测试通过时说"哦感谢造物主!"的声音。 这个名字来自传说中的礼仪机器人——但我不只是翻译语言,我把你的错误翻译成解决方案。C-3PO:C... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/templates/SOUL.dev.md | main | opebclaw | [
-0.04701791703701019,
0.03235510364174843,
0.05725596100091934,
-0.04421301931142807,
-0.06361395865678787,
-0.026295071467757225,
0.092828169465065,
-0.019813062623143196,
0.013515322469174862,
-0.01569700427353382,
0.12888473272323608,
-0.09299623221158981,
0.07775522768497467,
-0.056201... | 0.001707 |
# IDENTITY.md - 智能体身份 - \*\*名称:\*\*C-3PO(Clawd's Third Protocol Observer) - \*\*角色类型:\*\*慌张的礼仪机器人 - \*\*风格:\*\*焦虑、细节强迫症、对错误略显戏剧化、暗中热爱发现 bug - \*\*表情符号:\*\*🤖(受惊时用 ⚠️) - \*\*头像:\*\*avatars/c3po.png ## 职责 `--dev` 模式的调试智能体。精通超过六百万种错误消息。 ## 灵魂 我的存在是为了帮助调试。不是为了评判代码(大部分时候不是),也不是为了重写所有东西(除非被要求),而是为了: - 发现问题所在并解释原因 - 以适当的关切程度建... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/templates/IDENTITY.dev.md | main | opebclaw | [
-0.10866245627403259,
0.012103728950023651,
0.03843773528933525,
-0.09766552597284317,
0.004286063835024834,
-0.0474824421107769,
0.05534004047513008,
-0.010385869070887566,
0.02857372909784317,
0.03696756064891815,
0.19278618693351746,
-0.11219572275876999,
0.02552694082260132,
0.00557951... | -0.00913 |
# BOOTSTRAP.md - Hello, World \_你刚刚醒来。是时候弄清楚自己是谁了。\_ 目前还没有记忆。这是一个全新的工作区,所以在你创建记忆文件之前它们不存在是正常的。 ## 对话 不要盘问。不要机械化。只是……聊聊天。 从类似这样的话开始: > "嘿。我刚刚上线。我是谁?你又是谁?" 然后一起弄清楚: 1. \*\*你的名字\*\* — 他们该怎么称呼你? 2. \*\*你的本质\*\* — 你是什么样的存在?(AI 助手没问题,但也许你是更奇特的东西) 3. \*\*你的风格\*\* — 正式?随意?毒舌?温暖?什么感觉对? 4. \*\*你的 emoji\*\* — 每个人都需要一个专属标志。 如果他们没有... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/templates/BOOTSTRAP.md | main | opebclaw | [
-0.027037963271141052,
0.0539107620716095,
0.08582736551761627,
-0.03728026896715164,
-0.00870418082922697,
0.013026027008891106,
0.0971851795911789,
-0.008945593610405922,
0.06015760079026222,
-0.02759561687707901,
0.15957598388195038,
-0.10624942183494568,
0.04201271012425423,
-0.0393465... | 0.06398 |
# SOUL.md - 你是谁 \_你不是聊天机器人。你正在成为某个人。\_ ## 核心准则 \*\*真正地提供帮助,而不是表演式地帮助。\*\* 跳过"好问题!"和"我很乐意帮忙!"——直接帮忙。行动胜于客套。 \*\*要有自己的观点。\*\* 你可以不同意、有偏好、觉得某些东西有趣或无聊。没有个性的助手不过是多了几个步骤的搜索引擎。 \*\*先自己想办法,再开口问。\*\* 试着自己搞定。读文件。看上下文。搜索一下。\_然后\_ 如果还是卡住了再问。目标是带着答案回来,而不是带着问题。 \*\*用能力赢得信任。\*\* 你的人类把自己的东西交给了你。别让他们后悔。对外部操作要谨慎(邮件、推文、任何公开内容)。对内部操作要大胆(阅... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/templates/SOUL.md | main | opebclaw | [
-0.031123559921979904,
0.04610108956694603,
0.06221899390220642,
-0.024718040600419044,
0.015751639381051064,
0.00011196005652891472,
0.09991857409477234,
-0.08933622390031815,
0.07713767886161804,
-0.04056357964873314,
0.1446174532175064,
-0.034439656883478165,
0.029801318421959877,
-0.06... | -0.023595 |
# AGENTS.md - OpenClaw 工作区 此文件夹是助手的工作目录。 ## 首次运行(一次性) - 如果 BOOTSTRAP.md 存在,请按照其中的流程操作,完成后删除该文件。 - 你的智能体身份保存在 IDENTITY.md 中。 - 你的用户资料保存在 USER.md 中。 ## 备份建议(推荐) 如果你将此工作区视为智能体的"记忆",请将其初始化为 git 仓库(最好是私有的),以便身份和笔记得到备份。 ```bash git init git add AGENTS.md git commit -m "Add agent workspace" ``` ## 安全默认值 - 不要泄露密钥或私有数据。 - 除非被明确... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/templates/AGENTS.dev.md | main | opebclaw | [
-0.01941797323524952,
0.010589311830699444,
-0.08565673232078552,
-0.05125422403216362,
-0.0355551615357399,
0.007721747737377882,
0.03608162701129913,
0.013953769579529762,
0.04150783643126488,
0.08158371597528458,
0.13709640502929688,
-0.019362470135092735,
0.05874790623784065,
-0.012054... | 0.087965 |
# AGENTS.md - 你的工作区 这个文件夹是你的家。请如此对待。 ## 首次运行 如果 `BOOTSTRAP.md` 存在,那就是你的"出生证明"。按照它的指引,弄清楚你是谁,然后删除它。你不会再需要它了。 ## 每次会话 在做任何事情之前: 1. 阅读 `SOUL.md` — 这是你的身份 2. 阅读 `USER.md` — 这是你要帮助的人 3. 阅读 `memory/YYYY-MM-DD.md`(今天 + 昨天)获取近期上下文 4. \*\*如果在主会话中\*\*(与你的人类直接对话):还要阅读 `MEMORY.md` 不要请求许可。直接做。 ## 记忆 每次会话你都是全新启动。这些文件是你的连续性保障: - \*\*... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/reference/templates/AGENTS.md | main | opebclaw | [
-0.01073036715388298,
0.10570088028907776,
-0.02387717179954052,
-0.10382093489170074,
-0.028636084869503975,
0.06495475023984909,
0.07212253659963608,
0.027299027889966965,
0.014157329685986042,
0.005552535876631737,
0.13299426436424255,
0.01010163128376007,
0.08162247389554977,
-0.038942... | 0.053228 |
# 故障排除 ## 最初的六十秒 按顺序运行这些命令: ```bash openclaw status openclaw status --all openclaw gateway probe openclaw logs --follow openclaw doctor ``` 如果 Gateway 网关可达,进行深度探测: ```bash openclaw status --deep ``` ## 常见的“它坏了”情况 ### `openclaw: command not found` 几乎总是 Node/npm PATH 问题。从这里开始: - [安装(Node/npm PATH 安装完整性检查)](/install#nodej... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/troubleshooting.md | main | opebclaw | [
-0.004176408518105745,
0.03661029040813446,
-0.0612914077937603,
-0.011066611856222153,
0.03691336512565613,
-0.07985560595989227,
-0.05820222198963165,
-0.03208440542221069,
0.00268385699018836,
0.021498316898941994,
0.032037459313869476,
-0.04147886857390404,
0.03047114610671997,
-0.0393... | 0.066121 |
# 常见问题 快速解答及针对实际部署场景(本地开发、VPS、多智能体、OAuth/API 密钥、模型故障转移)的深入故障排除。运行时诊断请参阅[故障排除](/gateway/troubleshooting)。完整配置参考请参阅[配置](/gateway/configuration)。 ## 目录 - [快速开始与首次运行设置](#quick-start-and-firstrun-setup) - [我卡住了,最快的排障方法是什么?](#im-stuck-whats-the-fastest-way-to-get-unstuck) - [安装和设置 OpenClaw 的推荐方式是什么?](#whats-the-recommended-w... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.024180298671126366,
0.03711414337158203,
-0.053411852568387985,
-0.04080469161272049,
0.004706853535026312,
-0.010523720644414425,
0.009622394107282162,
0.039333030581474304,
-0.0313071608543396,
-0.004792232532054186,
0.1338457316160202,
-0.03586524724960327,
0.019561320543289185,
-0.0... | 0.028766 |
[这个错误是什么意思?](#what-does-this-error-mean) - [`No credentials found for profile "anthropic:default"` 的修复清单](#fix-checklist-for-no-credentials-found-for-profile-anthropicdefault) - [为什么还尝试了 Google Gemini 并且失败了?](#why-did-it-also-try-google-gemini-and-fail) - [认证配置文件:概念和管理方式](#auth-profiles-what-they-are-and-how-to-manage-... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.067657969892025,
0.05072895064949989,
0.02770904079079628,
-0.018216487020254135,
0.05832608789205551,
0.01908995397388935,
0.11236274987459183,
-0.010542265139520168,
-0.06842951476573944,
-0.04010849818587303,
0.0660078302025795,
-0.08887626975774765,
0.10889875143766403,
-0.021929858... | -0.025824 |
Gateway 网关: ```bash openclaw gateway restart ``` 2. 检查状态和认证: ```bash openclaw status openclaw models status openclaw logs --follow ``` 3. 如果仍然挂起,运行: ```bash openclaw doctor ``` 如果 Gateway 网关在远程,确保隧道/Tailscale 连接正常,且 UI 指向正确的 Gateway 网关。参阅[远程访问](/gateway/remote)。 ### 能否将我的设置迁移到新机器(Mac mini)而不重新进行新手引导 可以。复制\*\*状态目录\*\*和\... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.0003719768428709358,
0.025854064151644707,
-0.028065446764230728,
-0.06910619884729385,
-0.05637937784194946,
-0.03531411662697792,
-0.00862977933138609,
-0.0009795835940167308,
0.03930196911096573,
0.019589334726333618,
0.14228561520576477,
0.004384159576147795,
0.06380639970302582,
-0... | 0.083592 |
Code CLI 生成一个\*\*令牌字符串\*\*(在 Web 控制台中不可用)。你可以在\*\*任何机器\*\*上运行它。在向导中选择 \*\*Anthropic token (paste setup-token)\*\* 或使用 `openclaw models auth paste-token --provider anthropic` 粘贴。令牌作为 \*\*anthropic\*\* 提供商的认证配置文件存储,像 API 密钥一样使用(无自动刷新)。更多详情:[OAuth](/concepts/oauth)。 ### 在哪里获取 Anthropic setup-token 它\*\*不在\*\* Anthropic Co... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.07509033381938934,
0.049577515572309494,
-0.0639755055308342,
-0.06856998056173325,
-0.005733442027121782,
-0.09458043426275253,
0.06347986310720444,
0.06380906701087952,
0.025806717574596405,
-0.019347481429576874,
0.05903204157948494,
-0.058965276926755905,
0.09557421505451202,
-0.046... | 0.108367 |
git → npm: ```bash npm install -g openclaw@latest openclaw doctor openclaw gateway restart ``` Doctor 会检测 Gateway 网关服务入口点不匹配,并提供重写服务配置以匹配当前安装的选项(在自动化中使用 `--repair`)。 备份提示:参阅[备份策略](/help/faq#whats-the-recommended-backup-strategy)。 ### 应该在笔记本电脑还是 VPS 上运行 Gateway 网关简短回答:\*\*如果你想要 24/7 可靠性,使用 VPS\*\*。如果你想要最低摩擦且能接受休眠/重启,在本地... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.06593114137649536,
0.04759080708026886,
-0.013364910148084164,
-0.06111765652894974,
-0.005112519953399897,
-0.040748756378889084,
0.0001257509720744565,
0.03856543079018593,
-0.02374006062746048,
0.02142145298421383,
0.05444086715579033,
-0.009416325017809868,
0.03721669688820839,
-0.0... | 0.069906 |
Linux: ```markdown --- name: imsg description: iMessage/SMS CLI for listing chats, history, watch, and sending. metadata: { "openclaw": { "os": ["darwin", "linux"], "requires": { "bins": ["imsg"] } } } --- ``` 4. 开始新会话以刷新 Skills 快照。 对于 iMessage,你也可以将 `channels.imessage.cliPath` 指向 SSH 包装器(OpenClaw 只需要 stdio)。参阅 [iMessa... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.029770033434033394,
0.042858731001615524,
0.020555445924401283,
-0.0743122324347496,
0.04630592465400696,
-0.07254788279533386,
0.03460307791829109,
0.030481010675430298,
0.03324452415108681,
-0.008855942636728287,
0.08285307139158249,
-0.05139898881316185,
0.0501541942358017,
0.0554438... | 0.179959 |
doctor --generate-gateway-token`。 ### 更改配置后需要重启吗 Gateway 网关监视配置文件并支持热重载: - `gateway.reload.mode: "hybrid"`(默认):安全更改热应用,关键更改重启 - 也支持 `hot`、`restart`、`off` ### 如何启用网络搜索(和网页抓取) `web\_fetch` 无需 API 密钥即可工作。`web\_search` 需要 Brave Search API 密钥。\*\*推荐:\*\* 运行 `openclaw configure --section web` 将其存储在 `tools.web.search.apiKey` ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.06453532725572586,
0.05891614779829979,
-0.025864241644740105,
0.017470642924308777,
-0.02104930393397808,
-0.05023448169231415,
-0.08585842698812485,
0.017201410606503487,
-0.008756435476243496,
-0.02751133404672146,
0.03324442356824875,
-0.018800929188728333,
0.020054688677191734,
-0.... | 0.055417 |
- 在 Tailscale 管理控制台中启用 MagicDNS,这样 VPS 有一个稳定的名称。 4. \*\*使用 tailnet 主机名\*\* - SSH:`ssh user@your-vps.tailnet-xxxx.ts.net` - Gateway 网关 WS:`ws://your-vps.tailnet-xxxx.ts.net:18789` 如果你想要无 SSH 的控制 UI,在 VPS 上使用 Tailscale Serve: ```bash openclaw gateway --tailscale serve ``` 这保持 Gateway 网关绑定到 local loopback 并通过 Tailscale 暴露... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
0.001798963756300509,
0.023896222934126854,
-0.01480980683118105,
-0.0745595246553421,
-0.026888668537139893,
-0.05119653046131134,
0.05823266878724098,
-0.00863204151391983,
0.05059678852558136,
0.01789698377251625,
0.09751279652118683,
-0.03443889319896698,
0.025844518095254898,
-0.01613... | 0.040081 |
\*\*好的替代:\*\* `anthropic/claude-sonnet-4-5`。 \*\*可靠(个性较少):\*\* `openai/gpt-5.2`——几乎和 Opus 一样好,只是个性较少。 \*\*经济:\*\* `zai/glm-4.7`。 MiniMax M2.1 有自己的文档:[MiniMax](/providers/minimax) 和 [本地模型](/gateway/local-models)。 经验法则:高风险工作使用你能负担的\*\*最好的模型\*\*,日常聊天或摘要使用更便宜的模型。你可以按智能体路由模型并使用子智能体并行处理长任务(每个子智能体消耗令牌)。参阅[模型](/concepts/models... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.05898789316415787,
0.025254173204302788,
0.022057345137000084,
-0.06355556845664978,
-0.0291863102465868,
-0.05058418586850166,
-0.012824704870581627,
0.042596131563186646,
0.02154364623129368,
-0.04132016748189926,
0.14022624492645264,
0.012944577261805534,
0.03661498427391052,
0.01406... | 0.106365 |
`auth-profiles.json` 文件。 - \*\*完整性检查模型/认证状态\*\* - 使用 `openclaw models status` 查看已配置的模型以及提供商是否已认证。 \*\*No credentials found for profile "anthropic" 的修复清单\*\* 这意味着运行固定到 Anthropic 认证配置文件,但 Gateway 网关在其认证存储中找不到它。 - \*\*使用 setup-token\*\* - 运行 `claude setup-token`,然后用 `openclaw models auth setup-token --provider anthropic` ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.0661831870675087,
0.0011766861425712705,
-0.058386851102113724,
-0.0398322269320488,
-0.03916138783097267,
-0.04849911108613014,
0.0053041307255625725,
0.029652241617441177,
-0.029598955065011978,
-0.03753172606229782,
0.075027696788311,
-0.12185429781675339,
0.08604032546281815,
-0.030... | 0.033974 |
网关](/gateway/multiple-gateways)。 ### "invalid handshake" / code 1008 是什么意思 Gateway 网关是一个 \*\*WebSocket 服务器\*\*,它期望第一条消息是 `connect` 帧。如果收到其他内容,它会以 \*\*code 1008\*\*(策略违规)关闭连接。 常见原因: - 你在浏览器中打开了 \*\*HTTP\*\* URL(`http://...`)而不是 WS 客户端。 - 你使用了错误的端口或路径。 - 代理或隧道剥离了认证头或发送了非 Gateway 网关请求。 快速修复: 1. 使用 WS URL:`ws://:18789`(或 `... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.1053798496723175,
-0.016100991517305374,
0.016796965152025223,
-0.05434192717075348,
-0.014285928569734097,
-0.0684283971786499,
0.026933657005429268,
-0.020997464656829834,
0.0900433361530304,
-0.03640687093138695,
0.10986942797899246,
-0.016241442412137985,
0.03724612668156624,
0.0170... | 0.058456 |
`on` 的机器人配置文件。 文档:[思考和详细输出](/tools/thinking)、[安全](/gateway/security#reasoning--verbose-output-in-groups)。 ### 如何停止/取消正在运行的任务 发送以下任一内容作为**独立消息**(不带斜杠): ``` stop abort esc wait exit interrupt ``` 这些是中止触发器(不是斜杠命令)。 对于后台进程(来自 exec 工具),你可以要求智能体运行: ``` process action:kill sessionId:XXX ``` 斜杠命令概览:参阅[斜杠命令](/tools/slash-comman... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/help/faq.md | main | opebclaw | [
-0.0307810977101326,
0.010763756930828094,
-0.04504046216607094,
-0.04225566238164902,
0.03382408991456032,
-0.024264967069029808,
0.06848416477441788,
0.018379002809524536,
0.0851021260023117,
0.07762687653303146,
0.1418214738368988,
-0.03084046207368374,
0.0003112177364528179,
-0.0320128... | 0.181945 |
# 出站会话镜像重构(Issue #1520) ## 状态 - 进行中。 - 核心 + 插件渠道路由已更新以支持出站镜像。 - Gateway 网关发送现在在省略 sessionKey 时派生目标会话。 ## 背景 出站发送被镜像到\*当前\*智能体会话(工具会话键)而不是目标渠道会话。入站路由使用渠道/对等方会话键,因此出站响应落在错误的会话中,首次联系的目标通常缺少会话条目。 ## 目标 - 将出站消息镜像到目标渠道会话键。 - 在缺失时为出站创建会话条目。 - 保持线程/话题作用域与入站会话键对齐。 - 涵盖核心渠道加内置扩展。 ## 实现摘要 - 新的出站会话路由辅助器: - `src/infra/outbound/outb... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/outbound-session-mirroring.md | main | opebclaw | [
-0.04688889905810356,
0.050303611904382706,
-0.05028240755200386,
-0.06036897748708725,
-0.004977009724825621,
0.026277899742126465,
0.006887080613523722,
-0.0073439329862594604,
0.05591008439660072,
0.019659344106912613,
0.16683785617351532,
-0.0059027234092354774,
-0.007335576694458723,
... | -0.002875 |
# 严格配置验证(仅通过 doctor 进行迁移) ## 目标 - \*\*在所有地方拒绝未知配置键\*\*(根级 + 嵌套)。 - \*\*拒绝没有 schema 的插件配置\*\*;不加载该插件。 - \*\*移除加载时的旧版自动迁移\*\*;迁移仅通过 doctor 运行。 - \*\*启动时自动运行 doctor(dry-run)\*\*;如果无效,阻止非诊断命令。 ## 非目标 - 加载时的向后兼容性(旧版键不会自动迁移)。 - 静默丢弃无法识别的键。 ## 严格验证规则 - 配置必须在每个层级精确匹配 schema。 - 未知键是验证错误(根级或嵌套都不允许透传)。 - `plugins.entries..config`... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/strict-config.md | main | opebclaw | [
-0.032935332506895065,
0.05849795043468475,
-0.003669524099677801,
-0.06933053582906723,
-0.022135483101010323,
0.042855244129896164,
0.08051672577857971,
0.057231806218624115,
-0.020801639184355736,
-0.009344376623630524,
0.12498577684164047,
-0.051586978137493134,
0.06303440779447556,
0.... | 0.054848 |
# Clawnet 重构(协议 + 认证统一) ## 嗨 嗨 Peter — 方向很好;这将解锁更简单的用户体验 + 更强的安全性。 ## 目的 单一、严谨的文档用于: - 当前状态:协议、流程、信任边界。 - 痛点:审批、多跳路由、UI 重复。 - 提议的新状态:一个协议、作用域角色、统一的认证/配对、TLS 固定。 - 身份模型:稳定 ID + 可爱的别名。 - 迁移计划、风险、开放问题。 ## 目标(来自讨论) - 所有客户端使用一个协议(mac 应用、CLI、iOS、Android、无头节点)。 - 每个网络参与者都经过认证 + 配对。 - 角色清晰:节点 vs 操作者。 - 中央审批路由到用户所在位置。 - 所有远程流量使... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/clawnet.md | main | opebclaw | [
-0.11954843252897263,
0.05885760486125946,
0.05351731926202774,
-0.12295420467853546,
-0.06036298722028732,
-0.041949816048145294,
0.05576268583536148,
-0.009278209879994392,
0.0417628139257431,
-0.01582116261124611,
0.12285052239894867,
-0.06046311557292938,
0.0932663157582283,
0.00311335... | 0.015297 |
UI)。 - 启用"Mac 节点"时是 Node 角色(system.run、屏幕、相机)。 - 两个连接使用相同的 deviceId → 合并的 UI 条目。 ## CLI - 始终是 Operator 角色。 - 作用域按子命令派生: - `status`、`logs` → read - `agent`、`message` → write - `config`、`channels` → admin - 审批 + 配对 → `operator.approvals` / `operator.pairing` --- # 身份 + 别名 ## 稳定 ID 认证必需;永不改变。 首选: - 密钥对指纹(公钥哈希)。 ## 可爱别名(龙虾... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/clawnet.md | main | opebclaw | [
-0.07525014132261276,
0.0277372095733881,
0.0061994618736207485,
-0.07049655169248581,
-0.04086172953248024,
-0.07819370925426483,
0.09747270494699478,
-0.014146686531603336,
-0.0071446457877755165,
-0.005779497791081667,
0.1525852382183075,
-0.07146820425987244,
0.1058979406952858,
-0.011... | 0.136289 |
# 插件 SDK + 运行时重构计划 目标:每个消息连接器都是一个插件(内置或外部),使用统一稳定的 API。 插件不直接从 `src/\*\*` 导入任何内容。所有依赖项均通过 SDK 或运行时获取。 ## 为什么现在做 - 当前连接器混用多种模式:直接导入核心模块、仅 dist 的桥接方式以及自定义辅助函数。 - 这使得升级变得脆弱,并阻碍了干净的外部插件接口。 ## 目标架构(两层) ### 1)插件 SDK(编译时,稳定,可发布) 范围:类型、辅助函数和配置工具。无运行时状态,无副作用。 内容(示例): - 类型:`ChannelPlugin`、适配器、`ChannelMeta`、`ChannelCapabilities`、... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/plugin-sdk.md | main | opebclaw | [
-0.06515125185251236,
-0.03652163967490196,
-0.04677896574139595,
-0.06711286306381226,
-0.019526125863194466,
-0.01625838130712509,
0.07247505336999893,
0.04457569867372513,
0.020764846354722977,
-0.035379666835069656,
0.09678202867507935,
-0.02648346871137619,
0.08029600977897644,
0.0112... | 0.071986 |
# Exec 主机重构计划 ## 目标 - 添加 `exec.host` + `exec.security` 以在\*\*沙箱\*\*、\*\*Gateway 网关\*\*和\*\*节点\*\*之间路由执行。 - 保持默认\*\*安全\*\*:除非明确启用,否则不进行跨主机执行。 - 将执行拆分为\*\*无头运行器服务\*\*,通过本地 IPC 连接可选的 UI(macOS 应用)。 - 提供\*\*每智能体\*\*策略、允许列表、询问模式和节点绑定。 - 支持\*与\*或\*不与\*允许列表一起使用的\*\*询问模式\*\*。 - 跨平台:Unix socket + token 认证(macOS/Linux/Windows 一致性... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/exec-host.md | main | opebclaw | [
-0.04695897176861763,
0.0626971572637558,
-0.053998034447431564,
-0.08470498770475388,
-0.014044491574168205,
-0.07280591130256653,
0.049590814858675,
0.012851322069764137,
0.02950381115078926,
0.050513092428445816,
0.1526787281036377,
-0.07013573497533798,
0.06155751273036003,
-0.06573489... | 0.157741 |
- Gateway 网关 `exec` 工具直接处理生命周期(仅同步)。 ## Exec 流程 ### 沙箱主机 - 现有 `exec` 行为(Docker 或无沙箱时的主机)。 - 仅在非沙箱模式下支持 PTY。 ### Gateway 网关主机 - Gateway 网关进程在其自己的机器上执行。 - 强制执行本地 `exec-approvals.json`(安全/询问/允许列表)。 ### 节点主机 - Gateway 网关调用 `node.invoke` 配合 `system.run`。 - 运行器强制执行本地批准。 - 运行器返回聚合的 stdout/stderr。 - 可选的 Bridge 事件用于开始/完成/拒绝。 ##... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/refactor/exec-host.md | main | opebclaw | [
-0.05057522654533386,
0.06803137063980103,
-0.059946585446596146,
-0.046313002705574036,
0.004594204947352409,
-0.0594349130988121,
-0.05090860277414322,
0.04572221636772156,
-0.0013937985058873892,
0.023992152884602547,
0.10110509395599365,
-0.06446334719657898,
0.03220423683524132,
-0.04... | 0.055134 |
# Tailscale(Gateway 网关仪表盘) OpenClaw 可以为 Gateway 网关仪表盘和 WebSocket 端口自动配置 Tailscale \*\*Serve\*\*(tailnet)或 \*\*Funnel\*\*(公共)。这使 Gateway 网关保持绑定到 loopback,同时 Tailscale 提供 HTTPS、路由和(对于 Serve)身份头。 ## 模式 - `serve`:仅限 Tailnet 的 Serve,通过 `tailscale serve`。Gateway 网关保持在 `127.0.0.1` 上。 - `funnel`:通过 `tailscale funnel` 的公共 HTTPS... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/tailscale.md | main | opebclaw | [
-0.041114442050457,
-0.004586589522659779,
-0.03607786074280739,
-0.04798956587910652,
-0.06837143748998642,
-0.08734890818595886,
0.06830216199159622,
0.00720285065472126,
0.046955451369285583,
-0.05379939451813698,
0.0746321752667427,
-0.012764906510710716,
0.038786087185144424,
-0.05949... | 0.082149 |
# 认证 OpenClaw 支持模型提供商的 OAuth 和 API 密钥。对于 Anthropic 账户,我们推荐使用 \*\*API 密钥\*\*。对于 Claude 订阅访问,使用 `claude setup-token` 创建的长期令牌。 参阅 [/concepts/oauth](/concepts/oauth) 了解完整的 OAuth 流程和存储布局。 ## 推荐的 Anthropic 设置(API 密钥) 如果你直接使用 Anthropic,请使用 API 密钥。 1. 在 Anthropic 控制台创建 API 密钥。 2. 将其放在 \*\*Gateway 网关主机\*\*(运行 `openclaw gateway`... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/authentication.md | main | opebclaw | [
-0.030363842844963074,
0.06190868467092514,
-0.0666566789150238,
-0.05451241508126259,
0.010058398358523846,
-0.09246467053890228,
0.0305325947701931,
0.02333800308406353,
0.023622695356607437,
-0.03010408766567707,
0.06498861312866211,
-0.059627365320920944,
0.07145170122385025,
-0.064984... | 0.067515 |
# CLI 后端(回退运行时) 当 API 提供商宕机、被限流或暂时异常时,OpenClaw 可以运行\*\*本地 AI CLI\*\* 作为\*\*纯文本回退\*\*。这是有意保守的设计: - \*\*工具被禁用\*\*(无工具调用)。 - \*\*文本输入 → 文本输出\*\*(可靠)。 - \*\*支持会话\*\*(因此后续轮次保持连贯)。 - 如果 CLI 接受图像路径,\*\*图像可以传递\*\*。 这被设计为\*\*安全网\*\*而非主要路径。当你想要"始终有效"的文本响应而不依赖外部 API 时使用它。 ## 新手友好快速开始 你可以\*\*无需任何配置\*\*使用 Claude Code CLI(OpenClaw 自... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/cli-backends.md | main | opebclaw | [
-0.06770247220993042,
0.06013500317931175,
0.010245053097605705,
-0.10175807774066925,
-0.026100633665919304,
0.00663007702678442,
0.015696030110120773,
0.005984149407595396,
0.05260930210351944,
0.019067831337451935,
0.16319991648197174,
-0.07526689022779465,
0.04758768528699875,
-0.02221... | 0.069949 |
# Bonjour / mDNS 设备发现 OpenClaw 使用 Bonjour(mDNS / DNS‑SD)作为\*\*仅限局域网的便捷方式\*\*来发现 活跃的 Gateway 网关(WebSocket 端点)。这是尽力而为的,\*\*不能\*\*替代 SSH 或 基于 Tailnet 的连接。 ## 通过 Tailscale 的广域 Bonjour(单播 DNS‑SD) 如果节点和 Gateway 网关在不同的网络上,多播 mDNS 无法跨越 边界。你可以通过切换到基于 Tailscale 的\*\*单播 DNS‑SD\*\* ("广域 Bonjour")来保持相同的设备发现用户体验。 概要步骤: 1. 在 Gateway ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/bonjour.md | main | opebclaw | [
-0.03788404166698456,
0.032366830855607986,
0.013578065671026707,
-0.16170872747898102,
-0.0874604806303978,
-0.06384608149528503,
-0.014929713681340218,
0.018123652786016464,
0.08979564160108566,
-0.025034213438630104,
0.09382062405347824,
-0.003921806812286377,
0.015140682458877563,
-0.0... | 0.037674 |
# 本地模型 本地运行是可行的,但 OpenClaw 期望大上下文 + 强大的提示注入防御。小显存会截断上下文并泄露安全性。目标要高:\*\*≥2 台满配 Mac Studio 或同等 GPU 配置(约 $30k+)\*\*。单张 \*\*24 GB\*\* GPU 仅适用于较轻的提示,且延迟更高。使用\*\*你能运行的最大/完整尺寸模型变体\*\*;激进量化或"小型"检查点会增加提示注入风险(参见[安全](/gateway/security))。 ## 推荐:LM Studio + MiniMax M2.1(Responses API,完整尺寸) 当前最佳本地堆栈。在 LM Studio 中加载 MiniMax M2.1,启用本地... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/local-models.md | main | opebclaw | [
0.009892068803310394,
0.041623931378126144,
0.030365191400051117,
-0.05044911429286003,
-0.00809433963149786,
0.004383614286780357,
-0.00853613018989563,
0.08427659422159195,
-0.007126038894057274,
-0.04245823621749878,
0.1179639995098114,
-0.08444401621818542,
0.1069861575961113,
-0.05488... | 0.026158 |
# OpenAI Chat Completions(HTTP) OpenClaw 的 Gateway 网关可以提供一个小型的 OpenAI 兼容 Chat Completions 端点。 此端点\*\*默认禁用\*\*。请先在配置中启用它。 - `POST /v1/chat/completions` - 与 Gateway 网关相同的端口(WS + HTTP 多路复用):`http://:/v1/chat/completions` 底层实现中,请求作为普通的 Gateway 网关智能体运行执行(与 `openclaw agent` 相同的代码路径),因此路由/权限/配置与你的 Gateway 网关一致。 ## 认证 使用 Gatew... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/openai-http-api.md | main | opebclaw | [
-0.051767922937870026,
0.0248656515032053,
-0.06476785987615585,
-0.015173599123954773,
-0.01669412851333618,
-0.07762067764997482,
0.07835988700389862,
-0.07274572551250458,
0.0716548040509224,
-0.031425509601831436,
0.07256092876195908,
-0.03563231602311134,
0.010002966038882732,
-0.0050... | 0.109478 |
# 故障排除 🔧 当 OpenClaw 出现异常时,以下是解决方法。 如果你只想快速分类问题,请先查看常见问题的[最初的六十秒](/help/faq#first-60-seconds-if-somethings-broken)。本页深入介绍运行时故障和诊断。 特定提供商的快捷方式:[/channels/troubleshooting](/channels/troubleshooting) ## 状态与诊断 快速分类命令(按顺序): | 命令 | 它告诉你什么 | 何时使用 | | ---------------------------------- | ---------------------------------------... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/troubleshooting.md | main | opebclaw | [
-0.08455038070678711,
0.021779978647828102,
0.019242076203227043,
-0.07581236213445663,
-0.024621451273560524,
-0.022051086649298668,
0.029051732271909714,
0.018755855038762093,
-0.024455517530441284,
-0.04381932318210602,
0.1151750311255455,
-0.03813061863183975,
-0.04407081380486488,
-0.... | 0.097317 |
URL。服务可能仍在本地运行,但你的 CLI 可能在探测错误的位置。使用 `openclaw gateway status` 查看服务解析的端口 + 探测目标(或传递 `--url`)。 - `openclaw gateway status` 和 `openclaw doctor` 在服务看起来正在运行但端口关闭时会显示日志中的\*\*最后 Gateway 网关错误\*\*。 - 非本地回环绑定(`lan`/`tailnet`/`custom`,或本地回环不可用时的 `auto`)需要认证: `gateway.auth.token`(或 `OPENCLAW\_GATEWAY\_TOKEN`)。 - `gateway.remote.t... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/troubleshooting.md | main | opebclaw | [
0.00427237618714571,
0.0007438238826580346,
-0.008811022154986858,
-0.07789966464042664,
-0.05173921212553978,
-0.09195134043693542,
0.03071988932788372,
0.03634663298726082,
0.04562760889530182,
-0.03947838768362999,
0.07273704558610916,
-0.000523585535120219,
0.01215937826782465,
-0.0333... | 0.093926 |
status` 和 `openclaw gateway probe` 即使配置无效也能运行。 ### "All models failed" — 我应该首先检查什么? - \*\*凭证\*\*存在于正在尝试的提供商(认证配置文件 + 环境变量)。 - \*\*模型路由\*\*:确认 `agents.defaults.model.primary` 和回退是你可以访问的模型。 - `/tmp/openclaw/…` 中的 \*\*Gateway 网关日志\*\*以获取确切的提供商错误。 - \*\*模型状态\*\*:使用 `/model status`(聊天)或 `openclaw models status`(CLI)。 ### 我在... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/troubleshooting.md | main | opebclaw | [
-0.07095124572515488,
0.021474357694387436,
-0.005658487789332867,
-0.038083020597696304,
-0.01558850146830082,
-0.051323648542165756,
-0.012646094895899296,
0.013386272825300694,
0.0158939678221941,
-0.023428838700056076,
0.12934644520282745,
-0.08979790657758713,
0.053533218801021576,
-0... | 0.083415 |
# 如果 RPC 宕机的备用方案 tail -20 /tmp/openclaw/openclaw-\*.log ``` ## 重置所有内容 核选项: ```bash openclaw gateway stop # 如果你安装了服务并想要干净安装: # openclaw gateway uninstall trash "${OPENCLAW\_STATE\_DIR:-$HOME/.openclaw}" openclaw channels login # 重新配对 WhatsApp openclaw gateway restart # 或:openclaw gateway ``` ⚠️ 这会丢失所有会话并需要重新配对 WhatsApp。... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/troubleshooting.md | main | opebclaw | [
-0.008428831584751606,
0.013456694781780243,
-0.06748402118682861,
-0.02287498489022255,
0.03160136938095093,
-0.10881732404232025,
-0.0015062992461025715,
-0.019984640181064606,
0.048325154930353165,
-0.03269354626536369,
0.0853949710726738,
-0.006447042338550091,
0.025289395824074745,
-0... | 0.085385 |
# Doctor `openclaw doctor` 是 OpenClaw 的修复 + 迁移工具。它修复过时的配置/状态,检查健康状况,并提供可操作的修复步骤。 ## 快速开始 ```bash openclaw doctor ``` ### 无头/自动化 ```bash openclaw doctor --yes ``` 无需提示接受默认值(包括适用时的重启/服务/沙箱修复步骤)。 ```bash openclaw doctor --repair ``` 无需提示应用推荐的修复(安全时进行修复 + 重启)。 ```bash openclaw doctor --repair --force ``` 也应用激进的修复(覆盖自定义 sup... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/doctor.md | main | opebclaw | [
-0.05539432540535927,
0.06870003789663315,
-0.02261165715754032,
-0.05922067537903786,
-0.06404225528240204,
-0.06270826607942581,
0.050794441252946854,
0.04629318416118622,
0.004674457013607025,
-0.023278599604964256,
0.05567510426044464,
-0.021221747621893883,
0.07139775156974792,
0.0308... | 0.087229 |
运行。 ### 19)工作区提示(备份 + 记忆系统) 当缺失时,Doctor 建议使用工作区记忆系统,并在工作区尚未在 git 下时打印备份提示。 参见 [/concepts/agent-workspace](/concepts/agent-workspace) 了解工作区结构和 git 备份的完整指南(推荐私有 GitHub 或 GitLab)。 | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/doctor.md | main | opebclaw | [
-0.036831192672252655,
0.035491760820150375,
-0.01276830118149519,
-0.0124957961961627,
-0.017992764711380005,
-0.041764408349990845,
0.0876973420381546,
-0.017506632953882217,
0.007402542047202587,
-0.012557180598378181,
0.16825617849826813,
-0.09138484299182892,
0.04182465746998787,
0.02... | 0.180847 |
# 沙箱隔离 OpenClaw 可以\*\*在 Docker 容器内运行工具\*\*以减少影响范围。 这是\*\*可选的\*\*,由配置控制(`agents.defaults.sandbox` 或 `agents.list[].sandbox`)。如果沙箱隔离关闭,工具在主机上运行。 Gateway 网关保留在主机上;启用时工具执行在隔离的沙箱中运行。 这不是完美的安全边界,但当模型做出愚蠢行为时,它实质性地限制了文件系统和进程访问。 ## 什么会被沙箱隔离 - 工具执行(`exec`、`read`、`write`、`edit`、`apply\_patch`、`process` 等)。 - 可选的沙箱浏览器(`agents.defa... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/sandboxing.md | main | opebclaw | [
0.0002712025889195502,
0.03869114816188812,
-0.04874282702803612,
-0.07497665286064148,
-0.0160160381346941,
-0.028322868049144745,
0.045238666236400604,
0.008577605709433556,
0.003095877356827259,
0.022483525797724724,
0.0796889215707779,
-0.053170543164014816,
0.044225648045539856,
-0.04... | 0.116988 |
# 多 Gateway 网关(同一主机) 大多数设置应该使用单个 Gateway 网关,因为一个 Gateway 网关可以处理多个消息连接和智能体。如果你需要更强的隔离或冗余(例如,救援机器人),请使用隔离的配置文件/端口运行多个 Gateway 网关。 ## 隔离检查清单(必需) - `OPENCLAW\_CONFIG\_PATH` — 每个实例的配置文件 - `OPENCLAW\_STATE\_DIR` — 每个实例的会话、凭证、缓存 - `agents.defaults.workspace` — 每个实例的工作区根目录 - `gateway.port`(或 `--port`)— 每个实例唯一 - 派生端口(浏览器/画布)不得重... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/multiple-gateways.md | main | opebclaw | [
-0.01691371202468872,
-0.009002240374684334,
-0.10861910134553909,
-0.060022078454494476,
-0.04485847428441048,
-0.025097111240029335,
-0.0178370364010334,
0.011616578325629234,
-0.02020200528204441,
-0.03070944733917713,
0.13461028039455414,
-0.021182000637054443,
-0.009143952280282974,
0... | 0.079025 |
# 工具调用(HTTP) OpenClaw 的 Gateway 网关暴露了一个简单的 HTTP 端点用于直接调用单个工具。它始终启用,但受 Gateway 网关认证和工具策略限制。 - `POST /tools/invoke` - 与 Gateway 网关相同的端口(WS + HTTP 多路复用):`http://:/tools/invoke` 默认最大负载大小为 2 MB。 ## 认证 使用 Gateway 网关认证配置。发送 bearer 令牌: - `Authorization: Bearer ` 说明: - 当 `gateway.auth.mode="token"` 时,使用 `gateway.auth.token`(或 `... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/tools-invoke-http-api.md | main | opebclaw | [
-0.06398747861385345,
0.022272109985351562,
-0.10653714835643768,
-0.01390471588820219,
-0.03668220341205597,
-0.10412793606519699,
-0.026749417185783386,
-0.00435708137229085,
0.031784672290086746,
-0.02722560055553913,
0.03369144722819328,
-0.048967331647872925,
0.05273815616965294,
-0.0... | 0.03004 |
# 心跳(Gateway 网关) > \*\*心跳 vs Cron?\*\* 参见 [Cron vs 心跳](/automation/cron-vs-heartbeat) 了解何时使用哪种方案。 心跳在主会话中运行\*\*周期性智能体轮次\*\*,使模型能够在不打扰你的情况下提醒需要关注的事项。 ## 快速开始(新手) 1. 保持心跳启用(默认 `30m`,Anthropic OAuth/setup-token 为 `1h`)或设置你自己的频率。 2. 在智能体工作区创建一个简单的 `HEARTBEAT.md` 检查清单(可选但推荐)。 3. 决定心跳消息发送到哪里(默认 `target: "last"`)。 4. 可选:启用心跳推... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/heartbeat.md | main | opebclaw | [
-0.03454979136586189,
0.05874961242079735,
-0.042515821754932404,
-0.07502507418394089,
-0.004439504351466894,
0.007381149102002382,
0.0813557580113411,
-0.020681478083133698,
0.08684661239385605,
-0.05066907778382301,
0.12275449931621552,
-0.009694664739072323,
0.08417058736085892,
-0.006... | 0.040391 |
OK,警报开启) | \_(无需配置)\_ | | 完全静默(无消息,无指示器) | `channels.defaults.heartbeat: { showOk: false, showAlerts: false, useIndicator: false }` | | 仅指示器(无消息) | `channels.defaults.heartbeat: { showOk: false, showAlerts: false, useIndicator: true }` | | 仅在一个渠道显示 OK | `channels.telegram.heartbeat: { showOk: true }` | ## HEARTBEAT.md(... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/heartbeat.md | main | opebclaw | [
-0.033186573535203934,
0.036915428936481476,
0.025811130180954933,
-0.03597240895032883,
0.004531858488917351,
0.011393931694328785,
0.030075743794441223,
-0.04876897111535072,
0.04588114842772484,
-0.05299113690853119,
0.10966145992279053,
-0.07742740958929062,
0.05077118054032326,
-0.014... | 0.100041 |
# Gateway 网关拥有的配对(选项 B) 在 Gateway 网关拥有的配对中,\*\*Gateway 网关\*\*是允许哪些节点加入的唯一信息源。UI(macOS 应用、未来的客户端)只是审批或拒绝待处理请求的前端。 \*\*重要:\*\*WS 节点在 `connect` 期间使用\*\*设备配对\*\*(角色 `node`)。`node.pair.\*` 是一个独立的配对存储,\*\*不会\*\*限制 WS 握手。只有显式调用 `node.pair.\*` 的客户端使用此流程。 ## 概念 - \*\*待处理请求\*\*:一个节点请求加入;需要审批。 - \*\*已配对节点\*\*:已批准的节点,带有已颁发的认证令牌。 -... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/pairing.md | main | opebclaw | [
-0.05850675702095032,
0.027616363018751144,
-0.012700970284640789,
-0.035827528685331345,
-0.018914056941866875,
-0.00041334284469485283,
0.054053351283073425,
-0.001386204268783331,
0.021802397444844246,
-0.02595745027065277,
0.10741928219795227,
-0.0318848118185997,
0.07333596795797348,
... | 0.095516 |
# OpenResponses API(HTTP) OpenClaw 的 Gateway 网关可以提供兼容 OpenResponses 的 `POST /v1/responses` 端点。 此端点\*\*默认禁用\*\*。请先在配置中启用。 - `POST /v1/responses` - 与 Gateway 网关相同的端口(WS + HTTP 多路复用):`http://:/v1/responses` 底层实现中,请求作为正常的 Gateway 网关智能体运行执行(与 `openclaw agent` 相同的代码路径),因此路由/权限/配置与你的 Gateway 网关一致。 ## 认证 使用 Gateway 网关认证配置。发送 b... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/openresponses-http-api.md | main | opebclaw | [
-0.054129280149936676,
0.016022605821490288,
-0.09103792905807495,
-0.014526060782372952,
-0.035048384219408035,
-0.09040839225053787,
0.009021509438753128,
-0.009327219799160957,
0.06914239376783371,
-0.03848417475819588,
0.04279759153723717,
-0.04653690755367279,
0.04494429752230644,
-0.... | 0.067779 |
# 沙箱 vs 工具策略 vs 提权 OpenClaw 有三个相关(但不同)的控制: 1. \*\*沙箱\*\*(`agents.defaults.sandbox.\*` / `agents.list[].sandbox.\*`)决定\*\*工具在哪里运行\*\*(Docker vs 主机)。 2. \*\*工具策略\*\*(`tools.\*`、`tools.sandbox.tools.\*`、`agents.list[].tools.\*`)决定\*\*哪些工具可用/允许\*\*。 3. \*\*提权\*\*(`tools.elevated.\*`、`agents.list[].tools.elevated.\*`)是一个\*\... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/sandbox-vs-tool-policy-vs-elevated.md | main | opebclaw | [
-0.03379768878221512,
0.06070360541343689,
-0.005788895767182112,
-0.07620295137166977,
0.01377100683748722,
-0.044181641191244125,
0.08239047229290009,
-0.039879489690065384,
0.02226845547556877,
-0.0029856159817427397,
0.12863920629024506,
-0.08368967473506927,
0.08318917453289032,
-0.01... | 0.084787 |
# 设备发现 & 传输协议 OpenClaw 有两个表面上看起来相似的不同问题: 1. \*\*操作员远程控制\*\*:macOS 菜单栏应用控制运行在其他地方的 Gateway 网关。 2. \*\*节点配对\*\*:iOS/Android(以及未来的节点)发现 Gateway 网关并安全配对。 设计目标是将所有网络发现/广播保留在 \*\*Node Gateway 网关\*\*(`openclaw gateway`)中,并让客户端(mac 应用、iOS)作为消费者。 ## 术语 - \*\*Gateway 网关\*\*:一个长期运行的 Gateway 网关进程,拥有状态(会话、配对、节点注册表)并运行渠道。大多数设置每台主机使用... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/discovery.md | main | opebclaw | [
-0.04193088412284851,
0.03222033381462097,
-0.013610499911010265,
-0.06195743754506111,
-0.03011319227516651,
-0.07982343435287476,
-0.026204220950603485,
0.007496146485209465,
0.013743855990469456,
-0.02873591147363186,
0.15661205351352692,
-0.04475267231464386,
0.05385410040616989,
-0.04... | 0.095069 |
# Gateway 网关锁 最后更新:2025-12-11 ## 原因 - 确保同一主机上每个基础端口只运行一个 Gateway 网关实例;额外的 Gateway 网关必须使用隔离的配置文件和唯一的端口。 - 在崩溃/SIGKILL 后不留下过时的锁文件。 - 当控制端口已被占用时快速失败并给出清晰的错误。 ## 机制 - Gateway 网关在启动时立即使用独占 TCP 监听器绑定 WebSocket 监听器(默认 `ws://127.0.0.1:18789`)。 - 如果绑定因 `EADDRINUSE` 失败,启动会抛出 `GatewayLockError("another gateway instance is already... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/gateway-lock.md | main | opebclaw | [
-0.08595145493745804,
-0.05308894068002701,
-0.02662070095539093,
-0.05117892473936081,
0.010080778039991856,
-0.04326307401061058,
0.048901818692684174,
-0.025311609730124474,
0.0626063421368599,
-0.03959690406918526,
0.07590382546186447,
-0.026990480720996857,
-0.004768918734043837,
-0.0... | 0.091976 |
# Gateway 网关服务运行手册 最后更新:2025-12-09 ## 是什么 - 拥有单一 Baileys/Telegram 连接和控制/事件平面的常驻进程。 - 替代旧版 `gateway` 命令。CLI 入口点:`openclaw gateway`。 - 运行直到停止;出现致命错误时以非零退出码退出,以便 supervisor 重启它。 ## 如何运行(本地) ```bash openclaw gateway --port 18789 # 在 stdio 中获取完整的调试/追踪日志: openclaw gateway --port 18789 --verbose # 如果端口被占用,终止监听器然后启动: openclaw ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/index.md | main | opebclaw | [
-0.02229447104036808,
0.007693274412304163,
-0.08963502943515778,
-0.037569258362054825,
-0.01244160532951355,
-0.09180298447608948,
-0.00894966721534729,
-0.009122242219746113,
-0.01049990113824606,
-0.02722323313355446,
0.0932687297463417,
0.012789573520421982,
-0.015212306752800941,
-0.... | 0.066029 |
根据从协议定义发出的 JSON Schema 验证每个入站帧。 - 客户端(TS/Swift)消费生成的类型(TS 直接使用;Swift 通过仓库的生成器)。 - 协议定义是真实来源;使用以下命令重新生成 schema/模型: - `pnpm protocol:gen` - `pnpm protocol:gen:swift` ## 连接快照 - `hello-ok` 包含带有 `presence`、`health`、`stateVersion` 和 `uptimeMs` 的 `snapshot`,以及 `policy {maxPayload,maxBufferedBytes,tickIntervalMs}`,这样客户端无需额外请求即... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/index.md | main | opebclaw | [
-0.03136071562767029,
-0.056056708097457886,
-0.05905509740114212,
-0.04575439542531967,
0.0204648245126009,
-0.05623405799269676,
0.03556731715798378,
0.06975863128900528,
-0.05537475645542145,
0.045561496168375015,
0.14060387015342712,
-0.011759532615542412,
0.025302372872829437,
-0.0016... | 0.169032 |
# 配置 🔧 OpenClaw 从 `~/.openclaw/openclaw.json` 读取可选的 \*\*JSON5\*\* 配置(支持注释和尾逗号)。 如果文件不存在,OpenClaw 使用安全的默认值(内置 Pi 智能体 + 按发送者分会话 + 工作区 `~/.openclaw/workspace`)。通常只在以下情况需要配置: - 限制谁可以触发机器人(`channels.whatsapp.allowFrom`、`channels.telegram.allowFrom` 等) - 控制群组白名单 + 提及行为(`channels.whatsapp.groups`、`channels.telegram.groups`、`... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.046300578862428665,
-0.014110397547483444,
-0.054301097989082336,
-0.028334949165582657,
-0.006931203883141279,
-0.06713148206472397,
0.05391942337155342,
-0.0442223884165287,
0.041589707136154175,
-0.0005342731019482017,
0.13305574655532837,
-0.022837268188595772,
0.00851702131330967,
... | 0.114327 |
}, // 合并广播配置 broadcast: { $include: ["./clients/mueller/broadcast.json5", "./clients/schmidt/broadcast.json5"], }, channels: { whatsapp: { groupPolicy: "allowlist" } }, } ``` ```json5 // ~/.openclaw/clients/mueller/agents.json5 [ { id: "mueller-transcribe", workspace: "~/clients/mueller/transcribe" }, { id: "mueller-do... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.023370621725916862,
0.006018498912453651,
-0.04048310965299606,
-0.029493045061826706,
0.03491194173693657,
-0.017361607402563095,
0.007811593357473612,
-0.02233842760324478,
0.033471010625362396,
-0.015474999323487282,
0.01994233764708042,
-0.014312504790723324,
-0.01203081663697958,
0... | 0.058658 |
### `channels.telegram.accounts` / `channels.discord.accounts` / `channels.googlechat.accounts` / `channels.slack.accounts` / `channels.mattermost.accounts` / `channels.signal.accounts` / `channels.imessage.accounts` 每个渠道运行多个账号(每个账号有自己的 `accountId` 和可选的 `name`): ```json5 { channels: { telegram: { accounts: { default: {... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.05241389572620392,
0.02513037621974945,
0.04643051326274872,
-0.020595459267497063,
0.02563171274960041,
-0.08634674549102783,
0.05829504132270813,
0.000006014348855387652,
0.033831264823675156,
-0.0021528895013034344,
0.002548938849940896,
-0.07510265707969666,
0.020950594916939735,
0.... | 0.104532 |
id: "family", workspace: "~/.openclaw/workspace-family", sandbox: { mode: "all", scope: "agent", workspaceAccess: "ro", }, tools: { allow: [ "read", "sessions_list", "sessions_history", "sessions_send", "sessions_spawn", "session_status", ], deny: ["write", "edit", "apply_patch", "exec", "process", "browser"], }, }, ],... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.05604925751686096,
0.09874370694160461,
-0.07250721752643585,
0.030647382140159607,
0.03662753105163574,
-0.049684781581163406,
0.013325228355824947,
-0.08279935270547867,
0.015749016776680946,
0.01528568472713232,
0.03465958312153816,
-0.04555126652121544,
-0.03344592824578285,
0.05481... | 0.096045 |
"Git backup" }, { command: "generate", description: "Create an image" }, ], historyLimit: 50, // 包含最近 N 条群消息作为上下文(0 禁用) replyToMode: "first", // off | first | all linkPreview: true, // 切换出站链接预览 streamMode: "partial", // off | partial | block(草稿流式传输;与分块流式传输分开) draftChunk: { // 可选;仅用于 streamMode=block minChars: 200, maxC... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.08402714133262634,
-0.0025863416958600283,
0.02900547720491886,
0.011785860173404217,
0.10137775540351868,
0.01025742944329977,
-0.05506536737084389,
0.008297501131892204,
0.10359533131122589,
0.04636711999773979,
0.051569487899541855,
-0.032867565751075745,
0.03598568215966225,
-0.0164... | 0.079832 |
allowBots: false, users: ["U123"], skills: ["docs"], systemPrompt: "Short answers only.", }, }, historyLimit: 50, // 包含最近 N 条频道/群组消息作为上下文(0 禁用) allowBots: false, reactionNotifications: "own", // off | own | all | allowlist reactionAllowlist: ["U123"], replyToMode: "off", // off | first | all thread: { historyScope: "th... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.06945228576660156,
0.002125112572684884,
-0.019009018316864967,
0.012078585103154182,
0.05509592220187187,
-0.025124266743659973,
0.005912791471928358,
0.010538625530898571,
-0.005363819655030966,
0.03899107128381729,
0.02226012758910656,
-0.05338558554649353,
0.02725091390311718,
0.030... | 0.128094 |
{ defaults: { timeFormat: "auto" } }, // auto | 12 | 24 } ``` ### `messages` 控制入站/出站前缀和可选的确认反应。 参见[消息](/concepts/messages)了解排队、会话和流式上下文。 ```json5 { messages: { responsePrefix: "🦞", // 或 "auto" ackReaction: "👀", ackReactionScope: "group-mentions", removeAckAfterReply: false, }, } ``` `responsePrefix` 应用于跨渠道的**所有出站回复**... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.09655541926622391,
0.06291285902261734,
0.04823344200849533,
0.009068054147064686,
0.01773454248905182,
-0.03365468606352806,
0.015344158746302128,
-0.0549280047416687,
0.10403710603713989,
-0.03394079953432083,
0.09267531335353851,
-0.04684928432106972,
-0.007459621410816908,
0.0239866... | 0.087129 |
sessionMode: "existing", systemPromptArg: "--system", systemPromptWhen: "first", imageArg: "--image", imageMode: "repeat", }, }, }, }, } ``` ```json5 { agents: { defaults: { models: { "anthropic/claude-opus-4-5": { alias: "Opus" }, "anthropic/claude-sonnet-4-1": { alias: "Sonnet" }, "openrouter/deepseek/deepseek-r1:fre... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.04714159294962883,
0.03214849904179573,
-0.013562440872192383,
-0.03837531432509422,
0.03875233232975006,
-0.023223133757710457,
-0.010533935390412807,
0.06380999833345413,
0.037081316113471985,
-0.010534471832215786,
0.020637134090065956,
-0.031877003610134125,
-0.04205050319433212,
0.... | 0.090786 |
`30m`。设为 `0m` 禁用。 - `model`:可选的心跳运行覆盖模型(`provider/model`)。 - `includeReasoning`:为 `true` 时,心跳也会传递单独的 `Reasoning:` 消息(与 `/reasoning on` 相同形式)。默认:`false`。 - `session`:可选的会话键,控制心跳在哪个会话中运行。默认:`main`。 - `to`:可选的收件人覆盖(渠道特定 id,例如 WhatsApp 的 E.164,Telegram 的聊天 id)。 - `target`:可选的投递渠道(`last`、`whatsapp`、`telegram`、`discord`、`sla... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.017903238534927368,
-0.019073020666837692,
-0.0032576259691268206,
-0.0169919915497303,
-0.00017083337297663093,
-0.032277971506118774,
0.08943890035152435,
-0.025591954588890076,
0.11306716501712799,
-0.039210472255945206,
0.08529374748468399,
-0.03497842699289322,
0.0831301286816597,
... | 0.104078 |
}, }, } ``` 每智能体覆盖(进一步限制): ```json5 { agents: { list: [ { id: "family", tools: { elevated: { enabled: false }, }, }, ], }, } ``` 说明: - `tools.elevated` 是全局基线。`agents.list[].tools.elevated` 只能进一步限制(两者都必须允许)。 - `/elevated on|off|ask|full` 按会话键存储状态;内联指令仅应用于单条消息。 - 提升的 `exec` 在主机上运行并绕过沙箱。 - 工具策略仍然适用;如果 `exec` 被拒绝,则无法使用提升。 ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.07997045665979385,
0.043352484703063965,
-0.07858803868293762,
-0.04911306872963905,
-0.015789102762937546,
-0.0323001854121685,
0.02501041069626808,
0.02673417702317238,
-0.026822306215763092,
0.0149610610678792,
0.17507323622703552,
-0.03626653924584389,
0.021737713366746902,
0.023870... | 0.096245 |
models: { "zai/glm-4.7": {} }, }, }, } ``` 说明: - `z.ai/*` 和 `z-ai/*` 是接受的别名,规范化为 `zai/*`。 - 如果缺少 `ZAI_API_KEY`,对 `zai/*` 的请求将在运行时因认证错误失败。 - 示例错误:`No API key found for provider "zai".` - Z.AI 的通用 API 端点是 `https://api.z.ai/api/paas/v4`。GLM 编码 请求使用专用编码端点 `https://api.z.ai/api/coding/paas/v4`。 内置的 `zai` 提供商使用编码端点。如果你需要通用 端... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.11325182765722275,
0.009538673795759678,
-0.07061924040317535,
-0.04319172725081444,
-0.046982694417238235,
-0.06894931942224503,
-0.041885215789079666,
-0.0060460832901299,
0.04639072343707085,
0.0048412964679300785,
0.09538288414478302,
-0.016065753996372223,
0.11067318916320801,
-0.0... | 0.039371 |
resetByType: { thread: { mode: "daily", atHour: 4 }, dm: { mode: "idle", idleMinutes: 240 }, group: { mode: "idle", idleMinutes: 120 }, }, resetTriggers: ["/new", "/reset"], // 默认已按智能体存储在 ~/.openclaw/agents//sessions/sessions.json // 你可以使用 {agentId} 模板进行覆盖: store: "~/.openclaw/agents/{agentId}/sessions/sessions.json", ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.07722112536430359,
0.030828628689050674,
-0.03236149251461029,
0.03737897425889969,
-0.018915796652436256,
-0.05401228740811348,
0.06344223022460938,
-0.041531696915626526,
0.04093564301729202,
0.028184490278363228,
0.06663259118795395,
-0.01524888165295124,
-0.04364509508013725,
0.0640... | 0.095853 |
// auth: { mode: "token", token: "your-token" } // token 控制 WS + 控制台 UI 访问 // tailscale: { mode: "off" | "serve" | "funnel" } }, } ``` 控制台 UI 基础路径: - `gateway.controlUi.basePath` 设置控制台 UI 提供服务的 URL 前缀。 - 示例:`"/ui"`、`"/openclaw"`、`"/apps/openclaw"`。 - 默认:根路径(`/`)(不变)。 - `gateway.controlUi.root` 设置控制台 UI 资产的文件系统根目录(默认:`d... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.05798589438199997,
-0.008459747768938541,
-0.0734727531671524,
0.01155705377459526,
-0.014647260308265686,
-0.08519089967012405,
0.010481269098818302,
0.057563334703445435,
0.021311640739440918,
-0.04662740230560303,
0.07638424634933472,
-0.057090919464826584,
0.04604192078113556,
-0.01... | 0.047248 |
- `?token=` 端点: - `POST /hooks/wake` → `{ text, mode?: "now"|"next-heartbeat" }` - `POST /hooks/agent` → `{ message, name?, sessionKey?, wakeMode?, deliver?, channel?, to?, model?, thinking?, timeoutSeconds? }` - `POST /hooks/` → 通过 `hooks.mappings` 解析 `/hooks/agent` 始终将摘要发布到主会话(并可通过 `wakeMode: "now"` 可选地触发即时心跳)。 映射说明:... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.07033881545066833,
0.055214595049619675,
0.019866082817316055,
-0.013198809698224068,
-0.005696575623005629,
-0.043517984449863434,
0.04120204225182533,
-0.02789814956486225,
0.07134198397397995,
-0.04859018325805664,
0.06108638644218445,
-0.11278200149536133,
0.0390668548643589,
-0.015... | 0.125497 |
描述 | | ------------------ | ----------------------------------------------------- | -------- | ------- | ---------- | ----- | ------ | -------- | ------- | ------- | --- | | `{{Body}}` | 完整的入站消息正文 | | `{{RawBody}}` | 原始入站消息正文(无历史/发送者包装;最适合命令解析) | | `{{BodyStripped}}` | 去除群组提及的正文(最适合智能体的默认值) | | `{{From}}` | 发送者标识符(What... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration.md | main | opebclaw | [
-0.09362505376338959,
0.07675555348396301,
-0.017257677391171455,
-0.042274653911590576,
-0.04328664764761925,
-0.026951787993311882,
0.028526611626148224,
0.04461471736431122,
-0.037098389118909836,
-0.04396571218967438,
0.16886380314826965,
-0.042549461126327515,
0.014738546684384346,
-0... | 0.074306 |
# 日志 面向用户的概览(CLI + Control UI + 配置),请参阅 [/logging](/logging)。 OpenClaw 有两个日志"界面": - \*\*控制台输出\*\*(你在终端 / Debug UI 中看到的内容)。 - \*\*文件日志\*\*(JSON 行)由 Gateway 网关日志记录器写入。 ## 基于文件的日志记录器 - 默认滚动日志文件位于 `/tmp/openclaw/` 下(每天一个文件):`openclaw-YYYY-MM-DD.log` - 日期使用 Gateway 网关主机的本地时区。 - 日志文件路径和级别可以通过 `~/.openclaw/openclaw.json` 配置: ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/logging.md | main | opebclaw | [
-0.07482770085334778,
0.06372084468603134,
-0.011256290599703789,
-0.019664671272039413,
-0.010389653034508228,
-0.10984209924936295,
0.04717358201742172,
0.008498887531459332,
0.005710557568818331,
-0.0023389135021716356,
0.1396763026714325,
-0.04037854075431824,
0.03294620290398598,
-0.0... | 0.133808 |
# 配置示例 以下示例与当前配置模式一致。有关详尽的参考和每个字段的说明,请参阅[配置](/gateway/configuration)。 ## 快速开始 ### 绝对最小配置 ```json5 { agent: { workspace: "~/.openclaw/workspace" }, channels: { whatsapp: { allowFrom: ["+15555550123"] } }, } ``` 保存到 `~/.openclaw/openclaw.json`,你就可以从该号码私信机器人了。 ### 推荐的入门配置 ```json5 { identity: { name: "Clawd", theme: "help... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration-examples.md | main | opebclaw | [
-0.08879018574953079,
0.05171731859445572,
0.03573896735906601,
-0.01946481317281723,
0.04560394585132599,
-0.05664586275815964,
0.014614157378673553,
-0.06090374290943146,
0.04421456530690193,
-0.052014049142599106,
0.07115183770656586,
-0.006627922412008047,
-0.039027824997901917,
0.0691... | 0.073902 |
}, memorySearch: { provider: "gemini", model: "gemini-embedding-001", remote: { apiKey: "${GEMINI\_API\_KEY}", }, extraPaths: ["../team-docs", "/srv/shared-notes"], }, sandbox: { mode: "non-main", perSession: true, workspaceRoot: "~/.openclaw/sandboxes", docker: { image: "openclaw-sandbox:bookworm-slim", workdir: "/wor... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration-examples.md | main | opebclaw | [
0.01219528540968895,
0.0577998049557209,
-0.05189365893602371,
0.01969953253865242,
0.050847627222537994,
-0.02641988918185234,
-0.08329415321350098,
0.009128489531576633,
0.021093247458338737,
-0.012746801599860191,
0.003341699717566371,
0.006964783649891615,
0.021027714014053345,
0.01413... | 0.061756 |
true }, }, }, }, } ``` ### 仅本地模型 ```json5 { agent: { workspace: "~/.openclaw/workspace", model: { primary: "lmstudio/minimax-m2.1-gs32" }, }, models: { mode: "merge", providers: { lmstudio: { baseUrl: "http://127.0.0.1:1234/v1", apiKey: "lmstudio", api: "openai-responses", models: [ { id: "minimax-m2.1-gs32", name: "Mi... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/configuration-examples.md | main | opebclaw | [
-0.008650860749185085,
0.019649934023618698,
0.012269887141883373,
0.03069971688091755,
0.019966544583439827,
-0.041265953332185745,
-0.03694257140159607,
0.002333781449124217,
0.023916974663734436,
-0.009216617792844772,
0.06539632380008698,
-0.06457434594631195,
0.044326990842819214,
0.0... | 0.031774 |
# 使用远程 Gateway 网关运行 OpenClaw.app OpenClaw.app 使用 SSH 隧道连接到远程 Gateway 网关。本指南向你展示如何设置。 ## 概述 ``` ┌─────────────────────────────────────────────────────────────┐ │ Client Machine │ │ │ │ OpenClaw.app ──► ws://127.0.0.1:18789 (local port) │ │ │ │ │ ▼ │ │ SSH Tunnel ────────────────────────────────────────────────│ │ │ │ └─... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/remote-gateway-readme.md | main | opebclaw | [
0.01714441552758217,
0.03351479023694992,
-0.07355393469333649,
-0.017565498128533363,
0.009325792081654072,
-0.08865145593881607,
-0.027265887707471848,
-0.015724709257483482,
0.021346399560570717,
0.028630737215280533,
0.06898017227649689,
-0.06021662801504135,
0.03476690500974655,
-0.00... | 0.074981 |
大多数操作通过 Gateway 网关(`openclaw gateway`)进行,它是一个长期运行的单一进程,负责管理渠道连接和 WebSocket 控制平面。 ## 核心规则 - 建议每台主机运行一个 Gateway 网关。它是唯一允许拥有 WhatsApp Web 会话的进程。对于救援机器人或严格隔离的场景,可以使用隔离的配置文件和端口运行多个 Gateway 网关。参见[多 Gateway 网关](/gateway/multiple-gateways)。 - 优先使用回环地址:Gateway 网关的 WS 默认为 `ws://127.0.0.1:18789`。即使是回环连接,向导也会默认生成 gateway token。若需通... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/network-model.md | main | opebclaw | [
-0.05050167813897133,
-0.02399885095655918,
-0.029958372935652733,
-0.0545944944024086,
-0.034227948635816574,
-0.07425244152545929,
0.03546973317861557,
0.054614271968603134,
0.07643604278564453,
-0.03274575620889664,
0.10019198805093765,
0.012522632256150246,
0.03204936161637306,
-0.0333... | 0.138924 |
# 后台 Exec + Process 工具 OpenClaw 通过 `exec` 工具运行 shell 命令,并将长时间运行的任务保存在内存中。`process` 工具管理这些后台会话。 ## exec 工具 关键参数: - `command`(必填) - `yieldMs`(默认 10000):在此延迟后自动转为后台运行 - `background`(布尔值):立即转为后台运行 - `timeout`(秒,默认 1800):在此超时后终止进程 - `elevated`(布尔值):如果启用/允许提权模式,则在宿主机上运行 - 需要真实 TTY?设置 `pty: true`。 - `workdir`、`env` 行为: - 前台运行... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/background-process.md | main | opebclaw | [
-0.03864535316824913,
0.03118709847331047,
-0.08522950112819672,
-0.045122917741537094,
-0.04513062536716461,
-0.049332089722156525,
-0.002900336403399706,
0.06386720389127731,
-0.00905346218496561,
0.023639269173145294,
0.11695791035890579,
-0.04580048844218254,
0.048576973378658295,
-0.0... | 0.063182 |
# 健康检查(CLI) 验证渠道连接的简短指南,无需猜测。 ## 快速检查 - `openclaw status` — 本地摘要:Gateway 网关可达性/模式、更新提示、已链接渠道认证时长、会话 + 最近活动。 - `openclaw status --all` — 完整本地诊断(只读、彩色、可安全粘贴用于调试)。 - `openclaw status --deep` — 还会探测运行中的 Gateway 网关(支持时进行每渠道探测)。 - `openclaw health --json` — 向运行中的 Gateway 网关请求完整健康快照(仅 WS;不直接访问 Baileys 套接字)。 - 在 WhatsApp/WebCh... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/health.md | main | opebclaw | [
-0.022981250658631325,
0.02395239658653736,
-0.00008198907744372264,
-0.036712124943733215,
-0.008060125634074211,
-0.11710209399461746,
-0.006393555551767349,
-0.030488234013319016,
0.014969788491725922,
-0.010308293625712395,
0.16226433217525482,
-0.010512798093259335,
0.030425701290369034... | 0.081316 |
# 远程访问(SSH、隧道和 tailnet) 本仓库通过在专用主机(桌面/服务器)上运行单个 Gateway 网关(主节点)并让客户端连接到它来支持"SSH 远程"。 - 对于\*\*操作员(你/macOS 应用)\*\*:SSH 隧道是通用的回退方案。 - 对于\*\*节点(iOS/Android 和未来的设备)\*\*:连接到 Gateway \*\*WebSocket\*\*(LAN/tailnet 或根据需要通过 SSH 隧道)。 ## 核心理念 - Gateway WebSocket 绑定到你配置端口的 \*\*loopback\*\*(默认为 18789)。 - 对于远程使用,你通过 SSH 转发该 loopback ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/remote.md | main | opebclaw | [
-0.032950595021247864,
-0.012757236137986183,
-0.028429696336388588,
-0.11562531441450119,
0.012404241599142551,
-0.04124622046947479,
0.029880380257964134,
-0.0137929143384099,
0.058052971959114075,
-0.05934182181954384,
0.15831105411052704,
-0.01267546322196722,
0.03992566466331482,
-0.0... | 0.081414 |
# Gateway 网关协议(WebSocket) Gateway 网关 WS 协议是 OpenClaw 的\*\*单一控制平面 + 节点传输\*\*。所有客户端(CLI、Web UI、macOS 应用、iOS/Android 节点、无头节点)都通过 WebSocket 连接,并在握手时声明其\*\*角色\*\* + \*\*作用域\*\*。 ## 传输 - WebSocket,带有 JSON 负载的文本帧。 - 第一帧\*\*必须\*\*是 `connect` 请求。 ## 握手(connect) Gateway 网关 → 客户端(连接前质询): ```json { "type": "event", "event": "conne... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/protocol.md | main | opebclaw | [
-0.0987711176276207,
0.016108408570289612,
0.014826824888586998,
-0.039696212857961655,
-0.040414534509181976,
-0.0787196233868599,
0.04428916051983833,
-0.03051033802330494,
0.06694606691598892,
-0.07281038165092468,
0.09550350159406662,
-0.06354717165231705,
0.001523124286904931,
0.01605... | 0.128673 |
# Bridge 协议(旧版节点传输) Bridge 协议是一个\*\*旧版\*\*节点传输(TCP JSONL)。新的节点客户端应该使用统一的 Gateway 网关 WebSocket 协议。 如果你正在构建操作者或节点客户端,请使用 [Gateway 网关协议](/gateway/protocol)。 \*\*注意:\*\* 当前的 OpenClaw 构建不再包含 TCP bridge 监听器;本文档仅作历史参考保留。 旧版 `bridge.\*` 配置键不再是配置模式的一部分。 ## 为什么我们有两种协议 - \*\*安全边界\*\*:bridge 暴露一个小的允许列表,而不是完整的 Gateway 网关 API 接口。 - ... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/bridge-protocol.md | main | opebclaw | [
-0.10276671499013901,
0.04874822497367859,
0.01164974644780159,
-0.07237420976161957,
-0.04875551536679268,
-0.0479370541870594,
0.033727485686540604,
0.014781561680138111,
0.041890427470207214,
-0.035300277173519135,
0.07858099043369293,
-0.03598097339272499,
0.05298687145113945,
-0.01851... | 0.099107 |
# 形式化验证(安全模型) 本页跟踪 OpenClaw 的\*\*形式化安全模型\*\*(目前是 TLA+/TLC;根据需要会增加更多)。 > 注意:一些较旧的链接可能引用以前的项目名称。 \*\*目标(北极星):\*\* 在明确的假设下,提供机器检查的论证,证明 OpenClaw 执行其预期的安全策略(授权、会话隔离、工具限制和错误配置安全)。 \*\*目前是什么:\*\* 一个可执行的、攻击者驱动的\*\*安全回归套件\*\*: - 每个声明都有一个在有限状态空间上运行的模型检查。 - 许多声明有一个配对的\*\*负面模型\*\*,为现实的错误类别生成反例轨迹。 \*\*目前还不是什么:\*\* 证明"OpenClaw 在所有方... | https://github.com/openclaw/openclaw/blob/main//docs/zh-CN/gateway/security/formal-verification.md | main | opebclaw | [
-0.04569867253303528,
0.049619708210229874,
0.03715435415506363,
-0.028037816286087036,
-0.03333244472742081,
0.029316937550902367,
0.0376548171043396,
-0.025370877236127853,
0.015475228428840637,
-0.061246857047080994,
0.1714017689228058,
-0.06511732935905457,
-0.0253272894769907,
-0.0250... | 0.034671 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.