@cerefox/memory 1.0.0-rc.1 → 1.0.0-rc.2

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.
@@ -7184,7 +7184,7 @@ var exports_meta = {};
7184
7184
  __export(exports_meta, {
7185
7185
  PKG_VERSION: () => PKG_VERSION
7186
7186
  });
7187
- var PKG_VERSION = "1.0.0-rc.1";
7187
+ var PKG_VERSION = "1.0.0-rc.2";
7188
7188
  var init_meta = () => {};
7189
7189
 
7190
7190
  // ../../node_modules/.bun/tslib@2.8.1/node_modules/tslib/tslib.js
@@ -76889,13 +76889,12 @@ function registerMetadataSearch(program2) {
76889
76889
  init_dist4();
76890
76890
  init_cli_core();
76891
76891
  init_config();
76892
- var DEFAULT_MODEL = "text-embedding-3-small";
76893
76892
  async function action27(options) {
76894
76893
  const settings = loadSettings();
76895
76894
  if (!settings.supabaseUrl || !settings.supabaseKey) {
76896
76895
  throw userError("Supabase credentials not configured — run `cerefox init` first.");
76897
76896
  }
76898
- if (!settings.openaiApiKey) {
76897
+ if (!settings.openaiApiKey && resolveEmbedderKind() !== "local") {
76899
76898
  throw userError("OPENAI_API_KEY not set — required for embeddings.");
76900
76899
  }
76901
76900
  const supabase = createClient(settings.supabaseUrl, settings.supabaseKey, {
@@ -76911,8 +76910,9 @@ async function action27(options) {
76911
76910
  if (options.documentId) {
76912
76911
  query = query.eq("document_id", options.documentId);
76913
76912
  }
76913
+ const targetModel = activeEmbedderName();
76914
76914
  if (!reindexAll) {
76915
- query = query.neq("embedder_primary", DEFAULT_MODEL);
76915
+ query = query.neq("embedder_primary", targetModel);
76916
76916
  }
76917
76917
  const { data, error: error3 } = await query;
76918
76918
  if (error3)
@@ -76941,7 +76941,7 @@ ${c2.content}`;
76941
76941
  });
76942
76942
  let embeddings;
76943
76943
  try {
76944
- embeddings = await embedBatch(texts, settings.openaiApiKey);
76944
+ embeddings = await embedBatch(texts, settings.openaiApiKey ?? "");
76945
76945
  } catch (err) {
76946
76946
  errors4 += slice.length;
76947
76947
  const msg = err instanceof Error ? err.message : String(err);
@@ -76951,7 +76951,7 @@ ${c2.content}`;
76951
76951
  for (let i = 0;i < slice.length; i++) {
76952
76952
  const { error: updErr } = await supabase.from("cerefox_chunks").update({
76953
76953
  embedding_primary: embeddings[i],
76954
- embedder_primary: DEFAULT_MODEL
76954
+ embedder_primary: targetModel
76955
76955
  }).eq("id", slice[i].id);
76956
76956
  if (updErr) {
76957
76957
  errors4 += 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cerefox/memory",
3
- "version": "1.0.0-rc.1",
3
+ "version": "1.0.0-rc.2",
4
4
  "description": "Cerefox — user-owned shared memory for AI agents. The local TypeScript runtime: stdio MCP server in v0.4; CLI binary added in v0.5; in-process web server in v0.6; ingestion pipeline in v0.7.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/fstamatelopoulos/cerefox",