1pub mod clipboard;
2pub mod file_manager;
3pub mod mcp;
4
5use thiserror::Error;
6
7#[derive(Error, Debug)]
8pub enum ClaudeUtilsError {
9 #[error("Clipboard error: {0}")]
10 Clipboard(String),
11
12 #[error("File operation error: {0}")]
13 FileOperation(#[from] std::io::Error),
14
15 #[error("Image processing error: {0}")]
16 ImageProcessing(#[from] image::ImageError),
17
18 #[error("Serialization error: {0}")]
19 Serialization(#[from] serde_json::Error),
20
21 #[error("Authentication error: {0}")]
22 Authentication(String),
23
24 #[error("MCP protocol error: {0}")]
25 McpProtocol(String),
26
27 #[error("Server error: {0}")]
28 Server(String),
29}
30
31pub type Result<T> = std::result::Result<T, ClaudeUtilsError>;
32
33pub const DEFAULT_PORT: u16 = 3830;
34pub const DEFAULT_HOST: &str = "127.0.0.1";
35pub const STAGING_DIR_NAME: &str = "claude-utils";
36pub const MAX_INLINE_SIZE: usize = 65536; pub const CLEANUP_INTERVAL_MINS: u64 = 15;
38
39#[cfg(test)]
40mod main_test;