@ricsam/browser-mcp 0.3.10 → 0.3.11

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 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.10
7
+ npm install -g @ricsam/browser-mcp@0.3.11
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
@@ -38,8 +38,9 @@ control the profile outside MCP authorization and pause controls. Do not expose
38
38
  or forward it; use a trusted host, not an untrusted multi-user machine.
39
39
 
40
40
  Crash locks are deliberately not removed automatically: verify the exact prior
41
- owner and Chrome processes are stopped before operator recovery. Retained crash
42
- files are not automatically scavenged. Never remove directories by name prefix.
41
+ owner and Chrome processes are stopped before operator recovery. Retained recovery
42
+ artifacts and OS/Chrome crash files are not automatically scavenged (the safe JSON
43
+ incidents below have their own bounded retention). Never remove directories by name prefix.
43
44
 
44
45
  ### Multiple browsers
45
46
 
@@ -72,6 +73,62 @@ options and independent CLI lifetimes. Never launch two owners of the same
72
73
  profile; use `--profile personal` rather than deleting a busy profile's lock.
73
74
  Local control and recovery commands accept one profile at a time.
74
75
 
76
+ ### Chrome exit diagnostics and privacy
77
+
78
+ Unexpected Chrome exits and startup failures produce a concise terminal summary
79
+ and a nonzero CLI result. A requested normal shutdown is not reported as a crash.
80
+ A CDP disconnect is recorded separately: a lost connection alone is **not proof
81
+ that Chrome crashed**. Exit codes/signals and shutdown intent distinguish these
82
+ cases; a classifier label is a hint, not a diagnosis.
83
+
84
+ Safe incident JSON is retained in `~/.browser-mcp/diagnostics/`, outside disposable
85
+ profiles and run directories, so it survives ephemeral cleanup and CLI restarts.
86
+ Records include timestamps, logical profile/instance identity, PID, CLI/Chrome
87
+ versions, lifecycle stage/reason, exit code/signal, shutdown/disconnect flags and
88
+ the diagnostic file location. Lifecycle reasons are fixed CLI descriptions, not
89
+ exception messages. `exitDuringCleanup` distinguishes cleanup-generated signals
90
+ from an independently observed Chrome exit. A disconnect gets a two-second grace
91
+ period for the child exit event before cleanup starts; if Chrome is still alive,
92
+ the result remains a disconnect, not a claimed crash. Treat identity/path metadata
93
+ as local private information.
94
+ Directories require owner-only 0700 permissions and records are exclusively
95
+ created with 0600 permissions; symlink paths and hardlinked records are refused
96
+ or left untouched, never followed or scavenged.
97
+
98
+ Chrome stderr is streamed into a bounded classifier, **not a raw log**. Only fixed
99
+ labels (display, sandbox, profile-lock, disk, crashpad, fatal-check, process-crash),
100
+ severity counts, suppression/overflow counters and the last 32 classified events
101
+ are retained. Unknown lines are counted but discarded. Lines over 4,096 characters
102
+ are discarded in full, including their prefix and suffix. No stderr text,
103
+ filenames, URLs, CDP endpoints, page text or exception strings are retained in
104
+ these diagnostics. There is no raw logging mode, crash-file collection or upload.
105
+
106
+ Each incident is limited to 32 KiB. On a successful write, retention keeps at most
107
+ 20 recognized safe records and removes recognized records older than 30 days
108
+ (the newly written record is always kept). Rotation runs on writes, not on a timer.
109
+ Unknown, malformed, non-private, symlinked or hardlinked entries are left alone
110
+ and do not count toward this limit. Concurrent writers serialize through a private
111
+ `.retention-lock` directory; an uncertain/stale lock is never automatically
112
+ removed, and a busy/unsafe store produces a fixed storage-failure summary rather
113
+ than printing underlying errors. After a host crash, an operator must establish
114
+ that no writer is active before removing that exact empty lock directory.
115
+
116
+ For deeper investigation, macOS may retain system `.ips` reports in
117
+ `~/Library/Logs/DiagnosticReports` (also check `/Library/Logs/DiagnosticReports`).
118
+ Chrome's `chrome://crashes` page may list recorded crashes when reporting is enabled.
119
+ Crashpad paths vary by version/configuration: check the dedicated user-data
120
+ folder's `Crashpad` or `Crash Reports` directory; macOS builds may instead use
121
+ `~/Library/Application Support/Google/Chrome/Crashpad`, and Linux builds may use
122
+ `~/.config/google-chrome/Crash Reports`. Linux OS crash reports, when enabled, may
123
+ also be available through `coredumpctl list` or `/var/crash`. None is guaranteed.
124
+ Inspect these locally only if needed; raw dumps may contain credentials or page
125
+ content. The CLI does not read, collect or upload them. OS/Chrome reports can
126
+ survive restart under their own retention policies; reports inside an ephemeral
127
+ profile are removed with that profile. Retention here applies only to this CLI's
128
+ safe JSON, not OS/Chrome reports or retained recovery artifacts described below.
129
+ If the CLI itself is killed abruptly (for example SIGKILL), it cannot guarantee
130
+ an incident record; consult platform reports and the recovery instructions.
131
+
75
132
  ### Explicit crash recovery
76
133
 
77
134
  After stopping the prior host and its dedicated Chrome, run: