Skip to content

v1.6 SDK Release

Latest

Choose a tag to compare

@tracyboehrer tracyboehrer released this 18 Jun 20:32

What's Changed

New Features

Slack Extension (Microsoft.Agents.Extensions.Slack)

New first-class Slack channel extension, enabling agents to communicate directly with Slack without requiring Azure Bot Service as an intermediary:

  • SlackAgentExtension: Extension class with routing helpers (OnSlackMessage, OnSlackEvent*) for handling Slack-specific events and messages.
  • SlackStream: Streaming support for Slack, allowing agents to stream responses back to Slack channels.
  • SlackApi: Low-level Slack API client for direct Slack Web API calls.
  • SlackChannelData: Strongly-typed channel data model with Payload support for action events.
  • MapSlackEndpoints: ASP.NET Core endpoint routing for Slack event subscriptions and interactions.
  • SlackExtensionAttribute: Source-generated attribute for declarative Slack event routing.
  • Includes a full SlackAgent sample demonstrating streaming, event handling, and action payloads.

Named Pipe Transport (Microsoft.Agents.Hosting.DirectLine.NamedPipes)

New Named Pipe transport layer for high-performance local inter-process agent communication:

  • NamedPipeProtocol: Binary protocol with chunked transfer, payload size limits, and content-type negotiation.
  • NamedPipeTransport: Reliable duplex transport with disconnect handling and error recovery.
  • NamedPipeMessageHandler: Activity message handler with streaming attachment support.
  • NamedPipeHostedService: IHostedService implementation for ASP.NET Core integration.
  • Enforces payload size limits and handles large object heap (LOH) pressure via 64 KB chunked trailing-byte drain.
  • Idempotent DisposeAsync to prevent ObjectDisposedException on double-dispose.
  • Comprehensive test coverage for chunking, content type handling, end flag semantics, boundary conditions, and streaming behavior.

Declarative Route Attributes (AgentApplicationAttributes)

New attribute-based routing model for agent handlers, complementing the existing fluent API:

  • AgentExtensionAttribute: Base attribute for agent extension registration with source-generated routing via AgentExtensionSourceGenerator.
  • Route builder base classes: ConversationUpdateRouteBuilderBase, EventRouteBuilderBase, FeedbackRouteBuilderBase, HandoffRouteBuilderBase, MessageRouteBuilderBase, TypeRouteBuilderBase — enabling extensible, attribute-driven route registration.
  • IRouteAttribute: Public interface for custom route attributes.
  • Full test coverage for attribute-based routing.

Agentic Header Propagation

  • AgenticHeaderProvider / IHeaderValueProvider: New infrastructure for propagating agentic context headers across agent-to-agent calls.
  • Enables forwarding of correlation and orchestration headers through the call chain.
  • Integrated in the AgentAI sample.

OAuth Sign-In Cancellation

  • TeamsSignInInProgressMessage: New message shown to Teams users when a sign-in flow is already in progress.
  • Added cancel options allowing users to abort an in-progress OAuth flow.

Authentication: IdentityProxyManager Auth Type

  • New AuthTypes.IdentityProxyManager replaces the UserManagedIdentity + EnableContainerIMDS combination with a single, clearer auth type for container identity proxy scenarios.

Authentication: Azure Region Support

  • AzureRegion handling added to MsalAuth, enabling region-aware token acquisition for improved latency and resilience.

Improvements

ServiceUrl Validation

  • Added optional Activity.ServiceUrl check against the serviceurl claim in authentication for defense-in-depth validation.
  • Graceful handling of invalid ServiceUrl format instead of throwing unhandled exceptions.
  • Removed unnecessary DeliveryMode guard in ValidateServiceUrl.

AgentState Thread Safety

  • Switched AgentState to lock-based concurrency to preserve serialization order and prevent crashes under streaming workloads.
  • Added argument validation and comprehensive locking across AgentState operations.
  • New AgentStateThreadSafetyTests and AgentStateValidationTests test suites.

Serialization / JSON

  • DictionaryOfObjectConverter: Fixed round-trip for primitive arrays in IDictionary<string, object> — complex types are excluded from primitive array promotion to preserve existing shape for callers expecting IList.
  • DictionaryOfObjectConverter: Fixed crash on 2D arrays in IDictionary<string, object>.
  • Added comprehensive DictionaryOfObjectConverter unit tests.

Proactive Messaging Instrumentation

  • New OpenTelemetry scopes for proactive operations: ContinueConversation, CreateConversation, DeleteConversation, GetConversation, SendActivity, StoreConversation.
  • Proactive services are now registered on the TurnContext in Proactive.OnTurnAsync.

Route Builders

  • Refactored core route builders (ConversationUpdateRouteBuilder, EventRouteBuilder) to use base classes, enabling future extensibility.
  • Added protected constructors to route builder base classes for subclassing.
  • Fixed ChannelId wildcard to include subchannel matching.

Logging

  • CloudAdapterLog: New structured log class for CloudAdapter operations.
  • Changed LogNoRouteMatched from Information to Debug level to reduce log noise.
  • Surface OAuthHandlers delegate errors in route JSON output for easier diagnostics.
  • Added BeginScope to CloudAdapter and HostedActivityService for structured log correlation.

Connector

  • ConversationsRestClient: Sanitize truncated agents-channel conversation IDs (#840).
  • GetConversationReference: Added parameterless overload.
  • Wrapping the returned task for DeleteConversation.
  • Null or whitespace check for audience when creating ConnectorClient.

Startup

  • AgentApplication now defaults to MemoryStorage if no IStorage is registered, eliminating the most common startup misconfiguration.
  • HttpClientFactory added to AgentApplicationOptions.

OAuth Flow

  • Changed OAuth flow to not rely on exceptions for control flow, improving performance and debuggability.
  • Added OAuthFlowResult type for structured flow outcomes.

TypingWorker

  • Fixed race condition in TypingWorker under concurrent turns.

ObjectPath

  • Fixed ObjectPath issues and added comprehensive unit tests.

Bug Fixes

  • AgentState thread-safety crash under streaming (#841): Concurrent streaming operations could corrupt AgentState due to ConcurrentDictionary not preserving serialization order for DictionaryOfObjectConverter. Switched to lock-based concurrency to fix.
  • DictionaryOfObjectConverter crash on primitive arrays: Primitive arrays in IDictionary<string, object> were not round-tripping correctly, causing data loss or runtime exceptions. Fixed array promotion logic.
  • DictionaryOfObjectConverter crash on 2D arrays: Multi-dimensional arrays in IDictionary<string, object> would throw during deserialization. Added proper nested array handling.
  • Truncated conversation IDs (#840): Agents-channel conversation IDs could be truncated in ConversationsRestClient, causing 404s or misrouted messages. IDs are now sanitized before use.
  • Citation icon names (#823): Added Microsoft OneNote and SharePoint to AI Citation icon names, fixing deserialization failures for activities from Copilot Studio.
  • Fix for #827.
  • StreamingResponse final message regression: Fixed regression in StreamingResponse final message handling introduced during v1.5.x.
  • CultureNotFoundException in TypeExtensions: Fixed crash during BotState serialization when running under certain culture settings.
  • SerializationInit race conditions: Fixed races in SerializationInit paths, including improper initialization in the SharePoint extension.
  • TypingWorker race condition: Fixed race in TypingWorker that could cause missed or duplicate typing indicators under concurrent turns.

Infrastructure & Tooling

  • Bumped .NET SDK from 8.0.420 to 8.0.422.
  • Updated pull request workflows to include rel/** branches (#804).
  • Added AnalyzerReleases shipped/unshipped tracking files to Core.Analyzers.
  • Added extensive test coverage across Authentication, Slack, AgentState, NamedPipe, Route, and DictionaryOfObjectConverter.
  • Using launchSettings consistently for sample projects.
  • Added architecture diagrams, copilot instructions, and developer documentation.

Full Changelog: v1.5.184...v1.6.150