@cerefox/memory 0.5.3 → 0.6.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 +5797 -77
- package/dist/frontend/assets/index-B-Yx2yjM.js +124 -0
- package/dist/frontend/assets/index-B-Yx2yjM.js.map +1 -0
- package/dist/frontend/assets/index-DoDJGRih.css +1 -0
- package/dist/frontend/index.html +14 -0
- package/docs/guides/migration-v0.5.md +132 -2
- package/docs/guides/quickstart.md +62 -123
- package/package.json +7 -2
- package/docs/guides/migration-v0.4.md +0 -260
|
@@ -11,8 +11,9 @@ v0.5.3), and the Python `cerefox` → TS `cerefox` migration path.
|
|
|
11
11
|
| Never used Cerefox before | [`quickstart.md`](quickstart.md) first, then come back here only if you hit a `.env` / config question |
|
|
12
12
|
| Python `cerefox` (any version through v0.5.x) | "What changed" → "Install paths" → "v0.5.3 migrated `.env`" sections below |
|
|
13
13
|
| `@cerefox/memory` v0.4.x (npm) | "Upgrading an existing MCP client config" → "v0.5.2 fixed the soft wrapper" → "v0.5.3 migrated `.env`" |
|
|
14
|
-
| `@cerefox/memory` v0.5.0 or v0.5.1 (npm) | "v0.5.2 fixed the soft wrapper" + "v0.5.3 migrated `.env`" |
|
|
15
|
-
| `@cerefox/memory` v0.5.2 (npm) | "v0.5.3 migrated `.env`"
|
|
14
|
+
| `@cerefox/memory` v0.5.0 or v0.5.1 (npm) | "v0.5.2 fixed the soft wrapper" + "v0.5.3 migrated `.env`" + "v0.5.4 fixed configure-agent claude-code" |
|
|
15
|
+
| `@cerefox/memory` v0.5.2 (npm) | "v0.5.3 migrated `.env`" + "v0.5.4 fixed configure-agent claude-code" |
|
|
16
|
+
| `@cerefox/memory` v0.5.3 (npm) | **"v0.5.4 fixed configure-agent claude-code"** — re-run configure-agent |
|
|
16
17
|
|
|
17
18
|
> Looking for `migration-v0.4.md`? It's been demoted to a historical
|
|
18
19
|
> record (the bin names it documents no longer exist). Everything you
|
|
@@ -272,6 +273,135 @@ and skips the migration prompt.
|
|
|
272
273
|
|
|
273
274
|
---
|
|
274
275
|
|
|
276
|
+
## v0.5.4 fixed `cerefox configure-agent --tool claude-code`
|
|
277
|
+
|
|
278
|
+
**If you ran `cerefox configure-agent --tool claude-code` on any version
|
|
279
|
+
from v0.5.0 through v0.5.3, Claude Code did not actually pick up the
|
|
280
|
+
config.** The writer wrote to `~/.claude/mcp.json` — a path Claude Code
|
|
281
|
+
doesn't read. Claude Code's user-scope MCP servers live in
|
|
282
|
+
**`~/.claude.json`** (a dot-file in `$HOME`) under the `.mcpServers` key.
|
|
283
|
+
|
|
284
|
+
The bug went unnoticed because `cerefox doctor` was scanning the same
|
|
285
|
+
wrong path — both surfaces were consistently lying.
|
|
286
|
+
|
|
287
|
+
### What v0.5.4 changed
|
|
288
|
+
|
|
289
|
+
- **`configure-agent --tool claude-code`** now shells out to Claude Code's
|
|
290
|
+
own `claude mcp add --scope user` CLI. Claude Code manages its own
|
|
291
|
+
config schema; delegating is future-proof. Requires the `claude` CLI
|
|
292
|
+
on PATH (fair assumption — you're configuring it).
|
|
293
|
+
- Before invoking the delegated CLI, the writer takes a defensive backup
|
|
294
|
+
of `~/.claude.json` to `~/.claude.json.pre-cerefox.bak`.
|
|
295
|
+
- **`cerefox doctor`** now scans `~/.claude.json` for a `mcpServers.cerefox`
|
|
296
|
+
entry (not the orphaned `~/.claude/mcp.json` from the bug window).
|
|
297
|
+
- **`--tool claude-desktop` is unchanged** — Claude Desktop has no CLI
|
|
298
|
+
helper, so its writer remains direct-file-write.
|
|
299
|
+
|
|
300
|
+
### What you need to do
|
|
301
|
+
|
|
302
|
+
Anyone who ran `configure-agent --tool claude-code` on v0.5.0–v0.5.3:
|
|
303
|
+
|
|
304
|
+
```bash
|
|
305
|
+
# 1. Upgrade
|
|
306
|
+
bun update -g @cerefox/memory # or: npm update -g @cerefox/memory
|
|
307
|
+
|
|
308
|
+
# 2. (Optional) Remove the orphaned file the buggy versions wrote.
|
|
309
|
+
# It does nothing — Claude Code never read it. Safe to delete.
|
|
310
|
+
rm -f ~/.claude/mcp.json
|
|
311
|
+
|
|
312
|
+
# 3. Re-run configure-agent to write the config at the correct path.
|
|
313
|
+
cerefox configure-agent --tool claude-code
|
|
314
|
+
|
|
315
|
+
# 4. Verify
|
|
316
|
+
claude mcp list # should now show 'cerefox'
|
|
317
|
+
cerefox doctor # 'mcp clients' should list 'Claude Code (user)'
|
|
318
|
+
|
|
319
|
+
# 5. Start a fresh Claude Code session — the cerefox tools appear.
|
|
320
|
+
```
|
|
321
|
+
|
|
322
|
+
Running sessions cache the MCP server list at startup, so an
|
|
323
|
+
**already-open Claude Code session won't pick up the new server**.
|
|
324
|
+
Open a new session.
|
|
325
|
+
|
|
326
|
+
### `--config-path FILE` override (advanced)
|
|
327
|
+
|
|
328
|
+
If you pass `--config-path FILE` explicitly, configure-agent does a
|
|
329
|
+
direct-write to FILE instead of shelling out — preserves the v0.5.0–v0.5.3
|
|
330
|
+
test path and works for power users who want a specific file location.
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## v0.6.0 moved the web server to TypeScript
|
|
335
|
+
|
|
336
|
+
**TL;DR**: `cerefox web` from the npm package now boots an in-process
|
|
337
|
+
Hono server (TypeScript on Bun) instead of pointing you at
|
|
338
|
+
`uv run cerefox web`. Three ingestion endpoints temporarily return
|
|
339
|
+
503; the web UI shows a friendly toast pointing at the working CLI
|
|
340
|
+
fallback. Full ingestion support lands in v0.7.
|
|
341
|
+
|
|
342
|
+
### What's new
|
|
343
|
+
|
|
344
|
+
- **`cerefox web` works from npm.** No clone, no `uv`. `npm install
|
|
345
|
+
-g @cerefox/memory` followed by `cerefox web` boots the local web
|
|
346
|
+
UI + JSON API on `http://127.0.0.1:8000/`.
|
|
347
|
+
- **React SPA bundled** into `@cerefox/memory`. The web UI is part
|
|
348
|
+
of the npm tarball; you get the same UI Python's `uv run cerefox
|
|
349
|
+
web` serves, no extra install.
|
|
350
|
+
- **Configure-agent grew Phase 2 writers**: `cerefox configure-agent
|
|
351
|
+
--tool cursor` / `--tool codex` / `--tool gemini` join the existing
|
|
352
|
+
`--tool claude-code` / `--tool claude-desktop`. Codex's config is
|
|
353
|
+
TOML (`~/.codex/config.toml`); the rest are JSON.
|
|
354
|
+
|
|
355
|
+
### The 503-ingestion-stubs window
|
|
356
|
+
|
|
357
|
+
Three endpoints return 503 with `{error: "Ingestion lands in v0.7",
|
|
358
|
+
see: <url>, note: …}`:
|
|
359
|
+
|
|
360
|
+
- `POST /api/v1/ingest` (paste)
|
|
361
|
+
- `POST /api/v1/ingest/file` (file upload)
|
|
362
|
+
- `POST /api/v1/documents/{id}/upload` (replace)
|
|
363
|
+
|
|
364
|
+
The web UI detects this and shows a yellow Mantine toast — no scary
|
|
365
|
+
error banner. `/documents/{id}/edit` also returns 503 if you try to
|
|
366
|
+
change content (it compares SHA-256 hashes against the stored
|
|
367
|
+
`content_hash` — title / metadata / project changes work fine).
|
|
368
|
+
|
|
369
|
+
### Working fallbacks during the v0.6 window
|
|
370
|
+
|
|
371
|
+
Both fully functional, no behaviour change:
|
|
372
|
+
|
|
373
|
+
```bash
|
|
374
|
+
# Option A — npm-installed CLI hits the deployed Edge Function.
|
|
375
|
+
cerefox ingest my-notes.md
|
|
376
|
+
cerefox ingest-dir docs/
|
|
377
|
+
|
|
378
|
+
# Option B — keep using the Python web for ingestion until v0.7.
|
|
379
|
+
uv run cerefox web
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
v0.7 swaps the 503 stubs for in-process pipeline calls. The toast
|
|
383
|
+
just stops firing — no frontend changes, no config changes, no
|
|
384
|
+
re-install.
|
|
385
|
+
|
|
386
|
+
### Should I upgrade from v0.5.4 to v0.6.0?
|
|
387
|
+
|
|
388
|
+
| Workflow | Recommendation |
|
|
389
|
+
|---|---|
|
|
390
|
+
| MCP client only (Claude Code, Cursor, etc.) | Yes — Phase 2 writers + faster install matter. No risk. |
|
|
391
|
+
| `cerefox` CLI for ingest / search | Yes — same CLI, no API changes. Ingest still works via the Edge Function. |
|
|
392
|
+
| Web UI to ingest documents | Optional — wait a few days for v0.7 if ingestion-via-web is your main flow. Or upgrade and use the CLI for ingest until v0.7. |
|
|
393
|
+
| `uv run cerefox web` | Keep using it through v0.7; the Python web is unchanged. The deprecation banner lands in v0.7 once the TS web is feature-complete. |
|
|
394
|
+
|
|
395
|
+
### Python web kept through v0.7.x
|
|
396
|
+
|
|
397
|
+
`src/cerefox/api/app.py` and `routes_api.py` ship unchanged in v0.6.
|
|
398
|
+
The Python web-specific deprecation banner is **deferred to v0.7's
|
|
399
|
+
Part 25L** — we won't nudge users away from a fully-working Python
|
|
400
|
+
web while the TS web's 3 ingest endpoints are still 503. v0.8 makes
|
|
401
|
+
the banner prominent; v0.9 deletes the Python web code.
|
|
402
|
+
|
|
403
|
+
---
|
|
404
|
+
|
|
275
405
|
## Known gotchas
|
|
276
406
|
|
|
277
407
|
### `npx` from inside an npm workspace
|
|
@@ -1,165 +1,104 @@
|
|
|
1
|
-
# Quickstart -- Zero to First Document in
|
|
1
|
+
# Quickstart -- Zero to First Document in 5 Minutes
|
|
2
2
|
|
|
3
|
-
Get Cerefox running
|
|
3
|
+
Get Cerefox running on your machine via the npm install path. **No source
|
|
4
|
+
clone, no Python required.**
|
|
4
5
|
|
|
5
|
-
> **Upgrading from
|
|
6
|
+
> **Upgrading from an earlier version?** See [`upgrading.md`](upgrading.md)
|
|
7
|
+
> for migration steps instead.
|
|
6
8
|
|
|
7
9
|
---
|
|
8
10
|
|
|
9
|
-
##
|
|
11
|
+
## Prerequisites
|
|
10
12
|
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
- A Supabase account -- [supabase.com](https://supabase.com) (free tier works)
|
|
15
|
-
- An OpenAI API key -- [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
|
|
13
|
+
- **Node.js 20+** (`node --version`) or **Bun 1.0+** (`bun --version`)
|
|
14
|
+
- A **Supabase account** -- [supabase.com](https://supabase.com) (free tier works) -- with the Cerefox schema deployed (see [Note on schema deploy](#note-on-schema-deploy) below)
|
|
15
|
+
- An **OpenAI API key** -- [platform.openai.com/api-keys](https://platform.openai.com/api-keys)
|
|
16
16
|
|
|
17
17
|
---
|
|
18
18
|
|
|
19
|
-
##
|
|
19
|
+
## 1. Install
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
|
|
23
|
-
cd cerefox
|
|
24
|
-
uv sync
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
> No heavy ML model downloads needed -- embeddings are handled by the OpenAI API.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## 3. Set up Supabase (5 min)
|
|
32
|
-
|
|
33
|
-
1. Create a new Supabase project at [app.supabase.com](https://app.supabase.com).
|
|
34
|
-
2. Go to **Project Settings → API → Project URL** and copy it. Also note your project ref (the slug in the URL, e.g. `abcd1234`).
|
|
35
|
-
3. Go to **Project Settings → API Keys** and copy the **Secret key** (`sb_secret_…`). The legacy `service_role` JWT also works if you prefer; either goes into `CEREFOX_SUPABASE_KEY`. See [`setup-supabase.md` → Supabase API keys (2026)](setup-supabase.md#supabase-api-keys-2026) for the full key story (including why the anon key, if you ever need it, must currently stay as the legacy JWT — `sb_publishable_…` does not work for Edge Functions).
|
|
36
|
-
4. Go to **Project Settings → Database → Connection pooling** and copy the **Session Pooler** URI (host ends `.pooler.supabase.com`, port `5432`). If you only see the Transaction Pooler in the dashboard, take that URI and change `:6543` → `:5432`. **Do not use port 6543** — Transaction Pooler does not support DDL. See [`setup-supabase.md` → Connection pooling (2026)](setup-supabase.md#connection-pooling-2026) for context.
|
|
37
|
-
|
|
38
|
-
Create a `.env` file:
|
|
39
|
-
|
|
40
|
-
```env
|
|
41
|
-
CEREFOX_SUPABASE_URL=https://your-project-ref.supabase.co
|
|
42
|
-
CEREFOX_SUPABASE_KEY=sb_secret_...your-supabase-secret-key...
|
|
43
|
-
CEREFOX_DATABASE_URL=postgresql://postgres.your-project-ref:your-db-password@aws-N-region.pooler.supabase.com:5432/postgres?sslmode=require
|
|
44
|
-
OPENAI_API_KEY=sk-...your-openai-key...
|
|
22
|
+
curl -fsSL https://github.com/fstamatelopoulos/cerefox/releases/latest/download/install.sh | sh
|
|
45
23
|
```
|
|
46
24
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
---
|
|
50
|
-
|
|
51
|
-
## 4. Deploy the schema (1 min)
|
|
25
|
+
Detects Bun (or installs it) and falls back to npm. After install,
|
|
26
|
+
`cerefox` is on your PATH.
|
|
52
27
|
|
|
28
|
+
Direct alternatives:
|
|
53
29
|
```bash
|
|
54
|
-
|
|
30
|
+
bun add -g @cerefox/memory # preferred (faster cold start)
|
|
31
|
+
npm install -g @cerefox/memory # equivalent
|
|
55
32
|
```
|
|
56
33
|
|
|
57
|
-
|
|
34
|
+
## 2. First-run setup
|
|
58
35
|
|
|
59
|
-
Verify:
|
|
60
36
|
```bash
|
|
61
|
-
|
|
37
|
+
cerefox init # 5-step interactive setup — prompts for the credentials above
|
|
38
|
+
cerefox doctor # green across the board if everything's wired correctly
|
|
62
39
|
```
|
|
63
40
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
## 5. Ingest your first document (2 min)
|
|
41
|
+
`cerefox init` validates each entry against the live service before saving,
|
|
42
|
+
writes `~/.cerefox/.env` (mode 0600), and optionally ingests the bundled
|
|
43
|
+
self-docs into the `_cerefox-self-docs` project so agents can search for
|
|
44
|
+
Cerefox usage guidance.
|
|
69
45
|
|
|
70
|
-
|
|
46
|
+
## 3. Wire up an AI agent
|
|
71
47
|
|
|
72
48
|
```bash
|
|
73
|
-
|
|
49
|
+
# Run the commands that apply to your setup:
|
|
50
|
+
cerefox configure-agent --tool claude-code # Claude Code (~/.claude.json)
|
|
51
|
+
cerefox configure-agent --tool claude-desktop # Claude Desktop config
|
|
74
52
|
```
|
|
75
53
|
|
|
76
|
-
|
|
54
|
+
Then restart your client:
|
|
55
|
+
- **Claude Code**: start a fresh session — running sessions cache the MCP tool list.
|
|
56
|
+
- **Claude Desktop**: Cmd+Q to fully quit, then relaunch.
|
|
77
57
|
|
|
78
|
-
|
|
79
|
-
|
|
58
|
+
Cursor, OpenAI Codex CLI, and Gemini CLI ship in a follow-up (v0.6+).
|
|
59
|
+
For manual setup of those today, see [`connect-agents.md`](connect-agents.md).
|
|
80
60
|
|
|
81
|
-
|
|
82
|
-
```
|
|
61
|
+
## 4. Try it
|
|
83
62
|
|
|
84
|
-
|
|
63
|
+
From your AI agent, ask:
|
|
85
64
|
|
|
86
|
-
|
|
65
|
+
> "Use cerefox_search to look for 'cerefox conventions' and tell me what you find."
|
|
87
66
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
```bash
|
|
91
|
-
cd frontend && npm install && npm run build && cd ..
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Start the web app:
|
|
95
|
-
|
|
96
|
-
```bash
|
|
97
|
-
uv run cerefox web
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
Open [http://localhost:8000/app/](http://localhost:8000/app/) -- your dashboard is live.
|
|
101
|
-
|
|
102
|
-
> The root URL (`http://localhost:8000/`) redirects to `/app/` automatically.
|
|
67
|
+
You should see results from the bundled self-docs.
|
|
103
68
|
|
|
104
69
|
---
|
|
105
70
|
|
|
106
|
-
##
|
|
71
|
+
## Note on schema deploy
|
|
107
72
|
|
|
108
|
-
|
|
73
|
+
If your Supabase project is **brand new**, the Cerefox schema needs to be
|
|
74
|
+
deployed once before the CLI works. Until v0.6 ports the schema deploy to
|
|
75
|
+
TypeScript, this is the one step that still requires the source-checkout
|
|
76
|
+
path:
|
|
109
77
|
|
|
110
78
|
```bash
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
---
|
|
117
|
-
|
|
118
|
-
## 8. Connect an AI agent (optional, 5 min)
|
|
119
|
-
|
|
120
|
-
Cerefox ships a built-in MCP server. Add it to Claude Desktop's config file
|
|
121
|
-
(`~/Library/Application Support/Claude/claude_desktop_config.json`):
|
|
122
|
-
|
|
123
|
-
```json
|
|
124
|
-
{
|
|
125
|
-
"mcpServers": {
|
|
126
|
-
"cerefox": {
|
|
127
|
-
"command": "uv",
|
|
128
|
-
"args": ["--directory", "/path/to/cerefox", "run", "cerefox", "mcp"]
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
79
|
+
git clone https://github.com/fstamatelopoulos/cerefox.git && cd cerefox
|
|
80
|
+
uv sync
|
|
81
|
+
# Add CEREFOX_DATABASE_URL to your .env, then:
|
|
82
|
+
uv run python scripts/db_deploy.py
|
|
132
83
|
```
|
|
133
84
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
> **Recommended: remote MCP** -- if you deployed the Edge Functions (see the main
|
|
137
|
-
> README), use the remote MCP path instead -- no Python install needed on the client machine.
|
|
138
|
-
> See `docs/guides/connect-agents.md` for Path A-Remote.
|
|
139
|
-
>
|
|
140
|
-
> **ChatGPT** does not support MCP -- use a Custom GPT with
|
|
141
|
-
> Edge Functions instead (see `docs/guides/connect-agents.md`, Path B).
|
|
142
|
-
|
|
143
|
-
For full setup details (remote MCP, Cursor, cloud clients, GPT Actions), see `docs/guides/connect-agents.md`.
|
|
85
|
+
Detailed walkthrough: [`setup-supabase.md`](setup-supabase.md).
|
|
86
|
+
After v0.6.0, `cerefox init` will offer to do this for you.
|
|
144
87
|
|
|
145
88
|
---
|
|
146
89
|
|
|
147
|
-
##
|
|
148
|
-
|
|
149
|
-
**
|
|
150
|
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
- `docs/guides/configuration.md` -- all configuration options
|
|
163
|
-
- `docs/guides/connect-agents.md` -- connecting AI agents via MCP and Edge Functions
|
|
164
|
-
- `docs/guides/setup-local.md` -- local Docker setup (no Supabase account needed)
|
|
165
|
-
- `docs/guides/upgrading.md` -- upgrading from a previous version
|
|
90
|
+
## What's next
|
|
91
|
+
|
|
92
|
+
- **Ingest your notes**: `cerefox ingest my-notes.md`, or
|
|
93
|
+
`cerefox ingest-dir ./notes/ --recursive`
|
|
94
|
+
- **Search from the CLI**: `cerefox search "your query"`
|
|
95
|
+
- **Discover all commands**: `cerefox --help`
|
|
96
|
+
- **Run the web UI** (Python-only until v0.6): [`setup-local.md`](setup-local.md)
|
|
97
|
+
- **Connect more AI clients** (Cursor, Codex, ChatGPT GPT Actions, etc.):
|
|
98
|
+
[`connect-agents.md`](connect-agents.md)
|
|
99
|
+
- **Configuration reference**: [`configuration.md`](configuration.md)
|
|
100
|
+
- **Backup + restore**: [`ops-scripts.md`](ops-scripts.md)
|
|
101
|
+
|
|
102
|
+
For the agent-facing reference (what tools agents have, how to use them well),
|
|
103
|
+
read `AGENT_QUICK_REFERENCE.md` in the repo root — or have your agent run
|
|
104
|
+
`cerefox_get_help` from any MCP-connected client.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Cerefox — user-owned shared memory for AI agents. The local TypeScript runtime: stdio MCP server in v0.4; CLI binary added in v0.5; in-process web server in v0.6; ingestion pipeline in v0.7.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/fstamatelopoulos/cerefox",
|
|
@@ -39,12 +39,15 @@
|
|
|
39
39
|
"CHANGELOG.md"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
+
"@hono/node-server": "^2.0.4",
|
|
42
43
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
43
44
|
"@supabase/supabase-js": "^2.45.0",
|
|
44
45
|
"cli-progress": "^3.12.0",
|
|
45
46
|
"commander": "^12.1.0",
|
|
47
|
+
"hono": "^4.12.23",
|
|
46
48
|
"picocolors": "^1.0.0",
|
|
47
49
|
"prompts": "^2.4.2",
|
|
50
|
+
"smol-toml": "^1.6.1",
|
|
48
51
|
"zod": "^3.23.0"
|
|
49
52
|
},
|
|
50
53
|
"devDependencies": {
|
|
@@ -58,7 +61,9 @@
|
|
|
58
61
|
"build": "bun build src/bin/cerefox.ts --outdir dist/bin --target node --format esm",
|
|
59
62
|
"clean": "rm -rf dist docs AGENT_GUIDE.md AGENT_QUICK_REFERENCE.md",
|
|
60
63
|
"bundle-docs": "bun run ../../scripts/bundle_package_docs.ts",
|
|
61
|
-
"
|
|
64
|
+
"build-frontend": "cd ../../frontend && bun install && bun run build",
|
|
65
|
+
"bundle-frontend": "rm -rf dist/frontend && mkdir -p dist/frontend && cp -R ../../frontend/dist/. dist/frontend/",
|
|
66
|
+
"prepublishOnly": "bun run clean && bun run bundle-docs && bun run build-frontend && bun run bundle-frontend && bun run build",
|
|
62
67
|
"smoke": "node dist/bin/cerefox.js --help && node dist/bin/cerefox.js mcp --help"
|
|
63
68
|
},
|
|
64
69
|
"publishConfig": {
|
|
@@ -1,260 +0,0 @@
|
|
|
1
|
-
# Migrating to Cerefox v0.4.0 (historical)
|
|
2
|
-
|
|
3
|
-
> ## ⚠ Historical document — do not use the snippets in this file
|
|
4
|
-
>
|
|
5
|
-
> This guide documents the **v0.4.0 → v0.4.3 migration window** (May 2026).
|
|
6
|
-
> The `cerefox-mcp` bin name referenced throughout was dropped in **v0.5.1**;
|
|
7
|
-
> the soft-wrapper described in some sections was removed in **v0.5.2**.
|
|
8
|
-
> The per-client config snippets below **will not work on @cerefox/memory v0.5+**.
|
|
9
|
-
>
|
|
10
|
-
> **If you're upgrading today, use the current guide instead:**
|
|
11
|
-
> → [`migration-v0.5.md`](migration-v0.5.md) — covers Python `cerefox` → v0.5.x
|
|
12
|
-
> AND v0.4.x → v0.5.x in a single document, with the v0.5.0/v0.5.1/v0.5.2/v0.5.3
|
|
13
|
-
> transitions all explained.
|
|
14
|
-
>
|
|
15
|
-
> This file is preserved so historical CHANGELOG entries that reference it
|
|
16
|
-
> still resolve. It's not maintained.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
**Original TL;DR (preserved verbatim)**: nothing urgent. Your existing `cerefox mcp` configs keep
|
|
21
|
-
working unchanged. The Python `cerefox mcp` command is now a soft
|
|
22
|
-
wrapper that transparently uses the new TypeScript MCP server if it's
|
|
23
|
-
installed, falling back to the legacy Python implementation otherwise.
|
|
24
|
-
Switch to the npm-installed TS server at your convenience for faster
|
|
25
|
-
boot times and fewer Python dependencies.
|
|
26
|
-
|
|
27
|
-
This guide is for **existing users** of `cerefox mcp` who want to
|
|
28
|
-
optionally upgrade. **New users** should follow
|
|
29
|
-
[`docs/guides/connect-agents.md`](connect-agents.md) instead — that's
|
|
30
|
-
the canonical configuration recipe per MCP client.
|
|
31
|
-
|
|
32
|
-
## What changed in v0.4.0
|
|
33
|
-
|
|
34
|
-
- **`@cerefox/memory`** is a new npm package containing the Cerefox
|
|
35
|
-
local stdio MCP server. Same 10 MCP tools, same protocol, faster
|
|
36
|
-
boot.
|
|
37
|
-
- **The Edge Function (`cerefox-mcp`) shares tool handlers** with the
|
|
38
|
-
new local server via `_shared/mcp-tools/`. One source of truth; no
|
|
39
|
-
drift.
|
|
40
|
-
- **`cerefox_get_help`** is a new MCP tool (10 total now, was 9). Layer
|
|
41
|
-
3 of MCP discoverability — agents can now retrieve
|
|
42
|
-
`AGENT_QUICK_REFERENCE.md` content over MCP without filesystem
|
|
43
|
-
access.
|
|
44
|
-
- **`cerefox mcp` (Python CLI)** starts the in-tree Python MCP server.
|
|
45
|
-
(v0.4–v0.5.1 advertised a "soft wrapper" that tried to delegate to the
|
|
46
|
-
npm package's TS MCP server via npx, but the probe was unreliable
|
|
47
|
-
under `uv run`-launched MCP-client contexts and caused infinite
|
|
48
|
-
recursion. v0.5.2 stripped the wrapper; the Python path is now
|
|
49
|
-
always the Python server, and the npm/TS path is configured
|
|
50
|
-
explicitly. See `docs/guides/migration-v0.5.md` § "v0.5.2 fixed the
|
|
51
|
-
soft wrapper" for the migration story.)
|
|
52
|
-
|
|
53
|
-
## The optional one-time upgrade
|
|
54
|
-
|
|
55
|
-
If you have Node 20+ installed, install `@cerefox/memory` globally:
|
|
56
|
-
|
|
57
|
-
```bash
|
|
58
|
-
npm install -g @cerefox/memory
|
|
59
|
-
# or, if you have Bun:
|
|
60
|
-
bun install -g @cerefox/memory
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
After this, the npm `cerefox` is on your PATH. To actually have your
|
|
64
|
-
MCP client use the TS server, you need to **update your MCP client
|
|
65
|
-
config explicitly** — v0.5.2 removed the auto-delegation. The
|
|
66
|
-
canonical config invokes the npm bin directly; see the next section.
|
|
67
|
-
|
|
68
|
-
(v0.4–v0.5.1 *thought* it had auto-delegation, but the soft wrapper
|
|
69
|
-
was unreliable under `uv run`-launched contexts and caused infinite
|
|
70
|
-
recursion when the MCP client launched it. v0.5.2 took the simpler
|
|
71
|
-
"each path is explicit" stance.)
|
|
72
|
-
|
|
73
|
-
You can also point your MCP client directly at `cerefox mcp` (the
|
|
74
|
-
TS-CLI subcommand) and bypass the Python path entirely:
|
|
75
|
-
|
|
76
|
-
### Claude Code
|
|
77
|
-
|
|
78
|
-
**Old:**
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
claude mcp add cerefox -- uv run --directory /path/to/cerefox cerefox mcp
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
**New (optional):**
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
claude mcp add cerefox -- npx -y --package=@cerefox/memory cerefox-mcp
|
|
88
|
-
```
|
|
89
|
-
|
|
90
|
-
### Cursor
|
|
91
|
-
|
|
92
|
-
**Old** (`mcp.json` in your project or `~/.cursor/mcp.json`):
|
|
93
|
-
|
|
94
|
-
```json
|
|
95
|
-
{
|
|
96
|
-
"mcpServers": {
|
|
97
|
-
"cerefox": {
|
|
98
|
-
"command": "uv",
|
|
99
|
-
"args": ["run", "--directory", "/path/to/cerefox", "cerefox", "mcp"]
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
**New (optional):**
|
|
106
|
-
|
|
107
|
-
```json
|
|
108
|
-
{
|
|
109
|
-
"mcpServers": {
|
|
110
|
-
"cerefox": {
|
|
111
|
-
"command": "npx",
|
|
112
|
-
"args": ["-y", "--package=@cerefox/memory", "cerefox-mcp"]
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### Claude Desktop
|
|
119
|
-
|
|
120
|
-
**Old** (`claude_desktop_config.json`):
|
|
121
|
-
|
|
122
|
-
```json
|
|
123
|
-
{
|
|
124
|
-
"mcpServers": {
|
|
125
|
-
"cerefox": {
|
|
126
|
-
"command": "uv",
|
|
127
|
-
"args": ["--directory", "/path/to/cerefox", "run", "cerefox", "mcp"]
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
**New (optional):**
|
|
134
|
-
|
|
135
|
-
```json
|
|
136
|
-
{
|
|
137
|
-
"mcpServers": {
|
|
138
|
-
"cerefox": {
|
|
139
|
-
"command": "npx",
|
|
140
|
-
"args": ["-y", "--package=@cerefox/memory", "cerefox-mcp"]
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
### Codex CLI
|
|
147
|
-
|
|
148
|
-
**Old** (`~/.codex/config.toml`):
|
|
149
|
-
|
|
150
|
-
```toml
|
|
151
|
-
[mcp_servers.cerefox]
|
|
152
|
-
command = "uv"
|
|
153
|
-
args = ["--directory", "/path/to/cerefox", "run", "cerefox", "mcp"]
|
|
154
|
-
```
|
|
155
|
-
|
|
156
|
-
**New (optional):**
|
|
157
|
-
|
|
158
|
-
```toml
|
|
159
|
-
[mcp_servers.cerefox]
|
|
160
|
-
command = "npx"
|
|
161
|
-
args = ["-y", "--package=@cerefox/memory", "cerefox-mcp"]
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Environment
|
|
165
|
-
|
|
166
|
-
The new TS server reads `.env` the same way the Python CLI does (per
|
|
167
|
-
v0.3.0's `_resolve_config_dir()`):
|
|
168
|
-
|
|
169
|
-
1. `CEREFOX_CONFIG_DIR` env var override.
|
|
170
|
-
2. `./.env` in the current working directory.
|
|
171
|
-
3. `~/.cerefox/.env`.
|
|
172
|
-
|
|
173
|
-
For most users with an existing Cerefox install, your `.env` is already
|
|
174
|
-
where it needs to be. If you want to verify:
|
|
175
|
-
|
|
176
|
-
```bash
|
|
177
|
-
npx --package=@cerefox/memory cerefox-mcp --help
|
|
178
|
-
```
|
|
179
|
-
|
|
180
|
-
(That's the help text, not a server start — safe to run anywhere.)
|
|
181
|
-
|
|
182
|
-
## Schema-version-mismatch banner
|
|
183
|
-
|
|
184
|
-
The new server prints a one-line warning to stderr at boot if the
|
|
185
|
-
bundled `@cerefox/memory` schema version doesn't match what's deployed
|
|
186
|
-
to your Supabase. Run `uv run python scripts/db_deploy.py` from the
|
|
187
|
-
repo to update.
|
|
188
|
-
|
|
189
|
-
## Falling back
|
|
190
|
-
|
|
191
|
-
If the npm path doesn't work for any reason (npx missing, package not
|
|
192
|
-
installed, network issue during `npx` resolution), `cerefox mcp` falls
|
|
193
|
-
back to the legacy Python server with a one-line stderr nudge. Your
|
|
194
|
-
MCP client never notices — same stdio interface, same tools.
|
|
195
|
-
|
|
196
|
-
To force the legacy path even when `@cerefox/memory` is installed:
|
|
197
|
-
uninstall it (`npm uninstall -g @cerefox/memory`) or invoke the Python
|
|
198
|
-
CLI from a shell without `npx` in `$PATH`.
|
|
199
|
-
|
|
200
|
-
## `cerefox_get_help` — the new tool
|
|
201
|
-
|
|
202
|
-
If you use Cerefox through an MCP client and ever wonder "wait, what's
|
|
203
|
-
the right way to do X in Cerefox?", you can now ask the server
|
|
204
|
-
directly:
|
|
205
|
-
|
|
206
|
-
- `cerefox_get_help()` — returns the full `AGENT_QUICK_REFERENCE.md`
|
|
207
|
-
plus a section index.
|
|
208
|
-
- `cerefox_get_help(topic: "links")` — returns just the cross-document
|
|
209
|
-
linking section.
|
|
210
|
-
- `cerefox_get_help(topic: "update")` — returns the update workflow
|
|
211
|
-
sections.
|
|
212
|
-
|
|
213
|
-
The topic match is a case-insensitive substring against H2 headings.
|
|
214
|
-
Both the new TS server AND the legacy Python fallback expose this tool
|
|
215
|
-
— consistent surface regardless of which path serves your session.
|
|
216
|
-
|
|
217
|
-
## When v0.5.0 ships
|
|
218
|
-
|
|
219
|
-
The TypeScript CLI lands in v0.5.0. At that point `@cerefox/memory`
|
|
220
|
-
will gain a second binary (`cerefox`) for the full CLI surface
|
|
221
|
-
(`cerefox search`, `cerefox ingest`, etc.) plus a `cerefox
|
|
222
|
-
configure-agent` command that writes the right MCP config for each
|
|
223
|
-
client automatically. For now, the manual recipes above are the way.
|
|
224
|
-
|
|
225
|
-
## Known gotchas
|
|
226
|
-
|
|
227
|
-
- **`npx` from inside an npm workspace can fail with "command not
|
|
228
|
-
found"** even when the package is correctly published. Running
|
|
229
|
-
`npx -y --package=@cerefox/memory cerefox-mcp` from the root of a
|
|
230
|
-
surrounding npm-workspace monorepo (your own project) confuses npx's
|
|
231
|
-
bin-resolution path. Symptoms: `sh: cerefox-mcp: command not found`
|
|
232
|
-
even though the published package has the bin entry. Workarounds —
|
|
233
|
-
any one of these works:
|
|
234
|
-
- Use `bunx` instead: `bunx --package @cerefox/memory cerefox-mcp` —
|
|
235
|
-
cleanly handles workspace contexts.
|
|
236
|
-
- Run from a non-workspace directory (e.g. `cd /tmp` first).
|
|
237
|
-
- Install globally and invoke from PATH:
|
|
238
|
-
`npm install -g @cerefox/memory` then `cerefox-mcp`.
|
|
239
|
-
- When configuring an MCP client (Claude Code, Cursor, Claude
|
|
240
|
-
Desktop, Codex CLI), the launched process inherits the client's
|
|
241
|
-
own working directory rather than your shell's, so this gotcha
|
|
242
|
-
usually doesn't bite real MCP usage — only manual `npx` smoke
|
|
243
|
-
tests run from a project root.
|
|
244
|
-
|
|
245
|
-
- **The minimum npm version for OIDC publish is 11.5.1.** The shipped
|
|
246
|
-
`release.yml` workflow already pins this; only relevant if you're
|
|
247
|
-
forking the project for your own publish target.
|
|
248
|
-
|
|
249
|
-
## What didn't change
|
|
250
|
-
|
|
251
|
-
- The Edge Function (remote MCP) URL and auth: unchanged. Same
|
|
252
|
-
Bearer-with-anon-JWT pattern; the EF just shares its tool handlers
|
|
253
|
-
with the local TS server now.
|
|
254
|
-
- The Postgres RPC contracts: unchanged. v0.4.0 ships zero schema
|
|
255
|
-
changes — the `cerefox_schema_version()` RPC introduced in v0.3.0
|
|
256
|
-
still returns `0.3.1`. (The mismatch warning at TS server startup
|
|
257
|
-
fires until you redeploy from `main`, which is what you'd do
|
|
258
|
-
whenever the schema version actually bumps.)
|
|
259
|
-
- Web UI, ingestion pipeline, CLI subcommands: all unchanged in v0.4.
|
|
260
|
-
Those migrate in v0.6 and v0.7.
|