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