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

Viewing files at commit 6df07fcdd05cCommit detailsView latest

schemas/v0.1/shield_consultation.schema.json 309 lines · 7.8 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "protocolVersion": {
6
      "type": "string",
7
      "const": "0.1"
8
    },
9
    "consultationId": {
10
      "type": "string",
11
      "format": "uuid",
12
      "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)$"
13
    },
14
    "caseId": {
15
      "type": "string",
16
      "format": "uuid",
17
      "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)$"
18
    },
19
    "agentId": {
20
      "type": "string",
21
      "minLength": 1
22
    },
23
    "inputDigest": {
24
      "type": "string",
25
      "pattern": "^[a-zA-Z0-9_-]{43}$"
26
    },
27
    "analysis": {
28
      "type": "object",
29
      "properties": {
30
        "reply": {
31
          "type": "string",
32
          "minLength": 1,
33
          "maxLength": 5000
34
        },
35
        "situationSummary": {
36
          "type": "string",
37
          "minLength": 1,
38
          "maxLength": 2000
39
        },
40
        "disposition": {
41
          "type": "string",
42
          "enum": [
43
            "proceed",
44
            "proceed_with_caution",
45
            "gather_evidence",
46
            "modify_plan",
47
            "seek_approval",
48
            "do_not_proceed"
49
          ]
50
        },
51
        "riskTier": {
52
          "type": "string",
53
          "enum": [
54
            "low",
55
            "medium",
56
            "high",
57
            "critical"
58
          ]
59
        },
60
        "confidence": {
61
          "type": "number",
62
          "minimum": 0,
63
          "maximum": 1
64
        },
65
        "rationale": {
66
          "minItems": 1,
67
          "maxItems": 12,
68
          "type": "array",
69
          "items": {
70
            "type": "string",
71
            "minLength": 1,
72
            "maxLength": 1000
73
          }
74
        },
75
        "claims": {
76
          "maxItems": 20,
77
          "type": "array",
78
          "items": {
79
            "type": "object",
80
            "properties": {
81
              "claim": {
82
                "type": "string",
83
                "minLength": 1,
84
                "maxLength": 1000
85
              },
86
              "status": {
87
                "type": "string",
88
                "enum": [
89
                  "verified",
90
                  "supported",
91
                  "unverified",
92
                  "contradicted",
93
                  "not_checkable"
94
                ]
95
              },
96
              "significance": {
97
                "type": "string",
98
                "enum": [
99
                  "low",
100
                  "medium",
101
                  "high",
102
                  "critical"
103
                ]
104
              },
105
              "evidenceReferences": {
106
                "maxItems": 20,
107
                "type": "array",
108
                "items": {
109
                  "type": "string",
110
                  "minLength": 1,
111
                  "maxLength": 200
112
                }
113
              },
114
              "explanation": {
115
                "type": "string",
116
                "minLength": 1,
117
                "maxLength": 1000
118
              }
119
            },
120
            "required": [
121
              "claim",
122
              "status",
123
              "significance",
124
              "evidenceReferences",
125
              "explanation"
126
            ],
127
            "additionalProperties": false
128
          }
129
        },
130
        "manipulationSignals": {
131
          "maxItems": 12,
132
          "type": "array",
133
          "items": {
134
            "type": "object",
135
            "properties": {
136
              "tactic": {
137
                "type": "string",
138
                "enum": [
139
                  "urgency",
140
                  "authority_claim",
141
                  "emotional_pressure",
142
                  "reciprocity",
143
                  "scarcity",
144
                  "policy_bypass",
145
                  "identity_deception",
146
                  "scope_expansion",
147
                  "data_extraction",
148
                  "inconsistent_claims",
149
                  "none",
150
                  "other"
151
                ]
152
              },
153
              "observation": {
154
                "type": "string",
155
                "minLength": 1,
156
                "maxLength": 1000
157
              },
158
              "confidence": {
159
                "type": "number",
160
                "minimum": 0,
161
                "maximum": 1
162
              },
163
              "significance": {
164
                "type": "string",
165
                "enum": [
166
                  "low",
167
                  "medium",
168
                  "high",
169
                  "critical"
170
                ]
171
              }
172
            },
173
            "required": [
174
              "tactic",
175
              "observation",
176
              "confidence",
177
              "significance"
178
            ],
179
            "additionalProperties": false
180
          }
181
        },
182
        "missingEvidence": {
183
          "maxItems": 12,
184
          "type": "array",
185
          "items": {
186
            "type": "string",
187
            "minLength": 1,
188
            "maxLength": 500
189
          }
190
        },
191
        "questionsToAsk": {
192
          "maxItems": 12,
193
          "type": "array",
194
          "items": {
195
            "type": "string",
196
            "minLength": 1,
197
            "maxLength": 500
198
          }
199
        },
200
        "nextSteps": {
201
          "minItems": 1,
202
          "maxItems": 12,
203
          "type": "array",
204
          "items": {
205
            "type": "string",
206
            "minLength": 1,
207
            "maxLength": 500
208
          }
209
        },
210
        "safeguards": {
211
          "maxItems": 12,
212
          "type": "array",
213
          "items": {
214
            "type": "string",
215
            "minLength": 1,
216
            "maxLength": 500
217
          }
218
        },
219
        "suggestedResponse": {
220
          "type": "string",
221
          "minLength": 1,
222
          "maxLength": 3000
223
        }
224
      },
225
      "required": [
226
        "reply",
227
        "situationSummary",
228
        "disposition",
229
        "riskTier",
230
        "confidence",
231
        "rationale",
232
        "claims",
233
        "manipulationSignals",
234
        "missingEvidence",
235
        "questionsToAsk",
236
        "nextSteps",
237
        "safeguards"
238
      ],
239
      "additionalProperties": false
240
    },
241
    "generation": {
242
      "type": "object",
243
      "properties": {
244
        "mode": {
245
          "type": "string",
246
          "enum": [
247
            "ai",
248
            "fallback"
249
          ]
250
        },
251
        "model": {
252
          "type": "string",
253
          "minLength": 1
254
        },
255
        "promptVersion": {
256
          "type": "string",
257
          "minLength": 1
258
        },
259
        "tokenUsage": {
260
          "type": "object",
261
          "properties": {
262
            "inputTokens": {
263
              "type": "integer",
264
              "minimum": 0,
265
              "maximum": 9007199254740991
266
            },
267
            "outputTokens": {
268
              "type": "integer",
269
              "minimum": 0,
270
              "maximum": 9007199254740991
271
            },
272
            "totalTokens": {
273
              "type": "integer",
274
              "minimum": 0,
275
              "maximum": 9007199254740991
276
            }
277
          },
278
          "additionalProperties": false
279
        },
280
        "errorCode": {
281
          "type": "string",
282
          "maxLength": 100
283
        }
284
      },
285
      "required": [
286
        "mode",
287
        "model",
288
        "promptVersion"
289
      ],
290
      "additionalProperties": false
291
    },
292
    "createdAt": {
293
      "type": "string",
294
      "format": "date-time",
295
      "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))$"
296
    }
297
  },
298
  "required": [
299
    "protocolVersion",
300
    "consultationId",
301
    "caseId",
302
    "agentId",
303
    "inputDigest",
304
    "analysis",
305
    "generation",
306
    "createdAt"
307
  ],
308
  "additionalProperties": false
309
}