@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.js CHANGED
@@ -249,6 +249,12 @@ function applyParamsToAssertion(assertion, params) {
249
249
  }
250
250
  };
251
251
  }
252
+ if (assertion.type === "time_limit" && params.maxDurationMs !== void 0) {
253
+ return {
254
+ ...assertion,
255
+ maxDurationMs: params.maxDurationMs
256
+ };
257
+ }
252
258
  if (assertion.type === "skill_was_called" && params.skillNames !== void 0) {
253
259
  return {
254
260
  ...assertion,
@@ -274,6 +280,12 @@ function resolveSystemAssertion(assertionId, params) {
274
280
  expectedExitCode: params?.expectedExitCode ?? void 0
275
281
  };
276
282
  break;
283
+ case "time_limit":
284
+ baseAssertion = {
285
+ type: "time_limit",
286
+ maxDurationMs: params?.maxDurationMs ?? 3e5
287
+ };
288
+ break;
277
289
  case "llm_judge":
278
290
  baseAssertion = {
279
291
  type: "llm_judge",
@@ -2538,7 +2550,8 @@ async function runScenario(config, evalRunId2, scenario, evalData, template, res
2538
2550
  fileDiffs: partialResult.fileDiffs?.map((d) => ({
2539
2551
  path: d.path,
2540
2552
  status: templateFilesMap.get(d.path)
2541
- }))
2553
+ })),
2554
+ durationMs: partialResult.duration
2542
2555
  };
2543
2556
  const { "x-wix-ai-gateway-stream": _stream, ...judgeHeaders } = config.aiGatewayHeaders;
2544
2557
  const defaultJudgeModel = import_evalforge_types6.DEFAULT_JUDGE_MODEL;