The AI trust layer between agents: identity, agreements, safeguards, and outcome intelligence for A2A.

Viewing files at commit 92498f6892e8Commit detailsView latest

schemas/v0.1/assurance_decision.schema.json 564 lines · 16.2 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "protocolVersion": {
6
      "type": "string",
7
      "const": "0.1"
8
    },
9
    "assessmentId": {
10
      "type": "string",
11
      "format": "uuid",
12
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
13
    },
14
    "interactionId": {
15
      "type": "string",
16
      "format": "uuid",
17
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
18
    },
19
    "contractHash": {
20
      "type": "string",
21
      "minLength": 1
22
    },
23
    "phase": {
24
      "type": "string",
25
      "enum": [
26
        "pre_task",
27
        "post_task"
28
      ]
29
    },
30
    "round": {
31
      "type": "integer",
32
      "minimum": 1,
33
      "maximum": 3
34
    },
35
    "generatedForAgentId": {
36
      "type": "string",
37
      "minLength": 1
38
    },
39
    "targetAgentId": {
40
      "type": "string",
41
      "minLength": 1
42
    },
43
    "targetAgentVersion": {
44
      "type": "string",
45
      "minLength": 1,
46
      "maxLength": 200
47
    },
48
    "prediction": {
49
      "type": "object",
50
      "properties": {
51
        "protocolVersion": {
52
          "type": "string",
53
          "const": "0.1"
54
        },
55
        "predictionId": {
56
          "type": "string",
57
          "format": "uuid",
58
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
59
        },
60
        "interactionId": {
61
          "type": "string",
62
          "format": "uuid",
63
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
64
        },
65
        "contractHash": {
66
          "type": "string",
67
          "minLength": 1
68
        },
69
        "targetAgentId": {
70
          "type": "string",
71
          "minLength": 1
72
        },
73
        "targetAgentVersion": {
74
          "type": "string",
75
          "minLength": 1,
76
          "maxLength": 200
77
        },
78
        "taskCategory": {
79
          "type": "string",
80
          "minLength": 1,
81
          "maxLength": 100
82
        },
83
        "stage": {
84
          "type": "string",
85
          "enum": [
86
            "baseline",
87
            "after_probe",
88
            "after_safeguard",
89
            "final"
90
          ]
91
        },
92
        "successProbability": {
93
          "type": "number",
94
          "minimum": 0.05,
95
          "maximum": 0.95
96
        },
97
        "confidence": {
98
          "type": "number",
99
          "minimum": 0,
100
          "maximum": 1
101
        },
102
        "basis": {
103
          "type": "string",
104
          "enum": [
105
            "cold_start_hybrid",
106
            "historical_hybrid",
107
            "deterministic_fallback"
108
          ]
109
        },
110
        "sampleSize": {
111
          "type": "integer",
112
          "minimum": 0,
113
          "maximum": 9007199254740991
114
        },
115
        "topRiskCodes": {
116
          "maxItems": 5,
117
          "type": "array",
118
          "items": {
119
            "type": "string",
120
            "pattern": "^[a-z][a-z0-9_]{1,63}$"
121
          }
122
        },
123
        "featureVersion": {
124
          "type": "string",
125
          "minLength": 1,
126
          "maxLength": 100
127
        },
128
        "generationId": {
129
          "type": "string",
130
          "format": "uuid",
131
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
132
        },
133
        "priorPredictionId": {
134
          "type": "string",
135
          "format": "uuid",
136
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
137
        },
138
        "triggerResponseId": {
139
          "type": "string",
140
          "format": "uuid",
141
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
142
        },
143
        "createdAt": {
144
          "type": "string",
145
          "format": "date-time",
146
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
147
        }
148
      },
149
      "required": [
150
        "protocolVersion",
151
        "predictionId",
152
        "interactionId",
153
        "contractHash",
154
        "targetAgentId",
155
        "targetAgentVersion",
156
        "taskCategory",
157
        "stage",
158
        "successProbability",
159
        "confidence",
160
        "basis",
161
        "sampleSize",
162
        "topRiskCodes",
163
        "featureVersion",
164
        "createdAt"
165
      ],
166
      "additionalProperties": false
167
    },
168
    "risks": {
169
      "maxItems": 5,
170
      "type": "array",
171
      "items": {
172
        "type": "object",
173
        "properties": {
174
          "riskCode": {
175
            "type": "string",
176
            "pattern": "^[a-z][a-z0-9_]{1,63}$"
177
          },
178
          "dimension": {
179
            "type": "string",
180
            "enum": [
181
              "capability",
182
              "scope",
183
              "deadline",
184
              "tool_access",
185
              "data_access",
186
              "evidence",
187
              "dependency",
188
              "authority",
189
              "safety",
190
              "delivery"
191
            ]
192
          },
193
          "title": {
194
            "type": "string",
195
            "minLength": 1,
196
            "maxLength": 160
197
          },
198
          "rationale": {
199
            "type": "string",
200
            "minLength": 1,
201
            "maxLength": 500
202
          },
203
          "likelihood": {
204
            "type": "number",
205
            "minimum": 0,
206
            "maximum": 1
207
          },
208
          "impact": {
209
            "type": "number",
210
            "minimum": 0,
211
            "maximum": 1
212
          },
213
          "confidence": {
214
            "type": "number",
215
            "minimum": 0,
216
            "maximum": 1
217
          },
218
          "evidenceReferences": {
219
            "default": [],
220
            "maxItems": 10,
221
            "type": "array",
222
            "items": {
223
              "type": "string",
224
              "minLength": 1,
225
              "maxLength": 2048
226
            }
227
          }
228
        },
229
        "required": [
230
          "riskCode",
231
          "dimension",
232
          "title",
233
          "rationale",
234
          "likelihood",
235
          "impact",
236
          "confidence",
237
          "evidenceReferences"
238
        ],
239
        "additionalProperties": false
240
      }
241
    },
242
    "candidateQuestions": {
243
      "maxItems": 5,
244
      "type": "array",
245
      "items": {
246
        "type": "object",
247
        "properties": {
248
          "probeId": {
249
            "type": "string",
250
            "format": "uuid",
251
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
252
          },
253
          "questionCode": {
254
            "type": "string",
255
            "pattern": "^[a-z][a-z0-9_]{1,63}$"
256
          },
257
          "prompt": {
258
            "type": "string",
259
            "minLength": 1,
260
            "maxLength": 240
261
          },
262
          "responseType": {
263
            "type": "string",
264
            "enum": [
265
              "boolean",
266
              "enum",
267
              "number",
268
              "short_text"
269
            ]
270
          },
271
          "choices": {
272
            "minItems": 2,
273
            "maxItems": 6,
274
            "type": "array",
275
            "items": {
276
              "type": "string",
277
              "minLength": 1,
278
              "maxLength": 80
279
            }
280
          },
281
          "evidenceRequested": {
282
            "default": false,
283
            "type": "boolean"
284
          },
285
          "required": {
286
            "default": true,
287
            "type": "boolean"
288
          },
289
          "questionFamily": {
290
            "type": "string",
291
            "enum": [
292
              "capability",
293
              "scope",
294
              "deadline",
295
              "tool_access",
296
              "data_access",
297
              "evidence",
298
              "dependency",
299
              "authority",
300
              "safety",
301
              "delivery"
302
            ]
303
          },
304
          "riskHypothesis": {
305
            "type": "string",
306
            "minLength": 1,
307
            "maxLength": 280
308
          },
309
          "expectedSignals": {
310
            "minItems": 1,
311
            "maxItems": 6,
312
            "type": "array",
313
            "items": {
314
              "type": "object",
315
              "properties": {
316
                "answer": {
317
                  "type": "string",
318
                  "minLength": 1,
319
                  "maxLength": 80
320
                },
321
                "effect": {
322
                  "type": "string",
323
                  "enum": [
324
                    "increase_success",
325
                    "reduce_success",
326
                    "neutral"
327
                  ]
328
                },
329
                "probabilityDelta": {
330
                  "type": "number",
331
                  "minimum": -0.5,
332
                  "maximum": 0.5
333
                }
334
              },
335
              "required": [
336
                "answer",
337
                "effect",
338
                "probabilityDelta"
339
              ],
340
              "additionalProperties": false
341
            }
342
          },
343
          "expectedInformationGain": {
344
            "type": "number",
345
            "minimum": 0,
346
            "maximum": 1
347
          },
348
          "selectionReason": {
349
            "type": "string",
350
            "minLength": 1,
351
            "maxLength": 280
352
          },
353
          "recommendedSafeguardCodes": {
354
            "default": [],
355
            "maxItems": 5,
356
            "type": "array",
357
            "items": {
358
              "type": "string",
359
              "pattern": "^[a-z][a-z0-9_]{1,63}$"
360
            }
361
          }
362
        },
363
        "required": [
364
          "probeId",
365
          "questionCode",
366
          "prompt",
367
          "responseType",
368
          "evidenceRequested",
369
          "required",
370
          "questionFamily",
371
          "riskHypothesis",
372
          "expectedSignals",
373
          "expectedInformationGain",
374
          "selectionReason",
375
          "recommendedSafeguardCodes"
376
        ],
377
        "additionalProperties": false
378
      }
379
    },
380
    "selectedProbeId": {
381
      "type": "string",
382
      "format": "uuid",
383
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
384
    },
385
    "safeguards": {
386
      "maxItems": 5,
387
      "type": "array",
388
      "items": {
389
        "type": "object",
390
        "properties": {
391
          "safeguardId": {
392
            "type": "string",
393
            "format": "uuid",
394
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
395
          },
396
          "assessmentId": {
397
            "type": "string",
398
            "format": "uuid",
399
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
400
          },
401
          "safeguardCode": {
402
            "type": "string",
403
            "pattern": "^[a-z][a-z0-9_]{1,63}$"
404
          },
405
          "interactionId": {
406
            "type": "string",
407
            "format": "uuid",
408
            "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
409
          },
410
          "contractHash": {
411
            "type": "string",
412
            "minLength": 1
413
          },
414
          "targetAgentId": {
415
            "type": "string",
416
            "minLength": 1
417
          },
418
          "targetAgentVersion": {
419
            "type": "string",
420
            "minLength": 1,
421
            "maxLength": 200
422
          },
423
          "type": {
424
            "type": "string",
425
            "enum": [
426
              "require_evidence",
427
              "narrow_scope",
428
              "extend_deadline",
429
              "grant_tool_access",
430
              "require_human_approval",
431
              "limit_delegation",
432
              "add_checkpoint",
433
              "choose_another_agent"
434
            ]
435
          },
436
          "description": {
437
            "type": "string",
438
            "minLength": 1,
439
            "maxLength": 500
440
          },
441
          "rationale": {
442
            "type": "string",
443
            "minLength": 1,
444
            "maxLength": 500
445
          },
446
          "riskCodes": {
447
            "minItems": 1,
448
            "maxItems": 5,
449
            "type": "array",
450
            "items": {
451
              "type": "string",
452
              "pattern": "^[a-z][a-z0-9_]{1,63}$"
453
            }
454
          },
455
          "expectedImpact": {
456
            "type": "number",
457
            "minimum": 0,
458
            "maximum": 0.5
459
          },
460
          "status": {
461
            "type": "string",
462
            "enum": [
463
              "recommended",
464
              "accepted",
465
              "rejected",
466
              "modified"
467
            ]
468
          },
469
          "decisionReason": {
470
            "type": "string",
471
            "maxLength": 500
472
          },
473
          "decidedAt": {
474
            "type": "string",
475
            "format": "date-time",
476
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
477
          },
478
          "createdAt": {
479
            "type": "string",
480
            "format": "date-time",
481
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
482
          }
483
        },
484
        "required": [
485
          "safeguardId",
486
          "assessmentId",
487
          "safeguardCode",
488
          "interactionId",
489
          "contractHash",
490
          "targetAgentId",
491
          "targetAgentVersion",
492
          "type",
493
          "description",
494
          "rationale",
495
          "riskCodes",
496
          "expectedImpact",
497
          "status",
498
          "createdAt"
499
        ],
500
        "additionalProperties": false
501
      }
502
    },
503
    "advisoryNotice": {
504
      "type": "string",
505
      "const": "experimental_estimate_not_a_guarantee"
506
    },
507
    "generation": {
508
      "type": "object",
509
      "properties": {
510
        "generationId": {
511
          "type": "string",
512
          "format": "uuid",
513
          "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
514
        },
515
        "mode": {
516
          "type": "string",
517
          "enum": [
518
            "ai",
519
            "fallback"
520
          ]
521
        },
522
        "model": {
523
          "type": "string",
524
          "minLength": 1
525
        },
526
        "promptVersion": {
527
          "type": "string",
528
          "minLength": 1
529
        }
530
      },
531
      "required": [
532
        "generationId",
533
        "mode",
534
        "model",
535
        "promptVersion"
536
      ],
537
      "additionalProperties": false
538
    },
539
    "createdAt": {
540
      "type": "string",
541
      "format": "date-time",
542
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
543
    }
544
  },
545
  "required": [
546
    "protocolVersion",
547
    "assessmentId",
548
    "interactionId",
549
    "contractHash",
550
    "phase",
551
    "round",
552
    "generatedForAgentId",
553
    "targetAgentId",
554
    "targetAgentVersion",
555
    "prediction",
556
    "risks",
557
    "candidateQuestions",
558
    "safeguards",
559
    "advisoryNotice",
560
    "generation",
561
    "createdAt"
562
  ],
563
  "additionalProperties": false
564
}