Skip to content

feat: identity-only permission catalogs in rule and app output#91

Merged
guyb1 merged 1 commit into
mainfrom
feat/identity-only-permission-catalog
Jul 5, 2026
Merged

feat: identity-only permission catalogs in rule and app output#91
guyb1 merged 1 commit into
mainfrom
feat/identity-only-permission-catalog

Conversation

@guyb1

@guyb1 guyb1 commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

What

Aligns the CLI's response structs with the API's identity-only permission catalogs:

  • AppTool is now {id, name, description}apps permission-definition prints the tool identities plus their read/write groups and wildcards (exactly what rules permissions set --tool consumes).
  • Rule.hostPattern/pathPattern/method become omitempty pointers: present on custom rules, omitted on app-permission rules (identified by metadata.provider + metadata.toolId, already in the output).
  • Decode tests: mixed rules list (masked app rule + custom rule, re-marshal stays clean) and the slim catalog shape.

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

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>
@guyb1
guyb1 merged commit 00613a4 into main Jul 5, 2026
2 checks passed
@guyb1
guyb1 deleted the feat/identity-only-permission-catalog branch July 5, 2026 00:47
@guyb1 guyb1 mentioned this pull request Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant