@kage-core/kage-graph-mcp 2.2.6 → 2.2.7

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/dist/kernel.js +16 -4
  2. package/package.json +1 -1
package/dist/kernel.js CHANGED
@@ -8089,9 +8089,15 @@ function kageRisk(projectDir, targets = [], changedFiles = []) {
8089
8089
  const graph = readCurrentCodeGraph(projectDir) ?? buildCodeGraph(projectDir);
8090
8090
  const graphPaths = new Set(graph.files.map((file) => file.path));
8091
8091
  const dependents = codeDependents(graph);
8092
- const resolvedTargets = unique((targets.length ? targets : changedFiles.length ? changedFiles : gitChangedFiles(projectDir))
8092
+ const explicitTargets = targets.length > 0;
8093
+ const resolvedTargets = unique((explicitTargets ? targets : changedFiles.length ? changedFiles : gitChangedFiles(projectDir))
8093
8094
  .map((path) => gitPathToProjectRelative(projectDir, path) ?? path)
8094
- .filter((path) => path && !isNoisePath(path)));
8095
+ .filter((path) => path && !isNoisePath(path))
8096
+ // Risk is a CODE assessment. When inferring targets from the working tree,
8097
+ // keep only files the code graph actually knows about — memory packets,
8098
+ // dotfiles, and docs have no dependents/hotspot signal and are pure noise
8099
+ // here. Explicitly-named targets are always honored.
8100
+ .filter((path) => explicitTargets || graphPaths.has(path)));
8095
8101
  const warnings = [];
8096
8102
  if (!gitHead(projectDir))
8097
8103
  warnings.push("Git history is unavailable, so churn, ownership, and co-change signals may be empty.");
@@ -9204,9 +9210,15 @@ function renderClaudeMemAuditReceipt(report) {
9204
9210
  function kageReviewerSuggestions(projectDir, targets = [], changedFiles = []) {
9205
9211
  const graph = readCurrentCodeGraph(projectDir) ?? buildCodeGraph(projectDir);
9206
9212
  const graphPaths = new Set(graph.files.map((file) => file.path));
9207
- const resolvedTargets = unique((targets.length ? targets : changedFiles.length ? changedFiles : gitChangedFiles(projectDir))
9213
+ const explicitTargets = targets.length > 0;
9214
+ const resolvedTargets = unique((explicitTargets ? targets : changedFiles.length ? changedFiles : gitChangedFiles(projectDir))
9208
9215
  .map((path) => gitPathToProjectRelative(projectDir, path) ?? path)
9209
- .filter((path) => path && !isNoisePath(path)));
9216
+ .filter((path) => path && !isNoisePath(path))
9217
+ // Risk is a CODE assessment. When inferring targets from the working tree,
9218
+ // keep only files the code graph actually knows about — memory packets,
9219
+ // dotfiles, and docs have no dependents/hotspot signal and are pure noise
9220
+ // here. Explicitly-named targets are always honored.
9221
+ .filter((path) => explicitTargets || graphPaths.has(path)));
9210
9222
  const warnings = [];
9211
9223
  if (!gitHead(projectDir))
9212
9224
  warnings.push("Git history is unavailable, so reviewer suggestions cannot be computed.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kage-core/kage-graph-mcp",
3
- "version": "2.2.6",
3
+ "version": "2.2.7",
4
4
  "description": "Local-first repo memory, code graph, and recall MCP server for coding agents",
5
5
  "main": "dist/index.js",
6
6
  "files": [