HPD-Agent.Bots.Abstractions
0.9.6
See the version list below for details.
dotnet add package HPD-Agent.Bots.Abstractions --version 0.9.6
NuGet\Install-Package HPD-Agent.Bots.Abstractions -Version 0.9.6
<PackageReference Include="HPD-Agent.Bots.Abstractions" Version="0.9.6" />
<PackageVersion Include="HPD-Agent.Bots.Abstractions" Version="0.9.6" />
<PackageReference Include="HPD-Agent.Bots.Abstractions" />
paket add HPD-Agent.Bots.Abstractions --version 0.9.6
#r "nuget: HPD-Agent.Bots.Abstractions, 0.9.6"
#:package HPD-Agent.Bots.Abstractions@0.9.6
#addin nuget:?package=HPD-Agent.Bots.Abstractions&version=0.9.6
#tool nuget:?package=HPD-Agent.Bots.Abstractions&version=0.9.6
HPD-Agent.Bots.Abstractions
Contracts, attributes, and source generation for connecting platform events to HPD agents.
Use this package with HPD-Agent.Bots.AspNetCore when building a custom adapter. The generated registry references the ASP.NET Core bridge even when another transport drives the adapter. For the built-in platforms, install the corresponding Slack, Discord, Telegram, WhatsApp, or Teams package.
dotnet add package HPD-Agent.Bots.Abstractions --version 1.0.0
dotnet add package HPD-Agent.Bots.AspNetCore --version 1.0.0
Custom adapter
using System.Text.Json.Serialization;
using HPD.Agent.Bots;
[HpdBot("contoso")]
[HpdStreaming(StreamingStrategy.BufferAndPost)]
public partial class ContosoBot
{
[HpdBotEventHandler("message.created")]
private Task<BotAdapterResponse> HandleMessageAsync(
BotRequestContext context,
ContosoMessage payload)
=> Task.FromResult(BotAdapterResponse.Text(payload.Text));
}
public sealed record ContosoMessage(string Text);
[JsonSerializable(typeof(ContosoMessage))]
internal partial class ContosoBotJsonContext : JsonSerializerContext;
public sealed class ContosoBotConfig
{
public string? AgentId { get; set; }
}
The source generator emits AddContosoBot(...), MapContosoWebhook(...), neutral IBotAdapter dispatch, and registry registration. Handlers must be private or internal. Payloads must be records and must be included in a hand-written JSON context named {AdapterClass}JsonContext.
See the custom adapter guide and bots overview.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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
- HPD-Agent.Hosting (>= 0.9.6)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
-
net11.0
- HPD-Agent.Hosting (>= 0.9.6)
NuGet packages (6)
Showing the top 5 NuGet packages that depend on HPD-Agent.Bots.Abstractions:
| Package | Downloads |
|---|---|
|
HPD-Agent.Bots.AspNetCore
ASP.NET Core integration for HPD platform adapters. Provides webhook signature verification, endpoint mapping, and MapHPDBots() convenience extension. |
|
|
HPD-Agent.Bots.Telegram
Telegram bot adapter for HPD agents. Connects HPD agents to Telegram via webhooks or long polling. |
|
|
HPD-Agent.Bots.Discord
Discord adapter for HPD agents. Connects an HPD agent to Discord via HTTP Interactions and optional Gateway events. |
|
|
HPD-Agent.Bots.WhatsApp
WhatsApp Business Cloud API bot adapter for HPD agents. |
|
|
HPD-Agent.Bots.Teams
Microsoft Teams bot bridge for HPD agents using the Microsoft 365 Agents SDK. |
GitHub repositories
This package is not used by any popular GitHub repositories.