@stackguide/mcp-server 1.0.1 → 1.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/README.md +38 -345
- package/dist/index.js +337 -1
- package/dist/index.js.map +1 -1
- package/dist/services/autoDetect.d.ts +47 -0
- package/dist/services/autoDetect.d.ts.map +1 -0
- package/dist/services/autoDetect.js +550 -0
- package/dist/services/autoDetect.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-detection service for StackGuide MCP
|
|
3
|
+
* Analyzes project files to automatically detect the project type and suggest configurations
|
|
4
|
+
*/
|
|
5
|
+
export interface DetectionResult {
|
|
6
|
+
detected: boolean;
|
|
7
|
+
projectType: string | null;
|
|
8
|
+
confidence: 'high' | 'medium' | 'low';
|
|
9
|
+
indicators: string[];
|
|
10
|
+
suggestions: string[];
|
|
11
|
+
frameworks: string[];
|
|
12
|
+
languages: string[];
|
|
13
|
+
}
|
|
14
|
+
export interface ProjectAnalysis {
|
|
15
|
+
hasPackageJson: boolean;
|
|
16
|
+
hasRequirementsTxt: boolean;
|
|
17
|
+
hasPipfile: boolean;
|
|
18
|
+
hasPoetryLock: boolean;
|
|
19
|
+
hasComposerJson: boolean;
|
|
20
|
+
hasGemfile: boolean;
|
|
21
|
+
hasGoMod: boolean;
|
|
22
|
+
hasCargoToml: boolean;
|
|
23
|
+
hasTsConfig: boolean;
|
|
24
|
+
frameworks: string[];
|
|
25
|
+
dependencies: string[];
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Analyze a project directory
|
|
29
|
+
*/
|
|
30
|
+
export declare function analyzeProject(projectPath: string): ProjectAnalysis;
|
|
31
|
+
/**
|
|
32
|
+
* Detect project type from a directory path
|
|
33
|
+
*/
|
|
34
|
+
export declare function detectProjectType(projectPath: string): DetectionResult;
|
|
35
|
+
/**
|
|
36
|
+
* Get setup instructions for a project type
|
|
37
|
+
*/
|
|
38
|
+
export declare function getSetupInstructions(projectType: string): string;
|
|
39
|
+
/**
|
|
40
|
+
* Generate a quick start guide based on detection
|
|
41
|
+
*/
|
|
42
|
+
export declare function generateQuickStart(detection: DetectionResult): string;
|
|
43
|
+
/**
|
|
44
|
+
* Get all suggestions for a project type
|
|
45
|
+
*/
|
|
46
|
+
export declare function getSuggestions(projectType: string): string[];
|
|
47
|
+
//# sourceMappingURL=autoDetect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoDetect.d.ts","sourceRoot":"","sources":["../../src/services/autoDetect.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;IACtC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,EAAE,OAAO,CAAC;IACxB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,OAAO,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB;AAuRD;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CA+BnE;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,eAAe,CA6FtE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAiGhE;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,eAAe,GAAG,MAAM,CA+CrE;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,EAAE,CAE5D"}
|
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-detection service for StackGuide MCP
|
|
3
|
+
* Analyzes project files to automatically detect the project type and suggest configurations
|
|
4
|
+
*/
|
|
5
|
+
import * as fs from 'fs';
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
// Framework detection patterns
|
|
8
|
+
const FRAMEWORK_PATTERNS = {
|
|
9
|
+
// Python
|
|
10
|
+
django: {
|
|
11
|
+
dependencies: ['django', 'djangorestframework', 'django-rest-framework'],
|
|
12
|
+
files: ['manage.py', 'settings.py', 'wsgi.py', 'asgi.py'],
|
|
13
|
+
projectType: 'python-django'
|
|
14
|
+
},
|
|
15
|
+
fastapi: {
|
|
16
|
+
dependencies: ['fastapi', 'uvicorn', 'starlette'],
|
|
17
|
+
files: [],
|
|
18
|
+
projectType: 'python-fastapi'
|
|
19
|
+
},
|
|
20
|
+
flask: {
|
|
21
|
+
dependencies: ['flask', 'flask-restful', 'flask-sqlalchemy'],
|
|
22
|
+
files: [],
|
|
23
|
+
projectType: 'python-flask'
|
|
24
|
+
},
|
|
25
|
+
// JavaScript/TypeScript
|
|
26
|
+
nextjs: {
|
|
27
|
+
dependencies: ['next', 'next.js'],
|
|
28
|
+
files: ['next.config.js', 'next.config.mjs', 'next.config.ts'],
|
|
29
|
+
projectType: 'nextjs'
|
|
30
|
+
},
|
|
31
|
+
react: {
|
|
32
|
+
dependencies: ['react', 'react-dom'],
|
|
33
|
+
files: [],
|
|
34
|
+
projectType: 'react-node'
|
|
35
|
+
},
|
|
36
|
+
vue: {
|
|
37
|
+
dependencies: ['vue', 'nuxt', '@vue/cli'],
|
|
38
|
+
files: ['vue.config.js', 'nuxt.config.js'],
|
|
39
|
+
projectType: 'vue-node'
|
|
40
|
+
},
|
|
41
|
+
nestjs: {
|
|
42
|
+
dependencies: ['@nestjs/core', '@nestjs/common'],
|
|
43
|
+
files: ['nest-cli.json'],
|
|
44
|
+
projectType: 'nestjs'
|
|
45
|
+
},
|
|
46
|
+
express: {
|
|
47
|
+
dependencies: ['express'],
|
|
48
|
+
files: [],
|
|
49
|
+
projectType: 'express'
|
|
50
|
+
},
|
|
51
|
+
// PHP
|
|
52
|
+
laravel: {
|
|
53
|
+
dependencies: ['laravel/framework'],
|
|
54
|
+
files: ['artisan', 'app/Http/Kernel.php'],
|
|
55
|
+
projectType: 'laravel'
|
|
56
|
+
},
|
|
57
|
+
// Ruby
|
|
58
|
+
rails: {
|
|
59
|
+
dependencies: ['rails', 'railties'],
|
|
60
|
+
files: ['config/application.rb', 'bin/rails', 'Rakefile'],
|
|
61
|
+
projectType: 'rails'
|
|
62
|
+
},
|
|
63
|
+
// Go
|
|
64
|
+
golang: {
|
|
65
|
+
dependencies: [],
|
|
66
|
+
files: ['go.mod', 'go.sum', 'main.go'],
|
|
67
|
+
projectType: 'golang'
|
|
68
|
+
},
|
|
69
|
+
// Rust
|
|
70
|
+
rust: {
|
|
71
|
+
dependencies: [],
|
|
72
|
+
files: ['Cargo.toml', 'Cargo.lock'],
|
|
73
|
+
projectType: 'rust'
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
// Suggested rules per project type
|
|
77
|
+
const SUGGESTED_RULES = {
|
|
78
|
+
'python-django': [
|
|
79
|
+
'django-best-practices',
|
|
80
|
+
'django-standards',
|
|
81
|
+
'security-guidelines',
|
|
82
|
+
'Use Django ORM properly with select_related and prefetch_related',
|
|
83
|
+
'Follow MVT pattern strictly',
|
|
84
|
+
'Implement proper authentication with Django REST Framework'
|
|
85
|
+
],
|
|
86
|
+
'python-fastapi': [
|
|
87
|
+
'Use Pydantic models for validation',
|
|
88
|
+
'Implement async endpoints for I/O operations',
|
|
89
|
+
'Use dependency injection for shared resources',
|
|
90
|
+
'Follow OpenAPI documentation best practices'
|
|
91
|
+
],
|
|
92
|
+
'python-flask': [
|
|
93
|
+
'Use Flask Blueprints for modular code',
|
|
94
|
+
'Implement proper error handling',
|
|
95
|
+
'Use Flask-SQLAlchemy for database operations',
|
|
96
|
+
'Follow application factory pattern'
|
|
97
|
+
],
|
|
98
|
+
'react-node': [
|
|
99
|
+
'react-best-practices',
|
|
100
|
+
'react-standards',
|
|
101
|
+
'node-standards',
|
|
102
|
+
'security-guidelines',
|
|
103
|
+
'Use functional components with hooks',
|
|
104
|
+
'Implement proper state management',
|
|
105
|
+
'Follow Express.js best practices'
|
|
106
|
+
],
|
|
107
|
+
'react-typescript': [
|
|
108
|
+
'Use strict TypeScript configuration',
|
|
109
|
+
'Define proper interfaces for props',
|
|
110
|
+
'Use generics for reusable components',
|
|
111
|
+
'Implement proper type guards'
|
|
112
|
+
],
|
|
113
|
+
'nextjs': [
|
|
114
|
+
'Use App Router (Next.js 13+)',
|
|
115
|
+
'Implement proper server components',
|
|
116
|
+
'Optimize images with next/image',
|
|
117
|
+
'Use proper data fetching patterns'
|
|
118
|
+
],
|
|
119
|
+
'nestjs': [
|
|
120
|
+
'Use dependency injection properly',
|
|
121
|
+
'Implement proper DTOs with class-validator',
|
|
122
|
+
'Follow modular architecture',
|
|
123
|
+
'Use guards for authentication'
|
|
124
|
+
],
|
|
125
|
+
'vue-node': [
|
|
126
|
+
'Use Composition API',
|
|
127
|
+
'Implement proper state management with Pinia',
|
|
128
|
+
'Follow Vue style guide',
|
|
129
|
+
'Use proper component communication'
|
|
130
|
+
],
|
|
131
|
+
'express': [
|
|
132
|
+
'Use proper middleware patterns',
|
|
133
|
+
'Implement error handling middleware',
|
|
134
|
+
'Use async/await with proper error catching',
|
|
135
|
+
'Follow RESTful API design'
|
|
136
|
+
],
|
|
137
|
+
'laravel': [
|
|
138
|
+
'Use Eloquent ORM properly',
|
|
139
|
+
'Implement proper validation',
|
|
140
|
+
'Follow Laravel naming conventions',
|
|
141
|
+
'Use service classes for business logic'
|
|
142
|
+
],
|
|
143
|
+
'rails': [
|
|
144
|
+
'Follow Rails conventions',
|
|
145
|
+
'Use Active Record properly',
|
|
146
|
+
'Implement proper validations',
|
|
147
|
+
'Use concerns for shared code'
|
|
148
|
+
],
|
|
149
|
+
'golang': [
|
|
150
|
+
'Follow Go idioms',
|
|
151
|
+
'Use proper error handling',
|
|
152
|
+
'Implement interfaces for abstraction',
|
|
153
|
+
'Use goroutines properly'
|
|
154
|
+
],
|
|
155
|
+
'rust': [
|
|
156
|
+
'Use ownership properly',
|
|
157
|
+
'Implement proper error handling with Result',
|
|
158
|
+
'Use lifetimes correctly',
|
|
159
|
+
'Follow Rust naming conventions'
|
|
160
|
+
]
|
|
161
|
+
};
|
|
162
|
+
/**
|
|
163
|
+
* Read and parse package.json if it exists
|
|
164
|
+
*/
|
|
165
|
+
function readPackageJson(projectPath) {
|
|
166
|
+
try {
|
|
167
|
+
const packageJsonPath = path.join(projectPath, 'package.json');
|
|
168
|
+
if (fs.existsSync(packageJsonPath)) {
|
|
169
|
+
const content = fs.readFileSync(packageJsonPath, 'utf-8');
|
|
170
|
+
return JSON.parse(content);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
catch {
|
|
174
|
+
// Ignore errors
|
|
175
|
+
}
|
|
176
|
+
return null;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Read and parse requirements.txt if it exists
|
|
180
|
+
*/
|
|
181
|
+
function readRequirementsTxt(projectPath) {
|
|
182
|
+
try {
|
|
183
|
+
const reqPath = path.join(projectPath, 'requirements.txt');
|
|
184
|
+
if (fs.existsSync(reqPath)) {
|
|
185
|
+
const content = fs.readFileSync(reqPath, 'utf-8');
|
|
186
|
+
return content.split('\n')
|
|
187
|
+
.map(line => line.trim().toLowerCase())
|
|
188
|
+
.filter(line => line && !line.startsWith('#'))
|
|
189
|
+
.map(line => line.split('==')[0].split('>=')[0].split('<=')[0].split('[')[0]);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
catch {
|
|
193
|
+
// Ignore errors
|
|
194
|
+
}
|
|
195
|
+
return [];
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Read Pipfile if it exists
|
|
199
|
+
*/
|
|
200
|
+
function readPipfile(projectPath) {
|
|
201
|
+
try {
|
|
202
|
+
const pipfilePath = path.join(projectPath, 'Pipfile');
|
|
203
|
+
if (fs.existsSync(pipfilePath)) {
|
|
204
|
+
const content = fs.readFileSync(pipfilePath, 'utf-8');
|
|
205
|
+
const deps = [];
|
|
206
|
+
const matches = content.matchAll(/^([a-zA-Z0-9_-]+)\s*=/gm);
|
|
207
|
+
for (const match of matches) {
|
|
208
|
+
deps.push(match[1].toLowerCase());
|
|
209
|
+
}
|
|
210
|
+
return deps;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
catch {
|
|
214
|
+
// Ignore errors
|
|
215
|
+
}
|
|
216
|
+
return [];
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Read composer.json if it exists (PHP/Laravel)
|
|
220
|
+
*/
|
|
221
|
+
function readComposerJson(projectPath) {
|
|
222
|
+
try {
|
|
223
|
+
const composerPath = path.join(projectPath, 'composer.json');
|
|
224
|
+
if (fs.existsSync(composerPath)) {
|
|
225
|
+
const content = fs.readFileSync(composerPath, 'utf-8');
|
|
226
|
+
const composer = JSON.parse(content);
|
|
227
|
+
const deps = [];
|
|
228
|
+
if (composer.require) {
|
|
229
|
+
deps.push(...Object.keys(composer.require));
|
|
230
|
+
}
|
|
231
|
+
if (composer['require-dev']) {
|
|
232
|
+
deps.push(...Object.keys(composer['require-dev']));
|
|
233
|
+
}
|
|
234
|
+
return deps.map(d => d.toLowerCase());
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
catch {
|
|
238
|
+
// Ignore errors
|
|
239
|
+
}
|
|
240
|
+
return [];
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Read Gemfile if it exists (Ruby/Rails)
|
|
244
|
+
*/
|
|
245
|
+
function readGemfile(projectPath) {
|
|
246
|
+
try {
|
|
247
|
+
const gemfilePath = path.join(projectPath, 'Gemfile');
|
|
248
|
+
if (fs.existsSync(gemfilePath)) {
|
|
249
|
+
const content = fs.readFileSync(gemfilePath, 'utf-8');
|
|
250
|
+
const gems = [];
|
|
251
|
+
const matches = content.matchAll(/gem\s+['"]([^'"]+)['"]/g);
|
|
252
|
+
for (const match of matches) {
|
|
253
|
+
gems.push(match[1].toLowerCase());
|
|
254
|
+
}
|
|
255
|
+
return gems;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
catch {
|
|
259
|
+
// Ignore errors
|
|
260
|
+
}
|
|
261
|
+
return [];
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Check if specific files exist in the project
|
|
265
|
+
*/
|
|
266
|
+
function checkFiles(projectPath, files) {
|
|
267
|
+
const found = [];
|
|
268
|
+
for (const file of files) {
|
|
269
|
+
const filePath = path.join(projectPath, file);
|
|
270
|
+
if (fs.existsSync(filePath)) {
|
|
271
|
+
found.push(file);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return found;
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Analyze a project directory
|
|
278
|
+
*/
|
|
279
|
+
export function analyzeProject(projectPath) {
|
|
280
|
+
const analysis = {
|
|
281
|
+
hasPackageJson: fs.existsSync(path.join(projectPath, 'package.json')),
|
|
282
|
+
hasRequirementsTxt: fs.existsSync(path.join(projectPath, 'requirements.txt')),
|
|
283
|
+
hasPipfile: fs.existsSync(path.join(projectPath, 'Pipfile')),
|
|
284
|
+
hasPoetryLock: fs.existsSync(path.join(projectPath, 'poetry.lock')),
|
|
285
|
+
hasComposerJson: fs.existsSync(path.join(projectPath, 'composer.json')),
|
|
286
|
+
hasGemfile: fs.existsSync(path.join(projectPath, 'Gemfile')),
|
|
287
|
+
hasGoMod: fs.existsSync(path.join(projectPath, 'go.mod')),
|
|
288
|
+
hasCargoToml: fs.existsSync(path.join(projectPath, 'Cargo.toml')),
|
|
289
|
+
hasTsConfig: fs.existsSync(path.join(projectPath, 'tsconfig.json')),
|
|
290
|
+
frameworks: [],
|
|
291
|
+
dependencies: []
|
|
292
|
+
};
|
|
293
|
+
// Collect all dependencies
|
|
294
|
+
const packageJson = readPackageJson(projectPath);
|
|
295
|
+
if (packageJson) {
|
|
296
|
+
const deps = [
|
|
297
|
+
...Object.keys(packageJson.dependencies || {}),
|
|
298
|
+
...Object.keys(packageJson.devDependencies || {})
|
|
299
|
+
];
|
|
300
|
+
analysis.dependencies.push(...deps.map(d => d.toLowerCase()));
|
|
301
|
+
}
|
|
302
|
+
analysis.dependencies.push(...readRequirementsTxt(projectPath));
|
|
303
|
+
analysis.dependencies.push(...readPipfile(projectPath));
|
|
304
|
+
analysis.dependencies.push(...readComposerJson(projectPath));
|
|
305
|
+
analysis.dependencies.push(...readGemfile(projectPath));
|
|
306
|
+
return analysis;
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* Detect project type from a directory path
|
|
310
|
+
*/
|
|
311
|
+
export function detectProjectType(projectPath) {
|
|
312
|
+
const result = {
|
|
313
|
+
detected: false,
|
|
314
|
+
projectType: null,
|
|
315
|
+
confidence: 'low',
|
|
316
|
+
indicators: [],
|
|
317
|
+
suggestions: [],
|
|
318
|
+
frameworks: [],
|
|
319
|
+
languages: []
|
|
320
|
+
};
|
|
321
|
+
if (!fs.existsSync(projectPath)) {
|
|
322
|
+
return result;
|
|
323
|
+
}
|
|
324
|
+
const analysis = analyzeProject(projectPath);
|
|
325
|
+
// Determine languages
|
|
326
|
+
if (analysis.hasPackageJson || analysis.hasTsConfig) {
|
|
327
|
+
result.languages.push(analysis.hasTsConfig ? 'TypeScript' : 'JavaScript');
|
|
328
|
+
}
|
|
329
|
+
if (analysis.hasRequirementsTxt || analysis.hasPipfile || analysis.hasPoetryLock) {
|
|
330
|
+
result.languages.push('Python');
|
|
331
|
+
}
|
|
332
|
+
if (analysis.hasComposerJson) {
|
|
333
|
+
result.languages.push('PHP');
|
|
334
|
+
}
|
|
335
|
+
if (analysis.hasGemfile) {
|
|
336
|
+
result.languages.push('Ruby');
|
|
337
|
+
}
|
|
338
|
+
if (analysis.hasGoMod) {
|
|
339
|
+
result.languages.push('Go');
|
|
340
|
+
}
|
|
341
|
+
if (analysis.hasCargoToml) {
|
|
342
|
+
result.languages.push('Rust');
|
|
343
|
+
}
|
|
344
|
+
// Detect frameworks with priority (more specific first)
|
|
345
|
+
const detectionOrder = [
|
|
346
|
+
'nextjs', 'nestjs', 'vue', 'django', 'fastapi', 'flask',
|
|
347
|
+
'laravel', 'rails', 'react', 'express', 'golang', 'rust'
|
|
348
|
+
];
|
|
349
|
+
for (const framework of detectionOrder) {
|
|
350
|
+
const pattern = FRAMEWORK_PATTERNS[framework];
|
|
351
|
+
let matched = false;
|
|
352
|
+
// Check dependencies
|
|
353
|
+
for (const dep of pattern.dependencies) {
|
|
354
|
+
if (analysis.dependencies.includes(dep.toLowerCase())) {
|
|
355
|
+
result.indicators.push(`Found dependency: ${dep}`);
|
|
356
|
+
result.frameworks.push(framework);
|
|
357
|
+
matched = true;
|
|
358
|
+
break;
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
// Check files
|
|
362
|
+
if (!matched) {
|
|
363
|
+
const foundFiles = checkFiles(projectPath, pattern.files);
|
|
364
|
+
if (foundFiles.length > 0) {
|
|
365
|
+
result.indicators.push(`Found file(s): ${foundFiles.join(', ')}`);
|
|
366
|
+
result.frameworks.push(framework);
|
|
367
|
+
matched = true;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
// Set project type on first match
|
|
371
|
+
if (matched && !result.projectType) {
|
|
372
|
+
result.projectType = pattern.projectType;
|
|
373
|
+
result.detected = true;
|
|
374
|
+
// Determine confidence
|
|
375
|
+
if (result.indicators.length >= 3) {
|
|
376
|
+
result.confidence = 'high';
|
|
377
|
+
}
|
|
378
|
+
else if (result.indicators.length >= 2) {
|
|
379
|
+
result.confidence = 'medium';
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
// Add suggestions based on detected type
|
|
384
|
+
if (result.projectType && SUGGESTED_RULES[result.projectType]) {
|
|
385
|
+
result.suggestions = SUGGESTED_RULES[result.projectType];
|
|
386
|
+
}
|
|
387
|
+
// Special case: React + TypeScript
|
|
388
|
+
if (result.frameworks.includes('react') && analysis.hasTsConfig) {
|
|
389
|
+
result.projectType = 'react-typescript';
|
|
390
|
+
result.detected = true;
|
|
391
|
+
}
|
|
392
|
+
return result;
|
|
393
|
+
}
|
|
394
|
+
/**
|
|
395
|
+
* Get setup instructions for a project type
|
|
396
|
+
*/
|
|
397
|
+
export function getSetupInstructions(projectType) {
|
|
398
|
+
const instructions = {
|
|
399
|
+
'python-django': `
|
|
400
|
+
## Django Project Setup
|
|
401
|
+
|
|
402
|
+
1. **Activate context**: The Django context has been activated with DRF support.
|
|
403
|
+
|
|
404
|
+
2. **Recommended rules loaded**:
|
|
405
|
+
- Django coding standards
|
|
406
|
+
- Django best practices
|
|
407
|
+
- Security guidelines
|
|
408
|
+
|
|
409
|
+
3. **Key patterns available**:
|
|
410
|
+
- MVT architecture
|
|
411
|
+
- DRF serializers and viewsets
|
|
412
|
+
- Authentication patterns
|
|
413
|
+
|
|
414
|
+
4. **Suggested workflow**:
|
|
415
|
+
- Use \`get_full_context\` to see all loaded rules
|
|
416
|
+
- Use \`browse_cursor_directory category:"django"\` for community rules
|
|
417
|
+
- Use \`save_configuration\` to save your setup
|
|
418
|
+
`,
|
|
419
|
+
'python-fastapi': `
|
|
420
|
+
## FastAPI Project Setup
|
|
421
|
+
|
|
422
|
+
1. **Activate context**: FastAPI context with async support.
|
|
423
|
+
|
|
424
|
+
2. **Key patterns**:
|
|
425
|
+
- Pydantic models for validation
|
|
426
|
+
- Dependency injection
|
|
427
|
+
- Async/await patterns
|
|
428
|
+
- OpenAPI documentation
|
|
429
|
+
|
|
430
|
+
3. **Suggested workflow**:
|
|
431
|
+
- Use \`browse_cursor_directory category:"fastapi"\` for rules
|
|
432
|
+
- Consider importing Python best practices
|
|
433
|
+
`,
|
|
434
|
+
'react-node': `
|
|
435
|
+
## React + Node.js Project Setup
|
|
436
|
+
|
|
437
|
+
1. **Activate context**: Full-stack React/Node context.
|
|
438
|
+
|
|
439
|
+
2. **Recommended rules loaded**:
|
|
440
|
+
- React best practices (hooks, components)
|
|
441
|
+
- Node.js/Express standards
|
|
442
|
+
- Security guidelines
|
|
443
|
+
|
|
444
|
+
3. **Key patterns available**:
|
|
445
|
+
- Component patterns
|
|
446
|
+
- State management
|
|
447
|
+
- API design
|
|
448
|
+
|
|
449
|
+
4. **Suggested workflow**:
|
|
450
|
+
- Use \`browse_cursor_directory category:"react"\` for frontend rules
|
|
451
|
+
- Use \`browse_cursor_directory category:"nodejs"\` for backend rules
|
|
452
|
+
`,
|
|
453
|
+
'nextjs': `
|
|
454
|
+
## Next.js Project Setup
|
|
455
|
+
|
|
456
|
+
1. **Activate context**: Next.js with App Router support.
|
|
457
|
+
|
|
458
|
+
2. **Key patterns**:
|
|
459
|
+
- Server Components
|
|
460
|
+
- Server Actions
|
|
461
|
+
- Data fetching patterns
|
|
462
|
+
- Image optimization
|
|
463
|
+
|
|
464
|
+
3. **Suggested workflow**:
|
|
465
|
+
- Use \`browse_cursor_directory category:"nextjs"\` for community rules
|
|
466
|
+
- Consider TypeScript strict mode
|
|
467
|
+
`,
|
|
468
|
+
'nestjs': `
|
|
469
|
+
## NestJS Project Setup
|
|
470
|
+
|
|
471
|
+
1. **Activate context**: NestJS enterprise patterns.
|
|
472
|
+
|
|
473
|
+
2. **Key patterns**:
|
|
474
|
+
- Dependency Injection
|
|
475
|
+
- Decorators
|
|
476
|
+
- Guards and Interceptors
|
|
477
|
+
- DTOs with class-validator
|
|
478
|
+
|
|
479
|
+
3. **Suggested workflow**:
|
|
480
|
+
- Use \`browse_cursor_directory category:"nestjs"\` for rules
|
|
481
|
+
`
|
|
482
|
+
};
|
|
483
|
+
return instructions[projectType] || `
|
|
484
|
+
## ${projectType} Project Setup
|
|
485
|
+
|
|
486
|
+
Context has been activated. Use \`get_full_context\` to see loaded rules.
|
|
487
|
+
|
|
488
|
+
Suggested:
|
|
489
|
+
- \`list_rules\` - See available rules
|
|
490
|
+
- \`browse_cursor_directory\` - Find community rules
|
|
491
|
+
- \`save_configuration\` - Save your setup
|
|
492
|
+
`;
|
|
493
|
+
}
|
|
494
|
+
/**
|
|
495
|
+
* Generate a quick start guide based on detection
|
|
496
|
+
*/
|
|
497
|
+
export function generateQuickStart(detection) {
|
|
498
|
+
if (!detection.detected) {
|
|
499
|
+
return `
|
|
500
|
+
# Quick Start
|
|
501
|
+
|
|
502
|
+
Could not auto-detect project type. Please run:
|
|
503
|
+
|
|
504
|
+
\`select_project_type\` with one of:
|
|
505
|
+
- python-django
|
|
506
|
+
- python-fastapi
|
|
507
|
+
- python-flask
|
|
508
|
+
- react-node
|
|
509
|
+
- react-typescript
|
|
510
|
+
- nextjs
|
|
511
|
+
- nestjs
|
|
512
|
+
- vue-node
|
|
513
|
+
- express
|
|
514
|
+
- laravel
|
|
515
|
+
- rails
|
|
516
|
+
- golang
|
|
517
|
+
- rust
|
|
518
|
+
|
|
519
|
+
Or tell me about your project and I'll help configure it!
|
|
520
|
+
`;
|
|
521
|
+
}
|
|
522
|
+
return `
|
|
523
|
+
# Quick Start - ${detection.projectType}
|
|
524
|
+
|
|
525
|
+
✅ **Detected**: ${detection.projectType} (${detection.confidence} confidence)
|
|
526
|
+
|
|
527
|
+
**Indicators found**:
|
|
528
|
+
${detection.indicators.map(i => `- ${i}`).join('\n')}
|
|
529
|
+
|
|
530
|
+
**Languages**: ${detection.languages.join(', ')}
|
|
531
|
+
**Frameworks**: ${detection.frameworks.join(', ')}
|
|
532
|
+
|
|
533
|
+
## Recommended Setup
|
|
534
|
+
|
|
535
|
+
${detection.suggestions.slice(0, 5).map(s => `- ${s}`).join('\n')}
|
|
536
|
+
|
|
537
|
+
## Next Steps
|
|
538
|
+
|
|
539
|
+
1. Run \`auto_setup\` to automatically configure everything
|
|
540
|
+
2. Or run \`select_project_type projectType:"${detection.projectType}"\` to activate manually
|
|
541
|
+
3. Use \`browse_cursor_directory\` to find community rules for your stack
|
|
542
|
+
`;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Get all suggestions for a project type
|
|
546
|
+
*/
|
|
547
|
+
export function getSuggestions(projectType) {
|
|
548
|
+
return SUGGESTED_RULES[projectType] || [];
|
|
549
|
+
}
|
|
550
|
+
//# sourceMappingURL=autoDetect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"autoDetect.js","sourceRoot":"","sources":["../../src/services/autoDetect.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA0B7B,+BAA+B;AAC/B,MAAM,kBAAkB,GAAqF;IAC3G,SAAS;IACT,MAAM,EAAE;QACN,YAAY,EAAE,CAAC,QAAQ,EAAE,qBAAqB,EAAE,uBAAuB,CAAC;QACxE,KAAK,EAAE,CAAC,WAAW,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,CAAC;QACzD,WAAW,EAAE,eAAe;KAC7B;IACD,OAAO,EAAE;QACP,YAAY,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,CAAC;QACjD,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,gBAAgB;KAC9B;IACD,KAAK,EAAE;QACL,YAAY,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,kBAAkB,CAAC;QAC5D,KAAK,EAAE,EAAE;QACT,WAAW,EAAE,cAAc;KAC5B;IAED,wBAAwB;IACxB,MAAM,EAAE;Q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