UNPKG

openai-cli-unofficial

Version:

A powerful OpenAI CLI Coding Agent built with TypeScript

116 lines 2.5 kB
export interface MCPRequest { id: string; method: string; params?: any; } export interface MCPResponse { id: string; result?: any; error?: { code: number; message: string; data?: any; }; } export interface MCPTool { name: string; description: string; inputSchema: { type: string; properties: Record<string, any>; required?: string[]; }; } export interface ReadFileParams { path: string; encoding?: string; startLine?: number; endLine?: number; } export interface ReadFileResult { content: string; size: number; lastModified: string; encoding: string; totalLines?: number; lineRange?: { start: number; end: number; }; hasMore?: boolean; tokenCount?: number; isPartial?: boolean; message?: string; } export interface DirectoryItem { name: string; type: 'file' | 'directory'; path: string; size?: number; lastModified?: string; } export interface DirectoryResult { path: string; items: DirectoryItem[]; totalFiles: number; totalDirectories: number; structure: string; } export interface CreateFileParams { path: string; content?: string; encoding?: string; } export interface DeleteFileParams { path: string; recursive?: boolean; } export interface CreateDirectoryParams { path: string; recursive?: boolean; } export interface FileOperationResult { success: boolean; operation: 'create_file' | 'delete_file' | 'create_directory' | 'delete_directory'; path: string; message: string; details?: { size?: number; created?: string; parent_created?: boolean; files_deleted?: number; directories_deleted?: number; }; } export interface EditFileParams { path: string; startLine: number; endLine: number; newContent: string; encoding?: string; } export interface FileEditResult { success: boolean; operation: 'edit_file'; path: string; message: string; editedContent?: string; contextContent?: string; lineRange?: { edited: { start: number; end: number; }; context: { start: number; end: number; }; }; details?: { originalLines: number; newLines: number; linesChanged: number; totalLines: number; }; } //# sourceMappingURL=types.d.ts.map