Expand description
Cocoon → Mountain notification atoms. One handler per file so the
dispatcher in MountainVinegRPCService::send_cocoon_notification
stays a thin match; each wire method lives at
Vine::Server::Notification::<Atom>::<Atom> for grep-friendly
navigation. See Notification/mod.rs for the contract.
§Vine Cocoon → Mountain Notification Atoms
One handler per file, file name = the exported function name
(reverse-hierarchical path: Vine::Server::Notification::<Atom>::<Atom>).
Each atom encapsulates exactly one wire-method’s side effects so the
main send_cocoon_notification dispatcher in
MountainVinegRPCService.rs stays a thin match that routes into
these files.
§Naming
- Wire string
outputChannel.create→ atom fileOutputChannelCreate.rswithpub async fn OutputChannelCreate(...). - Wire string
unregister_scm_provider→ atom fileUnregisterScmProvider.rs. - Wire string
progress.update→ atom fileProgressUpdate.rs.
Snake_case / dotted wire strings collapse to PascalCase file names.
The function name mirrors the file name verbatim so a grep for
fn <Name> lands in exactly one place.
§Signature contract
Every atom takes the same two parameters:
pub async fn <Atom>(
Service: &MountainVinegRPCService,
Parameter: &serde_json::Value,
);Servicegives access toApplicationHandle(for Tauriemit/ webview lookup) andRunTime(forEnvironment,ApplicationState, provider registry, scheduler).Parameteris the raw JSON payload Cocoon sent; each atom extracts the fields it needs and validates locally.- Return
()- atoms that need to fail just log viadev_log!on thenotif-drop/grpctag; the caller always returnsEmptyto Cocoon because notifications are fire-and-forget.
Modules§
- Debug
Lifecycle - Cocoon → Mountain
debug.addBreakpoints/debug.removeBreakpoints/debug.consoleAppendnotifications. Fans onsky://debug/<suffix>so the Sky-side debug view picks up breakpoint changes and console output from the extension’svscode.debug.*surface. - Decoration
Type Lifecycle - Cocoon → Mountain
window.createTextEditorDecorationType/window.disposeTextEditorDecorationTypenotifications. Forwards the payload onsky://decoration/<suffix>; Sky’s editor renderer owns the Monaco-side decoration lifecycle so Mountain is a pure relay. - Dispose
Status BarItem - Cocoon → Mountain
disposeStatusBarItemnotification. Emitted once byCocoon/.../Services/Window/StatusBar.ts:139when an extension callsStatusBarItem.dispose()(or the whole subscription set tears down). Forwards onto the canonicalsky://statusbar/dispose-entrychannel so the Sky shim’s fan-out listener removes the DOM node. - Extension
Activated - Cocoon → Mountain
ExtensionActivatednotification. Fires once per extension when itsactivateexport resolves (or finishes registering contributions). Forwarded to Wind oncocoon:extensionActivatedso the Extensions sidebar updates its row state without polling. - Extension
Deactivated - Cocoon → Mountain
ExtensionDeactivatednotification. Log-only today - Wind listens oncocoon:extensionActivatedfor the positive half; extensions rarely deactivate at runtime outside uninstall (which fires a separatesky://extensions/uninstalledemit). Kept named so the wire method doesn’t fall tonotif-drop. - Extension
Host Message - Cocoon → Mountain
extensionHostMessagenotification. Forwards the extension-host binary protocol reply to Wind via thecocoon:extensionHostReplyTauri event. Wind’s extension-host bridge consumes these replies to complete pending ext-host RPC calls. - Languages
SetDocument Language - Cocoon → Mountain
languages.setDocumentLanguagenotification. Emitted when an extension callsvscode.languages.setTextDocumentLanguage(document, languageId). Forwarded verbatim to Sky onsky://languages/setDocumentLanguageso Monaco swaps the language mode on the matching editor. - Open
External - Cocoon → Mountain
openExternalnotification. Emitted byCocoon/.../APIFactoryService.ts:393when an extension callsvscode.env.openExternal(uri). Delegates to the platform’s default handler via theopenercrate (already a Mountain dep vianativeHost:openExternal). Fire-and-forget; success/failure is logged but not surfaced back to the extension. - Output
Append - Cocoon → Mountain
output.appendnotification. Emitted byCocoon/.../Services/Window/OutputChannel.ts:50whenever an extension callsOutputChannel.append(text). Forwards verbatim tosky://output/append- the Sky listener mirrors the text into both the in-memoryOutputChannelsmap and VS Code’s logger sink. - Output
Append Line - Cocoon → Mountain
output.appendLinenotification. Emitted byCocoon/.../Services/Window/OutputChannel.ts:56whenever an extension callsOutputChannel.appendLine(text). The stock semantic contract is “append + trailing \n”; we suffix the newline here so the downstreamsky://output/appendlistener stays a single append code path (noappendLinelistener in Sky). - Output
Channel Append - Cocoon → Mountain
outputChannel.appendnotification. Twin ofoutput.append; seeOutputCreate.rsfor the duplicate-wire rationale. - Output
Channel Clear - Cocoon → Mountain
outputChannel.clearnotification (twin ofoutput.clear). - Output
Channel Create - Cocoon → Mountain
outputChannel.createnotification. Parallel wire name tooutput.createused by Cocoon’sSendToMountaincall sites. The two should converge to one in a future Cocoon refactor; for now Mountain handles both by routing into the samesky://output/createchannel. - Output
Channel Dispose - Cocoon → Mountain
outputChannel.disposenotification (twin ofoutput.dispose). - Output
Channel Hide - Cocoon → Mountain
outputChannel.hidenotification. Stock VS Code exposesOutputChannel.hide()as a counterpart toshow(). Sky doesn’t yet render a dismissable panel per-channel, so the signal currently no-ops to a tagged log line. Kept explicit so the wire name doesn’t fall through tonotif-dropon every extension-driven hide. - Output
Channel Show - Cocoon → Mountain
outputChannel.shownotification (twin ofoutput.show). - Output
Clear - Cocoon → Mountain
output.clearnotification. Forwarding atom forOutputChannel.clear()- the Sky listener resets the in-memory buffer for the matching channel. - Output
Create - Cocoon → Mountain
output.createnotification. Emitted byCocoon/.../Services/Window/OutputChannel.ts:39once pervscode.window.createOutputChannel(name)call. Re-emits on the canonicalsky://output/createchannel the SkyOutputChannelsmap already listens for. - Output
Dispose - Cocoon → Mountain
output.disposenotification. Forwarding atom forOutputChannel.dispose()- removes the channel from Sky’sOutputChannelsmap. - Output
Replace - Cocoon → Mountain
output.replacenotification. Emitted when an extension callsLogOutputChannel.replace(value)to swap the channel’s entire contents. Sky doesn’t yet have a dedicatedsky://output/replacelistener, so this atom maps replace → (clear + append) on the existing channels. That preserves semantics without requiring a coordinated Sky-side change. - Output
Show - Cocoon → Mountain
output.shownotification. Forwarding atom forOutputChannel.show(preserveFocus?). - Progress
Complete - Cocoon → Mountain
progress.completenotification. Fires oncevscode.window.withProgress(...)settles - either the task finishes or Cocoon cancels it. Canonical counterpart to Mountain’s already-handledprogress.end; this atom re-routes onto thesky://progress/endchannel so the renderer’s progress indicator tears down regardless of which wire name Cocoon picked. - Progress
End - Cocoon → Mountain
progress.endnotification. Fires once pervscode.window.withProgress(...)call when the task settles. Forwarded ontosky://notification/progress-endso Sky’s progress indicator tears down. - Progress
Report - Cocoon → Mountain
progress.reportnotification. Fires on everyProgress.report({ message, increment })callback within avscode.window.withProgress(...)run. The git extension alone fires 6000+ of these per session during repository scans; emitting one Tauri event per call saturates the WKWebView IPC channel that also delivers keystrokes. Each event is coalesced into a 16ms (one frame) window per Progress handle, accumulatingincrementdeltas and keeping the most recent non-emptymessage. Sky sees one update per frame per progress operation instead of dozens, with the same final cumulative state. - Progress
Start - Cocoon → Mountain
progress.startnotification. Fires at the top of everyvscode.window.withProgress(...)call. Normalises ontosky://notification/progress-beginso Sky’s progress indicator renders identically whether an extension or a Mountain handler triggered the progress. - Progress
Update - Cocoon → Mountain
progress.updatenotification. Cocoon’sServices/Window/Progress.ts:56emits this on everyProgress.report({ message, increment })callback during an extension’svscode.window.withProgress(...)invocation. Stock Mountain already handlesprogress.reportwith identical payload semantics; this atom funnels into the samesky://channel so the notification-surface name mismatch (update vs report) doesn’t leak into the renderer contract. - Register
Command - Cocoon → Mountain
registerCommandnotification. Stores the command as aProxiedhandler in Mountain’sCommandRegistryso subsequentcommands.executeCommandcalls get routed back to Cocoon via$executeContributedCommandgRPC. The sidecar identifier is hard-coded tococoon-mainbecause that is the sole extension-host Cocoon instance today. - Register
ScmProvider - Cocoon → Mountain
register_scm_providernotification. - Register
ScmResource Group - Cocoon → Mountain
register_scm_resource_groupnotification. - Security
Incident - Cocoon → Mountain
security.incidentnotification. Emitted byCocoon/.../Services/SecurityService.ts:284when the Cocoon-side security policy flags a policy breach (extension violated its declared permission set, blocked filesystem access, etc.). Land has no central security dashboard yet, so the atom surfaces the incident viadev_log!on thegrpctag and re-emits onsky://security/incidentfor any future Sky listener. - SetLanguage
Configuration - Cocoon → Mountain
set_language_configurationnotification. Emitted byCocoon/.../APIFactoryService.ts:557when an extension callsvscode.languages.setLanguageConfiguration(languageId, config). Carries brackets / indent rules / word-pattern / comments. Forwards onsky://language/configure; Monaco’s config side reads the payload and callsmonaco.languages.setLanguageConfiguration(...). - SetStatus
BarText - Cocoon → Mountain
setStatusBarTextnotification. Emitted three times byCocoon/.../Services/Window/StatusBar.ts(:92,:123,:131) whenever an extension callsvscode.window.setStatusBarMessage(...), or an extension-ownedStatusBarItem.text = "..."mutates. Distinct from the typedstatusBar.updatenotification (which carries colour/tooltip/command fields): this wire form is the pure text-only fast path. - Status
BarLifecycle - Cocoon → Mountain
statusBar.update/statusBar.disposenotifications. Eachvscode.window.createStatusBarItem(...)instance firesstatusBar.updatewith text / tooltip / alignment;statusBar.disposeremoves the item. Sky’s workbench status-bar renderer subscribes to the downstreamsky://statusbar/*family. - Status
BarMessage - Cocoon → Mountain
statusBar.messagenotification. Emitted when an extension callsvscode.window.setStatusBarMessage(one-shot text, optional auto-hide). Canonical channel issky://statusbar/set-message. - Terminal
Lifecycle - Cocoon → Mountain
terminal.sendText/terminal.show/terminal.hide/terminal.disposenotifications. Shared atom because the four wire methods all fan through the samesky://terminal/*relay and the same provider-side PTY drive, differing only in which provider call fires (sendText vs dispose) and whether the payload carries text. - Unregister
Authentication Provider - Cocoon → Mountain
unregister_authentication_providernotification. Emitted byCocoon/.../AuthenticationNamespace.ts:43when an extension disposes an authentication provider handle. Removes the matchingProviderRegistrationDTOso stale provider state doesn’t pin memory or shadow a later re-register. - Unregister
Command - Cocoon → Mountain
unregisterCommandnotification. Paired withregisterCommand; removes the proxiedCommandHandlerso subsequentcommands.executeCommandno longer routes back to the extension. - Unregister
Debug Adapter - Cocoon → Mountain
unregister_debug_adapternotification. Emitted byCocoon/.../DebugNamespace.ts:38when an extension disposes a debug adapter descriptor factory. MirrorsUnregisterAuthenticationProviderbut for the DebugAdapter slot. - Unregister
File System Provider - Cocoon → Mountain
unregister_file_system_providernotification. Emitted byCocoon/.../WorkspaceNamespace/Providers.ts:78onFileSystemProviderdisposal. Scheme-bound: the pairedregister_file_system_providerstores the scheme in the provider selector so filesystem router lookups stop routing to this handle. - Unregister
ScmProvider - Cocoon → Mountain
unregister_scm_providernotification. Emitted byCocoon/.../ScmNamespace.ts:82whenvscode.scm.createSourceControl(...).dispose()fires. The pairedRegisterScmProvidertyped gRPC (RPC/CocoonService/SCM.rs) derives the handle as a DJB-style hash of thescmId; we recompute the same hash here so unregister cleans up the exact entryRegisterScmProviderstored without needing Cocoon to hand the u32 back over the wire. - Unregister
Task Provider - Cocoon → Mountain
unregister_task_providernotification. Emitted byCocoon/.../TasksNamespace.ts:35whenvscode.tasks.registerTaskProvider(...).dispose()fires. - Unregister
UriHandler - Cocoon → Mountain
unregister_uri_handlernotification. Emitted byCocoon/.../WindowNamespace.ts:786whenvscode.window.registerUriHandler(...).dispose()fires. Carries the handle the pairedregister_uri_handlerstored and (optionally) the scheme bound to it. - Update
ScmGroup - Cocoon → Mountain
update_scm_groupnotification. - Webview
Dispose - Cocoon → Mountain
webview.disposenotification. Emitted byCocoon/.../Services/Window/WebviewPanel.ts:155when the extension disposes a webview panel or the user closes the tab. Sky’s webview shim listens onsky://webview/disposeand tears down the DOM container + unregisters the handle lookup. - Webview
Lifecycle - Cocoon → Mountain
webview.setTitle/webview.setIconPath/webview.setHtmlnotifications. Shared atom because the three wire methods map to the same suffix-split pattern; keeping them in one file avoids three near-identical 5-line files while still pinning the handler to a discoverable filename. - Webview
Post Message - Cocoon → Mountain
webview.postMessagenotification. Emitted byCocoon/.../Services/Window/WebviewPanel.ts:125when an extension callsWebviewPanel.webview.postMessage(...). Stock VS Code delivers this as a DOMmessageevent inside the webviewiframe; in Land we emit onsky://webview/postMessageand let the Sky bridge relay into the specific webview DOM container keyed on{ handle, message }. - Webview
Ready - Cocoon → Mountain
WebviewReadynotification. Fires when a webview the extension owns has finished loading its entry HTML. Log-only today - Sky’s webview shim handles the DOM-side readiness independently. Kept named so the wire method is observable and doesn’t fall tonotif-drop. - Window
Create Terminal - Cocoon → Mountain
window.createTerminalnotification. Fire-and-forget from Cocoon’svscode.window.createTerminal(...)shim. Spawns the PTY via the registeredTerminalProviderso the xterm panel starts receiving data immediately, then emitssky://terminal/createwith the provider-minted id/pid/name so Sky can correlate the panel with the extension-owned terminal instance. - Window
Show Message - Cocoon → Mountain
window.showMessagenotification. Fires when an extension callsvscode.window.showInformationMessage/showWarningMessage/showErrorMessage. Forwards onsky://notification/showso the toast stack renders without a round-trip back to Cocoon. - Window
Show Text Document - Cocoon → Mountain
window.showTextDocumentnotification. Fires when an extension callsvscode.window.showTextDocument(uri, options). Extension activation commonly uses this for “jump to definition” and “reveal config”. Forwarded onsky://window/showTextDocument. - Workspace
Apply Edit - Cocoon → Mountain
workspace.applyEditnotification. Fires when an extension callsvscode.workspace.applyEdit(edit)with a multi-fileWorkspaceEdit. The payload shape matches VS Code’sIWorkspaceEdit; Sky’s BulkEditService applies the edits against open models.