/**
 * Message and communication block types
 * Dependencies: Core (Usage)
 */
import type { Usage } from "./core.js";
export declare enum MessageSource {
    USER = "user",
    HOOK = "hook"
}
export interface Message {
    id: string;
    role: "user" | "assistant";
    blocks: MessageBlock[];
    usage?: Usage;
    additionalFields?: Record<string, unknown>;
    isMeta?: boolean;
}
export type MessageBlock = TextBlock | ErrorBlock | ToolBlock | ImageBlock | BangBlock | CompressBlock | ReasoningBlock | FileHistoryBlock | TaskNotificationBlock;
export interface TextBlock {
    type: "text";
    content: string;
    customCommandContent?: string;
    source?: MessageSource;
    stage?: "streaming" | "end";
}
export interface ErrorBlock {
    type: "error";
    content: string;
}
export interface ToolBlock {
    type: "tool";
    parameters?: string;
    result?: string;
    shortResult?: string;
    startLineNumber?: number;
    images?: Array<{
        data: string;
        mediaType?: string;
    }>;
    id?: string;
    name?: string;
    /**
     * Tool execution stage:
     * - 'start': Tool call initiated (from AI service streaming)
     * - 'streaming': Tool parameters being streamed (from AI service)
     * - 'running': Tool execution in progress (from AI manager)
     * - 'end': Tool execution completed (from AI manager)
     */
    stage: "start" | "streaming" | "running" | "end";
    success?: boolean;
    error?: string | Error;
    compactParams?: string;
    parametersChunk?: string;
    isManuallyBackgrounded?: boolean;
}
export interface ImageBlock {
    type: "image";
    imageUrls?: string[];
}
export interface BangBlock {
    type: "bang";
    command: string;
    output: string;
    stage: "running" | "end";
    exitCode: number | null;
}
export interface CompressBlock {
    type: "compress";
    content: string;
    sessionId: string;
}
export interface ReasoningBlock {
    type: "reasoning";
    content: string;
    stage?: "streaming" | "end";
}
export interface FileHistoryBlock {
    type: "file_history";
    snapshots: import("./reversion.js").FileSnapshot[];
}
export interface TaskNotificationBlock {
    type: "task_notification";
    taskId: string;
    taskType: "shell" | "agent";
    status: "completed" | "failed" | "killed";
    summary: string;
    outputFile?: string;
}
//# sourceMappingURL=messaging.d.ts.map