From b499cec03cfc81ff206adb91d888a3cf5649afa3 Mon Sep 17 00:00:00 2001 From: Sayan Samanta Date: Wed, 10 Jun 2026 10:19:40 -0700 Subject: [PATCH] Fix telemetry --telemetry help to match update merge semantics A per-category telemetry update merges into the session's current selection rather than replacing it; only --telemetry=all/off reset the whole config. The update flag help said "replaces current selection" and "capture exactly those categories", which is wrong for the merge path. Also refresh the README's telemetry section, which still showed the removed name=on/off grammar, an "all categories" label for the default set, and the old --categories list. Co-authored-by: Cursor --- README.md | 6 +++--- cmd/browsers.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c63a264..40544f7 100644 --- a/README.md +++ b/README.md @@ -300,14 +300,14 @@ Commands with JSON output support: Telemetry config is a sub-field of the browser session. Use `browsers create` or `browsers update` to enable, disable, or configure it, and `browsers get` to inspect the current state. -- Enable all categories: `kernel browsers update --telemetry=all` +- Enable the default set: `kernel browsers update --telemetry=all` - Disable: `kernel browsers update --telemetry=off` -- Per-category: `kernel browsers update --telemetry=network=on,page=off` (valid: `console`, `interaction`, `network`, `page`; `system` always emits and cannot be toggled) +- Capture specific categories: `kernel browsers update --telemetry=console,network` (any of: `console`, `network`, `page`, `interaction`, `control`, `connection`, `system`, `screenshot`, `captcha`) Per-category updates are partial — only categories you name are changed; others retain their current state. `--telemetry=all` and `--telemetry=off` reset the entire config. - `kernel browsers telemetry stream ` - Stream live telemetry events (NDJSON with `-o json`) - - `--categories ` - Filter by event category (`api`, `console`, `interaction`, `network`, `page`, `system`); `system` matches `monitor_*` and `cdp_*` event types + - `--categories ` - Filter by event category (`console`, `network`, `page`, `interaction`, `control`, `connection`, `system`, `screenshot`, `captcha`, `monitor`) - `--types ` - Filter by event type (e.g. `network_response`, `console_error`) - `--seq ` - Resume after sequence number N (Last-Event-ID); replays events with `seq > N`. Omit to stream from now. - `-o, --output json` - Output newline-delimited JSON envelopes diff --git a/cmd/browsers.go b/cmd/browsers.go index de8aa01..4659d3e 100644 --- a/cmd/browsers.go +++ b/cmd/browsers.go @@ -2331,7 +2331,7 @@ func init() { browsersUpdateCmd.Flags().Bool("save-changes", false, "If set, save changes back to the profile when the session ends") browsersUpdateCmd.Flags().String("viewport", "", "Browser viewport size (e.g., 1920x1080@25). Supported: 2560x1440@10, 1920x1080@25, 1920x1200@25, 1440x900@25, 1024x768@60, 1200x800@60, 1280x800@60") browsersUpdateCmd.Flags().Bool("force", false, "Force viewport resize even when a live view or recording/replay is active") - browsersUpdateCmd.Flags().String("telemetry", "", "Update telemetry (opt-in, replaces current selection): --telemetry=all (default set), --telemetry=off (disable), or --telemetry=console,network (capture exactly those categories)") + browsersUpdateCmd.Flags().String("telemetry", "", "Update telemetry: --telemetry=all (reset to default set), --telemetry=off (disable), or --telemetry=console,network (merge those categories into the current selection)") browsersCmd.AddCommand(browsersListCmd) browsersCmd.AddCommand(browsersCreateCmd)