feat: identity-only permission catalogs in rule and app output#91
Merged
Conversation
The API serves each app-permission tool by identity (id/name/description); the endpoint mapping behind a tool is resolved server-side from its toolId. Align the response structs: - AppTool drops the endpoint-mapping fields; apps permission-definition output is the tool identities plus read/write groups and wildcards - Rule marks hostPattern/pathPattern/method omitempty pointers: present on custom rules, omitted on app-permission rules, which are identified by metadata.provider + metadata.toolId - decode tests for a mixed rules list (masked app rule + custom rule) and the slim permission-definition shape No command, flag, or exit-code changes; create/update inputs are untouched. Co-Authored-By: Claude Fable 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.
What
Aligns the CLI's response structs with the API's identity-only permission catalogs:
AppToolis now{id, name, description}—apps permission-definitionprints the tool identities plus their read/write groups and wildcards (exactly whatrules permissions set --toolconsumes).Rule.hostPattern/pathPattern/methodbecomeomitemptypointers: present on custom rules, omitted on app-permission rules (identified bymetadata.provider+metadata.toolId, already in the output).No command, flag, or exit-code changes. Inputs (
rules create/update, secrets, blocklist) are untouched. Old CLI versions keep working against the new API (absent fields decode to zero values); this release just stops printing empty placeholders.Merge order
Server side ships first: onecli/onecli-cloud#626 (merge + deploy), then this PR any time after.
Gates:
go build,golangci-lint(0 issues),go test -race ./...— all green.🤖 Generated with Claude Code