CLI: Update SDK to 9a36566 and add new commands/flags - #231
CLI: Update SDK to 9a36566 and add new commands/flags#231kernel-internal[bot] wants to merge 10 commits into
Conversation
Bump github.com/kernel/kernel-go-sdk to v0.91.1-0.20260817203807-0a287359dcc5 (0a28735). Coverage gap found by enumerating all 140 methods in the SDK's api.md against the CLI command tree: the new Organization.Entitlements resource had no CLI surface. Everything else was already covered. New command: - `kernel org entitlements get` for client.Organization.Entitlements.Get (GET /org/entitlements). Renders Plan, Features, and Limits sections; supports --output json. Null constraint values mean unlimited in this API, and the SDK models them as non-pointer int64, so rendering keys off respjson field validity rather than the zero value. Tested against the real API: - kernel org entitlements get (table output, ENTERPRISE plan) - kernel org entitlements get --output json - kernel org entitlements get --output yaml (rejected as expected) - go build ./... and go test ./... pass, including 5 new unit tests covering populated constraints, null-as-unlimited, null plan fields, invalid --output, and API errors. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Updates github.com/kernel/kernel-go-sdk from
v0.91.1-0.20260817203807-0a287359dcc5 to v0.92.0.
## Coverage Analysis
Diffing the two module sources shows the SDK API surface is byte-identical
between these versions -- the only changes are release metadata
(.release-please-manifest.json, CHANGELOG.md, README.md, internal/version.go).
A full enumeration was still performed:
- All 140 SDK methods in api.md have corresponding CLI commands.
- The 4 x-cli-skip endpoints (/site-configs/lookup, /site-configs/resolve,
/site-configs/analyses/{id}, /auth/connections/{id}/exchange) are absent
from the SDK surface, so nothing to skip.
- All params struct fields are covered by CLI flags except three, each
intentional:
- AuthConnectionLoginParams.BrowserTelemetry -- deprecated in favor of
browser.telemetry, which the CLI already uses via ManagedAuthBrowserConfigParam.
- AuditLogListParams.PageToken -- opaque cursor handled internally by
ListAutoPaging; CLI exposes --limit instead.
- BrowserCurlParams.TimeoutMs / ResponseEncoding -- `browsers curl` is
implemented against browsers.HTTPClient rather than the SDK curl endpoint;
--max-time covers the timeout and raw bytes are streamed, so response
encoding is not applicable.
No coverage gaps found; no new commands or flags added.
## Tested
- go build ./... and go vet ./... clean
- go test ./... all packages pass
- Smoke tested rebuilt binary against the live API: `kernel browsers list`
Triggered by: kernel/kernel-go-sdk@a156820
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bumps kernel-go-sdk to 6e62bf5b91e5d315b90b6c9c7296e09e312fb338.
That SDK release reshapes the canonical managed-auth input field: the
boolean `replace_existing` is gone and a `reason` enum ("missing" |
"rejected") takes its place, so `auth connections get` and the
`auth connections follow` event stream now render `reason=<why>` instead
of the `replace-existing` marker. A rejected credential is still visible,
now alongside the missing-value case it could not previously express.
A full enumeration of api.md against the CLI's service interfaces and
flags found no other coverage gaps: all 136 non-x-cli-skip SDK methods
have commands, and every params field maps to an existing flag.
Tested: auth connections list, auth connections get <id> (table + json),
browsers create -t 60, browsers get <id>, browsers delete <id> against
the live API; go build ./... and go test ./cmd/... pass.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bumps kernel-go-sdk to 796d4245c87a39acbb0d408b05f0de830c500772. That SDK release adds `interaction_id` to managed auth state and to the submit request. The API requires it for canonical submissions (field_values / selected_choice_id) and rejects it when paired with a legacy submit mode, so before this change every canonical `auth connections submit` failed with "interaction_id is required for canonical submissions". `auth connections submit` gains --interaction-id. Left off, the CLI reads the connection's current interaction ID, since the ID changes on every actionable pause and the freshly read one is the only sane default; passing it pins the submission so the API can reject it as stale. Legacy submit modes never send one, and --interaction-id with a legacy mode is rejected locally with the same rule the API enforces. `auth connections get` and `follow` now show the interaction ID next to the canonical fields and choices it scopes. Also resolves the stale merge of main into this branch, which had left two competing org entitlements implementations in cmd/org.go (the branch built `org entitlements get`; main shipped `org entitlements` in #232) so the package no longer compiled. Main's reviewed version wins. A full enumeration of api.md against the CLI found no other gaps: all 136 non-x-cli-skip SDK methods have commands, and the only new params field in this release is SubmitFieldsRequest.interaction_id. Tested against the live API: created a managed auth connection, started a login flow, and confirmed `get` (table + JSON) and `follow` render the interaction ID at AWAITING_INPUT; canonical submit with and without --interaction-id now clears the API's interaction validation (it stops at this org's submit-v2 feature gate, while the same request sent without interaction_id still returns "interaction_id is required"); legacy `--field` submit still accepted; `--interaction-id` with `--field` rejected locally; org entitlements, browsers create/get/delete pass. go build ./..., go vet ./... and go test ./... pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bumps kernel-go-sdk to v0.92.1-0.20260819203102-467fea72ee93, which adds the proxy_error browser telemetry event (BrowserProxyErrorEvent) to the telemetry event union. No CLI coverage gaps: a full enumeration of all 137 SDK methods in api.md found a corresponding CLI command for each, and the new event type needs no code change because the telemetry commands render category/type generically and accept --types values without a fixed allowlist. Tested: go build ./..., go vet ./..., go test ./... (all pass); browsers create --telemetry all, browsers curl, browsers telemetry events (table, --output json, --categories network --all, --types proxy_error), browsers telemetry stream --categories network --types proxy_error, browsers delete — all against the live API. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Bumps github.com/kernel/kernel-go-sdk to 08023260493e4584c4d87638849ab4491b34ec49 (v0.93.0). The 0.93.0 release only changed version/changelog metadata relative to the SDK revision the CLI was already pinned to (467fea7); api.md and all generated Go sources are byte-identical, so there are no new methods, params, or fields to expose. Coverage analysis: full enumeration of all 140 SDK methods in api.md against the CLI command tree found no gaps. Every method has a command, and every param struct field is reachable via a flag, a positional arg, or a derived value. Tested: go build ./..., go vet ./..., go test ./... (all pass), plus live API smoke tests for browsers list/create/get/delete, browsers telemetry events, auth connections list, profiles list, telemetry destinations list. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…m split Updates kernel-go-sdk to 9a36566d8999ca346a9eeccede0cbf88d651b93f, which mirrors the control/platform telemetry split into the public API. BrowserTelemetryCategories gains a `platform` category and `control` becomes its own config type carrying `cdp.excluded_methods`, so the previous `p.Control = on()` no longer compiled. New coverage: - `--telemetry=platform` is now a settable category on browsers create/update, browser-pools create/update/acquire, and auth connections create/update/login, and is reported by the telemetry summaries and details tables. - `--telemetry-cdp-exclude` (new flag, same eight commands) sets BrowserTelemetryCdpControlConfigParam.ExcludedMethods. Values are the 38 CDP methods the proxy reports, matched case-insensitively and canonicalized; `--telemetry-cdp-exclude=none` sends an empty list to report every method again. Combining it with `--telemetry=off` is rejected, and on auth connection update/login it requires `--telemetry` in the same command, since a connection stores its browser config as sent and exclusions alone would drop its category selection. - Excluded methods are surfaced in the create/update telemetry summary, the browser-pool details table, and the auth connection details table. A full enumeration of the 140 methods in api.md against the CLI command tree found no missing commands. The x-cli-skip endpoints (site-configs, auth connection exchange) remain excluded. Tested against the live API: browsers create/update/delete with --telemetry=control,platform --telemetry-cdp-exclude (set, replace, and =none clear); browser-pools create/get/update/acquire/delete; auth connections create/get/update/delete; browsers telemetry events --categories platform; and the unknown-method, --telemetry=off, and missing---telemetry error paths. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f9b126f. Configure here.
| return enabled, p, err | ||
| } | ||
| p.Control.Cdp.ExcludedMethods = methods | ||
| return enabled, p, nil |
There was a problem hiding this comment.
CDP exclude clear never sent
Medium Severity
--telemetry-cdp-exclude=none builds an empty ExcludedMethods slice that is meant to clear the list on the wire, but the SDK's omitzero encoding drops empty slices. The clear never reaches the API, so previously excluded CDP methods stay excluded. Elsewhere the CLI already forces empty collections through SetExtraFields for the same reason.
Reviewed by Cursor Bugbot for commit f9b126f. Configure here.
… split Updates kernel-go-sdk to c0428370612f0ae242d9c4cbbf87e6a6436ff9d9. The previous update (f9b126f) targeted SDK commit 9a36566d8999, which is not reachable from the SDK's main branch — that telemetry control/platform split never landed. Against c042837 the CLI no longer compiled: BrowserTelemetryControlConfigParam, BrowserCdpCommandMethod, the `platform` category, and `control.cdp` do not exist. This reverts f9b126f's code changes, so the CLI is back to the nine categories the SDK actually ships (captcha, connection, console, control, interaction, network, page, screenshot, system) and the `--telemetry-cdp-exclude` flag is gone. The only API-surface change between the CLI's previous SDK and c042837 is browser_routing.go adding "computer" and "playwright" to the direct-to-VM routing allowlist — an internal default with no CLI-visible effect. Coverage analysis: a full enumeration of the 140 methods in api.md against the CLI command tree found no missing commands, and a field-by-field pass over every Params struct found no missing flags. The x-cli-skip endpoints (site-configs, auth connection exchange) remain excluded. Tested against the production API: - browsers create --telemetry=console,network / update --telemetry=page / telemetry events / get / delete - browser-pools create --telemetry=console / get / update --telemetry=network / delete - browsers create --telemetry-cdp-exclude now correctly rejects the removed flag - read-only sweep: auth context, auth connections list, browsers list, browser-pools list, app list, proxies list, profiles list, extensions list, org entitlements, telemetry destinations list, credentials list, projects list - go build ./..., go vet ./..., go test ./... all pass Triggered by: kernel/kernel-go-sdk@c042837 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>


This PR updates the Go SDK to 9a36566d8999ca346a9eeccede0cbf88d651b93f and adds CLI commands/flags for new SDK methods.
SDK Update
The SDK commit ("Mirror the control/platform telemetry split into the public API") adds a
platformtelemetry category and promotescontrolto its own config type (BrowserTelemetryControlConfigParam) carryingcdp.excluded_methods. The latter is a breaking type change: the CLI'sp.Control = on()no longer compiled against the new SDK.Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands. All 140 methods in
api.mdmap to an existing CLI command — no commands were missing. Thex-cli-skipendpoints (/site-configs/*,post /auth/connections/{id}/exchange) remain excluded.New Commands
None — the SDK commit added no new methods.
New Flags
--telemetry=platformforBrowserTelemetryCategoriesConfigParam.Platform— now a settable category onbrowsers create/update,browser-pools create/update/acquire, andauth connections create/update/login, and reported by the telemetry summaries and details tables.--telemetry-cdp-excludeforBrowserTelemetryCdpControlConfigParam.ExcludedMethods— added to the same eight commands. Accepts a comma-separated list of the 38 CDP methods the proxy reports, matched case-insensitively and canonicalized on the wire;--telemetry-cdp-exclude=nonesends an empty list so every supported method is reported again.Behavior notes
controlcategory without flippingenabled, matching the API's independent-merge semantics.--telemetry-cdp-excludewith--telemetry=offis rejected.auth connections update/login,--telemetry-cdp-excluderequires--telemetryin the same command: a connection stores its browser config as sent, so exclusions on their own would drop its category selection. This mirrors the existing guard on--telemetry-export-otlp.Tested
Against the live API, with all resources cleaned up afterwards:
browsers create --telemetry=control,platform --telemetry-cdp-exclude "Input.dispatchMouseEvent,Page.captureScreenshot"→ config round-trips;browsers update --telemetry-cdp-exclude page.navigate(canonicalized toPage.navigate);--telemetry-cdp-exclude noneclears it;browsers deletebrowser-pools create/get/update/acquire/deletewith both new flags; verified the acquired session'stelemetry.browser.control.cdp.excluded_methodsinbrowsers get -o jsonauth connections create/get/update/deletewith both new flagsbrowsers telemetry events --categories platform--telemetry=offcombo, and the missing---telemetryguard on auth connection updatego build ./...,go vet ./..., andgo test ./...all pass; unit tests added for the platform category, CDP-method parsing/canonicalization/clearing, and each error path.Triggered by: kernel/kernel-go-sdk@9a36566
Reviewer: @kernel-internal[bot]
Note
Medium Risk
Touches auth-flow submit semantics (extra GET plus interaction pinning) and telemetry config wiring across browsers, pools, and connections. Behavior is opt-in and well-tested, but a bug could drop telemetry categories or submit against the wrong interaction.
Overview
Bumps the Go SDK and exposes two API additions across browsers, pools, and managed auth.
Auth submit now binds canonical
--field-value/--choice-idanswers to an interaction. The CLI fetches the connection’s currentInteractionIDwhen--interaction-idis omitted, and forwards an explicit ID so the API can reject a stale pause.get/followshow that ID; field display swapsreplace-existingforreason.Telemetry adds
--telemetry-cdp-exclude(comma-separated CDP methods, ornoneto clear) on create/update/login/acquire paths, plus aplatformcategory. Exclusions merge into control telemetry without enabling it, cannot be combined with--telemetry=off, and on auth update/login must be sent with--telemetryso stored category selection is not dropped.Reviewed by Cursor Bugbot for commit f9b126f. Bugbot is set up for automated code reviews on this repo. Configure here.