import type { ProviderModelSettings, ProviderToolDefinition } from '../../lib/providers';
import type { PromptMessage } from 'react-mcp-hook';
import type { McpServerEntry } from '../../contexts/McpContext';
export interface UseChatAgentOptions {
    apiKey?: string;
    providerId: string;
    modelName: string;
    baseUrl?: string;
    connection?: Record<string, unknown>;
    mcpServers: McpServerEntry[];
    modelSettings?: ProviderModelSettings;
    instructions?: string;
    clientHeaders?: Record<string, string>;
    logLevel?: 'off' | 'error' | 'warn' | 'info' | 'debug';
    apiMode?: 'responses' | 'chat_completions';
    useLegacyMessages?: boolean;
    additionalTools?: Array<ProviderToolDefinition>;
    getAttachmentCache?: () => AttachmentCache;
}
export type ToolApprovalStatus = 'pending' | 'approved' | 'rejected';
export interface ToolApprovalInterruptionDetails {
    id: string;
    runId: string;
    callId?: string;
    toolName?: string;
    toolArguments?: string;
    agentName?: string;
    message?: string;
    createdAt: number;
    updatedAt: number;
    resolvedAt?: number;
    status: ToolApprovalStatus;
    rawItem?: unknown;
}
export interface SerializedPendingRunData {
    version: 1;
    id: string;
    createdAt: number;
    updatedAt: number;
    state: string;
    assistantText: string;
    toolCalls: ToolCallProgress[];
    reasoningEvents: ReasoningEventDetails[];
    messageEvents: MessageEventDetails[];
    interruptions: ToolApprovalInterruptionDetails[];
    providerId?: string;
}
export interface ToolCallLifecycleMetadata {
    callId: string;
    status?: string;
    error?: string;
    timestamp?: number;
    rawItem?: unknown;
}
export interface ToolCallProgress {
    id: string;
    name: string;
    args: string;
    status: string;
    output?: string;
    error?: string;
    startedAt: number;
    updatedAt: number;
    completedAt?: number;
}
export interface AssistantStreamState {
    text: string;
    toolCalls: ToolCallProgress[];
    reasoningEvents: ReasoningEventDetails[];
    messageEvents: MessageEventDetails[];
    interruptions: ToolApprovalInterruptionDetails[];
}
export interface ChatAttachment {
    id: string;
    name: string;
    mimeType: string;
    size: number;
    dateAdded: number;
    dataUrl?: string;
    url?: string;
    fileId?: string;
    sourceUrl?: string;
}
export interface ChatAttachmentUpload extends ChatAttachment {
    file?: File;
}
export type AttachmentCache = Record<string, ChatAttachment>;
export interface ChatSlashCommandPayload {
    id: string;
    name: string;
    title: string;
    serverName?: string;
    description?: string;
    args: Record<string, string>;
    serverId?: string;
    resolvedPrompt?: {
        description?: string;
        messages: PromptMessage[];
    };
}
export interface ChatAttachmentReference {
    id: string;
    name: string;
    mimeType: string;
    size: number;
    url?: string;
    fileId?: string;
    sourceUrl?: string;
}
export type AttachmentReferenceMap = Record<string, ChatAttachmentReference>;
export type ReasoningEventPhase = 'started' | 'completed';
export interface ReasoningEventDetails {
    id: string;
    phase: ReasoningEventPhase;
    summary?: unknown;
    rawEvent?: unknown;
    timestamp: number;
}
export type MessageEventPhase = 'started' | 'completed';
export interface MessageEventDetails {
    id: string;
    role?: string;
    status?: string;
    phase: MessageEventPhase;
    content?: unknown;
    rawEvent?: unknown;
    timestamp: number;
}
export interface InvokeChatAgentHandlers {
    onOutputTextDelta?: (delta: string, fullText: string) => void | Promise<void>;
    onMessageOutputCreated?: (finalOutput: string) => void | Promise<void>;
    onToolCall?: (name: string, args: string, metadata?: ToolCallLifecycleMetadata) => void | Promise<void>;
    onToolOutput?: (name: string, output: string, metadata?: ToolCallLifecycleMetadata) => void | Promise<void>;
    onReasoningEvent?: (event: ReasoningEventDetails) => void | Promise<void>;
    onMessageEvent?: (event: MessageEventDetails) => void | Promise<void>;
    onInterruptions?: (interruptions: ToolApprovalInterruptionDetails[], context: {
        runId: string;
    }) => void | Promise<void>;
}
export interface ChatMessage {
    role: 'user' | 'assistant';
    content: string;
    timestamp?: number;
    toolCalls?: ToolCallProgress[];
    attachments?: ChatAttachment[];
    slashCommand?: ChatSlashCommandPayload;
}
export interface ChatMessageInput {
    content: string;
    attachments?: ChatAttachmentUpload[];
    slashCommand?: ChatSlashCommandPayload;
}
export interface ChatSession {
    chatHistory: ChatMessage[];
}
//# sourceMappingURL=useChatAgent.types.d.ts.map