@absolutejs/artifacts 0.0.3 → 0.0.4
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/rag.js +5 -1
- package/package.json +1 -1
package/dist/rag.js
CHANGED
|
@@ -51,7 +51,11 @@ var createArtifactRAGIndexCoordinator = (options) => ({
|
|
|
51
51
|
const uploads = await artifactToRAGUploads(artifact, options.reader);
|
|
52
52
|
const indexed = await options.target.index(uploads, { artifact });
|
|
53
53
|
if (previous?.documentIds.length && options.target.remove) {
|
|
54
|
-
|
|
54
|
+
const currentIds = new Set(indexed.documentIds);
|
|
55
|
+
const obsoleteIds = previous.documentIds.filter((documentId) => !currentIds.has(documentId));
|
|
56
|
+
if (obsoleteIds.length) {
|
|
57
|
+
await options.target.remove(obsoleteIds, { artifact });
|
|
58
|
+
}
|
|
55
59
|
}
|
|
56
60
|
await options.service.markIndexing(artifact.ownerId, artifact.id, {
|
|
57
61
|
documentIds: indexed.documentIds,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@absolutejs/artifacts",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"description": "Typed, versioned artifacts for AI products — schemas, lifecycle, storage, rendering, publishing, revisions, and agent tools without prescribing a database or host.",
|
|
5
5
|
"author": "Alex Kahn",
|
|
6
6
|
"license": "BUSL-1.1",
|