@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
|
@@ -8,9 +8,11 @@ This guide walks you from a blank Supabase project to a fully deployed Cerefox s
|
|
|
8
8
|
|
|
9
9
|
## Prerequisites
|
|
10
10
|
|
|
11
|
-
- [
|
|
11
|
+
- The Cerefox CLI installed (`cerefox --version`) — see [`quickstart.md`](quickstart.md#1-install). End users do **not** need a source clone or Python.
|
|
12
|
+
- **Node.js 20+** or **Bun 1.0+** (the CLI runtime; also used for `npx supabase`).
|
|
12
13
|
- A Supabase account (free tier is enough): [supabase.com](https://supabase.com)
|
|
13
|
-
|
|
14
|
+
|
|
15
|
+
> The `python scripts/db_*.py` paths shown in the contributor footnotes below are **legacy**. The Python implementation is legacy and slated for removal in a future release; only the Python MCP server remains as a fallback. Contributors with a repo clone should use `bun scripts/db_deploy.ts` / `bun scripts/db_migrate.ts`.
|
|
14
16
|
|
|
15
17
|
---
|
|
16
18
|
|
|
@@ -52,14 +54,14 @@ Either way: keep this key secret — it bypasses Row Level Security and grants f
|
|
|
52
54
|
|
|
53
55
|
### 3c. Direct database URL — `CEREFOX_DATABASE_URL`
|
|
54
56
|
|
|
55
|
-
This is used by `db_deploy.
|
|
57
|
+
This is used by `cerefox server deploy` (and the contributor scripts `bun scripts/db_deploy.ts` / `bun scripts/db_migrate.ts`). See the **[Connection pooling in 2026](#connection-pooling-2026)** reference section near the end of this guide for context. The short version:
|
|
56
58
|
|
|
57
59
|
1. Open **Project Settings → Database → Connection pooling** (not the "Connect" dialog — that one usually omits the Session Pooler in the new UI).
|
|
58
60
|
2. Copy the **Session Pooler** URI (host ends in `.pooler.supabase.com`, port `5432`).
|
|
59
61
|
3. Confirm the username has the form `postgres.<project-ref>` — without that suffix you'll get "Tenant or user not found".
|
|
60
62
|
4. Append `?sslmode=require` to enforce TLS explicitly.
|
|
61
63
|
|
|
62
|
-
If you only see Direct Connection and Transaction Pooler in your dashboard, take the Transaction Pooler URI and change `:6543` → `:5432`. That gives you the Session Pooler. **Do not use port 6543** — Transaction Pooler does not support DDL and
|
|
64
|
+
If you only see Direct Connection and Transaction Pooler in your dashboard, take the Transaction Pooler URI and change `:6543` → `:5432`. That gives you the Session Pooler. **Do not use port 6543** — Transaction Pooler does not support DDL and the schema deploy will fail mid-schema.
|
|
63
65
|
|
|
64
66
|
The Direct Connection (`db.<project-ref>.supabase.co:5432`) is IPv6-only on the free tier and unusable on most home/office networks. The dashboard now warns about this directly.
|
|
65
67
|
|
|
@@ -67,133 +69,56 @@ The Direct Connection (`db.<project-ref>.supabase.co:5432`) is IPv6-only on the
|
|
|
67
69
|
|
|
68
70
|
## Step 4 — Configure Your Environment
|
|
69
71
|
|
|
72
|
+
Run the interactive setup — it validates each credential against the live
|
|
73
|
+
service and writes `~/.cerefox/.env` (mode 0600):
|
|
74
|
+
|
|
70
75
|
```bash
|
|
71
|
-
|
|
72
|
-
cp .env.example .env
|
|
76
|
+
cerefox init
|
|
73
77
|
```
|
|
74
78
|
|
|
75
|
-
|
|
79
|
+
When prompted, supply the three values from Step 3 (URL, secret key, database
|
|
80
|
+
URL) plus your `OPENAI_API_KEY`. If you plan to connect AI agents via the
|
|
81
|
+
remote MCP / GPT Actions path, also set `CEREFOX_SUPABASE_ANON_KEY` to the
|
|
82
|
+
**legacy anon JWT** (`eyJ…`, not `sb_publishable_…` — see "Supabase API keys
|
|
83
|
+
(2026)" below).
|
|
84
|
+
|
|
85
|
+
A minimal `~/.cerefox/.env` looks like:
|
|
76
86
|
|
|
77
87
|
```bash
|
|
78
88
|
CEREFOX_SUPABASE_URL=https://your-project-ref.supabase.co
|
|
79
89
|
CEREFOX_SUPABASE_KEY=sb_secret_...your-secret-key...
|
|
80
90
|
CEREFOX_DATABASE_URL=postgresql://postgres.yourref:yourpassword@aws-N-region.pooler.supabase.com:5432/postgres?sslmode=require
|
|
81
|
-
|
|
82
|
-
#
|
|
91
|
+
OPENAI_API_KEY=sk-...
|
|
92
|
+
# Only needed for Edge Functions / MCP / GPT Actions — must be the legacy anon JWT:
|
|
83
93
|
# CEREFOX_SUPABASE_ANON_KEY=eyJ...your-legacy-anon-jwt...
|
|
84
94
|
```
|
|
85
95
|
|
|
86
|
-
|
|
96
|
+
> **Contributors** (repo clone): copy `cp .env.example .env` in the project root
|
|
97
|
+
> and edit it directly; the repo-local `.env` takes precedence (see
|
|
98
|
+
> [`configuration.md`](configuration.md#where-cerefox-looks-for-env-v030)).
|
|
87
99
|
|
|
88
100
|
---
|
|
89
101
|
|
|
90
|
-
## Step 5 —
|
|
102
|
+
## Step 5 — Deploy the Schema and Edge Functions
|
|
91
103
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## Step 6 — Deploy the Schema
|
|
104
|
+
`cerefox server deploy` is the catch-all end-user deploy path. It deploys the
|
|
105
|
+
schema + RPCs (using `CEREFOX_DATABASE_URL`) and all 9 Edge Functions — straight
|
|
106
|
+
from the npm-bundled assets, no source clone. It detects fresh vs. existing
|
|
107
|
+
databases: a fresh DB gets schema + RPCs + migration stamps; an existing DB gets
|
|
108
|
+
pending migrations applied and `rpcs.sql` re-applied in place.
|
|
101
109
|
|
|
102
110
|
```bash
|
|
103
111
|
# Preview what will happen (no changes made):
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
# Apply the schema:
|
|
107
|
-
python scripts/db_deploy.py
|
|
108
|
-
```
|
|
109
|
-
|
|
110
|
-
Expected output:
|
|
111
|
-
```
|
|
112
|
-
╔══════════════════════════════════════╗
|
|
113
|
-
║ Cerefox DB Deploy ║
|
|
114
|
-
╚══════════════════════════════════════╝
|
|
115
|
-
|
|
116
|
-
Connecting to database...
|
|
117
|
-
|
|
118
|
-
▶ Enable extensions (uuid-ossp, vector/pgvector)...
|
|
119
|
-
✓ Done
|
|
120
|
-
|
|
121
|
-
▶ Apply schema (tables, indexes, triggers)...
|
|
122
|
-
✓ Done
|
|
123
|
-
|
|
124
|
-
▶ Apply RPCs (search functions)...
|
|
125
|
-
✓ Done
|
|
126
|
-
|
|
127
|
-
──────────────────────────────────────────
|
|
128
|
-
✓ Deployment complete. 3 steps applied.
|
|
129
|
-
|
|
130
|
-
Next step: verify the schema with:
|
|
131
|
-
python scripts/db_status.py
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
---
|
|
135
|
-
|
|
136
|
-
## Step 7 — Verify the Schema
|
|
137
|
-
|
|
138
|
-
```bash
|
|
139
|
-
python scripts/db_status.py
|
|
140
|
-
```
|
|
112
|
+
cerefox server deploy --dry-run
|
|
141
113
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
╔══════════════════════════════════════╗
|
|
145
|
-
║ Cerefox DB Status ║
|
|
146
|
-
╚══════════════════════════════════════╝
|
|
147
|
-
|
|
148
|
-
Extensions:
|
|
149
|
-
✓ uuid-ossp
|
|
150
|
-
✓ vector
|
|
151
|
-
|
|
152
|
-
Tables:
|
|
153
|
-
✓ cerefox_projects
|
|
154
|
-
✓ cerefox_documents
|
|
155
|
-
✓ cerefox_chunks
|
|
156
|
-
✓ cerefox_migrations
|
|
157
|
-
|
|
158
|
-
Functions / RPCs:
|
|
159
|
-
✓ cerefox_set_updated_at()
|
|
160
|
-
✓ cerefox_hybrid_search()
|
|
161
|
-
✓ cerefox_fts_search()
|
|
162
|
-
✓ cerefox_semantic_search()
|
|
163
|
-
✓ cerefox_reconstruct_doc()
|
|
164
|
-
✓ cerefox_save_note()
|
|
165
|
-
✓ cerefox_search_docs()
|
|
166
|
-
✓ cerefox_context_expand()
|
|
167
|
-
|
|
168
|
-
Indexes:
|
|
169
|
-
✓ idx_cerefox_chunks_fts
|
|
170
|
-
✓ idx_cerefox_chunks_emb_primary
|
|
171
|
-
✓ idx_cerefox_chunks_emb_upgrade
|
|
172
|
-
✓ idx_cerefox_chunks_document
|
|
173
|
-
✓ idx_cerefox_docs_metadata
|
|
174
|
-
✓ idx_cerefox_docs_project
|
|
175
|
-
|
|
176
|
-
Row counts:
|
|
177
|
-
ℹ cerefox_projects: 0 rows
|
|
178
|
-
ℹ cerefox_documents: 0 rows
|
|
179
|
-
ℹ cerefox_chunks: 0 rows
|
|
180
|
-
|
|
181
|
-
──────────────────────────────────────────
|
|
182
|
-
✓ All checks passed. Schema looks healthy.
|
|
114
|
+
# Deploy everything (schema + RPCs + Edge Functions):
|
|
115
|
+
cerefox server deploy
|
|
183
116
|
```
|
|
184
117
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
---
|
|
118
|
+
Useful flags: `--schema-only`, `--functions-only`, `--dry-run`.
|
|
188
119
|
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
The Edge Functions run server-side on Supabase. `cerefox-search` and `cerefox-ingest` handle
|
|
192
|
-
embedding for agents; `cerefox-mcp` wraps them as a remote MCP endpoint (recommended for
|
|
193
|
-
Claude Code, Cursor, and Claude Desktop). Deploy using the Supabase CLI via `npx` — no
|
|
194
|
-
separate install needed, just Node.js.
|
|
195
|
-
|
|
196
|
-
**First time only — authenticate and link your project:**
|
|
120
|
+
**First time only — the Edge Function step authenticates and links your project**
|
|
121
|
+
(it shells out to `npx supabase`). If prompted, run:
|
|
197
122
|
|
|
198
123
|
```bash
|
|
199
124
|
npx supabase login # opens a browser tab; click "Confirm" to generate an access token
|
|
@@ -203,72 +128,42 @@ npx supabase link # prompts for your project ref (the ID in your Supabas
|
|
|
203
128
|
Your project ref is in the Supabase dashboard URL:
|
|
204
129
|
`https://supabase.com/dashboard/project/<project-ref>`
|
|
205
130
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
```bash
|
|
209
|
-
npx supabase functions deploy cerefox-ingest
|
|
210
|
-
npx supabase functions deploy cerefox-search
|
|
211
|
-
npx supabase functions deploy cerefox-mcp
|
|
212
|
-
```
|
|
213
|
-
|
|
214
|
-
Expected output for each:
|
|
215
|
-
```
|
|
216
|
-
Bundling Function: cerefox-ingest
|
|
217
|
-
Deploying Function: cerefox-ingest (script size: ~880kB)
|
|
218
|
-
Deployed Functions on project <your-project-ref>: cerefox-ingest
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
You can verify in the Supabase Dashboard → **Edge Functions** — all three functions should
|
|
222
|
-
appear with a green "Active" status.
|
|
131
|
+
After it finishes, verify in the Supabase Dashboard → **Edge Functions** — all 9
|
|
132
|
+
functions should appear with a green "Active" status.
|
|
223
133
|
|
|
224
134
|
> **`WARNING: Docker is not running` is expected and harmless.** The Supabase CLI checks for
|
|
225
135
|
> Docker (its older local bundler ran in a container) but falls back to bundling the functions
|
|
226
136
|
> server-side — it uploads the source assets (you'll see `Uploading asset (…)` lines) and
|
|
227
137
|
> Supabase compiles them in the cloud. **Docker is not a prerequisite for deploying Cerefox's
|
|
228
138
|
> Edge Functions.** A deploy succeeded as long as each function ends with
|
|
229
|
-
> `Deployed Functions on project …`.
|
|
230
|
-
> `cerefox server deploy --functions-only`.
|
|
139
|
+
> `Deployed Functions on project …`.
|
|
231
140
|
|
|
232
|
-
> **Re-deploying after
|
|
233
|
-
>
|
|
234
|
-
>
|
|
141
|
+
> **Re-deploying after upgrades**: just re-run `cerefox server deploy` (or
|
|
142
|
+
> `cerefox server deploy --functions-only` for EFs only). It applies pending
|
|
143
|
+
> migrations and re-applies RPCs in place. `npx supabase login` only needs to be
|
|
144
|
+
> run once per machine.
|
|
235
145
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
Confirm everything is wired up correctly:
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
uv run pytest
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
These are unit tests only (no real database connection needed). You should see all tests pass.
|
|
247
|
-
|
|
248
|
-
To also run the integration tests against your live Supabase instance:
|
|
249
|
-
```bash
|
|
250
|
-
uv run pytest -m integration
|
|
251
|
-
```
|
|
146
|
+
> **Contributors** (repo clone): the low-level path is `bun scripts/db_deploy.ts`
|
|
147
|
+
> / `bun scripts/db_migrate.ts` for schema, and `npx supabase functions deploy
|
|
148
|
+
> <name>` per Edge Function. The `python scripts/db_deploy.py` path is legacy.
|
|
252
149
|
|
|
253
150
|
---
|
|
254
151
|
|
|
255
|
-
## Step
|
|
152
|
+
## Step 6 — Connect an AI agent (optional)
|
|
256
153
|
|
|
257
154
|
Cerefox ships a built-in MCP server that gives desktop agents named tools
|
|
258
155
|
(`cerefox_search`, `cerefox_ingest`) with full hybrid search.
|
|
259
156
|
|
|
260
|
-
**For Claude
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
"cerefox": {
|
|
265
|
-
"command": "uv",
|
|
266
|
-
"args": ["--directory", "/path/to/cerefox", "run", "cerefox", "mcp"]
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
}
|
|
157
|
+
**For Claude Code / Claude Desktop / Cursor / Codex / Gemini** — let the CLI
|
|
158
|
+
write the config:
|
|
159
|
+
```bash
|
|
160
|
+
cerefox configure-agent --tool claude-code # or claude-desktop, cursor, codex, gemini
|
|
270
161
|
```
|
|
271
162
|
|
|
163
|
+
This points the client at the local stdio server (`cerefox mcp`). To edit
|
|
164
|
+
configs by hand or use the remote (Edge Function) HTTP transport, see
|
|
165
|
+
[`connect-agents.md`](connect-agents.md).
|
|
166
|
+
|
|
272
167
|
**For cloud Claude.ai** — connect to the Supabase remote MCP (FTS keyword search only):
|
|
273
168
|
1. In Supabase Dashboard → Project Settings → Integrations → MCP, get your project ref
|
|
274
169
|
2. In Claude.ai Settings → Integrations, add `https://mcp.supabase.com/sse?project_ref=<ref>`
|
|
@@ -288,14 +183,14 @@ architecture explanation, and ChatGPT GPT Actions setup.
|
|
|
288
183
|
|
|
289
184
|
### "extension 'vector' does not exist"
|
|
290
185
|
- Go to Supabase Dashboard → Database → Extensions → enable `vector`
|
|
291
|
-
- Then re-run `
|
|
186
|
+
- Then re-run `cerefox server deploy`
|
|
292
187
|
|
|
293
188
|
### "permission denied for table"
|
|
294
189
|
- Make sure `CEREFOX_SUPABASE_KEY` is your secret key (`sb_secret_…`) or legacy `service_role` JWT — not the publishable / anon key. See [Supabase API keys (2026)](#supabase-api-keys-2026) below.
|
|
295
190
|
|
|
296
191
|
### Schema already exists (re-deploying)
|
|
297
|
-
- All schema objects use `CREATE ... IF NOT EXISTS` / `CREATE OR REPLACE`, so re-running is safe
|
|
298
|
-
- To start completely fresh
|
|
192
|
+
- All schema objects use `CREATE ... IF NOT EXISTS` / `CREATE OR REPLACE`, so re-running `cerefox server deploy` is safe
|
|
193
|
+
- To start completely fresh, contributors with a repo clone can run `bun scripts/db_deploy.ts --reset` (⚠️ deletes all data; typed-`yes` guard). There is deliberately no `--reset` on `cerefox server deploy`.
|
|
299
194
|
|
|
300
195
|
---
|
|
301
196
|
|
|
@@ -342,7 +237,7 @@ Supabase's "Connect" dialog was redesigned in 2026 and the **Session Pooler** is
|
|
|
342
237
|
| Type | Host / port | DDL support | IPv4 compatible? | Use for Cerefox? |
|
|
343
238
|
|---|---|---|---|---|
|
|
344
239
|
| **Direct Connection** | `db.<project-ref>.supabase.co:5432` | ✓ | **IPv6 only on free tier.** Dashboard warns about this directly. | No — most networks can't reach it. |
|
|
345
|
-
| **Transaction Pooler** | `aws-N-region.pooler.supabase.com:6543` (note port) | **✗ no DDL** | ✓ | No —
|
|
240
|
+
| **Transaction Pooler** | `aws-N-region.pooler.supabase.com:6543` (note port) | **✗ no DDL** | ✓ | No — the schema deploy fails mid-schema. |
|
|
346
241
|
| **Session Pooler** | `aws-N-region.pooler.supabase.com:5432` | ✓ | ✓ | **Yes — use this.** |
|
|
347
242
|
|
|
348
243
|
The Transaction Pooler runs PgBouncer in transaction mode and does not maintain a session between statements, breaking DDL, prepared statements, `SET LOCAL`, and advisory locks. The Session Pooler is the same hostname on a different port and keeps a full session per connection.
|
package/docs/guides/upgrading.md
CHANGED
|
@@ -4,24 +4,35 @@ This guide covers upgrading an existing Cerefox installation. All steps are idem
|
|
|
4
4
|
|
|
5
5
|
## Pick your path
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
upgrade procedure depends on how you installed Cerefox:
|
|
7
|
+
The right upgrade procedure depends on how you installed Cerefox:
|
|
9
8
|
|
|
10
9
|
| You installed via | Upgrade with |
|
|
11
10
|
|---|---|
|
|
12
|
-
| **
|
|
13
|
-
| **Source checkout** (`git clone
|
|
14
|
-
| **Both** (you contribute AND have the
|
|
11
|
+
| **Installer / npm** (end user, no repo clone) | Re-run the installer (`curl …/install.sh \| sh`) or `cerefox self-update` (or `bun update -g @cerefox/memory` / `npm update -g @cerefox/memory`). Then run `cerefox server deploy` **if the server side changed** (new migration or RPC change — release notes will say). **`cerefox doctor`** verifies the install. |
|
|
12
|
+
| **Source checkout** (`git clone`, contributor) | The "Contributor Upgrade Checklist" below — `git pull`, schema migrations, Edge Functions, frontend build. |
|
|
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. |
|
|
15
14
|
|
|
16
|
-
> If you're upgrading
|
|
17
|
-
>
|
|
18
|
-
> `cerefox init`'s coexistence flow (`[c]opy` your existing `.env` to `~/.cerefox/.env`),
|
|
19
|
-
> the v0.5.2 soft-wrapper removal, and the v0.5.3 paths precedence change.
|
|
15
|
+
> If you're upgrading across a major boundary for the first time,
|
|
16
|
+
> [`migration-v0.9.md`](migration-v0.9.md) is the canonical migration guide.
|
|
20
17
|
|
|
21
|
-
|
|
22
|
-
Functions). If you're an npm-installed user, you've already got everything you need.
|
|
18
|
+
## End-User Upgrade
|
|
23
19
|
|
|
24
|
-
|
|
20
|
+
```bash
|
|
21
|
+
# 1. Update the CLI
|
|
22
|
+
cerefox self-update # or: re-run the installer, or bun/npm update -g @cerefox/memory
|
|
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
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
`cerefox server deploy` is the catch-all for the server side: on an existing DB it applies
|
|
32
|
+
pending migrations and re-applies `rpcs.sql` in place, then redeploys all nine Edge Functions
|
|
33
|
+
from npm-bundled assets. No repo clone required.
|
|
34
|
+
|
|
35
|
+
## Contributor Upgrade Checklist (source checkout)
|
|
25
36
|
|
|
26
37
|
Run these steps every time you pull a new version:
|
|
27
38
|
|
|
@@ -29,19 +40,16 @@ Run these steps every time you pull a new version:
|
|
|
29
40
|
# 1. Pull the latest code
|
|
30
41
|
git pull origin main
|
|
31
42
|
|
|
32
|
-
# 2.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
# 3. Apply database migrations (skips already-applied ones)
|
|
36
|
-
uv run python scripts/db_migrate.py
|
|
43
|
+
# 2. Apply database migrations (skips already-applied ones)
|
|
44
|
+
bun scripts/db_migrate.ts
|
|
37
45
|
|
|
38
|
-
#
|
|
39
|
-
|
|
46
|
+
# 3. Redeploy RPC functions (safe to re-run)
|
|
47
|
+
bun scripts/db_deploy.ts
|
|
40
48
|
|
|
41
|
-
#
|
|
49
|
+
# 4. Build the web UI
|
|
42
50
|
cd frontend && npm install && npm run build && cd ..
|
|
43
51
|
|
|
44
|
-
#
|
|
52
|
+
# 5. Deploy Edge Functions (if using Supabase-hosted)
|
|
45
53
|
# Run from the project root (where supabase/ directory is)
|
|
46
54
|
npx supabase functions deploy cerefox-search
|
|
47
55
|
npx supabase functions deploy cerefox-ingest
|
|
@@ -50,16 +58,21 @@ npx supabase functions deploy cerefox-get-document
|
|
|
50
58
|
npx supabase functions deploy cerefox-list-versions
|
|
51
59
|
npx supabase functions deploy cerefox-get-audit-log
|
|
52
60
|
npx supabase functions deploy cerefox-metadata-search
|
|
61
|
+
npx supabase functions deploy cerefox-list-projects
|
|
53
62
|
npx supabase functions deploy cerefox-mcp
|
|
54
63
|
|
|
55
|
-
#
|
|
56
|
-
|
|
64
|
+
# 6. Restart the web UI
|
|
65
|
+
cerefox web
|
|
57
66
|
|
|
58
|
-
#
|
|
59
|
-
|
|
67
|
+
# 7. (Optional) Sync project docs to Cerefox knowledge base
|
|
68
|
+
bun scripts/sync_docs.ts
|
|
60
69
|
```
|
|
61
70
|
|
|
62
|
-
Steps 3
|
|
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).
|
|
63
76
|
|
|
64
77
|
## Verifying the Upgrade
|
|
65
78
|
|
|
@@ -67,10 +80,10 @@ After upgrading, verify the key components:
|
|
|
67
80
|
|
|
68
81
|
```bash
|
|
69
82
|
# Check migration status
|
|
70
|
-
|
|
83
|
+
bun scripts/db_migrate.ts --status
|
|
71
84
|
|
|
72
85
|
# Run unit tests (optional but recommended)
|
|
73
|
-
|
|
86
|
+
bun test
|
|
74
87
|
|
|
75
88
|
# Visit the web UI
|
|
76
89
|
open http://localhost:8000/app/
|
|
@@ -213,7 +226,7 @@ uv run python scripts/reindex_all.py --dry-run
|
|
|
213
226
|
uv run python scripts/reindex_all.py
|
|
214
227
|
|
|
215
228
|
# Or run directly via the CLI (same effect)
|
|
216
|
-
|
|
229
|
+
cerefox server reindex --all
|
|
217
230
|
```
|
|
218
231
|
|
|
219
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.
|
|
@@ -290,7 +303,7 @@ MCP clients pick up new tools automatically on the next connection.
|
|
|
290
303
|
|
|
291
304
|
### Upgrading to v0.1.1+ (from v0.1.0)
|
|
292
305
|
|
|
293
|
-
**Cloud-only embeddings**: Local embedders (mpnet, Ollama) were removed. If you were using a local embedder, switch to OpenAI or Fireworks AI and run `
|
|
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.
|
|
294
307
|
|
|
295
308
|
## AI Agent Integration After Upgrade
|
|
296
309
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cerefox/memory",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.1",
|
|
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",
|