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
Process-wide is not a wording choice (#284 Phase D). Unloading
re-runs BowireProtocolRegistry.Discover against the merged set and
swaps the registry every session reads, so what this file holds takes
effect for everybody on the host at once. It used to be written under
<user-store>/, which on a multi-tenant install gave each
identity their own copy of a list whose effect was shared — so the last
person to touch it decided for everyone, and nobody could see why.
It now resolves against Data: the process's own storage root, which is writable by the account Bowire runs as and does not vary per caller. In single-user mode that is the very same path as before — the flat layout puts a person's state directly in the storage root — so nothing moves on a laptop. On a multi-tenant install the old per-identity copies stop being read; they are left on disk rather than merged, because a union of several people's lists is not any one person's intent, and a protocol disabled by surprise is harder to notice than one that is simply on.
What an individual wants hidden in their own workbench is a different question with a different answer, and it does not live here.
State lives at <storage-root>/disabled-plugins.json so it
survives a host restart. The file is loaded into memory on first access.
Writes go straight to disk (best-effort: if the root 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
pluginIdstring
Returns
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
pluginIdstring
Returns
IsDisabled(string)
True when pluginId is in the disabled set.
public static bool IsDisabled(string pluginId)
Parameters
pluginIdstring
Returns
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
baselineIEnumerable<string>
Returns
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()