histoire
Version:
A fast story book powered by Vite
38 lines • 2.09 kB
TypeScript
import type { HistoireVisualApprovalReceipt, HistoireVisualRunSummary, UiVisualResult } from '@histoire/shared';
import type { ResolvedVisualConfig } from './config.js';
import type { VisualSource } from './source.js';
import { createVisualReportQueue } from './report-queue.js';
/** Browser-owned handles bind historical evidence to current generation, never another socket. */
export declare function createVisualReviewSession(current: () => {
source: VisualSource;
config: ResolvedVisualConfig;
}, sharedReports?: ReturnType<typeof createVisualReportQueue>): {
/** Browser recovery validates only requested page instead of entire historical collection. */
recoverPage(offset?: number): Promise<{
results: UiVisualResult[];
total: number;
nextOffset?: number;
issues: string[];
}>;
/** Recover historical evidence without launching browser or running a story. */
recover(): Promise<{
results: UiVisualResult[];
issues: string[];
}>;
/** Claim own live results, preserving cancelled outcomes without recovery authority. */
claim(run: HistoireVisualRunSummary, offset?: number, limit?: number): Promise<UiVisualResult[]>;
/** Track owned work so teardown joins persistence before draining derived reports. */
approve(selections: {
handle: string;
resultId: string;
}[], observe?: (receipts: HistoireVisualApprovalReceipt[]) => void | Promise<void>): Promise<HistoireVisualApprovalReceipt[]>;
/** Explicit flush keeps Node/CLI and tests able to await derived reports. */
flushReports: () => Promise<void>;
/** Derived-report failure never changes an already committed approval receipt. */
reportIssues: () => string[];
/** Only registered opaque artifacts may be served by current HTTP generation. */
artifact(runId: string, resultId: string, kind: 'baseline' | 'current' | 'diff'): string;
/** Socket retirement revokes all handles, without deleting durable cache. */
close(): Promise<void>;
};
//# sourceMappingURL=review-session.d.ts.map