OpenClaw 通过 JSON-RPC 集成外部 CLI。目前使用两种模式。Documentation Index
Fetch the complete documentation index at: https://docs.openclaw.ai/llms.txt
Use this file to discover all available pages before exploring further.
模式 A:HTTP 守护进程(signal-cli)
signal-cli以守护进程方式运行,通过 HTTP 提供 JSON-RPC。- 事件流使用 SSE(
/api/v1/events)。 - 健康探针:
/api/v1/check。 - 当
channels.signal.autoStart=true时,OpenClaw 持有其生命周期。
模式 B:stdio 子进程(旧版:imsg)
注意: 对于新的 iMessage 设置,请改用 BlueBubbles。
- OpenClaw 将
imsg rpc作为子进程启动(旧版 iMessage 集成)。 - JSON-RPC 通过 stdin/stdout 以行分隔方式传输(每行一个 JSON 对象)。
- 不需要 TCP 端口,也不需要守护进程。
watch.subscribe→ 通知(method: "message")watch.unsubscribesendchats.list(探测/诊断)
chat_id),请参阅 iMessage。
适配器指南
- Gateway 网关持有进程(启动/停止与提供商生命周期绑定)。
- 保持 RPC 客户端具备韧性:超时、退出后重启。
- 优先使用稳定 ID(例如
chat_id),而不是显示字符串。