@wix/evalforge-evaluator 0.89.0 → 0.90.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.mjs CHANGED
@@ -229,6 +229,12 @@ function applyParamsToAssertion(assertion, params) {
229
229
  }
230
230
  };
231
231
  }
232
+ if (assertion.type === "time_limit" && params.maxDurationMs !== void 0) {
233
+ return {
234
+ ...assertion,
235
+ maxDurationMs: params.maxDurationMs
236
+ };
237
+ }
232
238
  if (assertion.type === "skill_was_called" && params.skillNames !== void 0) {
233
239
  return {
234
240
  ...assertion,
@@ -254,6 +260,12 @@ function resolveSystemAssertion(assertionId, params) {
254
260
  expectedExitCode: params?.expectedExitCode ?? void 0
255
261
  };
256
262
  break;
263
+ case "time_limit":
264
+ baseAssertion = {
265
+ type: "time_limit",
266
+ maxDurationMs: params?.maxDurationMs ?? 3e5
267
+ };
268
+ break;
257
269
  case "llm_judge":
258
270
  baseAssertion = {
259
271
  type: "llm_judge",
@@ -2528,7 +2540,8 @@ async function runScenario(config, evalRunId2, scenario, evalData, template, res
2528
2540
  fileDiffs: partialResult.fileDiffs?.map((d) => ({
2529
2541
  path: d.path,
2530
2542
  status: templateFilesMap.get(d.path)
2531
- }))
2543
+ })),
2544
+ durationMs: partialResult.duration
2532
2545
  };
2533
2546
  const { "x-wix-ai-gateway-stream": _stream, ...judgeHeaders } = config.aiGatewayHeaders;
2534
2547
  const defaultJudgeModel = DEFAULT_JUDGE_MODEL;