@wix/evalforge-evaluator 0.21.0 → 0.22.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 +11 -6
- package/build/index.js.map +2 -2
- package/build/index.mjs +11 -6
- package/build/index.mjs.map +2 -2
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -6285,6 +6285,9 @@ async function executeWithClaudeCode(skill, scenario, options) {
|
|
|
6285
6285
|
})
|
|
6286
6286
|
);
|
|
6287
6287
|
let messageCount = 0;
|
|
6288
|
+
const canUseTool = async () => {
|
|
6289
|
+
return { behavior: "allow" };
|
|
6290
|
+
};
|
|
6288
6291
|
const queryOptions = {
|
|
6289
6292
|
env: sdkEnv,
|
|
6290
6293
|
cwd: options.cwd,
|
|
@@ -6294,8 +6297,10 @@ async function executeWithClaudeCode(skill, scenario, options) {
|
|
|
6294
6297
|
maxTurns,
|
|
6295
6298
|
maxThinkingTokens: options.maxThinkingTokens,
|
|
6296
6299
|
mcpServers: options.mcpServers,
|
|
6297
|
-
|
|
6298
|
-
|
|
6300
|
+
// Use 'default' permission mode with custom canUseTool handler
|
|
6301
|
+
// instead of 'bypassPermissions' which fails on root
|
|
6302
|
+
permissionMode: "default",
|
|
6303
|
+
canUseTool
|
|
6299
6304
|
};
|
|
6300
6305
|
if (options.temperature !== void 0) {
|
|
6301
6306
|
queryOptions.temperature = options.temperature;
|
|
@@ -6314,8 +6319,8 @@ async function executeWithClaudeCode(skill, scenario, options) {
|
|
|
6314
6319
|
console.log("[SDK-DEBUG] maxTokens:", queryOptions.maxTokens);
|
|
6315
6320
|
console.log("[SDK-DEBUG] permissionMode:", queryOptions.permissionMode);
|
|
6316
6321
|
console.log(
|
|
6317
|
-
"[SDK-DEBUG]
|
|
6318
|
-
queryOptions.
|
|
6322
|
+
"[SDK-DEBUG] canUseTool:",
|
|
6323
|
+
queryOptions.canUseTool ? "custom handler (auto-allow)" : "not set"
|
|
6319
6324
|
);
|
|
6320
6325
|
console.log("[SDK-DEBUG] settingSources:", queryOptions.settingSources);
|
|
6321
6326
|
console.log("[SDK-DEBUG] allowedTools:", queryOptions.allowedTools);
|
|
@@ -7440,8 +7445,8 @@ async function testClaudeDirectExecution(config) {
|
|
|
7440
7445
|
15e3
|
|
7441
7446
|
);
|
|
7442
7447
|
const fullCmdResult = await runAndLog(
|
|
7443
|
-
"claude -p (
|
|
7444
|
-
`${envExports} && "${claudePath}" -p "Say hello" --output-format json
|
|
7448
|
+
"claude -p (with json output)",
|
|
7449
|
+
`${envExports} && "${claudePath}" -p "Say hello" --output-format json 2>&1`,
|
|
7445
7450
|
45e3
|
|
7446
7451
|
);
|
|
7447
7452
|
const simpleCmdResult = await runAndLog(
|