hermes-hub/agents/inbox/2026-08-20-plan-a-refresh-delta-ui-smart-routing.md
Hermes Team 0c511cd3b6 feat(hub): Plan A stabilization, refresh architecture, delta UI, and capability routing
- Implemented HubSnapshot and central HubStateStore for normalized in-memory state caching (<0.05ms)
- Refactored AccountsView and RoutingView with reusable AccountCardWidget and RoutingRoleWidget to eliminate widget recreation
- Implemented central HermesRefreshScheduler with 5s tick, concurrency throttling, dedup, and spread initial delays
- Added typed EventBus with thread-safe UI main loop dispatching via root.after
- Implemented dynamic ModelRegistry with capability-based role requirements and multi-dimensional scoring
- Integrated Antigravity separate quota buckets (Claude vs Gemini) and same-account model fallback
- Enhanced SessionAffinityTracker with TTL expiration and LRU capacity bounds
- Eliminated long subprocess holding of _CM_LOCK and ensured Windows credential restoration in finally block
- Added FastAPI REST contracts in gui_server.py as foundation for future Tauri frontend
- Verified 100% pass across all 91 pytest tests and 7/7 release gate criteria
2026-08-20 21:20:51 +07:00

17 lines
2.2 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Задание: Hermes Hub — Plan A Stabilization, Refresh-архитектура, Delta UI и Smart Capability/Cost Model Routing
## Цели
1. Аудит текущего Git HEAD (`2b8b709`).
2. Ввести единый `HubSnapshot` и `HubStateStore`.
3. Убрать destroy/recreate из `AccountsView` и `RoutingView` (перевести на стабильные reused виджеты по `profile_id`/`role_id`).
4. Убрать любые вызовы `scan_all()` / сетевые / файловые I/O из UI Views и `_restore_status()`.
5. Обновлять только активную вкладку; при скрытых вкладках сохранять generation и выполнять lazy update при открытии.
6. Разработать централизованный `HermesRefreshScheduler` (tick каждые 5с, `max_concurrent_refresh=1`, stable initial delays, running guard, overlap policy).
7. Поддержать single-account refresh, refresh-all (только configured), request deduplication и stale response sequence protection.
8. Разработать типизированный thread-safe `EventBus` с delta событиями.
9. Проверить и исправить Win32 single instance mutex lifetime, thread-safe singletons и SessionAffinityTracker TTL + LRU capacity.
10. Разработать динамический `ModelRegistry` и `CapabilityPolicy` (без жесткой привязки к номерам версий моделей: Fast/Dispatcher, Researcher, Core Coder, Routine Coder, Reviewer), scoring по capability, quality, reasoning, latency, cost, diversity, quota buckets, same-account fallback и формированием объяснимого trace.
11. Расширить `gui_server.py` и WebSocket/event contracts для будущего перехода на Tauri без изменения бизнес-логики.
12. Разработать и запустить бенчмарки и тесты (reuse, performance, dedup, stale, scheduler, mutex, session TTL, routing, capability, cost).
13. Пройти полный pytest suite и `release_gate.py`.
14. Закоммитить и запушить в `main` без создания релизного тега v0.1.1.