@cerefox/memory 0.9.4 → 0.9.5
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/README.md +4 -4
- package/dist/bin/cerefox.js +28610 -570
- package/dist/frontend/assets/{index-D0zn7Zv2.js → index-BHVfMLlE.js} +29 -29
- package/dist/frontend/assets/{index-D0zn7Zv2.js.map → index-BHVfMLlE.js.map} +1 -1
- package/dist/frontend/index.html +1 -1
- package/docs/guides/cli.md +1 -1
- package/docs/guides/connect-agents.md +3 -3
- package/docs/guides/quickstart.md +2 -2
- package/docs/guides/upgrading.md +69 -311
- package/package.json +2 -1
- package/docs/guides/migration-v0.5.md +0 -581
package/dist/frontend/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/app/cerefox_icon.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Cerefox</title>
|
|
8
|
-
<script type="module" crossorigin src="/app/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/app/assets/index-BHVfMLlE.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/app/assets/index-DoDJGRih.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/docs/guides/cli.md
CHANGED
|
@@ -20,7 +20,7 @@ The CLI is the TypeScript `@cerefox/memory` package. Invoke any command as plain
|
|
|
20
20
|
|
|
21
21
|
### `cerefox document ingest`
|
|
22
22
|
|
|
23
|
-
**Purpose**: ingest a
|
|
23
|
+
**Purpose**: ingest a Markdown, plain-text, or `.docx` file (or stdin) into the knowledge base. `.docx` support is **beta** — converted to Markdown on ingest (via mammoth; fidelity varies with document complexity); PDF is **not** supported — convert it to Markdown first, then ingest the `.md`.
|
|
24
24
|
|
|
25
25
|
**Synopsis**:
|
|
26
26
|
```
|
|
@@ -126,9 +126,9 @@ separate. Pick one explicitly in your MCP client config.)
|
|
|
126
126
|
- Works offline except for the OpenAI embedding API call per query
|
|
127
127
|
- One setup, all compatible local clients (Claude Desktop, Cursor, Claude Code, Codex CLI, …)
|
|
128
128
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
`cerefox configure-agent --tool <client>` writes the per-client config for you
|
|
130
|
+
(manual snippets are in the appendix below); for the upgrade path see
|
|
131
|
+
[`docs/guides/upgrading.md`](upgrading.md).
|
|
132
132
|
|
|
133
133
|
> **Why not `mcp-server-fetch`?** The generic fetch MCP only supports GET requests and cannot
|
|
134
134
|
> make authenticated POST calls to the Edge Functions. The built-in local server is
|
|
@@ -22,8 +22,8 @@ clone, no Python required.**
|
|
|
22
22
|
curl -fsSL https://github.com/fstamatelopoulos/cerefox/releases/latest/download/install.sh | sh
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
`cerefox` is on your PATH.
|
|
25
|
+
Uses Bun if it's already installed, otherwise npm (Node ≥ 20); if neither is
|
|
26
|
+
present, it bootstraps Bun. After install, `cerefox` is on your PATH.
|
|
27
27
|
|
|
28
28
|
Direct alternatives:
|
|
29
29
|
```bash
|
package/docs/guides/upgrading.md
CHANGED
|
@@ -1,331 +1,89 @@
|
|
|
1
1
|
# Upgrading Cerefox
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Upgrading is almost always two steps: **update the CLI, then re-deploy the
|
|
4
|
+
server side if the release changed it.** Everything here is idempotent and safe
|
|
5
|
+
to re-run.
|
|
4
6
|
|
|
5
7
|
## Pick your path
|
|
6
8
|
|
|
7
|
-
The right upgrade procedure depends on how you installed Cerefox:
|
|
8
|
-
|
|
9
9
|
| You installed via | Upgrade with |
|
|
10
10
|
|---|---|
|
|
11
|
-
| **Installer / npm** (end user, no repo clone) |
|
|
12
|
-
| **Source checkout** (`git clone`, contributor) |
|
|
13
|
-
| **Both** (you contribute AND have the bin globally) | Both flows. The two paths share the same Supabase + `.env`; just keep them updated in lockstep. |
|
|
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
|
+
| **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. |
|
|
14
13
|
|
|
15
|
-
>
|
|
16
|
-
>
|
|
14
|
+
> **On an old pre-installer clone (0.1.x)?** The cleanest upgrade is to stop
|
|
15
|
+
> running from the repo and install the package: follow the
|
|
16
|
+
> [quickstart](quickstart.md), then run `cerefox init` — it offers to copy your
|
|
17
|
+
> repo `.env` to `~/.cerefox/.env`, deploy the server, and wire up your agent.
|
|
18
|
+
> After that you're on the end-user path below.
|
|
17
19
|
|
|
18
|
-
## End-
|
|
20
|
+
## End-user upgrade
|
|
19
21
|
|
|
20
22
|
```bash
|
|
21
|
-
#
|
|
22
|
-
cerefox
|
|
23
|
-
|
|
24
|
-
# 2. If the release notes flag a server-side change (new migration / RPC change):
|
|
25
|
-
cerefox server deploy # applies pending migrations, re-applies RPCs, redeploys the 9 Edge Functions
|
|
26
|
-
|
|
27
|
-
# 3. Verify
|
|
28
|
-
cerefox doctor
|
|
23
|
+
cerefox self-update # or: re-run the installer, or bun/npm update -g @cerefox/memory
|
|
24
|
+
cerefox server deploy # applies pending migrations, re-applies RPCs, redeploys the 9 Edge Functions
|
|
25
|
+
cerefox doctor # verify
|
|
29
26
|
```
|
|
30
27
|
|
|
31
|
-
`cerefox server deploy` is the catch-all for the server side
|
|
32
|
-
|
|
33
|
-
from
|
|
28
|
+
`cerefox server deploy` is the catch-all for the server side. On an existing
|
|
29
|
+
database it applies **every** pending migration (regardless of which version
|
|
30
|
+
you're coming from — so there are no per-version steps to follow), re-applies
|
|
31
|
+
`rpcs.sql`, and redeploys all nine Edge Functions from npm-bundled assets. No
|
|
32
|
+
repo clone required.
|
|
34
33
|
|
|
35
|
-
|
|
34
|
+
**Re-embed only when a release says so.** If a release changes the embedding
|
|
35
|
+
model or FTS / title weighting, also run `cerefox server reindex --all` — that's
|
|
36
|
+
the one thing `server deploy` doesn't cover, and the release notes will call it
|
|
37
|
+
out. `cerefox doctor` flags schema / Edge-Function version drift if a redeploy
|
|
38
|
+
is needed.
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
## Contributor upgrade (source checkout)
|
|
38
41
|
|
|
39
42
|
```bash
|
|
40
|
-
# 1. Pull the latest code
|
|
41
43
|
git pull origin main
|
|
42
|
-
|
|
43
|
-
#
|
|
44
|
-
bun
|
|
45
|
-
|
|
46
|
-
# 3. Redeploy RPC functions (safe to re-run)
|
|
47
|
-
bun scripts/db_deploy.ts
|
|
48
|
-
|
|
49
|
-
# 4. Build the web UI
|
|
50
|
-
cd frontend && bun install && bun run build && cd ..
|
|
51
|
-
|
|
52
|
-
# 5. Deploy Edge Functions (if using Supabase-hosted)
|
|
53
|
-
# Run from the project root (where supabase/ directory is)
|
|
54
|
-
npx supabase functions deploy cerefox-search
|
|
55
|
-
npx supabase functions deploy cerefox-ingest
|
|
56
|
-
npx supabase functions deploy cerefox-metadata
|
|
57
|
-
npx supabase functions deploy cerefox-get-document
|
|
58
|
-
npx supabase functions deploy cerefox-list-versions
|
|
59
|
-
npx supabase functions deploy cerefox-get-audit-log
|
|
60
|
-
npx supabase functions deploy cerefox-metadata-search
|
|
61
|
-
npx supabase functions deploy cerefox-list-projects
|
|
62
|
-
npx supabase functions deploy cerefox-mcp
|
|
63
|
-
|
|
64
|
-
# 6. Restart the web UI
|
|
65
|
-
cerefox web
|
|
66
|
-
|
|
67
|
-
# 7. (Optional) Sync project docs to Cerefox knowledge base
|
|
68
|
-
bun scripts/sync_docs.ts
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Steps 2-3 require `CEREFOX_DATABASE_URL` in your `.env` file (direct Postgres connection). Step 5 requires the Supabase CLI and a linked project. (`cerefox server deploy` does steps 2, 3, and 5 in one command.)
|
|
72
|
-
|
|
73
|
-
> Python is legacy and slated for removal: the Python CLI and FastAPI web app are husks; only
|
|
74
|
-
> `uv run cerefox mcp` survives as a frozen, unmaintained fallback. Tests run via `bun test`
|
|
75
|
-
> (pytest is retired).
|
|
76
|
-
|
|
77
|
-
## Verifying the Upgrade
|
|
78
|
-
|
|
79
|
-
After upgrading, verify the key components:
|
|
80
|
-
|
|
81
|
-
```bash
|
|
82
|
-
# Check migration status
|
|
83
|
-
bun scripts/db_migrate.ts --status
|
|
84
|
-
|
|
85
|
-
# Run unit tests (optional but recommended)
|
|
86
|
-
bun test
|
|
87
|
-
|
|
88
|
-
# Visit the web UI
|
|
89
|
-
open http://localhost:8000/app/
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
## Version-Specific Notes
|
|
93
|
-
|
|
94
|
-
Most upgrades require no special steps beyond the standard checklist above. Notes below only apply when upgrading across specific version boundaries.
|
|
95
|
-
|
|
96
|
-
### Upgrading to v0.5.x (from any v0.4.x or earlier)
|
|
97
|
-
|
|
98
|
-
The v0.4 → v0.5 transition is a milestone — the CLI itself moved from Python
|
|
99
|
-
to TypeScript. The full migration guide is [`migration-v0.5.md`](migration-v0.5.md);
|
|
100
|
-
the short version for source-checkout users is:
|
|
101
|
-
|
|
102
|
-
- The Python `cerefox` CLI **still works** through v0.7.x — `uv sync` is enough
|
|
103
|
-
to pull it. It prints a one-line ⚠ deprecation banner on every invocation.
|
|
104
|
-
- The new npm CLI lives alongside: `bun install -g @cerefox/memory` (or
|
|
105
|
-
`npm install -g @cerefox/memory`). `cerefox doctor` from any directory will
|
|
106
|
-
verify it.
|
|
107
|
-
- **v0.5.2** stripped the Python `cerefox mcp` soft-wrapper. If your MCP
|
|
108
|
-
client config uses `uv run --directory /path/to/cerefox cerefox mcp`,
|
|
109
|
-
nothing changes — that path runs the Python MCP server directly. If you
|
|
110
|
-
want the TS server instead, point your client at `cerefox mcp`
|
|
111
|
-
(npm-installed) or `npx -y --package=@cerefox/memory cerefox mcp`.
|
|
112
|
-
- **v0.5.3** changed the TS CLI's `.env` precedence: `~/.cerefox/.env` now
|
|
113
|
-
wins over `<repo>/.env` when both exist. Your existing `<repo>/.env` keeps
|
|
114
|
-
working until you run `cerefox init` and pick the `[c]opy` migration
|
|
115
|
-
option. Python `paths.py` is unchanged.
|
|
116
|
-
|
|
117
|
-
No schema migration, no Edge Function redeploy, no chunk reindex required
|
|
118
|
-
for the v0.4 → v0.5.3 arc.
|
|
119
|
-
|
|
120
|
-
### Upgrading to v0.1.20 (from v0.1.19) -- Multi-Project Preservation Fix
|
|
121
|
-
|
|
122
|
-
**Edge Function redeploy is required.** v0.1.20 fixes
|
|
123
|
-
[issue #38](https://github.com/fstamatelopoulos/cerefox/issues/38): `cerefox_ingest`
|
|
124
|
-
no longer destructively replaces multi-project memberships when an agent updates
|
|
125
|
-
content with a single `project_name`. It also adds a new `project_names: string[]`
|
|
126
|
-
parameter for explicit full-set semantics and a new MCP tool
|
|
127
|
-
`cerefox_set_document_projects` for first-class agent control over project
|
|
128
|
-
membership independent of content updates.
|
|
129
|
-
|
|
130
|
-
The fix touches two Edge Functions in `supabase/functions/`. Pulling the new
|
|
131
|
-
code does **not** apply the TS changes to your live Supabase. After `git pull`,
|
|
132
|
-
step 6 of the standard checklist (Edge Function redeploy) is **mandatory for
|
|
133
|
-
this release**:
|
|
134
|
-
|
|
135
|
-
```bash
|
|
136
|
-
npx supabase functions deploy cerefox-ingest
|
|
137
|
-
npx supabase functions deploy cerefox-mcp
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
**If you skip this step**: the Python pipeline fix still applies on next local
|
|
141
|
-
MCP server restart, so the destructive bug is fixed for the local Python MCP
|
|
142
|
-
path. But the **remote MCP** (Claude.ai, ChatGPT Custom GPT via OpenAPI, any
|
|
143
|
-
HTTP MCP client pointed at `cerefox-mcp` Edge Function) and the **direct
|
|
144
|
-
`cerefox-ingest` Edge Function** path will still silently ignore `project_name`
|
|
145
|
-
on update — non-destructive, but agents can't add a membership via that path.
|
|
146
|
-
And the new `cerefox_set_document_projects` MCP tool won't appear in the remote
|
|
147
|
-
MCP tool list until `cerefox-mcp` is redeployed.
|
|
148
|
-
|
|
149
|
-
**No schema migration, no RPC redeploy, no chunk reindex** needed. The fix is
|
|
150
|
-
purely application-layer; the underlying junction table (`cerefox_document_projects`)
|
|
151
|
-
and its many-to-many semantics were always correct. Only the write surface had bugs.
|
|
152
|
-
|
|
153
|
-
**New behaviour to be aware of (no breaking changes)**:
|
|
154
|
-
- `cerefox_ingest` with `project_name="X"` on update → ensures membership in X,
|
|
155
|
-
preserves all others (was: destructive replace in local MCP / silent ignore in TS).
|
|
156
|
-
- `cerefox_ingest` with `project_names=["X","Y","Z"]` (new) on update → sets
|
|
157
|
-
full project set to exactly {X, Y, Z}; opt-in to destructive replace.
|
|
158
|
-
- `cerefox_ingest` with neither → no membership changes.
|
|
159
|
-
- `cerefox_set_document_projects(document_id, project_names=["X","Y"])` (new tool)
|
|
160
|
-
→ explicit metadata-only write of the full project set. Logged as
|
|
161
|
-
`update-metadata` in the audit log.
|
|
162
|
-
|
|
163
|
-
Architectural rationale: see the cerefox#38 PR commit message and
|
|
164
|
-
[`docs/solution-design.md`](../solution-design.md).
|
|
165
|
-
|
|
166
|
-
### Upgrading to v0.1.19 (from v0.1.18) -- FTS Query Parser
|
|
167
|
-
|
|
168
|
-
**RPC redeploy is required.** v0.1.19 changes the FTS query parser used by
|
|
169
|
-
`cerefox_hybrid_search` and `cerefox_fts_search` from `websearch_to_tsquery`
|
|
170
|
-
to `plainto_tsquery`. The change lives in `src/cerefox/db/rpcs.sql` — pulling
|
|
171
|
-
the new code does **not** apply it. After `git pull`, step 4 of the standard
|
|
172
|
-
checklist (redeploy RPCs) is mandatory, not optional:
|
|
173
|
-
|
|
174
|
-
```bash
|
|
175
|
-
bun scripts/db_deploy.ts # or: cerefox server deploy
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
`db_deploy.ts` is idempotent (`CREATE OR REPLACE FUNCTION`) and safe to
|
|
179
|
-
re-run. **If you skip this step, searches for any title containing `-`
|
|
180
|
-
(e.g. "Job Hunting - Opportunity Index", `setup-supabase`) will continue
|
|
181
|
-
to return zero results until the RPCs are redeployed.** This is the
|
|
182
|
-
single most common upgrade mistake for v0.1.19.
|
|
183
|
-
|
|
184
|
-
**No schema migration**, **no Edge Function redeploy**, **no chunk reindex**
|
|
185
|
-
needed for this change — the corpus side (`to_tsvector` in chunk `fts`
|
|
186
|
-
column) is unchanged; only the query parser changed. The link-resolver web
|
|
187
|
-
UI feature (the other half of v0.1.19) requires step 5 of the standard
|
|
188
|
-
checklist (rebuild the frontend); no backend changes are needed for that
|
|
189
|
-
half.
|
|
190
|
-
|
|
191
|
-
**Behaviour change to be aware of**: the new parser treats every query
|
|
192
|
-
token as a literal word and ANDs them together. It does **not** interpret
|
|
193
|
-
phrase quotes (`"…"`), `OR`, or `-` as operators. If you or any scripts
|
|
194
|
-
relied on Google-style search operators in `cerefox_search` queries, those
|
|
195
|
-
queries now treat the operator characters as literal tokens. The architectural
|
|
196
|
-
rationale lives in [`docs/solution-design.md` §5.2](../solution-design.md#52-title-boosting-search-quality).
|
|
197
|
-
|
|
198
|
-
### Upgrading to v0.1.14+ (from v0.1.13) -- Title Boosting
|
|
199
|
-
|
|
200
|
-
**One new migration**: `0011_title_boosting.sql`
|
|
201
|
-
|
|
202
|
-
- Drops the `GENERATED ALWAYS AS` expression on `cerefox_chunks.fts` (it can't cross-reference `cerefox_documents.title`)
|
|
203
|
-
- Adds `cerefox_update_chunk_fts(p_document_id, p_new_title)` RPC for title-change FTS refresh
|
|
204
|
-
|
|
205
|
-
Both are applied automatically by `bun scripts/db_migrate.ts` (step 3). After the migration, also run `bun scripts/db_deploy.ts` (step 4) to update the RPC definitions.
|
|
206
|
-
|
|
207
|
-
**Redeploy Edge Functions**: `cerefox-ingest` and `cerefox-mcp` now prepend the document title to chunk embedding inputs. Redeploy both:
|
|
208
|
-
|
|
209
|
-
```bash
|
|
210
|
-
npx supabase functions deploy cerefox-ingest
|
|
211
|
-
npx supabase functions deploy cerefox-mcp
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
**Optional reindex** (recommended for better search quality):
|
|
215
|
-
|
|
216
|
-
Existing chunks were embedded without the document title prefix and their FTS vectors don't include the document title at weight A. New documents ingested after this upgrade are automatically correct.
|
|
217
|
-
|
|
218
|
-
To upgrade existing chunks:
|
|
219
|
-
|
|
220
|
-
```bash
|
|
221
|
-
# Preview what would be reindexed (no changes made)
|
|
222
|
-
cerefox server reindex --all --dry-run
|
|
223
|
-
|
|
224
|
-
# Reindex all chunks (re-embeds with title prefix, updates FTS)
|
|
225
|
-
# Uses 50 chunks per API call by default; lower --batch if you hit rate limits
|
|
226
|
-
cerefox server reindex --all
|
|
227
|
-
|
|
228
|
-
# Or run the contributor script directly (same effect)
|
|
229
|
-
bun scripts/reindex_all.ts --all
|
|
230
|
-
```
|
|
231
|
-
|
|
232
|
-
The reindex is **resumable**: if interrupted, re-running it skips chunks already embedded with the current model. Archived chunks (historical versions) are not reindexed -- they are not searched.
|
|
233
|
-
|
|
234
|
-
Cost estimate: ~$0.01-0.05 for a typical personal knowledge base (a few thousand chunks at `text-embedding-3-small` rates).
|
|
235
|
-
|
|
236
|
-
### Upgrading to v0.1.11+ (from v0.1.10)
|
|
237
|
-
|
|
238
|
-
**Two new migrations**:
|
|
239
|
-
- `0006_usage_log.sql` -- adds `cerefox_config` and `cerefox_usage_log` tables with 5 new RPCs
|
|
240
|
-
- `0007_usage_log_requestor.sql` -- renames `reader` column to `requestor` in `cerefox_usage_log`
|
|
241
|
-
and updates all 3 usage RPCs. Non-destructive (existing data preserved).
|
|
242
|
-
|
|
243
|
-
Both are applied automatically by `bun scripts/db_migrate.ts` (step 3 above). After migrations, also
|
|
244
|
-
redeploy RPCs via `bun scripts/db_deploy.ts` (step 4) to update the canonical function definitions.
|
|
245
|
-
|
|
246
|
-
**New REST API endpoints**: `/api/v1/usage-log`, `/api/v1/usage-log/export.csv`,
|
|
247
|
-
`/api/v1/usage-log/summary`, `/api/v1/config/{key}`.
|
|
248
|
-
|
|
249
|
-
**Analytics page**: new page at `/app/analytics` with 7 interactive visualizations
|
|
250
|
-
(Nivo charts), date/project/path filters, usage tracking toggle, and CSV export.
|
|
251
|
-
|
|
252
|
-
**Usage tracking is opt-in**: disabled by default. Enable via CLI:
|
|
253
|
-
```bash
|
|
254
|
-
cerefox config set usage_tracking_enabled true
|
|
44
|
+
cerefox server deploy # = migrate + re-apply RPCs + deploy EFs, in one
|
|
45
|
+
cd frontend && bun install && bun run build && cd .. # only if you run `cerefox web` from source
|
|
46
|
+
bun test # optional
|
|
255
47
|
```
|
|
256
|
-
Or via the toggle on the Analytics page. When enabled, **all operations** (both reads
|
|
257
|
-
and writes) are logged with operation type, access path, requestor identity, query text,
|
|
258
|
-
and result count.
|
|
259
|
-
|
|
260
|
-
**Requestor attribution**: each usage log entry records who made the call:
|
|
261
|
-
- MCP tools: `"mcp-agent"` for reads, the `author` parameter value for writes (ingest)
|
|
262
|
-
- Web UI: `"user"`
|
|
263
|
-
- CLI: `"user"`
|
|
264
|
-
- Primitive Edge Functions: not attributed (access_path identifies the caller type)
|
|
265
|
-
|
|
266
|
-
**Edge Functions updated**: all primitive Edge Functions and `cerefox-mcp` now include
|
|
267
|
-
fire-and-forget usage logging calls for both reads and writes. Redeploy all Edge
|
|
268
|
-
Functions (step 6 above).
|
|
269
|
-
|
|
270
|
-
### Upgrading to v0.1.10+ (from any earlier version)
|
|
271
|
-
|
|
272
|
-
**New Edge Function**: `cerefox-metadata-search` must be deployed (included in step 6 above).
|
|
273
|
-
|
|
274
|
-
**Breaking change -- MCP tool `project_id` input removed**: The `cerefox_search`,
|
|
275
|
-
`cerefox_ingest`, and `cerefox_metadata_search` tools in `cerefox-mcp` now accept
|
|
276
|
-
`project_name` (human-readable string) instead of `project_id` (UUID). If you have
|
|
277
|
-
any AI agents that pass `project_id` in their MCP tool calls, update them to pass
|
|
278
|
-
`project_name` with the project's display name instead.
|
|
279
|
-
|
|
280
|
-
This change **only affects the MCP path** (`cerefox-mcp` Edge Function and local MCP
|
|
281
|
-
server). The primitive Edge Functions (`cerefox-search`, `cerefox-ingest`, etc.) still
|
|
282
|
-
accept `project_id UUID` and are unchanged.
|
|
283
|
-
|
|
284
|
-
**New data in search results**: All search and retrieval results now include a
|
|
285
|
-
`project_names` field (array of strings) alongside the existing `project_ids` field.
|
|
286
|
-
Existing callers that ignore unknown fields are unaffected.
|
|
287
|
-
|
|
288
|
-
**New MCP tools**: `cerefox_list_projects` (no parameters; returns all projects with
|
|
289
|
-
names and IDs) and `cerefox_metadata_search` are now available on all MCP paths.
|
|
290
|
-
MCP clients pick up new tools automatically on the next connection.
|
|
291
|
-
|
|
292
|
-
### Upgrading to v0.1.7+ (from any earlier version)
|
|
293
|
-
|
|
294
|
-
**Web UI replaced**: The Jinja2 + HTMX frontend was replaced with a React SPA. The web UI is now at `/app/` instead of `/`. The old root URL (`/`) shows a redirect page.
|
|
295
|
-
|
|
296
|
-
**New frontend build step**: Step 5 (`npm install && npm run build`) is required starting from v0.1.7. Earlier versions had no frontend build step.
|
|
297
|
-
|
|
298
|
-
**New dependency**: Node.js 18+ is required for building the frontend.
|
|
299
|
-
|
|
300
|
-
### Upgrading to v0.1.4+ (from v0.1.0-v0.1.3)
|
|
301
|
-
|
|
302
|
-
**Versioning schema**: Migration `0003_add_document_versions.sql` adds the `cerefox_document_versions` table and `version_id` column on `cerefox_chunks`. This is applied automatically by `bun scripts/db_migrate.ts`.
|
|
303
|
-
|
|
304
|
-
### Upgrading to v0.1.1+ (from v0.1.0)
|
|
305
|
-
|
|
306
|
-
**Cloud-only embeddings**: Local embedders (mpnet, Ollama) were removed. If you were using a local embedder, switch to OpenAI or Fireworks AI and run `cerefox server reindex` to re-embed all chunks.
|
|
307
|
-
|
|
308
|
-
## AI Agent Integration After Upgrade
|
|
309
|
-
|
|
310
|
-
After deploying new Edge Functions (step 6), AI agent integrations may need reconfiguration.
|
|
311
|
-
|
|
312
|
-
### MCP clients (Claude Code, Cursor, Claude Desktop)
|
|
313
|
-
|
|
314
|
-
If you are using the **remote MCP server** (Streamable HTTP via `cerefox-mcp` Edge Function), MCP clients will pick up new tools and updated tool signatures in **new sessions** started after the deploy. No reconfiguration needed -- just start a new conversation.
|
|
315
|
-
|
|
316
|
-
**Important**: MCP tool schemas are cached for the lifetime of a session. An existing session that already loaded the old tool definitions will not see changes even if you "restart" the AI client within the same session context. The schema is fetched once at session initialization and held in memory. Starting a completely new session (new conversation/window) is the only way to pick up schema changes.
|
|
317
|
-
|
|
318
|
-
This matters when you add a new parameter to an existing tool (e.g., adding `project_name` to `cerefox_search`): agents in open sessions will not know the parameter exists until they start a fresh session.
|
|
319
|
-
|
|
320
|
-
If you are still using the **local MCP server** (`cerefox mcp` via stdio), consider switching to the remote MCP server. The remote path is now the recommended default -- it supports all tools, runs server-side embedding, and works across machines. See `docs/guides/connect-agents.md` for setup instructions.
|
|
321
|
-
|
|
322
|
-
### ChatGPT Custom GPT (GPT Actions)
|
|
323
|
-
|
|
324
|
-
If you use GPT Actions pointing at the Cerefox Edge Functions, **check the OpenAPI schema version** in `docs/guides/connect-agents.md` after every upgrade. If the version has changed (e.g., from 1.4.0 to 1.5.0), you need to update the schema in the ChatGPT Custom GPT editor:
|
|
325
|
-
|
|
326
|
-
1. Open the Custom GPT editor and go to **Actions**
|
|
327
|
-
2. Replace the OpenAPI schema with the latest version from `docs/guides/connect-agents.md`
|
|
328
|
-
3. Save the schema
|
|
329
|
-
4. **Re-enter the API key**: go to **Authentication** settings and re-enter your Supabase **legacy anon JWT** (Project Settings → API Keys → Legacy → anon) as the Bearer token. The new `sb_publishable_…` key does not work for GPT Actions — see [`setup-supabase.md` → Supabase API keys (2026)](setup-supabase.md#supabase-api-keys-2026).
|
|
330
48
|
|
|
331
|
-
|
|
49
|
+
Lower-level equivalents, if you prefer them: `bun scripts/db_migrate.ts` (apply
|
|
50
|
+
migrations) + `bun scripts/db_deploy.ts` (re-apply RPCs) + `npx supabase
|
|
51
|
+
functions deploy <fn>`. These need `CEREFOX_DATABASE_URL` (direct Postgres) and
|
|
52
|
+
a linked Supabase project.
|
|
53
|
+
|
|
54
|
+
> Python is legacy: the Python CLI and FastAPI web app are husks; only
|
|
55
|
+
> `uv run cerefox mcp` survives as a frozen, unmaintained fallback. Tests run
|
|
56
|
+
> via `bun test` (pytest is retired).
|
|
57
|
+
|
|
58
|
+
## Notable cross-version transitions
|
|
59
|
+
|
|
60
|
+
Most upgrades need nothing beyond the steps above. Two transitions are worth
|
|
61
|
+
knowing about:
|
|
62
|
+
|
|
63
|
+
- **v0.9 — CLI verbs moved to a resource-verb shape** (`cerefox document get`,
|
|
64
|
+
`cerefox project list`, …). The old flat verbs (`get-doc`, `list-docs`,
|
|
65
|
+
`deploy-server`, `docs`, …) still run but print the new form and exit
|
|
66
|
+
non-zero — so any scripts or aliases tell you exactly what to change. Re-run
|
|
67
|
+
`cerefox completion install` to refresh tab-completion. The Python CLI + web
|
|
68
|
+
app became husks at v0.9; `uv run cerefox mcp` is the only surviving Python
|
|
69
|
+
path.
|
|
70
|
+
- **v0.4–v0.5 — the runtime moved Python → TypeScript** and became the
|
|
71
|
+
`@cerefox/memory` npm package (CLI, MCP server, web server, ingestion). If
|
|
72
|
+
you're coming from a pre-installer 0.1.x clone, see the "old pre-installer
|
|
73
|
+
clone" note above: install the package and run `cerefox init`.
|
|
74
|
+
|
|
75
|
+
## After upgrading: AI agents
|
|
76
|
+
|
|
77
|
+
New tools and updated tool signatures are picked up by MCP clients in **new
|
|
78
|
+
sessions** started after the upgrade — an open session caches the tool schema at
|
|
79
|
+
startup and won't see changes until you start a fresh conversation. The remote
|
|
80
|
+
MCP path needs no reconfiguration; for the local stdio server, restart the
|
|
81
|
+
client. `cerefox configure-agent --tool <client>` (re)writes a client's config
|
|
82
|
+
if you need it.
|
|
83
|
+
|
|
84
|
+
**ChatGPT Custom GPT (GPT Actions):** after an upgrade, check the OpenAPI schema
|
|
85
|
+
version in [`connect-agents.md`](connect-agents.md); if it changed, paste the new
|
|
86
|
+
schema into the Custom GPT editor and **re-enter your Supabase legacy anon JWT**
|
|
87
|
+
as the Bearer token. (The editor clears the key on every schema save, and the
|
|
88
|
+
new `sb_publishable_…` key doesn't work for GPT Actions — see
|
|
89
|
+
[`setup-supabase.md`](setup-supabase.md#supabase-api-keys-2026).)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.5",
|
|
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",
|
|
@@ -45,6 +45,7 @@
|
|
|
45
45
|
"cli-progress": "^3.12.0",
|
|
46
46
|
"commander": "^12.1.0",
|
|
47
47
|
"hono": "^4.12.23",
|
|
48
|
+
"mammoth": "^1.9.0",
|
|
48
49
|
"ora": "^9.4.0",
|
|
49
50
|
"picocolors": "^1.0.0",
|
|
50
51
|
"postgres": "^3.4.9",
|