atomcode_core/plugin/mod.rs
1//! Plugin marketplace + installation. See
2//! `docs/superpowers/specs/2026-04-29-plugin-marketplace-design.md`.
3
4// Public API surface (per spec ยง10): the high-level entry points used by
5// the TUI dispatcher and downstream registries.
6pub mod bootstrap;
7pub mod installer;
8pub mod loader;
9pub mod marketplace;
10
11// Internal modules: state schema, manifest types, path helpers, URL
12// helpers. Not part of the public API; if a downstream consumer needs one
13// of these symbols, re-export it explicitly above.
14pub(crate) mod manifest;
15pub(crate) mod paths;
16pub(crate) mod state;
17pub(crate) mod url;
18
19#[cfg(test)]
20pub(crate) mod test_support;
21
22/// Result of a long-running plugin operation that the TUI runs off the event
23/// loop (clone / pull / install). The dispatcher fires-and-forgets a
24/// `tokio::task::spawn_blocking` and the main `select!` consumes one of these
25/// once the worker finishes, so the input thread never sees the git latency.
26#[derive(Debug)]
27pub enum PluginJobEvent {
28 MarketplaceAdded(marketplace::MarketplaceInfo),
29 MarketplaceUpdated(marketplace::MarketplaceInfo),
30 PluginInstalled(installer::InstalledPluginInfo),
31 /// Generic failure: `op` is one of "add" / "update" / "install" so the
32 /// renderer can produce the same human message as the prior sync path.
33 Failed { op: String, msg: String },
34}