chromeflow 0.1.5 → 0.1.7
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/CLAUDE.md +4 -1
- package/dist/index.js +1 -1
- package/dist/tools/highlight.js +2 -2
- package/package.json +1 -1
package/CLAUDE.md
CHANGED
|
@@ -43,10 +43,12 @@ Do NOT ask "should I open the browser?" — just do it. The user expects seamles
|
|
|
43
43
|
```
|
|
44
44
|
1. show_guide_panel(title, steps[]) — show the full plan upfront
|
|
45
45
|
2. open_page(url) — navigate to the right page
|
|
46
|
+
mark_step_done(0) — ALWAYS mark step 0 done right after open_page succeeds
|
|
46
47
|
3. For each step:
|
|
47
48
|
a. Claude acts directly:
|
|
48
49
|
click_element("Save") — press buttons/links Claude can press
|
|
49
50
|
fill_input("Product name", "Pro") — fill fields Claude knows the answer to
|
|
51
|
+
clear_overlays() — call this immediately after fill_input succeeds
|
|
50
52
|
scroll_page("down") — reveal off-screen content then retry
|
|
51
53
|
b. Check results with text, not vision:
|
|
52
54
|
get_page_text() — read errors/status after actions
|
|
@@ -60,6 +62,7 @@ Do NOT ask "should I open the browser?" — just do it. The user expects seamles
|
|
|
60
62
|
d. Pause for the user when needed:
|
|
61
63
|
find_and_highlight(text, msg) — show the user what to do
|
|
62
64
|
wait_for_click() — wait for user interaction
|
|
65
|
+
[after wait_for_click + fill_input] clear_overlays() — always clear after filling
|
|
63
66
|
e. mark_step_done(i) — check off the step
|
|
64
67
|
4. clear_overlays() — clean up when done
|
|
65
68
|
```
|
|
@@ -97,6 +100,6 @@ Use the absolute path for `envPath` — it's the Claude Code working directory +
|
|
|
97
100
|
- After any action → `get_page_text()` to check for errors (not `take_screenshot`)
|
|
98
101
|
- `click_element` not found → `scroll_page("down")` then retry
|
|
99
102
|
- Still not found → `take_screenshot()` then `highlight_region(x,y,w,h,msg)`
|
|
100
|
-
- `fill_input` not found → `click_element(hint)` to focus the field, then retry `fill_input`. If still failing, `take_screenshot()` then `highlight_region(x,y,w,h,
|
|
103
|
+
- `fill_input` not found → `click_element(hint)` to focus the field, then retry `fill_input`. If still failing, `take_screenshot()` then `highlight_region(x,y,w,h, message: "Click here — I'll fill it in")` (NO `valueToType`) then `wait_for_click()` then retry `fill_input` — after the user focuses the field by clicking, the active-element fallback will fill it automatically. After `fill_input` succeeds, immediately call `clear_overlays()` to remove the highlight. Only use `valueToType` when the user genuinely must type the value themselves (e.g. password, personal data).
|
|
101
104
|
- Waiting for async result (build, save, deploy) → `wait_for_selector(selector, timeout)`
|
|
102
105
|
- Never use Bash to work around a stuck browser interaction
|
package/dist/index.js
CHANGED
package/dist/tools/highlight.js
CHANGED
|
@@ -11,7 +11,7 @@ function registerHighlightTools(server, bridge) {
|
|
|
11
11
|
"Instruction to show the user in the callout (e.g. 'Click here to create your API key'). When the user needs to type something, use a short instruction like 'Type this in the field:' and pass the text as valueToType."
|
|
12
12
|
),
|
|
13
13
|
valueToType: z.string().optional().describe(
|
|
14
|
-
"
|
|
14
|
+
"Only use when the user must personally type the value (password, email, personal data). Do NOT use when Claude will auto-fill after the click \u2014 in that case, omit this and use message: 'Click here \u2014 I'll fill it in'."
|
|
15
15
|
)
|
|
16
16
|
},
|
|
17
17
|
async ({ text, message, valueToType }) => {
|
|
@@ -46,7 +46,7 @@ function registerHighlightTools(server, bridge) {
|
|
|
46
46
|
"Instruction to show the user in the callout. When the user needs to type something, use a short instruction like 'Type this in the field:' and pass the text as valueToType."
|
|
47
47
|
),
|
|
48
48
|
valueToType: z.string().optional().describe(
|
|
49
|
-
|
|
49
|
+
`Only use when the user must personally type the value (password, email, personal data). Do NOT use when Claude will auto-fill after the click \u2014 in that case, omit this and use message: "Click here \u2014 I'll fill it in".`
|
|
50
50
|
)
|
|
51
51
|
},
|
|
52
52
|
async ({ x, y, width, height, message, valueToType }) => {
|
package/package.json
CHANGED