Low-level shell command execution with timeout, output capture, and cancellation.
This module provides direct command execution without session/run lifecycle overhead. For managed execution with events and policies, use ShellAdapter.
Summary
Types
@type exec_opts() :: [ cwd: String.t(), timeout_ms: pos_integer(), max_output_bytes: pos_integer(), env: [{String.t(), String.t()}], shell: String.t(), on_output: (stream_chunk() -> any()) ]
Functions
@spec run(String.t(), [String.t()], exec_opts()) :: {:ok, exec_result()} | {:error, AgentSessionManager.Core.Error.t()}
@spec run_streaming(String.t(), [String.t()], exec_opts()) :: Enumerable.t()