fix(amp): remove unsupported --permission-mode CLI flags#2625
Closed
tamish560 wants to merge 3 commits into
Closed
fix(amp): remove unsupported --permission-mode CLI flags#2625tamish560 wants to merge 3 commits into
tamish560 wants to merge 3 commits into
Conversation
Author
|
Closing this as #2573 by @VenkataSakethDakuri was already merged on July 10. Should have checked existing PRs before opening this one. |
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.
What
Removes
appendPermissionFlagsfrom the Amp adapter. Amp does not support--permission-modeCLI flags - its permission model is configured through settings/plugins (amp.permissions,amp.guardedFiles.allowlist,amp.dangerouslyAllowAll), not CLI arguments.Why
When AO launches Amp with a non-default permission mode, it builds commands like
amp --permission-mode acceptEditswhich can fail on startup or exit before opening the TUI. Projects that configure worker permissions globally make Amp workers fail to start even though plainampworks fine.Closes #2561
Changes
appendPermissionFlagsfunction fromamp.goappendPermissionFlagsinGetLaunchCommandappendPermissionFlagsinGetRestoreCommandGetLaunchCommandto reflectamp(no flags){"amp"}with no--permission-modeflags{"amp", "--resume", "T-abc123"}without permission flagsTesting
All existing tests pass with the updated expectations. The test table in
TestGetLaunchCommandMapsPermissionModesnow verifies that every permission mode (default, acceptEdits, auto, bypass) omits--permission-modefrom the command.