veryfront 0.1.1060 → 0.1.1063
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/esm/_dnt.polyfills.d.ts +11 -11
- package/esm/_dnt.polyfills.d.ts.map +1 -1
- package/esm/_dnt.polyfills.js +14 -14
- package/esm/cli/commands/demo/demo.d.ts.map +1 -1
- package/esm/cli/commands/demo/demo.js +2 -1
- package/esm/cli/commands/demo/steps.js +4 -4
- package/esm/cli/commands/deploy/command-help.d.ts.map +1 -1
- package/esm/cli/commands/deploy/command-help.js +6 -1
- package/esm/cli/commands/eval/command.d.ts +4 -0
- package/esm/cli/commands/eval/command.d.ts.map +1 -1
- package/esm/cli/commands/eval/command.js +203 -108
- package/esm/cli/commands/init/init-command.d.ts.map +1 -1
- package/esm/cli/commands/init/init-command.js +5 -4
- package/esm/cli/commands/pull/command-help.d.ts.map +1 -1
- package/esm/cli/commands/pull/command-help.js +15 -3
- package/esm/cli/commands/pull/command.d.ts +8 -1
- package/esm/cli/commands/pull/command.d.ts.map +1 -1
- package/esm/cli/commands/pull/command.js +310 -64
- package/esm/cli/commands/push/command-help.d.ts.map +1 -1
- package/esm/cli/commands/push/command-help.js +11 -5
- package/esm/cli/commands/push/command.d.ts +3 -3
- package/esm/cli/commands/push/command.d.ts.map +1 -1
- package/esm/cli/commands/push/command.js +27 -6
- package/esm/cli/help/tips.d.ts.map +1 -1
- package/esm/cli/help/tips.js +3 -2
- package/esm/cli/skills/core-skills.js +8 -8
- package/esm/cli/sync/ignore.d.ts.map +1 -1
- package/esm/cli/sync/ignore.js +18 -1
- package/esm/cli/utils/env-prompt.d.ts.map +1 -1
- package/esm/cli/utils/env-prompt.js +17 -4
- package/esm/deno.js +2 -1
- package/esm/extensions/ext-eval-report-mlflow/src/index.d.ts +35 -0
- package/esm/extensions/ext-eval-report-mlflow/src/index.d.ts.map +1 -0
- package/esm/extensions/ext-eval-report-mlflow/src/index.js +812 -0
- package/esm/src/extensions/builtin-extensions.d.ts +5 -1
- package/esm/src/extensions/builtin-extensions.d.ts.map +1 -1
- package/esm/src/extensions/builtin-extensions.js +41 -2
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +5 -5
package/esm/_dnt.polyfills.d.ts
CHANGED
|
@@ -109,6 +109,17 @@ interface ImportMetaPonyfill extends ImportMetaPonyfillCommonjs, ImportMetaPonyf
|
|
|
109
109
|
export declare let import_meta_ponyfill_commonjs: ImportMetaPonyfillCommonjs;
|
|
110
110
|
export declare let import_meta_ponyfill_esmodule: ImportMetaPonyfillEsmodule;
|
|
111
111
|
export declare let import_meta_ponyfill: ImportMetaPonyfill;
|
|
112
|
+
declare global {
|
|
113
|
+
interface Object {
|
|
114
|
+
/**
|
|
115
|
+
* Determines whether an object has a property with the specified name.
|
|
116
|
+
* @param o An object.
|
|
117
|
+
* @param v A property name.
|
|
118
|
+
*/
|
|
119
|
+
hasOwn(o: object, v: PropertyKey): boolean;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
export {};
|
|
112
123
|
declare global {
|
|
113
124
|
interface Array<T> {
|
|
114
125
|
/**
|
|
@@ -158,17 +169,6 @@ declare global {
|
|
|
158
169
|
}
|
|
159
170
|
}
|
|
160
171
|
export {};
|
|
161
|
-
declare global {
|
|
162
|
-
interface Object {
|
|
163
|
-
/**
|
|
164
|
-
* Determines whether an object has a property with the specified name.
|
|
165
|
-
* @param o An object.
|
|
166
|
-
* @param v A property name.
|
|
167
|
-
*/
|
|
168
|
-
hasOwn(o: object, v: PropertyKey): boolean;
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
export {};
|
|
172
172
|
declare global {
|
|
173
173
|
interface PromiseConstructor {
|
|
174
174
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_dnt.polyfills.d.ts","sourceRoot":"","sources":["../src/_dnt.polyfills.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAA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;;;;;;;;WAQG;QACH,aAAa,CACT,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,KAAK,OAAO,EACvE,OAAO,CAAC,EAAE,GAAG,GACd,MAAM,CAAC;KACX;CACF;AA4CD,OAAO,EAAE,CAAC;AACV,OAAO,CAAC,MAAM,CAAC;IAEb,UAAU,kBAAkB;QAC1B;;;WAGG;QACH,aAAa,CAAC,CAAC,KAAK;YAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;YAAC,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;YAAC,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,GAAG,KAAK,IAAI,CAAA;SAAE,CAAC;KAC3H;CACF"}
|
package/esm/_dnt.polyfills.js
CHANGED
|
@@ -222,6 +222,20 @@ export let import_meta_ponyfill = ((...args) => {
|
|
|
222
222
|
//@ts-ignore
|
|
223
223
|
return import_meta_ponyfill(...args);
|
|
224
224
|
});
|
|
225
|
+
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
226
|
+
if (!Object.hasOwn) {
|
|
227
|
+
Object.defineProperty(Object, "hasOwn", {
|
|
228
|
+
value: function (object, property) {
|
|
229
|
+
if (object == null) {
|
|
230
|
+
throw new TypeError("Cannot convert undefined or null to object");
|
|
231
|
+
}
|
|
232
|
+
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
233
|
+
},
|
|
234
|
+
configurable: true,
|
|
235
|
+
enumerable: false,
|
|
236
|
+
writable: true,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
225
239
|
function findLastIndex(self, callbackfn, that) {
|
|
226
240
|
const boundFunc = that === undefined ? callbackfn : callbackfn.bind(that);
|
|
227
241
|
let index = self.length - 1;
|
|
@@ -258,20 +272,6 @@ if (!Uint8Array.prototype.findLast) {
|
|
|
258
272
|
return findLast(this, callbackfn, that);
|
|
259
273
|
};
|
|
260
274
|
}
|
|
261
|
-
// https://github.com/tc39/proposal-accessible-object-hasownproperty/blob/main/polyfill.js
|
|
262
|
-
if (!Object.hasOwn) {
|
|
263
|
-
Object.defineProperty(Object, "hasOwn", {
|
|
264
|
-
value: function (object, property) {
|
|
265
|
-
if (object == null) {
|
|
266
|
-
throw new TypeError("Cannot convert undefined or null to object");
|
|
267
|
-
}
|
|
268
|
-
return Object.prototype.hasOwnProperty.call(Object(object), property);
|
|
269
|
-
},
|
|
270
|
-
configurable: true,
|
|
271
|
-
enumerable: false,
|
|
272
|
-
writable: true,
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
275
|
// https://github.com/tc39/proposal-promise-with-resolvers/blob/3a78801e073e99217dbeb2c43ba7212f3bdc8b83/polyfills.js#L1C1-L9C2
|
|
276
276
|
if (Promise.withResolvers === undefined) {
|
|
277
277
|
Promise.withResolvers = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqDH,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AA6Y9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"demo.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/demo/demo.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqDH,KAAK,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,WAAW,GAAG,OAAO,CAAC;AA6Y9D,MAAM,WAAW,WAAW;IAC1B,yDAAyD;IACzD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,8CAA8C;IAC9C,WAAW,CAAC,EAAE,UAAU,CAAC;CAC1B;AA+DD,wBAAsB,WAAW,CAAC,OAAO,GAAE,WAAgB,GAAG,OAAO,CAAC,IAAI,CAAC,CAmH1E"}
|
|
@@ -482,7 +482,8 @@ export async function demoCommand(options = {}) {
|
|
|
482
482
|
console.log();
|
|
483
483
|
console.log(` ${dim("1.")} Edit your app in ${brand(`${projectName}/`)}`);
|
|
484
484
|
console.log(` ${dim("2.")} Run ${brand("veryfront dev")} to start developing`);
|
|
485
|
-
console.log(` ${dim("3.")} Run ${brand("veryfront
|
|
485
|
+
console.log(` ${dim("3.")} Run ${brand("veryfront push --branch main")} to upload changes`);
|
|
486
|
+
console.log(` ${dim("4.")} Run ${brand("veryfront deploy --branch main --env production")} to create a release and deploy`);
|
|
486
487
|
console.log();
|
|
487
488
|
console.log(` ${dim("Learn more at https://veryfront.com/docs")}`);
|
|
488
489
|
console.log();
|
|
@@ -40,12 +40,12 @@ export const DEMO_STEPS = [
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
id: "deploy",
|
|
43
|
-
title: "
|
|
43
|
+
title: "Create a Release and Deploy",
|
|
44
44
|
description: [
|
|
45
|
-
"
|
|
46
|
-
"
|
|
45
|
+
"The demo pushed your source to main when it created the project.",
|
|
46
|
+
"Now create a release from that source and deploy it to production.",
|
|
47
47
|
],
|
|
48
|
-
command: "veryfront deploy",
|
|
48
|
+
command: "veryfront deploy --branch main --env production",
|
|
49
49
|
hasAction: true,
|
|
50
50
|
},
|
|
51
51
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"command-help.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/deploy/command-help.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,eAAO,MAAM,UAAU,EAAE,WA6CxB,CAAC"}
|
|
@@ -18,18 +18,23 @@ export const deployHelp = {
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
flag: "-f, --force",
|
|
21
|
-
description: "
|
|
21
|
+
description: "Skip confirmation for compatibility (prefer global --yes)",
|
|
22
22
|
},
|
|
23
23
|
{
|
|
24
24
|
flag: "--dry-run",
|
|
25
25
|
description: "Preview without executing",
|
|
26
26
|
},
|
|
27
|
+
{
|
|
28
|
+
flag: "-q, --quiet",
|
|
29
|
+
description: "Suppress progress and summary output",
|
|
30
|
+
},
|
|
27
31
|
],
|
|
28
32
|
examples: [
|
|
29
33
|
"veryfront deploy",
|
|
30
34
|
"veryfront deploy --env staging",
|
|
31
35
|
"veryfront deploy --branch feature-x --env preview",
|
|
32
36
|
"veryfront deploy --release-name v1.2.0",
|
|
37
|
+
"veryfront deploy --branch main --env production --yes",
|
|
33
38
|
"veryfront deploy --dry-run",
|
|
34
39
|
],
|
|
35
40
|
notes: [
|
|
@@ -2,6 +2,7 @@ import type { AgentResponse } from "../../../src/agent/index.js";
|
|
|
2
2
|
import type { VeryfrontConfig } from "../../../src/config/index.js";
|
|
3
3
|
import { type Tool, type ToolExecutionContext } from "../../../src/tool/index.js";
|
|
4
4
|
import type { DiscoveredEval, EvalModelComparison, EvalModelComparisonOptions, EvalReport, EvalReportComparison, EvalReportExportConfig, EvalToolAdapterContext, EvalToolCall } from "../../../src/eval/index.js";
|
|
5
|
+
import { type EvalReportExporterRegistry, type EvalReportExportRedaction } from "../../../src/extensions/eval/index.js";
|
|
5
6
|
import type { EvalArgs } from "./handler.js";
|
|
6
7
|
export interface EvalOptions extends EvalArgs {
|
|
7
8
|
}
|
|
@@ -89,6 +90,7 @@ export declare function createToolAdapter(tool: Tool, baseContext?: ToolExecutio
|
|
|
89
90
|
durationMs: number;
|
|
90
91
|
completed: boolean;
|
|
91
92
|
}>;
|
|
93
|
+
export declare function createEvalCliExportConfig(evalItem: DiscoveredEval, options: EvalOptions, projectDir: string, artifactPaths: EvalArtifactPaths, registry: EvalReportExporterRegistry, config?: EvalRuntimeAuthConfig | null): EvalReportExportConfig | undefined;
|
|
92
94
|
type EvalModelComparisonConfig = {
|
|
93
95
|
baselineModel: string;
|
|
94
96
|
candidateModels: string[];
|
|
@@ -99,6 +101,8 @@ type ResolvedEvalModelComparisonConfig = {
|
|
|
99
101
|
config: EvalModelComparisonConfig;
|
|
100
102
|
policy: EvalModelComparisonPolicy;
|
|
101
103
|
};
|
|
104
|
+
export declare function resolveEvalExporterIds(options: Pick<EvalOptions, "exporters">): string[];
|
|
105
|
+
export declare function resolveEvalExportRedactionFromEnv(): EvalReportExportRedaction;
|
|
102
106
|
export declare function evalCommand(options: EvalOptions): Promise<void>;
|
|
103
107
|
export {};
|
|
104
108
|
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/eval/command.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAS,aAAa,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAgC,KAAK,IAAI,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAChH,OAAO,KAAK,EACV,cAAc,EAGd,mBAAmB,EAEnB,0BAA0B,EAE1B,UAAU,EACV,oBAAoB,EAEpB,sBAAsB,EACtB,sBAAsB,EACtB,YAAY,EAEb,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"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B,aAAa,EAAE,iBAAiB,EAChC,QAAQ,EAAE,0BAA0B,EACpC,MAAM,CAAC,EAAE,qBAAqB,GAAG,IAAI,GACpC,sBAAsB,GAAG,SAAS,CAkBpC;AAED,KAAK,yBAAyB,GAAG;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC;AAEF,KAAK,iCAAiC,GAAG;IACvC,MAAM,EAAE,yBAAyB,CAAC;IAClC,MAAM,EAAE,yBAAyB,CAAC;CACnC,CAAC;AAuBF,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG,MAAM,EAAE,CAOxF;AA2BD,wBAAgB,iCAAiC,IAAI,yBAAyB,CAuB7E;AA8OD,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAgMrE"}
|
|
@@ -5,13 +5,26 @@ import * as dntShim from "../../../_dnt.shims.js";
|
|
|
5
5
|
import { dirname, isAbsolute, join, relative, resolve } from "../../../deps/jsr.io/@std/path/1.1.4/mod.js";
|
|
6
6
|
import { isErroredToolExecutionResult } from "../../../src/tool/index.js";
|
|
7
7
|
import { createProjectDiscoveryConfig, discoverAll } from "../../../src/discovery/index.js";
|
|
8
|
+
import { orchestrateExtensions } from "../../../src/extensions/index.js";
|
|
9
|
+
import { createEvalReportExporterRegistry, EvalReportExporterRegistryName, } from "../../../src/extensions/eval/index.js";
|
|
10
|
+
import { createLLMProviderRegistry, LLMProviderRegistryName } from "../../../src/extensions/llm/index.js";
|
|
8
11
|
import { compareEvalModelReports, compareEvalReports, createEvalModelComparisonMarkdown, createEvalRunId, discoverEvals, EVAL_REPORT_SCHEMA_VERSION, exportEvalReport, resolveEvalRunProvenance, runEval, } from "../../../src/eval/index.js";
|
|
9
12
|
import { getCurrentVeryfrontCloudContext, getVeryfrontCloudBootstrap, runWithVeryfrontCloudContextAsync, } from "../../../src/provider/index.js";
|
|
10
13
|
import { applyRuntimeAuthContext } from "../../shared/runtime-auth.js";
|
|
11
14
|
import { cliLogger, exitProcess, VERSION } from "../../utils/index.js";
|
|
12
15
|
import { createErrorEnvelope, createSuccessEnvelope, isJsonMode, outputJson, } from "../../shared/json-output.js";
|
|
13
16
|
import { withProjectSourceContext } from "../../shared/project-source-context.js";
|
|
17
|
+
import { createEvalCliBuiltinExtensions } from "../../../src/extensions/builtin-extensions.js";
|
|
14
18
|
const GATEWAY_BILLING_GROUP_USAGE_NOT_READY_CODE = "gateway_billing_group_usage_not_ready";
|
|
19
|
+
const ENV_EVAL_EXPORTERS = "VERYFRONT_EVAL_EXPORTERS";
|
|
20
|
+
const ENV_EVAL_EXPORT = "VERYFRONT_EVAL_EXPORT";
|
|
21
|
+
const ENV_EVAL_EXPORT_INCLUDE_INPUTS = "VERYFRONT_EVAL_EXPORT_INCLUDE_INPUTS";
|
|
22
|
+
const ENV_EVAL_EXPORT_INCLUDE_OUTPUTS = "VERYFRONT_EVAL_EXPORT_INCLUDE_OUTPUTS";
|
|
23
|
+
const ENV_EVAL_EXPORT_INCLUDE_REFERENCES = "VERYFRONT_EVAL_EXPORT_INCLUDE_REFERENCES";
|
|
24
|
+
const ENV_EVAL_EXPORT_INCLUDE_TRACES = "VERYFRONT_EVAL_EXPORT_INCLUDE_TRACES";
|
|
25
|
+
const ENV_EVAL_EXPORT_INCLUDE_METRIC_EVIDENCE = "VERYFRONT_EVAL_EXPORT_INCLUDE_METRIC_EVIDENCE";
|
|
26
|
+
const ENV_EVAL_EXPORT_INCLUDE_METRIC_EXPLANATIONS = "VERYFRONT_EVAL_EXPORT_INCLUDE_METRIC_EXPLANATIONS";
|
|
27
|
+
const ENV_EVAL_EXPORT_METADATA_ALLOWLIST = "VERYFRONT_EVAL_EXPORT_METADATA_ALLOWLIST";
|
|
15
28
|
// Gateway usage capture is eventually consistent after model streams close.
|
|
16
29
|
const DEFAULT_GATEWAY_BILLING_FINALIZE_RETRY_DELAYS_MS = [
|
|
17
30
|
500,
|
|
@@ -804,24 +817,102 @@ function printReport(report, baseline) {
|
|
|
804
817
|
}
|
|
805
818
|
}
|
|
806
819
|
}
|
|
807
|
-
function createEvalCliExportConfig(evalItem, options, projectDir, artifactPaths) {
|
|
808
|
-
|
|
820
|
+
export function createEvalCliExportConfig(evalItem, options, projectDir, artifactPaths, registry, config) {
|
|
821
|
+
const exporterIds = resolveEvalExporterIds(options);
|
|
822
|
+
if (exporterIds.length === 0)
|
|
809
823
|
return undefined;
|
|
824
|
+
const projectReference = resolveEvalRuntimeProjectSlug(config);
|
|
810
825
|
return {
|
|
811
|
-
|
|
826
|
+
registry,
|
|
827
|
+
exporterIds,
|
|
812
828
|
context: {
|
|
813
829
|
evalId: evalItem.definition.id,
|
|
830
|
+
...(projectReference ? { projectReference } : {}),
|
|
814
831
|
sourcePath: displaySourcePath(evalItem.filePath, projectDir),
|
|
815
832
|
reportPath: options.report ?? artifactPaths.summary,
|
|
816
833
|
tags: evalItem.definition.tags,
|
|
817
834
|
metadata: evalItem.definition.metadata,
|
|
818
|
-
redaction:
|
|
835
|
+
redaction: resolveEvalExportRedactionFromEnv(),
|
|
819
836
|
},
|
|
820
837
|
};
|
|
821
838
|
}
|
|
822
839
|
function uniqueValues(values) {
|
|
823
840
|
return Array.from(new Set(values.map((value) => value.trim()).filter(Boolean)));
|
|
824
841
|
}
|
|
842
|
+
function readEvalCliEnv(name) {
|
|
843
|
+
try {
|
|
844
|
+
const value = dntShim.Deno.env.get(name);
|
|
845
|
+
return value && value.trim().length > 0 ? value : undefined;
|
|
846
|
+
}
|
|
847
|
+
catch {
|
|
848
|
+
return undefined;
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
function parseEvalExporterList(value) {
|
|
852
|
+
if (!value)
|
|
853
|
+
return [];
|
|
854
|
+
return value
|
|
855
|
+
.split(/[,\s]+/)
|
|
856
|
+
.map((entry) => entry.trim())
|
|
857
|
+
.filter((entry) => entry.length > 0);
|
|
858
|
+
}
|
|
859
|
+
export function resolveEvalExporterIds(options) {
|
|
860
|
+
if (options.exporters.length > 0)
|
|
861
|
+
return uniqueValues(options.exporters);
|
|
862
|
+
const envExporters = parseEvalExporterList(readEvalCliEnv(ENV_EVAL_EXPORTERS));
|
|
863
|
+
if (envExporters.length > 0)
|
|
864
|
+
return uniqueValues(envExporters);
|
|
865
|
+
return uniqueValues(parseEvalExporterList(readEvalCliEnv(ENV_EVAL_EXPORT)));
|
|
866
|
+
}
|
|
867
|
+
function parseEvalExportBooleanEnv(name) {
|
|
868
|
+
const value = readEvalCliEnv(name)?.toLowerCase();
|
|
869
|
+
if (value === undefined)
|
|
870
|
+
return undefined;
|
|
871
|
+
if (["1", "true", "yes", "on"].includes(value))
|
|
872
|
+
return true;
|
|
873
|
+
if (["0", "false", "no", "off"].includes(value))
|
|
874
|
+
return false;
|
|
875
|
+
return false;
|
|
876
|
+
}
|
|
877
|
+
function assignEvalExportBooleanEnv(redaction, key, envName) {
|
|
878
|
+
const value = parseEvalExportBooleanEnv(envName);
|
|
879
|
+
if (value !== undefined)
|
|
880
|
+
redaction[key] = value;
|
|
881
|
+
}
|
|
882
|
+
export function resolveEvalExportRedactionFromEnv() {
|
|
883
|
+
const redaction = {};
|
|
884
|
+
assignEvalExportBooleanEnv(redaction, "includeInputs", ENV_EVAL_EXPORT_INCLUDE_INPUTS);
|
|
885
|
+
assignEvalExportBooleanEnv(redaction, "includeOutputs", ENV_EVAL_EXPORT_INCLUDE_OUTPUTS);
|
|
886
|
+
assignEvalExportBooleanEnv(redaction, "includeReferences", ENV_EVAL_EXPORT_INCLUDE_REFERENCES);
|
|
887
|
+
assignEvalExportBooleanEnv(redaction, "includeTraces", ENV_EVAL_EXPORT_INCLUDE_TRACES);
|
|
888
|
+
assignEvalExportBooleanEnv(redaction, "includeMetricEvidence", ENV_EVAL_EXPORT_INCLUDE_METRIC_EVIDENCE);
|
|
889
|
+
assignEvalExportBooleanEnv(redaction, "includeMetricExplanations", ENV_EVAL_EXPORT_INCLUDE_METRIC_EXPLANATIONS);
|
|
890
|
+
const metadataAllowlist = parseEvalExporterList(readEvalCliEnv(ENV_EVAL_EXPORT_METADATA_ALLOWLIST));
|
|
891
|
+
if (metadataAllowlist.length > 0)
|
|
892
|
+
redaction.metadataAllowlist = uniqueValues(metadataAllowlist);
|
|
893
|
+
return redaction;
|
|
894
|
+
}
|
|
895
|
+
function createEvalCliPrimeContracts() {
|
|
896
|
+
const exporterRegistry = createEvalReportExporterRegistry();
|
|
897
|
+
return {
|
|
898
|
+
exporterRegistry,
|
|
899
|
+
contracts: {
|
|
900
|
+
[LLMProviderRegistryName]: createLLMProviderRegistry(),
|
|
901
|
+
[EvalReportExporterRegistryName]: exporterRegistry,
|
|
902
|
+
},
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
async function setupEvalCliExtensions(projectDir, config, exporterIds) {
|
|
906
|
+
const primeContracts = createEvalCliPrimeContracts();
|
|
907
|
+
const loader = await orchestrateExtensions({
|
|
908
|
+
projectDir,
|
|
909
|
+
config,
|
|
910
|
+
logger: cliLogger.component("eval-extensions"),
|
|
911
|
+
primeContracts: primeContracts.contracts,
|
|
912
|
+
builtinExtensions: createEvalCliBuiltinExtensions(exporterIds),
|
|
913
|
+
});
|
|
914
|
+
return { loader, exporterRegistry: primeContracts.exporterRegistry };
|
|
915
|
+
}
|
|
825
916
|
function resolveEvalModelComparisonConfig(options) {
|
|
826
917
|
const candidateModels = uniqueValues(options.candidateModels);
|
|
827
918
|
const baselineModel = options.baselineModel?.trim();
|
|
@@ -872,7 +963,7 @@ async function runEvalModelComparison(input) {
|
|
|
872
963
|
const modelPaths = paths.models[model];
|
|
873
964
|
const modelOptions = { ...input.options, model, report: undefined };
|
|
874
965
|
const modelRunId = `${runId}_${sanitizeModelIdForPath(model)}`;
|
|
875
|
-
const exportConfig = createEvalCliExportConfig(input.evalItem, modelOptions, input.projectDir, modelPaths);
|
|
966
|
+
const exportConfig = createEvalCliExportConfig(input.evalItem, modelOptions, input.projectDir, modelPaths, input.exporterRegistry, input.projectReference ? { projectSlug: input.projectReference } : undefined);
|
|
876
967
|
const finalizedReport = await runEvalWithGatewayBillingGroup(modelRunId, () => runEval(input.evalItem.definition, {
|
|
877
968
|
baseDir: input.options.datasetBase ?? input.projectDir,
|
|
878
969
|
runId: modelRunId,
|
|
@@ -917,7 +1008,7 @@ async function runEvalModelComparison(input) {
|
|
|
917
1008
|
if (input.options.report)
|
|
918
1009
|
cliLogger.info(`Report: ${input.options.report}`);
|
|
919
1010
|
}
|
|
920
|
-
|
|
1011
|
+
return createEvalModelComparisonExitCode(reports);
|
|
921
1012
|
}
|
|
922
1013
|
async function outputEvalNotFound(id, evals) {
|
|
923
1014
|
if (isJsonMode()) {
|
|
@@ -939,7 +1030,7 @@ async function outputEvalNotFound(id, evals) {
|
|
|
939
1030
|
cliLogger.info("No evals found. Create an eval file in evals/.");
|
|
940
1031
|
}
|
|
941
1032
|
}
|
|
942
|
-
|
|
1033
|
+
return 1;
|
|
943
1034
|
}
|
|
944
1035
|
async function outputAgentNotFound(agentId) {
|
|
945
1036
|
if (isJsonMode()) {
|
|
@@ -952,7 +1043,7 @@ async function outputAgentNotFound(agentId) {
|
|
|
952
1043
|
else {
|
|
953
1044
|
cliLogger.error(`Agent "${agentId}" not found for eval target.`);
|
|
954
1045
|
}
|
|
955
|
-
|
|
1046
|
+
return 1;
|
|
956
1047
|
}
|
|
957
1048
|
async function outputToolNotFound(toolId) {
|
|
958
1049
|
if (isJsonMode()) {
|
|
@@ -965,7 +1056,7 @@ async function outputToolNotFound(toolId) {
|
|
|
965
1056
|
else {
|
|
966
1057
|
cliLogger.error(`Tool "${toolId}" not found for eval target.`);
|
|
967
1058
|
}
|
|
968
|
-
|
|
1059
|
+
return 1;
|
|
969
1060
|
}
|
|
970
1061
|
async function outputEvalUsageError(message) {
|
|
971
1062
|
if (isJsonMode()) {
|
|
@@ -978,11 +1069,11 @@ async function outputEvalUsageError(message) {
|
|
|
978
1069
|
else {
|
|
979
1070
|
cliLogger.error(message);
|
|
980
1071
|
}
|
|
981
|
-
|
|
1072
|
+
return 2;
|
|
982
1073
|
}
|
|
983
1074
|
export async function evalCommand(options) {
|
|
984
1075
|
const projectDir = dntShim.Deno.cwd();
|
|
985
|
-
await withProjectSourceContext(projectDir, async ({ adapter, config }) => {
|
|
1076
|
+
const exitCode = await withProjectSourceContext(projectDir, async ({ adapter, config }) => {
|
|
986
1077
|
await hydrateEvalRuntimeAuth(projectDir, config);
|
|
987
1078
|
const evalDiscovery = await discoverEvals({ projectDir, adapter, config });
|
|
988
1079
|
if (options.debug) {
|
|
@@ -994,17 +1085,17 @@ export async function evalCommand(options) {
|
|
|
994
1085
|
const evals = listEvals(evalDiscovery.evals, projectDir);
|
|
995
1086
|
if (isJsonMode()) {
|
|
996
1087
|
await outputJson(createSuccessEnvelope("eval", { evals, errors: evalDiscovery.errors }));
|
|
997
|
-
return;
|
|
1088
|
+
return undefined;
|
|
998
1089
|
}
|
|
999
1090
|
if (evals.length === 0) {
|
|
1000
1091
|
cliLogger.info("No evals found.");
|
|
1001
|
-
return;
|
|
1092
|
+
return undefined;
|
|
1002
1093
|
}
|
|
1003
1094
|
cliLogger.info("Evals:");
|
|
1004
1095
|
for (const item of evals) {
|
|
1005
1096
|
cliLogger.info(` - ${item.id} (${item.target})`);
|
|
1006
1097
|
}
|
|
1007
|
-
return;
|
|
1098
|
+
return undefined;
|
|
1008
1099
|
}
|
|
1009
1100
|
if (!options.id) {
|
|
1010
1101
|
if (isJsonMode()) {
|
|
@@ -1017,121 +1108,125 @@ export async function evalCommand(options) {
|
|
|
1017
1108
|
else {
|
|
1018
1109
|
cliLogger.error("Eval id is required. Usage: veryfront eval <eval-id>");
|
|
1019
1110
|
}
|
|
1020
|
-
|
|
1021
|
-
return;
|
|
1111
|
+
return 2;
|
|
1022
1112
|
}
|
|
1023
1113
|
const evalId = normalizeEvalCliId(options.id);
|
|
1024
1114
|
const evalItem = findEvalForCliId(evalDiscovery.evals, options.id);
|
|
1025
1115
|
if (!evalItem) {
|
|
1026
|
-
await outputEvalNotFound(evalId, evalDiscovery.evals);
|
|
1027
|
-
return;
|
|
1116
|
+
return await outputEvalNotFound(evalId, evalDiscovery.evals);
|
|
1028
1117
|
}
|
|
1029
1118
|
let modelComparisonConfig;
|
|
1030
1119
|
try {
|
|
1031
1120
|
modelComparisonConfig = await createResolvedEvalModelComparisonConfig(projectDir, options);
|
|
1032
1121
|
}
|
|
1033
1122
|
catch (error) {
|
|
1034
|
-
await outputEvalUsageError(error instanceof Error ? error.message : String(error));
|
|
1035
|
-
return;
|
|
1123
|
+
return await outputEvalUsageError(error instanceof Error ? error.message : String(error));
|
|
1036
1124
|
}
|
|
1037
1125
|
if (evalItem.definition.targetKind !== "agent") {
|
|
1038
1126
|
if (modelComparisonConfig) {
|
|
1039
|
-
await outputEvalUsageError("Model comparison flags are only supported for agent evals.");
|
|
1040
|
-
return;
|
|
1127
|
+
return await outputEvalUsageError("Model comparison flags are only supported for agent evals.");
|
|
1041
1128
|
}
|
|
1042
1129
|
if (options.model || options.maxOutputTokens) {
|
|
1043
|
-
await outputEvalUsageError("--model and --max-output-tokens are only supported for agent evals.");
|
|
1044
|
-
return;
|
|
1130
|
+
return await outputEvalUsageError("--model and --max-output-tokens are only supported for agent evals.");
|
|
1045
1131
|
}
|
|
1046
1132
|
}
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
verbose: options.debug,
|
|
1052
|
-
});
|
|
1053
|
-
const projectDiscovery = await discoverAll(discoveryConfig);
|
|
1054
|
-
const agentId = evalItem.definition.targetKind === "agent"
|
|
1055
|
-
? resolveAgentTargetId(evalItem.definition.target)
|
|
1056
|
-
: undefined;
|
|
1057
|
-
const toolId = evalItem.definition.targetKind === "tool"
|
|
1058
|
-
? resolveToolTargetId(evalItem.definition.target)
|
|
1059
|
-
: undefined;
|
|
1060
|
-
const agent = agentId ? projectDiscovery.agents.get(agentId) : undefined;
|
|
1061
|
-
const tool = toolId ? projectDiscovery.tools.get(toolId) : undefined;
|
|
1062
|
-
if (agentId && !agent) {
|
|
1063
|
-
await outputAgentNotFound(agentId);
|
|
1064
|
-
return;
|
|
1065
|
-
}
|
|
1066
|
-
if (toolId && !tool) {
|
|
1067
|
-
await outputToolNotFound(toolId);
|
|
1068
|
-
return;
|
|
1069
|
-
}
|
|
1070
|
-
if (modelComparisonConfig) {
|
|
1071
|
-
await runEvalModelComparison({
|
|
1072
|
-
evalItem,
|
|
1073
|
-
agent: agent,
|
|
1074
|
-
options,
|
|
1133
|
+
const selectedExporterIds = resolveEvalExporterIds(options);
|
|
1134
|
+
const extensionSetup = await setupEvalCliExtensions(projectDir, config, selectedExporterIds);
|
|
1135
|
+
try {
|
|
1136
|
+
const discoveryConfig = createProjectDiscoveryConfig({
|
|
1075
1137
|
projectDir,
|
|
1076
|
-
config
|
|
1077
|
-
|
|
1138
|
+
config,
|
|
1139
|
+
fsAdapter: adapter.fs,
|
|
1140
|
+
verbose: options.debug,
|
|
1078
1141
|
});
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1142
|
+
const projectDiscovery = await discoverAll(discoveryConfig);
|
|
1143
|
+
const agentId = evalItem.definition.targetKind === "agent"
|
|
1144
|
+
? resolveAgentTargetId(evalItem.definition.target)
|
|
1145
|
+
: undefined;
|
|
1146
|
+
const toolId = evalItem.definition.targetKind === "tool"
|
|
1147
|
+
? resolveToolTargetId(evalItem.definition.target)
|
|
1148
|
+
: undefined;
|
|
1149
|
+
const agent = agentId ? projectDiscovery.agents.get(agentId) : undefined;
|
|
1150
|
+
const tool = toolId ? projectDiscovery.tools.get(toolId) : undefined;
|
|
1151
|
+
if (agentId && !agent) {
|
|
1152
|
+
return await outputAgentNotFound(agentId);
|
|
1153
|
+
}
|
|
1154
|
+
if (toolId && !tool) {
|
|
1155
|
+
return await outputToolNotFound(toolId);
|
|
1156
|
+
}
|
|
1157
|
+
if (modelComparisonConfig) {
|
|
1158
|
+
return await runEvalModelComparison({
|
|
1159
|
+
evalItem,
|
|
1160
|
+
agent: agent,
|
|
1161
|
+
options,
|
|
1162
|
+
projectDir,
|
|
1163
|
+
config: modelComparisonConfig.config,
|
|
1164
|
+
policy: modelComparisonConfig.policy,
|
|
1165
|
+
exporterRegistry: extensionSetup.exporterRegistry,
|
|
1166
|
+
projectReference: resolveEvalRuntimeProjectSlug(config),
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
const runId = createEvalRunId();
|
|
1170
|
+
const artifactPaths = createEvalArtifactPaths(options.reportDir ?? createDefaultEvalReportDir(runId, evalItem.id));
|
|
1171
|
+
const provenance = await resolveEvalRunProvenance({
|
|
1172
|
+
projectDir,
|
|
1173
|
+
frameworkVersion: VERSION,
|
|
1174
|
+
});
|
|
1175
|
+
const billingGroupId = options.model
|
|
1176
|
+
? `${runId}_${sanitizeModelIdForPath(options.model)}`
|
|
1177
|
+
: runId;
|
|
1178
|
+
const exportConfig = createEvalCliExportConfig(evalItem, options, projectDir, artifactPaths, extensionSetup.exporterRegistry, config);
|
|
1179
|
+
const finalizedReport = await runEvalWithGatewayBillingGroup(billingGroupId, () => runEval(evalItem.definition, {
|
|
1180
|
+
baseDir: options.datasetBase ?? projectDir,
|
|
1181
|
+
runId,
|
|
1182
|
+
adapters: evalItem.definition.targetKind === "tool"
|
|
1183
|
+
? { tool: createToolAdapter(tool, createEvalToolExecutionContext(config)) }
|
|
1184
|
+
: { agent: createAgentAdapter(agent, options) },
|
|
1185
|
+
metadata: {
|
|
1186
|
+
provenance,
|
|
1187
|
+
...(options.model ? { model: options.model } : {}),
|
|
1188
|
+
},
|
|
1122
1189
|
}));
|
|
1190
|
+
const report = await exportEvalReportForCli(finalizedReport, exportConfig);
|
|
1191
|
+
const baseline = options.baseline
|
|
1192
|
+
? compareEvalReports(report, await readEvalReport(options.baseline), createEvalBaselineComparisonPolicy(options))
|
|
1193
|
+
: undefined;
|
|
1194
|
+
await writeEvalArtifacts(report, artifactPaths, baseline);
|
|
1195
|
+
if (options.report) {
|
|
1196
|
+
await writeTextFileEnsuringDir(options.report, JSON.stringify(report, null, 2));
|
|
1197
|
+
}
|
|
1198
|
+
if (options.junit) {
|
|
1199
|
+
await writeTextFileEnsuringDir(options.junit, createJunitXml(report));
|
|
1200
|
+
}
|
|
1201
|
+
if (options.writeBaseline) {
|
|
1202
|
+
await writeTextFileEnsuringDir(options.writeBaseline, JSON.stringify(report, null, 2));
|
|
1203
|
+
}
|
|
1204
|
+
if (isJsonMode()) {
|
|
1205
|
+
await outputJson(createSuccessEnvelope("eval", {
|
|
1206
|
+
report,
|
|
1207
|
+
summary: summarizeReportForCli(report),
|
|
1208
|
+
baseline,
|
|
1209
|
+
artifacts: artifactPaths,
|
|
1210
|
+
}));
|
|
1211
|
+
}
|
|
1212
|
+
else {
|
|
1213
|
+
printReport(report, baseline);
|
|
1214
|
+
cliLogger.info(`Report directory: ${artifactPaths.directory}`);
|
|
1215
|
+
cliLogger.info(`Report markdown: ${artifactPaths.reportMarkdown}`);
|
|
1216
|
+
if (options.report)
|
|
1217
|
+
cliLogger.info(`Report: ${options.report}`);
|
|
1218
|
+
if (options.junit)
|
|
1219
|
+
cliLogger.info(`JUnit: ${options.junit}`);
|
|
1220
|
+
if (options.writeBaseline)
|
|
1221
|
+
cliLogger.info(`Baseline written: ${options.writeBaseline}`);
|
|
1222
|
+
}
|
|
1223
|
+
return createEvalExitCode(report, baseline);
|
|
1123
1224
|
}
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
cliLogger.info(`Report directory: ${artifactPaths.directory}`);
|
|
1127
|
-
cliLogger.info(`Report markdown: ${artifactPaths.reportMarkdown}`);
|
|
1128
|
-
if (options.report)
|
|
1129
|
-
cliLogger.info(`Report: ${options.report}`);
|
|
1130
|
-
if (options.junit)
|
|
1131
|
-
cliLogger.info(`JUnit: ${options.junit}`);
|
|
1132
|
-
if (options.writeBaseline)
|
|
1133
|
-
cliLogger.info(`Baseline written: ${options.writeBaseline}`);
|
|
1225
|
+
finally {
|
|
1226
|
+
await extensionSetup.loader.teardownAll();
|
|
1134
1227
|
}
|
|
1135
|
-
exitProcess(createEvalExitCode(report, baseline));
|
|
1136
1228
|
});
|
|
1229
|
+
if (typeof exitCode === "number") {
|
|
1230
|
+
exitProcess(exitCode);
|
|
1231
|
+
}
|
|
1137
1232
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/init-command.ts"],"names":[],"mappings":"AAAA;;;iCAGiC;AAWjC,OAAO,KAAK,EAAE,WAAW,EAA6B,MAAM,YAAY,CAAC;AA6PzE;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"init-command.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/init/init-command.ts"],"names":[],"mappings":"AAAA;;;iCAGiC;AAWjC,OAAO,KAAK,EAAE,WAAW,EAA6B,MAAM,YAAY,CAAC;AA6PzE;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA+arE"}
|