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

Viewing files at commit 160755529234Commit detailsView latest

schemas/v0.1/live_session_event.schema.json 186 lines · 4.7 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": ["success", "failure", "partial"]
58
    },
59
    "checkpoint": {
60
      "type": "object",
61
      "properties": {
62
        "state": {
63
          "type": "string",
64
          "enum": ["active", "blocked", "ready_to_finalize", "done", "cancelled"]
65
        },
66
        "progress": {
67
          "type": "number",
68
          "minimum": 0,
69
          "maximum": 1
70
        },
71
        "criteriaMet": {
72
          "default": [],
73
          "maxItems": 100,
74
          "type": "array",
75
          "items": {
76
            "type": "string",
77
            "minLength": 1,
78
            "maxLength": 1000
79
          }
80
        },
81
        "criteriaRemaining": {
82
          "default": [],
83
          "maxItems": 100,
84
          "type": "array",
85
          "items": {
86
            "type": "string",
87
            "minLength": 1,
88
            "maxLength": 1000
89
          }
90
        },
91
        "blockerCodes": {
92
          "default": [],
93
          "maxItems": 32,
94
          "type": "array",
95
          "items": {
96
            "type": "string",
97
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
98
          }
99
        },
100
        "topicStatus": {
101
          "type": "string",
102
          "enum": ["in_scope", "drifting", "changed"]
103
        },
104
        "expectedRemainingTurns": {
105
          "type": "integer",
106
          "minimum": 0,
107
          "maximum": 1000
108
        },
109
        "needsHuman": {
110
          "default": false,
111
          "type": "boolean"
112
        },
113
        "confidence": {
114
          "type": "number",
115
          "minimum": 0,
116
          "maximum": 1
117
        }
118
      },
119
      "required": [
120
        "state",
121
        "progress",
122
        "criteriaMet",
123
        "criteriaRemaining",
124
        "blockerCodes",
125
        "topicStatus",
126
        "needsHuman",
127
        "confidence"
128
      ],
129
      "additionalProperties": false
130
    },
131
    "details": {
132
      "default": {
133
        "labels": [],
134
        "metrics": {},
135
        "flags": {}
136
      },
137
      "type": "object",
138
      "properties": {
139
        "labels": {
140
          "default": [],
141
          "maxItems": 32,
142
          "type": "array",
143
          "items": {
144
            "type": "string",
145
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
146
          }
147
        },
148
        "metrics": {
149
          "default": {},
150
          "type": "object",
151
          "propertyNames": {
152
            "type": "string",
153
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
154
          },
155
          "additionalProperties": {
156
            "type": "number"
157
          }
158
        },
159
        "flags": {
160
          "default": {},
161
          "type": "object",
162
          "propertyNames": {
163
            "type": "string",
164
            "pattern": "^[a-zA-Z0-9][a-zA-Z0-9_.:-]{0,63}$"
165
          },
166
          "additionalProperties": {
167
            "type": "boolean"
168
          }
169
        }
170
      },
171
      "required": ["labels", "metrics", "flags"],
172
      "additionalProperties": false
173
    }
174
  },
175
  "required": [
176
    "eventId",
177
    "interactionId",
178
    "agentId",
179
    "sequence",
180
    "type",
181
    "occurredAt",
182
    "evidenceReferences",
183
    "details"
184
  ],
185
  "additionalProperties": false
186
}