/**
 * 日志标准化类型系统
 * 参考 vibe-kanban Rust 实现
 */
export interface JsonPatchOperation {
    op: 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test';
    path: string;
    value?: unknown;
    from?: string;
}
export type JsonPatch = JsonPatchOperation[];
export type LogMsg = {
    type: 'stdout';
    data: string;
} | {
    type: 'stderr';
    data: string;
} | {
    type: 'patch';
    patch: JsonPatch;
    seq: number;
} | {
    type: 'session_id';
    id: string;
} | {
    type: 'message_id';
    id: string;
} | {
    type: 'finished';
};
export type NormalizedEntryType = 'user_message' | 'user_feedback' | 'assistant_message' | 'tool_use' | 'system_message' | 'error_message' | 'thinking' | 'loading' | 'next_action' | 'token_usage_info';
export type ActionType = 'file_read' | 'file_edit' | 'command_run' | 'search' | 'web_fetch' | 'tool' | 'task_create' | 'plan_presentation' | 'todo_management' | 'other';
export type ToolStatus = 'created' | 'success' | 'failed' | 'denied' | 'pending_approval' | 'timed_out';
export type FileChange = {
    type: 'write';
    path: string;
    content?: string;
} | {
    type: 'delete';
    path: string;
} | {
    type: 'rename';
    from: string;
    to: string;
} | {
    type: 'edit';
    path: string;
    diff?: string;
};
export interface TodoItem {
    content: string;
    status: string;
    priority?: string | null;
}
export interface NormalizedEntry {
    id: string;
    timestamp: number;
    entryType: NormalizedEntryType;
    content: string;
    metadata?: {
        action?: ActionType;
        toolName?: string;
        toolId?: string;
        status?: ToolStatus;
        fileChanges?: FileChange[];
        tokenUsage?: {
            totalTokens?: number;
            modelContextWindow?: number;
        };
        error?: string;
        /** Agent todo list (for todo_management action) */
        todos?: TodoItem[];
        todoOperation?: string;
    };
}
export interface NormalizedConversation {
    sessionId?: string;
    entries: NormalizedEntry[];
    /** Monotonic sequence number of the last patch applied to this snapshot.
     * Clients use this to dedupe patches received between SUBSCRIBE and snapshot fetch. */
    seq?: number;
}
export declare function createUserMessage(content: string, id?: string): NormalizedEntry;
export declare function createAssistantMessage(content: string, id?: string): NormalizedEntry;
export declare function createThinking(content: string, id?: string): NormalizedEntry;
export declare function createSystemMessage(content: string, id?: string): NormalizedEntry;
export declare function createErrorMessage(content: string, error?: string, id?: string): NormalizedEntry;
export declare function createToolUse(toolName: string, content: string, action: ActionType, toolId?: string, id?: string, extras?: {
    todos?: TodoItem[];
    todoOperation?: string;
}): NormalizedEntry;
export declare function createTokenUsageInfo(totalTokens: number, modelContextWindow?: number, id?: string): NormalizedEntry;
export declare function withToolStatus(entry: NormalizedEntry, status: ToolStatus): NormalizedEntry;
//# sourceMappingURL=types.d.ts.map