Skip to main content

sqry_mcp/
lib.rs

1//! sqry-mcp library re-exports for fuzzing and testing.
2//!
3//! This module exposes internal components for fuzz testing. The MCP server
4//! itself is the main binary; this library allows external test crates to
5//! access validation and pagination functionality.
6//!
7//! Note: Many internal modules are only used by the binary (main.rs) and appear
8//! unused from the library's perspective. The `dead_code` lint is suppressed
9//! for these modules.
10
11// These modules are used by the binary (main.rs) but not the library exports.
12// Suppress dead_code warnings for modules that are only used by the binary.
13// Engine module is public to allow integration tests.
14#[allow(dead_code)]
15pub mod engine;
16#[allow(dead_code)]
17mod error;
18#[allow(dead_code)]
19mod execution;
20#[allow(dead_code)]
21mod feature_flags;
22pub mod mcp_config;
23mod pagination;
24#[allow(dead_code)]
25mod path_resolver;
26#[allow(dead_code)]
27mod prompts;
28#[allow(dead_code)]
29mod resources;
30#[allow(dead_code)]
31mod server;
32#[allow(dead_code)]
33mod tools;
34mod workspace_session;
35
36pub use pagination::{decode_cursor, encode_cursor};
37
38// Re-export mcp_config for testing
39pub use mcp_config::McpConfig;
40
41/// Re-export tool validation functions for fuzzing.
42#[cfg(any(test, fuzzing))]
43pub mod tool_validation {
44    pub use crate::tools::{
45        validate_cross_language_edges_args, validate_dependency_impact_args,
46        validate_explain_code_args, validate_export_graph_args, validate_get_index_status_args,
47        validate_relation_query_args, validate_search_similar_args, validate_semantic_diff_args,
48        validate_semantic_search_args, validate_show_dependencies_args, validate_subgraph_args,
49        validate_trace_path_args,
50    };
51}