Raxol. AgentClientProtocol. Session. Turn
(Raxol Agent Client Protocol v0.1.0)
Copy Markdown
View Source
Ephemeral per-turn state, held by a Raxol.AgentClientProtocol.Session only
while a session/prompt turn is in flight. outcome is written once by the
root leg; the cancel leg overwrites it.
monitors is the turn's task group: ref => pid for every live task
(async_nolink monitor ref keyed to its pid). It is a map rather than a set of
refs because the 30s backstop must Process.exit(pid, :kill) each remaining
member — the pids are load-bearing. map_size/1 is the drain gate.
Summary
Types
@type outcome() :: {:stop, Raxol.AgentClientProtocol.Schema.AgentTypes.StopReason.t()} | {:error, Raxol.AgentClientProtocol.Error.t()}
@type t() :: %Raxol.AgentClientProtocol.Session.Turn{ backstop_timer: reference() | nil, monitors: %{required(reference()) => pid()}, non_empty_prompt?: boolean(), outcome: outcome() | nil, pending_perms: %{required(reference()) => %{from: GenServer.from()}}, prompt_seq: non_neg_integer(), reply_ref: reference(), respond?: boolean(), root_pid: pid(), root_ref: reference(), turn_ref: reference(), updates_emitted?: boolean() }