mirror of https://github.com/microsoft/autogen.git
Rysweet dotnet refactor (#624)
rename the main classes and mixup folder structure move some tings from samples into core cleanup cross-deps cleanup grpc deps
This commit is contained in:
parent
19de8a8e65
commit
dca82b3f5d
|
@ -5,9 +5,9 @@ VisualStudioVersion = 17.0.31903.59
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{DC5E7967-F187-4E42-9B71-835E79501288}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Worker.Client", "src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj", "{687DA41E-83A6-418A-918B-8E2C20C6D1E3}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Client", "src\Microsoft.AutoGen.Agents.Client\Microsoft.AutoGen.Agents.Client.csproj", "{687DA41E-83A6-418A-918B-8E2C20C6D1E3}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Worker.Server", "src\Microsoft.AutoGen.Agents.Worker.Server\Microsoft.AutoGen.Agents.Worker.Server.csproj", "{D4EC36E1-E197-47C2-A45A-CAAFEB6B9F09}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Runtime", "src\Microsoft.AutoGen.Agents.Runtime\Microsoft.AutoGen.Agents.Runtime.csproj", "{D4EC36E1-E197-47C2-A45A-CAAFEB6B9F09}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents", "src\Microsoft.AutoGen.Agents\Microsoft.AutoGen.Agents.csproj", "{E6171E39-6DE2-46C9-9978-E2F946530CBA}"
|
||||
EndProject
|
||||
|
|
|
@ -5,9 +5,9 @@ VisualStudioVersion = 17.0.31903.59
|
|||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{9CFC5A2B-AE61-4840-9E1B-FC490EF4C99B}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Worker.Client", "src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj", "{38494BE5-9E87-47E3-8439-D828FBAB0C7A}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Client", "src\Microsoft.AutoGen.Agents.Client\Microsoft.AutoGen.Agents.Client.csproj", "{38494BE5-9E87-47E3-8439-D828FBAB0C7A}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Worker.Server", "src\Microsoft.AutoGen.Agents.Worker.Server\Microsoft.AutoGen.Agents.Worker.Server.csproj", "{6D11A33E-644C-47FC-B0C5-4697B9AE598E}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Runtime", "src\Microsoft.AutoGen.Agents.Runtime\Microsoft.AutoGen.Agents.Runtime.csproj", "{6D11A33E-644C-47FC-B0C5-4697B9AE598E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents", "src\Microsoft.AutoGen.Agents\Microsoft.AutoGen.Agents.csproj", "{A2864CB0-C745-4B59-8219-74AD403BC68F}"
|
||||
EndProject
|
||||
|
@ -19,19 +19,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.AutoGen.Agents.Ex
|
|||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{65402BF3-B027-429E-9333-1473364928FF}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Greeter", "Greeter", "{74E89843-2FEA-4ED9-98C7-98771BA6F616}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greeter.AgentHost", "samples\Greeter\Greeter.AgentHost\Greeter.AgentHost.csproj", "{9B57C2B2-3395-4393-BB9F-702A9C8B0F67}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greeter.AgentWorker", "samples\Greeter\Greeter.AgentWorker\Greeter.AgentWorker.csproj", "{8D3D4AD7-9B0B-4BC7-B301-858B74F77D32}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greeter.AppHost", "samples\Greeter\Greeter.AppHost\Greeter.AppHost.csproj", "{5DC6D4E4-BBFD-4F92-8DC8-4793DF2F34BE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Greeter.ServiceDefaults", "samples\Greeter\Greeter.ServiceDefaults\Greeter.ServiceDefaults.csproj", "{CC1CF4B0-05D6-464A-A3BA-F5D0076D7AA9}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HelloAgents", "HelloAgents", "{DB196600-333E-41F8-B441-3DF86F644551}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloAgents", "samples\HelloAgents\HelloAgents.Agents\HelloAgents.csproj", "{573B378C-462D-4E00-91AB-F154E07763E8}"
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloAgents", "samples\HelloAgents\HelloAgents.Agents\HelloAgents.Agents.csproj", "{573B378C-462D-4E00-91AB-F154E07763E8}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HelloAgents.ApiService", "samples\HelloAgents\HelloAgents.ApiService\HelloAgents.ApiService.csproj", "{437B9B23-9D3D-45CF-A0C8-20506B6F8601}"
|
||||
EndProject
|
||||
|
@ -62,9 +52,6 @@ Global
|
|||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{38494BE5-9E87-47E3-8439-D828FBAB0C7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{38494BE5-9E87-47E3-8439-D828FBAB0C7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
|
@ -86,22 +73,6 @@ Global
|
|||
{32E844CB-C1C5-4C44-9105-34A24EF76EE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{32E844CB-C1C5-4C44-9105-34A24EF76EE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{32E844CB-C1C5-4C44-9105-34A24EF76EE7}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{9B57C2B2-3395-4393-BB9F-702A9C8B0F67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{9B57C2B2-3395-4393-BB9F-702A9C8B0F67}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{9B57C2B2-3395-4393-BB9F-702A9C8B0F67}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{9B57C2B2-3395-4393-BB9F-702A9C8B0F67}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{8D3D4AD7-9B0B-4BC7-B301-858B74F77D32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{8D3D4AD7-9B0B-4BC7-B301-858B74F77D32}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8D3D4AD7-9B0B-4BC7-B301-858B74F77D32}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8D3D4AD7-9B0B-4BC7-B301-858B74F77D32}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{5DC6D4E4-BBFD-4F92-8DC8-4793DF2F34BE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{5DC6D4E4-BBFD-4F92-8DC8-4793DF2F34BE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{5DC6D4E4-BBFD-4F92-8DC8-4793DF2F34BE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{5DC6D4E4-BBFD-4F92-8DC8-4793DF2F34BE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{CC1CF4B0-05D6-464A-A3BA-F5D0076D7AA9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{CC1CF4B0-05D6-464A-A3BA-F5D0076D7AA9}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CC1CF4B0-05D6-464A-A3BA-F5D0076D7AA9}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CC1CF4B0-05D6-464A-A3BA-F5D0076D7AA9}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{573B378C-462D-4E00-91AB-F154E07763E8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{573B378C-462D-4E00-91AB-F154E07763E8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{573B378C-462D-4E00-91AB-F154E07763E8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -151,6 +122,9 @@ Global
|
|||
{4A74F7F1-989F-4740-BE2E-B04D9B288946}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A74F7F1-989F-4740-BE2E-B04D9B288946}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{38494BE5-9E87-47E3-8439-D828FBAB0C7A} = {9CFC5A2B-AE61-4840-9E1B-FC490EF4C99B}
|
||||
{6D11A33E-644C-47FC-B0C5-4697B9AE598E} = {9CFC5A2B-AE61-4840-9E1B-FC490EF4C99B}
|
||||
|
@ -158,11 +132,6 @@ Global
|
|||
{2AFA283F-345A-4E3D-BF60-FBD727B841BE} = {9CFC5A2B-AE61-4840-9E1B-FC490EF4C99B}
|
||||
{286218DA-7A24-4EA1-9073-20B2E266511F} = {2AFA283F-345A-4E3D-BF60-FBD727B841BE}
|
||||
{32E844CB-C1C5-4C44-9105-34A24EF76EE7} = {2AFA283F-345A-4E3D-BF60-FBD727B841BE}
|
||||
{74E89843-2FEA-4ED9-98C7-98771BA6F616} = {65402BF3-B027-429E-9333-1473364928FF}
|
||||
{9B57C2B2-3395-4393-BB9F-702A9C8B0F67} = {74E89843-2FEA-4ED9-98C7-98771BA6F616}
|
||||
{8D3D4AD7-9B0B-4BC7-B301-858B74F77D32} = {74E89843-2FEA-4ED9-98C7-98771BA6F616}
|
||||
{5DC6D4E4-BBFD-4F92-8DC8-4793DF2F34BE} = {74E89843-2FEA-4ED9-98C7-98771BA6F616}
|
||||
{CC1CF4B0-05D6-464A-A3BA-F5D0076D7AA9} = {74E89843-2FEA-4ED9-98C7-98771BA6F616}
|
||||
{DB196600-333E-41F8-B441-3DF86F644551} = {65402BF3-B027-429E-9333-1473364928FF}
|
||||
{573B378C-462D-4E00-91AB-F154E07763E8} = {DB196600-333E-41F8-B441-3DF86F644551}
|
||||
{437B9B23-9D3D-45CF-A0C8-20506B6F8601} = {DB196600-333E-41F8-B441-3DF86F644551}
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Worker.Server/Microsoft.AutoGen.Agents.Worker.Server.csproj" />
|
||||
<ProjectReference Include="..\Greeter.ServiceDefaults\Greeter.ServiceDefaults.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Azure.AI.OpenAI" />
|
||||
<PackageReference Include="Microsoft.Orleans.Server" />
|
||||
<PackageReference Include="Microsoft.Orleans.Reminders" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,14 +0,0 @@
|
|||
using Microsoft.AutoGen.Agents.Worker;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.AddServiceDefaults();
|
||||
builder.AddAgentService();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapAgentService();
|
||||
app.UseExceptionHandler();
|
||||
app.MapDefaultEndpoints();
|
||||
|
||||
app.Run();
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5438",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:7511;http://localhost:5438",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"AllowedHosts": "*",
|
||||
"Kestrel": {
|
||||
"EndpointDefaults": {
|
||||
"Protocols": "Http2"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
using System.Diagnostics;
|
||||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using AgentId = Microsoft.AutoGen.Agents.Worker.Client.AgentId;
|
||||
|
||||
namespace Greeter.AgentWorker;
|
||||
|
||||
public sealed class AgentClient(ILogger<AgentClient> logger, AgentWorkerRuntime runtime, DistributedContextPropagator distributedContextPropagator, EventTypes typeRegistry) : AgentBase(new ClientContext(logger, runtime, distributedContextPropagator), typeRegistry)
|
||||
{
|
||||
public async ValueTask PublishEventAsync(CloudEvent @event) => await PublishEvent(@event);
|
||||
public async ValueTask<RpcResponse> SendRequestAsync(AgentId target, string method, Dictionary<string, string> parameters) => await RequestAsync(target, method, parameters);
|
||||
|
||||
private sealed class ClientContext(ILogger<AgentClient> logger, AgentWorkerRuntime runtime, DistributedContextPropagator distributedContextPropagator) : IAgentContext
|
||||
{
|
||||
public AgentId AgentId { get; } = new AgentId("client", Guid.NewGuid().ToString());
|
||||
public AgentBase? AgentInstance { get; set; }
|
||||
public ILogger Logger { get; } = logger;
|
||||
public DistributedContextPropagator DistributedContextPropagator { get; } = distributedContextPropagator;
|
||||
|
||||
public async ValueTask PublishEventAsync(CloudEvent @event)
|
||||
{
|
||||
await runtime.PublishEvent(@event).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async ValueTask SendRequestAsync(AgentBase agent, RpcRequest request)
|
||||
{
|
||||
await runtime.SendRequest(AgentInstance!, request).ConfigureAwait(false);
|
||||
}
|
||||
|
||||
public async ValueTask SendResponseAsync(RpcRequest request, RpcResponse response)
|
||||
{
|
||||
await runtime.SendResponse(response).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Worker.Client/Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="..\Greeter.ServiceDefaults\Greeter.ServiceDefaults.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,61 +0,0 @@
|
|||
using Agents;
|
||||
using Google.Protobuf;
|
||||
using Greeter.AgentWorker;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using AgentId = Microsoft.AutoGen.Agents.Worker.Client.AgentId;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// Add service defaults & Aspire components.
|
||||
builder.AddServiceDefaults();
|
||||
|
||||
var agentBuilder = builder.AddAgentWorker("https://agenthost");
|
||||
agentBuilder.AddAgent<GreetingAgent>("greeter");
|
||||
builder.Services.AddHostedService<MyBackgroundService>();
|
||||
builder.Services.AddSingleton<AgentClient>();
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
app.MapDefaultEndpoints();
|
||||
|
||||
app.Run();
|
||||
|
||||
internal sealed class GreetingAgent(IAgentContext context, EventTypes typeRegistry, ILogger<GreetingAgent> logger) : AgentBase(context, typeRegistry)
|
||||
{
|
||||
protected override Task<RpcResponse> HandleRequest(RpcRequest request)
|
||||
{
|
||||
logger.LogInformation("[{Id}] Received request: '{Request}'.", AgentId, request);
|
||||
return Task.FromResult(new RpcResponse() { Payload = new Payload {
|
||||
DataContentType = "text/plain",
|
||||
Data = ByteString.CopyFromUtf8("Hello, agents!"),
|
||||
DataType = "text"
|
||||
}});
|
||||
}
|
||||
}
|
||||
|
||||
internal sealed class MyBackgroundService(ILogger<MyBackgroundService> logger, AgentClient client) : BackgroundService
|
||||
{
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
while (!stoppingToken.IsCancellationRequested)
|
||||
{
|
||||
try
|
||||
{
|
||||
var generatedCodeId = Guid.NewGuid().ToString();
|
||||
var instanceId = Guid.NewGuid().ToString();
|
||||
var response = await client.SendRequestAsync(
|
||||
new AgentId("greeter", "foo"),
|
||||
"echo",
|
||||
new Dictionary<string, string> { ["message"] = "Hello, agents!" }).ConfigureAwait(false);
|
||||
|
||||
logger.LogInformation("Received response: {Response}", response);
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
logger.LogError(exception, "Error invoking request.");
|
||||
}
|
||||
|
||||
await Task.Delay(TimeSpan.FromMinutes(2), stoppingToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:5181",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:7050;http://localhost:5181",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,27 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsAspireHost>true</IsAspireHost>
|
||||
<UserSecretsId>6e251df6-43b1-498f-87a8-3cc77c302c21</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Greeter.AgentHost\Greeter.AgentHost.csproj" />
|
||||
<ProjectReference Include="..\Greeter.AgentWorker\Greeter.AgentWorker.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Aspire.Hosting.AppHost" />
|
||||
<PackageReference Include="Aspire.Hosting.Azure.ApplicationInsights" />
|
||||
<PackageReference Include="Aspire.Hosting.Azure.CognitiveServices" />
|
||||
<PackageReference Include="Aspire.Hosting.NodeJs" />
|
||||
<PackageReference Include="Aspire.Hosting.Orleans" />
|
||||
<PackageReference Include="Aspire.Hosting.Qdrant" />
|
||||
<PackageReference Include="Aspire.Hosting.Redis" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,21 +0,0 @@
|
|||
var builder = DistributedApplication.CreateBuilder(args);
|
||||
|
||||
builder.AddAzureProvisioning();
|
||||
|
||||
var orleans = builder.AddOrleans("orleans")
|
||||
.WithDevelopmentClustering()
|
||||
.WithMemoryReminders()
|
||||
.WithMemoryGrainStorage("agent-state");
|
||||
|
||||
var agentHost = builder.AddProject<Projects.Greeter_AgentHost>("agenthost")
|
||||
.WithReference(orleans);
|
||||
|
||||
builder.AddProject<Projects.Greeter_AgentWorker>("csharp-worker")
|
||||
.WithExternalHttpEndpoints()
|
||||
.WithReference(agentHost);
|
||||
|
||||
var ep = agentHost.GetEndpoint("http");
|
||||
builder.AddExecutable("python-worker", "hatch", "../../../../python/", "run", "python", "worker_example.py")
|
||||
.WithEnvironment("AGENT_HOST", $"{ep.Property(EndpointProperty.Host)}:{ep.Property(EndpointProperty.Port)}");
|
||||
|
||||
builder.Build().Run();
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"profiles": {
|
||||
"https": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "https://localhost:17267;http://localhost:15190",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"DOTNET_ENVIRONMENT": "Development",
|
||||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "https://localhost:21107",
|
||||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "https://localhost:22230"
|
||||
}
|
||||
},
|
||||
"http": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"applicationUrl": "http://localhost:15190",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"DOTNET_ENVIRONMENT": "Development",
|
||||
"DOTNET_DASHBOARD_OTLP_ENDPOINT_URL": "http://localhost:19078",
|
||||
"DOTNET_RESOURCE_SERVICE_ENDPOINT_URL": "http://localhost:20236"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,111 +0,0 @@
|
|||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using OpenTelemetry;
|
||||
using OpenTelemetry.Metrics;
|
||||
using OpenTelemetry.Trace;
|
||||
|
||||
namespace Microsoft.Extensions.Hosting;
|
||||
|
||||
// Adds common .NET Aspire services: service discovery, resilience, health checks, and OpenTelemetry.
|
||||
// This project should be referenced by each service project in your solution.
|
||||
// To learn more about using this project, see https://aka.ms/dotnet/aspire/service-defaults
|
||||
public static class Extensions
|
||||
{
|
||||
public static IHostApplicationBuilder AddServiceDefaults(this IHostApplicationBuilder builder)
|
||||
{
|
||||
builder.ConfigureOpenTelemetry();
|
||||
|
||||
builder.AddDefaultHealthChecks();
|
||||
|
||||
builder.Services.AddServiceDiscovery();
|
||||
|
||||
builder.Services.ConfigureHttpClientDefaults(http =>
|
||||
{
|
||||
// Turn on resilience by default
|
||||
http.AddStandardResilienceHandler();
|
||||
|
||||
// Turn on service discovery by default
|
||||
http.AddServiceDiscovery();
|
||||
});
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static IHostApplicationBuilder ConfigureOpenTelemetry(this IHostApplicationBuilder builder)
|
||||
{
|
||||
builder.Logging.AddOpenTelemetry(logging =>
|
||||
{
|
||||
logging.IncludeFormattedMessage = true;
|
||||
logging.IncludeScopes = true;
|
||||
});
|
||||
|
||||
builder.Services.AddOpenTelemetry()
|
||||
.WithMetrics(metrics =>
|
||||
{
|
||||
metrics.AddAspNetCoreInstrumentation()
|
||||
.AddHttpClientInstrumentation()
|
||||
.AddRuntimeInstrumentation();
|
||||
})
|
||||
.WithTracing(tracing =>
|
||||
{
|
||||
tracing.AddAspNetCoreInstrumentation()
|
||||
// Uncomment the following line to enable gRPC instrumentation (requires the OpenTelemetry.Instrumentation.GrpcNetClient package)
|
||||
//.AddGrpcClientInstrumentation()
|
||||
.AddHttpClientInstrumentation();
|
||||
});
|
||||
|
||||
builder.AddOpenTelemetryExporters();
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
private static IHostApplicationBuilder AddOpenTelemetryExporters(this IHostApplicationBuilder builder)
|
||||
{
|
||||
var useOtlpExporter = !string.IsNullOrWhiteSpace(builder.Configuration["OTEL_EXPORTER_OTLP_ENDPOINT"]);
|
||||
|
||||
if (useOtlpExporter)
|
||||
{
|
||||
builder.Services.AddOpenTelemetry().UseOtlpExporter();
|
||||
}
|
||||
|
||||
// Uncomment the following lines to enable the Azure Monitor exporter (requires the Azure.Monitor.OpenTelemetry.AspNetCore package)
|
||||
//if (!string.IsNullOrEmpty(builder.Configuration["APPLICATIONINSIGHTS_CONNECTION_STRING"]))
|
||||
//{
|
||||
// builder.Services.AddOpenTelemetry()
|
||||
// .UseAzureMonitor();
|
||||
//}
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static IHostApplicationBuilder AddDefaultHealthChecks(this IHostApplicationBuilder builder)
|
||||
{
|
||||
builder.Services.AddHealthChecks()
|
||||
// Add a default liveness check to ensure app is responsive
|
||||
.AddCheck("self", () => HealthCheckResult.Healthy(), ["live"]);
|
||||
|
||||
return builder;
|
||||
}
|
||||
|
||||
public static WebApplication MapDefaultEndpoints(this WebApplication app)
|
||||
{
|
||||
// Adding health checks endpoints to applications in non-development environments has security implications.
|
||||
// See https://aka.ms/dotnet/aspire/healthchecks for details before enabling these endpoints in non-development environments.
|
||||
if (app.Environment.IsDevelopment())
|
||||
{
|
||||
// All health checks must pass for app to be considered ready to accept traffic after starting
|
||||
app.MapHealthChecks("/health");
|
||||
|
||||
// Only health checks tagged with the "live" tag must pass for app to be considered alive
|
||||
app.MapHealthChecks("/alive", new HealthCheckOptions
|
||||
{
|
||||
Predicate = r => r.Tags.Contains("live")
|
||||
});
|
||||
}
|
||||
|
||||
return app;
|
||||
}
|
||||
}
|
|
@ -1,22 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsAspireSharedProject>true</IsAspireSharedProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
|
||||
<PackageReference Include="Microsoft.Extensions.Http.Resilience" />
|
||||
<PackageReference Include="Microsoft.Extensions.ServiceDiscovery" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
|
||||
<PackageReference Include="OpenTelemetry.Extensions.Hosting" />
|
||||
<PackageReference Include="OpenTelemetry.Instrumentation.AspNetCore" />
|
||||
<PackageReference Include="OpenTelemetry.Instrumentation.Http" />
|
||||
<PackageReference Include="OpenTelemetry.Instrumentation.Runtime" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
|
@ -1,5 +1,5 @@
|
|||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
|
||||
|
|
|
@ -24,9 +24,9 @@
|
|||
|
||||
<ItemGroup>
|
||||
|
||||
<ProjectReference Include="..\HelloAgents.ServiceDefaults\HelloAgents.ServiceDefaults.csproj" />
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Client/Microsoft.AutoGen.Agents.Client.csproj" />
|
||||
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="..\HelloAgents.ServiceDefaults\HelloAgents.ServiceDefaults.csproj" />
|
||||
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents\Microsoft.AutoGen.Agents.csproj" />
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
using HelloAgents.Agents;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.AutoGen.Agents.Extensions.SemanticKernel;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
|
|
@ -7,8 +7,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Runtime/Microsoft.AutoGen.Agents.Runtime.csproj" />
|
||||
<ProjectReference Include="..\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Server\Microsoft.AutoGen.Agents.Worker.Server.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using Microsoft.AutoGen.Agents.Worker;
|
||||
|
||||
using Microsoft.AutoGen.Agents.Runtime;
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
builder.AddServiceDefaults();
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
|
||||
<ItemGroup>
|
||||
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Client/Microsoft.AutoGen.Agents.Client.csproj" />
|
||||
|
||||
<ProjectReference Include="..\DevTeam.ServiceDefaults\DevTeam.ServiceDefaults.csproj" />
|
||||
<ProjectReference Include="..\DevTeam.Shared\DevTeam.Shared.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Extensions\SemanticKernel\Microsoft.AutoGen.Agents.Extensions.SemanticKernel.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using DevTeam.Shared;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using DevTeam.Shared;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Connectors.OpenAI;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
using DevTeam.Shared;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.AutoGen.Agents.Extensions.SemanticKernel;
|
||||
using DevTeam.Agents;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using DevTeam.Backend;
|
||||
using DevTeam.Shared;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
namespace Microsoft.AI.DevTeam;
|
||||
|
|
|
@ -3,7 +3,7 @@ using System.Text.Json;
|
|||
using DevTeam.Backend;
|
||||
using DevTeam.Shared;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.SemanticKernel;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// TODO: Reimplement using ACA Sessions
|
||||
// using DevTeam.Events;
|
||||
// using Microsoft.AutoGen.Agents.Abstractions;
|
||||
// using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
// using Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
// namespace DevTeam.Backend;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Client/Microsoft.AutoGen.Agents.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
using Microsoft.AutoGen.Agents.Extensions.SemanticKernel;
|
||||
using Microsoft.AI.DevTeam;
|
||||
using DevTeam.Backend;
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
using System.Globalization;
|
||||
using Agents;
|
||||
using DevTeam.Shared;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using DevTeam.Shared;
|
||||
using Octokit.Webhooks;
|
||||
using Octokit.Webhooks.Events;
|
||||
using Octokit.Webhooks.Events.IssueComment;
|
||||
using Octokit.Webhooks.Events.Issues;
|
||||
using Octokit.Webhooks.Models;
|
||||
using Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
namespace DevTeam.Backend;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="../../../src/Microsoft.AutoGen.Agents.Client/Microsoft.AutoGen.Agents.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -20,8 +20,8 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="..\Protos\messages.proto" Link="Protos\messages.proto" />
|
||||
<Protobuf Include="..\Protos\states.proto" Link="Protos\states.proto" />
|
||||
<Protobuf Include="..\Protos\messages.proto" Link="Protos\messages.proto" />
|
||||
<Protobuf Include="..\Protos\states.proto" Link="Protos\states.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
using System.Globalization;
|
||||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace DevTeam;
|
||||
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using System.Threading.Channels;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Text.Json;
|
||||
using System.Diagnostics;
|
||||
using System.Text;
|
||||
using Google.Protobuf;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public abstract class AgentBase
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public static class AgentBaseExtensions
|
||||
{
|
|
@ -1,9 +1,9 @@
|
|||
using System.Diagnostics;
|
||||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Worker.Client;
|
||||
using AgentId = Microsoft.AutoGen.Agents.Worker.Client.AgentId;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace DevTeam.Backend;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
// TODO: Extract this to be part of the Client
|
||||
public sealed class AgentClient(ILogger<AgentClient> logger, AgentWorkerRuntime runtime, DistributedContextPropagator distributedContextPropagator,
|
|
@ -1,8 +1,8 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
internal sealed class AgentContext(AgentId agentId, AgentWorkerRuntime runtime, ILogger<AgentBase> logger, DistributedContextPropagator distributedContextPropagator) : IAgentContext
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using RpcAgentId = Agents.AgentId;
|
||||
using RpcAgentId = Microsoft.AutoGen.Agents.Abstractions.AgentId;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public sealed record class AgentId(string Type, string Key)
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Grpc.Core;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using System.Collections.Concurrent;
|
||||
|
@ -6,10 +6,9 @@ using Microsoft.Extensions.Logging;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Threading.Channels;
|
||||
using System.Diagnostics;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public sealed class AgentWorkerRuntime : IHostedService, IDisposable, IAgentWorkerRuntime
|
||||
{
|
|
@ -6,7 +6,7 @@ using Microsoft.SemanticKernel;
|
|||
using Microsoft.SemanticKernel.Connectors.OpenAI;
|
||||
using Microsoft.SemanticKernel.Memory;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
public abstract class AiAgent<T> : AgentBase where T : class, new()
|
||||
{
|
||||
protected AgentState<T> _state;
|
|
@ -1,7 +1,7 @@
|
|||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public class ConsoleAgent : IOAgent<AgentState>,
|
||||
IUseConsole,
|
|
@ -1,7 +1,7 @@
|
|||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
[TopicSubscription("FileIO")]
|
||||
public class FileAgent : IOAgent<AgentState>,
|
|
@ -1,6 +1,6 @@
|
|||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public abstract class IOAgent<T> : AgentBase where T : class, new()
|
||||
{
|
|
@ -4,7 +4,7 @@ using Microsoft.Extensions.DependencyInjection;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public class WebAPIAgent : IOAgent<AgentState>,
|
||||
IUseWebAPI,
|
|
@ -1,4 +1,4 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Grpc.Core;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
@ -9,9 +9,8 @@ using System.Reflection;
|
|||
using Google.Protobuf.Reflection;
|
||||
using Google.Protobuf;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public static class HostBuilderExtensions
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
|
||||
public interface IAgentContext
|
||||
{
|
|
@ -1,8 +1,8 @@
|
|||
// Copyright (c) Microsoft. All rights reserved.
|
||||
|
||||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker.Client;
|
||||
namespace Microsoft.AutoGen.Agents.Client;
|
||||
public interface IAgentWorkerRuntime
|
||||
{
|
||||
ValueTask PublishEvent(CloudEvent evt);
|
|
@ -1,8 +1,8 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
public static class CloudEventExtensions
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="../../Microsoft.AutoGen.Agents.Client/Microsoft.AutoGen.Agents.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
@ -12,12 +12,6 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Google.Protobuf" />
|
||||
<PackageReference Include="Grpc.Tools" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Protobuf Include="Protos\messages.proto" Link="Protos\messages.proto" />
|
||||
<Protobuf Include="Protos\states.proto" Link="Protos\states.proto" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
syntax = "proto3";
|
||||
|
||||
package cloudevents;
|
||||
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Extensions.CloudEvents";
|
||||
|
||||
message NewMessageReceived {
|
||||
string message = 1;
|
||||
}
|
||||
|
||||
message MessageEmitted {
|
||||
string message = 1;
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\..\src\Microsoft.AutoGen.Agents.Worker.Client\Microsoft.AutoGen.Agents.Worker.Client.csproj" />
|
||||
<ProjectReference Include="../../Microsoft.AutoGen.Agents.Client/Microsoft.AutoGen.Agents.Client.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
internal sealed class AgentStateGrain([PersistentState("state", "agent-state")] IPersistentState<Dictionary<string, object>> state) : Grain, IAgentStateGrain
|
||||
{
|
|
@ -5,7 +5,7 @@ using Orleans.Serialization;
|
|||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
public static class AgentWorkerHostingExtensions
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
public sealed class AgentWorkerRegistryGrain : Grain, IAgentWorkerRegistryGrain
|
||||
{
|
|
@ -1,4 +1,4 @@
|
|||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
internal interface IAgentStateGrain : IGrainWithStringKey
|
||||
{
|
|
@ -1,6 +1,6 @@
|
|||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
public interface IAgentWorkerRegistryGrain : IGrainWithIntegerKey
|
||||
{
|
|
@ -1,6 +1,7 @@
|
|||
using Agents;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
public interface IWorkerGateway : IGrainObserver
|
||||
{
|
|
@ -1,10 +1,10 @@
|
|||
using Agents;
|
||||
using Grpc.Core;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using System.Collections.Concurrent;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
internal sealed class WorkerGateway : BackgroundService, IWorkerGateway
|
||||
{
|
|
@ -1,7 +1,7 @@
|
|||
using Grpc.Core;
|
||||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
// gRPC service which handles communication between the agent worker and the cluster.
|
||||
internal sealed class WorkerGatewayService(WorkerGateway agentWorker) : AgentRpc.AgentRpcBase
|
|
@ -1,8 +1,8 @@
|
|||
using Grpc.Core;
|
||||
using Agents;
|
||||
using Microsoft.AutoGen.Agents.Abstractions;
|
||||
using System.Threading.Channels;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Worker;
|
||||
namespace Microsoft.AutoGen.Agents.Runtime;
|
||||
|
||||
internal sealed class WorkerProcessConnection : IAsyncDisposable
|
||||
{
|
|
@ -1,15 +0,0 @@
|
|||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Microsoft.AutoGen.Agents.Abstractions;
|
||||
|
||||
/// <summary>
|
||||
/// Base class for all events
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
public class Event
|
||||
{
|
||||
public required Dictionary<string, string> Data { get; set; }
|
||||
public required string Namespace { get; set; }
|
||||
public required string Type { get; set; }
|
||||
public string Subject { get; set; } = "";
|
||||
}
|
|
@ -2,6 +2,6 @@ namespace Microsoft.AutoGen.Agents.Abstractions;
|
|||
|
||||
public interface IAgent
|
||||
{
|
||||
Task HandleEvent(Event item);
|
||||
Task PublishEvent(Event item);
|
||||
Task HandleEvent(CloudEvent item);
|
||||
Task PublishEvent(CloudEvent item);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
using Agents;
|
||||
using Google.Protobuf;
|
||||
using Google.Protobuf.WellKnownTypes;
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ syntax = "proto3";
|
|||
|
||||
package agents;
|
||||
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Worker.Client";
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Abstractions";
|
||||
|
||||
message Input {
|
||||
string message = 1;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
syntax = "proto3";
|
||||
package agents;
|
||||
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Worker.Client";
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Abstractions";
|
||||
|
||||
message AgentState {
|
||||
string message = 1;
|
||||
|
|
|
@ -2,6 +2,8 @@ syntax = "proto3";
|
|||
|
||||
package agents;
|
||||
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Abstractions";
|
||||
|
||||
import "cloudevent.proto";
|
||||
import "google/protobuf/any.proto";
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ package cloudevent;
|
|||
import "google/protobuf/any.proto";
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
option csharp_namespace = "Agents";
|
||||
option csharp_namespace = "Microsoft.AutoGen.Agents.Abstractions";
|
||||
|
||||
|
||||
message CloudEvent {
|
||||
|
|
|
@ -16,13 +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\"T\n\x0cSubscription\x12\x34\n\x10typeSubscription\x18\x01 \x01(\x0b\x32\x18.agents.TypeSubscriptionH\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\"\xc6\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\x1e\n\x05\x65vent\x18\x03 \x01(\x0b\x32\r.agents.EventH\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\x12,\n\ncloudEvent\x18\x08 \x01(\x0b\x32\x16.cloudevent.CloudEventH\x00\x42\t\n\x07message2?\n\x08\x41gentRpc\x12\x33\n\x0bOpenChannel\x12\x0f.agents.Message\x1a\x0f.agents.Message(\x01\x30\x01\x62\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\"T\n\x0cSubscription\x12\x34\n\x10typeSubscription\x18\x01 \x01(\x0b\x32\x18.agents.TypeSubscriptionH\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\"\xc6\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\x1e\n\x05\x65vent\x18\x03 \x01(\x0b\x32\r.agents.EventH\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\x12,\n\ncloudEvent\x18\x08 \x01(\x0b\x32\x16.cloudevent.CloudEventH\x00\x42\t\n\x07message2?\n\x08\x41gentRpc\x12\x33\n\x0bOpenChannel\x12\x0f.agents.Message\x1a\x0f.agents.Message(\x01\x30\x01\x42(\xaa\x02%Microsoft.AutoGen.Agents.Abstractionsb\x06proto3')
|
||||
|
||||
_globals = globals()
|
||||
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
||||
_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'agent_worker_pb2', _globals)
|
||||
if _descriptor._USE_C_DESCRIPTORS == False:
|
||||
DESCRIPTOR._options = None
|
||||
_globals['DESCRIPTOR']._options = None
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\252\002%Microsoft.AutoGen.Agents.Abstractions'
|
||||
_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\ncloudevent\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\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:\n\nattributes\x18\x05 \x03(\x0b\x32&.cloudevent.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\x1a\x62\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.cloudevent.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\t\xaa\x02\x06\x41gentsb\x06proto3')
|
||||
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63loudevent.proto\x12\ncloudevent\x1a\x19google/protobuf/any.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\xa2\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:\n\nattributes\x18\x05 \x03(\x0b\x32&.cloudevent.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\x1a\x62\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.cloudevent.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%Microsoft.AutoGen.Agents.Abstractionsb\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\006Agents'
|
||||
_globals['DESCRIPTOR']._serialized_options = b'\252\002%Microsoft.AutoGen.Agents.Abstractions'
|
||||
_globals['_CLOUDEVENT_ATTRIBUTESENTRY']._options = None
|
||||
_globals['_CLOUDEVENT_ATTRIBUTESENTRY']._serialized_options = b'8\001'
|
||||
_globals['_CLOUDEVENT']._serialized_start=93
|
||||
|
|
Loading…
Reference in New Issue