CLI: Update SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and add new commands/flags - #215
Open
kernel-internal[bot] wants to merge 3 commits into
Open
CLI: Update SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and add new commands/flags#215kernel-internal[bot] wants to merge 3 commits into
kernel-internal[bot] wants to merge 3 commits into
Conversation
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>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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>
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>
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.
This PR updates the Go SDK to 9e39767e809b04f0786fb17377eb800fa624bddc and adds CLI commands/flags for new SDK methods.
SDK Update
v0.86.1-0.20260804210355-b94cd585bac0.The target commit
9e39767is not resolvable as a module version on its own — it exists only on the staging repo'smain, sogo get @9e39767fails withunknown revision. Commitb94cd58is a direct child of9e39767and is published, so this pseudo-version already contains the target commit.9e39767also contains no API changes: relative tov0.86.0it adds only.github/workflows/stlc-{promote,sync}.yml, touching zero.gofiles and noapi.md. The suppliedsdk-diff.patchwas empty, consistent with this.Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands.
api.mdmap to an existing CLI command — no missing commands.x-cli-skip: trueendpoints inopenapi.yaml(auth connectionsexchange, audit-log exportdestinations) are absent from the SDK, so there was nothing to skip.*Paramsfield 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 theProxyNewParamsConfigunion 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
--formatforAuditLogExportChunkParams.Formatonkernel audit-logs download, acceptingjsonl.gz(default) orjsonl. The format was previously hardcoded tojsonl.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.ResponseEncoding—kernel browsers curldoes not call the SDKCurlmethod at all; it streams raw bytes over the browser'sHTTPClient, 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:
audit-logs download --format jsonl(25-day window)audit-logs-20260710-20260804.jsonl;filereports NDJSON, lines parse as JSONaudit-logs download(default)audit-logs-20260803-20260804.jsonl.gz;gunzipyields 109,526 lines, matching the reported row countaudit-logs download --format jsonl.gz --to explicit.jsonl.gzaudit-logs download --format csvinvalid --format value: csvgo build ./...,go vet, andgo test ./...all pass, before and after rebasing onto theb94cd58go.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-b94cd585bac0and 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 listadds--name,--query,--status(with--include-deletedkept 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.gzdefault orjsonl), with default output filenames following the chosen format. Browser pool acquire andbrowsers createwith a pool accept--start-urlvia sharedbuildAcquireParams.browsers telemetry eventsadds--order(asc/desc) and rejects--order descwith--since.Auth connection output shows
replace-existingon managed-auth fields.projects listadds paging (--page,--per-page) plus name/query filters and a Next: hint.profiles listadds--nameand fixes the pagination hint tokernel profiles list(tests updated).Reviewed by Cursor Bugbot for commit 2585945. Bugbot is set up for automated code reviews on this repo. Configure here.