Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/dotnet-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ jobs:
working-directory: dotnet
run: dotnet pack src/Microsoft.Agents.AI.DurableTask/Microsoft.Agents.AI.DurableTask.csproj --configuration Release --no-build --output ../artifacts/packages

- name: Pack Azure Functions Durable Task extension registration
working-directory: dotnet
run: dotnet pack src/Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask/Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask.csproj --configuration Release --no-build --output ../artifacts/packages

- name: Pack Azure Functions hosting
working-directory: dotnet
run: dotnet pack src/Microsoft.Agents.AI.Hosting.AzureFunctions/Microsoft.Agents.AI.Hosting.AzureFunctions.csproj --configuration Release --no-build --output ../artifacts/packages
Expand Down
1 change: 1 addition & 0 deletions dotnet/agent-framework-durable-extension.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<Folder Name="/src/">
<Project Path="src/Microsoft.Agents.AI.DurableTask/Microsoft.Agents.AI.DurableTask.csproj" />
<Project Path="src/Microsoft.Agents.AI.Hosting.AzureFunctions/Microsoft.Agents.AI.Hosting.AzureFunctions.csproj" />
<Project Path="src/Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask/Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/Microsoft.Agents.AI.DurableTask.UnitTests/Microsoft.Agents.AI.DurableTask.UnitTests.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
<!-- Azure Functions packages -->
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
<!-- Azure Functions packages -->
<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" />
<!--
Microsoft.Azure.Functions.Worker.Extensions.DurableTask is not referenced here: this sample doesn't use the
Durable Functions APIs directly, and Microsoft.Agents.AI.Hosting.AzureFunctions already registers the
Durable Task extension with the Functions host. The package below registers the Durable Task Scheduler
backend selected by the "AzureManaged" storage provider in host.json.
-->
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask.AzureManaged" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http.AspNetCore" />
<PackageReference Include="Microsoft.Azure.Functions.Worker.Sdk" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>$(TargetFrameworksCore)</TargetFrameworks>
<!-- This assembly only carries an assembly-level attribute, so there is nothing to document. -->
<GenerateDocumentationFile>false</GenerateDocumentationFile>
<!-- The Durable Task worker extension is referenced for its build assets, not for its API surface. -->
<EnableReferenceTrimmer>false</EnableReferenceTrimmer>
<!--
Version of the WebJobs (host) Durable Task extension that Microsoft.Azure.Functions.Worker.Extensions.DurableTask
binds to. Keep in sync when that package reference is upgraded.
-->
<DurableTaskWebJobsExtensionVersion>3.8.2</DurableTaskWebJobsExtensionVersion>
</PropertyGroup>

<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props" />
Comment thread
kshyju marked this conversation as resolved.

<!-- NuGet package metadata -->
<PropertyGroup>
<Title>Durable Task Azure Functions extension for Microsoft Agent Framework</Title>
<Description>Registers the Durable Task Azure Functions extension so that applications hosting durable agents do not need to declare a Durable Functions trigger of their own.</Description>
<!-- Enable package validation after the first stable version is published. -->
<PackageValidationBaselineVersion />
<EnablePackageValidation>false</EnablePackageValidation>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.DurableTask" />
</ItemGroup>

<ItemGroup>
<!--
The Azure Functions worker SDK only honors a single ExtensionInformationAttribute per assembly
(https://github.com/Azure/azure-functions-dotnet-worker/issues/3423), and
Microsoft.Agents.AI.Hosting.AzureFunctions already uses its own attribute for the MCP extension.
This assembly exists solely to carry the Durable Task registration, with implicit registration
enabled so the WebJobs extension is loaded even when the application declares no Durable Functions
triggers of its own.
-->
<AssemblyAttribute Include="Microsoft.Azure.Functions.Worker.Extensions.Abstractions.ExtensionInformationAttribute">
<_Parameter1>Microsoft.Azure.WebJobs.Extensions.DurableTask</_Parameter1>
<_Parameter2>$(DurableTaskWebJobsExtensionVersion)</_Parameter2>
<_Parameter3>true</_Parameter3>
<_Parameter3_IsLiteral>true</_Parameter3_IsLiteral>
</AssemblyAttribute>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

## [Unreleased]

- Fixed the Durable Task Azure Functions extension not being registered unless the application declared a Durable Functions trigger of its own, which required a dummy `[OrchestrationTrigger]` function for the agent endpoints to become available ([#82](https://github.com/microsoft/agent-framework-durable-extension/pull/82))
- Fixed the durable configuration methods not composing on the same application: calling `ConfigureDurableAgents` first left the workflow functions without an executor, calling `ConfigureDurableWorkflows` first registered the built-in function execution middleware twice, agents registered through `ConfigureDurableOptions` generated no functions at all, leaving the agent silently unreachable, and registering an agent that a workflow already referenced threw instead of promoting it. Agents now get the same entry points regardless of which method registers them and in which order, with each function generated exactly once even when a workflow and an explicit registration both contribute the same agent, while agents that exist only because a workflow references them continue to get no HTTP endpoint of their own ([#67](https://github.com/microsoft/agent-framework-durable-extension/pull/67))
- [BREAKING] Always return JSON from the workflow status and respond endpoints, including on errors and when the request sends no `Accept` header, and fix malformed request bodies surfacing as an unhandled error instead of `400 Bad Request` ([#60](https://github.com/microsoft/agent-framework-durable-extension/pull/60))
- [BREAKING] Support bounded synchronous workflow HTTP invocation through query parameters and default workflow run responses to JSON, with `Accept: text/plain` available for the legacy text format and the same negotiated asynchronous response returned on timeout ([#52](https://github.com/microsoft/agent-framework-durable-extension/pull/52))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
<ImplicitUsings>enable</ImplicitUsings>
<!-- CA2007: This rule should generally be suppressed in Durable Task libraries. Also, this is not library code. -->
<!-- AD0001: Temporary workaround for Microsoft.DurableTask.Analyzers v0.2.0 bug (ArgumentNullException on 'node'). Remove when upgrading to a fixed analyzer version. -->
<NoWarn>$(NoWarn);CA2007;AD0001</NoWarn>
<!-- RT0002: The Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask reference is intentionally
unused at the API level; it only carries the Durable Task extension registration attribute. -->
<NoWarn>$(NoWarn);CA2007;AD0001;RT0002</NoWarn>
</PropertyGroup>

<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props" />
Expand All @@ -20,6 +22,12 @@
<!-- Project references -->
<ItemGroup>
<ProjectReference Include="..\Microsoft.Agents.AI.DurableTask\Microsoft.Agents.AI.DurableTask.csproj" />
<!--
Carries the ExtensionInformationAttribute that registers the Durable Task WebJobs extension.
It lives in a separate assembly because the Azure Functions worker SDK only honors one such
attribute per assembly, and this assembly already declares one for the MCP extension below.
-->
<ProjectReference Include="..\Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask\Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask.csproj" />
</ItemGroup>

<!-- Public dependencies -->
Expand Down
1 change: 1 addition & 0 deletions eng/templates/official/jobs/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
# project can be specified"). The whole -p: arg is quoted so PowerShell passes
# it through as a single literal argument.
dotnet pack src/Microsoft.Agents.AI.DurableTask/Microsoft.Agents.AI.DurableTask.csproj --configuration Release --no-build "-p:PackageOutputPath=$(Build.ArtifactStagingDirectory)/packages/dotnet"
dotnet pack src/Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask/Microsoft.Agents.AI.Hosting.AzureFunctions.Extensions.DurableTask.csproj --configuration Release --no-build "-p:PackageOutputPath=$(Build.ArtifactStagingDirectory)/packages/dotnet"
dotnet pack src/Microsoft.Agents.AI.Hosting.AzureFunctions/Microsoft.Agents.AI.Hosting.AzureFunctions.csproj --configuration Release --no-build "-p:PackageOutputPath=$(Build.ArtifactStagingDirectory)/packages/dotnet"
workingDirectory: dotnet
displayName: 'Pack .NET packages'
Expand Down
Loading