zeph_plugins/lib.rs
1// SPDX-FileCopyrightText: 2026 Andrei G <bug-ops>
2// SPDX-License-Identifier: MIT OR Apache-2.0
3
4//! Plugin packaging and management for Zeph.
5//!
6//! A plugin is a directory (local or remote git) containing:
7//! - `plugin.toml` — manifest describing the plugin (name, version, skills, MCP servers, config overlay)
8//! - one or more skill directories with `SKILL.md` files
9//! - optional MCP server declarations
10//!
11//! Plugins are installed to `~/.local/share/zeph/plugins/<name>/` and loaded at agent startup.
12//!
13//! # Security Model
14//!
15//! - Plugin config overlays are **tighten-only**: they can add to `blocked_commands`,
16//! narrow `allowed_commands`, or raise `disambiguation_threshold` — never loosen constraints.
17//! - Plugin MCP entries are validated against `mcp.allowed_commands` at install time.
18//! - `.bundled` markers are stripped recursively from all plugin skill trees.
19//! - Skill name conflicts with managed, bundled, or other plugin skills are hard-errors at install.
20
21pub mod error;
22pub(crate) mod integrity;
23pub mod manager;
24pub mod manifest;
25pub mod overlay;
26
27pub use error::PluginError;
28pub use manager::{
29 AddResult, AutoUpdateResult, AutoUpdateStatus, InstalledPlugin, PluginManager, PluginSource,
30 RemoveResult,
31};
32pub use manifest::PluginManifest;
33pub use overlay::{ResolvedOverlay, apply_plugin_config_overlays};