/**
 * AgentManager - Orchestration Service for Ag-Bash
 *
 * Manages the lifecycle of sub-agents (parallel bash instances).
 */
import { Bash } from "../Bash.js";
import { CowFs } from "../fs/cow-fs.js";
import type { BashHost, ExecResult } from "../types.js";
export interface SubAgent {
    id: string;
    bash: Bash;
    cowFs: CowFs;
    status: "running" | "completed" | "error";
    promise?: Promise<ExecResult>;
    result?: ExecResult;
}
export declare class AgentManager {
    private agents;
    /**
     * Spawn a new sub-agent.
     */
    spawn(id: string, command: string, parentBash: BashHost): Promise<SubAgent>;
    /**
     * Wait for an agent to complete.
     */
    wait(id: string): Promise<ExecResult>;
    /**
     * List all sub-agents.
     */
    listAgents(): SubAgent[];
    /**
     * Merge an agent's filesystem changes back into the parent filesystem.
     *
     * Reads each modified path from the agent's CowFs overlay and writes it
     * to the parent filesystem. Paths that fail to merge are reported as conflicts.
     */
    mergeAgentChanges(agentId: string): Promise<{
        merged: string[];
        conflicts: string[];
    }>;
    /**
     * Remove an agent record.
     */
    forget(id: string): void;
}
