From c3ad44cf3ec3bcd080f62c19d915ac1749576302 Mon Sep 17 00:00:00 2001 From: main Date: Mon, 23 Mar 2026 16:28:52 -0400 Subject: Add optional background consult jobs --- crates/phone-opus/src/main.rs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crates/phone-opus/src/main.rs') diff --git a/crates/phone-opus/src/main.rs b/crates/phone-opus/src/main.rs index 79ace26..a1cace7 100644 --- a/crates/phone-opus/src/main.rs +++ b/crates/phone-opus/src/main.rs @@ -3,6 +3,7 @@ mod mcp; use clap::{Args, Parser, Subcommand}; #[cfg(test)] use libmcp_testkit as _; +use std::path::PathBuf; #[derive(Parser)] #[command( @@ -30,6 +31,8 @@ enum McpCommand { Serve, /// Run the disposable worker process. Worker(McpWorkerArgs), + /// Run one detached background consult job. + BackgroundConsult(McpBackgroundConsultArgs), } #[derive(Args)] @@ -39,12 +42,20 @@ struct McpWorkerArgs { generation: u64, } +#[derive(Args)] +struct McpBackgroundConsultArgs { + /// Persisted background job file to execute and update. + #[arg(long)] + job_file: PathBuf, +} + fn main() -> Result<(), Box> { let cli = Cli::parse(); match cli.command { Command::Mcp { command } => match command { McpCommand::Serve => mcp::run_host()?, McpCommand::Worker(args) => mcp::run_worker(args.generation)?, + McpCommand::BackgroundConsult(args) => mcp::run_background_consult(args.job_file)?, }, } Ok(()) -- cgit v1.2.3