Skip to content

Commit 458377b

Browse files
feat(Mountain): Add Node binary resolver and extension path environment variables
Implement two significant features for Cocoon sidecar spawning and extension management: 1. **NodeResolver (Atom N1):** New module that resolves Node.js binary for Cocoon spawn, checking in order: explicit override (LAND_NODE_BINARY), shipped runtime (Tauri bundle or dev-tree sibling), version managers (fnm, volta, asdf, nvm), Homebrew, and PATH fallback. Logs source for forensics. 2. **Extension path configuration (Atom U1):** Add support for environment variables controlling extension scan paths: - LAND_DISABLE_BUILTIN_EXTENSIONS: Same effect as LAND_SKIP_BUILTIN_EXTENSIONS - LAND_BUILTIN_EXTENSIONS_DIR: Override bundle path for CI builds - LAND_USER_EXTENSIONS_DIR: Override ~/.land/extensions for sandboxes - LAND_EXTRA_EXTENSIONS_DIRS: Multi-path separator (semicolon Windows, colon elsewhere) - LAND_DEV_EXTENSIONS_DIR: Development extensions that always load 3. **Profile sentinel fix:** Replace runtime std::env::var("LAND_PROFILE") with compile-time option_env! in build.rs so profile resolves correctly after binary launch (previously showed "unknown" when run outside Build.sh shell). 4. **IPC handler improvements:** Add extensions:resetPinnedStateForAllUserExtensions handler (Atom P1), improve error handling in showSaveDialog/showMessageBox with proper Join handling.
1 parent edeef4b commit 458377b

51 files changed

Lines changed: 729 additions & 265 deletions

Some content is hidden

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

CHANGELOG.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
All notable changes to Mountain (Rust Backend) are documented here.
44
Format: [Keep a Changelog](https://keepachangelog.com/).
55

6-
## [v2.1] Q2 2026: Full Workbench Lift
6+
## [v2.1] - Q2 2026: Full Workbench Lift
77

88
### Added
99

@@ -43,20 +43,20 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
4343
- node_modules path resolution in vscode-file scheme handler
4444
- Cocoon connection retry intervals with race condition prevention
4545

46-
## [v2.0] Q1 2026: Editor Launch Sprint
46+
## [v2.0] - Q1 2026: Editor Launch Sprint
4747

4848
### January (374 commits): Foundation and Binary Module Architecture
4949

5050
#### Added
5151

5252
- `Source/Binary/` modular startup system:
53-
- `Tray/` SwitchTrayIcon.rs, EnableTray.rs
54-
- `Shutdown/` SchedulerShutdown.rs, RuntimeShutdown.rs
55-
- `Service/` VineStart.rs (gRPC on 50051/50052), CocoonStart.rs,
53+
- `Tray/` - SwitchTrayIcon.rs, EnableTray.rs
54+
- `Shutdown/` - SchedulerShutdown.rs, RuntimeShutdown.rs
55+
- `Service/` - VineStart.rs (gRPC on 50051/50052), CocoonStart.rs,
5656
ConfigurationInitialize.rs
57-
- `Register/` AdvancedFeaturesRegister.rs, IPCServerRegister.rs,
57+
- `Register/` - AdvancedFeaturesRegister.rs, IPCServerRegister.rs,
5858
StatusReporterRegister.rs, WindSyncRegister.rs
59-
- `Initialize/` RuntimeBuild.rs, StateBuild.rs, CLI argument parser,
59+
- `Initialize/` - RuntimeBuild.rs, StateBuild.rs, CLI argument parser,
6060
dynamic port selection
6161
- 20+ Tauri commands exposed: WorkbenchConfigurationQuery,
6262
DesktopConfigurationQuery, UpdateSubscriptionEndpoint, TrayIconSwitch,
@@ -87,7 +87,7 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
8787

8888
#### Added
8989

90-
- `Source/ApplicationState/State/FeatureState/Debug/` DebugState.rs (155
90+
- `Source/ApplicationState/State/FeatureState/Debug/` - DebugState.rs (155
9191
lines) with DebugConfigurationProviderRegistration and
9292
DebugAdapterDescriptorFactoryRegistration
9393
- TreeView badge: SetBadge() method with length validation
@@ -102,11 +102,11 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
102102
display_name → extension_id, GitExecRequest repository/cwd →
103103
repository_path/args
104104

105-
## [v1.3] Q4 2025: Dependency Maintenance
105+
## [v1.3] - Q4 2025: Dependency Maintenance
106106

107107
### Added
108108

109-
- `gen/schemas/macOS-schema.json` platform-specific capabilities for tray,
109+
- `gen/schemas/macOS-schema.json` - platform-specific capabilities for tray,
110110
menu bar, dock integration
111111

112112
### Changed
@@ -115,7 +115,7 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
115115
- actions/checkout 5.0.0 → 6.0.1
116116
- Regular `.github/Update.md` auto-increments
117117

118-
## [v1.2] Q3 2025: Full Stack Integration
118+
## [v1.2] - Q3 2025: Full Stack Integration
119119

120120
### Changed
121121

@@ -125,28 +125,28 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
125125
- Build artifacts renamed with "22NodeVersion" label for Node.js versioning
126126
- Windows installer naming standardized across debug/release profiles
127127

128-
## [v1.1] Q2 2025: Architecture Buildout
128+
## [v1.1] - Q2 2025: Architecture Buildout
129129

130-
**185 commits the complete architecture implementation quarter.**
130+
**185 commits - the complete architecture implementation quarter.**
131131

132132
### Added
133133

134-
- `Source/Command/` CommandRegistry, Keybinding, LanguageFeature,
134+
- `Source/Command/` - CommandRegistry, Keybinding, LanguageFeature,
135135
SourceControlManagement, TreeView, Bootstrap, Hover
136-
- `Source/Environment/` 14 provider implementations: ConfigurationProvider,
136+
- `Source/Environment/` - 14 provider implementations: ConfigurationProvider,
137137
DocumentProvider, FileSystemProvider, OutputProvider, SearchProvider,
138138
SecretProvider, StatusBarProvider, StorageProvider, TerminalProvider,
139139
TreeViewProvider, UserInterfaceProvider, WebviewProvider, WorkspaceProvider,
140140
Utility
141-
- `Source/ProcessManagement/` CocoonManagement, InitializationData
142-
- `Source/RunTime/` ApplicationRunTime executable lifecycle
143-
- `Source/Track/` DispatchLogic, EffectCreation (request routing and effect
141+
- `Source/ProcessManagement/` - CocoonManagement, InitializationData
142+
- `Source/RunTime/` - ApplicationRunTime executable lifecycle
143+
- `Source/Track/` - DispatchLogic, EffectCreation (request routing and effect
144144
system)
145-
- `Source/Update/` UpdateService
146-
- `Source/Workspace/` WorkSpaceFileService
147-
- `Source/FileSystem/` FileExplorerViewProvider
148-
- `Source/Vine/Server/` MountainVinegRPCService, Initialize.rs
149-
- `Source/Vine/Generated/vine_ipc.rs` 1,714 lines auto-generated from
145+
- `Source/Update/` - UpdateService
146+
- `Source/Workspace/` - WorkSpaceFileService
147+
- `Source/FileSystem/` - FileExplorerViewProvider
148+
- `Source/Vine/Server/` - MountainVinegRPCService, Initialize.rs
149+
- `Source/Vine/Generated/vine_ipc.rs` - 1,714 lines auto-generated from
150150
Vine.proto
151151
- Node.js sidecar bundled (Target/debug/node.exe, Target/release/node.exe)
152152
- Build artifacts: .exe, .msi Windows installers
@@ -159,29 +159,29 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
159159
- `docs/Deep Dive.md` rewritten (182 lines)
160160
- License transitioned to CC0 1.0 Universal
161161

162-
## [v1.0] Q1 2025: Integration Phase
162+
## [v1.0] - Q1 2025: Integration Phase
163163

164164
### Added
165165

166166
- `Source/ApplicationState/` reorganization:
167-
- `Internal/` Persistence, Recovery, TextProcessing, PathResolution,
167+
- `Internal/` - Persistence, Recovery, TextProcessing, PathResolution,
168168
ExtensionScanner, Serialization
169-
- `DTO/` 12 DTO classes (DocumentStateDTO, TerminalStateDTO,
169+
- `DTO/` - 12 DTO classes (DocumentStateDTO, TerminalStateDTO,
170170
TreeViewStateDTO, WindowStateDTO, etc.)
171-
- `State/` organized feature state classes
172-
- `.github/workflows/Auto.yml` (68 lines) automated update/push CI
173-
- `Knowledge.dot` + `Knowledge.svg` module dependency graph (Graphviz)
171+
- `State/` - organized feature state classes
172+
- `.github/workflows/Auto.yml` (68 lines) - automated update/push CI
173+
- `Knowledge.dot` + `Knowledge.svg` - module dependency graph (Graphviz)
174174

175175
### Changed
176176

177177
- Deprecated `Source/app_state/``Source/ApplicationState/`
178178
- Cargo.toml: removed 45 redundant entries, added 17 new entries
179179

180-
## [v0.2] Q4 2024: Architecture Solidification
180+
## [v0.2] - Q4 2024: Architecture Solidification
181181

182182
### Added
183183

184-
- `gen/android/` full Android Gradle project scaffold:
184+
- `gen/android/` - full Android Gradle project scaffold:
185185
- AndroidManifest.xml, MainActivity.kt
186186
- RustPlugin.kt, BuildTask.kt (Rust → Android cross-compilation)
187187
- Resources: drawable, mipmap (hdpi through xxxhdpi), layout, values
@@ -190,7 +190,7 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
190190
- Cargo.toml feature flags: AirIntegration, ExtensionHostCocoon, MistNative,
191191
Debug, grove, cocoon, terminals, debug-protocol, scm-support, Telemetry
192192

193-
## [v0.1] Q3 2024: Rapid Development
193+
## [v0.1] - Q3 2024: Rapid Development
194194

195195
### Changed
196196

@@ -199,19 +199,19 @@ Format: [Keep a Changelog](https://keepachangelog.com/).
199199
- Binary function refactoring: `Source/Fn/Binary.rs` 106 → ~20 lines
200200
- Added `Source/Fn/Binary/Notes.md` (91 lines) architecture documentation
201201

202-
## [v0.0] Q2 2024: Project Inception
202+
## [v0.0] - Q2 2024: Project Inception
203203

204204
### Added
205205

206206
- Project relocated from `Editor/editor/src-tauri/` to monorepo root
207-
- `Source/Library.rs` single Tauri entry point
208-
- `tauri.conf.json` (94 lines) bundle targets: Windows NSIS, macOS DMG, deb
209-
- `build.rs` Tauri build system integration
207+
- `Source/Library.rs` - single Tauri entry point
208+
- `tauri.conf.json` (94 lines) - bundle targets: Windows NSIS, macOS DMG, deb
209+
- `build.rs` - Tauri build system integration
210210
- `.github/workflows/Rust.yml` (78 lines), `GitHub.yml` (57 lines),
211211
`dependabot.yml`
212212
- App icons: PNG, ICNS, ICO, Windows tile assets
213-
- `capabilities/` Tauri capabilities manifest
214-
- `gen/schemas/` desktop-schema.json, windows-schema.json
213+
- `capabilities/` - Tauri capabilities manifest
214+
- `gen/schemas/` - desktop-schema.json, windows-schema.json
215215

216216
### Dependencies (First Release)
217217

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,19 +130,19 @@ TierLoggerRing = []
130130
TierFileSystemLayer4 = []
131131
# Tier:FindFiles:Layer4 🟣 Experimental
132132
TierFindFilesLayer4 = []
133-
# Tier:Glob:Native 🟣 Experimental globset-compiled patterns
133+
# Tier:Glob:Native 🟣 Experimental - globset-compiled patterns
134134
TierGlobNative = []
135-
# Tier:FileWatcher:Layer4 🟣 Experimental notify-rs FS events (dep is already on the crate)
135+
# Tier:FileWatcher:Layer4 🟣 Experimental - notify-rs FS events (dep is already on the crate)
136136
TierFileWatcherLayer4 = []
137137
# Tier:SchemeAssets:Hybrid 🟣 Experimental
138138
TierSchemeAssetsHybrid = []
139139
# Tier:Configuration:Eager 🟣 Experimental
140140
TierConfigurationEager = []
141141
# Tier:Diagnostics:Delta 🟣 Experimental
142142
TierDiagnosticsDelta = []
143-
# Tier:Clipboard:Layer4 🟣 Experimental arboard crate is on the crate unconditionally
143+
# Tier:Clipboard:Layer4 🟣 Experimental - arboard crate is on the crate unconditionally
144144
TierClipboardLayer4 = []
145-
# Tier:OpenExternal:Layer4 🟣 Experimental `open` crate is on the crate unconditionally
145+
# Tier:OpenExternal:Layer4 🟣 Experimental - `open` crate is on the crate unconditionally
146146
TierOpenExternalLayer4 = []
147147
# Tier:ExtensionScan:Parallel 🟣 Experimental
148148
TierExtensionScanParallel = []

Source/ApplicationState/DTO/ExtensionDescriptionStateDTO.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ const MAX_ACTIVATION_EVENTS:usize = 100;
4949
pub struct ExtensionDescriptionStateDTO {
5050
// --- Core Metadata ---
5151
/// Extension identifier: { value: string, uuid?: string }
52-
/// Not present in package.json constructed from publisher.name after
52+
/// Not present in package.json - constructed from publisher.name after
5353
/// parsing.
5454
#[serde(default)]
5555
pub Identifier:Value,

Source/ApplicationState/Internal/ExtensionScanner/ScanAndPopulateExtensions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ pub async fn ScanAndPopulateExtensions(
9797
rejected_empty_identifier += 1;
9898
dev_log!(
9999
"extensions",
100-
"warn: [ExtensionScanner] Rejected extension '{}' empty identifier (publisher='{}', \
100+
"warn: [ExtensionScanner] Rejected extension '{}' - empty identifier (publisher='{}', \
101101
Identifier={:?})",
102102
extension.Name,
103103
extension.Publisher,

Source/ApplicationState/State/WorkspaceState/WorkspaceDelta.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn FolderToWire(Folder:&WorkspaceFolderStateDTO) -> serde_json::Value {
3434
}
3535

3636
/// Dispatch `$deltaWorkspaceFolders` to Cocoon. Returns immediately if both
37-
/// arrays are empty no point waking the sidecar for a no-op mutation.
37+
/// arrays are empty - no point waking the sidecar for a no-op mutation.
3838
///
3939
/// Errors are logged and swallowed: the workspace state is already updated by
4040
/// the caller, so a failed notification should not roll the mutation back. The
@@ -77,7 +77,7 @@ pub async fn DispatchDeltaWorkspaceFolders(Added:Vec<WorkspaceFolderStateDTO>, R
7777
/// Spawns the notification on the current tokio runtime so callers in sync
7878
/// contexts (Tauri command handlers, boot-time seeding) don't have to build an
7979
/// async scope just to reach Cocoon. If no runtime is available (very early
80-
/// boot, unit tests), the notification is dropped the state still mutates.
80+
/// boot, unit tests), the notification is dropped - the state still mutates.
8181
pub fn UpdateWorkspaceFoldersAndNotify(
8282
State:&crate::ApplicationState::State::WorkspaceState::State,
8383
Folders:Vec<WorkspaceFolderStateDTO>,
@@ -93,7 +93,7 @@ pub fn UpdateWorkspaceFoldersAndNotify(
9393
} else {
9494
dev_log!(
9595
"workspaces",
96-
"warn: [LandFix:WsDelta] No tokio runtime available delta dropped ({} added, {} removed)",
96+
"warn: [LandFix:WsDelta] No tokio runtime available - delta dropped ({} added, {} removed)",
9797
Added.len(),
9898
Removed.len()
9999
);
@@ -148,7 +148,7 @@ pub fn UpdateWorkspaceFoldersAndBroadcast<R:tauri::Runtime>(
148148

149149
/// Append every folder in `Added` to `~/.land/workspaces/RecentlyOpened.json`,
150150
/// deduping by URI and capping at 50 entries (the VS Code default). Swallows
151-
/// every error a failed write must not prevent the workspace change.
151+
/// every error - a failed write must not prevent the workspace change.
152152
fn PersistRecentlyOpened(Added:&[WorkspaceFolderStateDTO]) {
153153
if Added.is_empty() {
154154
return;

Source/Binary/Build/LocalhostPlugin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const OTLP_HOST:&str = "127.0.0.1:4318";
2525
/// actually loads; the patched plugin keeps our value instead of overwriting.
2626
///
2727
/// Returns `None` for unknown extensions so the plugin's `asset.mime_type`
28-
/// fallback still applies (e.g. images, fonts, WASM the asset resolver
28+
/// fallback still applies (e.g. images, fonts, WASM - the asset resolver
2929
/// handles those correctly).
3030
fn MimeFromUrl(Url:&str) -> Option<&'static str> {
3131
// Strip query string / fragment before extension match.

Source/Binary/Build/Scheme.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -771,7 +771,7 @@ pub fn VscodeFileSchemeHandler<R:tauri::Runtime>(
771771
// to render pretty stack traces. Our `Static/Application/` tree ships the
772772
// JS files without their `.map` siblings (esbuild's `sourcemap:false` path)
773773
// so those requests always 404. Short-circuit here with a clean
774-
// `204 No Content` Chromium treats 204 as "no map available" and moves
774+
// `204 No Content` - Chromium treats 204 as "no map available" and moves
775775
// on silently, avoiding both the noisy stderr lines and the filesystem
776776
// stat round-trip per request.
777777
if CleanPath.ends_with(".map") {

Source/Binary/Debug/TraceLog.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// TraceLog debug tracing macro for fine-grained execution step tracking.
1+
// TraceLog - debug tracing macro for fine-grained execution step tracking.
22

33
/// Logs a checkpoint message at TRACE level (for "every step" tracing).
44
///

0 commit comments

Comments
 (0)