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

Viewing files at commit f87848a4fcb8Commit detailsView latest

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