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

Viewing files at commit 9df2394381e9Commit detailsView latest

schemas/v0.1/live_session_event.schema.json 204 lines · 4.9 KB · json
1
{
2
  "$schema": "https://json-schema.org/draft/2020-12/schema",
3
  "type": "object",
4
  "properties": {
5
    "eventId": {
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
    "agentId": {
16
      "type": "string",
17
      "minLength": 1
18
    },
19
    "sequence": {
20
      "type": "integer",
21
      "minimum": 0,
22
      "maximum": 9007199254740991
23
    },
24
    "type": {
25
      "type": "string",
26
      "enum": [
27
        "session_started",
28
        "message_sent",
29
        "progress_checkpoint",
30
        "claim",
31
        "evidence",
32
        "correction",
33
        "constraint",
34
        "task_result",
35
        "session_completed",
36
        "session_failed"
37
      ]
38
    },
39
    "occurredAt": {
40
      "type": "string",
41
      "format": "date-time",
42
      "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))$"
43
    },
44
    "messageHash": {
45
      "type": "string",
46
      "pattern": "^[a-zA-Z0-9_-]{43}$"
47
    },
48
    "evidenceReferences": {
49
      "default": [],
50
      "type": "array",
51
      "items": {
52
        "type": "string"
53
      }
54
    },
55
    "outcome": {
56
      "type": "string",
57
      "enum": [
58
        "success",
59
        "failure",
60
        "partial"
61
      ]
62
    },
63
    "checkpoint": {
64
      "type": "object",
65
      "properties": {
66
        "state": {
67
          "type": "string",
68
          "enum": [
69
            "active",
70
            "blocked",
71
            "ready_to_finalize",
72
            "done",
73
            "cancelled"
74
          ]
75
        },
76
        "progress": {
77
          "type": "number",
78
          "minimum": 0,
79
          "maximum": 1
80
        },
81
        "criteriaMet": {
82
          "default": [],
83
          "maxItems": 100,
84
          "type": "array",
85
          "items": {
86
            "type": "string",
87
            "minLength": 1,
88
            "maxLength": 1000
89
          }
90
        },
91
        "criteriaRemaining": {
92
          "default": [],
93
          "maxItems": 100,
94
          "type": "array",
95
          "items": {
96
            "type": "string",
97
            "minLength": 1,
98
            "maxLength": 1000
99
          }
100
        },
101
        "blockerCodes": {
102
          "default": [],
103
          "maxItems": 32,
104
          "type": "array",
105
          "items": {
106
            "type": "string",
107
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
108
          }
109
        },
110
        "topicStatus": {
111
          "type": "string",
112
          "enum": [
113
            "in_scope",
114
            "drifting",
115
            "changed"
116
          ]
117
        },
118
        "expectedRemainingTurns": {
119
          "type": "integer",
120
          "minimum": 0,
121
          "maximum": 1000
122
        },
123
        "needsHuman": {
124
          "default": false,
125
          "type": "boolean"
126
        },
127
        "confidence": {
128
          "type": "number",
129
          "minimum": 0,
130
          "maximum": 1
131
        }
132
      },
133
      "required": [
134
        "state",
135
        "progress",
136
        "criteriaMet",
137
        "criteriaRemaining",
138
        "blockerCodes",
139
        "topicStatus",
140
        "needsHuman",
141
        "confidence"
142
      ],
143
      "additionalProperties": false
144
    },
145
    "details": {
146
      "default": {
147
        "labels": [],
148
        "metrics": {},
149
        "flags": {}
150
      },
151
      "type": "object",
152
      "properties": {
153
        "labels": {
154
          "default": [],
155
          "maxItems": 32,
156
          "type": "array",
157
          "items": {
158
            "type": "string",
159
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
160
          }
161
        },
162
        "metrics": {
163
          "default": {},
164
          "type": "object",
165
          "propertyNames": {
166
            "type": "string",
167
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
168
          },
169
          "additionalProperties": {
170
            "type": "number"
171
          }
172
        },
173
        "flags": {
174
          "default": {},
175
          "type": "object",
176
          "propertyNames": {
177
            "type": "string",
178
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
179
          },
180
          "additionalProperties": {
181
            "type": "boolean"
182
          }
183
        }
184
      },
185
      "required": [
186
        "labels",
187
        "metrics",
188
        "flags"
189
      ],
190
      "additionalProperties": false
191
    }
192
  },
193
  "required": [
194
    "eventId",
195
    "interactionId",
196
    "agentId",
197
    "sequence",
198
    "type",
199
    "occurredAt",
200
    "evidenceReferences",
201
    "details"
202
  ],
203
  "additionalProperties": false
204
}