Creates a new KernelBridge instance.
Private_Private Readonly_Private Readonly_Private Readonly_Broadcasts kernel selection to all registered webviews. Used when a runtime is selected that should apply to multiple documents.
Selected runtime to broadcast
Broadcasts kernel termination to all registered webviews. Used when a runtime is terminated that affects multiple documents.
Connects a webview document (notebook or lexical) to a runtime. Sends runtime information to the webview for ServiceManager creation.
Document URI
Selected runtime
Connects a webview document to a local kernel (Python environment, Jupyter kernel, or Jupyter server). Starts the kernel and sends kernel information to the webview.
Document URI
Native kernel information
Connects a webview document (notebook or lexical) to Pyodide kernel. Sends Pyodide kernel type to the webview for in-browser execution.
Document URI
Detects the type of notebook (native vs webview).
Notebook URI
"webview" for Datalayer notebooks, "native" for others
Disposes of the bridge and cleans up resources.
PrivatefindFinds webview panels for a given URI. Searches through active tab groups.
Notebook URI
Array of matching webview panels
Gets the current kernel info for a notebook.
Notebook URI
Kernel information or undefined
Gets a local kernel client by ID. Used by network proxy to route messages to local ZMQ kernels.
Kernel identifier
Local kernel client or undefined
PrivategetHandles kernel lifecycle commands.
Notebook URI
Command to execute
Registers a webview panel for kernel communication.
Notebook URI
Webview panel
Unregisters a webview panel.
Notebook URI
Bridges kernel connections between VS Code and notebooks. Routes to WebSocket for native notebooks or webview messages for Datalayer notebooks.