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

Viewing files at commit c6b86fb80ff9Commit detailsView latest

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