CLI: Update SDK to v0.85.0 and add proxy CA bundle flags - #210
Open
kernel-internal[bot] wants to merge 2 commits into
Open
CLI: Update SDK to v0.85.0 and add proxy CA bundle flags#210kernel-internal[bot] wants to merge 2 commits into
kernel-internal[bot] wants to merge 2 commits into
Conversation
… timeline
Updates github.com/kernel/kernel-go-sdk to 65f3b913775353974858c92a6164ae25232ecc81
(v0.84.0).
A full enumeration of api.md methods against the CLI service interfaces found no
missing commands: all 128 SDK methods are covered (the one x-cli-skip endpoint,
POST /auth/connections/{id}/exchange, is correctly absent). The only API surface
change in this SDK bump is a new response field, ManagedAuthTimelineEvent.
TelemetryCaptured, so no new flags were needed.
Surfaces that field as a "Telemetry" column in `kernel auth connections timeline`,
so users can tell which timeline events have browser telemetry available via
`kernel browsers telemetry events`. The column shows "-" when the event has no
browser session or when the API does not report the field, and yes/no otherwise.
JSON output already passes the field through verbatim.
Tested against the live API:
- kernel auth connections timeline <id> --per-page 5 (three connections)
- kernel auth connections timeline <id> --per-page 2 --output json
- kernel auth connections list, kernel browsers list, kernel profiles list
- go build ./... and go test ./... pass
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Updates github.com/kernel/kernel-go-sdk to
e6dff4a41334b0008f7d0469bf83477905cdc589 (v0.85.0).
Full enumeration of all 127 SDK methods in api.md against the CLI command
tree found no missing commands. The only coverage gap was a new param field
on ProxyNewParamsConfigCustom.
New flags on `kernel proxies create`:
- --ca-bundle: inline PEM-encoded CA certificate bundle
- --ca-bundle-file: read the bundle from a file ('-' for stdin)
The two are mutually exclusive; the bundle is rejected early if it is not
PEM-encoded, and warned about (ignored) for non-custom proxy types.
Surfaces the new has_ca_bundle response field:
- `proxies get` / `proxies check`: "Has CA Bundle" row
- `proxies list`: "CA bundle" marker in the Config column
- `proxies create`: confirms the write-only bundle was stored
Tested:
- Real API: `proxies create --type custom --ca-bundle-file` reaches
server-side ca_bundle validation ("ca_bundle must be 65536 bytes or less,
got 80569" for an oversized bundle; a valid bundle passes that check and
only fails the live proxy connection test, as no reachable MITM proxy is
available from CI). No resources leaked.
- Local mock API: verified the wire body carries the full PEM as `ca_bundle`
for inline, file, and stdin inputs, and that has_ca_bundle renders in
create/get/list/check output.
- Flag errors: mutual exclusion, non-PEM input, missing file, non-custom
warning.
- go build ./..., go vet ./..., go test ./... all pass (6 new unit tests).
Triggered by: kernel/kernel-go-sdk@e6dff4a
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 7ec80fc. Configure here.
|
|
||
| if proxyType != kernel.ProxyNewParamsTypeCustom && (in.CaBundle != "" || in.CaBundleFile != "") { | ||
| pterm.Warning.Println("--ca-bundle is only supported for custom proxies and will be ignored") | ||
| } |
There was a problem hiding this comment.
Wrong flag named in CA warning
Low Severity
The ignored-flag warning always names --ca-bundle, even when only --ca-bundle-file was provided. The condition checks both inputs, so users who pass the file flag get a warning that refers to a different flag.
Reviewed by Cursor Bugbot for commit 7ec80fc. Configure here.
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 e6dff4a41334b0008f7d0469bf83477905cdc589 (v0.85.0) and adds CLI flags for the new SDK param field.
SDK Update
Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands.
api.mdwere enumerated and matched against the full CLI command tree. No missing commands.api.mdis unchanged between v0.84.0 and v0.85.0, so v0.85.0 adds no new endpoints.x-cli-skip: trueinopenapi.yaml(POST /auth/connections/{id}/exchange) is alsox-stainless-skip, so it is absent from the SDK.ProxyNewParamsConfigCustom.CaBundle(from "Add encrypted per-proxy CA bundle for BYO MITM proxies"), plus itshas_ca_bundleresponse counterpart.New Flags
--ca-bundleforProxyNewParamsConfigCustom.CaBundleonkernel proxies create— inline PEM-encoded CA certificate bundle--ca-bundle-fileonkernel proxies create— read the bundle from a file (-for stdin)The two flags are mutually exclusive. Input is rejected early if it is not PEM-encoded, and a warning is printed (value ignored) when passed with a non-
customproxy type, matching the existing--zip/--asnhandling for mobile proxies.Response Surface
has_ca_bundleis write-only on the API side, so the CLI now reports it everywhere the custom proxy config is rendered:kernel proxies get/kernel proxies check—Has CA Bundlerowkernel proxies list—CA bundlemarker in theConfigcolumnkernel proxies create— confirms the bundle was storedTests
kernel proxies create --type custom --ca-bundle-file ...reaches server-sideca_bundlevalidation. An oversized bundle returnsca_bundle must be 65536 bytes or less, got 80569(exactly the byte count the CLI sent), confirming the field is transmitted and read. A valid-size bundle passes that check and then fails only the live proxy connection test, since no reachable MITM proxy is available from CI. No resources were leaked.config.ca_bundlefor inline, file, and stdin inputs, and thathas_ca_bundlerenders correctly increate/get/list/checkoutput.cmd/proxies/create_test.go;go build ./...,go vet ./..., andgo test ./...all pass.Triggered by: kernel/kernel-go-sdk@e6dff4a
Reviewer: @stainless-app[bot]
🤖 Generated with Claude Code
Note
Low Risk
CLI-only changes (new optional flags and table columns) with validation and tests; no auth or payment logic changes.
Overview
Bumps kernel-go-sdk to v0.85.0 and wires two API surfaces into the CLI.
Auth connections:
kernel auth connections timelineadds a Telemetry column fromtelemetry_capturedwhen the event has a browser session and the API reports the field (yes/no); otherwise-. Unit tests decode JSON so “field present” is distinguished from absent.Proxies: Custom proxies can supply a PEM CA bundle for TLS-terminating (MITM) setups via
--ca-bundleor--ca-bundle-file(mutually exclusive;-reads stdin). Inline/file content is trimmed and validated for PEM before send; non-custom types get a warning if those flags are set. Has CA Bundle is shown on create (write-only confirmation), get, check, and list config summaries. README and command help include a MITM example.Reviewed by Cursor Bugbot for commit 7ec80fc. Bugbot is set up for automated code reviews on this repo. Configure here.