CodexEx.AppServer.ThreadGoal (codex_ex v0.1.0)

Copy Markdown View Source

Stable app-server thread goal value.

Summary

Types

result()

@type result() :: {:ok, t()} | {:error, {:invalid_thread_goal, term()}}

status()

@type status() :: :active | :paused | :budget_limited | :complete

t()

@type t() :: %CodexEx.AppServer.ThreadGoal{
  created_at: CodexEx.AppServer.Types.timestamp(),
  objective: binary(),
  status: status(),
  thread_id: binary(),
  time_used_seconds: non_neg_integer(),
  token_budget: non_neg_integer() | nil,
  tokens_used: non_neg_integer(),
  updated_at: CodexEx.AppServer.Types.timestamp()
}

Functions

from_protocol(goal)

@spec from_protocol(map() | struct()) :: result()