Skip to main content

zerolaunch_plugin_protocol/
lib.rs

1//! ZeroLaunch plugin JSON-RPC protocol definitions.
2//!
3//! The transport layer uses LSP-style framed stdio JSON-RPC 2.0.
4//! This crate defines all message bodies, method name constants,
5//! manifest schema, and error codes.
6
7pub mod codec;
8pub mod error;
9pub mod jsonrpc;
10pub mod manifest;
11pub mod messages;
12pub mod methods;
13
14pub use error::*;
15pub use jsonrpc::*;
16pub use manifest::*;
17pub use messages::*;
18pub use methods::*;
19
20/// 协议版本:宿主与插件在 `plugin/initialize` 握手时各自声明,宿主只比较 major
21/// (`protocol_version_compatible`)——major 不同即拒绝加载。
22/// 载荷级 breaking change 必须提升 major;仅新增可选字段/方法不提升。
23pub const PROTOCOL_VERSION: &str = "2.0";