import { type ContextItem, type ContextItemInput, type ContextItemKind } from "./contextItem.js";
import type { SessionEvent } from "./types.js";
export type ContextSnapshot = {
    version: 1;
    sessionId: string;
    updatedAt: string;
    eventCount: number;
    autoCompactionEnabled: boolean;
    items: ContextItem[];
};
export declare class ContextStore {
    readonly workspace: string;
    readonly sessionId: string;
    private readonly contextDir;
    private readonly logPath;
    private readonly snapshotPath;
    constructor(options: {
        workspace: string;
        sessionId: string;
    });
    static workspaceContextPath(workspace: string, sessionId: string): string;
    static workspaceSnapshotPath(workspace: string, sessionId: string): string;
    append(input: ContextItemInput | ContextItem): Promise<ContextItem>;
    loadItems(): Promise<ContextItem[]>;
    snapshot(): Promise<ContextSnapshot>;
    pin(itemId: string): Promise<void>;
    unpin(itemId: string): Promise<void>;
    drop(itemId: string): Promise<void>;
    clear(options?: {
        includePinned?: boolean;
        kinds?: ContextItemKind[];
    }): Promise<void>;
    recordSummary(input: Omit<ContextItemInput, "kind" | "source"> & {
        source?: string;
    }): Promise<ContextItem>;
    resetSummaries(): Promise<void>;
    setAutoCompaction(enabled: boolean): Promise<void>;
    buildContextBlock(options?: {
        maxItems?: number;
        includeDropped?: boolean;
        title?: string;
    }): Promise<string>;
    bootstrapFromSession(events: SessionEvent[]): Promise<ContextItem[]>;
    private appendRecord;
    private readRecords;
    private readSnapshot;
    private writeSnapshot;
}
