sigmap 2.5.0 → 2.6.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
@@ -25,15 +25,27 @@ Format: [Semantic Versioning](https://semver.org/)
25
25
 
26
26
  ---
27
27
 
28
- ## [2.5.0] — upcoming · [#14](https://github.com/manojmallick/sigmap/issues/14) · branch: `feat/v2.5-impact-layer`
28
+ ## [2.5.0] — 2026-04-05
29
29
 
30
- ### Planned additions
31
- - **`src/map/dep-graph.js`** reverse-dependency graph built from the existing import-graph analysis. `getImpacted(filePath, graph)` walks the graph via BFS/DFS and returns every file that transitively imports the given file.
32
- - **`src/map/impact.js`** `analyzeImpact(changedFiles, cwd)` `{ changed, impacted, totalFiles }`. Aggregates dep-graph traversal with optional signature lookup.
33
- - **`--impact <file>` CLI flag** — prints all files impacted by changing `<file>`, with their signatures. Supports `--impact --json` (machine-readable) and `--impact --depth <n>` (BFS depth limit).
34
- - **`get_impact` MCP tool** (9th tool) — `{ file: string, depth?: number }` list of impacted files + signatures, usable live in any MCP session.
35
- - **`impact` config key** — `{ depth: 0, includeSigs: true }` in `gen-context.config.json`.
36
- - **`test/integration/impact.test.js`** — 15 tests: direct deps, transitive deps, circular deps (no infinite loop), depth limit, unknown file returns `[]`, JSON output shape, MCP tool shape.
30
+ ### Added
31
+ - **Impact analysis layer** — `src/graph/impact.js` provides dependency impact analysis: `getImpact(changedFile, graph)` `{ changed, direct, transitive, tests, routes }`. Uses reverse dependency graph (BFS traversal) to find all files affected by a change.
32
+ - **`--impact <file>` CLI flag** prints all files impacted by changing `<file>`, with their signatures. Supports `--impact --json` (machine-readable output) and `--impact --depth <n>` (BFS depth limit).
33
+ - **`get_impact` MCP tool** — 9th MCP tool; accepts `{ file: string, depth?: number }` and returns list of impacted files + signatures, usable live in any MCP session.
34
+ - **Dependency graph builder** — `src/graph/builder.js` enhanced: `build(files, cwd)` now returns `{ forward, reverse }` maps; reverse map powers impact analysis.
35
+ - **Impact config** — `config.impact.depth` (default: unlimited) and `config.impact.includeSigs` (default: true) added to `src/config/defaults.js`.
36
+ - **`test/integration/impact.test.js`** — 20 integration tests: direct deps, transitive deps, circular dependency handling (no infinite loop), depth limit, unknown file returns empty, JSON output shape, MCP tool contract, formatImpact output.
37
+
38
+ ### Changed
39
+ - `src/mcp/server.js` version bumped to `2.5.0`.
40
+ - `src/mcp/tools.js` now includes `get_impact` tool definition (9th tool).
41
+ - `test/integration/mcp-server.test.js` updated to assert 9 tools.
42
+
43
+ ### Validation gate
44
+ - 21/21 extractor unit tests passed
45
+ - 22/22 integration suites passed (0 failures, including new `impact.test.js`)
46
+ - `--impact src/graph/impact.js` returns correct transitive dependencies
47
+ - MCP `tools/list` returns 9 tools
48
+ - No infinite loops on circular dependencies
37
49
 
38
50
  ---
39
51
 
package/gen-context.js CHANGED
@@ -4304,7 +4304,7 @@ const path = require('path');
4304
4304
  const os = require('os');
4305
4305
  const { execSync } = require('child_process');
4306
4306
 
4307
- const VERSION = '2.5.0';
4307
+ const VERSION = '2.6.0';
4308
4308
  const MARKER = '\n\n## Auto-generated signatures\n<!-- Updated by gen-context.js -->\n';
4309
4309
 
4310
4310
  function requireSourceOrBundled(key) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap",
3
- "version": "2.5.0",
3
+ "version": "2.6.0",
4
4
  "description": "Zero-dependency AI context engine — 97% token reduction. No npm install. Runs on Node 18+.",
5
5
  "main": "gen-context.js",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap-cli",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "description": "SigMap CLI wrapper — thin adapter for programmatic CLI invocation",
5
5
  "main": "index.js",
6
6
  "keywords": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sigmap-core",
3
- "version": "2.4.0",
3
+ "version": "2.6.0",
4
4
  "description": "SigMap core library — zero-dependency code signature extraction, retrieval, and security scanning",
5
5
  "main": "index.js",
6
6
  "keywords": [
package/src/mcp/server.js CHANGED
@@ -18,7 +18,7 @@ const { readContext, searchSignatures, getMap, createCheckpoint, getRouting, exp
18
18
 
19
19
  const SERVER_INFO = {
20
20
  name: 'sigmap',
21
- version: '2.5.0',
21
+ version: '2.6.0',
22
22
  description: 'SigMap MCP server — code signatures on demand',
23
23
  };
24
24