ASM.Session.State (ASM v0.9.2)

Copy Markdown View Source

Aggregate state owned by ASM.Session.Server.

Summary

Types

queued_run()

@type queued_run() :: %{run_id: String.t(), prompt: String.t(), opts: keyword()}

t()

@type t() :: %ASM.Session.State{
  active_runs: %{optional(String.t()) => pid()},
  checkpoint: map() | nil,
  cost: %{
    input_tokens: non_neg_integer(),
    output_tokens: non_neg_integer(),
    cost_usd: float()
  },
  options: keyword(),
  pending_approval_index: %{optional(String.t()) => pid()},
  provider: ASM.Provider.t(),
  provider_profile: ASM.Provider.Profile.t(),
  run_monitors: %{optional(pid()) => reference()},
  run_queue: term(),
  session_id: String.t(),
  status: :ready | :stopped
}

Functions

new(session_id, provider, options \\ [])

@spec new(String.t(), ASM.Provider.t(), keyword()) :: t()