@wix/evalforge-types 0.3.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/build/index.js +1047 -0
- package/build/index.js.map +7 -0
- package/build/index.mjs +928 -0
- package/build/index.mjs.map +7 -0
- package/build/types/common/base-entity.d.ts +26 -0
- package/build/types/common/index.d.ts +3 -0
- package/build/types/common/mcp.d.ts +17 -0
- package/build/types/common/models.d.ts +55 -0
- package/build/types/evaluation/eval-result.d.ts +239 -0
- package/build/types/evaluation/eval-run.d.ts +581 -0
- package/build/types/evaluation/index.d.ts +4 -0
- package/build/types/evaluation/live-trace.d.ts +47 -0
- package/build/types/evaluation/metrics.d.ts +157 -0
- package/build/types/improvement/improvement.d.ts +140 -0
- package/build/types/improvement/index.d.ts +1 -0
- package/build/types/index.d.ts +24 -0
- package/build/types/project/index.d.ts +1 -0
- package/build/types/project/project.d.ts +41 -0
- package/build/types/scenario/environment.d.ts +58 -0
- package/build/types/scenario/index.d.ts +2 -0
- package/build/types/scenario/test-scenario.d.ts +50 -0
- package/build/types/suite/index.d.ts +1 -0
- package/build/types/suite/test-suite.d.ts +37 -0
- package/build/types/target/agent.d.ts +53 -0
- package/build/types/target/index.d.ts +4 -0
- package/build/types/target/skill.d.ts +78 -0
- package/build/types/target/skills-group.d.ts +37 -0
- package/build/types/target/target.d.ts +17 -0
- package/build/types/template/index.d.ts +1 -0
- package/build/types/template/template.d.ts +38 -0
- package/build/types/test/base.d.ts +43 -0
- package/build/types/test/build-check.d.ts +29 -0
- package/build/types/test/command-execution.d.ts +31 -0
- package/build/types/test/file-content.d.ts +52 -0
- package/build/types/test/file-presence.d.ts +24 -0
- package/build/types/test/index.d.ts +124 -0
- package/build/types/test/llm.d.ts +36 -0
- package/build/types/test/playwright-nl.d.ts +28 -0
- package/build/types/test/site-config.d.ts +32 -0
- package/build/types/test/tool.d.ts +26 -0
- package/build/types/test/vitest.d.ts +30 -0
- package/package.json +50 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/common/base-entity.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/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/environment.ts", "../src/scenario/test-scenario.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"],
|
|
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 * MCP Server Configuration.\n * Defines how to connect to an MCP (Model Context Protocol) server.\n *\n * Merged from old and new systems:\n * - command, args, envVars from new system\n * - disabledTools from old system\n */\nexport const MCPServerConfigSchema = z.object({\n /** Unique name for this MCP server */\n name: z.string(),\n /** Command to start the MCP server */\n command: z.string(),\n /** Command line arguments */\n args: z.array(z.string()).optional(),\n /** Environment variables for the server process */\n envVars: z.record(z.string(), z.string()).optional(),\n /** Tools to disable for this MCP server */\n disabledTools: z.array(z.string()).optional()\n});\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 */\nexport const ModelConfigSchema = z.object({\n model: ModelIdsSchema,\n temperature: z.number().min(0).max(1).optional(),\n maxTokens: 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-4-sonnet',\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-4-opus',\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',\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 */\nexport const UpdateAgentInputSchema = CreateAgentInputSchema.partial();\n\nexport type UpdateAgentInput = z.infer<typeof UpdateAgentInputSchema>;\n", "import { z } from 'zod';\nimport { TargetSchema } from './target.js';\nimport { ModelConfigSchema } from '../common/models.js';\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 * Skill version - historical snapshot of a Skill's content.\n */\nexport const SkillVersionSchema = z.object({\n id: z.string(),\n skillId: z.string(),\n skillMd: z.string(),\n metadata: SkillMetadataSchema,\n model: ModelConfigSchema.optional(),\n systemPrompt: z.string().optional(),\n version: z.number(),\n createdAt: z.string(),\n notes: z.string().optional()\n});\n\nexport type SkillVersion = z.infer<typeof SkillVersionSchema>;\n\n/**\n * Skill schema - a coding capability defined by SKILL.md.\n *\n * Skills represent coding capabilities that can be tested.\n * Persisted shape: id, projectId, name, description, createdAt, updatedAt, deleted, skillMd.\n */\nexport const SkillSchema = TargetSchema.extend({\n /** The current SKILL.md content */\n skillMd: z.string()\n});\n\nexport type Skill = z.infer<typeof SkillSchema>;\n\n/**\n * Input schema for creating a new Skill.\n */\nexport const CreateSkillInputSchema = SkillSchema.omit({\n id: true,\n createdAt: true,\n updatedAt: true,\n deleted: true\n});\n\nexport type CreateSkillInput = z.infer<typeof CreateSkillInputSchema>;\n\n/**\n * Input schema for updating a Skill.\n */\nexport const UpdateSkillInputSchema = CreateSkillInputSchema.partial();\n\nexport type UpdateSkillInput = z.infer<typeof UpdateSkillInputSchema>;\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';\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 * 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';\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 */\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 */\n templateId: z.string().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 * 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 { ModelConfigSchema } from '../common/models.js';\nimport { ExpectedFileSchema } from '../scenario/test-scenario.js';\n\n/**\n * Assertion result status enum.\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 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 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});\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 * 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 /** 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 */\n results: z.array(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});\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}\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 /** 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';\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 */\nexport const TemplateSchema = TenantEntitySchema.extend({\n /** URL to download the template from */\n downloadUrl: z.url()\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"],
|
|
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;AAUX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,IAAE,OAAO;AAAA,EACrB,KAAKA,IAAE,OAAO;AAAA,IACZ,OAAOA,IAAE,KAAK,CAAC,QAAQ,SAAS,OAAO,CAAC;AAAA,IACxC,SAASA,IAAE,OAAO,EAAE,SAAS;AAAA,IAC7B,MAAMA,IAAE,MAAMA,IAAE,IAAI,CAAC,EAAE,SAAS;AAAA,IAChC,OAAOA,IAAE,OAAO,EAAE,SAAS;AAAA,EAC7B,CAAC;AACH,CAAC;AAOM,IAAM,cAAc;;;AE1P3B,SAAS,KAAAG,WAAS;AAYX,IAAM,gBAAgB,iBAAiB,OAAO;AAAA,EACnD,OAAOC,IAAE,OAAO,EAAE,SAAS,EAAE,SAAS,iCAAiC;AAAA,EACvE,WAAWA,IACR,OAAO,EACP,SAAS,EACT,SAAS,qCAAqC;AACnD,CAAC;AAOM,IAAM,2BAA2B,cAAc,KAAK;AAAA,EACzD,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AACX,CAAC;AAOM,IAAM,2BAA2B,yBAAyB,QAAQ;;;ACrCzE,SAAS,KAAAC,WAAS;AASX,IAAM,iBAAiB,mBAAmB,OAAO;AAAA;AAAA,EAEtD,aAAaC,IAAE,IAAI;AACrB,CAAC;AAOM,IAAM,4BAA4B,eAAe,KAAK;AAAA,EAC3D,IAAI;AAAA,EACJ,WAAW;AAAA,EACX,WAAW;AAAA,EACX,SAAS;AACX,CAAC;AAOM,IAAM,4BAA4B,0BAA0B,QAAQ;",
|
|
6
|
+
"names": ["z", "z", "ModelIds", "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", "EvalStatus", "LLMStepType", "z", "AssertionResultStatus", "z", "z", "z", "LiveTraceEventType", "TriggerType", "z", "FailureCategory", "FailureSeverity", "z", "z", "z", "z"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Base entity schema with common fields for all entities.
|
|
4
|
+
*/
|
|
5
|
+
export declare const BaseEntitySchema: z.ZodObject<{
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
name: z.ZodString;
|
|
8
|
+
description: z.ZodString;
|
|
9
|
+
createdAt: z.ZodString;
|
|
10
|
+
updatedAt: z.ZodString;
|
|
11
|
+
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
12
|
+
}, z.core.$strip>;
|
|
13
|
+
export type BaseEntity = z.infer<typeof BaseEntitySchema>;
|
|
14
|
+
/**
|
|
15
|
+
* Tenant entity schema - extends BaseEntity with projectId for multi-tenancy.
|
|
16
|
+
*/
|
|
17
|
+
export declare const TenantEntitySchema: z.ZodObject<{
|
|
18
|
+
id: z.ZodString;
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
description: z.ZodString;
|
|
21
|
+
createdAt: z.ZodString;
|
|
22
|
+
updatedAt: z.ZodString;
|
|
23
|
+
deleted: z.ZodOptional<z.ZodBoolean>;
|
|
24
|
+
projectId: z.ZodString;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type TenantEntity = z.infer<typeof TenantEntitySchema>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* MCP Server Configuration.
|
|
4
|
+
* Defines how to connect to an MCP (Model Context Protocol) server.
|
|
5
|
+
*
|
|
6
|
+
* Merged from old and new systems:
|
|
7
|
+
* - command, args, envVars from new system
|
|
8
|
+
* - disabledTools from old system
|
|
9
|
+
*/
|
|
10
|
+
export declare const MCPServerConfigSchema: z.ZodObject<{
|
|
11
|
+
name: z.ZodString;
|
|
12
|
+
command: z.ZodString;
|
|
13
|
+
args: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
14
|
+
envVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
15
|
+
disabledTools: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type MCPServerConfig = z.infer<typeof MCPServerConfigSchema>;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Anthropic Model IDs supported by the AI Gateway.
|
|
4
|
+
* These values match the ClaudeModel enum from the Wix AI Gateway API.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum ModelIds {
|
|
7
|
+
CLAUDE_3_HAIKU_1_0 = "CLAUDE_3_HAIKU_1_0",
|
|
8
|
+
CLAUDE_3_OPUS_1_0 = "CLAUDE_3_OPUS_1_0",
|
|
9
|
+
CLAUDE_3_SONNET_1_0 = "CLAUDE_3_SONNET_1_0",
|
|
10
|
+
CLAUDE_3_5_SONNET_1_0 = "CLAUDE_3_5_SONNET_1_0",
|
|
11
|
+
CLAUDE_3_5_SONNET_2_0 = "CLAUDE_3_5_SONNET_2_0",
|
|
12
|
+
CLAUDE_3_7_SONNET_1_0 = "CLAUDE_3_7_SONNET_1_0",
|
|
13
|
+
CLAUDE_4_OPUS_1_0 = "CLAUDE_4_OPUS_1_0",
|
|
14
|
+
CLAUDE_4_SONNET_1_0 = "CLAUDE_4_SONNET_1_0"
|
|
15
|
+
}
|
|
16
|
+
export declare const ModelIdsSchema: z.ZodEnum<typeof ModelIds>;
|
|
17
|
+
/**
|
|
18
|
+
* Model configuration schema for specifying model parameters.
|
|
19
|
+
*/
|
|
20
|
+
export declare const ModelConfigSchema: z.ZodObject<{
|
|
21
|
+
model: z.ZodEnum<typeof ModelIds>;
|
|
22
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type ModelConfig = z.infer<typeof ModelConfigSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Model pricing schema (cost per 1M tokens).
|
|
28
|
+
*/
|
|
29
|
+
export declare const ModelPricingSchema: z.ZodObject<{
|
|
30
|
+
inputPer1M: z.ZodNumber;
|
|
31
|
+
outputPer1M: z.ZodNumber;
|
|
32
|
+
}, z.core.$strip>;
|
|
33
|
+
export type ModelPricing = z.infer<typeof ModelPricingSchema>;
|
|
34
|
+
/**
|
|
35
|
+
* Model schema - complete model definition with metadata and pricing.
|
|
36
|
+
*/
|
|
37
|
+
export declare const ModelSchema: z.ZodObject<{
|
|
38
|
+
id: z.ZodEnum<typeof ModelIds>;
|
|
39
|
+
name: z.ZodString;
|
|
40
|
+
provider: z.ZodLiteral<"anthropic">;
|
|
41
|
+
providerModelId: z.ZodString;
|
|
42
|
+
pricing: z.ZodObject<{
|
|
43
|
+
inputPer1M: z.ZodNumber;
|
|
44
|
+
outputPer1M: z.ZodNumber;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
}, z.core.$strip>;
|
|
47
|
+
export type Model = z.infer<typeof ModelSchema>;
|
|
48
|
+
/**
|
|
49
|
+
* Available models with full metadata including pricing.
|
|
50
|
+
*/
|
|
51
|
+
export declare const AVAILABLE_MODELS: Model[];
|
|
52
|
+
/**
|
|
53
|
+
* Available models as a map keyed by model ID.
|
|
54
|
+
*/
|
|
55
|
+
export declare const AVAILABLE_MODELS_MAP: Record<ModelIds, Model>;
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { TestResult } from '../test/index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Assertion result status enum.
|
|
5
|
+
*/
|
|
6
|
+
export declare enum AssertionResultStatus {
|
|
7
|
+
PASSED = "passed",
|
|
8
|
+
FAILED = "failed",
|
|
9
|
+
SKIPPED = "skipped",
|
|
10
|
+
ERROR = "error"
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Assertion result schema.
|
|
14
|
+
*/
|
|
15
|
+
export declare const AssertionResultSchema: z.ZodObject<{
|
|
16
|
+
id: z.ZodString;
|
|
17
|
+
assertionId: z.ZodString;
|
|
18
|
+
assertionType: z.ZodString;
|
|
19
|
+
assertionName: z.ZodString;
|
|
20
|
+
status: z.ZodEnum<typeof AssertionResultStatus>;
|
|
21
|
+
message: z.ZodOptional<z.ZodString>;
|
|
22
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
23
|
+
actual: z.ZodOptional<z.ZodString>;
|
|
24
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
26
|
+
llmTraceSteps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
id: z.ZodString;
|
|
28
|
+
stepNumber: z.ZodNumber;
|
|
29
|
+
type: z.ZodEnum<typeof import("./metrics.js").LLMStepType>;
|
|
30
|
+
model: z.ZodString;
|
|
31
|
+
provider: z.ZodString;
|
|
32
|
+
startedAt: z.ZodString;
|
|
33
|
+
durationMs: z.ZodNumber;
|
|
34
|
+
tokenUsage: z.ZodObject<{
|
|
35
|
+
prompt: z.ZodNumber;
|
|
36
|
+
completion: z.ZodNumber;
|
|
37
|
+
total: z.ZodNumber;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
costUsd: z.ZodNumber;
|
|
40
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
41
|
+
toolArguments: z.ZodOptional<z.ZodString>;
|
|
42
|
+
inputPreview: z.ZodOptional<z.ZodString>;
|
|
43
|
+
outputPreview: z.ZodOptional<z.ZodString>;
|
|
44
|
+
success: z.ZodBoolean;
|
|
45
|
+
error: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strip>>>;
|
|
47
|
+
}, z.core.$strip>;
|
|
48
|
+
export type AssertionResult = z.infer<typeof AssertionResultSchema>;
|
|
49
|
+
/**
|
|
50
|
+
* Evaluation run result schema - result for a single scenario/target combination.
|
|
51
|
+
*/
|
|
52
|
+
export declare const EvalRunResultSchema: z.ZodObject<{
|
|
53
|
+
id: z.ZodString;
|
|
54
|
+
targetId: z.ZodString;
|
|
55
|
+
targetName: z.ZodOptional<z.ZodString>;
|
|
56
|
+
scenarioId: z.ZodString;
|
|
57
|
+
scenarioName: z.ZodString;
|
|
58
|
+
modelConfig: z.ZodOptional<z.ZodObject<{
|
|
59
|
+
model: z.ZodEnum<typeof import("../common/models.js").ModelIds>;
|
|
60
|
+
temperature: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
62
|
+
}, z.core.$strip>>;
|
|
63
|
+
assertionResults: z.ZodArray<z.ZodObject<{
|
|
64
|
+
id: z.ZodString;
|
|
65
|
+
assertionId: z.ZodString;
|
|
66
|
+
assertionType: z.ZodString;
|
|
67
|
+
assertionName: z.ZodString;
|
|
68
|
+
status: z.ZodEnum<typeof AssertionResultStatus>;
|
|
69
|
+
message: z.ZodOptional<z.ZodString>;
|
|
70
|
+
expected: z.ZodOptional<z.ZodString>;
|
|
71
|
+
actual: z.ZodOptional<z.ZodString>;
|
|
72
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
73
|
+
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
74
|
+
llmTraceSteps: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
75
|
+
id: z.ZodString;
|
|
76
|
+
stepNumber: z.ZodNumber;
|
|
77
|
+
type: z.ZodEnum<typeof import("./metrics.js").LLMStepType>;
|
|
78
|
+
model: z.ZodString;
|
|
79
|
+
provider: z.ZodString;
|
|
80
|
+
startedAt: z.ZodString;
|
|
81
|
+
durationMs: z.ZodNumber;
|
|
82
|
+
tokenUsage: z.ZodObject<{
|
|
83
|
+
prompt: z.ZodNumber;
|
|
84
|
+
completion: z.ZodNumber;
|
|
85
|
+
total: z.ZodNumber;
|
|
86
|
+
}, z.core.$strip>;
|
|
87
|
+
costUsd: z.ZodNumber;
|
|
88
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
89
|
+
toolArguments: z.ZodOptional<z.ZodString>;
|
|
90
|
+
inputPreview: z.ZodOptional<z.ZodString>;
|
|
91
|
+
outputPreview: z.ZodOptional<z.ZodString>;
|
|
92
|
+
success: z.ZodBoolean;
|
|
93
|
+
error: z.ZodOptional<z.ZodString>;
|
|
94
|
+
}, z.core.$strip>>>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
metrics: z.ZodOptional<z.ZodObject<{
|
|
97
|
+
totalAssertions: z.ZodNumber;
|
|
98
|
+
passed: z.ZodNumber;
|
|
99
|
+
failed: z.ZodNumber;
|
|
100
|
+
skipped: z.ZodNumber;
|
|
101
|
+
errors: z.ZodNumber;
|
|
102
|
+
passRate: z.ZodNumber;
|
|
103
|
+
avgDuration: z.ZodNumber;
|
|
104
|
+
totalDuration: z.ZodNumber;
|
|
105
|
+
}, z.core.$strip>>;
|
|
106
|
+
passed: z.ZodNumber;
|
|
107
|
+
failed: z.ZodNumber;
|
|
108
|
+
passRate: z.ZodNumber;
|
|
109
|
+
duration: z.ZodNumber;
|
|
110
|
+
outputText: z.ZodOptional<z.ZodString>;
|
|
111
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
112
|
+
path: z.ZodString;
|
|
113
|
+
content: z.ZodOptional<z.ZodString>;
|
|
114
|
+
}, z.core.$strip>>>;
|
|
115
|
+
startedAt: z.ZodOptional<z.ZodString>;
|
|
116
|
+
completedAt: z.ZodOptional<z.ZodString>;
|
|
117
|
+
llmTrace: z.ZodOptional<z.ZodObject<{
|
|
118
|
+
id: z.ZodString;
|
|
119
|
+
steps: z.ZodArray<z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
stepNumber: z.ZodNumber;
|
|
122
|
+
type: z.ZodEnum<typeof import("./metrics.js").LLMStepType>;
|
|
123
|
+
model: z.ZodString;
|
|
124
|
+
provider: z.ZodString;
|
|
125
|
+
startedAt: z.ZodString;
|
|
126
|
+
durationMs: z.ZodNumber;
|
|
127
|
+
tokenUsage: z.ZodObject<{
|
|
128
|
+
prompt: z.ZodNumber;
|
|
129
|
+
completion: z.ZodNumber;
|
|
130
|
+
total: z.ZodNumber;
|
|
131
|
+
}, z.core.$strip>;
|
|
132
|
+
costUsd: z.ZodNumber;
|
|
133
|
+
toolName: z.ZodOptional<z.ZodString>;
|
|
134
|
+
toolArguments: z.ZodOptional<z.ZodString>;
|
|
135
|
+
inputPreview: z.ZodOptional<z.ZodString>;
|
|
136
|
+
outputPreview: z.ZodOptional<z.ZodString>;
|
|
137
|
+
success: z.ZodBoolean;
|
|
138
|
+
error: z.ZodOptional<z.ZodString>;
|
|
139
|
+
}, z.core.$strip>>;
|
|
140
|
+
summary: z.ZodObject<{
|
|
141
|
+
totalSteps: z.ZodNumber;
|
|
142
|
+
totalDurationMs: z.ZodNumber;
|
|
143
|
+
totalTokens: z.ZodObject<{
|
|
144
|
+
prompt: z.ZodNumber;
|
|
145
|
+
completion: z.ZodNumber;
|
|
146
|
+
total: z.ZodNumber;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
totalCostUsd: z.ZodNumber;
|
|
149
|
+
stepTypeBreakdown: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
150
|
+
count: z.ZodNumber;
|
|
151
|
+
durationMs: z.ZodNumber;
|
|
152
|
+
tokens: z.ZodNumber;
|
|
153
|
+
costUsd: z.ZodNumber;
|
|
154
|
+
}, z.core.$strip>>>;
|
|
155
|
+
modelBreakdown: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
156
|
+
count: z.ZodNumber;
|
|
157
|
+
durationMs: z.ZodNumber;
|
|
158
|
+
tokens: z.ZodNumber;
|
|
159
|
+
costUsd: z.ZodNumber;
|
|
160
|
+
}, z.core.$strip>>;
|
|
161
|
+
modelsUsed: z.ZodArray<z.ZodString>;
|
|
162
|
+
}, z.core.$strip>;
|
|
163
|
+
}, z.core.$strip>>;
|
|
164
|
+
}, z.core.$strip>;
|
|
165
|
+
export type EvalRunResult = z.infer<typeof EvalRunResultSchema>;
|
|
166
|
+
/**
|
|
167
|
+
* Prompt result schema - detailed result from prompt execution.
|
|
168
|
+
*/
|
|
169
|
+
export declare const PromptResultSchema: z.ZodObject<{
|
|
170
|
+
text: z.ZodString;
|
|
171
|
+
files: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
172
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
173
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
174
|
+
reasoningDetails: z.ZodOptional<z.ZodUnknown>;
|
|
175
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
176
|
+
toolResults: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
177
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
178
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
179
|
+
steps: z.ZodArray<z.ZodUnknown>;
|
|
180
|
+
generationTimeMs: z.ZodNumber;
|
|
181
|
+
prompt: z.ZodString;
|
|
182
|
+
systemPrompt: z.ZodString;
|
|
183
|
+
usage: z.ZodObject<{
|
|
184
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
185
|
+
totalMicrocentsSpent: z.ZodOptional<z.ZodNumber>;
|
|
186
|
+
}, z.core.$strip>;
|
|
187
|
+
}, z.core.$strip>;
|
|
188
|
+
export type PromptResult = z.infer<typeof PromptResultSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* Full evaluation result schema - complete result for a single evaluation.
|
|
191
|
+
*/
|
|
192
|
+
export declare const EvaluationResultSchema: z.ZodObject<{
|
|
193
|
+
id: z.ZodString;
|
|
194
|
+
runId: z.ZodString;
|
|
195
|
+
timestamp: z.ZodNumber;
|
|
196
|
+
promptResult: z.ZodObject<{
|
|
197
|
+
text: z.ZodString;
|
|
198
|
+
files: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
199
|
+
finishReason: z.ZodOptional<z.ZodString>;
|
|
200
|
+
reasoning: z.ZodOptional<z.ZodString>;
|
|
201
|
+
reasoningDetails: z.ZodOptional<z.ZodUnknown>;
|
|
202
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
203
|
+
toolResults: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
204
|
+
warnings: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
205
|
+
sources: z.ZodOptional<z.ZodArray<z.ZodUnknown>>;
|
|
206
|
+
steps: z.ZodArray<z.ZodUnknown>;
|
|
207
|
+
generationTimeMs: z.ZodNumber;
|
|
208
|
+
prompt: z.ZodString;
|
|
209
|
+
systemPrompt: z.ZodString;
|
|
210
|
+
usage: z.ZodObject<{
|
|
211
|
+
totalTokens: z.ZodOptional<z.ZodNumber>;
|
|
212
|
+
totalMicrocentsSpent: z.ZodOptional<z.ZodNumber>;
|
|
213
|
+
}, z.core.$strip>;
|
|
214
|
+
}, z.core.$strip>;
|
|
215
|
+
testResults: z.ZodType<TestResult[]>;
|
|
216
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
217
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
218
|
+
score: z.ZodNumber;
|
|
219
|
+
suiteId: z.ZodOptional<z.ZodString>;
|
|
220
|
+
}, z.core.$strip>;
|
|
221
|
+
export type EvaluationResult = z.infer<typeof EvaluationResultSchema>;
|
|
222
|
+
/**
|
|
223
|
+
* Lean evaluation result - summary for listing.
|
|
224
|
+
*/
|
|
225
|
+
export declare const LeanEvaluationResultSchema: z.ZodObject<{
|
|
226
|
+
id: z.ZodString;
|
|
227
|
+
runId: z.ZodString;
|
|
228
|
+
timestamp: z.ZodNumber;
|
|
229
|
+
tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
230
|
+
scenarioId: z.ZodString;
|
|
231
|
+
scenarioVersion: z.ZodOptional<z.ZodNumber>;
|
|
232
|
+
targetId: z.ZodString;
|
|
233
|
+
targetVersion: z.ZodOptional<z.ZodNumber>;
|
|
234
|
+
suiteId: z.ZodOptional<z.ZodString>;
|
|
235
|
+
score: z.ZodNumber;
|
|
236
|
+
time: z.ZodOptional<z.ZodNumber>;
|
|
237
|
+
microcentsSpent: z.ZodOptional<z.ZodNumber>;
|
|
238
|
+
}, z.core.$strip>;
|
|
239
|
+
export type LeanEvaluationResult = z.infer<typeof LeanEvaluationResultSchema>;
|