Skip to main content

vtcode_agent_plugins/
errors.rs

1use thiserror::Error;
2
3#[derive(Debug, Error)]
4pub enum PluginError {
5    #[error("invalid plugin manifest: {0}")]
6    InvalidManifest(String),
7
8    #[error("invalid plugin name: {0}")]
9    InvalidName(String),
10
11    #[error("invalid MCP configuration: {0}")]
12    InvalidMcp(String),
13
14    #[error("invalid skill: {0}")]
15    InvalidSkill(String),
16
17    #[error("path escapes plugin root: {0}")]
18    PathEscape(String),
19
20    #[error("plugin already installed: {0}")]
21    AlreadyInstalled(String),
22
23    #[error("plugin not installed: {0}")]
24    NotInstalled(String),
25
26    #[error("unsupported plugin schema version: {0}")]
27    UnsupportedSchema(String),
28
29    #[error("IO error: {0}")]
30    Io(#[from] std::io::Error),
31
32    #[error("JSON error: {0}")]
33    Json(#[from] serde_json::Error),
34}