-
Couldn't load subscription status.
- Fork 19
feat(cli): manage plugin capability scopes via command args #301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @SequeI, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request introduces a new manage subcommand under the agentup plugin CLI, enabling users to add or remove capability scopes for specific plugins within the agentup.yml configuration file. This enhancement provides granular control over plugin permissions directly from the command line, supporting features like dry-runs and explicit configuration file targeting.
Highlights
- New
plugin manageCommand: A new CLI commandagentup plugin manageis introduced, allowing users to modify plugin capability scopes. - Scope Management Options: Users can add scopes using
-a/--add-scope <capability_id>::<scope>and remove scopes using-r/--remove-scope <capability_id>::<scope>. Both options are repeatable. - Mutual Exclusivity: The
--add-scopeand--remove-scopeoptions are mutually exclusive, preventing conflicting operations in a single command. This is enforced by a newMutuallyExclusiveOptionclass. - Dry-Run Functionality: A
--dry-run(-n) flag allows users to preview the planned changes toagentup.ymlwithout actually modifying the file. - Config File Targeting: The
--config <path>option enables specifying a custom path for theagentup.ymlfile, overriding the default location. - Enhanced User Feedback: The command provides clear messages for successful operations, existing scopes, missing scopes, invalid formats, and unknown plugins/capabilities.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a new plugin manage command to add and remove capability scopes, along with a reusable MutuallyExclusiveOption for click commands. The implementation is solid and includes a comprehensive set of tests.
My feedback focuses on improving user experience with clearer error messages and help texts, enhancing robustness by handling error conditions more gracefully (e.g., exiting with a non-zero status code on error), and increasing code clarity through some minor refactoring and simplification. These changes will make the new command more reliable and easier to maintain.
|
Need to solve some bugs here |
- Add `plugin manage` support to **add/remove** capability scopes with: - `-a/--add-scopes <capability_id>::<scope>` - `-r/--remove-scopes <capability_id>::<scope>` - Enforce mutual exclusivity between `-a` and `-r`. - `--dry-run` prints *only* planned changes (no file diffs, no writes). - `--config <path>` allows targeting a specific `agentup.yml`. - Clear UX messages for added/removed/duplicate/missing scopes & capabilities. Tests: - Add manage-only tests covering add/remove, dry-run, duplicates, invalid format, unknown plugin/capability, multi-adds, and missing config path, using a real minimal `agentup.yml` fixture. Signed-off-by: SequeI <[email protected]>
|
Solved, ready. Had a weird edgecase. |
plugin managesupport to add/remove capability scopes with:-a/--add-scopes <capability_id>::<scope>-r/--remove-scopes <capability_id>::<scope>-aand-r.--dry-runprints only planned changes (no file diffs, no writes).--config <path>allows targeting a specificagentup.yml.Tests:
agentup.ymlfixture.Our commands are a bit of a mess right now as we just add stuff, but wanted this functionality in atleast now so once we go ahead and clean everything up once we stabilise, main things are in.
🔍 Related Issues
Closes #262