import { MemoryStore } from "../storage/memory-store.js"; import { MemoryEmbeddingStore } from "../storage/memory-embedding-store.js"; import type { Memory, MemoryCategory, MemoryKind } from "../types/index.js"; export interface WorkspaceMemoryHandle { name: string; dbPath: string; memoryStore: MemoryStore; memoryEmbeddingStore: MemoryEmbeddingStore; close: () => void; } export declare function workspaceMemoryDir(name: string): string; export declare function workspaceMemoryDb(name: string): string; /** * Open (creating if necessary) a workspace memory DB. The first call * for a given workspace name creates the directory + applies the * schema. Subsequent calls reuse the file. */ export declare function openWorkspaceMemory(name: string): WorkspaceMemoryHandle; export declare function workspaceMemoryExists(name: string): boolean; /** * Discover the workspace (if any) that contains the given project path. * Used by MCP tools so `sverklo_remember scope:workspace` knows where * to write without the user having to pass a workspace name. * * Match rule: the project path is exactly one of the workspace's * repos[].path, OR it lives under one of them. First match wins. * Returns null when no registered workspace contains this project. */ export declare function findWorkspaceForPath(projectPath: string): string | null; export interface AddOptions { content: string; category?: MemoryCategory; kind?: MemoryKind; tags?: string[]; } export declare function addWorkspaceMemory(ws: WorkspaceMemoryHandle, opts: AddOptions): number; /** * FTS-only search over the workspace memory store. Vector search is * available too via memoryEmbeddingStore.findTopK once embeddings are * populated; this CLI keeps it simple by sticking to FTS so users * don't need the ONNX model warm just to grep the team's decisions. */ export declare function searchWorkspaceMemory(ws: WorkspaceMemoryHandle, query: string, limit?: number): Memory[];