chromeflow 0.1.53 → 0.1.55
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/README.md +20 -0
- package/dist/setup.js +10 -3
- package/dist/ws-bridge.js +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,6 +108,26 @@ set_file_input("Upload", "/Users/you/Downloads/task.zip")
|
|
|
108
108
|
|
|
109
109
|
Click the Chromeflow extension icon and use **"Use this window for Claude"** to lock Claude's browser operations to a specific Chrome window. This lets you freely use other Chrome windows without Claude interfering.
|
|
110
110
|
|
|
111
|
+
### Running multiple Claude Code instances in parallel
|
|
112
|
+
|
|
113
|
+
Chromeflow supports up to 11 Claude Code sessions running in parallel, each automating a different Chrome window without touching the others.
|
|
114
|
+
|
|
115
|
+
**How it works:**
|
|
116
|
+
- Each CC session spawns its own Chromeflow MCP server, which auto-discovers a free port in the range `7878-7888` (first session gets 7878, second gets 7879, etc.).
|
|
117
|
+
- The Chrome extension maintains one WebSocket connection per port and tracks per-port window assignments.
|
|
118
|
+
- Every browser tool call is routed to the Chrome window assigned to the port the request came in on.
|
|
119
|
+
|
|
120
|
+
**Setup:**
|
|
121
|
+
1. Start your first Claude Code session as normal — its Chromeflow will claim port 7878.
|
|
122
|
+
2. Start a second CC session in another terminal — its Chromeflow auto-falls-back to 7879.
|
|
123
|
+
3. Click the Chromeflow extension icon. The popup now shows **one row per instance** (Port 7878, Port 7879, ...) each with a green dot when live.
|
|
124
|
+
4. In Chrome **window A**, open the popup and click **"Use this window"** next to Port 7878.
|
|
125
|
+
5. Switch to **window B**, open the popup, and click **"Use this window"** next to Port 7879.
|
|
126
|
+
|
|
127
|
+
That's it. Each CC session now drives its own Chrome window — you can run a DataAnnotation task in one window while the other session fills out a Stripe dashboard in another, with zero collision.
|
|
128
|
+
|
|
129
|
+
Single-instance usage is unchanged and fully backwards compatible — the old per-window assignment is auto-migrated on first load.
|
|
130
|
+
|
|
111
131
|
## Adding to another project
|
|
112
132
|
|
|
113
133
|
Run setup from the new project's directory — the MCP server is already registered globally, this just drops `CLAUDE.md` and tool permissions into the project:
|
package/dist/setup.js
CHANGED
|
@@ -350,8 +350,13 @@ async function runUpdate() {
|
|
|
350
350
|
const existing = readFileSync(claudeMdPath, "utf8");
|
|
351
351
|
if (existing.includes("# Chromeflow")) {
|
|
352
352
|
const before = existing.slice(0, existing.indexOf("# Chromeflow")).trimEnd();
|
|
353
|
-
|
|
354
|
-
|
|
353
|
+
const newContent = (before ? before + "\n\n" : "") + freshContent;
|
|
354
|
+
if (newContent === existing) {
|
|
355
|
+
mdResult = "unchanged";
|
|
356
|
+
} else {
|
|
357
|
+
writeFileSync(claudeMdPath, newContent);
|
|
358
|
+
mdResult = "updated";
|
|
359
|
+
}
|
|
355
360
|
} else {
|
|
356
361
|
writeFileSync(claudeMdPath, existing.trimEnd() + "\n\n" + freshContent);
|
|
357
362
|
mdResult = "appended";
|
|
@@ -360,7 +365,9 @@ async function runUpdate() {
|
|
|
360
365
|
writeFileSync(claudeMdPath, freshContent);
|
|
361
366
|
mdResult = "created";
|
|
362
367
|
}
|
|
363
|
-
if (mdResult === "
|
|
368
|
+
if (mdResult === "unchanged") {
|
|
369
|
+
console.log(`\u2713 ${claudeMdPath} already up to date`);
|
|
370
|
+
} else if (mdResult === "updated") {
|
|
364
371
|
console.log(`\u2713 Updated chromeflow instructions in ${claudeMdPath}`);
|
|
365
372
|
} else if (mdResult === "appended") {
|
|
366
373
|
console.log(`\u2713 Appended chromeflow instructions to ${claudeMdPath}`);
|
package/dist/ws-bridge.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { WebSocketServer, WebSocket } from "ws";
|
|
2
|
+
import path from "path";
|
|
2
3
|
const WS_PORT_BASE = 7878;
|
|
3
4
|
const WS_PORT_MAX = 7888;
|
|
4
5
|
const REQUEST_TIMEOUT_MS = 3e4;
|
|
@@ -46,6 +47,13 @@ class WsBridge {
|
|
|
46
47
|
}
|
|
47
48
|
if (msg.type === "ready") {
|
|
48
49
|
console.error("[chromeflow] Extension ready");
|
|
50
|
+
const cwd = process.cwd();
|
|
51
|
+
ws.send(JSON.stringify({
|
|
52
|
+
type: "identity",
|
|
53
|
+
cwd,
|
|
54
|
+
label: path.basename(cwd),
|
|
55
|
+
port: this.port
|
|
56
|
+
}));
|
|
49
57
|
return;
|
|
50
58
|
}
|
|
51
59
|
const pending = this.pending.get(msg.requestId);
|
package/package.json
CHANGED