diff options
Diffstat (limited to 'crates/phone-opus/src/main.rs')
| -rw-r--r-- | crates/phone-opus/src/main.rs | 11 |
1 files changed, 11 insertions, 0 deletions
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<dyn std::error::Error>> { 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(()) |