@wix/evalforge-evaluator 0.67.0 → 0.68.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
@@ -6533,54 +6533,48 @@ spawn error: ${err.message}`;
6533
6533
  }
6534
6534
  async function probeNpmConfig(cwd) {
6535
6535
  const homedir = process.env.HOME ?? "~";
6536
- const [
6537
- cwdNpmrc,
6538
- homeNpmrc,
6539
- projectRootNpmrc,
6540
- globalNpmrc,
6541
- npmConfigListFull,
6542
- npmConfigGetRegistry,
6543
- npmViewWixMcp
6544
- ] = await Promise.all([
6545
- readFile(join3(cwd, ".npmrc"), "utf8").catch(
6546
- (e) => `[not found: ${e.message}]`
6547
- ),
6548
- readFile(join3(homedir, ".npmrc"), "utf8").catch(
6549
- (e) => `[not found: ${e.message}]`
6550
- ),
6551
- readFile("/user-code/.npmrc", "utf8").catch(
6536
+ const [wixAuthFile, npmInstallDryRun, mcpPackageInstalled] = await Promise.all([
6537
+ readFile(join3(homedir, ".wix", "auth", "api-key.json"), "utf8").catch(
6552
6538
  (e) => `[not found: ${e.message}]`
6553
6539
  ),
6554
6540
  runShellCapture(
6555
- 'echo "=== globalconfig ===" && npm config get globalconfig && cat "$(npm config get globalconfig)" 2>/dev/null || echo "[no global npmrc]" && echo "=== userconfig ===" && npm config get userconfig && cat "$(npm config get userconfig)" 2>/dev/null || echo "[no user npmrc]" && echo "=== prefix ===" && npm config get prefix && cat "$(npm config get prefix)/etc/npmrc" 2>/dev/null || echo "[no prefix npmrc]"',
6541
+ "npm install --dry-run @wix/mcp 2>&1 | tail -15",
6556
6542
  cwd,
6557
- 5e3
6543
+ 15e3
6558
6544
  ),
6559
- runShellCapture("npm config list -l 2>&1 | head -60", cwd, 5e3),
6560
- runShellCapture("npm config get registry", cwd, 3e3),
6561
6545
  runShellCapture(
6562
- "npm view @wix/mcp version --registry https://registry.npmjs.org 2>&1",
6546
+ 'ls -la $(npm root -g)/@wix/mcp/package.json 2>/dev/null || echo "[not globally installed]" && npm list -g @wix/mcp 2>&1 | tail -5',
6563
6547
  cwd,
6564
- 1e4
6548
+ 5e3
6565
6549
  )
6566
6550
  ]);
6551
+ const wixAuthParsed = (() => {
6552
+ try {
6553
+ const parsed = JSON.parse(wixAuthFile);
6554
+ return JSON.stringify({
6555
+ hasToken: typeof parsed.token === "string",
6556
+ tokenLength: typeof parsed.token === "string" ? parsed.token.length : 0,
6557
+ hasAccountId: typeof parsed.accountId === "string",
6558
+ hasUserInfo: typeof parsed.userInfo === "object"
6559
+ });
6560
+ } catch {
6561
+ return wixAuthFile.slice(0, 500);
6562
+ }
6563
+ })();
6567
6564
  const npmEnvVars = {};
6568
6565
  for (const [key, value] of Object.entries(process.env)) {
6569
6566
  const lk = key.toLowerCase();
6570
- if (lk.startsWith("npm_config") || lk.includes("token") || lk.includes("auth") || lk.includes("registry")) {
6567
+ if (lk.startsWith("npm_config") || lk.includes("token") || lk.includes("auth") || lk.includes("registry") || lk.startsWith("wix_")) {
6571
6568
  npmEnvVars[key] = lk.includes("token") || lk.includes("auth") || lk.includes("secret") ? `[REDACTED, length=${(value ?? "").length}]` : value;
6572
6569
  }
6573
6570
  }
6574
6571
  return {
6575
6572
  cwd,
6576
6573
  processCwd: process.cwd(),
6577
- cwdNpmrc: cwdNpmrc.slice(0, 1e3),
6578
- homeNpmrc: homeNpmrc.slice(0, 1e3),
6579
- projectRootNpmrc: projectRootNpmrc.slice(0, 1e3),
6580
- globalNpmrc: globalNpmrc.slice(0, 2e3),
6581
- npmConfigListFull: npmConfigListFull.slice(0, 3e3),
6582
- npmConfigGetRegistry: npmConfigGetRegistry.trim(),
6583
- npmViewWixMcp: npmViewWixMcp.trim().slice(0, 500),
6574
+ wixAuthFile: wixAuthParsed,
6575
+ wixAuthFileExists: !wixAuthFile.startsWith("[not found"),
6576
+ npmInstallDryRun: npmInstallDryRun.trim().slice(0, 1500),
6577
+ mcpPackageInstalled: mcpPackageInstalled.trim().slice(0, 500),
6584
6578
  npmEnvVars,
6585
6579
  homedir
6586
6580
  };
@@ -6874,7 +6868,6 @@ async function executeWithClaudeCode(skills, scenario, options) {
6874
6868
  const startTime = /* @__PURE__ */ new Date();
6875
6869
  const allMessages = [];
6876
6870
  if (options.mcps && options.mcps.length > 0) {
6877
- process.env.npm_config__auth = "";
6878
6871
  await writeMcpToFilesystem(options.cwd, options.mcps);
6879
6872
  const probeResults = await probeMcpServers(options.mcps);
6880
6873
  if (options.traceContext) {