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§
- Apply
Text Edits - Cocoon → Mountain
window.applyTextEditsnotification. - 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>as a batch; Sky demultiplexes back to per-decorationcel:decoration:*CustomEvents. - 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 - 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 - Output
Channel Coalesce - Per-channel coalescing buffer for
outputChannel.appendnotifications. - Output
Channel Create - Output
Channel 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 - Output
Clear - Output
Create - Output
Dispose - 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 - Progress
Complete - 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. - 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 - Register
Command - Cocoon → Mountain
registerCommandnotification. Stores the command as aProxiedhandler in Mountain’sCommandRegistryso subsequentcommands.executeCommandcalls get routed back to Cocoon via$executeContributedCommandgRPC. - Register
Language Provider - Handles all
register_*/register_*_providergRPC notifications from the Cocoon extension host. Each such notification wires a language-feature provider into Mountain’sProviderRegistrationkeyed onHandle; the language-feature RPC path (e.g.GetHoverAtPosition) then proxies back to Cocoon with the original$providerXxxmethod. - 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. - SetText
Editor Decorations - Cocoon → Mountain
window.setTextEditorDecorationsnotification. - 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. - Support
- Shared utilities for Cocoon → Mountain notification atoms.
- 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 authenticationprovider-unregistration atom.- Unregister
Command - Cocoon → Mountain
unregisterCommandnotification. Paired withregisterCommand; removes the proxiedCommandHandlerso subsequentcommands.executeCommandno longer routes back to the extension. - Unregister
Debug Adapter debug_adapterprovider-unregistration atom.- Unregister
Debug Configuration Provider debug_configurationprovider-unregistration atom.- Unregister
File System Provider unregister_file_system_provider— disposes a scheme-bound FS provider. Logs the scheme so routing mismatches are visible after disposal.- 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 taskprovider-unregistration atom.- Unregister
UriHandler unregister_uri_handler— disposes a URI-handler provider handle. Logs the optional bound scheme alongside the handle for traceability.- 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.setHtml/webview.postMessage/webview.updateView/webview.viewState/webview.disposenotifications. Shared atom because the methods all map to the same suffix-split pattern; keeping them in one file avoids 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.