@mearl/native-host 2.14.0 → 2.15.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 +11 -12
- package/dist/index.js +61 -570
- package/package.json +6 -7
package/README.md
CHANGED
|
@@ -45,14 +45,22 @@ mearl-native-host [options]
|
|
|
45
45
|
--daemon 独立 CDP daemon
|
|
46
46
|
--cdp-port <port> 指定 CDP 端口
|
|
47
47
|
--cdp-user-data-dir <dir> 指定 Chrome Profile
|
|
48
|
-
--
|
|
49
|
-
--
|
|
48
|
+
--cdp-endpoint-file <path> 从文件读取私有远端 CDP WebSocket URL
|
|
49
|
+
--skip-browser-registration 不把 Provider 私有 CDP 运行时注册为独立浏览器
|
|
50
50
|
--browser-id <id> 指定浏览器注册 ID
|
|
51
51
|
--browser-name <name> 指定浏览器显示名称
|
|
52
52
|
--version, -v 查看版本
|
|
53
53
|
--help, -h 查看帮助
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
手工以显式 CDP/浏览器参数启动 daemon 时,native-host 会把解析后的参数写入 `~/.mearl/config.json` 的 `nativeHost.daemon` 字段。之后 client 自动拉起 daemon 时会复用这些参数:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
mearl-native-host --daemon --cdp-port 9222 --browser-name sandbox-chromium
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
不带显式 CDP/浏览器参数的 `--daemon` 不会覆盖已保存的配置。
|
|
63
|
+
|
|
56
64
|
## 架构
|
|
57
65
|
|
|
58
66
|
```
|
|
@@ -63,16 +71,7 @@ Chrome Extension
|
|
|
63
71
|
@mearl/client / @mearl/cloud-connector
|
|
64
72
|
```
|
|
65
73
|
|
|
66
|
-
`browser_launch` 会为每个托管 Chrome 启动一个带独立 CDP 配置的 native-host 子进程,使多个 headless/Profile
|
|
67
|
-
|
|
68
|
-
AgentBay 会话创建时使用官方 `LifecyclePolicy`:默认 30 分钟没有 Mearl 指令时由本地宿主执行优雅关闭,120 分钟达到云端最大运行时长时由 AgentBay 强制释放。优雅关闭会先同步持久化 Browser Context,再删除 Session 和本地注册记录;执行中的 Mearl action 不计为空闲。正常任务仍应主动调用 `browser_close`,超时只用于异常退出兜底。
|
|
69
|
-
|
|
70
|
-
运维环境可覆盖默认值;两项均为正整数分钟,空闲时间至少为 3,最大运行时长不得小于空闲时间:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
MEARL_AGENTBAY_IDLE_RELEASE_MINUTES=30
|
|
74
|
-
MEARL_AGENTBAY_MAX_RUNTIME_MINUTES=120
|
|
75
|
-
```
|
|
74
|
+
`browser_launch` 会为每个托管 Chrome 启动一个带独立 CDP 配置的 native-host 子进程,使多个 headless/Profile 实例可以同时被现有浏览器注册表寻址。外部 Provider 也可使用私有远端 CDP 模式复用同一套通用页面 action;远端服务的凭据、生命周期和文件中转仍由 Provider 自己负责。
|
|
76
75
|
|
|
77
76
|
## 侧边栏 Agent Chat
|
|
78
77
|
|