跳转到主要内容

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.

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

模式 B:stdio 子进程(旧版:imsg)

注意: 对于新的 iMessage 设置,请改用 BlueBubbles
  • OpenClaw 将 imsg rpc 作为子进程启动(旧版 iMessage 集成)。
  • JSON-RPC 通过 stdin/stdout 以行分隔方式传输(每行一个 JSON 对象)。
  • 不需要 TCP 端口,也不需要守护进程。
使用的核心方法:
  • watch.subscribe → 通知(method: "message"
  • watch.unsubscribe
  • send
  • chats.list(探测/诊断)
有关旧版设置和寻址(优先使用 chat_id),请参阅 iMessage

适配器指南

  • Gateway 网关持有进程(启动/停止与提供商生命周期绑定)。
  • 保持 RPC 客户端具备韧性:超时、退出后重启。
  • 优先使用稳定 ID(例如 chat_id),而不是显示字符串。

相关