@cerefox/memory 1.1.0-beta.7 → 1.1.0-beta.8
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 +47 -6
- package/package.json +1 -1
package/dist/bin/cerefox.js
CHANGED
|
@@ -7438,7 +7438,7 @@ var exports_meta = {};
|
|
|
7438
7438
|
__export(exports_meta, {
|
|
7439
7439
|
PKG_VERSION: () => PKG_VERSION
|
|
7440
7440
|
});
|
|
7441
|
-
var PKG_VERSION = "1.1.0-beta.
|
|
7441
|
+
var PKG_VERSION = "1.1.0-beta.8";
|
|
7442
7442
|
var init_meta = () => {};
|
|
7443
7443
|
|
|
7444
7444
|
// ../../_shared/config/paths.ts
|
|
@@ -75712,19 +75712,60 @@ var RETIRED_ENV_VARS = [
|
|
|
75712
75712
|
{ name: "CEREFOX_MIN_TERM_COVERAGE", configKey: "min_term_coverage", since: "v1.1.0" },
|
|
75713
75713
|
{ name: "CEREFOX_SEARCH_ALPHA", configKey: "search_alpha", since: "v1.1.0" }
|
|
75714
75714
|
];
|
|
75715
|
-
function checkRetiredEnvVars() {
|
|
75715
|
+
async function checkRetiredEnvVars() {
|
|
75716
75716
|
const set = RETIRED_ENV_VARS.filter((v) => (process.env[v.name] ?? "").trim() !== "");
|
|
75717
75717
|
if (set.length === 0) {
|
|
75718
75718
|
return { name: "retired env", status: "ok", detail: "no retired variables set" };
|
|
75719
75719
|
}
|
|
75720
|
-
const
|
|
75721
|
-
|
|
75720
|
+
const settings = loadSettings();
|
|
75721
|
+
const stored = new Map;
|
|
75722
|
+
if (settings.supabaseUrl && settings.supabaseKey) {
|
|
75723
|
+
await Promise.all(set.map(async (v) => {
|
|
75724
|
+
try {
|
|
75725
|
+
const resp = await fetch(`${settings.supabaseUrl.replace(/\/$/, "")}/rest/v1/rpc/cerefox_get_config`, {
|
|
75726
|
+
method: "POST",
|
|
75727
|
+
headers: {
|
|
75728
|
+
"Content-Type": "application/json",
|
|
75729
|
+
apikey: settings.supabaseKey,
|
|
75730
|
+
Authorization: `Bearer ${settings.supabaseKey}`
|
|
75731
|
+
},
|
|
75732
|
+
body: JSON.stringify({ p_key: v.configKey })
|
|
75733
|
+
});
|
|
75734
|
+
if (!resp.ok)
|
|
75735
|
+
return;
|
|
75736
|
+
const body = await resp.json();
|
|
75737
|
+
stored.set(v.configKey, typeof body === "string" ? body : null);
|
|
75738
|
+
} catch {}
|
|
75739
|
+
}));
|
|
75740
|
+
}
|
|
75741
|
+
const sameNumber = (a, b2) => {
|
|
75742
|
+
const x = Number(a);
|
|
75743
|
+
const y = Number(b2);
|
|
75744
|
+
return Number.isFinite(x) && Number.isFinite(y) ? x === y : a.trim() === b2.trim();
|
|
75745
|
+
};
|
|
75746
|
+
const pending = set.filter((v) => {
|
|
75747
|
+
const dbValue = stored.get(v.configKey);
|
|
75748
|
+
if (dbValue == null)
|
|
75749
|
+
return true;
|
|
75750
|
+
return !sameNumber(dbValue, (process.env[v.name] ?? "").trim());
|
|
75751
|
+
});
|
|
75722
75752
|
const names = set.map((v) => v.name).join(", ");
|
|
75723
|
-
const
|
|
75753
|
+
const isAre = set.length === 1 ? "is" : "are";
|
|
75754
|
+
if (pending.length === 0) {
|
|
75755
|
+
return {
|
|
75756
|
+
name: "retired env",
|
|
75757
|
+
status: "skipped",
|
|
75758
|
+
detail: `${names} ${isAre} set in your .env but no longer read — the store already has the same value.`,
|
|
75759
|
+
hint: "Safe to delete those lines; nothing reads them."
|
|
75760
|
+
};
|
|
75761
|
+
}
|
|
75762
|
+
const moves = pending.map((v) => `cerefox config set ${v.configKey} ${(process.env[v.name] ?? "").trim()}`).join(`
|
|
75763
|
+
`);
|
|
75764
|
+
const prunedWasDisabled = pending.some((v) => v.configKey.startsWith("version_"));
|
|
75724
75765
|
return {
|
|
75725
75766
|
name: "retired env",
|
|
75726
75767
|
status: "warn",
|
|
75727
|
-
detail: `${names} ${
|
|
75768
|
+
detail: `${names} ${isAre} set in your .env but ${isAre} no longer read ` + `(moved into the database in ${set[0].since}).`,
|
|
75728
75769
|
hint: "These are server-side settings, so they now live in the database and one value " + `governs every client.
|
|
75729
75770
|
` + (prunedWasDisabled ? `Your data is safe: the upgrade switched version pruning OFF and deleted nothing.
|
|
75730
75771
|
` : "") + `To carry your settings over, run:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.1.0-beta.
|
|
3
|
+
"version": "1.1.0-beta.8",
|
|
4
4
|
"description": "Cerefox — 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",
|