@syke1/mcp-server 1.6.0 → 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/package.json CHANGED
@@ -1,69 +1,52 @@
1
- {
2
- "name": "@syke1/mcp-server",
3
- "version": "1.6.0",
4
- "mcpName": "io.github.khalomsky/syke",
5
- "description": "AI code impact analysis MCP server — dependency graphs, cascade detection, and a mandatory build gate for AI coding agents",
6
- "main": "dist/index.js",
7
- "bin": {
8
- "syke": "dist/index.js"
9
- },
10
- "files": [
11
- "dist/",
12
- "README.md",
13
- "smithery.yaml"
14
- ],
15
- "scripts": {
16
- "build": "tsc && node -e \"require('fs').cpSync('src/web/public','dist/web/public',{recursive:true})\" && node scripts/obfuscate.js",
17
- "start": "node dist/index.js"
18
- },
19
- "repository": {
20
- "type": "git",
21
- "url": "git+https://github.com/khalomsky/syke.git"
22
- },
23
- "keywords": [
24
- "mcp",
25
- "mcp-server",
26
- "model-context-protocol",
27
- "code-analysis",
28
- "static-analysis",
29
- "dependency-graph",
30
- "dependency-checker",
31
- "ai",
32
- "ai-coding",
33
- "code-safety",
34
- "impact-analysis",
35
- "build-gate",
36
- "build-check",
37
- "claude",
38
- "claude-code",
39
- "cursor",
40
- "windsurf",
41
- "copilot",
42
- "developer-tools",
43
- "typescript",
44
- "python",
45
- "go",
46
- "rust",
47
- "java"
48
- ],
49
- "author": "SYKE <hello@syke.cloud>",
50
- "license": "Elastic-2.0",
51
- "homepage": "https://syke.cloud",
52
- "engines": {
53
- "node": ">=18"
54
- },
55
- "dependencies": {
56
- "@google/generative-ai": "^0.24.1",
57
- "@modelcontextprotocol/sdk": "^1.12.1",
58
- "dotenv": "^17.3.1",
59
- "express": "^5.2.1",
60
- "zod": "^3.24.2"
61
- },
62
- "devDependencies": {
63
- "@types/express": "^5.0.6",
64
- "@types/node": "^25.3.0",
65
- "javascript-obfuscator": "^5.3.0",
66
- "twitter-api-v2": "^1.29.0",
67
- "typescript": "^5.7.3"
68
- }
69
- }
1
+ {
2
+ "name": "@syke1/mcp-server",
3
+ "version": "1.7.0",
4
+ "mcpName": "io.github.khalomsky/syke",
5
+ "description": "AI code impact analysis MCP server — dependency graphs, cascade detection, and a mandatory build gate for AI coding agents",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "syke": "dist/index.js"
9
+ },
10
+ "files": [
11
+ "dist/",
12
+ "README.md",
13
+ "smithery.yaml"
14
+ ],
15
+ "scripts": {
16
+ "build": "tsc && node -e \"require('fs').cpSync('src/web/public','dist/web/public',{recursive:true})\"",
17
+ "start": "node dist/index.js"
18
+ },
19
+ "repository": {
20
+ "type": "git",
21
+ "url": "git+https://github.com/khalomsky/syke.git"
22
+ },
23
+ "keywords": [
24
+ "mcp",
25
+ "mcp-server",
26
+ "code-analysis",
27
+ "dependency-graph",
28
+ "ai",
29
+ "impact-analysis",
30
+ "build-gate",
31
+ "claude",
32
+ "cursor"
33
+ ],
34
+ "author": "SYKE <hello@syke.cloud>",
35
+ "license": "Elastic-2.0",
36
+ "homepage": "https://syke.cloud",
37
+ "engines": {
38
+ "node": ">=18"
39
+ },
40
+ "dependencies": {
41
+ "@google/generative-ai": "^0.24.1",
42
+ "@modelcontextprotocol/sdk": "^1.12.1",
43
+ "dotenv": "^17.3.1",
44
+ "express": "^5.2.1",
45
+ "zod": "^3.24.2"
46
+ },
47
+ "devDependencies": {
48
+ "@types/express": "^5.0.6",
49
+ "@types/node": "^25.3.0",
50
+ "typescript": "^5.7.3"
51
+ }
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;
@@ -1 +0,0 @@
1
- 'use strict';const _0x273bfc=_0x3f18;(function(_0x58a888,_0x7b4f5e){const _0x5079d4={_0x5910ef:0x9c,_0x5d9c00:0x8a,_0x214685:0x82,_0x33d700:0x81},_0x3edcc3=_0x3f18,_0x373222=_0x58a888();while(!![]){try{const _0x5243b5=parseInt(_0x3edcc3(0x80))/0x1+-parseInt(_0x3edcc3(_0x5079d4._0x5910ef))/0x2+parseInt(_0x3edcc3(0x99))/0x3*(parseInt(_0x3edcc3(0x8f))/0x4)+parseInt(_0x3edcc3(0x95))/0x5*(-parseInt(_0x3edcc3(0x8c))/0x6)+parseInt(_0x3edcc3(_0x5079d4._0x5d9c00))/0x7+parseInt(_0x3edcc3(0x87))/0x8+-parseInt(_0x3edcc3(_0x5079d4._0x214685))/0x9*(parseInt(_0x3edcc3(_0x5079d4._0x33d700))/0xa);if(_0x5243b5===_0x7b4f5e)break;else _0x373222['push'](_0x373222['shift']());}catch(_0x29dccd){_0x373222['push'](_0x373222['shift']());}}}(_0x2887,0x6ff57));function _0x3f18(_0x2f8f44,_0x274c70){_0x2f8f44=_0x2f8f44-0x7b;const _0x288712=_0x2887();let _0x3f1833=_0x288712[_0x2f8f44];if(_0x3f18['jITutk']===undefined){var _0x39f46e=function(_0x1a2f14){const _0x46b45d='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5d56d9='',_0x4ccb8b='';for(let _0x1af5da=0x0,_0x2972fc,_0x1fe58d,_0x27bdaf=0x0;_0x1fe58d=_0x1a2f14['charAt'](_0x27bdaf++);~_0x1fe58d&&(_0x2972fc=_0x1af5da%0x4?_0x2972fc*0x40+_0x1fe58d:_0x1fe58d,_0x1af5da++%0x4)?_0x5d56d9+=String['fromCharCode'](0xff&_0x2972fc>>(-0x2*_0x1af5da&0x6)):0x0){_0x1fe58d=_0x46b45d['indexOf'](_0x1fe58d);}for(let _0x34741a=0x0,_0x4160f7=_0x5d56d9['length'];_0x34741a<_0x4160f7;_0x34741a++){_0x4ccb8b+='%'+('00'+_0x5d56d9['charCodeAt'](_0x34741a)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x4ccb8b);};_0x3f18['dboizk']=_0x39f46e,_0x3f18['IjYqdy']={},_0x3f18['jITutk']=!![];}const _0x178f18=_0x288712[0x0],_0x579c8f=_0x2f8f44+_0x178f18,_0x24d95d=_0x3f18['IjYqdy'][_0x579c8f];return!_0x24d95d?(_0x3f1833=_0x3f18['dboizk'](_0x3f1833),_0x3f18['IjYqdy'][_0x579c8f]=_0x3f1833):_0x3f1833=_0x24d95d,_0x3f1833;}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x564ccb,_0x3f3eaa,_0x2f6199,_0x3b0520){const _0x29ce31={_0x1a1f08:0x83,_0x302517:0x83,_0x377bf4:0xa3},_0xa26d6=_0x3f18,_0x365559={};_0x365559[_0xa26d6(0x7c)]=function(_0x49f0c6,_0x306516){return _0x49f0c6===_0x306516;},_0x365559[_0xa26d6(_0x29ce31._0x1a1f08)]='get';const _0x4185eb=_0x365559;if(_0x4185eb['PQJyb'](_0x3b0520,undefined))_0x3b0520=_0x2f6199;var _0x3922d7=Object[_0xa26d6(0x84)](_0x3f3eaa,_0x2f6199);if(!_0x3922d7||(_0x4185eb[_0xa26d6(_0x29ce31._0x302517)]in _0x3922d7?!_0x3f3eaa[_0xa26d6(_0x29ce31._0x377bf4)]:_0x3922d7[_0xa26d6(0xa0)]||_0x3922d7['configurable'])){const _0x582256={};_0x582256['enumerable']=!![],_0x582256['get']=function(){return _0x3f3eaa[_0x2f6199];},_0x3922d7=_0x582256;}Object['defineProperty'](_0x564ccb,_0x3b0520,_0x3922d7);}:function(_0x4489a3,_0x3f963a,_0x531f21,_0x546e0b){const _0x2d18e9={_0x11220b:0x9a},_0x5a17d7=_0x3f18,_0x420366={};_0x420366[_0x5a17d7(0x9a)]=function(_0x54801c,_0x3f02b8){return _0x54801c===_0x3f02b8;};const _0x6d0f1b=_0x420366;if(_0x6d0f1b[_0x5a17d7(_0x2d18e9._0x11220b)](_0x546e0b,undefined))_0x546e0b=_0x531f21;_0x4489a3[_0x546e0b]=_0x3f963a[_0x531f21];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x4892f3,_0x4acec4){const _0x4fda6e={_0x1e5c27:0x9e,_0x458095:0x93},_0x4bbac8=_0x3f18,_0x4eb67a={};_0x4eb67a['enumerable']=!![],_0x4eb67a['value']=_0x4acec4,Object[_0x4bbac8(_0x4fda6e._0x1e5c27)](_0x4892f3,_0x4bbac8(_0x4fda6e._0x458095),_0x4eb67a);}:function(_0x4dc5de,_0x2adb66){const _0x3ef1b7={_0x4d079a:0x93},_0x5dab80=_0x3f18,_0x165bd7={};_0x165bd7['ahYbG']=_0x5dab80(_0x3ef1b7._0x4d079a);const _0x1e7f33=_0x165bd7;_0x4dc5de[_0x1e7f33['ahYbG']]=_0x2adb66;}),__importStar=this&&this['__importStar']||(function(){const _0x321f3a={_0x34e915:0xa5},_0x3139ac={_0x12aefa:0x7d},_0x5d701c={'QGDmD':function(_0x5ea906,_0x2bf4c2){return _0x5ea906<_0x2bf4c2;},'vekGd':'default','dnAkI':function(_0x3b7f93,_0x4f325c,_0x4f2494,_0x43a442){return _0x3b7f93(_0x4f325c,_0x4f2494,_0x43a442);},'dwNcm':function(_0xac250f,_0x30d780,_0x523ced){return _0xac250f(_0x30d780,_0x523ced);}};var _0x98ec17=function(_0x54c76c){const _0x1e2192={_0x2b509b:0x7f},_0x36d7fc=_0x3f18;return _0x98ec17=Object[_0x36d7fc(_0x3139ac._0x12aefa)]||function(_0x228822){const _0x905bcc=_0x36d7fc;var _0x49cce5=[];for(var _0x2bc4d0 in _0x228822)if(Object[_0x905bcc(_0x1e2192._0x2b509b)]['hasOwnProperty']['call'](_0x228822,_0x2bc4d0))_0x49cce5[_0x49cce5['length']]=_0x2bc4d0;return _0x49cce5;},_0x98ec17(_0x54c76c);};return function(_0x178ce4){const _0x109d09=_0x3f18;if(_0x178ce4&&_0x178ce4['__esModule'])return _0x178ce4;var _0x40c872={};if(_0x178ce4!=null){for(var _0x3d0368=_0x98ec17(_0x178ce4),_0x6aa7f8=0x0;_0x5d701c[_0x109d09(0x91)](_0x6aa7f8,_0x3d0368['length']);_0x6aa7f8++)if(_0x3d0368[_0x6aa7f8]!==_0x5d701c[_0x109d09(0xa1)])_0x5d701c[_0x109d09(_0x321f3a._0x34e915)](__createBinding,_0x40c872,_0x178ce4,_0x3d0368[_0x6aa7f8]);}return _0x5d701c['dwNcm'](__setModuleDefault,_0x40c872,_0x178ce4),_0x40c872;};}());const _0x11662f={};_0x11662f['value']=!![],Object[_0x273bfc(0x9e)](exports,'__esModule',_0x11662f),exports[_0x273bfc(0x92)]=invalidatePageRank,exports['computePageRank']=computePageRank,exports['getFileRank']=getFileRank;const path=__importStar(require(_0x273bfc(0x8b)));let cachedResult=null;function invalidatePageRank(){cachedResult=null;}function computePageRank(_0x5e8444,_0x25596c){const _0x3b61eb={_0x3e1edc:0x9f,_0x7ba8c7:0xa8,_0x47dd42:0x7e,_0x181d5c:0xa7,_0x2f299c:0x98,_0x4f024a:0x90,_0x4b9cc2:0x9b,_0x3a4ac3:0x7b,_0x19ec3a:0xa4},_0x303374=_0x273bfc,_0x59e92d={};_0x59e92d['SkMvs']=function(_0x79350,_0x43b9bf){return _0x79350<_0x43b9bf;},_0x59e92d['kzaar']=function(_0x1be11e,_0x1f0fe6){return _0x1be11e===_0x1f0fe6;},_0x59e92d['SZkcw']=function(_0x9eca9e,_0x5c1f59){return _0x9eca9e!==_0x5c1f59;},_0x59e92d['ymUPL']=function(_0x172fc9,_0x1b4af5){return _0x172fc9<_0x1b4af5;},_0x59e92d['dbySk']=function(_0x1f7b2b,_0x27ab1d){return _0x1f7b2b-_0x27ab1d;},_0x59e92d[_0x303374(0x98)]=function(_0x28d3a0,_0x45a969){return _0x28d3a0/_0x45a969;},_0x59e92d['fQRMX']=function(_0x1f4ddb,_0x8c7173){return _0x1f4ddb*_0x8c7173;},_0x59e92d['oKSjO']=function(_0x2e3fb7,_0x2ae2dd){return _0x2e3fb7+_0x2ae2dd;},_0x59e92d['mSJgJ']=function(_0x3afbab,_0x367afe){return _0x3afbab<_0x367afe;},_0x59e92d[_0x303374(0x89)]=function(_0x5727fb,_0x596d17){return _0x5727fb-_0x596d17;},_0x59e92d['bLUEB']=function(_0x60c40a,_0x109808){return _0x60c40a>_0x109808;},_0x59e92d[_0x303374(_0x3b61eb._0x3e1edc)]=function(_0x149a89,_0x2b31b4){return _0x149a89<_0x2b31b4;};const _0x1fd0ec=_0x59e92d;if(cachedResult)return cachedResult;const _0xb238b4=_0x25596c?.['dampingFactor']??0.85,_0x5d3cae=_0x25596c?.['maxIterations']??0x64,_0x483c71=_0x25596c?.[_0x303374(0x96)]??0.000001,_0x38900d=[..._0x5e8444['files']],_0x2e9031=_0x38900d[_0x303374(_0x3b61eb._0x7ba8c7)];if(_0x2e9031===0x0){const _0x558586={'scores':new Map(),'ranked':[],'iterations':0x0,'computedAt':Date['now']()};return cachedResult=_0x558586,_0x558586;}const _0x390fc7=new Map();for(let _0x3254d2=0x0;_0x1fd0ec['SkMvs'](_0x3254d2,_0x2e9031);_0x3254d2++){_0x390fc7['set'](_0x38900d[_0x3254d2],_0x3254d2);}const _0x397e60=new Float64Array(_0x2e9031);for(let _0x38a985=0x0;_0x38a985<_0x2e9031;_0x38a985++){const _0x4c2556=_0x5e8444[_0x303374(_0x3b61eb._0x47dd42)][_0x303374(0xa2)](_0x38900d[_0x38a985]);_0x397e60[_0x38a985]=_0x4c2556?_0x4c2556['length']:0x0;}const _0x1fe797=[];for(let _0x23f2d7=0x0;_0x23f2d7<_0x2e9031;_0x23f2d7++){_0x1fd0ec['kzaar'](_0x397e60[_0x23f2d7],0x0)&&_0x1fe797['push'](_0x23f2d7);}const _0x4f7d6b=new Array(_0x2e9031);for(let _0x37e820=0x0;_0x37e820<_0x2e9031;_0x37e820++){_0x4f7d6b[_0x37e820]=[];}for(const [_0x57469d,_0x3fc86a]of _0x5e8444['reverse']){const _0x957549=_0x390fc7['get'](_0x57469d);if(_0x957549===undefined)continue;for(const _0x1c660a of _0x3fc86a){const _0x49f4b5=_0x390fc7['get'](_0x1c660a);_0x1fd0ec['SZkcw'](_0x49f4b5,undefined)&&_0x4f7d6b[_0x957549]['push'](_0x49f4b5);}}let _0x2fabf2=new Float64Array(_0x2e9031);const _0x16103f=0x1/_0x2e9031;for(let _0x157e65=0x0;_0x1fd0ec['ymUPL'](_0x157e65,_0x2e9031);_0x157e65++){_0x2fabf2[_0x157e65]=_0x16103f;}let _0x3136c6=0x0;const _0x30fc49=_0x1fd0ec[_0x303374(0x88)](0x1,_0xb238b4)/_0x2e9031;for(let _0x40691f=0x0;_0x1fd0ec[_0x303374(_0x3b61eb._0x181d5c)](_0x40691f,_0x5d3cae);_0x40691f++){_0x3136c6=_0x40691f+0x1;let _0x3fffdc=0x0;for(const _0x54e0e4 of _0x1fe797){_0x3fffdc+=_0x2fabf2[_0x54e0e4];}const _0x336287=_0x1fd0ec[_0x303374(0x98)](_0x1fd0ec['fQRMX'](_0xb238b4,_0x3fffdc),_0x2e9031),_0x3577e5=new Float64Array(_0x2e9031);for(let _0x52203e=0x0;_0x52203e<_0x2e9031;_0x52203e++){let _0x1335d8=0x0;for(const _0xd2660b of _0x4f7d6b[_0x52203e]){_0x1335d8+=_0x1fd0ec[_0x303374(_0x3b61eb._0x2f299c)](_0x2fabf2[_0xd2660b],_0x397e60[_0xd2660b]);}_0x3577e5[_0x52203e]=_0x1fd0ec['oKSjO'](_0x30fc49+_0x336287,_0xb238b4*_0x1335d8);}let _0x47de14=0x0;for(let _0x41f471=0x0;_0x1fd0ec['mSJgJ'](_0x41f471,_0x2e9031);_0x41f471++){const _0x543466=Math['abs'](_0x1fd0ec[_0x303374(0x89)](_0x3577e5[_0x41f471],_0x2fabf2[_0x41f471]));if(_0x1fd0ec[_0x303374(0x8d)](_0x543466,_0x47de14))_0x47de14=_0x543466;}_0x2fabf2=_0x3577e5;if(_0x1fd0ec['INqfI'](_0x47de14,_0x483c71))break;}const _0x3ca2fb=new Map();for(let _0x4de007=0x0;_0x4de007<_0x2e9031;_0x4de007++){_0x3ca2fb['set'](_0x38900d[_0x4de007],_0x2fabf2[_0x4de007]);}const _0x20f5df=[];for(let _0x1a91d5=0x0;_0x1fd0ec[_0x303374(0x86)](_0x1a91d5,_0x2e9031);_0x1a91d5++){const _0x114d43={};_0x114d43['idx']=_0x1a91d5,_0x114d43['score']=_0x2fabf2[_0x1a91d5],_0x20f5df[_0x303374(_0x3b61eb._0x4f024a)](_0x114d43);}_0x20f5df['sort']((_0xb53ce2,_0x162184)=>_0x162184['score']-_0xb53ce2['score']);const _0x2d6b8c=_0x20f5df[_0x303374(_0x3b61eb._0x4b9cc2)]((_0x4b32ad,_0x17284f)=>({'filePath':_0x38900d[_0x4b32ad[_0x303374(0x9d)]],'relativePath':path['relative'](_0x5e8444['sourceDir'],_0x38900d[_0x4b32ad[_0x303374(0x9d)]])['replace'](/\\/g,'/'),'score':_0x4b32ad['score'],'rank':_0x17284f+0x1,'percentile':Math['round']((_0x2e9031-0x1-_0x17284f)/Math['max'](0x1,_0x2e9031-0x1)*0x64)})),_0x4accd9={'scores':_0x3ca2fb,'ranked':_0x2d6b8c,'iterations':_0x3136c6,'computedAt':Date['now']()};return cachedResult=_0x4accd9,console['error'](_0x303374(_0x3b61eb._0x3a4ac3)+_0x2e9031+_0x303374(_0x3b61eb._0x19ec3a)+_0x3136c6+_0x303374(0xa6)),_0x4accd9;}function getFileRank(_0x14a222,_0x4b6675){const _0x57011e={_0x20bd25:0x94},_0x3268c8=_0x273bfc,_0xdc7bdf={};_0xdc7bdf['adMfD']=function(_0x3ec728,_0x904eff){return _0x3ec728===_0x904eff;},_0xdc7bdf[_0x3268c8(_0x57011e._0x20bd25)]=function(_0x3e0013,_0x2bd7da){return _0x3e0013||_0x2bd7da;};const _0x12acd1=_0xdc7bdf,_0x44d249=_0x4b6675[_0x3268c8(0x97)]['get'](_0x14a222);if(_0x12acd1[_0x3268c8(0x8e)](_0x44d249,undefined))return null;const _0x52e0b9=_0x4b6675['ranked'][_0x3268c8(0x85)](_0x193f9c=>_0x193f9c['filePath']===_0x14a222);return _0x12acd1[_0x3268c8(_0x57011e._0x20bd25)](_0x52e0b9,null);}function _0x2887(){const _0x4d9fc4=['mJKWnde1m0LKqLfIsa','Cgf0Aa','mZbowKvMtfK','yKXvrui','ywrnzKq','mZa4vhPIvMH2','ChvZAa','uuDeBuq','Aw52ywXPzgf0zvbHz2vsyw5R','zgvMyxvSDa','Au15tLa','mJiZmty1CKDQDxni','Dg9SzxjHBMnL','C2nVCMvZ','qKjiDeO','mJuZmJLyA05RAfq','BgrUywO','BwfW','mteZmJmZoffUt1z0AW','Awr4','zgvMAw5LuhjVCgvYDhK','su5XzKK','D3jPDgfIBgu','DMvRr2q','z2v0','x19LC01VzhvSzq','igzPBgvZigLUia','zg5bA0K','igL0zxjHDgLVBNm','Ew1vueW','BgvUz3rO','w3n5A2u6CgfNzxjHBMTDienVBxb1DgvKifbHz2vsyw5RigzVCIa','uffkEwi','z2v0t3DUuhjVCgvYDhLoyw1LCW','zM9YD2fYza','ChjVDg90ExbL','ntqXmtrsseLJwhu','ote3odeWv2rlDfHf','mtHNwLbgEe0','rNPpD2u','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','zMLUza','u2TnDNm','mJq5otaWmgvwCeHLzq','zgj5u2S','AeHLuge'];_0x2887=function(){return _0x4d9fc4;};return _0x2887();}
@@ -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 _0x475ea7=_0x560d;(function(_0x4dcc62,_0x967959){const _0x59135a={_0x194729:0x96,_0x5d3fb0:0x101,_0x1e8289:0x8e},_0x12c00e=_0x560d,_0x3db09f=_0x4dcc62();while(!![]){try{const _0x8dd26d=parseInt(_0x12c00e(0xbf))/0x1*(-parseInt(_0x12c00e(0xb8))/0x2)+-parseInt(_0x12c00e(_0x59135a._0x194729))/0x3+parseInt(_0x12c00e(_0x59135a._0x5d3fb0))/0x4+-parseInt(_0x12c00e(0xc7))/0x5+-parseInt(_0x12c00e(0x99))/0x6*(parseInt(_0x12c00e(0x10a))/0x7)+parseInt(_0x12c00e(0xeb))/0x8*(parseInt(_0x12c00e(0xcb))/0x9)+parseInt(_0x12c00e(_0x59135a._0x1e8289))/0xa*(parseInt(_0x12c00e(0xb3))/0xb);if(_0x8dd26d===_0x967959)break;else _0x3db09f['push'](_0x3db09f['shift']());}catch(_0x37e48f){_0x3db09f['push'](_0x3db09f['shift']());}}}(_0x87c4,0x3b8d0));var __createBinding=this&&this['__createBinding']||(Object[_0x475ea7(0xad)]?function(_0x25665c,_0x4c0ac8,_0x2923cc,_0x138566){const _0x1fdab3={_0x1270ab:0xe8,_0x3ed129:0xec,_0x5b2af6:0x9e},_0x1973a5=_0x475ea7,_0x1e983e={};_0x1e983e['kUjYn']=function(_0x32f808,_0x5706d3){return _0x32f808 in _0x5706d3;},_0x1e983e[_0x1973a5(0xc2)]=_0x1973a5(_0x1fdab3._0x1270ab);const _0xa3441=_0x1e983e;if(_0x138566===undefined)_0x138566=_0x2923cc;var _0x3089b8=Object[_0x1973a5(_0x1fdab3._0x3ed129)](_0x4c0ac8,_0x2923cc);if(!_0x3089b8||(_0xa3441['kUjYn'](_0xa3441['jNlst'],_0x3089b8)?!_0x4c0ac8[_0x1973a5(0xd4)]:_0x3089b8[_0x1973a5(_0x1fdab3._0x5b2af6)]||_0x3089b8['configurable'])){const _0x16ec9f={};_0x16ec9f[_0x1973a5(0xa2)]=!![],_0x16ec9f['get']=function(){return _0x4c0ac8[_0x2923cc];},_0x3089b8=_0x16ec9f;}Object['defineProperty'](_0x25665c,_0x138566,_0x3089b8);}:function(_0x398c91,_0x18b547,_0x4ac225,_0x2ce929){const _0x3e9fc0={};_0x3e9fc0['qnZIS']=function(_0x5ee572,_0x2eb13a){return _0x5ee572===_0x2eb13a;};const _0x3e7559=_0x3e9fc0;if(_0x3e7559['qnZIS'](_0x2ce929,undefined))_0x2ce929=_0x4ac225;_0x398c91[_0x2ce929]=_0x18b547[_0x4ac225];}),__setModuleDefault=this&&this[_0x475ea7(0xdd)]||(Object[_0x475ea7(0xad)]?function(_0x2dbe9a,_0x579c95){const _0x588299={_0x373ab1:0xee},_0x1f61e0=_0x475ea7,_0x2bbc90={};_0x2bbc90['enumerable']=!![],_0x2bbc90[_0x1f61e0(_0x588299._0x373ab1)]=_0x579c95,Object['defineProperty'](_0x2dbe9a,'default',_0x2bbc90);}:function(_0xc5ab3f,_0x350067){const _0x1e8607={_0x5c04f7:0x108},_0x18799a=_0x475ea7,_0x43f329={};_0x43f329['EggGb']=_0x18799a(_0x1e8607._0x5c04f7);const _0x5f3377=_0x43f329;_0xc5ab3f[_0x5f3377[_0x18799a(0xb4)]]=_0x350067;}),__importStar=this&&this[_0x475ea7(0xcc)]||(function(){const _0x518535={_0x5ba9e5:0xcd,_0x43db63:0xed},_0x18a5c9=_0x475ea7,_0xa61a6d={'sUhsg':_0x18a5c9(0xaf),'mMmso':function(_0x19b0cf,_0x51fcdd){return _0x19b0cf!=_0x51fcdd;},'wBrsQ':function(_0x439df8,_0x3cf91b){return _0x439df8(_0x3cf91b);},'QeDOo':function(_0x54c5a6,_0x50fd97){return _0x54c5a6<_0x50fd97;},'eLCXz':_0x18a5c9(0x108),'mVuiK':function(_0x6df9ad,_0x31314d,_0x35b261,_0x113d9f){return _0x6df9ad(_0x31314d,_0x35b261,_0x113d9f);}};var _0x5edd21=function(_0x302c3e){const _0x49f4ae={_0x2bb0c8:0xb5,_0x1d7757:0x9c,_0x2fd942:0xb1},_0x34c02c=_0x18a5c9;return _0x5edd21=Object[_0x34c02c(0xc9)]||function(_0x51d672){const _0x53b0fe=_0x34c02c;var _0x25b882=[];for(var _0x551723 in _0x51d672)if(Object[_0x53b0fe(0x94)][_0x53b0fe(_0x49f4ae._0x2bb0c8)][_0x53b0fe(_0x49f4ae._0x1d7757)](_0x51d672,_0x551723))_0x25b882[_0x25b882[_0x53b0fe(_0x49f4ae._0x2fd942)]]=_0x551723;return _0x25b882;},_0x5edd21(_0x302c3e);};return function(_0xd13f96){const _0x5a3ba1=_0x18a5c9,_0xdea82a=_0xa61a6d[_0x5a3ba1(0xab)]['split']('|');let _0x3c7e58=0x0;while(!![]){switch(_0xdea82a[_0x3c7e58++]){case'0':var _0x3fdebc={};continue;case'1':return _0x3fdebc;case'2':if(_0xd13f96&&_0xd13f96['__esModule'])return _0xd13f96;continue;case'3':if(_0xa61a6d[_0x5a3ba1(_0x518535._0x5ba9e5)](_0xd13f96,null)){for(var _0x55a955=_0xa61a6d[_0x5a3ba1(_0x518535._0x43db63)](_0x5edd21,_0xd13f96),_0xb1a350=0x0;_0xa61a6d['QeDOo'](_0xb1a350,_0x55a955[_0x5a3ba1(0xb1)]);_0xb1a350++)if(_0x55a955[_0xb1a350]!==_0xa61a6d['eLCXz'])_0xa61a6d['mVuiK'](__createBinding,_0x3fdebc,_0xd13f96,_0x55a955[_0xb1a350]);}continue;case'4':__setModuleDefault(_0x3fdebc,_0xd13f96);continue;}break;}};}());const _0x2e90a1={};_0x2e90a1['value']=!![],Object[_0x475ea7(0xae)](exports,_0x475ea7(0xd4),_0x2e90a1),exports['RISK_WEIGHTS']=void 0x0,exports[_0x475ea7(0xfd)]=invalidateProjectMetrics,exports[_0x475ea7(0x10c)]=computeCouplingMetrics,exports['computeInstability']=computeInstability,exports[_0x475ea7(0xf9)]=computeComplexity,exports['computeCascadeDepth']=computeCascadeDepth,exports[_0x475ea7(0xbe)]=classifyCompositeRisk,exports[_0x475ea7(0xc3)]=computeRiskScore,exports['computeProjectMetrics']=computeProjectMetrics,exports['getRiskScore']=getRiskScore,exports['formatRiskScore']=formatRiskScore;const fs=__importStar(require('fs')),plugin_1=require('../languages/plugin'),pagerank_1=require('./pagerank'),_0x59ed6a={};_0x59ed6a[_0x475ea7(0xc4)]=0.3,_0x59ed6a[_0x475ea7(0xda)]=0.2,_0x59ed6a['complexity']=0.2,_0x59ed6a[_0x475ea7(0xc6)]=0.15,_0x59ed6a['pageRank']=0.15,exports['RISK_WEIGHTS']=_0x59ed6a;const _0x7ea1a2={};_0x7ea1a2[_0x475ea7(0xd2)]=0.8,_0x7ea1a2['HIGH']=0.6,_0x7ea1a2['MEDIUM']=0.4,_0x7ea1a2[_0x475ea7(0x111)]=0.2;const RISK_THRESHOLDS=_0x7ea1a2;let cachedProjectMetrics=null,cachedProjectRoot=null;function invalidateProjectMetrics(){cachedProjectMetrics=null,cachedProjectRoot=null;}function computeCouplingMetrics(_0x5ec234,_0x990d0d){const _0x5146da={_0x1789ce:0xd8,_0x3764d1:0xa7,_0x559142:0xe7},_0xd1cf1b=_0x475ea7,_0x5a7cb1=(_0x990d0d[_0xd1cf1b(0xb0)]['get'](_0x5ec234)||[])['length'],_0x3ae153=(_0x990d0d[_0xd1cf1b(_0x5146da._0x1789ce)]['get'](_0x5ec234)||[])['length'],_0x5866b5=computeTransitiveFanIn(_0x5ec234,_0x990d0d),_0x4159e6={};return _0x4159e6['fanIn']=_0x5a7cb1,_0x4159e6[_0xd1cf1b(_0x5146da._0x3764d1)]=_0x3ae153,_0x4159e6[_0xd1cf1b(_0x5146da._0x559142)]=_0x5866b5,_0x4159e6;}function computeTransitiveFanIn(_0x1a394c,_0x31ae40){const _0x32e654={_0x1764df:0xb0,_0x344d7a:0xb0,_0x32dee2:0xe8,_0x474437:0x10e,_0x4e6e49:0x97},_0x22de48=_0x475ea7,_0x4754e2={};_0x4754e2['FuYRh']=function(_0x41ffbe,_0x59cf74){return _0x41ffbe!==_0x59cf74;};const _0x2d08e1=_0x4754e2,_0x5dda29=new Set(),_0x463284=[],_0x2215bb=_0x31ae40[_0x22de48(_0x32e654._0x1764df)]['get'](_0x1a394c)||[];for(const _0x1b8c06 of _0x2215bb){!_0x5dda29['has'](_0x1b8c06)&&(_0x5dda29['add'](_0x1b8c06),_0x463284['push'](_0x1b8c06));}while(_0x463284['length']>0x0){const _0x47d171=_0x463284[_0x22de48(0xc1)](),_0xaa0ed6=_0x31ae40[_0x22de48(_0x32e654._0x344d7a)][_0x22de48(_0x32e654._0x32dee2)](_0x47d171)||[];for(const _0x1c9137 of _0xaa0ed6){!_0x5dda29[_0x22de48(_0x32e654._0x474437)](_0x1c9137)&&_0x2d08e1['FuYRh'](_0x1c9137,_0x1a394c)&&(_0x5dda29[_0x22de48(_0x32e654._0x4e6e49)](_0x1c9137),_0x463284['push'](_0x1c9137));}}return _0x5dda29['size'];}function computeInstability(_0xf3e7f2,_0x58efd4){const _0x294ffa={_0xa2855c:0xa5,_0x5b7d32:0xfb},_0x4be7ea=_0x475ea7,_0x2c9508={};_0x2c9508['cfFgC']=function(_0xa1dca8,_0x3077a2){return _0xa1dca8+_0x3077a2;},_0x2c9508[_0x4be7ea(_0x294ffa._0xa2855c)]=function(_0x37ff5f,_0x43ce7b){return _0x37ff5f/_0x43ce7b;};const _0x456103=_0x2c9508;if(_0x456103[_0x4be7ea(_0x294ffa._0x5b7d32)](_0xf3e7f2,_0x58efd4)===0x0)return 0.5;return _0x456103['ioPet'](_0x58efd4,_0xf3e7f2+_0x58efd4);}const _0x35f13e={};_0x35f13e['typescript']=[/\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],_0x35f13e[_0x475ea7(0x9d)]=[],_0x35f13e['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],_0x35f13e['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],_0x35f13e['go']=[/\bif\s+/g,/\bfor\s+/g,/\bselect\s*\{/g,/\bcase\s+/g,/&&/g,/\|\|/g],_0x35f13e[_0x475ea7(0xef)]=[/\bif\s+/g,/\belse\s+if\s+/g,/\bfor\s+/g,/\bwhile\s+/g,/\bloop\s*\{/g,/\bmatch\s+/g,/=>/g,/&&/g,/\|\|/g],_0x35f13e['java']=[/\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],_0x35f13e['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],_0x35f13e[_0x475ea7(0xe3)]=[/\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=_0x35f13e;COMPLEXITY_PATTERNS[_0x475ea7(0x9d)]=COMPLEXITY_PATTERNS[_0x475ea7(0xe5)];const _0x4a57a2={};_0x4a57a2[_0x475ea7(0xe5)]=_0x475ea7(0xe5),_0x4a57a2[_0x475ea7(0xd1)]='dart',_0x4a57a2[_0x475ea7(0xf5)]='python',_0x4a57a2['go']='go',_0x4a57a2['rust']='rust',_0x4a57a2['java']=_0x475ea7(0xfe),_0x4a57a2[_0x475ea7(0x9a)]=_0x475ea7(0x9a),_0x4a57a2['ruby']=_0x475ea7(0xe3);const LANGUAGE_ID_MAP=_0x4a57a2;function detectLanguageForFile(_0x2c107f){const _0x7b172c={_0x2f8184:0xd3,_0x1b34a7:0x113,_0x2ed7bc:0x102,_0x5377b4:0x9f,_0x14da71:0xd1,_0xdd7588:0x9a,_0x1e7922:0x113},_0x6ea2eb=_0x475ea7,_0x20cf10={};_0x20cf10[_0x6ea2eb(0x102)]='typescript',_0x20cf10['JJTSh']='javascript',_0x20cf10[_0x6ea2eb(_0x7b172c._0x2f8184)]='dart',_0x20cf10['vJcrh']=_0x6ea2eb(0xef),_0x20cf10[_0x6ea2eb(_0x7b172c._0x1b34a7)]='cpp';const _0x27cd8f=_0x20cf10,_0x3efec6=(0x0,plugin_1['getPluginForFile'])(_0x2c107f);if(_0x3efec6)return LANGUAGE_ID_MAP[_0x3efec6['id']]||_0x27cd8f[_0x6ea2eb(_0x7b172c._0x2ed7bc)];const _0x166246=_0x2c107f['split']('.')[_0x6ea2eb(0xa6)]()?.[_0x6ea2eb(_0x7b172c._0x5377b4)]()||'',_0x2fa329={};_0x2fa329['ts']='typescript',_0x2fa329['tsx']=_0x27cd8f['bmeIP'],_0x2fa329['js']=_0x27cd8f['JJTSh'],_0x2fa329[_0x6ea2eb(0xde)]=_0x27cd8f[_0x6ea2eb(0xf7)],_0x2fa329[_0x6ea2eb(_0x7b172c._0x14da71)]=_0x27cd8f['PTygz'],_0x2fa329['py']=_0x6ea2eb(0xf5),_0x2fa329['go']='go',_0x2fa329['rs']=_0x27cd8f['vJcrh'],_0x2fa329[_0x6ea2eb(0xfe)]='java',_0x2fa329[_0x6ea2eb(_0x7b172c._0xdd7588)]=_0x27cd8f['utczA'],_0x2fa329['cc']=_0x27cd8f[_0x6ea2eb(0x113)],_0x2fa329['cxx']=_0x27cd8f[_0x6ea2eb(0x113)],_0x2fa329['c']=_0x27cd8f[_0x6ea2eb(_0x7b172c._0x1e7922)],_0x2fa329['h']=_0x6ea2eb(0x9a),_0x2fa329['hpp']=_0x27cd8f['utczA'],_0x2fa329['rb']='ruby';const _0x12db5a=_0x2fa329;return _0x12db5a[_0x166246]||_0x27cd8f[_0x6ea2eb(0x102)];}function stripCommentsAndStrings(_0x2a715c){const _0x216c1f={_0x2c8a19:0xe9,_0xd611be:0xe9},_0x21e849=_0x475ea7;let _0xbab4b7=_0x2a715c['replace'](/\/\*[\s\S]*?\*\//g,'');return _0xbab4b7=_0xbab4b7['replace'](/\/\/.*$/gm,''),_0xbab4b7=_0xbab4b7[_0x21e849(_0x216c1f._0x2c8a19)](/#.*$/gm,''),_0xbab4b7=_0xbab4b7['replace'](/"(?:[^"\\]|\\.)*"/g,'\x22\x22'),_0xbab4b7=_0xbab4b7['replace'](/'(?:[^'\\]|\\.)*'/g,'\x27\x27'),_0xbab4b7=_0xbab4b7[_0x21e849(_0x216c1f._0xd611be)](/`(?:[^`\\]|\\.)*`/g,'``'),_0xbab4b7;}function _0x87c4(){const _0x4d1ae9=['Bu1TC28','BM9YBwfSAxPLzenVBxbSzxHPDhK','BwLU','CMLZA0XLDMvS','zgfYDa','q1jjveLdquW','ufr5z3O','x19LC01VzhvSzq','AM9PBG','uMn1C2q','sfv6suG','zM9YD2fYza','r2fTAum','C3rHyMLSAxr5','DMvYEsb1BNn0ywjSzsaTlsbZywzLihrVignOyw5Nzq','zgvWDgG','x19ZzxrnB2r1BgvezwzHDwX0','ANn4','lcbMyw4TB3v0oIa','EvvivfO','tfnAqwe','AxbmCwK','CNvIEq','w3n5A2u6C2nVCMLUz10GuhjVAMvJDcbTzxrYAwnZignVBxb1DgvKigzVCIa','DhLWzxnJCMLWDa','icbgyw4TAw46ia','DhjHBNnPDgL2zuzHBKLU','z2v0','CMvWBgfJzq','Cu9nrLO','mtzluK5Ss2G','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','D0jYC1e','DMfSDwu','CNvZDa','tMzRtLm','C2v0','BfvTtw4','kg1HEezHBKLUpq','ChvZAa','ChL0Ag9U','lcbTyxHdyxnJywrLrgvWDgG9','sKPuu2G','q3DREMq','y29TChv0zunVBxbSzxHPDhK','C3rHyMXLic0TigjLignHDxrPB3vZ','y2zgz0m','y291CgXPBMC','Aw52ywXPzgf0zvbYB2PLy3rnzxrYAwnZ','AMf2yq','vwPru2S','EuT5A3G','mti2mdCWme5KsKP4tG','yM1Lsva','uKLts19xruLhsfrt','ywPoEMu','Bwf4q29TCgXLEgL0Eq','CgvYy2vUDgLSzq','DgGGCgvYy2vUDgLSzsK','zgvMyxvSDa','EK9NB28','nJqXnZm5BhPszxDO','A1nIu2C','y29TChv0zunVDxbSAw5Ntwv0CMLJCW','Bwf4q29TCgXLEgL0Et0','AgfZ','zMLSzxm','ChjVAMvJDfjVB3q','te9x','y29UzgvUC2vK','DxrJEKe','icHUB3jTywXPEMvKoIa','CgfNzvjHBMS','y29TCg9ZAxrL','q0fjyNm','zhjMweC','mZGZmgfYtLHeBW','Dw5ZDgfIBguGls0GCMvSyxrPDMvSEsbZywzL','z25hEe0','zMLSzu1LDhjPy3m','tLrVD2q','svPss2e','ChjVDg90ExbL','sxPls0K','otK4nJy0tNjmCwfN','ywrK','yLzHr3G','mtjQvMTPr0m','y3bW','rxLKDLq','y2fSBa','AMf2yxnJCMLWDa','D3jPDgfIBgu','Dg9mB3DLCKnHC2u','Awr4','Dg9gAxHLza','zw51BwvYywjSzq','tw5wwg0','rMLqA2q','Aw9qzxq','Cg9W','zMfUt3v0','rhnxwKi','uMLZAYbty29YztOG','swnItfu','C1vOC2C','CM91BMq','y3jLyxrL','zgvMAw5LuhjVCgvYDhK','mNWWFdn8nhWX','CMv2zxjZzq','BgvUz3rO','icbdyxnJywrLigrLChrOoIa','mteWmZnTrMHis3a','rwDNr2i','AgfZt3DUuhjVCgvYDhK','DMvYEsbZDgfIBguGls0GzgfUz2vYB3vZihrVignOyw5Nzq','CgfNzvjHBMTqzxjJzw50AwXL','mJCWmLDmAfLqvG','Aw5ZDgfIAwXPDhK','AgfTBM4','CKrjDxi','y29TCgXLEgL0Eq','tuvesvvn','y2XHC3nPzNLdB21WB3nPDgvsAxnR','mJy5venxrfLL','zxjYB3i','C2HPzNq','AK5SC3q','y29TChv0zvjPC2Tty29Yzq','zMfUsw4','zurPtuu','y2fZy2fKzurLChrO','mJiWmtK1BuHjrfz2','tvnptei','z2v0t3DUuhjVCgvYDhLoyw1LCW','Bwf4','mJeWnZmZmNzfAwvLDG','x19PBxbVCNrtDgfY'];_0x87c4=function(){return _0x4d1ae9;};return _0x87c4();}function computeComplexity(_0x594d33,_0x322bb0){const _0x494782={_0x2a655e:0xe5,_0xa4b542:0xb1},_0x46d8da=_0x475ea7,_0x4753cd=COMPLEXITY_PATTERNS[_0x322bb0]||COMPLEXITY_PATTERNS[_0x46d8da(_0x494782._0x2a655e)],_0x52bafe=stripCommentsAndStrings(_0x594d33);let _0x2bfd6d=0x0;for(const _0x5348d4 of _0x4753cd){_0x5348d4['lastIndex']=0x0;const _0xc8e1bb=_0x52bafe['match'](_0x5348d4);_0xc8e1bb&&(_0x2bfd6d+=_0xc8e1bb[_0x46d8da(_0x494782._0xa4b542)]);}return _0x2bfd6d;}function computeCascadeDepth(_0x53af05,_0x490d83){const _0x105e07={_0x2e9184:0xb1,_0x4d9bcd:0xff,_0x12565e:0xf1},_0x4538b8=_0x475ea7,_0xae1bc8={'NfkNS':function(_0x4079e6,_0x29bdd4,_0x500837){return _0x4079e6(_0x29bdd4,_0x500837);},'NPste':function(_0x3dc312,_0x246906){return _0x3dc312>_0x246906;},'UjQSk':function(_0x292c7f,_0x3f1450){return _0x292c7f+_0x3f1450;}},_0x2a34bd=_0x490d83['scc'];if(!_0x2a34bd)return _0xae1bc8[_0x4538b8(0xf0)](computeRawCascadeDepth,_0x53af05,_0x490d83);const _0x1a58e7=_0x2a34bd['nodeToComponent'][_0x4538b8(0xe8)](_0x53af05);if(_0x1a58e7===undefined)return 0x0;const _0x15e165=new Map();_0x15e165[_0x4538b8(0xf1)](_0x1a58e7,0x0);const _0x2e2aa5={};_0x2e2aa5['idx']=_0x1a58e7,_0x2e2aa5[_0x4538b8(0xdc)]=0x0;const _0x46f7d9=[_0x2e2aa5];let _0x50712d=0x0;while(_0xae1bc8['NPste'](_0x46f7d9[_0x4538b8(_0x105e07._0x2e9184)],0x0)){const {idx:_0x50b79a,depth:_0x45a1b6}=_0x46f7d9[_0x4538b8(0xc1)](),_0x47e17d=_0x2a34bd[_0x4538b8(0x112)]['reverse']['get'](_0x50b79a)||[];for(const _0x22e16f of _0x47e17d){if(!_0x15e165[_0x4538b8(0x10e)](_0x22e16f)){const _0xcdf963=_0xae1bc8[_0x4538b8(_0x105e07._0x4d9bcd)](_0x45a1b6,0x1);_0x15e165[_0x4538b8(_0x105e07._0x12565e)](_0x22e16f,_0xcdf963),_0x50712d=Math['max'](_0x50712d,_0xcdf963);const _0x39f84e={};_0x39f84e[_0x4538b8(0xa0)]=_0x22e16f,_0x39f84e['depth']=_0xcdf963,_0x46f7d9['push'](_0x39f84e);}}}return _0x50712d;}function computeRawCascadeDepth(_0x375afc,_0x4fa225){const _0x441d2f={_0x3bef6b:0x97,_0x4668d6:0x9b,_0x595a6d:0xb1,_0x411253:0xb1},_0x5ca2c4=_0x475ea7,_0x508524={};_0x508524[_0x5ca2c4(0x9b)]=function(_0x388172,_0x49901a){return _0x388172>_0x49901a;};const _0x14e0b7=_0x508524,_0x398b12=new Set();_0x398b12[_0x5ca2c4(_0x441d2f._0x3bef6b)](_0x375afc);let _0x343419=[_0x375afc],_0x3a1fe1=0x0;while(_0x14e0b7[_0x5ca2c4(_0x441d2f._0x4668d6)](_0x343419[_0x5ca2c4(_0x441d2f._0x595a6d)],0x0)){const _0x476a3f=[];for(const _0x3daa56 of _0x343419){const _0x1f8b2d=_0x4fa225['reverse']['get'](_0x3daa56)||[];for(const _0xc6c965 of _0x1f8b2d){!_0x398b12['has'](_0xc6c965)&&(_0x398b12[_0x5ca2c4(0x97)](_0xc6c965),_0x476a3f[_0x5ca2c4(0xf4)](_0xc6c965));}}_0x14e0b7['EydvT'](_0x476a3f[_0x5ca2c4(_0x441d2f._0x411253)],0x0)&&_0x3a1fe1++,_0x343419=_0x476a3f;}return _0x3a1fe1;}function normalize(_0x4fdf34,_0x1b3276,_0x3e5a68){const _0x4d363d=_0x475ea7,_0x3c6082={};_0x3c6082[_0x4d363d(0xa3)]=function(_0x5c68a4,_0x201a38){return _0x5c68a4-_0x201a38;};const _0x319ed5=_0x3c6082;if(_0x3e5a68<=_0x1b3276)return 0x0;return Math['min'](0x1,Math['max'](0x0,(_0x4fdf34-_0x1b3276)/_0x319ed5['MnVXm'](_0x3e5a68,_0x1b3276)));}function classifyCompositeRisk(_0x204ff6){const _0x56a26f={_0x555cbc:0x8d,_0x4dbc2a:0xf8,_0x33f183:0x95,_0x350021:0x104,_0x426685:0xbd,_0x166f4d:0x111},_0x1a876b=_0x475ea7,_0x11fc0f={};_0x11fc0f[_0x1a876b(_0x56a26f._0x555cbc)]='CRITICAL',_0x11fc0f[_0x1a876b(_0x56a26f._0x4dbc2a)]=function(_0x1cffac,_0xcfc9fb){return _0x1cffac>=_0xcfc9fb;},_0x11fc0f[_0x1a876b(_0x56a26f._0x33f183)]=function(_0x43d9fe,_0xc392c6){return _0x43d9fe>=_0xc392c6;},_0x11fc0f[_0x1a876b(_0x56a26f._0x350021)]=function(_0x2861e0,_0x5328b1){return _0x2861e0>=_0x5328b1;},_0x11fc0f['HUzIH']='SAFE';const _0x7bd45e=_0x11fc0f;if(_0x204ff6>=RISK_THRESHOLDS['CRITICAL'])return _0x7bd45e[_0x1a876b(0x8d)];if(_0x7bd45e['Cwkzd'](_0x204ff6,RISK_THRESHOLDS['HIGH']))return'HIGH';if(_0x7bd45e['IzKKI'](_0x204ff6,RISK_THRESHOLDS[_0x1a876b(_0x56a26f._0x426685)]))return _0x1a876b(0xbd);if(_0x7bd45e['ajNze'](_0x204ff6,RISK_THRESHOLDS[_0x1a876b(_0x56a26f._0x166f4d)]))return _0x1a876b(_0x56a26f._0x166f4d);return _0x7bd45e[_0x1a876b(0xd7)];}function readFileContent(_0x35519a){const _0x472111={};_0x472111['WtlEs']='utf-8';const _0x110fb6=_0x472111;try{return fs['readFileSync'](_0x35519a,_0x110fb6['WtlEs']);}catch{return null;}}function computeRiskScore(_0x320a97,_0x158d75,_0x57bfd6,_0x3e4ec3){const _0x27c9e7={_0x54376b:0xa7,_0x24457f:0x106,_0x33f9cd:0xe1,_0xbe4f13:0xc6,_0xa31e10:0x93,_0x53318a:0x103,_0x3109be:0xc4,_0x17b846:0xbc,_0x4f42c8:0xcf,_0x2aaa94:0xac,_0x33ccab:0xf2,_0x18b29a:0x90},_0x2fd437=_0x475ea7,_0x23bc02={'NTowd':function(_0x28036e,_0x39973c,_0x15578){return _0x28036e(_0x39973c,_0x15578);},'ytEaB':function(_0x102d9a,_0x4b20d2,_0x20405e,_0x566426){return _0x102d9a(_0x4b20d2,_0x20405e,_0x566426);},'hamnn':function(_0x4a8aac,_0x3dbd5e,_0x3aff36,_0x468486){return _0x4a8aac(_0x3dbd5e,_0x3aff36,_0x468486);},'GamiC':function(_0x1e82e6,_0x48fd12){return _0x1e82e6+_0x48fd12;},'yUHTZ':function(_0x3c5f02,_0xbd8f75){return _0x3c5f02+_0xbd8f75;},'LSZAa':function(_0x45a412,_0x3de0c7){return _0x45a412*_0x3de0c7;},'qOMFZ':function(_0x58a231,_0x523100){return _0x58a231*_0x523100;},'IZRKa':function(_0x881e5f,_0xd6f013){return _0x881e5f*_0xd6f013;},'uPCOY':function(_0x11c4a5,_0x4b7f95){return _0x11c4a5+_0x4b7f95;},'nlRlg':function(_0x1e401f,_0x28fac7){return _0x1e401f+_0x28fac7;},'bznqb':function(_0x1cd94a,_0x348d9d){return _0x1cd94a-_0x348d9d;},'faDIA':function(_0x4472d2,_0x4287c3){return _0x4472d2*_0x4287c3;},'GwgNF':function(_0x574b24,_0x351863){return _0x574b24/_0x351863;},'lUmMn':function(_0x16c7c0,_0x726c30){return _0x16c7c0/_0x726c30;},'gnGxM':function(_0x19f1df,_0x4b6bed){return _0x19f1df(_0x4b6bed);}},_0x178c4d=computeCouplingMetrics(_0x320a97,_0x158d75),_0x2c1550=computeInstability(_0x178c4d['fanIn'],_0x178c4d[_0x2fd437(_0x27c9e7._0x54376b)]),_0x5f538f=_0x57bfd6??readFileContent(_0x320a97),_0x45f714=detectLanguageForFile(_0x320a97),_0x16c2fc=_0x5f538f?computeComplexity(_0x5f538f,_0x45f714):0x0,_0x563d72=_0x23bc02[_0x2fd437(0x92)](computeCascadeDepth,_0x320a97,_0x158d75);let _0x223215,_0xa4ce84,_0x158a23;_0x3e4ec3?(_0x223215=normalize(_0x178c4d['transitiveFanIn'],0x0,_0x3e4ec3['maxTransitiveFanIn']),_0xa4ce84=normalize(_0x16c2fc,0x0,_0x3e4ec3[_0x2fd437(0x105)]),_0x158a23=normalize(_0x563d72,0x0,_0x3e4ec3['maxCascadeDepth'])):(_0x223215=normalize(_0x178c4d[_0x2fd437(0xe7)],0x0,Math['max'](_0x178c4d[_0x2fd437(0xe7)],0x14)),_0xa4ce84=_0x23bc02['ytEaB'](normalize,_0x16c2fc,0x0,Math['max'](_0x16c2fc,0x32)),_0x158a23=_0x23bc02[_0x2fd437(0xba)](normalize,_0x563d72,0x0,Math['max'](_0x563d72,0x5)));let _0x283e07,_0x4db056,_0x1f9bc7=0x0,_0x5e8567=![];if(_0x158d75['pageRank']){const _0x50d702=(0x0,pagerank_1['getFileRank'])(_0x320a97,_0x158d75['pageRank']);_0x50d702&&(_0x283e07=_0x50d702['score'],_0x4db056=_0x50d702[_0x2fd437(_0x27c9e7._0x24457f)],_0x1f9bc7=_0x50d702[_0x2fd437(0x106)]/0x64,_0x5e8567=!![]);}let _0x17f383;if(_0x5e8567)_0x17f383=_0x23bc02[_0x2fd437(0xd9)](_0x23bc02[_0x2fd437(0xe0)](_0x23bc02['yUHTZ'](exports[_0x2fd437(0x103)]['fanIn']*_0x223215,exports['RISK_WEIGHTS']['stability']*(0x1-_0x2c1550))+_0x23bc02[_0x2fd437(_0x27c9e7._0x33f9cd)](exports['RISK_WEIGHTS'][_0x2fd437(0xbc)],_0xa4ce84),_0x23bc02['qOMFZ'](exports['RISK_WEIGHTS'][_0x2fd437(_0x27c9e7._0xbe4f13)],_0x158a23)),_0x23bc02[_0x2fd437(_0x27c9e7._0xa31e10)](exports[_0x2fd437(0x103)][_0x2fd437(0x115)],_0x1f9bc7));else{const _0x474b36=_0x23bc02['GamiC'](_0x23bc02['uPCOY'](exports[_0x2fd437(_0x27c9e7._0x53318a)][_0x2fd437(0xc4)],exports[_0x2fd437(0x103)][_0x2fd437(0xda)])+exports['RISK_WEIGHTS']['complexity'],exports[_0x2fd437(0x103)][_0x2fd437(0xc6)]);_0x17f383=_0x23bc02['nlRlg'](_0x23bc02[_0x2fd437(0xea)](exports['RISK_WEIGHTS'][_0x2fd437(_0x27c9e7._0x3109be)]/_0x474b36,_0x223215)+_0x23bc02[_0x2fd437(0x93)](exports['RISK_WEIGHTS'][_0x2fd437(0xda)]/_0x474b36,_0x23bc02['bznqb'](0x1,_0x2c1550))+exports['RISK_WEIGHTS'][_0x2fd437(_0x27c9e7._0x17b846)]/_0x474b36*_0xa4ce84,_0x23bc02['faDIA'](_0x23bc02['GwgNF'](exports[_0x2fd437(_0x27c9e7._0x53318a)][_0x2fd437(0xc6)],_0x474b36),_0x158a23));}const _0x15753b=Math[_0x2fd437(_0x27c9e7._0x4f42c8)](0x1,Math[_0x2fd437(0xca)](0x0,_0x17f383));return{'composite':Math[_0x2fd437(_0x27c9e7._0x2aaa94)](_0x15753b*0x64)/0x64,'fanIn':_0x178c4d['fanIn'],'fanOut':_0x178c4d['fanOut'],'transitiveFanIn':_0x178c4d['transitiveFanIn'],'instability':_0x23bc02['GwgNF'](Math[_0x2fd437(0xac)](_0x2c1550*0x64),0x64),'complexity':_0x16c2fc,'normalizedComplexity':_0x23bc02[_0x2fd437(_0x27c9e7._0x33ccab)](Math['round'](_0x23bc02[_0x2fd437(_0x27c9e7._0xa31e10)](_0xa4ce84,0x64)),0x64),'cascadeDepth':_0x563d72,'riskLevel':_0x23bc02[_0x2fd437(_0x27c9e7._0x18b29a)](classifyCompositeRisk,_0x15753b),'pageRank':_0x283e07,'pageRankPercentile':_0x4db056};}function _0x560d(_0x26f70b,_0x4d9411){_0x26f70b=_0x26f70b-0x8d;const _0x87c465=_0x87c4();let _0x560dad=_0x87c465[_0x26f70b];if(_0x560d['Ygaifu']===undefined){var _0x7c582b=function(_0xc329b){const _0x19103b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x425423='',_0x3899dc='';for(let _0x136ad0=0x0,_0x595a71,_0x4ff81c,_0x1c4be7=0x0;_0x4ff81c=_0xc329b['charAt'](_0x1c4be7++);~_0x4ff81c&&(_0x595a71=_0x136ad0%0x4?_0x595a71*0x40+_0x4ff81c:_0x4ff81c,_0x136ad0++%0x4)?_0x425423+=String['fromCharCode'](0xff&_0x595a71>>(-0x2*_0x136ad0&0x6)):0x0){_0x4ff81c=_0x19103b['indexOf'](_0x4ff81c);}for(let _0xd125a4=0x0,_0x5903c8=_0x425423['length'];_0xd125a4<_0x5903c8;_0xd125a4++){_0x3899dc+='%'+('00'+_0x425423['charCodeAt'](_0xd125a4)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x3899dc);};_0x560d['uwQQTM']=_0x7c582b,_0x560d['JBjOoc']={},_0x560d['Ygaifu']=!![];}const _0x1990c8=_0x87c465[0x0],_0xb1f084=_0x26f70b+_0x1990c8,_0x556d48=_0x560d['JBjOoc'][_0xb1f084];return!_0x556d48?(_0x560dad=_0x560d['uwQQTM'](_0x560dad),_0x560d['JBjOoc'][_0xb1f084]=_0x560dad):_0x560dad=_0x556d48,_0x560dad;}function computeProjectMetrics(_0xf94e92,_0x2e6342){const _0x50c490={_0x42ba91:0x100,_0x4141c8:0xc4,_0x4a75f8:0xca,_0x2ad00c:0xe7,_0x569577:0x98,_0x5cb118:0x106,_0x17694f:0xc8,_0x47f876:0xc4,_0xd54bec:0x103,_0x38a761:0xda,_0x1de4cd:0xa8,_0x12061f:0x10b,_0xf88dd7:0x103,_0x518d6a:0xcf,_0x35b4f5:0xf1,_0x2fa766:0xc8,_0xb8118d:0xc6,_0x3e569e:0xc0,_0xad4f60:0xe4,_0x5682ae:0x10f,_0x4a86c5:0xf3,_0x23c607:0x10d,_0x36b418:0xf6},_0x30f450=_0x475ea7,_0x285124={'yKykx':function(_0x4c67cb,_0x56e497){return _0x4c67cb(_0x56e497);},'bVaGx':function(_0x1120c6,_0x32c4c0,_0x387e57,_0x4a2019){return _0x1120c6(_0x32c4c0,_0x387e57,_0x4a2019);},'MSOLB':function(_0x3551fa,_0x5b82dc){return _0x3551fa/_0x5b82dc;},'zOgoo':function(_0x203046,_0x1b1d41){return _0x203046+_0x1b1d41;},'rDIur':function(_0x276a16,_0xe1c857){return _0x276a16*_0xe1c857;},'kSbSg':function(_0x449fd6,_0x1a96f5){return _0x449fd6*_0x1a96f5;},'DsWZB':function(_0x3db0c4,_0x16a238){return _0x3db0c4*_0x16a238;},'tnByl':function(_0x53ff71,_0x5203bb){return _0x53ff71+_0x5203bb;},'mrRXb':function(_0x5ce883,_0x91b65d){return _0x5ce883+_0x91b65d;},'LdRvz':function(_0x8e32f4,_0x2b3d43){return _0x8e32f4-_0x2b3d43;},'DmAwF':function(_0x2a5217,_0x3116f0){return _0x2a5217*_0x3116f0;},'xRQWa':function(_0xc15d90,_0x2d8e0f){return _0xc15d90*_0x2d8e0f;},'ipLqi':function(_0x24b117,_0x4e20d5){return _0x24b117*_0x4e20d5;},'IcbLU':function(_0xef39af,_0x3caf2e){return _0xef39af+_0x3caf2e;}};if(cachedProjectMetrics&&cachedProjectRoot===_0xf94e92[_0x30f450(0x110)])return cachedProjectMetrics;const _0x5f3c3b=_0x2e6342||readFileContent,_0x563dbc=new Map();let _0x53125d=0x0,_0x503ba4=0x0,_0x2a2074=0x0,_0x997c24=0x0;for(const _0xbb47c6 of _0xf94e92[_0x30f450(0x10f)]){const _0x19827a=computeCouplingMetrics(_0xbb47c6,_0xf94e92),_0x5412a8=computeInstability(_0x19827a['fanIn'],_0x19827a[_0x30f450(0xa7)]),_0x1576aa=_0x5f3c3b(_0xbb47c6),_0x128c1b=_0x285124[_0x30f450(_0x50c490._0x42ba91)](detectLanguageForFile,_0xbb47c6),_0x60cd95=_0x1576aa?computeComplexity(_0x1576aa,_0x128c1b):0x0,_0x548b6e=computeCascadeDepth(_0xbb47c6,_0xf94e92),_0x27788f={};_0x27788f['coupling']=_0x19827a,_0x27788f[_0x30f450(0xb9)]=_0x5412a8,_0x27788f['complexity']=_0x60cd95,_0x27788f[_0x30f450(0xc6)]=_0x548b6e,_0x563dbc[_0x30f450(0xf1)](_0xbb47c6,_0x27788f),_0x53125d=Math['max'](_0x53125d,_0x19827a[_0x30f450(_0x50c490._0x4141c8)]),_0x503ba4=Math[_0x30f450(_0x50c490._0x4a75f8)](_0x503ba4,_0x19827a['transitiveFanIn']),_0x2a2074=Math[_0x30f450(0xca)](_0x2a2074,_0x60cd95),_0x997c24=Math[_0x30f450(0xca)](_0x997c24,_0x548b6e);}const _0x42ed0c={'maxFanIn':_0x53125d,'maxTransitiveFanIn':_0x503ba4,'maxComplexity':_0x2a2074,'maxCascadeDepth':_0x997c24,'fileMetrics':new Map()};for(const [_0x4bf049,_0x3556f9]of _0x563dbc){const _0xcd11d0=normalize(_0x3556f9['coupling'][_0x30f450(_0x50c490._0x2ad00c)],0x0,_0x503ba4),_0x3d3df7=_0x285124[_0x30f450(_0x50c490._0x569577)](normalize,_0x3556f9['complexity'],0x0,_0x2a2074),_0x12259c=normalize(_0x3556f9['cascadeDepth'],0x0,_0x997c24);let _0x52f6aa,_0x3cdfe4,_0xda2aef=0x0,_0x505e1e=![];if(_0xf94e92['pageRank']){const _0x2eabce=(0x0,pagerank_1['getFileRank'])(_0x4bf049,_0xf94e92[_0x30f450(0x115)]);_0x2eabce&&(_0x52f6aa=_0x2eabce['score'],_0x3cdfe4=_0x2eabce[_0x30f450(_0x50c490._0x5cb118)],_0xda2aef=_0x285124[_0x30f450(_0x50c490._0x17694f)](_0x2eabce[_0x30f450(0x106)],0x64),_0x505e1e=!![]);}let _0x2d9c1b;if(_0x505e1e)_0x2d9c1b=_0x285124[_0x30f450(0x109)](exports['RISK_WEIGHTS'][_0x30f450(_0x50c490._0x47f876)]*_0xcd11d0,_0x285124['rDIur'](exports[_0x30f450(_0x50c490._0xd54bec)][_0x30f450(_0x50c490._0x38a761)],0x1-_0x3556f9['instability']))+_0x285124[_0x30f450(0xbb)](exports[_0x30f450(_0x50c490._0xd54bec)]['complexity'],_0x3d3df7)+_0x285124[_0x30f450(0x10b)](exports[_0x30f450(_0x50c490._0xd54bec)]['cascadeDepth'],_0x12259c)+_0x285124[_0x30f450(_0x50c490._0x1de4cd)](exports[_0x30f450(_0x50c490._0xd54bec)]['pageRank'],_0xda2aef);else{const _0x4e583a=_0x285124['tnByl'](exports[_0x30f450(0x103)][_0x30f450(0xc4)]+exports[_0x30f450(0x103)]['stability']+exports['RISK_WEIGHTS'][_0x30f450(0xbc)],exports[_0x30f450(0x103)]['cascadeDepth']);_0x2d9c1b=_0x285124['mrRXb'](exports['RISK_WEIGHTS']['fanIn']/_0x4e583a*_0xcd11d0,_0x285124[_0x30f450(_0x50c490._0x12061f)](exports[_0x30f450(_0x50c490._0xd54bec)]['stability']/_0x4e583a,_0x285124['LdRvz'](0x1,_0x3556f9['instability'])))+_0x285124['DmAwF'](exports[_0x30f450(_0x50c490._0xf88dd7)]['complexity']/_0x4e583a,_0x3d3df7)+_0x285124[_0x30f450(0x10b)](_0x285124[_0x30f450(_0x50c490._0x17694f)](exports['RISK_WEIGHTS'][_0x30f450(0xc6)],_0x4e583a),_0x12259c);}const _0x2cb689=Math[_0x30f450(_0x50c490._0x518d6a)](0x1,Math['max'](0x0,_0x2d9c1b));_0x42ed0c['fileMetrics'][_0x30f450(_0x50c490._0x35b4f5)](_0x4bf049,{'composite':_0x285124[_0x30f450(0xc8)](Math['round'](_0x285124['xRQWa'](_0x2cb689,0x64)),0x64),'fanIn':_0x3556f9['coupling'][_0x30f450(0xc4)],'fanOut':_0x3556f9['coupling']['fanOut'],'transitiveFanIn':_0x3556f9[_0x30f450(0xfc)]['transitiveFanIn'],'instability':_0x285124[_0x30f450(0xc8)](Math['round'](_0x285124[_0x30f450(0xe2)](_0x3556f9[_0x30f450(0xb9)],0x64)),0x64),'complexity':_0x3556f9['complexity'],'normalizedComplexity':_0x285124[_0x30f450(_0x50c490._0x2fa766)](Math['round'](_0x3d3df7*0x64),0x64),'cascadeDepth':_0x3556f9[_0x30f450(_0x50c490._0xb8118d)],'riskLevel':classifyCompositeRisk(_0x2cb689),'pageRank':_0x52f6aa,'pageRankPercentile':_0x3cdfe4});}return cachedProjectMetrics=_0x42ed0c,cachedProjectRoot=_0xf94e92['projectRoot'],console[_0x30f450(_0x50c490._0x3e569e)](_0x285124[_0x30f450(0xaa)](_0x30f450(_0x50c490._0xad4f60)+_0xf94e92[_0x30f450(_0x50c490._0x5682ae)]['size']+'\x20files\x20'+(_0x30f450(_0x50c490._0x4a86c5)+_0x53125d+',\x20maxTransFanIn='+_0x503ba4+',\x20'),_0x30f450(_0x50c490._0x23c607)+_0x2a2074+_0x30f450(_0x50c490._0x36b418)+_0x997c24+')')),_0x42ed0c;}function getRiskScore(_0x246ff6,_0x3a430a,_0x3f4cbc){const _0x1b97bb={_0x23c560:0x91,_0x1269b0:0xa4},_0x3bd519=_0x475ea7,_0xf4ff40={'NnKub':function(_0x2ff399,_0x493009){return _0x2ff399??_0x493009;},'FiPkd':function(_0x27028c,_0x9a01b8,_0x434fd8,_0x3256ab){return _0x27028c(_0x9a01b8,_0x434fd8,_0x3256ab);}};if(cachedProjectMetrics&&cachedProjectRoot===_0x3a430a[_0x3bd519(0x110)]){const _0x501f08=cachedProjectMetrics[_0x3bd519(_0x1b97bb._0x23c560)]['get'](_0x246ff6);if(_0x501f08)return _0x501f08;return computeRiskScore(_0x246ff6,_0x3a430a,_0xf4ff40['NnKub'](_0x3f4cbc,null),cachedProjectMetrics);}return _0xf4ff40[_0x3bd519(_0x1b97bb._0x1269b0)](computeRiskScore,_0x246ff6,_0x3a430a,_0x3f4cbc??null);}function formatRiskScore(_0x55f5c6){const _0x1f6404={_0x43ddbe:0x8f,_0x2c114f:0x117,_0x2fe7f5:0xb9,_0x444272:0xd6,_0x13f174:0x116,_0x53c959:0xa1,_0x5bf4da:0xe6,_0x1f2101:0x114,_0xd2aaee:0xce,_0x343f28:0xb2,_0xd5e205:0xc6,_0x4a3d5a:0xc5,_0x56a5ff:0xb7},_0x5a0987=_0x475ea7,_0x2e9ec9={};_0x2e9ec9['Rcusd']=function(_0x3a2620,_0xbefa72){return _0x3a2620<=_0xbefa72;},_0x2e9ec9['JSNMg']=_0x5a0987(0xfa),_0x2e9ec9['RmbMt']=function(_0x547806,_0x592d35){return _0x547806<=_0x592d35;},_0x2e9ec9['FxOKc']=_0x5a0987(_0x1f6404._0x43ddbe),_0x2e9ec9[_0x5a0987(_0x1f6404._0x2c114f)]=function(_0xc938c6,_0x55e70c){return _0xc938c6!==_0x55e70c;},_0x2e9ec9['eDiME']=function(_0x468fe0,_0x4ee98d){return _0x468fe0!==_0x4ee98d;};const _0x24ccc1=_0x2e9ec9,_0x566381=_0x24ccc1['Rcusd'](_0x55f5c6[_0x5a0987(_0x1f6404._0x2fe7f5)],0.2)?_0x5a0987(0xb6):_0x24ccc1[_0x5a0987(_0x1f6404._0x444272)](_0x55f5c6['instability'],0.4)?_0x24ccc1['JSNMg']:_0x24ccc1['RmbMt'](_0x55f5c6['instability'],0.6)?'balanced':_0x55f5c6[_0x5a0987(0xb9)]<=0.8?_0x24ccc1['FxOKc']:_0x5a0987(0xdb),_0x41af95=[_0x5a0987(0xa9)+_0x55f5c6[_0x5a0987(_0x1f6404._0x13f174)][_0x5a0987(_0x1f6404._0x53c959)](0x2)+'\x20('+_0x55f5c6[_0x5a0987(0xd0)]+')',_0x5a0987(_0x1f6404._0x5bf4da)+_0x55f5c6['transitiveFanIn']+'\x20(direct:\x20'+_0x55f5c6['fanIn']+_0x5a0987(0xdf)+_0x55f5c6[_0x5a0987(0xa7)]+')','\x20\x20Stability:\x20'+_0x55f5c6['instability']['toFixed'](0x2)+'\x20('+_0x566381+')','\x20\x20Complexity:\x20'+_0x55f5c6['complexity']+_0x5a0987(_0x1f6404._0x1f2101)+_0x55f5c6[_0x5a0987(_0x1f6404._0xd2aaee)]['toFixed'](0x2)+')',_0x5a0987(_0x1f6404._0x343f28)+_0x55f5c6[_0x5a0987(_0x1f6404._0xd5e205)]+'\x20level(s)'];return _0x24ccc1['CAIbs'](_0x55f5c6['pageRank'],undefined)&&_0x24ccc1[_0x5a0987(_0x1f6404._0x4a3d5a)](_0x55f5c6[_0x5a0987(_0x1f6404._0x56a5ff)],undefined)&&_0x41af95[_0x5a0987(0xf4)]('\x20\x20PageRank:\x20'+_0x55f5c6['pageRank'][_0x5a0987(_0x1f6404._0x53c959)](0x6)+'\x20('+_0x55f5c6['pageRankPercentile']+_0x5a0987(0x107)),_0x41af95[_0x5a0987(0xd5)]('\x0a');}