@agent-receipts/schema 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,258 @@
1
+ {
2
+ "$ref": "#/definitions/ActionReceipt",
3
+ "definitions": {
4
+ "ActionReceipt": {
5
+ "type": "object",
6
+ "properties": {
7
+ "receipt_id": {
8
+ "type": "string"
9
+ },
10
+ "parent_receipt_id": {
11
+ "type": [
12
+ "string",
13
+ "null"
14
+ ]
15
+ },
16
+ "chain_id": {
17
+ "type": "string"
18
+ },
19
+ "receipt_type": {
20
+ "type": "string",
21
+ "enum": [
22
+ "action",
23
+ "verification",
24
+ "judgment",
25
+ "arbitration"
26
+ ]
27
+ },
28
+ "agent_id": {
29
+ "type": "string"
30
+ },
31
+ "org_id": {
32
+ "type": "string"
33
+ },
34
+ "action": {
35
+ "type": "string"
36
+ },
37
+ "input_hash": {
38
+ "type": "string"
39
+ },
40
+ "output_hash": {
41
+ "type": [
42
+ "string",
43
+ "null"
44
+ ]
45
+ },
46
+ "output_summary": {
47
+ "type": [
48
+ "string",
49
+ "null"
50
+ ]
51
+ },
52
+ "model": {
53
+ "type": [
54
+ "string",
55
+ "null"
56
+ ]
57
+ },
58
+ "tokens_in": {
59
+ "anyOf": [
60
+ {
61
+ "type": "integer",
62
+ "minimum": 0
63
+ },
64
+ {
65
+ "type": "null"
66
+ }
67
+ ]
68
+ },
69
+ "tokens_out": {
70
+ "anyOf": [
71
+ {
72
+ "type": "integer",
73
+ "minimum": 0
74
+ },
75
+ {
76
+ "type": "null"
77
+ }
78
+ ]
79
+ },
80
+ "cost_usd": {
81
+ "anyOf": [
82
+ {
83
+ "type": "number",
84
+ "minimum": 0
85
+ },
86
+ {
87
+ "type": "null"
88
+ }
89
+ ]
90
+ },
91
+ "latency_ms": {
92
+ "anyOf": [
93
+ {
94
+ "type": "integer",
95
+ "minimum": 0
96
+ },
97
+ {
98
+ "type": "null"
99
+ }
100
+ ]
101
+ },
102
+ "tool_calls": {
103
+ "anyOf": [
104
+ {
105
+ "type": "array",
106
+ "items": {
107
+ "type": "string"
108
+ }
109
+ },
110
+ {
111
+ "type": "null"
112
+ }
113
+ ]
114
+ },
115
+ "timestamp": {
116
+ "type": "string",
117
+ "format": "date-time"
118
+ },
119
+ "completed_at": {
120
+ "anyOf": [
121
+ {
122
+ "type": "string",
123
+ "format": "date-time"
124
+ },
125
+ {
126
+ "type": "null"
127
+ }
128
+ ]
129
+ },
130
+ "status": {
131
+ "type": "string",
132
+ "enum": [
133
+ "pending",
134
+ "completed",
135
+ "failed",
136
+ "timeout"
137
+ ]
138
+ },
139
+ "error": {
140
+ "anyOf": [
141
+ {
142
+ "type": "object",
143
+ "additionalProperties": {}
144
+ },
145
+ {
146
+ "type": "null"
147
+ }
148
+ ]
149
+ },
150
+ "environment": {
151
+ "type": "string",
152
+ "enum": [
153
+ "production",
154
+ "staging",
155
+ "test"
156
+ ]
157
+ },
158
+ "tags": {
159
+ "anyOf": [
160
+ {
161
+ "type": "array",
162
+ "items": {
163
+ "type": "string"
164
+ }
165
+ },
166
+ {
167
+ "type": "null"
168
+ }
169
+ ]
170
+ },
171
+ "constraints": {
172
+ "anyOf": [
173
+ {
174
+ "type": "object",
175
+ "additionalProperties": {}
176
+ },
177
+ {
178
+ "type": "null"
179
+ }
180
+ ]
181
+ },
182
+ "constraint_result": {
183
+ "anyOf": [
184
+ {
185
+ "type": "object",
186
+ "additionalProperties": {}
187
+ },
188
+ {
189
+ "type": "null"
190
+ }
191
+ ]
192
+ },
193
+ "signature": {
194
+ "type": "string"
195
+ },
196
+ "verify_url": {
197
+ "type": "string",
198
+ "format": "uri"
199
+ },
200
+ "callback_verified": {
201
+ "type": [
202
+ "boolean",
203
+ "null"
204
+ ]
205
+ },
206
+ "confidence": {
207
+ "anyOf": [
208
+ {
209
+ "type": "number",
210
+ "minimum": 0,
211
+ "maximum": 1
212
+ },
213
+ {
214
+ "type": "null"
215
+ }
216
+ ]
217
+ },
218
+ "metadata": {
219
+ "type": "object",
220
+ "additionalProperties": {}
221
+ }
222
+ },
223
+ "required": [
224
+ "receipt_id",
225
+ "parent_receipt_id",
226
+ "chain_id",
227
+ "receipt_type",
228
+ "agent_id",
229
+ "org_id",
230
+ "action",
231
+ "input_hash",
232
+ "output_hash",
233
+ "output_summary",
234
+ "model",
235
+ "tokens_in",
236
+ "tokens_out",
237
+ "cost_usd",
238
+ "latency_ms",
239
+ "tool_calls",
240
+ "timestamp",
241
+ "completed_at",
242
+ "status",
243
+ "error",
244
+ "environment",
245
+ "tags",
246
+ "constraints",
247
+ "constraint_result",
248
+ "signature",
249
+ "verify_url",
250
+ "callback_verified",
251
+ "confidence",
252
+ "metadata"
253
+ ],
254
+ "additionalProperties": false
255
+ }
256
+ },
257
+ "$schema": "http://json-schema.org/draft-07/schema#"
258
+ }