Common CLI session runtime above the raw transport layer.
Summary
Functions
Returns a specification to start this module under a supervisor.
Stops the session and closes the transport.
Returns stable mailbox-delivery metadata for the current session.
Closes stdin for EOF-driven CLIs.
Extracts a normalized session event from a legacy mailbox message.
Extracts a normalized session event for a tagged subscriber reference.
Returns session runtime and transport information.
Sends an interrupt request to the underlying transport.
Sends provider input through the underlying transport.
Alias for send/2 that preserves the runtime-kit naming.
Starts a linked session process.
Starts a linked session and returns the pid together with its initial info snapshot.
Starts a session and returns the pid together with its initial info snapshot.
Subscribes a process in legacy mode.
Subscribes a process with an explicit tag.
Removes a subscriber.
Types
@type t() :: %CliSubprocessCore.Session{ invocation: CliSubprocessCore.Command.t(), options: CliSubprocessCore.Session.Options.t(), parser_state: term(), profile: module(), provider: atom(), runtime: CliSubprocessCore.Runtime.t(), subscribers: %{optional(pid()) => subscriber_info()}, transport_pid: pid(), transport_ref: reference() }
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(pid()) :: :ok
Stops the session and closes the transport.
@spec delivery_info(pid()) :: CliSubprocessCore.Session.Delivery.t() | nil
Returns stable mailbox-delivery metadata for the current session.
Closes stdin for EOF-driven CLIs.
@spec extract_event(term()) :: {:ok, CliSubprocessCore.Event.t()} | :error
Extracts a normalized session event from a legacy mailbox message.
Tagged subscribers should use extract_event/2 so their code does not
depend on a specific outer event atom.
@spec extract_event(term(), reference()) :: {:ok, CliSubprocessCore.Event.t()} | :error
Extracts a normalized session event for a tagged subscriber reference.
This is the stable core-owned way for adapters to consume session delivery without hard-coding the configured outer event atom.
Returns session runtime and transport information.
Sends an interrupt request to the underlying transport.
Sends provider input through the underlying transport.
Alias for send/2 that preserves the runtime-kit naming.
@spec start_link(keyword()) :: GenServer.on_start()
Starts a linked session process.
Starts a linked session and returns the pid together with its initial info snapshot.
Starts a session and returns the pid together with its initial info snapshot.
Subscribes a process in legacy mode.
Subscribes a process with an explicit tag.
Removes a subscriber.