Skip to content

feat(skills,plugins): add agent-invocable skills and plugin packaging#3127

Merged
bug-ops merged 1 commit intomainfrom
agent-invocable-skills
Apr 17, 2026
Merged

feat(skills,plugins): add agent-invocable skills and plugin packaging#3127
bug-ops merged 1 commit intomainfrom
agent-invocable-skills

Conversation

@bug-ops
Copy link
Copy Markdown
Owner

@bug-ops bug-ops commented Apr 17, 2026

Summary

Details

SkillInvokeTool:

  • crates/zeph-core/src/skill_invoker.rsSkillInvokeExecutor wired into CompositeExecutor
  • Blocked skills refused; non-Trusted bodies sanitized; Quarantined bodies wrapped
  • invoke_skill and load_skill added to QUARANTINE_DENIED
  • Blocked skills filtered from the skill catalog in assembly.rs (two-layer defense)
  • CLI: zeph skill invoke <name> [--args ...]

Plugin packaging:

  • crates/zeph-plugins/PluginManager, plugin.toml manifest format
  • Tighten-only config overlay validation (union/intersection/max semantics, unknown keys hard-error)
  • Path traversal defense: canonicalize + starts_with(root) at install and runtime
  • MCP command verbatim match only (no basename fallback)
  • Recursive watcher on plugins_dir root for hot-reload
  • CLI: zeph plugin list|add|remove; TUI: /plugins list|add|remove

Note: Runtime merging of plugin config overlays into the live Config struct is deferred to a follow-up PR.

Test plan

  • cargo nextest run --workspace --features "desktop,ide,server,chat,pdf,scheduler" --lib --bins — 8427/8427 pass
  • cargo clippy --workspace --features "desktop,ide,server,chat,pdf,scheduler" -- -D warnings — clean
  • cargo +nightly fmt --check — clean
  • Live test playbook: .local/testing/playbooks/skill-invoke-and-plugins.md
  • P3 follow-ups filed: register_hub_dir for plugin trees, copy_dir_all symlink handling, runtime config overlay merge

Closes #3105, closes #2806.

Adds `SkillInvokeExecutor` in `crates/zeph-core/src/skill_invoker.rs`,
wired into `CompositeExecutor` after `SkillExecutor`. The agent can now
call the `invoke_skill` tool during its reasoning loop to fetch a
registered skill's body by name.

Trust pipeline:
- Blocked skills are refused at the executor level and excluded from
  the catalog surfaced to the LLM (assembly.rs).
- Non-Trusted skill bodies pass through `sanitize_skill_text`.
- Quarantined bodies additionally pass through `wrap_quarantined`.
- `invoke_skill` and `load_skill` added to `QUARANTINE_DENIED`.

CLI: `zeph skill invoke <name> [--args ...]`

New crate `crates/zeph-plugins` with `PluginManager`. A `plugin.toml`
manifest bundles SKILL.md directories, MCP server entries, and
tighten-only config overlay fragments into an installable package.

Security:
- Skill paths in manifests are canonicalized and must resolve under
  the plugin root (path-traversal guard).
- MCP command allowlist uses verbatim match only (no basename fallback).
- `remove()` validates the plugin name before calling `remove_dir_all`.
- Config overlay rejects unknown keys and only permits tightening
  security limits (union for blocklists, intersection for allowlists,
  maximum for thresholds).

Install location: `~/.local/share/zeph/plugins/<name>/` (XDG).
Plugin skill dirs are wired into `skill_paths()` at bootstrap and hot-
reloaded via a single recursive watcher on the plugins root.

CLI: `zeph plugin add|remove|list`
TUI: `/plugins list|add|remove`
@github-actions github-actions bot added documentation Improvements or additions to documentation skills zeph-skills crate rust Rust code changes core zeph-core crate dependencies Dependency updates enhancement New feature or request labels Apr 17, 2026
@github-actions github-actions bot added the size/XL Extra large PR (500+ lines) label Apr 17, 2026
@bug-ops bug-ops enabled auto-merge (squash) April 17, 2026 19:57
@bug-ops bug-ops merged commit e1749ef into main Apr 17, 2026
32 checks passed
@bug-ops bug-ops deleted the agent-invocable-skills branch April 17, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core zeph-core crate dependencies Dependency updates documentation Improvements or additions to documentation enhancement New feature or request rust Rust code changes size/XL Extra large PR (500+ lines) skills zeph-skills crate

Projects

None yet

1 participant