Unicorb 0.9.17-alpha
dotnet add package Unicorb --version 0.9.17-alpha
NuGet\Install-Package Unicorb -Version 0.9.17-alpha
<PackageReference Include="Unicorb" Version="0.9.17-alpha" />
<PackageVersion Include="Unicorb" Version="0.9.17-alpha" />
<PackageReference Include="Unicorb" />
paket add Unicorb --version 0.9.17-alpha
#r "nuget: Unicorb, 0.9.17-alpha"
#:package Unicorb@0.9.17-alpha
#addin nuget:?package=Unicorb&version=0.9.17-alpha&prerelease
#tool nuget:?package=Unicorb&version=0.9.17-alpha&prerelease
Unicorb
State-machine engine for bots. It provides registries for commands, states, handlers and extractors, plus an update processing pipeline.
The package is transport-neutral. The host decides where updates come from and where responses are sent.
TFM: net9.0, net10.0
The API may change before version 1.0.0.
Install
dotnet add package Unicorb
Quick Start
builder.Services.AddUnicorb(o =>
{
o.Registries(r => r.ScanFrom<MyMarker>());
});
ScanFrom<T> scans one assembly for commands, states, handlers and extractors.
Use explicit scanning when you need more control:
builder.Services.AddUnicorb(o => o.Registries(r =>
{
r.ScanCommandsFrom<MyMarker>();
r.ScanStatesFrom<MyMarker>();
r.ScanHandlersFrom<MyMarker>();
r.ScanExtractorsFrom<MyMarker>();
}));
Dialog Model
InteractionStatewaits for user input.TransitionStatemoves to the next step without user input.CommandHandler,InteractionHandlerandTransitionHandlerprocess dialog steps.IInputExtractor<TUpdate, TInput>converts a transport update into handler input.StateContextstores session variables.
Session snapshots are stored by key:
public sealed record SessionKey(string Platform, string Member);
Platform separates transports such as telegram, max and playground. Member identifies the session.
Validate Wiring
After app.Build(), validate that handlers and extractors are connected:
var app = builder.Build();
app.Services.ValidateUnicorb<PlaygroundUpdate>();
Overrides
- Add a custom extractor with
ScanExtractorsFrom<MyMarker>()after the bridge marker. - If multiple extractors match the same
(TUpdate, TInput)pair, the last one wins. - Register a custom slash-command parser before
AddUnicorb. - Register a custom
ISnapshotStoreorISessionFactorybeforeAddUnicorb. - The default
InMemorySnapshotStoreis for get-started and local dev only; use a persistent store in production.
builder.Services.AddSingleton<ICommandInvocationParser, MyCommandParser>();
builder.Services.AddUnicorb(o => o.Registries(r => r.ScanFrom<MyMarker>()));
Bridge Packages
| Package | Adds |
|---|---|
Unicorb.Playground.Bridge |
Playground pipeline and adapter |
Unicorb.Telegram.Bridge |
Telegram pipeline and Bot API adapter |
Unicorb.Max.Bridge |
Max pipeline and API adapter |
Unicorb.Telegram.Configuration.AspNetCore |
Telegram webhook endpoint |
Unicorb.Max.Configuration.AspNetCore |
Max webhook endpoint |
Minimal Playground stack:
builder.Services.AddUnicorb(o => o.Registries(r =>
{
r.ScanHandlersFrom<MyMarker>();
r.ScanStatesFrom<MyMarker>();
r.ScanCommandsFrom<MyMarker>();
r.ScanExtractorsFrom<PlaygroundAssemblyMarker>();
}));
builder.Services.AddPlayground();
builder.Services.AddPlaygroundBridge();
var app = builder.Build();
app.Services.ValidateUnicorb<PlaygroundUpdate>();
app.UsePlayground();
Demo
dotnet run --project Unicorb.Demo
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. |
-
net10.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.10)
-
net9.0
- Microsoft.Extensions.DependencyInjection (>= 9.0.10)
- Microsoft.Extensions.Logging.Abstractions (>= 9.0.10)
NuGet packages (5)
Showing the top 5 NuGet packages that depend on Unicorb:
| Package | Downloads |
|---|---|
|
Unicorb.Max.Bridge
Max transport bridge for Unicorb: update pipeline, state machine, extractors, and Bot API adapter |
|
|
Unicorb.Telegram.Bridge
Telegram transport bridge for Unicorb: update pipeline, state machine, extractors, and Bot API adapter |
|
|
Unicorb.Telegram.Configuration.AspNetCore
ASP.NET Core webhook endpoint for Unicorb Telegram bots: default POST route to IUpdateService |
|
|
Unicorb.Max.Configuration.AspNetCore
ASP.NET Core webhook endpoint for Unicorb Max bots: default POST route to IUpdateService |
|
|
Unicorb.Playground.Bridge
Playground transport bridge for Unicorb: update pipeline, state machine, extractors, and in-process UI adapter |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.9.17-alpha | 26 | 7/30/2026 |
| 0.9.16-alpha | 28 | 7/30/2026 |
| 0.9.15-alpha | 36 | 7/30/2026 |
| 0.9.14-alpha | 37 | 7/29/2026 |
| 0.9.13-alpha | 64 | 7/21/2026 |
| 0.9.12-alpha | 65 | 7/20/2026 |
| 0.9.11-alpha | 70 | 7/15/2026 |
| 0.9.10-alpha | 66 | 7/13/2026 |
| 0.9.9-alpha | 67 | 7/13/2026 |
| 0.9.8-alpha | 66 | 7/12/2026 |
| 0.9.7-alpha | 76 | 7/10/2026 |
| 0.9.6-alpha | 77 | 7/10/2026 |
| 0.9.5-alpha | 73 | 7/9/2026 |
| 0.9.4-alpha | 76 | 7/9/2026 |
| 0.9.3-alpha | 88 | 6/24/2026 |
| 0.9.2-alpha | 92 | 6/23/2026 |
| 0.9.1-alpha | 80 | 6/14/2026 |
| 0.9.0-alpha | 86 | 6/14/2026 |