CodexEx.AppServer.ThreadSnapshot (codex_ex v0.1.0)

Copy Markdown View Source

Stable typed snapshot of an app-server thread.

Summary

Types

result()

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

t()

@type t() :: %CodexEx.AppServer.ThreadSnapshot{
  agent_nickname: binary() | nil,
  agent_role: binary() | nil,
  cli_version: binary(),
  created_at: CodexEx.AppServer.Types.timestamp(),
  cwd: binary(),
  ephemeral: boolean(),
  git_info: CodexEx.AppServer.ThreadSnapshot.GitInfo.t() | nil,
  history_mode: binary(),
  id: binary(),
  model_provider: binary(),
  name: binary() | nil,
  path: binary() | nil,
  preview: binary(),
  source: binary(),
  status: binary(),
  thread_source: binary() | nil,
  turns: [CodexEx.AppServer.Turn.t()],
  updated_at: CodexEx.AppServer.Types.timestamp()
}

Functions

from_protocol(thread)

@spec from_protocol(map()) ::
  {:ok,
   %CodexEx.AppServer.ThreadSnapshot{
     agent_nickname: term(),
     agent_role: term(),
     cli_version: term(),
     created_at: term(),
     cwd: term(),
     ephemeral: term(),
     git_info: term(),
     history_mode: term(),
     id: term(),
     model_provider: term(),
     name: term(),
     path: term(),
     preview: term(),
     source: term(),
     status: term(),
     thread_source: term(),
     turns: term(),
     updated_at: term()
   }}
  | {:error, {:invalid_thread_snapshot, term()}}

subagent?(thread_snapshot)

@spec subagent?(t()) :: boolean()