Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions AgentRegistry.slnx

This file was deleted.

8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ dotnet test tests/AgentRegistry.Api.Tests/
dotnet test --filter "FullyQualifiedName~RegistrationTests.Register_WithValidRequest"

# Run the API (requires Postgres + Redis via user secrets)
dotnet run --project src/AgentRegistry.Api
dotnet run --project src/MarimerLLC.AgentRegistry.Api

# Add a migration after domain/EF model changes
dotnet ef migrations add <Name> -p src/AgentRegistry.Infrastructure -s src/AgentRegistry.Api
dotnet ef migrations add <Name> -p src/MarimerLLC.AgentRegistry.Infrastructure -s src/MarimerLLC.AgentRegistry.Api

# Apply migrations
dotnet ef database update -p src/AgentRegistry.Infrastructure -s src/AgentRegistry.Api
dotnet ef database update -p src/MarimerLLC.AgentRegistry.Infrastructure -s src/MarimerLLC.AgentRegistry.Api
```

## Architecture
Expand Down Expand Up @@ -66,7 +66,7 @@ Application-layer tests use `Rocks` (source-generator mocks) to mock `IAgentRepo

## Adding a new protocol adapter

1. Add a `Protocols/<Name>/` folder under `AgentRegistry.Api` with:
1. Add a `Protocols/<Name>/` folder under `MarimerLLC.AgentRegistry.Api` with:
- `Models/` — request/response records matching the protocol's wire format
- `<Name>AgentManifestMapper.cs` (or equivalent) — bidirectional mapping to/from domain types using `Endpoint.ProtocolMetadata` for protocol-specific fields
- `<Name>Endpoints.cs` — minimal API route registrations with `.WithTags()`, `.WithSummary()`, `.WithDescription()`, `.Produces<T>()`, and `.ProducesProblem()` on every route
Expand Down
16 changes: 8 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@ FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
WORKDIR /src

# Copy solution and package management files first for layer caching.
COPY AgentRegistry.slnx .
COPY MarimerLLC.AgentRegistry.slnx .
COPY Directory.Build.props .
COPY Directory.Packages.props .

# Copy project files for restore (src + test csproj stubs — no test source needed).
COPY src/AgentRegistry.Domain/AgentRegistry.Domain.csproj src/AgentRegistry.Domain/
COPY src/AgentRegistry.Application/AgentRegistry.Application.csproj src/AgentRegistry.Application/
COPY src/AgentRegistry.Infrastructure/AgentRegistry.Infrastructure.csproj src/AgentRegistry.Infrastructure/
COPY src/AgentRegistry.Api/AgentRegistry.Api.csproj src/AgentRegistry.Api/
COPY src/MarimerLLC.AgentRegistry.Domain/MarimerLLC.AgentRegistry.Domain.csproj src/MarimerLLC.AgentRegistry.Domain/
COPY src/MarimerLLC.AgentRegistry.Application/MarimerLLC.AgentRegistry.Application.csproj src/MarimerLLC.AgentRegistry.Application/
COPY src/MarimerLLC.AgentRegistry.Infrastructure/MarimerLLC.AgentRegistry.Infrastructure.csproj src/MarimerLLC.AgentRegistry.Infrastructure/
COPY src/MarimerLLC.AgentRegistry.Api/MarimerLLC.AgentRegistry.Api.csproj src/MarimerLLC.AgentRegistry.Api/
COPY tests/AgentRegistry.Domain.Tests/AgentRegistry.Domain.Tests.csproj tests/AgentRegistry.Domain.Tests/
COPY tests/AgentRegistry.Application.Tests/AgentRegistry.Application.Tests.csproj tests/AgentRegistry.Application.Tests/
COPY tests/AgentRegistry.Api.Tests/AgentRegistry.Api.Tests.csproj tests/AgentRegistry.Api.Tests/

RUN dotnet restore AgentRegistry.slnx
RUN dotnet restore MarimerLLC.AgentRegistry.slnx

# Copy source and publish.
COPY src/ src/
RUN dotnet publish src/AgentRegistry.Api/AgentRegistry.Api.csproj \
RUN dotnet publish src/MarimerLLC.AgentRegistry.Api/MarimerLLC.AgentRegistry.Api.csproj \
--configuration Release \
--output /app/publish

Expand All @@ -40,4 +40,4 @@ EXPOSE 8080

ENV ASPNETCORE_URLS=http://+:8080

ENTRYPOINT ["dotnet", "AgentRegistry.Api.dll"]
ENTRYPOINT ["dotnet", "MarimerLLC.AgentRegistry.Api.dll"]
13 changes: 13 additions & 0 deletions MarimerLLC.AgentRegistry.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/MarimerLLC.AgentRegistry.Api/MarimerLLC.AgentRegistry.Api.csproj" />
<Project Path="src/MarimerLLC.AgentRegistry.Application/MarimerLLC.AgentRegistry.Application.csproj" />
<Project Path="src/MarimerLLC.AgentRegistry.Domain/MarimerLLC.AgentRegistry.Domain.csproj" />
<Project Path="src/MarimerLLC.AgentRegistry.Infrastructure/MarimerLLC.AgentRegistry.Infrastructure.csproj" />
</Folder>
<Folder Name="/tests/">
<Project Path="tests/AgentRegistry.Api.Tests/AgentRegistry.Api.Tests.csproj" />
<Project Path="tests/AgentRegistry.Application.Tests/AgentRegistry.Application.Tests.csproj" />
<Project Path="tests/AgentRegistry.Domain.Tests/AgentRegistry.Domain.Tests.csproj" />
</Folder>
</Solution>
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Security.Claims;
using AgentRegistry.Api.Agents.Models;
using AgentRegistry.Api.Auth;
using AgentRegistry.Application;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Api.Agents.Models;
using MarimerLLC.AgentRegistry.Api.Auth;
using MarimerLLC.AgentRegistry.Application;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Agents;
namespace MarimerLLC.AgentRegistry.Api.Agents;

public static class AgentEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using AgentRegistry.Api.Agents.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Api.Agents.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Agents;
namespace MarimerLLC.AgentRegistry.Api.Agents;

public static class DiscoveryEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
using AgentRegistry.Application.Agents;
using DomainEndpoint = AgentRegistry.Domain.Agents.Endpoint;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Application.Agents;
using DomainEndpoint = MarimerLLC.AgentRegistry.Domain.Agents.Endpoint;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Agents.Models;
namespace MarimerLLC.AgentRegistry.Api.Agents.Models;

public record AgentResponse(
string Id,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Agents.Models;
namespace MarimerLLC.AgentRegistry.Api.Agents.Models;

public record RegisterAgentRequest(
string Name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.Security.Claims;
using AgentRegistry.Api.ApiKeys.Models;
using AgentRegistry.Api.Auth;
using AgentRegistry.Application;
using AgentRegistry.Application.Auth;
using AgentRegistry.Domain.ApiKeys;
using MarimerLLC.AgentRegistry.Api.ApiKeys.Models;
using MarimerLLC.AgentRegistry.Api.Auth;
using MarimerLLC.AgentRegistry.Application;
using MarimerLLC.AgentRegistry.Application.Auth;
using MarimerLLC.AgentRegistry.Domain.ApiKeys;
using Microsoft.AspNetCore.Mvc;

namespace AgentRegistry.Api.ApiKeys;
namespace MarimerLLC.AgentRegistry.Api.ApiKeys;

public static class ApiKeyEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using AgentRegistry.Application.Auth;
using AgentRegistry.Domain.ApiKeys;
using MarimerLLC.AgentRegistry.Application.Auth;
using MarimerLLC.AgentRegistry.Domain.ApiKeys;

namespace AgentRegistry.Api.ApiKeys.Models;
namespace MarimerLLC.AgentRegistry.Api.ApiKeys.Models;

public record IssueApiKeyRequest(string? Description, ApiKeyScope Scope = ApiKeyScope.Agent);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Security.Claims;
using System.Text.Encodings.Web;
using AgentRegistry.Application.Auth;
using MarimerLLC.AgentRegistry.Application.Auth;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.Options;

namespace AgentRegistry.Api.Auth;
namespace MarimerLLC.AgentRegistry.Api.Auth;

public class ApiKeyAuthenticationOptions : AuthenticationSchemeOptions
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AgentRegistry.Domain.ApiKeys;
using MarimerLLC.AgentRegistry.Domain.ApiKeys;

namespace AgentRegistry.Api.Auth;
namespace MarimerLLC.AgentRegistry.Api.Auth;

/// <summary>Claim type and value constants used across the registry's authorization policies.</summary>
public static class RegistryClaims
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using Microsoft.AspNetCore.Authorization;

namespace AgentRegistry.Api.Auth;
namespace MarimerLLC.AgentRegistry.Api.Auth;

public static class RegistryPolicies
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<PropertyGroup>
<UserSecretsId>agentregistry-api-dev</UserSecretsId>
<RootNamespace>MarimerLLC.AgentRegistry.Api</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand All @@ -23,8 +24,8 @@
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\AgentRegistry.Application\AgentRegistry.Application.csproj" />
<ProjectReference Include="..\AgentRegistry.Infrastructure\AgentRegistry.Infrastructure.csproj" />
<ProjectReference Include="..\MarimerLLC.AgentRegistry.Application\MarimerLLC.AgentRegistry.Application.csproj" />
<ProjectReference Include="..\MarimerLLC.AgentRegistry.Infrastructure\MarimerLLC.AgentRegistry.Infrastructure.csproj" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
using AgentRegistry.Api.ApiKeys;
using AgentRegistry.Api.Agents;
using AgentRegistry.Api.Auth;
using AgentRegistry.Api.Protocols.A2A;
using AgentRegistry.Api.Protocols.ACP;
using AgentRegistry.Api.Protocols.MCP;
using MarimerLLC.AgentRegistry.Api.ApiKeys;
using MarimerLLC.AgentRegistry.Api.Agents;
using MarimerLLC.AgentRegistry.Api.Auth;
using MarimerLLC.AgentRegistry.Api.Protocols.A2A;
using MarimerLLC.AgentRegistry.Api.Protocols.ACP;
using MarimerLLC.AgentRegistry.Api.Protocols.MCP;
using ModelContextProtocol.Protocol;
using ModelContextProtocol.Server;
using AgentRegistry.Application.Agents;
using AgentRegistry.Infrastructure;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Infrastructure;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
using OpenTelemetry.Exporter;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
using System.Text.Json;
using System.Text.Json.Nodes;
using AgentRegistry.Api.Protocols.A2A.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using DomainEndpoint = AgentRegistry.Domain.Agents.Endpoint;
using MarimerLLC.AgentRegistry.Api.Protocols.A2A.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;
using DomainEndpoint = MarimerLLC.AgentRegistry.Domain.Agents.Endpoint;

namespace AgentRegistry.Api.Protocols.A2A;
namespace MarimerLLC.AgentRegistry.Api.Protocols.A2A;

public static class A2AAgentCardMapper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Security.Claims;
using AgentRegistry.Api.Auth;
using AgentRegistry.Api.Protocols.A2A.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Api.Auth;
using MarimerLLC.AgentRegistry.Api.Protocols.A2A.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Protocols.A2A;
namespace MarimerLLC.AgentRegistry.Api.Protocols.A2A;

public static class A2AEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;

namespace AgentRegistry.Api.Protocols.A2A.Models;
namespace MarimerLLC.AgentRegistry.Api.Protocols.A2A.Models;

/// <summary>
/// A2A Agent Card — v1.0 RC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Text.Json;
using AgentRegistry.Api.Protocols.ACP.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using DomainEndpoint = AgentRegistry.Domain.Agents.Endpoint;
using MarimerLLC.AgentRegistry.Api.Protocols.ACP.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;
using DomainEndpoint = MarimerLLC.AgentRegistry.Domain.Agents.Endpoint;

namespace AgentRegistry.Api.Protocols.ACP;
namespace MarimerLLC.AgentRegistry.Api.Protocols.ACP;

public static class AcpAgentManifestMapper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Security.Claims;
using AgentRegistry.Api.Auth;
using AgentRegistry.Api.Protocols.ACP.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Api.Auth;
using MarimerLLC.AgentRegistry.Api.Protocols.ACP.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Protocols.ACP;
namespace MarimerLLC.AgentRegistry.Api.Protocols.ACP;

public static class AcpEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;

namespace AgentRegistry.Api.Protocols.ACP.Models;
namespace MarimerLLC.AgentRegistry.Api.Protocols.ACP.Models;

/// <summary>
/// ACP Agent Manifest — spec 0.2.0 (i-am-bee/acp).
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Security.Claims;
using AgentRegistry.Api.Auth;
using AgentRegistry.Api.Protocols.MCP.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Api.Auth;
using MarimerLLC.AgentRegistry.Api.Protocols.MCP.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Api.Protocols.MCP;
namespace MarimerLLC.AgentRegistry.Api.Protocols.MCP;

public static class McpEndpoints
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
using System.Text.Json;
using AgentRegistry.Api.Protocols.MCP.Models;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using DomainEndpoint = AgentRegistry.Domain.Agents.Endpoint;
using MarimerLLC.AgentRegistry.Api.Protocols.MCP.Models;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;
using DomainEndpoint = MarimerLLC.AgentRegistry.Domain.Agents.Endpoint;

namespace AgentRegistry.Api.Protocols.MCP;
namespace MarimerLLC.AgentRegistry.Api.Protocols.MCP;

public static class McpServerCardMapper
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using System.ComponentModel;
using System.Text.Json;
using AgentRegistry.Api.Protocols.A2A;
using AgentRegistry.Api.Protocols.ACP;
using AgentRegistry.Application.Agents;
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Api.Protocols.A2A;
using MarimerLLC.AgentRegistry.Api.Protocols.ACP;
using MarimerLLC.AgentRegistry.Application.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;
using ModelContextProtocol.Server;

namespace AgentRegistry.Api.Protocols.MCP;
namespace MarimerLLC.AgentRegistry.Api.Protocols.MCP;

/// <summary>
/// MCP tools that expose the registry's discovery capabilities to MCP clients.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text.Json.Nodes;
using System.Text.Json.Serialization;

namespace AgentRegistry.Api.Protocols.MCP.Models;
namespace MarimerLLC.AgentRegistry.Api.Protocols.MCP.Models;

/// <summary>
/// Registry representation of a registered MCP server.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using AgentRegistry.Domain.Agents;
using MarimerLLC.AgentRegistry.Domain.Agents;

namespace AgentRegistry.Application.Agents;
namespace MarimerLLC.AgentRegistry.Application.Agents;

public record AgentSearchFilter(
string? CapabilityName = null,
Expand Down
Loading