feat(sessions): keep JWT in memory and wire IPC to the sessions API
Max Avatar can now call Max API's /sessions endpoints: session.ts keeps the access token in memory after login (never persisted, cleared on logout, same lifecycle as the existing email/keys state), a new sessionsClient.ts wraps the 4 endpoints with the Bearer header, and index.ts exposes them as sessions:create/get/send-objective-message/ confirm-objective IPC handlers (input-validated, requireLoggedIn() gated) surfaced to the renderer as window.api.sessions.*. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
ef4cd41ad4
commit
00619add9f
@@ -48,8 +48,12 @@
|
||||
"@fontsource/jetbrains-mono": "^5.3.0",
|
||||
"dotenv": "^18.0.8",
|
||||
"electron-updater": "^6.8.11",
|
||||
"lucide-react": "^1.66.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"three": "^0.186.1"
|
||||
"react-markdown": "^10.1.0",
|
||||
"remark-gfm": "^4.0.1",
|
||||
"three": "^0.186.1",
|
||||
"zustand": "^5.0.16"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@electron-toolkit/eslint-config-prettier": "^3.0.1",
|
||||
|
||||
Reference in New Issue
Block a user