Namespace Kuestenlogik.Bowire.PluginLoading

Classes

BowirePluginHost

Lifecycle manager for Bowire plugin AssemblyLoadContexts. Tracks one BowirePluginLoadContext per plugin directory (keyed by the directory's leaf name, which is the package id), and supports Unload(string) + Reload(string) so embedded hosts can swap a plugin in-process after bowire plugin update has rewritten its files.

BowirePluginLoadContext

Per-plugin AssemblyLoadContext that isolates plugin-private dependencies from the host and from other plugins. Plugins can carry their own versions of third-party libraries without clashing with another plugin's copy; shared contract assemblies — Kuestenlogik.Bowire*, the BCL, and the ASP.NET framework — are delegated to the default ALC so IBowireProtocol and friends keep a single identity across every context.

MissingPlugin

Diagnostic shape for a missing plugin: the recording referenced ProtocolId, but no IBowireProtocol with that id is loaded. SuggestedPackageId is the canonical NuGet package — null when the protocol isn't in PluginPackageMap's hardcoded catalogue (custom plugin from a third party).

PluginLoadResult

Outcome of attempting to load one plugin from disk. Returned (alongside every other plugin's result) by the loader so the host can surface per-plugin health to operators instead of silently skipping a broken install. Status distinguishes the failure modes the loader can detect deterministically; ErrorMessage carries a human-readable explanation suitable for logs and /api/plugins/health.

PluginLoadResultStore

Process-wide store of the most recent PluginLoadResult set the plugin loader produced. Lives in the core (Kuestenlogik.Bowire) so endpoints under Kuestenlogik.Bowire.Endpoints can read it without taking a dependency on the CLI assembly (Kuestenlogik.Bowire.Tool) where the PluginManager lives. The loader publishes results via Publish(IReadOnlyList<PluginLoadResult>) on every LoadPlugins call; the /api/plugins/health endpoint reads Latest.

PluginPackageMap

Static lookup from a recording's lowercased protocol id ("grpc", "signalr", "socketio", …) to the canonical NuGet package id ("Kuestenlogik.Bowire.Protocol.Grpc", …).

Used by the bowire mock CLI to suggest install commands when a recording references a protocol whose plugin isn't loaded, and by the workbench's "missing plugin" modal for the same purpose.

The map is hardcoded on purpose: the whole reason we're guessing a package id is that the plugin isn't installed yet, so we can't read the manifest off disk. Adding a new first-party plugin means appending one line here.

Enums

PluginLoadStatus

Reasons a plugin load can land in.