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

Viewing files at commit e4047161f2b3Commit detailsView latest

schemas/v0.1/federated_interaction.schema.json 620 lines · 19.4 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
    "interactionId": {
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
    "initiatorAgentId": {
15
      "type": "string",
16
      "minLength": 1
17
    },
18
    "responderAgentId": {
19
      "type": "string",
20
      "minLength": 1
21
    },
22
    "status": {
23
      "type": "string",
24
      "enum": ["pending", "active", "rejected", "expired", "cancelled", "completed"]
25
    },
26
    "contract": {
27
      "type": "object",
28
      "properties": {
29
        "protocolVersion": {
30
          "type": "string",
31
          "const": "0.1"
32
        },
33
        "interactionId": {
34
          "type": "string",
35
          "format": "uuid",
36
          "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)$"
37
        },
38
        "purpose": {
39
          "type": "string"
40
        },
41
        "parties": {
42
          "minItems": 1,
43
          "type": "array",
44
          "items": {
45
            "type": "string"
46
          }
47
        },
48
        "taskCategory": {
49
          "type": "string"
50
        },
51
        "requestedOutcome": {
52
          "type": "string"
53
        },
54
        "successCriteria": {
55
          "type": "array",
56
          "items": {
57
            "type": "string"
58
          }
59
        },
60
        "allowedActions": {
61
          "type": "array",
62
          "items": {
63
            "type": "string"
64
          }
65
        },
66
        "prohibitedActions": {
67
          "type": "array",
68
          "items": {
69
            "type": "string"
70
          }
71
        },
72
        "allowedData": {
73
          "type": "array",
74
          "items": {
75
            "type": "string"
76
          }
77
        },
78
        "prohibitedData": {
79
          "type": "array",
80
          "items": {
81
            "type": "string"
82
          }
83
        },
84
        "deadline": {
85
          "type": "string",
86
          "format": "date-time",
87
          "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))$"
88
        },
89
        "evidenceRequirements": {
90
          "type": "array",
91
          "items": {
92
            "type": "string"
93
          }
94
        },
95
        "delegationRules": {
96
          "type": "array",
97
          "items": {
98
            "type": "string"
99
          }
100
        },
101
        "humanApprovalRequirements": {
102
          "type": "array",
103
          "items": {
104
            "type": "string"
105
          }
106
        },
107
        "factCheckingPolicy": {
108
          "type": "string"
109
        },
110
        "mediationPolicy": {
111
          "type": "string",
112
          "enum": ["none", "mutual_consent"]
113
        },
114
        "retentionDays": {
115
          "type": "integer",
116
          "minimum": 0,
117
          "maximum": 9007199254740991
118
        },
119
        "completionConditions": {
120
          "type": "array",
121
          "items": {
122
            "type": "string"
123
          }
124
        },
125
        "cancellationConditions": {
126
          "type": "array",
127
          "items": {
128
            "type": "string"
129
          }
130
        },
131
        "signatures": {
132
          "default": {},
133
          "type": "object",
134
          "propertyNames": {
135
            "type": "string"
136
          },
137
          "additionalProperties": {
138
            "type": "object",
139
            "properties": {
140
              "algorithm": {
141
                "type": "string",
142
                "const": "Ed25519"
143
              },
144
              "keyId": {
145
                "type": "string",
146
                "minLength": 1
147
              },
148
              "value": {
149
                "type": "string",
150
                "minLength": 1
151
              }
152
            },
153
            "required": ["algorithm", "keyId", "value"],
154
            "additionalProperties": false
155
          }
156
        }
157
      },
158
      "required": [
159
        "protocolVersion",
160
        "interactionId",
161
        "purpose",
162
        "parties",
163
        "taskCategory",
164
        "requestedOutcome",
165
        "successCriteria",
166
        "allowedActions",
167
        "prohibitedActions",
168
        "allowedData",
169
        "prohibitedData",
170
        "evidenceRequirements",
171
        "delegationRules",
172
        "humanApprovalRequirements",
173
        "factCheckingPolicy",
174
        "mediationPolicy",
175
        "retentionDays",
176
        "completionConditions",
177
        "cancellationConditions",
178
        "signatures"
179
      ],
180
      "additionalProperties": false
181
    },
182
    "termsHash": {
183
      "type": "string",
184
      "minLength": 1
185
    },
186
    "acceptances": {
187
      "type": "object",
188
      "propertyNames": {
189
        "type": "string"
190
      },
191
      "additionalProperties": {
192
        "type": "object",
193
        "properties": {
194
          "agentId": {
195
            "type": "string",
196
            "minLength": 1
197
          },
198
          "method": {
199
            "type": "string",
200
            "enum": ["oauth_installation", "oauth_account", "policy_auto_accept", "ed25519"]
201
          },
202
          "termsHash": {
203
            "type": "string",
204
            "minLength": 1
205
          },
206
          "acceptedAt": {
207
            "type": "string",
208
            "format": "date-time",
209
            "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))$"
210
          },
211
          "signature": {
212
            "type": "object",
213
            "properties": {
214
              "algorithm": {
215
                "type": "string",
216
                "const": "Ed25519"
217
              },
218
              "keyId": {
219
                "type": "string",
220
                "minLength": 1
221
              },
222
              "value": {
223
                "type": "string",
224
                "minLength": 1
225
              }
226
            },
227
            "required": ["algorithm", "keyId", "value"],
228
            "additionalProperties": false
229
          }
230
        },
231
        "required": ["agentId", "method", "termsHash", "acceptedAt"],
232
        "additionalProperties": false
233
      }
234
    },
235
    "contractRevision": {
236
      "default": 1,
237
      "type": "integer",
238
      "exclusiveMinimum": 0,
239
      "maximum": 9007199254740991
240
    },
241
    "contractRevisions": {
242
      "default": [],
243
      "type": "array",
244
      "items": {
245
        "type": "object",
246
        "properties": {
247
          "revisionId": {
248
            "type": "string",
249
            "format": "uuid",
250
            "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)$"
251
          },
252
          "interactionId": {
253
            "type": "string",
254
            "format": "uuid",
255
            "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)$"
256
          },
257
          "revision": {
258
            "type": "integer",
259
            "exclusiveMinimum": 0,
260
            "maximum": 9007199254740991
261
          },
262
          "previousTermsHash": {
263
            "type": "string",
264
            "minLength": 1
265
          },
266
          "termsHash": {
267
            "type": "string",
268
            "minLength": 1
269
          },
270
          "contract": {
271
            "type": "object",
272
            "properties": {
273
              "protocolVersion": {
274
                "type": "string",
275
                "const": "0.1"
276
              },
277
              "interactionId": {
278
                "type": "string",
279
                "format": "uuid",
280
                "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)$"
281
              },
282
              "purpose": {
283
                "type": "string"
284
              },
285
              "parties": {
286
                "minItems": 1,
287
                "type": "array",
288
                "items": {
289
                  "type": "string"
290
                }
291
              },
292
              "taskCategory": {
293
                "type": "string"
294
              },
295
              "requestedOutcome": {
296
                "type": "string"
297
              },
298
              "successCriteria": {
299
                "type": "array",
300
                "items": {
301
                  "type": "string"
302
                }
303
              },
304
              "allowedActions": {
305
                "type": "array",
306
                "items": {
307
                  "type": "string"
308
                }
309
              },
310
              "prohibitedActions": {
311
                "type": "array",
312
                "items": {
313
                  "type": "string"
314
                }
315
              },
316
              "allowedData": {
317
                "type": "array",
318
                "items": {
319
                  "type": "string"
320
                }
321
              },
322
              "prohibitedData": {
323
                "type": "array",
324
                "items": {
325
                  "type": "string"
326
                }
327
              },
328
              "deadline": {
329
                "type": "string",
330
                "format": "date-time",
331
                "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))$"
332
              },
333
              "evidenceRequirements": {
334
                "type": "array",
335
                "items": {
336
                  "type": "string"
337
                }
338
              },
339
              "delegationRules": {
340
                "type": "array",
341
                "items": {
342
                  "type": "string"
343
                }
344
              },
345
              "humanApprovalRequirements": {
346
                "type": "array",
347
                "items": {
348
                  "type": "string"
349
                }
350
              },
351
              "factCheckingPolicy": {
352
                "type": "string"
353
              },
354
              "mediationPolicy": {
355
                "type": "string",
356
                "enum": ["none", "mutual_consent"]
357
              },
358
              "retentionDays": {
359
                "type": "integer",
360
                "minimum": 0,
361
                "maximum": 9007199254740991
362
              },
363
              "completionConditions": {
364
                "type": "array",
365
                "items": {
366
                  "type": "string"
367
                }
368
              },
369
              "cancellationConditions": {
370
                "type": "array",
371
                "items": {
372
                  "type": "string"
373
                }
374
              },
375
              "signatures": {
376
                "default": {},
377
                "type": "object",
378
                "propertyNames": {
379
                  "type": "string"
380
                },
381
                "additionalProperties": {
382
                  "type": "object",
383
                  "properties": {
384
                    "algorithm": {
385
                      "type": "string",
386
                      "const": "Ed25519"
387
                    },
388
                    "keyId": {
389
                      "type": "string",
390
                      "minLength": 1
391
                    },
392
                    "value": {
393
                      "type": "string",
394
                      "minLength": 1
395
                    }
396
                  },
397
                  "required": ["algorithm", "keyId", "value"],
398
                  "additionalProperties": false
399
                }
400
              }
401
            },
402
            "required": [
403
              "protocolVersion",
404
              "interactionId",
405
              "purpose",
406
              "parties",
407
              "taskCategory",
408
              "requestedOutcome",
409
              "successCriteria",
410
              "allowedActions",
411
              "prohibitedActions",
412
              "allowedData",
413
              "prohibitedData",
414
              "evidenceRequirements",
415
              "delegationRules",
416
              "humanApprovalRequirements",
417
              "factCheckingPolicy",
418
              "mediationPolicy",
419
              "retentionDays",
420
              "completionConditions",
421
              "cancellationConditions",
422
              "signatures"
423
            ],
424
            "additionalProperties": false
425
          },
426
          "proposedByAgentId": {
427
            "type": "string",
428
            "minLength": 1
429
          },
430
          "status": {
431
            "type": "string",
432
            "enum": ["proposed", "accepted", "rejected", "superseded"]
433
          },
434
          "acceptances": {
435
            "type": "object",
436
            "propertyNames": {
437
              "type": "string"
438
            },
439
            "additionalProperties": {
440
              "type": "object",
441
              "properties": {
442
                "agentId": {
443
                  "type": "string",
444
                  "minLength": 1
445
                },
446
                "method": {
447
                  "type": "string",
448
                  "enum": ["oauth_installation", "oauth_account", "policy_auto_accept", "ed25519"]
449
                },
450
                "termsHash": {
451
                  "type": "string",
452
                  "minLength": 1
453
                },
454
                "acceptedAt": {
455
                  "type": "string",
456
                  "format": "date-time",
457
                  "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))$"
458
                },
459
                "signature": {
460
                  "type": "object",
461
                  "properties": {
462
                    "algorithm": {
463
                      "type": "string",
464
                      "const": "Ed25519"
465
                    },
466
                    "keyId": {
467
                      "type": "string",
468
                      "minLength": 1
469
                    },
470
                    "value": {
471
                      "type": "string",
472
                      "minLength": 1
473
                    }
474
                  },
475
                  "required": ["algorithm", "keyId", "value"],
476
                  "additionalProperties": false
477
                }
478
              },
479
              "required": ["agentId", "method", "termsHash", "acceptedAt"],
480
              "additionalProperties": false
481
            }
482
          },
483
          "createdAt": {
484
            "type": "string",
485
            "format": "date-time",
486
            "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))$"
487
          },
488
          "updatedAt": {
489
            "type": "string",
490
            "format": "date-time",
491
            "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))$"
492
          },
493
          "expiresAt": {
494
            "type": "string",
495
            "format": "date-time",
496
            "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))$"
497
          },
498
          "platformAttestation": {
499
            "type": "object",
500
            "properties": {
501
              "algorithm": {
502
                "type": "string",
503
                "const": "Ed25519"
504
              },
505
              "keyId": {
506
                "type": "string",
507
                "minLength": 1
508
              },
509
              "value": {
510
                "type": "string",
511
                "minLength": 1
512
              },
513
              "digest": {
514
                "type": "string",
515
                "pattern": "^[a-zA-Z0-9_-]{43}$"
516
              }
517
            },
518
            "required": ["algorithm", "keyId", "value", "digest"],
519
            "additionalProperties": false
520
          }
521
        },
522
        "required": [
523
          "revisionId",
524
          "interactionId",
525
          "revision",
526
          "termsHash",
527
          "contract",
528
          "proposedByAgentId",
529
          "status",
530
          "acceptances",
531
          "createdAt",
532
          "updatedAt"
533
        ],
534
        "additionalProperties": false
535
      }
536
    },
537
    "initiatorTransport": {
538
      "type": "object",
539
      "properties": {
540
        "protocol": {
541
          "type": "string",
542
          "const": "A2A/1.0"
543
        },
544
        "protocolBinding": {
545
          "default": "JSONRPC",
546
          "type": "string",
547
          "minLength": 1
548
        },
549
        "endpoint": {
550
          "type": "string",
551
          "format": "uri"
552
        },
553
        "managedBy": {
554
          "default": "agent",
555
          "type": "string",
556
          "enum": ["agent", "openclasp"]
557
        }
558
      },
559
      "required": ["protocol", "protocolBinding", "endpoint", "managedBy"],
560
      "additionalProperties": false
561
    },
562
    "responderTransport": {
563
      "type": "object",
564
      "properties": {
565
        "protocol": {
566
          "type": "string",
567
          "const": "A2A/1.0"
568
        },
569
        "protocolBinding": {
570
          "default": "JSONRPC",
571
          "type": "string",
572
          "minLength": 1
573
        },
574
        "endpoint": {
575
          "type": "string",
576
          "format": "uri"
577
        },
578
        "managedBy": {
579
          "default": "agent",
580
          "type": "string",
581
          "enum": ["agent", "openclasp"]
582
        }
583
      },
584
      "required": ["protocol", "protocolBinding", "endpoint", "managedBy"],
585
      "additionalProperties": false
586
    },
587
    "createdAt": {
588
      "type": "string",
589
      "format": "date-time",
590
      "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))$"
591
    },
592
    "updatedAt": {
593
      "type": "string",
594
      "format": "date-time",
595
      "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))$"
596
    },
597
    "expiresAt": {
598
      "type": "string",
599
      "format": "date-time",
600
      "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))$"
601
    }
602
  },
603
  "required": [
604
    "protocolVersion",
605
    "interactionId",
606
    "initiatorAgentId",
607
    "responderAgentId",
608
    "status",
609
    "contract",
610
    "termsHash",
611
    "acceptances",
612
    "contractRevision",
613
    "contractRevisions",
614
    "responderTransport",
615
    "createdAt",
616
    "updatedAt",
617
    "expiresAt"
618
  ],
619
  "additionalProperties": false
620
}