vieval 0.0.11 → 0.0.12
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 +31 -31
- package/dist/bin/vieval.mjs +1 -1
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +1 -1
- package/dist/{cli-CHFCF8UR.mjs → cli-uzS81IPd.mjs} +1529 -1529
- package/dist/cli-uzS81IPd.mjs.map +1 -0
- package/dist/config.d.mts +1 -1
- package/dist/core/assertions/index.d.mts +156 -156
- package/dist/core/assertions/index.mjs +82 -82
- package/dist/core/assertions/index.mjs.map +1 -1
- package/dist/core/inference-executors/index.d.mts +37 -37
- package/dist/core/inference-executors/index.mjs +53 -52
- package/dist/core/inference-executors/index.mjs.map +1 -1
- package/dist/core/processors/results/index.d.mts +18 -18
- package/dist/core/processors/results/index.mjs.map +1 -1
- package/dist/core/runner/index.d.mts +2 -2
- package/dist/core/runner/index.mjs +258 -258
- package/dist/core/runner/index.mjs.map +1 -1
- package/dist/core/scheduler/index.d.mts +1 -1
- package/dist/core/scheduler/index.mjs +64 -64
- package/dist/core/scheduler/index.mjs.map +1 -1
- package/dist/{env-bRH0K6fU.d.mts → env-Br6jaWGL.d.mts} +9 -9
- package/dist/{env-BVYeJhGA.mjs → env-egxaJtNn.mjs} +8 -8
- package/dist/env-egxaJtNn.mjs.map +1 -0
- package/dist/{expect-extensions-Mf1sMNBv.mjs → expect-extensions-BKdEPt3h.mjs} +46 -46
- package/dist/expect-extensions-BKdEPt3h.mjs.map +1 -0
- package/dist/expect.mjs +1 -1
- package/dist/{index-CwKBlCG9.d.mts → index-BLIlhiWT.d.mts} +565 -565
- package/dist/{index-Be5I1ZJL.d.mts → index-CIaJClcC.d.mts} +48 -48
- package/dist/index.d.mts +207 -195
- package/dist/index.mjs +147 -147
- package/dist/index.mjs.map +1 -1
- package/dist/models-CaCOUPZw.mjs.map +1 -1
- package/dist/plugins/chat-models/index.d.mts +279 -279
- package/dist/plugins/chat-models/index.mjs +359 -359
- package/dist/plugins/chat-models/index.mjs.map +1 -1
- package/dist/{registry-BSyjwZFx.mjs → registry-BK7k6X81.mjs} +293 -293
- package/dist/registry-BK7k6X81.mjs.map +1 -0
- package/dist/testing/expect-extensions.d.mts +27 -27
- package/dist/testing/expect-extensions.mjs +1 -1
- package/package.json +3 -3
- package/dist/cli-CHFCF8UR.mjs.map +0 -1
- package/dist/env-BVYeJhGA.mjs.map +0 -1
- package/dist/expect-extensions-Mf1sMNBv.mjs.map +0 -1
- package/dist/registry-BSyjwZFx.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["defaultSleep"],"sources":["../../../src/core/inference-executors/retry-policy.ts","../../../src/core/inference-executors/adapters.ts","../../../src/core/inference-executors/remote-providers/openai/index.ts"],"sourcesContent":["import { sleep as defaultSleep, errorMessageFrom, errorNameFrom } from '@moeru/std'\n\n/**\n * Describes how provider retries should behave.\n *\n * ASCII flow:\n * attempt -> run request -> success return\n * attempt -> run request -> retriable failure -> sleep -> next attempt\n * attempt -> run request -> non-retriable failure -> throw\n */\nexport interface RetryPolicy {\n /**\n * Maximum number of total attempts, including the first try.\n */\n maxAttempts: number\n /**\n * Returns the wait time for a retry attempt.\n */\n delayMs: (attempt: number) => number\n /**\n * Determines whether an error can be retried safely.\n */\n shouldRetry: (error: unknown) => boolean\n /**\n * Suspends execution between retries.\n */\n sleep: (milliseconds: number) => Promise<void>\n}\n\n/**\n * Configures a retry policy before a provider call is executed.\n *\n * Use when:\n * - you want the default retry classifier but need to tune attempts or delay\n * - you need to replace the sleeper in tests\n *\n * Expects:\n * - `maxAttempts` to be a finite integer greater than or equal to `1`\n * - `delayMs` to return a non-negative wait time in milliseconds\n */\nexport interface RetryPolicyOptions {\n /**\n * Maximum total attempts, including the first request.\n *\n * @default 3\n */\n maxAttempts?: number\n /**\n * Computes the delay for a retry attempt.\n *\n * The attempt number starts at `1` for the first retry.\n */\n delayMs?: (attempt: number) => number\n /**\n * Overrides the retry classifier.\n */\n shouldRetry?: (error: unknown) => boolean\n /**\n * Overrides the sleeper used between attempts.\n */\n sleep?: (milliseconds: number) => Promise<void>\n}\n\nconst retryableStatusCodes = new Set([408, 425, 429, 500, 502, 503, 504])\nconst retryableErrorNames = new Set(['TimeoutError', 'FetchError'])\nconst retryableMessagePatterns = [\n /rate limit/i,\n /rate-limited/i,\n /temporarily unavailable/i,\n /service unavailable/i,\n /server error/i,\n /fetch failed/i,\n /network error/i,\n /socket hang up/i,\n /econnreset/i,\n /econnrefused/i,\n /eai_again/i,\n /etimedout/i,\n /timed out/i,\n /timeout/i,\n]\n\nfunction getStatusCode(error: unknown): number | undefined {\n if (error == null || typeof error !== 'object') {\n return undefined\n }\n\n const maybeStatusCode = (error as { statusCode?: unknown }).statusCode\n if (typeof maybeStatusCode === 'number') {\n return maybeStatusCode\n }\n\n const maybeStatus = (error as { status?: unknown }).status\n if (typeof maybeStatus === 'number') {\n return maybeStatus\n }\n\n const response = (error as { response?: unknown }).response\n if (response == null || typeof response !== 'object') {\n return undefined\n }\n\n const responseStatus = (response as { status?: unknown }).status\n return typeof responseStatus === 'number' ? responseStatus : undefined\n}\n\n/**\n * Returns true when a provider failure is temporary and a retry is reasonable.\n *\n * Use when:\n * - the upstream failure is a transport problem or a 5xx/429 response\n *\n * Expects:\n * - provider errors to expose a status code, name, or message when possible\n */\nexport function isRetriableProviderError(error: unknown): boolean {\n const statusCode = getStatusCode(error)\n\n if (statusCode != null) {\n return retryableStatusCodes.has(statusCode)\n }\n\n const errorName = errorNameFrom(error)\n if (errorName != null && retryableErrorNames.has(errorName)) {\n return true\n }\n\n const errorMessage = errorMessageFrom(error)\n if (errorMessage == null) {\n return false\n }\n\n return retryableMessagePatterns.some(pattern => pattern.test(errorMessage))\n}\n\nfunction defaultDelayMs(attempt: number): number {\n return 500 * 2 ** (attempt - 1)\n}\n\n/**\n * Creates a retry policy for provider work.\n *\n * Use when:\n * - you need a reusable retry runner for eval-time provider calls\n * - you want to keep retry behavior deterministic in tests\n *\n * Expects:\n * - callers to treat `maxAttempts` as total attempts, not retries\n *\n * Throws:\n * - `RangeError` when `maxAttempts` is not a finite integer greater than or equal to `1`\n */\nfunction assertValidMaxAttempts(value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 1) {\n throw new RangeError('maxAttempts must be a finite integer greater than or equal to 1.')\n }\n\n return value\n}\n\nexport function createRetryPolicy(options: RetryPolicyOptions = {}): RetryPolicy {\n const maxAttempts = assertValidMaxAttempts(options.maxAttempts ?? 3)\n\n return {\n maxAttempts,\n delayMs: options.delayMs ?? defaultDelayMs,\n shouldRetry: options.shouldRetry ?? isRetriableProviderError,\n sleep: options.sleep ?? defaultSleep,\n }\n}\n\n/**\n * Runs an operation with bounded retries.\n *\n * Use when:\n * - you are calling an LLM provider or other temporary upstream dependency\n * - non-retriable failures should bubble immediately\n *\n * Expects:\n * - the operation to be idempotent across attempts\n */\nexport async function runWithRetry<T>(operation: () => Promise<T>, policy: RetryPolicy = createRetryPolicy()): Promise<T> {\n for (let attempt = 1; attempt <= policy.maxAttempts; attempt += 1) {\n try {\n return await operation()\n }\n catch (error) {\n if (attempt >= policy.maxAttempts || !policy.shouldRetry(error)) {\n throw error\n }\n\n const delayMilliseconds = policy.delayMs(attempt)\n if (delayMilliseconds > 0) {\n await policy.sleep(delayMilliseconds)\n }\n }\n }\n\n throw new Error('Retry loop exited without returning a value.')\n}\n","import type { RetryPolicy, RetryPolicyOptions } from './retry-policy'\n\nimport { createRetryPolicy, runWithRetry } from './retry-policy'\n\n/**\n * Bundles a provider with the retry policy used to call it.\n *\n * Use when:\n * - a provider instance should travel with the retry runner that governs it\n * - you want call sites to share one retry configuration object\n */\nexport interface ProviderAdapter<TProvider> {\n /**\n * The underlying provider instance.\n */\n provider: TProvider\n /**\n * The retry policy used for provider calls.\n */\n retryPolicy: RetryPolicy\n /**\n * Runs a provider-dependent operation with the adapter retry policy.\n */\n runWithRetry: <TResult>(operation: () => Promise<TResult>) => Promise<TResult>\n}\n\n/**\n * Creates a provider adapter with the default retry policy.\n *\n * Use when:\n * - you have a provider instance and want a consistent retry wrapper\n *\n * Expects:\n * - the provider to be safe to reuse across attempts\n */\nexport function createProviderAdapter<TProvider>(provider: TProvider, options: RetryPolicyOptions = {}): ProviderAdapter<TProvider> {\n const retryPolicy = createRetryPolicy(options)\n\n return {\n provider,\n retryPolicy,\n runWithRetry: operation => runWithRetry(operation, retryPolicy),\n }\n}\n","import type { ProviderAdapter } from '../../adapters'\nimport type { RetryPolicyOptions } from '../../retry-policy'\n\nimport process from 'node:process'\n\nimport { createOpenAI } from '@xsai-ext/providers/create'\n\nimport { createProviderAdapter } from '../../adapters'\nimport { envFrom, requiredEnvFrom } from '../../env'\n\n/**\n * Represents the OpenAI provider instance returned by xsai.\n */\nexport type OpenAIProvider = ReturnType<typeof createOpenAI>\n\n/**\n * Represents the OpenAI adapter used by vieval.\n */\nexport type OpenAIProviderAdapter = ProviderAdapter<OpenAIProvider>\n\n/**\n * Configures env key names and source for OpenAI provider setup.\n */\nexport interface OpenAIEnvSourceOptions {\n /**\n * Environment object used for variable lookup.\n *\n * @default process.env\n */\n env?: NodeJS.ProcessEnv\n /**\n * Env key name for API key.\n *\n * @default 'OPENAI_API_KEY'\n */\n apiKey?: string\n /**\n * Env key name for base URL.\n *\n * @default 'OPENAI_BASE_URL'\n */\n baseURL?: string\n /**\n * Env key name for model.\n *\n * @default 'OPENAI_MODEL'\n */\n model?: string\n}\n\n/**\n * Configures fallback defaults when env values are missing.\n */\nexport interface OpenAIFromEnvDefaultOptions {\n /**\n * API key fallback value.\n */\n apiKey?: string\n /**\n * Base URL fallback value.\n */\n baseURL?: string\n /**\n * Model fallback value.\n */\n model?: string\n /**\n * Retry policy override passed to provider adapter.\n */\n retryOptions?: RetryPolicyOptions\n}\n\n/**\n * Result produced by `createOpenAIFromEnv`.\n */\nexport interface OpenAIFromEnvResult {\n adapter: OpenAIProviderAdapter\n apiKey: string\n baseURL?: string\n model: string\n}\n\n/**\n * Minimal response shape returned by text-generation calls.\n */\nexport interface OpenAITextGenerationResult {\n /**\n * Text output from the provider.\n *\n * Some OpenAI-compatible implementations may return `null`.\n */\n text?: string | null\n}\n\n/**\n * Normalizes provider text output to a safe string.\n *\n * Before: `{ text: null }`\n * After: `''`\n *\n * Before: `{ text: 'hello' }`\n * After: `'hello'`\n */\nexport function normalizeOpenAITextOutput(result: OpenAITextGenerationResult): string {\n return typeof result.text === 'string' ? result.text : ''\n}\n\n/**\n * Creates an OpenAI provider adapter using environment variables with defaults.\n *\n * Example:\n * `const runtime = createOpenAIFromEnv({}, { model: 'gpt-4.1-mini' })`\n */\nexport function createOpenAIFromEnv(\n source: OpenAIEnvSourceOptions = {},\n defaults: OpenAIFromEnvDefaultOptions = {},\n): OpenAIFromEnvResult {\n const env = source.env ?? process.env\n const apiKeyEnvKey = source.apiKey ?? 'OPENAI_API_KEY'\n const baseURLEnvKey = source.baseURL ?? 'OPENAI_BASE_URL'\n const modelEnvKey = source.model ?? 'OPENAI_MODEL'\n\n const envWithDefaults = {\n ...(defaults.apiKey == null ? {} : { [apiKeyEnvKey]: defaults.apiKey }),\n ...(defaults.baseURL == null ? {} : { [baseURLEnvKey]: defaults.baseURL }),\n ...(defaults.model == null ? {} : { [modelEnvKey]: defaults.model }),\n ...env,\n }\n\n const apiKey = requiredEnvFrom(envWithDefaults, {\n name: apiKeyEnvKey,\n type: 'string',\n })\n const model = requiredEnvFrom(envWithDefaults, {\n name: modelEnvKey,\n type: 'string',\n })\n const baseURL = envFrom(envWithDefaults, {\n name: baseURLEnvKey,\n type: 'string',\n })\n const adapter = createOpenAIProviderAdapter(apiKey, baseURL, defaults.retryOptions)\n\n return {\n adapter,\n apiKey,\n baseURL,\n model,\n }\n}\n\n/**\n * Creates an OpenAI provider adapter for eval-time requests.\n *\n * Use when:\n * - an eval needs the OpenAI SDK surface plus the shared retry runner\n *\n * Expects:\n * - `apiKey` and `baseURL` to point at an OpenAI-compatible endpoint\n * - `retryOptions` to follow the same invariants as `createRetryPolicy`\n */\nexport function createOpenAIProviderAdapter(apiKey: string, baseURL?: string, retryOptions: RetryPolicyOptions = {}): OpenAIProviderAdapter {\n return createProviderAdapter(createOpenAI(apiKey, baseURL), retryOptions)\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["defaultSleep"],"sources":["../../../src/core/inference-executors/retry-policy.ts","../../../src/core/inference-executors/adapters.ts","../../../src/core/inference-executors/remote-providers/openai/index.ts"],"sourcesContent":["import { sleep as defaultSleep, errorMessageFrom, errorNameFrom } from '@moeru/std'\n\n/**\n * Describes how provider retries should behave.\n *\n * ASCII flow:\n * attempt -> run request -> success return\n * attempt -> run request -> retriable failure -> sleep -> next attempt\n * attempt -> run request -> non-retriable failure -> throw\n */\nexport interface RetryPolicy {\n /**\n * Returns the wait time for a retry attempt.\n */\n delayMs: (attempt: number) => number\n /**\n * Maximum number of total attempts, including the first try.\n */\n maxAttempts: number\n /**\n * Determines whether an error can be retried safely.\n */\n shouldRetry: (error: unknown) => boolean\n /**\n * Suspends execution between retries.\n */\n sleep: (milliseconds: number) => Promise<void>\n}\n\n/**\n * Configures a retry policy before a provider call is executed.\n *\n * Use when:\n * - you want the default retry classifier but need to tune attempts or delay\n * - you need to replace the sleeper in tests\n *\n * Expects:\n * - `maxAttempts` to be a finite integer greater than or equal to `1`\n * - `delayMs` to return a non-negative wait time in milliseconds\n */\nexport interface RetryPolicyOptions {\n /**\n * Computes the delay for a retry attempt.\n *\n * The attempt number starts at `1` for the first retry.\n */\n delayMs?: (attempt: number) => number\n /**\n * Maximum total attempts, including the first request.\n *\n * @default 3\n */\n maxAttempts?: number\n /**\n * Overrides the retry classifier.\n */\n shouldRetry?: (error: unknown) => boolean\n /**\n * Overrides the sleeper used between attempts.\n */\n sleep?: (milliseconds: number) => Promise<void>\n}\n\nconst retryableStatusCodes = new Set([408, 425, 429, 500, 502, 503, 504])\nconst retryableErrorNames = new Set(['FetchError', 'TimeoutError'])\nconst retryableMessagePatterns = [\n /rate limit/i,\n /rate-limited/i,\n /temporarily unavailable/i,\n /service unavailable/i,\n /server error/i,\n /fetch failed/i,\n /network error/i,\n /socket hang up/i,\n /econnreset/i,\n /econnrefused/i,\n /eai_again/i,\n /etimedout/i,\n /timed out/i,\n /timeout/i,\n]\n\nexport function createRetryPolicy(options: RetryPolicyOptions = {}): RetryPolicy {\n const maxAttempts = assertValidMaxAttempts(options.maxAttempts ?? 3)\n\n return {\n delayMs: options.delayMs ?? defaultDelayMs,\n maxAttempts,\n shouldRetry: options.shouldRetry ?? isRetriableProviderError,\n sleep: options.sleep ?? defaultSleep,\n }\n}\n\n/**\n * Returns true when a provider failure is temporary and a retry is reasonable.\n *\n * Use when:\n * - the upstream failure is a transport problem or a 5xx/429 response\n *\n * Expects:\n * - provider errors to expose a status code, name, or message when possible\n */\nexport function isRetriableProviderError(error: unknown): boolean {\n const statusCode = getStatusCode(error)\n\n if (statusCode != null) {\n return retryableStatusCodes.has(statusCode)\n }\n\n const errorName = errorNameFrom(error)\n if (errorName != null && retryableErrorNames.has(errorName)) {\n return true\n }\n\n const errorMessage = errorMessageFrom(error)\n if (errorMessage == null) {\n return false\n }\n\n return retryableMessagePatterns.some(pattern => pattern.test(errorMessage))\n}\n\n/**\n * Runs an operation with bounded retries.\n *\n * Use when:\n * - you are calling an LLM provider or other temporary upstream dependency\n * - non-retriable failures should bubble immediately\n *\n * Expects:\n * - the operation to be idempotent across attempts\n */\nexport async function runWithRetry<T>(operation: () => Promise<T>, policy: RetryPolicy = createRetryPolicy()): Promise<T> {\n for (let attempt = 1; attempt <= policy.maxAttempts; attempt += 1) {\n try {\n return await operation()\n }\n catch (error) {\n if (attempt >= policy.maxAttempts || !policy.shouldRetry(error)) {\n throw error\n }\n\n const delayMilliseconds = policy.delayMs(attempt)\n if (delayMilliseconds > 0) {\n await policy.sleep(delayMilliseconds)\n }\n }\n }\n\n throw new Error('Retry loop exited without returning a value.')\n}\n\n/**\n * Creates a retry policy for provider work.\n *\n * Use when:\n * - you need a reusable retry runner for eval-time provider calls\n * - you want to keep retry behavior deterministic in tests\n *\n * Expects:\n * - callers to treat `maxAttempts` as total attempts, not retries\n *\n * Throws:\n * - `RangeError` when `maxAttempts` is not a finite integer greater than or equal to `1`\n */\nfunction assertValidMaxAttempts(value: number): number {\n if (!Number.isFinite(value) || !Number.isInteger(value) || value < 1) {\n throw new RangeError('maxAttempts must be a finite integer greater than or equal to 1.')\n }\n\n return value\n}\n\nfunction defaultDelayMs(attempt: number): number {\n return 500 * 2 ** (attempt - 1)\n}\n\nfunction getStatusCode(error: unknown): number | undefined {\n if (error == null || typeof error !== 'object') {\n return undefined\n }\n\n const maybeStatusCode = (error as { statusCode?: unknown }).statusCode\n if (typeof maybeStatusCode === 'number') {\n return maybeStatusCode\n }\n\n const maybeStatus = (error as { status?: unknown }).status\n if (typeof maybeStatus === 'number') {\n return maybeStatus\n }\n\n const response = (error as { response?: unknown }).response\n if (response == null || typeof response !== 'object') {\n return undefined\n }\n\n const responseStatus = (response as { status?: unknown }).status\n return typeof responseStatus === 'number' ? responseStatus : undefined\n}\n","import type { RetryPolicy, RetryPolicyOptions } from './retry-policy'\n\nimport { createRetryPolicy, runWithRetry } from './retry-policy'\n\n/**\n * Bundles a provider with the retry policy used to call it.\n *\n * Use when:\n * - a provider instance should travel with the retry runner that governs it\n * - you want call sites to share one retry configuration object\n */\nexport interface ProviderAdapter<TProvider> {\n /**\n * The underlying provider instance.\n */\n provider: TProvider\n /**\n * The retry policy used for provider calls.\n */\n retryPolicy: RetryPolicy\n /**\n * Runs a provider-dependent operation with the adapter retry policy.\n */\n runWithRetry: <TResult>(operation: () => Promise<TResult>) => Promise<TResult>\n}\n\n/**\n * Creates a provider adapter with the default retry policy.\n *\n * Use when:\n * - you have a provider instance and want a consistent retry wrapper\n *\n * Expects:\n * - the provider to be safe to reuse across attempts\n */\nexport function createProviderAdapter<TProvider>(provider: TProvider, options: RetryPolicyOptions = {}): ProviderAdapter<TProvider> {\n const retryPolicy = createRetryPolicy(options)\n\n return {\n provider,\n retryPolicy,\n runWithRetry: operation => runWithRetry(operation, retryPolicy),\n }\n}\n","import type { ProviderAdapter } from '../../adapters'\nimport type { RetryPolicyOptions } from '../../retry-policy'\n\nimport process from 'node:process'\n\nimport { createOpenAI } from '@xsai-ext/providers/create'\n\nimport { createProviderAdapter } from '../../adapters'\nimport { envFrom, requiredEnvFrom } from '../../env'\n\n/**\n * Configures env key names and source for OpenAI provider setup.\n */\nexport interface OpenAIEnvSourceOptions {\n /**\n * Env key name for API key.\n *\n * @default 'OPENAI_API_KEY'\n */\n apiKey?: string\n /**\n * Env key name for base URL.\n *\n * @default 'OPENAI_BASE_URL'\n */\n baseURL?: string\n /**\n * Environment object used for variable lookup.\n *\n * @default process.env\n */\n env?: NodeJS.ProcessEnv\n /**\n * Env key name for model.\n *\n * @default 'OPENAI_MODEL'\n */\n model?: string\n}\n\n/**\n * Configures fallback defaults when env values are missing.\n */\nexport interface OpenAIFromEnvDefaultOptions {\n /**\n * API key fallback value.\n */\n apiKey?: string\n /**\n * Base URL fallback value.\n */\n baseURL?: string\n /**\n * Model fallback value.\n */\n model?: string\n /**\n * Retry policy override passed to provider adapter.\n */\n retryOptions?: RetryPolicyOptions\n}\n\n/**\n * Result produced by `createOpenAIFromEnv`.\n */\nexport interface OpenAIFromEnvResult {\n adapter: OpenAIProviderAdapter\n apiKey: string\n baseURL?: string\n model: string\n}\n\n/**\n * Represents the OpenAI provider instance returned by xsai.\n */\nexport type OpenAIProvider = ReturnType<typeof createOpenAI>\n\n/**\n * Represents the OpenAI adapter used by vieval.\n */\nexport type OpenAIProviderAdapter = ProviderAdapter<OpenAIProvider>\n\n/**\n * Minimal response shape returned by text-generation calls.\n */\nexport interface OpenAITextGenerationResult {\n /**\n * Text output from the provider.\n *\n * Some OpenAI-compatible implementations may return `null`.\n */\n text?: null | string\n}\n\n/**\n * Creates an OpenAI provider adapter using environment variables with defaults.\n *\n * Example:\n * `const runtime = createOpenAIFromEnv({}, { model: 'gpt-4.1-mini' })`\n */\nexport function createOpenAIFromEnv(\n source: OpenAIEnvSourceOptions = {},\n defaults: OpenAIFromEnvDefaultOptions = {},\n): OpenAIFromEnvResult {\n const env = source.env ?? process.env\n const apiKeyEnvKey = source.apiKey ?? 'OPENAI_API_KEY'\n const baseURLEnvKey = source.baseURL ?? 'OPENAI_BASE_URL'\n const modelEnvKey = source.model ?? 'OPENAI_MODEL'\n\n const envWithDefaults = {\n ...(defaults.apiKey == null ? {} : { [apiKeyEnvKey]: defaults.apiKey }),\n ...(defaults.baseURL == null ? {} : { [baseURLEnvKey]: defaults.baseURL }),\n ...(defaults.model == null ? {} : { [modelEnvKey]: defaults.model }),\n ...env,\n }\n\n const apiKey = requiredEnvFrom(envWithDefaults, {\n name: apiKeyEnvKey,\n type: 'string',\n })\n const model = requiredEnvFrom(envWithDefaults, {\n name: modelEnvKey,\n type: 'string',\n })\n const baseURL = envFrom(envWithDefaults, {\n name: baseURLEnvKey,\n type: 'string',\n })\n const adapter = createOpenAIProviderAdapter(apiKey, baseURL, defaults.retryOptions)\n\n return {\n adapter,\n apiKey,\n baseURL,\n model,\n }\n}\n\n/**\n * Creates an OpenAI provider adapter for eval-time requests.\n *\n * Use when:\n * - an eval needs the OpenAI SDK surface plus the shared retry runner\n *\n * Expects:\n * - `apiKey` and `baseURL` to point at an OpenAI-compatible endpoint\n * - `retryOptions` to follow the same invariants as `createRetryPolicy`\n */\nexport function createOpenAIProviderAdapter(apiKey: string, baseURL?: string, retryOptions: RetryPolicyOptions = {}): OpenAIProviderAdapter {\n return createProviderAdapter(createOpenAI(apiKey, baseURL), retryOptions)\n}\n\n/**\n * Normalizes provider text output to a safe string.\n *\n * Before: `{ text: null }`\n * After: `''`\n *\n * Before: `{ text: 'hello' }`\n * After: `'hello'`\n */\nexport function normalizeOpenAITextOutput(result: OpenAITextGenerationResult): string {\n return typeof result.text === 'string' ? result.text : ''\n}\n"],"mappings":"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"}
|
|
@@ -1,19 +1,6 @@
|
|
|
1
|
-
import { K as AggregatedRunResults } from "../../../index-
|
|
1
|
+
import { K as AggregatedRunResults } from "../../../index-BLIlhiWT.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/core/processors/results/policies/hybrid-threshold.d.ts
|
|
4
|
-
/**
|
|
5
|
-
* Violation emitted when result policies fail.
|
|
6
|
-
*/
|
|
7
|
-
interface ResultPolicyViolation {
|
|
8
|
-
/**
|
|
9
|
-
* Stable policy id.
|
|
10
|
-
*/
|
|
11
|
-
policyId: string;
|
|
12
|
-
/**
|
|
13
|
-
* Human-readable violation reason.
|
|
14
|
-
*/
|
|
15
|
-
reason: string;
|
|
16
|
-
}
|
|
17
4
|
/**
|
|
18
5
|
* Configures hybrid-threshold policy behavior.
|
|
19
6
|
*/
|
|
@@ -31,6 +18,19 @@ interface HybridThresholdPolicyOptions {
|
|
|
31
18
|
*/
|
|
32
19
|
minProviderHybridScore?: number;
|
|
33
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Violation emitted when result policies fail.
|
|
23
|
+
*/
|
|
24
|
+
interface ResultPolicyViolation {
|
|
25
|
+
/**
|
|
26
|
+
* Stable policy id.
|
|
27
|
+
*/
|
|
28
|
+
policyId: string;
|
|
29
|
+
/**
|
|
30
|
+
* Human-readable violation reason.
|
|
31
|
+
*/
|
|
32
|
+
reason: string;
|
|
33
|
+
}
|
|
34
34
|
//#endregion
|
|
35
35
|
//#region src/core/processors/results/policies/max-failed-runs.d.ts
|
|
36
36
|
/**
|
|
@@ -56,14 +56,14 @@ interface MaxFailedRunsPolicyOptions {
|
|
|
56
56
|
* Configures result-processing policies for eval gating.
|
|
57
57
|
*/
|
|
58
58
|
interface ProcessRunResultsOptions {
|
|
59
|
-
/**
|
|
60
|
-
* Threshold policy options.
|
|
61
|
-
*/
|
|
62
|
-
threshold?: HybridThresholdPolicyOptions;
|
|
63
59
|
/**
|
|
64
60
|
* Hard-limit failed-run policy options.
|
|
65
61
|
*/
|
|
66
62
|
maxFailedRuns?: MaxFailedRunsPolicyOptions;
|
|
63
|
+
/**
|
|
64
|
+
* Threshold policy options.
|
|
65
|
+
*/
|
|
66
|
+
threshold?: HybridThresholdPolicyOptions;
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Final gate decision returned by result processors.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/core/processors/results/policies/hybrid-threshold.ts","../../../../src/core/processors/results/policies/max-failed-runs.ts","../../../../src/core/processors/results/index.ts"],"sourcesContent":["import type { AggregatedRunResults } from '../../../runner/aggregate'\n\n/**\n *
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../../src/core/processors/results/policies/hybrid-threshold.ts","../../../../src/core/processors/results/policies/max-failed-runs.ts","../../../../src/core/processors/results/index.ts"],"sourcesContent":["import type { AggregatedRunResults } from '../../../runner/aggregate'\n\n/**\n * Configures hybrid-threshold policy behavior.\n */\nexport interface HybridThresholdPolicyOptions {\n /**\n * Minimum required overall hybrid score.\n *\n * @default 0.7\n */\n minOverallHybridScore?: number\n /**\n * Minimum required inferenceExecutor hybrid score.\n *\n * @default 0.6\n */\n minProviderHybridScore?: number\n}\n\n/**\n * Violation emitted when result policies fail.\n */\nexport interface ResultPolicyViolation {\n /**\n * Stable policy id.\n */\n policyId: string\n /**\n * Human-readable violation reason.\n */\n reason: string\n}\n\n/**\n * Evaluates threshold policy against aggregated results.\n */\nexport function evaluateHybridThresholdPolicy(\n results: AggregatedRunResults,\n options: HybridThresholdPolicyOptions = {},\n): ResultPolicyViolation[] {\n const minOverallHybridScore = options.minOverallHybridScore ?? 0.7\n const minProviderHybridScore = options.minProviderHybridScore ?? 0.6\n\n const violations: ResultPolicyViolation[] = []\n\n const overallHybridAverage = results.overall.hybridAverage\n if (overallHybridAverage == null || overallHybridAverage < minOverallHybridScore) {\n violations.push({\n policyId: 'threshold:overall-hybrid',\n reason: `Overall hybrid average ${overallHybridAverage ?? 'null'} is below ${minOverallHybridScore}.`,\n })\n }\n\n for (const inferenceExecutor of results.inferenceExecutors) {\n if (inferenceExecutor.hybridAverage == null || inferenceExecutor.hybridAverage < minProviderHybridScore) {\n violations.push({\n policyId: 'threshold:inferenceExecutor-hybrid',\n reason: `Provider ${inferenceExecutor.inferenceExecutorId} hybrid average ${inferenceExecutor.hybridAverage ?? 'null'} is below ${minProviderHybridScore}.`,\n })\n }\n }\n\n return violations\n}\n","import type { AggregatedRunResults } from '../../../runner/aggregate'\nimport type { ResultPolicyViolation } from './hybrid-threshold'\n\n/**\n * Configures hard-limit policy for failed runs.\n */\nexport interface MaxFailedRunsPolicyOptions {\n /**\n * Maximum allowed failed run count.\n *\n * @default 0\n */\n maxFailedRuns?: number\n /**\n * Hybrid score threshold below which a run counts as failed.\n *\n * @default 0.6\n */\n minRunHybridScore?: number\n}\n\n/**\n * Evaluates hard-limit policy for failed runs.\n */\nexport function evaluateMaxFailedRunsPolicy(\n results: AggregatedRunResults,\n options: MaxFailedRunsPolicyOptions = {},\n): ResultPolicyViolation[] {\n const maxFailedRuns = options.maxFailedRuns ?? 0\n const minRunHybridScore = options.minRunHybridScore ?? 0.6\n\n const failedRuns = results.runs.filter((run) => {\n if (run.hybridAverage == null) {\n return true\n }\n\n return run.hybridAverage < minRunHybridScore\n })\n\n if (failedRuns.length <= maxFailedRuns) {\n return []\n }\n\n return [{\n policyId: 'hard-limit:max-failed-runs',\n reason: `Failed runs ${failedRuns.length} exceed maxFailedRuns ${maxFailedRuns} with minRunHybridScore ${minRunHybridScore}.`,\n }]\n}\n","import type { AggregatedRunResults } from '../../runner/aggregate'\nimport type { HybridThresholdPolicyOptions, ResultPolicyViolation } from './policies/hybrid-threshold'\nimport type { MaxFailedRunsPolicyOptions } from './policies/max-failed-runs'\n\nimport { evaluateHybridThresholdPolicy } from './policies/hybrid-threshold'\nimport { evaluateMaxFailedRunsPolicy } from './policies/max-failed-runs'\n\n/**\n * Configures result-processing policies for eval gating.\n */\nexport interface ProcessRunResultsOptions {\n /**\n * Hard-limit failed-run policy options.\n */\n maxFailedRuns?: MaxFailedRunsPolicyOptions\n /**\n * Threshold policy options.\n */\n threshold?: HybridThresholdPolicyOptions\n}\n\n/**\n * Final gate decision returned by result processors.\n */\nexport interface ResultGateDecision {\n /**\n * Whether the result batch passes all policies.\n */\n pass: boolean\n /**\n * Collected policy violations.\n */\n violations: ResultPolicyViolation[]\n}\n\n/**\n * Processes aggregated run results through built-in gating policies.\n *\n * Call stack:\n *\n * {@link runScheduledTasks}\n * -> {@link aggregateRunResults}\n * -> {@link processRunResults}\n * -> {@link evaluateHybridThresholdPolicy}\n * -> {@link evaluateMaxFailedRunsPolicy}\n * -> {@link ResultGateDecision}\n */\nexport function processRunResults(\n results: AggregatedRunResults,\n options: ProcessRunResultsOptions = {},\n): ResultGateDecision {\n const thresholdViolations = evaluateHybridThresholdPolicy(results, options.threshold)\n const maxFailedRunsViolations = evaluateMaxFailedRunsPolicy(results, options.maxFailedRuns)\n\n const violations = [\n ...thresholdViolations,\n ...maxFailedRunsViolations,\n ]\n\n return {\n pass: violations.length === 0,\n violations,\n }\n}\n\nexport type {\n HybridThresholdPolicyOptions,\n MaxFailedRunsPolicyOptions,\n ResultPolicyViolation,\n}\n"],"mappings":";;;;AAqCA,SAAgB,8BACd,SACA,UAAwC,CAAC,GAChB;CACzB,MAAM,wBAAwB,QAAQ,yBAAyB;CAC/D,MAAM,yBAAyB,QAAQ,0BAA0B;CAEjE,MAAM,aAAsC,CAAC;CAE7C,MAAM,uBAAuB,QAAQ,QAAQ;CAC7C,IAAI,wBAAwB,QAAQ,uBAAuB,uBACzD,WAAW,KAAK;EACd,UAAU;EACV,QAAQ,0BAA0B,wBAAwB,OAAO,YAAY,sBAAsB;CACrG,CAAC;CAGH,KAAK,MAAM,qBAAqB,QAAQ,oBACtC,IAAI,kBAAkB,iBAAiB,QAAQ,kBAAkB,gBAAgB,wBAC/E,WAAW,KAAK;EACd,UAAU;EACV,QAAQ,YAAY,kBAAkB,oBAAoB,kBAAkB,kBAAkB,iBAAiB,OAAO,YAAY,uBAAuB;CAC3J,CAAC;CAIL,OAAO;AACT;;;;;;ACxCA,SAAgB,4BACd,SACA,UAAsC,CAAC,GACd;CACzB,MAAM,gBAAgB,QAAQ,iBAAiB;CAC/C,MAAM,oBAAoB,QAAQ,qBAAqB;CAEvD,MAAM,aAAa,QAAQ,KAAK,QAAQ,QAAQ;EAC9C,IAAI,IAAI,iBAAiB,MACvB,OAAO;EAGT,OAAO,IAAI,gBAAgB;CAC7B,CAAC;CAED,IAAI,WAAW,UAAU,eACvB,OAAO,CAAC;CAGV,OAAO,CAAC;EACN,UAAU;EACV,QAAQ,eAAe,WAAW,OAAO,wBAAwB,cAAc,0BAA0B,kBAAkB;CAC7H,CAAC;AACH;;;;;;;;;;;;;;;ACAA,SAAgB,kBACd,SACA,UAAoC,CAAC,GACjB;CACpB,MAAM,sBAAsB,8BAA8B,SAAS,QAAQ,SAAS;CACpF,MAAM,0BAA0B,4BAA4B,SAAS,QAAQ,aAAa;CAE1F,MAAM,aAAa,CACjB,GAAG,qBACH,GAAG,uBACL;CAEA,OAAO;EACL,MAAM,WAAW,WAAW;EAC5B;CACF;AACF"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as InferenceExecutor, A as RunScheduledTasksOptions, B as asProjectRelativePath, F as CreateTaskExecutionContextOptions, G as AggregatedProviderSummary, H as CreateVievalRunnerRuntimeContextOptions, I as TaskExecutionContext, J as RunResult, K as AggregatedRunResults, L as createTaskExecutionContext, M as RunnerTaskState, N as ScheduledTaskExecutor, P as runScheduledTasks, Q as CreateRunnerScheduleOptions, U as RunnerRuntimeContext, V as collectEvalEntries, W as createRunnerRuntimeContext, X as RunScoreKind, Y as RunScore, Z as aggregateRunResults, at as ScheduledTaskMatrixMeta, ct as createFilesystemTaskCacheRuntime, dt as CacheFileOptions, et as RunnerMatrixDefinition, ft as CacheNamespace, it as ScheduledTaskMatrix, j as RunnerExecutionError, lt as normalizeCacheFilePathSegments, nt as RunnerMatrixSelection, ot as createRunnerSchedule, pt as TaskCacheRuntime, q as AggregatedRunSummary, rt as ScheduledTask, st as CreateFilesystemTaskCacheRuntimeOptions, tt as RunnerMatrixInput, ut as CacheFileHandle } from "../../index-
|
|
2
|
-
import { a as SchedulerMiddleware, c as SchedulerScopeContext, i as SchedulerConcurrencyConfig, n as getActiveScopes, o as SchedulerRuntime, r as CreateSchedulerRuntimeOptions, s as SchedulerScope, t as createSchedulerRuntime } from "../../index-
|
|
1
|
+
import { $ as InferenceExecutor, A as RunScheduledTasksOptions, B as asProjectRelativePath, F as CreateTaskExecutionContextOptions, G as AggregatedProviderSummary, H as CreateVievalRunnerRuntimeContextOptions, I as TaskExecutionContext, J as RunResult, K as AggregatedRunResults, L as createTaskExecutionContext, M as RunnerTaskState, N as ScheduledTaskExecutor, P as runScheduledTasks, Q as CreateRunnerScheduleOptions, U as RunnerRuntimeContext, V as collectEvalEntries, W as createRunnerRuntimeContext, X as RunScoreKind, Y as RunScore, Z as aggregateRunResults, at as ScheduledTaskMatrixMeta, ct as createFilesystemTaskCacheRuntime, dt as CacheFileOptions, et as RunnerMatrixDefinition, ft as CacheNamespace, it as ScheduledTaskMatrix, j as RunnerExecutionError, lt as normalizeCacheFilePathSegments, nt as RunnerMatrixSelection, ot as createRunnerSchedule, pt as TaskCacheRuntime, q as AggregatedRunSummary, rt as ScheduledTask, st as CreateFilesystemTaskCacheRuntimeOptions, tt as RunnerMatrixInput, ut as CacheFileHandle } from "../../index-BLIlhiWT.mjs";
|
|
2
|
+
import { a as SchedulerMiddleware, c as SchedulerScopeContext, i as SchedulerConcurrencyConfig, n as getActiveScopes, o as SchedulerRuntime, r as CreateSchedulerRuntimeOptions, s as SchedulerScope, t as createSchedulerRuntime } from "../../index-CIaJClcC.mjs";
|
|
3
3
|
export { AggregatedProviderSummary, AggregatedRunResults, AggregatedRunSummary, CacheFileHandle, CacheFileOptions, CacheNamespace, CreateFilesystemTaskCacheRuntimeOptions, CreateRunnerScheduleOptions, CreateSchedulerRuntimeOptions, CreateTaskExecutionContextOptions, CreateVievalRunnerRuntimeContextOptions, InferenceExecutor, RunResult, RunScheduledTasksOptions, RunScore, RunScoreKind, RunnerExecutionError, RunnerMatrixDefinition, RunnerMatrixInput, RunnerMatrixSelection, RunnerRuntimeContext, RunnerTaskState, ScheduledTask, ScheduledTaskExecutor, ScheduledTaskMatrix, ScheduledTaskMatrixMeta, SchedulerConcurrencyConfig, SchedulerMiddleware, SchedulerRuntime, SchedulerScope, SchedulerScopeContext, TaskCacheRuntime, TaskExecutionContext, aggregateRunResults, asProjectRelativePath, collectEvalEntries, createFilesystemTaskCacheRuntime, createRunnerRuntimeContext, createRunnerSchedule, createSchedulerRuntime, createTaskExecutionContext, getActiveScopes, normalizeCacheFilePathSegments, runScheduledTasks };
|