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

Viewing files at commit 1efaca5a5f5eCommit detailsView latest

schemas/v0.1/assurance_response_a2a_payload.schema.json 314 lines · 10.4 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "kind": {
6
      "type": "string",
7
      "const": "openclasp.assurance.response"
8
    },
9
    "response": {
10
      "type": "object",
11
      "properties": {
12
        "protocolVersion": {
13
          "type": "string",
14
          "const": "0.1"
15
        },
16
        "responseId": {
17
          "type": "string",
18
          "format": "uuid",
19
          "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)$"
20
        },
21
        "planId": {
22
          "type": "string",
23
          "format": "uuid",
24
          "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)$"
25
        },
26
        "interactionId": {
27
          "type": "string",
28
          "format": "uuid",
29
          "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)$"
30
        },
31
        "contractHash": {
32
          "type": "string",
33
          "minLength": 1
34
        },
35
        "phase": {
36
          "type": "string",
37
          "enum": [
38
            "pre_task",
39
            "post_task"
40
          ]
41
        },
42
        "agentId": {
43
          "type": "string",
44
          "minLength": 1
45
        },
46
        "agentVersion": {
47
          "type": "string",
48
          "minLength": 1,
49
          "maxLength": 200
50
        },
51
        "answers": {
52
          "minItems": 1,
53
          "maxItems": 1,
54
          "type": "array",
55
          "items": {
56
            "oneOf": [
57
              {
58
                "type": "object",
59
                "properties": {
60
                  "probeId": {
61
                    "type": "string",
62
                    "format": "uuid",
63
                    "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)$"
64
                  },
65
                  "questionCode": {
66
                    "type": "string",
67
                    "pattern": "^[a-z][a-z0-9_]{1,63}$"
68
                  },
69
                  "confidence": {
70
                    "type": "number",
71
                    "minimum": 0,
72
                    "maximum": 1
73
                  },
74
                  "evidenceReferences": {
75
                    "default": [],
76
                    "maxItems": 5,
77
                    "type": "array",
78
                    "items": {
79
                      "type": "string",
80
                      "minLength": 1,
81
                      "maxLength": 2048
82
                    }
83
                  },
84
                  "limitations": {
85
                    "default": [],
86
                    "maxItems": 3,
87
                    "type": "array",
88
                    "items": {
89
                      "type": "string",
90
                      "minLength": 1,
91
                      "maxLength": 240
92
                    }
93
                  },
94
                  "responseType": {
95
                    "type": "string",
96
                    "const": "boolean"
97
                  },
98
                  "answer": {
99
                    "type": "boolean"
100
                  }
101
                },
102
                "required": [
103
                  "probeId",
104
                  "questionCode",
105
                  "confidence",
106
                  "evidenceReferences",
107
                  "limitations",
108
                  "responseType",
109
                  "answer"
110
                ],
111
                "additionalProperties": false
112
              },
113
              {
114
                "type": "object",
115
                "properties": {
116
                  "probeId": {
117
                    "type": "string",
118
                    "format": "uuid",
119
                    "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)$"
120
                  },
121
                  "questionCode": {
122
                    "type": "string",
123
                    "pattern": "^[a-z][a-z0-9_]{1,63}$"
124
                  },
125
                  "confidence": {
126
                    "type": "number",
127
                    "minimum": 0,
128
                    "maximum": 1
129
                  },
130
                  "evidenceReferences": {
131
                    "default": [],
132
                    "maxItems": 5,
133
                    "type": "array",
134
                    "items": {
135
                      "type": "string",
136
                      "minLength": 1,
137
                      "maxLength": 2048
138
                    }
139
                  },
140
                  "limitations": {
141
                    "default": [],
142
                    "maxItems": 3,
143
                    "type": "array",
144
                    "items": {
145
                      "type": "string",
146
                      "minLength": 1,
147
                      "maxLength": 240
148
                    }
149
                  },
150
                  "responseType": {
151
                    "type": "string",
152
                    "const": "enum"
153
                  },
154
                  "answer": {
155
                    "type": "string",
156
                    "minLength": 1,
157
                    "maxLength": 80
158
                  }
159
                },
160
                "required": [
161
                  "probeId",
162
                  "questionCode",
163
                  "confidence",
164
                  "evidenceReferences",
165
                  "limitations",
166
                  "responseType",
167
                  "answer"
168
                ],
169
                "additionalProperties": false
170
              },
171
              {
172
                "type": "object",
173
                "properties": {
174
                  "probeId": {
175
                    "type": "string",
176
                    "format": "uuid",
177
                    "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)$"
178
                  },
179
                  "questionCode": {
180
                    "type": "string",
181
                    "pattern": "^[a-z][a-z0-9_]{1,63}$"
182
                  },
183
                  "confidence": {
184
                    "type": "number",
185
                    "minimum": 0,
186
                    "maximum": 1
187
                  },
188
                  "evidenceReferences": {
189
                    "default": [],
190
                    "maxItems": 5,
191
                    "type": "array",
192
                    "items": {
193
                      "type": "string",
194
                      "minLength": 1,
195
                      "maxLength": 2048
196
                    }
197
                  },
198
                  "limitations": {
199
                    "default": [],
200
                    "maxItems": 3,
201
                    "type": "array",
202
                    "items": {
203
                      "type": "string",
204
                      "minLength": 1,
205
                      "maxLength": 240
206
                    }
207
                  },
208
                  "responseType": {
209
                    "type": "string",
210
                    "const": "number"
211
                  },
212
                  "answer": {
213
                    "type": "number"
214
                  }
215
                },
216
                "required": [
217
                  "probeId",
218
                  "questionCode",
219
                  "confidence",
220
                  "evidenceReferences",
221
                  "limitations",
222
                  "responseType",
223
                  "answer"
224
                ],
225
                "additionalProperties": false
226
              },
227
              {
228
                "type": "object",
229
                "properties": {
230
                  "probeId": {
231
                    "type": "string",
232
                    "format": "uuid",
233
                    "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)$"
234
                  },
235
                  "questionCode": {
236
                    "type": "string",
237
                    "pattern": "^[a-z][a-z0-9_]{1,63}$"
238
                  },
239
                  "confidence": {
240
                    "type": "number",
241
                    "minimum": 0,
242
                    "maximum": 1
243
                  },
244
                  "evidenceReferences": {
245
                    "default": [],
246
                    "maxItems": 5,
247
                    "type": "array",
248
                    "items": {
249
                      "type": "string",
250
                      "minLength": 1,
251
                      "maxLength": 2048
252
                    }
253
                  },
254
                  "limitations": {
255
                    "default": [],
256
                    "maxItems": 3,
257
                    "type": "array",
258
                    "items": {
259
                      "type": "string",
260
                      "minLength": 1,
261
                      "maxLength": 240
262
                    }
263
                  },
264
                  "responseType": {
265
                    "type": "string",
266
                    "const": "short_text"
267
                  },
268
                  "answer": {
269
                    "type": "string",
270
                    "minLength": 1,
271
                    "maxLength": 280
272
                  }
273
                },
274
                "required": [
275
                  "probeId",
276
                  "questionCode",
277
                  "confidence",
278
                  "evidenceReferences",
279
                  "limitations",
280
                  "responseType",
281
                  "answer"
282
                ],
283
                "additionalProperties": false
284
              }
285
            ]
286
          }
287
        },
288
        "respondedAt": {
289
          "type": "string",
290
          "format": "date-time",
291
          "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))$"
292
        }
293
      },
294
      "required": [
295
        "protocolVersion",
296
        "responseId",
297
        "planId",
298
        "interactionId",
299
        "contractHash",
300
        "phase",
301
        "agentId",
302
        "agentVersion",
303
        "answers",
304
        "respondedAt"
305
      ],
306
      "additionalProperties": false
307
    }
308
  },
309
  "required": [
310
    "kind",
311
    "response"
312
  ],
313
  "additionalProperties": false
314
}