/**
 * Enhanced Headless Output - Inspired by Claude Code
 * Supports multiple output formats for CI/CD and automation
 */
export type OutputFormat = 'json' | 'stream-json' | 'text' | 'markdown';
export interface HeadlessResult {
    success: boolean;
    exitCode: number;
    messages: HeadlessMessage[];
    summary: ResultSummary;
    metadata: ResultMetadata;
}
export interface HeadlessMessage {
    role: 'user' | 'assistant' | 'tool' | 'system';
    content: string;
    timestamp: string;
    toolCall?: {
        id: string;
        name: string;
        arguments: Record<string, unknown>;
    };
    toolResult?: {
        success: boolean;
        output?: string;
        error?: string;
    };
}
export interface ResultSummary {
    totalMessages: number;
    toolCalls: number;
    successfulTools: number;
    failedTools: number;
    filesModified: string[];
    filesCreated: string[];
    commandsExecuted: string[];
    errors: string[];
}
export interface ResultMetadata {
    model: string;
    startTime: string;
    endTime: string;
    durationMs: number;
    tokensUsed?: number;
    workingDirectory: string;
}
/**
 * Format result as JSON
 */
export declare function formatAsJson(result: HeadlessResult): string;
/**
 * Format result as streaming JSON (NDJSON - one JSON object per line)
 */
export declare function formatAsStreamJson(messages: HeadlessMessage[]): string[];
/**
 * Format result as plain text
 */
export declare function formatAsText(result: HeadlessResult): string;
/**
 * Format result as Markdown
 */
export declare function formatAsMarkdown(result: HeadlessResult): string;
/**
 * Create a HeadlessResult from chat entries
 */
export declare function createHeadlessResult(chatEntries: Array<{
    type: string;
    content: string;
    timestamp: Date;
    toolCalls?: Array<{
        id: string;
        function: {
            name: string;
            arguments: string;
        };
    }>;
    toolCall?: {
        id: string;
        function: {
            name: string;
            arguments: string;
        };
    };
    toolResult?: {
        success: boolean;
        output?: string;
        error?: string;
    };
}>, options: {
    model: string;
    startTime: Date;
    workingDirectory: string;
    success?: boolean;
}): HeadlessResult;
/**
 * Output formatter based on format type
 */
export declare function formatOutput(result: HeadlessResult, format: OutputFormat): string;
