ek-core 0.3.0

Business-agnostic plugin host and actor-over-bus runtime on top of ek-event: capability index with runtime service discovery, per-plugin actor workers, dynamic add/remove with lifecycle broadcasts, one-shot ask/ask_service with contract gates, panic quarantine, five-step close.
Documentation
//! ek-core —— 插件宿主 + Actor-over-Bus 运行时(基于已发布的 ek-event 0.1.0)。
//!
//! 核心协议:
//! - **收** = 插件唯一入口 [`Plugin::on_mail`](plugin::Plugin);订阅面由 [`Plugin::routes`] 声明,
//!   宿主 start() 时为每条 route 装配 forwarder(bounded 邮箱 + try_send,零阻塞)。
//! - **发** = 插件唯一出口 [`PluginContext`](context::PluginContext):`put`(广播/业务日志)、
//!   `ask`(eReq+Oneshot 请求)、`notify`(eTo)。
//! - 宿主不执行业务、零业务类型、零日志(0.3.0):插件之间不直调;
//!   依赖在 add_plugin 时显式声明,start 按 deps 拓扑序装配,close 按逆序五步回收。
//! - 宿主想说的话全是结构化事件:`ePlugUp`/`ePlugDown`/`ePlugQDown.<名>`/`eSrvChg`
//!   (见 [`lifecycle`]);运维诊断文本只走 stderr,不进总线不占类型。
//!   业务日志与本宿主无关(插件自造自投,业务链上用 ek-data 的 LogData 到 "eLog")。
//!
//! 故障面:handler panic 由 worker catch_unwind 隔离,连续 [`PANIC_LIMIT`] 次 → Quarantined
//! (worker 自退 + `ePlugQDown.<name>` 结构化广播);邮箱有界,溢出丢弃计数最终一致
//! (stats.spilled,节流 stderr 提示)。

pub mod context;
pub mod envelope;
pub mod error;
mod forwarder;
pub mod lifecycle;
pub mod main_engine;
pub mod plugin;
pub mod registry;
pub mod service;
pub mod worker;

pub use context::PluginContext;
pub use envelope::{e_req_type, e_to_type, Envelope, OneshotErr, OneshotReceiver, OneshotSender, ReplyErr};
pub use error::{AskError, PluginError};
pub use lifecycle::{
    EVENT_PLUG_DOWN, EVENT_PLUG_DOWN_EVENT_PREFIX, EVENT_PLUG_DOWN_PREFIX, EVENT_PLUG_UP,
    EVENT_PLUG_UP_PREFIX, EVENT_SRV_CHG, EVENT_SRV_CHG_PREFIX,
};
pub use main_engine::{MailStats, MainEngine, PluginInfo, PluginState};
pub use plugin::{Plugin, MAILBOX_CAP, PANIC_LIMIT};
pub use service::{PlugNotice, ProviderRef, ServiceDesc};