@pauly4010/evalai-sdk 1.8.0 → 1.9.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/CHANGELOG.md +54 -0
- package/dist/cli/ci.d.ts +45 -0
- package/dist/cli/ci.js +192 -0
- package/dist/cli/diff.d.ts +173 -0
- package/dist/cli/diff.js +680 -0
- package/dist/cli/discover.d.ts +84 -0
- package/dist/cli/discover.js +408 -0
- package/dist/cli/doctor.js +19 -10
- package/dist/cli/env.d.ts +21 -0
- package/dist/cli/env.js +42 -0
- package/dist/cli/explain.js +143 -37
- package/dist/cli/impact-analysis.d.ts +63 -0
- package/dist/cli/impact-analysis.js +251 -0
- package/dist/cli/index.js +173 -0
- package/dist/cli/manifest.d.ts +105 -0
- package/dist/cli/manifest.js +275 -0
- package/dist/cli/migrate.d.ts +41 -0
- package/dist/cli/migrate.js +349 -0
- package/dist/cli/print-config.js +18 -14
- package/dist/cli/run.d.ts +101 -0
- package/dist/cli/run.js +389 -0
- package/dist/cli/workspace.d.ts +28 -0
- package/dist/cli/workspace.js +58 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +30 -5
- package/dist/runtime/adapters/config-to-dsl.d.ts +33 -0
- package/dist/runtime/adapters/config-to-dsl.js +391 -0
- package/dist/runtime/adapters/testsuite-to-dsl.d.ts +63 -0
- package/dist/runtime/adapters/testsuite-to-dsl.js +271 -0
- package/dist/runtime/context.d.ts +26 -0
- package/dist/runtime/context.js +74 -0
- package/dist/runtime/eval.d.ts +46 -0
- package/dist/runtime/eval.js +237 -0
- package/dist/runtime/execution-mode.d.ts +80 -0
- package/dist/runtime/execution-mode.js +353 -0
- package/dist/runtime/executor.d.ts +16 -0
- package/dist/runtime/executor.js +152 -0
- package/dist/runtime/registry.d.ts +78 -0
- package/dist/runtime/registry.js +416 -0
- package/dist/runtime/run-report.d.ts +202 -0
- package/dist/runtime/run-report.js +220 -0
- package/dist/runtime/types.d.ts +356 -0
- package/dist/runtime/types.js +76 -0
- package/dist/testing.d.ts +65 -0
- package/dist/testing.js +42 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +4 -3
package/dist/testing.d.ts
CHANGED
|
@@ -90,6 +90,47 @@ export interface TestSuiteResult {
|
|
|
90
90
|
/** Case IDs that were retried (flaky recovery) */
|
|
91
91
|
retriedCases?: string[];
|
|
92
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Test definition for introspection
|
|
95
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
96
|
+
*/
|
|
97
|
+
export interface TestDefinition {
|
|
98
|
+
/** Test case ID */
|
|
99
|
+
id: string;
|
|
100
|
+
/** Test input */
|
|
101
|
+
input: string;
|
|
102
|
+
/** Expected output */
|
|
103
|
+
expected?: string;
|
|
104
|
+
/** Test metadata */
|
|
105
|
+
metadata?: Record<string, unknown>;
|
|
106
|
+
/** Whether test has assertions */
|
|
107
|
+
hasAssertions: boolean;
|
|
108
|
+
/** Number of assertions */
|
|
109
|
+
assertionCount: number;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Portable suite representation
|
|
113
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
114
|
+
*/
|
|
115
|
+
export interface PortableSuite {
|
|
116
|
+
/** Suite name */
|
|
117
|
+
name: string;
|
|
118
|
+
/** Suite configuration */
|
|
119
|
+
config: TestSuiteConfig;
|
|
120
|
+
/** Test definitions */
|
|
121
|
+
tests: TestDefinition[];
|
|
122
|
+
/** Suite metadata */
|
|
123
|
+
metadata: {
|
|
124
|
+
suiteName?: string;
|
|
125
|
+
tags?: string[];
|
|
126
|
+
defaults?: {
|
|
127
|
+
timeout?: number;
|
|
128
|
+
parallel?: boolean;
|
|
129
|
+
stopOnFailure?: boolean;
|
|
130
|
+
retries?: number;
|
|
131
|
+
};
|
|
132
|
+
};
|
|
133
|
+
}
|
|
93
134
|
/**
|
|
94
135
|
* Test Suite for declarative evaluation testing
|
|
95
136
|
*/
|
|
@@ -115,6 +156,30 @@ export declare class TestSuite {
|
|
|
115
156
|
* Get suite configuration
|
|
116
157
|
*/
|
|
117
158
|
getConfig(): TestSuiteConfig;
|
|
159
|
+
/**
|
|
160
|
+
* Get test definitions for introspection
|
|
161
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
162
|
+
*/
|
|
163
|
+
getTests(): TestDefinition[];
|
|
164
|
+
/**
|
|
165
|
+
* Get suite metadata for introspection
|
|
166
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
167
|
+
*/
|
|
168
|
+
getMetadata(): {
|
|
169
|
+
suiteName?: string;
|
|
170
|
+
tags?: string[];
|
|
171
|
+
defaults?: {
|
|
172
|
+
timeout?: number;
|
|
173
|
+
parallel?: boolean;
|
|
174
|
+
stopOnFailure?: boolean;
|
|
175
|
+
retries?: number;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* Convert to portable suite representation
|
|
180
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
181
|
+
*/
|
|
182
|
+
toJSON(): PortableSuite;
|
|
118
183
|
}
|
|
119
184
|
/**
|
|
120
185
|
* Create a test suite
|
package/dist/testing.js
CHANGED
|
@@ -169,6 +169,48 @@ class TestSuite {
|
|
|
169
169
|
getConfig() {
|
|
170
170
|
return { ...this.config };
|
|
171
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Get test definitions for introspection
|
|
174
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
175
|
+
*/
|
|
176
|
+
getTests() {
|
|
177
|
+
return this.config.cases.map((testCase, index) => ({
|
|
178
|
+
id: testCase.id || `case-${index}`,
|
|
179
|
+
input: testCase.input,
|
|
180
|
+
expected: testCase.expected,
|
|
181
|
+
metadata: testCase.metadata,
|
|
182
|
+
hasAssertions: !!testCase.assertions && testCase.assertions.length > 0,
|
|
183
|
+
assertionCount: testCase.assertions?.length || 0,
|
|
184
|
+
}));
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Get suite metadata for introspection
|
|
188
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
189
|
+
*/
|
|
190
|
+
getMetadata() {
|
|
191
|
+
return {
|
|
192
|
+
suiteName: this.name,
|
|
193
|
+
tags: [], // TestSuite doesn't have tags, but include for future compatibility
|
|
194
|
+
defaults: {
|
|
195
|
+
timeout: this.config.timeout,
|
|
196
|
+
parallel: this.config.parallel,
|
|
197
|
+
stopOnFailure: this.config.stopOnFailure,
|
|
198
|
+
retries: this.config.retries,
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Convert to portable suite representation
|
|
204
|
+
* COMPAT-201: Public TestSuite introspection (minimal getters)
|
|
205
|
+
*/
|
|
206
|
+
toJSON() {
|
|
207
|
+
return {
|
|
208
|
+
name: this.name,
|
|
209
|
+
config: this.getConfig(),
|
|
210
|
+
tests: this.getTests(),
|
|
211
|
+
metadata: this.getMetadata(),
|
|
212
|
+
};
|
|
213
|
+
}
|
|
172
214
|
}
|
|
173
215
|
exports.TestSuite = TestSuite;
|
|
174
216
|
/**
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
|
@@ -6,5 +6,5 @@ exports.SPEC_VERSION = exports.SDK_VERSION = void 0;
|
|
|
6
6
|
* X-EvalAI-SDK-Version: SDK package version
|
|
7
7
|
* X-EvalAI-Spec-Version: OpenAPI spec version (docs/openapi.json info.version)
|
|
8
8
|
*/
|
|
9
|
-
exports.SDK_VERSION = "1.
|
|
9
|
+
exports.SDK_VERSION = "1.9.0";
|
|
10
10
|
exports.SPEC_VERSION = "1.0.0";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pauly4010/evalai-sdk",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "AI Evaluation Platform SDK - Complete API Coverage with Performance Optimizations",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"commander": "^14.0.0"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"@anthropic-ai/sdk": "^0.20.0",
|
|
55
|
+
"openai": "^4.0.0"
|
|
56
56
|
},
|
|
57
57
|
"peerDependenciesMeta": {
|
|
58
58
|
"openai": {
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
},
|
|
65
65
|
"devDependencies": {
|
|
66
66
|
"@types/node": "^20.0.0",
|
|
67
|
+
"ts-node": "^10.9.2",
|
|
67
68
|
"typescript": "^5.0.0",
|
|
68
69
|
"vitest": "^1.0.0"
|
|
69
70
|
},
|