Shares long-lived Codex app-server clients across callers with the same launcher config.
The stdio transport spawns an OS codex app-server process, so reusing clients by
launcher config prevents one subprocess per session page or sync call.
Summary
Functions
Returns a specification to start this module under a supervisor.
Publishes already-active threads through the shared local observer.
Types
@type client_key() :: {:client, transport :: term(), runner_id :: term(), url :: term(), executable :: term(), args :: term(), workspace_id :: term(), workspace_root :: term(), initialize_params :: term(), strict_protocol :: boolean(), proxy_only :: boolean(), broadcasts_thread_activity :: boolean()}
@type get_client_result() :: {:ok, CodexEx.AppServer.Client.t()} | {:error, term()}
@type state() :: %{ clients: %{required(client_key()) => pid()}, refs: %{required(reference()) => client_key()}, thread_activity_observer_key: client_key() | nil, thread_activity_retry_ref: reference() | nil }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec get_client(keyword()) :: get_client_result()
@spec reconcile_thread_activity() :: :ok
Publishes already-active threads through the shared local observer.
@spec start_link(keyword()) :: GenServer.on_start()