/** * Memory CLI service - encapsulates all memory CLI command logic. */ import type { IEnvConfig } from '../utils/env'; import type { ILogger } from '../utils/interfaces/ILogger'; import type { ICache } from '../utils/cache'; import type { IMemoryService, IMemoryLoadResult, IMemoryAddResult, IMemoryExpireResult, IMemoryCleanupResult, IMemoryConflictsResult, IMemoryDedupeResult, IMemoryCurateResult, IMemoryConsolidateResult } from './interfaces'; /** CLI result union for all memory commands. */ export type MemoryCliResult = IMemoryLoadResult | IMemoryAddResult | IMemoryExpireResult | IMemoryCleanupResult | IMemoryConflictsResult | IMemoryDedupeResult | IMemoryCurateResult | IMemoryConsolidateResult; /** * Parsed memory CLI arguments. */ export interface IMemoryCliArgs { command: string; payload: string; explicitGroup: string | null; query: string; limit: number; explicitTag: string | null; entityType: string | null; source: string; since: string | null; until: string | null; lifecycle: string | null; ttl: string | null; dryRun: boolean; uuid: string | null; topic: string | null; minSimilarity: number | null; mark: string | null; action: string | null; retain: string | null; mergedText: string | null; } /** * Dependencies for MemoryCliService. */ export interface IMemoryCliDependencies { env: IEnvConfig; logger: ILogger; cache: ICache; memoryService: IMemoryService; resolveTag: (text: string, explicitTag: string | null, entityType: string | null) => string | undefined; } /** * Memory CLI service interface. */ export interface IMemoryCliService { run(args: IMemoryCliArgs): Promise; } /** * Parse a human-readable TTL duration string into milliseconds. * * Supported formats: * - `30s` / `30sec` → 30 seconds * - `5m` / `5min` → 5 minutes * - `2h` / `2hr` → 2 hours * - `7d` → 7 days * - `1w` → 1 week * - Plain number → treated as milliseconds * * @returns milliseconds, or null if the string is not a valid duration */ export declare function parseTtlDuration(input: string): number | null; /** * Creates a memory CLI service instance. */ export declare function createMemoryCliService(deps: IMemoryCliDependencies): IMemoryCliService; //# sourceMappingURL=MemoryCliService.d.ts.map