nano-brain 2026.11.2115 → 2026.11.2201
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 +25 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -67,6 +67,31 @@ Bind a default workspace by appending `?workspace=<name-or-hash>` to the URL (e.
|
|
|
67
67
|
|
|
68
68
|
For OpenCode, you can bootstrap the current workspace with `npx @nano-step/nano-brain init -- opencode`. It installs a `/nano-brain` slash command that keeps the workspace config local at `.nanobrain/config.yml`.
|
|
69
69
|
|
|
70
|
+
## Upgrading
|
|
71
|
+
|
|
72
|
+
Schema migrations run automatically when `nano-brain serve` starts, or explicitly via `nano-brain db:migrate`.
|
|
73
|
+
|
|
74
|
+
When upgrading an existing pre-`v30` database to the normalized storage schema (~45%–77% smaller disk footprint via deduplicated `content_blobs`, `halfvec(768)` vectors, and interned graph/entity dictionaries):
|
|
75
|
+
|
|
76
|
+
1. **Prerequisite**: PostgreSQL must have **`pgvector >= 0.7.0`** (`halfvec` support). The bundled `pgvector/pgvector:pg17` Docker image already ships `0.8.2`; on self-hosted/managed Postgres, update the extension first if needed:
|
|
77
|
+
```sql
|
|
78
|
+
ALTER EXTENSION vector UPDATE;
|
|
79
|
+
```
|
|
80
|
+
2. **Stop the running daemon** before migrating so old `v29` background workers do not write during the table rewrite:
|
|
81
|
+
```bash
|
|
82
|
+
nano-brain stop
|
|
83
|
+
```
|
|
84
|
+
3. **(Recommended for multi-GB DBs) Back up & check temporary disk headroom**: Migration `00030` rebuilds tables atomically inside one transaction and temporarily needs ~30% free disk space (for ~1–3 minutes on multi-GB instances) before freeing the old tables:
|
|
85
|
+
```bash
|
|
86
|
+
pg_dump -Fc "$DATABASE_URL" -f nano-brain-pre-v30.dump
|
|
87
|
+
```
|
|
88
|
+
4. **Upgrade binary, run migration, and restart**:
|
|
89
|
+
```bash
|
|
90
|
+
npm install -g @nano-step/nano-brain@latest # or re-run install.sh
|
|
91
|
+
nano-brain db:migrate
|
|
92
|
+
nano-brain serve -d
|
|
93
|
+
```
|
|
94
|
+
|
|
70
95
|
---
|
|
71
96
|
|
|
72
97
|
## The agent workflow
|