pi-shazam 0.1.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/dist/core/cache.d.ts +50 -0
- package/dist/core/cache.d.ts.map +1 -0
- package/dist/core/cache.js +116 -0
- package/dist/core/cache.js.map +1 -0
- package/dist/core/encoding.d.ts +25 -0
- package/dist/core/encoding.d.ts.map +1 -0
- package/dist/core/encoding.js +109 -0
- package/dist/core/encoding.js.map +1 -0
- package/dist/core/graph.d.ts +146 -0
- package/dist/core/graph.d.ts.map +1 -0
- package/dist/core/graph.js +224 -0
- package/dist/core/graph.js.map +1 -0
- package/dist/core/pagerank.d.ts +19 -0
- package/dist/core/pagerank.d.ts.map +1 -0
- package/dist/core/pagerank.js +106 -0
- package/dist/core/pagerank.js.map +1 -0
- package/dist/core/scanner.d.ts +19 -0
- package/dist/core/scanner.d.ts.map +1 -0
- package/dist/core/scanner.js +266 -0
- package/dist/core/scanner.js.map +1 -0
- package/dist/core/treesitter-queries.d.ts +19 -0
- package/dist/core/treesitter-queries.d.ts.map +1 -0
- package/dist/core/treesitter-queries.js +222 -0
- package/dist/core/treesitter-queries.js.map +1 -0
- package/dist/core/treesitter.d.ts +67 -0
- package/dist/core/treesitter.d.ts.map +1 -0
- package/dist/core/treesitter.js +624 -0
- package/dist/core/treesitter.js.map +1 -0
- package/dist/hooks/after-write.d.ts +32 -0
- package/dist/hooks/after-write.d.ts.map +1 -0
- package/dist/hooks/after-write.js +111 -0
- package/dist/hooks/after-write.js.map +1 -0
- package/dist/hooks/before-start.d.ts +23 -0
- package/dist/hooks/before-start.d.ts.map +1 -0
- package/dist/hooks/before-start.js +43 -0
- package/dist/hooks/before-start.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/lsp/client.d.ts +77 -0
- package/dist/lsp/client.d.ts.map +1 -0
- package/dist/lsp/client.js +355 -0
- package/dist/lsp/client.js.map +1 -0
- package/dist/lsp/manager.d.ts +85 -0
- package/dist/lsp/manager.d.ts.map +1 -0
- package/dist/lsp/manager.js +362 -0
- package/dist/lsp/manager.js.map +1 -0
- package/dist/lsp/servers.d.ts +43 -0
- package/dist/lsp/servers.d.ts.map +1 -0
- package/dist/lsp/servers.js +140 -0
- package/dist/lsp/servers.js.map +1 -0
- package/dist/lsp/setup.d.ts +24 -0
- package/dist/lsp/setup.d.ts.map +1 -0
- package/dist/lsp/setup.js +140 -0
- package/dist/lsp/setup.js.map +1 -0
- package/dist/tools/call_chain.d.ts +9 -0
- package/dist/tools/call_chain.d.ts.map +1 -0
- package/dist/tools/call_chain.js +151 -0
- package/dist/tools/call_chain.js.map +1 -0
- package/dist/tools/check.d.ts +18 -0
- package/dist/tools/check.d.ts.map +1 -0
- package/dist/tools/check.js +141 -0
- package/dist/tools/check.js.map +1 -0
- package/dist/tools/codequery.d.ts +19 -0
- package/dist/tools/codequery.d.ts.map +1 -0
- package/dist/tools/codequery.js +128 -0
- package/dist/tools/codequery.js.map +1 -0
- package/dist/tools/codesearch.d.ts +8 -0
- package/dist/tools/codesearch.d.ts.map +1 -0
- package/dist/tools/codesearch.js +101 -0
- package/dist/tools/codesearch.js.map +1 -0
- package/dist/tools/file_detail.d.ts +9 -0
- package/dist/tools/file_detail.d.ts.map +1 -0
- package/dist/tools/file_detail.js +125 -0
- package/dist/tools/file_detail.js.map +1 -0
- package/dist/tools/fix.d.ts +25 -0
- package/dist/tools/fix.d.ts.map +1 -0
- package/dist/tools/fix.js +257 -0
- package/dist/tools/fix.js.map +1 -0
- package/dist/tools/hotspots.d.ts +9 -0
- package/dist/tools/hotspots.d.ts.map +1 -0
- package/dist/tools/hotspots.js +107 -0
- package/dist/tools/hotspots.js.map +1 -0
- package/dist/tools/impact.d.ts +14 -0
- package/dist/tools/impact.d.ts.map +1 -0
- package/dist/tools/impact.js +160 -0
- package/dist/tools/impact.js.map +1 -0
- package/dist/tools/orphan.d.ts +9 -0
- package/dist/tools/orphan.d.ts.map +1 -0
- package/dist/tools/orphan.js +124 -0
- package/dist/tools/orphan.js.map +1 -0
- package/dist/tools/overview.d.ts +9 -0
- package/dist/tools/overview.d.ts.map +1 -0
- package/dist/tools/overview.js +137 -0
- package/dist/tools/overview.js.map +1 -0
- package/dist/tools/ready.d.ts +18 -0
- package/dist/tools/ready.d.ts.map +1 -0
- package/dist/tools/ready.js +145 -0
- package/dist/tools/ready.js.map +1 -0
- package/dist/tools/refs.d.ts +9 -0
- package/dist/tools/refs.d.ts.map +1 -0
- package/dist/tools/refs.js +129 -0
- package/dist/tools/refs.js.map +1 -0
- package/dist/tools/routes.d.ts +8 -0
- package/dist/tools/routes.d.ts.map +1 -0
- package/dist/tools/routes.js +83 -0
- package/dist/tools/routes.js.map +1 -0
- package/dist/tools/state_map.d.ts +8 -0
- package/dist/tools/state_map.d.ts.map +1 -0
- package/dist/tools/state_map.js +95 -0
- package/dist/tools/state_map.js.map +1 -0
- package/dist/tools/symbol.d.ts +9 -0
- package/dist/tools/symbol.d.ts.map +1 -0
- package/dist/tools/symbol.js +84 -0
- package/dist/tools/symbol.js.map +1 -0
- package/dist/tools/verify.d.ts +24 -0
- package/dist/tools/verify.d.ts.map +1 -0
- package/dist/tools/verify.js +212 -0
- package/dist/tools/verify.js.map +1 -0
- package/package.json +70 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pi-shazam core/cache — Graph baseline save/diff for incremental analysis.
|
|
3
|
+
*
|
|
4
|
+
* Ported from repomap/src/__init__.py (get_project_cache_dir, compare_graph_snapshots,
|
|
5
|
+
* IncrementalCache).
|
|
6
|
+
*
|
|
7
|
+
* Uses Node.js fs + path for file I/O, matching repomap's convention of
|
|
8
|
+
* storing cache under ~/.cache/repomap/<project-slug>.
|
|
9
|
+
*/
|
|
10
|
+
import { serializeGraph, serializeSymbol, serializeEdge, compareGraphSnapshots } from "./graph.js";
|
|
11
|
+
import type { RepoGraph, SerializedGraph, GraphDiff } from "./graph.js";
|
|
12
|
+
/**
|
|
13
|
+
* Get the cache directory for a specific project.
|
|
14
|
+
* Uses MD5 hash of canonical path for isolation.
|
|
15
|
+
*/
|
|
16
|
+
export declare function getProjectCacheDir(projectPath: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Get the standard cache file paths for a project.
|
|
19
|
+
*/
|
|
20
|
+
export declare function getCachePaths(projectPath: string): {
|
|
21
|
+
symbols: string;
|
|
22
|
+
git: string;
|
|
23
|
+
lastSnapshot: string;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Save the current graph as a baseline snapshot.
|
|
27
|
+
*/
|
|
28
|
+
export declare function saveBaseline(graph: RepoGraph, projectPath: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* Load a previously saved baseline snapshot.
|
|
31
|
+
*/
|
|
32
|
+
export declare function loadBaseline(projectPath: string): SerializedGraph | null;
|
|
33
|
+
/**
|
|
34
|
+
* Save the last snapshot (timestamp + metadata only, not full graph).
|
|
35
|
+
*/
|
|
36
|
+
export declare function saveLastSnapshot(projectPath: string, metadata: Record<string, unknown>): string;
|
|
37
|
+
/**
|
|
38
|
+
* Load the last snapshot metadata.
|
|
39
|
+
*/
|
|
40
|
+
export declare function loadLastSnapshot(projectPath: string): Record<string, unknown> | null;
|
|
41
|
+
/**
|
|
42
|
+
* Compute the difference between the current graph and a saved baseline.
|
|
43
|
+
* Returns a structured diff with added/removed/modified symbols and edges.
|
|
44
|
+
*/
|
|
45
|
+
export declare function diffBaseline(graph: RepoGraph, projectPath: string): GraphDiff | null;
|
|
46
|
+
/**
|
|
47
|
+
* Re-export serialization helpers for convenience.
|
|
48
|
+
*/
|
|
49
|
+
export { serializeGraph, serializeSymbol, serializeEdge, compareGraphSnapshots, };
|
|
50
|
+
//# sourceMappingURL=cache.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.d.ts","sourceRoot":"","sources":["../../core/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EACX,SAAS,EACT,eAAe,EACf,SAAS,EAGT,MAAM,YAAY,CAAC;AAMpB;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAO9D;AAED;;GAEG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG;IACnD,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,EAAE,MAAM,CAAC;CACrB,CAOA;AAID;;GAEG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,MAAM,CAM1E;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,GAAG,IAAI,CASxE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC/B,WAAW,EAAE,MAAM,EACnB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAC/B,MAAM,CASR;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC/B,WAAW,EAAE,MAAM,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAShC;AAID;;;GAGG;AACH,wBAAgB,YAAY,CAC3B,KAAK,EAAE,SAAS,EAChB,WAAW,EAAE,MAAM,GACjB,SAAS,GAAG,IAAI,CAkBlB;AAED;;GAEG;AACH,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,GACrB,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pi-shazam core/cache — Graph baseline save/diff for incremental analysis.
|
|
3
|
+
*
|
|
4
|
+
* Ported from repomap/src/__init__.py (get_project_cache_dir, compare_graph_snapshots,
|
|
5
|
+
* IncrementalCache).
|
|
6
|
+
*
|
|
7
|
+
* Uses Node.js fs + path for file I/O, matching repomap's convention of
|
|
8
|
+
* storing cache under ~/.cache/repomap/<project-slug>.
|
|
9
|
+
*/
|
|
10
|
+
import { mkdirSync, readFileSync, writeFileSync, existsSync } from "node:fs";
|
|
11
|
+
import { join, dirname } from "node:path";
|
|
12
|
+
import { homedir } from "node:os";
|
|
13
|
+
import { createHash } from "node:crypto";
|
|
14
|
+
import { serializeGraph, serializeSymbol, serializeEdge, compareGraphSnapshots, } from "./graph.js";
|
|
15
|
+
// ── Cache directory management ───────────────────────────────────────────────
|
|
16
|
+
const CACHE_ROOT = join(homedir(), ".cache", "repomap");
|
|
17
|
+
/**
|
|
18
|
+
* Get the cache directory for a specific project.
|
|
19
|
+
* Uses MD5 hash of canonical path for isolation.
|
|
20
|
+
*/
|
|
21
|
+
export function getProjectCacheDir(projectPath) {
|
|
22
|
+
const canonical = projectPath.replace(/\/$/, "");
|
|
23
|
+
const hash = createHash("md5").update(canonical).digest("hex").slice(0, 8);
|
|
24
|
+
const projectName = canonical.split("/").pop() || "unknown";
|
|
25
|
+
const cacheDir = join(CACHE_ROOT, `${projectName}_${hash}`);
|
|
26
|
+
mkdirSync(cacheDir, { recursive: true });
|
|
27
|
+
return cacheDir;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the standard cache file paths for a project.
|
|
31
|
+
*/
|
|
32
|
+
export function getCachePaths(projectPath) {
|
|
33
|
+
const dir = getProjectCacheDir(projectPath);
|
|
34
|
+
return {
|
|
35
|
+
symbols: join(dir, "symbols.json"),
|
|
36
|
+
git: join(dir, "git.json"),
|
|
37
|
+
lastSnapshot: join(dir, "last_snapshot.json"),
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// ── Baseline save/load ───────────────────────────────────────────────────────
|
|
41
|
+
/**
|
|
42
|
+
* Save the current graph as a baseline snapshot.
|
|
43
|
+
*/
|
|
44
|
+
export function saveBaseline(graph, projectPath) {
|
|
45
|
+
const { symbols } = getCachePaths(projectPath);
|
|
46
|
+
const serialized = serializeGraph(graph);
|
|
47
|
+
mkdirSync(dirname(symbols), { recursive: true });
|
|
48
|
+
writeFileSync(symbols, JSON.stringify(serialized, null, 2), "utf-8");
|
|
49
|
+
return symbols;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Load a previously saved baseline snapshot.
|
|
53
|
+
*/
|
|
54
|
+
export function loadBaseline(projectPath) {
|
|
55
|
+
const { symbols } = getCachePaths(projectPath);
|
|
56
|
+
if (!existsSync(symbols))
|
|
57
|
+
return null;
|
|
58
|
+
try {
|
|
59
|
+
const raw = readFileSync(symbols, "utf-8");
|
|
60
|
+
return JSON.parse(raw);
|
|
61
|
+
}
|
|
62
|
+
catch {
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Save the last snapshot (timestamp + metadata only, not full graph).
|
|
68
|
+
*/
|
|
69
|
+
export function saveLastSnapshot(projectPath, metadata) {
|
|
70
|
+
const { lastSnapshot } = getCachePaths(projectPath);
|
|
71
|
+
const data = {
|
|
72
|
+
timestamp: Date.now(),
|
|
73
|
+
...metadata,
|
|
74
|
+
};
|
|
75
|
+
mkdirSync(dirname(lastSnapshot), { recursive: true });
|
|
76
|
+
writeFileSync(lastSnapshot, JSON.stringify(data, null, 2), "utf-8");
|
|
77
|
+
return lastSnapshot;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Load the last snapshot metadata.
|
|
81
|
+
*/
|
|
82
|
+
export function loadLastSnapshot(projectPath) {
|
|
83
|
+
const { lastSnapshot } = getCachePaths(projectPath);
|
|
84
|
+
if (!existsSync(lastSnapshot))
|
|
85
|
+
return null;
|
|
86
|
+
try {
|
|
87
|
+
const raw = readFileSync(lastSnapshot, "utf-8");
|
|
88
|
+
return JSON.parse(raw);
|
|
89
|
+
}
|
|
90
|
+
catch {
|
|
91
|
+
return null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
// ── Graph diff (current vs baseline) ─────────────────────────────────────────
|
|
95
|
+
/**
|
|
96
|
+
* Compute the difference between the current graph and a saved baseline.
|
|
97
|
+
* Returns a structured diff with added/removed/modified symbols and edges.
|
|
98
|
+
*/
|
|
99
|
+
export function diffBaseline(graph, projectPath) {
|
|
100
|
+
const baseline = loadBaseline(projectPath);
|
|
101
|
+
if (!baseline)
|
|
102
|
+
return null;
|
|
103
|
+
const currentSymbols = [...graph.symbols.values()];
|
|
104
|
+
const currentEdges = [];
|
|
105
|
+
for (const [, edges] of graph.outgoing) {
|
|
106
|
+
for (const e of edges) {
|
|
107
|
+
currentEdges.push(e);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
return compareGraphSnapshots(currentSymbols, currentEdges, baseline.symbols, baseline.edges);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Re-export serialization helpers for convenience.
|
|
114
|
+
*/
|
|
115
|
+
export { serializeGraph, serializeSymbol, serializeEdge, compareGraphSnapshots, };
|
|
116
|
+
//# sourceMappingURL=cache.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cache.js","sourceRoot":"","sources":["../../core/cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,GACrB,MAAM,YAAY,CAAC;AASpB,gFAAgF;AAEhF,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,QAAQ,EAAE,SAAS,CAAC,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AAO,CAAC,CAAC;QAChD,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAA4B,CAAC;IACnD,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAED,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,UAAU,YAAY,CAC3B,KAAgB,EAChB,WAAmB;IAEnB,MAAM,QAAQ,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;IAC3C,IAAI,CAAC,QAAQ;QAAE,OAAO,IAAI,CAAC;IAE3B,MAAM,cAAc,GAAa,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IAC7D,MAAM,YAAY,GAAW,EAAE,CAAC;IAChC,KAAK,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;QACxC,KAAK,MAAM,CAAC,IAAI,KAAK,EAAE,CAAC;YACvB,YAAY,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,CAAC;IACF,CAAC;IAED,OAAO,qBAAqB,CAC3B,cAAc,EACd,YAAY,EACZ,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,KAAK,CACd,CAAC;AACH,CAAC;AAED;;GAEG;AACH,OAAO,EACN,cAAc,EACd,eAAe,EACf,aAAa,EACb,qBAAqB,GACrB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pi-shazam core/encoding — Adaptive file encoding reader.
|
|
3
|
+
*
|
|
4
|
+
* Reads files with UTF-8 → GBK → GB2312 fallback.
|
|
5
|
+
* Ported from repomap's encoding detection pattern.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Read a file with adaptive encoding fallback:
|
|
9
|
+
* 1. Try UTF-8
|
|
10
|
+
* 2. Try GBK (cp936)
|
|
11
|
+
* 3. Try GB2312
|
|
12
|
+
*
|
|
13
|
+
* Returns the decoded string content.
|
|
14
|
+
*/
|
|
15
|
+
export declare function readFileAdaptive(filePath: string): string;
|
|
16
|
+
/**
|
|
17
|
+
* Detect the most likely encoding for a buffer.
|
|
18
|
+
* Returns one of: "utf-8", "gbk", "gb2312", "unknown".
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectEncoding(buffer: Buffer): string;
|
|
21
|
+
/**
|
|
22
|
+
* Read a file with specific encoding.
|
|
23
|
+
*/
|
|
24
|
+
export declare function readFileWithEncoding(filePath: string, encoding: string): string;
|
|
25
|
+
//# sourceMappingURL=encoding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoding.d.ts","sourceRoot":"","sources":["../../core/encoding.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAOH;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAiBzD;AAID;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAiCrD;AAiCD;;GAEG;AACH,wBAAgB,oBAAoB,CACnC,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,GACd,MAAM,CAMR"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pi-shazam core/encoding — Adaptive file encoding reader.
|
|
3
|
+
*
|
|
4
|
+
* Reads files with UTF-8 → GBK → GB2312 fallback.
|
|
5
|
+
* Ported from repomap's encoding detection pattern.
|
|
6
|
+
*/
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
import * as iconv from "iconv-lite";
|
|
9
|
+
// ── Encoding detection and reading ───────────────────────────────────────────
|
|
10
|
+
/**
|
|
11
|
+
* Read a file with adaptive encoding fallback:
|
|
12
|
+
* 1. Try UTF-8
|
|
13
|
+
* 2. Try GBK (cp936)
|
|
14
|
+
* 3. Try GB2312
|
|
15
|
+
*
|
|
16
|
+
* Returns the decoded string content.
|
|
17
|
+
*/
|
|
18
|
+
export function readFileAdaptive(filePath) {
|
|
19
|
+
const buffer = readFileSync(filePath);
|
|
20
|
+
// Try UTF-8 first
|
|
21
|
+
const utf8Result = tryDecode(buffer, "utf-8");
|
|
22
|
+
if (utf8Result !== null)
|
|
23
|
+
return utf8Result;
|
|
24
|
+
// Try GBK
|
|
25
|
+
const gbkResult = tryDecode(buffer, "gbk");
|
|
26
|
+
if (gbkResult !== null)
|
|
27
|
+
return gbkResult;
|
|
28
|
+
// Try GB2312
|
|
29
|
+
const gbResult = tryDecode(buffer, "gb2312");
|
|
30
|
+
if (gbResult !== null)
|
|
31
|
+
return gbResult;
|
|
32
|
+
// Last resort: UTF-8 with replacement
|
|
33
|
+
return buffer.toString("utf-8");
|
|
34
|
+
}
|
|
35
|
+
// ── Encoding detection ───────────────────────────────────────────────────────
|
|
36
|
+
/**
|
|
37
|
+
* Detect the most likely encoding for a buffer.
|
|
38
|
+
* Returns one of: "utf-8", "gbk", "gb2312", "unknown".
|
|
39
|
+
*/
|
|
40
|
+
export function detectEncoding(buffer) {
|
|
41
|
+
// UTF-8 BOM check
|
|
42
|
+
if (buffer.length >= 3 &&
|
|
43
|
+
buffer[0] === 0xef &&
|
|
44
|
+
buffer[1] === 0xbb &&
|
|
45
|
+
buffer[2] === 0xbf) {
|
|
46
|
+
return "utf-8";
|
|
47
|
+
}
|
|
48
|
+
// Try UTF-8 validation
|
|
49
|
+
const utf8Result = tryDecode(buffer, "utf-8");
|
|
50
|
+
if (utf8Result !== null)
|
|
51
|
+
return "utf-8";
|
|
52
|
+
// Check for GBK/GB2312 patterns (high bytes 0x81-0xfe)
|
|
53
|
+
let gbkBytes = 0;
|
|
54
|
+
for (let i = 0; i < buffer.length; i++) {
|
|
55
|
+
const byte = buffer[i];
|
|
56
|
+
if (byte !== undefined && byte >= 0x81 && byte <= 0xfe) {
|
|
57
|
+
gbkBytes++;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
if (gbkBytes > buffer.length * 0.3) {
|
|
61
|
+
const gbkResult = tryDecode(buffer, "gbk");
|
|
62
|
+
if (gbkResult !== null)
|
|
63
|
+
return "gbk";
|
|
64
|
+
const gbResult = tryDecode(buffer, "gb2312");
|
|
65
|
+
if (gbResult !== null)
|
|
66
|
+
return "gb2312";
|
|
67
|
+
}
|
|
68
|
+
return "unknown";
|
|
69
|
+
}
|
|
70
|
+
// ── Internal helpers ─────────────────────────────────────────────────────────
|
|
71
|
+
/**
|
|
72
|
+
* Try to decode a buffer with a given encoding.
|
|
73
|
+
* Returns the decoded string if successful, or null if invalid.
|
|
74
|
+
*/
|
|
75
|
+
function tryDecode(buffer, encoding) {
|
|
76
|
+
try {
|
|
77
|
+
if (encoding === "utf-8") {
|
|
78
|
+
// Validate UTF-8 by decoding and checking for replacement characters
|
|
79
|
+
const str = buffer.toString("utf-8");
|
|
80
|
+
// Check for common UTF-8 decode failure marker
|
|
81
|
+
if (str.includes("\ufffd") && buffer.length > 16) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
return str;
|
|
85
|
+
}
|
|
86
|
+
// For iconv-lite encodings, decode and check for errors
|
|
87
|
+
const str = iconv.decode(buffer, encoding);
|
|
88
|
+
// iconv-lite uses replacement chars, so check if the result seems valid
|
|
89
|
+
// by verifying the decoded content doesn't have too many unknown chars
|
|
90
|
+
if (str.length === 0 && buffer.length > 0)
|
|
91
|
+
return null;
|
|
92
|
+
return str;
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
// ── Convenience ──────────────────────────────────────────────────────────────
|
|
99
|
+
/**
|
|
100
|
+
* Read a file with specific encoding.
|
|
101
|
+
*/
|
|
102
|
+
export function readFileWithEncoding(filePath, encoding) {
|
|
103
|
+
const buffer = readFileSync(filePath);
|
|
104
|
+
if (encoding === "utf-8") {
|
|
105
|
+
return buffer.toString("utf-8");
|
|
106
|
+
}
|
|
107
|
+
return iconv.decode(buffer, encoding);
|
|
108
|
+
}
|
|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AAE,QAAQ,CAAC,CAAC;QAC3C,wEAAwE;QACxE,uEAAuE;QACvE,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,IAAI,CAAC;QACvD,OAAO,GAAG,CAAC;IACZ,CAAC;IAAC,MAAM,CAAC;QACR,OAAO,IAAI,CAAC;IACb,CAAC;AACF,CAAC;AAED,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,oBAAoB,CACnC,QAAgB,EAChB,QAAgB;IAEhB,MAAM,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAC;IACtC,IAAI,QAAQ,KAAK,OAAO,EAAE,CAAC;QAC1B,OAAO,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* pi-shazam core/graph — Symbol dependency graph data model.
|
|
3
|
+
*
|
|
4
|
+
* Ported from repomap/src/__init__.py (Symbol, Edge, RepoGraph dataclasses).
|
|
5
|
+
* All other core/ modules depend on these types.
|
|
6
|
+
*/
|
|
7
|
+
/** A code symbol (function, class, interface, etc.) */
|
|
8
|
+
export interface Symbol {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
kind: string;
|
|
12
|
+
file: string;
|
|
13
|
+
line: number;
|
|
14
|
+
endLine: number;
|
|
15
|
+
col: number;
|
|
16
|
+
visibility: "public" | "private" | "exported";
|
|
17
|
+
docstring: string;
|
|
18
|
+
signature: string;
|
|
19
|
+
returnType: string;
|
|
20
|
+
params: string;
|
|
21
|
+
pagerank: number;
|
|
22
|
+
}
|
|
23
|
+
/** A directed edge in the dependency graph */
|
|
24
|
+
export interface Edge {
|
|
25
|
+
source: string;
|
|
26
|
+
target: string;
|
|
27
|
+
weight: number;
|
|
28
|
+
kind: string;
|
|
29
|
+
confidence: number;
|
|
30
|
+
}
|
|
31
|
+
/** Full symbol dependency graph */
|
|
32
|
+
export interface RepoGraph {
|
|
33
|
+
symbols: Map<string, Symbol>;
|
|
34
|
+
outgoing: Map<string, Edge[]>;
|
|
35
|
+
incoming: Map<string, Edge[]>;
|
|
36
|
+
fileSymbols: Map<string, string[]>;
|
|
37
|
+
fileImports: Map<string, string[]>;
|
|
38
|
+
fileCalls: Map<string, [string, number, string][]>;
|
|
39
|
+
fileImportBindings: Map<string, JSImportBinding[]>;
|
|
40
|
+
fileExports: Map<string, JSExportBinding[]>;
|
|
41
|
+
}
|
|
42
|
+
/** A JS/TS import binding */
|
|
43
|
+
export interface JSImportBinding {
|
|
44
|
+
localName: string;
|
|
45
|
+
importedName: string;
|
|
46
|
+
module: string;
|
|
47
|
+
line: number;
|
|
48
|
+
kind: "default" | "named" | "namespace";
|
|
49
|
+
}
|
|
50
|
+
/** A JS/TS export binding */
|
|
51
|
+
export interface JSExportBinding {
|
|
52
|
+
exportedName: string;
|
|
53
|
+
sourceName: string | null;
|
|
54
|
+
module: string | null;
|
|
55
|
+
line: number;
|
|
56
|
+
kind: "local" | "reexport" | "namespace" | "wildcard";
|
|
57
|
+
}
|
|
58
|
+
export declare function createRepoGraph(): RepoGraph;
|
|
59
|
+
export declare function createSymbol(id: string, name: string, kind: string, file: string, line: number, overrides?: Partial<Symbol>): Symbol;
|
|
60
|
+
export declare function createEdge(source: string, target: string, weight: number, kind: string, confidence?: number): Edge;
|
|
61
|
+
export interface SerializedSymbol {
|
|
62
|
+
id: string;
|
|
63
|
+
name: string;
|
|
64
|
+
kind: string;
|
|
65
|
+
file: string;
|
|
66
|
+
line: number;
|
|
67
|
+
endLine: number;
|
|
68
|
+
col: number;
|
|
69
|
+
visibility: string;
|
|
70
|
+
signature: string;
|
|
71
|
+
returnType: string;
|
|
72
|
+
params: string;
|
|
73
|
+
docstring: string;
|
|
74
|
+
pagerank: number;
|
|
75
|
+
}
|
|
76
|
+
export interface SerializedEdge {
|
|
77
|
+
source: string;
|
|
78
|
+
target: string;
|
|
79
|
+
weight: number;
|
|
80
|
+
kind: string;
|
|
81
|
+
}
|
|
82
|
+
export interface SerializedGraph {
|
|
83
|
+
symbols: SerializedSymbol[];
|
|
84
|
+
edges: SerializedEdge[];
|
|
85
|
+
version: number;
|
|
86
|
+
timestamp: number;
|
|
87
|
+
}
|
|
88
|
+
export declare function serializeSymbol(sym: Symbol): SerializedSymbol;
|
|
89
|
+
export declare function serializeEdge(edge: Edge): SerializedEdge;
|
|
90
|
+
export declare function serializeGraph(graph: RepoGraph): SerializedGraph;
|
|
91
|
+
export interface GraphDiff {
|
|
92
|
+
summary: {
|
|
93
|
+
added: number;
|
|
94
|
+
removed: number;
|
|
95
|
+
modified: number;
|
|
96
|
+
edgesAdded: number;
|
|
97
|
+
edgesRemoved: number;
|
|
98
|
+
};
|
|
99
|
+
addedSymbols: {
|
|
100
|
+
id: string;
|
|
101
|
+
name: string;
|
|
102
|
+
file: string;
|
|
103
|
+
line: number;
|
|
104
|
+
}[];
|
|
105
|
+
removedSymbols: {
|
|
106
|
+
id: string;
|
|
107
|
+
name: string;
|
|
108
|
+
file: string;
|
|
109
|
+
line: number;
|
|
110
|
+
}[];
|
|
111
|
+
modifiedSymbols: ModifiedSymbol[];
|
|
112
|
+
callChainChanges: {
|
|
113
|
+
newCalls: {
|
|
114
|
+
from: string;
|
|
115
|
+
to: string;
|
|
116
|
+
kind: string;
|
|
117
|
+
}[];
|
|
118
|
+
removedCalls: {
|
|
119
|
+
from: string;
|
|
120
|
+
to: string;
|
|
121
|
+
kind: string;
|
|
122
|
+
}[];
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
export interface ModifiedSymbol {
|
|
126
|
+
id: string;
|
|
127
|
+
name: string;
|
|
128
|
+
file: string;
|
|
129
|
+
visibility: string;
|
|
130
|
+
kind: string;
|
|
131
|
+
lineChange: string;
|
|
132
|
+
oldSignature: string;
|
|
133
|
+
newSignature: string;
|
|
134
|
+
signatureChanged: boolean;
|
|
135
|
+
affectedCallers?: {
|
|
136
|
+
symbolId: string;
|
|
137
|
+
kind: string;
|
|
138
|
+
}[];
|
|
139
|
+
affectedCallerCount?: number;
|
|
140
|
+
risk?: "HIGH" | "MEDIUM" | "LOW";
|
|
141
|
+
}
|
|
142
|
+
export declare function compareGraphSnapshots(currentSymbols: Symbol[], currentEdges: Edge[], previousSymbols: SerializedSymbol[], previousEdges: SerializedEdge[]): GraphDiff;
|
|
143
|
+
export declare const LOW_SIGNAL_KINDS: Set<string>;
|
|
144
|
+
export declare const BOILERPLATE_NAMES: Set<string>;
|
|
145
|
+
export declare function signalWeightForSymbol(kind: string, name: string, visibility: string): number;
|
|
146
|
+
//# sourceMappingURL=graph.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../core/graph.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,uDAAuD;AACvD,MAAM,WAAW,MAAM;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,QAAQ,GAAG,SAAS,GAAG,UAAU,CAAC;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;CACjB;AAED,8CAA8C;AAC9C,MAAM,WAAW,IAAI;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb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