Codex.AppServer (Codex SDK v0.3.0)
View SourceApp-server transport for stateful, bidirectional communication with Codex.
Summary
Types
@type connect_opts() :: [ init_timeout_ms: pos_integer(), client_name: String.t(), client_title: String.t(), client_version: String.t() ]
@type connection() :: pid()
Functions
@spec alive?(connection()) :: boolean()
@spec command_exec(connection(), [String.t()], keyword()) :: {:ok, map()} | {:error, term()}
@spec config_batch_write(connection(), [map()], keyword()) :: {:ok, map()} | {:error, term()}
@spec config_read( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec connect(Codex.Options.t(), connect_opts()) :: {:ok, connection()} | {:error, term()}
@spec disconnect(connection()) :: :ok
@spec feedback_upload( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec model_list( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec respond(connection(), String.t() | integer(), map()) :: :ok | {:error, term()}
@spec skills_list( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec subscribe( connection(), keyword() ) :: :ok | {:error, term()}
@spec thread_archive(connection(), String.t()) :: :ok | {:error, term()}
@spec thread_compact(connection(), String.t()) :: :ok | {:error, term()}
@spec thread_list( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec thread_start(connection(), map() | keyword()) :: {:ok, map()} | {:error, term()}
@spec turn_interrupt(connection(), String.t(), String.t()) :: :ok | {:error, term()}
@spec unsubscribe(connection()) :: :ok