UNPKG

donobu

Version:

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

35 lines 1.75 kB
import type { EnvPick } from 'env-struct'; import type { env } from '../../envVars'; import { PersistencePluginRegistry } from '../PersistencePlugin'; import type { SuitesPersistence } from './SuitesPersistence'; /** * A persistence layer paired with its `PERSISTENCE_PRIORITY` key. See * {@link FlowsPersistenceLayer} for why keys must align across registries. */ export interface SuitesPersistenceLayer { key: string; persistence: SuitesPersistence; } export interface SuitesPersistenceRegistry { /** Returns the primary persistence layer. */ get(): Promise<SuitesPersistence>; /** Returns all valid persistence layers. Guaranteed to be non-empty. */ getAll(): Promise<SuitesPersistence[]>; /** Returns all valid layers paired with their `PERSISTENCE_PRIORITY` key. */ getEntries(): Promise<SuitesPersistenceLayer[]>; /** * Returns the persistence layer registered under the given * `PERSISTENCE_PRIORITY` key, or undefined if no such layer exists. */ getByKey(key: string): Promise<SuitesPersistence | undefined>; } export declare class SuitesPersistenceRegistryImpl implements SuitesPersistenceRegistry { private readonly layers; constructor(layers: SuitesPersistenceLayer[]); static fromEnvironment(environ: EnvPick<typeof env, 'DONOBU_API_BASE_URL' | 'DONOBU_API_KEY' | 'DONOBU_PERSISTENCE_API_KEY' | 'PERSISTENCE_PRIORITY'>, persistencePlugins?: PersistencePluginRegistry): Promise<SuitesPersistenceRegistryImpl>; get(): Promise<SuitesPersistence>; getAll(): Promise<SuitesPersistence[]>; getEntries(): Promise<SuitesPersistenceLayer[]>; getByKey(key: string): Promise<SuitesPersistence | undefined>; } //# sourceMappingURL=SuitesPersistenceRegistry.d.ts.map