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§
Sourceasync fn run(&self, args: RunArgs) -> Result<()>
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.
Sourceasync fn ps(&self, args: PsArgs) -> Result<()>
async fn ps(&self, args: PsArgs) -> Result<()>
lev ps - resolves the control-socket path and queries the daemon.
Sourceasync fn msg(&self, args: MsgArgs) -> Result<()>
async fn msg(&self, args: MsgArgs) -> Result<()>
lev msg - resolves the control-socket path and sends a message.
Sourceasync fn cancel(&self, args: CancelArgs) -> Result<()>
async fn cancel(&self, args: CancelArgs) -> Result<()>
lev cancel - resolves the control-socket path and cancels a run.
Sourceasync fn pause(&self, args: PauseArgs) -> Result<()>
async fn pause(&self, args: PauseArgs) -> Result<()>
lev pause - resolves the control-socket path and pauses a run.
Sourceasync fn resume(&self, args: ResumeArgs) -> Result<()>
async fn resume(&self, args: ResumeArgs) -> Result<()>
lev resume - resolves the control-socket path and resumes a run.
Sourceasync fn respond(&self, args: RespondArgs) -> Result<()>
async fn respond(&self, args: RespondArgs) -> Result<()>
lev respond - resolves the control-socket path and answers/lists interactions.
Sourceasync fn doctor(&self, args: DoctorArgs) -> Result<()>
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.
Sourceasync fn setup(&self, args: SetupArgs) -> Result<()>
async fn setup(&self, args: SetupArgs) -> Result<()>
lev setup - interactive (blocking stdin) or --non-interactive.
Sourceasync fn dashboard(&self, args: DashboardArgs) -> Result<()>
async fn dashboard(&self, args: DashboardArgs) -> Result<()>
lev dash - takes over the real terminal and blocks on real keyboard input.
Sourceasync fn serve(&self, args: ServeArgs) -> Result<()>
async fn serve(&self, args: ServeArgs) -> Result<()>
lev serve - binds a real port and serves indefinitely.
Sourceasync fn agent_client(&self, args: AgentClientArgs) -> Result<()>
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.
Sourceasync fn daemon(&self, args: DaemonArgs) -> Result<()>
async fn daemon(&self, args: DaemonArgs) -> Result<()>
lev daemon - binds the control socket and serves the shared world.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".