@mirsella/browser-mcp 2.0.0 → 2.0.3

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "Shared Chromium profile with isolated conversation tabs for Codex and OpenCode.",
5
5
  "author": {
6
6
  "name": "mirsella"
package/CONTRIBUTING.md CHANGED
@@ -84,13 +84,12 @@ Push the versioned source commit to `main` for 2.x, or to
84
84
  `main` with the full source `commit` SHA. It verifies the pinned workflow and
85
85
  source branch, then reuses the checksummed `npm-package` artifact.
86
86
 
87
- Use `npm_mode=stage` to submit a release for approval on npm's Staged Packages
88
- page. For a new npm name, a temporary staging-only `NPM_STAGE_TOKEN` can
89
- bootstrap the first release; remove that secret and revoke the token after
90
- approval. Configure npm's trusted publisher as this repository's `release.yml`
91
- without an environment, then use `npm_mode=publish` for OIDC publication.
92
- Versions 1.x use `opencode1`; 2.x use `latest`. GitHub releases attach the same
93
- tested tarball and `SHA256SUMS`. Keep npm, Cargo and Codex versions synchronized.
87
+ Configure npm's trusted publisher as this repository's `release.yml` without
88
+ an environment. Dispatch with `npm_mode=publish` to publish through OIDC,
89
+ create the GitHub release, and update the Codex marketplace branch for `latest`.
90
+ Use `npm_mode=dry-run` to verify without writing. Versions 1.x use `opencode1`;
91
+ 2.x use `latest`. GitHub releases attach the same tested tarball and
92
+ `SHA256SUMS`. Keep npm, Cargo and Codex versions synchronized.
94
93
 
95
94
  CI runs headed tests against Chrome for Testing 155.0.8059.39. Update the pin
96
95
  when validating a new browser version.
package/README.md CHANGED
@@ -47,10 +47,44 @@ Concurrent Codex and OpenCode instances converge on the same private socket and
47
47
  profile. The broker remains available while at least one adapter is connected,
48
48
  then closes the browser and exits shortly after the final adapter disconnects.
49
49
 
50
+ The CDP port defaults to `9222`. If that port is occupied, the broker logs the
51
+ collision and selects a free loopback port without adopting or stopping the
52
+ other listener. Adapters keep the same configuration and share the selected
53
+ endpoint. A replacement broker reuses that port only when the exact persisted
54
+ browser generation is still running.
55
+
50
56
  OpenCode loads the JavaScript `./server` package export. Codex uses the
51
57
  plugin and MCP manifests plus the session hooks. Both integrations launch
52
58
  the same packaged Rust executable.
53
59
 
60
+ ## Timeouts and diagnostics
61
+
62
+ Each browser action has one deadline for catalog discovery, browser startup,
63
+ session locking, execution, and reconciliation. `OPENCODE_BROWSER_OPERATION_SECONDS`
64
+ sets that deadline and defaults to 540 seconds. Catalog discovery and compact
65
+ help have a separate 70-second limit. A failed or panicking catalog discovery
66
+ can be retried without restarting the broker.
67
+
68
+ After an interrupted action, the next call replaces that session's worker and
69
+ reconciles its existing owned tabs. Actions are never replayed automatically.
70
+ Dispatched tab creation finishes registering ownership or closing that exact
71
+ target after caller cancellation. Inspect the page before retrying a write
72
+ because it may already have taken effect.
73
+
74
+ The broker writes diagnostics to
75
+ `$XDG_STATE_HOME/browser-mcp/broker-<profile-hash>.log`, or
76
+ `~/.local/state/browser-mcp/` when `XDG_STATE_HOME` is unset. Its startup message
77
+ prints the exact path. Logs are readable only by your user and also go to stderr.
78
+
79
+ Request tracing records the tool name, session ID, current stage, and elapsed
80
+ time. It does not record tool arguments. If a call stalls, look for its last
81
+ stage and whether the broker recorded a deadline, cancellation, catalog failure,
82
+ or worker replacement. Browser stderr is captured in
83
+ `browser-<profile-hash>.log` in the same directory. Its separate writer survives
84
+ broker replacement and exits when Chromium closes the pipe. Each broker or
85
+ browser log retains an 8 MiB file and one rotated `.log.1` backup. A browser that
86
+ exits during startup reports that exit immediately.
87
+
54
88
  ## Codex setup
55
89
 
56
90
  The release tarball contains the executable, both integrations, and a local
@@ -188,7 +222,7 @@ shared by both integrations):
188
222
  | `OPENCODE_BROWSER_PROFILE` | browser-dependent | Shared browser data directory |
189
223
  | `OPENCODE_BROWSER_HEADLESS` | `false` | Run without a visible window |
190
224
  | `OPENCODE_BROWSER_SESSION_LAYOUT` | `shared-window` | `shared-window` or `window-per-session` |
191
- | `OPENCODE_BROWSER_CDP_PORT` | `9222` | Loopback CDP port |
225
+ | `OPENCODE_BROWSER_CDP_PORT` | `9222` | Preferred loopback CDP port; a free port is selected on collision |
192
226
  | `OPENCODE_BROWSER_IDLE_MINUTES` | `30` | Fallback cleanup for routed sessions |
193
227
  | `OPENCODE_BROWSER_MAX_PAGES` | `5` | Max owned tabs per agent session |
194
228
  | `OPENCODE_BROWSER_STARTUP_SECONDS` | `20` | Browser startup deadline |
@@ -272,9 +306,11 @@ See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the development and release workflo
272
306
  CI builds and tests the distributable tarball on every push. Run the `release`
273
307
  workflow from `main` with the full tested source commit: `main` for 2.x, or
274
308
  `release/opencode-v1` for 1.x. The workflow verifies that commit and downloads
275
- its checksummed CI artifact instead of rebuilding it. Use `stage` for npm
276
- browser approval, or `publish` after configuring `release.yml` as an npm
277
- trusted publisher. The channels are `latest` for 2.x and `opencode1` for 1.x.
309
+ its checksummed CI artifact instead of rebuilding it. Dispatch with
310
+ `npm_mode=publish` to publish through npm's OIDC trusted publisher, create the
311
+ GitHub release, and update the Codex marketplace branch for `latest`. Use
312
+ `npm_mode=dry-run` to verify without writing. The channels are `latest` for 2.x
313
+ and `opencode1` for 1.x.
278
314
 
279
315
  ## License
280
316
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirsella/browser-mcp",
3
- "version": "2.0.0",
3
+ "version": "2.0.3",
4
4
  "description": "Session-isolated browser automation over MCP and Chrome DevTools Protocol",
5
5
  "type": "module",
6
6
  "exports": {
@@ -65,7 +65,7 @@
65
65
  "@opencode/plugin": ">=2.0.27 <3"
66
66
  },
67
67
  "dependencies": {
68
- "yaml": "2.8.1"
68
+ "yaml": "2.8.3"
69
69
  },
70
70
  "main": "./server.ts",
71
71
  "scripts": {
Binary file