mirror of
https://github.com/microsoft/autogen.git
synced 2025-12-27 23:18:59 +00:00
Rysweet refactor 4670 rename abstractions to contracts (#4674)
* refactor renaming agent base * 1st draft * 1st draft * format * rename the tsts * move IagentWorker * 1st draft * format * gen-proto * run gen-proto-samples * format * merge problem format
This commit is contained in:
parent
fa563cb434
commit
55e157cb99
@ -168,7 +168,7 @@ dotnet add <your.csproj> reference <path to your checkout of autogen>/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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Contracts\Microsoft.AutoGen.Contracts.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Extensions\MEAI\Microsoft.AutoGen.Extensions.MEAI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
@ -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();
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Contracts\Microsoft.AutoGen.Contracts.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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")]
|
||||
|
||||
@ -12,7 +12,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Contracts\Microsoft.AutoGen.Contracts.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen\Agents\Microsoft.AutoGen.Agents.csproj" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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")]
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// EventExtensions.cs
|
||||
|
||||
using System.Globalization;
|
||||
using Microsoft.AutoGen.Abstractions;
|
||||
using Microsoft.AutoGen.Contracts;
|
||||
|
||||
namespace DevTeam;
|
||||
|
||||
|
||||
@ -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<object> _mailbox = Channel.CreateUnbounded<object>();
|
||||
private readonly IAgentRuntime _runtime;
|
||||
|
||||
protected internal ILogger<Agent> _logger;
|
||||
public IAgentRuntime Context => _runtime;
|
||||
protected readonly EventTypes EventTypes;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// IHandleConsole.cs
|
||||
|
||||
using Google.Protobuf;
|
||||
using Microsoft.AutoGen.Abstractions;
|
||||
using Microsoft.AutoGen.Contracts;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// IAgentRuntime.cs
|
||||
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AutoGen.Abstractions;
|
||||
using Microsoft.AutoGen.Contracts;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents;
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Abstractions\Microsoft.AutoGen.Abstractions.csproj" />
|
||||
<ProjectReference Include="..\Contracts\Microsoft.AutoGen.Contracts.csproj" />
|
||||
<ProjectReference Include="..\Extensions\Aspire\Microsoft.AutoGen.Extensions.Aspire.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
// GrpcGatewayService.cs
|
||||
|
||||
using Grpc.Core;
|
||||
using Microsoft.AutoGen.Abstractions;
|
||||
using Microsoft.AutoGen.Contracts;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents;
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
using System.Threading.Channels;
|
||||
using Grpc.Core;
|
||||
using Microsoft.AutoGen.Abstractions;
|
||||
using Microsoft.AutoGen.Contracts;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents;
|
||||
|
||||
|
||||
@ -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()))
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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
|
||||
{
|
||||
@ -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
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
using Google.Protobuf;
|
||||
|
||||
namespace Microsoft.AutoGen.Abstractions;
|
||||
namespace Microsoft.AutoGen.Contracts;
|
||||
|
||||
public class ChatState
|
||||
<T> where T : IMessage, new()
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// ChatUserType.cs
|
||||
|
||||
namespace Microsoft.AutoGen.Abstractions;
|
||||
namespace Microsoft.AutoGen.Contracts;
|
||||
|
||||
public enum ChatUserType
|
||||
{
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// IAgentState.cs
|
||||
|
||||
namespace Microsoft.AutoGen.Abstractions;
|
||||
namespace Microsoft.AutoGen.Contracts;
|
||||
|
||||
/// <summary>
|
||||
/// Interface for managing the state of an agent.
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// IConnection.cs
|
||||
|
||||
namespace Microsoft.AutoGen.Abstractions;
|
||||
namespace Microsoft.AutoGen.Contracts;
|
||||
public interface IConnection
|
||||
{
|
||||
}
|
||||
@ -1,7 +1,7 @@
|
||||
// Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
// IHandle.cs
|
||||
|
||||
namespace Microsoft.AutoGen.Abstractions;
|
||||
namespace Microsoft.AutoGen.Contracts;
|
||||
|
||||
public interface IHandle
|
||||
{
|
||||
@ -4,7 +4,7 @@
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace Microsoft.AutoGen.Abstractions;
|
||||
namespace Microsoft.AutoGen.Contracts;
|
||||
|
||||
public static class MessageExtensions
|
||||
{
|
||||
@ -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
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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";
|
||||
|
||||
@ -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 {
|
||||
|
||||
@ -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)
|
||||
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user