fivocell 3.1.0 → 4.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/dist/ai-bridge.d.ts +20 -0
- package/dist/ai-bridge.d.ts.map +1 -0
- package/dist/ai-bridge.js +250 -0
- package/dist/ai-bridge.js.map +1 -0
- package/dist/cli.js +133 -3
- package/dist/cli.js.map +1 -1
- package/dist/code-scanner.d.ts.map +1 -1
- package/dist/code-scanner.js +153 -0
- package/dist/code-scanner.js.map +1 -1
- package/dist/core/prompt-builder.d.ts +1 -0
- package/dist/core/prompt-builder.d.ts.map +1 -1
- package/dist/core/prompt-builder.js +55 -16
- package/dist/core/prompt-builder.js.map +1 -1
- package/dist/knowledge-graph-builder.d.ts +16 -0
- package/dist/knowledge-graph-builder.d.ts.map +1 -0
- package/dist/knowledge-graph-builder.js +170 -0
- package/dist/knowledge-graph-builder.js.map +1 -0
- package/dist/stack-detector.d.ts +34 -0
- package/dist/stack-detector.d.ts.map +1 -0
- package/dist/stack-detector.js +471 -0
- package/dist/stack-detector.js.map +1 -0
- package/dist/team-intel.d.ts +31 -0
- package/dist/team-intel.d.ts.map +1 -0
- package/dist/team-intel.js +310 -0
- package/dist/team-intel.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.buildKnowledgeGraph = buildKnowledgeGraph;
|
|
37
|
+
const fs = __importStar(require("fs"));
|
|
38
|
+
const path = __importStar(require("path"));
|
|
39
|
+
const ts = __importStar(require("typescript"));
|
|
40
|
+
// ─── Builder ───────────────────────────────────────────────────────────────
|
|
41
|
+
const IGNORE_DIRS = new Set(['node_modules', '.git', 'dist', 'build', '.next', '.nuxt', 'coverage', '__pycache__', '.fivo', 'cell-data', 'archived']);
|
|
42
|
+
function walkFiles(dir, files = []) {
|
|
43
|
+
if (!fs.existsSync(dir))
|
|
44
|
+
return files;
|
|
45
|
+
try {
|
|
46
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
47
|
+
for (const e of entries) {
|
|
48
|
+
if (IGNORE_DIRS.has(e.name) || e.name.startsWith('.'))
|
|
49
|
+
continue;
|
|
50
|
+
const full = path.join(dir, e.name);
|
|
51
|
+
if (e.isDirectory())
|
|
52
|
+
walkFiles(full, files);
|
|
53
|
+
else if (/\.(ts|tsx|js|jsx)$/i.test(e.name)) {
|
|
54
|
+
try {
|
|
55
|
+
if (fs.statSync(full).size < 500_000)
|
|
56
|
+
files.push(full);
|
|
57
|
+
}
|
|
58
|
+
catch { }
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
catch { }
|
|
63
|
+
return files;
|
|
64
|
+
}
|
|
65
|
+
function extractImports(filePath) {
|
|
66
|
+
const imports = [];
|
|
67
|
+
try {
|
|
68
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
69
|
+
const sourceFile = ts.createSourceFile(filePath, content, ts.ScriptTarget.Latest, true);
|
|
70
|
+
const visit = (node) => {
|
|
71
|
+
if (ts.isImportDeclaration(node) && ts.isStringLiteral(node.moduleSpecifier)) {
|
|
72
|
+
const importPath = node.moduleSpecifier.text;
|
|
73
|
+
if (importPath.startsWith('.') || importPath.startsWith('/')) {
|
|
74
|
+
// Resolve relative import
|
|
75
|
+
const dir = path.dirname(filePath);
|
|
76
|
+
let resolved = path.resolve(dir, importPath);
|
|
77
|
+
// Try with extensions
|
|
78
|
+
const extensions = ['.ts', '.tsx', '.js', '.jsx', '/index.ts', '/index.js'];
|
|
79
|
+
for (const ext of extensions) {
|
|
80
|
+
if (fs.existsSync(resolved + ext)) {
|
|
81
|
+
imports.push(resolved + ext);
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
// Also track unresolved imports
|
|
86
|
+
if (!imports.some(i => i.startsWith(resolved))) {
|
|
87
|
+
imports.push(resolved);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
ts.forEachChild(node, visit);
|
|
92
|
+
};
|
|
93
|
+
visit(sourceFile);
|
|
94
|
+
}
|
|
95
|
+
catch { }
|
|
96
|
+
return imports;
|
|
97
|
+
}
|
|
98
|
+
function calculateComplexity(filePath) {
|
|
99
|
+
try {
|
|
100
|
+
const content = fs.readFileSync(filePath, 'utf-8');
|
|
101
|
+
let score = 0;
|
|
102
|
+
// Count branching points
|
|
103
|
+
score += (content.match(/\bif\s*\(/g) || []).length * 2;
|
|
104
|
+
score += (content.match(/\bfor\s*\(/g) || []).length * 2;
|
|
105
|
+
score += (content.match(/\bwhile\s*\(/g) || []).length * 2;
|
|
106
|
+
score += (content.match(/\bswitch\s*\(/g) || []).length * 2;
|
|
107
|
+
score += (content.match(/\bcatch\s*\(/g) || []).length * 1;
|
|
108
|
+
score += (content.match(/\bfunction\s+\w+/g) || []).length * 1;
|
|
109
|
+
score += (content.match(/=>/g) || []).length * 0.5;
|
|
110
|
+
return Math.round(score);
|
|
111
|
+
}
|
|
112
|
+
catch {
|
|
113
|
+
return 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function buildKnowledgeGraph(dirPath) {
|
|
117
|
+
const files = walkFiles(dirPath);
|
|
118
|
+
const fileMap = new Map();
|
|
119
|
+
// Map relative paths
|
|
120
|
+
for (const file of files) {
|
|
121
|
+
fileMap.set(path.relative(dirPath, file), file);
|
|
122
|
+
fileMap.set(file, file);
|
|
123
|
+
}
|
|
124
|
+
const nodes = [];
|
|
125
|
+
const importedByMap = new Map();
|
|
126
|
+
for (const file of files) {
|
|
127
|
+
const relPath = path.relative(dirPath, file);
|
|
128
|
+
const imports = extractImports(file);
|
|
129
|
+
const resolvedImports = [];
|
|
130
|
+
for (const imp of imports) {
|
|
131
|
+
// Try to find matching file
|
|
132
|
+
for (const [key, val] of fileMap) {
|
|
133
|
+
if (imp.includes(key) || val.includes(imp)) {
|
|
134
|
+
resolvedImports.push(path.relative(dirPath, val));
|
|
135
|
+
// Track reverse dependency
|
|
136
|
+
const rev = importedByMap.get(path.relative(dirPath, val)) || new Set();
|
|
137
|
+
rev.add(relPath);
|
|
138
|
+
importedByMap.set(path.relative(dirPath, val), rev);
|
|
139
|
+
break;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
const complexity = calculateComplexity(file);
|
|
144
|
+
const isEntryPoint = file.endsWith('index.ts') || file.endsWith('index.js') ||
|
|
145
|
+
file.endsWith('main.ts') || file.endsWith('server.ts') ||
|
|
146
|
+
file.endsWith('cli.ts');
|
|
147
|
+
nodes.push({
|
|
148
|
+
file: relPath,
|
|
149
|
+
imports: resolvedImports,
|
|
150
|
+
importedBy: [],
|
|
151
|
+
complexity,
|
|
152
|
+
isEntryPoint,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
// Fill importedBy
|
|
156
|
+
for (const node of nodes) {
|
|
157
|
+
node.importedBy = [...(importedByMap.get(node.file) || [])];
|
|
158
|
+
}
|
|
159
|
+
// Sort by coupling
|
|
160
|
+
nodes.sort((a, b) => (b.imports.length + b.importedBy.length) - (a.imports.length + a.importedBy.length));
|
|
161
|
+
const entryPoints = nodes.filter(n => n.isEntryPoint).map(n => n.file);
|
|
162
|
+
const mostCoupled = nodes.slice(0, 5).map(n => n.file);
|
|
163
|
+
const leastCoupled = nodes.slice(-5).map(n => n.file);
|
|
164
|
+
// Modularity: ratio of internal imports vs total
|
|
165
|
+
const totalImports = nodes.reduce((s, n) => s + n.imports.length, 0);
|
|
166
|
+
const internalImports = nodes.reduce((s, n) => s + n.imports.filter(i => nodes.some(x => x.file === i)).length, 0);
|
|
167
|
+
const modularityScore = totalImports > 0 ? Math.round((internalImports / totalImports) * 100) : 0;
|
|
168
|
+
return { nodes, entryPoints, mostCoupled, leastCoupled, modularityScore };
|
|
169
|
+
}
|
|
170
|
+
//# sourceMappingURL=knowledge-graph-builder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"knowledge-graph-builder.js","sourceRoot":"","sources":["../src/knowledge-graph-builder.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4FA,kDAgEC;AA5JD,uCAAyB;AAC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;
|
|
4
|
+
database: string[];
|
|
5
|
+
orm: string;
|
|
6
|
+
validation: string;
|
|
7
|
+
testing: string[];
|
|
8
|
+
stateManagement: string;
|
|
9
|
+
styling: string;
|
|
10
|
+
auth: string;
|
|
11
|
+
apiStyle: string;
|
|
12
|
+
monorepo: string;
|
|
13
|
+
packageManager: string;
|
|
14
|
+
deployment: string[];
|
|
15
|
+
languages: string[];
|
|
16
|
+
trustScore: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ArchitecturePattern {
|
|
19
|
+
type: string;
|
|
20
|
+
confidence: string;
|
|
21
|
+
entryPoints: string[];
|
|
22
|
+
topLevelDirs: string[];
|
|
23
|
+
coreModules: string[];
|
|
24
|
+
}
|
|
25
|
+
export interface ProjectDNA {
|
|
26
|
+
stack: StackFingerprint;
|
|
27
|
+
architecture: ArchitecturePattern;
|
|
28
|
+
fileCount: number;
|
|
29
|
+
lineCount: number;
|
|
30
|
+
name: string;
|
|
31
|
+
purpose: string;
|
|
32
|
+
}
|
|
33
|
+
export declare function detectProjectDNA(root: string): ProjectDNA;
|
|
34
|
+
//# sourceMappingURL=stack-detector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stack-detector.d.ts","sourceRoot":"","sources":["../src/stack-detector.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,EAAE,CAAC;IACtB,YAAY,EAAE,MAAM,EAAE,CAAC;IACvB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB;AAED,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,gBAAgB,CAAC;IACxB,YAAY,EAAE,mBAAmB,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAgTD,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAqDzD"}
|