@usherlabs/cex-broker 0.2.44 → 0.2.46

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 (41) hide show
  1. package/README.md +1 -1
  2. package/dist/commands/cli.js +16231 -15573
  3. package/dist/handlers/subscribe/handler.d.ts +2 -0
  4. package/dist/helpers/market-data-archive/capture-contract.d.ts +3 -2
  5. package/dist/helpers/market-data-archive/types.d.ts +8 -4
  6. package/dist/helpers/market-data-vendor-backfill/archive-reader.d.ts +26 -0
  7. package/dist/helpers/market-data-vendor-backfill/batching.d.ts +10 -0
  8. package/dist/helpers/market-data-vendor-backfill/conformance-fixtures.d.ts +80 -0
  9. package/dist/helpers/market-data-vendor-backfill/contracts.d.ts +393 -0
  10. package/dist/helpers/market-data-vendor-backfill/core.d.ts +100 -0
  11. package/dist/helpers/market-data-vendor-backfill/cryptohftdata.d.ts +77 -0
  12. package/dist/helpers/market-data-vendor-backfill/forwarder-client.d.ts +25 -0
  13. package/dist/helpers/market-data-vendor-backfill/identity.d.ts +10 -0
  14. package/dist/helpers/market-data-vendor-backfill/manifests.d.ts +1086 -0
  15. package/dist/helpers/market-data-vendor-backfill/promotion.d.ts +9 -0
  16. package/dist/helpers/market-data-vendor-backfill/qualification.d.ts +20 -0
  17. package/dist/helpers/market-data-vendor-backfill/selection.d.ts +30 -0
  18. package/dist/helpers/market-data-vendor-backfill/semantic-verification.d.ts +24 -0
  19. package/dist/helpers/public-market-data-feed/identity.d.ts +12 -0
  20. package/dist/helpers/public-market-data-feed/index.d.ts +5 -0
  21. package/dist/helpers/public-market-data-feed/orderbook-coalescing-evidence.d.ts +79 -0
  22. package/dist/helpers/public-market-data-feed/orderbook-profile.d.ts +54 -0
  23. package/dist/helpers/public-market-data-feed/subscriber-buffer.d.ts +31 -0
  24. package/dist/helpers/public-market-data-feed/supervisor.d.ts +82 -0
  25. package/dist/index.d.ts +1 -0
  26. package/dist/index.js +16221 -15563
  27. package/dist/index.js.map +21 -18
  28. package/dist/market-data-vendor-backfill/fixtures/conformance-v1.json +448 -0
  29. package/dist/market-data-vendor-backfill/policies/capability-policy.json +28 -0
  30. package/dist/market-data-vendor-backfill/policies/resource-policy.json +16 -0
  31. package/dist/market-data-vendor-backfill/schema-manifest.json +31 -0
  32. package/dist/market-data-vendor-backfill/schemas/archive-selection.schema.json +224 -0
  33. package/dist/market-data-vendor-backfill/schemas/promotion-receipt.schema.json +171 -0
  34. package/dist/market-data-vendor-backfill/schemas/request.schema.json +166 -0
  35. package/dist/market-data-vendor-backfill/schemas/required-clock.schema.json +47 -0
  36. package/dist/market-data-vendor-backfill/schemas/result.schema.json +198 -0
  37. package/dist/market-data-vendor-backfill.d.ts +18 -0
  38. package/dist/market-data-vendor-backfill.js +18819 -0
  39. package/dist/market-data-vendor-backfill.js.map +206 -0
  40. package/dist/server.d.ts +2 -1
  41. package/package.json +24 -2
@@ -0,0 +1,1086 @@
1
+ export declare const CAPABILITY_POLICY_ID: "market-data-vendor-backfill-capabilities/v1";
2
+ export declare const RESOURCE_POLICY_ID: "market-data-vendor-backfill-resources/v1";
3
+ export declare const ADAPTER_POLICY_ID: "cryptohftdata-orderbook-adapter/v1";
4
+ export declare const ACQUISITION_POLICY_ID: "cryptohftdata-hourly-acquisition/v1";
5
+ export declare const CAPABILITY_POLICY: Readonly<{
6
+ policy_sha256: string;
7
+ policy_id: "market-data-vendor-backfill-capabilities/v1";
8
+ provider: "cryptohftdata";
9
+ adapter_policy: {
10
+ readonly policy_id: "cryptohftdata-orderbook-adapter/v1";
11
+ readonly adapter_version: "cryptohftdata-orderbook/v2";
12
+ };
13
+ acquisition_policy: {
14
+ readonly policy_id: "cryptohftdata-hourly-acquisition/v1";
15
+ readonly object_granularity: "utc_hour";
16
+ readonly authentication: "bearer";
17
+ readonly initialization_lookback_ms: 0;
18
+ };
19
+ profiles: readonly [{
20
+ readonly exchange: "okx";
21
+ readonly market_type: "spot";
22
+ readonly feed: "ORDERBOOK";
23
+ readonly canonical_trading_pair: "ARB-USDT";
24
+ readonly provider_exchange_id: "okx_spot";
25
+ readonly resolved_symbol: "ARB-USDT";
26
+ readonly construction_modes: readonly ["sampled_top_n_snapshot"];
27
+ readonly source_policies: readonly ["authoritative_window"];
28
+ readonly max_depth: 400;
29
+ }];
30
+ }>;
31
+ export declare const RESOURCE_POLICY: Readonly<{
32
+ policy_sha256: string;
33
+ policy_id: "market-data-vendor-backfill-resources/v1";
34
+ limits: {
35
+ readonly max_files: 10000;
36
+ readonly max_bytes: number;
37
+ readonly max_rows: 1000000000;
38
+ readonly max_duration_ms: number;
39
+ readonly max_boundary_lookback_ms: number;
40
+ };
41
+ request_bounds: {
42
+ readonly max_depth: 500;
43
+ readonly max_window_ms: number;
44
+ readonly max_required_events: 100000;
45
+ };
46
+ }>;
47
+ export declare const EFFECTIVE_ADAPTER_POLICY_PIN: Readonly<{
48
+ policy_id: "cryptohftdata-orderbook-adapter/v1";
49
+ policy_sha256: string;
50
+ }>;
51
+ export declare const EFFECTIVE_ACQUISITION_POLICY_PIN: Readonly<{
52
+ policy_id: "cryptohftdata-hourly-acquisition/v1";
53
+ policy_sha256: string;
54
+ }>;
55
+ export declare const SCHEMA_ARTIFACTS: readonly Readonly<{
56
+ schema_id: string;
57
+ path: "schemas/request.schema.json" | "schemas/result.schema.json" | "schemas/required-clock.schema.json" | "schemas/archive-selection.schema.json" | "schemas/promotion-receipt.schema.json";
58
+ schema_sha256: string;
59
+ schema: {
60
+ $schema: string;
61
+ $id: string;
62
+ title: string;
63
+ type: string;
64
+ additionalProperties: boolean;
65
+ required: string[];
66
+ properties: {
67
+ schema_id: {
68
+ const: string;
69
+ };
70
+ selection_sha256: {
71
+ $ref: string;
72
+ };
73
+ scope: {
74
+ $ref: string;
75
+ };
76
+ required_clock: {
77
+ $ref: string;
78
+ };
79
+ coverage_policy: {
80
+ $ref: string;
81
+ };
82
+ source_policy: {
83
+ enum: string[];
84
+ };
85
+ coverage_class: {
86
+ enum: string[];
87
+ };
88
+ requested_intervals: {
89
+ type: string;
90
+ minItems: number;
91
+ items: {
92
+ $ref: string;
93
+ };
94
+ };
95
+ selected_intervals: {
96
+ type: string;
97
+ items: {
98
+ type: string;
99
+ additionalProperties: boolean;
100
+ required: string[];
101
+ properties: {
102
+ start_at: {
103
+ $ref: string;
104
+ };
105
+ end_at: {
106
+ $ref: string;
107
+ };
108
+ capture_bundle_id: {
109
+ $ref: string;
110
+ };
111
+ capture_origin: {
112
+ $ref: string;
113
+ };
114
+ };
115
+ };
116
+ };
117
+ precedence: {
118
+ type: string;
119
+ minItems: number;
120
+ maxItems: number;
121
+ uniqueItems: boolean;
122
+ items: {
123
+ enum: string[];
124
+ };
125
+ };
126
+ bundles: {
127
+ type: string;
128
+ items: {
129
+ type: string;
130
+ additionalProperties: boolean;
131
+ required: string[];
132
+ properties: {
133
+ capture_bundle_id: {
134
+ $ref: string;
135
+ };
136
+ capture_origin: {
137
+ $ref: string;
138
+ };
139
+ interval: {
140
+ $ref: string;
141
+ };
142
+ qualification: {
143
+ oneOf: ({
144
+ type: string;
145
+ additionalProperties?: undefined;
146
+ required?: undefined;
147
+ properties?: undefined;
148
+ } | {
149
+ type: string;
150
+ additionalProperties: boolean;
151
+ required: string[];
152
+ properties: {
153
+ qualification_event_id: {
154
+ $ref: string;
155
+ };
156
+ state: {
157
+ const: string;
158
+ };
159
+ receipt_id: {
160
+ $ref: string;
161
+ };
162
+ promotion_identity_sha256: {
163
+ $ref: string;
164
+ };
165
+ };
166
+ })[];
167
+ };
168
+ };
169
+ };
170
+ };
171
+ support_anchors: {
172
+ type: string;
173
+ items: {
174
+ type: string;
175
+ additionalProperties: boolean;
176
+ required: string[];
177
+ properties: {
178
+ capture_bundle_id: {
179
+ $ref: string;
180
+ };
181
+ raw_capture_id: {
182
+ $ref: string;
183
+ };
184
+ snapshot_id: {
185
+ $ref: string;
186
+ };
187
+ source_time: {
188
+ $ref: string;
189
+ };
190
+ normalized_summary_checksum: {
191
+ $ref: string;
192
+ };
193
+ metadata_ref: {
194
+ type: string;
195
+ additionalProperties: boolean;
196
+ required: string[];
197
+ properties: {
198
+ capture_origin: {
199
+ $ref: string;
200
+ };
201
+ qualification_event_id: {
202
+ oneOf: ({
203
+ type: string;
204
+ $ref?: undefined;
205
+ } | {
206
+ $ref: string;
207
+ type?: undefined;
208
+ })[];
209
+ };
210
+ receipt_id: {
211
+ oneOf: ({
212
+ type: string;
213
+ $ref?: undefined;
214
+ } | {
215
+ $ref: string;
216
+ type?: undefined;
217
+ })[];
218
+ };
219
+ };
220
+ };
221
+ };
222
+ };
223
+ };
224
+ receipt_ids: {
225
+ type: string;
226
+ uniqueItems: boolean;
227
+ items: {
228
+ $ref: string;
229
+ };
230
+ };
231
+ qualification_event_ids: {
232
+ type: string;
233
+ uniqueItems: boolean;
234
+ items: {
235
+ $ref: string;
236
+ };
237
+ };
238
+ resolved_at: {
239
+ $ref: string;
240
+ };
241
+ };
242
+ $defs: {
243
+ uuid: {
244
+ type: string;
245
+ pattern: string;
246
+ };
247
+ sha256: {
248
+ type: string;
249
+ pattern: string;
250
+ };
251
+ timestamp: {
252
+ type: string;
253
+ pattern: string;
254
+ };
255
+ safeInteger: {
256
+ type: string;
257
+ minimum: number;
258
+ maximum: number;
259
+ };
260
+ captureOrigin: {
261
+ enum: string[];
262
+ };
263
+ scope: {
264
+ type: string;
265
+ additionalProperties: boolean;
266
+ required: string[];
267
+ properties: {
268
+ exchange: {
269
+ type: string;
270
+ pattern: string;
271
+ };
272
+ trading_pair: {
273
+ type: string;
274
+ minLength: number;
275
+ maxLength: number;
276
+ };
277
+ market_type: {
278
+ enum: string[];
279
+ };
280
+ feed: {
281
+ const: string;
282
+ };
283
+ };
284
+ };
285
+ clockReference: {
286
+ type: string;
287
+ additionalProperties: boolean;
288
+ required: string[];
289
+ properties: {
290
+ clock_id: {
291
+ $ref: string;
292
+ };
293
+ clock_sha256: {
294
+ $ref: string;
295
+ };
296
+ event_count: {
297
+ $ref: string;
298
+ };
299
+ };
300
+ };
301
+ coveragePolicy: {
302
+ type: string;
303
+ additionalProperties: boolean;
304
+ required: string[];
305
+ properties: {
306
+ policy_id: {
307
+ const: string;
308
+ };
309
+ max_asof_lag_ms: {
310
+ $ref: string;
311
+ };
312
+ future_rows: {
313
+ const: string;
314
+ };
315
+ missing_required_event: {
316
+ const: string;
317
+ };
318
+ };
319
+ };
320
+ interval: {
321
+ type: string;
322
+ additionalProperties: boolean;
323
+ required: string[];
324
+ properties: {
325
+ start_at: {
326
+ $ref: string;
327
+ };
328
+ end_at: {
329
+ $ref: string;
330
+ };
331
+ };
332
+ };
333
+ };
334
+ } | {
335
+ $schema: string;
336
+ $id: string;
337
+ title: string;
338
+ type: string;
339
+ additionalProperties: boolean;
340
+ required: string[];
341
+ properties: {
342
+ schema_id: {
343
+ const: string;
344
+ };
345
+ receipt_id: {
346
+ $ref: string;
347
+ };
348
+ promotion_identity_sha256: {
349
+ $ref: string;
350
+ };
351
+ verified_at: {
352
+ $ref: string;
353
+ };
354
+ request_id: {
355
+ $ref: string;
356
+ };
357
+ idempotency_key: {
358
+ $ref: string;
359
+ };
360
+ source: {
361
+ const: string;
362
+ };
363
+ capture_origin: {
364
+ const: string;
365
+ };
366
+ source_mode: {
367
+ const: string;
368
+ };
369
+ provider: {
370
+ type: string;
371
+ minLength: number;
372
+ maxLength: number;
373
+ };
374
+ adapter_version: {
375
+ type: string;
376
+ minLength: number;
377
+ maxLength: number;
378
+ };
379
+ effective_policies: {
380
+ type: string;
381
+ additionalProperties: boolean;
382
+ required: string[];
383
+ properties: {
384
+ capability_policy: {
385
+ $ref: string;
386
+ };
387
+ resource_policy: {
388
+ $ref: string;
389
+ };
390
+ adapter_policy: {
391
+ $ref: string;
392
+ };
393
+ acquisition_policy: {
394
+ $ref: string;
395
+ };
396
+ };
397
+ };
398
+ capture_bundle_id: {
399
+ $ref: string;
400
+ };
401
+ scope: {
402
+ $ref: string;
403
+ };
404
+ window: {
405
+ $ref: string;
406
+ };
407
+ depth: {
408
+ type: string;
409
+ minimum: number;
410
+ maximum: number;
411
+ };
412
+ construction_mode: {
413
+ enum: string[];
414
+ };
415
+ canonical_schema: {
416
+ type: string;
417
+ additionalProperties: boolean;
418
+ required: string[];
419
+ properties: {
420
+ schema_id: {
421
+ type: string;
422
+ minLength: number;
423
+ maxLength: number;
424
+ };
425
+ schema_sha256: {
426
+ $ref: string;
427
+ };
428
+ };
429
+ };
430
+ coverage_policy: {
431
+ $ref: string;
432
+ };
433
+ selection_sha256: {
434
+ $ref: string;
435
+ };
436
+ vendor_semantic_digest: {
437
+ $ref: string;
438
+ };
439
+ canonical_semantic_digest: {
440
+ $ref: string;
441
+ };
442
+ prefix_digest: {
443
+ $ref: string;
444
+ };
445
+ suffix_digest: {
446
+ $ref: string;
447
+ };
448
+ seam_verified: {
449
+ const: boolean;
450
+ };
451
+ coverage_verified: {
452
+ const: boolean;
453
+ };
454
+ dataset_objects: {
455
+ type: string;
456
+ minItems: number;
457
+ maxItems: number;
458
+ items: {
459
+ type: string;
460
+ additionalProperties: boolean;
461
+ required: string[];
462
+ properties: {
463
+ identity: {
464
+ type: string;
465
+ minLength: number;
466
+ maxLength: number;
467
+ };
468
+ checksum: {
469
+ $ref: string;
470
+ };
471
+ bytes: {
472
+ $ref: string;
473
+ };
474
+ rows: {
475
+ $ref: string;
476
+ };
477
+ };
478
+ };
479
+ };
480
+ };
481
+ $defs: {
482
+ uuid: {
483
+ type: string;
484
+ pattern: string;
485
+ };
486
+ sha256: {
487
+ type: string;
488
+ pattern: string;
489
+ };
490
+ timestamp: {
491
+ type: string;
492
+ pattern: string;
493
+ };
494
+ safeInteger: {
495
+ type: string;
496
+ minimum: number;
497
+ maximum: number;
498
+ };
499
+ scope: {
500
+ type: string;
501
+ additionalProperties: boolean;
502
+ required: string[];
503
+ properties: {
504
+ exchange: {
505
+ type: string;
506
+ pattern: string;
507
+ };
508
+ trading_pair: {
509
+ type: string;
510
+ minLength: number;
511
+ maxLength: number;
512
+ };
513
+ market_type: {
514
+ enum: string[];
515
+ };
516
+ feed: {
517
+ const: string;
518
+ };
519
+ };
520
+ };
521
+ interval: {
522
+ type: string;
523
+ additionalProperties: boolean;
524
+ required: string[];
525
+ properties: {
526
+ start_at: {
527
+ $ref: string;
528
+ };
529
+ end_at: {
530
+ $ref: string;
531
+ };
532
+ };
533
+ };
534
+ coveragePolicy: {
535
+ type: string;
536
+ additionalProperties: boolean;
537
+ required: string[];
538
+ properties: {
539
+ policy_id: {
540
+ const: string;
541
+ };
542
+ max_asof_lag_ms: {
543
+ $ref: string;
544
+ };
545
+ future_rows: {
546
+ const: string;
547
+ };
548
+ missing_required_event: {
549
+ const: string;
550
+ };
551
+ };
552
+ };
553
+ policyPin: {
554
+ type: string;
555
+ additionalProperties: boolean;
556
+ required: string[];
557
+ properties: {
558
+ policy_id: {
559
+ type: string;
560
+ minLength: number;
561
+ maxLength: number;
562
+ };
563
+ policy_sha256: {
564
+ $ref: string;
565
+ };
566
+ };
567
+ };
568
+ };
569
+ } | {
570
+ $schema: string;
571
+ $id: string;
572
+ title: string;
573
+ type: string;
574
+ additionalProperties: boolean;
575
+ required: string[];
576
+ properties: {
577
+ schema_id: {
578
+ const: string;
579
+ };
580
+ request_id: {
581
+ $ref: string;
582
+ };
583
+ attempt_id: {
584
+ $ref: string;
585
+ };
586
+ idempotency_key: {
587
+ $ref: string;
588
+ };
589
+ scope: {
590
+ $ref: string;
591
+ };
592
+ window: {
593
+ $ref: string;
594
+ };
595
+ depth: {
596
+ type: string;
597
+ minimum: number;
598
+ maximum: number;
599
+ };
600
+ construction_mode: {
601
+ enum: string[];
602
+ };
603
+ source_policy: {
604
+ enum: string[];
605
+ };
606
+ target: {
607
+ type: string;
608
+ additionalProperties: boolean;
609
+ required: string[];
610
+ properties: {
611
+ environment: {
612
+ type: string;
613
+ pattern: string;
614
+ };
615
+ cluster: {
616
+ type: string;
617
+ pattern: string;
618
+ };
619
+ };
620
+ };
621
+ coverage_policy: {
622
+ $ref: string;
623
+ };
624
+ required_clock: {
625
+ type: string;
626
+ additionalProperties: boolean;
627
+ required: string[];
628
+ properties: {
629
+ schema_id: {
630
+ const: string;
631
+ };
632
+ clock_id: {
633
+ $ref: string;
634
+ };
635
+ file_name: {
636
+ type: string;
637
+ pattern: string;
638
+ };
639
+ clock_sha256: {
640
+ $ref: string;
641
+ };
642
+ event_count: {
643
+ $ref: string;
644
+ };
645
+ };
646
+ };
647
+ initial_selection: {
648
+ $ref: string;
649
+ };
650
+ expected_canonical_schema: {
651
+ $ref: string;
652
+ };
653
+ product_pins: {
654
+ type: string;
655
+ additionalProperties: boolean;
656
+ required: string[];
657
+ properties: {
658
+ capability_policy: {
659
+ $ref: string;
660
+ };
661
+ resource_policy: {
662
+ $ref: string;
663
+ };
664
+ };
665
+ };
666
+ production_authorization_id: {
667
+ $ref: string;
668
+ };
669
+ };
670
+ $defs: {
671
+ uuid: {
672
+ type: string;
673
+ pattern: string;
674
+ };
675
+ sha256: {
676
+ type: string;
677
+ pattern: string;
678
+ };
679
+ timestamp: {
680
+ type: string;
681
+ pattern: string;
682
+ };
683
+ safeInteger: {
684
+ type: string;
685
+ minimum: number;
686
+ maximum: number;
687
+ };
688
+ scope: {
689
+ type: string;
690
+ additionalProperties: boolean;
691
+ required: string[];
692
+ properties: {
693
+ exchange: {
694
+ type: string;
695
+ pattern: string;
696
+ };
697
+ trading_pair: {
698
+ type: string;
699
+ minLength: number;
700
+ maxLength: number;
701
+ };
702
+ market_type: {
703
+ enum: string[];
704
+ };
705
+ feed: {
706
+ const: string;
707
+ };
708
+ };
709
+ };
710
+ interval: {
711
+ type: string;
712
+ additionalProperties: boolean;
713
+ required: string[];
714
+ properties: {
715
+ start_at: {
716
+ $ref: string;
717
+ };
718
+ end_at: {
719
+ $ref: string;
720
+ };
721
+ };
722
+ };
723
+ coveragePolicy: {
724
+ type: string;
725
+ additionalProperties: boolean;
726
+ required: string[];
727
+ properties: {
728
+ policy_id: {
729
+ const: string;
730
+ };
731
+ max_asof_lag_ms: {
732
+ $ref: string;
733
+ };
734
+ future_rows: {
735
+ const: string;
736
+ };
737
+ missing_required_event: {
738
+ const: string;
739
+ };
740
+ };
741
+ };
742
+ artifactPin: {
743
+ type: string;
744
+ additionalProperties: boolean;
745
+ required: string[];
746
+ properties: {
747
+ schema_id: {
748
+ type: string;
749
+ minLength: number;
750
+ maxLength: number;
751
+ };
752
+ schema_sha256: {
753
+ $ref: string;
754
+ };
755
+ };
756
+ };
757
+ policyPin: {
758
+ type: string;
759
+ additionalProperties: boolean;
760
+ required: string[];
761
+ properties: {
762
+ policy_id: {
763
+ type: string;
764
+ minLength: number;
765
+ maxLength: number;
766
+ };
767
+ policy_sha256: {
768
+ $ref: string;
769
+ };
770
+ };
771
+ };
772
+ };
773
+ } | {
774
+ $schema: string;
775
+ $id: string;
776
+ title: string;
777
+ type: string;
778
+ additionalProperties: boolean;
779
+ required: string[];
780
+ properties: {
781
+ schema_id: {
782
+ const: string;
783
+ };
784
+ clock_id: {
785
+ $ref: string;
786
+ };
787
+ clock_sha256: {
788
+ $ref: string;
789
+ };
790
+ created_at: {
791
+ $ref: string;
792
+ };
793
+ targets: {
794
+ type: string;
795
+ minItems: number;
796
+ maxItems: number;
797
+ items: {
798
+ type: string;
799
+ additionalProperties: boolean;
800
+ required: string[];
801
+ properties: {
802
+ target_id: {
803
+ $ref: string;
804
+ };
805
+ target_at: {
806
+ $ref: string;
807
+ };
808
+ };
809
+ };
810
+ };
811
+ };
812
+ $defs: {
813
+ uuid: {
814
+ type: string;
815
+ pattern: string;
816
+ };
817
+ sha256: {
818
+ type: string;
819
+ pattern: string;
820
+ };
821
+ timestamp: {
822
+ type: string;
823
+ pattern: string;
824
+ };
825
+ };
826
+ } | {
827
+ $schema: string;
828
+ $id: string;
829
+ title: string;
830
+ type: string;
831
+ additionalProperties: boolean;
832
+ required: string[];
833
+ properties: {
834
+ schema_id: {
835
+ const: string;
836
+ };
837
+ result_sha256: {
838
+ $ref: string;
839
+ };
840
+ job_id: {
841
+ $ref: string;
842
+ };
843
+ request_file_sha256: {
844
+ oneOf: ({
845
+ type: string;
846
+ $ref?: undefined;
847
+ } | {
848
+ $ref: string;
849
+ type?: undefined;
850
+ })[];
851
+ };
852
+ executable_sha256: {
853
+ $ref: string;
854
+ };
855
+ schema_manifest_sha256: {
856
+ $ref: string;
857
+ };
858
+ cex_package: {
859
+ type: string;
860
+ additionalProperties: boolean;
861
+ required: string[];
862
+ properties: {
863
+ name: {
864
+ const: string;
865
+ };
866
+ version: {
867
+ type: string;
868
+ pattern: string;
869
+ };
870
+ package_sha256: {
871
+ $ref: string;
872
+ };
873
+ };
874
+ };
875
+ capability_policy: {
876
+ $ref: string;
877
+ };
878
+ resource_policy: {
879
+ $ref: string;
880
+ };
881
+ build: {
882
+ type: string;
883
+ additionalProperties: boolean;
884
+ required: string[];
885
+ properties: {
886
+ fiet_tee_commit: {
887
+ type: string;
888
+ pattern: string;
889
+ };
890
+ created_at: {
891
+ $ref: string;
892
+ };
893
+ };
894
+ };
895
+ started_at: {
896
+ $ref: string;
897
+ };
898
+ completed_at: {
899
+ $ref: string;
900
+ };
901
+ outcome: {
902
+ type: string;
903
+ additionalProperties: boolean;
904
+ required: string[];
905
+ properties: {
906
+ status: {
907
+ enum: string[];
908
+ };
909
+ reason_code: {
910
+ type: string;
911
+ pattern: string;
912
+ };
913
+ reason_subcode: {
914
+ oneOf: ({
915
+ type: string;
916
+ pattern?: undefined;
917
+ } | {
918
+ type: string;
919
+ pattern: string;
920
+ })[];
921
+ };
922
+ request_id: {
923
+ oneOf: ({
924
+ type: string;
925
+ $ref?: undefined;
926
+ } | {
927
+ $ref: string;
928
+ type?: undefined;
929
+ })[];
930
+ };
931
+ idempotency_key: {
932
+ oneOf: ({
933
+ type: string;
934
+ $ref?: undefined;
935
+ } | {
936
+ $ref: string;
937
+ type?: undefined;
938
+ })[];
939
+ };
940
+ target: {
941
+ oneOf: ({
942
+ type: string;
943
+ additionalProperties?: undefined;
944
+ required?: undefined;
945
+ properties?: undefined;
946
+ } | {
947
+ type: string;
948
+ additionalProperties: boolean;
949
+ required: string[];
950
+ properties: {
951
+ environment: {
952
+ type: string;
953
+ pattern: string;
954
+ };
955
+ cluster: {
956
+ type: string;
957
+ pattern: string;
958
+ };
959
+ };
960
+ })[];
961
+ };
962
+ selection: {
963
+ oneOf: ({
964
+ type: string;
965
+ $ref?: undefined;
966
+ } | {
967
+ $ref: string;
968
+ type?: undefined;
969
+ })[];
970
+ };
971
+ receipt: {
972
+ oneOf: ({
973
+ type: string;
974
+ $ref?: undefined;
975
+ } | {
976
+ $ref: string;
977
+ type?: undefined;
978
+ })[];
979
+ };
980
+ diagnostics: {
981
+ type: string;
982
+ maxProperties: number;
983
+ additionalProperties: {
984
+ oneOf: ({
985
+ type: string;
986
+ maxLength: number;
987
+ minimum?: undefined;
988
+ maximum?: undefined;
989
+ } | {
990
+ type: string;
991
+ minimum: number;
992
+ maximum: number;
993
+ maxLength?: undefined;
994
+ } | {
995
+ type: string;
996
+ maxLength?: undefined;
997
+ minimum?: undefined;
998
+ maximum?: undefined;
999
+ })[];
1000
+ };
1001
+ };
1002
+ };
1003
+ };
1004
+ };
1005
+ allOf: {
1006
+ if: {
1007
+ properties: {
1008
+ outcome: {
1009
+ type: string;
1010
+ properties: {
1011
+ status: {
1012
+ const: string;
1013
+ };
1014
+ reason_subcode: {
1015
+ const: string;
1016
+ };
1017
+ };
1018
+ required: string[];
1019
+ };
1020
+ };
1021
+ required: string[];
1022
+ };
1023
+ then: {
1024
+ type: string;
1025
+ properties: {
1026
+ request_file_sha256: {
1027
+ type: string;
1028
+ };
1029
+ };
1030
+ };
1031
+ else: {
1032
+ type: string;
1033
+ properties: {
1034
+ request_file_sha256: {
1035
+ $ref: string;
1036
+ };
1037
+ };
1038
+ };
1039
+ }[];
1040
+ $defs: {
1041
+ uuid: {
1042
+ type: string;
1043
+ pattern: string;
1044
+ };
1045
+ sha256: {
1046
+ type: string;
1047
+ pattern: string;
1048
+ };
1049
+ timestamp: {
1050
+ type: string;
1051
+ pattern: string;
1052
+ };
1053
+ policyPin: {
1054
+ type: string;
1055
+ additionalProperties: boolean;
1056
+ required: string[];
1057
+ properties: {
1058
+ policy_id: {
1059
+ type: string;
1060
+ minLength: number;
1061
+ maxLength: number;
1062
+ };
1063
+ policy_sha256: {
1064
+ $ref: string;
1065
+ };
1066
+ };
1067
+ };
1068
+ };
1069
+ };
1070
+ }>[];
1071
+ export declare const SCHEMA_MANIFEST: Readonly<{
1072
+ manifest_sha256: string;
1073
+ schema_id: string;
1074
+ artifacts: {
1075
+ schema_id: string;
1076
+ path: "schemas/request.schema.json" | "schemas/result.schema.json" | "schemas/required-clock.schema.json" | "schemas/archive-selection.schema.json" | "schemas/promotion-receipt.schema.json";
1077
+ schema_sha256: string;
1078
+ }[];
1079
+ }>;
1080
+ export type PolicyPin = {
1081
+ policy_id: string;
1082
+ policy_sha256: string;
1083
+ };
1084
+ export declare function assertPolicyDocumentIdentity(policy: Record<string, unknown> & {
1085
+ policy_sha256: string;
1086
+ }): void;