pub trait RiskyExecutors {
Show 15 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<()>>;
}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§
Sourcefn run(&self, args: RunArgs) -> impl Future<Output = Result<()>>
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.
Sourcefn ps(&self, args: PsArgs) -> impl Future<Output = Result<()>>
fn ps(&self, args: PsArgs) -> impl Future<Output = Result<()>>
lev ps - resolves the control-socket path and queries the daemon.
Sourcefn msg(&self, args: MsgArgs) -> impl Future<Output = Result<()>>
fn msg(&self, args: MsgArgs) -> impl Future<Output = Result<()>>
lev msg - resolves the control-socket path and sends a message.
Sourcefn cancel(&self, args: CancelArgs) -> impl Future<Output = Result<()>>
fn cancel(&self, args: CancelArgs) -> impl Future<Output = Result<()>>
lev cancel - resolves the control-socket path and cancels a run.
Sourcefn pause(&self, args: PauseArgs) -> impl Future<Output = Result<()>>
fn pause(&self, args: PauseArgs) -> impl Future<Output = Result<()>>
lev pause - resolves the control-socket path and pauses a run.
Sourcefn resume(&self, args: ResumeArgs) -> impl Future<Output = Result<()>>
fn resume(&self, args: ResumeArgs) -> impl Future<Output = Result<()>>
lev resume - resolves the control-socket path and resumes a run.
Sourcefn respond(&self, args: RespondArgs) -> impl Future<Output = Result<()>>
fn respond(&self, args: RespondArgs) -> impl Future<Output = Result<()>>
lev respond - resolves the control-socket path and answers/lists interactions.
Sourcefn doctor(&self, args: DoctorArgs) -> impl Future<Output = Result<()>>
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.
Sourcefn setup(&self, args: SetupArgs) -> impl Future<Output = Result<()>>
fn setup(&self, args: SetupArgs) -> impl Future<Output = Result<()>>
lev setup - interactive (blocking stdin) or --non-interactive.
Sourcefn dashboard(&self, args: DashboardArgs) -> impl Future<Output = Result<()>>
fn dashboard(&self, args: DashboardArgs) -> impl Future<Output = Result<()>>
lev dash - takes over the real terminal and blocks on real keyboard input.
Sourcefn serve(&self, args: ServeArgs) -> impl Future<Output = Result<()>>
fn serve(&self, args: ServeArgs) -> impl Future<Output = Result<()>>
lev serve - binds a real port and serves indefinitely.
Sourcefn agent_client(
&self,
args: AgentClientArgs,
) -> impl Future<Output = Result<()>>
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.
Sourcefn daemon(&self, args: DaemonArgs) -> impl Future<Output = Result<()>>
fn daemon(&self, args: DaemonArgs) -> impl Future<Output = 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".