UNPKG

agentic-qe

Version:

Agentic Quality Engineering Fleet System - AI-driven quality management platform

88 lines 2.71 kB
import { SwarmMemoryManager, StoreOptions, RetrieveOptions } from './SwarmMemoryManager'; export interface VersionEntry { key: string; value: any; version: number; timestamp: number; checksum: string; partition?: string; metadata?: Record<string, any>; } export interface VersionStoreOptions extends StoreOptions { metadata?: Record<string, any>; } export interface VersionRetrieveOptions extends RetrieveOptions { includeExpired?: boolean; } /** * VersionHistory - Manages version history for memory entries * * Features: * - Stores last 10 versions of each entry * - Checksum validation for data integrity * - Rollback to previous versions * - Version metadata tracking * - Partition support */ export declare class VersionHistory { private memoryManager; private static readonly MAX_VERSIONS; private static readonly VERSION_PARTITION_PREFIX; constructor(memoryManager: SwarmMemoryManager); /** * Calculate SHA-256 checksum for data */ private calculateChecksum; /** * Get version partition key */ private getVersionPartition; /** * Get version storage key */ private getVersionKey; /** * Store a new version */ store(key: string, value: any, options?: VersionStoreOptions): Promise<number>; /** * Get version history for a key */ getHistory(key: string, options?: VersionRetrieveOptions): Promise<VersionEntry[]>; /** * Get specific version by timestamp */ getVersion(key: string, timestamp: number, options?: VersionRetrieveOptions): Promise<VersionEntry | null>; /** * Get latest version */ getLatest(key: string, options?: VersionRetrieveOptions): Promise<VersionEntry | null>; /** * Rollback to a specific version */ rollback(key: string, timestamp: number, options?: StoreOptions): Promise<void>; /** * Validate checksum for a version */ validateChecksum(key: string, timestamp: number, options?: VersionRetrieveOptions): Promise<boolean>; /** * Get version count for a key */ getVersionCount(key: string, options?: VersionRetrieveOptions): Promise<number>; /** * Delete all versions for a key */ deleteHistory(key: string, options?: { partition?: string; }): Promise<void>; /** * Compare two versions */ compareVersions(key: string, timestamp1: number, timestamp2: number, options?: VersionRetrieveOptions): Promise<{ version1: VersionEntry | null; version2: VersionEntry | null; identical: boolean; checksumMatch: boolean; }>; } //# sourceMappingURL=VersionHistory.d.ts.map