@ooples/token-optimizer-mcp
Version:
Intelligent context window optimization for Claude Code - store content externally via caching and compression, freeing up your context window for what matters
32 lines • 1.03 kB
TypeScript
/**
* Hashing utilities for cache invalidation and file tracking
*/
/**
* Generate a hash for file content
*/
export declare function hashContent(content: string | Buffer): string;
/**
* Generate a hash for a file
*/
export declare function hashFile(filePath: string): string;
/**
* Generate a hash that includes file metadata (size, mtime)
*/
export declare function hashFileWithMetadata(filePath: string): string;
/**
* Generate a lightweight hash based on file metadata only (fast)
*/
export declare function hashFileMetadata(filePath: string): string;
/**
* Generate a cache key from namespace and parameters
*/
export declare function generateCacheKey(namespace: string, params: Record<string, unknown>): string;
/**
* Check if two hashes match
*/
export declare function hashesMatch(hash1: string, hash2: string): boolean;
/**
* Generate a short hash (first 8 characters) for display purposes
*/
export declare function shortHash(content: string | Buffer): string;
//# sourceMappingURL=hash-utils.d.ts.map