@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,435 @@
1
+ export declare const requestRouteSchema: {
2
+ required: ("schemaVersion" | "revision" | "owner" | "visibility" | "purpose" | "primary" | "fallbacks" | "requiredCapabilities" | "execution" | "status" | "createdAt" | "routeId")[];
3
+ properties: {
4
+ routeId: {
5
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/profileId";
6
+ };
7
+ schemaVersion: {
8
+ readonly const: 2;
9
+ };
10
+ revision: {
11
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision";
12
+ };
13
+ owner: {
14
+ readonly type: "object";
15
+ readonly additionalProperties: false;
16
+ readonly required: readonly ["applicationId"];
17
+ readonly properties: {
18
+ readonly applicationId: {
19
+ readonly type: "string";
20
+ readonly minLength: 1;
21
+ };
22
+ };
23
+ };
24
+ visibility: {
25
+ readonly enum: readonly ["private", "shared"];
26
+ };
27
+ purpose: {
28
+ readonly type: "string";
29
+ readonly minLength: 1;
30
+ };
31
+ primary: {
32
+ type: string;
33
+ additionalProperties: boolean;
34
+ required: string[];
35
+ properties: {
36
+ catalogId: {
37
+ type: string;
38
+ minLength: number;
39
+ };
40
+ settings: {
41
+ $ref: string;
42
+ };
43
+ };
44
+ };
45
+ fallbacks: {
46
+ readonly type: "array";
47
+ readonly items: {
48
+ type: string;
49
+ additionalProperties: boolean;
50
+ required: string[];
51
+ properties: {
52
+ catalogId: {
53
+ type: string;
54
+ minLength: number;
55
+ };
56
+ settings: {
57
+ $ref: string;
58
+ };
59
+ };
60
+ };
61
+ };
62
+ requiredCapabilities: {
63
+ readonly type: "object";
64
+ readonly additionalProperties: false;
65
+ readonly required: readonly ["inputModalities"];
66
+ readonly properties: {
67
+ readonly inputModalities: {
68
+ readonly type: "array";
69
+ readonly minItems: 1;
70
+ readonly items: {
71
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/modality";
72
+ };
73
+ };
74
+ readonly structuredOutput: {
75
+ readonly type: "boolean";
76
+ };
77
+ readonly providerTools: {
78
+ readonly type: "array";
79
+ readonly items: {
80
+ readonly type: "string";
81
+ };
82
+ };
83
+ };
84
+ };
85
+ defaults: {
86
+ readonly type: "object";
87
+ readonly additionalProperties: false;
88
+ readonly properties: {
89
+ readonly maxOutputTokens: {
90
+ readonly type: "integer";
91
+ readonly minimum: 1;
92
+ };
93
+ };
94
+ };
95
+ caps: {
96
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/executionCaps";
97
+ };
98
+ execution: {
99
+ readonly type: "object";
100
+ readonly additionalProperties: false;
101
+ readonly required: readonly ["retry"];
102
+ readonly properties: {
103
+ readonly deadlineMs: {
104
+ readonly type: "integer";
105
+ readonly minimum: 1;
106
+ };
107
+ readonly attemptTimeoutMs: {
108
+ readonly type: "integer";
109
+ readonly minimum: 1;
110
+ };
111
+ readonly fallbackPolicy: {
112
+ readonly enum: readonly ["cycle", "forward-only"];
113
+ };
114
+ readonly maxAttempts: {
115
+ readonly type: "integer";
116
+ readonly minimum: 1;
117
+ };
118
+ readonly retry: {
119
+ readonly type: "object";
120
+ readonly additionalProperties: false;
121
+ readonly required: readonly ["retryableErrorClasses"];
122
+ readonly properties: {
123
+ readonly retryableErrorClasses: {
124
+ readonly type: "array";
125
+ readonly minItems: 1;
126
+ readonly items: {
127
+ readonly enum: readonly ["provider-timeout", "provider-rate-limit", "provider-server-error", "network-error"];
128
+ };
129
+ readonly uniqueItems: true;
130
+ };
131
+ readonly minRetryDelayMs: {
132
+ readonly type: "integer";
133
+ readonly minimum: 0;
134
+ };
135
+ };
136
+ };
137
+ };
138
+ };
139
+ effortPolicy: {
140
+ readonly type: "object";
141
+ readonly additionalProperties: false;
142
+ readonly required: readonly ["enabled"];
143
+ readonly properties: {
144
+ readonly enabled: {
145
+ readonly type: "boolean";
146
+ };
147
+ readonly byModel: {
148
+ readonly type: "object";
149
+ readonly minProperties: 1;
150
+ readonly additionalProperties: {
151
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/effortPolicyForModel";
152
+ };
153
+ };
154
+ };
155
+ };
156
+ catalogCompatibility: {
157
+ readonly type: "object";
158
+ readonly additionalProperties: false;
159
+ readonly properties: {
160
+ readonly minCatalogRevision: {
161
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision";
162
+ };
163
+ readonly excludedCatalogIds: {
164
+ readonly type: "array";
165
+ readonly items: {
166
+ readonly type: "string";
167
+ };
168
+ };
169
+ };
170
+ };
171
+ status: {
172
+ readonly enum: readonly ["draft", "published", "retired"];
173
+ };
174
+ basedOnRevision: {
175
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision";
176
+ };
177
+ createdAt: {
178
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/isoDateTime";
179
+ };
180
+ publishedBy: {
181
+ readonly type: "string";
182
+ readonly minLength: 1;
183
+ };
184
+ publishedAt: {
185
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/isoDateTime";
186
+ };
187
+ };
188
+ type: "object";
189
+ additionalProperties: false;
190
+ };
191
+ declare const schemas: {
192
+ "request-route": {
193
+ required: ("schemaVersion" | "revision" | "owner" | "visibility" | "purpose" | "primary" | "fallbacks" | "requiredCapabilities" | "execution" | "status" | "createdAt" | "routeId")[];
194
+ properties: {
195
+ routeId: {
196
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/profileId";
197
+ };
198
+ schemaVersion: {
199
+ readonly const: 2;
200
+ };
201
+ revision: {
202
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision";
203
+ };
204
+ owner: {
205
+ readonly type: "object";
206
+ readonly additionalProperties: false;
207
+ readonly required: readonly ["applicationId"];
208
+ readonly properties: {
209
+ readonly applicationId: {
210
+ readonly type: "string";
211
+ readonly minLength: 1;
212
+ };
213
+ };
214
+ };
215
+ visibility: {
216
+ readonly enum: readonly ["private", "shared"];
217
+ };
218
+ purpose: {
219
+ readonly type: "string";
220
+ readonly minLength: 1;
221
+ };
222
+ primary: {
223
+ type: string;
224
+ additionalProperties: boolean;
225
+ required: string[];
226
+ properties: {
227
+ catalogId: {
228
+ type: string;
229
+ minLength: number;
230
+ };
231
+ settings: {
232
+ $ref: string;
233
+ };
234
+ };
235
+ };
236
+ fallbacks: {
237
+ readonly type: "array";
238
+ readonly items: {
239
+ type: string;
240
+ additionalProperties: boolean;
241
+ required: string[];
242
+ properties: {
243
+ catalogId: {
244
+ type: string;
245
+ minLength: number;
246
+ };
247
+ settings: {
248
+ $ref: string;
249
+ };
250
+ };
251
+ };
252
+ };
253
+ requiredCapabilities: {
254
+ readonly type: "object";
255
+ readonly additionalProperties: false;
256
+ readonly required: readonly ["inputModalities"];
257
+ readonly properties: {
258
+ readonly inputModalities: {
259
+ readonly type: "array";
260
+ readonly minItems: 1;
261
+ readonly items: {
262
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/modality";
263
+ };
264
+ };
265
+ readonly structuredOutput: {
266
+ readonly type: "boolean";
267
+ };
268
+ readonly providerTools: {
269
+ readonly type: "array";
270
+ readonly items: {
271
+ readonly type: "string";
272
+ };
273
+ };
274
+ };
275
+ };
276
+ defaults: {
277
+ readonly type: "object";
278
+ readonly additionalProperties: false;
279
+ readonly properties: {
280
+ readonly maxOutputTokens: {
281
+ readonly type: "integer";
282
+ readonly minimum: 1;
283
+ };
284
+ };
285
+ };
286
+ caps: {
287
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/executionCaps";
288
+ };
289
+ execution: {
290
+ readonly type: "object";
291
+ readonly additionalProperties: false;
292
+ readonly required: readonly ["retry"];
293
+ readonly properties: {
294
+ readonly deadlineMs: {
295
+ readonly type: "integer";
296
+ readonly minimum: 1;
297
+ };
298
+ readonly attemptTimeoutMs: {
299
+ readonly type: "integer";
300
+ readonly minimum: 1;
301
+ };
302
+ readonly fallbackPolicy: {
303
+ readonly enum: readonly ["cycle", "forward-only"];
304
+ };
305
+ readonly maxAttempts: {
306
+ readonly type: "integer";
307
+ readonly minimum: 1;
308
+ };
309
+ readonly retry: {
310
+ readonly type: "object";
311
+ readonly additionalProperties: false;
312
+ readonly required: readonly ["retryableErrorClasses"];
313
+ readonly properties: {
314
+ readonly retryableErrorClasses: {
315
+ readonly type: "array";
316
+ readonly minItems: 1;
317
+ readonly items: {
318
+ readonly enum: readonly ["provider-timeout", "provider-rate-limit", "provider-server-error", "network-error"];
319
+ };
320
+ readonly uniqueItems: true;
321
+ };
322
+ readonly minRetryDelayMs: {
323
+ readonly type: "integer";
324
+ readonly minimum: 0;
325
+ };
326
+ };
327
+ };
328
+ };
329
+ };
330
+ effortPolicy: {
331
+ readonly type: "object";
332
+ readonly additionalProperties: false;
333
+ readonly required: readonly ["enabled"];
334
+ readonly properties: {
335
+ readonly enabled: {
336
+ readonly type: "boolean";
337
+ };
338
+ readonly byModel: {
339
+ readonly type: "object";
340
+ readonly minProperties: 1;
341
+ readonly additionalProperties: {
342
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/effortPolicyForModel";
343
+ };
344
+ };
345
+ };
346
+ };
347
+ catalogCompatibility: {
348
+ readonly type: "object";
349
+ readonly additionalProperties: false;
350
+ readonly properties: {
351
+ readonly minCatalogRevision: {
352
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision";
353
+ };
354
+ readonly excludedCatalogIds: {
355
+ readonly type: "array";
356
+ readonly items: {
357
+ readonly type: "string";
358
+ };
359
+ };
360
+ };
361
+ };
362
+ status: {
363
+ readonly enum: readonly ["draft", "published", "retired"];
364
+ };
365
+ basedOnRevision: {
366
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/revision";
367
+ };
368
+ createdAt: {
369
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/isoDateTime";
370
+ };
371
+ publishedBy: {
372
+ readonly type: "string";
373
+ readonly minLength: 1;
374
+ };
375
+ publishedAt: {
376
+ readonly $ref: "https://techis.dev/ai/contracts/common.schema.json#/definitions/isoDateTime";
377
+ };
378
+ };
379
+ type: "object";
380
+ additionalProperties: false;
381
+ };
382
+ "request-route-export": {
383
+ type: string;
384
+ additionalProperties: boolean;
385
+ properties: object;
386
+ required: string[];
387
+ };
388
+ "request-route-assessment": any;
389
+ "route-set-execution-receipt": any;
390
+ "request-route-execution-receipt": any;
391
+ "request-route-metadata": {
392
+ type: string;
393
+ additionalProperties: boolean;
394
+ properties: object;
395
+ required: string[];
396
+ };
397
+ "route-set": {
398
+ type: string;
399
+ additionalProperties: boolean;
400
+ properties: object;
401
+ required: string[];
402
+ };
403
+ "route-set-request": {
404
+ type: string;
405
+ additionalProperties: boolean;
406
+ properties: object;
407
+ required: string[];
408
+ };
409
+ "route-set-content": {
410
+ oneOf: {
411
+ type: string;
412
+ additionalProperties: boolean;
413
+ properties: object;
414
+ required: string[];
415
+ }[];
416
+ };
417
+ "route-set-revision": {
418
+ type: string;
419
+ additionalProperties: boolean;
420
+ properties: object;
421
+ required: string[];
422
+ };
423
+ "route-set-snapshot": {
424
+ type: string;
425
+ additionalProperties: boolean;
426
+ properties: object;
427
+ required: string[];
428
+ };
429
+ };
430
+ export declare const routeSchemas: { [K in keyof typeof schemas]: {
431
+ $id: string;
432
+ schema: object;
433
+ }; };
434
+ export {};
435
+ //# sourceMappingURL=routes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.d.ts","sourceRoot":"","sources":["../../src/schemas/routes.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAE2B,CAAC;AAgC3D,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BZ,CAAC;AACF,eAAO,MAAM,YAAY,EAEvB,GAAG,CAAC,IAAI,MAAM,OAAO,OAAO,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAE,CAAC"}
@@ -0,0 +1,75 @@
1
+ import { executionProfileRevisionSchema, profileAssessmentSchema } from "./config.js";
2
+ import { exactDocumentRefSchema } from "./scoped.js";
3
+ import { SCHEMA_BASE } from "./core.js";
4
+ import { modelExecutionReceiptSchema } from "./model-receipt.js";
5
+ import { profileExecutionReceiptSchema } from "./profile-receipt.js";
6
+ const { profileId, ...routeProperties } = executionProfileRevisionSchema.properties;
7
+ const { $id: legacyRouteSchemaId, ...legacyRouteSchema } = executionProfileRevisionSchema;
8
+ export const requestRouteSchema = { ...legacyRouteSchema,
9
+ required: executionProfileRevisionSchema.required.map(key => key === "profileId" ? "routeId" : key),
10
+ properties: { ...routeProperties, routeId: profileId } };
11
+ const uuid = { type: "string", pattern: "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$" };
12
+ const hash = { type: "string", pattern: "^[a-f0-9]{64}$" }, nullableHash = { anyOf: [hash, { type: "null" }] };
13
+ const name = { type: "string", minLength: 1, maxLength: 200, pattern: "^[^\\u0000-\\u001f]+$" };
14
+ const object = (properties, required = Object.keys(properties)) => ({ type: "object", additionalProperties: false, properties, required });
15
+ const identity = { routeSetId: uuid, applicationId: { type: "string", pattern: "^[a-z0-9][a-z0-9._-]{0,99}$" } };
16
+ const { $id: omitted, ...ref } = exactDocumentRefSchema;
17
+ const request = object({ ...identity, selection: { oneOf: [object({ kind: { const: "active" } }),
18
+ object({ kind: { const: "selected" } }), object({ kind: { const: "exact" }, revision: hash })] } }, ["routeSetId", "selection"]);
19
+ const content = { oneOf: [object({ catalog: ref, routes: { type: "array", minItems: 1,
20
+ items: object({ routeName: name, ref }) } }), object({ catalog: ref, bindings: { type: "object", minProperties: 1,
21
+ propertyNames: { pattern: "^[a-zA-Z0-9][a-zA-Z0-9._:-]{0,127}$" }, additionalProperties: ref } })] };
22
+ const revision = object({ schemaVersion: { const: 5 }, kind: { const: "route-set-revision" }, ...identity, revision: hash,
23
+ parentRevision: nullableHash, content, createdBy: { type: "string", minLength: 1 }, createdAt: { type: "string", format: "date-time" },
24
+ operationId: uuid }, ["schemaVersion", "kind", "routeSetId", "revision", "parentRevision", "content", "createdBy", "createdAt", "operationId"]);
25
+ function routeReceiptSchema(schema, standalone) {
26
+ const fields = { profileId: "routeId", profileRevision: "routeRevision", profileName: "routeName",
27
+ configurationId: "routeSetId", configurationRevision: "routeSetRevision", sourceConfigurationRevision: "sourceRouteSetRevision",
28
+ profileSnapshotRevision: "routeSnapshotRevision", profileDefaultMaxOutputTokens: "routeDefaultMaxOutputTokens" };
29
+ const walk = (value) => Array.isArray(value) ? value.map(walk) : value && typeof value === "object"
30
+ ? Object.fromEntries(Object.entries(value).filter(([key]) => key !== "$id").map(([key, item]) => [fields[key] ?? key, walk(item)]))
31
+ : typeof value === "string" ? fields[value] ?? (value === "profile" ? "route" : value) : value;
32
+ const result = walk(schema);
33
+ result.properties.schemaVersion = { const: 6 };
34
+ result.properties.kind = { const: standalone ? "request-route-execution-receipt" : "route-set-execution-receipt" };
35
+ if (standalone) {
36
+ result.properties.legacyBindingId = result.properties.bindingId;
37
+ delete result.properties.bindingId;
38
+ result.required = result.required.filter((key) => key !== "bindingId");
39
+ result.anyOf = [{ required: ["routeId"] }, { required: ["legacyBindingId"] }];
40
+ }
41
+ return result;
42
+ }
43
+ const schemas = {
44
+ "request-route": requestRouteSchema,
45
+ "request-route-export": object({ schemaVersion: { const: 1 }, kind: { const: "request-route-export" }, routeName: name,
46
+ route: { $ref: `${SCHEMA_BASE}/request-route.schema.json` }, catalog: { $ref: `${SCHEMA_BASE}/catalog-release.schema.json` },
47
+ routeSha256: hash, catalogSha256: hash }),
48
+ "request-route-assessment": (() => {
49
+ const names = { profileRevisionsAssessed: "routeRevisionsAssessed", profileId: "routeId",
50
+ profileRevision: "routeRevision", draftProfile: "draftRoute" };
51
+ const walk = (value) => Array.isArray(value) ? value.map(walk) : value && typeof value === "object"
52
+ ? Object.fromEntries(Object.entries(value).filter(([key]) => key !== "$id").map(([key, item]) => [names[key] ?? key, walk(item)]))
53
+ : typeof value === "string" ? names[value] ?? (value === `${SCHEMA_BASE}/execution-profile-revision.schema.json`
54
+ ? `${SCHEMA_BASE}/request-route.schema.json` : value) : value;
55
+ const schema = walk(profileAssessmentSchema);
56
+ schema.properties.schemaVersion = { const: 2 };
57
+ return schema;
58
+ })(),
59
+ "route-set-execution-receipt": routeReceiptSchema(modelExecutionReceiptSchema, false),
60
+ "request-route-execution-receipt": routeReceiptSchema(profileExecutionReceiptSchema, true),
61
+ "request-route-metadata": object({ routeId: { type: "string", minLength: 1 }, routeName: name, revision: { type: "string", minLength: 1 },
62
+ version: { type: "integer", minimum: 0 } }),
63
+ "route-set": object({ schemaVersion: { const: 5 }, kind: { const: "route-set" }, ...identity, name,
64
+ version: { type: "integer", minimum: 1 }, latestRevision: nullableHash, selectedRevision: nullableHash,
65
+ revisions: { type: "array", uniqueItems: true, items: hash } }, ["schemaVersion", "kind", "routeSetId", "name", "version", "latestRevision", "selectedRevision", "revisions"]),
66
+ "route-set-request": request,
67
+ "route-set-content": content,
68
+ "route-set-revision": revision,
69
+ "route-set-snapshot": object({ schemaVersion: { const: 5 }, kind: { const: "route-set-snapshot" }, request, revision, sourceRevision: revision,
70
+ routeNames: { type: "object", additionalProperties: name }, documents: { type: "object", propertyNames: { pattern: "^[a-f0-9]{64}$" },
71
+ additionalProperties: { type: "object" } } }, ["schemaVersion", "kind", "request", "revision", "documents"]),
72
+ };
73
+ export const routeSchemas = Object.fromEntries(Object.entries(schemas).map(([kind, schema]) => [kind,
74
+ { $id: `${SCHEMA_BASE}/${kind}.schema.json`, schema: { ...schema, $id: `${SCHEMA_BASE}/${kind}.schema.json` } }]));
75
+ //# sourceMappingURL=routes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routes.js","sourceRoot":"","sources":["../../src/schemas/routes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AACtF,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,MAAM,EAAE,SAAS,EAAE,GAAG,eAAe,EAAE,GAAG,8BAA8B,CAAC,UAAU,CAAC;AACpF,MAAM,EAAE,GAAG,EAAE,mBAAmB,EAAE,GAAG,iBAAiB,EAAE,GAAG,8BAA8B,CAAC;AAC1F,MAAM,CAAC,MAAM,kBAAkB,GAAG,EAAE,GAAG,iBAAiB;IACtD,QAAQ,EAAE,8BAA8B,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC;IACnG,UAAU,EAAE,EAAE,GAAG,eAAe,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,CAAC;AAC3D,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,gEAAgE,EAAE,CAAC;AAC3G,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,gBAAgB,EAAE,EAAE,YAAY,GAAG,EAAE,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AAC/G,M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,CAAC,CAAC;IAC9G,mBAAmB,EAAE,OAAO;IAC5B,mBAAmB,EAAE,OAAO;IAC5B,oBAAoB,EAAE,QAAQ;IAC9B,oBAAoB,EAAE,MAAM,CAAC,EAAE,aAAa,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,EAAE,KAAK,EAAE,oBAAoB,EAAE,EAAE,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,QAAQ;QAC5I,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,IAAI,EAAE,EAAE,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,aAAa,EAAE,EAAE,OAAO,EAAE,gBAAgB,EAAE;YACnI,oBAAoB,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE,CAAC,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;CACjH,CAAC;AACF,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI;IAClG,EAAE,GAAG,EAAE,GAAG,WAAW,IAAI,IAAI,cAAc,EAAE,MAAM,EAAE,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,WAAW,IAAI,IAAI,cAAc,EAAE,EAAE,CAAC,CAAC,CACjD,CAAC"}
@@ -0,0 +1,55 @@
1
+ {
2
+ "$id": "https://techis.dev/ai/contracts/system-instruction-revision.schema.json",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": [
6
+ "schemaVersion",
7
+ "kind",
8
+ "instructionId",
9
+ "revision",
10
+ "parentRevision",
11
+ "createdAt",
12
+ "operationId",
13
+ "text"
14
+ ],
15
+ "properties": {
16
+ "schemaVersion": {
17
+ "const": 4
18
+ },
19
+ "kind": {
20
+ "const": "system-instruction-revision"
21
+ },
22
+ "instructionId": {
23
+ "type": "string",
24
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
25
+ },
26
+ "revision": {
27
+ "type": "string",
28
+ "pattern": "^[a-f0-9]{64}$"
29
+ },
30
+ "parentRevision": {
31
+ "anyOf": [
32
+ {
33
+ "type": "string",
34
+ "pattern": "^[a-f0-9]{64}$"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ]
40
+ },
41
+ "createdAt": {
42
+ "type": "string",
43
+ "format": "date-time"
44
+ },
45
+ "operationId": {
46
+ "type": "string",
47
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
48
+ },
49
+ "text": {
50
+ "type": "string",
51
+ "minLength": 1,
52
+ "maxLength": 1000000
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,72 @@
1
+ {
2
+ "$id": "https://techis.dev/ai/contracts/system-instruction.schema.json",
3
+ "type": "object",
4
+ "additionalProperties": false,
5
+ "required": [
6
+ "updatedAt",
7
+ "schemaVersion",
8
+ "kind",
9
+ "instructionId",
10
+ "name",
11
+ "version",
12
+ "revisions",
13
+ "latestRevision",
14
+ "publishedRevision"
15
+ ],
16
+ "properties": {
17
+ "updatedAt": {
18
+ "type": "string",
19
+ "format": "date-time"
20
+ },
21
+ "schemaVersion": {
22
+ "const": 4
23
+ },
24
+ "kind": {
25
+ "const": "system-instruction"
26
+ },
27
+ "instructionId": {
28
+ "type": "string",
29
+ "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
30
+ },
31
+ "name": {
32
+ "type": "string",
33
+ "minLength": 1,
34
+ "maxLength": 200,
35
+ "pattern": "^[^\\u0000-\\u001f]+$"
36
+ },
37
+ "version": {
38
+ "type": "integer",
39
+ "minimum": 1
40
+ },
41
+ "revisions": {
42
+ "type": "array",
43
+ "uniqueItems": true,
44
+ "items": {
45
+ "type": "string",
46
+ "pattern": "^[a-f0-9]{64}$"
47
+ }
48
+ },
49
+ "latestRevision": {
50
+ "anyOf": [
51
+ {
52
+ "type": "string",
53
+ "pattern": "^[a-f0-9]{64}$"
54
+ },
55
+ {
56
+ "type": "null"
57
+ }
58
+ ]
59
+ },
60
+ "publishedRevision": {
61
+ "anyOf": [
62
+ {
63
+ "type": "string",
64
+ "pattern": "^[a-f0-9]{64}$"
65
+ },
66
+ {
67
+ "type": "null"
68
+ }
69
+ ]
70
+ }
71
+ }
72
+ }