Mountain/RPC/mod.rs
1//! # Mountain RPC Services
2//!
3//! ☀️ 🟢 MOUNTAIN_SKY_ONLY - Core RPC service implementations
4//!
5//! This module contains the complete RPC services for Mountain's Spine
6//! contract. All services support extension hosts based on their feature gates:
7//!
8//! ## Service Classification by Support Level
9//!
10//! ### 🟢 GREEN - Full Support (All Hosts)
11//! - **EchoAction**: Bidirectional actions, host registration, routing
12//! - **Commands**: Command registration and execution
13//! - **Workspace**: File operations, document management
14//! - **Configuration**: Configuration read/write
15//!
16//! ### 🟡 YELLOW - Partial Support (Grove, Cocoon)
17//! - **Windows**: Webviews, documents (limited in Sky)
18//! - **Tree Views**: Tree data providers (read-only in Sky)
19//! - **Language Features**: Completion, diagnostics (basic in Sky)
20//!
21//! ### 🔴 RED - Cocoon Only Services
22//! - **Terminals**: Terminal emulation and pseudo-terminals
23//! - **Debug**: Debug adapter protocol integration
24//! - **SCM**: Source control management (git)
25//! - **Processes**: Child process execution
26//!
27//! ### 🔵 BLUE - WASM Optimized
28//! - **Document Operations**: Zero-copy memory access in WASM
29//! - **File Operations**: Parallel search in WASM
30//!
31//! ## Module Structure
32//!
33//! Services are split into atomic submodules for granular feature gates:
34//!
35//! ```text
36//! RPC/
37//! ├── EchoAction/ # ☀️ 🟢 Central EchoAction system
38//! ├── Commands/ # ☀️ 🟢 Command registration
39//! │ └── Validation/ # Input validation
40//! ├── Workspace/ # ☀️ 🟢 File/workspace operations
41//! ├── Configuration/ # ☀️ 🟢 Configuration management
42//! ├── Windows/ # ☀️ 🟡 Window and document services
43//! ├── Terminals/ # ☀️ 🔴 Terminal services (Cocoon only)
44//! ├── Debug/ # ☀️ 🔴 Debug protocol (Cocoon only)
45//! ├── SCM/ # ☀️ 🔴 Source control (Cocoon only)
46//! ├── Processes/ # ☀️ 🔴 Child processes (Cocoon only)
47//! ├── Telemetry/ # OTEL integration
48//! │ ├── Spans/ # Span management
49//! │ └── Metrics/ # Metrics recording
50//! └── types/ # Shared types
51//! ```
52
53pub mod CocoonService;
54pub use CocoonService::CocoonServiceImpl;
55
56pub mod types;
57
58pub mod echo_action;
59pub use echo_action::{EchoActionServer, ExtensionHostRegistry, ExtensionRouter};
60
61pub mod commands;
62pub use commands::{CommandService, CommandValidation};
63
64pub mod workspace;
65pub use workspace::WorkspaceService;
66
67pub mod configuration;
68pub use configuration::ConfigurationService;
69
70// Conditionally include services based on feature flags
71
72#[cfg(any(feature = "grove", feature = "cocoon"))]
73pub mod windows;
74#[cfg(any(feature = "grove", feature = "cocoon"))]
75pub use windows::WindowService;
76
77#[cfg(feature = "terminals")]
78pub mod terminals;
79#[cfg(feature = "terminals")]
80pub use terminals::TerminalService;
81
82#[cfg(feature = "debug-protocol")]
83pub mod debug;
84#[cfg(feature = "debug-protocol")]
85pub use debug::DebugService;
86
87#[cfg(feature = "scm-support")]
88pub mod scm;
89#[cfg(feature = "scm-support")]
90pub use scm::SCMService;
91
92#[cfg(feature = "child-processes")]
93pub mod processes;
94#[cfg(feature = "child-processes")]
95pub use processes::ProcessService;
96
97// Telemetry modules
98pub mod telemetry;
99pub use telemetry::{TelemetryService, metrics::ServiceMetrics, spans::TraceSpan};
100
101// Re-export vine types
102pub mod vine;