Skip to content

CLI: Update SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and add new commands/flags - #215

Open
kernel-internal[bot] wants to merge 3 commits into
mainfrom
cli-coverage-update
Open

CLI: Update SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and add new commands/flags#215
kernel-internal[bot] wants to merge 3 commits into
mainfrom
cli-coverage-update

Conversation

@kernel-internal

@kernel-internal kernel-internal Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

This PR updates the Go SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and adds CLI commands/flags for new SDK methods.

SDK Update

  • Updated kernel-go-sdk to v0.86.1-0.20260804210355-b94cd585bac0.

The target commit 9e39767 is not resolvable as a module version on its own — it exists only on the staging repo's main, so go get @9e39767 fails with unknown revision. Commit b94cd58 is a direct child of 9e39767 and is published, so this pseudo-version already contains the target commit.

9e39767 also contains no API changes: relative to v0.86.0 it adds only .github/workflows/stlc-{promote,sync}.yml, touching zero .go files and no api.md. The supplied sdk-diff.patch was empty, consistent with this.

Coverage Analysis

This PR was generated by performing a full enumeration of SDK methods and CLI commands.

  • All 127 methods in api.md map to an existing CLI command — no missing commands.
  • The 7 x-cli-skip: true endpoints in openapi.yaml (auth connections exchange, audit-log export destinations) are absent from the SDK, so there was nothing to skip.
  • Every *Params field was diffed against every command's flags. Because Stainless hides many fields behind embedded request structs and unions, the embedded structs (ManagedAuthCreateRequest, ManagedAuthUpdateRequest, SubmitFieldsRequest, CreateCredentialRequest, UpdateCredentialRequest, CreateProjectRequest, UpdateProjectRequest, UpdateProjectLimitsRequest, UpdateOrgLimitsRequest, CreateCredentialProviderRequest, UpdateCredentialProviderRequest) and the ProxyNewParamsConfig union variants were expanded and checked field-by-field.

This surfaced one genuine gap — pre-existing rather than new in this bump.

New Commands

None — the SDK added no methods.

New Flags

  • --format for AuditLogExportChunkParams.Format on kernel audit-logs download, accepting jsonl.gz (default) or jsonl. The format was previously hardcoded to jsonl.gz, making uncompressed export unreachable from the CLI. The default output filename now derives its extension from the selected format instead of always ending in .jsonl.gz.

Fields deliberately not exposed as flags

  • BrowserCurlParams.ResponseEncodingkernel browsers curl does not call the SDK Curl method at all; it streams raw bytes over the browser's HTTPClient, which is already binary-safe, so the JSON-transport encoding is moot.
  • AuditLogListParams.PageToken / AuditLogExportChunkParams.Cursor — internal pagination, driven by response headers.

Testing

Verified against the live API:

Command Result
audit-logs download --format jsonl (25-day window) 74 chunks, 3,669,435 rows → audit-logs-20260710-20260804.jsonl; file reports NDJSON, lines parse as JSON
audit-logs download (default) audit-logs-20260803-20260804.jsonl.gz; gunzip yields 109,526 lines, matching the reported row count
audit-logs download --format jsonl.gz --to explicit.jsonl.gz byte-identical size to the default run
audit-logs download --format csv rejected locally: invalid --format value: csv

go build ./..., go vet, and go test ./... all pass, before and after rebasing onto the b94cd58 go.mod bump.

Triggered by: kernel/kernel-go-sdk@9e39767
Reviewer: @sjmiller609


Note

Low Risk
Changes are additive CLI flag wiring and table output with validation; they delegate to the API and preserve backward compatibility for deprecated API key listing behavior.

Overview
Updates kernel-go-sdk to v0.86.1-0.20260804210355-b94cd585bac0 and threads new API list/export parameters through the CLI.

List and history commands gain --query (and often --name) on proxies, extensions, browser pools, profiles, projects, credentials, credential providers, auth connections, deploy history, and invocation history. api keys list adds --name, --query, --status (with --include-deleted kept as a deprecated fallback), --sort-by, --sort-direction, and a conditional Deleted At table column when deleted keys can appear.

Audit log download exposes --format (jsonl.gz default or jsonl), with default output filenames following the chosen format. Browser pool acquire and browsers create with a pool accept --start-url via shared buildAcquireParams. browsers telemetry events adds --order (asc/desc) and rejects --order desc with --since.

Auth connection output shows replace-existing on managed-auth fields. projects list adds paging (--page, --per-page) plus name/query filters and a Next: hint. profiles list adds --name and fixes the pagination hint to kernel profiles list (tests updated).

Reviewed by Cursor Bugbot for commit 2585945. Bugbot is set up for automated code reviews on this repo. Configure here.

Updates github.com/kernel/kernel-go-sdk to v0.86.0
(b5ea2f3dee2cbb2af9001e4558a28a807d31aeb3).

A full enumeration of all 127 api.md methods against the CLI command tree
found no missing commands. Enumerating every *Params field against every
command's flags surfaced a set of filter/sort/pagination params the CLI
never exposed; this closes those.

New flags:
- kernel api-keys list: --name, --query, --status, --include-deleted
  (deprecated alias for --status all), --sort-by, --sort-direction.
  Adds a Deleted At column when the filter can return deleted keys,
  matching `browsers list`.
- kernel projects list: --page, --per-page, --name, --query. This command
  previously had no flags at all and always returned the API's default page.
  Uses the page-based pagination UX with a footer, as in `app list`.
- kernel browser-pools list: --name, --query
- kernel extensions list: --name, --query
- kernel proxies list: --name, --query
- kernel profiles list: --name
- kernel auth connections list: --query
- kernel credentials list: --query
- kernel credential-providers list: --query
- kernel deploy history: --query
- kernel invoke history: --query
- kernel browser-pools acquire: --start-url (BrowserPoolAcquireParams.StartURL)
- kernel browsers telemetry events: --order asc|desc
  (BrowserTelemetryEventsParams.Order), rejecting `--order desc --since`
  locally since the endpoint 400s on that combination.

SDK 0.86.0 changes:
- ManagedAuthField.ReplaceExisting is now surfaced by
  `auth connections get` (as a `replace-existing` field marker) and
  `auth connections follow`, so it is visible before running `submit`.
- ProjectLimits.MaxPooledSessions doc-only deprecation; no CLI change
  needed (the flag already exists and the API rejects it).

Also forwards `browsers create --pool-id/--pool-name --start-url` through
to the acquire call instead of warning and dropping it. start_url is a
per-lease override on BrowserPoolAcquireParams, so it now sits alongside
name/tag/telemetry/timeout in poolLeaseAllowedFlags.

Tested against the live API:
- api-keys list --status all --sort-by name --sort-direction asc (verified
  sort order and Deleted At population), --query, --include-deleted,
  and --sort-by/--sort-direction/--status validation errors
- projects list --per-page 3 / --page 2 (footer + Next hint), --name, --query
- --name and --query on proxies/extensions/browser-pools/profiles list
- --query on credentials/credential-providers/auth connections list,
  deploy history, invoke history
- browsers telemetry events --order desc (returned seq 22->18 vs asc 1->5)
  and the --order desc --since / --order bogus validation errors
- browser-pools acquire --start-url and
  browsers create --pool-id --start-url (API echoed start_url on both)
- go build, go vet, and go test ./... all pass

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@socket-security

socket-security Bot commented Aug 4, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedgolang/​github.com/​kernel/​kernel-go-sdk@​v0.85.0 ⏵ v0.86.1-0.20260804210355-b94cd585bac072 +1100100100100

View full report

Bump github.com/kernel/kernel-go-sdk to
v0.86.1-0.20260804210355-b94cd585bac0 (commit b94cd58).

The new SDK commit is byte-identical to v0.86.0 in module content -- the
two upstream commits only touch CI promotion workflows, which are not
part of the Go module. A full enumeration of all 127 SDK methods in
api.md against the CLI command tree, and of all 95 *Params structs
(345 fields, including nested unions) against every CLI flag, found no
coverage gaps.

Also fix the pagination footer hint in `kernel profiles list`, which
suggested `kernel profile list` (singular, not a real command).

Tested: go build ./..., go vet ./..., go test ./... (all pass);
smoke-tested `kernel browsers list`, `kernel profiles list`, and
`kernel profiles list --per-page 3` against the live API.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kernel-internal kernel-internal Bot changed the title CLI: Update SDK to b5ea2f3dee2cbb2af9001e4558a28a807d31aeb3 and add new commands/flags CLI: Update Go SDK to b94cd585bac0a149f65dab3212731ad312628ce6 Aug 4, 2026
Target SDK commit 9e39767e809b04f0786fb17377eb800fa624bddc contains no API
changes: it adds only .github/workflows/stlc-{promote,sync}.yml on top of
v0.86.0. `git diff v0.86.0..9e39767` touches zero .go files and no api.md.
The SHA is also not resolvable as a module version on its own -- it exists
only on the staging repo's main, so `go get 9e39767` fails with "unknown
revision". go.mod needs no change here: the preceding commit already moved it
to v0.86.1-0.20260804210355-b94cd585bac0, and b94cd58 is a direct child of
9e39767, so that pseudo-version already contains this target commit.

Coverage was re-enumerated from scratch anyway rather than trusting the
empty diff. All 127 methods in api.md map to an existing command; the seven
x-cli-skip endpoints in openapi.yaml (auth connections exchange, audit-log
export destinations) are absent from the SDK, so nothing to skip. Every
*Params field was diffed against every command's flags, including expanding
the embedded request structs (ManagedAuth*, CreateCredential*, CreateProject,
Update*Limits, CreateCredentialProvider*) and the ProxyNewParamsConfig union
variants, which the field-name comparison alone hides.

That surfaced one real gap, pre-existing rather than new in this bump:

- kernel audit-logs download: --format jsonl.gz|jsonl
  (AuditLogExportChunkParams.Format). The format was hardcoded to jsonl.gz,
  so uncompressed export was unreachable. The default output filename now
  derives its extension from the format instead of always ending .jsonl.gz.

Two other unmatched fields were checked and are correctly not flags:
- BrowserCurlParams.ResponseEncoding: `browsers curl` does not call the SDK
  Curl method at all. It streams raw bytes over the browser's HTTPClient,
  which is already binary-safe, making the JSON-transport encoding moot.
- AuditLogListParams.PageToken / AuditLogExportChunkParams.Cursor: internal
  pagination, driven by response headers.

Tested against the live API:
- audit-logs download --format jsonl (25-day window): 74 chunks, 3,669,435
  rows, wrote audit-logs-20260710-20260804.jsonl; `file` reports NDJSON and
  the lines parse as JSON.
- audit-logs download (default): wrote audit-logs-20260803-20260804.jsonl.gz;
  gunzip yields 109,526 lines, matching the reported row count.
- audit-logs download --format jsonl.gz --to explicit.jsonl.gz: byte-identical
  size to the default run.
- audit-logs download --format csv: rejected locally with
  "invalid --format value: csv".
- go build ./... and go test ./... pass, before and after rebasing onto the
  b94cd58 go.mod bump.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@kernel-internal kernel-internal Bot changed the title CLI: Update Go SDK to b94cd585bac0a149f65dab3212731ad312628ce6 CLI: Update SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and add new commands/flags Aug 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants