Wire schema for the vagus plugin contract — the language-agnostic protocol a vagus-<name>
plugin speaks back to vagus core over stdout.
This crate is intentionally tiny and dependency-light (serde only). It is shared by both
vagus core (which parses the events) and the vagus-plugin SDK (which emits them) so the
on-the-wire shape can never drift between the two. Non-Rust plugins ignore this crate and just
emit the documented JSON; see docs/plugin-contract.md.
The contract in one paragraph
Core spawns vagus-<name> as a child with the subcommand name stripped from argv, stdin/stderr
inherited, stdout piped, and the env vars set. The plugin streams newline-delimited
JSON [Event]s on stdout (machine channel) and writes human logs to stderr. Any stdout
line that does not parse as a known [Event] is echoed verbatim by core (so trivial text-only
plugins still work). On a clean exit, core indexes every [Event::Note] path it saw.