#![cfg_attr(coverage_nightly, coverage(off))]
pub mod analysis;
pub mod analysis_helpers;
pub mod analysis_utilities;
pub mod args;
pub mod colors;
pub mod command_dispatcher;
pub mod command_structure;
pub mod commands;
pub mod coverage_helpers;
pub mod dead_code_formatter;
pub mod defect_formatter;
pub mod defect_helpers;
pub mod defect_prediction_helpers;
pub mod diagnose;
pub mod drift_detector;
pub mod enums;
pub mod error_context;
pub mod formatting_helpers;
pub mod handlers;
pub mod help_generator;
pub mod language_analyzer;
pub mod mcp_schema_generator;
pub mod name_similarity_helpers;
pub mod output;
pub mod progress;
pub mod proof_annotation_formatter;
pub mod proof_annotation_helpers;
pub mod provability_helpers;
pub mod registry;
pub mod semantic_commands;
pub mod symbol_table_helpers;
pub mod tdg_helpers;
pub mod unified_help;
pub use commands::{
AgentCommands, AnalyzeCommands, Cli, Commands, EnforceCommands, Mode, RefactorCommands,
};
pub use enums::*;
pub use handlers::get_timeline_help_text; pub use help_generator::HelpGenerator; pub use mcp_schema_generator::McpSchemaGenerator; pub use registry::{
ArgumentMetadata, CommandMetadata, CommandRegistry, ExampleMetadata, McpToolMetadata,
}; pub use unified_help::{HelpResponse, HelpSearchResult, UnifiedHelpService};
use crate::stateless_server::StatelessTemplateServer;
use command_dispatcher::CommandDispatcher;
use std::path::Path;
use std::path::PathBuf;
use std::sync::Arc;
use tracing::{debug, info};
#[derive(Debug, Clone)]
pub struct NameInfo {
pub name: String,
pub kind: String,
pub file_path: PathBuf,
pub line: usize,
}
#[derive(Debug, Clone)]
pub struct NameSimilarityResult {
pub name: String,
pub kind: String,
pub file_path: PathBuf,
pub line: usize,
pub similarity: f32,
pub phonetic_match: bool,
pub fuzzy_match: bool,
}
#[derive(Debug, Clone)]
pub struct DuplicateHandlerConfig {
pub project_path: PathBuf,
pub detection_type: DuplicateType,
pub threshold: f32,
pub min_lines: usize,
pub max_tokens: usize,
pub format: DuplicateOutputFormat,
pub perf: bool,
pub include: Option<String>,
pub exclude: Option<String>,
pub output: Option<PathBuf>,
}
#[derive(Debug, Clone)]
pub struct EarlyCliArgs {
pub verbose: bool,
pub debug: bool,
pub trace: bool,
pub trace_filter: Option<String>,
pub is_mcp_server: bool,
}
#[must_use]
#[cfg_attr(coverage_nightly, coverage(off))]
pub fn parse_early_for_tracing() -> EarlyCliArgs {
let args: Vec<String> = std::env::args().collect();
let verbose = args.iter().any(|arg| arg == "-v" || arg == "--verbose");
let debug = args.iter().any(|arg| arg == "--debug");
let trace = args.iter().any(|arg| arg == "--trace");
let is_mcp_server = args.len() >= 3 && args[1] == "agent" && args[2] == "mcp-server";
let trace_filter = args
.iter()
.position(|arg| arg == "--trace-filter")
.and_then(|pos| args.get(pos + 1))
.cloned()
.or_else(|| std::env::var("RUST_LOG").ok());
EarlyCliArgs {
verbose,
debug,
trace,
trace_filter,
is_mcp_server,
}
}
include!("cli_run_command.rs");
include!("cli_language_detection.rs");
include!("cli_deep_context.rs");
include!("cli_handler_stubs.rs");
#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg(test)]
mod language_detection_tests;
#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg(test)]
mod analysis_utilities_property_tests;
#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg(test)]
mod property_tests {
use proptest::prelude::*;
proptest! {
#[test]
fn basic_property_stability(_input in ".*") {
prop_assert!(true);
}
#[test]
fn module_consistency_check(_x in 0u32..1000) {
prop_assert!(_x < 1001);
}
}
}