@wix/evalforge-evaluator 0.187.0 → 0.188.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/README.md +4 -0
- package/build/index.js +39 -30
- package/build/index.js.map +4 -4
- package/build/index.mjs +38 -30
- package/build/index.mjs.map +3 -3
- package/build/types/run-scenario/environment.d.ts +6 -2
- package/build/types/run-scenario/install-dependencies.d.ts +9 -1
- package/package.json +2 -2
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { Template } from '@wix/evalforge-types';
|
|
2
2
|
import type { EvaluatorConfig } from '../config.js';
|
|
3
|
+
export interface PrepareWorkingDirectoryOptions {
|
|
4
|
+
template?: Template;
|
|
5
|
+
}
|
|
3
6
|
/**
|
|
4
7
|
* Prepare the working directory for a scenario.
|
|
5
8
|
* If a template with source is provided, fetch files from GitHub.
|
|
@@ -9,7 +12,8 @@ import type { EvaluatorConfig } from '../config.js';
|
|
|
9
12
|
* @param evalRunId - The evaluation run ID
|
|
10
13
|
* @param targetId - The target ID (prompt agent, skill, or agent)
|
|
11
14
|
* @param scenarioId - The scenario ID (for per-scenario isolation when no template)
|
|
12
|
-
* @param
|
|
15
|
+
* @param onProgress - Required callback invoked with human-readable setup progress messages
|
|
16
|
+
* @param options - Optional settings: template (pre-fetched template entity)
|
|
13
17
|
* @returns The working directory path
|
|
14
18
|
*/
|
|
15
|
-
export declare function prepareWorkingDirectory(config: EvaluatorConfig, evalRunId: string, targetId: string, scenarioId: string,
|
|
19
|
+
export declare function prepareWorkingDirectory(config: EvaluatorConfig, evalRunId: string, targetId: string, scenarioId: string, onProgress: (message: string) => void, options?: PrepareWorkingDirectoryOptions): Promise<string>;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { execFileSync } from 'child_process';
|
|
2
|
+
export interface InstallDependenciesOptions {
|
|
3
|
+
exec?: typeof execFileSync;
|
|
4
|
+
cacheBase?: string;
|
|
5
|
+
}
|
|
2
6
|
/**
|
|
3
7
|
* Install dependencies in workDir if a package.json is present.
|
|
4
8
|
* Detects the package manager from the lock file and runs the appropriate install command.
|
|
@@ -7,5 +11,9 @@ import { execFileSync } from 'child_process';
|
|
|
7
11
|
* When cacheBase is provided, node_modules is cached keyed by the lock file hash.
|
|
8
12
|
* Subsequent calls with the same lock file content skip the install entirely —
|
|
9
13
|
* node_modules is restored via APFS clone on macOS (near-instant) or recursive copy on Linux.
|
|
14
|
+
*
|
|
15
|
+
* @param workDir - The directory in which to install dependencies
|
|
16
|
+
* @param onProgress - Callback invoked with a human-readable message when an install runs
|
|
17
|
+
* @param options - Optional settings: exec override and cacheBase directory
|
|
10
18
|
*/
|
|
11
|
-
export declare function installDependencies(workDir: string,
|
|
19
|
+
export declare function installDependencies(workDir: string, onProgress: (message: string) => void, options?: InstallDependenciesOptions): Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/evalforge-evaluator",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.188.0",
|
|
4
4
|
"description": "EvalForge Evaluator",
|
|
5
5
|
"bin": "./build/index.js",
|
|
6
6
|
"files": [
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"artifactId": "evalforge-evaluator"
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
|
-
"falconPackageHash": "
|
|
75
|
+
"falconPackageHash": "b8b148914d1fa0beef82451a376a65ce77a0c5aa77199a1f55f12f63"
|
|
76
76
|
}
|