ted-mosby 1.0.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/LICENSE +21 -0
- package/README.md +238 -0
- package/dist/agent.d.ts +37 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +247 -0
- package/dist/agent.js.map +1 -0
- package/dist/claude-config.d.ts +58 -0
- package/dist/claude-config.d.ts.map +1 -0
- package/dist/claude-config.js +169 -0
- package/dist/claude-config.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +1379 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +42 -0
- package/dist/config.js.map +1 -0
- package/dist/mcp-config.d.ts +45 -0
- package/dist/mcp-config.d.ts.map +1 -0
- package/dist/mcp-config.js +111 -0
- package/dist/mcp-config.js.map +1 -0
- package/dist/permissions.d.ts +32 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +165 -0
- package/dist/permissions.js.map +1 -0
- package/dist/planner.d.ts +42 -0
- package/dist/planner.d.ts.map +1 -0
- package/dist/planner.js +232 -0
- package/dist/planner.js.map +1 -0
- package/dist/prompts/wiki-system.d.ts +8 -0
- package/dist/prompts/wiki-system.d.ts.map +1 -0
- package/dist/prompts/wiki-system.js +249 -0
- package/dist/prompts/wiki-system.js.map +1 -0
- package/dist/rag/index.d.ts +84 -0
- package/dist/rag/index.d.ts.map +1 -0
- package/dist/rag/index.js +446 -0
- package/dist/rag/index.js.map +1 -0
- package/dist/tools/command-runner.d.ts +21 -0
- package/dist/tools/command-runner.d.ts.map +1 -0
- package/dist/tools/command-runner.js +67 -0
- package/dist/tools/command-runner.js.map +1 -0
- package/dist/tools/file-operations.d.ts +22 -0
- package/dist/tools/file-operations.d.ts.map +1 -0
- package/dist/tools/file-operations.js +119 -0
- package/dist/tools/file-operations.js.map +1 -0
- package/dist/tools/web-tools.d.ts +17 -0
- package/dist/tools/web-tools.d.ts.map +1 -0
- package/dist/tools/web-tools.js +122 -0
- package/dist/tools/web-tools.js.map +1 -0
- package/dist/wiki-agent.d.ts +81 -0
- package/dist/wiki-agent.d.ts.map +1 -0
- package/dist/wiki-agent.js +552 -0
- package/dist/wiki-agent.js.map +1 -0
- package/dist/workflows.d.ts +53 -0
- package/dist/workflows.d.ts.map +1 -0
- package/dist/workflows.js +169 -0
- package/dist/workflows.js.map +1 -0
- package/package.json +67 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RAG (Retrieval Augmented Generation) System for ArchitecturalWiki
|
|
3
|
+
*
|
|
4
|
+
* Uses FAISS for vector similarity search over codebase embeddings.
|
|
5
|
+
* Chunks code at logical boundaries and indexes for semantic retrieval.
|
|
6
|
+
*/
|
|
7
|
+
import * as fs from 'fs';
|
|
8
|
+
import * as path from 'path';
|
|
9
|
+
import { glob } from 'glob';
|
|
10
|
+
import Anthropic from '@anthropic-ai/sdk';
|
|
11
|
+
// FAISS types (faiss-node)
|
|
12
|
+
let faiss;
|
|
13
|
+
try {
|
|
14
|
+
faiss = require('faiss-node');
|
|
15
|
+
}
|
|
16
|
+
catch (e) {
|
|
17
|
+
console.warn('Warning: faiss-node not available, using fallback similarity search');
|
|
18
|
+
}
|
|
19
|
+
// File extensions to index
|
|
20
|
+
const INDEXABLE_EXTENSIONS = [
|
|
21
|
+
'.ts', '.tsx', '.js', '.jsx', '.mjs', '.cjs',
|
|
22
|
+
'.py', '.pyx',
|
|
23
|
+
'.go',
|
|
24
|
+
'.rs',
|
|
25
|
+
'.java', '.kt', '.scala',
|
|
26
|
+
'.rb',
|
|
27
|
+
'.php',
|
|
28
|
+
'.c', '.cpp', '.h', '.hpp',
|
|
29
|
+
'.cs',
|
|
30
|
+
'.swift',
|
|
31
|
+
'.vue', '.svelte',
|
|
32
|
+
'.json', '.yaml', '.yml', '.toml',
|
|
33
|
+
'.md', '.mdx'
|
|
34
|
+
];
|
|
35
|
+
// Patterns to exclude
|
|
36
|
+
const EXCLUDE_PATTERNS = [
|
|
37
|
+
'**/node_modules/**',
|
|
38
|
+
'**/.git/**',
|
|
39
|
+
'**/dist/**',
|
|
40
|
+
'**/build/**',
|
|
41
|
+
'**/.next/**',
|
|
42
|
+
'**/coverage/**',
|
|
43
|
+
'**/__pycache__/**',
|
|
44
|
+
'**/venv/**',
|
|
45
|
+
'**/.venv/**',
|
|
46
|
+
'**/vendor/**',
|
|
47
|
+
'**/*.min.js',
|
|
48
|
+
'**/*.bundle.js',
|
|
49
|
+
'**/package-lock.json',
|
|
50
|
+
'**/yarn.lock',
|
|
51
|
+
'**/pnpm-lock.yaml'
|
|
52
|
+
];
|
|
53
|
+
export class RAGSystem {
|
|
54
|
+
config;
|
|
55
|
+
anthropic;
|
|
56
|
+
index = null; // FAISS index
|
|
57
|
+
metadata = new Map();
|
|
58
|
+
embeddingDimension = 1024; // Voyage embeddings dimension
|
|
59
|
+
documentCount = 0;
|
|
60
|
+
constructor(config) {
|
|
61
|
+
this.config = {
|
|
62
|
+
chunkSize: 1500,
|
|
63
|
+
chunkOverlap: 200,
|
|
64
|
+
...config
|
|
65
|
+
};
|
|
66
|
+
this.anthropic = new Anthropic();
|
|
67
|
+
// Ensure cache directory exists
|
|
68
|
+
if (!fs.existsSync(this.config.storePath)) {
|
|
69
|
+
fs.mkdirSync(this.config.storePath, { recursive: true });
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Index the repository for semantic search
|
|
74
|
+
*/
|
|
75
|
+
async indexRepository() {
|
|
76
|
+
const cachedIndexPath = path.join(this.config.storePath, 'index.faiss');
|
|
77
|
+
const cachedMetaPath = path.join(this.config.storePath, 'metadata.json');
|
|
78
|
+
// Try to load cached index
|
|
79
|
+
if (fs.existsSync(cachedIndexPath) && fs.existsSync(cachedMetaPath) && faiss) {
|
|
80
|
+
try {
|
|
81
|
+
this.index = faiss.read_index(cachedIndexPath);
|
|
82
|
+
const metaData = JSON.parse(fs.readFileSync(cachedMetaPath, 'utf-8'));
|
|
83
|
+
this.metadata = new Map(Object.entries(metaData).map(([k, v]) => [parseInt(k), v]));
|
|
84
|
+
this.documentCount = this.metadata.size;
|
|
85
|
+
console.log(`Loaded cached index with ${this.documentCount} chunks`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
catch (e) {
|
|
89
|
+
console.warn('Could not load cached index, rebuilding...');
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// Discover files
|
|
93
|
+
console.log(' Discovering files...');
|
|
94
|
+
const files = await this.discoverFiles();
|
|
95
|
+
console.log(` Found ${files.length} files to index`);
|
|
96
|
+
// Chunk files with progress
|
|
97
|
+
const chunks = [];
|
|
98
|
+
let lastProgress = -1;
|
|
99
|
+
for (let i = 0; i < files.length; i++) {
|
|
100
|
+
// Yield to event loop every 10 files to allow Ctrl+C
|
|
101
|
+
if (i % 10 === 0) {
|
|
102
|
+
await new Promise(resolve => setImmediate(resolve));
|
|
103
|
+
}
|
|
104
|
+
const file = files[i];
|
|
105
|
+
// Show progress every 5%
|
|
106
|
+
const progress = Math.floor((i + 1) / files.length * 100);
|
|
107
|
+
if (progress >= lastProgress + 5) {
|
|
108
|
+
console.log(` Chunking... ${i + 1}/${files.length} (${progress}%)`);
|
|
109
|
+
lastProgress = progress;
|
|
110
|
+
}
|
|
111
|
+
try {
|
|
112
|
+
const fileChunks = await this.chunkFile(file);
|
|
113
|
+
chunks.push(...fileChunks);
|
|
114
|
+
}
|
|
115
|
+
catch (err) {
|
|
116
|
+
// Skip files that fail to chunk
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
console.log(` Chunking complete: ${chunks.length} chunks from ${files.length} files`);
|
|
120
|
+
if (chunks.length === 0) {
|
|
121
|
+
console.warn('No code chunks to index');
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
// Generate embeddings
|
|
125
|
+
console.log(` Generating embeddings for ${chunks.length} chunks...`);
|
|
126
|
+
const embeddings = await this.generateEmbeddings(chunks);
|
|
127
|
+
// Build FAISS index
|
|
128
|
+
console.log(` Building search index...`);
|
|
129
|
+
if (faiss && embeddings.length > 0) {
|
|
130
|
+
this.index = new faiss.IndexFlatIP(this.embeddingDimension); // Inner product for cosine similarity
|
|
131
|
+
// Add all embeddings
|
|
132
|
+
for (let i = 0; i < embeddings.length; i++) {
|
|
133
|
+
// Normalize for cosine similarity
|
|
134
|
+
const normalized = this.normalizeVector(embeddings[i]);
|
|
135
|
+
this.index.add([normalized]);
|
|
136
|
+
this.metadata.set(i, {
|
|
137
|
+
id: chunks[i].id,
|
|
138
|
+
filePath: chunks[i].filePath,
|
|
139
|
+
startLine: chunks[i].startLine,
|
|
140
|
+
endLine: chunks[i].endLine,
|
|
141
|
+
content: chunks[i].content,
|
|
142
|
+
language: chunks[i].language
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
// Save index and metadata
|
|
146
|
+
faiss.write_index(this.index, cachedIndexPath);
|
|
147
|
+
fs.writeFileSync(cachedMetaPath, JSON.stringify(Object.fromEntries(this.metadata)), 'utf-8');
|
|
148
|
+
this.documentCount = chunks.length;
|
|
149
|
+
console.log(` ✓ Indexed ${this.documentCount} chunks with FAISS`);
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
// Fallback: just store chunks for simple search
|
|
153
|
+
chunks.forEach((chunk, i) => {
|
|
154
|
+
this.metadata.set(i, {
|
|
155
|
+
id: chunk.id,
|
|
156
|
+
filePath: chunk.filePath,
|
|
157
|
+
startLine: chunk.startLine,
|
|
158
|
+
endLine: chunk.endLine,
|
|
159
|
+
content: chunk.content,
|
|
160
|
+
language: chunk.language
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
this.documentCount = chunks.length;
|
|
164
|
+
console.log(` ✓ Indexed ${this.documentCount} chunks (keyword search mode)`);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Discover all indexable files in the repository
|
|
169
|
+
*/
|
|
170
|
+
async discoverFiles() {
|
|
171
|
+
const files = [];
|
|
172
|
+
// Process extensions one at a time with event loop yields
|
|
173
|
+
for (let i = 0; i < INDEXABLE_EXTENSIONS.length; i++) {
|
|
174
|
+
const ext = INDEXABLE_EXTENSIONS[i];
|
|
175
|
+
// Yield to event loop to allow Ctrl+C to work
|
|
176
|
+
await new Promise(resolve => setImmediate(resolve));
|
|
177
|
+
try {
|
|
178
|
+
const matches = await glob(`**/*${ext}`, {
|
|
179
|
+
cwd: this.config.repoPath,
|
|
180
|
+
ignore: EXCLUDE_PATTERNS,
|
|
181
|
+
absolute: false
|
|
182
|
+
});
|
|
183
|
+
files.push(...matches);
|
|
184
|
+
// Show progress for large repos
|
|
185
|
+
if (matches.length > 0) {
|
|
186
|
+
console.log(` Found ${matches.length} ${ext} files`);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
catch (err) {
|
|
190
|
+
// Skip on error, continue with other extensions
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
return [...new Set(files)]; // Remove duplicates
|
|
194
|
+
}
|
|
195
|
+
/**
|
|
196
|
+
* Chunk a file into logical segments
|
|
197
|
+
*/
|
|
198
|
+
async chunkFile(filePath) {
|
|
199
|
+
const fullPath = path.join(this.config.repoPath, filePath);
|
|
200
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
201
|
+
const lines = content.split('\n');
|
|
202
|
+
const ext = path.extname(filePath);
|
|
203
|
+
const language = this.getLanguage(ext);
|
|
204
|
+
const chunks = [];
|
|
205
|
+
const chunkSize = this.config.chunkSize;
|
|
206
|
+
const overlap = this.config.chunkOverlap;
|
|
207
|
+
// Simple line-based chunking with overlap
|
|
208
|
+
// TODO: Enhance with AST-aware chunking for better boundaries
|
|
209
|
+
let startLine = 0;
|
|
210
|
+
while (startLine < lines.length) {
|
|
211
|
+
// Calculate chunk boundaries
|
|
212
|
+
let endLine = startLine;
|
|
213
|
+
let charCount = 0;
|
|
214
|
+
while (endLine < lines.length && charCount < chunkSize) {
|
|
215
|
+
charCount += lines[endLine].length + 1; // +1 for newline
|
|
216
|
+
endLine++;
|
|
217
|
+
}
|
|
218
|
+
// Try to end at a logical boundary (empty line, closing brace)
|
|
219
|
+
const lookAhead = Math.min(endLine + 10, lines.length);
|
|
220
|
+
for (let i = endLine; i < lookAhead; i++) {
|
|
221
|
+
const line = lines[i].trim();
|
|
222
|
+
if (line === '' || line === '}' || line === '};' || line === 'end') {
|
|
223
|
+
endLine = i + 1;
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
const chunkContent = lines.slice(startLine, endLine).join('\n');
|
|
228
|
+
if (chunkContent.trim().length > 50) { // Skip tiny chunks
|
|
229
|
+
chunks.push({
|
|
230
|
+
id: `${filePath}:${startLine + 1}-${endLine}`,
|
|
231
|
+
filePath,
|
|
232
|
+
startLine: startLine + 1, // 1-indexed
|
|
233
|
+
endLine,
|
|
234
|
+
content: chunkContent,
|
|
235
|
+
language
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
// Move to next chunk with overlap
|
|
239
|
+
const prevStartLine = startLine;
|
|
240
|
+
startLine = endLine - Math.floor(overlap / 50); // Overlap in lines
|
|
241
|
+
// Prevent infinite loop - ensure we always make progress
|
|
242
|
+
if (startLine <= prevStartLine) {
|
|
243
|
+
startLine = endLine;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
return chunks;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Generate embeddings for code chunks using Anthropic's Voyage embeddings via their SDK
|
|
250
|
+
*/
|
|
251
|
+
async generateEmbeddings(chunks) {
|
|
252
|
+
const embeddings = [];
|
|
253
|
+
// Process in batches
|
|
254
|
+
const batchSize = 20;
|
|
255
|
+
for (let i = 0; i < chunks.length; i += batchSize) {
|
|
256
|
+
const batch = chunks.slice(i, i + batchSize);
|
|
257
|
+
try {
|
|
258
|
+
// Use Anthropic to generate embeddings via message
|
|
259
|
+
// Note: Anthropic doesn't have a direct embedding API, so we use a workaround
|
|
260
|
+
// In production, you'd use Voyage AI or OpenAI embeddings
|
|
261
|
+
const batchEmbeddings = await this.generateSimpleEmbeddings(batch);
|
|
262
|
+
embeddings.push(...batchEmbeddings);
|
|
263
|
+
// Progress update every batch
|
|
264
|
+
const processed = Math.min(i + batchSize, chunks.length);
|
|
265
|
+
const percent = Math.floor(processed / chunks.length * 100);
|
|
266
|
+
console.log(` Embedding... ${processed}/${chunks.length} (${percent}%)`);
|
|
267
|
+
}
|
|
268
|
+
catch (error) {
|
|
269
|
+
console.warn(`Embedding error at batch ${i}: ${error}`);
|
|
270
|
+
// Add zero vectors as fallback
|
|
271
|
+
for (let j = 0; j < batch.length; j++) {
|
|
272
|
+
embeddings.push(new Array(this.embeddingDimension).fill(0));
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
console.log(` Embedding complete: ${embeddings.length} vectors generated`);
|
|
277
|
+
return embeddings;
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Simple TF-IDF-like embedding for fallback when API embedding isn't available
|
|
281
|
+
* This is a simplified implementation - production should use proper embeddings
|
|
282
|
+
*/
|
|
283
|
+
async generateSimpleEmbeddings(chunks) {
|
|
284
|
+
return chunks.map(chunk => {
|
|
285
|
+
// Create a simple bag-of-words vector
|
|
286
|
+
const words = chunk.content.toLowerCase()
|
|
287
|
+
.replace(/[^a-z0-9_]/g, ' ')
|
|
288
|
+
.split(/\s+/)
|
|
289
|
+
.filter(w => w.length > 2);
|
|
290
|
+
// Simple hash-based embedding
|
|
291
|
+
const vector = new Array(this.embeddingDimension).fill(0);
|
|
292
|
+
for (const word of words) {
|
|
293
|
+
const hash = this.simpleHash(word) % this.embeddingDimension;
|
|
294
|
+
vector[hash] += 1;
|
|
295
|
+
}
|
|
296
|
+
return this.normalizeVector(vector);
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Simple string hash function
|
|
301
|
+
*/
|
|
302
|
+
simpleHash(str) {
|
|
303
|
+
let hash = 0;
|
|
304
|
+
for (let i = 0; i < str.length; i++) {
|
|
305
|
+
const char = str.charCodeAt(i);
|
|
306
|
+
hash = ((hash << 5) - hash) + char;
|
|
307
|
+
hash = hash & hash;
|
|
308
|
+
}
|
|
309
|
+
return Math.abs(hash);
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Normalize a vector for cosine similarity
|
|
313
|
+
*/
|
|
314
|
+
normalizeVector(vector) {
|
|
315
|
+
const norm = Math.sqrt(vector.reduce((sum, val) => sum + val * val, 0));
|
|
316
|
+
if (norm === 0)
|
|
317
|
+
return vector;
|
|
318
|
+
return vector.map(val => val / norm);
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* Search the codebase for relevant code
|
|
322
|
+
*/
|
|
323
|
+
async search(query, options = {}) {
|
|
324
|
+
const maxResults = options.maxResults || 10;
|
|
325
|
+
if (this.metadata.size === 0) {
|
|
326
|
+
return [];
|
|
327
|
+
}
|
|
328
|
+
// Generate query embedding
|
|
329
|
+
const [queryEmbedding] = await this.generateSimpleEmbeddings([{
|
|
330
|
+
id: 'query',
|
|
331
|
+
filePath: '',
|
|
332
|
+
startLine: 0,
|
|
333
|
+
endLine: 0,
|
|
334
|
+
content: query,
|
|
335
|
+
language: ''
|
|
336
|
+
}]);
|
|
337
|
+
let results = [];
|
|
338
|
+
if (this.index && faiss) {
|
|
339
|
+
// FAISS search
|
|
340
|
+
const normalized = this.normalizeVector(queryEmbedding);
|
|
341
|
+
const { distances, labels } = this.index.search([normalized], maxResults * 2);
|
|
342
|
+
for (let i = 0; i < labels[0].length; i++) {
|
|
343
|
+
const label = labels[0][i];
|
|
344
|
+
if (label === -1)
|
|
345
|
+
continue;
|
|
346
|
+
const meta = this.metadata.get(label);
|
|
347
|
+
if (!meta)
|
|
348
|
+
continue;
|
|
349
|
+
// Apply filters
|
|
350
|
+
if (options.excludeTests && this.isTestFile(meta.filePath))
|
|
351
|
+
continue;
|
|
352
|
+
if (options.fileTypes && !options.fileTypes.some(ext => meta.filePath.endsWith(ext)))
|
|
353
|
+
continue;
|
|
354
|
+
results.push({
|
|
355
|
+
...meta,
|
|
356
|
+
score: distances[0][i]
|
|
357
|
+
});
|
|
358
|
+
if (results.length >= maxResults)
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
// Fallback: simple keyword matching
|
|
364
|
+
const queryTerms = query.toLowerCase().split(/\s+/);
|
|
365
|
+
const scored = [];
|
|
366
|
+
for (const [, meta] of this.metadata) {
|
|
367
|
+
// Apply filters
|
|
368
|
+
if (options.excludeTests && this.isTestFile(meta.filePath))
|
|
369
|
+
continue;
|
|
370
|
+
if (options.fileTypes && !options.fileTypes.some(ext => meta.filePath.endsWith(ext)))
|
|
371
|
+
continue;
|
|
372
|
+
// Simple relevance score
|
|
373
|
+
const content = meta.content.toLowerCase();
|
|
374
|
+
let score = 0;
|
|
375
|
+
for (const term of queryTerms) {
|
|
376
|
+
const matches = (content.match(new RegExp(term, 'g')) || []).length;
|
|
377
|
+
score += matches;
|
|
378
|
+
}
|
|
379
|
+
if (score > 0) {
|
|
380
|
+
scored.push({ meta, score });
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
// Sort by score descending
|
|
384
|
+
scored.sort((a, b) => b.score - a.score);
|
|
385
|
+
results = scored.slice(0, maxResults).map(s => ({
|
|
386
|
+
...s.meta,
|
|
387
|
+
score: s.score
|
|
388
|
+
}));
|
|
389
|
+
}
|
|
390
|
+
return results;
|
|
391
|
+
}
|
|
392
|
+
/**
|
|
393
|
+
* Check if a file is a test file
|
|
394
|
+
*/
|
|
395
|
+
isTestFile(filePath) {
|
|
396
|
+
const testPatterns = [
|
|
397
|
+
/\.test\./,
|
|
398
|
+
/\.spec\./,
|
|
399
|
+
/_test\./,
|
|
400
|
+
/test_/,
|
|
401
|
+
/__tests__/,
|
|
402
|
+
/tests\//,
|
|
403
|
+
/\.stories\./,
|
|
404
|
+
/__mocks__/
|
|
405
|
+
];
|
|
406
|
+
return testPatterns.some(pattern => pattern.test(filePath));
|
|
407
|
+
}
|
|
408
|
+
/**
|
|
409
|
+
* Get language from file extension
|
|
410
|
+
*/
|
|
411
|
+
getLanguage(ext) {
|
|
412
|
+
const langMap = {
|
|
413
|
+
'.ts': 'typescript',
|
|
414
|
+
'.tsx': 'tsx',
|
|
415
|
+
'.js': 'javascript',
|
|
416
|
+
'.jsx': 'jsx',
|
|
417
|
+
'.py': 'python',
|
|
418
|
+
'.go': 'go',
|
|
419
|
+
'.rs': 'rust',
|
|
420
|
+
'.java': 'java',
|
|
421
|
+
'.kt': 'kotlin',
|
|
422
|
+
'.rb': 'ruby',
|
|
423
|
+
'.php': 'php',
|
|
424
|
+
'.c': 'c',
|
|
425
|
+
'.cpp': 'cpp',
|
|
426
|
+
'.h': 'c',
|
|
427
|
+
'.hpp': 'cpp',
|
|
428
|
+
'.cs': 'csharp',
|
|
429
|
+
'.swift': 'swift',
|
|
430
|
+
'.vue': 'vue',
|
|
431
|
+
'.svelte': 'svelte',
|
|
432
|
+
'.json': 'json',
|
|
433
|
+
'.yaml': 'yaml',
|
|
434
|
+
'.yml': 'yaml',
|
|
435
|
+
'.md': 'markdown'
|
|
436
|
+
};
|
|
437
|
+
return langMap[ext] || '';
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Get the number of indexed documents
|
|
441
|
+
*/
|
|
442
|
+
getDocumentCount() {
|
|
443
|
+
return this.documentCount;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rag/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MA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;YACT,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,GAAG;YACT,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,QAAQ;YACf,QAAQ,EAAE,OAAO;YACjB,MAAM,EAAE,KAAK;YACb,SAAS,EAAE,QAAQ;YACnB,OAAO,EAAE,MAAM;YACf,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,UAAU;SAClB,CAAC;QACF,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACH,gBAAgB;QACd,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { PermissionManager } from '../permissions.js';
|
|
2
|
+
export interface CommandResult {
|
|
3
|
+
stdout: string;
|
|
4
|
+
stderr: string;
|
|
5
|
+
exitCode: number;
|
|
6
|
+
command: string;
|
|
7
|
+
}
|
|
8
|
+
export declare class CommandRunner {
|
|
9
|
+
private permissionManager;
|
|
10
|
+
constructor(permissionManager: PermissionManager);
|
|
11
|
+
execute(command: string, options?: {
|
|
12
|
+
cwd?: string;
|
|
13
|
+
timeout?: number;
|
|
14
|
+
}): Promise<CommandResult>;
|
|
15
|
+
formatResult(result: CommandResult): string;
|
|
16
|
+
executeShell(script: string, options?: {
|
|
17
|
+
cwd?: string;
|
|
18
|
+
timeout?: number;
|
|
19
|
+
}): Promise<CommandResult>;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=command-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-runner.d.ts","sourceRoot":"","sources":["../../src/tools/command-runner.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,qBAAa,aAAa;IACxB,OAAO,CAAC,iBAAiB,CAAoB;gBAEjC,iBAAiB,EAAE,iBAAiB;IAI1C,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;IAsDpG,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM;IAerC,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,aAAa,CAAC;CAGzG"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { spawn } from 'child_process';
|
|
2
|
+
export class CommandRunner {
|
|
3
|
+
permissionManager;
|
|
4
|
+
constructor(permissionManager) {
|
|
5
|
+
this.permissionManager = permissionManager;
|
|
6
|
+
}
|
|
7
|
+
async execute(command, options) {
|
|
8
|
+
// Request permission before executing command (HIGH RISK)
|
|
9
|
+
const permission = await this.permissionManager.requestPermission({
|
|
10
|
+
action: 'run_command',
|
|
11
|
+
resource: command,
|
|
12
|
+
details: `Executing command in ${options?.cwd || 'current directory'}`
|
|
13
|
+
});
|
|
14
|
+
if (!permission.allowed) {
|
|
15
|
+
throw new Error(`Permission denied: Cannot execute command "${command}"`);
|
|
16
|
+
}
|
|
17
|
+
return new Promise((resolve, reject) => {
|
|
18
|
+
const [cmd, ...args] = command.split(' ');
|
|
19
|
+
const child = spawn(cmd, args, {
|
|
20
|
+
cwd: options?.cwd || process.cwd(),
|
|
21
|
+
stdio: 'pipe',
|
|
22
|
+
shell: true
|
|
23
|
+
});
|
|
24
|
+
let stdout = '';
|
|
25
|
+
let stderr = '';
|
|
26
|
+
child.stdout?.on('data', (data) => {
|
|
27
|
+
stdout += data.toString();
|
|
28
|
+
});
|
|
29
|
+
child.stderr?.on('data', (data) => {
|
|
30
|
+
stderr += data.toString();
|
|
31
|
+
});
|
|
32
|
+
const timeout = options?.timeout || 30000;
|
|
33
|
+
const timer = setTimeout(() => {
|
|
34
|
+
child.kill('SIGKILL');
|
|
35
|
+
reject(new Error(`Command timed out after ${timeout}ms: ${command}`));
|
|
36
|
+
}, timeout);
|
|
37
|
+
child.on('close', (exitCode) => {
|
|
38
|
+
clearTimeout(timer);
|
|
39
|
+
resolve({
|
|
40
|
+
stdout: stdout.trim(),
|
|
41
|
+
stderr: stderr.trim(),
|
|
42
|
+
exitCode: exitCode || 0,
|
|
43
|
+
command
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
child.on('error', (error) => {
|
|
47
|
+
clearTimeout(timer);
|
|
48
|
+
reject(new Error(`Failed to execute command ${command}: ${error.message}`));
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
formatResult(result) {
|
|
53
|
+
let output = `Command: ${result.command}\n`;
|
|
54
|
+
output += `Exit Code: ${result.exitCode}\n`;
|
|
55
|
+
if (result.stdout) {
|
|
56
|
+
output += `\nSTDOUT:\n${result.stdout}\n`;
|
|
57
|
+
}
|
|
58
|
+
if (result.stderr) {
|
|
59
|
+
output += `\nSTDERR:\n${result.stderr}\n`;
|
|
60
|
+
}
|
|
61
|
+
return output;
|
|
62
|
+
}
|
|
63
|
+
async executeShell(script, options) {
|
|
64
|
+
return this.execute(script, options);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
//# sourceMappingURL=command-runner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"command-runner.js","sourceRoot":"","sources":["../../src/tools/command-runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAA;AAWrC,MAAM,OAAO,aAAa;IAChB,iBAAiB,CAAoB;IAE7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CAAC,YAAY,CAAC,MAAc,EAAE,OAA4C;QAC7E,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACtC,CAAC;CACF"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PermissionManager } from '../permissions.js';
|
|
2
|
+
export declare class FileOperations {
|
|
3
|
+
private permissionManager;
|
|
4
|
+
private baseDir;
|
|
5
|
+
constructor(permissionManager: PermissionManager, baseDir?: string);
|
|
6
|
+
/**
|
|
7
|
+
* Validates that a path is within the allowed base directory.
|
|
8
|
+
* Prevents directory traversal attacks and access outside sandbox.
|
|
9
|
+
*/
|
|
10
|
+
private validatePath;
|
|
11
|
+
readFile(filePath: string): Promise<string>;
|
|
12
|
+
writeFile(filePath: string, content: string): Promise<void>;
|
|
13
|
+
fileExists(filePath: string): Promise<boolean>;
|
|
14
|
+
listFiles(dirPath: string): Promise<string[]>;
|
|
15
|
+
findFiles(pattern: string, cwd?: string): Promise<string[]>;
|
|
16
|
+
getFileStats(filePath: string): Promise<{
|
|
17
|
+
size: number;
|
|
18
|
+
modified: Date;
|
|
19
|
+
isDirectory: boolean;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=file-operations.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-operations.d.ts","sourceRoot":"","sources":["../../src/tools/file-operations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAErD,qBAAa,cAAc;IACzB,OAAO,CAAC,iBAAiB,CAAoB;IAC7C,OAAO,CAAC,OAAO,CAAS;gBAEZ,iBAAiB,EAAE,iBAAiB,EAAE,OAAO,GAAE,MAAsB;IAKjF;;;OAGG;IACH,OAAO,CAAC,YAAY;IASd,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAY3C,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAsB3D,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAa9C,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAe7C,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAqB3D,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAC;QAAC,WAAW,EAAE,OAAO,CAAA;KAAE,CAAC;CAgBtG"}
|