chromeflow 0.1.19 → 0.1.21

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.
@@ -75,22 +75,21 @@ If the click causes page navigation, this resolves when the new page finishes lo
75
75
  `Wait for a CSS selector to appear on the page. Use this instead of polling with take_screenshot.
76
76
  Examples: wait for a build to finish, a success/error message to appear, a modal to open.
77
77
  After it resolves, use get_page_text to read the result rather than taking a screenshot.
78
- Use the refresh parameter when results appear on the same page after a server-side process completes
79
- (e.g. a query that runs asynchronously and updates the page when done) \u2014 the page will be reloaded
80
- every N seconds until the selector appears.`,
78
+ For long-running server-side processes (e.g. a query job that may take minutes), set poll_interval
79
+ to 15 seconds so the page is checked gently rather than hammered every 500ms.`,
81
80
  {
82
81
  selector: z.string().describe(
83
82
  `CSS selector to wait for (e.g. '.deploy-ready', '[data-status="error"]', '.toast-error')`
84
83
  ),
85
84
  timeout: z.number().optional().describe("Max seconds to wait (default 30)"),
86
- refresh: z.number().optional().describe(
87
- "If set, reload the page every N seconds while waiting. Use when the result requires a server-side process to complete and the page won't update without a reload (e.g. waiting for a query job to finish)."
85
+ poll_interval: z.number().optional().describe(
86
+ "How often to check for the selector, in seconds (default 0.5). Set to 15 when waiting for a slow server-side process."
88
87
  )
89
88
  },
90
- async ({ selector, timeout = 30, refresh }) => {
89
+ async ({ selector, timeout = 30, poll_interval }) => {
91
90
  const timeoutMs = timeout * 1e3;
92
- const refreshMs = refresh ? refresh * 1e3 : void 0;
93
- await bridge.request({ type: "wait_for_selector", selector, timeout: timeoutMs, refresh: refreshMs }, timeoutMs + 5e3);
91
+ const pollMs = poll_interval ? poll_interval * 1e3 : void 0;
92
+ await bridge.request({ type: "wait_for_selector", selector, timeout: timeoutMs, refresh: pollMs }, timeoutMs + 5e3);
94
93
  return {
95
94
  content: [{ type: "text", text: `Selector "${selector}" found on page.` }]
96
95
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromeflow",
3
- "version": "0.1.19",
3
+ "version": "0.1.21",
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": {