@absolutejs/absolute 0.19.0-beta.615 → 0.19.0-beta.616

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 (37) hide show
  1. package/dist/ai/client/index.js +60 -43
  2. package/dist/ai/client/index.js.map +7 -7
  3. package/dist/ai/client/ui.js +5 -1
  4. package/dist/ai/client/ui.js.map +3 -3
  5. package/dist/ai/index.js +1101 -196
  6. package/dist/ai/index.js.map +14 -12
  7. package/dist/ai/rag/quality.js +16 -3
  8. package/dist/ai/rag/quality.js.map +4 -4
  9. package/dist/ai/rag/ui.js +5 -1
  10. package/dist/ai/rag/ui.js.map +3 -3
  11. package/dist/ai-client/angular/ai/index.js +44 -40
  12. package/dist/ai-client/react/ai/index.js +46 -42
  13. package/dist/ai-client/vue/ai/index.js +44 -40
  14. package/dist/angular/ai/index.js +46 -42
  15. package/dist/angular/ai/index.js.map +6 -6
  16. package/dist/react/ai/index.js +64 -47
  17. package/dist/react/ai/index.js.map +9 -9
  18. package/dist/src/ai/client/actions.d.ts +1 -1
  19. package/dist/src/ai/index.d.ts +2 -2
  20. package/dist/src/ai/protocol.d.ts +1 -1
  21. package/dist/src/ai/rag/accessControl.d.ts +2 -0
  22. package/dist/src/ai/rag/chat.d.ts +21 -23
  23. package/dist/src/ai/rag/index.d.ts +4 -2
  24. package/dist/src/ai/rag/ingestion.d.ts +12 -3
  25. package/dist/src/ai/rag/jobState.d.ts +2 -0
  26. package/dist/src/vue/ai/useRAG.d.ts +26 -0
  27. package/dist/src/vue/ai/useRAGChunkPreview.d.ts +4 -0
  28. package/dist/src/vue/ai/useRAGDocuments.d.ts +4 -0
  29. package/dist/src/vue/ai/useRAGEvaluate.d.ts +14 -0
  30. package/dist/src/vue/ai/useRAGIndexAdmin.d.ts +2 -0
  31. package/dist/src/vue/ai/useRAGSearch.d.ts +2 -0
  32. package/dist/svelte/ai/index.js +60 -43
  33. package/dist/svelte/ai/index.js.map +7 -7
  34. package/dist/types/ai.d.ts +147 -0
  35. package/dist/vue/ai/index.js +60 -43
  36. package/dist/vue/ai/index.js.map +7 -7
  37. package/package.json +7 -7
@@ -11,6 +11,7 @@ export type RAGExcerptSelection = {
11
11
  export type RAGExcerptModeCounts = Record<RAGExcerptMode, number>;
12
12
  export type RAGSource = {
13
13
  chunkId: string;
14
+ corpusKey?: string;
14
15
  score: number;
15
16
  text: string;
16
17
  title?: string;
@@ -268,6 +269,7 @@ export type RAGAnswerWorkflowState = {
268
269
  export type RAGStreamStage = 'idle' | 'submitting' | 'retrieving' | 'retrieved' | 'streaming' | 'complete' | 'error';
269
270
  export type RAGDocumentChunk = {
270
271
  chunkId: string;
272
+ corpusKey?: string;
271
273
  text: string;
272
274
  title?: string;
273
275
  source?: string;
@@ -298,6 +300,7 @@ export type RAGFileExtractionInput = {
298
300
  contentType?: string;
299
301
  metadata?: Record<string, unknown>;
300
302
  chunking?: RAGChunkingOptions;
303
+ extractorRegistry?: RAGFileExtractorRegistryLike;
301
304
  };
302
305
  export type RAGExtractedFileDocument = RAGIngestDocument & {
303
306
  contentType?: string;
@@ -308,6 +311,27 @@ export type RAGFileExtractor = {
308
311
  supports: (input: RAGFileExtractionInput) => boolean | Promise<boolean>;
309
312
  extract: (input: RAGFileExtractionInput) => RAGExtractedFileDocument | RAGExtractedFileDocument[] | Promise<RAGExtractedFileDocument | RAGExtractedFileDocument[]>;
310
313
  };
314
+ export type RAGFileExtractorRegistryInput = RAGFileExtractionInput & {
315
+ inferredContentType?: string | null;
316
+ inferredExtension?: string | null;
317
+ inferredFormat?: RAGContentFormat;
318
+ };
319
+ export type RAGFileExtractorRegistration = {
320
+ extractor: RAGFileExtractor;
321
+ name?: string;
322
+ priority?: number;
323
+ contentTypes?: string[];
324
+ extensions?: string[];
325
+ formats?: RAGContentFormat[];
326
+ names?: string[];
327
+ match?: (input: RAGFileExtractorRegistryInput) => boolean | Promise<boolean>;
328
+ };
329
+ export type RAGFileExtractorRegistry = {
330
+ registrations: RAGFileExtractorRegistration[];
331
+ includeDefaults?: boolean;
332
+ defaultOrder?: 'registry_first' | 'defaults_first';
333
+ };
334
+ export type RAGFileExtractorRegistryLike = RAGFileExtractorRegistry | RAGFileExtractorRegistration[];
311
335
  export type RAGMediaTranscriptSegment = {
312
336
  text: string;
313
337
  startMs?: number;
@@ -371,8 +395,36 @@ export type RAGChunkingOptions = {
371
395
  minChunkLength?: number;
372
396
  strategy?: RAGChunkingStrategy;
373
397
  };
398
+ export type RAGChunkingProfileInput = {
399
+ document: RAGIngestDocument;
400
+ format: RAGContentFormat;
401
+ normalizedText: string;
402
+ metadata: Record<string, unknown>;
403
+ sourceNativeKind?: string;
404
+ defaults?: RAGChunkingOptions;
405
+ };
406
+ export type RAGChunkingProfile = {
407
+ name: string;
408
+ resolve: (input: RAGChunkingProfileInput) => Partial<RAGChunkingOptions> | undefined;
409
+ };
410
+ export type RAGChunkingProfileRegistration = {
411
+ name?: string;
412
+ documentIds?: string[];
413
+ formats?: RAGContentFormat[];
414
+ priority?: number;
415
+ profile: Partial<RAGChunkingOptions> | {
416
+ options?: Partial<RAGChunkingOptions>;
417
+ };
418
+ sourceNativeKinds?: string[];
419
+ sources?: string[];
420
+ };
421
+ export type RAGChunkingRegistry = {
422
+ profiles: Array<RAGChunkingProfile | RAGChunkingProfileRegistration>;
423
+ };
424
+ export type RAGChunkingRegistryLike = RAGChunkingRegistry | Array<RAGChunkingProfile | RAGChunkingProfileRegistration>;
374
425
  export type RAGIngestDocument = {
375
426
  text: string;
427
+ corpusKey?: string;
376
428
  id?: string;
377
429
  title?: string;
378
430
  source?: string;
@@ -389,14 +441,18 @@ export type RAGDocumentUrlInput = {
389
441
  metadata?: Record<string, unknown>;
390
442
  chunking?: RAGChunkingOptions;
391
443
  extractors?: RAGFileExtractor[];
444
+ extractorRegistry?: RAGFileExtractorRegistryLike;
392
445
  };
393
446
  export type RAGDocumentUrlIngestInput = {
394
447
  baseMetadata?: Record<string, unknown>;
395
448
  defaultChunking?: RAGChunkingOptions;
449
+ chunkingRegistry?: RAGChunkingRegistryLike;
396
450
  extractors?: RAGFileExtractor[];
451
+ extractorRegistry?: RAGFileExtractorRegistryLike;
397
452
  urls: RAGDocumentUrlInput[];
398
453
  };
399
454
  export type RAGPreparedDocument = {
455
+ corpusKey?: string;
400
456
  documentId: string;
401
457
  title: string;
402
458
  source: string;
@@ -409,6 +465,7 @@ export type RAGDocumentFileInput = Omit<RAGIngestDocument, 'text'> & {
409
465
  path: string;
410
466
  contentType?: string;
411
467
  extractors?: RAGFileExtractor[];
468
+ extractorRegistry?: RAGFileExtractorRegistryLike;
412
469
  };
413
470
  export type RAGDirectoryIngestInput = {
414
471
  directory: string;
@@ -416,7 +473,9 @@ export type RAGDirectoryIngestInput = {
416
473
  includeExtensions?: string[];
417
474
  baseMetadata?: Record<string, unknown>;
418
475
  defaultChunking?: RAGChunkingOptions;
476
+ chunkingRegistry?: RAGChunkingRegistryLike;
419
477
  extractors?: RAGFileExtractor[];
478
+ extractorRegistry?: RAGFileExtractorRegistryLike;
420
479
  };
421
480
  export type RAGQueryInput = {
422
481
  queryVector: number[];
@@ -531,6 +590,7 @@ export type RAGUpsertInput = {
531
590
  export type RAGDocumentIngestInput = {
532
591
  documents: RAGIngestDocument[];
533
592
  defaultChunking?: RAGChunkingOptions;
593
+ chunkingRegistry?: RAGChunkingRegistryLike;
534
594
  };
535
595
  export type RAGDocumentUploadInput = {
536
596
  name: string;
@@ -546,10 +606,13 @@ export type RAGDocumentUploadInput = {
546
606
  export type RAGDocumentUploadIngestInput = {
547
607
  baseMetadata?: Record<string, unknown>;
548
608
  defaultChunking?: RAGChunkingOptions;
609
+ chunkingRegistry?: RAGChunkingRegistryLike;
549
610
  extractors?: RAGFileExtractor[];
611
+ extractorRegistry?: RAGFileExtractorRegistryLike;
550
612
  uploads: RAGDocumentUploadInput[];
551
613
  };
552
614
  export type RAGIndexedDocument = {
615
+ corpusKey?: string;
553
616
  id: string;
554
617
  title: string;
555
618
  source: string;
@@ -876,21 +939,30 @@ export type RAGCorpusHealth = {
876
939
  staleDocuments: string[];
877
940
  averageChunksPerDocument: number;
878
941
  inspection?: {
942
+ corpusKeys: Record<string, number>;
879
943
  sourceNativeKinds: Record<string, number>;
944
+ extractorRegistryMatches: Record<string, number>;
945
+ chunkingProfiles: Record<string, number>;
880
946
  documentsWithSourceLabels: number;
881
947
  chunksWithSourceLabels: number;
882
948
  sampleDocuments: Array<{
949
+ corpusKey?: string;
883
950
  id: string;
884
951
  title: string;
885
952
  source: string;
886
953
  sourceNativeKind?: string;
954
+ extractorRegistryMatch?: string;
955
+ chunkingProfile?: string;
887
956
  labels?: RAGSourceLabels;
888
957
  }>;
889
958
  sampleChunks: Array<{
890
959
  chunkId: string;
960
+ corpusKey?: string;
891
961
  documentId?: string;
892
962
  source?: string;
893
963
  sourceNativeKind?: string;
964
+ extractorRegistryMatch?: string;
965
+ chunkingProfile?: string;
894
966
  labels?: RAGSourceLabels;
895
967
  }>;
896
968
  };
@@ -917,6 +989,22 @@ export type RAGAdminJobRecord = {
917
989
  target?: string;
918
990
  error?: string;
919
991
  };
992
+ export type RAGJobState = {
993
+ adminActions: RAGAdminActionRecord[];
994
+ ingestJobs: RAGIngestJobRecord[];
995
+ adminJobs: RAGAdminJobRecord[];
996
+ syncJobs: RAGAdminJobRecord[];
997
+ };
998
+ export type RAGJobStateStore = {
999
+ load: () => Promise<Partial<RAGJobState> | undefined> | Partial<RAGJobState> | undefined;
1000
+ save: (state: RAGJobState) => Promise<void> | void;
1001
+ };
1002
+ export type RAGJobHistoryRetention = {
1003
+ maxAdminActions?: number;
1004
+ maxAdminJobs?: number;
1005
+ maxIngestJobs?: number;
1006
+ maxSyncJobs?: number;
1007
+ };
920
1008
  export type RAGAdminCapabilities = {
921
1009
  canClearIndex: boolean;
922
1010
  canCreateDocument: boolean;
@@ -931,6 +1019,46 @@ export type RAGAdminCapabilities = {
931
1019
  canSyncAllSources: boolean;
932
1020
  canSyncSource: boolean;
933
1021
  };
1022
+ export type RAGAuthorizedAction = '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';
1023
+ export type RAGAuthorizationResource = {
1024
+ documentId?: string;
1025
+ path?: string;
1026
+ source?: string;
1027
+ sourceId?: string;
1028
+ };
1029
+ export type RAGAuthorizationDecision = boolean | {
1030
+ allowed: boolean;
1031
+ reason?: string;
1032
+ };
1033
+ export type RAGAuthorizationContext = {
1034
+ action: RAGAuthorizedAction;
1035
+ request: Request;
1036
+ resource?: RAGAuthorizationResource;
1037
+ };
1038
+ export type RAGAuthorizationProvider = (context: RAGAuthorizationContext) => Promise<RAGAuthorizationDecision> | RAGAuthorizationDecision;
1039
+ export type RAGAccessScope = {
1040
+ allowedComparisonGroupKeys?: string[];
1041
+ allowedCorpusKeys?: string[];
1042
+ allowedDocumentIds?: string[];
1043
+ allowedSourcePrefixes?: string[];
1044
+ allowedSources?: string[];
1045
+ allowedSyncSourceIds?: string[];
1046
+ requiredMetadata?: Record<string, unknown>;
1047
+ };
1048
+ export type RAGAccessScopeProvider = (request: Request) => Promise<RAGAccessScope | undefined> | RAGAccessScope | undefined;
1049
+ export type RAGAccessControlContextResolver<TContext = unknown> = (request: Request) => Promise<TContext | undefined> | TContext | undefined;
1050
+ export type RAGAccessControlAuthorizeResolver<TContext = unknown> = (input: RAGAuthorizationContext & {
1051
+ context: TContext | undefined;
1052
+ }) => Promise<RAGAuthorizationDecision> | RAGAuthorizationDecision;
1053
+ export type RAGAccessControlScopeResolver<TContext = unknown> = (input: {
1054
+ context: TContext | undefined;
1055
+ request: Request;
1056
+ }) => Promise<RAGAccessScope | undefined> | RAGAccessScope | undefined;
1057
+ export type CreateRAGAccessControlOptions<TContext = unknown> = {
1058
+ resolveContext: RAGAccessControlContextResolver<TContext>;
1059
+ authorize?: RAGAccessControlAuthorizeResolver<TContext>;
1060
+ resolveScope?: RAGAccessControlScopeResolver<TContext>;
1061
+ };
934
1062
  export type RAGSyncSourceStatus = 'idle' | 'running' | 'completed' | 'failed' | 'disabled';
935
1063
  export type RAGSyncSourceRecord = {
936
1064
  id: string;
@@ -1007,7 +1135,9 @@ export type RAGDirectorySyncSourceOptions = {
1007
1135
  description?: string;
1008
1136
  baseMetadata?: Record<string, unknown>;
1009
1137
  defaultChunking?: RAGChunkingOptions;
1138
+ chunkingRegistry?: RAGChunkingRegistryLike;
1010
1139
  extractors?: RAGFileExtractor[];
1140
+ extractorRegistry?: RAGFileExtractorRegistryLike;
1011
1141
  includeExtensions?: string[];
1012
1142
  metadata?: Record<string, unknown>;
1013
1143
  recursive?: boolean;
@@ -1021,7 +1151,9 @@ export type RAGUrlSyncSourceOptions = {
1021
1151
  description?: string;
1022
1152
  baseMetadata?: Record<string, unknown>;
1023
1153
  defaultChunking?: RAGChunkingOptions;
1154
+ chunkingRegistry?: RAGChunkingRegistryLike;
1024
1155
  extractors?: RAGFileExtractor[];
1156
+ extractorRegistry?: RAGFileExtractorRegistryLike;
1025
1157
  metadata?: Record<string, unknown>;
1026
1158
  retryAttempts?: number;
1027
1159
  retryDelayMs?: number;
@@ -1036,7 +1168,9 @@ export type RAGStorageSyncSourceOptions = {
1036
1168
  maxKeys?: number;
1037
1169
  baseMetadata?: Record<string, unknown>;
1038
1170
  defaultChunking?: RAGChunkingOptions;
1171
+ chunkingRegistry?: RAGChunkingRegistryLike;
1039
1172
  extractors?: RAGFileExtractor[];
1173
+ extractorRegistry?: RAGFileExtractorRegistryLike;
1040
1174
  metadata?: Record<string, unknown>;
1041
1175
  retryAttempts?: number;
1042
1176
  retryDelayMs?: number;
@@ -1086,7 +1220,9 @@ export type RAGEmailSyncSourceOptions = {
1086
1220
  maxResults?: number;
1087
1221
  baseMetadata?: Record<string, unknown>;
1088
1222
  defaultChunking?: RAGChunkingOptions;
1223
+ chunkingRegistry?: RAGChunkingRegistryLike;
1089
1224
  extractors?: RAGFileExtractor[];
1225
+ extractorRegistry?: RAGFileExtractorRegistryLike;
1090
1226
  metadata?: Record<string, unknown>;
1091
1227
  retryAttempts?: number;
1092
1228
  retryDelayMs?: number;
@@ -1306,6 +1442,7 @@ export type RAGMutationResponse = {
1306
1442
  export type RAGEvaluationCase = {
1307
1443
  id: string;
1308
1444
  query: string;
1445
+ corpusKey?: string;
1309
1446
  topK?: number;
1310
1447
  model?: string;
1311
1448
  scoreThreshold?: number;
@@ -1569,6 +1706,7 @@ export type RAGEvaluationInput = {
1569
1706
  };
1570
1707
  export type RAGEvaluationCaseResult = {
1571
1708
  caseId: string;
1709
+ corpusKey?: string;
1572
1710
  query: string;
1573
1711
  label?: string;
1574
1712
  status: 'pass' | 'partial' | 'fail';
@@ -1599,6 +1737,7 @@ export type RAGEvaluationSummary = {
1599
1737
  };
1600
1738
  export type RAGEvaluationResponse = {
1601
1739
  ok: true;
1740
+ corpusKeys?: string[];
1602
1741
  cases: RAGEvaluationCaseResult[];
1603
1742
  summary: RAGEvaluationSummary;
1604
1743
  elapsedMs: number;
@@ -1684,6 +1823,7 @@ export type RAGEvaluationRunDiff = {
1684
1823
  };
1685
1824
  export type RAGEvaluationCaseTraceSnapshot = {
1686
1825
  caseId: string;
1826
+ corpusKey?: string;
1687
1827
  label?: string;
1688
1828
  query: string;
1689
1829
  status: RAGEvaluationCaseResult['status'];
@@ -1922,6 +2062,7 @@ export type RAGRetrievalTraceTrend = {
1922
2062
  };
1923
2063
  export type RAGSearchTraceResultSnapshot = {
1924
2064
  chunkId: string;
2065
+ corpusKey?: string;
1925
2066
  score: number;
1926
2067
  source?: string;
1927
2068
  title?: string;
@@ -2111,6 +2252,7 @@ export type RAGRetrievalComparisonSummary = {
2111
2252
  export type RAGRetrievalComparison = {
2112
2253
  suiteId: string;
2113
2254
  suiteLabel: string;
2255
+ corpusKeys?: string[];
2114
2256
  entries: RAGRetrievalComparisonEntry[];
2115
2257
  summary: RAGRetrievalComparisonSummary;
2116
2258
  leaderboard: RAGEvaluationLeaderboardEntry[];
@@ -2139,6 +2281,7 @@ export type RAGRetrievalComparisonRun = {
2139
2281
  label: string;
2140
2282
  suiteId: string;
2141
2283
  suiteLabel: string;
2284
+ corpusKeys?: string[];
2142
2285
  groupKey?: string;
2143
2286
  tags?: string[];
2144
2287
  startedAt: number;
@@ -3545,6 +3688,10 @@ export type RAGChatPluginConfig = AIChatPluginConfig & {
3545
3688
  path?: string;
3546
3689
  ragStore?: RAGVectorStore;
3547
3690
  collection?: RAGCollection;
3691
+ jobStateStore?: RAGJobStateStore;
3692
+ authorizeRAGAction?: RAGAuthorizationProvider;
3693
+ resolveRAGAccessScope?: RAGAccessScopeProvider;
3694
+ jobHistoryRetention?: RAGJobHistoryRetention;
3548
3695
  searchTraceStore?: RAGSearchTraceStore;
3549
3696
  searchTraceRetention?: RAGSearchTracePruneInput;
3550
3697
  searchTraceRetentionSchedule?: RAGSearchTraceRetentionSchedule;
@@ -187,7 +187,7 @@ var parseAIMessage = (raw) => {
187
187
  return null;
188
188
  }
189
189
  };
190
- var serializeAIMessage = (msg) => JSON.stringify(msg);
190
+ var serializeAIMessage = (message) => JSON.stringify(message);
191
191
 
192
192
  // src/ai/rag/grounding.ts
193
193
  var getContextString = (value) => typeof value === "string" && value.trim().length > 0 ? value.trim() : undefined;
@@ -1275,7 +1275,10 @@ var evaluateRAGCollectionCases = async ({
1275
1275
  const expectedIds = normalizeExpectedIds(mode === "chunkId" ? caseInput.expectedChunkIds ?? [] : mode === "source" ? caseInput.expectedSources ?? [] : caseInput.expectedDocumentIds ?? []);
1276
1276
  const topK = typeof caseInput.topK === "number" ? caseInput.topK : typeof input.topK === "number" ? input.topK : defaultTopK;
1277
1277
  const searchInput = {
1278
- filter: typeof caseInput.filter === "object" ? caseInput.filter : input.filter,
1278
+ filter: caseInput.corpusKey ? {
1279
+ ...(typeof caseInput.filter === "object" ? caseInput.filter : input.filter) ?? {},
1280
+ corpusKey: caseInput.corpusKey
1281
+ } : typeof caseInput.filter === "object" ? caseInput.filter : input.filter,
1279
1282
  model: caseInput.model ?? input.model,
1280
1283
  query,
1281
1284
  rerank,
@@ -1677,6 +1680,7 @@ var buildEvaluationCaseTraceSnapshot = ({
1677
1680
  return {
1678
1681
  candidateTopK: currentTrace?.candidateTopK ?? 0,
1679
1682
  caseId: caseResult.caseId,
1683
+ corpusKey: caseResult.corpusKey,
1680
1684
  inputFilter: filter,
1681
1685
  finalCount: currentTrace?.resultCounts.final ?? 0,
1682
1686
  label: caseResult.label,
@@ -3229,11 +3233,15 @@ var persistRAGRetrievalReleaseLaneEscalationPolicyHistory = async ({
3229
3233
  };
3230
3234
  var buildRAGEvaluationResponse = (cases) => {
3231
3235
  const totalCases = cases.length;
3236
+ const corpusKeys = [
3237
+ ...new Set(cases.flatMap((entry) => entry.corpusKey ?? []))
3238
+ ];
3232
3239
  const passedCases = cases.filter((entry) => entry.status === "pass").length;
3233
3240
  const partialCases = cases.filter((entry) => entry.status === "partial").length;
3234
3241
  const failedCases = cases.filter((entry) => entry.status === "fail").length;
3235
3242
  return {
3236
3243
  cases,
3244
+ ...corpusKeys.length > 0 ? { corpusKeys } : {},
3237
3245
  elapsedMs: cases.reduce((sum, result) => sum + result.elapsedMs, 0),
3238
3246
  ok: true,
3239
3247
  passingRate: totalCases > 0 ? passedCases / totalCases * 100 : 0,
@@ -3459,6 +3467,9 @@ var compareRAGRetrievalStrategies = async ({
3459
3467
  traceSummary: entry.traceSummary
3460
3468
  })));
3461
3469
  return {
3470
+ corpusKeys: [
3471
+ ...new Set(entries.flatMap((entry) => entry.response.corpusKeys ?? []))
3472
+ ],
3462
3473
  entries,
3463
3474
  leaderboard,
3464
3475
  summary: summarizeRAGRetrievalComparison(entries),
@@ -3491,6 +3502,7 @@ var compareRAGRetrievalTraceSummaries = (current, previous) => ({
3491
3502
  });
3492
3503
  var buildSearchTraceResultSnapshots = (results) => results.map((result) => ({
3493
3504
  chunkId: result.chunkId,
3505
+ corpusKey: result.corpusKey ?? (typeof result.metadata?.corpusKey === "string" ? result.metadata.corpusKey : undefined),
3494
3506
  documentId: typeof result.metadata?.documentId === "string" ? result.metadata.documentId : undefined,
3495
3507
  score: result.score,
3496
3508
  source: result.source,
@@ -3690,6 +3702,7 @@ var summarizeRAGEvaluationCase = ({
3690
3702
  const status = expectedCount === 0 ? "partial" : matchedCount === expectedCount ? "pass" : matchedCount > 0 ? "partial" : "fail";
3691
3703
  return {
3692
3704
  caseId: caseInput.id ?? `case-${caseIndex + 1}`,
3705
+ corpusKey: caseInput.corpusKey,
3693
3706
  elapsedMs,
3694
3707
  expectedCount,
3695
3708
  expectedIds,
@@ -4289,10 +4302,14 @@ var buildProvenanceLabel2 = (metadata) => {
4289
4302
  const transcriptSource = getContextString2(metadata.transcriptSource);
4290
4303
  const pdfTextMode = getContextString2(metadata.pdfTextMode);
4291
4304
  const ocrEngine = getContextString2(metadata.ocrEngine);
4305
+ const extractorRegistryMatch = getContextString2(metadata.extractorRegistryMatch);
4306
+ const chunkingProfile = getContextString2(metadata.chunkingProfile);
4292
4307
  const ocrConfidence = getContextNumber2(metadata.ocrRegionConfidence) ?? getContextNumber2(metadata.ocrConfidence);
4293
4308
  const labels = [
4294
4309
  pdfTextMode ? `PDF ${pdfTextMode}` : "",
4295
4310
  ocrEngine ? `OCR ${ocrEngine}` : "",
4311
+ extractorRegistryMatch ? `Extractor ${extractorRegistryMatch}` : "",
4312
+ chunkingProfile ? `Chunking ${chunkingProfile}` : "",
4296
4313
  typeof ocrConfidence === "number" ? `Confidence ${ocrConfidence.toFixed(2)}` : "",
4297
4314
  mediaKind ? `Media ${mediaKind}` : "",
4298
4315
  transcriptSource ? `Transcript ${transcriptSource}` : "",
@@ -5721,73 +5738,73 @@ var buildRAGAnswerGroundingHistoryPresentation = (history) => ({
5721
5738
  import { onUnmounted, ref, shallowRef } from "vue";
5722
5739
 
5723
5740
  // src/ai/client/actions.ts
5724
- var serverMessageToAction = (msg) => {
5725
- switch (msg.type) {
5741
+ var serverMessageToAction = (message) => {
5742
+ switch (message.type) {
5726
5743
  case "chunk":
5727
5744
  return {
5728
- content: msg.content,
5729
- conversationId: msg.conversationId,
5730
- messageId: msg.messageId,
5745
+ content: message.content,
5746
+ conversationId: message.conversationId,
5747
+ messageId: message.messageId,
5731
5748
  type: "chunk"
5732
5749
  };
5733
5750
  case "thinking":
5734
5751
  return {
5735
- content: msg.content,
5736
- conversationId: msg.conversationId,
5737
- messageId: msg.messageId,
5752
+ content: message.content,
5753
+ conversationId: message.conversationId,
5754
+ messageId: message.messageId,
5738
5755
  type: "thinking"
5739
5756
  };
5740
5757
  case "tool_status":
5741
5758
  return {
5742
- conversationId: msg.conversationId,
5743
- input: msg.input,
5744
- messageId: msg.messageId,
5745
- name: msg.name,
5746
- result: msg.result,
5747
- status: msg.status,
5759
+ conversationId: message.conversationId,
5760
+ input: message.input,
5761
+ messageId: message.messageId,
5762
+ name: message.name,
5763
+ result: message.result,
5764
+ status: message.status,
5748
5765
  type: "tool_status"
5749
5766
  };
5750
5767
  case "image":
5751
5768
  return {
5752
- conversationId: msg.conversationId,
5753
- data: msg.data,
5754
- format: msg.format,
5755
- imageId: msg.imageId,
5756
- isPartial: msg.isPartial,
5757
- messageId: msg.messageId,
5758
- revisedPrompt: msg.revisedPrompt,
5769
+ conversationId: message.conversationId,
5770
+ data: message.data,
5771
+ format: message.format,
5772
+ imageId: message.imageId,
5773
+ isPartial: message.isPartial,
5774
+ messageId: message.messageId,
5775
+ revisedPrompt: message.revisedPrompt,
5759
5776
  type: "image"
5760
5777
  };
5761
5778
  case "complete":
5762
5779
  return {
5763
- conversationId: msg.conversationId,
5764
- durationMs: msg.durationMs,
5765
- messageId: msg.messageId,
5766
- model: msg.model,
5767
- sources: msg.sources,
5780
+ conversationId: message.conversationId,
5781
+ durationMs: message.durationMs,
5782
+ messageId: message.messageId,
5783
+ model: message.model,
5784
+ sources: message.sources,
5768
5785
  type: "complete",
5769
- usage: msg.usage
5786
+ usage: message.usage
5770
5787
  };
5771
5788
  case "rag_retrieving":
5772
5789
  return {
5773
- conversationId: msg.conversationId,
5774
- messageId: msg.messageId,
5775
- retrievalStartedAt: msg.retrievalStartedAt,
5790
+ conversationId: message.conversationId,
5791
+ messageId: message.messageId,
5792
+ retrievalStartedAt: message.retrievalStartedAt,
5776
5793
  type: "rag_retrieving"
5777
5794
  };
5778
5795
  case "rag_retrieved":
5779
5796
  return {
5780
- conversationId: msg.conversationId,
5781
- messageId: msg.messageId,
5782
- retrievalDurationMs: msg.retrievalDurationMs,
5783
- retrievalStartedAt: msg.retrievalStartedAt,
5784
- retrievedAt: msg.retrievedAt,
5785
- sources: msg.sources,
5786
- trace: msg.trace,
5797
+ conversationId: message.conversationId,
5798
+ messageId: message.messageId,
5799
+ retrievalDurationMs: message.retrievalDurationMs,
5800
+ retrievalStartedAt: message.retrievalStartedAt,
5801
+ retrievedAt: message.retrievedAt,
5802
+ sources: message.sources,
5803
+ trace: message.trace,
5787
5804
  type: "rag_retrieved"
5788
5805
  };
5789
5806
  case "error":
5790
- return { message: msg.message, type: "error" };
5807
+ return { message: message.message, type: "error" };
5791
5808
  default:
5792
5809
  return null;
5793
5810
  }
@@ -6249,8 +6266,8 @@ var useAIStream = (path, conversationId) => {
6249
6266
  }
6250
6267
  };
6251
6268
  unsubscribeStore = store.subscribe(syncState);
6252
- unsubscribeConnection = connection.subscribe((msg) => {
6253
- const action = serverMessageToAction(msg);
6269
+ unsubscribeConnection = connection.subscribe((message) => {
6270
+ const action = serverMessageToAction(message);
6254
6271
  if (action) {
6255
6272
  store.dispatch(action);
6256
6273
  }
@@ -8223,5 +8240,5 @@ export {
8223
8240
  AIStreamKey
8224
8241
  };
8225
8242
 
8226
- //# debugId=044DA3D708DF041064756E2164756E21
8243
+ //# debugId=588CD05E6FC4209364756E2164756E21
8227
8244
  //# sourceMappingURL=index.js.map