@techis/ai-contracts 0.3.0-rc.17 → 0.4.0-rc.4

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.
Files changed (236) hide show
  1. package/README.md +41 -17
  2. package/THIRD_PARTY_NOTICES +34 -34
  3. package/dist/adoption-common.d.ts +19 -0
  4. package/dist/adoption-common.d.ts.map +1 -0
  5. package/dist/adoption-common.js +27 -0
  6. package/dist/adoption-common.js.map +1 -0
  7. package/dist/application-execution-review.d.ts +34 -0
  8. package/dist/application-execution-review.d.ts.map +1 -0
  9. package/dist/application-execution-review.js +25 -0
  10. package/dist/application-execution-review.js.map +1 -0
  11. package/dist/application-route-adoption.d.ts +30 -0
  12. package/dist/application-route-adoption.d.ts.map +1 -0
  13. package/dist/application-route-adoption.js +21 -0
  14. package/dist/application-route-adoption.js.map +1 -0
  15. package/dist/catalog-delivery.d.ts +5 -0
  16. package/dist/catalog-delivery.d.ts.map +1 -1
  17. package/dist/catalog-delivery.js +24 -8
  18. package/dist/catalog-delivery.js.map +1 -1
  19. package/dist/catalog-package-data.d.ts.map +1 -1
  20. package/dist/catalog-package-data.js +37608 -7
  21. package/dist/catalog-package-data.js.map +1 -1
  22. package/dist/catalog-publication.d.ts +64 -0
  23. package/dist/catalog-publication.d.ts.map +1 -0
  24. package/dist/catalog-publication.js +113 -0
  25. package/dist/catalog-publication.js.map +1 -0
  26. package/dist/compatibility.d.ts +5 -2
  27. package/dist/compatibility.d.ts.map +1 -1
  28. package/dist/compatibility.js +42 -21
  29. package/dist/compatibility.js.map +1 -1
  30. package/dist/configuration-bundle.d.ts +7 -0
  31. package/dist/configuration-bundle.d.ts.map +1 -1
  32. package/dist/configuration-bundle.js +61 -16
  33. package/dist/configuration-bundle.js.map +1 -1
  34. package/dist/direct-model-receipt.d.ts +29 -0
  35. package/dist/direct-model-receipt.d.ts.map +1 -0
  36. package/dist/direct-model-receipt.js +21 -0
  37. package/dist/direct-model-receipt.js.map +1 -0
  38. package/dist/entities.d.ts +53 -19
  39. package/dist/entities.d.ts.map +1 -1
  40. package/dist/execution-provenance.d.ts +14 -0
  41. package/dist/execution-provenance.d.ts.map +1 -0
  42. package/dist/execution-provenance.js +15 -0
  43. package/dist/execution-provenance.js.map +1 -0
  44. package/dist/generation.d.ts +184 -0
  45. package/dist/generation.d.ts.map +1 -0
  46. package/dist/generation.js +2 -0
  47. package/dist/generation.js.map +1 -0
  48. package/dist/independent-validation.d.ts +8 -0
  49. package/dist/independent-validation.d.ts.map +1 -0
  50. package/dist/independent-validation.js +42 -0
  51. package/dist/independent-validation.js.map +1 -0
  52. package/dist/index.d.ts +24 -3
  53. package/dist/index.d.ts.map +1 -1
  54. package/dist/index.js +24 -3
  55. package/dist/index.js.map +1 -1
  56. package/dist/model-configuration.d.ts +79 -0
  57. package/dist/model-configuration.d.ts.map +1 -0
  58. package/dist/model-configuration.js +172 -0
  59. package/dist/model-configuration.js.map +1 -0
  60. package/dist/model-maintenance.d.ts.map +1 -1
  61. package/dist/model-maintenance.js +7 -6
  62. package/dist/model-maintenance.js.map +1 -1
  63. package/dist/model-package-data.d.ts.map +1 -1
  64. package/dist/model-package-data.js +5 -1
  65. package/dist/model-package-data.js.map +1 -1
  66. package/dist/model-receipt.d.ts +14 -0
  67. package/dist/model-receipt.d.ts.map +1 -0
  68. package/dist/model-receipt.js +16 -0
  69. package/dist/model-receipt.js.map +1 -0
  70. package/dist/model-resources.d.ts +206 -0
  71. package/dist/model-resources.d.ts.map +1 -0
  72. package/dist/model-resources.js +154 -0
  73. package/dist/model-resources.js.map +1 -0
  74. package/dist/named-configuration.d.ts +113 -0
  75. package/dist/named-configuration.d.ts.map +1 -0
  76. package/dist/named-configuration.js +226 -0
  77. package/dist/named-configuration.js.map +1 -0
  78. package/dist/native-receipt.d.ts +13 -0
  79. package/dist/native-receipt.d.ts.map +1 -0
  80. package/dist/native-receipt.js +7 -0
  81. package/dist/native-receipt.js.map +1 -0
  82. package/dist/profile-identity.js +2 -2
  83. package/dist/profile-identity.js.map +1 -1
  84. package/dist/profile-receipt.d.ts +8 -0
  85. package/dist/profile-receipt.d.ts.map +1 -0
  86. package/dist/profile-receipt.js +14 -0
  87. package/dist/profile-receipt.js.map +1 -0
  88. package/dist/provider-listings.d.ts +3 -3
  89. package/dist/provider-listings.d.ts.map +1 -1
  90. package/dist/provider-listings.js +46 -12
  91. package/dist/provider-listings.js.map +1 -1
  92. package/dist/reasoning-validation.d.ts +3 -1
  93. package/dist/reasoning-validation.d.ts.map +1 -1
  94. package/dist/reasoning-validation.js +34 -14
  95. package/dist/reasoning-validation.js.map +1 -1
  96. package/dist/reasoning.d.ts.map +1 -1
  97. package/dist/reasoning.js +18 -8
  98. package/dist/reasoning.js.map +1 -1
  99. package/dist/request-route.d.ts +34 -0
  100. package/dist/request-route.d.ts.map +1 -0
  101. package/dist/request-route.js +42 -0
  102. package/dist/request-route.js.map +1 -0
  103. package/dist/route-assessment.d.ts +34 -0
  104. package/dist/route-assessment.d.ts.map +1 -0
  105. package/dist/route-assessment.js +48 -0
  106. package/dist/route-assessment.js.map +1 -0
  107. package/dist/route-export.d.ts +20 -0
  108. package/dist/route-export.d.ts.map +1 -0
  109. package/dist/route-export.js +54 -0
  110. package/dist/route-export.js.map +1 -0
  111. package/dist/route-helpers.d.ts +51 -0
  112. package/dist/route-helpers.d.ts.map +1 -0
  113. package/dist/route-helpers.js +31 -0
  114. package/dist/route-helpers.js.map +1 -0
  115. package/dist/route-import.d.ts +98 -0
  116. package/dist/route-import.d.ts.map +1 -0
  117. package/dist/route-import.js +124 -0
  118. package/dist/route-import.js.map +1 -0
  119. package/dist/route-receipt.d.ts +46 -0
  120. package/dist/route-receipt.d.ts.map +1 -0
  121. package/dist/route-receipt.js +95 -0
  122. package/dist/route-receipt.js.map +1 -0
  123. package/dist/route-set-export.d.ts +4 -0
  124. package/dist/route-set-export.d.ts.map +1 -0
  125. package/dist/route-set-export.js +31 -0
  126. package/dist/route-set-export.js.map +1 -0
  127. package/dist/route-set.d.ts +61 -0
  128. package/dist/route-set.d.ts.map +1 -0
  129. package/dist/route-set.js +103 -0
  130. package/dist/route-set.js.map +1 -0
  131. package/dist/route-usage.d.ts +36 -0
  132. package/dist/route-usage.d.ts.map +1 -0
  133. package/dist/route-usage.js +62 -0
  134. package/dist/route-usage.js.map +1 -0
  135. package/dist/schemas/adoption.d.ts +95 -0
  136. package/dist/schemas/adoption.d.ts.map +1 -0
  137. package/dist/schemas/adoption.js +73 -0
  138. package/dist/schemas/adoption.js.map +1 -0
  139. package/dist/schemas/application-execution-review.schema.json +416 -0
  140. package/dist/schemas/application-route-adoption.schema.json +224 -0
  141. package/dist/schemas/catalog-release.schema.json +17 -0
  142. package/dist/schemas/config.d.ts +273 -1
  143. package/dist/schemas/config.d.ts.map +1 -1
  144. package/dist/schemas/config.js +22 -3
  145. package/dist/schemas/config.js.map +1 -1
  146. package/dist/schemas/core.d.ts +369 -0
  147. package/dist/schemas/core.d.ts.map +1 -1
  148. package/dist/schemas/core.js +11 -1
  149. package/dist/schemas/core.js.map +1 -1
  150. package/dist/schemas/direct-model-execution-receipt.schema.json +864 -0
  151. package/dist/schemas/direct-model-receipt.d.ts +270 -0
  152. package/dist/schemas/direct-model-receipt.d.ts.map +1 -0
  153. package/dist/schemas/direct-model-receipt.js +13 -0
  154. package/dist/schemas/direct-model-receipt.js.map +1 -0
  155. package/dist/schemas/execution-receipt.schema.json +483 -3
  156. package/dist/schemas/execution-requirements.schema.json +47 -0
  157. package/dist/schemas/generation.d.ts +117 -0
  158. package/dist/schemas/generation.d.ts.map +1 -0
  159. package/dist/schemas/generation.js +44 -0
  160. package/dist/schemas/generation.js.map +1 -0
  161. package/dist/schemas/independent.d.ts +50 -0
  162. package/dist/schemas/independent.d.ts.map +1 -0
  163. package/dist/schemas/independent.js +85 -0
  164. package/dist/schemas/independent.js.map +1 -0
  165. package/dist/schemas/index.d.ts +4 -1
  166. package/dist/schemas/index.d.ts.map +1 -1
  167. package/dist/schemas/index.js +15 -1
  168. package/dist/schemas/index.js.map +1 -1
  169. package/dist/schemas/model-configuration-content.schema.json +92 -0
  170. package/dist/schemas/model-configuration-request.schema.json +53 -0
  171. package/dist/schemas/model-configuration-revision.schema.json +151 -0
  172. package/dist/schemas/model-configuration-snapshot.schema.json +381 -0
  173. package/dist/schemas/model-configuration.schema.json +72 -0
  174. package/dist/schemas/model-definition.schema.json +191 -0
  175. package/dist/schemas/model-execution-receipt.schema.json +889 -0
  176. package/dist/schemas/model-receipt.d.ts +598 -0
  177. package/dist/schemas/model-receipt.d.ts.map +1 -0
  178. package/dist/schemas/model-receipt.js +23 -0
  179. package/dist/schemas/model-receipt.js.map +1 -0
  180. package/dist/schemas/model-resource-snapshot.schema.json +164 -0
  181. package/dist/schemas/model-settings.schema.json +22 -0
  182. package/dist/schemas/native-execution-receipt.schema.json +919 -0
  183. package/dist/schemas/native-receipt.d.ts +624 -0
  184. package/dist/schemas/native-receipt.d.ts.map +1 -0
  185. package/dist/schemas/native-receipt.js +16 -0
  186. package/dist/schemas/native-receipt.js.map +1 -0
  187. package/dist/schemas/profile-execution-receipt.schema.json +853 -0
  188. package/dist/schemas/profile-receipt.d.ts +579 -0
  189. package/dist/schemas/profile-receipt.d.ts.map +1 -0
  190. package/dist/schemas/profile-receipt.js +20 -0
  191. package/dist/schemas/profile-receipt.js.map +1 -0
  192. package/dist/schemas/request-route-assessment.schema.json +288 -0
  193. package/dist/schemas/request-route-execution-receipt.schema.json +864 -0
  194. package/dist/schemas/request-route-export.schema.json +42 -0
  195. package/dist/schemas/request-route-metadata.schema.json +31 -0
  196. package/dist/schemas/request-route.schema.json +235 -0
  197. package/dist/schemas/route-configuration.schema.json +205 -0
  198. package/dist/schemas/route-import-authoring.schema.json +426 -0
  199. package/dist/schemas/route-import-journal.schema.json +119 -0
  200. package/dist/schemas/route-import-proposal.schema.json +416 -0
  201. package/dist/schemas/route-import-result.schema.json +100 -0
  202. package/dist/schemas/route-set-content.schema.json +200 -0
  203. package/dist/schemas/route-set-execution-receipt.schema.json +889 -0
  204. package/dist/schemas/route-set-request.schema.json +64 -0
  205. package/dist/schemas/route-set-revision.schema.json +258 -0
  206. package/dist/schemas/route-set-snapshot.schema.json +615 -0
  207. package/dist/schemas/route-set.schema.json +71 -0
  208. package/dist/schemas/routes.d.ts +435 -0
  209. package/dist/schemas/routes.d.ts.map +1 -0
  210. package/dist/schemas/routes.js +75 -0
  211. package/dist/schemas/routes.js.map +1 -0
  212. package/dist/schemas/system-instruction-revision.schema.json +55 -0
  213. package/dist/schemas/system-instruction.schema.json +72 -0
  214. package/dist/schemas/usage-aggregate-query.schema.json +25 -1
  215. package/dist/schemas/usage-page.schema.json +17 -1
  216. package/dist/schemas/usage-query.schema.json +20 -0
  217. package/dist/schemas/usage-summary.schema.json +88 -0
  218. package/dist/schemas/usage.d.ts +124 -4
  219. package/dist/schemas/usage.d.ts.map +1 -1
  220. package/dist/schemas/usage.js +18 -3
  221. package/dist/schemas/usage.js.map +1 -1
  222. package/dist/scoped-configuration.d.ts +2 -0
  223. package/dist/scoped-configuration.d.ts.map +1 -1
  224. package/dist/scoped-configuration.js.map +1 -1
  225. package/dist/scripts/emit-schemas.js +2 -3
  226. package/dist/scripts/emit-schemas.js.map +1 -1
  227. package/dist/system-instruction.d.ts +54 -0
  228. package/dist/system-instruction.d.ts.map +1 -0
  229. package/dist/system-instruction.js +64 -0
  230. package/dist/system-instruction.js.map +1 -0
  231. package/package.json +33 -33
  232. package/third-party-licenses.json +2 -7
  233. package/dist/schemas/catalog-delta-output.schema.json +0 -146
  234. package/dist/schemas/catalog-delta-record.schema.json +0 -242
  235. package/dist/schemas/incremental-catalog-review.schema.json +0 -645
  236. /package/third-party-licenses/{fast-uri@3.1.7 → fast-uri@3.1.9}/LICENSE +0 -0
@@ -0,0 +1,919 @@
1
+ {
2
+ "$id": "https://techis.dev/ai/contracts/native-execution-receipt.schema.json",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "allOf": [
6
+ {
7
+ "if": {
8
+ "properties": {
9
+ "schemaVersion": {
10
+ "const": 3
11
+ }
12
+ },
13
+ "required": [
14
+ "schemaVersion"
15
+ ]
16
+ },
17
+ "then": {
18
+ "not": {
19
+ "anyOf": [
20
+ {
21
+ "required": [
22
+ "generation"
23
+ ]
24
+ },
25
+ {
26
+ "required": [
27
+ "skippedSlots"
28
+ ]
29
+ }
30
+ ]
31
+ },
32
+ "properties": {
33
+ "costEstimate": {
34
+ "not": {
35
+ "required": [
36
+ "uncertainties"
37
+ ]
38
+ }
39
+ },
40
+ "attempts": {
41
+ "items": {
42
+ "not": {
43
+ "required": [
44
+ "generation"
45
+ ]
46
+ },
47
+ "properties": {
48
+ "costEstimate": {
49
+ "not": {
50
+ "required": [
51
+ "uncertainties"
52
+ ]
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
58
+ }
59
+ }
60
+ }
61
+ ],
62
+ "required": [
63
+ "schemaVersion",
64
+ "receiptId",
65
+ "runId",
66
+ "requestId",
67
+ "applicationId",
68
+ "operationId",
69
+ "status",
70
+ "instructionHash",
71
+ "requested",
72
+ "attempts",
73
+ "latencyMs",
74
+ "fallbackUsed",
75
+ "completedAt",
76
+ "kind",
77
+ "configurationId",
78
+ "workspaceId",
79
+ "configurationRevision",
80
+ "bindingId",
81
+ "profileId",
82
+ "profileRevision",
83
+ "catalogRevision"
84
+ ],
85
+ "properties": {
86
+ "schemaVersion": {
87
+ "enum": [
88
+ 3,
89
+ 4
90
+ ]
91
+ },
92
+ "generation": {
93
+ "type": "object",
94
+ "additionalProperties": false,
95
+ "required": [
96
+ "clientStyle",
97
+ "mode",
98
+ "outcome",
99
+ "outputExposed",
100
+ "features"
101
+ ],
102
+ "properties": {
103
+ "clientStyle": {
104
+ "enum": [
105
+ "generate",
106
+ "responses",
107
+ "chat"
108
+ ]
109
+ },
110
+ "mode": {
111
+ "enum": [
112
+ "final",
113
+ "stream"
114
+ ]
115
+ },
116
+ "outcome": {
117
+ "enum": [
118
+ "completed",
119
+ "requires_action",
120
+ "refused",
121
+ "incomplete",
122
+ "failed"
123
+ ]
124
+ },
125
+ "outputExposed": {
126
+ "type": "boolean"
127
+ },
128
+ "adapterRoute": {
129
+ "type": "string",
130
+ "minLength": 1,
131
+ "maxLength": 128
132
+ },
133
+ "compatibleAdapterVersion": {
134
+ "type": "string",
135
+ "minLength": 1,
136
+ "maxLength": 128
137
+ },
138
+ "implementation": {
139
+ "type": "object",
140
+ "additionalProperties": false,
141
+ "required": [
142
+ "id",
143
+ "version",
144
+ "contractVersion"
145
+ ],
146
+ "properties": {
147
+ "id": {
148
+ "type": "string",
149
+ "minLength": 1,
150
+ "maxLength": 128
151
+ },
152
+ "version": {
153
+ "type": "string",
154
+ "minLength": 1,
155
+ "maxLength": 128
156
+ },
157
+ "contractVersion": {
158
+ "enum": [
159
+ 1,
160
+ 2
161
+ ]
162
+ }
163
+ }
164
+ },
165
+ "protocol": {
166
+ "type": "string",
167
+ "minLength": 1,
168
+ "maxLength": 128
169
+ },
170
+ "features": {
171
+ "type": "array",
172
+ "items": {
173
+ "type": "object",
174
+ "additionalProperties": false,
175
+ "required": [
176
+ "feature",
177
+ "requested",
178
+ "effective"
179
+ ],
180
+ "properties": {
181
+ "feature": {
182
+ "enum": [
183
+ "text",
184
+ "images",
185
+ "image-detail",
186
+ "structured-output",
187
+ "client-tools",
188
+ "tool-choice",
189
+ "parallel-tools",
190
+ "web-search",
191
+ "reasoning",
192
+ "sampling",
193
+ "storage",
194
+ "continuation",
195
+ "provider-options",
196
+ "streaming"
197
+ ]
198
+ },
199
+ "requested": {
200
+ "type": "boolean"
201
+ },
202
+ "effective": {
203
+ "enum": [
204
+ "sent",
205
+ "omitted",
206
+ "unknown",
207
+ "text-context",
208
+ "buffered"
209
+ ]
210
+ },
211
+ "reason": {
212
+ "enum": [
213
+ "unsupported",
214
+ "unknown-capability",
215
+ "provider-specific",
216
+ "continuation-not-portable",
217
+ "legacy-adapter"
218
+ ]
219
+ }
220
+ }
221
+ }
222
+ }
223
+ }
224
+ },
225
+ "receiptId": {
226
+ "type": "string",
227
+ "pattern": "^[a-f0-9]{64}$"
228
+ },
229
+ "runId": {
230
+ "type": "string",
231
+ "minLength": 1
232
+ },
233
+ "requestId": {
234
+ "type": "string",
235
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$"
236
+ },
237
+ "applicationId": {
238
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/applicationId"
239
+ },
240
+ "workspaceId": {
241
+ "type": "string",
242
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
243
+ },
244
+ "operationId": {
245
+ "type": "string",
246
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._-]{0,127}$"
247
+ },
248
+ "status": {
249
+ "enum": [
250
+ "succeeded",
251
+ "failed",
252
+ "cancelled",
253
+ "rejected"
254
+ ]
255
+ },
256
+ "instructionHash": {
257
+ "type": "string",
258
+ "pattern": "^[a-f0-9]{64}$"
259
+ },
260
+ "effectiveInstructionHash": {
261
+ "type": "string",
262
+ "pattern": "^[a-f0-9]{64}$"
263
+ },
264
+ "profileId": {
265
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/profileId"
266
+ },
267
+ "profileRevision": {
268
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision"
269
+ },
270
+ "catalogRevision": {
271
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision"
272
+ },
273
+ "adapterId": {
274
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/adapterId"
275
+ },
276
+ "adapterVersion": {
277
+ "type": "string",
278
+ "minLength": 1
279
+ },
280
+ "providerModelId": {
281
+ "type": "string",
282
+ "minLength": 1
283
+ },
284
+ "provider": {
285
+ "type": "string",
286
+ "minLength": 1
287
+ },
288
+ "requested": {
289
+ "type": "object",
290
+ "additionalProperties": false,
291
+ "required": [
292
+ "outputSchemaPresent"
293
+ ],
294
+ "properties": {
295
+ "effortHint": {
296
+ "type": "string",
297
+ "minLength": 1
298
+ },
299
+ "effortByModel": {
300
+ "type": "object",
301
+ "additionalProperties": {
302
+ "type": "string",
303
+ "minLength": 1
304
+ }
305
+ },
306
+ "maxOutputTokens": {
307
+ "type": "integer",
308
+ "minimum": 1
309
+ },
310
+ "outputSchemaPresent": {
311
+ "type": "boolean"
312
+ }
313
+ }
314
+ },
315
+ "effective": {
316
+ "type": "object",
317
+ "additionalProperties": false,
318
+ "properties": {
319
+ "reasoning": {
320
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/nativeReasoningControl"
321
+ },
322
+ "requestedEffort": {
323
+ "type": "string",
324
+ "minLength": 1
325
+ },
326
+ "effectiveEffort": {
327
+ "type": "string",
328
+ "minLength": 1
329
+ },
330
+ "profileDefaultMaxOutputTokens": {
331
+ "type": "integer",
332
+ "minimum": 1
333
+ },
334
+ "slotDefaultMaxOutputTokens": {
335
+ "type": "integer",
336
+ "minimum": 1
337
+ },
338
+ "maxOutputTokens": {
339
+ "type": "integer",
340
+ "minimum": 1
341
+ },
342
+ "appliedCaps": {
343
+ "type": "array",
344
+ "items": {
345
+ "type": "object",
346
+ "additionalProperties": false,
347
+ "required": [
348
+ "source",
349
+ "dimension",
350
+ "value",
351
+ "effective"
352
+ ],
353
+ "properties": {
354
+ "source": {
355
+ "enum": [
356
+ "model",
357
+ "profile",
358
+ "client",
359
+ "invocation"
360
+ ]
361
+ },
362
+ "dimension": {
363
+ "enum": [
364
+ "maxOutputTokens",
365
+ "maxInputTokens",
366
+ "maxEstimatedCost"
367
+ ]
368
+ },
369
+ "value": {
370
+ "type": "number",
371
+ "minimum": 0
372
+ },
373
+ "requested": {
374
+ "type": "number",
375
+ "minimum": 0
376
+ },
377
+ "effective": {
378
+ "type": "number",
379
+ "minimum": 0
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
385
+ },
386
+ "attempts": {
387
+ "type": "array",
388
+ "items": {
389
+ "type": "object",
390
+ "additionalProperties": false,
391
+ "required": [
392
+ "attempt",
393
+ "catalogId",
394
+ "providerModelId",
395
+ "role",
396
+ "latencyMs",
397
+ "outcome",
398
+ "providerRequestStarted"
399
+ ],
400
+ "properties": {
401
+ "generation": {
402
+ "type": "object",
403
+ "additionalProperties": false,
404
+ "required": [
405
+ "clientStyle",
406
+ "mode",
407
+ "outcome",
408
+ "outputExposed",
409
+ "features"
410
+ ],
411
+ "properties": {
412
+ "clientStyle": {
413
+ "enum": [
414
+ "generate",
415
+ "responses",
416
+ "chat"
417
+ ]
418
+ },
419
+ "mode": {
420
+ "enum": [
421
+ "final",
422
+ "stream"
423
+ ]
424
+ },
425
+ "outcome": {
426
+ "enum": [
427
+ "completed",
428
+ "requires_action",
429
+ "refused",
430
+ "incomplete",
431
+ "failed"
432
+ ]
433
+ },
434
+ "outputExposed": {
435
+ "type": "boolean"
436
+ },
437
+ "adapterRoute": {
438
+ "type": "string",
439
+ "minLength": 1,
440
+ "maxLength": 128
441
+ },
442
+ "compatibleAdapterVersion": {
443
+ "type": "string",
444
+ "minLength": 1,
445
+ "maxLength": 128
446
+ },
447
+ "implementation": {
448
+ "type": "object",
449
+ "additionalProperties": false,
450
+ "required": [
451
+ "id",
452
+ "version",
453
+ "contractVersion"
454
+ ],
455
+ "properties": {
456
+ "id": {
457
+ "type": "string",
458
+ "minLength": 1,
459
+ "maxLength": 128
460
+ },
461
+ "version": {
462
+ "type": "string",
463
+ "minLength": 1,
464
+ "maxLength": 128
465
+ },
466
+ "contractVersion": {
467
+ "enum": [
468
+ 1,
469
+ 2
470
+ ]
471
+ }
472
+ }
473
+ },
474
+ "protocol": {
475
+ "type": "string",
476
+ "minLength": 1,
477
+ "maxLength": 128
478
+ },
479
+ "features": {
480
+ "type": "array",
481
+ "items": {
482
+ "type": "object",
483
+ "additionalProperties": false,
484
+ "required": [
485
+ "feature",
486
+ "requested",
487
+ "effective"
488
+ ],
489
+ "properties": {
490
+ "feature": {
491
+ "enum": [
492
+ "text",
493
+ "images",
494
+ "image-detail",
495
+ "structured-output",
496
+ "client-tools",
497
+ "tool-choice",
498
+ "parallel-tools",
499
+ "web-search",
500
+ "reasoning",
501
+ "sampling",
502
+ "storage",
503
+ "continuation",
504
+ "provider-options",
505
+ "streaming"
506
+ ]
507
+ },
508
+ "requested": {
509
+ "type": "boolean"
510
+ },
511
+ "effective": {
512
+ "enum": [
513
+ "sent",
514
+ "omitted",
515
+ "unknown",
516
+ "text-context",
517
+ "buffered"
518
+ ]
519
+ },
520
+ "reason": {
521
+ "enum": [
522
+ "unsupported",
523
+ "unknown-capability",
524
+ "provider-specific",
525
+ "continuation-not-portable",
526
+ "legacy-adapter"
527
+ ]
528
+ }
529
+ }
530
+ }
531
+ }
532
+ }
533
+ },
534
+ "attempt": {
535
+ "type": "integer",
536
+ "minimum": 1
537
+ },
538
+ "catalogId": {
539
+ "type": "string",
540
+ "minLength": 1
541
+ },
542
+ "providerModelId": {
543
+ "type": "string",
544
+ "minLength": 1
545
+ },
546
+ "role": {
547
+ "enum": [
548
+ "primary",
549
+ "fallback"
550
+ ]
551
+ },
552
+ "latencyMs": {
553
+ "type": "integer",
554
+ "minimum": 0
555
+ },
556
+ "outcome": {
557
+ "enum": [
558
+ "succeeded",
559
+ "failed",
560
+ "cancelled"
561
+ ]
562
+ },
563
+ "providerRequestStarted": {
564
+ "type": "boolean"
565
+ },
566
+ "effective": {
567
+ "type": "object",
568
+ "additionalProperties": false,
569
+ "properties": {
570
+ "reasoning": {
571
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/nativeReasoningControl"
572
+ },
573
+ "requestedEffort": {
574
+ "type": "string",
575
+ "minLength": 1
576
+ },
577
+ "effectiveEffort": {
578
+ "type": "string",
579
+ "minLength": 1
580
+ },
581
+ "profileDefaultMaxOutputTokens": {
582
+ "type": "integer",
583
+ "minimum": 1
584
+ },
585
+ "slotDefaultMaxOutputTokens": {
586
+ "type": "integer",
587
+ "minimum": 1
588
+ },
589
+ "maxOutputTokens": {
590
+ "type": "integer",
591
+ "minimum": 1
592
+ },
593
+ "appliedCaps": {
594
+ "type": "array",
595
+ "items": {
596
+ "type": "object",
597
+ "additionalProperties": false,
598
+ "required": [
599
+ "source",
600
+ "dimension",
601
+ "value",
602
+ "effective"
603
+ ],
604
+ "properties": {
605
+ "source": {
606
+ "enum": [
607
+ "model",
608
+ "profile",
609
+ "client",
610
+ "invocation"
611
+ ]
612
+ },
613
+ "dimension": {
614
+ "enum": [
615
+ "maxOutputTokens",
616
+ "maxInputTokens",
617
+ "maxEstimatedCost"
618
+ ]
619
+ },
620
+ "value": {
621
+ "type": "number",
622
+ "minimum": 0
623
+ },
624
+ "requested": {
625
+ "type": "number",
626
+ "minimum": 0
627
+ },
628
+ "effective": {
629
+ "type": "number",
630
+ "minimum": 0
631
+ }
632
+ }
633
+ }
634
+ }
635
+ }
636
+ },
637
+ "errorClass": {
638
+ "type": "string"
639
+ },
640
+ "errorMessage": {
641
+ "type": "string"
642
+ },
643
+ "usage": {
644
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/usageDimensions"
645
+ },
646
+ "costEstimate": {
647
+ "type": "object",
648
+ "additionalProperties": false,
649
+ "required": [
650
+ "currency",
651
+ "priceKnown",
652
+ "basis"
653
+ ],
654
+ "properties": {
655
+ "currency": {
656
+ "type": "string",
657
+ "minLength": 3,
658
+ "maxLength": 3
659
+ },
660
+ "amount": {
661
+ "type": "number",
662
+ "minimum": 0
663
+ },
664
+ "priceRevisionId": {
665
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/priceRevisionId"
666
+ },
667
+ "priceKnown": {
668
+ "type": "boolean"
669
+ },
670
+ "basis": {
671
+ "enum": [
672
+ "reported-usage",
673
+ "preflight-estimate"
674
+ ]
675
+ },
676
+ "uncertainties": {
677
+ "type": "array",
678
+ "minItems": 1,
679
+ "uniqueItems": true,
680
+ "items": {
681
+ "enum": [
682
+ "usage-missing",
683
+ "usage-incomplete",
684
+ "usage-inconsistent",
685
+ "cache-usage",
686
+ "price-missing",
687
+ "unsupported-price-unit",
688
+ "input-price",
689
+ "output-price",
690
+ "cache-price",
691
+ "long-context-price",
692
+ "provider-tools",
693
+ "service-tier",
694
+ "region",
695
+ "price-conditions",
696
+ "opaque-input",
697
+ "output-limit",
698
+ "currency"
699
+ ]
700
+ }
701
+ }
702
+ },
703
+ "allOf": [
704
+ {
705
+ "if": {
706
+ "required": [
707
+ "uncertainties"
708
+ ]
709
+ },
710
+ "then": {
711
+ "properties": {
712
+ "priceKnown": {
713
+ "const": false
714
+ }
715
+ },
716
+ "not": {
717
+ "required": [
718
+ "amount"
719
+ ]
720
+ }
721
+ }
722
+ }
723
+ ]
724
+ }
725
+ }
726
+ }
727
+ },
728
+ "skippedSlots": {
729
+ "type": "array",
730
+ "items": {
731
+ "type": "object",
732
+ "additionalProperties": false,
733
+ "required": [
734
+ "slot",
735
+ "catalogId",
736
+ "providerModelId",
737
+ "role",
738
+ "phase",
739
+ "reason",
740
+ "providerRequestStarted"
741
+ ],
742
+ "properties": {
743
+ "slot": {
744
+ "type": "integer",
745
+ "minimum": 0
746
+ },
747
+ "catalogId": {
748
+ "type": "string",
749
+ "minLength": 1,
750
+ "maxLength": 128
751
+ },
752
+ "providerModelId": {
753
+ "type": "string",
754
+ "minLength": 1,
755
+ "maxLength": 256
756
+ },
757
+ "role": {
758
+ "enum": [
759
+ "primary",
760
+ "fallback"
761
+ ]
762
+ },
763
+ "phase": {
764
+ "enum": [
765
+ "preflight",
766
+ "execution"
767
+ ]
768
+ },
769
+ "providerRequestStarted": {
770
+ "type": "boolean"
771
+ },
772
+ "reason": {
773
+ "enum": [
774
+ "retired",
775
+ "adapter-missing",
776
+ "adapter-provider",
777
+ "adapter-version",
778
+ "text-output",
779
+ "input-limit",
780
+ "credential-unavailable",
781
+ "model-unavailable",
782
+ "continuation-not-portable"
783
+ ]
784
+ }
785
+ }
786
+ }
787
+ },
788
+ "usage": {
789
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/usageDimensions"
790
+ },
791
+ "costEstimate": {
792
+ "type": "object",
793
+ "additionalProperties": false,
794
+ "required": [
795
+ "currency",
796
+ "priceKnown",
797
+ "basis"
798
+ ],
799
+ "properties": {
800
+ "currency": {
801
+ "type": "string",
802
+ "minLength": 3,
803
+ "maxLength": 3
804
+ },
805
+ "amount": {
806
+ "type": "number",
807
+ "minimum": 0
808
+ },
809
+ "priceRevisionId": {
810
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/priceRevisionId"
811
+ },
812
+ "priceKnown": {
813
+ "type": "boolean"
814
+ },
815
+ "basis": {
816
+ "enum": [
817
+ "reported-usage",
818
+ "preflight-estimate"
819
+ ]
820
+ },
821
+ "uncertainties": {
822
+ "type": "array",
823
+ "minItems": 1,
824
+ "uniqueItems": true,
825
+ "items": {
826
+ "enum": [
827
+ "usage-missing",
828
+ "usage-incomplete",
829
+ "usage-inconsistent",
830
+ "cache-usage",
831
+ "price-missing",
832
+ "unsupported-price-unit",
833
+ "input-price",
834
+ "output-price",
835
+ "cache-price",
836
+ "long-context-price",
837
+ "provider-tools",
838
+ "service-tier",
839
+ "region",
840
+ "price-conditions",
841
+ "opaque-input",
842
+ "output-limit",
843
+ "currency"
844
+ ]
845
+ }
846
+ }
847
+ },
848
+ "allOf": [
849
+ {
850
+ "if": {
851
+ "required": [
852
+ "uncertainties"
853
+ ]
854
+ },
855
+ "then": {
856
+ "properties": {
857
+ "priceKnown": {
858
+ "const": false
859
+ }
860
+ },
861
+ "not": {
862
+ "required": [
863
+ "amount"
864
+ ]
865
+ }
866
+ }
867
+ }
868
+ ]
869
+ },
870
+ "latencyMs": {
871
+ "type": "integer",
872
+ "minimum": 0
873
+ },
874
+ "fallbackUsed": {
875
+ "type": "boolean"
876
+ },
877
+ "error": {
878
+ "type": "object",
879
+ "additionalProperties": false,
880
+ "required": [
881
+ "code",
882
+ "message"
883
+ ],
884
+ "properties": {
885
+ "code": {
886
+ "type": "string",
887
+ "minLength": 1
888
+ },
889
+ "message": {
890
+ "type": "string"
891
+ }
892
+ }
893
+ },
894
+ "warnings": {
895
+ "type": "array",
896
+ "items": {
897
+ "type": "string"
898
+ }
899
+ },
900
+ "completedAt": {
901
+ "$ref": "https://techis.dev/ai/contracts/common.schema.json#/definitions/isoDateTime"
902
+ },
903
+ "kind": {
904
+ "const": "native-execution-receipt"
905
+ },
906
+ "configurationId": {
907
+ "type": "string",
908
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
909
+ },
910
+ "configurationRevision": {
911
+ "type": "string",
912
+ "pattern": "^[a-f0-9]{64}$"
913
+ },
914
+ "bindingId": {
915
+ "type": "string",
916
+ "pattern": "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$"
917
+ }
918
+ }
919
+ }