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
PackageIdstringReverse-DNS package id (e.g.
Acme.Bowire.Protocol.Zenoh).ProtocolSidecarProtocolMetadataProtocol metadata the manifest declares before the sidecar starts.
ExecutablestringThe 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 bySidecarJsonRpcTransport.ResolveExecutable. Required for thestdiotransport.ArgsIReadOnlyList<string>Extra args appended to the executable command line.
null= none.EnvPrefixstringEnv-var prefix forwarded to the subprocess. Default
BOWIRE_.ShutdownTimeoutMsintGrace period after
shutdownbefore force-kill (stdio). Default 3000.VersionstringOptional version string for display in
bowire plugin list. Sidecars carry no NuGet version, so this is the only version source.TransportstringWire transport:
"stdio"(default — spawnExecutable, JSON-RPC over stdin/stdout) or"http"(POST JSON-RPC toUrl, notifications over SSE).UrlstringFor the
httptransport: the JSON-RPC endpoint (e.g.http://localhost:7000/bowire). Required whenTransport == "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
Properties
Args
Extra args appended to the executable command line. null = none.
[JsonPropertyName("args")]
public IReadOnlyList<string>? Args { get; init; }
Property Value
EnvPrefix
Env-var prefix forwarded to the subprocess. Default BOWIRE_.
[JsonPropertyName("envPrefix")]
public string EnvPrefix { get; init; }
Property Value
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
IsHttp
True when this manifest declares the HTTP/SSE transport (vs stdio subprocess).
public bool IsHttp { get; }
Property Value
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
PackageId
Reverse-DNS package id (e.g. Acme.Bowire.Protocol.Zenoh).
[JsonPropertyName("packageId")]
public string PackageId { get; init; }
Property Value
Protocol
Protocol metadata the manifest declares before the sidecar starts.
[JsonPropertyName("protocol")]
public SidecarProtocolMetadata Protocol { get; init; }
Property Value
ShutdownTimeoutMs
Grace period after shutdown before force-kill (stdio). Default 3000.
[JsonPropertyName("shutdownTimeoutMs")]
public int ShutdownTimeoutMs { get; init; }
Property Value
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
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
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
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
PackageIdstringProtocolSidecarProtocolMetadataExecutablestringArgsIReadOnlyList<string>EnvPrefixstringShutdownTimeoutMsintVersionstringTransportstringUrlstring
Equals(SidecarPluginManifest?)
public bool Equals(SidecarPluginManifest? other)
Parameters
otherSidecarPluginManifest
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
TryLoadFromFile(string)
Parse a manifest from disk. Returns null when the file is missing or invalid.
public static SidecarPluginManifest? TryLoadFromFile(string path)
Parameters
pathstring
Returns
TryParse(string)
Parse a manifest from a JSON string. Returns null on malformed input.
public static SidecarPluginManifest? TryParse(string json)
Parameters
jsonstring
Returns
Operators
operator ==(SidecarPluginManifest?, SidecarPluginManifest?)
public static bool operator ==(SidecarPluginManifest? left, SidecarPluginManifest? right)
Parameters
leftSidecarPluginManifestrightSidecarPluginManifest
Returns
operator !=(SidecarPluginManifest?, SidecarPluginManifest?)
public static bool operator !=(SidecarPluginManifest? left, SidecarPluginManifest? right)
Parameters
leftSidecarPluginManifestrightSidecarPluginManifest