parseSessionEnvelope
parseSessionEnvelope(
input):KawasekitSessionEnvelope
Defined in: src/session/envelope.ts:173
Parses a JSON string back into a KawasekitSessionEnvelope, asserting shape and version invariants.
Parameters
input
string
Returns
Throws
On malformed JSON or structural errors.
Throws
On kawasekitVersion mismatch.
Example
import { parseSessionEnvelope } from "kawasekit";
const envelope = parseSessionEnvelope(fs.readFileSync("agent.session", "utf8"));