Expand description
Shared state utility functions for session backends.
These functions implement the three-tier state model used by all session backends (SQLite, PostgreSQL, Redis). Keys are partitioned by prefix:
app:→ app-level state (prefix stripped)user:→ user-level state (prefix stripped)temp:→ ephemeral, dropped on persistence- everything else → session-level state
Functions§
- extract_
state_ deltas - Split a flat state map into (app, user, session) tiers.
- merge_
states - Merge three state tiers back into a flat map with prefixes restored.