@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.js
CHANGED
|
@@ -12269,7 +12269,7 @@ function substituteVariables(prompt, variables) {
|
|
|
12269
12269
|
// src/run-scenario/run-agent-with-context.ts
|
|
12270
12270
|
var import_evalforge_types12 = require("@wix/evalforge-types");
|
|
12271
12271
|
var DEFAULT_AGENT_COMMAND = import_evalforge_types12.AgentRunCommand.CLAUDE;
|
|
12272
|
-
async function runAgentWithContext(config, evalRunId2, scenario, evalData, workDir, pushEvent) {
|
|
12272
|
+
async function runAgentWithContext(config, evalRunId2, scenario, evalData, workDir, pushEvent, executionPromptSuffix) {
|
|
12273
12273
|
const agent = evalData.agent ?? void 0;
|
|
12274
12274
|
const isSDK = agent?.agentType === import_evalforge_types12.AgentType.SDK;
|
|
12275
12275
|
const identifier = isSDK ? simpleAgentAdapter.id : agent?.runCommand ?? DEFAULT_AGENT_COMMAND;
|
|
@@ -12282,9 +12282,10 @@ async function runAgentWithContext(config, evalRunId2, scenario, evalData, workD
|
|
|
12282
12282
|
scenario.triggerPrompt,
|
|
12283
12283
|
evalData.evalRun.variables
|
|
12284
12284
|
);
|
|
12285
|
+
const executionTriggerPrompt = executionPromptSuffix ? `${resolvedTriggerPrompt}${executionPromptSuffix}` : resolvedTriggerPrompt;
|
|
12285
12286
|
const executionContext = {
|
|
12286
12287
|
skills: evalData.skills,
|
|
12287
|
-
scenario: { ...scenario, triggerPrompt:
|
|
12288
|
+
scenario: { ...scenario, triggerPrompt: executionTriggerPrompt },
|
|
12288
12289
|
cwd: workDir || process.cwd(),
|
|
12289
12290
|
config: agentConfig,
|
|
12290
12291
|
aiGatewayUrl: config.aiGatewayUrl,
|
|
@@ -12400,9 +12401,9 @@ async function runScenario(config, evalRunId2, scenario, evalData, template, res
|
|
|
12400
12401
|
isComplete: false
|
|
12401
12402
|
});
|
|
12402
12403
|
}
|
|
12403
|
-
const
|
|
12404
|
+
const siteIdPromptSuffix = provisionedSite ? `
|
|
12404
12405
|
|
|
12405
|
-
Site ID: ${provisionedSite.id}` :
|
|
12406
|
+
Site ID: ${provisionedSite.id}` : void 0;
|
|
12406
12407
|
try {
|
|
12407
12408
|
emitSetupProgress("Setting up environment...");
|
|
12408
12409
|
const workDir = await prepareWorkingDirectory(
|
|
@@ -12417,10 +12418,11 @@ Site ID: ${provisionedSite.id}` : scenario.triggerPrompt;
|
|
|
12417
12418
|
const partialResult = await runAgentWithContext(
|
|
12418
12419
|
config,
|
|
12419
12420
|
evalRunId2,
|
|
12420
|
-
|
|
12421
|
+
scenario,
|
|
12421
12422
|
evalData,
|
|
12422
12423
|
workDir,
|
|
12423
|
-
pushEvent
|
|
12424
|
+
pushEvent,
|
|
12425
|
+
siteIdPromptSuffix
|
|
12424
12426
|
);
|
|
12425
12427
|
const inlineAssertions = scenario.assertions ?? [];
|
|
12426
12428
|
const assertions = [
|