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 key overwrites previous content and refreshes its TTL.
  • If ttl <= 0, server uses default TTL (72 hours).
  • Cache has two capacity limits per session: maximum 64 entries and maximum 16384 bytes of total values.
  • If memory limit is exceeded, server returns StoreOutOfMemory.
  • If entries limit is exceeded, server returns StoreOutOfEntries.

Set-session-value statuses

StatusConstantReturned when
1OkValue was stored successfully.
701StoreOutOfMemorySession value cache memory limit is exceeded for this write.
702StoreOutOfEntriesSession 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 codeErrorWhen it happens
4200connection is not initializedRequest was sent before successful Initialize.
4201rate limit hitGlobal per-session packet rate limit was exceeded.
4302invalid request bodyPacket body does not match the required schema for this operation.
4304received unsupported dataClient sent unsupported frame type (request packets must be text JSON).

On this page