import type { HistoireTarget, HistoireTestRunSummary } from '@histoire/protocol'; import type { HistoireRequestCapture } from '@histoire/sdk/internal'; import type { HistoireSerializedTestDefinition } from '@histoire/shared'; interface EmbedTestWorkersOptions { /** Element retaining hidden runtime documents for their complete test case. */ container: HTMLElement; /** Configured concurrent test case ceiling. */ maxWorkers: number; /** Per-case mount and execution deadline. */ timeoutMs: number; /** Creates the immutable sandbox URL for one exact target/document pair. */ createUrl: (target: HistoireTarget & { variantId: string; }, documentId: string) => string; /** Mints document identities compatible with the owning embed surface. */ createDocumentId: () => string; } /** * Schedules isolated hidden runtime documents for in-book test execution. * * A document is deliberately never reused: story modules and suite hooks can * retain mutable module state, so reuse would make parallel cases interfere. */ export declare function createEmbedTestWorkers(options: EmbedTestWorkersOptions): { run: (capture: HistoireRequestCapture, definitions: HistoireSerializedTestDefinition[]) => Promise; cancel: () => void; /** Cancelling a request or closing the visible runtime tears down only its hidden documents. */ close(): void; }; export {};