UNPKG

donobu

Version:

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

84 lines 5.06 kB
import type { GptClientFactory } from '../clients/GptClientFactory'; import type { ControlPanelFactory } from '../models/ControlPanel'; import type { DonobuDeploymentEnvironment } from '../models/DonobuDeploymentEnvironment'; import type { AgentsPersistence } from '../persistence/agents/AgentsPersistence'; import type { EnvPersistenceVolatile } from '../persistence/env/EnvPersistenceVolatile'; import { type FlowsPersistenceRegistry } from '../persistence/flows/FlowsPersistenceRegistry'; import type { GptConfigsPersistence } from '../persistence/gptconfigs/GptConfigsPersistence'; import { type SuitesPersistenceRegistry } from '../persistence/suites/SuitesPersistenceRegistry'; import { type TestsPersistenceRegistry } from '../persistence/tests/TestsPersistenceRegistry'; import { TargetRuntimePluginRegistry } from '../targets/TargetRuntimePlugin'; import { AgentsManager } from './AgentsManager'; import { DonobuFlowsManager } from './DonobuFlowsManager'; import { EnvDataManager } from './EnvDataManager'; import { GptConfigsManager } from './GptConfigsManager'; import { SuitesManager } from './SuitesManager'; import { TestsManager } from './TestsManager'; import type { ToolRegistry } from './ToolRegistry'; export type DonobuStack = { toolRegistry: ToolRegistry; targetRuntimePlugins: TargetRuntimePluginRegistry; gptClientFactory: GptClientFactory; gptConfigsPersistence: GptConfigsPersistence; gptConfigsManager: GptConfigsManager; agentsPersistence: AgentsPersistence; agentsManager: AgentsManager; flowsPersistenceRegistry: FlowsPersistenceRegistry; flowsManager: DonobuFlowsManager; envDataManager: EnvDataManager; testsPersistenceRegistry: TestsPersistenceRegistry; testsManager: TestsManager; suitesPersistenceRegistry: SuitesPersistenceRegistry; suitesManager: SuitesManager; }; /** * Create a new Donobu application stack. * * NOTE: The reason why we have the oddball {@link envPersistenceVolatile} * parameter is because that can be used to hold a snapshot of the * real NodeJS process's environment variables, of which, we generally * should not do in hosted environments. However, if we are running * within the context of being a library used for running Playwright tests, * then having this snapshot is relevant so that tests can use normal * environment variables. */ export declare function setupDonobuStack(donobuDeploymentEnvironment: DonobuDeploymentEnvironment, controlPanelFactory: ControlPanelFactory, envPersistenceVolatile?: EnvPersistenceVolatile, environ?: import("env-struct").Env<{ BASE64_GPT_CONFIG: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; BROWSERBASE_API_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; BROWSERBASE_PROJECT_ID: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; DONOBU_API_BASE_URL: import("zod/v4").ZodDefault<import("zod/v4").ZodString>; ANTHROPIC_API_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; ANTHROPIC_MODEL_NAME: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; GOOGLE_GENERATIVE_AI_API_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; GOOGLE_GENERATIVE_AI_MODEL_NAME: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; OLLAMA_MODEL_NAME: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; OLLAMA_API_URL: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; OPENAI_API_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; OPENAI_API_MODEL_NAME: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; PERSISTENCE_PRIORITY: import("zod/v4").ZodDefault<import("zod/v4").ZodArray<import("zod/v4").ZodString>>; AWS_BEDROCK_MODEL_NAME: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; AWS_ACCESS_KEY_ID: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; AWS_SECRET_ACCESS_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; DONOBU_API_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; DONOBU_PERSISTENCE_API_KEY: import("zod/v4").ZodOptional<import("zod/v4").ZodString>; }, { BASE64_GPT_CONFIG?: string | undefined; BROWSERBASE_API_KEY?: string | undefined; BROWSERBASE_PROJECT_ID?: string | undefined; DONOBU_API_BASE_URL: string; ANTHROPIC_API_KEY?: string | undefined; ANTHROPIC_MODEL_NAME?: string | undefined; GOOGLE_GENERATIVE_AI_API_KEY?: string | undefined; GOOGLE_GENERATIVE_AI_MODEL_NAME?: string | undefined; OLLAMA_MODEL_NAME?: string | undefined; OLLAMA_API_URL?: string | undefined; OPENAI_API_KEY?: string | undefined; OPENAI_API_MODEL_NAME?: string | undefined; PERSISTENCE_PRIORITY: string[]; AWS_BEDROCK_MODEL_NAME?: string | undefined; AWS_ACCESS_KEY_ID?: string | undefined; AWS_SECRET_ACCESS_KEY?: string | undefined; DONOBU_API_KEY?: string | undefined; DONOBU_PERSISTENCE_API_KEY?: string | undefined; }>): Promise<DonobuStack>; //# sourceMappingURL=DonobuStack.d.ts.map