Class SidecarPluginDiscovery

Namespace
Kuestenlogik.Bowire.Plugins.Sidecar
Assembly
Kuestenlogik.Bowire.dll

Scans the user plugin directory for sidecar plugins — subdirectories that contain a sidecar.json manifest. Each discovered manifest becomes one SidecarBowireProtocol registered alongside the .NET plugins the assembly scanner picks up.

public static class SidecarPluginDiscovery
Inheritance
SidecarPluginDiscovery
Inherited Members

Fields

ManifestFileName

The conventional filename that marks a directory as a sidecar plugin.

public const string ManifestFileName = "sidecar.json"

Field Value

string

Properties

DefaultPluginRoot

The host's plugin root: ~/.bowire/plugins/ unless the host was pointed elsewhere (--plugin-dir and friends, #549).

public static string DefaultPluginRoot { get; }

Property Value

string

Remarks

Deliberately the same answer the .NET plugin loader uses, so a sidecar and a .NET plugin live side-by-side under one root in different subdirectories — and so a host that moved its plugin directory moves both, rather than leaving the sidecars behind.

Methods

Discover(string?, ISet<string>?, ILogger?)

Find every sidecar.json directly under pluginRoot and instantiate one SidecarBowireProtocol per valid manifest. Missing root directory returns an empty list (not an error — most hosts don't have sidecars installed).

public static IReadOnlyList<SidecarBowireProtocol> Discover(string? pluginRoot = null, ISet<string>? disabledPluginIds = null, ILogger? logger = null)

Parameters

pluginRoot string

Plugin root dir; null = default.

disabledPluginIds ISet<string>

Same disable list the .NET scanner uses; matched on the manifest's protocol.id.

logger ILogger

Optional logger for malformed-manifest warnings.

Returns

IReadOnlyList<SidecarBowireProtocol>