Spectre.Turn.Handler.Request (Spectre v0.3.0)

Copy Markdown View Source

Loaded request presented to an optional Spectre.Turn.Handler.

This struct belongs to the pre-route handler boundary; it is not a transport envelope and it is not the result of a complete Spectre turn. The canonical local host boundary remains Spectre.turn/3, which returns a Spectre.Turn.

A request is created only after Spectre has normalized input and loaded the authoritative state and recalled memory. Remote sender/recipient addresses, correlation, delivery, and task lifecycle belong to the protocol adapter (for example SpectrePulse). Stable protocol identifiers can be mapped into conversation_id, turn_id, trace_id, or Spectre.Input.meta.

Summary

Types

t()

@type t() :: %Spectre.Turn.Handler.Request{
  agent: module(),
  assigns: map(),
  conversation_id: term(),
  input: Spectre.Input.t(),
  memory: term(),
  state: Spectre.State.t(),
  trace_id: term(),
  turn_id: term()
}