@sleepinsummer/agent-browser-cli 0.3.1-beta.2 → 0.3.2

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/CHANGELOG.md CHANGED
@@ -2,30 +2,13 @@
2
2
 
3
3
  所有重要变更都会记录在这里。日期使用北京时间自然日。
4
4
 
5
- ## v0.3.1-beta.2 - 2026-05-17
5
+ ## v0.3.2 - 2026-05-17
6
6
 
7
- ### 新增
8
-
9
- - 新增多浏览器 / 多 Chrome Profile 会话隔离:扩展上报 `browser_id`、`profile_id`,daemon 内部使用 `session_key = browser_id:profile_id:tab_id` 路由。
10
- - CLI 主要浏览器命令新增 `--browser` 和 `--profile`,支持按浏览器实例和 Profile 过滤/定位 tab。
11
- - `tabs` 输出新增 `browser_id`、`profile_id`、`profile_label`、`tab_id`、`session_key`。
12
- - `open` 新增 `--window`,支持新开独立 Chrome 窗口。
13
- - `open` 新增 `--focus`,只有显式传入时才请求聚焦窗口。
14
- - `open --window --group-title/--session` 支持对新窗口首个 tab 创建 Chrome tab group。
15
-
16
- ### 调整
17
-
18
- - `open` 返回结构改为以新打开目标为主:`opened_tab_id`、`opened_session_key`、`window_id`、`window`、`group`。旧执行通道移入 `metadata.executor`,避免 AI 误用旧 tab。
19
- - daemon 在默认 session 失效时会回退到当前 active session,避免重启后卡在旧 `session_key`。
20
- - `snapshot`、`@e` 缓存、调试缓存、截图/PDF、network/console 等路径统一按 `session_key` 隔离。
21
- - skill 文档补充多 Profile、多浏览器、`open --window`、`--focus` 和 `opened_tab_id` 使用说明。
22
-
23
- ### 验证
7
+ ### 修复
24
8
 
25
- - 已覆盖真实 Chrome 场景:多 Profile 字段上报、`tabs --profile`、`exec/scan/snapshot/click/screenshot/save-pdf/network/console --profile --tab`、`open` tab/window/background/focus/group/session 组合、关闭测试 tab。
26
- - 已执行 `cargo fmt --check`、`cargo check`、`cargo build`、`cargo test`、`node --check`、`npm pack --dry-run`。
9
+ - 修复长 URL 页面中 `snapshot` 后立即使用 `@e` 可能误报 `ref expired` 的问题。
27
10
 
28
- ## v0.3.1-beta.1 - 2026-05-16
11
+ ## v0.3.1 - 2026-05-17
29
12
 
30
13
  ### 新增
31
14
 
@@ -34,27 +17,37 @@
34
17
  - 新增 `install-skill`:支持 `--dry-run` 和 `--yes`,用于安装/更新 Agent skill。
35
18
  - 增强 `status`:新增 `healthy`、`summary`、`message`,保留旧字段。
36
19
  - 新增 `snapshot`:基于 Chrome Accessibility Tree 生成 `@e` 操作引用,支持 `--offset`、`--limit`、`--details`、`--tab`。
37
- - 新增高层操作命令:`click`、`fill`、`send-keys`、`mouse-click`。
20
+ - 新增高层操作命令:`click`、`fill`、`send-keys`、`mouse-click`,支持 `--monitor`、`--wait-js`、`--wait-timeout`。
38
21
  - 新增 `screenshot`:支持视口截图、全页截图、元素截图、PNG/JPEG、默认落盘目录。
39
22
  - 新增 `save-pdf`:支持纸张、横向、缩放、打印背景、默认文件名清理和 50MB 上限。
40
23
  - 新增 `network` 调试命令:`start`、`list`、`detail`、`clear`、`stop`。
41
24
  - 新增 `console` 调试命令:`start`、`list`、`clear`、`stop`。
25
+ - 新增多浏览器 / 多 Chrome Profile 会话隔离:扩展上报 `browser_id`、`profile_id`、`profile_label`,daemon 内部使用 `session_key = browser_id:profile_id:tab_id` 路由。
26
+ - CLI 主要浏览器命令新增 `--browser` 和 `--profile`,支持按浏览器实例和 Profile 过滤/定位 tab。
27
+ - `tabs` 输出新增 `browser_id`、`profile_id`、`profile_label`、`tab_id`、`session_key`。
42
28
  - `open` 新增 `--session` 和 `--group-title`,支持 Chrome 原生 tab group。
29
+ - `open` 新增 `--window`,支持新开独立 Chrome 窗口。
30
+ - `open` 新增 `--focus`,只有显式传入时才请求聚焦窗口。
31
+ - `open --window --group-title/--session` 支持对新窗口首个 tab 创建 Chrome tab group。
43
32
  - 新增 `close --tab <tabId>`,通过扩展原生 `chrome.tabs.remove` 关闭标签页。
44
- - Chrome 扩展新增 bot 图标,显示名改为 `Agent Browser CLI Bridge`。
45
- - daemon 退出时清理 daemon 缓存,并通知扩展清理 network/console 调试缓存。
33
+ - Chrome 扩展新增图标,显示名改为 `Agent Browser CLI Bridge`。
46
34
 
47
35
  ### 调整
48
36
 
37
+ - `open` 返回结构改为以新打开目标为主:`opened_tab_id`、`opened_session_key`、`window_id`、`window`、`group`。旧执行通道移入 `metadata.executor`,避免 AI 误用旧 tab。
38
+ - daemon 在默认 session 失效时会回退到当前 active session,避免重启后卡在旧 `session_key`。
39
+ - `snapshot`、`@e` 缓存、调试缓存、截图/PDF、network/console 等路径统一按 `session_key` 隔离。
49
40
  - daemon stdout/stderr 日志固定写入用户目录,不再落到当前目录或 npm 包目录。
50
41
  - npm wrapper 设置 `AGENT_BROWSER_CLI_PACKAGE_DIR`,方便全局安装后定位内置 skill。
51
42
  - `network stop` / `console stop` 会停止监听并清理对应缓存。
52
- - skill 文档重写为 Agent 操作 SOP,明确 `scan`、`snapshot`、`exec/CDP` 的职责边界。
43
+ - daemon 退出时清理 daemon 缓存,并通知扩展清理 network/console 调试缓存。
44
+ - skill 文档重写为 Agent 操作 SOP,明确 `scan`、`snapshot`、`exec/CDP` 的职责边界,并补充多 Profile、多浏览器、`open --window`、`--focus` 和 `opened_tab_id` 使用说明。
53
45
 
54
46
  ### 验证
55
47
 
56
48
  - 已覆盖真实 Chrome 场景:百度搜索、页面扫描、DOM 定位、输入/点击、截图、PDF、network/console 监听、缓存清理、tab group、关闭测试 tab。
57
- - 已执行 `cargo fmt --check`、`cargo check`、`cargo build`、`cargo test`、`node --check`。
49
+ - 已覆盖多 Profile 字段上报、`tabs --profile`、`tabs --browser --profile`、`exec/scan/snapshot/click/fill/send-keys/mouse-click/screenshot/save-pdf/network/console --profile --tab`、`open` tab/window/background/focus/group/session 组合。
50
+ - 已执行 `cargo fmt --check`、`cargo check`、`cargo build`、`cargo test`、`node --check`、`npm pack --dry-run`。
58
51
 
59
52
  ## v0.2.10-extension - 2026-05-15
60
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleepinsummer/agent-browser-cli",
3
- "version": "0.3.1-beta.2",
3
+ "version": "0.3.2",
4
4
  "description": "Agent-oriented browser sensing and control CLI backed by a native Rust daemon.",
5
5
  "license": "MIT",
6
6
  "bin": {
@@ -24,11 +24,11 @@
24
24
  "postinstall": "node npm/postinstall.js"
25
25
  },
26
26
  "optionalDependencies": {
27
- "@sleepinsummer/agent-browser-cli-darwin-arm64": "0.3.1-beta.2",
28
- "@sleepinsummer/agent-browser-cli-darwin-x64": "0.3.1-beta.2",
29
- "@sleepinsummer/agent-browser-cli-linux-x64": "0.3.1-beta.2",
30
- "@sleepinsummer/agent-browser-cli-linux-arm64": "0.3.1-beta.2",
31
- "@sleepinsummer/agent-browser-cli-win32-x64": "0.3.1-beta.2"
27
+ "@sleepinsummer/agent-browser-cli-darwin-arm64": "0.3.2",
28
+ "@sleepinsummer/agent-browser-cli-darwin-x64": "0.3.2",
29
+ "@sleepinsummer/agent-browser-cli-linux-x64": "0.3.2",
30
+ "@sleepinsummer/agent-browser-cli-linux-arm64": "0.3.2",
31
+ "@sleepinsummer/agent-browser-cli-win32-x64": "0.3.2"
32
32
  },
33
33
  "engines": {
34
34
  "node": ">=18"