Skip to main content

nichlink/registry_core/plugin/
plugin.rs

1//! Plugin protocol: manifests, catalogs, trust, slots, and graft overlays.
2//! 插件协议:manifest、目录、信任、槽位与嫁接覆盖。
3
4#[path = "artifact/artifact.rs"]
5pub mod artifact;
6#[path = "catalog/catalog.rs"]
7pub mod catalog;
8#[path = "contracts/contracts.rs"]
9pub mod contracts;
10#[path = "graft/graft.rs"]
11pub mod graft;
12#[path = "plugin_policy/plugin_policy.rs"]
13pub mod plugin_policy;
14#[path = "slot/slot.rs"]
15pub mod slot;
16#[path = "trust/trust.rs"]
17pub mod trust;
18
19// A contract type owned by `declaration` is not re-exported here: it would be a
20// second name for the same item under the same glob layer, which is exactly
21// what `ambiguous_glob_reexports` reports. The module pages that used to carry
22// those copies (`plugin::contracts`, `plugin::manifest`) are gone.
23// `declaration` 拥有的合同类型不在这里再导出:那会在同一 glob 层给同一个 item 造出
24// 第二个名字,正是 `ambiguous_glob_reexports` 报告的东西。过去承载这些副本的
25// `plugin::contracts`、`plugin::manifest` 页面已经删除。
26
27pub use self::plugin_policy::{PluginAdapter, PluginPolicy, PluginRuntime};
28
29pub use self::artifact::{
30    PluginArtifact, PluginAssurance, PluginDecision, PluginRejectReason, VerifiedPluginArtifact,
31};
32pub use self::catalog::{PluginCatalog, PluginRecord};
33/// The document module's historical path on this surface.
34/// 文档模块在本执行面上的历史路径。
35pub use self::graft::document as graft_document;
36pub use self::graft::document::{
37    GRAFT_PLAN_VERSION, GraftPlanDocument, GraftPlanDocumentError, validate_graft_selector,
38};
39pub use self::graft::{CutGraftCommand, GraftCut, GraftError, GraftPlan};
40pub use self::slot::{
41    PluginChannel, SlotValidationError, validate_artifact, validate_operation_name,
42};
43pub use self::trust::{
44    PluginRevocation, PluginSignatureVerifier, PluginTrustError, PluginTrustPolicy,
45};
46
47/// Version of the host/plugin execution ABI.
48/// 宿主与插件执行 ABI 的版本。
49pub const PLUGIN_ABI_VERSION: u32 = 1;