@nrafinia/csmesh 0.6.1 → 0.7.1

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 +19 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -107,7 +107,7 @@ In layered, enterprise .NET applications, **lexical text search (`grep`, `ripgre
107
107
 
108
108
  ## 📊 Empirical Benchmarks
109
109
 
110
- To quantify the real-world performance gains, `csmesh` was benchmarked against the standard AI agent workflow (**Ripgrep / `rg` + sequential file reads**) across a private 29-project .NET solution (**1,945 symbols, 5,164 edges**, measured 2026-09-21 on csmesh 0.6.0).
110
+ To quantify the real-world performance gains, `csmesh` was benchmarked against the standard AI agent workflow (**Ripgrep / `rg` + sequential file reads**) across a private 29-project .NET solution (**1,945 symbols, 5,328 edges**, measured 2026-09-23 on csmesh 0.7.0).
111
111
 
112
112
  The evaluation measured four critical dimensions:
113
113
  1. **Query & Execution Latency**: Raw tool execution time and total agent turnaround time.
@@ -300,10 +300,15 @@ csmesh index
300
300
 
301
301
  > [!TIP]
302
302
  > **Using source generators — or starting from a cold checkout?** A fresh clone resolves less
303
- > completely than a built one: package and framework types come from `bin/`, and generated sources
304
- > (Blazor/Razor, System.Text.Json, `[GeneratedRegex]`, `[LibraryImport]`, `[LoggerMessage]`, ...)
305
- > live under `obj/`. A plain build restores the references; the flags additionally write the
306
- > generated sources to disk where `csmesh` can read them:
303
+ > completely than a restored one: package types come from each project's
304
+ > `obj/project.assets.json`, and generated sources (Blazor/Razor, System.Text.Json,
305
+ > `[GeneratedRegex]`, `[LibraryImport]`, `[LoggerMessage]`, ...) live under `obj/`. Restore first
306
+ > so the assets files are on disk:
307
+ > ```bash
308
+ > dotnet restore
309
+ > csmesh index
310
+ > ```
311
+ > When the code uses source generators, build with the flags first so their output is on disk too:
307
312
  > ```bash
308
313
  > dotnet build --no-incremental -p:EmitCompilerGeneratedFiles=true
309
314
  > csmesh index
@@ -435,6 +440,13 @@ csmesh blast-radius Order.Status --budget 800
435
440
  csmesh blast PaymentService.Process --depth 2
436
441
  ```
437
442
 
443
+ `--writes` answers the narrower question "where is this written, not read". It returns only the sites whose edge carries the `Write` role, and takes one reverse interface hop so a write through an interface-typed reference is included and marked `[via-interface]`.
444
+ ```bash
445
+ csmesh blast-radius Order.Status --writes
446
+ ```
447
+
448
+ A member-access edge carries a role: `Read`, `Write`, `Subscribe` (an event `+=`/`-=`, which never counts as a write), or `Read|Write` for a compound assignment, `++`/`--` or a `ref`. `--writes` selects the edges with `Write`. Two things are deliberately not recorded: writes to a target with no source declaration (a property setter inherited from a package has no node to point at), and attribute named arguments, which are metadata rather than a body access.
449
+
438
450
  #### `csmesh entrypoints [filter]`
439
451
  Finds HTTP endpoints (`[HttpGet]`, `[HttpPost]`, Blazor `@page`), message handlers, consumers, and background services.
440
452
  ```bash
@@ -482,6 +494,8 @@ csmesh changes --calls --budget 1200
482
494
 
483
495
  #### `csmesh review [base]`
484
496
  The same structural comparison as `changes`, but against a named git revision instead of whatever the last index happened to see — the question a pull request or a CI gate actually asks. Defaults to the merge base with the remote's default branch, cached per commit so a second run is fast. `--accept` writes the current findings to `.csmesh/accepted.txt`; accepted findings stop being reported, and dead entries are pruned automatically once the base moves past them. Exits `5` when something unaccepted remains, so a pipeline can gate on it without parsing prose. When the index predates `HEAD` the comparison is refused rather than guessed at — exit `4`, or `64` for `--accept`, since findings from the wrong current side must not be written to the baseline.
497
+
498
+ The base revision is checked out into a clean worktree, but it is compiled against *this* working tree's built reference set — the runtime pack plus the working tree's `bin/` DLLs — not the checkout's empty `bin/`. Indexing it against its own tree would leave every package type unbound, drop the DI/MediatR/route edges those types produced and shift symbol keys, and review would report a false `5` on a tree that did not change. The cache is keyed on that reference set, so a base built by an older binary or against a changed `bin/` is rebuilt rather than reused. When a reference input changed in the range (`*.csproj`, `*.props`, `*.targets`, `*.sln`, `*.slnx`, `Directory.Packages.props`, `packages.lock.json`, `global.json`), review still reports normally and adds one warning line on stderr — a `reference_inputs_changed` field in `--json` — because the graph cannot see a dependency change as an edge.
485
499
  ```bash
486
500
  csmesh review # vs. the merge base with the default branch
487
501
  csmesh review origin/main --calls
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nrafinia/csmesh",
3
- "version": "0.6.1",
3
+ "version": "0.7.1",
4
4
  "description": "Structural code intelligence & call-graph engine for C# and .NET — built for AI coding agents under hard token budgets",
5
5
  "bin": {
6
6
  "csmesh": "./bin/run.js"