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