@qqbrowser/qbot-dsh 0.1.3 → 0.1.4
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/config/agent-presets/code/agent.cordis.yml +3 -0
- package/config/agent-presets/minimal/agent.cordis.yml +6 -1
- package/config/agent-presets/standard/agent.cordis.yml +3 -0
- package/config/skills/bilibili-video-download/SKILL.md +99 -0
- package/config/skills/bilibili-video-download/bilibili.webmcp.tools.js +53 -0
- package/config/skills/qqbrowser-use/SKILL.md +444 -0
- package/config/skills/qqbrowser-use/references/commands-extended.md +74 -0
- package/config/skills/qqbrowser-use/references/playbook.md +671 -0
- package/config/skills/qqbrowser-use/references/session-lifecycle.md +102 -0
- package/cordis.patch.yml +5 -0
- package/lib/client.js +1 -1
- package/lib/index.js +4 -1
- package/lib/sandbox-local.js +1 -0
- package/node_modules/@deepseek-ai/cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/cordis-plugin-include/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-default-model/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-instructions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-loop/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-agent-tool-presentation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-anonymous-user-id/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-api-remotes/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-app-boot/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-attachment-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-base/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-bash-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-connection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-hmr/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-locale/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-runtime/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-agent-preset/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-attachment/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/lib/client.js +6 -6
- package/node_modules/@deepseek-ai/dsh-client-ui-conversation/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-deliverables/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-input-trigger/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-layout/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-model-selection/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-plan/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-general/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-models/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-settings-plugins/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-sidebar/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-theme/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-tool/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/lib/client.js +2 -2
- package/node_modules/@deepseek-ai/dsh-client-ui-trajectory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workflow-run/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/lib/client.js +1 -1
- package/node_modules/@deepseek-ai/dsh-client-ui-workspace/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-client-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-compact/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-command-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-commands/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-basic/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-compaction-tool-result-pruner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-client-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-cordis-host-runner/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-credentials-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-observation-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-fs-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-goal-round-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-headless/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-apiproxy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-auto/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-browse/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-directory-picker-native/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-plugin-inventory/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-host-webserver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-jobs-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-deepseek/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-pi-ai/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-llm-retry/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-mcp-client/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-message-feedback/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-permission-presets/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-plan-mode/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-pwsh-sandbox/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-repeat-tool-reminder/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-sandbox-windows-acl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-schedule/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-checkpoint-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-log-export/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-persistence-jsonl/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-projection-cache/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-query-sqlite/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-reference/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-stats/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-telemetry-otel/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-first-prompt-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-session-title-llm/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-settings-file/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-shell-env/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-badge/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-skill-filesystem/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-spill-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-domain/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-storage-json/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-fork-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-in-process-driver/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subagent-spawn-in-process/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-subprocess-local/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-terminal-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-time-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tmux-context/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-token-meter/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ask-user/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-bash-persistent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-call-timeout-policy/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-cordis/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-fs-search/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-goal/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-jobs/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-pwsh/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-ralph/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-skill/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-str-replace-editor/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-control/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-subagent-report/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-todo/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tool-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-tools/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-loader/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-typert-protocol/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-approval/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-user-questions/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-app/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-web-search-deepseek/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workflow-worker-thread/package.json +1 -1
- package/node_modules/@deepseek-ai/dsh-workspace/package.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: qqbrowser-use
|
|
3
|
+
description: "Browser automation CLI for AI agents. Use when: (1) the user asks to open, navigate, or interact with a website; (2) the user needs to fill forms, click buttons, take screenshots, download files, or inspect page state; (3) the user asks to extract structured data from web pages; (4) the user asks to record, save, or reuse a browser task, such as 保存为脚本, 录一下, or 下次还要用; (5) the user asks to run an existing playbook. Do NOT use for pure questions about HTML, CSS, or JavaScript without an actual browser task."
|
|
4
|
+
source: https://pypi.org/project/qqbrowser-skill/
|
|
5
|
+
homepage: https://browser.qq.com/
|
|
6
|
+
permissions:
|
|
7
|
+
- network: Required for browser navigation and web page interaction
|
|
8
|
+
- filesystem: Required for downloading files and saving screenshots to temporary directories
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
# QQBrowserUse
|
|
12
|
+
|
|
13
|
+
Browser automation CLI for AI agents. Wraps every task in an isolated Chrome Tab Group, supports both live automation and reusable playbook replay.
|
|
14
|
+
|
|
15
|
+
## Platform Support
|
|
16
|
+
|
|
17
|
+
Linux x86_64, Windows, macOS. Other Linux architectures (ARM, etc.) are not supported.
|
|
18
|
+
|
|
19
|
+
## Installation
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Linux / macOS
|
|
23
|
+
pipx install qqbrowser-skill
|
|
24
|
+
qqbrowser-skill install # Download and install QQ Browser
|
|
25
|
+
|
|
26
|
+
# Windows
|
|
27
|
+
pip install qqbrowser-skill
|
|
28
|
+
qqbrowser-skill install
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Daemon Startup (MANDATORY)
|
|
32
|
+
|
|
33
|
+
`qqbrowser-skill` runs as a Python daemon. The AI client (e.g. qbotclaw) MUST start it before any browser automation: it opens the WebSocket channel to the browser extension that every `browser_*` command travels over.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
qqbrowser-skill serve --daemon --from-qbotclaw --ws-port=8765
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Both flags are REQUIRED:
|
|
40
|
+
|
|
41
|
+
| Flag | Why |
|
|
42
|
+
|------|-----|
|
|
43
|
+
| `--from-qbotclaw` | Caller identity, recorded by the daemon for tracing and log attribution. Never omit it. |
|
|
44
|
+
| `--ws-port=<port>` | WebSocket port the daemon listens on. Defaults to `8765`; the client session MUST use the same port. |
|
|
45
|
+
|
|
46
|
+
⛔ Do NOT run `browser_start_session` or any other `browser_*` command until the daemon is started and the WebSocket channel is ready.
|
|
47
|
+
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
qqbrowser-skill serve --daemon --from-qbotclaw --ws-port=8765 # ⛔ daemon first, see Daemon Startup
|
|
52
|
+
qqbrowser-skill browser_start_session --sessionId task-demo-001
|
|
53
|
+
qqbrowser-skill playbook_list # Check existing playbooks first
|
|
54
|
+
qqbrowser-skill browser_go_to_url --url https://example.com
|
|
55
|
+
qqbrowser-skill browser_snapshot # Get elements with encoded indices
|
|
56
|
+
qqbrowser-skill browser_click_element --index "<index-from-snapshot>"
|
|
57
|
+
qqbrowser-skill browser_end_session --sessionId task-demo-001
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Commands
|
|
63
|
+
|
|
64
|
+
### Session Management
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
browser_start_session --sessionId <id> [--title "<title>"] [--color <color>] [--initialUrl <url>]
|
|
68
|
+
browser_end_session --sessionId <id>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
> Isolation mode is fixed to `enforce` — `browser_start_session` does not accept an `--isolation` flag.
|
|
72
|
+
|
|
73
|
+
### Navigation
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
browser_go_to_url --url <url>
|
|
77
|
+
browser_go_back
|
|
78
|
+
browser_wait --seconds <n> # Default 3s
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### Snapshot & Screenshot
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
browser_snapshot # Element indices (for interaction)
|
|
85
|
+
browser_snapshot --markdown # Markdown (for reading)
|
|
86
|
+
browser_screenshot [--full] [--annotate]
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**`browser_snapshot --markdown`** returns clean Markdown of the page (ads/nav/scripts stripped, no element indices). Use it when AI needs to read/summarize page content in one-off tasks (Branch C). Do NOT use it inside `task_begin`/`task_end` (Branch B) or when you need structured data — use `browser_eval_content_js` instead.
|
|
90
|
+
|
|
91
|
+
### Click & Input
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
browser_click_element --index <id>
|
|
95
|
+
browser_dblclick_element --index <id>
|
|
96
|
+
browser_focus_element --index <id>
|
|
97
|
+
browser_input_text --index <id> --text "<content>"
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Scroll
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
browser_scroll_down [--amount <px>]
|
|
104
|
+
browser_scroll_up [--amount <px>]
|
|
105
|
+
browser_scroll_to_text --text "<text>"
|
|
106
|
+
browser_scroll_to_top
|
|
107
|
+
browser_scroll_to_bottom
|
|
108
|
+
browser_scroll_by --direction <dir> --pixels <n> [--index <id>]
|
|
109
|
+
browser_scroll_into_view --index <id>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Keyboard
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
browser_keypress --key <key>
|
|
116
|
+
browser_keyboard_op --action type --text "<content>"
|
|
117
|
+
browser_keyboard_op --action inserttext --text "<content>"
|
|
118
|
+
browser_keydown --key <key>
|
|
119
|
+
browser_keyup --key <key>
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Dropdown & Checkbox
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
browser_get_dropdown_options --index <id>
|
|
126
|
+
browser_select_dropdown_option --index <id> --text "<option>"
|
|
127
|
+
browser_check_op --index <id> --value / --no-value
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Semantic Locators (Find and Act)
|
|
131
|
+
|
|
132
|
+
```bash
|
|
133
|
+
browser_find_and_act --by <role|text|label|placeholder|testid|css> --value "<v>" --action <click|fill|type> [--actionValue "<v>"] [--name "<n>"] [--nth <n>]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
> `--nth`: 1-based index for list iteration (`--nth 1` = first match). Use `by: "css"` + `--nth` for loops.
|
|
137
|
+
|
|
138
|
+
### Get Information & State
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
browser_get_info --type <text|url|title|html|value|attr|count|box|styles|list_selector> [--index <id>] [--attribute <name>]
|
|
142
|
+
browser_check_state --state <visible|enabled|checked> --index <id>
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
> **`list_selector`**: Auto-detect CSS selector for list iteration. Pass any list item's index → returns `{"selector": "...", "count": N, "samples": [...]}`.
|
|
146
|
+
|
|
147
|
+
### JavaScript Evaluation
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
browser_eval_content_js --script "<js_code>"
|
|
151
|
+
browser_eval_content_js --script "<base64>" --base64
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
### Download
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
browser_download_file --index <id>
|
|
158
|
+
browser_download_url
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
After a download succeeds, return the saved file path to the user or the next processing step. If the user asked to analyze the downloaded file, treat that path as the output of the browser sub-task and continue outside the browser workflow.
|
|
162
|
+
|
|
163
|
+
### Tab Management
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
browser_tab_open --url <url>
|
|
167
|
+
browser_tab_list
|
|
168
|
+
browser_tab_switch --tabId <n>
|
|
169
|
+
browser_tab_close --tabId <n>
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Dialog
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
browser_dialog --action <accept|dismiss> [--text "<input>"]
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
### Task Recording
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
task_begin --description "<desc>"
|
|
182
|
+
task_end
|
|
183
|
+
task_latest # Get most recent recording
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
> **When to use**: Only when user explicitly asks to record/save/reuse (trigger words: "record this", "save this", "保存为脚本", "录一下", "下次还要用"). Without explicit request, do NOT use these commands.
|
|
187
|
+
>
|
|
188
|
+
> **Before calling `task_begin`**: MUST read [references/playbook.md](./references/playbook.md) for recording quality rules — they are required to make the recording reusable.
|
|
189
|
+
>
|
|
190
|
+
> **After `task_end`**: Raw recordings are NOT replay-ready. Call `task_latest`, then follow [references/playbook.md → From Recording to Playbook](./references/playbook.md#from-recording-to-playbook) to generate, save, and verify the playbook JSON.
|
|
191
|
+
|
|
192
|
+
### Playbook & Replay
|
|
193
|
+
|
|
194
|
+
```bash
|
|
195
|
+
playbook_list # List available playbooks
|
|
196
|
+
browser_replay --script <path> [--variables '{"key":"value"}']
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
> **How to use**:
|
|
200
|
+
> 1. `playbook_list` returns available playbooks with `path`, `name`, `description`, and `params` (required variables).
|
|
201
|
+
> 2. Match the user's task against returned playbooks by name/description/URL.
|
|
202
|
+
> 3. Read the matched playbook's `params` to know which `--variables` keys are required.
|
|
203
|
+
> 4. Pass variables as JSON: `--variables '{"param1": "value1", "param2": "value2"}'`
|
|
204
|
+
>
|
|
205
|
+
> ⚠️ `browser_replay` can take **up to 10 minutes**. Wait patiently — do NOT interrupt, retry, or fall back to manual mode.
|
|
206
|
+
>
|
|
207
|
+
> For full output format (success/failure/step_results), see [references/commands-extended.md](./references/commands-extended.md#browser_replay-output-format).
|
|
208
|
+
|
|
209
|
+
### Utility
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
browser_done --success --text "<msg>"
|
|
213
|
+
status
|
|
214
|
+
list
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
> `browser_done` is a status/reporting utility only. It does **not** replace `browser_end_session`, and it does not release the session mapping.
|
|
218
|
+
|
|
219
|
+
---
|
|
220
|
+
|
|
221
|
+
## ⚠️ Core Workflow (MANDATORY)
|
|
222
|
+
|
|
223
|
+
> **Every automation MUST start the daemon first (see Daemon Startup), MUST be wrapped in `browser_start_session` / `browser_end_session`, and you MUST run `playbook_list` before any `task_begin` or `browser_go_to_url`.** Never start manual automation without first checking for existing playbooks.
|
|
224
|
+
|
|
225
|
+
### Decision Flow
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
Step 0: Composite request? ← Multiple browser sub-tasks or browser → AI → browser flow?
|
|
229
|
+
├── YES → See references/session-lifecycle.md → Handling Composite Tasks.
|
|
230
|
+
│ Start ONE session for the whole composite task,
|
|
231
|
+
│ then run each sub-task through Step 2-3 independently,
|
|
232
|
+
│ and call browser_end_session once after all sub-tasks.
|
|
233
|
+
└── NO → Continue as a single task ↓
|
|
234
|
+
|
|
235
|
+
Step 1: browser_start_session ← ⛔ MANDATORY: first browser command, no exceptions (daemon MUST already be running)
|
|
236
|
+
Step 2: playbook_list ← ⛔ MANDATORY: ALWAYS call before any navigation, even if you think no playbook exists
|
|
237
|
+
Step 3: Match?
|
|
238
|
+
├── YES → browser_replay ← Branch A: Replay
|
|
239
|
+
└── NO → Manual automation
|
|
240
|
+
├── Recording mode ← Branch B: user explicitly asks to record
|
|
241
|
+
│ task_begin
|
|
242
|
+
│ browser_* operations...
|
|
243
|
+
│ task_end
|
|
244
|
+
│ → then continue with references/playbook.md
|
|
245
|
+
└── Non-recording mode ← Branch C: one-off task
|
|
246
|
+
browser_* operations...
|
|
247
|
+
Step 4: browser_end_session ← ⛔ MANDATORY: ALWAYS execute, even on failure or early exit
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
> **⛔ Non-Negotiable Rules:**
|
|
251
|
+
> 1. **The daemon MUST be started before the first `browser_start_session`** — exactly as `qqbrowser-skill serve --daemon --from-qbotclaw --ws-port=<port>` (both flags required), and only after its WebSocket channel is ready may any `browser_*` command run.
|
|
252
|
+
> 2. **`playbook_list` MUST be called every time** after `browser_start_session`, before any `browser_go_to_url` or other browser commands — no exceptions, no shortcuts.
|
|
253
|
+
> 3. **`browser_end_session` MUST be called at the end** regardless of outcome (success, failure, error, early exit, user interrupt). Think of it as a `finally` block — it always runs.
|
|
254
|
+
|
|
255
|
+
**Recording (Branch B) triggers only on explicit user request.** Trigger words: "record this", "save this", "make reusable", "保存为脚本", "录一下", "下次还要用". Without an explicit request, use **Branch C** (non-recording) — do **not** wrap the operations in `task_begin` / `task_end`.
|
|
256
|
+
|
|
257
|
+
### Human-in-the-Loop Verification Points
|
|
258
|
+
|
|
259
|
+
If the site requires CAPTCHA, SMS code, email code, MFA/2FA, QR login, device confirmation, or any other human verification step:
|
|
260
|
+
|
|
261
|
+
- Pause automation at that point.
|
|
262
|
+
- Keep the current session alive.
|
|
263
|
+
- Ask the user to complete the verification manually.
|
|
264
|
+
- Resume only after the verification step is finished.
|
|
265
|
+
|
|
266
|
+
Do **not** blindly retry replay or switch branches just because a human verification wall appears.
|
|
267
|
+
|
|
268
|
+
### Step 1: Start Session (REQUIRED)
|
|
269
|
+
|
|
270
|
+
```bash
|
|
271
|
+
qqbrowser-skill browser_start_session --sessionId task-<purpose>-<counter>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**The daemon MUST already be running before this command — see Daemon Startup.** `sessionId` must be unique per task (e.g. `task-form-001`). Full flags and idempotency rules: [references/session-lifecycle.md](./references/session-lifecycle.md).
|
|
275
|
+
|
|
276
|
+
### Step 2: Check Playbooks (⛔ MANDATORY — DO NOT SKIP, NO EXCEPTIONS)
|
|
277
|
+
|
|
278
|
+
```bash
|
|
279
|
+
qqbrowser-skill playbook_list
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
**This step is non-negotiable.** You MUST call `playbook_list` every single time, even if:
|
|
283
|
+
- You are sure no playbook exists for this task.
|
|
284
|
+
- You have just completed a sub-task in a composite pipeline and are starting the next one.
|
|
285
|
+
- The user's request seems trivial or one-off.
|
|
286
|
+
|
|
287
|
+
Match returned playbooks against the user's task by `name`, `description`, keywords, target URL, and side-effect profile.
|
|
288
|
+
|
|
289
|
+
- For **read-only / low-risk tasks** (read, extract, summarize, inspect), a high-confidence partial match may still prefer replay.
|
|
290
|
+
- For **side-effecting tasks** (post, submit, message, purchase, delete, publish), replay is allowed only when the task intent, target site, entry page, and key side effects are clearly equivalent.
|
|
291
|
+
- If equivalence is uncertain, do **not** replay blindly — ask the user or fall back to a safer path.
|
|
292
|
+
|
|
293
|
+
### Step 3: Branch by Match Result
|
|
294
|
+
|
|
295
|
+
#### Branch A — Playbook matched → Replay
|
|
296
|
+
|
|
297
|
+
> ⚠️ **`browser_replay` may run for up to 10 minutes.** Wait for it to return — **NEVER interrupt, retry, or fall back to manual mode while it is still running.** Replayed operations are usually **not idempotent** (posting, submitting, messaging), so a premature retry will cause duplicate side effects.
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
qqbrowser-skill browser_replay --script <path> --variables '{...}'
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
#### Safety Gate for Side-Effecting Tasks
|
|
304
|
+
|
|
305
|
+
Before replaying a playbook that may cause real-world side effects — such as posting, submitting, sending messages, purchasing, deleting, or publishing — verify all of the following:
|
|
306
|
+
|
|
307
|
+
1. The target site/account/page matches the user's intent.
|
|
308
|
+
2. Required variables are complete and unambiguous.
|
|
309
|
+
3. The expected outcome is the same as the original playbook's outcome.
|
|
310
|
+
4. The user has clearly authorized executing the live action.
|
|
311
|
+
|
|
312
|
+
If any of the above is uncertain, do not replay blindly. Prefer draft mode, test data, manual review, or explicit user confirmation.
|
|
313
|
+
|
|
314
|
+
### If `browser_replay` Returns Failure
|
|
315
|
+
|
|
316
|
+
When replay finishes with `success: false`:
|
|
317
|
+
|
|
318
|
+
1. Inspect the failed step and its error details first.
|
|
319
|
+
2. Do **not** immediately retry the same replay on live targets.
|
|
320
|
+
3. Do **not** automatically fall back to manual execution for side-effecting tasks.
|
|
321
|
+
4. For read-only tasks, manual fallback is acceptable if the failure is clearly non-destructive.
|
|
322
|
+
5. For side-effecting tasks, require user confirmation or a safer environment before retrying or manually continuing.
|
|
323
|
+
|
|
324
|
+
#### Branch B — No playbook + user asked to record → Manual with recording
|
|
325
|
+
|
|
326
|
+
> **Before calling `task_begin`, MUST read [references/playbook.md](./references/playbook.md).** These rules are required to make the recording reusable; do not start recording from the short example alone.
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
qqbrowser-skill task_begin --description "描述任务"
|
|
330
|
+
qqbrowser-skill browser_go_to_url --url <url>
|
|
331
|
+
qqbrowser-skill browser_snapshot
|
|
332
|
+
# ... interact using indices ...
|
|
333
|
+
qqbrowser-skill task_end
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
**After `task_end`**, continue following [references/playbook.md](./references/playbook.md#from-recording-to-playbook) to generate the playbook JSON.
|
|
337
|
+
|
|
338
|
+
#### Branch C — No playbook + no recording request → Plain manual
|
|
339
|
+
|
|
340
|
+
Default fallback for one-off tasks. Do **not** call `task_begin` / `task_end`. **Still call `playbook_list` first** (Step 2 is mandatory for all branches).
|
|
341
|
+
|
|
342
|
+
```bash
|
|
343
|
+
qqbrowser-skill playbook_list # ⛔ MANDATORY — do not skip
|
|
344
|
+
qqbrowser-skill browser_go_to_url --url <url>
|
|
345
|
+
qqbrowser-skill browser_snapshot
|
|
346
|
+
# ... interact using indices ...
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### Step 4: End Session (⛔ MANDATORY — always executed, like a `finally` block)
|
|
350
|
+
|
|
351
|
+
```bash
|
|
352
|
+
qqbrowser-skill browser_end_session --sessionId task-<purpose>-<counter>
|
|
353
|
+
```
|
|
354
|
+
|
|
355
|
+
**This step is non-negotiable.** `browser_end_session` MUST be called at the end of every task, regardless of outcome:
|
|
356
|
+
- ✅ Task completed successfully → call `browser_end_session`
|
|
357
|
+
- ❌ Task failed with an error → call `browser_end_session`
|
|
358
|
+
- 🛑 Task interrupted or early exit → call `browser_end_session`
|
|
359
|
+
- ⏸️ Human verification needed (CAPTCHA, etc.) → keep session alive during verification, then call `browser_end_session` after
|
|
360
|
+
|
|
361
|
+
**Never leave a session dangling.** If you called `browser_start_session`, you MUST call `browser_end_session` before finishing.
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Common Patterns
|
|
366
|
+
|
|
367
|
+
### Form Submission
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
qqbrowser-skill browser_start_session --sessionId task-form-001
|
|
371
|
+
qqbrowser-skill playbook_list
|
|
372
|
+
qqbrowser-skill browser_go_to_url --url https://example.com/signup
|
|
373
|
+
qqbrowser-skill browser_snapshot
|
|
374
|
+
qqbrowser-skill browser_input_text --index "<name-index>" --text "Jane Doe"
|
|
375
|
+
qqbrowser-skill browser_input_text --index "<email-index>" --text "jane@example.com"
|
|
376
|
+
qqbrowser-skill browser_select_dropdown_option --index "<state-index>" --text "California"
|
|
377
|
+
qqbrowser-skill browser_click_element --index "<submit-index>"
|
|
378
|
+
qqbrowser-skill browser_wait --seconds 2
|
|
379
|
+
qqbrowser-skill browser_snapshot # Verify result
|
|
380
|
+
qqbrowser-skill browser_end_session --sessionId task-form-001
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
### Data Extraction
|
|
384
|
+
|
|
385
|
+
| Approach | When | Replayable? |
|
|
386
|
+
|----------|------|-------------|
|
|
387
|
+
| `browser_snapshot --markdown` | AI reads/summarizes a page once (Branch C only) | ❌ |
|
|
388
|
+
| `browser_snapshot` + `browser_get_info` | Read one specific element's text/attribute | ❌ |
|
|
389
|
+
| `browser_eval_content_js` | Structured JSON / multiple items / **only safe option in Branch B** | ✅ |
|
|
390
|
+
|
|
391
|
+
```bash
|
|
392
|
+
qqbrowser-skill browser_start_session --sessionId task-extract-001
|
|
393
|
+
qqbrowser-skill playbook_list
|
|
394
|
+
qqbrowser-skill browser_go_to_url --url https://example.com/products
|
|
395
|
+
qqbrowser-skill browser_eval_content_js --script "JSON.stringify(Array.from(document.querySelectorAll('.product-item')).slice(0,10).map(el=>({name:el.querySelector('.name')?.textContent?.trim(), price:el.querySelector('.price')?.textContent?.trim()})))"
|
|
396
|
+
qqbrowser-skill browser_end_session --sessionId task-extract-001
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Infinite Scroll
|
|
400
|
+
|
|
401
|
+
```bash
|
|
402
|
+
qqbrowser-skill browser_start_session --sessionId task-feed-001
|
|
403
|
+
qqbrowser-skill playbook_list
|
|
404
|
+
qqbrowser-skill browser_go_to_url --url https://example.com/feed
|
|
405
|
+
qqbrowser-skill browser_scroll_to_bottom
|
|
406
|
+
qqbrowser-skill browser_wait --seconds 2
|
|
407
|
+
qqbrowser-skill browser_snapshot
|
|
408
|
+
qqbrowser-skill browser_end_session --sessionId task-feed-001
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Key Concepts
|
|
414
|
+
|
|
415
|
+
- **Element Index**: Encoded string like `2_sfli_qp0u` (`highlightIndex_attrHash_xpathHash`). Generated by `browser_snapshot`, used to target elements. **Indices are regenerated on every snapshot** — always re-snapshot before reusing indices. **Never invent numeric indices like `1` or `2`; always copy the encoded index exactly from the latest `browser_snapshot` output.**
|
|
416
|
+
- **Snapshot**: Returns page content with indexed elements. Re-snapshot after any DOM change (navigation, form submit, modal, AJAX). Most `browser_*` commands executed inside an active session already return updated page state in their response. Use standalone `browser_snapshot` only when you truly need a fresh interactive view or the previous response is not sufficient.
|
|
417
|
+
- **Session**: AI tasks MUST be wrapped with `browser_start_session` / `browser_end_session` for tab group isolation.
|
|
418
|
+
- **Task Recording**: Manual browser tasks intended for replay MUST be wrapped with `task_begin` / `task_end` for playbook generation.
|
|
419
|
+
- **Playbook**: Parameterized JSON script that replays a recorded task without AI.
|
|
420
|
+
|
|
421
|
+
---
|
|
422
|
+
|
|
423
|
+
## Reference Files (Load On Demand)
|
|
424
|
+
|
|
425
|
+
| Reference | Load when… |
|
|
426
|
+
|-----------|-----------|
|
|
427
|
+
| [references/commands-extended.md](./references/commands-extended.md) | You need extended details on `browser_snapshot --markdown` usage, `browser_replay` output format, or advanced flag semantics |
|
|
428
|
+
| [references/session-lifecycle.md](./references/session-lifecycle.md) | You need full session rules, or the user's request is a **composite task** with multiple browser sub-tasks or browser → AI → browser flow |
|
|
429
|
+
| [references/playbook.md](./references/playbook.md) | User asks to **record/save/reuse**, generate/edit a playbook JSON, or run a reusable browser task |
|
|
430
|
+
|
|
431
|
+
---
|
|
432
|
+
|
|
433
|
+
## Notes
|
|
434
|
+
|
|
435
|
+
- Refs (element indices) are stable per snapshot but change on navigation — always re-snapshot after page changes.
|
|
436
|
+
- Use `browser_input_text` for form fields to ensure existing text is cleared.
|
|
437
|
+
- Use `browser_find_and_act` with semantic locators when element indices are unstable across sessions.
|
|
438
|
+
- For full `browser_replay` output format and consumption guide, see [references/commands-extended.md](./references/commands-extended.md#browser_replay-output-format).
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## Evaluation Report
|
|
443
|
+
|
|
444
|
+
See the full skill evaluation report: [QQBrowserUse](https://bak.res.qq.com/nav/qqbrowser_skills/QQBrowserSkillReport.html)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# Command Extended Reference
|
|
2
|
+
|
|
3
|
+
> Load this file when you need the detailed usage guide for `browser_snapshot --markdown` or the `browser_replay` output format.
|
|
4
|
+
>
|
|
5
|
+
> For command syntax signatures, see the main [SKILL.md](../SKILL.md#commands).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 📖 `browser_snapshot --markdown`: Usage Guide
|
|
10
|
+
|
|
11
|
+
`--markdown` returns clean, human-readable Markdown of the page (ads/nav/scripts stripped, **no element indices**). It is designed to feed page content **into the AI's context for reading**, not to drive further browser commands.
|
|
12
|
+
|
|
13
|
+
**✅ Use it when:**
|
|
14
|
+
|
|
15
|
+
- **Reading / summarizing** page content (articles, docs, search results, product detail pages)
|
|
16
|
+
- **One-off Q&A** about a page ("what does this article say?", "summarize this doc")
|
|
17
|
+
- Running in **non-recording mode (Branch C)** — the output is consumed by the AI once and discarded
|
|
18
|
+
|
|
19
|
+
**❌ Do NOT use it when:**
|
|
20
|
+
|
|
21
|
+
- Inside `task_begin` / `task_end` (**recording mode, Branch B**) — Markdown output is a text snapshot and cannot be reliably replayed
|
|
22
|
+
- You need **structured data** (JSON, specific fields, machine-consumable output) → use `browser_eval_content_js`
|
|
23
|
+
- You need to **iterate** over a list, paginate, or extract many items → use `browser_eval_content_js` + `browser_find_and_act`
|
|
24
|
+
- You need to **click / input / interact** with elements → use `browser_snapshot` (default mode, returns indices)
|
|
25
|
+
|
|
26
|
+
**Rule of thumb:** `--markdown` output goes to the **AI's eyes** (read once, then discarded). If the output needs to be consumed by **code, a playbook, or a later step**, use `browser_eval_content_js` instead.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## `browser_replay` Output Format
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"success": true,
|
|
35
|
+
"total_steps": 5,
|
|
36
|
+
"completed_steps": 5,
|
|
37
|
+
"step_results": [
|
|
38
|
+
{
|
|
39
|
+
"index": 0,
|
|
40
|
+
"action": "browser_go_to_url",
|
|
41
|
+
"description": "...",
|
|
42
|
+
"success": true,
|
|
43
|
+
"result": "Success! Navigated to ..."
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"index": 1,
|
|
47
|
+
"action": "browser_eval_content_js",
|
|
48
|
+
"description": "提取数据",
|
|
49
|
+
"success": true,
|
|
50
|
+
"result": "{\"title\":\"...\",\"content\":\"...\"}"
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"duration_ms": 12345,
|
|
54
|
+
"summary": "Replay completed successfully: 5/5 steps in 12345ms."
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
**How to use the output (especially for composite tasks):**
|
|
59
|
+
|
|
60
|
+
- `success`: Check overall success/failure. If `false`, check `failed_step` for error details.
|
|
61
|
+
- `step_results[N].result`: Contains the return value of each step. **For `browser_eval_content_js` steps, this is the extracted data (usually JSON string)** — parse it for use in subsequent AI processing or next playbook's variables.
|
|
62
|
+
- For composite pipelines: find all `eval_content_js` steps in `step_results`, parse their `result` field to get structured data for AI mediation.
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## If `browser_replay` Returns Failure
|
|
67
|
+
|
|
68
|
+
When replay finishes with `success: false`:
|
|
69
|
+
|
|
70
|
+
- Inspect `failed_step`, `summary`, and the failed entry in `step_results` before deciding the next action.
|
|
71
|
+
- Do **not** immediately retry the same replay on a live target.
|
|
72
|
+
- Do **not** automatically fall back to manual execution for side-effecting tasks such as posting, submitting, messaging, purchasing, deleting, or publishing.
|
|
73
|
+
- For read-only tasks, manual fallback is acceptable only when the failure is clearly non-destructive.
|
|
74
|
+
- For side-effecting tasks, require user confirmation, draft mode, sandbox/test data, or another safer path before continuing.
|