@evalgate/sdk 2.2.3 → 2.3.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 +31 -0
- package/README.md +39 -2
- package/dist/assertions.d.ts +186 -6
- package/dist/assertions.js +515 -61
- package/dist/batch.js +4 -4
- package/dist/cache.d.ts +4 -0
- package/dist/cache.js +4 -0
- package/dist/cli/baseline.d.ts +14 -0
- package/dist/cli/baseline.js +43 -3
- package/dist/cli/check.d.ts +5 -2
- package/dist/cli/check.js +20 -12
- package/dist/cli/compare.d.ts +80 -0
- package/dist/cli/compare.js +266 -0
- package/dist/cli/index.js +244 -101
- package/dist/cli/regression-gate.js +23 -0
- package/dist/cli/run.js +22 -0
- package/dist/cli/start.d.ts +26 -0
- package/dist/cli/start.js +130 -0
- package/dist/cli/templates.d.ts +24 -0
- package/dist/cli/templates.js +314 -0
- package/dist/cli/traces.d.ts +109 -0
- package/dist/cli/traces.js +152 -0
- package/dist/cli/validate.d.ts +37 -0
- package/dist/cli/validate.js +252 -0
- package/dist/cli/watch.d.ts +19 -0
- package/dist/cli/watch.js +175 -0
- package/dist/client.js +6 -13
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +5 -0
- package/dist/index.d.ts +8 -6
- package/dist/index.js +26 -6
- package/dist/integrations/openai.js +83 -60
- package/dist/logger.d.ts +3 -1
- package/dist/logger.js +2 -1
- package/dist/otel.d.ts +130 -0
- package/dist/otel.js +309 -0
- package/dist/runtime/eval.d.ts +14 -4
- package/dist/runtime/eval.js +127 -2
- package/dist/runtime/registry.d.ts +4 -2
- package/dist/runtime/registry.js +11 -3
- package/dist/runtime/run-report.d.ts +1 -1
- package/dist/runtime/run-report.js +7 -4
- package/dist/runtime/types.d.ts +38 -0
- package/dist/testing.d.ts +8 -0
- package/dist/testing.js +45 -10
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/dist/workflows.d.ts +2 -0
- package/dist/workflows.js +184 -102
- package/package.json +124 -117
package/dist/workflows.js
CHANGED
|
@@ -27,6 +27,39 @@
|
|
|
27
27
|
* await tracer.endWorkflow({ resolution: 'Issue resolved' });
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
31
|
+
if (k2 === undefined) k2 = k;
|
|
32
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
33
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
34
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
35
|
+
}
|
|
36
|
+
Object.defineProperty(o, k2, desc);
|
|
37
|
+
}) : (function(o, m, k, k2) {
|
|
38
|
+
if (k2 === undefined) k2 = k;
|
|
39
|
+
o[k2] = m[k];
|
|
40
|
+
}));
|
|
41
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
42
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
43
|
+
}) : function(o, v) {
|
|
44
|
+
o["default"] = v;
|
|
45
|
+
});
|
|
46
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
47
|
+
var ownKeys = function(o) {
|
|
48
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
49
|
+
var ar = [];
|
|
50
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
51
|
+
return ar;
|
|
52
|
+
};
|
|
53
|
+
return ownKeys(o);
|
|
54
|
+
};
|
|
55
|
+
return function (mod) {
|
|
56
|
+
if (mod && mod.__esModule) return mod;
|
|
57
|
+
var result = {};
|
|
58
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
59
|
+
__setModuleDefault(result, mod);
|
|
60
|
+
return result;
|
|
61
|
+
};
|
|
62
|
+
})();
|
|
30
63
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
64
|
exports.WorkflowTracer = void 0;
|
|
32
65
|
exports.traceLangChainAgent = traceLangChainAgent;
|
|
@@ -34,6 +67,8 @@ exports.traceCrewAI = traceCrewAI;
|
|
|
34
67
|
exports.traceAutoGen = traceAutoGen;
|
|
35
68
|
exports.createWorkflowTracer = createWorkflowTracer;
|
|
36
69
|
exports.traceWorkflowStep = traceWorkflowStep;
|
|
70
|
+
const fs = __importStar(require("node:fs"));
|
|
71
|
+
const nodePath = __importStar(require("node:path"));
|
|
37
72
|
const context_1 = require("./context");
|
|
38
73
|
// ============================================================================
|
|
39
74
|
// MAIN CLASS - WorkflowTracer
|
|
@@ -75,6 +110,7 @@ class WorkflowTracer {
|
|
|
75
110
|
tracePrefix: options.tracePrefix || "workflow",
|
|
76
111
|
captureFullPayloads: options.captureFullPayloads ?? true,
|
|
77
112
|
debug: options.debug ?? false,
|
|
113
|
+
offline: options.offline ?? false,
|
|
78
114
|
};
|
|
79
115
|
}
|
|
80
116
|
// ==========================================================================
|
|
@@ -101,34 +137,39 @@ class WorkflowTracer {
|
|
|
101
137
|
}
|
|
102
138
|
const traceId = `${this.options.tracePrefix}-${Date.now()}-${this.generateId()}`;
|
|
103
139
|
const startedAt = new Date().toISOString();
|
|
104
|
-
// Create the trace
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
140
|
+
// Create the trace (skip in offline mode)
|
|
141
|
+
let traceResultId = 0;
|
|
142
|
+
if (!this.options.offline) {
|
|
143
|
+
const trace = await this.client.traces.create({
|
|
144
|
+
name: `Workflow: ${name}`,
|
|
145
|
+
traceId,
|
|
146
|
+
organizationId: this.options.organizationId,
|
|
147
|
+
status: "pending",
|
|
148
|
+
metadata: (0, context_1.mergeWithContext)({
|
|
149
|
+
workflowName: name,
|
|
150
|
+
definition,
|
|
151
|
+
...metadata,
|
|
152
|
+
}),
|
|
153
|
+
});
|
|
154
|
+
traceResultId = trace.id;
|
|
155
|
+
}
|
|
156
|
+
const workflow = {
|
|
157
|
+
id: 0,
|
|
158
|
+
traceId: traceResultId,
|
|
119
159
|
name,
|
|
120
160
|
startedAt,
|
|
121
161
|
definition,
|
|
122
162
|
metadata,
|
|
123
163
|
};
|
|
164
|
+
this.currentWorkflow = workflow;
|
|
124
165
|
// Reset state
|
|
125
166
|
this.handoffs = [];
|
|
126
167
|
this.decisions = [];
|
|
127
168
|
this.costs = [];
|
|
128
169
|
this.activeSpans.clear();
|
|
129
170
|
this.spanCounter = 0;
|
|
130
|
-
this.log("Started workflow", { name, traceId:
|
|
131
|
-
return
|
|
171
|
+
this.log("Started workflow", { name, traceId: traceResultId });
|
|
172
|
+
return workflow;
|
|
132
173
|
}
|
|
133
174
|
/**
|
|
134
175
|
* End the current workflow
|
|
@@ -140,24 +181,57 @@ class WorkflowTracer {
|
|
|
140
181
|
const durationMs = Date.now() - new Date(this.currentWorkflow.startedAt).getTime();
|
|
141
182
|
// Calculate total cost
|
|
142
183
|
const totalCost = this.costs.reduce((sum, cost) => sum + parseFloat(cost.totalCost), 0);
|
|
143
|
-
// Update the original trace with completion data
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
184
|
+
// Update the original trace with completion data (skip in offline mode)
|
|
185
|
+
if (!this.options.offline) {
|
|
186
|
+
await this.client.traces.update(this.currentWorkflow.traceId, {
|
|
187
|
+
status: status === "completed" ? "success" : "error",
|
|
188
|
+
durationMs,
|
|
189
|
+
metadata: (0, context_1.mergeWithContext)({
|
|
190
|
+
workflowName: this.currentWorkflow.name,
|
|
191
|
+
output,
|
|
192
|
+
status,
|
|
193
|
+
totalCost: totalCost.toFixed(6),
|
|
194
|
+
handoffCount: this.handoffs.length,
|
|
195
|
+
decisionCount: this.decisions.length,
|
|
196
|
+
agentCount: new Set(this.handoffs.map((h) => h.toAgent)).size + 1,
|
|
197
|
+
retryCount: this.costs.filter((c) => c.isRetry).length,
|
|
198
|
+
handoffs: this.handoffs,
|
|
199
|
+
decisions: this.decisions,
|
|
200
|
+
costs: this.costs,
|
|
201
|
+
}),
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
// In offline mode, persist workflow data to local filesystem
|
|
205
|
+
if (this.options.offline) {
|
|
206
|
+
try {
|
|
207
|
+
const dataDir = nodePath.resolve(".evalgate-data", "workflows");
|
|
208
|
+
fs.mkdirSync(dataDir, { recursive: true });
|
|
209
|
+
const fileName = `${this.currentWorkflow.name.replace(/[^a-zA-Z0-9_-]/g, "_")}-${Date.now()}.json`;
|
|
210
|
+
const workflowData = {
|
|
211
|
+
name: this.currentWorkflow.name,
|
|
212
|
+
startedAt: this.currentWorkflow.startedAt,
|
|
213
|
+
endedAt: new Date().toISOString(),
|
|
214
|
+
status,
|
|
215
|
+
durationMs,
|
|
216
|
+
totalCost: totalCost.toFixed(6),
|
|
217
|
+
handoffs: this.handoffs,
|
|
218
|
+
decisions: this.decisions,
|
|
219
|
+
costs: this.costs,
|
|
220
|
+
output,
|
|
221
|
+
metadata: this.currentWorkflow.metadata,
|
|
222
|
+
definition: this.currentWorkflow.definition,
|
|
223
|
+
};
|
|
224
|
+
fs.writeFileSync(nodePath.join(dataDir, fileName), JSON.stringify(workflowData, null, 2));
|
|
225
|
+
this.log("Saved workflow to local filesystem", {
|
|
226
|
+
path: nodePath.join(dataDir, fileName),
|
|
227
|
+
});
|
|
228
|
+
}
|
|
229
|
+
catch (err) {
|
|
230
|
+
this.log("Failed to save workflow to local filesystem", {
|
|
231
|
+
error: err instanceof Error ? err.message : String(err),
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
161
235
|
this.log("Ended workflow", {
|
|
162
236
|
name: this.currentWorkflow.name,
|
|
163
237
|
status,
|
|
@@ -193,18 +267,20 @@ class WorkflowTracer {
|
|
|
193
267
|
metadata: input,
|
|
194
268
|
};
|
|
195
269
|
this.activeSpans.set(spanId, spanContext);
|
|
196
|
-
// Create span via API
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
270
|
+
// Create span via API (skip in offline mode)
|
|
271
|
+
if (!this.options.offline) {
|
|
272
|
+
await this.client.traces.createSpan(this.currentWorkflow.traceId, {
|
|
273
|
+
name: `Agent: ${agentName}`,
|
|
274
|
+
spanId,
|
|
275
|
+
type: "agent",
|
|
276
|
+
parentSpanId,
|
|
277
|
+
startTime,
|
|
278
|
+
metadata: (0, context_1.mergeWithContext)({
|
|
279
|
+
agentName,
|
|
280
|
+
...(this.options.captureFullPayloads ? { input } : {}),
|
|
281
|
+
}),
|
|
282
|
+
});
|
|
283
|
+
}
|
|
208
284
|
this.log("Started agent span", { agentName, spanId });
|
|
209
285
|
return spanContext;
|
|
210
286
|
}
|
|
@@ -217,21 +293,23 @@ class WorkflowTracer {
|
|
|
217
293
|
}
|
|
218
294
|
const endTime = new Date().toISOString();
|
|
219
295
|
const durationMs = new Date(endTime).getTime() - new Date(span.startTime).getTime();
|
|
220
|
-
// Update span via API (
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
296
|
+
// Update span via API (skip in offline mode)
|
|
297
|
+
if (!this.options.offline) {
|
|
298
|
+
await this.client.traces.createSpan(this.currentWorkflow.traceId, {
|
|
299
|
+
name: `Agent: ${span.agentName}`,
|
|
300
|
+
spanId: `${span.spanId}-end`,
|
|
301
|
+
type: "agent",
|
|
302
|
+
parentSpanId: span.spanId,
|
|
303
|
+
startTime: span.startTime,
|
|
304
|
+
endTime,
|
|
305
|
+
durationMs,
|
|
306
|
+
metadata: (0, context_1.mergeWithContext)({
|
|
307
|
+
agentName: span.agentName,
|
|
308
|
+
...(this.options.captureFullPayloads ? { output } : {}),
|
|
309
|
+
...(error ? { error } : {}),
|
|
310
|
+
}),
|
|
311
|
+
});
|
|
312
|
+
}
|
|
235
313
|
this.activeSpans.delete(span.spanId);
|
|
236
314
|
this.log("Ended agent span", {
|
|
237
315
|
agentName: span.agentName,
|
|
@@ -267,22 +345,24 @@ class WorkflowTracer {
|
|
|
267
345
|
timestamp: new Date().toISOString(),
|
|
268
346
|
};
|
|
269
347
|
this.handoffs.push(handoff);
|
|
270
|
-
// Also create a span for the handoff
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
348
|
+
// Also create a span for the handoff (skip in offline mode)
|
|
349
|
+
if (!this.options.offline) {
|
|
350
|
+
const spanId = `handoff-${this.handoffs.length}-${this.generateId()}`;
|
|
351
|
+
await this.client.traces.createSpan(this.currentWorkflow.traceId, {
|
|
352
|
+
name: `Handoff: ${fromAgent || "start"} → ${toAgent}`,
|
|
353
|
+
spanId,
|
|
354
|
+
type: "handoff",
|
|
355
|
+
startTime: handoff.timestamp,
|
|
356
|
+
endTime: handoff.timestamp,
|
|
357
|
+
durationMs: 0,
|
|
358
|
+
metadata: (0, context_1.mergeWithContext)({
|
|
359
|
+
handoffType,
|
|
360
|
+
fromAgent,
|
|
361
|
+
toAgent,
|
|
362
|
+
context,
|
|
363
|
+
}),
|
|
364
|
+
});
|
|
365
|
+
}
|
|
286
366
|
this.log("Recorded handoff", { fromAgent, toAgent, handoffType });
|
|
287
367
|
}
|
|
288
368
|
// ==========================================================================
|
|
@@ -312,28 +392,30 @@ class WorkflowTracer {
|
|
|
312
392
|
throw new Error("No active workflow. Call startWorkflow() first.");
|
|
313
393
|
}
|
|
314
394
|
this.decisions.push(params);
|
|
315
|
-
// Create a span for the decision
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
395
|
+
// Create a span for the decision (skip in offline mode)
|
|
396
|
+
if (!this.options.offline) {
|
|
397
|
+
const spanId = `decision-${this.decisions.length}-${this.generateId()}`;
|
|
398
|
+
const timestamp = new Date().toISOString();
|
|
399
|
+
await this.client.traces.createSpan(this.currentWorkflow.traceId, {
|
|
400
|
+
name: `Decision: ${params.agent} chose ${params.chosen}`,
|
|
401
|
+
spanId,
|
|
402
|
+
type: "decision",
|
|
403
|
+
startTime: timestamp,
|
|
404
|
+
endTime: timestamp,
|
|
405
|
+
durationMs: 0,
|
|
406
|
+
metadata: (0, context_1.mergeWithContext)({
|
|
407
|
+
isDecisionPoint: true,
|
|
408
|
+
agentName: params.agent,
|
|
409
|
+
decisionType: params.type,
|
|
410
|
+
chosen: params.chosen,
|
|
411
|
+
alternatives: params.alternatives,
|
|
412
|
+
reasoning: params.reasoning,
|
|
413
|
+
confidence: params.confidence,
|
|
414
|
+
contextFactors: params.contextFactors,
|
|
415
|
+
inputContext: params.inputContext,
|
|
416
|
+
}),
|
|
417
|
+
});
|
|
418
|
+
}
|
|
337
419
|
this.log("Recorded decision", {
|
|
338
420
|
agent: params.agent,
|
|
339
421
|
type: params.type,
|
|
@@ -375,8 +457,8 @@ class WorkflowTracer {
|
|
|
375
457
|
totalCost: totalCost.toFixed(6),
|
|
376
458
|
};
|
|
377
459
|
this.costs.push(costRecord);
|
|
378
|
-
// Also record as a span if in an active workflow
|
|
379
|
-
if (this.currentWorkflow) {
|
|
460
|
+
// Also record as a span if in an active workflow (skip in offline mode)
|
|
461
|
+
if (this.currentWorkflow && !this.options.offline) {
|
|
380
462
|
const spanId = `cost-${this.costs.length}-${this.generateId()}`;
|
|
381
463
|
const timestamp = new Date().toISOString();
|
|
382
464
|
await this.client.traces.createSpan(this.currentWorkflow.traceId, {
|
package/package.json
CHANGED
|
@@ -1,118 +1,125 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
2
|
+
"name": "@evalgate/sdk",
|
|
3
|
+
"version": "2.3.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public",
|
|
6
|
+
"registry": "https://registry.npmjs.org/"
|
|
7
|
+
},
|
|
8
|
+
"description": "EvalGate SDK - Complete API Coverage with Performance Optimizations",
|
|
9
|
+
"main": "dist/index.js",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"files": [
|
|
14
|
+
"dist",
|
|
15
|
+
"README.md",
|
|
16
|
+
"CHANGELOG.md"
|
|
17
|
+
],
|
|
18
|
+
"bin": {
|
|
19
|
+
"evalgate": "dist/cli/index.js"
|
|
20
|
+
},
|
|
21
|
+
"engines": {
|
|
22
|
+
"node": ">=16.0.0"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"ai",
|
|
26
|
+
"evaluation",
|
|
27
|
+
"llm",
|
|
28
|
+
"testing",
|
|
29
|
+
"observability",
|
|
30
|
+
"tracing",
|
|
31
|
+
"monitoring",
|
|
32
|
+
"annotations",
|
|
33
|
+
"webhooks",
|
|
34
|
+
"developer-tools",
|
|
35
|
+
"openai",
|
|
36
|
+
"anthropic"
|
|
37
|
+
],
|
|
38
|
+
"author": "EvalGate Team",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/pauly7610/ai-evaluation-platform.git",
|
|
43
|
+
"directory": "src/packages/sdk"
|
|
44
|
+
},
|
|
45
|
+
"homepage": "https://evalgate.com",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/pauly7610/ai-evaluation-platform/issues"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"commander": "^14.0.0"
|
|
51
|
+
},
|
|
52
|
+
"peerDependencies": {
|
|
53
|
+
"@anthropic-ai/sdk": "^0.20.0",
|
|
54
|
+
"openai": "^4.0.0"
|
|
55
|
+
},
|
|
56
|
+
"peerDependenciesMeta": {
|
|
57
|
+
"openai": {
|
|
58
|
+
"optional": true
|
|
59
|
+
},
|
|
60
|
+
"@anthropic-ai/sdk": {
|
|
61
|
+
"optional": true
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@types/node": "^20.0.0",
|
|
66
|
+
"ts-node": "^10.9.2",
|
|
67
|
+
"typescript": "^5.0.0",
|
|
68
|
+
"vitest": "^1.0.0"
|
|
69
|
+
},
|
|
70
|
+
"exports": {
|
|
71
|
+
".": {
|
|
72
|
+
"import": "./dist/index.js",
|
|
73
|
+
"require": "./dist/index.js",
|
|
74
|
+
"types": "./dist/index.d.ts"
|
|
75
|
+
},
|
|
76
|
+
"./assertions": {
|
|
77
|
+
"import": "./dist/assertions.js",
|
|
78
|
+
"require": "./dist/assertions.js",
|
|
79
|
+
"types": "./dist/assertions.d.ts"
|
|
80
|
+
},
|
|
81
|
+
"./testing": {
|
|
82
|
+
"import": "./dist/testing.js",
|
|
83
|
+
"require": "./dist/testing.js",
|
|
84
|
+
"types": "./dist/testing.d.ts"
|
|
85
|
+
},
|
|
86
|
+
"./integrations/openai": {
|
|
87
|
+
"import": "./dist/integrations/openai.js",
|
|
88
|
+
"require": "./dist/integrations/openai.js",
|
|
89
|
+
"types": "./dist/integrations/openai.d.ts"
|
|
90
|
+
},
|
|
91
|
+
"./integrations/anthropic": {
|
|
92
|
+
"import": "./dist/integrations/anthropic.js",
|
|
93
|
+
"require": "./dist/integrations/anthropic.js",
|
|
94
|
+
"types": "./dist/integrations/anthropic.d.ts"
|
|
95
|
+
},
|
|
96
|
+
"./integrations/openai-eval": {
|
|
97
|
+
"import": "./dist/integrations/openai-eval.js",
|
|
98
|
+
"require": "./dist/integrations/openai-eval.js",
|
|
99
|
+
"types": "./dist/integrations/openai-eval.d.ts"
|
|
100
|
+
},
|
|
101
|
+
"./matchers": {
|
|
102
|
+
"import": "./dist/matchers/index.js",
|
|
103
|
+
"require": "./dist/matchers/index.js",
|
|
104
|
+
"types": "./dist/matchers/index.d.ts"
|
|
105
|
+
},
|
|
106
|
+
"./regression": {
|
|
107
|
+
"import": "./dist/regression.js",
|
|
108
|
+
"require": "./dist/regression.js",
|
|
109
|
+
"types": "./dist/regression.d.ts"
|
|
110
|
+
},
|
|
111
|
+
"./otel": {
|
|
112
|
+
"import": "./dist/otel.js",
|
|
113
|
+
"require": "./dist/otel.js",
|
|
114
|
+
"types": "./dist/otel.d.ts"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"scripts": {
|
|
118
|
+
"build": "tsc",
|
|
119
|
+
"dev": "tsc --watch",
|
|
120
|
+
"test": "vitest run",
|
|
121
|
+
"test:dist": "tsc && vitest run src/__tests__/dist-smoke.test.ts",
|
|
122
|
+
"otel:test": "bash otel-integration/run-test.sh",
|
|
123
|
+
"test:watch": "vitest"
|
|
124
|
+
}
|
|
125
|
+
}
|