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.
| Package | Add it when |
|---|---|
Elarion.Abstractions | A contract-only assembly needs handlers (including request-driven IStreamHandler<,>), results, attributes, seams, canonical JSON, or generation triggers without runtime behavior. |
Elarion | An 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.Validation | DataAnnotations 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.PostgreSql | HybridCache 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.FeatureManagement | Feature 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.
| Package | Add it when |
|---|---|
Elarion.JsonRpc | Handlers need the transport-neutral JSON-RPC dispatcher, MCP tool model, envelopes, telemetry, or schema export. |
Elarion.Grpc | A 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 AppError → RpcException translation without an ASP.NET dependency. |
Elarion.Grpc.AspNetCore | A 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.AspNetCore | An 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.Mcp | Handlers should be exposed as an MCP server over Streamable HTTP. This is the only package referencing the MCP SDK. |
Elarion.AspNetCore.SchemaGeneration | An ASP.NET build should export rpc-schema.json for client generation. |
Elarion.AspNetCore.Identity | An 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.
| Package | Add it when |
|---|---|
Elarion.EntityFrameworkCore | EF models need generated DbSets, entity configuration application, key conventions, or keyset paging support. |
Elarion.EntityFrameworkCore.UnitOfWork | Handler transactions need the EF-backed IUnitOfWork, PostgreSQL lock timeout, and savepoints. |
Elarion.Paging | EF queries need keyset/offset execution, opaque cursors, sort maps, or authorization-aware list filtering. |
Elarion.EntityFrameworkCore.BulkOperations | EF code needs provider-neutral streaming ExecuteInsertAsync and the bulk provider seam. |
Elarion.BulkOperations.PostgreSql | EF bulk inserts should use PostgreSQL binary COPY on the context connection. |
Elarion.Sql | An EF-free NativeAOT host needs generated row mappers and injection-safe SQL interpolation with no reflection fallback. Also supplies the EF-free IUnitOfWork — AddElarionSqlUnitOfWork() 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.PostgreSql | The 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.Sqlite | The 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.Migrations | An 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.Identity | A 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.EntityFrameworkCore | Recurring occurrences must be claimed once across multiple PostgreSQL-backed instances. |
Elarion.Coordination.PostgreSql | A coarse named role needs heartbeat leases, holder address advertisement, and fail-closed election. |
Events and browser updates
| Package | Add it when |
|---|---|
Elarion.Messaging.InMemory | Integration events may be best-effort and process-local while still dispatching after the EF transaction commits. |
Elarion.Messaging.Outbox | Integration events must survive crashes and deliver at least once after the business transaction commits. |
Elarion.ClientEvents | Browsers need authorized at-most-once re-query hints, topic registration, subscription lifecycle, and in-process delivery. |
Elarion.ClientEvents.PostgreSql | Client-event hints must fan out across roughly 1–10 nodes over PostgreSQL LISTEN/NOTIFY. |
Elarion.ClientEvents.AspNetCore | Client 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.
| Package | Add it when |
|---|---|
Elarion.Actors | A 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.PostgreSql | Actor 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.Connections | A bidirectional client/device link needs the node-local registry, protocol codec seam, bounded server invocation, and client-event bridge. |
Elarion.Connections.AspNetCore | A device/client gateway needs the WebSocket lifecycle adapter with app-owned authentication and codec. |
Elarion.Connections.Tcp | A proprietary protocol needs hosted TCP listen/dial, TLS-before-framing, reconnect, framing, bounded outbound delivery, idle handling, or runtime-managed endpoints. |
Elarion.Connections.Simulation | Connection tests or developer simulators need in-memory sinks, observers, framed clients, or the socket-free full TCP lifecycle. |
Elarion.Connections.AspNetCore.Simulation | WebSocket adapter tests need a real Kestrel upgrade, handshake, codec, and close path via WebSocketTestHost. |
Elarion.Devices | Device provisioning needs pairing codes, key-store seams, HMAC challenge verification, and the canonical device principal. |
Elarion.Devices.EntityFrameworkCore | Device 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
| Package | Add it when |
|---|---|
Elarion.Blobs | Application code needs streaming provider-neutral blob contracts, pending/commit lifecycle, listing, or staged upload seams. |
Elarion.Blobs.PostgreSql | Blobs and/or resumable upload staging should live in the application's PostgreSQL database. |
Elarion.Blobs.Azure | Blobs and staged uploads should use Azure Blob Storage and append blobs. |
Elarion.Blobs.AspNetCore | An ASP.NET host needs direct upload/cancel and owner-scoped streaming download endpoints. |
Elarion.Blobs.Tus | Large uploads should use the recommended tus 1.0 resumable transport over any staged-upload store. |
Runtime settings
| Package | Add it when |
|---|---|
Elarion.Settings | Application code needs scoped runtime settings and the in-process default store/change source. |
Elarion.Settings.EntityFrameworkCore | Settings need durable relational storage with optimistic concurrency. |
Elarion.Settings.Configuration | Global runtime settings should surface through IConfiguration/IOptionsMonitor reload. |
Elarion.Settings.PostgreSql | Setting changes must notify every node over PostgreSQL LISTEN/NOTIFY. |
npm packages
| Package | Add it when |
|---|---|
@swimmesberger/elarion-jsonrpc-client-generator | A TypeScript client should be generated from rpc-schema.json with Zod validation and typed client-event subscriptions. |
@swimmesberger/elarion-contributions | A frontend needs typed extension points, declarative module contributions, capability gating, and optional React/Angular/TanStack Router bindings. |
Dependency rules
Elarion.Abstractionscontains implementation-neutral contracts;Elarionsupplies 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.JsonRpchas no ASP.NET dependency;Elarion.AspNetCoreowns 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
Elariondirectly in every assembly that needs its bundled analyzer; analyzer assets are not transitive.
Typical references
| Project | Usual starting references |
|---|---|
| Application/module assembly | Elarion; optionally Elarion.Validation and provider-neutral capability packages |
| EF persistence assembly | Elarion.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 host | Elarion, 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 |