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

Viewing files at commit cd4450c423f7Commit detailsView latest

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