@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/types/ai.d.ts
CHANGED
|
@@ -1304,6 +1304,23 @@ export type RAGRetrievalTracePresentation = {
|
|
|
1304
1304
|
details: RAGLabelValueRow[];
|
|
1305
1305
|
steps: RAGRetrievalTraceStepPresentation[];
|
|
1306
1306
|
};
|
|
1307
|
+
export type RAGSummarySectionPresentation = {
|
|
1308
|
+
label: string;
|
|
1309
|
+
title: string;
|
|
1310
|
+
summary: string;
|
|
1311
|
+
rows?: RAGLabelValueRow[];
|
|
1312
|
+
pills?: string[];
|
|
1313
|
+
};
|
|
1314
|
+
export type RAGReadinessPresentation = {
|
|
1315
|
+
sections: RAGSummarySectionPresentation[];
|
|
1316
|
+
};
|
|
1317
|
+
export type RAGCorpusHealthPresentation = {
|
|
1318
|
+
sections: RAGSummarySectionPresentation[];
|
|
1319
|
+
};
|
|
1320
|
+
export type RAGSyncOverviewPresentation = {
|
|
1321
|
+
rows: RAGLabelValueRow[];
|
|
1322
|
+
sections: RAGSummarySectionPresentation[];
|
|
1323
|
+
};
|
|
1307
1324
|
export type RAGEvaluationCaseTracePresentation = {
|
|
1308
1325
|
caseId: string;
|
|
1309
1326
|
label: string;
|
|
@@ -1321,7 +1338,7 @@ export type RAGAnswerGroundingHistoryPresentation = {
|
|
|
1321
1338
|
rows: RAGLabelValueRow[];
|
|
1322
1339
|
caseSnapshots: RAGAnswerGroundingCaseSnapshotPresentation[];
|
|
1323
1340
|
};
|
|
1324
|
-
export type
|
|
1341
|
+
export type RAGComparisonPresentation = {
|
|
1325
1342
|
id: string;
|
|
1326
1343
|
label: string;
|
|
1327
1344
|
headline: string;
|
|
@@ -1334,7 +1351,7 @@ export type RAGComparisonOverviewPresentation = {
|
|
|
1334
1351
|
winnerSummary: string;
|
|
1335
1352
|
rows: RAGLabelValueRow[];
|
|
1336
1353
|
};
|
|
1337
|
-
export type
|
|
1354
|
+
export type RAGGroundingProviderPresentation = {
|
|
1338
1355
|
id: string;
|
|
1339
1356
|
label: string;
|
|
1340
1357
|
headline: string;
|
package/dist/vue/ai/index.js
CHANGED
|
@@ -1198,6 +1198,232 @@ var buildRAGRetrievalTracePresentation = (trace) => {
|
|
|
1198
1198
|
steps
|
|
1199
1199
|
};
|
|
1200
1200
|
};
|
|
1201
|
+
var formatCompactList = (values) => values && values.length > 0 ? values.join(", ") : "none";
|
|
1202
|
+
var formatCoverageMap = (entries) => {
|
|
1203
|
+
if (!entries) {
|
|
1204
|
+
return "none";
|
|
1205
|
+
}
|
|
1206
|
+
const values = Object.entries(entries);
|
|
1207
|
+
return values.length > 0 ? values.map(([key, value]) => `${key} ${value}`).join(" \xB7 ") : "none";
|
|
1208
|
+
};
|
|
1209
|
+
var formatDurationLabel = (value) => {
|
|
1210
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1211
|
+
return "n/a";
|
|
1212
|
+
}
|
|
1213
|
+
if (value < 1000) {
|
|
1214
|
+
return `${value}ms`;
|
|
1215
|
+
}
|
|
1216
|
+
if (value < 60000) {
|
|
1217
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
1218
|
+
}
|
|
1219
|
+
if (value < 3600000) {
|
|
1220
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
1221
|
+
}
|
|
1222
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
1223
|
+
};
|
|
1224
|
+
var formatDateLabel = (value) => typeof value === "number" && Number.isFinite(value) ? new Date(value).toLocaleString("en-US") : "n/a";
|
|
1225
|
+
var formatAgeLabel = (value) => {
|
|
1226
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1227
|
+
return "n/a";
|
|
1228
|
+
}
|
|
1229
|
+
if (value < 1000) {
|
|
1230
|
+
return `${Math.round(value)}ms`;
|
|
1231
|
+
}
|
|
1232
|
+
if (value < 60000) {
|
|
1233
|
+
return `${(value / 1000).toFixed(value >= 1e4 ? 0 : 1)}s`;
|
|
1234
|
+
}
|
|
1235
|
+
if (value < 3600000) {
|
|
1236
|
+
return `${(value / 60000).toFixed(value >= 600000 ? 0 : 1)}m`;
|
|
1237
|
+
}
|
|
1238
|
+
if (value < 86400000) {
|
|
1239
|
+
return `${(value / 3600000).toFixed(value >= 36000000 ? 0 : 1)}h`;
|
|
1240
|
+
}
|
|
1241
|
+
return `${(value / 86400000).toFixed(value >= 864000000 ? 0 : 1)}d`;
|
|
1242
|
+
};
|
|
1243
|
+
var buildSyncOverviewLatestRow = (sources) => {
|
|
1244
|
+
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];
|
|
1245
|
+
if (!latest) {
|
|
1246
|
+
return {
|
|
1247
|
+
label: "Latest sync",
|
|
1248
|
+
value: "No completed run yet"
|
|
1249
|
+
};
|
|
1250
|
+
}
|
|
1251
|
+
return {
|
|
1252
|
+
label: "Latest sync",
|
|
1253
|
+
value: [
|
|
1254
|
+
latest.label,
|
|
1255
|
+
typeof latest.documentCount === "number" ? `${latest.documentCount} docs` : "",
|
|
1256
|
+
typeof latest.chunkCount === "number" ? `${latest.chunkCount} chunks` : "",
|
|
1257
|
+
typeof latest.lastSyncDurationMs === "number" ? formatDurationLabel(latest.lastSyncDurationMs) : "",
|
|
1258
|
+
typeof latest.lastSuccessfulSyncAt === "number" ? formatDateLabel(latest.lastSuccessfulSyncAt) : typeof latest.lastSyncedAt === "number" ? formatDateLabel(latest.lastSyncedAt) : ""
|
|
1259
|
+
].filter(Boolean).join(" \xB7 ")
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
var buildRAGReadinessPresentation = (readiness) => {
|
|
1263
|
+
if (!readiness) {
|
|
1264
|
+
return {
|
|
1265
|
+
sections: [
|
|
1266
|
+
{
|
|
1267
|
+
label: "Provider",
|
|
1268
|
+
title: "Unavailable",
|
|
1269
|
+
summary: "Readiness data is not available yet."
|
|
1270
|
+
}
|
|
1271
|
+
]
|
|
1272
|
+
};
|
|
1273
|
+
}
|
|
1274
|
+
return {
|
|
1275
|
+
sections: [
|
|
1276
|
+
{
|
|
1277
|
+
label: "Provider",
|
|
1278
|
+
title: readiness.providerConfigured ? readiness.providerName ?? "Runtime provider routing" : "Not configured",
|
|
1279
|
+
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."
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
label: "Embeddings",
|
|
1283
|
+
title: readiness.embeddingConfigured ? readiness.embeddingModel === "collection-managed embeddings" ? "Collection-managed" : "Configured" : "Missing",
|
|
1284
|
+
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."
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
label: "Retrieval Stack",
|
|
1288
|
+
title: readiness.rerankerConfigured ? "Reranker ready" : "Vector only",
|
|
1289
|
+
summary: readiness.indexManagerConfigured ? "Index manager configured." : "Index manager not configured."
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
label: "Extractors",
|
|
1293
|
+
title: readiness.extractorsConfigured ? `${readiness.extractorNames.length} configured` : "None configured",
|
|
1294
|
+
summary: readiness.extractorsConfigured ? `Configured extractors: ${formatCompactList(readiness.extractorNames)}` : "No extractors configured.",
|
|
1295
|
+
pills: readiness.extractorNames.length > 0 ? readiness.extractorNames : ["No extractors configured"]
|
|
1296
|
+
}
|
|
1297
|
+
]
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
var buildRAGCorpusHealthPresentation = (health) => {
|
|
1301
|
+
if (!health) {
|
|
1302
|
+
return {
|
|
1303
|
+
sections: [
|
|
1304
|
+
{
|
|
1305
|
+
label: "Corpus health",
|
|
1306
|
+
title: "Unavailable",
|
|
1307
|
+
summary: "Corpus health is not available yet."
|
|
1308
|
+
}
|
|
1309
|
+
]
|
|
1310
|
+
};
|
|
1311
|
+
}
|
|
1312
|
+
return {
|
|
1313
|
+
sections: [
|
|
1314
|
+
{
|
|
1315
|
+
label: "Corpus coverage",
|
|
1316
|
+
title: `Formats: ${formatCoverageMap(health.coverageByFormat)}`,
|
|
1317
|
+
summary: `Kinds: ${formatCoverageMap(health.coverageByKind)}`,
|
|
1318
|
+
rows: [
|
|
1319
|
+
{
|
|
1320
|
+
label: "Average chunks per document",
|
|
1321
|
+
value: health.averageChunksPerDocument.toFixed(2)
|
|
1322
|
+
}
|
|
1323
|
+
]
|
|
1324
|
+
},
|
|
1325
|
+
{
|
|
1326
|
+
label: "Chunk quality",
|
|
1327
|
+
title: `${health.averageChunksPerDocument.toFixed(2)} avg chunks/doc`,
|
|
1328
|
+
summary: `Empty docs ${health.emptyDocuments} \xB7 empty chunks ${health.emptyChunks} \xB7 low signal ${health.lowSignalChunks}`,
|
|
1329
|
+
rows: [
|
|
1330
|
+
{
|
|
1331
|
+
label: "Missing source",
|
|
1332
|
+
value: String(health.documentsMissingSource)
|
|
1333
|
+
},
|
|
1334
|
+
{
|
|
1335
|
+
label: "Missing title",
|
|
1336
|
+
value: String(health.documentsMissingTitle)
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
label: "Missing metadata",
|
|
1340
|
+
value: String(health.documentsMissingMetadata)
|
|
1341
|
+
}
|
|
1342
|
+
]
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
label: "Freshness",
|
|
1346
|
+
title: `${health.staleDocuments.length} stale docs`,
|
|
1347
|
+
summary: `Stale threshold ${formatAgeLabel(health.staleAfterMs)}`,
|
|
1348
|
+
rows: [
|
|
1349
|
+
{
|
|
1350
|
+
label: "Oldest age",
|
|
1351
|
+
value: formatAgeLabel(health.oldestDocumentAgeMs)
|
|
1352
|
+
},
|
|
1353
|
+
{
|
|
1354
|
+
label: "Newest age",
|
|
1355
|
+
value: formatAgeLabel(health.newestDocumentAgeMs)
|
|
1356
|
+
}
|
|
1357
|
+
]
|
|
1358
|
+
},
|
|
1359
|
+
{
|
|
1360
|
+
label: "Failures",
|
|
1361
|
+
title: `${health.failedIngestJobs} ingest \xB7 ${health.failedAdminJobs} admin`,
|
|
1362
|
+
summary: `Duplicate sources ${health.duplicateSourceGroups.length} \xB7 duplicate ids ${health.duplicateDocumentIdGroups.length}`,
|
|
1363
|
+
rows: [
|
|
1364
|
+
{
|
|
1365
|
+
label: "Failures by input",
|
|
1366
|
+
value: formatCoverageMap(health.failuresByInputKind)
|
|
1367
|
+
},
|
|
1368
|
+
{
|
|
1369
|
+
label: "Failures by extractor",
|
|
1370
|
+
value: formatCoverageMap(health.failuresByExtractor)
|
|
1371
|
+
},
|
|
1372
|
+
{
|
|
1373
|
+
label: "Failures by admin action",
|
|
1374
|
+
value: formatCoverageMap(health.failuresByAdminAction)
|
|
1375
|
+
}
|
|
1376
|
+
]
|
|
1377
|
+
}
|
|
1378
|
+
]
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
var buildRAGSyncOverviewPresentation = (sources) => {
|
|
1382
|
+
const records = sources ?? [];
|
|
1383
|
+
if (records.length === 0) {
|
|
1384
|
+
return {
|
|
1385
|
+
rows: [
|
|
1386
|
+
{ label: "Configured sync sources", value: "0" },
|
|
1387
|
+
{
|
|
1388
|
+
label: "Latest sync",
|
|
1389
|
+
value: "No sync sources configured yet."
|
|
1390
|
+
}
|
|
1391
|
+
],
|
|
1392
|
+
sections: [
|
|
1393
|
+
{
|
|
1394
|
+
label: "Sync overview",
|
|
1395
|
+
title: "No sync sources configured",
|
|
1396
|
+
summary: "Add sync sources to monitor directories, URLs, storage, or mailboxes."
|
|
1397
|
+
}
|
|
1398
|
+
]
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
const countByStatus = (status) => records.filter((record) => record.status === status).length;
|
|
1402
|
+
return {
|
|
1403
|
+
rows: [
|
|
1404
|
+
{ label: "Configured sync sources", value: String(records.length) },
|
|
1405
|
+
{ label: "Completed", value: String(countByStatus("completed")) },
|
|
1406
|
+
{ label: "Running", value: String(countByStatus("running")) },
|
|
1407
|
+
{
|
|
1408
|
+
label: "Failed",
|
|
1409
|
+
value: String(countByStatus("failed"))
|
|
1410
|
+
},
|
|
1411
|
+
buildSyncOverviewLatestRow(records)
|
|
1412
|
+
],
|
|
1413
|
+
sections: [
|
|
1414
|
+
{
|
|
1415
|
+
label: "Sync overview",
|
|
1416
|
+
title: `${records.length} configured`,
|
|
1417
|
+
summary: `${countByStatus("completed")} completed \xB7 ${countByStatus("running")} running \xB7 ${countByStatus("failed")} failed`
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
label: "Latest sync",
|
|
1421
|
+
title: buildSyncOverviewLatestRow(records).value,
|
|
1422
|
+
summary: "Most recent completed or last-known sync activity."
|
|
1423
|
+
}
|
|
1424
|
+
]
|
|
1425
|
+
};
|
|
1426
|
+
};
|
|
1201
1427
|
var formatMediaTimestamp = (value) => {
|
|
1202
1428
|
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
1203
1429
|
return;
|
|
@@ -2433,7 +2659,7 @@ var buildRAGComparisonTraceDiffRows = (entry, leader) => {
|
|
|
2433
2659
|
}
|
|
2434
2660
|
return rows;
|
|
2435
2661
|
};
|
|
2436
|
-
var
|
|
2662
|
+
var buildRAGRetrievalComparisonPresentations = (comparison) => {
|
|
2437
2663
|
const leader = comparison.entries[0];
|
|
2438
2664
|
return comparison.entries.map((entry) => ({
|
|
2439
2665
|
diffLabel: leader?.label ?? "Leader",
|
|
@@ -2450,7 +2676,7 @@ var buildRAGRetrievalComparisonOverviewPresentation = (comparison) => buildCompa
|
|
|
2450
2676
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.retrievalId === id)?.label ?? id ?? "n/a",
|
|
2451
2677
|
summary: comparison.summary
|
|
2452
2678
|
});
|
|
2453
|
-
var
|
|
2679
|
+
var buildRAGRerankerComparisonPresentations = (comparison) => {
|
|
2454
2680
|
const leader = comparison.entries[0];
|
|
2455
2681
|
return comparison.entries.map((entry) => ({
|
|
2456
2682
|
diffLabel: leader?.label ?? "Leader",
|
|
@@ -2467,7 +2693,7 @@ var buildRAGRerankerComparisonOverviewPresentation = (comparison) => buildCompar
|
|
|
2467
2693
|
resolveLabel: (id) => comparison.entries.find((entry) => entry.rerankerId === id)?.label ?? id ?? "n/a",
|
|
2468
2694
|
summary: comparison.summary
|
|
2469
2695
|
});
|
|
2470
|
-
var
|
|
2696
|
+
var buildRAGGroundingProviderPresentations = (entries) => entries.map((entry) => ({
|
|
2471
2697
|
headline: [
|
|
2472
2698
|
entry.label,
|
|
2473
2699
|
`passing ${formatEvaluationPassingRate(entry.response.passingRate)}`,
|
|
@@ -4123,5 +4349,5 @@ export {
|
|
|
4123
4349
|
AIStreamKey
|
|
4124
4350
|
};
|
|
4125
4351
|
|
|
4126
|
-
//# debugId=
|
|
4352
|
+
//# debugId=96DFC5A412508F4664756E2164756E21
|
|
4127
4353
|
//# sourceMappingURL=index.js.map
|