grok-cli-hurry-mode 1.0.1 → 1.0.3
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 +60 -12
- package/dist/agent/grok-agent.d.ts +5 -0
- package/dist/agent/grok-agent.js +17 -1
- package/dist/agent/grok-agent.js.map +1 -1
- package/dist/grok/tools.js +257 -0
- package/dist/grok/tools.js.map +1 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/intelligence/ast-parser.d.ts +141 -0
- package/dist/tools/intelligence/ast-parser.js +619 -0
- package/dist/tools/intelligence/ast-parser.js.map +1 -0
- package/dist/tools/intelligence/code-context.d.ts +181 -0
- package/dist/tools/intelligence/code-context.js +573 -0
- package/dist/tools/intelligence/code-context.js.map +1 -0
- package/dist/tools/intelligence/dependency-analyzer.d.ts +124 -0
- package/dist/tools/intelligence/dependency-analyzer.js +469 -0
- package/dist/tools/intelligence/dependency-analyzer.js.map +1 -0
- package/dist/tools/intelligence/index.d.ts +10 -0
- package/dist/tools/intelligence/index.js +6 -0
- package/dist/tools/intelligence/index.js.map +1 -0
- package/dist/tools/intelligence/refactoring-assistant.d.ts +196 -0
- package/dist/tools/intelligence/refactoring-assistant.js +612 -0
- package/dist/tools/intelligence/refactoring-assistant.js.map +1 -0
- package/dist/tools/intelligence/symbol-search.d.ts +121 -0
- package/dist/tools/intelligence/symbol-search.js +336 -0
- package/dist/tools/intelligence/symbol-search.js.map +1 -0
- package/package.json +17 -3
@@ -0,0 +1,141 @@
|
|
1
|
+
import { ToolResult } from "../../types/index.js";
|
2
|
+
export interface ASTNode {
|
3
|
+
type: string;
|
4
|
+
name?: string;
|
5
|
+
startPosition: {
|
6
|
+
row: number;
|
7
|
+
column: number;
|
8
|
+
};
|
9
|
+
endPosition: {
|
10
|
+
row: number;
|
11
|
+
column: number;
|
12
|
+
};
|
13
|
+
text: string;
|
14
|
+
children?: ASTNode[];
|
15
|
+
metadata?: Record<string, any>;
|
16
|
+
}
|
17
|
+
export interface ParseResult {
|
18
|
+
language: string;
|
19
|
+
tree: ASTNode;
|
20
|
+
symbols: SymbolInfo[];
|
21
|
+
imports: ImportInfo[];
|
22
|
+
exports: ExportInfo[];
|
23
|
+
errors: ParseError[];
|
24
|
+
}
|
25
|
+
export interface SymbolInfo {
|
26
|
+
name: string;
|
27
|
+
type: 'function' | 'class' | 'variable' | 'interface' | 'enum' | 'type' | 'method' | 'property';
|
28
|
+
startPosition: {
|
29
|
+
row: number;
|
30
|
+
column: number;
|
31
|
+
};
|
32
|
+
endPosition: {
|
33
|
+
row: number;
|
34
|
+
column: number;
|
35
|
+
};
|
36
|
+
scope: string;
|
37
|
+
accessibility?: 'public' | 'private' | 'protected';
|
38
|
+
isStatic?: boolean;
|
39
|
+
isAsync?: boolean;
|
40
|
+
parameters?: ParameterInfo[];
|
41
|
+
returnType?: string;
|
42
|
+
}
|
43
|
+
export interface ParameterInfo {
|
44
|
+
name: string;
|
45
|
+
type?: string;
|
46
|
+
optional?: boolean;
|
47
|
+
defaultValue?: string;
|
48
|
+
}
|
49
|
+
export interface ImportInfo {
|
50
|
+
source: string;
|
51
|
+
specifiers: ImportSpecifier[];
|
52
|
+
isTypeOnly?: boolean;
|
53
|
+
startPosition: {
|
54
|
+
row: number;
|
55
|
+
column: number;
|
56
|
+
};
|
57
|
+
}
|
58
|
+
export interface ImportSpecifier {
|
59
|
+
name: string;
|
60
|
+
alias?: string;
|
61
|
+
isDefault?: boolean;
|
62
|
+
isNamespace?: boolean;
|
63
|
+
}
|
64
|
+
export interface ExportInfo {
|
65
|
+
name: string;
|
66
|
+
type: 'function' | 'class' | 'variable' | 'interface' | 'enum' | 'type' | 'default';
|
67
|
+
startPosition: {
|
68
|
+
row: number;
|
69
|
+
column: number;
|
70
|
+
};
|
71
|
+
isDefault?: boolean;
|
72
|
+
source?: string;
|
73
|
+
}
|
74
|
+
export interface ParseError {
|
75
|
+
message: string;
|
76
|
+
line: number;
|
77
|
+
column: number;
|
78
|
+
severity: 'error' | 'warning';
|
79
|
+
}
|
80
|
+
export declare class ASTParserTool {
|
81
|
+
name: string;
|
82
|
+
description: string;
|
83
|
+
private parsers;
|
84
|
+
constructor();
|
85
|
+
private initializeParsers;
|
86
|
+
private detectLanguage;
|
87
|
+
execute(args: any): Promise<ToolResult>;
|
88
|
+
private parseWithTypeScript;
|
89
|
+
private parseWithTreeSitter;
|
90
|
+
private extractTypeScriptSymbols;
|
91
|
+
private extractTypeScriptImports;
|
92
|
+
private extractTypeScriptExports;
|
93
|
+
private extractTreeSitterSymbols;
|
94
|
+
private extractTreeSitterImports;
|
95
|
+
private extractTreeSitterExports;
|
96
|
+
private convertTypeScriptAST;
|
97
|
+
private convertTreeSitterAST;
|
98
|
+
private extractNodeName;
|
99
|
+
private getDeclarationType;
|
100
|
+
private matchesScope;
|
101
|
+
getSchema(): {
|
102
|
+
type: string;
|
103
|
+
properties: {
|
104
|
+
filePath: {
|
105
|
+
type: string;
|
106
|
+
description: string;
|
107
|
+
};
|
108
|
+
includeSymbols: {
|
109
|
+
type: string;
|
110
|
+
description: string;
|
111
|
+
default: boolean;
|
112
|
+
};
|
113
|
+
includeImports: {
|
114
|
+
type: string;
|
115
|
+
description: string;
|
116
|
+
default: boolean;
|
117
|
+
};
|
118
|
+
includeTree: {
|
119
|
+
type: string;
|
120
|
+
description: string;
|
121
|
+
default: boolean;
|
122
|
+
};
|
123
|
+
symbolTypes: {
|
124
|
+
type: string;
|
125
|
+
items: {
|
126
|
+
type: string;
|
127
|
+
enum: string[];
|
128
|
+
};
|
129
|
+
description: string;
|
130
|
+
default: string[];
|
131
|
+
};
|
132
|
+
scope: {
|
133
|
+
type: string;
|
134
|
+
enum: string[];
|
135
|
+
description: string;
|
136
|
+
default: string;
|
137
|
+
};
|
138
|
+
};
|
139
|
+
required: string[];
|
140
|
+
};
|
141
|
+
}
|