UNPKG

donobu

Version:

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

68 lines 3.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RunConfigSchema = void 0; const v4_1 = require("zod/v4"); const BrowserConfig_1 = require("./BrowserConfig"); const CustomTool_1 = require("./CustomTool"); const WebTargetConfigSchema = v4_1.z.object({ browser: BrowserConfig_1.BrowserConfigSchema, targetWebsite: v4_1.z.string().describe('The website URL to start the flow at.'), }); /** * The shared configuration fields that define *how* a test run executes. * These are common to flows, tests, and suites (as defaults). * * - On a **flow**, these are the settings used for that specific execution. * - On a **test**, these are the reusable settings from which flows are created. * - On a **suite**, these are the default settings applied to new tests. * * Fields that are specific to the flow runner (e.g. gptConfigName, callbackUrl, * isControlPanelEnabled, defaultMessageDuration) are NOT included here — they * live on FlowMetadata directly. */ exports.RunConfigSchema = v4_1.z.looseObject({ target: v4_1.z .string() .describe('The target type (e.g. "web", "mobile"). The value names the key containing the target-specific configuration.'), web: WebTargetConfigSchema.optional().describe('Web target configuration. Present when target is "web".'), // Plugin-provided target configurations (e.g. mobile) flow through via // the loose object behavior and are validated by the corresponding // TargetRuntimePlugin. envVars: v4_1.z .array(v4_1.z.string()) .nullable() .describe('The names of environment variables made available for use.'), customTools: v4_1.z .array(CustomTool_1.CustomToolSchema) .nullable() .describe('Custom tools available for execution.'), overallObjective: v4_1.z .string() .nullable() .describe('The overall objective to pursue.'), allowedTools: v4_1.z .array(v4_1.z.string()) .describe('The complete set of tools (by name) permitted for execution.'), // A JSON Schema document (always an object at the top level). Typed as // `Record<string, unknown>` rather than `JSONSchema.BaseSchema` so that // the schema is representable via `z.toJSONSchema` — consumers that need // the more specific type cast at the call site (e.g. `jsonSchemaToZod`). resultJsonSchema: v4_1.z .record(v4_1.z.string(), v4_1.z.unknown()) .nullable() .describe('If non-null, the JSON schema that the result field will conform to.'), callbackUrl: v4_1.z .string() .nullable() .describe('The URL to HTTP POST to when execution completes.'), maxToolCalls: v4_1.z .number() .nullable() .describe('If non-null, the maximum number of tool calls allowed.'), videoDisabled: v4_1.z .boolean() .optional() .nullable() .describe('If true, do not record a video of the execution.'), }); //# sourceMappingURL=RunConfig.js.map