feat: scaffold electron orchestrator foundation

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Copilot CLI
2026-03-21 09:27:28 +01:00
co-authored by Copilot
parent 1ed3d3f652
commit 9e509593d6
46 changed files with 3870 additions and 13 deletions
@@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2" />
</ItemGroup>
<ItemGroup>
<Using Include="Xunit" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Kopaya.AgentHost\Kopaya.AgentHost.csproj" />
</ItemGroup>
</Project>
@@ -0,0 +1,69 @@
using Kopaya.AgentHost.Contracts;
using Kopaya.AgentHost.Services;
namespace Kopaya.AgentHost.Tests;
public sealed class PatternValidatorTests
{
private readonly PatternValidator _validator = new();
[Fact]
public void SingleAgentPattern_WithExactlyOneAgent_IsValid()
{
PatternDefinitionDto pattern = new()
{
Id = "single",
Name = "Single",
Mode = "single",
Availability = "available",
Agents =
[
new PatternAgentDefinitionDto
{
Id = "agent-1",
Name = "Primary",
Model = "gpt-5.4",
Instructions = "Help with the user's request.",
},
],
};
IReadOnlyList<PatternValidationIssueDto> issues = _validator.Validate(pattern);
Assert.Empty(issues);
}
[Fact]
public void MagenticPattern_IsReportedAsUnavailable()
{
PatternDefinitionDto pattern = new()
{
Id = "magentic",
Name = "Magentic",
Mode = "magentic",
Availability = "unavailable",
UnavailabilityReason = "Unsupported in C#.",
Agents =
[
new PatternAgentDefinitionDto
{
Id = "agent-1",
Name = "Planner",
Model = "gpt-5.4",
Instructions = "Plan the task.",
},
new PatternAgentDefinitionDto
{
Id = "agent-2",
Name = "Specialist",
Model = "claude-opus-4.5",
Instructions = "Complete the task.",
},
],
};
IReadOnlyList<PatternValidationIssueDto> issues = _validator.Validate(pattern);
Assert.Contains(issues, issue => issue.Message.Contains("Unsupported", StringComparison.OrdinalIgnoreCase));
}
}