Class SidecarPluginManifest

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

The sidecar.json manifest shape that marks a directory under ~/.bowire/plugins/ as a sidecar (non-.NET) plugin. See docs/architecture/sidecar-plugins.md for the full schema.

public sealed record SidecarPluginManifest : IEquatable<SidecarPluginManifest>
Inheritance
SidecarPluginManifest
Implements
Inherited Members

Constructors

SidecarPluginManifest(string, SidecarProtocolMetadata, string, IReadOnlyList<string>?, string, int, string?, string, string?)

The sidecar.json manifest shape that marks a directory under ~/.bowire/plugins/ as a sidecar (non-.NET) plugin. See docs/architecture/sidecar-plugins.md for the full schema.

public SidecarPluginManifest(string PackageId, SidecarProtocolMetadata Protocol, string Executable = "", IReadOnlyList<string>? Args = null, string EnvPrefix = "BOWIRE_", int ShutdownTimeoutMs = 3000, string? Version = null, string Transport = "stdio", string? Url = null)

Parameters

PackageId string

Reverse-DNS package id (e.g. Acme.Bowire.Protocol.Zenoh).

Protocol SidecarProtocolMetadata

Protocol metadata the manifest declares before the sidecar starts.

Executable string

The sidecar executable: a path relative to the plugin directory, or a bare command name looked up on PATH (so an interpreted sidecar can name its interpreter). Resolved by SidecarJsonRpcTransport.ResolveExecutable. Required for the stdio transport.

Args IReadOnlyList<string>

Extra args appended to the executable command line. null = none.

EnvPrefix string

Env-var prefix forwarded to the subprocess. Default BOWIRE_.

ShutdownTimeoutMs int

Grace period after shutdown before force-kill (stdio). Default 3000.

Version string

Optional version string for display in bowire plugin list. Sidecars carry no NuGet version, so this is the only version source.

Transport string

Wire transport: "stdio" (default — spawn Executable, JSON-RPC over stdin/stdout) or "http" (POST JSON-RPC to Url, notifications over SSE).

Url string

For the http transport: the JSON-RPC endpoint (e.g. http://localhost:7000/bowire). Required when Transport == "http", ignored otherwise.

Fields

FileName

Manifest filename that marks a plugin directory as a sidecar. Distinct from the NuGet-install plugin.json metadata file so the two never collide in their (mutually exclusive) plugin directories.

public const string FileName = "sidecar.json"

Field Value

string

Properties

Args

Extra args appended to the executable command line. null = none.

[JsonPropertyName("args")]
public IReadOnlyList<string>? Args { get; init; }

Property Value

IReadOnlyList<string>

EnvPrefix

Env-var prefix forwarded to the subprocess. Default BOWIRE_.

[JsonPropertyName("envPrefix")]
public string EnvPrefix { get; init; }

Property Value

string

Executable

The sidecar executable: a path relative to the plugin directory, or a bare command name looked up on PATH (so an interpreted sidecar can name its interpreter). Resolved by SidecarJsonRpcTransport.ResolveExecutable. Required for the stdio transport.

[JsonPropertyName("executable")]
public string Executable { get; init; }

Property Value

string

IsHttp

True when this manifest declares the HTTP/SSE transport (vs stdio subprocess).

public bool IsHttp { get; }

Property Value

bool

IsValid

True when the manifest has the minimum fields to load: a protocol id plus the transport-specific target — an executable for stdio, a url for http.

public bool IsValid { get; }

Property Value

bool

PackageId

Reverse-DNS package id (e.g. Acme.Bowire.Protocol.Zenoh).

[JsonPropertyName("packageId")]
public string PackageId { get; init; }

Property Value

string

Protocol

Protocol metadata the manifest declares before the sidecar starts.

[JsonPropertyName("protocol")]
public SidecarProtocolMetadata Protocol { get; init; }

Property Value

SidecarProtocolMetadata

ShutdownTimeoutMs

Grace period after shutdown before force-kill (stdio). Default 3000.

[JsonPropertyName("shutdownTimeoutMs")]
public int ShutdownTimeoutMs { get; init; }

Property Value

int

Transport

Wire transport: "stdio" (default — spawn Executable, JSON-RPC over stdin/stdout) or "http" (POST JSON-RPC to Url, notifications over SSE).

[JsonPropertyName("transport")]
public string Transport { get; init; }

Property Value

string

Url

For the http transport: the JSON-RPC endpoint (e.g. http://localhost:7000/bowire). Required when Transport == "http", ignored otherwise.

[JsonPropertyName("url")]
public string? Url { get; init; }

Property Value

string

Version

Optional version string for display in bowire plugin list. Sidecars carry no NuGet version, so this is the only version source.

[JsonPropertyName("version")]
public string? Version { get; init; }

Property Value

string

Methods

Deconstruct(out string, out SidecarProtocolMetadata, out string, out IReadOnlyList<string>?, out string, out int, out string?, out string, out string?)

public void Deconstruct(out string PackageId, out SidecarProtocolMetadata Protocol, out string Executable, out IReadOnlyList<string>? Args, out string EnvPrefix, out int ShutdownTimeoutMs, out string? Version, out string Transport, out string? Url)

Parameters

PackageId string
Protocol SidecarProtocolMetadata
Executable string
Args IReadOnlyList<string>
EnvPrefix string
ShutdownTimeoutMs int
Version string
Transport string
Url string

Equals(SidecarPluginManifest?)

public bool Equals(SidecarPluginManifest? other)

Parameters

other SidecarPluginManifest

Returns

bool

Equals(object?)

public override bool Equals(object? obj)

Parameters

obj object

Returns

bool

GetHashCode()

public override int GetHashCode()

Returns

int

ToString()

public override string ToString()

Returns

string

TryLoadFromFile(string)

Parse a manifest from disk. Returns null when the file is missing or invalid.

public static SidecarPluginManifest? TryLoadFromFile(string path)

Parameters

path string

Returns

SidecarPluginManifest

TryParse(string)

Parse a manifest from a JSON string. Returns null on malformed input.

public static SidecarPluginManifest? TryParse(string json)

Parameters

json string

Returns

SidecarPluginManifest

Operators

operator ==(SidecarPluginManifest?, SidecarPluginManifest?)

public static bool operator ==(SidecarPluginManifest? left, SidecarPluginManifest? right)

Parameters

left SidecarPluginManifest
right SidecarPluginManifest

Returns

bool

operator !=(SidecarPluginManifest?, SidecarPluginManifest?)

public static bool operator !=(SidecarPluginManifest? left, SidecarPluginManifest? right)

Parameters

left SidecarPluginManifest
right SidecarPluginManifest

Returns

bool