feat: add --tools flag to limit available tools#5339
Open
paralin wants to merge 1 commit intoanomalyco:devfrom
Open
feat: add --tools flag to limit available tools#5339paralin wants to merge 1 commit intoanomalyco:devfrom
paralin wants to merge 1 commit intoanomalyco:devfrom
Conversation
Add --tools flag to serve, web, and TUI commands to enable selective tool access control. The flag accepts comma-separated patterns to enable/disable tools. Usage examples: # Only allow read, write, and webfetch tools opencode serve --tools='-*,read,write,webfetch' # Disable specific tools opencode web --tools='-bash,-edit' # Use in TUI mode opencode --tools='-*,read,write,webfetch' Changes: - Add --tools flag to serve, web, and TUI thread commands - Implement Wildcard.parseToolsPattern() to parse tool enable/disable patterns - Update Server.listen() to accept tools option - Pass default tools to SessionPrompt.prompt() in server - Add tests for parseToolsPattern() Fixes: anomalyco#9386 Signed-off-by: Christian Stewart <christian@aperture.us>
1 task
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
1 task
3e9d023 to
375a82b
Compare
00637c0 to
71e0ba2
Compare
f1ae801 to
08fa7f7
Compare
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.
Add --tools flag to serve, web, and TUI commands to enable selective tool access control. The flag accepts comma-separated patterns to enable/disable tools.
Usage examples:
Changes:
Fixes #9386