feat(access): manage registry package access - #1012
Conversation
📝 WalkthroughWalkthroughAdds the ChangesPackage access management
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant AccessCommand
participant RegistryClient
participant Registry
User->>AccessCommand: run aube access subcommand
AccessCommand->>AccessCommand: validate package, team, and settings
AccessCommand->>RegistryClient: invoke access operation
RegistryClient->>Registry: send authenticated request with optional OTP
Registry-->>RegistryClient: return JSON or HTTP status
RegistryClient-->>AccessCommand: return result or typed error
AccessCommand-->>User: print text, JSON, or error
Suggested labels: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Greptile SummaryAdds
Confidence Score: 5/5Safe to merge; the new command only performs authenticated registry reads and writes that already exist in equivalent npm/pnpm CLI flows, and all input is validated before hitting the wire. The implementation is well-structured with no crates/aube-codes/src/errors.rs — the exit code gap between ERR_AUBE_ACCESS_ENTITY_NOT_FOUND and ERR_AUBE_PACKAGE_NOT_FOUND is worth addressing before the codes become stable public API. Important Files Changed
Reviews (4): Last reviewed commit: "Merge branch 'main' into codex/access-co..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/aube-registry/src/client/access.rs`:
- Around line 210-214: Update access_list_packages and access_request so the
package-listing path passes a distinct entity label instead of None; use the
requested user, organization, or team name when constructing Error::NotFound,
while preserving the existing package-name behavior for package access requests.
In `@crates/aube/src/commands/access.rs`:
- Around line 267-281: Require the scope parsed by split_team to begin with
exactly the expected @ prefix; reject inputs where scope is empty or does not
start with @, while preserving the existing team and extra-colon validation and
error message.
In `@docs/cli/access/grant.md`:
- Line 4: The usage declaration for the access grant command currently uses a
generic `<ARGS>…` placeholder; update the command’s usage source to explicitly
show the required positional arguments in order: `<PERMISSIONS> <TEAM>
<PACKAGE>`, then regenerate the corresponding documentation page.
In `@docs/cli/access/ls.md`:
- Around line 4-12: Update the `AccessCommand::Ls` usage documentation to show
its bounded forms explicitly: replace the variadic `[ENTITIES]…` syntax with
examples for `aube access ls [ENTITY]` and the compatibility form `aube access
ls packages [ENTITY]`, and clarify that at most two values are accepted.
In `@docs/cli/commands.json`:
- Around line 85-129: Update the access grant command’s full_cmd/usage
documentation to explicitly show the required positional arguments: use “access
grant <PERMISSIONS> <TEAM> <PACKAGE>” instead of the generic “access grant
<ARGS>…”, while preserving the existing argument definitions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Central YAML (base), Organization UI (inherited)
Review profile: CHILL
Plan: Pro Plus
Run ID: 242abce6-d143-4853-a375-6e63a3ae7987
📒 Files selected for processing (20)
aube.usage.kdlcrates/aube-codes/src/errors.rscrates/aube-registry/src/client.rscrates/aube-registry/src/client/access.rscrates/aube/src/commands/access.rscrates/aube/src/commands/mod.rscrates/aube/src/lib.rsdocs/cli/access.mddocs/cli/access/get.mddocs/cli/access/get/status.mddocs/cli/access/grant.mddocs/cli/access/list.mddocs/cli/access/list/collaborators.mddocs/cli/access/list/packages.mddocs/cli/access/ls.mddocs/cli/access/revoke.mddocs/cli/access/set.mddocs/cli/commands.jsondocs/cli/index.mddocs/error-codes.data.json
|
Addressed the access command feedback in 54e65ba: scoped organization/team lists now use scope registry/auth settings, list 404s name the requested entity, team validation is strict, and the CLI help spells out the exact The checked-in CLI reference is generated by This comment was generated by Codex. |
|
The MFA mapping is intentional pnpm v11.11.0 parity: its This comment was generated by Codex. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit b4ce1b2. Configure here.

Summary
aube accessregistry operations for package lists, collaborators, visibility, MFA, and team grants/revocationsaccess ls packages [entity]formTests
cargo fmt --checkcargo clippy --all-targets -- -D warningscargo testmise run renderThis pull request was generated by Codex.
Note
Medium Risk
Registry write operations change package visibility and team permissions using authenticated tokens; mistakes or bugs could affect live registry state, though behavior follows established npm access APIs and includes validation.
Overview
Adds
aube access, an npm-style CLI for registry visibility, collaborators, and team permissions.The registry client gains a new
accessmodule with HTTP calls to npm access endpoints (list packages for user/org/team, collaborators, get/set visibility and publish MFA, grant/revoke team access). Requests use scoped-registry auth, optionalnpm-otp, capped response bodies, and distinctAccessEntityNotFoundvs package 404 errors.The command layer wires subcommands (
get status,list packages/collaborators,lswith pnpmpackages [ENTITY]compatibility,setforstatus=/mfa=,grant,revoke), argument validation, human or--jsonoutput, and shared network flags. New diagnosticsERR_AUBE_ACCESS_ENTITY_NOT_FOUNDandERR_AUBE_ACCESS_INVALID_ARGUMENTare registered alongside generated usage/docs and error-code data.Reviewed by Cursor Bugbot for commit 8313bd5. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
New Features
aube accessfor managing package visibility, MFA requirements, and team permissions.Documentation