browser-opt 1.0.13 → 1.0.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/browser-opt/runner/actions/utils/select-option-action.d.ts.map +1 -1
- package/dist/browser-opt/runner/actions/utils/select-option-action.js +63 -3
- package/dist/browser-opt/runner/actions/utils/select-option-action.js.map +1 -1
- package/dist/browser-opt/runner/actions/utils/upload-action.d.ts.map +1 -1
- package/dist/browser-opt/runner/actions/utils/upload-action.js +61 -1
- package/dist/browser-opt/runner/actions/utils/upload-action.js.map +1 -1
- package/dist/browser-opt/runner/step-executor.js +3 -1
- package/dist/browser-opt/runner/step-executor.js.map +1 -1
- package/dist/browser-opt/utils.d.ts.map +1 -1
- package/dist/browser-opt/utils.js +6 -2
- package/dist/browser-opt/utils.js.map +1 -1
- package/dist/cli/commands/browser-opt.d.ts.map +1 -1
- package/dist/cli/commands/browser-opt.js +4 -1
- package/dist/cli/commands/browser-opt.js.map +1 -1
- package/dist/cli/commands/setup.d.ts +1 -0
- package/dist/cli/commands/setup.d.ts.map +1 -1
- package/dist/cli/commands/setup.js +106 -8
- package/dist/cli/commands/setup.js.map +1 -1
- package/dist/cli/utils/version-check.d.ts +1 -0
- package/dist/cli/utils/version-check.d.ts.map +1 -1
- package/dist/cli/utils/version-check.js +143 -15
- package/dist/cli/utils/version-check.js.map +1 -1
- package/package.json +1 -1
- package/skills/browser-opt/SKILL.md +38 -8
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: browser-opt
|
|
3
|
-
description:
|
|
4
|
-
summary: Run deterministic browser execution loops with screenshots, JSON snapshots, retries, and concise success output.
|
|
3
|
+
description: Save, match, and execute project-level natural-language browser workflows with agent-browser, including one-shot flows, reusable Workflow requests, interactive handoff, and simplified PASS/FAIL evidence.
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
# browser-opt skill
|
|
@@ -59,7 +58,7 @@ Every execution must follow these rules:
|
|
|
59
58
|
|
|
60
59
|
- Before each `/browser-opt` execution, run `browser-opt check-update --json` once. If it returns
|
|
61
60
|
`outdated`, tell the user the current and latest versions and recommend
|
|
62
|
-
`browser-opt update`;
|
|
61
|
+
`browser-opt update`; if the shell still points to a stale binary or `update` 不可用,再回退到 `npx browser-opt@latest install`;然后继续
|
|
63
62
|
requested workflow unless the user asks to update first. If it returns `unknown`, continue without blocking.
|
|
64
63
|
- Always open the actual system Chrome browser for the run. Do not open or operate inside the agent tool's built-in browser, including the Copilot/Codex in-app browser or any agent-browser dashboard/preview window.
|
|
65
64
|
- Strictly run an `open -> snapshot --json -> deterministic act -> re-snapshot` loop.
|
|
@@ -109,7 +108,7 @@ the system's standard Chrome and installs into the shared Agent Skills directory
|
|
|
109
108
|
Codex, GitHub Copilot, Gemini CLI, and Qoder share this default directory. Use
|
|
110
109
|
`--agent claude` for Claude Code, `--skills-dir <dir>` for another agent root, or
|
|
111
110
|
`--skip-runtime` when only the Skill should be installed. Update all installed
|
|
112
|
-
components later with `browser-opt update
|
|
111
|
+
components later with `browser-opt update`;如果当前 shell 仍指向旧二进制,再回退到 `npx browser-opt@latest install`。
|
|
113
112
|
Use the global command for ordinary invocations on macOS, Linux, and Windows:
|
|
114
113
|
|
|
115
114
|
```bash
|
|
@@ -125,15 +124,46 @@ browser-opt uninstall
|
|
|
125
124
|
Use `--all-data` only when the current project's `.browser-opt` states, artifacts, and handoff records should
|
|
126
125
|
also be deleted.
|
|
127
126
|
|
|
128
|
-
|
|
127
|
+
Treat an explicit save request as Workflow management, not browser execution. Extract the
|
|
128
|
+
Workflow name and the complete natural-language flow from the request, then run `save`.
|
|
129
|
+
Do not open Chrome, call `start`, or execute the saved flow while saving it:
|
|
129
130
|
|
|
130
131
|
```bash
|
|
131
132
|
browser-opt save "创建安选公开直播流程" --flow "<full natural language flow>"
|
|
132
133
|
browser-opt save "创建安选公开直播流程" --flow "<full natural language flow>" --workflow-dir ./custom/workflows
|
|
133
134
|
```
|
|
134
135
|
|
|
135
|
-
|
|
136
|
-
|
|
136
|
+
The flow must include one target URL and all reusable business steps and verification
|
|
137
|
+
points. Preserve concrete test data, upload URLs, and handoff instructions. If the request
|
|
138
|
+
does not provide a Workflow name or target URL, ask for the missing value instead of
|
|
139
|
+
inventing it. Saving an existing name fails by default. Only pass `--force` when the user
|
|
140
|
+
explicitly asks to overwrite or update that Workflow. After saving, report the Workflow
|
|
141
|
+
name and returned file path, and show the short `/browser-opt` request that can execute it.
|
|
142
|
+
|
|
143
|
+
Example Skill request for saving without execution:
|
|
144
|
+
|
|
145
|
+
```text
|
|
146
|
+
/browser-opt 把下面的流程保存为“示例首页验证流程”,先不要执行。
|
|
147
|
+
|
|
148
|
+
目标页面:https://example.com
|
|
149
|
+
|
|
150
|
+
目标:
|
|
151
|
+
1. 验证页面包含“Example Domain”。
|
|
152
|
+
2. 点击“More information”链接。
|
|
153
|
+
3. 验证跳转后的页面可以正常访问。
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Translate it into a single save command:
|
|
157
|
+
|
|
158
|
+
```bash
|
|
159
|
+
browser-opt save "示例首页验证流程" --flow "测试 https://example.com。\n\n目标:\n1. 验证页面包含“Example Domain”。\n2. 点击“More information”链接。\n3. 验证跳转后的页面可以正常访问。"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Then the user can execute the saved Workflow with this Skill request:
|
|
163
|
+
|
|
164
|
+
```text
|
|
165
|
+
/browser-opt 执行示例首页验证流程
|
|
166
|
+
```
|
|
137
167
|
|
|
138
168
|
Saved workflow files are structured JSON, not a single `flow` string. The
|
|
139
169
|
persisted schema uses `target.url` as the page entrypoint plus a `steps` string
|
|
@@ -156,7 +186,7 @@ do not include a first step such as "打开页面":
|
|
|
156
186
|
}
|
|
157
187
|
```
|
|
158
188
|
|
|
159
|
-
When `/browser-opt` is followed by
|
|
189
|
+
When `/browser-opt` is followed by an execution request without a URL, such as:
|
|
160
190
|
|
|
161
191
|
```text
|
|
162
192
|
/browser-opt 执行创建安选公开直播流程
|