Skip to content

Latest commit

 

History

History
120 lines (95 loc) · 8.04 KB

File metadata and controls

120 lines (95 loc) · 8.04 KB
title Framework libraries
description The standalone ES.FX feature libraries — Transactional Outbox, Migrations, the Zendesk API client, and the Hermes Agent API client — and how to use their public APIs.

ES.FX ships a small set of standalone feature libraries that solve one recurring problem each and stand apart from Ignite. They depend only on the base framework and their own third-party packages, so you can adopt them in any .NET 10 host — with or without Ignite — and each optionally bridges into Ignite when you want it to.

The libraries

Library Package(s) What it gives you
Transactional Outbox ES.FX.TransactionalOutbox (+ .EntityFrameworkCore, provider packages, .MassTransit) Reliable message dispatch tied to your EF Core transaction — enqueue a message in the same SaveChanges that writes your data, then a hosted service delivers it.
Migrations ES.FX.Migrations (+ ES.FX.Ignite.Migrations) A DI-driven migration runner: implement IMigrationsTask, register it, and a hosted service applies every task at startup.
Zendesk API client ES.FX.Zendesk (+ ES.FX.Ignite.Zendesk Spark) Kiota-generated clients covering the complete Zendesk Support and Help Center REST APIs — typed request builders, OAuth client_credentials, typed errors with Retry-After, and OpenTelemetry tracing.
Hermes Agent API client ES.FX.NousResearch.HermesAgent (+ ES.FX.Ignite.NousResearch.HermesAgent Spark) A typed client for the Nous Research Hermes Agent API server — chat completions, Responses API, asynchronous runs, scheduled jobs, sessions and discovery, with await foreach streaming, typed errors, and OpenTelemetry tracing.
OpenData ES.FX.OpenData.Countries, .Currencies, .Romania.TerritorialUnits, .Vies, .Romania.Anaf Baked-in public reference data — curated countries and currencies with the ISO 3166 / ISO 4217 datasets they build on, and the Romanian SIRUTA territorial register — plus typed VIES/ANAF clients. Clean display names and diacritic-insensitive search; each package is fully standalone and self-registers with a plain services.AddX().

Each library is independently consumable and has its own page below with the full end-to-end walkthrough.


Transactional Outbox

The Transactional Outbox library removes the "dual-write" race between your database and your message broker. Instead of writing to the database and then publishing (where a crash in between loses the message), you enqueue the message into the same database transaction that persists your business data. A background delivery service later reads the stored messages and publishes them — either both the data and the message commit, or neither does.

Install ES.FX.TransactionalOutbox.EntityFrameworkCore, a provider package for your database, and optionally .MassTransit to dispatch onto a bus. Wire the store with UseOutbox() / AddOutbox(), enqueue with dbContext.AddOutboxMessage(...), and register the hosted delivery service with AddOutboxDeliveryService<TDbContext, TMessageHandler>(...).

See the Transactional Outbox page for the full walkthrough: DbContext wiring, enqueuing, the delivery service and its tuning options, MassTransit dispatch, custom handlers and fault handling, and observability.


Migrations

The Migrations library gives you a provider-agnostic way to apply migrations (or any startup data setup) as part of the host lifecycle. Implement IMigrationsTask (one method, ApplyMigrations(CancellationToken)), register it, and the hosted IgniteMigrationsService runner resolves and runs every registered task at startup. AddDbContextMigrationsTask<TDbContext> provides a ready-made task that applies EF Core relational migrations.

See the Migrations page for the full walkthrough: installing and registering the runner, running EF Core migrations at startup, writing custom tasks, and the MigrationsServiceSparkSettings (Enabled, ExitOnComplete). The Migrations Spark page covers the runner from the Ignite Spark angle.


Zendesk API client

The Zendesk API client ships two Kiota-generated clients covering the complete Zendesk REST API, built on IHttpClientFactory: ZendeskSupportApiClient (the full Support API — 614 operations) and ZendeskHelpCenterApiClient (the full Help Center API — 177 operations). Register them with AddZendeskClient() and navigate the typed request builders, which mirror the API's URL structure (zendesk.Api.V2.Tickets[id].GetAsync(…)). A curated rim adds what the generator cannot: OAuth client_credentials authentication (cached, single-flight token refresh), a typed ZendeskApiException (status, body, Retry-After), authenticated attachment-content downloads, and OpenTelemetry tracing.

See the Zendesk API client page for the full walkthrough: registration and keyed multi-tenant instances, request-builder usage, the raw-JSON escape hatch and the re-serialization hazard, configuration and secret hygiene, the OAuth model, error handling and rate limits, and observability. The Zendesk Spark page covers the Ignite integration (config binding, startup validation, live health check, tracing).

For exposing Zendesk to an AI agent, the Zendesk MCP server is a deployable Model Context Protocol host — built on the generated clients and Ignite — that publishes 215 read and write MCP tools with lean-first responses (summary rows by default, full records on request), execution-mode gating, and Origin validation. It is an application, not a package.


Hermes Agent API client

The Hermes Agent API client is a typed client for the Nous Research Hermes Agent API server, built on IHttpClientFactory. Register it with AddHermesAgentClient() and inject IHermesAgentClient — six resource-grouped areas (Chat, Responses, Runs, Jobs, Sessions, Server) mirroring the server's endpoint groups: the OpenAI-compatible /v1 surface (chat completions, Responses API, asynchronous runs, discovery/health) plus the /api scheduled-jobs and sessions surfaces. Streaming endpoints are consumed as typed IAsyncEnumerable<…> event hierarchies with await foreach (unknown event types degrade gracefully instead of throwing), authentication is a static bearer key, errors surface as a typed HermesAgentApiException (status, body, parsed error from both server envelopes, Retry-After), and every operation is traced via OpenTelemetry.

See the Hermes Agent API client page for the full walkthrough: registration and keyed multi-server instances, the six API areas with streaming samples, configuration and ApiKey secret hygiene, error handling and idempotency, the server quirks that affect consumers, and observability. The Hermes Agent Spark page covers the Ignite integration (config binding, startup validation, live health check, tracing).


See also