@syke1/mcp-server 1.5.6 → 1.6.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.
@@ -1,409 +1 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.gateCheck = gateCheck;
37
- exports.formatGateResult = formatGateResult;
38
- const path = __importStar(require("path"));
39
- const server_1 = require("../web/server");
40
- const analyze_impact_1 = require("./analyze-impact");
41
- const risk_scorer_1 = require("../scoring/risk-scorer");
42
- const change_coupling_1 = require("../git/change-coupling");
43
- /**
44
- * Detect circular dependencies using SCC data.
45
- * Much faster and more complete than DFS-based cycle detection.
46
- * Returns all cyclic SCCs that contain any of the specified files.
47
- */
48
- function detectCyclesWithSCC(files, graph) {
49
- const scc = graph.scc;
50
- if (!scc) {
51
- // Fallback to old DFS if SCC data not available
52
- return detectCyclesForFilesDFS(files, graph, 10);
53
- }
54
- const cycles = [];
55
- const reportedSCCs = new Set();
56
- for (const file of files) {
57
- if (!graph.files.has(file))
58
- continue;
59
- const sccIndex = scc.nodeToComponent.get(file);
60
- if (sccIndex === undefined)
61
- continue;
62
- const node = scc.condensed.nodes[sccIndex];
63
- if (!node.isCyclic)
64
- continue;
65
- // Only report each cyclic SCC once
66
- if (reportedSCCs.has(sccIndex))
67
- continue;
68
- reportedSCCs.add(sccIndex);
69
- // Build a cycle representation: all files in the SCC form a cycle
70
- // For display, show the circular path by appending the first file at the end
71
- const cyclePath = [...node.files, node.files[0]];
72
- cycles.push({
73
- cycle: cyclePath,
74
- file,
75
- });
76
- }
77
- return cycles;
78
- }
79
- /**
80
- * Also scan the entire graph for cyclic SCCs (not just specified files).
81
- * Returns summary info about all cycles in the project.
82
- */
83
- function detectAllCycles(graph) {
84
- const scc = graph.scc;
85
- if (!scc)
86
- return [];
87
- const cycles = [];
88
- for (const node of scc.condensed.nodes) {
89
- if (!node.isCyclic)
90
- continue;
91
- const cyclePath = [...node.files, node.files[0]];
92
- cycles.push({
93
- cycle: cyclePath,
94
- file: node.files[0],
95
- });
96
- }
97
- return cycles;
98
- }
99
- /**
100
- * Legacy DFS forward traversal from specified files to detect circular dependencies.
101
- * Used as fallback when SCC data is not available.
102
- */
103
- function detectCyclesForFilesDFS(files, graph, maxCycles = 10) {
104
- const cycles = [];
105
- const globalVisited = new Set();
106
- for (const startFile of files) {
107
- if (!graph.files.has(startFile))
108
- continue;
109
- const stack = new Set();
110
- const pathStack = [];
111
- function dfs(file) {
112
- if (cycles.length >= maxCycles)
113
- return;
114
- if (globalVisited.has(file))
115
- return;
116
- stack.add(file);
117
- pathStack.push(file);
118
- const deps = graph.forward.get(file) || [];
119
- for (const dep of deps) {
120
- if (cycles.length >= maxCycles)
121
- break;
122
- if (stack.has(dep)) {
123
- // Back-edge found: cycle
124
- const idx = pathStack.indexOf(dep);
125
- if (idx >= 0) {
126
- cycles.push({
127
- cycle: [...pathStack.slice(idx), dep],
128
- file: startFile,
129
- });
130
- }
131
- }
132
- else if (!globalVisited.has(dep)) {
133
- dfs(dep);
134
- }
135
- }
136
- stack.delete(file);
137
- pathStack.pop();
138
- }
139
- dfs(startFile);
140
- for (const f of stack)
141
- globalVisited.add(f);
142
- }
143
- return cycles.slice(0, maxCycles);
144
- }
145
- // ── Gate Check ──
146
- /**
147
- * Run the build gate check.
148
- * If `specifiedFiles` is provided, only warnings for those files are considered.
149
- * Cycle detection uses SCC data when available (faster and more complete).
150
- */
151
- async function gateCheck(graph, specifiedFiles) {
152
- const allWarnings = (0, server_1.getUnacknowledgedWarnings)();
153
- const sccCount = graph.scc?.condensed.nodes.length;
154
- const cyclicSCCs = graph.scc?.condensed.nodes.filter(n => n.isCyclic).length;
155
- const stats = {
156
- filesInGraph: graph.files.size,
157
- unresolvedWarnings: allWarnings.length,
158
- sccCount,
159
- cyclicSCCs,
160
- };
161
- // Filter warnings to specified files if provided
162
- const warnings = specifiedFiles
163
- ? allWarnings.filter((w) => specifiedFiles.some((f) => w.file === f ||
164
- f.endsWith(w.file) ||
165
- w.file.endsWith(f.replace(/\\/g, "/"))))
166
- : allWarnings;
167
- const issues = [];
168
- // 1. Check warnings by severity
169
- for (const w of warnings) {
170
- const severity = mapRiskToSeverity(w.riskLevel);
171
- if (severity) {
172
- issues.push({
173
- file: w.file,
174
- severity,
175
- description: w.summary +
176
- (w.brokenImports.length > 0
177
- ? ` (broken imports: ${w.brokenImports.join(", ")})`
178
- : ""),
179
- });
180
- }
181
- }
182
- // 2. Detect cycles using SCC (or fallback to DFS)
183
- const filesToCheck = specifiedFiles || [];
184
- const cycles = detectCyclesWithSCC(filesToCheck, graph);
185
- for (const c of cycles) {
186
- const cyclePath = c.cycle
187
- .map((f) => path.relative(graph.sourceDir, f).replace(/\\/g, "/"))
188
- .join(" -> ");
189
- issues.push({
190
- file: path.relative(graph.sourceDir, c.file).replace(/\\/g, "/"),
191
- severity: "CRITICAL",
192
- description: `Circular dependency detected (${c.cycle.length - 1} files): ${cyclePath}`,
193
- });
194
- }
195
- // 3. Check if hub files were modified and compute composite risk scores
196
- const riskScores = new Map();
197
- if (specifiedFiles) {
198
- // Compute project metrics for accurate normalization
199
- try {
200
- (0, risk_scorer_1.computeProjectMetrics)(graph);
201
- }
202
- catch {
203
- // Non-critical: proceed without project-wide normalization
204
- }
205
- const hubs = (0, analyze_impact_1.getHubFiles)(graph, 5);
206
- const hubPaths = new Set(hubs.map((h) => h.relativePath));
207
- for (const f of specifiedFiles) {
208
- if (!graph.files.has(f))
209
- continue;
210
- const rel = path.relative(graph.sourceDir, f).replace(/\\/g, "/");
211
- // Compute composite risk score for each specified file
212
- try {
213
- const score = (0, risk_scorer_1.getRiskScore)(f, graph);
214
- riskScores.set(rel, score);
215
- // CRITICAL: composite score >= 0.8 is critical regardless of dependent count
216
- if (score.riskLevel === "CRITICAL") {
217
- issues.push({
218
- file: rel,
219
- severity: "CRITICAL",
220
- description: `Critical risk score ${score.composite.toFixed(2)} (fan-in: ${score.transitiveFanIn}, cascade: ${score.cascadeDepth} levels, complexity: ${score.complexity})`,
221
- });
222
- }
223
- else if (score.riskLevel === "HIGH") {
224
- issues.push({
225
- file: rel,
226
- severity: "HIGH",
227
- description: `High risk score ${score.composite.toFixed(2)} (fan-in: ${score.transitiveFanIn}, cascade: ${score.cascadeDepth} levels, complexity: ${score.complexity})`,
228
- });
229
- }
230
- }
231
- catch {
232
- // Fall through to hub check below
233
- }
234
- // Legacy hub file check (only if not already flagged by composite score)
235
- if (hubPaths.has(rel) && !riskScores.has(rel)) {
236
- const hub = hubs.find((h) => h.relativePath === rel);
237
- issues.push({
238
- file: rel,
239
- severity: "MEDIUM",
240
- description: `Hub file modified (${hub.dependentCount} dependents, ${hub.riskLevel} risk)`,
241
- });
242
- }
243
- else if (hubPaths.has(rel)) {
244
- // Hub file already scored by composite — only add hub note if severity was LOW/MEDIUM
245
- const score = riskScores.get(rel);
246
- if (score && (score.riskLevel === "LOW" || score.riskLevel === "MEDIUM" || score.riskLevel === "SAFE")) {
247
- const hub = hubs.find((h) => h.relativePath === rel);
248
- issues.push({
249
- file: rel,
250
- severity: "MEDIUM",
251
- description: `Hub file modified (${hub.dependentCount} dependents), composite score: ${score.composite.toFixed(2)}`,
252
- });
253
- }
254
- }
255
- }
256
- // 4. Check historical change coupling for modified files
257
- try {
258
- const couplingResult = await (0, change_coupling_1.mineGitHistory)(graph.projectRoot);
259
- if (couplingResult.totalCommitsAnalyzed > 0) {
260
- const modifiedSet = new Set(specifiedFiles.map((f) => path.relative(graph.projectRoot, f).replace(/\\/g, "/")));
261
- for (const f of specifiedFiles) {
262
- if (!graph.files.has(f))
263
- continue;
264
- const gitRelPath = path
265
- .relative(graph.projectRoot, f)
266
- .replace(/\\/g, "/");
267
- const couplings = (0, change_coupling_1.getCoupledFiles)(gitRelPath, couplingResult);
268
- for (const coupling of couplings) {
269
- const otherFile = coupling.file1 === gitRelPath ? coupling.file2 : coupling.file1;
270
- // Skip if the coupled file is already in the modified files list
271
- if (modifiedSet.has(otherFile))
272
- continue;
273
- // Skip if the coupled file is already a known dependency
274
- const otherAbsolute = path.normalize(path.join(graph.projectRoot, otherFile));
275
- const forwardDeps = graph.forward.get(f) || [];
276
- const reverseDeps = graph.reverse.get(f) || [];
277
- const isInGraph = forwardDeps.includes(otherAbsolute) ||
278
- reverseDeps.includes(otherAbsolute);
279
- if (isInGraph)
280
- continue;
281
- // Only flag couplings with confidence >= 0.3
282
- if (coupling.confidence < 0.3)
283
- continue;
284
- const severity = coupling.confidence >= 0.5 ? "MEDIUM" : "LOW";
285
- const pct = Math.round(coupling.confidence * 100);
286
- const rel = path.relative(graph.sourceDir, f).replace(/\\/g, "/");
287
- issues.push({
288
- file: rel,
289
- severity,
290
- description: `Historical coupling: ${otherFile} changes with this file in ${pct}% of commits (${coupling.coChangeCount} times) -- consider reviewing`,
291
- });
292
- }
293
- }
294
- }
295
- }
296
- catch {
297
- // Non-critical: coupling analysis failure should not block build gate
298
- }
299
- }
300
- // ── Determine verdict ──
301
- const hasCritical = issues.some((i) => i.severity === "CRITICAL");
302
- const highIssues = issues.filter((i) => i.severity === "HIGH");
303
- const hasHighWithBroken = highIssues.length > 0 &&
304
- warnings.some((w) => w.riskLevel === "HIGH" && w.brokenImports.length > 0);
305
- const hasCycles = cycles.length > 0;
306
- let verdict;
307
- let statusLine;
308
- let recommendation;
309
- let autoAcknowledged = 0;
310
- if (hasCritical || hasHighWithBroken || hasCycles) {
311
- verdict = "FAIL";
312
- const reasons = [];
313
- if (hasCritical)
314
- reasons.push("CRITICAL warnings");
315
- if (hasHighWithBroken)
316
- reasons.push("HIGH warnings with broken imports");
317
- if (hasCycles)
318
- reasons.push(`${cycles.length} circular dependency(ies)`);
319
- statusLine = `BUILD BLOCKED — ${reasons.join(", ")}`;
320
- recommendation =
321
- "Fix the issues above before building. Use `check_warnings` for details, then `analyze_impact` on affected files.";
322
- }
323
- else if (highIssues.length > 0 ||
324
- issues.some((i) => i.severity === "MEDIUM")) {
325
- verdict = "WARN";
326
- statusLine = `PROCEED WITH CAUTION — ${issues.length} issue(s) detected`;
327
- recommendation =
328
- "Review the issues. If you've verified they're safe, proceed with the build. Use `check_warnings acknowledge=true` to clear warnings.";
329
- }
330
- else {
331
- verdict = "PASS";
332
- statusLine = "All clear — safe to build";
333
- recommendation = "No issues detected. You may proceed with build/deploy.";
334
- // Auto-acknowledge warnings on PASS
335
- autoAcknowledged = (0, server_1.acknowledgeWarnings)();
336
- }
337
- return {
338
- verdict,
339
- statusLine,
340
- issues,
341
- recommendation,
342
- stats,
343
- autoAcknowledged,
344
- riskScores: riskScores.size > 0 ? riskScores : undefined,
345
- };
346
- }
347
- // ── Formatting ──
348
- function formatGateResult(result) {
349
- const icon = result.verdict === "PASS"
350
- ? "✅"
351
- : result.verdict === "WARN"
352
- ? "⚠️"
353
- : "🚫";
354
- const lines = [
355
- `## SYKE Build Gate — ${icon} ${result.verdict}`,
356
- "",
357
- "### Status",
358
- result.statusLine,
359
- ];
360
- if (result.issues.length > 0) {
361
- lines.push("", "### Issues");
362
- for (const issue of result.issues) {
363
- const issueIcon = issue.severity === "CRITICAL"
364
- ? "🚫"
365
- : issue.severity === "HIGH"
366
- ? "🔴"
367
- : issue.severity === "MEDIUM"
368
- ? "🟡"
369
- : "🔵";
370
- lines.push(`- ${issueIcon} **[${issue.severity}]** ${issue.file}: ${issue.description}`);
371
- }
372
- }
373
- lines.push("", "### Recommendation", result.recommendation);
374
- lines.push("", "### Stats", `- Files in graph: ${result.stats.filesInGraph}`, `- Unresolved warnings: ${result.stats.unresolvedWarnings}`);
375
- if (result.stats.sccCount !== undefined) {
376
- lines.push(`- Strongly Connected Components: ${result.stats.sccCount}`);
377
- }
378
- if (result.stats.cyclicSCCs !== undefined && result.stats.cyclicSCCs > 0) {
379
- lines.push(`- Circular dependency clusters: ${result.stats.cyclicSCCs}`);
380
- }
381
- if (result.autoAcknowledged > 0) {
382
- lines.push(`- Auto-acknowledged: ${result.autoAcknowledged} warning(s)`);
383
- }
384
- // Show composite risk scores for specified files
385
- if (result.riskScores && result.riskScores.size > 0) {
386
- lines.push("", "### Risk Scores");
387
- for (const [file, score] of result.riskScores) {
388
- lines.push(`**${file}:**`);
389
- lines.push((0, risk_scorer_1.formatRiskScore)(score));
390
- lines.push("");
391
- }
392
- }
393
- return lines.join("\n");
394
- }
395
- // ── Helpers ──
396
- function mapRiskToSeverity(riskLevel) {
397
- switch (riskLevel) {
398
- case "CRITICAL":
399
- return "CRITICAL";
400
- case "HIGH":
401
- return "HIGH";
402
- case "MEDIUM":
403
- return "MEDIUM";
404
- case "LOW":
405
- return "LOW";
406
- default:
407
- return null; // SAFE → no issue
408
- }
409
- }
1
+ 'use strict';const _0x36c162=_0x1385;(function(_0x992ced,_0xbb32ba){const _0x4a9f8c={_0x5ec1c0:0xe9,_0x3efce2:0xbe,_0x1fda5e:0xfd,_0x4ca343:0xd9,_0x56f14f:0xfb,_0x4346c4:0xc4,_0x4b7083:0x11a},_0x5cd7be=_0x1385,_0x42c34c=_0x992ced();while(!![]){try{const _0xce4c83=parseInt(_0x5cd7be(0xc6))/0x1+-parseInt(_0x5cd7be(_0x4a9f8c._0x5ec1c0))/0x2+-parseInt(_0x5cd7be(_0x4a9f8c._0x3efce2))/0x3*(parseInt(_0x5cd7be(_0x4a9f8c._0x1fda5e))/0x4)+parseInt(_0x5cd7be(_0x4a9f8c._0x4ca343))/0x5*(-parseInt(_0x5cd7be(0xdf))/0x6)+-parseInt(_0x5cd7be(_0x4a9f8c._0x56f14f))/0x7+-parseInt(_0x5cd7be(_0x4a9f8c._0x4346c4))/0x8*(parseInt(_0x5cd7be(_0x4a9f8c._0x4b7083))/0x9)+parseInt(_0x5cd7be(0x126))/0xa;if(_0xce4c83===_0xbb32ba)break;else _0x42c34c['push'](_0x42c34c['shift']());}catch(_0x26a0f6){_0x42c34c['push'](_0x42c34c['shift']());}}}(_0x4e98,0xe9f6f));function _0x1385(_0x29cc4e,_0x1af598){_0x29cc4e=_0x29cc4e-0xb1;const _0x4e98a1=_0x4e98();let _0x138575=_0x4e98a1[_0x29cc4e];if(_0x1385['eoubXm']===undefined){var _0x4a2ed8=function(_0x3cee0f){const _0x24f9f0='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x5b7eed='',_0x310614='';for(let _0x3cfb90=0x0,_0x422089,_0x424d28,_0x15af7b=0x0;_0x424d28=_0x3cee0f['charAt'](_0x15af7b++);~_0x424d28&&(_0x422089=_0x3cfb90%0x4?_0x422089*0x40+_0x424d28:_0x424d28,_0x3cfb90++%0x4)?_0x5b7eed+=String['fromCharCode'](0xff&_0x422089>>(-0x2*_0x3cfb90&0x6)):0x0){_0x424d28=_0x24f9f0['indexOf'](_0x424d28);}for(let _0x55eb49=0x0,_0x4caaf3=_0x5b7eed['length'];_0x55eb49<_0x4caaf3;_0x55eb49++){_0x310614+='%'+('00'+_0x5b7eed['charCodeAt'](_0x55eb49)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x310614);};_0x1385['dfTsmh']=_0x4a2ed8,_0x1385['SNgdhr']={},_0x1385['eoubXm']=!![];}const _0x44849e=_0x4e98a1[0x0],_0x1ce343=_0x29cc4e+_0x44849e,_0x346fc9=_0x1385['SNgdhr'][_0x1ce343];return!_0x346fc9?(_0x138575=_0x1385['dfTsmh'](_0x138575),_0x1385['SNgdhr'][_0x1ce343]=_0x138575):_0x138575=_0x346fc9,_0x138575;}var __createBinding=this&&this['__createBinding']||(Object['create']?function(_0x4dcff1,_0x5cd06f,_0x4a96ea,_0x28abdc){const _0xd39132={_0x28065c:0xd6},_0x2f40b6=_0x1385,_0x4a44e1={};_0x4a44e1['zPlEa']=function(_0x3f5aaa,_0x478cbe){return _0x3f5aaa in _0x478cbe;};const _0x45fc73=_0x4a44e1;if(_0x28abdc===undefined)_0x28abdc=_0x4a96ea;var _0x440e2d=Object[_0x2f40b6(_0xd39132._0x28065c)](_0x5cd06f,_0x4a96ea);if(!_0x440e2d||(_0x45fc73[_0x2f40b6(0x114)]('get',_0x440e2d)?!_0x5cd06f['__esModule']:_0x440e2d['writable']||_0x440e2d['configurable'])){const _0x16ac7c={};_0x16ac7c[_0x2f40b6(0xca)]=!![],_0x16ac7c['get']=function(){return _0x5cd06f[_0x4a96ea];},_0x440e2d=_0x16ac7c;}Object[_0x2f40b6(0xbb)](_0x4dcff1,_0x28abdc,_0x440e2d);}:function(_0x5151a8,_0x5cc455,_0x5c0356,_0x5f352d){const _0x2706bb=_0x1385,_0x1417ff={};_0x1417ff[_0x2706bb(0xbc)]=function(_0x5d4ad1,_0x1313dc){return _0x5d4ad1===_0x1313dc;};const _0xe58d85=_0x1417ff;if(_0xe58d85['zmojG'](_0x5f352d,undefined))_0x5f352d=_0x5c0356;_0x5151a8[_0x5f352d]=_0x5cc455[_0x5c0356];}),__setModuleDefault=this&&this['__setModuleDefault']||(Object['create']?function(_0x6279e6,_0x47644d){const _0x2a808c={_0x4e97a4:0xca,_0x4164ab:0xbf},_0x1ab0a2=_0x1385,_0x2ccd52={};_0x2ccd52['swexG']='default';const _0x2f220e=_0x2ccd52,_0x15b5d1={};_0x15b5d1[_0x1ab0a2(_0x2a808c._0x4e97a4)]=!![],_0x15b5d1['value']=_0x47644d,Object[_0x1ab0a2(0xbb)](_0x6279e6,_0x2f220e[_0x1ab0a2(_0x2a808c._0x4164ab)],_0x15b5d1);}:function(_0x178117,_0xc055ee){const _0x56058e={_0xe57b18:0xf0},_0x535f65=_0x1385;_0x178117[_0x535f65(_0x56058e._0xe57b18)]=_0xc055ee;}),__importStar=this&&this['__importStar']||(function(){const _0x42b530={'BfnHH':function(_0x3e166f,_0x389763){return _0x3e166f(_0x389763);},'QNJmE':function(_0x484081,_0x36509b){return _0x484081<_0x36509b;},'xZLNq':'default','bAuFh':function(_0x21c0e9,_0x36fe4d,_0x2cddd1){return _0x21c0e9(_0x36fe4d,_0x2cddd1);}};var _0x37c22d=function(_0x35354c){const _0x2947b0=_0x1385;return _0x37c22d=Object['getOwnPropertyNames']||function(_0x2672db){const _0x3c102b=_0x1385;var _0x43f8bd=[];for(var _0x5507ee in _0x2672db)if(Object[_0x3c102b(0x119)][_0x3c102b(0x118)][_0x3c102b(0x103)](_0x2672db,_0x5507ee))_0x43f8bd[_0x43f8bd['length']]=_0x5507ee;return _0x43f8bd;},_0x42b530[_0x2947b0(0xde)](_0x37c22d,_0x35354c);};return function(_0x578451){const _0x71c3f6=_0x1385;if(_0x578451&&_0x578451[_0x71c3f6(0xcb)])return _0x578451;var _0x37d985={};if(_0x578451!=null){for(var _0x2f9ef4=_0x42b530['BfnHH'](_0x37c22d,_0x578451),_0x26a077=0x0;_0x42b530['QNJmE'](_0x26a077,_0x2f9ef4['length']);_0x26a077++)if(_0x2f9ef4[_0x26a077]!==_0x42b530['xZLNq'])__createBinding(_0x37d985,_0x578451,_0x2f9ef4[_0x26a077]);}return _0x42b530['bAuFh'](__setModuleDefault,_0x37d985,_0x578451),_0x37d985;};}());const _0x8027c9={};_0x8027c9['value']=!![],Object[_0x36c162(0xbb)](exports,'__esModule',_0x8027c9),exports['gateCheck']=gateCheck,exports['formatGateResult']=formatGateResult;const path=__importStar(require('path')),server_1=require(_0x36c162(0x11f)),analyze_impact_1=require(_0x36c162(0x11b)),risk_scorer_1=require('../scoring/risk-scorer'),change_coupling_1=require(_0x36c162(0xce));function detectCyclesWithSCC(_0x3e52c0,_0x47bf32){const _0x4af00e={_0x5b86f6:0xcc,_0x5b8813:0xe6,_0x112f2a:0xcc,_0x15b538:0x111,_0x464336:0xe3},_0x45b70a=_0x36c162,_0x40bcd5={};_0x40bcd5[_0x45b70a(_0x4af00e._0x5b86f6)]=function(_0xbeec62,_0x2afeee){return _0xbeec62===_0x2afeee;};const _0x15a6fa=_0x40bcd5,_0x1debd0=_0x47bf32['scc'];if(!_0x1debd0)return detectCyclesForFilesDFS(_0x3e52c0,_0x47bf32,0xa);const _0x52de67=[],_0x2df539=new Set();for(const _0x303f98 of _0x3e52c0){if(!_0x47bf32[_0x45b70a(0x111)]['has'](_0x303f98))continue;const _0x6d8b98=_0x1debd0['nodeToComponent'][_0x45b70a(_0x4af00e._0x5b8813)](_0x303f98);if(_0x15a6fa[_0x45b70a(_0x4af00e._0x112f2a)](_0x6d8b98,undefined))continue;const _0x4a1ace=_0x1debd0['condensed']['nodes'][_0x6d8b98];if(!_0x4a1ace['isCyclic'])continue;if(_0x2df539[_0x45b70a(0xbd)](_0x6d8b98))continue;_0x2df539[_0x45b70a(0xc0)](_0x6d8b98);const _0x503c15=[..._0x4a1ace[_0x45b70a(0x111)],_0x4a1ace[_0x45b70a(_0x4af00e._0x15b538)][0x0]],_0x1d753d={};_0x1d753d['cycle']=_0x503c15,_0x1d753d[_0x45b70a(0x125)]=_0x303f98,_0x52de67[_0x45b70a(_0x4af00e._0x464336)](_0x1d753d);}return _0x52de67;}function detectAllCycles(_0x1129dc){const _0x59e439={_0x29b6eb:0x113},_0x46622a=_0x36c162,_0x19ebc0=_0x1129dc['scc'];if(!_0x19ebc0)return[];const _0x593407=[];for(const _0x4a4133 of _0x19ebc0['condensed']['nodes']){if(!_0x4a4133['isCyclic'])continue;const _0xb950aa=[..._0x4a4133['files'],_0x4a4133[_0x46622a(0x111)][0x0]],_0x2b199d={};_0x2b199d[_0x46622a(_0x59e439._0x29b6eb)]=_0xb950aa,_0x2b199d['file']=_0x4a4133['files'][0x0],_0x593407['push'](_0x2b199d);}return _0x593407;}function detectCyclesForFilesDFS(_0x7cd3b4,_0xac4b8d,_0x158ef1=0xa){const _0x306639={_0x51f4f5:0xbd},_0x5434ff={_0xff0d41:0xbd},_0x3d467a=_0x36c162,_0x58adaf={'ihgtb':function(_0x18a685,_0x28b7fc){return _0x18a685>=_0x28b7fc;},'dpDiG':function(_0x10d275,_0x515901){return _0x10d275(_0x515901);}},_0x5a251e=[],_0x5b19de=new Set();for(const _0x393d4a of _0x7cd3b4){if(!_0xac4b8d['files'][_0x3d467a(_0x306639._0x51f4f5)](_0x393d4a))continue;const _0x3788f7=new Set(),_0x36cce0=[];function _0x5d9622(_0x174df1){const _0x158fda=_0x3d467a;if(_0x58adaf['ihgtb'](_0x5a251e['length'],_0x158ef1))return;if(_0x5b19de[_0x158fda(_0x5434ff._0xff0d41)](_0x174df1))return;_0x3788f7['add'](_0x174df1),_0x36cce0['push'](_0x174df1);const _0x5377f2=_0xac4b8d['forward'][_0x158fda(0xe6)](_0x174df1)||[];for(const _0x11c0dc of _0x5377f2){if(_0x58adaf['ihgtb'](_0x5a251e[_0x158fda(0xf4)],_0x158ef1))break;if(_0x3788f7['has'](_0x11c0dc)){const _0x5e8e30=_0x36cce0['indexOf'](_0x11c0dc);_0x5e8e30>=0x0&&_0x5a251e[_0x158fda(0xe3)]({'cycle':[..._0x36cce0['slice'](_0x5e8e30),_0x11c0dc],'file':_0x393d4a});}else!_0x5b19de['has'](_0x11c0dc)&&_0x5d9622(_0x11c0dc);}_0x3788f7['delete'](_0x174df1),_0x36cce0['pop']();}_0x58adaf[_0x3d467a(0xd8)](_0x5d9622,_0x393d4a);for(const _0xec66b of _0x3788f7)_0x5b19de[_0x3d467a(0xc0)](_0xec66b);}return _0x5a251e[_0x3d467a(0xc7)](0x0,_0x158ef1);}async function gateCheck(_0x153a45,_0x2a6fe5){const _0x18fc06={_0x1b8bb0:0xd1,_0xfd296b:0xf5,_0x28af4e:0xec,_0x220647:0x115,_0x1e725b:0xb4,_0x580557:0x10c,_0x251819:0x10f,_0x12649a:0xf4,_0x52414c:0xe3,_0x508767:0x125,_0x563589:0xd5,_0x5272bb:0xf4,_0x38b3e4:0xd5,_0x2e8e63:0xfc,_0x787996:0xba,_0x54f377:0x106,_0x45daa6:0x116,_0x49beaf:0x110,_0x5d57cd:0xe4,_0x571a25:0x11d,_0x37bfd4:0xb6,_0x3ae1b5:0xe4,_0x50d1cc:0xd0,_0x145c16:0x10e,_0x42dac2:0x127,_0x1e6d93:0xb7,_0x5c93b9:0xf9,_0x326588:0x123,_0x2d2559:0xf1,_0x514e24:0xf2,_0x1f927e:0xe4,_0x2df6c1:0xe4,_0x4b7d82:0x112,_0x428631:0xf8,_0x21c93a:0x124,_0x23ac2c:0xea,_0x92590a:0x109,_0xa53d19:0xbd,_0x52c3a6:0xc5,_0x464b05:0x10a,_0x39b061:0xe6,_0x2e29ea:0xb2,_0xfff02d:0xda,_0x23803e:0x11e,_0x3abcd2:0xe0,_0x93643f:0xf6,_0x34a153:0xe1,_0x154711:0x107,_0x13bfb5:0xe5,_0x37cb2d:0xe3,_0x2e83a4:0xb3,_0x526655:0xd4,_0x41c40f:0x10d},_0xf21e06=_0x36c162,_0x104c22={};_0x104c22[_0xf21e06(0xe1)]=function(_0x43f280,_0x307f85){return _0x43f280>_0x307f85;},_0x104c22['NltRD']='CRITICAL',_0x104c22['evDgc']=function(_0x566351,_0x36fbe3){return _0x566351-_0x36fbe3;},_0x104c22[_0xf21e06(_0x18fc06._0x1b8bb0)]=function(_0x36843f,_0x176467){return _0x36843f===_0x176467;},_0x104c22['PHLXg']=_0xf21e06(_0x18fc06._0xfd296b),_0x104c22['SkMqX']=_0xf21e06(0xf1),_0x104c22['BeCcQ']=_0xf21e06(_0x18fc06._0x28af4e),_0x104c22['DQIZW']='LOW',_0x104c22[_0xf21e06(0x105)]=function(_0x4dd6fe,_0x4c492d){return _0x4dd6fe>_0x4c492d;},_0x104c22['qZxjn']='Fix\x20the\x20issues\x20above\x20before\x20building.\x20Use\x20`check_warnings`\x20for\x20details,\x20then\x20`analyze_impact`\x20on\x20affected\x20files.',_0x104c22[_0xf21e06(_0x18fc06._0x220647)]='WARN',_0x104c22[_0xf21e06(_0x18fc06._0x1e725b)]='Review\x20the\x20issues.\x20If\x20you\x27ve\x20verified\x20they\x27re\x20safe,\x20proceed\x20with\x20the\x20build.\x20Use\x20`check_warnings\x20acknowledge=true`\x20to\x20clear\x20warnings.',_0x104c22[_0xf21e06(_0x18fc06._0x580557)]='PASS';const _0x170574=_0x104c22,_0xf41d5c=(0x0,server_1['getUnacknowledgedWarnings'])(),_0x55b0ae=_0x153a45['scc']?.[_0xf21e06(_0x18fc06._0x251819)]['nodes'][_0xf21e06(0xf4)],_0x3771f0=_0x153a45['scc']?.['condensed']['nodes']['filter'](_0x5cc410=>_0x5cc410[_0xf21e06(0xe2)])[_0xf21e06(_0x18fc06._0x12649a)],_0x4f13a5={};_0x4f13a5['filesInGraph']=_0x153a45['files']['size'],_0x4f13a5['unresolvedWarnings']=_0xf41d5c['length'],_0x4f13a5['sccCount']=_0x55b0ae,_0x4f13a5[_0xf21e06(0xb5)]=_0x3771f0;const _0x720e01=_0x4f13a5,_0x106d08=_0x2a6fe5?_0xf41d5c[_0xf21e06(0xcf)](_0x25e3e7=>_0x2a6fe5['some'](_0x23d9ae=>_0x25e3e7['file']===_0x23d9ae||_0x23d9ae['endsWith'](_0x25e3e7[_0xf21e06(0x125)])||_0x25e3e7['file']['endsWith'](_0x23d9ae['replace'](/\\/g,'/')))):_0xf41d5c,_0x185a52=[];for(const _0x4993d6 of _0x106d08){const _0x51709c=mapRiskToSeverity(_0x4993d6['riskLevel']);_0x51709c&&_0x185a52[_0xf21e06(_0x18fc06._0x52414c)]({'file':_0x4993d6[_0xf21e06(_0x18fc06._0x508767)],'severity':_0x51709c,'description':_0x4993d6['summary']+(_0x170574['qynOe'](_0x4993d6[_0xf21e06(_0x18fc06._0x563589)][_0xf21e06(_0x18fc06._0x5272bb)],0x0)?'\x20(broken\x20imports:\x20'+_0x4993d6[_0xf21e06(_0x18fc06._0x38b3e4)][_0xf21e06(_0x18fc06._0x2e8e63)](',\x20')+')':'')});}const _0x55e12c=_0x2a6fe5||[],_0x5c8f3d=detectCyclesWithSCC(_0x55e12c,_0x153a45);for(const _0x259bfe of _0x5c8f3d){const _0x15402f=_0x259bfe['cycle']['map'](_0x2d8154=>path['relative'](_0x153a45['sourceDir'],_0x2d8154)[_0xf21e06(0xba)](/\\/g,'/'))['join']('\x20->\x20');_0x185a52['push']({'file':path['relative'](_0x153a45['sourceDir'],_0x259bfe[_0xf21e06(0x125)])[_0xf21e06(_0x18fc06._0x787996)](/\\/g,'/'),'severity':_0x170574[_0xf21e06(_0x18fc06._0x54f377)],'description':_0xf21e06(0xc9)+_0x170574['evDgc'](_0x259bfe[_0xf21e06(0x113)][_0xf21e06(_0x18fc06._0x12649a)],0x1)+'\x20files):\x20'+_0x15402f});}const _0x2dcc36=new Map();if(_0x2a6fe5){try{(0x0,risk_scorer_1[_0xf21e06(_0x18fc06._0x45daa6)])(_0x153a45);}catch{}const _0x542025=(0x0,analyze_impact_1[_0xf21e06(_0x18fc06._0x49beaf)])(_0x153a45,0x5),_0x913dd0=new Set(_0x542025['map'](_0x489db3=>_0x489db3[_0xf21e06(0xd7)]));for(const _0x10a9df of _0x2a6fe5){if(!_0x153a45['files']['has'](_0x10a9df))continue;const _0x12b93c=path['relative'](_0x153a45[_0xf21e06(0xda)],_0x10a9df)['replace'](/\\/g,'/');try{const _0x56da98=(0x0,risk_scorer_1[_0xf21e06(0x101)])(_0x10a9df,_0x153a45);_0x2dcc36[_0xf21e06(0xf7)](_0x12b93c,_0x56da98);if(_0x170574[_0xf21e06(0xd1)](_0x56da98[_0xf21e06(_0x18fc06._0x5d57cd)],'CRITICAL'))_0x185a52['push']({'file':_0x12b93c,'severity':'CRITICAL','description':'Critical\x20risk\x20score\x20'+_0x56da98[_0xf21e06(_0x18fc06._0x571a25)]['toFixed'](0x2)+'\x20(fan-in:\x20'+_0x56da98[_0xf21e06(0xb7)]+',\x20cascade:\x20'+_0x56da98['cascadeDepth']+'\x20levels,\x20complexity:\x20'+_0x56da98[_0xf21e06(_0x18fc06._0x37bfd4)]+')'});else _0x170574[_0xf21e06(0xd1)](_0x56da98[_0xf21e06(_0x18fc06._0x3ae1b5)],_0x170574[_0xf21e06(0xd0)])&&_0x185a52['push']({'file':_0x12b93c,'severity':_0x170574[_0xf21e06(_0x18fc06._0x50d1cc)],'description':_0xf21e06(_0x18fc06._0x145c16)+_0x56da98['composite']['toFixed'](0x2)+_0xf21e06(_0x18fc06._0x42dac2)+_0x56da98[_0xf21e06(_0x18fc06._0x1e6d93)]+_0xf21e06(_0x18fc06._0x5c93b9)+_0x56da98['cascadeDepth']+_0xf21e06(0x120)+_0x56da98['complexity']+')'});}catch{}if(_0x913dd0['has'](_0x12b93c)&&!_0x2dcc36['has'](_0x12b93c)){const _0x147372=_0x542025['find'](_0x3d1df0=>_0x3d1df0[_0xf21e06(0xd7)]===_0x12b93c),_0x3ab177={};_0x3ab177['file']=_0x12b93c,_0x3ab177[_0xf21e06(_0x18fc06._0x326588)]=_0xf21e06(_0x18fc06._0x2d2559),_0x3ab177['description']='Hub\x20file\x20modified\x20('+_0x147372['dependentCount']+'\x20dependents,\x20'+_0x147372['riskLevel']+_0xf21e06(_0x18fc06._0x514e24),_0x185a52[_0xf21e06(0xe3)](_0x3ab177);}else{if(_0x913dd0['has'](_0x12b93c)){const _0x4ef605=_0x2dcc36[_0xf21e06(0xe6)](_0x12b93c);if(_0x4ef605&&(_0x4ef605[_0xf21e06(_0x18fc06._0x1f927e)]==='LOW'||_0x4ef605[_0xf21e06(_0x18fc06._0x2df6c1)]===_0x170574[_0xf21e06(_0x18fc06._0x4b7d82)]||_0x4ef605[_0xf21e06(0xe4)]===_0x170574[_0xf21e06(_0x18fc06._0x428631)])){const _0x4a1db8=_0x542025['find'](_0xe87be6=>_0xe87be6[_0xf21e06(0xd7)]===_0x12b93c);_0x185a52['push']({'file':_0x12b93c,'severity':_0xf21e06(0xf1),'description':_0xf21e06(0xd2)+_0x4a1db8[_0xf21e06(_0x18fc06._0x21c93a)]+_0xf21e06(_0x18fc06._0x23ac2c)+_0x4ef605['composite']['toFixed'](0x2)});}}}}try{const _0x52f09b=await(0x0,change_coupling_1['mineGitHistory'])(_0x153a45[_0xf21e06(_0x18fc06._0x92590a)]);if(_0x52f09b['totalCommitsAnalyzed']>0x0){const _0x42fdde=new Set(_0x2a6fe5['map'](_0x316390=>path[_0xf21e06(0xdd)](_0x153a45[_0xf21e06(0x109)],_0x316390)[_0xf21e06(0xba)](/\\/g,'/')));for(const _0x54be07 of _0x2a6fe5){if(!_0x153a45['files'][_0xf21e06(_0x18fc06._0xa53d19)](_0x54be07))continue;const _0x49147e=path['relative'](_0x153a45['projectRoot'],_0x54be07)['replace'](/\\/g,'/'),_0x2ef5b6=(0x0,change_coupling_1[_0xf21e06(_0x18fc06._0x52c3a6)])(_0x49147e,_0x52f09b);for(const _0xda3dbe of _0x2ef5b6){const _0x4ab615=_0xda3dbe['file1']===_0x49147e?_0xda3dbe[_0xf21e06(_0x18fc06._0x464b05)]:_0xda3dbe['file1'];if(_0x42fdde['has'](_0x4ab615))continue;const _0xe37449=path['normalize'](path[_0xf21e06(0xfc)](_0x153a45['projectRoot'],_0x4ab615)),_0x51c06c=_0x153a45['forward']['get'](_0x54be07)||[],_0x21eb93=_0x153a45['reverse'][_0xf21e06(_0x18fc06._0x39b061)](_0x54be07)||[],_0x3d7b4b=_0x51c06c[_0xf21e06(_0x18fc06._0x2e29ea)](_0xe37449)||_0x21eb93[_0xf21e06(0xb2)](_0xe37449);if(_0x3d7b4b)continue;if(_0xda3dbe['confidence']<0.3)continue;const _0x147644=_0xda3dbe[_0xf21e06(0xb8)]>=0.5?'MEDIUM':_0x170574['DQIZW'],_0x194807=Math['round'](_0xda3dbe['confidence']*0x64),_0xb41509=path['relative'](_0x153a45[_0xf21e06(_0x18fc06._0xfff02d)],_0x54be07)['replace'](/\\/g,'/'),_0x39cab7={};_0x39cab7[_0xf21e06(_0x18fc06._0x508767)]=_0xb41509,_0x39cab7[_0xf21e06(0x123)]=_0x147644,_0x39cab7[_0xf21e06(_0x18fc06._0x23803e)]=_0xf21e06(0x104)+_0x4ab615+_0xf21e06(_0x18fc06._0x3abcd2)+_0x194807+'%\x20of\x20commits\x20('+_0xda3dbe[_0xf21e06(_0x18fc06._0x93643f)]+'\x20times)\x20--\x20consider\x20reviewing',_0x185a52['push'](_0x39cab7);}}}}catch{}}const _0x27fa08=_0x185a52['some'](_0x4ac38f=>_0x4ac38f[_0xf21e06(0x123)]===_0xf21e06(0xef)),_0x18cd5f=_0x185a52[_0xf21e06(0xcf)](_0x3ce4c0=>_0x3ce4c0[_0xf21e06(0x123)]===_0xf21e06(0xf5)),_0x15c51a=_0x170574[_0xf21e06(_0x18fc06._0x34a153)](_0x18cd5f['length'],0x0)&&_0x106d08['some'](_0x56bc4f=>_0x56bc4f[_0xf21e06(0xe4)]===_0xf21e06(0xf5)&&_0x56bc4f['brokenImports'][_0xf21e06(0xf4)]>0x0),_0x506e77=_0x170574['lLcdD'](_0x5c8f3d['length'],0x0);let _0x148f72,_0x4ac9a0,_0x5192f7,_0x2f6e3d=0x0;if(_0x27fa08||_0x15c51a||_0x506e77){_0x148f72='FAIL';const _0x4c4c95=[];if(_0x27fa08)_0x4c4c95['push'](_0xf21e06(_0x18fc06._0x154711));if(_0x15c51a)_0x4c4c95[_0xf21e06(0xe3)](_0xf21e06(_0x18fc06._0x13bfb5));if(_0x506e77)_0x4c4c95[_0xf21e06(_0x18fc06._0x37cb2d)](_0x5c8f3d['length']+_0xf21e06(0x102));_0x4ac9a0='BUILD\x20BLOCKED\x20—\x20'+_0x4c4c95['join'](',\x20'),_0x5192f7=_0x170574[_0xf21e06(0xd3)];}else _0x18cd5f[_0xf21e06(0xf4)]>0x0||_0x185a52[_0xf21e06(_0x18fc06._0x2e83a4)](_0x544595=>_0x544595['severity']===_0xf21e06(0xf1))?(_0x148f72=_0x170574['JXdDs'],_0x4ac9a0=_0xf21e06(0xed)+_0x185a52['length']+'\x20issue(s)\x20detected',_0x5192f7=_0x170574[_0xf21e06(0xb4)]):(_0x148f72=_0x170574['NITha'],_0x4ac9a0=_0xf21e06(0x122),_0x5192f7=_0xf21e06(0x121),_0x2f6e3d=(0x0,server_1[_0xf21e06(0x10b)])());const _0xfdad3a={};return _0xfdad3a['verdict']=_0x148f72,_0xfdad3a[_0xf21e06(0x11c)]=_0x4ac9a0,_0xfdad3a['issues']=_0x185a52,_0xfdad3a[_0xf21e06(0xcd)]=_0x5192f7,_0xfdad3a['stats']=_0x720e01,_0xfdad3a[_0xf21e06(_0x18fc06._0x526655)]=_0x2f6e3d,_0xfdad3a[_0xf21e06(_0x18fc06._0x41c40f)]=_0x2dcc36['size']>0x0?_0x2dcc36:undefined,_0xfdad3a;}function _0x4e98(){const _0x1ac5cb=['igrLCgvUzgvUDhmPlcbJB21WB3nPDguGC2nVCMu6ia','lsbbDxrVlwfJA25VD2XLzgDLzdOG','u0fgrq','ufjpq0vfrcbxsvriienbvvrjt04G4Ocuia','iYmJieLZC3vLCW','q1jjveLdquW','zgvMyxvSDa','tuvesvvn','ihjPC2SP','Eg9SDeu','BgvUz3rO','seLhsa','y29dAgfUz2vdB3vUDa','C2v0','qMvdy1e','lcbJyxnJywrLoIa','lsbtDhjVBMDSEsbdB25Uzwn0zwqGq29TCg9Uzw50CZOG','mZG0otG0nKDMrvn4sW','AM9PBG','oeDqCfDHCW','C3rHDhm','DMvYzgLJDa','C2nJq291BNq','z2v0uMLZA1nJB3jL','ignPCMn1BgfYigrLCgvUzgvUy3KOAwvZkq','y2fSBa','sgLZDg9YAwnHBcbJB3vWBgLUzZOG','BeXJzeq','tMX0uKq','q1jjveLdquWGD2fYBMLUz3m','BuTpzKq','ChjVAMvJDfjVB3q','zMLSzti','ywnRBM93BgvKz2vxyxjUAw5NCW','tKLuAge','CMLZA1nJB3jLCW','sgLNAcbYAxnRihnJB3jLia','y29UzgvUC2vK','z2v0shvIrMLSzxm','zMLSzxm','u2TnCvG','y3LJBgu','ELbSrwe','sLHKrhm','y29TChv0zvbYB2PLy3rnzxrYAwnZ','iYmJifn0yxrZ','AgfZt3DUuhjVCgvYDhK','ChjVDg90ExbL','ndu2otu3EgDjsvDP','lI9HBMfSExPLlwLTCgfJDa','C3rHDhvZtgLUzq','y29TCg9ZAxrL','zgvZy3jPChrPB24','lI4VD2vIl3nLCNzLCG','igXLDMvSCYWGy29TCgXLEgL0EtOG','tM8GAxnZDwvZigrLDgvJDgvKlIbzB3uGBwf5ihbYB2nLzwqGD2L0AcbIDwLSzc9KzxbSB3KU','qwXSignSzwfYiokaLcbZywzLihrVigj1AwXK','C2v2zxjPDhK','zgvWzw5Kzw50q291BNq','zMLSzq','nJe3ntG4odb5tNjwExK','icHMyw4TAw46ia','iYmJifjPC2SGu2nVCMvZ','Aw5JBhvKzxm','C29Tzq','rMPgBwC','y3LJBgLJu0ndCW','y29TCgXLEgL0Eq','DhjHBNnPDgL2zuzHBKLU','y29UzMLKzw5Jzq','ufjisLG','CMvWBgfJzq','zgvMAw5LuhjVCgvYDhK','EM1VAKC','AgfZ','otmYotqZr0P4Ew5e','C3DLEeC','ywrK','C2L6zq','DLnNqwS','De5Uy3q','mJmYA21PwwvT','z2v0q291CgXLzezPBgvZ','mJeZntC2qvr5q1ri','C2XPy2u','zgz6tLq','q2LYy3vSyxiGzgvWzw5Kzw5JEsbKzxrLy3rLzcaO','zw51BwvYywjSzq','x19LC01VzhvSzq','wNbAwLm','CMvJB21Tzw5KyxrPB24','lI4Vz2L0l2nOyw5Nzs1JB3vWBgLUzW','zMLSDgvY','ueHmwgC','D2Lqrhy','shvIigzPBguGBw9KAwzPzwqGka','CvP4AM4','yxv0B0fJA25VD2XLzgDLza','yNjVA2vUsw1WB3j0CW','z2v0t3DUuhjVCgvYDhLezxnJCMLWDg9Y','CMvSyxrPDMvqyxrO','zhbeAuC','ndy5mZu1uhD5zvnQ','C291CMnLrgLY','iYmJifn0yxr1CW','ChrUC2W','CMvSyxrPDMu','qMzUseG','mtaYvfHfyMrH','ignOyw5NzxmGD2L0Acb0AgLZigzPBguGAw4G','CxLUt2u','AxndEwnSAwm','ChvZAa','CMLZA0XLDMvS','seLhscb3yxjUAw5NCYb3AxrOigjYB2TLBIbPBxbVCNrZ','z2v0','zM1cvw4','xsOQia','mJm4mtK2mNPdy2rUCq'];_0x4e98=function(){return _0x1ac5cb;};return _0x4e98();}function formatGateResult(_0x3de4d6){const _0x3a1a54={_0xbd48a:0xc3,_0xb205e3:0xe7,_0x27779f:0xb9,_0x2ffb87:0x117,_0x373f9b:0xc2,_0x145770:0xf3,_0x4e1a49:0xff,_0x47977d:0xc3,_0x492e42:0x11c,_0x937203:0xf4,_0x4f76f0:0xf5,_0x5ee0e8:0xcd,_0x5b0574:0xfe,_0x22d312:0x100,_0x45046a:0xfa,_0x21df1b:0xeb,_0x53e493:0xd4,_0x9b806b:0x10d,_0x2bad64:0xc1,_0x38186a:0xe3},_0x6c8ce1=_0x36c162,_0x511413={};_0x511413['dfzNT']=function(_0x599a2a,_0x2fbe2f){return _0x599a2a===_0x2fbe2f;},_0x511413['iPZjn']=function(_0x3def1a,_0x1f9dc2){return _0x3def1a===_0x1f9dc2;},_0x511413[_0x6c8ce1(_0x3a1a54._0xbd48a)]='WARN',_0x511413['Xsngy']=_0x6c8ce1(0xdb),_0x511413[_0x6c8ce1(_0x3a1a54._0xb205e3)]=function(_0x233da5,_0x74e28c){return _0x233da5>_0x74e28c;},_0x511413[_0x6c8ce1(0xdc)]=function(_0x1e1f66,_0x47fe1a){return _0x1e1f66===_0x47fe1a;},_0x511413[_0x6c8ce1(_0x3a1a54._0x27779f)]=_0x6c8ce1(_0x3a1a54._0x2ffb87),_0x511413[_0x6c8ce1(_0x3a1a54._0x373f9b)]=function(_0x5e79cf,_0x2c6cba){return _0x5e79cf!==_0x2c6cba;},_0x511413[_0x6c8ce1(_0x3a1a54._0x145770)]=function(_0x438439,_0x3e2c97){return _0x438439>_0x3e2c97;},_0x511413['EQgAY']=_0x6c8ce1(0xb1);const _0x1cf948=_0x511413,_0x32fbb3=_0x1cf948[_0x6c8ce1(0xc8)](_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x4e1a49)],'PASS')?'✅':_0x1cf948['iPZjn'](_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x4e1a49)],_0x1cf948[_0x6c8ce1(_0x3a1a54._0x47977d)])?'⚠️':'🚫',_0x3aa84d=['##\x20SYKE\x20Build\x20Gate\x20—\x20'+_0x32fbb3+'\x20'+_0x3de4d6['verdict'],'',_0x1cf948['Xsngy'],_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x492e42)]];if(_0x1cf948[_0x6c8ce1(_0x3a1a54._0xb205e3)](_0x3de4d6['issues'][_0x6c8ce1(_0x3a1a54._0x937203)],0x0)){_0x3aa84d[_0x6c8ce1(0xe3)]('',_0x6c8ce1(0xee));for(const _0x255bcc of _0x3de4d6['issues']){const _0x105d29=_0x1cf948['ptnsl'](_0x255bcc['severity'],'CRITICAL')?'🚫':_0x1cf948['iPZjn'](_0x255bcc[_0x6c8ce1(0x123)],_0x6c8ce1(_0x3a1a54._0x4f76f0))?'🔴':_0x1cf948['dfzNT'](_0x255bcc['severity'],'MEDIUM')?'🟡':'🔵';_0x3aa84d['push']('-\x20'+_0x105d29+'\x20**['+_0x255bcc[_0x6c8ce1(0x123)]+_0x6c8ce1(0xe8)+_0x255bcc[_0x6c8ce1(0x125)]+':\x20'+_0x255bcc['description']);}}_0x3aa84d['push']('','###\x20Recommendation',_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x5ee0e8)]),_0x3aa84d[_0x6c8ce1(0xe3)]('',_0x1cf948['PRHJX'],'-\x20Files\x20in\x20graph:\x20'+_0x3de4d6['stats']['filesInGraph'],'-\x20Unresolved\x20warnings:\x20'+_0x3de4d6['stats']['unresolvedWarnings']);_0x1cf948[_0x6c8ce1(0xc2)](_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x5b0574)][_0x6c8ce1(_0x3a1a54._0x22d312)],undefined)&&_0x3aa84d['push'](_0x6c8ce1(_0x3a1a54._0x45046a)+_0x3de4d6['stats'][_0x6c8ce1(0x100)]);_0x1cf948['vSgAk'](_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x5b0574)]['cyclicSCCs'],undefined)&&_0x1cf948[_0x6c8ce1(0xe7)](_0x3de4d6[_0x6c8ce1(0xfe)]['cyclicSCCs'],0x0)&&_0x3aa84d['push']('-\x20Circular\x20dependency\x20clusters:\x20'+_0x3de4d6['stats']['cyclicSCCs']);_0x1cf948['xoltE'](_0x3de4d6['autoAcknowledged'],0x0)&&_0x3aa84d['push'](_0x6c8ce1(_0x3a1a54._0x21df1b)+_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x53e493)]+'\x20warning(s)');if(_0x3de4d6[_0x6c8ce1(_0x3a1a54._0x9b806b)]&&_0x3de4d6[_0x6c8ce1(0x10d)][_0x6c8ce1(_0x3a1a54._0x2bad64)]>0x0){_0x3aa84d[_0x6c8ce1(_0x3a1a54._0x38186a)]('',_0x1cf948['EQgAY']);for(const [_0x5f2c17,_0x2ba5a9]of _0x3de4d6['riskScores']){_0x3aa84d[_0x6c8ce1(0xe3)]('**'+_0x5f2c17+':**'),_0x3aa84d['push']((0x0,risk_scorer_1['formatRiskScore'])(_0x2ba5a9)),_0x3aa84d['push']('');}}return _0x3aa84d[_0x6c8ce1(0xfc)]('\x0a');}function mapRiskToSeverity(_0x39baa7){const _0x555a2e={_0x1fff60:0x108,_0x5d0a03:0xf5},_0x3b7bfb=_0x36c162,_0x309c02={};_0x309c02[_0x3b7bfb(_0x555a2e._0x1fff60)]=_0x3b7bfb(_0x555a2e._0x5d0a03),_0x309c02['aqjJN']='LOW';const _0x2b7fe3=_0x309c02;switch(_0x39baa7){case'CRITICAL':return'CRITICAL';case _0x2b7fe3[_0x3b7bfb(0x108)]:return _0x3b7bfb(0xf5);case'MEDIUM':return _0x3b7bfb(0xf1);case _0x2b7fe3['aqjJN']:return'LOW';default:return null;}}