Skip to content

Commit 82dccfa

Browse files
committed
feat: implement daemon mode for automatic file re-indexing
Adds a complete daemon mode that watches for file changes and automatically re-indexes modified files using upsert semantics. Key components: - WatchDaemon with start/stop lifecycle and signal handling - WatchSession connecting FileSystemWatcher with ProjectIndexer - HealthMonitor with circuit breaker pattern for SurrealDB resilience - PID file management for daemon lifecycle - Full index_single_file() pipeline with embeddings and edge handling - CLI commands: codegraph daemon start/stop/status Also fixes pre-existing issues in codegraph-parser experimental feature: - Lifetime issues in watcher.rs with tokio::spawn - Variable naming in semantic.rs - Type annotations in diff.rs
1 parent 35890e6 commit 82dccfa

File tree

17 files changed

+1939
-215
lines changed

17 files changed

+1939
-215
lines changed

Cargo.lock

Lines changed: 115 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/codegraph-mcp/Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ regex = { workspace = true }
4747
rayon = { workspace = true }
4848
num_cpus = { workspace = true }
4949

50+
# Pattern matching for daemon mode
51+
glob-match = "0.2"
52+
5053
# Internal dependencies
5154
codegraph-core = { workspace = true }
5255
codegraph-parser = { workspace = true }
@@ -83,6 +86,7 @@ path = "src/bin/codegraph-official.rs"
8386

8487
[features]
8588
default = []
89+
daemon = ["codegraph-parser/watcher-experimental"]
8690
embeddings = ["dep:codegraph-vector", "codegraph-vector/lmstudio-reranker"]
8791
embeddings-local = ["embeddings", "codegraph-vector/local-embeddings"]
8892
embeddings-openai = ["embeddings", "codegraph-vector/openai"]

0 commit comments

Comments
 (0)