Skip to content

Conversation

@SequeI
Copy link
Contributor

@SequeI SequeI commented Aug 25, 2025

  • 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.

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

image

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 manage Command: A new CLI command agentup plugin manage is 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-scope and --remove-scope options are mutually exclusive, preventing conflicting operations in a single command. This is enforced by a new MutuallyExclusiveOption class.
  • Dry-Run Functionality: A --dry-run (-n) flag allows users to preview the planned changes to agentup.yml without actually modifying the file.
  • Config File Targeting: The --config <path> option enables specifying a custom path for the agentup.yml file, 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

  1. 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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.

@SequeI SequeI marked this pull request as draft August 25, 2025 16:47
@SequeI
Copy link
Contributor Author

SequeI commented Aug 25, 2025

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]>
@SequeI SequeI marked this pull request as ready for review August 25, 2025 17:42
@SequeI
Copy link
Contributor Author

SequeI commented Aug 25, 2025

Solved, ready. Had a weird edgecase.

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.

[Feature]: allow users to add scopes to agentup.yml with plugin command

1 participant