Skip to content

feat(opencode): auto-allow read-only tools in permission system#27077

Open
jinguanghai wants to merge 1 commit into
anomalyco:devfrom
jinguanghai:pr-permission-hardener
Open

feat(opencode): auto-allow read-only tools in permission system#27077
jinguanghai wants to merge 1 commit into
anomalyco:devfrom
jinguanghai:pr-permission-hardener

Conversation

@jinguanghai
Copy link
Copy Markdown

Adds a simple pre-filter that auto-allows 4 read-only tools (read, glob, grep, todowrite). No integration yet, purely additive.

Issue for this PR

Closes #27076

Type of change

  • New feature

What does this PR do?

Adds permission/hardener.ts with a permissionPreFilter() function that returns allow for 4 read-only tools, reducing unnecessary permission prompts.

How did you verify your code works?

7 test cases: all 4 read-only tools auto-allowed; bash/write/edit default to ask; unknown tools default. All tests pass locally.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Adds a simple pre-filter that auto-allows 4 read-only tools
(read, glob, grep, todowrite) in the permission ask flow.

Tests: 7 cases. Zero breaking changes.

Closes anomalyco#27076
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.

Proposal: Auto-allow read-only tools in permission system

1 participant