Add session name & tags to browsers and acquire (kernel-go-sdk v0.65.0)#177
Merged
Conversation
Mechanical migration required by the SDK bump (no new features). The bump is needed for upcoming browser/acquire name+tags support, but v0.65.0 also ships unrelated breaking changes that the cmd packages must absorb to compile: - All list endpoints are now paginated. Update the List interface signatures and call sites for browser pools, proxies, credential providers, and extensions to take *ListParams and read OffsetPagination.Items. Because the pre-bump List returned the full unpaginated slice, these four commands gain --limit/--offset flags so they can page through results (matching the existing browsers/profiles/api-keys list convention) instead of silently truncating to the first page. - Browser pool update Size is now param.Opt[int64]. - Proxy config unions were renamed (ProxyNewParamsConfigDatacenterProxyConfig → ProxyNewParamsConfigDatacenter, OfProxyNewsConfig… → OfDatacenter, etc.). - The proxy API dropped `carrier` from both request (mobile create) and response configs, so the CLI no longer accepts --carrier or displays Carrier (mobile get/list now surface City/State instead). Mobile create also no longer supports zip/asn; passing them warns and they are ignored. The proxy command docs in README.md are trimmed to match. Tests updated to the new fake List signatures and config shapes, plus limit/offset forwarding tests for the proxy, extension, and credential-provider list commands. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Surface the new Kernel API name/tags fields in the CLI, modeled on the profiles command and the hypeman CLI tag convention. browsers: - create: --name and repeatable --tag KEY=VALUE (parsed with a hypeman-style parser that warns on malformed pairs); forwarded to BrowserNewParams. - get/view/update/delete now accept <id-or-name> (SDK resolves either); name and tags are shown in the get detail table, the JSON output, and a new Name column in list. - list: --tag KEY=VALUE filter (deepObject, ANDed) and --query now also matches name. - create --pool-id/--pool-name: --name/--tag now apply to the acquired lease. - Note: name/tags are creation-time only. get/list and JSON responses echo them, but update cannot change them (the SDK BrowserUpdateParams has no name/tags), so update offers no such flags. browser-pools acquire: --name and --tag apply per-lease (cleared on release), forwarded to BrowserPoolAcquireParams and shown in the acquired-session table. The per-lease acquire params (name/tags/timeout) are built by a single shared buildAcquireParams helper used by both `browser-pools acquire` and the `browsers create --pool-*` path, so the two cannot silently diverge. Adds parseKeyValueSpecs/tagsFromFlag/formatTags helpers and tests for create, list, get (incl. JSON output), acquire, pool-list limit/offset forwarding, the buildAcquireParams forwarding contract, the parser, and the malformed-tag warning path. README is updated for the new browser and acquire flags. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Created a monitoring plan for this PR. What this PR does: Adds optional browser session names and tag filtering to the Intended effect:
Risks:
Status updates will be posted automatically on this PR as monitoring progresses. |
4 tasks
Sayan-
approved these changes
Jun 9, 2026
Sayan-
left a comment
Contributor
There was a problem hiding this comment.
thanks for making this easy to review!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
nameandtagssupport to the browser commands —browsers create/get/update/delete/listandbrowser-pools acquire— modeled on the existingprofilesCLI and the hypeman--tag KEY=VALUEconvention: create/acquire set them, get/list/JSON echo them,listgains a--tagfilter plus a Name column, and lookups now accept<id-or-name>. This requires bumpingkernel-go-sdkv0.58.0 → v0.65.0, whose unrelated breaking changes are absorbed in a separate first commit — all list endpoints became paginated (sobrowser-pools/proxies/credential-providers/extensionslist now read pages and gain--limit/--offsetflags), proxy config unions were renamed, and the proxy API droppedcarrierentirely. The PR is two clean commits — migration first, then feature — and adds unit tests across the new flags, the tag parser, and the shared acquire-params helper. Note one user-visible change:kernel proxies create --carrieris no longer accepted (mobile create also no longer takeszip/asn), because the upstream API removed mobile carrier selection.Note
Medium Risk
SDK bump changes list/pagination and proxy create semantics (dropped
--carrier); behavior is covered by tests but users with mobile carrier scripts will break.Overview
Bumps kernel-go-sdk to v0.65.0 and adds browser session
nameandtagsacross the CLI:browsers create/ pool acquire accept--nameand repeatable--tag KEY=VALUE;listfilters with--tag, shows a Name column, and broadens--query; get/update/delete/view take<id-or-name>. Pool leases sharebuildAcquireParamssobrowser-pools acquireandbrowsers create --pool-*forward name/tags the same way.The SDK upgrade also drives paginated list handling for browser-pools, proxies, extensions, and credential-providers (
--limit/--offset), renamed proxy config unions, and removal of mobile--carrier(plus warnings when--zip/--asnare passed for mobile). README and unit tests cover the new flags, tag parsing, and acquire helper.Reviewed by Cursor Bugbot for commit 188bbf9. Bugbot is set up for automated code reviews on this repo. Configure here.
Manual testing
Tested end-to-end against a locally running Kernel API (
KERNEL_BASE_URL=http://localhost:3001) using the CLI built from this branch — creating, querying, and deleting real browsers, pools, and proxies and asserting both the CLI output and the request params forwarded to the API. All scenarios below passed locally; every test resource was cleaned up afterward.createexposes--name/--tag;listexposes--query/--tag/--limit/--offset;acquireexposes--name/--tag; all four migrated list commands expose--limit/--offsetget/view/update/deleteshow<id-or-name>;updateno-arg error anddeleteusage corrected--name+ repeatable--tag→ name and sorted tags in table and JSONConflict: browser session name already exists)region.us=1) round-tripsview -o json→{liveViewUrl}; not-found handled-o jsonechoes name/tags; no--name/--tagflags (creation-only)--tagdeepObject filter; multiple--tagANDed;--querymatches name; JSON carries name/tags--name/--tagapplied per-lease and echoed; cleared on release--pool-name --name --tagforwards name/tags to the acquired lease; both-pool-flags rejected--zip/--asnwarns and still creates; residential keeps zip/asn;--carrierflag gone, no Carrier in get/list/check--limit/--offseton browsers / pools / proxies listproxies create --carrier→Unknown flag;-o yamlrejected;app listunaffectedEnvironment notes (not CLI issues): the local stack throttles rapid successive creates (spaced requests succeed) and does not enforce the documented 50-tag max; custom-proxy create requires a reachable proxy (the server connection-tests it). The
create --pool-* --stealthconflict still uses an interactive confirm that blocks under non-TTY — pre-existing behavior, worth a follow-up. The ">20 items, no silent truncation" case wasn't exercised (would need many live browsers); the pagination mechanism itself was validated via--limit/--offset.🤖 Generated with Claude Code