.NET: Move external MEAI classes to releasable packages (#279)

* Move external MEAI classes to releaseable packages

* Update dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/MEAI/NewHostedFileSearchTool.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/src/Microsoft.Extensions.AI.Agents.Abstractions/MEAI/NewHostedCodeInterpreterTool.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update dotnet/src/Microsoft.Extensions.AI.Agents.AzureAI/NewPersistentAgentsChatClient.cs

Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: westey <164392973+westey-m@users.noreply.github.com>
This commit is contained in:
Mark Wallace
2025-07-30 15:40:04 +01:00
committed by GitHub
Unverified
parent 5f10bdaecd
commit e877ffbca1
14 changed files with 45 additions and 8 deletions
+1
View File
@@ -143,6 +143,7 @@
<Project Path="src/Microsoft.Extensions.AI.Agents.Abstractions/Microsoft.Extensions.AI.Agents.Abstractions.csproj" />
<Project Path="src/Microsoft.Extensions.AI.Agents.AzureAI/Microsoft.Extensions.AI.Agents.AzureAI.csproj" />
<Project Path="src/Microsoft.Extensions.AI.Agents.CopilotStudio/Microsoft.Extensions.AI.Agents.CopilotStudio.csproj" />
<Project Path="src/Microsoft.Extensions.AI.Agents.OpenAI/Microsoft.Extensions.AI.Agents.OpenAI.csproj" />
<Project Path="src/Microsoft.Extensions.AI.Agents.Runtime.Abstractions/Microsoft.Extensions.AI.Agents.Runtime.Abstractions.csproj" />
<Project Path="src/Microsoft.Extensions.AI.Agents.Runtime/Microsoft.Extensions.AI.Agents.Runtime.csproj" Id="35d72ad5-61e1-45cc-a9ad-fa8490dbd146">
<BuildType Solution="Publish|*" Project="Release" />
-3
View File
@@ -1,3 +0,0 @@
# Proposed External references
This directory contains proposed external references for the Agent Framework that are not yet available and may be considered and added in the future.
@@ -42,6 +42,7 @@
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Agents.Orchestration\Microsoft.Agents.Orchestration.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Extensions.AI.Agents.AzureAI\Microsoft.Extensions.AI.Agents.AzureAI.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Extensions.AI.Agents.OpenAI\Microsoft.Extensions.AI.Agents.OpenAI.csproj" />
<ProjectReference Include="..\..\src\Microsoft.Extensions.AI.Agents\Microsoft.Extensions.AI.Agents.csproj" />
</ItemGroup>
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Diagnostics;
using Microsoft.Shared.Diagnostics;
@@ -1,5 +1,6 @@
// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Diagnostics;
using Microsoft.Shared.Diagnostics;
@@ -1,5 +1,7 @@
// Copyright (c) Microsoft. All rights reserved.
using System.Collections.Generic;
namespace Microsoft.Extensions.AI;
/// <summary>
@@ -1,5 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
// Line removed as it is unnecessary due to ImplicitUsings being enabled.
using System.Collections.Generic;
namespace Microsoft.Extensions.AI;
/// <summary>
@@ -4,6 +4,7 @@
<TargetFrameworks>$(ProjectsTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition="'$(Configuration)' == 'Debug'">$(ProjectsDebugTargetFrameworks)</TargetFrameworks>
<RootNamespace>Microsoft.Extensions.AI.Agents</RootNamespace>
<NoWarn>$(NoWarn);CA1716;IDE0009;</NoWarn>
<VersionSuffix>alpha</VersionSuffix>
</PropertyGroup>
@@ -4,6 +4,8 @@
<TargetFrameworks>$(ProjectsTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition="'$(Configuration)' == 'Debug'">$(ProjectsDebugTargetFrameworks)</TargetFrameworks>
<VersionSuffix>alpha</VersionSuffix>
<NoWarn>$(NoWarn);IDE0009;</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props" />
@@ -58,6 +58,9 @@ namespace Azure.AI.Agents.Persistent
_metadata = new(ProviderName);
}
/// <summary>
/// Initializes a new instance of the <see cref="NewPersistentAgentsChatClient"/> class.
/// </summary>
public NewPersistentAgentsChatClient() { }
/// <inheritdoc />
@@ -1,8 +1,5 @@
// Copyright (c) Microsoft. All rights reserved.
using System;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.AI.Agents;
@@ -1,6 +1,5 @@
// Copyright (c) Microsoft. All rights reserved.
using System;
using Microsoft.Extensions.AI;
using Microsoft.Extensions.AI.Agents;
@@ -48,7 +47,7 @@ internal static class PersistentAgentResponseExtensions
}
#pragma warning disable CA2000 // Dispose objects before losing scope
var chatClient = persistentAgentsClient.AsIChatClient(persistentAgentMetadata.Id);
var chatClient = new NewPersistentAgentsChatClient(persistentAgentsClient, persistentAgentMetadata.Id);
#pragma warning restore CA2000 // Dispose objects before losing scope
return new ChatClientAgent(chatClient, options: new()
@@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>$(ProjectsTargetFrameworks)</TargetFrameworks>
<TargetFrameworks Condition="'$(Configuration)' == 'Debug'">$(ProjectsDebugTargetFrameworks)</TargetFrameworks>
<VersionSuffix>alpha</VersionSuffix>
<NoWarn>$(NoWarn);IDE0009;</NoWarn>
<ImplicitUsings>enable</ImplicitUsings>
<InjectSharedThrow>true</InjectSharedThrow>
</PropertyGroup>
<Import Project="$(RepoRoot)/dotnet/nuget/nuget-package.props" />
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Microsoft.Extensions.AI.Agents\Microsoft.Extensions.AI.Agents.csproj" />
</ItemGroup>
<PropertyGroup>
<!-- NuGet Package Settings -->
<Title>Microsoft.Extensions.AI.Agents.OpenAI</Title>
<Description>Implementation of generative AI abstractions for OpenAI Agents.</Description>
</PropertyGroup>
</Project>