@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/ai/index.js
CHANGED
|
@@ -4781,6 +4781,232 @@ var buildRAGRetrievalTracePresentation = (trace) => {
|
|
|
4781
4781
|
steps
|
|
4782
4782
|
};
|
|
4783
4783
|
};
|
|
4784
|
+
var formatCompactList = (values) => values && values.length > 0 ? values.join(", ") : "none";
|
|
4785
|
+
var formatCoverageMap = (entries) => {
|
|
4786
|
+
if (!entries) {
|
|
4787
|
+
return "none";
|
|
4788
|
+
}
|
|
4789
|
+
const values = Object.entries(entries);
|
|
4790
|
+
return values.length > 0 ? values.map(([key, value]) => `${key} ${value}`).join(" \xB7 ") : "none";
|
|
4791
|
+
};
|
|
4792
|
+
var formatDurationLabel = (value) => {
|
|
4793
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
4794
|
+
return "n/a";
|
|
4795
|
+
}
|
|
4796
|
+
if (value < 1000) {
|
|
4797
|
+
return `${value}ms`;
|
|
4798
|
+
}
|
|
4799
|
+
if (value < 60000) {
|
|
4800
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
4801
|
+
}
|
|
4802
|
+
if (value < 3600000) {
|
|
4803
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
4804
|
+
}
|
|
4805
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
4806
|
+
};
|
|
4807
|
+
var formatDateLabel = (value) => typeof value === "number" && Number.isFinite(value) ? new Date(value).toLocaleString("en-US") : "n/a";
|
|
4808
|
+
var formatAgeLabel = (value) => {
|
|
4809
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
4810
|
+
return "n/a";
|
|
4811
|
+
}
|
|
4812
|
+
if (value < 1000) {
|
|
4813
|
+
return `${Math.round(value)}ms`;
|
|
4814
|
+
}
|
|
4815
|
+
if (value < 60000) {
|
|
4816
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
4817
|
+
}
|
|
4818
|
+
if (value < 3600000) {
|
|
4819
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
4820
|
+
}
|
|
4821
|
+
if (value < 86400000) {
|
|
4822
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
4823
|
+
}
|
|
4824
|
+
return `${(value / 86400000).toFixed(value >= 864000000 ? 0 : 1)}d`;
|
|
4825
|
+
};
|
|
4826
|
+
var buildSyncOverviewLatestRow = (sources) => {
|
|
4827
|
+
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];
|
|
4828
|
+
if (!latest) {
|
|
4829
|
+
return {
|
|
4830
|
+
label: "Latest sync",
|
|
4831
|
+
value: "No completed run yet"
|
|
4832
|
+
};
|
|
4833
|
+
}
|
|
4834
|
+
return {
|
|
4835
|
+
label: "Latest sync",
|
|
4836
|
+
value: [
|
|
4837
|
+
latest.label,
|
|
4838
|
+
typeof latest.documentCount === "number" ? `${latest.documentCount} docs` : "",
|
|
4839
|
+
typeof latest.chunkCount === "number" ? `${latest.chunkCount} chunks` : "",
|
|
4840
|
+
typeof latest.lastSyncDurationMs === "number" ? formatDurationLabel(latest.lastSyncDurationMs) : "",
|
|
4841
|
+
typeof latest.lastSuccessfulSyncAt === "number" ? formatDateLabel(latest.lastSuccessfulSyncAt) : typeof latest.lastSyncedAt === "number" ? formatDateLabel(latest.lastSyncedAt) : ""
|
|
4842
|
+
].filter(Boolean).join(" \xB7 ")
|
|
4843
|
+
};
|
|
4844
|
+
};
|
|
4845
|
+
var buildRAGReadinessPresentation = (readiness) => {
|
|
4846
|
+
if (!readiness) {
|
|
4847
|
+
return {
|
|
4848
|
+
sections: [
|
|
4849
|
+
{
|
|
4850
|
+
label: "Provider",
|
|
4851
|
+
title: "Unavailable",
|
|
4852
|
+
summary: "Readiness data is not available yet."
|
|
4853
|
+
}
|
|
4854
|
+
]
|
|
4855
|
+
};
|
|
4856
|
+
}
|
|
4857
|
+
return {
|
|
4858
|
+
sections: [
|
|
4859
|
+
{
|
|
4860
|
+
label: "Provider",
|
|
4861
|
+
title: readiness.providerConfigured ? readiness.providerName ?? "Runtime provider routing" : "Not configured",
|
|
4862
|
+
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."
|
|
4863
|
+
},
|
|
4864
|
+
{
|
|
4865
|
+
label: "Embeddings",
|
|
4866
|
+
title: readiness.embeddingConfigured ? readiness.embeddingModel === "collection-managed embeddings" ? "Collection-managed" : "Configured" : "Missing",
|
|
4867
|
+
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."
|
|
4868
|
+
},
|
|
4869
|
+
{
|
|
4870
|
+
label: "Retrieval Stack",
|
|
4871
|
+
title: readiness.rerankerConfigured ? "Reranker ready" : "Vector only",
|
|
4872
|
+
summary: readiness.indexManagerConfigured ? "Index manager configured." : "Index manager not configured."
|
|
4873
|
+
},
|
|
4874
|
+
{
|
|
4875
|
+
label: "Extractors",
|
|
4876
|
+
title: readiness.extractorsConfigured ? `${readiness.extractorNames.length} configured` : "None configured",
|
|
4877
|
+
summary: readiness.extractorsConfigured ? `Configured extractors: ${formatCompactList(readiness.extractorNames)}` : "No extractors configured.",
|
|
4878
|
+
tags: readiness.extractorNames.length > 0 ? readiness.extractorNames : ["No extractors configured"]
|
|
4879
|
+
}
|
|
4880
|
+
]
|
|
4881
|
+
};
|
|
4882
|
+
};
|
|
4883
|
+
var buildRAGCorpusHealthPresentation = (health) => {
|
|
4884
|
+
if (!health) {
|
|
4885
|
+
return {
|
|
4886
|
+
sections: [
|
|
4887
|
+
{
|
|
4888
|
+
label: "Corpus health",
|
|
4889
|
+
title: "Unavailable",
|
|
4890
|
+
summary: "Corpus health is not available yet."
|
|
4891
|
+
}
|
|
4892
|
+
]
|
|
4893
|
+
};
|
|
4894
|
+
}
|
|
4895
|
+
return {
|
|
4896
|
+
sections: [
|
|
4897
|
+
{
|
|
4898
|
+
label: "Corpus coverage",
|
|
4899
|
+
title: `Formats: ${formatCoverageMap(health.coverageByFormat)}`,
|
|
4900
|
+
summary: `Kinds: ${formatCoverageMap(health.coverageByKind)}`,
|
|
4901
|
+
rows: [
|
|
4902
|
+
{
|
|
4903
|
+
label: "Average chunks per document",
|
|
4904
|
+
value: health.averageChunksPerDocument.toFixed(2)
|
|
4905
|
+
}
|
|
4906
|
+
]
|
|
4907
|
+
},
|
|
4908
|
+
{
|
|
4909
|
+
label: "Chunk quality",
|
|
4910
|
+
title: `${health.averageChunksPerDocument.toFixed(2)} avg chunks/doc`,
|
|
4911
|
+
summary: `Empty docs ${health.emptyDocuments} \xB7 empty chunks ${health.emptyChunks} \xB7 low signal ${health.lowSignalChunks}`,
|
|
4912
|
+
rows: [
|
|
4913
|
+
{
|
|
4914
|
+
label: "Missing source",
|
|
4915
|
+
value: String(health.documentsMissingSource)
|
|
4916
|
+
},
|
|
4917
|
+
{
|
|
4918
|
+
label: "Missing title",
|
|
4919
|
+
value: String(health.documentsMissingTitle)
|
|
4920
|
+
},
|
|
4921
|
+
{
|
|
4922
|
+
label: "Missing metadata",
|
|
4923
|
+
value: String(health.documentsMissingMetadata)
|
|
4924
|
+
}
|
|
4925
|
+
]
|
|
4926
|
+
},
|
|
4927
|
+
{
|
|
4928
|
+
label: "Freshness",
|
|
4929
|
+
title: `${health.staleDocuments.length} stale docs`,
|
|
4930
|
+
summary: `Stale threshold ${formatAgeLabel(health.staleAfterMs)}`,
|
|
4931
|
+
rows: [
|
|
4932
|
+
{
|
|
4933
|
+
label: "Oldest age",
|
|
4934
|
+
value: formatAgeLabel(health.oldestDocumentAgeMs)
|
|
4935
|
+
},
|
|
4936
|
+
{
|
|
4937
|
+
label: "Newest age",
|
|
4938
|
+
value: formatAgeLabel(health.newestDocumentAgeMs)
|
|
4939
|
+
}
|
|
4940
|
+
]
|
|
4941
|
+
},
|
|
4942
|
+
{
|
|
4943
|
+
label: "Failures",
|
|
4944
|
+
title: `${health.failedIngestJobs} ingest \xB7 ${health.failedAdminJobs} admin`,
|
|
4945
|
+
summary: `Duplicate sources ${health.duplicateSourceGroups.length} \xB7 duplicate ids ${health.duplicateDocumentIdGroups.length}`,
|
|
4946
|
+
rows: [
|
|
4947
|
+
{
|
|
4948
|
+
label: "Failures by input",
|
|
4949
|
+
value: formatCoverageMap(health.failuresByInputKind)
|
|
4950
|
+
},
|
|
4951
|
+
{
|
|
4952
|
+
label: "Failures by extractor",
|
|
4953
|
+
value: formatCoverageMap(health.failuresByExtractor)
|
|
4954
|
+
},
|
|
4955
|
+
{
|
|
4956
|
+
label: "Failures by admin action",
|
|
4957
|
+
value: formatCoverageMap(health.failuresByAdminAction)
|
|
4958
|
+
}
|
|
4959
|
+
]
|
|
4960
|
+
}
|
|
4961
|
+
]
|
|
4962
|
+
};
|
|
4963
|
+
};
|
|
4964
|
+
var buildRAGSyncOverviewPresentation = (sources) => {
|
|
4965
|
+
const records = sources ?? [];
|
|
4966
|
+
if (records.length === 0) {
|
|
4967
|
+
return {
|
|
4968
|
+
rows: [
|
|
4969
|
+
{ label: "Configured sync sources", value: "0" },
|
|
4970
|
+
{
|
|
4971
|
+
label: "Latest sync",
|
|
4972
|
+
value: "No sync sources configured yet."
|
|
4973
|
+
}
|
|
4974
|
+
],
|
|
4975
|
+
sections: [
|
|
4976
|
+
{
|
|
4977
|
+
label: "Sync overview",
|
|
4978
|
+
title: "No sync sources configured",
|
|
4979
|
+
summary: "Add sync sources to monitor directories, URLs, storage, or mailboxes."
|
|
4980
|
+
}
|
|
4981
|
+
]
|
|
4982
|
+
};
|
|
4983
|
+
}
|
|
4984
|
+
const countByStatus = (status) => records.filter((record) => record.status === status).length;
|
|
4985
|
+
return {
|
|
4986
|
+
rows: [
|
|
4987
|
+
{ label: "Configured sync sources", value: String(records.length) },
|
|
4988
|
+
{ label: "Completed", value: String(countByStatus("completed")) },
|
|
4989
|
+
{ label: "Running", value: String(countByStatus("running")) },
|
|
4990
|
+
{
|
|
4991
|
+
label: "Failed",
|
|
4992
|
+
value: String(countByStatus("failed"))
|
|
4993
|
+
},
|
|
4994
|
+
buildSyncOverviewLatestRow(records)
|
|
4995
|
+
],
|
|
4996
|
+
sections: [
|
|
4997
|
+
{
|
|
4998
|
+
label: "Sync overview",
|
|
4999
|
+
title: `${records.length} configured`,
|
|
5000
|
+
summary: `${countByStatus("completed")} completed \xB7 ${countByStatus("running")} running \xB7 ${countByStatus("failed")} failed`
|
|
5001
|
+
},
|
|
5002
|
+
{
|
|
5003
|
+
label: "Latest sync",
|
|
5004
|
+
title: buildSyncOverviewLatestRow(records).value,
|
|
5005
|
+
summary: "Most recent completed or last-known sync activity."
|
|
5006
|
+
}
|
|
5007
|
+
]
|
|
5008
|
+
};
|
|
5009
|
+
};
|
|
4784
5010
|
var formatMediaTimestamp = (value) => {
|
|
4785
5011
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
4786
5012
|
return;
|
|
@@ -5956,12 +6182,12 @@ var buildRAGComparisonTraceDiffRows = (entry, leader) => {
|
|
|
5956
6182
|
}
|
|
5957
6183
|
return rows;
|
|
5958
6184
|
};
|
|
5959
|
-
var
|
|
6185
|
+
var buildRAGRetrievalComparisonPresentations = (comparison) => {
|
|
5960
6186
|
const leader = comparison.entries[0];
|
|
5961
6187
|
return comparison.entries.map((entry) => ({
|
|
5962
6188
|
diffLabel: leader?.label ?? "Leader",
|
|
5963
6189
|
diffRows: buildRAGComparisonTraceDiffRows(entry, leader),
|
|
5964
|
-
|
|
6190
|
+
summary: formatRetrievalComparisonHeadline(entry),
|
|
5965
6191
|
id: entry.retrievalId,
|
|
5966
6192
|
label: entry.label,
|
|
5967
6193
|
traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
|
|
@@ -5973,12 +6199,12 @@ var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildCompa
|
|
|
5973
6199
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
|
|
5974
6200
|
summary: comparison.summary
|
|
5975
6201
|
});
|
|
5976
|
-
var
|
|
6202
|
+
var buildRAGRerankerComparisonPresentations = (comparison) => {
|
|
5977
6203
|
const leader = comparison.entries[0];
|
|
5978
6204
|
return comparison.entries.map((entry) => ({
|
|
5979
6205
|
diffLabel: leader?.label ?? "Leader",
|
|
5980
6206
|
diffRows: buildRAGComparisonTraceDiffRows(entry, leader),
|
|
5981
|
-
|
|
6207
|
+
summary: formatRerankerComparisonHeadline(entry),
|
|
5982
6208
|
id: entry.rerankerId,
|
|
5983
6209
|
label: entry.label,
|
|
5984
6210
|
traceSummaryRows: buildRAGComparisonTraceSummaryRows(entry)
|
|
@@ -5990,8 +6216,8 @@ var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildCompar
|
|
|
5990
6216
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
|
|
5991
6217
|
summary: comparison.summary
|
|
5992
6218
|
});
|
|
5993
|
-
var
|
|
5994
|
-
|
|
6219
|
+
var buildRAGGroundingProviderPresentations = (entries) => entries.map((entry) => ({
|
|
6220
|
+
summary: [
|
|
5995
6221
|
entry.label,
|
|
5996
6222
|
`passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
|
|
5997
6223
|
`citation f1 ${entry.response.summary.averageCitationF1.toFixed(3)}`,
|
|
@@ -6042,10 +6268,6 @@ var buildRAGQualityOverviewPresentation = (input) => ({
|
|
|
6042
6268
|
value: "Configure an AI provider to compare grounded answers."
|
|
6043
6269
|
}
|
|
6044
6270
|
]
|
|
6045
|
-
],
|
|
6046
|
-
insights: [
|
|
6047
|
-
"The example should answer three questions quickly: which strategy wins, whether grounding is stable, and whether the result regressed.",
|
|
6048
|
-
"Detailed case-by-case evidence stays behind collapsible sections so the page reads like a product surface instead of a console buffer."
|
|
6049
6271
|
]
|
|
6050
6272
|
});
|
|
6051
6273
|
var buildRAGGroundingProviderCaseComparisonPresentations = (comparisons) => comparisons.map((comparison) => {
|
|
@@ -12100,20 +12322,22 @@ export {
|
|
|
12100
12322
|
buildRAGUpsertInputFromURLs,
|
|
12101
12323
|
buildRAGUpsertInputFromDocuments,
|
|
12102
12324
|
buildRAGUpsertInputFromDirectory,
|
|
12325
|
+
buildRAGSyncOverviewPresentation,
|
|
12103
12326
|
buildRAGStreamProgress,
|
|
12104
12327
|
buildRAGSourceSummaries,
|
|
12105
12328
|
buildRAGSourceGroups,
|
|
12106
12329
|
buildRAGRetrievalTracePresentation,
|
|
12330
|
+
buildRAGRetrievalComparisonPresentations,
|
|
12107
12331
|
buildRAGRetrievalComparisonOverviewPresentation,
|
|
12108
|
-
|
|
12332
|
+
buildRAGRerankerComparisonPresentations,
|
|
12109
12333
|
buildRAGRerankerComparisonOverviewPresentation,
|
|
12110
|
-
|
|
12334
|
+
buildRAGReadinessPresentation,
|
|
12111
12335
|
buildRAGQualityOverviewPresentation,
|
|
12112
12336
|
buildRAGLexicalHaystack,
|
|
12113
12337
|
buildRAGGroundingReferences,
|
|
12338
|
+
buildRAGGroundingProviderPresentations,
|
|
12114
12339
|
buildRAGGroundingProviderOverviewPresentation,
|
|
12115
12340
|
buildRAGGroundingProviderCaseComparisonPresentations,
|
|
12116
|
-
buildRAGGroundingProviderCardPresentations,
|
|
12117
12341
|
buildRAGGroundedAnswer,
|
|
12118
12342
|
buildRAGEvaluationRunDiff,
|
|
12119
12343
|
buildRAGEvaluationResponse,
|
|
@@ -12121,6 +12345,7 @@ export {
|
|
|
12121
12345
|
buildRAGEvaluationHistoryRows,
|
|
12122
12346
|
buildRAGEvaluationHistoryPresentation,
|
|
12123
12347
|
buildRAGEvaluationCaseTracePresentations,
|
|
12348
|
+
buildRAGCorpusHealthPresentation,
|
|
12124
12349
|
buildRAGContext,
|
|
12125
12350
|
buildRAGComparisonTraceSummaryRows,
|
|
12126
12351
|
buildRAGComparisonTraceDiffRows,
|
|
@@ -12142,5 +12367,5 @@ export {
|
|
|
12142
12367
|
aiChat
|
|
12143
12368
|
};
|
|
12144
12369
|
|
|
12145
|
-
//# debugId=
|
|
12370
|
+
//# debugId=65BEE4DDA0A0775E64756E2164756E21
|
|
12146
12371
|
//# sourceMappingURL=index.js.map
|