1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Wire format for the plugin output protocol.
//!
//! Plugins emit one [`Output`] JSON object per line on their stdout.
//! The host parses each line and dispatches per variant: `command`
//! is a request for the host to perform some action and (potentially)
//! reply, `mcp` announces the URL of an MCP server the plugin just
//! started, `error` is displayed, and anything that doesn't match
//! those three lands in the untagged [`Output::Notification`]
//! catch-all carrying the raw JSON value.
use JsonSchema;
use ;
use Command;
use crateError;
use crateMcp;
/// One line of plugin output. Untagged outer enum — deserialization
/// tries each typed variant by its constant `type:"…"` discriminator
/// in source order and falls through to [`Output::Notification`] as
/// a catch-all carrying the raw JSON value.
///
/// [`Mcp`] is imported from
/// [`crate::cli::command::plugins::run`] — this module does NOT
/// re-export it; importers reach it by its canonical path.