@cerefox/memory 1.20.0 → 1.22.0
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 +181 -122
- package/dist/frontend/assets/Courier-BRJ-B_ND.js +1370 -0
- package/dist/frontend/assets/Courier-BRJ-B_ND.js.map +1 -0
- package/dist/frontend/assets/docx-Ch26gbLd.js +29 -0
- package/dist/frontend/assets/docx-Ch26gbLd.js.map +1 -0
- package/dist/frontend/assets/index-CV1iy1p2.css +1 -0
- package/dist/frontend/assets/index-Dhpoy6w3.js +122 -0
- package/dist/frontend/assets/index-Dhpoy6w3.js.map +1 -0
- package/dist/frontend/assets/markdown-YrYQtnOl.js +2 -0
- package/dist/frontend/assets/markdown-YrYQtnOl.js.map +1 -0
- package/dist/frontend/assets/pdf-Bpjaodjd.js +7 -0
- package/dist/frontend/assets/pdf-Bpjaodjd.js.map +1 -0
- package/dist/frontend/assets/pdfmake-L7DGtDcB.js +229 -0
- package/dist/frontend/assets/pdfmake-L7DGtDcB.js.map +1 -0
- package/dist/frontend/assets/rolldown-runtime-COiEfhsA.js +1 -0
- package/dist/frontend/assets/vfs_fonts-D9BViC6C.js +2 -0
- package/dist/frontend/assets/vfs_fonts-D9BViC6C.js.map +1 -0
- package/dist/frontend/index.html +3 -2
- package/dist/server-assets/_shared/ef-meta/index.ts +3 -3
- package/dist/server-assets/_shared/mcp-tools/_utils.ts +1 -0
- package/dist/server-assets/_shared/mcp-tools/audit-ops.ts +23 -2
- package/docs/guides/configuration.md +5 -2
- package/docs/guides/connect-agents.md +4 -0
- package/docs/guides/securing-local-access.md +17 -0
- package/docs/guides/setup-lan.md +160 -9
- package/docs/guides/staging-env.md +12 -2
- package/package.json +2 -2
- package/dist/frontend/assets/index-01k5C3sG.css +0 -1
- package/dist/frontend/assets/index-BQKYExx3.js +0 -121
- package/dist/frontend/assets/index-BQKYExx3.js.map +0 -1
package/dist/frontend/index.html
CHANGED
|
@@ -15,8 +15,9 @@
|
|
|
15
15
|
href="https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&display=swap"
|
|
16
16
|
/>
|
|
17
17
|
<title>Cerefox</title>
|
|
18
|
-
<script type="module" crossorigin src="/app/assets/index-
|
|
19
|
-
<link rel="
|
|
18
|
+
<script type="module" crossorigin src="/app/assets/index-Dhpoy6w3.js"></script>
|
|
19
|
+
<link rel="modulepreload" crossorigin href="/app/assets/rolldown-runtime-COiEfhsA.js">
|
|
20
|
+
<link rel="stylesheet" crossorigin href="/app/assets/index-CV1iy1p2.css">
|
|
20
21
|
</head>
|
|
21
22
|
<body>
|
|
22
23
|
<div id="root"></div>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* doesn't touch `supabase/functions/` leaves it alone).
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
|
-
export const EF_VERSION = "1.
|
|
21
|
+
export const EF_VERSION = "1.22.0";
|
|
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.20.0";
|
|
|
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.
|
|
39
|
+
export const CEREFOX_VERSION = "1.22.0";
|
|
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.20.0";
|
|
|
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.
|
|
49
|
+
export const EF_LAST_CHANGED = "1.22.0";
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
52
|
* The 8 peer EFs the cerefox-mcp aggregator probes (excludes cerefox-mcp
|
|
@@ -33,8 +33,9 @@ export const AUDIT_OPERATIONS = [
|
|
|
33
33
|
] as const;
|
|
34
34
|
|
|
35
35
|
/** The document-column label for an audit row — title, short id, or the
|
|
36
|
-
* NULL-document story:
|
|
37
|
-
*
|
|
36
|
+
* NULL-document story: what a store-level op changed ("(setting)" for a config
|
|
37
|
+
* change, "(project)" for a project op, "(store)" for any other), "(deleted)" for rows whose document
|
|
38
|
+
* was purged. One implementation across MCP, CLI, and web. */
|
|
38
39
|
export function auditDocLabel(
|
|
39
40
|
docTitle: string | null | undefined,
|
|
40
41
|
documentId: string | null | undefined,
|
|
@@ -42,9 +43,29 @@ export function auditDocLabel(
|
|
|
42
43
|
): string {
|
|
43
44
|
if (docTitle) return docTitle;
|
|
44
45
|
if (documentId) return documentId.slice(0, 8) + "…";
|
|
46
|
+
if (operation === "config-change") return "(setting)";
|
|
47
|
+
if (operation?.startsWith("project-")) return "(project)";
|
|
45
48
|
return isStoreLevelAuditOp(operation) ? "(store)" : "(deleted)";
|
|
46
49
|
}
|
|
47
50
|
|
|
51
|
+
/**
|
|
52
|
+
* What a store-level entry changed, for a surface that shows a short "change"
|
|
53
|
+
* per row (the web audit log). The RPCs write the change into the
|
|
54
|
+
* description ("config: trash_auto_purge_enabled: 'false' → 'true'",
|
|
55
|
+
* "Project 'x' created"); a config change drops its "config: " prefix, since
|
|
56
|
+
* the row already says it is a setting. Null for document operations, which
|
|
57
|
+
* show a size or a metadata change instead.
|
|
58
|
+
*/
|
|
59
|
+
export function storeChangeSummary(
|
|
60
|
+
operation: string | null | undefined,
|
|
61
|
+
description: string | null | undefined,
|
|
62
|
+
): string | null {
|
|
63
|
+
if (!isStoreLevelAuditOp(operation)) return null;
|
|
64
|
+
const d = (description ?? "").trim();
|
|
65
|
+
if (!d) return null;
|
|
66
|
+
return operation === "config-change" ? d.replace(/^config:\s*/, "") : d;
|
|
67
|
+
}
|
|
68
|
+
|
|
48
69
|
/**
|
|
49
70
|
* One line describing a metadata change (#333): the keys set (with their new
|
|
50
71
|
* values) and the keys removed. Built from an `update-metadata` audit entry's
|
|
@@ -341,6 +341,7 @@ there matters.
|
|
|
341
341
|
|----------|---------|-------------|
|
|
342
342
|
| `CEREFOX_BACKUP_DIR` | `~/.cerefox/backups` | Local directory where file system backups are stored. Created automatically if it doesn't exist. **Use an absolute path** — a relative value (such as the pre-v0.3.0 `./backups`) resolves against the current working directory, so snapshots scatter depending on where you run the command; `backup create` warns when it sees one. Does **not** follow `CEREFOX_CONFIG_DIR`, so a second environment must set it explicitly. |
|
|
343
343
|
| `CEREFOX_ENV_LABEL` | _(unset)_ | Names a non-production environment (e.g. `staging`). Purely cosmetic and inert when unset. When set: the web UI shows a banner on every page, `doctor` shows `[LABEL]` on its title line, `backup create` puts the label in the snapshot filename and payload, and `backup restore` warns when a snapshot's environment differs from the target's, and `configure-agent` registers the MCP server as `cerefox-<label>` so a labeled environment sits alongside production instead of overwriting it (v1.4.0, #168). See [`staging-env.md`](staging-env.md). |
|
|
344
|
+
| `CEREFOX_PROG_NAME` | _(unset)_ | The command you type for this environment, used in every hint and message that tells you what to run next (and in `--help`). Set it in an environment's `.env` when you reach it through an alias, for example `CEREFOX_PROG_NAME=cfx-stg` in `~/.cerefox/staging/.env`. A value in the `.env` wins over an inherited one, since it names that environment. `cerefox-local` sets it itself. When it is unset and `CEREFOX_CONFIG_DIR` is set, hints spell out `CEREFOX_CONFIG_DIR=<dir> cerefox …`, so a copied command never reaches your default environment (#352). |
|
|
344
345
|
| `CEREFOX_VERSION_RETENTION_HOURS` | **Retired in v1.1.0 — no longer read.** | Version retention is now a property of the store: `cerefox config set version_retention_hours <hours>`, or the **Settings** page. It moved because it used to be passed per-call from each client's environment, so the surviving history depended on which client wrote last. `cerefox doctor` reports the variable if it is still set. |
|
|
345
346
|
|
|
346
347
|
---
|
|
@@ -354,8 +355,10 @@ container it points at `cerefox-local upgrade` instead of `cerefox self-update`.
|
|
|
354
355
|
|
|
355
356
|
The only network call is a GET of the `latest` release from the npm registry
|
|
356
357
|
(`registry.npmjs.org`), the same request `cerefox self-update` makes. It is made
|
|
357
|
-
by `cerefox web` (at startup, then
|
|
358
|
-
|
|
358
|
+
by `cerefox web` (at startup, then whenever the saved answer is over an hour old,
|
|
359
|
+
so a new release shows in the web UI within about an hour), `cerefox mcp` (at
|
|
360
|
+
startup, when the last answer is over an hour old), `cerefox doctor` and
|
|
361
|
+
`cerefox self-update`.
|
|
359
362
|
Every other command only reads the saved answer, `update-check.json` in
|
|
360
363
|
`~/.cerefox` (or in `CEREFOX_CONFIG_DIR`, when set), so it never adds latency.
|
|
361
364
|
Offline, the check stays quiet.
|
|
@@ -77,6 +77,10 @@ in the container.
|
|
|
77
77
|
to `cerefox mcp` in the container; the same 15 core tools, identical behavior to every other path.
|
|
78
78
|
- The cloud paths above (remote Edge Function, GPT Actions) **do not apply** to a local-only
|
|
79
79
|
install — there are no Edge Functions.
|
|
80
|
+
- **Cerefox Local on another machine** (a NAS or home server, v1.22.0+): `docker exec` is not
|
|
81
|
+
available from your other machines, so they use the ordinary local MCP server instead, with
|
|
82
|
+
the host's URL and its API key in a separate config directory, and
|
|
83
|
+
`cerefox-lan configure-agent`. See [`setup-lan.md`](setup-lan.md#the-cli-and-coding-agents-cerefox-local-only).
|
|
80
84
|
|
|
81
85
|
---
|
|
82
86
|
|
|
@@ -181,6 +181,23 @@ The key authenticates; it does not identify. `X-Cerefox-Requestor` and
|
|
|
181
181
|
described in [`api.md`](api.md#attribution-is-not-authentication). Holding the
|
|
182
182
|
key does not make the name you send true.
|
|
183
183
|
|
|
184
|
+
## What the key opens on Cerefox Local
|
|
185
|
+
|
|
186
|
+
On Cerefox Local the gate covers two routes on the same port: `/api/v1`, the
|
|
187
|
+
HTTP API, and `/rest/v1`, the database API the CLI and the local MCP server use.
|
|
188
|
+
Since v1.22.0 (#351) a request that presents a valid key on `/rest/v1` reaches
|
|
189
|
+
the database as the container's service role: the server swaps the key for the
|
|
190
|
+
container's internal credential on the way in, the way Supabase's gateway does
|
|
191
|
+
for an `sb_secret_` key, and that credential never leaves the container. This
|
|
192
|
+
is what lets the CLI and coding agents on other machines use a Cerefox Local
|
|
193
|
+
on a LAN host ([`setup-lan.md`](setup-lan.md)).
|
|
194
|
+
|
|
195
|
+
It also means the key is the store's master key there: the database API can
|
|
196
|
+
read and change every table directly, below the safeguards the RPCs apply
|
|
197
|
+
(version history, the audit log). Give it only to clients you would give the
|
|
198
|
+
whole store to. A request let in without a key (the gate off, or the loopback
|
|
199
|
+
exemption) is forwarded exactly as before and gains nothing.
|
|
200
|
+
|
|
184
201
|
## Recipe: a harness in its own container
|
|
185
202
|
|
|
186
203
|
The case where a key is genuinely needed, and the one worth automating.
|
package/docs/guides/setup-lan.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Run Cerefox on an always-on machine on your home or office network (a NAS, a
|
|
4
4
|
mini PC, a home server) and use it from your other machines: agents, the CLI,
|
|
5
|
-
and the web UI in a browser. Requires **v1.20.0 or newer
|
|
5
|
+
and the web UI in a browser. Requires **v1.20.0 or newer** (the CLI and coding
|
|
6
|
+
agents against Cerefox Local: **v1.22.0**).
|
|
6
7
|
|
|
7
8
|
There are two ways to do it, and they do not depend on each other:
|
|
8
9
|
|
|
@@ -122,6 +123,101 @@ recreate the container. The data folder carries the database and, if you let the
|
|
|
122
123
|
container mint it, the key. Cerefox Local applies pending schema migrations on
|
|
123
124
|
boot.
|
|
124
125
|
|
|
126
|
+
### On a Synology NAS
|
|
127
|
+
|
|
128
|
+
Step by step with **Container Manager** on DSM 7.2. Menu names can differ a
|
|
129
|
+
little between DSM versions.
|
|
130
|
+
|
|
131
|
+
**1. Check the model can run it.** Container Manager has to be in Package
|
|
132
|
+
Center for your model; if it is not there, the model cannot run containers. The
|
|
133
|
+
image is published for both CPU types Synology uses, and Docker picks the right
|
|
134
|
+
one when it pulls. You only need to know which one when you copy the image over
|
|
135
|
+
as a file (step 3): **Control Panel → Info Center → General** shows the CPU. An
|
|
136
|
+
Intel or AMD processor needs `linux/amd64`; an ARM one (Realtek, for example)
|
|
137
|
+
needs `linux/arm64`.
|
|
138
|
+
|
|
139
|
+
**2. Install Container Manager and make two folders.** Install it from Package
|
|
140
|
+
Center; it creates a shared folder named `docker`. In File Station, create two
|
|
141
|
+
folders inside it:
|
|
142
|
+
|
|
143
|
+
- `docker/cerefox-db`: the database. Nothing else goes here.
|
|
144
|
+
- `docker/cerefox-project`: the compose file. Keep it separate from the data.
|
|
145
|
+
|
|
146
|
+
**3. Get the image.** Try **Container Manager → Registry** first. If the search
|
|
147
|
+
or the download fails (some DSM versions answer `ghcr.io` with "registry
|
|
148
|
+
returned bad result"), copy the image over as a file instead
|
|
149
|
+
([above](#if-the-host-cannot-pull-the-image), with the `--platform` from step
|
|
150
|
+
1), then **Image → Import → Add from file**. The image list must then show
|
|
151
|
+
`ghcr.io/fstamatelopoulos/cerefox-local` with the tag you will put in the
|
|
152
|
+
compose file, or Container Manager will try to pull it again.
|
|
153
|
+
|
|
154
|
+
**4. Create the Project.** **Project → Create**:
|
|
155
|
+
|
|
156
|
+
- **Project name:** `cerefox`.
|
|
157
|
+
- **Path:** `docker/cerefox-project`.
|
|
158
|
+
- **Source:** "Create docker-compose.yml", and paste:
|
|
159
|
+
|
|
160
|
+
```yaml
|
|
161
|
+
services:
|
|
162
|
+
cerefox:
|
|
163
|
+
image: ghcr.io/fstamatelopoulos/cerefox-local:v1.22.0
|
|
164
|
+
container_name: cerefox
|
|
165
|
+
restart: unless-stopped
|
|
166
|
+
ports:
|
|
167
|
+
- "8000:8000"
|
|
168
|
+
volumes:
|
|
169
|
+
- /volume1/docker/cerefox-db:/var/lib/postgresql/data
|
|
170
|
+
environment:
|
|
171
|
+
CEREFOX_API_REQUIRE_KEY: "1"
|
|
172
|
+
CEREFOX_API_KEY: "cfx_lak_YOUR-KEY"
|
|
173
|
+
CEREFOX_EMBEDDER: openai
|
|
174
|
+
OPENAI_API_KEY: "YOUR-OPENAI-KEY"
|
|
175
|
+
mem_limit: 2g
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
- **The volume path** is the full path on the NAS. `/volume1` is the first
|
|
179
|
+
storage volume; if your `docker` shared folder lives on another volume, File
|
|
180
|
+
Station shows which (right-click the folder, Properties).
|
|
181
|
+
- **The left port** (`8000:`) is the one your other machines will use. Change
|
|
182
|
+
it if something on the NAS already uses 8000; leave the right one alone.
|
|
183
|
+
- Skip the web portal (Web Station) step, then finish. Container Manager starts
|
|
184
|
+
the container.
|
|
185
|
+
|
|
186
|
+
**5. Check it started.** **Container → cerefox → Log.** The first boot creates
|
|
187
|
+
the database, which takes a minute; later boots apply any pending schema
|
|
188
|
+
migrations and then the server starts. Then, from another machine, run the
|
|
189
|
+
`curl` checks under [Using it from your other machines](#using-it-from-your-other-machines).
|
|
190
|
+
|
|
191
|
+
**6. Keep it on your network.** Do not forward the port on your router, and do
|
|
192
|
+
not publish it through QuickConnect, DSM's reverse proxy (Login Portal) or any
|
|
193
|
+
other remote-access feature. To go one step further, **Control Panel → Security
|
|
194
|
+
→ Firewall** can allow the port only from your local subnet.
|
|
195
|
+
|
|
196
|
+
**Upgrading.** Back up first (below). Then:
|
|
197
|
+
|
|
198
|
+
1. Stop the Project.
|
|
199
|
+
2. Get the new image (step 3).
|
|
200
|
+
3. Change the tag on the `image:` line in the Project's YAML.
|
|
201
|
+
4. Build the Project again.
|
|
202
|
+
|
|
203
|
+
The data folder carries the database, and the key stays in the Project's YAML
|
|
204
|
+
(a key set there is not saved in the data folder), so nothing else changes.
|
|
205
|
+
Once the new version is running, you can delete the old image under **Image**.
|
|
206
|
+
|
|
207
|
+
**Protecting the data.** The NAS gives you three layers; use the last one in any
|
|
208
|
+
case:
|
|
209
|
+
|
|
210
|
+
- **Snapshots** (the Snapshot Replication package, on a Btrfs volume) of the
|
|
211
|
+
`docker` shared folder. A snapshot of a running database is only
|
|
212
|
+
*crash-consistent*, like pulling the power cord: Postgres recovers from it,
|
|
213
|
+
but stop the Project first if you want a clean copy.
|
|
214
|
+
- **Hyper Backup** of the same folder to another disk or NAS. The same caveat
|
|
215
|
+
applies.
|
|
216
|
+
- **`cerefox backup create`** from one of your machines, with the CLI set up as
|
|
217
|
+
below. It writes a JSON snapshot of your documents and projects to that
|
|
218
|
+
machine, which `cerefox backup restore` can load into a new Cerefox, on the
|
|
219
|
+
NAS or elsewhere.
|
|
220
|
+
|
|
125
221
|
## B. The web container, with your Supabase backend
|
|
126
222
|
|
|
127
223
|
You need a working Supabase-backed Cerefox first (see
|
|
@@ -186,19 +282,69 @@ read it. It is readable by scripts running in the Cerefox page itself; the page
|
|
|
186
282
|
renders documents without raw HTML, and the project's tests fail on any change
|
|
187
283
|
that would let a document inject script.
|
|
188
284
|
|
|
189
|
-
|
|
285
|
+
### The CLI and coding agents (Cerefox Local only)
|
|
286
|
+
|
|
287
|
+
Requires **v1.22.0 or newer** on the LAN host. Your other machines run the
|
|
288
|
+
ordinary `cerefox` client (`npm install -g @cerefox/memory`) against the host,
|
|
289
|
+
the same way they would run it against a Supabase project: a URL and a key in a
|
|
290
|
+
`.env`. With the web container (B), point the client at your Supabase project as
|
|
291
|
+
usual instead; the web container plays no part in it.
|
|
292
|
+
|
|
293
|
+
Keep this setup in its own config directory, as you would a staging
|
|
294
|
+
environment ([`staging-env.md`](staging-env.md)), so it never mixes with another
|
|
295
|
+
Cerefox you use:
|
|
296
|
+
|
|
297
|
+
```bash
|
|
298
|
+
mkdir -p ~/.cerefox/lan && chmod 700 ~/.cerefox/lan
|
|
299
|
+
cat > ~/.cerefox/lan/.env <<'ENV'
|
|
300
|
+
CEREFOX_SUPABASE_URL=http://192.168.1.20:8000
|
|
301
|
+
CEREFOX_SUPABASE_KEY=cfx_lak_YOUR-KEY
|
|
302
|
+
CEREFOX_ENV_LABEL=lan
|
|
303
|
+
CEREFOX_PROG_NAME=cerefox-lan
|
|
304
|
+
CEREFOX_EMBEDDER=openai
|
|
305
|
+
OPENAI_API_KEY=sk-YOUR-OPENAI-KEY
|
|
306
|
+
ENV
|
|
307
|
+
chmod 600 ~/.cerefox/lan/.env
|
|
308
|
+
alias cerefox-lan='CEREFOX_CONFIG_DIR=~/.cerefox/lan cerefox'
|
|
309
|
+
|
|
310
|
+
cerefox-lan doctor
|
|
311
|
+
cerefox-lan configure-agent --tool claude-code # adds an MCP server named cerefox-lan
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
- **The embedder must match the LAN host's.** The client computes the
|
|
315
|
+
embeddings for what it ingests and searches, as it does against Supabase, so
|
|
316
|
+
it needs the same `CEREFOX_EMBEDDER` as the host, and for `openai` its own
|
|
317
|
+
OpenAI key. A host that runs the local embedder needs `CEREFOX_EMBEDDER=local`
|
|
318
|
+
here, and the client then downloads the model once (about 130 MB).
|
|
319
|
+
- **How the key gets in.** The client sends the key where a Supabase client
|
|
320
|
+
sends its secret key. The server checks it, then passes the request to the
|
|
321
|
+
database with the container's own internal credential, which never leaves
|
|
322
|
+
the container. This is the same exchange Supabase's gateway makes for an
|
|
323
|
+
`sb_secret_` key.
|
|
324
|
+
- **`CEREFOX_PROG_NAME`** is the alias's name. Hints that tell you what to run
|
|
325
|
+
next (`doctor`'s suggestions, for example) then say `cerefox-lan …`, so a
|
|
326
|
+
copied one acts on the LAN host and not on another Cerefox you use.
|
|
327
|
+
- **`CEREFOX_ENV_LABEL`** puts `[LAN]` on `doctor`'s title line and in backup
|
|
328
|
+
file names, and names the agent entry `cerefox-lan`.
|
|
329
|
+
- **Agents without MCP.** A coding agent can also run `cerefox-lan` commands in
|
|
330
|
+
its shell, or call the HTTP API ([`api.md`](api.md)) with the key.
|
|
331
|
+
- `configure-agent` pins the config directory into the agent's MCP entry, so
|
|
332
|
+
the agent reaches the LAN host whichever directory it starts in.
|
|
333
|
+
|
|
190
334
|
|
|
191
335
|
**Traffic on the wire.** Plain `http://` on your network sends the key, and
|
|
192
|
-
everything else, unencrypted. That is
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
the gate stays on, since a proxy makes every request look local.
|
|
336
|
+
everything else, unencrypted. That is acceptable on a home network you control;
|
|
337
|
+
do not run these setups on a network you share with people or devices you do
|
|
338
|
+
not trust.
|
|
196
339
|
|
|
197
|
-
**The internet.**
|
|
198
|
-
|
|
340
|
+
**The internet.** These setups are for your own network only. Do not forward
|
|
341
|
+
the port from your router, and do not publish the host's Cerefox port through
|
|
342
|
+
a remote-access service or a proxy.
|
|
199
343
|
|
|
200
344
|
**Anyone with the key**, or with access to the host's files, the data folder or
|
|
201
|
-
the compose file.
|
|
345
|
+
the compose file. On Cerefox Local the key is the store's master key: besides
|
|
346
|
+
the web UI and the HTTP API, it opens the database API the CLI uses, which can
|
|
347
|
+
read and change every table directly.
|
|
202
348
|
|
|
203
349
|
## Troubleshooting
|
|
204
350
|
|
|
@@ -209,6 +355,11 @@ planned.
|
|
|
209
355
|
**Every data route returns 500 with the key, but `/version` works.** The image
|
|
210
356
|
is older than v1.19.6. Upgrade.
|
|
211
357
|
|
|
358
|
+
**The CLI or an agent fails with `Expected 3 parts in JWT; got 1`.** The
|
|
359
|
+
Cerefox Local image on the LAN host is older than v1.22.0, which passed the key
|
|
360
|
+
to the database unchanged. Upgrade the image; the client needs no change.
|
|
361
|
+
`cerefox doctor` says the same.
|
|
362
|
+
|
|
212
363
|
**The web UI shows a white page or keeps failing after the key.** The image is
|
|
213
364
|
older than v1.20.0, which is the first version whose web UI can send a key.
|
|
214
365
|
|
|
@@ -73,8 +73,12 @@ CEREFOX_CONFIG_DIR=~/.cerefox/staging cerefox init
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
CEREFOX_ENV_LABEL=staging
|
|
76
|
+
# The alias below; hints then say `cfx-stg …`. Comments go on their own line:
|
|
77
|
+
# the .env parser keeps anything after `=` as the value.
|
|
78
|
+
CEREFOX_PROG_NAME=cfx-stg
|
|
76
79
|
CEREFOX_SUPABASE_URL=https://<staging-ref>.supabase.co
|
|
77
|
-
|
|
80
|
+
# The staging project's secret key:
|
|
81
|
+
CEREFOX_SUPABASE_KEY=sb_secret_…
|
|
78
82
|
CEREFOX_DATABASE_URL=postgresql://postgres.<staging-ref>:…@aws-0-<region>.pooler.supabase.com:5432/postgres?sslmode=require
|
|
79
83
|
|
|
80
84
|
# Isolate snapshots. CEREFOX_BACKUP_DIR does NOT follow the config dir, so
|
|
@@ -84,7 +88,8 @@ CEREFOX_DATABASE_URL=postgresql://postgres.<staging-ref>:…@aws-0-<region>.pool
|
|
|
84
88
|
CEREFOX_BACKUP_DIR=~/.cerefox/staging/backups
|
|
85
89
|
|
|
86
90
|
OPENAI_API_KEY=sk-…
|
|
87
|
-
|
|
91
|
+
# Account-level; the same token as production:
|
|
92
|
+
SUPABASE_ACCESS_TOKEN=sbp_…
|
|
88
93
|
```
|
|
89
94
|
|
|
90
95
|
> **Snapshot isolation needs v1.1.0-beta.3 or later.** On **beta.2 and
|
|
@@ -262,6 +267,11 @@ otherwise:
|
|
|
262
267
|
| `backup create` | Filename becomes `cerefox-staging-<stamp>.json`, and the label is stored in the payload |
|
|
263
268
|
| `backup restore` | Warns when the snapshot's environment differs from the target's |
|
|
264
269
|
|
|
270
|
+
Also set `CEREFOX_PROG_NAME` to your alias (`cfx-stg`). Hints that tell you what
|
|
271
|
+
to run next, such as `doctor`'s `config set …` suggestions, then name the alias,
|
|
272
|
+
so copying one acts on staging. Without it, they spell out
|
|
273
|
+
`CEREFOX_CONFIG_DIR=… cerefox …`, which is just as safe, only longer.
|
|
274
|
+
|
|
265
275
|
The filename and restore warning matter because `CEREFOX_BACKUP_DIR` does not
|
|
266
276
|
follow `CEREFOX_CONFIG_DIR`: staging and production snapshots can end up in one
|
|
267
277
|
directory, and a restore that picks "the most recent file" there would
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
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",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"onnxruntime-node": "^1.21.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@types/bun": "^1.4.
|
|
61
|
+
"@types/bun": "^1.4.4",
|
|
62
62
|
"@types/cli-progress": "^3.11.5",
|
|
63
63
|
"@types/node": "^24.19.2",
|
|
64
64
|
"@types/prompts": "^2.4.9",
|