rustcodegraph 1.1.3 → 1.2.0

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/CHANGELOG.md CHANGED
@@ -2,6 +2,32 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+
6
+ ## [1.2.0] - 2026-07-01
7
+
8
+ ### Fixes
9
+
10
+ - Fixed a tree-sitter AST conversion bug that could make `rustcodegraph watch` consume gigabytes of memory when syncing Rust files with chained calls or many nested syntax nodes.
11
+ - Fixed a watch starvation case where a large copy could leave thousands of pending file events stuck behind a stale high-memory reading, so no-op batches now clear normally and follow-up edits sync instead of waiting forever.
12
+ - `rustcodegraph sync` and terminal `rustcodegraph watch` now share the same incremental sync path, so manual and automatic refreshes stay consistent without rebuilding the whole project for every edit.
13
+ - Reduced memory and disk use when watching large projects: a single-file change no longer re-reads every source file in the project, so `rustcodegraph watch` stays lightweight on big repos.
14
+ - `rustcodegraph watch` no longer piles up back-to-back heavy syncs under bursts of rapid file changes, so a new batch waits for the previous one to finish and release its working memory before continuing. Tune with `RUSTCODEGRAPH_WATCH_MIN_SYNC_INTERVAL_MS`.
15
+ - `rustcodegraph watch` now keeps the graph up to date while a large folder is being copied in: previously the unbroken stream of file events could keep postponing the sync indefinitely, so changes were detected but never indexed. A maximum wait now guarantees the index catches up at a steady cadence even while files are still streaming in, tunable via `RUSTCODEGRAPH_WATCH_MAX_DEBOUNCE_MS`.
16
+ - `rustcodegraph watch` and MCP status messages now explain when files are waiting for the next batch sync, so longer watch windows no longer look like a stuck watcher or push agents back into file-reading fallbacks.
17
+ - `rustcodegraph watch` now reports the same added, modified, and removed file counts as `rustcodegraph sync`, and directory removals now trigger an automatic refresh even when the OS reports only the deleted directory path.
18
+
19
+ ## [1.1.5] - 2026-06-27
20
+
21
+ ### Fixes
22
+
23
+ - Published a maintenance release with the latest packaging and release workflow updates.
24
+
25
+ ## [1.1.4] - 2026-06-27
26
+
27
+ ### Fixes
28
+
29
+ - Published a maintenance release with the latest packaging and release workflow updates.
30
+
5
31
  ## [1.1.3] - 2026-06-27
6
32
 
7
33
  ### Fixes
@@ -25,3 +51,4 @@
25
51
  ### Fixes
26
52
 
27
53
  - Published a maintenance release with the latest packaging and release workflow updates.
54
+ [1.2.0]: https://github.com/hunzhiwange/rustcodegraph/releases/tag/v1.2.0
package/README.md CHANGED
@@ -94,7 +94,7 @@ rustcodegraph init -i
94
94
 
95
95
  ### 4. No more syncing!
96
96
 
97
- Auto-sync is enabled by default. RustCodeGraph watches the project and updates the graph on every file change while your agent edits code, or you add, modify, or delete files. **The index is never stale, and there is nothing to re-run.**
97
+ Auto-sync is enabled by default. RustCodeGraph watches the project and batches file changes into automatic graph updates while your agent edits code, or you add, modify, or delete files. During a batch window, CLI and MCP status call out the pending files so you know the graph is waiting for the next sync instead of silently drifting.
98
98
 
99
99
  ### Uninstall
100
100
 
@@ -236,7 +236,7 @@ RustCodeGraph cuts **tokens, tool calls, and wall-clock time on every repo** —
236
236
  | **Smart Context Building** | One tool call returns entry points, related symbols, and code snippets — no expensive exploration agents |
237
237
  | **Full-Text Search** | Find code by name instantly across your entire codebase, powered by FTS5 |
238
238
  | **Impact Analysis** | Trace callers, callees, and the full impact radius of any symbol before making changes |
239
- | **Always Fresh** | File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced auto-sync — the graph stays current as you code, zero config |
239
+ | **Batched Auto-Sync** | File watcher uses native OS events (FSEvents/inotify/ReadDirectoryChangesW) with debounced, memory-aware auto-sync — the graph catches up as you code and clearly reports pending batch windows |
240
240
  | **20+ Languages** | TypeScript, JavaScript, Python, Go, Rust, Java, C#, PHP, Ruby, C, C++, Objective-C, Swift, Kotlin, Scala, Dart, Lua, Luau, R, Svelte, Vue, Astro, Liquid, Pascal/Delphi |
241
241
  | **Framework-aware Routes** | Recognizes web-framework routing files and links URL patterns to their handlers across 17 frameworks |
242
242
  | **Mixed iOS / React Native / Expo** | Closes cross-language flows that static parsing misses: Swift ↔ ObjC bridging, React Native legacy bridge + TurboModules + Fabric view components, native → JS event emitters, Expo Modules |
@@ -247,23 +247,23 @@ RustCodeGraph cuts **tokens, tool calls, and wall-clock time on every repo** —
247
247
 
248
248
  When your agent (Claude Code, Cursor, Codex, opencode) launches `rustcodegraph serve --mcp`, three layers keep the index in step with your code — and make sure the agent never gets a silent wrong answer in the brief window between an edit and the next sync:
249
249
 
250
- 1. **File watcher with debounced auto-sync.** A native FSEvents / inotify / ReadDirectoryChangesW watcher captures every source-file create / modify / delete and triggers a re-index after a debounce window (default `2000ms`, tunable via `RUSTCODEGRAPH_WATCH_DEBOUNCE_MS`, clamped to `[100ms, 60s]`). Bursts of edits collapse into a single sync.
250
+ 1. **File watcher with debounced auto-sync.** A native FSEvents / inotify / ReadDirectoryChangesW watcher captures every source-file create / modify / delete and triggers a re-index after a debounce window (default `2000ms`, tunable via `RUSTCODEGRAPH_WATCH_DEBOUNCE_MS`, clamped to `[100ms, 60s]`). Bursts of edits collapse into a single sync — but a continuous stream that never pauses (copying a large folder in) can't postpone the sync forever: a maximum wait (`RUSTCODEGRAPH_WATCH_MAX_DEBOUNCE_MS`, default a few debounce windows, clamped to `60s`) forces the index to catch up at a steady cadence while files are still streaming in. Under heavy bursts the watcher also protects itself from running the process out of memory: it skips a sync's heavy re-parsing when memory is near a ceiling (the change stays pending and syncs once memory frees up) and enforces a minimum interval between back-to-back syncs. Both are tunable via `RUSTCODEGRAPH_WATCH_MEMORY_LIMIT_MB` (default `1024`) and `RUSTCODEGRAPH_WATCH_MIN_SYNC_INTERVAL_MS` (defaults to the debounce window, clamped to `60s`). For AI write storms or large generated batches, set `RUSTCODEGRAPH_WATCH_DEBOUNCE_MS=60000`, `RUSTCODEGRAPH_WATCH_MAX_DEBOUNCE_MS=60000`, and `RUSTCODEGRAPH_WATCH_MIN_SYNC_INTERVAL_MS=60000` to merge changes into roughly one sync per minute while the storm continues.
251
251
 
252
- 2. **Per-file staleness banner.** During the brief debounce window, MCP tool responses that would reference a still-pending file prepend a `⚠️` banner naming it and telling the agent to `Read` it directly. Pending files NOT referenced by the response surface as a small footer instead. Either way, the agent gets an explicit signal validated with Claude Code, where the agent literally says "Reading the file directly for the live content" before opening it.
252
+ 2. **Per-file staleness banner.** During a debounce or batch window, MCP tool responses that would reference a still-pending file prepend a `⚠️` banner naming it and explaining that the graph entry is waiting for the next batch sync. Pending files NOT referenced by the response surface as a small footer instead. Either way, the agent gets an explicit signal without being nudged back into a raw Read/Grep loop.
253
253
 
254
254
  3. **Connect-time catch-up.** When the MCP server (re)connects, RustCodeGraph runs a fast `(size, mtime)` + content-hash reconciliation against the working tree before answering the first query — so edits made while no MCP server was running (a `git pull` from the terminal, edits from another editor, a previous agent session that exited) get absorbed on the next session's first tool call.
255
255
 
256
256
  ```
257
257
  agent writes src/Widget.ts
258
258
  → watcher fires (<100ms)
259
- → debounce (default 2s)
259
+ → debounce / batch window (default 2s, configurable up to 60s)
260
260
  → sync; Widget.ts is in the index
261
261
  → next agent query sees it
262
262
  ```
263
263
 
264
- **Verify any time** with `rustcodegraph_status` (via MCP) or `rustcodegraph status` (CLI). If anything is pending, you'll see a `### Pending sync:` section naming the files and their edit age.
264
+ **Verify any time** with `rustcodegraph_status` (via MCP) or `rustcodegraph status` (CLI). If anything is pending, you'll see a `### Pending sync:` section naming the files, their edit age, and the fact that they are waiting for the next batch sync.
265
265
 
266
- The handful of cases where manual `rustcodegraph sync` makes sense: the watcher is disabled (sandboxed environments, or `RUSTCODEGRAPH_NO_DAEMON=1`), or you're scripting against the index outside an agent session and want a pre-flight sync at the start of your script.
266
+ The handful of cases where manual `rustcodegraph sync` makes sense: the watcher is disabled (sandboxed environments, or `RUSTCODEGRAPH_NO_DAEMON=1`), you want an immediate refresh before a long configured batch window expires, or you're scripting against the index outside an agent session and want a pre-flight sync at the start of your script.
267
267
 
268
268
  → Full deep-dive in [Guides → Indexing a Project](docs/user/guides/indexing.md#stay-fresh-automatically).
269
269
 
@@ -467,7 +467,7 @@ The exact text is `src/mcp/server_instructions.rs` — the single source of trut
467
467
 
468
468
  3. **Resolution** — After extraction, references are resolved: function calls → definitions, imports → source files, class inheritance, and framework-specific patterns.
469
469
 
470
- 4. **Auto-Sync** — The MCP server watches your project using native OS file events. Changes are debounced (2-second quiet window), filtered to source files only, and incrementally synced. The graph stays fresh as you code no configuration needed.
470
+ 4. **Auto-Sync** — The MCP server watches your project using native OS file events. Changes are debounced, filtered to source files only, and synced in memory-aware batches; pending files are reported while the watcher waits for the next batch sync.
471
471
 
472
472
  ---
473
473
 
@@ -23,7 +23,7 @@
23
23
  "hasInstallScript": true,
24
24
  "license": "MIT",
25
25
  "name": "rustcodegraph",
26
- "version": "1.1.3"
26
+ "version": "1.2.0"
27
27
  },
28
28
  "node_modules/@isaacs/balanced-match": {
29
29
  "engines": {
@@ -896,5 +896,5 @@
896
896
  }
897
897
  },
898
898
  "requires": true,
899
- "version": "1.1.3"
899
+ "version": "1.2.0"
900
900
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "artifactDownloadUrl": "https://github.com/hunzhiwange/rustcodegraph/releases/download/v1.1.3",
2
+ "artifactDownloadUrl": "https://github.com/hunzhiwange/rustcodegraph/releases/download/v1.2.0",
3
3
  "bin": {
4
4
  "rustcodegraph": "run-rustcodegraph.js"
5
5
  },
@@ -90,7 +90,7 @@
90
90
  "zipExt": ".tar.xz"
91
91
  }
92
92
  },
93
- "version": "1.1.3",
93
+ "version": "1.2.0",
94
94
  "volta": {
95
95
  "node": "18.14.1",
96
96
  "npm": "9.5.0"