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
//! # Warhorn
//!
//! Protocol types for AI agent communication - signals between goblins.
//!
//! This crate defines the message protocol inspired by codex-kaioken's Op/Event pattern:
//! - **Operations (Op)**: Messages sent FROM UI TO agent orchestrator
//! - **Events**: Messages sent FROM agent orchestrator TO UI
//!
//! ## Architecture
//!
//! ```text
//! ┌──────────────┐ Op ┌──────────────────┐
//! │ UI │ ──────────▶ │ Cabal │
//! │ (Terminal) │ │ (Orchestrator) │
//! │ │ ◀────────── │ │
//! └──────────────┘ Event └──────────────────┘
//! ```
//!
//! ## Transport Agnostic
//!
//! These types can be serialized over any transport:
//! - In-process channels (tokio mpsc)
//! - Unix domain sockets
//! - stdio (for MCP compatibility)
//! - WebSocket (for remote agents)
pub use *;
pub use Op;
pub use Event;
pub use *;
pub use ProtocolError;
/// Protocol version for compatibility checking
pub const PROTOCOL_VERSION: &str = "0.1.0";