Packets
Set session value
Stores a key-value pair in temporary storage bound to the current session.
Set session value writes a value to session-scoped storage by key.
This operation is available only after successful Initialize.
This is a session cache
Treat this feature as a volatile in-memory cache attached to the current websocket session.
It is designed for short-lived state (for example flow tokens, temporary flags, intermediate step data), not for persistent storage.
Current server limits for this cache are 64 entries and 16384 bytes of total stored values per session.
Request
Set session value uses packet type = 12.
{
"type": 12,
"id": 13,
"key": "launcher_token",
"value": "abc123",
"ttl": 3600
}Prop
Type
Response
{
"id": 13,
"status": 1
}Prop
Type
Behavior notes
- Request and response are regular text JSON websocket frames.
- Storage is session-scoped; values are not shared across other sessions.
- Cache is volatile: value lifetime is limited by session lifetime and per-key TTL.
- Writing an existing
keyoverwrites previous content and refreshes its TTL. - If
ttl <= 0, server uses default TTL (72 hours). - Cache has two capacity limits per session: maximum
64entries and maximum16384bytes of total values. - If memory limit is exceeded, server returns
StoreOutOfMemory. - If entries limit is exceeded, server returns
StoreOutOfEntries.
Set-session-value statuses
| Status | Constant | Returned when |
|---|---|---|
1 | Ok | Value was stored successfully. |
701 | StoreOutOfMemory | Session value cache memory limit is exceeded for this write. |
702 | StoreOutOfEntries | Session value cache entries limit is exceeded for this write. |
Connection-close cases (before/around this usecase)
Set session value itself returns regular JSON responses, but session can still be closed by protocol/session guards:
| Close code | Error | When it happens |
|---|---|---|
4200 | connection is not initialized | Request was sent before successful Initialize. |
4201 | rate limit hit | Global per-session packet rate limit was exceeded. |
4302 | invalid request body | Packet body does not match the required schema for this operation. |
4304 | received unsupported data | Client sent unsupported frame type (request packets must be text JSON). |