import type { Context } from "../../context.ts"; import { type ForkDestinationSnapshot, type ForkSourceSnapshot } from "../fork.ts"; import type { CommitResult, Entry, EntryScan, EntryStructure, SessionStats, Storage, StorageBranchScan, UsageRow, UsageScan, Write } from "../types.ts"; import type { ListElement, ListReadOptions, StoredValue, Value, ValueList } from "../values.ts"; import { type JsonlStorageHeader, type JsonlStorageOptions } from "./types.ts"; /** JSONL storage backed by an injected filesystem capability. */ export declare class JsonlStorage implements Storage { private readonly fileSystem; private readonly path; private readonly now; readonly header: JsonlStorageHeader; private backing; private readonly storageState; private commitQueue; private state; private closePromise; private constructor(); static create(options: JsonlStorageOptions, header: JsonlStorageHeader, initialWrites: Write[], context: Context): Promise; /** Atomically create storage from a complete prepared snapshot. */ static createFromForkSnapshot(options: JsonlStorageOptions, header: JsonlStorageHeader, snapshot: ForkDestinationSnapshot, context: Context): Promise; static open(options: JsonlStorageOptions, context: Context): Promise; private static openLegacyV3; private replayCommitted; commit(writes: Write[], context: Context): Promise; private applyCommit; private upgradeLegacyV3ToV4; getEntries(ids: string[], _context: Context): Promise>; getValue(address: Value, _context: Context): Promise | undefined>; scanValues(prefix: Value, _context: Context): Promise[]>; readList(address: ValueList, options: ListReadOptions | undefined, _context: Context): Promise[]>; scanBranch(query: StorageBranchScan, _context: Context): Promise; scanBranchStructure(query: StorageBranchScan, _context: Context): Promise; scanEntries(query: EntryScan, _context: Context): Promise; scanUsage(query: UsageScan, _context: Context): Promise; getStats(_context: Context): Promise; private withImportedUsage; /** Capture the state needed to fork at one serialized boundary between commits. */ captureForkSource(_context: Context): Promise; close(_context: Context): Promise; } //# sourceMappingURL=storage.d.ts.map