@wix/evalforge-types 0.29.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +43 -0
- package/build/index.js +8 -0
- package/build/index.js.map +2 -2
- package/build/index.mjs +8 -0
- package/build/index.mjs.map +2 -2
- package/build/types/common/models.d.ts +2 -1
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# @wix/evalforge-types
|
|
2
|
+
|
|
3
|
+
Shared TypeScript types and [Zod](https://zod.dev/) schemas for the EvalForge platform. This package is the single source of truth for all entity definitions used across the backend, frontend, and evaluator.
|
|
4
|
+
|
|
5
|
+
**This package must be built before any other package in the monorepo.**
|
|
6
|
+
|
|
7
|
+
## Modules
|
|
8
|
+
|
|
9
|
+
| Module | Description |
|
|
10
|
+
|--------|-------------|
|
|
11
|
+
| `common` | Base entity schemas (`BaseEntity`, `TenantEntity`), shared utilities |
|
|
12
|
+
| `target` | Testable entities — `Agent`, `Skill`, `SkillVersion`, `SkillsGroup`, `Mcp`, `SubAgent` |
|
|
13
|
+
| `scenario` | Test scenario definitions and environment configuration |
|
|
14
|
+
| `suite` | Test suite organization |
|
|
15
|
+
| `evaluation` | Eval run schemas, configs, results, and statuses |
|
|
16
|
+
| `project` | Project schemas (multi-tenancy root) |
|
|
17
|
+
| `template` | Project template schemas |
|
|
18
|
+
| `assertion` | Custom assertion definitions |
|
|
19
|
+
| `agent` | Agent adapter interface |
|
|
20
|
+
| `test` | Test type definitions (LLM, TOOL, BUILD_CHECK, etc.) |
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
```typescript
|
|
25
|
+
import type { Skill, CreateSkillInput, EvalRun, EvalStatus } from '@wix/evalforge-types';
|
|
26
|
+
import { CreateSkillInputSchema } from '@wix/evalforge-types';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Scripts
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
yarn build # Build CJS + ESM + type declarations
|
|
33
|
+
yarn lint # Run ESLint
|
|
34
|
+
yarn clean # Remove build artifacts
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Build Output
|
|
38
|
+
|
|
39
|
+
The package produces three build artifacts:
|
|
40
|
+
|
|
41
|
+
- `build/index.js` — CommonJS bundle
|
|
42
|
+
- `build/index.mjs` — ESM bundle
|
|
43
|
+
- `build/types/` — TypeScript declaration files
|
package/build/index.js
CHANGED
|
@@ -214,6 +214,7 @@ var ModelIds = /* @__PURE__ */ ((ModelIds2) => {
|
|
|
214
214
|
ModelIds2["CLAUDE_3_7_SONNET_1_0"] = "CLAUDE_3_7_SONNET_1_0";
|
|
215
215
|
ModelIds2["CLAUDE_4_OPUS_1_0"] = "CLAUDE_4_OPUS_1_0";
|
|
216
216
|
ModelIds2["CLAUDE_4_SONNET_1_0"] = "CLAUDE_4_SONNET_1_0";
|
|
217
|
+
ModelIds2["CLAUDE_4_5_HAIKU_1_0"] = "CLAUDE_4_5_HAIKU_1_0";
|
|
217
218
|
return ModelIds2;
|
|
218
219
|
})(ModelIds || {});
|
|
219
220
|
var ModelIdsSchema = import_zod4.z.enum(ModelIds);
|
|
@@ -243,6 +244,13 @@ var ModelSchema = import_zod4.z.object({
|
|
|
243
244
|
pricing: ModelPricingSchema
|
|
244
245
|
});
|
|
245
246
|
var AVAILABLE_MODELS = [
|
|
247
|
+
{
|
|
248
|
+
id: "CLAUDE_4_5_HAIKU_1_0" /* CLAUDE_4_5_HAIKU_1_0 */,
|
|
249
|
+
name: "Claude 4.5 Haiku",
|
|
250
|
+
provider: "anthropic",
|
|
251
|
+
providerModelId: "claude-haiku-4-5-20251001",
|
|
252
|
+
pricing: { inputPer1M: 0.8, outputPer1M: 4 }
|
|
253
|
+
},
|
|
246
254
|
{
|
|
247
255
|
id: "CLAUDE_4_SONNET_1_0" /* CLAUDE_4_SONNET_1_0 */,
|
|
248
256
|
name: "Claude 4 Sonnet",
|
package/build/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/common/base-entity.ts", "../src/common/github-source.ts", "../src/common/mcp.ts", "../src/common/models.ts", "../src/target/target.ts", "../src/target/agent.ts", "../src/target/skill.ts", "../src/target/skills-group.ts", "../src/target/sub-agent.ts", "../src/test/index.ts", "../src/test/base.ts", "../src/test/llm.ts", "../src/test/tool.ts", "../src/test/site-config.ts", "../src/test/command-execution.ts", "../src/test/file-presence.ts", "../src/test/file-content.ts", "../src/test/build-check.ts", "../src/test/vitest.ts", "../src/test/playwright-nl.ts", "../src/scenario/assertions.ts", "../src/scenario/environment.ts", "../src/scenario/test-scenario.ts", "../src/assertion/assertion.ts", "../src/suite/test-suite.ts", "../src/evaluation/metrics.ts", "../src/evaluation/eval-result.ts", "../src/evaluation/eval-run.ts", "../src/evaluation/live-trace.ts", "../src/project/project.ts", "../src/template/template.ts", "../src/assertion/system-assertions.ts"],
|
|
4
|
-
"sourcesContent": ["/**\n * @wix/evalforge-types\n *\n * Unified types for the agent evaluation system.\n *\n * Entity Hierarchy:\n * - BaseEntity: id, name, description, dates\n * - TenantEntity: extends BaseEntity with projectId\n * - Target: extends TenantEntity (base for testable entities)\n * - Agent: CLI-based agent (runCommand, modelConfig)\n * - Skill: SKILL.md-based capability\n *\n * Test Types (9 total):\n * - LLM, TOOL, SITE_CONFIG, COMMAND_EXECUTION (from old system)\n * - FILE_PRESENCE, FILE_CONTENT, BUILD_CHECK, VITEST, PLAYWRIGHT_NL (new)\n */\n\n// Common - base schemas and utilities\nexport * from './common/index.js';\n\n// Target - testable entities\nexport * from './target/index.js';\n\n// Test - all test type definitions\nexport * from './test/index.js';\n\n// Scenario - test scenarios and environment\nexport * from './scenario/index.js';\n\n// Suite - test organization\nexport * from './suite/index.js';\n\n// Evaluation - runs, configs, and results\nexport * from './evaluation/index.js';\n\n// Project - multi-tenancy\nexport * from './project/index.js';\n\n// Template - project templates (global entities)\nexport * from './template/index.js';\n\n// Agent - adapter interface for agent implementations\nexport * from './agent/index.js';\n\n// Assertion - custom assertions stored in database\nexport * from './assertion/index.js';\n", "import { z } from 'zod';\n\n/**\n * Base entity schema with common fields for all entities.\n */\nexport const BaseEntitySchema = z.object({\n id: z.string(),\n name: z.string().min(1),\n description: z.string(),\n createdAt: z.string(),\n updatedAt: z.string(),\n deleted: z.boolean().optional()\n});\n\nexport type BaseEntity = z.infer<typeof BaseEntitySchema>;\n\n/**\n * Tenant entity schema - extends BaseEntity with projectId for multi-tenancy.\n */\nexport const TenantEntitySchema = BaseEntitySchema.extend({\n projectId: z.string()\n});\n\nexport type TenantEntity = z.infer<typeof TenantEntitySchema>;\n", "import { z } from 'zod';\n\n/**\n * GitHub source reference for a directory in a GitHub repository.\n * Used by skills and templates to point to content that can be fetched via the GitHub API.\n */\nexport const GitHubSourceSchema = z.object({\n /** GitHub org or user, e.g. \"wix\" */\n owner: z.string().min(1),\n /** Repository name, e.g. \"skills\" */\n repo: z.string().min(1),\n /** Folder path within the repo, e.g. \"wix-cli/skills/wix-cli-dashboard-page\" */\n path: z.string().min(1),\n /** Git ref (branch, tag, or SHA), e.g. \"master\" or \"v1.2.0\" */\n ref: z.string().min(1)\n});\n\nexport type GitHubSource = z.infer<typeof GitHubSourceSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from './base-entity.js';\n\n/**\n * Top-level key for the .mcp.json file written at run start.\n * Format: { [MCP_SERVERS_JSON_KEY]: { [mcpName]: config } }\n */\nexport const MCP_SERVERS_JSON_KEY = 'mcpServers';\n\n/**\n * MCP Entity schema - an MCP server definition stored per project.\n *\n * `name` is a display label for the entity (does NOT need to match the server\n * key inside `config`).\n *\n * `config` is a keyed `.mcp.json` entry, e.g.:\n * ```json\n * { \"wix-mcp\": { \"type\": \"http\", \"url\": \"\u2026\", \"headers\": { \u2026 } } }\n * ```\n * At evaluation time every MCP's config is spread into the `mcpServers` object\n * of the generated `.mcp.json` file.\n */\nexport const MCPEntitySchema = TenantEntitySchema.extend({\n /** Display name for the MCP entity (independent of the server key in config) */\n name: z.string().min(1),\n /** Keyed MCP server config \u2014 top-level key is the server name, value is its config */\n config: z.record(z.string(), z.unknown())\n});\n\nexport type MCPEntity = z.infer<typeof MCPEntitySchema>;\n\n/**\n * Input schema for creating a new MCP.\n */\nexport const CreateMcpInputSchema = MCPEntitySchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateMcpInput = z.infer<typeof CreateMcpInputSchema>;\n\n/**\n * Input schema for updating an MCP.\n */\nexport const UpdateMcpInputSchema = CreateMcpInputSchema.partial();\n\nexport type UpdateMcpInput = z.infer<typeof UpdateMcpInputSchema>;\n\n/**\n * MCP Server Configuration (legacy - for mcp.json config shape).\n * Config can be: { command, args }, { url, headers }, { type, command, args, env }, etc.\n */\nexport const MCPServerConfigSchema = z.record(z.string(), z.unknown());\n\nexport type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;\n", "import { z } from 'zod';\n\n/**\n * Anthropic Model IDs supported by the AI Gateway.\n * These values match the ClaudeModel enum from the Wix AI Gateway API.\n */\nexport enum ModelIds {\n CLAUDE_3_HAIKU_1_0 = 'CLAUDE_3_HAIKU_1_0',\n CLAUDE_3_OPUS_1_0 = 'CLAUDE_3_OPUS_1_0',\n CLAUDE_3_SONNET_1_0 = 'CLAUDE_3_SONNET_1_0',\n CLAUDE_3_5_SONNET_1_0 = 'CLAUDE_3_5_SONNET_1_0',\n CLAUDE_3_5_SONNET_2_0 = 'CLAUDE_3_5_SONNET_2_0',\n CLAUDE_3_7_SONNET_1_0 = 'CLAUDE_3_7_SONNET_1_0',\n CLAUDE_4_OPUS_1_0 = 'CLAUDE_4_OPUS_1_0',\n CLAUDE_4_SONNET_1_0 = 'CLAUDE_4_SONNET_1_0'\n}\n\nexport const ModelIdsSchema = z.enum(ModelIds);\n\n/**\n * Model configuration schema for specifying model parameters.\n */\nconst nullToUndefined = (val: unknown) => (val === null ? undefined : val);\n\nexport const ModelConfigSchema = z.object({\n model: ModelIdsSchema,\n temperature: z.preprocess(\n nullToUndefined,\n z.number().min(0).max(1).optional()\n ),\n maxTokens: z.preprocess(nullToUndefined, z.number().min(1).optional())\n});\n\nexport type ModelConfig = z.infer<typeof ModelConfigSchema>;\n\n/**\n * Model pricing schema (cost per 1M tokens).\n */\nexport const ModelPricingSchema = z.object({\n inputPer1M: z.number(),\n outputPer1M: z.number()\n});\n\nexport type ModelPricing = z.infer<typeof ModelPricingSchema>;\n\n/**\n * Model schema - complete model definition with metadata and pricing.\n */\nexport const ModelSchema = z.object({\n /** AI Gateway model ID */\n id: ModelIdsSchema,\n /** Display name */\n name: z.string(),\n /** Provider (always 'anthropic') */\n provider: z.literal('anthropic'),\n /** Provider's model identifier (e.g., \"claude-3-5-sonnet-20241022\") */\n providerModelId: z.string(),\n /** Pricing per 1M tokens */\n pricing: ModelPricingSchema\n});\n\nexport type Model = z.infer<typeof ModelSchema>;\n\n/**\n * Available models with full metadata including pricing.\n */\nexport const AVAILABLE_MODELS: Model[] = [\n {\n id: ModelIds.CLAUDE_4_SONNET_1_0,\n name: 'Claude 4 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-sonnet-4-20250514',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_4_OPUS_1_0,\n name: 'Claude 4 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-opus-4-20250514',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_7_SONNET_1_0,\n name: 'Claude 3.7 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-7-sonnet-20250219',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_2_0,\n name: 'Claude 3.5 Sonnet v2',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20241022',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_1_0,\n name: 'Claude 3.5 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20240620',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_OPUS_1_0,\n name: 'Claude 3 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-3-opus-20240229',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_SONNET_1_0,\n name: 'Claude 3 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-sonnet-20240229',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_HAIKU_1_0,\n name: 'Claude 3 Haiku',\n provider: 'anthropic',\n providerModelId: 'claude-3-haiku-20240307',\n pricing: { inputPer1M: 0.25, outputPer1M: 1.25 }\n }\n];\n\n/**\n * Available models as a map keyed by model ID.\n */\nexport const AVAILABLE_MODELS_MAP: Record<ModelIds, Model> = Object.fromEntries(\n AVAILABLE_MODELS.map((model) => [model.id, model])\n) as Record<ModelIds, Model>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Target schema - base for all testable entities.\n *\n * All testable entities (Agent, Skill) extend this schema.\n * This creates a unified type hierarchy for what can be evaluated.\n */\nexport const TargetSchema = TenantEntitySchema.extend({\n // Base for all testable entities\n // Specific targets add their own fields\n});\n\nexport type Target = z.infer<typeof TargetSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { ModelConfigSchema } from '../common/models.js';\n\n/**\n * Agent schema - a CLI-based coding agent.\n *\n * Agents are external CLI tools that can execute coding tasks.\n * Examples: Claude Code CLI, Codex CLI, Cursor CLI.\n */\nexport const AgentSchema = TargetSchema.extend({\n /** Command to run the agent */\n runCommand: z.string(),\n /** Optional model configuration override */\n modelConfig: ModelConfigSchema.optional()\n});\n\nexport type Agent = z.infer<typeof AgentSchema>;\n\n/**\n * Input schema for creating a new Agent.\n */\nexport const CreateAgentInputSchema = AgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateAgentInput = z.infer<typeof CreateAgentInputSchema>;\n\n/**\n * Input schema for updating an Agent.\n * modelConfig can be null to explicitly clear it (vs undefined = keep existing).\n */\nexport const UpdateAgentInputSchema = CreateAgentInputSchema.partial().extend({\n modelConfig: ModelConfigSchema.optional().nullable()\n});\n\nexport type UpdateAgentInput = z.infer<typeof UpdateAgentInputSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\nexport { GitHubSourceSchema };\nexport type { GitHubSource } from '../common/github-source.js';\n\n/**\n * Regex for valid skill folder names (kebab-case).\n * Allows: lowercase letters, numbers, hyphens. Words separated by single hyphens.\n * Examples: my-skill, code-review, skill1\n */\nexport const SKILL_FOLDER_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\n/**\n * Regex for valid semver strings (major.minor.patch).\n * Examples: 1.0.0, 2.3.1, 10.20.30\n */\nexport const SEMVER_REGEX = /^\\d+\\.\\d+\\.\\d+$/;\n\n/**\n * Origin of a skill version - how the version was created.\n * - manual: Created through the UI\n * - pr: Created from a pull request (via CI/CD API)\n * - master: Synced from the main branch (via CI/CD API)\n */\nexport const SkillVersionOriginSchema = z.enum(['manual', 'pr', 'master']);\nexport type SkillVersionOrigin = z.infer<typeof SkillVersionOriginSchema>;\n\n/**\n * Check if a string is a valid skill folder name (kebab-case).\n * Used for validation when creating skills and when writing skills to filesystem.\n */\nexport function isValidSkillFolderName(name: string): boolean {\n return (\n typeof name === 'string' &&\n name.length > 0 &&\n SKILL_FOLDER_NAME_REGEX.test(name.trim())\n );\n}\n\n/**\n * Skill metadata parsed from SKILL.md frontmatter.\n *\n * Following the agentskills.io specification:\n * - name: Skill identifier (max 64 chars, lowercase + hyphens)\n * - description: What the skill does and when to use it\n * - allowedTools: Pre-approved tools the skill may use\n * - skills: Sub-skills for composite agents\n */\nexport const SkillMetadataSchema = z.object({\n name: z.string(),\n description: z.string(),\n allowedTools: z.array(z.string()).optional(),\n skills: z.array(z.string()).optional()\n});\n\nexport type SkillMetadata = z.infer<typeof SkillMetadataSchema>;\n\n/**\n * A single file within a skill directory snapshot.\n */\nexport const SkillFileSchema = z.object({\n /** Relative path within the skill directory, e.g. \"SKILL.md\" or \"references/API_SPEC.md\" */\n path: z.string().min(1),\n /** File content (UTF-8 text) */\n content: z.string()\n});\n\nexport type SkillFile = z.infer<typeof SkillFileSchema>;\n\n/**\n * Skill version - immutable snapshot of a Skill's content.\n *\n * New versions store a `files` array (snapshot of the skill directory from GitHub)\n * and a `source` reference (where the snapshot came from).\n *\n * Versions are immutable - editing creates a new version.\n */\nexport const SkillVersionSchema = z.object({\n id: z.string(),\n projectId: z.string(),\n skillId: z.string(),\n /** Semver string (e.g. \"1.2.0\") or Falcon fingerprint */\n version: z.string(),\n /** How this version was created */\n origin: SkillVersionOriginSchema,\n /** Where this snapshot was taken from */\n source: GitHubSourceSchema.optional(),\n /** Frozen snapshot of all files in the skill directory */\n files: z.array(SkillFileSchema).optional(),\n /** Optional notes about this version (changelog, reason for change) */\n notes: z.string().optional(),\n createdAt: z.string()\n});\n\nexport type SkillVersion = z.infer<typeof SkillVersionSchema>;\n\n/**\n * Input schema for creating a new SkillVersion.\n *\n * For source-based creation: provide `source` (or omit to use the Skill's source).\n * The backend fetches the folder and stores the snapshot as `files`.\n * For inline creation: provide `files` with the SKILL.md content.\n *\n * `version` is required -- the caller must always provide an explicit version string.\n */\nexport const CreateSkillVersionInputSchema = z.object({\n /** GitHub source to snapshot from. If not provided, uses the Skill's source. */\n source: GitHubSourceSchema.optional(),\n /** Version string for this snapshot (e.g. \"1.0.0\", \"1.0.3\"). */\n version: z.string().min(1),\n notes: z.string().optional(),\n /** Origin of this version. Defaults to 'manual' in backend. */\n origin: SkillVersionOriginSchema.optional(),\n /** Pre-edited files to store directly (bypasses GitHub fetch when provided) */\n files: z.array(SkillFileSchema).optional()\n});\n\nexport type CreateSkillVersionInput = z.infer<\n typeof CreateSkillVersionInputSchema\n>;\n\n/**\n * Skill schema - a lightweight container for a coding capability.\n *\n * Skills are containers identified by a kebab-case name.\n * All content (files, notes, etc.) lives in SkillVersion.\n * The `source` field points to the GitHub directory for live fetching.\n * Persisted shape: id, projectId, name, source, createdAt, updatedAt, deleted.\n *\n * Note: `description` is inherited from BaseEntity. It's not stored in the DB\n * for skills (content lives in SkillVersion), but is kept on the type to\n * satisfy the TenantEntity constraint. The repository always returns \"\".\n */\nexport const SkillSchema = TargetSchema.extend({\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Skill = z.infer<typeof SkillSchema>;\n\nconst KEBAB_CASE_MESSAGE =\n 'Name must be in kebab-case (lowercase letters, numbers, hyphens only, e.g. my-skill)';\n\nconst SkillInputBaseSchema = SkillSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true,\n description: true,\n source: true\n}).extend({\n /** Optional - not stored on Skill; content description lives in SkillVersion */\n description: z.string().optional(),\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\n/**\n * Inline initial version data provided when creating a skill atomically.\n * When present on a POST /skills request, the backend creates the skill\n * and its first version in a single request with rollback on failure.\n */\nexport const InitialVersionInputSchema = z.object({\n files: z.array(SkillFileSchema).optional(),\n notes: z.string().optional(),\n source: GitHubSourceSchema.optional(),\n version: z.string().optional(),\n origin: SkillVersionOriginSchema.optional()\n});\n\nexport type InitialVersionInput = z.infer<typeof InitialVersionInputSchema>;\n\n/**\n * Input schema for creating a new Skill.\n * Only `name` and `projectId` are required. `description` is ignored (lives in SkillVersion).\n * Pass `initialVersion` to atomically create the skill and its first version.\n */\nexport const CreateSkillInputSchema = SkillInputBaseSchema.extend({\n initialVersion: InitialVersionInputSchema.optional()\n}).refine((data) => isValidSkillFolderName(data.name), {\n message: KEBAB_CASE_MESSAGE,\n path: ['name']\n});\n\nexport type CreateSkillInput = z.infer<typeof CreateSkillInputSchema>;\n\n/**\n * Input schema for updating a Skill.\n */\nexport const UpdateSkillInputSchema = SkillInputBaseSchema.partial().refine(\n (data) => data.name === undefined || isValidSkillFolderName(data.name),\n { message: KEBAB_CASE_MESSAGE, path: ['name'] }\n);\n\nexport type UpdateSkillInput = z.infer<typeof UpdateSkillInputSchema>;\n\n/**\n * Skill with its latest version - used when displaying skills in the UI\n * and in the evaluator to access skill content.\n */\nexport const SkillWithLatestVersionSchema = SkillSchema.extend({\n latestVersion: SkillVersionSchema.optional()\n});\n\nexport type SkillWithLatestVersion = z.infer<\n typeof SkillWithLatestVersionSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * SkillsGroup schema - a collection of skills (replaces TargetGroup for the new model).\n *\n * Eval runs can be scoped to a skills group to run against all skills in the group.\n */\nexport const SkillsGroupSchema = TenantEntitySchema.extend({\n /** IDs of skills in this group */\n skillIds: z.array(z.string())\n});\n\nexport type SkillsGroup = z.infer<typeof SkillsGroupSchema>;\n\n/**\n * Input schema for creating a new SkillsGroup.\n */\nexport const CreateSkillsGroupInputSchema = SkillsGroupSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateSkillsGroupInput = z.infer<\n typeof CreateSkillsGroupInputSchema\n>;\n\n/**\n * Input schema for updating a SkillsGroup.\n */\nexport const UpdateSkillsGroupInputSchema =\n CreateSkillsGroupInputSchema.partial();\n\nexport type UpdateSkillsGroupInput = z.infer<\n typeof UpdateSkillsGroupInputSchema\n>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\n\n/**\n * Sub-agent schema \u2013 a Markdown file with YAML frontmatter.\n *\n * Sub-agents are specialized AI assistants (per Claude Code docs)\n * defined in Markdown with frontmatter (name, description, tools, model, etc.).\n * The body is the system prompt.\n *\n */\nexport const SubAgentSchema = TargetSchema.extend({\n /** The full sub-agent markdown content (YAML frontmatter + body) */\n subAgentMd: z.string()\n});\n\nexport type SubAgent = z.infer<typeof SubAgentSchema>;\n\nconst SubAgentInputBaseSchema = SubAgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport const CreateSubAgentInputSchema = SubAgentInputBaseSchema;\n\nexport type CreateSubAgentInput = z.infer<typeof CreateSubAgentInputSchema>;\n\nexport const UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();\n\nexport type UpdateSubAgentInput = z.infer<typeof UpdateSubAgentInputSchema>;\n", "import { z } from 'zod';\n\n// Base exports\nexport * from './base.js';\n\n// Individual test types\nexport * from './llm.js';\nexport * from './tool.js';\nexport * from './site-config.js';\nexport * from './command-execution.js';\nexport * from './file-presence.js';\nexport * from './file-content.js';\nexport * from './build-check.js';\nexport * from './vitest.js';\nexport * from './playwright-nl.js';\n\n// Import schemas for union\nimport { LLMTestSchema, LLMTestResult } from './llm.js';\nimport { ToolTestSchema, ToolTestResult } from './tool.js';\nimport { SiteConfigTestSchema, SiteConfigTestResult } from './site-config.js';\nimport {\n CommandExecutionTestSchema,\n CommandExecutionTestResult\n} from './command-execution.js';\nimport {\n FilePresenceTestSchema,\n FilePresenceTestResult\n} from './file-presence.js';\nimport {\n FileContentTestSchema,\n FileContentTestResult\n} from './file-content.js';\nimport { BuildCheckTestSchema, BuildCheckTestResult } from './build-check.js';\nimport { VitestTestSchema, VitestTestResult } from './vitest.js';\nimport {\n PlaywrightNLTestSchema,\n PlaywrightNLTestResult\n} from './playwright-nl.js';\n\n/**\n * Unified Test schema - discriminated union of all 9 test types.\n */\nexport const TestSchema = z.discriminatedUnion('type', [\n LLMTestSchema,\n ToolTestSchema,\n SiteConfigTestSchema,\n CommandExecutionTestSchema,\n FilePresenceTestSchema,\n FileContentTestSchema,\n BuildCheckTestSchema,\n VitestTestSchema,\n PlaywrightNLTestSchema\n]);\n\nexport type Test = z.infer<typeof TestSchema>;\n\n/**\n * Union of all test result types.\n */\nexport type TestResult =\n | LLMTestResult\n | ToolTestResult\n | SiteConfigTestResult\n | CommandExecutionTestResult\n | FilePresenceTestResult\n | FileContentTestResult\n | BuildCheckTestResult\n | VitestTestResult\n | PlaywrightNLTestResult;\n", "import { z } from 'zod';\n\n/**\n * Test types - unified from old and new systems.\n */\nexport enum TestType {\n // From old system\n LLM = 'LLM',\n TOOL = 'TOOL',\n SITE_CONFIG = 'SITE_CONFIG',\n COMMAND_EXECUTION = 'COMMAND_EXECUTION',\n // From new system\n FILE_PRESENCE = 'FILE_PRESENCE',\n FILE_CONTENT = 'FILE_CONTENT',\n BUILD_CHECK = 'BUILD_CHECK',\n VITEST = 'VITEST',\n PLAYWRIGHT_NL = 'PLAYWRIGHT_NL'\n}\n\nexport const TestTypeSchema = z.enum(TestType);\n\n/**\n * Test importance levels.\n */\nexport enum TestImportance {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n CRITICAL = 'critical'\n}\n\nexport const TestImportanceSchema = z.enum(TestImportance);\n\n/**\n * Base test schema - common fields for all test types.\n */\nexport const BaseTestSchema = z.object({\n id: z.string(),\n type: TestTypeSchema,\n name: z.string().min(3),\n description: z.string().optional(),\n importance: TestImportanceSchema.optional()\n});\n\nexport type BaseTest = z.infer<typeof BaseTestSchema>;\n\n/**\n * Base test result interface.\n */\nexport interface BaseTestResult {\n type: TestType;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * LLM Test schema - tests that use an LLM evaluator.\n */\nexport const LLMTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.LLM),\n /** Maximum steps for the LLM to take */\n maxSteps: z.number().min(1).max(100),\n /** Prompt to send to the evaluator */\n prompt: z.string().min(1),\n /** ID of the evaluator agent to use */\n evaluatorId: z.string()\n});\n\nexport type LLMTest = z.infer<typeof LLMTestSchema>;\n\n/**\n * LLM Test result.\n */\nexport interface LLMTestResult extends BaseTestResult {\n type: TestType.LLM;\n testPrompt: string;\n testSystemPrompt?: string;\n text: string;\n scoreReasoning: string;\n score: number;\n totalMicrocentsSpent?: number;\n usage?: {\n promptTokens?: number;\n completionTokens?: number;\n totalTokens?: number;\n };\n reasoning?: string;\n reasoningDetails?: unknown;\n finishReason?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Tool Test schema - tests that verify tool usage.\n */\nexport const ToolTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.TOOL),\n /** Name of the tool that should be called */\n toolName: z.string().min(3),\n /** Expected arguments for the tool call */\n args: z.record(z.string(), z.any()),\n /** Expected content in the tool results */\n resultsContent: z.string()\n});\n\nexport type ToolTest = z.infer<typeof ToolTestSchema>;\n\n/**\n * Tool Test result.\n */\nexport interface ToolTestResult extends BaseTestResult {\n type: TestType.TOOL;\n result: boolean;\n toolUsed: boolean;\n actualArgs: Record<string, any>;\n isResultsValid: boolean;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Site Config Test schema - tests that verify site configuration via API.\n */\nexport const SiteConfigTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.SITE_CONFIG),\n /** URL to call */\n url: z.string().url(),\n /** HTTP method */\n method: z.enum(['GET', 'POST']),\n /** Request body (for POST) */\n body: z.string().optional(),\n /** Expected HTTP status code */\n expectedStatusCode: z.number().int().min(100).max(599),\n /** Expected response content */\n expectedResponse: z.string().optional(),\n /** JMESPath expression to extract from response */\n expectedResponseJMESPath: z.string().optional()\n});\n\nexport type SiteConfigTest = z.infer<typeof SiteConfigTestSchema>;\n\n/**\n * Site Config Test result.\n */\nexport interface SiteConfigTestResult extends BaseTestResult {\n type: TestType.SITE_CONFIG;\n result: boolean;\n actualStatusCode: number;\n actualResponse: unknown;\n allActualResponse: unknown;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Allowed commands for command execution tests.\n */\nexport const AllowedCommands = [\n 'yarn install --no-immutable && yarn build',\n 'npm run build',\n 'yarn typecheck'\n] as const;\n\n/**\n * Command Execution Test schema - tests that verify command execution.\n */\nexport const CommandExecutionTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.COMMAND_EXECUTION),\n /** Command to execute (must be in AllowedCommands) */\n command: z\n .string()\n .refine((value) => (AllowedCommands as readonly string[]).includes(value), {\n message: `Command must be one of: ${AllowedCommands.join(', ')}`\n }),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().default(0).optional()\n});\n\nexport type CommandExecutionTest = z.infer<typeof CommandExecutionTestSchema>;\n\n/**\n * Command Execution Test result.\n */\nexport interface CommandExecutionTestResult extends BaseTestResult {\n type: TestType.COMMAND_EXECUTION;\n stdout: string;\n stderr: string;\n exitCode: number | null;\n expectedExitCode: number;\n result: boolean;\n error?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File Presence Test schema - tests that verify file existence.\n */\nexport const FilePresenceTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_PRESENCE),\n /** Paths to check */\n paths: z.array(z.string()),\n /** Whether files should exist (true) or not exist (false) */\n shouldExist: z.boolean()\n});\n\nexport type FilePresenceTest = z.infer<typeof FilePresenceTestSchema>;\n\n/**\n * File Presence Test result.\n */\nexport interface FilePresenceTestResult extends BaseTestResult {\n type: TestType.FILE_PRESENCE;\n result: boolean;\n existingPaths: string[];\n missingPaths: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File content checks schema.\n */\nexport const FileContentCheckSchema = z.object({\n /** Strings that must be present in the file */\n contains: z.array(z.string()).optional(),\n /** Strings that must NOT be present in the file */\n notContains: z.array(z.string()).optional(),\n /** Regex pattern the content must match */\n matches: z.string().optional(),\n /** JSON path checks for structured content */\n jsonPath: z\n .array(\n z.object({\n path: z.string(),\n value: z.unknown()\n })\n )\n .optional(),\n /** Lines that should be added (for diff checking) */\n added: z.array(z.string()).optional(),\n /** Lines that should be removed (for diff checking) */\n removed: z.array(z.string()).optional()\n});\n\nexport type FileContentCheck = z.infer<typeof FileContentCheckSchema>;\n\n/**\n * File Content Test schema - tests that verify file content.\n *\n * This also covers the FILE_MODIFICATION use case from the old system\n * by supporting added/removed line checks.\n */\nexport const FileContentTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_CONTENT),\n /** Path to the file to check */\n path: z.string(),\n /** Content checks to perform */\n checks: FileContentCheckSchema\n});\n\nexport type FileContentTest = z.infer<typeof FileContentTestSchema>;\n\n/**\n * File Content Test result.\n */\nexport interface FileContentTestResult extends BaseTestResult {\n type: TestType.FILE_CONTENT;\n result: boolean;\n diff?: string;\n failedChecks?: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Build Check Test schema - tests that verify build success.\n */\nexport const BuildCheckTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.BUILD_CHECK),\n /** Build command to execute */\n command: z.string(),\n /** Whether the build should succeed */\n expectSuccess: z.boolean(),\n /** Maximum allowed warnings (optional) */\n allowedWarnings: z.number().optional(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type BuildCheckTest = z.infer<typeof BuildCheckTestSchema>;\n\n/**\n * Build Check Test result.\n */\nexport interface BuildCheckTestResult extends BaseTestResult {\n type: TestType.BUILD_CHECK;\n result: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n warningCount: number;\n duration: number;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Vitest Test schema - tests that run Vitest test files.\n */\nexport const VitestTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.VITEST),\n /** Test file content */\n testFile: z.string(),\n /** Name of the test file */\n testFileName: z.string(),\n /** Minimum pass rate required (0-100) */\n minPassRate: z.number().min(0).max(100)\n});\n\nexport type VitestTest = z.infer<typeof VitestTestSchema>;\n\n/**\n * Vitest Test result.\n */\nexport interface VitestTestResult extends BaseTestResult {\n type: TestType.VITEST;\n result: boolean;\n passRate: number;\n passed: number;\n failed: number;\n skipped: number;\n total: number;\n duration: number;\n output: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Playwright Natural Language Test schema - tests using natural language descriptions.\n */\nexport const PlaywrightNLTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.PLAYWRIGHT_NL),\n /** Natural language steps to execute */\n steps: z.array(z.string()),\n /** Expected outcome description */\n expectedOutcome: z.string(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type PlaywrightNLTest = z.infer<typeof PlaywrightNLTestSchema>;\n\n/**\n * Playwright NL Test result.\n */\nexport interface PlaywrightNLTestResult extends BaseTestResult {\n type: TestType.PLAYWRIGHT_NL;\n result: boolean;\n stepsExecuted: number;\n totalSteps: number;\n failedStep?: string;\n screenshot?: string;\n duration: number;\n}\n", "import { z } from 'zod';\n\n/**\n * Assertion: the agent must have invoked one or more skills during the run.\n * Checked by inspecting the LLM trace for \"Skill\" tool uses with the given skills.\n * When multiple skills are in one assertion, they are treated as a group (1 assertion).\n * Each skill in the group must have been called for the assertion to pass.\n * To check skills independently, add them as separate assertions.\n */\nexport const SkillWasCalledAssertionSchema = z.object({\n type: z.literal('skill_was_called'),\n /** Names of the skills that must have been called (matched against trace Skill tool args) */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledAssertion = z.infer<\n typeof SkillWasCalledAssertionSchema\n>;\n\n/**\n * Assertion: a build command must exit with the expected code (default 0).\n * Runs the command in the scenario working directory.\n */\nexport const BuildPassedAssertionSchema = z.object({\n type: z.literal('build_passed'),\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedAssertion = z.infer<typeof BuildPassedAssertionSchema>;\n\n/**\n * Assertion: an LLM judges the scenario output (score 0-100).\n * Prompt can use {{output}}, {{cwd}}, {{changedFiles}}, {{trace}}.\n * Passes if judge score >= minScore.\n */\nexport const LlmJudgeAssertionSchema = z.object({\n type: z.literal('llm_judge'),\n /** Prompt template; placeholders: {{output}}, {{cwd}}, {{changedFiles}}, {{trace}} */\n prompt: z.string(),\n /** Optional system prompt for the judge (default asks for JSON with score) */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku) */\n model: z.string().optional(),\n maxTokens: z.number().int().optional(),\n temperature: z.number().min(0).max(1).optional()\n});\n\nexport type LlmJudgeAssertion = z.infer<typeof LlmJudgeAssertionSchema>;\n\n/**\n * Union of all assertion types (per scenario).\n * Each assertion has a type and type-specific data.\n * Uses z.union (not z.discriminatedUnion) for Zod v4 compatibility when used as array element.\n */\nexport const AssertionSchema = z.union([\n SkillWasCalledAssertionSchema,\n BuildPassedAssertionSchema,\n LlmJudgeAssertionSchema\n]);\n\nexport type Assertion = z.infer<typeof AssertionSchema>;\n", "import { z } from 'zod';\n\n/**\n * Local project configuration schema.\n */\nexport const LocalProjectConfigSchema = z.object({\n /** Template ID to use for the local project */\n templateId: z.string().optional(),\n /** Files to create in the project */\n files: z\n .array(\n z.object({\n path: z.string().min(1),\n content: z.string().min(1)\n })\n )\n .optional()\n});\n\nexport type LocalProjectConfig = z.infer<typeof LocalProjectConfigSchema>;\n\n/**\n * Meta site configuration schema for API-based setup.\n */\nexport const MetaSiteConfigSchema = z.object({\n configurations: z\n .array(\n z.object({\n name: z.string().min(1),\n apiCalls: z.array(\n z.object({\n url: z.string().url(),\n method: z.enum(['POST', 'PUT']),\n body: z.string()\n })\n )\n })\n )\n .optional()\n});\n\nexport type MetaSiteConfig = z.infer<typeof MetaSiteConfigSchema>;\n\n/**\n * Environment configuration schema.\n *\n * Defines the environment setup required for running a test scenario.\n * Migrated from the old Prompt schema.\n */\nexport const EnvironmentSchema = z.object({\n /** Local project configuration */\n localProject: LocalProjectConfigSchema.optional(),\n /** Meta site configuration */\n metaSite: MetaSiteConfigSchema.optional()\n});\n\nexport type Environment = z.infer<typeof EnvironmentSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { AssertionSchema } from './assertions.js';\nimport { ScenarioAssertionLinkSchema } from '../assertion/assertion.js';\n\n/**\n * Expected file schema - a file the agent is expected to create or modify.\n * Used by eval results; not persisted on test_scenarios table.\n */\nexport const ExpectedFileSchema = z.object({\n /** Relative path where the file should be created */\n path: z.string(),\n /** Optional expected content */\n content: z.string().optional()\n});\n\nexport type ExpectedFile = z.infer<typeof ExpectedFileSchema>;\n\n/**\n * TestScenario schema - defines a single test scenario.\n *\n * Persisted shape matches test_scenarios table:\n * id, project_id, name, description, trigger_prompt, template_id, created_at, updated_at, deleted.\n * Linked assertions stored in scenario_assertions junction table.\n */\nexport const TestScenarioSchema = TenantEntitySchema.extend({\n /** The prompt sent to the agent to trigger the task */\n triggerPrompt: z.string().min(10),\n /** ID of the template to use for this scenario (null = no template) */\n templateId: z.string().nullish(),\n /** Inline assertions to evaluate for this scenario (legacy) */\n assertions: z.array(AssertionSchema).optional(),\n /** IDs of saved assertions to evaluate (from assertions table) - legacy, use assertionLinks */\n assertionIds: z.array(z.string()).optional(),\n /** Linked assertions with per-scenario parameter values */\n assertionLinks: z.array(ScenarioAssertionLinkSchema).optional()\n});\n\nexport type TestScenario = z.infer<typeof TestScenarioSchema>;\n\n/**\n * Input schema for creating a new TestScenario.\n */\nexport const CreateTestScenarioInputSchema = TestScenarioSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestScenarioInput = z.infer<\n typeof CreateTestScenarioInputSchema\n>;\n\n/**\n * Input schema for updating a TestScenario.\n */\nexport const UpdateTestScenarioInputSchema =\n CreateTestScenarioInputSchema.partial();\n\nexport type UpdateTestScenarioInput = z.infer<\n typeof UpdateTestScenarioInputSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Assertion types:\n * - skill_was_called: Checks if a specific skill was invoked (deterministic, system-level)\n * - build_passed: Runs a command and checks exit code (deterministic, system-level)\n * - llm_judge: LLM evaluates output with a prompt (LLM-based, user-created)\n */\nexport const AssertionTypeSchema = z.enum([\n 'skill_was_called',\n 'build_passed',\n 'llm_judge'\n]);\n\n/**\n * Parameter types supported in assertion parameters.\n */\nexport const AssertionParameterTypeSchema = z.enum([\n 'string',\n 'number',\n 'boolean'\n]);\n\nexport type AssertionParameterType = z.infer<\n typeof AssertionParameterTypeSchema\n>;\n\n/**\n * Schema for defining assertion parameters.\n * Parameters can be required or optional, with optional default values.\n */\nexport const AssertionParameterSchema = z.object({\n /** Parameter name (used as key in params object) */\n name: z.string().min(1),\n /** Display label for the parameter */\n label: z.string().min(1),\n /** Parameter type */\n type: AssertionParameterTypeSchema,\n /** Whether this parameter is required */\n required: z.boolean(),\n /** Default value (optional, used when not provided) */\n defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),\n /** If true, parameter is hidden by default behind \"Show advanced options\" */\n advanced: z.boolean().optional()\n});\n\nexport type AssertionParameter = z.infer<typeof AssertionParameterSchema>;\n\n/**\n * Schema for scenario-assertion link with parameter values.\n * Used when linking assertions to scenarios with specific parameter values.\n */\nexport const ScenarioAssertionLinkSchema = z.object({\n /** ID of the assertion (can be system assertion like 'system:skill_was_called' or custom assertion UUID) */\n assertionId: z.string(),\n /** Parameter values for this assertion in this scenario */\n params: z\n .record(\n z.string(),\n z.union([z.string(), z.number(), z.boolean(), z.null()])\n )\n .optional()\n});\n\nexport type ScenarioAssertionLink = z.infer<typeof ScenarioAssertionLinkSchema>;\n\nexport type AssertionType = z.infer<typeof AssertionTypeSchema>;\n\n/**\n * Configuration for skill_was_called assertion type.\n * Multiple skills in one assertion are treated as a group (1 assertion).\n * All skills in the group must have been called for the assertion to pass.\n */\nexport const SkillWasCalledConfigSchema = z.object({\n /** Names of the skills that must have been called */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledConfig = z.infer<typeof SkillWasCalledConfigSchema>;\n\n/**\n * Configuration for build_passed assertion type.\n * Uses strictObject to reject objects with unknown keys (prevents matching LlmJudge configs).\n */\nexport const BuildPassedConfigSchema = z.strictObject({\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedConfig = z.infer<typeof BuildPassedConfigSchema>;\n\n/**\n * Configuration for llm_judge assertion type.\n * User-created assertions with customizable parameters.\n */\nexport const LlmJudgeConfigSchema = z.object({\n /**\n * Prompt template with placeholders:\n * - {{output}}: agent's final output\n * - {{cwd}}: working directory\n * - {{changedFiles}}: all files changed (new, modified)\n * - {{modifiedFiles}}: only existing files that were modified\n * - {{newFiles}}: only new files that were created\n * - {{trace}}: step-by-step trace of tool calls\n * - Custom parameters defined in the parameters array\n */\n prompt: z.string().min(1),\n /** Optional system prompt for the judge */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku-20241022) */\n model: z.string().optional(),\n /** Max output tokens */\n maxTokens: z.number().int().optional(),\n /** Temperature (0-1) */\n temperature: z.number().min(0).max(1).optional(),\n /** User-defined parameters for this assertion */\n parameters: z.array(AssertionParameterSchema).optional()\n});\n\nexport type LlmJudgeConfig = z.infer<typeof LlmJudgeConfigSchema>;\n\n/**\n * Union of all assertion config types.\n * Order matters: schemas with required fields first, then optional-only schemas.\n * This ensures LlmJudge (requires prompt) and SkillWasCalled (requires skillNames)\n * are matched before BuildPassed (all optional) or empty object.\n */\nexport const AssertionConfigSchema = z.union([\n LlmJudgeConfigSchema, // requires prompt - check first\n SkillWasCalledConfigSchema, // requires skillName\n BuildPassedConfigSchema, // all optional, uses strictObject to reject unknown keys\n z.object({}) // fallback empty config\n]);\n\nexport type AssertionConfig = z.infer<typeof AssertionConfigSchema>;\n\n/**\n * Custom Assertion entity - stored in the database.\n * Replaces inline assertions in test scenarios.\n */\nexport const CustomAssertionSchema = TenantEntitySchema.extend({\n /** The assertion type */\n type: AssertionTypeSchema,\n /** Type-specific configuration */\n config: AssertionConfigSchema\n});\n\nexport type CustomAssertion = z.infer<typeof CustomAssertionSchema>;\n\n/**\n * Input schema for creating a new CustomAssertion.\n */\nexport const CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateCustomAssertionInput = z.infer<\n typeof CreateCustomAssertionInputSchema\n>;\n\n/**\n * Input schema for updating a CustomAssertion.\n */\nexport const UpdateCustomAssertionInputSchema =\n CreateCustomAssertionInputSchema.partial();\n\nexport type UpdateCustomAssertionInput = z.infer<\n typeof UpdateCustomAssertionInputSchema\n>;\n\n/**\n * Helper function to validate config based on assertion type.\n * Returns true if config is valid for the given type.\n */\nexport function validateAssertionConfig(\n type: AssertionType,\n config: unknown\n): boolean {\n switch (type) {\n case 'skill_was_called':\n return SkillWasCalledConfigSchema.safeParse(config).success;\n case 'build_passed':\n return BuildPassedConfigSchema.safeParse(config).success;\n case 'llm_judge':\n return LlmJudgeConfigSchema.safeParse(config).success;\n default:\n return false;\n }\n}\n\n/**\n * Get typed config for skill_was_called assertion.\n */\nexport function getSkillWasCalledConfig(\n assertion: CustomAssertion\n): SkillWasCalledConfig | null {\n if (assertion.type !== 'skill_was_called') return null;\n const result = SkillWasCalledConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for build_passed assertion.\n */\nexport function getBuildPassedConfig(\n assertion: CustomAssertion\n): BuildPassedConfig | null {\n if (assertion.type !== 'build_passed') return null;\n const result = BuildPassedConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for llm_judge assertion.\n */\nexport function getLlmJudgeConfig(\n assertion: CustomAssertion\n): LlmJudgeConfig | null {\n if (assertion.type !== 'llm_judge') return null;\n const result = LlmJudgeConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * TestSuite schema - a collection of test scenarios.\n *\n * Suites are used to organize and group related test scenarios.\n */\nexport const TestSuiteSchema = TenantEntitySchema.extend({\n /** IDs of test scenarios in this suite */\n scenarioIds: z.array(z.string())\n});\n\nexport type TestSuite = z.infer<typeof TestSuiteSchema>;\n\n/**\n * Input schema for creating a new TestSuite.\n */\nexport const CreateTestSuiteInputSchema = TestSuiteSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestSuiteInput = z.infer<typeof CreateTestSuiteInputSchema>;\n\n/**\n * Input schema for updating a TestSuite.\n */\nexport const UpdateTestSuiteInputSchema = CreateTestSuiteInputSchema.partial();\n\nexport type UpdateTestSuiteInput = z.infer<typeof UpdateTestSuiteInputSchema>;\n", "import { z } from 'zod';\n\n/**\n * Token usage schema.\n */\nexport const TokenUsageSchema = z.object({\n prompt: z.number(),\n completion: z.number(),\n total: z.number()\n});\n\nexport type TokenUsage = z.infer<typeof TokenUsageSchema>;\n\n/**\n * Evaluation metrics schema.\n */\nexport const EvalMetricsSchema = z.object({\n totalAssertions: z.number(),\n passed: z.number(),\n failed: z.number(),\n skipped: z.number(),\n errors: z.number(),\n passRate: z.number(),\n avgDuration: z.number(),\n totalDuration: z.number()\n});\n\nexport type EvalMetrics = z.infer<typeof EvalMetricsSchema>;\n\n/**\n * Evaluation status enum.\n */\nexport enum EvalStatus {\n PENDING = 'pending',\n RUNNING = 'running',\n COMPLETED = 'completed',\n FAILED = 'failed',\n CANCELLED = 'cancelled'\n}\n\nexport const EvalStatusSchema = z.enum(EvalStatus);\n\n/**\n * LLM step type enum.\n */\nexport enum LLMStepType {\n COMPLETION = 'completion',\n TOOL_USE = 'tool_use',\n TOOL_RESULT = 'tool_result',\n THINKING = 'thinking'\n}\n\n/**\n * LLM trace step schema.\n */\nexport const LLMTraceStepSchema = z.object({\n id: z.string(),\n stepNumber: z.number(),\n type: z.enum(LLMStepType),\n model: z.string(),\n provider: z.string(),\n startedAt: z.string(),\n durationMs: z.number(),\n tokenUsage: TokenUsageSchema,\n costUsd: z.number(),\n toolName: z.string().optional(),\n toolArguments: z.string().optional(),\n inputPreview: z.string().optional(),\n outputPreview: z.string().optional(),\n success: z.boolean(),\n error: z.string().optional()\n});\n\nexport type LLMTraceStep = z.infer<typeof LLMTraceStepSchema>;\n\n/**\n * LLM breakdown stats schema.\n */\nexport const LLMBreakdownStatsSchema = z.object({\n count: z.number(),\n durationMs: z.number(),\n tokens: z.number(),\n costUsd: z.number()\n});\n\nexport type LLMBreakdownStats = z.infer<typeof LLMBreakdownStatsSchema>;\n\n/**\n * LLM trace summary schema.\n */\nexport const LLMTraceSummarySchema = z.object({\n totalSteps: z.number(),\n totalDurationMs: z.number(),\n totalTokens: TokenUsageSchema,\n totalCostUsd: z.number(),\n stepTypeBreakdown: z.record(z.string(), LLMBreakdownStatsSchema).optional(),\n modelBreakdown: z.record(z.string(), LLMBreakdownStatsSchema),\n modelsUsed: z.array(z.string())\n});\n\nexport type LLMTraceSummary = z.infer<typeof LLMTraceSummarySchema>;\n\n/**\n * LLM trace schema.\n */\nexport const LLMTraceSchema = z.object({\n id: z.string(),\n steps: z.array(LLMTraceStepSchema),\n summary: LLMTraceSummarySchema\n});\n\nexport type LLMTrace = z.infer<typeof LLMTraceSchema>;\n", "import { z } from 'zod';\nimport { TestResult } from '../test/index.js';\nimport {\n EvalMetricsSchema,\n LLMTraceSchema,\n LLMTraceStepSchema\n} from './metrics.js';\nimport { DiffContentSchema, TemplateFileSchema } from './eval-run.js';\nimport { ModelConfigSchema } from '../common/models.js';\nimport { ExpectedFileSchema } from '../scenario/test-scenario.js';\n\n/**\n * Assertion result status enum.\n * Defined locally to avoid bundling eval-assertions Node.js code in browser.\n * This is structurally identical to the one in @wix/eval-assertions.\n */\nexport enum AssertionResultStatus {\n PASSED = 'passed',\n FAILED = 'failed',\n SKIPPED = 'skipped',\n ERROR = 'error'\n}\n\n/**\n * Assertion result schema.\n */\nexport const AssertionResultSchema = z.object({\n id: z.string(),\n assertionId: z.string(),\n assertionType: z.string(),\n assertionName: z.string(),\n status: z.enum(AssertionResultStatus),\n message: z.string().optional(),\n expected: z.string().optional(),\n actual: z.string().optional(),\n duration: z.number().optional(),\n details: z.record(z.string(), z.unknown()).optional(),\n llmTraceSteps: z.array(LLMTraceStepSchema).optional()\n});\n\nexport type AssertionResult = z.infer<typeof AssertionResultSchema>;\n\n/**\n * Evaluation run result schema - result for a single scenario/target combination.\n */\nexport const EvalRunResultSchema = z.object({\n id: z.string(),\n targetId: z.string(),\n targetName: z.string().optional(),\n /** SkillVersion ID used for this evaluation (for version tracking) */\n skillVersionId: z.string().optional(),\n /** SkillVersion semver string (e.g., \"1.0.0\", \"1.2.3\") for display */\n skillVersion: z.string().optional(),\n scenarioId: z.string(),\n scenarioName: z.string(),\n modelConfig: ModelConfigSchema.optional(),\n assertionResults: z.array(AssertionResultSchema),\n metrics: EvalMetricsSchema.optional(),\n passed: z.number(),\n failed: z.number(),\n passRate: z.number(),\n duration: z.number(),\n outputText: z.string().optional(),\n files: z.array(ExpectedFileSchema).optional(),\n fileDiffs: z.array(DiffContentSchema).optional(),\n /** Full template files after execution with status indicators */\n templateFiles: z.array(TemplateFileSchema).optional(),\n startedAt: z.string().optional(),\n completedAt: z.string().optional(),\n llmTrace: LLMTraceSchema.optional()\n});\n\nexport type EvalRunResult = z.infer<typeof EvalRunResultSchema>;\n\n/**\n * Prompt result schema - detailed result from prompt execution.\n */\nexport const PromptResultSchema = z.object({\n text: z.string(),\n files: z.array(z.unknown()).optional(),\n finishReason: z.string().optional(),\n reasoning: z.string().optional(),\n reasoningDetails: z.unknown().optional(),\n toolCalls: z.array(z.unknown()).optional(),\n toolResults: z.array(z.unknown()).optional(),\n warnings: z.array(z.unknown()).optional(),\n sources: z.array(z.unknown()).optional(),\n steps: z.array(z.unknown()),\n generationTimeMs: z.number(),\n prompt: z.string(),\n systemPrompt: z.string(),\n usage: z.object({\n totalTokens: z.number().optional(),\n totalMicrocentsSpent: z.number().optional()\n })\n});\n\nexport type PromptResult = z.infer<typeof PromptResultSchema>;\n\n/**\n * Full evaluation result schema - complete result for a single evaluation.\n */\nexport const EvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n promptResult: PromptResultSchema,\n testResults: z.array(z.unknown()) as z.ZodType<TestResult[]>,\n tags: z.array(z.string()).optional(),\n feedback: z.string().optional(),\n score: z.number(),\n suiteId: z.string().optional()\n});\n\nexport type EvaluationResult = z.infer<typeof EvaluationResultSchema>;\n\n/**\n * Lean evaluation result - summary for listing.\n */\nexport const LeanEvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n tags: z.array(z.string()).optional(),\n scenarioId: z.string(),\n scenarioVersion: z.number().optional(),\n targetId: z.string(),\n targetVersion: z.number().optional(),\n suiteId: z.string().optional(),\n score: z.number(),\n time: z.number().optional(),\n microcentsSpent: z.number().optional()\n});\n\nexport type LeanEvaluationResult = z.infer<typeof LeanEvaluationResultSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { EvalRunResultSchema } from './eval-result.js';\nimport {\n EvalMetricsSchema,\n EvalStatusSchema,\n LLMTraceSummarySchema\n} from './metrics.js';\nimport { LiveTraceEventSchema } from './live-trace.js';\n\n/**\n * Trigger types for evaluations.\n */\nexport enum TriggerType {\n RESOURCES_UPDATED = 'RESOURCES_UPDATED',\n MCP_VERSION_RELEASE = 'MCP_VERSION_RELEASE',\n MCP_PREVIEW_CREATED = 'MCP_PREVIEW_CREATED',\n MANUAL = 'MANUAL'\n}\n\n/**\n * Trigger metadata schema.\n */\nexport const TriggerMetadataSchema = z.object({\n version: z.string().optional(),\n resourceUpdated: z.array(z.string()).optional()\n});\n\nexport type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;\n\n/**\n * Trigger schema.\n */\nexport const TriggerSchema = z.object({\n id: z.string(),\n metadata: TriggerMetadataSchema.optional(),\n type: z.enum(TriggerType)\n});\n\nexport type Trigger = z.infer<typeof TriggerSchema>;\n\n/**\n * Failure category enum.\n */\nexport enum FailureCategory {\n MISSING_FILE = 'missing_file',\n WRONG_CONTENT = 'wrong_content',\n BUILD_ERROR = 'build_error',\n TEST_FAILURE = 'test_failure',\n RUNTIME_ERROR = 'runtime_error',\n PERFORMANCE = 'performance'\n}\n\n/**\n * Failure severity enum.\n */\nexport enum FailureSeverity {\n CRITICAL = 'critical',\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = 'low'\n}\n\n/**\n * Diff line type schema.\n */\nexport const DiffLineTypeSchema = z.enum(['added', 'removed', 'unchanged']);\nexport type DiffLineType = z.infer<typeof DiffLineTypeSchema>;\n\n/**\n * Diff line schema - represents a single line in a diff.\n */\nexport const DiffLineSchema = z.object({\n type: DiffLineTypeSchema,\n content: z.string(),\n lineNumber: z.number()\n});\n\nexport type DiffLine = z.infer<typeof DiffLineSchema>;\n\n/**\n * Diff content schema - represents a file diff.\n */\nexport const DiffContentSchema = z.object({\n path: z.string(),\n expected: z.string(),\n actual: z.string(),\n diffLines: z.array(DiffLineSchema),\n renamedFrom: z.string().optional()\n});\n\nexport type DiffContent = z.infer<typeof DiffContentSchema>;\n\n/**\n * Command execution schema.\n */\nexport const CommandExecutionSchema = z.object({\n command: z.string(),\n exitCode: z.number(),\n output: z.string().optional(),\n duration: z.number()\n});\n\nexport type CommandExecution = z.infer<typeof CommandExecutionSchema>;\n\n/**\n * File modification schema.\n */\nexport const FileModificationSchema = z.object({\n path: z.string(),\n action: z.enum(['created', 'modified', 'deleted'])\n});\n\nexport type FileModification = z.infer<typeof FileModificationSchema>;\n\n/**\n * Template file status enum.\n */\nexport enum TemplateFileStatus {\n NEW = 'new',\n MODIFIED = 'modified',\n UNCHANGED = 'unchanged'\n}\n\n/**\n * Template file schema - represents a file in the template with its full content.\n */\nexport const TemplateFileSchema = z.object({\n /** Relative path within the template */\n path: z.string(),\n /** Full file content after execution */\n content: z.string(),\n /** File status (new, modified, unchanged) */\n status: z.enum(['new', 'modified', 'unchanged'])\n});\n\nexport type TemplateFile = z.infer<typeof TemplateFileSchema>;\n\n/**\n * API call schema.\n */\nexport const ApiCallSchema = z.object({\n endpoint: z.string(),\n tokensUsed: z.number(),\n duration: z.number()\n});\n\nexport type ApiCall = z.infer<typeof ApiCallSchema>;\n\n/**\n * Execution trace schema - represents detailed execution information.\n */\nexport const ExecutionTraceSchema = z.object({\n commands: z.array(CommandExecutionSchema),\n filesModified: z.array(FileModificationSchema),\n apiCalls: z.array(ApiCallSchema),\n totalDuration: z.number()\n});\n\nexport type ExecutionTrace = z.infer<typeof ExecutionTraceSchema>;\n\n/**\n * Failure analysis schema.\n */\nexport const FailureAnalysisSchema = z.object({\n category: z.enum(FailureCategory),\n severity: z.enum(FailureSeverity),\n summary: z.string(),\n details: z.string(),\n rootCause: z.string(),\n suggestedFix: z.string(),\n relatedAssertions: z.array(z.string()),\n codeSnippet: z.string().optional(),\n similarIssues: z.array(z.string()).optional(),\n patternId: z.string().optional(),\n // Extended fields for detailed debugging\n diff: DiffContentSchema.optional(),\n executionTrace: ExecutionTraceSchema.optional()\n});\n\nexport type FailureAnalysis = z.infer<typeof FailureAnalysisSchema>;\n\n/**\n * Evaluation run schema.\n *\n * Represents a complete evaluation run with configuration, results, and metrics.\n */\nexport const EvalRunSchema = TenantEntitySchema.extend({\n /** Agent ID for this run */\n agentId: z.string().optional(),\n /** Skills group ID for this run */\n skillsGroupId: z.string().optional(),\n /** Map of skillId to skillVersionId for this run */\n skillVersions: z.record(z.string(), z.string()).optional(),\n /** Scenario IDs to run */\n scenarioIds: z.array(z.string()),\n /** Current status */\n status: EvalStatusSchema,\n /** Progress percentage (0-100) */\n progress: z.number(),\n /** Results for each scenario/target combination (lazy to break eval-result \u2194 eval-run cycle) */\n results: z.array(z.lazy(() => EvalRunResultSchema)),\n /** Aggregated metrics across all results */\n aggregateMetrics: EvalMetricsSchema,\n /** Failure analyses */\n failureAnalyses: z.array(FailureAnalysisSchema).optional(),\n /** Aggregated LLM trace summary */\n llmTraceSummary: LLMTraceSummarySchema.optional(),\n /** What triggered this run */\n trigger: TriggerSchema.optional(),\n /** When the run started (set when evaluation is triggered) */\n startedAt: z.string().optional(),\n /** When the run completed */\n completedAt: z.string().optional(),\n /** Live trace events captured during execution (for playback on results page) */\n liveTraceEvents: z.array(LiveTraceEventSchema).optional(),\n /** Remote job ID for tracking execution in Dev Machines */\n jobId: z.string().optional(),\n /** Remote job status from the Dev Machine API (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED) */\n jobStatus: z.string().optional(),\n /** Remote job error message if the job failed */\n jobError: z.string().optional(),\n /** Timestamp of the last job status check */\n jobStatusCheckedAt: z.string().optional(),\n /** MCP server IDs to enable for this run (optional) */\n mcpIds: z.array(z.string()).optional(),\n /** Sub-agent IDs to enable for this run (optional) */\n subAgentIds: z.array(z.string()).optional()\n});\n\nexport type EvalRun = z.infer<typeof EvalRunSchema>;\n\n/**\n * Input schema for creating a new EvalRun.\n */\nexport const CreateEvalRunInputSchema = EvalRunSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n status: true,\n progress: true,\n results: true,\n aggregateMetrics: true,\n startedAt: true,\n completedAt: true\n});\n\nexport type CreateEvalRunInput = z.infer<typeof CreateEvalRunInputSchema>;\n\n/**\n * Evaluation progress schema.\n */\nexport const EvaluationProgressSchema = z.object({\n runId: z.string(),\n targetId: z.string(),\n totalScenarios: z.number(),\n completedScenarios: z.number(),\n scenarioProgress: z.array(\n z.object({\n scenarioId: z.string(),\n currentStep: z.string(),\n error: z.string().optional()\n })\n ),\n createdAt: z.number()\n});\n\nexport type EvaluationProgress = z.infer<typeof EvaluationProgressSchema>;\n\n/**\n * Evaluation log schema.\n */\nexport const EvaluationLogSchema = z.object({\n runId: z.string(),\n scenarioId: z.string(),\n log: z.object({\n level: z.enum(['info', 'error', 'debug']),\n message: z.string().optional(),\n args: z.array(z.any()).optional(),\n error: z.string().optional()\n })\n});\n\nexport type EvaluationLog = z.infer<typeof EvaluationLogSchema>;\n\n/**\n * LLM timeout constant (2 minutes).\n */\nexport const LLM_TIMEOUT = 120000;\n", "import { z } from 'zod';\n\n/**\n * Live trace event type enum.\n * Maps to the step types but includes streaming states.\n */\nexport enum LiveTraceEventType {\n THINKING = 'thinking',\n TOOL_USE = 'tool_use',\n COMPLETION = 'completion',\n TOOL_RESULT = 'tool_result',\n /** Diagnostic information for debugging environment/setup issues */\n DIAGNOSTIC = 'diagnostic',\n /** Periodic progress heartbeat during long operations */\n PROGRESS = 'progress',\n /** File write operation */\n FILE_WRITE = 'file_write',\n /** File read operation */\n FILE_READ = 'file_read',\n /** System message from the SDK */\n SYSTEM = 'system',\n /** User message (tool result from file operations etc.) */\n USER = 'user'\n}\n\n/**\n * Live trace event schema.\n * Represents a single trace event emitted during agent execution.\n */\nexport const LiveTraceEventSchema = z.object({\n /** The evaluation run ID */\n evalRunId: z.string(),\n /** The scenario ID being executed */\n scenarioId: z.string(),\n /** The scenario name for display */\n scenarioName: z.string(),\n /** The target ID (skill, agent, etc.) */\n targetId: z.string(),\n /** The target name for display */\n targetName: z.string(),\n /** Step number in the current scenario execution */\n stepNumber: z.number(),\n /** Type of trace event */\n type: z.enum(LiveTraceEventType),\n /** Tool name if this is a tool_use event */\n toolName: z.string().optional(),\n /** Tool arguments preview (truncated JSON) */\n toolArgs: z.string().optional(),\n /** Output preview (truncated text) */\n outputPreview: z.string().optional(),\n /** File path for file operations */\n filePath: z.string().optional(),\n /** Elapsed time in milliseconds for progress events */\n elapsedMs: z.number().optional(),\n /** Thinking/reasoning text from Claude */\n thinking: z.string().optional(),\n /** Timestamp when this event occurred */\n timestamp: z.string(),\n /** Whether this is the final event for this scenario */\n isComplete: z.boolean()\n});\n\nexport type LiveTraceEvent = z.infer<typeof LiveTraceEventSchema>;\n\n/**\n * Prefix used in stdout to identify trace events.\n * Format: TRACE_EVENT:{json}\n */\nexport const TRACE_EVENT_PREFIX = 'TRACE_EVENT:';\n\n/**\n * Parse a line from stdout to extract a trace event if present.\n * @param line - A line from stdout\n * @returns The parsed LiveTraceEvent or null if not a trace event line\n */\nexport function parseTraceEventLine(line: string): LiveTraceEvent | null {\n if (!line.startsWith(TRACE_EVENT_PREFIX)) {\n return null;\n }\n\n try {\n const jsonStr = line.slice(TRACE_EVENT_PREFIX.length);\n const parsed = JSON.parse(jsonStr);\n const result = LiveTraceEventSchema.safeParse(parsed);\n return result.success ? result.data : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Format a trace event as a stdout line.\n * @param event - The trace event to format\n * @returns The formatted line with prefix\n */\nexport function formatTraceEventLine(event: LiveTraceEvent): string {\n return `${TRACE_EVENT_PREFIX}${JSON.stringify(event)}`;\n}\n", "import { z } from 'zod';\nimport { BaseEntitySchema } from '../common/base-entity.js';\n\n/**\n * Project schema - represents a tenant/workspace for data isolation.\n *\n * All entities belong to a project. Projects are the top-level\n * organizational unit for multi-tenancy.\n *\n * Note: Project extends BaseEntity (not TenantEntity) since\n * Project IS the tenant and doesn't need a projectId.\n */\nexport const ProjectSchema = BaseEntitySchema.extend({\n appId: z.string().optional().describe('The ID of the app in Dev Center'),\n appSecret: z\n .string()\n .optional()\n .describe('The secret of the app in Dev Center')\n});\n\nexport type Project = z.infer<typeof ProjectSchema>;\n\n/**\n * Input schema for creating a new Project.\n */\nexport const CreateProjectInputSchema = ProjectSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;\n\n/**\n * Input schema for updating a Project.\n */\nexport const UpdateProjectInputSchema = CreateProjectInputSchema.partial();\n\nexport type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\n/**\n * Template schema - a project template that can be used for test environments.\n *\n * Templates are tenant-based entities scoped to a project.\n * They define how to set up a project environment for testing.\n * The `source` field points to a GitHub directory that is fetched via the GitHub API.\n * It is optional to support the transition from the legacy `downloadUrl` field.\n */\nexport const TemplateSchema = TenantEntitySchema.extend({\n /** GitHub source reference for fetching template files */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Template = z.infer<typeof TemplateSchema>;\n\n/**\n * Input schema for creating a new Template.\n */\nexport const CreateTemplateInputSchema = TemplateSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTemplateInput = z.infer<typeof CreateTemplateInputSchema>;\n\n/**\n * Input schema for updating a Template.\n */\nexport const UpdateTemplateInputSchema = CreateTemplateInputSchema.partial();\n\nexport type UpdateTemplateInput = z.infer<typeof UpdateTemplateInputSchema>;\n", "import type { AssertionParameter, AssertionType } from './assertion.js';\n\n/**\n * System assertion definition - built-in assertions available to all projects.\n * These are not stored in the database but defined in code.\n */\nexport interface SystemAssertion {\n /** Unique ID prefixed with 'system:' */\n id: string;\n /** Display name */\n name: string;\n /** Description of what the assertion checks */\n description: string;\n /** Assertion type */\n type: AssertionType;\n /** Parameters that can be configured per-scenario */\n parameters: AssertionParameter[];\n}\n\n/**\n * System assertion IDs - prefixed with 'system:' to distinguish from custom assertions.\n */\nexport const SYSTEM_ASSERTION_IDS = {\n SKILL_WAS_CALLED: 'system:skill_was_called',\n BUILD_PASSED: 'system:build_passed',\n LLM_JUDGE: 'system:llm_judge'\n} as const;\n\nexport type SystemAssertionId =\n (typeof SYSTEM_ASSERTION_IDS)[keyof typeof SYSTEM_ASSERTION_IDS];\n\n/**\n * Check if an assertion ID is a system assertion.\n */\nexport function isSystemAssertionId(id: string): id is SystemAssertionId {\n return id.startsWith('system:');\n}\n\n/**\n * Built-in system assertions.\n * These are available to all projects without needing to create them.\n */\nexport const SYSTEM_ASSERTIONS: Record<SystemAssertionId, SystemAssertion> = {\n [SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED]: {\n id: SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED,\n name: 'Skill Was Called',\n description:\n 'Check that one or more skills were invoked during the agent run',\n type: 'skill_was_called',\n parameters: [\n {\n name: 'skillNames',\n label: 'Skills',\n type: 'string',\n required: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.BUILD_PASSED]: {\n id: SYSTEM_ASSERTION_IDS.BUILD_PASSED,\n name: 'Build Passed',\n description: 'Run a build command and verify it exits with expected code',\n type: 'build_passed',\n parameters: [\n {\n name: 'command',\n label: 'Build Command',\n type: 'string',\n required: false,\n defaultValue: 'yarn build'\n },\n {\n name: 'expectedExitCode',\n label: 'Expected Exit Code',\n type: 'number',\n required: false,\n defaultValue: 0\n },\n {\n name: 'maxBuildTime',\n label: 'Max Build Time (ms)',\n type: 'number',\n required: false,\n advanced: true\n },\n {\n name: 'maxMemory',\n label: 'Max Memory (MB)',\n type: 'number',\n required: false,\n advanced: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.LLM_JUDGE]: {\n id: SYSTEM_ASSERTION_IDS.LLM_JUDGE,\n name: 'LLM Judge',\n description: 'LLM evaluates the output and assigns a score (0-100)',\n type: 'llm_judge',\n parameters: [\n {\n name: 'prompt',\n label: 'Judge Prompt',\n type: 'string',\n required: true,\n defaultValue: 'Verify the output meets the acceptance criteria.'\n },\n {\n name: 'systemPrompt',\n label: 'System Prompt (optional)',\n type: 'string',\n required: false,\n defaultValue:\n 'You are judging a scenario run. Use these values:\\n- {{output}}: the agent\\'s final output\\n- {{cwd}}: working directory\\n- {{changedFiles}}: list of files changed (or \"No files were changed\")\\n- {{trace}}: step-by-step trace (tool calls, completions) to check e.g. which tools were called and how many times\\n\\nJudge how well the output meets the acceptance criteria stated in the user prompt.'\n },\n {\n name: 'minScore',\n label: 'Minimum Score (0-100)',\n type: 'number',\n required: false,\n defaultValue: 70\n }\n ]\n }\n};\n\n/**\n * Get all system assertions as an array.\n */\nexport function getSystemAssertions(): SystemAssertion[] {\n return Object.values(SYSTEM_ASSERTIONS);\n}\n\n/**\n * Get a system assertion by ID.\n */\nexport function getSystemAssertion(\n id: SystemAssertionId\n): SystemAssertion | undefined {\n return SYSTEM_ASSERTIONS[id];\n}\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA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SAAS,sBAAyC;AACvD,SAAO,OAAO,OAAO,iBAAiB;AACxC;AAKO,SAAS,mBACd,IAC6B;AAC7B,SAAO,kBAAkB,EAAE;AAC7B;",
|
|
4
|
+
"sourcesContent": ["/**\n * @wix/evalforge-types\n *\n * Unified types for the agent evaluation system.\n *\n * Entity Hierarchy:\n * - BaseEntity: id, name, description, dates\n * - TenantEntity: extends BaseEntity with projectId\n * - Target: extends TenantEntity (base for testable entities)\n * - Agent: CLI-based agent (runCommand, modelConfig)\n * - Skill: SKILL.md-based capability\n *\n * Test Types (9 total):\n * - LLM, TOOL, SITE_CONFIG, COMMAND_EXECUTION (from old system)\n * - FILE_PRESENCE, FILE_CONTENT, BUILD_CHECK, VITEST, PLAYWRIGHT_NL (new)\n */\n\n// Common - base schemas and utilities\nexport * from './common/index.js';\n\n// Target - testable entities\nexport * from './target/index.js';\n\n// Test - all test type definitions\nexport * from './test/index.js';\n\n// Scenario - test scenarios and environment\nexport * from './scenario/index.js';\n\n// Suite - test organization\nexport * from './suite/index.js';\n\n// Evaluation - runs, configs, and results\nexport * from './evaluation/index.js';\n\n// Project - multi-tenancy\nexport * from './project/index.js';\n\n// Template - project templates (global entities)\nexport * from './template/index.js';\n\n// Agent - adapter interface for agent implementations\nexport * from './agent/index.js';\n\n// Assertion - custom assertions stored in database\nexport * from './assertion/index.js';\n", "import { z } from 'zod';\n\n/**\n * Base entity schema with common fields for all entities.\n */\nexport const BaseEntitySchema = z.object({\n id: z.string(),\n name: z.string().min(1),\n description: z.string(),\n createdAt: z.string(),\n updatedAt: z.string(),\n deleted: z.boolean().optional()\n});\n\nexport type BaseEntity = z.infer<typeof BaseEntitySchema>;\n\n/**\n * Tenant entity schema - extends BaseEntity with projectId for multi-tenancy.\n */\nexport const TenantEntitySchema = BaseEntitySchema.extend({\n projectId: z.string()\n});\n\nexport type TenantEntity = z.infer<typeof TenantEntitySchema>;\n", "import { z } from 'zod';\n\n/**\n * GitHub source reference for a directory in a GitHub repository.\n * Used by skills and templates to point to content that can be fetched via the GitHub API.\n */\nexport const GitHubSourceSchema = z.object({\n /** GitHub org or user, e.g. \"wix\" */\n owner: z.string().min(1),\n /** Repository name, e.g. \"skills\" */\n repo: z.string().min(1),\n /** Folder path within the repo, e.g. \"wix-cli/skills/wix-cli-dashboard-page\" */\n path: z.string().min(1),\n /** Git ref (branch, tag, or SHA), e.g. \"master\" or \"v1.2.0\" */\n ref: z.string().min(1)\n});\n\nexport type GitHubSource = z.infer<typeof GitHubSourceSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from './base-entity.js';\n\n/**\n * Top-level key for the .mcp.json file written at run start.\n * Format: { [MCP_SERVERS_JSON_KEY]: { [mcpName]: config } }\n */\nexport const MCP_SERVERS_JSON_KEY = 'mcpServers';\n\n/**\n * MCP Entity schema - an MCP server definition stored per project.\n *\n * `name` is a display label for the entity (does NOT need to match the server\n * key inside `config`).\n *\n * `config` is a keyed `.mcp.json` entry, e.g.:\n * ```json\n * { \"wix-mcp\": { \"type\": \"http\", \"url\": \"\u2026\", \"headers\": { \u2026 } } }\n * ```\n * At evaluation time every MCP's config is spread into the `mcpServers` object\n * of the generated `.mcp.json` file.\n */\nexport const MCPEntitySchema = TenantEntitySchema.extend({\n /** Display name for the MCP entity (independent of the server key in config) */\n name: z.string().min(1),\n /** Keyed MCP server config \u2014 top-level key is the server name, value is its config */\n config: z.record(z.string(), z.unknown())\n});\n\nexport type MCPEntity = z.infer<typeof MCPEntitySchema>;\n\n/**\n * Input schema for creating a new MCP.\n */\nexport const CreateMcpInputSchema = MCPEntitySchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateMcpInput = z.infer<typeof CreateMcpInputSchema>;\n\n/**\n * Input schema for updating an MCP.\n */\nexport const UpdateMcpInputSchema = CreateMcpInputSchema.partial();\n\nexport type UpdateMcpInput = z.infer<typeof UpdateMcpInputSchema>;\n\n/**\n * MCP Server Configuration (legacy - for mcp.json config shape).\n * Config can be: { command, args }, { url, headers }, { type, command, args, env }, etc.\n */\nexport const MCPServerConfigSchema = z.record(z.string(), z.unknown());\n\nexport type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;\n", "import { z } from 'zod';\n\n/**\n * Anthropic Model IDs supported by the AI Gateway.\n * These values match the ClaudeModel enum from the Wix AI Gateway API.\n */\nexport enum ModelIds {\n CLAUDE_3_HAIKU_1_0 = 'CLAUDE_3_HAIKU_1_0',\n CLAUDE_3_OPUS_1_0 = 'CLAUDE_3_OPUS_1_0',\n CLAUDE_3_SONNET_1_0 = 'CLAUDE_3_SONNET_1_0',\n CLAUDE_3_5_SONNET_1_0 = 'CLAUDE_3_5_SONNET_1_0',\n CLAUDE_3_5_SONNET_2_0 = 'CLAUDE_3_5_SONNET_2_0',\n CLAUDE_3_7_SONNET_1_0 = 'CLAUDE_3_7_SONNET_1_0',\n CLAUDE_4_OPUS_1_0 = 'CLAUDE_4_OPUS_1_0',\n CLAUDE_4_SONNET_1_0 = 'CLAUDE_4_SONNET_1_0',\n CLAUDE_4_5_HAIKU_1_0 = 'CLAUDE_4_5_HAIKU_1_0'\n}\n\nexport const ModelIdsSchema = z.enum(ModelIds);\n\n/**\n * Model configuration schema for specifying model parameters.\n */\nconst nullToUndefined = (val: unknown) => (val === null ? undefined : val);\n\nexport const ModelConfigSchema = z.object({\n model: ModelIdsSchema,\n temperature: z.preprocess(\n nullToUndefined,\n z.number().min(0).max(1).optional()\n ),\n maxTokens: z.preprocess(nullToUndefined, z.number().min(1).optional())\n});\n\nexport type ModelConfig = z.infer<typeof ModelConfigSchema>;\n\n/**\n * Model pricing schema (cost per 1M tokens).\n */\nexport const ModelPricingSchema = z.object({\n inputPer1M: z.number(),\n outputPer1M: z.number()\n});\n\nexport type ModelPricing = z.infer<typeof ModelPricingSchema>;\n\n/**\n * Model schema - complete model definition with metadata and pricing.\n */\nexport const ModelSchema = z.object({\n /** AI Gateway model ID */\n id: ModelIdsSchema,\n /** Display name */\n name: z.string(),\n /** Provider (always 'anthropic') */\n provider: z.literal('anthropic'),\n /** Provider's model identifier (e.g., \"claude-3-5-sonnet-20241022\") */\n providerModelId: z.string(),\n /** Pricing per 1M tokens */\n pricing: ModelPricingSchema\n});\n\nexport type Model = z.infer<typeof ModelSchema>;\n\n/**\n * Available models with full metadata including pricing.\n */\nexport const AVAILABLE_MODELS: Model[] = [\n {\n id: ModelIds.CLAUDE_4_5_HAIKU_1_0,\n name: 'Claude 4.5 Haiku',\n provider: 'anthropic',\n providerModelId: 'claude-haiku-4-5-20251001',\n pricing: { inputPer1M: 0.8, outputPer1M: 4 }\n },\n {\n id: ModelIds.CLAUDE_4_SONNET_1_0,\n name: 'Claude 4 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-sonnet-4-20250514',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_4_OPUS_1_0,\n name: 'Claude 4 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-opus-4-20250514',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_7_SONNET_1_0,\n name: 'Claude 3.7 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-7-sonnet-20250219',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_2_0,\n name: 'Claude 3.5 Sonnet v2',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20241022',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_1_0,\n name: 'Claude 3.5 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20240620',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_OPUS_1_0,\n name: 'Claude 3 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-3-opus-20240229',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_SONNET_1_0,\n name: 'Claude 3 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-sonnet-20240229',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_HAIKU_1_0,\n name: 'Claude 3 Haiku',\n provider: 'anthropic',\n providerModelId: 'claude-3-haiku-20240307',\n pricing: { inputPer1M: 0.25, outputPer1M: 1.25 }\n }\n];\n\n/**\n * Available models as a map keyed by model ID.\n */\nexport const AVAILABLE_MODELS_MAP: Record<ModelIds, Model> = Object.fromEntries(\n AVAILABLE_MODELS.map((model) => [model.id, model])\n) as Record<ModelIds, Model>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Target schema - base for all testable entities.\n *\n * All testable entities (Agent, Skill) extend this schema.\n * This creates a unified type hierarchy for what can be evaluated.\n */\nexport const TargetSchema = TenantEntitySchema.extend({\n // Base for all testable entities\n // Specific targets add their own fields\n});\n\nexport type Target = z.infer<typeof TargetSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { ModelConfigSchema } from '../common/models.js';\n\n/**\n * Agent schema - a CLI-based coding agent.\n *\n * Agents are external CLI tools that can execute coding tasks.\n * Examples: Claude Code CLI, Codex CLI, Cursor CLI.\n */\nexport const AgentSchema = TargetSchema.extend({\n /** Command to run the agent */\n runCommand: z.string(),\n /** Optional model configuration override */\n modelConfig: ModelConfigSchema.optional()\n});\n\nexport type Agent = z.infer<typeof AgentSchema>;\n\n/**\n * Input schema for creating a new Agent.\n */\nexport const CreateAgentInputSchema = AgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateAgentInput = z.infer<typeof CreateAgentInputSchema>;\n\n/**\n * Input schema for updating an Agent.\n * modelConfig can be null to explicitly clear it (vs undefined = keep existing).\n */\nexport const UpdateAgentInputSchema = CreateAgentInputSchema.partial().extend({\n modelConfig: ModelConfigSchema.optional().nullable()\n});\n\nexport type UpdateAgentInput = z.infer<typeof UpdateAgentInputSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\nexport { GitHubSourceSchema };\nexport type { GitHubSource } from '../common/github-source.js';\n\n/**\n * Regex for valid skill folder names (kebab-case).\n * Allows: lowercase letters, numbers, hyphens. Words separated by single hyphens.\n * Examples: my-skill, code-review, skill1\n */\nexport const SKILL_FOLDER_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\n/**\n * Regex for valid semver strings (major.minor.patch).\n * Examples: 1.0.0, 2.3.1, 10.20.30\n */\nexport const SEMVER_REGEX = /^\\d+\\.\\d+\\.\\d+$/;\n\n/**\n * Origin of a skill version - how the version was created.\n * - manual: Created through the UI\n * - pr: Created from a pull request (via CI/CD API)\n * - master: Synced from the main branch (via CI/CD API)\n */\nexport const SkillVersionOriginSchema = z.enum(['manual', 'pr', 'master']);\nexport type SkillVersionOrigin = z.infer<typeof SkillVersionOriginSchema>;\n\n/**\n * Check if a string is a valid skill folder name (kebab-case).\n * Used for validation when creating skills and when writing skills to filesystem.\n */\nexport function isValidSkillFolderName(name: string): boolean {\n return (\n typeof name === 'string' &&\n name.length > 0 &&\n SKILL_FOLDER_NAME_REGEX.test(name.trim())\n );\n}\n\n/**\n * Skill metadata parsed from SKILL.md frontmatter.\n *\n * Following the agentskills.io specification:\n * - name: Skill identifier (max 64 chars, lowercase + hyphens)\n * - description: What the skill does and when to use it\n * - allowedTools: Pre-approved tools the skill may use\n * - skills: Sub-skills for composite agents\n */\nexport const SkillMetadataSchema = z.object({\n name: z.string(),\n description: z.string(),\n allowedTools: z.array(z.string()).optional(),\n skills: z.array(z.string()).optional()\n});\n\nexport type SkillMetadata = z.infer<typeof SkillMetadataSchema>;\n\n/**\n * A single file within a skill directory snapshot.\n */\nexport const SkillFileSchema = z.object({\n /** Relative path within the skill directory, e.g. \"SKILL.md\" or \"references/API_SPEC.md\" */\n path: z.string().min(1),\n /** File content (UTF-8 text) */\n content: z.string()\n});\n\nexport type SkillFile = z.infer<typeof SkillFileSchema>;\n\n/**\n * Skill version - immutable snapshot of a Skill's content.\n *\n * New versions store a `files` array (snapshot of the skill directory from GitHub)\n * and a `source` reference (where the snapshot came from).\n *\n * Versions are immutable - editing creates a new version.\n */\nexport const SkillVersionSchema = z.object({\n id: z.string(),\n projectId: z.string(),\n skillId: z.string(),\n /** Semver string (e.g. \"1.2.0\") or Falcon fingerprint */\n version: z.string(),\n /** How this version was created */\n origin: SkillVersionOriginSchema,\n /** Where this snapshot was taken from */\n source: GitHubSourceSchema.optional(),\n /** Frozen snapshot of all files in the skill directory */\n files: z.array(SkillFileSchema).optional(),\n /** Optional notes about this version (changelog, reason for change) */\n notes: z.string().optional(),\n createdAt: z.string()\n});\n\nexport type SkillVersion = z.infer<typeof SkillVersionSchema>;\n\n/**\n * Input schema for creating a new SkillVersion.\n *\n * For source-based creation: provide `source` (or omit to use the Skill's source).\n * The backend fetches the folder and stores the snapshot as `files`.\n * For inline creation: provide `files` with the SKILL.md content.\n *\n * `version` is required -- the caller must always provide an explicit version string.\n */\nexport const CreateSkillVersionInputSchema = z.object({\n /** GitHub source to snapshot from. If not provided, uses the Skill's source. */\n source: GitHubSourceSchema.optional(),\n /** Version string for this snapshot (e.g. \"1.0.0\", \"1.0.3\"). */\n version: z.string().min(1),\n notes: z.string().optional(),\n /** Origin of this version. Defaults to 'manual' in backend. */\n origin: SkillVersionOriginSchema.optional(),\n /** Pre-edited files to store directly (bypasses GitHub fetch when provided) */\n files: z.array(SkillFileSchema).optional()\n});\n\nexport type CreateSkillVersionInput = z.infer<\n typeof CreateSkillVersionInputSchema\n>;\n\n/**\n * Skill schema - a lightweight container for a coding capability.\n *\n * Skills are containers identified by a kebab-case name.\n * All content (files, notes, etc.) lives in SkillVersion.\n * The `source` field points to the GitHub directory for live fetching.\n * Persisted shape: id, projectId, name, source, createdAt, updatedAt, deleted.\n *\n * Note: `description` is inherited from BaseEntity. It's not stored in the DB\n * for skills (content lives in SkillVersion), but is kept on the type to\n * satisfy the TenantEntity constraint. The repository always returns \"\".\n */\nexport const SkillSchema = TargetSchema.extend({\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Skill = z.infer<typeof SkillSchema>;\n\nconst KEBAB_CASE_MESSAGE =\n 'Name must be in kebab-case (lowercase letters, numbers, hyphens only, e.g. my-skill)';\n\nconst SkillInputBaseSchema = SkillSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true,\n description: true,\n source: true\n}).extend({\n /** Optional - not stored on Skill; content description lives in SkillVersion */\n description: z.string().optional(),\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\n/**\n * Inline initial version data provided when creating a skill atomically.\n * When present on a POST /skills request, the backend creates the skill\n * and its first version in a single request with rollback on failure.\n */\nexport const InitialVersionInputSchema = z.object({\n files: z.array(SkillFileSchema).optional(),\n notes: z.string().optional(),\n source: GitHubSourceSchema.optional(),\n version: z.string().optional(),\n origin: SkillVersionOriginSchema.optional()\n});\n\nexport type InitialVersionInput = z.infer<typeof InitialVersionInputSchema>;\n\n/**\n * Input schema for creating a new Skill.\n * Only `name` and `projectId` are required. `description` is ignored (lives in SkillVersion).\n * Pass `initialVersion` to atomically create the skill and its first version.\n */\nexport const CreateSkillInputSchema = SkillInputBaseSchema.extend({\n initialVersion: InitialVersionInputSchema.optional()\n}).refine((data) => isValidSkillFolderName(data.name), {\n message: KEBAB_CASE_MESSAGE,\n path: ['name']\n});\n\nexport type CreateSkillInput = z.infer<typeof CreateSkillInputSchema>;\n\n/**\n * Input schema for updating a Skill.\n */\nexport const UpdateSkillInputSchema = SkillInputBaseSchema.partial().refine(\n (data) => data.name === undefined || isValidSkillFolderName(data.name),\n { message: KEBAB_CASE_MESSAGE, path: ['name'] }\n);\n\nexport type UpdateSkillInput = z.infer<typeof UpdateSkillInputSchema>;\n\n/**\n * Skill with its latest version - used when displaying skills in the UI\n * and in the evaluator to access skill content.\n */\nexport const SkillWithLatestVersionSchema = SkillSchema.extend({\n latestVersion: SkillVersionSchema.optional()\n});\n\nexport type SkillWithLatestVersion = z.infer<\n typeof SkillWithLatestVersionSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * SkillsGroup schema - a collection of skills (replaces TargetGroup for the new model).\n *\n * Eval runs can be scoped to a skills group to run against all skills in the group.\n */\nexport const SkillsGroupSchema = TenantEntitySchema.extend({\n /** IDs of skills in this group */\n skillIds: z.array(z.string())\n});\n\nexport type SkillsGroup = z.infer<typeof SkillsGroupSchema>;\n\n/**\n * Input schema for creating a new SkillsGroup.\n */\nexport const CreateSkillsGroupInputSchema = SkillsGroupSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateSkillsGroupInput = z.infer<\n typeof CreateSkillsGroupInputSchema\n>;\n\n/**\n * Input schema for updating a SkillsGroup.\n */\nexport const UpdateSkillsGroupInputSchema =\n CreateSkillsGroupInputSchema.partial();\n\nexport type UpdateSkillsGroupInput = z.infer<\n typeof UpdateSkillsGroupInputSchema\n>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\n\n/**\n * Sub-agent schema \u2013 a Markdown file with YAML frontmatter.\n *\n * Sub-agents are specialized AI assistants (per Claude Code docs)\n * defined in Markdown with frontmatter (name, description, tools, model, etc.).\n * The body is the system prompt.\n *\n */\nexport const SubAgentSchema = TargetSchema.extend({\n /** The full sub-agent markdown content (YAML frontmatter + body) */\n subAgentMd: z.string()\n});\n\nexport type SubAgent = z.infer<typeof SubAgentSchema>;\n\nconst SubAgentInputBaseSchema = SubAgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport const CreateSubAgentInputSchema = SubAgentInputBaseSchema;\n\nexport type CreateSubAgentInput = z.infer<typeof CreateSubAgentInputSchema>;\n\nexport const UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();\n\nexport type UpdateSubAgentInput = z.infer<typeof UpdateSubAgentInputSchema>;\n", "import { z } from 'zod';\n\n// Base exports\nexport * from './base.js';\n\n// Individual test types\nexport * from './llm.js';\nexport * from './tool.js';\nexport * from './site-config.js';\nexport * from './command-execution.js';\nexport * from './file-presence.js';\nexport * from './file-content.js';\nexport * from './build-check.js';\nexport * from './vitest.js';\nexport * from './playwright-nl.js';\n\n// Import schemas for union\nimport { LLMTestSchema, LLMTestResult } from './llm.js';\nimport { ToolTestSchema, ToolTestResult } from './tool.js';\nimport { SiteConfigTestSchema, SiteConfigTestResult } from './site-config.js';\nimport {\n CommandExecutionTestSchema,\n CommandExecutionTestResult\n} from './command-execution.js';\nimport {\n FilePresenceTestSchema,\n FilePresenceTestResult\n} from './file-presence.js';\nimport {\n FileContentTestSchema,\n FileContentTestResult\n} from './file-content.js';\nimport { BuildCheckTestSchema, BuildCheckTestResult } from './build-check.js';\nimport { VitestTestSchema, VitestTestResult } from './vitest.js';\nimport {\n PlaywrightNLTestSchema,\n PlaywrightNLTestResult\n} from './playwright-nl.js';\n\n/**\n * Unified Test schema - discriminated union of all 9 test types.\n */\nexport const TestSchema = z.discriminatedUnion('type', [\n LLMTestSchema,\n ToolTestSchema,\n SiteConfigTestSchema,\n CommandExecutionTestSchema,\n FilePresenceTestSchema,\n FileContentTestSchema,\n BuildCheckTestSchema,\n VitestTestSchema,\n PlaywrightNLTestSchema\n]);\n\nexport type Test = z.infer<typeof TestSchema>;\n\n/**\n * Union of all test result types.\n */\nexport type TestResult =\n | LLMTestResult\n | ToolTestResult\n | SiteConfigTestResult\n | CommandExecutionTestResult\n | FilePresenceTestResult\n | FileContentTestResult\n | BuildCheckTestResult\n | VitestTestResult\n | PlaywrightNLTestResult;\n", "import { z } from 'zod';\n\n/**\n * Test types - unified from old and new systems.\n */\nexport enum TestType {\n // From old system\n LLM = 'LLM',\n TOOL = 'TOOL',\n SITE_CONFIG = 'SITE_CONFIG',\n COMMAND_EXECUTION = 'COMMAND_EXECUTION',\n // From new system\n FILE_PRESENCE = 'FILE_PRESENCE',\n FILE_CONTENT = 'FILE_CONTENT',\n BUILD_CHECK = 'BUILD_CHECK',\n VITEST = 'VITEST',\n PLAYWRIGHT_NL = 'PLAYWRIGHT_NL'\n}\n\nexport const TestTypeSchema = z.enum(TestType);\n\n/**\n * Test importance levels.\n */\nexport enum TestImportance {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n CRITICAL = 'critical'\n}\n\nexport const TestImportanceSchema = z.enum(TestImportance);\n\n/**\n * Base test schema - common fields for all test types.\n */\nexport const BaseTestSchema = z.object({\n id: z.string(),\n type: TestTypeSchema,\n name: z.string().min(3),\n description: z.string().optional(),\n importance: TestImportanceSchema.optional()\n});\n\nexport type BaseTest = z.infer<typeof BaseTestSchema>;\n\n/**\n * Base test result interface.\n */\nexport interface BaseTestResult {\n type: TestType;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * LLM Test schema - tests that use an LLM evaluator.\n */\nexport const LLMTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.LLM),\n /** Maximum steps for the LLM to take */\n maxSteps: z.number().min(1).max(100),\n /** Prompt to send to the evaluator */\n prompt: z.string().min(1),\n /** ID of the evaluator agent to use */\n evaluatorId: z.string()\n});\n\nexport type LLMTest = z.infer<typeof LLMTestSchema>;\n\n/**\n * LLM Test result.\n */\nexport interface LLMTestResult extends BaseTestResult {\n type: TestType.LLM;\n testPrompt: string;\n testSystemPrompt?: string;\n text: string;\n scoreReasoning: string;\n score: number;\n totalMicrocentsSpent?: number;\n usage?: {\n promptTokens?: number;\n completionTokens?: number;\n totalTokens?: number;\n };\n reasoning?: string;\n reasoningDetails?: unknown;\n finishReason?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Tool Test schema - tests that verify tool usage.\n */\nexport const ToolTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.TOOL),\n /** Name of the tool that should be called */\n toolName: z.string().min(3),\n /** Expected arguments for the tool call */\n args: z.record(z.string(), z.any()),\n /** Expected content in the tool results */\n resultsContent: z.string()\n});\n\nexport type ToolTest = z.infer<typeof ToolTestSchema>;\n\n/**\n * Tool Test result.\n */\nexport interface ToolTestResult extends BaseTestResult {\n type: TestType.TOOL;\n result: boolean;\n toolUsed: boolean;\n actualArgs: Record<string, any>;\n isResultsValid: boolean;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Site Config Test schema - tests that verify site configuration via API.\n */\nexport const SiteConfigTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.SITE_CONFIG),\n /** URL to call */\n url: z.string().url(),\n /** HTTP method */\n method: z.enum(['GET', 'POST']),\n /** Request body (for POST) */\n body: z.string().optional(),\n /** Expected HTTP status code */\n expectedStatusCode: z.number().int().min(100).max(599),\n /** Expected response content */\n expectedResponse: z.string().optional(),\n /** JMESPath expression to extract from response */\n expectedResponseJMESPath: z.string().optional()\n});\n\nexport type SiteConfigTest = z.infer<typeof SiteConfigTestSchema>;\n\n/**\n * Site Config Test result.\n */\nexport interface SiteConfigTestResult extends BaseTestResult {\n type: TestType.SITE_CONFIG;\n result: boolean;\n actualStatusCode: number;\n actualResponse: unknown;\n allActualResponse: unknown;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Allowed commands for command execution tests.\n */\nexport const AllowedCommands = [\n 'yarn install --no-immutable && yarn build',\n 'npm run build',\n 'yarn typecheck'\n] as const;\n\n/**\n * Command Execution Test schema - tests that verify command execution.\n */\nexport const CommandExecutionTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.COMMAND_EXECUTION),\n /** Command to execute (must be in AllowedCommands) */\n command: z\n .string()\n .refine((value) => (AllowedCommands as readonly string[]).includes(value), {\n message: `Command must be one of: ${AllowedCommands.join(', ')}`\n }),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().default(0).optional()\n});\n\nexport type CommandExecutionTest = z.infer<typeof CommandExecutionTestSchema>;\n\n/**\n * Command Execution Test result.\n */\nexport interface CommandExecutionTestResult extends BaseTestResult {\n type: TestType.COMMAND_EXECUTION;\n stdout: string;\n stderr: string;\n exitCode: number | null;\n expectedExitCode: number;\n result: boolean;\n error?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File Presence Test schema - tests that verify file existence.\n */\nexport const FilePresenceTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_PRESENCE),\n /** Paths to check */\n paths: z.array(z.string()),\n /** Whether files should exist (true) or not exist (false) */\n shouldExist: z.boolean()\n});\n\nexport type FilePresenceTest = z.infer<typeof FilePresenceTestSchema>;\n\n/**\n * File Presence Test result.\n */\nexport interface FilePresenceTestResult extends BaseTestResult {\n type: TestType.FILE_PRESENCE;\n result: boolean;\n existingPaths: string[];\n missingPaths: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File content checks schema.\n */\nexport const FileContentCheckSchema = z.object({\n /** Strings that must be present in the file */\n contains: z.array(z.string()).optional(),\n /** Strings that must NOT be present in the file */\n notContains: z.array(z.string()).optional(),\n /** Regex pattern the content must match */\n matches: z.string().optional(),\n /** JSON path checks for structured content */\n jsonPath: z\n .array(\n z.object({\n path: z.string(),\n value: z.unknown()\n })\n )\n .optional(),\n /** Lines that should be added (for diff checking) */\n added: z.array(z.string()).optional(),\n /** Lines that should be removed (for diff checking) */\n removed: z.array(z.string()).optional()\n});\n\nexport type FileContentCheck = z.infer<typeof FileContentCheckSchema>;\n\n/**\n * File Content Test schema - tests that verify file content.\n *\n * This also covers the FILE_MODIFICATION use case from the old system\n * by supporting added/removed line checks.\n */\nexport const FileContentTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_CONTENT),\n /** Path to the file to check */\n path: z.string(),\n /** Content checks to perform */\n checks: FileContentCheckSchema\n});\n\nexport type FileContentTest = z.infer<typeof FileContentTestSchema>;\n\n/**\n * File Content Test result.\n */\nexport interface FileContentTestResult extends BaseTestResult {\n type: TestType.FILE_CONTENT;\n result: boolean;\n diff?: string;\n failedChecks?: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Build Check Test schema - tests that verify build success.\n */\nexport const BuildCheckTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.BUILD_CHECK),\n /** Build command to execute */\n command: z.string(),\n /** Whether the build should succeed */\n expectSuccess: z.boolean(),\n /** Maximum allowed warnings (optional) */\n allowedWarnings: z.number().optional(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type BuildCheckTest = z.infer<typeof BuildCheckTestSchema>;\n\n/**\n * Build Check Test result.\n */\nexport interface BuildCheckTestResult extends BaseTestResult {\n type: TestType.BUILD_CHECK;\n result: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n warningCount: number;\n duration: number;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Vitest Test schema - tests that run Vitest test files.\n */\nexport const VitestTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.VITEST),\n /** Test file content */\n testFile: z.string(),\n /** Name of the test file */\n testFileName: z.string(),\n /** Minimum pass rate required (0-100) */\n minPassRate: z.number().min(0).max(100)\n});\n\nexport type VitestTest = z.infer<typeof VitestTestSchema>;\n\n/**\n * Vitest Test result.\n */\nexport interface VitestTestResult extends BaseTestResult {\n type: TestType.VITEST;\n result: boolean;\n passRate: number;\n passed: number;\n failed: number;\n skipped: number;\n total: number;\n duration: number;\n output: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Playwright Natural Language Test schema - tests using natural language descriptions.\n */\nexport const PlaywrightNLTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.PLAYWRIGHT_NL),\n /** Natural language steps to execute */\n steps: z.array(z.string()),\n /** Expected outcome description */\n expectedOutcome: z.string(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type PlaywrightNLTest = z.infer<typeof PlaywrightNLTestSchema>;\n\n/**\n * Playwright NL Test result.\n */\nexport interface PlaywrightNLTestResult extends BaseTestResult {\n type: TestType.PLAYWRIGHT_NL;\n result: boolean;\n stepsExecuted: number;\n totalSteps: number;\n failedStep?: string;\n screenshot?: string;\n duration: number;\n}\n", "import { z } from 'zod';\n\n/**\n * Assertion: the agent must have invoked one or more skills during the run.\n * Checked by inspecting the LLM trace for \"Skill\" tool uses with the given skills.\n * When multiple skills are in one assertion, they are treated as a group (1 assertion).\n * Each skill in the group must have been called for the assertion to pass.\n * To check skills independently, add them as separate assertions.\n */\nexport const SkillWasCalledAssertionSchema = z.object({\n type: z.literal('skill_was_called'),\n /** Names of the skills that must have been called (matched against trace Skill tool args) */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledAssertion = z.infer<\n typeof SkillWasCalledAssertionSchema\n>;\n\n/**\n * Assertion: a build command must exit with the expected code (default 0).\n * Runs the command in the scenario working directory.\n */\nexport const BuildPassedAssertionSchema = z.object({\n type: z.literal('build_passed'),\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedAssertion = z.infer<typeof BuildPassedAssertionSchema>;\n\n/**\n * Assertion: an LLM judges the scenario output (score 0-100).\n * Prompt can use {{output}}, {{cwd}}, {{changedFiles}}, {{trace}}.\n * Passes if judge score >= minScore.\n */\nexport const LlmJudgeAssertionSchema = z.object({\n type: z.literal('llm_judge'),\n /** Prompt template; placeholders: {{output}}, {{cwd}}, {{changedFiles}}, {{trace}} */\n prompt: z.string(),\n /** Optional system prompt for the judge (default asks for JSON with score) */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku) */\n model: z.string().optional(),\n maxTokens: z.number().int().optional(),\n temperature: z.number().min(0).max(1).optional()\n});\n\nexport type LlmJudgeAssertion = z.infer<typeof LlmJudgeAssertionSchema>;\n\n/**\n * Union of all assertion types (per scenario).\n * Each assertion has a type and type-specific data.\n * Uses z.union (not z.discriminatedUnion) for Zod v4 compatibility when used as array element.\n */\nexport const AssertionSchema = z.union([\n SkillWasCalledAssertionSchema,\n BuildPassedAssertionSchema,\n LlmJudgeAssertionSchema\n]);\n\nexport type Assertion = z.infer<typeof AssertionSchema>;\n", "import { z } from 'zod';\n\n/**\n * Local project configuration schema.\n */\nexport const LocalProjectConfigSchema = z.object({\n /** Template ID to use for the local project */\n templateId: z.string().optional(),\n /** Files to create in the project */\n files: z\n .array(\n z.object({\n path: z.string().min(1),\n content: z.string().min(1)\n })\n )\n .optional()\n});\n\nexport type LocalProjectConfig = z.infer<typeof LocalProjectConfigSchema>;\n\n/**\n * Meta site configuration schema for API-based setup.\n */\nexport const MetaSiteConfigSchema = z.object({\n configurations: z\n .array(\n z.object({\n name: z.string().min(1),\n apiCalls: z.array(\n z.object({\n url: z.string().url(),\n method: z.enum(['POST', 'PUT']),\n body: z.string()\n })\n )\n })\n )\n .optional()\n});\n\nexport type MetaSiteConfig = z.infer<typeof MetaSiteConfigSchema>;\n\n/**\n * Environment configuration schema.\n *\n * Defines the environment setup required for running a test scenario.\n * Migrated from the old Prompt schema.\n */\nexport const EnvironmentSchema = z.object({\n /** Local project configuration */\n localProject: LocalProjectConfigSchema.optional(),\n /** Meta site configuration */\n metaSite: MetaSiteConfigSchema.optional()\n});\n\nexport type Environment = z.infer<typeof EnvironmentSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { AssertionSchema } from './assertions.js';\nimport { ScenarioAssertionLinkSchema } from '../assertion/assertion.js';\n\n/**\n * Expected file schema - a file the agent is expected to create or modify.\n * Used by eval results; not persisted on test_scenarios table.\n */\nexport const ExpectedFileSchema = z.object({\n /** Relative path where the file should be created */\n path: z.string(),\n /** Optional expected content */\n content: z.string().optional()\n});\n\nexport type ExpectedFile = z.infer<typeof ExpectedFileSchema>;\n\n/**\n * TestScenario schema - defines a single test scenario.\n *\n * Persisted shape matches test_scenarios table:\n * id, project_id, name, description, trigger_prompt, template_id, created_at, updated_at, deleted.\n * Linked assertions stored in scenario_assertions junction table.\n */\nexport const TestScenarioSchema = TenantEntitySchema.extend({\n /** The prompt sent to the agent to trigger the task */\n triggerPrompt: z.string().min(10),\n /** ID of the template to use for this scenario (null = no template) */\n templateId: z.string().nullish(),\n /** Inline assertions to evaluate for this scenario (legacy) */\n assertions: z.array(AssertionSchema).optional(),\n /** IDs of saved assertions to evaluate (from assertions table) - legacy, use assertionLinks */\n assertionIds: z.array(z.string()).optional(),\n /** Linked assertions with per-scenario parameter values */\n assertionLinks: z.array(ScenarioAssertionLinkSchema).optional()\n});\n\nexport type TestScenario = z.infer<typeof TestScenarioSchema>;\n\n/**\n * Input schema for creating a new TestScenario.\n */\nexport const CreateTestScenarioInputSchema = TestScenarioSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestScenarioInput = z.infer<\n typeof CreateTestScenarioInputSchema\n>;\n\n/**\n * Input schema for updating a TestScenario.\n */\nexport const UpdateTestScenarioInputSchema =\n CreateTestScenarioInputSchema.partial();\n\nexport type UpdateTestScenarioInput = z.infer<\n typeof UpdateTestScenarioInputSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Assertion types:\n * - skill_was_called: Checks if a specific skill was invoked (deterministic, system-level)\n * - build_passed: Runs a command and checks exit code (deterministic, system-level)\n * - llm_judge: LLM evaluates output with a prompt (LLM-based, user-created)\n */\nexport const AssertionTypeSchema = z.enum([\n 'skill_was_called',\n 'build_passed',\n 'llm_judge'\n]);\n\n/**\n * Parameter types supported in assertion parameters.\n */\nexport const AssertionParameterTypeSchema = z.enum([\n 'string',\n 'number',\n 'boolean'\n]);\n\nexport type AssertionParameterType = z.infer<\n typeof AssertionParameterTypeSchema\n>;\n\n/**\n * Schema for defining assertion parameters.\n * Parameters can be required or optional, with optional default values.\n */\nexport const AssertionParameterSchema = z.object({\n /** Parameter name (used as key in params object) */\n name: z.string().min(1),\n /** Display label for the parameter */\n label: z.string().min(1),\n /** Parameter type */\n type: AssertionParameterTypeSchema,\n /** Whether this parameter is required */\n required: z.boolean(),\n /** Default value (optional, used when not provided) */\n defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),\n /** If true, parameter is hidden by default behind \"Show advanced options\" */\n advanced: z.boolean().optional()\n});\n\nexport type AssertionParameter = z.infer<typeof AssertionParameterSchema>;\n\n/**\n * Schema for scenario-assertion link with parameter values.\n * Used when linking assertions to scenarios with specific parameter values.\n */\nexport const ScenarioAssertionLinkSchema = z.object({\n /** ID of the assertion (can be system assertion like 'system:skill_was_called' or custom assertion UUID) */\n assertionId: z.string(),\n /** Parameter values for this assertion in this scenario */\n params: z\n .record(\n z.string(),\n z.union([z.string(), z.number(), z.boolean(), z.null()])\n )\n .optional()\n});\n\nexport type ScenarioAssertionLink = z.infer<typeof ScenarioAssertionLinkSchema>;\n\nexport type AssertionType = z.infer<typeof AssertionTypeSchema>;\n\n/**\n * Configuration for skill_was_called assertion type.\n * Multiple skills in one assertion are treated as a group (1 assertion).\n * All skills in the group must have been called for the assertion to pass.\n */\nexport const SkillWasCalledConfigSchema = z.object({\n /** Names of the skills that must have been called */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledConfig = z.infer<typeof SkillWasCalledConfigSchema>;\n\n/**\n * Configuration for build_passed assertion type.\n * Uses strictObject to reject objects with unknown keys (prevents matching LlmJudge configs).\n */\nexport const BuildPassedConfigSchema = z.strictObject({\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedConfig = z.infer<typeof BuildPassedConfigSchema>;\n\n/**\n * Configuration for llm_judge assertion type.\n * User-created assertions with customizable parameters.\n */\nexport const LlmJudgeConfigSchema = z.object({\n /**\n * Prompt template with placeholders:\n * - {{output}}: agent's final output\n * - {{cwd}}: working directory\n * - {{changedFiles}}: all files changed (new, modified)\n * - {{modifiedFiles}}: only existing files that were modified\n * - {{newFiles}}: only new files that were created\n * - {{trace}}: step-by-step trace of tool calls\n * - Custom parameters defined in the parameters array\n */\n prompt: z.string().min(1),\n /** Optional system prompt for the judge */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku-20241022) */\n model: z.string().optional(),\n /** Max output tokens */\n maxTokens: z.number().int().optional(),\n /** Temperature (0-1) */\n temperature: z.number().min(0).max(1).optional(),\n /** User-defined parameters for this assertion */\n parameters: z.array(AssertionParameterSchema).optional()\n});\n\nexport type LlmJudgeConfig = z.infer<typeof LlmJudgeConfigSchema>;\n\n/**\n * Union of all assertion config types.\n * Order matters: schemas with required fields first, then optional-only schemas.\n * This ensures LlmJudge (requires prompt) and SkillWasCalled (requires skillNames)\n * are matched before BuildPassed (all optional) or empty object.\n */\nexport const AssertionConfigSchema = z.union([\n LlmJudgeConfigSchema, // requires prompt - check first\n SkillWasCalledConfigSchema, // requires skillName\n BuildPassedConfigSchema, // all optional, uses strictObject to reject unknown keys\n z.object({}) // fallback empty config\n]);\n\nexport type AssertionConfig = z.infer<typeof AssertionConfigSchema>;\n\n/**\n * Custom Assertion entity - stored in the database.\n * Replaces inline assertions in test scenarios.\n */\nexport const CustomAssertionSchema = TenantEntitySchema.extend({\n /** The assertion type */\n type: AssertionTypeSchema,\n /** Type-specific configuration */\n config: AssertionConfigSchema\n});\n\nexport type CustomAssertion = z.infer<typeof CustomAssertionSchema>;\n\n/**\n * Input schema for creating a new CustomAssertion.\n */\nexport const CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateCustomAssertionInput = z.infer<\n typeof CreateCustomAssertionInputSchema\n>;\n\n/**\n * Input schema for updating a CustomAssertion.\n */\nexport const UpdateCustomAssertionInputSchema =\n CreateCustomAssertionInputSchema.partial();\n\nexport type UpdateCustomAssertionInput = z.infer<\n typeof UpdateCustomAssertionInputSchema\n>;\n\n/**\n * Helper function to validate config based on assertion type.\n * Returns true if config is valid for the given type.\n */\nexport function validateAssertionConfig(\n type: AssertionType,\n config: unknown\n): boolean {\n switch (type) {\n case 'skill_was_called':\n return SkillWasCalledConfigSchema.safeParse(config).success;\n case 'build_passed':\n return BuildPassedConfigSchema.safeParse(config).success;\n case 'llm_judge':\n return LlmJudgeConfigSchema.safeParse(config).success;\n default:\n return false;\n }\n}\n\n/**\n * Get typed config for skill_was_called assertion.\n */\nexport function getSkillWasCalledConfig(\n assertion: CustomAssertion\n): SkillWasCalledConfig | null {\n if (assertion.type !== 'skill_was_called') return null;\n const result = SkillWasCalledConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for build_passed assertion.\n */\nexport function getBuildPassedConfig(\n assertion: CustomAssertion\n): BuildPassedConfig | null {\n if (assertion.type !== 'build_passed') return null;\n const result = BuildPassedConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for llm_judge assertion.\n */\nexport function getLlmJudgeConfig(\n assertion: CustomAssertion\n): LlmJudgeConfig | null {\n if (assertion.type !== 'llm_judge') return null;\n const result = LlmJudgeConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * TestSuite schema - a collection of test scenarios.\n *\n * Suites are used to organize and group related test scenarios.\n */\nexport const TestSuiteSchema = TenantEntitySchema.extend({\n /** IDs of test scenarios in this suite */\n scenarioIds: z.array(z.string())\n});\n\nexport type TestSuite = z.infer<typeof TestSuiteSchema>;\n\n/**\n * Input schema for creating a new TestSuite.\n */\nexport const CreateTestSuiteInputSchema = TestSuiteSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestSuiteInput = z.infer<typeof CreateTestSuiteInputSchema>;\n\n/**\n * Input schema for updating a TestSuite.\n */\nexport const UpdateTestSuiteInputSchema = CreateTestSuiteInputSchema.partial();\n\nexport type UpdateTestSuiteInput = z.infer<typeof UpdateTestSuiteInputSchema>;\n", "import { z } from 'zod';\n\n/**\n * Token usage schema.\n */\nexport const TokenUsageSchema = z.object({\n prompt: z.number(),\n completion: z.number(),\n total: z.number()\n});\n\nexport type TokenUsage = z.infer<typeof TokenUsageSchema>;\n\n/**\n * Evaluation metrics schema.\n */\nexport const EvalMetricsSchema = z.object({\n totalAssertions: z.number(),\n passed: z.number(),\n failed: z.number(),\n skipped: z.number(),\n errors: z.number(),\n passRate: z.number(),\n avgDuration: z.number(),\n totalDuration: z.number()\n});\n\nexport type EvalMetrics = z.infer<typeof EvalMetricsSchema>;\n\n/**\n * Evaluation status enum.\n */\nexport enum EvalStatus {\n PENDING = 'pending',\n RUNNING = 'running',\n COMPLETED = 'completed',\n FAILED = 'failed',\n CANCELLED = 'cancelled'\n}\n\nexport const EvalStatusSchema = z.enum(EvalStatus);\n\n/**\n * LLM step type enum.\n */\nexport enum LLMStepType {\n COMPLETION = 'completion',\n TOOL_USE = 'tool_use',\n TOOL_RESULT = 'tool_result',\n THINKING = 'thinking'\n}\n\n/**\n * LLM trace step schema.\n */\nexport const LLMTraceStepSchema = z.object({\n id: z.string(),\n stepNumber: z.number(),\n type: z.enum(LLMStepType),\n model: z.string(),\n provider: z.string(),\n startedAt: z.string(),\n durationMs: z.number(),\n tokenUsage: TokenUsageSchema,\n costUsd: z.number(),\n toolName: z.string().optional(),\n toolArguments: z.string().optional(),\n inputPreview: z.string().optional(),\n outputPreview: z.string().optional(),\n success: z.boolean(),\n error: z.string().optional()\n});\n\nexport type LLMTraceStep = z.infer<typeof LLMTraceStepSchema>;\n\n/**\n * LLM breakdown stats schema.\n */\nexport const LLMBreakdownStatsSchema = z.object({\n count: z.number(),\n durationMs: z.number(),\n tokens: z.number(),\n costUsd: z.number()\n});\n\nexport type LLMBreakdownStats = z.infer<typeof LLMBreakdownStatsSchema>;\n\n/**\n * LLM trace summary schema.\n */\nexport const LLMTraceSummarySchema = z.object({\n totalSteps: z.number(),\n totalDurationMs: z.number(),\n totalTokens: TokenUsageSchema,\n totalCostUsd: z.number(),\n stepTypeBreakdown: z.record(z.string(), LLMBreakdownStatsSchema).optional(),\n modelBreakdown: z.record(z.string(), LLMBreakdownStatsSchema),\n modelsUsed: z.array(z.string())\n});\n\nexport type LLMTraceSummary = z.infer<typeof LLMTraceSummarySchema>;\n\n/**\n * LLM trace schema.\n */\nexport const LLMTraceSchema = z.object({\n id: z.string(),\n steps: z.array(LLMTraceStepSchema),\n summary: LLMTraceSummarySchema\n});\n\nexport type LLMTrace = z.infer<typeof LLMTraceSchema>;\n", "import { z } from 'zod';\nimport { TestResult } from '../test/index.js';\nimport {\n EvalMetricsSchema,\n LLMTraceSchema,\n LLMTraceStepSchema\n} from './metrics.js';\nimport { DiffContentSchema, TemplateFileSchema } from './eval-run.js';\nimport { ModelConfigSchema } from '../common/models.js';\nimport { ExpectedFileSchema } from '../scenario/test-scenario.js';\n\n/**\n * Assertion result status enum.\n * Defined locally to avoid bundling eval-assertions Node.js code in browser.\n * This is structurally identical to the one in @wix/eval-assertions.\n */\nexport enum AssertionResultStatus {\n PASSED = 'passed',\n FAILED = 'failed',\n SKIPPED = 'skipped',\n ERROR = 'error'\n}\n\n/**\n * Assertion result schema.\n */\nexport const AssertionResultSchema = z.object({\n id: z.string(),\n assertionId: z.string(),\n assertionType: z.string(),\n assertionName: z.string(),\n status: z.enum(AssertionResultStatus),\n message: z.string().optional(),\n expected: z.string().optional(),\n actual: z.string().optional(),\n duration: z.number().optional(),\n details: z.record(z.string(), z.unknown()).optional(),\n llmTraceSteps: z.array(LLMTraceStepSchema).optional()\n});\n\nexport type AssertionResult = z.infer<typeof AssertionResultSchema>;\n\n/**\n * Evaluation run result schema - result for a single scenario/target combination.\n */\nexport const EvalRunResultSchema = z.object({\n id: z.string(),\n targetId: z.string(),\n targetName: z.string().optional(),\n /** SkillVersion ID used for this evaluation (for version tracking) */\n skillVersionId: z.string().optional(),\n /** SkillVersion semver string (e.g., \"1.0.0\", \"1.2.3\") for display */\n skillVersion: z.string().optional(),\n scenarioId: z.string(),\n scenarioName: z.string(),\n modelConfig: ModelConfigSchema.optional(),\n assertionResults: z.array(AssertionResultSchema),\n metrics: EvalMetricsSchema.optional(),\n passed: z.number(),\n failed: z.number(),\n passRate: z.number(),\n duration: z.number(),\n outputText: z.string().optional(),\n files: z.array(ExpectedFileSchema).optional(),\n fileDiffs: z.array(DiffContentSchema).optional(),\n /** Full template files after execution with status indicators */\n templateFiles: z.array(TemplateFileSchema).optional(),\n startedAt: z.string().optional(),\n completedAt: z.string().optional(),\n llmTrace: LLMTraceSchema.optional()\n});\n\nexport type EvalRunResult = z.infer<typeof EvalRunResultSchema>;\n\n/**\n * Prompt result schema - detailed result from prompt execution.\n */\nexport const PromptResultSchema = z.object({\n text: z.string(),\n files: z.array(z.unknown()).optional(),\n finishReason: z.string().optional(),\n reasoning: z.string().optional(),\n reasoningDetails: z.unknown().optional(),\n toolCalls: z.array(z.unknown()).optional(),\n toolResults: z.array(z.unknown()).optional(),\n warnings: z.array(z.unknown()).optional(),\n sources: z.array(z.unknown()).optional(),\n steps: z.array(z.unknown()),\n generationTimeMs: z.number(),\n prompt: z.string(),\n systemPrompt: z.string(),\n usage: z.object({\n totalTokens: z.number().optional(),\n totalMicrocentsSpent: z.number().optional()\n })\n});\n\nexport type PromptResult = z.infer<typeof PromptResultSchema>;\n\n/**\n * Full evaluation result schema - complete result for a single evaluation.\n */\nexport const EvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n promptResult: PromptResultSchema,\n testResults: z.array(z.unknown()) as z.ZodType<TestResult[]>,\n tags: z.array(z.string()).optional(),\n feedback: z.string().optional(),\n score: z.number(),\n suiteId: z.string().optional()\n});\n\nexport type EvaluationResult = z.infer<typeof EvaluationResultSchema>;\n\n/**\n * Lean evaluation result - summary for listing.\n */\nexport const LeanEvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n tags: z.array(z.string()).optional(),\n scenarioId: z.string(),\n scenarioVersion: z.number().optional(),\n targetId: z.string(),\n targetVersion: z.number().optional(),\n suiteId: z.string().optional(),\n score: z.number(),\n time: z.number().optional(),\n microcentsSpent: z.number().optional()\n});\n\nexport type LeanEvaluationResult = z.infer<typeof LeanEvaluationResultSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { EvalRunResultSchema } from './eval-result.js';\nimport {\n EvalMetricsSchema,\n EvalStatusSchema,\n LLMTraceSummarySchema\n} from './metrics.js';\nimport { LiveTraceEventSchema } from './live-trace.js';\n\n/**\n * Trigger types for evaluations.\n */\nexport enum TriggerType {\n RESOURCES_UPDATED = 'RESOURCES_UPDATED',\n MCP_VERSION_RELEASE = 'MCP_VERSION_RELEASE',\n MCP_PREVIEW_CREATED = 'MCP_PREVIEW_CREATED',\n MANUAL = 'MANUAL'\n}\n\n/**\n * Trigger metadata schema.\n */\nexport const TriggerMetadataSchema = z.object({\n version: z.string().optional(),\n resourceUpdated: z.array(z.string()).optional()\n});\n\nexport type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;\n\n/**\n * Trigger schema.\n */\nexport const TriggerSchema = z.object({\n id: z.string(),\n metadata: TriggerMetadataSchema.optional(),\n type: z.enum(TriggerType)\n});\n\nexport type Trigger = z.infer<typeof TriggerSchema>;\n\n/**\n * Failure category enum.\n */\nexport enum FailureCategory {\n MISSING_FILE = 'missing_file',\n WRONG_CONTENT = 'wrong_content',\n BUILD_ERROR = 'build_error',\n TEST_FAILURE = 'test_failure',\n RUNTIME_ERROR = 'runtime_error',\n PERFORMANCE = 'performance'\n}\n\n/**\n * Failure severity enum.\n */\nexport enum FailureSeverity {\n CRITICAL = 'critical',\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = 'low'\n}\n\n/**\n * Diff line type schema.\n */\nexport const DiffLineTypeSchema = z.enum(['added', 'removed', 'unchanged']);\nexport type DiffLineType = z.infer<typeof DiffLineTypeSchema>;\n\n/**\n * Diff line schema - represents a single line in a diff.\n */\nexport const DiffLineSchema = z.object({\n type: DiffLineTypeSchema,\n content: z.string(),\n lineNumber: z.number()\n});\n\nexport type DiffLine = z.infer<typeof DiffLineSchema>;\n\n/**\n * Diff content schema - represents a file diff.\n */\nexport const DiffContentSchema = z.object({\n path: z.string(),\n expected: z.string(),\n actual: z.string(),\n diffLines: z.array(DiffLineSchema),\n renamedFrom: z.string().optional()\n});\n\nexport type DiffContent = z.infer<typeof DiffContentSchema>;\n\n/**\n * Command execution schema.\n */\nexport const CommandExecutionSchema = z.object({\n command: z.string(),\n exitCode: z.number(),\n output: z.string().optional(),\n duration: z.number()\n});\n\nexport type CommandExecution = z.infer<typeof CommandExecutionSchema>;\n\n/**\n * File modification schema.\n */\nexport const FileModificationSchema = z.object({\n path: z.string(),\n action: z.enum(['created', 'modified', 'deleted'])\n});\n\nexport type FileModification = z.infer<typeof FileModificationSchema>;\n\n/**\n * Template file status enum.\n */\nexport enum TemplateFileStatus {\n NEW = 'new',\n MODIFIED = 'modified',\n UNCHANGED = 'unchanged'\n}\n\n/**\n * Template file schema - represents a file in the template with its full content.\n */\nexport const TemplateFileSchema = z.object({\n /** Relative path within the template */\n path: z.string(),\n /** Full file content after execution */\n content: z.string(),\n /** File status (new, modified, unchanged) */\n status: z.enum(['new', 'modified', 'unchanged'])\n});\n\nexport type TemplateFile = z.infer<typeof TemplateFileSchema>;\n\n/**\n * API call schema.\n */\nexport const ApiCallSchema = z.object({\n endpoint: z.string(),\n tokensUsed: z.number(),\n duration: z.number()\n});\n\nexport type ApiCall = z.infer<typeof ApiCallSchema>;\n\n/**\n * Execution trace schema - represents detailed execution information.\n */\nexport const ExecutionTraceSchema = z.object({\n commands: z.array(CommandExecutionSchema),\n filesModified: z.array(FileModificationSchema),\n apiCalls: z.array(ApiCallSchema),\n totalDuration: z.number()\n});\n\nexport type ExecutionTrace = z.infer<typeof ExecutionTraceSchema>;\n\n/**\n * Failure analysis schema.\n */\nexport const FailureAnalysisSchema = z.object({\n category: z.enum(FailureCategory),\n severity: z.enum(FailureSeverity),\n summary: z.string(),\n details: z.string(),\n rootCause: z.string(),\n suggestedFix: z.string(),\n relatedAssertions: z.array(z.string()),\n codeSnippet: z.string().optional(),\n similarIssues: z.array(z.string()).optional(),\n patternId: z.string().optional(),\n // Extended fields for detailed debugging\n diff: DiffContentSchema.optional(),\n executionTrace: ExecutionTraceSchema.optional()\n});\n\nexport type FailureAnalysis = z.infer<typeof FailureAnalysisSchema>;\n\n/**\n * Evaluation run schema.\n *\n * Represents a complete evaluation run with configuration, results, and metrics.\n */\nexport const EvalRunSchema = TenantEntitySchema.extend({\n /** Agent ID for this run */\n agentId: z.string().optional(),\n /** Skills group ID for this run */\n skillsGroupId: z.string().optional(),\n /** Map of skillId to skillVersionId for this run */\n skillVersions: z.record(z.string(), z.string()).optional(),\n /** Scenario IDs to run */\n scenarioIds: z.array(z.string()),\n /** Current status */\n status: EvalStatusSchema,\n /** Progress percentage (0-100) */\n progress: z.number(),\n /** Results for each scenario/target combination (lazy to break eval-result \u2194 eval-run cycle) */\n results: z.array(z.lazy(() => EvalRunResultSchema)),\n /** Aggregated metrics across all results */\n aggregateMetrics: EvalMetricsSchema,\n /** Failure analyses */\n failureAnalyses: z.array(FailureAnalysisSchema).optional(),\n /** Aggregated LLM trace summary */\n llmTraceSummary: LLMTraceSummarySchema.optional(),\n /** What triggered this run */\n trigger: TriggerSchema.optional(),\n /** When the run started (set when evaluation is triggered) */\n startedAt: z.string().optional(),\n /** When the run completed */\n completedAt: z.string().optional(),\n /** Live trace events captured during execution (for playback on results page) */\n liveTraceEvents: z.array(LiveTraceEventSchema).optional(),\n /** Remote job ID for tracking execution in Dev Machines */\n jobId: z.string().optional(),\n /** Remote job status from the Dev Machine API (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED) */\n jobStatus: z.string().optional(),\n /** Remote job error message if the job failed */\n jobError: z.string().optional(),\n /** Timestamp of the last job status check */\n jobStatusCheckedAt: z.string().optional(),\n /** MCP server IDs to enable for this run (optional) */\n mcpIds: z.array(z.string()).optional(),\n /** Sub-agent IDs to enable for this run (optional) */\n subAgentIds: z.array(z.string()).optional()\n});\n\nexport type EvalRun = z.infer<typeof EvalRunSchema>;\n\n/**\n * Input schema for creating a new EvalRun.\n */\nexport const CreateEvalRunInputSchema = EvalRunSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n status: true,\n progress: true,\n results: true,\n aggregateMetrics: true,\n startedAt: true,\n completedAt: true\n});\n\nexport type CreateEvalRunInput = z.infer<typeof CreateEvalRunInputSchema>;\n\n/**\n * Evaluation progress schema.\n */\nexport const EvaluationProgressSchema = z.object({\n runId: z.string(),\n targetId: z.string(),\n totalScenarios: z.number(),\n completedScenarios: z.number(),\n scenarioProgress: z.array(\n z.object({\n scenarioId: z.string(),\n currentStep: z.string(),\n error: z.string().optional()\n })\n ),\n createdAt: z.number()\n});\n\nexport type EvaluationProgress = z.infer<typeof EvaluationProgressSchema>;\n\n/**\n * Evaluation log schema.\n */\nexport const EvaluationLogSchema = z.object({\n runId: z.string(),\n scenarioId: z.string(),\n log: z.object({\n level: z.enum(['info', 'error', 'debug']),\n message: z.string().optional(),\n args: z.array(z.any()).optional(),\n error: z.string().optional()\n })\n});\n\nexport type EvaluationLog = z.infer<typeof EvaluationLogSchema>;\n\n/**\n * LLM timeout constant (2 minutes).\n */\nexport const LLM_TIMEOUT = 120000;\n", "import { z } from 'zod';\n\n/**\n * Live trace event type enum.\n * Maps to the step types but includes streaming states.\n */\nexport enum LiveTraceEventType {\n THINKING = 'thinking',\n TOOL_USE = 'tool_use',\n COMPLETION = 'completion',\n TOOL_RESULT = 'tool_result',\n /** Diagnostic information for debugging environment/setup issues */\n DIAGNOSTIC = 'diagnostic',\n /** Periodic progress heartbeat during long operations */\n PROGRESS = 'progress',\n /** File write operation */\n FILE_WRITE = 'file_write',\n /** File read operation */\n FILE_READ = 'file_read',\n /** System message from the SDK */\n SYSTEM = 'system',\n /** User message (tool result from file operations etc.) */\n USER = 'user'\n}\n\n/**\n * Live trace event schema.\n * Represents a single trace event emitted during agent execution.\n */\nexport const LiveTraceEventSchema = z.object({\n /** The evaluation run ID */\n evalRunId: z.string(),\n /** The scenario ID being executed */\n scenarioId: z.string(),\n /** The scenario name for display */\n scenarioName: z.string(),\n /** The target ID (skill, agent, etc.) */\n targetId: z.string(),\n /** The target name for display */\n targetName: z.string(),\n /** Step number in the current scenario execution */\n stepNumber: z.number(),\n /** Type of trace event */\n type: z.enum(LiveTraceEventType),\n /** Tool name if this is a tool_use event */\n toolName: z.string().optional(),\n /** Tool arguments preview (truncated JSON) */\n toolArgs: z.string().optional(),\n /** Output preview (truncated text) */\n outputPreview: z.string().optional(),\n /** File path for file operations */\n filePath: z.string().optional(),\n /** Elapsed time in milliseconds for progress events */\n elapsedMs: z.number().optional(),\n /** Thinking/reasoning text from Claude */\n thinking: z.string().optional(),\n /** Timestamp when this event occurred */\n timestamp: z.string(),\n /** Whether this is the final event for this scenario */\n isComplete: z.boolean()\n});\n\nexport type LiveTraceEvent = z.infer<typeof LiveTraceEventSchema>;\n\n/**\n * Prefix used in stdout to identify trace events.\n * Format: TRACE_EVENT:{json}\n */\nexport const TRACE_EVENT_PREFIX = 'TRACE_EVENT:';\n\n/**\n * Parse a line from stdout to extract a trace event if present.\n * @param line - A line from stdout\n * @returns The parsed LiveTraceEvent or null if not a trace event line\n */\nexport function parseTraceEventLine(line: string): LiveTraceEvent | null {\n if (!line.startsWith(TRACE_EVENT_PREFIX)) {\n return null;\n }\n\n try {\n const jsonStr = line.slice(TRACE_EVENT_PREFIX.length);\n const parsed = JSON.parse(jsonStr);\n const result = LiveTraceEventSchema.safeParse(parsed);\n return result.success ? result.data : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Format a trace event as a stdout line.\n * @param event - The trace event to format\n * @returns The formatted line with prefix\n */\nexport function formatTraceEventLine(event: LiveTraceEvent): string {\n return `${TRACE_EVENT_PREFIX}${JSON.stringify(event)}`;\n}\n", "import { z } from 'zod';\nimport { BaseEntitySchema } from '../common/base-entity.js';\n\n/**\n * Project schema - represents a tenant/workspace for data isolation.\n *\n * All entities belong to a project. Projects are the top-level\n * organizational unit for multi-tenancy.\n *\n * Note: Project extends BaseEntity (not TenantEntity) since\n * Project IS the tenant and doesn't need a projectId.\n */\nexport const ProjectSchema = BaseEntitySchema.extend({\n appId: z.string().optional().describe('The ID of the app in Dev Center'),\n appSecret: z\n .string()\n .optional()\n .describe('The secret of the app in Dev Center')\n});\n\nexport type Project = z.infer<typeof ProjectSchema>;\n\n/**\n * Input schema for creating a new Project.\n */\nexport const CreateProjectInputSchema = ProjectSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;\n\n/**\n * Input schema for updating a Project.\n */\nexport const UpdateProjectInputSchema = CreateProjectInputSchema.partial();\n\nexport type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\n/**\n * Template schema - a project template that can be used for test environments.\n *\n * Templates are tenant-based entities scoped to a project.\n * They define how to set up a project environment for testing.\n * The `source` field points to a GitHub directory that is fetched via the GitHub API.\n * It is optional to support the transition from the legacy `downloadUrl` field.\n */\nexport const TemplateSchema = TenantEntitySchema.extend({\n /** GitHub source reference for fetching template files */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Template = z.infer<typeof TemplateSchema>;\n\n/**\n * Input schema for creating a new Template.\n */\nexport const CreateTemplateInputSchema = TemplateSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTemplateInput = z.infer<typeof CreateTemplateInputSchema>;\n\n/**\n * Input schema for updating a Template.\n */\nexport const UpdateTemplateInputSchema = CreateTemplateInputSchema.partial();\n\nexport type UpdateTemplateInput = z.infer<typeof UpdateTemplateInputSchema>;\n", "import type { AssertionParameter, AssertionType } from './assertion.js';\n\n/**\n * System assertion definition - built-in assertions available to all projects.\n * These are not stored in the database but defined in code.\n */\nexport interface SystemAssertion {\n /** Unique ID prefixed with 'system:' */\n id: string;\n /** Display name */\n name: string;\n /** Description of what the assertion checks */\n description: string;\n /** Assertion type */\n type: AssertionType;\n /** Parameters that can be configured per-scenario */\n parameters: AssertionParameter[];\n}\n\n/**\n * System assertion IDs - prefixed with 'system:' to distinguish from custom assertions.\n */\nexport const SYSTEM_ASSERTION_IDS = {\n SKILL_WAS_CALLED: 'system:skill_was_called',\n BUILD_PASSED: 'system:build_passed',\n LLM_JUDGE: 'system:llm_judge'\n} as const;\n\nexport type SystemAssertionId =\n (typeof SYSTEM_ASSERTION_IDS)[keyof typeof SYSTEM_ASSERTION_IDS];\n\n/**\n * Check if an assertion ID is a system assertion.\n */\nexport function isSystemAssertionId(id: string): id is SystemAssertionId {\n return id.startsWith('system:');\n}\n\n/**\n * Built-in system assertions.\n * These are available to all projects without needing to create them.\n */\nexport const SYSTEM_ASSERTIONS: Record<SystemAssertionId, SystemAssertion> = {\n [SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED]: {\n id: SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED,\n name: 'Skill Was Called',\n description:\n 'Check that one or more skills were invoked during the agent run',\n type: 'skill_was_called',\n parameters: [\n {\n name: 'skillNames',\n label: 'Skills',\n type: 'string',\n required: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.BUILD_PASSED]: {\n id: SYSTEM_ASSERTION_IDS.BUILD_PASSED,\n name: 'Build Passed',\n description: 'Run a build command and verify it exits with expected code',\n type: 'build_passed',\n parameters: [\n {\n name: 'command',\n label: 'Build Command',\n type: 'string',\n required: false,\n defaultValue: 'yarn build'\n },\n {\n name: 'expectedExitCode',\n label: 'Expected Exit Code',\n type: 'number',\n required: false,\n defaultValue: 0\n },\n {\n name: 'maxBuildTime',\n label: 'Max Build Time (ms)',\n type: 'number',\n required: false,\n advanced: true\n },\n {\n name: 'maxMemory',\n label: 'Max Memory (MB)',\n type: 'number',\n required: false,\n advanced: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.LLM_JUDGE]: {\n id: SYSTEM_ASSERTION_IDS.LLM_JUDGE,\n name: 'LLM Judge',\n description: 'LLM evaluates the output and assigns a score (0-100)',\n type: 'llm_judge',\n parameters: [\n {\n name: 'prompt',\n label: 'Judge Prompt',\n type: 'string',\n required: true,\n defaultValue: 'Verify the output meets the acceptance criteria.'\n },\n {\n name: 'systemPrompt',\n label: 'System Prompt (optional)',\n type: 'string',\n required: false,\n defaultValue:\n 'You are judging a scenario run. Use these values:\\n- {{output}}: the agent\\'s final output\\n- {{cwd}}: working directory\\n- {{changedFiles}}: list of files changed (or \"No files were changed\")\\n- {{trace}}: step-by-step trace (tool calls, completions) to check e.g. which tools were called and how many times\\n\\nJudge how well the output meets the acceptance criteria stated in the user prompt.'\n },\n {\n name: 'minScore',\n label: 'Minimum Score (0-100)',\n type: 'number',\n required: false,\n defaultValue: 70\n }\n ]\n }\n};\n\n/**\n * Get all system assertions as an array.\n */\nexport function getSystemAssertions(): SystemAssertion[] {\n return Object.values(SYSTEM_ASSERTIONS);\n}\n\n/**\n * Get a system assertion by ID.\n */\nexport function getSystemAssertion(\n id: SystemAssertionId\n): SystemAssertion | undefined {\n return SYSTEM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od", "ModelIds", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "TestType", "TestImportance", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "import_zod", "EvalStatus", "LLMStepType", "import_zod", "import_zod", "import_zod", "LiveTraceEventType", "TriggerType", "FailureCategory", "FailureSeverity", "TemplateFileStatus", "AssertionResultStatus", "import_zod"]
|
|
7
7
|
}
|
package/build/index.mjs
CHANGED
|
@@ -54,6 +54,7 @@ var ModelIds = /* @__PURE__ */ ((ModelIds2) => {
|
|
|
54
54
|
ModelIds2["CLAUDE_3_7_SONNET_1_0"] = "CLAUDE_3_7_SONNET_1_0";
|
|
55
55
|
ModelIds2["CLAUDE_4_OPUS_1_0"] = "CLAUDE_4_OPUS_1_0";
|
|
56
56
|
ModelIds2["CLAUDE_4_SONNET_1_0"] = "CLAUDE_4_SONNET_1_0";
|
|
57
|
+
ModelIds2["CLAUDE_4_5_HAIKU_1_0"] = "CLAUDE_4_5_HAIKU_1_0";
|
|
57
58
|
return ModelIds2;
|
|
58
59
|
})(ModelIds || {});
|
|
59
60
|
var ModelIdsSchema = z4.enum(ModelIds);
|
|
@@ -83,6 +84,13 @@ var ModelSchema = z4.object({
|
|
|
83
84
|
pricing: ModelPricingSchema
|
|
84
85
|
});
|
|
85
86
|
var AVAILABLE_MODELS = [
|
|
87
|
+
{
|
|
88
|
+
id: "CLAUDE_4_5_HAIKU_1_0" /* CLAUDE_4_5_HAIKU_1_0 */,
|
|
89
|
+
name: "Claude 4.5 Haiku",
|
|
90
|
+
provider: "anthropic",
|
|
91
|
+
providerModelId: "claude-haiku-4-5-20251001",
|
|
92
|
+
pricing: { inputPer1M: 0.8, outputPer1M: 4 }
|
|
93
|
+
},
|
|
86
94
|
{
|
|
87
95
|
id: "CLAUDE_4_SONNET_1_0" /* CLAUDE_4_SONNET_1_0 */,
|
|
88
96
|
name: "Claude 4 Sonnet",
|
package/build/index.mjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/common/base-entity.ts", "../src/common/github-source.ts", "../src/common/mcp.ts", "../src/common/models.ts", "../src/target/target.ts", "../src/target/agent.ts", "../src/target/skill.ts", "../src/target/skills-group.ts", "../src/target/sub-agent.ts", "../src/test/index.ts", "../src/test/base.ts", "../src/test/llm.ts", "../src/test/tool.ts", "../src/test/site-config.ts", "../src/test/command-execution.ts", "../src/test/file-presence.ts", "../src/test/file-content.ts", "../src/test/build-check.ts", "../src/test/vitest.ts", "../src/test/playwright-nl.ts", "../src/scenario/assertions.ts", "../src/scenario/environment.ts", "../src/scenario/test-scenario.ts", "../src/assertion/assertion.ts", "../src/suite/test-suite.ts", "../src/evaluation/metrics.ts", "../src/evaluation/eval-result.ts", "../src/evaluation/eval-run.ts", "../src/evaluation/live-trace.ts", "../src/project/project.ts", "../src/template/template.ts", "../src/assertion/system-assertions.ts"],
|
|
4
|
-
"sourcesContent": ["import { z } from 'zod';\n\n/**\n * Base entity schema with common fields for all entities.\n */\nexport const BaseEntitySchema = z.object({\n id: z.string(),\n name: z.string().min(1),\n description: z.string(),\n createdAt: z.string(),\n updatedAt: z.string(),\n deleted: z.boolean().optional()\n});\n\nexport type BaseEntity = z.infer<typeof BaseEntitySchema>;\n\n/**\n * Tenant entity schema - extends BaseEntity with projectId for multi-tenancy.\n */\nexport const TenantEntitySchema = BaseEntitySchema.extend({\n projectId: z.string()\n});\n\nexport type TenantEntity = z.infer<typeof TenantEntitySchema>;\n", "import { z } from 'zod';\n\n/**\n * GitHub source reference for a directory in a GitHub repository.\n * Used by skills and templates to point to content that can be fetched via the GitHub API.\n */\nexport const GitHubSourceSchema = z.object({\n /** GitHub org or user, e.g. \"wix\" */\n owner: z.string().min(1),\n /** Repository name, e.g. \"skills\" */\n repo: z.string().min(1),\n /** Folder path within the repo, e.g. \"wix-cli/skills/wix-cli-dashboard-page\" */\n path: z.string().min(1),\n /** Git ref (branch, tag, or SHA), e.g. \"master\" or \"v1.2.0\" */\n ref: z.string().min(1)\n});\n\nexport type GitHubSource = z.infer<typeof GitHubSourceSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from './base-entity.js';\n\n/**\n * Top-level key for the .mcp.json file written at run start.\n * Format: { [MCP_SERVERS_JSON_KEY]: { [mcpName]: config } }\n */\nexport const MCP_SERVERS_JSON_KEY = 'mcpServers';\n\n/**\n * MCP Entity schema - an MCP server definition stored per project.\n *\n * `name` is a display label for the entity (does NOT need to match the server\n * key inside `config`).\n *\n * `config` is a keyed `.mcp.json` entry, e.g.:\n * ```json\n * { \"wix-mcp\": { \"type\": \"http\", \"url\": \"\u2026\", \"headers\": { \u2026 } } }\n * ```\n * At evaluation time every MCP's config is spread into the `mcpServers` object\n * of the generated `.mcp.json` file.\n */\nexport const MCPEntitySchema = TenantEntitySchema.extend({\n /** Display name for the MCP entity (independent of the server key in config) */\n name: z.string().min(1),\n /** Keyed MCP server config \u2014 top-level key is the server name, value is its config */\n config: z.record(z.string(), z.unknown())\n});\n\nexport type MCPEntity = z.infer<typeof MCPEntitySchema>;\n\n/**\n * Input schema for creating a new MCP.\n */\nexport const CreateMcpInputSchema = MCPEntitySchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateMcpInput = z.infer<typeof CreateMcpInputSchema>;\n\n/**\n * Input schema for updating an MCP.\n */\nexport const UpdateMcpInputSchema = CreateMcpInputSchema.partial();\n\nexport type UpdateMcpInput = z.infer<typeof UpdateMcpInputSchema>;\n\n/**\n * MCP Server Configuration (legacy - for mcp.json config shape).\n * Config can be: { command, args }, { url, headers }, { type, command, args, env }, etc.\n */\nexport const MCPServerConfigSchema = z.record(z.string(), z.unknown());\n\nexport type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;\n", "import { z } from 'zod';\n\n/**\n * Anthropic Model IDs supported by the AI Gateway.\n * These values match the ClaudeModel enum from the Wix AI Gateway API.\n */\nexport enum ModelIds {\n CLAUDE_3_HAIKU_1_0 = 'CLAUDE_3_HAIKU_1_0',\n CLAUDE_3_OPUS_1_0 = 'CLAUDE_3_OPUS_1_0',\n CLAUDE_3_SONNET_1_0 = 'CLAUDE_3_SONNET_1_0',\n CLAUDE_3_5_SONNET_1_0 = 'CLAUDE_3_5_SONNET_1_0',\n CLAUDE_3_5_SONNET_2_0 = 'CLAUDE_3_5_SONNET_2_0',\n CLAUDE_3_7_SONNET_1_0 = 'CLAUDE_3_7_SONNET_1_0',\n CLAUDE_4_OPUS_1_0 = 'CLAUDE_4_OPUS_1_0',\n CLAUDE_4_SONNET_1_0 = 'CLAUDE_4_SONNET_1_0'\n}\n\nexport const ModelIdsSchema = z.enum(ModelIds);\n\n/**\n * Model configuration schema for specifying model parameters.\n */\nconst nullToUndefined = (val: unknown) => (val === null ? undefined : val);\n\nexport const ModelConfigSchema = z.object({\n model: ModelIdsSchema,\n temperature: z.preprocess(\n nullToUndefined,\n z.number().min(0).max(1).optional()\n ),\n maxTokens: z.preprocess(nullToUndefined, z.number().min(1).optional())\n});\n\nexport type ModelConfig = z.infer<typeof ModelConfigSchema>;\n\n/**\n * Model pricing schema (cost per 1M tokens).\n */\nexport const ModelPricingSchema = z.object({\n inputPer1M: z.number(),\n outputPer1M: z.number()\n});\n\nexport type ModelPricing = z.infer<typeof ModelPricingSchema>;\n\n/**\n * Model schema - complete model definition with metadata and pricing.\n */\nexport const ModelSchema = z.object({\n /** AI Gateway model ID */\n id: ModelIdsSchema,\n /** Display name */\n name: z.string(),\n /** Provider (always 'anthropic') */\n provider: z.literal('anthropic'),\n /** Provider's model identifier (e.g., \"claude-3-5-sonnet-20241022\") */\n providerModelId: z.string(),\n /** Pricing per 1M tokens */\n pricing: ModelPricingSchema\n});\n\nexport type Model = z.infer<typeof ModelSchema>;\n\n/**\n * Available models with full metadata including pricing.\n */\nexport const AVAILABLE_MODELS: Model[] = [\n {\n id: ModelIds.CLAUDE_4_SONNET_1_0,\n name: 'Claude 4 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-sonnet-4-20250514',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_4_OPUS_1_0,\n name: 'Claude 4 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-opus-4-20250514',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_7_SONNET_1_0,\n name: 'Claude 3.7 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-7-sonnet-20250219',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_2_0,\n name: 'Claude 3.5 Sonnet v2',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20241022',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_1_0,\n name: 'Claude 3.5 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20240620',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_OPUS_1_0,\n name: 'Claude 3 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-3-opus-20240229',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_SONNET_1_0,\n name: 'Claude 3 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-sonnet-20240229',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_HAIKU_1_0,\n name: 'Claude 3 Haiku',\n provider: 'anthropic',\n providerModelId: 'claude-3-haiku-20240307',\n pricing: { inputPer1M: 0.25, outputPer1M: 1.25 }\n }\n];\n\n/**\n * Available models as a map keyed by model ID.\n */\nexport const AVAILABLE_MODELS_MAP: Record<ModelIds, Model> = Object.fromEntries(\n AVAILABLE_MODELS.map((model) => [model.id, model])\n) as Record<ModelIds, Model>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Target schema - base for all testable entities.\n *\n * All testable entities (Agent, Skill) extend this schema.\n * This creates a unified type hierarchy for what can be evaluated.\n */\nexport const TargetSchema = TenantEntitySchema.extend({\n // Base for all testable entities\n // Specific targets add their own fields\n});\n\nexport type Target = z.infer<typeof TargetSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { ModelConfigSchema } from '../common/models.js';\n\n/**\n * Agent schema - a CLI-based coding agent.\n *\n * Agents are external CLI tools that can execute coding tasks.\n * Examples: Claude Code CLI, Codex CLI, Cursor CLI.\n */\nexport const AgentSchema = TargetSchema.extend({\n /** Command to run the agent */\n runCommand: z.string(),\n /** Optional model configuration override */\n modelConfig: ModelConfigSchema.optional()\n});\n\nexport type Agent = z.infer<typeof AgentSchema>;\n\n/**\n * Input schema for creating a new Agent.\n */\nexport const CreateAgentInputSchema = AgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateAgentInput = z.infer<typeof CreateAgentInputSchema>;\n\n/**\n * Input schema for updating an Agent.\n * modelConfig can be null to explicitly clear it (vs undefined = keep existing).\n */\nexport const UpdateAgentInputSchema = CreateAgentInputSchema.partial().extend({\n modelConfig: ModelConfigSchema.optional().nullable()\n});\n\nexport type UpdateAgentInput = z.infer<typeof UpdateAgentInputSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\nexport { GitHubSourceSchema };\nexport type { GitHubSource } from '../common/github-source.js';\n\n/**\n * Regex for valid skill folder names (kebab-case).\n * Allows: lowercase letters, numbers, hyphens. Words separated by single hyphens.\n * Examples: my-skill, code-review, skill1\n */\nexport const SKILL_FOLDER_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\n/**\n * Regex for valid semver strings (major.minor.patch).\n * Examples: 1.0.0, 2.3.1, 10.20.30\n */\nexport const SEMVER_REGEX = /^\\d+\\.\\d+\\.\\d+$/;\n\n/**\n * Origin of a skill version - how the version was created.\n * - manual: Created through the UI\n * - pr: Created from a pull request (via CI/CD API)\n * - master: Synced from the main branch (via CI/CD API)\n */\nexport const SkillVersionOriginSchema = z.enum(['manual', 'pr', 'master']);\nexport type SkillVersionOrigin = z.infer<typeof SkillVersionOriginSchema>;\n\n/**\n * Check if a string is a valid skill folder name (kebab-case).\n * Used for validation when creating skills and when writing skills to filesystem.\n */\nexport function isValidSkillFolderName(name: string): boolean {\n return (\n typeof name === 'string' &&\n name.length > 0 &&\n SKILL_FOLDER_NAME_REGEX.test(name.trim())\n );\n}\n\n/**\n * Skill metadata parsed from SKILL.md frontmatter.\n *\n * Following the agentskills.io specification:\n * - name: Skill identifier (max 64 chars, lowercase + hyphens)\n * - description: What the skill does and when to use it\n * - allowedTools: Pre-approved tools the skill may use\n * - skills: Sub-skills for composite agents\n */\nexport const SkillMetadataSchema = z.object({\n name: z.string(),\n description: z.string(),\n allowedTools: z.array(z.string()).optional(),\n skills: z.array(z.string()).optional()\n});\n\nexport type SkillMetadata = z.infer<typeof SkillMetadataSchema>;\n\n/**\n * A single file within a skill directory snapshot.\n */\nexport const SkillFileSchema = z.object({\n /** Relative path within the skill directory, e.g. \"SKILL.md\" or \"references/API_SPEC.md\" */\n path: z.string().min(1),\n /** File content (UTF-8 text) */\n content: z.string()\n});\n\nexport type SkillFile = z.infer<typeof SkillFileSchema>;\n\n/**\n * Skill version - immutable snapshot of a Skill's content.\n *\n * New versions store a `files` array (snapshot of the skill directory from GitHub)\n * and a `source` reference (where the snapshot came from).\n *\n * Versions are immutable - editing creates a new version.\n */\nexport const SkillVersionSchema = z.object({\n id: z.string(),\n projectId: z.string(),\n skillId: z.string(),\n /** Semver string (e.g. \"1.2.0\") or Falcon fingerprint */\n version: z.string(),\n /** How this version was created */\n origin: SkillVersionOriginSchema,\n /** Where this snapshot was taken from */\n source: GitHubSourceSchema.optional(),\n /** Frozen snapshot of all files in the skill directory */\n files: z.array(SkillFileSchema).optional(),\n /** Optional notes about this version (changelog, reason for change) */\n notes: z.string().optional(),\n createdAt: z.string()\n});\n\nexport type SkillVersion = z.infer<typeof SkillVersionSchema>;\n\n/**\n * Input schema for creating a new SkillVersion.\n *\n * For source-based creation: provide `source` (or omit to use the Skill's source).\n * The backend fetches the folder and stores the snapshot as `files`.\n * For inline creation: provide `files` with the SKILL.md content.\n *\n * `version` is required -- the caller must always provide an explicit version string.\n */\nexport const CreateSkillVersionInputSchema = z.object({\n /** GitHub source to snapshot from. If not provided, uses the Skill's source. */\n source: GitHubSourceSchema.optional(),\n /** Version string for this snapshot (e.g. \"1.0.0\", \"1.0.3\"). */\n version: z.string().min(1),\n notes: z.string().optional(),\n /** Origin of this version. Defaults to 'manual' in backend. */\n origin: SkillVersionOriginSchema.optional(),\n /** Pre-edited files to store directly (bypasses GitHub fetch when provided) */\n files: z.array(SkillFileSchema).optional()\n});\n\nexport type CreateSkillVersionInput = z.infer<\n typeof CreateSkillVersionInputSchema\n>;\n\n/**\n * Skill schema - a lightweight container for a coding capability.\n *\n * Skills are containers identified by a kebab-case name.\n * All content (files, notes, etc.) lives in SkillVersion.\n * The `source` field points to the GitHub directory for live fetching.\n * Persisted shape: id, projectId, name, source, createdAt, updatedAt, deleted.\n *\n * Note: `description` is inherited from BaseEntity. It's not stored in the DB\n * for skills (content lives in SkillVersion), but is kept on the type to\n * satisfy the TenantEntity constraint. The repository always returns \"\".\n */\nexport const SkillSchema = TargetSchema.extend({\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Skill = z.infer<typeof SkillSchema>;\n\nconst KEBAB_CASE_MESSAGE =\n 'Name must be in kebab-case (lowercase letters, numbers, hyphens only, e.g. my-skill)';\n\nconst SkillInputBaseSchema = SkillSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true,\n description: true,\n source: true\n}).extend({\n /** Optional - not stored on Skill; content description lives in SkillVersion */\n description: z.string().optional(),\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\n/**\n * Inline initial version data provided when creating a skill atomically.\n * When present on a POST /skills request, the backend creates the skill\n * and its first version in a single request with rollback on failure.\n */\nexport const InitialVersionInputSchema = z.object({\n files: z.array(SkillFileSchema).optional(),\n notes: z.string().optional(),\n source: GitHubSourceSchema.optional(),\n version: z.string().optional(),\n origin: SkillVersionOriginSchema.optional()\n});\n\nexport type InitialVersionInput = z.infer<typeof InitialVersionInputSchema>;\n\n/**\n * Input schema for creating a new Skill.\n * Only `name` and `projectId` are required. `description` is ignored (lives in SkillVersion).\n * Pass `initialVersion` to atomically create the skill and its first version.\n */\nexport const CreateSkillInputSchema = SkillInputBaseSchema.extend({\n initialVersion: InitialVersionInputSchema.optional()\n}).refine((data) => isValidSkillFolderName(data.name), {\n message: KEBAB_CASE_MESSAGE,\n path: ['name']\n});\n\nexport type CreateSkillInput = z.infer<typeof CreateSkillInputSchema>;\n\n/**\n * Input schema for updating a Skill.\n */\nexport const UpdateSkillInputSchema = SkillInputBaseSchema.partial().refine(\n (data) => data.name === undefined || isValidSkillFolderName(data.name),\n { message: KEBAB_CASE_MESSAGE, path: ['name'] }\n);\n\nexport type UpdateSkillInput = z.infer<typeof UpdateSkillInputSchema>;\n\n/**\n * Skill with its latest version - used when displaying skills in the UI\n * and in the evaluator to access skill content.\n */\nexport const SkillWithLatestVersionSchema = SkillSchema.extend({\n latestVersion: SkillVersionSchema.optional()\n});\n\nexport type SkillWithLatestVersion = z.infer<\n typeof SkillWithLatestVersionSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * SkillsGroup schema - a collection of skills (replaces TargetGroup for the new model).\n *\n * Eval runs can be scoped to a skills group to run against all skills in the group.\n */\nexport const SkillsGroupSchema = TenantEntitySchema.extend({\n /** IDs of skills in this group */\n skillIds: z.array(z.string())\n});\n\nexport type SkillsGroup = z.infer<typeof SkillsGroupSchema>;\n\n/**\n * Input schema for creating a new SkillsGroup.\n */\nexport const CreateSkillsGroupInputSchema = SkillsGroupSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateSkillsGroupInput = z.infer<\n typeof CreateSkillsGroupInputSchema\n>;\n\n/**\n * Input schema for updating a SkillsGroup.\n */\nexport const UpdateSkillsGroupInputSchema =\n CreateSkillsGroupInputSchema.partial();\n\nexport type UpdateSkillsGroupInput = z.infer<\n typeof UpdateSkillsGroupInputSchema\n>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\n\n/**\n * Sub-agent schema \u2013 a Markdown file with YAML frontmatter.\n *\n * Sub-agents are specialized AI assistants (per Claude Code docs)\n * defined in Markdown with frontmatter (name, description, tools, model, etc.).\n * The body is the system prompt.\n *\n */\nexport const SubAgentSchema = TargetSchema.extend({\n /** The full sub-agent markdown content (YAML frontmatter + body) */\n subAgentMd: z.string()\n});\n\nexport type SubAgent = z.infer<typeof SubAgentSchema>;\n\nconst SubAgentInputBaseSchema = SubAgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport const CreateSubAgentInputSchema = SubAgentInputBaseSchema;\n\nexport type CreateSubAgentInput = z.infer<typeof CreateSubAgentInputSchema>;\n\nexport const UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();\n\nexport type UpdateSubAgentInput = z.infer<typeof UpdateSubAgentInputSchema>;\n", "import { z } from 'zod';\n\n// Base exports\nexport * from './base.js';\n\n// Individual test types\nexport * from './llm.js';\nexport * from './tool.js';\nexport * from './site-config.js';\nexport * from './command-execution.js';\nexport * from './file-presence.js';\nexport * from './file-content.js';\nexport * from './build-check.js';\nexport * from './vitest.js';\nexport * from './playwright-nl.js';\n\n// Import schemas for union\nimport { LLMTestSchema, LLMTestResult } from './llm.js';\nimport { ToolTestSchema, ToolTestResult } from './tool.js';\nimport { SiteConfigTestSchema, SiteConfigTestResult } from './site-config.js';\nimport {\n CommandExecutionTestSchema,\n CommandExecutionTestResult\n} from './command-execution.js';\nimport {\n FilePresenceTestSchema,\n FilePresenceTestResult\n} from './file-presence.js';\nimport {\n FileContentTestSchema,\n FileContentTestResult\n} from './file-content.js';\nimport { BuildCheckTestSchema, BuildCheckTestResult } from './build-check.js';\nimport { VitestTestSchema, VitestTestResult } from './vitest.js';\nimport {\n PlaywrightNLTestSchema,\n PlaywrightNLTestResult\n} from './playwright-nl.js';\n\n/**\n * Unified Test schema - discriminated union of all 9 test types.\n */\nexport const TestSchema = z.discriminatedUnion('type', [\n LLMTestSchema,\n ToolTestSchema,\n SiteConfigTestSchema,\n CommandExecutionTestSchema,\n FilePresenceTestSchema,\n FileContentTestSchema,\n BuildCheckTestSchema,\n VitestTestSchema,\n PlaywrightNLTestSchema\n]);\n\nexport type Test = z.infer<typeof TestSchema>;\n\n/**\n * Union of all test result types.\n */\nexport type TestResult =\n | LLMTestResult\n | ToolTestResult\n | SiteConfigTestResult\n | CommandExecutionTestResult\n | FilePresenceTestResult\n | FileContentTestResult\n | BuildCheckTestResult\n | VitestTestResult\n | PlaywrightNLTestResult;\n", "import { z } from 'zod';\n\n/**\n * Test types - unified from old and new systems.\n */\nexport enum TestType {\n // From old system\n LLM = 'LLM',\n TOOL = 'TOOL',\n SITE_CONFIG = 'SITE_CONFIG',\n COMMAND_EXECUTION = 'COMMAND_EXECUTION',\n // From new system\n FILE_PRESENCE = 'FILE_PRESENCE',\n FILE_CONTENT = 'FILE_CONTENT',\n BUILD_CHECK = 'BUILD_CHECK',\n VITEST = 'VITEST',\n PLAYWRIGHT_NL = 'PLAYWRIGHT_NL'\n}\n\nexport const TestTypeSchema = z.enum(TestType);\n\n/**\n * Test importance levels.\n */\nexport enum TestImportance {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n CRITICAL = 'critical'\n}\n\nexport const TestImportanceSchema = z.enum(TestImportance);\n\n/**\n * Base test schema - common fields for all test types.\n */\nexport const BaseTestSchema = z.object({\n id: z.string(),\n type: TestTypeSchema,\n name: z.string().min(3),\n description: z.string().optional(),\n importance: TestImportanceSchema.optional()\n});\n\nexport type BaseTest = z.infer<typeof BaseTestSchema>;\n\n/**\n * Base test result interface.\n */\nexport interface BaseTestResult {\n type: TestType;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * LLM Test schema - tests that use an LLM evaluator.\n */\nexport const LLMTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.LLM),\n /** Maximum steps for the LLM to take */\n maxSteps: z.number().min(1).max(100),\n /** Prompt to send to the evaluator */\n prompt: z.string().min(1),\n /** ID of the evaluator agent to use */\n evaluatorId: z.string()\n});\n\nexport type LLMTest = z.infer<typeof LLMTestSchema>;\n\n/**\n * LLM Test result.\n */\nexport interface LLMTestResult extends BaseTestResult {\n type: TestType.LLM;\n testPrompt: string;\n testSystemPrompt?: string;\n text: string;\n scoreReasoning: string;\n score: number;\n totalMicrocentsSpent?: number;\n usage?: {\n promptTokens?: number;\n completionTokens?: number;\n totalTokens?: number;\n };\n reasoning?: string;\n reasoningDetails?: unknown;\n finishReason?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Tool Test schema - tests that verify tool usage.\n */\nexport const ToolTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.TOOL),\n /** Name of the tool that should be called */\n toolName: z.string().min(3),\n /** Expected arguments for the tool call */\n args: z.record(z.string(), z.any()),\n /** Expected content in the tool results */\n resultsContent: z.string()\n});\n\nexport type ToolTest = z.infer<typeof ToolTestSchema>;\n\n/**\n * Tool Test result.\n */\nexport interface ToolTestResult extends BaseTestResult {\n type: TestType.TOOL;\n result: boolean;\n toolUsed: boolean;\n actualArgs: Record<string, any>;\n isResultsValid: boolean;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Site Config Test schema - tests that verify site configuration via API.\n */\nexport const SiteConfigTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.SITE_CONFIG),\n /** URL to call */\n url: z.string().url(),\n /** HTTP method */\n method: z.enum(['GET', 'POST']),\n /** Request body (for POST) */\n body: z.string().optional(),\n /** Expected HTTP status code */\n expectedStatusCode: z.number().int().min(100).max(599),\n /** Expected response content */\n expectedResponse: z.string().optional(),\n /** JMESPath expression to extract from response */\n expectedResponseJMESPath: z.string().optional()\n});\n\nexport type SiteConfigTest = z.infer<typeof SiteConfigTestSchema>;\n\n/**\n * Site Config Test result.\n */\nexport interface SiteConfigTestResult extends BaseTestResult {\n type: TestType.SITE_CONFIG;\n result: boolean;\n actualStatusCode: number;\n actualResponse: unknown;\n allActualResponse: unknown;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Allowed commands for command execution tests.\n */\nexport const AllowedCommands = [\n 'yarn install --no-immutable && yarn build',\n 'npm run build',\n 'yarn typecheck'\n] as const;\n\n/**\n * Command Execution Test schema - tests that verify command execution.\n */\nexport const CommandExecutionTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.COMMAND_EXECUTION),\n /** Command to execute (must be in AllowedCommands) */\n command: z\n .string()\n .refine((value) => (AllowedCommands as readonly string[]).includes(value), {\n message: `Command must be one of: ${AllowedCommands.join(', ')}`\n }),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().default(0).optional()\n});\n\nexport type CommandExecutionTest = z.infer<typeof CommandExecutionTestSchema>;\n\n/**\n * Command Execution Test result.\n */\nexport interface CommandExecutionTestResult extends BaseTestResult {\n type: TestType.COMMAND_EXECUTION;\n stdout: string;\n stderr: string;\n exitCode: number | null;\n expectedExitCode: number;\n result: boolean;\n error?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File Presence Test schema - tests that verify file existence.\n */\nexport const FilePresenceTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_PRESENCE),\n /** Paths to check */\n paths: z.array(z.string()),\n /** Whether files should exist (true) or not exist (false) */\n shouldExist: z.boolean()\n});\n\nexport type FilePresenceTest = z.infer<typeof FilePresenceTestSchema>;\n\n/**\n * File Presence Test result.\n */\nexport interface FilePresenceTestResult extends BaseTestResult {\n type: TestType.FILE_PRESENCE;\n result: boolean;\n existingPaths: string[];\n missingPaths: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File content checks schema.\n */\nexport const FileContentCheckSchema = z.object({\n /** Strings that must be present in the file */\n contains: z.array(z.string()).optional(),\n /** Strings that must NOT be present in the file */\n notContains: z.array(z.string()).optional(),\n /** Regex pattern the content must match */\n matches: z.string().optional(),\n /** JSON path checks for structured content */\n jsonPath: z\n .array(\n z.object({\n path: z.string(),\n value: z.unknown()\n })\n )\n .optional(),\n /** Lines that should be added (for diff checking) */\n added: z.array(z.string()).optional(),\n /** Lines that should be removed (for diff checking) */\n removed: z.array(z.string()).optional()\n});\n\nexport type FileContentCheck = z.infer<typeof FileContentCheckSchema>;\n\n/**\n * File Content Test schema - tests that verify file content.\n *\n * This also covers the FILE_MODIFICATION use case from the old system\n * by supporting added/removed line checks.\n */\nexport const FileContentTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_CONTENT),\n /** Path to the file to check */\n path: z.string(),\n /** Content checks to perform */\n checks: FileContentCheckSchema\n});\n\nexport type FileContentTest = z.infer<typeof FileContentTestSchema>;\n\n/**\n * File Content Test result.\n */\nexport interface FileContentTestResult extends BaseTestResult {\n type: TestType.FILE_CONTENT;\n result: boolean;\n diff?: string;\n failedChecks?: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Build Check Test schema - tests that verify build success.\n */\nexport const BuildCheckTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.BUILD_CHECK),\n /** Build command to execute */\n command: z.string(),\n /** Whether the build should succeed */\n expectSuccess: z.boolean(),\n /** Maximum allowed warnings (optional) */\n allowedWarnings: z.number().optional(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type BuildCheckTest = z.infer<typeof BuildCheckTestSchema>;\n\n/**\n * Build Check Test result.\n */\nexport interface BuildCheckTestResult extends BaseTestResult {\n type: TestType.BUILD_CHECK;\n result: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n warningCount: number;\n duration: number;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Vitest Test schema - tests that run Vitest test files.\n */\nexport const VitestTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.VITEST),\n /** Test file content */\n testFile: z.string(),\n /** Name of the test file */\n testFileName: z.string(),\n /** Minimum pass rate required (0-100) */\n minPassRate: z.number().min(0).max(100)\n});\n\nexport type VitestTest = z.infer<typeof VitestTestSchema>;\n\n/**\n * Vitest Test result.\n */\nexport interface VitestTestResult extends BaseTestResult {\n type: TestType.VITEST;\n result: boolean;\n passRate: number;\n passed: number;\n failed: number;\n skipped: number;\n total: number;\n duration: number;\n output: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Playwright Natural Language Test schema - tests using natural language descriptions.\n */\nexport const PlaywrightNLTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.PLAYWRIGHT_NL),\n /** Natural language steps to execute */\n steps: z.array(z.string()),\n /** Expected outcome description */\n expectedOutcome: z.string(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type PlaywrightNLTest = z.infer<typeof PlaywrightNLTestSchema>;\n\n/**\n * Playwright NL Test result.\n */\nexport interface PlaywrightNLTestResult extends BaseTestResult {\n type: TestType.PLAYWRIGHT_NL;\n result: boolean;\n stepsExecuted: number;\n totalSteps: number;\n failedStep?: string;\n screenshot?: string;\n duration: number;\n}\n", "import { z } from 'zod';\n\n/**\n * Assertion: the agent must have invoked one or more skills during the run.\n * Checked by inspecting the LLM trace for \"Skill\" tool uses with the given skills.\n * When multiple skills are in one assertion, they are treated as a group (1 assertion).\n * Each skill in the group must have been called for the assertion to pass.\n * To check skills independently, add them as separate assertions.\n */\nexport const SkillWasCalledAssertionSchema = z.object({\n type: z.literal('skill_was_called'),\n /** Names of the skills that must have been called (matched against trace Skill tool args) */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledAssertion = z.infer<\n typeof SkillWasCalledAssertionSchema\n>;\n\n/**\n * Assertion: a build command must exit with the expected code (default 0).\n * Runs the command in the scenario working directory.\n */\nexport const BuildPassedAssertionSchema = z.object({\n type: z.literal('build_passed'),\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedAssertion = z.infer<typeof BuildPassedAssertionSchema>;\n\n/**\n * Assertion: an LLM judges the scenario output (score 0-100).\n * Prompt can use {{output}}, {{cwd}}, {{changedFiles}}, {{trace}}.\n * Passes if judge score >= minScore.\n */\nexport const LlmJudgeAssertionSchema = z.object({\n type: z.literal('llm_judge'),\n /** Prompt template; placeholders: {{output}}, {{cwd}}, {{changedFiles}}, {{trace}} */\n prompt: z.string(),\n /** Optional system prompt for the judge (default asks for JSON with score) */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku) */\n model: z.string().optional(),\n maxTokens: z.number().int().optional(),\n temperature: z.number().min(0).max(1).optional()\n});\n\nexport type LlmJudgeAssertion = z.infer<typeof LlmJudgeAssertionSchema>;\n\n/**\n * Union of all assertion types (per scenario).\n * Each assertion has a type and type-specific data.\n * Uses z.union (not z.discriminatedUnion) for Zod v4 compatibility when used as array element.\n */\nexport const AssertionSchema = z.union([\n SkillWasCalledAssertionSchema,\n BuildPassedAssertionSchema,\n LlmJudgeAssertionSchema\n]);\n\nexport type Assertion = z.infer<typeof AssertionSchema>;\n", "import { z } from 'zod';\n\n/**\n * Local project configuration schema.\n */\nexport const LocalProjectConfigSchema = z.object({\n /** Template ID to use for the local project */\n templateId: z.string().optional(),\n /** Files to create in the project */\n files: z\n .array(\n z.object({\n path: z.string().min(1),\n content: z.string().min(1)\n })\n )\n .optional()\n});\n\nexport type LocalProjectConfig = z.infer<typeof LocalProjectConfigSchema>;\n\n/**\n * Meta site configuration schema for API-based setup.\n */\nexport const MetaSiteConfigSchema = z.object({\n configurations: z\n .array(\n z.object({\n name: z.string().min(1),\n apiCalls: z.array(\n z.object({\n url: z.string().url(),\n method: z.enum(['POST', 'PUT']),\n body: z.string()\n })\n )\n })\n )\n .optional()\n});\n\nexport type MetaSiteConfig = z.infer<typeof MetaSiteConfigSchema>;\n\n/**\n * Environment configuration schema.\n *\n * Defines the environment setup required for running a test scenario.\n * Migrated from the old Prompt schema.\n */\nexport const EnvironmentSchema = z.object({\n /** Local project configuration */\n localProject: LocalProjectConfigSchema.optional(),\n /** Meta site configuration */\n metaSite: MetaSiteConfigSchema.optional()\n});\n\nexport type Environment = z.infer<typeof EnvironmentSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { AssertionSchema } from './assertions.js';\nimport { ScenarioAssertionLinkSchema } from '../assertion/assertion.js';\n\n/**\n * Expected file schema - a file the agent is expected to create or modify.\n * Used by eval results; not persisted on test_scenarios table.\n */\nexport const ExpectedFileSchema = z.object({\n /** Relative path where the file should be created */\n path: z.string(),\n /** Optional expected content */\n content: z.string().optional()\n});\n\nexport type ExpectedFile = z.infer<typeof ExpectedFileSchema>;\n\n/**\n * TestScenario schema - defines a single test scenario.\n *\n * Persisted shape matches test_scenarios table:\n * id, project_id, name, description, trigger_prompt, template_id, created_at, updated_at, deleted.\n * Linked assertions stored in scenario_assertions junction table.\n */\nexport const TestScenarioSchema = TenantEntitySchema.extend({\n /** The prompt sent to the agent to trigger the task */\n triggerPrompt: z.string().min(10),\n /** ID of the template to use for this scenario (null = no template) */\n templateId: z.string().nullish(),\n /** Inline assertions to evaluate for this scenario (legacy) */\n assertions: z.array(AssertionSchema).optional(),\n /** IDs of saved assertions to evaluate (from assertions table) - legacy, use assertionLinks */\n assertionIds: z.array(z.string()).optional(),\n /** Linked assertions with per-scenario parameter values */\n assertionLinks: z.array(ScenarioAssertionLinkSchema).optional()\n});\n\nexport type TestScenario = z.infer<typeof TestScenarioSchema>;\n\n/**\n * Input schema for creating a new TestScenario.\n */\nexport const CreateTestScenarioInputSchema = TestScenarioSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestScenarioInput = z.infer<\n typeof CreateTestScenarioInputSchema\n>;\n\n/**\n * Input schema for updating a TestScenario.\n */\nexport const UpdateTestScenarioInputSchema =\n CreateTestScenarioInputSchema.partial();\n\nexport type UpdateTestScenarioInput = z.infer<\n typeof UpdateTestScenarioInputSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Assertion types:\n * - skill_was_called: Checks if a specific skill was invoked (deterministic, system-level)\n * - build_passed: Runs a command and checks exit code (deterministic, system-level)\n * - llm_judge: LLM evaluates output with a prompt (LLM-based, user-created)\n */\nexport const AssertionTypeSchema = z.enum([\n 'skill_was_called',\n 'build_passed',\n 'llm_judge'\n]);\n\n/**\n * Parameter types supported in assertion parameters.\n */\nexport const AssertionParameterTypeSchema = z.enum([\n 'string',\n 'number',\n 'boolean'\n]);\n\nexport type AssertionParameterType = z.infer<\n typeof AssertionParameterTypeSchema\n>;\n\n/**\n * Schema for defining assertion parameters.\n * Parameters can be required or optional, with optional default values.\n */\nexport const AssertionParameterSchema = z.object({\n /** Parameter name (used as key in params object) */\n name: z.string().min(1),\n /** Display label for the parameter */\n label: z.string().min(1),\n /** Parameter type */\n type: AssertionParameterTypeSchema,\n /** Whether this parameter is required */\n required: z.boolean(),\n /** Default value (optional, used when not provided) */\n defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),\n /** If true, parameter is hidden by default behind \"Show advanced options\" */\n advanced: z.boolean().optional()\n});\n\nexport type AssertionParameter = z.infer<typeof AssertionParameterSchema>;\n\n/**\n * Schema for scenario-assertion link with parameter values.\n * Used when linking assertions to scenarios with specific parameter values.\n */\nexport const ScenarioAssertionLinkSchema = z.object({\n /** ID of the assertion (can be system assertion like 'system:skill_was_called' or custom assertion UUID) */\n assertionId: z.string(),\n /** Parameter values for this assertion in this scenario */\n params: z\n .record(\n z.string(),\n z.union([z.string(), z.number(), z.boolean(), z.null()])\n )\n .optional()\n});\n\nexport type ScenarioAssertionLink = z.infer<typeof ScenarioAssertionLinkSchema>;\n\nexport type AssertionType = z.infer<typeof AssertionTypeSchema>;\n\n/**\n * Configuration for skill_was_called assertion type.\n * Multiple skills in one assertion are treated as a group (1 assertion).\n * All skills in the group must have been called for the assertion to pass.\n */\nexport const SkillWasCalledConfigSchema = z.object({\n /** Names of the skills that must have been called */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledConfig = z.infer<typeof SkillWasCalledConfigSchema>;\n\n/**\n * Configuration for build_passed assertion type.\n * Uses strictObject to reject objects with unknown keys (prevents matching LlmJudge configs).\n */\nexport const BuildPassedConfigSchema = z.strictObject({\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedConfig = z.infer<typeof BuildPassedConfigSchema>;\n\n/**\n * Configuration for llm_judge assertion type.\n * User-created assertions with customizable parameters.\n */\nexport const LlmJudgeConfigSchema = z.object({\n /**\n * Prompt template with placeholders:\n * - {{output}}: agent's final output\n * - {{cwd}}: working directory\n * - {{changedFiles}}: all files changed (new, modified)\n * - {{modifiedFiles}}: only existing files that were modified\n * - {{newFiles}}: only new files that were created\n * - {{trace}}: step-by-step trace of tool calls\n * - Custom parameters defined in the parameters array\n */\n prompt: z.string().min(1),\n /** Optional system prompt for the judge */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku-20241022) */\n model: z.string().optional(),\n /** Max output tokens */\n maxTokens: z.number().int().optional(),\n /** Temperature (0-1) */\n temperature: z.number().min(0).max(1).optional(),\n /** User-defined parameters for this assertion */\n parameters: z.array(AssertionParameterSchema).optional()\n});\n\nexport type LlmJudgeConfig = z.infer<typeof LlmJudgeConfigSchema>;\n\n/**\n * Union of all assertion config types.\n * Order matters: schemas with required fields first, then optional-only schemas.\n * This ensures LlmJudge (requires prompt) and SkillWasCalled (requires skillNames)\n * are matched before BuildPassed (all optional) or empty object.\n */\nexport const AssertionConfigSchema = z.union([\n LlmJudgeConfigSchema, // requires prompt - check first\n SkillWasCalledConfigSchema, // requires skillName\n BuildPassedConfigSchema, // all optional, uses strictObject to reject unknown keys\n z.object({}) // fallback empty config\n]);\n\nexport type AssertionConfig = z.infer<typeof AssertionConfigSchema>;\n\n/**\n * Custom Assertion entity - stored in the database.\n * Replaces inline assertions in test scenarios.\n */\nexport const CustomAssertionSchema = TenantEntitySchema.extend({\n /** The assertion type */\n type: AssertionTypeSchema,\n /** Type-specific configuration */\n config: AssertionConfigSchema\n});\n\nexport type CustomAssertion = z.infer<typeof CustomAssertionSchema>;\n\n/**\n * Input schema for creating a new CustomAssertion.\n */\nexport const CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateCustomAssertionInput = z.infer<\n typeof CreateCustomAssertionInputSchema\n>;\n\n/**\n * Input schema for updating a CustomAssertion.\n */\nexport const UpdateCustomAssertionInputSchema =\n CreateCustomAssertionInputSchema.partial();\n\nexport type UpdateCustomAssertionInput = z.infer<\n typeof UpdateCustomAssertionInputSchema\n>;\n\n/**\n * Helper function to validate config based on assertion type.\n * Returns true if config is valid for the given type.\n */\nexport function validateAssertionConfig(\n type: AssertionType,\n config: unknown\n): boolean {\n switch (type) {\n case 'skill_was_called':\n return SkillWasCalledConfigSchema.safeParse(config).success;\n case 'build_passed':\n return BuildPassedConfigSchema.safeParse(config).success;\n case 'llm_judge':\n return LlmJudgeConfigSchema.safeParse(config).success;\n default:\n return false;\n }\n}\n\n/**\n * Get typed config for skill_was_called assertion.\n */\nexport function getSkillWasCalledConfig(\n assertion: CustomAssertion\n): SkillWasCalledConfig | null {\n if (assertion.type !== 'skill_was_called') return null;\n const result = SkillWasCalledConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for build_passed assertion.\n */\nexport function getBuildPassedConfig(\n assertion: CustomAssertion\n): BuildPassedConfig | null {\n if (assertion.type !== 'build_passed') return null;\n const result = BuildPassedConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for llm_judge assertion.\n */\nexport function getLlmJudgeConfig(\n assertion: CustomAssertion\n): LlmJudgeConfig | null {\n if (assertion.type !== 'llm_judge') return null;\n const result = LlmJudgeConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * TestSuite schema - a collection of test scenarios.\n *\n * Suites are used to organize and group related test scenarios.\n */\nexport const TestSuiteSchema = TenantEntitySchema.extend({\n /** IDs of test scenarios in this suite */\n scenarioIds: z.array(z.string())\n});\n\nexport type TestSuite = z.infer<typeof TestSuiteSchema>;\n\n/**\n * Input schema for creating a new TestSuite.\n */\nexport const CreateTestSuiteInputSchema = TestSuiteSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestSuiteInput = z.infer<typeof CreateTestSuiteInputSchema>;\n\n/**\n * Input schema for updating a TestSuite.\n */\nexport const UpdateTestSuiteInputSchema = CreateTestSuiteInputSchema.partial();\n\nexport type UpdateTestSuiteInput = z.infer<typeof UpdateTestSuiteInputSchema>;\n", "import { z } from 'zod';\n\n/**\n * Token usage schema.\n */\nexport const TokenUsageSchema = z.object({\n prompt: z.number(),\n completion: z.number(),\n total: z.number()\n});\n\nexport type TokenUsage = z.infer<typeof TokenUsageSchema>;\n\n/**\n * Evaluation metrics schema.\n */\nexport const EvalMetricsSchema = z.object({\n totalAssertions: z.number(),\n passed: z.number(),\n failed: z.number(),\n skipped: z.number(),\n errors: z.number(),\n passRate: z.number(),\n avgDuration: z.number(),\n totalDuration: z.number()\n});\n\nexport type EvalMetrics = z.infer<typeof EvalMetricsSchema>;\n\n/**\n * Evaluation status enum.\n */\nexport enum EvalStatus {\n PENDING = 'pending',\n RUNNING = 'running',\n COMPLETED = 'completed',\n FAILED = 'failed',\n CANCELLED = 'cancelled'\n}\n\nexport const EvalStatusSchema = z.enum(EvalStatus);\n\n/**\n * LLM step type enum.\n */\nexport enum LLMStepType {\n COMPLETION = 'completion',\n TOOL_USE = 'tool_use',\n TOOL_RESULT = 'tool_result',\n THINKING = 'thinking'\n}\n\n/**\n * LLM trace step schema.\n */\nexport const LLMTraceStepSchema = z.object({\n id: z.string(),\n stepNumber: z.number(),\n type: z.enum(LLMStepType),\n model: z.string(),\n provider: z.string(),\n startedAt: z.string(),\n durationMs: z.number(),\n tokenUsage: TokenUsageSchema,\n costUsd: z.number(),\n toolName: z.string().optional(),\n toolArguments: z.string().optional(),\n inputPreview: z.string().optional(),\n outputPreview: z.string().optional(),\n success: z.boolean(),\n error: z.string().optional()\n});\n\nexport type LLMTraceStep = z.infer<typeof LLMTraceStepSchema>;\n\n/**\n * LLM breakdown stats schema.\n */\nexport const LLMBreakdownStatsSchema = z.object({\n count: z.number(),\n durationMs: z.number(),\n tokens: z.number(),\n costUsd: z.number()\n});\n\nexport type LLMBreakdownStats = z.infer<typeof LLMBreakdownStatsSchema>;\n\n/**\n * LLM trace summary schema.\n */\nexport const LLMTraceSummarySchema = z.object({\n totalSteps: z.number(),\n totalDurationMs: z.number(),\n totalTokens: TokenUsageSchema,\n totalCostUsd: z.number(),\n stepTypeBreakdown: z.record(z.string(), LLMBreakdownStatsSchema).optional(),\n modelBreakdown: z.record(z.string(), LLMBreakdownStatsSchema),\n modelsUsed: z.array(z.string())\n});\n\nexport type LLMTraceSummary = z.infer<typeof LLMTraceSummarySchema>;\n\n/**\n * LLM trace schema.\n */\nexport const LLMTraceSchema = z.object({\n id: z.string(),\n steps: z.array(LLMTraceStepSchema),\n summary: LLMTraceSummarySchema\n});\n\nexport type LLMTrace = z.infer<typeof LLMTraceSchema>;\n", "import { z } from 'zod';\nimport { TestResult } from '../test/index.js';\nimport {\n EvalMetricsSchema,\n LLMTraceSchema,\n LLMTraceStepSchema\n} from './metrics.js';\nimport { DiffContentSchema, TemplateFileSchema } from './eval-run.js';\nimport { ModelConfigSchema } from '../common/models.js';\nimport { ExpectedFileSchema } from '../scenario/test-scenario.js';\n\n/**\n * Assertion result status enum.\n * Defined locally to avoid bundling eval-assertions Node.js code in browser.\n * This is structurally identical to the one in @wix/eval-assertions.\n */\nexport enum AssertionResultStatus {\n PASSED = 'passed',\n FAILED = 'failed',\n SKIPPED = 'skipped',\n ERROR = 'error'\n}\n\n/**\n * Assertion result schema.\n */\nexport const AssertionResultSchema = z.object({\n id: z.string(),\n assertionId: z.string(),\n assertionType: z.string(),\n assertionName: z.string(),\n status: z.enum(AssertionResultStatus),\n message: z.string().optional(),\n expected: z.string().optional(),\n actual: z.string().optional(),\n duration: z.number().optional(),\n details: z.record(z.string(), z.unknown()).optional(),\n llmTraceSteps: z.array(LLMTraceStepSchema).optional()\n});\n\nexport type AssertionResult = z.infer<typeof AssertionResultSchema>;\n\n/**\n * Evaluation run result schema - result for a single scenario/target combination.\n */\nexport const EvalRunResultSchema = z.object({\n id: z.string(),\n targetId: z.string(),\n targetName: z.string().optional(),\n /** SkillVersion ID used for this evaluation (for version tracking) */\n skillVersionId: z.string().optional(),\n /** SkillVersion semver string (e.g., \"1.0.0\", \"1.2.3\") for display */\n skillVersion: z.string().optional(),\n scenarioId: z.string(),\n scenarioName: z.string(),\n modelConfig: ModelConfigSchema.optional(),\n assertionResults: z.array(AssertionResultSchema),\n metrics: EvalMetricsSchema.optional(),\n passed: z.number(),\n failed: z.number(),\n passRate: z.number(),\n duration: z.number(),\n outputText: z.string().optional(),\n files: z.array(ExpectedFileSchema).optional(),\n fileDiffs: z.array(DiffContentSchema).optional(),\n /** Full template files after execution with status indicators */\n templateFiles: z.array(TemplateFileSchema).optional(),\n startedAt: z.string().optional(),\n completedAt: z.string().optional(),\n llmTrace: LLMTraceSchema.optional()\n});\n\nexport type EvalRunResult = z.infer<typeof EvalRunResultSchema>;\n\n/**\n * Prompt result schema - detailed result from prompt execution.\n */\nexport const PromptResultSchema = z.object({\n text: z.string(),\n files: z.array(z.unknown()).optional(),\n finishReason: z.string().optional(),\n reasoning: z.string().optional(),\n reasoningDetails: z.unknown().optional(),\n toolCalls: z.array(z.unknown()).optional(),\n toolResults: z.array(z.unknown()).optional(),\n warnings: z.array(z.unknown()).optional(),\n sources: z.array(z.unknown()).optional(),\n steps: z.array(z.unknown()),\n generationTimeMs: z.number(),\n prompt: z.string(),\n systemPrompt: z.string(),\n usage: z.object({\n totalTokens: z.number().optional(),\n totalMicrocentsSpent: z.number().optional()\n })\n});\n\nexport type PromptResult = z.infer<typeof PromptResultSchema>;\n\n/**\n * Full evaluation result schema - complete result for a single evaluation.\n */\nexport const EvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n promptResult: PromptResultSchema,\n testResults: z.array(z.unknown()) as z.ZodType<TestResult[]>,\n tags: z.array(z.string()).optional(),\n feedback: z.string().optional(),\n score: z.number(),\n suiteId: z.string().optional()\n});\n\nexport type EvaluationResult = z.infer<typeof EvaluationResultSchema>;\n\n/**\n * Lean evaluation result - summary for listing.\n */\nexport const LeanEvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n tags: z.array(z.string()).optional(),\n scenarioId: z.string(),\n scenarioVersion: z.number().optional(),\n targetId: z.string(),\n targetVersion: z.number().optional(),\n suiteId: z.string().optional(),\n score: z.number(),\n time: z.number().optional(),\n microcentsSpent: z.number().optional()\n});\n\nexport type LeanEvaluationResult = z.infer<typeof LeanEvaluationResultSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { EvalRunResultSchema } from './eval-result.js';\nimport {\n EvalMetricsSchema,\n EvalStatusSchema,\n LLMTraceSummarySchema\n} from './metrics.js';\nimport { LiveTraceEventSchema } from './live-trace.js';\n\n/**\n * Trigger types for evaluations.\n */\nexport enum TriggerType {\n RESOURCES_UPDATED = 'RESOURCES_UPDATED',\n MCP_VERSION_RELEASE = 'MCP_VERSION_RELEASE',\n MCP_PREVIEW_CREATED = 'MCP_PREVIEW_CREATED',\n MANUAL = 'MANUAL'\n}\n\n/**\n * Trigger metadata schema.\n */\nexport const TriggerMetadataSchema = z.object({\n version: z.string().optional(),\n resourceUpdated: z.array(z.string()).optional()\n});\n\nexport type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;\n\n/**\n * Trigger schema.\n */\nexport const TriggerSchema = z.object({\n id: z.string(),\n metadata: TriggerMetadataSchema.optional(),\n type: z.enum(TriggerType)\n});\n\nexport type Trigger = z.infer<typeof TriggerSchema>;\n\n/**\n * Failure category enum.\n */\nexport enum FailureCategory {\n MISSING_FILE = 'missing_file',\n WRONG_CONTENT = 'wrong_content',\n BUILD_ERROR = 'build_error',\n TEST_FAILURE = 'test_failure',\n RUNTIME_ERROR = 'runtime_error',\n PERFORMANCE = 'performance'\n}\n\n/**\n * Failure severity enum.\n */\nexport enum FailureSeverity {\n CRITICAL = 'critical',\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = 'low'\n}\n\n/**\n * Diff line type schema.\n */\nexport const DiffLineTypeSchema = z.enum(['added', 'removed', 'unchanged']);\nexport type DiffLineType = z.infer<typeof DiffLineTypeSchema>;\n\n/**\n * Diff line schema - represents a single line in a diff.\n */\nexport const DiffLineSchema = z.object({\n type: DiffLineTypeSchema,\n content: z.string(),\n lineNumber: z.number()\n});\n\nexport type DiffLine = z.infer<typeof DiffLineSchema>;\n\n/**\n * Diff content schema - represents a file diff.\n */\nexport const DiffContentSchema = z.object({\n path: z.string(),\n expected: z.string(),\n actual: z.string(),\n diffLines: z.array(DiffLineSchema),\n renamedFrom: z.string().optional()\n});\n\nexport type DiffContent = z.infer<typeof DiffContentSchema>;\n\n/**\n * Command execution schema.\n */\nexport const CommandExecutionSchema = z.object({\n command: z.string(),\n exitCode: z.number(),\n output: z.string().optional(),\n duration: z.number()\n});\n\nexport type CommandExecution = z.infer<typeof CommandExecutionSchema>;\n\n/**\n * File modification schema.\n */\nexport const FileModificationSchema = z.object({\n path: z.string(),\n action: z.enum(['created', 'modified', 'deleted'])\n});\n\nexport type FileModification = z.infer<typeof FileModificationSchema>;\n\n/**\n * Template file status enum.\n */\nexport enum TemplateFileStatus {\n NEW = 'new',\n MODIFIED = 'modified',\n UNCHANGED = 'unchanged'\n}\n\n/**\n * Template file schema - represents a file in the template with its full content.\n */\nexport const TemplateFileSchema = z.object({\n /** Relative path within the template */\n path: z.string(),\n /** Full file content after execution */\n content: z.string(),\n /** File status (new, modified, unchanged) */\n status: z.enum(['new', 'modified', 'unchanged'])\n});\n\nexport type TemplateFile = z.infer<typeof TemplateFileSchema>;\n\n/**\n * API call schema.\n */\nexport const ApiCallSchema = z.object({\n endpoint: z.string(),\n tokensUsed: z.number(),\n duration: z.number()\n});\n\nexport type ApiCall = z.infer<typeof ApiCallSchema>;\n\n/**\n * Execution trace schema - represents detailed execution information.\n */\nexport const ExecutionTraceSchema = z.object({\n commands: z.array(CommandExecutionSchema),\n filesModified: z.array(FileModificationSchema),\n apiCalls: z.array(ApiCallSchema),\n totalDuration: z.number()\n});\n\nexport type ExecutionTrace = z.infer<typeof ExecutionTraceSchema>;\n\n/**\n * Failure analysis schema.\n */\nexport const FailureAnalysisSchema = z.object({\n category: z.enum(FailureCategory),\n severity: z.enum(FailureSeverity),\n summary: z.string(),\n details: z.string(),\n rootCause: z.string(),\n suggestedFix: z.string(),\n relatedAssertions: z.array(z.string()),\n codeSnippet: z.string().optional(),\n similarIssues: z.array(z.string()).optional(),\n patternId: z.string().optional(),\n // Extended fields for detailed debugging\n diff: DiffContentSchema.optional(),\n executionTrace: ExecutionTraceSchema.optional()\n});\n\nexport type FailureAnalysis = z.infer<typeof FailureAnalysisSchema>;\n\n/**\n * Evaluation run schema.\n *\n * Represents a complete evaluation run with configuration, results, and metrics.\n */\nexport const EvalRunSchema = TenantEntitySchema.extend({\n /** Agent ID for this run */\n agentId: z.string().optional(),\n /** Skills group ID for this run */\n skillsGroupId: z.string().optional(),\n /** Map of skillId to skillVersionId for this run */\n skillVersions: z.record(z.string(), z.string()).optional(),\n /** Scenario IDs to run */\n scenarioIds: z.array(z.string()),\n /** Current status */\n status: EvalStatusSchema,\n /** Progress percentage (0-100) */\n progress: z.number(),\n /** Results for each scenario/target combination (lazy to break eval-result \u2194 eval-run cycle) */\n results: z.array(z.lazy(() => EvalRunResultSchema)),\n /** Aggregated metrics across all results */\n aggregateMetrics: EvalMetricsSchema,\n /** Failure analyses */\n failureAnalyses: z.array(FailureAnalysisSchema).optional(),\n /** Aggregated LLM trace summary */\n llmTraceSummary: LLMTraceSummarySchema.optional(),\n /** What triggered this run */\n trigger: TriggerSchema.optional(),\n /** When the run started (set when evaluation is triggered) */\n startedAt: z.string().optional(),\n /** When the run completed */\n completedAt: z.string().optional(),\n /** Live trace events captured during execution (for playback on results page) */\n liveTraceEvents: z.array(LiveTraceEventSchema).optional(),\n /** Remote job ID for tracking execution in Dev Machines */\n jobId: z.string().optional(),\n /** Remote job status from the Dev Machine API (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED) */\n jobStatus: z.string().optional(),\n /** Remote job error message if the job failed */\n jobError: z.string().optional(),\n /** Timestamp of the last job status check */\n jobStatusCheckedAt: z.string().optional(),\n /** MCP server IDs to enable for this run (optional) */\n mcpIds: z.array(z.string()).optional(),\n /** Sub-agent IDs to enable for this run (optional) */\n subAgentIds: z.array(z.string()).optional()\n});\n\nexport type EvalRun = z.infer<typeof EvalRunSchema>;\n\n/**\n * Input schema for creating a new EvalRun.\n */\nexport const CreateEvalRunInputSchema = EvalRunSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n status: true,\n progress: true,\n results: true,\n aggregateMetrics: true,\n startedAt: true,\n completedAt: true\n});\n\nexport type CreateEvalRunInput = z.infer<typeof CreateEvalRunInputSchema>;\n\n/**\n * Evaluation progress schema.\n */\nexport const EvaluationProgressSchema = z.object({\n runId: z.string(),\n targetId: z.string(),\n totalScenarios: z.number(),\n completedScenarios: z.number(),\n scenarioProgress: z.array(\n z.object({\n scenarioId: z.string(),\n currentStep: z.string(),\n error: z.string().optional()\n })\n ),\n createdAt: z.number()\n});\n\nexport type EvaluationProgress = z.infer<typeof EvaluationProgressSchema>;\n\n/**\n * Evaluation log schema.\n */\nexport const EvaluationLogSchema = z.object({\n runId: z.string(),\n scenarioId: z.string(),\n log: z.object({\n level: z.enum(['info', 'error', 'debug']),\n message: z.string().optional(),\n args: z.array(z.any()).optional(),\n error: z.string().optional()\n })\n});\n\nexport type EvaluationLog = z.infer<typeof EvaluationLogSchema>;\n\n/**\n * LLM timeout constant (2 minutes).\n */\nexport const LLM_TIMEOUT = 120000;\n", "import { z } from 'zod';\n\n/**\n * Live trace event type enum.\n * Maps to the step types but includes streaming states.\n */\nexport enum LiveTraceEventType {\n THINKING = 'thinking',\n TOOL_USE = 'tool_use',\n COMPLETION = 'completion',\n TOOL_RESULT = 'tool_result',\n /** Diagnostic information for debugging environment/setup issues */\n DIAGNOSTIC = 'diagnostic',\n /** Periodic progress heartbeat during long operations */\n PROGRESS = 'progress',\n /** File write operation */\n FILE_WRITE = 'file_write',\n /** File read operation */\n FILE_READ = 'file_read',\n /** System message from the SDK */\n SYSTEM = 'system',\n /** User message (tool result from file operations etc.) */\n USER = 'user'\n}\n\n/**\n * Live trace event schema.\n * Represents a single trace event emitted during agent execution.\n */\nexport const LiveTraceEventSchema = z.object({\n /** The evaluation run ID */\n evalRunId: z.string(),\n /** The scenario ID being executed */\n scenarioId: z.string(),\n /** The scenario name for display */\n scenarioName: z.string(),\n /** The target ID (skill, agent, etc.) */\n targetId: z.string(),\n /** The target name for display */\n targetName: z.string(),\n /** Step number in the current scenario execution */\n stepNumber: z.number(),\n /** Type of trace event */\n type: z.enum(LiveTraceEventType),\n /** Tool name if this is a tool_use event */\n toolName: z.string().optional(),\n /** Tool arguments preview (truncated JSON) */\n toolArgs: z.string().optional(),\n /** Output preview (truncated text) */\n outputPreview: z.string().optional(),\n /** File path for file operations */\n filePath: z.string().optional(),\n /** Elapsed time in milliseconds for progress events */\n elapsedMs: z.number().optional(),\n /** Thinking/reasoning text from Claude */\n thinking: z.string().optional(),\n /** Timestamp when this event occurred */\n timestamp: z.string(),\n /** Whether this is the final event for this scenario */\n isComplete: z.boolean()\n});\n\nexport type LiveTraceEvent = z.infer<typeof LiveTraceEventSchema>;\n\n/**\n * Prefix used in stdout to identify trace events.\n * Format: TRACE_EVENT:{json}\n */\nexport const TRACE_EVENT_PREFIX = 'TRACE_EVENT:';\n\n/**\n * Parse a line from stdout to extract a trace event if present.\n * @param line - A line from stdout\n * @returns The parsed LiveTraceEvent or null if not a trace event line\n */\nexport function parseTraceEventLine(line: string): LiveTraceEvent | null {\n if (!line.startsWith(TRACE_EVENT_PREFIX)) {\n return null;\n }\n\n try {\n const jsonStr = line.slice(TRACE_EVENT_PREFIX.length);\n const parsed = JSON.parse(jsonStr);\n const result = LiveTraceEventSchema.safeParse(parsed);\n return result.success ? result.data : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Format a trace event as a stdout line.\n * @param event - The trace event to format\n * @returns The formatted line with prefix\n */\nexport function formatTraceEventLine(event: LiveTraceEvent): string {\n return `${TRACE_EVENT_PREFIX}${JSON.stringify(event)}`;\n}\n", "import { z } from 'zod';\nimport { BaseEntitySchema } from '../common/base-entity.js';\n\n/**\n * Project schema - represents a tenant/workspace for data isolation.\n *\n * All entities belong to a project. Projects are the top-level\n * organizational unit for multi-tenancy.\n *\n * Note: Project extends BaseEntity (not TenantEntity) since\n * Project IS the tenant and doesn't need a projectId.\n */\nexport const ProjectSchema = BaseEntitySchema.extend({\n appId: z.string().optional().describe('The ID of the app in Dev Center'),\n appSecret: z\n .string()\n .optional()\n .describe('The secret of the app in Dev Center')\n});\n\nexport type Project = z.infer<typeof ProjectSchema>;\n\n/**\n * Input schema for creating a new Project.\n */\nexport const CreateProjectInputSchema = ProjectSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;\n\n/**\n * Input schema for updating a Project.\n */\nexport const UpdateProjectInputSchema = CreateProjectInputSchema.partial();\n\nexport type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\n/**\n * Template schema - a project template that can be used for test environments.\n *\n * Templates are tenant-based entities scoped to a project.\n * They define how to set up a project environment for testing.\n * The `source` field points to a GitHub directory that is fetched via the GitHub API.\n * It is optional to support the transition from the legacy `downloadUrl` field.\n */\nexport const TemplateSchema = TenantEntitySchema.extend({\n /** GitHub source reference for fetching template files */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Template = z.infer<typeof TemplateSchema>;\n\n/**\n * Input schema for creating a new Template.\n */\nexport const CreateTemplateInputSchema = TemplateSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTemplateInput = z.infer<typeof CreateTemplateInputSchema>;\n\n/**\n * Input schema for updating a Template.\n */\nexport const UpdateTemplateInputSchema = CreateTemplateInputSchema.partial();\n\nexport type UpdateTemplateInput = z.infer<typeof UpdateTemplateInputSchema>;\n", "import type { AssertionParameter, AssertionType } from './assertion.js';\n\n/**\n * System assertion definition - built-in assertions available to all projects.\n * These are not stored in the database but defined in code.\n */\nexport interface SystemAssertion {\n /** Unique ID prefixed with 'system:' */\n id: string;\n /** Display name */\n name: string;\n /** Description of what the assertion checks */\n description: string;\n /** Assertion type */\n type: AssertionType;\n /** Parameters that can be configured per-scenario */\n parameters: AssertionParameter[];\n}\n\n/**\n * System assertion IDs - prefixed with 'system:' to distinguish from custom assertions.\n */\nexport const SYSTEM_ASSERTION_IDS = {\n SKILL_WAS_CALLED: 'system:skill_was_called',\n BUILD_PASSED: 'system:build_passed',\n LLM_JUDGE: 'system:llm_judge'\n} as const;\n\nexport type SystemAssertionId =\n (typeof SYSTEM_ASSERTION_IDS)[keyof typeof SYSTEM_ASSERTION_IDS];\n\n/**\n * Check if an assertion ID is a system assertion.\n */\nexport function isSystemAssertionId(id: string): id is SystemAssertionId {\n return id.startsWith('system:');\n}\n\n/**\n * Built-in system assertions.\n * These are available to all projects without needing to create them.\n */\nexport const SYSTEM_ASSERTIONS: Record<SystemAssertionId, SystemAssertion> = {\n [SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED]: {\n id: SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED,\n name: 'Skill Was Called',\n description:\n 'Check that one or more skills were invoked during the agent run',\n type: 'skill_was_called',\n parameters: [\n {\n name: 'skillNames',\n label: 'Skills',\n type: 'string',\n required: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.BUILD_PASSED]: {\n id: SYSTEM_ASSERTION_IDS.BUILD_PASSED,\n name: 'Build Passed',\n description: 'Run a build command and verify it exits with expected code',\n type: 'build_passed',\n parameters: [\n {\n name: 'command',\n label: 'Build Command',\n type: 'string',\n required: false,\n defaultValue: 'yarn build'\n },\n {\n name: 'expectedExitCode',\n label: 'Expected Exit Code',\n type: 'number',\n required: false,\n defaultValue: 0\n },\n {\n name: 'maxBuildTime',\n label: 'Max Build Time (ms)',\n type: 'number',\n required: false,\n advanced: true\n },\n {\n name: 'maxMemory',\n label: 'Max Memory (MB)',\n type: 'number',\n required: false,\n advanced: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.LLM_JUDGE]: {\n id: SYSTEM_ASSERTION_IDS.LLM_JUDGE,\n name: 'LLM Judge',\n description: 'LLM evaluates the output and assigns a score (0-100)',\n type: 'llm_judge',\n parameters: [\n {\n name: 'prompt',\n label: 'Judge Prompt',\n type: 'string',\n required: true,\n defaultValue: 'Verify the output meets the acceptance criteria.'\n },\n {\n name: 'systemPrompt',\n label: 'System Prompt (optional)',\n type: 'string',\n required: false,\n defaultValue:\n 'You are judging a scenario run. Use these values:\\n- {{output}}: the agent\\'s final output\\n- {{cwd}}: working directory\\n- {{changedFiles}}: list of files changed (or \"No files were changed\")\\n- {{trace}}: step-by-step trace (tool calls, completions) to check e.g. which tools were called and how many times\\n\\nJudge how well the output meets the acceptance criteria stated in the user prompt.'\n },\n {\n name: 'minScore',\n label: 'Minimum Score (0-100)',\n type: 'number',\n required: false,\n defaultValue: 70\n }\n ]\n }\n};\n\n/**\n * Get all system assertions as an array.\n */\nexport function getSystemAssertions(): SystemAssertion[] {\n return Object.values(SYSTEM_ASSERTIONS);\n}\n\n/**\n * Get a system assertion by ID.\n */\nexport function getSystemAssertion(\n id: SystemAssertionId\n): SystemAssertion | undefined {\n return SYSTEM_ASSERTIONS[id];\n}\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,SAAS;AAKX,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,aAAa,EAAE,OAAO;AAAA,EACtB,WAAW,EAAE,OAAO;AAAA,EACpB,WAAW,EAAE,OAAO;AAAA,EACpB,SAAS,EAAE,QAAQ,EAAE,SAAS;AAChC,CAAC;AAOM,IAAM,qBAAqB,iBAAiB,OAAO;AAAA,EACxD,WAAW,EAAE,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A,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,cACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACJ;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AACF;AAKO,SAAS,sBAAyC;AACvD,SAAO,OAAO,OAAO,iBAAiB;AACxC;AAKO,SAAS,mBACd,IAC6B;AAC7B,SAAO,kBAAkB,EAAE;AAC7B;",
|
|
4
|
+
"sourcesContent": ["import { z } from 'zod';\n\n/**\n * Base entity schema with common fields for all entities.\n */\nexport const BaseEntitySchema = z.object({\n id: z.string(),\n name: z.string().min(1),\n description: z.string(),\n createdAt: z.string(),\n updatedAt: z.string(),\n deleted: z.boolean().optional()\n});\n\nexport type BaseEntity = z.infer<typeof BaseEntitySchema>;\n\n/**\n * Tenant entity schema - extends BaseEntity with projectId for multi-tenancy.\n */\nexport const TenantEntitySchema = BaseEntitySchema.extend({\n projectId: z.string()\n});\n\nexport type TenantEntity = z.infer<typeof TenantEntitySchema>;\n", "import { z } from 'zod';\n\n/**\n * GitHub source reference for a directory in a GitHub repository.\n * Used by skills and templates to point to content that can be fetched via the GitHub API.\n */\nexport const GitHubSourceSchema = z.object({\n /** GitHub org or user, e.g. \"wix\" */\n owner: z.string().min(1),\n /** Repository name, e.g. \"skills\" */\n repo: z.string().min(1),\n /** Folder path within the repo, e.g. \"wix-cli/skills/wix-cli-dashboard-page\" */\n path: z.string().min(1),\n /** Git ref (branch, tag, or SHA), e.g. \"master\" or \"v1.2.0\" */\n ref: z.string().min(1)\n});\n\nexport type GitHubSource = z.infer<typeof GitHubSourceSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from './base-entity.js';\n\n/**\n * Top-level key for the .mcp.json file written at run start.\n * Format: { [MCP_SERVERS_JSON_KEY]: { [mcpName]: config } }\n */\nexport const MCP_SERVERS_JSON_KEY = 'mcpServers';\n\n/**\n * MCP Entity schema - an MCP server definition stored per project.\n *\n * `name` is a display label for the entity (does NOT need to match the server\n * key inside `config`).\n *\n * `config` is a keyed `.mcp.json` entry, e.g.:\n * ```json\n * { \"wix-mcp\": { \"type\": \"http\", \"url\": \"\u2026\", \"headers\": { \u2026 } } }\n * ```\n * At evaluation time every MCP's config is spread into the `mcpServers` object\n * of the generated `.mcp.json` file.\n */\nexport const MCPEntitySchema = TenantEntitySchema.extend({\n /** Display name for the MCP entity (independent of the server key in config) */\n name: z.string().min(1),\n /** Keyed MCP server config \u2014 top-level key is the server name, value is its config */\n config: z.record(z.string(), z.unknown())\n});\n\nexport type MCPEntity = z.infer<typeof MCPEntitySchema>;\n\n/**\n * Input schema for creating a new MCP.\n */\nexport const CreateMcpInputSchema = MCPEntitySchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateMcpInput = z.infer<typeof CreateMcpInputSchema>;\n\n/**\n * Input schema for updating an MCP.\n */\nexport const UpdateMcpInputSchema = CreateMcpInputSchema.partial();\n\nexport type UpdateMcpInput = z.infer<typeof UpdateMcpInputSchema>;\n\n/**\n * MCP Server Configuration (legacy - for mcp.json config shape).\n * Config can be: { command, args }, { url, headers }, { type, command, args, env }, etc.\n */\nexport const MCPServerConfigSchema = z.record(z.string(), z.unknown());\n\nexport type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;\n", "import { z } from 'zod';\n\n/**\n * Anthropic Model IDs supported by the AI Gateway.\n * These values match the ClaudeModel enum from the Wix AI Gateway API.\n */\nexport enum ModelIds {\n CLAUDE_3_HAIKU_1_0 = 'CLAUDE_3_HAIKU_1_0',\n CLAUDE_3_OPUS_1_0 = 'CLAUDE_3_OPUS_1_0',\n CLAUDE_3_SONNET_1_0 = 'CLAUDE_3_SONNET_1_0',\n CLAUDE_3_5_SONNET_1_0 = 'CLAUDE_3_5_SONNET_1_0',\n CLAUDE_3_5_SONNET_2_0 = 'CLAUDE_3_5_SONNET_2_0',\n CLAUDE_3_7_SONNET_1_0 = 'CLAUDE_3_7_SONNET_1_0',\n CLAUDE_4_OPUS_1_0 = 'CLAUDE_4_OPUS_1_0',\n CLAUDE_4_SONNET_1_0 = 'CLAUDE_4_SONNET_1_0',\n CLAUDE_4_5_HAIKU_1_0 = 'CLAUDE_4_5_HAIKU_1_0'\n}\n\nexport const ModelIdsSchema = z.enum(ModelIds);\n\n/**\n * Model configuration schema for specifying model parameters.\n */\nconst nullToUndefined = (val: unknown) => (val === null ? undefined : val);\n\nexport const ModelConfigSchema = z.object({\n model: ModelIdsSchema,\n temperature: z.preprocess(\n nullToUndefined,\n z.number().min(0).max(1).optional()\n ),\n maxTokens: z.preprocess(nullToUndefined, z.number().min(1).optional())\n});\n\nexport type ModelConfig = z.infer<typeof ModelConfigSchema>;\n\n/**\n * Model pricing schema (cost per 1M tokens).\n */\nexport const ModelPricingSchema = z.object({\n inputPer1M: z.number(),\n outputPer1M: z.number()\n});\n\nexport type ModelPricing = z.infer<typeof ModelPricingSchema>;\n\n/**\n * Model schema - complete model definition with metadata and pricing.\n */\nexport const ModelSchema = z.object({\n /** AI Gateway model ID */\n id: ModelIdsSchema,\n /** Display name */\n name: z.string(),\n /** Provider (always 'anthropic') */\n provider: z.literal('anthropic'),\n /** Provider's model identifier (e.g., \"claude-3-5-sonnet-20241022\") */\n providerModelId: z.string(),\n /** Pricing per 1M tokens */\n pricing: ModelPricingSchema\n});\n\nexport type Model = z.infer<typeof ModelSchema>;\n\n/**\n * Available models with full metadata including pricing.\n */\nexport const AVAILABLE_MODELS: Model[] = [\n {\n id: ModelIds.CLAUDE_4_5_HAIKU_1_0,\n name: 'Claude 4.5 Haiku',\n provider: 'anthropic',\n providerModelId: 'claude-haiku-4-5-20251001',\n pricing: { inputPer1M: 0.8, outputPer1M: 4 }\n },\n {\n id: ModelIds.CLAUDE_4_SONNET_1_0,\n name: 'Claude 4 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-sonnet-4-20250514',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_4_OPUS_1_0,\n name: 'Claude 4 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-opus-4-20250514',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_7_SONNET_1_0,\n name: 'Claude 3.7 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-7-sonnet-20250219',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_2_0,\n name: 'Claude 3.5 Sonnet v2',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20241022',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_5_SONNET_1_0,\n name: 'Claude 3.5 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-5-sonnet-20240620',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_OPUS_1_0,\n name: 'Claude 3 Opus',\n provider: 'anthropic',\n providerModelId: 'claude-3-opus-20240229',\n pricing: { inputPer1M: 15, outputPer1M: 75 }\n },\n {\n id: ModelIds.CLAUDE_3_SONNET_1_0,\n name: 'Claude 3 Sonnet',\n provider: 'anthropic',\n providerModelId: 'claude-3-sonnet-20240229',\n pricing: { inputPer1M: 3, outputPer1M: 15 }\n },\n {\n id: ModelIds.CLAUDE_3_HAIKU_1_0,\n name: 'Claude 3 Haiku',\n provider: 'anthropic',\n providerModelId: 'claude-3-haiku-20240307',\n pricing: { inputPer1M: 0.25, outputPer1M: 1.25 }\n }\n];\n\n/**\n * Available models as a map keyed by model ID.\n */\nexport const AVAILABLE_MODELS_MAP: Record<ModelIds, Model> = Object.fromEntries(\n AVAILABLE_MODELS.map((model) => [model.id, model])\n) as Record<ModelIds, Model>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Target schema - base for all testable entities.\n *\n * All testable entities (Agent, Skill) extend this schema.\n * This creates a unified type hierarchy for what can be evaluated.\n */\nexport const TargetSchema = TenantEntitySchema.extend({\n // Base for all testable entities\n // Specific targets add their own fields\n});\n\nexport type Target = z.infer<typeof TargetSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { ModelConfigSchema } from '../common/models.js';\n\n/**\n * Agent schema - a CLI-based coding agent.\n *\n * Agents are external CLI tools that can execute coding tasks.\n * Examples: Claude Code CLI, Codex CLI, Cursor CLI.\n */\nexport const AgentSchema = TargetSchema.extend({\n /** Command to run the agent */\n runCommand: z.string(),\n /** Optional model configuration override */\n modelConfig: ModelConfigSchema.optional()\n});\n\nexport type Agent = z.infer<typeof AgentSchema>;\n\n/**\n * Input schema for creating a new Agent.\n */\nexport const CreateAgentInputSchema = AgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateAgentInput = z.infer<typeof CreateAgentInputSchema>;\n\n/**\n * Input schema for updating an Agent.\n * modelConfig can be null to explicitly clear it (vs undefined = keep existing).\n */\nexport const UpdateAgentInputSchema = CreateAgentInputSchema.partial().extend({\n modelConfig: ModelConfigSchema.optional().nullable()\n});\n\nexport type UpdateAgentInput = z.infer<typeof UpdateAgentInputSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\nexport { GitHubSourceSchema };\nexport type { GitHubSource } from '../common/github-source.js';\n\n/**\n * Regex for valid skill folder names (kebab-case).\n * Allows: lowercase letters, numbers, hyphens. Words separated by single hyphens.\n * Examples: my-skill, code-review, skill1\n */\nexport const SKILL_FOLDER_NAME_REGEX = /^[a-z0-9]+(-[a-z0-9]+)*$/;\n\n/**\n * Regex for valid semver strings (major.minor.patch).\n * Examples: 1.0.0, 2.3.1, 10.20.30\n */\nexport const SEMVER_REGEX = /^\\d+\\.\\d+\\.\\d+$/;\n\n/**\n * Origin of a skill version - how the version was created.\n * - manual: Created through the UI\n * - pr: Created from a pull request (via CI/CD API)\n * - master: Synced from the main branch (via CI/CD API)\n */\nexport const SkillVersionOriginSchema = z.enum(['manual', 'pr', 'master']);\nexport type SkillVersionOrigin = z.infer<typeof SkillVersionOriginSchema>;\n\n/**\n * Check if a string is a valid skill folder name (kebab-case).\n * Used for validation when creating skills and when writing skills to filesystem.\n */\nexport function isValidSkillFolderName(name: string): boolean {\n return (\n typeof name === 'string' &&\n name.length > 0 &&\n SKILL_FOLDER_NAME_REGEX.test(name.trim())\n );\n}\n\n/**\n * Skill metadata parsed from SKILL.md frontmatter.\n *\n * Following the agentskills.io specification:\n * - name: Skill identifier (max 64 chars, lowercase + hyphens)\n * - description: What the skill does and when to use it\n * - allowedTools: Pre-approved tools the skill may use\n * - skills: Sub-skills for composite agents\n */\nexport const SkillMetadataSchema = z.object({\n name: z.string(),\n description: z.string(),\n allowedTools: z.array(z.string()).optional(),\n skills: z.array(z.string()).optional()\n});\n\nexport type SkillMetadata = z.infer<typeof SkillMetadataSchema>;\n\n/**\n * A single file within a skill directory snapshot.\n */\nexport const SkillFileSchema = z.object({\n /** Relative path within the skill directory, e.g. \"SKILL.md\" or \"references/API_SPEC.md\" */\n path: z.string().min(1),\n /** File content (UTF-8 text) */\n content: z.string()\n});\n\nexport type SkillFile = z.infer<typeof SkillFileSchema>;\n\n/**\n * Skill version - immutable snapshot of a Skill's content.\n *\n * New versions store a `files` array (snapshot of the skill directory from GitHub)\n * and a `source` reference (where the snapshot came from).\n *\n * Versions are immutable - editing creates a new version.\n */\nexport const SkillVersionSchema = z.object({\n id: z.string(),\n projectId: z.string(),\n skillId: z.string(),\n /** Semver string (e.g. \"1.2.0\") or Falcon fingerprint */\n version: z.string(),\n /** How this version was created */\n origin: SkillVersionOriginSchema,\n /** Where this snapshot was taken from */\n source: GitHubSourceSchema.optional(),\n /** Frozen snapshot of all files in the skill directory */\n files: z.array(SkillFileSchema).optional(),\n /** Optional notes about this version (changelog, reason for change) */\n notes: z.string().optional(),\n createdAt: z.string()\n});\n\nexport type SkillVersion = z.infer<typeof SkillVersionSchema>;\n\n/**\n * Input schema for creating a new SkillVersion.\n *\n * For source-based creation: provide `source` (or omit to use the Skill's source).\n * The backend fetches the folder and stores the snapshot as `files`.\n * For inline creation: provide `files` with the SKILL.md content.\n *\n * `version` is required -- the caller must always provide an explicit version string.\n */\nexport const CreateSkillVersionInputSchema = z.object({\n /** GitHub source to snapshot from. If not provided, uses the Skill's source. */\n source: GitHubSourceSchema.optional(),\n /** Version string for this snapshot (e.g. \"1.0.0\", \"1.0.3\"). */\n version: z.string().min(1),\n notes: z.string().optional(),\n /** Origin of this version. Defaults to 'manual' in backend. */\n origin: SkillVersionOriginSchema.optional(),\n /** Pre-edited files to store directly (bypasses GitHub fetch when provided) */\n files: z.array(SkillFileSchema).optional()\n});\n\nexport type CreateSkillVersionInput = z.infer<\n typeof CreateSkillVersionInputSchema\n>;\n\n/**\n * Skill schema - a lightweight container for a coding capability.\n *\n * Skills are containers identified by a kebab-case name.\n * All content (files, notes, etc.) lives in SkillVersion.\n * The `source` field points to the GitHub directory for live fetching.\n * Persisted shape: id, projectId, name, source, createdAt, updatedAt, deleted.\n *\n * Note: `description` is inherited from BaseEntity. It's not stored in the DB\n * for skills (content lives in SkillVersion), but is kept on the type to\n * satisfy the TenantEntity constraint. The repository always returns \"\".\n */\nexport const SkillSchema = TargetSchema.extend({\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Skill = z.infer<typeof SkillSchema>;\n\nconst KEBAB_CASE_MESSAGE =\n 'Name must be in kebab-case (lowercase letters, numbers, hyphens only, e.g. my-skill)';\n\nconst SkillInputBaseSchema = SkillSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true,\n description: true,\n source: true\n}).extend({\n /** Optional - not stored on Skill; content description lives in SkillVersion */\n description: z.string().optional(),\n /** GitHub source reference for live content fetching */\n source: GitHubSourceSchema.optional()\n});\n\n/**\n * Inline initial version data provided when creating a skill atomically.\n * When present on a POST /skills request, the backend creates the skill\n * and its first version in a single request with rollback on failure.\n */\nexport const InitialVersionInputSchema = z.object({\n files: z.array(SkillFileSchema).optional(),\n notes: z.string().optional(),\n source: GitHubSourceSchema.optional(),\n version: z.string().optional(),\n origin: SkillVersionOriginSchema.optional()\n});\n\nexport type InitialVersionInput = z.infer<typeof InitialVersionInputSchema>;\n\n/**\n * Input schema for creating a new Skill.\n * Only `name` and `projectId` are required. `description` is ignored (lives in SkillVersion).\n * Pass `initialVersion` to atomically create the skill and its first version.\n */\nexport const CreateSkillInputSchema = SkillInputBaseSchema.extend({\n initialVersion: InitialVersionInputSchema.optional()\n}).refine((data) => isValidSkillFolderName(data.name), {\n message: KEBAB_CASE_MESSAGE,\n path: ['name']\n});\n\nexport type CreateSkillInput = z.infer<typeof CreateSkillInputSchema>;\n\n/**\n * Input schema for updating a Skill.\n */\nexport const UpdateSkillInputSchema = SkillInputBaseSchema.partial().refine(\n (data) => data.name === undefined || isValidSkillFolderName(data.name),\n { message: KEBAB_CASE_MESSAGE, path: ['name'] }\n);\n\nexport type UpdateSkillInput = z.infer<typeof UpdateSkillInputSchema>;\n\n/**\n * Skill with its latest version - used when displaying skills in the UI\n * and in the evaluator to access skill content.\n */\nexport const SkillWithLatestVersionSchema = SkillSchema.extend({\n latestVersion: SkillVersionSchema.optional()\n});\n\nexport type SkillWithLatestVersion = z.infer<\n typeof SkillWithLatestVersionSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * SkillsGroup schema - a collection of skills (replaces TargetGroup for the new model).\n *\n * Eval runs can be scoped to a skills group to run against all skills in the group.\n */\nexport const SkillsGroupSchema = TenantEntitySchema.extend({\n /** IDs of skills in this group */\n skillIds: z.array(z.string())\n});\n\nexport type SkillsGroup = z.infer<typeof SkillsGroupSchema>;\n\n/**\n * Input schema for creating a new SkillsGroup.\n */\nexport const CreateSkillsGroupInputSchema = SkillsGroupSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateSkillsGroupInput = z.infer<\n typeof CreateSkillsGroupInputSchema\n>;\n\n/**\n * Input schema for updating a SkillsGroup.\n */\nexport const UpdateSkillsGroupInputSchema =\n CreateSkillsGroupInputSchema.partial();\n\nexport type UpdateSkillsGroupInput = z.infer<\n typeof UpdateSkillsGroupInputSchema\n>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\n\n/**\n * Sub-agent schema \u2013 a Markdown file with YAML frontmatter.\n *\n * Sub-agents are specialized AI assistants (per Claude Code docs)\n * defined in Markdown with frontmatter (name, description, tools, model, etc.).\n * The body is the system prompt.\n *\n */\nexport const SubAgentSchema = TargetSchema.extend({\n /** The full sub-agent markdown content (YAML frontmatter + body) */\n subAgentMd: z.string()\n});\n\nexport type SubAgent = z.infer<typeof SubAgentSchema>;\n\nconst SubAgentInputBaseSchema = SubAgentSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport const CreateSubAgentInputSchema = SubAgentInputBaseSchema;\n\nexport type CreateSubAgentInput = z.infer<typeof CreateSubAgentInputSchema>;\n\nexport const UpdateSubAgentInputSchema = SubAgentInputBaseSchema.partial();\n\nexport type UpdateSubAgentInput = z.infer<typeof UpdateSubAgentInputSchema>;\n", "import { z } from 'zod';\n\n// Base exports\nexport * from './base.js';\n\n// Individual test types\nexport * from './llm.js';\nexport * from './tool.js';\nexport * from './site-config.js';\nexport * from './command-execution.js';\nexport * from './file-presence.js';\nexport * from './file-content.js';\nexport * from './build-check.js';\nexport * from './vitest.js';\nexport * from './playwright-nl.js';\n\n// Import schemas for union\nimport { LLMTestSchema, LLMTestResult } from './llm.js';\nimport { ToolTestSchema, ToolTestResult } from './tool.js';\nimport { SiteConfigTestSchema, SiteConfigTestResult } from './site-config.js';\nimport {\n CommandExecutionTestSchema,\n CommandExecutionTestResult\n} from './command-execution.js';\nimport {\n FilePresenceTestSchema,\n FilePresenceTestResult\n} from './file-presence.js';\nimport {\n FileContentTestSchema,\n FileContentTestResult\n} from './file-content.js';\nimport { BuildCheckTestSchema, BuildCheckTestResult } from './build-check.js';\nimport { VitestTestSchema, VitestTestResult } from './vitest.js';\nimport {\n PlaywrightNLTestSchema,\n PlaywrightNLTestResult\n} from './playwright-nl.js';\n\n/**\n * Unified Test schema - discriminated union of all 9 test types.\n */\nexport const TestSchema = z.discriminatedUnion('type', [\n LLMTestSchema,\n ToolTestSchema,\n SiteConfigTestSchema,\n CommandExecutionTestSchema,\n FilePresenceTestSchema,\n FileContentTestSchema,\n BuildCheckTestSchema,\n VitestTestSchema,\n PlaywrightNLTestSchema\n]);\n\nexport type Test = z.infer<typeof TestSchema>;\n\n/**\n * Union of all test result types.\n */\nexport type TestResult =\n | LLMTestResult\n | ToolTestResult\n | SiteConfigTestResult\n | CommandExecutionTestResult\n | FilePresenceTestResult\n | FileContentTestResult\n | BuildCheckTestResult\n | VitestTestResult\n | PlaywrightNLTestResult;\n", "import { z } from 'zod';\n\n/**\n * Test types - unified from old and new systems.\n */\nexport enum TestType {\n // From old system\n LLM = 'LLM',\n TOOL = 'TOOL',\n SITE_CONFIG = 'SITE_CONFIG',\n COMMAND_EXECUTION = 'COMMAND_EXECUTION',\n // From new system\n FILE_PRESENCE = 'FILE_PRESENCE',\n FILE_CONTENT = 'FILE_CONTENT',\n BUILD_CHECK = 'BUILD_CHECK',\n VITEST = 'VITEST',\n PLAYWRIGHT_NL = 'PLAYWRIGHT_NL'\n}\n\nexport const TestTypeSchema = z.enum(TestType);\n\n/**\n * Test importance levels.\n */\nexport enum TestImportance {\n LOW = 'low',\n MEDIUM = 'medium',\n HIGH = 'high',\n CRITICAL = 'critical'\n}\n\nexport const TestImportanceSchema = z.enum(TestImportance);\n\n/**\n * Base test schema - common fields for all test types.\n */\nexport const BaseTestSchema = z.object({\n id: z.string(),\n type: TestTypeSchema,\n name: z.string().min(3),\n description: z.string().optional(),\n importance: TestImportanceSchema.optional()\n});\n\nexport type BaseTest = z.infer<typeof BaseTestSchema>;\n\n/**\n * Base test result interface.\n */\nexport interface BaseTestResult {\n type: TestType;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * LLM Test schema - tests that use an LLM evaluator.\n */\nexport const LLMTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.LLM),\n /** Maximum steps for the LLM to take */\n maxSteps: z.number().min(1).max(100),\n /** Prompt to send to the evaluator */\n prompt: z.string().min(1),\n /** ID of the evaluator agent to use */\n evaluatorId: z.string()\n});\n\nexport type LLMTest = z.infer<typeof LLMTestSchema>;\n\n/**\n * LLM Test result.\n */\nexport interface LLMTestResult extends BaseTestResult {\n type: TestType.LLM;\n testPrompt: string;\n testSystemPrompt?: string;\n text: string;\n scoreReasoning: string;\n score: number;\n totalMicrocentsSpent?: number;\n usage?: {\n promptTokens?: number;\n completionTokens?: number;\n totalTokens?: number;\n };\n reasoning?: string;\n reasoningDetails?: unknown;\n finishReason?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Tool Test schema - tests that verify tool usage.\n */\nexport const ToolTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.TOOL),\n /** Name of the tool that should be called */\n toolName: z.string().min(3),\n /** Expected arguments for the tool call */\n args: z.record(z.string(), z.any()),\n /** Expected content in the tool results */\n resultsContent: z.string()\n});\n\nexport type ToolTest = z.infer<typeof ToolTestSchema>;\n\n/**\n * Tool Test result.\n */\nexport interface ToolTestResult extends BaseTestResult {\n type: TestType.TOOL;\n result: boolean;\n toolUsed: boolean;\n actualArgs: Record<string, any>;\n isResultsValid: boolean;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Site Config Test schema - tests that verify site configuration via API.\n */\nexport const SiteConfigTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.SITE_CONFIG),\n /** URL to call */\n url: z.string().url(),\n /** HTTP method */\n method: z.enum(['GET', 'POST']),\n /** Request body (for POST) */\n body: z.string().optional(),\n /** Expected HTTP status code */\n expectedStatusCode: z.number().int().min(100).max(599),\n /** Expected response content */\n expectedResponse: z.string().optional(),\n /** JMESPath expression to extract from response */\n expectedResponseJMESPath: z.string().optional()\n});\n\nexport type SiteConfigTest = z.infer<typeof SiteConfigTestSchema>;\n\n/**\n * Site Config Test result.\n */\nexport interface SiteConfigTestResult extends BaseTestResult {\n type: TestType.SITE_CONFIG;\n result: boolean;\n actualStatusCode: number;\n actualResponse: unknown;\n allActualResponse: unknown;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Allowed commands for command execution tests.\n */\nexport const AllowedCommands = [\n 'yarn install --no-immutable && yarn build',\n 'npm run build',\n 'yarn typecheck'\n] as const;\n\n/**\n * Command Execution Test schema - tests that verify command execution.\n */\nexport const CommandExecutionTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.COMMAND_EXECUTION),\n /** Command to execute (must be in AllowedCommands) */\n command: z\n .string()\n .refine((value) => (AllowedCommands as readonly string[]).includes(value), {\n message: `Command must be one of: ${AllowedCommands.join(', ')}`\n }),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().default(0).optional()\n});\n\nexport type CommandExecutionTest = z.infer<typeof CommandExecutionTestSchema>;\n\n/**\n * Command Execution Test result.\n */\nexport interface CommandExecutionTestResult extends BaseTestResult {\n type: TestType.COMMAND_EXECUTION;\n stdout: string;\n stderr: string;\n exitCode: number | null;\n expectedExitCode: number;\n result: boolean;\n error?: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File Presence Test schema - tests that verify file existence.\n */\nexport const FilePresenceTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_PRESENCE),\n /** Paths to check */\n paths: z.array(z.string()),\n /** Whether files should exist (true) or not exist (false) */\n shouldExist: z.boolean()\n});\n\nexport type FilePresenceTest = z.infer<typeof FilePresenceTestSchema>;\n\n/**\n * File Presence Test result.\n */\nexport interface FilePresenceTestResult extends BaseTestResult {\n type: TestType.FILE_PRESENCE;\n result: boolean;\n existingPaths: string[];\n missingPaths: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * File content checks schema.\n */\nexport const FileContentCheckSchema = z.object({\n /** Strings that must be present in the file */\n contains: z.array(z.string()).optional(),\n /** Strings that must NOT be present in the file */\n notContains: z.array(z.string()).optional(),\n /** Regex pattern the content must match */\n matches: z.string().optional(),\n /** JSON path checks for structured content */\n jsonPath: z\n .array(\n z.object({\n path: z.string(),\n value: z.unknown()\n })\n )\n .optional(),\n /** Lines that should be added (for diff checking) */\n added: z.array(z.string()).optional(),\n /** Lines that should be removed (for diff checking) */\n removed: z.array(z.string()).optional()\n});\n\nexport type FileContentCheck = z.infer<typeof FileContentCheckSchema>;\n\n/**\n * File Content Test schema - tests that verify file content.\n *\n * This also covers the FILE_MODIFICATION use case from the old system\n * by supporting added/removed line checks.\n */\nexport const FileContentTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.FILE_CONTENT),\n /** Path to the file to check */\n path: z.string(),\n /** Content checks to perform */\n checks: FileContentCheckSchema\n});\n\nexport type FileContentTest = z.infer<typeof FileContentTestSchema>;\n\n/**\n * File Content Test result.\n */\nexport interface FileContentTestResult extends BaseTestResult {\n type: TestType.FILE_CONTENT;\n result: boolean;\n diff?: string;\n failedChecks?: string[];\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Build Check Test schema - tests that verify build success.\n */\nexport const BuildCheckTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.BUILD_CHECK),\n /** Build command to execute */\n command: z.string(),\n /** Whether the build should succeed */\n expectSuccess: z.boolean(),\n /** Maximum allowed warnings (optional) */\n allowedWarnings: z.number().optional(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type BuildCheckTest = z.infer<typeof BuildCheckTestSchema>;\n\n/**\n * Build Check Test result.\n */\nexport interface BuildCheckTestResult extends BaseTestResult {\n type: TestType.BUILD_CHECK;\n result: boolean;\n exitCode: number;\n stdout: string;\n stderr: string;\n warningCount: number;\n duration: number;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Vitest Test schema - tests that run Vitest test files.\n */\nexport const VitestTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.VITEST),\n /** Test file content */\n testFile: z.string(),\n /** Name of the test file */\n testFileName: z.string(),\n /** Minimum pass rate required (0-100) */\n minPassRate: z.number().min(0).max(100)\n});\n\nexport type VitestTest = z.infer<typeof VitestTestSchema>;\n\n/**\n * Vitest Test result.\n */\nexport interface VitestTestResult extends BaseTestResult {\n type: TestType.VITEST;\n result: boolean;\n passRate: number;\n passed: number;\n failed: number;\n skipped: number;\n total: number;\n duration: number;\n output: string;\n}\n", "import { z } from 'zod';\nimport { BaseTestSchema, BaseTestResult, TestType } from './base.js';\n\n/**\n * Playwright Natural Language Test schema - tests using natural language descriptions.\n */\nexport const PlaywrightNLTestSchema = BaseTestSchema.extend({\n type: z.literal(TestType.PLAYWRIGHT_NL),\n /** Natural language steps to execute */\n steps: z.array(z.string()),\n /** Expected outcome description */\n expectedOutcome: z.string(),\n /** Timeout in milliseconds */\n timeout: z.number().optional()\n});\n\nexport type PlaywrightNLTest = z.infer<typeof PlaywrightNLTestSchema>;\n\n/**\n * Playwright NL Test result.\n */\nexport interface PlaywrightNLTestResult extends BaseTestResult {\n type: TestType.PLAYWRIGHT_NL;\n result: boolean;\n stepsExecuted: number;\n totalSteps: number;\n failedStep?: string;\n screenshot?: string;\n duration: number;\n}\n", "import { z } from 'zod';\n\n/**\n * Assertion: the agent must have invoked one or more skills during the run.\n * Checked by inspecting the LLM trace for \"Skill\" tool uses with the given skills.\n * When multiple skills are in one assertion, they are treated as a group (1 assertion).\n * Each skill in the group must have been called for the assertion to pass.\n * To check skills independently, add them as separate assertions.\n */\nexport const SkillWasCalledAssertionSchema = z.object({\n type: z.literal('skill_was_called'),\n /** Names of the skills that must have been called (matched against trace Skill tool args) */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledAssertion = z.infer<\n typeof SkillWasCalledAssertionSchema\n>;\n\n/**\n * Assertion: a build command must exit with the expected code (default 0).\n * Runs the command in the scenario working directory.\n */\nexport const BuildPassedAssertionSchema = z.object({\n type: z.literal('build_passed'),\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedAssertion = z.infer<typeof BuildPassedAssertionSchema>;\n\n/**\n * Assertion: an LLM judges the scenario output (score 0-100).\n * Prompt can use {{output}}, {{cwd}}, {{changedFiles}}, {{trace}}.\n * Passes if judge score >= minScore.\n */\nexport const LlmJudgeAssertionSchema = z.object({\n type: z.literal('llm_judge'),\n /** Prompt template; placeholders: {{output}}, {{cwd}}, {{changedFiles}}, {{trace}} */\n prompt: z.string(),\n /** Optional system prompt for the judge (default asks for JSON with score) */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku) */\n model: z.string().optional(),\n maxTokens: z.number().int().optional(),\n temperature: z.number().min(0).max(1).optional()\n});\n\nexport type LlmJudgeAssertion = z.infer<typeof LlmJudgeAssertionSchema>;\n\n/**\n * Union of all assertion types (per scenario).\n * Each assertion has a type and type-specific data.\n * Uses z.union (not z.discriminatedUnion) for Zod v4 compatibility when used as array element.\n */\nexport const AssertionSchema = z.union([\n SkillWasCalledAssertionSchema,\n BuildPassedAssertionSchema,\n LlmJudgeAssertionSchema\n]);\n\nexport type Assertion = z.infer<typeof AssertionSchema>;\n", "import { z } from 'zod';\n\n/**\n * Local project configuration schema.\n */\nexport const LocalProjectConfigSchema = z.object({\n /** Template ID to use for the local project */\n templateId: z.string().optional(),\n /** Files to create in the project */\n files: z\n .array(\n z.object({\n path: z.string().min(1),\n content: z.string().min(1)\n })\n )\n .optional()\n});\n\nexport type LocalProjectConfig = z.infer<typeof LocalProjectConfigSchema>;\n\n/**\n * Meta site configuration schema for API-based setup.\n */\nexport const MetaSiteConfigSchema = z.object({\n configurations: z\n .array(\n z.object({\n name: z.string().min(1),\n apiCalls: z.array(\n z.object({\n url: z.string().url(),\n method: z.enum(['POST', 'PUT']),\n body: z.string()\n })\n )\n })\n )\n .optional()\n});\n\nexport type MetaSiteConfig = z.infer<typeof MetaSiteConfigSchema>;\n\n/**\n * Environment configuration schema.\n *\n * Defines the environment setup required for running a test scenario.\n * Migrated from the old Prompt schema.\n */\nexport const EnvironmentSchema = z.object({\n /** Local project configuration */\n localProject: LocalProjectConfigSchema.optional(),\n /** Meta site configuration */\n metaSite: MetaSiteConfigSchema.optional()\n});\n\nexport type Environment = z.infer<typeof EnvironmentSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { AssertionSchema } from './assertions.js';\nimport { ScenarioAssertionLinkSchema } from '../assertion/assertion.js';\n\n/**\n * Expected file schema - a file the agent is expected to create or modify.\n * Used by eval results; not persisted on test_scenarios table.\n */\nexport const ExpectedFileSchema = z.object({\n /** Relative path where the file should be created */\n path: z.string(),\n /** Optional expected content */\n content: z.string().optional()\n});\n\nexport type ExpectedFile = z.infer<typeof ExpectedFileSchema>;\n\n/**\n * TestScenario schema - defines a single test scenario.\n *\n * Persisted shape matches test_scenarios table:\n * id, project_id, name, description, trigger_prompt, template_id, created_at, updated_at, deleted.\n * Linked assertions stored in scenario_assertions junction table.\n */\nexport const TestScenarioSchema = TenantEntitySchema.extend({\n /** The prompt sent to the agent to trigger the task */\n triggerPrompt: z.string().min(10),\n /** ID of the template to use for this scenario (null = no template) */\n templateId: z.string().nullish(),\n /** Inline assertions to evaluate for this scenario (legacy) */\n assertions: z.array(AssertionSchema).optional(),\n /** IDs of saved assertions to evaluate (from assertions table) - legacy, use assertionLinks */\n assertionIds: z.array(z.string()).optional(),\n /** Linked assertions with per-scenario parameter values */\n assertionLinks: z.array(ScenarioAssertionLinkSchema).optional()\n});\n\nexport type TestScenario = z.infer<typeof TestScenarioSchema>;\n\n/**\n * Input schema for creating a new TestScenario.\n */\nexport const CreateTestScenarioInputSchema = TestScenarioSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestScenarioInput = z.infer<\n typeof CreateTestScenarioInputSchema\n>;\n\n/**\n * Input schema for updating a TestScenario.\n */\nexport const UpdateTestScenarioInputSchema =\n CreateTestScenarioInputSchema.partial();\n\nexport type UpdateTestScenarioInput = z.infer<\n typeof UpdateTestScenarioInputSchema\n>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * Assertion types:\n * - skill_was_called: Checks if a specific skill was invoked (deterministic, system-level)\n * - build_passed: Runs a command and checks exit code (deterministic, system-level)\n * - llm_judge: LLM evaluates output with a prompt (LLM-based, user-created)\n */\nexport const AssertionTypeSchema = z.enum([\n 'skill_was_called',\n 'build_passed',\n 'llm_judge'\n]);\n\n/**\n * Parameter types supported in assertion parameters.\n */\nexport const AssertionParameterTypeSchema = z.enum([\n 'string',\n 'number',\n 'boolean'\n]);\n\nexport type AssertionParameterType = z.infer<\n typeof AssertionParameterTypeSchema\n>;\n\n/**\n * Schema for defining assertion parameters.\n * Parameters can be required or optional, with optional default values.\n */\nexport const AssertionParameterSchema = z.object({\n /** Parameter name (used as key in params object) */\n name: z.string().min(1),\n /** Display label for the parameter */\n label: z.string().min(1),\n /** Parameter type */\n type: AssertionParameterTypeSchema,\n /** Whether this parameter is required */\n required: z.boolean(),\n /** Default value (optional, used when not provided) */\n defaultValue: z.union([z.string(), z.number(), z.boolean()]).optional(),\n /** If true, parameter is hidden by default behind \"Show advanced options\" */\n advanced: z.boolean().optional()\n});\n\nexport type AssertionParameter = z.infer<typeof AssertionParameterSchema>;\n\n/**\n * Schema for scenario-assertion link with parameter values.\n * Used when linking assertions to scenarios with specific parameter values.\n */\nexport const ScenarioAssertionLinkSchema = z.object({\n /** ID of the assertion (can be system assertion like 'system:skill_was_called' or custom assertion UUID) */\n assertionId: z.string(),\n /** Parameter values for this assertion in this scenario */\n params: z\n .record(\n z.string(),\n z.union([z.string(), z.number(), z.boolean(), z.null()])\n )\n .optional()\n});\n\nexport type ScenarioAssertionLink = z.infer<typeof ScenarioAssertionLinkSchema>;\n\nexport type AssertionType = z.infer<typeof AssertionTypeSchema>;\n\n/**\n * Configuration for skill_was_called assertion type.\n * Multiple skills in one assertion are treated as a group (1 assertion).\n * All skills in the group must have been called for the assertion to pass.\n */\nexport const SkillWasCalledConfigSchema = z.object({\n /** Names of the skills that must have been called */\n skillNames: z.array(z.string().min(1)).min(1)\n});\n\nexport type SkillWasCalledConfig = z.infer<typeof SkillWasCalledConfigSchema>;\n\n/**\n * Configuration for build_passed assertion type.\n * Uses strictObject to reject objects with unknown keys (prevents matching LlmJudge configs).\n */\nexport const BuildPassedConfigSchema = z.strictObject({\n /** Command to run (default: \"yarn build\") */\n command: z.string().optional(),\n /** Expected exit code (default: 0) */\n expectedExitCode: z.number().int().optional()\n});\n\nexport type BuildPassedConfig = z.infer<typeof BuildPassedConfigSchema>;\n\n/**\n * Configuration for llm_judge assertion type.\n * User-created assertions with customizable parameters.\n */\nexport const LlmJudgeConfigSchema = z.object({\n /**\n * Prompt template with placeholders:\n * - {{output}}: agent's final output\n * - {{cwd}}: working directory\n * - {{changedFiles}}: all files changed (new, modified)\n * - {{modifiedFiles}}: only existing files that were modified\n * - {{newFiles}}: only new files that were created\n * - {{trace}}: step-by-step trace of tool calls\n * - Custom parameters defined in the parameters array\n */\n prompt: z.string().min(1),\n /** Optional system prompt for the judge */\n systemPrompt: z.string().optional(),\n /** Minimum score to pass (0-100, default 70) */\n minScore: z.number().int().min(0).max(100).optional(),\n /** Model for the judge (e.g. claude-3-5-haiku-20241022) */\n model: z.string().optional(),\n /** Max output tokens */\n maxTokens: z.number().int().optional(),\n /** Temperature (0-1) */\n temperature: z.number().min(0).max(1).optional(),\n /** User-defined parameters for this assertion */\n parameters: z.array(AssertionParameterSchema).optional()\n});\n\nexport type LlmJudgeConfig = z.infer<typeof LlmJudgeConfigSchema>;\n\n/**\n * Union of all assertion config types.\n * Order matters: schemas with required fields first, then optional-only schemas.\n * This ensures LlmJudge (requires prompt) and SkillWasCalled (requires skillNames)\n * are matched before BuildPassed (all optional) or empty object.\n */\nexport const AssertionConfigSchema = z.union([\n LlmJudgeConfigSchema, // requires prompt - check first\n SkillWasCalledConfigSchema, // requires skillName\n BuildPassedConfigSchema, // all optional, uses strictObject to reject unknown keys\n z.object({}) // fallback empty config\n]);\n\nexport type AssertionConfig = z.infer<typeof AssertionConfigSchema>;\n\n/**\n * Custom Assertion entity - stored in the database.\n * Replaces inline assertions in test scenarios.\n */\nexport const CustomAssertionSchema = TenantEntitySchema.extend({\n /** The assertion type */\n type: AssertionTypeSchema,\n /** Type-specific configuration */\n config: AssertionConfigSchema\n});\n\nexport type CustomAssertion = z.infer<typeof CustomAssertionSchema>;\n\n/**\n * Input schema for creating a new CustomAssertion.\n */\nexport const CreateCustomAssertionInputSchema = CustomAssertionSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateCustomAssertionInput = z.infer<\n typeof CreateCustomAssertionInputSchema\n>;\n\n/**\n * Input schema for updating a CustomAssertion.\n */\nexport const UpdateCustomAssertionInputSchema =\n CreateCustomAssertionInputSchema.partial();\n\nexport type UpdateCustomAssertionInput = z.infer<\n typeof UpdateCustomAssertionInputSchema\n>;\n\n/**\n * Helper function to validate config based on assertion type.\n * Returns true if config is valid for the given type.\n */\nexport function validateAssertionConfig(\n type: AssertionType,\n config: unknown\n): boolean {\n switch (type) {\n case 'skill_was_called':\n return SkillWasCalledConfigSchema.safeParse(config).success;\n case 'build_passed':\n return BuildPassedConfigSchema.safeParse(config).success;\n case 'llm_judge':\n return LlmJudgeConfigSchema.safeParse(config).success;\n default:\n return false;\n }\n}\n\n/**\n * Get typed config for skill_was_called assertion.\n */\nexport function getSkillWasCalledConfig(\n assertion: CustomAssertion\n): SkillWasCalledConfig | null {\n if (assertion.type !== 'skill_was_called') return null;\n const result = SkillWasCalledConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for build_passed assertion.\n */\nexport function getBuildPassedConfig(\n assertion: CustomAssertion\n): BuildPassedConfig | null {\n if (assertion.type !== 'build_passed') return null;\n const result = BuildPassedConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n\n/**\n * Get typed config for llm_judge assertion.\n */\nexport function getLlmJudgeConfig(\n assertion: CustomAssertion\n): LlmJudgeConfig | null {\n if (assertion.type !== 'llm_judge') return null;\n const result = LlmJudgeConfigSchema.safeParse(assertion.config);\n return result.success ? result.data : null;\n}\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\n\n/**\n * TestSuite schema - a collection of test scenarios.\n *\n * Suites are used to organize and group related test scenarios.\n */\nexport const TestSuiteSchema = TenantEntitySchema.extend({\n /** IDs of test scenarios in this suite */\n scenarioIds: z.array(z.string())\n});\n\nexport type TestSuite = z.infer<typeof TestSuiteSchema>;\n\n/**\n * Input schema for creating a new TestSuite.\n */\nexport const CreateTestSuiteInputSchema = TestSuiteSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTestSuiteInput = z.infer<typeof CreateTestSuiteInputSchema>;\n\n/**\n * Input schema for updating a TestSuite.\n */\nexport const UpdateTestSuiteInputSchema = CreateTestSuiteInputSchema.partial();\n\nexport type UpdateTestSuiteInput = z.infer<typeof UpdateTestSuiteInputSchema>;\n", "import { z } from 'zod';\n\n/**\n * Token usage schema.\n */\nexport const TokenUsageSchema = z.object({\n prompt: z.number(),\n completion: z.number(),\n total: z.number()\n});\n\nexport type TokenUsage = z.infer<typeof TokenUsageSchema>;\n\n/**\n * Evaluation metrics schema.\n */\nexport const EvalMetricsSchema = z.object({\n totalAssertions: z.number(),\n passed: z.number(),\n failed: z.number(),\n skipped: z.number(),\n errors: z.number(),\n passRate: z.number(),\n avgDuration: z.number(),\n totalDuration: z.number()\n});\n\nexport type EvalMetrics = z.infer<typeof EvalMetricsSchema>;\n\n/**\n * Evaluation status enum.\n */\nexport enum EvalStatus {\n PENDING = 'pending',\n RUNNING = 'running',\n COMPLETED = 'completed',\n FAILED = 'failed',\n CANCELLED = 'cancelled'\n}\n\nexport const EvalStatusSchema = z.enum(EvalStatus);\n\n/**\n * LLM step type enum.\n */\nexport enum LLMStepType {\n COMPLETION = 'completion',\n TOOL_USE = 'tool_use',\n TOOL_RESULT = 'tool_result',\n THINKING = 'thinking'\n}\n\n/**\n * LLM trace step schema.\n */\nexport const LLMTraceStepSchema = z.object({\n id: z.string(),\n stepNumber: z.number(),\n type: z.enum(LLMStepType),\n model: z.string(),\n provider: z.string(),\n startedAt: z.string(),\n durationMs: z.number(),\n tokenUsage: TokenUsageSchema,\n costUsd: z.number(),\n toolName: z.string().optional(),\n toolArguments: z.string().optional(),\n inputPreview: z.string().optional(),\n outputPreview: z.string().optional(),\n success: z.boolean(),\n error: z.string().optional()\n});\n\nexport type LLMTraceStep = z.infer<typeof LLMTraceStepSchema>;\n\n/**\n * LLM breakdown stats schema.\n */\nexport const LLMBreakdownStatsSchema = z.object({\n count: z.number(),\n durationMs: z.number(),\n tokens: z.number(),\n costUsd: z.number()\n});\n\nexport type LLMBreakdownStats = z.infer<typeof LLMBreakdownStatsSchema>;\n\n/**\n * LLM trace summary schema.\n */\nexport const LLMTraceSummarySchema = z.object({\n totalSteps: z.number(),\n totalDurationMs: z.number(),\n totalTokens: TokenUsageSchema,\n totalCostUsd: z.number(),\n stepTypeBreakdown: z.record(z.string(), LLMBreakdownStatsSchema).optional(),\n modelBreakdown: z.record(z.string(), LLMBreakdownStatsSchema),\n modelsUsed: z.array(z.string())\n});\n\nexport type LLMTraceSummary = z.infer<typeof LLMTraceSummarySchema>;\n\n/**\n * LLM trace schema.\n */\nexport const LLMTraceSchema = z.object({\n id: z.string(),\n steps: z.array(LLMTraceStepSchema),\n summary: LLMTraceSummarySchema\n});\n\nexport type LLMTrace = z.infer<typeof LLMTraceSchema>;\n", "import { z } from 'zod';\nimport { TestResult } from '../test/index.js';\nimport {\n EvalMetricsSchema,\n LLMTraceSchema,\n LLMTraceStepSchema\n} from './metrics.js';\nimport { DiffContentSchema, TemplateFileSchema } from './eval-run.js';\nimport { ModelConfigSchema } from '../common/models.js';\nimport { ExpectedFileSchema } from '../scenario/test-scenario.js';\n\n/**\n * Assertion result status enum.\n * Defined locally to avoid bundling eval-assertions Node.js code in browser.\n * This is structurally identical to the one in @wix/eval-assertions.\n */\nexport enum AssertionResultStatus {\n PASSED = 'passed',\n FAILED = 'failed',\n SKIPPED = 'skipped',\n ERROR = 'error'\n}\n\n/**\n * Assertion result schema.\n */\nexport const AssertionResultSchema = z.object({\n id: z.string(),\n assertionId: z.string(),\n assertionType: z.string(),\n assertionName: z.string(),\n status: z.enum(AssertionResultStatus),\n message: z.string().optional(),\n expected: z.string().optional(),\n actual: z.string().optional(),\n duration: z.number().optional(),\n details: z.record(z.string(), z.unknown()).optional(),\n llmTraceSteps: z.array(LLMTraceStepSchema).optional()\n});\n\nexport type AssertionResult = z.infer<typeof AssertionResultSchema>;\n\n/**\n * Evaluation run result schema - result for a single scenario/target combination.\n */\nexport const EvalRunResultSchema = z.object({\n id: z.string(),\n targetId: z.string(),\n targetName: z.string().optional(),\n /** SkillVersion ID used for this evaluation (for version tracking) */\n skillVersionId: z.string().optional(),\n /** SkillVersion semver string (e.g., \"1.0.0\", \"1.2.3\") for display */\n skillVersion: z.string().optional(),\n scenarioId: z.string(),\n scenarioName: z.string(),\n modelConfig: ModelConfigSchema.optional(),\n assertionResults: z.array(AssertionResultSchema),\n metrics: EvalMetricsSchema.optional(),\n passed: z.number(),\n failed: z.number(),\n passRate: z.number(),\n duration: z.number(),\n outputText: z.string().optional(),\n files: z.array(ExpectedFileSchema).optional(),\n fileDiffs: z.array(DiffContentSchema).optional(),\n /** Full template files after execution with status indicators */\n templateFiles: z.array(TemplateFileSchema).optional(),\n startedAt: z.string().optional(),\n completedAt: z.string().optional(),\n llmTrace: LLMTraceSchema.optional()\n});\n\nexport type EvalRunResult = z.infer<typeof EvalRunResultSchema>;\n\n/**\n * Prompt result schema - detailed result from prompt execution.\n */\nexport const PromptResultSchema = z.object({\n text: z.string(),\n files: z.array(z.unknown()).optional(),\n finishReason: z.string().optional(),\n reasoning: z.string().optional(),\n reasoningDetails: z.unknown().optional(),\n toolCalls: z.array(z.unknown()).optional(),\n toolResults: z.array(z.unknown()).optional(),\n warnings: z.array(z.unknown()).optional(),\n sources: z.array(z.unknown()).optional(),\n steps: z.array(z.unknown()),\n generationTimeMs: z.number(),\n prompt: z.string(),\n systemPrompt: z.string(),\n usage: z.object({\n totalTokens: z.number().optional(),\n totalMicrocentsSpent: z.number().optional()\n })\n});\n\nexport type PromptResult = z.infer<typeof PromptResultSchema>;\n\n/**\n * Full evaluation result schema - complete result for a single evaluation.\n */\nexport const EvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n promptResult: PromptResultSchema,\n testResults: z.array(z.unknown()) as z.ZodType<TestResult[]>,\n tags: z.array(z.string()).optional(),\n feedback: z.string().optional(),\n score: z.number(),\n suiteId: z.string().optional()\n});\n\nexport type EvaluationResult = z.infer<typeof EvaluationResultSchema>;\n\n/**\n * Lean evaluation result - summary for listing.\n */\nexport const LeanEvaluationResultSchema = z.object({\n id: z.string(),\n runId: z.string(),\n timestamp: z.number(),\n tags: z.array(z.string()).optional(),\n scenarioId: z.string(),\n scenarioVersion: z.number().optional(),\n targetId: z.string(),\n targetVersion: z.number().optional(),\n suiteId: z.string().optional(),\n score: z.number(),\n time: z.number().optional(),\n microcentsSpent: z.number().optional()\n});\n\nexport type LeanEvaluationResult = z.infer<typeof LeanEvaluationResultSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { EvalRunResultSchema } from './eval-result.js';\nimport {\n EvalMetricsSchema,\n EvalStatusSchema,\n LLMTraceSummarySchema\n} from './metrics.js';\nimport { LiveTraceEventSchema } from './live-trace.js';\n\n/**\n * Trigger types for evaluations.\n */\nexport enum TriggerType {\n RESOURCES_UPDATED = 'RESOURCES_UPDATED',\n MCP_VERSION_RELEASE = 'MCP_VERSION_RELEASE',\n MCP_PREVIEW_CREATED = 'MCP_PREVIEW_CREATED',\n MANUAL = 'MANUAL'\n}\n\n/**\n * Trigger metadata schema.\n */\nexport const TriggerMetadataSchema = z.object({\n version: z.string().optional(),\n resourceUpdated: z.array(z.string()).optional()\n});\n\nexport type TriggerMetadata = z.infer<typeof TriggerMetadataSchema>;\n\n/**\n * Trigger schema.\n */\nexport const TriggerSchema = z.object({\n id: z.string(),\n metadata: TriggerMetadataSchema.optional(),\n type: z.enum(TriggerType)\n});\n\nexport type Trigger = z.infer<typeof TriggerSchema>;\n\n/**\n * Failure category enum.\n */\nexport enum FailureCategory {\n MISSING_FILE = 'missing_file',\n WRONG_CONTENT = 'wrong_content',\n BUILD_ERROR = 'build_error',\n TEST_FAILURE = 'test_failure',\n RUNTIME_ERROR = 'runtime_error',\n PERFORMANCE = 'performance'\n}\n\n/**\n * Failure severity enum.\n */\nexport enum FailureSeverity {\n CRITICAL = 'critical',\n HIGH = 'high',\n MEDIUM = 'medium',\n LOW = 'low'\n}\n\n/**\n * Diff line type schema.\n */\nexport const DiffLineTypeSchema = z.enum(['added', 'removed', 'unchanged']);\nexport type DiffLineType = z.infer<typeof DiffLineTypeSchema>;\n\n/**\n * Diff line schema - represents a single line in a diff.\n */\nexport const DiffLineSchema = z.object({\n type: DiffLineTypeSchema,\n content: z.string(),\n lineNumber: z.number()\n});\n\nexport type DiffLine = z.infer<typeof DiffLineSchema>;\n\n/**\n * Diff content schema - represents a file diff.\n */\nexport const DiffContentSchema = z.object({\n path: z.string(),\n expected: z.string(),\n actual: z.string(),\n diffLines: z.array(DiffLineSchema),\n renamedFrom: z.string().optional()\n});\n\nexport type DiffContent = z.infer<typeof DiffContentSchema>;\n\n/**\n * Command execution schema.\n */\nexport const CommandExecutionSchema = z.object({\n command: z.string(),\n exitCode: z.number(),\n output: z.string().optional(),\n duration: z.number()\n});\n\nexport type CommandExecution = z.infer<typeof CommandExecutionSchema>;\n\n/**\n * File modification schema.\n */\nexport const FileModificationSchema = z.object({\n path: z.string(),\n action: z.enum(['created', 'modified', 'deleted'])\n});\n\nexport type FileModification = z.infer<typeof FileModificationSchema>;\n\n/**\n * Template file status enum.\n */\nexport enum TemplateFileStatus {\n NEW = 'new',\n MODIFIED = 'modified',\n UNCHANGED = 'unchanged'\n}\n\n/**\n * Template file schema - represents a file in the template with its full content.\n */\nexport const TemplateFileSchema = z.object({\n /** Relative path within the template */\n path: z.string(),\n /** Full file content after execution */\n content: z.string(),\n /** File status (new, modified, unchanged) */\n status: z.enum(['new', 'modified', 'unchanged'])\n});\n\nexport type TemplateFile = z.infer<typeof TemplateFileSchema>;\n\n/**\n * API call schema.\n */\nexport const ApiCallSchema = z.object({\n endpoint: z.string(),\n tokensUsed: z.number(),\n duration: z.number()\n});\n\nexport type ApiCall = z.infer<typeof ApiCallSchema>;\n\n/**\n * Execution trace schema - represents detailed execution information.\n */\nexport const ExecutionTraceSchema = z.object({\n commands: z.array(CommandExecutionSchema),\n filesModified: z.array(FileModificationSchema),\n apiCalls: z.array(ApiCallSchema),\n totalDuration: z.number()\n});\n\nexport type ExecutionTrace = z.infer<typeof ExecutionTraceSchema>;\n\n/**\n * Failure analysis schema.\n */\nexport const FailureAnalysisSchema = z.object({\n category: z.enum(FailureCategory),\n severity: z.enum(FailureSeverity),\n summary: z.string(),\n details: z.string(),\n rootCause: z.string(),\n suggestedFix: z.string(),\n relatedAssertions: z.array(z.string()),\n codeSnippet: z.string().optional(),\n similarIssues: z.array(z.string()).optional(),\n patternId: z.string().optional(),\n // Extended fields for detailed debugging\n diff: DiffContentSchema.optional(),\n executionTrace: ExecutionTraceSchema.optional()\n});\n\nexport type FailureAnalysis = z.infer<typeof FailureAnalysisSchema>;\n\n/**\n * Evaluation run schema.\n *\n * Represents a complete evaluation run with configuration, results, and metrics.\n */\nexport const EvalRunSchema = TenantEntitySchema.extend({\n /** Agent ID for this run */\n agentId: z.string().optional(),\n /** Skills group ID for this run */\n skillsGroupId: z.string().optional(),\n /** Map of skillId to skillVersionId for this run */\n skillVersions: z.record(z.string(), z.string()).optional(),\n /** Scenario IDs to run */\n scenarioIds: z.array(z.string()),\n /** Current status */\n status: EvalStatusSchema,\n /** Progress percentage (0-100) */\n progress: z.number(),\n /** Results for each scenario/target combination (lazy to break eval-result \u2194 eval-run cycle) */\n results: z.array(z.lazy(() => EvalRunResultSchema)),\n /** Aggregated metrics across all results */\n aggregateMetrics: EvalMetricsSchema,\n /** Failure analyses */\n failureAnalyses: z.array(FailureAnalysisSchema).optional(),\n /** Aggregated LLM trace summary */\n llmTraceSummary: LLMTraceSummarySchema.optional(),\n /** What triggered this run */\n trigger: TriggerSchema.optional(),\n /** When the run started (set when evaluation is triggered) */\n startedAt: z.string().optional(),\n /** When the run completed */\n completedAt: z.string().optional(),\n /** Live trace events captured during execution (for playback on results page) */\n liveTraceEvents: z.array(LiveTraceEventSchema).optional(),\n /** Remote job ID for tracking execution in Dev Machines */\n jobId: z.string().optional(),\n /** Remote job status from the Dev Machine API (PENDING, RUNNING, COMPLETED, FAILED, CANCELLED) */\n jobStatus: z.string().optional(),\n /** Remote job error message if the job failed */\n jobError: z.string().optional(),\n /** Timestamp of the last job status check */\n jobStatusCheckedAt: z.string().optional(),\n /** MCP server IDs to enable for this run (optional) */\n mcpIds: z.array(z.string()).optional(),\n /** Sub-agent IDs to enable for this run (optional) */\n subAgentIds: z.array(z.string()).optional()\n});\n\nexport type EvalRun = z.infer<typeof EvalRunSchema>;\n\n/**\n * Input schema for creating a new EvalRun.\n */\nexport const CreateEvalRunInputSchema = EvalRunSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n status: true,\n progress: true,\n results: true,\n aggregateMetrics: true,\n startedAt: true,\n completedAt: true\n});\n\nexport type CreateEvalRunInput = z.infer<typeof CreateEvalRunInputSchema>;\n\n/**\n * Evaluation progress schema.\n */\nexport const EvaluationProgressSchema = z.object({\n runId: z.string(),\n targetId: z.string(),\n totalScenarios: z.number(),\n completedScenarios: z.number(),\n scenarioProgress: z.array(\n z.object({\n scenarioId: z.string(),\n currentStep: z.string(),\n error: z.string().optional()\n })\n ),\n createdAt: z.number()\n});\n\nexport type EvaluationProgress = z.infer<typeof EvaluationProgressSchema>;\n\n/**\n * Evaluation log schema.\n */\nexport const EvaluationLogSchema = z.object({\n runId: z.string(),\n scenarioId: z.string(),\n log: z.object({\n level: z.enum(['info', 'error', 'debug']),\n message: z.string().optional(),\n args: z.array(z.any()).optional(),\n error: z.string().optional()\n })\n});\n\nexport type EvaluationLog = z.infer<typeof EvaluationLogSchema>;\n\n/**\n * LLM timeout constant (2 minutes).\n */\nexport const LLM_TIMEOUT = 120000;\n", "import { z } from 'zod';\n\n/**\n * Live trace event type enum.\n * Maps to the step types but includes streaming states.\n */\nexport enum LiveTraceEventType {\n THINKING = 'thinking',\n TOOL_USE = 'tool_use',\n COMPLETION = 'completion',\n TOOL_RESULT = 'tool_result',\n /** Diagnostic information for debugging environment/setup issues */\n DIAGNOSTIC = 'diagnostic',\n /** Periodic progress heartbeat during long operations */\n PROGRESS = 'progress',\n /** File write operation */\n FILE_WRITE = 'file_write',\n /** File read operation */\n FILE_READ = 'file_read',\n /** System message from the SDK */\n SYSTEM = 'system',\n /** User message (tool result from file operations etc.) */\n USER = 'user'\n}\n\n/**\n * Live trace event schema.\n * Represents a single trace event emitted during agent execution.\n */\nexport const LiveTraceEventSchema = z.object({\n /** The evaluation run ID */\n evalRunId: z.string(),\n /** The scenario ID being executed */\n scenarioId: z.string(),\n /** The scenario name for display */\n scenarioName: z.string(),\n /** The target ID (skill, agent, etc.) */\n targetId: z.string(),\n /** The target name for display */\n targetName: z.string(),\n /** Step number in the current scenario execution */\n stepNumber: z.number(),\n /** Type of trace event */\n type: z.enum(LiveTraceEventType),\n /** Tool name if this is a tool_use event */\n toolName: z.string().optional(),\n /** Tool arguments preview (truncated JSON) */\n toolArgs: z.string().optional(),\n /** Output preview (truncated text) */\n outputPreview: z.string().optional(),\n /** File path for file operations */\n filePath: z.string().optional(),\n /** Elapsed time in milliseconds for progress events */\n elapsedMs: z.number().optional(),\n /** Thinking/reasoning text from Claude */\n thinking: z.string().optional(),\n /** Timestamp when this event occurred */\n timestamp: z.string(),\n /** Whether this is the final event for this scenario */\n isComplete: z.boolean()\n});\n\nexport type LiveTraceEvent = z.infer<typeof LiveTraceEventSchema>;\n\n/**\n * Prefix used in stdout to identify trace events.\n * Format: TRACE_EVENT:{json}\n */\nexport const TRACE_EVENT_PREFIX = 'TRACE_EVENT:';\n\n/**\n * Parse a line from stdout to extract a trace event if present.\n * @param line - A line from stdout\n * @returns The parsed LiveTraceEvent or null if not a trace event line\n */\nexport function parseTraceEventLine(line: string): LiveTraceEvent | null {\n if (!line.startsWith(TRACE_EVENT_PREFIX)) {\n return null;\n }\n\n try {\n const jsonStr = line.slice(TRACE_EVENT_PREFIX.length);\n const parsed = JSON.parse(jsonStr);\n const result = LiveTraceEventSchema.safeParse(parsed);\n return result.success ? result.data : null;\n } catch {\n return null;\n }\n}\n\n/**\n * Format a trace event as a stdout line.\n * @param event - The trace event to format\n * @returns The formatted line with prefix\n */\nexport function formatTraceEventLine(event: LiveTraceEvent): string {\n return `${TRACE_EVENT_PREFIX}${JSON.stringify(event)}`;\n}\n", "import { z } from 'zod';\nimport { BaseEntitySchema } from '../common/base-entity.js';\n\n/**\n * Project schema - represents a tenant/workspace for data isolation.\n *\n * All entities belong to a project. Projects are the top-level\n * organizational unit for multi-tenancy.\n *\n * Note: Project extends BaseEntity (not TenantEntity) since\n * Project IS the tenant and doesn't need a projectId.\n */\nexport const ProjectSchema = BaseEntitySchema.extend({\n appId: z.string().optional().describe('The ID of the app in Dev Center'),\n appSecret: z\n .string()\n .optional()\n .describe('The secret of the app in Dev Center')\n});\n\nexport type Project = z.infer<typeof ProjectSchema>;\n\n/**\n * Input schema for creating a new Project.\n */\nexport const CreateProjectInputSchema = ProjectSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateProjectInput = z.infer<typeof CreateProjectInputSchema>;\n\n/**\n * Input schema for updating a Project.\n */\nexport const UpdateProjectInputSchema = CreateProjectInputSchema.partial();\n\nexport type UpdateProjectInput = z.infer<typeof UpdateProjectInputSchema>;\n", "import { z } from 'zod';\nimport { TenantEntitySchema } from '../common/base-entity.js';\nimport { GitHubSourceSchema } from '../common/github-source.js';\n\n/**\n * Template schema - a project template that can be used for test environments.\n *\n * Templates are tenant-based entities scoped to a project.\n * They define how to set up a project environment for testing.\n * The `source` field points to a GitHub directory that is fetched via the GitHub API.\n * It is optional to support the transition from the legacy `downloadUrl` field.\n */\nexport const TemplateSchema = TenantEntitySchema.extend({\n /** GitHub source reference for fetching template files */\n source: GitHubSourceSchema.optional()\n});\n\nexport type Template = z.infer<typeof TemplateSchema>;\n\n/**\n * Input schema for creating a new Template.\n */\nexport const CreateTemplateInputSchema = TemplateSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateTemplateInput = z.infer<typeof CreateTemplateInputSchema>;\n\n/**\n * Input schema for updating a Template.\n */\nexport const UpdateTemplateInputSchema = CreateTemplateInputSchema.partial();\n\nexport type UpdateTemplateInput = z.infer<typeof UpdateTemplateInputSchema>;\n", "import type { AssertionParameter, AssertionType } from './assertion.js';\n\n/**\n * System assertion definition - built-in assertions available to all projects.\n * These are not stored in the database but defined in code.\n */\nexport interface SystemAssertion {\n /** Unique ID prefixed with 'system:' */\n id: string;\n /** Display name */\n name: string;\n /** Description of what the assertion checks */\n description: string;\n /** Assertion type */\n type: AssertionType;\n /** Parameters that can be configured per-scenario */\n parameters: AssertionParameter[];\n}\n\n/**\n * System assertion IDs - prefixed with 'system:' to distinguish from custom assertions.\n */\nexport const SYSTEM_ASSERTION_IDS = {\n SKILL_WAS_CALLED: 'system:skill_was_called',\n BUILD_PASSED: 'system:build_passed',\n LLM_JUDGE: 'system:llm_judge'\n} as const;\n\nexport type SystemAssertionId =\n (typeof SYSTEM_ASSERTION_IDS)[keyof typeof SYSTEM_ASSERTION_IDS];\n\n/**\n * Check if an assertion ID is a system assertion.\n */\nexport function isSystemAssertionId(id: string): id is SystemAssertionId {\n return id.startsWith('system:');\n}\n\n/**\n * Built-in system assertions.\n * These are available to all projects without needing to create them.\n */\nexport const SYSTEM_ASSERTIONS: Record<SystemAssertionId, SystemAssertion> = {\n [SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED]: {\n id: SYSTEM_ASSERTION_IDS.SKILL_WAS_CALLED,\n name: 'Skill Was Called',\n description:\n 'Check that one or more skills were invoked during the agent run',\n type: 'skill_was_called',\n parameters: [\n {\n name: 'skillNames',\n label: 'Skills',\n type: 'string',\n required: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.BUILD_PASSED]: {\n id: SYSTEM_ASSERTION_IDS.BUILD_PASSED,\n name: 'Build Passed',\n description: 'Run a build command and verify it exits with expected code',\n type: 'build_passed',\n parameters: [\n {\n name: 'command',\n label: 'Build Command',\n type: 'string',\n required: false,\n defaultValue: 'yarn build'\n },\n {\n name: 'expectedExitCode',\n label: 'Expected Exit Code',\n type: 'number',\n required: false,\n defaultValue: 0\n },\n {\n name: 'maxBuildTime',\n label: 'Max Build Time (ms)',\n type: 'number',\n required: false,\n advanced: true\n },\n {\n name: 'maxMemory',\n label: 'Max Memory (MB)',\n type: 'number',\n required: false,\n advanced: true\n }\n ]\n },\n [SYSTEM_ASSERTION_IDS.LLM_JUDGE]: {\n id: SYSTEM_ASSERTION_IDS.LLM_JUDGE,\n name: 'LLM Judge',\n description: 'LLM evaluates the output and assigns a score (0-100)',\n type: 'llm_judge',\n parameters: [\n {\n name: 'prompt',\n label: 'Judge Prompt',\n type: 'string',\n required: true,\n defaultValue: 'Verify the output meets the acceptance criteria.'\n },\n {\n name: 'systemPrompt',\n label: 'System Prompt (optional)',\n type: 'string',\n required: false,\n defaultValue:\n 'You are judging a scenario run. Use these values:\\n- {{output}}: the agent\\'s final output\\n- {{cwd}}: working directory\\n- {{changedFiles}}: list of files changed (or \"No files were changed\")\\n- {{trace}}: step-by-step trace (tool calls, completions) to check e.g. which tools were called and how many times\\n\\nJudge how well the output meets the acceptance criteria stated in the user prompt.'\n },\n {\n name: 'minScore',\n label: 'Minimum Score (0-100)',\n type: 'number',\n required: false,\n defaultValue: 70\n }\n ]\n }\n};\n\n/**\n * Get all system assertions as an array.\n */\nexport function getSystemAssertions(): SystemAssertion[] {\n return Object.values(SYSTEM_ASSERTIONS);\n}\n\n/**\n * Get a system assertion by ID.\n */\nexport function getSystemAssertion(\n id: SystemAssertionId\n): SystemAssertion | undefined {\n return SYSTEM_ASSERTIONS[id];\n}\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,SAAS;AAKX,IAAM,mBAAmB,EAAE,OAAO;AAAA,EACvC,IAAI,EAAE,OAAO;AAAA,EACb,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC;AAAA,EACtB,aAAa,EAAE,OAAO;AAAA,EACtB,WAAW,EAAE,OAAO;AAAA,EACpB,WAAW,EAAE,OAAO;AAAA,EACpB,SAAS,EAAE,QAAQ,EAAE,SAAS;AAChC,CAAC;AAOM,IAAM,qBAAqB,iBAAiB,OAAO;AAAA,EACxD,WAAW,EAAE,OAAO;AACtB,CAAC;;;ACrBD,SAAS,KAAAA,UAAS;AAMX,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,MACV;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,cAAc;AAAA,MAChB;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,cACE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MACJ;AAAA,MACA;AAAA,QACE,MAAM;AAAA,QACN,OAAO;AAAA,QACP,MAAM;AAAA,QACN,UAAU;AAAA,QACV,cAAc;AAAA,MAChB;AAAA,IACF;AAAA,EACF;AACF;AAKO,SAAS,sBAAyC;AACvD,SAAO,OAAO,OAAO,iBAAiB;AACxC;AAKO,SAAS,mBACd,IAC6B;AAC7B,SAAO,kBAAkB,EAAE;AAC7B;",
|
|
6
6
|
"names": ["z", "z", "z", "z", "ModelIds", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "TestType", "TestImportance", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "z", "EvalStatus", "LLMStepType", "z", "z", "z", "LiveTraceEventType", "TriggerType", "z", "FailureCategory", "FailureSeverity", "TemplateFileStatus", "AssertionResultStatus", "z", "z", "z"]
|
|
7
7
|
}
|
|
@@ -11,7 +11,8 @@ export declare enum ModelIds {
|
|
|
11
11
|
CLAUDE_3_5_SONNET_2_0 = "CLAUDE_3_5_SONNET_2_0",
|
|
12
12
|
CLAUDE_3_7_SONNET_1_0 = "CLAUDE_3_7_SONNET_1_0",
|
|
13
13
|
CLAUDE_4_OPUS_1_0 = "CLAUDE_4_OPUS_1_0",
|
|
14
|
-
CLAUDE_4_SONNET_1_0 = "CLAUDE_4_SONNET_1_0"
|
|
14
|
+
CLAUDE_4_SONNET_1_0 = "CLAUDE_4_SONNET_1_0",
|
|
15
|
+
CLAUDE_4_5_HAIKU_1_0 = "CLAUDE_4_5_HAIKU_1_0"
|
|
15
16
|
}
|
|
16
17
|
export declare const ModelIdsSchema: z.ZodEnum<typeof ModelIds>;
|
|
17
18
|
export declare const ModelConfigSchema: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/evalforge-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.31.0",
|
|
4
4
|
"description": "Unified types for EvalForge agent evaluation system",
|
|
5
5
|
"files": [
|
|
6
6
|
"build"
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"artifactId": "evalforge-types"
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "70d9cdaaec664ecb22d3e7ebf18c5442ad8ae1b8c86ebe3eead876f3"
|
|
50
50
|
}
|