hermesFiles built each session's id with hermesID(path, sid), which
resolves the store's path (filepath.Abs and EvalSymlinks, a stat per
folder) and hashes it, for every session of the store, on every listing.
Every Sessions endpoint enumerates every agent, so this ran on each poll.
hermesStoreID now resolves and hashes once per store; each session's id
is that prefix and its own id, the same string as before.
Test: TestHermesStoreResolvedOncePerListing counts resolves for a store
of 10 sessions (red on the old code: 12 resolves for 10 sessions) and
checks a file's key still equals hermesID's.
Measured on the synthetic sandbox HOME (2000 Hermes sessions beside 3000
Claude Code and 1500 Codex), warm index: a CPU profile of 9 warm
requests (manage?agent=claude, manage?agent=codex, /api/sessions, three
times; 33 enumerations) put 0.96 s CPU in hermesID, ~30 ms per
enumeration of 2000 sessions. After, that is one resolve per store.
Run: go test ./internal/sessions -run TestHermes -count=1 (ok); gofmt -l
clean. Full suite and cross-OS vet are recorded on the last commit of
this series.