Generic long-lived CLI IO channel above the raw session layer.
Channels own the subprocess session lifecycle and expose mailbox delivery for framed stdout, stderr, exit, and transport-error events without tying callers to raw transport refs.
Summary
Functions
Returns a specification to start this module under a supervisor.
Stops the channel and closes the underlying raw session.
Alias for end_input/1.
Returns stable mailbox-delivery metadata for tagged subscribers.
Closes stdin for EOF-driven sessions.
Extracts a normalized channel event from a legacy mailbox message.
Extracts a normalized channel event for a tagged subscriber reference.
Forces the channel down immediately.
Returns channel runtime information.
Interrupts the underlying session.
Sends input bytes to the underlying session.
Alias for send/2.
Starts an unlinked channel from normalized options.
Starts an unlinked channel from an invocation.
Starts an unlinked channel from an executable plus argv.
Starts an unlinked channel and returns its initial info snapshot.
Starts a linked channel from normalized options.
Starts a linked channel from an invocation.
Starts a linked channel from an executable plus argv.
Starts a linked channel and returns its initial info snapshot.
Returns the channel status.
Returns the latest stderr tail retained by the transport.
Alias for close/1.
Subscribes a process in legacy mode.
Subscribes a process with an explicit tag.
Removes a subscriber.
Types
@type extracted_event() :: {:message, binary()} | {:data, binary()} | {:stderr, binary()} | {:exit, ExternalRuntimeTransport.ProcessExit.t()} | {:error, term()}
@type info_t() :: %{ delivery: CliSubprocessCore.Channel.Delivery.t(), invocation: CliSubprocessCore.Command.t(), subscribers: non_neg_integer(), raw_session: CliSubprocessCore.RawSession.info_t(), transport: term() }
@type t() :: pid()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Stops the channel and closes the underlying raw session.
Alias for end_input/1.
@spec delivery_info(pid()) :: CliSubprocessCore.Channel.Delivery.t() | nil
Returns stable mailbox-delivery metadata for tagged subscribers.
Closes stdin for EOF-driven sessions.
@spec extract_event(term()) :: {:ok, extracted_event()} | :error
Extracts a normalized channel event from a legacy mailbox message.
@spec extract_event(term(), reference()) :: {:ok, extracted_event()} | :error
Extracts a normalized channel event for a tagged subscriber reference.
Forces the channel down immediately.
Returns channel runtime information.
Interrupts the underlying session.
Sends input bytes to the underlying session.
Alias for send/2.
Starts an unlinked channel from normalized options.
@spec start( CliSubprocessCore.Command.t(), keyword() ) :: {:ok, t()} | {:error, term()}
Starts an unlinked channel from an invocation.
Starts an unlinked channel from an executable plus argv.
Starts an unlinked channel and returns its initial info snapshot.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a linked channel from normalized options.
@spec start_link( CliSubprocessCore.Command.t(), keyword() ) :: GenServer.on_start()
Starts a linked channel from an invocation.
@spec start_link(String.t(), [String.t()], keyword()) :: GenServer.on_start()
Starts a linked channel from an executable plus argv.
Starts a linked channel and returns its initial info snapshot.
@spec status(pid()) :: :connected | :disconnected | :error
Returns the channel status.
Returns the latest stderr tail retained by the transport.
@spec stop(pid()) :: :ok
Alias for close/1.
Subscribes a process in legacy mode.
Subscribes a process with an explicit tag.
Removes a subscriber.