@nano-step/nano-brain 2026.5.2902 → 2026.5.2903

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.
Files changed (2) hide show
  1. package/README.md +12 -8
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -111,7 +111,9 @@ search:
111
111
 
112
112
  harvester:
113
113
  opencode:
114
- session_dir: "" # e.g., ~/.local/share/opencode/storage
114
+ db_root: "" # e.g., ~/.ai-sandbox/opencode-dbs (multi-DB, highest priority)
115
+ db_path: "" # e.g., ~/.local/share/opencode/opencode.db (single DB)
116
+ session_dir: "" # e.g., ~/.local/share/opencode/storage (legacy JSON)
115
117
  claudecode:
116
118
  enabled: false
117
119
  session_dir: ""
@@ -136,19 +138,19 @@ summarization:
136
138
  provider_url: "" # OpenAI-compatible endpoint, e.g. https://ai-proxy.example.com/v1
137
139
  api_key: "" # or set NANO_BRAIN_SUMMARIZE_API_KEY env var
138
140
  model: "nano-brain" # model name passed to the provider
139
- max_tokens: 4096 # max tokens per LLM completion
141
+ max_tokens: 8000 # max tokens per LLM completion
140
142
  concurrency: 3 # parallel map-phase LLM calls
141
- output_dir: "~/.nano-brain/summaries" # directory for .md summary files
142
143
  ```
143
144
 
144
145
  ### Session Summarization
145
146
 
146
147
  When `summarization.enabled: true`, nano-brain automatically generates structured markdown summaries of each harvested session using an OpenAI-compatible LLM provider. Summaries are:
147
148
 
148
- - Written as `.md` files to `output_dir` (`{source}_{title-slug}_{YYYY-MM-DD}.md`)
149
- - Stored in the vector DB under collection `session-summary` for semantic search
149
+ - Stored in PostgreSQL under collection `session-summary` for semantic search via the standard query/vsearch API (PG is the source of truth)
150
150
  - Idempotent — unchanged sessions are skipped; re-harvested sessions overwrite old summaries
151
151
 
152
+ > **Note**: as of `harvest-summary-only` (May 2026), summaries are no longer written to disk as `.md` files. The legacy `output_dir` YAML key is silently ignored for backward compat. Any pre-existing files under `~/.nano-brain/summaries/` are stale artifacts and can be safely deleted.
153
+
152
154
  **Quick setup with ai-proxy:**
153
155
 
154
156
  ```yaml
@@ -157,9 +159,8 @@ summarization:
157
159
  provider_url: "https://ai-proxy.example.com/v1"
158
160
  api_key: "" # set NANO_BRAIN_SUMMARIZE_API_KEY instead
159
161
  model: "claude-sonnet-4-5"
160
- max_tokens: 4096
162
+ max_tokens: 8000
161
163
  concurrency: 3
162
- output_dir: "~/.nano-brain/summaries"
163
164
  ```
164
165
 
165
166
  Or via environment variable:
@@ -176,7 +177,9 @@ Large sessions (100K+ tokens) are handled via map-reduce chunking — no session
176
177
  |----------|-------------|
177
178
  | `DATABASE_URL` | PostgreSQL connection string |
178
179
  | `VOYAGE_API_KEY` | Voyage AI API key |
179
- | `OPENCODE_STORAGE_DIR` | OpenCode session directory |
180
+ | `OPENCODE_DB_ROOT` | OpenCode per-project DB root directory (multi-DB mode) |
181
+ | `OPENCODE_DB_PATH` | OpenCode single SQLite database path |
182
+ | `OPENCODE_STORAGE_DIR` | OpenCode session directory (legacy) |
180
183
  | `NANO_BRAIN_SUMMARIZE_API_KEY` | API key for the summarization LLM provider |
181
184
  | `NANO_BRAIN_*` | Override any config (e.g., `NANO_BRAIN_SERVER_PORT=3100`) |
182
185
 
@@ -234,6 +237,7 @@ Workspace is passed in the JSON body for POST, query param for GET.
234
237
  | `nano-brain vsearch` | Vector similarity search |
235
238
  | `nano-brain collection add\|remove\|list` | Manage collections |
236
239
  | `nano-brain harvest` | Trigger session harvesting |
240
+ | `nano-brain cleanup-stale-raw [--dry-run]` | Delete pre-#192 raw OpenCode session docs superseded by summaries |
237
241
  | `nano-brain bench generate\|run\|compare\|stress` | Benchmarking suite |
238
242
  | `nano-brain db:migrate` | Run pending goose migrations |
239
243
  | `nano-brain db:migrate --from-v1 <path>` | Import V1 SQLite data |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nano-step/nano-brain",
3
- "version": "2026.5.2902",
3
+ "version": "2026.5.2903",
4
4
  "description": "Persistent memory and code intelligence for AI coding agents",
5
5
  "bin": {
6
6
  "nano-brain": "npm/run.js"