@aiquants/enrichment-core 0.1.1 → 0.2.0

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.
package/dist/index.d.cts CHANGED
@@ -17,7 +17,7 @@ declare abstract class BaseEnrichmentClient {
17
17
  protected readonly fetchFn: typeof fetch;
18
18
  protected readonly timeoutMs: number;
19
19
  constructor(options: EnrichmentClientOptions);
20
- protected request<T>(path: string, method: "GET" | "POST", body?: unknown, query?: Record<string, string | undefined>): Promise<T>;
20
+ protected request<T>(path: string, tenantId: string, body: unknown): Promise<T>;
21
21
  }
22
22
  declare const ModelProviderSchema: z.ZodEnum<[
23
23
  "google_cloud",
@@ -255,14 +255,6 @@ declare const CircuitBreakerStatusSchema: z.ZodEnum<[
255
255
  "HALF_OPEN"
256
256
  ]>;
257
257
  type CircuitBreakerStatus = z.infer<typeof CircuitBreakerStatusSchema>;
258
- declare const QualityTierSchema: z.ZodEnum<[
259
- "FULL_HYBRID",
260
- "VECTOR_ONLY",
261
- "GRAPH_ONLY",
262
- "STANDARD_SEMANTIC",
263
- "DEGRADED_KEYWORD_ONLY"
264
- ]>;
265
- type QualityTier = z.infer<typeof QualityTierSchema>;
266
258
  declare const SearchModeSchema: z.ZodEnum<[
267
259
  "KEYWORD",
268
260
  "SPARSE",
@@ -271,42 +263,26 @@ declare const SearchModeSchema: z.ZodEnum<[
271
263
  "GRAPH_TRAVERSE"
272
264
  ]>;
273
265
  declare const SearchMetadataSchema: z.ZodObject<{
274
- search_mode: z.ZodEnum<[
275
- "KEYWORD",
276
- "SPARSE",
277
- "DENSE",
278
- "HYBRID",
279
- "GRAPH_TRAVERSE"
280
- ]>;
281
- quality_tier: z.ZodEnum<[
282
- "FULL_HYBRID",
283
- "VECTOR_ONLY",
284
- "GRAPH_ONLY",
285
- "STANDARD_SEMANTIC",
286
- "DEGRADED_KEYWORD_ONLY"
287
- ]>;
288
- is_degraded: z.ZodBoolean;
289
- degradation_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
290
- circuit_breaker_status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<[
291
- "CLOSED",
292
- "OPEN",
293
- "HALF_OPEN"
294
- ]>>>;
266
+ circuit_breaker_status: z.ZodString;
267
+ quality_tier: z.ZodString;
295
268
  latency_ms: z.ZodNumber;
269
+ total_hits: z.ZodNumber;
270
+ fallback_applied: z.ZodBoolean;
271
+ degraded_reason: z.ZodNullable<z.ZodString>;
296
272
  }, "strip", z.ZodTypeAny, {
297
- search_mode: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE";
298
- quality_tier: "FULL_HYBRID" | "VECTOR_ONLY" | "GRAPH_ONLY" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
299
- is_degraded: boolean;
273
+ circuit_breaker_status: string;
274
+ quality_tier: string;
300
275
  latency_ms: number;
301
- degradation_reason?: string | null | undefined;
302
- circuit_breaker_status?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN"> | undefined;
276
+ total_hits: number;
277
+ fallback_applied: boolean;
278
+ degraded_reason: string | null;
303
279
  }, {
304
- search_mode: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE";
305
- quality_tier: "FULL_HYBRID" | "VECTOR_ONLY" | "GRAPH_ONLY" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
306
- is_degraded: boolean;
280
+ circuit_breaker_status: string;
281
+ quality_tier: string;
307
282
  latency_ms: number;
308
- degradation_reason?: string | null | undefined;
309
- circuit_breaker_status?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN"> | undefined;
283
+ total_hits: number;
284
+ fallback_applied: boolean;
285
+ degraded_reason: string | null;
310
286
  }>;
311
287
  type SearchMetadata = z.infer<typeof SearchMetadataSchema>;
312
288
  declare const CanonicalDomainKeySchema: z.ZodEnum<[
@@ -331,222 +307,37 @@ declare const ChunkingStrategySchema: z.ZodEnum<[
331
307
  "multimodal"
332
308
  ]>;
333
309
  type ChunkingStrategy = z.infer<typeof ChunkingStrategySchema>;
334
- declare const FileMetadataResponseSchema: z.ZodObject<{
335
- id: z.ZodNumber;
336
- tenant_id: z.ZodString;
337
- parent_metadata_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
338
- file_uri: z.ZodString;
339
- file_uri_hash: z.ZodString;
340
- revision: z.ZodNumber;
341
- is_current: z.ZodBoolean;
342
- is_deleted: z.ZodBoolean;
343
- is_derived: z.ZodBoolean;
344
- file_name: z.ZodString;
345
- file_path: z.ZodString;
346
- folder_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
347
- confidentiality_level: z.ZodEnum<[
348
- "PUBLIC",
349
- "INTERNAL",
350
- "DEPARTMENT",
351
- "CONFIDENTIAL",
352
- "RESTRICTED"
353
- ]>;
354
- department_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
355
- file_size: z.ZodNumber;
356
- mime_type: z.ZodString;
357
- asset_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
358
- asset_index: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
359
- bounding_box: z.ZodOptional<z.ZodNullable<z.ZodObject<{
360
- page: z.ZodOptional<z.ZodNumber>;
361
- x: z.ZodOptional<z.ZodNumber>;
362
- y: z.ZodOptional<z.ZodNumber>;
363
- width: z.ZodOptional<z.ZodNumber>;
364
- height: z.ZodOptional<z.ZodNumber>;
365
- start_sec: z.ZodOptional<z.ZodNumber>;
366
- end_sec: z.ZodOptional<z.ZodNumber>;
367
- frame_index: z.ZodOptional<z.ZodNumber>;
368
- timestamp_sec: z.ZodOptional<z.ZodNumber>;
369
- scene_confidence: z.ZodOptional<z.ZodNumber>;
370
- }, "strip", z.ZodTypeAny, {
371
- page?: number | undefined;
372
- x?: number | undefined;
373
- y?: number | undefined;
374
- width?: number | undefined;
375
- height?: number | undefined;
376
- start_sec?: number | undefined;
377
- end_sec?: number | undefined;
378
- frame_index?: number | undefined;
379
- timestamp_sec?: number | undefined;
380
- scene_confidence?: number | undefined;
381
- }, {
382
- page?: number | undefined;
383
- x?: number | undefined;
384
- y?: number | undefined;
385
- width?: number | undefined;
386
- height?: number | undefined;
387
- start_sec?: number | undefined;
388
- end_sec?: number | undefined;
389
- frame_index?: number | undefined;
390
- timestamp_sec?: number | undefined;
391
- scene_confidence?: number | undefined;
392
- }>>>;
393
- created_at: z.ZodString;
394
- updated_at: z.ZodString;
395
- }, "strip", z.ZodTypeAny, {
396
- id: number;
397
- tenant_id: string;
398
- file_uri: string;
399
- file_uri_hash: string;
400
- revision: number;
401
- is_current: boolean;
402
- is_deleted: boolean;
403
- is_derived: boolean;
404
- file_name: string;
405
- file_path: string;
406
- confidentiality_level: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
407
- file_size: number;
408
- mime_type: string;
409
- created_at: string;
410
- updated_at: string;
411
- parent_metadata_id?: number | null | undefined;
412
- folder_path?: string | null | undefined;
413
- department_id?: number | null | undefined;
414
- asset_type?: string | null | undefined;
415
- asset_index?: number | null | undefined;
416
- bounding_box?: {
417
- page?: number | undefined;
418
- x?: number | undefined;
419
- y?: number | undefined;
420
- width?: number | undefined;
421
- height?: number | undefined;
422
- start_sec?: number | undefined;
423
- end_sec?: number | undefined;
424
- frame_index?: number | undefined;
425
- timestamp_sec?: number | undefined;
426
- scene_confidence?: number | undefined;
427
- } | null | undefined;
428
- }, {
429
- id: number;
430
- tenant_id: string;
431
- file_uri: string;
432
- file_uri_hash: string;
433
- revision: number;
434
- is_current: boolean;
435
- is_deleted: boolean;
436
- is_derived: boolean;
437
- file_name: string;
438
- file_path: string;
439
- confidentiality_level: "PUBLIC" | "INTERNAL" | "DEPARTMENT" | "CONFIDENTIAL" | "RESTRICTED";
440
- file_size: number;
441
- mime_type: string;
442
- created_at: string;
443
- updated_at: string;
444
- parent_metadata_id?: number | null | undefined;
445
- folder_path?: string | null | undefined;
446
- department_id?: number | null | undefined;
447
- asset_type?: string | null | undefined;
448
- asset_index?: number | null | undefined;
449
- bounding_box?: {
450
- page?: number | undefined;
451
- x?: number | undefined;
452
- y?: number | undefined;
453
- width?: number | undefined;
454
- height?: number | undefined;
455
- start_sec?: number | undefined;
456
- end_sec?: number | undefined;
457
- frame_index?: number | undefined;
458
- timestamp_sec?: number | undefined;
459
- scene_confidence?: number | undefined;
460
- } | null | undefined;
461
- }>;
462
- type FileMetadataResponse = z.infer<typeof FileMetadataResponseSchema>;
463
310
  declare const SearchHitSchema: z.ZodObject<{
464
- chunk_uid: z.ZodString;
465
- file_uri: z.ZodString;
466
- score: z.ZodNumber;
467
- content: z.ZodString;
311
+ metadata_id: z.ZodNumber;
468
312
  chunk_index: z.ZodNumber;
469
- clause_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
470
- authority_tier: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
471
- breadcrumb_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
472
- bounding_box: z.ZodOptional<z.ZodNullable<z.ZodObject<{
473
- page: z.ZodOptional<z.ZodNumber>;
474
- x: z.ZodOptional<z.ZodNumber>;
475
- y: z.ZodOptional<z.ZodNumber>;
476
- width: z.ZodOptional<z.ZodNumber>;
477
- height: z.ZodOptional<z.ZodNumber>;
478
- start_sec: z.ZodOptional<z.ZodNumber>;
479
- end_sec: z.ZodOptional<z.ZodNumber>;
480
- frame_index: z.ZodOptional<z.ZodNumber>;
481
- timestamp_sec: z.ZodOptional<z.ZodNumber>;
482
- scene_confidence: z.ZodOptional<z.ZodNumber>;
483
- }, "strip", z.ZodTypeAny, {
484
- page?: number | undefined;
485
- x?: number | undefined;
486
- y?: number | undefined;
487
- width?: number | undefined;
488
- height?: number | undefined;
489
- start_sec?: number | undefined;
490
- end_sec?: number | undefined;
491
- frame_index?: number | undefined;
492
- timestamp_sec?: number | undefined;
493
- scene_confidence?: number | undefined;
494
- }, {
495
- page?: number | undefined;
496
- x?: number | undefined;
497
- y?: number | undefined;
498
- width?: number | undefined;
499
- height?: number | undefined;
500
- start_sec?: number | undefined;
501
- end_sec?: number | undefined;
502
- frame_index?: number | undefined;
503
- timestamp_sec?: number | undefined;
504
- scene_confidence?: number | undefined;
505
- }>>>;
313
+ text: z.ZodString;
314
+ score: z.ZodNumber;
506
315
  }, "strip", z.ZodTypeAny, {
507
- file_uri: string;
508
- chunk_uid: string;
509
- score: number;
510
- content: string;
316
+ text: string;
317
+ metadata_id: number;
511
318
  chunk_index: number;
512
- bounding_box?: {
513
- page?: number | undefined;
514
- x?: number | undefined;
515
- y?: number | undefined;
516
- width?: number | undefined;
517
- height?: number | undefined;
518
- start_sec?: number | undefined;
519
- end_sec?: number | undefined;
520
- frame_index?: number | undefined;
521
- timestamp_sec?: number | undefined;
522
- scene_confidence?: number | undefined;
523
- } | null | undefined;
524
- clause_identifier?: string | null | undefined;
525
- authority_tier?: number | null | undefined;
526
- breadcrumb_path?: string | null | undefined;
527
- }, {
528
- file_uri: string;
529
- chunk_uid: string;
530
319
  score: number;
531
- content: string;
320
+ }, {
321
+ text: string;
322
+ metadata_id: number;
532
323
  chunk_index: number;
533
- bounding_box?: {
534
- page?: number | undefined;
535
- x?: number | undefined;
536
- y?: number | undefined;
537
- width?: number | undefined;
538
- height?: number | undefined;
539
- start_sec?: number | undefined;
540
- end_sec?: number | undefined;
541
- frame_index?: number | undefined;
542
- timestamp_sec?: number | undefined;
543
- scene_confidence?: number | undefined;
544
- } | null | undefined;
545
- clause_identifier?: string | null | undefined;
546
- authority_tier?: number | null | undefined;
547
- breadcrumb_path?: string | null | undefined;
324
+ score: number;
548
325
  }>;
549
326
  type SearchHit = z.infer<typeof SearchHitSchema>;
327
+ declare const GraphSearchHitSchema: z.ZodObject<{
328
+ metadata_id: z.ZodNumber;
329
+ relation: z.ZodString;
330
+ target_name: z.ZodString;
331
+ }, "strip", z.ZodTypeAny, {
332
+ metadata_id: number;
333
+ relation: string;
334
+ target_name: string;
335
+ }, {
336
+ metadata_id: number;
337
+ relation: string;
338
+ target_name: string;
339
+ }>;
340
+ type GraphSearchHit = z.infer<typeof GraphSearchHitSchema>;
550
341
  declare const SearchRequestSchema: z.ZodObject<{
551
342
  query: z.ZodString;
552
343
  tenant_id: z.ZodString;
@@ -560,277 +351,3289 @@ declare const SearchRequestSchema: z.ZodObject<{
560
351
  "MEDIA_ASSET",
561
352
  "GENERAL_DOCUMENT"
562
353
  ]>>;
563
- limit: z.ZodDefault<z.ZodNumber>;
354
+ limit: z.ZodOptional<z.ZodNumber>;
564
355
  department_id: z.ZodOptional<z.ZodNumber>;
565
- user_roles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
566
- }, "strip", z.ZodTypeAny, {
567
- tenant_id: string;
356
+ search_mode: z.ZodOptional<z.ZodEnum<[
357
+ "KEYWORD",
358
+ "SPARSE",
359
+ "DENSE",
360
+ "HYBRID",
361
+ "GRAPH_TRAVERSE"
362
+ ]>>;
363
+ strategy_id: z.ZodOptional<z.ZodNumber>;
364
+ }, "strict", z.ZodTypeAny, {
568
365
  query: string;
569
- limit: number;
570
- user_roles: string[];
571
- department_id?: number | undefined;
366
+ tenant_id: string;
572
367
  domain_key?: "CONTRACT_LEGAL" | "EMAIL_THREAD" | "DAILY_REPORT" | "FINANCIAL_REPORT" | "TECHNICAL_SPEC" | "MASTER_DATA" | "MEDIA_ASSET" | "GENERAL_DOCUMENT" | undefined;
368
+ limit?: number | undefined;
369
+ department_id?: number | undefined;
370
+ search_mode?: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE" | undefined;
371
+ strategy_id?: number | undefined;
573
372
  }, {
574
- tenant_id: string;
575
373
  query: string;
576
- department_id?: number | undefined;
374
+ tenant_id: string;
577
375
  domain_key?: "CONTRACT_LEGAL" | "EMAIL_THREAD" | "DAILY_REPORT" | "FINANCIAL_REPORT" | "TECHNICAL_SPEC" | "MASTER_DATA" | "MEDIA_ASSET" | "GENERAL_DOCUMENT" | undefined;
578
376
  limit?: number | undefined;
579
- user_roles?: string[] | undefined;
377
+ department_id?: number | undefined;
378
+ search_mode?: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE" | undefined;
379
+ strategy_id?: number | undefined;
580
380
  }>;
581
381
  type SearchRequestInput = z.input<typeof SearchRequestSchema>;
582
382
  type SearchRequest = z.infer<typeof SearchRequestSchema>;
583
383
  declare const SearchResponseSchema: z.ZodObject<{
584
384
  hits: z.ZodArray<z.ZodObject<{
585
- chunk_uid: z.ZodString;
586
- file_uri: z.ZodString;
587
- score: z.ZodNumber;
588
- content: z.ZodString;
385
+ metadata_id: z.ZodNumber;
589
386
  chunk_index: z.ZodNumber;
590
- clause_identifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
591
- authority_tier: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
592
- breadcrumb_path: z.ZodOptional<z.ZodNullable<z.ZodString>>;
593
- bounding_box: z.ZodOptional<z.ZodNullable<z.ZodObject<{
594
- page: z.ZodOptional<z.ZodNumber>;
595
- x: z.ZodOptional<z.ZodNumber>;
596
- y: z.ZodOptional<z.ZodNumber>;
597
- width: z.ZodOptional<z.ZodNumber>;
598
- height: z.ZodOptional<z.ZodNumber>;
599
- start_sec: z.ZodOptional<z.ZodNumber>;
600
- end_sec: z.ZodOptional<z.ZodNumber>;
601
- frame_index: z.ZodOptional<z.ZodNumber>;
602
- timestamp_sec: z.ZodOptional<z.ZodNumber>;
603
- scene_confidence: z.ZodOptional<z.ZodNumber>;
604
- }, "strip", z.ZodTypeAny, {
605
- page?: number | undefined;
606
- x?: number | undefined;
607
- y?: number | undefined;
608
- width?: number | undefined;
609
- height?: number | undefined;
610
- start_sec?: number | undefined;
611
- end_sec?: number | undefined;
612
- frame_index?: number | undefined;
613
- timestamp_sec?: number | undefined;
614
- scene_confidence?: number | undefined;
615
- }, {
616
- page?: number | undefined;
617
- x?: number | undefined;
618
- y?: number | undefined;
619
- width?: number | undefined;
620
- height?: number | undefined;
621
- start_sec?: number | undefined;
622
- end_sec?: number | undefined;
623
- frame_index?: number | undefined;
624
- timestamp_sec?: number | undefined;
625
- scene_confidence?: number | undefined;
626
- }>>>;
387
+ text: z.ZodString;
388
+ score: z.ZodNumber;
627
389
  }, "strip", z.ZodTypeAny, {
628
- file_uri: string;
629
- chunk_uid: string;
630
- score: number;
631
- content: string;
390
+ text: string;
391
+ metadata_id: number;
632
392
  chunk_index: number;
633
- bounding_box?: {
634
- page?: number | undefined;
635
- x?: number | undefined;
636
- y?: number | undefined;
637
- width?: number | undefined;
638
- height?: number | undefined;
639
- start_sec?: number | undefined;
640
- end_sec?: number | undefined;
641
- frame_index?: number | undefined;
642
- timestamp_sec?: number | undefined;
643
- scene_confidence?: number | undefined;
644
- } | null | undefined;
645
- clause_identifier?: string | null | undefined;
646
- authority_tier?: number | null | undefined;
647
- breadcrumb_path?: string | null | undefined;
648
- }, {
649
- file_uri: string;
650
- chunk_uid: string;
651
393
  score: number;
652
- content: string;
394
+ }, {
395
+ text: string;
396
+ metadata_id: number;
653
397
  chunk_index: number;
654
- bounding_box?: {
655
- page?: number | undefined;
656
- x?: number | undefined;
657
- y?: number | undefined;
658
- width?: number | undefined;
659
- height?: number | undefined;
660
- start_sec?: number | undefined;
661
- end_sec?: number | undefined;
662
- frame_index?: number | undefined;
663
- timestamp_sec?: number | undefined;
664
- scene_confidence?: number | undefined;
665
- } | null | undefined;
666
- clause_identifier?: string | null | undefined;
667
- authority_tier?: number | null | undefined;
668
- breadcrumb_path?: string | null | undefined;
398
+ score: number;
399
+ }>, "many">;
400
+ graph_hits: z.ZodArray<z.ZodObject<{
401
+ metadata_id: z.ZodNumber;
402
+ relation: z.ZodString;
403
+ target_name: z.ZodString;
404
+ }, "strip", z.ZodTypeAny, {
405
+ metadata_id: number;
406
+ relation: string;
407
+ target_name: string;
408
+ }, {
409
+ metadata_id: number;
410
+ relation: string;
411
+ target_name: string;
669
412
  }>, "many">;
413
+ tiers: z.ZodRecord<z.ZodString, z.ZodBoolean>;
670
414
  metadata: z.ZodObject<{
671
- search_mode: z.ZodEnum<[
672
- "KEYWORD",
673
- "SPARSE",
674
- "DENSE",
675
- "HYBRID",
676
- "GRAPH_TRAVERSE"
677
- ]>;
678
- quality_tier: z.ZodEnum<[
679
- "FULL_HYBRID",
680
- "VECTOR_ONLY",
681
- "GRAPH_ONLY",
682
- "STANDARD_SEMANTIC",
683
- "DEGRADED_KEYWORD_ONLY"
684
- ]>;
685
- is_degraded: z.ZodBoolean;
686
- degradation_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
687
- circuit_breaker_status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<[
688
- "CLOSED",
689
- "OPEN",
690
- "HALF_OPEN"
691
- ]>>>;
415
+ circuit_breaker_status: z.ZodString;
416
+ quality_tier: z.ZodString;
692
417
  latency_ms: z.ZodNumber;
418
+ total_hits: z.ZodNumber;
419
+ fallback_applied: z.ZodBoolean;
420
+ degraded_reason: z.ZodNullable<z.ZodString>;
693
421
  }, "strip", z.ZodTypeAny, {
694
- search_mode: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE";
695
- quality_tier: "FULL_HYBRID" | "VECTOR_ONLY" | "GRAPH_ONLY" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
696
- is_degraded: boolean;
422
+ circuit_breaker_status: string;
423
+ quality_tier: string;
697
424
  latency_ms: number;
698
- degradation_reason?: string | null | undefined;
699
- circuit_breaker_status?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN"> | undefined;
425
+ total_hits: number;
426
+ fallback_applied: boolean;
427
+ degraded_reason: string | null;
700
428
  }, {
701
- search_mode: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE";
702
- quality_tier: "FULL_HYBRID" | "VECTOR_ONLY" | "GRAPH_ONLY" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
703
- is_degraded: boolean;
429
+ circuit_breaker_status: string;
430
+ quality_tier: string;
704
431
  latency_ms: number;
705
- degradation_reason?: string | null | undefined;
706
- circuit_breaker_status?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN"> | undefined;
432
+ total_hits: number;
433
+ fallback_applied: boolean;
434
+ degraded_reason: string | null;
707
435
  }>;
708
436
  }, "strip", z.ZodTypeAny, {
709
437
  hits: {
710
- file_uri: string;
711
- chunk_uid: string;
712
- score: number;
713
- content: string;
438
+ text: string;
439
+ metadata_id: number;
714
440
  chunk_index: number;
715
- bounding_box?: {
716
- page?: number | undefined;
717
- x?: number | undefined;
718
- y?: number | undefined;
719
- width?: number | undefined;
720
- height?: number | undefined;
721
- start_sec?: number | undefined;
722
- end_sec?: number | undefined;
723
- frame_index?: number | undefined;
724
- timestamp_sec?: number | undefined;
725
- scene_confidence?: number | undefined;
726
- } | null | undefined;
727
- clause_identifier?: string | null | undefined;
728
- authority_tier?: number | null | undefined;
729
- breadcrumb_path?: string | null | undefined;
441
+ score: number;
442
+ }[];
443
+ graph_hits: {
444
+ metadata_id: number;
445
+ relation: string;
446
+ target_name: string;
730
447
  }[];
448
+ tiers: Record<string, boolean>;
731
449
  metadata: {
732
- search_mode: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE";
733
- quality_tier: "FULL_HYBRID" | "VECTOR_ONLY" | "GRAPH_ONLY" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
734
- is_degraded: boolean;
450
+ circuit_breaker_status: string;
451
+ quality_tier: string;
735
452
  latency_ms: number;
736
- degradation_reason?: string | null | undefined;
737
- circuit_breaker_status?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN"> | undefined;
453
+ total_hits: number;
454
+ fallback_applied: boolean;
455
+ degraded_reason: string | null;
738
456
  };
739
457
  }, {
740
458
  hits: {
741
- file_uri: string;
742
- chunk_uid: string;
743
- score: number;
744
- content: string;
459
+ text: string;
460
+ metadata_id: number;
745
461
  chunk_index: number;
746
- bounding_box?: {
747
- page?: number | undefined;
748
- x?: number | undefined;
749
- y?: number | undefined;
750
- width?: number | undefined;
751
- height?: number | undefined;
752
- start_sec?: number | undefined;
753
- end_sec?: number | undefined;
754
- frame_index?: number | undefined;
755
- timestamp_sec?: number | undefined;
756
- scene_confidence?: number | undefined;
757
- } | null | undefined;
758
- clause_identifier?: string | null | undefined;
759
- authority_tier?: number | null | undefined;
760
- breadcrumb_path?: string | null | undefined;
462
+ score: number;
463
+ }[];
464
+ graph_hits: {
465
+ metadata_id: number;
466
+ relation: string;
467
+ target_name: string;
761
468
  }[];
469
+ tiers: Record<string, boolean>;
762
470
  metadata: {
763
- search_mode: "KEYWORD" | "SPARSE" | "DENSE" | "HYBRID" | "GRAPH_TRAVERSE";
764
- quality_tier: "FULL_HYBRID" | "VECTOR_ONLY" | "GRAPH_ONLY" | "STANDARD_SEMANTIC" | "DEGRADED_KEYWORD_ONLY";
765
- is_degraded: boolean;
471
+ circuit_breaker_status: string;
472
+ quality_tier: string;
766
473
  latency_ms: number;
767
- degradation_reason?: string | null | undefined;
768
- circuit_breaker_status?: Record<string, "CLOSED" | "OPEN" | "HALF_OPEN"> | undefined;
474
+ total_hits: number;
475
+ fallback_applied: boolean;
476
+ degraded_reason: string | null;
769
477
  };
770
478
  }>;
771
479
  type SearchResponse = z.infer<typeof SearchResponseSchema>;
772
- declare const ReclassifyRequestSchema: z.ZodObject<{
773
- file_uri: z.ZodString;
774
- tenant_id: z.ZodString;
775
- force: z.ZodDefault<z.ZodBoolean>;
776
- }, "strip", z.ZodTypeAny, {
777
- tenant_id: string;
778
- file_uri: string;
779
- force: boolean;
480
+ declare class EnrichmentClient extends BaseEnrichmentClient {
481
+ search(payload: SearchRequestInput): Promise<SearchResponse>;
482
+ }
483
+ declare const DOCUMENT_KINDS: readonly [
484
+ "email",
485
+ "pdf",
486
+ "office",
487
+ "image",
488
+ "media",
489
+ "text",
490
+ "google_native",
491
+ "other"
492
+ ];
493
+ type DocumentKind = (typeof DOCUMENT_KINDS)[number];
494
+ declare const DOCUMENT_KIND_LABELS: Readonly<Record<DocumentKind, string>>;
495
+ declare const MIME_KIND_RULES: readonly (readonly [
496
+ pattern: string,
497
+ kind: DocumentKind
498
+ ])[];
499
+ declare function classifyDocumentKind(mimeType: string): DocumentKind;
500
+ declare const PIPELINE_STEP_KEYS: readonly [
501
+ "delete_child_assets",
502
+ "extract_text",
503
+ "analyze_media",
504
+ "extract_assets",
505
+ "ocr_children",
506
+ "ocr_document",
507
+ "resolve_body",
508
+ "enrich_document",
509
+ "project_to_indexes"
510
+ ];
511
+ type PipelineStepKey = (typeof PIPELINE_STEP_KEYS)[number];
512
+ declare const PIPELINE_PHASES: readonly [
513
+ "EXTRACTING",
514
+ "ENRICHING",
515
+ "PROJECTING"
516
+ ];
517
+ type PipelinePhase = (typeof PIPELINE_PHASES)[number];
518
+ type PipelineFailureStatus = "FAILED_EXTRACT" | "FAILED_ENRICH" | "FAILED_VECTOR" | "FAILED_GRAPH";
519
+ interface StepGate {
520
+ readonly featureFlagKey: string;
521
+ readonly whenClosed: "skip" | "fail";
522
+ readonly failureStatus: PipelineFailureStatus | null;
523
+ }
524
+ interface PipelineStepDefinition {
525
+ readonly key: PipelineStepKey;
526
+ readonly label: string;
527
+ readonly description: string;
528
+ readonly endpoint: string;
529
+ readonly phase: PipelinePhase;
530
+ readonly failureStatus: PipelineFailureStatus;
531
+ readonly gates: readonly StepGate[];
532
+ readonly capability: string | null;
533
+ readonly fanOut: "children" | null;
534
+ }
535
+ declare const PIPELINE_STEPS: Readonly<Record<PipelineStepKey, PipelineStepDefinition>>;
536
+ type ChunkSource = "rebuild" | "existing";
537
+ interface FlowGatePolicy {
538
+ readonly whenClosed: "fail";
539
+ readonly failureStatus: PipelineFailureStatus;
540
+ }
541
+ interface FlowStep {
542
+ readonly step: PipelineStepKey;
543
+ readonly dependsOn: readonly PipelineStepKey[];
544
+ readonly chunkSource?: ChunkSource;
545
+ readonly gatePolicy?: FlowGatePolicy;
546
+ }
547
+ interface PipelineFlow {
548
+ readonly kind: DocumentKind;
549
+ readonly steps: readonly FlowStep[];
550
+ }
551
+ declare const PIPELINE_FLOWS: Readonly<Record<DocumentKind, PipelineFlow>>;
552
+ declare function flowFor(kind: DocumentKind): PipelineFlow;
553
+ declare function flowStepGates(flowStep: FlowStep): readonly StepGate[];
554
+ declare function orderedSteps(flow: PipelineFlow): readonly FlowStep[];
555
+ declare function comparePhases(a: PipelinePhase, b: PipelinePhase): number;
556
+ declare const IntegrityStoreSchema: z.ZodEnum<[
557
+ "QDRANT",
558
+ "NEO4J"
559
+ ]>;
560
+ type IntegrityStore = z.infer<typeof IntegrityStoreSchema>;
561
+ declare const IntegrityScopeRoleSchema: z.ZodEnum<[
562
+ "PRODUCTION",
563
+ "VARIANT",
564
+ "LABEL"
565
+ ]>;
566
+ type IntegrityScopeRole = z.infer<typeof IntegrityScopeRoleSchema>;
567
+ declare const IntegrityItemClassSchema: z.ZodEnum<[
568
+ "EXPECTED",
569
+ "LIVE",
570
+ "HISTORY",
571
+ "TOMBSTONE",
572
+ "AWAITING_SUCCESSOR",
573
+ "IN_FLIGHT",
574
+ "UNPLACED",
575
+ "UNRECORDED",
576
+ "UNREFERENCED",
577
+ "CHANGED_AFTER_START",
578
+ "PIPELINE_FAILED",
579
+ "PROJECTION_REFUSED",
580
+ "ORPHAN",
581
+ "TOMBSTONE_EXPIRED",
582
+ "UNPROPAGATED_DELETE",
583
+ "STALE_REVISION",
584
+ "MISPLACED",
585
+ "UNMARKED_SUPERSEDED",
586
+ "FLAG_DRIFT",
587
+ "DETACHED",
588
+ "UNKEYED",
589
+ "MISSING",
590
+ "COUNT_MISMATCH"
591
+ ]>;
592
+ type IntegrityItemClass = z.infer<typeof IntegrityItemClassSchema>;
593
+ declare const IntegrityFindingItemClassSchema: z.ZodEnum<[
594
+ "TOMBSTONE",
595
+ "AWAITING_SUCCESSOR",
596
+ "IN_FLIGHT",
597
+ "UNPLACED",
598
+ "UNRECORDED",
599
+ "UNREFERENCED",
600
+ "CHANGED_AFTER_START",
601
+ "PIPELINE_FAILED",
602
+ "PROJECTION_REFUSED",
603
+ "ORPHAN",
604
+ "TOMBSTONE_EXPIRED",
605
+ "UNPROPAGATED_DELETE",
606
+ "STALE_REVISION",
607
+ "MISPLACED",
608
+ "UNMARKED_SUPERSEDED",
609
+ "FLAG_DRIFT",
610
+ "DETACHED",
611
+ "UNKEYED",
612
+ "MISSING",
613
+ "COUNT_MISMATCH"
614
+ ]>;
615
+ type IntegrityFindingItemClass = z.infer<typeof IntegrityFindingItemClassSchema>;
616
+ declare const IntegrityUnitSchema: z.ZodEnum<[
617
+ "POINT",
618
+ "NODE",
619
+ "CHUNK",
620
+ "DOCUMENT"
621
+ ]>;
622
+ type IntegrityUnit = z.infer<typeof IntegrityUnitSchema>;
623
+ declare const IntegrityDispositionSchema: z.ZodEnum<[
624
+ "EXPECTED",
625
+ "HEALTHY",
626
+ "RETAINED",
627
+ "INFORMATIONAL",
628
+ "DISCREPANCY"
629
+ ]>;
630
+ type IntegrityDisposition = z.infer<typeof IntegrityDispositionSchema>;
631
+ declare const IntegrityRepairActionSchema: z.ZodEnum<[
632
+ "NONE",
633
+ "PURGE",
634
+ "FLAG",
635
+ "REPROJECT"
636
+ ]>;
637
+ type IntegrityRepairAction = z.infer<typeof IntegrityRepairActionSchema>;
638
+ interface IntegrityClassPolicy {
639
+ readonly disposition: IntegrityDisposition;
640
+ readonly repairAction: IntegrityRepairAction;
641
+ }
642
+ declare const INTEGRITY_CLASS_POLICY: Readonly<Record<IntegrityItemClass, IntegrityClassPolicy>>;
643
+ declare const IntegrityRunModeSchema: z.ZodEnum<[
644
+ "SCAN",
645
+ "REPAIR"
646
+ ]>;
647
+ type IntegrityRunMode = z.infer<typeof IntegrityRunModeSchema>;
648
+ declare const IntegrityRunStatusSchema: z.ZodEnum<[
649
+ "RUNNING",
650
+ "COMPLETED",
651
+ "FAILED",
652
+ "CANCELLED",
653
+ "ABANDONED"
654
+ ]>;
655
+ type IntegrityRunStatus = z.infer<typeof IntegrityRunStatusSchema>;
656
+ declare const IntegrityVerdictSchema: z.ZodEnum<[
657
+ "CONSISTENT",
658
+ "INCONSISTENT",
659
+ "UNDETERMINED"
660
+ ]>;
661
+ type IntegrityVerdict = z.infer<typeof IntegrityVerdictSchema>;
662
+ declare const IntegrityPhaseSchema: z.ZodEnum<[
663
+ "QDRANT",
664
+ "NEO4J",
665
+ "DOCUMENTS"
666
+ ]>;
667
+ type IntegrityPhase = z.infer<typeof IntegrityPhaseSchema>;
668
+ declare const IntegrityRepairOutcomeSchema: z.ZodEnum<[
669
+ "APPLIED",
670
+ "SKIPPED",
671
+ "FAILED"
672
+ ]>;
673
+ type IntegrityRepairOutcome = z.infer<typeof IntegrityRepairOutcomeSchema>;
674
+ declare const IntegrityRepairSkipReasonSchema: z.ZodEnum<[
675
+ "RECLASSIFIED",
676
+ "IN_FLIGHT",
677
+ "DESTINATION_PENDING",
678
+ "BASIS_EXHAUSTED",
679
+ "PROJECTION_REFUSED"
680
+ ]>;
681
+ type IntegrityRepairSkipReason = z.infer<typeof IntegrityRepairSkipReasonSchema>;
682
+ declare const INTEGRITY_FINDINGS_PAGE_LIMIT_MAX = 100;
683
+ declare const IntegrityRunHeaderSchema: z.ZodEffects<z.ZodObject<{
684
+ runUid: z.ZodEffects<z.ZodString, string, string>;
685
+ mode: z.ZodEnum<[
686
+ "SCAN",
687
+ "REPAIR"
688
+ ]>;
689
+ status: z.ZodEnum<[
690
+ "RUNNING",
691
+ "COMPLETED",
692
+ "FAILED",
693
+ "CANCELLED",
694
+ "ABANDONED"
695
+ ]>;
696
+ requestedBy: z.ZodString;
697
+ executor: z.ZodString;
698
+ basisRunUid: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
699
+ storeFingerprint: z.ZodString;
700
+ tombstoneRetentionDays: z.ZodNumber;
701
+ startedAt: z.ZodString;
702
+ finishedAt: z.ZodNullable<z.ZodString>;
703
+ verdict: z.ZodNullable<z.ZodEnum<[
704
+ "CONSISTENT",
705
+ "INCONSISTENT",
706
+ "UNDETERMINED"
707
+ ]>>;
708
+ errorClass: z.ZodNullable<z.ZodString>;
709
+ reprojectDocuments: z.ZodNullable<z.ZodNumber>;
710
+ reprojectRebuildDocuments: z.ZodNullable<z.ZodNumber>;
711
+ }, "strict", z.ZodTypeAny, {
712
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
713
+ mode: "SCAN" | "REPAIR";
714
+ runUid: string;
715
+ requestedBy: string;
716
+ executor: string;
717
+ basisRunUid: string | null;
718
+ storeFingerprint: string;
719
+ tombstoneRetentionDays: number;
720
+ startedAt: string;
721
+ finishedAt: string | null;
722
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
723
+ errorClass: string | null;
724
+ reprojectDocuments: number | null;
725
+ reprojectRebuildDocuments: number | null;
780
726
  }, {
781
- tenant_id: string;
782
- file_uri: string;
783
- force?: boolean | undefined;
727
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
728
+ mode: "SCAN" | "REPAIR";
729
+ runUid: string;
730
+ requestedBy: string;
731
+ executor: string;
732
+ basisRunUid: string | null;
733
+ storeFingerprint: string;
734
+ tombstoneRetentionDays: number;
735
+ startedAt: string;
736
+ finishedAt: string | null;
737
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
738
+ errorClass: string | null;
739
+ reprojectDocuments: number | null;
740
+ reprojectRebuildDocuments: number | null;
741
+ }>, {
742
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
743
+ mode: "SCAN" | "REPAIR";
744
+ runUid: string;
745
+ requestedBy: string;
746
+ executor: string;
747
+ basisRunUid: string | null;
748
+ storeFingerprint: string;
749
+ tombstoneRetentionDays: number;
750
+ startedAt: string;
751
+ finishedAt: string | null;
752
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
753
+ errorClass: string | null;
754
+ reprojectDocuments: number | null;
755
+ reprojectRebuildDocuments: number | null;
756
+ }, {
757
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
758
+ mode: "SCAN" | "REPAIR";
759
+ runUid: string;
760
+ requestedBy: string;
761
+ executor: string;
762
+ basisRunUid: string | null;
763
+ storeFingerprint: string;
764
+ tombstoneRetentionDays: number;
765
+ startedAt: string;
766
+ finishedAt: string | null;
767
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
768
+ errorClass: string | null;
769
+ reprojectDocuments: number | null;
770
+ reprojectRebuildDocuments: number | null;
784
771
  }>;
785
- type ReclassifyRequestInput = z.input<typeof ReclassifyRequestSchema>;
786
- type ReclassifyRequest = z.infer<typeof ReclassifyRequestSchema>;
787
- declare const ReclassifyResponseSchema: z.ZodObject<{
788
- file_uri: z.ZodString;
789
- domain_key: z.ZodEnum<[
790
- "CONTRACT_LEGAL",
791
- "EMAIL_THREAD",
792
- "DAILY_REPORT",
793
- "FINANCIAL_REPORT",
794
- "TECHNICAL_SPEC",
795
- "MASTER_DATA",
796
- "MEDIA_ASSET",
797
- "GENERAL_DOCUMENT"
772
+ type IntegrityRunHeader = z.infer<typeof IntegrityRunHeaderSchema>;
773
+ declare const IntegrityQuantitySchema: z.ZodEffects<z.ZodObject<{
774
+ store: z.ZodEnum<[
775
+ "QDRANT",
776
+ "NEO4J"
777
+ ]>;
778
+ scopeKey: z.ZodString;
779
+ scopeRole: z.ZodEnum<[
780
+ "PRODUCTION",
781
+ "VARIANT",
782
+ "LABEL"
783
+ ]>;
784
+ itemClass: z.ZodEnum<[
785
+ "EXPECTED",
786
+ "LIVE",
787
+ "HISTORY",
788
+ "TOMBSTONE",
789
+ "AWAITING_SUCCESSOR",
790
+ "IN_FLIGHT",
791
+ "UNPLACED",
792
+ "UNRECORDED",
793
+ "UNREFERENCED",
794
+ "CHANGED_AFTER_START",
795
+ "PIPELINE_FAILED",
796
+ "PROJECTION_REFUSED",
797
+ "ORPHAN",
798
+ "TOMBSTONE_EXPIRED",
799
+ "UNPROPAGATED_DELETE",
800
+ "STALE_REVISION",
801
+ "MISPLACED",
802
+ "UNMARKED_SUPERSEDED",
803
+ "FLAG_DRIFT",
804
+ "DETACHED",
805
+ "UNKEYED",
806
+ "MISSING",
807
+ "COUNT_MISMATCH"
808
+ ]>;
809
+ unit: z.ZodEnum<[
810
+ "POINT",
811
+ "NODE",
812
+ "CHUNK",
813
+ "DOCUMENT"
814
+ ]>;
815
+ disposition: z.ZodEnum<[
816
+ "EXPECTED",
817
+ "HEALTHY",
818
+ "RETAINED",
819
+ "INFORMATIONAL",
820
+ "DISCREPANCY"
798
821
  ]>;
799
- strategy_name: z.ZodString;
800
- chunking_strategy: z.ZodOptional<z.ZodEnum<[
801
- "hierarchical",
802
- "conversation",
803
- "section",
804
- "fixed_size",
805
- "table_aware",
806
- "semantic",
807
- "none",
808
- "multimodal"
822
+ repairAction: z.ZodEnum<[
823
+ "NONE",
824
+ "PURGE",
825
+ "FLAG",
826
+ "REPROJECT"
827
+ ]>;
828
+ itemCount: z.ZodNullable<z.ZodNumber>;
829
+ unmeasuredReason: z.ZodNullable<z.ZodString>;
830
+ measuredAt: z.ZodNullable<z.ZodString>;
831
+ repairedCount: z.ZodNullable<z.ZodNumber>;
832
+ repairFailedCount: z.ZodNullable<z.ZodNumber>;
833
+ repairSkippedCount: z.ZodNullable<z.ZodNumber>;
834
+ }, "strict", z.ZodTypeAny, {
835
+ repairedCount: number | null;
836
+ repairFailedCount: number | null;
837
+ repairSkippedCount: number | null;
838
+ store: "QDRANT" | "NEO4J";
839
+ scopeKey: string;
840
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
841
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
842
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
843
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
844
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
845
+ itemCount: number | null;
846
+ unmeasuredReason: string | null;
847
+ measuredAt: string | null;
848
+ }, {
849
+ repairedCount: number | null;
850
+ repairFailedCount: number | null;
851
+ repairSkippedCount: number | null;
852
+ store: "QDRANT" | "NEO4J";
853
+ scopeKey: string;
854
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
855
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
856
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
857
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
858
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
859
+ itemCount: number | null;
860
+ unmeasuredReason: string | null;
861
+ measuredAt: string | null;
862
+ }>, {
863
+ repairedCount: number | null;
864
+ repairFailedCount: number | null;
865
+ repairSkippedCount: number | null;
866
+ store: "QDRANT" | "NEO4J";
867
+ scopeKey: string;
868
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
869
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
870
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
871
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
872
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
873
+ itemCount: number | null;
874
+ unmeasuredReason: string | null;
875
+ measuredAt: string | null;
876
+ }, {
877
+ repairedCount: number | null;
878
+ repairFailedCount: number | null;
879
+ repairSkippedCount: number | null;
880
+ store: "QDRANT" | "NEO4J";
881
+ scopeKey: string;
882
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
883
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
884
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
885
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
886
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
887
+ itemCount: number | null;
888
+ unmeasuredReason: string | null;
889
+ measuredAt: string | null;
890
+ }>;
891
+ type IntegrityQuantity = z.infer<typeof IntegrityQuantitySchema>;
892
+ declare const IntegrityActiveRunSchema: z.ZodEffects<z.ZodObject<{
893
+ run: z.ZodEffects<z.ZodObject<{
894
+ runUid: z.ZodEffects<z.ZodString, string, string>;
895
+ mode: z.ZodEnum<[
896
+ "SCAN",
897
+ "REPAIR"
898
+ ]>;
899
+ status: z.ZodEnum<[
900
+ "RUNNING",
901
+ "COMPLETED",
902
+ "FAILED",
903
+ "CANCELLED",
904
+ "ABANDONED"
905
+ ]>;
906
+ requestedBy: z.ZodString;
907
+ executor: z.ZodString;
908
+ basisRunUid: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
909
+ storeFingerprint: z.ZodString;
910
+ tombstoneRetentionDays: z.ZodNumber;
911
+ startedAt: z.ZodString;
912
+ finishedAt: z.ZodNullable<z.ZodString>;
913
+ verdict: z.ZodNullable<z.ZodEnum<[
914
+ "CONSISTENT",
915
+ "INCONSISTENT",
916
+ "UNDETERMINED"
917
+ ]>>;
918
+ errorClass: z.ZodNullable<z.ZodString>;
919
+ reprojectDocuments: z.ZodNullable<z.ZodNumber>;
920
+ reprojectRebuildDocuments: z.ZodNullable<z.ZodNumber>;
921
+ }, "strict", z.ZodTypeAny, {
922
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
923
+ mode: "SCAN" | "REPAIR";
924
+ runUid: string;
925
+ requestedBy: string;
926
+ executor: string;
927
+ basisRunUid: string | null;
928
+ storeFingerprint: string;
929
+ tombstoneRetentionDays: number;
930
+ startedAt: string;
931
+ finishedAt: string | null;
932
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
933
+ errorClass: string | null;
934
+ reprojectDocuments: number | null;
935
+ reprojectRebuildDocuments: number | null;
936
+ }, {
937
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
938
+ mode: "SCAN" | "REPAIR";
939
+ runUid: string;
940
+ requestedBy: string;
941
+ executor: string;
942
+ basisRunUid: string | null;
943
+ storeFingerprint: string;
944
+ tombstoneRetentionDays: number;
945
+ startedAt: string;
946
+ finishedAt: string | null;
947
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
948
+ errorClass: string | null;
949
+ reprojectDocuments: number | null;
950
+ reprojectRebuildDocuments: number | null;
951
+ }>, {
952
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
953
+ mode: "SCAN" | "REPAIR";
954
+ runUid: string;
955
+ requestedBy: string;
956
+ executor: string;
957
+ basisRunUid: string | null;
958
+ storeFingerprint: string;
959
+ tombstoneRetentionDays: number;
960
+ startedAt: string;
961
+ finishedAt: string | null;
962
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
963
+ errorClass: string | null;
964
+ reprojectDocuments: number | null;
965
+ reprojectRebuildDocuments: number | null;
966
+ }, {
967
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
968
+ mode: "SCAN" | "REPAIR";
969
+ runUid: string;
970
+ requestedBy: string;
971
+ executor: string;
972
+ basisRunUid: string | null;
973
+ storeFingerprint: string;
974
+ tombstoneRetentionDays: number;
975
+ startedAt: string;
976
+ finishedAt: string | null;
977
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
978
+ errorClass: string | null;
979
+ reprojectDocuments: number | null;
980
+ reprojectRebuildDocuments: number | null;
981
+ }>;
982
+ phase: z.ZodNullable<z.ZodEnum<[
983
+ "QDRANT",
984
+ "NEO4J",
985
+ "DOCUMENTS"
809
986
  ]>>;
810
- applied_rule_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
811
- assigned_department_id: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
812
- }, "strip", z.ZodTypeAny, {
813
- file_uri: string;
814
- domain_key: "CONTRACT_LEGAL" | "EMAIL_THREAD" | "DAILY_REPORT" | "FINANCIAL_REPORT" | "TECHNICAL_SPEC" | "MASTER_DATA" | "MEDIA_ASSET" | "GENERAL_DOCUMENT";
815
- strategy_name: string;
816
- chunking_strategy?: "hierarchical" | "conversation" | "section" | "fixed_size" | "table_aware" | "semantic" | "none" | "multimodal" | undefined;
817
- applied_rule_name?: string | null | undefined;
818
- assigned_department_id?: number | null | undefined;
819
- }, {
820
- file_uri: string;
821
- domain_key: "CONTRACT_LEGAL" | "EMAIL_THREAD" | "DAILY_REPORT" | "FINANCIAL_REPORT" | "TECHNICAL_SPEC" | "MASTER_DATA" | "MEDIA_ASSET" | "GENERAL_DOCUMENT";
822
- strategy_name: string;
823
- chunking_strategy?: "hierarchical" | "conversation" | "section" | "fixed_size" | "table_aware" | "semantic" | "none" | "multimodal" | undefined;
824
- applied_rule_name?: string | null | undefined;
825
- assigned_department_id?: number | null | undefined;
987
+ phaseScope: z.ZodNullable<z.ZodString>;
988
+ phaseDone: z.ZodNullable<z.ZodNumber>;
989
+ phaseTotal: z.ZodNullable<z.ZodNumber>;
990
+ heartbeatAt: z.ZodString;
991
+ isStale: z.ZodBoolean;
992
+ cancelRequestedAt: z.ZodNullable<z.ZodString>;
993
+ }, "strict", z.ZodTypeAny, {
994
+ run: {
995
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
996
+ mode: "SCAN" | "REPAIR";
997
+ runUid: string;
998
+ requestedBy: string;
999
+ executor: string;
1000
+ basisRunUid: string | null;
1001
+ storeFingerprint: string;
1002
+ tombstoneRetentionDays: number;
1003
+ startedAt: string;
1004
+ finishedAt: string | null;
1005
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1006
+ errorClass: string | null;
1007
+ reprojectDocuments: number | null;
1008
+ reprojectRebuildDocuments: number | null;
1009
+ };
1010
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1011
+ phaseScope: string | null;
1012
+ phaseDone: number | null;
1013
+ phaseTotal: number | null;
1014
+ heartbeatAt: string;
1015
+ isStale: boolean;
1016
+ cancelRequestedAt: string | null;
1017
+ }, {
1018
+ run: {
1019
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1020
+ mode: "SCAN" | "REPAIR";
1021
+ runUid: string;
1022
+ requestedBy: string;
1023
+ executor: string;
1024
+ basisRunUid: string | null;
1025
+ storeFingerprint: string;
1026
+ tombstoneRetentionDays: number;
1027
+ startedAt: string;
1028
+ finishedAt: string | null;
1029
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1030
+ errorClass: string | null;
1031
+ reprojectDocuments: number | null;
1032
+ reprojectRebuildDocuments: number | null;
1033
+ };
1034
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1035
+ phaseScope: string | null;
1036
+ phaseDone: number | null;
1037
+ phaseTotal: number | null;
1038
+ heartbeatAt: string;
1039
+ isStale: boolean;
1040
+ cancelRequestedAt: string | null;
1041
+ }>, {
1042
+ run: {
1043
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1044
+ mode: "SCAN" | "REPAIR";
1045
+ runUid: string;
1046
+ requestedBy: string;
1047
+ executor: string;
1048
+ basisRunUid: string | null;
1049
+ storeFingerprint: string;
1050
+ tombstoneRetentionDays: number;
1051
+ startedAt: string;
1052
+ finishedAt: string | null;
1053
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1054
+ errorClass: string | null;
1055
+ reprojectDocuments: number | null;
1056
+ reprojectRebuildDocuments: number | null;
1057
+ };
1058
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1059
+ phaseScope: string | null;
1060
+ phaseDone: number | null;
1061
+ phaseTotal: number | null;
1062
+ heartbeatAt: string;
1063
+ isStale: boolean;
1064
+ cancelRequestedAt: string | null;
1065
+ }, {
1066
+ run: {
1067
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1068
+ mode: "SCAN" | "REPAIR";
1069
+ runUid: string;
1070
+ requestedBy: string;
1071
+ executor: string;
1072
+ basisRunUid: string | null;
1073
+ storeFingerprint: string;
1074
+ tombstoneRetentionDays: number;
1075
+ startedAt: string;
1076
+ finishedAt: string | null;
1077
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1078
+ errorClass: string | null;
1079
+ reprojectDocuments: number | null;
1080
+ reprojectRebuildDocuments: number | null;
1081
+ };
1082
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1083
+ phaseScope: string | null;
1084
+ phaseDone: number | null;
1085
+ phaseTotal: number | null;
1086
+ heartbeatAt: string;
1087
+ isStale: boolean;
1088
+ cancelRequestedAt: string | null;
826
1089
  }>;
827
- type ReclassifyResponse = z.infer<typeof ReclassifyResponseSchema>;
828
- declare class EnrichmentClient extends BaseEnrichmentClient {
829
- search(payload: SearchRequestInput): Promise<SearchResponse>;
830
- reclassify(payload: ReclassifyRequestInput): Promise<ReclassifyResponse>;
831
- getFileMetadata(fileUri: string, tenantId: string): Promise<FileMetadataResponse>;
832
- getMetadata(fileUri: string, tenantId: string): Promise<FileMetadataResponse>;
833
- }
1090
+ type IntegrityActiveRun = z.infer<typeof IntegrityActiveRunSchema>;
1091
+ declare const IntegrityAuditOverviewSchema: z.ZodObject<{
1092
+ readAt: z.ZodString;
1093
+ lastCompleted: z.ZodNullable<z.ZodEffects<z.ZodObject<{
1094
+ run: z.ZodEffects<z.ZodObject<{
1095
+ runUid: z.ZodEffects<z.ZodString, string, string>;
1096
+ mode: z.ZodEnum<[
1097
+ "SCAN",
1098
+ "REPAIR"
1099
+ ]>;
1100
+ status: z.ZodEnum<[
1101
+ "RUNNING",
1102
+ "COMPLETED",
1103
+ "FAILED",
1104
+ "CANCELLED",
1105
+ "ABANDONED"
1106
+ ]>;
1107
+ requestedBy: z.ZodString;
1108
+ executor: z.ZodString;
1109
+ basisRunUid: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1110
+ storeFingerprint: z.ZodString;
1111
+ tombstoneRetentionDays: z.ZodNumber;
1112
+ startedAt: z.ZodString;
1113
+ finishedAt: z.ZodNullable<z.ZodString>;
1114
+ verdict: z.ZodNullable<z.ZodEnum<[
1115
+ "CONSISTENT",
1116
+ "INCONSISTENT",
1117
+ "UNDETERMINED"
1118
+ ]>>;
1119
+ errorClass: z.ZodNullable<z.ZodString>;
1120
+ reprojectDocuments: z.ZodNullable<z.ZodNumber>;
1121
+ reprojectRebuildDocuments: z.ZodNullable<z.ZodNumber>;
1122
+ }, "strict", z.ZodTypeAny, {
1123
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1124
+ mode: "SCAN" | "REPAIR";
1125
+ runUid: string;
1126
+ requestedBy: string;
1127
+ executor: string;
1128
+ basisRunUid: string | null;
1129
+ storeFingerprint: string;
1130
+ tombstoneRetentionDays: number;
1131
+ startedAt: string;
1132
+ finishedAt: string | null;
1133
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1134
+ errorClass: string | null;
1135
+ reprojectDocuments: number | null;
1136
+ reprojectRebuildDocuments: number | null;
1137
+ }, {
1138
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1139
+ mode: "SCAN" | "REPAIR";
1140
+ runUid: string;
1141
+ requestedBy: string;
1142
+ executor: string;
1143
+ basisRunUid: string | null;
1144
+ storeFingerprint: string;
1145
+ tombstoneRetentionDays: number;
1146
+ startedAt: string;
1147
+ finishedAt: string | null;
1148
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1149
+ errorClass: string | null;
1150
+ reprojectDocuments: number | null;
1151
+ reprojectRebuildDocuments: number | null;
1152
+ }>, {
1153
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1154
+ mode: "SCAN" | "REPAIR";
1155
+ runUid: string;
1156
+ requestedBy: string;
1157
+ executor: string;
1158
+ basisRunUid: string | null;
1159
+ storeFingerprint: string;
1160
+ tombstoneRetentionDays: number;
1161
+ startedAt: string;
1162
+ finishedAt: string | null;
1163
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1164
+ errorClass: string | null;
1165
+ reprojectDocuments: number | null;
1166
+ reprojectRebuildDocuments: number | null;
1167
+ }, {
1168
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1169
+ mode: "SCAN" | "REPAIR";
1170
+ runUid: string;
1171
+ requestedBy: string;
1172
+ executor: string;
1173
+ basisRunUid: string | null;
1174
+ storeFingerprint: string;
1175
+ tombstoneRetentionDays: number;
1176
+ startedAt: string;
1177
+ finishedAt: string | null;
1178
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1179
+ errorClass: string | null;
1180
+ reprojectDocuments: number | null;
1181
+ reprojectRebuildDocuments: number | null;
1182
+ }>;
1183
+ quantities: z.ZodArray<z.ZodEffects<z.ZodObject<{
1184
+ store: z.ZodEnum<[
1185
+ "QDRANT",
1186
+ "NEO4J"
1187
+ ]>;
1188
+ scopeKey: z.ZodString;
1189
+ scopeRole: z.ZodEnum<[
1190
+ "PRODUCTION",
1191
+ "VARIANT",
1192
+ "LABEL"
1193
+ ]>;
1194
+ itemClass: z.ZodEnum<[
1195
+ "EXPECTED",
1196
+ "LIVE",
1197
+ "HISTORY",
1198
+ "TOMBSTONE",
1199
+ "AWAITING_SUCCESSOR",
1200
+ "IN_FLIGHT",
1201
+ "UNPLACED",
1202
+ "UNRECORDED",
1203
+ "UNREFERENCED",
1204
+ "CHANGED_AFTER_START",
1205
+ "PIPELINE_FAILED",
1206
+ "PROJECTION_REFUSED",
1207
+ "ORPHAN",
1208
+ "TOMBSTONE_EXPIRED",
1209
+ "UNPROPAGATED_DELETE",
1210
+ "STALE_REVISION",
1211
+ "MISPLACED",
1212
+ "UNMARKED_SUPERSEDED",
1213
+ "FLAG_DRIFT",
1214
+ "DETACHED",
1215
+ "UNKEYED",
1216
+ "MISSING",
1217
+ "COUNT_MISMATCH"
1218
+ ]>;
1219
+ unit: z.ZodEnum<[
1220
+ "POINT",
1221
+ "NODE",
1222
+ "CHUNK",
1223
+ "DOCUMENT"
1224
+ ]>;
1225
+ disposition: z.ZodEnum<[
1226
+ "EXPECTED",
1227
+ "HEALTHY",
1228
+ "RETAINED",
1229
+ "INFORMATIONAL",
1230
+ "DISCREPANCY"
1231
+ ]>;
1232
+ repairAction: z.ZodEnum<[
1233
+ "NONE",
1234
+ "PURGE",
1235
+ "FLAG",
1236
+ "REPROJECT"
1237
+ ]>;
1238
+ itemCount: z.ZodNullable<z.ZodNumber>;
1239
+ unmeasuredReason: z.ZodNullable<z.ZodString>;
1240
+ measuredAt: z.ZodNullable<z.ZodString>;
1241
+ repairedCount: z.ZodNullable<z.ZodNumber>;
1242
+ repairFailedCount: z.ZodNullable<z.ZodNumber>;
1243
+ repairSkippedCount: z.ZodNullable<z.ZodNumber>;
1244
+ }, "strict", z.ZodTypeAny, {
1245
+ repairedCount: number | null;
1246
+ repairFailedCount: number | null;
1247
+ repairSkippedCount: number | null;
1248
+ store: "QDRANT" | "NEO4J";
1249
+ scopeKey: string;
1250
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1251
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1252
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1253
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1254
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1255
+ itemCount: number | null;
1256
+ unmeasuredReason: string | null;
1257
+ measuredAt: string | null;
1258
+ }, {
1259
+ repairedCount: number | null;
1260
+ repairFailedCount: number | null;
1261
+ repairSkippedCount: number | null;
1262
+ store: "QDRANT" | "NEO4J";
1263
+ scopeKey: string;
1264
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1265
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1266
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1267
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1268
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1269
+ itemCount: number | null;
1270
+ unmeasuredReason: string | null;
1271
+ measuredAt: string | null;
1272
+ }>, {
1273
+ repairedCount: number | null;
1274
+ repairFailedCount: number | null;
1275
+ repairSkippedCount: number | null;
1276
+ store: "QDRANT" | "NEO4J";
1277
+ scopeKey: string;
1278
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1279
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1280
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1281
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1282
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1283
+ itemCount: number | null;
1284
+ unmeasuredReason: string | null;
1285
+ measuredAt: string | null;
1286
+ }, {
1287
+ repairedCount: number | null;
1288
+ repairFailedCount: number | null;
1289
+ repairSkippedCount: number | null;
1290
+ store: "QDRANT" | "NEO4J";
1291
+ scopeKey: string;
1292
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1293
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1294
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1295
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1296
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1297
+ itemCount: number | null;
1298
+ unmeasuredReason: string | null;
1299
+ measuredAt: string | null;
1300
+ }>, "many">;
1301
+ previousStoreFingerprint: z.ZodNullable<z.ZodString>;
1302
+ }, "strict", z.ZodTypeAny, {
1303
+ run: {
1304
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1305
+ mode: "SCAN" | "REPAIR";
1306
+ runUid: string;
1307
+ requestedBy: string;
1308
+ executor: string;
1309
+ basisRunUid: string | null;
1310
+ storeFingerprint: string;
1311
+ tombstoneRetentionDays: number;
1312
+ startedAt: string;
1313
+ finishedAt: string | null;
1314
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1315
+ errorClass: string | null;
1316
+ reprojectDocuments: number | null;
1317
+ reprojectRebuildDocuments: number | null;
1318
+ };
1319
+ quantities: {
1320
+ repairedCount: number | null;
1321
+ repairFailedCount: number | null;
1322
+ repairSkippedCount: number | null;
1323
+ store: "QDRANT" | "NEO4J";
1324
+ scopeKey: string;
1325
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1326
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1327
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1328
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1329
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1330
+ itemCount: number | null;
1331
+ unmeasuredReason: string | null;
1332
+ measuredAt: string | null;
1333
+ }[];
1334
+ previousStoreFingerprint: string | null;
1335
+ }, {
1336
+ run: {
1337
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1338
+ mode: "SCAN" | "REPAIR";
1339
+ runUid: string;
1340
+ requestedBy: string;
1341
+ executor: string;
1342
+ basisRunUid: string | null;
1343
+ storeFingerprint: string;
1344
+ tombstoneRetentionDays: number;
1345
+ startedAt: string;
1346
+ finishedAt: string | null;
1347
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1348
+ errorClass: string | null;
1349
+ reprojectDocuments: number | null;
1350
+ reprojectRebuildDocuments: number | null;
1351
+ };
1352
+ quantities: {
1353
+ repairedCount: number | null;
1354
+ repairFailedCount: number | null;
1355
+ repairSkippedCount: number | null;
1356
+ store: "QDRANT" | "NEO4J";
1357
+ scopeKey: string;
1358
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1359
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1360
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1361
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1362
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1363
+ itemCount: number | null;
1364
+ unmeasuredReason: string | null;
1365
+ measuredAt: string | null;
1366
+ }[];
1367
+ previousStoreFingerprint: string | null;
1368
+ }>, {
1369
+ run: {
1370
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1371
+ mode: "SCAN" | "REPAIR";
1372
+ runUid: string;
1373
+ requestedBy: string;
1374
+ executor: string;
1375
+ basisRunUid: string | null;
1376
+ storeFingerprint: string;
1377
+ tombstoneRetentionDays: number;
1378
+ startedAt: string;
1379
+ finishedAt: string | null;
1380
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1381
+ errorClass: string | null;
1382
+ reprojectDocuments: number | null;
1383
+ reprojectRebuildDocuments: number | null;
1384
+ };
1385
+ quantities: {
1386
+ repairedCount: number | null;
1387
+ repairFailedCount: number | null;
1388
+ repairSkippedCount: number | null;
1389
+ store: "QDRANT" | "NEO4J";
1390
+ scopeKey: string;
1391
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1392
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1393
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1394
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1395
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1396
+ itemCount: number | null;
1397
+ unmeasuredReason: string | null;
1398
+ measuredAt: string | null;
1399
+ }[];
1400
+ previousStoreFingerprint: string | null;
1401
+ }, {
1402
+ run: {
1403
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1404
+ mode: "SCAN" | "REPAIR";
1405
+ runUid: string;
1406
+ requestedBy: string;
1407
+ executor: string;
1408
+ basisRunUid: string | null;
1409
+ storeFingerprint: string;
1410
+ tombstoneRetentionDays: number;
1411
+ startedAt: string;
1412
+ finishedAt: string | null;
1413
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1414
+ errorClass: string | null;
1415
+ reprojectDocuments: number | null;
1416
+ reprojectRebuildDocuments: number | null;
1417
+ };
1418
+ quantities: {
1419
+ repairedCount: number | null;
1420
+ repairFailedCount: number | null;
1421
+ repairSkippedCount: number | null;
1422
+ store: "QDRANT" | "NEO4J";
1423
+ scopeKey: string;
1424
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1425
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1426
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1427
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1428
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1429
+ itemCount: number | null;
1430
+ unmeasuredReason: string | null;
1431
+ measuredAt: string | null;
1432
+ }[];
1433
+ previousStoreFingerprint: string | null;
1434
+ }>>;
1435
+ active: z.ZodNullable<z.ZodEffects<z.ZodObject<{
1436
+ run: z.ZodEffects<z.ZodObject<{
1437
+ runUid: z.ZodEffects<z.ZodString, string, string>;
1438
+ mode: z.ZodEnum<[
1439
+ "SCAN",
1440
+ "REPAIR"
1441
+ ]>;
1442
+ status: z.ZodEnum<[
1443
+ "RUNNING",
1444
+ "COMPLETED",
1445
+ "FAILED",
1446
+ "CANCELLED",
1447
+ "ABANDONED"
1448
+ ]>;
1449
+ requestedBy: z.ZodString;
1450
+ executor: z.ZodString;
1451
+ basisRunUid: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1452
+ storeFingerprint: z.ZodString;
1453
+ tombstoneRetentionDays: z.ZodNumber;
1454
+ startedAt: z.ZodString;
1455
+ finishedAt: z.ZodNullable<z.ZodString>;
1456
+ verdict: z.ZodNullable<z.ZodEnum<[
1457
+ "CONSISTENT",
1458
+ "INCONSISTENT",
1459
+ "UNDETERMINED"
1460
+ ]>>;
1461
+ errorClass: z.ZodNullable<z.ZodString>;
1462
+ reprojectDocuments: z.ZodNullable<z.ZodNumber>;
1463
+ reprojectRebuildDocuments: z.ZodNullable<z.ZodNumber>;
1464
+ }, "strict", z.ZodTypeAny, {
1465
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1466
+ mode: "SCAN" | "REPAIR";
1467
+ runUid: string;
1468
+ requestedBy: string;
1469
+ executor: string;
1470
+ basisRunUid: string | null;
1471
+ storeFingerprint: string;
1472
+ tombstoneRetentionDays: number;
1473
+ startedAt: string;
1474
+ finishedAt: string | null;
1475
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1476
+ errorClass: string | null;
1477
+ reprojectDocuments: number | null;
1478
+ reprojectRebuildDocuments: number | null;
1479
+ }, {
1480
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1481
+ mode: "SCAN" | "REPAIR";
1482
+ runUid: string;
1483
+ requestedBy: string;
1484
+ executor: string;
1485
+ basisRunUid: string | null;
1486
+ storeFingerprint: string;
1487
+ tombstoneRetentionDays: number;
1488
+ startedAt: string;
1489
+ finishedAt: string | null;
1490
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1491
+ errorClass: string | null;
1492
+ reprojectDocuments: number | null;
1493
+ reprojectRebuildDocuments: number | null;
1494
+ }>, {
1495
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1496
+ mode: "SCAN" | "REPAIR";
1497
+ runUid: string;
1498
+ requestedBy: string;
1499
+ executor: string;
1500
+ basisRunUid: string | null;
1501
+ storeFingerprint: string;
1502
+ tombstoneRetentionDays: number;
1503
+ startedAt: string;
1504
+ finishedAt: string | null;
1505
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1506
+ errorClass: string | null;
1507
+ reprojectDocuments: number | null;
1508
+ reprojectRebuildDocuments: number | null;
1509
+ }, {
1510
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1511
+ mode: "SCAN" | "REPAIR";
1512
+ runUid: string;
1513
+ requestedBy: string;
1514
+ executor: string;
1515
+ basisRunUid: string | null;
1516
+ storeFingerprint: string;
1517
+ tombstoneRetentionDays: number;
1518
+ startedAt: string;
1519
+ finishedAt: string | null;
1520
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1521
+ errorClass: string | null;
1522
+ reprojectDocuments: number | null;
1523
+ reprojectRebuildDocuments: number | null;
1524
+ }>;
1525
+ phase: z.ZodNullable<z.ZodEnum<[
1526
+ "QDRANT",
1527
+ "NEO4J",
1528
+ "DOCUMENTS"
1529
+ ]>>;
1530
+ phaseScope: z.ZodNullable<z.ZodString>;
1531
+ phaseDone: z.ZodNullable<z.ZodNumber>;
1532
+ phaseTotal: z.ZodNullable<z.ZodNumber>;
1533
+ heartbeatAt: z.ZodString;
1534
+ isStale: z.ZodBoolean;
1535
+ cancelRequestedAt: z.ZodNullable<z.ZodString>;
1536
+ }, "strict", z.ZodTypeAny, {
1537
+ run: {
1538
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1539
+ mode: "SCAN" | "REPAIR";
1540
+ runUid: string;
1541
+ requestedBy: string;
1542
+ executor: string;
1543
+ basisRunUid: string | null;
1544
+ storeFingerprint: string;
1545
+ tombstoneRetentionDays: number;
1546
+ startedAt: string;
1547
+ finishedAt: string | null;
1548
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1549
+ errorClass: string | null;
1550
+ reprojectDocuments: number | null;
1551
+ reprojectRebuildDocuments: number | null;
1552
+ };
1553
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1554
+ phaseScope: string | null;
1555
+ phaseDone: number | null;
1556
+ phaseTotal: number | null;
1557
+ heartbeatAt: string;
1558
+ isStale: boolean;
1559
+ cancelRequestedAt: string | null;
1560
+ }, {
1561
+ run: {
1562
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1563
+ mode: "SCAN" | "REPAIR";
1564
+ runUid: string;
1565
+ requestedBy: string;
1566
+ executor: string;
1567
+ basisRunUid: string | null;
1568
+ storeFingerprint: string;
1569
+ tombstoneRetentionDays: number;
1570
+ startedAt: string;
1571
+ finishedAt: string | null;
1572
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1573
+ errorClass: string | null;
1574
+ reprojectDocuments: number | null;
1575
+ reprojectRebuildDocuments: number | null;
1576
+ };
1577
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1578
+ phaseScope: string | null;
1579
+ phaseDone: number | null;
1580
+ phaseTotal: number | null;
1581
+ heartbeatAt: string;
1582
+ isStale: boolean;
1583
+ cancelRequestedAt: string | null;
1584
+ }>, {
1585
+ run: {
1586
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1587
+ mode: "SCAN" | "REPAIR";
1588
+ runUid: string;
1589
+ requestedBy: string;
1590
+ executor: string;
1591
+ basisRunUid: string | null;
1592
+ storeFingerprint: string;
1593
+ tombstoneRetentionDays: number;
1594
+ startedAt: string;
1595
+ finishedAt: string | null;
1596
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1597
+ errorClass: string | null;
1598
+ reprojectDocuments: number | null;
1599
+ reprojectRebuildDocuments: number | null;
1600
+ };
1601
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1602
+ phaseScope: string | null;
1603
+ phaseDone: number | null;
1604
+ phaseTotal: number | null;
1605
+ heartbeatAt: string;
1606
+ isStale: boolean;
1607
+ cancelRequestedAt: string | null;
1608
+ }, {
1609
+ run: {
1610
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1611
+ mode: "SCAN" | "REPAIR";
1612
+ runUid: string;
1613
+ requestedBy: string;
1614
+ executor: string;
1615
+ basisRunUid: string | null;
1616
+ storeFingerprint: string;
1617
+ tombstoneRetentionDays: number;
1618
+ startedAt: string;
1619
+ finishedAt: string | null;
1620
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1621
+ errorClass: string | null;
1622
+ reprojectDocuments: number | null;
1623
+ reprojectRebuildDocuments: number | null;
1624
+ };
1625
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1626
+ phaseScope: string | null;
1627
+ phaseDone: number | null;
1628
+ phaseTotal: number | null;
1629
+ heartbeatAt: string;
1630
+ isStale: boolean;
1631
+ cancelRequestedAt: string | null;
1632
+ }>>;
1633
+ newerUnsuccessful: z.ZodNullable<z.ZodEffects<z.ZodObject<{
1634
+ run: z.ZodEffects<z.ZodObject<{
1635
+ runUid: z.ZodEffects<z.ZodString, string, string>;
1636
+ mode: z.ZodEnum<[
1637
+ "SCAN",
1638
+ "REPAIR"
1639
+ ]>;
1640
+ status: z.ZodEnum<[
1641
+ "RUNNING",
1642
+ "COMPLETED",
1643
+ "FAILED",
1644
+ "CANCELLED",
1645
+ "ABANDONED"
1646
+ ]>;
1647
+ requestedBy: z.ZodString;
1648
+ executor: z.ZodString;
1649
+ basisRunUid: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
1650
+ storeFingerprint: z.ZodString;
1651
+ tombstoneRetentionDays: z.ZodNumber;
1652
+ startedAt: z.ZodString;
1653
+ finishedAt: z.ZodNullable<z.ZodString>;
1654
+ verdict: z.ZodNullable<z.ZodEnum<[
1655
+ "CONSISTENT",
1656
+ "INCONSISTENT",
1657
+ "UNDETERMINED"
1658
+ ]>>;
1659
+ errorClass: z.ZodNullable<z.ZodString>;
1660
+ reprojectDocuments: z.ZodNullable<z.ZodNumber>;
1661
+ reprojectRebuildDocuments: z.ZodNullable<z.ZodNumber>;
1662
+ }, "strict", z.ZodTypeAny, {
1663
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1664
+ mode: "SCAN" | "REPAIR";
1665
+ runUid: string;
1666
+ requestedBy: string;
1667
+ executor: string;
1668
+ basisRunUid: string | null;
1669
+ storeFingerprint: string;
1670
+ tombstoneRetentionDays: number;
1671
+ startedAt: string;
1672
+ finishedAt: string | null;
1673
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1674
+ errorClass: string | null;
1675
+ reprojectDocuments: number | null;
1676
+ reprojectRebuildDocuments: number | null;
1677
+ }, {
1678
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1679
+ mode: "SCAN" | "REPAIR";
1680
+ runUid: string;
1681
+ requestedBy: string;
1682
+ executor: string;
1683
+ basisRunUid: string | null;
1684
+ storeFingerprint: string;
1685
+ tombstoneRetentionDays: number;
1686
+ startedAt: string;
1687
+ finishedAt: string | null;
1688
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1689
+ errorClass: string | null;
1690
+ reprojectDocuments: number | null;
1691
+ reprojectRebuildDocuments: number | null;
1692
+ }>, {
1693
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1694
+ mode: "SCAN" | "REPAIR";
1695
+ runUid: string;
1696
+ requestedBy: string;
1697
+ executor: string;
1698
+ basisRunUid: string | null;
1699
+ storeFingerprint: string;
1700
+ tombstoneRetentionDays: number;
1701
+ startedAt: string;
1702
+ finishedAt: string | null;
1703
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1704
+ errorClass: string | null;
1705
+ reprojectDocuments: number | null;
1706
+ reprojectRebuildDocuments: number | null;
1707
+ }, {
1708
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1709
+ mode: "SCAN" | "REPAIR";
1710
+ runUid: string;
1711
+ requestedBy: string;
1712
+ executor: string;
1713
+ basisRunUid: string | null;
1714
+ storeFingerprint: string;
1715
+ tombstoneRetentionDays: number;
1716
+ startedAt: string;
1717
+ finishedAt: string | null;
1718
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1719
+ errorClass: string | null;
1720
+ reprojectDocuments: number | null;
1721
+ reprojectRebuildDocuments: number | null;
1722
+ }>;
1723
+ repairAppliedItems: z.ZodNullable<z.ZodNumber>;
1724
+ hasNewerRepair: z.ZodBoolean;
1725
+ }, "strict", z.ZodTypeAny, {
1726
+ run: {
1727
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1728
+ mode: "SCAN" | "REPAIR";
1729
+ runUid: string;
1730
+ requestedBy: string;
1731
+ executor: string;
1732
+ basisRunUid: string | null;
1733
+ storeFingerprint: string;
1734
+ tombstoneRetentionDays: number;
1735
+ startedAt: string;
1736
+ finishedAt: string | null;
1737
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1738
+ errorClass: string | null;
1739
+ reprojectDocuments: number | null;
1740
+ reprojectRebuildDocuments: number | null;
1741
+ };
1742
+ repairAppliedItems: number | null;
1743
+ hasNewerRepair: boolean;
1744
+ }, {
1745
+ run: {
1746
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1747
+ mode: "SCAN" | "REPAIR";
1748
+ runUid: string;
1749
+ requestedBy: string;
1750
+ executor: string;
1751
+ basisRunUid: string | null;
1752
+ storeFingerprint: string;
1753
+ tombstoneRetentionDays: number;
1754
+ startedAt: string;
1755
+ finishedAt: string | null;
1756
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1757
+ errorClass: string | null;
1758
+ reprojectDocuments: number | null;
1759
+ reprojectRebuildDocuments: number | null;
1760
+ };
1761
+ repairAppliedItems: number | null;
1762
+ hasNewerRepair: boolean;
1763
+ }>, {
1764
+ run: {
1765
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1766
+ mode: "SCAN" | "REPAIR";
1767
+ runUid: string;
1768
+ requestedBy: string;
1769
+ executor: string;
1770
+ basisRunUid: string | null;
1771
+ storeFingerprint: string;
1772
+ tombstoneRetentionDays: number;
1773
+ startedAt: string;
1774
+ finishedAt: string | null;
1775
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1776
+ errorClass: string | null;
1777
+ reprojectDocuments: number | null;
1778
+ reprojectRebuildDocuments: number | null;
1779
+ };
1780
+ repairAppliedItems: number | null;
1781
+ hasNewerRepair: boolean;
1782
+ }, {
1783
+ run: {
1784
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1785
+ mode: "SCAN" | "REPAIR";
1786
+ runUid: string;
1787
+ requestedBy: string;
1788
+ executor: string;
1789
+ basisRunUid: string | null;
1790
+ storeFingerprint: string;
1791
+ tombstoneRetentionDays: number;
1792
+ startedAt: string;
1793
+ finishedAt: string | null;
1794
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1795
+ errorClass: string | null;
1796
+ reprojectDocuments: number | null;
1797
+ reprojectRebuildDocuments: number | null;
1798
+ };
1799
+ repairAppliedItems: number | null;
1800
+ hasNewerRepair: boolean;
1801
+ }>>;
1802
+ }, "strict", z.ZodTypeAny, {
1803
+ readAt: string;
1804
+ lastCompleted: {
1805
+ run: {
1806
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1807
+ mode: "SCAN" | "REPAIR";
1808
+ runUid: string;
1809
+ requestedBy: string;
1810
+ executor: string;
1811
+ basisRunUid: string | null;
1812
+ storeFingerprint: string;
1813
+ tombstoneRetentionDays: number;
1814
+ startedAt: string;
1815
+ finishedAt: string | null;
1816
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1817
+ errorClass: string | null;
1818
+ reprojectDocuments: number | null;
1819
+ reprojectRebuildDocuments: number | null;
1820
+ };
1821
+ quantities: {
1822
+ repairedCount: number | null;
1823
+ repairFailedCount: number | null;
1824
+ repairSkippedCount: number | null;
1825
+ store: "QDRANT" | "NEO4J";
1826
+ scopeKey: string;
1827
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1828
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1829
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1830
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1831
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1832
+ itemCount: number | null;
1833
+ unmeasuredReason: string | null;
1834
+ measuredAt: string | null;
1835
+ }[];
1836
+ previousStoreFingerprint: string | null;
1837
+ } | null;
1838
+ active: {
1839
+ run: {
1840
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1841
+ mode: "SCAN" | "REPAIR";
1842
+ runUid: string;
1843
+ requestedBy: string;
1844
+ executor: string;
1845
+ basisRunUid: string | null;
1846
+ storeFingerprint: string;
1847
+ tombstoneRetentionDays: number;
1848
+ startedAt: string;
1849
+ finishedAt: string | null;
1850
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1851
+ errorClass: string | null;
1852
+ reprojectDocuments: number | null;
1853
+ reprojectRebuildDocuments: number | null;
1854
+ };
1855
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1856
+ phaseScope: string | null;
1857
+ phaseDone: number | null;
1858
+ phaseTotal: number | null;
1859
+ heartbeatAt: string;
1860
+ isStale: boolean;
1861
+ cancelRequestedAt: string | null;
1862
+ } | null;
1863
+ newerUnsuccessful: {
1864
+ run: {
1865
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1866
+ mode: "SCAN" | "REPAIR";
1867
+ runUid: string;
1868
+ requestedBy: string;
1869
+ executor: string;
1870
+ basisRunUid: string | null;
1871
+ storeFingerprint: string;
1872
+ tombstoneRetentionDays: number;
1873
+ startedAt: string;
1874
+ finishedAt: string | null;
1875
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1876
+ errorClass: string | null;
1877
+ reprojectDocuments: number | null;
1878
+ reprojectRebuildDocuments: number | null;
1879
+ };
1880
+ repairAppliedItems: number | null;
1881
+ hasNewerRepair: boolean;
1882
+ } | null;
1883
+ }, {
1884
+ readAt: string;
1885
+ lastCompleted: {
1886
+ run: {
1887
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1888
+ mode: "SCAN" | "REPAIR";
1889
+ runUid: string;
1890
+ requestedBy: string;
1891
+ executor: string;
1892
+ basisRunUid: string | null;
1893
+ storeFingerprint: string;
1894
+ tombstoneRetentionDays: number;
1895
+ startedAt: string;
1896
+ finishedAt: string | null;
1897
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1898
+ errorClass: string | null;
1899
+ reprojectDocuments: number | null;
1900
+ reprojectRebuildDocuments: number | null;
1901
+ };
1902
+ quantities: {
1903
+ repairedCount: number | null;
1904
+ repairFailedCount: number | null;
1905
+ repairSkippedCount: number | null;
1906
+ store: "QDRANT" | "NEO4J";
1907
+ scopeKey: string;
1908
+ scopeRole: "PRODUCTION" | "VARIANT" | "LABEL";
1909
+ itemClass: "EXPECTED" | "LIVE" | "HISTORY" | "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
1910
+ unit: "POINT" | "NODE" | "CHUNK" | "DOCUMENT";
1911
+ disposition: "EXPECTED" | "HEALTHY" | "RETAINED" | "INFORMATIONAL" | "DISCREPANCY";
1912
+ repairAction: "NONE" | "PURGE" | "FLAG" | "REPROJECT";
1913
+ itemCount: number | null;
1914
+ unmeasuredReason: string | null;
1915
+ measuredAt: string | null;
1916
+ }[];
1917
+ previousStoreFingerprint: string | null;
1918
+ } | null;
1919
+ active: {
1920
+ run: {
1921
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1922
+ mode: "SCAN" | "REPAIR";
1923
+ runUid: string;
1924
+ requestedBy: string;
1925
+ executor: string;
1926
+ basisRunUid: string | null;
1927
+ storeFingerprint: string;
1928
+ tombstoneRetentionDays: number;
1929
+ startedAt: string;
1930
+ finishedAt: string | null;
1931
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1932
+ errorClass: string | null;
1933
+ reprojectDocuments: number | null;
1934
+ reprojectRebuildDocuments: number | null;
1935
+ };
1936
+ phase: "QDRANT" | "NEO4J" | "DOCUMENTS" | null;
1937
+ phaseScope: string | null;
1938
+ phaseDone: number | null;
1939
+ phaseTotal: number | null;
1940
+ heartbeatAt: string;
1941
+ isStale: boolean;
1942
+ cancelRequestedAt: string | null;
1943
+ } | null;
1944
+ newerUnsuccessful: {
1945
+ run: {
1946
+ status: "RUNNING" | "COMPLETED" | "FAILED" | "CANCELLED" | "ABANDONED";
1947
+ mode: "SCAN" | "REPAIR";
1948
+ runUid: string;
1949
+ requestedBy: string;
1950
+ executor: string;
1951
+ basisRunUid: string | null;
1952
+ storeFingerprint: string;
1953
+ tombstoneRetentionDays: number;
1954
+ startedAt: string;
1955
+ finishedAt: string | null;
1956
+ verdict: "CONSISTENT" | "INCONSISTENT" | "UNDETERMINED" | null;
1957
+ errorClass: string | null;
1958
+ reprojectDocuments: number | null;
1959
+ reprojectRebuildDocuments: number | null;
1960
+ };
1961
+ repairAppliedItems: number | null;
1962
+ hasNewerRepair: boolean;
1963
+ } | null;
1964
+ }>;
1965
+ type IntegrityAuditOverview = z.infer<typeof IntegrityAuditOverviewSchema>;
1966
+ declare const IntegrityFindingSchema: z.ZodEffects<z.ZodObject<{
1967
+ sequence: z.ZodNumber;
1968
+ itemKey: z.ZodString;
1969
+ metadataId: z.ZodNullable<z.ZodNumber>;
1970
+ fileUri: z.ZodNullable<z.ZodString>;
1971
+ revision: z.ZodNullable<z.ZodNumber>;
1972
+ observed: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1973
+ repairOutcome: z.ZodNullable<z.ZodEnum<[
1974
+ "APPLIED",
1975
+ "SKIPPED",
1976
+ "FAILED"
1977
+ ]>>;
1978
+ repairErrorClass: z.ZodNullable<z.ZodString>;
1979
+ repairSkipReason: z.ZodNullable<z.ZodEnum<[
1980
+ "RECLASSIFIED",
1981
+ "IN_FLIGHT",
1982
+ "DESTINATION_PENDING",
1983
+ "BASIS_EXHAUSTED",
1984
+ "PROJECTION_REFUSED"
1985
+ ]>>;
1986
+ }, "strict", z.ZodTypeAny, {
1987
+ sequence: number;
1988
+ itemKey: string;
1989
+ metadataId: number | null;
1990
+ fileUri: string | null;
1991
+ revision: number | null;
1992
+ observed: Record<string, unknown>;
1993
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
1994
+ repairErrorClass: string | null;
1995
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
1996
+ }, {
1997
+ sequence: number;
1998
+ itemKey: string;
1999
+ metadataId: number | null;
2000
+ fileUri: string | null;
2001
+ revision: number | null;
2002
+ observed: Record<string, unknown>;
2003
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2004
+ repairErrorClass: string | null;
2005
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2006
+ }>, {
2007
+ sequence: number;
2008
+ itemKey: string;
2009
+ metadataId: number | null;
2010
+ fileUri: string | null;
2011
+ revision: number | null;
2012
+ observed: Record<string, unknown>;
2013
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2014
+ repairErrorClass: string | null;
2015
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2016
+ }, {
2017
+ sequence: number;
2018
+ itemKey: string;
2019
+ metadataId: number | null;
2020
+ fileUri: string | null;
2021
+ revision: number | null;
2022
+ observed: Record<string, unknown>;
2023
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2024
+ repairErrorClass: string | null;
2025
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2026
+ }>;
2027
+ type IntegrityFinding = z.infer<typeof IntegrityFindingSchema>;
2028
+ declare const IntegrityFindingPageSchema: z.ZodEffects<z.ZodObject<{
2029
+ rows: z.ZodArray<z.ZodEffects<z.ZodObject<{
2030
+ sequence: z.ZodNumber;
2031
+ itemKey: z.ZodString;
2032
+ metadataId: z.ZodNullable<z.ZodNumber>;
2033
+ fileUri: z.ZodNullable<z.ZodString>;
2034
+ revision: z.ZodNullable<z.ZodNumber>;
2035
+ observed: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2036
+ repairOutcome: z.ZodNullable<z.ZodEnum<[
2037
+ "APPLIED",
2038
+ "SKIPPED",
2039
+ "FAILED"
2040
+ ]>>;
2041
+ repairErrorClass: z.ZodNullable<z.ZodString>;
2042
+ repairSkipReason: z.ZodNullable<z.ZodEnum<[
2043
+ "RECLASSIFIED",
2044
+ "IN_FLIGHT",
2045
+ "DESTINATION_PENDING",
2046
+ "BASIS_EXHAUSTED",
2047
+ "PROJECTION_REFUSED"
2048
+ ]>>;
2049
+ }, "strict", z.ZodTypeAny, {
2050
+ sequence: number;
2051
+ itemKey: string;
2052
+ metadataId: number | null;
2053
+ fileUri: string | null;
2054
+ revision: number | null;
2055
+ observed: Record<string, unknown>;
2056
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2057
+ repairErrorClass: string | null;
2058
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2059
+ }, {
2060
+ sequence: number;
2061
+ itemKey: string;
2062
+ metadataId: number | null;
2063
+ fileUri: string | null;
2064
+ revision: number | null;
2065
+ observed: Record<string, unknown>;
2066
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2067
+ repairErrorClass: string | null;
2068
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2069
+ }>, {
2070
+ sequence: number;
2071
+ itemKey: string;
2072
+ metadataId: number | null;
2073
+ fileUri: string | null;
2074
+ revision: number | null;
2075
+ observed: Record<string, unknown>;
2076
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2077
+ repairErrorClass: string | null;
2078
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2079
+ }, {
2080
+ sequence: number;
2081
+ itemKey: string;
2082
+ metadataId: number | null;
2083
+ fileUri: string | null;
2084
+ revision: number | null;
2085
+ observed: Record<string, unknown>;
2086
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2087
+ repairErrorClass: string | null;
2088
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2089
+ }>, "many">;
2090
+ nextAfter: z.ZodNullable<z.ZodNumber>;
2091
+ recordedCount: z.ZodNumber;
2092
+ totalCount: z.ZodNullable<z.ZodNumber>;
2093
+ }, "strict", z.ZodTypeAny, {
2094
+ rows: {
2095
+ sequence: number;
2096
+ itemKey: string;
2097
+ metadataId: number | null;
2098
+ fileUri: string | null;
2099
+ revision: number | null;
2100
+ observed: Record<string, unknown>;
2101
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2102
+ repairErrorClass: string | null;
2103
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2104
+ }[];
2105
+ nextAfter: number | null;
2106
+ recordedCount: number;
2107
+ totalCount: number | null;
2108
+ }, {
2109
+ rows: {
2110
+ sequence: number;
2111
+ itemKey: string;
2112
+ metadataId: number | null;
2113
+ fileUri: string | null;
2114
+ revision: number | null;
2115
+ observed: Record<string, unknown>;
2116
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2117
+ repairErrorClass: string | null;
2118
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2119
+ }[];
2120
+ nextAfter: number | null;
2121
+ recordedCount: number;
2122
+ totalCount: number | null;
2123
+ }>, {
2124
+ rows: {
2125
+ sequence: number;
2126
+ itemKey: string;
2127
+ metadataId: number | null;
2128
+ fileUri: string | null;
2129
+ revision: number | null;
2130
+ observed: Record<string, unknown>;
2131
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2132
+ repairErrorClass: string | null;
2133
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2134
+ }[];
2135
+ nextAfter: number | null;
2136
+ recordedCount: number;
2137
+ totalCount: number | null;
2138
+ }, {
2139
+ rows: {
2140
+ sequence: number;
2141
+ itemKey: string;
2142
+ metadataId: number | null;
2143
+ fileUri: string | null;
2144
+ revision: number | null;
2145
+ observed: Record<string, unknown>;
2146
+ repairOutcome: "FAILED" | "APPLIED" | "SKIPPED" | null;
2147
+ repairErrorClass: string | null;
2148
+ repairSkipReason: "IN_FLIGHT" | "PROJECTION_REFUSED" | "RECLASSIFIED" | "DESTINATION_PENDING" | "BASIS_EXHAUSTED" | null;
2149
+ }[];
2150
+ nextAfter: number | null;
2151
+ recordedCount: number;
2152
+ totalCount: number | null;
2153
+ }>;
2154
+ type IntegrityFindingPage = z.infer<typeof IntegrityFindingPageSchema>;
2155
+ declare const IntegrityFindingsQuerySchema: z.ZodObject<{
2156
+ runUid: z.ZodEffects<z.ZodString, string, string>;
2157
+ store: z.ZodEnum<[
2158
+ "QDRANT",
2159
+ "NEO4J"
2160
+ ]>;
2161
+ scopeKey: z.ZodString;
2162
+ itemClass: z.ZodEnum<[
2163
+ "TOMBSTONE",
2164
+ "AWAITING_SUCCESSOR",
2165
+ "IN_FLIGHT",
2166
+ "UNPLACED",
2167
+ "UNRECORDED",
2168
+ "UNREFERENCED",
2169
+ "CHANGED_AFTER_START",
2170
+ "PIPELINE_FAILED",
2171
+ "PROJECTION_REFUSED",
2172
+ "ORPHAN",
2173
+ "TOMBSTONE_EXPIRED",
2174
+ "UNPROPAGATED_DELETE",
2175
+ "STALE_REVISION",
2176
+ "MISPLACED",
2177
+ "UNMARKED_SUPERSEDED",
2178
+ "FLAG_DRIFT",
2179
+ "DETACHED",
2180
+ "UNKEYED",
2181
+ "MISSING",
2182
+ "COUNT_MISMATCH"
2183
+ ]>;
2184
+ after: z.ZodOptional<z.ZodNumber>;
2185
+ limit: z.ZodNumber;
2186
+ }, "strict", z.ZodTypeAny, {
2187
+ limit: number;
2188
+ runUid: string;
2189
+ store: "QDRANT" | "NEO4J";
2190
+ scopeKey: string;
2191
+ itemClass: "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
2192
+ after?: number | undefined;
2193
+ }, {
2194
+ limit: number;
2195
+ runUid: string;
2196
+ store: "QDRANT" | "NEO4J";
2197
+ scopeKey: string;
2198
+ itemClass: "TOMBSTONE" | "AWAITING_SUCCESSOR" | "IN_FLIGHT" | "UNPLACED" | "UNRECORDED" | "UNREFERENCED" | "CHANGED_AFTER_START" | "PIPELINE_FAILED" | "PROJECTION_REFUSED" | "ORPHAN" | "TOMBSTONE_EXPIRED" | "UNPROPAGATED_DELETE" | "STALE_REVISION" | "MISPLACED" | "UNMARKED_SUPERSEDED" | "FLAG_DRIFT" | "DETACHED" | "UNKEYED" | "MISSING" | "COUNT_MISMATCH";
2199
+ after?: number | undefined;
2200
+ }>;
2201
+ type IntegrityFindingsQuery = z.infer<typeof IntegrityFindingsQuerySchema>;
2202
+ declare const IntegrityCommandFailureCodeSchema: z.ZodEnum<[
2203
+ "DEPLOYMENT_DISABLED",
2204
+ "RUN_ALREADY_ACTIVE",
2205
+ "BASIS_INVALID",
2206
+ "RUN_ALREADY_FINISHED",
2207
+ "FORBIDDEN",
2208
+ "UPSTREAM_FAILED"
2209
+ ]>;
2210
+ type IntegrityCommandFailureCode = z.infer<typeof IntegrityCommandFailureCodeSchema>;
2211
+ declare const IntegrityCommandSchema: z.ZodEnum<[
2212
+ "start",
2213
+ "cancel"
2214
+ ]>;
2215
+ type IntegrityCommand = z.infer<typeof IntegrityCommandSchema>;
2216
+ declare const IntegrityStartFailureCodeSchema: z.ZodEnum<[
2217
+ "DEPLOYMENT_DISABLED",
2218
+ "RUN_ALREADY_ACTIVE",
2219
+ "BASIS_INVALID",
2220
+ "FORBIDDEN",
2221
+ "UPSTREAM_FAILED"
2222
+ ]>;
2223
+ type IntegrityStartFailureCode = z.infer<typeof IntegrityStartFailureCodeSchema>;
2224
+ declare const IntegrityCancelFailureCodeSchema: z.ZodEnum<[
2225
+ "RUN_ALREADY_FINISHED",
2226
+ "FORBIDDEN",
2227
+ "UPSTREAM_FAILED"
2228
+ ]>;
2229
+ type IntegrityCancelFailureCode = z.infer<typeof IntegrityCancelFailureCodeSchema>;
2230
+ declare const FAILURE_CODES_OF_COMMAND: {
2231
+ readonly start: z.ZodEnum<[
2232
+ "DEPLOYMENT_DISABLED",
2233
+ "RUN_ALREADY_ACTIVE",
2234
+ "BASIS_INVALID",
2235
+ "FORBIDDEN",
2236
+ "UPSTREAM_FAILED"
2237
+ ]>;
2238
+ readonly cancel: z.ZodEnum<[
2239
+ "RUN_ALREADY_FINISHED",
2240
+ "FORBIDDEN",
2241
+ "UPSTREAM_FAILED"
2242
+ ]>;
2243
+ };
2244
+ type IntegrityCommandFailureCodeFor<Command extends IntegrityCommand> = z.infer<(typeof FAILURE_CODES_OF_COMMAND)[Command]>;
2245
+ declare const IntegrityCommandCodeRowSchema: z.ZodObject<{
2246
+ code: z.ZodEnum<[
2247
+ "DEPLOYMENT_DISABLED",
2248
+ "RUN_ALREADY_ACTIVE",
2249
+ "BASIS_INVALID",
2250
+ "RUN_ALREADY_FINISHED",
2251
+ "FORBIDDEN"
2252
+ ]>;
2253
+ status: z.ZodNumber;
2254
+ errorCode: z.ZodNullable<z.ZodNumber>;
2255
+ }, "strict", z.ZodTypeAny, {
2256
+ code: "DEPLOYMENT_DISABLED" | "RUN_ALREADY_ACTIVE" | "BASIS_INVALID" | "RUN_ALREADY_FINISHED" | "FORBIDDEN";
2257
+ status: number;
2258
+ errorCode: number | null;
2259
+ }, {
2260
+ code: "DEPLOYMENT_DISABLED" | "RUN_ALREADY_ACTIVE" | "BASIS_INVALID" | "RUN_ALREADY_FINISHED" | "FORBIDDEN";
2261
+ status: number;
2262
+ errorCode: number | null;
2263
+ }>;
2264
+ type IntegrityCommandCodeRow = Readonly<z.infer<typeof IntegrityCommandCodeRowSchema>>;
2265
+ declare const INTEGRITY_COMMAND_CODES: readonly IntegrityCommandCodeRow[];
2266
+ declare const IntegrityCommandFailureSchema: z.ZodEffects<z.ZodDiscriminatedUnion<"command", [
2267
+ z.ZodObject<{
2268
+ command: z.ZodEnum<[
2269
+ "start"
2270
+ ]>;
2271
+ code: z.ZodEnum<[
2272
+ "DEPLOYMENT_DISABLED",
2273
+ "RUN_ALREADY_ACTIVE",
2274
+ "BASIS_INVALID",
2275
+ "FORBIDDEN",
2276
+ "UPSTREAM_FAILED"
2277
+ ]>;
2278
+ status: z.ZodNullable<z.ZodNumber>;
2279
+ }, "strict", z.ZodTypeAny, {
2280
+ code: "DEPLOYMENT_DISABLED" | "RUN_ALREADY_ACTIVE" | "BASIS_INVALID" | "FORBIDDEN" | "UPSTREAM_FAILED";
2281
+ status: number | null;
2282
+ command: "start";
2283
+ }, {
2284
+ code: "DEPLOYMENT_DISABLED" | "RUN_ALREADY_ACTIVE" | "BASIS_INVALID" | "FORBIDDEN" | "UPSTREAM_FAILED";
2285
+ status: number | null;
2286
+ command: "start";
2287
+ }>,
2288
+ z.ZodObject<{
2289
+ command: z.ZodEnum<[
2290
+ "cancel"
2291
+ ]>;
2292
+ code: z.ZodEnum<[
2293
+ "RUN_ALREADY_FINISHED",
2294
+ "FORBIDDEN",
2295
+ "UPSTREAM_FAILED"
2296
+ ]>;
2297
+ status: z.ZodNullable<z.ZodNumber>;
2298
+ }, "strict", z.ZodTypeAny, {
2299
+ code: "RUN_ALREADY_FINISHED" | "FORBIDDEN" | "UPSTREAM_FAILED";
2300
+ status: number | null;
2301
+ command: "cancel";
2302
+ }, {
2303
+ code: "RUN_ALREADY_FINISHED" | "FORBIDDEN" | "UPSTREAM_FAILED";
2304
+ status: number | null;
2305
+ command: "cancel";
2306
+ }>
2307
+ ]>, {
2308
+ code: "DEPLOYMENT_DISABLED" | "RUN_ALREADY_ACTIVE" | "BASIS_INVALID" | "FORBIDDEN" | "UPSTREAM_FAILED";
2309
+ status: number | null;
2310
+ command: "start";
2311
+ } | {
2312
+ code: "RUN_ALREADY_FINISHED" | "FORBIDDEN" | "UPSTREAM_FAILED";
2313
+ status: number | null;
2314
+ command: "cancel";
2315
+ }, {
2316
+ code: "DEPLOYMENT_DISABLED" | "RUN_ALREADY_ACTIVE" | "BASIS_INVALID" | "FORBIDDEN" | "UPSTREAM_FAILED";
2317
+ status: number | null;
2318
+ command: "start";
2319
+ } | {
2320
+ code: "RUN_ALREADY_FINISHED" | "FORBIDDEN" | "UPSTREAM_FAILED";
2321
+ status: number | null;
2322
+ command: "cancel";
2323
+ }>;
2324
+ type IntegrityCommandFailure = z.infer<typeof IntegrityCommandFailureSchema>;
2325
+ declare const integrityCommandFailureCodeOf: <Command extends IntegrityCommand>(command: Command, status: number, errorCode: number | null) => IntegrityCommandFailureCodeFor<Command>;
2326
+ declare const IntegrityCommandReplySchema: z.ZodDiscriminatedUnion<"ok", [
2327
+ z.ZodObject<{
2328
+ ok: z.ZodLiteral<true>;
2329
+ runUid: z.ZodEffects<z.ZodString, string, string>;
2330
+ }, "strict", z.ZodTypeAny, {
2331
+ runUid: string;
2332
+ ok: true;
2333
+ }, {
2334
+ runUid: string;
2335
+ ok: true;
2336
+ }>,
2337
+ z.ZodObject<{
2338
+ ok: z.ZodLiteral<false>;
2339
+ status: z.ZodNumber;
2340
+ errorCode: z.ZodNullable<z.ZodNumber>;
2341
+ }, "strict", z.ZodTypeAny, {
2342
+ status: number;
2343
+ errorCode: number | null;
2344
+ ok: false;
2345
+ }, {
2346
+ status: number;
2347
+ errorCode: number | null;
2348
+ ok: false;
2349
+ }>
2350
+ ]>;
2351
+ type IntegrityCommandReply = z.infer<typeof IntegrityCommandReplySchema>;
2352
+ declare const DocumentKindSchema: z.ZodEnum<[
2353
+ "email",
2354
+ "pdf",
2355
+ "office",
2356
+ "image",
2357
+ "media",
2358
+ "text",
2359
+ "google_native",
2360
+ "other"
2361
+ ]>;
2362
+ declare const PipelineStepKeySchema: z.ZodEnum<[
2363
+ "delete_child_assets",
2364
+ "extract_text",
2365
+ "analyze_media",
2366
+ "extract_assets",
2367
+ "ocr_children",
2368
+ "ocr_document",
2369
+ "resolve_body",
2370
+ "enrich_document",
2371
+ "project_to_indexes"
2372
+ ]>;
2373
+ declare const PipelineRunStatusSchema: z.ZodEnum<[
2374
+ "RUNNING",
2375
+ "SUCCEEDED",
2376
+ "FAILED"
2377
+ ]>;
2378
+ type PipelineRunStatus = z.infer<typeof PipelineRunStatusSchema>;
2379
+ declare const PipelineStepStatusSchema: z.ZodEnum<[
2380
+ "RUNNING",
2381
+ "SUCCEEDED",
2382
+ "SKIPPED",
2383
+ "FAILED"
2384
+ ]>;
2385
+ type PipelineStepStatus = z.infer<typeof PipelineStepStatusSchema>;
2386
+ declare const PipelineTriggerSchema: z.ZodEnum<[
2387
+ "ingest",
2388
+ "retry",
2389
+ "resync"
2390
+ ]>;
2391
+ type PipelineTrigger = z.infer<typeof PipelineTriggerSchema>;
2392
+ declare const BodySourceSchema: z.ZodEnum<[
2393
+ "text_layer",
2394
+ "ocr",
2395
+ "transcript"
2396
+ ]>;
2397
+ type BodySource = z.infer<typeof BodySourceSchema>;
2398
+ declare const StageProvenanceSchema: z.ZodObject<{
2399
+ provider: z.ZodNullable<z.ZodString>;
2400
+ model: z.ZodNullable<z.ZodString>;
2401
+ engine: z.ZodNullable<z.ZodString>;
2402
+ prompt_key: z.ZodNullable<z.ZodString>;
2403
+ prompt_version: z.ZodNullable<z.ZodNumber>;
2404
+ duration_ms: z.ZodNullable<z.ZodNumber>;
2405
+ input_chars: z.ZodNullable<z.ZodNumber>;
2406
+ output_chars: z.ZodNullable<z.ZodNumber>;
2407
+ pages_read: z.ZodNullable<z.ZodNumber>;
2408
+ pages_total: z.ZodNullable<z.ZodNumber>;
2409
+ chunk_count: z.ZodNullable<z.ZodNumber>;
2410
+ points_upserted: z.ZodNullable<z.ZodNumber>;
2411
+ collection: z.ZodNullable<z.ZodString>;
2412
+ embedding_model: z.ZodNullable<z.ZodString>;
2413
+ strategy_id: z.ZodNullable<z.ZodNumber>;
2414
+ graph_nodes: z.ZodNullable<z.ZodNumber>;
2415
+ body_source: z.ZodNullable<z.ZodEnum<[
2416
+ "text_layer",
2417
+ "ocr",
2418
+ "transcript"
2419
+ ]>>;
2420
+ detail: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2421
+ }, "strict", z.ZodTypeAny, {
2422
+ strategy_id: number | null;
2423
+ provider: string | null;
2424
+ model: string | null;
2425
+ engine: string | null;
2426
+ prompt_key: string | null;
2427
+ prompt_version: number | null;
2428
+ duration_ms: number | null;
2429
+ input_chars: number | null;
2430
+ output_chars: number | null;
2431
+ pages_read: number | null;
2432
+ pages_total: number | null;
2433
+ chunk_count: number | null;
2434
+ points_upserted: number | null;
2435
+ collection: string | null;
2436
+ embedding_model: string | null;
2437
+ graph_nodes: number | null;
2438
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2439
+ detail: Record<string, unknown>;
2440
+ }, {
2441
+ strategy_id: number | null;
2442
+ provider: string | null;
2443
+ model: string | null;
2444
+ engine: string | null;
2445
+ prompt_key: string | null;
2446
+ prompt_version: number | null;
2447
+ duration_ms: number | null;
2448
+ input_chars: number | null;
2449
+ output_chars: number | null;
2450
+ pages_read: number | null;
2451
+ pages_total: number | null;
2452
+ chunk_count: number | null;
2453
+ points_upserted: number | null;
2454
+ collection: string | null;
2455
+ embedding_model: string | null;
2456
+ graph_nodes: number | null;
2457
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2458
+ detail: Record<string, unknown>;
2459
+ }>;
2460
+ type StageProvenance = z.infer<typeof StageProvenanceSchema>;
2461
+ declare const NOTHING_TO_READ_TOKENS: readonly [
2462
+ "no_pages",
2463
+ "no_pages_rendered"
2464
+ ];
2465
+ declare const NothingToReadTokenSchema: z.ZodEnum<[
2466
+ "no_pages",
2467
+ "no_pages_rendered"
2468
+ ]>;
2469
+ type NothingToReadToken = z.infer<typeof NothingToReadTokenSchema>;
2470
+ type SkipReason = {
2471
+ readonly kind: "gate_closed";
2472
+ readonly featureFlagKey: string;
2473
+ } | {
2474
+ readonly kind: "no_children";
2475
+ } | {
2476
+ readonly kind: "source_skipped";
2477
+ readonly stepKey: PipelineStepKey;
2478
+ } | {
2479
+ readonly kind: "nothing_to_read";
2480
+ readonly token: NothingToReadToken;
2481
+ };
2482
+ declare function parseSkipReason(text: string): SkipReason | null;
2483
+ declare function formatSkipReason(reason: SkipReason): string;
2484
+ declare const PipelineStepRecordSchema: z.ZodEffects<z.ZodObject<{
2485
+ id: z.ZodNumber;
2486
+ runId: z.ZodNumber;
2487
+ sequence: z.ZodNumber;
2488
+ stepKey: z.ZodEnum<[
2489
+ "delete_child_assets",
2490
+ "extract_text",
2491
+ "analyze_media",
2492
+ "extract_assets",
2493
+ "ocr_children",
2494
+ "ocr_document",
2495
+ "resolve_body",
2496
+ "enrich_document",
2497
+ "project_to_indexes"
2498
+ ]>;
2499
+ targetMetadataId: z.ZodNumber;
2500
+ status: z.ZodEnum<[
2501
+ "RUNNING",
2502
+ "SUCCEEDED",
2503
+ "SKIPPED",
2504
+ "FAILED"
2505
+ ]>;
2506
+ skipReason: z.ZodNullable<z.ZodString>;
2507
+ provenance: z.ZodNullable<z.ZodObject<{
2508
+ provider: z.ZodNullable<z.ZodString>;
2509
+ model: z.ZodNullable<z.ZodString>;
2510
+ engine: z.ZodNullable<z.ZodString>;
2511
+ prompt_key: z.ZodNullable<z.ZodString>;
2512
+ prompt_version: z.ZodNullable<z.ZodNumber>;
2513
+ duration_ms: z.ZodNullable<z.ZodNumber>;
2514
+ input_chars: z.ZodNullable<z.ZodNumber>;
2515
+ output_chars: z.ZodNullable<z.ZodNumber>;
2516
+ pages_read: z.ZodNullable<z.ZodNumber>;
2517
+ pages_total: z.ZodNullable<z.ZodNumber>;
2518
+ chunk_count: z.ZodNullable<z.ZodNumber>;
2519
+ points_upserted: z.ZodNullable<z.ZodNumber>;
2520
+ collection: z.ZodNullable<z.ZodString>;
2521
+ embedding_model: z.ZodNullable<z.ZodString>;
2522
+ strategy_id: z.ZodNullable<z.ZodNumber>;
2523
+ graph_nodes: z.ZodNullable<z.ZodNumber>;
2524
+ body_source: z.ZodNullable<z.ZodEnum<[
2525
+ "text_layer",
2526
+ "ocr",
2527
+ "transcript"
2528
+ ]>>;
2529
+ detail: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2530
+ }, "strict", z.ZodTypeAny, {
2531
+ strategy_id: number | null;
2532
+ provider: string | null;
2533
+ model: string | null;
2534
+ engine: string | null;
2535
+ prompt_key: string | null;
2536
+ prompt_version: number | null;
2537
+ duration_ms: number | null;
2538
+ input_chars: number | null;
2539
+ output_chars: number | null;
2540
+ pages_read: number | null;
2541
+ pages_total: number | null;
2542
+ chunk_count: number | null;
2543
+ points_upserted: number | null;
2544
+ collection: string | null;
2545
+ embedding_model: string | null;
2546
+ graph_nodes: number | null;
2547
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2548
+ detail: Record<string, unknown>;
2549
+ }, {
2550
+ strategy_id: number | null;
2551
+ provider: string | null;
2552
+ model: string | null;
2553
+ engine: string | null;
2554
+ prompt_key: string | null;
2555
+ prompt_version: number | null;
2556
+ duration_ms: number | null;
2557
+ input_chars: number | null;
2558
+ output_chars: number | null;
2559
+ pages_read: number | null;
2560
+ pages_total: number | null;
2561
+ chunk_count: number | null;
2562
+ points_upserted: number | null;
2563
+ collection: string | null;
2564
+ embedding_model: string | null;
2565
+ graph_nodes: number | null;
2566
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2567
+ detail: Record<string, unknown>;
2568
+ }>>;
2569
+ strategyId: z.ZodNullable<z.ZodNumber>;
2570
+ httpStatus: z.ZodNullable<z.ZodNumber>;
2571
+ errorCode: z.ZodNullable<z.ZodString>;
2572
+ errorMessage: z.ZodNullable<z.ZodString>;
2573
+ startedAt: z.ZodString;
2574
+ finishedAt: z.ZodNullable<z.ZodString>;
2575
+ durationMs: z.ZodNullable<z.ZodNumber>;
2576
+ }, "strict", z.ZodTypeAny, {
2577
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2578
+ startedAt: string;
2579
+ finishedAt: string | null;
2580
+ sequence: number;
2581
+ errorCode: string | null;
2582
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2583
+ id: number;
2584
+ runId: number;
2585
+ targetMetadataId: number;
2586
+ skipReason: string | null;
2587
+ provenance: {
2588
+ strategy_id: number | null;
2589
+ provider: string | null;
2590
+ model: string | null;
2591
+ engine: string | null;
2592
+ prompt_key: string | null;
2593
+ prompt_version: number | null;
2594
+ duration_ms: number | null;
2595
+ input_chars: number | null;
2596
+ output_chars: number | null;
2597
+ pages_read: number | null;
2598
+ pages_total: number | null;
2599
+ chunk_count: number | null;
2600
+ points_upserted: number | null;
2601
+ collection: string | null;
2602
+ embedding_model: string | null;
2603
+ graph_nodes: number | null;
2604
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2605
+ detail: Record<string, unknown>;
2606
+ } | null;
2607
+ strategyId: number | null;
2608
+ httpStatus: number | null;
2609
+ errorMessage: string | null;
2610
+ durationMs: number | null;
2611
+ }, {
2612
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2613
+ startedAt: string;
2614
+ finishedAt: string | null;
2615
+ sequence: number;
2616
+ errorCode: string | null;
2617
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2618
+ id: number;
2619
+ runId: number;
2620
+ targetMetadataId: number;
2621
+ skipReason: string | null;
2622
+ provenance: {
2623
+ strategy_id: number | null;
2624
+ provider: string | null;
2625
+ model: string | null;
2626
+ engine: string | null;
2627
+ prompt_key: string | null;
2628
+ prompt_version: number | null;
2629
+ duration_ms: number | null;
2630
+ input_chars: number | null;
2631
+ output_chars: number | null;
2632
+ pages_read: number | null;
2633
+ pages_total: number | null;
2634
+ chunk_count: number | null;
2635
+ points_upserted: number | null;
2636
+ collection: string | null;
2637
+ embedding_model: string | null;
2638
+ graph_nodes: number | null;
2639
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2640
+ detail: Record<string, unknown>;
2641
+ } | null;
2642
+ strategyId: number | null;
2643
+ httpStatus: number | null;
2644
+ errorMessage: string | null;
2645
+ durationMs: number | null;
2646
+ }>, {
2647
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2648
+ startedAt: string;
2649
+ finishedAt: string | null;
2650
+ sequence: number;
2651
+ errorCode: string | null;
2652
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2653
+ id: number;
2654
+ runId: number;
2655
+ targetMetadataId: number;
2656
+ skipReason: string | null;
2657
+ provenance: {
2658
+ strategy_id: number | null;
2659
+ provider: string | null;
2660
+ model: string | null;
2661
+ engine: string | null;
2662
+ prompt_key: string | null;
2663
+ prompt_version: number | null;
2664
+ duration_ms: number | null;
2665
+ input_chars: number | null;
2666
+ output_chars: number | null;
2667
+ pages_read: number | null;
2668
+ pages_total: number | null;
2669
+ chunk_count: number | null;
2670
+ points_upserted: number | null;
2671
+ collection: string | null;
2672
+ embedding_model: string | null;
2673
+ graph_nodes: number | null;
2674
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2675
+ detail: Record<string, unknown>;
2676
+ } | null;
2677
+ strategyId: number | null;
2678
+ httpStatus: number | null;
2679
+ errorMessage: string | null;
2680
+ durationMs: number | null;
2681
+ }, {
2682
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2683
+ startedAt: string;
2684
+ finishedAt: string | null;
2685
+ sequence: number;
2686
+ errorCode: string | null;
2687
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2688
+ id: number;
2689
+ runId: number;
2690
+ targetMetadataId: number;
2691
+ skipReason: string | null;
2692
+ provenance: {
2693
+ strategy_id: number | null;
2694
+ provider: string | null;
2695
+ model: string | null;
2696
+ engine: string | null;
2697
+ prompt_key: string | null;
2698
+ prompt_version: number | null;
2699
+ duration_ms: number | null;
2700
+ input_chars: number | null;
2701
+ output_chars: number | null;
2702
+ pages_read: number | null;
2703
+ pages_total: number | null;
2704
+ chunk_count: number | null;
2705
+ points_upserted: number | null;
2706
+ collection: string | null;
2707
+ embedding_model: string | null;
2708
+ graph_nodes: number | null;
2709
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2710
+ detail: Record<string, unknown>;
2711
+ } | null;
2712
+ strategyId: number | null;
2713
+ httpStatus: number | null;
2714
+ errorMessage: string | null;
2715
+ durationMs: number | null;
2716
+ }>;
2717
+ type PipelineStepRecord = z.infer<typeof PipelineStepRecordSchema>;
2718
+ declare const PipelineRunRecordSchema: z.ZodEffects<z.ZodObject<{
2719
+ id: z.ZodNumber;
2720
+ tenantId: z.ZodString;
2721
+ metadataId: z.ZodNumber;
2722
+ revision: z.ZodNumber;
2723
+ runUid: z.ZodString;
2724
+ jobId: z.ZodString;
2725
+ attempt: z.ZodNumber;
2726
+ trigger: z.ZodEnum<[
2727
+ "ingest",
2728
+ "retry",
2729
+ "resync"
2730
+ ]>;
2731
+ documentKind: z.ZodEnum<[
2732
+ "email",
2733
+ "pdf",
2734
+ "office",
2735
+ "image",
2736
+ "media",
2737
+ "text",
2738
+ "google_native",
2739
+ "other"
2740
+ ]>;
2741
+ flowKey: z.ZodString;
2742
+ status: z.ZodEnum<[
2743
+ "RUNNING",
2744
+ "SUCCEEDED",
2745
+ "FAILED"
2746
+ ]>;
2747
+ retryScheduled: z.ZodBoolean;
2748
+ failedStepKey: z.ZodNullable<z.ZodEnum<[
2749
+ "delete_child_assets",
2750
+ "extract_text",
2751
+ "analyze_media",
2752
+ "extract_assets",
2753
+ "ocr_children",
2754
+ "ocr_document",
2755
+ "resolve_body",
2756
+ "enrich_document",
2757
+ "project_to_indexes"
2758
+ ]>>;
2759
+ errorMessage: z.ZodNullable<z.ZodString>;
2760
+ requestedBy: z.ZodString;
2761
+ startedAt: z.ZodString;
2762
+ finishedAt: z.ZodNullable<z.ZodString>;
2763
+ steps: z.ZodArray<z.ZodEffects<z.ZodObject<{
2764
+ id: z.ZodNumber;
2765
+ runId: z.ZodNumber;
2766
+ sequence: z.ZodNumber;
2767
+ stepKey: z.ZodEnum<[
2768
+ "delete_child_assets",
2769
+ "extract_text",
2770
+ "analyze_media",
2771
+ "extract_assets",
2772
+ "ocr_children",
2773
+ "ocr_document",
2774
+ "resolve_body",
2775
+ "enrich_document",
2776
+ "project_to_indexes"
2777
+ ]>;
2778
+ targetMetadataId: z.ZodNumber;
2779
+ status: z.ZodEnum<[
2780
+ "RUNNING",
2781
+ "SUCCEEDED",
2782
+ "SKIPPED",
2783
+ "FAILED"
2784
+ ]>;
2785
+ skipReason: z.ZodNullable<z.ZodString>;
2786
+ provenance: z.ZodNullable<z.ZodObject<{
2787
+ provider: z.ZodNullable<z.ZodString>;
2788
+ model: z.ZodNullable<z.ZodString>;
2789
+ engine: z.ZodNullable<z.ZodString>;
2790
+ prompt_key: z.ZodNullable<z.ZodString>;
2791
+ prompt_version: z.ZodNullable<z.ZodNumber>;
2792
+ duration_ms: z.ZodNullable<z.ZodNumber>;
2793
+ input_chars: z.ZodNullable<z.ZodNumber>;
2794
+ output_chars: z.ZodNullable<z.ZodNumber>;
2795
+ pages_read: z.ZodNullable<z.ZodNumber>;
2796
+ pages_total: z.ZodNullable<z.ZodNumber>;
2797
+ chunk_count: z.ZodNullable<z.ZodNumber>;
2798
+ points_upserted: z.ZodNullable<z.ZodNumber>;
2799
+ collection: z.ZodNullable<z.ZodString>;
2800
+ embedding_model: z.ZodNullable<z.ZodString>;
2801
+ strategy_id: z.ZodNullable<z.ZodNumber>;
2802
+ graph_nodes: z.ZodNullable<z.ZodNumber>;
2803
+ body_source: z.ZodNullable<z.ZodEnum<[
2804
+ "text_layer",
2805
+ "ocr",
2806
+ "transcript"
2807
+ ]>>;
2808
+ detail: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2809
+ }, "strict", z.ZodTypeAny, {
2810
+ strategy_id: number | null;
2811
+ provider: string | null;
2812
+ model: string | null;
2813
+ engine: string | null;
2814
+ prompt_key: string | null;
2815
+ prompt_version: number | null;
2816
+ duration_ms: number | null;
2817
+ input_chars: number | null;
2818
+ output_chars: number | null;
2819
+ pages_read: number | null;
2820
+ pages_total: number | null;
2821
+ chunk_count: number | null;
2822
+ points_upserted: number | null;
2823
+ collection: string | null;
2824
+ embedding_model: string | null;
2825
+ graph_nodes: number | null;
2826
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2827
+ detail: Record<string, unknown>;
2828
+ }, {
2829
+ strategy_id: number | null;
2830
+ provider: string | null;
2831
+ model: string | null;
2832
+ engine: string | null;
2833
+ prompt_key: string | null;
2834
+ prompt_version: number | null;
2835
+ duration_ms: number | null;
2836
+ input_chars: number | null;
2837
+ output_chars: number | null;
2838
+ pages_read: number | null;
2839
+ pages_total: number | null;
2840
+ chunk_count: number | null;
2841
+ points_upserted: number | null;
2842
+ collection: string | null;
2843
+ embedding_model: string | null;
2844
+ graph_nodes: number | null;
2845
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2846
+ detail: Record<string, unknown>;
2847
+ }>>;
2848
+ strategyId: z.ZodNullable<z.ZodNumber>;
2849
+ httpStatus: z.ZodNullable<z.ZodNumber>;
2850
+ errorCode: z.ZodNullable<z.ZodString>;
2851
+ errorMessage: z.ZodNullable<z.ZodString>;
2852
+ startedAt: z.ZodString;
2853
+ finishedAt: z.ZodNullable<z.ZodString>;
2854
+ durationMs: z.ZodNullable<z.ZodNumber>;
2855
+ }, "strict", z.ZodTypeAny, {
2856
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2857
+ startedAt: string;
2858
+ finishedAt: string | null;
2859
+ sequence: number;
2860
+ errorCode: string | null;
2861
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2862
+ id: number;
2863
+ runId: number;
2864
+ targetMetadataId: number;
2865
+ skipReason: string | null;
2866
+ provenance: {
2867
+ strategy_id: number | null;
2868
+ provider: string | null;
2869
+ model: string | null;
2870
+ engine: string | null;
2871
+ prompt_key: string | null;
2872
+ prompt_version: number | null;
2873
+ duration_ms: number | null;
2874
+ input_chars: number | null;
2875
+ output_chars: number | null;
2876
+ pages_read: number | null;
2877
+ pages_total: number | null;
2878
+ chunk_count: number | null;
2879
+ points_upserted: number | null;
2880
+ collection: string | null;
2881
+ embedding_model: string | null;
2882
+ graph_nodes: number | null;
2883
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2884
+ detail: Record<string, unknown>;
2885
+ } | null;
2886
+ strategyId: number | null;
2887
+ httpStatus: number | null;
2888
+ errorMessage: string | null;
2889
+ durationMs: number | null;
2890
+ }, {
2891
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2892
+ startedAt: string;
2893
+ finishedAt: string | null;
2894
+ sequence: number;
2895
+ errorCode: string | null;
2896
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2897
+ id: number;
2898
+ runId: number;
2899
+ targetMetadataId: number;
2900
+ skipReason: string | null;
2901
+ provenance: {
2902
+ strategy_id: number | null;
2903
+ provider: string | null;
2904
+ model: string | null;
2905
+ engine: string | null;
2906
+ prompt_key: string | null;
2907
+ prompt_version: number | null;
2908
+ duration_ms: number | null;
2909
+ input_chars: number | null;
2910
+ output_chars: number | null;
2911
+ pages_read: number | null;
2912
+ pages_total: number | null;
2913
+ chunk_count: number | null;
2914
+ points_upserted: number | null;
2915
+ collection: string | null;
2916
+ embedding_model: string | null;
2917
+ graph_nodes: number | null;
2918
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2919
+ detail: Record<string, unknown>;
2920
+ } | null;
2921
+ strategyId: number | null;
2922
+ httpStatus: number | null;
2923
+ errorMessage: string | null;
2924
+ durationMs: number | null;
2925
+ }>, {
2926
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2927
+ startedAt: string;
2928
+ finishedAt: string | null;
2929
+ sequence: number;
2930
+ errorCode: string | null;
2931
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2932
+ id: number;
2933
+ runId: number;
2934
+ targetMetadataId: number;
2935
+ skipReason: string | null;
2936
+ provenance: {
2937
+ strategy_id: number | null;
2938
+ provider: string | null;
2939
+ model: string | null;
2940
+ engine: string | null;
2941
+ prompt_key: string | null;
2942
+ prompt_version: number | null;
2943
+ duration_ms: number | null;
2944
+ input_chars: number | null;
2945
+ output_chars: number | null;
2946
+ pages_read: number | null;
2947
+ pages_total: number | null;
2948
+ chunk_count: number | null;
2949
+ points_upserted: number | null;
2950
+ collection: string | null;
2951
+ embedding_model: string | null;
2952
+ graph_nodes: number | null;
2953
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2954
+ detail: Record<string, unknown>;
2955
+ } | null;
2956
+ strategyId: number | null;
2957
+ httpStatus: number | null;
2958
+ errorMessage: string | null;
2959
+ durationMs: number | null;
2960
+ }, {
2961
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
2962
+ startedAt: string;
2963
+ finishedAt: string | null;
2964
+ sequence: number;
2965
+ errorCode: string | null;
2966
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
2967
+ id: number;
2968
+ runId: number;
2969
+ targetMetadataId: number;
2970
+ skipReason: string | null;
2971
+ provenance: {
2972
+ strategy_id: number | null;
2973
+ provider: string | null;
2974
+ model: string | null;
2975
+ engine: string | null;
2976
+ prompt_key: string | null;
2977
+ prompt_version: number | null;
2978
+ duration_ms: number | null;
2979
+ input_chars: number | null;
2980
+ output_chars: number | null;
2981
+ pages_read: number | null;
2982
+ pages_total: number | null;
2983
+ chunk_count: number | null;
2984
+ points_upserted: number | null;
2985
+ collection: string | null;
2986
+ embedding_model: string | null;
2987
+ graph_nodes: number | null;
2988
+ body_source: "ocr" | "text_layer" | "transcript" | null;
2989
+ detail: Record<string, unknown>;
2990
+ } | null;
2991
+ strategyId: number | null;
2992
+ httpStatus: number | null;
2993
+ errorMessage: string | null;
2994
+ durationMs: number | null;
2995
+ }>, "many">;
2996
+ }, "strict", z.ZodTypeAny, {
2997
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
2998
+ runUid: string;
2999
+ requestedBy: string;
3000
+ startedAt: string;
3001
+ finishedAt: string | null;
3002
+ metadataId: number;
3003
+ revision: number;
3004
+ id: number;
3005
+ errorMessage: string | null;
3006
+ tenantId: string;
3007
+ jobId: string;
3008
+ attempt: number;
3009
+ trigger: "ingest" | "retry" | "resync";
3010
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3011
+ flowKey: string;
3012
+ retryScheduled: boolean;
3013
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3014
+ steps: {
3015
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3016
+ startedAt: string;
3017
+ finishedAt: string | null;
3018
+ sequence: number;
3019
+ errorCode: string | null;
3020
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3021
+ id: number;
3022
+ runId: number;
3023
+ targetMetadataId: number;
3024
+ skipReason: string | null;
3025
+ provenance: {
3026
+ strategy_id: number | null;
3027
+ provider: string | null;
3028
+ model: string | null;
3029
+ engine: string | null;
3030
+ prompt_key: string | null;
3031
+ prompt_version: number | null;
3032
+ duration_ms: number | null;
3033
+ input_chars: number | null;
3034
+ output_chars: number | null;
3035
+ pages_read: number | null;
3036
+ pages_total: number | null;
3037
+ chunk_count: number | null;
3038
+ points_upserted: number | null;
3039
+ collection: string | null;
3040
+ embedding_model: string | null;
3041
+ graph_nodes: number | null;
3042
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3043
+ detail: Record<string, unknown>;
3044
+ } | null;
3045
+ strategyId: number | null;
3046
+ httpStatus: number | null;
3047
+ errorMessage: string | null;
3048
+ durationMs: number | null;
3049
+ }[];
3050
+ }, {
3051
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3052
+ runUid: string;
3053
+ requestedBy: string;
3054
+ startedAt: string;
3055
+ finishedAt: string | null;
3056
+ metadataId: number;
3057
+ revision: number;
3058
+ id: number;
3059
+ errorMessage: string | null;
3060
+ tenantId: string;
3061
+ jobId: string;
3062
+ attempt: number;
3063
+ trigger: "ingest" | "retry" | "resync";
3064
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3065
+ flowKey: string;
3066
+ retryScheduled: boolean;
3067
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3068
+ steps: {
3069
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3070
+ startedAt: string;
3071
+ finishedAt: string | null;
3072
+ sequence: number;
3073
+ errorCode: string | null;
3074
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3075
+ id: number;
3076
+ runId: number;
3077
+ targetMetadataId: number;
3078
+ skipReason: string | null;
3079
+ provenance: {
3080
+ strategy_id: number | null;
3081
+ provider: string | null;
3082
+ model: string | null;
3083
+ engine: string | null;
3084
+ prompt_key: string | null;
3085
+ prompt_version: number | null;
3086
+ duration_ms: number | null;
3087
+ input_chars: number | null;
3088
+ output_chars: number | null;
3089
+ pages_read: number | null;
3090
+ pages_total: number | null;
3091
+ chunk_count: number | null;
3092
+ points_upserted: number | null;
3093
+ collection: string | null;
3094
+ embedding_model: string | null;
3095
+ graph_nodes: number | null;
3096
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3097
+ detail: Record<string, unknown>;
3098
+ } | null;
3099
+ strategyId: number | null;
3100
+ httpStatus: number | null;
3101
+ errorMessage: string | null;
3102
+ durationMs: number | null;
3103
+ }[];
3104
+ }>, {
3105
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3106
+ runUid: string;
3107
+ requestedBy: string;
3108
+ startedAt: string;
3109
+ finishedAt: string | null;
3110
+ metadataId: number;
3111
+ revision: number;
3112
+ id: number;
3113
+ errorMessage: string | null;
3114
+ tenantId: string;
3115
+ jobId: string;
3116
+ attempt: number;
3117
+ trigger: "ingest" | "retry" | "resync";
3118
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3119
+ flowKey: string;
3120
+ retryScheduled: boolean;
3121
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3122
+ steps: {
3123
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3124
+ startedAt: string;
3125
+ finishedAt: string | null;
3126
+ sequence: number;
3127
+ errorCode: string | null;
3128
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3129
+ id: number;
3130
+ runId: number;
3131
+ targetMetadataId: number;
3132
+ skipReason: string | null;
3133
+ provenance: {
3134
+ strategy_id: number | null;
3135
+ provider: string | null;
3136
+ model: string | null;
3137
+ engine: string | null;
3138
+ prompt_key: string | null;
3139
+ prompt_version: number | null;
3140
+ duration_ms: number | null;
3141
+ input_chars: number | null;
3142
+ output_chars: number | null;
3143
+ pages_read: number | null;
3144
+ pages_total: number | null;
3145
+ chunk_count: number | null;
3146
+ points_upserted: number | null;
3147
+ collection: string | null;
3148
+ embedding_model: string | null;
3149
+ graph_nodes: number | null;
3150
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3151
+ detail: Record<string, unknown>;
3152
+ } | null;
3153
+ strategyId: number | null;
3154
+ httpStatus: number | null;
3155
+ errorMessage: string | null;
3156
+ durationMs: number | null;
3157
+ }[];
3158
+ }, {
3159
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3160
+ runUid: string;
3161
+ requestedBy: string;
3162
+ startedAt: string;
3163
+ finishedAt: string | null;
3164
+ metadataId: number;
3165
+ revision: number;
3166
+ id: number;
3167
+ errorMessage: string | null;
3168
+ tenantId: string;
3169
+ jobId: string;
3170
+ attempt: number;
3171
+ trigger: "ingest" | "retry" | "resync";
3172
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3173
+ flowKey: string;
3174
+ retryScheduled: boolean;
3175
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3176
+ steps: {
3177
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3178
+ startedAt: string;
3179
+ finishedAt: string | null;
3180
+ sequence: number;
3181
+ errorCode: string | null;
3182
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3183
+ id: number;
3184
+ runId: number;
3185
+ targetMetadataId: number;
3186
+ skipReason: string | null;
3187
+ provenance: {
3188
+ strategy_id: number | null;
3189
+ provider: string | null;
3190
+ model: string | null;
3191
+ engine: string | null;
3192
+ prompt_key: string | null;
3193
+ prompt_version: number | null;
3194
+ duration_ms: number | null;
3195
+ input_chars: number | null;
3196
+ output_chars: number | null;
3197
+ pages_read: number | null;
3198
+ pages_total: number | null;
3199
+ chunk_count: number | null;
3200
+ points_upserted: number | null;
3201
+ collection: string | null;
3202
+ embedding_model: string | null;
3203
+ graph_nodes: number | null;
3204
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3205
+ detail: Record<string, unknown>;
3206
+ } | null;
3207
+ strategyId: number | null;
3208
+ httpStatus: number | null;
3209
+ errorMessage: string | null;
3210
+ durationMs: number | null;
3211
+ }[];
3212
+ }>;
3213
+ type PipelineRunRecord = z.infer<typeof PipelineRunRecordSchema>;
3214
+ declare const PipelineRunSummarySchema: z.ZodEffects<z.ZodObject<Omit<{
3215
+ id: z.ZodNumber;
3216
+ tenantId: z.ZodString;
3217
+ metadataId: z.ZodNumber;
3218
+ revision: z.ZodNumber;
3219
+ runUid: z.ZodString;
3220
+ jobId: z.ZodString;
3221
+ attempt: z.ZodNumber;
3222
+ trigger: z.ZodEnum<[
3223
+ "ingest",
3224
+ "retry",
3225
+ "resync"
3226
+ ]>;
3227
+ documentKind: z.ZodEnum<[
3228
+ "email",
3229
+ "pdf",
3230
+ "office",
3231
+ "image",
3232
+ "media",
3233
+ "text",
3234
+ "google_native",
3235
+ "other"
3236
+ ]>;
3237
+ flowKey: z.ZodString;
3238
+ status: z.ZodEnum<[
3239
+ "RUNNING",
3240
+ "SUCCEEDED",
3241
+ "FAILED"
3242
+ ]>;
3243
+ retryScheduled: z.ZodBoolean;
3244
+ failedStepKey: z.ZodNullable<z.ZodEnum<[
3245
+ "delete_child_assets",
3246
+ "extract_text",
3247
+ "analyze_media",
3248
+ "extract_assets",
3249
+ "ocr_children",
3250
+ "ocr_document",
3251
+ "resolve_body",
3252
+ "enrich_document",
3253
+ "project_to_indexes"
3254
+ ]>>;
3255
+ errorMessage: z.ZodNullable<z.ZodString>;
3256
+ requestedBy: z.ZodString;
3257
+ startedAt: z.ZodString;
3258
+ finishedAt: z.ZodNullable<z.ZodString>;
3259
+ steps: z.ZodArray<z.ZodEffects<z.ZodObject<{
3260
+ id: z.ZodNumber;
3261
+ runId: z.ZodNumber;
3262
+ sequence: z.ZodNumber;
3263
+ stepKey: z.ZodEnum<[
3264
+ "delete_child_assets",
3265
+ "extract_text",
3266
+ "analyze_media",
3267
+ "extract_assets",
3268
+ "ocr_children",
3269
+ "ocr_document",
3270
+ "resolve_body",
3271
+ "enrich_document",
3272
+ "project_to_indexes"
3273
+ ]>;
3274
+ targetMetadataId: z.ZodNumber;
3275
+ status: z.ZodEnum<[
3276
+ "RUNNING",
3277
+ "SUCCEEDED",
3278
+ "SKIPPED",
3279
+ "FAILED"
3280
+ ]>;
3281
+ skipReason: z.ZodNullable<z.ZodString>;
3282
+ provenance: z.ZodNullable<z.ZodObject<{
3283
+ provider: z.ZodNullable<z.ZodString>;
3284
+ model: z.ZodNullable<z.ZodString>;
3285
+ engine: z.ZodNullable<z.ZodString>;
3286
+ prompt_key: z.ZodNullable<z.ZodString>;
3287
+ prompt_version: z.ZodNullable<z.ZodNumber>;
3288
+ duration_ms: z.ZodNullable<z.ZodNumber>;
3289
+ input_chars: z.ZodNullable<z.ZodNumber>;
3290
+ output_chars: z.ZodNullable<z.ZodNumber>;
3291
+ pages_read: z.ZodNullable<z.ZodNumber>;
3292
+ pages_total: z.ZodNullable<z.ZodNumber>;
3293
+ chunk_count: z.ZodNullable<z.ZodNumber>;
3294
+ points_upserted: z.ZodNullable<z.ZodNumber>;
3295
+ collection: z.ZodNullable<z.ZodString>;
3296
+ embedding_model: z.ZodNullable<z.ZodString>;
3297
+ strategy_id: z.ZodNullable<z.ZodNumber>;
3298
+ graph_nodes: z.ZodNullable<z.ZodNumber>;
3299
+ body_source: z.ZodNullable<z.ZodEnum<[
3300
+ "text_layer",
3301
+ "ocr",
3302
+ "transcript"
3303
+ ]>>;
3304
+ detail: z.ZodRecord<z.ZodString, z.ZodUnknown>;
3305
+ }, "strict", z.ZodTypeAny, {
3306
+ strategy_id: number | null;
3307
+ provider: string | null;
3308
+ model: string | null;
3309
+ engine: string | null;
3310
+ prompt_key: string | null;
3311
+ prompt_version: number | null;
3312
+ duration_ms: number | null;
3313
+ input_chars: number | null;
3314
+ output_chars: number | null;
3315
+ pages_read: number | null;
3316
+ pages_total: number | null;
3317
+ chunk_count: number | null;
3318
+ points_upserted: number | null;
3319
+ collection: string | null;
3320
+ embedding_model: string | null;
3321
+ graph_nodes: number | null;
3322
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3323
+ detail: Record<string, unknown>;
3324
+ }, {
3325
+ strategy_id: number | null;
3326
+ provider: string | null;
3327
+ model: string | null;
3328
+ engine: string | null;
3329
+ prompt_key: string | null;
3330
+ prompt_version: number | null;
3331
+ duration_ms: number | null;
3332
+ input_chars: number | null;
3333
+ output_chars: number | null;
3334
+ pages_read: number | null;
3335
+ pages_total: number | null;
3336
+ chunk_count: number | null;
3337
+ points_upserted: number | null;
3338
+ collection: string | null;
3339
+ embedding_model: string | null;
3340
+ graph_nodes: number | null;
3341
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3342
+ detail: Record<string, unknown>;
3343
+ }>>;
3344
+ strategyId: z.ZodNullable<z.ZodNumber>;
3345
+ httpStatus: z.ZodNullable<z.ZodNumber>;
3346
+ errorCode: z.ZodNullable<z.ZodString>;
3347
+ errorMessage: z.ZodNullable<z.ZodString>;
3348
+ startedAt: z.ZodString;
3349
+ finishedAt: z.ZodNullable<z.ZodString>;
3350
+ durationMs: z.ZodNullable<z.ZodNumber>;
3351
+ }, "strict", z.ZodTypeAny, {
3352
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3353
+ startedAt: string;
3354
+ finishedAt: string | null;
3355
+ sequence: number;
3356
+ errorCode: string | null;
3357
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3358
+ id: number;
3359
+ runId: number;
3360
+ targetMetadataId: number;
3361
+ skipReason: string | null;
3362
+ provenance: {
3363
+ strategy_id: number | null;
3364
+ provider: string | null;
3365
+ model: string | null;
3366
+ engine: string | null;
3367
+ prompt_key: string | null;
3368
+ prompt_version: number | null;
3369
+ duration_ms: number | null;
3370
+ input_chars: number | null;
3371
+ output_chars: number | null;
3372
+ pages_read: number | null;
3373
+ pages_total: number | null;
3374
+ chunk_count: number | null;
3375
+ points_upserted: number | null;
3376
+ collection: string | null;
3377
+ embedding_model: string | null;
3378
+ graph_nodes: number | null;
3379
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3380
+ detail: Record<string, unknown>;
3381
+ } | null;
3382
+ strategyId: number | null;
3383
+ httpStatus: number | null;
3384
+ errorMessage: string | null;
3385
+ durationMs: number | null;
3386
+ }, {
3387
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3388
+ startedAt: string;
3389
+ finishedAt: string | null;
3390
+ sequence: number;
3391
+ errorCode: string | null;
3392
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3393
+ id: number;
3394
+ runId: number;
3395
+ targetMetadataId: number;
3396
+ skipReason: string | null;
3397
+ provenance: {
3398
+ strategy_id: number | null;
3399
+ provider: string | null;
3400
+ model: string | null;
3401
+ engine: string | null;
3402
+ prompt_key: string | null;
3403
+ prompt_version: number | null;
3404
+ duration_ms: number | null;
3405
+ input_chars: number | null;
3406
+ output_chars: number | null;
3407
+ pages_read: number | null;
3408
+ pages_total: number | null;
3409
+ chunk_count: number | null;
3410
+ points_upserted: number | null;
3411
+ collection: string | null;
3412
+ embedding_model: string | null;
3413
+ graph_nodes: number | null;
3414
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3415
+ detail: Record<string, unknown>;
3416
+ } | null;
3417
+ strategyId: number | null;
3418
+ httpStatus: number | null;
3419
+ errorMessage: string | null;
3420
+ durationMs: number | null;
3421
+ }>, {
3422
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3423
+ startedAt: string;
3424
+ finishedAt: string | null;
3425
+ sequence: number;
3426
+ errorCode: string | null;
3427
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3428
+ id: number;
3429
+ runId: number;
3430
+ targetMetadataId: number;
3431
+ skipReason: string | null;
3432
+ provenance: {
3433
+ strategy_id: number | null;
3434
+ provider: string | null;
3435
+ model: string | null;
3436
+ engine: string | null;
3437
+ prompt_key: string | null;
3438
+ prompt_version: number | null;
3439
+ duration_ms: number | null;
3440
+ input_chars: number | null;
3441
+ output_chars: number | null;
3442
+ pages_read: number | null;
3443
+ pages_total: number | null;
3444
+ chunk_count: number | null;
3445
+ points_upserted: number | null;
3446
+ collection: string | null;
3447
+ embedding_model: string | null;
3448
+ graph_nodes: number | null;
3449
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3450
+ detail: Record<string, unknown>;
3451
+ } | null;
3452
+ strategyId: number | null;
3453
+ httpStatus: number | null;
3454
+ errorMessage: string | null;
3455
+ durationMs: number | null;
3456
+ }, {
3457
+ status: "RUNNING" | "FAILED" | "SKIPPED" | "SUCCEEDED";
3458
+ startedAt: string;
3459
+ finishedAt: string | null;
3460
+ sequence: number;
3461
+ errorCode: string | null;
3462
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3463
+ id: number;
3464
+ runId: number;
3465
+ targetMetadataId: number;
3466
+ skipReason: string | null;
3467
+ provenance: {
3468
+ strategy_id: number | null;
3469
+ provider: string | null;
3470
+ model: string | null;
3471
+ engine: string | null;
3472
+ prompt_key: string | null;
3473
+ prompt_version: number | null;
3474
+ duration_ms: number | null;
3475
+ input_chars: number | null;
3476
+ output_chars: number | null;
3477
+ pages_read: number | null;
3478
+ pages_total: number | null;
3479
+ chunk_count: number | null;
3480
+ points_upserted: number | null;
3481
+ collection: string | null;
3482
+ embedding_model: string | null;
3483
+ graph_nodes: number | null;
3484
+ body_source: "ocr" | "text_layer" | "transcript" | null;
3485
+ detail: Record<string, unknown>;
3486
+ } | null;
3487
+ strategyId: number | null;
3488
+ httpStatus: number | null;
3489
+ errorMessage: string | null;
3490
+ durationMs: number | null;
3491
+ }>, "many">;
3492
+ }, "steps">, "strict", z.ZodTypeAny, {
3493
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3494
+ runUid: string;
3495
+ requestedBy: string;
3496
+ startedAt: string;
3497
+ finishedAt: string | null;
3498
+ metadataId: number;
3499
+ revision: number;
3500
+ id: number;
3501
+ errorMessage: string | null;
3502
+ tenantId: string;
3503
+ jobId: string;
3504
+ attempt: number;
3505
+ trigger: "ingest" | "retry" | "resync";
3506
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3507
+ flowKey: string;
3508
+ retryScheduled: boolean;
3509
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3510
+ }, {
3511
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3512
+ runUid: string;
3513
+ requestedBy: string;
3514
+ startedAt: string;
3515
+ finishedAt: string | null;
3516
+ metadataId: number;
3517
+ revision: number;
3518
+ id: number;
3519
+ errorMessage: string | null;
3520
+ tenantId: string;
3521
+ jobId: string;
3522
+ attempt: number;
3523
+ trigger: "ingest" | "retry" | "resync";
3524
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3525
+ flowKey: string;
3526
+ retryScheduled: boolean;
3527
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3528
+ }>, {
3529
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3530
+ runUid: string;
3531
+ requestedBy: string;
3532
+ startedAt: string;
3533
+ finishedAt: string | null;
3534
+ metadataId: number;
3535
+ revision: number;
3536
+ id: number;
3537
+ errorMessage: string | null;
3538
+ tenantId: string;
3539
+ jobId: string;
3540
+ attempt: number;
3541
+ trigger: "ingest" | "retry" | "resync";
3542
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3543
+ flowKey: string;
3544
+ retryScheduled: boolean;
3545
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3546
+ }, {
3547
+ status: "RUNNING" | "FAILED" | "SUCCEEDED";
3548
+ runUid: string;
3549
+ requestedBy: string;
3550
+ startedAt: string;
3551
+ finishedAt: string | null;
3552
+ metadataId: number;
3553
+ revision: number;
3554
+ id: number;
3555
+ errorMessage: string | null;
3556
+ tenantId: string;
3557
+ jobId: string;
3558
+ attempt: number;
3559
+ trigger: "ingest" | "retry" | "resync";
3560
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3561
+ flowKey: string;
3562
+ retryScheduled: boolean;
3563
+ failedStepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes" | null;
3564
+ }>;
3565
+ type PipelineRunSummary = z.infer<typeof PipelineRunSummarySchema>;
3566
+ declare const PipelineStepMetricSchema: z.ZodEffects<z.ZodObject<{
3567
+ documentKind: z.ZodEnum<[
3568
+ "email",
3569
+ "pdf",
3570
+ "office",
3571
+ "image",
3572
+ "media",
3573
+ "text",
3574
+ "google_native",
3575
+ "other"
3576
+ ]>;
3577
+ stepKey: z.ZodEnum<[
3578
+ "delete_child_assets",
3579
+ "extract_text",
3580
+ "analyze_media",
3581
+ "extract_assets",
3582
+ "ocr_children",
3583
+ "ocr_document",
3584
+ "resolve_body",
3585
+ "enrich_document",
3586
+ "project_to_indexes"
3587
+ ]>;
3588
+ sampleCount: z.ZodNumber;
3589
+ succeeded: z.ZodNumber;
3590
+ failed: z.ZodNumber;
3591
+ skipped: z.ZodNumber;
3592
+ durationP50Ms: z.ZodNullable<z.ZodNumber>;
3593
+ durationP95Ms: z.ZodNullable<z.ZodNumber>;
3594
+ lastStartedAt: z.ZodNullable<z.ZodString>;
3595
+ }, "strict", z.ZodTypeAny, {
3596
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3597
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3598
+ durationP50Ms: number | null;
3599
+ durationP95Ms: number | null;
3600
+ sampleCount: number;
3601
+ succeeded: number;
3602
+ failed: number;
3603
+ skipped: number;
3604
+ lastStartedAt: string | null;
3605
+ }, {
3606
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3607
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3608
+ durationP50Ms: number | null;
3609
+ durationP95Ms: number | null;
3610
+ sampleCount: number;
3611
+ succeeded: number;
3612
+ failed: number;
3613
+ skipped: number;
3614
+ lastStartedAt: string | null;
3615
+ }>, {
3616
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3617
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3618
+ durationP50Ms: number | null;
3619
+ durationP95Ms: number | null;
3620
+ sampleCount: number;
3621
+ succeeded: number;
3622
+ failed: number;
3623
+ skipped: number;
3624
+ lastStartedAt: string | null;
3625
+ }, {
3626
+ stepKey: "delete_child_assets" | "extract_text" | "analyze_media" | "extract_assets" | "ocr_children" | "ocr_document" | "resolve_body" | "enrich_document" | "project_to_indexes";
3627
+ documentKind: "text" | "email" | "pdf" | "office" | "image" | "media" | "google_native" | "other";
3628
+ durationP50Ms: number | null;
3629
+ durationP95Ms: number | null;
3630
+ sampleCount: number;
3631
+ succeeded: number;
3632
+ failed: number;
3633
+ skipped: number;
3634
+ lastStartedAt: string | null;
3635
+ }>;
3636
+ type PipelineStepMetric = z.infer<typeof PipelineStepMetricSchema>;
834
3637
  declare const SEARCH_PARAM_LIMITS: {
835
3638
  readonly rrfK: {
836
3639
  readonly min: 1;
@@ -881,6 +3684,39 @@ declare function narrowModeToAllowedTiers(requested: SearchMode, allowed: {
881
3684
  discardGraph: boolean;
882
3685
  } | null;
883
3686
  declare function modeFusesRankings(mode: SearchMode): boolean;
3687
+ declare const CIRCUIT_BREAKER_SERVICES: readonly [
3688
+ "vector",
3689
+ "graph"
3690
+ ];
3691
+ type CircuitBreakerService = (typeof CIRCUIT_BREAKER_SERVICES)[number];
3692
+ declare const LOCAL_DEGRADATION_REASONS: readonly [
3693
+ "empty_query",
3694
+ "caller_token_unavailable",
3695
+ "time_window_unsupported"
3696
+ ];
3697
+ declare const REMOTE_DEGRADATION_REASONS: readonly [
3698
+ "vector_tier_not_configured",
3699
+ "graph_tier_not_configured",
3700
+ "no_active_vector_collection",
3701
+ "vector_collections_missing"
3702
+ ];
3703
+ declare const DISPATCH_DEGRADATION_REASONS: readonly [
3704
+ "remote_tiers_unavailable",
3705
+ "remote_tiers_timed_out",
3706
+ "remote_tiers_refused_caller",
3707
+ "remote_tiers_rejected_request",
3708
+ "remote_tiers_failed",
3709
+ "remote_tiers_not_executed",
3710
+ "vector_search_disabled",
3711
+ "graph_search_disabled"
3712
+ ];
3713
+ type RemoteSearchFailureReason = Extract<DispatchDegradationReason, "remote_tiers_unavailable" | "remote_tiers_timed_out" | "remote_tiers_refused_caller" | "remote_tiers_rejected_request" | "remote_tiers_failed">;
3714
+ type LocalDegradationReason = (typeof LOCAL_DEGRADATION_REASONS)[number];
3715
+ type RemoteDegradationReason = (typeof REMOTE_DEGRADATION_REASONS)[number];
3716
+ type DispatchDegradationReason = (typeof DISPATCH_DEGRADATION_REASONS)[number];
3717
+ type CircuitBreakerOpenReason = `circuit_breaker_open:${CircuitBreakerService}`;
3718
+ type SearchDegradationReason = LocalDegradationReason | RemoteDegradationReason | DispatchDegradationReason | CircuitBreakerOpenReason;
3719
+ declare const SEARCH_DEGRADATION_REASONS: readonly SearchDegradationReason[];
884
3720
  interface EnrichmentStage {
885
3721
  readonly key: EnrichmentStageKey;
886
3722
  readonly featureFlagKey: string | null;
@@ -902,10 +3738,39 @@ declare const GRAPH_INDEX_LIMITS: {
902
3738
  readonly default: 24;
903
3739
  };
904
3740
  };
3741
+ interface SystemParameterRange {
3742
+ readonly min: number;
3743
+ readonly max: number;
3744
+ }
3745
+ declare const SYSTEM_PARAMETER_RANGES: {
3746
+ readonly INTEGRITY_TOMBSTONE_RETENTION_DAYS: Readonly<{
3747
+ min: number;
3748
+ max: number;
3749
+ }>;
3750
+ readonly INTEGRITY_FINDING_SAMPLE_LIMIT: Readonly<{
3751
+ min: number;
3752
+ max: number;
3753
+ }>;
3754
+ readonly INTEGRITY_RUN_HEARTBEAT_TIMEOUT_SECONDS: Readonly<{
3755
+ min: number;
3756
+ max: number;
3757
+ }>;
3758
+ readonly INTEGRITY_RUN_RETENTION_COUNT: Readonly<{
3759
+ min: number;
3760
+ max: number;
3761
+ }>;
3762
+ readonly POLICY_CONFLICT_MAX_TIE_GROUP_SIZE: Readonly<{
3763
+ min: number;
3764
+ max: number;
3765
+ }>;
3766
+ };
3767
+ type SystemParameterRangeKey = keyof typeof SYSTEM_PARAMETER_RANGES;
3768
+ declare const assertSystemParameterInRange: (key: string, value: number) => void;
3769
+ declare const assertBoundedSystemParameter: (key: SystemParameterRangeKey, value: number) => void;
905
3770
  type UuidV7 = string & {
906
3771
  readonly __brand: unique symbol;
907
3772
  };
908
3773
  declare function isValidUuidV7(uuid: string): uuid is UuidV7;
909
3774
  declare function generateUuidV7(): UuidV7;
910
3775
  declare function uuidv7ToDate(uuid: string): Date;
911
- export { type AmountEntry, AmountEntrySchema, BaseEnrichmentClient, type BoundingBox, BoundingBoxSchema, type CanonicalDomainKey, CanonicalDomainKeySchema, type ChapterSegment, ChapterSegmentSchema, type ChunkingStrategy, ChunkingStrategySchema, type CircuitBreakerStatus, CircuitBreakerStatusSchema, type ConfidentialityLevel, ConfidentialityLevelSchema, type DocumentStructuredData, DocumentStructuredDataSchema, ENRICHMENT_STAGES, EnrichmentClient, EnrichmentClientError, type EnrichmentClientOptions, type EnrichmentStage, type EnrichmentStageKey, type EnrichmentSyncStatus, EnrichmentSyncStatusSchema, FILTERABLE_CONFIDENTIALITY_LEVELS, type FileMetadataResponse, FileMetadataResponseSchema, type FileUri, FileUriSchema, type FilterableConfidentialityLevel, GRAPH_INDEX_LIMITS, MODE_TIERS, type ModelProvider, ModelProviderSchema, QUARANTINED_CONFIDENTIALITY_LEVEL, type QualityTier, QualityTierSchema, type ReclassifyRequest, type ReclassifyRequestInput, ReclassifyRequestSchema, type ReclassifyResponse, ReclassifyResponseSchema, SEARCH_MODES, SEARCH_PARAM_LIMITS, type SearchHit, SearchHitSchema, type SearchMetadata, SearchMetadataSchema, type SearchMode, SearchModeSchema, type SearchRequest, type SearchRequestInput, SearchRequestSchema, type SearchResponse, SearchResponseSchema, type TenantId, TenantIdSchema, type TranscriptSegment, TranscriptSegmentSchema, type UuidV7, enrichmentStage, generateUuidV7, isEnrichmentStageKey, isValidUuidV7, modeFusesRankings, modeNeedsRemoteTiers, modeScoreIsSimilarity, narrowModeToAllowedTiers, uuidv7ToDate };
3776
+ export { type AmountEntry, AmountEntrySchema, BaseEnrichmentClient, type BodySource, BodySourceSchema, type BoundingBox, BoundingBoxSchema, CIRCUIT_BREAKER_SERVICES, type CanonicalDomainKey, CanonicalDomainKeySchema, type ChapterSegment, ChapterSegmentSchema, type ChunkSource, type ChunkingStrategy, ChunkingStrategySchema, type CircuitBreakerOpenReason, type CircuitBreakerService, type CircuitBreakerStatus, CircuitBreakerStatusSchema, type ConfidentialityLevel, ConfidentialityLevelSchema, DISPATCH_DEGRADATION_REASONS, DOCUMENT_KINDS, DOCUMENT_KIND_LABELS, type DispatchDegradationReason, type DocumentKind, DocumentKindSchema, type DocumentStructuredData, DocumentStructuredDataSchema, ENRICHMENT_STAGES, EnrichmentClient, EnrichmentClientError, type EnrichmentClientOptions, type EnrichmentStage, type EnrichmentStageKey, type EnrichmentSyncStatus, EnrichmentSyncStatusSchema, FILTERABLE_CONFIDENTIALITY_LEVELS, type FileUri, FileUriSchema, type FilterableConfidentialityLevel, type FlowGatePolicy, type FlowStep, GRAPH_INDEX_LIMITS, type GraphSearchHit, GraphSearchHitSchema, INTEGRITY_CLASS_POLICY, INTEGRITY_COMMAND_CODES, INTEGRITY_FINDINGS_PAGE_LIMIT_MAX, type IntegrityActiveRun, IntegrityActiveRunSchema, type IntegrityAuditOverview, IntegrityAuditOverviewSchema, type IntegrityCancelFailureCode, IntegrityCancelFailureCodeSchema, type IntegrityClassPolicy, type IntegrityCommand, type IntegrityCommandFailure, type IntegrityCommandFailureCode, type IntegrityCommandFailureCodeFor, IntegrityCommandFailureCodeSchema, IntegrityCommandFailureSchema, type IntegrityCommandReply, IntegrityCommandReplySchema, IntegrityCommandSchema, type IntegrityDisposition, IntegrityDispositionSchema, type IntegrityFinding, type IntegrityFindingItemClass, IntegrityFindingItemClassSchema, type IntegrityFindingPage, IntegrityFindingPageSchema, IntegrityFindingSchema, type IntegrityFindingsQuery, IntegrityFindingsQuerySchema, type IntegrityItemClass, IntegrityItemClassSchema, type IntegrityPhase, IntegrityPhaseSchema, type IntegrityQuantity, IntegrityQuantitySchema, type IntegrityRepairAction, IntegrityRepairActionSchema, type IntegrityRepairOutcome, IntegrityRepairOutcomeSchema, type IntegrityRepairSkipReason, IntegrityRepairSkipReasonSchema, type IntegrityRunHeader, IntegrityRunHeaderSchema, type IntegrityRunMode, IntegrityRunModeSchema, type IntegrityRunStatus, IntegrityRunStatusSchema, type IntegrityScopeRole, IntegrityScopeRoleSchema, type IntegrityStartFailureCode, IntegrityStartFailureCodeSchema, type IntegrityStore, IntegrityStoreSchema, type IntegrityUnit, IntegrityUnitSchema, type IntegrityVerdict, IntegrityVerdictSchema, LOCAL_DEGRADATION_REASONS, type LocalDegradationReason, MIME_KIND_RULES, MODE_TIERS, type ModelProvider, ModelProviderSchema, NOTHING_TO_READ_TOKENS, type NothingToReadToken, NothingToReadTokenSchema, PIPELINE_FLOWS, PIPELINE_PHASES, PIPELINE_STEPS, PIPELINE_STEP_KEYS, type PipelineFailureStatus, type PipelineFlow, type PipelinePhase, type PipelineRunRecord, PipelineRunRecordSchema, type PipelineRunStatus, PipelineRunStatusSchema, type PipelineRunSummary, PipelineRunSummarySchema, type PipelineStepDefinition, type PipelineStepKey, PipelineStepKeySchema, type PipelineStepMetric, PipelineStepMetricSchema, type PipelineStepRecord, PipelineStepRecordSchema, type PipelineStepStatus, PipelineStepStatusSchema, type PipelineTrigger, PipelineTriggerSchema, QUARANTINED_CONFIDENTIALITY_LEVEL, REMOTE_DEGRADATION_REASONS, type RemoteDegradationReason, type RemoteSearchFailureReason, SEARCH_DEGRADATION_REASONS, SEARCH_MODES, SEARCH_PARAM_LIMITS, SYSTEM_PARAMETER_RANGES, type SearchDegradationReason, type SearchHit, SearchHitSchema, type SearchMetadata, SearchMetadataSchema, type SearchMode, SearchModeSchema, type SearchRequest, type SearchRequestInput, SearchRequestSchema, type SearchResponse, SearchResponseSchema, type SkipReason, type StageProvenance, StageProvenanceSchema, type StepGate, type SystemParameterRange, type SystemParameterRangeKey, type TenantId, TenantIdSchema, type TranscriptSegment, TranscriptSegmentSchema, type UuidV7, assertBoundedSystemParameter, assertSystemParameterInRange, classifyDocumentKind, comparePhases, enrichmentStage, flowFor, flowStepGates, formatSkipReason, generateUuidV7, integrityCommandFailureCodeOf, isEnrichmentStageKey, isValidUuidV7, modeFusesRankings, modeNeedsRemoteTiers, modeScoreIsSimilarity, narrowModeToAllowedTiers, orderedSteps, parseSkipReason, uuidv7ToDate };