You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 492c59f
Browse filesBrowse the repository at this point in the historyBrowse files
CLI: Update SDK to f737b63ffd168cc67bf0158b961ca3275c94bd1c and add new commands/flags (#291)
This PR updates the Go SDK to f737b63ffd168cc67bf0158b961ca3275c94bd1c
and adds CLI commands/flags for new SDK methods.
## SDK Update
- Updated kernel-go-sdk to f737b63ffd168cc67bf0158b961ca3275c94bd1c
(v0.122.1-0.20261009181557-f737b63ffd16)
- The latest SDK commit (f737b63) only changes documentation for the
1Password fill result: `fill_unknown` can now carry `error_code:
autosubmitFailed`, and after an uncertain fill the caller should inspect
the page. The CLI already prints `error_code` for every `1pw_fill`
status, and its help text already gives this guidance, so no code
changes were needed for it.
- An earlier commit on this branch updated the SDK to
6f3ae15351013fd71e5d554b69d7e532e1e592db, which adds `video_memory` for
the 4GiB VRAM GPU browser tier.
## Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods
and CLI commands. After this PR, every method in api.md has a CLI
command. The only exception is `ConfigRegistry.*`, which is skipped
because those endpoints are marked `x-cli-skip`.
## New Commands
- `kernel vaults get-encryption-key <vault>` for
`client.Vaults.GetEncryptionKey()`. It shows a table by default, and `-o
json` returns the raw key response.
## New Flags
- `--video-memory` on `kernel browsers create` for
`BrowserNewParams.VideoMemory`. It accepts `2GiB` (the default: 4 vCPU,
6GiB memory) or `4GiB` (8 vCPU, 12GiB memory), matched
case-insensitively and checked before the request is sent. It requires
`--gpu`. `browsers get` and `create` now show a "Video Memory" row when
the API returns one.
- The new `encrypted_value` field
(`CredentialVaultFieldInputParam.EncryptedValue`,
`CredentialVaultFieldUpdateParam.EncryptedValue`) goes through the
existing `--spec-file` JSON on `vaults credentials create/update`. The
help text and README now describe it.
## Testing
- f737b63 bump: `go build ./...`, `go vet ./...` and `go test ./...` all
pass.
- `browsers create --gpu --video-memory 2GiB -t 30`: the session was
created, and `browsers get` showed `GPU true`, `Memory 6GiB`, `Video
Memory 2GiB`. The test browser was deleted afterwards.
- `browsers create --gpu --video-memory 4GiB`: the API received the 4GiB
tier but returned `No_gpu_browsers_available` (at capacity), so no 4GiB
session was created.
- `--video-memory 3GiB` is rejected on the client with a clear error. A
new unit test, `TestBrowsersCreate_WithVideoMemory`, covers this.
- `vaults get-encryption-key`: table output, `-o json` output, and the
not-found error all checked.
- Created a credential with a real ECDH-ES/A256GCM JWE
`encrypted_value`. The item became ready, and the update bumped the
version from 1 to 2.
Triggered by:
kernel/kernel-go-sdk@f737b63
Reviewer: @kernel-internal[bot]
🤖 Generated with [Claude Code](https://claude.com/claude-code)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Mostly new CLI flags/commands and docs atop the SDK; credential
encryption still flows through existing spec-file JSON without new local
crypto logic.
>
> **Overview**
> Updates **kernel-go-sdk** and exposes two new API surfaces in the CLI.
>
> Adds **`kernel vaults get-encryption-key`** so custom
credential-collection apps can fetch a vault’s public JWK (`kid`,
ECDH-ES / A256GCM) for browser-side JWE encryption, with table or `-o
json` output. README and **`vaults credentials`** help now document
**`encrypted_value`** as an alternative to **`value`** on create/update
specs (mutually exclusive).
>
> Adds **`--video-memory`** on **`kernel browsers create`** (`2GiB` /
`4GiB`, case-insensitive client validation; omitted leaves the API
default). Create passes it through to **`BrowserNewParams`**, and
**`browsers get`/create detail** show **Video Memory** when present.
**`TestBrowsersCreate_WithVideoMemory`** covers mapping, omission, and
invalid sizes.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
456553a. 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.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -410,6 +410,7 @@ cannot switch projects.
410
410
|`kernel vaults create --name <name>`| Create or retrieve the vault with that immutable name |
411
411
|`kernel vaults list`|`--limit 1..100` (default 20), `--offset`, `--query` (name substring or exact ID); JSON includes `vaults` and optional `next_offset`|
412
412
|`kernel vaults get <vault>`| Get by ID or name |
413
+
|`kernel vaults get-encryption-key <vault>`| Get the public key custom collection apps use to send `encrypted_value`|
413
414
|`kernel vaults delete <vault>`| Invalidate the vault and all its items; `--yes` skips confirmation |
414
415
|`kernel vaults wallets create <vault> <key> --provider link\|agentcard --spec '<json>'`| Connect/enroll a wallet using its provider's spec; `--open` opens a returned HTTPS action URL |
415
416
|`kernel vaults wallets payment-methods <vault> <key>`| Fetch advertised live payment methods; JSON is the item with `expanded.payment_methods`|
items:=&cobra.Command{Use: "items", Short: "Inspect readiness and collection URLs, or invoke collect/fill/webmcp_invoke", Long: "Use get --wait 60 to observe readiness and get -o json for schema/version/presence.\nUse invoke collect to obtain a collection URL, or invoke fill --spec-file to fill a browser.\nUse webmcp invoke to call a live WebMCP tool with item fields bound to null input slots.\n1Password credentials use the advertised 1pw_* operations instead of collect/fill/webmcp_invoke.\nCreate and edit credentials with vaults credentials; payment items use wallets/cards."}
138
154
itemList:=&cobra.Command{Use: "list <vault>", Short: "List items by vault ID or name", Args: cobra.ExactArgs(1), PreRunE: vaultPreRun,
cmd.Long+="\nUpdate applies to Kernel-hosted credentials only. Update spec fields are an object keyed by field name, not the ordered array used on create.\nUpdate preserves omitted fields, replaces nonempty string values, and clears supported values with null or an empty string. Clearing a required text/email/password field returns pending_collection; form submissions still require a nonempty value.\nField definitions are immutable. Do not automatically retry version conflicts."
160
+
cmd.Long+="\nUpdate applies to Kernel-hosted credentials only. Update spec fields are an object keyed by field name, not the ordered array used on create.\nUpdate preserves omitted fields, replaces nonempty string values (value, or encrypted_value from a browser-encrypting collection app), and clears supported values with null or an empty string. Clearing a required text/email/password field returns pending_collection; form submissions still require a nonempty value.\nField definitions are immutable. Do not automatically retry version conflicts."
159
161
cmd.Flags().Int64("version", 0, "Expected version from items get (required; never auto-refreshed)")
160
162
_=cmd.MarkFlagRequired("version")
161
163
cmd.Flags().String("expected-item-id", "", "Immutable item ID from the original read; reject an update if the key now refers to a replacement item")
0 commit comments