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

Viewing files at commit 5b7999fcbb0cCommit detailsView latest

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