hermes-agent/apps
Brooklyn Nicholson cc726aad68 refactor(desktop): fold served-token adoption + foreign-backend refusal into one helper
Both spawn paths (startHermes, spawnPoolBackend) duplicated the same
resolve -> log-fallback -> foreign-check -> throw dance. Collapse it into
adoptServedDashboardToken(baseUrl, spawnToken, {childAlive, label}) in
dashboard-token.cjs; childAlive is a thunk so liveness is sampled after
the fetch. Drop the redundant backendPool.delete in the pool's throw
path (the child exit/error handlers already own pool eviction).

Validated end-to-end against a real web_server.py backend, not just
units: token-injection regex vs the actual served index.html, foreign
refusal (dead child + live squatter), benign drift adoption, and the
401-vs-200 token auth split on /api/sessions.
2026-06-11 18:33:05 -05:00
..
bootstrap-installer change(tooling): typecheck in CI, update ts to 6 2026-06-10 11:59:34 -04:00
desktop refactor(desktop): fold served-token adoption + foreign-backend refusal into one helper 2026-06-11 18:33:05 -05:00
shared change(tooling): typecheck in CI, update ts to 6 2026-06-10 11:59:34 -04:00