chromeflow 0.1.23 → 0.1.24

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.
Files changed (2) hide show
  1. package/dist/setup.js +36 -5
  2. package/package.json +1 -1
package/dist/setup.js CHANGED
@@ -156,7 +156,14 @@ const CHROMEFLOW_TOOLS = [
156
156
  "mark_step_done",
157
157
  "find_and_highlight",
158
158
  "highlight_region",
159
- "show_guide_panel"
159
+ "show_guide_panel",
160
+ // v0.1.23+
161
+ "switch_to_tab",
162
+ "list_tabs",
163
+ "get_form_fields",
164
+ "scroll_to_element",
165
+ "save_page_state",
166
+ "restore_page_state"
160
167
  ].map((t) => `mcp__chromeflow__${t}`);
161
168
  function patchSettingsLocalJson(cwd) {
162
169
  const claudeDir = join(cwd, ".claude");
@@ -311,16 +318,40 @@ async function runUninstall() {
311
318
  }
312
319
  console.log("\nDone. Restart Claude Code to complete removal.\n");
313
320
  }
321
+ async function fetchLatestClaudeMd() {
322
+ try {
323
+ const res = await fetch("https://unpkg.com/chromeflow@latest/CLAUDE.md");
324
+ if (res.ok) return await res.text();
325
+ } catch {
326
+ }
327
+ return getClaudeMdContent();
328
+ }
314
329
  async function runUpdate() {
315
330
  const cwd = process.cwd();
316
331
  console.log("\nChromeflow Update\n" + "\u2500".repeat(40));
317
- const mdResult = patchProjectClaudeMd(cwd, true);
332
+ const freshContent = await fetchLatestClaudeMd();
333
+ const claudeMdPath = join(cwd, "CLAUDE.md");
334
+ let mdResult;
335
+ if (existsSync(claudeMdPath)) {
336
+ const existing = readFileSync(claudeMdPath, "utf8");
337
+ if (existing.includes("# Chromeflow")) {
338
+ const before = existing.slice(0, existing.indexOf("# Chromeflow")).trimEnd();
339
+ writeFileSync(claudeMdPath, (before ? before + "\n\n" : "") + freshContent);
340
+ mdResult = "updated";
341
+ } else {
342
+ writeFileSync(claudeMdPath, existing.trimEnd() + "\n\n" + freshContent);
343
+ mdResult = "appended";
344
+ }
345
+ } else {
346
+ writeFileSync(claudeMdPath, freshContent);
347
+ mdResult = "created";
348
+ }
318
349
  if (mdResult === "updated") {
319
- console.log(`\u2713 Updated chromeflow instructions in ${join(cwd, "CLAUDE.md")}`);
350
+ console.log(`\u2713 Updated chromeflow instructions in ${claudeMdPath}`);
320
351
  } else if (mdResult === "appended") {
321
- console.log(`\u2713 Appended chromeflow instructions to ${join(cwd, "CLAUDE.md")}`);
352
+ console.log(`\u2713 Appended chromeflow instructions to ${claudeMdPath}`);
322
353
  } else {
323
- console.log(`\u2713 Created ${join(cwd, "CLAUDE.md")}`);
354
+ console.log(`\u2713 Created ${claudeMdPath}`);
324
355
  }
325
356
  const settingsResult = patchSettingsLocalJson(cwd);
326
357
  if (settingsResult === "already-present") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chromeflow",
3
- "version": "0.1.23",
3
+ "version": "0.1.24",
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": {