Skip to main content

Module VineSubscribeCommand

Module VineSubscribeCommand 

Source
Expand description

§VineSubscribeCommand

Tauri command surface that exposes the process-wide Vine notification broadcast (Vine::Client::SubscribeNotifications) to Sky / Wind via a Tauri Channel.

Wind / Sky subscribers consume each frame as it arrives - same ordering, same drop-oldest semantics as the in-process Rust subscribers. The Effect-TS Layer in Element/Wind/Source/Effect/Vine/NotificationStream.ts wraps this into a Stream<NotificationFrame>.

Frame shape on the wire (serde_json):

{
  "sideCarIdentifier": "cocoon-main",
  "method": "Diagnostic.Set",
  "parameters": <payload>,
  "timestampNanos": 17775062973342540
}

Structs§

NotificationFramePayload
Webview-facing notification frame. Mirror of the Rust Vine::Client::NotificationFrame with camelCase field names per Land’s wire convention. Field renames keep Sky’s TS bindings stable even if the Rust struct evolves.

Functions§

vine_subscribe_notifications
Subscribe to the Vine notification broadcast. Each call returns a fresh subscription (own broadcast::Receiver) and spawns a tokio task that drains the receiver onto the supplied Tauri Channel until the webview drops it. Drop-oldest at capacity 4096; slow subscribers may see gaps but never block the producer.
vine_subscriber_count
Diagnostic: how many active subscribers exist on the broadcast. Useful from the frontend for verifying that prior subscriptions haven’t leaked across reloads.