Skip to main content

Crate meta_plugin_protocol

Crate meta_plugin_protocol 

Source
Expand description

Shared plugin protocol types for meta subprocess plugins.

This crate defines the communication protocol between the meta CLI host and its subprocess plugins (meta-git, meta-project, meta-rust, etc.).

The protocol works as follows:

  1. Host discovers plugins via --meta-plugin-info (plugin responds with PluginInfo JSON)
  2. Host invokes plugins via --meta-plugin-exec (sends PluginRequest JSON on stdin)
  3. Plugin responds with either a PlanResponse JSON (commands to execute) or direct output

Structs§

ExecutionPlan
An execution plan returned by a plugin, containing commands for the host to execute.
PlanResponse
Wrapper for the execution plan response (the JSON envelope plugins emit).
PlannedCommand
A single command to be executed by the host via loop_lib.
PluginDefinition
Definition of a plugin, used by run_plugin() to eliminate main.rs boilerplate.
PluginHelp
Help information for a plugin’s commands.
PluginInfo
Metadata about a plugin, returned in response to --meta-plugin-info.
PluginRequest
A request from the meta CLI host to a plugin, sent as JSON on stdin.
PluginRequestOptions
Options passed from the host to the plugin as part of the request.

Enums§

CommandResult
The result of a plugin command execution.

Functions§

output_execution_plan
Serialize and print an execution plan to stdout.
output_execution_plan_full
Serialize and print a full execution plan with pre/post commands to stdout.
read_request_from_stdin
Read and parse a PluginRequest from stdin.
run_plugin
Run a plugin’s main loop. Handles --meta-plugin-info and --meta-plugin-exec flags.