UNPKG

fast-filesystem-mcp

Version:

Fast Filesystem MCP Server - Advanced file operations with Auto-Chunking, Sequential Reading, complex file operations (copy, move, delete, batch, compress), optimized for Claude Desktop

87 lines 2.85 kB
export interface ContinuationToken { type: 'read_file' | 'list_directory' | 'search_files' | 'search_code'; path: string; line_start?: number; byte_offset?: number; page?: number; last_item?: string; last_file?: string; last_position?: number; file_index?: number; chunk_id: string; timestamp: number; params: any; } export declare class ResponseSizeMonitor { private currentSize; private readonly maxSize; private readonly warningThreshold; constructor(maxSizeMB?: number); reset(): void; estimateSize(obj: any): number; addContent(content: any): boolean; canAddContent(content: any): boolean; isNearLimit(): boolean; getCurrentSize(): number; getMaxSize(): number; getRemainingSize(): number; getSizeInfo(): { current_size: number; max_size: number; remaining_size: number; usage_percentage: number; is_near_limit: boolean; }; } export declare class ContinuationTokenManager { private tokens; private readonly TOKEN_EXPIRY_MS; generateToken(type: ContinuationToken['type'], path: string, params: any): string; getToken(tokenId: string): ContinuationToken | null; updateToken(tokenId: string, updates: Partial<ContinuationToken>): boolean; deleteToken(tokenId: string): boolean; private cleanupExpiredTokens; getActiveTokenCount(): number; } export declare class AutoChunkingHelper { static chunkArray<T>(items: T[], monitor: ResponseSizeMonitor, estimateItemSize: (item: T) => any): { chunks: T[]; hasMore: boolean; remainingItems: T[]; }; static chunkTextByLines(text: string, monitor: ResponseSizeMonitor, startLine?: number): { content: string; hasMore: boolean; nextStartLine: number; totalLines: number; }; static chunkByBytes(buffer: Buffer, monitor: ResponseSizeMonitor, startOffset?: number, encoding?: BufferEncoding): { content: string; hasMore: boolean; nextOffset: number; bytesRead: number; }; } export interface ChunkedResponse { [key: string]: any; chunking: { has_more: boolean; continuation_token?: string; chunk_info: { current_chunk: number; estimated_total_chunks?: number; progress_percentage?: number; }; size_info: { current_size: number; max_size: number; usage_percentage: number; }; }; } export declare function createChunkedResponse(data: any, hasMore: boolean, monitor: ResponseSizeMonitor, continuationToken?: string, chunkInfo?: { current: number; total?: number; }): ChunkedResponse; export declare const globalTokenManager: ContinuationTokenManager; //# sourceMappingURL=auto-chunking.d.ts.map