import { type LeafEntry, type SessionMetadata, type SessionStorage, type SessionTreeEntry, type SessionWriteOptions } from "../harness/types.js"; /** Return the effective branch leaf after applying a session tree entry. */ export declare function leafIdAfterEntry(entry: SessionTreeEntry): string | null; export declare abstract class BaseSessionStorage implements SessionStorage { private readonly metadata; private readonly entries; private readonly byId; private readonly labelsById; private leafId; private readonly floorId; protected constructor(metadata: TMetadata, entries: SessionTreeEntry[], leafId?: string | null, opts?: { floorEntryId?: string | null; }); /** The bounded-window root this storage was woken with, or null for a full-tree load (F3). */ getFloorId(): string | null; getMetadata(): Promise; getLeafId(): Promise; protected createLeafEntry(leafId: string | null): LeafEntry; createEntryId(): Promise; /** * Optimistic-lock check (F2). Throws `SessionError("conflict")` when `opts.expectedLeafId` is * provided and does not match the current in-memory leaf. Concrete `appendEntry`/`setLeafId` * implementations call this before persisting; durable backends should instead perform the same * check atomically against shared state (a conditional write) so concurrent instances can't fork. */ protected assertExpectedLeaf(opts?: SessionWriteOptions): void; protected recordEntry(entry: SessionTreeEntry): void; getEntry(id: string): Promise; findEntries(type: TType): Promise>>; getLabel(id: string): Promise; getPathToRoot(leafId: string | null): Promise; getEntries(): Promise; abstract setLeafId(leafId: string | null, opts?: SessionWriteOptions): Promise; abstract appendEntry(entry: SessionTreeEntry, opts?: SessionWriteOptions): Promise; } //# sourceMappingURL=storage-base.d.ts.map