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

Viewing files at commit 3f140fdd2001Commit detailsView latest

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