import type { AuditClaimsOptions, PageAudit } from "./audit.js";
import type { ExplainOptions } from "./explain.js";
import type { ExplainResult, IngestOptions, IngestResult, MemoryDiff, MemoryPage, MemoryRoot, PageFrontmatter, QueryOptions, QueryResult, SearchHit, TokenStats } from "./types.js";
export type OpenMemoryOptions = {
    root: MemoryRoot;
    agent?: string;
};
export type StatusInfo = {
    pageCount: number;
    totalBytes: number;
    lastWriteAt: string | null;
    initialized: boolean;
};
export type AuditCallOptions = AuditClaimsOptions & {
    repoRoot: string;
};
export interface MemoryHandle {
    readonly root: MemoryRoot;
    listPages(): Promise<MemoryPage[]>;
    readPage(relPath: string): Promise<MemoryPage>;
    searchMemory(query: string): Promise<SearchHit[]>;
    statusOf(): Promise<StatusInfo>;
    computeTokenStats(): Promise<TokenStats>;
    explainPage(opts: ExplainOptions): Promise<ExplainResult>;
    writePage(relPath: string, body: string, opts: {
        reason: string;
        frontmatter?: PageFrontmatter;
    }): Promise<MemoryDiff>;
    appendToPage(relPath: string, content: string, opts: {
        reason: string;
    }): Promise<MemoryDiff>;
    clearMemory(): Promise<void>;
    query(opts: QueryOptions): Promise<QueryResult>;
    ingest(opts: IngestOptions): Promise<IngestResult>;
    auditClaims(opts: AuditCallOptions): Promise<PageAudit[]>;
}
export declare function openMemory(opts: OpenMemoryOptions): MemoryHandle;
