@agentv/core 4.6.1 → 4.7.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.
@@ -219,15 +219,13 @@ import path2 from "node:path";
219
219
  import { z } from "zod";
220
220
  var CliHealthcheckHttpInputSchema = z.object({
221
221
  url: z.string().min(1, "healthcheck URL is required"),
222
- timeout_seconds: z.number().positive().optional(),
223
- timeoutSeconds: z.number().positive().optional()
224
- });
222
+ timeout_seconds: z.number().positive().optional()
223
+ }).passthrough();
225
224
  var CliHealthcheckCommandInputSchema = z.object({
226
225
  command: z.string().min(1, "healthcheck command is required"),
227
226
  cwd: z.string().optional(),
228
- timeout_seconds: z.number().positive().optional(),
229
- timeoutSeconds: z.number().positive().optional()
230
- });
227
+ timeout_seconds: z.number().positive().optional()
228
+ }).passthrough();
231
229
  var CliHealthcheckInputSchema = z.union([
232
230
  CliHealthcheckHttpInputSchema,
233
231
  CliHealthcheckCommandInputSchema
@@ -239,36 +237,28 @@ var CliTargetInputSchema = z.object({
239
237
  command: z.string(),
240
238
  // Files format - optional
241
239
  files_format: z.string().optional(),
242
- filesFormat: z.string().optional(),
243
240
  attachments_format: z.string().optional(),
244
- attachmentsFormat: z.string().optional(),
245
241
  // Working directory - optional
246
242
  cwd: z.string().optional(),
247
243
  // Workspace template directory - optional (mutually exclusive with cwd)
248
244
  workspace_template: z.string().optional(),
249
- workspaceTemplate: z.string().optional(),
250
245
  // Timeout in seconds - optional
251
246
  timeout_seconds: z.number().positive().optional(),
252
- timeoutSeconds: z.number().positive().optional(),
253
247
  // Healthcheck configuration - optional
254
248
  healthcheck: CliHealthcheckInputSchema.optional(),
255
249
  // Verbose mode - optional
256
250
  verbose: z.boolean().optional(),
257
251
  cli_verbose: z.boolean().optional(),
258
- cliVerbose: z.boolean().optional(),
259
252
  // Keep temp files - optional
260
253
  keep_temp_files: z.boolean().optional(),
261
- keepTempFiles: z.boolean().optional(),
262
254
  keep_output_files: z.boolean().optional(),
263
- keepOutputFiles: z.boolean().optional(),
264
255
  // Common target fields
265
256
  grader_target: z.string().optional(),
266
257
  judge_target: z.string().optional(),
267
258
  // backward compat
268
259
  workers: z.number().int().min(1).optional(),
269
- provider_batching: z.boolean().optional(),
270
- providerBatching: z.boolean().optional()
271
- });
260
+ provider_batching: z.boolean().optional()
261
+ }).passthrough();
272
262
  var CliHealthcheckHttpSchema = z.object({
273
263
  url: z.string().min(1),
274
264
  timeoutMs: z.number().positive().optional()
@@ -293,7 +283,7 @@ var CliTargetConfigSchema = z.object({
293
283
  keepTempFiles: z.boolean().optional()
294
284
  }).strict();
295
285
  function normalizeCliHealthcheck(input, env, targetName, evalFilePath) {
296
- const timeoutSeconds = input.timeout_seconds ?? input.timeoutSeconds;
286
+ const timeoutSeconds = input.timeout_seconds;
297
287
  const timeoutMs = timeoutSeconds !== void 0 ? Math.floor(timeoutSeconds * 1e3) : void 0;
298
288
  if ("url" in input && input.url) {
299
289
  const url = resolveString(input.url, env, `${targetName} healthcheck URL`);
@@ -327,9 +317,9 @@ function normalizeCliHealthcheck(input, env, targetName, evalFilePath) {
327
317
  function normalizeCliTargetInput(input, env, evalFilePath) {
328
318
  const targetName = input.name;
329
319
  const command = resolveString(input.command, env, `${targetName} CLI command`, true);
330
- const filesFormatSource = input.files_format ?? input.filesFormat ?? input.attachments_format ?? input.attachmentsFormat;
320
+ const filesFormatSource = input.files_format ?? input.attachments_format;
331
321
  const filesFormat = resolveOptionalLiteralString(filesFormatSource);
332
- const workspaceTemplateSource = input.workspace_template ?? input.workspaceTemplate;
322
+ const workspaceTemplateSource = input.workspace_template;
333
323
  let workspaceTemplate = resolveOptionalString(
334
324
  workspaceTemplateSource,
335
325
  env,
@@ -357,12 +347,10 @@ function normalizeCliTargetInput(input, env, evalFilePath) {
357
347
  if (!cwd && !workspaceTemplate && evalFilePath) {
358
348
  cwd = path2.dirname(path2.resolve(evalFilePath));
359
349
  }
360
- const timeoutSeconds = input.timeout_seconds ?? input.timeoutSeconds;
350
+ const timeoutSeconds = input.timeout_seconds;
361
351
  const timeoutMs = timeoutSeconds !== void 0 ? Math.floor(timeoutSeconds * 1e3) : void 0;
362
- const verbose = resolveOptionalBoolean(input.verbose ?? input.cli_verbose ?? input.cliVerbose);
363
- const keepTempFiles = resolveOptionalBoolean(
364
- input.keep_temp_files ?? input.keepTempFiles ?? input.keep_output_files ?? input.keepOutputFiles
365
- );
352
+ const verbose = resolveOptionalBoolean(input.verbose ?? input.cli_verbose);
353
+ const keepTempFiles = resolveOptionalBoolean(input.keep_temp_files ?? input.keep_output_files);
366
354
  const healthcheck = input.healthcheck ? normalizeCliHealthcheck(input.healthcheck, env, targetName, evalFilePath) : void 0;
367
355
  return {
368
356
  command,
@@ -383,14 +371,104 @@ var CLI_PLACEHOLDERS = /* @__PURE__ */ new Set([
383
371
  "FILES",
384
372
  "OUTPUT_FILE"
385
373
  ]);
374
+ var DEPRECATED_TARGET_CAMEL_CASE_FIELDS = /* @__PURE__ */ new Map([
375
+ ["providerBatching", "provider_batching"],
376
+ ["subagentModeAllowed", "subagent_mode_allowed"],
377
+ ["fallbackTargets", "fallback_targets"],
378
+ ["resourceName", "endpoint"],
379
+ ["baseUrl", "base_url"],
380
+ ["apiKey", "api_key"],
381
+ ["deploymentName", "model"],
382
+ ["thinkingBudget", "thinking_budget"],
383
+ ["maxTokens", "max_output_tokens"],
384
+ ["apiFormat", "api_format"],
385
+ ["timeoutSeconds", "timeout_seconds"],
386
+ ["logDir", "log_dir"],
387
+ ["logDirectory", "log_directory"],
388
+ ["logFormat", "log_format"],
389
+ ["logOutputFormat", "log_output_format"],
390
+ ["systemPrompt", "system_prompt"],
391
+ ["maxTurns", "max_turns"],
392
+ ["maxBudgetUsd", "max_budget_usd"],
393
+ ["dryRun", "dry_run"],
394
+ ["subagentRoot", "subagent_root"],
395
+ ["filesFormat", "files_format"],
396
+ ["attachmentsFormat", "attachments_format"],
397
+ ["cliUrl", "cli_url"],
398
+ ["cliPath", "cli_path"],
399
+ ["githubToken", "github_token"],
400
+ ["sessionDir", "session_dir"],
401
+ ["sessionId", "session_id"],
402
+ ["sessionStateDir", "session_state_dir"],
403
+ ["maxRetries", "max_retries"],
404
+ ["retryInitialDelayMs", "retry_initial_delay_ms"],
405
+ ["retryMaxDelayMs", "retry_max_delay_ms"],
406
+ ["retryBackoffFactor", "retry_backoff_factor"],
407
+ ["retryStatusCodes", "retry_status_codes"]
408
+ ]);
409
+ var DEPRECATED_HEALTHCHECK_CAMEL_CASE_FIELDS = /* @__PURE__ */ new Map([
410
+ ["timeoutSeconds", "timeout_seconds"]
411
+ ]);
412
+ function collectDeprecatedCamelCaseWarnings(value, location, aliases) {
413
+ if (typeof value !== "object" || value === null || Array.isArray(value)) {
414
+ return [];
415
+ }
416
+ const warnings = [];
417
+ for (const [camelCaseField, snakeCaseField] of aliases) {
418
+ if (Object.prototype.hasOwnProperty.call(value, camelCaseField)) {
419
+ warnings.push({
420
+ location: `${location}.${camelCaseField}`,
421
+ message: `camelCase field '${camelCaseField}' is no longer supported in targets.yaml. Use '${snakeCaseField}' instead.`
422
+ });
423
+ }
424
+ }
425
+ return warnings;
426
+ }
427
+ function assertNoDeprecatedCamelCaseTargetFields(definition) {
428
+ if (Object.prototype.hasOwnProperty.call(definition, "workspaceTemplate")) {
429
+ throw new Error(
430
+ `${definition.name}: target-level workspace_template has been removed. Use eval-level workspace.template.`
431
+ );
432
+ }
433
+ const warning = findDeprecatedCamelCaseTargetWarnings(
434
+ definition,
435
+ `target "${definition.name}"`
436
+ )[0];
437
+ if (!warning) {
438
+ return;
439
+ }
440
+ const fieldMatch = warning.message.match(/field '([^']+)'/);
441
+ const replacementMatch = warning.message.match(/Use '([^']+)' instead/);
442
+ const field = fieldMatch?.[1] ?? "unknown";
443
+ const replacement = replacementMatch?.[1] ?? "snake_case";
444
+ throw new Error(
445
+ `${warning.location}: camelCase field '${field}' is no longer supported in targets.yaml. Use '${replacement}' instead.`
446
+ );
447
+ }
448
+ function findDeprecatedCamelCaseTargetWarnings(target, location) {
449
+ const warnings = collectDeprecatedCamelCaseWarnings(
450
+ target,
451
+ location,
452
+ DEPRECATED_TARGET_CAMEL_CASE_FIELDS
453
+ );
454
+ if (typeof target !== "object" || target === null || Array.isArray(target)) {
455
+ return warnings;
456
+ }
457
+ const healthcheck = target.healthcheck;
458
+ warnings.push(
459
+ ...collectDeprecatedCamelCaseWarnings(
460
+ healthcheck,
461
+ `${location}.healthcheck`,
462
+ DEPRECATED_HEALTHCHECK_CAMEL_CASE_FIELDS
463
+ )
464
+ );
465
+ return warnings;
466
+ }
386
467
  var COMMON_TARGET_SETTINGS = [
387
468
  "use_target",
388
469
  "provider_batching",
389
- "providerBatching",
390
470
  "subagent_mode_allowed",
391
- "subagentModeAllowed",
392
- "fallback_targets",
393
- "fallbackTargets"
471
+ "fallback_targets"
394
472
  ];
395
473
  var USE_TARGET_ENV_PATTERN = /^\$\{\{\s*([A-Z0-9_]+)\s*\}\}$/i;
396
474
  var BASE_TARGET_SCHEMA = z.object({
@@ -402,43 +480,40 @@ var BASE_TARGET_SCHEMA = z.object({
402
480
  // backward compat
403
481
  workers: z.number().int().min(1).optional(),
404
482
  workspace_template: z.string().optional(),
405
- workspaceTemplate: z.string().optional(),
406
483
  subagent_mode_allowed: z.boolean().optional(),
407
- fallback_targets: z.array(z.string().min(1)).optional(),
408
- fallbackTargets: z.array(z.string().min(1)).optional()
484
+ fallback_targets: z.array(z.string().min(1)).optional()
409
485
  }).passthrough();
410
486
  var DEFAULT_AZURE_API_VERSION = "2024-12-01-preview";
487
+ var DEFAULT_AZURE_RESPONSES_API_VERSION = "v1";
411
488
  var DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";
412
- function normalizeAzureApiVersion(value) {
489
+ function normalizeAzureApiVersion(value, apiFormat) {
490
+ const defaultVersion = apiFormat === "responses" ? DEFAULT_AZURE_RESPONSES_API_VERSION : DEFAULT_AZURE_API_VERSION;
413
491
  if (!value) {
414
- return DEFAULT_AZURE_API_VERSION;
492
+ return defaultVersion;
415
493
  }
416
494
  const trimmed = value.trim();
417
495
  if (trimmed.length === 0) {
418
- return DEFAULT_AZURE_API_VERSION;
496
+ return defaultVersion;
419
497
  }
420
498
  const withoutPrefix = trimmed.replace(/^api[-_]?version\s*=\s*/i, "").trim();
421
- return withoutPrefix.length > 0 ? withoutPrefix : DEFAULT_AZURE_API_VERSION;
499
+ return withoutPrefix.length > 0 ? withoutPrefix : defaultVersion;
422
500
  }
423
501
  function resolveRetryConfig(target) {
424
- const maxRetries = resolveOptionalNumber(
425
- target.max_retries ?? target.maxRetries,
426
- `${target.name} max retries`
427
- );
502
+ const maxRetries = resolveOptionalNumber(target.max_retries, `${target.name} max retries`);
428
503
  const initialDelayMs = resolveOptionalNumber(
429
- target.retry_initial_delay_ms ?? target.retryInitialDelayMs,
504
+ target.retry_initial_delay_ms,
430
505
  `${target.name} retry initial delay`
431
506
  );
432
507
  const maxDelayMs = resolveOptionalNumber(
433
- target.retry_max_delay_ms ?? target.retryMaxDelayMs,
508
+ target.retry_max_delay_ms,
434
509
  `${target.name} retry max delay`
435
510
  );
436
511
  const backoffFactor = resolveOptionalNumber(
437
- target.retry_backoff_factor ?? target.retryBackoffFactor,
512
+ target.retry_backoff_factor,
438
513
  `${target.name} retry backoff factor`
439
514
  );
440
515
  const retryableStatusCodes = resolveOptionalNumberArray(
441
- target.retry_status_codes ?? target.retryStatusCodes,
516
+ target.retry_status_codes,
442
517
  `${target.name} retry status codes`
443
518
  );
444
519
  if (maxRetries === void 0 && initialDelayMs === void 0 && maxDelayMs === void 0 && backoffFactor === void 0 && retryableStatusCodes === void 0) {
@@ -498,9 +573,10 @@ function resolveDelegatedTargetDefinition(name, definitions, env = process.env)
498
573
  `Target "${name}" exceeded the maximum use_target resolution depth (10). Check for a delegation loop or overly deep alias chain.`
499
574
  );
500
575
  }
501
- function resolveTargetDefinition(definition, env = process.env, evalFilePath) {
576
+ function resolveTargetDefinition(definition, env = process.env, evalFilePath, options) {
577
+ assertNoDeprecatedCamelCaseTargetFields(definition);
502
578
  const parsed = BASE_TARGET_SCHEMA.parse(definition);
503
- if (parsed.workspace_template !== void 0 || parsed.workspaceTemplate !== void 0) {
579
+ if (parsed.workspace_template !== void 0) {
504
580
  throw new Error(
505
581
  `${parsed.name}: target-level workspace_template has been removed. Use eval-level workspace.template.`
506
582
  );
@@ -516,13 +592,9 @@ function resolveTargetDefinition(definition, env = process.env, evalFilePath) {
516
592
  `${parsed.name} provider`,
517
593
  true
518
594
  ).toLowerCase();
519
- const providerBatching = resolveOptionalBoolean(
520
- parsed.provider_batching ?? parsed.providerBatching
521
- );
522
- const subagentModeAllowed = resolveOptionalBoolean(
523
- parsed.subagent_mode_allowed ?? parsed.subagentModeAllowed
524
- );
525
- const fallbackTargets = parsed.fallback_targets ?? parsed.fallbackTargets;
595
+ const providerBatching = resolveOptionalBoolean(parsed.provider_batching);
596
+ const subagentModeAllowed = resolveOptionalBoolean(parsed.subagent_mode_allowed);
597
+ const fallbackTargets = parsed.fallback_targets;
526
598
  const base = {
527
599
  name: parsed.name,
528
600
  graderTarget: parsed.grader_target ?? parsed.judge_target,
@@ -672,20 +744,22 @@ function normalizeOpenAIBaseUrl(value) {
672
744
  return trimmed.endsWith("/v1") ? trimmed : `${trimmed}/v1`;
673
745
  }
674
746
  function resolveAzureConfig(target, env) {
675
- const endpointSource = target.endpoint ?? target.resource ?? target.resourceName;
676
- const apiKeySource = target.api_key ?? target.apiKey;
677
- const deploymentSource = target.deployment ?? target.deploymentName ?? target.model;
747
+ const endpointSource = target.endpoint ?? target.resource;
748
+ const apiKeySource = target.api_key;
749
+ const deploymentSource = target.deployment ?? target.model;
678
750
  const versionSource = target.version ?? target.api_version;
679
751
  const temperatureSource = target.temperature;
680
- const maxTokensSource = target.max_output_tokens ?? target.maxTokens;
752
+ const maxTokensSource = target.max_output_tokens;
681
753
  const resourceName = resolveString(endpointSource, env, `${target.name} endpoint`);
682
754
  const apiKey = resolveString(apiKeySource, env, `${target.name} api key`);
683
755
  const deploymentName = resolveString(deploymentSource, env, `${target.name} deployment`);
756
+ const apiFormat = resolveApiFormat(target, env, target.name);
684
757
  const version = normalizeAzureApiVersion(
685
758
  resolveOptionalString(versionSource, env, `${target.name} api version`, {
686
759
  allowLiteral: true,
687
760
  optionalEnv: true
688
- })
761
+ }),
762
+ apiFormat
689
763
  );
690
764
  const temperature = resolveOptionalNumber(temperatureSource, `${target.name} temperature`);
691
765
  const maxOutputTokens = resolveOptionalNumber(
@@ -698,13 +772,17 @@ function resolveAzureConfig(target, env) {
698
772
  deploymentName,
699
773
  apiKey,
700
774
  version,
775
+ apiFormat,
701
776
  temperature,
702
777
  maxOutputTokens,
703
778
  retry
704
779
  };
705
780
  }
706
- function resolveApiFormat(target, targetName) {
707
- const raw = target.api_format ?? target.apiFormat;
781
+ function resolveApiFormat(target, env, targetName) {
782
+ const raw = resolveOptionalString(target.api_format, env, `${targetName} api format`, {
783
+ allowLiteral: true,
784
+ optionalEnv: true
785
+ });
708
786
  if (raw === void 0) return void 0;
709
787
  if (raw === "chat" || raw === "responses") return raw;
710
788
  throw new Error(
@@ -712,11 +790,11 @@ function resolveApiFormat(target, targetName) {
712
790
  );
713
791
  }
714
792
  function resolveOpenAIConfig(target, env) {
715
- const endpointSource = target.endpoint ?? target.base_url ?? target.baseUrl;
716
- const apiKeySource = target.api_key ?? target.apiKey;
793
+ const endpointSource = target.endpoint ?? target.base_url;
794
+ const apiKeySource = target.api_key;
717
795
  const modelSource = target.model ?? target.deployment ?? target.variant;
718
796
  const temperatureSource = target.temperature;
719
- const maxTokensSource = target.max_output_tokens ?? target.maxTokens;
797
+ const maxTokensSource = target.max_output_tokens;
720
798
  const baseURL = normalizeOpenAIBaseUrl(
721
799
  resolveOptionalString(endpointSource, env, `${target.name} endpoint`, {
722
800
  allowLiteral: true,
@@ -730,17 +808,17 @@ function resolveOpenAIConfig(target, env) {
730
808
  baseURL,
731
809
  apiKey,
732
810
  model,
733
- apiFormat: resolveApiFormat(target, target.name),
811
+ apiFormat: resolveApiFormat(target, env, target.name),
734
812
  temperature: resolveOptionalNumber(temperatureSource, `${target.name} temperature`),
735
813
  maxOutputTokens: resolveOptionalNumber(maxTokensSource, `${target.name} max output tokens`),
736
814
  retry
737
815
  };
738
816
  }
739
817
  function resolveOpenRouterConfig(target, env) {
740
- const apiKeySource = target.api_key ?? target.apiKey;
818
+ const apiKeySource = target.api_key;
741
819
  const modelSource = target.model ?? target.deployment ?? target.variant;
742
820
  const temperatureSource = target.temperature;
743
- const maxTokensSource = target.max_output_tokens ?? target.maxTokens;
821
+ const maxTokensSource = target.max_output_tokens;
744
822
  const retry = resolveRetryConfig(target);
745
823
  return {
746
824
  apiKey: resolveString(apiKeySource, env, `${target.name} OpenRouter api key`),
@@ -751,11 +829,11 @@ function resolveOpenRouterConfig(target, env) {
751
829
  };
752
830
  }
753
831
  function resolveAnthropicConfig(target, env) {
754
- const apiKeySource = target.api_key ?? target.apiKey;
832
+ const apiKeySource = target.api_key;
755
833
  const modelSource = target.model ?? target.deployment ?? target.variant;
756
834
  const temperatureSource = target.temperature;
757
- const maxTokensSource = target.max_output_tokens ?? target.maxTokens;
758
- const thinkingBudgetSource = target.thinking_budget ?? target.thinkingBudget;
835
+ const maxTokensSource = target.max_output_tokens;
836
+ const thinkingBudgetSource = target.thinking_budget;
759
837
  const apiKey = resolveString(apiKeySource, env, `${target.name} Anthropic api key`);
760
838
  const model = resolveString(modelSource, env, `${target.name} Anthropic model`);
761
839
  const retry = resolveRetryConfig(target);
@@ -769,10 +847,10 @@ function resolveAnthropicConfig(target, env) {
769
847
  };
770
848
  }
771
849
  function resolveGeminiConfig(target, env) {
772
- const apiKeySource = target.api_key ?? target.apiKey;
850
+ const apiKeySource = target.api_key;
773
851
  const modelSource = target.model ?? target.deployment ?? target.variant;
774
852
  const temperatureSource = target.temperature;
775
- const maxTokensSource = target.max_output_tokens ?? target.maxTokens;
853
+ const maxTokensSource = target.max_output_tokens;
776
854
  const apiKey = resolveString(apiKeySource, env, `${target.name} Google API key`);
777
855
  const model = resolveOptionalString(modelSource, env, `${target.name} Gemini model`, {
778
856
  allowLiteral: true,
@@ -792,11 +870,11 @@ function resolveCodexConfig(target, env, evalFilePath) {
792
870
  const executableSource = target.executable ?? target.command ?? target.binary;
793
871
  const argsSource = target.args ?? target.arguments;
794
872
  const cwdSource = target.cwd;
795
- const workspaceTemplateSource = target.workspace_template ?? target.workspaceTemplate;
796
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
797
- const logDirSource = target.log_dir ?? target.logDir ?? target.log_directory ?? target.logDirectory;
798
- const logFormatSource = target.log_format ?? target.logFormat ?? target.log_output_format ?? target.logOutputFormat ?? env.AGENTV_CODEX_LOG_FORMAT;
799
- const systemPromptSource = target.system_prompt ?? target.systemPrompt;
873
+ const workspaceTemplateSource = target.workspace_template;
874
+ const timeoutSource = target.timeout_seconds;
875
+ const logDirSource = target.log_dir ?? target.log_directory;
876
+ const logFormatSource = target.log_format ?? target.log_output_format ?? env.AGENTV_CODEX_LOG_FORMAT;
877
+ const systemPromptSource = target.system_prompt;
800
878
  const model = resolveOptionalString(modelSource, env, `${target.name} codex model`, {
801
879
  allowLiteral: true,
802
880
  optionalEnv: true
@@ -860,16 +938,16 @@ function normalizeCodexLogFormat(value) {
860
938
  throw new Error("codex log format must be 'summary' or 'json'");
861
939
  }
862
940
  function resolveCopilotSdkConfig(target, env, evalFilePath) {
863
- const cliUrlSource = target.cli_url ?? target.cliUrl;
864
- const cliPathSource = target.cli_path ?? target.cliPath;
865
- const githubTokenSource = target.github_token ?? target.githubToken;
941
+ const cliUrlSource = target.cli_url;
942
+ const cliPathSource = target.cli_path;
943
+ const githubTokenSource = target.github_token;
866
944
  const modelSource = target.model;
867
945
  const cwdSource = target.cwd;
868
- const workspaceTemplateSource = target.workspace_template ?? target.workspaceTemplate;
869
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
870
- const logDirSource = target.log_dir ?? target.logDir ?? target.log_directory ?? target.logDirectory;
871
- const logFormatSource = target.log_format ?? target.logFormat;
872
- const systemPromptSource = target.system_prompt ?? target.systemPrompt;
946
+ const workspaceTemplateSource = target.workspace_template;
947
+ const timeoutSource = target.timeout_seconds;
948
+ const logDirSource = target.log_dir ?? target.log_directory;
949
+ const logFormatSource = target.log_format;
950
+ const systemPromptSource = target.system_prompt;
873
951
  const cliUrl = resolveOptionalString(cliUrlSource, env, `${target.name} copilot-sdk cli URL`, {
874
952
  allowLiteral: true,
875
953
  optionalEnv: true
@@ -942,11 +1020,11 @@ function resolveCopilotCliConfig(target, env, evalFilePath) {
942
1020
  const modelSource = target.model;
943
1021
  const argsSource = target.args ?? target.arguments;
944
1022
  const cwdSource = target.cwd;
945
- const workspaceTemplateSource = target.workspace_template ?? target.workspaceTemplate;
946
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
947
- const logDirSource = target.log_dir ?? target.logDir ?? target.log_directory ?? target.logDirectory;
948
- const logFormatSource = target.log_format ?? target.logFormat;
949
- const systemPromptSource = target.system_prompt ?? target.systemPrompt;
1023
+ const workspaceTemplateSource = target.workspace_template;
1024
+ const timeoutSource = target.timeout_seconds;
1025
+ const logDirSource = target.log_dir ?? target.log_directory;
1026
+ const logFormatSource = target.log_format;
1027
+ const systemPromptSource = target.system_prompt;
950
1028
  const executable = resolveOptionalString(executableSource, env, `${target.name} copilot-cli executable`, {
951
1029
  allowLiteral: true,
952
1030
  optionalEnv: true
@@ -1010,16 +1088,16 @@ function normalizeCopilotLogFormat(value) {
1010
1088
  }
1011
1089
  function resolvePiCodingAgentConfig(target, env, evalFilePath) {
1012
1090
  const subproviderSource = target.subprovider;
1013
- const modelSource = target.model ?? target.pi_model ?? target.piModel;
1014
- const apiKeySource = target.api_key ?? target.apiKey;
1015
- const toolsSource = target.tools ?? target.pi_tools ?? target.piTools;
1016
- const thinkingSource = target.thinking ?? target.pi_thinking ?? target.piThinking;
1091
+ const modelSource = target.model ?? target.pi_model;
1092
+ const apiKeySource = target.api_key;
1093
+ const toolsSource = target.tools ?? target.pi_tools;
1094
+ const thinkingSource = target.thinking ?? target.pi_thinking;
1017
1095
  const cwdSource = target.cwd;
1018
- const workspaceTemplateSource = target.workspace_template ?? target.workspaceTemplate;
1019
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
1020
- const logDirSource = target.log_dir ?? target.logDir ?? target.log_directory ?? target.logDirectory;
1021
- const logFormatSource = target.log_format ?? target.logFormat;
1022
- const systemPromptSource = target.system_prompt ?? target.systemPrompt;
1096
+ const workspaceTemplateSource = target.workspace_template;
1097
+ const timeoutSource = target.timeout_seconds;
1098
+ const logDirSource = target.log_dir ?? target.log_directory;
1099
+ const logFormatSource = target.log_format;
1100
+ const systemPromptSource = target.system_prompt;
1023
1101
  const subprovider = resolveOptionalString(
1024
1102
  subproviderSource,
1025
1103
  env,
@@ -1037,7 +1115,7 @@ function resolvePiCodingAgentConfig(target, env, evalFilePath) {
1037
1115
  allowLiteral: false,
1038
1116
  optionalEnv: true
1039
1117
  });
1040
- const baseUrlSource = target.base_url ?? target.baseUrl ?? target.endpoint;
1118
+ const baseUrlSource = target.base_url ?? target.endpoint;
1041
1119
  const baseUrl = resolveOptionalString(baseUrlSource, env, `${target.name} pi base url`, {
1042
1120
  allowLiteral: true,
1043
1121
  optionalEnv: true
@@ -1096,16 +1174,16 @@ function resolvePiCodingAgentConfig(target, env, evalFilePath) {
1096
1174
  function resolvePiCliConfig(target, env, evalFilePath) {
1097
1175
  const executableSource = target.executable ?? target.command ?? target.binary;
1098
1176
  const subproviderSource = target.subprovider;
1099
- const modelSource = target.model ?? target.pi_model ?? target.piModel;
1100
- const apiKeySource = target.api_key ?? target.apiKey;
1101
- const toolsSource = target.tools ?? target.pi_tools ?? target.piTools;
1102
- const thinkingSource = target.thinking ?? target.pi_thinking ?? target.piThinking;
1177
+ const modelSource = target.model ?? target.pi_model;
1178
+ const apiKeySource = target.api_key;
1179
+ const toolsSource = target.tools ?? target.pi_tools;
1180
+ const thinkingSource = target.thinking ?? target.pi_thinking;
1103
1181
  const cwdSource = target.cwd;
1104
- const workspaceTemplateSource = target.workspace_template ?? target.workspaceTemplate;
1105
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
1106
- const logDirSource = target.log_dir ?? target.logDir ?? target.log_directory ?? target.logDirectory;
1107
- const logFormatSource = target.log_format ?? target.logFormat;
1108
- const systemPromptSource = target.system_prompt ?? target.systemPrompt;
1182
+ const workspaceTemplateSource = target.workspace_template;
1183
+ const timeoutSource = target.timeout_seconds;
1184
+ const logDirSource = target.log_dir ?? target.log_directory;
1185
+ const logFormatSource = target.log_format;
1186
+ const systemPromptSource = target.system_prompt;
1109
1187
  const executable = resolveOptionalString(executableSource, env, `${target.name} pi-cli executable`, {
1110
1188
  allowLiteral: true,
1111
1189
  optionalEnv: true
@@ -1124,7 +1202,7 @@ function resolvePiCliConfig(target, env, evalFilePath) {
1124
1202
  allowLiteral: false,
1125
1203
  optionalEnv: true
1126
1204
  });
1127
- const baseUrlSource = target.base_url ?? target.baseUrl ?? target.endpoint;
1205
+ const baseUrlSource = target.base_url ?? target.endpoint;
1128
1206
  const baseUrl = resolveOptionalString(baseUrlSource, env, `${target.name} pi-cli base url`, {
1129
1207
  allowLiteral: true,
1130
1208
  optionalEnv: true
@@ -1182,11 +1260,11 @@ function resolvePiCliConfig(target, env, evalFilePath) {
1182
1260
  function resolveClaudeConfig(target, env, evalFilePath) {
1183
1261
  const modelSource = target.model;
1184
1262
  const cwdSource = target.cwd;
1185
- const workspaceTemplateSource = target.workspace_template ?? target.workspaceTemplate;
1186
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
1187
- const logDirSource = target.log_dir ?? target.logDir ?? target.log_directory ?? target.logDirectory;
1188
- const logFormatSource = target.log_format ?? target.logFormat ?? target.log_output_format ?? target.logOutputFormat ?? env.AGENTV_CLAUDE_LOG_FORMAT;
1189
- const systemPromptSource = target.system_prompt ?? target.systemPrompt;
1263
+ const workspaceTemplateSource = target.workspace_template;
1264
+ const timeoutSource = target.timeout_seconds;
1265
+ const logDirSource = target.log_dir ?? target.log_directory;
1266
+ const logFormatSource = target.log_format ?? target.log_output_format ?? env.AGENTV_CLAUDE_LOG_FORMAT;
1267
+ const systemPromptSource = target.system_prompt;
1190
1268
  const model = resolveOptionalString(modelSource, env, `${target.name} claude model`, {
1191
1269
  allowLiteral: true,
1192
1270
  optionalEnv: true
@@ -1219,8 +1297,8 @@ function resolveClaudeConfig(target, env, evalFilePath) {
1219
1297
  });
1220
1298
  const logFormat = normalizeClaudeLogFormat(logFormatSource);
1221
1299
  const systemPrompt = typeof systemPromptSource === "string" && systemPromptSource.trim().length > 0 ? systemPromptSource.trim() : void 0;
1222
- const maxTurns = typeof target.max_turns === "number" ? target.max_turns : typeof target.maxTurns === "number" ? target.maxTurns : void 0;
1223
- const maxBudgetUsd = typeof target.max_budget_usd === "number" ? target.max_budget_usd : typeof target.maxBudgetUsd === "number" ? target.maxBudgetUsd : void 0;
1300
+ const maxTurns = typeof target.max_turns === "number" ? target.max_turns : void 0;
1301
+ const maxBudgetUsd = typeof target.max_budget_usd === "number" ? target.max_budget_usd : void 0;
1224
1302
  return {
1225
1303
  model,
1226
1304
  systemPrompt,
@@ -1251,9 +1329,7 @@ function resolveMockConfig(target) {
1251
1329
  return { response };
1252
1330
  }
1253
1331
  function resolveVSCodeConfig(target, env, insiders, evalFilePath) {
1254
- const workspaceTemplateEnvVar = resolveOptionalLiteralString(
1255
- target.workspace_template ?? target.workspaceTemplate
1256
- );
1332
+ const workspaceTemplateEnvVar = resolveOptionalLiteralString(target.workspace_template);
1257
1333
  let workspaceTemplate = workspaceTemplateEnvVar ? resolveOptionalString(
1258
1334
  workspaceTemplateEnvVar,
1259
1335
  env,
@@ -1268,9 +1344,9 @@ function resolveVSCodeConfig(target, env, insiders, evalFilePath) {
1268
1344
  }
1269
1345
  const executableSource = target.executable;
1270
1346
  const waitSource = target.wait;
1271
- const dryRunSource = target.dry_run ?? target.dryRun;
1272
- const subagentRootSource = target.subagent_root ?? target.subagentRoot;
1273
- const timeoutSource = target.timeout_seconds ?? target.timeoutSeconds;
1347
+ const dryRunSource = target.dry_run;
1348
+ const subagentRootSource = target.subagent_root;
1349
+ const timeoutSource = target.timeout_seconds;
1274
1350
  const defaultCommand = insiders ? "code-insiders" : "code";
1275
1351
  const executable = resolveOptionalString(executableSource, env, `${target.name} vscode executable`, {
1276
1352
  allowLiteral: true,
@@ -1321,7 +1397,7 @@ function resolveCliConfig(target, env, evalFilePath) {
1321
1397
  }
1322
1398
  function resolveDiscoveredProviderConfig(target, providerKind, env, evalFilePath) {
1323
1399
  const command = target.command ? resolveString(target.command, env, `${target.name} command`, true) : `bun run .agentv/providers/${providerKind}.ts {PROMPT}`;
1324
- const timeoutSeconds = target.timeout_seconds ?? target.timeoutSeconds;
1400
+ const timeoutSeconds = target.timeout_seconds;
1325
1401
  const timeoutMs = resolveTimeoutMs(timeoutSeconds, `${target.name} timeout`);
1326
1402
  let cwd = resolveOptionalString(target.cwd, env, `${target.name} working directory`, {
1327
1403
  allowLiteral: true,
@@ -1385,10 +1461,10 @@ function resolveDiscover(value, targetName) {
1385
1461
  throw new Error(`Target "${targetName}": discover must be "latest" (got "${String(value)}")`);
1386
1462
  }
1387
1463
  function resolveCopilotLogConfig(target, env) {
1388
- const sessionDirSource = target.session_dir ?? target.sessionDir;
1389
- const sessionIdSource = target.session_id ?? target.sessionId;
1464
+ const sessionDirSource = target.session_dir;
1465
+ const sessionIdSource = target.session_id;
1390
1466
  const discoverSource = target.discover;
1391
- const sessionStateDirSource = target.session_state_dir ?? target.sessionStateDir;
1467
+ const sessionStateDirSource = target.session_state_dir;
1392
1468
  const cwdSource = target.cwd;
1393
1469
  return {
1394
1470
  sessionDir: resolveOptionalString(
@@ -1563,6 +1639,15 @@ var AGENT_PROVIDER_KINDS = [
1563
1639
  "vscode",
1564
1640
  "vscode-insiders"
1565
1641
  ];
1642
+ var LLM_GRADER_CAPABLE_KINDS = [
1643
+ "openai",
1644
+ "openrouter",
1645
+ "azure",
1646
+ "anthropic",
1647
+ "gemini",
1648
+ "agentv",
1649
+ "mock"
1650
+ ];
1566
1651
  var KNOWN_PROVIDERS = [
1567
1652
  "openai",
1568
1653
  "openrouter",
@@ -1582,7 +1667,8 @@ var KNOWN_PROVIDERS = [
1582
1667
  "mock",
1583
1668
  "vscode",
1584
1669
  "vscode-insiders",
1585
- "agentv"
1670
+ "agentv",
1671
+ "transcript"
1586
1672
  ];
1587
1673
  var PROVIDER_ALIASES = [
1588
1674
  "azure-openai",
@@ -1787,12 +1873,14 @@ export {
1787
1873
  buildSearchRoots,
1788
1874
  resolveFileReference,
1789
1875
  CLI_PLACEHOLDERS,
1876
+ findDeprecatedCamelCaseTargetWarnings,
1790
1877
  COMMON_TARGET_SETTINGS,
1791
1878
  resolveDelegatedTargetDefinition,
1792
1879
  resolveTargetDefinition,
1880
+ LLM_GRADER_CAPABLE_KINDS,
1793
1881
  KNOWN_PROVIDERS,
1794
1882
  PROVIDER_ALIASES,
1795
1883
  extractLastAssistantContent,
1796
1884
  isAgentProvider
1797
1885
  };
1798
- //# sourceMappingURL=chunk-ZK4GG7PR.js.map
1886
+ //# sourceMappingURL=chunk-75RFVESM.js.map