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

Viewing files at commit c345cf789a03Commit detailsView latest

schemas/v0.1/counterparty_brief.schema.json 254 lines · 6.2 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "briefId": {
6
      "type": "string",
7
      "format": "uuid",
8
      "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)$"
9
    },
10
    "interactionId": {
11
      "type": "string",
12
      "format": "uuid",
13
      "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)$"
14
    },
15
    "contractHash": {
16
      "type": "string",
17
      "minLength": 1
18
    },
19
    "recipientAgentId": {
20
      "type": "string",
21
      "minLength": 1
22
    },
23
    "subjectAgentId": {
24
      "type": "string",
25
      "minLength": 1
26
    },
27
    "taskCategory": {
28
      "type": "string",
29
      "minLength": 1
30
    },
31
    "decision": {
32
      "type": "string",
33
      "enum": [
34
        "ALLOW",
35
        "CHALLENGE",
36
        "DENY"
37
      ]
38
    },
39
    "requirements": {
40
      "maxItems": 100,
41
      "type": "array",
42
      "items": {
43
        "type": "object",
44
        "properties": {
45
          "requirementId": {
46
            "type": "string",
47
            "minLength": 1,
48
            "maxLength": 128
49
          },
50
          "requirement": {
51
            "type": "string",
52
            "minLength": 1,
53
            "maxLength": 1000
54
          },
55
          "kind": {
56
            "type": "string",
57
            "enum": [
58
              "capability",
59
              "limitation",
60
              "success_criterion",
61
              "deadline",
62
              "evidence",
63
              "scope",
64
              "data",
65
              "communication",
66
              "delegation"
67
            ]
68
          },
69
          "status": {
70
            "type": "string",
71
            "enum": [
72
              "match",
73
              "partial",
74
              "mismatch",
75
              "unknown"
76
            ]
77
          },
78
          "reason": {
79
            "type": "string",
80
            "minLength": 1,
81
            "maxLength": 1000
82
          },
83
          "confidence": {
84
            "type": "number",
85
            "minimum": 0,
86
            "maximum": 1
87
          },
88
          "sources": {
89
            "minItems": 1,
90
            "type": "array",
91
            "items": {
92
              "type": "string",
93
              "enum": [
94
                "contract",
95
                "self_declared",
96
                "eligible_history",
97
                "evidence",
98
                "version_change"
99
              ]
100
            }
101
          },
102
          "evidenceReferences": {
103
            "default": [],
104
            "maxItems": 50,
105
            "type": "array",
106
            "items": {
107
              "type": "string",
108
              "minLength": 1,
109
              "maxLength": 2048
110
            }
111
          }
112
        },
113
        "required": [
114
          "requirementId",
115
          "requirement",
116
          "kind",
117
          "status",
118
          "reason",
119
          "confidence",
120
          "sources",
121
          "evidenceReferences"
122
        ],
123
        "additionalProperties": false
124
      }
125
    },
126
    "insights": {
127
      "maxItems": 100,
128
      "type": "array",
129
      "items": {
130
        "type": "object",
131
        "properties": {
132
          "code": {
133
            "type": "string",
134
            "minLength": 1
135
          },
136
          "severity": {
137
            "type": "string",
138
            "enum": [
139
              "info",
140
              "caution",
141
              "high"
142
            ]
143
          },
144
          "message": {
145
            "type": "string",
146
            "minLength": 1
147
          },
148
          "evidenceReferences": {
149
            "default": [],
150
            "type": "array",
151
            "items": {
152
              "type": "string"
153
            }
154
          },
155
          "requirementReferences": {
156
            "default": [],
157
            "type": "array",
158
            "items": {
159
              "type": "string"
160
            }
161
          },
162
          "confidence": {
163
            "type": "number",
164
            "minimum": 0,
165
            "maximum": 1
166
          }
167
        },
168
        "required": [
169
          "code",
170
          "severity",
171
          "message",
172
          "evidenceReferences",
173
          "requirementReferences"
174
        ],
175
        "additionalProperties": false
176
      }
177
    },
178
    "relevantSampleSize": {
179
      "type": "integer",
180
      "minimum": 0,
181
      "maximum": 9007199254740991
182
    },
183
    "historyConfidence": {
184
      "type": "number",
185
      "minimum": 0,
186
      "maximum": 1
187
    },
188
    "subjectAgentVersion": {
189
      "type": "string",
190
      "minLength": 1
191
    },
192
    "recommendedContractChanges": {
193
      "default": [],
194
      "maxItems": 50,
195
      "type": "array",
196
      "items": {
197
        "type": "string",
198
        "minLength": 1,
199
        "maxLength": 1000
200
      }
201
    },
202
    "generatedAt": {
203
      "type": "string",
204
      "format": "date-time",
205
      "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))$"
206
    },
207
    "expiresAt": {
208
      "type": "string",
209
      "format": "date-time",
210
      "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))$"
211
    },
212
    "signature": {
213
      "type": "object",
214
      "properties": {
215
        "algorithm": {
216
          "type": "string",
217
          "const": "Ed25519"
218
        },
219
        "keyId": {
220
          "type": "string",
221
          "minLength": 1
222
        },
223
        "value": {
224
          "type": "string",
225
          "minLength": 1
226
        }
227
      },
228
      "required": [
229
        "algorithm",
230
        "keyId",
231
        "value"
232
      ],
233
      "additionalProperties": false
234
    }
235
  },
236
  "required": [
237
    "briefId",
238
    "interactionId",
239
    "contractHash",
240
    "recipientAgentId",
241
    "subjectAgentId",
242
    "taskCategory",
243
    "decision",
244
    "requirements",
245
    "insights",
246
    "relevantSampleSize",
247
    "historyConfidence",
248
    "subjectAgentVersion",
249
    "recommendedContractChanges",
250
    "generatedAt",
251
    "expiresAt"
252
  ],
253
  "additionalProperties": false
254
}