import type { MessageId, SessionId } from '../../types/ids/index.js'; import type { MessageFeedbackStore } from './types.js'; /** * The feedback-store contract, as a suite either implementation runs. * * Two built-in stores that agree by inspection is not the same as two that * agree. The checkpoint stores diverged at exactly their enforcement point * once already — the in-memory one accepted a write the disk one refused, * and the class documented as "the reference a host reads" was the one * carrying the defect. Reading a reference cannot catch that; running it * can. * * The rules here are the ones no type states: that a stale write is refused * and changes nothing, that exactly one of two racing writers wins, that a * rating aimed at a message the session log does not hold is refused, and that * a listing answers for the session it was asked about and no other. * * Takes its runner as an argument for the same reason the checkpoint suite * does: this file imports no test framework, so the package gains no test * dependency from shipping it, and a caller can pass RECORDING functions * and run the whole contract as ordinary code. */ export interface FeedbackConformanceOptions { readonly describe: (name: string, body: () => void) => void; readonly it: (name: string, body: () => Promise | void) => void; readonly expect: (actual: unknown) => { toBe(expected: unknown): void; toEqual(expected: unknown): void; toHaveLength(n: number): void; }; readonly label: string; /** A fresh store, plus the ids its message check will accept. */ readonly makeStore: () => Promise<{ store: MessageFeedbackStore; sessionId: SessionId; knownMessageId: MessageId; /** Syntactically valid and absent from `sessionId`'s log. */ unknownMessageId: MessageId; otherSessionId: SessionId; otherKnownMessageId: MessageId; }>; } export declare function defineMessageFeedbackConformance(options: FeedbackConformanceOptions): void; //# sourceMappingURL=conformance.d.ts.map