diff --git a/README.md b/README.md index a8368390..55001f11 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ dotnet add reference /dotnet/src Then, define and run your first agent: ```csharp -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.AutoGen.Agents; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/dotnet/AutoGen.sln b/dotnet/AutoGen.sln index b01a59f7..7a1d6df0 100644 --- a/dotnet/AutoGen.sln +++ b/dotnet/AutoGen.sln @@ -80,7 +80,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Agents", "src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj", "{FD87BD33-4616-460B-AC85-A412BA08BB78}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Abstractions", "src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj", "{E0C991D9-0DB8-471C-ADC9-5FB16E2A0106}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Contracts", "src\Microsoft.AutoGen\Contracts\Microsoft.AutoGen.Contracts.csproj", "{E0C991D9-0DB8-471C-ADC9-5FB16E2A0106}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AutoGen.Extensions.SemanticKernel", "src\Microsoft.AutoGen\Extensions\SemanticKernel\Microsoft.AutoGen.Extensions.SemanticKernel.csproj", "{952827D4-8D4C-4327-AE4D-E8D25811EF35}" EndProject diff --git a/dotnet/samples/Hello/HelloAIAgents/HelloAIAgent.cs b/dotnet/samples/Hello/HelloAIAgents/HelloAIAgent.cs index 4b8d663d..743156f0 100644 --- a/dotnet/samples/Hello/HelloAIAgents/HelloAIAgent.cs +++ b/dotnet/samples/Hello/HelloAIAgents/HelloAIAgent.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // HelloAIAgent.cs -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.AI; namespace Hello; diff --git a/dotnet/samples/Hello/HelloAIAgents/HelloAIAgents.csproj b/dotnet/samples/Hello/HelloAIAgents/HelloAIAgents.csproj index c33bfeed..003b88a8 100644 --- a/dotnet/samples/Hello/HelloAIAgents/HelloAIAgents.csproj +++ b/dotnet/samples/Hello/HelloAIAgents/HelloAIAgents.csproj @@ -11,7 +11,7 @@ - + diff --git a/dotnet/samples/Hello/HelloAIAgents/Program.cs b/dotnet/samples/Hello/HelloAIAgents/Program.cs index 891c026f..650c463a 100644 --- a/dotnet/samples/Hello/HelloAIAgents/Program.cs +++ b/dotnet/samples/Hello/HelloAIAgents/Program.cs @@ -2,8 +2,8 @@ // Program.cs using Hello; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; // send a message to the agent var builder = WebApplication.CreateBuilder(); diff --git a/dotnet/samples/Hello/HelloAgent/HelloAgent.csproj b/dotnet/samples/Hello/HelloAgent/HelloAgent.csproj index 93c996e3..279ef8b4 100644 --- a/dotnet/samples/Hello/HelloAgent/HelloAgent.csproj +++ b/dotnet/samples/Hello/HelloAgent/HelloAgent.csproj @@ -15,7 +15,7 @@ - + diff --git a/dotnet/samples/Hello/HelloAgent/Program.cs b/dotnet/samples/Hello/HelloAgent/Program.cs index 66c02025..4d259130 100644 --- a/dotnet/samples/Hello/HelloAgent/Program.cs +++ b/dotnet/samples/Hello/HelloAgent/Program.cs @@ -1,8 +1,8 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Program.cs -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/dotnet/samples/Hello/HelloAgent/README.md b/dotnet/samples/Hello/HelloAgent/README.md index f95e25d6..23051b45 100644 --- a/dotnet/samples/Hello/HelloAgent/README.md +++ b/dotnet/samples/Hello/HelloAgent/README.md @@ -38,7 +38,7 @@ graph LR; The heart of an autogen application are the event handlers. Agents select a ```TopicSubscription``` to listen for events on a specific topic. When an event is received, the agent's event handler is called with the event data. -Within that event handler you may optionally *emit* new events, which are then sent to the event bus for other agents to process. The EventTypes are declared gRPC ProtoBuf messages that are used to define the schema of the event. The default protos are available via the ```Microsoft.AutoGen.Abstractions;``` namespace and are defined in [autogen/protos](/autogen/protos). The EventTypes are registered in the agent's constructor using the ```IHandle``` interface. +Within that event handler you may optionally *emit* new events, which are then sent to the event bus for other agents to process. The EventTypes are declared gRPC ProtoBuf messages that are used to define the schema of the event. The default protos are available via the ```Microsoft.AutoGen.Contracts;``` namespace and are defined in [autogen/protos](/autogen/protos). The EventTypes are registered in the agent's constructor using the ```IHandle``` interface. ```csharp TopicSubscription("HelloAgents")] diff --git a/dotnet/samples/Hello/HelloAgentState/HelloAgentState.csproj b/dotnet/samples/Hello/HelloAgentState/HelloAgentState.csproj index e26b6c95..63c30f71 100644 --- a/dotnet/samples/Hello/HelloAgentState/HelloAgentState.csproj +++ b/dotnet/samples/Hello/HelloAgentState/HelloAgentState.csproj @@ -12,7 +12,7 @@ - + diff --git a/dotnet/samples/Hello/HelloAgentState/Program.cs b/dotnet/samples/Hello/HelloAgentState/Program.cs index e260c9e1..62c40e54 100644 --- a/dotnet/samples/Hello/HelloAgentState/Program.cs +++ b/dotnet/samples/Hello/HelloAgentState/Program.cs @@ -2,8 +2,8 @@ // Program.cs using System.Text.Json; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; // send a message to the agent var app = await AgentsApp.PublishMessageAsync("HelloAgents", new NewMessageReceived diff --git a/dotnet/samples/Hello/HelloAgentState/README.md b/dotnet/samples/Hello/HelloAgentState/README.md index 8bc8e345..2671d8e0 100644 --- a/dotnet/samples/Hello/HelloAgentState/README.md +++ b/dotnet/samples/Hello/HelloAgentState/README.md @@ -38,7 +38,7 @@ graph LR; The heart of an autogen application are the event handlers. Agents select a ```TopicSubscription``` to listen for events on a specific topic. When an event is received, the agent's event handler is called with the event data. -Within that event handler you may optionally *emit* new events, which are then sent to the event bus for other agents to process. The EventTypes are declared gRPC ProtoBuf messages that are used to define the schema of the event. The default protos are available via the ```Microsoft.AutoGen.Abstractions;``` namespace and are defined in [autogen/protos](/autogen/protos). The EventTypes are registered in the agent's constructor using the ```IHandle``` interface. +Within that event handler you may optionally *emit* new events, which are then sent to the event bus for other agents to process. The EventTypes are declared gRPC ProtoBuf messages that are used to define the schema of the event. The default protos are available via the ```Microsoft.AutoGen.Contracts;``` namespace and are defined in [autogen/protos](/autogen/protos). The EventTypes are registered in the agent's constructor using the ```IHandle``` interface. ```csharp TopicSubscription("HelloAgents")] diff --git a/dotnet/samples/Hello/protos/agent_events.proto b/dotnet/samples/Hello/protos/agent_events.proto index 64ef2d69..a964a4cd 100644 --- a/dotnet/samples/Hello/protos/agent_events.proto +++ b/dotnet/samples/Hello/protos/agent_events.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package HelloAgents; -option csharp_namespace = "Microsoft.AutoGen.Abstractions"; +option csharp_namespace = "Microsoft.AutoGen.Contracts"; message TextMessage { string textMessage = 1; string source = 2; diff --git a/dotnet/samples/dev-team/DevTeam.Agents/Developer/Developer.cs b/dotnet/samples/dev-team/DevTeam.Agents/Developer/Developer.cs index 325b9fbe..86f5c29b 100644 --- a/dotnet/samples/dev-team/DevTeam.Agents/Developer/Developer.cs +++ b/dotnet/samples/dev-team/DevTeam.Agents/Developer/Developer.cs @@ -2,8 +2,8 @@ // Developer.cs using DevTeam.Shared; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Memory; diff --git a/dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.cs b/dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.cs index e03701c9..ba37255a 100644 --- a/dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.cs +++ b/dotnet/samples/dev-team/DevTeam.Agents/DeveloperLead/DeveloperLead.cs @@ -2,8 +2,8 @@ // DeveloperLead.cs using DevTeam.Shared; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Connectors.OpenAI; using Microsoft.SemanticKernel.Memory; diff --git a/dotnet/samples/dev-team/DevTeam.Agents/ProductManager/ProductManager.cs b/dotnet/samples/dev-team/DevTeam.Agents/ProductManager/ProductManager.cs index cc393e65..8c14675f 100644 --- a/dotnet/samples/dev-team/DevTeam.Agents/ProductManager/ProductManager.cs +++ b/dotnet/samples/dev-team/DevTeam.Agents/ProductManager/ProductManager.cs @@ -2,8 +2,8 @@ // ProductManager.cs using DevTeam.Shared; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Memory; diff --git a/dotnet/samples/dev-team/DevTeam.Backend/Agents/AzureGenie.cs b/dotnet/samples/dev-team/DevTeam.Backend/Agents/AzureGenie.cs index d3997a8f..657bb013 100644 --- a/dotnet/samples/dev-team/DevTeam.Backend/Agents/AzureGenie.cs +++ b/dotnet/samples/dev-team/DevTeam.Backend/Agents/AzureGenie.cs @@ -3,8 +3,8 @@ using DevTeam.Backend; using DevTeam.Shared; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Memory; namespace Microsoft.AI.DevTeam; diff --git a/dotnet/samples/dev-team/DevTeam.Backend/Agents/Hubber.cs b/dotnet/samples/dev-team/DevTeam.Backend/Agents/Hubber.cs index 3dc8dd35..c97cb828 100644 --- a/dotnet/samples/dev-team/DevTeam.Backend/Agents/Hubber.cs +++ b/dotnet/samples/dev-team/DevTeam.Backend/Agents/Hubber.cs @@ -5,8 +5,8 @@ using System.Text.Json; using DevTeam; using DevTeam.Backend; using DevTeam.Shared; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Microsoft.SemanticKernel; using Microsoft.SemanticKernel.Memory; diff --git a/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.cs b/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.cs index 54ef97e0..30a936f4 100644 --- a/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.cs +++ b/dotnet/samples/dev-team/DevTeam.Backend/Services/GithubWebHookProcessor.cs @@ -3,8 +3,8 @@ using System.Globalization; using DevTeam.Shared; -using Microsoft.AutoGen.Abstractions; using Microsoft.AutoGen.Agents; +using Microsoft.AutoGen.Contracts; using Octokit.Webhooks; using Octokit.Webhooks.Events; using Octokit.Webhooks.Events.IssueComment; diff --git a/dotnet/samples/dev-team/DevTeam.Shared/EventExtensions.cs b/dotnet/samples/dev-team/DevTeam.Shared/EventExtensions.cs index 60c044ea..bbf51dcd 100644 --- a/dotnet/samples/dev-team/DevTeam.Shared/EventExtensions.cs +++ b/dotnet/samples/dev-team/DevTeam.Shared/EventExtensions.cs @@ -2,7 +2,7 @@ // EventExtensions.cs using System.Globalization; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace DevTeam; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Agent.cs b/dotnet/src/Microsoft.AutoGen/Agents/Agent.cs index 795e09ea..dbae1aab 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Agent.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Agent.cs @@ -8,7 +8,7 @@ using System.Text; using System.Text.Json; using System.Threading.Channels; using Google.Protobuf; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.Logging; namespace Microsoft.AutoGen.Agents; @@ -22,7 +22,6 @@ public abstract class Agent : IHandle private readonly Channel _mailbox = Channel.CreateUnbounded(); private readonly IAgentRuntime _runtime; - protected internal ILogger _logger; public IAgentRuntime Context => _runtime; protected readonly EventTypes EventTypes; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/AgentExtensions.cs b/dotnet/src/Microsoft.AutoGen/Agents/AgentExtensions.cs index c92b2b6f..e3e408ae 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/AgentExtensions.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/AgentExtensions.cs @@ -3,7 +3,7 @@ using System.Diagnostics; using Google.Protobuf.Collections; -using static Microsoft.AutoGen.Abstractions.CloudEvent.Types; +using static Microsoft.AutoGen.Contracts.CloudEvent.Types; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/AgentRuntime.cs b/dotnet/src/Microsoft.AutoGen/Agents/AgentRuntime.cs index 20295f8f..5a94484a 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/AgentRuntime.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/AgentRuntime.cs @@ -3,9 +3,9 @@ using System.Diagnostics; using Google.Protobuf.Collections; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.Logging; -using static Microsoft.AutoGen.Abstractions.CloudEvent.Types; +using static Microsoft.AutoGen.Contracts.CloudEvent.Types; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/ConsoleAgent.cs b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/ConsoleAgent.cs index 3d7de5c1..c86f3574 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/ConsoleAgent.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/ConsoleAgent.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // ConsoleAgent.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/IHandleConsole.cs b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/IHandleConsole.cs index 0d7a6840..23176d10 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/IHandleConsole.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/ConsoleAgent/IHandleConsole.cs @@ -2,7 +2,7 @@ // IHandleConsole.cs using Google.Protobuf; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/FileAgent/FileAgent.cs b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/FileAgent/FileAgent.cs index 65aecee1..50b76fa2 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/FileAgent/FileAgent.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/FileAgent/FileAgent.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // FileAgent.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/IOAgent.cs b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/IOAgent.cs index dd86e6ed..ade5dde2 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/IOAgent.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/IOAgent.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IOAgent.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/WebAPIAgent/WebAPIAgent.cs b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/WebAPIAgent/WebAPIAgent.cs index 3a594a3b..f445271d 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/WebAPIAgent/WebAPIAgent.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Agents/IOAgent/WebAPIAgent/WebAPIAgent.cs @@ -3,7 +3,7 @@ using Microsoft.AspNetCore.Builder; using Microsoft.AspNetCore.Http; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Client.cs b/dotnet/src/Microsoft.AutoGen/Agents/Client.cs index 05f988e1..8827de8f 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Client.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Client.cs @@ -2,7 +2,7 @@ // Client.cs using System.Diagnostics; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Logging; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/IAgentRuntime.cs b/dotnet/src/Microsoft.AutoGen/Agents/IAgentRuntime.cs index 53da0713..343e6c6e 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/IAgentRuntime.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/IAgentRuntime.cs @@ -2,7 +2,7 @@ // IAgentRuntime.cs using System.Diagnostics; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/IAgentWorker.cs b/dotnet/src/Microsoft.AutoGen/Agents/IAgentWorker.cs index dbc3a737..e663c050 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/IAgentWorker.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/IAgentWorker.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IAgentWorker.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; public interface IAgentWorker diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Microsoft.AutoGen.Agents.csproj b/dotnet/src/Microsoft.AutoGen/Agents/Microsoft.AutoGen.Agents.csproj index aa79cf96..e751a2b0 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Microsoft.AutoGen.Agents.csproj +++ b/dotnet/src/Microsoft.AutoGen/Agents/Microsoft.AutoGen.Agents.csproj @@ -10,7 +10,7 @@ - + diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/AgentWorker.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/AgentWorker.cs index 8a1f8229..061ce1f3 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/AgentWorker.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/AgentWorker.cs @@ -4,7 +4,7 @@ using System.Collections.Concurrent; using System.Diagnostics; using System.Threading.Channels; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorker.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorker.cs index 23d34910..c51f2847 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorker.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorker.cs @@ -6,7 +6,7 @@ using System.Diagnostics; using System.Reflection; using System.Threading.Channels; using Grpc.Core; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorkerHostBuilderExtension.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorkerHostBuilderExtension.cs index 67574283..eb2f7ac8 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorkerHostBuilderExtension.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcAgentWorkerHostBuilderExtension.cs @@ -3,7 +3,7 @@ using Grpc.Core; using Grpc.Net.Client.Configuration; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGateway.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGateway.cs index 9ba36410..83dbb619 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGateway.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGateway.cs @@ -3,7 +3,7 @@ using System.Collections.Concurrent; using Grpc.Core; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGatewayService.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGatewayService.cs index e26f5c2b..8c328da8 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGatewayService.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcGatewayService.cs @@ -2,7 +2,7 @@ // GrpcGatewayService.cs using Grpc.Core; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcWorkerConnection.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcWorkerConnection.cs index f2eb81c4..5a5f7fc9 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcWorkerConnection.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Grpc/GrpcWorkerConnection.cs @@ -3,7 +3,7 @@ using System.Threading.Channels; using Grpc.Core; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs index 7bc87323..16456950 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/HostBuilderExtensions.cs @@ -6,7 +6,7 @@ using System.Diagnostics.CodeAnalysis; using System.Reflection; using Google.Protobuf; using Google.Protobuf.Reflection; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Hosting; @@ -61,7 +61,6 @@ public static class HostBuilderExtensions var eventsMap = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(assembly => assembly.GetTypes()) .Where(type => ReflectionHelper.IsSubclassOfGeneric(type, typeof(Agent)) && !type.IsAbstract) - .Select(t => (t, t.GetInterfaces() .Where(i => i.IsGenericType && i.GetGenericTypeDefinition() == typeof(IHandle<>)) .Select(i => (GetMessageDescriptor(i.GetGenericArguments().First())?.FullName ?? "")).ToHashSet())) diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/IGateway.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/IGateway.cs index 539ec3ec..6fa67b7c 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/IGateway.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/IGateway.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IGateway.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/AgentStateGrain.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/AgentStateGrain.cs index 9905f6ae..4a357a67 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/AgentStateGrain.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/AgentStateGrain.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // AgentStateGrain.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/IRegistryGrain.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/IRegistryGrain.cs index 87fd0aa3..ae7e23c2 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/IRegistryGrain.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/IRegistryGrain.cs @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IRegistryGrain.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/RegistryGrain.cs b/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/RegistryGrain.cs index cb752312..dd106927 100644 --- a/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/RegistryGrain.cs +++ b/dotnet/src/Microsoft.AutoGen/Agents/Services/Orleans/RegistryGrain.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // RegistryGrain.cs -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; namespace Microsoft.AutoGen.Agents; diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/AgentId.cs b/dotnet/src/Microsoft.AutoGen/Contracts/AgentId.cs similarity index 83% rename from dotnet/src/Microsoft.AutoGen/Abstractions/AgentId.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/AgentId.cs index 7229b736..49c26a8c 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/AgentId.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/AgentId.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // AgentId.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; public partial class AgentId { diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/ChatHistoryItem.cs b/dotnet/src/Microsoft.AutoGen/Contracts/ChatHistoryItem.cs similarity index 86% rename from dotnet/src/Microsoft.AutoGen/Abstractions/ChatHistoryItem.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/ChatHistoryItem.cs index 0a779405..77491bdb 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/ChatHistoryItem.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/ChatHistoryItem.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // ChatHistoryItem.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; [Serializable] public class ChatHistoryItem diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/ChatState.cs b/dotnet/src/Microsoft.AutoGen/Contracts/ChatState.cs similarity index 86% rename from dotnet/src/Microsoft.AutoGen/Abstractions/ChatState.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/ChatState.cs index 459a1704..6e41b644 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/ChatState.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/ChatState.cs @@ -3,7 +3,7 @@ using Google.Protobuf; -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; public class ChatState where T : IMessage, new() diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/ChatUserType.cs b/dotnet/src/Microsoft.AutoGen/Contracts/ChatUserType.cs similarity index 77% rename from dotnet/src/Microsoft.AutoGen/Abstractions/ChatUserType.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/ChatUserType.cs index 4ee8dcd3..3bfcbb37 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/ChatUserType.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/ChatUserType.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // ChatUserType.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; public enum ChatUserType { diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/IAgentState.cs b/dotnet/src/Microsoft.AutoGen/Contracts/IAgentState.cs similarity index 96% rename from dotnet/src/Microsoft.AutoGen/Abstractions/IAgentState.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/IAgentState.cs index 1b816b4e..0b3491df 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/IAgentState.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/IAgentState.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IAgentState.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; /// /// Interface for managing the state of an agent. diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/IConnection.cs b/dotnet/src/Microsoft.AutoGen/Contracts/IConnection.cs similarity index 72% rename from dotnet/src/Microsoft.AutoGen/Abstractions/IConnection.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/IConnection.cs index 3ac582f6..3e7484c5 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/IConnection.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/IConnection.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IConnection.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; public interface IConnection { } diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/IHandle.cs b/dotnet/src/Microsoft.AutoGen/Contracts/IHandle.cs similarity index 83% rename from dotnet/src/Microsoft.AutoGen/Abstractions/IHandle.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/IHandle.cs index ff43852b..79089160 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/IHandle.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/IHandle.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // IHandle.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; public interface IHandle { diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/MessageExtensions.cs b/dotnet/src/Microsoft.AutoGen/Contracts/MessageExtensions.cs similarity index 97% rename from dotnet/src/Microsoft.AutoGen/Abstractions/MessageExtensions.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/MessageExtensions.cs index 648b273c..c531c5b7 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/MessageExtensions.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/MessageExtensions.cs @@ -4,7 +4,7 @@ using Google.Protobuf; using Google.Protobuf.WellKnownTypes; -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; public static class MessageExtensions { diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/Microsoft.AutoGen.Abstractions.csproj b/dotnet/src/Microsoft.AutoGen/Contracts/Microsoft.AutoGen.Contracts.csproj similarity index 100% rename from dotnet/src/Microsoft.AutoGen/Abstractions/Microsoft.AutoGen.Abstractions.csproj rename to dotnet/src/Microsoft.AutoGen/Contracts/Microsoft.AutoGen.Contracts.csproj diff --git a/dotnet/src/Microsoft.AutoGen/Abstractions/TopicSubscriptionAttribute.cs b/dotnet/src/Microsoft.AutoGen/Contracts/TopicSubscriptionAttribute.cs similarity index 85% rename from dotnet/src/Microsoft.AutoGen/Abstractions/TopicSubscriptionAttribute.cs rename to dotnet/src/Microsoft.AutoGen/Contracts/TopicSubscriptionAttribute.cs index 79d8393d..ba17520f 100644 --- a/dotnet/src/Microsoft.AutoGen/Abstractions/TopicSubscriptionAttribute.cs +++ b/dotnet/src/Microsoft.AutoGen/Contracts/TopicSubscriptionAttribute.cs @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // TopicSubscriptionAttribute.cs -namespace Microsoft.AutoGen.Abstractions; +namespace Microsoft.AutoGen.Contracts; [AttributeUsage(AttributeTargets.All)] public class TopicSubscriptionAttribute(string topic) : Attribute diff --git a/dotnet/test/Microsoft.AutoGen.Agents.Tests/AgentTests.cs b/dotnet/test/Microsoft.AutoGen.Agents.Tests/AgentTests.cs index 35a7cb4c..c78bf27c 100644 --- a/dotnet/test/Microsoft.AutoGen.Agents.Tests/AgentTests.cs +++ b/dotnet/test/Microsoft.AutoGen.Agents.Tests/AgentTests.cs @@ -4,7 +4,7 @@ using System.Collections.Concurrent; using FluentAssertions; using Google.Protobuf.Reflection; -using Microsoft.AutoGen.Abstractions; +using Microsoft.AutoGen.Contracts; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Hosting; using Microsoft.Extensions.Logging; diff --git a/protos/agent_events.proto b/protos/agent_events.proto index 5fd88bf8..a97df6e5 100644 --- a/protos/agent_events.proto +++ b/protos/agent_events.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package agents; -option csharp_namespace = "Microsoft.AutoGen.Abstractions"; +option csharp_namespace = "Microsoft.AutoGen.Contracts"; message TextMessage { string textMessage = 1; string source = 2; diff --git a/protos/agent_states.proto b/protos/agent_states.proto index 5a51c0c8..94577286 100644 --- a/protos/agent_states.proto +++ b/protos/agent_states.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package agents; -option csharp_namespace = "Microsoft.AutoGen.Abstractions"; +option csharp_namespace = "Microsoft.AutoGen.Contracts"; message AgentState { string message = 1; diff --git a/protos/agent_worker.proto b/protos/agent_worker.proto index d9170130..7e658699 100644 --- a/protos/agent_worker.proto +++ b/protos/agent_worker.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package agents; -option csharp_namespace = "Microsoft.AutoGen.Abstractions"; +option csharp_namespace = "Microsoft.AutoGen.Contracts"; import "cloudevent.proto"; import "google/protobuf/any.proto"; diff --git a/protos/cloudevent.proto b/protos/cloudevent.proto index 232109c7..cde68bef 100644 --- a/protos/cloudevent.proto +++ b/protos/cloudevent.proto @@ -15,7 +15,7 @@ package io.cloudevents.v1; import "google/protobuf/any.proto"; import "google/protobuf/timestamp.proto"; -option csharp_namespace = "Microsoft.AutoGen.Abstractions"; +option csharp_namespace = "Microsoft.AutoGen.Contracts"; message CloudEvent { diff --git a/python/packages/autogen-core/samples/protos/agent_events_pb2.py b/python/packages/autogen-core/samples/protos/agent_events_pb2.py index b93b1219..18b39486 100644 --- a/python/packages/autogen-core/samples/protos/agent_events_pb2.py +++ b/python/packages/autogen-core/samples/protos/agent_events_pb2.py @@ -3,49 +3,47 @@ # source: agent_events.proto # Protobuf Python Version: 4.25.1 """Generated protocol buffer code.""" - from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import symbol_database as _symbol_database from google.protobuf.internal import builder as _builder - # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile( - b'\n\x12\x61gent_events.proto\x12\x06\x61gents"2\n\x0bTextMessage\x12\x13\n\x0btextMessage\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t"\x18\n\x05Input\x12\x0f\n\x07message\x18\x01 \x01(\t"\x1f\n\x0eInputProcessed\x12\r\n\x05route\x18\x01 \x01(\t"\x19\n\x06Output\x12\x0f\n\x07message\x18\x01 \x01(\t"\x1e\n\rOutputWritten\x12\r\n\x05route\x18\x01 \x01(\t"\x1a\n\x07IOError\x12\x0f\n\x07message\x18\x01 \x01(\t"%\n\x12NewMessageReceived\x12\x0f\n\x07message\x18\x01 \x01(\t"%\n\x11ResponseGenerated\x12\x10\n\x08response\x18\x01 \x01(\t"\x1a\n\x07GoodBye\x12\x0f\n\x07message\x18\x01 \x01(\t" \n\rMessageStored\x12\x0f\n\x07message\x18\x01 \x01(\t";\n\x12\x43onversationClosed\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x14\n\x0cuser_message\x18\x02 \x01(\t"\x1b\n\x08Shutdown\x12\x0f\n\x07message\x18\x01 \x01(\tB!\xaa\x02\x1eMicrosoft.AutoGen.Abstractionsb\x06proto3' -) + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x61gent_events.proto\x12\x06\x61gents\"2\n\x0bTextMessage\x12\x13\n\x0btextMessage\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\"\x18\n\x05Input\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x1f\n\x0eInputProcessed\x12\r\n\x05route\x18\x01 \x01(\t\"\x19\n\x06Output\x12\x0f\n\x07message\x18\x01 \x01(\t\"\x1e\n\rOutputWritten\x12\r\n\x05route\x18\x01 \x01(\t\"\x1a\n\x07IOError\x12\x0f\n\x07message\x18\x01 \x01(\t\"%\n\x12NewMessageReceived\x12\x0f\n\x07message\x18\x01 \x01(\t\"%\n\x11ResponseGenerated\x12\x10\n\x08response\x18\x01 \x01(\t\"\x1a\n\x07GoodBye\x12\x0f\n\x07message\x18\x01 \x01(\t\" \n\rMessageStored\x12\x0f\n\x07message\x18\x01 \x01(\t\";\n\x12\x43onversationClosed\x12\x0f\n\x07user_id\x18\x01 \x01(\t\x12\x14\n\x0cuser_message\x18\x02 \x01(\t\"\x1b\n\x08Shutdown\x12\x0f\n\x07message\x18\x01 \x01(\tB\x1e\xaa\x02\x1bMicrosoft.AutoGen.Contractsb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, "agent_events_pb2", _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent_events_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: - _globals["DESCRIPTOR"]._options = None - _globals["DESCRIPTOR"]._serialized_options = b"\252\002\036Microsoft.AutoGen.Abstractions" - _globals["_TEXTMESSAGE"]._serialized_start = 30 - _globals["_TEXTMESSAGE"]._serialized_end = 80 - _globals["_INPUT"]._serialized_start = 82 - _globals["_INPUT"]._serialized_end = 106 - _globals["_INPUTPROCESSED"]._serialized_start = 108 - _globals["_INPUTPROCESSED"]._serialized_end = 139 - _globals["_OUTPUT"]._serialized_start = 141 - _globals["_OUTPUT"]._serialized_end = 166 - _globals["_OUTPUTWRITTEN"]._serialized_start = 168 - _globals["_OUTPUTWRITTEN"]._serialized_end = 198 - _globals["_IOERROR"]._serialized_start = 200 - _globals["_IOERROR"]._serialized_end = 226 - _globals["_NEWMESSAGERECEIVED"]._serialized_start = 228 - _globals["_NEWMESSAGERECEIVED"]._serialized_end = 265 - _globals["_RESPONSEGENERATED"]._serialized_start = 267 - _globals["_RESPONSEGENERATED"]._serialized_end = 304 - _globals["_GOODBYE"]._serialized_start = 306 - _globals["_GOODBYE"]._serialized_end = 332 - _globals["_MESSAGESTORED"]._serialized_start = 334 - _globals["_MESSAGESTORED"]._serialized_end = 366 - _globals["_CONVERSATIONCLOSED"]._serialized_start = 368 - _globals["_CONVERSATIONCLOSED"]._serialized_end = 427 - _globals["_SHUTDOWN"]._serialized_start = 429 - _globals["_SHUTDOWN"]._serialized_end = 456 + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Microsoft.AutoGen.Contracts' + _globals['_TEXTMESSAGE']._serialized_start=30 + _globals['_TEXTMESSAGE']._serialized_end=80 + _globals['_INPUT']._serialized_start=82 + _globals['_INPUT']._serialized_end=106 + _globals['_INPUTPROCESSED']._serialized_start=108 + _globals['_INPUTPROCESSED']._serialized_end=139 + _globals['_OUTPUT']._serialized_start=141 + _globals['_OUTPUT']._serialized_end=166 + _globals['_OUTPUTWRITTEN']._serialized_start=168 + _globals['_OUTPUTWRITTEN']._serialized_end=198 + _globals['_IOERROR']._serialized_start=200 + _globals['_IOERROR']._serialized_end=226 + _globals['_NEWMESSAGERECEIVED']._serialized_start=228 + _globals['_NEWMESSAGERECEIVED']._serialized_end=265 + _globals['_RESPONSEGENERATED']._serialized_start=267 + _globals['_RESPONSEGENERATED']._serialized_end=304 + _globals['_GOODBYE']._serialized_start=306 + _globals['_GOODBYE']._serialized_end=332 + _globals['_MESSAGESTORED']._serialized_start=334 + _globals['_MESSAGESTORED']._serialized_end=366 + _globals['_CONVERSATIONCLOSED']._serialized_start=368 + _globals['_CONVERSATIONCLOSED']._serialized_end=427 + _globals['_SHUTDOWN']._serialized_start=429 + _globals['_SHUTDOWN']._serialized_end=456 # @@protoc_insertion_point(module_scope) diff --git a/python/packages/autogen-core/samples/protos/agent_events_pb2_grpc.py b/python/packages/autogen-core/samples/protos/agent_events_pb2_grpc.py index bf947056..2daafffe 100644 --- a/python/packages/autogen-core/samples/protos/agent_events_pb2_grpc.py +++ b/python/packages/autogen-core/samples/protos/agent_events_pb2_grpc.py @@ -1,4 +1,4 @@ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" - import grpc + diff --git a/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/agent_worker_pb2.py b/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/agent_worker_pb2.py index 73377103..b4794f1e 100644 --- a/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/agent_worker_pb2.py +++ b/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/agent_worker_pb2.py @@ -16,14 +16,14 @@ import cloudevent_pb2 as cloudevent__pb2 from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x61gent_worker.proto\x12\x06\x61gents\x1a\x10\x63loudevent.proto\x1a\x19google/protobuf/any.proto\"\'\n\x07TopicId\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\"$\n\x07\x41gentId\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"E\n\x07Payload\x12\x11\n\tdata_type\x18\x01 \x01(\t\x12\x19\n\x11\x64\x61ta_content_type\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\x89\x02\n\nRpcRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12$\n\x06source\x18\x02 \x01(\x0b\x32\x0f.agents.AgentIdH\x00\x88\x01\x01\x12\x1f\n\x06target\x18\x03 \x01(\x0b\x32\x0f.agents.AgentId\x12\x0e\n\x06method\x18\x04 \x01(\t\x12 \n\x07payload\x18\x05 \x01(\x0b\x32\x0f.agents.Payload\x12\x32\n\x08metadata\x18\x06 \x03(\x0b\x32 .agents.RpcRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_source\"\xb8\x01\n\x0bRpcResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12 \n\x07payload\x18\x02 \x01(\x0b\x32\x0f.agents.Payload\x12\r\n\x05\x65rror\x18\x03 \x01(\t\x12\x33\n\x08metadata\x18\x04 \x03(\x0b\x32!.agents.RpcResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe4\x01\n\x05\x45vent\x12\x12\n\ntopic_type\x18\x01 \x01(\t\x12\x14\n\x0ctopic_source\x18\x02 \x01(\t\x12$\n\x06source\x18\x03 \x01(\x0b\x32\x0f.agents.AgentIdH\x00\x88\x01\x01\x12 \n\x07payload\x18\x04 \x01(\x0b\x32\x0f.agents.Payload\x12-\n\x08metadata\x18\x05 \x03(\x0b\x32\x1b.agents.Event.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_source\"<\n\x18RegisterAgentTypeRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\"^\n\x19RegisterAgentTypeResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\":\n\x10TypeSubscription\x12\x12\n\ntopic_type\x18\x01 \x01(\t\x12\x12\n\nagent_type\x18\x02 \x01(\t\"G\n\x16TypePrefixSubscription\x12\x19\n\x11topic_type_prefix\x18\x01 \x01(\t\x12\x12\n\nagent_type\x18\x02 \x01(\t\"\x96\x01\n\x0cSubscription\x12\x34\n\x10typeSubscription\x18\x01 \x01(\x0b\x32\x18.agents.TypeSubscriptionH\x00\x12@\n\x16typePrefixSubscription\x18\x02 \x01(\x0b\x32\x1e.agents.TypePrefixSubscriptionH\x00\x42\x0e\n\x0csubscription\"X\n\x16\x41\x64\x64SubscriptionRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12*\n\x0csubscription\x18\x02 \x01(\x0b\x32\x14.agents.Subscription\"\\\n\x17\x41\x64\x64SubscriptionResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\x9d\x01\n\nAgentState\x12!\n\x08\x61gent_id\x18\x01 \x01(\x0b\x32\x0f.agents.AgentId\x12\x0c\n\x04\x65Tag\x18\x02 \x01(\t\x12\x15\n\x0b\x62inary_data\x18\x03 \x01(\x0cH\x00\x12\x13\n\ttext_data\x18\x04 \x01(\tH\x00\x12*\n\nproto_data\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x42\x06\n\x04\x64\x61ta\"j\n\x10GetStateResponse\x12\'\n\x0b\x61gent_state\x18\x01 \x01(\x0b\x32\x12.agents.AgentState\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"B\n\x11SaveStateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xad\x03\n\x07Message\x12%\n\x07request\x18\x01 \x01(\x0b\x32\x12.agents.RpcRequestH\x00\x12\'\n\x08response\x18\x02 \x01(\x0b\x32\x13.agents.RpcResponseH\x00\x12\x33\n\ncloudEvent\x18\x03 \x01(\x0b\x32\x1d.io.cloudevents.v1.CloudEventH\x00\x12\x44\n\x18registerAgentTypeRequest\x18\x04 \x01(\x0b\x32 .agents.RegisterAgentTypeRequestH\x00\x12\x46\n\x19registerAgentTypeResponse\x18\x05 \x01(\x0b\x32!.agents.RegisterAgentTypeResponseH\x00\x12@\n\x16\x61\x64\x64SubscriptionRequest\x18\x06 \x01(\x0b\x32\x1e.agents.AddSubscriptionRequestH\x00\x12\x42\n\x17\x61\x64\x64SubscriptionResponse\x18\x07 \x01(\x0b\x32\x1f.agents.AddSubscriptionResponseH\x00\x42\t\n\x07message2\xb2\x01\n\x08\x41gentRpc\x12\x33\n\x0bOpenChannel\x12\x0f.agents.Message\x1a\x0f.agents.Message(\x01\x30\x01\x12\x35\n\x08GetState\x12\x0f.agents.AgentId\x1a\x18.agents.GetStateResponse\x12:\n\tSaveState\x12\x12.agents.AgentState\x1a\x19.agents.SaveStateResponseB!\xaa\x02\x1eMicrosoft.AutoGen.Abstractionsb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x12\x61gent_worker.proto\x12\x06\x61gents\x1a\x10\x63loudevent.proto\x1a\x19google/protobuf/any.proto\"\'\n\x07TopicId\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\"$\n\x07\x41gentId\x12\x0c\n\x04type\x18\x01 \x01(\t\x12\x0b\n\x03key\x18\x02 \x01(\t\"E\n\x07Payload\x12\x11\n\tdata_type\x18\x01 \x01(\t\x12\x19\n\x11\x64\x61ta_content_type\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\"\x89\x02\n\nRpcRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12$\n\x06source\x18\x02 \x01(\x0b\x32\x0f.agents.AgentIdH\x00\x88\x01\x01\x12\x1f\n\x06target\x18\x03 \x01(\x0b\x32\x0f.agents.AgentId\x12\x0e\n\x06method\x18\x04 \x01(\t\x12 \n\x07payload\x18\x05 \x01(\x0b\x32\x0f.agents.Payload\x12\x32\n\x08metadata\x18\x06 \x03(\x0b\x32 .agents.RpcRequest.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_source\"\xb8\x01\n\x0bRpcResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12 \n\x07payload\x18\x02 \x01(\x0b\x32\x0f.agents.Payload\x12\r\n\x05\x65rror\x18\x03 \x01(\t\x12\x33\n\x08metadata\x18\x04 \x03(\x0b\x32!.agents.RpcResponse.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\xe4\x01\n\x05\x45vent\x12\x12\n\ntopic_type\x18\x01 \x01(\t\x12\x14\n\x0ctopic_source\x18\x02 \x01(\t\x12$\n\x06source\x18\x03 \x01(\x0b\x32\x0f.agents.AgentIdH\x00\x88\x01\x01\x12 \n\x07payload\x18\x04 \x01(\x0b\x32\x0f.agents.Payload\x12-\n\x08metadata\x18\x05 \x03(\x0b\x32\x1b.agents.Event.MetadataEntry\x1a/\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\t\n\x07_source\"<\n\x18RegisterAgentTypeRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x0c\n\x04type\x18\x02 \x01(\t\"^\n\x19RegisterAgentTypeResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\":\n\x10TypeSubscription\x12\x12\n\ntopic_type\x18\x01 \x01(\t\x12\x12\n\nagent_type\x18\x02 \x01(\t\"G\n\x16TypePrefixSubscription\x12\x19\n\x11topic_type_prefix\x18\x01 \x01(\t\x12\x12\n\nagent_type\x18\x02 \x01(\t\"\x96\x01\n\x0cSubscription\x12\x34\n\x10typeSubscription\x18\x01 \x01(\x0b\x32\x18.agents.TypeSubscriptionH\x00\x12@\n\x16typePrefixSubscription\x18\x02 \x01(\x0b\x32\x1e.agents.TypePrefixSubscriptionH\x00\x42\x0e\n\x0csubscription\"X\n\x16\x41\x64\x64SubscriptionRequest\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12*\n\x0csubscription\x18\x02 \x01(\x0b\x32\x14.agents.Subscription\"\\\n\x17\x41\x64\x64SubscriptionResponse\x12\x12\n\nrequest_id\x18\x01 \x01(\t\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\x9d\x01\n\nAgentState\x12!\n\x08\x61gent_id\x18\x01 \x01(\x0b\x32\x0f.agents.AgentId\x12\x0c\n\x04\x65Tag\x18\x02 \x01(\t\x12\x15\n\x0b\x62inary_data\x18\x03 \x01(\x0cH\x00\x12\x13\n\ttext_data\x18\x04 \x01(\tH\x00\x12*\n\nproto_data\x18\x05 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x42\x06\n\x04\x64\x61ta\"j\n\x10GetStateResponse\x12\'\n\x0b\x61gent_state\x18\x01 \x01(\x0b\x32\x12.agents.AgentState\x12\x0f\n\x07success\x18\x02 \x01(\x08\x12\x12\n\x05\x65rror\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"B\n\x11SaveStateResponse\x12\x0f\n\x07success\x18\x01 \x01(\x08\x12\x12\n\x05\x65rror\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x08\n\x06_error\"\xad\x03\n\x07Message\x12%\n\x07request\x18\x01 \x01(\x0b\x32\x12.agents.RpcRequestH\x00\x12\'\n\x08response\x18\x02 \x01(\x0b\x32\x13.agents.RpcResponseH\x00\x12\x33\n\ncloudEvent\x18\x03 \x01(\x0b\x32\x1d.io.cloudevents.v1.CloudEventH\x00\x12\x44\n\x18registerAgentTypeRequest\x18\x04 \x01(\x0b\x32 .agents.RegisterAgentTypeRequestH\x00\x12\x46\n\x19registerAgentTypeResponse\x18\x05 \x01(\x0b\x32!.agents.RegisterAgentTypeResponseH\x00\x12@\n\x16\x61\x64\x64SubscriptionRequest\x18\x06 \x01(\x0b\x32\x1e.agents.AddSubscriptionRequestH\x00\x12\x42\n\x17\x61\x64\x64SubscriptionResponse\x18\x07 \x01(\x0b\x32\x1f.agents.AddSubscriptionResponseH\x00\x42\t\n\x07message2\xb2\x01\n\x08\x41gentRpc\x12\x33\n\x0bOpenChannel\x12\x0f.agents.Message\x1a\x0f.agents.Message(\x01\x30\x01\x12\x35\n\x08GetState\x12\x0f.agents.AgentId\x1a\x18.agents.GetStateResponse\x12:\n\tSaveState\x12\x12.agents.AgentState\x1a\x19.agents.SaveStateResponseB\x1e\xaa\x02\x1bMicrosoft.AutoGen.Contractsb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent_worker_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\036Microsoft.AutoGen.Abstractions' + _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Microsoft.AutoGen.Contracts' _globals['_RPCREQUEST_METADATAENTRY']._options = None _globals['_RPCREQUEST_METADATAENTRY']._serialized_options = b'8\001' _globals['_RPCRESPONSE_METADATAENTRY']._options = None diff --git a/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/cloudevent_pb2.py b/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/cloudevent_pb2.py index fd0bd387..b1774ebf 100644 --- a/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/cloudevent_pb2.py +++ b/python/packages/autogen-ext/src/autogen_ext/runtimes/grpc/protos/cloudevent_pb2.py @@ -16,14 +16,14 @@ from google.protobuf import any_pb2 as google_dot_protobuf_dot_any__pb2 from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63loudevent.proto\x12\x11io.cloudevents.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x04\n\nCloudEvent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x14\n\x0cspec_version\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x41\n\nattributes\x18\x05 \x03(\x0b\x32-.io.cloudevents.v1.CloudEvent.AttributesEntry\x12\x15\n\x0b\x62inary_data\x18\x06 \x01(\x0cH\x00\x12\x13\n\ttext_data\x18\x07 \x01(\tH\x00\x12*\n\nproto_data\x18\x08 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x1ai\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.io.cloudevents.v1.CloudEvent.CloudEventAttributeValue:\x02\x38\x01\x1a\xd3\x01\n\x18\x43loudEventAttributeValue\x12\x14\n\nce_boolean\x18\x01 \x01(\x08H\x00\x12\x14\n\nce_integer\x18\x02 \x01(\x05H\x00\x12\x13\n\tce_string\x18\x03 \x01(\tH\x00\x12\x12\n\x08\x63\x65_bytes\x18\x04 \x01(\x0cH\x00\x12\x10\n\x06\x63\x65_uri\x18\x05 \x01(\tH\x00\x12\x14\n\nce_uri_ref\x18\x06 \x01(\tH\x00\x12\x32\n\x0c\x63\x65_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x06\n\x04\x61ttrB\x06\n\x04\x64\x61taB!\xaa\x02\x1eMicrosoft.AutoGen.Abstractionsb\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63loudevent.proto\x12\x11io.cloudevents.v1\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xb0\x04\n\nCloudEvent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x0e\n\x06source\x18\x02 \x01(\t\x12\x14\n\x0cspec_version\x18\x03 \x01(\t\x12\x0c\n\x04type\x18\x04 \x01(\t\x12\x41\n\nattributes\x18\x05 \x03(\x0b\x32-.io.cloudevents.v1.CloudEvent.AttributesEntry\x12\x15\n\x0b\x62inary_data\x18\x06 \x01(\x0cH\x00\x12\x13\n\ttext_data\x18\x07 \x01(\tH\x00\x12*\n\nproto_data\x18\x08 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x1ai\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x45\n\x05value\x18\x02 \x01(\x0b\x32\x36.io.cloudevents.v1.CloudEvent.CloudEventAttributeValue:\x02\x38\x01\x1a\xd3\x01\n\x18\x43loudEventAttributeValue\x12\x14\n\nce_boolean\x18\x01 \x01(\x08H\x00\x12\x14\n\nce_integer\x18\x02 \x01(\x05H\x00\x12\x13\n\tce_string\x18\x03 \x01(\tH\x00\x12\x12\n\x08\x63\x65_bytes\x18\x04 \x01(\x0cH\x00\x12\x10\n\x06\x63\x65_uri\x18\x05 \x01(\tH\x00\x12\x14\n\nce_uri_ref\x18\x06 \x01(\tH\x00\x12\x32\n\x0c\x63\x65_timestamp\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x42\x06\n\x04\x61ttrB\x06\n\x04\x64\x61taB\x1e\xaa\x02\x1bMicrosoft.AutoGen.Contractsb\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'cloudevent_pb2', _globals) if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None - _globals['DESCRIPTOR']._serialized_options = b'\252\002\036Microsoft.AutoGen.Abstractions' + _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Microsoft.AutoGen.Contracts' _globals['_CLOUDEVENT_ATTRIBUTESENTRY']._options = None _globals['_CLOUDEVENT_ATTRIBUTESENTRY']._serialized_options = b'8\001' _globals['_CLOUDEVENT']._serialized_start=100