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,181 @@
1
+ import { ToolResult } from "../../types/index.js";
2
+ import { SymbolInfo } from "./ast-parser.js";
3
+ export interface CodeContext {
4
+ filePath: string;
5
+ symbols: ContextualSymbol[];
6
+ dependencies: ContextualDependency[];
7
+ relationships: CodeRelationship[];
8
+ semanticContext: SemanticContext;
9
+ codeMetrics: CodeMetrics;
10
+ }
11
+ export interface ContextualSymbol extends SymbolInfo {
12
+ context: {
13
+ parentClass?: string;
14
+ parentFunction?: string;
15
+ relatedSymbols: string[];
16
+ usagePatterns: UsagePattern[];
17
+ semanticTags: string[];
18
+ };
19
+ }
20
+ export interface ContextualDependency {
21
+ source: string;
22
+ type: 'internal' | 'external' | 'builtin';
23
+ usage: 'direct' | 'indirect';
24
+ importedSymbols: string[];
25
+ usageContext: string[];
26
+ isCircular: boolean;
27
+ }
28
+ export interface CodeRelationship {
29
+ type: 'inheritance' | 'composition' | 'dependency' | 'usage' | 'similarity';
30
+ source: string;
31
+ target: string;
32
+ strength: number;
33
+ description: string;
34
+ evidence: string[];
35
+ }
36
+ export interface SemanticContext {
37
+ purpose: string;
38
+ domain: string[];
39
+ patterns: DesignPattern[];
40
+ complexity: ComplexityMetrics;
41
+ quality: QualityMetrics;
42
+ }
43
+ export interface DesignPattern {
44
+ name: string;
45
+ confidence: number;
46
+ evidence: string[];
47
+ location: {
48
+ startLine: number;
49
+ endLine: number;
50
+ };
51
+ }
52
+ export interface UsagePattern {
53
+ pattern: string;
54
+ frequency: number;
55
+ contexts: string[];
56
+ }
57
+ export interface CodeMetrics {
58
+ linesOfCode: number;
59
+ cyclomaticComplexity: number;
60
+ cognitiveComplexity: number;
61
+ maintainabilityIndex: number;
62
+ technicalDebt: number;
63
+ }
64
+ export interface ComplexityMetrics {
65
+ cyclomatic: number;
66
+ cognitive: number;
67
+ nesting: number;
68
+ dependencies: number;
69
+ }
70
+ export interface QualityMetrics {
71
+ maintainability: number;
72
+ readability: number;
73
+ testability: number;
74
+ reusability: number;
75
+ }
76
+ export interface ProjectContext {
77
+ rootPath: string;
78
+ projectType: string;
79
+ architecture: ArchitectureInfo;
80
+ codebase: CodebaseInfo;
81
+ relationships: ProjectRelationship[];
82
+ }
83
+ export interface ArchitectureInfo {
84
+ pattern: string;
85
+ layers: ArchitectureLayer[];
86
+ entryPoints: string[];
87
+ coreModules: string[];
88
+ }
89
+ export interface ArchitectureLayer {
90
+ name: string;
91
+ files: string[];
92
+ dependencies: string[];
93
+ responsibility: string;
94
+ }
95
+ export interface CodebaseInfo {
96
+ totalFiles: number;
97
+ languages: {
98
+ [language: string]: number;
99
+ };
100
+ frameworks: string[];
101
+ testCoverage: number;
102
+ documentation: number;
103
+ }
104
+ export interface ProjectRelationship {
105
+ type: string;
106
+ modules: string[];
107
+ strength: number;
108
+ description: string;
109
+ }
110
+ export declare class CodeContextTool {
111
+ name: string;
112
+ description: string;
113
+ private astParser;
114
+ private symbolSearch;
115
+ private dependencyAnalyzer;
116
+ constructor();
117
+ execute(args: any): Promise<ToolResult>;
118
+ private buildCodeContext;
119
+ private enhanceSymbolsWithContext;
120
+ private findRelatedSymbols;
121
+ private analyzeUsagePatterns;
122
+ private generateSemanticTags;
123
+ private findParentClass;
124
+ private findParentFunction;
125
+ private analyzeDependencies;
126
+ private categorizeImport;
127
+ private buildCodeRelationships;
128
+ private analyzeSemanticContext;
129
+ private inferPurpose;
130
+ private extractDomain;
131
+ private detectDesignPatterns;
132
+ private calculateComplexityMetrics;
133
+ private assessQuality;
134
+ private calculateCodeMetrics;
135
+ private calculateCyclomaticComplexity;
136
+ private calculateCognitiveComplexity;
137
+ getSchema(): {
138
+ type: string;
139
+ properties: {
140
+ filePath: {
141
+ type: string;
142
+ description: string;
143
+ };
144
+ rootPath: {
145
+ type: string;
146
+ description: string;
147
+ default: string;
148
+ };
149
+ includeRelationships: {
150
+ type: string;
151
+ description: string;
152
+ default: boolean;
153
+ };
154
+ includeMetrics: {
155
+ type: string;
156
+ description: string;
157
+ default: boolean;
158
+ };
159
+ includeSemantics: {
160
+ type: string;
161
+ description: string;
162
+ default: boolean;
163
+ };
164
+ maxRelatedFiles: {
165
+ type: string;
166
+ description: string;
167
+ default: number;
168
+ minimum: number;
169
+ maximum: number;
170
+ };
171
+ contextDepth: {
172
+ type: string;
173
+ description: string;
174
+ default: number;
175
+ minimum: number;
176
+ maximum: number;
177
+ };
178
+ };
179
+ required: string[];
180
+ };
181
+ }