namespace ClawdDotNet.Core.Tools;

public sealed record AgentInfo(string AgentId, string DisplayName, string Role, string Model, bool IsRunning);

public sealed record AgentMessageResult(bool Delivered, string? Response, string? Error = null);

public sealed record AgentSpawnResult(bool Started, string? AgentId, string? FinalMessage, string? Error = null);

public interface IAgentMessageRouter
{
    IReadOnlyList<AgentInfo> ListAgents(string callerAgentId);

    Task<AgentMessageResult> SendMessageAsync(
        string fromAgentId,
        string toAgentId,
        string message,
        CancellationToken ct);

    Task<AgentSpawnResult> SpawnAgentAsync(
        string fromAgentId,
        string targetAgentId,
        string taskMessage,
        CancellationToken ct);
}
