import type Supermemory from "supermemory"; import type { ProfileResponse } from "supermemory/resources/top-level"; import { PathIndex } from "./path-index.js"; import { SessionCache, type SessionCacheOptions } from "./session-cache.js"; export type DocStatus = "done" | "failed" | "processing"; export interface DocResult { id: string; content: string | Uint8Array; status: DocStatus; errorReason?: string; virtual?: boolean; } export interface DocSummary { id: string; filepath: string; status: DocStatus; size: number; mtime: Date; content?: string; } export interface DocStat { id?: string; isFile: boolean; isDirectory: boolean; size: number; mtime: Date; status?: DocStatus; } export interface ListByPrefixOpts { withContent?: boolean; exact?: boolean; limit?: number; } export interface SearchResult { id: string; filepath?: string; memory?: string; chunk?: string; similarity: number; } export interface SearchResp { results: SearchResult[]; total?: number; timing?: number; } export interface RemoveByPrefixResult { deleted: number; errors: Error[]; } export interface SearchParams { q: string; filepath?: string; } export interface SupermemoryVolumeOptions { pathIndex?: PathIndex; cache?: SessionCache; cacheOptions?: SessionCacheOptions; } export declare class SupermemoryVolume { readonly client: Supermemory; readonly containerTag: string; readonly pathIndex: PathIndex; readonly cache: SessionCache; private allPathsCache; private lastConfiguredPaths; private static readonly ALL_PATHS_TTL_MS; private static readonly ALL_PATHS_HARD_CAP; static readonly PROFILE_PATH = "/profile.md"; constructor(client: Supermemory, containerTag: string, options?: SupermemoryVolumeOptions); private iterContainer; private lookupDocId; private filterArgFor; addDoc(path: string, content: string | Uint8Array): Promise<{ id: string; status: DocStatus; }>; updateDoc(path: string, content: string | Uint8Array): Promise<{ id: string; status: DocStatus; }>; getDoc(path: string): Promise; removeDoc(path: string): Promise; removeByPrefix(prefix: string): Promise; private evictSyntheticUnder; private removeByPrefixViaList; moveDoc(from: string, to: string): Promise; listByPrefix(prefix: string, opts?: ListByPrefixOpts): Promise; listAllPaths(): Promise; cachedAllPaths(): string[]; statDoc(path: string): Promise; markSyntheticDir(path: string): void; isDirEmpty(path: string): Promise; moveTree(src: string, dest: string): Promise<{ errors: Error[]; }>; copyTree(src: string, dest: string): Promise<{ errors: Error[]; }>; search(params: SearchParams): Promise; fetchProfile(): Promise; isReservedPath(path: string): boolean; configureMemoryPaths(paths: string[]): Promise; } export declare function formatProfile(resp: ProfileResponse): string; //# sourceMappingURL=volume.d.ts.map