@vyuhlabs/dxkit 2.6.0 → 2.7.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/CHANGELOG.md +54 -13
- package/README.md +208 -459
- package/dist/analyzers/bom/discovery.d.ts +3 -4
- package/dist/analyzers/bom/discovery.d.ts.map +1 -1
- package/dist/analyzers/bom/discovery.js +3 -4
- package/dist/analyzers/bom/discovery.js.map +1 -1
- package/dist/analyzers/bom/types.d.ts +1 -1
- package/dist/analyzers/dashboard/index.d.ts.map +1 -1
- package/dist/analyzers/dashboard/index.js +42 -5
- package/dist/analyzers/dashboard/index.js.map +1 -1
- package/dist/analyzers/quality/detailed.d.ts +8 -1
- package/dist/analyzers/quality/detailed.d.ts.map +1 -1
- package/dist/analyzers/quality/detailed.js +43 -10
- package/dist/analyzers/quality/detailed.js.map +1 -1
- package/dist/analyzers/security/detailed.d.ts +8 -1
- package/dist/analyzers/security/detailed.d.ts.map +1 -1
- package/dist/analyzers/security/detailed.js +14 -1
- package/dist/analyzers/security/detailed.js.map +1 -1
- package/dist/analyzers/tests/detailed.d.ts +8 -1
- package/dist/analyzers/tests/detailed.d.ts.map +1 -1
- package/dist/analyzers/tests/detailed.js +26 -7
- package/dist/analyzers/tests/detailed.js.map +1 -1
- package/dist/analyzers/tools/cloc.js +3 -3
- package/dist/analyzers/tools/cloc.js.map +1 -1
- package/dist/analyzers/tools/exclusions.d.ts +12 -12
- package/dist/analyzers/tools/exclusions.d.ts.map +1 -1
- package/dist/analyzers/tools/exclusions.js +27 -13
- package/dist/analyzers/tools/exclusions.js.map +1 -1
- package/dist/analyzers/tools/graphify.d.ts +39 -5
- package/dist/analyzers/tools/graphify.d.ts.map +1 -1
- package/dist/analyzers/tools/graphify.js +609 -45
- package/dist/analyzers/tools/graphify.js.map +1 -1
- package/dist/analyzers/tools/nuget-package-reference.d.ts +4 -4
- package/dist/analyzers/tools/nuget-package-reference.js +4 -4
- package/dist/analyzers/tools/osv-scanner-fix.d.ts +4 -5
- package/dist/analyzers/tools/osv-scanner-fix.d.ts.map +1 -1
- package/dist/analyzers/tools/osv-scanner-fix.js +4 -5
- package/dist/analyzers/tools/osv-scanner-fix.js.map +1 -1
- package/dist/analyzers/tools/parallel.d.ts.map +1 -1
- package/dist/analyzers/tools/parallel.js +7 -0
- package/dist/analyzers/tools/parallel.js.map +1 -1
- package/dist/analyzers/tools/vendored-advisor.d.ts.map +1 -1
- package/dist/analyzers/tools/vendored-advisor.js +3 -4
- package/dist/analyzers/tools/vendored-advisor.js.map +1 -1
- package/dist/analyzers/xlsx/licenses.d.ts +7 -7
- package/dist/analyzers/xlsx/licenses.js +7 -7
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +80 -3
- package/dist/cli.js.map +1 -1
- package/dist/dashboard/graph-adapter.d.ts +151 -0
- package/dist/dashboard/graph-adapter.d.ts.map +1 -0
- package/dist/dashboard/graph-adapter.js +415 -0
- package/dist/dashboard/graph-adapter.js.map +1 -0
- package/dist/dashboard/graph-tab.d.ts +109 -0
- package/dist/dashboard/graph-tab.d.ts.map +1 -0
- package/dist/dashboard/graph-tab.js +297 -0
- package/dist/dashboard/graph-tab.js.map +1 -0
- package/dist/dashboard/vendor/vis-network.min.js +34 -0
- package/dist/explore/cli/api-surface.d.ts +12 -0
- package/dist/explore/cli/api-surface.d.ts.map +1 -0
- package/dist/explore/cli/api-surface.js +57 -0
- package/dist/explore/cli/api-surface.js.map +1 -0
- package/dist/explore/cli/communities.d.ts +10 -0
- package/dist/explore/cli/communities.d.ts.map +1 -0
- package/dist/explore/cli/communities.js +47 -0
- package/dist/explore/cli/communities.js.map +1 -0
- package/dist/explore/cli/context.d.ts +16 -0
- package/dist/explore/cli/context.d.ts.map +1 -0
- package/dist/explore/cli/context.js +118 -0
- package/dist/explore/cli/context.js.map +1 -0
- package/dist/explore/cli/entry-points.d.ts +12 -0
- package/dist/explore/cli/entry-points.d.ts.map +1 -0
- package/dist/explore/cli/entry-points.js +85 -0
- package/dist/explore/cli/entry-points.js.map +1 -0
- package/dist/explore/cli/feature.d.ts +16 -0
- package/dist/explore/cli/feature.d.ts.map +1 -0
- package/dist/explore/cli/feature.js +89 -0
- package/dist/explore/cli/feature.js.map +1 -0
- package/dist/explore/cli/file.d.ts +12 -0
- package/dist/explore/cli/file.d.ts.map +1 -0
- package/dist/explore/cli/file.js +139 -0
- package/dist/explore/cli/file.js.map +1 -0
- package/dist/explore/cli/hot-files.d.ts +11 -0
- package/dist/explore/cli/hot-files.d.ts.map +1 -0
- package/dist/explore/cli/hot-files.js +63 -0
- package/dist/explore/cli/hot-files.js.map +1 -0
- package/dist/explore/context-hook.d.ts +42 -0
- package/dist/explore/context-hook.d.ts.map +1 -0
- package/dist/explore/context-hook.js +131 -0
- package/dist/explore/context-hook.js.map +1 -0
- package/dist/explore/finding-context.d.ts +69 -0
- package/dist/explore/finding-context.d.ts.map +1 -0
- package/dist/explore/finding-context.js +102 -0
- package/dist/explore/finding-context.js.map +1 -0
- package/dist/explore/format.d.ts +64 -0
- package/dist/explore/format.d.ts.map +1 -0
- package/dist/explore/format.js +99 -0
- package/dist/explore/format.js.map +1 -0
- package/dist/explore/load.d.ts +50 -0
- package/dist/explore/load.d.ts.map +1 -0
- package/dist/explore/load.js +197 -0
- package/dist/explore/load.js.map +1 -0
- package/dist/explore/queries.d.ts +413 -0
- package/dist/explore/queries.d.ts.map +1 -0
- package/dist/explore/queries.js +855 -0
- package/dist/explore/queries.js.map +1 -0
- package/dist/explore/types.d.ts +130 -0
- package/dist/explore/types.d.ts.map +1 -0
- package/dist/explore/types.js +28 -0
- package/dist/explore/types.js.map +1 -0
- package/dist/explore-cli.d.ts +45 -0
- package/dist/explore-cli.d.ts.map +1 -0
- package/dist/explore-cli.js +213 -0
- package/dist/explore-cli.js.map +1 -0
- package/dist/generator.d.ts.map +1 -1
- package/dist/generator.js +19 -0
- package/dist/generator.js.map +1 -1
- package/dist/languages/csharp.d.ts.map +1 -1
- package/dist/languages/csharp.js +31 -11
- package/dist/languages/csharp.js.map +1 -1
- package/dist/languages/go.d.ts.map +1 -1
- package/dist/languages/go.js +4 -0
- package/dist/languages/go.js.map +1 -1
- package/dist/languages/index.d.ts +27 -0
- package/dist/languages/index.d.ts.map +1 -1
- package/dist/languages/index.js +35 -0
- package/dist/languages/index.js.map +1 -1
- package/dist/languages/java.d.ts.map +1 -1
- package/dist/languages/java.js +4 -0
- package/dist/languages/java.js.map +1 -1
- package/dist/languages/kotlin.d.ts.map +1 -1
- package/dist/languages/kotlin.js +4 -0
- package/dist/languages/kotlin.js.map +1 -1
- package/dist/languages/python.d.ts.map +1 -1
- package/dist/languages/python.js +4 -0
- package/dist/languages/python.js.map +1 -1
- package/dist/languages/ruby.d.ts.map +1 -1
- package/dist/languages/ruby.js +4 -0
- package/dist/languages/ruby.js.map +1 -1
- package/dist/languages/rust.d.ts.map +1 -1
- package/dist/languages/rust.js +4 -0
- package/dist/languages/rust.js.map +1 -1
- package/dist/languages/types.d.ts +54 -0
- package/dist/languages/types.d.ts.map +1 -1
- package/dist/languages/typescript.d.ts.map +1 -1
- package/dist/languages/typescript.js +5 -1
- package/dist/languages/typescript.js.map +1 -1
- package/package.json +2 -1
- package/templates/.claude/skills/dxkit-action/SKILL.md +21 -1
- package/templates/.claude/skills/dxkit-reports/SKILL.md +3 -1
- package/templates/AGENTS.md.template +8 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared output helpers for the explore CLI subcommands. Pure
|
|
3
|
+
* formatters — JSON envelope shape + markdown table builders — so
|
|
4
|
+
* each subcommand handler stays a thin pipeline (parse args → call
|
|
5
|
+
* queries → format output).
|
|
6
|
+
*
|
|
7
|
+
* Per the Sprint 0 design (`tmp/2.7-explore-cli-design.md`):
|
|
8
|
+
* - JSON mode emits a stable envelope: command / args / meta / results
|
|
9
|
+
* - Markdown mode emits header → meta line → result block → footer hint
|
|
10
|
+
* - Adding fields later is additive; never mutate existing field
|
|
11
|
+
* names within v1
|
|
12
|
+
*/
|
|
13
|
+
import type { Graph } from './types';
|
|
14
|
+
/**
|
|
15
|
+
* Stable JSON envelope every `--json` mode subcommand emits. Skills
|
|
16
|
+
* and scripts consume `results` directly; `meta` carries the artifact
|
|
17
|
+
* provenance so consumers can detect a stale graph + decide whether
|
|
18
|
+
* to suggest `--refresh`.
|
|
19
|
+
*/
|
|
20
|
+
export interface ExploreEnvelope<T> {
|
|
21
|
+
command: string;
|
|
22
|
+
args: Record<string, unknown>;
|
|
23
|
+
meta: {
|
|
24
|
+
schemaVersion: number;
|
|
25
|
+
graphGeneratedAt: string;
|
|
26
|
+
truncated: boolean;
|
|
27
|
+
};
|
|
28
|
+
results: T;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Build the JSON envelope from a query result + the graph metadata.
|
|
32
|
+
* Pure function — no I/O, no side effects. Subcommands call this in
|
|
33
|
+
* `--json` mode and print the result via `JSON.stringify`.
|
|
34
|
+
*/
|
|
35
|
+
export declare function envelope<T>(command: string, args: Record<string, unknown>, graph: Graph, results: T): ExploreEnvelope<T>;
|
|
36
|
+
/**
|
|
37
|
+
* Build the standard markdown header that every subcommand emits.
|
|
38
|
+
* Includes the meta line (file count + node count + generation
|
|
39
|
+
* timestamp) so the reader knows what artifact they're looking at,
|
|
40
|
+
* plus a truncation note when applicable.
|
|
41
|
+
*/
|
|
42
|
+
export declare function markdownHeader(title: string, framing: string, graph: Graph): string;
|
|
43
|
+
/**
|
|
44
|
+
* Build a markdown table from a row set. `headers` defines the
|
|
45
|
+
* column order; `rows` is an array of records keyed by the same
|
|
46
|
+
* header strings. Missing values render as empty strings.
|
|
47
|
+
*/
|
|
48
|
+
export declare function markdownTable<R extends Record<string, string | number>>(headers: ReadonlyArray<keyof R & string>, rows: ReadonlyArray<R>): string;
|
|
49
|
+
/**
|
|
50
|
+
* Build the standard footer hint pointing at the natural next
|
|
51
|
+
* subcommand. Optional; subcommands omit when no clear next step.
|
|
52
|
+
*/
|
|
53
|
+
export declare function markdownFooter(hint: string): string;
|
|
54
|
+
/**
|
|
55
|
+
* Print a JSON envelope to stdout. Output is single-line (no
|
|
56
|
+
* pretty-print) so it stays pipe-friendly for `jq` consumers.
|
|
57
|
+
*/
|
|
58
|
+
export declare function printJson<T>(env: ExploreEnvelope<T>): void;
|
|
59
|
+
/**
|
|
60
|
+
* Print markdown sections to stdout, joined by a blank line. Each
|
|
61
|
+
* section is a multi-line string built by the helpers above.
|
|
62
|
+
*/
|
|
63
|
+
export declare function printMarkdown(...sections: string[]): void;
|
|
64
|
+
//# sourceMappingURL=format.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/explore/format.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAErC;;;;;GAKG;AACH,MAAM,WAAW,eAAe,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,IAAI,EAAE;QACJ,aAAa,EAAE,MAAM,CAAC;QACtB,gBAAgB,EAAE,MAAM,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;KACpB,CAAC;IACF,OAAO,EAAE,CAAC,CAAC;CACZ;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EACxB,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,CAAC,GACT,eAAe,CAAC,CAAC,CAAC,CAWpB;AAED;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,CAanF;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,EACrE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,EACxC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,GACrB,MAAM,CAaR;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;GAGG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,eAAe,CAAC,CAAC,CAAC,GAAG,IAAI,CAE1D;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAEzD"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Shared output helpers for the explore CLI subcommands. Pure
|
|
4
|
+
* formatters — JSON envelope shape + markdown table builders — so
|
|
5
|
+
* each subcommand handler stays a thin pipeline (parse args → call
|
|
6
|
+
* queries → format output).
|
|
7
|
+
*
|
|
8
|
+
* Per the Sprint 0 design (`tmp/2.7-explore-cli-design.md`):
|
|
9
|
+
* - JSON mode emits a stable envelope: command / args / meta / results
|
|
10
|
+
* - Markdown mode emits header → meta line → result block → footer hint
|
|
11
|
+
* - Adding fields later is additive; never mutate existing field
|
|
12
|
+
* names within v1
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.envelope = envelope;
|
|
16
|
+
exports.markdownHeader = markdownHeader;
|
|
17
|
+
exports.markdownTable = markdownTable;
|
|
18
|
+
exports.markdownFooter = markdownFooter;
|
|
19
|
+
exports.printJson = printJson;
|
|
20
|
+
exports.printMarkdown = printMarkdown;
|
|
21
|
+
/**
|
|
22
|
+
* Build the JSON envelope from a query result + the graph metadata.
|
|
23
|
+
* Pure function — no I/O, no side effects. Subcommands call this in
|
|
24
|
+
* `--json` mode and print the result via `JSON.stringify`.
|
|
25
|
+
*/
|
|
26
|
+
function envelope(command, args, graph, results) {
|
|
27
|
+
return {
|
|
28
|
+
command,
|
|
29
|
+
args,
|
|
30
|
+
meta: {
|
|
31
|
+
schemaVersion: graph.schemaVersion,
|
|
32
|
+
graphGeneratedAt: graph.meta.generatedAt,
|
|
33
|
+
truncated: graph.meta.truncated,
|
|
34
|
+
},
|
|
35
|
+
results,
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Build the standard markdown header that every subcommand emits.
|
|
40
|
+
* Includes the meta line (file count + node count + generation
|
|
41
|
+
* timestamp) so the reader knows what artifact they're looking at,
|
|
42
|
+
* plus a truncation note when applicable.
|
|
43
|
+
*/
|
|
44
|
+
function markdownHeader(title, framing, graph) {
|
|
45
|
+
const m = graph.meta;
|
|
46
|
+
const dateOnly = m.generatedAt.slice(0, 10);
|
|
47
|
+
const lines = [
|
|
48
|
+
`## ${title} — ${framing}`,
|
|
49
|
+
'',
|
|
50
|
+
`From .dxkit/reports/graph.json (generated ${dateOnly}, ${m.sourceFilesInGraph} source files, ${graph.nodes.length} nodes).`,
|
|
51
|
+
];
|
|
52
|
+
if (m.truncated) {
|
|
53
|
+
lines.push('');
|
|
54
|
+
lines.push(`> ⚠ Graph is truncated: ${m.truncatedReason}. Results may be incomplete.`);
|
|
55
|
+
}
|
|
56
|
+
return lines.join('\n');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Build a markdown table from a row set. `headers` defines the
|
|
60
|
+
* column order; `rows` is an array of records keyed by the same
|
|
61
|
+
* header strings. Missing values render as empty strings.
|
|
62
|
+
*/
|
|
63
|
+
function markdownTable(headers, rows) {
|
|
64
|
+
if (rows.length === 0)
|
|
65
|
+
return '';
|
|
66
|
+
const lines = [];
|
|
67
|
+
lines.push('| ' + headers.join(' | ') + ' |');
|
|
68
|
+
lines.push('|' + headers.map(() => '---').join('|') + '|');
|
|
69
|
+
for (const row of rows) {
|
|
70
|
+
const cells = headers.map((h) => {
|
|
71
|
+
const v = row[h];
|
|
72
|
+
return v === undefined || v === null ? '' : String(v);
|
|
73
|
+
});
|
|
74
|
+
lines.push('| ' + cells.join(' | ') + ' |');
|
|
75
|
+
}
|
|
76
|
+
return lines.join('\n');
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Build the standard footer hint pointing at the natural next
|
|
80
|
+
* subcommand. Optional; subcommands omit when no clear next step.
|
|
81
|
+
*/
|
|
82
|
+
function markdownFooter(hint) {
|
|
83
|
+
return `\n${hint}`;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Print a JSON envelope to stdout. Output is single-line (no
|
|
87
|
+
* pretty-print) so it stays pipe-friendly for `jq` consumers.
|
|
88
|
+
*/
|
|
89
|
+
function printJson(env) {
|
|
90
|
+
process.stdout.write(JSON.stringify(env) + '\n');
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Print markdown sections to stdout, joined by a blank line. Each
|
|
94
|
+
* section is a multi-line string built by the helpers above.
|
|
95
|
+
*/
|
|
96
|
+
function printMarkdown(...sections) {
|
|
97
|
+
process.stdout.write(sections.filter((s) => s && s.length > 0).join('\n\n') + '\n');
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=format.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/explore/format.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;GAWG;;AA0BH,4BAgBC;AAQD,wCAaC;AAOD,sCAgBC;AAMD,wCAEC;AAMD,8BAEC;AAMD,sCAEC;AAzFD;;;;GAIG;AACH,SAAgB,QAAQ,CACtB,OAAe,EACf,IAA6B,EAC7B,KAAY,EACZ,OAAU;IAEV,OAAO;QACL,OAAO;QACP,IAAI;QACJ,IAAI,EAAE;YACJ,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,gBAAgB,EAAE,KAAK,CAAC,IAAI,CAAC,WAAW;YACxC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AAC,CAAC,EAAE,EAAE;YAC9B,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC;YACjB,OAAO,CAAC,KAAK,SAAS,IAAI,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;IAC9C,CAAC;IACD,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAAC,IAAY;IACzC,OAAO,KAAK,IAAI,EAAE,CAAC;AACrB,CAAC;AAED;;;GAGG;AACH,SAAgB,SAAS,CAAI,GAAuB;IAClD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACnD,CAAC;AAED;;;GAGG;AACH,SAAgB,aAAa,CAAC,GAAG,QAAkB;IACjD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Canonical graph loader. Per CLAUDE.md Rule 12, every consumer of
|
|
3
|
+
* `.dxkit/reports/graph.json` reads via `loadGraph(cwd)` — never
|
|
4
|
+
* `JSON.parse` directly. Arch-check enforces; this is the only file
|
|
5
|
+
* that may parse the artifact.
|
|
6
|
+
*
|
|
7
|
+
* Throws typed errors so callers can react precisely:
|
|
8
|
+
* - GraphNotFoundError → file doesn't exist (suggest --refresh)
|
|
9
|
+
* - GraphSchemaVersionError → wire-format newer than the loader knows
|
|
10
|
+
* - GraphCorruptError → missing/malformed required field
|
|
11
|
+
*/
|
|
12
|
+
import { GRAPH_REPORT_PATH, type Graph } from './types';
|
|
13
|
+
export { GRAPH_REPORT_PATH };
|
|
14
|
+
export declare class GraphNotFoundError extends Error {
|
|
15
|
+
readonly absPath: string;
|
|
16
|
+
constructor(absPath: string);
|
|
17
|
+
}
|
|
18
|
+
export declare class GraphSchemaVersionError extends Error {
|
|
19
|
+
readonly absPath: string;
|
|
20
|
+
readonly found: unknown;
|
|
21
|
+
readonly expected: number;
|
|
22
|
+
constructor(absPath: string, found: unknown, expected: number);
|
|
23
|
+
}
|
|
24
|
+
export declare class GraphCorruptError extends Error {
|
|
25
|
+
readonly absPath: string;
|
|
26
|
+
readonly detail: string;
|
|
27
|
+
constructor(absPath: string, detail: string);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Read + validate + index the graph artifact. The returned `Graph`
|
|
31
|
+
* carries convenience indices (`nodeById`, `edgesFromNode`, ...)
|
|
32
|
+
* built once at load time; queries in `./queries.ts` read from these
|
|
33
|
+
* maps for O(1) traversal rather than repeatedly scanning the arrays.
|
|
34
|
+
*
|
|
35
|
+
* Validation is intentionally lightweight — top-level shape + required
|
|
36
|
+
* fields per node/edge. Deep schema validation (every optional field's
|
|
37
|
+
* types, referential integrity of every edge endpoint) would catch
|
|
38
|
+
* more but cost more on every load; instead we trust the producer and
|
|
39
|
+
* surface unexpected shapes as runtime errors at the query layer.
|
|
40
|
+
*/
|
|
41
|
+
export declare function loadGraph(cwd: string): Graph;
|
|
42
|
+
/**
|
|
43
|
+
* Fail-open variant of {@link loadGraph}: returns undefined on ANY
|
|
44
|
+
* error (missing file, parse failure, schema mismatch) instead of
|
|
45
|
+
* throwing. For additive, never-block consumers — the PreToolUse
|
|
46
|
+
* context hook and the finding-enrichment pass — where a missing or
|
|
47
|
+
* stale graph must degrade to "no context", never an error.
|
|
48
|
+
*/
|
|
49
|
+
export declare function tryLoadGraph(cwd: string): Graph | undefined;
|
|
50
|
+
//# sourceMappingURL=load.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../src/explore/load.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAIH,OAAO,EACL,iBAAiB,EAGjB,KAAK,KAAK,EAIX,MAAM,SAAS,CAAC;AAIjB,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAE7B,qBAAa,kBAAmB,SAAQ,KAAK;aACf,OAAO,EAAE,MAAM;gBAAf,OAAO,EAAE,MAAM;CAM5C;AAED,qBAAa,uBAAwB,SAAQ,KAAK;aAE9B,OAAO,EAAE,MAAM;aACf,KAAK,EAAE,OAAO;aACd,QAAQ,EAAE,MAAM;gBAFhB,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,OAAO,EACd,QAAQ,EAAE,MAAM;CAOnC;AAED,qBAAa,iBAAkB,SAAQ,KAAK;aAExB,OAAO,EAAE,MAAM;aACf,MAAM,EAAE,MAAM;gBADd,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM;CAKjC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAa5C;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS,CAM3D"}
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Canonical graph loader. Per CLAUDE.md Rule 12, every consumer of
|
|
4
|
+
* `.dxkit/reports/graph.json` reads via `loadGraph(cwd)` — never
|
|
5
|
+
* `JSON.parse` directly. Arch-check enforces; this is the only file
|
|
6
|
+
* that may parse the artifact.
|
|
7
|
+
*
|
|
8
|
+
* Throws typed errors so callers can react precisely:
|
|
9
|
+
* - GraphNotFoundError → file doesn't exist (suggest --refresh)
|
|
10
|
+
* - GraphSchemaVersionError → wire-format newer than the loader knows
|
|
11
|
+
* - GraphCorruptError → missing/malformed required field
|
|
12
|
+
*/
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
30
|
+
var ownKeys = function(o) {
|
|
31
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
32
|
+
var ar = [];
|
|
33
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
34
|
+
return ar;
|
|
35
|
+
};
|
|
36
|
+
return ownKeys(o);
|
|
37
|
+
};
|
|
38
|
+
return function (mod) {
|
|
39
|
+
if (mod && mod.__esModule) return mod;
|
|
40
|
+
var result = {};
|
|
41
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
42
|
+
__setModuleDefault(result, mod);
|
|
43
|
+
return result;
|
|
44
|
+
};
|
|
45
|
+
})();
|
|
46
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
47
|
+
exports.GraphCorruptError = exports.GraphSchemaVersionError = exports.GraphNotFoundError = exports.GRAPH_REPORT_PATH = void 0;
|
|
48
|
+
exports.loadGraph = loadGraph;
|
|
49
|
+
exports.tryLoadGraph = tryLoadGraph;
|
|
50
|
+
const fs = __importStar(require("fs"));
|
|
51
|
+
const path = __importStar(require("path"));
|
|
52
|
+
const types_1 = require("./types");
|
|
53
|
+
Object.defineProperty(exports, "GRAPH_REPORT_PATH", { enumerable: true, get: function () { return types_1.GRAPH_REPORT_PATH; } });
|
|
54
|
+
class GraphNotFoundError extends Error {
|
|
55
|
+
absPath;
|
|
56
|
+
constructor(absPath) {
|
|
57
|
+
super(`No graph.json at ${absPath}. Run \`vyuh-dxkit health\` or pass \`--refresh\` to regenerate.`);
|
|
58
|
+
this.absPath = absPath;
|
|
59
|
+
this.name = 'GraphNotFoundError';
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.GraphNotFoundError = GraphNotFoundError;
|
|
63
|
+
class GraphSchemaVersionError extends Error {
|
|
64
|
+
absPath;
|
|
65
|
+
found;
|
|
66
|
+
expected;
|
|
67
|
+
constructor(absPath, found, expected) {
|
|
68
|
+
super(`graph.json at ${absPath} declares schemaVersion=${String(found)}; this dxkit reads schemaVersion=${expected}. Upgrade dxkit (\`npm install -g @vyuhlabs/dxkit@latest\`) to read newer artifacts.`);
|
|
69
|
+
this.absPath = absPath;
|
|
70
|
+
this.found = found;
|
|
71
|
+
this.expected = expected;
|
|
72
|
+
this.name = 'GraphSchemaVersionError';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
exports.GraphSchemaVersionError = GraphSchemaVersionError;
|
|
76
|
+
class GraphCorruptError extends Error {
|
|
77
|
+
absPath;
|
|
78
|
+
detail;
|
|
79
|
+
constructor(absPath, detail) {
|
|
80
|
+
super(`graph.json at ${absPath} is malformed: ${detail}. Regenerate with \`--refresh\`.`);
|
|
81
|
+
this.absPath = absPath;
|
|
82
|
+
this.detail = detail;
|
|
83
|
+
this.name = 'GraphCorruptError';
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.GraphCorruptError = GraphCorruptError;
|
|
87
|
+
/**
|
|
88
|
+
* Read + validate + index the graph artifact. The returned `Graph`
|
|
89
|
+
* carries convenience indices (`nodeById`, `edgesFromNode`, ...)
|
|
90
|
+
* built once at load time; queries in `./queries.ts` read from these
|
|
91
|
+
* maps for O(1) traversal rather than repeatedly scanning the arrays.
|
|
92
|
+
*
|
|
93
|
+
* Validation is intentionally lightweight — top-level shape + required
|
|
94
|
+
* fields per node/edge. Deep schema validation (every optional field's
|
|
95
|
+
* types, referential integrity of every edge endpoint) would catch
|
|
96
|
+
* more but cost more on every load; instead we trust the producer and
|
|
97
|
+
* surface unexpected shapes as runtime errors at the query layer.
|
|
98
|
+
*/
|
|
99
|
+
function loadGraph(cwd) {
|
|
100
|
+
const absPath = path.join(cwd, types_1.GRAPH_REPORT_PATH);
|
|
101
|
+
if (!fs.existsSync(absPath)) {
|
|
102
|
+
throw new GraphNotFoundError(absPath);
|
|
103
|
+
}
|
|
104
|
+
let raw;
|
|
105
|
+
try {
|
|
106
|
+
raw = JSON.parse(fs.readFileSync(absPath, 'utf-8'));
|
|
107
|
+
}
|
|
108
|
+
catch (err) {
|
|
109
|
+
throw new GraphCorruptError(absPath, err instanceof Error ? err.message : 'JSON parse failed');
|
|
110
|
+
}
|
|
111
|
+
const json = validateAndUpgrade(absPath, raw);
|
|
112
|
+
return indexGraph(json);
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Fail-open variant of {@link loadGraph}: returns undefined on ANY
|
|
116
|
+
* error (missing file, parse failure, schema mismatch) instead of
|
|
117
|
+
* throwing. For additive, never-block consumers — the PreToolUse
|
|
118
|
+
* context hook and the finding-enrichment pass — where a missing or
|
|
119
|
+
* stale graph must degrade to "no context", never an error.
|
|
120
|
+
*/
|
|
121
|
+
function tryLoadGraph(cwd) {
|
|
122
|
+
try {
|
|
123
|
+
return loadGraph(cwd);
|
|
124
|
+
}
|
|
125
|
+
catch {
|
|
126
|
+
return undefined;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
function validateAndUpgrade(absPath, raw) {
|
|
130
|
+
if (typeof raw !== 'object' || raw === null || Array.isArray(raw)) {
|
|
131
|
+
throw new GraphCorruptError(absPath, 'top-level value is not an object');
|
|
132
|
+
}
|
|
133
|
+
const obj = raw;
|
|
134
|
+
const v = obj.schemaVersion;
|
|
135
|
+
if (typeof v !== 'number') {
|
|
136
|
+
throw new GraphCorruptError(absPath, 'schemaVersion is missing or not a number');
|
|
137
|
+
}
|
|
138
|
+
if (v > types_1.GRAPH_SCHEMA_VERSION) {
|
|
139
|
+
throw new GraphSchemaVersionError(absPath, v, types_1.GRAPH_SCHEMA_VERSION);
|
|
140
|
+
}
|
|
141
|
+
// Future migrations: switch on v here when v2+ lands. Today v === 1
|
|
142
|
+
// is the only supported version; no migration needed.
|
|
143
|
+
for (const key of ['meta', 'nodes', 'edges', 'communities', 'symbolIndex']) {
|
|
144
|
+
if (!(key in obj)) {
|
|
145
|
+
throw new GraphCorruptError(absPath, `missing required top-level field "${key}"`);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
if (!Array.isArray(obj.nodes)) {
|
|
149
|
+
throw new GraphCorruptError(absPath, '"nodes" is not an array');
|
|
150
|
+
}
|
|
151
|
+
if (!Array.isArray(obj.edges)) {
|
|
152
|
+
throw new GraphCorruptError(absPath, '"edges" is not an array');
|
|
153
|
+
}
|
|
154
|
+
if (!Array.isArray(obj.communities)) {
|
|
155
|
+
throw new GraphCorruptError(absPath, '"communities" is not an array');
|
|
156
|
+
}
|
|
157
|
+
// Trust the rest; runtime errors in queries surface deeper issues.
|
|
158
|
+
return raw;
|
|
159
|
+
}
|
|
160
|
+
function indexGraph(json) {
|
|
161
|
+
const nodeById = new Map();
|
|
162
|
+
for (const n of json.nodes)
|
|
163
|
+
nodeById.set(n.id, n);
|
|
164
|
+
const edgesFromNode = new Map();
|
|
165
|
+
const edgesToNode = new Map();
|
|
166
|
+
for (const e of json.edges) {
|
|
167
|
+
const fromList = edgesFromNode.get(e.from) ?? [];
|
|
168
|
+
fromList.push(e);
|
|
169
|
+
edgesFromNode.set(e.from, fromList);
|
|
170
|
+
const toList = edgesToNode.get(e.to) ?? [];
|
|
171
|
+
toList.push(e);
|
|
172
|
+
edgesToNode.set(e.to, toList);
|
|
173
|
+
}
|
|
174
|
+
const nodesByFile = new Map();
|
|
175
|
+
for (const n of json.nodes) {
|
|
176
|
+
const list = nodesByFile.get(n.sourceFile) ?? [];
|
|
177
|
+
list.push(n);
|
|
178
|
+
nodesByFile.set(n.sourceFile, list);
|
|
179
|
+
}
|
|
180
|
+
const communityById = new Map();
|
|
181
|
+
const communityByNode = new Map();
|
|
182
|
+
for (const c of json.communities) {
|
|
183
|
+
communityById.set(c.id, c);
|
|
184
|
+
for (const nid of c.nodeIds)
|
|
185
|
+
communityByNode.set(nid, c);
|
|
186
|
+
}
|
|
187
|
+
return {
|
|
188
|
+
...json,
|
|
189
|
+
nodeById,
|
|
190
|
+
edgesFromNode,
|
|
191
|
+
edgesToNode,
|
|
192
|
+
nodesByFile,
|
|
193
|
+
communityById,
|
|
194
|
+
communityByNode,
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
//# sourceMappingURL=load.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"load.js","sourceRoot":"","sources":["../../src/explore/load.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8DH,8BAaC;AASD,oCAMC;AAxFD,uCAAyB;AACzB,2CAA6B;AAC7B,mCAQiB;AAIR,kGAXP,yBAAiB,OAWO;AAE1B,MAAa,kBAAmB,SAAQ,KAAK;IACf;IAA5B,YAA4B,OAAe;QACzC,KAAK,CACH,oBAAoB,OAAO,kEAAkE,CAC9F,CAAC;QAHwB,YAAO,GAAP,OAAO,CAAQ;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