/** * Cursor IDE Usage Data Import * Downloads usage CSV via browser and parses it for vibetracking * * Flow: * 1. Open browser to Cursor's CSV export URL (user already logged in) * 2. Wait for CSV to appear in Downloads folder * 3. If not found, prompt user to drag-and-drop the file * 4. Copy CSV to cache location for Rust module to parse */ export interface CursorUsageRow { date: string; timestamp: number; model: string; inputWithCacheWrite: number; inputWithoutCacheWrite: number; cacheRead: number; outputTokens: number; totalTokens: number; apiCost: number; costToYou: number; } export interface CursorUsageData { source: "cursor"; model: string; providerId: string; messageCount: number; input: number; output: number; cacheRead: number; cacheWrite: number; reasoning: number; cost: number; } export interface CursorMessageWithTimestamp { source: "cursor"; model: string; providerId: string; timestamp: number; input: number; output: number; cacheRead: number; cacheWrite: number; reasoning: number; cost: number; } export interface CursorUnifiedMessage { source: "cursor"; modelId: string; providerId: string; sessionId: string; timestamp: number; date: string; tokens: { input: number; output: number; cacheRead: number; cacheWrite: number; reasoning: number; }; cost: number; } export interface CursorSyncResult { synced: boolean; rows: number; skipped?: boolean; error?: string; } /** * Check if Cursor IDE is installed on this system */ export declare function isCursorInstalled(): boolean; /** * Open browser to Cursor's CSV export page * The CSV will be downloaded automatically if user is logged in */ export declare function openCursorExportPage(): Promise; /** * Sync Cursor usage data via browser download * Opens browser to download CSV, waits for it, copies to cache */ export declare function syncCursorCache(): Promise; /** * Parse Cursor usage CSV into structured rows */ export declare function parseCursorCsv(csvText: string): CursorUsageRow[]; /** * Aggregate Cursor usage by model */ export declare function aggregateCursorByModel(rows: CursorUsageRow[]): CursorUsageData[]; /** * Convert Cursor CSV rows to timestamped messages for graph generation */ export declare function cursorRowsToMessages(rows: CursorUsageRow[]): CursorMessageWithTimestamp[]; /** * Get the cache file path */ export declare function getCursorCachePath(): string; /** * Check if cache exists and when it was last updated */ export declare function getCursorCacheStatus(): { exists: boolean; lastModified?: Date; path: string; }; /** * Clear cached Cursor CSV (local only) */ export declare function clearCursorCache(): { cleared: boolean; path: string; }; /** * Read cached Cursor messages for Rust module integration */ export declare function readCursorMessagesFromCache(): CursorUnifiedMessage[]; //# sourceMappingURL=cursor.d.ts.map