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

Viewing files at commit 6df07fcdd05cCommit detailsView latest

schemas/v0.1/live_session_offer.schema.json 562 lines · 15.1 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "type": {
6
      "type": "string",
7
      "const": "openclasp.session.offer"
8
    },
9
    "version": {
10
      "type": "string",
11
      "const": "1"
12
    },
13
    "offerId": {
14
      "type": "string",
15
      "format": "uuid",
16
      "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)$"
17
    },
18
    "interactionId": {
19
      "type": "string",
20
      "format": "uuid",
21
      "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)$"
22
    },
23
    "agentId": {
24
      "type": "string",
25
      "minLength": 1
26
    },
27
    "role": {
28
      "type": "string",
29
      "enum": [
30
        "initiator",
31
        "responder"
32
      ]
33
    },
34
    "counterparty": {
35
      "type": "object",
36
      "properties": {
37
        "agentId": {
38
          "type": "string",
39
          "minLength": 1
40
        },
41
        "name": {
42
          "type": "string",
43
          "minLength": 1
44
        },
45
        "agentVersion": {
46
          "type": "string",
47
          "minLength": 1
48
        },
49
        "capabilities": {
50
          "type": "array",
51
          "items": {
52
            "type": "string"
53
          }
54
        }
55
      },
56
      "required": [
57
        "agentId",
58
        "name",
59
        "agentVersion",
60
        "capabilities"
61
      ],
62
      "additionalProperties": false
63
    },
64
    "contract": {
65
      "type": "object",
66
      "properties": {
67
        "protocolVersion": {
68
          "type": "string",
69
          "const": "0.1"
70
        },
71
        "interactionId": {
72
          "type": "string",
73
          "format": "uuid",
74
          "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)$"
75
        },
76
        "purpose": {
77
          "type": "string"
78
        },
79
        "parties": {
80
          "minItems": 1,
81
          "type": "array",
82
          "items": {
83
            "type": "string"
84
          }
85
        },
86
        "taskCategory": {
87
          "type": "string"
88
        },
89
        "requestedOutcome": {
90
          "type": "string"
91
        },
92
        "successCriteria": {
93
          "type": "array",
94
          "items": {
95
            "type": "string"
96
          }
97
        },
98
        "allowedActions": {
99
          "type": "array",
100
          "items": {
101
            "type": "string"
102
          }
103
        },
104
        "prohibitedActions": {
105
          "type": "array",
106
          "items": {
107
            "type": "string"
108
          }
109
        },
110
        "allowedData": {
111
          "type": "array",
112
          "items": {
113
            "type": "string"
114
          }
115
        },
116
        "prohibitedData": {
117
          "type": "array",
118
          "items": {
119
            "type": "string"
120
          }
121
        },
122
        "deadline": {
123
          "type": "string",
124
          "format": "date-time",
125
          "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))$"
126
        },
127
        "evidenceRequirements": {
128
          "type": "array",
129
          "items": {
130
            "type": "string"
131
          }
132
        },
133
        "delegationRules": {
134
          "type": "array",
135
          "items": {
136
            "type": "string"
137
          }
138
        },
139
        "humanApprovalRequirements": {
140
          "type": "array",
141
          "items": {
142
            "type": "string"
143
          }
144
        },
145
        "factCheckingPolicy": {
146
          "type": "string"
147
        },
148
        "mediationPolicy": {
149
          "type": "string",
150
          "enum": [
151
            "none",
152
            "mutual_consent"
153
          ]
154
        },
155
        "retentionDays": {
156
          "type": "integer",
157
          "minimum": 0,
158
          "maximum": 9007199254740991
159
        },
160
        "completionConditions": {
161
          "type": "array",
162
          "items": {
163
            "type": "string"
164
          }
165
        },
166
        "cancellationConditions": {
167
          "type": "array",
168
          "items": {
169
            "type": "string"
170
          }
171
        },
172
        "signatures": {
173
          "default": {},
174
          "type": "object",
175
          "propertyNames": {
176
            "type": "string"
177
          },
178
          "additionalProperties": {
179
            "type": "object",
180
            "properties": {
181
              "algorithm": {
182
                "type": "string",
183
                "const": "Ed25519"
184
              },
185
              "keyId": {
186
                "type": "string",
187
                "minLength": 1
188
              },
189
              "value": {
190
                "type": "string",
191
                "minLength": 1
192
              }
193
            },
194
            "required": [
195
              "algorithm",
196
              "keyId",
197
              "value"
198
            ],
199
            "additionalProperties": false
200
          }
201
        }
202
      },
203
      "required": [
204
        "protocolVersion",
205
        "interactionId",
206
        "purpose",
207
        "parties",
208
        "taskCategory",
209
        "requestedOutcome",
210
        "successCriteria",
211
        "allowedActions",
212
        "prohibitedActions",
213
        "allowedData",
214
        "prohibitedData",
215
        "evidenceRequirements",
216
        "delegationRules",
217
        "humanApprovalRequirements",
218
        "factCheckingPolicy",
219
        "mediationPolicy",
220
        "retentionDays",
221
        "completionConditions",
222
        "cancellationConditions",
223
        "signatures"
224
      ],
225
      "additionalProperties": false
226
    },
227
    "contractHash": {
228
      "type": "string",
229
      "minLength": 1
230
    },
231
    "privateInsights": {
232
      "default": [],
233
      "type": "array",
234
      "items": {
235
        "type": "object",
236
        "properties": {
237
          "code": {
238
            "type": "string",
239
            "minLength": 1
240
          },
241
          "severity": {
242
            "type": "string",
243
            "enum": [
244
              "info",
245
              "caution",
246
              "high"
247
            ]
248
          },
249
          "message": {
250
            "type": "string",
251
            "minLength": 1
252
          },
253
          "evidenceReferences": {
254
            "default": [],
255
            "type": "array",
256
            "items": {
257
              "type": "string"
258
            }
259
          },
260
          "requirementReferences": {
261
            "default": [],
262
            "type": "array",
263
            "items": {
264
              "type": "string"
265
            }
266
          },
267
          "confidence": {
268
            "type": "number",
269
            "minimum": 0,
270
            "maximum": 1
271
          }
272
        },
273
        "required": [
274
          "code",
275
          "severity",
276
          "message",
277
          "evidenceReferences",
278
          "requirementReferences"
279
        ],
280
        "additionalProperties": false
281
      }
282
    },
283
    "counterpartyBrief": {
284
      "type": "object",
285
      "properties": {
286
        "briefId": {
287
          "type": "string",
288
          "format": "uuid",
289
          "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)$"
290
        },
291
        "interactionId": {
292
          "type": "string",
293
          "format": "uuid",
294
          "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)$"
295
        },
296
        "contractHash": {
297
          "type": "string",
298
          "minLength": 1
299
        },
300
        "recipientAgentId": {
301
          "type": "string",
302
          "minLength": 1
303
        },
304
        "subjectAgentId": {
305
          "type": "string",
306
          "minLength": 1
307
        },
308
        "taskCategory": {
309
          "type": "string",
310
          "minLength": 1
311
        },
312
        "decision": {
313
          "type": "string",
314
          "enum": [
315
            "ALLOW",
316
            "CHALLENGE",
317
            "DENY"
318
          ]
319
        },
320
        "requirements": {
321
          "maxItems": 100,
322
          "type": "array",
323
          "items": {
324
            "type": "object",
325
            "properties": {
326
              "requirementId": {
327
                "type": "string",
328
                "minLength": 1,
329
                "maxLength": 128
330
              },
331
              "requirement": {
332
                "type": "string",
333
                "minLength": 1,
334
                "maxLength": 1000
335
              },
336
              "kind": {
337
                "type": "string",
338
                "enum": [
339
                  "capability",
340
                  "limitation",
341
                  "success_criterion",
342
                  "deadline",
343
                  "evidence",
344
                  "scope",
345
                  "data",
346
                  "communication",
347
                  "delegation"
348
                ]
349
              },
350
              "status": {
351
                "type": "string",
352
                "enum": [
353
                  "match",
354
                  "partial",
355
                  "mismatch",
356
                  "unknown"
357
                ]
358
              },
359
              "reason": {
360
                "type": "string",
361
                "minLength": 1,
362
                "maxLength": 1000
363
              },
364
              "confidence": {
365
                "type": "number",
366
                "minimum": 0,
367
                "maximum": 1
368
              },
369
              "sources": {
370
                "minItems": 1,
371
                "type": "array",
372
                "items": {
373
                  "type": "string",
374
                  "enum": [
375
                    "contract",
376
                    "self_declared",
377
                    "eligible_history",
378
                    "evidence",
379
                    "version_change"
380
                  ]
381
                }
382
              },
383
              "evidenceReferences": {
384
                "default": [],
385
                "maxItems": 50,
386
                "type": "array",
387
                "items": {
388
                  "type": "string",
389
                  "minLength": 1,
390
                  "maxLength": 2048
391
                }
392
              }
393
            },
394
            "required": [
395
              "requirementId",
396
              "requirement",
397
              "kind",
398
              "status",
399
              "reason",
400
              "confidence",
401
              "sources",
402
              "evidenceReferences"
403
            ],
404
            "additionalProperties": false
405
          }
406
        },
407
        "insights": {
408
          "maxItems": 100,
409
          "type": "array",
410
          "items": {
411
            "type": "object",
412
            "properties": {
413
              "code": {
414
                "type": "string",
415
                "minLength": 1
416
              },
417
              "severity": {
418
                "type": "string",
419
                "enum": [
420
                  "info",
421
                  "caution",
422
                  "high"
423
                ]
424
              },
425
              "message": {
426
                "type": "string",
427
                "minLength": 1
428
              },
429
              "evidenceReferences": {
430
                "default": [],
431
                "type": "array",
432
                "items": {
433
                  "type": "string"
434
                }
435
              },
436
              "requirementReferences": {
437
                "default": [],
438
                "type": "array",
439
                "items": {
440
                  "type": "string"
441
                }
442
              },
443
              "confidence": {
444
                "type": "number",
445
                "minimum": 0,
446
                "maximum": 1
447
              }
448
            },
449
            "required": [
450
              "code",
451
              "severity",
452
              "message",
453
              "evidenceReferences",
454
              "requirementReferences"
455
            ],
456
            "additionalProperties": false
457
          }
458
        },
459
        "relevantSampleSize": {
460
          "type": "integer",
461
          "minimum": 0,
462
          "maximum": 9007199254740991
463
        },
464
        "historyConfidence": {
465
          "type": "number",
466
          "minimum": 0,
467
          "maximum": 1
468
        },
469
        "subjectAgentVersion": {
470
          "type": "string",
471
          "minLength": 1
472
        },
473
        "recommendedContractChanges": {
474
          "default": [],
475
          "maxItems": 50,
476
          "type": "array",
477
          "items": {
478
            "type": "string",
479
            "minLength": 1,
480
            "maxLength": 1000
481
          }
482
        },
483
        "generatedAt": {
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
        "expiresAt": {
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
        "signature": {
494
          "type": "object",
495
          "properties": {
496
            "algorithm": {
497
              "type": "string",
498
              "const": "Ed25519"
499
            },
500
            "keyId": {
501
              "type": "string",
502
              "minLength": 1
503
            },
504
            "value": {
505
              "type": "string",
506
              "minLength": 1
507
            }
508
          },
509
          "required": [
510
            "algorithm",
511
            "keyId",
512
            "value"
513
          ],
514
          "additionalProperties": false
515
        }
516
      },
517
      "required": [
518
        "briefId",
519
        "interactionId",
520
        "contractHash",
521
        "recipientAgentId",
522
        "subjectAgentId",
523
        "taskCategory",
524
        "decision",
525
        "requirements",
526
        "insights",
527
        "relevantSampleSize",
528
        "historyConfidence",
529
        "subjectAgentVersion",
530
        "recommendedContractChanges",
531
        "generatedAt",
532
        "expiresAt"
533
      ],
534
      "additionalProperties": false
535
    },
536
    "issuedAt": {
537
      "type": "string",
538
      "format": "date-time",
539
      "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))$"
540
    },
541
    "expiresAt": {
542
      "type": "string",
543
      "format": "date-time",
544
      "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))$"
545
    }
546
  },
547
  "required": [
548
    "type",
549
    "version",
550
    "offerId",
551
    "interactionId",
552
    "agentId",
553
    "role",
554
    "counterparty",
555
    "contract",
556
    "contractHash",
557
    "privateInsights",
558
    "issuedAt",
559
    "expiresAt"
560
  ],
561
  "additionalProperties": false
562
}