projscan 0.14.0 → 0.16.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/README.md +5 -4
- package/dist/cli/_shared.js +2 -2
- package/dist/cli/_shared.js.map +1 -1
- package/dist/cli/commands/coupling.js +4 -0
- package/dist/cli/commands/coupling.js.map +1 -1
- package/dist/cli/commands/doctor.js +4 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/hotspots.js +4 -0
- package/dist/cli/commands/hotspots.js.map +1 -1
- package/dist/cli/commands/impact.d.ts +1 -0
- package/dist/cli/commands/impact.js +59 -0
- package/dist/cli/commands/impact.js.map +1 -0
- package/dist/cli/commands/review.js +4 -0
- package/dist/cli/commands/review.js.map +1 -1
- package/dist/cli/commands/search.js +6 -2
- package/dist/cli/commands/search.js.map +1 -1
- package/dist/cli/commands/watch.d.ts +1 -0
- package/dist/cli/commands/watch.js +58 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/index.js +4 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/core/ast.d.ts +8 -0
- package/dist/core/ast.js.map +1 -1
- package/dist/core/codeGraph.d.ts +16 -0
- package/dist/core/codeGraph.js +196 -0
- package/dist/core/codeGraph.js.map +1 -1
- package/dist/core/fileInspector.js +1 -0
- package/dist/core/fileInspector.js.map +1 -1
- package/dist/core/impact.d.ts +27 -0
- package/dist/core/impact.js +169 -0
- package/dist/core/impact.js.map +1 -0
- package/dist/core/searchIndex.d.ts +9 -0
- package/dist/core/searchIndex.js.map +1 -1
- package/dist/core/semanticSearch.d.ts +69 -2
- package/dist/core/semanticSearch.js +113 -55
- package/dist/core/semanticSearch.js.map +1 -1
- package/dist/core/watcher.d.ts +37 -0
- package/dist/core/watcher.js +126 -0
- package/dist/core/watcher.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools/impact.d.ts +2 -0
- package/dist/mcp/tools/impact.js +59 -0
- package/dist/mcp/tools/impact.js.map +1 -0
- package/dist/mcp/tools/search.js +9 -2
- package/dist/mcp/tools/search.js.map +1 -1
- package/dist/mcp/tools.js +2 -0
- package/dist/mcp/tools.js.map +1 -1
- package/dist/reporters/consoleReporter.d.ts +2 -1
- package/dist/reporters/consoleReporter.js +42 -1
- package/dist/reporters/consoleReporter.js.map +1 -1
- package/dist/reporters/htmlReporter.d.ts +8 -0
- package/dist/reporters/htmlReporter.js +287 -0
- package/dist/reporters/htmlReporter.js.map +1 -0
- package/dist/reporters/jsonReporter.d.ts +2 -1
- package/dist/reporters/jsonReporter.js +3 -0
- package/dist/reporters/jsonReporter.js.map +1 -1
- package/dist/reporters/markdownReporter.d.ts +2 -1
- package/dist/reporters/markdownReporter.js +35 -3
- package/dist/reporters/markdownReporter.js.map +1 -1
- package/dist/tool-manifest.json +40 -3
- package/dist/types.d.ts +48 -1
- package/package.json +2 -2
package/dist/tool-manifest.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projscan",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"mcpProtocolVersion": "2025-03-26",
|
|
5
|
-
"generatedAt": "2026-04-
|
|
6
|
-
"toolCount":
|
|
5
|
+
"generatedAt": "2026-04-30T20:20:22.001Z",
|
|
6
|
+
"toolCount": 20,
|
|
7
7
|
"tools": [
|
|
8
8
|
{
|
|
9
9
|
"name": "projscan_analyze",
|
|
@@ -395,6 +395,39 @@
|
|
|
395
395
|
]
|
|
396
396
|
}
|
|
397
397
|
},
|
|
398
|
+
{
|
|
399
|
+
"name": "projscan_impact",
|
|
400
|
+
"description": "Transitive blast-radius analysis. Given a `file` (repo-relative path), returns every file that transitively imports it, ranked by BFS distance (1 = direct importer). Given a `symbol` (export name), returns the symbol's definition file(s), the files that directly call it, and their transitive importers. Use this BEFORE renaming or deleting to see what breaks. Cycle-safe; depth-bounded by `max_distance` (default 10).",
|
|
401
|
+
"inputSchema": {
|
|
402
|
+
"type": "object",
|
|
403
|
+
"properties": {
|
|
404
|
+
"file": {
|
|
405
|
+
"type": "string",
|
|
406
|
+
"description": "Repo-relative file path. Mutually exclusive with `symbol`."
|
|
407
|
+
},
|
|
408
|
+
"symbol": {
|
|
409
|
+
"type": "string",
|
|
410
|
+
"description": "Symbol (export) name. Mutually exclusive with `file`."
|
|
411
|
+
},
|
|
412
|
+
"max_distance": {
|
|
413
|
+
"type": "number",
|
|
414
|
+
"description": "Maximum BFS hops from the target. Default 10. Reports `truncated: true` when exceeded."
|
|
415
|
+
},
|
|
416
|
+
"cursor": {
|
|
417
|
+
"type": "string",
|
|
418
|
+
"description": "Opaque cursor from a previous response."
|
|
419
|
+
},
|
|
420
|
+
"page_size": {
|
|
421
|
+
"type": "number",
|
|
422
|
+
"description": "Items per page (default 50, max 500)."
|
|
423
|
+
},
|
|
424
|
+
"max_tokens": {
|
|
425
|
+
"type": "number",
|
|
426
|
+
"description": "Cap response to roughly this many tokens."
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
},
|
|
398
431
|
{
|
|
399
432
|
"name": "projscan_search",
|
|
400
433
|
"description": "Ranked search across the project. Lexical (BM25) by default; optional semantic (vector) and hybrid (RRF fusion) modes available when the @xenova/transformers peer dependency is installed. Scope controls what to search: \"auto\"/\"content\" (ranked content matches with excerpts), \"symbols\" (exported names), \"files\" (path substring).",
|
|
@@ -424,6 +457,10 @@
|
|
|
424
457
|
"hybrid"
|
|
425
458
|
]
|
|
426
459
|
},
|
|
460
|
+
"sub_file": {
|
|
461
|
+
"type": "boolean",
|
|
462
|
+
"description": "0.15.0+: when true, build the semantic index per-function instead of per-file (where the language adapter extracted functions). Hits return a `function` field with name + line range. Ignored in lexical mode. Default false."
|
|
463
|
+
},
|
|
427
464
|
"limit": {
|
|
428
465
|
"type": "number",
|
|
429
466
|
"description": "Max matches returned (default 30)."
|
package/dist/types.d.ts
CHANGED
|
@@ -246,7 +246,7 @@ export interface DiffResult {
|
|
|
246
246
|
resolvedIssues: string[];
|
|
247
247
|
hotspotDiff?: HotspotDiffSummary;
|
|
248
248
|
}
|
|
249
|
-
export type ReportFormat = 'console' | 'json' | 'markdown' | 'sarif';
|
|
249
|
+
export type ReportFormat = 'console' | 'json' | 'markdown' | 'sarif' | 'html';
|
|
250
250
|
export type SemverDrift = 'patch' | 'minor' | 'major' | 'same' | 'unknown';
|
|
251
251
|
export interface OutdatedPackage {
|
|
252
252
|
name: string;
|
|
@@ -601,6 +601,47 @@ export interface ReviewReport {
|
|
|
601
601
|
/** One-line bullets explaining the verdict. */
|
|
602
602
|
summary: string[];
|
|
603
603
|
}
|
|
604
|
+
/**
|
|
605
|
+
* One reachable file in an impact analysis. `distance` is BFS-hops from the
|
|
606
|
+
* input target (1 = direct dependent, 2 = dependent-of-dependent, etc).
|
|
607
|
+
* `target` itself is not included in the reachable list.
|
|
608
|
+
*/
|
|
609
|
+
export interface ImpactNode {
|
|
610
|
+
file: string;
|
|
611
|
+
distance: number;
|
|
612
|
+
}
|
|
613
|
+
export interface ImpactReport {
|
|
614
|
+
available: boolean;
|
|
615
|
+
reason?: string;
|
|
616
|
+
/** What was queried. */
|
|
617
|
+
target: {
|
|
618
|
+
kind: 'file' | 'symbol';
|
|
619
|
+
value: string;
|
|
620
|
+
};
|
|
621
|
+
/**
|
|
622
|
+
* For symbol mode: every file the graph claims defines the symbol. Empty
|
|
623
|
+
* for file mode. Useful when an agent needs to know whether a name is
|
|
624
|
+
* defined in multiple places before treating impact as authoritative.
|
|
625
|
+
*/
|
|
626
|
+
definitionFiles: string[];
|
|
627
|
+
/**
|
|
628
|
+
* For symbol mode: files that directly call the symbol (their callSites
|
|
629
|
+
* contains the name). The reachable set is computed from these as roots.
|
|
630
|
+
* Empty for file mode.
|
|
631
|
+
*/
|
|
632
|
+
directCallers: string[];
|
|
633
|
+
/** Sorted by distance asc, then file asc. */
|
|
634
|
+
reachable: ImpactNode[];
|
|
635
|
+
/** Convenience count of reachable files (== reachable.length). */
|
|
636
|
+
totalReachable: number;
|
|
637
|
+
/**
|
|
638
|
+
* True when traversal hit `maxDistance` before exhausting the graph.
|
|
639
|
+
* Items beyond the limit are omitted from `reachable`.
|
|
640
|
+
*/
|
|
641
|
+
truncated: boolean;
|
|
642
|
+
/** The maxDistance value used for the traversal. */
|
|
643
|
+
maxDistance: number;
|
|
644
|
+
}
|
|
604
645
|
export interface FileInspection {
|
|
605
646
|
relativePath: string;
|
|
606
647
|
exists: boolean;
|
|
@@ -639,6 +680,12 @@ export interface FunctionDetail {
|
|
|
639
680
|
/** 1-based end line. */
|
|
640
681
|
endLine: number;
|
|
641
682
|
cyclomaticComplexity: number;
|
|
683
|
+
/**
|
|
684
|
+
* Approximate fan-in (0.15.0+): count of other files whose `callSites`
|
|
685
|
+
* include this function's bare name. Name-based and approximate; absent
|
|
686
|
+
* when the graph couldn't compute it.
|
|
687
|
+
*/
|
|
688
|
+
fanIn?: number;
|
|
642
689
|
}
|
|
643
690
|
export interface McpToolDefinition {
|
|
644
691
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projscan",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Agent-first code intelligence. MCP server (2025-03-26) with AST parsing for JavaScript, TypeScript, Python, Go, Java, and Ruby; code graph, file + per-function AST cyclomatic complexity, coupling + cycle detection, structural PR diff, one-call PR review (projscan_review), rule-driven fix suggestions (projscan_fix_suggest, projscan_explain_issue) closing the diagnose-fix loop, monorepo workspace awareness with cross-package import policy + per-package dependencies / outdated / audit, BM25 + optional semantic search, cursor pagination, progress notifications, context-budgeted output, and a stable-surface CI guard. CLI on the side.",
|
|
3
|
+
"version": "0.16.0",
|
|
4
|
+
"description": "Agent-first code intelligence. MCP server (2025-03-26) with AST parsing for JavaScript, TypeScript, Python, Go, Java, and Ruby; code graph, file + per-function AST cyclomatic complexity, per-function fan-in, coupling + cycle detection, structural PR diff, one-call PR review (projscan_review), rule-driven fix suggestions (projscan_fix_suggest, projscan_explain_issue) closing the diagnose-fix loop, transitive blast-radius analysis (projscan_impact for files and symbols), per-function semantic search chunks (sub-file embeddings), monorepo workspace awareness with cross-package import policy + per-package dependencies / outdated / audit, BM25 + optional semantic search, cursor pagination, progress notifications, context-budgeted output, and a stable-surface CI guard. CLI on the side.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|