Repository navigation
feat(list): report the access One enforces for this key (v2.5.0) - #207
Merged
Merged
Conversation
…/access/me (v2.5.0) `one list` used to compute each connection's `access` from the local config only, which says full access unless `one config` narrowed it — so a key the consent page limited to Read only, Read & write or a few actions was still reported as full. It now asks One: - GET /v1/access/me (pica-v2 #958) answers the key's own rules: null (unrestricted), rules: null (+ key-wide methods), rules: [] (no connection: knowledge only), or one rule per connection (methods, actionIds). Read exactly as the server's checker reads them. - The CLI's own `one config` limits still apply, and can only narrow. - Each connection's access gets a `level` named like the consent page: full, read-write, read-only, custom, none (human table: Full access, Read & write, Read only, the actions, No access). - `accessSource: "server" | "local"`. When the API can't answer (today's production, before #958 ships), the CLI says so — column "Access (CLI settings only)" and an accessHint — instead of claiming full access. Verified end to end on a local pica-v2 built from main: keys minted and narrowed with the same calls the CLI consent page makes (personal and organization), every rule shape, and refusals (403) on writes outside the grant match what `one list` shows. Tests: 20 new (rule shapes, local narrowing, client call). Full suite 661: 655 pass; the 6 failures are the pre-existing resolveConfig macOS tmpdir cases, identical on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
paulkr
approved these changes
Oct 6, 2026
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.
feat(list): report the access One enforces for this key, from GET /v1/access/me (v2.5.0)
one listused to compute each connection'saccessfrom the localconfig only, which says full access unless
one confignarrowed it —so a key the consent page limited to Read only, Read & write or a few
actions was still reported as full. It now asks One:
(unrestricted), rules: null (+ key-wide methods), rules: [] (no
connection: knowledge only), or one rule per connection (methods,
actionIds). Read exactly as the server's checker reads them.
one configlimits still apply, and can only narrow.levelnamed like the consent page:full, read-write, read-only, custom, none (human table: Full access,
Read & write, Read only, the actions, No access).
accessSource: "server" | "local". When the API can't answer (today'sproduction, before #958 ships), the CLI says so — column "Access (CLI
settings only)" and an accessHint — instead of claiming full access.
Verified end to end on a local pica-v2 built from main: keys minted and
narrowed with the same calls the CLI consent page makes (personal and
organization), every rule shape, and refusals (403) on writes outside
the grant match what
one listshows.Tests: 20 new (rule shapes, local narrowing, client call). Full suite
661: 655 pass; the 6 failures are the pre-existing resolveConfig macOS
tmpdir cases, identical on main.
Depends on withoneai/pica-v2#958 being deployed; until then the CLI falls back and says so.
🤖 Generated with Claude Code