Interface IBowireUiExtension

Namespace
Kuestenlogik.Bowire.Semantics.Extensions
Assembly
Kuestenlogik.Bowire.dll

Server-side descriptor for a Bowire UI extension (viewer and/or editor). Discovered via assembly scan over types tagged with BowireExtensionAttribute; surfaced to the workbench through the /api/ui/extensions JSON endpoint, which the JS loader iterates at boot to know which bundles to fetch and which kinds the extension claims.

public interface IBowireUiExtension

Remarks

The contract is deliberately minimal in v1.0 — anything beyond id / kinds / bundle resource names risks locking the API surface into decisions that haven't been validated yet. Permissions, dependent kinds, and per-extension capabilities widening land additively in v1.x minor versions.

JS-side registration happens through window.BowireExtensions.register({...}). The C# descriptor here exists so the workbench can locate + serve the JS bundle (and stylesheet) from the local Bowire host without an external CDN reference — the offline-safe guarantee the ADR pins.

Properties

AdditionalAssetNames

Extra asset names served under /api/ui/extensions/{Id}/{name}. Use this list to ship vendor libraries (e.g. a map renderer's JS + CSS), embedded glyph PBFs, sprite atlases or LICENSE files that the JS bundle needs to dynamic-load at runtime. The asset-serving endpoint only resolves request paths whose leaf filename appears in this list (or matches the bundle / styles names) — anything else is rejected with 404 so the endpoint never serves arbitrary files out of the plugin assembly.

IReadOnlyList<string> AdditionalAssetNames { get; }

Property Value

IReadOnlyList<string>

Remarks

Default implementation returns an empty list — most extensions only ship the bundle + optional stylesheet and don't need this surface.

BowireApiRange

Semver range the extension declares compatibility with — e.g. "1.x" for any v1 of the Bowire API. The workbench compares this against its own Bowire API version on load; a mismatch shows the extension in a disabled state with a "needs Bowire {x}.x" badge instead of mounting it.

string BowireApiRange { get; }

Property Value

string

BundleResourceName

Embedded-resource name of the JS bundle that calls window.BowireExtensions.register({...}). Resolved against the declaring assembly via GetManifestResourceStream(string) (prefixed with the assembly's default namespace by OpenRead(Assembly, IBowireUiExtension, string)). Served at /api/ui/extensions/{Id}/{Name}.

string BundleResourceName { get; }

Property Value

string

Capabilities

Capability bitmask — which mounting roles the extension is prepared to fill. Drives the workbench's tab placement (Viewer → response pane, Editor → request pane).

ExtensionCapabilities Capabilities { get; }

Property Value

ExtensionCapabilities

Id

Stable extension identifier — typically {vendor}.{name}. Same string the JS-side register({ id }) call uses, so the workbench can pair the server-side descriptor with the JS-side registration record.

string Id { get; }

Property Value

string

Kinds

Semantic kinds this extension can mount against (e.g. ["coordinate.wgs84"] for the built-in map widget). One extension can claim several kinds — a future MIL-symbol package might claim mil.symbol-code + mil.echelon in the same registration.

IReadOnlyList<string> Kinds { get; }

Property Value

IReadOnlyList<string>

StylesResourceName

Optional embedded-resource name of a stylesheet shipped alongside the bundle. null when the extension renders without any dedicated CSS (most do).

string? StylesResourceName { get; }

Property Value

string