import type { AcpSessionHost } from "./acp-session-host.js";
import { type AcpInitializeParams, type AcpInitializeResult, type AcpSessionCloseParams, type AcpSessionLoadParams, type AcpSessionNewParams, type AcpSessionNewResult, type AcpSessionPromptParams, type AcpSessionPromptResult, type AcpSessionSetConfigParams } from "../protocol/wire/index.js";
export type { AcpSessionHost };
export declare function handleAcpInitialize(host: AcpSessionHost, params: AcpInitializeParams, packageVersion: string): Promise<AcpInitializeResult>;
export declare function handleAcpSessionNew(host: AcpSessionHost, params: AcpSessionNewParams): Promise<AcpSessionNewResult>;
/**
 * Standard ACP session/load: point the host at an existing session and return its persisted
 * history as display-only chunks for the server to replay. The backend turn context is NOT
 * rebuilt here — every session/prompt hydrates history from disk via the turn pipeline's
 * withResumedHistory, so load only needs to (a) make this the active session and (b) hand back
 * the transcript for the host to render. Returns data only; the server owns the send path.
 */
export declare function handleAcpSessionLoad(host: AcpSessionHost, params: AcpSessionLoadParams): Promise<{
    replay: Array<{
        type: "user_message_chunk" | "agent_message_chunk";
        content: string;
    }>;
}>;
/**
 * Pre-prompt slash-command interception (data only). Extracts the leading text from the prompt; if
 * it starts with "/", routes it through the single-source command registry (dispatchSlashCommand)
 * and returns its {handled, reply}. Otherwise returns {handled:false} so the caller runs a normal
 * turn. This NEVER emits session/update or runs a turn — the acp-server orchestrates the single
 * send path (agent_message_chunk + result) when handled, keeping handleAcpSessionPrompt untouched.
 */
export declare function tryDispatchCommand(host: AcpSessionHost, params: AcpSessionPromptParams): Promise<{
    handled: boolean;
    reply?: string;
}>;
export declare function handleAcpSessionPrompt(host: AcpSessionHost, params: AcpSessionPromptParams): Promise<AcpSessionPromptResult>;
export declare function handleAcpSessionClose(host: AcpSessionHost, params: AcpSessionCloseParams): Promise<void>;
export declare function handleAcpSessionSetConfig(host: AcpSessionHost, params: AcpSessionSetConfigParams): Promise<void>;
export declare function handleAcpSessionSetModel(host: AcpSessionHost, _sessionId: string, model: string): Promise<void>;
/**
 * Standard ACP session/set_mode: validate the requested permission mode and record it on the
 * session-level acpSessionMeta.permissions bag. The rule engine is NOT touched here — the next
 * session/prompt's syncTurnPermissionConfig reads permissions.mode and applies it (single track).
 * Returns the applied modeId; the server emits current_mode_update. An unknown mode throws a coded
 * error which the acp-server dispatch translates into a JSON-RPC error.
 */
export declare function handleAcpSessionSetMode(host: AcpSessionHost, _sessionId: string, modeId: string): Promise<string>;
