import type { AcpHostRequestHandler } from "./acp-protocol-adapter.js";
interface HostHandlerOpts {
    cwd: string;
    /**
     * Optional interactive permission resolver. When provided, session/request_permission is routed
     * here (forwarded to the user) instead of auto-allowing. Returning a chosen optionId responds to
     * the external agent. If omitted, permissions auto-allow (host-trust baseline for sub-agents).
     */
    requestPermission?: (params: Record<string, unknown>) => Promise<{
        optionId: string;
    }>;
}
/**
 * Host-side reverse-RPC handler for an EXTERNAL ACP agent (codex/copilot/…).
 *
 * Auto-allows permissions (the external agent runs under the qlogicagent host's
 * trust, matching the internal sub-agent baseline), serves fs read/write confined
 * to the agent cwd, and runs terminals as real child processes. Terminals are
 * tracked in a Map so the agent process lifecycle (detach/kill) can reap them via
 * disposeAll().
 *
 * Terminal response shapes align with the official ACP schema
 * (@agentclientprotocol/sdk):
 *   - createTerminal       -> { terminalId }
 *   - terminalOutput       -> { output, truncated, exitStatus: {exitCode, signal} | null }
 *   - waitForTerminalExit  -> { exitCode, signal }
 */
export declare function createAcpHostHandler(opts: HostHandlerOpts): AcpHostRequestHandler & {
    disposeAll(): void;
};
export {};
