Ananke.Roles 0.8.4

dotnet add package Ananke.Roles --version 0.8.4
                    
NuGet\Install-Package Ananke.Roles -Version 0.8.4
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ananke.Roles" Version="0.8.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Ananke.Roles" Version="0.8.4" />
                    
Directory.Packages.props
<PackageReference Include="Ananke.Roles" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Ananke.Roles --version 0.8.4
                    
#r "nuget: Ananke.Roles, 0.8.4"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Ananke.Roles@0.8.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Ananke.Roles&version=0.8.4
                    
Install as a Cake Addin
#tool nuget:?package=Ananke.Roles&version=0.8.4
                    
Install as a Cake Tool

Ananke.Roles

Ananke.Roles provides role catalogs, manifest generation helpers, and studio-oriented wiring for persona-driven Ananke hosts.

Included

  • AgentRole and supporting review/escalation policies
  • AgentRoleCatalog in-memory catalog implementation
  • RoleManifestFactory for turning roles into WorkflowManifest instances
  • StudioRouter and StudioHostBuilder for lightweight application wiring

Slack binding helpers (Ananke.Roles.Slack)

The Ananke.Roles.Slack sub-namespace adds optional Slack-specific helpers that bridge Slack channels and interactions to the role layer. These types take a direct dependency on Ananke.Platforms.Slack; the rest of Ananke.Roles remains platform-agnostic.

Future note: These helpers may be extracted into a dedicated Ananke.Roles.Slack integration package in a later release so that Ananke.Roles depends only on Ananke.Platforms abstractions.

SlackChannelMap

Wraps StudioOptions.ChannelRoleMap with a typed lookup against IAgentRoleCatalog.

var map = new SlackChannelMap(studioOptions, roleCatalog);

if (map.TryResolveRole(channelId, out var role))
    Console.WriteLine(role!.Name);   // e.g. "writer"

IReadOnlyList<string> knownChannels = map.MappedChannelIds;

Channels that map to a role name that does not exist in the catalog are silently excluded from MappedChannelIds and return false from TryResolveRole.

RoleAwareMessageHandler

An IPlatformMessageHandler that routes each incoming PlatformMessage to a workflow named after the resolved role, falling back to a configured default when the channel is not mapped.

var handler = new RoleAwareMessageHandler(channelMap, studioRouter, defaultWorkflow: "default");

Override OnWorkflowRoutedAsync to plug in your own workflow execution logic.

SlackApprovalCallback

Bridges Slack block-action interactions (Approve / Revise / Reject buttons rendered by SlackApprovalBlocks) into WorkReviewDecision values for a CallbackWorkReviewGate.

var gate = new CallbackWorkReviewGate(async (item, ct) =>
{
    // post SlackApprovalBlocks.Build(item) to Slack here …
    return await pendingDecision.Task;
});

var callback = new SlackApprovalCallback(async (decision, ct) =>
{
    pendingDecision.TrySetResult(decision);
    await Task.CompletedTask;
});

// In OnInteractionAsync:
await callback.HandleInteractionAsync(interaction, ct);

HandleInteractionAsync returns true when the action id matches one of the canonical approval ids (ananke_approve, ananke_revise, ananke_reject) and false otherwise, letting the caller forward unrecognised interactions elsewhere.

Product 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.8.4 93 5/29/2026