[claude] Hermes session save/load + integration test (#286) #320
Reference in New Issue
Block a user
Delete Branch "claude/issue-286"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #286
Changes
ws-client.jssaveSession(data)— persists session token tolocalStorageas JSON with asavedAttimestamploadSession()— restores session on page reload; returnsnullif none storedclearSession()— removes stored session and nullsthis.sessiononopen: loads existing session and sendssession-resumeframe with the token if presentsession-initmessages from the server: saves the issued token automaticallytest-hermes-session.js(new)21 integration tests covering:
saveSessionwrites valid JSON with all fields +savedAttimestamploadSessionreturnsnullwhen nothing storedloadSessionrestores token and clientId correctlyclearSessionremoves the entry and nullsthis.sessionws-client.jsfor all new session symbolsRun with:
node test-hermes-session.js