vtcode_core/plugins/
mod.rs1pub mod caching;
11pub mod components;
12pub mod directory;
13pub mod loader;
14pub mod manager;
15pub mod manifest;
16pub mod runtime;
17pub mod validation;
18
19pub use caching::*;
20pub use components::*;
21pub use directory::*;
22pub use loader::*;
23pub use manager::*;
24pub use manifest::*;
25pub use runtime::*;
26pub use validation::*;
27
28pub type PluginId = String;
30
31pub type PluginName = String;
33
34pub type PluginResult<T> = Result<T, PluginError>;
36
37#[cfg(test)]
38mod tests {
39 #[test]
42 fn test_plugin_system_compilation() {
43 }
45}
46
47#[derive(Debug, thiserror::Error)]
49pub enum PluginError {
50 #[error("Plugin manifest validation failed: {0}")]
51 ManifestValidationError(String),
52
53 #[error("Plugin not found: {0}")]
54 NotFound(PluginId),
55
56 #[error("Plugin already exists: {0}")]
57 AlreadyExists(PluginId),
58
59 #[error("Plugin loading failed: {0}")]
60 LoadingError(String),
61
62 #[error("Plugin execution failed: {0}")]
63 ExecutionError(String),
64
65 #[error("Plugin permission denied: {0}")]
66 PermissionDenied(String),
67
68 #[error("Plugin configuration error: {0}")]
69 ConfigurationError(String),
70
71 #[error("I/O error: {0}")]
72 IoError(#[from] std::io::Error),
73
74 #[error("JSON serialization error: {0}")]
75 JsonError(#[from] serde_json::Error),
76
77 #[error("TOML serialization error: {0}")]
78 TomlError(#[from] toml::de::Error),
79}