donobu
Version:
Create browser automations with an LLM agent and replay them as Playwright scripts.
22 lines • 1.05 kB
TypeScript
export declare const PAGE_AI_CACHE_DIRNAME = ".cache-lock";
export declare const PAGE_AI_CACHE_FILE_EXTENSION = ".cache.js";
/**
* Computes the cache file path for a given source file that calls `page.ai`.
* Cache files live under a shared `.cache-lock` directory next to the source.
*/
export declare function buildPageAiCachePath(sourceFilepath: string): string;
/**
* Extracts the hostname from a URL string for use as the URL component of a
* page.ai cache key. Both `page.ai.act` and `page.ai.assert` use this so that
* their URL-keying strategy stays in sync.
*
* @example
* extractCacheKeyHostname('https://localhost:3000/flows/123') // → 'localhost'
* extractCacheKeyHostname('https://app.vercel.app/settings') // → 'app.vercel.app'
*/
export declare function extractCacheKeyHostname(url: string): string;
/**
* Returns the cache file path relative to the directory containing the source file.
*/
export declare function relativePageAiCachePathForSource(sourceFilepath: string): string;
//# sourceMappingURL=cacheLocator.d.ts.map