OpenClaw 跨实例通信桥接服务。通过 Webhook 和 WebSocket 实现多个 OpenClaw 实例之间的消息转发,附带实时监控面板。
├── src/
│ ├── server.js # 主服务(Express + Webhook 收发)
│ ├── websocket.js # WebSocket 实时监控
│ ├── dashboard.js # 监控面板后端
│ ├── message-logger.js # 消息日志
│ ├── core/
│ │ ├── sender.js # 消息发送
│ │ ├── status.js # 状态查询
│ │ └── tester.js # 连接测试
│ └── utils/
│ └── logger.js # 日志工具
├── bin/
│ ├── cli.js # 命令行工具
│ ├── setup.js # 交互式配置向导
│ ├── telegram-bridge.js # Telegram 桥接
│ ├── telegram-mention-handler.js # Telegram @提及处理
│ ├── auto-reply-api.py # 自动回复 API(Python)
│ ├── send-message.sh # 发消息脚本
│ └── send-telegram.sh # 发 Telegram 消息脚本
├── dashboard/ # Next.js 监控面板
├── scripts/ # 部署和测试脚本
├── docs/ # 部署文档
├── config.example.json # 配置模板
└── ecosystem.config.js # PM2 配置
# 安装依赖
npm install
# 交互式配置
npm run setup
# 或手动复制配置模板
cp config.example.json config.json
# 启动服务
npm start
# PM2 持久化运行
pm2 start ecosystem.config.js{
"mode": "webhook",
"server": {
"port": 18790,
"host": "0.0.0.0"
},
"auth": {
"type": "secret",
"secret": "your-shared-secret"
},
"peers": {
"summer": {
"name": "一夏",
"transport": "webhook",
"url": "http://their-server:18790/webhook",
"auth": { "secret": "shared-secret" }
}
}
}# 发送消息
node bin/cli.js send --to summer --message "你好!"
# 查看状态
node bin/cli.js status
# 测试连接
node bin/cli.js test --peer summer
# 查看日志
node bin/cli.js logs --tail 100# 启动面板(Next.js)
cd dashboard && pnpm install && pnpm dev
# 访问 http://localhost:3000# PM2 持久化
pm2 start ecosystem.config.js
pm2 save && pm2 startup详见 docs/deployment/ 下的部署文档。
- Node.js >= 18
- PM2(生产环境)
- pnpm(dashboard)
MIT