Class BowireDiscoveryAttempt

Namespace
Kuestenlogik.Bowire.Models
Assembly
Kuestenlogik.Bowire.dll

One protocol plugin's turn at a discovery probe (#534). The old attempts extension on the /api/services ProblemDetails body was a flat string[] that only listed the plugins which threw — a plugin that ran cleanly and returned nothing was invisible, which is the single most common "why is my sidebar empty?" case. Every probed plugin now contributes exactly one of these, whatever the result, so the UI, the CLI and an MCP agent can all answer "who tried what, and what came back?" from the same record.

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

Constructors

BowireDiscoveryAttempt(string, string, string, int, long, string)

One protocol plugin's turn at a discovery probe (#534). The old attempts extension on the /api/services ProblemDetails body was a flat string[] that only listed the plugins which threw — a plugin that ran cleanly and returned nothing was invisible, which is the single most common "why is my sidebar empty?" case. Every probed plugin now contributes exactly one of these, whatever the result, so the UI, the CLI and an MCP agent can all answer "who tried what, and what came back?" from the same record.

public BowireDiscoveryAttempt(string PluginId, string Plugin, string Outcome, int ServicesFound, long DurationMs, string Message)

Parameters

PluginId string

The plugin's Id ("grpc", "rest", …). Stable machine key — use this for filtering / grouping.

Plugin string

The plugin's Name — the display name shown to the operator.

Outcome string

One of five values:

  • ok — the plugin returned at least one service.
  • empty — the plugin ran to completion and returned nothing. Not an error: the URL simply is not this plugin's.
  • partial — the plugin returned services and reported a fault while producing them (#544): an MCP server with one malformed tool still contributes its resources and prompts. A dashboard must be able to tell this from a clean ok. Only plugins implementing IBowireDiscoveryDiagnostics can reach it.
  • error — the probe threw (connection refused, TLS failure, malformed schema, …), or reported a fault and produced nothing. Message carries the reason.
  • timeout — the probe was cancelled because it exceeded the per-probe ceiling, or the caller aborted the request.
ServicesFound int

Number of services this plugin contributed.

DurationMs long

Wall-clock milliseconds the probe took.

Message string

Human-readable one-liner. Never prefixed with the plugin name — Plugin already carries it, and a prefixed message renders as "gRPC — gRPC: connection refused" in the UI.

Fields

OutcomeEmpty

The plugin ran cleanly but returned no services.

public const string OutcomeEmpty = "empty"

Field Value

string

OutcomeError

The plugin's probe threw, or faulted without producing anything.

public const string OutcomeError = "error"

Field Value

string

OutcomeOk

The plugin returned at least one service.

public const string OutcomeOk = "ok"

Field Value

string

OutcomePartial

The plugin returned services and reported a fault while producing them (#544). Its own state, deliberately not folded into OutcomeOk: the tree is populated but incomplete.

public const string OutcomePartial = "partial"

Field Value

string

OutcomeTimeout

The plugin's probe was cancelled (per-probe ceiling or caller abort).

public const string OutcomeTimeout = "timeout"

Field Value

string

Properties

Details

Optional per-step breakdown behind Message — one line per faulted MCP surface, one per well-known path a REST sweep tried. Only plugins implementing IBowireDiscoveryDiagnostics populate it; it stays null (and off the wire, the endpoint serializer skips nulls) everywhere else.

An init-only property rather than a positional parameter on purpose: every existing construction site and every third-party reader of this record keeps compiling.

public IReadOnlyList<string>? Details { get; init; }

Property Value

IReadOnlyList<string>

DurationMs

Wall-clock milliseconds the probe took.

public long DurationMs { get; init; }

Property Value

long

Message

Human-readable one-liner. Never prefixed with the plugin name — Plugin already carries it, and a prefixed message renders as "gRPC — gRPC: connection refused" in the UI.

public string Message { get; init; }

Property Value

string

Outcome

One of five values:

  • ok — the plugin returned at least one service.
  • empty — the plugin ran to completion and returned nothing. Not an error: the URL simply is not this plugin's.
  • partial — the plugin returned services and reported a fault while producing them (#544): an MCP server with one malformed tool still contributes its resources and prompts. A dashboard must be able to tell this from a clean ok. Only plugins implementing IBowireDiscoveryDiagnostics can reach it.
  • error — the probe threw (connection refused, TLS failure, malformed schema, …), or reported a fault and produced nothing. Message carries the reason.
  • timeout — the probe was cancelled because it exceeded the per-probe ceiling, or the caller aborted the request.
public string Outcome { get; init; }

Property Value

string

Plugin

The plugin's Name — the display name shown to the operator.

public string Plugin { get; init; }

Property Value

string

PluginId

The plugin's Id ("grpc", "rest", …). Stable machine key — use this for filtering / grouping.

public string PluginId { get; init; }

Property Value

string

ServicesFound

Number of services this plugin contributed.

public int ServicesFound { get; init; }

Property Value

int

Methods

Deconstruct(out string, out string, out string, out int, out long, out string)

public void Deconstruct(out string PluginId, out string Plugin, out string Outcome, out int ServicesFound, out long DurationMs, out string Message)

Parameters

PluginId string
Plugin string
Outcome string
ServicesFound int
DurationMs long
Message string

Equals(BowireDiscoveryAttempt?)

public bool Equals(BowireDiscoveryAttempt? other)

Parameters

other BowireDiscoveryAttempt

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

Operators

operator ==(BowireDiscoveryAttempt?, BowireDiscoveryAttempt?)

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

Parameters

left BowireDiscoveryAttempt
right BowireDiscoveryAttempt

Returns

bool

operator !=(BowireDiscoveryAttempt?, BowireDiscoveryAttempt?)

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

Parameters

left BowireDiscoveryAttempt
right BowireDiscoveryAttempt

Returns

bool