/** * run-yaml.ts * * Implements the pwpilot_run_yaml MCP tool. * * Execute a test directly from its YAML definition — no .spec.ts required. * The YAML test definition is a portable, self-describing file generated * alongside every test by pwpilot_save_test. It contains all the * information needed to run the test: locators (with fallbacks for healing), * actions, assertions, and timeouts. * * This tool accepts either: * - testName: looks up /yaml/.yaml automatically * - yamlPath: an explicit absolute path to any .yaml file * * Role in the overall flow: * pwpilot_save_test → YAML file on disk * pwpilot_run_yaml → runYaml() → YamlExecutor.runFromFile() → YamlExecutionReport */ import { z } from 'zod'; import { YamlExecutionReport } from '../../types'; /** * Zod schema for validating the input to run_yaml. * Either testName or yamlPath must be provided. */ export declare const RunYamlSchema: z.ZodObject<{ testName: z.ZodOptional; yamlPath: z.ZodOptional; headless: z.ZodDefault>; }, "strip", z.ZodTypeAny, { headless: boolean; testName?: string | undefined; yamlPath?: string | undefined; }, { testName?: string | undefined; headless?: boolean | undefined; yamlPath?: string | undefined; }>; /** Input type inferred from RunYamlSchema. */ export type RunYamlInput = z.infer; /** * Resolve and execute a YAML test definition. * * If yamlPath is not provided, the YAML file is resolved from testName * by looking in /yaml/.yaml. * * @param input - Validated input: optional testName or yamlPath, and headless flag. * @param artifactsDir - Root artifacts directory used to resolve testName to a file path. * @returns A YamlExecutionReport with overall status and per-step results. * @throws Error if neither testName nor yamlPath is provided, or if the file does not exist. */ export declare function runYaml(input: RunYamlInput, artifactsDir: string): Promise; //# sourceMappingURL=run-yaml.d.ts.map