@syke1/mcp-server 1.6.1 → 1.7.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/analyzer.js +112 -1
- package/dist/ai/context-extractor.js +224 -1
- package/dist/ai/provider.js +186 -1
- package/dist/ai/realtime-analyzer.js +253 -1
- package/dist/config.js +121 -1
- package/dist/git/change-coupling.js +250 -1
- package/dist/graph/incremental.js +313 -1
- package/dist/graph/memo-cache.js +176 -1
- package/dist/graph/scc.js +206 -1
- package/dist/graph.d.ts +0 -3
- package/dist/graph.js +130 -1
- package/dist/index.js +825 -1
- package/dist/license/validator.js +344 -1
- package/dist/remote/proxy.d.ts +34 -0
- package/dist/remote/proxy.js +214 -0
- package/dist/remote/types.d.ts +81 -0
- package/dist/remote/types.js +8 -0
- package/dist/tools/analyze-impact.d.ts +5 -5
- package/dist/tools/analyze-impact.js +326 -1
- package/dist/tools/gate-build.d.ts +0 -3
- package/dist/tools/gate-build.js +361 -1
- package/dist/watcher/file-cache.js +281 -1
- package/dist/web/server.js +925 -1
- package/package.json +2 -3
- package/dist/scoring/pagerank.d.ts +0 -67
- package/dist/scoring/pagerank.js +0 -1
- package/dist/scoring/risk-scorer.d.ts +0 -99
- package/dist/scoring/risk-scorer.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@syke1/mcp-server",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.7.0",
|
|
4
4
|
"mcpName": "io.github.khalomsky/syke",
|
|
5
5
|
"description": "AI code impact analysis MCP server — dependency graphs, cascade detection, and a mandatory build gate for AI coding agents",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"smithery.yaml"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "tsc && node -e \"require('fs').cpSync('src/web/public','dist/web/public',{recursive:true})\"
|
|
16
|
+
"build": "tsc && node -e \"require('fs').cpSync('src/web/public','dist/web/public',{recursive:true})\"",
|
|
17
17
|
"start": "node dist/index.js"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
@@ -47,7 +47,6 @@
|
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/express": "^5.0.6",
|
|
49
49
|
"@types/node": "^25.3.0",
|
|
50
|
-
"javascript-obfuscator": "^4.1.1",
|
|
51
50
|
"typescript": "^5.7.3"
|
|
52
51
|
}
|
|
53
52
|
}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* PageRank scoring for SYKE dependency graphs.
|
|
3
|
-
*
|
|
4
|
-
* Uses the Power Iteration algorithm to compute recursive importance scores.
|
|
5
|
-
* A file imported by many important files ranks higher than one imported by
|
|
6
|
-
* many leaf files. This provides a more nuanced importance signal than
|
|
7
|
-
* simple reverse dependent count (fan-in).
|
|
8
|
-
*
|
|
9
|
-
* In dependency graph terms:
|
|
10
|
-
* - If A imports B, the forward edge is A -> B.
|
|
11
|
-
* - B receives importance from A (B is important because A depends on it).
|
|
12
|
-
* - So we iterate over graph.reverse to find incoming "importance links".
|
|
13
|
-
*
|
|
14
|
-
* Dangling nodes (files that import nothing) distribute their rank
|
|
15
|
-
* equally to all nodes, preventing rank from leaking out of the graph.
|
|
16
|
-
*/
|
|
17
|
-
import { DependencyGraph } from "../graph";
|
|
18
|
-
export interface PageRankOptions {
|
|
19
|
-
dampingFactor?: number;
|
|
20
|
-
maxIterations?: number;
|
|
21
|
-
tolerance?: number;
|
|
22
|
-
}
|
|
23
|
-
export interface PageRankResult {
|
|
24
|
-
scores: Map<string, number>;
|
|
25
|
-
ranked: RankedFile[];
|
|
26
|
-
iterations: number;
|
|
27
|
-
computedAt: number;
|
|
28
|
-
}
|
|
29
|
-
export interface RankedFile {
|
|
30
|
-
filePath: string;
|
|
31
|
-
relativePath: string;
|
|
32
|
-
score: number;
|
|
33
|
-
rank: number;
|
|
34
|
-
percentile: number;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Invalidate the cached PageRank result.
|
|
38
|
-
* Call this when the dependency graph is rebuilt.
|
|
39
|
-
*/
|
|
40
|
-
export declare function invalidatePageRank(): void;
|
|
41
|
-
/**
|
|
42
|
-
* Compute PageRank scores for all files in the dependency graph
|
|
43
|
-
* using the Power Iteration method.
|
|
44
|
-
*
|
|
45
|
-
* The algorithm:
|
|
46
|
-
* 1. Initialize rank[i] = 1/N for all N files.
|
|
47
|
-
* 2. Repeat until convergence or maxIterations:
|
|
48
|
-
* For each file i:
|
|
49
|
-
* newRank[i] = (1 - d) / N + d * SUM(rank[j] / outDegree[j])
|
|
50
|
-
* for all j that link to i (j imports i -> j is in reverse[i])
|
|
51
|
-
* Handle dangling nodes: files with outDegree=0 distribute rank to all.
|
|
52
|
-
* If max|newRank - rank| < tolerance: break
|
|
53
|
-
* rank = newRank
|
|
54
|
-
*
|
|
55
|
-
* Direction clarification:
|
|
56
|
-
* - forward[A] = [B] means "A imports B" (A -> B).
|
|
57
|
-
* - reverse[B] = [A] means "A imports B" — A gives importance to B.
|
|
58
|
-
* - outDegree of A = forward[A].length (how many files A imports).
|
|
59
|
-
* - When computing rank for B, sum over reverse[B]: each file A that
|
|
60
|
-
* imports B contributes rank[A] / outDegree[A] to B.
|
|
61
|
-
*/
|
|
62
|
-
export declare function computePageRank(graph: DependencyGraph, options?: PageRankOptions): PageRankResult;
|
|
63
|
-
/**
|
|
64
|
-
* O(1) lookup of a file's PageRank data from a precomputed result.
|
|
65
|
-
* Returns null if the file is not in the result.
|
|
66
|
-
*/
|
|
67
|
-
export declare function getFileRank(filePath: string, result: PageRankResult): RankedFile | null;
|
package/dist/scoring/pagerank.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x31840e=_0x1844;(function(_0x1eb77e,_0x4cc194){const _0x4f2136={_0xdc54a:0xae,_0x4dfbc5:0x92,_0xd89b65:0xb5,_0x663a7a:0x90,_0x2ee6ca:0x9b,_0x422284:0x8b,_0x5c00ef:0xb7},_0x338a51=_0x1844,_0x5ec7cf=_0x1eb77e();while(!![]){try{const _0x26566d=parseInt(_0x338a51(_0x4f2136._0xdc54a))/0x1*(parseInt(_0x338a51(_0x4f2136._0x4dfbc5))/0x2)+parseInt(_0x338a51(_0x4f2136._0xd89b65))/0x3*(-parseInt(_0x338a51(0xb0))/0x4)+-parseInt(_0x338a51(_0x4f2136._0x663a7a))/0x5+parseInt(_0x338a51(0xa3))/0x6+parseInt(_0x338a51(0x9d))/0x7*(-parseInt(_0x338a51(_0x4f2136._0x2ee6ca))/0x8)+-parseInt(_0x338a51(_0x4f2136._0x422284))/0x9+parseInt(_0x338a51(_0x4f2136._0x5c00ef))/0xa*(parseInt(_0x338a51(0xb3))/0xb);if(_0x26566d===_0x4cc194)break;else _0x5ec7cf['push'](_0x5ec7cf['shift']());}catch(_0x5bc011){_0x5ec7cf['push'](_0x5ec7cf['shift']());}}}(_0x4186,0x1c823));var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x2f4960,_0x2b7e42,_0x1c7502,_0x1ee1e2){const _0x482ec5={_0x3170dd:0x94,_0xc26808:0xa7,_0x4ef5fa:0x8f,_0xec4979:0xa7,_0x15da04:0x8c,_0x206591:0x93},_0x579079=_0x1844,_0x515e2c={};_0x515e2c[_0x579079(_0x482ec5._0x3170dd)]=function(_0xadb8af,_0x11bf16){return _0xadb8af===_0x11bf16;},_0x515e2c[_0x579079(0x8d)]=function(_0x5121b3,_0x5b5fa6){return _0x5121b3 in _0x5b5fa6;},_0x515e2c[_0x579079(_0x482ec5._0xc26808)]=_0x579079(_0x482ec5._0x4ef5fa);const _0x3af920=_0x515e2c;if(_0x3af920[_0x579079(_0x482ec5._0x3170dd)](_0x1ee1e2,undefined))_0x1ee1e2=_0x1c7502;var _0x2ae5ea=Object['getOwnPropertyDescriptor'](_0x2b7e42,_0x1c7502);if(!_0x2ae5ea||(_0x3af920['PiLbb'](_0x3af920[_0x579079(_0x482ec5._0xec4979)],_0x2ae5ea)?!_0x2b7e42[_0x579079(0xb2)]:_0x2ae5ea[_0x579079(_0x482ec5._0x15da04)]||_0x2ae5ea[_0x579079(_0x482ec5._0x206591)])){const _0x45aae7={};_0x45aae7['enumerable']=!![],_0x45aae7[_0x579079(_0x482ec5._0x4ef5fa)]=function(){return _0x2b7e42[_0x1c7502];},_0x2ae5ea=_0x45aae7;}Object[_0x579079(0x9f)](_0x2f4960,_0x1ee1e2,_0x2ae5ea);}:function(_0x5692b8,_0x4db799,_0x2613da,_0x19f0ac){const _0x389af5={_0x4293ea:0x89},_0x4f7061=_0x1844,_0x21b361={};_0x21b361[_0x4f7061(0x89)]=function(_0x54d1c2,_0x1596c8){return _0x54d1c2===_0x1596c8;};const _0x13bca6=_0x21b361;if(_0x13bca6[_0x4f7061(_0x389af5._0x4293ea)](_0x19f0ac,undefined))_0x19f0ac=_0x2613da;_0x5692b8[_0x19f0ac]=_0x4db799[_0x2613da];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x2115ba,_0x5e442d){const _0x217f0b={_0xe7d744:0x9a},_0x360dd9=_0x1844,_0xcff6e9={};_0xcff6e9['ISTqs']='default';const _0xb67705=_0xcff6e9,_0x511ae9={};_0x511ae9['enumerable']=!![],_0x511ae9[_0x360dd9(_0x217f0b._0xe7d744)]=_0x5e442d,Object[_0x360dd9(0x9f)](_0x2115ba,_0xb67705['ISTqs'],_0x511ae9);}:function(_0x51873e,_0x419e80){const _0x53219d={_0x544792:0x86},_0x1589dc=_0x1844,_0x477ffd={};_0x477ffd[_0x1589dc(0x86)]=_0x1589dc(0xad);const _0x25f325=_0x477ffd;_0x51873e[_0x25f325[_0x1589dc(_0x53219d._0x544792)]]=_0x419e80;}),__importStar=this&&this[_0x31840e(0xa2)]||(function(){const _0x5cf7cc={_0x26eea0:0x88,_0x7e6db0:0xb2},_0x16d26f={_0x26ba21:0xb6},_0xe34067={'AEuBv':function(_0x31825a,_0x25fa6f,_0x42fa47){return _0x31825a(_0x25fa6f,_0x42fa47);},'lgJCv':function(_0x4ef67e,_0x591f8a){return _0x4ef67e(_0x591f8a);}};var _0x2ac3a7=function(_0x2480ea){const _0x17be47=_0x1844;return _0x2ac3a7=Object[_0x17be47(0x95)]||function(_0x551abb){const _0x25f7cc=_0x17be47;var _0x1ad222=[];for(var _0x349810 in _0x551abb)if(Object[_0x25f7cc(0xaf)][_0x25f7cc(_0x16d26f._0x26ba21)]['call'](_0x551abb,_0x349810))_0x1ad222[_0x1ad222[_0x25f7cc(0x8e)]]=_0x349810;return _0x1ad222;},_0x2ac3a7(_0x2480ea);};return function(_0x10d940){const _0x5e13fb=_0x1844,_0x57c6ba=_0x5e13fb(_0x5cf7cc._0x26eea0)[_0x5e13fb(0xbc)]('|');let _0x494811=0x0;while(!![]){switch(_0x57c6ba[_0x494811++]){case'0':if(_0x10d940&&_0x10d940[_0x5e13fb(_0x5cf7cc._0x7e6db0)])return _0x10d940;continue;case'1':_0xe34067['AEuBv'](__setModuleDefault,_0x250f73,_0x10d940);continue;case'2':if(_0x10d940!=null){for(var _0x4c7c49=_0xe34067['lgJCv'](_0x2ac3a7,_0x10d940),_0x9fa0cb=0x0;_0x9fa0cb<_0x4c7c49['length'];_0x9fa0cb++)if(_0x4c7c49[_0x9fa0cb]!==_0x5e13fb(0xad))__createBinding(_0x250f73,_0x10d940,_0x4c7c49[_0x9fa0cb]);}continue;case'3':return _0x250f73;case'4':var _0x250f73={};continue;}break;}};}());function _0x1844(_0x267f2c,_0x1155be){_0x267f2c=_0x267f2c-0x85;const _0x4186ea=_0x4186();let _0x184470=_0x4186ea[_0x267f2c];if(_0x1844['yrUoFZ']===undefined){var _0x2c2fa7=function(_0x1aa710){const _0x20539a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x14cf69='',_0x394f12='';for(let _0x50d783=0x0,_0x5b43d0,_0x15ccc5,_0x4b17cb=0x0;_0x15ccc5=_0x1aa710['charAt'](_0x4b17cb++);~_0x15ccc5&&(_0x5b43d0=_0x50d783%0x4?_0x5b43d0*0x40+_0x15ccc5:_0x15ccc5,_0x50d783++%0x4)?_0x14cf69+=String['fromCharCode'](0xff&_0x5b43d0>>(-0x2*_0x50d783&0x6)):0x0){_0x15ccc5=_0x20539a['indexOf'](_0x15ccc5);}for(let _0x425075=0x0,_0x12e0b5=_0x14cf69['length'];_0x425075<_0x12e0b5;_0x425075++){_0x394f12+='%'+('00'+_0x14cf69['charCodeAt'](_0x425075)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x394f12);};_0x1844['dUceXW']=_0x2c2fa7,_0x1844['MGKaGr']={},_0x1844['yrUoFZ']=!![];}const _0x48b0e9=_0x4186ea[0x0],_0x3eefd1=_0x267f2c+_0x48b0e9,_0x2ece4d=_0x1844['MGKaGr'][_0x3eefd1];return!_0x2ece4d?(_0x184470=_0x1844['dUceXW'](_0x184470),_0x1844['MGKaGr'][_0x3eefd1]=_0x184470):_0x184470=_0x2ece4d,_0x184470;}const _0x87d10f={};_0x87d10f['value']=!![],Object['defineProperty'](exports,_0x31840e(0xb2),_0x87d10f),exports[_0x31840e(0x9e)]=invalidatePageRank,exports['computePageRank']=computePageRank,exports['getFileRank']=getFileRank;const path=__importStar(require(_0x31840e(0xa5)));let cachedResult=null;function _0x4186(){const _0x7ea578=['D3jPDgfIBgu','ugLmyMi','BgvUz3rO','z2v0','ndaWotiWqufmwxD1','igL0zxjHDgLVBNm','mtaYmJjrzKfUCwK','y29UzMLNDxjHyMXL','v1v4t1u','z2v0t3DUuhjVCgvYDhLoyw1LCW','C2nVCMvZ','Cw5xuu4','zgfTCgLUz0zHy3rVCG','EeDmCfu','DMfSDwu','mtC2ntCZnLz0teHhEa','w3n5A2u6CgfNzxjHBMTDienVBxb1DgvKifbHz2vsyw5RigzVCIa','n0rkzeHirq','Aw52ywXPzgf0zvbHz2vsyw5R','zgvMAw5LuhjVCgvYDhK','uw1dqum','Awr4','x19PBxbVCNrtDgfY','ntm2nJiYv2vxC1bd','C2v0','Cgf0Aa','D2rvwxK','DeroCe4','shrcyuG','CMv2zxjZzq','zMLUza','BgzkEuW','zxjYB3i','zgvMyxvSDa','mJnoueTOBNy','ChjVDg90ExbL','oevWyvjoyq','r0DLDNa','x19LC01VzhvSzq','oti4nZndAvHus1m','C2nVCMu','mJC4mdC5CvvjyNPl','AgfZt3DUuhjVCgvYDhK','nZmWy0vZu1vd','zMLSzxm','r3zpt0O','ChvZAa','EfbbtMC','C3bSAxq','Dg9SzxjHBMnL','shnIq3O','zMLSzvbHDgG','mhW0Fdj8mxWZ','Du15rKm','EenbwuW','mtK4mJqZovbswuD3uq'];_0x4186=function(){return _0x7ea578;};return _0x4186();}function invalidatePageRank(){cachedResult=null;}function computePageRank(_0x43359f,_0x1cbad1){const _0x3e41ea={_0x551a70:0x97,_0x5589ac:0xa6,_0x3f2cff:0x98,_0x3197a1:0x8f,_0x530421:0x8e,_0x19f95e:0xba,_0x22f156:0x8f,_0x3a3eb7:0x8a,_0x399dd1:0xb1,_0x261aa8:0xa0,_0x2bc501:0xa4,_0x242081:0xa1,_0x45eab6:0xb4,_0x59dc9c:0xac},_0x5923da=_0x31840e,_0x5b6e5e={};_0x5b6e5e[_0x5923da(_0x3e41ea._0x551a70)]=function(_0x187e7e,_0x1660e6){return _0x187e7e<_0x1660e6;},_0x5b6e5e['xCAYL']=function(_0x38ab1f,_0x10de60){return _0x38ab1f!==_0x10de60;},_0x5b6e5e[_0x5923da(0xb1)]=function(_0x5952f9,_0x4e4f88){return _0x5952f9/_0x4e4f88;},_0x5b6e5e[_0x5923da(0xa0)]=function(_0x334d4b,_0x5afe6a){return _0x334d4b-_0x5afe6a;},_0x5b6e5e['GvOOJ']=function(_0x645b75,_0x7dad8b){return _0x645b75/_0x7dad8b;},_0x5b6e5e['xPANg']=function(_0x2cf5b9,_0x30df8c){return _0x2cf5b9*_0x30df8c;},_0x5b6e5e[_0x5923da(0xab)]=function(_0x1099cd,_0xc4770e){return _0x1099cd/_0xc4770e;},_0x5b6e5e[_0x5923da(_0x3e41ea._0x5589ac)]=function(_0x2c8802,_0xaf1144){return _0x2c8802+_0xaf1144;},_0x5b6e5e['HtBaH']=function(_0x4116ea,_0x450080){return _0x4116ea<_0x450080;};const _0x3a1f50=_0x5b6e5e;if(cachedResult)return cachedResult;const _0x3427a8=_0x1cbad1?.[_0x5923da(_0x3e41ea._0x3f2cff)]??0.85,_0x5ae656=_0x1cbad1?.['maxIterations']??0x64,_0x5bcd89=_0x1cbad1?.[_0x5923da(0x85)]??0.000001,_0x4728bd=[..._0x43359f[_0x5923da(0xb8)]],_0x49814e=_0x4728bd[_0x5923da(0x8e)];if(_0x49814e===0x0){const _0x254779={'scores':new Map(),'ranked':[],'iterations':0x0,'computedAt':Date['now']()};return cachedResult=_0x254779,_0x254779;}const _0x287d06=new Map();for(let _0x58c0f8=0x0;_0x3a1f50['qnWQN'](_0x58c0f8,_0x49814e);_0x58c0f8++){_0x287d06['set'](_0x4728bd[_0x58c0f8],_0x58c0f8);}const _0x520d0d=new Float64Array(_0x49814e);for(let _0x24bbc9=0x0;_0x3a1f50['qnWQN'](_0x24bbc9,_0x49814e);_0x24bbc9++){const _0x117652=_0x43359f['forward'][_0x5923da(_0x3e41ea._0x3197a1)](_0x4728bd[_0x24bbc9]);_0x520d0d[_0x24bbc9]=_0x117652?_0x117652[_0x5923da(_0x3e41ea._0x530421)]:0x0;}const _0x2b63c9=[];for(let _0x23d686=0x0;_0x3a1f50['qnWQN'](_0x23d686,_0x49814e);_0x23d686++){_0x520d0d[_0x23d686]===0x0&&_0x2b63c9[_0x5923da(_0x3e41ea._0x19f95e)](_0x23d686);}const _0x411600=new Array(_0x49814e);for(let _0x17b7a5=0x0;_0x3a1f50[_0x5923da(_0x3e41ea._0x551a70)](_0x17b7a5,_0x49814e);_0x17b7a5++){_0x411600[_0x17b7a5]=[];}for(const [_0x125641,_0x3e53ac]of _0x43359f[_0x5923da(0xa9)]){const _0x1c103d=_0x287d06['get'](_0x125641);if(_0x1c103d===undefined)continue;for(const _0x6667bc of _0x3e53ac){const _0x1b2b2c=_0x287d06[_0x5923da(_0x3e41ea._0x22f156)](_0x6667bc);_0x3a1f50[_0x5923da(_0x3e41ea._0x3a3eb7)](_0x1b2b2c,undefined)&&_0x411600[_0x1c103d]['push'](_0x1b2b2c);}}let _0x53d509=new Float64Array(_0x49814e);const _0x212a97=_0x3a1f50[_0x5923da(_0x3e41ea._0x399dd1)](0x1,_0x49814e);for(let _0x24cb03=0x0;_0x24cb03<_0x49814e;_0x24cb03++){_0x53d509[_0x24cb03]=_0x212a97;}let _0x20f55d=0x0;const _0xf83ddd=_0x3a1f50[_0x5923da(_0x3e41ea._0x261aa8)](0x1,_0x3427a8)/_0x49814e;for(let _0x27fa13=0x0;_0x3a1f50['qnWQN'](_0x27fa13,_0x5ae656);_0x27fa13++){_0x20f55d=_0x27fa13+0x1;let _0x6eba8=0x0;for(const _0x2b9ce3 of _0x2b63c9){_0x6eba8+=_0x53d509[_0x2b9ce3];}const _0x13400a=_0x3a1f50[_0x5923da(0xb9)](_0x3a1f50[_0x5923da(0xbb)](_0x3427a8,_0x6eba8),_0x49814e),_0x270e64=new Float64Array(_0x49814e);for(let _0x1b4b23=0x0;_0x1b4b23<_0x49814e;_0x1b4b23++){let _0x180b9a=0x0;for(const _0x5efdba of _0x411600[_0x1b4b23]){_0x180b9a+=_0x3a1f50['lfJyL'](_0x53d509[_0x5efdba],_0x520d0d[_0x5efdba]);}_0x270e64[_0x1b4b23]=_0x3a1f50['wdUYy'](_0xf83ddd+_0x13400a,_0x3a1f50[_0x5923da(0xbb)](_0x3427a8,_0x180b9a));}let _0x4e1c69=0x0;for(let _0x37cd60=0x0;_0x37cd60<_0x49814e;_0x37cd60++){const _0x400cfe=Math['abs'](_0x3a1f50[_0x5923da(_0x3e41ea._0x261aa8)](_0x270e64[_0x37cd60],_0x53d509[_0x37cd60]));if(_0x400cfe>_0x4e1c69)_0x4e1c69=_0x400cfe;}_0x53d509=_0x270e64;if(_0x4e1c69<_0x5bcd89)break;}const _0x3010c0=new Map();for(let _0x43a45a=0x0;_0x3a1f50['HtBaH'](_0x43a45a,_0x49814e);_0x43a45a++){_0x3010c0[_0x5923da(_0x3e41ea._0x2bc501)](_0x4728bd[_0x43a45a],_0x53d509[_0x43a45a]);}const _0x4d98a5=[];for(let _0x2bf7b2=0x0;_0x3a1f50[_0x5923da(0xa8)](_0x2bf7b2,_0x49814e);_0x2bf7b2++){const _0x4ccc16={};_0x4ccc16[_0x5923da(_0x3e41ea._0x242081)]=_0x2bf7b2,_0x4ccc16[_0x5923da(_0x3e41ea._0x45eab6)]=_0x53d509[_0x2bf7b2],_0x4d98a5['push'](_0x4ccc16);}_0x4d98a5['sort']((_0x35f1e4,_0x45f8fb)=>_0x45f8fb['score']-_0x35f1e4[_0x5923da(0xb4)]);const _0x29e408=_0x4d98a5['map']((_0xf5a528,_0x56a3bb)=>({'filePath':_0x4728bd[_0xf5a528['idx']],'relativePath':path['relative'](_0x43359f['sourceDir'],_0x4728bd[_0xf5a528['idx']])['replace'](/\\/g,'/'),'score':_0xf5a528['score'],'rank':_0x56a3bb+0x1,'percentile':Math['round']((_0x49814e-0x1-_0x56a3bb)/Math['max'](0x1,_0x49814e-0x1)*0x64)})),_0x4a2efb={'scores':_0x3010c0,'ranked':_0x29e408,'iterations':_0x20f55d,'computedAt':Date['now']()};return cachedResult=_0x4a2efb,console[_0x5923da(_0x3e41ea._0x59dc9c)](_0x5923da(0x9c)+_0x49814e+'\x20files\x20in\x20'+_0x20f55d+_0x5923da(0x91)),_0x4a2efb;}function getFileRank(_0x5304bf,_0x3f0ad1){const _0x35ba20={_0x40b92e:0x96},_0x35f264=_0x31840e,_0x54a4c4={};_0x54a4c4[_0x35f264(0x99)]=function(_0x4333a3,_0x3ffa5f){return _0x4333a3===_0x3ffa5f;},_0x54a4c4['RfMRN']=function(_0x477446,_0x389ad5){return _0x477446||_0x389ad5;};const _0x3532d4=_0x54a4c4,_0x45e6a9=_0x3f0ad1[_0x35f264(_0x35ba20._0x40b92e)]['get'](_0x5304bf);if(_0x3532d4['xGLpU'](_0x45e6a9,undefined))return null;const _0x1071b4=_0x3f0ad1['ranked'][_0x35f264(0xaa)](_0x396e79=>_0x396e79[_0x35f264(0x87)]===_0x5304bf);return _0x3532d4['RfMRN'](_0x1071b4,null);}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composite Risk Scoring for SYKE.
|
|
3
|
-
*
|
|
4
|
-
* Combines multiple signals (fan-in, instability, cyclomatic complexity,
|
|
5
|
-
* cascade depth) into a single 0-1 risk score using weighted normalization.
|
|
6
|
-
*
|
|
7
|
-
* Based on Robert C. Martin's stability metrics and standard software
|
|
8
|
-
* engineering coupling/cohesion analysis.
|
|
9
|
-
*/
|
|
10
|
-
import { DependencyGraph } from "../graph";
|
|
11
|
-
export interface CouplingMetrics {
|
|
12
|
-
fanIn: number;
|
|
13
|
-
fanOut: number;
|
|
14
|
-
transitiveFanIn: number;
|
|
15
|
-
}
|
|
16
|
-
export type CompositeRiskLevel = "CRITICAL" | "HIGH" | "MEDIUM" | "LOW" | "SAFE";
|
|
17
|
-
export interface RiskScore {
|
|
18
|
-
composite: number;
|
|
19
|
-
fanIn: number;
|
|
20
|
-
fanOut: number;
|
|
21
|
-
transitiveFanIn: number;
|
|
22
|
-
instability: number;
|
|
23
|
-
complexity: number;
|
|
24
|
-
normalizedComplexity: number;
|
|
25
|
-
cascadeDepth: number;
|
|
26
|
-
riskLevel: CompositeRiskLevel;
|
|
27
|
-
pageRank?: number;
|
|
28
|
-
pageRankPercentile?: number;
|
|
29
|
-
}
|
|
30
|
-
export interface ProjectMetrics {
|
|
31
|
-
maxFanIn: number;
|
|
32
|
-
maxTransitiveFanIn: number;
|
|
33
|
-
maxComplexity: number;
|
|
34
|
-
maxCascadeDepth: number;
|
|
35
|
-
fileMetrics: Map<string, RiskScore>;
|
|
36
|
-
}
|
|
37
|
-
export declare const RISK_WEIGHTS: {
|
|
38
|
-
fanIn: number;
|
|
39
|
-
stability: number;
|
|
40
|
-
complexity: number;
|
|
41
|
-
cascadeDepth: number;
|
|
42
|
-
pageRank: number;
|
|
43
|
-
};
|
|
44
|
-
/**
|
|
45
|
-
* Invalidate cached project metrics. Call when the graph is rebuilt.
|
|
46
|
-
*/
|
|
47
|
-
export declare function invalidateProjectMetrics(): void;
|
|
48
|
-
/**
|
|
49
|
-
* Compute coupling metrics for a single file from the dependency graph.
|
|
50
|
-
*/
|
|
51
|
-
export declare function computeCouplingMetrics(filePath: string, graph: DependencyGraph): CouplingMetrics;
|
|
52
|
-
/**
|
|
53
|
-
* Robert C. Martin's Instability Index.
|
|
54
|
-
*
|
|
55
|
-
* I = Ce / (Ca + Ce) where Ca = fanIn, Ce = fanOut
|
|
56
|
-
* 0 = maximally stable (everything depends on it, dangerous to change)
|
|
57
|
-
* 1 = maximally unstable (leaf node, safe to change)
|
|
58
|
-
*/
|
|
59
|
-
export declare function computeInstability(fanIn: number, fanOut: number): number;
|
|
60
|
-
/**
|
|
61
|
-
* Compute cyclomatic complexity of source code using regex-based
|
|
62
|
-
* decision point counting.
|
|
63
|
-
*
|
|
64
|
-
* Returns the raw count of decision points (base complexity of 1 is NOT added).
|
|
65
|
-
*/
|
|
66
|
-
export declare function computeComplexity(content: string, language: string): number;
|
|
67
|
-
/**
|
|
68
|
-
* Compute the maximum cascade depth from the condensed DAG.
|
|
69
|
-
* This is the longest path from the file's SCC through the reverse edges
|
|
70
|
-
* of the condensed DAG (i.e., how many layers deep the impact propagates).
|
|
71
|
-
*/
|
|
72
|
-
export declare function computeCascadeDepth(filePath: string, graph: DependencyGraph): number;
|
|
73
|
-
/**
|
|
74
|
-
* Map a composite score (0-1) to a risk level.
|
|
75
|
-
*/
|
|
76
|
-
export declare function classifyCompositeRisk(score: number): CompositeRiskLevel;
|
|
77
|
-
/**
|
|
78
|
-
* Compute the composite risk score for a single file.
|
|
79
|
-
*
|
|
80
|
-
* If `projectMetrics` is provided, uses pre-computed normalization bounds.
|
|
81
|
-
* Otherwise, uses raw metrics without normalization (less accurate but functional).
|
|
82
|
-
*/
|
|
83
|
-
export declare function computeRiskScore(filePath: string, graph: DependencyGraph, fileContent: string | null, projectMetrics?: ProjectMetrics): RiskScore;
|
|
84
|
-
/**
|
|
85
|
-
* Pre-compute metrics for all files in the project.
|
|
86
|
-
* This establishes normalization bounds and caches per-file scores.
|
|
87
|
-
*
|
|
88
|
-
* Uses lazy initialization and caches results until invalidated.
|
|
89
|
-
*/
|
|
90
|
-
export declare function computeProjectMetrics(graph: DependencyGraph, getFileContent?: (path: string) => string | null): ProjectMetrics;
|
|
91
|
-
/**
|
|
92
|
-
* Get the cached risk score for a file, or compute it on the fly.
|
|
93
|
-
* Uses project-wide normalization when available.
|
|
94
|
-
*/
|
|
95
|
-
export declare function getRiskScore(filePath: string, graph: DependencyGraph, fileContent?: string | null): RiskScore;
|
|
96
|
-
/**
|
|
97
|
-
* Format a risk score for display in MCP tool output.
|
|
98
|
-
*/
|
|
99
|
-
export declare function formatRiskScore(score: RiskScore): string;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
'use strict';const _0x15e495=_0x11fd;(function(_0x5133a3,_0x4aa94a){const _0x49c731={_0x50b98e:0x82,_0x3a18f8:0xbb,_0x18e395:0x97,_0x111e56:0xcc},_0x1601e9=_0x11fd,_0x4cf4c8=_0x5133a3();while(!![]){try{const _0x123fdb=-parseInt(_0x1601e9(0xc2))/0x1*(parseInt(_0x1601e9(0x91))/0x2)+parseInt(_0x1601e9(0xd4))/0x3*(parseInt(_0x1601e9(_0x49c731._0x50b98e))/0x4)+-parseInt(_0x1601e9(0x71))/0x5+-parseInt(_0x1601e9(_0x49c731._0x3a18f8))/0x6*(parseInt(_0x1601e9(0x88))/0x7)+parseInt(_0x1601e9(0xc1))/0x8*(-parseInt(_0x1601e9(0x7a))/0x9)+-parseInt(_0x1601e9(0xf4))/0xa*(-parseInt(_0x1601e9(0xf2))/0xb)+-parseInt(_0x1601e9(_0x49c731._0x18e395))/0xc*(-parseInt(_0x1601e9(_0x49c731._0x111e56))/0xd);if(_0x123fdb===_0x4aa94a)break;else _0x4cf4c8['push'](_0x4cf4c8['shift']());}catch(_0x545343){_0x4cf4c8['push'](_0x4cf4c8['shift']());}}}(_0x1ce9,0x89b2f));function _0x11fd(_0x399c73,_0xf8eb5c){_0x399c73=_0x399c73-0x6f;const _0x1ce9b0=_0x1ce9();let _0x11fd0e=_0x1ce9b0[_0x399c73];if(_0x11fd['RxfKou']===undefined){var _0x17852e=function(_0x4bc2a3){const _0x311917='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x25bdbf='',_0x99235d='';for(let _0x531292=0x0,_0x275d34,_0x4393fb,_0x435d78=0x0;_0x4393fb=_0x4bc2a3['charAt'](_0x435d78++);~_0x4393fb&&(_0x275d34=_0x531292%0x4?_0x275d34*0x40+_0x4393fb:_0x4393fb,_0x531292++%0x4)?_0x25bdbf+=String['fromCharCode'](0xff&_0x275d34>>(-0x2*_0x531292&0x6)):0x0){_0x4393fb=_0x311917['indexOf'](_0x4393fb);}for(let _0x1bdc75=0x0,_0x431778=_0x25bdbf['length'];_0x1bdc75<_0x431778;_0x1bdc75++){_0x99235d+='%'+('00'+_0x25bdbf['charCodeAt'](_0x1bdc75)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x99235d);};_0x11fd['oimZDe']=_0x17852e,_0x11fd['LknJXT']={},_0x11fd['RxfKou']=!![];}const _0x1d0042=_0x1ce9b0[0x0],_0x261f86=_0x399c73+_0x1d0042,_0x24cc71=_0x11fd['LknJXT'][_0x261f86];return!_0x24cc71?(_0x11fd0e=_0x11fd['oimZDe'](_0x11fd0e),_0x11fd['LknJXT'][_0x261f86]=_0x11fd0e):_0x11fd0e=_0x24cc71,_0x11fd0e;}var __createBinding=this&&this[_0x15e495(0x98)]||(Object['create']?function(_0x4b1c90,_0x22d015,_0x415976,_0x141b58){const _0x2b4431={_0x441569:0x8e,_0x1857b4:0x94,_0x3aec41:0x96,_0x1c0580:0x94,_0xc7222c:0x8f},_0x52d729=_0x15e495,_0x4479fe={};_0x4479fe[_0x52d729(_0x2b4431._0x441569)]=function(_0xfdb73e,_0x2c6a1d){return _0xfdb73e in _0x2c6a1d;};const _0x385f0d=_0x4479fe;if(_0x141b58===undefined)_0x141b58=_0x415976;var _0x234222=Object['getOwnPropertyDescriptor'](_0x22d015,_0x415976);if(!_0x234222||(_0x385f0d['NJfEM'](_0x52d729(_0x2b4431._0x1857b4),_0x234222)?!_0x22d015['__esModule']:_0x234222['writable']||_0x234222['configurable'])){const _0x102d67={};_0x102d67[_0x52d729(_0x2b4431._0x3aec41)]=!![],_0x102d67[_0x52d729(_0x2b4431._0x1c0580)]=function(){return _0x22d015[_0x415976];},_0x234222=_0x102d67;}Object[_0x52d729(_0x2b4431._0xc7222c)](_0x4b1c90,_0x141b58,_0x234222);}:function(_0x4cc546,_0x3abce7,_0x5c061d,_0x560425){const _0x2fcef6={_0x4be856:0xca},_0x3636cd=_0x15e495,_0x5d82f6={};_0x5d82f6[_0x3636cd(_0x2fcef6._0x4be856)]=function(_0x1d96ff,_0x51b5bb){return _0x1d96ff===_0x51b5bb;};const _0x1578ef=_0x5d82f6;if(_0x1578ef['LGJur'](_0x560425,undefined))_0x560425=_0x5c061d;_0x4cc546[_0x560425]=_0x3abce7[_0x5c061d];}),__setModuleDefault=this&&this[_0x15e495(0x70)]||(Object['create']?function(_0xb582ad,_0x1bea11){const _0x2e7662={_0x3ab290:0xec},_0x4a253f=_0x15e495,_0x4f9c8d={};_0x4f9c8d['soEiB']=_0x4a253f(_0x2e7662._0x3ab290);const _0x14a7c9=_0x4f9c8d,_0x14b2d1={};_0x14b2d1[_0x4a253f(0x96)]=!![],_0x14b2d1['value']=_0x1bea11,Object['defineProperty'](_0xb582ad,_0x14a7c9['soEiB'],_0x14b2d1);}:function(_0x2c71e6,_0x2e813f){const _0x543da7={_0x1a73a1:0xec},_0x42af06=_0x15e495;_0x2c71e6[_0x42af06(_0x543da7._0x1a73a1)]=_0x2e813f;}),__importStar=this&&this['__importStar']||(function(){const _0x48e169={_0x558b5e:0xbc},_0x493600={'GsKqz':function(_0x6f58df,_0x1dcc77){return _0x6f58df(_0x1dcc77);},'jDUuD':function(_0x5efbf4,_0x2ec28f){return _0x5efbf4<_0x2ec28f;},'ePKvb':function(_0x1f9f47,_0x461bf6){return _0x1f9f47!==_0x461bf6;},'REhvl':function(_0x16f465,_0x45bc7a,_0x42fecc,_0x33d293){return _0x16f465(_0x45bc7a,_0x42fecc,_0x33d293);}};var _0x1e29f3=function(_0x1cd25a){return _0x1e29f3=Object['getOwnPropertyNames']||function(_0x98a0bc){const _0x1f917e=_0x11fd;var _0x48a401=[];for(var _0x5d5a28 in _0x98a0bc)if(Object[_0x1f917e(0x7e)][_0x1f917e(0x76)][_0x1f917e(0x89)](_0x98a0bc,_0x5d5a28))_0x48a401[_0x48a401[_0x1f917e(_0x48e169._0x558b5e)]]=_0x5d5a28;return _0x48a401;},_0x1e29f3(_0x1cd25a);};return function(_0x171e34){const _0x1ddd04=_0x11fd,_0x5ae959=_0x1ddd04(0xd2)['split']('|');let _0x3fc56e=0x0;while(!![]){switch(_0x5ae959[_0x3fc56e++]){case'0':if(_0x171e34&&_0x171e34['__esModule'])return _0x171e34;continue;case'1':if(_0x171e34!=null){for(var _0x6ad3d4=_0x493600['GsKqz'](_0x1e29f3,_0x171e34),_0x579dde=0x0;_0x493600['jDUuD'](_0x579dde,_0x6ad3d4['length']);_0x579dde++)if(_0x493600[_0x1ddd04(0x87)](_0x6ad3d4[_0x579dde],_0x1ddd04(0xec)))_0x493600['REhvl'](__createBinding,_0x24eb6a,_0x171e34,_0x6ad3d4[_0x579dde]);}continue;case'2':return _0x24eb6a;case'3':__setModuleDefault(_0x24eb6a,_0x171e34);continue;case'4':var _0x24eb6a={};continue;}break;}};}());const _0x316e5b={};_0x316e5b[_0x15e495(0xe9)]=!![],Object[_0x15e495(0x8f)](exports,_0x15e495(0xee),_0x316e5b),exports['RISK_WEIGHTS']=void 0x0,exports[_0x15e495(0xa4)]=invalidateProjectMetrics,exports['computeCouplingMetrics']=computeCouplingMetrics,exports[_0x15e495(0xeb)]=computeInstability,exports['computeComplexity']=computeComplexity,exports[_0x15e495(0xa7)]=computeCascadeDepth,exports[_0x15e495(0xbe)]=classifyCompositeRisk,exports['computeRiskScore']=computeRiskScore,exports[_0x15e495(0xf1)]=computeProjectMetrics,exports['getRiskScore']=getRiskScore,exports['formatRiskScore']=formatRiskScore;const fs=__importStar(require('fs')),plugin_1=require('../languages/plugin'),pagerank_1=require('./pagerank'),_0x4c9059={};_0x4c9059['fanIn']=0.3,_0x4c9059[_0x15e495(0xb5)]=0.2,_0x4c9059[_0x15e495(0xdc)]=0.2,_0x4c9059['cascadeDepth']=0.15,_0x4c9059[_0x15e495(0xbd)]=0.15,exports[_0x15e495(0xd0)]=_0x4c9059;const _0x564b85={};_0x564b85['CRITICAL']=0.8,_0x564b85[_0x15e495(0xcd)]=0.6,_0x564b85[_0x15e495(0x78)]=0.4,_0x564b85[_0x15e495(0xb0)]=0.2;const RISK_THRESHOLDS=_0x564b85;let cachedProjectMetrics=null,cachedProjectRoot=null;function invalidateProjectMetrics(){cachedProjectMetrics=null,cachedProjectRoot=null;}function computeCouplingMetrics(_0x161224,_0x16a950){const _0x2cd987={_0x5cbc15:0x94,_0x7f00a6:0xbc,_0x35a9ba:0x94},_0x4db239=_0x15e495,_0x43b125={'iTCLO':function(_0x52d633,_0x2ba61a,_0x412bbf){return _0x52d633(_0x2ba61a,_0x412bbf);}},_0xb8e3b=(_0x16a950[_0x4db239(0xc7)][_0x4db239(_0x2cd987._0x5cbc15)](_0x161224)||[])[_0x4db239(_0x2cd987._0x7f00a6)],_0x548448=(_0x16a950['forward'][_0x4db239(_0x2cd987._0x35a9ba)](_0x161224)||[])['length'],_0x36881e=_0x43b125[_0x4db239(0x79)](computeTransitiveFanIn,_0x161224,_0x16a950),_0x5311b7={};return _0x5311b7['fanIn']=_0xb8e3b,_0x5311b7[_0x4db239(0x9e)]=_0x548448,_0x5311b7[_0x4db239(0xab)]=_0x36881e,_0x5311b7;}function computeTransitiveFanIn(_0x562cdb,_0x176c06){const _0x5ef54b={_0x4f7167:0x74,_0x290514:0xbf,_0x32d99c:0xdd,_0x35b07d:0x8d},_0x2d6760=_0x15e495,_0x5750cd={};_0x5750cd['BoWwz']=function(_0x292c09,_0x300de1){return _0x292c09>_0x300de1;},_0x5750cd[_0x2d6760(0xdd)]=function(_0x6667ea,_0x32723c){return _0x6667ea!==_0x32723c;};const _0x2e6f0b=_0x5750cd,_0x4460b4=new Set(),_0x4dd930=[],_0x15a393=_0x176c06[_0x2d6760(0xc7)]['get'](_0x562cdb)||[];for(const _0x1eefa8 of _0x15a393){!_0x4460b4[_0x2d6760(_0x5ef54b._0x4f7167)](_0x1eefa8)&&(_0x4460b4['add'](_0x1eefa8),_0x4dd930[_0x2d6760(0xdb)](_0x1eefa8));}while(_0x2e6f0b['BoWwz'](_0x4dd930[_0x2d6760(0xbc)],0x0)){const _0x2ff188=_0x4dd930[_0x2d6760(_0x5ef54b._0x290514)](),_0x4c5ecd=_0x176c06['reverse'][_0x2d6760(0x94)](_0x2ff188)||[];for(const _0x591847 of _0x4c5ecd){!_0x4460b4['has'](_0x591847)&&_0x2e6f0b[_0x2d6760(_0x5ef54b._0x32d99c)](_0x591847,_0x562cdb)&&(_0x4460b4[_0x2d6760(_0x5ef54b._0x35b07d)](_0x591847),_0x4dd930[_0x2d6760(0xdb)](_0x591847));}}return _0x4460b4['size'];}function computeInstability(_0x3ab75c,_0x13398e){const _0x48bf2d={_0x1d328c:0x8c},_0x1fc7e3=_0x15e495,_0x28da1e={};_0x28da1e[_0x1fc7e3(0x92)]=function(_0x44d5a0,_0x3b80ca){return _0x44d5a0===_0x3b80ca;},_0x28da1e[_0x1fc7e3(0xcb)]=function(_0x48bda5,_0x2b661a){return _0x48bda5+_0x2b661a;},_0x28da1e['RYdlj']=function(_0x1cda4f,_0xe176de){return _0x1cda4f/_0xe176de;},_0x28da1e[_0x1fc7e3(_0x48bf2d._0x1d328c)]=function(_0x1aebb7,_0x4562b4){return _0x1aebb7+_0x4562b4;};const _0x64b2b8=_0x28da1e;if(_0x64b2b8['CZYnj'](_0x64b2b8[_0x1fc7e3(0xcb)](_0x3ab75c,_0x13398e),0x0))return 0.5;return _0x64b2b8[_0x1fc7e3(0x7f)](_0x13398e,_0x64b2b8[_0x1fc7e3(0x8c)](_0x3ab75c,_0x13398e));}const _0x3bbef1={};_0x3bbef1[_0x15e495(0x73)]=[/\bif\s*\(/g,/\belse\s+if\s*\(/g,/\bfor\s*\(/g,/\bwhile\s*\(/g,/\bdo\s*\{/g,/\bswitch\s*\(/g,/\bcase\s+/g,/\bcatch\s*\(/g,/\?\s*[^:?]/g,/&&/g,/\|\|/g,/\?\?/g],_0x3bbef1[_0x15e495(0xcf)]=[],_0x3bbef1['dart']=[/\bif\s*\(/g,/\belse\s+if\s*\(/g,/\bfor\s*\(/g,/\bwhile\s*\(/g,/\bdo\s*\{/g,/\bswitch\s*\(/g,/\bcase\s+/g,/\bcatch\s*\(/g,/\?\s*[^:?]/g,/&&/g,/\|\|/g,/\?\?/g,/\blate\s+/g],_0x3bbef1['python']=[/\bif\s+/g,/\belif\s+/g,/\bfor\s+/g,/\bwhile\s+/g,/\bexcept\s*/g,/\band\b/g,/\bor\b/g,/\bwith\s+/g],_0x3bbef1['go']=[/\bif\s+/g,/\bfor\s+/g,/\bselect\s*\{/g,/\bcase\s+/g,/&&/g,/\|\|/g],_0x3bbef1['rust']=[/\bif\s+/g,/\belse\s+if\s+/g,/\bfor\s+/g,/\bwhile\s+/g,/\bloop\s*\{/g,/\bmatch\s+/g,/=>/g,/&&/g,/\|\|/g],_0x3bbef1[_0x15e495(0x9d)]=[/\bif\s*\(/g,/\belse\s+if\s*\(/g,/\bfor\s*\(/g,/\bwhile\s*\(/g,/\bdo\s*\{/g,/\bswitch\s*\(/g,/\bcase\s+/g,/\bcatch\s*\(/g,/\?\s*[^:?]/g,/&&/g,/\|\|/g],_0x3bbef1['cpp']=[/\bif\s*\(/g,/\belse\s+if\s*\(/g,/\bfor\s*\(/g,/\bwhile\s*\(/g,/\bdo\s*\{/g,/\bswitch\s*\(/g,/\bcase\s+/g,/\bcatch\s*\(/g,/\?\s*[^:?]/g,/&&/g,/\|\|/g],_0x3bbef1[_0x15e495(0xc8)]=[/\bif\s+/g,/\belsif\s+/g,/\bunless\s+/g,/\bwhile\s+/g,/\buntil\s+/g,/\bfor\s+/g,/\bwhen\s+/g,/\brescue\b/g,/&&/g,/\|\|/g];const COMPLEXITY_PATTERNS=_0x3bbef1;COMPLEXITY_PATTERNS['javascript']=COMPLEXITY_PATTERNS[_0x15e495(0x73)];const _0x19547a={};_0x19547a[_0x15e495(0x73)]='typescript',_0x19547a['dart']='dart',_0x19547a[_0x15e495(0xef)]=_0x15e495(0xef),_0x19547a['go']='go',_0x19547a[_0x15e495(0x84)]=_0x15e495(0x84),_0x19547a['java']='java',_0x19547a['cpp']='cpp',_0x19547a[_0x15e495(0xc8)]='ruby';const LANGUAGE_ID_MAP=_0x19547a;function detectLanguageForFile(_0x6df76b){const _0x47648a={_0x39048a:0x80,_0x227dd7:0xa1,_0xe1e342:0xb8,_0x1a0210:0xf7,_0x19944c:0xf3,_0x5678ec:0x84,_0xd1256d:0xf5,_0x3ff55f:0xe8},_0x55c57e=_0x15e495,_0x446b5f={};_0x446b5f[_0x55c57e(0xe8)]='typescript',_0x446b5f[_0x55c57e(_0x47648a._0x39048a)]='javascript',_0x446b5f[_0x55c57e(_0x47648a._0x227dd7)]=_0x55c57e(0xef),_0x446b5f['MWjNB']=_0x55c57e(_0x47648a._0xe1e342);const _0x31d6db=_0x446b5f,_0x562267=(0x0,plugin_1[_0x55c57e(0xae)])(_0x6df76b);if(_0x562267)return LANGUAGE_ID_MAP[_0x562267['id']]||_0x31d6db[_0x55c57e(0xe8)];const _0x396d89=_0x6df76b[_0x55c57e(_0x47648a._0x1a0210)]('.')['pop']()?.['toLowerCase']()||'',_0x18499a={};_0x18499a['ts']='typescript',_0x18499a[_0x55c57e(_0x47648a._0x19944c)]=_0x31d6db['tFaFP'],_0x18499a['js']=_0x31d6db['jZVHH'],_0x18499a['jsx']=_0x31d6db['jZVHH'],_0x18499a['dart']='dart',_0x18499a['py']=_0x31d6db[_0x55c57e(0xa1)],_0x18499a['go']='go',_0x18499a['rs']=_0x55c57e(_0x47648a._0x5678ec),_0x18499a['java']=_0x55c57e(0x9d),_0x18499a[_0x55c57e(_0x47648a._0xe1e342)]=_0x31d6db['MWjNB'],_0x18499a['cc']=_0x31d6db['MWjNB'],_0x18499a[_0x55c57e(0xd9)]=_0x31d6db[_0x55c57e(_0x47648a._0xd1256d)],_0x18499a['c']=_0x31d6db[_0x55c57e(0xf5)],_0x18499a['h']=_0x31d6db[_0x55c57e(0xf5)],_0x18499a[_0x55c57e(0xaa)]=_0x31d6db['MWjNB'],_0x18499a['rb']='ruby';const _0x240b0a=_0x18499a;return _0x240b0a[_0x396d89]||_0x31d6db[_0x55c57e(_0x47648a._0x3ff55f)];}function stripCommentsAndStrings(_0x1ba67e){const _0x3c56b4={_0x224d21:0xc5,_0xe6dd91:0xc5,_0x403c58:0xc5},_0x57b104=_0x15e495;let _0x129b25=_0x1ba67e[_0x57b104(_0x3c56b4._0x224d21)](/\/\*[\s\S]*?\*\//g,'');return _0x129b25=_0x129b25[_0x57b104(_0x3c56b4._0xe6dd91)](/\/\/.*$/gm,''),_0x129b25=_0x129b25[_0x57b104(0xc5)](/#.*$/gm,''),_0x129b25=_0x129b25[_0x57b104(_0x3c56b4._0x403c58)](/"(?:[^"\\]|\\.)*"/g,'\x22\x22'),_0x129b25=_0x129b25['replace'](/'(?:[^'\\]|\\.)*'/g,'\x27\x27'),_0x129b25=_0x129b25[_0x57b104(0xc5)](/`(?:[^`\\]|\\.)*`/g,'``'),_0x129b25;}function _0x1ce9(){const _0x45704d=['C2HPzNq','uhvHBNG','mtq1mJmYCNnXtLjP','ote5wK9mz2vm','u0fgrq','sKrJr0m','CMvWBgfJzq','lcbMyw4TB3v0oIa','CMv2zxjZzq','CNvIEq','AvLNyKm','teDkDxi','rxvbrg4','mJyWmeDwv2jOtW','seLhsa','BgfZDeLUzgv4','AMf2yxnJCMLWDa','uKLts19xruLhsfrt','Aw5ZDgfIAwXPDhK','mhW0Fdf8m3WY','t0HtEu4','nJKWCMvqA3be','CgvYy2vUDgLSzq','wfDwAxa','sw9KAKy','vuPRvfa','y3H4','C2nVCMu','ChvZAa','y29TCgXLEgL0Eq','uhbVzwu','D0DvC1O','BwLU','AM9PBG','Dg9gAxHLza','q2rjrfu','A1Pczfu','CvnruK0','zxjYB3i','yu93y2q','Bwf4','DezHrLa','DMfSDwu','tML5yue','y29TChv0zuLUC3rHyMLSAxr5','zgvMyxvSDa','zurSzuK','x19LC01VzhvSzq','ChL0Ag9U','C2L6zq','y29TChv0zvbYB2PLy3rnzxrYAwnZ','ndyWnZLUrK9cDeG','Dhn4','mJe5mfzVyLHNsG','tvDQtKi','DgGGCgvYy2vUDgLSzsK','C3bSAxq','zMLSzxm','x19ZzxrnB2r1BgvezwzHDwX0','mJC2nZq5nur5ENrPyG','C2nJ','DhLWzxnJCMLWDa','AgfZ','icbqywDLuMfUAZOG','AgfZt3DUuhjVCgvYDhK','y1jLA0e','tuvesvvn','Avrdte8','mtGWugn0wvP2','ChjVAMvJDfjVB3q','qM9WDwq','icbdB21WBgv4Axr5oIa','ChjVDg90ExbL','uLLKBgO','ALPwseG','uMLZAYbty29YztOG','mtm4mJHMCfrizuG','icbdyxnJywrLigrLChrOoIa','CNvZDa','zMfUsw4','kg1HEezHBKLUpq','zvblDMi','ntztDwXhzxm','y2fSBa','y291CgXPBMC','seHVqvy','vKjSzue','ywrK','tKPMru0','zgvMAw5LuhjVCgvYDhK','t3vrrMK','mtCWvKvQuhz0','q1PzBMO','igXLDMvSkhmP','z2v0','zfrgtMe','zw51BwvYywjSzq','nduXmJbXufzevve','x19JCMvHDgvcAw5KAw5N','zvbgANq','yMfSyw5Jzwq','uxjiuMO','rgPgBeS','AMf2yq','zMfUt3v0','y29UzgvUC2vK','C3rHyMXLic0TigjLignHDxrPB3vZ','qwzvsLq','Bwf0y2G','qNzAzgu','Aw52ywXPzgf0zvbYB2PLy3rnzxrYAwnZ','y0LgAw4','C2v0','y29TChv0zunHC2nHzgvezxb0Aa','zK5qreK','veLWEuK','AhbW','DhjHBNnPDgL2zuzHBKLU','CM91BMq','Bwf4vhjHBNnPDgL2zuzHBKLU','z2v0ugX1z2LUrM9YrMLSzq','mxW0Fdn8mNWW','te9x','BM9YBwfSAxPLzenVBxbSzxHPDhK','tuXtv3e','zMLSzu1LDhjPy3m','tLbfteS','C3rHyMLSAxr5','z2v0rMLSzvjHBMS','q1rxv0m','y3bW','AuLesKS','y2fZy2fKzurLChrO','nJC5mZq0rvvUtuv5','BgvUz3rO','CgfNzvjHBMS','y2XHC3nPzNLdB21WB3nPDgvsAxnR'];_0x1ce9=function(){return _0x45704d;};return _0x1ce9();}function computeComplexity(_0x296879,_0x2b4dc6){const _0x570b80={_0x2d6bc5:0x73,_0x40f963:0xa2,_0x45a35d:0xbc},_0x47d482=_0x15e495,_0x4db785=COMPLEXITY_PATTERNS[_0x2b4dc6]||COMPLEXITY_PATTERNS[_0x47d482(_0x570b80._0x2d6bc5)],_0xfe2313=stripCommentsAndStrings(_0x296879);let _0x32a463=0x0;for(const _0x5a17f7 of _0x4db785){_0x5a17f7[_0x47d482(0xce)]=0x0;const _0x4f8cf0=_0xfe2313[_0x47d482(_0x570b80._0x40f963)](_0x5a17f7);_0x4f8cf0&&(_0x32a463+=_0x4f8cf0[_0x47d482(_0x570b80._0x45a35d)]);}return _0x32a463;}function computeCascadeDepth(_0x35387c,_0x5e55d2){const _0x276c65={_0x1785a1:0x72,_0x4f4254:0xa6},_0x4fcc27=_0x15e495,_0xd11f4e={};_0xd11f4e[_0x4fcc27(0xe4)]=function(_0x287632,_0x36285b){return _0x287632+_0x36285b;};const _0x59cffc=_0xd11f4e,_0x232bcc=_0x5e55d2[_0x4fcc27(_0x276c65._0x1785a1)];if(!_0x232bcc)return computeRawCascadeDepth(_0x35387c,_0x5e55d2);const _0x35f92f=_0x232bcc['nodeToComponent']['get'](_0x35387c);if(_0x35f92f===undefined)return 0x0;const _0x59e7e2=new Map();_0x59e7e2[_0x4fcc27(_0x276c65._0x4f4254)](_0x35f92f,0x0);const _0x291cc2={};_0x291cc2['idx']=_0x35f92f,_0x291cc2['depth']=0x0;const _0x419171=[_0x291cc2];let _0x1c51a0=0x0;while(_0x419171['length']>0x0){const {idx:_0x187df3,depth:_0x2781ec}=_0x419171['shift'](),_0xda06b2=_0x232bcc[_0x4fcc27(0x9f)]['reverse'][_0x4fcc27(0x94)](_0x187df3)||[];for(const _0x2058c8 of _0xda06b2){if(!_0x59e7e2['has'](_0x2058c8)){const _0x165c01=_0x59cffc['qSQRM'](_0x2781ec,0x1);_0x59e7e2[_0x4fcc27(_0x276c65._0x4f4254)](_0x2058c8,_0x165c01),_0x1c51a0=Math[_0x4fcc27(0xe7)](_0x1c51a0,_0x165c01);const _0x2415ef={};_0x2415ef['idx']=_0x2058c8,_0x2415ef['depth']=_0x165c01,_0x419171['push'](_0x2415ef);}}}return _0x1c51a0;}function computeRawCascadeDepth(_0x487814,_0x20f77a){const _0x2dee1d={_0x400d4a:0xea},_0x142a21=_0x15e495,_0xf85667={};_0xf85667['NiyaA']=function(_0x1a74b0,_0x395a1f){return _0x1a74b0>_0x395a1f;};const _0x545fcb=_0xf85667,_0x305fa1=new Set();_0x305fa1[_0x142a21(0x8d)](_0x487814);let _0x1c2b0c=[_0x487814],_0x1d57ee=0x0;while(_0x1c2b0c[_0x142a21(0xbc)]>0x0){const _0x4bfd90=[];for(const _0x289d2c of _0x1c2b0c){const _0x52622e=_0x20f77a['reverse']['get'](_0x289d2c)||[];for(const _0xa899e0 of _0x52622e){!_0x305fa1['has'](_0xa899e0)&&(_0x305fa1['add'](_0xa899e0),_0x4bfd90[_0x142a21(0xdb)](_0xa899e0));}}_0x545fcb[_0x142a21(_0x2dee1d._0x400d4a)](_0x4bfd90['length'],0x0)&&_0x1d57ee++,_0x1c2b0c=_0x4bfd90;}return _0x1d57ee;}function normalize(_0x1395ca,_0x5d3f39,_0x39d42b){if(_0x39d42b<=_0x5d3f39)return 0x0;return Math['min'](0x1,Math['max'](0x0,(_0x1395ca-_0x5d3f39)/(_0x39d42b-_0x5d3f39)));}function classifyCompositeRisk(_0x518f29){const _0x22c651={_0x3ce590:0xa5,_0x58f54e:0xc9},_0x23807b=_0x15e495,_0xe7628a={};_0xe7628a['OPGtx']=_0x23807b(0xaf),_0xe7628a[_0x23807b(0xb4)]=_0x23807b(0xc3),_0xe7628a['Bopud']=function(_0x3fa2f0,_0x346ca9){return _0x3fa2f0>=_0x346ca9;},_0xe7628a['BRKtb']='CRITICAL',_0xe7628a['cIFin']=function(_0x3bf355,_0x2f9856){return _0x3bf355>=_0x2f9856;},_0xe7628a['iYgbC']='HIGH';const _0x4c7045=_0xe7628a,_0x1564de=_0x4c7045['OPGtx']['split']('|');let _0x2b1bd3=0x0;while(!![]){switch(_0x1564de[_0x2b1bd3++]){case'0':return _0x4c7045[_0x23807b(0xb4)];case'1':if(_0x4c7045[_0x23807b(0x7c)](_0x518f29,RISK_THRESHOLDS['CRITICAL']))return _0x4c7045['BRKtb'];continue;case'2':if(_0x4c7045[_0x23807b(_0x22c651._0x3ce590)](_0x518f29,RISK_THRESHOLDS['LOW']))return'LOW';continue;case'3':if(_0x518f29>=RISK_THRESHOLDS['MEDIUM'])return'MEDIUM';continue;case'4':if(_0x4c7045['Bopud'](_0x518f29,RISK_THRESHOLDS['HIGH']))return _0x4c7045[_0x23807b(_0x22c651._0x58f54e)];continue;}break;}}function readFileContent(_0x5dea57){try{return fs['readFileSync'](_0x5dea57,'utf-8');}catch{return null;}}function computeRiskScore(_0x24f9fe,_0x53d50e,_0x5f41db,_0x164bc0){const _0x28139e={_0x3238a7:0x85,_0x3a0b8f:0xad,_0xd3227b:0xd6,_0x74950c:0xe7,_0x3b0d13:0xbd,_0x31603b:0xd5,_0x57794f:0xd0,_0x3c4cc9:0xd0,_0x49588a:0xb2,_0x56f7ea:0xb2,_0xc04608:0x85,_0xfecdc6:0xb5,_0x591d38:0xe6,_0x5ac520:0x85,_0x239d8b:0xd0,_0x492b22:0xdc,_0x533b6f:0x99,_0x5543ce:0x90,_0x197a85:0xac,_0x4e6b38:0x90,_0x523c6c:0x90},_0x311caf=_0x15e495,_0x1b1384={'DjFlK':function(_0x530c83,_0x21f2c5,_0x401ba4){return _0x530c83(_0x21f2c5,_0x401ba4);},'bczUE':function(_0x1c1672,_0x5dbaa7){return _0x1c1672(_0x5dbaa7);},'UJkTP':function(_0x3cc867,_0x359ee6,_0x14604a,_0x390c19){return _0x3cc867(_0x359ee6,_0x14604a,_0x390c19);},'XWVip':function(_0x850879,_0x1e7e4f,_0x51c444,_0x22d3b6){return _0x850879(_0x1e7e4f,_0x51c444,_0x22d3b6);},'JDcGC':function(_0x5bc7e4,_0x579200){return _0x5bc7e4+_0x579200;},'aOwcd':function(_0x2f6937,_0x121701){return _0x2f6937*_0x121701;},'MLSWq':function(_0x504303,_0x24f7d0){return _0x504303+_0x24f7d0;},'OuQFi':function(_0x5a3f4a,_0x491d46){return _0x5a3f4a/_0x491d46;},'wGUsZ':function(_0x2bed30,_0x49db71){return _0x2bed30-_0x49db71;},'Puanx':function(_0x5b9d94,_0x3d1de8){return _0x5b9d94*_0x3d1de8;},'ePFjt':function(_0x45b5ec,_0x74ec2d){return _0x45b5ec/_0x74ec2d;},'MQwGY':function(_0x914698,_0x528c3f){return _0x914698*_0x528c3f;},'fNPDI':function(_0x284d15,_0x27884a){return _0x284d15*_0x27884a;}},_0x1c176c=_0x1b1384[_0x311caf(0x9c)](computeCouplingMetrics,_0x24f9fe,_0x53d50e),_0x3e26df=_0x1b1384['DjFlK'](computeInstability,_0x1c176c[_0x311caf(_0x28139e._0x3238a7)],_0x1c176c['fanOut']),_0xef3358=_0x5f41db??readFileContent(_0x24f9fe),_0x52cc77=_0x1b1384['bczUE'](detectLanguageForFile,_0x24f9fe),_0x34b0e2=_0xef3358?_0x1b1384[_0x311caf(0x9c)](computeComplexity,_0xef3358,_0x52cc77):0x0,_0x53a5d2=computeCascadeDepth(_0x24f9fe,_0x53d50e);let _0x41548d,_0x34a455,_0x520a3a;_0x164bc0?(_0x41548d=normalize(_0x1c176c[_0x311caf(0xab)],0x0,_0x164bc0[_0x311caf(_0x28139e._0x3a0b8f)]),_0x34a455=_0x1b1384[_0x311caf(0xd8)](normalize,_0x34b0e2,0x0,_0x164bc0['maxComplexity']),_0x520a3a=_0x1b1384[_0x311caf(_0x28139e._0xd3227b)](normalize,_0x53a5d2,0x0,_0x164bc0['maxCascadeDepth'])):(_0x41548d=normalize(_0x1c176c[_0x311caf(0xab)],0x0,Math[_0x311caf(_0x28139e._0x74950c)](_0x1c176c['transitiveFanIn'],0x14)),_0x34a455=normalize(_0x34b0e2,0x0,Math[_0x311caf(_0x28139e._0x74950c)](_0x34b0e2,0x32)),_0x520a3a=normalize(_0x53a5d2,0x0,Math['max'](_0x53a5d2,0x5)));let _0x2fecbd,_0x464e95,_0x573a9b=0x0,_0x59a35f=![];if(_0x53d50e[_0x311caf(_0x28139e._0x3b0d13)]){const _0x297c1a=(0x0,pagerank_1['getFileRank'])(_0x24f9fe,_0x53d50e['pageRank']);_0x297c1a&&(_0x2fecbd=_0x297c1a[_0x311caf(0xda)],_0x464e95=_0x297c1a[_0x311caf(_0x28139e._0x31603b)],_0x573a9b=_0x297c1a['percentile']/0x64,_0x59a35f=!![]);}let _0x9bf456;if(_0x59a35f)_0x9bf456=_0x1b1384['JDcGC'](exports['RISK_WEIGHTS'][_0x311caf(0x85)]*_0x41548d+_0x1b1384[_0x311caf(0xe6)](exports[_0x311caf(0xd0)]['stability'],0x1-_0x3e26df),_0x1b1384['aOwcd'](exports[_0x311caf(_0x28139e._0x57794f)]['complexity'],_0x34a455))+_0x1b1384['aOwcd'](exports[_0x311caf(_0x28139e._0x3c4cc9)][_0x311caf(0xba)],_0x520a3a)+_0x1b1384['aOwcd'](exports[_0x311caf(0xd0)][_0x311caf(_0x28139e._0x3b0d13)],_0x573a9b);else{const _0x533afd=_0x1b1384[_0x311caf(_0x28139e._0x49588a)](_0x1b1384[_0x311caf(_0x28139e._0x56f7ea)](exports[_0x311caf(0xd0)][_0x311caf(_0x28139e._0xc04608)],exports['RISK_WEIGHTS'][_0x311caf(_0x28139e._0xfecdc6)])+exports[_0x311caf(0xd0)][_0x311caf(0xdc)],exports['RISK_WEIGHTS']['cascadeDepth']);_0x9bf456=_0x1b1384[_0x311caf(0xc4)](_0x1b1384[_0x311caf(0xc4)](_0x1b1384[_0x311caf(_0x28139e._0x591d38)](exports[_0x311caf(0xd0)][_0x311caf(_0x28139e._0x5ac520)]/_0x533afd,_0x41548d),_0x1b1384['OuQFi'](exports[_0x311caf(0xd0)]['stability'],_0x533afd)*_0x1b1384[_0x311caf(0xde)](0x1,_0x3e26df)),_0x1b1384[_0x311caf(0xe6)](_0x1b1384['OuQFi'](exports[_0x311caf(_0x28139e._0x239d8b)][_0x311caf(_0x28139e._0x492b22)],_0x533afd),_0x34a455))+_0x1b1384[_0x311caf(0xc0)](_0x1b1384[_0x311caf(_0x28139e._0x533b6f)](exports['RISK_WEIGHTS']['cascadeDepth'],_0x533afd),_0x520a3a);}const _0x20cb7a=Math['min'](0x1,Math['max'](0x0,_0x9bf456));return{'composite':_0x1b1384[_0x311caf(_0x28139e._0x5543ce)](Math[_0x311caf(_0x28139e._0x197a85)](_0x1b1384['MQwGY'](_0x20cb7a,0x64)),0x64),'fanIn':_0x1c176c['fanIn'],'fanOut':_0x1c176c['fanOut'],'transitiveFanIn':_0x1c176c['transitiveFanIn'],'instability':_0x1b1384[_0x311caf(_0x28139e._0x4e6b38)](Math['round'](_0x3e26df*0x64),0x64),'complexity':_0x34b0e2,'normalizedComplexity':_0x1b1384[_0x311caf(_0x28139e._0x523c6c)](Math['round'](_0x1b1384[_0x311caf(0xa8)](_0x34a455,0x64)),0x64),'cascadeDepth':_0x53a5d2,'riskLevel':classifyCompositeRisk(_0x20cb7a),'pageRank':_0x2fecbd,'pageRankPercentile':_0x464e95};}function computeProjectMetrics(_0x36ef96,_0x4a38b7){const _0x5e37f4={_0x5542e6:0xd7,_0xa46873:0xba,_0x270356:0xe7,_0x492ce4:0xab,_0x4be6c5:0xb6,_0x579882:0xe3,_0x4d028e:0xd0,_0x1db927:0x85,_0x3682bc:0xd0,_0x293a7c:0xdc,_0x4ed688:0xba,_0x61536:0xd3,_0x3f2011:0xd0,_0xd06a4d:0xd0,_0x48b448:0xb9,_0x159643:0x8b,_0x2ed2eb:0xdf,_0x3f6566:0xac,_0x31f511:0x8a,_0xcad54f:0x6f,_0x4df0d4:0xf0},_0x140408=_0x15e495,_0x8fd44c={'dTFNa':function(_0x5d6596,_0x2d148d,_0x5e0328){return _0x5d6596(_0x2d148d,_0x5e0328);},'QrHRj':function(_0x26de6a,_0x21d53b,_0x3438bb){return _0x26de6a(_0x21d53b,_0x3438bb);},'CeReq':function(_0x2f7a6e,_0x538d6d){return _0x2f7a6e(_0x538d6d);},'IodjF':function(_0x5bc9f9,_0x45a432,_0x37408a){return _0x5bc9f9(_0x45a432,_0x37408a);},'eDleI':function(_0x36de58,_0x2b02e7,_0xad76e2,_0xeba512){return _0x36de58(_0x2b02e7,_0xad76e2,_0xeba512);},'gzopf':function(_0x2b9b9a,_0x25ceff,_0x2ff40d,_0x52e3fe){return _0x2b9b9a(_0x25ceff,_0x2ff40d,_0x52e3fe);},'Jiwqt':function(_0x39c10f,_0x5a60e1){return _0x39c10f/_0x5a60e1;},'OHSyN':function(_0x4a4f72,_0x1325af){return _0x4a4f72+_0x1325af;},'kZBdU':function(_0x221d25,_0x3d5809){return _0x221d25*_0x3d5809;},'GEnFd':function(_0x4f18a5,_0x485a23){return _0x4f18a5*_0x485a23;},'AARHw':function(_0x5400bb,_0x232d03){return _0x5400bb*_0x232d03;},'iIDJK':function(_0xde1354,_0x156f0c){return _0xde1354*_0x156f0c;},'HHoAV':function(_0x59555c,_0xc89a){return _0x59555c*_0xc89a;},'TIpyI':function(_0x24f3f1,_0x140bef){return _0x24f3f1*_0x140bef;},'RrMwn':function(_0x331e31,_0xc1a3c){return _0x331e31/_0xc1a3c;},'jRSkx':function(_0x364965,_0x3c36f6){return _0x364965(_0x3c36f6);},'rpArK':function(_0x4a72a7,_0x37eed3){return _0x4a72a7+_0x37eed3;}};if(cachedProjectMetrics&&cachedProjectRoot===_0x36ef96['projectRoot'])return cachedProjectMetrics;const _0x155925=_0x4a38b7||readFileContent,_0x3b4dd0=new Map();let _0x461c59=0x0,_0x434e4e=0x0,_0x4e299f=0x0,_0x4e8536=0x0;for(const _0x311836 of _0x36ef96['files']){const _0x489a09=_0x8fd44c[_0x140408(0x95)](computeCouplingMetrics,_0x311836,_0x36ef96),_0x22e74d=_0x8fd44c[_0x140408(0x9b)](computeInstability,_0x489a09['fanIn'],_0x489a09['fanOut']),_0x322e44=_0x8fd44c['CeReq'](_0x155925,_0x311836),_0xcff547=detectLanguageForFile(_0x311836),_0x5528f6=_0x322e44?_0x8fd44c[_0x140408(_0x5e37f4._0x5542e6)](computeComplexity,_0x322e44,_0xcff547):0x0,_0x368912=_0x8fd44c['dTFNa'](computeCascadeDepth,_0x311836,_0x36ef96),_0xe88bce={};_0xe88bce[_0x140408(0x8a)]=_0x489a09,_0xe88bce['instability']=_0x22e74d,_0xe88bce['complexity']=_0x5528f6,_0xe88bce[_0x140408(_0x5e37f4._0xa46873)]=_0x368912,_0x3b4dd0['set'](_0x311836,_0xe88bce),_0x461c59=Math[_0x140408(0xe7)](_0x461c59,_0x489a09['fanIn']),_0x434e4e=Math['max'](_0x434e4e,_0x489a09['transitiveFanIn']),_0x4e299f=Math['max'](_0x4e299f,_0x5528f6),_0x4e8536=Math[_0x140408(_0x5e37f4._0x270356)](_0x4e8536,_0x368912);}const _0x1bf5fe={'maxFanIn':_0x461c59,'maxTransitiveFanIn':_0x434e4e,'maxComplexity':_0x4e299f,'maxCascadeDepth':_0x4e8536,'fileMetrics':new Map()};for(const [_0x4ff053,_0x5609c2]of _0x3b4dd0){const _0x4f88da=_0x8fd44c[_0x140408(0xed)](normalize,_0x5609c2['coupling'][_0x140408(_0x5e37f4._0x492ce4)],0x0,_0x434e4e),_0x1c2293=_0x8fd44c['eDleI'](normalize,_0x5609c2[_0x140408(0xdc)],0x0,_0x4e299f),_0x1d7b84=_0x8fd44c['gzopf'](normalize,_0x5609c2[_0x140408(_0x5e37f4._0xa46873)],0x0,_0x4e8536);let _0x33f88b,_0x3a2169,_0x5d6924=0x0,_0x2aac55=![];if(_0x36ef96['pageRank']){const _0x2e26c7=(0x0,pagerank_1[_0x140408(_0x5e37f4._0x4be6c5)])(_0x4ff053,_0x36ef96['pageRank']);_0x2e26c7&&(_0x33f88b=_0x2e26c7['score'],_0x3a2169=_0x2e26c7['percentile'],_0x5d6924=_0x8fd44c['Jiwqt'](_0x2e26c7['percentile'],0x64),_0x2aac55=!![]);}let _0x2380ea;if(_0x2aac55)_0x2380ea=_0x8fd44c['OHSyN'](_0x8fd44c[_0x140408(_0x5e37f4._0x579882)](exports[_0x140408(_0x5e37f4._0x4d028e)][_0x140408(_0x5e37f4._0x1db927)],_0x4f88da)+exports[_0x140408(_0x5e37f4._0x3682bc)]['stability']*(0x1-_0x5609c2[_0x140408(0xd1)])+exports['RISK_WEIGHTS'][_0x140408(_0x5e37f4._0x293a7c)]*_0x1c2293+_0x8fd44c['GEnFd'](exports[_0x140408(0xd0)][_0x140408(_0x5e37f4._0x4ed688)],_0x1d7b84),_0x8fd44c['kZBdU'](exports[_0x140408(_0x5e37f4._0x4d028e)]['pageRank'],_0x5d6924));else{const _0x4d50a6=_0x8fd44c[_0x140408(_0x5e37f4._0x61536)](_0x8fd44c[_0x140408(0xd3)](exports[_0x140408(0xd0)][_0x140408(_0x5e37f4._0x1db927)],exports['RISK_WEIGHTS']['stability'])+exports[_0x140408(_0x5e37f4._0x3f2011)][_0x140408(0xdc)],exports['RISK_WEIGHTS'][_0x140408(_0x5e37f4._0x4ed688)]);_0x2380ea=_0x8fd44c[_0x140408(0xd3)](_0x8fd44c['OHSyN'](_0x8fd44c[_0x140408(0xd3)](_0x8fd44c['AARHw'](exports[_0x140408(_0x5e37f4._0xd06a4d)]['fanIn']/_0x4d50a6,_0x4f88da),_0x8fd44c[_0x140408(_0x5e37f4._0x48b448)](exports['RISK_WEIGHTS'][_0x140408(0xb5)]/_0x4d50a6,0x1-_0x5609c2[_0x140408(0xd1)])),_0x8fd44c[_0x140408(0xe3)](exports[_0x140408(0xd0)][_0x140408(0xdc)]/_0x4d50a6,_0x1c2293)),_0x8fd44c[_0x140408(_0x5e37f4._0x159643)](_0x8fd44c['Jiwqt'](exports['RISK_WEIGHTS']['cascadeDepth'],_0x4d50a6),_0x1d7b84));}const _0x1cd26a=Math[_0x140408(_0x5e37f4._0x2ed2eb)](0x1,Math[_0x140408(0xe7)](0x0,_0x2380ea));_0x1bf5fe[_0x140408(0xb3)]['set'](_0x4ff053,{'composite':Math[_0x140408(_0x5e37f4._0x3f6566)](_0x8fd44c[_0x140408(0xa9)](_0x1cd26a,0x64))/0x64,'fanIn':_0x5609c2[_0x140408(_0x5e37f4._0x31f511)]['fanIn'],'fanOut':_0x5609c2[_0x140408(0x8a)]['fanOut'],'transitiveFanIn':_0x5609c2[_0x140408(0x8a)][_0x140408(0xab)],'instability':_0x8fd44c['RrMwn'](Math[_0x140408(0xac)](_0x5609c2['instability']*0x64),0x64),'complexity':_0x5609c2[_0x140408(0xdc)],'normalizedComplexity':Math['round'](_0x1c2293*0x64)/0x64,'cascadeDepth':_0x5609c2[_0x140408(_0x5e37f4._0x4ed688)],'riskLevel':_0x8fd44c['jRSkx'](classifyCompositeRisk,_0x1cd26a),'pageRank':_0x33f88b,'pageRankPercentile':_0x3a2169});}return cachedProjectMetrics=_0x1bf5fe,cachedProjectRoot=_0x36ef96[_0x140408(0x7b)],console[_0x140408(0xe5)](_0x8fd44c['OHSyN'](_0x8fd44c['rpArK']('[syke:scoring]\x20Project\x20metrics\x20computed\x20for\x20'+_0x36ef96[_0x140408(_0x5e37f4._0xcad54f)][_0x140408(_0x5e37f4._0x4df0d4)]+'\x20files\x20',_0x140408(0x86)+_0x461c59+',\x20maxTransFanIn='+_0x434e4e+',\x20'),'maxComplexity='+_0x4e299f+',\x20maxCascadeDepth='+_0x4e8536+')')),_0x1bf5fe;}function getRiskScore(_0x4fa7fc,_0x548004,_0x1e51ed){const _0x52b01d={_0x52b0b5:0xb3},_0x363cfa=_0x15e495,_0x22c49d={'qkjna':function(_0x10583c,_0x34e77d){return _0x10583c===_0x34e77d;},'qGFZn':function(_0x304ccf,_0x3c1be3,_0x3c7cff,_0x8974fb,_0x4ddcd6){return _0x304ccf(_0x3c1be3,_0x3c7cff,_0x8974fb,_0x4ddcd6);},'KgvNY':function(_0x5c41e0,_0x42f15c,_0x40b0bc,_0x169c68){return _0x5c41e0(_0x42f15c,_0x40b0bc,_0x169c68);},'tFnyQ':function(_0x2838e7,_0x45c653){return _0x2838e7??_0x45c653;}};if(cachedProjectMetrics&&_0x22c49d['qkjna'](cachedProjectRoot,_0x548004['projectRoot'])){const _0x2174bc=cachedProjectMetrics[_0x363cfa(_0x52b01d._0x52b0b5)]['get'](_0x4fa7fc);if(_0x2174bc)return _0x2174bc;return _0x22c49d['qGFZn'](computeRiskScore,_0x4fa7fc,_0x548004,_0x1e51ed??null,cachedProjectMetrics);}return _0x22c49d['KgvNY'](computeRiskScore,_0x4fa7fc,_0x548004,_0x22c49d['tFnyQ'](_0x1e51ed,null));}function formatRiskScore(_0x4764f7){const _0x249f5e={_0x26bbc1:0xa3,_0x26f2a4:0xa0,_0x580fb9:0xd1,_0x509f5b:0x9a,_0x2533b2:0x77,_0x46e688:0xe1,_0x3fb957:0x7d,_0x23ca5e:0xb1,_0x3e604f:0x93,_0x4a01c6:0xe2,_0xb4aac5:0xe2,_0x582fe6:0x75,_0x35b4e8:0xbd,_0x43bc82:0xe0},_0x551c17=_0x15e495,_0x5d56e5={};_0x5d56e5[_0x551c17(_0x249f5e._0x26bbc1)]='very\x20stable\x20--\x20dangerous\x20to\x20change',_0x5d56e5['cRekA']=function(_0x50d625,_0x107c05){return _0x50d625<=_0x107c05;},_0x5d56e5[_0x551c17(0xb7)]='very\x20unstable\x20--\x20safe\x20to\x20change',_0x5d56e5['CdIDU']=function(_0x325134,_0x4047aa){return _0x325134!==_0x4047aa;};const _0x245857=_0x5d56e5,_0x1446e9=_0x4764f7[_0x551c17(0xd1)]<=0.2?_0x245857[_0x551c17(_0x249f5e._0x26bbc1)]:_0x4764f7['instability']<=0.4?_0x551c17(_0x249f5e._0x26f2a4):_0x4764f7[_0x551c17(_0x249f5e._0x580fb9)]<=0.6?_0x551c17(_0x249f5e._0x509f5b):_0x245857[_0x551c17(_0x249f5e._0x2533b2)](_0x4764f7[_0x551c17(0xd1)],0.8)?'unstable\x20--\x20relatively\x20safe':_0x245857['CTWWC'],_0x4c2387=[_0x551c17(0x81)+_0x4764f7['composite'][_0x551c17(_0x249f5e._0x46e688)](0x2)+'\x20('+_0x4764f7['riskLevel']+')','\x20\x20Fan-in:\x20'+_0x4764f7[_0x551c17(0xab)]+'\x20(direct:\x20'+_0x4764f7[_0x551c17(0x85)]+_0x551c17(0xc6)+_0x4764f7['fanOut']+')','\x20\x20Stability:\x20'+_0x4764f7[_0x551c17(_0x249f5e._0x580fb9)]['toFixed'](0x2)+'\x20('+_0x1446e9+')',_0x551c17(_0x249f5e._0x3fb957)+_0x4764f7[_0x551c17(0xdc)]+'\x20(normalized:\x20'+_0x4764f7[_0x551c17(_0x249f5e._0x23ca5e)]['toFixed'](0x2)+')',_0x551c17(0x83)+_0x4764f7[_0x551c17(0xba)]+_0x551c17(_0x249f5e._0x3e604f)];return _0x245857[_0x551c17(_0x249f5e._0x4a01c6)](_0x4764f7['pageRank'],undefined)&&_0x245857[_0x551c17(_0x249f5e._0xb4aac5)](_0x4764f7['pageRankPercentile'],undefined)&&_0x4c2387['push'](_0x551c17(_0x249f5e._0x582fe6)+_0x4764f7[_0x551c17(_0x249f5e._0x35b4e8)][_0x551c17(_0x249f5e._0x46e688)](0x6)+'\x20('+_0x4764f7['pageRankPercentile']+_0x551c17(0xf6)),_0x4c2387[_0x551c17(_0x249f5e._0x43bc82)]('\x0a');}
|