import type { DocumentTree, TreeUnit } from './types.js'; /** A stored tree without its nodes — what listing and document selection need. */ export interface DocumentTreeHeader { documentId: string; title?: string; description?: string; structure: DocumentTree['structure']; fingerprint: string; unitCount: number; metadata?: Record; source?: string; builtAt: string; } /** * Where navigation trees live: one tree per document plus the units (pages/sections) its node * ranges point at, so navigation can read a node's text without going back to the source file. * * `filter` has **exactly** the vector stores' semantics (see `VectorStore`): every key must match * the tree's `metadata`, an array value is match-any, and an empty array denies. It is an access * boundary — a navigator given a tenant filter must not read another tenant's tree — so every read * that takes one applies it. `readUnits` takes none: call it only for a tree a filtered `get` just * returned (which is what the navigator does). */ export interface DocumentTreeStore { /** Store (replace) a document's tree and units. */ put(tree: DocumentTree, units: TreeUnit[]): Promise; /** A document's tree, when it exists **and** passes `filter`. */ get(documentId: string, filter?: Record): Promise; /** The trees of those of `documentIds` that exist and pass `filter` (any order). */ getMany(documentIds: readonly string[], filter?: Record): Promise; /** Headers (no nodes) of every tree passing `filter`, or of the listed `documentIds` only. */ list(options?: { filter?: Record; documentIds?: readonly string[]; limit?: number; }): Promise; /** Units `start..end` (inclusive) of a document, in order. */ readUnits(documentId: string, start: number, end: number): Promise; /** Drop a document's tree and units. Unknown ids are a no-op. */ remove(documentId: string): Promise; } export declare function headerOf(tree: DocumentTree): DocumentTreeHeader; /** An in-process {@link DocumentTreeStore} — tests, and single-process apps with small corpora. */ export declare class MemoryDocumentTreeStore implements DocumentTreeStore { private readonly trees; put(tree: DocumentTree, units: TreeUnit[]): Promise; get(documentId: string, filter?: Record): Promise; getMany(documentIds: readonly string[], filter?: Record): Promise; list(options?: { filter?: Record; documentIds?: readonly string[]; limit?: number; }): Promise; readUnits(documentId: string, start: number, end: number): Promise; remove(documentId: string): Promise; } //# sourceMappingURL=store.d.ts.map