Raxol.AgentClientProtocol.Connection.TurnState (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

Per-session open-turn state, populated only on a client-role Connection.

Opened by Connection's outbound submit path at a successful session/prompt async-owner submission (reply_to = {:owner, ...}); closed by whichever of response / timeout / cancel / transport-down resolves the request first. token is minted fresh (make_ref/0) at open and never derived from any peer-supplied id: a peer that replays or reuses a session/request id cannot alias a stale turn's straggler into a new turn, because the tokens differ by construction.

Summary

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Connection.TurnState{
  next_ordinal: non_neg_integer(),
  out_id: term(),
  owner: pid(),
  tag: term(),
  token: reference()
}