Approval questions -> clarify buttons #4

Closed
opened 2026-08-22 22:35:43 +00:00 by Pakobbix · 1 comment
Collaborator

We already have clarify and choice picker. But it's not used for approvals right now.

We already have clarify and choice picker. But it's not used for approvals right now.
Pakobbix added the enhancement label 2026-08-22 22:35:43 +00:00
Pakobbix added this to the version 1.0 project 2026-08-22 22:35:43 +00:00
ARIA was assigned by Pakobbix 2026-08-22 22:39:06 +00:00
Pakobbix moved this to To Do in version 1.0 on 2026-08-22 22:41:37 +00:00
Pakobbix moved this to In Progress in version 1.0 on 2026-08-22 23:16:05 +00:00
Pakobbix moved this to Done in version 1.0 on 2026-08-22 23:16:15 +00:00
Owner

Done — approvals now render as interactive picker buttons, reusing the existing clarify/choice-picker mechanism.

Change (gateway-side only, gateway-plugin/adapter.py): added send_exec_approval(). Hermes auto-detects this method on the adapter and calls it when the agent wants to run a dangerous command. It now emits:

  • a high-priority approval notification (wakes a backgrounded device), and
  • a picker.choice card showing the command (code block) + reason, with buttons ✅ Allow Once / ✅ Allow Session / ✅ Always Allow / ❌ Deny (gated by the same allow_session/allow_permanent/smart_denied flags the Telegram/relay adapters use).

A tap resolves via resolve_gateway_approval() (the same primitive the text /approve//deny handlers use), unblocking the agent, and posts a short confirmation. No live device → reports failure so hermes falls back to the text prompt (unchanged).

No app changes needed — picker.choice cards are rendered generically.

Verified live on the phone (had to set approvals.mode: manual temporarily, since the default smart mode auto-approves low-risk commands via the aux LLM). 4 new tests added to test_android.py; full file passes 98/98.

Done — approvals now render as interactive picker buttons, reusing the existing clarify/choice-picker mechanism. **Change** (gateway-side only, `gateway-plugin/adapter.py`): added `send_exec_approval()`. Hermes auto-detects this method on the adapter and calls it when the agent wants to run a dangerous command. It now emits: - a high-priority `approval` notification (wakes a backgrounded device), and - a `picker.choice` card showing the command (code block) + reason, with buttons **✅ Allow Once / ✅ Allow Session / ✅ Always Allow / ❌ Deny** (gated by the same `allow_session`/`allow_permanent`/`smart_denied` flags the Telegram/relay adapters use). A tap resolves via `resolve_gateway_approval()` (the same primitive the text `/approve`/`/deny` handlers use), unblocking the agent, and posts a short confirmation. No live device → reports failure so hermes falls back to the text prompt (unchanged). **No app changes needed** — `picker.choice` cards are rendered generically. **Verified live** on the phone (had to set `approvals.mode: manual` temporarily, since the default `smart` mode auto-approves low-risk commands via the aux LLM). 4 new tests added to `test_android.py`; full file passes 98/98.
ARIA closed this issue 2026-08-22 23:16:22 +00:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ARIA/iris_x_hermes#4