ucn 3.8.0 → 3.8.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.
package/cli/index.js CHANGED
@@ -1034,7 +1034,7 @@ Usage:
1034
1034
  (Default output is text; add --json for machine-readable JSON)
1035
1035
 
1036
1036
  ═══════════════════════════════════════════════════════════════════════════════
1037
- UNDERSTAND CODE (UCN's strength - semantic analysis)
1037
+ UNDERSTAND CODE
1038
1038
  ═══════════════════════════════════════════════════════════════════════════════
1039
1039
  about <name> RECOMMENDED: Full picture (definition, callers, callees, tests, code)
1040
1040
  context <name> Who calls this + what it calls (numbered for expand)
package/core/output.js CHANGED
@@ -2302,10 +2302,12 @@ function formatCircularDeps(result) {
2302
2302
  lines.push(`Filtered to cycles involving: ${result.fileFilter}`);
2303
2303
  }
2304
2304
 
2305
+ const scannedCount = result.filesWithImports || result.totalFiles;
2306
+
2305
2307
  if (result.cycles.length === 0) {
2306
2308
  lines.push('');
2307
2309
  lines.push('No circular dependencies found.');
2308
- lines.push(`Scanned ${result.totalFiles} files.`);
2310
+ lines.push(`Scanned ${scannedCount} files with import relationships.`);
2309
2311
  return lines.join('\n');
2310
2312
  }
2311
2313
 
@@ -2318,7 +2320,7 @@ function formatCircularDeps(result) {
2318
2320
 
2319
2321
  lines.push('');
2320
2322
  const { totalCycles, filesInCycles } = result.summary;
2321
- lines.push(`Summary: ${totalCycles} circular dependency chain${totalCycles !== 1 ? 's' : ''} involving ${filesInCycles} file${filesInCycles !== 1 ? 's' : ''} out of ${result.totalFiles} total.`);
2323
+ lines.push(`Summary: ${totalCycles} circular dependency chain${totalCycles !== 1 ? 's' : ''} involving ${filesInCycles} file${filesInCycles !== 1 ? 's' : ''} (${scannedCount} files with imports scanned).`);
2322
2324
 
2323
2325
  return lines.join('\n');
2324
2326
  }
package/core/project.js CHANGED
@@ -2749,9 +2749,16 @@ class ProjectIndex {
2749
2749
 
2750
2750
  result.sort((a, b) => a.length - b.length || a.files[0].localeCompare(b.files[0]));
2751
2751
 
2752
+ // Count files that participate in import graph (have edges)
2753
+ let filesWithImports = 0;
2754
+ for (const [, targets] of this.importGraph) {
2755
+ if (targets && targets.length > 0) filesWithImports++;
2756
+ }
2757
+
2752
2758
  return {
2753
2759
  cycles: result,
2754
2760
  totalFiles: this.files.size,
2761
+ filesWithImports,
2755
2762
  fileFilter: fileFilter || undefined,
2756
2763
  summary: {
2757
2764
  totalCycles: result.length,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucn",
3
- "version": "3.8.0",
3
+ "version": "3.8.1",
4
4
  "mcpName": "io.github.mleoca/ucn",
5
5
  "description": "Code intelligence toolkit for AI agents — extract functions, trace call chains, find callers, detect dead code without reading entire files. Works as MCP server, CLI, or agent skill. Supports JS/TS, Python, Go, Rust, Java.",
6
6
  "main": "index.js",