Skip to content

SessionClosedParams

session/closed params: a loaded session was unloaded from this host, broadcast to every initialized connection. After it, the session is notLoaded; the log remains on disk and session/resume reloads it. A crash emits nothing — only the two orderly unload paths do, and both write the durable SessionEnd record first.

  • reason
  • sessionId
  • viewCursor
Source

schema/msp/experimental/msp.schema.json#/types/SessionClosedParams

{
"description": "`session/closed` params: a loaded\nsession was unloaded from this host, broadcast to every initialized\nconnection. After it, the session is `notLoaded`; the log remains on disk\nand `session/resume` reloads it. A crash emits nothing — only the two\norderly unload paths do, and both write the durable `SessionEnd` record\nfirst.",
"properties": {
"reason": {
"$ref": "#/$defs/SessionClosedReason",
"description": "Which orderly unload path fired."
},
"sessionId": {
"description": "The unloaded session.",
"type": "string"
},
"viewCursor": {
"description": "The final view head; a client that stores it can later\n`session/resume {cursor}` and receive exactly the (empty) suffix. An\n**opaque** view cursor: clients relay it, never parse it.\n\n**Required-nullable**: the producers always write the member and\nwrite `null` when the final fold failed at unload — the host defines no cursor\nvalues of its own and never invents one, and the subscriber still\nlearns the session closed.",
"type": [
"string",
"null"
]
}
},
"required": [
"reason",
"sessionId",
"viewCursor"
],
"type": "object"
}