ts-knowledge-graph 0.1.2 → 0.1.6
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 +99 -41
- package/contribs/webview/README.md +83 -0
- package/contribs/webview/web/css/style.css +310 -0
- package/contribs/webview/web/index.html +109 -0
- package/contribs/webview/web/js/app.js +1249 -0
- package/contribs/webview/web/js_autogenerated/.gitignore +3 -0
- package/contribs/webview/web/js_autogenerated/kind_descriptions.js +39 -0
- package/contribs/webview/web/types/app_globals.d.ts +154 -0
- package/dist/benchmark/benchmark_stats.d.ts +41 -0
- package/dist/benchmark/benchmark_stats.d.ts.map +1 -0
- package/dist/benchmark/benchmark_stats.js +61 -0
- package/dist/benchmark/benchmark_stats.js.map +1 -0
- package/dist/benchmark/node_benchmark.d.ts +78 -0
- package/dist/benchmark/node_benchmark.d.ts.map +1 -0
- package/dist/benchmark/node_benchmark.js +112 -0
- package/dist/benchmark/node_benchmark.js.map +1 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +16 -4
- package/dist/cli.js.map +1 -1
- package/dist/cluster/cluster_weights.d.ts +20 -0
- package/dist/cluster/cluster_weights.d.ts.map +1 -0
- package/dist/cluster/cluster_weights.js +32 -0
- package/dist/cluster/cluster_weights.js.map +1 -0
- package/dist/cluster/community_detector.d.ts +61 -0
- package/dist/cluster/community_detector.d.ts.map +1 -0
- package/dist/cluster/community_detector.js +120 -0
- package/dist/cluster/community_detector.js.map +1 -0
- package/dist/cluster/community_labeler.d.ts +84 -0
- package/dist/cluster/community_labeler.d.ts.map +1 -0
- package/dist/cluster/community_labeler.js +194 -0
- package/dist/cluster/community_labeler.js.map +1 -0
- package/dist/cluster/graph_clusterer.d.ts +47 -0
- package/dist/cluster/graph_clusterer.d.ts.map +1 -0
- package/dist/cluster/graph_clusterer.js +126 -0
- package/dist/cluster/graph_clusterer.js.map +1 -0
- package/dist/commands/benchmark_command.d.ts +11 -0
- package/dist/commands/benchmark_command.d.ts.map +1 -0
- package/dist/commands/benchmark_command.js +94 -0
- package/dist/commands/benchmark_command.js.map +1 -0
- package/dist/commands/blast_radius_command.d.ts.map +1 -1
- package/dist/commands/blast_radius_command.js +7 -6
- package/dist/commands/blast_radius_command.js.map +1 -1
- package/dist/commands/cluster_command.d.ts +7 -0
- package/dist/commands/cluster_command.d.ts.map +1 -0
- package/dist/commands/cluster_command.js +55 -0
- package/dist/commands/cluster_command.js.map +1 -0
- package/dist/commands/command_helpers.d.ts +9 -4
- package/dist/commands/command_helpers.d.ts.map +1 -1
- package/dist/commands/command_helpers.js +13 -8
- package/dist/commands/command_helpers.js.map +1 -1
- package/dist/commands/cost_command.d.ts +13 -0
- package/dist/commands/cost_command.d.ts.map +1 -0
- package/dist/commands/cost_command.js +139 -0
- package/dist/commands/cost_command.js.map +1 -0
- package/dist/commands/{load.d.ts → enrich_command.d.ts} +3 -2
- package/dist/commands/enrich_command.d.ts.map +1 -0
- package/dist/commands/enrich_command.js +64 -0
- package/dist/commands/enrich_command.js.map +1 -0
- package/dist/commands/extract_command.d.ts.map +1 -1
- package/dist/commands/extract_command.js +12 -6
- package/dist/commands/extract_command.js.map +1 -1
- package/dist/commands/hotspots_command.d.ts +7 -0
- package/dist/commands/hotspots_command.d.ts.map +1 -0
- package/dist/commands/hotspots_command.js +68 -0
- package/dist/commands/hotspots_command.js.map +1 -0
- package/dist/commands/install_command.d.ts +15 -6
- package/dist/commands/install_command.d.ts.map +1 -1
- package/dist/commands/install_command.js +62 -25
- package/dist/commands/install_command.js.map +1 -1
- package/dist/commands/load_command.d.ts.map +1 -1
- package/dist/commands/load_command.js +20 -13
- package/dist/commands/load_command.js.map +1 -1
- package/dist/commands/neighbors_command.d.ts.map +1 -1
- package/dist/commands/neighbors_command.js +6 -5
- package/dist/commands/neighbors_command.js.map +1 -1
- package/dist/commands/references_command.d.ts.map +1 -1
- package/dist/commands/references_command.js +6 -5
- package/dist/commands/references_command.js.map +1 -1
- package/dist/commands/report_command.d.ts +16 -0
- package/dist/commands/report_command.d.ts.map +1 -0
- package/dist/commands/report_command.js +115 -0
- package/dist/commands/report_command.js.map +1 -0
- package/dist/commands/verify_command.d.ts +8 -0
- package/dist/commands/verify_command.d.ts.map +1 -0
- package/dist/commands/verify_command.js +57 -0
- package/dist/commands/verify_command.js.map +1 -0
- package/dist/commands/web_command.d.ts +27 -0
- package/dist/commands/web_command.d.ts.map +1 -1
- package/dist/commands/web_command.js +109 -3
- package/dist/commands/web_command.js.map +1 -1
- package/dist/commands/webview_command.d.ts +36 -0
- package/dist/commands/webview_command.d.ts.map +1 -0
- package/dist/commands/webview_command.js +186 -0
- package/dist/commands/webview_command.js.map +1 -0
- package/dist/enrich/cpu_profile.d.ts +160 -0
- package/dist/enrich/cpu_profile.d.ts.map +1 -0
- package/dist/enrich/cpu_profile.js +185 -0
- package/dist/enrich/cpu_profile.js.map +1 -0
- package/dist/enrich/runtime_enricher.d.ts +64 -0
- package/dist/enrich/runtime_enricher.d.ts.map +1 -0
- package/dist/enrich/runtime_enricher.js +98 -0
- package/dist/enrich/runtime_enricher.js.map +1 -0
- package/dist/enrich/runtime_join.d.ts +124 -0
- package/dist/enrich/runtime_join.d.ts.map +1 -0
- package/dist/enrich/runtime_join.js +270 -0
- package/dist/enrich/runtime_join.js.map +1 -0
- package/dist/extract/api_extractor.d.ts +24 -0
- package/dist/extract/api_extractor.d.ts.map +1 -0
- package/dist/extract/api_extractor.js +71 -0
- package/dist/extract/api_extractor.js.map +1 -0
- package/dist/extract/config_extractor.d.ts +22 -0
- package/dist/extract/config_extractor.d.ts.map +1 -0
- package/dist/extract/config_extractor.js +61 -0
- package/dist/extract/config_extractor.js.map +1 -0
- package/dist/extract/endpoint_extractor.d.ts +36 -0
- package/dist/extract/endpoint_extractor.d.ts.map +1 -0
- package/dist/extract/endpoint_extractor.js +117 -0
- package/dist/extract/endpoint_extractor.js.map +1 -0
- package/dist/extract/git_source.d.ts +23 -0
- package/dist/extract/git_source.d.ts.map +1 -0
- package/dist/extract/git_source.js +75 -0
- package/dist/extract/git_source.js.map +1 -0
- package/dist/extract/graph_builder.d.ts +8 -0
- package/dist/extract/graph_builder.d.ts.map +1 -1
- package/dist/extract/graph_builder.js +23 -1
- package/dist/extract/graph_builder.js.map +1 -1
- package/dist/extract/node_id.d.ts +16 -0
- package/dist/extract/node_id.d.ts.map +1 -1
- package/dist/extract/node_id.js +22 -0
- package/dist/extract/node_id.js.map +1 -1
- package/dist/extract/scope_resolver.d.ts +22 -0
- package/dist/extract/scope_resolver.d.ts.map +1 -0
- package/dist/extract/scope_resolver.js +53 -0
- package/dist/extract/scope_resolver.js.map +1 -0
- package/dist/extract/semantic_extractor.d.ts +25 -0
- package/dist/extract/semantic_extractor.d.ts.map +1 -1
- package/dist/extract/semantic_extractor.js +96 -2
- package/dist/extract/semantic_extractor.js.map +1 -1
- package/dist/extract/structural_extractor.d.ts +6 -0
- package/dist/extract/structural_extractor.d.ts.map +1 -1
- package/dist/extract/structural_extractor.js +22 -12
- package/dist/extract/structural_extractor.js.map +1 -1
- package/dist/project_root.d.ts +7 -0
- package/dist/project_root.d.ts.map +1 -0
- package/dist/project_root.js +9 -0
- package/dist/project_root.js.map +1 -0
- package/dist/query/graph_query.d.ts +269 -0
- package/dist/query/graph_query.d.ts.map +1 -1
- package/dist/query/graph_query.js +585 -11
- package/dist/query/graph_query.js.map +1 -1
- package/dist/report/graph_report.d.ts +51 -0
- package/dist/report/graph_report.d.ts.map +1 -0
- package/dist/report/graph_report.js +312 -0
- package/dist/report/graph_report.js.map +1 -0
- package/dist/report/pdf_renderer.d.ts +22 -0
- package/dist/report/pdf_renderer.d.ts.map +1 -0
- package/dist/report/pdf_renderer.js +54 -0
- package/dist/report/pdf_renderer.js.map +1 -0
- package/dist/report/report_data.d.ts +128 -0
- package/dist/report/report_data.d.ts.map +1 -0
- package/dist/report/report_data.js +191 -0
- package/dist/report/report_data.js.map +1 -0
- package/dist/schema/edge.d.ts +40 -5
- package/dist/schema/edge.d.ts.map +1 -1
- package/dist/schema/edge.js +73 -0
- package/dist/schema/edge.js.map +1 -1
- package/dist/schema/node.d.ts +20 -5
- package/dist/schema/node.d.ts.map +1 -1
- package/dist/schema/node.js +36 -0
- package/dist/schema/node.js.map +1 -1
- package/dist/schema/runtime_manifest.d.ts +36 -0
- package/dist/schema/runtime_manifest.d.ts.map +1 -0
- package/dist/schema/runtime_manifest.js +23 -0
- package/dist/schema/runtime_manifest.js.map +1 -0
- package/dist/schema/source_manifest.d.ts +30 -0
- package/dist/schema/source_manifest.d.ts.map +1 -0
- package/dist/schema/source_manifest.js +21 -0
- package/dist/schema/source_manifest.js.map +1 -0
- package/dist/store/jsonl_reader.d.ts +4 -0
- package/dist/store/jsonl_reader.d.ts.map +1 -1
- package/dist/store/jsonl_reader.js +13 -1
- package/dist/store/jsonl_reader.js.map +1 -1
- package/dist/store/jsonl_store.d.ts +2 -1
- package/dist/store/jsonl_store.d.ts.map +1 -1
- package/dist/store/jsonl_store.js +4 -1
- package/dist/store/jsonl_store.js.map +1 -1
- package/dist/store/kuzu_store.d.ts +59 -0
- package/dist/store/kuzu_store.d.ts.map +1 -1
- package/dist/store/kuzu_store.js +124 -5
- package/dist/store/kuzu_store.js.map +1 -1
- package/dist/store/output_folder.d.ts +43 -0
- package/dist/store/output_folder.d.ts.map +1 -0
- package/dist/store/output_folder.js +61 -0
- package/dist/store/output_folder.js.map +1 -0
- package/dist/verify/project_verifier.d.ts +85 -0
- package/dist/verify/project_verifier.d.ts.map +1 -0
- package/dist/verify/project_verifier.js +138 -0
- package/dist/verify/project_verifier.js.map +1 -0
- package/dotclaude_folder/commands/code-graph-interview.md +123 -0
- package/dotclaude_folder/commands/code-graph-optimize.md +65 -0
- package/{skills/ts-knowledge-graph → dotclaude_folder/skills/code-graph-query}/SKILL.md +6 -6
- package/package.json +99 -10
- package/.env-sample +0 -34
- package/contribs/web_visualisation/README.md +0 -55
- package/contribs/web_visualisation/web/css/style.css +0 -115
- package/contribs/web_visualisation/web/data/.gitignore +0 -2
- package/contribs/web_visualisation/web/index.html +0 -58
- package/contribs/web_visualisation/web/js/app.js +0 -364
- package/dist/agent/agent-tools.d.ts +0 -13
- package/dist/agent/agent-tools.d.ts.map +0 -1
- package/dist/agent/agent-tools.js +0 -153
- package/dist/agent/agent-tools.js.map +0 -1
- package/dist/agent/agent_tools.d.ts +0 -13
- package/dist/agent/agent_tools.d.ts.map +0 -1
- package/dist/agent/agent_tools.js +0 -153
- package/dist/agent/agent_tools.js.map +0 -1
- package/dist/agent/code-editor.d.ts +0 -18
- package/dist/agent/code-editor.d.ts.map +0 -1
- package/dist/agent/code-editor.js +0 -43
- package/dist/agent/code-editor.js.map +0 -1
- package/dist/agent/code_editor.d.ts +0 -18
- package/dist/agent/code_editor.d.ts.map +0 -1
- package/dist/agent/code_editor.js +0 -43
- package/dist/agent/code_editor.js.map +0 -1
- package/dist/agent/optimizer-agent.d.ts +0 -30
- package/dist/agent/optimizer-agent.d.ts.map +0 -1
- package/dist/agent/optimizer-agent.js +0 -97
- package/dist/agent/optimizer-agent.js.map +0 -1
- package/dist/agent/optimizer_agent.d.ts +0 -30
- package/dist/agent/optimizer_agent.d.ts.map +0 -1
- package/dist/agent/optimizer_agent.js +0 -97
- package/dist/agent/optimizer_agent.js.map +0 -1
- package/dist/agent/verifier.d.ts +0 -9
- package/dist/agent/verifier.d.ts.map +0 -1
- package/dist/agent/verifier.js +0 -19
- package/dist/agent/verifier.js.map +0 -1
- package/dist/commands/blast-radius.d.ts +0 -5
- package/dist/commands/blast-radius.d.ts.map +0 -1
- package/dist/commands/blast-radius.js +0 -18
- package/dist/commands/blast-radius.js.map +0 -1
- package/dist/commands/blast_radius.d.ts +0 -5
- package/dist/commands/blast_radius.d.ts.map +0 -1
- package/dist/commands/blast_radius.js +0 -18
- package/dist/commands/blast_radius.js.map +0 -1
- package/dist/commands/calls.d.ts +0 -5
- package/dist/commands/calls.d.ts.map +0 -1
- package/dist/commands/calls.js +0 -7
- package/dist/commands/calls.js.map +0 -1
- package/dist/commands/command-helpers.d.ts +0 -15
- package/dist/commands/command-helpers.d.ts.map +0 -1
- package/dist/commands/command-helpers.js +0 -61
- package/dist/commands/command-helpers.js.map +0 -1
- package/dist/commands/dead-exports.d.ts +0 -5
- package/dist/commands/dead-exports.d.ts.map +0 -1
- package/dist/commands/dead-exports.js +0 -7
- package/dist/commands/dead-exports.js.map +0 -1
- package/dist/commands/dead_exports.d.ts +0 -5
- package/dist/commands/dead_exports.d.ts.map +0 -1
- package/dist/commands/dead_exports.js +0 -7
- package/dist/commands/dead_exports.js.map +0 -1
- package/dist/commands/extract.d.ts +0 -8
- package/dist/commands/extract.d.ts.map +0 -1
- package/dist/commands/extract.js +0 -49
- package/dist/commands/extract.js.map +0 -1
- package/dist/commands/find.d.ts +0 -5
- package/dist/commands/find.d.ts.map +0 -1
- package/dist/commands/find.js +0 -7
- package/dist/commands/find.js.map +0 -1
- package/dist/commands/load.d.ts.map +0 -1
- package/dist/commands/load.js +0 -28
- package/dist/commands/load.js.map +0 -1
- package/dist/commands/neighbors.d.ts +0 -5
- package/dist/commands/neighbors.d.ts.map +0 -1
- package/dist/commands/neighbors.js +0 -17
- package/dist/commands/neighbors.js.map +0 -1
- package/dist/commands/optimize.d.ts +0 -6
- package/dist/commands/optimize.d.ts.map +0 -1
- package/dist/commands/optimize.js +0 -59
- package/dist/commands/optimize.js.map +0 -1
- package/dist/commands/optimize_command.d.ts +0 -6
- package/dist/commands/optimize_command.d.ts.map +0 -1
- package/dist/commands/optimize_command.js +0 -59
- package/dist/commands/optimize_command.js.map +0 -1
- package/dist/commands/references.d.ts +0 -5
- package/dist/commands/references.d.ts.map +0 -1
- package/dist/commands/references.js +0 -17
- package/dist/commands/references.js.map +0 -1
- package/dist/commands/web.d.ts +0 -19
- package/dist/commands/web.d.ts.map +0 -1
- package/dist/commands/web.js +0 -120
- package/dist/commands/web.js.map +0 -1
- package/dist/commands/who-calls.d.ts +0 -5
- package/dist/commands/who-calls.d.ts.map +0 -1
- package/dist/commands/who-calls.js +0 -7
- package/dist/commands/who-calls.js.map +0 -1
- package/dist/commands/who_calls.d.ts +0 -5
- package/dist/commands/who_calls.d.ts.map +0 -1
- package/dist/commands/who_calls.js +0 -7
- package/dist/commands/who_calls.js.map +0 -1
- package/dist/extract/graph-builder.d.ts +0 -16
- package/dist/extract/graph-builder.d.ts.map +0 -1
- package/dist/extract/graph-builder.js +0 -39
- package/dist/extract/graph-builder.js.map +0 -1
- package/dist/extract/node-id.d.ts +0 -8
- package/dist/extract/node-id.d.ts.map +0 -1
- package/dist/extract/node-id.js +0 -22
- package/dist/extract/node-id.js.map +0 -1
- package/dist/extract/project-loader.d.ts +0 -5
- package/dist/extract/project-loader.d.ts.map +0 -1
- package/dist/extract/project-loader.js +0 -19
- package/dist/extract/project-loader.js.map +0 -1
- package/dist/extract/semantic-extractor.d.ts +0 -22
- package/dist/extract/semantic-extractor.d.ts.map +0 -1
- package/dist/extract/semantic-extractor.js +0 -254
- package/dist/extract/semantic-extractor.js.map +0 -1
- package/dist/extract/structural-extractor.d.ts +0 -18
- package/dist/extract/structural-extractor.d.ts.map +0 -1
- package/dist/extract/structural-extractor.js +0 -97
- package/dist/extract/structural-extractor.js.map +0 -1
- package/dist/query/graph-query.d.ts +0 -28
- package/dist/query/graph-query.d.ts.map +0 -1
- package/dist/query/graph-query.js +0 -93
- package/dist/query/graph-query.js.map +0 -1
- package/dist/store/jsonl-reader.d.ts +0 -11
- package/dist/store/jsonl-reader.d.ts.map +0 -1
- package/dist/store/jsonl-reader.js +0 -19
- package/dist/store/jsonl-reader.js.map +0 -1
- package/dist/store/jsonl-store.d.ts +0 -7
- package/dist/store/jsonl-store.d.ts.map +0 -1
- package/dist/store/jsonl-store.js +0 -13
- package/dist/store/jsonl-store.js.map +0 -1
- package/dist/store/kuzu-store.d.ts +0 -14
- package/dist/store/kuzu-store.d.ts.map +0 -1
- package/dist/store/kuzu-store.js +0 -52
- package/dist/store/kuzu-store.js.map +0 -1
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { GraphQuery } from '../query/graph_query.js';
|
|
2
|
+
import { SourceManifest } from '../schema/source_manifest.js';
|
|
3
|
+
import { KuzuStore } from '../store/kuzu_store.js';
|
|
4
|
+
/** A graph symbol reduced to the fields every report section renders. */
|
|
5
|
+
export type ReportSymbol = {
|
|
6
|
+
name: string;
|
|
7
|
+
kind: string;
|
|
8
|
+
filePath: string;
|
|
9
|
+
startLine: number;
|
|
10
|
+
};
|
|
11
|
+
/** A {@link ReportSymbol} carrying the score it earned in a ranking. */
|
|
12
|
+
export type RankedSymbol = ReportSymbol & {
|
|
13
|
+
score: number;
|
|
14
|
+
};
|
|
15
|
+
/** A {@link ReportSymbol} carrying its propagated cost, for the runtime sections. */
|
|
16
|
+
export type ReportCostNode = ReportSymbol & {
|
|
17
|
+
selfCost: number;
|
|
18
|
+
inclusiveCost: number;
|
|
19
|
+
shareOfTotal: number;
|
|
20
|
+
cyclic: boolean;
|
|
21
|
+
cycleSize: number;
|
|
22
|
+
};
|
|
23
|
+
/** One row of the composition tables: a node or edge kind and how many carry it. */
|
|
24
|
+
export type KindCount = {
|
|
25
|
+
kind: string;
|
|
26
|
+
count: number;
|
|
27
|
+
};
|
|
28
|
+
/** A detected community, named by its label and sized by its membership. */
|
|
29
|
+
export type ReportCommunity = {
|
|
30
|
+
label: string;
|
|
31
|
+
size: number;
|
|
32
|
+
};
|
|
33
|
+
/** One call cycle: the strongly-connected component's size and its members. */
|
|
34
|
+
export type ReportCycle = {
|
|
35
|
+
size: number;
|
|
36
|
+
members: ReportSymbol[];
|
|
37
|
+
};
|
|
38
|
+
/** The system-level surface area: routes handled, configuration read, hosts called. */
|
|
39
|
+
export type ReportBoundary = {
|
|
40
|
+
endpoints: ReportSymbol[];
|
|
41
|
+
configFlags: ReportSymbol[];
|
|
42
|
+
externalApis: ReportSymbol[];
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* The static-call-graph view set against the runtime profile. `orchestrators`
|
|
46
|
+
* carry cost but spend ~none themselves; `hiddenHotspots` are hot yet have few
|
|
47
|
+
* callers; `alignedCore` are both central and hot. Empty on an un-enriched graph.
|
|
48
|
+
*/
|
|
49
|
+
export type StructureVsRuntime = {
|
|
50
|
+
orchestrators: ReportSymbol[];
|
|
51
|
+
hiddenHotspots: ReportSymbol[];
|
|
52
|
+
alignedCore: ReportSymbol[];
|
|
53
|
+
};
|
|
54
|
+
/** The complete, format-agnostic data a {@link GraphReport} renders. */
|
|
55
|
+
export type GraphReportData = {
|
|
56
|
+
generatedAt: string;
|
|
57
|
+
project: string;
|
|
58
|
+
outputFolder: string;
|
|
59
|
+
provenance: SourceManifest | null;
|
|
60
|
+
semantic: boolean;
|
|
61
|
+
enriched: boolean;
|
|
62
|
+
coverage: number | null;
|
|
63
|
+
totalSelf: number;
|
|
64
|
+
limit: number;
|
|
65
|
+
totals: {
|
|
66
|
+
symbols: number;
|
|
67
|
+
files: number;
|
|
68
|
+
relationships: number;
|
|
69
|
+
communities: number;
|
|
70
|
+
deadExports: number;
|
|
71
|
+
cycles: number;
|
|
72
|
+
};
|
|
73
|
+
verdict: string;
|
|
74
|
+
nodeKinds: KindCount[];
|
|
75
|
+
edgeKinds: KindCount[];
|
|
76
|
+
hubsByCallers: RankedSymbol[];
|
|
77
|
+
hubsByBlastRadius: RankedSymbol[];
|
|
78
|
+
communityQuality: number | null;
|
|
79
|
+
communities: ReportCommunity[];
|
|
80
|
+
hotspots: RankedSymbol[];
|
|
81
|
+
cost: ReportCostNode[];
|
|
82
|
+
structureVsRuntime: StructureVsRuntime;
|
|
83
|
+
cycles: ReportCycle[];
|
|
84
|
+
boundary: ReportBoundary;
|
|
85
|
+
deadExports: ReportSymbol[];
|
|
86
|
+
};
|
|
87
|
+
export type GatherOptions = {
|
|
88
|
+
/** ISO date (YYYY-MM-DD) the command stamps; passed in so gathering stays pure of the clock. */
|
|
89
|
+
generatedAt: string;
|
|
90
|
+
/** Fallback project label when the graph records no source provenance. */
|
|
91
|
+
project: string;
|
|
92
|
+
/** The output folder, echoed into the copy-pasteable "where to go next" commands. */
|
|
93
|
+
outputFolder: string;
|
|
94
|
+
/** Top-N kept per ranking. */
|
|
95
|
+
limit: number;
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Gathers a {@link GraphReportData} from a loaded graph, reusing the existing
|
|
99
|
+
* query surface (`hotspots`, `costRanking`, `deadExports`, `strongCycles`) plus a
|
|
100
|
+
* few direct reads for composition and communities. Mirrors how the other
|
|
101
|
+
* commands lean on {@link GraphQuery}; the rendering is left entirely to
|
|
102
|
+
* {@link GraphReport}, so this stays presentation-free apart from the one-line
|
|
103
|
+
* verdict it synthesises.
|
|
104
|
+
*/
|
|
105
|
+
export declare class ReportData {
|
|
106
|
+
static gather(store: KuzuStore, query: GraphQuery, options: GatherOptions): Promise<GraphReportData>;
|
|
107
|
+
private static edgeKindCounts;
|
|
108
|
+
private static nodeKindCounts;
|
|
109
|
+
private static countBy;
|
|
110
|
+
/** Groups nodes by their assigned community index, labelled and sized, largest first. */
|
|
111
|
+
private static communitiesOf;
|
|
112
|
+
private static boundaryOf;
|
|
113
|
+
/**
|
|
114
|
+
* Splits the measured graph into three reads of the same symbols: pure
|
|
115
|
+
* orchestrators (cost flows through, ~no self cost), hidden hotspots (hot, few
|
|
116
|
+
* callers), and the aligned core (central and hot).
|
|
117
|
+
*/
|
|
118
|
+
private static synthesize;
|
|
119
|
+
private static readProvenance;
|
|
120
|
+
private static readCommunityQuality;
|
|
121
|
+
/** Derives `owner/repo` from the recorded GitHub base URL, falling back to the given label. */
|
|
122
|
+
private static projectName;
|
|
123
|
+
private static verdictOf;
|
|
124
|
+
private static toRanked;
|
|
125
|
+
private static toCostNode;
|
|
126
|
+
private static toSymbol;
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=report_data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_data.d.ts","sourceRoot":"","sources":["../../src/report/report_data.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AAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,qFAAqF;IACrF,YAAY,EAAE,MAAM,CAAC;IACrB,8BAA8B;IAC9B,KAAK,EAAE,MAAM,CAAC;CACd,CAAC;AAQF;;;;;;;GAOG;AACH,qBAAa,UAAU;WACT,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,eAAe,CAAC;mBAyDrF,cAAc;IAKnC,OAAO,CAAC,MAAM,CAAC,cAAc;IAI7B,OAAO,CAAC,MAAM,CAAC,OAAO;IAUtB,yFAAyF;IACzF,OAAO,CAAC,MAAM,CAAC,aAAa;IAmB5B,OAAO,CAAC,MAAM,CAAC,UAAU;IAKzB;;;;OAIG;IACH,OAAO,CAAC,MAAM,CAAC,UAAU;mBAgBJ,cAAc;mBASd,oBAAoB;IASzC,+FAA+F;IAC/F,OAAO,CAAC,MAAM,CAAC,WAAW;IAY1B,OAAO,CAAC,MAAM,CAAC,SAAS;IAgBxB,OAAO,CAAC,MAAM,CAAC,QAAQ;IAIvB,OAAO,CAAC,MAAM,CAAC,UAAU;IAczB,OAAO,CAAC,MAAM,CAAC,QAAQ;CAGvB"}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
import { CLUSTERING_MANIFEST_KEY, COMMUNITY_LABEL_METADATA_KEY, COMMUNITY_METADATA_KEY } from '../cluster/graph_clusterer.js';
|
|
2
|
+
import { SOURCE_MANIFEST_KEY, SourceManifestSchema } from '../schema/source_manifest.js';
|
|
3
|
+
/** How many callers a symbol may have and still count as a "hidden" hotspot. */
|
|
4
|
+
const HIDDEN_HOTSPOT_MAX_CALLERS = 1;
|
|
5
|
+
/** A large bound used to read whole rankings before slicing them to `limit`. */
|
|
6
|
+
const UNBOUNDED = 100000;
|
|
7
|
+
/**
|
|
8
|
+
* Gathers a {@link GraphReportData} from a loaded graph, reusing the existing
|
|
9
|
+
* query surface (`hotspots`, `costRanking`, `deadExports`, `strongCycles`) plus a
|
|
10
|
+
* few direct reads for composition and communities. Mirrors how the other
|
|
11
|
+
* commands lean on {@link GraphQuery}; the rendering is left entirely to
|
|
12
|
+
* {@link GraphReport}, so this stays presentation-free apart from the one-line
|
|
13
|
+
* verdict it synthesises.
|
|
14
|
+
*/
|
|
15
|
+
export class ReportData {
|
|
16
|
+
static async gather(store, query, options) {
|
|
17
|
+
const nodes = await store.readNodes();
|
|
18
|
+
const edgeKinds = await ReportData.edgeKindCounts(store);
|
|
19
|
+
const provenance = await ReportData.readProvenance(store);
|
|
20
|
+
const communityQuality = await ReportData.readCommunityQuality(store);
|
|
21
|
+
const callers = await query.hotspots({ by: 'callers', limit: UNBOUNDED });
|
|
22
|
+
const blast = await query.hotspots({ by: 'blast-radius', limit: UNBOUNDED });
|
|
23
|
+
const selfTime = await query.hotspots({ by: 'self-time', limit: UNBOUNDED });
|
|
24
|
+
const costReport = await query.costRanking({ limit: UNBOUNDED });
|
|
25
|
+
const deadExports = await query.deadExports();
|
|
26
|
+
const cycles = await query.strongCycles();
|
|
27
|
+
const limit = options.limit;
|
|
28
|
+
const enriched = costReport.enriched;
|
|
29
|
+
const measured = enriched === true && selfTime.fellBack === false;
|
|
30
|
+
const semantic = edgeKinds.some((entry) => entry.kind === 'CALLS' && entry.count > 0);
|
|
31
|
+
const fanIn = new Map(callers.hotspots.map((hotspot) => [hotspot.id, hotspot.score]));
|
|
32
|
+
const communities = ReportData.communitiesOf(nodes);
|
|
33
|
+
const data = {
|
|
34
|
+
generatedAt: options.generatedAt,
|
|
35
|
+
project: ReportData.projectName(provenance, options.project),
|
|
36
|
+
outputFolder: options.outputFolder,
|
|
37
|
+
provenance,
|
|
38
|
+
semantic,
|
|
39
|
+
enriched,
|
|
40
|
+
coverage: costReport.coverage,
|
|
41
|
+
totalSelf: costReport.totalSelf,
|
|
42
|
+
limit,
|
|
43
|
+
totals: {
|
|
44
|
+
symbols: nodes.length,
|
|
45
|
+
files: new Set(nodes.map((node) => node.filePath)).size,
|
|
46
|
+
relationships: edgeKinds.reduce((sum, entry) => sum + entry.count, 0),
|
|
47
|
+
communities: communities.length,
|
|
48
|
+
deadExports: deadExports.length,
|
|
49
|
+
cycles: cycles.length,
|
|
50
|
+
},
|
|
51
|
+
verdict: '',
|
|
52
|
+
nodeKinds: ReportData.nodeKindCounts(nodes),
|
|
53
|
+
edgeKinds,
|
|
54
|
+
hubsByCallers: callers.hotspots.slice(0, limit).map(ReportData.toRanked),
|
|
55
|
+
hubsByBlastRadius: blast.hotspots.slice(0, limit).map(ReportData.toRanked),
|
|
56
|
+
communityQuality,
|
|
57
|
+
communities: communities.slice(0, limit),
|
|
58
|
+
hotspots: measured === true ? selfTime.hotspots.slice(0, limit).map(ReportData.toRanked) : [],
|
|
59
|
+
cost: costReport.nodes.slice(0, limit).map(ReportData.toCostNode),
|
|
60
|
+
structureVsRuntime: ReportData.synthesize(costReport.nodes, measured === true ? selfTime.hotspots : [], fanIn),
|
|
61
|
+
cycles: cycles.slice(0, limit).map((members) => ({ size: members.length, members: members.map(ReportData.toSymbol) })),
|
|
62
|
+
boundary: ReportData.boundaryOf(nodes),
|
|
63
|
+
deadExports: deadExports.map(ReportData.toSymbol),
|
|
64
|
+
};
|
|
65
|
+
data.verdict = ReportData.verdictOf(data);
|
|
66
|
+
return data;
|
|
67
|
+
}
|
|
68
|
+
static async edgeKindCounts(store) {
|
|
69
|
+
const rows = await store.run('MATCH (:GraphNode)-[e:Edge]->(:GraphNode) RETURN e.kind AS kind');
|
|
70
|
+
return ReportData.countBy(rows.map((row) => String(row.kind)));
|
|
71
|
+
}
|
|
72
|
+
static nodeKindCounts(nodes) {
|
|
73
|
+
return ReportData.countBy(nodes.map((node) => node.kind));
|
|
74
|
+
}
|
|
75
|
+
static countBy(values) {
|
|
76
|
+
const counts = new Map();
|
|
77
|
+
for (const value of values) {
|
|
78
|
+
counts.set(value, (counts.get(value) ?? 0) + 1);
|
|
79
|
+
}
|
|
80
|
+
return [...counts.entries()]
|
|
81
|
+
.map(([kind, count]) => ({ kind, count }))
|
|
82
|
+
.sort((a, b) => b.count - a.count || a.kind.localeCompare(b.kind));
|
|
83
|
+
}
|
|
84
|
+
/** Groups nodes by their assigned community index, labelled and sized, largest first. */
|
|
85
|
+
static communitiesOf(nodes) {
|
|
86
|
+
const sizes = new Map();
|
|
87
|
+
const labels = new Map();
|
|
88
|
+
for (const node of nodes) {
|
|
89
|
+
const index = node.metadata[COMMUNITY_METADATA_KEY];
|
|
90
|
+
if (typeof index !== 'number') {
|
|
91
|
+
continue;
|
|
92
|
+
}
|
|
93
|
+
sizes.set(index, (sizes.get(index) ?? 0) + 1);
|
|
94
|
+
const label = node.metadata[COMMUNITY_LABEL_METADATA_KEY];
|
|
95
|
+
if (typeof label === 'string' && labels.has(index) === false) {
|
|
96
|
+
labels.set(index, label);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return [...sizes.entries()]
|
|
100
|
+
.map(([index, size]) => ({ label: labels.get(index) ?? `community ${index}`, size }))
|
|
101
|
+
.sort((a, b) => b.size - a.size || a.label.localeCompare(b.label));
|
|
102
|
+
}
|
|
103
|
+
static boundaryOf(nodes) {
|
|
104
|
+
const of = (kind) => nodes.filter((node) => node.kind === kind).map(ReportData.toSymbol);
|
|
105
|
+
return { endpoints: of('Endpoint'), configFlags: of('ConfigFlag'), externalApis: of('ExternalAPI') };
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Splits the measured graph into three reads of the same symbols: pure
|
|
109
|
+
* orchestrators (cost flows through, ~no self cost), hidden hotspots (hot, few
|
|
110
|
+
* callers), and the aligned core (central and hot).
|
|
111
|
+
*/
|
|
112
|
+
static synthesize(cost, hottest, fanIn) {
|
|
113
|
+
const orchestrators = cost
|
|
114
|
+
.filter((node) => node.selfCost === 0 && node.inclusiveCost > 0)
|
|
115
|
+
.slice(0, 5)
|
|
116
|
+
.map(ReportData.toSymbol);
|
|
117
|
+
const hiddenHotspots = hottest
|
|
118
|
+
.filter((hotspot) => (fanIn.get(hotspot.id) ?? 0) <= HIDDEN_HOTSPOT_MAX_CALLERS)
|
|
119
|
+
.slice(0, 5)
|
|
120
|
+
.map(ReportData.toSymbol);
|
|
121
|
+
const alignedCore = hottest
|
|
122
|
+
.filter((hotspot) => (fanIn.get(hotspot.id) ?? 0) > HIDDEN_HOTSPOT_MAX_CALLERS)
|
|
123
|
+
.slice(0, 5)
|
|
124
|
+
.map(ReportData.toSymbol);
|
|
125
|
+
return { orchestrators, hiddenHotspots, alignedCore };
|
|
126
|
+
}
|
|
127
|
+
static async readProvenance(store) {
|
|
128
|
+
const raw = await store.readGraphMeta(SOURCE_MANIFEST_KEY);
|
|
129
|
+
if (raw === null) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
const parsed = SourceManifestSchema.safeParse(raw);
|
|
133
|
+
return parsed.success === true ? parsed.data : null;
|
|
134
|
+
}
|
|
135
|
+
static async readCommunityQuality(store) {
|
|
136
|
+
const raw = await store.readGraphMeta(CLUSTERING_MANIFEST_KEY);
|
|
137
|
+
if (raw === null) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
const quality = raw.quality;
|
|
141
|
+
return typeof quality === 'number' ? quality : null;
|
|
142
|
+
}
|
|
143
|
+
/** Derives `owner/repo` from the recorded GitHub base URL, falling back to the given label. */
|
|
144
|
+
static projectName(provenance, fallback) {
|
|
145
|
+
if (provenance === null) {
|
|
146
|
+
return fallback;
|
|
147
|
+
}
|
|
148
|
+
try {
|
|
149
|
+
const path = new URL(provenance.baseUrl).pathname.replace(/^\/+|\/+$/g, '');
|
|
150
|
+
return path.length > 0 ? path : fallback;
|
|
151
|
+
}
|
|
152
|
+
catch {
|
|
153
|
+
return fallback;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
static verdictOf(data) {
|
|
157
|
+
const shape = data.semantic === true ? (data.enriched === true ? 'semantic, enriched' : 'semantic') : 'structural';
|
|
158
|
+
const cycles = data.totals.cycles === 0 ? 'acyclic' : `${data.totals.cycles} call cycle(s)`;
|
|
159
|
+
const sentences = [`${data.totals.symbols} symbols across ${data.totals.files} files — ${shape}, ${cycles}.`];
|
|
160
|
+
if (data.enriched === true && data.hotspots.length > 0) {
|
|
161
|
+
const hottest = data.hotspots[0];
|
|
162
|
+
const costNode = data.cost.find((node) => node.name === hottest.name && node.filePath === hottest.filePath);
|
|
163
|
+
const share = costNode === undefined ? '' : ` (${(costNode.shareOfTotal * 100).toFixed(1)}% of inclusive cost)`;
|
|
164
|
+
sentences.push(`\`${hottest.name}\` is the hottest function${share}.`);
|
|
165
|
+
}
|
|
166
|
+
if (data.totals.deadExports > 0) {
|
|
167
|
+
sentences.push(`${data.totals.deadExports} exported symbol(s) appear dead.`);
|
|
168
|
+
}
|
|
169
|
+
return sentences.join(' ');
|
|
170
|
+
}
|
|
171
|
+
static toRanked(ref) {
|
|
172
|
+
return { name: ref.name, kind: ref.kind, filePath: ref.filePath, startLine: ref.startLine, score: ref.score };
|
|
173
|
+
}
|
|
174
|
+
static toCostNode(ref) {
|
|
175
|
+
return {
|
|
176
|
+
name: ref.name,
|
|
177
|
+
kind: ref.kind,
|
|
178
|
+
filePath: ref.filePath,
|
|
179
|
+
startLine: ref.startLine,
|
|
180
|
+
selfCost: ref.selfCost,
|
|
181
|
+
inclusiveCost: ref.inclusiveCost,
|
|
182
|
+
shareOfTotal: ref.shareOfTotal,
|
|
183
|
+
cyclic: ref.cyclic,
|
|
184
|
+
cycleSize: ref.cycleSize,
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
static toSymbol(ref) {
|
|
188
|
+
return { name: ref.name, kind: ref.kind, filePath: ref.filePath, startLine: ref.startLine };
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
//# sourceMappingURL=report_data.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"report_data.js","sourceRoot":"","sources":["../../src/report/report_data.ts"],"names":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edge.d.ts
CHANGED
|
@@ -1,22 +1,57 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The closed edge vocabulary, grouped by layer (mirrors the README graph-model
|
|
4
|
+
* table).
|
|
5
|
+
*
|
|
6
|
+
* Decision (#31 Part 0): keep a closed `z.enum` rather than an extensible kind
|
|
7
|
+
* registry — simple and explicit. Kùzu stores `kind` as a `STRING`, so a new kind
|
|
8
|
+
* needs no schema migration; its only real costs are this enum, the extractor that
|
|
9
|
+
* emits it, and — for edges — whether it joins {@link REFERENCE_EDGE_KINDS}.
|
|
10
|
+
*/
|
|
11
|
+
export declare const EDGE_KINDS: readonly ["CONTAINS", "IMPORTS", "EXPORTS", "EXTENDS", "IMPLEMENTS", "USES_TYPE", "RETURNS", "PARAM_TYPE", "CALLS", "INSTANTIATES", "OVERRIDES", "READS", "WRITES", "READS_CONFIG", "CALLS_EXTERNAL", "HANDLES", "CALLS_RUNTIME"];
|
|
12
|
+
export declare const EdgeKindSchema: z.ZodEnum<["CONTAINS", "IMPORTS", "EXPORTS", "EXTENDS", "IMPLEMENTS", "USES_TYPE", "RETURNS", "PARAM_TYPE", "CALLS", "INSTANTIATES", "OVERRIDES", "READS", "WRITES", "READS_CONFIG", "CALLS_EXTERNAL", "HANDLES", "CALLS_RUNTIME"]>;
|
|
4
13
|
export type EdgeKind = z.infer<typeof EdgeKindSchema>;
|
|
14
|
+
/**
|
|
15
|
+
* One-line, onboarding-oriented descriptions for every {@link EdgeKind}, keyed by
|
|
16
|
+
* kind. This is the single source of truth surfaced as hover tooltips in the web
|
|
17
|
+
* visualisation; the `Record<EdgeKind, string>` type makes adding an edge kind
|
|
18
|
+
* without describing it a compile error.
|
|
19
|
+
*/
|
|
20
|
+
export declare const EDGE_KIND_DESCRIPTIONS: Record<EdgeKind, string>;
|
|
21
|
+
/**
|
|
22
|
+
* The edge kinds that count as a *reference* to their target — the single source
|
|
23
|
+
* of truth for {@link GraphQuery.references} and the {@link GraphQuery.deadExports}
|
|
24
|
+
* liveness check (the query layer derives its Cypher list from this array).
|
|
25
|
+
*
|
|
26
|
+
* An edge kind is a reference when its presence means the target symbol is *used*:
|
|
27
|
+
* a call, a heritage link, a type mention, an instantiation, a value read, a method
|
|
28
|
+
* override (an override uses the base member it replaces), or an endpoint→handler
|
|
29
|
+
* link (`HANDLES` — a route uses the function that handles it). Deliberately
|
|
30
|
+
* excluded:
|
|
31
|
+
* - `CONTAINS` / `IMPORTS` — containment and module wiring, not use;
|
|
32
|
+
* - `EXPORTS` — marks a symbol as exported; counting it would give every export an
|
|
33
|
+
* inbound edge from its module and defeat dead-export detection;
|
|
34
|
+
* - `WRITES` — mutating a binding is not using its value;
|
|
35
|
+
* - `READS_CONFIG` / `CALLS_EXTERNAL` — their targets are synthesized system-level
|
|
36
|
+
* nodes (a `ConfigFlag`, an `ExternalAPI`), not code symbols subject to
|
|
37
|
+
* dead-export analysis.
|
|
38
|
+
*/
|
|
39
|
+
export declare const REFERENCE_EDGE_KINDS: readonly ["CALLS", "EXTENDS", "IMPLEMENTS", "USES_TYPE", "RETURNS", "PARAM_TYPE", "INSTANTIATES", "READS", "OVERRIDES", "HANDLES"];
|
|
5
40
|
export declare const GraphEdgeSchema: z.ZodObject<{
|
|
6
41
|
id: z.ZodString;
|
|
7
|
-
kind: z.ZodEnum<["CONTAINS", "IMPORTS", "EXPORTS", "EXTENDS", "IMPLEMENTS", "USES_TYPE", "RETURNS", "PARAM_TYPE", "CALLS", "INSTANTIATES", "OVERRIDES", "READS", "WRITES"]>;
|
|
42
|
+
kind: z.ZodEnum<["CONTAINS", "IMPORTS", "EXPORTS", "EXTENDS", "IMPLEMENTS", "USES_TYPE", "RETURNS", "PARAM_TYPE", "CALLS", "INSTANTIATES", "OVERRIDES", "READS", "WRITES", "READS_CONFIG", "CALLS_EXTERNAL", "HANDLES", "CALLS_RUNTIME"]>;
|
|
8
43
|
from: z.ZodString;
|
|
9
44
|
to: z.ZodString;
|
|
10
45
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
11
46
|
}, "strip", z.ZodTypeAny, {
|
|
12
47
|
id: string;
|
|
13
|
-
kind: "CONTAINS" | "IMPORTS" | "EXPORTS" | "EXTENDS" | "IMPLEMENTS" | "USES_TYPE" | "RETURNS" | "PARAM_TYPE" | "CALLS" | "INSTANTIATES" | "OVERRIDES" | "READS" | "WRITES";
|
|
48
|
+
kind: "CONTAINS" | "IMPORTS" | "EXPORTS" | "EXTENDS" | "IMPLEMENTS" | "USES_TYPE" | "RETURNS" | "PARAM_TYPE" | "CALLS" | "INSTANTIATES" | "OVERRIDES" | "READS" | "WRITES" | "READS_CONFIG" | "CALLS_EXTERNAL" | "HANDLES" | "CALLS_RUNTIME";
|
|
14
49
|
from: string;
|
|
15
50
|
to: string;
|
|
16
51
|
metadata?: Record<string, unknown> | undefined;
|
|
17
52
|
}, {
|
|
18
53
|
id: string;
|
|
19
|
-
kind: "CONTAINS" | "IMPORTS" | "EXPORTS" | "EXTENDS" | "IMPLEMENTS" | "USES_TYPE" | "RETURNS" | "PARAM_TYPE" | "CALLS" | "INSTANTIATES" | "OVERRIDES" | "READS" | "WRITES";
|
|
54
|
+
kind: "CONTAINS" | "IMPORTS" | "EXPORTS" | "EXTENDS" | "IMPLEMENTS" | "USES_TYPE" | "RETURNS" | "PARAM_TYPE" | "CALLS" | "INSTANTIATES" | "OVERRIDES" | "READS" | "WRITES" | "READS_CONFIG" | "CALLS_EXTERNAL" | "HANDLES" | "CALLS_RUNTIME";
|
|
20
55
|
from: string;
|
|
21
56
|
to: string;
|
|
22
57
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/schema/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"edge.d.ts","sourceRoot":"","sources":["../../src/schema/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,mOAuBb,CAAC;AAEX,eAAO,MAAM,cAAc,qOAAqB,CAAC;AACjD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAkB3D,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,oBAAoB,oIAWO,CAAC;AAEzC,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;EAM1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/schema/edge.js
CHANGED
|
@@ -1,20 +1,93 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The closed edge vocabulary, grouped by layer (mirrors the README graph-model
|
|
4
|
+
* table).
|
|
5
|
+
*
|
|
6
|
+
* Decision (#31 Part 0): keep a closed `z.enum` rather than an extensible kind
|
|
7
|
+
* registry — simple and explicit. Kùzu stores `kind` as a `STRING`, so a new kind
|
|
8
|
+
* needs no schema migration; its only real costs are this enum, the extractor that
|
|
9
|
+
* emits it, and — for edges — whether it joins {@link REFERENCE_EDGE_KINDS}.
|
|
10
|
+
*/
|
|
2
11
|
export const EDGE_KINDS = [
|
|
12
|
+
// Structural — cheap, always emitted (no symbol resolution).
|
|
3
13
|
'CONTAINS',
|
|
4
14
|
'IMPORTS',
|
|
5
15
|
'EXPORTS',
|
|
16
|
+
// Type — require symbol resolution, emitted with `--semantic`.
|
|
6
17
|
'EXTENDS',
|
|
7
18
|
'IMPLEMENTS',
|
|
8
19
|
'USES_TYPE',
|
|
9
20
|
'RETURNS',
|
|
10
21
|
'PARAM_TYPE',
|
|
22
|
+
// Behavioral — require symbol resolution, emitted with `--semantic`.
|
|
11
23
|
'CALLS',
|
|
12
24
|
'INSTANTIATES',
|
|
13
25
|
'OVERRIDES',
|
|
14
26
|
'READS',
|
|
15
27
|
'WRITES',
|
|
28
|
+
// System-level — detection-gated entities (#31 Part 2+).
|
|
29
|
+
'READS_CONFIG',
|
|
30
|
+
'CALLS_EXTERNAL',
|
|
31
|
+
'HANDLES',
|
|
32
|
+
// Runtime — observed dynamically, emitted by `enrich` from a CPU profile.
|
|
33
|
+
'CALLS_RUNTIME',
|
|
16
34
|
];
|
|
17
35
|
export const EdgeKindSchema = z.enum(EDGE_KINDS);
|
|
36
|
+
/**
|
|
37
|
+
* One-line, onboarding-oriented descriptions for every {@link EdgeKind}, keyed by
|
|
38
|
+
* kind. This is the single source of truth surfaced as hover tooltips in the web
|
|
39
|
+
* visualisation; the `Record<EdgeKind, string>` type makes adding an edge kind
|
|
40
|
+
* without describing it a compile error.
|
|
41
|
+
*/
|
|
42
|
+
export const EDGE_KIND_DESCRIPTIONS = {
|
|
43
|
+
CONTAINS: 'Structural nesting: the source declares or encloses the target (a module contains a class, which contains a method).',
|
|
44
|
+
IMPORTS: 'The source module imports the target.',
|
|
45
|
+
EXPORTS: 'The source module exports the target symbol.',
|
|
46
|
+
EXTENDS: 'The source class or interface extends the target (inheritance).',
|
|
47
|
+
IMPLEMENTS: 'The source class implements the target interface.',
|
|
48
|
+
USES_TYPE: 'The source references the target in a type position.',
|
|
49
|
+
RETURNS: 'The target type appears in the source function or method return type.',
|
|
50
|
+
PARAM_TYPE: 'The target type appears in one of the source parameter types.',
|
|
51
|
+
CALLS: 'The source function or method calls the target.',
|
|
52
|
+
INSTANTIATES: 'The source constructs the target class with new.',
|
|
53
|
+
OVERRIDES: 'The source method overrides the base-class member it replaces.',
|
|
54
|
+
READS: 'The source reads the value of the target variable or property.',
|
|
55
|
+
WRITES: 'The source assigns to the target variable or property.',
|
|
56
|
+
READS_CONFIG: 'The source reads the target configuration flag (an environment variable).',
|
|
57
|
+
CALLS_EXTERNAL: 'The source makes an outbound HTTP call to the target external API.',
|
|
58
|
+
HANDLES: 'Links an HTTP endpoint to the function that handles it (route to handler).',
|
|
59
|
+
CALLS_RUNTIME: 'A call observed at runtime in a CPU profile: the source function or method was on the stack directly above the target. Captures dynamic dispatch that static CALLS cannot see.',
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The edge kinds that count as a *reference* to their target — the single source
|
|
63
|
+
* of truth for {@link GraphQuery.references} and the {@link GraphQuery.deadExports}
|
|
64
|
+
* liveness check (the query layer derives its Cypher list from this array).
|
|
65
|
+
*
|
|
66
|
+
* An edge kind is a reference when its presence means the target symbol is *used*:
|
|
67
|
+
* a call, a heritage link, a type mention, an instantiation, a value read, a method
|
|
68
|
+
* override (an override uses the base member it replaces), or an endpoint→handler
|
|
69
|
+
* link (`HANDLES` — a route uses the function that handles it). Deliberately
|
|
70
|
+
* excluded:
|
|
71
|
+
* - `CONTAINS` / `IMPORTS` — containment and module wiring, not use;
|
|
72
|
+
* - `EXPORTS` — marks a symbol as exported; counting it would give every export an
|
|
73
|
+
* inbound edge from its module and defeat dead-export detection;
|
|
74
|
+
* - `WRITES` — mutating a binding is not using its value;
|
|
75
|
+
* - `READS_CONFIG` / `CALLS_EXTERNAL` — their targets are synthesized system-level
|
|
76
|
+
* nodes (a `ConfigFlag`, an `ExternalAPI`), not code symbols subject to
|
|
77
|
+
* dead-export analysis.
|
|
78
|
+
*/
|
|
79
|
+
export const REFERENCE_EDGE_KINDS = [
|
|
80
|
+
'CALLS',
|
|
81
|
+
'EXTENDS',
|
|
82
|
+
'IMPLEMENTS',
|
|
83
|
+
'USES_TYPE',
|
|
84
|
+
'RETURNS',
|
|
85
|
+
'PARAM_TYPE',
|
|
86
|
+
'INSTANTIATES',
|
|
87
|
+
'READS',
|
|
88
|
+
'OVERRIDES',
|
|
89
|
+
'HANDLES',
|
|
90
|
+
];
|
|
18
91
|
export const GraphEdgeSchema = z.object({
|
|
19
92
|
id: z.string(),
|
|
20
93
|
kind: EdgeKindSchema,
|
package/dist/schema/edge.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/schema/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,UAAU;IACV,SAAS;IACT,SAAS;IACT,SAAS;IACT,YAAY;IACZ,WAAW;IACX,SAAS;IACT,YAAY;IACZ,OAAO;IACP,cAAc;IACd,WAAW;IACX,OAAO;IACP,QAAQ;
|
|
1
|
+
{"version":3,"file":"edge.js","sourceRoot":"","sources":["../../src/schema/edge.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,6DAA6D;IAC7D,UAAU;IACV,SAAS;IACT,SAAS;IACT,+DAA+D;IAC/D,SAAS;IACT,YAAY;IACZ,WAAW;IACX,SAAS;IACT,YAAY;IACZ,qEAAqE;IACrE,OAAO;IACP,cAAc;IACd,WAAW;IACX,OAAO;IACP,QAAQ;IACR,yDAAyD;IACzD,cAAc;IACd,gBAAgB;IAChB,SAAS;IACT,0EAA0E;IAC1E,eAAe;CACN,CAAC;AAEX,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAGjD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAA6B;IAC/D,QAAQ,EAAE,sHAAsH;IAChI,OAAO,EAAE,uCAAuC;IAChD,OAAO,EAAE,8CAA8C;IACvD,OAAO,EAAE,iEAAiE;IAC1E,UAAU,EAAE,mDAAmD;IAC/D,SAAS,EAAE,sDAAsD;IACjE,OAAO,EAAE,uEAAuE;IAChF,UAAU,EAAE,+DAA+D;IAC3E,KAAK,EAAE,iDAAiD;IACxD,YAAY,EAAE,kDAAkD;IAChE,SAAS,EAAE,gEAAgE;IAC3E,KAAK,EAAE,gEAAgE;IACvE,MAAM,EAAE,wDAAwD;IAChE,YAAY,EAAE,2EAA2E;IACzF,cAAc,EAAE,oEAAoE;IACpF,OAAO,EAAE,4EAA4E;IACrF,aAAa,EAAE,gLAAgL;CAC/L,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,OAAO;IACP,SAAS;IACT,YAAY;IACZ,WAAW;IACX,SAAS;IACT,YAAY;IACZ,cAAc;IACd,OAAO;IACP,WAAW;IACX,SAAS;CAC8B,CAAC;AAEzC,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,IAAI,EAAE,cAAc;IACpB,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE;IAChB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE;IACd,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC1C,CAAC,CAAC"}
|
package/dist/schema/node.d.ts
CHANGED
|
@@ -1,7 +1,22 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
/**
|
|
3
|
+
* The closed node vocabulary. See {@link EDGE_KINDS} in `edge.ts` for the
|
|
4
|
+
* closed-enum-vs-registry decision (#31 Part 0); the same reasoning applies here.
|
|
5
|
+
*
|
|
6
|
+
* The system-level group grows one detection-gated extractor at a time (#31).
|
|
7
|
+
* `ConfigFlag` (environment variables) is the first; `Endpoint`, `DatabaseTable`,
|
|
8
|
+
* `QueueTopic`, and `ExternalAPI` arrive in later slices.
|
|
9
|
+
*/
|
|
10
|
+
export declare const NODE_KINDS: readonly ["Module", "Class", "Interface", "TypeAlias", "Enum", "Function", "Method", "Property", "Parameter", "Variable", "ExternalModule", "ConfigFlag", "ExternalAPI", "Endpoint"];
|
|
11
|
+
export declare const NodeKindSchema: z.ZodEnum<["Module", "Class", "Interface", "TypeAlias", "Enum", "Function", "Method", "Property", "Parameter", "Variable", "ExternalModule", "ConfigFlag", "ExternalAPI", "Endpoint"]>;
|
|
4
12
|
export type NodeKind = z.infer<typeof NodeKindSchema>;
|
|
13
|
+
/**
|
|
14
|
+
* One-line, onboarding-oriented descriptions for every {@link NodeKind}, keyed by
|
|
15
|
+
* kind. This is the single source of truth surfaced as hover tooltips in the web
|
|
16
|
+
* visualisation; the `Record<NodeKind, string>` type makes adding a node kind
|
|
17
|
+
* without describing it a compile error.
|
|
18
|
+
*/
|
|
19
|
+
export declare const NODE_KIND_DESCRIPTIONS: Record<NodeKind, string>;
|
|
5
20
|
export declare const RangeSchema: z.ZodObject<{
|
|
6
21
|
startLine: z.ZodNumber;
|
|
7
22
|
startColumn: z.ZodNumber;
|
|
@@ -21,7 +36,7 @@ export declare const RangeSchema: z.ZodObject<{
|
|
|
21
36
|
export type Range = z.infer<typeof RangeSchema>;
|
|
22
37
|
export declare const GraphNodeSchema: z.ZodObject<{
|
|
23
38
|
id: z.ZodString;
|
|
24
|
-
kind: z.ZodEnum<["Module", "Class", "Interface", "TypeAlias", "Enum", "Function", "Method", "Property", "Parameter", "Variable", "ExternalModule"]>;
|
|
39
|
+
kind: z.ZodEnum<["Module", "Class", "Interface", "TypeAlias", "Enum", "Function", "Method", "Property", "Parameter", "Variable", "ExternalModule", "ConfigFlag", "ExternalAPI", "Endpoint"]>;
|
|
25
40
|
name: z.ZodString;
|
|
26
41
|
filePath: z.ZodString;
|
|
27
42
|
range: z.ZodOptional<z.ZodObject<{
|
|
@@ -44,7 +59,7 @@ export declare const GraphNodeSchema: z.ZodObject<{
|
|
|
44
59
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
45
60
|
}, "strip", z.ZodTypeAny, {
|
|
46
61
|
id: string;
|
|
47
|
-
kind: "Module" | "Class" | "Interface" | "TypeAlias" | "Enum" | "Function" | "Method" | "Property" | "Parameter" | "Variable" | "ExternalModule";
|
|
62
|
+
kind: "Module" | "Class" | "Interface" | "TypeAlias" | "Enum" | "Function" | "Method" | "Property" | "Parameter" | "Variable" | "ExternalModule" | "ConfigFlag" | "ExternalAPI" | "Endpoint";
|
|
48
63
|
name: string;
|
|
49
64
|
filePath: string;
|
|
50
65
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -57,7 +72,7 @@ export declare const GraphNodeSchema: z.ZodObject<{
|
|
|
57
72
|
exported?: boolean | undefined;
|
|
58
73
|
}, {
|
|
59
74
|
id: string;
|
|
60
|
-
kind: "Module" | "Class" | "Interface" | "TypeAlias" | "Enum" | "Function" | "Method" | "Property" | "Parameter" | "Variable" | "ExternalModule";
|
|
75
|
+
kind: "Module" | "Class" | "Interface" | "TypeAlias" | "Enum" | "Function" | "Method" | "Property" | "Parameter" | "Variable" | "ExternalModule" | "ConfigFlag" | "ExternalAPI" | "Endpoint";
|
|
61
76
|
name: string;
|
|
62
77
|
filePath: string;
|
|
63
78
|
metadata?: Record<string, unknown> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/schema/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../src/schema/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;GAOG;AACH,eAAO,MAAM,UAAU,sLAkBb,CAAC;AAEX,eAAO,MAAM,cAAc,wLAAqB,CAAC;AACjD,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAe3D,CAAC;AAEF,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;EAKtB,CAAC;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AAEhD,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAQ1B,CAAC;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC"}
|
package/dist/schema/node.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The closed node vocabulary. See {@link EDGE_KINDS} in `edge.ts` for the
|
|
4
|
+
* closed-enum-vs-registry decision (#31 Part 0); the same reasoning applies here.
|
|
5
|
+
*
|
|
6
|
+
* The system-level group grows one detection-gated extractor at a time (#31).
|
|
7
|
+
* `ConfigFlag` (environment variables) is the first; `Endpoint`, `DatabaseTable`,
|
|
8
|
+
* `QueueTopic`, and `ExternalAPI` arrive in later slices.
|
|
9
|
+
*/
|
|
2
10
|
export const NODE_KINDS = [
|
|
11
|
+
// Code structure.
|
|
3
12
|
'Module',
|
|
4
13
|
'Class',
|
|
5
14
|
'Interface',
|
|
@@ -10,9 +19,36 @@ export const NODE_KINDS = [
|
|
|
10
19
|
'Property',
|
|
11
20
|
'Parameter',
|
|
12
21
|
'Variable',
|
|
22
|
+
// External dependencies, as one opaque node per import specifier.
|
|
13
23
|
'ExternalModule',
|
|
24
|
+
// System-level entities — detection-gated (#31 Part 2+).
|
|
25
|
+
'ConfigFlag',
|
|
26
|
+
'ExternalAPI',
|
|
27
|
+
'Endpoint',
|
|
14
28
|
];
|
|
15
29
|
export const NodeKindSchema = z.enum(NODE_KINDS);
|
|
30
|
+
/**
|
|
31
|
+
* One-line, onboarding-oriented descriptions for every {@link NodeKind}, keyed by
|
|
32
|
+
* kind. This is the single source of truth surfaced as hover tooltips in the web
|
|
33
|
+
* visualisation; the `Record<NodeKind, string>` type makes adding a node kind
|
|
34
|
+
* without describing it a compile error.
|
|
35
|
+
*/
|
|
36
|
+
export const NODE_KIND_DESCRIPTIONS = {
|
|
37
|
+
Module: 'A source file in the codebase.',
|
|
38
|
+
Class: 'A class declaration.',
|
|
39
|
+
Interface: 'An interface declaration.',
|
|
40
|
+
TypeAlias: 'A type alias declaration.',
|
|
41
|
+
Enum: 'An enum declaration.',
|
|
42
|
+
Function: 'A standalone, module-level function.',
|
|
43
|
+
Method: 'A function that belongs to a class or interface.',
|
|
44
|
+
Property: 'A field declared on a class or interface.',
|
|
45
|
+
Parameter: 'A parameter of a function or method.',
|
|
46
|
+
Variable: 'A module- or block-level variable binding.',
|
|
47
|
+
ExternalModule: 'An imported third-party or Node.js module, recorded as one opaque node per import specifier.',
|
|
48
|
+
ConfigFlag: 'An environment-variable configuration flag, detected from process.env reads.',
|
|
49
|
+
ExternalAPI: 'An outbound HTTP host called through fetch(), with one node per host.',
|
|
50
|
+
Endpoint: 'An HTTP route registered by the app, such as app.get("/users", handler).',
|
|
51
|
+
};
|
|
16
52
|
export const RangeSchema = z.object({
|
|
17
53
|
startLine: z.number().int(),
|
|
18
54
|
startColumn: z.number().int(),
|
package/dist/schema/node.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/schema/node.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,UAAU,GAAG;IACzB,QAAQ;IACR,OAAO;IACP,WAAW;IACX,WAAW;IACX,MAAM;IACN,UAAU;IACV,QAAQ;IACR,UAAU;IACV,WAAW;IACX,UAAU;IACV,gBAAgB;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