Skip to main content

RiskyExecutors

Trait RiskyExecutors 

Source
pub trait RiskyExecutors {
Show 16 methods // Required methods fn run(&self, args: RunArgs) -> impl Future<Output = Result<()>>; fn ps(&self, args: PsArgs) -> impl Future<Output = Result<()>>; fn msg(&self, args: MsgArgs) -> impl Future<Output = Result<()>>; fn cancel(&self, args: CancelArgs) -> impl Future<Output = Result<()>>; fn pause(&self, args: PauseArgs) -> impl Future<Output = Result<()>>; fn resume(&self, args: ResumeArgs) -> impl Future<Output = Result<()>>; fn respond(&self, args: RespondArgs) -> impl Future<Output = Result<()>>; fn doctor(&self, args: DoctorArgs) -> impl Future<Output = Result<()>>; fn setup(&self, args: SetupArgs) -> impl Future<Output = Result<()>>; fn dashboard(&self, args: DashboardArgs) -> impl Future<Output = Result<()>>; fn serve(&self, args: ServeArgs) -> impl Future<Output = Result<()>>; fn agent_client( &self, args: AgentClientArgs, ) -> impl Future<Output = Result<()>>; fn daemon(&self, args: DaemonArgs) -> impl Future<Output = Result<()>>; fn mcp(&self, args: McpArgs) -> impl Future<Output = Result<()>>; fn auth(&self, args: AuthArgs) -> impl Future<Output = Result<()>>; fn update(&self, args: UpdateArgs) -> impl Future<Output = 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

fn run(&self, args: RunArgs) -> impl Future<Output = 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

fn ps(&self, args: PsArgs) -> impl Future<Output = Result<()>>

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

Source

fn msg(&self, args: MsgArgs) -> impl Future<Output = Result<()>>

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

Source

fn cancel(&self, args: CancelArgs) -> impl Future<Output = Result<()>>

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

Source

fn pause(&self, args: PauseArgs) -> impl Future<Output = Result<()>>

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

Source

fn resume(&self, args: ResumeArgs) -> impl Future<Output = Result<()>>

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

Source

fn respond(&self, args: RespondArgs) -> impl Future<Output = Result<()>>

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

Source

fn doctor(&self, args: DoctorArgs) -> impl Future<Output = Result<()>>

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

Source

fn setup(&self, args: SetupArgs) -> impl Future<Output = Result<()>>

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

Source

fn dashboard(&self, args: DashboardArgs) -> impl Future<Output = Result<()>>

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

Source

fn serve(&self, args: ServeArgs) -> impl Future<Output = Result<()>>

lev serve - binds a real port and serves indefinitely.

Source

fn agent_client( &self, args: AgentClientArgs, ) -> impl Future<Output = Result<()>>

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

Source

fn daemon(&self, args: DaemonArgs) -> impl Future<Output = Result<()>>

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

Source

fn mcp(&self, args: McpArgs) -> impl Future<Output = Result<()>>

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

Source

fn auth(&self, args: AuthArgs) -> impl Future<Output = Result<()>>

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

Source

fn update(&self, args: UpdateArgs) -> impl Future<Output = Result<()>>

lev update - resolves the real executable, shells out to a package manager, blocks on stdin for each confirmation, and rewrites the config.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§