@wix/evalforge-evaluator 0.204.0 → 0.206.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
@@ -12328,7 +12328,7 @@ function substituteVariables(prompt, variables) {
12328
12328
  // src/run-scenario/run-agent-with-context.ts
12329
12329
  import { AgentRunCommand as AgentRunCommand3, AgentType } from "@wix/evalforge-types";
12330
12330
  var DEFAULT_AGENT_COMMAND = AgentRunCommand3.CLAUDE;
12331
- async function runAgentWithContext(config, evalRunId2, scenario, evalData, workDir, pushEvent) {
12331
+ async function runAgentWithContext(config, evalRunId2, scenario, evalData, workDir, pushEvent, executionPromptSuffix) {
12332
12332
  const agent = evalData.agent ?? void 0;
12333
12333
  const isSDK = agent?.agentType === AgentType.SDK;
12334
12334
  const identifier = isSDK ? simpleAgentAdapter.id : agent?.runCommand ?? DEFAULT_AGENT_COMMAND;
@@ -12341,9 +12341,10 @@ async function runAgentWithContext(config, evalRunId2, scenario, evalData, workD
12341
12341
  scenario.triggerPrompt,
12342
12342
  evalData.evalRun.variables
12343
12343
  );
12344
+ const executionTriggerPrompt = executionPromptSuffix ? `${resolvedTriggerPrompt}${executionPromptSuffix}` : resolvedTriggerPrompt;
12344
12345
  const executionContext = {
12345
12346
  skills: evalData.skills,
12346
- scenario: { ...scenario, triggerPrompt: resolvedTriggerPrompt },
12347
+ scenario: { ...scenario, triggerPrompt: executionTriggerPrompt },
12347
12348
  cwd: workDir || process.cwd(),
12348
12349
  config: agentConfig,
12349
12350
  aiGatewayUrl: config.aiGatewayUrl,
@@ -12459,9 +12460,9 @@ async function runScenario(config, evalRunId2, scenario, evalData, template, res
12459
12460
  isComplete: false
12460
12461
  });
12461
12462
  }
12462
- const effectiveTriggerPrompt = provisionedSite ? `${scenario.triggerPrompt}
12463
+ const siteIdPromptSuffix = provisionedSite ? `
12463
12464
 
12464
- Site ID: ${provisionedSite.id}` : scenario.triggerPrompt;
12465
+ Site ID: ${provisionedSite.id}` : void 0;
12465
12466
  try {
12466
12467
  emitSetupProgress("Setting up environment...");
12467
12468
  const workDir = await prepareWorkingDirectory(
@@ -12476,10 +12477,11 @@ Site ID: ${provisionedSite.id}` : scenario.triggerPrompt;
12476
12477
  const partialResult = await runAgentWithContext(
12477
12478
  config,
12478
12479
  evalRunId2,
12479
- { ...scenario, triggerPrompt: effectiveTriggerPrompt },
12480
+ scenario,
12480
12481
  evalData,
12481
12482
  workDir,
12482
- pushEvent
12483
+ pushEvent,
12484
+ siteIdPromptSuffix
12483
12485
  );
12484
12486
  const inlineAssertions = scenario.assertions ?? [];
12485
12487
  const assertions = [