import type { SynthEvent, PartitionedEvent } from "../types/index.js"; /** Module-private authorization token for EventStore writes. * Only createGuardedEventStore can obtain it, ensuring writes flow * through the single mutation authority. */ export declare const EVENT_STORE_WRITE_TOKEN: unique symbol; export declare class EventStore { private filePath; private authorized; constructor(filePath?: string, authToken?: symbol); /** Return the canonical event log path, or undefined for in-memory stores. */ getFilePath(): string | undefined; /** Return the directory containing the event log, or undefined for in-memory stores. */ getDataDir(): string | undefined; /** Create an authorized EventStore instance for the guarded wrapper. */ static createAuthorized(filePath?: string): EventStore; protected ensureAuthorized(): void; initialize(): Promise; append(event: SynthEvent, _authToken?: symbol): Promise; appendBatch(events: SynthEvent[], _authToken?: symbol): Promise; loadAll(): Promise; count(): Promise; getLastEvent(): Promise; } /** In-memory event store (memory persistence mode). * Never touches the filesystem: `persistence: "memory"` must not fall * back to the default canonical log path (EXP-HARDEN-006). Carries the * same write authorization as the file-backed store, so ExecutionGate * remains the single mutation authority. */ export declare class InMemoryEventStore extends EventStore { private events; constructor(); getFilePath(): string | undefined; initialize(): Promise; append(event: SynthEvent, _authToken?: symbol): Promise; appendBatch(events: SynthEvent[], _authToken?: symbol): Promise; loadAll(): Promise; count(): Promise; getLastEvent(): Promise; } export declare const PARTITION_STORE_WRITE_TOKEN: unique symbol; export declare const SEGMENT_STORE_WRITE_TOKEN: unique symbol; export declare class PartitionStore { static createAuthorized(partitionCount?: number, baseDir?: string): PartitionStore; private baseDir; private partitionCount; private authorized; constructor(partitionCount?: number, baseDir?: string, authToken?: symbol); initialize(): Promise; private filePath; route(key: string): number; protected ensureAuthorized(): void; append(partition: number, event: PartitionedEvent): Promise; readPartition(partition: number): Promise; readAll(): Promise; getLastOffset(partition: number): Promise; } export declare class SegmentStore { static createAuthorized(maxSegmentSize?: number, baseDir?: string): SegmentStore; private baseDir; private maxSegmentSize; private authorized; constructor(maxSegmentSize?: number, baseDir?: string, authToken?: symbol); private segmentDir; private segmentPath; private getCurrentSegmentId; protected ensureAuthorized(): void; append(partition: number, event: PartitionedEvent): Promise; readSegment(partition: number, segmentId: string): Promise; readPartition(partition: number): Promise; }