feat(rovodev): add permissions adapter (~/.rovodev/config.yml toolPermissions) - #1901
Merged
Merged
Conversation
…missions) Closes #1885 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…l permissions edit and write map onto the same Rovo Dev mutation tools; resolve the overlap deterministically in favour of edit and log a warning. Document that YAML comments/formatting in config.yml are not preserved on rewrite. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
@dyoshikawa Thank you! |
Merged
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.
Summary
Adds a
rovodevpermissions adapter that writes thetoolPermissionssection into the global~/.rovodev/config.yml.rovodevwas already a registered target for rules/mcp/skills/subagents but had no permissions adapter.The adapter is global-only (mirroring the existing
rovodev-mcpadapter) and merges intoconfig.yml, preserving every other top-level key (agent,sessions,mcp, etc.). The file is never deleted because it holds all of the user's Rovo Dev settings.Closes #1885
Evidence (upstream docs)
config.ymltop-level keys: https://support.atlassian.com/rovo/docs/manage-rovo-dev-cli-settings/toolPermissionsschema (allow/ask/denylevels, per-tool keys,bash.default+bash.commands[],allowedExternalPaths): https://support.atlassian.com/rovo/docs/use-tools-in-rovo-dev-cli/Rovo Dev's three permission levels (
allow/ask/deny) are an exact 1:1 with rulesync's canonical action enum (src/types/permissions.ts), so action values pass through verbatim.Canonical → Rovo Dev mapping decisions
bash: catch-all*pattern →bash.default; every other pattern → abash.commands[]entry{ command: <pattern as regex>, permission }. Rovo Dev matches commands as regexes, sobashpatterns are emitted verbatim.read→ the inspection toolsopen_files,expand_code_chunks,expand_folder,grep.edit/write→ the mutation toolsfind_and_replace_code,create_file,delete_file,move_file.*of each category sets the level. Non-catch-allallowpaths in those categories are surfaced asallowedExternalPathsso explicit grants are not dropped; non-allownon-catch-all rules cannot be expressed per-path and are skipped with alogger.warn.webfetch) are skipped with alogger.warnrather than invented.bash.default/bash.commands→bash; per-tool keys →read/edit;allowedExternalPaths→readallow rules.Files changed
src/constants/rovodev-paths.ts— addROVODEV_CONFIG_FILE_NAME = "config.yml".src/features/permissions/rovodev-permissions.ts— newRovodevPermissionsadapter (global-only YAML, merge-preserving, never deletable).src/features/permissions/permissions-processor.ts— registerrovodev(supportsProject: false,supportsGlobal: true,supportsImport: true).src/features/permissions/rovodev-permissions.test.ts— new unit tests (map/merge/round-trip, YAML-merge-preserves-other-keys, non-global throw).src/features/permissions/permissions-processor.test.ts— addrovodevto the global-targets assertion.src/e2e/e2e-permissions.spec.ts— new--globalgenerate test assertingtoolPermissionsis written into~/.rovodev/config.ymland unrelated keys are preserved.README.md,docs/reference/supported-tools.md,docs/reference/file-formats.md— setpermissionsfor Rovodev (global-only🌏) and document the mapping;skills/rulesync/*auto-synced viascripts/sync-skill-docs.ts.Notes / deferred
rules-processor.tsadditionalConventionchange is needed — permissions are wired through the permissions-processor factory map, notadditionalConvention.pnpm dev gitignoreproduced only unrelated drift (aGEMINI.mdreorder); reverted.~/.rovodev/config.ymlis a global path and does not appear in the project.gitignore.runImporthelper does not pass--global, and global-only permissions tools (Warp, Antigravity CLI) follow the same convention of unit-level import coverage.Verification
pnpm cicheckis fully green:src/e2e/e2e-permissions.spec.ts): 41/41 pass, including the new Rovodev--globalgenerate test.🤖 Generated with Claude Code