Commit 06fbbaa
Add session name & tags to browsers and acquire (kernel-go-sdk v0.65.0) (#177)
Adds `name` and `tags` support to the browser commands — `browsers
create/get/update/delete/list` and `browser-pools acquire` — modeled on
the existing `profiles` CLI and the hypeman `--tag KEY=VALUE`
convention: create/acquire set them, get/list/JSON echo them, `list`
gains a `--tag` filter plus a Name column, and lookups now accept
`<id-or-name>`. This requires bumping `kernel-go-sdk` v0.58.0 → v0.65.0,
whose unrelated breaking changes are absorbed in a separate first commit
— all list endpoints became paginated (so
`browser-pools`/`proxies`/`credential-providers`/`extensions` list now
read pages and gain `--limit/--offset` flags), proxy config unions were
renamed, and the proxy API dropped `carrier` entirely. 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 --carrier`
is no longer accepted (mobile create also no longer takes `zip/asn`),
because the upstream API removed mobile carrier selection.
<!-- CURSOR_SUMMARY -->
---
> [!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 `name`
and `tags`** across the CLI: `browsers create` / pool acquire accept
`--name` and repeatable `--tag KEY=VALUE`; `list` filters with `--tag`,
shows a **Name** column, and broadens `--query`;
**get/update/delete/view** take `<id-or-name>`. Pool leases share
**`buildAcquireParams`** so `browser-pools acquire` and `browsers 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`/`--asn`
are passed for mobile). README and unit tests cover the new flags, tag
parsing, and acquire helper.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
188bbf9. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---
## 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.**
| Area | Scenario | Result |
|---|---|---|
| Build / auth | CLI builds, authenticates, and reaches the local API |
✅ pass |
| Flags / help | `create` exposes `--name`/`--tag`; `list` exposes
`--query`/`--tag`/`--limit`/`--offset`; `acquire` exposes
`--name`/`--tag`; all four migrated list commands expose
`--limit`/`--offset` | ✅ pass |
| Relabel | `get`/`view`/`update`/`delete` show `<id-or-name>`; `update`
no-arg error and `delete` usage corrected | ✅ pass |
| Create | `--name` + repeatable `--tag` → name and sorted tags in table
**and** JSON | ✅ pass |
| Create | duplicate name rejected (`Conflict: browser session name
already exists`) | ✅ pass |
| Create | special-character tag key (`region.us=1`) round-trips | ✅
pass |
| get / view | resolve by **ID and by name** (same session); name/tags
in detail + JSON; `view -o json` → `{liveViewUrl}`; not-found handled |
✅ pass |
| update | resolves by name and applies change; `-o json` echoes
name/tags; no `--name`/`--tag` flags (creation-only) | ✅ pass |
| delete | mixed ID + name in one call; idempotent on already-deleted |
✅ pass |
| list | Name column; **`--tag` deepObject filter**; **multiple `--tag`
ANDed**; `--query` matches name; JSON carries name/tags | ✅ pass |
| pool acquire | `--name`/`--tag` applied per-lease and echoed;
**cleared on release** | ✅ pass |
| create-from-pool | `--pool-name --name --tag` **forwards name/tags to
the acquired lease**; both-pool-flags rejected | ✅ pass |
| proxies migration | datacenter/isp/residential/mobile create OK;
mobile `--zip/--asn` warns and still creates; residential keeps zip/asn;
**`--carrier` flag gone, no Carrier in get/list/check** | ✅ pass |
| pagination | `--limit`/`--offset` on browsers / pools / proxies list |
✅ pass |
| negative | `proxies create --carrier` → `Unknown flag`; `-o yaml`
rejected; `app list` unaffected | ✅ pass |
Environment 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-* --stealth`
conflict 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](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>1 parent 0757525 commit 06fbbaa
21 files changed
Lines changed: 692 additions & 139 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
205 | 205 | | |
206 | 206 | | |
207 | 207 | | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
215 | 219 | | |
216 | 220 | | |
217 | 221 | | |
218 | 222 | | |
219 | 223 | | |
220 | 224 | | |
221 | | - | |
222 | | - | |
| 225 | + | |
| 226 | + | |
223 | 227 | | |
224 | | - | |
| 228 | + | |
225 | 229 | | |
226 | | - | |
| 230 | + | |
227 | 231 | | |
228 | 232 | | |
229 | 233 | | |
| |||
264 | 268 | | |
265 | 269 | | |
266 | 270 | | |
| 271 | + | |
| 272 | + | |
267 | 273 | | |
268 | 274 | | |
269 | 275 | | |
| |||
457 | 463 | | |
458 | 464 | | |
459 | 465 | | |
460 | | - | |
461 | | - | |
| 466 | + | |
| 467 | + | |
462 | 468 | | |
463 | | - | |
464 | 469 | | |
465 | 470 | | |
466 | 471 | | |
| |||
781 | 786 | | |
782 | 787 | | |
783 | 788 | | |
784 | | - | |
785 | | - | |
| 789 | + | |
| 790 | + | |
786 | 791 | | |
787 | 792 | | |
788 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| 33 | + | |
| 34 | + | |
32 | 35 | | |
33 | 36 | | |
34 | 37 | | |
| |||
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
44 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
45 | 61 | | |
46 | | - | |
| 62 | + | |
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
50 | | - | |
| 66 | + | |
51 | 67 | | |
52 | 68 | | |
53 | | - | |
| 69 | + | |
54 | 70 | | |
55 | 71 | | |
56 | 72 | | |
| |||
59 | 75 | | |
60 | 76 | | |
61 | 77 | | |
62 | | - | |
| 78 | + | |
63 | 79 | | |
64 | 80 | | |
65 | 81 | | |
| |||
250 | 266 | | |
251 | 267 | | |
252 | 268 | | |
253 | | - | |
| 269 | + | |
254 | 270 | | |
255 | 271 | | |
256 | 272 | | |
| |||
338 | 354 | | |
339 | 355 | | |
340 | 356 | | |
| 357 | + | |
| 358 | + | |
341 | 359 | | |
342 | 360 | | |
343 | 361 | | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
344 | 379 | | |
345 | 380 | | |
346 | 381 | | |
347 | 382 | | |
348 | 383 | | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
| 384 | + | |
353 | 385 | | |
354 | 386 | | |
355 | 387 | | |
| |||
370 | 402 | | |
371 | 403 | | |
372 | 404 | | |
373 | | - | |
374 | | - | |
375 | 405 | | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
376 | 413 | | |
377 | 414 | | |
378 | 415 | | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
379 | 419 | | |
380 | 420 | | |
381 | 421 | | |
| |||
482 | 522 | | |
483 | 523 | | |
484 | 524 | | |
| 525 | + | |
| 526 | + | |
485 | 527 | | |
486 | 528 | | |
487 | 529 | | |
| |||
523 | 565 | | |
524 | 566 | | |
525 | 567 | | |
| 568 | + | |
| 569 | + | |
526 | 570 | | |
527 | 571 | | |
528 | 572 | | |
| |||
542 | 586 | | |
543 | 587 | | |
544 | 588 | | |
| 589 | + | |
| 590 | + | |
545 | 591 | | |
546 | | - | |
| 592 | + | |
547 | 593 | | |
548 | 594 | | |
549 | 595 | | |
| |||
656 | 702 | | |
657 | 703 | | |
658 | 704 | | |
| 705 | + | |
| 706 | + | |
659 | 707 | | |
660 | 708 | | |
661 | | - | |
| 709 | + | |
| 710 | + | |
| 711 | + | |
| 712 | + | |
| 713 | + | |
| 714 | + | |
| 715 | + | |
662 | 716 | | |
663 | 717 | | |
664 | 718 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
0 commit comments