Skip to content

NexusLabs.Needlr.AgentFramework.Providers

NexusLabs.Needlr.AgentFramework

NexusLabs.Needlr.AgentFramework.Providers Namespace

Classes
AlwaysGrantQuotaGate IQuotaGate that always grants reservations. Suitable for development and scenarios where quota tracking is not needed.
ProviderUnavailableException Thrown when a provider is temporarily unavailable. The tiered selector catches this and falls through to the next provider in the chain.
TieredProviderSelector<TQuery,TResult> Default ITieredProviderSelector<TQuery,TResult> that iterates providers in ascending Priority order, gated by an IQuotaGate. On ProviderUnavailableException the selector falls through to the next provider.
Interfaces
IQuotaGate Gates provider access based on quota. Before each provider attempt, the selector calls TryReserveAsync(string, CancellationToken). If denied, the provider is skipped. After the attempt, ReleaseAsync(string, bool, CancellationToken) reports success or failure.
ITieredProvider<TQuery,TResult> A provider in a priority-ordered fallback chain. Providers are tried in order of ascending Priority until one succeeds or all fail.
ITieredProviderSelector<TQuery,TResult> Executes a query against a priority-ordered chain of ITieredProvider<TQuery,TResult> instances, falling through to the next provider on failure or quota exhaustion.