@cerefox/memory 1.19.0 → 1.19.1
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/bin/cerefox.js
CHANGED
|
@@ -5318,7 +5318,7 @@ var init_cli_core = __esm(() => {
|
|
|
5318
5318
|
});
|
|
5319
5319
|
|
|
5320
5320
|
// src/meta.ts
|
|
5321
|
-
var PKG_VERSION = "1.19.
|
|
5321
|
+
var PKG_VERSION = "1.19.1";
|
|
5322
5322
|
var init_meta = () => {};
|
|
5323
5323
|
|
|
5324
5324
|
// ../../_shared/config/paths.ts
|
|
@@ -26848,7 +26848,7 @@ var init_update_check = __esm(() => {
|
|
|
26848
26848
|
});
|
|
26849
26849
|
|
|
26850
26850
|
// ../../_shared/ef-meta/index.ts
|
|
26851
|
-
var EF_VERSION = "1.19.
|
|
26851
|
+
var EF_VERSION = "1.19.1", CEREFOX_VERSION = "1.19.1", EF_LAST_CHANGED = "1.19.0";
|
|
26852
26852
|
var init_ef_meta = () => {};
|
|
26853
26853
|
|
|
26854
26854
|
// ../../_shared/embeddings/onnx-embedder.ts
|
|
@@ -80962,6 +80962,7 @@ var EDIT_FIELDS = new Set([
|
|
|
80962
80962
|
"requestor",
|
|
80963
80963
|
"author_type"
|
|
80964
80964
|
]);
|
|
80965
|
+
var METADATA_TOKEN_DEPRECATION = "deprecated: metadata was replaced without expected_metadata_revision, as last-write-wins, " + "so a concurrent metadata change may have been overwritten. Send the metadata_revision " + "you read (GET /api/v1/documents/{id}); a future release will require it.";
|
|
80965
80966
|
var TRASHED_MESSAGE = "This document was moved to the trash while you were editing. " + "Restore it from the Trash page first, then save again.";
|
|
80966
80967
|
function conflictBody(currentHash) {
|
|
80967
80968
|
const message = "This document changed while you were editing it (another writer saved a newer version). " + "Open it again in a new tab, merge your changes, and save from there.";
|
|
@@ -81029,10 +81030,8 @@ function registerDocumentWriteRoutes(app, ctx) {
|
|
|
81029
81030
|
}
|
|
81030
81031
|
const metadataCarried = body.metadata != null;
|
|
81031
81032
|
const sentRevision = typeof body.expected_metadata_revision === "number" && Number.isInteger(body.expected_metadata_revision) ? body.expected_metadata_revision : null;
|
|
81032
|
-
|
|
81033
|
-
|
|
81034
|
-
return c.json({ success: false, error: "expected_metadata_revision required", message, detail: message }, 400);
|
|
81035
|
-
}
|
|
81033
|
+
const metadataTokenMissing = metadataCarried && sentRevision === null && !lastWriteWins;
|
|
81034
|
+
const warnings = metadataTokenMissing ? [METADATA_TOKEN_DEPRECATION] : undefined;
|
|
81036
81035
|
const expectedMetadataRevision = sentRevision ?? (doc.metadata_revision ?? null);
|
|
81037
81036
|
const proposedHash = content.trim() ? contentHash(content) : null;
|
|
81038
81037
|
const contentChanged = proposedHash !== null && currentHash !== null && proposedHash !== currentHash;
|
|
@@ -81063,7 +81062,7 @@ function registerDocumentWriteRoutes(app, ctx) {
|
|
|
81063
81062
|
expectedContentHash: expectedHash,
|
|
81064
81063
|
lastWriteWins
|
|
81065
81064
|
});
|
|
81066
|
-
return c.json({ success: true, reindexed: result.reindexed });
|
|
81065
|
+
return c.json({ success: true, reindexed: result.reindexed, ...warnings ? { warnings } : {} });
|
|
81067
81066
|
} catch (err) {
|
|
81068
81067
|
if (err instanceof ConcurrencyConflictError) {
|
|
81069
81068
|
return c.json(conflictBody(err.currentHash), 409);
|
|
@@ -81101,14 +81100,14 @@ function registerDocumentWriteRoutes(app, ctx) {
|
|
|
81101
81100
|
documentId,
|
|
81102
81101
|
title: body.title !== undefined && title !== doc.title ? title : undefined,
|
|
81103
81102
|
metadata: metadataCarried ? metadata : undefined,
|
|
81104
|
-
expectedMetadataRevision,
|
|
81105
|
-
metadataLastWriteWins: lastWriteWins,
|
|
81103
|
+
expectedMetadataRevision: metadataTokenMissing ? null : expectedMetadataRevision,
|
|
81104
|
+
metadataLastWriteWins: lastWriteWins || metadataTokenMissing,
|
|
81106
81105
|
projectIds: Array.isArray(body.project_ids) ? projectIds : undefined,
|
|
81107
81106
|
author: who.identity.author,
|
|
81108
81107
|
authorType: who.identity.authorType,
|
|
81109
81108
|
accessPath: who.identity.accessPath
|
|
81110
81109
|
});
|
|
81111
|
-
return c.json({ success: true, reindexed: false, ...facets });
|
|
81110
|
+
return c.json({ success: true, reindexed: false, ...facets, ...warnings ? { warnings } : {} });
|
|
81112
81111
|
} catch (err) {
|
|
81113
81112
|
const cause = err instanceof FacetUpdateError ? err.cause : err;
|
|
81114
81113
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* doesn't touch `supabase/functions/` leaves it alone).
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
export const EF_VERSION = "1.19.
|
|
21
|
+
export const EF_VERSION = "1.19.1";
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* The Cerefox RELEASE version — what `cerefox --version` reports and what npm
|
|
@@ -36,7 +36,7 @@ export const EF_VERSION = "1.19.0";
|
|
|
36
36
|
* is imported by the Deno Edge Functions, which cannot reach into the npm
|
|
37
37
|
* package.
|
|
38
38
|
*/
|
|
39
|
-
export const CEREFOX_VERSION = "1.19.
|
|
39
|
+
export const CEREFOX_VERSION = "1.19.1";
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The most recent version whose EF-side SOURCE actually changed (#127).
|
package/docs/api/openapi.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.1",
|
|
4
4
|
"description": "Cerefox \u2014 user-owned shared memory for AI agents. CLI + stdio MCP server + web UI + ingestion for a knowledge base on your own Supabase project (or fully self-hosted with Cerefox Local).",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/fstamatelopoulos/cerefox",
|