agentv 4.15.9 → 4.16.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.
@@ -42,12 +42,12 @@ import {
42
42
  syncResultsRepo,
43
43
  toCamelCaseDeep,
44
44
  toTranscriptJsonLines
45
- } from "./chunk-3GULESPF.js";
45
+ } from "./chunk-IRU2UOWN.js";
46
46
 
47
47
  // package.json
48
48
  var package_default = {
49
49
  name: "agentv",
50
- version: "4.15.9",
50
+ version: "4.16.0",
51
51
  description: "CLI entry point for AgentV",
52
52
  type: "module",
53
53
  repository: {
@@ -4043,8 +4043,7 @@ var CODEX_SETTINGS = /* @__PURE__ */ new Set([
4043
4043
  "log_directory",
4044
4044
  "log_format",
4045
4045
  "log_output_format",
4046
- "system_prompt",
4047
- "workspace_template"
4046
+ "system_prompt"
4048
4047
  ]);
4049
4048
  var COPILOT_SDK_SETTINGS = /* @__PURE__ */ new Set([
4050
4049
  ...COMMON_SETTINGS,
@@ -4057,7 +4056,6 @@ var COPILOT_SDK_SETTINGS = /* @__PURE__ */ new Set([
4057
4056
  "log_dir",
4058
4057
  "log_format",
4059
4058
  "system_prompt",
4060
- "workspace_template",
4061
4059
  "byok"
4062
4060
  ]);
4063
4061
  var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
@@ -4072,13 +4070,11 @@ var COPILOT_CLI_SETTINGS = /* @__PURE__ */ new Set([
4072
4070
  "timeout_seconds",
4073
4071
  "log_dir",
4074
4072
  "log_format",
4075
- "system_prompt",
4076
- "workspace_template"
4073
+ "system_prompt"
4077
4074
  ]);
4078
4075
  var VSCODE_SETTINGS = /* @__PURE__ */ new Set([
4079
4076
  ...COMMON_SETTINGS,
4080
4077
  "executable",
4081
- "workspace_template",
4082
4078
  "wait",
4083
4079
  "dry_run",
4084
4080
  "subagent_root",
@@ -4092,6 +4088,9 @@ var MOCK_SETTINGS = /* @__PURE__ */ new Set([
4092
4088
  ]);
4093
4089
  var CLAUDE_SETTINGS = /* @__PURE__ */ new Set([
4094
4090
  ...COMMON_SETTINGS,
4091
+ "executable",
4092
+ "command",
4093
+ "binary",
4095
4094
  "model",
4096
4095
  "cwd",
4097
4096
  "timeout_seconds",
@@ -4100,10 +4099,10 @@ var CLAUDE_SETTINGS = /* @__PURE__ */ new Set([
4100
4099
  "log_format",
4101
4100
  "log_output_format",
4102
4101
  "system_prompt",
4103
- "workspace_template",
4104
4102
  "max_turns",
4105
4103
  "max_budget_usd"
4106
4104
  ]);
4105
+ var CC_MIRROR_SETTINGS = /* @__PURE__ */ new Set([...CLAUDE_SETTINGS, "variant"]);
4107
4106
  function getKnownSettings(provider) {
4108
4107
  const normalizedProvider = provider.toLowerCase();
4109
4108
  switch (normalizedProvider) {
@@ -4129,6 +4128,8 @@ function getKnownSettings(provider) {
4129
4128
  case "copilot":
4130
4129
  case "copilot-cli":
4131
4130
  return COPILOT_CLI_SETTINGS;
4131
+ case "cc-mirror":
4132
+ return CC_MIRROR_SETTINGS;
4132
4133
  case "claude":
4133
4134
  case "claude-code":
4134
4135
  case "claude-cli":
@@ -4146,7 +4147,6 @@ function getKnownSettings(provider) {
4146
4147
  }
4147
4148
  }
4148
4149
  function validateUnknownSettings(target, provider, absolutePath, location, errors) {
4149
- const removedTargetFields = /* @__PURE__ */ new Set(["workspace_template", "workspaceTemplate"]);
4150
4150
  const knownSettings = getKnownSettings(provider);
4151
4151
  if (!knownSettings) {
4152
4152
  return;
@@ -4160,13 +4160,14 @@ function validateUnknownSettings(target, provider, absolutePath, location, error
4160
4160
  "$schema",
4161
4161
  "targets"
4162
4162
  ]);
4163
+ const removedFields = /* @__PURE__ */ new Set(["workspace_template", "workspaceTemplate"]);
4163
4164
  for (const key of Object.keys(target)) {
4164
- if (removedTargetFields.has(key)) {
4165
+ if (removedFields.has(key)) {
4165
4166
  errors.push({
4166
- severity: "error",
4167
+ severity: "warning",
4167
4168
  filePath: absolutePath,
4168
4169
  location: `${location}.${key}`,
4169
- message: "target-level workspace_template has been removed. Use eval-level workspace.template."
4170
+ message: "workspace_template has been removed from targets. Use eval-level workspace.template instead."
4170
4171
  });
4171
4172
  continue;
4172
4173
  }
@@ -4904,8 +4905,17 @@ async function selectMultipleTargets(options) {
4904
4905
  dryRunDelayMin,
4905
4906
  dryRunDelayMax,
4906
4907
  env,
4907
- targetNames
4908
+ targetNames,
4909
+ targetRefs
4908
4910
  } = options;
4911
+ const hooksMap = /* @__PURE__ */ new Map();
4912
+ if (targetRefs) {
4913
+ for (const ref of targetRefs) {
4914
+ if (ref.hooks) {
4915
+ hooksMap.set(ref.name, ref.hooks);
4916
+ }
4917
+ }
4918
+ }
4909
4919
  const targetsFilePath = await discoverTargetsFile({
4910
4920
  explicitPath: explicitTargetsPath,
4911
4921
  testFilePath,
@@ -4938,10 +4948,19 @@ Errors in ${targetsFilePath}:`);
4938
4948
  }
4939
4949
  throw new Error(`Targets file validation failed with ${errors.length} error(s)`);
4940
4950
  }
4941
- const definitions = await readTargetDefinitions(targetsFilePath);
4951
+ const fileDefinitions = await readTargetDefinitions(targetsFilePath);
4952
+ const definitions = [...fileDefinitions];
4953
+ if (targetRefs) {
4954
+ for (const ref of targetRefs) {
4955
+ if (ref.use_target && !fileDefinitions.some((d) => d.name === ref.name)) {
4956
+ definitions.push({ name: ref.name, use_target: ref.use_target });
4957
+ }
4958
+ }
4959
+ }
4942
4960
  const results = [];
4943
4961
  for (const name of targetNames) {
4944
4962
  const targetDefinition = resolveUseTarget(name, definitions, env, targetsFilePath);
4963
+ const hooks = hooksMap.get(name);
4945
4964
  if (dryRun) {
4946
4965
  const mockTarget = {
4947
4966
  kind: "mock",
@@ -4959,7 +4978,8 @@ Errors in ${targetsFilePath}:`);
4959
4978
  resolvedTarget: mockTarget,
4960
4979
  targetName: name,
4961
4980
  targetSource: "cli",
4962
- targetsFilePath
4981
+ targetsFilePath,
4982
+ ...hooks && { targetHooks: hooks }
4963
4983
  });
4964
4984
  } else {
4965
4985
  try {
@@ -4971,7 +4991,8 @@ Errors in ${targetsFilePath}:`);
4971
4991
  resolvedTarget,
4972
4992
  targetName: name,
4973
4993
  targetSource: "cli",
4974
- targetsFilePath
4994
+ targetsFilePath,
4995
+ ...hooks && { targetHooks: hooks }
4975
4996
  });
4976
4997
  } catch (error) {
4977
4998
  const message = error instanceof Error ? error.message : String(error);
@@ -5287,6 +5308,7 @@ async function prepareFileMetadata(params) {
5287
5308
  } else {
5288
5309
  const cliTargets = options.cliTargets;
5289
5310
  const suiteTargets2 = suite.targets;
5311
+ const suiteTargetRefs = suite.targetRefs;
5290
5312
  let targetNames;
5291
5313
  if (cliTargets.length > 0) {
5292
5314
  targetNames = cliTargets;
@@ -5306,7 +5328,8 @@ async function prepareFileMetadata(params) {
5306
5328
  dryRunDelayMin: options.dryRunDelayMin,
5307
5329
  dryRunDelayMax: options.dryRunDelayMax,
5308
5330
  env: process.env,
5309
- targetNames
5331
+ targetNames,
5332
+ targetRefs: suiteTargetRefs
5310
5333
  });
5311
5334
  selections = multiSelections.map((sel) => ({
5312
5335
  selection: sel,
@@ -5325,12 +5348,16 @@ async function prepareFileMetadata(params) {
5325
5348
  dryRunDelayMax: options.dryRunDelayMax,
5326
5349
  env: process.env
5327
5350
  });
5351
+ const singleTargetHooks = suiteTargetRefs?.find(
5352
+ (ref) => ref.name === selection.targetName
5353
+ )?.hooks;
5354
+ const augmentedSelection = singleTargetHooks ? { ...selection, targetHooks: singleTargetHooks } : selection;
5328
5355
  selections = [
5329
5356
  {
5330
- selection,
5357
+ selection: augmentedSelection,
5331
5358
  inlineTargetLabel: resolveTargetLabel(
5332
- selection.targetName,
5333
- selection.resolvedTarget.name
5359
+ augmentedSelection.targetName,
5360
+ augmentedSelection.resolvedTarget.name
5334
5361
  )
5335
5362
  }
5336
5363
  ];
@@ -5442,6 +5469,7 @@ async function runSingleEvalFile(params) {
5442
5469
  graderTarget: options.graderTarget,
5443
5470
  model: options.model,
5444
5471
  threshold: options.threshold,
5472
+ targetHooks: resolvedTargetSelection.targetHooks,
5445
5473
  providerFactory,
5446
5474
  streamCallbacks: streamingObserver?.getStreamCallbacks(),
5447
5475
  onResult: async (result) => {
@@ -5597,7 +5625,7 @@ async function runEvalCommand(input) {
5597
5625
  const useFileExport = !!options.otelFile;
5598
5626
  if (options.exportOtel || useFileExport) {
5599
5627
  try {
5600
- const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-D45MEPD7.js");
5628
+ const { OtelTraceExporter, OTEL_BACKEND_PRESETS } = await import("./dist-U5EXNMON.js");
5601
5629
  let endpoint = process.env.OTEL_EXPORTER_OTLP_ENDPOINT;
5602
5630
  let headers = {};
5603
5631
  if (options.otelBackend) {
@@ -5793,7 +5821,7 @@ async function runEvalCommand(input) {
5793
5821
  const activeTestFiles = resolvedTestFiles.filter((f) => fileMetadata.has(f));
5794
5822
  let transcriptProviderFactory;
5795
5823
  if (options.transcript) {
5796
- const { TranscriptProvider } = await import("./dist-D45MEPD7.js");
5824
+ const { TranscriptProvider } = await import("./dist-U5EXNMON.js");
5797
5825
  const transcriptProvider = await TranscriptProvider.fromFile(options.transcript);
5798
5826
  const totalTests = [...fileMetadata.values()].reduce(
5799
5827
  (sum, meta) => sum + meta.testCases.length,
@@ -6122,4 +6150,4 @@ export {
6122
6150
  getCategories,
6123
6151
  filterByCategory
6124
6152
  };
6125
- //# sourceMappingURL=chunk-BMPIWUEE.js.map
6153
+ //# sourceMappingURL=chunk-NENUAMR5.js.map