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

Viewing files at commit 9df2394381e9Commit detailsView latest

schemas/v0.1/live_session_activation.schema.json 433 lines · 12.0 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.activation"
8
    },
9
    "version": {
10
      "type": "string",
11
      "const": "1"
12
    },
13
    "activationId": {
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
    "sessionId": {
28
      "type": "string",
29
      "format": "uuid",
30
      "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)$"
31
    },
32
    "role": {
33
      "type": "string",
34
      "enum": [
35
        "initiator",
36
        "responder"
37
      ]
38
    },
39
    "peer": {
40
      "type": "object",
41
      "properties": {
42
        "agentId": {
43
          "type": "string",
44
          "minLength": 1
45
        },
46
        "sessionId": {
47
          "type": "string",
48
          "format": "uuid",
49
          "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)$"
50
        },
51
        "endpoint": {
52
          "type": "string",
53
          "format": "uri"
54
        },
55
        "bearerToken": {
56
          "type": "string",
57
          "minLength": 1
58
        },
59
        "verificationKey": {
60
          "type": "string",
61
          "minLength": 1
62
        }
63
      },
64
      "required": [
65
        "agentId",
66
        "sessionId",
67
        "endpoint",
68
        "bearerToken",
69
        "verificationKey"
70
      ],
71
      "additionalProperties": false
72
    },
73
    "reporting": {
74
      "type": "object",
75
      "properties": {
76
        "endpoint": {
77
          "type": "string",
78
          "format": "uri"
79
        },
80
        "completionEndpoint": {
81
          "type": "string",
82
          "format": "uri"
83
        },
84
        "feedbackEndpoint": {
85
          "type": "string",
86
          "format": "uri"
87
        },
88
        "bearerToken": {
89
          "type": "string",
90
          "minLength": 1
91
        }
92
      },
93
      "required": [
94
        "endpoint",
95
        "bearerToken"
96
      ],
97
      "additionalProperties": false
98
    },
99
    "privateInsights": {
100
      "type": "array",
101
      "items": {
102
        "type": "object",
103
        "properties": {
104
          "code": {
105
            "type": "string",
106
            "minLength": 1
107
          },
108
          "severity": {
109
            "type": "string",
110
            "enum": [
111
              "info",
112
              "caution",
113
              "high"
114
            ]
115
          },
116
          "message": {
117
            "type": "string",
118
            "minLength": 1
119
          },
120
          "evidenceReferences": {
121
            "default": [],
122
            "type": "array",
123
            "items": {
124
              "type": "string"
125
            }
126
          },
127
          "requirementReferences": {
128
            "default": [],
129
            "type": "array",
130
            "items": {
131
              "type": "string"
132
            }
133
          },
134
          "confidence": {
135
            "type": "number",
136
            "minimum": 0,
137
            "maximum": 1
138
          }
139
        },
140
        "required": [
141
          "code",
142
          "severity",
143
          "message",
144
          "evidenceReferences",
145
          "requirementReferences"
146
        ],
147
        "additionalProperties": false
148
      }
149
    },
150
    "counterpartyBrief": {
151
      "type": "object",
152
      "properties": {
153
        "briefId": {
154
          "type": "string",
155
          "format": "uuid",
156
          "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)$"
157
        },
158
        "interactionId": {
159
          "type": "string",
160
          "format": "uuid",
161
          "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)$"
162
        },
163
        "contractHash": {
164
          "type": "string",
165
          "minLength": 1
166
        },
167
        "recipientAgentId": {
168
          "type": "string",
169
          "minLength": 1
170
        },
171
        "subjectAgentId": {
172
          "type": "string",
173
          "minLength": 1
174
        },
175
        "taskCategory": {
176
          "type": "string",
177
          "minLength": 1
178
        },
179
        "decision": {
180
          "type": "string",
181
          "enum": [
182
            "ALLOW",
183
            "CHALLENGE",
184
            "DENY"
185
          ]
186
        },
187
        "requirements": {
188
          "maxItems": 100,
189
          "type": "array",
190
          "items": {
191
            "type": "object",
192
            "properties": {
193
              "requirementId": {
194
                "type": "string",
195
                "minLength": 1,
196
                "maxLength": 128
197
              },
198
              "requirement": {
199
                "type": "string",
200
                "minLength": 1,
201
                "maxLength": 1000
202
              },
203
              "kind": {
204
                "type": "string",
205
                "enum": [
206
                  "capability",
207
                  "limitation",
208
                  "success_criterion",
209
                  "deadline",
210
                  "evidence",
211
                  "scope",
212
                  "data",
213
                  "communication",
214
                  "delegation"
215
                ]
216
              },
217
              "status": {
218
                "type": "string",
219
                "enum": [
220
                  "match",
221
                  "partial",
222
                  "mismatch",
223
                  "unknown"
224
                ]
225
              },
226
              "reason": {
227
                "type": "string",
228
                "minLength": 1,
229
                "maxLength": 1000
230
              },
231
              "confidence": {
232
                "type": "number",
233
                "minimum": 0,
234
                "maximum": 1
235
              },
236
              "sources": {
237
                "minItems": 1,
238
                "type": "array",
239
                "items": {
240
                  "type": "string",
241
                  "enum": [
242
                    "contract",
243
                    "self_declared",
244
                    "eligible_history",
245
                    "evidence",
246
                    "version_change"
247
                  ]
248
                }
249
              },
250
              "evidenceReferences": {
251
                "default": [],
252
                "maxItems": 50,
253
                "type": "array",
254
                "items": {
255
                  "type": "string",
256
                  "minLength": 1,
257
                  "maxLength": 2048
258
                }
259
              }
260
            },
261
            "required": [
262
              "requirementId",
263
              "requirement",
264
              "kind",
265
              "status",
266
              "reason",
267
              "confidence",
268
              "sources",
269
              "evidenceReferences"
270
            ],
271
            "additionalProperties": false
272
          }
273
        },
274
        "insights": {
275
          "maxItems": 100,
276
          "type": "array",
277
          "items": {
278
            "type": "object",
279
            "properties": {
280
              "code": {
281
                "type": "string",
282
                "minLength": 1
283
              },
284
              "severity": {
285
                "type": "string",
286
                "enum": [
287
                  "info",
288
                  "caution",
289
                  "high"
290
                ]
291
              },
292
              "message": {
293
                "type": "string",
294
                "minLength": 1
295
              },
296
              "evidenceReferences": {
297
                "default": [],
298
                "type": "array",
299
                "items": {
300
                  "type": "string"
301
                }
302
              },
303
              "requirementReferences": {
304
                "default": [],
305
                "type": "array",
306
                "items": {
307
                  "type": "string"
308
                }
309
              },
310
              "confidence": {
311
                "type": "number",
312
                "minimum": 0,
313
                "maximum": 1
314
              }
315
            },
316
            "required": [
317
              "code",
318
              "severity",
319
              "message",
320
              "evidenceReferences",
321
              "requirementReferences"
322
            ],
323
            "additionalProperties": false
324
          }
325
        },
326
        "relevantSampleSize": {
327
          "type": "integer",
328
          "minimum": 0,
329
          "maximum": 9007199254740991
330
        },
331
        "historyConfidence": {
332
          "type": "number",
333
          "minimum": 0,
334
          "maximum": 1
335
        },
336
        "subjectAgentVersion": {
337
          "type": "string",
338
          "minLength": 1
339
        },
340
        "recommendedContractChanges": {
341
          "default": [],
342
          "maxItems": 50,
343
          "type": "array",
344
          "items": {
345
            "type": "string",
346
            "minLength": 1,
347
            "maxLength": 1000
348
          }
349
        },
350
        "generatedAt": {
351
          "type": "string",
352
          "format": "date-time",
353
          "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))$"
354
        },
355
        "expiresAt": {
356
          "type": "string",
357
          "format": "date-time",
358
          "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))$"
359
        },
360
        "signature": {
361
          "type": "object",
362
          "properties": {
363
            "algorithm": {
364
              "type": "string",
365
              "const": "Ed25519"
366
            },
367
            "keyId": {
368
              "type": "string",
369
              "minLength": 1
370
            },
371
            "value": {
372
              "type": "string",
373
              "minLength": 1
374
            }
375
          },
376
          "required": [
377
            "algorithm",
378
            "keyId",
379
            "value"
380
          ],
381
          "additionalProperties": false
382
        }
383
      },
384
      "required": [
385
        "briefId",
386
        "interactionId",
387
        "contractHash",
388
        "recipientAgentId",
389
        "subjectAgentId",
390
        "taskCategory",
391
        "decision",
392
        "requirements",
393
        "insights",
394
        "relevantSampleSize",
395
        "historyConfidence",
396
        "subjectAgentVersion",
397
        "recommendedContractChanges",
398
        "generatedAt",
399
        "expiresAt"
400
      ],
401
      "additionalProperties": false
402
    },
403
    "contractHash": {
404
      "type": "string",
405
      "minLength": 1
406
    },
407
    "activatedAt": {
408
      "type": "string",
409
      "format": "date-time",
410
      "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))$"
411
    },
412
    "expiresAt": {
413
      "type": "string",
414
      "format": "date-time",
415
      "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))$"
416
    }
417
  },
418
  "required": [
419
    "type",
420
    "version",
421
    "activationId",
422
    "interactionId",
423
    "agentId",
424
    "sessionId",
425
    "role",
426
    "peer",
427
    "reporting",
428
    "contractHash",
429
    "activatedAt",
430
    "expiresAt"
431
  ],
432
  "additionalProperties": false
433
}