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