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

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