@wix/evalforge-evaluator 0.113.0 → 0.115.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
@@ -2141,6 +2141,7 @@ defaultRegistry.register(claudeCodeAdapter);
2141
2141
  import { AgentRunCommand as AgentRunCommand2 } from "@wix/evalforge-types";
2142
2142
 
2143
2143
  // src/run-scenario/agents/opencode/execute.ts
2144
+ import { homedir as homedir2 } from "os";
2144
2145
  import {
2145
2146
  ClaudeModel as ClaudeModel3,
2146
2147
  DEFAULT_EVALUATOR_SYSTEM_PROMPT as DEFAULT_EVALUATOR_SYSTEM_PROMPT2,
@@ -2652,6 +2653,13 @@ function buildConversation2(messages) {
2652
2653
 
2653
2654
  // src/run-scenario/agents/opencode/execute.ts
2654
2655
  var DEFAULT_MODEL3 = `anthropic/${ClaudeModel3.CLAUDE_4_5_SONNET_1_0}`;
2656
+ function ensureOpenCodeInPath() {
2657
+ const opencodeBin = `${homedir2()}/.opencode/bin`;
2658
+ const currentPath = process.env.PATH || "";
2659
+ if (!currentPath.includes(opencodeBin)) {
2660
+ process.env.PATH = `${opencodeBin}:${currentPath}`;
2661
+ }
2662
+ }
2655
2663
  function extractToolAction(toolName, args) {
2656
2664
  if (!toolName) return "Using tool...";
2657
2665
  const a = args;
@@ -2807,6 +2815,7 @@ async function executeWithOpenCode(skills, scenario, options) {
2807
2815
  }
2808
2816
  let server;
2809
2817
  try {
2818
+ ensureOpenCodeInPath();
2810
2819
  console.log("[SDK-DEBUG] Starting OpenCode server...");
2811
2820
  server = await createOpencodeServer({
2812
2821
  config,