Normalized subprocess invocation data shared by provider profiles.
The module also exposes the shared provider-aware one-shot command lane
through run/1 and run/2.
Summary
Functions
Returns the executable and arguments as an argv list.
Merges environment variables into the invocation.
Builds a normalized invocation struct.
Adds or replaces a single environment variable.
Runs a provider-aware one-shot command through the shared transport-owned non-PTY lane.
Runs a prebuilt normalized invocation through the shared non-PTY command lane.
Projects a CLI-domain invocation onto the generic transport substrate.
Validates the invocation contract expected by the provider profile behaviour.
Types
@type env_key() :: String.t()
@type env_value() :: String.t()
@type run_error() :: CliSubprocessCore.Command.Error.t()
@type run_result() :: CliSubprocessCore.Command.RunResult.t()
@type user() :: String.t() | nil
Functions
Returns the executable and arguments as an argv list.
Merges environment variables into the invocation.
@spec new( String.t() | CliSubprocessCore.CommandSpec.t(), [String.t()] | keyword(), keyword() ) :: t()
Builds a normalized invocation struct.
Adds or replaces a single environment variable.
@spec run(keyword()) :: {:ok, run_result()} | {:error, run_error()}
Runs a provider-aware one-shot command through the shared transport-owned non-PTY lane.
Reserved command-lane options are:
:provider:profile:registry:stdin:timeout:stderr:close_stdin
All remaining options are passed through to the resolved provider profile's
build_invocation/1 callback.
@spec run( t(), keyword() ) :: {:ok, run_result()} | {:error, run_error()}
Runs a prebuilt normalized invocation through the shared non-PTY command lane.
@spec to_transport_command(t()) :: ExternalRuntimeTransport.Command.t()
Projects a CLI-domain invocation onto the generic transport substrate.
@spec validate(t()) :: :ok | {:error, {:invalid_command, term()}} | {:error, {:invalid_args, term()}} | {:error, {:invalid_cwd, term()}} | {:error, {:invalid_env, term()}} | {:error, {:invalid_clear_env, term()}} | {:error, {:invalid_user, term()}}
Validates the invocation contract expected by the provider profile behaviour.