Sunmeat.Signal
1.0.0
dotnet add package Sunmeat.Signal --version 1.0.0
NuGet\Install-Package Sunmeat.Signal -Version 1.0.0
<PackageReference Include="Sunmeat.Signal" Version="1.0.0" />
<PackageVersion Include="Sunmeat.Signal" Version="1.0.0" />
<PackageReference Include="Sunmeat.Signal" />
paket add Sunmeat.Signal --version 1.0.0
#r "nuget: Sunmeat.Signal, 1.0.0"
#:package Sunmeat.Signal@1.0.0
#addin nuget:?package=Sunmeat.Signal&version=1.0.0
#tool nuget:?package=Sunmeat.Signal&version=1.0.0

Sunmeat.Signal
One message. Every channel.
A notification library for .NET 8–11. Send immediately, preview routing decisions, or schedule delivery in a durable SQLite queue. The core package has no external dependencies.
Install
dotnet add package Sunmeat.Signal --version 1.0.0
Quick start
using Sunmeat.Signal;
await Signal.SendAsync("Hello, world!");
var memory = new InMemoryChannel();
var client = Signal.Create(options => options.AddChannel(memory));
var queue = new InMemoryNotificationQueue();
await client.Message("The export is ready.")
.Title("Export completed")
.Priority(NotificationPriority.High)
.EnqueueAsync(queue, idempotencyKey: "export-42");
await new NotificationWorker(client, queue).RunOnceAsync(TimeSpan.FromMinutes(1));
Console.WriteLine($"Recorded notifications: {memory.Snapshot().Length}");
Channels
| Channel | Format | Attachments |
|---|---|---|
| Console, JSONL, in-memory | Text | — |
| SMTP STARTTLS | Text, HTML | Up to 8 files totaling 4 MiB |
| Telegram Bot API | Text | — |
| Discord and Slack | Text via incoming webhook | — |
| HTTPS webhook | JSON with optional HMAC-SHA-256 signature | — |
Network delivery requires explicit channel configuration. Signal supports named routes, fallback, recipient preferences, preview, English and Ukrainian templates, and bounded retries. SQLite and DI registration are optional packages.
Delivery and security documentation
Preview a Telegram notification
Supply the bot token and chat ID through environment variables. This example only previews the notification.
using Sunmeat.Signal;
public static class TelegramExample
{
public static async Task PreviewAsync(CancellationToken cancellationToken = default)
{
var token = Environment.GetEnvironmentVariable("SIGNAL_TELEGRAM_BOT_TOKEN")
?? throw new InvalidOperationException("Configure the Telegram bot token.");
var chatId = Environment.GetEnvironmentVariable("SIGNAL_TELEGRAM_CHAT_ID")
?? throw new InvalidOperationException("Configure the Telegram chat ID.");
using var channel = HttpNotificationChannel.Telegram(token);
var client = Signal.Create(options => options.AddChannel(channel));
var preview = await client.Message("Deployment completed.")
.Telegram(chatId)
.PreviewDetailsAsync(cancellationToken);
Console.WriteLine(preview.Single().Status);
}
}
Routes, localization, and HTML reports
Detailed previews show rendered text and attachment metadata for eligible channels. Fallback stops on success or an ambiguous outcome. This example writes a self-contained report with aggregate delivery results.
using Sunmeat.Signal;
public static class RoutingExample
{
public static async Task RunAsync(CancellationToken cancellationToken = default)
{
var memory = new InMemoryChannel();
var template = new NotificationTemplate("Export {{id}} is ready.", "Експорт {{id}} готовий.");
var client = Signal.Create(options =>
{
options.AddChannel(memory);
options.UseConsole();
options.Route("exports",
new Destination("memory", new Recipient("operator") { Locale = "uk-UA" }),
new Destination("console", new Recipient("local")));
options.Render("memory", (message, recipient) => message with
{
Body = template.Render(new Dictionary<string, string> { ["id"] = "42" }, recipient.Locale).Body
});
});
var message = client.Message("Export 42 is ready.").Title("Export complete").Route("exports");
var preview = await message.PreviewDetailsAsync(cancellationToken);
foreach (var destination in preview)
Console.WriteLine($"{destination.Channel}: {destination.Status}");
var results = await message.SendAsync(fallback: true, cancellationToken: cancellationToken);
var report = DeliveryReport.RenderHtml(results, "uk");
await File.WriteAllTextAsync("delivery-report.html", report, cancellationToken);
}
}
SQLite queues and hosted delivery
In ASP.NET Core or a Generic Host application, pass builder.Services to HostedExample.Configure. Keep the database in an application-owned directory. Use AuthorizeAsync to verify current consent before sending queued messages.
dotnet add package Sunmeat.Signal.Persistence.Sqlite --version 1.0.0
dotnet add package Sunmeat.Signal.Extensions.DependencyInjection --version 1.0.0
using Microsoft.Extensions.DependencyInjection;
using Sunmeat.Signal;
using Sunmeat.Signal.Extensions.DependencyInjection;
using Sunmeat.Signal.Persistence.Sqlite;
public static class HostedExample
{
public static void Configure(IServiceCollection services, string sqlitePath)
{
services.AddSignal(options => options.UseConsole());
services.AddSingleton<INotificationQueue>(_ => new SqliteNotificationQueue(sqlitePath));
services.AddSignalWorker(new SignalWorkerOptions
{
Lease = TimeSpan.FromMinutes(2),
PollInterval = TimeSpan.FromSeconds(1)
});
}
public static ValueTask<string> ScheduleAsync(SignalClient signal, INotificationQueue queue,
CancellationToken cancellationToken = default)
{
return signal.Message("The nightly export is ready.")
.EnqueueAsync(queue, due: DateTimeOffset.UtcNow.AddMinutes(5),
idempotencyKey: "export:42:operator", cancellationToken: cancellationToken);
}
}
Delivery guarantees
Accepted means the provider acknowledged the request. Lease recovery after a crash can duplicate sends. An idempotency key deduplicates enqueue operations within the queue and its retention window.
Original specification coverage
Build the NuGet packages
From the repository root with the .NET 11 SDK, build the three packages and the core symbols. The files appear in artifacts.
dotnet pack -c Release -o artifacts
Sunmeat ecosystem
Prism · Pulse · Guard · Diff · Morph · Forge · Lens · Nexus · Vault
❤️ Support the project
Copyright © 2026 Oleksandr Zahoruiko · sunmeat.dev
| Product | Versions 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 is compatible. 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 is compatible. 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. net11.0 is compatible. |
-
net10.0
- No dependencies.
-
net11.0
- No dependencies.
-
net8.0
- No dependencies.
-
net9.0
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sunmeat.Signal:
| Package | Downloads |
|---|---|
|
Sunmeat.Signal.Extensions.DependencyInjection
Dependency injection registration for Sunmeat.Signal. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 71 | 11/30/2026 |
Initial notification delivery APIs.