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)。
介面卡指南
- Gateway 負責程序(啟動/停止與提供者生命週期綁定)。
- 讓 RPC 用戶端保持韌性:逾時、結束時重新啟動。
- 優先使用穩定 ID(例如
chat_id),而不是顯示字串。