@cerefox/memory 1.14.2 → 1.14.3
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/AGENT_GUIDE.md +1 -1
- package/dist/bin/cerefox.js +609 -415
- package/dist/server-assets/_shared/ef-meta/index.ts +3 -3
- package/dist/server-assets/_shared/mcp-tools/metadata-search.ts +69 -20
- package/dist/server-assets/_shared/mcp-tools/search.ts +259 -65
- package/dist/server-assets/supabase/functions/cerefox-search/index.ts +53 -15
- package/docs/guides/connect-agents.md +11 -6
- package/docs/guides/response-limits.md +25 -3
- package/package.json +3 -3
|
@@ -638,7 +638,7 @@ In the action editor, paste this schema (replace `<your-project-ref>`):
|
|
|
638
638
|
openapi: 3.1.0
|
|
639
639
|
info:
|
|
640
640
|
title: Cerefox Knowledge Base
|
|
641
|
-
version: 4.
|
|
641
|
+
version: 4.2.0
|
|
642
642
|
servers:
|
|
643
643
|
- url: https://<your-project-ref>.supabase.co/functions/v1
|
|
644
644
|
paths:
|
|
@@ -697,7 +697,10 @@ paths:
|
|
|
697
697
|
Response size budget in bytes (server hard ceiling 200000).
|
|
698
698
|
Whole results are dropped (never truncated mid-document) until
|
|
699
699
|
the budget is met; the response sets `truncated: true` when this
|
|
700
|
-
happens.
|
|
700
|
+
happens. One exception: when nothing fits at all, a single
|
|
701
|
+
content-free header is returned even if it exceeds the budget,
|
|
702
|
+
because an empty results array would read as "nothing was found"
|
|
703
|
+
(see degraded). Advanced; leave unset for the default.
|
|
701
704
|
author:
|
|
702
705
|
type: string
|
|
703
706
|
description: >
|
|
@@ -713,9 +716,11 @@ paths:
|
|
|
713
716
|
chunk_count, total_chars, best_score, is_partial.
|
|
714
717
|
matched is how many results the query found, before the byte budget.
|
|
715
718
|
When degraded is true, everything that matched was larger than max_bytes, so the
|
|
716
|
-
items carry NO
|
|
717
|
-
larger max_bytes or fetch one document.
|
|
718
|
-
|
|
719
|
+
items carry NO content of any kind — they name what exists so you can re-ask with
|
|
720
|
+
a larger max_bytes or fetch one document. That header list is itself capped to
|
|
721
|
+
max_bytes, so it may be a SUBSET of matched (at least one item is always
|
|
722
|
+
returned). Read matched, never results.length, to know how much the query found:
|
|
723
|
+
"nothing was found" is matched == 0.
|
|
719
724
|
is_partial is true when the document exceeded the small-to-big threshold — in that
|
|
720
725
|
case full_content contains matched chunks plus their neighbours rather than the
|
|
721
726
|
complete document, and total_chars still reflects the full document size.
|
|
@@ -1130,7 +1135,7 @@ If the same content was already ingested (SHA-256 hash match), returns `"skipped
|
|
|
1130
1135
|
| `mode` | string | `"docs"` | `"docs"` = full document results (recommended) |
|
|
1131
1136
|
| `alpha` | number | 0.7 | Semantic weight (0 = FTS only, 1 = semantic only) |
|
|
1132
1137
|
| `min_score` | number | 0.5 | Minimum cosine similarity threshold |
|
|
1133
|
-
| `max_bytes` | number | 200000 | Response size budget in bytes. Results are dropped whole (never truncated mid-document) once the budget is reached. The response includes `truncated: true` and `response_bytes` when the limit was hit. See "Response size limit" below. |
|
|
1138
|
+
| `max_bytes` | number | 200000 | Response size budget in bytes. Results are dropped whole (never truncated mid-document) once the budget is reached. The response includes `truncated: true` and `response_bytes` when the limit was hit. When nothing fits, `degraded: true` and a content-free header list come back instead of an empty `results` — always at least one item, even if it exceeds the budget. See "Response size limit" below. |
|
|
1134
1139
|
|
|
1135
1140
|
**Response envelope fields:**
|
|
1136
1141
|
|
|
@@ -30,13 +30,35 @@ agent's context window matters. Callers always choose whether to apply a limit.
|
|
|
30
30
|
|
|
31
31
|
## How limits are applied
|
|
32
32
|
|
|
33
|
-
Truncation is always **whole-document**:
|
|
34
|
-
|
|
33
|
+
Truncation is always **whole-document**: a result is returned in full or not at all.
|
|
34
|
+
Cerefox never cuts a document mid-content.
|
|
35
|
+
|
|
36
|
+
A result that does not fit is **skipped**, not treated as the end of the list, so the
|
|
37
|
+
returned set is not necessarily the top N by rank: one oversized document ranked first
|
|
38
|
+
does not hide the smaller results behind it (v1.14.3). Anything skipped is named in the
|
|
39
|
+
footer, so what is missing is always visible.
|
|
35
40
|
|
|
36
41
|
When truncation occurs:
|
|
37
|
-
- The
|
|
42
|
+
- The MCP tool appends a footer naming what was held back:
|
|
43
|
+
`[3 of 12 result(s) shown; 9 did not fit max_bytes=8000: Plan › Rollout (chunk 4) [id: …] and 8 more. Raise max_bytes, narrow the query, or lower match_count.]`
|
|
38
44
|
- The Edge Function includes `"truncated": true` and `"response_bytes": N` in the JSON response.
|
|
39
45
|
|
|
46
|
+
**The reply as a whole stays inside the budget**, footer and warnings included:
|
|
47
|
+
they are measured in the same rendered bytes the caller receives (v1.14.3).
|
|
48
|
+
When the budget is tight the framing gives way before the results do.
|
|
49
|
+
|
|
50
|
+
**When nothing fits at all** — the smallest matching document is larger than
|
|
51
|
+
the whole budget — the reply is NOT "no results found", which an agent acts on
|
|
52
|
+
as "this knowledge does not exist". It is a header list naming what matched,
|
|
53
|
+
its size and its id, prefixed with a warning and the remedy. The same case on
|
|
54
|
+
the Edge Function sets `"degraded": true`, returns items with no content, and
|
|
55
|
+
reports `"matched"`: read that, not `results.length`, to know what the query
|
|
56
|
+
found. A reply may exceed `max_bytes` only by the framing that cannot be dropped
|
|
57
|
+
without misleading you: the notice that results were held back, or the
|
|
58
|
+
below-confidence advisory. Both are a few dozen bytes, and neither is ever
|
|
59
|
+
traded for content. Returning 1 of 5 results without saying so, or presenting
|
|
60
|
+
weak candidates as confident ones, would be worse than a small overrun.
|
|
61
|
+
|
|
40
62
|
---
|
|
41
63
|
|
|
42
64
|
## The server ceiling — agents can request less, never more
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.14.
|
|
3
|
+
"version": "1.14.3",
|
|
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",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"CHANGELOG.md"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@hono/node-server": "^2.
|
|
42
|
+
"@hono/node-server": "^2.1.1",
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
44
44
|
"@supabase/supabase-js": "^2.45.0",
|
|
45
45
|
"cli-progress": "^3.12.0",
|
|
46
46
|
"commander": "^14.0.3",
|
|
47
|
-
"hono": "^4.
|
|
47
|
+
"hono": "^4.13.7",
|
|
48
48
|
"mammoth": "^1.9.0",
|
|
49
49
|
"ora": "^9.4.0",
|
|
50
50
|
"picocolors": "^1.0.0",
|