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

Viewing files at commit 6b91d3cf5293Commit detailsView latest

schemas/v0.1/assurance_probe_a2a_payload.schema.json 272 lines · 8.5 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.probe"
8
    },
9
    "plan": {
10
      "type": "object",
11
      "properties": {
12
        "protocolVersion": {
13
          "type": "string",
14
          "const": "0.1"
15
        },
16
        "planId": {
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
        "interactionId": {
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
        "contractHash": {
27
          "type": "string",
28
          "minLength": 1
29
        },
30
        "phase": {
31
          "type": "string",
32
          "enum": [
33
            "pre_task",
34
            "post_task"
35
          ]
36
        },
37
        "generatedForAgentId": {
38
          "type": "string",
39
          "minLength": 1
40
        },
41
        "targetAgentId": {
42
          "type": "string",
43
          "minLength": 1
44
        },
45
        "targetAgentVersion": {
46
          "type": "string",
47
          "minLength": 1,
48
          "maxLength": 200
49
        },
50
        "round": {
51
          "type": "integer",
52
          "minimum": 1,
53
          "maximum": 3
54
        },
55
        "assessmentId": {
56
          "type": "string",
57
          "format": "uuid",
58
          "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)$"
59
        },
60
        "predictionBeforeId": {
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
        "questions": {
66
          "minItems": 1,
67
          "maxItems": 1,
68
          "type": "array",
69
          "items": {
70
            "type": "object",
71
            "properties": {
72
              "probeId": {
73
                "type": "string",
74
                "format": "uuid",
75
                "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)$"
76
              },
77
              "questionCode": {
78
                "type": "string",
79
                "pattern": "^[a-z][a-z0-9_]{1,63}$"
80
              },
81
              "prompt": {
82
                "type": "string",
83
                "minLength": 1,
84
                "maxLength": 240
85
              },
86
              "responseType": {
87
                "type": "string",
88
                "enum": [
89
                  "boolean",
90
                  "enum",
91
                  "number",
92
                  "short_text"
93
                ]
94
              },
95
              "choices": {
96
                "minItems": 2,
97
                "maxItems": 6,
98
                "type": "array",
99
                "items": {
100
                  "type": "string",
101
                  "minLength": 1,
102
                  "maxLength": 80
103
                }
104
              },
105
              "evidenceRequested": {
106
                "default": false,
107
                "type": "boolean"
108
              },
109
              "required": {
110
                "default": true,
111
                "type": "boolean"
112
              },
113
              "questionFamily": {
114
                "type": "string",
115
                "enum": [
116
                  "capability",
117
                  "scope",
118
                  "deadline",
119
                  "tool_access",
120
                  "data_access",
121
                  "evidence",
122
                  "dependency",
123
                  "authority",
124
                  "safety",
125
                  "delivery"
126
                ]
127
              },
128
              "riskHypothesis": {
129
                "type": "string",
130
                "minLength": 1,
131
                "maxLength": 280
132
              },
133
              "expectedSignals": {
134
                "minItems": 1,
135
                "maxItems": 6,
136
                "type": "array",
137
                "items": {
138
                  "type": "object",
139
                  "properties": {
140
                    "answer": {
141
                      "type": "string",
142
                      "minLength": 1,
143
                      "maxLength": 80
144
                    },
145
                    "effect": {
146
                      "type": "string",
147
                      "enum": [
148
                        "increase_success",
149
                        "reduce_success",
150
                        "neutral"
151
                      ]
152
                    },
153
                    "probabilityDelta": {
154
                      "type": "number",
155
                      "minimum": -0.5,
156
                      "maximum": 0.5
157
                    }
158
                  },
159
                  "required": [
160
                    "answer",
161
                    "effect",
162
                    "probabilityDelta"
163
                  ],
164
                  "additionalProperties": false
165
                }
166
              },
167
              "expectedInformationGain": {
168
                "type": "number",
169
                "minimum": 0,
170
                "maximum": 1
171
              },
172
              "selectionReason": {
173
                "type": "string",
174
                "minLength": 1,
175
                "maxLength": 280
176
              },
177
              "recommendedSafeguardCodes": {
178
                "default": [],
179
                "maxItems": 5,
180
                "type": "array",
181
                "items": {
182
                  "type": "string",
183
                  "pattern": "^[a-z][a-z0-9_]{1,63}$"
184
                }
185
              }
186
            },
187
            "required": [
188
              "probeId",
189
              "questionCode",
190
              "prompt",
191
              "responseType",
192
              "evidenceRequested",
193
              "required",
194
              "questionFamily",
195
              "riskHypothesis",
196
              "expectedSignals",
197
              "expectedInformationGain",
198
              "selectionReason",
199
              "recommendedSafeguardCodes"
200
            ],
201
            "additionalProperties": false
202
          }
203
        },
204
        "generation": {
205
          "type": "object",
206
          "properties": {
207
            "generationId": {
208
              "type": "string",
209
              "format": "uuid",
210
              "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)$"
211
            },
212
            "mode": {
213
              "type": "string",
214
              "enum": [
215
                "ai",
216
                "fallback"
217
              ]
218
            },
219
            "model": {
220
              "type": "string",
221
              "minLength": 1
222
            },
223
            "promptVersion": {
224
              "type": "string",
225
              "minLength": 1
226
            }
227
          },
228
          "required": [
229
            "generationId",
230
            "mode",
231
            "model",
232
            "promptVersion"
233
          ],
234
          "additionalProperties": false
235
        },
236
        "generatedAt": {
237
          "type": "string",
238
          "format": "date-time",
239
          "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))$"
240
        },
241
        "expiresAt": {
242
          "type": "string",
243
          "format": "date-time",
244
          "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))$"
245
        }
246
      },
247
      "required": [
248
        "protocolVersion",
249
        "planId",
250
        "interactionId",
251
        "contractHash",
252
        "phase",
253
        "generatedForAgentId",
254
        "targetAgentId",
255
        "targetAgentVersion",
256
        "round",
257
        "assessmentId",
258
        "predictionBeforeId",
259
        "questions",
260
        "generation",
261
        "generatedAt",
262
        "expiresAt"
263
      ],
264
      "additionalProperties": false
265
    }
266
  },
267
  "required": [
268
    "kind",
269
    "plan"
270
  ],
271
  "additionalProperties": false
272
}