Discovery metadata and bridge helpers for the optional Codex-native ASM extension namespace.
This namespace lives above ASM's normalized kernel.
It does not implement Codex's richer APIs itself. Instead it:
- publishes discovery metadata for the optional Codex-native surface
- derives
Codex.Optionsfrom ASM-style configuration, including normalized execution-surface data for CLI-backed families - derives
Codex.Thread.Optionsfrom ASM-style configuration or session defaults - starts
Codex.AppServerconnections when callers explicitly opt into the SDK-local app-server family
The actual app-server, MCP, realtime, and voice families remain in
codex_sdk.
Summary
Functions
Derives Codex.Options from ASM-style Codex configuration.
Derives Codex.Options from an ASM session plus optional ASM/native
overrides.
Starts Codex.AppServer from ASM-style Codex configuration.
Starts Codex.AppServer from an ASM session plus optional ASM/native
overrides.
Derives Codex.Thread.Options from ASM-style Codex configuration.
Derives Codex.Thread.Options from an ASM session plus optional ASM/native
overrides.
Functions
@spec available?() :: boolean()
@spec codex_options(keyword(), keyword()) :: {:ok, struct()} | {:error, ASM.Error.t()}
Derives Codex.Options from ASM-style Codex configuration.
native_overrides remains the explicit home for Codex-native global SDK
settings such as config overrides, model personality, review model, or
history settings. Execution-surface placement stays on asm_opts.
@spec codex_options_for_session(term(), keyword(), keyword()) :: {:ok, struct()} | {:error, ASM.Error.t()}
Derives Codex.Options from an ASM session plus optional ASM/native
overrides.
@spec connect_app_server(keyword(), keyword(), keyword()) :: {:ok, pid()} | {:error, ASM.Error.t() | term()}
Starts Codex.AppServer from ASM-style Codex configuration.
ASM configuration stays on the first argument. Codex-native global overrides
stay in native_overrides. App-server child launch overrides such as
:experimental_api, :cwd, :process_env, or an explicit
:execution_surface override stay in connect_opts.
@spec connect_app_server_for_session(term(), keyword(), keyword(), keyword()) :: {:ok, pid()} | {:error, ASM.Error.t() | term()}
Starts Codex.AppServer from an ASM session plus optional ASM/native
overrides.
@spec extension() :: ASM.Extensions.ProviderSDK.Extension.t()
@spec native_capabilities() :: [atom()]
@spec native_surface_modules() :: [module()]
@spec sdk_app() :: atom()
@spec sdk_module() :: module()
@spec thread_options(keyword(), keyword()) :: {:ok, struct()} | {:error, ASM.Error.t()}
Derives Codex.Thread.Options from ASM-style Codex configuration.
ASM-derived thread defaults such as working directory, approval timeout, exec
permission mode, and output schema stay on the ASM argument. Richer
Codex-native fields such as personality, collaboration mode, attachments, or
app-server family selection belong in native_overrides.
@spec thread_options_for_session(term(), keyword(), keyword()) :: {:ok, struct()} | {:error, ASM.Error.t()}
Derives Codex.Thread.Options from an ASM session plus optional ASM/native
overrides.