You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 3f6969a
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: README.md
+34-6Lines changed: 34 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ The install script placed beside the binary is **reported, not deleted** — uni
201
201
-**Cypher-like queries**: `MATCH (f:Function)-[:CALLS]->(g) WHERE f.name = 'main' RETURN g.name`
202
202
203
203
### Search
204
-
-**Semantic search** (`semantic_query`): vector search across the entire graph, powered by bundled Nomic `nomic-embed-code` embeddings (40K tokens, 768d int8) compiled into the binary — no API key, no Ollama, no Docker. 11-signal combined scoring (TF-IDF, RRI, API/Type/Decorator signatures, AST profiles, data flow, Halstead-lite, MinHash, module proximity, graph diffusion).
204
+
-**Semantic search** (the `semantic_query` parameter of `search_graph`, not a separate tool): vector search across the entire graph, powered by bundled Nomic `nomic-embed-code` embeddings (40K tokens, 768d int8) compiled into the binary — no API key, no Ollama, no Docker. 11-signal combined scoring (TF-IDF, RRI, API/Type/Decorator signatures, AST profiles, data flow, Halstead-lite, MinHash, module proximity, graph diffusion).
205
205
-**BM25 full-text search** via SQLite FTS5 with `cbm_camel_split` tokenizer (camelCase / snake_case aware)
-**Code search** (`search_code`): graph-augmented grep over indexed files only
@@ -245,12 +245,12 @@ The install script placed beside the binary is **reported, not deleted** — uni
245
245
246
246
Commit a single compressed file to your repo and your teammates skip the reindex.
247
247
248
-
`.codebase-memory/graph.db.zst` is a zstd-compressed snapshot of the knowledge graph that lives next to your source. When you index, the artifact is written or refreshed; when a teammate clones the repo and runs `codebase-memory-mcp` for the first time, the artifact is decompressed and incremental indexing fills in their local diff.
248
+
`.codebase-memory/graph.db.zst` is a zstd-compressed snapshot of the knowledge graph that lives next to your source. The artifact is opt-in: `index_repository` writes it only with `persistence: true` (the default is `false`), and once it exists later indexes refresh it; when a teammate clones the repo and runs `codebase-memory-mcp` for the first time, the artifact is decompressed and incremental indexing fills in their local diff.
249
249
250
250
-**Format**: SQLite database, indexes stripped, `VACUUM INTO` compacted, then zstd 1.5.7 compressed (8–13:1 ratio typical)
251
251
-**Two tiers**:
252
-
-**Best** (`zstd -9` + index strip + `VACUUM INTO`) — written on explicit `index_repository`
253
-
-**Fast** (`zstd -3`) — written by the watcher for low-latency incremental updates
252
+
-**Best** (`zstd -9` + index strip + `VACUUM INTO`) — written by `index_repository` with `persistence: true`
253
+
-**Fast** (`zstd -3`) — refreshes an existing artifact on every other index (including the watcher's low-latency incremental updates)
254
254
-**Bootstrap**: when no local DB exists but the artifact is present, `index_repository` imports the artifact first, then runs incremental indexing — avoiding the full reindex cost
255
255
-**No merge pain**: a `.codebase-memory/.gitattributes` line with `merge=ours` is auto-created on first export, so concurrent edits don't produce conflicts on the binary artifact
256
256
-**Commit it deliberately**: the artifact is rewritten on every index, including the watcher's Fast tier, and git stores each rewrite as a full new blob. Committing every refresh is what turns a 20 MB file into gigabytes of history — one team reached ~6 GB across ~350 commits of this single path. Pick a cadence (a release, a milestone, a nightly job) rather than committing every save.
@@ -671,12 +671,39 @@ JSON arguments can also be piped on stdin, for tools that take arguments. A tool
671
671
672
672
| Tool | Description |
673
673
|------|-------------|
674
-
|`index_repository`| Index a repository into the graph. Auto-sync keeps it fresh after that. |
674
+
|`index_repository`| Index a repository into the graph. Auto-sync keeps it fresh after that. Waits for the whole index by default; pass `async: true` to start it in the daemon and return at once, then poll with `status: true` (see below). |
675
675
|`list_projects`| List all indexed projects with node/edge counts. |
676
676
|`delete_project`| Remove a project and all its graph data. |
677
677
|`index_status`| Check indexing status of a project. |
678
678
|`check_index_coverage`| Check whether exact paths or a scope are indexed and fresh. A clean result means no recorded gap, not proof of completeness. |
679
679
680
+
**Long indexes and client call deadlines.** A synchronous `index_repository` on a large
681
+
repository can take longer than an MCP client allows one tool call (some IDE clients give up
682
+
after a fixed deadline). When a client cancels or disconnects, the daemon cancels an index that
683
+
nobody else is waiting for, so retrying the same blocking call never finishes. Use the async
684
+
mode instead:
685
+
686
+
1.`index_repository(repo_path="/abs/path", async: true)` starts the index in the daemon (or
687
+
joins the one already running for that project) and returns immediately with
688
+
`state` (`queued`/`running`). The job keeps running even if the client cancels, times out or
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -230,6 +230,20 @@ process that should share one daemon must see the same value — set it in the
230
230
environment of your MCP client and your shell alike, or a CLI invocation without
231
231
it will coordinate through the default location instead.
232
232
233
+
**WSL2 and Windows drives (`/mnt/c`, `/mnt/e`, ...).** `CBM_CACHE_DIR` goes through
234
+
the same private-directory check. With WSL's default automount options, DrvFs
235
+
reports every directory as `0777` and ignores `chmod`, so a cache under
236
+
`/mnt/<drive>` is refused, and the refusal names this remedy. Either turn on
237
+
permission metadata in`/etc/wsl.conf`, then run `wsl --shutdown` and reopen WSL:
238
+
239
+
```ini
240
+
[automount]
241
+
options = "metadata,umask=22,fmask=11"
242
+
```
243
+
244
+
or keep the cache on the Linux filesystem (the default `~/.cache/codebase-memory-mcp`),
245
+
which is also much faster than a 9p-mounted Windows drive.
246
+
233
247
Environment used by daemon-owned components—such as diagnostics, daemon logging, and process-wide indexing resource limits—is captured from the first daemon-backed session that starts the daemon. Later sessions join the existing process and cannot replace those values. To change them, close every daemon-backed session, update the relevant agent configurations consistently, and restart a session. `CBM_ALLOWED_ROOT` remains session-specific, a conflicting `CBM_CACHE_DIR` is rejected, and one-shot CLI commands use their own current environment without starting the daemon.
0 commit comments