Skip to main content

RiskyExecutors

Trait RiskyExecutors 

Source
pub trait RiskyExecutors {
Show 15 methods // Required methods async fn run(&self, args: RunArgs) -> Result<()>; async fn ps(&self, args: PsArgs) -> Result<()>; async fn msg(&self, args: MsgArgs) -> Result<()>; async fn cancel(&self, args: CancelArgs) -> Result<()>; async fn pause(&self, args: PauseArgs) -> Result<()>; async fn resume(&self, args: ResumeArgs) -> Result<()>; async fn respond(&self, args: RespondArgs) -> Result<()>; async fn doctor(&self, args: DoctorArgs) -> Result<()>; async fn setup(&self, args: SetupArgs) -> Result<()>; async fn dashboard(&self, args: DashboardArgs) -> Result<()>; async fn serve(&self, args: ServeArgs) -> Result<()>; async fn agent_client(&self, args: AgentClientArgs) -> Result<()>; async fn daemon(&self, args: DaemonArgs) -> Result<()>; async fn mcp(&self, args: McpArgs) -> Result<()>; async fn auth(&self, args: AuthArgs) -> Result<()>;
}
Expand description

The subset of commands whose real execution performs I/O that a unit test must never trigger. dispatch() routes these through this trait so its routing logic stays unit-testable with a mock; the real implementations are supplied by the binary (main.rs’s RealExecutors).

async fn in a trait is fine here: dispatch takes &impl RiskyExecutors (static dispatch, no dyn), so no boxing or Send bound is required.

Required Methods§

Source

async fn run(&self, args: RunArgs) -> Result<()>

lev run - auto-starts the daemon (real process spawn) if needed and spawns the agent into the shared world over the control socket.

Source

async fn ps(&self, args: PsArgs) -> Result<()>

lev ps - resolves the control-socket path and queries the daemon.

Source

async fn msg(&self, args: MsgArgs) -> Result<()>

lev msg - resolves the control-socket path and sends a message.

Source

async fn cancel(&self, args: CancelArgs) -> Result<()>

lev cancel - resolves the control-socket path and cancels a run.

Source

async fn pause(&self, args: PauseArgs) -> Result<()>

lev pause - resolves the control-socket path and pauses a run.

Source

async fn resume(&self, args: ResumeArgs) -> Result<()>

lev resume - resolves the control-socket path and resumes a run.

Source

async fn respond(&self, args: RespondArgs) -> Result<()>

lev respond - resolves the control-socket path and answers/lists interactions.

Source

async fn doctor(&self, args: DoctorArgs) -> Result<()>

lev doctor - makes real billed inference calls, and (unless --no-daemon) auto-starts the daemon and spawns a throwaway run.

Source

async fn setup(&self, args: SetupArgs) -> Result<()>

lev setup - interactive (blocking stdin) or --non-interactive.

Source

async fn dashboard(&self, args: DashboardArgs) -> Result<()>

lev dash - takes over the real terminal and blocks on real keyboard input.

Source

async fn serve(&self, args: ServeArgs) -> Result<()>

lev serve - binds a real port and serves indefinitely.

Source

async fn agent_client(&self, args: AgentClientArgs) -> Result<()>

lev agent-client - takes over real stdin/stdout to speak the Agent Client Protocol against the shared-world daemon.

Source

async fn daemon(&self, args: DaemonArgs) -> Result<()>

lev daemon - binds the control socket and serves the shared world.

Source

async fn mcp(&self, args: McpArgs) -> Result<()>

lev mcp - rewrites config, opens a browser for OAuth, touches the token store.

Source

async fn auth(&self, args: AuthArgs) -> Result<()>

lev auth - reads the config file and may write the OS credential store.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§