import type { SessionStore } from "../contracts.js"; export interface SessionStoreConformanceOptions { /** Stable session id used for the conformance run; defaults to "conformance". */ readonly sessionId?: string; /** Secondary session id for branch-isolation probes; defaults to "conformance-other". */ readonly otherSessionId?: string; /** * When true, also exercises the optional `readBranchPath` branch-reader path * and asserts it returns the ancestor chain in root-to-leaf order. Skipped * when the store does not implement `readBranchPath`. */ readonly exerciseReadBranchPath?: boolean; /** * When true, exercises optional `searchSessions`: invalid limit/query/kind rejection via * `resolveSessionSearchQuery` semantics, empty page, limit cap, a written-message query * round-trip (`entryId`/`runId`/`turn`/`snippet`), the `kind` filter, and ownership bounds. * Skipped when the store does not implement `searchSessions`. */ readonly exerciseSearchSessions?: boolean; /** When true, appends concurrent children of the same parent (fork allowed). */ readonly exerciseConcurrentParentAppend?: boolean; /** * When true, the factory is invoked again after writes to assert durable state * survives reopen (database adapters only). */ readonly exerciseReopen?: boolean; } export type SessionStoreConformanceFactory = () => SessionStore | Promise; /** * Assert that a `SessionStore` implementation satisfies the core adapter * contract: round-trip append/list, duplicate-entry-id rejection, * `expectedParentId` conflict (with nothing appended), `idempotencyKey` * deduplication, branching from any existing entry (not just the tip), and * distinct linear appends sharing a key are not collapsed. Throws on the first * violation; returns silently when the store conforms. */ export declare function assertSessionStoreConforms(store: SessionStore, options?: SessionStoreConformanceOptions): Promise; /** * Factory-based conformance entry point for durable adapters. Calls the factory * to obtain a store, runs the full contract, and optionally reopens through the * same factory to assert idempotency rows and entries survive restart. */ export declare function runSessionStoreConformance(factory: SessionStoreConformanceFactory, options?: SessionStoreConformanceOptions): Promise;