Bounded session records for session-bound MCP revisions, with principal binding and expiry.
Durable adapters store the versioned JSON-compatible value returned by
to_record/1. Live stream references are intentionally excluded and must be
reopened after a server or node restart. Unknown record fields are ignored;
malformed or oversized current-version records fail closed. Higher integer
format versions remain opaque and are preserved by the bundled stores.
Principal and tenant bindings may contain existing atoms because they are
encoded as bounded Erlang terms. Safe restoration never creates atoms from
persisted data, so an atom-bearing binding can be used only on nodes where
those atoms already exist. A node that cannot safely decode such a binding
reports :binding_unavailable; durable adapters must preserve the record and
callers should treat it as unavailable until the required atoms are loaded.
Summary
Functions
Restores a durable session record with empty live-stream state.
Returns the largest session timeout accepted by all session stores.
Serializes persistent session state without live processes or callbacks.
Checks the common positive, signed-BIGINT-safe session timeout range.
Types
@type t() :: %AttestoMCP.Server.Session{ absolute_timeout: term(), client_capabilities: term(), created_at: term(), id: term(), idle_timeout: term(), initialized: term(), last_seen: term(), logging_level: term(), principal: term(), resource_subscriptions: term(), streams: term(), tenant: term(), version: term() }
Functions
Restores a durable session record with empty live-stream state.
@spec max_timeout_ms() :: pos_integer()
Returns the largest session timeout accepted by all session stores.
Serializes persistent session state without live processes or callbacks.
Checks the common positive, signed-BIGINT-safe session timeout range.