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.
@@ -0,0 +1,196 @@
1
+ import { ToolResult } from "../../types/index.js";
2
+ export interface RefactoringOperation {
3
+ type: 'rename' | 'extract_function' | 'extract_variable' | 'inline_function' | 'inline_variable' | 'move_function' | 'move_class';
4
+ description: string;
5
+ files: RefactoringFileChange[];
6
+ preview: string;
7
+ safety: SafetyAnalysis;
8
+ rollback?: string;
9
+ }
10
+ export interface RefactoringFileChange {
11
+ filePath: string;
12
+ changes: TextChange[];
13
+ backup?: string;
14
+ }
15
+ export interface TextChange {
16
+ startLine: number;
17
+ startColumn: number;
18
+ endLine: number;
19
+ endColumn: number;
20
+ oldText: string;
21
+ newText: string;
22
+ type: 'replace' | 'insert' | 'delete';
23
+ }
24
+ export interface SafetyAnalysis {
25
+ riskLevel: 'low' | 'medium' | 'high';
26
+ potentialIssues: string[];
27
+ affectedFiles: number;
28
+ affectedSymbols: number;
29
+ requiresTests: boolean;
30
+ breakingChanges: boolean;
31
+ }
32
+ export interface RenameRequest {
33
+ symbolName: string;
34
+ newName: string;
35
+ filePath?: string;
36
+ scope: 'file' | 'project' | 'global';
37
+ includeComments: boolean;
38
+ includeStrings: boolean;
39
+ }
40
+ export interface ExtractFunctionRequest {
41
+ filePath: string;
42
+ startLine: number;
43
+ endLine: number;
44
+ functionName: string;
45
+ parameters?: ExtractedParameter[];
46
+ returnType?: string;
47
+ }
48
+ export interface ExtractedParameter {
49
+ name: string;
50
+ type?: string;
51
+ defaultValue?: string;
52
+ }
53
+ export interface MoveRequest {
54
+ symbolName: string;
55
+ sourceFile: string;
56
+ targetFile: string;
57
+ createTargetFile?: boolean;
58
+ }
59
+ export interface InlineRequest {
60
+ symbolName: string;
61
+ filePath: string;
62
+ preserveComments: boolean;
63
+ }
64
+ export declare class RefactoringAssistantTool {
65
+ name: string;
66
+ description: string;
67
+ private astParser;
68
+ private symbolSearch;
69
+ private multiFileEditor;
70
+ private operationHistory;
71
+ constructor();
72
+ execute(args: any): Promise<ToolResult>;
73
+ private performRename;
74
+ private performExtractFunction;
75
+ private performExtractVariable;
76
+ private performInlineFunction;
77
+ private performInlineVariable;
78
+ private performMove;
79
+ private isValidIdentifier;
80
+ private analyzeSafety;
81
+ private generateRenameChanges;
82
+ private analyzeExtractedCode;
83
+ private generateFunctionSignature;
84
+ private createExtractedFunction;
85
+ private generateFunctionCall;
86
+ private getIndentation;
87
+ private extractFunctionBody;
88
+ private findFunctionCalls;
89
+ private inlineFunction;
90
+ private extractComments;
91
+ private generatePreview;
92
+ getSchema(): {
93
+ type: string;
94
+ properties: {
95
+ operation: {
96
+ type: string;
97
+ enum: string[];
98
+ description: string;
99
+ };
100
+ symbolName: {
101
+ type: string;
102
+ description: string;
103
+ };
104
+ newName: {
105
+ type: string;
106
+ description: string;
107
+ };
108
+ filePath: {
109
+ type: string;
110
+ description: string;
111
+ };
112
+ scope: {
113
+ type: string;
114
+ enum: string[];
115
+ description: string;
116
+ default: string;
117
+ };
118
+ includeComments: {
119
+ type: string;
120
+ description: string;
121
+ default: boolean;
122
+ };
123
+ includeStrings: {
124
+ type: string;
125
+ description: string;
126
+ default: boolean;
127
+ };
128
+ startLine: {
129
+ type: string;
130
+ description: string;
131
+ };
132
+ endLine: {
133
+ type: string;
134
+ description: string;
135
+ };
136
+ startColumn: {
137
+ type: string;
138
+ description: string;
139
+ };
140
+ endColumn: {
141
+ type: string;
142
+ description: string;
143
+ };
144
+ functionName: {
145
+ type: string;
146
+ description: string;
147
+ };
148
+ variableName: {
149
+ type: string;
150
+ description: string;
151
+ };
152
+ variableType: {
153
+ type: string;
154
+ description: string;
155
+ };
156
+ parameters: {
157
+ type: string;
158
+ items: {
159
+ type: string;
160
+ properties: {
161
+ name: {
162
+ type: string;
163
+ };
164
+ type: {
165
+ type: string;
166
+ };
167
+ defaultValue: {
168
+ type: string;
169
+ };
170
+ };
171
+ required: string[];
172
+ };
173
+ description: string;
174
+ };
175
+ returnType: {
176
+ type: string;
177
+ description: string;
178
+ };
179
+ targetFile: {
180
+ type: string;
181
+ description: string;
182
+ };
183
+ createTargetFile: {
184
+ type: string;
185
+ description: string;
186
+ default: boolean;
187
+ };
188
+ preserveComments: {
189
+ type: string;
190
+ description: string;
191
+ default: boolean;
192
+ };
193
+ };
194
+ required: string[];
195
+ };
196
+ }