@cerefox/memory 1.17.1 → 1.17.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.
- package/dist/bin/cerefox.js +5 -5
- package/dist/server-assets/_shared/ef-meta/index.ts +3 -3
- package/dist/server-assets/_shared/mcp-tools/search.ts +1 -1
- package/dist/server-assets/db/rpcs.sql +13 -5
- package/dist/server-assets/db/schema.sql +1 -1
- package/docs/guides/configuration.md +1 -1
- package/package.json +1 -1
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.17.
|
|
5321
|
+
var PKG_VERSION = "1.17.2";
|
|
5322
5322
|
var init_meta = () => {};
|
|
5323
5323
|
|
|
5324
5324
|
// ../../_shared/config/paths.ts
|
|
@@ -26230,7 +26230,7 @@ var init_bundled_docs = __esm(() => {
|
|
|
26230
26230
|
});
|
|
26231
26231
|
|
|
26232
26232
|
// ../../_shared/ef-meta/index.ts
|
|
26233
|
-
var EF_VERSION = "1.17.
|
|
26233
|
+
var EF_VERSION = "1.17.2", CEREFOX_VERSION = "1.17.2", EF_LAST_CHANGED = "1.17.2";
|
|
26234
26234
|
var init_ef_meta = () => {};
|
|
26235
26235
|
|
|
26236
26236
|
// ../../_shared/compatibility/index.ts
|
|
@@ -52610,7 +52610,7 @@ var init_search = __esm(() => {
|
|
|
52610
52610
|
},
|
|
52611
52611
|
min_term_coverage: {
|
|
52612
52612
|
type: "number",
|
|
52613
|
-
description: "Keyword OR-fallback confidence bar 0–1 (default: server-configured, else 0.
|
|
52613
|
+
description: "Keyword OR-fallback confidence bar 0–1 (default: server-configured, else 0.66): fraction of the query's meaningful terms a result must match to count as a confident hit; weaker matches return flagged below-confidence. 0 = any matching term. Needs schema ≥ 0.9.1."
|
|
52614
52614
|
},
|
|
52615
52615
|
max_bytes: {
|
|
52616
52616
|
type: "integer",
|
|
@@ -65802,7 +65802,7 @@ var CONFIG_CATALOG = [
|
|
|
65802
65802
|
key: "min_term_coverage",
|
|
65803
65803
|
description: "Fraction of a query's meaningful terms a keyword OR-fallback match must cover to count as confident.",
|
|
65804
65804
|
kind: "number",
|
|
65805
|
-
defaultValue: "0.
|
|
65805
|
+
defaultValue: "0.66",
|
|
65806
65806
|
min: 0,
|
|
65807
65807
|
max: 1,
|
|
65808
65808
|
group: "Retrieval"
|
|
@@ -75589,7 +75589,7 @@ async function action32(query, options) {
|
|
|
75589
75589
|
}
|
|
75590
75590
|
}
|
|
75591
75591
|
function registerSearch(program) {
|
|
75592
|
-
program.command("search").description("Search the knowledge base (hybrid FTS + semantic).").argument("<query>", "Natural-language search query.").option("-c, --match-count <n>", "Maximum number of documents to return.", "5").option("-p, --project-name <name>", "Filter results to a specific project.").option("-f, --metadata-filter <json>", "JSON containment filter; only docs whose metadata contains ALL pairs are returned.").option("--mode <mode>", "Search mode: docs (default), hybrid, fts.", "docs").option("--alpha <float>", "Semantic weight 0..1 (default: CEREFOX_SEARCH_ALPHA; else 0.7).").option("--min-score <float>", "Minimum cosine similarity threshold (default: the store's min_search_score; else 0.5, or 0.6 on a local-embedder store).").option("--min-term-coverage <float>", "OR-fallback keyword matches must cover at least this fraction of the query's meaningful terms to count as confident hits (default: the store's min_term_coverage; else 0.
|
|
75592
|
+
program.command("search").description("Search the knowledge base (hybrid FTS + semantic).").argument("<query>", "Natural-language search query.").option("-c, --match-count <n>", "Maximum number of documents to return.", "5").option("-p, --project-name <name>", "Filter results to a specific project.").option("-f, --metadata-filter <json>", "JSON containment filter; only docs whose metadata contains ALL pairs are returned.").option("--mode <mode>", "Search mode: docs (default), hybrid, fts.", "docs").option("--alpha <float>", "Semantic weight 0..1 (default: CEREFOX_SEARCH_ALPHA; else 0.7).").option("--min-score <float>", "Minimum cosine similarity threshold (default: the store's min_search_score; else 0.5, or 0.6 on a local-embedder store).").option("--min-term-coverage <float>", "OR-fallback keyword matches must cover at least this fraction of the query's meaningful terms to count as confident hits (default: the store's min_term_coverage; else 0.66; needs schema ≥ 0.9.1).").option("--max-bytes <n>", "Response size budget in bytes (default: CEREFOX_MAX_RESPONSE_BYTES or 200000).").addOption(authorOption("read")).addOption(requestorAliasOption()).option("--json", "Emit machine-readable JSON instead of the default text.").option("--only-metadata", "List matching docs (id, score, chunks, chars, partial/full) WITHOUT their content — like the web UI's collapsed result list. Grab a [id:…] then `cerefox document get <id>`.").action(action32);
|
|
75593
75593
|
}
|
|
75594
75594
|
|
|
75595
75595
|
// src/cli/commands/self-update.ts
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* doesn't touch `supabase/functions/` leaves it alone).
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
export const EF_VERSION = "1.17.
|
|
21
|
+
export const EF_VERSION = "1.17.2";
|
|
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.17.1";
|
|
|
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.17.
|
|
39
|
+
export const CEREFOX_VERSION = "1.17.2";
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The most recent version whose EF-side SOURCE actually changed (#127).
|
|
@@ -46,7 +46,7 @@ export const CEREFOX_VERSION = "1.17.1";
|
|
|
46
46
|
* `cut_release.ts` ONLY when EF source changed since the last tag; doctor
|
|
47
47
|
* uses it to stay silent on label-only drift.
|
|
48
48
|
*/
|
|
49
|
-
export const EF_LAST_CHANGED = "1.17.
|
|
49
|
+
export const EF_LAST_CHANGED = "1.17.2";
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* The 8 peer EFs the cerefox-mcp aggregator probes (excludes cerefox-mcp
|
|
@@ -490,7 +490,7 @@ export const searchTool: ToolDefinition = {
|
|
|
490
490
|
min_term_coverage: {
|
|
491
491
|
type: "number",
|
|
492
492
|
description:
|
|
493
|
-
"Keyword OR-fallback confidence bar 0–1 (default: server-configured, else 0.
|
|
493
|
+
"Keyword OR-fallback confidence bar 0–1 (default: server-configured, else 0.66): fraction of the query's meaningful terms a result must match to count as a confident hit; weaker matches return flagged below-confidence. 0 = any matching term. Needs schema ≥ 0.9.1.",
|
|
494
494
|
},
|
|
495
495
|
max_bytes: {
|
|
496
496
|
type: "integer",
|
|
@@ -184,10 +184,16 @@ DECLARE
|
|
|
184
184
|
cerefox_default_min_search_score()));
|
|
185
185
|
v_alpha FLOAT := COALESCE(p_alpha,
|
|
186
186
|
cerefox_config_float('search_alpha', 0.7));
|
|
187
|
-
-- 0.18.
|
|
187
|
+
-- 0.18.2: 0.66, so a confident OR-fallback match needs two of three
|
|
188
|
+
-- terms. 0.18.0 shipped 0.67, which for three terms is 2.01, i.e. all
|
|
189
|
+
-- three, which on real data made multi-word keyword queries rank markedly
|
|
190
|
+
-- worse
|
|
191
|
+
-- (docs/specs/search-calibration.md). The bar is coverage >= v * terms, so
|
|
192
|
+
-- the value must sit at or below k/n for the k-of-n rule it intends.
|
|
193
|
+
-- (0.18.0 note:) a confident OR-fallback match needs two of
|
|
188
194
|
-- three terms, not one of two (docs/specs/search-calibration.md).
|
|
189
195
|
v_min_coverage FLOAT := COALESCE(p_min_term_coverage,
|
|
190
|
-
cerefox_config_float('min_term_coverage', 0.
|
|
196
|
+
cerefox_config_float('min_term_coverage', 0.66));
|
|
191
197
|
BEGIN
|
|
192
198
|
-- Build the OR-composed query: plainto each whitespace token (so tokens get
|
|
193
199
|
-- the same normalization/stemming as the AND path), skip stopword-only
|
|
@@ -297,7 +303,7 @@ BEGIN
|
|
|
297
303
|
-- folds to once p_use_upgrade is known) lets the planner serve this
|
|
298
304
|
-- from the HNSW index, which is approximate and returns at most
|
|
299
305
|
-- hnsw.ef_search (40) rows: on a store with heavy version churn it
|
|
300
|
-
-- returned
|
|
306
|
+
-- returned far fewer candidates than asked for, mostly not the
|
|
301
307
|
-- nearest ones. An exact scan is also faster at knowledge-base
|
|
302
308
|
-- scale (thousands of chunks).
|
|
303
309
|
ORDER BY vec_score DESC
|
|
@@ -429,7 +435,7 @@ DECLARE
|
|
|
429
435
|
seen_tokens TEXT[] := '{}';
|
|
430
436
|
total_tokens INT;
|
|
431
437
|
v_min_coverage FLOAT := COALESCE(p_min_term_coverage,
|
|
432
|
-
cerefox_config_float('min_term_coverage', 0.
|
|
438
|
+
cerefox_config_float('min_term_coverage', 0.66));
|
|
433
439
|
BEGIN
|
|
434
440
|
FOR tok IN SELECT unnest(regexp_split_to_array(trim(p_query_text), '\s+')) LOOP
|
|
435
441
|
tok_q := plainto_tsquery('english', tok);
|
|
@@ -3229,6 +3235,8 @@ SET search_path = public, pg_catalog
|
|
|
3229
3235
|
AS $$
|
|
3230
3236
|
-- Keep in lockstep with the `@version:` marker in schema.sql (cut_release.ts
|
|
3231
3237
|
-- enforces it). Bump whenever schema.sql OR rpcs.sql changes.
|
|
3238
|
+
-- 0.18.2: min_term_coverage built-in default 0.66 (two of three terms).
|
|
3239
|
+
-- 0.18.0's 0.67 required all three for a three-term query. RPC-only.
|
|
3232
3240
|
-- 0.18.1: exact vector candidates. Hybrid and semantic search ordered by
|
|
3233
3241
|
-- the bare distance, which let the planner use the approximate HNSW index
|
|
3234
3242
|
-- (at most ef_search = 40 rows, poor recall after heavy version churn);
|
|
@@ -3279,7 +3287,7 @@ AS $$
|
|
|
3279
3287
|
-- 0.11.0 supersedes 0.10.6 (v1.2.1, #191): this branch carries that fix plus
|
|
3280
3288
|
-- the partial-edit surface, and both migrations (0019, 0020) are in the
|
|
3281
3289
|
-- sequence, so a store deploying this gets everything from both lines.
|
|
3282
|
-
SELECT '0.18.
|
|
3290
|
+
SELECT '0.18.2'::TEXT;
|
|
3283
3291
|
$$;
|
|
3284
3292
|
|
|
3285
3293
|
-- ── cerefox_find_dead_links ──────────────────────────────────────────────────
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
-- Requires extensions: vector (pgvector), uuid-ossp
|
|
6
6
|
-- These are enabled at the top of db_deploy.py before this file is applied.
|
|
7
7
|
--
|
|
8
|
-
-- @version: 0.18.
|
|
8
|
+
-- @version: 0.18.2
|
|
9
9
|
-- The `@version` marker above is read by the schema-version-mismatch banner
|
|
10
10
|
-- (see /api/v1/schema-version). Bump it whenever schema.sql OR rpcs.sql
|
|
11
11
|
-- changes in a way that requires `cerefox server deploy` to be re-run —
|
|
@@ -156,7 +156,7 @@ This handles intermittent OpenAI API errors (500s) that would otherwise cause se
|
|
|
156
156
|
> | Key | Default | Meaning |
|
|
157
157
|
> |---|---|---|
|
|
158
158
|
> | `min_search_score` | **0.5** on an OpenAI store, **0.6** on a local-embedder (nomic) store, derived from the store's own embeddings | A result with no confident keyword match must be at least this similar to the query. Nomic scores unrelated text around 0.4 to 0.55, so 0.5 would let it through. |
|
|
159
|
-
> | `min_term_coverage` | **0.
|
|
159
|
+
> | `min_term_coverage` | **0.66** (0.5 before v1.17.0; 0.67 in v1.17.0 and v1.17.1, which made a three-word query need all three) | When no document contains every query word, a keyword match counts as confident only if it covers this share of the words: two of three, not one of two. |
|
|
160
160
|
> | `search_alpha` | **0.7** | Weight of meaning against keywords. Both sides are on a 0 to 1 scale since v1.17.0, so the weight now means what it says. |
|
|
161
161
|
>
|
|
162
162
|
> Tune only with evidence: `bun scripts/search_benchmark.ts` measures any
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.2",
|
|
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",
|