UNPKG

@sethdouglasford/claude-flow

Version:

Claude Code Flow - Advanced AI-powered development workflows with SPARC methodology

136 lines 3.81 kB
/** * Simplified Advanced Memory Management * Removed complex indexing, compression, and overengineered features */ import { EventEmitter } from "node:events"; import { ILogger } from "../core/logger.js"; export interface MemoryEntry { id: string; key: string; value: unknown; type: string; namespace: string; owner: string; createdAt: Date; updatedAt: Date; } export interface QueryOptions { namespace?: string; type?: string; owner?: string; keyPattern?: string; limit?: number; tags?: string[]; offset?: number; fullTextSearch?: string; } export interface ExportOptions { format?: "json" | "csv"; pretty?: boolean; } export interface ImportOptions { overwrite?: boolean; merge?: boolean; } export interface CleanupOptions { dry?: boolean; maxAge?: number; namespace?: string; } export declare class AdvancedMemoryManager extends EventEmitter { private storage; private storageDir; private logger?; private persisted; constructor(config?: { storageDir?: string; logger?: ILogger; persistenceEnabled?: boolean; }); initialize(): Promise<void>; store(key: string, value: unknown, options?: { type?: string; namespace?: string; owner?: string; }): Promise<string>; get(keyOrId: string): Promise<unknown>; query(options?: QueryOptions): MemoryEntry[]; update(keyOrId: string, value: unknown): Promise<boolean>; delete(keyOrId: string): Promise<boolean>; clear(namespace?: string): Promise<number>; getStatistics(): { totalEntries: number; namespaces: string[]; types: string[]; overview: { totalEntries: number; namespaces: string[]; types: string[]; }; distribution: { byNamespace: Record<string, unknown>; byType: Record<string, unknown>; byOwner: Record<string, unknown>; }; temporal: { oldestEntry: null; newestEntry: null; totalDuration: number; activityPeriods: unknown[]; inactivePeriods: unknown[]; }; performance: { averageQueryTime: number; averageWriteTime: number; cacheHitRate: number; indexEfficiency: number; }; health: { status: string; fragmentation: number; memoryUsage: number; diskUsage: number; errors: number; warnings: number; }; optimization: { suggestions: unknown[]; potentialSavings: number; recommendedActions: number; lastOptimized: null; }; }; export(options?: ExportOptions): string; import(data: string, options?: ImportOptions): Promise<{ imported: number; skipped: number; conflicts: Array<{ entry: MemoryEntry; reason: string; }>; }>; cleanup(options?: CleanupOptions): Promise<{ removed: number; actions: Array<{ type: string; id?: string; reason?: string; message?: string; }>; }>; retrieve(keyOrId: string): Promise<MemoryEntry | undefined>; deleteEntry(keyOrId: string): Promise<boolean>; listNamespaces(): string[]; listTypes(): string[]; listTags(): string[]; updateConfiguration(config: Record<string, unknown>): void; getConfiguration(): { storageDir: string; persisted: boolean; entriesCount: number; }; private isValidMemoryEntry; private loadFromDisk; private saveToDisk; } //# sourceMappingURL=advanced-memory-manager.d.ts.map