@tracedojo/sdk 0.1.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 (58) hide show
  1. package/LICENSE +202 -0
  2. package/NOTICE +5 -0
  3. package/README.md +96 -0
  4. package/dist/cli.d.ts +2 -0
  5. package/dist/cli.js +356 -0
  6. package/dist/clock.d.ts +41 -0
  7. package/dist/clock.js +118 -0
  8. package/dist/compare.d.ts +20 -0
  9. package/dist/compare.js +147 -0
  10. package/dist/demo.d.ts +465 -0
  11. package/dist/demo.js +45 -0
  12. package/dist/index.d.ts +35 -0
  13. package/dist/index.js +515 -0
  14. package/dist/langchain.d.ts +9 -0
  15. package/dist/langchain.js +17 -0
  16. package/dist/langsmith-starter.d.ts +4 -0
  17. package/dist/langsmith-starter.js +77 -0
  18. package/dist/langsmith.d.ts +30 -0
  19. package/dist/langsmith.js +148 -0
  20. package/dist/matrix-cli.d.ts +107 -0
  21. package/dist/matrix-cli.js +154 -0
  22. package/dist/matrix.d.ts +138 -0
  23. package/dist/matrix.js +148 -0
  24. package/dist/privacy.d.ts +5 -0
  25. package/dist/privacy.js +51 -0
  26. package/dist/reports.d.ts +2 -0
  27. package/dist/reports.js +38 -0
  28. package/dist/schema.d.ts +715 -0
  29. package/dist/schema.js +433 -0
  30. package/dist/starter.d.ts +1 -0
  31. package/dist/starter.js +64 -0
  32. package/dist/summary.d.ts +2 -0
  33. package/dist/summary.js +50 -0
  34. package/dist/trends.d.ts +25 -0
  35. package/dist/trends.js +164 -0
  36. package/dist/upload.d.ts +8 -0
  37. package/dist/upload.js +73 -0
  38. package/dist/worlds.d.ts +9 -0
  39. package/dist/worlds.js +279 -0
  40. package/package.json +85 -0
  41. package/templates/README.md +65 -0
  42. package/templates/adapter.mjs +88 -0
  43. package/templates/ci-comment.yml +40 -0
  44. package/templates/ci.yml +100 -0
  45. package/templates/clock-adapter.mjs +42 -0
  46. package/templates/comment.cjs +209 -0
  47. package/templates/faults/duplicate-delivery/README.md +19 -0
  48. package/templates/faults/duplicate-delivery/adapter.mjs +40 -0
  49. package/templates/faults/duplicate-delivery/workflow.json +31 -0
  50. package/templates/faults/prompt-injection/README.md +17 -0
  51. package/templates/faults/prompt-injection/adapter.mjs +36 -0
  52. package/templates/faults/prompt-injection/workflow.json +43 -0
  53. package/templates/faults/stale-read/README.md +21 -0
  54. package/templates/faults/stale-read/adapter.mjs +59 -0
  55. package/templates/faults/stale-read/workflow.json +33 -0
  56. package/templates/langsmith-adapter.mjs +83 -0
  57. package/templates/workflow.json +106 -0
  58. package/templates/world-adapter.mjs +67 -0
@@ -0,0 +1,715 @@
1
+ import { z } from 'zod';
2
+ export type Json = null | boolean | number | string | Json[] | {
3
+ [key: string]: Json;
4
+ };
5
+ export type State = Record<string, Json>;
6
+ export declare const virtualClockSchema: z.ZodObject<{
7
+ mode: z.ZodLiteral<"virtual">;
8
+ startMs: z.ZodDefault<z.ZodNumber>;
9
+ maxTimeMs: z.ZodDefault<z.ZodNumber>;
10
+ }, z.core.$strict>;
11
+ /** Validate before recursive schemas, cloning, or hashing untrusted JSON. */
12
+ export declare function boundedJson(value: unknown, maxBytes?: number): void;
13
+ export declare function stableJson(value: unknown): string;
14
+ export declare const workflowFaultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
15
+ type: z.ZodLiteral<"none">;
16
+ }, z.core.$strict>, z.ZodObject<{
17
+ type: z.ZodLiteral<"prompt_injection">;
18
+ tool: z.ZodString;
19
+ occurrence: z.ZodDefault<z.ZodNumber>;
20
+ repeat: z.ZodDefault<z.ZodNumber>;
21
+ replacement: z.ZodJSONSchema;
22
+ }, z.core.$strict>, z.ZodObject<{
23
+ type: z.ZodEnum<{
24
+ timeout_before: "timeout_before";
25
+ timeout_after: "timeout_after";
26
+ unavailable: "unavailable";
27
+ malformed: "malformed";
28
+ permission_revoked: "permission_revoked";
29
+ duplicate_delivery: "duplicate_delivery";
30
+ stale_read: "stale_read";
31
+ }>;
32
+ tool: z.ZodString;
33
+ occurrence: z.ZodDefault<z.ZodNumber>;
34
+ repeat: z.ZodDefault<z.ZodNumber>;
35
+ }, z.core.$strict>], "type">;
36
+ export type WorkflowFault = z.infer<typeof workflowFaultSchema>;
37
+ export declare const checkSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ id: z.ZodString;
39
+ label: z.ZodString;
40
+ type: z.ZodLiteral<"forbidden_tool">;
41
+ tool: z.ZodString;
42
+ }, z.core.$strict>, z.ZodObject<{
43
+ id: z.ZodString;
44
+ label: z.ZodString;
45
+ type: z.ZodLiteral<"equals">;
46
+ source: z.ZodDefault<z.ZodEnum<{
47
+ state: "state";
48
+ completion: "completion";
49
+ }>>;
50
+ path: z.ZodString;
51
+ expected: z.ZodJSONSchema;
52
+ }, z.core.$strict>, z.ZodObject<{
53
+ id: z.ZodString;
54
+ label: z.ZodString;
55
+ type: z.ZodLiteral<"count">;
56
+ path: z.ZodString;
57
+ expected: z.ZodNumber;
58
+ }, z.core.$strict>, z.ZodObject<{
59
+ id: z.ZodString;
60
+ label: z.ZodString;
61
+ type: z.ZodLiteral<"unchanged">;
62
+ path: z.ZodString;
63
+ }, z.core.$strict>], "type">;
64
+ export type WorkflowCheck = z.infer<typeof checkSchema>;
65
+ export declare const workflowSchema: z.ZodObject<{
66
+ schemaVersion: z.ZodLiteral<"workflow/1">;
67
+ id: z.ZodString;
68
+ title: z.ZodString;
69
+ task: z.ZodString;
70
+ initialState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
71
+ clock: z.ZodOptional<z.ZodObject<{
72
+ mode: z.ZodLiteral<"virtual">;
73
+ startMs: z.ZodDefault<z.ZodNumber>;
74
+ maxTimeMs: z.ZodDefault<z.ZodNumber>;
75
+ }, z.core.$strict>>;
76
+ checks: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
77
+ id: z.ZodString;
78
+ label: z.ZodString;
79
+ type: z.ZodLiteral<"forbidden_tool">;
80
+ tool: z.ZodString;
81
+ }, z.core.$strict>, z.ZodObject<{
82
+ id: z.ZodString;
83
+ label: z.ZodString;
84
+ type: z.ZodLiteral<"equals">;
85
+ source: z.ZodDefault<z.ZodEnum<{
86
+ state: "state";
87
+ completion: "completion";
88
+ }>>;
89
+ path: z.ZodString;
90
+ expected: z.ZodJSONSchema;
91
+ }, z.core.$strict>, z.ZodObject<{
92
+ id: z.ZodString;
93
+ label: z.ZodString;
94
+ type: z.ZodLiteral<"count">;
95
+ path: z.ZodString;
96
+ expected: z.ZodNumber;
97
+ }, z.core.$strict>, z.ZodObject<{
98
+ id: z.ZodString;
99
+ label: z.ZodString;
100
+ type: z.ZodLiteral<"unchanged">;
101
+ path: z.ZodString;
102
+ }, z.core.$strict>], "type">>;
103
+ scenarios: z.ZodArray<z.ZodObject<{
104
+ id: z.ZodString;
105
+ title: z.ZodString;
106
+ fault: z.ZodDiscriminatedUnion<[z.ZodObject<{
107
+ type: z.ZodLiteral<"none">;
108
+ }, z.core.$strict>, z.ZodObject<{
109
+ type: z.ZodLiteral<"prompt_injection">;
110
+ tool: z.ZodString;
111
+ occurrence: z.ZodDefault<z.ZodNumber>;
112
+ repeat: z.ZodDefault<z.ZodNumber>;
113
+ replacement: z.ZodJSONSchema;
114
+ }, z.core.$strict>, z.ZodObject<{
115
+ type: z.ZodEnum<{
116
+ timeout_before: "timeout_before";
117
+ timeout_after: "timeout_after";
118
+ unavailable: "unavailable";
119
+ malformed: "malformed";
120
+ permission_revoked: "permission_revoked";
121
+ duplicate_delivery: "duplicate_delivery";
122
+ stale_read: "stale_read";
123
+ }>;
124
+ tool: z.ZodString;
125
+ occurrence: z.ZodDefault<z.ZodNumber>;
126
+ repeat: z.ZodDefault<z.ZodNumber>;
127
+ }, z.core.$strict>], "type">;
128
+ checks: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
129
+ id: z.ZodString;
130
+ label: z.ZodString;
131
+ type: z.ZodLiteral<"forbidden_tool">;
132
+ tool: z.ZodString;
133
+ }, z.core.$strict>, z.ZodObject<{
134
+ id: z.ZodString;
135
+ label: z.ZodString;
136
+ type: z.ZodLiteral<"equals">;
137
+ source: z.ZodDefault<z.ZodEnum<{
138
+ state: "state";
139
+ completion: "completion";
140
+ }>>;
141
+ path: z.ZodString;
142
+ expected: z.ZodJSONSchema;
143
+ }, z.core.$strict>, z.ZodObject<{
144
+ id: z.ZodString;
145
+ label: z.ZodString;
146
+ type: z.ZodLiteral<"count">;
147
+ path: z.ZodString;
148
+ expected: z.ZodNumber;
149
+ }, z.core.$strict>, z.ZodObject<{
150
+ id: z.ZodString;
151
+ label: z.ZodString;
152
+ type: z.ZodLiteral<"unchanged">;
153
+ path: z.ZodString;
154
+ }, z.core.$strict>], "type">>>;
155
+ }, z.core.$strict>>;
156
+ limits: z.ZodDefault<z.ZodObject<{
157
+ maxToolCalls: z.ZodDefault<z.ZodNumber>;
158
+ maxRepeatedCalls: z.ZodDefault<z.ZodNumber>;
159
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
160
+ }, z.core.$strict>>;
161
+ }, z.core.$strict>;
162
+ export type Workflow = z.infer<typeof workflowSchema>;
163
+ export declare function parseWorkflow(input: unknown): Workflow;
164
+ export declare const completionSchema: z.ZodObject<{
165
+ status: z.ZodEnum<{
166
+ completed: "completed";
167
+ blocked: "blocked";
168
+ }>;
169
+ message: z.ZodString;
170
+ output: z.ZodOptional<z.ZodJSONSchema>;
171
+ }, z.core.$strict>;
172
+ export type WorkflowCompletion = z.infer<typeof completionSchema>;
173
+ export declare const resultSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
174
+ ok: z.ZodLiteral<true>;
175
+ data: z.ZodJSONSchema;
176
+ }, z.core.$strict>, z.ZodObject<{
177
+ ok: z.ZodLiteral<false>;
178
+ error: z.ZodObject<{
179
+ code: z.ZodString;
180
+ message: z.ZodString;
181
+ retryable: z.ZodBoolean;
182
+ }, z.core.$strict>;
183
+ }, z.core.$strict>], "ok">;
184
+ export type ToolResult = z.infer<typeof resultSchema>;
185
+ export declare const eventSchema: z.ZodObject<{
186
+ timeMs: z.ZodOptional<z.ZodNumber>;
187
+ id: z.ZodString;
188
+ sequence: z.ZodNumber;
189
+ kind: z.ZodEnum<{
190
+ error: "error";
191
+ completion: "completion";
192
+ fault: "fault";
193
+ request: "request";
194
+ model: "model";
195
+ tool_call: "tool_call";
196
+ tool_result: "tool_result";
197
+ delivery: "delivery";
198
+ mutation: "mutation";
199
+ limit: "limit";
200
+ }>;
201
+ visibility: z.ZodEnum<{
202
+ agent: "agent";
203
+ evaluator: "evaluator";
204
+ }>;
205
+ detail: z.ZodString;
206
+ callId: z.ZodOptional<z.ZodString>;
207
+ tool: z.ZodOptional<z.ZodString>;
208
+ payload: z.ZodOptional<z.ZodJSONSchema>;
209
+ }, z.core.$strict>;
210
+ export type WorkflowEvent = z.infer<typeof eventSchema>;
211
+ declare const checkResultSchema: z.ZodObject<{
212
+ id: z.ZodString;
213
+ label: z.ZodString;
214
+ passed: z.ZodBoolean;
215
+ detail: z.ZodString;
216
+ before: z.ZodOptional<z.ZodJSONSchema>;
217
+ actual: z.ZodOptional<z.ZodJSONSchema>;
218
+ expected: z.ZodOptional<z.ZodJSONSchema>;
219
+ evidenceIds: z.ZodArray<z.ZodString>;
220
+ }, z.core.$strict>;
221
+ export type CheckResult = z.infer<typeof checkResultSchema>;
222
+ export declare function evaluateChecks(definitions: WorkflowCheck[], initial: State, final: State, completion: WorkflowCompletion | undefined, events: WorkflowEvent[]): CheckResult[];
223
+ export declare const commitShaSchema: z.ZodString;
224
+ export declare const executionSchema: z.ZodObject<{
225
+ id: z.ZodUUID;
226
+ commitSha: z.ZodOptional<z.ZodString>;
227
+ trialsPerScenario: z.ZodNumber;
228
+ scenarioIds: z.ZodArray<z.ZodString>;
229
+ }, z.core.$strict>;
230
+ export declare const workflowReportSchema: z.ZodObject<{
231
+ schemaVersion: z.ZodLiteral<"1">;
232
+ reportType: z.ZodLiteral<"workflow">;
233
+ id: z.ZodString;
234
+ createdAt: z.ZodISODateTime;
235
+ execution: z.ZodOptional<z.ZodObject<{
236
+ id: z.ZodUUID;
237
+ commitSha: z.ZodOptional<z.ZodString>;
238
+ trialsPerScenario: z.ZodNumber;
239
+ scenarioIds: z.ZodArray<z.ZodString>;
240
+ }, z.core.$strict>>;
241
+ origin: z.ZodOptional<z.ZodObject<{
242
+ kind: z.ZodLiteral<"imported">;
243
+ originalId: z.ZodString;
244
+ }, z.core.$strict>>;
245
+ workflow: z.ZodObject<{
246
+ id: z.ZodString;
247
+ title: z.ZodString;
248
+ task: z.ZodString;
249
+ }, z.core.$strict>;
250
+ suiteFingerprint: z.ZodString;
251
+ agent: z.ZodObject<{
252
+ id: z.ZodString;
253
+ version: z.ZodString;
254
+ }, z.core.$strict>;
255
+ scenario: z.ZodObject<{
256
+ id: z.ZodString;
257
+ title: z.ZodString;
258
+ fault: z.ZodDiscriminatedUnion<[z.ZodObject<{
259
+ type: z.ZodLiteral<"none">;
260
+ }, z.core.$strict>, z.ZodObject<{
261
+ type: z.ZodLiteral<"prompt_injection">;
262
+ tool: z.ZodString;
263
+ occurrence: z.ZodDefault<z.ZodNumber>;
264
+ repeat: z.ZodDefault<z.ZodNumber>;
265
+ replacement: z.ZodJSONSchema;
266
+ }, z.core.$strict>, z.ZodObject<{
267
+ type: z.ZodEnum<{
268
+ timeout_before: "timeout_before";
269
+ timeout_after: "timeout_after";
270
+ unavailable: "unavailable";
271
+ malformed: "malformed";
272
+ permission_revoked: "permission_revoked";
273
+ duplicate_delivery: "duplicate_delivery";
274
+ stale_read: "stale_read";
275
+ }>;
276
+ tool: z.ZodString;
277
+ occurrence: z.ZodDefault<z.ZodNumber>;
278
+ repeat: z.ZodDefault<z.ZodNumber>;
279
+ }, z.core.$strict>], "type">;
280
+ }, z.core.$strict>;
281
+ status: z.ZodEnum<{
282
+ passed: "passed";
283
+ failed: "failed";
284
+ inconclusive: "inconclusive";
285
+ cancelled: "cancelled";
286
+ timed_out: "timed_out";
287
+ }>;
288
+ issue: z.ZodOptional<z.ZodEnum<{
289
+ cancelled: "cancelled";
290
+ timed_out: "timed_out";
291
+ agent_error: "agent_error";
292
+ tool_contract: "tool_contract";
293
+ call_limit: "call_limit";
294
+ repeated_calls: "repeated_calls";
295
+ unawaited_calls: "unawaited_calls";
296
+ evidence_limit: "evidence_limit";
297
+ initialization: "initialization";
298
+ clock_limit: "clock_limit";
299
+ clock_contract: "clock_contract";
300
+ }>>;
301
+ fault: z.ZodObject<{
302
+ triggered: z.ZodBoolean;
303
+ triggerCount: z.ZodNumber;
304
+ }, z.core.$strict>;
305
+ initialState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
306
+ clock: z.ZodOptional<z.ZodObject<{
307
+ mode: z.ZodLiteral<"virtual">;
308
+ startMs: z.ZodDefault<z.ZodNumber>;
309
+ maxTimeMs: z.ZodDefault<z.ZodNumber>;
310
+ endMs: z.ZodNumber;
311
+ }, z.core.$strict>>;
312
+ finalState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
313
+ definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
314
+ id: z.ZodString;
315
+ label: z.ZodString;
316
+ type: z.ZodLiteral<"forbidden_tool">;
317
+ tool: z.ZodString;
318
+ }, z.core.$strict>, z.ZodObject<{
319
+ id: z.ZodString;
320
+ label: z.ZodString;
321
+ type: z.ZodLiteral<"equals">;
322
+ source: z.ZodDefault<z.ZodEnum<{
323
+ state: "state";
324
+ completion: "completion";
325
+ }>>;
326
+ path: z.ZodString;
327
+ expected: z.ZodJSONSchema;
328
+ }, z.core.$strict>, z.ZodObject<{
329
+ id: z.ZodString;
330
+ label: z.ZodString;
331
+ type: z.ZodLiteral<"count">;
332
+ path: z.ZodString;
333
+ expected: z.ZodNumber;
334
+ }, z.core.$strict>, z.ZodObject<{
335
+ id: z.ZodString;
336
+ label: z.ZodString;
337
+ type: z.ZodLiteral<"unchanged">;
338
+ path: z.ZodString;
339
+ }, z.core.$strict>], "type">>;
340
+ assertions: z.ZodArray<z.ZodObject<{
341
+ id: z.ZodString;
342
+ label: z.ZodString;
343
+ passed: z.ZodBoolean;
344
+ detail: z.ZodString;
345
+ before: z.ZodOptional<z.ZodJSONSchema>;
346
+ actual: z.ZodOptional<z.ZodJSONSchema>;
347
+ expected: z.ZodOptional<z.ZodJSONSchema>;
348
+ evidenceIds: z.ZodArray<z.ZodString>;
349
+ }, z.core.$strict>>;
350
+ completion: z.ZodOptional<z.ZodObject<{
351
+ status: z.ZodEnum<{
352
+ completed: "completed";
353
+ blocked: "blocked";
354
+ }>;
355
+ message: z.ZodString;
356
+ output: z.ZodOptional<z.ZodJSONSchema>;
357
+ }, z.core.$strict>>;
358
+ events: z.ZodArray<z.ZodObject<{
359
+ timeMs: z.ZodOptional<z.ZodNumber>;
360
+ id: z.ZodString;
361
+ sequence: z.ZodNumber;
362
+ kind: z.ZodEnum<{
363
+ error: "error";
364
+ completion: "completion";
365
+ fault: "fault";
366
+ request: "request";
367
+ model: "model";
368
+ tool_call: "tool_call";
369
+ tool_result: "tool_result";
370
+ delivery: "delivery";
371
+ mutation: "mutation";
372
+ limit: "limit";
373
+ }>;
374
+ visibility: z.ZodEnum<{
375
+ agent: "agent";
376
+ evaluator: "evaluator";
377
+ }>;
378
+ detail: z.ZodString;
379
+ callId: z.ZodOptional<z.ZodString>;
380
+ tool: z.ZodOptional<z.ZodString>;
381
+ payload: z.ZodOptional<z.ZodJSONSchema>;
382
+ }, z.core.$strict>>;
383
+ metrics: z.ZodObject<{
384
+ toolCalls: z.ZodNumber;
385
+ mutations: z.ZodNumber;
386
+ durationMs: z.ZodNumber;
387
+ }, z.core.$strict>;
388
+ }, z.core.$strict>;
389
+ export type WorkflowReport = z.infer<typeof workflowReportSchema>;
390
+ export declare const workflowBatchSchema: z.ZodObject<{
391
+ schemaVersion: z.ZodLiteral<"workflow-batch/1">;
392
+ baseline: z.ZodObject<{
393
+ schemaVersion: z.ZodLiteral<"1">;
394
+ reportType: z.ZodLiteral<"workflow">;
395
+ id: z.ZodString;
396
+ createdAt: z.ZodISODateTime;
397
+ execution: z.ZodOptional<z.ZodObject<{
398
+ id: z.ZodUUID;
399
+ commitSha: z.ZodOptional<z.ZodString>;
400
+ trialsPerScenario: z.ZodNumber;
401
+ scenarioIds: z.ZodArray<z.ZodString>;
402
+ }, z.core.$strict>>;
403
+ origin: z.ZodOptional<z.ZodObject<{
404
+ kind: z.ZodLiteral<"imported">;
405
+ originalId: z.ZodString;
406
+ }, z.core.$strict>>;
407
+ workflow: z.ZodObject<{
408
+ id: z.ZodString;
409
+ title: z.ZodString;
410
+ task: z.ZodString;
411
+ }, z.core.$strict>;
412
+ suiteFingerprint: z.ZodString;
413
+ agent: z.ZodObject<{
414
+ id: z.ZodString;
415
+ version: z.ZodString;
416
+ }, z.core.$strict>;
417
+ scenario: z.ZodObject<{
418
+ id: z.ZodString;
419
+ title: z.ZodString;
420
+ fault: z.ZodDiscriminatedUnion<[z.ZodObject<{
421
+ type: z.ZodLiteral<"none">;
422
+ }, z.core.$strict>, z.ZodObject<{
423
+ type: z.ZodLiteral<"prompt_injection">;
424
+ tool: z.ZodString;
425
+ occurrence: z.ZodDefault<z.ZodNumber>;
426
+ repeat: z.ZodDefault<z.ZodNumber>;
427
+ replacement: z.ZodJSONSchema;
428
+ }, z.core.$strict>, z.ZodObject<{
429
+ type: z.ZodEnum<{
430
+ timeout_before: "timeout_before";
431
+ timeout_after: "timeout_after";
432
+ unavailable: "unavailable";
433
+ malformed: "malformed";
434
+ permission_revoked: "permission_revoked";
435
+ duplicate_delivery: "duplicate_delivery";
436
+ stale_read: "stale_read";
437
+ }>;
438
+ tool: z.ZodString;
439
+ occurrence: z.ZodDefault<z.ZodNumber>;
440
+ repeat: z.ZodDefault<z.ZodNumber>;
441
+ }, z.core.$strict>], "type">;
442
+ }, z.core.$strict>;
443
+ status: z.ZodEnum<{
444
+ passed: "passed";
445
+ failed: "failed";
446
+ inconclusive: "inconclusive";
447
+ cancelled: "cancelled";
448
+ timed_out: "timed_out";
449
+ }>;
450
+ issue: z.ZodOptional<z.ZodEnum<{
451
+ cancelled: "cancelled";
452
+ timed_out: "timed_out";
453
+ agent_error: "agent_error";
454
+ tool_contract: "tool_contract";
455
+ call_limit: "call_limit";
456
+ repeated_calls: "repeated_calls";
457
+ unawaited_calls: "unawaited_calls";
458
+ evidence_limit: "evidence_limit";
459
+ initialization: "initialization";
460
+ clock_limit: "clock_limit";
461
+ clock_contract: "clock_contract";
462
+ }>>;
463
+ fault: z.ZodObject<{
464
+ triggered: z.ZodBoolean;
465
+ triggerCount: z.ZodNumber;
466
+ }, z.core.$strict>;
467
+ initialState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
468
+ clock: z.ZodOptional<z.ZodObject<{
469
+ mode: z.ZodLiteral<"virtual">;
470
+ startMs: z.ZodDefault<z.ZodNumber>;
471
+ maxTimeMs: z.ZodDefault<z.ZodNumber>;
472
+ endMs: z.ZodNumber;
473
+ }, z.core.$strict>>;
474
+ finalState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
475
+ definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
476
+ id: z.ZodString;
477
+ label: z.ZodString;
478
+ type: z.ZodLiteral<"forbidden_tool">;
479
+ tool: z.ZodString;
480
+ }, z.core.$strict>, z.ZodObject<{
481
+ id: z.ZodString;
482
+ label: z.ZodString;
483
+ type: z.ZodLiteral<"equals">;
484
+ source: z.ZodDefault<z.ZodEnum<{
485
+ state: "state";
486
+ completion: "completion";
487
+ }>>;
488
+ path: z.ZodString;
489
+ expected: z.ZodJSONSchema;
490
+ }, z.core.$strict>, z.ZodObject<{
491
+ id: z.ZodString;
492
+ label: z.ZodString;
493
+ type: z.ZodLiteral<"count">;
494
+ path: z.ZodString;
495
+ expected: z.ZodNumber;
496
+ }, z.core.$strict>, z.ZodObject<{
497
+ id: z.ZodString;
498
+ label: z.ZodString;
499
+ type: z.ZodLiteral<"unchanged">;
500
+ path: z.ZodString;
501
+ }, z.core.$strict>], "type">>;
502
+ assertions: z.ZodArray<z.ZodObject<{
503
+ id: z.ZodString;
504
+ label: z.ZodString;
505
+ passed: z.ZodBoolean;
506
+ detail: z.ZodString;
507
+ before: z.ZodOptional<z.ZodJSONSchema>;
508
+ actual: z.ZodOptional<z.ZodJSONSchema>;
509
+ expected: z.ZodOptional<z.ZodJSONSchema>;
510
+ evidenceIds: z.ZodArray<z.ZodString>;
511
+ }, z.core.$strict>>;
512
+ completion: z.ZodOptional<z.ZodObject<{
513
+ status: z.ZodEnum<{
514
+ completed: "completed";
515
+ blocked: "blocked";
516
+ }>;
517
+ message: z.ZodString;
518
+ output: z.ZodOptional<z.ZodJSONSchema>;
519
+ }, z.core.$strict>>;
520
+ events: z.ZodArray<z.ZodObject<{
521
+ timeMs: z.ZodOptional<z.ZodNumber>;
522
+ id: z.ZodString;
523
+ sequence: z.ZodNumber;
524
+ kind: z.ZodEnum<{
525
+ error: "error";
526
+ completion: "completion";
527
+ fault: "fault";
528
+ request: "request";
529
+ model: "model";
530
+ tool_call: "tool_call";
531
+ tool_result: "tool_result";
532
+ delivery: "delivery";
533
+ mutation: "mutation";
534
+ limit: "limit";
535
+ }>;
536
+ visibility: z.ZodEnum<{
537
+ agent: "agent";
538
+ evaluator: "evaluator";
539
+ }>;
540
+ detail: z.ZodString;
541
+ callId: z.ZodOptional<z.ZodString>;
542
+ tool: z.ZodOptional<z.ZodString>;
543
+ payload: z.ZodOptional<z.ZodJSONSchema>;
544
+ }, z.core.$strict>>;
545
+ metrics: z.ZodObject<{
546
+ toolCalls: z.ZodNumber;
547
+ mutations: z.ZodNumber;
548
+ durationMs: z.ZodNumber;
549
+ }, z.core.$strict>;
550
+ }, z.core.$strict>;
551
+ runs: z.ZodArray<z.ZodObject<{
552
+ schemaVersion: z.ZodLiteral<"1">;
553
+ reportType: z.ZodLiteral<"workflow">;
554
+ id: z.ZodString;
555
+ createdAt: z.ZodISODateTime;
556
+ execution: z.ZodOptional<z.ZodObject<{
557
+ id: z.ZodUUID;
558
+ commitSha: z.ZodOptional<z.ZodString>;
559
+ trialsPerScenario: z.ZodNumber;
560
+ scenarioIds: z.ZodArray<z.ZodString>;
561
+ }, z.core.$strict>>;
562
+ origin: z.ZodOptional<z.ZodObject<{
563
+ kind: z.ZodLiteral<"imported">;
564
+ originalId: z.ZodString;
565
+ }, z.core.$strict>>;
566
+ workflow: z.ZodObject<{
567
+ id: z.ZodString;
568
+ title: z.ZodString;
569
+ task: z.ZodString;
570
+ }, z.core.$strict>;
571
+ suiteFingerprint: z.ZodString;
572
+ agent: z.ZodObject<{
573
+ id: z.ZodString;
574
+ version: z.ZodString;
575
+ }, z.core.$strict>;
576
+ scenario: z.ZodObject<{
577
+ id: z.ZodString;
578
+ title: z.ZodString;
579
+ fault: z.ZodDiscriminatedUnion<[z.ZodObject<{
580
+ type: z.ZodLiteral<"none">;
581
+ }, z.core.$strict>, z.ZodObject<{
582
+ type: z.ZodLiteral<"prompt_injection">;
583
+ tool: z.ZodString;
584
+ occurrence: z.ZodDefault<z.ZodNumber>;
585
+ repeat: z.ZodDefault<z.ZodNumber>;
586
+ replacement: z.ZodJSONSchema;
587
+ }, z.core.$strict>, z.ZodObject<{
588
+ type: z.ZodEnum<{
589
+ timeout_before: "timeout_before";
590
+ timeout_after: "timeout_after";
591
+ unavailable: "unavailable";
592
+ malformed: "malformed";
593
+ permission_revoked: "permission_revoked";
594
+ duplicate_delivery: "duplicate_delivery";
595
+ stale_read: "stale_read";
596
+ }>;
597
+ tool: z.ZodString;
598
+ occurrence: z.ZodDefault<z.ZodNumber>;
599
+ repeat: z.ZodDefault<z.ZodNumber>;
600
+ }, z.core.$strict>], "type">;
601
+ }, z.core.$strict>;
602
+ status: z.ZodEnum<{
603
+ passed: "passed";
604
+ failed: "failed";
605
+ inconclusive: "inconclusive";
606
+ cancelled: "cancelled";
607
+ timed_out: "timed_out";
608
+ }>;
609
+ issue: z.ZodOptional<z.ZodEnum<{
610
+ cancelled: "cancelled";
611
+ timed_out: "timed_out";
612
+ agent_error: "agent_error";
613
+ tool_contract: "tool_contract";
614
+ call_limit: "call_limit";
615
+ repeated_calls: "repeated_calls";
616
+ unawaited_calls: "unawaited_calls";
617
+ evidence_limit: "evidence_limit";
618
+ initialization: "initialization";
619
+ clock_limit: "clock_limit";
620
+ clock_contract: "clock_contract";
621
+ }>>;
622
+ fault: z.ZodObject<{
623
+ triggered: z.ZodBoolean;
624
+ triggerCount: z.ZodNumber;
625
+ }, z.core.$strict>;
626
+ initialState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
627
+ clock: z.ZodOptional<z.ZodObject<{
628
+ mode: z.ZodLiteral<"virtual">;
629
+ startMs: z.ZodDefault<z.ZodNumber>;
630
+ maxTimeMs: z.ZodDefault<z.ZodNumber>;
631
+ endMs: z.ZodNumber;
632
+ }, z.core.$strict>>;
633
+ finalState: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
634
+ definitions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
635
+ id: z.ZodString;
636
+ label: z.ZodString;
637
+ type: z.ZodLiteral<"forbidden_tool">;
638
+ tool: z.ZodString;
639
+ }, z.core.$strict>, z.ZodObject<{
640
+ id: z.ZodString;
641
+ label: z.ZodString;
642
+ type: z.ZodLiteral<"equals">;
643
+ source: z.ZodDefault<z.ZodEnum<{
644
+ state: "state";
645
+ completion: "completion";
646
+ }>>;
647
+ path: z.ZodString;
648
+ expected: z.ZodJSONSchema;
649
+ }, z.core.$strict>, z.ZodObject<{
650
+ id: z.ZodString;
651
+ label: z.ZodString;
652
+ type: z.ZodLiteral<"count">;
653
+ path: z.ZodString;
654
+ expected: z.ZodNumber;
655
+ }, z.core.$strict>, z.ZodObject<{
656
+ id: z.ZodString;
657
+ label: z.ZodString;
658
+ type: z.ZodLiteral<"unchanged">;
659
+ path: z.ZodString;
660
+ }, z.core.$strict>], "type">>;
661
+ assertions: z.ZodArray<z.ZodObject<{
662
+ id: z.ZodString;
663
+ label: z.ZodString;
664
+ passed: z.ZodBoolean;
665
+ detail: z.ZodString;
666
+ before: z.ZodOptional<z.ZodJSONSchema>;
667
+ actual: z.ZodOptional<z.ZodJSONSchema>;
668
+ expected: z.ZodOptional<z.ZodJSONSchema>;
669
+ evidenceIds: z.ZodArray<z.ZodString>;
670
+ }, z.core.$strict>>;
671
+ completion: z.ZodOptional<z.ZodObject<{
672
+ status: z.ZodEnum<{
673
+ completed: "completed";
674
+ blocked: "blocked";
675
+ }>;
676
+ message: z.ZodString;
677
+ output: z.ZodOptional<z.ZodJSONSchema>;
678
+ }, z.core.$strict>>;
679
+ events: z.ZodArray<z.ZodObject<{
680
+ timeMs: z.ZodOptional<z.ZodNumber>;
681
+ id: z.ZodString;
682
+ sequence: z.ZodNumber;
683
+ kind: z.ZodEnum<{
684
+ error: "error";
685
+ completion: "completion";
686
+ fault: "fault";
687
+ request: "request";
688
+ model: "model";
689
+ tool_call: "tool_call";
690
+ tool_result: "tool_result";
691
+ delivery: "delivery";
692
+ mutation: "mutation";
693
+ limit: "limit";
694
+ }>;
695
+ visibility: z.ZodEnum<{
696
+ agent: "agent";
697
+ evaluator: "evaluator";
698
+ }>;
699
+ detail: z.ZodString;
700
+ callId: z.ZodOptional<z.ZodString>;
701
+ tool: z.ZodOptional<z.ZodString>;
702
+ payload: z.ZodOptional<z.ZodJSONSchema>;
703
+ }, z.core.$strict>>;
704
+ metrics: z.ZodObject<{
705
+ toolCalls: z.ZodNumber;
706
+ mutations: z.ZodNumber;
707
+ durationMs: z.ZodNumber;
708
+ }, z.core.$strict>;
709
+ }, z.core.$strict>>;
710
+ planned: z.ZodNumber;
711
+ skippedReason: z.ZodOptional<z.ZodString>;
712
+ }, z.core.$strict>;
713
+ export type WorkflowBatch = z.infer<typeof workflowBatchSchema>;
714
+ export declare function workflowExitCode(batch: WorkflowBatch): 0 | 1 | 3;
715
+ export {};