import type { MemoryEmbeddingProvider } from './memory-embedding.js'; export declare const MEMORY_INDEX_CHAR_SOFT_LIMIT = 50000; export type MemorySource = 'memory' | 'sessions'; export type MemoryWriteValidation = { ok: true; } | { ok: false; reason: string; }; export declare function validateMemoryWriteContent(content: string): MemoryWriteValidation; /** * Redact secret-shaped substrings from free text (e.g. a user message pasted * into a conversation) by replacing each match with `[redacted]`. Used by * skill-learning to sanitize userMessage/assistantText before persisting a * SKILL.md draft, so a pasted API key does not land in `.moss/skills/`. * Shares the canonical {@link MEMORY_SECRET_PATTERNS} with * {@link validateMemoryWriteContent} so the two cannot drift. * @public */ export declare function redactSecretsInText(text: string): string; export declare function buildMemorySearchQueryVariants(query: string): string[]; export type MemoryScope = 'workspace' | 'user' | 'device' | 'learning'; export declare const LEARNING_TOPIC_SLUGS: readonly ["usb", "ros", "hbm", "deploy", "network", "vision", "general", "other"]; export type LearningTopicSlug = (typeof LEARNING_TOPIC_SLUGS)[number]; export interface MemoryEntry { id: string; content: string; source: MemorySource; path?: string; hash: string; createdAt: number; scope?: MemoryScope; scopeRef?: string; pinned?: boolean; topic?: string; starred?: boolean; accessedAt?: number; accessCount?: number; stale?: boolean; } export interface MemorySearchResult { entry: MemoryEntry; score: number; snippet: string; } export declare class MemoryManager { private embeddingProvider?; private baseDir; private entries; private loaded; private _writeChain; private embeddingMap; private invertedIndex; constructor(baseDir?: string, embeddingProvider?: MemoryEmbeddingProvider | undefined); private get indexPath(); load(): Promise; private save; private saveEmbeddings; private pruneOrphanEmbeddings; private hashContent; private extractTerms; private buildInvertedIndex; private addToIndex; private removeFromIndex; add(content: string, source?: MemorySource, filePath?: string, options?: { scope?: MemoryScope; scopeRef?: string; pinned?: boolean; topic?: string; starred?: boolean; }): Promise; update(id: string, patch: Partial>): Promise; togglePinned(id: string, pinned: boolean): Promise; listByScope(scope: MemoryScope, scopeRef?: string): Promise; buildDigest(options?: { maxEntries?: number; maxChars?: number; scopes?: MemoryScope[]; deviceId?: string; projectHash?: string; }): Promise; search(query: string, limit?: number, options?: { scope?: MemoryScope | MemoryScope[]; scopeRef?: string; }): Promise; private touchAccessed; expireStaleEntries(maxAgeDays: number, hardDeleteAfterDays?: number): Promise; getApproxIndexCharCount(): Promise; getById(id: string): Promise; syncFromFiles(): Promise; delete(id: string): Promise; getAll(): Promise; clear(): Promise; } //# sourceMappingURL=memory-manager.d.ts.map