UNPKG

donobu

Version:

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

60 lines 2.53 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProvenanceSchema = exports.CiProvenanceSchema = exports.GitProvenanceSchema = exports.ProvenanceSourceSchema = void 0; const v4_1 = require("zod/v4"); exports.ProvenanceSourceSchema = v4_1.z.enum(['DONOBU_STUDIO', 'CODE']); exports.GitProvenanceSchema = v4_1.z .object({ sha: v4_1.z.string().optional().describe('The git commit SHA at HEAD.'), branch: v4_1.z .string() .optional() .describe('The git branch at HEAD; absent in detached-HEAD state.'), dirty: v4_1.z .boolean() .optional() .describe('True if the working tree had uncommitted changes.'), }) .loose(); exports.CiProvenanceSchema = v4_1.z .object({ provider: v4_1.z .string() .optional() .describe('The CI provider name when identified (e.g. "github", "gitlab", "circle"); ' + 'absent when only a generic CI=true marker was present.'), }) .loose(); /** * Provenance — records *how* a Suite/Test/Flow came into existence so downstream * code can render origin badges and gate operations that aren't safe across run * modes (e.g. running a CODE-created test from Studio). * * `.loose()` so newer SDKs can write extra provenance fields without breaking * older readers that round-trip the metadata blob. */ exports.ProvenanceSchema = v4_1.z .object({ source: exports.ProvenanceSourceSchema.describe('The run mode that created this entity. ' + 'DONOBU_STUDIO = created via the Studio desktop app (HTTP API → managers); ' + "CODE = created via a code-first SDK fixture (e.g. `donobu`'s `test` " + "or `donobu-mobile`'s `mobileTest`)."), user: v4_1.z .string() .optional() .describe('The OS username under which the entity was created.'), os: v4_1.z .string() .optional() .describe('The OS platform (e.g. "darwin", "linux", "win32").'), hostname: v4_1.z .string() .optional() .describe('The hostname of the machine that created this entity.'), ci: exports.CiProvenanceSchema.optional().describe('CI context when creation happened in a CI environment. Absent when ' + 'no CI markers were detected.'), git: exports.GitProvenanceSchema.optional().describe('Git working-tree context at creation time. Absent when the CWD is ' + 'not a git repo or `git` is unavailable.'), }) .loose(); //# sourceMappingURL=Provenance.js.map