@cerefox/memory 1.0.8 → 1.1.0-beta.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/AGENT_QUICK_REFERENCE.md +11 -2
- package/dist/bin/cerefox.js +956 -201
- package/dist/frontend/assets/index-C1JXZA9m.css +1 -0
- package/dist/frontend/assets/index-CMNl_LF9.js +121 -0
- package/dist/frontend/assets/index-CMNl_LF9.js.map +1 -0
- package/dist/frontend/index.html +2 -2
- package/dist/server-assets/_shared/ef-meta/index.ts +2 -2
- package/dist/server-assets/_shared/mcp-tools/_utils.ts +26 -0
- package/dist/server-assets/_shared/mcp-tools/feature-flags.ts +68 -0
- package/dist/server-assets/_shared/mcp-tools/get-help-content.ts +4 -4
- package/dist/server-assets/_shared/mcp-tools/index.ts +42 -1
- package/dist/server-assets/_shared/mcp-tools/relations.ts +284 -0
- package/dist/server-assets/_shared/mcp-tools/search.ts +14 -8
- package/dist/server-assets/db/migrations/0014_document_relations.sql +64 -0
- package/dist/server-assets/db/rpcs.sql +294 -14
- package/dist/server-assets/db/schema.sql +40 -2
- package/dist/server-assets/supabase/functions/cerefox-mcp/index.ts +25 -8
- package/docs/guides/cli.md +0 -36
- package/docs/guides/configuration.md +21 -0
- package/docs/guides/migration-1.0.md +1 -3
- package/docs/guides/ops-scripts.md +2 -2
- package/docs/guides/setup-local.md +3 -1
- package/docs/guides/setup-supabase.md +35 -4
- package/docs/guides/upgrading.md +1 -1
- package/package.json +3 -3
- package/dist/frontend/assets/index-Asx5wD7g.css +0 -1
- package/dist/frontend/assets/index-VeqA60-v.js +0 -125
- package/dist/frontend/assets/index-VeqA60-v.js.map +0 -1
|
@@ -117,6 +117,27 @@ This handles intermittent OpenAI API errors (500s) that would otherwise cause se
|
|
|
117
117
|
|
|
118
118
|
## Retrieval
|
|
119
119
|
|
|
120
|
+
> **Optional features.** `relations_enabled` (default `false`) controls whether
|
|
121
|
+
> the document-relation tools are exposed to agents. The feature ships
|
|
122
|
+
> **dormant**: the table stays empty, `lifecycle_status` defaults to `active`,
|
|
123
|
+
> search is untouched, and the tools do not appear in any agent's tool list
|
|
124
|
+
> until you opt in with `cerefox config set relations_enabled true`.
|
|
125
|
+
|
|
126
|
+
> **Deployment-wide defaults (v1.1.0+).** `min_search_score`,
|
|
127
|
+
> `min_term_coverage`, and `search_alpha` can also be set **once, in the
|
|
128
|
+
> database**, and every access path obeys — CLI, local and remote MCP, Edge
|
|
129
|
+
> Functions, web — because they all resolve through the same search RPCs:
|
|
130
|
+
>
|
|
131
|
+
> ```bash
|
|
132
|
+
> cerefox config set min_search_score 0.6
|
|
133
|
+
> cerefox config list # shows every settable key
|
|
134
|
+
> ```
|
|
135
|
+
>
|
|
136
|
+
> Resolution order, highest first: **per-call argument** (`--min-score`, the
|
|
137
|
+
> `min_score` MCP parameter) → **client env var** below → **`cerefox_config`**
|
|
138
|
+
> → built-in default. A malformed stored value is ignored in favour of the
|
|
139
|
+
> built-in, so a bad setting can never break search.
|
|
140
|
+
|
|
120
141
|
> **Which paths read these?** Client-side tunables in this section are read
|
|
121
142
|
> from *your* `.env` by the **CLI**, the **local MCP server**, and `cerefox
|
|
122
143
|
> web`. Since **v1.0.6** the same values are also honored on the **remote MCP /
|
|
@@ -61,9 +61,7 @@ The migration is **lazy and safe**:
|
|
|
61
61
|
- Existing documents keep the legacy format and reconstruct **exactly as before** — nothing
|
|
62
62
|
re-processes, nothing re-embeds.
|
|
63
63
|
- A document moves to the new format automatically the next time it is edited/saved. To
|
|
64
|
-
convert everything now instead, run `cerefox server
|
|
65
|
-
re-embeds, so try `--dry-run` first). **Not `server reindex`** — that refreshes
|
|
66
|
-
embeddings on existing chunks and cannot change the stored format (#164).
|
|
64
|
+
convert everything now instead, run `cerefox server reindex`.
|
|
67
65
|
- `cerefox doctor` shows how many documents still use the legacy format.
|
|
68
66
|
|
|
69
67
|
Details: `cerefox guides show content-format` (or [`content-format.md`](content-format.md)).
|
|
@@ -126,7 +126,7 @@ bun scripts/backup_create.ts && bun scripts/db_migrate.ts
|
|
|
126
126
|
|
|
127
127
|
## backup_create.ts — Create a backup
|
|
128
128
|
|
|
129
|
-
Exports all documents, chunks,
|
|
129
|
+
Exports all documents, chunks, and metadata to a JSON file in the backup directory. (End users use `cerefox backup create`.)
|
|
130
130
|
|
|
131
131
|
```bash
|
|
132
132
|
bun scripts/backup_create.ts [OPTIONS]
|
|
@@ -153,7 +153,7 @@ Output: `backup-data/cerefox-20260308T143022Z-before-v2-migration.json`
|
|
|
153
153
|
|
|
154
154
|
## backup_restore.ts — Restore from a backup
|
|
155
155
|
|
|
156
|
-
Restores documents
|
|
156
|
+
Restores documents and chunks from a previously created backup file. Idempotent — documents with the same content hash are skipped. (End users use `cerefox backup restore`.)
|
|
157
157
|
|
|
158
158
|
```bash
|
|
159
159
|
bun scripts/backup_restore.ts BACKUP_FILE [OPTIONS]
|
|
@@ -143,7 +143,9 @@ cerefox-local start # start a stopped container
|
|
|
143
143
|
cerefox-local stop # stop it (your data persists in the Docker volume)
|
|
144
144
|
cerefox-local restart
|
|
145
145
|
cerefox-local logs -f # follow the logs
|
|
146
|
-
cerefox-local upgrade #
|
|
146
|
+
cerefox-local upgrade # upgrade to the newest release + recreate (keeps data + OPENAI key)
|
|
147
|
+
cerefox-local upgrade v1.2.3 # pin an exact version (also how you downgrade)
|
|
148
|
+
cerefox-local upgrade --latest # follow the moving :latest tag from now on
|
|
147
149
|
cerefox-local uninstall # remove the container, KEEP the data volume
|
|
148
150
|
cerefox-local uninstall --purge # remove the container AND delete the data volume
|
|
149
151
|
```
|
|
@@ -21,7 +21,22 @@ This guide walks you from a blank Supabase project to a fully deployed Cerefox s
|
|
|
21
21
|
1. Go to [app.supabase.com](https://app.supabase.com) and sign in
|
|
22
22
|
2. Click **New project**
|
|
23
23
|
3. Choose a name (e.g. `cerefox`), set a strong database password, pick a region close to you
|
|
24
|
-
4.
|
|
24
|
+
4. Review the security options offered at creation (defaults in brackets):
|
|
25
|
+
- **Enable Data API** *[on]* — **keep it on.** The CLI, web UI, and local MCP all reach
|
|
26
|
+
Supabase through PostgREST; without it nothing works.
|
|
27
|
+
- **Automatically expose new tables** *[on]* — **turn it off.** Cerefox grants its tables
|
|
28
|
+
to `service_role` explicitly (migration `0013`), so it does not rely on implicit
|
|
29
|
+
exposure, and leaving it on means any future table is exposed to the Data API roles by
|
|
30
|
+
default. Supabase recommends disabling it too.
|
|
31
|
+
- **Enable automatic RLS** *[off]* — optional. Cerefox's schema already runs
|
|
32
|
+
`ENABLE ROW LEVEL SECURITY` on every table it creates, so this only covers tables
|
|
33
|
+
Cerefox doesn't own. Harmless either way; every Cerefox access path authenticates as
|
|
34
|
+
`service_role`, which bypasses RLS by design.
|
|
35
|
+
5. Click **Create new project** and wait ~2 minutes for it to provision
|
|
36
|
+
|
|
37
|
+
> **Note on the database password**: it is used *only* by `cerefox server deploy` (a direct
|
|
38
|
+
> Postgres connection for DDL). Everyday CLI, web, and MCP traffic uses the secret key
|
|
39
|
+
> instead. Store it in a password manager — Supabase will not show it again.
|
|
25
40
|
|
|
26
41
|
---
|
|
27
42
|
|
|
@@ -56,14 +71,24 @@ Either way: keep this key secret — it bypasses Row Level Security and grants f
|
|
|
56
71
|
|
|
57
72
|
This is used by `cerefox server deploy` (and the contributor scripts `bun scripts/db_deploy.ts` / `bun scripts/db_migrate.ts`). See the **[Connection pooling in 2026](#connection-pooling-2026)** reference section near the end of this guide for context. The short version:
|
|
58
73
|
|
|
59
|
-
1.
|
|
74
|
+
1. From the **project overview**, click the **Copy** button beside the project URL, then
|
|
75
|
+
**Get Connected** in the dropdown. Under **Direct Connection Pooling**, choose
|
|
76
|
+
**Session pooler**. *(Verified against a project created 2026-08-05. Supabase moves this
|
|
77
|
+
regularly — it used to live under Project Settings → Database → Connection pooling, which
|
|
78
|
+
may still work.)*
|
|
60
79
|
2. Copy the **Session Pooler** URI (host ends in `.pooler.supabase.com`, port `5432`).
|
|
61
80
|
3. Confirm the username has the form `postgres.<project-ref>` — without that suffix you'll get "Tenant or user not found".
|
|
62
81
|
4. Append `?sslmode=require` to enforce TLS explicitly.
|
|
63
82
|
|
|
83
|
+
The result looks like this — note both the ref-suffixed username **and** the pooler host:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
postgresql://postgres.abcdefghijklmnop:<password>@aws-0-<region>.pooler.supabase.com:5432/postgres?sslmode=require
|
|
87
|
+
```
|
|
88
|
+
|
|
64
89
|
If you only see Direct Connection and Transaction Pooler in your dashboard, take the Transaction Pooler URI and change `:6543` → `:5432`. That gives you the Session Pooler. **Do not use port 6543** — Transaction Pooler does not support DDL and the schema deploy will fail mid-schema.
|
|
65
90
|
|
|
66
|
-
|
|
91
|
+
> **Don't take the Direct connection string** (`postgresql://postgres:<password>@db.<ref>.supabase.co:5432/postgres`). It is the most prominent option in the dialog, but it is IPv6-only on the free tier, so it times out on most home and office networks. The dashboard warns about this directly.
|
|
67
92
|
|
|
68
93
|
---
|
|
69
94
|
|
|
@@ -380,7 +405,13 @@ Not yet. The Supabase docs explicitly state: *"You can still use old anon and se
|
|
|
380
405
|
|
|
381
406
|
## Connection pooling in 2026 <a id="connection-pooling-2026"></a>
|
|
382
407
|
|
|
383
|
-
Supabase's "Connect" dialog
|
|
408
|
+
Supabase's "Connect" dialog has been redesigned repeatedly through 2026, and where the
|
|
409
|
+
**Session Pooler** lives has moved with it. As of **2026-08-05** it is inside the Connect
|
|
410
|
+
dialog: project overview → **Copy** (beside the project URL) → **Get Connected** →
|
|
411
|
+
**Direct Connection Pooling** → **Session pooler**. Earlier in the year it was only under
|
|
412
|
+
Project Settings → Database → Connection pooling. Check both if one comes up empty — and the
|
|
413
|
+
shape of the URI is the reliable signal, not the menu path: **ref-suffixed username plus a
|
|
414
|
+
`.pooler.supabase.com` host on port 5432**. Here's the full picture.
|
|
384
415
|
|
|
385
416
|
### The three Postgres connection types
|
|
386
417
|
|
package/docs/guides/upgrading.md
CHANGED
|
@@ -10,7 +10,7 @@ to re-run.
|
|
|
10
10
|
|---|---|
|
|
11
11
|
| **Installer / npm** (end user, no repo clone) | `cerefox self-update` (or re-run the [installer](quickstart.md#1-install), or `bun/npm update -g @cerefox/memory`). Then `cerefox server deploy` **if the release notes flag a server-side change**. `cerefox doctor` verifies. |
|
|
12
12
|
| **Source checkout** (`git clone`, contributor) | `git pull`, then `cerefox server deploy` (or the lower-level `bun scripts/db_*.ts` + `npx supabase functions deploy`). Rebuild the SPA if you run `cerefox web` from source. |
|
|
13
|
-
| **Local / self-hosted (Docker, World B)** | `cerefox-local upgrade` —
|
|
13
|
+
| **Local / self-hosted (Docker, World B)** | `cerefox-local upgrade` — resolves the newest release, pulls it, and recreates the container (`upgrade <tag>` pins an exact version; `upgrade --latest` follows the moving tag). Data persists in the volume; OpenAI key + tuning overrides preserved. **No separate `server deploy`/`reindex`**: the CLI, web, PostgREST, and schema all ship together in one versioned image, so they can't drift. See [`setup-local.md`](setup-local.md). |
|
|
14
14
|
|
|
15
15
|
> **On an old pre-installer clone (0.1.x)?** The cleanest upgrade is to stop
|
|
16
16
|
> running from the repo and install the package: follow the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-beta.2",
|
|
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",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
44
44
|
"@supabase/supabase-js": "^2.45.0",
|
|
45
45
|
"cli-progress": "^3.12.0",
|
|
46
|
-
"commander": "^
|
|
46
|
+
"commander": "^14.0.3",
|
|
47
47
|
"hono": "^4.12.34",
|
|
48
48
|
"mammoth": "^1.9.0",
|
|
49
49
|
"ora": "^9.4.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"zod": "^3.23.0"
|
|
55
55
|
},
|
|
56
56
|
"optionalDependencies": {
|
|
57
|
-
"@huggingface/transformers": "^
|
|
57
|
+
"@huggingface/transformers": "^4.2.0",
|
|
58
58
|
"onnxruntime-node": "^1.21.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|