Prompt Runner bridge onto the current ASM session runtime.
This module starts provider sessions through ASM, projects wrapped
CliSubprocessCore events into Prompt Runner's canonical event vocabulary,
and preserves provider-native recovery handles so the runner can attempt an
exact session resume instead of replaying the full prompt from scratch.
Summary
Functions
Whether this lane can be handed more input without interrupting its turn.
Resumes an existing provider-native conversation with a continuation prompt.
Starts a streaming prompt session and returns a lazy event stream.
Says something to a session that is already running.
Types
@type close_fun() :: (-> :ok)
@type llm_config() :: map()
@type provider() :: PromptRunner.LLM.provider()
@type stream() :: Enumerable.t()
@type stream_event() :: map()
Functions
@spec accepts_input?(llm_config()) :: boolean()
Whether this lane can be handed more input without interrupting its turn.
Reads the provider profile's own transport fact rather than a list of provider names, so a profile that changes its mind changes this with it.
@spec resume_stream(llm_config(), map(), String.t()) :: {:ok, stream(), close_fun(), map()} | {:error, term()}
Resumes an existing provider-native conversation with a continuation prompt.
@spec start_stream(llm_config(), String.t()) :: {:ok, stream(), close_fun(), map()} | {:error, term()}
Starts a streaming prompt session and returns a lazy event stream.
@spec steer(llm_config(), map(), String.t()) :: {:ok, :delivered | :interrupted} | {:error, term()}
Says something to a session that is already running.
The provider profile decides the mechanism. Current shipped profiles close stdin at start, so steering interrupts the turn and resumes the same provider thread with the text as the next prompt. A future profile may advertise incremental input, in which case text can be delivered to the live turn.
Returns:
{:ok, :delivered}— the text reached the running turn{:ok, :interrupted}— the turn was interrupted, and the caller has to resume the thread with this text once the stream ends{:error, reason}— nothing was delivered and nothing was interrupted