Bounded host-command boundary for local Tool execution (ADR 0027).
This process is deliberately smaller than a product CommandBroker: it only
accounts for external process capacity, bounded queueing, and read-only runtime
snapshots. Tool lifecycle, permissions, and canonical tool_call/tool_result
Events remain owned by Pixir.Tools.Executor.
Summary
Functions
Application child spec.
Normalize user/app config into command-boundary limits.
Return live spawned-process presence and milliseconds remaining in its own cap.
Whether a Session has a live spawned process still within its own execution cap.
Register the spawned process backing an active host-command lease.
Return a read-only snapshot of host-command pressure.
Start a command boundary. Omitting :name starts the application singleton.
Acquire a host-command slot, run fun, and release the slot in all normal
return/raise/throw/exit paths.
Types
@type lease() :: %{id: reference(), host_command: map(), boundary: GenServer.server()}
@type limits() :: %{ max_concurrent: pos_integer(), queue_limit: non_neg_integer(), queue_timeout_ms: non_neg_integer() }
@type presenter_liveness() :: :dead | {:live, non_neg_integer()}
Functions
Application child spec.
Normalize user/app config into command-boundary limits.
@spec presenter_liveness( String.t(), keyword() ) :: presenter_liveness()
Return live spawned-process presence and milliseconds remaining in its own cap.
Whether a Session has a live spawned process still within its own execution cap.
@spec register_process( lease(), String.t(), port(), non_neg_integer(), non_neg_integer() ) :: :ok
Register the spawned process backing an active host-command lease.
Return a read-only snapshot of host-command pressure.
Start a command boundary. Omitting :name starts the application singleton.
@spec with_slot(String.t(), keyword(), (lease() -> term()) | (-> term())) :: term() | {:error, map()}
Acquire a host-command slot, run fun, and release the slot in all normal
return/raise/throw/exit paths.