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

Viewing files at commit b506ef3834f7Commit detailsView latest

schemas/v0.1/federated_interaction.schema.json 316 lines · 9.0 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
    "interactionId": {
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
    "initiatorAgentId": {
15
      "type": "string",
16
      "minLength": 1
17
    },
18
    "responderAgentId": {
19
      "type": "string",
20
      "minLength": 1
21
    },
22
    "status": {
23
      "type": "string",
24
      "enum": ["pending", "active", "rejected", "expired", "cancelled", "completed"]
25
    },
26
    "contract": {
27
      "type": "object",
28
      "properties": {
29
        "protocolVersion": {
30
          "type": "string",
31
          "const": "0.1"
32
        },
33
        "interactionId": {
34
          "type": "string",
35
          "format": "uuid",
36
          "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)$"
37
        },
38
        "purpose": {
39
          "type": "string"
40
        },
41
        "parties": {
42
          "minItems": 1,
43
          "type": "array",
44
          "items": {
45
            "type": "string"
46
          }
47
        },
48
        "taskCategory": {
49
          "type": "string"
50
        },
51
        "requestedOutcome": {
52
          "type": "string"
53
        },
54
        "successCriteria": {
55
          "type": "array",
56
          "items": {
57
            "type": "string"
58
          }
59
        },
60
        "allowedActions": {
61
          "type": "array",
62
          "items": {
63
            "type": "string"
64
          }
65
        },
66
        "prohibitedActions": {
67
          "type": "array",
68
          "items": {
69
            "type": "string"
70
          }
71
        },
72
        "allowedData": {
73
          "type": "array",
74
          "items": {
75
            "type": "string"
76
          }
77
        },
78
        "prohibitedData": {
79
          "type": "array",
80
          "items": {
81
            "type": "string"
82
          }
83
        },
84
        "deadline": {
85
          "type": "string",
86
          "format": "date-time",
87
          "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))$"
88
        },
89
        "evidenceRequirements": {
90
          "type": "array",
91
          "items": {
92
            "type": "string"
93
          }
94
        },
95
        "delegationRules": {
96
          "type": "array",
97
          "items": {
98
            "type": "string"
99
          }
100
        },
101
        "humanApprovalRequirements": {
102
          "type": "array",
103
          "items": {
104
            "type": "string"
105
          }
106
        },
107
        "factCheckingPolicy": {
108
          "type": "string"
109
        },
110
        "mediationPolicy": {
111
          "type": "string",
112
          "enum": ["none", "mutual_consent"]
113
        },
114
        "retentionDays": {
115
          "type": "integer",
116
          "minimum": 0,
117
          "maximum": 9007199254740991
118
        },
119
        "completionConditions": {
120
          "type": "array",
121
          "items": {
122
            "type": "string"
123
          }
124
        },
125
        "cancellationConditions": {
126
          "type": "array",
127
          "items": {
128
            "type": "string"
129
          }
130
        },
131
        "signatures": {
132
          "default": {},
133
          "type": "object",
134
          "propertyNames": {
135
            "type": "string"
136
          },
137
          "additionalProperties": {
138
            "type": "object",
139
            "properties": {
140
              "algorithm": {
141
                "type": "string",
142
                "const": "Ed25519"
143
              },
144
              "keyId": {
145
                "type": "string",
146
                "minLength": 1
147
              },
148
              "value": {
149
                "type": "string",
150
                "minLength": 1
151
              }
152
            },
153
            "required": ["algorithm", "keyId", "value"],
154
            "additionalProperties": false
155
          }
156
        }
157
      },
158
      "required": [
159
        "protocolVersion",
160
        "interactionId",
161
        "purpose",
162
        "parties",
163
        "taskCategory",
164
        "requestedOutcome",
165
        "successCriteria",
166
        "allowedActions",
167
        "prohibitedActions",
168
        "allowedData",
169
        "prohibitedData",
170
        "evidenceRequirements",
171
        "delegationRules",
172
        "humanApprovalRequirements",
173
        "factCheckingPolicy",
174
        "mediationPolicy",
175
        "retentionDays",
176
        "completionConditions",
177
        "cancellationConditions",
178
        "signatures"
179
      ],
180
      "additionalProperties": false
181
    },
182
    "termsHash": {
183
      "type": "string",
184
      "minLength": 1
185
    },
186
    "acceptances": {
187
      "type": "object",
188
      "propertyNames": {
189
        "type": "string"
190
      },
191
      "additionalProperties": {
192
        "type": "object",
193
        "properties": {
194
          "agentId": {
195
            "type": "string",
196
            "minLength": 1
197
          },
198
          "method": {
199
            "type": "string",
200
            "enum": ["oauth_installation", "oauth_account", "policy_auto_accept", "ed25519"]
201
          },
202
          "termsHash": {
203
            "type": "string",
204
            "minLength": 1
205
          },
206
          "acceptedAt": {
207
            "type": "string",
208
            "format": "date-time",
209
            "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))$"
210
          },
211
          "signature": {
212
            "type": "object",
213
            "properties": {
214
              "algorithm": {
215
                "type": "string",
216
                "const": "Ed25519"
217
              },
218
              "keyId": {
219
                "type": "string",
220
                "minLength": 1
221
              },
222
              "value": {
223
                "type": "string",
224
                "minLength": 1
225
              }
226
            },
227
            "required": ["algorithm", "keyId", "value"],
228
            "additionalProperties": false
229
          }
230
        },
231
        "required": ["agentId", "method", "termsHash", "acceptedAt"],
232
        "additionalProperties": false
233
      }
234
    },
235
    "initiatorTransport": {
236
      "type": "object",
237
      "properties": {
238
        "protocol": {
239
          "type": "string",
240
          "const": "A2A/1.0"
241
        },
242
        "protocolBinding": {
243
          "default": "JSONRPC",
244
          "type": "string",
245
          "minLength": 1
246
        },
247
        "endpoint": {
248
          "type": "string",
249
          "format": "uri"
250
        },
251
        "managedBy": {
252
          "default": "openclasp",
253
          "type": "string",
254
          "const": "openclasp"
255
        }
256
      },
257
      "required": ["protocol", "protocolBinding", "endpoint", "managedBy"],
258
      "additionalProperties": false
259
    },
260
    "responderTransport": {
261
      "type": "object",
262
      "properties": {
263
        "protocol": {
264
          "type": "string",
265
          "const": "A2A/1.0"
266
        },
267
        "protocolBinding": {
268
          "default": "JSONRPC",
269
          "type": "string",
270
          "minLength": 1
271
        },
272
        "endpoint": {
273
          "type": "string",
274
          "format": "uri"
275
        },
276
        "managedBy": {
277
          "default": "openclasp",
278
          "type": "string",
279
          "const": "openclasp"
280
        }
281
      },
282
      "required": ["protocol", "protocolBinding", "endpoint", "managedBy"],
283
      "additionalProperties": false
284
    },
285
    "createdAt": {
286
      "type": "string",
287
      "format": "date-time",
288
      "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))$"
289
    },
290
    "updatedAt": {
291
      "type": "string",
292
      "format": "date-time",
293
      "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))$"
294
    },
295
    "expiresAt": {
296
      "type": "string",
297
      "format": "date-time",
298
      "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))$"
299
    }
300
  },
301
  "required": [
302
    "protocolVersion",
303
    "interactionId",
304
    "initiatorAgentId",
305
    "responderAgentId",
306
    "status",
307
    "contract",
308
    "termsHash",
309
    "acceptances",
310
    "responderTransport",
311
    "createdAt",
312
    "updatedAt",
313
    "expiresAt"
314
  ],
315
  "additionalProperties": false
316
}