fix: honor tools overrides via permission migration #1289
+49
−2
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
agents.*.toolsconfiguration being ignored in oh-my-opencode.jsonmigrateAgentConfig()call inmergeAgentConfig()to converttools→permissionChanges
src/agents/utils.ts:
migrateAgentConfigfrom sharedmigrateAgentConfig()on override before merging inmergeAgentConfig()src/agents/utils.test.ts:
tools: { x: false }is migrated topermission: { x: "deny" }tools: { x: true }is migrated topermission: { x: "allow" }toolsconfig is removed after migrationTesting
Unit tests
Manual Verification
Verified In Real OpenCode Environment
Pointed OpenCode to the locally built plugin output via
file://(instead of the npm-installed plugin), then confirmed the issue described in #1288 is resolved.screenshots (Sensitive information masked.)

before :
after :

Related Issues
Fix #1288
Summary by cubic
Fix ignored agents.*.tools overrides by migrating tools → permission during config merge. Tools allow/deny flags in oh-my-opencode.json now take effect (fixes #1288).
Written for commit 8a5b131. Summary will update on new commits.