feat: add per-tool execution approval gate and streamline tool settings - #329
Merged
Merged
Conversation
yyg-max
marked this pull request as draft
July 29, 2026 16:42
proto-check now calls `buf breaking --against` directly; remove the scripts/check-buf-breaking.mjs wrapper and tidy buf.yaml comments.
yyg-max
force-pushed
the
feat/tool-approval-gate
branch
2 times, most recently
from
July 30, 2026 02:56
2b324be to
991ea7b
Compare
… settings Add a permission gate that can require user approval before a tool runs, and reduce tool-config surface by removing the unfinished plugin platform and the vestigial selectable/custom system tools. Permission gate: - Resolve an allow/ask/deny policy per tool (explicit tool name, MCP server, or tool group) from settings.system.toolPolicies, enforced in beforeToolCall; default allow so there is no regression. - Add a centralized approval bar above the composer with per-call allow-once / allow-for-this-chat / deny, plus batch allow/deny. - Show the pending command/arguments summary in the approval bar (full command, wrapped, height-capped with scroll) and keep the transcript tool card collapsed while awaiting approval. - Persist toolPolicies via the existing system_settings store; sync the pending marker + summary to the WebUI over the gateway event stream. Remove plugin platform: - Delete the QuickJS plugin runtime, manifest/install/grants/config, plugin skills discovery, plugins Hub, and the AppSettings.plugins field. - rquickjs stays for provider usage queries. Remove selectedSystemTools / custom system tools (proto to UI): - Reserve ChatRequest field 6 (selected_system_tools) in gateway.proto and regenerate Go/TS; drop it from the Go handler, Rust event/settings, and the desktop turn pipeline. - Delete the http_get_test demo tool and customSystemTools. Streamline settings: - Fold the built-in tool approval controls into the System Tools page and remove the separate Tool Permissions page. - Remove the dead ToolApprovalCard component.
yyg-max
force-pushed
the
feat/tool-approval-gate
branch
from
July 30, 2026 03:18
991ea7b to
f69f24d
Compare
yyg-max
marked this pull request as ready for review
July 30, 2026 03:26
yyg-max
requested review from
coder-hhx and
su-fen
and removed request for
su-fen
July 30, 2026 03:28
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
Add a permission gate that can require explicit user approval before a tool
runs, with a centralized approval bar that shows the exact command. Alongside
the feature, shrink the tool-config surface by removing the unfinished plugin
platform and the vestigial selectable/custom system tools, and merge the two
overlapping tool settings pages into one.
Changes
Permission gate
allow/ask/denypolicy per tool — by explicit tool name,MCP
server:<id>, or toolgroup:<id>— fromsettings.system.toolPolicies,enforced in
beforeToolCall. Default staysallow, so no regression.allow once,allow for this chat(in-memory, per conversation), anddeny, plus batchallow/deny when more than one tool is pending.
wrapped, height-capped with internal scroll for very long commands — and keep
the transcript tool card collapsed while awaiting approval.
toolPoliciesthrough the existingsystem_settingsstore; sync thepending marker + summary to the WebUI over the gateway event stream.
Remove plugin platform
skills discovery, the Plugins Hub, and the
AppSettings.pluginsfield.rquickjsis retained for provider usage queries.Remove selectable/custom system tools (proto to UI)
ChatRequestfield 6 (selected_system_tools) ingateway.protoand regenerate Go/TS; drop it from the Go handler, the Rust event/settings
layer, and the desktop turn pipeline.
http_get_testdemo tool andcustomSystemTools.Streamline settings
the separate Tool Permissions page.
ToolApprovalCardcomponent.Compatibility and upgrade
buf breakingpasses: field 6 is reserved (number + name), so the wire formatstays compatible; new clients simply omit it and old payloads are ignored.
toolPoliciesdefaults to empty (every toolallow), so existing setups seeno behavior change until a user opts a tool into
ask/deny.takes effect.
Test plan
Bash) toaskin System Tools; confirm the approvalbar appears with the command and the transcript card stays collapsed.
allow once/deny/allow for this chatbehave per scope; a newconversation asks again.
pushing the buttons off.
recovers after a page refresh.
or Tool Permissions entries remain.
buf lint/breaking,go build/test,cargo check/test,both
tsc, biome, mirror.