/**
 * TeamRegistry — session-scoped roster for the team tool: create registers
 * members (producer), the send action routes messages to them (consumer).
 *
 * The team tool spawns each member as a real subprocess agent
 * (AgentProcessManager) and registers a delivery closure here. The send
 * action looks the target up by name or full member id and routes the message
 * into the member's process via that closure, returning the member's reply.
 *
 * This registry is the ONLY routing path to team members, so an
 * unregistered/dead target fails loud.
 */
export interface TeamRegistryMember {
    /** Full member id, e.g. "team-research-coder". */
    memberId: string;
    /** Display name within the team, e.g. "coder". */
    name: string;
    /** Team this member belongs to. */
    teamName: string;
    /** Role description. */
    role: string;
    /** Deliver a message into the member's process and return its reply text. */
    deliver: (message: string, fromId: string) => Promise<string>;
    /** Whether the member's process is still alive. */
    isAlive: () => boolean;
}
export interface TeamRegistryListEntry {
    memberId: string;
    name: string;
    teamName: string;
    role: string;
    alive: boolean;
}
export interface DeliveryOutcome {
    ok: boolean;
    /** Per-recipient replies (broadcast may have several). */
    replies?: Array<{
        memberId: string;
        name: string;
        reply: string;
    }>;
    error?: string;
}
export declare class TeamRegistry {
    private readonly members;
    register(member: TeamRegistryMember): void;
    unregister(memberId: string): void;
    /** Live roster (alive flag reflects the underlying process). */
    list(): TeamRegistryListEntry[];
    /**
     * Resolve a send `to` token to concrete members.
     * Accepts a member name ("coder"), a full member id ("team-x-coder"),
     * or "*" for broadcast to all alive members.
     * Returns [] when nothing matches (caller fails loud).
     */
    private resolveTargets;
    /**
     * Deliver a message to the resolved target(s) and collect replies.
     * Fail-loud: no target → ok:false; any delivery error → surfaced.
     */
    deliver(to: string, message: string, fromId: string): Promise<DeliveryOutcome>;
}
