ucn 3.8.9 → 3.8.10

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.
@@ -184,7 +184,7 @@ ucn [target] <command> [name] [--flags]
184
184
  | `--case-sensitive` | Case-sensitive text search (default: case-insensitive) |
185
185
  | `--exact` | Exact name match only in `find`/`typedef` (no substring) |
186
186
  | `--include-uncertain` | Include ambiguous/uncertain matches in `context`/`smart`/`about` |
187
- | `--show-confidence` | Show confidence scores (0.0–1.0) per caller/callee edge in `context`/`about` |
187
+ | `--no-confidence` | Hide confidence scores (shown by default) in `context`/`about` |
188
188
  | `--min-confidence=N` | Filter edges below confidence threshold (e.g., `--min-confidence=0.7` keeps only high-confidence edges) |
189
189
  | `--calls-only` | Only show call/test-case matches in `tests` (skip file-level results) |
190
190
  | `--add-param=<name>` | Add a parameter (`plan` command). Combine with `--default=<value>` |
package/cli/index.js CHANGED
@@ -112,7 +112,7 @@ function parseFlags(tokens) {
112
112
  decorator: getValueFlag('--decorator'),
113
113
  exported: tokens.includes('--exported'),
114
114
  unused: tokens.includes('--unused'),
115
- showConfidence: tokens.includes('--show-confidence'),
115
+ showConfidence: !tokens.includes('--no-confidence'),
116
116
  minConfidence: parseFloat(getValueFlag('--min-confidence') || '0') || 0,
117
117
  framework: getValueFlag('--framework'),
118
118
  };
@@ -141,7 +141,7 @@ const knownFlags = new Set([
141
141
  '--regex', '--no-regex', '--functions',
142
142
  '--max-lines', '--class-name', '--limit', '--max-files',
143
143
  '--type', '--param', '--receiver', '--returns', '--decorator', '--exported', '--unused',
144
- '--show-confidence', '--min-confidence',
144
+ '--show-confidence', '--no-confidence', '--min-confidence',
145
145
  '--framework'
146
146
  ]);
147
147
 
@@ -1127,7 +1127,7 @@ Common Flags:
1127
1127
  --class-name=X Scope to specific class (e.g., --class-name=Repository)
1128
1128
  --include-methods Include method calls (obj.fn) in caller/callee analysis
1129
1129
  --include-uncertain Include ambiguous/uncertain matches
1130
- --show-confidence Show confidence scores per caller/callee edge
1130
+ --no-confidence Hide confidence scores (shown by default)
1131
1131
  --min-confidence=N Filter edges below confidence threshold (0.0-1.0)
1132
1132
  --include-exported Include exported symbols in deadcode
1133
1133
  --no-regex Force plain text search (regex is default)
package/mcp/server.js CHANGED
@@ -114,7 +114,7 @@ const server = new McpServer({
114
114
  // TOOL HELPERS
115
115
  // ============================================================================
116
116
 
117
- const DEFAULT_OUTPUT_CHARS = 30000; // ~7.5K tokens — safe default for AI context
117
+ const DEFAULT_OUTPUT_CHARS = 10000; // ~2.5K tokens — compact default for AI agents
118
118
  const MAX_OUTPUT_CHARS = 100000; // hard ceiling even with max_chars override
119
119
 
120
120
  function toolResult(text, command, maxChars) {
@@ -253,7 +253,7 @@ server.registerTool(
253
253
  include_methods: z.boolean().optional().describe('Include obj.method() calls (default: true for about/trace)'),
254
254
  include_uncertain: z.boolean().optional().describe('Include uncertain/ambiguous matches'),
255
255
  min_confidence: z.number().optional().describe('Minimum confidence threshold (0.0-1.0) to filter caller/callee edges'),
256
- show_confidence: z.boolean().optional().describe('Show confidence scores and resolution evidence per edge'),
256
+ show_confidence: z.boolean().optional().describe('Show confidence scores per edge (default: true). Set false to hide.'),
257
257
  with_types: z.boolean().optional().describe('Include related type definitions in output'),
258
258
  detailed: z.boolean().optional().describe('Show full symbol listing per file'),
259
259
  exact: z.boolean().optional().describe('Exact name match only (no substring matching)'),
@@ -327,7 +327,7 @@ server.registerTool(
327
327
  return tr(output.formatAbout(result, {
328
328
  allHint: 'Repeat with all=true to show all.',
329
329
  methodsHint: 'Note: obj.method() callers/callees excluded. Use include_methods=true to include them.',
330
- showConfidence: ep.showConfidence,
330
+ showConfidence: ep.showConfidence !== false,
331
331
  }));
332
332
  }
333
333
 
@@ -337,7 +337,7 @@ server.registerTool(
337
337
  if (!ok) return tr(error); // context uses soft error (not toolError)
338
338
  const { text, expandable } = output.formatContext(ctx, {
339
339
  expandHint: 'Use expand command with item number to see code for any item.',
340
- showConfidence: ep.showConfidence,
340
+ showConfidence: ep.showConfidence !== false,
341
341
  });
342
342
  expandCacheInstance.save(index.root, ep.name, ep.file, expandable);
343
343
  return tr(text);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ucn",
3
- "version": "3.8.9",
3
+ "version": "3.8.10",
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",