UNPKG

@codervisor/devlog-cli

Version:

Command-line interface for devlog - Extract and stream chat history to devlog server

100 lines 2.79 kB
/** * HTTP Client for DevLog ChatHub API * * Handles communication with the devlog server API endpoints, * specifically for streaming chat data to the ChatHub service. */ import { ChatSession, ChatMessage } from '@codervisor/devlog-core'; export interface ChatImportRequest { sessions: ChatSession[]; messages: ChatMessage[]; source: string; workspaceInfo?: { name?: string; path?: string; [key: string]: unknown; }; } export interface ChatImportResponse { success: boolean; importId: string; status: string; progress: { importId: string; status: 'pending' | 'processing' | 'completed' | 'failed'; progress: { sessionsProcessed: number; messagesProcessed: number; totalSessions: number; totalMessages: number; percentage: number; }; startedAt: string; completedAt?: string; error?: string; }; message: string; } export interface ChatProgressResponse { success: boolean; progress: { importId: string; status: 'pending' | 'processing' | 'completed' | 'failed'; progress: { sessionsProcessed: number; messagesProcessed: number; totalSessions: number; totalMessages: number; percentage: number; }; startedAt: string; completedAt?: string; error?: string; }; } export interface DevlogApiClientConfig { baseURL: string; timeout?: number; retries?: number; retryDelay?: number; } export declare class DevlogApiClient { private client; private config; constructor(config: DevlogApiClientConfig); private setupInterceptors; private formatError; /** * Test connection to the devlog server */ testConnection(): Promise<boolean>; /** * Import chat data to a workspace */ importChatData(projectId: string, data: ChatImportRequest): Promise<ChatImportResponse>; /** * Get import progress status */ getImportProgress(projectId: string, importId: string): Promise<ChatProgressResponse>; /** * List workspaces available on the server */ listProjects(): Promise<any[]>; /** * Get workspace details */ getProject(projectId: string): Promise<any>; /** * Search chat content in a workspace */ searchChatContent(projectId: string, query: string, options?: { limit?: number; caseSensitive?: boolean; searchType?: 'exact' | 'fuzzy' | 'semantic'; }): Promise<any>; /** * Get chat statistics for a workspace */ getChatStats(projectId: string): Promise<any>; } //# sourceMappingURL=devlog-api-client.d.ts.map