chromeflow 0.1.7 → 0.1.8

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 CHANGED
@@ -98,8 +98,9 @@ Use the absolute path for `envPath` — it's the Claude Code working directory +
98
98
 
99
99
  ## Error handling
100
100
  - After any action → `get_page_text()` to check for errors (not `take_screenshot`)
101
+ - After `click_element("Save")` / form submission → use `get_page_text()` or `wait_for_selector` to confirm. Never use `wait_for_navigation` — most form saves don't navigate.
101
102
  - `click_element` not found → `scroll_page("down")` then retry
102
103
  - Still not found → `take_screenshot()` then `highlight_region(x,y,w,h,msg)`
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).
104
+ - `fill_input` not found → `click_element(hint)` to focus the field, then retry `fill_input`. If still failing, use `find_and_highlight(hint, "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 fills it automatically. `find_and_highlight` uses DOM positioning (pixel-perfect) — only fall back to `take_screenshot` + `highlight_region` if `find_and_highlight` returns false. 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).
104
105
  - Waiting for async result (build, save, deploy) → `wait_for_selector(selector, timeout)`
105
106
  - Never use Bash to work around a stuck browser interaction
package/dist/index.js CHANGED
@@ -27,7 +27,7 @@ async function main() {
27
27
  const bridge = new WsBridge();
28
28
  const server = new McpServer({
29
29
  name: "chromeflow",
30
- version: "0.1.7"
30
+ version: "0.1.8"
31
31
  });
32
32
  registerBrowserTools(server, bridge);
33
33
  registerHighlightTools(server, bridge);
@@ -70,31 +70,6 @@ If the click causes page navigation, this resolves when the new page finishes lo
70
70
  };
71
71
  }
72
72
  );
73
- server.tool(
74
- "wait_for_navigation",
75
- "Wait for the browser to navigate to a new page (without requiring a prior click watch). Useful after calling open_page or after a form submission.",
76
- {
77
- urlPattern: z.string().optional().describe("Substring to match in the new URL \u2014 waits for any navigation if omitted"),
78
- timeout: z.number().optional().describe("Max seconds to wait (default 30)")
79
- },
80
- async ({ urlPattern, timeout = 30 }) => {
81
- const response = await bridge.request({
82
- type: "start_click_watch",
83
- timeout: timeout * 1e3
84
- });
85
- const url = response.url ?? "";
86
- if (urlPattern && !url.includes(urlPattern)) {
87
- return {
88
- content: [
89
- { type: "text", text: `Navigation detected to ${url} (pattern "${urlPattern}" not matched \u2014 proceeding anyway).` }
90
- ]
91
- };
92
- }
93
- return {
94
- content: [{ type: "text", text: `Page navigated to: ${url}` }]
95
- };
96
- }
97
- );
98
73
  server.tool(
99
74
  "wait_for_selector",
100
75
  `Wait for a CSS selector to appear on the page. Use this instead of polling with take_screenshot.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromeflow",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Browser guidance MCP server for Claude Code — highlights, clicks, fills, and captures from the web so you don't have to.",
5
5
  "type": "module",
6
6
  "bin": {