metarepo-plugin-sdk
SDK for authoring external plugins for the metarepo
CLI. Implement one trait, call serve(), and the v1 stdio wire protocol —
request framing, JSON, dispatch, error handling, and the protocol-version
handshake — is handled for you.
use ;
;
The protocol types (PluginRequest, PluginResponse, CommandInfo, ArgInfo,
RuntimeConfigDto) are re-exported from metarepo_core::protocol, so a plugin
depends only on this crate.
- Full guide:
docs/PLUGIN_DEVELOPMENT.md - Wire protocol:
docs/PLUGIN_PROTOCOL_V1.md - Reference plugin:
examples/metarepo-plugin-example
Testing your plugin
serve_io(plugin, reader, writer) runs the request loop against arbitrary
streams, so you can drive it with in-memory buffers in unit tests. You can also
unit-test the Plugin trait methods directly, independent of the transport.
License
MIT