chrome-relay 0.5.19 → 0.5.20

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/dist/cli.js CHANGED
@@ -1101,7 +1101,7 @@ var init_dist = __esm({
1101
1101
  import { Command } from "commander";
1102
1102
 
1103
1103
  // src/index.ts
1104
- var CHROME_RELAY_VERSION = true ? "0.5.19" : "0.0.0-dev";
1104
+ var CHROME_RELAY_VERSION = true ? "0.5.20" : "0.0.0-dev";
1105
1105
 
1106
1106
  // src/commands/shared.ts
1107
1107
  init_dist();
@@ -1344,6 +1344,13 @@ async function runDoctor() {
1344
1344
 
1345
1345
  // src/release-notes.ts
1346
1346
  var RELEASE_NOTES = {
1347
+ "0.5.20": [
1348
+ "BREAKING \u2014 `chrome-relay navigate` no longer steals focus by default. Background is now the implicit behavior; agents pass `--active` when they actually want the user looking at the new tab. The whole product pitch is 'operate without stealing focus' \u2014 the default needed to match.",
1349
+ "`--inactive` flag removed entirely. It was the opt-in for the previous (wrong) default; now it'd be a no-op, and no-op flags are dead code. Agents that were passing `--inactive` should drop it (the behavior is now the default). Commander will reject the unknown flag \u2014 that's the right signal to update.",
1350
+ "Workspace `chrome.windows.create({focused: false})` was already correct from earlier work, so workspaces are unaffected.",
1351
+ 'Click now dispatches as a pointer event. Added `pointerType: "mouse"` to all three `Input.dispatchMouseEvent` calls in the CLICK handler. Without it, CDP only fires mouse events \u2014 modern UI libs (Radix, React-Aria, Headless UI) listen on `pointerdown` and silently ignore mouse-only clicks, so dropdowns / menu triggers / select widgets stayed closed even though the click registered. Discovered while dogfooding `chrome-relay click --x N --y N` against npm\'s token-creation form; verified by completing the full token-creation flow end-to-end (radio click, combobox open, submit) via chrome-relay tools.',
1352
+ "Tests: navigate test updated to assert no `active` field in default request, plus a new test verifying `--active` opts in to focus."
1353
+ ],
1347
1354
  "0.5.19": [
1348
1355
  "Coordinate click. `chrome-relay click --x N --y N --tab N` dispatches a trusted Input.dispatchMouseEvent at the given pixel coordinates \u2014 no selector required. The selector positional became optional; the protocol parser collapses click args into a discriminated union (`kind: 'selector'` | `kind: 'coords'`) and rejects partial coords (`--x` without `--y`) with `invalid_arguments`.",
1349
1356
  "Intentionally NOT shipping `click-text`. Once coord-click exists, finding text + clicking is fully composable with `js` (TreeWalker \u2192 getBoundingClientRect) \u2192 `click --x/--y`. Per the CLI philosophy, that's a smart wrapper, not a primitive. The two-step recipe lives in docs/clicking-strategies.md as the documented pattern.",
@@ -1597,14 +1604,19 @@ function registerNavigation(ctx) {
1597
1604
  await run("get_windows_and_tabs", {});
1598
1605
  });
1599
1606
  tabOpt(
1600
- program.command("navigate <url>").description("Navigate a tab to a URL. Use --tab <id> to target an existing tab.").option("--new", "open in a new tab").option("--inactive", "do not activate the tab").addHelpText(
1607
+ program.command("navigate <url>").description("Navigate a tab to a URL. Use --tab <id> to target an existing tab.").option("--new", "open in a new tab").option("--active", "activate the tab after navigating (default: background \u2014 no focus theft)").addHelpText(
1601
1608
  "after",
1602
1609
  `
1603
1610
 
1604
1611
  Examples:
1605
- chrome-relay navigate "https://example.com"
1606
- chrome-relay navigate --tab 123456789 "https://example.com"
1607
- chrome-relay navigate "https://example.com" --new --inactive
1612
+ chrome-relay navigate "https://example.com" # navigate current tab
1613
+ chrome-relay navigate --tab 123 "https://example.com" # navigate an existing tab
1614
+ chrome-relay navigate "https://example.com" --new # open in a new background tab
1615
+ chrome-relay navigate "https://example.com" --new --active # open new tab AND show it to the user
1616
+
1617
+ By default chrome-relay never steals focus \u2014 navigated tabs (new or
1618
+ existing) stay in whatever state they're in. Pass --active when you
1619
+ actually want the user looking at the page.
1608
1620
  `
1609
1621
  )
1610
1622
  ).action(async (url, opts) => {
@@ -1618,7 +1630,7 @@ Use "chrome-relay switch ${url}" to activate that tab, or "chrome-relay navigate
1618
1630
  }
1619
1631
  const extras = { url };
1620
1632
  if (opts.new) extras.newTab = true;
1621
- if (opts.inactive) extras.active = false;
1633
+ if (opts.active) extras.active = true;
1622
1634
  await run("chrome_navigate", withBase(opts, extras));
1623
1635
  });
1624
1636
  program.command("switch <tabId>").description("Activate a tab by ID.").action(async (tabId) => {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/index.ts
2
- var CHROME_RELAY_VERSION = true ? "0.5.19" : "0.0.0-dev";
2
+ var CHROME_RELAY_VERSION = true ? "0.5.20" : "0.0.0-dev";
3
3
  export {
4
4
  CHROME_RELAY_VERSION
5
5
  };
@@ -56,7 +56,7 @@ function toBridgeError(unknownErr, fallbackTool) {
56
56
  }
57
57
 
58
58
  // src/index.ts
59
- var CHROME_RELAY_VERSION = true ? "0.5.19" : "0.0.0-dev";
59
+ var CHROME_RELAY_VERSION = true ? "0.5.20" : "0.0.0-dev";
60
60
 
61
61
  // src/release-notes.ts
62
62
  function compareSemver(a, b) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-relay",
3
- "version": "0.5.19",
3
+ "version": "0.5.20",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",