export type Role = 'user' | 'assistant' | 'system'; export interface OpenAIMessage { role: Role; content: string; files?: Array; } export interface OpenAIFunction { name: string; description?: string; parameters?: Record; } export interface OpenAITool { type: 'function'; function: OpenAIFunction; } export interface OpenAICompletionChoice { index: number; message: { role: Role; content: string; }; finish_reason: string; } export interface OpenAIStreamChoice { index: number; delta: { role?: Role; content?: string; }; finish_reason: string | null; } export interface OpenAIUsage { prompt_tokens: number; completion_tokens: number; total_tokens: number; } export interface OpenAIChatCompletion { id: string; object: 'chat.completion'; created: number; model: string; choices: Array; usage: OpenAIUsage; } export interface OpenAIChatCompletionChunk { id: string; object: 'chat.completion.chunk'; created: number; model: string; choices: Array; } export interface OpenAIChatCompletionCreateParams { model: string; messages: Array; temperature?: number; max_tokens?: number; top_p?: number; tools?: Array; stream?: boolean; stop?: string | Array; timeout?: number; } export interface ContentBlock { type: 'text' | 'image'; text?: string; source?: { type: 'base64' | 'url'; media_type: string; data: string; }; } export interface AnthropicMessage { role: Role; content: string | Array; files?: Array; } export interface AnthropicTool { name: string; description?: string; input_schema: Record; } export interface AnthropicUsage { input_tokens: number; output_tokens: number; } export interface AnthropicMessageResponse { id: string; type: 'message'; role: 'assistant'; model: string; content: Array; usage: AnthropicUsage; stop_reason: string; } export interface AnthropicMessageStreamPart { type: 'content_block_start' | 'content_block_delta' | 'content_block_stop' | 'message_stop'; index?: number; delta?: { type?: string; text?: string; }; } export interface AnthropicMessageCreateParams { model: string; messages: Array; max_tokens?: number; temperature?: number; top_p?: number; tools?: Array; stream?: boolean; stop_sequences?: Array; timeout?: number; } export interface FileReference { path: string; content?: string; } export interface ClaudeCodeError extends Error { status?: number; code?: string; param?: string; } export interface SessionParams { messages: Array; model?: string; } export interface SessionContinueParams { messages: Array; } export interface ClaudeCodeOptions { apiKey?: string; cliPath?: string; timeout?: number; } export interface AutomationOptions { type: 'github-review' | 'github-pr' | 'jira-ticket'; config?: Record; }