Skip to content

Commit 34d59a5

Browse files
1 parent 4cf8444 commit 34d59a5

117 files changed

Lines changed: 508 additions & 2548 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ ring = { workspace = true }
7171
bincode = { workspace = true }
7272
brotli = { workspace = true }
7373
hex = { workspace = true }
74+
opentelemetry = { workspace = true }
7475

7576
[features]
7677
default = ["ExtensionHostCocoon", "MistNative", "AirIntegration"]
@@ -83,6 +84,17 @@ Debug = []
8384

8485
AirIntegration = ["Air"]
8586

87+
# Feature flags for conditional compilation
88+
grove = []
89+
cocoon = []
90+
terminals = []
91+
debug-protocol = []
92+
scm-support = []
93+
child-processes = []
94+
Telemetry = []
95+
Development = []
96+
Test = []
97+
8698
[lib]
8799
name = "Mountain"
88100
path = "Source/Library.rs"

README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ frontend and the `Cocoon` extension host.
120120

121121
To understand how `Mountain`'s internal components are structured and how they
122122
implement the application's core logic, please refer to the detailed technical
123-
breakdown in [`Documentation/GitHub/DeepDive.md`](https://github.com/CodeEditorLand/Mountain/tree/Current/Documentation/GitHub/DeepDive.md). This document explains
124-
the roles of the `ApplicationRunTime`, `ApplicationState`, `Handler`,
125-
`Environment`, and the `Vine` gRPC layer.
123+
breakdown in
124+
[`Documentation/GitHub/DeepDive.md`](https://github.com/CodeEditorLand/Mountain/tree/Current/Documentation/GitHub/DeepDive.md).
125+
This document explains the roles of the `ApplicationRunTime`,
126+
`ApplicationState`, `Handler`, `Environment`, and the `Vine` gRPC layer.
126127

127128
---
128129

@@ -224,14 +225,16 @@ set up, build, and run the entire application.
224225
This project is released into the public domain under the **Creative Commons CC0
225226
Universal** license. You are free to use, modify, distribute, and build upon
226227
this work for any purpose, without any restrictions. For the full legal text,
227-
see the [`LICENSE`](https://github.com/CodeEditorLand/Mountain/tree/Current/) file.
228+
see the [`LICENSE`](https://github.com/CodeEditorLand/Mountain/tree/Current/)
229+
file.
228230

229231
---
230232

231233
## Changelog 📜
232234

233-
Stay updated with our progress! See [`CHANGELOG.md`](https://github.com/CodeEditorLand/Mountain/tree/Current/) for a history
234-
of changes specific to **Mountain**.
235+
Stay updated with our progress! See
236+
[`CHANGELOG.md`](https://github.com/CodeEditorLand/Mountain/tree/Current/) for a
237+
history of changes specific to **Mountain**.
235238

236239
---
237240

SECURITY.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ not limited to):**
5959
- **Denial of Service (DoS):** If an Element can be made unresponsive or crash
6060
due to specially crafted input or excessive resource consumption.
6161
- **Path Traversal/Arbitrary File Access:** For Elements interacting with the
62-
filesystem (like `Mountain`'s FS Handler), ensuring that
63-
path inputs are properly sanitized.
62+
filesystem (like `Mountain`'s FS Handler), ensuring that path inputs are
63+
properly sanitized.
6464
- **Insecure IPC/Communication:** For Elements involved in inter-process
6565
communication (`Vine`, `Track`, `Echo`, `Mist`), vulnerabilities in the
6666
protocol or handling of messages.

Source/Air/AirClient.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
//! AirClient serves as the primary interface between Mountain and the Air
2222
//! backend service:
2323
//!
24-
//! ```
24+
//! ```text
2525
//! Mountain (Frontend) ──► AirClient ──► gRPC ──► Air Daemon (Backend)
2626
//! ```
2727
//!
@@ -114,15 +114,15 @@ impl AirClient {
114114
/// Creates a new AirClient and connects to the Air daemon service.
115115
///
116116
/// # Arguments
117-
/// * `address` - The gRPC server address (e.g., "http://[::1]:50053")
117+
/// * `address` - The gRPC server address (e.g., "http://\\[::1\\]:50053")
118118
///
119119
/// # Returns
120120
/// * `Ok(Self)` - Successfully created client
121121
/// * `Err(CommonError)` - Connection failure with descriptive error
122122
///
123123
/// # Example
124124
///
125-
/// ```rust,no_run
125+
/// ```text
126126
/// use Mountain::Air::AirClient::{AirClient, DEFAULT_AIR_SERVER_ADDRESS};
127127
///
128128
/// # #[tokio::main]
@@ -490,7 +490,7 @@ impl AirClient {
490490
///
491491
/// # Example
492492
///
493-
/// ```rust,no_run
493+
/// ```text
494494
/// use Mountain::Air::AirClient::AirClient;
495495
/// use CommonLibrary::Error::CommonError::CommonError;
496496
///
@@ -1180,7 +1180,7 @@ pub struct DownloadStreamChunk {
11801180
///
11811181
/// # Example
11821182
///
1183-
/// ```rust,no_run
1183+
/// ```text
11841184
/// use Mountain::Air::AirClient::DownloadStream;
11851185
/// use CommonLibrary::Error::CommonError::CommonError;
11861186
///

Source/Air/AirServiceProvider.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
//! - Request ID generation for tracing
2020
//! - Connection state management
2121
//!
22-
//! ```
22+
//! ```text
2323
//! Application ──► AirServiceProvider ──► AirClient ──► gRPC ──► Air Daemon
2424
//! ```
2525
//!
@@ -47,7 +47,7 @@
4747
//! ## PERFORMANCE
4848
//!
4949
//! - Request ID generation uses UUID v4 (cryptographically random)
50-
//! - Thread-safe operations via Arc<AirClient>
50+
//! - Thread-safe operations via `Arc<AirClient>`
5151
//! - Non-blocking async operations via tokio
5252
//!
5353
//! ## VSCODE REFERENCE
@@ -100,7 +100,7 @@ use super::{
100100
///
101101
/// # Example
102102
///
103-
/// ```rust,no_run
103+
/// ```text
104104
/// use Mountain::Air::AirServiceProvider::{AirServiceProvider, DEFAULT_AIR_SERVER_ADDRESS};
105105
/// use CommonLibrary::Error::CommonError::CommonError;
106106
///
@@ -140,7 +140,7 @@ impl AirServiceProvider {
140140
///
141141
/// # Example
142142
///
143-
/// ```rust,no_run
143+
/// ```text
144144
/// use Mountain::Air::AirServiceProvider::AirServiceProvider;
145145
/// use CommonLibrary::Error::CommonError::CommonError;
146146
///
@@ -170,7 +170,7 @@ impl AirServiceProvider {
170170
///
171171
/// # Example
172172
///
173-
/// ```rust,no_run
173+
/// ```text
174174
/// use Mountain::Air::AirServiceProvider::AirServiceProvider;
175175
/// use CommonLibrary::Error::CommonError::CommonError;
176176
///
@@ -239,7 +239,7 @@ impl AirServiceProvider {
239239
///
240240
/// # Example
241241
///
242-
/// ```rust,no_run
242+
/// ```text
243243
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
244244
/// # use CommonLibrary::Error::CommonError::CommonError;
245245
/// # #[tokio::main]
@@ -278,7 +278,7 @@ impl AirServiceProvider {
278278
///
279279
/// # Example
280280
///
281-
/// ```rust,no_run
281+
/// ```text
282282
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
283283
/// # use CommonLibrary::Error::CommonError::CommonError;
284284
/// # #[tokio::main]
@@ -389,7 +389,7 @@ impl AirServiceProvider {
389389
///
390390
/// # Example
391391
///
392-
/// ```rust,no_run
392+
/// ```text
393393
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
394394
/// # use CommonLibrary::Error::CommonError::CommonError;
395395
/// # #[tokio::main]
@@ -447,7 +447,7 @@ impl AirServiceProvider {
447447
///
448448
/// # Example
449449
///
450-
/// ```rust,no_run
450+
/// ```text
451451
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
452452
/// # use CommonLibrary::Error::CommonError::CommonError;
453453
/// # #[tokio::main]
@@ -493,7 +493,7 @@ impl AirServiceProvider {
493493
///
494494
/// # Example
495495
///
496-
/// ```rust,no_run
496+
/// ```text
497497
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
498498
/// # use CommonLibrary::Error::CommonError::CommonError;
499499
/// # #[tokio::main]
@@ -565,7 +565,7 @@ impl AirServiceProvider {
565565
///
566566
/// # Example
567567
///
568-
/// ```rust,no_run
568+
/// ```text
569569
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
570570
/// # use CommonLibrary::Error::CommonError::CommonError;
571571
/// # #[tokio::main]
@@ -654,7 +654,7 @@ impl AirServiceProvider {
654654
///
655655
/// # Example
656656
///
657-
/// ```rust,no_run
657+
/// ```text
658658
/// # use Mountain::Air::AirServiceProvider::AirServiceProvider;
659659
/// # use CommonLibrary::Error::CommonError::CommonError;
660660
/// # #[tokio::main]
@@ -715,7 +715,7 @@ impl AirServiceProvider {
715715
///
716716
/// # Example
717717
///
718-
/// ```rust
718+
/// ```text
719719
/// use Mountain::Air::AirServiceProvider::generate_request_id;
720720
///
721721
/// let id = generate_request_id();

Source/Air/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
//! - Authentication and credential management
88
//! - File indexing and search operations
99
//! - System monitoring and metrics collection
10-
//! - Handles connection management and error translation to [`CommonError`]
11-
//! - Wraps client in [`Arc`] for shared access across the application
10+
//! - Handles connection management and error translation to `CommonError`
11+
//! - Wraps client in `Arc` for shared access across the application
1212
//!
1313
//! ARCHITECTURAL ROLE:
1414
//! - Integration point with the Air background service (daemon)
1515
//! - Used by multiple Mountain components:
16-
//! - [`UpdateService`](crate::Update::UpdateService) for self-updates
16+
//! - `UpdateService` for self-updates
1717
//! - [`SearchProvider`](crate::Environment::SearchProvider) for file search
1818
//! - [`SecretProvider`](crate::Environment::SecretProvider) for secret
1919
//! storage
@@ -32,7 +32,7 @@
3232
//! - Uses tonic gRPC client for transport
3333
//! - Connection establishment via `connect()` method
3434
//! - Health checking with timeout protection
35-
//! - Thread-safe operations via Arc<AirClient>
35+
//! - Thread-safe operations via `Arc<AirClient>`
3636
//!
3737
//! ERROR HANDLING:
3838
//! - All gRPC errors translated to
@@ -42,7 +42,7 @@
4242
//! fallback)
4343
//!
4444
//! PERFORMANCE:
45-
//! - gRPC channels are expensive; reuse via Arc<AirClient>
45+
//! - gRPC channels are expensive; reuse via `Arc<AirClient>`
4646
//! - Non-blocking async operations via tokio
4747
//! - Request ID generation for tracing
4848
//!

Source/ApplicationState/Internal/TextProcessing/AnalyzeTextLinesAndEOL.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ use log::debug;
3636
/// * `TextContent` - The text content to analyze
3737
///
3838
/// # Returns
39-
/// Tuple containing (Vec<String> of lines, String of detected EOL)
39+
/// Tuple containing (`Vec<String>` of lines, String of detected EOL)
4040
///
4141
/// # Behavior
4242
/// - Detects CRLF ("\r\n") or LF ("\n") line endings

Source/Binary/Build/WindowBuild.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@ use tauri::{App, WebviewUrl, WebviewWindowBuilder, Wry};
2323
pub fn WindowBuild(Application:&mut App, LocalhostUrl:String) -> tauri::WebviewWindow<Wry> {
2424
// Create the window URL pointing to the application
2525
let WindowUrl = WebviewUrl::External(
26-
format!("{}/Application/index.html", LocalhostUrl)
27-
.parse()
28-
.expect("FATAL: Failed to parse localhost URL"),
26+
format!("{}/index.html", LocalhostUrl)
27+
.parse()
28+
.expect("FATAL: Failed to parse localhost URL"),
2929
);
3030

3131
// Configure window builder with base settings

Source/Binary/Initialize/StateBuild.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ use log::{debug, error, info, warn};
2121
// ============ Feature Flags ============
2222
#[cfg(feature = "Telemetry")]
2323
use opentelemetry::{KeyValue, global};
24+
#[cfg(feature = "Telemetry")]
25+
use opentelemetry::trace::Tracer;
26+
#[cfg(feature = "Telemetry")]
27+
use opentelemetry::trace::Span;
2428

2529
use crate::{ApplicationState::ApplicationState, Environment::MountainEnvironment::MountainEnvironment};
2630

Source/Binary/Service/VineStart.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ use log::{error, info};
99
/// # Arguments
1010
///
1111
/// * `ApplicationHandle` - The Tauri application handle
12-
/// * `PrimaryAddress` - The primary server address (e.g., "[::1]:50051")
13-
/// * `SecondaryAddress` - The secondary server address (e.g., "[::1]:50052")
12+
/// * `PrimaryAddress` - The primary server address (e.g., "\\[::1\\]:50051")
13+
/// * `SecondaryAddress` - The secondary server address (e.g., "\\[::1\\]:50052")
1414
///
1515
/// # Returns
1616
///

0 commit comments

Comments
 (0)