feat: OPC UA address-space search plumbing — actor + comm + BrowseService (T15)

This commit is contained in:
Joseph Doherty
2026-06-18 02:51:57 -04:00
parent c00c8241b3
commit 74dd26eebd
7 changed files with 468 additions and 0 deletions
@@ -40,6 +40,39 @@ public record BrowseNodeResult(
BrowseFailure? Failure,
string? ContinuationToken = null);
/// <summary>
/// Sent from CentralUI to a specific site to run a bounded recursive search of
/// the address space on the live server backing the given data connection.
/// </summary>
/// <remarks>
/// The address-space analogue of <see cref="BrowseNodeCommand"/>: where browse
/// walks one level at a time on user demand, search walks the tree itself
/// (bounded by depth + result caps) and returns the nodes whose DisplayName or
/// root-relative path contains <see cref="Query"/>. Keyed by
/// <see cref="ConnectionName"/> for the same reason as browse — the site-side
/// <c>DataConnectionManagerActor</c> indexes its children by connection name and
/// the central <c>DataConnections</c> id is intentionally not exposed at the
/// site. Routed over the same cross-cluster path as browse and resolved by the
/// owning connection's <c>IAddressSpaceSearchable</c> adapter.
/// </remarks>
/// <param name="ConnectionName">Name of the site-local data connection to search against.</param>
/// <param name="Query">Case-insensitive substring matched against each node's DisplayName and root-relative path.</param>
/// <param name="MaxDepth">Maximum number of levels below the root to descend. Must be non-negative.</param>
/// <param name="MaxResults">Maximum number of matches to return; when reached the walk stops early and <see cref="SearchAddressSpaceResult.CapReached"/> is set.</param>
public record SearchAddressSpaceCommand(
string ConnectionName,
string Query,
int MaxDepth,
int MaxResults);
/// <param name="Matches">The matched address-space nodes, in breadth-first discovery order (capped at <see cref="SearchAddressSpaceCommand.MaxResults"/>).</param>
/// <param name="CapReached">True when a bound (result cap or the adapter's node-visit ceiling) cut the walk short, so more matches may exist than were returned.</param>
/// <param name="Failure">Structured failure, or null on success. Reuses the browse <see cref="BrowseFailure"/> kinds (the search path mirrors browse exactly).</param>
public record SearchAddressSpaceResult(
IReadOnlyList<AddressSpaceMatch> Matches,
bool CapReached,
BrowseFailure? Failure);
public record BrowseFailure(
BrowseFailureKind Kind,
string Message);