Repository navigation
Commit 23fba24
CLI: Update SDK to dab5c0714192e701d845953f1ed95b938e49130f and add new commands/flags (#231)
This PR updates the Go SDK to dab5c0714192e701d845953f1ed95b938e49130f
and adds CLI commands/flags for new SDK methods.
## SDK Update
- Updated kernel-go-sdk to dab5c0714192e701d845953f1ed95b938e49130f
(`v0.105.1-0.20260916183112-dab5c0714192`)
## Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods
and CLI commands.
The SDK delta from the previously covered commit (`04402bd`) touches
only `configregistry.go`: a new `NoRecommendationCode` enum value
`"target_not_evaluable"`. This is a **response** enum, not a request
param, and all six `client.ConfigRegistry.*` endpoints are marked
`x-cli-skip: true` in `openapi.yaml`, so it needs no CLI surface.
A full re-enumeration was still performed on top of that:
- **Methods:** all 165 entries in `api.md` were mapped against the CLI
command tree. The 6 ConfigRegistry methods are `x-cli-skip`; the
remaining 159 all have CLI commands.
- **Params:** all 118 `*Params` structs were swept field-by-field
against the CLI's flag set. No uncovered fields remain. Every apparent
miss resolves to one of:
- a **flag alias** — `--timeout` for `TimeoutSeconds`, `--kiosk` for
`KioskMode`, `--fill-rate` for `FillRatePerMinute`, `--tag` for `Tags`,
`--extension` for `Extensions`, `--profile-id`/`--profile-name` for
`Profile`, `--proxy-id`/`--proxy-name`/`--proxy-mode` for `Proxy`,
`--private-host` for `Network`, `--vault` for `Vaults`, `--bypass-host`
for `BypassHosts`, `--host`/`--port`/`--username`/`--password` for
`Config`, `--dest`/`--src` for `DestPath`/`SrcPath`, `--max-duration`
for `MaxDurationInSeconds`, `--seq` for `LastEventID`, `--categories`
for `Category`, `--user-id` for `SearchUserID`, `--header` for
`Headers`, `--hold-key` for `HoldKeys`;
- a **positional arg** — `kernel invoke <app> <action>` for
`AppName`/`ActionName`, `browsers playwright execute` for `Code`,
`browsers extensions upload` for `Extensions`, `browsers curl -d`/`-H`
for `Body`/`Headers`;
- a **union subcommand** — `vaults cards`/`credentials`/`wallets` for
the `OfCard`/`OfCredential`/`OfWallet` variants, `vaults items invoke`
for the `OfAuthorize`/`OfCollect`/`OfPrepareCheckout`/`OfFill`
operations;
- a **flattened request struct** — `CreateProjectRequest`,
`ManagedAuthCreateRequest`, `UpdateOrgLimitsRequest` etc., whose inner
fields are already exposed as flags.
No new commands or flags were required for this bump.
## Commands and Flags Added Earlier on This Branch
This is an evergreen branch; the following landed in earlier commits and
are still part of the PR.
### New Commands
- `kernel browsers repl <id> [code]` for `client.Browsers.Repl()` —
executes JavaScript in the browser VM's persistent Node.js REPL. Code
may be passed as an argument or piped via stdin. Ordered REPL output is
rendered in place: `write`/`stdout` text goes to stdout, `stderr` text
to stderr, and emitted images are saved or summarized. Errors, stacks,
output truncation, and REPL termination are reported.
### New Flags
- `--reset` for `BrowserReplRequestParam.Reset`
- `--timeout-sec` for `BrowserReplRequestParam.TimeoutSec`
- `--image-dir` (CLI-side) to save images emitted by
`repl.emitImage(...)`
- `-o json` / `--json` for the raw `BrowserReplResult`
## Testing
- `go build ./...`, `go vet ./...` and `go test ./...` all clean against
the new SDK.
- Smoke tested against the live API: `kernel browsers list`, `kernel
proxies list`, `kernel profiles list` — all returned correctly formatted
output.
- Earlier commits' `browsers repl` testing (REPL persistence, `--reset`,
`--timeout-sec`, `--image-dir`, stdout/stderr routing, `-o json`, error
paths) remains covered by `cmd/browsers_test.go`.
Triggered by:
kernel/kernel-go-sdk@dab5c07
Reviewer: @kernel-internal[bot]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Changes managed-auth submit binding and telemetry wire shapes across
several commands, and adds unrestricted in-browser REPL execution—high
operational impact if misused, though behavior is explicit and tested.
>
> **Overview**
> Expands the CLI to match the updated SDK: **persistent browser REPL**
(`kernel browsers repl`), **managed-auth canonical submit** with
`--interaction-id` (auto-resolved from the connection when omitted),
richer field display (`input_mode`, `reason`), and
**`--telemetry-cdp-exclude`** plus the **`platform`** telemetry category
across browsers, pools, and auth connections.
>
> **Browsers & pools:** `browsers update` gains **`--start-url`**
(best-effort navigation); session **get** shows attached **vaults** and
**usage status** on deleted sessions. **WebMCP invoke** treats
`awaiting_submission` as success with guidance instead of failing.
>
> **Ops & limits:** Failed **`kernel invoke`** prints API
**`status_reason`** before raw output. **Org limits/entitlements**
surface **vault** caps and usage. **OTLP destinations** list/detail
include **delivery health** (consecutive failures vs retained last
error).
>
> **Docs:** README and vault invoke help cover multi-PSP
**`prepare_checkout`**, **`collect`**, and REPL usage; proxy create docs
clarify **ISP country** support.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ea2c052. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
---------
Co-authored-by: kernel-internal[bot] <260533166+kernel-internal[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Co-authored-by: kernel-internal[bot] <kernel-internal[bot]@users.noreply.github.com>
Co-authored-by: chruffins <23645059+chruffins@users.noreply.github.com>1 parent 2242ce5 commit 23fba24
24 files changed
Lines changed: 1617 additions & 275 deletions
File tree
- cmd
- proxies
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
338 | | - | |
| 338 | + | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
549 | 549 | | |
550 | 550 | | |
551 | 551 | | |
552 | | - | |
553 | | - | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
554 | 561 | | |
555 | 562 | | |
556 | 563 | | |
557 | 564 | | |
558 | | - | |
| 565 | + | |
559 | 566 | | |
560 | 567 | | |
561 | 568 | | |
| |||
868 | 875 | | |
869 | 876 | | |
870 | 877 | | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
| 889 | + | |
871 | 890 | | |
872 | 891 | | |
873 | 892 | | |
| |||
1007 | 1026 | | |
1008 | 1027 | | |
1009 | 1028 | | |
| 1029 | + | |
1010 | 1030 | | |
1011 | 1031 | | |
1012 | 1032 | | |
| |||
1303 | 1323 | | |
1304 | 1324 | | |
1305 | 1325 | | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
| 1334 | + | |
| 1335 | + | |
| 1336 | + | |
| 1337 | + | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
| 1347 | + | |
| 1348 | + | |
1306 | 1349 | | |
1307 | 1350 | | |
1308 | 1351 | | |
| |||
0 commit comments