@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.
Files changed (180) hide show
  1. package/dist/build-info.json +3 -3
  2. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  3. package/dist/canvas-host/a2ui/a2ui.bundle.js +6 -6
  4. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +1 -0
  5. package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/models/enums.js +1 -0
  6. package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +13 -13
  7. package/node_modules/@aws-sdk/core/package.json +6 -6
  8. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  9. package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
  10. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  11. package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
  12. package/node_modules/@aws-sdk/credential-provider-node/dist-cjs/index.js +12 -1
  13. package/node_modules/@aws-sdk/credential-provider-node/dist-es/runtime/memoize-chain.js +12 -1
  14. package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
  15. package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
  16. package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
  17. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
  18. package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
  19. package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
  20. package/node_modules/@aws-sdk/middleware-websocket/package.json +7 -7
  21. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
  22. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
  23. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
  24. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
  25. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
  26. package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
  27. package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
  28. package/node_modules/@aws-sdk/token-providers/package.json +6 -6
  29. package/node_modules/@aws-sdk/types/package.json +2 -2
  30. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  31. package/node_modules/@clack/core/dist/index.mjs +7 -7
  32. package/node_modules/@clack/core/package.json +2 -1
  33. package/node_modules/@clack/prompts/dist/index.mjs +38 -38
  34. package/node_modules/@clack/prompts/package.json +2 -2
  35. package/node_modules/@nodable/entities/package.json +1 -1
  36. package/node_modules/@nodable/entities/src/EntityDecoder.js +1 -1
  37. package/node_modules/@nodable/entities/src/entities.js +0 -18
  38. package/node_modules/@slack/bolt/dist/App.js +8 -12
  39. package/node_modules/@slack/bolt/dist/context/index.js +7 -7
  40. package/node_modules/@slack/bolt/dist/index.js +16 -16
  41. package/node_modules/@slack/bolt/dist/receivers/AwsLambdaReceiver.js +2 -0
  42. package/node_modules/@slack/bolt/dist/receivers/ExpressReceiver.js +8 -1
  43. package/node_modules/@slack/bolt/dist/receivers/HTTPReceiver.js +4 -2
  44. package/node_modules/@slack/bolt/dist/receivers/SocketModeReceiver.js +1 -1
  45. package/node_modules/@slack/bolt/dist/receivers/verify-request.js +3 -0
  46. package/node_modules/@slack/bolt/dist/receivers/verify-signing-secret.js +12 -0
  47. package/node_modules/@slack/bolt/dist/types/actions/index.js +1 -1
  48. package/node_modules/@slack/bolt/dist/types/index.js +3 -3
  49. package/node_modules/@slack/bolt/package.json +4 -4
  50. package/node_modules/@smithy/core/dist-cjs/index.js +3 -4
  51. package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +3 -11
  52. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +2 -2
  53. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +2 -2
  54. package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +2 -2
  55. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +9 -40
  56. package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +9 -40
  57. package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +12 -142
  58. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +39 -22
  59. package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +39 -22
  60. package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +7 -9
  61. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
  62. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
  63. package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
  64. package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +184 -0
  65. package/node_modules/@smithy/core/dist-es/index.js +6 -6
  66. package/node_modules/@smithy/core/dist-es/submodules/client/index.js +2 -2
  67. package/node_modules/@smithy/core/dist-es/submodules/config/config-resolver/regionConfig/checkRegion.js +1 -1
  68. package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.browser.js +2 -2
  69. package/node_modules/@smithy/core/dist-es/submodules/endpoints/index.js +2 -2
  70. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/toEndpointV1.js +1 -1
  71. package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/resolveEndpointConfig.js +1 -1
  72. package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/lib/index.js +1 -1
  73. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +1 -1
  74. package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +1 -2
  75. package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +1 -1
  76. package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +5 -5
  77. package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +1 -1
  78. package/node_modules/@smithy/core/dist-es/submodules/protocols/requestBuilder.js +1 -1
  79. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +19 -6
  80. package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +4 -5
  81. package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -1
  82. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/ConfiguredRetryStrategy.js +4 -5
  83. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js +3 -0
  84. package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js +9 -5
  85. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js +3 -4
  86. package/node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js +1 -2
  87. package/node_modules/@smithy/core/dist-es/submodules/serde/middleware-serde/deserializerMiddleware.js +1 -1
  88. package/node_modules/@smithy/core/dist-es/submodules/transport/index.js +9 -0
  89. package/node_modules/@smithy/core/dist-es/submodules/{protocols/url-parser → transport}/parseUrl.js +1 -1
  90. package/node_modules/@smithy/core/dist-es/submodules/{endpoints → transport}/toEndpointV1.js +1 -1
  91. package/node_modules/@smithy/core/package.json +20 -11
  92. package/node_modules/@smithy/core/transport.js +5 -0
  93. package/node_modules/@smithy/credential-provider-imds/dist-cjs/index.js +14 -13
  94. package/node_modules/@smithy/credential-provider-imds/dist-es/fromContainerMetadata.js +14 -13
  95. package/node_modules/@smithy/credential-provider-imds/package.json +3 -3
  96. package/node_modules/@smithy/fetch-http-handler/package.json +4 -4
  97. package/node_modules/@smithy/node-http-handler/package.json +4 -4
  98. package/node_modules/@smithy/signature-v4/package.json +3 -3
  99. package/node_modules/@smithy/types/package.json +1 -1
  100. package/node_modules/eventsource-parser/dist/index.cjs +21 -10
  101. package/node_modules/eventsource-parser/dist/index.d.cts +33 -10
  102. package/node_modules/eventsource-parser/dist/index.js +21 -10
  103. package/node_modules/eventsource-parser/dist/stream.cjs +4 -3
  104. package/node_modules/eventsource-parser/dist/stream.d.cts +16 -3
  105. package/node_modules/eventsource-parser/dist/stream.js +4 -3
  106. package/node_modules/eventsource-parser/package.json +8 -8
  107. package/node_modules/hasown/package.json +4 -5
  108. package/node_modules/lru-cache/package.json +1 -1
  109. package/node_modules/protobufjs/dist/light/protobuf.js +7 -5
  110. package/node_modules/protobufjs/dist/light/protobuf.min.js +3 -3
  111. package/node_modules/protobufjs/dist/minimal/protobuf.js +3 -3
  112. package/node_modules/protobufjs/dist/minimal/protobuf.min.js +3 -3
  113. package/node_modules/protobufjs/dist/protobuf.js +7 -5
  114. package/node_modules/protobufjs/dist/protobuf.min.js +3 -3
  115. package/node_modules/protobufjs/package.json +1 -1
  116. package/node_modules/protobufjs/src/converter.js +4 -2
  117. package/node_modules/protobufjs/src/roots.js +1 -1
  118. package/node_modules/thread-stream/.claude/settings.local.json +15 -0
  119. package/node_modules/thread-stream/CLAUDE.md +64 -0
  120. package/node_modules/thread-stream/index.js +41 -13
  121. package/node_modules/thread-stream/lib/indexes.js +3 -1
  122. package/node_modules/thread-stream/lib/worker.js +20 -8
  123. package/node_modules/thread-stream/package.json +1 -1
  124. package/node_modules/undici/lib/global.js +10 -1
  125. package/node_modules/undici/package.json +1 -1
  126. package/package.json +1 -1
  127. package/skills/qqbrowser-playbook/SKILL.md +289 -237
  128. package/skills/qqbrowser-skill/SKILL.md +241 -233
  129. package/node_modules/@smithy/core/dist-cjs/getSmithyContext.js +0 -6
  130. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -21
  131. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/getHttpAuthSchemePlugin.js +0 -21
  132. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js +0 -46
  133. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/index.js +0 -6
  134. package/node_modules/@smithy/core/dist-cjs/middleware-http-auth-scheme/resolveAuthOptions.js +0 -24
  135. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/getHttpSigningMiddleware.js +0 -19
  136. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/httpSigningMiddleware.js +0 -27
  137. package/node_modules/@smithy/core/dist-cjs/middleware-http-signing/index.js +0 -5
  138. package/node_modules/@smithy/core/dist-cjs/normalizeProvider.js +0 -10
  139. package/node_modules/@smithy/core/dist-cjs/pagination/createPaginator.js +0 -44
  140. package/node_modules/@smithy/core/dist-cjs/request-builder/requestBuilder.js +0 -5
  141. package/node_modules/@smithy/core/dist-cjs/setFeature.js +0 -14
  142. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/DefaultIdentityProviderConfig.js +0 -18
  143. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js +0 -38
  144. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.js +0 -15
  145. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/index.js +0 -6
  146. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/httpAuthSchemes/noAuth.js +0 -9
  147. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/index.js +0 -6
  148. package/node_modules/@smithy/core/dist-cjs/util-identity-and-auth/memoizeIdentityProvider.js +0 -61
  149. package/node_modules/@smithy/core/dist-es/request-builder/requestBuilder.js +0 -1
  150. package/node_modules/@smithy/core/dist-es/submodules/client/util-middleware/getSmithyContext.js +0 -2
  151. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/TestVectors.fixture.js +0 -146
  152. package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/vectorTypes.fixture.js +0 -1
  153. package/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/index.js +0 -2
  154. package/node_modules/@smithy/node-http-handler/dist-es/readable.mock.js +0 -21
  155. package/node_modules/@smithy/node-http-handler/dist-es/server.mock.js +0 -88
  156. package/node_modules/@smithy/node-http-handler/dist-es/stream-collector/readable.mock.js +0 -21
  157. package/node_modules/@smithy/signature-v4/dist-es/suite.fixture.js +0 -399
  158. /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemeEndpointRuleSetPlugin.js +0 -0
  159. /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/getHttpAuthSchemePlugin.js +0 -0
  160. /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/httpAuthSchemeMiddleware.js +0 -0
  161. /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/index.js +0 -0
  162. /package/node_modules/@smithy/core/dist-es/{middleware-http-auth-scheme → legacy-root-exports/middleware-http-auth-scheme}/resolveAuthOptions.js +0 -0
  163. /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/getHttpSigningMiddleware.js +0 -0
  164. /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/httpSigningMiddleware.js +0 -0
  165. /package/node_modules/@smithy/core/dist-es/{middleware-http-signing → legacy-root-exports/middleware-http-signing}/index.js +0 -0
  166. /package/node_modules/@smithy/core/dist-es/{pagination → legacy-root-exports/pagination}/createPaginator.js +0 -0
  167. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/DefaultIdentityProviderConfig.js +0 -0
  168. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpApiKeyAuth.js +0 -0
  169. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/httpBearerAuth.js +0 -0
  170. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/index.js +0 -0
  171. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/httpAuthSchemes/noAuth.js +0 -0
  172. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/index.js +0 -0
  173. /package/node_modules/@smithy/core/dist-es/{util-identity-and-auth → legacy-root-exports/util-identity-and-auth}/memoizeIdentityProvider.js +0 -0
  174. /package/node_modules/@smithy/core/dist-es/{getSmithyContext.js → submodules/transport/getSmithyContext.js} +0 -0
  175. /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpRequest.js +0 -0
  176. /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/httpResponse.js +0 -0
  177. /package/node_modules/@smithy/core/dist-es/submodules/{endpoints/util-endpoints/lib → transport}/isValidHostLabel.js +0 -0
  178. /package/node_modules/@smithy/core/dist-es/submodules/{protocols/protocol-http → transport}/isValidHostname.js +0 -0
  179. /package/node_modules/@smithy/core/dist-es/submodules/{client/util-middleware → transport}/normalizeProvider.js +0 -0
  180. /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
- ## Platform Support
13
+ ## Installation
14
14
 
15
- - **Linux x86_64**: Supported
16
- - **Windows**: Supported
17
- - **macOS**: Supported
18
- - Other Linux architectures (ARM, etc.) are not supported.
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
- ## Security
22
+ ## Key Concepts
21
23
 
22
- ### Permissions
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
- This skill requires the following permissions to function properly:
28
+ ---
25
29
 
26
- | Permission | Scope | Purpose |
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
- ### QQBrowser Binary
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
- The `qqbrowser-skill install` command downloads the QQ Browser package from official Tencent distribution channels via HTTPS:
34
+ ```
35
+ User task → playbook_list (MANDATORY) → Match? → YES → browser_replay
36
+ → NO → Manual automation
37
+ ```
34
38
 
35
- - **Base URL**: `https://dldir1v6.qq.com/invc/tt/QB/Public/`
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
- ### File Storage
41
+ ```bash
42
+ qqbrowser-skill playbook_list
43
+ ```
40
44
 
41
- - **Screenshots**: Saved to the system's temporary directory (e.g., `/tmp/` on Linux) and returned as file paths.
42
- - **Downloaded files**: Saved to the system's temporary directory or user-specified path via `browser_download_file` / `browser_download_url`.
43
- - This skill does **not** access or modify files outside of its designated directories.
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
- ## Note:
49
+ ### Step 1: Composite Task — Multi-Playbook Orchestration
46
50
 
47
- Each command will return a snapshot of the current page after execution, including the encoded index of elements (format: `index_attrHash_xpathHash`, e.g. `2_sfli_qp0u`).
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
- ## ⚠️ MANDATORY: Task Recording Required
53
+ ```
54
+ Composite task → Decompose into sub-tasks → Match EACH against playbook_list
55
+ → Execute pipeline: playbook₁ → AI mediation → playbook₂ → ...
56
+ ```
51
57
 
52
- **EVERY browser automation task MUST be wrapped with `task_begin` and `task_end`.** This is NOT optional.
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
- # ALWAYS start with task_begin BEFORE any browser commands
56
- qqbrowser-skill task_begin --description "描述你要做的任务"
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
- # ... your browser commands here ...
78
+ Only when: no matching playbook / replay failed after retry / task requires dynamic AI decisions.
59
79
 
60
- # ALWAYS end with task_end AFTER all browser commands are done
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
- **Rules:**
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
- ## Core Workflow
100
+ ## Command Reference
72
101
 
73
- Every browser automation follows this pattern:
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
- 1. **Record start**: `qqbrowser-skill task_begin --description "task description"`
76
- 2. **Navigate**: `qqbrowser-skill browser_go_to_url --url <url>`
77
- 3. **Snapshot**: `qqbrowser-skill browser_snapshot` (get indexed element refs)
78
- 4. **Interact**: Use element index to click, fill, select
79
- 5. **Re-snapshot**: After navigation or DOM changes, get fresh refs
80
- 6. **Record end**: `qqbrowser-skill task_end`
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
- qqbrowser-skill task_begin --description "Fill out example form"
84
- qqbrowser-skill browser_go_to_url --url https://example.com/form
85
- qqbrowser-skill browser_snapshot
86
- # Output includes element indices: [1_abc1_def2] input "email", [2_xyz3_uvw4] input "password", [3_klm5_nop6] button "Submit"
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
- ## Essential Commands
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
- # Navigation
100
- qqbrowser-skill browser_go_to_url --url <url> # Navigate to URL
101
- qqbrowser-skill browser_go_back # Go back
102
- qqbrowser-skill browser_wait --seconds 3 # Wait for page load (default 3s)
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
- ## Common Patterns
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
- ### Form Submission
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
- qqbrowser-skill browser_go_to_url --url https://example.com/signup
212
- qqbrowser-skill browser_snapshot
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
- ### Data Extraction
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
- Choose the right `browser_snapshot` mode based on intent:
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
- - **`browser_snapshot --markdown`** — preferred for **reading/summarizing** page content (articles, docs, search results, product pages). Returns clean Markdown with ads/nav/scripts stripped. Token-efficient, but contains **no element indices** — cannot be used to drive clicks or inputs.
227
- - **`browser_snapshot`** (default) — required for **interacting** with the page. Returns indexed elements for use with `browser_click_element`, `browser_input_text`, etc.
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
- qqbrowser-skill browser_go_to_url --url https://example.com/products
231
- qqbrowser-skill browser_snapshot --markdown # Read the whole page as clean markdown
185
+ browser_dialog --action <accept|dismiss> [--text "<input>"]
186
+ ```
232
187
 
233
- # Use default snapshot + get_info when you need to interact or read a specific element
234
- qqbrowser-skill browser_snapshot
235
- qqbrowser-skill browser_get_info --type text --index 5_abc1_def2 # Get a specific element's text
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
- ### Infinite Scroll Pages
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
- qqbrowser-skill browser_go_to_url --url https://example.com/feed
242
- qqbrowser-skill browser_scroll_to_bottom # Trigger lazy loading
243
- qqbrowser-skill browser_wait --seconds 2 # Wait for content
244
- qqbrowser-skill browser_snapshot # Get updated content
226
+ browser_done --success --text "<msg>"
227
+ status
228
+ list
245
229
  ```
246
230
 
247
- ## Element Index Lifecycle (Important)
231
+ ---
232
+
233
+ ## Replay-Friendly Execution Rules
248
234
 
249
- Element indices are encoded strings (e.g. `2_sfli_qp0u`) that contain hash information for cross-snapshot matching. They are generated by each snapshot and may change when the page DOM changes. Always re-snapshot after:
235
+ ### Rule 1: Task Classification
250
236
 
251
- - Clicking links or buttons that navigate
252
- - Form submissions
253
- - Dynamic content loading (dropdowns, modals, AJAX)
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
- qqbrowser-skill browser_click_element --index 5_abc1_def2 # May navigate to new page
257
- qqbrowser-skill browser_snapshot # MUST re-snapshot
258
- qqbrowser-skill browser_click_element --index 1_xyz3_uvw4 # Use new indices
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
- ## Evaluation Report
253
+ ### Rule 3: Analyze First, Execute Once
262
254
 
263
- See the full skill evaluation report: [QQBrowserSkillReport](https://bak.res.qq.com/nav/qqbrowser_skills/QQBrowserSkillReport.html)
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
- ## Task Recording (Important for AI Agents)
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
- **IMPORTANT**: When using qqbrowser-skill to complete any automation task, you MUST wrap your commands with `task_begin` and `task_end`. This records all browser operations performed during the task, enabling replay and reuse later.
262
+ ### Rule 4: JS Selector Priority
268
263
 
269
- ### Workflow
264
+ `id` > `data-*` > ARIA > semantic class > structural path. ❌ NEVER use dynamic/hash classes (`.css-1a2b3c`).
270
265
 
271
- 1. **Before starting any browser automation task**, call `task_begin` with a description of what you're about to do
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
- ### Commands
268
+ Record **at least 2 iterations** using `browser_find_and_act --by css --nth`:
276
269
 
277
270
  ```bash
278
- # Start recording call this BEFORE any browser commands for the task
279
- qqbrowser-skill task_begin --description "自动打开小红书并发布一篇笔记"
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
- # ... execute browser commands normally ...
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
- # Stop recording call this AFTER all browser commands are done
288
- qqbrowser-skill task_end
285
+ ### Rule 6: Multi-Tab Recording
289
286
 
290
- # Retrieve the most recent completed task recording
291
- qqbrowser-skill task_latest
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
- ### Output
293
+ ### Rule 7: Fixed vs Variable Parameters
295
294
 
296
- The recorded commands are saved as a JSON file in `~/.qqbrowser-skill/records/` directory. The output format is compatible with the `browser_replay` command, containing a `steps` array where each step has `action` and `params` fields.
295
+ | Fixed (never parameterize) | Variable (→ `{{param}}`) |
296
+ |---|---|
297
+ | `index`, `action`, base URLs, `settings` | `text`, query params, `actionValue`, count in scripts |
297
298
 
298
- ### Notes
299
+ ### Rule 8: Non-Replayable Commands (filtered during replay)
299
300
 
300
- - `task_begin` and `task_end` do not interact with the browser — they only manage the recording state
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
- ### Generating Replay Scripts / Playbooks
303
+ ### Rule 9: Prefer `browser_find_and_act` for Dynamic Content
307
304
 
308
- **CRITICAL**: When the user asks to "save as replay script", "generate playbook", "保存成回放脚本", "生成回放脚本", or any similar request to create a reusable automation script:
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
- 1. You **MUST** load and follow the `qqbrowser-playbook` skill instructions
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
- **DO NOT**:
314
+ ## Generating Playbooks
316
315
 
317
- - Save to any other directory (e.g., `~/.qbotclaw/workspace/` or project directories)
318
- - Use a flat/simplified JSON format — the format has specific nested structure requirements
319
- - Skip loading the playbook skill — it contains the authoritative format specification
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;
@@ -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;