ucn 3.7.37 → 3.7.38
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/core/registry.js +1 -0
- package/mcp/server.js +11 -8
- package/package.json +1 -1
package/core/registry.js
CHANGED
package/mcp/server.js
CHANGED
|
@@ -251,7 +251,9 @@ server.registerTool(
|
|
|
251
251
|
staged: z.boolean().optional().describe('Analyze staged changes (diff_impact command)'),
|
|
252
252
|
case_sensitive: z.boolean().optional().describe('Case-sensitive search (default: false, case-insensitive)'),
|
|
253
253
|
all: z.boolean().optional().describe('Show all results (expand truncated sections). Applies to about, toc, related, trace, and others.'),
|
|
254
|
-
top_level: z.boolean().optional().describe('Show only top-level functions in toc (exclude nested/indented)')
|
|
254
|
+
top_level: z.boolean().optional().describe('Show only top-level functions in toc (exclude nested/indented)'),
|
|
255
|
+
class_name: z.string().optional().describe('Class name to scope method analysis (e.g. "MarketDataFetcher" for close)')
|
|
256
|
+
|
|
255
257
|
})
|
|
256
258
|
},
|
|
257
259
|
async (args) => {
|
|
@@ -261,7 +263,7 @@ server.registerTool(
|
|
|
261
263
|
include_exported, include_decorated, calls_only, max_lines,
|
|
262
264
|
direction, term, add_param, remove_param, rename_to,
|
|
263
265
|
default_value, stack, item, range, base, staged,
|
|
264
|
-
case_sensitive, regex, functions, all, top_level } = args;
|
|
266
|
+
case_sensitive, regex, functions, all, top_level, class_name } = args;
|
|
265
267
|
|
|
266
268
|
try {
|
|
267
269
|
switch (command) {
|
|
@@ -274,7 +276,7 @@ server.registerTool(
|
|
|
274
276
|
|
|
275
277
|
case 'about': {
|
|
276
278
|
const index = getIndex(project_dir);
|
|
277
|
-
const ep = normalizeParams({ name, file, exclude, with_types, all, include_methods, include_uncertain, top });
|
|
279
|
+
const ep = normalizeParams({ name, file, exclude, with_types, all, include_methods, include_uncertain, top, class_name });
|
|
278
280
|
const { ok, result, error } = execute(index, 'about', ep);
|
|
279
281
|
if (!ok) return toolResult(error); // soft error — won't kill sibling calls
|
|
280
282
|
return toolResult(output.formatAbout(result, {
|
|
@@ -285,7 +287,7 @@ server.registerTool(
|
|
|
285
287
|
|
|
286
288
|
case 'context': {
|
|
287
289
|
const index = getIndex(project_dir);
|
|
288
|
-
const ep = normalizeParams({ name, file, exclude, include_methods, include_uncertain });
|
|
290
|
+
const ep = normalizeParams({ name, file, exclude, include_methods, include_uncertain, class_name });
|
|
289
291
|
const { ok, result: ctx, error } = execute(index, 'context', ep);
|
|
290
292
|
if (!ok) return toolResult(error); // context uses soft error (not toolError)
|
|
291
293
|
const { text, expandable } = output.formatContext(ctx, {
|
|
@@ -297,7 +299,7 @@ server.registerTool(
|
|
|
297
299
|
|
|
298
300
|
case 'impact': {
|
|
299
301
|
const index = getIndex(project_dir);
|
|
300
|
-
const ep = normalizeParams({ name, file, exclude, top });
|
|
302
|
+
const ep = normalizeParams({ name, file, exclude, top, class_name });
|
|
301
303
|
const { ok, result, error } = execute(index, 'impact', ep);
|
|
302
304
|
if (!ok) return toolResult(error); // soft error
|
|
303
305
|
return toolResult(output.formatImpact(result));
|
|
@@ -373,7 +375,7 @@ server.registerTool(
|
|
|
373
375
|
|
|
374
376
|
case 'search': {
|
|
375
377
|
const index = getIndex(project_dir);
|
|
376
|
-
const ep = normalizeParams({ term, exclude, include_tests, code_only, context: ctxLines, case_sensitive, in: inPath, regex });
|
|
378
|
+
const ep = normalizeParams({ term, exclude, include_tests, code_only, context: ctxLines, case_sensitive, in: inPath, regex, top });
|
|
377
379
|
const { ok, result, error } = execute(index, 'search', ep);
|
|
378
380
|
if (!ok) return toolResult(error); // soft error
|
|
379
381
|
return toolResult(output.formatSearch(result, term));
|
|
@@ -438,14 +440,15 @@ server.registerTool(
|
|
|
438
440
|
|
|
439
441
|
case 'verify': {
|
|
440
442
|
const index = getIndex(project_dir);
|
|
441
|
-
const
|
|
443
|
+
const ep = normalizeParams({ name, file, class_name });
|
|
444
|
+
const { ok, result, error } = execute(index, 'verify', ep);
|
|
442
445
|
if (!ok) return toolResult(error); // soft error
|
|
443
446
|
return toolResult(output.formatVerify(result));
|
|
444
447
|
}
|
|
445
448
|
|
|
446
449
|
case 'plan': {
|
|
447
450
|
const index = getIndex(project_dir);
|
|
448
|
-
const ep = normalizeParams({ name, add_param, remove_param, rename_to, default_value, file });
|
|
451
|
+
const ep = normalizeParams({ name, add_param, remove_param, rename_to, default_value, file, class_name });
|
|
449
452
|
const { ok, result, error } = execute(index, 'plan', ep);
|
|
450
453
|
if (!ok) return toolResult(error); // soft error
|
|
451
454
|
return toolResult(output.formatPlan(result));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ucn",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.38",
|
|
4
4
|
"mcpName": "io.github.mleoca/ucn",
|
|
5
5
|
"description": "Universal Code Navigator — AST-based call graph analysis for AI agents. Find callers, trace impact, detect dead code across JS/TS, Python, Go, Rust, Java, and HTML. CLI, MCP server, and agent skill.",
|
|
6
6
|
"main": "index.js",
|