Muonroi.Integration.Abstractions 1.0.0-alpha.16

This is a prerelease version of Muonroi.Integration.Abstractions.
dotnet add package Muonroi.Integration.Abstractions --version 1.0.0-alpha.16
                    
NuGet\Install-Package Muonroi.Integration.Abstractions -Version 1.0.0-alpha.16
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Muonroi.Integration.Abstractions" Version="1.0.0-alpha.16" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Muonroi.Integration.Abstractions" Version="1.0.0-alpha.16" />
                    
Directory.Packages.props
<PackageReference Include="Muonroi.Integration.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Muonroi.Integration.Abstractions --version 1.0.0-alpha.16
                    
#r "nuget: Muonroi.Integration.Abstractions, 1.0.0-alpha.16"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Muonroi.Integration.Abstractions@1.0.0-alpha.16
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Muonroi.Integration.Abstractions&version=1.0.0-alpha.16&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Muonroi.Integration.Abstractions&version=1.0.0-alpha.16&prerelease
                    
Install as a Cake Tool

Muonroi.Integration.Abstractions

Contracts-only package for the Muonroi Connector Registry — defines the interfaces and data types that every integration connector must implement.

NuGet License: Apache 2.0

This package ships contracts only — interfaces, sealed records, and DTOs that define the shape of the Muonroi Connector Registry. It contains no runtime behavior. The implementation package Muonroi.Integration.Connectors provides built-in connectors (HTTP, SMTP, Slack, SQL, Redis, and a growing set of SaaS presets) and the DefaultConnectorRegistry.

Reference this package when:

  • Building a custom connector that plugs into the registry alongside the built-ins.
  • Consuming IConnectorRegistry or IConnectorCredentialStore from a host that already registers implementations.
  • Authoring a test double or alternative implementation for any registry contract.

Installation

dotnet add package Muonroi.Integration.Abstractions --prerelease

Quick Start

Implementing a custom connector

Implement IServiceTaskConnector and register it as a singleton alongside the built-ins (the DefaultConnectorRegistry scans every IServiceTaskConnector registration at startup):

using System.Text.Json;
using Muonroi.Integration.Abstractions;

public sealed class GitHubConnector(IHttpClientFactory httpClientFactory) : IServiceTaskConnector
{
    public ConnectorMetadata Metadata => new()
    {
        Type        = "github",
        DisplayName = "GitHub API",
        Category    = "DevOps",
        IconSvg     = "<path d=\"...\"/>",
        Description = "Interact with the GitHub REST API.",
        RequiresCredentials = true,
        FieldSchema =
        [
            new ConnectorFieldDescriptor { Key = "action", Label = "Action", FieldType = "text", Required = true }
        ]
    };

    public async Task<ConnectorResult> ExecuteAsync(ConnectorContext context, CancellationToken ct)
    {
        string? token = context.Credentials.GetValueOrDefault("token");
        if (string.IsNullOrEmpty(token))
            return ConnectorResult.Fail("GitHub PAT is required.");

        // ... call GitHub REST API using context.Config for operation parameters
        return ConnectorResult.Ok(new() { ["githubLogin"] = "octocat" });
    }

    public Task<bool> TestConnectionAsync(ConnectorContext context, CancellationToken ct)
    {
        // verify credentials, return true on success
        return Task.FromResult(true);
    }

    public JsonElement GetConfigSchema()
    {
        return JsonDocument.Parse("""{"type":"object","properties":{"action":{"type":"string"}}}""")
                           .RootElement.Clone();
    }
}

Register it next to the built-ins from Muonroi.Integration.Connectors:

// Program.cs
builder.Services.AddMBuiltInConnectors();                          // from Muonroi.Integration.Connectors
builder.Services.AddSingleton<IServiceTaskConnector, GitHubConnector>();

Resolve connectors at runtime through IConnectorRegistry:

app.MapGet("/health", (IConnectorRegistry registry) => Results.Ok(new
{
    RegisteredConnectors = registry.ListAvailable().Select(m => m.Type)
}));

Features

  • IServiceTaskConnector — core connector contract: execute, test-connection, config schema, document browse, and document fetch (last three have safe defaults that return null).
  • IConnectorRegistry — resolve a connector by type key or enumerate all registered connectors with their metadata.
  • IConnectorCredentialStore — per-tenant, encrypted-at-rest credential CRUD (get, save, delete).
  • IConnectorConfigStore — CRUD for named connector configuration instances (ConnectorConfigDto), scoped to tenant and owner.
  • ConnectorContext — immutable execution context: JSON config, FactBag input facts, resolved credentials, tenant ID, correlation ID.
  • ConnectorResult — uniform result envelope with Ok(...) / Fail(...) static factories, output facts, status code, and duration.
  • ConnectorMetadata — UI catalog descriptor: type key, display name, category, SVG icon, field schema, credential fields, and auth builder key.
  • ConnectorResilienceConfig — declarative Polly resilience parameters: retry count/delay, timeout, and circuit-breaker thresholds.
  • Browse API — ConnectorBrowseQuery, ConnectorBrowseResult, ConnectorBrowseItem, ConnectorScope, ConnectorDocumentContent for optional document-discovery and ingestion flows.

Configuration

This package defines ConnectorResilienceConfig, which the implementation package reads from options:

{
  "ConnectorResilience": {
    "RetryCount": 3,
    "RetryDelay": "00:00:01",
    "Timeout": "00:00:30",
    "CircuitBreakerThreshold": 0.5,
    "CircuitBreakerSamplingDuration": "00:00:30",
    "CircuitBreakerMinimumThroughput": 5,
    "CircuitBreakerBreakDuration": "00:00:30"
  }
}

API Reference

Type Purpose
IServiceTaskConnector Core connector contract — ExecuteAsync, TestConnectionAsync, GetConfigSchema, and optional ListDocumentsAsync / FetchDocumentAsync / ListScopesAsync
IConnectorRegistry Resolve a connector by string type key or list all via ListAvailable()
IConnectorCredentialStore Per-tenant encrypted credential store — GetAsync, SaveAsync, DeleteAsync
IConnectorConfigStore Connector configuration CRUD — GetByIdAsync, ListAsync, SaveAsync, DeleteAsync
ConnectorContext Immutable execution context: Config (JsonDocument), InputFacts (FactBag), Credentials, TenantId, CorrelationId
ConnectorResult Result envelope: Ok(outputFacts, statusCode, duration) / Fail(error, statusCode, duration)
ConnectorMetadata UI descriptor: Type, DisplayName, Category, IconSvg, FieldSchema, CredentialFields, AuthBuilder
ConnectorFieldDescriptor Individual form-field descriptor used in ConnectorMetadata.FieldSchema and CredentialFields
ConnectorResilienceConfig Polly retry/timeout/circuit-breaker settings consumed by the implementation package
ConnectorConfigDto DTO for a named connector configuration instance, including ConnectorType, Name, ConfigJson, CredentialId, OwnerId
ConnectorBrowseQuery Typed input to ListDocumentsAsyncSearchText, Scope, TypeFilter, Cursor, PageSize
ConnectorBrowseResult Paged result from ListDocumentsAsync — list of ConnectorBrowseItem plus next-page cursor
ConnectorBrowseItem Single discoverable document: external reference, title, type, and URL
ConnectorScope Scope unit for narrowing browse results (e.g. Jira project key, Confluence space key) — Id, Label
ConnectorDocumentContent Raw document body returned by FetchDocumentAsync — body text and normalizer format key

Samples

  • Quickstart.Integration — ASP.NET Core API demonstrating IConnectorRegistry, built-in connectors, and a custom GitHubConnector implementation.
  • Quickstart.Integration.Persistence — demonstrates IConnectorConfigStore and IConnectorCredentialStore with the persistence implementation.

Compatibility

  • Target framework: net8.0
  • License: Apache-2.0 (OSS)

License

Apache-2.0. See LICENSE-APACHE.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on Muonroi.Integration.Abstractions:

Package Downloads
Muonroi.RuleEngine.Runtime

Runtime orchestration layer for Muonroi RuleEngine, providing execution pipelines and integration points for rule evaluation services.

Muonroi.RuleEngine.Runtime.Web

Runtime ruleset governance Web API and UI-engine manifest integration for Muonroi RuleEngine.

Muonroi.Integration.Connectors

Built-in connectors for the Muonroi Connector Registry — HTTP, SMTP, Slack, SQL, Redis.

Muonroi.UiEngine.Catalog

Package Description

Muonroi.RuleEngine.Proliferation

Rule Proliferation Engine — AI-driven neuron scenario generation and execution for Muonroi RuleEngine.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-alpha.16 114 6/22/2026
1.0.0-alpha.15 142 5/31/2026
1.0.0-alpha.14 151 5/15/2026
1.0.0-alpha.13 132 5/2/2026
1.0.0-alpha.12 84 4/2/2026
1.0.0-alpha.11 135 4/2/2026
1.0.0-alpha.9 66 3/30/2026
1.0.0-alpha.8 161 3/28/2026
1.0.0-alpha.7 69 3/27/2026
1.0.0-alpha.5 61 3/27/2026
1.0.0-alpha.4 63 3/27/2026
1.0.0-alpha.3 61 3/27/2026
1.0.0-alpha.2 65 3/26/2026