@mearl/cloud-connector 2.7.1 → 2.7.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @mearl/cloud-connector
2
2
 
3
- 本地连接器,用于把云端 Agent 的操作转发到本地 native-host。原有云服务使用 WebSocket;
3
+ 本地连接器,用于把云端 Agent 的操作转发到本地 native-host。普通云模式使用 WebSocket;
4
4
  Qoder Cloud Agent 使用官方 Session API、SSE 事件流和 Client-Side 自定义工具。
5
5
 
6
6
  ## 安装
@@ -54,14 +54,14 @@ mearl-cloud-connector <command> [server-url] [options] # 管理后台守护进
54
54
  **示例:**
55
55
 
56
56
  ```bash
57
- # 前台运行(Ctrl+C 停止)—— 也是 native-host 拉起连接器的方式
58
- mearl-cloud-connector "ws://localhost:8080/ws?token=xxx"
57
+ # 后台启动一个自管理连接器,拥有独立日志文件(推荐)
58
+ mearl-cloud-connector start "wss://cloud.example.com/ws?token=xxx" --name work-mac
59
59
 
60
- # Qoder 异常接管;该地址由 npx @mearl/setup qoder --yes 生成
61
- mearl-cloud-connector "qoder://pair/pairing-code-1234?created=1786723200000"
60
+ # Qoder 配对模式;地址由 npx @mearl/setup --qoder-cloud --yes 生成
61
+ mearl-cloud-connector start "qoder://pair/pairing-code-1234?created=1786723200000"
62
62
 
63
- # 后台启动一个自管理连接器,拥有独立日志文件
64
- mearl-cloud-connector start "wss://cloud.example.com/ws?token=xxx" --name work-mac
63
+ # 前台运行,仅用于排障或交给 systemd / PM2 等外部进程管理器
64
+ mearl-cloud-connector "ws://localhost:8080/ws?token=xxx"
65
65
 
66
66
  # 查看状态 / 列表 / 日志
67
67
  mearl-cloud-connector status
@@ -73,9 +73,13 @@ mearl-cloud-connector stop "wss://cloud.example.com/ws?token=xxx"
73
73
  mearl-cloud-connector stop --all
74
74
 
75
75
  # 自定义心跳和重连配置
76
- mearl-cloud-connector "ws://localhost:8080/ws?token=xxx" --heartbeat 60 --max-reconnect 10
76
+ mearl-cloud-connector start "ws://localhost:8080/ws?token=xxx" --heartbeat 60 --max-reconnect 10
77
77
  ```
78
78
 
79
+ `start` 会在连接成功后返回,后台进程继续运行。Qoder 配对时请紧接着提交 setup 输出的
80
+ `pair` 工具调用;如果配对工具调用已经结束、取消或过期,需要重新生成配对 URL,旧 URL
81
+ 不能重复使用。
82
+
79
83
  ### 编程方式
80
84
 
81
85
  ```typescript
@@ -167,7 +171,8 @@ security add-generic-password -U -a "$USER" -s com.mearl.qoder.pat -w
167
171
  Chrome Extension / CDP
168
172
  ```
169
173
 
170
- Qoder 异常接管路径不经过 `@mearl/cloud-server`:
174
+ Qoder 配对信息由 `mearl-cloud-server start` 统一生成;配对后的运行时转发不经过常驻
175
+ cloud-server 服务:
171
176
 
172
177
  ```
173
178
  Qoder Cloud Agent(mearl Client-Side 自定义工具)