Skip to main content

Module session

Module session 

Source
Expand description

Re-export of the session model, which now lives in macp-core. Kept as macp_runtime::session for backward compatibility.

Structs§

Session
Session model. Fields are public for reads, but the struct is #[non_exhaustive]: construct via Session::builder. This lets the model gain fields without breaking every constructor in downstream crates (pre-1.0 freeze requirement).
SessionBuilder
Builder for Session — the only construction path outside macp-core (the struct is #[non_exhaustive]).

Enums§

SessionState

Constants§

CURRENT_SEMANTICS_REV
Current session-semantics revision. Recorded at SessionStart (on the session and its log entry) and consulted wherever acceptance-time behavior changed across releases, so legacy histories replay under the semantics they were accepted with (RFC-MACP-0003 §1).
MAX_SUSPEND_MS
Default cap on the cumulative time a session may spend Suspended before it is force-expired (RFC-MACP-0001 §7.5). Bounds indefinite human-in-the-loop holds. Sessions may bind their own cap via SessionStartPayload.max_suspend_ms (0 selects this default); the resolved cap is recorded at SessionStart and used by replay (RFC-MACP-0003 §2) — see Session::effective_max_suspend_ms.
MAX_TTL_MS

Functions§

extract_ttl_ms
Extract and validate TTL from a parsed SessionStartPayload.
parse_session_start_payload
Parse a protobuf-encoded SessionStartPayload from raw bytes.
requires_strict_session_start
validate_canonical_session_start_payload
Validate the complete canonical SessionStart binding contract.
validate_session_id_for_acceptance
Validate that a session ID meets the acceptance policy.
validate_strict_session_start_payload
Enforce the strict SessionStart binding contract for standards-track and qualifying extension modes.