@absolutejs/absolute 0.19.0-beta.544 → 0.19.0-beta.546
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 +233 -11
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/index.js +239 -14
- 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 +233 -11
- 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 +233 -11
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +21 -5
- package/dist/vue/ai/index.js +233 -11
- package/dist/vue/ai/index.js.map +4 -4
- package/package.json +7 -7
package/dist/react/ai/index.js
CHANGED
|
@@ -867,6 +867,232 @@ var buildRAGRetrievalTracePresentation = (trace) => {
|
|
|
867
867
|
steps
|
|
868
868
|
};
|
|
869
869
|
};
|
|
870
|
+
var formatCompactList = (values) => values && values.length > 0 ? values.join(", ") : "none";
|
|
871
|
+
var formatCoverageMap = (entries) => {
|
|
872
|
+
if (!entries) {
|
|
873
|
+
return "none";
|
|
874
|
+
}
|
|
875
|
+
const values = Object.entries(entries);
|
|
876
|
+
return values.length > 0 ? values.map(([key, value]) => `${key} ${value}`).join(" \xB7 ") : "none";
|
|
877
|
+
};
|
|
878
|
+
var formatDurationLabel = (value) => {
|
|
879
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
880
|
+
return "n/a";
|
|
881
|
+
}
|
|
882
|
+
if (value < 1000) {
|
|
883
|
+
return `${value}ms`;
|
|
884
|
+
}
|
|
885
|
+
if (value < 60000) {
|
|
886
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
887
|
+
}
|
|
888
|
+
if (value < 3600000) {
|
|
889
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
890
|
+
}
|
|
891
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
892
|
+
};
|
|
893
|
+
var formatDateLabel = (value) => typeof value === "number" && Number.isFinite(value) ? new Date(value).toLocaleString("en-US") : "n/a";
|
|
894
|
+
var formatAgeLabel = (value) => {
|
|
895
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
896
|
+
return "n/a";
|
|
897
|
+
}
|
|
898
|
+
if (value < 1000) {
|
|
899
|
+
return `${Math.round(value)}ms`;
|
|
900
|
+
}
|
|
901
|
+
if (value < 60000) {
|
|
902
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
903
|
+
}
|
|
904
|
+
if (value < 3600000) {
|
|
905
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
906
|
+
}
|
|
907
|
+
if (value < 86400000) {
|
|
908
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
909
|
+
}
|
|
910
|
+
return `${(value / 86400000).toFixed(value >= 864000000 ? 0 : 1)}d`;
|
|
911
|
+
};
|
|
912
|
+
var buildSyncOverviewLatestRow = (sources) => {
|
|
913
|
+
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];
|
|
914
|
+
if (!latest) {
|
|
915
|
+
return {
|
|
916
|
+
label: "Latest sync",
|
|
917
|
+
value: "No completed run yet"
|
|
918
|
+
};
|
|
919
|
+
}
|
|
920
|
+
return {
|
|
921
|
+
label: "Latest sync",
|
|
922
|
+
value: [
|
|
923
|
+
latest.label,
|
|
924
|
+
typeof latest.documentCount === "number" ? `${latest.documentCount} docs` : "",
|
|
925
|
+
typeof latest.chunkCount === "number" ? `${latest.chunkCount} chunks` : "",
|
|
926
|
+
typeof latest.lastSyncDurationMs === "number" ? formatDurationLabel(latest.lastSyncDurationMs) : "",
|
|
927
|
+
typeof latest.lastSuccessfulSyncAt === "number" ? formatDateLabel(latest.lastSuccessfulSyncAt) : typeof latest.lastSyncedAt === "number" ? formatDateLabel(latest.lastSyncedAt) : ""
|
|
928
|
+
].filter(Boolean).join(" \xB7 ")
|
|
929
|
+
};
|
|
930
|
+
};
|
|
931
|
+
var buildRAGReadinessPresentation = (readiness) => {
|
|
932
|
+
if (!readiness) {
|
|
933
|
+
return {
|
|
934
|
+
sections: [
|
|
935
|
+
{
|
|
936
|
+
label: "Provider",
|
|
937
|
+
title: "Unavailable",
|
|
938
|
+
summary: "Readiness data is not available yet."
|
|
939
|
+
}
|
|
940
|
+
]
|
|
941
|
+
};
|
|
942
|
+
}
|
|
943
|
+
return {
|
|
944
|
+
sections: [
|
|
945
|
+
{
|
|
946
|
+
label: "Provider",
|
|
947
|
+
title: readiness.providerConfigured ? readiness.providerName ?? "Runtime provider routing" : "Not configured",
|
|
948
|
+
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."
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
label: "Embeddings",
|
|
952
|
+
title: readiness.embeddingConfigured ? readiness.embeddingModel === "collection-managed embeddings" ? "Collection-managed" : "Configured" : "Missing",
|
|
953
|
+
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."
|
|
954
|
+
},
|
|
955
|
+
{
|
|
956
|
+
label: "Retrieval Stack",
|
|
957
|
+
title: readiness.rerankerConfigured ? "Reranker ready" : "Vector only",
|
|
958
|
+
summary: readiness.indexManagerConfigured ? "Index manager configured." : "Index manager not configured."
|
|
959
|
+
},
|
|
960
|
+
{
|
|
961
|
+
label: "Extractors",
|
|
962
|
+
title: readiness.extractorsConfigured ? `${readiness.extractorNames.length} configured` : "None configured",
|
|
963
|
+
summary: readiness.extractorsConfigured ? `Configured extractors: ${formatCompactList(readiness.extractorNames)}` : "No extractors configured.",
|
|
964
|
+
tags: readiness.extractorNames.length > 0 ? readiness.extractorNames : ["No extractors configured"]
|
|
965
|
+
}
|
|
966
|
+
]
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
var buildRAGCorpusHealthPresentation = (health) => {
|
|
970
|
+
if (!health) {
|
|
971
|
+
return {
|
|
972
|
+
sections: [
|
|
973
|
+
{
|
|
974
|
+
label: "Corpus health",
|
|
975
|
+
title: "Unavailable",
|
|
976
|
+
summary: "Corpus health is not available yet."
|
|
977
|
+
}
|
|
978
|
+
]
|
|
979
|
+
};
|
|
980
|
+
}
|
|
981
|
+
return {
|
|
982
|
+
sections: [
|
|
983
|
+
{
|
|
984
|
+
label: "Corpus coverage",
|
|
985
|
+
title: `Formats: ${formatCoverageMap(health.coverageByFormat)}`,
|
|
986
|
+
summary: `Kinds: ${formatCoverageMap(health.coverageByKind)}`,
|
|
987
|
+
rows: [
|
|
988
|
+
{
|
|
989
|
+
label: "Average chunks per document",
|
|
990
|
+
value: health.averageChunksPerDocument.toFixed(2)
|
|
991
|
+
}
|
|
992
|
+
]
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
label: "Chunk quality",
|
|
996
|
+
title: `${health.averageChunksPerDocument.toFixed(2)} avg chunks/doc`,
|
|
997
|
+
summary: `Empty docs ${health.emptyDocuments} \xB7 empty chunks ${health.emptyChunks} \xB7 low signal ${health.lowSignalChunks}`,
|
|
998
|
+
rows: [
|
|
999
|
+
{
|
|
1000
|
+
label: "Missing source",
|
|
1001
|
+
value: String(health.documentsMissingSource)
|
|
1002
|
+
},
|
|
1003
|
+
{
|
|
1004
|
+
label: "Missing title",
|
|
1005
|
+
value: String(health.documentsMissingTitle)
|
|
1006
|
+
},
|
|
1007
|
+
{
|
|
1008
|
+
label: "Missing metadata",
|
|
1009
|
+
value: String(health.documentsMissingMetadata)
|
|
1010
|
+
}
|
|
1011
|
+
]
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
label: "Freshness",
|
|
1015
|
+
title: `${health.staleDocuments.length} stale docs`,
|
|
1016
|
+
summary: `Stale threshold ${formatAgeLabel(health.staleAfterMs)}`,
|
|
1017
|
+
rows: [
|
|
1018
|
+
{
|
|
1019
|
+
label: "Oldest age",
|
|
1020
|
+
value: formatAgeLabel(health.oldestDocumentAgeMs)
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
label: "Newest age",
|
|
1024
|
+
value: formatAgeLabel(health.newestDocumentAgeMs)
|
|
1025
|
+
}
|
|
1026
|
+
]
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
label: "Failures",
|
|
1030
|
+
title: `${health.failedIngestJobs} ingest \xB7 ${health.failedAdminJobs} admin`,
|
|
1031
|
+
summary: `Duplicate sources ${health.duplicateSourceGroups.length} \xB7 duplicate ids ${health.duplicateDocumentIdGroups.length}`,
|
|
1032
|
+
rows: [
|
|
1033
|
+
{
|
|
1034
|
+
label: "Failures by input",
|
|
1035
|
+
value: formatCoverageMap(health.failuresByInputKind)
|
|
1036
|
+
},
|
|
1037
|
+
{
|
|
1038
|
+
label: "Failures by extractor",
|
|
1039
|
+
value: formatCoverageMap(health.failuresByExtractor)
|
|
1040
|
+
},
|
|
1041
|
+
{
|
|
1042
|
+
label: "Failures by admin action",
|
|
1043
|
+
value: formatCoverageMap(health.failuresByAdminAction)
|
|
1044
|
+
}
|
|
1045
|
+
]
|
|
1046
|
+
}
|
|
1047
|
+
]
|
|
1048
|
+
};
|
|
1049
|
+
};
|
|
1050
|
+
var buildRAGSyncOverviewPresentation = (sources) => {
|
|
1051
|
+
const records = sources ?? [];
|
|
1052
|
+
if (records.length === 0) {
|
|
1053
|
+
return {
|
|
1054
|
+
rows: [
|
|
1055
|
+
{ label: "Configured sync sources", value: "0" },
|
|
1056
|
+
{
|
|
1057
|
+
label: "Latest sync",
|
|
1058
|
+
value: "No sync sources configured yet."
|
|
1059
|
+
}
|
|
1060
|
+
],
|
|
1061
|
+
sections: [
|
|
1062
|
+
{
|
|
1063
|
+
label: "Sync overview",
|
|
1064
|
+
title: "No sync sources configured",
|
|
1065
|
+
summary: "Add sync sources to monitor directories, URLs, storage, or mailboxes."
|
|
1066
|
+
}
|
|
1067
|
+
]
|
|
1068
|
+
};
|
|
1069
|
+
}
|
|
1070
|
+
const countByStatus = (status) => records.filter((record) => record.status === status).length;
|
|
1071
|
+
return {
|
|
1072
|
+
rows: [
|
|
1073
|
+
{ label: "Configured sync sources", value: String(records.length) },
|
|
1074
|
+
{ label: "Completed", value: String(countByStatus("completed")) },
|
|
1075
|
+
{ label: "Running", value: String(countByStatus("running")) },
|
|
1076
|
+
{
|
|
1077
|
+
label: "Failed",
|
|
1078
|
+
value: String(countByStatus("failed"))
|
|
1079
|
+
},
|
|
1080
|
+
buildSyncOverviewLatestRow(records)
|
|
1081
|
+
],
|
|
1082
|
+
sections: [
|
|
1083
|
+
{
|
|
1084
|
+
label: "Sync overview",
|
|
1085
|
+
title: `${records.length} configured`,
|
|
1086
|
+
summary: `${countByStatus("completed")} completed \xB7 ${countByStatus("running")} running \xB7 ${countByStatus("failed")} failed`
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
label: "Latest sync",
|
|
1090
|
+
title: buildSyncOverviewLatestRow(records).value,
|
|
1091
|
+
summary: "Most recent completed or last-known sync activity."
|
|
1092
|
+
}
|
|
1093
|
+
]
|
|
1094
|
+
};
|
|
1095
|
+
};
|
|
870
1096
|
var formatMediaTimestamp = (value) => {
|
|
871
1097
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
872
1098
|
return;
|
|
@@ -2409,12 +2635,12 @@ var buildRAGComparisonTraceDiffRows = (entry, leader) => {
|
|
|
2409
2635
|
}
|
|
2410
2636
|
return rows;
|
|
2411
2637
|
};
|
|
2412
|
-
var
|
|
2638
|
+
var buildRAGRetrievalComparisonPresentations = (comparison) => {
|
|
2413
2639
|
const leader = comparison.entries[0];
|
|
2414
2640
|
return comparison.entries.map((entry) => ({
|
|
2415
2641
|
diffLabel: leader?.label ?? "Leader",
|
|
2416
2642
|
diffRows: buildRAGComparisonTraceDiffRows(entry, leader),
|
|
2417
|
-
|
|
2643
|
+
summary: formatRetrievalComparisonHeadline(entry),
|
|
2418
2644
|
id: entry.retrievalId,
|
|
2419
2645
|
label: entry.label,
|
|
2420
2646
|
traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
|
|
@@ -2426,12 +2652,12 @@ var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildCompa
|
|
|
2426
2652
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
|
|
2427
2653
|
summary: comparison.summary
|
|
2428
2654
|
});
|
|
2429
|
-
var
|
|
2655
|
+
var buildRAGRerankerComparisonPresentations = (comparison) => {
|
|
2430
2656
|
const leader = comparison.entries[0];
|
|
2431
2657
|
return comparison.entries.map((entry) => ({
|
|
2432
2658
|
diffLabel: leader?.label ?? "Leader",
|
|
2433
2659
|
diffRows: buildRAGComparisonTraceDiffRows(entry, leader),
|
|
2434
|
-
|
|
2660
|
+
summary: formatRerankerComparisonHeadline(entry),
|
|
2435
2661
|
id: entry.rerankerId,
|
|
2436
2662
|
label: entry.label,
|
|
2437
2663
|
traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
|
|
@@ -2443,8 +2669,8 @@ var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildCompar
|
|
|
2443
2669
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
|
|
2444
2670
|
summary: comparison.summary
|
|
2445
2671
|
});
|
|
2446
|
-
var
|
|
2447
|
-
|
|
2672
|
+
var buildRAGGroundingProviderPresentations = (entries) => entries.map((entry) => ({
|
|
2673
|
+
summary: [
|
|
2448
2674
|
entry.label,
|
|
2449
2675
|
`passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
|
|
2450
2676
|
`citation f1 ${entry.response.summary.averageCitationF1.toFixed(3)}`,
|
|
@@ -2495,10 +2721,6 @@ var buildRAGQualityOverviewPresentation = (input) => ({
|
|
|
2495
2721
|
value: "Configure an AI provider to compare grounded answers."
|
|
2496
2722
|
}
|
|
2497
2723
|
]
|
|
2498
|
-
],
|
|
2499
|
-
insights: [
|
|
2500
|
-
"The example should answer three questions quickly: which strategy wins, whether grounding is stable, and whether the result regressed.",
|
|
2501
|
-
"Detailed case-by-case evidence stays behind collapsible sections so the page reads like a product surface instead of a console buffer."
|
|
2502
2724
|
]
|
|
2503
2725
|
});
|
|
2504
2726
|
var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
|
|
@@ -4347,5 +4569,5 @@ export {
|
|
|
4347
4569
|
AIStreamProvider
|
|
4348
4570
|
};
|
|
4349
4571
|
|
|
4350
|
-
//# debugId=
|
|
4572
|
+
//# debugId=F26D9D8F8B95489B64756E2164756E21
|
|
4351
4573
|
//# sourceMappingURL=index.js.map
|