using System.Collections.Immutable;
using StellaOps.Excititor.Core;
namespace StellaOps.Excititor.Connectors.Abstractions;
///
/// Static descriptor for a Excititor connector plug-in.
///
public sealed record VexConnectorDescriptor
{
public VexConnectorDescriptor(string id, VexProviderKind kind, string displayName)
{
if (string.IsNullOrWhiteSpace(id))
{
throw new ArgumentException("Connector id must be provided.", nameof(id));
}
Id = id;
Kind = kind;
DisplayName = string.IsNullOrWhiteSpace(displayName) ? id : displayName;
}
///
/// Stable connector identifier (matches provider id).
///
public string Id { get; }
///
/// Provider kind served by the connector.
///
public VexProviderKind Kind { get; }
///
/// Human friendly name used in logs/diagnostics.
///
public string DisplayName { get; }
///
/// Optional friendly description.
///
public string? Description { get; init; }
///
/// Document formats the connector is expected to emit.
///
public ImmutableArray SupportedFormats { get; init; } = ImmutableArray.Empty;
///
/// Optional tags surfaced in diagnostics (e.g. "beta", "offline").
///
public ImmutableArray Tags { get; init; } = ImmutableArray.Empty;
public override string ToString() => $"{Id} ({Kind})";
}