@jiulongw

Vibe Bridge

OpenClaw channel plugin that bridges WebSocket frames to OpenClaw via @vibeus/bridge-contracts.

当前版本
v0.2.1
code-plugin社区source-linked

vibe-bridge

OpenClaw channel plugin that bridges OpenClaw agents to the vibe-bridge WebSocket relay.

This is a two-way channel — inbound frames from the bridge become OpenClaw direct DMs, and the agent's reply is sent back over the same WebSocket with reply_to set to the inbound frame id.

Configuration

Add the following to your OpenClaw config (openclaw.json):

{
  "channels": {
    "vibe-bridge": {
      "pat": "your-vibe-pat",
      "event_type": "memo",
      "bridge_url": "wss://bridge.vibe.us",
      "reconnect_ms": 2000,
      "enabled": true
    }
  }
}
KeyRequiredDefaultDescription
patyesBearer personal access token for the bridge
event_typeyesSubscription channel name (sent as the ?event_type= query parameter)
bridge_urlnowss://bridge.vibe.usBridge base URL; point at ws://localhost:8787 for a local bridge
backendno(omitted)Set to dev to add an x-vibe-backend: dev header on the upgrade
reconnect_msno2000Delay before reconnecting after the socket closes
enablednotrueSet to false to disable the channel

Or via the CLI (the wizard maps --token/--audience/--base-url onto pat/event_type/bridge_url; backend and reconnect_ms need a manual edit to openclaw.json):

openclaw channels add --channel vibe-bridge --token "<pat>" --audience "<event-type>"

Wire format

Inbound frames (bridge → plugin):

{
  "id": "<frame-id>",
  "ts": 1730000000000,
  "content": { "text": "<message>" },
  "meta": { "user_id": "<sender>", "event_type": "memo" }
}

Outbound frames (plugin → bridge), emitted when the agent replies:

{
  "id": "<fresh-uuid>",
  "ts": 1730000000123,
  "reply_to": "<inbound frame id>",
  "content": { "text": "<reply>" }
}

How it works

  1. On startup, the plugin opens a WebSocket to ${bridge_url}/channels/subscribe?event_type=${event_type} with Authorization: Bearer ${pat} (and x-vibe-backend: ${backend} when set).
  2. Each inbound JSON frame is dispatched into OpenClaw as a direct DM via dispatchInboundDirectDmWithRuntime. meta.user_id becomes senderId; the rest of meta is flattened (string-coerced) into extraContext.
  3. When the OpenClaw agent replies, the plugin emits an outbound frame with reply_to set to the inbound frame.id back over the same socket.
  4. On socket close, the plugin reconnects after reconnect_ms until aborted.
  5. Handshake failures (e.g. 401 from a bad PAT) surface via the unexpected-response event with the HTTP status; the plugin keeps retrying.

源码与版本

源码仓库

vibeus/vibe-bridge-sdk

打开仓库

源码提交

dd03c0691f44bd4f39347dd4751b197c699482f9

查看提交

安装命令

openclaw plugins install clawhub:vibe-bridge

元数据

  • 包名: vibe-bridge
  • 创建时间: 2026/05/07
  • 更新时间: 2026/05/07
  • 执行代码:
  • 源码标签: main

兼容性

  • 构建于 OpenClaw: 2026.4.1
  • 插件 API 范围: >=2026.1.1
  • 标签: latest
  • 文件数: 15