HPD-Agent.Bots.Abstractions
0.9.5
dotnet add package HPD-Agent.Bots.Abstractions --version 0.9.5
NuGet\Install-Package HPD-Agent.Bots.Abstractions -Version 0.9.5
<PackageReference Include="HPD-Agent.Bots.Abstractions" Version="0.9.5" />
<PackageVersion Include="HPD-Agent.Bots.Abstractions" Version="0.9.5" />
<PackageReference Include="HPD-Agent.Bots.Abstractions" />
paket add HPD-Agent.Bots.Abstractions --version 0.9.5
#r "nuget: HPD-Agent.Bots.Abstractions, 0.9.5"
#:package HPD-Agent.Bots.Abstractions@0.9.5
#addin nuget:?package=HPD-Agent.Bots.Abstractions&version=0.9.5
#tool nuget:?package=HPD-Agent.Bots.Abstractions&version=0.9.5
HPD-Agent.Bots.Abstractions
Contracts, attributes, and source generation for connecting platform events to HPD agents.
Use this package when building a custom 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
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));
}
[HpdBotPayload]
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 | 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. |
-
net10.0
- HPD-Agent.Hosting (>= 0.9.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
-
net8.0
- HPD-Agent.Hosting (>= 0.9.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
-
net9.0
- HPD-Agent.Hosting (>= 0.9.5)
- Microsoft.Extensions.Hosting.Abstractions (>= 10.0.13)
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.Slack
Slack adapter for HPD agents. Connects an HPD agent to Slack via Events API and Block Kit — webhook routing, streaming (PostAndEdit and native chatStream), slash commands, modals, permissions, and file uploads. |
|
|
HPD-Agent.Bots.WhatsApp
WhatsApp Business Cloud API bot adapter for HPD agents. |
GitHub repositories
This package is not used by any popular GitHub repositories.