@evalgate/sdk 2.0.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.
Files changed (141) hide show
  1. package/CHANGELOG.md +638 -0
  2. package/README.md +398 -0
  3. package/dist/assertions.d.ts +189 -0
  4. package/dist/assertions.js +662 -0
  5. package/dist/batch.d.ts +68 -0
  6. package/dist/batch.js +179 -0
  7. package/dist/cache.d.ts +65 -0
  8. package/dist/cache.js +131 -0
  9. package/dist/cli/api.d.ts +108 -0
  10. package/dist/cli/api.js +132 -0
  11. package/dist/cli/baseline.d.ts +10 -0
  12. package/dist/cli/baseline.js +172 -0
  13. package/dist/cli/check.d.ts +73 -0
  14. package/dist/cli/check.js +355 -0
  15. package/dist/cli/ci-context.d.ts +6 -0
  16. package/dist/cli/ci-context.js +112 -0
  17. package/dist/cli/ci.d.ts +45 -0
  18. package/dist/cli/ci.js +192 -0
  19. package/dist/cli/config.d.ts +30 -0
  20. package/dist/cli/config.js +230 -0
  21. package/dist/cli/constants.d.ts +15 -0
  22. package/dist/cli/constants.js +18 -0
  23. package/dist/cli/diff.d.ts +173 -0
  24. package/dist/cli/diff.js +685 -0
  25. package/dist/cli/discover.d.ts +84 -0
  26. package/dist/cli/discover.js +419 -0
  27. package/dist/cli/doctor.d.ts +88 -0
  28. package/dist/cli/doctor.js +675 -0
  29. package/dist/cli/env.d.ts +21 -0
  30. package/dist/cli/env.js +42 -0
  31. package/dist/cli/explain.d.ts +58 -0
  32. package/dist/cli/explain.js +561 -0
  33. package/dist/cli/formatters/github.d.ts +8 -0
  34. package/dist/cli/formatters/github.js +135 -0
  35. package/dist/cli/formatters/human.d.ts +6 -0
  36. package/dist/cli/formatters/human.js +110 -0
  37. package/dist/cli/formatters/json.d.ts +6 -0
  38. package/dist/cli/formatters/json.js +10 -0
  39. package/dist/cli/formatters/pr-comment.d.ts +12 -0
  40. package/dist/cli/formatters/pr-comment.js +103 -0
  41. package/dist/cli/formatters/types.d.ts +103 -0
  42. package/dist/cli/formatters/types.js +8 -0
  43. package/dist/cli/gate.d.ts +21 -0
  44. package/dist/cli/gate.js +179 -0
  45. package/dist/cli/impact-analysis.d.ts +63 -0
  46. package/dist/cli/impact-analysis.js +252 -0
  47. package/dist/cli/index.d.ts +9 -0
  48. package/dist/cli/index.js +332 -0
  49. package/dist/cli/init.d.ts +16 -0
  50. package/dist/cli/init.js +292 -0
  51. package/dist/cli/manifest.d.ts +103 -0
  52. package/dist/cli/manifest.js +282 -0
  53. package/dist/cli/migrate.d.ts +41 -0
  54. package/dist/cli/migrate.js +349 -0
  55. package/dist/cli/policy-packs.d.ts +23 -0
  56. package/dist/cli/policy-packs.js +89 -0
  57. package/dist/cli/print-config.d.ts +29 -0
  58. package/dist/cli/print-config.js +270 -0
  59. package/dist/cli/profiles.d.ts +28 -0
  60. package/dist/cli/profiles.js +30 -0
  61. package/dist/cli/reason-codes.d.ts +17 -0
  62. package/dist/cli/reason-codes.js +19 -0
  63. package/dist/cli/regression-gate.d.ts +15 -0
  64. package/dist/cli/regression-gate.js +341 -0
  65. package/dist/cli/render/snippet.d.ts +5 -0
  66. package/dist/cli/render/snippet.js +15 -0
  67. package/dist/cli/render/sort.d.ts +10 -0
  68. package/dist/cli/render/sort.js +24 -0
  69. package/dist/cli/report/build-check-report.d.ts +19 -0
  70. package/dist/cli/report/build-check-report.js +132 -0
  71. package/dist/cli/run.d.ts +101 -0
  72. package/dist/cli/run.js +395 -0
  73. package/dist/cli/share.d.ts +17 -0
  74. package/dist/cli/share.js +91 -0
  75. package/dist/cli/upgrade.d.ts +15 -0
  76. package/dist/cli/upgrade.js +492 -0
  77. package/dist/cli/workspace.d.ts +31 -0
  78. package/dist/cli/workspace.js +68 -0
  79. package/dist/client.d.ts +368 -0
  80. package/dist/client.js +893 -0
  81. package/dist/client.request.test.d.ts +1 -0
  82. package/dist/client.request.test.js +232 -0
  83. package/dist/context.d.ts +134 -0
  84. package/dist/context.js +215 -0
  85. package/dist/errors.d.ts +82 -0
  86. package/dist/errors.js +298 -0
  87. package/dist/export.d.ts +195 -0
  88. package/dist/export.js +344 -0
  89. package/dist/index.d.ts +44 -0
  90. package/dist/index.js +153 -0
  91. package/dist/integrations/anthropic.d.ts +91 -0
  92. package/dist/integrations/anthropic.js +163 -0
  93. package/dist/integrations/openai-eval.d.ts +57 -0
  94. package/dist/integrations/openai-eval.js +232 -0
  95. package/dist/integrations/openai.d.ts +92 -0
  96. package/dist/integrations/openai.js +160 -0
  97. package/dist/local.d.ts +39 -0
  98. package/dist/local.js +148 -0
  99. package/dist/logger.d.ts +128 -0
  100. package/dist/logger.js +227 -0
  101. package/dist/matchers/index.d.ts +1 -0
  102. package/dist/matchers/index.js +6 -0
  103. package/dist/matchers/to-pass-gate.d.ts +29 -0
  104. package/dist/matchers/to-pass-gate.js +35 -0
  105. package/dist/pagination.d.ts +74 -0
  106. package/dist/pagination.js +139 -0
  107. package/dist/regression.d.ts +100 -0
  108. package/dist/regression.js +44 -0
  109. package/dist/runtime/adapters/config-to-dsl.d.ts +33 -0
  110. package/dist/runtime/adapters/config-to-dsl.js +400 -0
  111. package/dist/runtime/adapters/testsuite-to-dsl.d.ts +63 -0
  112. package/dist/runtime/adapters/testsuite-to-dsl.js +276 -0
  113. package/dist/runtime/context.d.ts +26 -0
  114. package/dist/runtime/context.js +74 -0
  115. package/dist/runtime/eval.d.ts +46 -0
  116. package/dist/runtime/eval.js +244 -0
  117. package/dist/runtime/execution-mode.d.ts +80 -0
  118. package/dist/runtime/execution-mode.js +357 -0
  119. package/dist/runtime/executor.d.ts +16 -0
  120. package/dist/runtime/executor.js +152 -0
  121. package/dist/runtime/registry.d.ts +78 -0
  122. package/dist/runtime/registry.js +403 -0
  123. package/dist/runtime/run-report.d.ts +200 -0
  124. package/dist/runtime/run-report.js +222 -0
  125. package/dist/runtime/types.d.ts +356 -0
  126. package/dist/runtime/types.js +76 -0
  127. package/dist/snapshot.d.ts +176 -0
  128. package/dist/snapshot.js +322 -0
  129. package/dist/streaming.d.ts +173 -0
  130. package/dist/streaming.js +268 -0
  131. package/dist/testing.d.ts +273 -0
  132. package/dist/testing.js +317 -0
  133. package/dist/types.d.ts +754 -0
  134. package/dist/types.js +54 -0
  135. package/dist/utils/input-hash.d.ts +8 -0
  136. package/dist/utils/input-hash.js +41 -0
  137. package/dist/version.d.ts +7 -0
  138. package/dist/version.js +10 -0
  139. package/dist/workflows.d.ts +389 -0
  140. package/dist/workflows.js +671 -0
  141. package/package.json +117 -0
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.toPassGate = exports.extendExpectWithToPassGate = void 0;
4
+ var to_pass_gate_1 = require("./to-pass-gate");
5
+ Object.defineProperty(exports, "extendExpectWithToPassGate", { enumerable: true, get: function () { return to_pass_gate_1.extendExpectWithToPassGate; } });
6
+ Object.defineProperty(exports, "toPassGate", { enumerable: true, get: function () { return to_pass_gate_1.toPassGate; } });
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Vitest/Jest matcher: expect(result).toPassGate()
3
+ * Use with openAIChatEval: expect(await openAIChatEval(...)).toPassGate()
4
+ *
5
+ * @example
6
+ * ```ts
7
+ * import { openAIChatEval } from '@evalgate/sdk';
8
+ * import { expect } from 'vitest';
9
+ * import { extendExpectWithToPassGate } from '@evalgate/sdk/matchers';
10
+ *
11
+ * extendExpectWithToPassGate(expect);
12
+ *
13
+ * it('passes gate', async () => {
14
+ * const result = await openAIChatEval({ name: 'test', cases: [...] });
15
+ * expect(result).toPassGate();
16
+ * });
17
+ * ```
18
+ */
19
+ import type { OpenAIChatEvalResult } from "../integrations/openai-eval";
20
+ export declare function toPassGate(this: {
21
+ isNot?: boolean;
22
+ }, received: OpenAIChatEvalResult): {
23
+ pass: boolean;
24
+ message: () => string;
25
+ };
26
+ /** Register toPassGate matcher with expect. Call in test setup. */
27
+ export declare function extendExpectWithToPassGate(expect: {
28
+ extend: (matchers: object) => void;
29
+ }): void;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ /**
3
+ * Vitest/Jest matcher: expect(result).toPassGate()
4
+ * Use with openAIChatEval: expect(await openAIChatEval(...)).toPassGate()
5
+ *
6
+ * @example
7
+ * ```ts
8
+ * import { openAIChatEval } from '@evalgate/sdk';
9
+ * import { expect } from 'vitest';
10
+ * import { extendExpectWithToPassGate } from '@evalgate/sdk/matchers';
11
+ *
12
+ * extendExpectWithToPassGate(expect);
13
+ *
14
+ * it('passes gate', async () => {
15
+ * const result = await openAIChatEval({ name: 'test', cases: [...] });
16
+ * expect(result).toPassGate();
17
+ * });
18
+ * ```
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.toPassGate = toPassGate;
22
+ exports.extendExpectWithToPassGate = extendExpectWithToPassGate;
23
+ function toPassGate(received) {
24
+ const passed = received.passed === received.total && received.total > 0;
25
+ const isNot = this.isNot ?? false;
26
+ const success = isNot ? !passed : passed;
27
+ const message = () => isNot
28
+ ? `Expected result not to pass gate (${received.passed}/${received.total} passed, score ${received.score})`
29
+ : `Expected result to pass gate but ${received.passed}/${received.total} passed (score ${received.score})`;
30
+ return { pass: success, message };
31
+ }
32
+ /** Register toPassGate matcher with expect. Call in test setup. */
33
+ function extendExpectWithToPassGate(expect) {
34
+ expect.extend({ toPassGate });
35
+ }
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Cursor-based pagination utilities for efficient data fetching
3
+ */
4
+ export interface PaginationParams {
5
+ limit?: number;
6
+ cursor?: string;
7
+ offset?: number;
8
+ }
9
+ export interface PaginatedResponse<T> {
10
+ data: T[];
11
+ pagination: {
12
+ hasMore: boolean;
13
+ nextCursor?: string;
14
+ prevCursor?: string;
15
+ total?: number;
16
+ limit: number;
17
+ offset?: number;
18
+ };
19
+ }
20
+ export interface PaginationOptions {
21
+ limit?: number;
22
+ offset?: number;
23
+ }
24
+ /**
25
+ * Iterator for paginated results
26
+ * Allows for easy iteration over all pages
27
+ */
28
+ export declare class PaginatedIterator<T> implements AsyncIterableIterator<T[]> {
29
+ private fetchFn;
30
+ private limit;
31
+ private currentOffset;
32
+ private hasMore;
33
+ constructor(fetchFn: (offset: number, limit: number) => Promise<{
34
+ data: T[];
35
+ hasMore: boolean;
36
+ }>, limit?: number);
37
+ next(): Promise<IteratorResult<T[]>>;
38
+ [Symbol.asyncIterator](): AsyncIterableIterator<T[]>;
39
+ /**
40
+ * Collect all pages into a single array
41
+ * Warning: Use with caution on large datasets
42
+ */
43
+ toArray(): Promise<T[]>;
44
+ }
45
+ /**
46
+ * Helper to create paginated iterator
47
+ */
48
+ export declare function createPaginatedIterator<T>(fetchFn: (offset: number, limit: number) => Promise<{
49
+ data: T[];
50
+ hasMore: boolean;
51
+ }>, limit?: number): PaginatedIterator<T>;
52
+ /**
53
+ * Auto-paginate helper that fetches all pages automatically
54
+ */
55
+ export declare function autoPaginate<T>(fetchFn: (offset: number, limit: number) => Promise<T[]>, limit?: number): AsyncGenerator<T, void, unknown>;
56
+ /**
57
+ * Encode cursor for pagination (base64)
58
+ */
59
+ export declare function encodeCursor(data: unknown): string;
60
+ /**
61
+ * Decode cursor from base64
62
+ */
63
+ export declare function decodeCursor(cursor: string): unknown;
64
+ /**
65
+ * Create pagination metadata from response
66
+ */
67
+ export declare function createPaginationMeta<T>(items: T[], limit: number, offset: number, total?: number): PaginatedResponse<T>["pagination"];
68
+ /**
69
+ * Parse pagination params from cursor or offset
70
+ */
71
+ export declare function parsePaginationParams(params: PaginationParams): {
72
+ limit: number;
73
+ offset: number;
74
+ };
@@ -0,0 +1,139 @@
1
+ "use strict";
2
+ /**
3
+ * Cursor-based pagination utilities for efficient data fetching
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PaginatedIterator = void 0;
7
+ exports.createPaginatedIterator = createPaginatedIterator;
8
+ exports.autoPaginate = autoPaginate;
9
+ exports.encodeCursor = encodeCursor;
10
+ exports.decodeCursor = decodeCursor;
11
+ exports.createPaginationMeta = createPaginationMeta;
12
+ exports.parsePaginationParams = parsePaginationParams;
13
+ /**
14
+ * Iterator for paginated results
15
+ * Allows for easy iteration over all pages
16
+ */
17
+ class PaginatedIterator {
18
+ constructor(fetchFn, limit = 50) {
19
+ this.fetchFn = fetchFn;
20
+ this.limit = limit;
21
+ this.currentOffset = 0;
22
+ this.hasMore = true;
23
+ }
24
+ async next() {
25
+ if (!this.hasMore) {
26
+ return { done: true, value: undefined };
27
+ }
28
+ const result = await this.fetchFn(this.currentOffset, this.limit);
29
+ this.hasMore = result.hasMore;
30
+ this.currentOffset += this.limit;
31
+ return {
32
+ done: false,
33
+ value: result.data,
34
+ };
35
+ }
36
+ [Symbol.asyncIterator]() {
37
+ return this;
38
+ }
39
+ /**
40
+ * Collect all pages into a single array
41
+ * Warning: Use with caution on large datasets
42
+ */
43
+ async toArray() {
44
+ const allItems = [];
45
+ for await (const page of this) {
46
+ allItems.push(...page);
47
+ }
48
+ return allItems;
49
+ }
50
+ }
51
+ exports.PaginatedIterator = PaginatedIterator;
52
+ /**
53
+ * Helper to create paginated iterator
54
+ */
55
+ function createPaginatedIterator(fetchFn, limit = 50) {
56
+ return new PaginatedIterator(fetchFn, limit);
57
+ }
58
+ /**
59
+ * Auto-paginate helper that fetches all pages automatically
60
+ */
61
+ async function* autoPaginate(fetchFn, limit = 50) {
62
+ let offset = 0;
63
+ let hasMore = true;
64
+ while (hasMore) {
65
+ const items = await fetchFn(offset, limit);
66
+ if (items.length === 0) {
67
+ break;
68
+ }
69
+ for (const item of items) {
70
+ yield item;
71
+ }
72
+ hasMore = items.length === limit;
73
+ offset += limit;
74
+ }
75
+ }
76
+ /**
77
+ * Encode cursor for pagination (base64)
78
+ */
79
+ function encodeCursor(data) {
80
+ const json = JSON.stringify(data);
81
+ if (typeof globalThis !== "undefined" && "btoa" in globalThis) {
82
+ return globalThis.btoa(json);
83
+ }
84
+ else {
85
+ return Buffer.from(json).toString("base64");
86
+ }
87
+ }
88
+ /**
89
+ * Decode cursor from base64
90
+ */
91
+ function decodeCursor(cursor) {
92
+ try {
93
+ let json;
94
+ if (typeof globalThis !== "undefined" && "atob" in globalThis) {
95
+ json = globalThis.atob(cursor);
96
+ }
97
+ else {
98
+ json = Buffer.from(cursor, "base64").toString("utf-8");
99
+ }
100
+ return JSON.parse(json);
101
+ }
102
+ catch (_error) {
103
+ throw new Error("Invalid cursor format");
104
+ }
105
+ }
106
+ /**
107
+ * Create pagination metadata from response
108
+ */
109
+ function createPaginationMeta(items, limit, offset, total) {
110
+ const hasMore = items.length === limit;
111
+ return {
112
+ hasMore,
113
+ limit,
114
+ offset,
115
+ total,
116
+ nextCursor: hasMore
117
+ ? encodeCursor({ offset: offset + limit, limit })
118
+ : undefined,
119
+ prevCursor: offset > 0
120
+ ? encodeCursor({ offset: Math.max(0, offset - limit), limit })
121
+ : undefined,
122
+ };
123
+ }
124
+ /**
125
+ * Parse pagination params from cursor or offset
126
+ */
127
+ function parsePaginationParams(params) {
128
+ if (params.cursor) {
129
+ const decoded = decodeCursor(params.cursor);
130
+ return {
131
+ limit: decoded.limit || 50,
132
+ offset: decoded.offset || 0,
133
+ };
134
+ }
135
+ return {
136
+ limit: params.limit || 50,
137
+ offset: params.offset || 0,
138
+ };
139
+ }
@@ -0,0 +1,100 @@
1
+ /**
2
+ * Regression gate constants and types.
3
+ *
4
+ * These mirror the contracts defined in scripts/regression-gate.ts
5
+ * and evals/schemas/regression-report.schema.json so that SDK consumers
6
+ * can programmatically inspect gate results without parsing strings.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ /** Exit codes emitted by `evalgate gate` / `scripts/regression-gate.ts`. */
11
+ export declare const GATE_EXIT: {
12
+ /** Gate passed — no regressions detected */
13
+ readonly PASS: 0;
14
+ /** One or more regression thresholds exceeded */
15
+ readonly REGRESSION: 1;
16
+ /** Infrastructure error (baseline missing, summary missing, etc.) */
17
+ readonly INFRA_ERROR: 2;
18
+ /** Confidence tests failed (test suite red) */
19
+ readonly CONFIDENCE_FAILED: 3;
20
+ /** Confidence summary file missing (test infra crashed) */
21
+ readonly CONFIDENCE_MISSING: 4;
22
+ };
23
+ export type GateExitCode = (typeof GATE_EXIT)[keyof typeof GATE_EXIT];
24
+ /** Categories written to regression-report.json `category` field. */
25
+ export declare const GATE_CATEGORY: {
26
+ readonly PASS: "pass";
27
+ readonly REGRESSION: "regression";
28
+ readonly INFRA_ERROR: "infra_error";
29
+ };
30
+ export type GateCategory = (typeof GATE_CATEGORY)[keyof typeof GATE_CATEGORY];
31
+ /** Current schema version for regression-report.json. */
32
+ export declare const REPORT_SCHEMA_VERSION = 1;
33
+ export interface RegressionDelta {
34
+ metric: string;
35
+ baseline: number | string;
36
+ current: number | string;
37
+ delta: string;
38
+ status: "pass" | "fail";
39
+ }
40
+ export interface RegressionReport {
41
+ schemaVersion: number;
42
+ timestamp: string;
43
+ exitCode: GateExitCode;
44
+ category: GateCategory;
45
+ passed: boolean;
46
+ failures: string[];
47
+ deltas: RegressionDelta[];
48
+ }
49
+ export interface BaselineTolerance {
50
+ scoreDrop: number;
51
+ passRateDrop: number;
52
+ maxLatencyIncreaseMs: number;
53
+ maxCostIncreaseUsd: number;
54
+ }
55
+ export interface Baseline {
56
+ schemaVersion: number;
57
+ description: string;
58
+ generatedAt: string;
59
+ generatedBy: string;
60
+ commitSha: string;
61
+ updatedAt: string;
62
+ updatedBy: string;
63
+ tolerance: BaselineTolerance;
64
+ goldenEval: {
65
+ score: number;
66
+ passRate: number;
67
+ totalCases: number;
68
+ passedCases: number;
69
+ };
70
+ qualityScore: {
71
+ overall: number;
72
+ grade: string;
73
+ accuracy: number;
74
+ safety: number;
75
+ latency: number;
76
+ cost: number;
77
+ consistency: number;
78
+ };
79
+ confidenceTests: {
80
+ unitPassed: boolean;
81
+ unitTotal: number;
82
+ dbPassed: boolean;
83
+ dbTotal: number;
84
+ };
85
+ productMetrics: {
86
+ p95ApiLatencyMs?: number;
87
+ goldenCostUsd?: number;
88
+ };
89
+ qualityMetrics?: {
90
+ unitLaneDurationMs?: number;
91
+ dbLaneDurationMs?: number;
92
+ };
93
+ }
94
+ /** Well-known artifact paths relative to project root. */
95
+ export declare const ARTIFACTS: {
96
+ readonly BASELINE: "evals/baseline.json";
97
+ readonly REGRESSION_REPORT: "evals/regression-report.json";
98
+ readonly CONFIDENCE_SUMMARY: "evals/confidence-summary.json";
99
+ readonly LATENCY_BENCHMARK: "evals/latency-benchmark.json";
100
+ };
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /**
3
+ * Regression gate constants and types.
4
+ *
5
+ * These mirror the contracts defined in scripts/regression-gate.ts
6
+ * and evals/schemas/regression-report.schema.json so that SDK consumers
7
+ * can programmatically inspect gate results without parsing strings.
8
+ *
9
+ * @packageDocumentation
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ARTIFACTS = exports.REPORT_SCHEMA_VERSION = exports.GATE_CATEGORY = exports.GATE_EXIT = void 0;
13
+ // ── Exit codes ──
14
+ /** Exit codes emitted by `evalgate gate` / `scripts/regression-gate.ts`. */
15
+ exports.GATE_EXIT = {
16
+ /** Gate passed — no regressions detected */
17
+ PASS: 0,
18
+ /** One or more regression thresholds exceeded */
19
+ REGRESSION: 1,
20
+ /** Infrastructure error (baseline missing, summary missing, etc.) */
21
+ INFRA_ERROR: 2,
22
+ /** Confidence tests failed (test suite red) */
23
+ CONFIDENCE_FAILED: 3,
24
+ /** Confidence summary file missing (test infra crashed) */
25
+ CONFIDENCE_MISSING: 4,
26
+ };
27
+ // ── Report categories ──
28
+ /** Categories written to regression-report.json `category` field. */
29
+ exports.GATE_CATEGORY = {
30
+ PASS: "pass",
31
+ REGRESSION: "regression",
32
+ INFRA_ERROR: "infra_error",
33
+ };
34
+ // ── Schema version ──
35
+ /** Current schema version for regression-report.json. */
36
+ exports.REPORT_SCHEMA_VERSION = 1;
37
+ // ── Artifact paths ──
38
+ /** Well-known artifact paths relative to project root. */
39
+ exports.ARTIFACTS = {
40
+ BASELINE: "evals/baseline.json",
41
+ REGRESSION_REPORT: "evals/regression-report.json",
42
+ CONFIDENCE_SUMMARY: "evals/confidence-summary.json",
43
+ LATENCY_BENCHMARK: "evals/latency-benchmark.json",
44
+ };
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Config → DSL Adapter - LAYER 2 Compatibility Bridge
3
+ *
4
+ * Migrates existing evalgate.config.json and TestSuite configurations
5
+ * to the new defineEval() DSL without breaking user workflows.
6
+ */
7
+ import type { TestSuite } from "../../testing";
8
+ /**
9
+ * Migration result information
10
+ */
11
+ interface MigrationResult {
12
+ success: boolean;
13
+ specsGenerated: number;
14
+ errors: string[];
15
+ warnings: string[];
16
+ outputPath: string;
17
+ }
18
+ /**
19
+ * Convert TestSuite to defineEval() specifications
20
+ */
21
+ export declare function migrateTestSuiteToDSL(testSuite: TestSuite, outputPath: string): MigrationResult;
22
+ /**
23
+ * Convert evalgate.config.json to DSL specifications
24
+ */
25
+ export declare function migrateConfigToDSL(configPath: string, outputPath: string): MigrationResult;
26
+ /**
27
+ * Discover and migrate all TestSuite configurations in a project
28
+ */
29
+ export declare function migrateProjectToDSL(projectRoot: string, options?: {
30
+ outputDir?: string;
31
+ dryRun?: boolean;
32
+ }): MigrationResult;
33
+ export {};