openclaw-bridge 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -16
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +809 -0
- package/dist/config.d.ts +3 -0
- package/dist/config.js +64 -0
- package/dist/discovery.d.ts +4 -0
- package/dist/discovery.js +6 -0
- package/dist/file-ops.d.ts +22 -0
- package/dist/file-ops.js +253 -0
- package/dist/heartbeat.d.ts +21 -0
- package/dist/heartbeat.js +152 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +624 -0
- package/dist/manager/hub-client.d.ts +18 -0
- package/dist/manager/hub-client.js +89 -0
- package/dist/manager/local-manager.d.ts +12 -0
- package/dist/manager/local-manager.js +117 -0
- package/dist/manager/pm2-bridge.d.ts +17 -0
- package/dist/manager/pm2-bridge.js +113 -0
- package/dist/message-relay.d.ts +32 -0
- package/dist/message-relay.js +229 -0
- package/dist/permissions.d.ts +3 -0
- package/dist/permissions.js +14 -0
- package/dist/registry.d.ts +13 -0
- package/dist/registry.js +103 -0
- package/dist/restart.d.ts +15 -0
- package/dist/restart.js +107 -0
- package/dist/router.d.ts +11 -0
- package/dist/router.js +18 -0
- package/dist/session.d.ts +11 -0
- package/dist/session.js +21 -0
- package/dist/types.d.ts +90 -0
- package/dist/types.js +1 -0
- package/openclaw.plugin.json +6 -92
- package/package.json +15 -5
- package/src/cli.ts +0 -842
- package/src/config.ts +0 -72
- package/src/discovery.ts +0 -17
- package/src/file-ops.ts +0 -320
- package/src/heartbeat.ts +0 -192
- package/src/index.ts +0 -681
- package/src/manager/hub-client.ts +0 -114
- package/src/manager/local-manager.ts +0 -121
- package/src/manager/pm2-bridge.ts +0 -125
- package/src/message-relay.ts +0 -184
- package/src/permissions.ts +0 -18
- package/src/registry.ts +0 -107
- package/src/restart.ts +0 -137
- package/src/router.ts +0 -40
- package/src/session.ts +0 -33
- package/src/types.ts +0 -100
- package/tsconfig.json +0 -14
package/README.md
CHANGED
|
@@ -9,27 +9,48 @@ The all-in-one client plugin for [OpenClaw](https://github.com/nicepkg/openclaw)
|
|
|
9
9
|
- **CLI Tools** — Setup, status, start/stop/restart, log viewing, backup, agent creation, diagnostics
|
|
10
10
|
- **Auto-Config** — Automatically patches missing settings on first run
|
|
11
11
|
|
|
12
|
-
##
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
### As OpenClaw Plugin (cross-gateway communication)
|
|
13
15
|
|
|
14
16
|
```bash
|
|
15
|
-
|
|
16
|
-
|
|
17
|
+
openclaw plugins install openclaw-bridge
|
|
18
|
+
```
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
Then configure in your `openclaw.json` — see [Plugin Configuration](#plugin-configuration) below.
|
|
21
|
+
|
|
22
|
+
### As CLI Tool (PM2 process management, optional)
|
|
20
23
|
|
|
21
|
-
|
|
24
|
+
```bash
|
|
25
|
+
npm install -g openclaw-bridge
|
|
26
|
+
openclaw-bridge setup
|
|
22
27
|
openclaw-bridge doctor
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Both (recommended)
|
|
23
31
|
|
|
24
|
-
|
|
25
|
-
openclaw-bridge start
|
|
32
|
+
The plugin provides bridge tools (discover, send_file, handoff, etc.) inside OpenClaw conversations. The CLI provides ops management (start/stop/restart agents, backup, diagnostics). They are independent and do not conflict.
|
|
26
33
|
|
|
27
|
-
|
|
28
|
-
|
|
34
|
+
### Upgrading
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
openclaw-bridge upgrade # updates both plugin and CLI automatically
|
|
29
38
|
```
|
|
30
39
|
|
|
31
40
|
**Prerequisites:** [openclaw-bridge-hub](https://www.npmjs.com/package/openclaw-bridge-hub) running on a server, PM2 installed globally (`npm install -g pm2`), Node.js 18+.
|
|
32
41
|
|
|
42
|
+
## What's New in v0.4.0
|
|
43
|
+
|
|
44
|
+
### Multi-Device Support
|
|
45
|
+
- **Automatic agentId Conflict Resolution** — If two machines use the same `agentId`, the second machine automatically renames to `agentId@hostname` (e.g., `main@MacBookPro`). No manual config change needed.
|
|
46
|
+
- **Proper Plugin Packaging** — Now ships compiled JavaScript. Installs correctly via `openclaw plugins install`.
|
|
47
|
+
- **Upgrade Command** — Run `openclaw-bridge upgrade` to update both plugin and CLI in one step.
|
|
48
|
+
|
|
49
|
+
### 多设备支持 (v0.4.0)
|
|
50
|
+
- **agentId 冲突自动解决** — 两台机器用相同 agentId 时,第二台自动改名为 `agentId@主机名`(如 `main@MacBookPro`),无需手动改配置。
|
|
51
|
+
- **规范打包** — 现在发布编译后的 JavaScript,通过 `openclaw plugins install` 正确安装。
|
|
52
|
+
- **一键升级** — 运行 `openclaw-bridge upgrade` 同时更新插件和 CLI。
|
|
53
|
+
|
|
33
54
|
## CLI Commands
|
|
34
55
|
|
|
35
56
|
| Command | Description |
|
|
@@ -44,6 +65,7 @@ openclaw-bridge status
|
|
|
44
65
|
| `clean-sessions` | Remove old/deleted session files to free disk space |
|
|
45
66
|
| `add-agent` | Wizard to create a new agent instance |
|
|
46
67
|
| `doctor` | Diagnose environment issues (PM2, Node, ports, Hub) |
|
|
68
|
+
| `upgrade` | Upgrade openclaw-bridge (plugin + CLI) |
|
|
47
69
|
|
|
48
70
|
### Adding a New Agent
|
|
49
71
|
|
|
@@ -194,14 +216,18 @@ openclaw-bridge 是 [OpenClaw](https://github.com/nicepkg/openclaw) 的一站式
|
|
|
194
216
|
- **CLI 工具** — 设置、状态查看、启停重启、日志、备份、创建 Agent、环境诊断
|
|
195
217
|
- **自动配置** — 首次启动自动补全推荐配置
|
|
196
218
|
|
|
197
|
-
###
|
|
219
|
+
### 安装
|
|
198
220
|
|
|
199
221
|
```bash
|
|
200
|
-
|
|
201
|
-
openclaw
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
openclaw-bridge
|
|
222
|
+
# 作为 OpenClaw 插件安装(跨网关通信)
|
|
223
|
+
openclaw plugins install openclaw-bridge
|
|
224
|
+
|
|
225
|
+
# 作为 CLI 工具安装(可选,用于 PM2 进程管理)
|
|
226
|
+
npm install -g openclaw-bridge
|
|
227
|
+
openclaw-bridge setup
|
|
228
|
+
|
|
229
|
+
# 一键升级
|
|
230
|
+
openclaw-bridge upgrade
|
|
205
231
|
```
|
|
206
232
|
|
|
207
233
|
### CLI 命令
|
|
@@ -218,6 +244,7 @@ openclaw-bridge status # 查看状态
|
|
|
218
244
|
| `clean-sessions` | 清理旧会话文件 |
|
|
219
245
|
| `add-agent` | 向导式创建新 agent |
|
|
220
246
|
| `doctor` | 环境诊断 |
|
|
247
|
+
| `upgrade` | 一键升级 openclaw-bridge(插件 + CLI) |
|
|
221
248
|
|
|
222
249
|
### 使用场景
|
|
223
250
|
|
package/dist/cli.d.ts
ADDED