Files
hermes-agent/apps
kshitijk4poor 1affcb9386 refactor(desktop): resolve the ambient tail owner through the api/client seam
api/sessions.ts imported $connection from @/store/session to learn whether
an untagged read lands on the local pool. That closes a real module cycle
(api/sessions -> store/session -> session-unread-remote -> @/hermes ->
api/sessions), inert only because the read sat inside a function body, and
it breaks the "no store import" contract client.ts documents for exactly
this reason.

Publish the fact through the seam that already exists: store/session's
setConnection pushes local/remote into client.ts (setApiRequestLocalMode,
next to setApiRequestProfile / setApiRequestConnection), and
ambientOwnerConnectionId() answers "which backend serves an untagged
request" for the owner key. A null descriptor (reconnect blip) keeps the
last mode, matching rescopeConnectionScopedStores.
2026-09-11 13:08:19 +05:30
..