@techis/ai-contracts 0.4.0-rc.5 → 0.4.1

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 (62) hide show
  1. package/README.md +27 -20
  2. package/dist/catalog-change.d.ts +75 -0
  3. package/dist/catalog-change.d.ts.map +1 -0
  4. package/dist/catalog-change.js +110 -0
  5. package/dist/catalog-change.js.map +1 -0
  6. package/dist/catalog-composition.js +1 -1
  7. package/dist/catalog-composition.js.map +1 -1
  8. package/dist/catalog-delivery.d.ts +5 -0
  9. package/dist/catalog-delivery.d.ts.map +1 -1
  10. package/dist/catalog-delivery.js +9 -1
  11. package/dist/catalog-delivery.js.map +1 -1
  12. package/dist/catalog-facts.d.ts +25 -0
  13. package/dist/catalog-facts.d.ts.map +1 -0
  14. package/dist/catalog-facts.js +107 -0
  15. package/dist/catalog-facts.js.map +1 -0
  16. package/dist/catalog-model-coverage.d.ts +28 -0
  17. package/dist/catalog-model-coverage.d.ts.map +1 -0
  18. package/dist/catalog-model-coverage.js +64 -0
  19. package/dist/catalog-model-coverage.js.map +1 -0
  20. package/dist/catalog-package-data.d.ts +6 -0
  21. package/dist/catalog-package-data.d.ts.map +1 -1
  22. package/dist/catalog-package-data.js +1 -0
  23. package/dist/catalog-package-data.js.map +1 -1
  24. package/dist/catalog-publication.d.ts +13 -5
  25. package/dist/catalog-publication.d.ts.map +1 -1
  26. package/dist/catalog-publication.js +24 -6
  27. package/dist/catalog-publication.js.map +1 -1
  28. package/dist/configuration-bundle.d.ts +1 -0
  29. package/dist/configuration-bundle.d.ts.map +1 -1
  30. package/dist/configuration-bundle.js +11 -0
  31. package/dist/configuration-bundle.js.map +1 -1
  32. package/dist/entities.d.ts +16 -8
  33. package/dist/entities.d.ts.map +1 -1
  34. package/dist/index.d.ts +5 -0
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +5 -0
  37. package/dist/index.js.map +1 -1
  38. package/dist/model-maintenance.d.ts +26 -0
  39. package/dist/model-maintenance.d.ts.map +1 -1
  40. package/dist/model-maintenance.js +124 -18
  41. package/dist/model-maintenance.js.map +1 -1
  42. package/dist/provider-listings.d.ts +13 -3
  43. package/dist/provider-listings.d.ts.map +1 -1
  44. package/dist/provider-listings.js +75 -9
  45. package/dist/provider-listings.js.map +1 -1
  46. package/dist/route-set-export.d.ts.map +1 -1
  47. package/dist/route-set-export.js +9 -2
  48. package/dist/route-set-export.js.map +1 -1
  49. package/dist/schemas/catalog-delta-output.schema.json +146 -0
  50. package/dist/schemas/catalog-delta-record.schema.json +242 -0
  51. package/dist/schemas/catalog-release.schema.json +449 -160
  52. package/dist/schemas/core.d.ts +1155 -348
  53. package/dist/schemas/core.d.ts.map +1 -1
  54. package/dist/schemas/core.js +24 -4
  55. package/dist/schemas/core.js.map +1 -1
  56. package/dist/schemas/incremental-catalog-review.schema.json +645 -0
  57. package/dist/schemas/model-definition.schema.json +207 -0
  58. package/dist/schemas/model-package-release.schema.json +487 -0
  59. package/dist/schemas/price-revision.schema.json +151 -0
  60. package/dist/scripts/emit-schemas.js +3 -0
  61. package/dist/scripts/emit-schemas.js.map +1 -1
  62. package/package.json +34 -33
@@ -0,0 +1,645 @@
1
+ {
2
+ "type": "object",
3
+ "additionalProperties": false,
4
+ "required": [
5
+ "schemaVersion",
6
+ "kind",
7
+ "baselineInput",
8
+ "rounds",
9
+ "outcome",
10
+ "compositionHash"
11
+ ],
12
+ "properties": {
13
+ "schemaVersion": {
14
+ "const": 1
15
+ },
16
+ "kind": {
17
+ "const": "incremental-catalog-review"
18
+ },
19
+ "baselineInput": {
20
+ "type": "object",
21
+ "additionalProperties": false,
22
+ "required": [
23
+ "base",
24
+ "catalog",
25
+ "evidence",
26
+ "policy"
27
+ ],
28
+ "properties": {
29
+ "base": {},
30
+ "catalog": {},
31
+ "evidence": {
32
+ "type": "array",
33
+ "items": {
34
+ "type": "object",
35
+ "additionalProperties": false,
36
+ "required": [
37
+ "evidenceId",
38
+ "kind",
39
+ "uri",
40
+ "collectedAt",
41
+ "content",
42
+ "sha256",
43
+ "claims"
44
+ ],
45
+ "properties": {
46
+ "evidenceId": {
47
+ "type": "string",
48
+ "minLength": 1
49
+ },
50
+ "kind": {
51
+ "enum": [
52
+ "provider-documentation",
53
+ "provider-discovery",
54
+ "provider-advisory",
55
+ "evaluation",
56
+ "host-qualification"
57
+ ]
58
+ },
59
+ "uri": {
60
+ "type": "string",
61
+ "minLength": 1
62
+ },
63
+ "collectedAt": {
64
+ "type": "string",
65
+ "minLength": 1
66
+ },
67
+ "content": {
68
+ "type": "string",
69
+ "minLength": 1
70
+ },
71
+ "sha256": {
72
+ "type": "string",
73
+ "pattern": "^[a-f0-9]{64}$"
74
+ },
75
+ "claims": {
76
+ "type": "array",
77
+ "items": {
78
+ "type": "object",
79
+ "additionalProperties": false,
80
+ "required": [
81
+ "key",
82
+ "value",
83
+ "quote"
84
+ ],
85
+ "properties": {
86
+ "key": {
87
+ "type": "string",
88
+ "minLength": 1
89
+ },
90
+ "value": {},
91
+ "quote": {
92
+ "type": "string",
93
+ "minLength": 1
94
+ },
95
+ "taskDefinition": {
96
+ "type": "string",
97
+ "minLength": 1
98
+ },
99
+ "successCriterion": {
100
+ "type": "string",
101
+ "minLength": 1
102
+ }
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ },
109
+ "policy": {
110
+ "type": "object",
111
+ "additionalProperties": false,
112
+ "required": [
113
+ "revision",
114
+ "allowedSourceOrigins",
115
+ "maxEvidenceAgeDays"
116
+ ],
117
+ "properties": {
118
+ "schemaVersion": {
119
+ "const": 2
120
+ },
121
+ "revision": {
122
+ "type": "string",
123
+ "minLength": 1
124
+ },
125
+ "allowedSourceOrigins": {
126
+ "type": "array",
127
+ "items": {
128
+ "type": "string",
129
+ "minLength": 1
130
+ },
131
+ "minItems": 1
132
+ },
133
+ "maxEvidenceAgeDays": {
134
+ "anyOf": [
135
+ {
136
+ "type": "number",
137
+ "minimum": 0
138
+ },
139
+ {
140
+ "type": "null"
141
+ }
142
+ ]
143
+ },
144
+ "hostQualification": {
145
+ "type": "object",
146
+ "additionalProperties": false,
147
+ "required": [
148
+ "schemaVersion",
149
+ "artifactPins"
150
+ ],
151
+ "properties": {
152
+ "schemaVersion": {
153
+ "const": 1
154
+ },
155
+ "artifactPins": {
156
+ "type": "array",
157
+ "minItems": 1,
158
+ "items": {
159
+ "type": "object",
160
+ "additionalProperties": false,
161
+ "required": [
162
+ "qualificationSha256",
163
+ "runtimePackageSha256",
164
+ "adapterModuleSha256",
165
+ "receiptSha256",
166
+ "conformanceSha256"
167
+ ],
168
+ "properties": {
169
+ "qualificationSha256": {
170
+ "type": "string",
171
+ "pattern": "^[a-f0-9]{64}$"
172
+ },
173
+ "runtimePackageSha256": {
174
+ "type": "string",
175
+ "pattern": "^[a-f0-9]{64}$"
176
+ },
177
+ "adapterModuleSha256": {
178
+ "type": "string",
179
+ "pattern": "^[a-f0-9]{64}$"
180
+ },
181
+ "receiptSha256": {
182
+ "type": "string",
183
+ "pattern": "^[a-f0-9]{64}$"
184
+ },
185
+ "conformanceSha256": {
186
+ "type": "string",
187
+ "pattern": "^[a-f0-9]{64}$"
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ }
194
+ }
195
+ }
196
+ }
197
+ },
198
+ "rounds": {
199
+ "type": "array",
200
+ "minItems": 1,
201
+ "maxItems": 32,
202
+ "items": {
203
+ "type": "object",
204
+ "additionalProperties": false,
205
+ "required": [
206
+ "input",
207
+ "review"
208
+ ],
209
+ "properties": {
210
+ "input": {
211
+ "type": "object",
212
+ "additionalProperties": false,
213
+ "required": [
214
+ "base",
215
+ "catalog",
216
+ "evidence",
217
+ "policy"
218
+ ],
219
+ "properties": {
220
+ "base": {},
221
+ "catalog": {},
222
+ "evidence": {
223
+ "type": "array",
224
+ "items": {
225
+ "type": "object",
226
+ "additionalProperties": false,
227
+ "required": [
228
+ "evidenceId",
229
+ "kind",
230
+ "uri",
231
+ "collectedAt",
232
+ "content",
233
+ "sha256",
234
+ "claims"
235
+ ],
236
+ "properties": {
237
+ "evidenceId": {
238
+ "type": "string",
239
+ "minLength": 1
240
+ },
241
+ "kind": {
242
+ "enum": [
243
+ "provider-documentation",
244
+ "provider-discovery",
245
+ "provider-advisory",
246
+ "evaluation",
247
+ "host-qualification"
248
+ ]
249
+ },
250
+ "uri": {
251
+ "type": "string",
252
+ "minLength": 1
253
+ },
254
+ "collectedAt": {
255
+ "type": "string",
256
+ "minLength": 1
257
+ },
258
+ "content": {
259
+ "type": "string",
260
+ "minLength": 1
261
+ },
262
+ "sha256": {
263
+ "type": "string",
264
+ "pattern": "^[a-f0-9]{64}$"
265
+ },
266
+ "claims": {
267
+ "type": "array",
268
+ "items": {
269
+ "type": "object",
270
+ "additionalProperties": false,
271
+ "required": [
272
+ "key",
273
+ "value",
274
+ "quote"
275
+ ],
276
+ "properties": {
277
+ "key": {
278
+ "type": "string",
279
+ "minLength": 1
280
+ },
281
+ "value": {},
282
+ "quote": {
283
+ "type": "string",
284
+ "minLength": 1
285
+ },
286
+ "taskDefinition": {
287
+ "type": "string",
288
+ "minLength": 1
289
+ },
290
+ "successCriterion": {
291
+ "type": "string",
292
+ "minLength": 1
293
+ }
294
+ }
295
+ }
296
+ }
297
+ }
298
+ }
299
+ },
300
+ "policy": {
301
+ "type": "object",
302
+ "additionalProperties": false,
303
+ "required": [
304
+ "revision",
305
+ "allowedSourceOrigins",
306
+ "maxEvidenceAgeDays"
307
+ ],
308
+ "properties": {
309
+ "schemaVersion": {
310
+ "const": 2
311
+ },
312
+ "revision": {
313
+ "type": "string",
314
+ "minLength": 1
315
+ },
316
+ "allowedSourceOrigins": {
317
+ "type": "array",
318
+ "items": {
319
+ "type": "string",
320
+ "minLength": 1
321
+ },
322
+ "minItems": 1
323
+ },
324
+ "maxEvidenceAgeDays": {
325
+ "anyOf": [
326
+ {
327
+ "type": "number",
328
+ "minimum": 0
329
+ },
330
+ {
331
+ "type": "null"
332
+ }
333
+ ]
334
+ },
335
+ "hostQualification": {
336
+ "type": "object",
337
+ "additionalProperties": false,
338
+ "required": [
339
+ "schemaVersion",
340
+ "artifactPins"
341
+ ],
342
+ "properties": {
343
+ "schemaVersion": {
344
+ "const": 1
345
+ },
346
+ "artifactPins": {
347
+ "type": "array",
348
+ "minItems": 1,
349
+ "items": {
350
+ "type": "object",
351
+ "additionalProperties": false,
352
+ "required": [
353
+ "qualificationSha256",
354
+ "runtimePackageSha256",
355
+ "adapterModuleSha256",
356
+ "receiptSha256",
357
+ "conformanceSha256"
358
+ ],
359
+ "properties": {
360
+ "qualificationSha256": {
361
+ "type": "string",
362
+ "pattern": "^[a-f0-9]{64}$"
363
+ },
364
+ "runtimePackageSha256": {
365
+ "type": "string",
366
+ "pattern": "^[a-f0-9]{64}$"
367
+ },
368
+ "adapterModuleSha256": {
369
+ "type": "string",
370
+ "pattern": "^[a-f0-9]{64}$"
371
+ },
372
+ "receiptSha256": {
373
+ "type": "string",
374
+ "pattern": "^[a-f0-9]{64}$"
375
+ },
376
+ "conformanceSha256": {
377
+ "type": "string",
378
+ "pattern": "^[a-f0-9]{64}$"
379
+ }
380
+ }
381
+ }
382
+ }
383
+ }
384
+ }
385
+ }
386
+ }
387
+ }
388
+ },
389
+ "review": {
390
+ "type": "object",
391
+ "additionalProperties": false,
392
+ "required": [
393
+ "schemaVersion",
394
+ "kind",
395
+ "recordId",
396
+ "planHash",
397
+ "instructionsHash",
398
+ "reviewer",
399
+ "receipt",
400
+ "modelOutput",
401
+ "reviewedAt"
402
+ ],
403
+ "properties": {
404
+ "schemaVersion": {
405
+ "const": 1
406
+ },
407
+ "kind": {
408
+ "const": "catalog-delta-review"
409
+ },
410
+ "recordId": {
411
+ "type": "string",
412
+ "pattern": "^[a-f0-9]{64}$"
413
+ },
414
+ "planHash": {
415
+ "type": "string",
416
+ "pattern": "^[a-f0-9]{64}$"
417
+ },
418
+ "instructionsHash": {
419
+ "type": "string",
420
+ "pattern": "^[a-f0-9]{64}$"
421
+ },
422
+ "reviewer": {
423
+ "type": "object",
424
+ "additionalProperties": false,
425
+ "required": [
426
+ "provider",
427
+ "providerModelId",
428
+ "profileId",
429
+ "profileRevision",
430
+ "spendingCap"
431
+ ],
432
+ "properties": {
433
+ "provider": {
434
+ "type": "string",
435
+ "minLength": 1
436
+ },
437
+ "providerModelId": {
438
+ "type": "string",
439
+ "minLength": 1
440
+ },
441
+ "profileId": {
442
+ "type": "string",
443
+ "minLength": 1
444
+ },
445
+ "profileRevision": {
446
+ "type": "string",
447
+ "minLength": 1
448
+ },
449
+ "spendingCap": {
450
+ "anyOf": [
451
+ {
452
+ "type": "object",
453
+ "additionalProperties": false,
454
+ "required": [
455
+ "currency",
456
+ "amount"
457
+ ],
458
+ "properties": {
459
+ "currency": {
460
+ "type": "string",
461
+ "minLength": 1
462
+ },
463
+ "amount": {
464
+ "type": "number",
465
+ "minimum": 0
466
+ }
467
+ }
468
+ },
469
+ {
470
+ "type": "null"
471
+ }
472
+ ]
473
+ }
474
+ }
475
+ },
476
+ "receipt": {
477
+ "type": "object"
478
+ },
479
+ "modelOutput": {
480
+ "type": "object",
481
+ "additionalProperties": false,
482
+ "required": [
483
+ "schemaVersion",
484
+ "planHash",
485
+ "outcome",
486
+ "findings",
487
+ "metadataFindings",
488
+ "closures",
489
+ "issues"
490
+ ],
491
+ "properties": {
492
+ "schemaVersion": {
493
+ "const": 1
494
+ },
495
+ "planHash": {
496
+ "type": "string",
497
+ "pattern": "^[a-f0-9]{64}$"
498
+ },
499
+ "outcome": {
500
+ "enum": [
501
+ "accepted",
502
+ "needs-evidence",
503
+ "rejected"
504
+ ]
505
+ },
506
+ "findings": {
507
+ "type": "array",
508
+ "items": {
509
+ "type": "object",
510
+ "additionalProperties": false,
511
+ "required": [
512
+ "factKey",
513
+ "status",
514
+ "evidenceIds",
515
+ "reason"
516
+ ],
517
+ "properties": {
518
+ "factKey": {
519
+ "type": "string",
520
+ "minLength": 1
521
+ },
522
+ "status": {
523
+ "enum": [
524
+ "supported",
525
+ "insufficient",
526
+ "contradicted"
527
+ ]
528
+ },
529
+ "evidenceIds": {
530
+ "type": "array",
531
+ "items": {
532
+ "type": "string",
533
+ "minLength": 1
534
+ }
535
+ },
536
+ "reason": {
537
+ "type": "string",
538
+ "minLength": 1
539
+ }
540
+ }
541
+ }
542
+ },
543
+ "metadataFindings": {
544
+ "type": "array",
545
+ "items": {
546
+ "type": "object",
547
+ "additionalProperties": false,
548
+ "required": [
549
+ "changeId",
550
+ "status",
551
+ "evidenceIds",
552
+ "reason"
553
+ ],
554
+ "properties": {
555
+ "changeId": {
556
+ "type": "string",
557
+ "pattern": "^[a-f0-9]{64}$"
558
+ },
559
+ "status": {
560
+ "enum": [
561
+ "supported",
562
+ "insufficient",
563
+ "contradicted"
564
+ ]
565
+ },
566
+ "evidenceIds": {
567
+ "type": "array",
568
+ "items": {
569
+ "type": "string",
570
+ "minLength": 1
571
+ }
572
+ },
573
+ "reason": {
574
+ "type": "string",
575
+ "minLength": 1
576
+ }
577
+ }
578
+ }
579
+ },
580
+ "closures": {
581
+ "type": "array",
582
+ "items": {
583
+ "type": "object",
584
+ "additionalProperties": false,
585
+ "required": [
586
+ "gapId",
587
+ "status",
588
+ "evidenceIds",
589
+ "reason"
590
+ ],
591
+ "properties": {
592
+ "gapId": {
593
+ "type": "string",
594
+ "pattern": "^[a-f0-9]{64}$"
595
+ },
596
+ "status": {
597
+ "enum": [
598
+ "closed",
599
+ "open"
600
+ ]
601
+ },
602
+ "evidenceIds": {
603
+ "type": "array",
604
+ "items": {
605
+ "type": "string",
606
+ "minLength": 1
607
+ }
608
+ },
609
+ "reason": {
610
+ "type": "string",
611
+ "minLength": 1
612
+ }
613
+ }
614
+ }
615
+ },
616
+ "issues": {
617
+ "type": "array",
618
+ "items": {
619
+ "type": "string",
620
+ "minLength": 1
621
+ }
622
+ }
623
+ }
624
+ },
625
+ "reviewedAt": {
626
+ "type": "string",
627
+ "minLength": 1
628
+ }
629
+ }
630
+ }
631
+ }
632
+ }
633
+ },
634
+ "outcome": {
635
+ "enum": [
636
+ "accepted",
637
+ "needs-evidence"
638
+ ]
639
+ },
640
+ "compositionHash": {
641
+ "type": "string",
642
+ "pattern": "^[a-f0-9]{64}$"
643
+ }
644
+ }
645
+ }