HERMES-GIELIE/api
Hermes Agent d6b58b9ce0 fix: queue simultaneous approval requests per session (fixes #527)
Changes _pending from a single overwriting dict value to a list,
so parallel tool calls each get their own approval slot.

api/routes.py:
- Wraps submit_pending() to append to a list and assign a stable
  approval_id (uuid4) to each entry.
- _handle_approval_pending() returns the first queued entry plus
  pending_count so the UI can show '1 of N'.
- _handle_approval_respond() pops by approval_id (falls back to
  oldest entry for backward-compat with old clients).
- Backward-compat: legacy single-dict values in _pending are
  handled without crashing.

static/messages.js:
- respondApproval() sends approval_id in the POST body.
- showApprovalCard() accepts pendingCount, shows '1 of N pending'
  counter when multiple approvals are queued.
- _approvalCurrentId tracks the approval_id of the displayed card.
- Poll loop passes pending_count to showApprovalCard.

static/index.html:
- Adds approvalCounter element for the '1 of N' display.

tests/test_approval_queue.py:
- 14 tests: static-analysis checks (Python + JS + HTML),
  functional tests that inject two simultaneous approvals and
  verify both are surfaced and independently resolvable.
2026-04-15 19:16:14 +00:00
..
__init__.py Hermes Web UI — Sprints 11-14: multi-provider models, settings, session QoL, alerts, polish 2026-03-31 07:02:47 +00:00
auth.py security: bandit fixes B310/B324/B110 + QuietHTTPServer (#354) 2026-04-13 11:11:56 -07:00
clarify.py feat: harden clarify dialog flow and refresh recovery 2026-04-15 13:10:50 +08:00
config.py fix: show custom_providers models regardless of active provider (#515 #519) 2026-04-15 07:42:12 +00:00
gateway_watcher.py fix(sessions): return None instead of 'unknown' for missing gateway session model (fixes #443) 2026-04-14 19:06:22 +00:00
helpers.py fix(csp): allow cdn.jsdelivr.net for font-src so KaTeX fonts load (fixes #477) 2026-04-14 21:14:33 +00:00
models.py fix(sessions): return None instead of 'unknown' for missing gateway session model (fixes #443) 2026-04-14 19:06:22 +00:00
onboarding.py fix(onboarding): skip wizard if Hermes already configured 2026-04-14 16:45:12 +00:00
profiles.py v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00
routes.py fix: queue simultaneous approval requests per session (fixes #527) 2026-04-15 19:16:14 +00:00
startup.py v0.46.0: security, Docker UID/GID, model discovery, i18n, cancel fix 2026-04-11 10:17:52 -07:00
state_sync.py security: bandit fixes B310/B324/B110 + QuietHTTPServer (#354) 2026-04-13 11:11:56 -07:00
streaming.py fix: strip orphaned tool messages before sending history to API (fixes #534) 2026-04-15 16:57:31 +00:00
updates.py fix: improve self-update git pull diagnostics (#287) 2026-04-12 00:19:33 -07:00
upload.py v0.50.25: mobile scroll, import timestamps, profile security, mic fallback (#404) 2026-04-13 22:11:45 -07:00
workspace.py fix: allow /root workspace path; guard against split on missing [Attached files] 2026-04-15 07:41:36 +00:00