@ricsam/browser-mcp 0.3.10 → 0.3.12
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 +69 -3
- package/dist/{chunk-3f5mve2t.js → chunk-vfx8ntjb.js} +693 -172
- package/dist/main.js +3 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@ Native Chrome companion. Requires Node >=22.14.0 and an installed
|
|
|
4
4
|
Google Chrome. No browser download or startup occurs during npm installation.
|
|
5
5
|
|
|
6
6
|
```sh
|
|
7
|
-
npm install -g @ricsam/browser-mcp@0.3.
|
|
7
|
+
npm install -g @ricsam/browser-mcp@0.3.12
|
|
8
8
|
browser-mcp browser start --server https://browser-mcp.click --profile work
|
|
9
9
|
browser-mcp browser status --profile work
|
|
10
10
|
browser-mcp browser pause --profile work
|
|
@@ -28,6 +28,15 @@ Chrome launch (up to 30 seconds) before closing acquired resources. Repeated
|
|
|
28
28
|
signals wait for that same cleanup. Pairing waits are cancelled too. A cleanup
|
|
29
29
|
error is reported after the other safe cleanup stages have been attempted.
|
|
30
30
|
|
|
31
|
+
Every Chrome launch enables WebMCP by default, equivalent to setting
|
|
32
|
+
`chrome://flags/#enable-webmcp-testing` to **Enabled**. The launcher passes
|
|
33
|
+
`--enable-features=WebMCP,WebMCPTesting,DevToolsWebMCPSupport` to support current
|
|
34
|
+
and earlier Chrome feature names, including the older DevTools protocol gate.
|
|
35
|
+
This applies to persistent, ephemeral and multi-profile browsers. Restart the
|
|
36
|
+
CLI/browser after updating to pick it up; no manual flag or profile edit is
|
|
37
|
+
needed. WebMCP still requires a supporting Chrome version and a site that
|
|
38
|
+
registers tools; it does not automatically invoke tools or grant permissions.
|
|
39
|
+
|
|
31
40
|
Chrome runs headed, without `--enable-automation`, `--headless`,
|
|
32
41
|
`--remote-debugging-pipe` or `--remote-debugging-port=0`, so its native
|
|
33
42
|
`navigator.webdriver` stays false (no getter override or stealth script).
|
|
@@ -38,8 +47,9 @@ control the profile outside MCP authorization and pause controls. Do not expose
|
|
|
38
47
|
or forward it; use a trusted host, not an untrusted multi-user machine.
|
|
39
48
|
|
|
40
49
|
Crash locks are deliberately not removed automatically: verify the exact prior
|
|
41
|
-
owner and Chrome processes are stopped before operator recovery. Retained
|
|
42
|
-
files are not automatically scavenged
|
|
50
|
+
owner and Chrome processes are stopped before operator recovery. Retained recovery
|
|
51
|
+
artifacts and OS/Chrome crash files are not automatically scavenged (the safe JSON
|
|
52
|
+
incidents below have their own bounded retention). Never remove directories by name prefix.
|
|
43
53
|
|
|
44
54
|
### Multiple browsers
|
|
45
55
|
|
|
@@ -72,6 +82,62 @@ options and independent CLI lifetimes. Never launch two owners of the same
|
|
|
72
82
|
profile; use `--profile personal` rather than deleting a busy profile's lock.
|
|
73
83
|
Local control and recovery commands accept one profile at a time.
|
|
74
84
|
|
|
85
|
+
### Chrome exit diagnostics and privacy
|
|
86
|
+
|
|
87
|
+
Unexpected Chrome exits and startup failures produce a concise terminal summary
|
|
88
|
+
and a nonzero CLI result. A requested normal shutdown is not reported as a crash.
|
|
89
|
+
A CDP disconnect is recorded separately: a lost connection alone is **not proof
|
|
90
|
+
that Chrome crashed**. Exit codes/signals and shutdown intent distinguish these
|
|
91
|
+
cases; a classifier label is a hint, not a diagnosis.
|
|
92
|
+
|
|
93
|
+
Safe incident JSON is retained in `~/.browser-mcp/diagnostics/`, outside disposable
|
|
94
|
+
profiles and run directories, so it survives ephemeral cleanup and CLI restarts.
|
|
95
|
+
Records include timestamps, logical profile/instance identity, PID, CLI/Chrome
|
|
96
|
+
versions, lifecycle stage/reason, exit code/signal, shutdown/disconnect flags and
|
|
97
|
+
the diagnostic file location. Lifecycle reasons are fixed CLI descriptions, not
|
|
98
|
+
exception messages. `exitDuringCleanup` distinguishes cleanup-generated signals
|
|
99
|
+
from an independently observed Chrome exit. A disconnect gets a two-second grace
|
|
100
|
+
period for the child exit event before cleanup starts; if Chrome is still alive,
|
|
101
|
+
the result remains a disconnect, not a claimed crash. Treat identity/path metadata
|
|
102
|
+
as local private information.
|
|
103
|
+
Directories require owner-only 0700 permissions and records are exclusively
|
|
104
|
+
created with 0600 permissions; symlink paths and hardlinked records are refused
|
|
105
|
+
or left untouched, never followed or scavenged.
|
|
106
|
+
|
|
107
|
+
Chrome stderr is streamed into a bounded classifier, **not a raw log**. Only fixed
|
|
108
|
+
labels (display, sandbox, profile-lock, disk, crashpad, fatal-check, process-crash),
|
|
109
|
+
severity counts, suppression/overflow counters and the last 32 classified events
|
|
110
|
+
are retained. Unknown lines are counted but discarded. Lines over 4,096 characters
|
|
111
|
+
are discarded in full, including their prefix and suffix. No stderr text,
|
|
112
|
+
filenames, URLs, CDP endpoints, page text or exception strings are retained in
|
|
113
|
+
these diagnostics. There is no raw logging mode, crash-file collection or upload.
|
|
114
|
+
|
|
115
|
+
Each incident is limited to 32 KiB. On a successful write, retention keeps at most
|
|
116
|
+
20 recognized safe records and removes recognized records older than 30 days
|
|
117
|
+
(the newly written record is always kept). Rotation runs on writes, not on a timer.
|
|
118
|
+
Unknown, malformed, non-private, symlinked or hardlinked entries are left alone
|
|
119
|
+
and do not count toward this limit. Concurrent writers serialize through a private
|
|
120
|
+
`.retention-lock` directory; an uncertain/stale lock is never automatically
|
|
121
|
+
removed, and a busy/unsafe store produces a fixed storage-failure summary rather
|
|
122
|
+
than printing underlying errors. After a host crash, an operator must establish
|
|
123
|
+
that no writer is active before removing that exact empty lock directory.
|
|
124
|
+
|
|
125
|
+
For deeper investigation, macOS may retain system `.ips` reports in
|
|
126
|
+
`~/Library/Logs/DiagnosticReports` (also check `/Library/Logs/DiagnosticReports`).
|
|
127
|
+
Chrome's `chrome://crashes` page may list recorded crashes when reporting is enabled.
|
|
128
|
+
Crashpad paths vary by version/configuration: check the dedicated user-data
|
|
129
|
+
folder's `Crashpad` or `Crash Reports` directory; macOS builds may instead use
|
|
130
|
+
`~/Library/Application Support/Google/Chrome/Crashpad`, and Linux builds may use
|
|
131
|
+
`~/.config/google-chrome/Crash Reports`. Linux OS crash reports, when enabled, may
|
|
132
|
+
also be available through `coredumpctl list` or `/var/crash`. None is guaranteed.
|
|
133
|
+
Inspect these locally only if needed; raw dumps may contain credentials or page
|
|
134
|
+
content. The CLI does not read, collect or upload them. OS/Chrome reports can
|
|
135
|
+
survive restart under their own retention policies; reports inside an ephemeral
|
|
136
|
+
profile are removed with that profile. Retention here applies only to this CLI's
|
|
137
|
+
safe JSON, not OS/Chrome reports or retained recovery artifacts described below.
|
|
138
|
+
If the CLI itself is killed abruptly (for example SIGKILL), it cannot guarantee
|
|
139
|
+
an incident record; consult platform reports and the recovery instructions.
|
|
140
|
+
|
|
75
141
|
### Explicit crash recovery
|
|
76
142
|
|
|
77
143
|
After stopping the prior host and its dedicated Chrome, run:
|