use crate::cli::commands::{OracleCommands, OracleOutputFormat};
use crate::services::oracle::{ConvergenceTargets, OracleConfig, PdcaLoop, ProjectMetrics};
use anyhow::Result;
use std::path::Path;
#[provable_contracts_macros::contract("pmat-core.yaml", equation = "check_compliance")]
pub async fn handle_oracle_command(command: OracleCommands) -> Result<()> {
match command {
OracleCommands::Fix {
path,
max_iterations,
auto_apply_threshold,
review_threshold,
dry_run,
format,
output,
} => {
handle_oracle_fix(
&path,
max_iterations,
auto_apply_threshold,
review_threshold,
dry_run,
format,
output.as_deref(),
)
.await
}
OracleCommands::Status { path, format } => handle_oracle_status(&path, format).await,
OracleCommands::Single {
path,
format,
output,
} => handle_oracle_single(&path, format, output.as_deref()).await,
}
}
include!("oracle_handlers_commands.rs");
include!("oracle_handlers_formatting.rs");
include!("oracle_handlers_tests.rs");