coze-bridge 0.2.4-alpha.7 → 0.2.4-beta.1
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 +2 -8
- package/dist/index.js +118 -679
- package/package.json +6 -24
- package/bin/coze-bridge.js +0 -34
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 前置依赖
|
|
6
6
|
|
|
7
7
|
- **Node ≥ 20**
|
|
8
|
-
-
|
|
8
|
+
- 本机至少装好 `claude` / `codex` / `openclaw` 中的一个
|
|
9
9
|
|
|
10
10
|
## 用法
|
|
11
11
|
|
|
@@ -13,9 +13,6 @@
|
|
|
13
13
|
# 启动 / 复用 daemon, 投递 pair (云端 UI 复制粘贴一行, 唯一保留无 verb 的入口)
|
|
14
14
|
npx -y coze-bridge@latest --pat-token=<sat_xxx> --pair-code=<xxx>
|
|
15
15
|
|
|
16
|
-
# 已成功 pair 后,使用落盘 PAT 重建连接(不重新消费 pair-code)
|
|
17
|
-
coze-bridge connect
|
|
18
|
-
|
|
19
16
|
# 查 daemon 状态
|
|
20
17
|
coze-bridge status
|
|
21
18
|
|
|
@@ -47,12 +44,9 @@ coze-bridge service uninstall
|
|
|
47
44
|
|---|---|
|
|
48
45
|
| `--pat-token <sat_xxx>` | coze PAT token, 从 coze 平台拿 |
|
|
49
46
|
| `--pair-code <xxx>` | 配对码, 从云端 UI 拿 |
|
|
50
|
-
| `--device-id <id>` | 云端 Device / Project / Agent 定向重连命令提供的稳定硬件 ID;Bridge 会校验本机 ID,不应手工修改 |
|
|
51
47
|
|
|
52
48
|
支持 `--name VALUE` 与 `--name=VALUE` 两种写法。
|
|
53
49
|
|
|
54
|
-
通用首次配对命令可以在没有 Agent、Project 或 framework 时直接执行。云端已有设备或本地项目需要重连时,平台返回的命令会追加 `--device-id`;Bridge 只把它用于本机身份校验,不会改变 `_agent/pair` 协议。
|
|
55
|
-
|
|
56
50
|
### 自动 connect 某个 agent(可选)
|
|
57
51
|
|
|
58
52
|
| Flag | 说明 |
|
|
@@ -78,7 +72,7 @@ npx -y coze-bridge --pat-token=sat_xxx --pair-code=xxx --env=ppe_xxx
|
|
|
78
72
|
## 行为说明
|
|
79
73
|
|
|
80
74
|
- **daemon 启动自动复活 agents**: `~/.coze/agents/` 里所有未被云端主动 disconnect 的 agent, daemon 启动后会自动 spawn 子进程 + 加入路由, 不需要你一个个 reconnect
|
|
81
|
-
- **device 级 10s 批量心跳**: pair 成功后每 10s 上行 1 帧 `_agent/health
|
|
75
|
+
- **device 级 10s 批量心跳**: pair 成功后每 10s 上行 1 帧 `_agent/health`, 装该 device 下所有 eligible agent (`agents:[{agentId,status},...]`), 新 agent 上线毫秒级出首帧
|
|
82
76
|
- **deviceId 不持久化**: 每次 pair 由云端 handshake 接口分配, 切环境 / 重启 daemon 都用新值
|
|
83
77
|
- **cloud agent 跟本机 framework 解耦**: `_agent/create` 带 `_meta.cozeDeployType=cloud` 时 Bridge 直接 ack 不 spawn — agent 在云端跑, 本机没装对应 framework 也行
|
|
84
78
|
|