@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.js +24 -31
- package/build/index.js.map +2 -2
- package/build/index.mjs +24 -31
- package/build/index.mjs.map +2 -2
- package/build/types/run-scenario/agents/claude-code/write-mcp.d.ts +7 -10
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -6546,54 +6546,48 @@ spawn error: ${err.message}`;
|
|
|
6546
6546
|
}
|
|
6547
6547
|
async function probeNpmConfig(cwd) {
|
|
6548
6548
|
const homedir = process.env.HOME ?? "~";
|
|
6549
|
-
const [
|
|
6550
|
-
|
|
6551
|
-
homeNpmrc,
|
|
6552
|
-
projectRootNpmrc,
|
|
6553
|
-
globalNpmrc,
|
|
6554
|
-
npmConfigListFull,
|
|
6555
|
-
npmConfigGetRegistry,
|
|
6556
|
-
npmViewWixMcp
|
|
6557
|
-
] = await Promise.all([
|
|
6558
|
-
(0, import_promises4.readFile)((0, import_path6.join)(cwd, ".npmrc"), "utf8").catch(
|
|
6559
|
-
(e) => `[not found: ${e.message}]`
|
|
6560
|
-
),
|
|
6561
|
-
(0, import_promises4.readFile)((0, import_path6.join)(homedir, ".npmrc"), "utf8").catch(
|
|
6562
|
-
(e) => `[not found: ${e.message}]`
|
|
6563
|
-
),
|
|
6564
|
-
(0, import_promises4.readFile)("/user-code/.npmrc", "utf8").catch(
|
|
6549
|
+
const [wixAuthFile, npmInstallDryRun, mcpPackageInstalled] = await Promise.all([
|
|
6550
|
+
(0, import_promises4.readFile)((0, import_path6.join)(homedir, ".wix", "auth", "api-key.json"), "utf8").catch(
|
|
6565
6551
|
(e) => `[not found: ${e.message}]`
|
|
6566
6552
|
),
|
|
6567
6553
|
runShellCapture(
|
|
6568
|
-
|
|
6554
|
+
"npm install --dry-run @wix/mcp 2>&1 | tail -15",
|
|
6569
6555
|
cwd,
|
|
6570
|
-
|
|
6556
|
+
15e3
|
|
6571
6557
|
),
|
|
6572
|
-
runShellCapture("npm config list -l 2>&1 | head -60", cwd, 5e3),
|
|
6573
|
-
runShellCapture("npm config get registry", cwd, 3e3),
|
|
6574
6558
|
runShellCapture(
|
|
6575
|
-
|
|
6559
|
+
'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',
|
|
6576
6560
|
cwd,
|
|
6577
|
-
|
|
6561
|
+
5e3
|
|
6578
6562
|
)
|
|
6579
6563
|
]);
|
|
6564
|
+
const wixAuthParsed = (() => {
|
|
6565
|
+
try {
|
|
6566
|
+
const parsed = JSON.parse(wixAuthFile);
|
|
6567
|
+
return JSON.stringify({
|
|
6568
|
+
hasToken: typeof parsed.token === "string",
|
|
6569
|
+
tokenLength: typeof parsed.token === "string" ? parsed.token.length : 0,
|
|
6570
|
+
hasAccountId: typeof parsed.accountId === "string",
|
|
6571
|
+
hasUserInfo: typeof parsed.userInfo === "object"
|
|
6572
|
+
});
|
|
6573
|
+
} catch {
|
|
6574
|
+
return wixAuthFile.slice(0, 500);
|
|
6575
|
+
}
|
|
6576
|
+
})();
|
|
6580
6577
|
const npmEnvVars = {};
|
|
6581
6578
|
for (const [key, value] of Object.entries(process.env)) {
|
|
6582
6579
|
const lk = key.toLowerCase();
|
|
6583
|
-
if (lk.startsWith("npm_config") || lk.includes("token") || lk.includes("auth") || lk.includes("registry")) {
|
|
6580
|
+
if (lk.startsWith("npm_config") || lk.includes("token") || lk.includes("auth") || lk.includes("registry") || lk.startsWith("wix_")) {
|
|
6584
6581
|
npmEnvVars[key] = lk.includes("token") || lk.includes("auth") || lk.includes("secret") ? `[REDACTED, length=${(value ?? "").length}]` : value;
|
|
6585
6582
|
}
|
|
6586
6583
|
}
|
|
6587
6584
|
return {
|
|
6588
6585
|
cwd,
|
|
6589
6586
|
processCwd: process.cwd(),
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
npmConfigListFull: npmConfigListFull.slice(0, 3e3),
|
|
6595
|
-
npmConfigGetRegistry: npmConfigGetRegistry.trim(),
|
|
6596
|
-
npmViewWixMcp: npmViewWixMcp.trim().slice(0, 500),
|
|
6587
|
+
wixAuthFile: wixAuthParsed,
|
|
6588
|
+
wixAuthFileExists: !wixAuthFile.startsWith("[not found"),
|
|
6589
|
+
npmInstallDryRun: npmInstallDryRun.trim().slice(0, 1500),
|
|
6590
|
+
mcpPackageInstalled: mcpPackageInstalled.trim().slice(0, 500),
|
|
6597
6591
|
npmEnvVars,
|
|
6598
6592
|
homedir
|
|
6599
6593
|
};
|
|
@@ -6887,7 +6881,6 @@ async function executeWithClaudeCode(skills, scenario, options) {
|
|
|
6887
6881
|
const startTime = /* @__PURE__ */ new Date();
|
|
6888
6882
|
const allMessages = [];
|
|
6889
6883
|
if (options.mcps && options.mcps.length > 0) {
|
|
6890
|
-
process.env.npm_config__auth = "";
|
|
6891
6884
|
await writeMcpToFilesystem(options.cwd, options.mcps);
|
|
6892
6885
|
const probeResults = await probeMcpServers(options.mcps);
|
|
6893
6886
|
if (options.traceContext) {
|