@absolutejs/absolute 0.19.0-beta.543 → 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 +250 -4
- package/dist/ai/client/index.js.map +4 -4
- package/dist/ai/index.js +257 -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/react/ai/index.js +250 -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 +11 -5
- package/dist/svelte/ai/index.js +250 -4
- package/dist/svelte/ai/index.js.map +4 -4
- package/dist/types/ai.d.ts +23 -2
- package/dist/vue/ai/index.js +250 -4
- package/dist/vue/ai/index.js.map +4 -4
- package/package.json +7 -7
package/dist/angular/ai/index.js
CHANGED
|
@@ -941,6 +941,232 @@ var buildRAGRetrievalTracePresentation = (trace) => {
|
|
|
941
941
|
steps
|
|
942
942
|
};
|
|
943
943
|
};
|
|
944
|
+
var formatCompactList = (values) => values && values.length > 0 ? values.join(", ") : "none";
|
|
945
|
+
var formatCoverageMap = (entries) => {
|
|
946
|
+
if (!entries) {
|
|
947
|
+
return "none";
|
|
948
|
+
}
|
|
949
|
+
const values = Object.entries(entries);
|
|
950
|
+
return values.length > 0 ? values.map(([key, value]) => `${key} ${value}`).join(" \xB7 ") : "none";
|
|
951
|
+
};
|
|
952
|
+
var formatDurationLabel = (value) => {
|
|
953
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
954
|
+
return "n/a";
|
|
955
|
+
}
|
|
956
|
+
if (value < 1000) {
|
|
957
|
+
return `${value}ms`;
|
|
958
|
+
}
|
|
959
|
+
if (value < 60000) {
|
|
960
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
961
|
+
}
|
|
962
|
+
if (value < 3600000) {
|
|
963
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
964
|
+
}
|
|
965
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
966
|
+
};
|
|
967
|
+
var formatDateLabel = (value) => typeof value === "number" && Number.isFinite(value) ? new Date(value).toLocaleString("en-US") : "n/a";
|
|
968
|
+
var formatAgeLabel = (value) => {
|
|
969
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
970
|
+
return "n/a";
|
|
971
|
+
}
|
|
972
|
+
if (value < 1000) {
|
|
973
|
+
return `${Math.round(value)}ms`;
|
|
974
|
+
}
|
|
975
|
+
if (value < 60000) {
|
|
976
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
977
|
+
}
|
|
978
|
+
if (value < 3600000) {
|
|
979
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
980
|
+
}
|
|
981
|
+
if (value < 86400000) {
|
|
982
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
983
|
+
}
|
|
984
|
+
return `${(value / 86400000).toFixed(value >= 864000000 ? 0 : 1)}d`;
|
|
985
|
+
};
|
|
986
|
+
var buildSyncOverviewLatestRow = (sources) => {
|
|
987
|
+
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];
|
|
988
|
+
if (!latest) {
|
|
989
|
+
return {
|
|
990
|
+
label: "Latest sync",
|
|
991
|
+
value: "No completed run yet"
|
|
992
|
+
};
|
|
993
|
+
}
|
|
994
|
+
return {
|
|
995
|
+
label: "Latest sync",
|
|
996
|
+
value: [
|
|
997
|
+
latest.label,
|
|
998
|
+
typeof latest.documentCount === "number" ? `${latest.documentCount} docs` : "",
|
|
999
|
+
typeof latest.chunkCount === "number" ? `${latest.chunkCount} chunks` : "",
|
|
1000
|
+
typeof latest.lastSyncDurationMs === "number" ? formatDurationLabel(latest.lastSyncDurationMs) : "",
|
|
1001
|
+
typeof latest.lastSuccessfulSyncAt === "number" ? formatDateLabel(latest.lastSuccessfulSyncAt) : typeof latest.lastSyncedAt === "number" ? formatDateLabel(latest.lastSyncedAt) : ""
|
|
1002
|
+
].filter(Boolean).join(" \xB7 ")
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
var buildRAGReadinessPresentation = (readiness) => {
|
|
1006
|
+
if (!readiness) {
|
|
1007
|
+
return {
|
|
1008
|
+
sections: [
|
|
1009
|
+
{
|
|
1010
|
+
label: "Provider",
|
|
1011
|
+
title: "Unavailable",
|
|
1012
|
+
summary: "Readiness data is not available yet."
|
|
1013
|
+
}
|
|
1014
|
+
]
|
|
1015
|
+
};
|
|
1016
|
+
}
|
|
1017
|
+
return {
|
|
1018
|
+
sections: [
|
|
1019
|
+
{
|
|
1020
|
+
label: "Provider",
|
|
1021
|
+
title: readiness.providerConfigured ? readiness.providerName ?? "Runtime provider routing" : "Not configured",
|
|
1022
|
+
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."
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
label: "Embeddings",
|
|
1026
|
+
title: readiness.embeddingConfigured ? readiness.embeddingModel === "collection-managed embeddings" ? "Collection-managed" : "Configured" : "Missing",
|
|
1027
|
+
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."
|
|
1028
|
+
},
|
|
1029
|
+
{
|
|
1030
|
+
label: "Retrieval Stack",
|
|
1031
|
+
title: readiness.rerankerConfigured ? "Reranker ready" : "Vector only",
|
|
1032
|
+
summary: readiness.indexManagerConfigured ? "Index manager configured." : "Index manager not configured."
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
label: "Extractors",
|
|
1036
|
+
title: readiness.extractorsConfigured ? `${readiness.extractorNames.length} configured` : "None configured",
|
|
1037
|
+
summary: readiness.extractorsConfigured ? `Configured extractors: ${formatCompactList(readiness.extractorNames)}` : "No extractors configured.",
|
|
1038
|
+
pills: readiness.extractorNames.length > 0 ? readiness.extractorNames : ["No extractors configured"]
|
|
1039
|
+
}
|
|
1040
|
+
]
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
var buildRAGCorpusHealthPresentation = (health) => {
|
|
1044
|
+
if (!health) {
|
|
1045
|
+
return {
|
|
1046
|
+
sections: [
|
|
1047
|
+
{
|
|
1048
|
+
label: "Corpus health",
|
|
1049
|
+
title: "Unavailable",
|
|
1050
|
+
summary: "Corpus health is not available yet."
|
|
1051
|
+
}
|
|
1052
|
+
]
|
|
1053
|
+
};
|
|
1054
|
+
}
|
|
1055
|
+
return {
|
|
1056
|
+
sections: [
|
|
1057
|
+
{
|
|
1058
|
+
label: "Corpus coverage",
|
|
1059
|
+
title: `Formats: ${formatCoverageMap(health.coverageByFormat)}`,
|
|
1060
|
+
summary: `Kinds: ${formatCoverageMap(health.coverageByKind)}`,
|
|
1061
|
+
rows: [
|
|
1062
|
+
{
|
|
1063
|
+
label: "Average chunks per document",
|
|
1064
|
+
value: health.averageChunksPerDocument.toFixed(2)
|
|
1065
|
+
}
|
|
1066
|
+
]
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
label: "Chunk quality",
|
|
1070
|
+
title: `${health.averageChunksPerDocument.toFixed(2)} avg chunks/doc`,
|
|
1071
|
+
summary: `Empty docs ${health.emptyDocuments} \xB7 empty chunks ${health.emptyChunks} \xB7 low signal ${health.lowSignalChunks}`,
|
|
1072
|
+
rows: [
|
|
1073
|
+
{
|
|
1074
|
+
label: "Missing source",
|
|
1075
|
+
value: String(health.documentsMissingSource)
|
|
1076
|
+
},
|
|
1077
|
+
{
|
|
1078
|
+
label: "Missing title",
|
|
1079
|
+
value: String(health.documentsMissingTitle)
|
|
1080
|
+
},
|
|
1081
|
+
{
|
|
1082
|
+
label: "Missing metadata",
|
|
1083
|
+
value: String(health.documentsMissingMetadata)
|
|
1084
|
+
}
|
|
1085
|
+
]
|
|
1086
|
+
},
|
|
1087
|
+
{
|
|
1088
|
+
label: "Freshness",
|
|
1089
|
+
title: `${health.staleDocuments.length} stale docs`,
|
|
1090
|
+
summary: `Stale threshold ${formatAgeLabel(health.staleAfterMs)}`,
|
|
1091
|
+
rows: [
|
|
1092
|
+
{
|
|
1093
|
+
label: "Oldest age",
|
|
1094
|
+
value: formatAgeLabel(health.oldestDocumentAgeMs)
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
label: "Newest age",
|
|
1098
|
+
value: formatAgeLabel(health.newestDocumentAgeMs)
|
|
1099
|
+
}
|
|
1100
|
+
]
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
label: "Failures",
|
|
1104
|
+
title: `${health.failedIngestJobs} ingest \xB7 ${health.failedAdminJobs} admin`,
|
|
1105
|
+
summary: `Duplicate sources ${health.duplicateSourceGroups.length} \xB7 duplicate ids ${health.duplicateDocumentIdGroups.length}`,
|
|
1106
|
+
rows: [
|
|
1107
|
+
{
|
|
1108
|
+
label: "Failures by input",
|
|
1109
|
+
value: formatCoverageMap(health.failuresByInputKind)
|
|
1110
|
+
},
|
|
1111
|
+
{
|
|
1112
|
+
label: "Failures by extractor",
|
|
1113
|
+
value: formatCoverageMap(health.failuresByExtractor)
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
label: "Failures by admin action",
|
|
1117
|
+
value: formatCoverageMap(health.failuresByAdminAction)
|
|
1118
|
+
}
|
|
1119
|
+
]
|
|
1120
|
+
}
|
|
1121
|
+
]
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
var buildRAGSyncOverviewPresentation = (sources) => {
|
|
1125
|
+
const records = sources ?? [];
|
|
1126
|
+
if (records.length === 0) {
|
|
1127
|
+
return {
|
|
1128
|
+
rows: [
|
|
1129
|
+
{ label: "Configured sync sources", value: "0" },
|
|
1130
|
+
{
|
|
1131
|
+
label: "Latest sync",
|
|
1132
|
+
value: "No sync sources configured yet."
|
|
1133
|
+
}
|
|
1134
|
+
],
|
|
1135
|
+
sections: [
|
|
1136
|
+
{
|
|
1137
|
+
label: "Sync overview",
|
|
1138
|
+
title: "No sync sources configured",
|
|
1139
|
+
summary: "Add sync sources to monitor directories, URLs, storage, or mailboxes."
|
|
1140
|
+
}
|
|
1141
|
+
]
|
|
1142
|
+
};
|
|
1143
|
+
}
|
|
1144
|
+
const countByStatus = (status) => records.filter((record) => record.status === status).length;
|
|
1145
|
+
return {
|
|
1146
|
+
rows: [
|
|
1147
|
+
{ label: "Configured sync sources", value: String(records.length) },
|
|
1148
|
+
{ label: "Completed", value: String(countByStatus("completed")) },
|
|
1149
|
+
{ label: "Running", value: String(countByStatus("running")) },
|
|
1150
|
+
{
|
|
1151
|
+
label: "Failed",
|
|
1152
|
+
value: String(countByStatus("failed"))
|
|
1153
|
+
},
|
|
1154
|
+
buildSyncOverviewLatestRow(records)
|
|
1155
|
+
],
|
|
1156
|
+
sections: [
|
|
1157
|
+
{
|
|
1158
|
+
label: "Sync overview",
|
|
1159
|
+
title: `${records.length} configured`,
|
|
1160
|
+
summary: `${countByStatus("completed")} completed \xB7 ${countByStatus("running")} running \xB7 ${countByStatus("failed")} failed`
|
|
1161
|
+
},
|
|
1162
|
+
{
|
|
1163
|
+
label: "Latest sync",
|
|
1164
|
+
title: buildSyncOverviewLatestRow(records).value,
|
|
1165
|
+
summary: "Most recent completed or last-known sync activity."
|
|
1166
|
+
}
|
|
1167
|
+
]
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
944
1170
|
var formatMediaTimestamp = (value) => {
|
|
945
1171
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
946
1172
|
return;
|
|
@@ -1863,5 +2089,5 @@ export {
|
|
|
1863
2089
|
AIStreamService
|
|
1864
2090
|
};
|
|
1865
2091
|
|
|
1866
|
-
//# debugId=
|
|
2092
|
+
//# debugId=6FBB7E851921171D64756E2164756E21
|
|
1867
2093
|
//# sourceMappingURL=index.js.map
|