Raxol.AgentClientProtocol.Ext.Schema.SteerResponse (Raxol Agent Client Protocol v0.1.0)

Copy Markdown View Source

_raxol/session.steer response: the synchronous, honest CAS outcome — the full vocabulary a Surface banner renders.

steer/2 is deliberately a SYNCHRONOUS typed decision, not fire-and-forget: a stale-turn (or reuse, or no-live-turn) rejection is NON-journaled (zero model effect), so no event a surface could observe ever carries the outcome — only a direct reply can honestly distinguish "accepted" from "silently dropped".

The wire "outcome" discriminator is one of:

  • "accepted" — landed in the running turn; carries the accept ref (turnId/offset/clientMsgId).
  • "duplicate" — the same clientMsgId was already accepted; ref references the ORIGINAL accept (mobile-retry idempotency).
  • "stale" — the CAS lost (turn ended, or another steer won); carries expectedTurnId/actualTurnId. Nothing journaled.
  • "no_live_turn" — no turn is currently running.
  • "client_msg_id_reuse" — the same idempotency key arrived with different content (a client bug/attack, never a retry).
  • "no_steer_channel" — the session has no steer adapter wired (the honest refusal).

Summary

Functions

Wrap a CAS result (as returned by a SteerAdapter.resolve/2) for the wire.

The wrapped CAS result (the honest outcome vocabulary).

Types

t()

@type t() :: %Raxol.AgentClientProtocol.Ext.Schema.SteerResponse{
  result: Raxol.AgentClientProtocol.Session.SteerAdapter.result()
}

Functions

from_json(map)

@spec from_json(map()) :: {:ok, t()} | {:error, term()}

new(result)

Wrap a CAS result (as returned by a SteerAdapter.resolve/2) for the wire.

result(steer_response)

The wrapped CAS result (the honest outcome vocabulary).

to_json(steer_response)

@spec to_json(t()) :: map()