@cerefox/memory 0.9.0 → 0.9.1
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 +28 -26
- package/AGENT_QUICK_REFERENCE.md +12 -12
- package/dist/bin/cerefox.js +507 -355
- package/dist/frontend/assets/{index-CAp2_lFX.js → index-De3R6K8J.js} +29 -29
- package/dist/frontend/assets/{index-CAp2_lFX.js.map → index-De3R6K8J.js.map} +1 -1
- package/dist/frontend/index.html +1 -1
- package/dist/server-assets/_shared/ef-meta/index.ts +1 -1
- package/dist/server-assets/_shared/mcp-tools/get-help-content.ts +2 -2
- package/docs/guides/access-paths.md +40 -34
- package/docs/guides/cli.md +158 -16
- package/docs/guides/configuration.md +20 -29
- package/docs/guides/connect-agents.md +154 -177
- package/docs/guides/ops-scripts.md +73 -53
- package/docs/guides/quickstart.md +26 -20
- package/docs/guides/setup-cloud-run.md +12 -2
- package/docs/guides/setup-local.md +14 -8
- package/docs/guides/setup-supabase.md +57 -162
- package/docs/guides/upgrading.md +43 -30
- package/package.json +1 -1
|
@@ -12,7 +12,7 @@ cp .env.example .env
|
|
|
12
12
|
Resolved at process start, highest precedence wins:
|
|
13
13
|
|
|
14
14
|
1. **`CEREFOX_CONFIG_DIR`** environment variable — explicit override; supports `~` expansion.
|
|
15
|
-
2. **`./.env`** in the current working directory — dev mode. Wins for anyone running `cd /path/to/cerefox &&
|
|
15
|
+
2. **`./.env`** in the current working directory — dev mode. Wins for anyone running `cd /path/to/cerefox && cerefox …` from a repo clone.
|
|
16
16
|
3. **`~/.cerefox/.env`** — the user-state root; default for installed setups.
|
|
17
17
|
|
|
18
18
|
For most contributors, option 2 (repo-local `.env`) wins automatically. For an installed CLI (no repo checkout), option 3 is the default. Use option 1 to point a single machine at multiple Cerefox knowledge bases:
|
|
@@ -36,8 +36,8 @@ Full rule documented in [`docs/specs/polish-and-distribution-design.md` §7](../
|
|
|
36
36
|
| `CEREFOX_DATABASE_URL` | `""` | For scripts | Direct Postgres URL for deployment scripts. **Use the Session Pooler** (port `5432`) — Transaction Pooler (`6543`) does not support DDL. Username must include the project-ref suffix (`postgres.<project-ref>`). Append `?sslmode=require`. See [`setup-supabase.md` → Connection pooling (2026)](setup-supabase.md#connection-pooling-2026). |
|
|
37
37
|
|
|
38
38
|
**When each is needed:**
|
|
39
|
-
- `CEREFOX_SUPABASE_URL` + `CEREFOX_SUPABASE_KEY` — used by the
|
|
40
|
-
- `CEREFOX_DATABASE_URL` — used only
|
|
39
|
+
- `CEREFOX_SUPABASE_URL` + `CEREFOX_SUPABASE_KEY` — used by the CLI, web UI, and local MCP server (ingestion, search) via the Supabase Data API
|
|
40
|
+
- `CEREFOX_DATABASE_URL` — used only for schema deploys (`cerefox server deploy`, or the contributor scripts `bun scripts/db_*.ts`) via a direct Postgres connection
|
|
41
41
|
|
|
42
42
|
---
|
|
43
43
|
|
|
@@ -87,7 +87,7 @@ All embedding API calls (Python `CloudEmbedder` and Edge Functions) include auto
|
|
|
87
87
|
- **Not retried**: HTTP 4xx client errors (invalid API key, bad request)
|
|
88
88
|
- **Logged**: every retry attempt is logged with the failure reason and attempt number
|
|
89
89
|
|
|
90
|
-
This handles intermittent OpenAI API errors (500s) that would otherwise cause search or ingestion failures. The retry logic is consistent across both the
|
|
90
|
+
This handles intermittent OpenAI API errors (500s) that would otherwise cause search or ingestion failures. The retry logic is consistent across both the local path (local MCP, web UI, CLI) and the Edge Function path (remote MCP, GPT Actions).
|
|
91
91
|
|
|
92
92
|
---
|
|
93
93
|
|
|
@@ -175,7 +175,7 @@ See `docs/guides/response-limits.md` for the full guide including behaviour deta
|
|
|
175
175
|
|
|
176
176
|
### RPC-level retrieval parameters
|
|
177
177
|
|
|
178
|
-
Two retrieval parameters are configured directly in `src/cerefox/db/rpcs.sql` rather than in `.env`. They follow the same convention as `OPENAI_MODEL` and `EMBEDDING_DIMENSIONS` in the Edge Functions: they are system-level tuning knobs that rarely change, and changing them requires a SQL re-deploy (`
|
|
178
|
+
Two retrieval parameters are configured directly in `src/cerefox/db/rpcs.sql` rather than in `.env`. They follow the same convention as `OPENAI_MODEL` and `EMBEDDING_DIMENSIONS` in the Edge Functions: they are system-level tuning knobs that rarely change, and changing them requires a SQL re-deploy (`cerefox server deploy`) rather than a restart.
|
|
179
179
|
|
|
180
180
|
| Parameter | Default | Location | Description |
|
|
181
181
|
|-----------|---------|----------|-------------|
|
|
@@ -184,7 +184,7 @@ Two retrieval parameters are configured directly in `src/cerefox/db/rpcs.sql` ra
|
|
|
184
184
|
|
|
185
185
|
To change these values, edit the `DEFAULT` values in `cerefox_search_docs` in `src/cerefox/db/rpcs.sql` and redeploy:
|
|
186
186
|
```bash
|
|
187
|
-
|
|
187
|
+
cerefox server deploy # contributors with a repo clone: bun scripts/db_deploy.ts
|
|
188
188
|
```
|
|
189
189
|
|
|
190
190
|
---
|
|
@@ -209,8 +209,8 @@ Metadata-only updates (same content, different title or project) do **not** crea
|
|
|
209
209
|
|
|
210
210
|
To view and retrieve previous versions:
|
|
211
211
|
```bash
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
cerefox document version list <document-id>
|
|
213
|
+
cerefox document get <document-id> --version-id <version-id>
|
|
214
214
|
```
|
|
215
215
|
|
|
216
216
|
---
|
|
@@ -228,7 +228,7 @@ uv run cerefox document get <document-id> --version <version-id>
|
|
|
228
228
|
|
|
229
229
|
| Variable | Default | Description |
|
|
230
230
|
|----------|---------|-------------|
|
|
231
|
-
| `CEREFOX_LOG_LEVEL` | `INFO` |
|
|
231
|
+
| `CEREFOX_LOG_LEVEL` | `INFO` | Logging level. Valid values: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL` |
|
|
232
232
|
|
|
233
233
|
Set to `DEBUG` during development to see detailed operation logs.
|
|
234
234
|
|
|
@@ -269,7 +269,7 @@ Cerefox has **two independent access paths**, each with its own embedding config
|
|
|
269
269
|
|
|
270
270
|
| Path | Where embedding happens | Config location |
|
|
271
271
|
|------|------------------------|-----------------|
|
|
272
|
-
| Local MCP server + CLI |
|
|
272
|
+
| Local MCP server + CLI + web UI | Local embedder (reads `.env`) | `.env` (`CEREFOX_OPENAI_EMBEDDING_MODEL`, etc.) |
|
|
273
273
|
| Edge Functions (GPT Actions, curl) | TypeScript constants in Edge Function code | Hardcoded in `supabase/functions/*/index.ts` |
|
|
274
274
|
|
|
275
275
|
When you change the embedding model, **both paths must be updated and kept in sync** — they must use the same model and dimensions, or search results will be incoherent (queries embedded by one model won't match chunks embedded by another).
|
|
@@ -281,7 +281,7 @@ Change `CEREFOX_OPENAI_EMBEDDING_MODEL` and `CEREFOX_OPENAI_EMBEDDING_DIMENSIONS
|
|
|
281
281
|
### Step 2 — Re-embed all stored chunks
|
|
282
282
|
|
|
283
283
|
```bash
|
|
284
|
-
|
|
284
|
+
cerefox server reindex
|
|
285
285
|
```
|
|
286
286
|
|
|
287
287
|
This re-embeds every chunk in the database using the model now configured in `.env`.
|
|
@@ -302,13 +302,12 @@ const OPENAI_MODEL = "text-embedding-3-small"; // ← update this
|
|
|
302
302
|
const EMBEDDING_DIMENSIONS = 768; // ← and this if dimensions change
|
|
303
303
|
```
|
|
304
304
|
|
|
305
|
-
Then redeploy
|
|
305
|
+
Then redeploy the Edge Functions:
|
|
306
306
|
```bash
|
|
307
|
-
|
|
308
|
-
supabase functions deploy cerefox-ingest
|
|
307
|
+
cerefox server deploy --functions-only
|
|
309
308
|
```
|
|
310
309
|
|
|
311
|
-
|
|
310
|
+
Contributors with a repo clone can instead redeploy individual functions with `npx supabase functions deploy cerefox-search` (and `cerefox-ingest`), or through the Supabase Dashboard → Edge Functions → Deploy.
|
|
312
311
|
|
|
313
312
|
> **If you only use the local MCP server** (Claude Desktop, ChatGPT Desktop, Cursor), Step 3 is
|
|
314
313
|
> optional — the Edge Functions are only used for GPT Actions and direct HTTP access.
|
|
@@ -360,15 +359,7 @@ cerefox config set usage_tracking_enabled false
|
|
|
360
359
|
cerefox config get usage_tracking_enabled
|
|
361
360
|
```
|
|
362
361
|
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
# Enable
|
|
366
|
-
curl -X PUT http://localhost:8000/api/v1/config/usage_tracking_enabled \
|
|
367
|
-
-H 'Content-Type: application/json' -d '{"value": "true"}'
|
|
368
|
-
|
|
369
|
-
# Read
|
|
370
|
-
curl http://localhost:8000/api/v1/config/usage_tracking_enabled
|
|
371
|
-
```
|
|
362
|
+
The canonical path is the CLI (`cerefox config set <key> <value>` / `cerefox config get <key>`) above; it works regardless of whether the web server is running. The web UI's JSON API exposes the same config under `/api/v1/config/<key>` if you need programmatic access while `cerefox web` is running.
|
|
372
363
|
|
|
373
364
|
### What gets logged
|
|
374
365
|
|
|
@@ -388,9 +379,9 @@ Each usage log entry records:
|
|
|
388
379
|
The `access_path` is set by the caller layer (not the end user):
|
|
389
380
|
- Edge Functions set `"edge-function"` (GPT Actions, direct HTTP callers)
|
|
390
381
|
- `cerefox-mcp` tool handlers set `"remote-mcp"` (Claude Code, Cursor, Claude Desktop)
|
|
391
|
-
-
|
|
382
|
+
- The web UI's JSON API routes set `"webapp"`
|
|
392
383
|
- Local MCP server sets `"local-mcp"`
|
|
393
|
-
- CLI sets `"cli"` for search
|
|
384
|
+
- CLI sets `"cli"` for read/search commands
|
|
394
385
|
|
|
395
386
|
### Viewing and exporting usage data
|
|
396
387
|
|
|
@@ -451,10 +442,10 @@ This is the default state -- no configuration needed for backward compatibility.
|
|
|
451
442
|
|
|
452
443
|
## Checking Your Configuration
|
|
453
444
|
|
|
454
|
-
Run the
|
|
445
|
+
Run the doctor to verify everything is connected (credentials, DB reachability, schema version):
|
|
455
446
|
|
|
456
447
|
```bash
|
|
457
|
-
|
|
448
|
+
cerefox doctor # or: cerefox status
|
|
458
449
|
```
|
|
459
450
|
|
|
460
|
-
If it
|
|
451
|
+
If it reports all checks green, your configuration is correct.
|