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

Viewing files at commit cb968123d147Commit detailsView latest

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