/** * execute-test.ts * * Implements the pwpilot_execute_test MCP tool. * * This tool looks up a previously generated TestIntent by name, loads it from * the artifacts directory, and passes it to the Executor for a full browser run. * The Executor handles step-by-step execution, self-healing on failures, and * returns an ExecutionReport when the run is complete. * * The test must have been previously saved via pwpilot_save_test before * it can be executed here. * * Role in the overall flow: * pwpilot_save_test → intent JSON on disk * pwpilot_execute_test → executeTest() → Executor.run() → ExecutionReport */ import { z } from 'zod'; import { Executor } from '../../execution/executor'; import { MetadataManager } from '../../artifacts/metadata-manager'; import { ExecutionReport } from '../../types'; /** * Zod schema for validating the input to execute_test. * Requires the name of the test intent to look up and run. */ export declare const ExecuteTestSchema: z.ZodObject<{ name: z.ZodString; }, "strip", z.ZodTypeAny, { name: string; }, { name: string; }>; /** Input type inferred from ExecuteTestSchema. */ export type ExecuteTestInput = z.infer; /** * Execute a saved test intent end to end in a headed Chromium browser. * * Loads the TestIntent from disk by name, then delegates to the Executor which * runs each step, attempts healing on failures, and returns a full report. * * @param input - Validated input containing the test name to look up. * @param executor - The Executor instance that drives the browser run. * @param metadataManager - Used to load the saved TestIntent from disk. * @returns An ExecutionReport with overall status and per-step details. * @throws Error if no intent has been saved for the given test name. */ export declare function executeTest(input: ExecuteTestInput, executor: Executor, metadataManager: MetadataManager): Promise; //# sourceMappingURL=execute-test.d.ts.map