/** * @license * Copyright 2026 Qwen * SPDX-License-Identifier: Apache-2.0 */ import type { LiveMemoryAction, LiveMemoryState, LiveVisualSource } from '../host/types.js'; import { type MemoryConfig, type MemoryConnection, type MemoryLogger } from './config.js'; import { MemorySession } from './session.js'; import type { MemoryVisualFrame } from './observer.js'; export declare function persistMemoryPreferences(dataDir: string, patch: { enabled?: boolean; defaultId?: string; model?: string; visualEnabled?: boolean; }): MemoryConfig; export interface MemoryServiceOptions { config: MemoryConfig; dataDir: string; connection: MemoryConnection; log?: MemoryLogger; fetch?: typeof fetch; onChange?: () => void; } export declare class MemoryService { private readonly options; private config; private readonly store; private readonly embedder; private readonly backfillers; private readonly consolidation; private readonly finished; private readonly attachments; private libraries; private locked; private closed; private closing; private closePromise; private consolidationClosed; private error?; constructor(options: MemoryServiceOptions); get settings(): MemoryConfig; state(): LiveMemoryState; setLocked(locked: boolean): void; applyAction(action: LiveMemoryAction): LiveMemoryState; attach(options: { sessionId: string; visualSource: LiveVisualSource; captureVision: () => Promise; maxPromptChars?: number; }): MemorySession | undefined; finish(session: MemorySession): void; close(): Promise; private closeResources; private ensureSelected; private refreshLibraries; private reportFailure; }