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