@absolutejs/ai 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/ai/client/index.js.map +7 -7
  2. package/dist/ai/index.js +3 -8
  3. package/dist/ai/index.js.map +21 -21
  4. package/dist/ai/providers/anthropic.js.map +2 -2
  5. package/dist/ai/providers/gemini.js +2 -4
  6. package/dist/ai/providers/gemini.js.map +3 -3
  7. package/dist/ai/providers/ollama.js.map +2 -2
  8. package/dist/ai/providers/openai.js.map +2 -2
  9. package/dist/ai/providers/openaiCompatible.js.map +3 -3
  10. package/dist/ai/providers/openaiResponses.js.map +2 -2
  11. package/dist/angular/ai/index.js.map +7 -7
  12. package/dist/react/ai/index.js.map +8 -8
  13. package/dist/src/ai/client/actions.d.ts +1 -1
  14. package/dist/src/ai/client/connection.d.ts +1 -1
  15. package/dist/src/ai/client/createAIStream.d.ts +1 -1
  16. package/dist/src/ai/client/index.d.ts +4 -4
  17. package/dist/src/ai/client/messageStore.d.ts +1 -1
  18. package/dist/src/ai/conversationManager.d.ts +1 -1
  19. package/dist/src/ai/htmxRenderers.d.ts +1 -1
  20. package/dist/src/ai/index.d.ts +19 -19
  21. package/dist/src/ai/memoryStore.d.ts +1 -1
  22. package/dist/src/ai/protocol.d.ts +1 -1
  23. package/dist/src/ai/providers/anthropic.d.ts +2 -2
  24. package/dist/src/ai/providers/gemini.d.ts +1 -1
  25. package/dist/src/ai/providers/ollama.d.ts +1 -1
  26. package/dist/src/ai/providers/openai.d.ts +1 -1
  27. package/dist/src/ai/providers/openaiResponses.d.ts +1 -1
  28. package/dist/src/ai/streamAI.d.ts +1 -1
  29. package/dist/src/ai/streamAIToSSE.d.ts +2 -2
  30. package/dist/src/angular/ai/ai-stream.service.d.ts +2 -2
  31. package/dist/src/angular/ai/index.d.ts +1 -1
  32. package/dist/src/plugins/aiChat.d.ts +2 -2
  33. package/dist/src/react/ai/AIStreamProvider.d.ts +4 -4
  34. package/dist/src/react/ai/index.d.ts +2 -2
  35. package/dist/src/react/ai/useAIStream.d.ts +1 -1
  36. package/dist/src/svelte/ai/createAIStream.d.ts +1 -1
  37. package/dist/src/svelte/ai/index.d.ts +1 -1
  38. package/dist/src/vue/ai/index.d.ts +1 -1
  39. package/dist/src/vue/ai/useAIStream.d.ts +2 -2
  40. package/dist/svelte/ai/index.js.map +7 -7
  41. package/dist/types/ai.d.ts +374 -374
  42. package/dist/types/anthropic.d.ts +1 -1
  43. package/dist/types/typeGuards.d.ts +1 -1
  44. package/dist/vue/ai/index.js.map +7 -7
  45. package/package.json +117 -94
@@ -1,11 +1,11 @@
1
- import type { SessionStore } from './session';
2
- import type { LinkedConnectorProvider, LinkedProviderAccessTokenLease, LinkedProviderAccountType, LinkedProviderBinding, LinkedProviderBindingStatus, LinkedProviderCredentialFailureReport, LinkedProviderCredentialResolver, LinkedProviderFailureCode, LinkedProviderFamily, LinkedProviderResolutionPurpose, ResolveLinkedProviderCredentialInput, ResolvedLinkedProviderCredential } from '@absolutejs/linked-providers';
1
+ import type { SessionStore } from "./session";
2
+ import type { LinkedConnectorProvider, LinkedProviderAccessTokenLease, LinkedProviderAccountType, LinkedProviderBinding, LinkedProviderBindingStatus, LinkedProviderCredentialFailureReport, LinkedProviderCredentialResolver, LinkedProviderFailureCode, LinkedProviderFamily, LinkedProviderResolutionPurpose, ResolveLinkedProviderCredentialInput, ResolvedLinkedProviderCredential } from "@absolutejs/linked-providers";
3
3
  export type AIUsage = {
4
4
  inputTokens: number;
5
5
  outputTokens: number;
6
6
  };
7
- export type RAGExcerptMode = 'chunk' | 'window' | 'section';
8
- export type RAGExcerptPromotionReason = 'single_chunk' | 'chunk_too_narrow' | 'section_small_enough' | 'section_too_large_use_window';
7
+ export type RAGExcerptMode = "chunk" | "window" | "section";
8
+ export type RAGExcerptPromotionReason = "single_chunk" | "chunk_too_narrow" | "section_small_enough" | "section_too_large_use_window";
9
9
  export type RAGExcerptSelection = {
10
10
  mode: RAGExcerptMode;
11
11
  reason: RAGExcerptPromotionReason;
@@ -68,9 +68,9 @@ export type RAGSourceSummary = {
68
68
  provenanceLabel?: string;
69
69
  structure?: RAGChunkStructure;
70
70
  };
71
- export type RAGSectionRetrievalReason = 'best_hit' | 'multi_hit_section' | 'dominant_within_parent' | 'only_section_in_parent' | 'concentrated_evidence';
72
- export type RAGSectionTraceWeightReason = 'rerank_preserved_lead' | 'final_stage_concentration' | 'final_stage_dominant_within_parent' | 'stage_runner_up_pressure' | 'stage_expanded' | 'stage_held' | 'stage_narrowed';
73
- export type RAGSectionQueryAttributionReason = 'base_query_only' | 'transformed_query_only' | 'variant_only' | 'transform_introduced' | 'variant_supported' | 'mixed_query_sources';
71
+ export type RAGSectionRetrievalReason = "best_hit" | "multi_hit_section" | "dominant_within_parent" | "only_section_in_parent" | "concentrated_evidence";
72
+ export type RAGSectionTraceWeightReason = "rerank_preserved_lead" | "final_stage_concentration" | "final_stage_dominant_within_parent" | "stage_runner_up_pressure" | "stage_expanded" | "stage_held" | "stage_narrowed";
73
+ export type RAGSectionQueryAttributionReason = "base_query_only" | "transformed_query_only" | "variant_only" | "transform_introduced" | "variant_supported" | "mixed_query_sources";
74
74
  export type RAGSectionRetrievalDiagnostic = {
75
75
  key: string;
76
76
  label: string;
@@ -132,7 +132,7 @@ export type RAGSectionRetrievalDiagnostic = {
132
132
  primaryHits: number;
133
133
  transformedHits: number;
134
134
  variantHits: number;
135
- mode: 'primary' | 'transformed' | 'variant' | 'mixed';
135
+ mode: "primary" | "transformed" | "variant" | "mixed";
136
136
  reasons: RAGSectionQueryAttributionReason[];
137
137
  };
138
138
  requestedMode?: RAGHybridRetrievalMode;
@@ -204,10 +204,10 @@ export type RAGGroundedAnswerSectionSummary = {
204
204
  provenanceLabel?: string;
205
205
  };
206
206
  export type RAGGroundedAnswerPart = {
207
- type: 'text';
207
+ type: "text";
208
208
  text: string;
209
209
  } | {
210
- type: 'citation';
210
+ type: "citation";
211
211
  text: string;
212
212
  referenceNumbers: number[];
213
213
  references: RAGGroundingReference[];
@@ -217,7 +217,7 @@ export type RAGGroundedAnswerPart = {
217
217
  export type RAGGroundedAnswer = {
218
218
  content: string;
219
219
  hasCitations: boolean;
220
- coverage: 'grounded' | 'partial' | 'ungrounded';
220
+ coverage: "grounded" | "partial" | "ungrounded";
221
221
  parts: RAGGroundedAnswerPart[];
222
222
  references: RAGGroundingReference[];
223
223
  sectionSummaries: RAGGroundedAnswerSectionSummary[];
@@ -267,13 +267,13 @@ export type RAGAnswerWorkflowState = {
267
267
  hasRetrieved: boolean;
268
268
  hasGrounding: boolean;
269
269
  hasCitations: boolean;
270
- coverage: RAGGroundedAnswer['coverage'];
270
+ coverage: RAGGroundedAnswer["coverage"];
271
271
  ungroundedReferenceNumbers: number[];
272
272
  retrievalDurationMs?: number;
273
273
  retrievalStartedAt?: number;
274
274
  retrievedAt?: number;
275
275
  };
276
- export type RAGStreamStage = 'idle' | 'submitting' | 'retrieving' | 'retrieved' | 'streaming' | 'complete' | 'error';
276
+ export type RAGStreamStage = "idle" | "submitting" | "retrieving" | "retrieved" | "streaming" | "complete" | "error";
277
277
  export type RAGDocumentChunk = {
278
278
  chunkId: string;
279
279
  corpusKey?: string;
@@ -304,7 +304,7 @@ export type RAGEmbeddingProvider = {
304
304
  defaultModel?: string;
305
305
  };
306
306
  export type RAGEmbeddingProviderLike = RAGEmbeddingFunction | RAGEmbeddingProvider;
307
- export type RAGContentFormat = 'text' | 'markdown' | 'html' | 'jsonl' | 'tsv' | 'csv' | 'xml' | 'yaml';
307
+ export type RAGContentFormat = "text" | "markdown" | "html" | "jsonl" | "tsv" | "csv" | "xml" | "yaml";
308
308
  export type RAGFileExtractionInput = {
309
309
  data: Uint8Array;
310
310
  path?: string;
@@ -344,7 +344,7 @@ export type RAGFileExtractorRegistration = {
344
344
  export type RAGFileExtractorRegistry = {
345
345
  registrations: RAGFileExtractorRegistration[];
346
346
  includeDefaults?: boolean;
347
- defaultOrder?: 'registry_first' | 'defaults_first';
347
+ defaultOrder?: "registry_first" | "defaults_first";
348
348
  };
349
349
  export type RAGFileExtractorRegistryLike = RAGFileExtractorRegistry | RAGFileExtractorRegistration[];
350
350
  export type RAGMediaTranscriptSegment = {
@@ -404,7 +404,7 @@ export type RAGArchiveExpander = {
404
404
  name: string;
405
405
  expand: (input: RAGFileExtractionInput) => RAGArchiveExpansionResult | Promise<RAGArchiveExpansionResult>;
406
406
  };
407
- export type RAGChunkingStrategy = 'paragraphs' | 'sentences' | 'fixed' | 'source_aware';
407
+ export type RAGChunkingStrategy = "paragraphs" | "sentences" | "fixed" | "source_aware";
408
408
  export type RAGChunkingOptions = {
409
409
  maxChunkLength?: number;
410
410
  chunkOverlap?: number;
@@ -477,7 +477,7 @@ export type RAGPreparedDocument = {
477
477
  normalizedText: string;
478
478
  chunks: RAGDocumentChunk[];
479
479
  };
480
- export type RAGDocumentFileInput = Omit<RAGIngestDocument, 'text'> & {
480
+ export type RAGDocumentFileInput = Omit<RAGIngestDocument, "text"> & {
481
481
  path: string;
482
482
  contentType?: string;
483
483
  extractors?: RAGFileExtractor[];
@@ -502,14 +502,14 @@ export type RAGQueryInput = {
502
502
  candidateLimit?: number;
503
503
  maxBackfills?: number;
504
504
  minResults?: number;
505
- fillPolicy?: 'strict_topk' | 'satisfy_min_results';
505
+ fillPolicy?: "strict_topk" | "satisfy_min_results";
506
506
  };
507
507
  export type RAGLexicalQueryInput = {
508
508
  query: string;
509
509
  topK: number;
510
510
  filter?: Record<string, unknown>;
511
511
  };
512
- export type RAGNativeQueryProfile = 'latency' | 'balanced' | 'recall';
512
+ export type RAGNativeQueryProfile = "latency" | "balanced" | "recall";
513
513
  export type RAGQueryTransformInput = {
514
514
  query: string;
515
515
  topK: number;
@@ -591,10 +591,10 @@ export type RAGQueryResult = {
591
591
  source?: string;
592
592
  metadata?: Record<string, unknown>;
593
593
  };
594
- export type RAGHybridRetrievalMode = 'vector' | 'lexical' | 'hybrid';
595
- export type RAGHybridFusionMode = 'rrf' | 'max';
596
- export type RAGSourceBalanceStrategy = 'cap' | 'round_robin';
597
- export type RAGDiversityStrategy = 'none' | 'mmr';
594
+ export type RAGHybridRetrievalMode = "vector" | "lexical" | "hybrid";
595
+ export type RAGHybridFusionMode = "rrf" | "max";
596
+ export type RAGSourceBalanceStrategy = "cap" | "round_robin";
597
+ export type RAGDiversityStrategy = "none" | "mmr";
598
598
  export type RAGHybridSearchOptions = {
599
599
  mode?: RAGHybridRetrievalMode;
600
600
  lexicalTopK?: number;
@@ -610,7 +610,7 @@ export type RAGHybridSearchOptions = {
610
610
  nativeCandidateLimit?: number;
611
611
  nativeMaxBackfills?: number;
612
612
  nativeMinResults?: number;
613
- nativeFillPolicy?: 'strict_topk' | 'satisfy_min_results';
613
+ nativeFillPolicy?: "strict_topk" | "satisfy_min_results";
614
614
  };
615
615
  export type RAGUpsertInput = {
616
616
  chunks: RAGDocumentChunk[];
@@ -624,7 +624,7 @@ export type RAGDocumentUploadInput = {
624
624
  name: string;
625
625
  content: string;
626
626
  contentType?: string;
627
- encoding?: 'base64' | 'utf8';
627
+ encoding?: "base64" | "utf8";
628
628
  format?: RAGContentFormat;
629
629
  source?: string;
630
630
  title?: string;
@@ -656,7 +656,7 @@ export type RAGIndexedDocument = {
656
656
  labels?: RAGSourceLabels;
657
657
  };
658
658
  export type RAGDocumentChunkPreview = {
659
- document: Omit<RAGIndexedDocument, 'text' | 'metadata'> & {
659
+ document: Omit<RAGIndexedDocument, "text" | "metadata"> & {
660
660
  metadata?: Record<string, unknown>;
661
661
  labels?: RAGSourceLabels;
662
662
  };
@@ -682,7 +682,7 @@ export type RAGChunkSection = {
682
682
  title?: string;
683
683
  path?: string[];
684
684
  depth?: number;
685
- kind?: 'markdown_heading' | 'html_heading' | 'office_heading' | 'office_block' | 'pdf_block' | 'spreadsheet_rows' | 'presentation_slide';
685
+ kind?: "markdown_heading" | "html_heading" | "office_heading" | "office_block" | "pdf_block" | "spreadsheet_rows" | "presentation_slide";
686
686
  };
687
687
  export type RAGChunkSequence = {
688
688
  sectionChunkId?: string;
@@ -709,14 +709,14 @@ export type RAGChunkGraphNode = {
709
709
  export type RAGChunkGraphEdge = {
710
710
  fromChunkId: string;
711
711
  toChunkId: string;
712
- relation: 'previous' | 'next' | 'section_parent' | 'section_child';
712
+ relation: "previous" | "next" | "section_parent" | "section_child";
713
713
  };
714
714
  export type RAGChunkGraphSectionGroup = {
715
715
  id: string;
716
716
  title?: string;
717
717
  path?: string[];
718
718
  depth?: number;
719
- kind?: 'markdown_heading' | 'html_heading' | 'office_heading' | 'office_block' | 'pdf_block' | 'spreadsheet_rows' | 'presentation_slide';
719
+ kind?: "markdown_heading" | "html_heading" | "office_heading" | "office_block" | "pdf_block" | "spreadsheet_rows" | "presentation_slide";
720
720
  chunkIds: string[];
721
721
  chunkCount: number;
722
722
  leadChunkId?: string;
@@ -755,8 +755,8 @@ export type RAGBackendsResponse = {
755
755
  activeModeCookie?: string;
756
756
  backends: RAGBackendDescriptor[];
757
757
  };
758
- export type SQLiteVecResolutionSource = 'absolute-package' | 'explicit' | 'env' | 'database';
759
- export type SQLiteVecResolutionStatus = 'resolved' | 'not_configured' | 'unsupported_platform' | 'package_not_installed' | 'binary_missing' | 'package_invalid';
758
+ export type SQLiteVecResolutionSource = "absolute-package" | "explicit" | "env" | "database";
759
+ export type SQLiteVecResolutionStatus = "resolved" | "not_configured" | "unsupported_platform" | "package_not_installed" | "binary_missing" | "package_invalid";
760
760
  export type SQLiteVecResolution = {
761
761
  status: SQLiteVecResolutionStatus;
762
762
  source: SQLiteVecResolutionSource;
@@ -772,9 +772,9 @@ export type RAGSQLiteNativeDiagnostics = {
772
772
  requested: boolean;
773
773
  available: boolean;
774
774
  active: boolean;
775
- mode?: 'vec0';
775
+ mode?: "vec0";
776
776
  tableName?: string;
777
- distanceMetric?: 'cosine' | 'l2';
777
+ distanceMetric?: "cosine" | "l2";
778
778
  rowCount?: number;
779
779
  pageCount?: number;
780
780
  freelistCount?: number;
@@ -789,7 +789,7 @@ export type RAGSQLiteNativeDiagnostics = {
789
789
  lastQueryError?: string;
790
790
  lastUpsertError?: string;
791
791
  lastQueryPlan?: {
792
- pushdownMode: 'none' | 'partial' | 'full';
792
+ pushdownMode: "none" | "partial" | "full";
793
793
  pushdownApplied: boolean;
794
794
  pushdownClauseCount: number;
795
795
  totalFilterClauseCount: number;
@@ -799,7 +799,7 @@ export type RAGSQLiteNativeDiagnostics = {
799
799
  candidateLimitUsed?: number;
800
800
  maxBackfillsUsed?: number;
801
801
  minResultsUsed?: number;
802
- fillPolicyUsed?: 'strict_topk' | 'satisfy_min_results';
802
+ fillPolicyUsed?: "strict_topk" | "satisfy_min_results";
803
803
  pushdownCoverageRatio?: number;
804
804
  jsRemainderRatio?: number;
805
805
  filteredCandidateCount?: number;
@@ -814,20 +814,20 @@ export type RAGSQLiteNativeDiagnostics = {
814
814
  topKFillRatio?: number;
815
815
  underfilledTopK?: boolean;
816
816
  candidateBudgetExhausted?: boolean;
817
- candidateCoverage?: 'empty' | 'under_target' | 'target_sized' | 'broad';
818
- queryMode: 'json_fallback' | 'native_vec0';
817
+ candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad";
818
+ queryMode: "json_fallback" | "native_vec0";
819
819
  };
820
820
  };
821
821
  export type RAGPostgresNativeDiagnostics = {
822
822
  requested: boolean;
823
823
  available: boolean;
824
824
  active: boolean;
825
- mode?: 'pgvector';
825
+ mode?: "pgvector";
826
826
  extensionName?: string;
827
827
  schemaName?: string;
828
828
  tableName?: string;
829
- distanceMetric?: 'cosine' | 'l2' | 'inner_product';
830
- indexType?: 'none' | 'hnsw' | 'ivfflat';
829
+ distanceMetric?: "cosine" | "l2" | "inner_product";
830
+ indexType?: "none" | "hnsw" | "ivfflat";
831
831
  indexName?: string;
832
832
  indexPresent?: boolean;
833
833
  estimatedRowCount?: number;
@@ -856,7 +856,7 @@ export type RAGPostgresNativeDiagnostics = {
856
856
  queryRowCount?: number;
857
857
  };
858
858
  lastQueryPlan?: {
859
- pushdownMode: 'none' | 'partial' | 'full';
859
+ pushdownMode: "none" | "partial" | "full";
860
860
  pushdownApplied: boolean;
861
861
  pushdownClauseCount: number;
862
862
  totalFilterClauseCount: number;
@@ -866,7 +866,7 @@ export type RAGPostgresNativeDiagnostics = {
866
866
  candidateLimitUsed?: number;
867
867
  maxBackfillsUsed?: number;
868
868
  minResultsUsed?: number;
869
- fillPolicyUsed?: 'strict_topk' | 'satisfy_min_results';
869
+ fillPolicyUsed?: "strict_topk" | "satisfy_min_results";
870
870
  pushdownCoverageRatio?: number;
871
871
  jsRemainderRatio?: number;
872
872
  filteredCandidateCount?: number;
@@ -881,13 +881,13 @@ export type RAGPostgresNativeDiagnostics = {
881
881
  topKFillRatio?: number;
882
882
  underfilledTopK?: boolean;
883
883
  candidateBudgetExhausted?: boolean;
884
- candidateCoverage?: 'empty' | 'under_target' | 'target_sized' | 'broad';
885
- queryMode: 'native_pgvector';
884
+ candidateCoverage?: "empty" | "under_target" | "target_sized" | "broad";
885
+ queryMode: "native_pgvector";
886
886
  };
887
887
  };
888
888
  export type RAGVectorStoreStatus = {
889
- backend: 'in_memory' | 'sqlite' | 'postgres';
890
- vectorMode: 'in_memory' | 'json_fallback' | 'native_vec0' | 'native_pgvector';
889
+ backend: "in_memory" | "sqlite" | "postgres";
890
+ vectorMode: "in_memory" | "json_fallback" | "native_vec0" | "native_pgvector";
891
891
  dimensions?: number;
892
892
  native?: RAGSQLiteNativeDiagnostics | RAGPostgresNativeDiagnostics;
893
893
  };
@@ -900,8 +900,8 @@ export type RAGVectorDeleteInput = {
900
900
  chunkIds?: string[];
901
901
  };
902
902
  export type RAGBackendCapabilities = {
903
- backend: 'in_memory' | 'sqlite' | 'postgres' | 'custom';
904
- persistence: 'memory_only' | 'embedded' | 'external';
903
+ backend: "in_memory" | "sqlite" | "postgres" | "custom";
904
+ persistence: "memory_only" | "embedded" | "external";
905
905
  nativeVectorSearch: boolean;
906
906
  serverSideFiltering: boolean;
907
907
  streamingIngestStatus: boolean;
@@ -929,7 +929,7 @@ export type RAGCollectionSearchParams = {
929
929
  nativeCandidateLimit?: number;
930
930
  nativeMaxBackfills?: number;
931
931
  nativeMinResults?: number;
932
- nativeFillPolicy?: 'strict_topk' | 'satisfy_min_results';
932
+ nativeFillPolicy?: "strict_topk" | "satisfy_min_results";
933
933
  filter?: Record<string, unknown>;
934
934
  scoreThreshold?: number;
935
935
  queryTransform?: RAGQueryTransformProviderLike;
@@ -939,7 +939,7 @@ export type RAGCollectionSearchParams = {
939
939
  model?: string;
940
940
  signal?: AbortSignal;
941
941
  };
942
- export type RAGRetrievalTraceStage = 'input' | 'query_transform' | 'routing' | 'embed' | 'vector_search' | 'lexical_search' | 'fusion' | 'rerank' | 'diversity' | 'source_balance' | 'evidence_reconcile' | 'score_filter' | 'finalize';
942
+ export type RAGRetrievalTraceStage = "input" | "query_transform" | "routing" | "embed" | "vector_search" | "lexical_search" | "fusion" | "rerank" | "diversity" | "source_balance" | "evidence_reconcile" | "score_filter" | "finalize";
943
943
  export type RAGRetrievalTraceStep = {
944
944
  stage: RAGRetrievalTraceStage;
945
945
  label: string;
@@ -998,7 +998,7 @@ export type RAGCollectionSearchResult = {
998
998
  results: RAGQueryResult[];
999
999
  trace: RAGRetrievalTrace;
1000
1000
  };
1001
- export type RAGSearchRequest = Omit<RAGCollectionSearchParams, 'signal' | 'rerank'> & {
1001
+ export type RAGSearchRequest = Omit<RAGCollectionSearchParams, "signal" | "rerank"> & {
1002
1002
  includeTrace?: boolean;
1003
1003
  persistTrace?: boolean;
1004
1004
  traceGroupKey?: string;
@@ -1031,14 +1031,14 @@ export type RAGDocumentSummary = {
1031
1031
  chunkCount: number;
1032
1032
  byKind: Record<string, number>;
1033
1033
  };
1034
- export type RAGIngestJobStatus = 'running' | 'completed' | 'failed';
1034
+ export type RAGIngestJobStatus = "running" | "completed" | "failed";
1035
1035
  export type RAGIngestJobRecord = {
1036
1036
  id: string;
1037
1037
  status: RAGIngestJobStatus;
1038
1038
  startedAt: number;
1039
1039
  finishedAt?: number;
1040
1040
  elapsedMs?: number;
1041
- inputKind: 'chunks' | 'documents' | 'urls' | 'uploads';
1041
+ inputKind: "chunks" | "documents" | "urls" | "uploads";
1042
1042
  requestedCount: number;
1043
1043
  chunkCount?: number;
1044
1044
  documentCount?: number;
@@ -1110,8 +1110,8 @@ export type RAGCorpusHealth = {
1110
1110
  };
1111
1111
  export type RAGAdminActionRecord = {
1112
1112
  id: string;
1113
- action: 'analyze_backend' | 'rebuild_native_index' | 'clear_index' | 'create_document' | 'delete_document' | 'promote_retrieval_baseline' | 'revert_retrieval_baseline' | 'prune_search_traces' | 'reindex_document' | 'reindex_source' | 'sync_all_sources' | 'sync_source' | 'reseed' | 'reset';
1114
- status: 'completed' | 'failed';
1113
+ action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
1114
+ status: "completed" | "failed";
1115
1115
  startedAt: number;
1116
1116
  finishedAt?: number;
1117
1117
  elapsedMs?: number;
@@ -1119,10 +1119,10 @@ export type RAGAdminActionRecord = {
1119
1119
  target?: string;
1120
1120
  error?: string;
1121
1121
  };
1122
- export type RAGAdminJobStatus = 'running' | 'completed' | 'failed';
1122
+ export type RAGAdminJobStatus = "running" | "completed" | "failed";
1123
1123
  export type RAGAdminJobRecord = {
1124
1124
  id: string;
1125
- action: 'analyze_backend' | 'rebuild_native_index' | 'clear_index' | 'create_document' | 'delete_document' | 'promote_retrieval_baseline' | 'revert_retrieval_baseline' | 'prune_search_traces' | 'reindex_document' | 'reindex_source' | 'sync_all_sources' | 'sync_source' | 'reseed' | 'reset';
1125
+ action: "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "promote_retrieval_baseline" | "revert_retrieval_baseline" | "prune_search_traces" | "reindex_document" | "reindex_source" | "sync_all_sources" | "sync_source" | "reseed" | "reset";
1126
1126
  status: RAGAdminJobStatus;
1127
1127
  startedAt: number;
1128
1128
  finishedAt?: number;
@@ -1163,28 +1163,28 @@ export type RAGAdminCapabilities = {
1163
1163
  canSyncSource: boolean;
1164
1164
  };
1165
1165
  export type RAGBackendMaintenanceRecommendation = {
1166
- code: 'backend_statistics_refresh_recommended' | 'native_backend_inactive' | 'native_backend_recent_errors' | 'native_index_missing' | 'native_index_rebuild_recommended' | 'sqlite_storage_optimization_recommended';
1166
+ code: "backend_statistics_refresh_recommended" | "native_backend_inactive" | "native_backend_recent_errors" | "native_index_missing" | "native_index_rebuild_recommended" | "sqlite_storage_optimization_recommended";
1167
1167
  message: string;
1168
- severity: 'info' | 'warning' | 'error';
1169
- action?: 'analyze_backend' | 'rebuild_native_index';
1168
+ severity: "info" | "warning" | "error";
1169
+ action?: "analyze_backend" | "rebuild_native_index";
1170
1170
  };
1171
1171
  export type RAGBackendMaintenanceSummary = {
1172
- backend: Exclude<RAGVectorStoreStatus['backend'], 'in_memory'>;
1172
+ backend: Exclude<RAGVectorStoreStatus["backend"], "in_memory">;
1173
1173
  activeJobs: Array<{
1174
- action: 'analyze_backend' | 'rebuild_native_index';
1174
+ action: "analyze_backend" | "rebuild_native_index";
1175
1175
  startedAt: number;
1176
1176
  target?: string;
1177
1177
  }>;
1178
1178
  recentActions: Array<{
1179
- action: 'analyze_backend' | 'rebuild_native_index';
1180
- status: RAGAdminActionRecord['status'];
1179
+ action: "analyze_backend" | "rebuild_native_index";
1180
+ status: RAGAdminActionRecord["status"];
1181
1181
  finishedAt?: number;
1182
1182
  target?: string;
1183
1183
  error?: string;
1184
1184
  }>;
1185
1185
  recommendations: RAGBackendMaintenanceRecommendation[];
1186
1186
  };
1187
- export type RAGAuthorizedAction = 'analyze_backend' | 'rebuild_native_index' | 'clear_index' | 'create_document' | 'delete_document' | 'ingest' | 'list_sync_sources' | 'manage_retrieval_admin' | 'manage_retrieval_baselines' | 'prune_search_traces' | 'reindex_document' | 'reindex_source' | 'reseed' | 'reset' | 'sync_all_sources' | 'sync_source';
1187
+ export type RAGAuthorizedAction = "analyze_backend" | "rebuild_native_index" | "clear_index" | "create_document" | "delete_document" | "ingest" | "list_sync_sources" | "manage_retrieval_admin" | "manage_retrieval_baselines" | "prune_search_traces" | "reindex_document" | "reindex_source" | "reseed" | "reset" | "sync_all_sources" | "sync_source";
1188
1188
  export type RAGAuthorizationResource = {
1189
1189
  documentId?: string;
1190
1190
  path?: string;
@@ -1225,15 +1225,15 @@ export type CreateRAGAccessControlOptions<TContext = unknown> = {
1225
1225
  authorize?: RAGAccessControlAuthorizeResolver<TContext>;
1226
1226
  resolveScope?: RAGAccessControlScopeResolver<TContext>;
1227
1227
  };
1228
- export type RAGSyncSourceStatus = 'idle' | 'running' | 'completed' | 'failed' | 'disabled';
1229
- export type RAGSyncSourceDiagnosticCode = 'sync_failed' | 'retry_scheduled' | 'storage_resume_pending' | 'email_resume_pending' | 'lineage_conflict_detected' | 'duplicate_sync_key_detected' | 'targeted_refresh_applied' | 'noop_sync' | 'extraction_failures_detected' | 'extractor_missing' | 'ocr_extractor_recommended' | 'canonical_dedupe_applied' | 'robots_blocked' | 'nofollow_skipped' | 'noindex_skipped';
1228
+ export type RAGSyncSourceStatus = "idle" | "running" | "completed" | "failed" | "disabled";
1229
+ export type RAGSyncSourceDiagnosticCode = "sync_failed" | "retry_scheduled" | "storage_resume_pending" | "email_resume_pending" | "lineage_conflict_detected" | "duplicate_sync_key_detected" | "targeted_refresh_applied" | "noop_sync" | "extraction_failures_detected" | "extractor_missing" | "ocr_extractor_recommended" | "canonical_dedupe_applied" | "robots_blocked" | "nofollow_skipped" | "noindex_skipped";
1230
1230
  export type RAGSyncSourceDiagnosticEntry = {
1231
1231
  code: RAGSyncSourceDiagnosticCode;
1232
- severity: 'info' | 'warning' | 'error';
1232
+ severity: "info" | "warning" | "error";
1233
1233
  summary: string;
1234
1234
  };
1235
1235
  export type RAGSyncRetryGuidance = {
1236
- action: 'wait_for_retry' | 'resume_sync' | 'resolve_conflicts' | 'rerun_sync' | 'inspect_source' | 'configure_extractor';
1236
+ action: "wait_for_retry" | "resume_sync" | "resolve_conflicts" | "rerun_sync" | "inspect_source" | "configure_extractor";
1237
1237
  reason: string;
1238
1238
  nextRetryAt?: number;
1239
1239
  resumeCursor?: string;
@@ -1241,13 +1241,13 @@ export type RAGSyncRetryGuidance = {
1241
1241
  };
1242
1242
  export type RAGSyncExtractionFailure = {
1243
1243
  itemLabel: string;
1244
- itemKind: 'directory_file' | 'url' | 'storage_object' | 'email_attachment';
1244
+ itemKind: "directory_file" | "url" | "storage_object" | "email_attachment";
1245
1245
  reason: string;
1246
- remediation: 'configure_extractor' | 'add_ocr_extractor' | 'inspect_file';
1246
+ remediation: "configure_extractor" | "add_ocr_extractor" | "inspect_file";
1247
1247
  };
1248
1248
  export type RAGSyncExtractionRecoveryAction = {
1249
- remediation: RAGSyncExtractionFailure['remediation'];
1250
- itemKinds: RAGSyncExtractionFailure['itemKind'][];
1249
+ remediation: RAGSyncExtractionFailure["remediation"];
1250
+ itemKinds: RAGSyncExtractionFailure["itemKind"][];
1251
1251
  itemLabels: string[];
1252
1252
  reasons: string[];
1253
1253
  count: number;
@@ -1260,12 +1260,12 @@ export type RAGSyncExtractionRecoveryPreview = {
1260
1260
  summary?: string;
1261
1261
  };
1262
1262
  export type RAGSyncExtractionRecoveryHandler = (action: RAGSyncExtractionRecoveryAction) => Promise<boolean | void> | boolean | void;
1263
- export type RAGSyncExtractionRecoveryHandlers = Partial<Record<RAGSyncExtractionFailure['remediation'], RAGSyncExtractionRecoveryHandler>>;
1263
+ export type RAGSyncExtractionRecoveryHandlers = Partial<Record<RAGSyncExtractionFailure["remediation"], RAGSyncExtractionRecoveryHandler>>;
1264
1264
  export type RAGSyncExtractionRecoveryResult = RAGSyncExtractionRecoveryPreview & {
1265
1265
  completedActions: RAGSyncExtractionRecoveryAction[];
1266
1266
  failedActions: RAGSyncExtractionRecoveryAction[];
1267
1267
  skippedActions: RAGSyncExtractionRecoveryAction[];
1268
- errorsByRemediation?: Partial<Record<RAGSyncExtractionFailure['remediation'], string>>;
1268
+ errorsByRemediation?: Partial<Record<RAGSyncExtractionFailure["remediation"], string>>;
1269
1269
  };
1270
1270
  export type RAGSyncSourceDiagnostics = {
1271
1271
  summary: string;
@@ -1276,7 +1276,7 @@ export type RAGSyncSourceDiagnostics = {
1276
1276
  export type RAGSyncSourceRecord = {
1277
1277
  id: string;
1278
1278
  label: string;
1279
- kind: 'directory' | 'url' | 'storage' | 'email' | 'custom';
1279
+ kind: "directory" | "url" | "storage" | "email" | "custom";
1280
1280
  status: RAGSyncSourceStatus;
1281
1281
  description?: string;
1282
1282
  target?: string;
@@ -1295,7 +1295,7 @@ export type RAGSyncSourceRecord = {
1295
1295
  metadata?: Record<string, unknown>;
1296
1296
  };
1297
1297
  export type RAGSyncSourceReconciliationSummary = {
1298
- refreshMode: 'noop' | 'targeted';
1298
+ refreshMode: "noop" | "targeted";
1299
1299
  staleDocumentIds: string[];
1300
1300
  staleSyncKeys: string[];
1301
1301
  refreshedDocumentIds: string[];
@@ -1321,19 +1321,19 @@ export type RAGSyncSourceReconciliationSummary = {
1321
1321
  versionNumber?: number;
1322
1322
  isLatestVersion: boolean;
1323
1323
  }>;
1324
- reasons: Array<'duplicate_sync_key' | 'multiple_lineages' | 'multiple_versions' | 'multiple_latest_versions'>;
1324
+ reasons: Array<"duplicate_sync_key" | "multiple_lineages" | "multiple_versions" | "multiple_latest_versions">;
1325
1325
  }>;
1326
1326
  };
1327
- export type RAGSyncConflictResolutionStrategy = 'keep_latest' | 'keep_highest_version';
1327
+ export type RAGSyncConflictResolutionStrategy = "keep_latest" | "keep_highest_version";
1328
1328
  export type RAGSyncConflictResolutionAction = {
1329
1329
  syncKey: string;
1330
1330
  keepDocumentId: string;
1331
1331
  deleteDocumentIds: string[];
1332
- reasons: RAGSyncSourceReconciliationSummary['lineageConflicts'][number]['reasons'];
1332
+ reasons: RAGSyncSourceReconciliationSummary["lineageConflicts"][number]["reasons"];
1333
1333
  };
1334
1334
  export type RAGSyncConflictResolutionAmbiguity = {
1335
1335
  syncKey: string;
1336
- reasons: RAGSyncSourceReconciliationSummary['lineageConflicts'][number]['reasons'];
1336
+ reasons: RAGSyncSourceReconciliationSummary["lineageConflicts"][number]["reasons"];
1337
1337
  candidateDocumentIds: string[];
1338
1338
  recommendedStrategy?: RAGSyncConflictResolutionStrategy;
1339
1339
  };
@@ -1358,7 +1358,7 @@ export type RAGSyncSourceRunResult = {
1358
1358
  export type RAGSyncSourceDefinition = {
1359
1359
  id: string;
1360
1360
  label: string;
1361
- kind: RAGSyncSourceRecord['kind'];
1361
+ kind: RAGSyncSourceRecord["kind"];
1362
1362
  description?: string;
1363
1363
  target?: string;
1364
1364
  metadata?: Record<string, unknown>;
@@ -1567,7 +1567,7 @@ export type RAGEmailSyncAttachment = {
1567
1567
  name: string;
1568
1568
  content: string | Uint8Array;
1569
1569
  contentType?: string;
1570
- encoding?: 'base64' | 'utf8';
1570
+ encoding?: "base64" | "utf8";
1571
1571
  format?: RAGContentFormat;
1572
1572
  source?: string;
1573
1573
  title?: string;
@@ -1631,7 +1631,7 @@ export type RAGGmailLinkedEmailSyncClientOptions = {
1631
1631
  maxResults?: number;
1632
1632
  fetch?: typeof fetch;
1633
1633
  };
1634
- export type RAGGmailLinkedEmailSyncSourceOptions = Omit<RAGEmailSyncSourceOptions, 'client'> & RAGGmailLinkedEmailSyncClientOptions;
1634
+ export type RAGGmailLinkedEmailSyncSourceOptions = Omit<RAGEmailSyncSourceOptions, "client"> & RAGGmailLinkedEmailSyncClientOptions;
1635
1635
  export type RAGLinkedProviderFamily = LinkedProviderFamily;
1636
1636
  export type RAGConnectorProvider = LinkedConnectorProvider;
1637
1637
  export type RAGLinkedProviderAccountType = LinkedProviderAccountType;
@@ -1672,11 +1672,11 @@ export type RAGConnectorSyncResult = {
1672
1672
  export type RAGConnectorRuntime = {
1673
1673
  provider: RAGConnectorProvider;
1674
1674
  requiredScopes: (input?: {
1675
- mode?: 'read' | 'write' | 'messages';
1675
+ mode?: "read" | "write" | "messages";
1676
1676
  }) => string[];
1677
1677
  sync: (input: RAGConnectorSyncInput) => Promise<RAGConnectorSyncResult> | RAGConnectorSyncResult;
1678
1678
  };
1679
- export type RAGSyncManager = Pick<RAGIndexManager, 'listSyncSources' | 'syncSource' | 'syncAllSources'>;
1679
+ export type RAGSyncManager = Pick<RAGIndexManager, "listSyncSources" | "syncSource" | "syncAllSources">;
1680
1680
  export type RAGSyncRunOptions = {
1681
1681
  background?: boolean;
1682
1682
  };
@@ -1773,18 +1773,18 @@ export type RAGRetrievalReleaseStatusResponse = {
1773
1773
  };
1774
1774
  export type RAGRetrievalReleaseDriftStatusResponse = {
1775
1775
  ok: true;
1776
- handoffDriftRollups?: RAGRetrievalComparisonRuntime['handoffDriftRollups'];
1777
- handoffDriftCountsByLane?: RAGRetrievalComparisonRuntime['handoffDriftCountsByLane'];
1776
+ handoffDriftRollups?: RAGRetrievalComparisonRuntime["handoffDriftRollups"];
1777
+ handoffDriftCountsByLane?: RAGRetrievalComparisonRuntime["handoffDriftCountsByLane"];
1778
1778
  };
1779
1779
  export type RAGRemediationAction = {
1780
- kind: 'approve_candidate' | 'acknowledge_incident' | 'resolve_incident' | 'view_release_status' | 'view_release_drift' | 'view_handoffs';
1780
+ kind: "approve_candidate" | "acknowledge_incident" | "resolve_incident" | "view_release_status" | "view_release_drift" | "view_handoffs";
1781
1781
  label: string;
1782
- method: 'GET' | 'POST';
1782
+ method: "GET" | "POST";
1783
1783
  path: string;
1784
1784
  payload?: Record<string, unknown>;
1785
1785
  };
1786
1786
  export type RAGRemediationStep = {
1787
- kind: 'renew_approval' | 'record_approval' | 'inspect_gate' | 'rerun_comparison' | 'restore_source_lane' | 'review_readiness' | 'monitor_lane';
1787
+ kind: "renew_approval" | "record_approval" | "inspect_gate" | "rerun_comparison" | "restore_source_lane" | "review_readiness" | "monitor_lane";
1788
1788
  label: string;
1789
1789
  actions?: RAGRemediationAction[];
1790
1790
  };
@@ -1801,20 +1801,20 @@ export type RAGRetrievalLaneHandoffIncidentSummary = {
1801
1801
  };
1802
1802
  export type RAGRetrievalLaneHandoffFreshnessWindow = {
1803
1803
  groupKey: string;
1804
- sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord['sourceRolloutLabel'];
1805
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
1804
+ sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord["sourceRolloutLabel"];
1805
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
1806
1806
  candidateRetrievalId?: string;
1807
1807
  sourceRunId?: string;
1808
1808
  latestApprovedAt?: number;
1809
1809
  approvalAgeMs?: number;
1810
1810
  staleAfterMs?: number;
1811
1811
  expiresAt?: number;
1812
- freshnessStatus: 'fresh' | 'expired' | 'not_applicable';
1812
+ freshnessStatus: "fresh" | "expired" | "not_applicable";
1813
1813
  };
1814
1814
  export type RAGRetrievalLaneHandoffAutoCompleteSummary = {
1815
1815
  groupKey: string;
1816
- sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord['sourceRolloutLabel'];
1817
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
1816
+ sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord["sourceRolloutLabel"];
1817
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
1818
1818
  candidateRetrievalId?: string;
1819
1819
  sourceRunId?: string;
1820
1820
  enabled: boolean;
@@ -1823,7 +1823,7 @@ export type RAGRetrievalLaneHandoffAutoCompleteSummary = {
1823
1823
  latestApprovedAt?: number;
1824
1824
  approvalAgeMs?: number;
1825
1825
  approvalExpiresAt?: number;
1826
- freshnessStatus: 'fresh' | 'expired' | 'not_applicable';
1826
+ freshnessStatus: "fresh" | "expired" | "not_applicable";
1827
1827
  reasons: string[];
1828
1828
  };
1829
1829
  export type RAGRetrievalLaneHandoffIncidentStatusResponse = {
@@ -1903,7 +1903,7 @@ export type RAGEvaluationCase = {
1903
1903
  model?: string;
1904
1904
  scoreThreshold?: number;
1905
1905
  filter?: Record<string, unknown>;
1906
- retrieval?: RAGCollectionSearchParams['retrieval'];
1906
+ retrieval?: RAGCollectionSearchParams["retrieval"];
1907
1907
  expectedChunkIds?: string[];
1908
1908
  expectedSources?: string[];
1909
1909
  expectedDocumentIds?: string[];
@@ -1933,9 +1933,9 @@ export type RAGAnswerGroundingEvaluationCaseResult = {
1933
1933
  answer: string;
1934
1934
  query?: string;
1935
1935
  label?: string;
1936
- status: 'pass' | 'partial' | 'fail';
1937
- mode: 'chunkId' | 'source' | 'documentId';
1938
- coverage: RAGGroundedAnswer['coverage'];
1936
+ status: "pass" | "partial" | "fail";
1937
+ mode: "chunkId" | "source" | "documentId";
1938
+ coverage: RAGGroundedAnswer["coverage"];
1939
1939
  hasCitations: boolean;
1940
1940
  citationCount: number;
1941
1941
  referenceCount: number;
@@ -1952,7 +1952,7 @@ export type RAGAnswerGroundingEvaluationCaseResult = {
1952
1952
  matchedIds: string[];
1953
1953
  missingIds: string[];
1954
1954
  extraIds: string[];
1955
- failureClasses?: Array<'no_expected_targets' | 'no_citations' | 'unresolved_citations' | 'missing_expected_sources' | 'extra_citations' | 'section_source_miss' | 'section_graph_source_miss' | 'section_hierarchy_source_miss' | 'spreadsheet_source_miss' | 'media_source_miss' | 'ocr_source_miss'>;
1955
+ failureClasses?: Array<"no_expected_targets" | "no_citations" | "unresolved_citations" | "missing_expected_sources" | "extra_citations" | "section_source_miss" | "section_graph_source_miss" | "section_hierarchy_source_miss" | "spreadsheet_source_miss" | "media_source_miss" | "ocr_source_miss">;
1956
1956
  groundedAnswer: RAGGroundedAnswer;
1957
1957
  metadata?: Record<string, unknown>;
1958
1958
  };
@@ -2077,10 +2077,10 @@ export type RAGAnswerGroundingEvaluationCaseDiff = {
2077
2077
  caseId: string;
2078
2078
  label?: string;
2079
2079
  query?: string;
2080
- previousStatus?: RAGAnswerGroundingEvaluationCaseResult['status'];
2081
- currentStatus: RAGAnswerGroundingEvaluationCaseResult['status'];
2082
- previousCoverage?: RAGAnswerGroundingEvaluationCaseResult['coverage'];
2083
- currentCoverage: RAGAnswerGroundingEvaluationCaseResult['coverage'];
2080
+ previousStatus?: RAGAnswerGroundingEvaluationCaseResult["status"];
2081
+ currentStatus: RAGAnswerGroundingEvaluationCaseResult["status"];
2082
+ previousCoverage?: RAGAnswerGroundingEvaluationCaseResult["coverage"];
2083
+ currentCoverage: RAGAnswerGroundingEvaluationCaseResult["coverage"];
2084
2084
  previousCitationF1?: number;
2085
2085
  currentCitationF1: number;
2086
2086
  previousCitedIds: string[];
@@ -2091,8 +2091,8 @@ export type RAGAnswerGroundingEvaluationCaseDiff = {
2091
2091
  currentMissingIds: string[];
2092
2092
  previousExtraIds: string[];
2093
2093
  currentExtraIds: string[];
2094
- previousFailureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult['failureClasses']>;
2095
- currentFailureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult['failureClasses']>;
2094
+ previousFailureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult["failureClasses"]>;
2095
+ currentFailureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult["failureClasses"]>;
2096
2096
  previousReferenceCount?: number;
2097
2097
  currentReferenceCount: number;
2098
2098
  previousResolvedCitationCount?: number;
@@ -2109,8 +2109,8 @@ export type RAGAnswerGroundingEvaluationCaseSnapshot = {
2109
2109
  caseId: string;
2110
2110
  label?: string;
2111
2111
  query?: string;
2112
- status: RAGAnswerGroundingEvaluationCaseResult['status'];
2113
- coverage: RAGAnswerGroundingEvaluationCaseResult['coverage'];
2112
+ status: RAGAnswerGroundingEvaluationCaseResult["status"];
2113
+ coverage: RAGAnswerGroundingEvaluationCaseResult["coverage"];
2114
2114
  citationF1: number;
2115
2115
  resolvedCitationRate: number;
2116
2116
  citationCount: number;
@@ -2121,11 +2121,11 @@ export type RAGAnswerGroundingEvaluationCaseSnapshot = {
2121
2121
  matchedIds: string[];
2122
2122
  missingIds: string[];
2123
2123
  extraIds: string[];
2124
- failureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult['failureClasses']>;
2124
+ failureClasses?: NonNullable<RAGAnswerGroundingEvaluationCaseResult["failureClasses"]>;
2125
2125
  ungroundedReferenceNumbers: number[];
2126
2126
  answer: string;
2127
2127
  previousAnswer?: string;
2128
- answerChange: 'new' | 'changed' | 'unchanged';
2128
+ answerChange: "new" | "changed" | "unchanged";
2129
2129
  };
2130
2130
  export type RAGAnswerGroundingEvaluationRunDiff = {
2131
2131
  suiteId: string;
@@ -2157,7 +2157,7 @@ export type RAGAnswerGroundingCaseSnapshotPresentation = {
2157
2157
  caseId: string;
2158
2158
  label: string;
2159
2159
  summary: string;
2160
- answerChange: RAGAnswerGroundingEvaluationCaseSnapshot['answerChange'];
2160
+ answerChange: RAGAnswerGroundingEvaluationCaseSnapshot["answerChange"];
2161
2161
  rows: RAGLabelValueRow[];
2162
2162
  };
2163
2163
  export type RAGEvaluationInput = {
@@ -2166,7 +2166,7 @@ export type RAGEvaluationInput = {
2166
2166
  scoreThreshold?: number;
2167
2167
  model?: string;
2168
2168
  filter?: Record<string, unknown>;
2169
- retrieval?: RAGCollectionSearchParams['retrieval'];
2169
+ retrieval?: RAGCollectionSearchParams["retrieval"];
2170
2170
  dryRun?: boolean;
2171
2171
  };
2172
2172
  export type RAGEvaluationCaseResult = {
@@ -2174,7 +2174,7 @@ export type RAGEvaluationCaseResult = {
2174
2174
  corpusKey?: string;
2175
2175
  query: string;
2176
2176
  label?: string;
2177
- status: 'pass' | 'partial' | 'fail';
2177
+ status: "pass" | "partial" | "fail";
2178
2178
  topK: number;
2179
2179
  elapsedMs: number;
2180
2180
  retrievedCount: number;
@@ -2187,8 +2187,8 @@ export type RAGEvaluationCaseResult = {
2187
2187
  expectedIds: string[];
2188
2188
  matchedIds: string[];
2189
2189
  missingIds: string[];
2190
- mode: 'chunkId' | 'source' | 'documentId';
2191
- failureClasses?: Array<'no_expected_targets' | 'no_results' | 'no_match' | 'partial_recall' | 'extra_noise' | 'section_evidence_miss' | 'section_graph_miss' | 'section_hierarchy_miss' | 'spreadsheet_evidence_miss' | 'media_evidence_miss' | 'ocr_evidence_miss' | 'routing_miss'>;
2190
+ mode: "chunkId" | "source" | "documentId";
2191
+ failureClasses?: Array<"no_expected_targets" | "no_results" | "no_match" | "partial_recall" | "extra_noise" | "section_evidence_miss" | "section_graph_miss" | "section_hierarchy_miss" | "spreadsheet_evidence_miss" | "media_evidence_miss" | "ocr_evidence_miss" | "routing_miss">;
2192
2192
  metadata?: Record<string, unknown>;
2193
2193
  };
2194
2194
  export type RAGEvaluationSummary = {
@@ -2235,7 +2235,7 @@ export type RAGEvaluationSuiteGenerationOptions = {
2235
2235
  topK?: number;
2236
2236
  scoreThreshold?: number;
2237
2237
  filter?: Record<string, unknown>;
2238
- retrieval?: RAGCollectionSearchParams['retrieval'];
2238
+ retrieval?: RAGCollectionSearchParams["retrieval"];
2239
2239
  includeGoldenSet?: boolean;
2240
2240
  hardNegativePerCase?: number;
2241
2241
  metadata?: Record<string, unknown>;
@@ -2318,16 +2318,16 @@ export type RAGEvaluationCaseDiff = {
2318
2318
  caseId: string;
2319
2319
  label?: string;
2320
2320
  query: string;
2321
- previousStatus?: RAGEvaluationCaseResult['status'];
2322
- currentStatus: RAGEvaluationCaseResult['status'];
2321
+ previousStatus?: RAGEvaluationCaseResult["status"];
2322
+ currentStatus: RAGEvaluationCaseResult["status"];
2323
2323
  previousF1?: number;
2324
2324
  currentF1: number;
2325
2325
  previousMatchedIds: string[];
2326
2326
  currentMatchedIds: string[];
2327
2327
  previousMissingIds: string[];
2328
2328
  currentMissingIds: string[];
2329
- previousFailureClasses?: NonNullable<RAGEvaluationCaseResult['failureClasses']>;
2330
- currentFailureClasses?: NonNullable<RAGEvaluationCaseResult['failureClasses']>;
2329
+ previousFailureClasses?: NonNullable<RAGEvaluationCaseResult["failureClasses"]>;
2330
+ currentFailureClasses?: NonNullable<RAGEvaluationCaseResult["failureClasses"]>;
2331
2331
  };
2332
2332
  export type RAGEvaluationRunDiff = {
2333
2333
  suiteId: string;
@@ -2377,11 +2377,11 @@ export type RAGEvaluationCaseTraceSnapshot = {
2377
2377
  corpusKey?: string;
2378
2378
  label?: string;
2379
2379
  query: string;
2380
- status: RAGEvaluationCaseResult['status'];
2380
+ status: RAGEvaluationCaseResult["status"];
2381
2381
  inputFilter?: Record<string, unknown>;
2382
2382
  previousInputFilter?: Record<string, unknown>;
2383
- inputRetrieval?: RAGCollectionSearchParams['retrieval'];
2384
- previousInputRetrieval?: RAGCollectionSearchParams['retrieval'];
2383
+ inputRetrieval?: RAGCollectionSearchParams["retrieval"];
2384
+ previousInputRetrieval?: RAGCollectionSearchParams["retrieval"];
2385
2385
  traceMode?: RAGHybridRetrievalMode;
2386
2386
  previousTraceMode?: RAGHybridRetrievalMode;
2387
2387
  sourceBalanceStrategy?: RAGSourceBalanceStrategy;
@@ -2404,10 +2404,10 @@ export type RAGEvaluationCaseTraceSnapshot = {
2404
2404
  previousTopContextLabel?: string;
2405
2405
  topLocatorLabel?: string;
2406
2406
  previousTopLocatorLabel?: string;
2407
- leadPresentationCue?: 'body' | 'notes' | 'title';
2408
- previousLeadPresentationCue?: 'body' | 'notes' | 'title';
2409
- leadSpreadsheetCue?: 'column' | 'sheet' | 'table';
2410
- previousLeadSpreadsheetCue?: 'column' | 'sheet' | 'table';
2407
+ leadPresentationCue?: "body" | "notes" | "title";
2408
+ previousLeadPresentationCue?: "body" | "notes" | "title";
2409
+ leadSpreadsheetCue?: "column" | "sheet" | "table";
2410
+ previousLeadSpreadsheetCue?: "column" | "sheet" | "table";
2411
2411
  leadSpeakerCue?: string;
2412
2412
  previousLeadSpeakerCue?: string;
2413
2413
  leadSpeakerAttributionCue?: string;
@@ -2418,10 +2418,10 @@ export type RAGEvaluationCaseTraceSnapshot = {
2418
2418
  previousLeadChannelAttributionCue?: string;
2419
2419
  leadContinuityCue?: string;
2420
2420
  previousLeadContinuityCue?: string;
2421
- sqliteQueryMode?: 'json_fallback' | 'native_vec0';
2422
- previousSqliteQueryMode?: 'json_fallback' | 'native_vec0';
2423
- sqliteQueryPushdownMode?: 'none' | 'partial' | 'full';
2424
- previousSqliteQueryPushdownMode?: 'none' | 'partial' | 'full';
2421
+ sqliteQueryMode?: "json_fallback" | "native_vec0";
2422
+ previousSqliteQueryMode?: "json_fallback" | "native_vec0";
2423
+ sqliteQueryPushdownMode?: "none" | "partial" | "full";
2424
+ previousSqliteQueryPushdownMode?: "none" | "partial" | "full";
2425
2425
  sqliteQueryPushdownApplied?: boolean;
2426
2426
  previousSqliteQueryPushdownApplied?: boolean;
2427
2427
  sqliteQueryPushdownClauseCount?: number;
@@ -2440,8 +2440,8 @@ export type RAGEvaluationCaseTraceSnapshot = {
2440
2440
  previousSqliteQueryMaxBackfillsUsed?: number;
2441
2441
  sqliteQueryMinResultsUsed?: number;
2442
2442
  previousSqliteQueryMinResultsUsed?: number;
2443
- sqliteQueryFillPolicyUsed?: 'strict_topk' | 'satisfy_min_results';
2444
- previousSqliteQueryFillPolicyUsed?: 'strict_topk' | 'satisfy_min_results';
2443
+ sqliteQueryFillPolicyUsed?: "strict_topk" | "satisfy_min_results";
2444
+ previousSqliteQueryFillPolicyUsed?: "strict_topk" | "satisfy_min_results";
2445
2445
  sqliteQueryPushdownCoverageRatio?: number;
2446
2446
  previousSqliteQueryPushdownCoverageRatio?: number;
2447
2447
  sqliteQueryJsRemainderRatio?: number;
@@ -2470,12 +2470,12 @@ export type RAGEvaluationCaseTraceSnapshot = {
2470
2470
  previousSqliteQueryUnderfilledTopK?: boolean;
2471
2471
  sqliteQueryCandidateBudgetExhausted?: boolean;
2472
2472
  previousSqliteQueryCandidateBudgetExhausted?: boolean;
2473
- sqliteQueryCandidateCoverage?: 'empty' | 'under_target' | 'target_sized' | 'broad';
2474
- previousSqliteQueryCandidateCoverage?: 'empty' | 'under_target' | 'target_sized' | 'broad';
2475
- postgresQueryMode?: 'native_pgvector';
2476
- previousPostgresQueryMode?: 'native_pgvector';
2477
- postgresQueryPushdownMode?: 'none' | 'partial' | 'full';
2478
- previousPostgresQueryPushdownMode?: 'none' | 'partial' | 'full';
2473
+ sqliteQueryCandidateCoverage?: "empty" | "under_target" | "target_sized" | "broad";
2474
+ previousSqliteQueryCandidateCoverage?: "empty" | "under_target" | "target_sized" | "broad";
2475
+ postgresQueryMode?: "native_pgvector";
2476
+ previousPostgresQueryMode?: "native_pgvector";
2477
+ postgresQueryPushdownMode?: "none" | "partial" | "full";
2478
+ previousPostgresQueryPushdownMode?: "none" | "partial" | "full";
2479
2479
  postgresQueryPushdownApplied?: boolean;
2480
2480
  previousPostgresQueryPushdownApplied?: boolean;
2481
2481
  postgresQueryPushdownClauseCount?: number;
@@ -2494,8 +2494,8 @@ export type RAGEvaluationCaseTraceSnapshot = {
2494
2494
  previousPostgresQueryMaxBackfillsUsed?: number;
2495
2495
  postgresQueryMinResultsUsed?: number;
2496
2496
  previousPostgresQueryMinResultsUsed?: number;
2497
- postgresQueryFillPolicyUsed?: 'strict_topk' | 'satisfy_min_results';
2498
- previousPostgresQueryFillPolicyUsed?: 'strict_topk' | 'satisfy_min_results';
2497
+ postgresQueryFillPolicyUsed?: "strict_topk" | "satisfy_min_results";
2498
+ previousPostgresQueryFillPolicyUsed?: "strict_topk" | "satisfy_min_results";
2499
2499
  postgresQueryPushdownCoverageRatio?: number;
2500
2500
  previousPostgresQueryPushdownCoverageRatio?: number;
2501
2501
  postgresQueryJsRemainderRatio?: number;
@@ -2524,10 +2524,10 @@ export type RAGEvaluationCaseTraceSnapshot = {
2524
2524
  previousPostgresQueryUnderfilledTopK?: boolean;
2525
2525
  postgresQueryCandidateBudgetExhausted?: boolean;
2526
2526
  previousPostgresQueryCandidateBudgetExhausted?: boolean;
2527
- postgresQueryCandidateCoverage?: 'empty' | 'under_target' | 'target_sized' | 'broad';
2528
- previousPostgresQueryCandidateCoverage?: 'empty' | 'under_target' | 'target_sized' | 'broad';
2529
- postgresIndexType?: 'none' | 'hnsw' | 'ivfflat';
2530
- previousPostgresIndexType?: 'none' | 'hnsw' | 'ivfflat';
2527
+ postgresQueryCandidateCoverage?: "empty" | "under_target" | "target_sized" | "broad";
2528
+ previousPostgresQueryCandidateCoverage?: "empty" | "under_target" | "target_sized" | "broad";
2529
+ postgresIndexType?: "none" | "hnsw" | "ivfflat";
2530
+ previousPostgresIndexType?: "none" | "hnsw" | "ivfflat";
2531
2531
  postgresIndexName?: string;
2532
2532
  previousPostgresIndexName?: string;
2533
2533
  postgresIndexPresent?: boolean;
@@ -2548,7 +2548,7 @@ export type RAGEvaluationCaseTraceSnapshot = {
2548
2548
  previousSourceAwareUnitScopeLabel?: string;
2549
2549
  stageCounts: Partial<Record<RAGRetrievalTraceStage, number>>;
2550
2550
  previousStageCounts: Partial<Record<RAGRetrievalTraceStage, number>>;
2551
- traceChange: 'new' | 'changed' | 'unchanged';
2551
+ traceChange: "new" | "changed" | "unchanged";
2552
2552
  };
2553
2553
  export type RAGEvaluationHistory = {
2554
2554
  suiteId: string;
@@ -2602,8 +2602,8 @@ export type RAGSyncSourceRunPresentation = {
2602
2602
  export type RAGSyncSourcePresentation = {
2603
2603
  id: string;
2604
2604
  label: string;
2605
- kind: RAGSyncSourceRecord['kind'];
2606
- status: RAGSyncSourceRecord['status'];
2605
+ kind: RAGSyncSourceRecord["kind"];
2606
+ status: RAGSyncSourceRecord["status"];
2607
2607
  summary: string;
2608
2608
  rows: RAGLabelValueRow[];
2609
2609
  tags?: string[];
@@ -2612,15 +2612,15 @@ export type RAGSyncSourcePresentation = {
2612
2612
  };
2613
2613
  export type RAGAdminJobPresentation = {
2614
2614
  id: string;
2615
- action: RAGAdminJobRecord['action'];
2616
- status: RAGAdminJobRecord['status'];
2615
+ action: RAGAdminJobRecord["action"];
2616
+ status: RAGAdminJobRecord["status"];
2617
2617
  summary: string;
2618
2618
  rows: RAGLabelValueRow[];
2619
2619
  };
2620
2620
  export type RAGAdminActionPresentation = {
2621
2621
  id: string;
2622
- action: RAGAdminActionRecord['action'];
2623
- status: RAGAdminActionRecord['status'];
2622
+ action: RAGAdminActionRecord["action"];
2623
+ status: RAGAdminActionRecord["status"];
2624
2624
  summary: string;
2625
2625
  rows: RAGLabelValueRow[];
2626
2626
  };
@@ -2628,7 +2628,7 @@ export type RAGEvaluationCaseTracePresentation = {
2628
2628
  caseId: string;
2629
2629
  label: string;
2630
2630
  summary: string;
2631
- traceChange: RAGEvaluationCaseTraceSnapshot['traceChange'];
2631
+ traceChange: RAGEvaluationCaseTraceSnapshot["traceChange"];
2632
2632
  rows: RAGLabelValueRow[];
2633
2633
  };
2634
2634
  export type RAGEvaluationHistoryPresentation = {
@@ -2714,7 +2714,7 @@ export type RAGAnswerGroundingHistoryPresentation = {
2714
2714
  export type RAGEvaluationEntityQualitySummary = {
2715
2715
  key: string;
2716
2716
  label: string;
2717
- entityType: 'source' | 'document';
2717
+ entityType: "source" | "document";
2718
2718
  totalCases: number;
2719
2719
  passedCases: number;
2720
2720
  partialCases: number;
@@ -2727,7 +2727,7 @@ export type RAGEvaluationEntityQualitySummary = {
2727
2727
  export type RAGAnswerGroundingEntityQualitySummary = {
2728
2728
  key: string;
2729
2729
  label: string;
2730
- entityType: 'source' | 'document';
2730
+ entityType: "source" | "document";
2731
2731
  totalCases: number;
2732
2732
  passedCases: number;
2733
2733
  partialCases: number;
@@ -2841,7 +2841,7 @@ export type RAGTraceSummaryListDelta<T extends string> = {
2841
2841
  added: T[];
2842
2842
  removed: T[];
2843
2843
  };
2844
- export type RAGTraceSummaryTrendDirection = 'flat' | 'up' | 'down';
2844
+ export type RAGTraceSummaryTrendDirection = "flat" | "up" | "down";
2845
2845
  export type RAGTraceSummaryNumericDelta = {
2846
2846
  metric: string;
2847
2847
  current: number;
@@ -2964,7 +2964,7 @@ export type RAGSearchTracePruneRun = {
2964
2964
  startedAt: number;
2965
2965
  finishedAt: number;
2966
2966
  elapsedMs: number;
2967
- trigger: 'manual' | 'write' | 'schedule';
2967
+ trigger: "manual" | "write" | "schedule";
2968
2968
  input?: RAGSearchTracePruneInput;
2969
2969
  result?: RAGSearchTracePruneResult;
2970
2970
  statsBefore?: RAGSearchTraceStats;
@@ -2975,7 +2975,7 @@ export type RAGSearchTracePruneHistoryStore = {
2975
2975
  saveRun: (run: RAGSearchTracePruneRun) => Promise<void> | void;
2976
2976
  listRuns: (input?: {
2977
2977
  limit?: number;
2978
- trigger?: RAGSearchTracePruneRun['trigger'];
2978
+ trigger?: RAGSearchTracePruneRun["trigger"];
2979
2979
  }) => Promise<RAGSearchTracePruneRun[]> | RAGSearchTracePruneRun[];
2980
2980
  };
2981
2981
  export type RAGSearchTraceDiff = {
@@ -3047,7 +3047,7 @@ export type RAGRetrievalTraceComparisonSummaryDiff = {
3047
3047
  export type RAGRetrievalCandidate = {
3048
3048
  id: string;
3049
3049
  label?: string;
3050
- retrieval?: RAGCollectionSearchParams['retrieval'];
3050
+ retrieval?: RAGCollectionSearchParams["retrieval"];
3051
3051
  queryTransform?: RAGQueryTransformProviderLike;
3052
3052
  rerank?: RAGRerankerProviderLike;
3053
3053
  };
@@ -3113,7 +3113,7 @@ export type RAGRetrievalComparison = {
3113
3113
  export type RAGRetrievalComparisonCandidateInput = {
3114
3114
  id: string;
3115
3115
  label?: string;
3116
- retrieval?: RAGCollectionSearchParams['retrieval'];
3116
+ retrieval?: RAGCollectionSearchParams["retrieval"];
3117
3117
  };
3118
3118
  export type RAGRetrievalComparisonRequest = RAGEvaluationInput & {
3119
3119
  retrievals: RAGRetrievalComparisonCandidateInput[];
@@ -3185,15 +3185,15 @@ export type RAGRetrievalBaselineGatePolicy = {
3185
3185
  minEvidenceReconcileCasesDelta?: number;
3186
3186
  maxRuntimeCandidateBudgetExhaustedCasesDelta?: number;
3187
3187
  maxRuntimeUnderfilledTopKCasesDelta?: number;
3188
- severity?: 'warn' | 'fail';
3188
+ severity?: "warn" | "fail";
3189
3189
  };
3190
3190
  export type RAGRetrievalComparisonGateResult = {
3191
- status: 'pass' | 'warn' | 'fail';
3191
+ status: "pass" | "warn" | "fail";
3192
3192
  reasons: string[];
3193
3193
  policy?: RAGRetrievalBaselineGatePolicy;
3194
3194
  };
3195
3195
  export type RAGRetrievalReleaseVerdict = {
3196
- status: 'pass' | 'warn' | 'fail' | 'needs_review';
3196
+ status: "pass" | "warn" | "fail" | "needs_review";
3197
3197
  summary: string;
3198
3198
  baselineGroupKey?: string;
3199
3199
  baselineRetrievalId?: string;
@@ -3288,8 +3288,8 @@ export type RAGRetrievalBaselineRecord = {
3288
3288
  corpusGroupKey?: string;
3289
3289
  groupKey: string;
3290
3290
  version: number;
3291
- status: 'active' | 'superseded';
3292
- rolloutLabel?: 'canary' | 'stable' | 'rollback_target';
3291
+ status: "active" | "superseded";
3292
+ rolloutLabel?: "canary" | "stable" | "rollback_target";
3293
3293
  retrievalId: string;
3294
3294
  label: string;
3295
3295
  suiteId?: string;
@@ -3310,7 +3310,7 @@ export type RAGRetrievalBaselineStore = {
3310
3310
  groupKey?: string;
3311
3311
  tag?: string;
3312
3312
  limit?: number;
3313
- status?: RAGRetrievalBaselineRecord['status'];
3313
+ status?: RAGRetrievalBaselineRecord["status"];
3314
3314
  }) => Promise<RAGRetrievalBaselineRecord[]> | RAGRetrievalBaselineRecord[];
3315
3315
  getBaseline?: (groupKey: string) => Promise<RAGRetrievalBaselineRecord | null | undefined> | RAGRetrievalBaselineRecord | null | undefined;
3316
3316
  };
@@ -3318,7 +3318,7 @@ export type RAGRetrievalBaselinePromotionRequest = {
3318
3318
  corpusGroupKey?: string;
3319
3319
  groupKey: string;
3320
3320
  retrievalId: string;
3321
- rolloutLabel?: 'canary' | 'stable' | 'rollback_target';
3321
+ rolloutLabel?: "canary" | "stable" | "rollback_target";
3322
3322
  label?: string;
3323
3323
  suiteId?: string;
3324
3324
  suiteLabel?: string;
@@ -3335,7 +3335,7 @@ export type RAGRetrievalBaselinePromotionFromRunRequest = {
3335
3335
  groupKey: string;
3336
3336
  sourceRunId: string;
3337
3337
  retrievalId?: string;
3338
- rolloutLabel?: 'canary' | 'stable' | 'rollback_target';
3338
+ rolloutLabel?: "canary" | "stable" | "rollback_target";
3339
3339
  overrideGate?: boolean;
3340
3340
  overrideReason?: string;
3341
3341
  approvedBy?: string;
@@ -3367,10 +3367,10 @@ export type RAGRetrievalBaselineListResponse = {
3367
3367
  };
3368
3368
  export type RAGRetrievalReleaseDecisionRecord = {
3369
3369
  id: string;
3370
- kind: 'approve' | 'promote' | 'reject' | 'revert';
3370
+ kind: "approve" | "promote" | "reject" | "revert";
3371
3371
  corpusGroupKey?: string;
3372
3372
  groupKey: string;
3373
- targetRolloutLabel?: RAGRetrievalBaselineRecord['rolloutLabel'];
3373
+ targetRolloutLabel?: RAGRetrievalBaselineRecord["rolloutLabel"];
3374
3374
  baselineId?: string;
3375
3375
  retrievalId: string;
3376
3376
  version?: number;
@@ -3380,21 +3380,21 @@ export type RAGRetrievalReleaseDecisionRecord = {
3380
3380
  sourceRunId?: string;
3381
3381
  restoredFromBaselineId?: string;
3382
3382
  restoredFromVersion?: number;
3383
- gateStatus?: RAGRetrievalComparisonGateResult['status'];
3383
+ gateStatus?: RAGRetrievalComparisonGateResult["status"];
3384
3384
  overrideGate?: boolean;
3385
3385
  overrideReason?: string;
3386
- freshnessStatus?: 'fresh' | 'expired' | 'not_applicable';
3386
+ freshnessStatus?: "fresh" | "expired" | "not_applicable";
3387
3387
  expiresAt?: number;
3388
3388
  ageMs?: number;
3389
3389
  };
3390
3390
  export type RAGRetrievalPromotionReadiness = {
3391
3391
  ready: boolean;
3392
3392
  reasons: string[];
3393
- targetRolloutLabel?: RAGRetrievalBaselineRecord['rolloutLabel'];
3393
+ targetRolloutLabel?: RAGRetrievalBaselineRecord["rolloutLabel"];
3394
3394
  sourceRunId?: string;
3395
3395
  baselineRetrievalId?: string;
3396
3396
  candidateRetrievalId?: string;
3397
- gateStatus?: RAGRetrievalComparisonGateResult['status'];
3397
+ gateStatus?: RAGRetrievalComparisonGateResult["status"];
3398
3398
  requiresApproval?: boolean;
3399
3399
  requiresOverride?: boolean;
3400
3400
  effectiveReleasePolicy?: RAGRetrievalReleasePolicy;
@@ -3407,12 +3407,12 @@ export type RAGRetrievalPromotionCandidate = {
3407
3407
  suiteId: string;
3408
3408
  suiteLabel: string;
3409
3409
  finishedAt: number;
3410
- targetRolloutLabel?: RAGRetrievalBaselineRecord['rolloutLabel'];
3410
+ targetRolloutLabel?: RAGRetrievalBaselineRecord["rolloutLabel"];
3411
3411
  candidateRetrievalId?: string;
3412
3412
  baselineRetrievalId?: string;
3413
- gateStatus?: RAGRetrievalComparisonGateResult['status'];
3414
- reviewStatus: 'approved' | 'blocked' | 'needs_review' | 'ready';
3415
- priority: 'ready_now' | 'needs_review' | 'gate_warn' | 'gate_fail' | 'blocked';
3413
+ gateStatus?: RAGRetrievalComparisonGateResult["status"];
3414
+ reviewStatus: "approved" | "blocked" | "needs_review" | "ready";
3415
+ priority: "ready_now" | "needs_review" | "gate_warn" | "gate_fail" | "blocked";
3416
3416
  priorityScore: number;
3417
3417
  sortReason: string;
3418
3418
  ready: boolean;
@@ -3421,13 +3421,13 @@ export type RAGRetrievalPromotionCandidate = {
3421
3421
  approved: boolean;
3422
3422
  approvedAt?: number;
3423
3423
  approvedBy?: string;
3424
- approvalFreshnessStatus?: 'fresh' | 'expired' | 'not_applicable';
3424
+ approvalFreshnessStatus?: "fresh" | "expired" | "not_applicable";
3425
3425
  approvalExpiresAt?: number;
3426
3426
  approvalAgeMs?: number;
3427
3427
  effectiveReleasePolicy?: RAGRetrievalReleasePolicy;
3428
3428
  effectiveBaselineGatePolicy?: RAGRetrievalBaselineGatePolicy;
3429
3429
  delta?: RAGRetrievalComparisonDecisionDelta;
3430
- releaseVerdictStatus?: RAGRetrievalReleaseVerdict['status'];
3430
+ releaseVerdictStatus?: RAGRetrievalReleaseVerdict["status"];
3431
3431
  tags?: string[];
3432
3432
  };
3433
3433
  export type RAGRetrievalReleasePolicy = {
@@ -3436,19 +3436,19 @@ export type RAGRetrievalReleasePolicy = {
3436
3436
  };
3437
3437
  export type RAGRetrievalReleaseLanePolicySummary = RAGRetrievalReleasePolicy & {
3438
3438
  groupKey?: string;
3439
- rolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3440
- scope: 'rollout_label' | 'group_rollout_label';
3439
+ rolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3440
+ scope: "rollout_label" | "group_rollout_label";
3441
3441
  };
3442
3442
  export type RAGRetrievalReleaseLanePolicyHistoryRecord = {
3443
3443
  id: string;
3444
3444
  corpusGroupKey?: string;
3445
3445
  groupKey?: string;
3446
- rolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3447
- scope: 'rollout_label' | 'group_rollout_label';
3446
+ rolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3447
+ scope: "rollout_label" | "group_rollout_label";
3448
3448
  requireApprovalBeforePromotion?: boolean;
3449
3449
  approvalMaxAgeMs?: number;
3450
3450
  recordedAt: number;
3451
- changeKind: 'snapshot' | 'changed';
3451
+ changeKind: "snapshot" | "changed";
3452
3452
  previousRequireApprovalBeforePromotion?: boolean;
3453
3453
  previousApprovalMaxAgeMs?: number;
3454
3454
  };
@@ -3458,8 +3458,8 @@ export type RAGRetrievalReleaseLanePolicyHistoryStore = {
3458
3458
  corpusGroupKey?: string;
3459
3459
  groupKey?: string;
3460
3460
  limit?: number;
3461
- rolloutLabel?: RAGRetrievalReleaseLanePolicyHistoryRecord['rolloutLabel'];
3462
- scope?: RAGRetrievalReleaseLanePolicyHistoryRecord['scope'];
3461
+ rolloutLabel?: RAGRetrievalReleaseLanePolicyHistoryRecord["rolloutLabel"];
3462
+ scope?: RAGRetrievalReleaseLanePolicyHistoryRecord["scope"];
3463
3463
  }) => Promise<RAGRetrievalReleaseLanePolicyHistoryRecord[]> | RAGRetrievalReleaseLanePolicyHistoryRecord[];
3464
3464
  };
3465
3465
  export type RAGRetrievalReleaseLanePolicyHistoryResponse = {
@@ -3469,19 +3469,19 @@ export type RAGRetrievalReleaseLanePolicyHistoryResponse = {
3469
3469
  };
3470
3470
  export type RAGRetrievalBaselineGatePolicySummary = {
3471
3471
  groupKey?: string;
3472
- rolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3473
- scope: 'rollout_label' | 'group_rollout_label';
3472
+ rolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3473
+ scope: "rollout_label" | "group_rollout_label";
3474
3474
  policy: RAGRetrievalBaselineGatePolicy;
3475
3475
  };
3476
3476
  export type RAGRetrievalBaselineGatePolicyHistoryRecord = {
3477
3477
  id: string;
3478
3478
  corpusGroupKey?: string;
3479
3479
  groupKey?: string;
3480
- rolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3481
- scope: 'rollout_label' | 'group_rollout_label';
3480
+ rolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3481
+ scope: "rollout_label" | "group_rollout_label";
3482
3482
  policy: RAGRetrievalBaselineGatePolicy;
3483
3483
  recordedAt: number;
3484
- changeKind: 'snapshot' | 'changed';
3484
+ changeKind: "snapshot" | "changed";
3485
3485
  previousPolicy?: RAGRetrievalBaselineGatePolicy;
3486
3486
  };
3487
3487
  export type RAGRetrievalBaselineGatePolicyHistoryStore = {
@@ -3490,8 +3490,8 @@ export type RAGRetrievalBaselineGatePolicyHistoryStore = {
3490
3490
  corpusGroupKey?: string;
3491
3491
  groupKey?: string;
3492
3492
  limit?: number;
3493
- rolloutLabel?: RAGRetrievalBaselineGatePolicyHistoryRecord['rolloutLabel'];
3494
- scope?: RAGRetrievalBaselineGatePolicyHistoryRecord['scope'];
3493
+ rolloutLabel?: RAGRetrievalBaselineGatePolicyHistoryRecord["rolloutLabel"];
3494
+ scope?: RAGRetrievalBaselineGatePolicyHistoryRecord["scope"];
3495
3495
  }) => Promise<RAGRetrievalBaselineGatePolicyHistoryRecord[]> | RAGRetrievalBaselineGatePolicyHistoryRecord[];
3496
3496
  };
3497
3497
  export type RAGRetrievalBaselineGatePolicyHistoryResponse = {
@@ -3511,10 +3511,10 @@ export type RAGRetrievalIncidentRemediationDecisionRecord = {
3511
3511
  incidentId: string;
3512
3512
  idempotencyKey?: string;
3513
3513
  groupKey: string;
3514
- targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord['targetRolloutLabel'];
3515
- incidentKind?: RAGRetrievalReleaseIncidentRecord['kind'];
3516
- remediationKind: RAGRemediationStep['kind'];
3517
- status: 'planned' | 'applied' | 'dismissed';
3514
+ targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord["targetRolloutLabel"];
3515
+ incidentKind?: RAGRetrievalReleaseIncidentRecord["kind"];
3516
+ remediationKind: RAGRemediationStep["kind"];
3517
+ status: "planned" | "applied" | "dismissed";
3518
3518
  decidedAt: number;
3519
3519
  decidedBy?: string;
3520
3520
  notes?: string;
@@ -3522,8 +3522,8 @@ export type RAGRetrievalIncidentRemediationDecisionRecord = {
3522
3522
  };
3523
3523
  export type RAGRetrievalIncidentRemediationDecisionRequest = {
3524
3524
  incidentId: string;
3525
- remediationKind: RAGRemediationStep['kind'];
3526
- status?: RAGRetrievalIncidentRemediationDecisionRecord['status'];
3525
+ remediationKind: RAGRemediationStep["kind"];
3526
+ status?: RAGRetrievalIncidentRemediationDecisionRecord["status"];
3527
3527
  decidedAt?: number;
3528
3528
  decidedBy?: string;
3529
3529
  notes?: string;
@@ -3536,9 +3536,9 @@ export type RAGRetrievalIncidentRemediationDecisionStore = {
3536
3536
  groupKey?: string;
3537
3537
  incidentId?: string;
3538
3538
  limit?: number;
3539
- remediationKind?: RAGRetrievalIncidentRemediationDecisionRecord['remediationKind'];
3540
- status?: RAGRetrievalIncidentRemediationDecisionRecord['status'];
3541
- targetRolloutLabel?: RAGRetrievalIncidentRemediationDecisionRecord['targetRolloutLabel'];
3539
+ remediationKind?: RAGRetrievalIncidentRemediationDecisionRecord["remediationKind"];
3540
+ status?: RAGRetrievalIncidentRemediationDecisionRecord["status"];
3541
+ targetRolloutLabel?: RAGRetrievalIncidentRemediationDecisionRecord["targetRolloutLabel"];
3542
3542
  }) => Promise<RAGRetrievalIncidentRemediationDecisionRecord[]> | RAGRetrievalIncidentRemediationDecisionRecord[];
3543
3543
  };
3544
3544
  export type RAGRetrievalIncidentRemediationDecisionListResponse = {
@@ -3549,14 +3549,14 @@ export type RAGRetrievalIncidentRemediationDecisionListResponse = {
3549
3549
  export type RAGRetrievalIncidentRemediationExecutionRequest = {
3550
3550
  incidentId?: string;
3551
3551
  idempotencyKey?: string;
3552
- remediationKind?: RAGRemediationStep['kind'];
3552
+ remediationKind?: RAGRemediationStep["kind"];
3553
3553
  decidedAt?: number;
3554
3554
  decidedBy?: string;
3555
3555
  notes?: string;
3556
3556
  persistDecision?: boolean;
3557
3557
  action: RAGRemediationAction;
3558
3558
  };
3559
- export type RAGRetrievalIncidentRemediationExecutionCode = 'approval_recorded' | 'incident_acknowledged' | 'incident_resolved' | 'release_status_loaded' | 'release_drift_loaded' | 'handoff_status_loaded' | 'guardrail_blocked' | 'idempotent_replay';
3559
+ export type RAGRetrievalIncidentRemediationExecutionCode = "approval_recorded" | "incident_acknowledged" | "incident_resolved" | "release_status_loaded" | "release_drift_loaded" | "handoff_status_loaded" | "guardrail_blocked" | "idempotent_replay";
3560
3560
  export type RAGRetrievalIncidentRemediationExecutionResult = {
3561
3561
  action: RAGRemediationAction;
3562
3562
  code: RAGRetrievalIncidentRemediationExecutionCode;
@@ -3580,9 +3580,9 @@ export type RAGRetrievalIncidentRemediationExecutionHistoryRecord = {
3580
3580
  executedAt: number;
3581
3581
  groupKey?: string;
3582
3582
  incidentId?: string;
3583
- incidentKind?: RAGRetrievalReleaseIncidentRecord['kind'];
3584
- targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord['targetRolloutLabel'];
3585
- remediationKind?: RAGRemediationStep['kind'];
3583
+ incidentKind?: RAGRetrievalReleaseIncidentRecord["kind"];
3584
+ targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord["targetRolloutLabel"];
3585
+ remediationKind?: RAGRemediationStep["kind"];
3586
3586
  action: RAGRemediationAction;
3587
3587
  code: RAGRetrievalIncidentRemediationExecutionCode;
3588
3588
  ok: boolean;
@@ -3591,7 +3591,7 @@ export type RAGRetrievalIncidentRemediationExecutionHistoryRecord = {
3591
3591
  idempotentReplay?: boolean;
3592
3592
  mutationSkipped?: boolean;
3593
3593
  blockedByGuardrail?: boolean;
3594
- guardrailKind?: 'bulk_mutation_opt_in_required' | 'bulk_missing_idempotency_key';
3594
+ guardrailKind?: "bulk_mutation_opt_in_required" | "bulk_missing_idempotency_key";
3595
3595
  bulkExecutionId?: string;
3596
3596
  bulkIndex?: number;
3597
3597
  };
@@ -3601,11 +3601,11 @@ export type RAGRetrievalIncidentRemediationExecutionHistoryStore = {
3601
3601
  groupKey?: string;
3602
3602
  incidentId?: string;
3603
3603
  limit?: number;
3604
- actionKind?: RAGRemediationAction['kind'];
3604
+ actionKind?: RAGRemediationAction["kind"];
3605
3605
  code?: RAGRetrievalIncidentRemediationExecutionCode;
3606
3606
  blockedByGuardrail?: boolean;
3607
3607
  idempotentReplay?: boolean;
3608
- targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord['targetRolloutLabel'];
3608
+ targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord["targetRolloutLabel"];
3609
3609
  }) => Promise<RAGRetrievalIncidentRemediationExecutionHistoryRecord[]> | RAGRetrievalIncidentRemediationExecutionHistoryRecord[];
3610
3610
  };
3611
3611
  export type RAGRetrievalIncidentRemediationExecutionHistoryResponse = {
@@ -3642,9 +3642,9 @@ export type RAGRetrievalIncidentRemediationBulkExecutionResponse = {
3642
3642
  export type RAGRetrievalReleaseGroupSummary = {
3643
3643
  corpusGroupKey?: string;
3644
3644
  groupKey: string;
3645
- classification?: 'general' | 'multivector' | 'runtime' | 'evidence' | 'cue';
3646
- escalationSeverity: 'none' | 'info' | 'warning' | 'critical';
3647
- recommendedAction: 'promote_candidate' | 'renew_approval' | 'await_approval' | 'investigate_regression' | 'monitor';
3645
+ classification?: "general" | "multivector" | "runtime" | "evidence" | "cue";
3646
+ escalationSeverity: "none" | "info" | "warning" | "critical";
3647
+ recommendedAction: "promote_candidate" | "renew_approval" | "await_approval" | "investigate_regression" | "monitor";
3648
3648
  recommendedActionReasons: string[];
3649
3649
  approvalRequired: boolean;
3650
3650
  approvalMaxAgeMs?: number;
@@ -3653,8 +3653,8 @@ export type RAGRetrievalReleaseGroupSummary = {
3653
3653
  actionRequiredReasons: string[];
3654
3654
  activeBaselineRetrievalId?: string;
3655
3655
  activeBaselineVersion?: number;
3656
- activeBaselineRolloutLabel?: 'canary' | 'stable' | 'rollback_target';
3657
- latestDecisionKind?: RAGRetrievalReleaseDecisionRecord['kind'];
3656
+ activeBaselineRolloutLabel?: "canary" | "stable" | "rollback_target";
3657
+ latestDecisionKind?: RAGRetrievalReleaseDecisionRecord["kind"];
3658
3658
  latestDecisionAt?: number;
3659
3659
  latestRejectedCandidateRetrievalId?: string;
3660
3660
  pendingCandidateCount: number;
@@ -3670,41 +3670,41 @@ export type RAGRetrievalReleaseTimelineSummary = {
3670
3670
  lastPromotedAt?: number;
3671
3671
  lastRejectedAt?: number;
3672
3672
  lastRevertedAt?: number;
3673
- latestDecisionKind?: RAGRetrievalReleaseDecisionRecord['kind'];
3673
+ latestDecisionKind?: RAGRetrievalReleaseDecisionRecord["kind"];
3674
3674
  latestDecisionAt?: number;
3675
- latestDecisionFreshnessStatus?: RAGRetrievalReleaseDecisionRecord['freshnessStatus'];
3675
+ latestDecisionFreshnessStatus?: RAGRetrievalReleaseDecisionRecord["freshnessStatus"];
3676
3676
  };
3677
3677
  export type RAGRetrievalReleaseLaneTimelineSummary = {
3678
3678
  corpusGroupKey?: string;
3679
3679
  groupKey: string;
3680
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3680
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3681
3681
  lastApprovedAt?: number;
3682
3682
  lastPromotedAt?: number;
3683
3683
  lastRejectedAt?: number;
3684
3684
  lastRevertedAt?: number;
3685
- latestDecisionKind?: RAGRetrievalReleaseDecisionRecord['kind'];
3685
+ latestDecisionKind?: RAGRetrievalReleaseDecisionRecord["kind"];
3686
3686
  latestDecisionAt?: number;
3687
- latestDecisionFreshnessStatus?: RAGRetrievalReleaseDecisionRecord['freshnessStatus'];
3687
+ latestDecisionFreshnessStatus?: RAGRetrievalReleaseDecisionRecord["freshnessStatus"];
3688
3688
  };
3689
3689
  export type RAGRetrievalReleaseLaneDecisionSummary = {
3690
3690
  corpusGroupKey?: string;
3691
3691
  groupKey: string;
3692
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3692
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3693
3693
  decisionCount: number;
3694
3694
  approvalCount: number;
3695
3695
  promotionCount: number;
3696
3696
  rejectionCount: number;
3697
3697
  revertCount: number;
3698
- latestDecisionKind?: RAGRetrievalReleaseDecisionRecord['kind'];
3698
+ latestDecisionKind?: RAGRetrievalReleaseDecisionRecord["kind"];
3699
3699
  latestDecisionAt?: number;
3700
3700
  latestDecisionBy?: string;
3701
3701
  };
3702
3702
  export type RAGRetrievalReleaseApprovalScopeSummary = {
3703
3703
  corpusGroupKey?: string;
3704
3704
  groupKey: string;
3705
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3706
- status: 'approved' | 'rejected' | 'none';
3707
- latestDecisionKind?: 'approve' | 'reject';
3705
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3706
+ status: "approved" | "rejected" | "none";
3707
+ latestDecisionKind?: "approve" | "reject";
3708
3708
  latestDecisionAt?: number;
3709
3709
  latestApprovedAt?: number;
3710
3710
  latestApprovedBy?: string;
@@ -3714,27 +3714,27 @@ export type RAGRetrievalReleaseApprovalScopeSummary = {
3714
3714
  export type RAGRetrievalReleaseLaneEscalationPolicySummary = {
3715
3715
  corpusGroupKey?: string;
3716
3716
  groupKey: string;
3717
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3718
- openIncidentSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3719
- regressionSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3720
- gateFailureSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3721
- approvalExpiredSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3717
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3718
+ openIncidentSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3719
+ regressionSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3720
+ gateFailureSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3721
+ approvalExpiredSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3722
3722
  };
3723
3723
  export type RAGRetrievalReleaseLaneEscalationPolicyHistoryRecord = {
3724
3724
  id: string;
3725
3725
  corpusGroupKey?: string;
3726
3726
  groupKey: string;
3727
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3728
- openIncidentSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3729
- regressionSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3730
- gateFailureSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3731
- approvalExpiredSeverity: RAGRetrievalReleaseIncidentRecord['severity'];
3727
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3728
+ openIncidentSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3729
+ regressionSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3730
+ gateFailureSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3731
+ approvalExpiredSeverity: RAGRetrievalReleaseIncidentRecord["severity"];
3732
3732
  recordedAt: number;
3733
- changeKind: 'snapshot' | 'changed';
3734
- previousOpenIncidentSeverity?: RAGRetrievalReleaseIncidentRecord['severity'];
3735
- previousRegressionSeverity?: RAGRetrievalReleaseIncidentRecord['severity'];
3736
- previousGateFailureSeverity?: RAGRetrievalReleaseIncidentRecord['severity'];
3737
- previousApprovalExpiredSeverity?: RAGRetrievalReleaseIncidentRecord['severity'];
3733
+ changeKind: "snapshot" | "changed";
3734
+ previousOpenIncidentSeverity?: RAGRetrievalReleaseIncidentRecord["severity"];
3735
+ previousRegressionSeverity?: RAGRetrievalReleaseIncidentRecord["severity"];
3736
+ previousGateFailureSeverity?: RAGRetrievalReleaseIncidentRecord["severity"];
3737
+ previousApprovalExpiredSeverity?: RAGRetrievalReleaseIncidentRecord["severity"];
3738
3738
  };
3739
3739
  export type RAGRetrievalReleaseLaneEscalationPolicyHistoryStore = {
3740
3740
  saveRecord: (record: RAGRetrievalReleaseLaneEscalationPolicyHistoryRecord) => Promise<void> | void;
@@ -3742,7 +3742,7 @@ export type RAGRetrievalReleaseLaneEscalationPolicyHistoryStore = {
3742
3742
  corpusGroupKey?: string;
3743
3743
  groupKey?: string;
3744
3744
  limit?: number;
3745
- targetRolloutLabel?: RAGRetrievalReleaseLaneEscalationPolicyHistoryRecord['targetRolloutLabel'];
3745
+ targetRolloutLabel?: RAGRetrievalReleaseLaneEscalationPolicyHistoryRecord["targetRolloutLabel"];
3746
3746
  }) => Promise<RAGRetrievalReleaseLaneEscalationPolicyHistoryRecord[]> | RAGRetrievalReleaseLaneEscalationPolicyHistoryRecord[];
3747
3747
  };
3748
3748
  export type RAGRetrievalReleaseLaneEscalationPolicyHistoryResponse = {
@@ -3753,10 +3753,10 @@ export type RAGRetrievalReleaseLaneEscalationPolicyHistoryResponse = {
3753
3753
  export type RAGRetrievalReleaseLaneAuditSummary = {
3754
3754
  corpusGroupKey?: string;
3755
3755
  groupKey: string;
3756
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3756
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3757
3757
  activeBaselineRetrievalId?: string;
3758
3758
  activeBaselineVersion?: number;
3759
- latestDecisionKind?: RAGRetrievalReleaseDecisionRecord['kind'];
3759
+ latestDecisionKind?: RAGRetrievalReleaseDecisionRecord["kind"];
3760
3760
  latestDecisionAt?: number;
3761
3761
  lastApprovedAt?: number;
3762
3762
  lastApprovedBy?: string;
@@ -3770,28 +3770,28 @@ export type RAGRetrievalReleaseLaneAuditSummary = {
3770
3770
  export type RAGRetrievalReleaseLaneRecommendationSummary = {
3771
3771
  corpusGroupKey?: string;
3772
3772
  groupKey: string;
3773
- classification?: 'general' | 'multivector' | 'runtime' | 'evidence' | 'cue';
3774
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3775
- recommendedAction: 'promote_candidate' | 'renew_approval' | 'await_approval' | 'investigate_regression' | 'monitor';
3773
+ classification?: "general" | "multivector" | "runtime" | "evidence" | "cue";
3774
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3775
+ recommendedAction: "promote_candidate" | "renew_approval" | "await_approval" | "investigate_regression" | "monitor";
3776
3776
  recommendedActionReasons: string[];
3777
3777
  ready: boolean;
3778
3778
  requiresApproval: boolean;
3779
3779
  requiresOverride?: boolean;
3780
- reviewStatus?: RAGRetrievalPromotionCandidate['reviewStatus'];
3781
- gateStatus?: RAGRetrievalPromotionCandidate['gateStatus'];
3780
+ reviewStatus?: RAGRetrievalPromotionCandidate["reviewStatus"];
3781
+ gateStatus?: RAGRetrievalPromotionCandidate["gateStatus"];
3782
3782
  candidateRetrievalId?: string;
3783
3783
  baselineRetrievalId?: string;
3784
3784
  sourceRunId?: string;
3785
- effectiveReleasePolicy?: RAGRetrievalPromotionCandidate['effectiveReleasePolicy'];
3786
- effectiveBaselineGatePolicy?: RAGRetrievalPromotionCandidate['effectiveBaselineGatePolicy'];
3785
+ effectiveReleasePolicy?: RAGRetrievalPromotionCandidate["effectiveReleasePolicy"];
3786
+ effectiveBaselineGatePolicy?: RAGRetrievalPromotionCandidate["effectiveBaselineGatePolicy"];
3787
3787
  remediationActions?: string[];
3788
3788
  remediationSteps?: RAGRemediationStep[];
3789
3789
  };
3790
3790
  export type RAGRetrievalReleaseLaneHandoffSummary = {
3791
3791
  corpusGroupKey?: string;
3792
3792
  groupKey: string;
3793
- sourceRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3794
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3793
+ sourceRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3794
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3795
3795
  sourceBaselineRetrievalId?: string;
3796
3796
  targetBaselineRetrievalId?: string;
3797
3797
  candidateRetrievalId?: string;
@@ -3810,19 +3810,19 @@ export type RAGRetrievalReleaseLaneHandoffSummary = {
3810
3810
  };
3811
3811
  export type RAGRetrievalLanePromotionStateSummary = {
3812
3812
  groupKey: string;
3813
- classification?: 'general' | 'multivector' | 'runtime' | 'evidence' | 'cue';
3814
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3813
+ classification?: "general" | "multivector" | "runtime" | "evidence" | "cue";
3814
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3815
3815
  baselineRetrievalId?: string;
3816
3816
  candidateRetrievalId?: string;
3817
3817
  sourceRunId?: string;
3818
3818
  ready: boolean;
3819
3819
  reasons: string[];
3820
- gateStatus?: RAGRetrievalPromotionCandidate['gateStatus'];
3821
- reviewStatus?: RAGRetrievalPromotionCandidate['reviewStatus'];
3820
+ gateStatus?: RAGRetrievalPromotionCandidate["gateStatus"];
3821
+ reviewStatus?: RAGRetrievalPromotionCandidate["reviewStatus"];
3822
3822
  requiresApproval: boolean;
3823
3823
  requiresOverride?: boolean;
3824
- effectiveReleasePolicy?: RAGRetrievalPromotionCandidate['effectiveReleasePolicy'];
3825
- effectiveBaselineGatePolicy?: RAGRetrievalPromotionCandidate['effectiveBaselineGatePolicy'];
3824
+ effectiveReleasePolicy?: RAGRetrievalPromotionCandidate["effectiveReleasePolicy"];
3825
+ effectiveBaselineGatePolicy?: RAGRetrievalPromotionCandidate["effectiveBaselineGatePolicy"];
3826
3826
  remediationActions?: string[];
3827
3827
  remediationSteps?: RAGRemediationStep[];
3828
3828
  };
@@ -3830,10 +3830,10 @@ export type RAGRetrievalReleaseIncidentRecord = {
3830
3830
  id: string;
3831
3831
  groupKey: string;
3832
3832
  corpusGroupKey?: string;
3833
- targetRolloutLabel?: RAGRetrievalBaselineRecord['rolloutLabel'];
3834
- severity: 'warning' | 'critical';
3835
- status: 'open' | 'resolved';
3836
- kind: 'approval_expired' | 'baseline_regression' | 'gate_failure' | 'handoff_stale';
3833
+ targetRolloutLabel?: RAGRetrievalBaselineRecord["rolloutLabel"];
3834
+ severity: "warning" | "critical";
3835
+ status: "open" | "resolved";
3836
+ kind: "approval_expired" | "baseline_regression" | "gate_failure" | "handoff_stale";
3837
3837
  message: string;
3838
3838
  triggeredAt: number;
3839
3839
  resolvedAt?: number;
@@ -3844,25 +3844,25 @@ export type RAGRetrievalReleaseIncidentRecord = {
3844
3844
  acknowledgedBy?: string;
3845
3845
  acknowledgementNotes?: string;
3846
3846
  notes?: string;
3847
- classification?: 'general' | 'multivector' | 'runtime' | 'evidence' | 'cue';
3847
+ classification?: "general" | "multivector" | "runtime" | "evidence" | "cue";
3848
3848
  };
3849
- export type RAGRetrievalLaneHandoffIncidentRecord = Omit<RAGRetrievalReleaseIncidentRecord, 'kind'> & {
3849
+ export type RAGRetrievalLaneHandoffIncidentRecord = Omit<RAGRetrievalReleaseIncidentRecord, "kind"> & {
3850
3850
  corpusGroupKey?: string;
3851
- kind: 'handoff_stale';
3852
- sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord['sourceRolloutLabel'];
3851
+ kind: "handoff_stale";
3852
+ sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord["sourceRolloutLabel"];
3853
3853
  };
3854
3854
  export type RAGRetrievalReleaseLaneIncidentSummary = {
3855
3855
  corpusGroupKey?: string;
3856
3856
  groupKey: string;
3857
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
3857
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
3858
3858
  openCount: number;
3859
3859
  resolvedCount: number;
3860
3860
  acknowledgedOpenCount: number;
3861
3861
  unacknowledgedOpenCount: number;
3862
3862
  latestTriggeredAt?: number;
3863
3863
  latestResolvedAt?: number;
3864
- latestKind?: RAGRetrievalReleaseIncidentRecord['kind'];
3865
- highestSeverity?: RAGRetrievalReleaseIncidentRecord['severity'];
3864
+ latestKind?: RAGRetrievalReleaseIncidentRecord["kind"];
3865
+ highestSeverity?: RAGRetrievalReleaseIncidentRecord["severity"];
3866
3866
  };
3867
3867
  export type RAGRetrievalReleaseIncidentAcknowledgeRequest = {
3868
3868
  incidentId: string;
@@ -3885,9 +3885,9 @@ export type RAGRetrievalReleaseIncidentStore = {
3885
3885
  corpusGroupKey?: string;
3886
3886
  groupKey?: string;
3887
3887
  limit?: number;
3888
- targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord['targetRolloutLabel'];
3889
- status?: RAGRetrievalReleaseIncidentRecord['status'];
3890
- severity?: RAGRetrievalReleaseIncidentRecord['severity'];
3888
+ targetRolloutLabel?: RAGRetrievalReleaseIncidentRecord["targetRolloutLabel"];
3889
+ status?: RAGRetrievalReleaseIncidentRecord["status"];
3890
+ severity?: RAGRetrievalReleaseIncidentRecord["severity"];
3891
3891
  }) => Promise<RAGRetrievalReleaseIncidentRecord[]> | RAGRetrievalReleaseIncidentRecord[];
3892
3892
  };
3893
3893
  export type RAGRetrievalLaneHandoffIncidentStore = {
@@ -3896,9 +3896,9 @@ export type RAGRetrievalLaneHandoffIncidentStore = {
3896
3896
  corpusGroupKey?: string;
3897
3897
  groupKey?: string;
3898
3898
  limit?: number;
3899
- targetRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord['targetRolloutLabel'];
3900
- status?: RAGRetrievalLaneHandoffIncidentRecord['status'];
3901
- severity?: RAGRetrievalLaneHandoffIncidentRecord['severity'];
3899
+ targetRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord["targetRolloutLabel"];
3900
+ status?: RAGRetrievalLaneHandoffIncidentRecord["status"];
3901
+ severity?: RAGRetrievalLaneHandoffIncidentRecord["severity"];
3902
3902
  }) => Promise<RAGRetrievalLaneHandoffIncidentRecord[]> | RAGRetrievalLaneHandoffIncidentRecord[];
3903
3903
  };
3904
3904
  export type RAGRetrievalLaneHandoffIncidentListResponse = {
@@ -3911,15 +3911,15 @@ export type RAGRetrievalLaneHandoffIncidentHistoryRecord = {
3911
3911
  incidentId: string;
3912
3912
  corpusGroupKey?: string;
3913
3913
  groupKey: string;
3914
- kind: 'handoff_stale';
3915
- targetRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord['targetRolloutLabel'];
3916
- sourceRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord['sourceRolloutLabel'];
3917
- action: 'opened' | 'acknowledged' | 'unacknowledged' | 'resolved';
3914
+ kind: "handoff_stale";
3915
+ targetRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord["targetRolloutLabel"];
3916
+ sourceRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord["sourceRolloutLabel"];
3917
+ action: "opened" | "acknowledged" | "unacknowledged" | "resolved";
3918
3918
  recordedAt: number;
3919
3919
  recordedBy?: string;
3920
3920
  notes?: string;
3921
- status?: RAGRetrievalLaneHandoffIncidentRecord['status'];
3922
- severity?: RAGRetrievalLaneHandoffIncidentRecord['severity'];
3921
+ status?: RAGRetrievalLaneHandoffIncidentRecord["status"];
3922
+ severity?: RAGRetrievalLaneHandoffIncidentRecord["severity"];
3923
3923
  };
3924
3924
  export type RAGRetrievalLaneHandoffIncidentHistoryStore = {
3925
3925
  saveRecord: (record: RAGRetrievalLaneHandoffIncidentHistoryRecord) => Promise<void> | void;
@@ -3928,8 +3928,8 @@ export type RAGRetrievalLaneHandoffIncidentHistoryStore = {
3928
3928
  groupKey?: string;
3929
3929
  incidentId?: string;
3930
3930
  limit?: number;
3931
- targetRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord['targetRolloutLabel'];
3932
- action?: RAGRetrievalLaneHandoffIncidentHistoryRecord['action'];
3931
+ targetRolloutLabel?: RAGRetrievalLaneHandoffIncidentRecord["targetRolloutLabel"];
3932
+ action?: RAGRetrievalLaneHandoffIncidentHistoryRecord["action"];
3933
3933
  }) => Promise<RAGRetrievalLaneHandoffIncidentHistoryRecord[]> | RAGRetrievalLaneHandoffIncidentHistoryRecord[];
3934
3934
  };
3935
3935
  export type RAGRetrievalLaneHandoffIncidentHistoryResponse = {
@@ -3943,20 +3943,20 @@ export type RAGRetrievalLaneHandoffAutoCompletePolicy = {
3943
3943
  };
3944
3944
  export type RAGRetrievalLaneHandoffAutoCompletePolicySummary = {
3945
3945
  groupKey: string;
3946
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
3946
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
3947
3947
  enabled: boolean;
3948
3948
  maxApprovedDecisionAgeMs?: number;
3949
- scope: 'group_target_rollout_label';
3949
+ scope: "group_target_rollout_label";
3950
3950
  };
3951
3951
  export type RAGRetrievalLaneHandoffAutoCompletePolicyHistoryRecord = {
3952
3952
  id: string;
3953
3953
  corpusGroupKey?: string;
3954
3954
  groupKey: string;
3955
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
3955
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
3956
3956
  enabled: boolean;
3957
3957
  maxApprovedDecisionAgeMs?: number;
3958
3958
  recordedAt: number;
3959
- changeKind: 'snapshot' | 'changed';
3959
+ changeKind: "snapshot" | "changed";
3960
3960
  previousEnabled?: boolean;
3961
3961
  previousMaxApprovedDecisionAgeMs?: number;
3962
3962
  };
@@ -3966,7 +3966,7 @@ export type RAGRetrievalLaneHandoffAutoCompletePolicyHistoryStore = {
3966
3966
  corpusGroupKey?: string;
3967
3967
  groupKey?: string;
3968
3968
  limit?: number;
3969
- targetRolloutLabel?: RAGRetrievalLaneHandoffAutoCompletePolicyHistoryRecord['targetRolloutLabel'];
3969
+ targetRolloutLabel?: RAGRetrievalLaneHandoffAutoCompletePolicyHistoryRecord["targetRolloutLabel"];
3970
3970
  }) => Promise<RAGRetrievalLaneHandoffAutoCompletePolicyHistoryRecord[]> | RAGRetrievalLaneHandoffAutoCompletePolicyHistoryRecord[];
3971
3971
  };
3972
3972
  export type RAGRetrievalLaneHandoffAutoCompletePolicyHistoryResponse = {
@@ -3976,7 +3976,7 @@ export type RAGRetrievalLaneHandoffAutoCompletePolicyHistoryResponse = {
3976
3976
  };
3977
3977
  export type RAGRetrievalLaneAutoCompleteSafetySummary = {
3978
3978
  groupKey: string;
3979
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
3979
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
3980
3980
  safe: boolean;
3981
3981
  enabled: boolean;
3982
3982
  reasons: string[];
@@ -3984,21 +3984,21 @@ export type RAGRetrievalLaneAutoCompleteSafetySummary = {
3984
3984
  sourceRunId?: string;
3985
3985
  latestApprovedAt?: number;
3986
3986
  approvalExpiresAt?: number;
3987
- freshnessStatus: 'fresh' | 'expired' | 'not_applicable';
3987
+ freshnessStatus: "fresh" | "expired" | "not_applicable";
3988
3988
  };
3989
3989
  export type RAGRetrievalLaneHandoffDriftRollup = {
3990
- kind: 'handoff_auto_complete_policy_drift' | 'handoff_auto_complete_stale_approval' | 'handoff_auto_complete_source_lane_missing' | 'handoff_auto_complete_gate_blocked' | 'handoff_auto_complete_approval_missing';
3991
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
3990
+ kind: "handoff_auto_complete_policy_drift" | "handoff_auto_complete_stale_approval" | "handoff_auto_complete_source_lane_missing" | "handoff_auto_complete_gate_blocked" | "handoff_auto_complete_approval_missing";
3991
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
3992
3992
  count: number;
3993
3993
  groupKeys: string[];
3994
- severity: 'warning';
3994
+ severity: "warning";
3995
3995
  remediationHints: string[];
3996
3996
  remediationSteps?: RAGRemediationStep[];
3997
3997
  };
3998
3998
  export type RAGRetrievalLaneHandoffDriftCountByLane = {
3999
- targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'], undefined>;
3999
+ targetRolloutLabel: Exclude<RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"], undefined>;
4000
4000
  totalCount: number;
4001
- countsByKind: Record<RAGRetrievalLaneHandoffDriftRollup['kind'], number>;
4001
+ countsByKind: Record<RAGRetrievalLaneHandoffDriftRollup["kind"], number>;
4002
4002
  };
4003
4003
  export type RAGRetrievalReleaseIncidentListResponse = {
4004
4004
  ok: boolean;
@@ -4007,20 +4007,20 @@ export type RAGRetrievalReleaseIncidentListResponse = {
4007
4007
  };
4008
4008
  export type RAGRetrievalReleaseIncidentStatusResponse = {
4009
4009
  ok: true;
4010
- incidentSummary?: RAGRetrievalComparisonRuntime['incidentSummary'];
4010
+ incidentSummary?: RAGRetrievalComparisonRuntime["incidentSummary"];
4011
4011
  incidentClassificationSummary?: RAGRetrievalIncidentClassificationSummary;
4012
- releaseLaneIncidentSummaries?: RAGRetrievalComparisonRuntime['releaseLaneIncidentSummaries'];
4013
- recentIncidents?: RAGRetrievalComparisonRuntime['recentIncidents'];
4014
- recentIncidentRemediationDecisions?: RAGRetrievalComparisonRuntime['recentIncidentRemediationDecisions'];
4015
- recentIncidentRemediationExecutions?: RAGRetrievalComparisonRuntime['recentIncidentRemediationExecutions'];
4016
- incidentRemediationExecutionSummary?: RAGRetrievalComparisonRuntime['incidentRemediationExecutionSummary'];
4017
- recentReleaseLaneEscalationPolicyHistory?: RAGRetrievalComparisonRuntime['recentReleaseLaneEscalationPolicyHistory'];
4012
+ releaseLaneIncidentSummaries?: RAGRetrievalComparisonRuntime["releaseLaneIncidentSummaries"];
4013
+ recentIncidents?: RAGRetrievalComparisonRuntime["recentIncidents"];
4014
+ recentIncidentRemediationDecisions?: RAGRetrievalComparisonRuntime["recentIncidentRemediationDecisions"];
4015
+ recentIncidentRemediationExecutions?: RAGRetrievalComparisonRuntime["recentIncidentRemediationExecutions"];
4016
+ incidentRemediationExecutionSummary?: RAGRetrievalComparisonRuntime["incidentRemediationExecutionSummary"];
4017
+ recentReleaseLaneEscalationPolicyHistory?: RAGRetrievalComparisonRuntime["recentReleaseLaneEscalationPolicyHistory"];
4018
4018
  };
4019
4019
  export type RAGRetrievalIncidentRemediationStatusResponse = {
4020
4020
  ok: true;
4021
4021
  incidentClassificationSummary?: RAGRetrievalIncidentClassificationSummary;
4022
- recentIncidentRemediationExecutions?: RAGRetrievalComparisonRuntime['recentIncidentRemediationExecutions'];
4023
- incidentRemediationExecutionSummary?: RAGRetrievalComparisonRuntime['incidentRemediationExecutionSummary'];
4022
+ recentIncidentRemediationExecutions?: RAGRetrievalComparisonRuntime["recentIncidentRemediationExecutions"];
4023
+ incidentRemediationExecutionSummary?: RAGRetrievalComparisonRuntime["incidentRemediationExecutionSummary"];
4024
4024
  };
4025
4025
  export type RAGRetrievalIncidentClassificationSummary = {
4026
4026
  totalGeneralCount: number;
@@ -4040,12 +4040,12 @@ export type RAGRetrievalIncidentClassificationSummary = {
4040
4040
  resolvedCueCount: number;
4041
4041
  };
4042
4042
  export type RAGRetrievalReleaseEvent = {
4043
- kind: 'incident_opened' | 'incident_resolved';
4043
+ kind: "incident_opened" | "incident_resolved";
4044
4044
  incident: RAGRetrievalReleaseIncidentRecord;
4045
4045
  };
4046
4046
  export type RAGRetrievalReleasePolicySummary = RAGRetrievalReleasePolicy & {
4047
4047
  groupKey: string;
4048
- rolloutLabel?: RAGRetrievalBaselineRecord['rolloutLabel'];
4048
+ rolloutLabel?: RAGRetrievalBaselineRecord["rolloutLabel"];
4049
4049
  };
4050
4050
  export type RAGRetrievalReleaseDecisionStore = {
4051
4051
  saveDecision: (record: RAGRetrievalReleaseDecisionRecord) => Promise<void> | void;
@@ -4053,14 +4053,14 @@ export type RAGRetrievalReleaseDecisionStore = {
4053
4053
  corpusGroupKey?: string;
4054
4054
  groupKey?: string;
4055
4055
  limit?: number;
4056
- kind?: RAGRetrievalReleaseDecisionRecord['kind'];
4056
+ kind?: RAGRetrievalReleaseDecisionRecord["kind"];
4057
4057
  }) => Promise<RAGRetrievalReleaseDecisionRecord[]> | RAGRetrievalReleaseDecisionRecord[];
4058
4058
  };
4059
4059
  export type RAGRetrievalReleaseDecisionActionRequest = {
4060
4060
  corpusGroupKey?: string;
4061
4061
  groupKey: string;
4062
4062
  sourceRunId: string;
4063
- targetRolloutLabel?: RAGRetrievalBaselineRecord['rolloutLabel'];
4063
+ targetRolloutLabel?: RAGRetrievalBaselineRecord["rolloutLabel"];
4064
4064
  retrievalId?: string;
4065
4065
  decidedBy?: string;
4066
4066
  decidedAt?: number;
@@ -4082,9 +4082,9 @@ export type RAGRetrievalLaneHandoffDecisionRecord = {
4082
4082
  id: string;
4083
4083
  corpusGroupKey?: string;
4084
4084
  groupKey: string;
4085
- sourceRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
4086
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
4087
- kind: 'approve' | 'reject' | 'complete';
4085
+ sourceRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
4086
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
4087
+ kind: "approve" | "reject" | "complete";
4088
4088
  decidedAt: number;
4089
4089
  decidedBy?: string;
4090
4090
  notes?: string;
@@ -4098,18 +4098,18 @@ export type RAGRetrievalLaneHandoffDecisionStore = {
4098
4098
  listDecisions: (input?: {
4099
4099
  corpusGroupKey?: string;
4100
4100
  groupKey?: string;
4101
- sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord['sourceRolloutLabel'];
4102
- targetRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord['targetRolloutLabel'];
4103
- kind?: RAGRetrievalLaneHandoffDecisionRecord['kind'];
4101
+ sourceRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord["sourceRolloutLabel"];
4102
+ targetRolloutLabel?: RAGRetrievalLaneHandoffDecisionRecord["targetRolloutLabel"];
4103
+ kind?: RAGRetrievalLaneHandoffDecisionRecord["kind"];
4104
4104
  limit?: number;
4105
4105
  }) => Promise<RAGRetrievalLaneHandoffDecisionRecord[]> | RAGRetrievalLaneHandoffDecisionRecord[];
4106
4106
  };
4107
4107
  export type RAGRetrievalLaneHandoffDecisionRequest = {
4108
4108
  corpusGroupKey?: string;
4109
4109
  groupKey: string;
4110
- sourceRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
4111
- targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>;
4112
- kind: RAGRetrievalLaneHandoffDecisionRecord['kind'];
4110
+ sourceRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
4111
+ targetRolloutLabel: Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>;
4112
+ kind: RAGRetrievalLaneHandoffDecisionRecord["kind"];
4113
4113
  decidedBy?: string;
4114
4114
  decidedAt?: number;
4115
4115
  notes?: string;
@@ -4193,8 +4193,8 @@ export type RAGRetrievalComparisonWinnerTrend = {
4193
4193
  latestFinishedAt: number;
4194
4194
  };
4195
4195
  export type RAGRetrievalComparisonAlert = {
4196
- kind: 'stable_winner_changed' | 'baseline_regression' | 'baseline_gate_failed' | 'handoff_auto_complete_policy_drift' | 'handoff_auto_complete_stale_approval' | 'handoff_auto_complete_source_lane_missing' | 'handoff_auto_complete_gate_blocked' | 'handoff_auto_complete_approval_missing';
4197
- severity: 'info' | 'warning';
4196
+ kind: "stable_winner_changed" | "baseline_regression" | "baseline_gate_failed" | "handoff_auto_complete_policy_drift" | "handoff_auto_complete_stale_approval" | "handoff_auto_complete_source_lane_missing" | "handoff_auto_complete_gate_blocked" | "handoff_auto_complete_approval_missing";
4197
+ severity: "info" | "warning";
4198
4198
  message: string;
4199
4199
  latestRunId: string;
4200
4200
  retrievalId?: string;
@@ -4205,7 +4205,7 @@ export type RAGRetrievalComparisonAlert = {
4205
4205
  candidateRetrievalId?: string;
4206
4206
  delta?: RAGRetrievalComparisonDecisionDelta;
4207
4207
  gate?: RAGRetrievalComparisonGateResult;
4208
- classification?: 'general' | 'multivector' | 'runtime' | 'evidence' | 'cue';
4208
+ classification?: "general" | "multivector" | "runtime" | "evidence" | "cue";
4209
4209
  };
4210
4210
  export type RAGRetrievalComparisonRuntime = {
4211
4211
  configured: boolean;
@@ -4281,29 +4281,29 @@ export type RAGIndexManager = {
4281
4281
  syncAllSources?: (options?: RAGSyncRunOptions) => Promise<RAGSyncResponse | void> | RAGSyncResponse | void;
4282
4282
  reseed?: () => Promise<RAGMutationResponse | void> | RAGMutationResponse | void;
4283
4283
  reset?: () => Promise<RAGMutationResponse | void> | RAGMutationResponse | void;
4284
- listBackends?: () => Promise<Omit<RAGBackendsResponse, 'ok'> | RAGBackendDescriptor[]> | Omit<RAGBackendsResponse, 'ok'> | RAGBackendDescriptor[];
4284
+ listBackends?: () => Promise<Omit<RAGBackendsResponse, "ok"> | RAGBackendDescriptor[]> | Omit<RAGBackendsResponse, "ok"> | RAGBackendDescriptor[];
4285
4285
  };
4286
4286
  export type AITextChunk = {
4287
- type: 'text';
4287
+ type: "text";
4288
4288
  content: string;
4289
4289
  };
4290
4290
  export type AIToolUseChunk = {
4291
- type: 'tool_use';
4291
+ type: "tool_use";
4292
4292
  id: string;
4293
4293
  name: string;
4294
4294
  input: unknown;
4295
4295
  };
4296
4296
  export type AIDoneChunk = {
4297
- type: 'done';
4297
+ type: "done";
4298
4298
  usage?: AIUsage;
4299
4299
  };
4300
4300
  export type AIThinkingChunk = {
4301
- type: 'thinking';
4301
+ type: "thinking";
4302
4302
  content: string;
4303
4303
  signature?: string;
4304
4304
  };
4305
4305
  export type AIImageChunk = {
4306
- type: 'image';
4306
+ type: "image";
4307
4307
  data: string;
4308
4308
  format: string;
4309
4309
  isPartial: boolean;
@@ -4323,40 +4323,40 @@ export type AIProviderStreamParams = {
4323
4323
  signal?: AbortSignal;
4324
4324
  };
4325
4325
  export type AIProviderMessage = {
4326
- role: 'user' | 'assistant' | 'system';
4326
+ role: "user" | "assistant" | "system";
4327
4327
  content: string | AIProviderContentBlock[];
4328
4328
  };
4329
4329
  export type AIImageSource = {
4330
- type: 'base64';
4330
+ type: "base64";
4331
4331
  data: string;
4332
- media_type: 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp';
4332
+ media_type: "image/png" | "image/jpeg" | "image/gif" | "image/webp";
4333
4333
  };
4334
4334
  export type AIDocumentSource = {
4335
- type: 'base64';
4335
+ type: "base64";
4336
4336
  data: string;
4337
- media_type: 'application/pdf';
4337
+ media_type: "application/pdf";
4338
4338
  };
4339
4339
  export type AIProviderContentBlock = {
4340
- type: 'text';
4340
+ type: "text";
4341
4341
  content: string;
4342
4342
  } | {
4343
- type: 'thinking';
4343
+ type: "thinking";
4344
4344
  thinking: string;
4345
4345
  signature?: string;
4346
4346
  } | {
4347
- type: 'image';
4347
+ type: "image";
4348
4348
  source: AIImageSource;
4349
4349
  } | {
4350
- type: 'document';
4350
+ type: "document";
4351
4351
  source: AIDocumentSource;
4352
4352
  name?: string;
4353
4353
  } | {
4354
- type: 'tool_use';
4354
+ type: "tool_use";
4355
4355
  id: string;
4356
4356
  name: string;
4357
4357
  input: unknown;
4358
4358
  } | {
4359
- type: 'tool_result';
4359
+ type: "tool_result";
4360
4360
  tool_use_id: string;
4361
4361
  content: string;
4362
4362
  };
@@ -4376,49 +4376,49 @@ export type AIToolDefinition = {
4376
4376
  export type AIToolMap = Record<string, AIToolDefinition>;
4377
4377
  export type AIAttachment = {
4378
4378
  data: string;
4379
- media_type: 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp' | 'application/pdf';
4379
+ media_type: "image/png" | "image/jpeg" | "image/gif" | "image/webp" | "application/pdf";
4380
4380
  name?: string;
4381
4381
  };
4382
4382
  export type AIMessageRequest = {
4383
- type: 'message';
4383
+ type: "message";
4384
4384
  content: string;
4385
4385
  conversationId?: string;
4386
4386
  attachments?: AIAttachment[];
4387
4387
  };
4388
4388
  export type AICancelRequest = {
4389
- type: 'cancel';
4389
+ type: "cancel";
4390
4390
  conversationId: string;
4391
4391
  };
4392
4392
  export type AIBranchRequest = {
4393
- type: 'branch';
4393
+ type: "branch";
4394
4394
  messageId: string;
4395
4395
  content: string;
4396
4396
  conversationId: string;
4397
4397
  };
4398
4398
  export type AIClientMessage = AIMessageRequest | AICancelRequest | AIBranchRequest;
4399
4399
  export type AIChunkMessage = {
4400
- type: 'chunk';
4400
+ type: "chunk";
4401
4401
  content: string;
4402
4402
  messageId: string;
4403
4403
  conversationId: string;
4404
4404
  };
4405
4405
  export type AIThinkingMessage = {
4406
- type: 'thinking';
4406
+ type: "thinking";
4407
4407
  content: string;
4408
4408
  messageId: string;
4409
4409
  conversationId: string;
4410
4410
  };
4411
4411
  export type AIToolStatusMessage = {
4412
- type: 'tool_status';
4412
+ type: "tool_status";
4413
4413
  name: string;
4414
- status: 'running' | 'complete';
4414
+ status: "running" | "complete";
4415
4415
  input?: unknown;
4416
4416
  result?: string;
4417
4417
  messageId: string;
4418
4418
  conversationId: string;
4419
4419
  };
4420
4420
  export type AICompleteMessage = {
4421
- type: 'complete';
4421
+ type: "complete";
4422
4422
  durationMs?: number;
4423
4423
  messageId: string;
4424
4424
  model?: string;
@@ -4430,7 +4430,7 @@ export type StreamAICompleteMetadata = {
4430
4430
  sources?: RAGSource[];
4431
4431
  };
4432
4432
  export type AIImageMessage = {
4433
- type: 'image';
4433
+ type: "image";
4434
4434
  data: string;
4435
4435
  format: string;
4436
4436
  isPartial: boolean;
@@ -4440,19 +4440,19 @@ export type AIImageMessage = {
4440
4440
  conversationId: string;
4441
4441
  };
4442
4442
  export type AIErrorMessage = {
4443
- type: 'error';
4443
+ type: "error";
4444
4444
  message: string;
4445
4445
  messageId?: string;
4446
4446
  conversationId?: string;
4447
4447
  };
4448
4448
  export type AIRetrievingMessage = {
4449
- type: 'rag_retrieving';
4449
+ type: "rag_retrieving";
4450
4450
  conversationId: string;
4451
4451
  messageId: string;
4452
4452
  retrievalStartedAt: number;
4453
4453
  };
4454
4454
  export type AIRetrievedMessage = {
4455
- type: 'rag_retrieved';
4455
+ type: "rag_retrieved";
4456
4456
  conversationId: string;
4457
4457
  messageId: string;
4458
4458
  retrievalStartedAt?: number;
@@ -4462,7 +4462,7 @@ export type AIRetrievedMessage = {
4462
4462
  trace?: RAGRetrievalTrace;
4463
4463
  };
4464
4464
  export type AIServerMessage = AIChunkMessage | AIThinkingMessage | AIToolStatusMessage | AIImageMessage | AICompleteMessage | AIRetrievingMessage | AIRetrievedMessage | AIErrorMessage;
4465
- export type AIRole = 'user' | 'assistant' | 'system';
4465
+ export type AIRole = "user" | "assistant" | "system";
4466
4466
  export type AIToolCall = {
4467
4467
  id: string;
4468
4468
  name: string;
@@ -4536,25 +4536,25 @@ export type AIStreamState = {
4536
4536
  error: string | null;
4537
4537
  };
4538
4538
  export type AIStoreAction = {
4539
- type: 'chunk';
4539
+ type: "chunk";
4540
4540
  conversationId: string;
4541
4541
  messageId: string;
4542
4542
  content: string;
4543
4543
  } | {
4544
- type: 'thinking';
4544
+ type: "thinking";
4545
4545
  conversationId: string;
4546
4546
  messageId: string;
4547
4547
  content: string;
4548
4548
  } | {
4549
- type: 'tool_status';
4549
+ type: "tool_status";
4550
4550
  conversationId: string;
4551
4551
  messageId: string;
4552
4552
  name: string;
4553
- status: 'running' | 'complete';
4553
+ status: "running" | "complete";
4554
4554
  input?: unknown;
4555
4555
  result?: string;
4556
4556
  } | {
4557
- type: 'complete';
4557
+ type: "complete";
4558
4558
  conversationId: string;
4559
4559
  durationMs?: number;
4560
4560
  messageId: string;
@@ -4562,7 +4562,7 @@ export type AIStoreAction = {
4562
4562
  usage?: AIUsage;
4563
4563
  sources?: RAGSource[];
4564
4564
  } | {
4565
- type: 'image';
4565
+ type: "image";
4566
4566
  conversationId: string;
4567
4567
  messageId: string;
4568
4568
  data: string;
@@ -4571,15 +4571,15 @@ export type AIStoreAction = {
4571
4571
  revisedPrompt?: string;
4572
4572
  imageId?: string;
4573
4573
  } | {
4574
- type: 'error';
4574
+ type: "error";
4575
4575
  message: string;
4576
4576
  } | {
4577
- type: 'rag_retrieving';
4577
+ type: "rag_retrieving";
4578
4578
  conversationId: string;
4579
4579
  messageId: string;
4580
4580
  retrievalStartedAt: number;
4581
4581
  } | {
4582
- type: 'rag_retrieved';
4582
+ type: "rag_retrieved";
4583
4583
  conversationId: string;
4584
4584
  messageId: string;
4585
4585
  retrievalStartedAt?: number;
@@ -4588,20 +4588,20 @@ export type AIStoreAction = {
4588
4588
  sources: RAGSource[];
4589
4589
  trace?: RAGRetrievalTrace;
4590
4590
  } | {
4591
- type: 'send';
4591
+ type: "send";
4592
4592
  content: string;
4593
4593
  conversationId: string;
4594
4594
  messageId: string;
4595
4595
  attachments?: AIAttachment[];
4596
4596
  } | {
4597
- type: 'cancel';
4597
+ type: "cancel";
4598
4598
  } | {
4599
- type: 'branch';
4599
+ type: "branch";
4600
4600
  oldConversationId: string;
4601
4601
  newConversationId: string;
4602
4602
  fromMessageId: string;
4603
4603
  } | {
4604
- type: 'set_conversation';
4604
+ type: "set_conversation";
4605
4605
  conversationId: string;
4606
4606
  };
4607
4607
  export type AIWebSocket = {
@@ -4645,7 +4645,7 @@ export type RAGHTMXWorkflowRenderConfig = {
4645
4645
  adminActions?: RAGAdminActionRecord[];
4646
4646
  adminJobs?: RAGAdminJobRecord[];
4647
4647
  maintenance?: RAGBackendMaintenanceSummary;
4648
- retrievalComparisons?: RAGOperationsResponse['retrievalComparisons'];
4648
+ retrievalComparisons?: RAGOperationsResponse["retrievalComparisons"];
4649
4649
  path?: string;
4650
4650
  status?: RAGVectorStoreStatus;
4651
4651
  capabilities?: RAGBackendCapabilities;
@@ -4683,7 +4683,7 @@ export type RAGHTMXWorkflowRenderConfig = {
4683
4683
  presentationCueBenchmarkSnapshot?: (input: RAGPresentationCueBenchmarkSnapshotResponse) => string;
4684
4684
  spreadsheetCueBenchmarkSnapshot?: (input: RAGSpreadsheetCueBenchmarkSnapshotResponse) => string;
4685
4685
  mutationResult?: (input: RAGMutationResponse) => string;
4686
- emptyState?: (kind: 'documents' | 'searchResults' | 'chunkPreview' | 'status' | 'evaluation') => string;
4686
+ emptyState?: (kind: "documents" | "searchResults" | "chunkPreview" | "status" | "evaluation") => string;
4687
4687
  error?: (message: string) => string;
4688
4688
  };
4689
4689
  export type RAGHTMXConfig = {
@@ -4743,13 +4743,13 @@ export type RAGChatPluginConfig = AIChatPluginConfig & {
4743
4743
  retrievalReleaseIncidentStore?: RAGRetrievalReleaseIncidentStore;
4744
4744
  retrievalIncidentRemediationDecisionStore?: RAGRetrievalIncidentRemediationDecisionStore;
4745
4745
  retrievalIncidentRemediationExecutionHistoryStore?: RAGRetrievalIncidentRemediationExecutionHistoryStore;
4746
- retrievalLaneHandoffAutoCompletePoliciesByGroupAndTargetRolloutLabel?: Record<string, Partial<Record<Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>, RAGRetrievalLaneHandoffAutoCompletePolicy>>>;
4746
+ retrievalLaneHandoffAutoCompletePoliciesByGroupAndTargetRolloutLabel?: Record<string, Partial<Record<Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>, RAGRetrievalLaneHandoffAutoCompletePolicy>>>;
4747
4747
  retrievalReleasePolicies?: Record<string, RAGRetrievalReleasePolicy>;
4748
- retrievalReleasePoliciesByRolloutLabel?: Partial<Record<Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>, RAGRetrievalReleasePolicy>>;
4749
- retrievalReleasePoliciesByGroupAndRolloutLabel?: Record<string, Partial<Record<Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>, RAGRetrievalReleasePolicy>>>;
4750
- retrievalBaselineGatePoliciesByRolloutLabel?: Partial<Record<Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>, RAGRetrievalBaselineGatePolicy>>;
4748
+ retrievalReleasePoliciesByRolloutLabel?: Partial<Record<Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>, RAGRetrievalReleasePolicy>>;
4749
+ retrievalReleasePoliciesByGroupAndRolloutLabel?: Record<string, Partial<Record<Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>, RAGRetrievalReleasePolicy>>>;
4750
+ retrievalBaselineGatePoliciesByRolloutLabel?: Partial<Record<Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>, RAGRetrievalBaselineGatePolicy>>;
4751
4751
  retrievalBaselineGatePoliciesByGroup?: Record<string, RAGRetrievalBaselineGatePolicy>;
4752
- retrievalBaselineGatePoliciesByGroupAndRolloutLabel?: Record<string, Partial<Record<Exclude<RAGRetrievalBaselineRecord['rolloutLabel'], undefined>, RAGRetrievalBaselineGatePolicy>>>;
4752
+ retrievalBaselineGatePoliciesByGroupAndRolloutLabel?: Record<string, Partial<Record<Exclude<RAGRetrievalBaselineRecord["rolloutLabel"], undefined>, RAGRetrievalBaselineGatePolicy>>>;
4753
4753
  onRetrievalReleaseEvent?: (event: RAGRetrievalReleaseEvent) => void | Promise<void>;
4754
4754
  extractors?: RAGFileExtractor[];
4755
4755
  embedding?: RAGEmbeddingProviderLike;