ek-core 0.5.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(**无界邮箱 + 深度计数**,零阻塞)。
//! - **发** = 插件唯一出口 [`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>` 结构化广播)。
//!
//! 邮箱背压(0.5.0 口径反转,D5 改案):邮箱**无界** → 业务事实默认**不丢**;
//! 深度实时可见(`mail_stats().pending/peak`),**只有到软顶 [`MAILBOX_SOFT_CAP`] 才丢**
//! (丢新帧 + `stats.spilled` 计数 + 节流 stderr)。无界 ≠ 无限:软顶就是"不丢"的兜底出口。

pub mod audit;
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 section;
pub mod service;
pub mod worker;

pub use context::PluginContext;
pub use envelope::{
    Envelope, OneshotErr, OneshotReceiver, OneshotSender, ReplyErr, e_req_type, e_to_type,
};
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::{MAILBOX_SOFT_CAP, PANIC_LIMIT, Plugin};
pub use section::{ApplyReport, Configurable, Field, SectionMap, valid_config_ns};
pub use service::{PlugNotice, ProviderRef, ServiceDesc};