Add org entitlements command - #232
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Want fixes drafted automatically? Bugbot Autofix can create code changes for findings. A team admin can enable Autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 60c8fd3. Configure here.
Expose the API-resolved entitlement snapshot through kernel org entitlements without duplicating plan policy in the CLI. Upgrade the Go SDK to v0.92.0 and preserve null-as-unlimited values in both human and JSON output.
Use the CLI's shared human-readable timestamp formatter for organization entitlement trial dates and cover the behavior with a focused regression test.
60c8fd3 to
c820e44
Compare
masnwilliams
left a comment
There was a problem hiding this comment.
requesting changes on two boundary/testability issues. the direct SDK-backed command and flattened table are otherwise the right shape; this does not need a larger architectural rewrite.
masnwilliams
left a comment
There was a problem hiding this comment.
both requested changes are addressed: nullable response states are distinguished correctly, and the full entitlement projection now has structured coverage with boolean provenance checks. local vet, test, build, and diff checks pass on 4961b76.
Bumps kernel-go-sdk to 796d4245c87a39acbb0d408b05f0de830c500772. That SDK release adds `interaction_id` to managed auth state and to the submit request. The API requires it for canonical submissions (field_values / selected_choice_id) and rejects it when paired with a legacy submit mode, so before this change every canonical `auth connections submit` failed with "interaction_id is required for canonical submissions". `auth connections submit` gains --interaction-id. Left off, the CLI reads the connection's current interaction ID, since the ID changes on every actionable pause and the freshly read one is the only sane default; passing it pins the submission so the API can reject it as stale. Legacy submit modes never send one, and --interaction-id with a legacy mode is rejected locally with the same rule the API enforces. `auth connections get` and `follow` now show the interaction ID next to the canonical fields and choices it scopes. Also resolves the stale merge of main into this branch, which had left two competing org entitlements implementations in cmd/org.go (the branch built `org entitlements get`; main shipped `org entitlements` in #232) so the package no longer compiled. Main's reviewed version wins. A full enumeration of api.md against the CLI found no other gaps: all 136 non-x-cli-skip SDK methods have commands, and the only new params field in this release is SubmitFieldsRequest.interaction_id. Tested against the live API: created a managed auth connection, started a login flow, and confirmed `get` (table + JSON) and `follow` render the interaction ID at AWAITING_INPUT; canonical submit with and without --interaction-id now clears the API's interaction validation (it stops at this org's submit-v2 feature gate, while the same request sent without interaction_id still returns "interaction_id is required"); legacy `--field` submit still accepted; `--interaction-id` with `--field` rejected locally; org entitlements, browsers create/get/delete pass. go build ./..., go vet ./... and go test ./... pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

Why
The organization entitlements API and Go SDK v0.92.0 are released. The CLI should expose the effective organization policy calculated by the API without maintaining a second plan-to-entitlement table.
What
kernel org entitlementscommand--output jsonusing the generated SDK model unchangedunlimitedin human output while preserving JSONnullkernel org limitsremains the command for reading and changing configurable organization concurrency limits.How
The command calls the generated
Organization.Entitlements.GetSDK operation directly. All entitlement resolution remains in the API; the CLI only projects the returned model.Verification
Before: kernel-go-sdk v0.91.0 and the CLI did not expose organization entitlements.
After:
make testpasses (go vet ./...andgo test ./...)make buildpassesKERNEL-1713
Note
Low Risk
Read-only CLI surface over a new SDK GET; no auth, persistence, or limit-mutation behavior changes.
Overview
Adds a read-only
kernel org entitlementscommand that surfaces the API’s effective organization policy (plan, trial, features, and limits) without duplicating entitlement logic in the CLI.The command calls
Organization.Entitlements.Getfrom kernel-go-sdk v0.92.0 (upgraded from v0.91.0). Human output is a table projection of the SDK model;--output jsonprints the generated model as-is. Nullable caps render asunlimited/none/unknownin the table while JSON keepsnullwhere applicable.README documents the new subcommand.
kernel org limitsis unchanged for reading and updating configurable concurrency settings.Reviewed by Cursor Bugbot for commit 4961b76. Bugbot is set up for automated code reviews on this repo. Configure here.