@glittering0717/ai-browser 2.4.5 → 2.4.6

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
@@ -461,7 +461,9 @@ covers the things an agent genuinely cannot do:
461
461
  side, and nothing needs to. It is a conversation between the agent and its user:
462
462
 
463
463
  1. The agent hits something it cannot do.
464
- 2. It says so in chat, plainly: *"Please scan the QR code in the browser window, then reply 'done'."*
464
+ 2. It says so in its own reply, as plain text — *"Please scan the QR code in the browser window, then
465
+ reply 'done'."* No tool call is involved: there is no `chat` / `message` / `ask_user` tool in this
466
+ project, and no "spawn a side conversation" feature. Talking to the user is the agent's own job.
465
467
  3. It stops and waits for the reply — no retry loops on clicks that cannot work.
466
468
  4. After "done" it re-reads with `browse_get_tree` to confirm the new state, then continues.
467
469
 
@@ -38,8 +38,10 @@ success:true 只代表动作发出去了,不代表页面变了。要证明生
38
38
  canvas / 富文本),换动作不是换选择器;点了没反应 → browse_screenshot 看视觉 或
39
39
  browse_network 看请求;怀疑掉登录 → browse_auth_state;都不是 → browse_errors。
40
40
 
41
- 需要人(登录/扫码/滑块/支付):在对话里直接请用户在窗口里操作,收到"好了"再 browse_get_tree
42
- 确认。不要编造凭据,不要重试注定失败的点击。窗口是真的,人随时能抢鼠标。
41
+ 需要人(登录/扫码/滑块/支付):**在你这轮回复里直接说一句**,请用户在窗口里操作,然后结束这轮等
42
+ 回话;收到"好了"再 browse_get_tree 确认。这一步不需要任何工具——本项目没有 chat / message /
43
+ ask_user 这类工具,也没有"发起一次性会话",别去调宿主的临时对话能力。不要编造凭据,不要重试
44
+ 注定失败的点击。窗口是真的,人随时能抢鼠标。
43
45
 
44
46
  收尾:browse_quit 关掉窗口和进程(人正在操作时不要调)。
45
47
  ```
package/llms-install.md CHANGED
@@ -201,11 +201,14 @@ notifications. Use `browse_network` for pull-based inspection.
201
201
  ## Human hand-off
202
202
 
203
203
  When blocked by login, SSO, QR code, slider/image CAPTCHA, SMS/email code, or
204
- payment confirmation: stop, ask the user in chat to do it in the visible browser
205
- window and reply "done", wait for that reply, then re-read with
206
- `browse_get_tree` and continue. Never fabricate credentials or retry clicks that
207
- cannot succeed. Logins persist in the `persist:ai-browser` session partition
208
- (on disk under `~/.ai-browser`), so intervention is usually needed once per site.
204
+ payment confirmation: stop and ask the user **in your own reply** (plain text —
205
+ there is no `chat`/`message` tool here, and no side-conversation feature) to do
206
+ it in the visible browser window and reply "done", wait for that reply, then
207
+ re-read with `browse_get_tree` and continue. Never fabricate credentials or retry
208
+ clicks that cannot succeed. Logins persist in the `persist:ai-browser` session
209
+ partition (on disk under `~/.ai-browser`), so intervention is usually needed once
210
+ per site. While the user is typing or scanning, do **not** call `browse_quit` —
211
+ it closes the window and takes any half-finished work with it.
209
212
 
210
213
  ## Troubleshooting (common cases)
211
214
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@glittering0717/ai-browser",
3
- "version": "2.4.5",
3
+ "version": "2.4.6",
4
4
  "description": "AI-native browser — renders pixels for humans, structured semantic-tree API for agents. No screenshots, no OCR, no coordinate guessing.",
5
5
  "main": "src/main/index.js",
6
6
  "bin": {
@@ -46,7 +46,7 @@ ai-browser call ui.act '{"action":"click","target":"e:a-3"}' # 点它
46
46
 
47
47
  ## 需要人帮忙
48
48
 
49
- 登录、扫码、滑块、支付:请用户在窗口里操作,说"好了"再重读树;不要编造密码。
49
+ 登录扫码滑块支付:回复请人操作,好了再读树;无 chat/一次性会话工具,勿编密码。
50
50
 
51
51
  ## 按需深挖
52
52
 
@@ -55,6 +55,22 @@ browse_tabs {"op":"switch","tab":7,"show":true}
55
55
  用户点开你那一页只是"看",**不会**抢走你的目标;你继续在上面操作,他看到的是
56
56
  实时画面。要避免"我正要输入他却盯着看"的尴尬,就提前说一句。
57
57
 
58
+ ### 怎么"说一句"——不需要任何工具
59
+
60
+ **就在你这轮回复里写一句人话,然后结束这一轮、停下等回话。** 例如:
61
+
62
+ > 请在浏览器窗口里扫这个码,好了回我一句"好了"。
63
+
64
+ 收到"好了"之后再用 `browse_get_tree` 确认状态变了,才继续 —— 别把"用户说好了"
65
+ 当成"页面真的变了"。
66
+
67
+ - 本项目**没有** `chat` / `message` / `ask_user` 这类工具,也**没有**"发起一次性会话"
68
+ 的功能。去调宿主的临时对话/子对话不会让人去扫码,只会白绕一轮 —— 它是不是用完
69
+ 自动关闭,跟你这一轮任务没有任何关系,不用管。
70
+ - 交接发生在 agent 的对话里,**浏览器侧零改动**:窗口一直开着,人随时能抢鼠标。
71
+ - **人正在操作时不要 `browse_quit`**:它连窗口一起带走,做到一半的全没了。
72
+ - 别编造密码/验证码,也别重试注定失败的点击(滑块、风控拦截页)。
73
+
58
74
  ## 关于"后台"
59
75
 
60
76
  ```json
@@ -2,4 +2,4 @@
2
2
  // Kept in JS (not imported from package.json) to avoid Node import-attribute
3
3
  // (JSON module) compatibility issues inside Electron. package.json "version"
4
4
  // is manually synced to this value; tests assert they match.
5
- export const VERSION = '2.4.5';
5
+ export const VERSION = '2.4.6';