/** * metadata-manager.ts * * Responsible for persisting and loading test intent data and healing logs * to/from the artifacts directory on disk. * * A "TestIntent" is the canonical representation of what a test should do — * its name, URL, and ordered list of natural-language steps. Intents are saved * when a test is first generated and loaded again at execution time. * * Healing logs capture what happened when a step failed and how it was (or * wasn't) repaired, giving developers a history of locator drift over time. * * Role in the overall flow: * generate_test → save_test → MetadataManager.saveIntent() * execute_test → MetadataManager.loadIntent() * heal_test → MetadataManager.saveHealingLog() */ import { TestIntent } from '../types'; /** * Manages reading and writing of test intent JSON files and healing log files * inside the configured artifacts directory. */ export declare class MetadataManager { private artifactsDir; /** * @param artifactsDir - Root directory where all artifacts (intents, healing logs, etc.) are stored. */ constructor(artifactsDir: string); /** * Serialize a TestIntent to disk as a JSON file. * The file is placed in /intents/.json where slug is * derived from the intent's name. * * @param intent - The test intent object to persist. * @returns The absolute path of the file that was written. */ saveIntent(intent: TestIntent): Promise; /** * Write a healing log entry to disk. * Healing logs record the outcome of every healing attempt (which strategies * were tried, what locator was repaired, and whether healing succeeded). * Each call creates a new timestamped file so the full history is preserved. * * @param testName - The name of the test whose step failed. * @param log - Any object describing the healing attempt outcome. */ saveHealingLog(testName: string, log: object): Promise; /** * Load a previously saved TestIntent from disk. * Returns null if no intent has been saved for the given name yet. * * @param name - The human-readable test name (e.g. "empty login validation"). * @returns The TestIntent object, or null if the file does not exist. */ loadIntent(name: string): Promise; /** * Convert a human-readable name into a safe filename slug. * Converts to lowercase, replaces whitespace with hyphens, and strips * any characters that are not alphanumeric or hyphens. * * @param name - The name to slugify. * @returns A lowercase, hyphen-separated slug safe for use in file names. */ private slug; } //# sourceMappingURL=metadata-manager.d.ts.map