Elarion

Packages

Canonical, grouped reference for every public Elarion .NET and npm package.

Elarion is split by capability and dependency boundary. Start with Elarion, then add only the providers and adapters the host uses. Generator-only implementation projects are bundled by their public packages and are intentionally absent from this list.

Core application model

These packages stay independent of ASP.NET Core, EF Core, and provider infrastructure.

PackageAdd it when
Elarion.AbstractionsA contract-only assembly needs handlers (including request-driven IStreamHandler<,>), results, attributes, seams, canonical JSON, or generation triggers without runtime behavior.
ElarionAn application assembly needs modules, handlers, decorators, scheduling, streams, buffering, current user, or source generation. This is the normal starting package and bundles Elarion.Generators.
Elarion.ValidationDataAnnotations on requests must be enforced at runtime through Microsoft.Extensions.Validation.
Elarion.Resilience[Resilient] handlers or deferred scheduler retries need the Polly-backed default runner.
Elarion.Caching[Cacheable]/[CacheInvalidate] need the HybridCache-backed IHandlerCache.
Elarion.Caching.PostgreSqlHybridCache needs the recommended PostgreSQL UNLOGGED L2 instead of a separate Redis service.
Elarion.FeatureFlags.OpenFeature[FeatureGate]/[FeatureVariant] should evaluate through a host-supplied OpenFeature provider.
Elarion.FeatureFlags.FeatureManagementFeature flags should come directly from configuration through Microsoft.FeatureManagement's OpenFeature provider.

Hosting and handler transports

Protocols remain host-neutral where possible; ASP.NET packages own only their wire/host integration.

PackageAdd it when
Elarion.JsonRpcHandlers need the transport-neutral JSON-RPC dispatcher, MCP tool model, envelopes, telemetry, or schema export.
Elarion.GrpcA custom gRPC host needs typed unary or request-driven server-stream invocation, optional inline mapper delegates, one host-configured principal source, a correctly seeded dispatch scope, and stable startup AppErrorRpcException translation without an ASP.NET dependency.
Elarion.Grpc.AspNetCoreA grpc-dotnet ASP.NET Core host wants AddGrpc().AddElarion() plus ServerCallContext.InvokeElarionAsync/InvokeElarionStreamAsync, with HttpContext.User and RequestServices adopted automatically. This is the recommended gRPC host package.
Elarion.AspNetCoreAn ASP.NET host exposes JSON-RPC, [HttpEndpoint], files, ordered or request-driven SSE streams, current user middleware, or the role-holder proxy.
Elarion.AspNetCore.OpenApi[HttpEndpoint] routes should appear in OpenAPI with canonical schema and idempotency metadata.
Elarion.AspNetCore.McpHandlers should be exposed as an MCP server over Streamable HTTP. This is the only package referencing the MCP SDK.
Elarion.AspNetCore.SchemaGenerationAn ASP.NET build should export rpc-schema.json for client generation.
Elarion.AspNetCore.IdentityAn ASP.NET host needs Identity registration, EF stores, ICurrentUser claims mapping, and the default authorizer.

See transport capabilities and writing a custom transport.

Persistence, SQL, and transactions

Choose the EF Core tier or the NativeAOT SQL tier per host. EF applications keep EF migrations; an EF-free AOT host pairs Elarion.Sql with the database-neutral Elarion.Migrations engine and one provider package that picks the database for both subsystems — Elarion.Sql.PostgreSql (AddElarionPostgreSql) or Elarion.Sql.Sqlite (AddElarionSqlite). That single call registers one data source shared by the access tier and migrations; the registrations that follow (AddElarionSqlUnitOfWork, AddElarionMigrations) name no provider.

PackageAdd it when
Elarion.EntityFrameworkCoreEF models need generated DbSets, entity configuration application, key conventions, or keyset paging support.
Elarion.EntityFrameworkCore.UnitOfWorkHandler transactions need the EF-backed IUnitOfWork, PostgreSQL lock timeout, and savepoints.
Elarion.PagingEF queries need keyset/offset execution, opaque cursors, sort maps, or authorization-aware list filtering.
Elarion.EntityFrameworkCore.BulkOperationsEF code needs provider-neutral streaming ExecuteInsertAsync and the bulk provider seam.
Elarion.BulkOperations.PostgreSqlEF bulk inserts should use PostgreSQL binary COPY on the context connection.
Elarion.SqlAn EF-free NativeAOT host needs generated row mappers and injection-safe SQL interpolation with no reflection fallback. Also supplies the EF-free IUnitOfWorkAddElarionSqlUnitOfWork() registers a scoped ISqlSession so handler transactions commit atomically without EF. Stays Npgsql-free; ISqlDatabase is the application's database handle (the DbContext/IDbContextFactory counterpart): the scoped session opens from it, and db.OpenSessionAsync() serves singleton-eligible handlers.
Elarion.Sql.PostgreSqlThe EF-free tier should run on PostgreSQL. The single AddElarionPostgreSql(connectionString) picks the provider for every subsystem: it registers one central NpgsqlDataSource (the shared core, EF Core's DbContext analogue), the provider the session opens from, and the PostgreSQL migration engine (session advisory lock, 1–10 nodes) behind the neutral AddElarionMigrations.
Elarion.Sql.SqliteThe EF-free tier should run on a single-node / edge SQLite file. The single AddElarionSqlite(connectionString) picks SQLite for every subsystem — a DbDataSource over Microsoft.Data.Sqlite (which ships none) and the provider the session opens from, plus the SQLite migration engine (per-file in-process lock) behind the neutral AddElarionMigrations. The full mirror of Elarion.Sql.PostgreSql.
Elarion.MigrationsAn EF-free NativeAOT host needs embedded versioned/repeatable SQL discovery, checksums, planning, and roll-forward execution without a database driver — the provider-neutral AddElarionMigrations over a provider registered elsewhere (Elarion.Sql.PostgreSql, Elarion.Sql.Sqlite).
Elarion.EntityFrameworkCore.IdentityA persistence layer needs the web-free Identity model on a plain DbContext.
Elarion.Authorization.EntityFrameworkCore[RequireResource] needs the EF-backed resource-grant store and authorizer.
Elarion.Idempotency.EntityFrameworkCore[Idempotent] and event inbox claims need durable PostgreSQL-backed storage in the handler transaction.
Elarion.Auditing.EntityFrameworkCore[Auditable] handlers and [Audited] entities need a durable audit trail and field-level change capture.
Elarion.Scheduling.EntityFrameworkCoreRecurring occurrences must be claimed once across multiple PostgreSQL-backed instances.
Elarion.Coordination.PostgreSqlA coarse named role needs heartbeat leases, holder address advertisement, and fail-closed election.

Events and browser updates

PackageAdd it when
Elarion.Messaging.InMemoryIntegration events may be best-effort and process-local while still dispatching after the EF transaction commits.
Elarion.Messaging.OutboxIntegration events must survive crashes and deliver at least once after the business transaction commits.
Elarion.ClientEventsBrowsers need authorized at-most-once re-query hints, topic registration, subscription lifecycle, and in-process delivery.
Elarion.ClientEvents.PostgreSqlClient-event hints must fan out across roughly 1–10 nodes over PostgreSQL LISTEN/NOTIFY.
Elarion.ClientEvents.AspNetCoreClient events should stream to browsers over authorized Server-Sent Events.

See events and messaging for domain events, integration events, outbox, client events, and ordered streams.

Actors, connections, and devices

Default to request/reply plus client events. Add these packages only when a live state machine, bidirectional connection, or device identity chain is actually the consistency boundary.

PackageAdd it when
Elarion.ActorsA live in-memory resource, hot ephemeral state, or decide-once coordinator needs a keyed mailbox and generated typed facade. Placement is explicit through ActorPlacementMode.Local, SingleHome, or fixed VirtualShards (ADR-0061).
Elarion.Actors.PostgreSqlActor snapshots need PostgreSQL durability/query access, single-homed actors need the "actors" role binding, or virtual-sharded actors need fixed actors:partition-N role leases via AddElarionPostgreSqlActorSharding<TDbContext>().
Elarion.ConnectionsA bidirectional client/device link needs the node-local registry, protocol codec seam, bounded server invocation, and client-event bridge.
Elarion.Connections.AspNetCoreA device/client gateway needs the WebSocket lifecycle adapter with app-owned authentication and codec.
Elarion.Connections.TcpA proprietary protocol needs hosted TCP listen/dial, TLS-before-framing, reconnect, framing, bounded outbound delivery, idle handling, or runtime-managed endpoints.
Elarion.Connections.SimulationConnection tests or developer simulators need in-memory sinks, observers, framed clients, or the socket-free full TCP lifecycle.
Elarion.Connections.AspNetCore.SimulationWebSocket adapter tests need a real Kestrel upgrade, handshake, codec, and close path via WebSocketTestHost.
Elarion.DevicesDevice provisioning needs pairing codes, key-store seams, HMAC challenge verification, and the canonical device principal.
Elarion.Devices.EntityFrameworkCoreDevice keys and single-use pairing codes need durable EF/PostgreSQL stores.

Read the actor decision guide before adding the actor packages.

Blob storage and upload transports

PackageAdd it when
Elarion.BlobsApplication code needs streaming provider-neutral blob contracts, pending/commit lifecycle, listing, or staged upload seams.
Elarion.Blobs.PostgreSqlBlobs and/or resumable upload staging should live in the application's PostgreSQL database.
Elarion.Blobs.AzureBlobs and staged uploads should use Azure Blob Storage and append blobs.
Elarion.Blobs.AspNetCoreAn ASP.NET host needs direct upload/cancel and owner-scoped streaming download endpoints.
Elarion.Blobs.TusLarge uploads should use the recommended tus 1.0 resumable transport over any staged-upload store.

Runtime settings

PackageAdd it when
Elarion.SettingsApplication code needs scoped runtime settings and the in-process default store/change source.
Elarion.Settings.EntityFrameworkCoreSettings need durable relational storage with optimistic concurrency.
Elarion.Settings.ConfigurationGlobal runtime settings should surface through IConfiguration/IOptionsMonitor reload.
Elarion.Settings.PostgreSqlSetting changes must notify every node over PostgreSQL LISTEN/NOTIFY.

npm packages

PackageAdd it when
@swimmesberger/elarion-jsonrpc-client-generatorA TypeScript client should be generated from rpc-schema.json with Zod validation and typed client-event subscriptions.
@swimmesberger/elarion-contributionsA frontend needs typed extension points, declarative module contributions, capability gating, and optional React/Angular/TanStack Router bindings.

Dependency rules

  • Elarion.Abstractions contains implementation-neutral contracts; Elarion supplies dependency-light runtime behavior and the one bundled analyzer.
  • Provider-neutral cores (Blobs, Connections, ClientEvents, settings seams) never depend on a concrete provider or wire adapter.
  • Elarion.JsonRpc has no ASP.NET dependency; Elarion.AspNetCore owns HTTP hosting.
  • EF packages own EF mapping and providers; NativeAOT SQL packages stay EF-free.
  • Generators emit deterministic code and diagnostics rather than scanning at runtime. Reference Elarion directly in every assembly that needs its bundled analyzer; analyzer assets are not transitive.

Typical references

ProjectUsual starting references
Application/module assemblyElarion; optionally Elarion.Validation and provider-neutral capability packages
EF persistence assemblyElarion.EntityFrameworkCore plus the exact EF-backed capability packages it maps
EF-free NativeAOT host (PostgreSQL)Elarion.Sql + Elarion.Sql.PostgreSql + Elarion.Migrations
EF-free NativeAOT host (SQLite, single-node / edge)Elarion.Sql + Elarion.Sql.Sqlite + Elarion.Migrations
ASP.NET Core hostElarion, Elarion.JsonRpc, Elarion.AspNetCore; opt in to OpenAPI, MCP, schema generation, Identity, SSE, and blob transports as needed
Frontend@swimmesberger/elarion-jsonrpc-client-generator; optionally @swimmesberger/elarion-contributions

On this page