Commit graph

284 commits

Author SHA1 Message Date
Hermes Team
999e0fb08e feat(router): A9 — миграция конфигурации, квоты провайдеров, реальные модели, перехват Hermes и токены Codex 2026-08-23 12:45:08 +07:00
Hermes Team
95afdfe179 docs(task): A9 — интеграция с Hermes и обновление токенов Codex
P0-00: Hub подключён к Hermes как middleware llm_execution и срабатывает
на каждом вызове, но Hermes не передаёт role — поэтому всё уходило в роль
по умолчанию, цепочка orchestrator исчерпана, и Hermes получал текст
ошибки вместо ответа модели. Следствие устранено в 2d62d39; в задании —
причина: не претендовать на вызов без достоверной роли, описать границу
между учётными системами Hub и Hermes, подготовить варианты связывания
профилей.

P0-01: Codex сохраняет refresh_token, но функции обновления нет вовсе.
Требуется обновление токена, раздельная проверка access_token и
id_token и переключение аккаунта с остановкой клиента до подмены
учётных данных — по образцу Cockpit Tools, присланному владельцем.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 12:27:43 +07:00
Hermes Team
2d62d3973e fix(plugin): отказ роутера больше не подменяет ответ модели в Hermes
Hub подключён к Hermes как middleware llm_execution и срабатывает на
каждом обращении к модели. Но Hermes роль не передаёт: в kwargs есть
model, provider, session_id, task_id — role нет. resolve_role поэтому
сваливается в роль по умолчанию, и КАЖДЫЙ вызов Hermes маршрутизируется
как orchestrator.

Цепочка orchestrator у владельца исчерпана целиком:
  ag-orch-fallback  skipped_unhealthy
  codex-orch        429 «account is not active, check billing»
  opengo-3          No API key found
  ag-w1/ag-w3       agy authentication failed or timed out

Роутер возвращал «⚠️ Hermes Router Failover Exhausted» как ответ
ассистента, и Hermes показывал это вместо ответа модели, хотя его
собственный провайдер работал. Это и есть «основной оркестратор не
выбрался» из отчёта владельца.

Теперь при router_error вызов уходит дальше по цепочке (next_call),
а отказ пишется в журнал уровнем warning с полным следом. Плагин обязан
быть незаметным при отказе: он может улучшить маршрутизацию, но не имеет
права сделать Hermes хуже, чем без него.

Проверено исполнением: Hermes получает ответ провайдера, а не текст
ошибки. Тесты: 287 passed (падает только известный нестабильный Tk-тест,
воспроизводится на чистом main).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 12:25:02 +07:00
Hermes Team
7468c7cc8b feat: add cockpit-style model and card controls 2026-08-23 10:54:08 +07:00
Hermes Team
6494c5198a docs(tasks): A9 и B8 по итогам живого прогона владельца
A9 (Antigravity): миграция профилей в существующий router_profiles.yaml —
корень жалобы «при подключении грока ошибка»; квоты для codex и opencode;
служба обнаружения моделей с кэшем и фоновым обновлением; отказ от
выдуманных списков моделей. Плюс четыре утверждения отчёта A8, не
подтвердившиеся проверкой: профили claude/grok до пользователя не дошли,
проверка is_expired была мертва, dist в .gitignore, флаг /reinstall
не используется.

B8 (Codex): выбор модели агента, компактные карточки аккаунтов без
раскрытия, кликабельная карточка целиком, окно настроек роли, снятие
правой панели, устранение жёстких срезов диаграммы, решение по
дублирующим разделам, причина у каждого Н/Д.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 01:20:23 +07:00
Hermes Team
b625b0f3e5 Merge codex/usability-fixes into review/a8 (A8 + B6/B7)
Сводит две работы: A8 (Antigravity — запуск, развёртывание, самопроверка)
и codex/usability-fixes (B6 граф маршрутизации + B7 дефекты живого прогона,
плюс живой сбор квот).

Проверено исполнением на реальных аккаунтах владельца: квоты Antigravity
теперь приходят от провайдера (source=provider_api) по всем шести
авторизованным профилям с разными числами — ag-w2 показывает 37.4%
остатка недельного пула Claude/GPT. OpenCode Go честно отдаёт None
с причиной.

Разрешение конфликтов:

1. do_test_profile — оба агента чинили P0-3 по-разному. Сохранены обе
   правки: проверка просроченной авторизации (A8) поверх локальной
   проверки runtime без вызова модели (Codex).

2. _finish в мастере — взята содержательная версия Codex (проверка слота,
   создание определения профиля, внесение в маршрутизацию, сброс
   cooldown), но её хвост обёрнут так, чтобы сбой в журналировании или
   on_complete не оставлял окно открытым. Регрессия 7090c8a закрыта
   тестом и продолжает проходить.

Исправлено при слиянии: A8 проверял status.get("expired"), тогда как ключ
называется is_expired. Проверка была мертва изначально — её прикрывал
контроль в адаптере, и это вскрылось только когда Codex убрал вызов
адаптера из «Теста»: протухший аккаунт получал зелёную галочку.

Тесты: 288 passed, 2 skipped, ruff чисто.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-23 01:12:31 +07:00
Hermes Team
17c266339f fix: restore weekly quotas and reconcile live health 2026-08-23 00:15:18 +07:00
Hermes Team
49821451a5 fix: restore Gemini Pro agent options 2026-08-22 23:53:31 +07:00
Hermes Team
7d77877358 fix: show live quotas in fixed account cards 2026-08-22 23:45:37 +07:00
Hermes Team
d4517d8ce0 Merge remote-tracking branch 'origin/antigravity/deployment-doctor' into review/a8 2026-08-22 23:37:20 +07:00
Hermes Team
40b3466558 fix: complete B7 live usability flows 2026-08-22 22:30:41 +07:00
Hermes Team
559289d839 docs(task): B7 — зафиксировать исправленный дефект мастера и потребовать проверку на несуществующие методы
Добавлен раздел P0-0: правка _finish уже в main (7090c8a), её нельзя
потерять при слиянии. Там же второй дефект того же класса —
splash.py вызывает несуществующий AssetManager.get_splash_logo.

Дефект «вызов несуществующего метода» встречается третий раз и под
pythonw всегда молчаливый, поэтому в критерии приёмки добавлено
требование механической проверки UI-слоя.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 21:45:05 +07:00
Hermes Team
7090c8ae6f fix(wizard): «Завершить подключение» не закрывало окно
_finish первой же строкой вызывал EventLogService.log_event — метода с
таким именем у сервиса нет, есть log(category, message, details, level).
AttributeError уходил в обработчик Tk, а под pythonw консоли нет, поэтому
для владельца кнопка просто не работала: окно оставалось открытым,
on_complete не вызывался, аккаунт не попадал в маршрутизацию.

Вызов приведён к настоящему API. Журналирование и обратный вызов
обёрнуты так, чтобы сбой в них не запирал пользователя в мастере, —
закрытие окна не должно зависеть от побочных действий.

Воспроизведено и проверено исполнением: до правки winfo_exists=1 и
on_complete не вызван, после — окно уничтожено, результат передан.

Тесты: 252 passed в venv Hermes. Единственный сбой
(test_oauth_lifecycle::test_f_copy_before_open_browser, TclError) и
FAILED релизного гейта воспроизводятся на чистом main и к этой правке
отношения не имеют.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 21:43:51 +07:00
Hermes Team
c75fb35082 docs(tasks): require agents to refresh their local checkout before starting
Both agents work on other machines and push straight to git. A8 and B7
were pinned to 8cddc9f while main had already moved to 7f912f1, and
neither task said to pull first — branching from a stale checkout is how
merges revert other people's work.

Adds an explicit "update your local copy" section to A8 and B7: fetch,
reset to origin/main, record the actual HEAD as BASE_SHA rather than the
SHA printed in the document, and branch from fresh main.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 21:25:50 +07:00
Hermes Team
d2d2a69357 feat(installer): implement P0-4bis reinstall detection, UI screen, and user data preservation 2026-08-22 21:25:39 +07:00
Hermes Team
ee5108eb3e fix(deployment): implement self-healing bootstrap, Claude & Grok profiles, non-interactive test mode, mirror installer, and comprehensive doctor CLI 2026-08-22 21:22:21 +07:00
7f912f1920 docs(task): A8 — reinstall acceptance criteria
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 21:20:49 +07:00
3c55d0c624 docs(task): A8 — installer must offer reinstall when Hub is already present
SetupEngine.IsInstalled is computed but never reaches the wizard UI, so the
first-install flow repeats verbatim on a machine that already has Hub. Adds the
reinstall screen, the mirror semantics it triggers, the list of user data that
must survive it, and a /reinstall silent flag.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 21:20:12 +07:00
Hermes Team
f0461bc539 fix: repair account setup and routing actions 2026-08-22 21:13:02 +07:00
Hermes Team
4c45a1c73c feat: add working routing graph editor 2026-08-22 21:13:01 +07:00
20078f5ff6 docs(task): A8 and B7 — defects found during the first live run
The owner used the product and the router proved itself: the log shows a real
failover chain codex-orch -> ag-orch-fallback -> opengo-3 driven by actual quota
errors. Everything around that core failed.

Hub stopped launching because customtkinter vanished from the Hermes venv, most
likely wiped by that app's repair-install; pythonw swallows the traceback, so it
looks like the window never opens. The wizard offers five providers while the
router config defines profiles for three, so find_free_slot returns a
non-existent claude-orch. The test action still reaches the agy subprocess, which
opens a browser on expired credentials. The routing "configure" button only
raises a toast about drag-and-drop.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-22 20:13:01 +07:00
Hermes Team
8cddc9fee2 Merge remote-tracking branch 'origin/main' into review/a7 2026-08-22 08:41:09 +07:00
35101d1043 docs(task): B6 — routing graph on the Team screen, and a Hub that demonstrably works
Adopts the graph half of the 104-point n8n-derived brief and states plainly what
is excluded: n8n's canvas edits its own workflow execution engine, while Hermes
Hub's engine resolves a role into a provider/account/model for a single call.
Execution trees, agent-as-tool contracts, cancellation and review loops have no
layer to sit on here.

Adds the requirement that has been missing all along: screenshots taken with a
live connected account, not an empty configuration.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 22:25:40 +07:00
Hermes Team
9f72e8ec39 fix(dashboard): unify LeaseManager, warm up initial CPU measurement, add live network speed, and clarify YAML comment support 2026-08-21 22:18:59 +07:00
09d5e5dccb docs(task): A7 — add network counter presented as a live metric
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 21:58:23 +07:00
Hermes Team
8e4767512c Merge remote-tracking branch 'origin/main' into review/b5 2026-08-21 21:54:36 +07:00
1efaf78a7a docs(task): A7 — two dashboard data defects found by execution
active_calls is permanently zero: state_store reads LeaseManager.get() while
RouterEngine constructs its own instance, so the router's leases are invisible
to the snapshot. And psutil.cpu_percent(interval=None) returns 0.0 on its first
call, so the dashboard shows CPU 0% at startup — a measured-looking number that
is not a measurement.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 21:54:01 +07:00
Hermes Team
312f699085 fix(ui): align dashboard and navigation with approved mockup 2026-08-21 19:32:53 +07:00
Hermes Team
e4843b5a39 feat(ui): implement approved three-theme mockup redesign 2026-08-21 19:06:46 +07:00
Hermes Team
69cbefcab6 feat(dashboard): expose telemetry breakdown, provider call_share, host metrics, and active leases 2026-08-21 17:44:56 +07:00
2407d47606 docs(task): A6 and B5 — back the approved dashboard mockup with real data
The mockup's headline blocks divide three ways against the code at 2b2ccd8:
already available (latency, readiness, events, routing chain), derivable but not
yet exposed (per-provider aggregates, call share, host metrics via the unused
psutil dependency, active leases), and absent by design (task queues, service
window, incidents, provider RPS/SLA).

A6 supplies the second group; B5 redesigns against the contract and restores the
four account actions that d0d15ae dropped.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 17:28:33 +07:00
Hermes Team
2b2ccd8fb2 feat(telemetry): implement empirical call telemetry, metrics aggregates, user pricing, and update state contract 2026-08-21 16:57:57 +07:00
f5d002c46f docs(task): A5 — persist the telemetry the router already measures
Latency, token usage and failover counts flow through router_metadata on every
call and are then discarded; nothing in the project accumulates them. Four of
the seven headline numbers on the mockups are therefore honestly derivable from
our own calls rather than fabricated. RPS, SLA and host resource metrics stay in
Active Limitations.

Also carries the three debts forward for the third time: HKCU in the installer,
fastapi/uvicorn as required dependencies, and YAML comment loss.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 16:53:15 +07:00
31e4e7f66c docs(task): B4 — restore the account actions the redesign dropped
accounts_view went from four user actions to one in d0d15ae: test, set_main,
set_orchestrator and assign_role lost their triggers, and assign_role is now
unreachable entirely although its handler and modal still exist. Also scopes
what the approved mockups can and cannot drive, since their headline numbers
are exactly the metrics Gap 12 says the backend does not measure.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 15:53:06 +07:00
Hermes Team
9d93a1739b feat(security): isolate subprocess credentials, implement selection explanation matrix, and resolve installer registry isolation 2026-08-21 10:17:19 +07:00
33b99982b2 docs(task): A4 — credential isolation, remaining debts, provider explain trace
The agy subprocess still inherits the entire environment, so every provider key
travels into it; _safe_env() was written for exactly this and has never been
called. That is the oldest unfixed finding in the project.

Also scopes out the "AI news" proposal: lifecycle supervisor, skill registry and
MCP lifecycle target modules this repo deleted as dead code or never had, so
only credential isolation and the provider explain trace are adopted from it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 10:10:46 +07:00
Hermes Team
d2d6d95188 Merge remote-tracking branch 'origin/main' into review/a3 2026-08-21 10:08:13 +07:00
Hermes Team
ff8776b963 feat(release): close contract audit v1.2, release feed verification, diagnostic CLI, and failover event logging 2026-08-21 10:05:30 +07:00
Hermes Team
95d80268f4 feat(ui): wire state contract v1.1 fields 2026-08-21 09:04:53 +07:00
9ffc815ed5 docs(task): B3 — wire the contract v1.1 fields the UI never picked up
Codex built phases 2-6 against contract v1.0 while Antigravity shipped v1.1, so
eight fields now exist in the snapshot and render nowhere: plan_code,
plan_source, active_quota_status, active_quota_label, quota_status,
failover_reason, unavailable_reason and seq. PlanBadge was built in phase 1 and
still has nothing to display.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:50:22 +07:00
2c612f22a0 test(ui): keep the startup guard assertion after views stopped reading the store
The redesigned views are pure renderers: update_data returns early instead of
falling back to HubStateStore. That made the guard check skip for all nine
views, so the invariant silently stopped protecting the crash it was written
for. The store-access precondition is dropped; the isinstance guard is asserted
either way.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:47:59 +07:00
Hermes Team
0d1b545f8f Merge remote-tracking branch 'origin/main' into review/codex 2026-08-21 08:44:00 +07:00
5b6f69b6b4 docs(task): A3 — release artifact, contract honesty, remaining debts
A2 closed the gaps that blocked the UI, but three declared gaps (4, 5, 12)
vanished from the contract without being closed. Gap 12 was the instruction
telling the UI to render N/A for latency, RPS and cost — it disappeared exactly
as Codex starts the dashboard. The release asset still returns 404.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:43:44 +07:00
Hermes Team
d0d15ae99a feat(ui): complete redesign phases 2 through 6 2026-08-21 08:41:50 +07:00
Hermes Team
2035c1455f feat(state): close contract gaps v1.1, canonical event publishers, and view model enrichment 2026-08-21 08:20:56 +07:00
e8a404be03 docs(task): next Antigravity assignment — close the gaps its own contract declares
Seven of the twelve backend gaps in UI_STATE_CONTRACT.md block the UI outright:
no targeted event has a publisher, plan provenance never reaches
ProfileViewModel, and AgentViewModel/PipelineNode lack the fields the Team and
Routing screens need. Verified on c6876e9, alongside the release asset still
returning 404 and YAML comment loss now at 5 to 2 rather than 5 to 0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:16:44 +07:00
c6876e96b2 docs(task): reissue the UI redesign assignment against the published contract
Codex was handed Task A by mistake and duplicated the state-layer work that
Antigravity had already merged. This reissues its own scope, rebased on the
facts at 39b1f92: PHASE 1 is merged, docs/UI_STATE_CONTRACT.md now exists, and
the twelve backend gaps it declares are mapped to what the UI may and may not
render.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:13:46 +07:00
39b1f928f4 fix(wizard): restore Antigravity OAuth by matching the 3-tuple session API
0d9005f changed start_profile_oauth to return (session_id, auth_url, port) and
updated the tests, but not its callers. The wizard still unpacked two values, so
every Antigravity connection raised ValueError inside _init_antigravity_oauth,
the handler swallowed it, and the authorization URL never appeared — the primary
onboarding flow has been dead since that commit.

Also stores the listener port as wizard.oauth_port, which the single-session
invariance test reads to prove that repeat "open browser" clicks reuse the
existing listener instead of binding a new one.

Both defects were caught only by tests that the headless run skips, which is why
they survived several reviews.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 08:00:42 +07:00
Hermes Team
83409d5354 style: normalize merged state tests 2026-08-21 00:11:16 +07:00
Hermes Team
83e1f78818 merge: complete antigravity state layer 2026-08-21 00:10:56 +07:00