@absolutejs/absolute 0.19.0-beta.544 → 0.19.0-beta.545
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ai/client/index.js +230 -4
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/index.js +236 -7
- package/dist/ai/index.js.map +4 -4
- package/dist/angular/ai/index.js +227 -1
- package/dist/angular/ai/index.js.map +3 -3
- package/dist/angular/index.js +2 -2
- package/dist/angular/index.js.map +1 -1
- package/dist/angular/server.js +2 -2
- package/dist/angular/server.js.map +1 -1
- package/dist/build.js +2 -2
- package/dist/build.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/react/ai/index.js +230 -4
- package/dist/react/ai/index.js.map +4 -4
- package/dist/src/ai/index.d.ts +1 -1
- package/dist/src/ai/rag/index.d.ts +2 -2
- package/dist/src/ai/rag/presentation.d.ts +4 -1
- package/dist/src/ai/rag/quality.d.ts +5 -5
- package/dist/svelte/ai/index.js +230 -4
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +19 -2
- package/dist/vue/ai/index.js +230 -4
- package/dist/vue/ai/index.js.map +4 -4
- package/package.json +7 -7
package/dist/src/ai/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { aiChat } from '../plugins/aiChat';
|
|
2
2
|
export { streamAI } from './streamAI';
|
|
3
3
|
export { ragChat } from './rag';
|
|
4
|
-
export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows,
|
|
4
|
+
export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGGroundingProviderPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGQualityOverviewPresentation, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGContext, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGRetrievalComparisonOverviewPresentation, buildRAGRetrievalComparisonPresentations, buildRAGRerankerComparisonOverviewPresentation, buildRAGRerankerComparisonPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, buildRAGEvaluationLeaderboard, buildRAGEvaluationHistoryRows, buildRAGEvaluationResponse, buildRAGEvaluationRunDiff, compareRAGRetrievalStrategies, compareRAGRerankers, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGBunS3SyncClient, createRAGFileEvaluationHistoryStore, createRAGEvaluationSuite, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGGmailEmailSyncClient, createRAGFileSyncStateStore, createRAGGraphEmailSyncClient, createRAGIMAPEmailSyncClient, createRAGStaticEmailSyncClient, createRAGStorageSyncSource, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGLexicalHaystack, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGCorpusHealthPresentation, buildRAGRetrievalTracePresentation, buildRAGReadinessPresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGSyncOverviewPresentation, buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, createBuiltinArchiveExpander, createEmailExtractor, createEPUBExtractor, createLegacyDocumentExtractor, createRAGPDFOCRExtractor, createRAGArchiveExpander, createRAGArchiveFileExtractor, createOfficeDocumentExtractor, createPDFFileExtractor, createRAGCollection, createRAGEmbeddingProvider, createRAGFileExtractor, createRAGImageOCRExtractor, createHeuristicRAGReranker, createHeuristicRAGQueryTransform, createRAGHTMXConfig, createRAGMediaFileExtractor, createRAGMediaTranscriber, createRAGSyncManager, createRAGSyncScheduler, createRAGOCRProvider, createRAGUrlSyncSource, createRAGQueryTransform, createRAGReranker, formatRAGTraceValue, fuseRAGQueryResults, createTextFileExtractor, createRAGHTMXWorkflowRenderConfig, alibabaEmbeddings, anthropicOCR, deepseekEmbeddings, geminiEmbeddings, geminiOCR, getLatestAssistantMessage, getLatestRAGSources, buildRAGStreamProgress, googleEmbeddings, ingestDocuments, ingestRAGDocuments, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentFromURL, loadRAGDocumentsFromURLs, metaEmbeddings, mistralaiEmbeddings, moonshotEmbeddings, ollamaEmbeddings, ollamaOCR, ollamaTranscriber, openaiCompatibleEmbeddings, openaiCompatibleOCR, openaiCompatibleTranscriber, openaiEmbeddings, openaiOCR, openaiTranscriber, prepareRAGDirectoryDocuments, buildRAGUpsertInputFromUploads, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments, ragPlugin, resolveRAGQueryTransform, resolveRAGEmbeddingProvider, resolveRAGHybridSearchOptions, resolveRAGReranker, resolveRAGStreamStage, searchDocuments, scoreRAGLexicalMatch, applyRAGReranking, applyRAGQueryTransform, validateRAGEmbeddingDimensions, xaiEmbeddings } from './rag';
|
|
5
5
|
export { createInMemoryRAGStore } from './rag/adapters/inMemory';
|
|
6
6
|
export { createSQLiteRAGStore } from './rag/adapters/sqlite';
|
|
7
7
|
export { resolveAbsoluteSQLiteVec, resolveAbsoluteSQLiteVecExtensionPath } from './rag/resolveAbsoluteSQLiteVec';
|
|
@@ -8,9 +8,9 @@ export { alibabaEmbeddings, deepseekEmbeddings, geminiEmbeddings, googleEmbeddin
|
|
|
8
8
|
export { anthropicOCR, geminiOCR, ollamaOCR, ollamaTranscriber, openaiCompatibleOCR, openaiCompatibleTranscriber, openaiOCR, openaiTranscriber } from './extractorProviders';
|
|
9
9
|
export { createRAGGmailEmailSyncClient, createRAGGraphEmailSyncClient, createRAGIMAPEmailSyncClient } from './emailProviders';
|
|
10
10
|
export { buildRAGUpsertInputFromDirectory, buildRAGUpsertInputFromDocuments, buildRAGUpsertInputFromUploads, createBuiltinArchiveExpander, createEmailExtractor, createEPUBExtractor, createLegacyDocumentExtractor, createRAGPDFOCRExtractor, createRAGArchiveExpander, createRAGArchiveFileExtractor, createOfficeDocumentExtractor, createPDFFileExtractor, createRAGFileExtractor, createRAGImageOCRExtractor, createRAGMediaFileExtractor, createRAGMediaTranscriber, createRAGOCRProvider, createTextFileExtractor, loadRAGDocumentFromURL, loadRAGDocumentUpload, loadRAGDocumentsFromUploads, buildRAGUpsertInputFromURLs, loadRAGDocumentFile, loadRAGDocumentsFromDirectory, loadRAGDocumentsFromURLs, prepareRAGDirectoryDocuments, prepareRAGDocument, prepareRAGDocumentFile, prepareRAGDocuments } from './ingestion';
|
|
11
|
-
export { buildRAGAnswerWorkflowState, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGRetrievalTracePresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, formatRAGTraceValue, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
|
|
11
|
+
export { buildRAGAnswerWorkflowState, buildRAGCitations, buildRAGCitationReferenceMap, buildRAGGroundedAnswer, buildRAGGroundingReferences, buildRAGCorpusHealthPresentation, buildRAGReadinessPresentation, buildRAGRetrievalTracePresentation, buildRAGSyncOverviewPresentation, buildRAGSourceGroups, buildRAGSourceSummaries, buildRAGStreamProgress, formatRAGTraceValue, getLatestAssistantMessage, getLatestRAGSources, resolveRAGStreamStage } from './presentation';
|
|
12
12
|
export { buildRAGContext } from './types';
|
|
13
|
-
export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows,
|
|
13
|
+
export { buildRAGAnswerGroundingCaseDifficultyLeaderboard, buildRAGAnswerGroundingCaseSnapshotPresentations, buildRAGAnswerGroundingHistoryPresentation, buildRAGAnswerGroundingHistoryRows, buildRAGGroundingProviderPresentations, buildRAGGroundingProviderOverviewPresentation, buildRAGGroundingProviderCaseComparisonPresentations, buildRAGQualityOverviewPresentation, buildRAGAnswerGroundingCaseDifficultyRunDiff, buildRAGAnswerGroundingEvaluationResponse, buildRAGAnswerGroundingEvaluationLeaderboard, buildRAGAnswerGroundingEvaluationRunDiff, buildRAGComparisonTraceDiffRows, buildRAGComparisonTraceSummaryRows, buildRAGRetrievalComparisonOverviewPresentation, buildRAGRetrievalComparisonPresentations, buildRAGRerankerComparisonOverviewPresentation, buildRAGRerankerComparisonPresentations, buildRAGEvaluationCaseTracePresentations, buildRAGEvaluationHistoryPresentation, buildRAGEvaluationLeaderboard, buildRAGEvaluationHistoryRows, buildRAGEvaluationResponse, buildRAGEvaluationRunDiff, compareRAGRetrievalStrategies, compareRAGRerankers, createRAGFileAnswerGroundingCaseDifficultyHistoryStore, createRAGFileAnswerGroundingEvaluationHistoryStore, createRAGFileEvaluationHistoryStore, createRAGEvaluationSuite, evaluateRAGAnswerGrounding, evaluateRAGAnswerGroundingCase, evaluateRAGCollection, executeDryRunRAGEvaluation, loadRAGAnswerGroundingCaseDifficultyHistory, loadRAGAnswerGroundingEvaluationHistory, loadRAGEvaluationHistory, persistRAGAnswerGroundingCaseDifficultyRun, persistRAGAnswerGroundingEvaluationRun, persistRAGEvaluationSuiteRun, runRAGEvaluationSuite, summarizeRAGEvaluationCase, summarizeRAGRerankerComparison } from './quality';
|
|
14
14
|
export { createRAGBunS3SyncClient, createRAGDirectorySyncSource, createRAGEmailSyncSource, createRAGFileSyncStateStore, createRAGStaticEmailSyncClient, createRAGStorageSyncSource, createRAGSyncManager, createRAGSyncScheduler, createRAGUrlSyncSource } from './sync';
|
|
15
15
|
export type { RAGStreamProgress, RAGStreamProgressState } from './presentation';
|
|
16
16
|
export { createRAGCollection, ingestDocuments, ingestRAGDocuments, searchDocuments } from './collection';
|
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import type { AIMessage, RAGAnswerWorkflowState, RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundingReference, RAGRetrievalTrace, RAGRetrievalTracePresentation, RAGSourceSummary, RAGStreamStage, RAGSource, RAGSourceGroup } from '../../../types/ai';
|
|
1
|
+
import type { AIMessage, RAGCorpusHealth, RAGCorpusHealthPresentation, RAGExtractorReadiness, RAGReadinessPresentation, RAGSyncSourceRecord, RAGSyncOverviewPresentation, RAGAnswerWorkflowState, RAGCitation, RAGCitationReferenceMap, RAGGroundedAnswer, RAGGroundingReference, RAGRetrievalTrace, RAGRetrievalTracePresentation, RAGSourceSummary, RAGStreamStage, RAGSource, RAGSourceGroup } from '../../../types/ai';
|
|
2
2
|
export declare const formatRAGTraceValue: (value: unknown) => string;
|
|
3
3
|
export declare const buildRAGRetrievalTracePresentation: (trace?: RAGRetrievalTrace) => RAGRetrievalTracePresentation;
|
|
4
|
+
export declare const buildRAGReadinessPresentation: (readiness?: RAGExtractorReadiness) => RAGReadinessPresentation;
|
|
5
|
+
export declare const buildRAGCorpusHealthPresentation: (health?: RAGCorpusHealth) => RAGCorpusHealthPresentation;
|
|
6
|
+
export declare const buildRAGSyncOverviewPresentation: (sources?: RAGSyncSourceRecord[]) => RAGSyncOverviewPresentation;
|
|
4
7
|
export declare const buildRAGCitationReferenceMap: (citations: RAGCitation[]) => RAGCitationReferenceMap;
|
|
5
8
|
export declare const buildRAGCitations: (sources: RAGSource[]) => RAGCitation[];
|
|
6
9
|
export declare const buildRAGGroundedAnswer: (content: string, sources: RAGSource[]) => RAGGroundedAnswer;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { RAGAnswerGroundingCaseDifficultyHistory, RAGAnswerGroundingCaseDifficultyHistoryStore, RAGAnswerGroundingCaseDifficultyRun, RAGAnswerGroundingCaseDifficultyRunDiff, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseDifficultyEntry, RAGAnswerGroundingCaseSnapshotPresentation, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingHistoryPresentation, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseTracePresentation, RAGEvaluationCaseTraceSnapshot, RAGEvaluationCaseResult, RAGEvaluationHistoryPresentation, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow,
|
|
1
|
+
import type { RAGAnswerGroundingCaseDifficultyHistory, RAGAnswerGroundingCaseDifficultyHistoryStore, RAGAnswerGroundingCaseDifficultyRun, RAGAnswerGroundingCaseDifficultyRunDiff, RAGAnswerGroundingEvaluationCase, RAGAnswerGroundingEvaluationCaseDifficultyEntry, RAGAnswerGroundingCaseSnapshotPresentation, RAGAnswerGroundingEvaluationCaseResult, RAGAnswerGroundingEvaluationHistory, RAGAnswerGroundingHistoryPresentation, RAGAnswerGroundingEvaluationLeaderboardEntry, RAGAnswerGroundingEvaluationHistoryStore, RAGAnswerGroundingEvaluationInput, RAGAnswerGroundingEvaluationResponse, RAGAnswerGroundingEvaluationRun, RAGAnswerGroundingEvaluationRunDiff, RAGCollection, RAGEvaluationCase, RAGEvaluationCaseTracePresentation, RAGEvaluationCaseTraceSnapshot, RAGEvaluationCaseResult, RAGEvaluationHistoryPresentation, RAGEvaluationHistory, RAGEvaluationHistoryStore, RAGEvaluationInput, RAGEvaluationLeaderboardEntry, RAGEvaluationResponse, RAGEvaluationRunDiff, RAGLabelValueRow, RAGComparisonPresentation, RAGComparisonOverviewPresentation, RAGGroundingProviderPresentation, RAGGroundingProviderOverviewPresentation, RAGGroundingProviderCaseComparisonPresentation, RAGQualityOverviewPresentation, RAGEvaluationSuite, RAGEvaluationSuiteRun, RAGRetrievalCandidate, RAGRetrievalComparison, RAGRetrievalComparisonEntry, RAGRetrievalTraceComparisonSummary, RAGRetrievalComparisonSummary, RAGRerankerCandidate, RAGRerankerComparison, RAGRerankerComparisonEntry, RAGRerankerComparisonSummary, RAGRerankerProviderLike } from '../../../types/ai';
|
|
2
2
|
export declare const buildRAGEvaluationLeaderboard: (runs: RAGEvaluationSuiteRun[]) => RAGEvaluationLeaderboardEntry[];
|
|
3
3
|
export declare const buildRAGAnswerGroundingEvaluationLeaderboard: (runs: RAGAnswerGroundingEvaluationRun[]) => RAGAnswerGroundingEvaluationLeaderboardEntry[];
|
|
4
4
|
export declare const buildRAGAnswerGroundingCaseDifficultyLeaderboard: (entries: Array<{
|
|
@@ -11,16 +11,16 @@ export declare const buildRAGAnswerGroundingCaseDifficultyRunDiff: ({ current, p
|
|
|
11
11
|
}) => RAGAnswerGroundingCaseDifficultyRunDiff;
|
|
12
12
|
export declare const buildRAGComparisonTraceSummaryRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
|
|
13
13
|
export declare const buildRAGComparisonTraceDiffRows: (entry: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry, leader?: RAGRerankerComparisonEntry | RAGRetrievalComparisonEntry) => RAGLabelValueRow[];
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const buildRAGRetrievalComparisonPresentations: (comparison: RAGRetrievalComparison) => RAGComparisonPresentation[];
|
|
15
15
|
export declare const buildRAGRetrievalComparisonOverviewPresentation: (comparison: RAGRetrievalComparison) => RAGComparisonOverviewPresentation;
|
|
16
|
-
export declare const
|
|
16
|
+
export declare const buildRAGRerankerComparisonPresentations: (comparison: RAGRerankerComparison) => RAGComparisonPresentation[];
|
|
17
17
|
export declare const buildRAGRerankerComparisonOverviewPresentation: (comparison: RAGRerankerComparison) => RAGComparisonOverviewPresentation;
|
|
18
|
-
export declare const
|
|
18
|
+
export declare const buildRAGGroundingProviderPresentations: (entries: Array<{
|
|
19
19
|
providerKey: string;
|
|
20
20
|
label: string;
|
|
21
21
|
elapsedMs: number;
|
|
22
22
|
response: RAGAnswerGroundingEvaluationResponse;
|
|
23
|
-
}>) =>
|
|
23
|
+
}>) => RAGGroundingProviderPresentation[];
|
|
24
24
|
export declare const buildRAGGroundingProviderOverviewPresentation: (input: {
|
|
25
25
|
entries: Array<{
|
|
26
26
|
providerKey: string;
|
package/dist/svelte/ai/index.js
CHANGED
|
@@ -1201,6 +1201,232 @@ var buildRAGRetrievalTracePresentation = (trace) => {
|
|
|
1201
1201
|
steps
|
|
1202
1202
|
};
|
|
1203
1203
|
};
|
|
1204
|
+
var formatCompactList = (values) => values && values.length > 0 ? values.join(", ") : "none";
|
|
1205
|
+
var formatCoverageMap = (entries) => {
|
|
1206
|
+
if (!entries) {
|
|
1207
|
+
return "none";
|
|
1208
|
+
}
|
|
1209
|
+
const values = Object.entries(entries);
|
|
1210
|
+
return values.length > 0 ? values.map(([key, value]) => `${key} ${value}`).join(" \xB7 ") : "none";
|
|
1211
|
+
};
|
|
1212
|
+
var formatDurationLabel = (value) => {
|
|
1213
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1214
|
+
return "n/a";
|
|
1215
|
+
}
|
|
1216
|
+
if (value < 1000) {
|
|
1217
|
+
return `${value}ms`;
|
|
1218
|
+
}
|
|
1219
|
+
if (value < 60000) {
|
|
1220
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
1221
|
+
}
|
|
1222
|
+
if (value < 3600000) {
|
|
1223
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
1224
|
+
}
|
|
1225
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
1226
|
+
};
|
|
1227
|
+
var formatDateLabel = (value) => typeof value === "number" && Number.isFinite(value) ? new Date(value).toLocaleString("en-US") : "n/a";
|
|
1228
|
+
var formatAgeLabel = (value) => {
|
|
1229
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1230
|
+
return "n/a";
|
|
1231
|
+
}
|
|
1232
|
+
if (value < 1000) {
|
|
1233
|
+
return `${Math.round(value)}ms`;
|
|
1234
|
+
}
|
|
1235
|
+
if (value < 60000) {
|
|
1236
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
1237
|
+
}
|
|
1238
|
+
if (value < 3600000) {
|
|
1239
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
1240
|
+
}
|
|
1241
|
+
if (value < 86400000) {
|
|
1242
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
1243
|
+
}
|
|
1244
|
+
return `${(value / 86400000).toFixed(value >= 864000000 ? 0 : 1)}d`;
|
|
1245
|
+
};
|
|
1246
|
+
var buildSyncOverviewLatestRow = (sources) => {
|
|
1247
|
+
const latest = [...sources].filter((record) => typeof record.lastSuccessfulSyncAt === "number" || typeof record.lastSyncedAt === "number").sort((left, right) => (right.lastSuccessfulSyncAt ?? right.lastSyncedAt ?? 0) - (left.lastSuccessfulSyncAt ?? left.lastSyncedAt ?? 0))[0];
|
|
1248
|
+
if (!latest) {
|
|
1249
|
+
return {
|
|
1250
|
+
label: "Latest sync",
|
|
1251
|
+
value: "No completed run yet"
|
|
1252
|
+
};
|
|
1253
|
+
}
|
|
1254
|
+
return {
|
|
1255
|
+
label: "Latest sync",
|
|
1256
|
+
value: [
|
|
1257
|
+
latest.label,
|
|
1258
|
+
typeof latest.documentCount === "number" ? `${latest.documentCount} docs` : "",
|
|
1259
|
+
typeof latest.chunkCount === "number" ? `${latest.chunkCount} chunks` : "",
|
|
1260
|
+
typeof latest.lastSyncDurationMs === "number" ? formatDurationLabel(latest.lastSyncDurationMs) : "",
|
|
1261
|
+
typeof latest.lastSuccessfulSyncAt === "number" ? formatDateLabel(latest.lastSuccessfulSyncAt) : typeof latest.lastSyncedAt === "number" ? formatDateLabel(latest.lastSyncedAt) : ""
|
|
1262
|
+
].filter(Boolean).join(" \xB7 ")
|
|
1263
|
+
};
|
|
1264
|
+
};
|
|
1265
|
+
var buildRAGReadinessPresentation = (readiness) => {
|
|
1266
|
+
if (!readiness) {
|
|
1267
|
+
return {
|
|
1268
|
+
sections: [
|
|
1269
|
+
{
|
|
1270
|
+
label: "Provider",
|
|
1271
|
+
title: "Unavailable",
|
|
1272
|
+
summary: "Readiness data is not available yet."
|
|
1273
|
+
}
|
|
1274
|
+
]
|
|
1275
|
+
};
|
|
1276
|
+
}
|
|
1277
|
+
return {
|
|
1278
|
+
sections: [
|
|
1279
|
+
{
|
|
1280
|
+
label: "Provider",
|
|
1281
|
+
title: readiness.providerConfigured ? readiness.providerName ?? "Runtime provider routing" : "Not configured",
|
|
1282
|
+
summary: readiness.providerConfigured ? readiness.model ? `Requests route through ${readiness.providerName ?? "the runtime provider registry"} with default model ${readiness.model}.` : `Requests route through ${readiness.providerName ?? "the runtime provider registry"}.` : "Provider-backed retrieval is not configured yet."
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
label: "Embeddings",
|
|
1286
|
+
title: readiness.embeddingConfigured ? readiness.embeddingModel === "collection-managed embeddings" ? "Collection-managed" : "Configured" : "Missing",
|
|
1287
|
+
summary: readiness.embeddingConfigured ? readiness.embeddingModel === "collection-managed embeddings" ? "Embeddings come from the collection and vector store layer, so retrieval stays vector-backed without a separate top-level embedding provider." : readiness.embeddingModel ?? "Embedding model configured." : "Embeddings are not configured yet."
|
|
1288
|
+
},
|
|
1289
|
+
{
|
|
1290
|
+
label: "Retrieval Stack",
|
|
1291
|
+
title: readiness.rerankerConfigured ? "Reranker ready" : "Vector only",
|
|
1292
|
+
summary: readiness.indexManagerConfigured ? "Index manager configured." : "Index manager not configured."
|
|
1293
|
+
},
|
|
1294
|
+
{
|
|
1295
|
+
label: "Extractors",
|
|
1296
|
+
title: readiness.extractorsConfigured ? `${readiness.extractorNames.length} configured` : "None configured",
|
|
1297
|
+
summary: readiness.extractorsConfigured ? `Configured extractors: ${formatCompactList(readiness.extractorNames)}` : "No extractors configured.",
|
|
1298
|
+
pills: readiness.extractorNames.length > 0 ? readiness.extractorNames : ["No extractors configured"]
|
|
1299
|
+
}
|
|
1300
|
+
]
|
|
1301
|
+
};
|
|
1302
|
+
};
|
|
1303
|
+
var buildRAGCorpusHealthPresentation = (health) => {
|
|
1304
|
+
if (!health) {
|
|
1305
|
+
return {
|
|
1306
|
+
sections: [
|
|
1307
|
+
{
|
|
1308
|
+
label: "Corpus health",
|
|
1309
|
+
title: "Unavailable",
|
|
1310
|
+
summary: "Corpus health is not available yet."
|
|
1311
|
+
}
|
|
1312
|
+
]
|
|
1313
|
+
};
|
|
1314
|
+
}
|
|
1315
|
+
return {
|
|
1316
|
+
sections: [
|
|
1317
|
+
{
|
|
1318
|
+
label: "Corpus coverage",
|
|
1319
|
+
title: `Formats: ${formatCoverageMap(health.coverageByFormat)}`,
|
|
1320
|
+
summary: `Kinds: ${formatCoverageMap(health.coverageByKind)}`,
|
|
1321
|
+
rows: [
|
|
1322
|
+
{
|
|
1323
|
+
label: "Average chunks per document",
|
|
1324
|
+
value: health.averageChunksPerDocument.toFixed(2)
|
|
1325
|
+
}
|
|
1326
|
+
]
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
label: "Chunk quality",
|
|
1330
|
+
title: `${health.averageChunksPerDocument.toFixed(2)} avg chunks/doc`,
|
|
1331
|
+
summary: `Empty docs ${health.emptyDocuments} \xB7 empty chunks ${health.emptyChunks} \xB7 low signal ${health.lowSignalChunks}`,
|
|
1332
|
+
rows: [
|
|
1333
|
+
{
|
|
1334
|
+
label: "Missing source",
|
|
1335
|
+
value: String(health.documentsMissingSource)
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
label: "Missing title",
|
|
1339
|
+
value: String(health.documentsMissingTitle)
|
|
1340
|
+
},
|
|
1341
|
+
{
|
|
1342
|
+
label: "Missing metadata",
|
|
1343
|
+
value: String(health.documentsMissingMetadata)
|
|
1344
|
+
}
|
|
1345
|
+
]
|
|
1346
|
+
},
|
|
1347
|
+
{
|
|
1348
|
+
label: "Freshness",
|
|
1349
|
+
title: `${health.staleDocuments.length} stale docs`,
|
|
1350
|
+
summary: `Stale threshold ${formatAgeLabel(health.staleAfterMs)}`,
|
|
1351
|
+
rows: [
|
|
1352
|
+
{
|
|
1353
|
+
label: "Oldest age",
|
|
1354
|
+
value: formatAgeLabel(health.oldestDocumentAgeMs)
|
|
1355
|
+
},
|
|
1356
|
+
{
|
|
1357
|
+
label: "Newest age",
|
|
1358
|
+
value: formatAgeLabel(health.newestDocumentAgeMs)
|
|
1359
|
+
}
|
|
1360
|
+
]
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
label: "Failures",
|
|
1364
|
+
title: `${health.failedIngestJobs} ingest \xB7 ${health.failedAdminJobs} admin`,
|
|
1365
|
+
summary: `Duplicate sources ${health.duplicateSourceGroups.length} \xB7 duplicate ids ${health.duplicateDocumentIdGroups.length}`,
|
|
1366
|
+
rows: [
|
|
1367
|
+
{
|
|
1368
|
+
label: "Failures by input",
|
|
1369
|
+
value: formatCoverageMap(health.failuresByInputKind)
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
label: "Failures by extractor",
|
|
1373
|
+
value: formatCoverageMap(health.failuresByExtractor)
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
label: "Failures by admin action",
|
|
1377
|
+
value: formatCoverageMap(health.failuresByAdminAction)
|
|
1378
|
+
}
|
|
1379
|
+
]
|
|
1380
|
+
}
|
|
1381
|
+
]
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
var buildRAGSyncOverviewPresentation = (sources) => {
|
|
1385
|
+
const records = sources ?? [];
|
|
1386
|
+
if (records.length === 0) {
|
|
1387
|
+
return {
|
|
1388
|
+
rows: [
|
|
1389
|
+
{ label: "Configured sync sources", value: "0" },
|
|
1390
|
+
{
|
|
1391
|
+
label: "Latest sync",
|
|
1392
|
+
value: "No sync sources configured yet."
|
|
1393
|
+
}
|
|
1394
|
+
],
|
|
1395
|
+
sections: [
|
|
1396
|
+
{
|
|
1397
|
+
label: "Sync overview",
|
|
1398
|
+
title: "No sync sources configured",
|
|
1399
|
+
summary: "Add sync sources to monitor directories, URLs, storage, or mailboxes."
|
|
1400
|
+
}
|
|
1401
|
+
]
|
|
1402
|
+
};
|
|
1403
|
+
}
|
|
1404
|
+
const countByStatus = (status) => records.filter((record) => record.status === status).length;
|
|
1405
|
+
return {
|
|
1406
|
+
rows: [
|
|
1407
|
+
{ label: "Configured sync sources", value: String(records.length) },
|
|
1408
|
+
{ label: "Completed", value: String(countByStatus("completed")) },
|
|
1409
|
+
{ label: "Running", value: String(countByStatus("running")) },
|
|
1410
|
+
{
|
|
1411
|
+
label: "Failed",
|
|
1412
|
+
value: String(countByStatus("failed"))
|
|
1413
|
+
},
|
|
1414
|
+
buildSyncOverviewLatestRow(records)
|
|
1415
|
+
],
|
|
1416
|
+
sections: [
|
|
1417
|
+
{
|
|
1418
|
+
label: "Sync overview",
|
|
1419
|
+
title: `${records.length} configured`,
|
|
1420
|
+
summary: `${countByStatus("completed")} completed \xB7 ${countByStatus("running")} running \xB7 ${countByStatus("failed")} failed`
|
|
1421
|
+
},
|
|
1422
|
+
{
|
|
1423
|
+
label: "Latest sync",
|
|
1424
|
+
title: buildSyncOverviewLatestRow(records).value,
|
|
1425
|
+
summary: "Most recent completed or last-known sync activity."
|
|
1426
|
+
}
|
|
1427
|
+
]
|
|
1428
|
+
};
|
|
1429
|
+
};
|
|
1204
1430
|
var formatMediaTimestamp = (value) => {
|
|
1205
1431
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
1206
1432
|
return;
|
|
@@ -2436,7 +2662,7 @@ var buildRAGComparisonTraceDiffRows = (entry, leader) => {
|
|
|
2436
2662
|
}
|
|
2437
2663
|
return rows;
|
|
2438
2664
|
};
|
|
2439
|
-
var
|
|
2665
|
+
var buildRAGRetrievalComparisonPresentations = (comparison) => {
|
|
2440
2666
|
const leader = comparison.entries[0];
|
|
2441
2667
|
return comparison.entries.map((entry) => ({
|
|
2442
2668
|
diffLabel: leader?.label ?? "Leader",
|
|
@@ -2453,7 +2679,7 @@ var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildCompa
|
|
|
2453
2679
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
|
|
2454
2680
|
summary: comparison.summary
|
|
2455
2681
|
});
|
|
2456
|
-
var
|
|
2682
|
+
var buildRAGRerankerComparisonPresentations = (comparison) => {
|
|
2457
2683
|
const leader = comparison.entries[0];
|
|
2458
2684
|
return comparison.entries.map((entry) => ({
|
|
2459
2685
|
diffLabel: leader?.label ?? "Leader",
|
|
@@ -2470,7 +2696,7 @@ var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildCompar
|
|
|
2470
2696
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
|
|
2471
2697
|
summary: comparison.summary
|
|
2472
2698
|
});
|
|
2473
|
-
var
|
|
2699
|
+
var buildRAGGroundingProviderPresentations = (entries) => entries.map((entry) => ({
|
|
2474
2700
|
headline: [
|
|
2475
2701
|
entry.label,
|
|
2476
2702
|
`passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
|
|
@@ -4140,5 +4366,5 @@ export {
|
|
|
4140
4366
|
createAIStream
|
|
4141
4367
|
};
|
|
4142
4368
|
|
|
4143
|
-
//# debugId=
|
|
4369
|
+
//# debugId=E1DB501D9046923864756E2164756E21
|
|
4144
4370
|
//# sourceMappingURL=index.js.map
|