/**
 * Memory CRUD + search handlers extracted from StdioServer.
 * Handles: memory.list, memory.read, memory.write, memory.search, memory.delete
 */
import { type AgentRpcError, type AgentRpcRequest } from "../../protocol/wire/index.js";
import type { MemoryHandlerProvider, ProjectMemoryStore, ProjectMemoryStoreFactory } from "../../runtime/ports/index.js";
import { type MemoryModelPurpose } from "../memory-candidate-service.js";
interface MemoryLlmClient {
    model: string;
    apiKey: string;
    transport: {
        stream(request: Record<string, unknown>, apiKey: string): AsyncIterable<{
            type: string;
            text?: string;
        }>;
    };
}
export interface MemoryHandlerHost {
    memdir: ProjectMemoryStore | null;
    memoryProvider?: MemoryHandlerProvider | null;
    memoryUserId?: string;
    projectMemoryStoreFactory: ProjectMemoryStoreFactory;
    projectLocator?: {
        resolveProjectRoot(projectId: string): string | undefined;
    };
    ensureMemoryProvider?(): void;
    getActiveProjectRoot(): string;
    resolveClientForPurpose?(purpose: MemoryModelPurpose): MemoryLlmClient | null;
    sendNotification(method: string, params: Record<string, unknown>): void;
    sendResponse(id: string | number, result?: unknown, error?: AgentRpcError): void;
}
export declare function handleMemoryList(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
/** memory.list-files: returns actual topic files from memdir. */
export declare function handleMemoryListFiles(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
/**
 * memory.atlas: returns full L2 vector-memory records (wire-safe, no embedding
 * blob) plus category roll-ups, for the 3D memory atlas visualization.
 */
export declare function handleMemoryAtlas(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
/**
 * memory.activity: daily activity counts + highlights over the recent window,
 * powering the atlas timeline ticks and the "memory digest" panel.
 */
export declare function handleMemoryActivity(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryObserve(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryPropose(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryConsolidate(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryRead(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryWrite(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemorySearch(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryDelete(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export declare function handleMemoryUpdate(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
/**
 * memory.attachment.adopt: persist an uploaded attachment into the long-term-memory
 * attachment store from a transient source URL (the gateway's temp MediaStore).
 * The attachment is an orphan until linked to a memory at consolidate time.
 */
export declare function handleMemoryAttachmentAdopt(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
/** memory.attachment.locate: resolve an attachment id to its on-disk path (for serving). */
export declare function handleMemoryAttachmentLocate(this: MemoryHandlerHost, msg: AgentRpcRequest): Promise<void>;
export {};
