import { a as PersistedValue } from "../types-nm947ViN.mjs"; import { f as WorkflowInputMap, p as WorkflowStepsMap, t as AnyWorkflow } from "../workflow-Cic2yHNB.mjs"; //#region src/test/index.d.ts /** The result of a single step, discriminated by status. */ type StepOutput = { status: 'completed'; output: T; error: null; } | { status: 'failed'; output: null; error: string; }; /** The result of running a workflow to completion via `testEngine.run()`. */ interface RunResult = Record> { status: 'completed' | 'failed'; /** Step results keyed by step name, with typed outputs. */ steps: { [K in keyof TSteps]: StepOutput }; } /** A test-only engine that runs workflows synchronously with in-memory storage. */ interface TestEngine = Record, TStepsMap extends Record> = Record>> { run(workflowName: TName, input: TInputMap[TName]): Promise>>; } /** * Create a test engine with in-memory storage. Runs a workflow to completion in a single `tick()` * and returns typed step results. * * @example * ```ts * const te = testEngine({ workflows: [myWorkflow] }) * const result = await te.run('my-workflow', { id: '123' }) * expect(result.status).toBe('completed') * ``` */ declare function testEngine(config: { workflows: TWorkflows; }): TestEngine, WorkflowStepsMap>; //#endregion export { RunResult, StepOutput, TestEngine, testEngine }; //# sourceMappingURL=index.d.mts.map