Files
hermes-webui/api
keyos 729ed415ff fix(approval): peek _gateway_queues for session-level approval when _pending is empty
During active streaming, dangerous-command approvals go through the
gateway path and are stored in _gateway_queues as _ApprovalEntry
objects, not in _pending. The _resolve_approval_legacy helper only
looked at _pending, so 'Allow for this session' never called
approve_session() — the user clicked Allow, the card vanished, but
the next dangerous command asked again.

Now when _pending has no matching entry, the helper peeks into
_gateway_queues to extract pattern_keys, calls approve_session(),
and marks found_target=True so resolve_gateway_approval also fires.

This commit is re-scoped to peek-only (no agent_session_key round-trip,
no state_db metadata changes).

Includes:
- Import + fallback for _gateway_queues
- Null-safe key filtering in all_keys
- Source-contract test (static) + functional test with
  @requires_agent_modules skip marker for CI
- All comments and docstrings in English
2026-05-19 20:24:05 +00:00
..
2026-05-18 07:14:26 +08:00
2026-05-19 03:13:47 +00:00
2026-04-29 19:54:07 -07:00
2026-05-19 18:20:47 +00:00
2026-05-19 18:20:47 +00:00
2026-05-15 16:39:45 -07:00
2026-05-17 19:55:09 +00:00