UNPKG

donobu

Version:

Create browser automations with an LLM agent and replay them as Playwright scripts.

34 lines 1.78 kB
import type { EnvPersistence } from './env/EnvPersistence'; import type { FlowsPersistence } from './flows/FlowsPersistence'; import type { SuitesPersistence } from './suites/SuitesPersistence'; import type { TestsPersistence } from './tests/TestsPersistence'; /** * A persistence plugin provides factory functions for creating persistence * layer instances. Plugins are registered with a string key that corresponds * to entries in the PERSISTENCE_PRIORITY environment variable. * * Plugins are self-contained — they read their own configuration (environment * variables, config files, etc.) and return `null` from factory methods when * required configuration is missing. */ export interface PersistencePlugin { /** Return a FlowsPersistence instance, or null if required config is missing. */ createFlowsPersistence(): Promise<FlowsPersistence | null>; /** Return an EnvPersistence instance, or null if required config is missing. */ createEnvPersistence(): Promise<EnvPersistence | null>; /** Return a TestsPersistence instance, or null if required config is missing. */ createTestsPersistence?(): Promise<TestsPersistence | null>; /** Return a SuitesPersistence instance, or null if required config is missing. */ createSuitesPersistence?(): Promise<SuitesPersistence | null>; } /** * An immutable registry of persistence plugins, keyed by their config string. * Created once at startup and threaded through the application. */ export declare class PersistencePluginRegistry { private readonly plugins; constructor(plugins?: ReadonlyMap<string, PersistencePlugin>); /** Look up a registered persistence plugin by key. */ get(key: string): PersistencePlugin | undefined; } //# sourceMappingURL=PersistencePlugin.d.ts.map