dsh-plugin-codegraph-tree-sitter 0.1.1 → 0.1.5
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 +1 -1
- package/lib/extract.d.ts +17 -0
- package/lib/extract.js +1709 -22
- package/lib/languages.d.ts +140 -1
- package/lib/languages.js +707 -2
- package/lib/resolve.d.ts +3 -0
- package/lib/resolve.js +44 -3
- package/lib/schema.js +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# dsh-plugin-codegraph-tree-sitter
|
|
2
2
|
|
|
3
|
-
Self-built code-graph indexer. Parses TypeScript, TSX, JavaScript, JSX, Python, and
|
|
3
|
+
Self-built code-graph indexer. Parses TypeScript, TSX, JavaScript, JSX, Python, Go, Java, C, C++, C#, PHP, Rust, Ruby, Zig, Kotlin, Swift, Dart, and Scala with `web-tree-sitter` and writes schema version 4 to `.codegraph/codegraph.db`, so a workspace needs no external indexer. Registers only an indexer, never a store.
|
|
4
4
|
|
|
5
5
|
Part of **[dsh-plugin-codegraph](https://github.com/CC19990113/dsh-plugin-codegraph)** — structural code intelligence for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness).
|
|
6
6
|
|
package/lib/extract.d.ts
CHANGED
|
@@ -26,6 +26,13 @@ export interface RawDefinition {
|
|
|
26
26
|
readonly isExported: boolean;
|
|
27
27
|
readonly isAsync: boolean;
|
|
28
28
|
readonly isStatic: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Decorator names applied to this declaration — recorded as descriptive metadata only, never
|
|
31
|
+
* resolved to an edge (a decorator can be an arbitrary call, e.g. `@app.route('/x')`, with no
|
|
32
|
+
* reliable single "target" the way an import or a base class has one). Empty for every language but
|
|
33
|
+
* Python today.
|
|
34
|
+
*/
|
|
35
|
+
readonly decorators: readonly string[];
|
|
29
36
|
}
|
|
30
37
|
/** One call site this file contains, before callee resolution. */
|
|
31
38
|
export interface RawCall {
|
|
@@ -54,11 +61,21 @@ export interface RawImport {
|
|
|
54
61
|
/** The raw module specifier text, e.g. `./bar` or `fmt`. */
|
|
55
62
|
readonly specifier: string;
|
|
56
63
|
}
|
|
64
|
+
/** One `extends`/`implements` reference a captured class or interface declares, before resolution. */
|
|
65
|
+
export interface RawHeritageRef {
|
|
66
|
+
/** The declaring class or interface's own {@link RawDefinition.key}. */
|
|
67
|
+
readonly sourceKey: string;
|
|
68
|
+
/** The base/interface's simple name — a member expression or call (a mixin, `class X extends f(Y)`)
|
|
69
|
+
* is not a name this package attempts to resolve, matching its existing "don't guess" precedent. */
|
|
70
|
+
readonly targetName: string;
|
|
71
|
+
readonly relation: 'extends' | 'implements';
|
|
72
|
+
}
|
|
57
73
|
/** Everything one file's walk produced. */
|
|
58
74
|
export interface FileExtraction {
|
|
59
75
|
readonly definitions: RawDefinition[];
|
|
60
76
|
readonly calls: RawCall[];
|
|
61
77
|
readonly imports: RawImport[];
|
|
78
|
+
readonly heritage: RawHeritageRef[];
|
|
62
79
|
}
|
|
63
80
|
/**
|
|
64
81
|
* Extract every definition, call, and import from one parsed file.
|