reviveSession
function reviveSession(raw): Session;Restores a Session from its serialized form.
Revives Date instances nested in:
- top-level
createdAt/updatedAt handoffHistory[].timestampmetadata.createdAt/metadata.lastActiveAtmetadata.handoffHistory[].timestampagentStates[*].lastActive
Adapter packages (postgres-store, redis-store, upstash-store, etc.) must import this instead of re-implementing their own revival logic.
The input may be a JSON string (e.g. from a Redis GET) or an already-parsed object (e.g. a JSONB column from Postgres). Other shapes pass through untouched in the key fields — callers are expected to have validated shape.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
|
|
|