diff --git a/README.md b/README.md index a83683907..55001f11e 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 b01a59f71..7a1d6df07 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 4b8d663de..743156f0b 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 c33bfeed5..003b88a8c 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 891c026f9..650c463a1 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 93c996e32..279ef8b4a 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 66c020258..4d259130a 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 f95e25d6e..23051b45c 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 e26b6c952..63c30f71b 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 e260c9e11..62c40e54f 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 8bc8e3454..2671d8e0d 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 64ef2d69d..a964a4cd5 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 325b9fbe0..86f5c29bd 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 e03701c96..ba37255a6 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 cc393e651..8c14675f6 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 d3997a8f8..657bb0132 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 3dc8dd35a..c97cb828b 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 54ef97e05..30a936f44 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 60c044ea9..bbf51dcde 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 795e09ea1..dbae1aabb 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 c92b2b6ff..e3e408aea 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 20295f8f9..5a94484ae 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 3d7de5c12..c86f35749 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 0d7a68400..23176d109 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 65aecee14..50b76fa2f 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 dd86e6edd..ade5dde2f 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 3a594a3bf..f445271d4 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 05f988e1d..8827de8fd 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 53da0713a..343e6c6ec 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 dbc3a737d..e663c0504 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 aa79cf966..e751a2b0e 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 8a1f8229d..061ce1f3f 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 23d349102..c51f2847d 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 675742830..eb2f7ac86 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 9ba36410a..83dbb619f 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 e26f5c2bc..8c328da83 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 f2eb81c43..5a5f7fc9a 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 7bc87323a..164569504 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 539ec3eca..6fa67b7c8 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 9905f6aeb..4a357a671 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 87fd0aa38..ae7e23c20 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 cb7523126..dd106927d 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 7229b7365..49c26a8c8 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 0a779405e..77491bdb8 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 459a17045..6e41b644b 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 4ee8dcd33..3bfcbb376 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 1b816b4ef..0b3491dfb 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 3ac582f6d..3e7484c5d 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 ff43852b1..79089160a 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 648b273ca..c531c5b76 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 79d8393d2..ba17520f7 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 35a7cb4c2..c78bf27cb 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 5fd88bf8c..a97df6e58 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 5a51c0c8c..945772861 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 d91701302..7e658699b 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 232109c7e..cde68befb 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 b93b1219e..18b39486a 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 bf947056a..2daafffeb 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 73377103e..b4794f1ea 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 fd0bd3870..b1774ebfb 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