-
Notifications
You must be signed in to change notification settings - Fork 2
CLI: Update SDK to cee2050 and add credential-providers commands (#82) #88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CLI: Update SDK to cee2050 and add credential-providers commands (#82) #88
Conversation
This PR updates the Go SDK to cee2050be3f8136505d41c20c2903dfca2cbc479 and adds CLI commands for new SDK methods. ## SDK Update - Updated kernel-go-sdk to cee2050be3f8136505d41c20c2903dfca2cbc479 ## Coverage Analysis This PR was generated by performing a full enumeration of SDK methods and CLI commands. ## New Commands - `kernel credential-providers list` - List configured external credential providers - `kernel credential-providers get <id>` - Get a credential provider by ID - `kernel credential-providers create` - Create a new credential provider (supports 1Password) - `kernel credential-providers update <id>` - Update a credential provider's configuration - `kernel credential-providers delete <id>` - Delete a credential provider - `kernel credential-providers test <id>` - Test a credential provider connection ## Breaking Changes Fixed - Fixed `browsers.Get()` calls to pass new required `BrowserGetParams` parameter Triggered by: kernel/kernel-go-sdk@cee2050 Reviewer: @masnwilliams <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduces new CLI surfaces and updates for latest SDK. > > - **Agent Auth CLI**: `kernel agents auth` with `create/get/list/delete`, `invocations {create/get/exchange/submit}`, and end‑to‑end `run` flow (auto field submission, TOTP, optional live view); docs and examples added to `README.md`. > - **Credential Providers CLI**: `kernel credential-providers {list/get/create/update/delete/test}` (supports 1Password), wired into root. > - **Browsers API updates**: adapt to SDK breaking change (`browsers.Get` now requires `BrowserGetParams`); add `process resize` and filesystem watch (`fs watch start/stop/events`) commands; tests updated accordingly. > - **Dependencies**: bump `kernel-go-sdk` to cee2050… and add `pquerna/otp`; regenerate `go.sum`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0b27df6. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY --> --------- Co-authored-by: Cursor Agent <cursor-agent@kernel.sh> Co-authored-by: Cursor Agent <cursor-agent@onkernel.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com>
f6be454
into
danny/kernel-742-create-yutori-n1-computer-use-cli-templates-typescript
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| if in.SaveCredentialAs != "" && credentialName == "" { | ||
| // Save credential during invocation if we have values but didn't create upfront | ||
| invocationParams.AuthAgentInvocationCreateRequest.SaveCredentialAs = kernel.Opt(in.SaveCredentialAs) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dead code due to impossible condition
Low Severity
The condition in.SaveCredentialAs != "" && credentialName == "" at line 689 can never evaluate to true. When in.SaveCredentialAs is non-empty, the code always sets credentialName to a non-empty value either from in.CredentialName (line 610) or from in.SaveCredentialAs itself (line 617). This makes lines 689-692 unreachable dead code that will never execute.
| pterm.Info.Println("No vaults accessible") | ||
| } | ||
|
|
||
| return nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test command returns success when connection test fails
Medium Severity
The Test function returns nil (exit code 0) even when result.Success is false and the connection test has failed. When the test fails, line 267 prints an error message via pterm.Error.Printf, but the function still returns nil at line 281. This causes the CLI command to exit with success status even on test failure, which breaks automation and scripting scenarios where users check exit codes.
| _, err = c.invocations.Submit(ctx, invocation.InvocationID, submitParams) | ||
| if err != nil { | ||
| return util.CleanedUpSdkError{Err: err} | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing tracking for MFA TOTP submissions causes duplicates
Medium Severity
The MFA TOTP code submission path (lines 893-912) lacks tracking to prevent duplicate submissions. While field submissions are tracked via fieldsSubmitted map (line 704) with checks at lines 786-789, the MFA TOTP submission has no equivalent tracking. If the backend doesn't immediately clear resp.MfaOptions after accepting the TOTP code, the next poll iteration (2 seconds later) will generate and submit another TOTP code, potentially causing auth failures or rejected codes due to replay protection.
This PR updates the Go SDK to cee2050be3f8136505d41c20c2903dfca2cbc479 and adds CLI commands for new SDK methods.
SDK Update
Coverage Analysis
This PR was generated by performing a full enumeration of SDK methods and CLI commands.
New Commands
kernel credential-providers list- List configured external credential providerskernel credential-providers get <id>- Get a credential provider by IDkernel credential-providers create- Create a new credential provider (supports 1Password)kernel credential-providers update <id>- Update a credential provider's configurationkernel credential-providers delete <id>- Delete a credential providerkernel credential-providers test <id>- Test a credential provider connectionBreaking Changes Fixed
browsers.Get()calls to pass new requiredBrowserGetParamsparameterTriggered by:
kernel/kernel-go-sdk@cee2050 Reviewer: @masnwilliams
Note
Introduces automated web auth and external credential provider management to the CLI, updates to latest Kernel SDK, and adapts browser commands to new SDK APIs.
kernel agents authcommands includingrun(end‑to‑end auth flow with auto field submission, TOTP, MFA, live view), pluscreate/get/list/deleteand invocationcreate/get/exchange/submit; documented in README with exampleskernel credential-providerslist/get/create/update/delete/test(supportsonepassword), wired into rootkernel-go-sdktocee2050(v0.27.1-pre); fixes breaking change by passingkernel.BrowserGetParamsto allbrowsers.Getcalls and testsbrowsers process resize(PTY resize) and filesystem watch (fs watch start/stop/events), updates service interfaces and command wiringpquerna/otpand related indirect depsWritten by Cursor Bugbot for commit ca377b6. This will update automatically on new commits. Configure here.