@qqbrowser/openclaw-qbot 0.10.13 → 0.10.16
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/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +6 -6
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +13 -13
- package/node_modules/@aws-sdk/core/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +12 -1
- package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +12 -1
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-websocket/package.json +7 -7
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@clack/core/dist/index.mjs +7 -7
- package/node_modules/@clack/core/package.json +2 -1
- package/node_modules/@clack/prompts/dist/index.mjs +38 -38
- package/node_modules/@clack/prompts/package.json +2 -2
- package/node_modules/@nodable/entities/package.json +1 -1
- package/node_modules/@nodable/entities/src/EntityDecoder.js +1 -1
- package/node_modules/@nodable/entities/src/entities.js +0 -18
- package/node_modules/@slack/bolt/dist/App.js +8 -12
- package/node_modules/@slack/bolt/dist/context/index.js +7 -7
- package/node_modules/@slack/bolt/dist/index.js +16 -16
- package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js +2 -0
- package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.js +8 -1
- package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js +4 -2
- package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +1 -1
- package/node_modules/@slack/bolt/dist/receivers/verify-request.js +3 -0
- package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.js +12 -0
- package/node_modules/@slack/bolt/dist/types/actions/index.js +1 -1
- package/node_modules/@slack/bolt/dist/types/index.js +3 -3
- package/node_modules/@slack/bolt/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/index.js +3 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +3 -11
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +9 -40
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +12 -142
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +39 -22
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +39 -22
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +7 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +184 -0
- package/node_modules/@smithy/core/dist-es/index.js +6 -6
- package/node_modules/@smithy/core/dist-es/submodules/client/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +5 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +19 -6
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js +4 -5
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js +9 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +9 -0
- package/node_modules/@smithy/core/dist-es/submodules/{protocols/url-parser → transport}/parseUrl.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/{endpoints → transport}/toEndpointV1.js +1 -1
- package/node_modules/@smithy/core/package.json +20 -11
- package/node_modules/@smithy/core/transport.js +5 -0
- package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
- package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
- package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
- package/node_modules/@smithy/node-http-handler/package.json +4 -4
- package/node_modules/@smithy/signature-v4/package.json +3 -3
- package/node_modules/@smithy/types/package.json +1 -1
- package/node_modules/eventsource-parser/dist/index.cjs +21 -10
- package/node_modules/eventsource-parser/dist/index.d.cts +33 -10
- package/node_modules/eventsource-parser/dist/index.js +21 -10
- package/node_modules/eventsource-parser/dist/stream.cjs +4 -3
- package/node_modules/eventsource-parser/dist/stream.d.cts +16 -3
- package/node_modules/eventsource-parser/dist/stream.js +4 -3
- package/node_modules/eventsource-parser/package.json +8 -8
- package/node_modules/hasown/package.json +4 -5
- package/node_modules/lru-cache/package.json +1 -1
- package/node_modules/protobufjs/dist/light/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.js +3 -3
- package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
- package/node_modules/protobufjs/dist/protobuf.js +7 -5
- package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
- package/node_modules/protobufjs/package.json +1 -1
- package/node_modules/protobufjs/src/converter.js +4 -2
- package/node_modules/protobufjs/src/roots.js +1 -1
- package/node_modules/thread-stream/.claude/settings.local.json +15 -0
- package/node_modules/thread-stream/CLAUDE.md +64 -0
- package/node_modules/thread-stream/index.js +41 -13
- package/node_modules/thread-stream/lib/indexes.js +3 -1
- package/node_modules/thread-stream/lib/worker.js +20 -8
- package/node_modules/thread-stream/package.json +1 -1
- package/node_modules/undici/lib/global.js +10 -1
- package/node_modules/undici/package.json +1 -1
- package/package.json +1 -1
- package/skills/qqbrowser-playbook/SKILL.md +289 -237
- package/skills/qqbrowser-skill/SKILL.md +241 -233
- package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +0 -21
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +0 -46
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +0 -24
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +0 -19
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +0 -27
- package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +0 -10
- package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +0 -44
- package/node_modules/@smithy/core/dist-cjs/request-builder/requestBuilder.js +0 -5
- package/node_modules/@smithy/core/dist-cjs/setFeature.js +0 -14
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +0 -18
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +0 -38
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +0 -15
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +0 -9
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +0 -6
- package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +0 -61
- package/node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +0 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/TestVectors.fixture.js +0 -146
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/vectorTypes.fixture.js +0 -1
- package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js +0 -2
- package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
- package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
- package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
- package/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js +0 -399
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemePlugin.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/httpAuthSchemeMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/resolveAuthOptions.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/getHttpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/httpSigningMiddleware.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{pagination → legacy-root-exports/pagination}/createPaginator.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/DefaultIdentityProviderConfig.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpApiKeyAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpBearerAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/noAuth.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/index.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/memoizeIdentityProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/{getSmithyContext.js → submodules/transport/getSmithyContext.js} +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpRequest.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpResponse.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{endpoints/util-endpoints/lib → transport}/isValidHostLabel.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/isValidHostname.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{client/util-middleware → transport}/normalizeProvider.js +0 -0
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols/querystring-parser → transport}/parseQueryString.js +0 -0
|
@@ -10,310 +10,318 @@ permissions:
|
|
|
10
10
|
|
|
11
11
|
# qqbrowser-skill
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Installation
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
15
|
+
```bash
|
|
16
|
+
# Linux / macOS
|
|
17
|
+
pipx install qqbrowser-skill && qqbrowser-skill install
|
|
18
|
+
# Windows
|
|
19
|
+
pip install qqbrowser-skill && qqbrowser-skill install
|
|
20
|
+
```
|
|
19
21
|
|
|
20
|
-
##
|
|
22
|
+
## Key Concepts
|
|
21
23
|
|
|
22
|
-
|
|
24
|
+
- **Element Index**: Encoded string like `2_sfli_qp0u` (`highlightIndex_attrHash_xpathHash`). Generated by `browser_snapshot`, used to target elements.
|
|
25
|
+
- **Snapshot**: Returns page content with indexed elements. Re-snapshot after any DOM change.
|
|
26
|
+
- **Task Recording**: All manual browser tasks MUST be wrapped with `task_begin`/`task_end`.
|
|
23
27
|
|
|
24
|
-
|
|
28
|
+
---
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
| ---------------------------- | -------------------------- | ------------------------------------------------------------------ |
|
|
28
|
-
| **Network Access** | Outbound HTTP/HTTPS | Required for browser navigation, page loading, and web interaction |
|
|
29
|
-
| **File System (Read/Write)** | Temporary directories only | Required for saving screenshots (`.webp`) and downloaded files |
|
|
30
|
+
## ⚠️ Task Execution Priority (MANDATORY)
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
> **CRITICAL: You MUST run `playbook_list` BEFORE any `task_begin` or `browser_go_to_url`. NEVER start manual automation without first checking for existing playbooks.**
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
```
|
|
35
|
+
User task → playbook_list (MANDATORY) → Match? → YES → browser_replay
|
|
36
|
+
→ NO → Manual automation
|
|
37
|
+
```
|
|
34
38
|
|
|
35
|
-
|
|
36
|
-
- `dldir1v6.qq.com` is Tencent's official software distribution CDN.
|
|
37
|
-
- All downloads are performed over **HTTPS** to ensure transport-level security.
|
|
39
|
+
### Step 0: Check Playbooks (DO NOT SKIP)
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
```bash
|
|
42
|
+
qqbrowser-skill playbook_list
|
|
43
|
+
```
|
|
40
44
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
1. Match returned playbooks against user's task by `name`, `description`, keywords, target URL
|
|
46
|
+
2. If matched (even partially): `browser_replay --script <path> --variables '{...}'`
|
|
47
|
+
3. Only if NO match: proceed to manual automation
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
### Step 1: Composite Task — Multi-Playbook Orchestration
|
|
46
50
|
|
|
47
|
-
|
|
48
|
-
Please call the standalone qqbrowser-skill browser_snapshot command only when necessary to avoid unnecessary token consumption.
|
|
51
|
+
For tasks spanning multiple domains (e.g., "从知乎获取文章然后发到小红书"):
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
```
|
|
54
|
+
Composite task → Decompose into sub-tasks → Match EACH against playbook_list
|
|
55
|
+
→ Execute pipeline: playbook₁ → AI mediation → playbook₂ → ...
|
|
56
|
+
```
|
|
51
57
|
|
|
52
|
-
**
|
|
58
|
+
**Rules:**
|
|
59
|
+
1. Break request into atomic browser operations, match each independently
|
|
60
|
+
2. AI mediates BETWEEN playbooks (summarize, rewrite, transform format) — no browser commands needed
|
|
61
|
+
3. Each playbook runs independently — never chain inside a single `task_begin`/`task_end`
|
|
62
|
+
4. If a sub-task has no playbook, fall back to manual for that sub-task only
|
|
63
|
+
5. Report progress after each stage
|
|
53
64
|
|
|
65
|
+
**Example:**
|
|
54
66
|
```bash
|
|
55
|
-
#
|
|
56
|
-
qqbrowser-skill
|
|
67
|
+
# Sub-task A: playbook exists
|
|
68
|
+
qqbrowser-skill browser_replay --script ~/.qqbrowser-skill/playbooks/zhihu-article-extractor.json \
|
|
69
|
+
--variables '{"topic": "人工智能", "count": "3"}'
|
|
70
|
+
# AI mediation: transform extracted content to target platform style
|
|
71
|
+
# Sub-task B: playbook exists
|
|
72
|
+
qqbrowser-skill browser_replay --script ~/.qqbrowser-skill/playbooks/xiaohongshu-publish.json \
|
|
73
|
+
--variables '{"notes_title": "AI生成标题", "notes_content": "转换后内容"}'
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Step 2: Fallback to Manual Automation
|
|
57
77
|
|
|
58
|
-
|
|
78
|
+
Only when: no matching playbook / replay failed after retry / task requires dynamic AI decisions.
|
|
59
79
|
|
|
60
|
-
|
|
80
|
+
### Step 3: Save as Playbook (explicit user request only)
|
|
81
|
+
|
|
82
|
+
Trigger words: "save this", "make reusable", "保存为脚本", "下次还要用"
|
|
83
|
+
→ Load `qqbrowser-playbook` skill → `task_latest` → generate → save
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Core Workflow (Manual Automation)
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
qqbrowser-skill task_begin --description "描述任务"
|
|
91
|
+
qqbrowser-skill browser_go_to_url --url <url>
|
|
92
|
+
qqbrowser-skill browser_snapshot # Get element indices
|
|
93
|
+
# ... interact using indices ...
|
|
94
|
+
qqbrowser-skill browser_snapshot # Re-snapshot after DOM changes
|
|
61
95
|
qqbrowser-skill task_end
|
|
62
96
|
```
|
|
63
97
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
- `task_begin` MUST be the **first** command you execute (before `browser_go_to_url` or any other browser command)
|
|
67
|
-
- `task_end` MUST be the **last** command you execute (after the task is complete)
|
|
68
|
-
- There are NO exceptions to this rule — even for simple tasks like data extraction or page reading
|
|
69
|
-
- Failure to use `task_begin`/`task_end` means the task cannot be replayed or saved as a playbook later
|
|
98
|
+
---
|
|
70
99
|
|
|
71
|
-
##
|
|
100
|
+
## Command Reference
|
|
72
101
|
|
|
73
|
-
|
|
102
|
+
### Navigation
|
|
103
|
+
```bash
|
|
104
|
+
browser_go_to_url --url <url>
|
|
105
|
+
browser_go_back
|
|
106
|
+
browser_wait --seconds <n> # Default 3s
|
|
107
|
+
```
|
|
74
108
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
109
|
+
### Snapshot & Screenshot
|
|
110
|
+
```bash
|
|
111
|
+
browser_snapshot # Element indices (for interaction)
|
|
112
|
+
browser_snapshot --markdown # Markdown (for reading)
|
|
113
|
+
browser_screenshot [--full] [--annotate]
|
|
114
|
+
```
|
|
81
115
|
|
|
116
|
+
### Click & Input
|
|
82
117
|
```bash
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
qqbrowser-skill browser_input_text --index 1_abc1_def2 --text "user@example.com"
|
|
89
|
-
qqbrowser-skill browser_input_text --index 2_xyz3_uvw4 --text "password123"
|
|
90
|
-
qqbrowser-skill browser_click_element --index 3_klm5_nop6
|
|
91
|
-
qqbrowser-skill browser_wait --seconds 2
|
|
92
|
-
qqbrowser-skill browser_snapshot # Check result
|
|
93
|
-
qqbrowser-skill task_end
|
|
118
|
+
browser_click_element --index <id>
|
|
119
|
+
browser_dblclick_element --index <id>
|
|
120
|
+
browser_focus_element --index <id>
|
|
121
|
+
browser_input_text --index <id> --text "<content>"
|
|
94
122
|
```
|
|
95
123
|
|
|
96
|
-
|
|
124
|
+
### Scroll
|
|
125
|
+
```bash
|
|
126
|
+
browser_scroll_down [--amount <px>]
|
|
127
|
+
browser_scroll_up [--amount <px>]
|
|
128
|
+
browser_scroll_to_text --text "<text>"
|
|
129
|
+
browser_scroll_to_top / browser_scroll_to_bottom
|
|
130
|
+
browser_scroll_by --direction <dir> --pixels <n> [--index <id>]
|
|
131
|
+
browser_scroll_into_view --index <id>
|
|
132
|
+
```
|
|
97
133
|
|
|
134
|
+
### Keyboard
|
|
98
135
|
```bash
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
# Snapshot & Screenshot
|
|
105
|
-
qqbrowser-skill browser_snapshot # Default mode: page content with element indices (for interaction)
|
|
106
|
-
qqbrowser-skill browser_snapshot --markdown # Markdown mode: clean Markdown of the page (for reading/extraction, no indices)
|
|
107
|
-
qqbrowser-skill browser_screenshot # Take screenshot (returns temp file path of .webp image)
|
|
108
|
-
qqbrowser-skill browser_screenshot --full # Full-page screenshot (returns temp file path)
|
|
109
|
-
qqbrowser-skill browser_screenshot --annotate # Annotated screenshot with element labels (returns temp file path)
|
|
110
|
-
|
|
111
|
-
# Click & Input (use indices from snapshot, index is an encoded string like "2_sfli_qp0u")
|
|
112
|
-
qqbrowser-skill browser_click_element --index 2_sfli_qp0u # Click element
|
|
113
|
-
qqbrowser-skill browser_dblclick_element --index 2_sfli_qp0u # Double-click element
|
|
114
|
-
qqbrowser-skill browser_focus_element --index 2_sfli_qp0u # Focus element
|
|
115
|
-
qqbrowser-skill browser_input_text --index 3_abc1_def2 --text "hello" # Input text into element
|
|
116
|
-
|
|
117
|
-
# Scroll
|
|
118
|
-
qqbrowser-skill browser_scroll_down # Scroll down one page
|
|
119
|
-
qqbrowser-skill browser_scroll_down --amount 300 # Scroll down 300px
|
|
120
|
-
qqbrowser-skill browser_scroll_up # Scroll up one page
|
|
121
|
-
qqbrowser-skill browser_scroll_up --amount 300 # Scroll up 300px
|
|
122
|
-
qqbrowser-skill browser_scroll_to_text --text "Section 3" # Scroll to text
|
|
123
|
-
qqbrowser-skill browser_scroll_to_top # Scroll to top
|
|
124
|
-
qqbrowser-skill browser_scroll_to_bottom # Scroll to bottom
|
|
125
|
-
qqbrowser-skill browser_scroll_by --direction down --pixels 500 # Scroll page by direction
|
|
126
|
-
qqbrowser-skill browser_scroll_by --direction right --pixels 200 --index 3_klm5_nop6 # Scroll element by direction
|
|
127
|
-
qqbrowser-skill browser_scroll_into_view --index 5_xyz3_uvw4 # Scroll element into view
|
|
128
|
-
|
|
129
|
-
# Keyboard
|
|
130
|
-
qqbrowser-skill browser_keypress --key Enter # Press a key
|
|
131
|
-
qqbrowser-skill browser_keyboard_op --action type --text "hello" # Type text
|
|
132
|
-
qqbrowser-skill browser_keyboard_op --action inserttext --text "hello" # Insert text without key events
|
|
133
|
-
qqbrowser-skill browser_keydown --key Shift # Hold down a key
|
|
134
|
-
qqbrowser-skill browser_keyup --key Shift # Release a key
|
|
135
|
-
|
|
136
|
-
# Dropdown
|
|
137
|
-
qqbrowser-skill browser_get_dropdown_options --index 2_abc1_def2 # Get dropdown options
|
|
138
|
-
qqbrowser-skill browser_select_dropdown_option --index 2_abc1_def2 --text "Option A" # Select option
|
|
139
|
-
|
|
140
|
-
# Checkbox
|
|
141
|
-
qqbrowser-skill browser_check_op --index 4_klm5_nop6 --value # Check checkbox
|
|
142
|
-
qqbrowser-skill browser_check_op --index 4_klm5_nop6 --no-value # Uncheck checkbox
|
|
143
|
-
|
|
144
|
-
# Get Information
|
|
145
|
-
qqbrowser-skill browser_get_info --type text --index 1_abc1_def2 # Get element text
|
|
146
|
-
qqbrowser-skill browser_get_info --type url # Get current URL
|
|
147
|
-
qqbrowser-skill browser_get_info --type title # Get page title
|
|
148
|
-
qqbrowser-skill browser_get_info --type html --index 1_abc1_def2 # Get element HTML
|
|
149
|
-
qqbrowser-skill browser_get_info --type value --index 1_abc1_def2 # Get element value
|
|
150
|
-
qqbrowser-skill browser_get_info --type attr --index 1_abc1_def2 --attribute href # Get attribute
|
|
151
|
-
qqbrowser-skill browser_get_info --type count # Get element count
|
|
152
|
-
qqbrowser-skill browser_get_info --type box --index 1_abc1_def2 # Get bounding box
|
|
153
|
-
qqbrowser-skill browser_get_info --type styles --index 1_abc1_def2 # Get computed styles
|
|
154
|
-
qqbrowser-skill browser_check_state --state visible --index 1_abc1_def2 # Check visibility
|
|
155
|
-
qqbrowser-skill browser_check_state --state enabled --index 1_abc1_def2 # Check if enabled
|
|
156
|
-
qqbrowser-skill browser_check_state --state checked --index 1_abc1_def2 # Check if checked
|
|
157
|
-
|
|
158
|
-
# Find and Act (semantic locators)
|
|
159
|
-
qqbrowser-skill browser_find_and_act --by role --value button --action click --name "Submit"
|
|
160
|
-
qqbrowser-skill browser_find_and_act --by text --value "Sign In" --action click
|
|
161
|
-
qqbrowser-skill browser_find_and_act --by label --value "Email" --action fill --actionValue "user@test.com"
|
|
162
|
-
qqbrowser-skill browser_find_and_act --by placeholder --value "Search" --action type --actionValue "query"
|
|
163
|
-
qqbrowser-skill browser_find_and_act --by testid --value "submit-btn" --action click
|
|
164
|
-
|
|
165
|
-
# Download
|
|
166
|
-
qqbrowser-skill browser_download_file --index 5_xyz3_uvw4 # Download file by clicking element
|
|
167
|
-
qqbrowser-skill browser_download_url # Download from URL
|
|
168
|
-
|
|
169
|
-
# Tab Management
|
|
170
|
-
qqbrowser-skill browser_tab_open --url <url> # Open URL in new tab
|
|
171
|
-
qqbrowser-skill browser_tab_list # List open tabs
|
|
172
|
-
qqbrowser-skill browser_tab_switch --tabId 2 # Switch to tab
|
|
173
|
-
qqbrowser-skill browser_tab_close --tabId 2 # Close tab
|
|
174
|
-
|
|
175
|
-
# Dialog
|
|
176
|
-
qqbrowser-skill browser_dialog --action accept # Accept dialog
|
|
177
|
-
qqbrowser-skill browser_dialog --action dismiss # Dismiss dialog
|
|
178
|
-
qqbrowser-skill browser_dialog --action accept --text "input text" # Accept prompt with text
|
|
179
|
-
|
|
180
|
-
# JavaScript Evaluation
|
|
181
|
-
qqbrowser-skill browser_eval_content_js --script "document.title" # Evaluate JS and return result
|
|
182
|
-
qqbrowser-skill browser_eval_content_js --script "ZG9jdW1lbnQudGl0bGU=" --base64 # Evaluate base64-encoded JS script
|
|
183
|
-
|
|
184
|
-
# Replay (execute a recorded automation script)
|
|
185
|
-
qqbrowser-skill browser_replay --script /path/to/record.json # Replay from file
|
|
186
|
-
qqbrowser-skill browser_replay --script_content '{"version":"1.0",...}' # Replay from JSON string
|
|
187
|
-
qqbrowser-skill browser_replay --script /path/to/record.json --variables '{"user":"test@example.com","pass":"123"}' # With parameterized variables
|
|
188
|
-
|
|
189
|
-
# Task Completion
|
|
190
|
-
qqbrowser-skill browser_done --success --text "Task completed" # Mark task as done
|
|
191
|
-
qqbrowser-skill browser_done --text "Still in progress" # Mark task as incomplete
|
|
192
|
-
|
|
193
|
-
# Task Recording
|
|
194
|
-
qqbrowser-skill task_begin --description "description of what you are doing" # Start recording commands
|
|
195
|
-
qqbrowser-skill task_end # Stop recording and save
|
|
196
|
-
qqbrowser-skill task_latest # Get the most recent task recording
|
|
197
|
-
|
|
198
|
-
# Help
|
|
199
|
-
qqbrowser-skill list # List all available skills
|
|
200
|
-
qqbrowser-skill <skill_name> --help # Show help for a specific skill
|
|
201
|
-
|
|
202
|
-
# Skill Check
|
|
203
|
-
qqbrowser-skill status # Check skill status
|
|
136
|
+
browser_keypress --key <key>
|
|
137
|
+
browser_keyboard_op --action type --text "<content>"
|
|
138
|
+
browser_keyboard_op --action inserttext --text "<content>"
|
|
139
|
+
browser_keydown --key <key> / browser_keyup --key <key>
|
|
204
140
|
```
|
|
205
141
|
|
|
206
|
-
|
|
142
|
+
### Dropdown & Checkbox
|
|
143
|
+
```bash
|
|
144
|
+
browser_get_dropdown_options --index <id>
|
|
145
|
+
browser_select_dropdown_option --index <id> --text "<option>"
|
|
146
|
+
browser_check_op --index <id> --value / --no-value
|
|
147
|
+
```
|
|
207
148
|
|
|
208
|
-
###
|
|
149
|
+
### Find and Act (Semantic Locators)
|
|
150
|
+
```bash
|
|
151
|
+
browser_find_and_act --by <role|text|label|placeholder|testid|css> --value "<v>" --action <click|fill|type> [--actionValue "<v>"] [--name "<n>"] [--nth <n>]
|
|
152
|
+
```
|
|
153
|
+
> `--nth`: 0-based index for list iteration. Use `by: "css"` + `--nth` for loops.
|
|
209
154
|
|
|
155
|
+
### Get Information & State
|
|
210
156
|
```bash
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
qqbrowser-skill browser_input_text --index 1_abc1_def2 --text "Jane Doe"
|
|
214
|
-
qqbrowser-skill browser_input_text --index 2_xyz3_uvw4 --text "jane@example.com"
|
|
215
|
-
qqbrowser-skill browser_select_dropdown_option --index 3_klm5_nop6 --text "California"
|
|
216
|
-
qqbrowser-skill browser_check_op --index 4_pqr7_stu8 --value
|
|
217
|
-
qqbrowser-skill browser_click_element --index 5_vwx9_yza0
|
|
218
|
-
qqbrowser-skill browser_wait --seconds 2
|
|
219
|
-
qqbrowser-skill browser_snapshot # Verify result
|
|
157
|
+
browser_get_info --type <text|url|title|html|value|attr|count|box|styles|list_selector> [--index <id>] [--attribute <name>]
|
|
158
|
+
browser_check_state --state <visible|enabled|checked> --index <id>
|
|
220
159
|
```
|
|
221
160
|
|
|
222
|
-
|
|
161
|
+
> **`list_selector`**: Auto-detect CSS selector for list iteration. Pass any list item's index → returns `{"selector": "...", "count": N, "samples": [...]}`. Use the returned selector in `find_and_act --by css --value <selector> --nth N`.
|
|
223
162
|
|
|
224
|
-
|
|
163
|
+
### JavaScript Evaluation
|
|
164
|
+
```bash
|
|
165
|
+
browser_eval_content_js --script "<js_code>"
|
|
166
|
+
browser_eval_content_js --script "<base64>" --base64
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Download
|
|
170
|
+
```bash
|
|
171
|
+
browser_download_file --index <id>
|
|
172
|
+
browser_download_url
|
|
173
|
+
```
|
|
225
174
|
|
|
226
|
-
|
|
227
|
-
|
|
175
|
+
### Tab Management
|
|
176
|
+
```bash
|
|
177
|
+
browser_tab_open --url <url>
|
|
178
|
+
browser_tab_list
|
|
179
|
+
browser_tab_switch --tabId <n>
|
|
180
|
+
browser_tab_close --tabId <n>
|
|
181
|
+
```
|
|
228
182
|
|
|
183
|
+
### Dialog
|
|
229
184
|
```bash
|
|
230
|
-
|
|
231
|
-
|
|
185
|
+
browser_dialog --action <accept|dismiss> [--text "<input>"]
|
|
186
|
+
```
|
|
232
187
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
188
|
+
### Replay & Playbook
|
|
189
|
+
```bash
|
|
190
|
+
playbook_list # List available playbooks
|
|
191
|
+
browser_replay --script <path> [--variables '{"key":"value"}']
|
|
192
|
+
browser_replay --script_content '<json>'
|
|
193
|
+
```
|
|
194
|
+
> ⚠️ `browser_replay` can take **up to 10 minutes**. Wait patiently — do NOT interrupt.
|
|
195
|
+
|
|
196
|
+
**`browser_replay` Output Format:**
|
|
197
|
+
```json
|
|
198
|
+
{
|
|
199
|
+
"success": true,
|
|
200
|
+
"total_steps": 5,
|
|
201
|
+
"completed_steps": 5,
|
|
202
|
+
"step_results": [
|
|
203
|
+
{"index": 0, "action": "browser_go_to_url", "description": "...", "success": true, "result": "Success! Navigated to ..."},
|
|
204
|
+
{"index": 1, "action": "browser_eval_content_js", "description": "提取数据", "success": true, "result": "{\"title\":\"...\",\"content\":\"...\"}"}
|
|
205
|
+
],
|
|
206
|
+
"duration_ms": 12345,
|
|
207
|
+
"summary": "Replay completed successfully: 5/5 steps in 12345ms."
|
|
208
|
+
}
|
|
236
209
|
```
|
|
237
210
|
|
|
238
|
-
|
|
211
|
+
**How to use the output (especially for composite tasks):**
|
|
212
|
+
- `success`: Check overall success/failure. If `false`, check `failed_step` for error details.
|
|
213
|
+
- `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.
|
|
214
|
+
- For composite pipelines: find all `eval_content_js` steps in `step_results`, parse their `result` field to get structured data for AI mediation.
|
|
215
|
+
|
|
216
|
+
### Task Recording
|
|
217
|
+
```bash
|
|
218
|
+
task_begin --description "<desc>"
|
|
219
|
+
task_end
|
|
220
|
+
task_latest # Get most recent recording
|
|
221
|
+
```
|
|
222
|
+
> After `task_end`, raw recordings are NOT replay-ready. Must generate proper playbook.
|
|
239
223
|
|
|
224
|
+
### Utility
|
|
240
225
|
```bash
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
qqbrowser-skill browser_snapshot # Get updated content
|
|
226
|
+
browser_done --success --text "<msg>"
|
|
227
|
+
status
|
|
228
|
+
list
|
|
245
229
|
```
|
|
246
230
|
|
|
247
|
-
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Replay-Friendly Execution Rules
|
|
248
234
|
|
|
249
|
-
|
|
235
|
+
### Rule 1: Task Classification
|
|
250
236
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
237
|
+
| Category | Replayable? | Strategy |
|
|
238
|
+
|----------|-------------|----------|
|
|
239
|
+
| **A: Fixed-path** (navigate, click, fill) | ✅ | Standard commands |
|
|
240
|
+
| **B: Data extraction** | ⚠️ | Use `browser_eval_content_js`, NOT `snapshot --markdown` |
|
|
241
|
+
| **C: Content understanding** | ❌ | Mark `"requires_ai": true` |
|
|
242
|
+
| **D: Dynamic iteration** | ⚠️ | Fixed operation count |
|
|
243
|
+
|
|
244
|
+
### Rule 2: Data Extraction — Always Prefer JS
|
|
254
245
|
|
|
255
246
|
```bash
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
247
|
+
# ✅ Replayable
|
|
248
|
+
browser_eval_content_js --script "JSON.stringify(Array.from(document.querySelectorAll('.item')).slice(0,10).map(el=>({title:el.querySelector('.title')?.textContent?.trim()})))"
|
|
249
|
+
# ❌ Non-replayable
|
|
250
|
+
browser_snapshot --markdown # then AI summarizes
|
|
259
251
|
```
|
|
260
252
|
|
|
261
|
-
|
|
253
|
+
### Rule 3: Analyze First, Execute Once
|
|
262
254
|
|
|
263
|
-
|
|
255
|
+
Do NOT trial-and-error during recorded tasks. Use `browser_snapshot` to analyze, then write ONE definitive script. If it fails, `task_end` → discard → re-record.
|
|
264
256
|
|
|
265
|
-
|
|
257
|
+
**PROHIBITED:**
|
|
258
|
+
- ❌ Multiple `eval_content_js` with different selectors
|
|
259
|
+
- ❌ Hardcoding element index in JS scripts
|
|
260
|
+
- ❌ Using regex on page text as selector strategy
|
|
266
261
|
|
|
267
|
-
|
|
262
|
+
### Rule 4: JS Selector Priority
|
|
268
263
|
|
|
269
|
-
|
|
264
|
+
`id` > `data-*` > ARIA > semantic class > structural path. ❌ NEVER use dynamic/hash classes (`.css-1a2b3c`).
|
|
270
265
|
|
|
271
|
-
|
|
272
|
-
2. Execute your browser commands as normal
|
|
273
|
-
3. **After completing the task**, call `task_end` to save the recording
|
|
266
|
+
### Rule 5: Loop Recording
|
|
274
267
|
|
|
275
|
-
|
|
268
|
+
Record **at least 2 iterations** using `browser_find_and_act --by css --nth`:
|
|
276
269
|
|
|
277
270
|
```bash
|
|
278
|
-
#
|
|
279
|
-
|
|
271
|
+
# ★ MANDATORY: Discover selector first
|
|
272
|
+
browser_get_info --type list_selector --index "3_abc1_def2"
|
|
273
|
+
# Record probe for playbook generator:
|
|
274
|
+
browser_eval_content_js --script "JSON.stringify({__list_probe__: true, selector: '.result-item h2 a', count: document.querySelectorAll('.result-item h2 a').length, samples: Array.from(document.querySelectorAll('.result-item h2 a')).slice(0,3).map(e=>e.textContent.trim())})"
|
|
275
|
+
# Iteration 1:
|
|
276
|
+
browser_find_and_act --by css --value ".result-item h2 a" --action click --nth 1
|
|
277
|
+
# ... extract, go back ...
|
|
278
|
+
# Iteration 2:
|
|
279
|
+
browser_find_and_act --by css --value ".result-item h2 a" --action click --nth 2
|
|
280
|
+
# ... extract, go back ...
|
|
281
|
+
```
|
|
280
282
|
|
|
281
|
-
|
|
282
|
-
qqbrowser-skill browser_go_to_url --url https://www.xiaohongshu.com
|
|
283
|
-
qqbrowser-skill browser_snapshot
|
|
284
|
-
qqbrowser-skill browser_click_element --index 5_abc1_def2
|
|
285
|
-
# ... more commands ...
|
|
283
|
+
**Key:** Use `list_selector` to discover CSS selector (NEVER guess). Use `find_and_act --nth` (not `click_element` with hardcoded index).
|
|
286
284
|
|
|
287
|
-
|
|
288
|
-
qqbrowser-skill task_end
|
|
285
|
+
### Rule 6: Multi-Tab Recording
|
|
289
286
|
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
287
|
+
When links open new tabs:
|
|
288
|
+
1. After click, `browser_tab_list` to detect new tab
|
|
289
|
+
2. `browser_tab_switch` → extract → `browser_tab_close` → `browser_tab_switch` back
|
|
290
|
+
3. Do NOT use `browser_go_back` for cross-tab navigation
|
|
291
|
+
4. Record 2+ iterations for loop detection
|
|
293
292
|
|
|
294
|
-
###
|
|
293
|
+
### Rule 7: Fixed vs Variable Parameters
|
|
295
294
|
|
|
296
|
-
|
|
295
|
+
| Fixed (never parameterize) | Variable (→ `{{param}}`) |
|
|
296
|
+
|---|---|
|
|
297
|
+
| `index`, `action`, base URLs, `settings` | `text`, query params, `actionValue`, count in scripts |
|
|
297
298
|
|
|
298
|
-
###
|
|
299
|
+
### Rule 8: Non-Replayable Commands (filtered during replay)
|
|
299
300
|
|
|
300
|
-
|
|
301
|
-
- If `task_begin` is called while a previous recording is still active (not ended), the previous recording is discarded
|
|
302
|
-
- All browser skill commands executed between `task_begin` and `task_end` are automatically recorded
|
|
303
|
-
- The recorded file can be used as a reference for generating parameterized replay scripts
|
|
304
|
-
- Use `task_latest` to retrieve the content of the most recently completed recording (useful for reviewing or processing the recorded steps)
|
|
301
|
+
`browser_snapshot`, `browser_screenshot`, `browser_get_info`, `browser_check_state`, `browser_get_dropdown_options`, `browser_tab_list`
|
|
305
302
|
|
|
306
|
-
###
|
|
303
|
+
### Rule 9: Prefer `browser_find_and_act` for Dynamic Content
|
|
307
304
|
|
|
308
|
-
|
|
305
|
+
```bash
|
|
306
|
+
# ✅ Stable across page changes
|
|
307
|
+
browser_find_and_act --by text --value "{{target}}" --action click
|
|
308
|
+
# ⚠️ Only for stable structures
|
|
309
|
+
browser_click_element --index 15_abc1_def2
|
|
310
|
+
```
|
|
309
311
|
|
|
310
|
-
|
|
311
|
-
2. You **MUST** use `task_latest` to get the recorded steps — do NOT fabricate steps
|
|
312
|
-
3. You **MUST** save the file to `~/.qqbrowser-skill/playbooks/<name>.json` (macOS/Linux) or `%LOCALAPPDATA%/qqbrowser-skill/playbooks/<name>.json` (Windows)
|
|
313
|
-
4. You **MUST** use the exact JSON format specified in the `qqbrowser-playbook` skill (with `metadata`, `params`, `settings`, `steps` structure)
|
|
312
|
+
---
|
|
314
313
|
|
|
315
|
-
|
|
314
|
+
## Generating Playbooks
|
|
316
315
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
316
|
+
After `task_end`, if task is replayable:
|
|
317
|
+
|
|
318
|
+
1. Load `qqbrowser-playbook` skill
|
|
319
|
+
2. `task_latest` → get raw recording
|
|
320
|
+
3. Generate clean playbook (filter AI-only commands, parameterize user data)
|
|
321
|
+
4. Save to `~/.qqbrowser-skill/playbooks/<name>.json`
|
|
322
|
+
|
|
323
|
+
**Rules:**
|
|
324
|
+
- MUST base on `task_latest` — never fabricate steps
|
|
325
|
+
- MUST filter excluded commands
|
|
326
|
+
- MUST use `qqbrowser-playbook` skill JSON format
|
|
327
|
+
- Raw recordings are NOT replay-ready — always generate proper playbook
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getSmithyContext = void 0;
|
|
4
|
-
const types_1 = require("@smithy/types");
|
|
5
|
-
const getSmithyContext = (context) => context[types_1.SMITHY_CONTEXT_KEY] || (context[types_1.SMITHY_CONTEXT_KEY] = {});
|
|
6
|
-
exports.getSmithyContext = getSmithyContext;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHttpAuthSchemeEndpointRuleSetPlugin = exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = void 0;
|
|
4
|
-
const httpAuthSchemeMiddleware_1 = require("./httpAuthSchemeMiddleware");
|
|
5
|
-
exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
|
|
6
|
-
step: "serialize",
|
|
7
|
-
tags: ["HTTP_AUTH_SCHEME"],
|
|
8
|
-
name: "httpAuthSchemeMiddleware",
|
|
9
|
-
override: true,
|
|
10
|
-
relation: "before",
|
|
11
|
-
toMiddleware: "endpointV2Middleware",
|
|
12
|
-
};
|
|
13
|
-
const getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({
|
|
14
|
-
applyToStack: (clientStack) => {
|
|
15
|
-
clientStack.addRelativeTo((0, httpAuthSchemeMiddleware_1.httpAuthSchemeMiddleware)(config, {
|
|
16
|
-
httpAuthSchemeParametersProvider,
|
|
17
|
-
identityProviderConfigProvider,
|
|
18
|
-
}), exports.httpAuthSchemeEndpointRuleSetMiddlewareOptions);
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
exports.getHttpAuthSchemeEndpointRuleSetPlugin = getHttpAuthSchemeEndpointRuleSetPlugin;
|
package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHttpAuthSchemePlugin = exports.httpAuthSchemeMiddlewareOptions = void 0;
|
|
4
|
-
const httpAuthSchemeMiddleware_1 = require("./httpAuthSchemeMiddleware");
|
|
5
|
-
exports.httpAuthSchemeMiddlewareOptions = {
|
|
6
|
-
step: "serialize",
|
|
7
|
-
tags: ["HTTP_AUTH_SCHEME"],
|
|
8
|
-
name: "httpAuthSchemeMiddleware",
|
|
9
|
-
override: true,
|
|
10
|
-
relation: "before",
|
|
11
|
-
toMiddleware: "serializerMiddleware",
|
|
12
|
-
};
|
|
13
|
-
const getHttpAuthSchemePlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider, }) => ({
|
|
14
|
-
applyToStack: (clientStack) => {
|
|
15
|
-
clientStack.addRelativeTo((0, httpAuthSchemeMiddleware_1.httpAuthSchemeMiddleware)(config, {
|
|
16
|
-
httpAuthSchemeParametersProvider,
|
|
17
|
-
identityProviderConfigProvider,
|
|
18
|
-
}), exports.httpAuthSchemeMiddlewareOptions);
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
exports.getHttpAuthSchemePlugin = getHttpAuthSchemePlugin;
|