← Back to Plugins
Channels

Vibearound Plugin Weixin Openclaw Bridge

jazzenchen By jazzenchen 👁 2 views ▲ 0 votes

Weixin Channel Plugin for VibeAround over OpenClaw

GitHub

Install

npm install
npm

Configuration Example

{
  "channels": {
    "weixin-openclaw-bridge": {
      "base_url": "https://ilinkai.weixin.qq.com",
      "bot_token": "optional-after-login",
      "account_id": "optional-after-login"
    }
  }
}

README

# VibeAround Weixin OpenClaw Bridge Plugin

Weixin channel plugin for VibeAround. Communicates with the Rust host via stdio JSON-RPC 2.0.

This plugin is implemented in-project and is not directly dependent on `@tencent-weixin/openclaw-weixin`, but its design and protocol path reference the OpenClaw Weixin ecosystem and the package [`@tencent-weixin/openclaw-weixin`](https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin).

It provides channel capabilities through the WeChat OpenClaw bot flow and a compatible OpenClaw / iLink-style HTTP API.

## Architecture

```
WeChat User โ†โ†’ OpenClaw / iLink HTTP API โ†โ†’ Plugin (Node.js) โ†โ†’ stdio JSON-RPC โ†โ†’ Rust Host
```

The plugin runs as a child process of the host. Messages are exchanged over stdin/stdout:
- Host โ†’ Plugin: `initialize`, `login_qr_start`, `login_qr_wait`, `shutdown`, agent stream notifications
- Plugin โ†’ Host: `on_message`, `plugin_log`

## Features

- QR login flow for WeChat OpenClaw bot authorization
- Long-polling inbound message consumption via `ilink/bot/getupdates`
- Outbound text message sending via `ilink/bot/sendmessage`
- Context token propagation for follow-up replies
- Lightweight stdio JSON-RPC bridge for VibeAround channel integration
- Compatible with `base_url`-driven OpenClaw / iLink-style deployments

## Project Structure

```
src/
โ”œโ”€โ”€ main.ts                 # Entry point, JSON-RPC router
โ”œโ”€โ”€ stdio.ts                # JSON-RPC 2.0 transport
โ”œโ”€โ”€ protocol.ts             # Host โ†” Plugin protocol types
โ”œโ”€โ”€ stdout-guard.ts         # Protects stdout for protocol-only output
โ”œโ”€โ”€ wechat-bridge.ts        # Bridge state, polling loop, message dispatch
โ”œโ”€โ”€ weixin-api.ts           # OpenClaw / iLink HTTP API wrapper
โ”œโ”€โ”€ login-qr.ts             # QR login start and confirmation polling
โ””โ”€โ”€ agent-stream.ts         # Agent event aggregation into outbound text
```

## Development

```bash
npm install
npm run build

# Watch mode
npm run dev
```

## Configuration

Add to VibeAround's `settings.json`:

```json
{
  "channels": {
    "weixin-openclaw-bridge": {
      "base_url": "https://ilinkai.weixin.qq.com",
      "bot_token": "optional-after-login",
      "account_id": "optional-after-login"
    }
  }
}
```

### Required Configuration

- `base_url`: Base URL of the compatible OpenClaw / iLink WeChat provider
- `bot_token`: Bot token returned after QR login
- `account_id`: Optional account identifier returned after authorization

## Manual Testing

```bash
npm run build
npm start
```

Then initialize the plugin from the VibeAround host, start QR login, scan with WeChat, and verify inbound and outbound text messaging.

## Protocol

JSON-RPC 2.0 over stdio, newline-delimited. See `src/protocol.ts` for details.

## Acknowledgements

This plugin references the design and usage path of [`@tencent-weixin/openclaw-weixin`](https://www.npmjs.com/package/@tencent-weixin/openclaw-weixin) and implements an in-project bridge tailored for VibeAround.
channels

Comments

Sign in to leave a comment

Loading comments...