Skip to content

Conversation

dungdong-aws
Copy link
Contributor

Problem

Auto-approve feature got reverted. We need to enable it back along with P2 changes

Solution

Add back auto-approve

Fixed P0/P1:

  • Permission not retain
  • Warning icon + tooltip when auto-approve is on
  • Add telemetry for built-in tools

Added P2:

  • In-context permission update for Mcp tool & executeBash

Screenshots

Screenshot 2025-08-01 at 12 16 38 PM Screenshot 2025-08-01 at 12 16 19 PM

Note: Text will be change in the future

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@dungdong-aws dungdong-aws requested a review from a team as a code owner August 5, 2025 19:44
Copy link
Contributor

@bywang56 bywang56 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

High level, can we create seperate PRs for adding auto-approve back and in-context permission update? I feel like auto-approve will not likely needed even in the future, but in-context perm change will be. this way we can easily pick up and merge later.

@@ -27,7 +27,7 @@
"@aws/chat-client-ui-types": "^0.1.56",
"@aws/language-server-runtimes": "^0.2.121",
"@aws/language-server-runtimes-types": "^0.1.50",
"@aws/mynah-ui": "^4.36.2"
"@aws/mynah-ui": "../../mynah-ui"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some mynah changes that not yet released?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, it just got merged this morning. Im still waiting for the release today

@@ -448,7 +448,7 @@ export class McpManager {
*/
public isToolDisabled(server: string, tool: string): boolean {
// built-in tools cannot be disabled
if (server === 'builtIn') {
if (server === 'Built-in') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we changing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if I change everything to builtIn --> the serverName shown on the MCP page will be builtIn instead of Built-in

try {
await McpManager.instance.updateServerPermission(serverName, perm)
// if the new permission is asks --> only update permission, dont continue
if (new_permission === 'ask') {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we missing the handle of deny here? what happen if customer change to deny, updateServerPermission will remove this tool from agent context.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah correct, this was previously for built-in tools, that why I did not handle it. I did separate mcp tools in-context, I can raise a PR for that separately. I have this on that branch

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, I also have this feature branch that is having in-context for MCP: https://github.com/aws/language-servers/tree/feat/in-context-permission-mcp. Im waiting for mynah-ui release to raise a PR

@dungdong-aws dungdong-aws changed the title feat(amazonq): add auto-approve back and in-context permission update for built-in tools feat(amazonq): add in-context permission update for built-in tools Aug 11, 2025
@dungdong-aws dungdong-aws reopened this Aug 11, 2025
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.

2 participants