ReqManagedAgents.SessionResult (ReqManagedAgents v0.17.0)

Copy Markdown View Source

The accumulated outcome of a whole run — what Session.run/2 and message/2 deliver.

transcript is the provider's client-held history when the provider exports transcript/1 (potentially large); nil for server-held providers.

in_flight: :unknown means additional provider work may be unmeasured; :none marks a completed local boundary. usage.complete? describes the represented contributions, so neither flag alone certifies total billed cost.

outcomes is the provider's native grading evidence projected from events ([] when the provider has none). It resets with Session.message/2 and accumulates across Session.send_event/2 chained definitions, in first-observation order, so hd/1 is not the current outcome: select by outcome_id. A grade is not a completion signal; read terminal for that.

Summary

Types

t()

@type t() :: %ReqManagedAgents.SessionResult{
  custom_tool_uses: [ReqManagedAgents.ToolUse.t()],
  events: [map()],
  in_flight: :none | :unknown,
  outcomes: [ReqManagedAgents.OutcomeResult.t()],
  server_tool_uses: [ReqManagedAgents.ToolUse.t()],
  session_id: String.t() | nil,
  stop_reason: String.t() | map() | atom() | nil,
  terminal: ReqManagedAgents.Provider.terminal(),
  text: String.t(),
  transcript: [map()] | nil,
  turns: non_neg_integer(),
  usage: ReqManagedAgents.Usage.t()
}