chromeflow 0.10.5 → 0.10.6
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/bin/chromeflow.mjs +13 -7
- package/package.json +1 -1
package/bin/chromeflow.mjs
CHANGED
|
@@ -25762,34 +25762,40 @@ Current URL: ${activeTab.url}`;
|
|
|
25762
25762
|
`Wait for the user to click (or interact with) the currently highlighted element, then return.
|
|
25763
25763
|
Use this after highlighting a step so the flow advances automatically without the user returning to the chat.
|
|
25764
25764
|
After this resolves, highlight the next step immediately.
|
|
25765
|
-
If the click causes page navigation, this resolves when the new page finishes loading
|
|
25765
|
+
If the click causes page navigation, this resolves when the new page finishes loading.
|
|
25766
|
+
|
|
25767
|
+
Pass \`redispatch: true\` to turn the user's gesture into a CDP-dispatched isTrusted=true click. When the user clicks the highlighted area, chromeflow captures the coordinates and re-dispatches a full humanlike CDP click (bezier approach, settle hover, pointer events) at those exact coordinates. This produces an isTrusted=true event that passes anti-bot checks. Use for buttons that reject all synthetic clicks (shadow DOM buttons checking isTrusted, annotation dashboard "Collect Traces" buttons) where highlight_region + wait_for_click normally works but only the user's real gesture fires the action. With redispatch, the user still clicks, but chromeflow re-fires via CDP so subsequent automation (activity probe, state verification) works normally.`,
|
|
25766
25768
|
{
|
|
25767
|
-
timeout: external_exports.number().optional().describe("Max seconds to wait for the click (default 120)")
|
|
25769
|
+
timeout: external_exports.number().optional().describe("Max seconds to wait for the click (default 120)"),
|
|
25770
|
+
redispatch: external_exports.boolean().optional().describe("Re-dispatch the user's click via CDP at the captured coordinates (isTrusted=true). The user clicks the highlighted area, chromeflow captures the (x, y) and fires a full humanlike CDP click sequence at those coordinates. Use for anti-bot buttons that reject all synthetic clicks. Returns redispatched=true and redispatch_activity=true/false in the response.")
|
|
25768
25771
|
},
|
|
25769
|
-
async ({ timeout = 120 }) => {
|
|
25772
|
+
async ({ timeout = 120, redispatch }) => {
|
|
25770
25773
|
const watchMs = timeout * 1e3;
|
|
25771
25774
|
const response = await bridge.request(
|
|
25772
25775
|
{
|
|
25773
25776
|
type: "start_click_watch",
|
|
25774
|
-
timeout: watchMs
|
|
25777
|
+
timeout: watchMs,
|
|
25778
|
+
redispatch
|
|
25775
25779
|
},
|
|
25776
25780
|
watchMs + 5e3
|
|
25777
25781
|
);
|
|
25778
25782
|
const r = response;
|
|
25779
25783
|
const targetLine = r.target ? `
|
|
25780
25784
|
Clicked element: <${r.target.tag}>${r.target.text ? ` "${r.target.text}"` : ""} at (${r.target.x}, ${r.target.y}) \u2014 selector: ${r.target.selector}` : "";
|
|
25785
|
+
const redispatchLine = r.redispatched ? `
|
|
25786
|
+
CDP re-dispatched: isTrusted=true click at (${r.target?.x ?? 0}, ${r.target?.y ?? 0})${r.redispatch_activity ? " \u2014 activity detected" : " \u2014 no immediate activity (async action may still be processing)"}` : "";
|
|
25781
25787
|
if (r.type === "navigation_complete") {
|
|
25782
25788
|
return {
|
|
25783
25789
|
content: [
|
|
25784
25790
|
{
|
|
25785
25791
|
type: "text",
|
|
25786
|
-
text: `User clicked. Page navigated to: ${r.url ?? "(unknown)"}${targetLine}`
|
|
25792
|
+
text: `User clicked. Page navigated to: ${r.url ?? "(unknown)"}${targetLine}${redispatchLine}`
|
|
25787
25793
|
}
|
|
25788
25794
|
]
|
|
25789
25795
|
};
|
|
25790
25796
|
}
|
|
25791
25797
|
return {
|
|
25792
|
-
content: [{ type: "text", text: `User clicked the highlighted element.${targetLine}` }]
|
|
25798
|
+
content: [{ type: "text", text: `User clicked the highlighted element.${targetLine}${redispatchLine}` }]
|
|
25793
25799
|
};
|
|
25794
25800
|
}
|
|
25795
25801
|
);
|
|
@@ -26064,7 +26070,7 @@ ${lines.join("\n")}${shadowSection}` }] };
|
|
|
26064
26070
|
}
|
|
26065
26071
|
|
|
26066
26072
|
// packages/mcp-server/src/index.ts
|
|
26067
|
-
var PACKAGE_VERSION = true ? "0.10.
|
|
26073
|
+
var PACKAGE_VERSION = true ? "0.10.6" : "dev";
|
|
26068
26074
|
main().catch((err) => {
|
|
26069
26075
|
console.error("[chromeflow] Fatal error:", err);
|
|
26070
26076
|
process.exit(1);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chromeflow",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.6",
|
|
4
4
|
"description": "MCP server for chromeflow — lets Claude Code or Codex CLI drive your real Chrome browser with sessions intact. Plugin install recommended; npx chromeflow for manual MCP wiring.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./bin/chromeflow.mjs",
|