agentskeptic 0.1.1 → 0.1.2

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 (43) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +342 -342
  3. package/dist/cli.js +157 -157
  4. package/dist/debug-ui/app.css +188 -188
  5. package/dist/debug-ui/app.js +245 -245
  6. package/dist/debug-ui/index.html +79 -79
  7. package/dist/enforceCli.js +11 -11
  8. package/dist/planTransition.test.js +235 -235
  9. package/dist/planTransitionPathHarvest.test.js +116 -116
  10. package/dist/quickVerify/postgresCatalog.js +53 -53
  11. package/package.json +1 -1
  12. package/schemas/agent-run-record-v1.schema.json +51 -51
  13. package/schemas/agent-run-record-v2.schema.json +61 -61
  14. package/schemas/assurance-manifest-v1.schema.json +28 -28
  15. package/schemas/assurance-run-report-v1.schema.json +28 -28
  16. package/schemas/ci-lock-v1.schema.json +163 -163
  17. package/schemas/cli-error-envelope.schema.json +48 -48
  18. package/schemas/event.schema.json +111 -111
  19. package/schemas/execution-trace-view.schema.json +122 -122
  20. package/schemas/plan-validation-core.schema.json +95 -95
  21. package/schemas/quick-verify-report.schema.json +251 -251
  22. package/schemas/registry-validation-result.schema.json +99 -99
  23. package/schemas/run-comparison-report.schema.json +513 -513
  24. package/schemas/tools-registry-export.schema.json +9 -9
  25. package/schemas/tools-registry.schema.json +284 -284
  26. package/schemas/workflow-engine-result.schema.json +591 -591
  27. package/schemas/workflow-result-compare-input.schema.json +15 -15
  28. package/schemas/workflow-result-signature.schema.json +20 -20
  29. package/schemas/workflow-result-v9.schema.json +85 -85
  30. package/schemas/workflow-result.schema.json +80 -80
  31. package/schemas/workflow-truth-report.schema.json +761 -761
  32. package/dist/failureOriginSchemaEnum.test.d.ts +0 -2
  33. package/dist/failureOriginSchemaEnum.test.d.ts.map +0 -1
  34. package/dist/failureOriginSchemaEnum.test.js +0 -21
  35. package/dist/failureOriginSchemaEnum.test.js.map +0 -1
  36. package/dist/failureOriginSchemaParity.test.d.ts +0 -2
  37. package/dist/failureOriginSchemaParity.test.d.ts.map +0 -1
  38. package/dist/failureOriginSchemaParity.test.js +0 -33
  39. package/dist/failureOriginSchemaParity.test.js.map +0 -1
  40. package/dist/slice6.compare.ac.test.d.ts +0 -2
  41. package/dist/slice6.compare.ac.test.d.ts.map +0 -1
  42. package/dist/slice6.compare.ac.test.js +0 -81
  43. package/dist/slice6.compare.ac.test.js.map +0 -1
@@ -1,591 +1,591 @@
1
- {
2
- "$id": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json",
3
- "title": "WorkflowEngineResult",
4
- "type": "object",
5
- "additionalProperties": false,
6
- "required": [
7
- "schemaVersion",
8
- "workflowId",
9
- "status",
10
- "steps",
11
- "runLevelReasons",
12
- "verificationPolicy",
13
- "eventSequenceIntegrity",
14
- "verificationRunContext"
15
- ],
16
- "properties": {
17
- "schemaVersion": { "const": 8 },
18
- "workflowId": { "type": "string" },
19
- "status": {
20
- "type": "string",
21
- "enum": ["complete", "incomplete", "inconsistent"]
22
- },
23
- "runLevelReasons": {
24
- "type": "array",
25
- "items": { "$ref": "#/$defs/reason" }
26
- },
27
- "verificationPolicy": {
28
- "type": "object",
29
- "additionalProperties": false,
30
- "required": ["consistencyMode", "verificationWindowMs", "pollIntervalMs"],
31
- "properties": {
32
- "consistencyMode": { "type": "string", "enum": ["strong", "eventual"] },
33
- "verificationWindowMs": { "type": "integer", "minimum": 0 },
34
- "pollIntervalMs": { "type": "integer", "minimum": 0 }
35
- }
36
- },
37
- "steps": {
38
- "type": "array",
39
- "items": { "$ref": "#/$defs/step" }
40
- },
41
- "eventSequenceIntegrity": {
42
- "oneOf": [
43
- {
44
- "type": "object",
45
- "additionalProperties": false,
46
- "required": ["kind"],
47
- "properties": {
48
- "kind": { "const": "normal" }
49
- }
50
- },
51
- {
52
- "type": "object",
53
- "additionalProperties": false,
54
- "required": ["kind", "reasons"],
55
- "properties": {
56
- "kind": { "const": "irregular" },
57
- "reasons": {
58
- "type": "array",
59
- "minItems": 1,
60
- "items": { "$ref": "#/$defs/reason" }
61
- }
62
- }
63
- }
64
- ]
65
- },
66
- "verificationRunContext": { "$ref": "#/$defs/verificationRunContext" }
67
- },
68
- "$defs": {
69
- "verificationRunContext": {
70
- "type": "object",
71
- "additionalProperties": false,
72
- "required": [
73
- "maxWireSchemaVersion",
74
- "retrievalEvents",
75
- "controlEvents",
76
- "modelTurnEvents",
77
- "toolSkippedEvents",
78
- "toolObservedIngestIndexBySeq",
79
- "firstToolObservedIngestIndex",
80
- "hasRunCompletedControl",
81
- "lastRunEvent"
82
- ],
83
- "properties": {
84
- "maxWireSchemaVersion": { "type": "integer", "enum": [1, 2] },
85
- "retrievalEvents": {
86
- "type": "array",
87
- "items": {
88
- "type": "object",
89
- "additionalProperties": false,
90
- "required": ["ingestIndex", "runEventId", "source", "status"],
91
- "properties": {
92
- "ingestIndex": { "type": "integer", "minimum": 0 },
93
- "runEventId": { "type": ["string", "null"] },
94
- "source": { "type": "string" },
95
- "status": { "type": "string", "enum": ["ok", "empty", "error"] },
96
- "hitCount": { "type": "integer", "minimum": 0 }
97
- }
98
- }
99
- },
100
- "controlEvents": {
101
- "type": "array",
102
- "items": {
103
- "type": "object",
104
- "additionalProperties": false,
105
- "required": ["ingestIndex", "runEventId", "controlKind"],
106
- "properties": {
107
- "ingestIndex": { "type": "integer", "minimum": 0 },
108
- "runEventId": { "type": ["string", "null"] },
109
- "controlKind": {
110
- "type": "string",
111
- "enum": ["branch", "loop", "interrupt", "gate", "run_completed"]
112
- },
113
- "decision": { "type": "string", "enum": ["taken", "skipped"] },
114
- "label": { "type": "string" }
115
- }
116
- }
117
- },
118
- "modelTurnEvents": {
119
- "type": "array",
120
- "items": {
121
- "type": "object",
122
- "additionalProperties": false,
123
- "required": ["ingestIndex", "runEventId", "status"],
124
- "properties": {
125
- "ingestIndex": { "type": "integer", "minimum": 0 },
126
- "runEventId": { "type": ["string", "null"] },
127
- "status": {
128
- "type": "string",
129
- "enum": ["completed", "error", "aborted", "incomplete"]
130
- }
131
- }
132
- }
133
- },
134
- "toolSkippedEvents": {
135
- "type": "array",
136
- "items": {
137
- "type": "object",
138
- "additionalProperties": false,
139
- "required": ["ingestIndex", "toolId", "reason"],
140
- "properties": {
141
- "ingestIndex": { "type": "integer", "minimum": 0 },
142
- "toolId": { "type": "string" },
143
- "reason": { "type": "string" }
144
- }
145
- }
146
- },
147
- "toolObservedIngestIndexBySeq": {
148
- "type": "object",
149
- "additionalProperties": { "type": "integer", "minimum": 0 }
150
- },
151
- "firstToolObservedIngestIndex": {
152
- "oneOf": [{ "type": "null" }, { "type": "integer", "minimum": 0 }]
153
- },
154
- "hasRunCompletedControl": { "type": "boolean" },
155
- "lastRunEvent": {
156
- "oneOf": [
157
- { "type": "null" },
158
- {
159
- "type": "object",
160
- "additionalProperties": false,
161
- "required": ["ingestIndex", "type"],
162
- "properties": {
163
- "ingestIndex": { "type": "integer", "minimum": 0 },
164
- "type": {
165
- "type": "string",
166
- "enum": [
167
- "tool_observed",
168
- "model_turn",
169
- "retrieval",
170
- "control",
171
- "tool_skipped"
172
- ]
173
- },
174
- "modelTurnStatus": {
175
- "type": "string",
176
- "enum": ["completed", "error", "aborted", "incomplete"]
177
- }
178
- }
179
- }
180
- ]
181
- }
182
- }
183
- },
184
- "reason": {
185
- "type": "object",
186
- "additionalProperties": false,
187
- "required": ["code", "message"],
188
- "properties": {
189
- "code": { "type": "string" },
190
- "message": { "type": "string" },
191
- "field": { "type": "string" }
192
- }
193
- },
194
- "requiredFieldsMap": {
195
- "type": "object",
196
- "additionalProperties": {
197
- "type": ["string", "number", "boolean", "null"]
198
- }
199
- },
200
- "identityEqPair": {
201
- "type": "object",
202
- "additionalProperties": false,
203
- "required": ["column", "value"],
204
- "properties": {
205
- "column": { "type": "string", "minLength": 1 },
206
- "value": { "type": "string" }
207
- }
208
- },
209
- "verificationRequestSqlRow": {
210
- "type": "object",
211
- "additionalProperties": false,
212
- "required": ["kind", "table", "identityEq", "requiredFields"],
213
- "properties": {
214
- "kind": { "const": "sql_row" },
215
- "table": { "type": "string" },
216
- "identityEq": {
217
- "type": "array",
218
- "minItems": 1,
219
- "items": { "$ref": "#/$defs/identityEqPair" }
220
- },
221
- "requiredFields": { "$ref": "#/$defs/requiredFieldsMap" }
222
- }
223
- },
224
- "verificationRequestSqlRowAbsent": {
225
- "type": "object",
226
- "additionalProperties": false,
227
- "required": ["kind", "table", "identityEq", "filterEq"],
228
- "properties": {
229
- "kind": { "const": "sql_row_absent" },
230
- "table": { "type": "string" },
231
- "identityEq": {
232
- "type": "array",
233
- "minItems": 1,
234
- "items": { "$ref": "#/$defs/identityEqPair" }
235
- },
236
- "filterEq": {
237
- "type": "array",
238
- "items": { "$ref": "#/$defs/identityEqPair" }
239
- }
240
- }
241
- },
242
- "verificationRequestSqlEffects": {
243
- "type": "object",
244
- "additionalProperties": false,
245
- "required": ["kind", "effects"],
246
- "properties": {
247
- "kind": { "const": "sql_effects" },
248
- "effects": {
249
- "type": "array",
250
- "minItems": 2,
251
- "items": {
252
- "type": "object",
253
- "additionalProperties": false,
254
- "required": ["id", "kind", "table", "identityEq", "requiredFields"],
255
- "properties": {
256
- "id": { "type": "string", "minLength": 1 },
257
- "kind": { "const": "sql_row" },
258
- "table": { "type": "string" },
259
- "identityEq": {
260
- "type": "array",
261
- "minItems": 1,
262
- "items": { "$ref": "#/$defs/identityEqPair" }
263
- },
264
- "requiredFields": { "$ref": "#/$defs/requiredFieldsMap" }
265
- }
266
- }
267
- }
268
- }
269
- },
270
- "resolvedRelationalWhereEqSide": {
271
- "type": "object",
272
- "additionalProperties": false,
273
- "required": ["side", "column", "value"],
274
- "properties": {
275
- "side": { "type": "string", "enum": ["left", "right"] },
276
- "column": { "type": "string", "minLength": 1 },
277
- "value": { "type": "string" }
278
- }
279
- },
280
- "resolvedRelationalWhereEqPlain": {
281
- "type": "object",
282
- "additionalProperties": false,
283
- "required": ["column", "value"],
284
- "properties": {
285
- "column": { "type": "string", "minLength": 1 },
286
- "value": { "type": "string" }
287
- }
288
- },
289
- "resolvedRelationalCheck": {
290
- "oneOf": [
291
- {
292
- "type": "object",
293
- "additionalProperties": false,
294
- "required": ["checkKind", "id", "childTable", "matchEq"],
295
- "properties": {
296
- "checkKind": { "const": "related_exists" },
297
- "id": { "type": "string", "minLength": 1 },
298
- "childTable": { "type": "string", "minLength": 1 },
299
- "matchEq": {
300
- "type": "array",
301
- "minItems": 1,
302
- "items": { "$ref": "#/$defs/identityEqPair" }
303
- }
304
- }
305
- },
306
- {
307
- "type": "object",
308
- "additionalProperties": false,
309
- "required": ["checkKind", "id", "table", "fn", "whereEq", "expectOp", "expectValue"],
310
- "properties": {
311
- "checkKind": { "const": "aggregate" },
312
- "id": { "type": "string", "minLength": 1 },
313
- "table": { "type": "string", "minLength": 1 },
314
- "fn": { "const": "COUNT_STAR" },
315
- "whereEq": {
316
- "type": "array",
317
- "items": { "$ref": "#/$defs/resolvedRelationalWhereEqPlain" }
318
- },
319
- "expectOp": { "type": "string", "enum": ["eq", "gte", "lte"] },
320
- "expectValue": { "type": "number" }
321
- }
322
- },
323
- {
324
- "type": "object",
325
- "additionalProperties": false,
326
- "required": ["checkKind", "id", "table", "fn", "sumColumn", "whereEq", "expectOp", "expectValue"],
327
- "properties": {
328
- "checkKind": { "const": "aggregate" },
329
- "id": { "type": "string", "minLength": 1 },
330
- "table": { "type": "string", "minLength": 1 },
331
- "fn": { "const": "SUM" },
332
- "sumColumn": { "type": "string", "minLength": 1 },
333
- "whereEq": {
334
- "type": "array",
335
- "items": { "$ref": "#/$defs/resolvedRelationalWhereEqPlain" }
336
- },
337
- "expectOp": { "type": "string", "enum": ["eq", "gte", "lte"] },
338
- "expectValue": { "type": "number" }
339
- }
340
- },
341
- {
342
- "type": "object",
343
- "additionalProperties": false,
344
- "required": [
345
- "checkKind",
346
- "id",
347
- "leftTable",
348
- "rightTable",
349
- "leftJoinColumn",
350
- "rightJoinColumn",
351
- "whereEq",
352
- "expectOp",
353
- "expectValue"
354
- ],
355
- "properties": {
356
- "checkKind": { "const": "join_count" },
357
- "id": { "type": "string", "minLength": 1 },
358
- "leftTable": { "type": "string", "minLength": 1 },
359
- "rightTable": { "type": "string", "minLength": 1 },
360
- "leftJoinColumn": { "type": "string", "minLength": 1 },
361
- "rightJoinColumn": { "type": "string", "minLength": 1 },
362
- "whereEq": {
363
- "type": "array",
364
- "items": { "$ref": "#/$defs/resolvedRelationalWhereEqSide" }
365
- },
366
- "expectOp": { "type": "string", "enum": ["eq", "gte", "lte"] },
367
- "expectValue": { "type": "number" }
368
- }
369
- },
370
- {
371
- "type": "object",
372
- "additionalProperties": false,
373
- "required": [
374
- "checkKind",
375
- "id",
376
- "anchorTable",
377
- "lookupTable",
378
- "anchorColumn",
379
- "lookupColumn",
380
- "lookupPresenceColumn",
381
- "filterEqAnchor",
382
- "filterEqLookup"
383
- ],
384
- "properties": {
385
- "checkKind": { "const": "anti_join" },
386
- "id": { "type": "string", "minLength": 1 },
387
- "anchorTable": { "type": "string", "minLength": 1 },
388
- "lookupTable": { "type": "string", "minLength": 1 },
389
- "anchorColumn": { "type": "string", "minLength": 1 },
390
- "lookupColumn": { "type": "string", "minLength": 1 },
391
- "lookupPresenceColumn": { "type": "string", "minLength": 1 },
392
- "filterEqAnchor": {
393
- "type": "array",
394
- "items": { "$ref": "#/$defs/identityEqPair" }
395
- },
396
- "filterEqLookup": {
397
- "type": "array",
398
- "items": { "$ref": "#/$defs/identityEqPair" }
399
- }
400
- }
401
- }
402
- ]
403
- },
404
- "verificationRequestSqlRelational": {
405
- "type": "object",
406
- "additionalProperties": false,
407
- "required": ["kind", "checks"],
408
- "properties": {
409
- "kind": { "const": "sql_relational" },
410
- "checks": {
411
- "type": "array",
412
- "minItems": 1,
413
- "items": { "$ref": "#/$defs/resolvedRelationalCheck" }
414
- }
415
- }
416
- },
417
- "effectOutcome": {
418
- "type": "object",
419
- "additionalProperties": false,
420
- "required": ["id", "status", "reasons", "evidenceSummary"],
421
- "properties": {
422
- "id": { "type": "string", "minLength": 1 },
423
- "status": {
424
- "type": "string",
425
- "enum": ["verified", "missing", "inconsistent", "incomplete_verification"]
426
- },
427
- "reasons": {
428
- "type": "array",
429
- "items": { "$ref": "#/$defs/reason" }
430
- },
431
- "evidenceSummary": {
432
- "type": "object",
433
- "additionalProperties": true
434
- }
435
- }
436
- },
437
- "intendedEffect": {
438
- "type": "object",
439
- "additionalProperties": false,
440
- "required": ["narrative"],
441
- "properties": {
442
- "narrative": { "type": "string" }
443
- }
444
- },
445
- "observedExecution": {
446
- "type": "object",
447
- "additionalProperties": false,
448
- "required": ["paramsCanonical"],
449
- "properties": {
450
- "paramsCanonical": { "type": "string" }
451
- }
452
- },
453
- "step": {
454
- "allOf": [
455
- {
456
- "type": "object",
457
- "additionalProperties": false,
458
- "required": [
459
- "seq",
460
- "toolId",
461
- "intendedEffect",
462
- "observedExecution",
463
- "verificationRequest",
464
- "status",
465
- "reasons",
466
- "evidenceSummary",
467
- "repeatObservationCount",
468
- "evaluatedObservationOrdinal"
469
- ],
470
- "properties": {
471
- "seq": { "type": "integer", "minimum": 0 },
472
- "toolId": { "type": "string" },
473
- "intendedEffect": { "$ref": "#/$defs/intendedEffect" },
474
- "observedExecution": { "$ref": "#/$defs/observedExecution" },
475
- "verificationRequest": {
476
- "oneOf": [
477
- { "type": "null" },
478
- { "$ref": "#/$defs/verificationRequestSqlRow" },
479
- { "$ref": "#/$defs/verificationRequestSqlRowAbsent" },
480
- { "$ref": "#/$defs/verificationRequestSqlEffects" },
481
- { "$ref": "#/$defs/verificationRequestSqlRelational" }
482
- ]
483
- },
484
- "status": {
485
- "type": "string",
486
- "enum": [
487
- "verified",
488
- "missing",
489
- "inconsistent",
490
- "incomplete_verification",
491
- "partially_verified",
492
- "uncertain"
493
- ]
494
- },
495
- "reasons": {
496
- "type": "array",
497
- "items": { "$ref": "#/$defs/reason" }
498
- },
499
- "evidenceSummary": {
500
- "type": "object",
501
- "additionalProperties": true
502
- },
503
- "repeatObservationCount": { "type": "integer", "minimum": 1 },
504
- "evaluatedObservationOrdinal": { "type": "integer", "minimum": 1 },
505
- "failureDiagnostic": {
506
- "type": "string",
507
- "enum": [
508
- "workflow_execution",
509
- "verification_setup",
510
- "observation_uncertainty"
511
- ]
512
- }
513
- }
514
- },
515
- {
516
- "if": {
517
- "type": "object",
518
- "required": ["status"],
519
- "properties": { "status": { "const": "verified" } }
520
- },
521
- "then": {
522
- "type": "object",
523
- "properties": { "failureDiagnostic": false }
524
- },
525
- "else": {
526
- "type": "object",
527
- "required": ["failureDiagnostic"]
528
- }
529
- },
530
- {
531
- "if": {
532
- "type": "object",
533
- "required": ["verificationRequest"],
534
- "properties": {
535
- "verificationRequest": {
536
- "oneOf": [
537
- {
538
- "type": "object",
539
- "required": ["kind"],
540
- "properties": { "kind": { "const": "sql_effects" } }
541
- },
542
- {
543
- "type": "object",
544
- "required": ["kind", "checks"],
545
- "properties": {
546
- "kind": { "const": "sql_relational" },
547
- "checks": { "type": "array", "minItems": 2 }
548
- }
549
- }
550
- ]
551
- }
552
- }
553
- },
554
- "then": {
555
- "type": "object",
556
- "properties": {
557
- "evidenceSummary": {
558
- "type": "object",
559
- "additionalProperties": false,
560
- "required": ["effectCount", "effects"],
561
- "properties": {
562
- "effectCount": { "type": "integer", "minimum": 2 },
563
- "effects": {
564
- "type": "array",
565
- "minItems": 2,
566
- "items": { "$ref": "#/$defs/effectOutcome" }
567
- },
568
- "attempts": { "type": "integer", "minimum": 1 },
569
- "elapsedMs": { "type": "integer", "minimum": 0 },
570
- "verificationWindowMs": { "type": "integer", "minimum": 1 },
571
- "pollIntervalMs": { "type": "integer", "minimum": 1 }
572
- }
573
- }
574
- }
575
- },
576
- "else": {
577
- "type": "object",
578
- "properties": {
579
- "evidenceSummary": {
580
- "type": "object",
581
- "propertyNames": {
582
- "not": { "enum": ["effectCount", "effects"] }
583
- }
584
- }
585
- }
586
- }
587
- }
588
- ]
589
- }
590
- }
591
- }
1
+ {
2
+ "$id": "https://agentskeptic.com/schemas/workflow-engine-result.schema.json",
3
+ "title": "WorkflowEngineResult",
4
+ "type": "object",
5
+ "additionalProperties": false,
6
+ "required": [
7
+ "schemaVersion",
8
+ "workflowId",
9
+ "status",
10
+ "steps",
11
+ "runLevelReasons",
12
+ "verificationPolicy",
13
+ "eventSequenceIntegrity",
14
+ "verificationRunContext"
15
+ ],
16
+ "properties": {
17
+ "schemaVersion": { "const": 8 },
18
+ "workflowId": { "type": "string" },
19
+ "status": {
20
+ "type": "string",
21
+ "enum": ["complete", "incomplete", "inconsistent"]
22
+ },
23
+ "runLevelReasons": {
24
+ "type": "array",
25
+ "items": { "$ref": "#/$defs/reason" }
26
+ },
27
+ "verificationPolicy": {
28
+ "type": "object",
29
+ "additionalProperties": false,
30
+ "required": ["consistencyMode", "verificationWindowMs", "pollIntervalMs"],
31
+ "properties": {
32
+ "consistencyMode": { "type": "string", "enum": ["strong", "eventual"] },
33
+ "verificationWindowMs": { "type": "integer", "minimum": 0 },
34
+ "pollIntervalMs": { "type": "integer", "minimum": 0 }
35
+ }
36
+ },
37
+ "steps": {
38
+ "type": "array",
39
+ "items": { "$ref": "#/$defs/step" }
40
+ },
41
+ "eventSequenceIntegrity": {
42
+ "oneOf": [
43
+ {
44
+ "type": "object",
45
+ "additionalProperties": false,
46
+ "required": ["kind"],
47
+ "properties": {
48
+ "kind": { "const": "normal" }
49
+ }
50
+ },
51
+ {
52
+ "type": "object",
53
+ "additionalProperties": false,
54
+ "required": ["kind", "reasons"],
55
+ "properties": {
56
+ "kind": { "const": "irregular" },
57
+ "reasons": {
58
+ "type": "array",
59
+ "minItems": 1,
60
+ "items": { "$ref": "#/$defs/reason" }
61
+ }
62
+ }
63
+ }
64
+ ]
65
+ },
66
+ "verificationRunContext": { "$ref": "#/$defs/verificationRunContext" }
67
+ },
68
+ "$defs": {
69
+ "verificationRunContext": {
70
+ "type": "object",
71
+ "additionalProperties": false,
72
+ "required": [
73
+ "maxWireSchemaVersion",
74
+ "retrievalEvents",
75
+ "controlEvents",
76
+ "modelTurnEvents",
77
+ "toolSkippedEvents",
78
+ "toolObservedIngestIndexBySeq",
79
+ "firstToolObservedIngestIndex",
80
+ "hasRunCompletedControl",
81
+ "lastRunEvent"
82
+ ],
83
+ "properties": {
84
+ "maxWireSchemaVersion": { "type": "integer", "enum": [1, 2] },
85
+ "retrievalEvents": {
86
+ "type": "array",
87
+ "items": {
88
+ "type": "object",
89
+ "additionalProperties": false,
90
+ "required": ["ingestIndex", "runEventId", "source", "status"],
91
+ "properties": {
92
+ "ingestIndex": { "type": "integer", "minimum": 0 },
93
+ "runEventId": { "type": ["string", "null"] },
94
+ "source": { "type": "string" },
95
+ "status": { "type": "string", "enum": ["ok", "empty", "error"] },
96
+ "hitCount": { "type": "integer", "minimum": 0 }
97
+ }
98
+ }
99
+ },
100
+ "controlEvents": {
101
+ "type": "array",
102
+ "items": {
103
+ "type": "object",
104
+ "additionalProperties": false,
105
+ "required": ["ingestIndex", "runEventId", "controlKind"],
106
+ "properties": {
107
+ "ingestIndex": { "type": "integer", "minimum": 0 },
108
+ "runEventId": { "type": ["string", "null"] },
109
+ "controlKind": {
110
+ "type": "string",
111
+ "enum": ["branch", "loop", "interrupt", "gate", "run_completed"]
112
+ },
113
+ "decision": { "type": "string", "enum": ["taken", "skipped"] },
114
+ "label": { "type": "string" }
115
+ }
116
+ }
117
+ },
118
+ "modelTurnEvents": {
119
+ "type": "array",
120
+ "items": {
121
+ "type": "object",
122
+ "additionalProperties": false,
123
+ "required": ["ingestIndex", "runEventId", "status"],
124
+ "properties": {
125
+ "ingestIndex": { "type": "integer", "minimum": 0 },
126
+ "runEventId": { "type": ["string", "null"] },
127
+ "status": {
128
+ "type": "string",
129
+ "enum": ["completed", "error", "aborted", "incomplete"]
130
+ }
131
+ }
132
+ }
133
+ },
134
+ "toolSkippedEvents": {
135
+ "type": "array",
136
+ "items": {
137
+ "type": "object",
138
+ "additionalProperties": false,
139
+ "required": ["ingestIndex", "toolId", "reason"],
140
+ "properties": {
141
+ "ingestIndex": { "type": "integer", "minimum": 0 },
142
+ "toolId": { "type": "string" },
143
+ "reason": { "type": "string" }
144
+ }
145
+ }
146
+ },
147
+ "toolObservedIngestIndexBySeq": {
148
+ "type": "object",
149
+ "additionalProperties": { "type": "integer", "minimum": 0 }
150
+ },
151
+ "firstToolObservedIngestIndex": {
152
+ "oneOf": [{ "type": "null" }, { "type": "integer", "minimum": 0 }]
153
+ },
154
+ "hasRunCompletedControl": { "type": "boolean" },
155
+ "lastRunEvent": {
156
+ "oneOf": [
157
+ { "type": "null" },
158
+ {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": ["ingestIndex", "type"],
162
+ "properties": {
163
+ "ingestIndex": { "type": "integer", "minimum": 0 },
164
+ "type": {
165
+ "type": "string",
166
+ "enum": [
167
+ "tool_observed",
168
+ "model_turn",
169
+ "retrieval",
170
+ "control",
171
+ "tool_skipped"
172
+ ]
173
+ },
174
+ "modelTurnStatus": {
175
+ "type": "string",
176
+ "enum": ["completed", "error", "aborted", "incomplete"]
177
+ }
178
+ }
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ },
184
+ "reason": {
185
+ "type": "object",
186
+ "additionalProperties": false,
187
+ "required": ["code", "message"],
188
+ "properties": {
189
+ "code": { "type": "string" },
190
+ "message": { "type": "string" },
191
+ "field": { "type": "string" }
192
+ }
193
+ },
194
+ "requiredFieldsMap": {
195
+ "type": "object",
196
+ "additionalProperties": {
197
+ "type": ["string", "number", "boolean", "null"]
198
+ }
199
+ },
200
+ "identityEqPair": {
201
+ "type": "object",
202
+ "additionalProperties": false,
203
+ "required": ["column", "value"],
204
+ "properties": {
205
+ "column": { "type": "string", "minLength": 1 },
206
+ "value": { "type": "string" }
207
+ }
208
+ },
209
+ "verificationRequestSqlRow": {
210
+ "type": "object",
211
+ "additionalProperties": false,
212
+ "required": ["kind", "table", "identityEq", "requiredFields"],
213
+ "properties": {
214
+ "kind": { "const": "sql_row" },
215
+ "table": { "type": "string" },
216
+ "identityEq": {
217
+ "type": "array",
218
+ "minItems": 1,
219
+ "items": { "$ref": "#/$defs/identityEqPair" }
220
+ },
221
+ "requiredFields": { "$ref": "#/$defs/requiredFieldsMap" }
222
+ }
223
+ },
224
+ "verificationRequestSqlRowAbsent": {
225
+ "type": "object",
226
+ "additionalProperties": false,
227
+ "required": ["kind", "table", "identityEq", "filterEq"],
228
+ "properties": {
229
+ "kind": { "const": "sql_row_absent" },
230
+ "table": { "type": "string" },
231
+ "identityEq": {
232
+ "type": "array",
233
+ "minItems": 1,
234
+ "items": { "$ref": "#/$defs/identityEqPair" }
235
+ },
236
+ "filterEq": {
237
+ "type": "array",
238
+ "items": { "$ref": "#/$defs/identityEqPair" }
239
+ }
240
+ }
241
+ },
242
+ "verificationRequestSqlEffects": {
243
+ "type": "object",
244
+ "additionalProperties": false,
245
+ "required": ["kind", "effects"],
246
+ "properties": {
247
+ "kind": { "const": "sql_effects" },
248
+ "effects": {
249
+ "type": "array",
250
+ "minItems": 2,
251
+ "items": {
252
+ "type": "object",
253
+ "additionalProperties": false,
254
+ "required": ["id", "kind", "table", "identityEq", "requiredFields"],
255
+ "properties": {
256
+ "id": { "type": "string", "minLength": 1 },
257
+ "kind": { "const": "sql_row" },
258
+ "table": { "type": "string" },
259
+ "identityEq": {
260
+ "type": "array",
261
+ "minItems": 1,
262
+ "items": { "$ref": "#/$defs/identityEqPair" }
263
+ },
264
+ "requiredFields": { "$ref": "#/$defs/requiredFieldsMap" }
265
+ }
266
+ }
267
+ }
268
+ }
269
+ },
270
+ "resolvedRelationalWhereEqSide": {
271
+ "type": "object",
272
+ "additionalProperties": false,
273
+ "required": ["side", "column", "value"],
274
+ "properties": {
275
+ "side": { "type": "string", "enum": ["left", "right"] },
276
+ "column": { "type": "string", "minLength": 1 },
277
+ "value": { "type": "string" }
278
+ }
279
+ },
280
+ "resolvedRelationalWhereEqPlain": {
281
+ "type": "object",
282
+ "additionalProperties": false,
283
+ "required": ["column", "value"],
284
+ "properties": {
285
+ "column": { "type": "string", "minLength": 1 },
286
+ "value": { "type": "string" }
287
+ }
288
+ },
289
+ "resolvedRelationalCheck": {
290
+ "oneOf": [
291
+ {
292
+ "type": "object",
293
+ "additionalProperties": false,
294
+ "required": ["checkKind", "id", "childTable", "matchEq"],
295
+ "properties": {
296
+ "checkKind": { "const": "related_exists" },
297
+ "id": { "type": "string", "minLength": 1 },
298
+ "childTable": { "type": "string", "minLength": 1 },
299
+ "matchEq": {
300
+ "type": "array",
301
+ "minItems": 1,
302
+ "items": { "$ref": "#/$defs/identityEqPair" }
303
+ }
304
+ }
305
+ },
306
+ {
307
+ "type": "object",
308
+ "additionalProperties": false,
309
+ "required": ["checkKind", "id", "table", "fn", "whereEq", "expectOp", "expectValue"],
310
+ "properties": {
311
+ "checkKind": { "const": "aggregate" },
312
+ "id": { "type": "string", "minLength": 1 },
313
+ "table": { "type": "string", "minLength": 1 },
314
+ "fn": { "const": "COUNT_STAR" },
315
+ "whereEq": {
316
+ "type": "array",
317
+ "items": { "$ref": "#/$defs/resolvedRelationalWhereEqPlain" }
318
+ },
319
+ "expectOp": { "type": "string", "enum": ["eq", "gte", "lte"] },
320
+ "expectValue": { "type": "number" }
321
+ }
322
+ },
323
+ {
324
+ "type": "object",
325
+ "additionalProperties": false,
326
+ "required": ["checkKind", "id", "table", "fn", "sumColumn", "whereEq", "expectOp", "expectValue"],
327
+ "properties": {
328
+ "checkKind": { "const": "aggregate" },
329
+ "id": { "type": "string", "minLength": 1 },
330
+ "table": { "type": "string", "minLength": 1 },
331
+ "fn": { "const": "SUM" },
332
+ "sumColumn": { "type": "string", "minLength": 1 },
333
+ "whereEq": {
334
+ "type": "array",
335
+ "items": { "$ref": "#/$defs/resolvedRelationalWhereEqPlain" }
336
+ },
337
+ "expectOp": { "type": "string", "enum": ["eq", "gte", "lte"] },
338
+ "expectValue": { "type": "number" }
339
+ }
340
+ },
341
+ {
342
+ "type": "object",
343
+ "additionalProperties": false,
344
+ "required": [
345
+ "checkKind",
346
+ "id",
347
+ "leftTable",
348
+ "rightTable",
349
+ "leftJoinColumn",
350
+ "rightJoinColumn",
351
+ "whereEq",
352
+ "expectOp",
353
+ "expectValue"
354
+ ],
355
+ "properties": {
356
+ "checkKind": { "const": "join_count" },
357
+ "id": { "type": "string", "minLength": 1 },
358
+ "leftTable": { "type": "string", "minLength": 1 },
359
+ "rightTable": { "type": "string", "minLength": 1 },
360
+ "leftJoinColumn": { "type": "string", "minLength": 1 },
361
+ "rightJoinColumn": { "type": "string", "minLength": 1 },
362
+ "whereEq": {
363
+ "type": "array",
364
+ "items": { "$ref": "#/$defs/resolvedRelationalWhereEqSide" }
365
+ },
366
+ "expectOp": { "type": "string", "enum": ["eq", "gte", "lte"] },
367
+ "expectValue": { "type": "number" }
368
+ }
369
+ },
370
+ {
371
+ "type": "object",
372
+ "additionalProperties": false,
373
+ "required": [
374
+ "checkKind",
375
+ "id",
376
+ "anchorTable",
377
+ "lookupTable",
378
+ "anchorColumn",
379
+ "lookupColumn",
380
+ "lookupPresenceColumn",
381
+ "filterEqAnchor",
382
+ "filterEqLookup"
383
+ ],
384
+ "properties": {
385
+ "checkKind": { "const": "anti_join" },
386
+ "id": { "type": "string", "minLength": 1 },
387
+ "anchorTable": { "type": "string", "minLength": 1 },
388
+ "lookupTable": { "type": "string", "minLength": 1 },
389
+ "anchorColumn": { "type": "string", "minLength": 1 },
390
+ "lookupColumn": { "type": "string", "minLength": 1 },
391
+ "lookupPresenceColumn": { "type": "string", "minLength": 1 },
392
+ "filterEqAnchor": {
393
+ "type": "array",
394
+ "items": { "$ref": "#/$defs/identityEqPair" }
395
+ },
396
+ "filterEqLookup": {
397
+ "type": "array",
398
+ "items": { "$ref": "#/$defs/identityEqPair" }
399
+ }
400
+ }
401
+ }
402
+ ]
403
+ },
404
+ "verificationRequestSqlRelational": {
405
+ "type": "object",
406
+ "additionalProperties": false,
407
+ "required": ["kind", "checks"],
408
+ "properties": {
409
+ "kind": { "const": "sql_relational" },
410
+ "checks": {
411
+ "type": "array",
412
+ "minItems": 1,
413
+ "items": { "$ref": "#/$defs/resolvedRelationalCheck" }
414
+ }
415
+ }
416
+ },
417
+ "effectOutcome": {
418
+ "type": "object",
419
+ "additionalProperties": false,
420
+ "required": ["id", "status", "reasons", "evidenceSummary"],
421
+ "properties": {
422
+ "id": { "type": "string", "minLength": 1 },
423
+ "status": {
424
+ "type": "string",
425
+ "enum": ["verified", "missing", "inconsistent", "incomplete_verification"]
426
+ },
427
+ "reasons": {
428
+ "type": "array",
429
+ "items": { "$ref": "#/$defs/reason" }
430
+ },
431
+ "evidenceSummary": {
432
+ "type": "object",
433
+ "additionalProperties": true
434
+ }
435
+ }
436
+ },
437
+ "intendedEffect": {
438
+ "type": "object",
439
+ "additionalProperties": false,
440
+ "required": ["narrative"],
441
+ "properties": {
442
+ "narrative": { "type": "string" }
443
+ }
444
+ },
445
+ "observedExecution": {
446
+ "type": "object",
447
+ "additionalProperties": false,
448
+ "required": ["paramsCanonical"],
449
+ "properties": {
450
+ "paramsCanonical": { "type": "string" }
451
+ }
452
+ },
453
+ "step": {
454
+ "allOf": [
455
+ {
456
+ "type": "object",
457
+ "additionalProperties": false,
458
+ "required": [
459
+ "seq",
460
+ "toolId",
461
+ "intendedEffect",
462
+ "observedExecution",
463
+ "verificationRequest",
464
+ "status",
465
+ "reasons",
466
+ "evidenceSummary",
467
+ "repeatObservationCount",
468
+ "evaluatedObservationOrdinal"
469
+ ],
470
+ "properties": {
471
+ "seq": { "type": "integer", "minimum": 0 },
472
+ "toolId": { "type": "string" },
473
+ "intendedEffect": { "$ref": "#/$defs/intendedEffect" },
474
+ "observedExecution": { "$ref": "#/$defs/observedExecution" },
475
+ "verificationRequest": {
476
+ "oneOf": [
477
+ { "type": "null" },
478
+ { "$ref": "#/$defs/verificationRequestSqlRow" },
479
+ { "$ref": "#/$defs/verificationRequestSqlRowAbsent" },
480
+ { "$ref": "#/$defs/verificationRequestSqlEffects" },
481
+ { "$ref": "#/$defs/verificationRequestSqlRelational" }
482
+ ]
483
+ },
484
+ "status": {
485
+ "type": "string",
486
+ "enum": [
487
+ "verified",
488
+ "missing",
489
+ "inconsistent",
490
+ "incomplete_verification",
491
+ "partially_verified",
492
+ "uncertain"
493
+ ]
494
+ },
495
+ "reasons": {
496
+ "type": "array",
497
+ "items": { "$ref": "#/$defs/reason" }
498
+ },
499
+ "evidenceSummary": {
500
+ "type": "object",
501
+ "additionalProperties": true
502
+ },
503
+ "repeatObservationCount": { "type": "integer", "minimum": 1 },
504
+ "evaluatedObservationOrdinal": { "type": "integer", "minimum": 1 },
505
+ "failureDiagnostic": {
506
+ "type": "string",
507
+ "enum": [
508
+ "workflow_execution",
509
+ "verification_setup",
510
+ "observation_uncertainty"
511
+ ]
512
+ }
513
+ }
514
+ },
515
+ {
516
+ "if": {
517
+ "type": "object",
518
+ "required": ["status"],
519
+ "properties": { "status": { "const": "verified" } }
520
+ },
521
+ "then": {
522
+ "type": "object",
523
+ "properties": { "failureDiagnostic": false }
524
+ },
525
+ "else": {
526
+ "type": "object",
527
+ "required": ["failureDiagnostic"]
528
+ }
529
+ },
530
+ {
531
+ "if": {
532
+ "type": "object",
533
+ "required": ["verificationRequest"],
534
+ "properties": {
535
+ "verificationRequest": {
536
+ "oneOf": [
537
+ {
538
+ "type": "object",
539
+ "required": ["kind"],
540
+ "properties": { "kind": { "const": "sql_effects" } }
541
+ },
542
+ {
543
+ "type": "object",
544
+ "required": ["kind", "checks"],
545
+ "properties": {
546
+ "kind": { "const": "sql_relational" },
547
+ "checks": { "type": "array", "minItems": 2 }
548
+ }
549
+ }
550
+ ]
551
+ }
552
+ }
553
+ },
554
+ "then": {
555
+ "type": "object",
556
+ "properties": {
557
+ "evidenceSummary": {
558
+ "type": "object",
559
+ "additionalProperties": false,
560
+ "required": ["effectCount", "effects"],
561
+ "properties": {
562
+ "effectCount": { "type": "integer", "minimum": 2 },
563
+ "effects": {
564
+ "type": "array",
565
+ "minItems": 2,
566
+ "items": { "$ref": "#/$defs/effectOutcome" }
567
+ },
568
+ "attempts": { "type": "integer", "minimum": 1 },
569
+ "elapsedMs": { "type": "integer", "minimum": 0 },
570
+ "verificationWindowMs": { "type": "integer", "minimum": 1 },
571
+ "pollIntervalMs": { "type": "integer", "minimum": 1 }
572
+ }
573
+ }
574
+ }
575
+ },
576
+ "else": {
577
+ "type": "object",
578
+ "properties": {
579
+ "evidenceSummary": {
580
+ "type": "object",
581
+ "propertyNames": {
582
+ "not": { "enum": ["effectCount", "effects"] }
583
+ }
584
+ }
585
+ }
586
+ }
587
+ }
588
+ ]
589
+ }
590
+ }
591
+ }