Class BowireDisabledPluginsStore

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

Process-wide, disk-persisted store of plugin ids that have been "unloaded" via the Settings → Plugins UI. Acts as the in-process extension of DisabledPlugins: the latter carries the host-startup baseline (appsettings.json / --disable-plugin CLI flag) which Bowire never rewrites because it has no general-purpose appsettings.json writer; this store carries the runtime layer that operators flip from the workbench UI.

public static class BowireDisabledPluginsStore
Inheritance
BowireDisabledPluginsStore
Inherited Members

Remarks

State lives at <user-store>/disabled-plugins.json so it survives a host restart. Reads are lock-free and lazy — the file is loaded into memory on first access. Writes go straight to disk (best-effort: if the user-profile is read-only, the in-memory set still reflects the change for the current session).

IDs are matched case-insensitively against Id. The wire format is intentionally minimal so operators can diff / hand-edit the file:

{ "disabled": ["grpc", "mqtt"] }

Methods

Disable(string)

Add pluginId to the disabled set and persist to disk. Returns true when the set changed (false when the id was already disabled).

public static bool Disable(string pluginId)

Parameters

pluginId string

Returns

bool

Enable(string)

Remove pluginId from the disabled set and persist to disk. Returns true when the set changed.

public static bool Enable(string pluginId)

Parameters

pluginId string

Returns

bool

IsDisabled(string)

True when pluginId is in the disabled set.

public static bool IsDisabled(string pluginId)

Parameters

pluginId string

Returns

bool

MergeWith(IEnumerable<string>?)

Combine the host-startup baseline (baseline, typically DisabledPlugins) with the runtime layer from this store. Used by the lifecycle endpoint when re-running discovery so a UI-triggered re-load doesn't silently un-disable a plugin the operator pinned in appsettings.json.

public static IEnumerable<string> MergeWith(IEnumerable<string>? baseline)

Parameters

baseline IEnumerable<string>

Returns

IEnumerable<string>

Snapshot()

Snapshot of currently-disabled plugin ids. Returns a fresh HashSet<T> so callers can iterate without worrying about concurrent mutation.

public static IReadOnlySet<string> Snapshot()

Returns

IReadOnlySet<string>