@langwatch/scenario 0.4.1 → 0.4.3
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 +2 -2
- package/dist/index.d.mts +220 -41
- package/dist/index.d.ts +220 -41
- package/dist/index.js +2485 -1733
- package/dist/index.mjs +2738 -1988
- package/dist/integrations/vitest/setup.js +5 -2
- package/dist/integrations/vitest/setup.mjs +5 -2
- package/package.json +4 -3
|
@@ -113,7 +113,10 @@ var modelSchema = import_v42.z.object({
|
|
|
113
113
|
var headless = typeof process !== "undefined" ? process.env.SCENARIO_HEADLESS === "true" : false;
|
|
114
114
|
var scenarioProjectConfigSchema = import_v43.z.object({
|
|
115
115
|
defaultModel: modelSchema.optional(),
|
|
116
|
-
headless: import_v43.z.boolean().optional().default(headless)
|
|
116
|
+
headless: import_v43.z.boolean().optional().default(headless),
|
|
117
|
+
observability: import_v43.z.custom((val) => {
|
|
118
|
+
return val === void 0 || typeof val === "object" && val !== null && !Array.isArray(val);
|
|
119
|
+
}).optional()
|
|
117
120
|
}).strict();
|
|
118
121
|
|
|
119
122
|
// src/config/load.ts
|
|
@@ -410,7 +413,7 @@ var scenarioRunStartedSchema = baseScenarioEventSchema.extend({
|
|
|
410
413
|
metadata: import_zod.z.object({
|
|
411
414
|
name: import_zod.z.string().optional(),
|
|
412
415
|
description: import_zod.z.string().optional()
|
|
413
|
-
})
|
|
416
|
+
}).catchall(import_zod.z.unknown())
|
|
414
417
|
});
|
|
415
418
|
var scenarioResultsSchema = import_zod.z.object({
|
|
416
419
|
verdict: import_zod.z.nativeEnum(Verdict),
|
|
@@ -96,7 +96,10 @@ var modelSchema = z2.object({
|
|
|
96
96
|
var headless = typeof process !== "undefined" ? process.env.SCENARIO_HEADLESS === "true" : false;
|
|
97
97
|
var scenarioProjectConfigSchema = z3.object({
|
|
98
98
|
defaultModel: modelSchema.optional(),
|
|
99
|
-
headless: z3.boolean().optional().default(headless)
|
|
99
|
+
headless: z3.boolean().optional().default(headless),
|
|
100
|
+
observability: z3.custom((val) => {
|
|
101
|
+
return val === void 0 || typeof val === "object" && val !== null && !Array.isArray(val);
|
|
102
|
+
}).optional()
|
|
100
103
|
}).strict();
|
|
101
104
|
|
|
102
105
|
// src/config/load.ts
|
|
@@ -393,7 +396,7 @@ var scenarioRunStartedSchema = baseScenarioEventSchema.extend({
|
|
|
393
396
|
metadata: z4.object({
|
|
394
397
|
name: z4.string().optional(),
|
|
395
398
|
description: z4.string().optional()
|
|
396
|
-
})
|
|
399
|
+
}).catchall(z4.unknown())
|
|
397
400
|
});
|
|
398
401
|
var scenarioResultsSchema = z4.object({
|
|
399
402
|
verdict: z4.nativeEnum(Verdict),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@langwatch/scenario",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "A TypeScript library for testing AI agents using scenarios",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -29,11 +29,12 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@ag-ui/core": "^0.0.28",
|
|
32
|
-
"@ai-sdk/openai": "^
|
|
32
|
+
"@ai-sdk/openai": "^3.0.26",
|
|
33
33
|
"@openai/agents": "^0.3.3",
|
|
34
|
+
"@opentelemetry/sdk-node": "0.212.0",
|
|
34
35
|
"ai": "^6.0.0",
|
|
35
36
|
"chalk": "^5.6.2",
|
|
36
|
-
"langwatch": "0.
|
|
37
|
+
"langwatch": "0.16.1",
|
|
37
38
|
"open": "11.0.0",
|
|
38
39
|
"rxjs": "^7.8.2",
|
|
39
40
|
"xksuid": "^0.0.4",
|