App-server transport for stateful, bidirectional communication with Codex.
Summary
Functions
Lists available apps/connectors.
Lists collaboration mode presets (experimental).
Writes stdin to a running command execution session.
Reads config requirements enforced by the server (if any).
Writes a skills config entry enabling or disabling a skill by path.
Returns an unsupported error. The thread/compact API was removed in upstream
codex app-server. Context compaction now happens automatically server-side.
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 apps_list( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
Lists available apps/connectors.
@spec collaboration_mode_list(connection()) :: {:ok, map()} | {:error, term()}
Lists collaboration mode presets (experimental).
@spec command_exec(connection(), [String.t()], keyword()) :: {:ok, map()} | {:error, term()}
@spec command_write_stdin(connection(), String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, term()}
Writes stdin to a running command execution session.
@spec config_batch_write(connection(), [map()], keyword()) :: {:ok, map()} | {:error, term()}
@spec config_read( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec config_requirements(connection()) :: {:ok, map()} | {:error, term()}
Reads config requirements enforced by the server (if any).
@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 fuzzy_file_search(connection(), String.t(), 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_config_write(connection(), String.t(), boolean()) :: {:ok, map()} | {:error, term()}
Writes a skills config entry enabling or disabling a skill by path.
@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()) :: {:error, {:unsupported, String.t()}}
Returns an unsupported error. The thread/compact API was removed in upstream
codex app-server. Context compaction now happens automatically server-side.
Deprecation Notice
This function is retained for API compatibility but will always return an error. Remove calls to this function from your code.
@spec thread_list( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec thread_loaded_list( connection(), keyword() ) :: {:ok, map()} | {:error, term()}
@spec thread_read(connection(), String.t(), keyword()) :: {:ok, map()} | {:error, term()}
@spec thread_rollback(connection(), String.t(), pos_integer()) :: {: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