/** * Shared contract tests for {@link ConversationStreamStore} implementations. * * Store packages call {@link defineConversationStreamStoreContractTests} with * a factory that creates their backend. The tests exercise every method on * `ConversationStreamStore` with identical behavioral assertions regardless of * the underlying storage engine — batch atomicity, producer fencing via * epochs, idempotent redelivery, and offset catch-up reads. * * `subscribe` is a process-local notification seam: the suite only asserts * that appends made through the same store instance notify local listeners * and that unsubscribing stops further notifications. Cross-process fan-out * is deliberately out of contract — backends may no-op it. * * @example * ```ts * import { defineConversationStreamStoreContractTests } from '@fabric-harness/sdk/testing/contracts'; * * defineConversationStreamStoreContractTests('My backend', async () => ({ * store: await createMyStreamStore(), * close: async () => myBackend.close(), * })); * ``` */ import type { ConversationStreamStore } from './conversation-stream.js'; export interface ConversationStreamStoreContractHandle { /** The fresh store under test. */ store: ConversationStreamStore; /** Optional cleanup after the test (close connections, delete temp files). */ close?: () => Promise; } /** * Register the standard {@link ConversationStreamStore} contract tests under * the given describe label. Each test gets a fresh store from `factory()`. */ export declare function defineConversationStreamStoreContractTests(name: string, factory: () => Promise): void; //# sourceMappingURL=conversation-stream-contract.d.ts.map