/** * Memory MCP Tools for CLI - V3 with sql.js/HNSW Backend * * UPGRADED: Now uses the advanced sql.js + HNSW backend for: * - 150x-12,500x faster semantic search * - Vector embeddings with cosine similarity * - Persistent SQLite storage (WASM) * - Backward compatible with legacy JSON storage (auto-migrates) * * @module v3/cli/mcp-tools/memory-tools */ import { type MCPTool } from './types.js'; export declare const DANGEROUS_KEY_PATTERN: RegExp; /** * #3570: the one key rule for every memory write path (MCP store, CLI store, * import). Plain `/` stays legal (`probe/x`); traversal and shell metacharacters * do not. Returns the error message, or null when the key is acceptable. */ export declare function memoryKeyError(key: string): string | null; export declare const MEMORY_SCOPES: readonly ["project", "local", "user"]; export type MemoryScope = typeof MEMORY_SCOPES[number]; export declare const SCOPED_NAMESPACE_PREFIX = "agent-memory"; export type ScopedNamespace = { ok: true; namespace: string; scope?: MemoryScope; agentId?: string; } | { ok: false; error: string; }; /** * Resolve the namespace a memory operation actually reads or writes. * `scope`/`agentId` absent → `namespace` unchanged. Otherwise both are * validated and the result is the prefixed form, itself run through the * namespace validator so the stored namespace stays exportable and purgeable. */ export declare function resolveScopedNamespace(opts: { scope?: unknown; agentId?: unknown; namespace: string; }): ScopedNamespace; /** Inverse of resolveScopedNamespace; null for an unscoped namespace. */ export declare function parseScopedNamespace(stored: string): { scope: MemoryScope; agentId: string; namespace: string; } | null; export declare const memoryTools: MCPTool[]; //# sourceMappingURL=memory-tools.d.ts.map