Skip to content

verso-v1.0.4

Choose a tag to compare

@github-actions github-actions released this 23 Feb 00:28
· 282 commits to main since this release

Feature release adding the #!extension magic command for dynamic extension loading, a user-consent flow for remote extension packages, support for multiple magic commands per cell, and several VS Code stability fixes.

#!extension Magic Command

  • New #!extension magic command for loading Verso extensions at runtime
  • NuGet packages: #!extension PackageId [Version] resolves the package, prompts for user consent, loads all [VersoExtension] types, and stores assembly paths for kernel references
  • Local DLLs: #!extension ./path/to/MyExtension.dll loads extensions directly from a local assembly file without a consent dialog, with paths resolved relative to the notebook directory
  • Cross-platform path normalization: backslash paths authored on Windows resolve correctly on macOS/Linux
  • Idempotent: re-running a cell that already loaded an extension skips with a message instead of failing
  • Developer-friendly error messages for file not found, invalid assemblies, and zero-extension DLLs

Extension Consent Flow

  • User-consent dialog shown before loading remote NuGet extension packages
  • ExtensionConsentDialog Blazor component with styled modal (shared across Server and WASM)
  • Pre-scan on notebook open: #!extension directives are detected and consent is requested proactively so packages are pre-approved before cell execution
  • Pre-scan on Jupyter import: imported notebooks containing #!extension directives trigger consent during the import flow
  • Approved packages are tracked per session so subsequent cells referencing the same package skip the consent prompt
  • ExtensionHost.ConsentHandler delegate enables host-agnostic consent routing (Blazor Server shows inline, VS Code WASM routes through JSON-RPC)

Multiple Magic Commands per Cell

  • Cells can now contain multiple consecutive magic commands (e.g. two #!extension lines, or #!nuget followed by #!time)
  • Execution pipeline loops through magic commands until the first non-magic line, then hands remaining code to the kernel
  • Each command executes in order with its own context; SuppressExecution from any command stops the cell immediately

Dynamic Extension Registration

  • Subsystems (LayoutManager, ThemeEngine, SettingsManager) now refresh when extensions are loaded at runtime via ExtensionHost.OnExtensionLoaded
  • Dynamically loaded layouts, themes, and settings appear in the UI immediately without a restart or reload
  • Scaffold.RefreshSubsystems() preserves the active layout and theme selection during refresh

VS Code Extension Fixes

  • Deadlock fix: Concurrent stdin reading via Channel<T> prevents the host process from locking up when extension consent requests block the main loop
  • Extension change notifications: Host sends extension/changed notification to the webview when extensions load dynamically; WASM client refreshes cached extension, layout, and theme lists
  • Modal styling: Extension consent dialog CSS included in the shared Blazor project so it renders correctly in both Server and WASM
  • Content Security Policy: Relaxed CSP to allow https: sources in script, style, font, image, and connect directives, enabling HTML cells to load external libraries (e.g. charting, visualization)
  • UTF-8 console encoding: Force Console.InputEncoding and Console.OutputEncoding to UTF-8 to prevent corruption of non-ASCII JSON-RPC messages on Windows