@kernel.chat/kbot 3.35.1 → 3.37.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/dist/codebase-guardian.d.ts +64 -0
- package/dist/codebase-guardian.d.ts.map +1 -0
- package/dist/codebase-guardian.js +486 -0
- package/dist/codebase-guardian.js.map +1 -0
- package/dist/collective-learning.d.ts +47 -0
- package/dist/collective-learning.d.ts.map +1 -0
- package/dist/collective-learning.js +315 -0
- package/dist/collective-learning.js.map +1 -0
- package/dist/community-manager.d.ts +60 -0
- package/dist/community-manager.d.ts.map +1 -0
- package/dist/community-manager.js +400 -0
- package/dist/community-manager.js.map +1 -0
- package/dist/dream-mode.d.ts +23 -0
- package/dist/dream-mode.d.ts.map +1 -0
- package/dist/dream-mode.js +352 -0
- package/dist/dream-mode.js.map +1 -0
- package/dist/forge-marketplace.d.ts +40 -0
- package/dist/forge-marketplace.d.ts.map +1 -0
- package/dist/forge-marketplace.js +222 -0
- package/dist/forge-marketplace.js.map +1 -0
- package/dist/kbot-service.d.ts +2 -0
- package/dist/kbot-service.d.ts.map +1 -0
- package/dist/kbot-service.js +197 -0
- package/dist/kbot-service.js.map +1 -0
- package/dist/meta-agent.d.ts +62 -0
- package/dist/meta-agent.d.ts.map +1 -0
- package/dist/meta-agent.js +288 -0
- package/dist/meta-agent.js.map +1 -0
- package/dist/tools/bootstrapper.d.ts +2 -0
- package/dist/tools/bootstrapper.d.ts.map +1 -0
- package/dist/tools/bootstrapper.js +559 -0
- package/dist/tools/bootstrapper.js.map +1 -0
- package/dist/tools/content-engine.d.ts +2 -0
- package/dist/tools/content-engine.d.ts.map +1 -0
- package/dist/tools/content-engine.js +362 -0
- package/dist/tools/content-engine.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +2 -0
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,559 @@
|
|
|
1
|
+
// kbot Project Bootstrapper Tools — Analyze and bootstrap any codebase.
|
|
2
|
+
// Clone repos, detect frameworks, identify key files, suggest agents and tools.
|
|
3
|
+
import { registerTool } from './index.js';
|
|
4
|
+
import { execSync } from 'node:child_process';
|
|
5
|
+
import { readFile, readdir, stat, mkdtemp, rm } from 'node:fs/promises';
|
|
6
|
+
import { tmpdir } from 'node:os';
|
|
7
|
+
import { join, extname, basename } from 'node:path';
|
|
8
|
+
const FRAMEWORK_SIGNATURES = [
|
|
9
|
+
{
|
|
10
|
+
name: 'Next.js',
|
|
11
|
+
files: ['next.config.js', 'next.config.mjs', 'next.config.ts'],
|
|
12
|
+
language: 'TypeScript/JavaScript',
|
|
13
|
+
agents: ['coder', 'infrastructure', 'aesthete'],
|
|
14
|
+
tools: ['nextjs_build', 'lighthouse_audit', 'route_analyzer'],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'React (Vite)',
|
|
18
|
+
files: ['vite.config.ts', 'vite.config.js'],
|
|
19
|
+
devFiles: ['src/App.tsx', 'src/App.jsx', 'src/main.tsx'],
|
|
20
|
+
language: 'TypeScript/JavaScript',
|
|
21
|
+
agents: ['coder', 'aesthete', 'guardian'],
|
|
22
|
+
tools: ['vite_build', 'component_tree', 'bundle_analyzer'],
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'Express/Node.js',
|
|
26
|
+
files: ['app.js', 'server.js', 'src/server.ts', 'src/app.ts'],
|
|
27
|
+
language: 'TypeScript/JavaScript',
|
|
28
|
+
agents: ['coder', 'infrastructure', 'guardian'],
|
|
29
|
+
tools: ['api_tester', 'route_mapper', 'load_tester'],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: 'Django',
|
|
33
|
+
files: ['manage.py', 'settings.py'],
|
|
34
|
+
devFiles: ['urls.py', 'wsgi.py'],
|
|
35
|
+
language: 'Python',
|
|
36
|
+
agents: ['coder', 'infrastructure', 'guardian'],
|
|
37
|
+
tools: ['django_manage', 'migration_checker', 'model_analyzer'],
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
name: 'Flask',
|
|
41
|
+
files: ['app.py', 'wsgi.py'],
|
|
42
|
+
devFiles: ['requirements.txt'],
|
|
43
|
+
language: 'Python',
|
|
44
|
+
agents: ['coder', 'infrastructure'],
|
|
45
|
+
tools: ['flask_routes', 'api_tester'],
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: 'FastAPI',
|
|
49
|
+
files: ['main.py'],
|
|
50
|
+
language: 'Python',
|
|
51
|
+
agents: ['coder', 'infrastructure', 'guardian'],
|
|
52
|
+
tools: ['openapi_validator', 'api_tester', 'async_profiler'],
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
name: 'Rust (Cargo)',
|
|
56
|
+
files: ['Cargo.toml'],
|
|
57
|
+
language: 'Rust',
|
|
58
|
+
agents: ['coder', 'guardian', 'analyst'],
|
|
59
|
+
tools: ['cargo_build', 'clippy_lint', 'unsafe_scanner'],
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Go',
|
|
63
|
+
files: ['go.mod'],
|
|
64
|
+
language: 'Go',
|
|
65
|
+
agents: ['coder', 'infrastructure', 'guardian'],
|
|
66
|
+
tools: ['go_build', 'go_vet', 'goroutine_analyzer'],
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: 'Ruby on Rails',
|
|
70
|
+
files: ['Gemfile', 'config/routes.rb'],
|
|
71
|
+
language: 'Ruby',
|
|
72
|
+
agents: ['coder', 'infrastructure'],
|
|
73
|
+
tools: ['rails_console', 'migration_runner', 'route_mapper'],
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: 'Docker Compose',
|
|
77
|
+
files: ['docker-compose.yml', 'docker-compose.yaml', 'compose.yml'],
|
|
78
|
+
language: 'Multi',
|
|
79
|
+
agents: ['infrastructure', 'guardian'],
|
|
80
|
+
tools: ['docker_compose_up', 'container_health', 'network_mapper'],
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
name: 'Terraform',
|
|
84
|
+
files: ['main.tf', 'terraform.tf'],
|
|
85
|
+
language: 'HCL',
|
|
86
|
+
agents: ['infrastructure', 'guardian', 'analyst'],
|
|
87
|
+
tools: ['terraform_plan', 'drift_detector', 'cost_estimator'],
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
/** File extensions and what they indicate */
|
|
91
|
+
const EXTENSION_CATEGORIES = {
|
|
92
|
+
'.ts': 'TypeScript',
|
|
93
|
+
'.tsx': 'React/TypeScript',
|
|
94
|
+
'.js': 'JavaScript',
|
|
95
|
+
'.jsx': 'React/JavaScript',
|
|
96
|
+
'.py': 'Python',
|
|
97
|
+
'.rs': 'Rust',
|
|
98
|
+
'.go': 'Go',
|
|
99
|
+
'.rb': 'Ruby',
|
|
100
|
+
'.java': 'Java',
|
|
101
|
+
'.kt': 'Kotlin',
|
|
102
|
+
'.swift': 'Swift',
|
|
103
|
+
'.c': 'C',
|
|
104
|
+
'.cpp': 'C++',
|
|
105
|
+
'.h': 'C/C++ Header',
|
|
106
|
+
'.cs': 'C#',
|
|
107
|
+
'.php': 'PHP',
|
|
108
|
+
'.vue': 'Vue.js',
|
|
109
|
+
'.svelte': 'Svelte',
|
|
110
|
+
'.sql': 'SQL',
|
|
111
|
+
'.tf': 'Terraform',
|
|
112
|
+
'.yaml': 'YAML',
|
|
113
|
+
'.yml': 'YAML',
|
|
114
|
+
'.toml': 'TOML',
|
|
115
|
+
'.json': 'JSON',
|
|
116
|
+
'.md': 'Markdown',
|
|
117
|
+
'.sh': 'Shell',
|
|
118
|
+
'.dockerfile': 'Docker',
|
|
119
|
+
};
|
|
120
|
+
/** Key files that are always worth noting */
|
|
121
|
+
const KEY_FILES = [
|
|
122
|
+
'package.json',
|
|
123
|
+
'tsconfig.json',
|
|
124
|
+
'Cargo.toml',
|
|
125
|
+
'go.mod',
|
|
126
|
+
'requirements.txt',
|
|
127
|
+
'pyproject.toml',
|
|
128
|
+
'Gemfile',
|
|
129
|
+
'Makefile',
|
|
130
|
+
'Dockerfile',
|
|
131
|
+
'docker-compose.yml',
|
|
132
|
+
'docker-compose.yaml',
|
|
133
|
+
'compose.yml',
|
|
134
|
+
'.github/workflows',
|
|
135
|
+
'.gitlab-ci.yml',
|
|
136
|
+
'jest.config.ts',
|
|
137
|
+
'jest.config.js',
|
|
138
|
+
'vitest.config.ts',
|
|
139
|
+
'vitest.config.js',
|
|
140
|
+
'.eslintrc.json',
|
|
141
|
+
'.eslintrc.js',
|
|
142
|
+
'eslint.config.js',
|
|
143
|
+
'.prettierrc',
|
|
144
|
+
'README.md',
|
|
145
|
+
'CONTRIBUTING.md',
|
|
146
|
+
'LICENSE',
|
|
147
|
+
'.env.example',
|
|
148
|
+
];
|
|
149
|
+
/**
|
|
150
|
+
* Recursively walk a directory, collecting file info.
|
|
151
|
+
* Skips node_modules, .git, dist, build, __pycache__, .venv, target.
|
|
152
|
+
*/
|
|
153
|
+
async function walkDir(dir, depth = 0, maxDepth = 6) {
|
|
154
|
+
const SKIP_DIRS = new Set([
|
|
155
|
+
'node_modules', '.git', 'dist', 'build', '__pycache__',
|
|
156
|
+
'.venv', 'venv', 'target', '.next', '.nuxt', '.output',
|
|
157
|
+
'vendor', 'coverage', '.cache', '.parcel-cache',
|
|
158
|
+
]);
|
|
159
|
+
const result = { files: [], dirs: [] };
|
|
160
|
+
if (depth > maxDepth)
|
|
161
|
+
return result;
|
|
162
|
+
let entries;
|
|
163
|
+
try {
|
|
164
|
+
entries = await readdir(dir);
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
return result;
|
|
168
|
+
}
|
|
169
|
+
for (const entry of entries) {
|
|
170
|
+
if (entry.startsWith('.') && depth > 0)
|
|
171
|
+
continue;
|
|
172
|
+
const fullPath = join(dir, entry);
|
|
173
|
+
let info;
|
|
174
|
+
try {
|
|
175
|
+
info = await stat(fullPath);
|
|
176
|
+
}
|
|
177
|
+
catch {
|
|
178
|
+
continue;
|
|
179
|
+
}
|
|
180
|
+
if (info.isDirectory()) {
|
|
181
|
+
if (SKIP_DIRS.has(entry))
|
|
182
|
+
continue;
|
|
183
|
+
result.dirs.push(fullPath);
|
|
184
|
+
const sub = await walkDir(fullPath, depth + 1, maxDepth);
|
|
185
|
+
result.files.push(...sub.files);
|
|
186
|
+
result.dirs.push(...sub.dirs);
|
|
187
|
+
}
|
|
188
|
+
else if (info.isFile()) {
|
|
189
|
+
result.files.push(fullPath);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return result;
|
|
193
|
+
}
|
|
194
|
+
/** Detect frameworks from files present in the directory */
|
|
195
|
+
function detectFrameworks(fileNames) {
|
|
196
|
+
const detected = [];
|
|
197
|
+
for (const sig of FRAMEWORK_SIGNATURES) {
|
|
198
|
+
const hasMain = sig.files.some((f) => fileNames.has(f));
|
|
199
|
+
if (hasMain) {
|
|
200
|
+
detected.push(sig);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return detected;
|
|
204
|
+
}
|
|
205
|
+
/** Count files by language/extension */
|
|
206
|
+
function countLanguages(files) {
|
|
207
|
+
const counts = {};
|
|
208
|
+
for (const file of files) {
|
|
209
|
+
const ext = extname(file).toLowerCase();
|
|
210
|
+
const lang = EXTENSION_CATEGORIES[ext];
|
|
211
|
+
if (lang) {
|
|
212
|
+
counts[lang] = (counts[lang] || 0) + 1;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return counts;
|
|
216
|
+
}
|
|
217
|
+
/** Get top-level structure for display */
|
|
218
|
+
async function getTopLevelStructure(dir) {
|
|
219
|
+
const structure = [];
|
|
220
|
+
try {
|
|
221
|
+
const entries = await readdir(dir);
|
|
222
|
+
for (const entry of entries.sort()) {
|
|
223
|
+
if (entry.startsWith('.') && entry !== '.github')
|
|
224
|
+
continue;
|
|
225
|
+
const fullPath = join(dir, entry);
|
|
226
|
+
try {
|
|
227
|
+
const info = await stat(fullPath);
|
|
228
|
+
structure.push(info.isDirectory() ? ` ${entry}/` : ` ${entry}`);
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
structure.push(` ${entry}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
structure.push(' (could not read directory)');
|
|
237
|
+
}
|
|
238
|
+
return structure;
|
|
239
|
+
}
|
|
240
|
+
/** Analyze a local directory */
|
|
241
|
+
async function analyzeDirectory(dir) {
|
|
242
|
+
const { files, dirs } = await walkDir(dir);
|
|
243
|
+
// Collect relative file names for framework detection
|
|
244
|
+
const relativeNames = new Set(files.map((f) => f.slice(dir.length + 1)));
|
|
245
|
+
// Also check basenames for simpler detection
|
|
246
|
+
for (const f of files) {
|
|
247
|
+
relativeNames.add(basename(f));
|
|
248
|
+
}
|
|
249
|
+
const frameworks = detectFrameworks(relativeNames);
|
|
250
|
+
const languages = countLanguages(files);
|
|
251
|
+
const structure = await getTopLevelStructure(dir);
|
|
252
|
+
// Find key files present
|
|
253
|
+
const keyFilesFound = [];
|
|
254
|
+
for (const kf of KEY_FILES) {
|
|
255
|
+
if (relativeNames.has(kf)) {
|
|
256
|
+
keyFilesFound.push(kf);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
// Aggregate suggested agents and tools from detected frameworks
|
|
260
|
+
const agentSet = new Set();
|
|
261
|
+
const toolSet = new Set();
|
|
262
|
+
for (const fw of frameworks) {
|
|
263
|
+
for (const a of fw.agents)
|
|
264
|
+
agentSet.add(a);
|
|
265
|
+
for (const t of fw.tools)
|
|
266
|
+
toolSet.add(t);
|
|
267
|
+
}
|
|
268
|
+
// Add agents based on language mix
|
|
269
|
+
if (Object.keys(languages).length > 3)
|
|
270
|
+
agentSet.add('analyst');
|
|
271
|
+
if (relativeNames.has('Dockerfile') || relativeNames.has('docker-compose.yml')) {
|
|
272
|
+
agentSet.add('infrastructure');
|
|
273
|
+
}
|
|
274
|
+
if (relativeNames.has('.github/workflows') || relativeNames.has('.gitlab-ci.yml')) {
|
|
275
|
+
agentSet.add('infrastructure');
|
|
276
|
+
toolSet.add('ci_monitor');
|
|
277
|
+
}
|
|
278
|
+
if (files.length > 500) {
|
|
279
|
+
agentSet.add('curator');
|
|
280
|
+
toolSet.add('codebase_navigator');
|
|
281
|
+
}
|
|
282
|
+
// Generate recommendations
|
|
283
|
+
const recommendations = [];
|
|
284
|
+
if (!relativeNames.has('README.md') && !relativeNames.has('readme.md')) {
|
|
285
|
+
recommendations.push('Missing README.md — consider adding project documentation');
|
|
286
|
+
}
|
|
287
|
+
if (!relativeNames.has('LICENSE') && !relativeNames.has('license')) {
|
|
288
|
+
recommendations.push('No LICENSE file — add one if this is open source');
|
|
289
|
+
}
|
|
290
|
+
if (!relativeNames.has('.gitignore')) {
|
|
291
|
+
recommendations.push('No .gitignore — risk of committing build artifacts or secrets');
|
|
292
|
+
}
|
|
293
|
+
const hasTests = files.some((f) => f.includes('.test.') || f.includes('.spec.') || f.includes('__tests__'));
|
|
294
|
+
if (!hasTests) {
|
|
295
|
+
recommendations.push('No test files detected — consider adding a test suite');
|
|
296
|
+
toolSet.add('test_scaffolder');
|
|
297
|
+
}
|
|
298
|
+
const hasCI = relativeNames.has('.github/workflows') || relativeNames.has('.gitlab-ci.yml');
|
|
299
|
+
if (!hasCI) {
|
|
300
|
+
recommendations.push('No CI/CD configuration detected — consider adding automated pipelines');
|
|
301
|
+
toolSet.add('ci_generator');
|
|
302
|
+
}
|
|
303
|
+
if (relativeNames.has('.env') || relativeNames.has('.env.local')) {
|
|
304
|
+
recommendations.push('Found .env file — ensure it is in .gitignore and not committed');
|
|
305
|
+
agentSet.add('guardian');
|
|
306
|
+
}
|
|
307
|
+
const sortedLanguages = {};
|
|
308
|
+
const sorted = Object.entries(languages).sort((a, b) => b[1] - a[1]);
|
|
309
|
+
for (const [lang, count] of sorted) {
|
|
310
|
+
sortedLanguages[lang] = count;
|
|
311
|
+
}
|
|
312
|
+
return {
|
|
313
|
+
directory: dir,
|
|
314
|
+
totalFiles: files.length,
|
|
315
|
+
totalDirs: dirs.length,
|
|
316
|
+
languages: sortedLanguages,
|
|
317
|
+
frameworks: frameworks.map((f) => f.name),
|
|
318
|
+
keyFiles: keyFilesFound,
|
|
319
|
+
suggestedAgents: Array.from(agentSet),
|
|
320
|
+
suggestedTools: Array.from(toolSet),
|
|
321
|
+
structure,
|
|
322
|
+
recommendations,
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
/** Format analysis result as a readable report */
|
|
326
|
+
function formatAnalysisReport(result) {
|
|
327
|
+
const parts = [
|
|
328
|
+
`# Project Analysis Report`,
|
|
329
|
+
`**Directory:** ${result.directory}`,
|
|
330
|
+
'',
|
|
331
|
+
`## Overview`,
|
|
332
|
+
`- **Files:** ${result.totalFiles}`,
|
|
333
|
+
`- **Directories:** ${result.totalDirs}`,
|
|
334
|
+
`- **Frameworks:** ${result.frameworks.length > 0 ? result.frameworks.join(', ') : 'None detected'}`,
|
|
335
|
+
'',
|
|
336
|
+
];
|
|
337
|
+
// Languages
|
|
338
|
+
if (Object.keys(result.languages).length > 0) {
|
|
339
|
+
parts.push(`## Languages`);
|
|
340
|
+
for (const [lang, count] of Object.entries(result.languages)) {
|
|
341
|
+
const bar = '#'.repeat(Math.min(Math.ceil(count / 5), 30));
|
|
342
|
+
parts.push(`- **${lang}**: ${count} files ${bar}`);
|
|
343
|
+
}
|
|
344
|
+
parts.push('');
|
|
345
|
+
}
|
|
346
|
+
// Structure
|
|
347
|
+
if (result.structure.length > 0) {
|
|
348
|
+
parts.push(`## Project Structure`);
|
|
349
|
+
parts.push('```');
|
|
350
|
+
parts.push(...result.structure);
|
|
351
|
+
parts.push('```');
|
|
352
|
+
parts.push('');
|
|
353
|
+
}
|
|
354
|
+
// Key files
|
|
355
|
+
if (result.keyFiles.length > 0) {
|
|
356
|
+
parts.push(`## Key Files Found`);
|
|
357
|
+
for (const kf of result.keyFiles) {
|
|
358
|
+
parts.push(`- \`${kf}\``);
|
|
359
|
+
}
|
|
360
|
+
parts.push('');
|
|
361
|
+
}
|
|
362
|
+
// Suggested agents
|
|
363
|
+
if (result.suggestedAgents.length > 0) {
|
|
364
|
+
parts.push(`## Suggested Agents`);
|
|
365
|
+
parts.push('These kbot specialist agents are recommended for this project:');
|
|
366
|
+
parts.push('');
|
|
367
|
+
for (const agent of result.suggestedAgents) {
|
|
368
|
+
parts.push(`- **${agent}**`);
|
|
369
|
+
}
|
|
370
|
+
parts.push('');
|
|
371
|
+
}
|
|
372
|
+
// Suggested tools
|
|
373
|
+
if (result.suggestedTools.length > 0) {
|
|
374
|
+
parts.push(`## Suggested Tools to Forge`);
|
|
375
|
+
parts.push('Consider creating these tools with `forge_tool`:');
|
|
376
|
+
parts.push('');
|
|
377
|
+
for (const tool of result.suggestedTools) {
|
|
378
|
+
parts.push(`- \`${tool}\``);
|
|
379
|
+
}
|
|
380
|
+
parts.push('');
|
|
381
|
+
}
|
|
382
|
+
// Recommendations
|
|
383
|
+
if (result.recommendations.length > 0) {
|
|
384
|
+
parts.push(`## Recommendations`);
|
|
385
|
+
for (const rec of result.recommendations) {
|
|
386
|
+
parts.push(`- ${rec}`);
|
|
387
|
+
}
|
|
388
|
+
parts.push('');
|
|
389
|
+
}
|
|
390
|
+
return parts.join('\n');
|
|
391
|
+
}
|
|
392
|
+
/** Extract owner/repo from a GitHub URL */
|
|
393
|
+
function parseGitHubUrl(url) {
|
|
394
|
+
// Handle: https://github.com/owner/repo, git@github.com:owner/repo.git, etc.
|
|
395
|
+
const httpsMatch = url.match(/github\.com\/([^/]+)\/([^/.]+)/);
|
|
396
|
+
if (httpsMatch)
|
|
397
|
+
return { owner: httpsMatch[1], repo: httpsMatch[2] };
|
|
398
|
+
const sshMatch = url.match(/github\.com:([^/]+)\/([^/.]+)/);
|
|
399
|
+
if (sshMatch)
|
|
400
|
+
return { owner: sshMatch[1], repo: sshMatch[2] };
|
|
401
|
+
return null;
|
|
402
|
+
}
|
|
403
|
+
export function registerBootstrapperTools() {
|
|
404
|
+
registerTool({
|
|
405
|
+
name: 'bootstrap_repo',
|
|
406
|
+
description: 'Clone a GitHub repository to a temp directory, analyze its structure, detect frameworks, ' +
|
|
407
|
+
'identify key files, suggest specialist agents and tools. Returns a full project bootstrapping report.',
|
|
408
|
+
parameters: {
|
|
409
|
+
repo: {
|
|
410
|
+
type: 'string',
|
|
411
|
+
description: 'GitHub repo URL (e.g. "https://github.com/owner/repo") or "owner/repo" shorthand',
|
|
412
|
+
required: true,
|
|
413
|
+
},
|
|
414
|
+
},
|
|
415
|
+
tier: 'free',
|
|
416
|
+
timeout: 120_000, // 2 min for clone + analysis
|
|
417
|
+
async execute(args) {
|
|
418
|
+
const repoArg = String(args.repo);
|
|
419
|
+
// Normalize to full URL
|
|
420
|
+
let cloneUrl;
|
|
421
|
+
let repoSlug;
|
|
422
|
+
if (repoArg.startsWith('http') || repoArg.startsWith('git@')) {
|
|
423
|
+
cloneUrl = repoArg.endsWith('.git') ? repoArg : `${repoArg}.git`;
|
|
424
|
+
const parsed = parseGitHubUrl(repoArg);
|
|
425
|
+
repoSlug = parsed ? `${parsed.owner}/${parsed.repo}` : repoArg;
|
|
426
|
+
}
|
|
427
|
+
else if (repoArg.includes('/')) {
|
|
428
|
+
cloneUrl = `https://github.com/${repoArg}.git`;
|
|
429
|
+
repoSlug = repoArg;
|
|
430
|
+
}
|
|
431
|
+
else {
|
|
432
|
+
return `Invalid repo format. Use "owner/repo" or a full GitHub URL.`;
|
|
433
|
+
}
|
|
434
|
+
// Create temp directory
|
|
435
|
+
let tmpDir;
|
|
436
|
+
try {
|
|
437
|
+
tmpDir = await mkdtemp(join(tmpdir(), 'kbot-bootstrap-'));
|
|
438
|
+
}
|
|
439
|
+
catch (err) {
|
|
440
|
+
return `Failed to create temp directory: ${err instanceof Error ? err.message : String(err)}`;
|
|
441
|
+
}
|
|
442
|
+
const parts = [];
|
|
443
|
+
// Clone the repo (shallow for speed)
|
|
444
|
+
try {
|
|
445
|
+
execSync(`git clone --depth 1 "${cloneUrl}" "${tmpDir}/repo"`, {
|
|
446
|
+
timeout: 60_000,
|
|
447
|
+
stdio: 'pipe',
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
catch (err) {
|
|
451
|
+
// Cleanup on failure
|
|
452
|
+
try {
|
|
453
|
+
await rm(tmpDir, { recursive: true, force: true });
|
|
454
|
+
}
|
|
455
|
+
catch { /* ignore */ }
|
|
456
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
457
|
+
return `Failed to clone ${repoSlug}:\n${msg}\n\nCheck the URL and ensure the repo is public.`;
|
|
458
|
+
}
|
|
459
|
+
const repoDir = join(tmpDir, 'repo');
|
|
460
|
+
// Fetch repo metadata from GitHub API
|
|
461
|
+
const parsed = parseGitHubUrl(cloneUrl) || { owner: repoSlug.split('/')[0], repo: repoSlug.split('/')[1] };
|
|
462
|
+
try {
|
|
463
|
+
const res = await fetch(`https://api.github.com/repos/${parsed.owner}/${parsed.repo}`, {
|
|
464
|
+
headers: { 'User-Agent': 'KBot/3.0 (Bootstrapper)', Accept: 'application/vnd.github.v3+json' },
|
|
465
|
+
});
|
|
466
|
+
if (res.ok) {
|
|
467
|
+
const data = await res.json();
|
|
468
|
+
parts.push(`# Bootstrap Report: ${repoSlug}`);
|
|
469
|
+
parts.push('');
|
|
470
|
+
parts.push(`**Description:** ${data.description || 'No description'}`);
|
|
471
|
+
parts.push(`**Stars:** ${data.stargazers_count} | **Forks:** ${data.forks_count} | **Issues:** ${data.open_issues_count}`);
|
|
472
|
+
parts.push(`**Language:** ${data.language || 'Unknown'} | **License:** ${(data.license?.spdx_id) || 'None'}`);
|
|
473
|
+
parts.push('');
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
catch {
|
|
477
|
+
parts.push(`# Bootstrap Report: ${repoSlug}`);
|
|
478
|
+
parts.push('');
|
|
479
|
+
}
|
|
480
|
+
// Read package.json if present for additional info
|
|
481
|
+
try {
|
|
482
|
+
const pkgRaw = await readFile(join(repoDir, 'package.json'), 'utf-8');
|
|
483
|
+
const pkg = JSON.parse(pkgRaw);
|
|
484
|
+
const deps = Object.keys(pkg.dependencies || {});
|
|
485
|
+
const devDeps = Object.keys(pkg.devDependencies || {});
|
|
486
|
+
parts.push(`## package.json`);
|
|
487
|
+
parts.push(`- **Name:** ${pkg.name || 'unnamed'}`);
|
|
488
|
+
parts.push(`- **Version:** ${pkg.version || 'unknown'}`);
|
|
489
|
+
parts.push(`- **Dependencies:** ${deps.length} (${deps.slice(0, 10).join(', ')}${deps.length > 10 ? '...' : ''})`);
|
|
490
|
+
parts.push(`- **Dev Dependencies:** ${devDeps.length} (${devDeps.slice(0, 10).join(', ')}${devDeps.length > 10 ? '...' : ''})`);
|
|
491
|
+
parts.push('');
|
|
492
|
+
}
|
|
493
|
+
catch {
|
|
494
|
+
// No package.json — not a Node project
|
|
495
|
+
}
|
|
496
|
+
// Full analysis
|
|
497
|
+
const analysis = await analyzeDirectory(repoDir);
|
|
498
|
+
// Override directory display with the repo slug
|
|
499
|
+
analysis.directory = repoSlug;
|
|
500
|
+
parts.push(formatAnalysisReport(analysis));
|
|
501
|
+
// Custom agent suggestions
|
|
502
|
+
parts.push(`## Custom Agent Configuration`);
|
|
503
|
+
parts.push('Recommended `.kbot/agents.json` for this project:');
|
|
504
|
+
parts.push('');
|
|
505
|
+
parts.push('```json');
|
|
506
|
+
const agentConfig = analysis.suggestedAgents.map((a) => ({
|
|
507
|
+
id: a,
|
|
508
|
+
active: true,
|
|
509
|
+
priority: a === 'coder' ? 'high' : 'normal',
|
|
510
|
+
}));
|
|
511
|
+
parts.push(JSON.stringify({ agents: agentConfig }, null, 2));
|
|
512
|
+
parts.push('```');
|
|
513
|
+
parts.push('');
|
|
514
|
+
// Cleanup temp dir
|
|
515
|
+
try {
|
|
516
|
+
await rm(tmpDir, { recursive: true, force: true });
|
|
517
|
+
}
|
|
518
|
+
catch {
|
|
519
|
+
parts.push(`(Note: temp dir ${tmpDir} may need manual cleanup)`);
|
|
520
|
+
}
|
|
521
|
+
return parts.join('\n');
|
|
522
|
+
},
|
|
523
|
+
});
|
|
524
|
+
registerTool({
|
|
525
|
+
name: 'bootstrap_analyze',
|
|
526
|
+
description: 'Analyze a local directory structure. Detects frameworks, counts files by language, ' +
|
|
527
|
+
'finds key configuration files, suggests specialist agents and tools to forge. ' +
|
|
528
|
+
'Returns actionable recommendations for the project.',
|
|
529
|
+
parameters: {
|
|
530
|
+
directory: {
|
|
531
|
+
type: 'string',
|
|
532
|
+
description: 'Absolute path to the local directory to analyze',
|
|
533
|
+
required: true,
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
tier: 'free',
|
|
537
|
+
async execute(args) {
|
|
538
|
+
const dir = String(args.directory);
|
|
539
|
+
// Verify directory exists
|
|
540
|
+
try {
|
|
541
|
+
const info = await stat(dir);
|
|
542
|
+
if (!info.isDirectory()) {
|
|
543
|
+
return `"${dir}" is not a directory.`;
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
catch {
|
|
547
|
+
return `Directory not found: ${dir}`;
|
|
548
|
+
}
|
|
549
|
+
try {
|
|
550
|
+
const analysis = await analyzeDirectory(dir);
|
|
551
|
+
return formatAnalysisReport(analysis);
|
|
552
|
+
}
|
|
553
|
+
catch (err) {
|
|
554
|
+
return `Analysis failed: ${err instanceof Error ? err.message : String(err)}`;
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
//# sourceMappingURL=bootstrapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrapper.js","sourceRoot":"","sources":["../../src/tools/bootstrapper.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,gFAAgF;AAEhF,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,MAAM,kBAAkB,CAAA;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