Conversation
|
Pulled this stacked on #59163 while tracing #51221 (plugin pre_tool_call approve - works on CLI, no controls on desktop/gateway). Nice improvement on metadata (_approval_metadata, rule_key / allowlist_key in Desktop/TUI). But _run_approval_gate() gateway branch still calls submit_pending() only - it doesn't use _await_gateway_decision() + the notify callback like check_all_command_guards() does. So approval.request never fires for plugin approvals, /approve won't see a pending item, and #51221's repro may still fail even after #59163 + this land. Suggest wiring plugin gateway approvals through the same blocking path as terminal commands before calling this done for #51221. |
|
Thanks for carrying the approval metadata through Desktop and TUI. The metadata gap is still present on current main: Problems
Suggested changes
Automated hermes-sweeper review. |
7a5a7a0 to
77de5ca
Compare
|
Rebuilt this PR directly on current The salvage preserves the newer blocking Verification:
|
77de5ca to
47e7ec7
Compare
|
Rebased this PR onto current Conflict resolution preserved current main’s newer Validation:
|
47e7ec7 to
e7dfb72
Compare
|
Rebase update: this is now based on current |
ded4e9f to
3b2ff95
Compare
c7610d0 to
0fb64bd
Compare
fix: surface approval rule keys in gateway clients
|
0fb64bd to
b978eb1
Compare
|
Rebased onto current Validation:
|
b978eb1 to
6bf1337
Compare
|
Refreshed this branch onto current Current-head verification (
|
Summary
Rebuilt directly on current
mainafter the original plugin approval base from #59163 landed through #60504.pattern_keys,allowlist_key,allow_permanent, and pluginrule_key) to gateway approval payloads_await_gateway_decision()notify/response flow for plugin approvalsexecute_code, no-callback, Desktop, and TUI pathsValidation
.venv/bin/python -m pytest tests/tools/test_request_tool_approval.py tests/tools/test_command_guards.py::TestGatewayApprovalAllowPermanent -q.venv/bin/ruff check tools/approval.py tests/tools/test_request_tool_approval.py tests/tools/test_command_guards.pynpm --workspace apps/desktop run test:ui -- src/app/session/hooks/use-message-stream/approval-rule-metadata-event.test.tsx src/store/prompts.test.ts src/components/assistant-ui/tool/approval.test.tsxnpm --workspace apps/desktop run typechecknpm --workspace @hermes/ink run buildnpm --workspace ui-tui run typechecknpm --workspace ui-tui test -- src/__tests__/createGatewayEventHandler.test.ts src/__tests__/approvalAction.test.tsgit diff --check