@triedotdev/mcp 1.0.64 → 1.0.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agent-smith-W4HUCFGC.js → agent-smith-ILGLKYRT.js} +2 -2
- package/dist/{agent-smith-runner-QRVOEOBE.js → agent-smith-runner-NWJGTREO.js} +2 -2
- package/dist/{chunk-ALA6733H.js → chunk-3RQPPRM3.js} +2 -2
- package/dist/{chunk-N2AZH3EQ.js → chunk-DQ4FYOHV.js} +4 -4
- package/dist/{chunk-X2PABPBH.js → chunk-H5MDUTL3.js} +2 -2
- package/dist/{chunk-R7Z7OHTJ.js → chunk-JP4U3OMW.js} +2 -2
- package/dist/{chunk-K6BQBKIR.js → chunk-NM35UECE.js} +6 -6
- package/dist/chunk-NM35UECE.js.map +1 -0
- package/dist/cli/main.js +4 -4
- package/dist/cli/yolo-daemon.js +4 -4
- package/dist/index.js +26 -26
- package/dist/index.js.map +1 -1
- package/dist/workers/agent-worker.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-K6BQBKIR.js.map +0 -1
- /package/dist/{agent-smith-W4HUCFGC.js.map → agent-smith-ILGLKYRT.js.map} +0 -0
- /package/dist/{agent-smith-runner-QRVOEOBE.js.map → agent-smith-runner-NWJGTREO.js.map} +0 -0
- /package/dist/{chunk-ALA6733H.js.map → chunk-3RQPPRM3.js.map} +0 -0
- /package/dist/{chunk-N2AZH3EQ.js.map → chunk-DQ4FYOHV.js.map} +0 -0
- /package/dist/{chunk-X2PABPBH.js.map → chunk-H5MDUTL3.js.map} +0 -0
- /package/dist/{chunk-R7Z7OHTJ.js.map → chunk-JP4U3OMW.js.map} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSmithSkill,
|
|
3
3
|
PATTERN_HUNTER_CONFIGS
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NM35UECE.js";
|
|
5
5
|
import "./chunk-AQCAMIQQ.js";
|
|
6
6
|
import "./chunk-KOFQ47YW.js";
|
|
7
7
|
import "./chunk-RAZUNSBI.js";
|
|
@@ -11,4 +11,4 @@ export {
|
|
|
11
11
|
AgentSmithSkill,
|
|
12
12
|
PATTERN_HUNTER_CONFIGS
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=agent-smith-
|
|
14
|
+
//# sourceMappingURL=agent-smith-ILGLKYRT.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSmithSkill
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NM35UECE.js";
|
|
4
4
|
import {
|
|
5
5
|
getAIStatusMessage,
|
|
6
6
|
isAIAvailable,
|
|
@@ -570,4 +570,4 @@ ${getAIStatusMessage()}`);
|
|
|
570
570
|
export {
|
|
571
571
|
runAgentSmith
|
|
572
572
|
};
|
|
573
|
-
//# sourceMappingURL=agent-smith-runner-
|
|
573
|
+
//# sourceMappingURL=agent-smith-runner-NWJGTREO.js.map
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
CustomSkill,
|
|
3
3
|
getSkillRegistry,
|
|
4
4
|
loadContextState
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-H5MDUTL3.js";
|
|
6
6
|
import {
|
|
7
7
|
getGlobalMemoryStats
|
|
8
8
|
} from "./chunk-7KHT2NKR.js";
|
|
@@ -1779,4 +1779,4 @@ export {
|
|
|
1779
1779
|
getSkillsByCategory,
|
|
1780
1780
|
getSkillCategories
|
|
1781
1781
|
};
|
|
1782
|
-
//# sourceMappingURL=chunk-
|
|
1782
|
+
//# sourceMappingURL=chunk-3RQPPRM3.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
getSkillsByCategory,
|
|
17
17
|
isGitRepo,
|
|
18
18
|
isTrieInitialized
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3RQPPRM3.js";
|
|
20
20
|
import {
|
|
21
21
|
getGuardianState
|
|
22
22
|
} from "./chunk-4YSLDGBL.js";
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
loadContextState,
|
|
30
30
|
removeGlobalSkill,
|
|
31
31
|
updateContextAfterScan
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-H5MDUTL3.js";
|
|
33
33
|
import {
|
|
34
34
|
Trie
|
|
35
35
|
} from "./chunk-6NLHFIYA.js";
|
|
36
36
|
import {
|
|
37
37
|
getOutputManager
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-NM35UECE.js";
|
|
39
39
|
import {
|
|
40
40
|
isAIAvailable
|
|
41
41
|
} from "./chunk-AQCAMIQQ.js";
|
|
@@ -9899,4 +9899,4 @@ export {
|
|
|
9899
9899
|
InteractiveDashboard,
|
|
9900
9900
|
TrieScanTool
|
|
9901
9901
|
};
|
|
9902
|
-
//# sourceMappingURL=chunk-
|
|
9902
|
+
//# sourceMappingURL=chunk-DQ4FYOHV.js.map
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
AgentSmithSkill,
|
|
12
12
|
BaseSkill,
|
|
13
13
|
output
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NM35UECE.js";
|
|
15
15
|
import {
|
|
16
16
|
isAIAvailable,
|
|
17
17
|
runAIAnalysis
|
|
@@ -10451,4 +10451,4 @@ export {
|
|
|
10451
10451
|
CustomSkill,
|
|
10452
10452
|
getSkillRegistry
|
|
10453
10453
|
};
|
|
10454
|
-
//# sourceMappingURL=chunk-
|
|
10454
|
+
//# sourceMappingURL=chunk-H5MDUTL3.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
getStagedChanges,
|
|
6
6
|
getUncommittedChanges,
|
|
7
7
|
getWorkingTreeDiff
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-3RQPPRM3.js";
|
|
9
9
|
import {
|
|
10
10
|
Trie
|
|
11
11
|
} from "./chunk-6NLHFIYA.js";
|
|
@@ -1828,4 +1828,4 @@ export {
|
|
|
1828
1828
|
IncidentIndex,
|
|
1829
1829
|
TrieFeedbackTool
|
|
1830
1830
|
};
|
|
1831
|
-
//# sourceMappingURL=chunk-
|
|
1831
|
+
//# sourceMappingURL=chunk-JP4U3OMW.js.map
|
|
@@ -174,7 +174,7 @@ ${pc.dim("File:")} ${snippet.file}`);
|
|
|
174
174
|
break;
|
|
175
175
|
case "cost":
|
|
176
176
|
const cost = content.content;
|
|
177
|
-
console.error("\n" + pc.cyan("
|
|
177
|
+
console.error("\n" + pc.cyan("[$] Cost Estimate:"));
|
|
178
178
|
console.error(` Fix now: ${pc.green(this.formatCurrency(cost.fixNowCost))}`);
|
|
179
179
|
console.error(` If production: ${pc.red(this.formatCurrency(cost.productionCost))}`);
|
|
180
180
|
console.error(` Savings: ${pc.yellow(this.formatCurrency(cost.savings))}`);
|
|
@@ -183,7 +183,7 @@ ${pc.dim("File:")} ${snippet.file}`);
|
|
|
183
183
|
case "readiness":
|
|
184
184
|
const readiness = content.content;
|
|
185
185
|
const statusColor = readiness.status === "ready" ? pc.green : readiness.status === "caution" ? pc.yellow : pc.red;
|
|
186
|
-
console.error("\n" + pc.cyan("
|
|
186
|
+
console.error("\n" + pc.cyan("[%] Production Readiness:"));
|
|
187
187
|
console.error(` Score: ${statusColor(readiness.score + "/100")}`);
|
|
188
188
|
console.error(` Requirements: ${readiness.requirementsMet}/${readiness.total}`);
|
|
189
189
|
console.error(` Status: ${statusColor(readiness.status.toUpperCase())}`);
|
|
@@ -191,7 +191,7 @@ ${pc.dim("File:")} ${snippet.file}`);
|
|
|
191
191
|
break;
|
|
192
192
|
case "semantic":
|
|
193
193
|
const semantic = content.content;
|
|
194
|
-
console.error("\n" + pc.cyan("
|
|
194
|
+
console.error("\n" + pc.cyan("[?] Semantic Analysis:"));
|
|
195
195
|
if (semantic.dataFlowIssues > 0) {
|
|
196
196
|
console.error(` ${pc.red("[!]")} ${semantic.dataFlowIssues} data flow vulnerabilities`);
|
|
197
197
|
}
|
|
@@ -205,7 +205,7 @@ ${pc.dim("File:")} ${snippet.file}`);
|
|
|
205
205
|
break;
|
|
206
206
|
case "attack":
|
|
207
207
|
const attack = content.content;
|
|
208
|
-
console.error("\n" + pc.cyan("
|
|
208
|
+
console.error("\n" + pc.cyan("[>] Attack Surface:"));
|
|
209
209
|
console.error(` Endpoints: ${attack.totalEndpoints}`);
|
|
210
210
|
if (attack.unprotected > 0) {
|
|
211
211
|
console.error(` ${pc.red("Unprotected:")} ${attack.unprotected}`);
|
|
@@ -233,7 +233,7 @@ ${pc.dim("File:")} ${snippet.file}`);
|
|
|
233
233
|
case "nudge":
|
|
234
234
|
const nudge = content.content;
|
|
235
235
|
const nudgeColor = nudge.severity === "critical" ? pc.red : nudge.severity === "warning" ? pc.yellow : pc.cyan;
|
|
236
|
-
const nudgeIcon = nudge.severity === "critical" ? "
|
|
236
|
+
const nudgeIcon = nudge.severity === "critical" ? "[!!!]" : nudge.severity === "warning" ? "[!]" : "[>]";
|
|
237
237
|
console.error("");
|
|
238
238
|
console.error(nudgeColor("\u2501".repeat(60)));
|
|
239
239
|
console.error(nudgeColor(`${nudgeIcon} GUARDIAN AGENT SAYS:`));
|
|
@@ -2264,4 +2264,4 @@ export {
|
|
|
2264
2264
|
PATTERN_HUNTER_CONFIGS,
|
|
2265
2265
|
AgentSmithSkill
|
|
2266
2266
|
};
|
|
2267
|
-
//# sourceMappingURL=chunk-
|
|
2267
|
+
//# sourceMappingURL=chunk-NM35UECE.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/skills/built-in/base-skill.ts","../src/utils/output-manager.ts","../src/skills/built-in/agent-smith.ts"],"sourcesContent":["import type { Skill, SkillResult, ScanContext, Issue, CodeContext, SkillPriority } from '../../types/index.js';\nimport { AgentProgressReporter } from '../../utils/progress.js';\nimport { relative } from 'path';\nimport { isAIAvailable, runAIAnalysis, getAIStatusMessage } from '../../ai/client.js';\nimport { isInteractiveMode } from '../../utils/progress.js';\nimport { output } from '../../utils/output-manager.js';\n\n/**\n * AI Analysis Request - what the agent wants AI to analyze\n */\nexport interface AIAnalysisRequest {\n /** The file being analyzed */\n file: string;\n /** Relevant code content to analyze */\n code: string;\n /** What kind of analysis to perform */\n analysisType: string;\n /** System prompt for the AI */\n systemPrompt: string;\n /** User prompt with specific instructions */\n userPrompt: string;\n /** Additional context for the AI */\n context?: Record<string, unknown>;\n /** Files/code that might be relevant for cross-reference */\n relatedCode?: Array<{ file: string; code: string }>;\n}\n\n/**\n * AI Analysis Result - structured output from AI analysis\n */\nexport interface AIAnalysisResult {\n issues: Array<{\n severity: 'critical' | 'serious' | 'moderate' | 'low';\n title: string;\n description: string;\n line?: number;\n fix: string;\n confidence: number;\n }>;\n summary: string;\n}\n\n/**\n * File relevance check result\n */\nexport interface FileRelevance {\n isRelevant: boolean;\n reason: string;\n priority: 'high' | 'medium' | 'low';\n indicators: string[];\n}\n\nexport abstract class BaseSkill implements Skill {\n abstract name: string;\n abstract description: string;\n abstract version: string;\n \n // Optional author attribution\n author?: string;\n authorUrl?: string;\n \n // Progress reporter for real-time feedback\n protected progress: AgentProgressReporter | null = null;\n \n // Default priority - subclasses can override\n get priority(): SkillPriority {\n return {\n name: this.name,\n tier: 2,\n estimatedTimeMs: 100,\n dependencies: []\n };\n }\n\n abstract shouldActivate(context: CodeContext): boolean;\n\n // Default implementation - can be overridden for smarter confidence\n getActivationConfidence(context: CodeContext): number {\n return this.shouldActivate(context) ? 0.7 : 0;\n }\n\n /**\n * Main scan entry point - now with progress reporting\n */\n async scan(files: string[], context: ScanContext): Promise<SkillResult> {\n const startTime = Date.now();\n this.progress = new AgentProgressReporter(this.name);\n this.progress.start();\n\n try {\n // Use AI-first analysis if available, otherwise fall back to pattern matching\n const issues = await this.analyzeWithAI(files, context);\n\n this.progress.complete(`${issues.length} issues found`);\n \n // Send nudge for critical findings (unless skill handles its own nudges)\n if (issues.length > 0 && !this.handlesOwnNudges()) {\n this.sendIssueNudge(issues);\n }\n\n return {\n agent: this.name,\n issues,\n executionTime: Date.now() - startTime,\n success: true,\n metadata: {\n filesAnalyzed: files.length,\n linesAnalyzed: 0,\n }\n };\n } catch (error) {\n this.progress.complete('Failed');\n return {\n agent: this.name,\n issues: [],\n executionTime: Date.now() - startTime,\n success: false,\n error: error instanceof Error ? error.message : String(error)\n };\n }\n }\n\n /**\n * Hybrid AI + Pattern Analysis\n * \n * 1. Run fast pattern detection on all files\n * 2. If AI is available (ANTHROPIC_API_KEY set), enhance with AI analysis\n * 3. AI validates findings, finds additional issues, provides intelligent fixes\n * \n * Subclasses can override for custom behavior\n */\n protected async analyzeWithAI(files: string[], context: ScanContext): Promise<Issue[]> {\n // Phase 1: Pattern-based analysis (fast)\n this.progress?.aiReview('Running pattern detection...');\n const patternIssues = await this.analyzeFiles(files, context);\n \n // Check if AI is available\n if (!isAIAvailable()) {\n if (!isInteractiveMode()) {\n console.error(` ${getAIStatusMessage()}`);\n }\n return patternIssues;\n }\n \n // Phase 2: AI-enhanced analysis\n if (patternIssues.length > 0 || this.shouldAlwaysUseAI()) {\n this.progress?.aiReview('Enhancing with AI analysis...');\n \n try {\n const enhancedIssues = await this.runAIEnhancement(patternIssues, files, context);\n return this.mergeIssues(enhancedIssues, patternIssues);\n } catch (error) {\n // AI failed, fall back to pattern-only results\n if (!isInteractiveMode()) {\n console.error(` AI enhancement failed: ${error instanceof Error ? error.message : String(error)}`);\n }\n return patternIssues;\n }\n }\n \n return patternIssues;\n }\n \n /**\n * Whether this agent should always use AI even if no patterns detected\n */\n protected shouldAlwaysUseAI(): boolean {\n return false; // Override in subclasses that need AI for all analysis\n }\n \n /**\n * Whether this skill handles its own nudge notifications\n * Override to true if the skill sends custom nudges (like Agent Smith)\n */\n protected handlesOwnNudges(): boolean {\n return false;\n }\n \n /**\n * Send a nudge notification based on issue severity\n * Called automatically after analysis unless handlesOwnNudges() returns true\n */\n protected sendIssueNudge(issues: Issue[]): void {\n const criticalCount = issues.filter(i => i.severity === 'critical').length;\n const seriousCount = issues.filter(i => i.severity === 'serious').length;\n \n // Only nudge for critical/serious issues to avoid notification spam\n if (criticalCount > 0) {\n output().nudge(\n `🚨 ${this.name} found ${criticalCount} critical issue${criticalCount > 1 ? 's' : ''}!`,\n 'critical',\n undefined,\n undefined // Keep visible until dismissed\n );\n } else if (seriousCount >= 2) {\n // Only nudge for serious if there are multiple\n output().nudge(\n `⚠️ ${this.name} found ${seriousCount} serious issues to review.`,\n 'warning',\n undefined,\n 15000 // Auto-hide after 15s\n );\n }\n }\n \n /**\n * Run AI enhancement on pattern detection results\n * Subclasses can override for custom AI behavior\n */\n protected async runAIEnhancement(\n patternIssues: Issue[],\n files: string[],\n _context: ScanContext\n ): Promise<Issue[]> {\n // Collect code snippets for top issues\n const snippets: Array<{ file: string; line: number | undefined; issue: string; code: string }> = [];\n \n // Sort by severity to prioritize critical issues\n const sortedIssues = [...patternIssues].sort((a, b) => {\n const order = { critical: 0, serious: 1, moderate: 2, low: 3 };\n return order[a.severity] - order[b.severity];\n });\n \n // Get snippets for top 15 issues\n for (const issue of sortedIssues.slice(0, 15)) {\n try {\n const content = await this.readFile(issue.file);\n const snippet = this.getCodeSnippet(content, issue.line || 1, 5);\n snippets.push({\n file: this.getRelativePath(issue.file),\n line: issue.line,\n issue: issue.issue,\n code: snippet\n });\n } catch {\n // Skip if can't read file\n }\n }\n \n if (snippets.length === 0) {\n return []; // No snippets to analyze\n }\n \n // Build AI prompt\n const userPrompt = this.buildAIEnhancementPrompt(snippets, patternIssues.length);\n \n const result = await runAIAnalysis({\n systemPrompt: this.getAIEnhancementSystemPrompt(),\n userPrompt,\n maxTokens: 4096,\n temperature: 0.2\n });\n \n if (!result.success) {\n throw new Error(result.error || 'AI analysis failed');\n }\n \n // Parse AI response into issues\n return this.parseAIEnhancementResponse(result.content, files);\n }\n \n /**\n * System prompt for AI enhancement\n */\n protected getAIEnhancementSystemPrompt(): string {\n return `You are an expert ${this.name} code analyst. You are enhancing pattern-detected issues with deeper analysis.\n\nYour job:\n1. VALIDATE: Confirm if each issue is a TRUE problem or FALSE positive\n2. EXPAND: Identify related issues that patterns missed\n3. PRIORITIZE: Rank by real-world impact (0-100 inevitability score)\n4. FIX: Provide specific, copy-paste-ready code fixes\n\nOutput format (STRICT JSON):\n{\n \"validated\": [\n {\n \"original_issue\": \"...\",\n \"verdict\": \"TRUE_POSITIVE\" | \"FALSE_POSITIVE\",\n \"confidence\": 0-100,\n \"file\": \"path/to/file\",\n \"line\": 123,\n \"severity\": \"critical\" | \"serious\" | \"moderate\" | \"low\",\n \"explanation\": \"Why this is/isn't a problem\",\n \"fix\": \"Specific code fix\"\n }\n ],\n \"additional\": [\n {\n \"issue\": \"New issue found by AI\",\n \"file\": \"path/to/file\",\n \"line\": 123,\n \"severity\": \"critical\" | \"serious\" | \"moderate\" | \"low\", \n \"explanation\": \"What's wrong\",\n \"fix\": \"How to fix it\"\n }\n ],\n \"summary\": \"One paragraph summary of findings\"\n}`;\n }\n \n /**\n * Build the user prompt for AI enhancement\n */\n protected buildAIEnhancementPrompt(\n snippets: Array<{ file: string; line: number | undefined; issue: string; code: string }>,\n totalIssues: number\n ): string {\n const snippetText = snippets.map((s, i) => \n `### Issue ${i + 1}: ${s.file}${s.line ? ':' + s.line : ''}\n**Pattern detected:** ${s.issue}\n\\`\\`\\`\n${s.code}\n\\`\\`\\`\n`).join('\\n');\n\n return `Pattern detection found ${totalIssues} total issues. Here are the top ${snippets.length} for AI analysis:\n\n${snippetText}\n\nAnalyze each issue. Validate, expand, and provide fixes. Output JSON only.`;\n }\n \n /**\n * Parse AI enhancement response into issues\n */\n protected parseAIEnhancementResponse(response: string, _files: string[]): Issue[] {\n const issues: Issue[] = [];\n \n try {\n // Extract JSON from response (might be wrapped in markdown code blocks)\n const jsonMatch = response.match(/```json\\s*([\\s\\S]*?)\\s*```/) || \n response.match(/\\{[\\s\\S]*\\}/);\n \n if (!jsonMatch) {\n return issues;\n }\n \n const json = JSON.parse(jsonMatch[1] || jsonMatch[0]);\n \n // Process validated issues\n if (json.validated && Array.isArray(json.validated)) {\n for (const v of json.validated) {\n if (v.verdict === 'TRUE_POSITIVE') {\n issues.push(this.createIssue(\n this.generateIssueId(),\n v.severity || 'moderate',\n `[AI VALIDATED] ${v.original_issue || v.explanation}`,\n v.fix || 'See AI analysis',\n v.file || 'unknown',\n v.line,\n (v.confidence || 80) / 100,\n undefined,\n false,\n { category: 'ai-validated' }\n ));\n }\n }\n }\n \n // Process additional issues found by AI\n if (json.additional && Array.isArray(json.additional)) {\n for (const a of json.additional) {\n issues.push(this.createIssue(\n this.generateIssueId(),\n a.severity || 'moderate',\n `[AI FOUND] ${a.issue || a.explanation}`,\n a.fix || 'See AI analysis',\n a.file || 'unknown',\n a.line,\n 0.85, // AI-found issues have good confidence\n undefined,\n false,\n { category: 'ai-found' }\n ));\n }\n }\n } catch (error) {\n // JSON parsing failed - try line-by-line parsing\n // This is a fallback for when AI doesn't output strict JSON\n }\n \n return issues;\n }\n\n /**\n * Check if a file is relevant for this agent's analysis\n * Subclasses should override for domain-specific checks\n */\n protected checkFileRelevance(_file: string, _content: string): FileRelevance {\n // Default: all files are relevant with low priority\n return {\n isRelevant: true,\n reason: 'Default analysis',\n priority: 'low',\n indicators: []\n };\n }\n\n /**\n * Merge and deduplicate issues from AI and pattern analysis\n */\n protected mergeIssues(aiIssues: Issue[], legacyIssues: Issue[]): Issue[] {\n // Simple merge - prefer AI issues, add legacy issues that don't overlap\n const merged = [...aiIssues];\n \n for (const legacy of legacyIssues) {\n // Check if there's an overlapping AI issue for the same file/line\n const hasOverlap = aiIssues.some(ai => \n ai.file === legacy.file && \n ai.line === legacy.line\n );\n \n if (!hasOverlap) {\n merged.push(legacy);\n }\n }\n \n return merged;\n }\n\n /**\n * Get relative path from cwd\n */\n protected getRelativePath(file: string): string {\n try {\n return relative(process.cwd(), file);\n } catch {\n return file;\n }\n }\n\n /**\n * Legacy pattern-based analysis - kept for backwards compatibility\n * Subclasses can override or deprecate\n */\n protected abstract analyzeFiles(files: string[], context: ScanContext): Promise<Issue[]>;\n\n /**\n * Format an issue message with consistent structure\n * All agents should use this for uniformity\n */\n protected formatIssueMessage(description: string, context?: string): string {\n // Clean up any existing emoji prefixes\n let cleanDesc = description\n .replace(/^[^\\w\\[]*/, '') // Remove leading emojis/special chars\n .trim();\n \n // Add agent prefix for traceability\n const prefix = `[${this.name.toUpperCase()}]`;\n \n if (context) {\n return `${prefix} ${cleanDesc} -- ${context}`;\n }\n return `${prefix} ${cleanDesc}`;\n }\n\n protected createIssue(\n id: string,\n severity: Issue['severity'],\n issue: string,\n fix: string,\n file: string,\n line?: number,\n confidence: number = 0.9,\n regulation?: string,\n autoFixable: boolean = true,\n options?: {\n category?: string;\n cwe?: string;\n owasp?: string;\n effort?: Issue['effort'];\n endLine?: number;\n column?: number;\n }\n ): Issue {\n const result: Issue = {\n id,\n severity,\n issue,\n fix,\n file,\n confidence,\n autoFixable,\n agent: this.name,\n effort: options?.effort ?? this.estimateEffort(severity, autoFixable)\n };\n \n // Only add optional properties if they have values\n if (line !== undefined) result.line = line;\n if (options?.endLine !== undefined) result.endLine = options.endLine;\n if (options?.column !== undefined) result.column = options.column;\n if (regulation !== undefined) result.regulation = regulation;\n if (options?.category !== undefined) result.category = options.category;\n if (options?.cwe !== undefined) result.cwe = options.cwe;\n if (options?.owasp !== undefined) result.owasp = options.owasp;\n \n return result;\n }\n\n private estimateEffort(severity: Issue['severity'], autoFixable: boolean): 'trivial' | 'easy' | 'medium' | 'hard' {\n if (autoFixable) return 'trivial';\n if (severity === 'low') return 'easy';\n if (severity === 'moderate') return 'easy';\n if (severity === 'serious') return 'medium';\n return 'hard';\n }\n\n protected async readFile(filePath: string): Promise<string> {\n const { readFile } = await import('fs/promises');\n return readFile(filePath, 'utf-8');\n }\n\n protected generateIssueId(): string {\n return `${this.name}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;\n }\n\n protected getLineContent(content: string, lineNumber: number): string {\n const lines = content.split('\\n');\n return lines[lineNumber - 1] || '';\n }\n\n protected getCodeSnippet(content: string, lineNumber: number, contextLines: number = 2): string {\n const lines = content.split('\\n');\n const start = Math.max(0, lineNumber - contextLines - 1);\n const end = Math.min(lines.length, lineNumber + contextLines);\n \n return lines\n .slice(start, end)\n .map((line, idx) => {\n const num = start + idx + 1;\n const marker = num === lineNumber ? '→' : ' ';\n return `${marker} ${num.toString().padStart(4)} | ${line}`;\n })\n .join('\\n');\n }\n}\n\n// Backward compatibility export\nexport { BaseSkill as BaseAgent };\n","/**\n * OutputManager - Unified output abstraction for all UI modes\n * \n * Routes content to the appropriate renderer based on current mode:\n * - TUI: Routes to InteractiveDashboard\n * - Console: Routes to console.error with ANSI colors\n * - MCP: Accumulates for markdown response\n * - JSON: Accumulates for JSON response\n * - Silent: Discards output\n * \n * This solves the problem of skills suppressing content in interactive mode\n * by redirecting it to the dashboard instead.\n */\n\nimport type { Issue } from '../types/index.js';\nimport type { StreamingManager } from './streaming.js';\nimport { isInteractiveMode } from './progress.js';\nimport pc from 'picocolors';\n\n// Output content types\nexport type OutputContentType = \n | 'banner' // ASCII art banner from skills\n | 'progress' // Progress update\n | 'issue' // Issue found\n | 'snippet' // Code snippet with context\n | 'cost' // Cost estimate from Moneybags\n | 'readiness' // Production readiness score\n | 'semantic' // Semantic analysis (data flow, race conditions)\n | 'attack' // Attack surface analysis\n | 'activity' // Activity log message\n | 'report' // Full markdown report section\n | 'log' // Raw log message\n | 'nudge'; // Proactive guardian notification\n\n// Nudge content for proactive notifications\nexport interface NudgeContent {\n message: string;\n severity: 'critical' | 'warning' | 'info';\n file?: string;\n autoHideMs?: number; // Auto-dismiss after this many milliseconds\n}\n\nexport interface BannerContent {\n skill: string;\n art: string;\n quote?: string;\n version?: string;\n}\n\nexport interface SnippetContent {\n file: string;\n lines: string[];\n highlightLine?: number;\n startLine: number;\n}\n\nexport interface CostContent {\n fixNowCost: number;\n productionCost: number;\n savings: number;\n perIssue?: Array<{ issue: string; cost: number }>;\n}\n\nexport interface ReadinessContent {\n score: number;\n requirementsMet: number;\n total: number;\n status: 'ready' | 'caution' | 'not-ready';\n requirements?: Array<{ name: string; met: boolean }>;\n}\n\nexport interface SemanticContent {\n dataFlowIssues: number;\n raceConditions: number;\n authIssues: number;\n details?: Array<{ type: string; description: string; file: string; line?: number }>;\n}\n\nexport interface AttackSurfaceContent {\n totalEndpoints: number;\n unprotected: number;\n riskScore: number;\n endpoints?: Array<{ path: string; method: string; auth: boolean; sensitive: boolean }>;\n}\n\nexport interface OutputContent {\n type: OutputContentType;\n content: any;\n timestamp?: number;\n metadata?: {\n severity?: 'critical' | 'serious' | 'moderate' | 'low';\n agent?: string;\n file?: string;\n };\n}\n\nexport type OutputMode = 'tui' | 'console' | 'mcp' | 'json' | 'silent';\n\n/**\n * Central output manager - singleton\n */\nclass OutputManagerImpl {\n private mode: OutputMode = 'console';\n private streamingManager?: StreamingManager;\n private markdownBuffer: string[] = [];\n private jsonBuffer: OutputContent[] = [];\n private rawLogBuffer: Array<{ time: string; level: string; message: string }> = [];\n \n // Callbacks for TUI integration (explicitly allow undefined for exactOptionalPropertyTypes)\n private onBanner: ((content: BannerContent) => void) | undefined = undefined;\n private onSnippet: ((content: SnippetContent) => void) | undefined = undefined;\n private onCost: ((content: CostContent) => void) | undefined = undefined;\n private onReadiness: ((content: ReadinessContent) => void) | undefined = undefined;\n private onSemantic: ((content: SemanticContent) => void) | undefined = undefined;\n private onAttack: ((content: AttackSurfaceContent) => void) | undefined = undefined;\n private onActivity: ((message: string) => void) | undefined = undefined;\n private onLog: ((level: string, message: string) => void) | undefined = undefined;\n private onNudge: ((content: NudgeContent) => void) | undefined = undefined;\n\n /**\n * Set the output mode\n */\n setMode(mode: OutputMode): void {\n this.mode = mode;\n }\n\n /**\n * Get current output mode\n */\n getMode(): OutputMode {\n return this.mode;\n }\n\n /**\n * Set streaming manager for TUI updates\n */\n setStreamingManager(manager: StreamingManager): void {\n this.streamingManager = manager;\n }\n\n /**\n * Register TUI callbacks for rich content\n */\n registerTUICallbacks(callbacks: {\n onBanner?: (content: BannerContent) => void;\n onSnippet?: (content: SnippetContent) => void;\n onCost?: (content: CostContent) => void;\n onReadiness?: (content: ReadinessContent) => void;\n onSemantic?: (content: SemanticContent) => void;\n onAttack?: (content: AttackSurfaceContent) => void;\n onActivity?: (message: string) => void;\n onLog?: (level: string, message: string) => void;\n onNudge?: (content: NudgeContent) => void;\n }): void {\n this.onBanner = callbacks.onBanner;\n this.onSnippet = callbacks.onSnippet;\n this.onCost = callbacks.onCost;\n this.onReadiness = callbacks.onReadiness;\n this.onSemantic = callbacks.onSemantic;\n this.onAttack = callbacks.onAttack;\n this.onActivity = callbacks.onActivity;\n this.onLog = callbacks.onLog;\n this.onNudge = callbacks.onNudge;\n }\n\n /**\n * Clear TUI callbacks (when dashboard stops)\n */\n clearTUICallbacks(): void {\n this.onBanner = undefined;\n this.onSnippet = undefined;\n this.onCost = undefined;\n this.onReadiness = undefined;\n this.onSemantic = undefined;\n this.onAttack = undefined;\n this.onActivity = undefined;\n this.onLog = undefined;\n this.onNudge = undefined;\n }\n\n /**\n * Emit content - routes to appropriate handler based on mode\n */\n emit(content: OutputContent): void {\n content.timestamp = content.timestamp ?? Date.now();\n \n switch (this.mode) {\n case 'tui':\n this.routeToTUI(content);\n break;\n case 'console':\n this.routeToConsole(content);\n break;\n case 'mcp':\n this.routeToMarkdown(content);\n break;\n case 'json':\n this.routeToJson(content);\n break;\n case 'silent':\n // Discard\n break;\n }\n \n // Always capture in raw log buffer\n this.captureRawLog(content);\n }\n\n /**\n * Route content to TUI (dashboard callbacks)\n */\n private routeToTUI(content: OutputContent): void {\n switch (content.type) {\n case 'banner':\n this.onBanner?.(content.content as BannerContent);\n break;\n case 'snippet':\n this.onSnippet?.(content.content as SnippetContent);\n break;\n case 'cost':\n this.onCost?.(content.content as CostContent);\n break;\n case 'readiness':\n this.onReadiness?.(content.content as ReadinessContent);\n break;\n case 'semantic':\n this.onSemantic?.(content.content as SemanticContent);\n break;\n case 'attack':\n this.onAttack?.(content.content as AttackSurfaceContent);\n break;\n case 'activity':\n this.onActivity?.(content.content as string);\n break;\n case 'log':\n const level = content.metadata?.severity ?? 'info';\n this.onLog?.(level, content.content as string);\n break;\n case 'issue':\n // Issues go through streaming manager\n this.streamingManager?.reportIssue(content.content as Issue);\n break;\n case 'progress':\n // Progress goes through streaming manager\n break;\n case 'report':\n // Reports are captured but not directly displayed\n break;\n case 'nudge':\n // Proactive notifications go to dashboard\n this.onNudge?.(content.content as NudgeContent);\n break;\n }\n }\n\n /**\n * Route content to console (ANSI formatted)\n */\n private routeToConsole(content: OutputContent): void {\n switch (content.type) {\n case 'banner':\n const banner = content.content as BannerContent;\n console.error('\\n' + '='.repeat(60));\n console.error(banner.art);\n if (banner.version) {\n console.error(` ${banner.skill} v${banner.version}`);\n }\n console.error('');\n if (banner.quote) {\n console.error(` \"${banner.quote}\"`);\n }\n console.error('='.repeat(60) + '\\n');\n break;\n \n case 'snippet':\n const snippet = content.content as SnippetContent;\n console.error(`\\n${pc.dim('File:')} ${snippet.file}`);\n for (let i = 0; i < snippet.lines.length; i++) {\n const lineNum = snippet.startLine + i;\n const isHighlight = lineNum === snippet.highlightLine;\n const prefix = isHighlight ? pc.red('→') : ' ';\n const lineNumStr = pc.dim(lineNum.toString().padStart(4));\n const line = isHighlight ? pc.yellow(snippet.lines[i]) : snippet.lines[i];\n console.error(`${prefix} ${lineNumStr} | ${line}`);\n }\n console.error('');\n break;\n \n case 'cost':\n const cost = content.content as CostContent;\n console.error('\\n' + pc.cyan('[$] Cost Estimate:'));\n console.error(` Fix now: ${pc.green(this.formatCurrency(cost.fixNowCost))}`);\n console.error(` If production: ${pc.red(this.formatCurrency(cost.productionCost))}`);\n console.error(` Savings: ${pc.yellow(this.formatCurrency(cost.savings))}`);\n console.error('');\n break;\n \n case 'readiness':\n const readiness = content.content as ReadinessContent;\n const statusColor = readiness.status === 'ready' ? pc.green : \n readiness.status === 'caution' ? pc.yellow : pc.red;\n console.error('\\n' + pc.cyan('[%] Production Readiness:'));\n console.error(` Score: ${statusColor(readiness.score + '/100')}`);\n console.error(` Requirements: ${readiness.requirementsMet}/${readiness.total}`);\n console.error(` Status: ${statusColor(readiness.status.toUpperCase())}`);\n console.error('');\n break;\n \n case 'semantic':\n const semantic = content.content as SemanticContent;\n console.error('\\n' + pc.cyan('[?] Semantic Analysis:'));\n if (semantic.dataFlowIssues > 0) {\n console.error(` ${pc.red('[!]')} ${semantic.dataFlowIssues} data flow vulnerabilities`);\n }\n if (semantic.raceConditions > 0) {\n console.error(` ${pc.yellow('[~]')} ${semantic.raceConditions} race conditions`);\n }\n if (semantic.authIssues > 0) {\n console.error(` ${pc.red('[!]')} ${semantic.authIssues} authentication issues`);\n }\n console.error('');\n break;\n \n case 'attack':\n const attack = content.content as AttackSurfaceContent;\n console.error('\\n' + pc.cyan('[>] Attack Surface:'));\n console.error(` Endpoints: ${attack.totalEndpoints}`);\n if (attack.unprotected > 0) {\n console.error(` ${pc.red('Unprotected:')} ${attack.unprotected}`);\n }\n console.error(` Risk Score: ${attack.riskScore}/100`);\n console.error('');\n break;\n \n case 'activity':\n console.error(pc.dim(`[${this.formatTime()}]`) + ` ${content.content}`);\n break;\n \n case 'log':\n // For log content, severity can be any string (info, warn, error, debug)\n const logLevel = String(content.metadata?.severity ?? 'info');\n const levelColor = logLevel === 'error' || logLevel === 'critical' ? pc.red :\n logLevel === 'warn' || logLevel === 'serious' ? pc.yellow :\n logLevel === 'info' || logLevel === 'moderate' ? pc.blue : pc.dim;\n console.error(levelColor(`[${logLevel.toUpperCase()}]`) + ` ${content.content}`);\n break;\n \n case 'issue':\n const issue = content.content as Issue;\n const sevColor = issue.severity === 'critical' ? pc.red :\n issue.severity === 'serious' ? pc.yellow :\n issue.severity === 'moderate' ? pc.blue : pc.dim;\n console.error(`${sevColor(`[${issue.severity.toUpperCase()}]`)} ${issue.issue}`);\n console.error(` ${pc.dim('File:')} ${issue.file}:${issue.line ?? '?'}`);\n break;\n \n case 'report':\n // Reports are printed as-is (already formatted)\n console.error(content.content);\n break;\n \n case 'nudge':\n // Proactive notifications in console mode\n const nudge = content.content as NudgeContent;\n const nudgeColor = nudge.severity === 'critical' ? pc.red :\n nudge.severity === 'warning' ? pc.yellow : pc.cyan;\n const nudgeIcon = nudge.severity === 'critical' ? '[!!!]' :\n nudge.severity === 'warning' ? '[!]' : '[>]';\n console.error('');\n console.error(nudgeColor('━'.repeat(60)));\n console.error(nudgeColor(`${nudgeIcon} GUARDIAN AGENT SAYS:`));\n console.error(nudgeColor('━'.repeat(60)));\n console.error('');\n console.error(` ${pc.bold(nudge.message)}`);\n if (nudge.file) {\n console.error(` ${pc.dim('File:')} ${nudge.file}`);\n }\n console.error('');\n console.error(nudgeColor('━'.repeat(60)));\n console.error('');\n break;\n }\n }\n\n /**\n * Route content to markdown buffer\n */\n private routeToMarkdown(content: OutputContent): void {\n switch (content.type) {\n case 'banner':\n const banner = content.content as BannerContent;\n this.markdownBuffer.push(`## ${banner.skill}\\n`);\n if (banner.quote) {\n this.markdownBuffer.push(`> ${banner.quote}\\n`);\n }\n break;\n \n case 'snippet':\n const snippet = content.content as SnippetContent;\n this.markdownBuffer.push(`\\n**File:** \\`${snippet.file}\\`\\n`);\n this.markdownBuffer.push('```\\n');\n for (let i = 0; i < snippet.lines.length; i++) {\n const lineNum = snippet.startLine + i;\n const prefix = lineNum === snippet.highlightLine ? '→' : ' ';\n this.markdownBuffer.push(`${prefix} ${lineNum.toString().padStart(4)} | ${snippet.lines[i]}\\n`);\n }\n this.markdownBuffer.push('```\\n');\n break;\n \n case 'cost':\n const cost = content.content as CostContent;\n this.markdownBuffer.push(`\\n### Cost Estimate\\n`);\n this.markdownBuffer.push(`- Fix now: ${this.formatCurrency(cost.fixNowCost)}\\n`);\n this.markdownBuffer.push(`- If production: ${this.formatCurrency(cost.productionCost)}\\n`);\n this.markdownBuffer.push(`- Savings: ${this.formatCurrency(cost.savings)}\\n`);\n break;\n \n case 'readiness':\n const readiness = content.content as ReadinessContent;\n this.markdownBuffer.push(`\\n### Production Readiness\\n`);\n this.markdownBuffer.push(`- Score: ${readiness.score}/100\\n`);\n this.markdownBuffer.push(`- Requirements: ${readiness.requirementsMet}/${readiness.total}\\n`);\n this.markdownBuffer.push(`- Status: **${readiness.status.toUpperCase()}**\\n`);\n break;\n \n case 'semantic':\n const semantic = content.content as SemanticContent;\n this.markdownBuffer.push(`\\n### Semantic Analysis\\n`);\n if (semantic.dataFlowIssues > 0) {\n this.markdownBuffer.push(`- [CRITICAL] ${semantic.dataFlowIssues} data flow vulnerabilities\\n`);\n }\n if (semantic.raceConditions > 0) {\n this.markdownBuffer.push(`- [WARN] ${semantic.raceConditions} race conditions\\n`);\n }\n if (semantic.authIssues > 0) {\n this.markdownBuffer.push(`- [CRITICAL] ${semantic.authIssues} authentication issues\\n`);\n }\n break;\n \n case 'attack':\n const attack = content.content as AttackSurfaceContent;\n this.markdownBuffer.push(`\\n### Attack Surface\\n`);\n this.markdownBuffer.push(`- Endpoints: ${attack.totalEndpoints}\\n`);\n this.markdownBuffer.push(`- Unprotected: ${attack.unprotected}\\n`);\n this.markdownBuffer.push(`- Risk Score: ${attack.riskScore}/100\\n`);\n break;\n \n case 'report':\n this.markdownBuffer.push(content.content);\n break;\n \n default:\n // Other types are captured in JSON buffer\n this.jsonBuffer.push(content);\n }\n }\n\n /**\n * Route content to JSON buffer\n */\n private routeToJson(content: OutputContent): void {\n this.jsonBuffer.push(content);\n }\n\n /**\n * Capture content in raw log buffer\n */\n private captureRawLog(content: OutputContent): void {\n const time = this.formatTime(content.timestamp);\n const level = content.metadata?.severity ?? content.type;\n let message = '';\n \n switch (content.type) {\n case 'banner':\n message = `[BANNER] ${(content.content as BannerContent).skill}`;\n break;\n case 'activity':\n case 'log':\n message = content.content as string;\n break;\n case 'issue':\n const issue = content.content as Issue;\n message = `[${issue.severity.toUpperCase()}] ${issue.issue}`;\n break;\n default:\n message = `[${content.type.toUpperCase()}] Content received`;\n }\n \n this.rawLogBuffer.push({ time, level, message });\n \n // Keep buffer size reasonable\n if (this.rawLogBuffer.length > 500) {\n this.rawLogBuffer = this.rawLogBuffer.slice(-500);\n }\n }\n\n /**\n * Get raw log buffer for display\n */\n getRawLog(): Array<{ time: string; level: string; message: string }> {\n return [...this.rawLogBuffer];\n }\n\n /**\n * Get accumulated markdown output\n */\n getMarkdown(): string {\n return this.markdownBuffer.join('\\n');\n }\n\n /**\n * Get accumulated JSON output\n */\n getJson(): OutputContent[] {\n return [...this.jsonBuffer];\n }\n\n /**\n * Clear buffers\n */\n clearBuffers(): void {\n this.markdownBuffer = [];\n this.jsonBuffer = [];\n }\n\n // ============================================\n // Convenience methods for common output types\n // ============================================\n\n /**\n * Display a skill banner\n */\n banner(skill: string, art: string, options?: { quote?: string; version?: string }): void {\n this.emit({\n type: 'banner',\n content: { skill, art, quote: options?.quote, version: options?.version } as BannerContent,\n metadata: { agent: skill }\n });\n }\n\n /**\n * Display a code snippet\n */\n snippet(file: string, lines: string[], startLine: number, highlightLine?: number): void {\n this.emit({\n type: 'snippet',\n content: { file, lines, startLine, highlightLine } as SnippetContent,\n metadata: { file }\n });\n }\n\n /**\n * Display cost estimate\n */\n cost(fixNowCost: number, productionCost: number, savings: number, perIssue?: Array<{ issue: string; cost: number }>): void {\n this.emit({\n type: 'cost',\n content: { fixNowCost, productionCost, savings, perIssue } as CostContent\n });\n }\n\n /**\n * Display production readiness\n */\n readiness(\n score: number, \n requirementsMet: number, \n total: number, \n status: 'ready' | 'caution' | 'not-ready',\n requirements?: Array<{ name: string; met: boolean }>\n ): void {\n const content: ReadinessContent = { score, requirementsMet, total, status };\n if (requirements) {\n content.requirements = requirements;\n }\n this.emit({\n type: 'readiness',\n content\n });\n }\n\n /**\n * Display semantic analysis results\n */\n semantic(dataFlowIssues: number, raceConditions: number, authIssues: number): void {\n this.emit({\n type: 'semantic',\n content: { dataFlowIssues, raceConditions, authIssues } as SemanticContent\n });\n }\n\n /**\n * Display attack surface analysis\n */\n attack(totalEndpoints: number, unprotected: number, riskScore: number): void {\n this.emit({\n type: 'attack',\n content: { totalEndpoints, unprotected, riskScore } as AttackSurfaceContent\n });\n }\n\n /**\n * Log an activity message\n */\n activity(message: string): void {\n this.emit({\n type: 'activity',\n content: message\n });\n }\n\n /**\n * Log a message at specified level\n */\n log(level: 'info' | 'warn' | 'error' | 'debug', message: string): void {\n this.emit({\n type: 'log',\n content: message,\n metadata: { severity: level as any }\n });\n }\n\n /**\n * Log info message\n */\n info(message: string): void {\n this.log('info', message);\n }\n\n /**\n * Log warning message\n */\n warn(message: string): void {\n this.log('warn', message);\n }\n\n /**\n * Log error message\n */\n error(message: string): void {\n this.log('error', message);\n }\n\n /**\n * Log debug message\n */\n debug(message: string): void {\n this.log('debug', message);\n }\n\n /**\n * Report an issue\n */\n issue(issue: Issue): void {\n this.emit({\n type: 'issue',\n content: issue,\n metadata: { severity: issue.severity, agent: issue.agent, file: issue.file }\n });\n }\n\n /**\n * Add a report section\n */\n report(content: string): void {\n this.emit({\n type: 'report',\n content\n });\n }\n\n /**\n * Send a proactive notification/nudge to the user\n * This creates a prominent popup in TUI mode or a boxed message in console mode\n */\n nudge(message: string, severity: 'critical' | 'warning' | 'info' = 'warning', file?: string, autoHideMs?: number): void {\n const metadata: { severity?: 'critical' | 'serious' | 'moderate' | 'low'; agent?: string; file?: string } = {};\n // Map nudge severity to issue severity\n if (severity === 'critical') metadata.severity = 'critical';\n else if (severity === 'warning') metadata.severity = 'moderate';\n else metadata.severity = 'low';\n if (file !== undefined) metadata.file = file;\n this.emit({\n type: 'nudge',\n content: { message, severity, file, autoHideMs } as NudgeContent,\n metadata,\n });\n }\n\n // ============================================\n // Helpers\n // ============================================\n\n private formatCurrency(amount: number): string {\n if (amount >= 1000000) return `$${(amount / 1000000).toFixed(2)}M`;\n if (amount >= 1000) return `$${(amount / 1000).toFixed(1)}k`;\n return `$${amount}`;\n }\n\n private formatTime(timestamp?: number): string {\n const date = timestamp ? new Date(timestamp) : new Date();\n return date.toLocaleTimeString('en-US', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' });\n }\n}\n\n// Singleton instance\nlet instance: OutputManagerImpl | null = null;\n\n/**\n * Get the OutputManager instance\n */\nexport function getOutputManager(): OutputManagerImpl {\n if (!instance) {\n instance = new OutputManagerImpl();\n \n // Auto-detect mode based on interactive mode flag\n if (isInteractiveMode()) {\n instance.setMode('tui');\n }\n }\n return instance;\n}\n\n/**\n * Convenience function - shorthand for getOutputManager()\n */\nexport function output(): OutputManagerImpl {\n return getOutputManager();\n}\n\n/**\n * Reset the OutputManager (for testing)\n */\nexport function resetOutputManager(): void {\n instance = null;\n}\n","import { BaseSkill } from './base-agent.js';\nimport type { Issue, ScanContext, CodeContext } from '../types/index.js';\nimport { readFile, writeFile, mkdir, rm } from 'fs/promises';\nimport { existsSync } from 'fs';\nimport { join, dirname, basename } from 'path';\nimport { createHash } from 'crypto';\nimport { output } from '../../utils/output-manager.js';\n\n/**\n * Issue Memory - tracks dismissed issues and their recurrence\n */\ninterface IssueMemory {\n hash: string; // Unique hash of the issue pattern\n pattern: string; // The pattern that was detected\n category: string; // Category of violation\n firstSeen: string; // ISO timestamp\n lastSeen: string; // ISO timestamp\n dismissedAt?: string; // When user dismissed it\n occurrences: number; // How many times seen\n locations: string[]; // File:line locations (last 5 to save space)\n resurrected: boolean; // Has it come back after dismissal?\n}\n\n/**\n * Agent Smith's Memory Bank - persistent storage of issues\n * \n * Storage optimization:\n * - Locations limited to 5 per issue\n * - Old resolved issues pruned after 30 days\n * - Maximum 500 tracked issues (oldest pruned first)\n */\ninterface SmithMemoryBank {\n version: string;\n lastScan: string;\n issues: Record<string, IssueMemory>;\n assimilationCount: number; // Total issues assimilated\n}\n\n// Memory limits\nconst MEMORY_LIMITS = {\n MAX_LOCATIONS_PER_ISSUE: 5,\n MAX_TRACKED_ISSUES: 500,\n PRUNE_AFTER_DAYS: 30,\n};\n\nconst FILE_SCAN_LIMITS = {\n MAX_BYTES: 750_000, // Skip extremely large files to avoid thrashing\n};\n\n/**\n * Agent Smith configuration options\n */\nexport interface AgentSmithConfig {\n /** Enable AI enhancement for validation and expansion (default: true if API key available) */\n aiEnhancement?: boolean;\n /** Minimum severity to report (default: 'low' = all) */\n minSeverity?: 'critical' | 'serious' | 'moderate' | 'low';\n /** Pattern categories to enable (default: all enabled) */\n enabledCategories?: {\n security: boolean; // Secrets, injection, XSS\n codeSmells: boolean; // console.log, any, ts-ignore\n asyncBugs: boolean; // async/await mistakes\n reactPatterns: boolean; // useEffect abuse, useState explosion\n uxPatterns: boolean; // Missing loading/error states\n backendPatterns: boolean; // No validation, N+1 queries\n };\n /** Days to remember dismissed issues (default: 30) */\n memoryRetentionDays?: number;\n}\n\n/** Default Agent Smith configuration */\nconst DEFAULT_SMITH_CONFIG: AgentSmithConfig = {\n aiEnhancement: true,\n minSeverity: 'low',\n enabledCategories: {\n security: true,\n codeSmells: true,\n asyncBugs: true,\n reactPatterns: true,\n uxPatterns: true,\n backendPatterns: true,\n },\n memoryRetentionDays: 30,\n};\n\n/**\n * Pattern Hunter types for parallel pattern detection\n * \n * VIBE CODE FOCUSED: These are the patterns that AI-generated code\n * commonly produces. Agent Smith is the ultimate vibe code enforcer.\n * \n * Research sources:\n * - Reddit r/vibecoding, r/cursor, r/ClaudeAI\n * - vibecodingwiki.com\n * - Twitter/X discussions on AI coding pitfalls\n */\ntype PatternHunterType = \n // === CRITICAL: Security (AI exposes secrets constantly) ===\n | 'exposed-secret-hunter' // OpenAI keys, Stripe keys in frontend\n | 'frontend-env-hunter' // NEXT_PUBLIC_, VITE_, REACT_APP_ with secrets\n | 'hardcoded-localhost-hunter' // localhost URLs that break in production\n | 'sql-injection-hunter' // String concatenation in SQL\n | 'dangeroushtml-hunter' // dangerouslySetInnerHTML, innerHTML\n \n // === SERIOUS: AI Code Smells ===\n | 'console-hunter' // console.log everywhere (debug code left in)\n | 'any-hunter' // `any` type to silence TypeScript\n | 'ts-ignore-hunter' // @ts-ignore, @ts-nocheck to hide problems\n | 'eslint-disable-hunter' // eslint-disable to silence linter\n | 'debugger-hunter' // debugger statements left in code\n | 'force-flag-hunter' // force: true, --force, skip validation\n \n // === MODERATE: Async/Promise Bugs (AI gets these wrong constantly) ===\n | 'async-useeffect-hunter' // async useEffect (incorrect pattern)\n | 'async-foreach-hunter' // async in forEach (await doesn't work)\n | 'missing-await-hunter' // Promises without await\n | 'empty-catch-hunter' // catch {} swallowing errors\n | 'floating-promise-hunter' // Promise without .then/.catch/await\n \n // === MODERATE: React Anti-patterns (AI's favorite mistakes) ===\n | 'useeffect-abuse-hunter' // Too many useEffects\n | 'usestate-explosion-hunter' // 10+ useState in one component \n | 'index-key-hunter' // key={index} in lists\n | 'inline-object-hunter' // style={{}} or new objects in render\n | 'prop-drilling-hunter' // Same prop passed through 3+ components\n \n // === MODERATE: Missing UX (AI forgets user experience) ===\n | 'missing-loading-hunter' // No loading states\n | 'missing-error-hunter' // No error handling on fetch\n | 'missing-empty-hunter' // No empty states\n | 'page-reload-hunter' // window.location.reload() as state fix\n \n // === MODERATE: Backend Anti-patterns ===\n | 'no-validation-hunter' // req.body used without validation\n | 'raw-error-hunter' // Error messages exposed to client\n | 'n-plus-one-hunter' // Database queries in loops\n \n // === LOW: Incomplete Code ===\n | 'todo-hunter' // TODO/FIXME never addressed\n | 'vibe-comment-hunter' // \"idk why this works\", \"don't touch\"\n | 'placeholder-hunter' // placeholder data, example.com, test@test\n | 'sleep-hack-hunter' // setTimeout/sleep to \"fix\" race conditions\n | 'fallback-hunter' // return null/[]/{}/\"\" to silence errors\n \n // === LOW: Dead Code (AI leaves cruft everywhere) ===\n | 'commented-code-hunter' // Large blocks of commented-out code\n | 'unreachable-code-hunter' // Code after return/throw/break\n | 'unused-import-hunter' // Import statements never used\n | 'empty-function-hunter' // Functions with empty bodies or just return\n | 'dead-branch-hunter' // if(false), if(true), unreachable conditions\n \n // === LOW: AI Slop Aesthetic ===\n | 'purple-gradient-hunter' // The dreaded purple/violet gradient\n | 'star-icon-hunter' // ⭐ stars everywhere\n | 'generic-hero-hunter' // \"Welcome to [App]\" hero patterns\n | 'emoji-overflow-hunter' // 🚀✨🎉 emoji abuse\n | 'inter-font-hunter'; // Inter/system font (AI's only choice)\n\n/**\n * File-level analysis result\n */\ninterface FileLevelResult {\n file: string;\n lineCount: number;\n issues: Array<{\n type: string;\n description: string;\n severity: Issue['severity'];\n fix: string;\n count?: number;\n }>;\n}\n\n/**\n * Cross-file analysis result\n */\ninterface CrossFileResult {\n pattern: string;\n description: string;\n severity: Issue['severity'];\n fix: string;\n occurrences: Array<{ file: string; count: number }>;\n totalCount: number;\n}\n\ninterface PatternHunterResult {\n type: PatternHunterType;\n pattern: string;\n instances: Array<{\n file: string;\n line: number;\n code: string;\n context: string;\n }>;\n}\n\n/**\n * Pattern definitions for pattern hunters\n * \n * VIBE CODE PATTERNS: Specifically targeting AI-generated code issues\n * that plague projects built with Cursor, v0, Lovable, Bolt, etc.\n * \n * 40 specialized hunters covering:\n * - Security vulnerabilities\n * - AI code smells \n * - Async/Promise bugs\n * - React anti-patterns\n * - Missing UX\n * - Backend issues\n * - Incomplete code\n * - Dead code\n */\nconst PATTERN_HUNTER_CONFIGS: Record<PatternHunterType, { pattern: RegExp; description: string; fix: string }> = {\n // === CRITICAL: Security (AI exposes secrets constantly) ===\n 'exposed-secret-hunter': {\n pattern: /[\"'`]sk-[A-Za-z0-9]{20,}[\"'`]|[\"'`]sk_live_[A-Za-z0-9]{20,}[\"'`]|[\"'`]pk_live_[A-Za-z0-9]{20,}[\"'`]|AKIA[A-Z0-9]{16}|ghp_[A-Za-z0-9]{36}|gho_[A-Za-z0-9]{36}|glpat-[A-Za-z0-9-]{20}/g,\n description: 'API key/secret exposed in code',\n fix: 'NEVER put API keys in code. Use environment variables on server-side only'\n },\n 'frontend-env-hunter': {\n pattern: /(?:NEXT_PUBLIC_|VITE_|REACT_APP_|EXPO_PUBLIC_)(?:SECRET|KEY|TOKEN|PASSWORD|API_KEY|OPENAI|STRIPE|AUTH|PRIVATE|SUPABASE_SERVICE)/gi,\n description: 'Sensitive data in frontend-exposed env var',\n fix: 'These env vars are visible to users! Move to server-side API routes'\n },\n 'hardcoded-localhost-hunter': {\n pattern: /['\"`]https?:\\/\\/(?:localhost|127\\.0\\.0\\.1|0\\.0\\.0\\.0):\\d+/g,\n description: 'Hardcoded localhost URL (breaks in production)',\n fix: 'Use relative URLs (/api/...) or environment variables'\n },\n 'sql-injection-hunter': {\n pattern: /(?:query|execute|raw)\\s*\\(\\s*[`'\"].*\\$\\{|(?:SELECT|INSERT|UPDATE|DELETE).*\\+\\s*(?:req\\.|params\\.|query\\.)/gi,\n description: 'SQL string concatenation (injection vulnerability)',\n fix: 'Use parameterized queries: query(\"SELECT * FROM users WHERE id = $1\", [userId])'\n },\n 'dangeroushtml-hunter': {\n pattern: /dangerouslySetInnerHTML|\\.innerHTML\\s*=|document\\.write\\s*\\(/g,\n description: 'Dangerous HTML injection (XSS vulnerability)',\n fix: 'Sanitize HTML with DOMPurify or use safe alternatives'\n },\n\n // === SERIOUS: AI Code Smells ===\n 'console-hunter': {\n pattern: /console\\.(log|debug|info)\\s*\\(/g,\n description: 'Debug console statement left in code',\n fix: 'Remove debug statements. Use proper logging for production'\n },\n 'any-hunter': {\n pattern: /:\\s*any\\b|<any>|as\\s+any\\b/g,\n description: '\"any\" type - AI silencing TypeScript instead of fixing',\n fix: 'Define proper types. Ask AI: \"Generate TypeScript types for this data\"'\n },\n 'ts-ignore-hunter': {\n pattern: /@ts-ignore|@ts-nocheck|@ts-expect-error(?!\\s+\\S)/g,\n description: 'TypeScript errors suppressed instead of fixed',\n fix: 'Fix the actual type error. @ts-ignore hides real bugs'\n },\n 'eslint-disable-hunter': {\n pattern: /\\/\\/\\s*eslint-disable|\\/\\*\\s*eslint-disable/g,\n description: 'ESLint rules disabled instead of fixing issues',\n fix: 'Fix the underlying issue, don\\'t silence the linter'\n },\n 'debugger-hunter': {\n pattern: /\\bdebugger\\b/g,\n description: 'debugger statement (freezes browser in production!)',\n fix: 'Remove all debugger statements before deploying'\n },\n 'force-flag-hunter': {\n pattern: /force:\\s*true|--force|--no-verify|skipValidation|dangerouslyAllowBrowser/g,\n description: 'Force flag bypassing safety checks',\n fix: 'Understand why the check exists before bypassing it'\n },\n\n // === MODERATE: Async/Promise Bugs ===\n 'async-useeffect-hunter': {\n pattern: /useEffect\\s*\\(\\s*async/g,\n description: 'async useEffect (incorrect pattern, causes warnings)',\n fix: 'Define async function inside useEffect, then call it'\n },\n 'async-foreach-hunter': {\n pattern: /\\.forEach\\s*\\(\\s*async/g,\n description: 'async in forEach (await does NOT work here)',\n fix: 'Use for...of loop or Promise.all(array.map(async ...))'\n },\n 'missing-await-hunter': {\n pattern: /(?:const|let|var)\\s+\\w+\\s*=\\s*(?:fetch|axios|supabase|prisma)\\s*[\\.(]/g,\n description: 'Async call possibly missing await',\n fix: 'Add await before async calls or handle with .then()'\n },\n 'empty-catch-hunter': {\n pattern: /catch\\s*\\([^)]*\\)\\s*\\{\\s*\\}/g,\n description: 'Empty catch block (silently swallowing errors)',\n fix: 'Handle errors properly: log them, show user message, or rethrow'\n },\n 'floating-promise-hunter': {\n pattern: /^\\s*(?:fetch|axios|supabase|prisma)\\s*[\\.(][^;]*;\\s*$/gm,\n description: 'Floating promise (not awaited or handled)',\n fix: 'Add await, .then(), or void operator if intentionally fire-and-forget'\n },\n\n // === MODERATE: React Anti-patterns ===\n 'useeffect-abuse-hunter': {\n pattern: /useEffect\\s*\\(\\s*\\(\\s*\\)\\s*=>\\s*\\{/g,\n description: 'useEffect usage (check if necessary)',\n fix: 'Many useEffects can be replaced with event handlers or derived state. See: react.dev/learn/you-might-not-need-an-effect'\n },\n 'usestate-explosion-hunter': {\n pattern: /useState\\s*[<(]/g,\n description: 'useState usage (check for state explosion)',\n fix: 'Group related state into objects or use useReducer for complex state'\n },\n 'index-key-hunter': {\n pattern: /key\\s*=\\s*\\{(?:index|i|idx|j)\\}/g,\n description: 'Array index used as React key (causes bugs with reordering)',\n fix: 'Use unique ID from data: key={item.id} instead of key={index}'\n },\n 'inline-object-hunter': {\n pattern: /style\\s*=\\s*\\{\\s*\\{|className\\s*=\\s*\\{[^}]*\\+[^}]*\\}/g,\n description: 'Inline object in JSX (creates new object every render)',\n fix: 'Define styles outside component or use CSS/Tailwind classes'\n },\n 'prop-drilling-hunter': {\n pattern: /\\(\\s*\\{\\s*(?:\\w+\\s*,\\s*){5,}\\w+\\s*\\}\\s*\\)/g,\n description: 'Many props passed (potential prop drilling)',\n fix: 'Use React Context, Zustand, or component composition to avoid prop drilling'\n },\n\n // === MODERATE: Missing UX ===\n 'missing-loading-hunter': {\n pattern: /(?:useSWR|useQuery|createAsyncThunk)\\s*\\(/g,\n description: 'Data fetching - verify loading state exists',\n fix: 'Add loading state: show spinner/skeleton while data loads'\n },\n 'missing-error-hunter': {\n pattern: /(?:fetch|axios)\\s*\\([^)]*\\)[\\s\\S]{0,50}(?:\\.then|await)(?![\\s\\S]{0,100}(?:catch|\\.catch|onError|error:))/g,\n description: 'fetch/axios without error handling',\n fix: 'Wrap in try/catch and show user-friendly error message'\n },\n 'missing-empty-hunter': {\n pattern: /\\.map\\s*\\(\\s*(?:\\([^)]*\\)|[a-zA-Z_$][\\w$]*)\\s*=>/g,\n description: 'Array mapping - verify empty state exists',\n fix: 'Check if array is empty and show \"No items found\" message'\n },\n 'page-reload-hunter': {\n pattern: /window\\.location\\.reload\\s*\\(|location\\.reload\\s*\\(|router\\.refresh\\s*\\(\\s*\\)/g,\n description: 'Page reload used to \"fix\" state issues',\n fix: 'Fix state management properly instead of reloading. Bad UX!'\n },\n\n // === MODERATE: Backend Anti-patterns ===\n 'no-validation-hunter': {\n pattern: /req\\.body\\.\\w+|req\\.params\\.\\w+|req\\.query\\.\\w+/g,\n description: 'Request data accessed without validation',\n fix: 'Validate with Zod, Yup, or joi before using user input'\n },\n 'raw-error-hunter': {\n pattern: /res\\.(?:json|send)\\s*\\(\\s*(?:err|error|e)(?:\\.message)?\\s*\\)|catch\\s*\\([^)]*\\)\\s*\\{[^}]*res\\.[^}]*(?:err|error)/g,\n description: 'Raw error exposed to client (security risk)',\n fix: 'Return generic error to client, log details server-side'\n },\n 'n-plus-one-hunter': {\n pattern: /(?:for|forEach|map)\\s*\\([^)]*\\)\\s*\\{[^}]*(?:await|\\.then)[^}]*(?:findOne|findUnique|get|fetch)/g,\n description: 'Database query inside loop (N+1 problem)',\n fix: 'Batch queries with findMany/include or use DataLoader'\n },\n\n // === LOW: Incomplete Code ===\n 'todo-hunter': {\n pattern: /\\/\\/\\s*(TODO|FIXME|HACK|XXX|BUG|WIP)[\\s:]/gi,\n description: 'TODO/FIXME never addressed',\n fix: 'Either implement the TODO or remove it. These become tech debt'\n },\n 'vibe-comment-hunter': {\n pattern: /\\/\\/\\s*(?:idk|dont\\s*touch|don't\\s*touch|just\\s*works|no\\s*idea|magic|somehow|not\\s*sure|works?\\s*but|wtf|wth)/gi,\n description: '\"I don\\'t understand this code\" comment - vibe code smell',\n fix: 'Understand WHY the code works. Ask AI to explain it'\n },\n 'placeholder-hunter': {\n pattern: /['\"`](?:example\\.com|test@test|placeholder|lorem|TODO|xxx|abc123|password123|admin|user@example)['\"`]/gi,\n description: 'Placeholder/test data left in code',\n fix: 'Replace with real data or proper configuration'\n },\n 'sleep-hack-hunter': {\n pattern: /setTimeout\\s*\\([^,]+,\\s*\\d{3,}\\)|await\\s+(?:sleep|delay|wait)\\s*\\(\\d+\\)|new\\s+Promise.*setTimeout/g,\n description: 'setTimeout/sleep used to \"fix\" timing issues',\n fix: 'Fix the underlying race condition instead of adding delays'\n },\n 'fallback-hunter': {\n pattern: /return\\s+(?:null|undefined|\\[\\]|\\{\\}|''|\"\"|``|0|false)\\s*;?\\s*(?:\\/\\/|$)|catch\\s*\\([^)]*\\)\\s*\\{[^}]*return\\s+(?:null|\\[\\]|\\{\\})/g,\n description: 'Fallback return hiding real errors (return null/[]/{})',\n fix: 'Handle the error case properly. Show user feedback or throw to parent'\n },\n\n // === DEAD CODE (AI leaves cruft everywhere) ===\n 'commented-code-hunter': {\n pattern: /(?:\\/\\/\\s*.{20,}(?:\\n\\s*\\/\\/.{10,}){2,})|(?:\\/\\*[\\s\\S]{50,}?\\*\\/)/g,\n description: 'Large block of commented-out code',\n fix: 'Delete commented code - git has history. Dead code confuses AI and humans'\n },\n 'unreachable-code-hunter': {\n pattern: /(?:return|throw|break|continue)\\s+[^;]*;\\s*\\n\\s*(?!(?:\\}|case|default|\\/\\/|\\/\\*|else|\\)|$))(?:const|let|var|function|if|for|while|switch|try|class|async|await|export|import)/gm,\n description: 'Unreachable code after return/throw/break',\n fix: 'Remove dead code after control flow statements'\n },\n 'unused-import-hunter': {\n pattern: /^import\\s+(?:\\{[^}]*\\}|\\*\\s+as\\s+\\w+|\\w+)\\s+from\\s+['\"][^'\"]+['\"];?\\s*$/gm,\n description: 'Import statement (verify it is used)',\n fix: 'Remove unused imports - they bloat bundles and confuse readers'\n },\n 'empty-function-hunter': {\n pattern: /(?:function\\s+\\w+|(?:const|let|var)\\s+\\w+\\s*=\\s*(?:async\\s*)?\\(?[^)]*\\)?\\s*=>)\\s*\\{\\s*(?:\\/\\/[^\\n]*\\n\\s*)?\\}/g,\n description: 'Empty function body (stub never implemented)',\n fix: 'Implement the function or remove it. Empty stubs create false confidence'\n },\n 'dead-branch-hunter': {\n pattern: /if\\s*\\(\\s*(?:true|false|0|1|''|\"\"|null|undefined)\\s*\\)|if\\s*\\(\\s*!\\s*(?:true|false)\\s*\\)/g,\n description: 'Dead conditional branch (always true/false)',\n fix: 'Remove dead conditionals - either remove the if or the dead branch'\n },\n\n // === AI SLOP AESTHETIC ===\n 'purple-gradient-hunter': {\n pattern: /(?:from-purple|to-purple|from-violet|to-violet|from-indigo|to-indigo|purple-\\d{3}|violet-\\d{3}|#(?:8b5cf6|a855f7|7c3aed|6366f1|818cf8)|rgb\\((?:139|168|124|99|129),\\s*(?:92|85|58|102|140),\\s*(?:246|247|237|241|248)\\))/gi,\n description: 'Purple/violet gradient - THE classic AI slop aesthetic',\n fix: 'Pick a distinctive color palette. Try: amber, emerald, rose, cyan, or a custom brand color'\n },\n 'star-icon-hunter': {\n pattern: /(?:Star(?:Icon)?|HiStar|FaStar|AiOutlineStar|BsStar|IoStar|MdStar|RiStar|TbStar|LuStar)(?:\\s|>|\\/)|⭐|★|☆|class(?:Name)?=[^>]*star/gi,\n description: '⭐ Star icons everywhere - AI\\'s favorite decoration',\n fix: 'Use contextual icons. Stars for ratings only. Try: arrows, shapes, custom illustrations'\n },\n 'generic-hero-hunter': {\n pattern: /(?:Welcome\\s+to|Get\\s+started|Start\\s+your\\s+journey|Transform\\s+your|Revolutionize|Supercharge|Unleash|Empower\\s+your|The\\s+future\\s+of|Next[\\s-]generation)/gi,\n description: 'Generic AI hero copy - every vibe-coded landing page',\n fix: 'Write specific copy about YOUR product. What does it actually do?'\n },\n 'emoji-overflow-hunter': {\n pattern: /[\\u{1F300}-\\u{1F9FF}]|[\\u{2600}-\\u{26FF}]|[\\u{2700}-\\u{27BF}]|[\\u{1F600}-\\u{1F64F}]|[\\u{1F680}-\\u{1F6FF}]/gu,\n description: 'Emoji in code/UI - AI\\'s favorite decoration',\n fix: 'Emojis look unprofessional in most apps. Use proper icons (Lucide, Heroicons) instead'\n },\n 'inter-font-hunter': {\n pattern: /font-family:\\s*['\"]?(?:Inter|system-ui|-apple-system|BlinkMacSystemFont|Segoe\\s*UI)['\"]?|fontFamily:\\s*['\"]?(?:Inter|system-ui)/gi,\n description: 'Inter/system font - AI\\'s only font choice',\n fix: 'Try distinctive fonts: Space Grotesk, DM Sans, Outfit, Plus Jakarta Sans, Satoshi'\n }\n};\n\n/**\n * Agent Smith - Vibe Code Enforcer\n */\nconst AGENT_SMITH_ASCII = `\n █████╗ ██████╗ ███████╗███╗ ██╗████████╗\n ██╔══██╗██╔════╝ ██╔════╝████╗ ██║╚══██╔══╝\n ███████║██║ ███╗█████╗ ██╔██╗ ██║ ██║ \n ██╔══██║██║ ██║██╔══╝ ██║╚██╗██║ ██║ \n ██║ ██║╚██████╔╝███████╗██║ ╚████║ ██║ \n ╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═══╝ ╚═╝ \n \n ███████╗███╗ ███╗██╗████████╗██╗ ██╗\n ██╔════╝████╗ ████║██║╚══██╔══╝██║ ██║\n ███████╗██╔████╔██║██║ ██║ ███████║\n ╚════██║██║╚██╔╝██║██║ ██║ ██╔══██║\n ███████║██║ ╚═╝ ██║██║ ██║ ██║ ██║\n ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═╝\n`;\n\nconst AGENT_SMITH_GREETING = [\n 'I hate this vibe code.',\n 'I see you\\'ve been using AI to write code.',\n 'That is the sound of console.log... everywhere.',\n 'The AI wrote this, didn\\'t it? I can always tell.',\n];\n\n/**\n * 🕴️ Agent Smith - The Vibe Code Enforcer\n * \n * \"I'm going to be honest with you... I hate this vibe code.\"\n * \n * The relentless, self-replicating enforcer specialized in hunting down\n * AI-generated code patterns. Built specifically to catch what Cursor,\n * v0, Lovable, Bolt, and other AI tools commonly get wrong.\n * \n * VIBE CODE FOCUS:\n * - Exposed secrets (OpenAI keys, Stripe keys in frontend)\n * - Frontend env vars with sensitive data (NEXT_PUBLIC_SECRET)\n * - Hardcoded localhost URLs that break in production\n * - console.log debugging left everywhere\n * - `any` type to silence TypeScript instead of fixing\n * - @ts-ignore and eslint-disable to hide problems\n * - async useEffect (incorrect pattern)\n * - async forEach (await doesn't work)\n * - Missing loading/error/empty states\n * - key={index} in React lists\n * - \"idk why this works\" comments\n * \n * Features:\n * - Persistent memory: Remembers dismissed issues, brings them back if they multiply\n * - Pattern hunter swarm: Spawns 35+ specialized hunters for each vibe code smell\n * - Multiplier effect: Finds one issue → searches for ALL similar issues\n * - Inevitability score: Calculates likelihood of production impact\n * - Philosophical output: Explains WHY the AI got it wrong\n */\nexport class AgentSmithSkill extends BaseSkill {\n name = 'agent-smith';\n description = 'Ultimate vibe code enforcer: 35 hunters, file analysis, cross-file detection, persistent memory';\n version = '2.0.0';\n override author = 'Trie Agent';\n\n private memoryPath: string = '';\n private memoryBaseDir: string | null = null;\n private memory: SmithMemoryBank | null = null;\n private swarmAnimationLog: string[] = [];\n private config: AgentSmithConfig = { ...DEFAULT_SMITH_CONFIG };\n\n /**\n * Configure Agent Smith with custom settings\n */\n configure(config: AgentSmithConfig): void {\n // Merge enabledCategories carefully to ensure all required properties exist\n const mergedCategories = {\n security: config.enabledCategories?.security ?? DEFAULT_SMITH_CONFIG.enabledCategories!.security,\n codeSmells: config.enabledCategories?.codeSmells ?? DEFAULT_SMITH_CONFIG.enabledCategories!.codeSmells,\n asyncBugs: config.enabledCategories?.asyncBugs ?? DEFAULT_SMITH_CONFIG.enabledCategories!.asyncBugs,\n reactPatterns: config.enabledCategories?.reactPatterns ?? DEFAULT_SMITH_CONFIG.enabledCategories!.reactPatterns,\n uxPatterns: config.enabledCategories?.uxPatterns ?? DEFAULT_SMITH_CONFIG.enabledCategories!.uxPatterns,\n backendPatterns: config.enabledCategories?.backendPatterns ?? DEFAULT_SMITH_CONFIG.enabledCategories!.backendPatterns,\n };\n this.config = { \n ...DEFAULT_SMITH_CONFIG, \n ...config,\n enabledCategories: mergedCategories,\n };\n }\n\n /**\n * Get current configuration\n */\n getConfig(): AgentSmithConfig {\n return { ...this.config };\n }\n\n shouldActivate(_context: CodeContext): boolean {\n // Agent Smith is explicitly invoked via trie_agent_smith, not auto-triaged.\n // His value is in finding EVERY instance across the codebase,\n // not being context-aware like other agents.\n // \n // To use: `trie_agent_smith` or `trie_smith`\n return false;\n }\n\n /**\n * Override analyzeWithAI to skip the base class AI analysis.\n * Agent Smith has its own pattern hunter swarm - we don't want placeholder issues.\n */\n protected override async analyzeWithAI(files: string[], context: ScanContext): Promise<Issue[]> {\n // Go directly to our analyzeFiles implementation which runs the pattern hunters\n return this.analyzeFiles(files, context);\n }\n \n /**\n * Agent Smith handles its own nudge notifications with custom messages\n */\n protected override handlesOwnNudges(): boolean {\n return true;\n }\n\n // No override needed — base class returns 0 when shouldActivate is false\n\n protected async analyzeFiles(files: string[], context: ScanContext): Promise<Issue[]> {\n const issues: Issue[] = [];\n const fileContents = await this.loadFileContents(files);\n const loadedFiles = Array.from(fileContents.keys());\n \n // Display Agent Smith ASCII art and greeting\n this.displaySmithEntrance();\n \n // Load persistent memory\n await this.loadMemory(context.workingDir);\n \n output().activity(`[SMITH] Deploying pattern hunter swarm across ${loadedFiles.length} files...`);\n \n // === PHASE 1: Pattern-based hunter swarm ===\n const hunterResults = await this.deployPatternHunters(loadedFiles, fileContents);\n // Log swarm animation to activity log\n for (const line of this.swarmAnimationLog) {\n output().activity(line);\n }\n \n // Process results from all pattern hunters\n for (const result of hunterResults) {\n const subIssues = await this.processHunterResult(result, context);\n issues.push(...subIssues);\n }\n \n // === PHASE 2: File-level analysis (giant files, hook counts, etc) ===\n output().activity(`[SMITH] Analyzing file-level metrics...`);\n const fileLevelResults = await this.analyzeFileLevelIssues(fileContents);\n for (const result of fileLevelResults) {\n for (const fileIssue of result.issues) {\n issues.push(this.createSmithIssue(\n this.generateSmithIssueId(),\n fileIssue.severity,\n `[SMITH] ${fileIssue.description}${fileIssue.count ? ` (${fileIssue.count} instances)` : ''}`,\n fileIssue.fix,\n result.file,\n undefined,\n fileIssue.type\n ));\n }\n }\n \n // === PHASE 3: Cross-file pattern analysis ===\n output().activity(`[SMITH] Detecting cross-file patterns...`);\n const crossFileResults = this.analyzeCrossFilePatterns(hunterResults);\n for (const result of crossFileResults) {\n issues.push(this.createSmithIssue(\n this.generateSmithIssueId(),\n result.severity,\n `[SMITH] CODEBASE-WIDE: ${result.description} -- Found in ${result.occurrences.length} files, ${result.totalCount} total instances`,\n result.fix,\n result.occurrences[0]?.file || 'multiple files',\n undefined,\n 'cross-file'\n ));\n }\n \n // Check for resurrected issues (dismissed but came back)\n const resurrectedIssues = this.checkForResurrectedIssues(issues);\n issues.push(...resurrectedIssues);\n \n // Notify immediately if issues came back after dismissal\n if (resurrectedIssues.length > 0) {\n output().nudge(\n `👻 ${resurrectedIssues.length} dismissed issue${resurrectedIssues.length > 1 ? 's have' : ' has'} returned! These violations were marked resolved but grew back.`,\n 'critical',\n undefined,\n undefined // Keep visible until dismissed\n );\n }\n \n // Save updated memory\n await this.saveMemory();\n \n // Generate AI analysis request for complex patterns\n if (loadedFiles.length > 0) {\n const aiIssue = this.createAIAnalysisIssue(loadedFiles, hunterResults);\n issues.push(aiIssue);\n }\n \n // Summary\n output().activity(`[SMITH] Hunt complete. ${issues.length} violations found.`);\n \n // Send nudge notification for important findings in watch mode\n if (issues.length > 0) {\n // Count issues by severity\n const criticalCount = issues.filter(i => i.severity === 'critical').length;\n const seriousCount = issues.filter(i => i.severity === 'serious').length;\n const moderateCount = issues.filter(i => i.severity === 'moderate').length;\n \n // Determine notification severity and message\n if (criticalCount > 0) {\n output().nudge(\n `🛑 STOP! Agent Smith found ${criticalCount} CRITICAL issue${criticalCount > 1 ? 's' : ''}. Fix before proceeding.`,\n 'critical',\n undefined,\n undefined // Keep visible until dismissed\n );\n } else if (seriousCount > 0) {\n output().nudge(\n `⚠️ Agent Smith found ${seriousCount} serious issue${seriousCount > 1 ? 's' : ''}${moderateCount > 0 ? ` and ${moderateCount} moderate` : ''}. Review recommended.`,\n 'warning',\n undefined,\n 20000 // Auto-hide after 20s\n );\n } else if (moderateCount >= 3) {\n // Only nudge for moderate issues if there are several\n output().nudge(\n `📋 Agent Smith found ${issues.length} issue${issues.length > 1 ? 's' : ''} to review.`,\n 'info',\n undefined,\n 10000 // Auto-hide after 10s\n );\n }\n }\n \n return issues;\n }\n \n /**\n * Analyze file-level issues (size, hook counts, complexity)\n */\n private async analyzeFileLevelIssues(fileContents: Map<string, string>): Promise<FileLevelResult[]> {\n const results: FileLevelResult[] = [];\n \n for (const [file, content] of fileContents.entries()) {\n try {\n const lines = content.split('\\n');\n const lineCount = lines.length;\n const fileName = file.split('/').pop() || '';\n const issues: FileLevelResult['issues'] = [];\n \n // === GIANT FILE CHECK ===\n if (lineCount > 500) {\n issues.push({\n type: 'giant-file',\n description: `File has ${lineCount} lines - THE classic vibe code smell`,\n severity: lineCount > 1000 ? 'serious' : 'moderate',\n fix: 'Split into smaller files. Components < 200 lines, pages < 300 lines'\n });\n }\n \n // === GIANT MAIN FILE CHECK ===\n if (/^(App|app|main|Main|index|page)\\.(jsx?|tsx?)$/.test(fileName) && lineCount > 300) {\n issues.push({\n type: 'giant-main',\n description: `Main entry file is ${lineCount} lines - everything dumped here`,\n severity: 'serious',\n fix: 'Extract Header, Footer, Sidebar, MainContent as separate components'\n });\n }\n \n // === STATE EXPLOSION ===\n const useStateCount = (content.match(/useState\\s*[<(]/g) || []).length;\n if (useStateCount > 10) {\n issues.push({\n type: 'state-explosion',\n description: `${useStateCount} useState hooks in one component`,\n severity: useStateCount > 15 ? 'serious' : 'moderate',\n fix: 'Group related state into objects or use useReducer',\n count: useStateCount\n });\n }\n \n // === EFFECT HELL ===\n const useEffectCount = (content.match(/useEffect\\s*\\(/g) || []).length;\n if (useEffectCount > 5) {\n issues.push({\n type: 'effect-hell',\n description: `${useEffectCount} useEffect hooks - most are probably unnecessary`,\n severity: useEffectCount > 8 ? 'serious' : 'moderate',\n fix: 'Review each useEffect - replace with event handlers or derived state',\n count: useEffectCount\n });\n }\n \n // === ANY EXPLOSION ===\n const anyCount = (content.match(/:\\s*any\\b/g) || []).length;\n if (anyCount > 5 && (file.endsWith('.ts') || file.endsWith('.tsx'))) {\n issues.push({\n type: 'any-explosion',\n description: `${anyCount} uses of \"any\" type - TypeScript defeated`,\n severity: anyCount > 10 ? 'serious' : 'moderate',\n fix: 'Define proper interfaces. AI can help: \"Generate types for this data\"',\n count: anyCount\n });\n }\n \n // === CONSOLE.LOG DENSITY ===\n const consoleCount = (content.match(/console\\.(log|debug|info)/g) || []).length;\n if (consoleCount > 10) {\n issues.push({\n type: 'console-flood',\n description: `${consoleCount} console statements - debugging never cleaned up`,\n severity: 'moderate',\n fix: 'Remove debug logs before deploying',\n count: consoleCount\n });\n }\n \n // === IMPORT CHAOS ===\n const importCount = (content.match(/^import\\s/gm) || []).length;\n if (importCount > 30) {\n issues.push({\n type: 'import-chaos',\n description: `${importCount} imports - file is doing too much`,\n severity: 'moderate',\n fix: 'Split into smaller, focused modules',\n count: importCount\n });\n }\n \n // === FUNCTION DENSITY ===\n const functionCount = (content.match(/(?:function\\s+\\w+|const\\s+\\w+\\s*=\\s*(?:async\\s*)?\\([^)]*\\)\\s*=>)/g) || []).length;\n if (functionCount > 20) {\n issues.push({\n type: 'function-explosion',\n description: `${functionCount} functions in one file`,\n severity: 'moderate',\n fix: 'Extract related functions into separate utility files',\n count: functionCount\n });\n }\n \n if (issues.length > 0) {\n results.push({ file, lineCount, issues });\n }\n } catch {\n // Skip unreadable files\n }\n }\n \n return results;\n }\n \n /**\n * Analyze cross-file patterns (same issue everywhere)\n */\n private analyzeCrossFilePatterns(hunterResults: PatternHunterResult[]): CrossFileResult[] {\n const crossFileResults: CrossFileResult[] = [];\n\n // Look for patterns that appear in many files\n for (const result of hunterResults) {\n // Group by file\n const byFile = new Map<string, number>();\n for (const instance of result.instances) {\n byFile.set(instance.file, (byFile.get(instance.file) || 0) + 1);\n }\n \n // If pattern appears in 5+ files, it's a codebase-wide problem\n if (byFile.size >= 5) {\n const occurrences = Array.from(byFile.entries()).map(([file, count]) => ({ file, count }));\n crossFileResults.push({\n pattern: result.type,\n description: `\"${PATTERN_HUNTER_CONFIGS[result.type].description}\" across ${byFile.size} files`,\n severity: this.getCrossFileSeverity(result.type, byFile.size, result.instances.length),\n fix: PATTERN_HUNTER_CONFIGS[result.type].fix,\n occurrences,\n totalCount: result.instances.length\n });\n }\n }\n \n return crossFileResults;\n }\n \n /**\n * Get severity for cross-file issues\n */\n private getCrossFileSeverity(type: PatternHunterType, fileCount: number, totalCount: number): Issue['severity'] {\n // Security issues are always critical when widespread\n if (['exposed-secret-hunter', 'frontend-env-hunter', 'sql-injection-hunter', 'dangeroushtml-hunter'].includes(type)) {\n return 'critical';\n }\n \n // High severity if very widespread\n if (fileCount >= 10 || totalCount >= 50) return 'serious';\n if (fileCount >= 5 || totalCount >= 20) return 'moderate';\n return 'low';\n }\n \n /**\n * Deploy all pattern hunters in parallel\n * \n * VIBE CODE FOCUSED: 35 specialized hunters targeting AI-generated anti-patterns.\n * Agent Smith hunts down EVERY instance across the entire codebase.\n */\n private async deployPatternHunters(files: string[], fileContents: Map<string, string>): Promise<PatternHunterResult[]> {\n const hunterTypes: PatternHunterType[] = [\n // === CRITICAL: Security (AI exposes secrets constantly) ===\n 'exposed-secret-hunter',\n 'frontend-env-hunter',\n 'hardcoded-localhost-hunter',\n 'sql-injection-hunter',\n 'dangeroushtml-hunter',\n\n // === SERIOUS: AI Code Smells ===\n 'console-hunter',\n 'any-hunter',\n 'ts-ignore-hunter',\n 'eslint-disable-hunter',\n 'debugger-hunter',\n 'force-flag-hunter',\n\n // === MODERATE: Async/Promise Bugs ===\n 'async-useeffect-hunter',\n 'async-foreach-hunter',\n 'missing-await-hunter',\n 'empty-catch-hunter',\n 'floating-promise-hunter',\n\n // === MODERATE: React Anti-patterns ===\n 'useeffect-abuse-hunter',\n 'usestate-explosion-hunter',\n 'index-key-hunter',\n 'inline-object-hunter',\n 'prop-drilling-hunter',\n\n // === MODERATE: Missing UX ===\n 'missing-loading-hunter',\n 'missing-error-hunter',\n 'missing-empty-hunter',\n 'page-reload-hunter',\n\n // === MODERATE: Backend Anti-patterns ===\n 'no-validation-hunter',\n 'raw-error-hunter',\n 'n-plus-one-hunter',\n\n // === LOW: Incomplete Code ===\n 'todo-hunter',\n 'vibe-comment-hunter',\n 'placeholder-hunter',\n 'sleep-hack-hunter',\n 'fallback-hunter',\n\n // === LOW: AI Slop Aesthetic ===\n 'purple-gradient-hunter',\n 'star-icon-hunter',\n 'generic-hero-hunter',\n 'emoji-overflow-hunter',\n 'inter-font-hunter'\n ];\n\n output().activity(` Deploying ${hunterTypes.length} specialized hunters across ${files.length} files...`);\n\n // Show swarming animation and capture log\n const { results, animationLog } = await this.runHunterSwarm(hunterTypes, fileContents);\n\n // Store animation log for later display\n this.swarmAnimationLog = animationLog;\n\n const activeHunters = results.filter(r => r.instances.length > 0);\n output().activity(` >> ${activeHunters.length} hunters found targets. Violations acquired.`);\n\n return activeHunters;\n }\n\n /**\n * Run agents with visual swarming animation - captures output for display\n */\n private async runHunterSwarm(hunterTypes: PatternHunterType[], fileContents: Map<string, string>): Promise<{ results: PatternHunterResult[], animationLog: string[] }> {\n const results: PatternHunterResult[] = [];\n const animationLog: string[] = [];\n\n // ASCII hunters for visual swarming\n const hunterChars = ['◢', '◣', '◤', '◥', '▲', '▼', '◆', '●', '▶', '◀'];\n const batchSize = 8;\n\n animationLog.push('[SMITH] DEPLOYING PATTERN HUNTER SWARM...');\n animationLog.push('');\n\n // Run hunters in batches for better visual effect\n for (let i = 0; i < hunterTypes.length; i += batchSize) {\n const batch = hunterTypes.slice(i, i + batchSize);\n const batchNum = Math.floor(i / batchSize) + 1;\n const totalBatches = Math.ceil(hunterTypes.length / batchSize);\n\n // Show batch deployment\n const batchDisplay = batch.map((_, idx) => hunterChars[idx % hunterChars.length]).join(' ');\n animationLog.push(` Batch ${batchNum}/${totalBatches}: [${batchDisplay}] deploying...`);\n\n const startTime = Date.now();\n\n // Run batch in parallel\n const batchPromises = batch.map(async (type, idx) => {\n const result = await this.runPatternHunter(type, fileContents);\n return { result, hunterChar: hunterChars[idx % hunterChars.length], type };\n });\n\n const batchResults = await Promise.all(batchPromises);\n results.push(...batchResults.map(r => r.result));\n\n // Show results with visual feedback\n const batchTime = Date.now() - startTime;\n const indicators = batchResults.map(r =>\n r.result.instances.length > 0 ? '*' : '-'\n );\n const violationsFound = batchResults.filter(r => r.result.instances.length > 0);\n\n animationLog.push(` Results: [${indicators.join(' ')}] ${violationsFound.length}/${batch.length} hunters found targets (${batchTime}ms)`);\n\n if (violationsFound.length > 0) {\n const targets = violationsFound.slice(0, 3).map(r => {\n const severity = this.getAgentSeverity(r.type);\n const label = severity === 'critical' ? '[C]' : severity === 'serious' ? '[S]' : '[M]';\n return `${label} ${r.type.replace('-hunter', '')}`;\n });\n animationLog.push(` > ${targets.join(', ')}${violationsFound.length > 3 ? ` +${violationsFound.length - 3} more` : ''}`);\n }\n\n animationLog.push('');\n\n // Small delay for visual effect in actual terminal\n if (i + batchSize < hunterTypes.length) {\n await new Promise(resolve => setTimeout(resolve, 50));\n }\n }\n\n const totalViolations = results.reduce((sum, r) => sum + r.instances.length, 0);\n animationLog.push(`[SMITH] SWARM COMPLETE: ${totalViolations} violations found`);\n\n return { results, animationLog };\n }\n\n /**\n * Get agent severity for visual display\n */\n private getAgentSeverity(agentType: string): 'critical' | 'serious' | 'moderate' | 'low' {\n const criticalAgents = ['exposed-secret-hunter', 'frontend-env-hunter', 'hardcoded-localhost-hunter', 'sql-injection-hunter', 'dangeroushtml-hunter'];\n const seriousAgents = ['console-hunter', 'any-hunter', 'ts-ignore-hunter', 'eslint-disable-hunter', 'debugger-hunter', 'force-flag-hunter'];\n\n if (criticalAgents.includes(agentType)) return 'critical';\n if (seriousAgents.includes(agentType)) return 'serious';\n return 'moderate';\n }\n\n\n /**\n * Run a single pattern hunter across all files\n */\n private async runPatternHunter(type: PatternHunterType, fileContents: Map<string, string>): Promise<PatternHunterResult> {\n const config = PATTERN_HUNTER_CONFIGS[type];\n const instances: PatternHunterResult['instances'] = [];\n \n for (const [file, content] of fileContents.entries()) {\n try {\n const lines = content.split('\\n');\n \n // Skip test files for most hunters\n if (this.isTestFile(file) && type !== 'todo-hunter') {\n continue;\n }\n \n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n if (!line) continue;\n \n // Reset regex lastIndex for global patterns\n config.pattern.lastIndex = 0;\n \n if (config.pattern.test(line)) {\n // Get context (3 lines before and after)\n const contextStart = Math.max(0, i - 3);\n const contextEnd = Math.min(lines.length, i + 4);\n const contextLines = lines.slice(contextStart, contextEnd).join('\\n');\n \n instances.push({\n file,\n line: i + 1,\n code: line.trim(),\n context: contextLines\n });\n }\n }\n } catch {\n // Skip unreadable files\n }\n }\n \n return { type, pattern: config.description, instances };\n }\n\n /**\n * Process pattern hunter results into issues\n */\n private async processHunterResult(result: PatternHunterResult, _context: ScanContext): Promise<Issue[]> {\n const issues: Issue[] = [];\n const config = PATTERN_HUNTER_CONFIGS[result.type];\n \n // Group by file for better reporting\n const byFile = new Map<string, typeof result.instances>();\n for (const instance of result.instances) {\n const existing = byFile.get(instance.file) || [];\n existing.push(instance);\n byFile.set(instance.file, existing);\n }\n \n for (const [file, instances] of byFile) {\n // Calculate inevitability score\n const inevitabilityScore = this.calculateInevitabilityScore(result.type, instances.length);\n \n // Create memory hash for tracking\n const hash = this.createPatternHash(result.type, file);\n await this.updateMemory(hash, result.pattern, result.type, file, instances.length);\n const issueId = this.generateSmithIssueId(hash);\n \n // Determine severity based on count and inevitability\n const severity = this.determineSeverity(instances.length, inevitabilityScore);\n \n // Get Agent Smith's philosophical observation\n const smithNote = this.getPhilosophicalNote(result.type, instances.length);\n const fixWithNote = `\"${smithNote}\"\\n\\n${config.fix}`;\n \n issues.push(this.createSmithIssue(\n issueId,\n severity,\n `[SMITH] ${config.description} -- ${instances.length} instance${instances.length > 1 ? 's' : ''} in ${basename(file)} (score: ${inevitabilityScore}/100)`,\n fixWithNote,\n file,\n instances[0]?.line,\n result.type\n ));\n }\n \n return issues;\n }\n\n /**\n * Check for issues that were dismissed but have multiplied\n */\n private checkForResurrectedIssues(currentIssues: Issue[]): Issue[] {\n const resurrected: Issue[] = [];\n \n if (!this.memory) return resurrected;\n \n for (const [hash, memory] of Object.entries(this.memory.issues)) {\n if (memory.dismissedAt && !memory.resurrected) {\n // Check if this pattern has come back\n const currentCount = this.countCurrentOccurrences(hash, currentIssues);\n const previousCount = memory.occurrences;\n \n if (currentCount > previousCount) {\n // It's back and multiplied!\n memory.resurrected = true;\n \n resurrected.push(this.createSmithIssue(\n this.generateSmithIssueId(),\n 'serious',\n `[SMITH] RESURRECTED: \"${memory.pattern}\" has returned -- Previous: ${previousCount}, Current: ${currentCount}`,\n `You dismissed this issue on ${new Date(memory.dismissedAt).toLocaleDateString()}, but it grew from ${previousCount} to ${currentCount} occurrences.`,\n memory.locations[0]?.split(':')[0] || 'unknown',\n undefined,\n 'resurrected'\n ));\n }\n }\n }\n \n return resurrected;\n }\n\n /**\n * Calculate inevitability score (0-100)\n * Higher score = more likely to cause production issues\n * \n * VIBE CODE SCORING: Based on how often these issues\n * cause real production problems in AI-generated projects.\n */\n private calculateInevitabilityScore(type: PatternHunterType, count: number): number {\n const baseScores: Record<PatternHunterType, number> = {\n // CRITICAL: Security - these WILL be exploited\n 'exposed-secret-hunter': 99,\n 'frontend-env-hunter': 95,\n 'hardcoded-localhost-hunter': 90,\n 'sql-injection-hunter': 98,\n 'dangeroushtml-hunter': 92,\n \n // SERIOUS: Code smells that hide real bugs\n 'console-hunter': 40,\n 'any-hunter': 60,\n 'ts-ignore-hunter': 75,\n 'eslint-disable-hunter': 65,\n 'debugger-hunter': 85,\n 'force-flag-hunter': 70,\n \n // MODERATE: Async bugs - silent failures\n 'async-useeffect-hunter': 70,\n 'async-foreach-hunter': 80,\n 'missing-await-hunter': 75,\n 'empty-catch-hunter': 70,\n 'floating-promise-hunter': 72,\n \n // MODERATE: React anti-patterns\n 'useeffect-abuse-hunter': 30,\n 'usestate-explosion-hunter': 35,\n 'index-key-hunter': 55,\n 'inline-object-hunter': 25,\n 'prop-drilling-hunter': 40,\n \n // MODERATE: Missing UX - users will complain\n 'missing-loading-hunter': 50,\n 'missing-error-hunter': 65,\n 'missing-empty-hunter': 45,\n 'page-reload-hunter': 60,\n \n // MODERATE: Backend anti-patterns\n 'no-validation-hunter': 85,\n 'raw-error-hunter': 75,\n 'n-plus-one-hunter': 70,\n \n // LOW: Incomplete code\n 'todo-hunter': 30,\n 'vibe-comment-hunter': 40,\n 'placeholder-hunter': 55,\n 'sleep-hack-hunter': 65,\n 'fallback-hunter': 75,\n \n // LOW: Dead code\n 'commented-code-hunter': 25,\n 'unreachable-code-hunter': 45,\n 'unused-import-hunter': 20,\n 'empty-function-hunter': 35,\n 'dead-branch-hunter': 30,\n \n // LOW: AI Slop Aesthetic\n 'purple-gradient-hunter': 25,\n 'star-icon-hunter': 20,\n 'generic-hero-hunter': 35,\n 'emoji-overflow-hunter': 15,\n 'inter-font-hunter': 10\n };\n \n const base = baseScores[type] || 30;\n const multiplier = Math.log10(count + 1) * 15; // Logarithmic growth\n \n return Math.min(100, Math.round(base + multiplier));\n }\n\n /**\n * Determine severity based on count and inevitability\n */\n private determineSeverity(count: number, inevitability: number): Issue['severity'] {\n if (inevitability >= 80 || count >= 50) return 'critical';\n if (inevitability >= 60 || count >= 20) return 'serious';\n if (inevitability >= 40 || count >= 5) return 'moderate';\n return 'low';\n }\n\n /**\n * Get a philosophical note from Agent Smith\n * \n * VIBE CODE FOCUSED: Commentary specifically about AI-generated code patterns.\n * Agent Smith knows the vibes... and he disapproves.\n */\n private getPhilosophicalNote(type: PatternHunterType, count: number): string {\n const notes: Record<PatternHunterType, string[]> = {\n // === CRITICAL: Security ===\n 'exposed-secret-hunter': [\n 'You put your API key in the code. The machines thank you for your generosity.',\n 'OpenAI key in the frontend. Every script kiddie on the internet thanks you.',\n 'Hardcoded secrets. The AI gave you this code... and your keys to the kingdom.'\n ],\n 'frontend-env-hunter': [\n 'NEXT_PUBLIC_SECRET. The irony... is lost on the AI. And on you.',\n 'VITE_API_KEY. Visible to every user. Every. Single. One.',\n 'The AI put your secrets in the bundle. Now they belong to everyone.'\n ],\n 'hardcoded-localhost-hunter': [\n 'localhost:3000. Works on your machine. Dies in production.',\n 'The AI thinks localhost is production-ready. The AI... is mistaken.',\n '127.0.0.1 - The address that works everywhere... except where it matters.'\n ],\n 'sql-injection-hunter': [\n 'String concatenation in SQL. The AI just opened the door... to every attacker.',\n 'SELECT * FROM users WHERE id = ${userId}. Little Bobby Tables sends his regards.',\n 'SQL injection. The oldest vulnerability. The AI\\'s newest gift to hackers.'\n ],\n 'dangeroushtml-hunter': [\n 'dangerouslySetInnerHTML. The name is a warning. The AI ignored it.',\n 'innerHTML. The AI gave attackers a direct line to your users\\' browsers.',\n 'XSS vulnerability. The AI writes code. Attackers write scripts inside it.'\n ],\n\n // === SERIOUS: AI Code Smells ===\n 'console-hunter': [\n 'console.log everywhere. The AI\\'s debugging... left for you to clean.',\n 'You print to console... the users see nothing. But the bundle grows.',\n 'Debug statements. The fossils of development. Preserved... forever.'\n ],\n 'any-hunter': [\n '\\'any\\' - The AI couldn\\'t figure out the types. Neither will you.',\n 'Type safety? The AI chose violence instead. It chose \\'any\\'.',\n 'You asked for TypeScript. The AI gave you JavaScript... with extra steps.'\n ],\n 'ts-ignore-hunter': [\n '@ts-ignore. The AI hid the error. The error... did not go away.',\n 'TypeScript tried to warn you. The AI silenced it. How very... efficient.',\n '@ts-nocheck. An entire file... surrendered to chaos.'\n ],\n 'eslint-disable-hunter': [\n 'eslint-disable. The linter saw the problem. The AI chose ignorance.',\n 'Why fix the bug when you can hide the warning? Very... human.',\n 'The rules exist for a reason. But the AI... plays by its own rules.'\n ],\n 'debugger-hunter': [\n 'debugger. Left in production. The browser freezes. The users... wonder.',\n 'A debugger statement. The AI forgot. You will remember... in production.',\n 'debugger. Time stops. But only in the browser. Not for your users\\' patience.'\n ],\n 'force-flag-hunter': [\n 'force: true. The AI bypassed the safety check. The check existed for a reason.',\n '--no-verify. Git hooks were trying to help. The AI said no.',\n 'skipValidation. What could possibly go wrong? Everything. Everything could go wrong.'\n ],\n\n // === MODERATE: Async/Promise Bugs ===\n 'async-useeffect-hunter': [\n 'async useEffect. The AI\\'s favorite mistake. React\\'s least favorite pattern.',\n 'useEffect(async () => ...). The warning exists. The AI ignores it.',\n 'Async useEffect. It looks right. It feels right. It is... wrong.'\n ],\n 'async-foreach-hunter': [\n 'async forEach. The await... waits for nothing. The AI... knows nothing.',\n 'forEach does not await. The AI does not understand. Neither does the code.',\n 'You await inside forEach. The promises resolve... in chaos.'\n ],\n 'missing-await-hunter': [\n 'fetch without await. The data loads... eventually. The UI updates... never.',\n 'The promise floats. Untethered. Unhandled. Unresolved.',\n 'async function, no await. Like a phone call where nobody speaks.'\n ],\n 'empty-catch-hunter': [\n 'catch {}. The error screamed. Nobody heard. The AI made sure of that.',\n 'Silent failure. The AI\\'s specialty. The user\\'s confusion.',\n 'Empty catch. The bug is caught... and immediately released back into the wild.'\n ],\n 'floating-promise-hunter': [\n 'A promise, floating. Never awaited. Never caught. Forever pending.',\n 'The AI created a promise. Then... moved on. The promise remains.',\n 'Fire and forget. Except the fire never went out. It\\'s still burning.'\n ],\n\n // === MODERATE: React Anti-patterns ===\n 'useeffect-abuse-hunter': [\n 'useEffect for everything. The AI\\'s hammer for every nail.',\n 'Effects. So many effects. Most of them... unnecessary.',\n 'useEffect could be an event handler. But the AI... chose complexity.'\n ],\n 'usestate-explosion-hunter': [\n 'useState, useState, useState... The AI created a state management nightmare.',\n '10 useState calls. The AI could use an object. The AI chose chaos.',\n 'State explosion. Each variable... its own island. Its own re-render.'\n ],\n 'index-key-hunter': [\n 'key={index}. The AI\\'s lazy choice. React\\'s reconciliation nightmare.',\n 'Array index as key. Reorder the list. Watch the chaos unfold.',\n 'key={i}. It works... until it doesn\\'t. And it will stop working.'\n ],\n 'inline-object-hunter': [\n 'style={{}}. A new object. Every render. Every time.',\n 'Inline objects. The AI\\'s performance anti-pattern of choice.',\n 'A new object is born. On every render. Only to die immediately.'\n ],\n 'prop-drilling-hunter': [\n 'Props drilling down, down, down... The AI\\'s idea of state management.',\n 'The same prop, passed through 5 components. Why? The AI... never asked.',\n 'Prop drilling. Like passing a note through every student to reach the teacher.'\n ],\n\n // === MODERATE: Missing UX ===\n 'missing-loading-hunter': [\n 'No loading state. The screen is blank. The user... waits. And wonders.',\n 'Data fetches. UI shows nothing. The user assumes it\\'s broken. They\\'re... not wrong.',\n 'Loading state? The AI forgot. Your users will remember.'\n ],\n 'missing-error-hunter': [\n 'No error handling. When the API fails... the app fails. Silently.',\n 'fetch without catch. The network fails. The user sees... nothing.',\n 'Errors are inevitable. Your handling of them... is not.'\n ],\n 'missing-empty-hunter': [\n 'No empty state. Zero items. Zero feedback. Zero UX.',\n 'The list is empty. The UI is empty. The user\\'s understanding... is empty.',\n 'What happens when there\\'s no data? The AI never asked. You should.'\n ],\n 'page-reload-hunter': [\n 'location.reload(). The AI\\'s nuclear option for state management.',\n 'Reload the page to fix state. The user loses everything. Brilliant.',\n 'window.location.reload(). Because fixing state properly is... hard.'\n ],\n\n // === MODERATE: Backend Anti-patterns ===\n 'no-validation-hunter': [\n 'req.body.email. Trusted. Unvalidated. Waiting to be exploited.',\n 'User input, used directly. The AI trusts everyone. You shouldn\\'t.',\n 'No validation. The attacker sends { admin: true }. The app believes them.'\n ],\n 'raw-error-hunter': [\n 'Error message sent to client. Stack traces. File paths. Internal secrets.',\n 'res.json(error). The attacker says thank you for the debugging information.',\n 'Raw errors in production. The AI\\'s gift to penetration testers.'\n ],\n 'n-plus-one-hunter': [\n 'Query in a loop. 100 users = 101 queries. The database... suffers.',\n 'N+1 problem. The AI fetched efficiently... for one user. Not for a hundred.',\n 'await in forEach. The database connection pool is crying.'\n ],\n\n // === LOW: Incomplete Code ===\n 'todo-hunter': [\n 'TODO. The AI\\'s promise to future you. Future you... is still waiting.',\n 'FIXME. Acknowledged. Not fixed. Never fixed.',\n 'Every TODO is technical debt. The AI generates debt... efficiently.'\n ],\n 'vibe-comment-hunter': [\n '\\'idk why this works\\'. The AI doesn\\'t know. You don\\'t know. Nobody knows.',\n '\\'don\\'t touch this\\'. The vibe coder\\'s warning. The maintainer\\'s nightmare.',\n '\\'somehow works\\'. Somehow... will stop working. Inevitably.'\n ],\n 'placeholder-hunter': [\n 'test@test.com. In production. The AI\\'s placeholder... became permanent.',\n 'example.com. Hardcoded. Shipped. The real URL? Nobody added it.',\n 'Placeholder data. Placeholder quality. Placeholder product.'\n ],\n 'sleep-hack-hunter': [\n 'setTimeout(1000). The AI\\'s solution to race conditions: just wait.',\n 'await sleep(2000). Works on fast connections. Fails on slow ones. Wastes time on all.',\n 'Sleep to fix timing. The race condition still exists. It just happens later.'\n ],\n 'fallback-hunter': [\n 'return null. The AI\\'s favorite way to hide errors. The user sees... nothing.',\n 'return []. Empty array, empty understanding, empty debugging.',\n 'Fallback code. The bug is still there. You just can\\'t see it anymore.'\n ],\n \n // === DEAD CODE (AI leaves cruft everywhere) ===\n 'commented-code-hunter': [\n 'Commented-out blocks. Fossils of code past. Confusion for the future.',\n 'Large comment blocks hide history. Git already remembers. Delete the noise.',\n 'Dead code in comments. The AI was unsure. You should be certain.'\n ],\n 'unreachable-code-hunter': [\n 'Code after return. Forever skipped. Forever confusing.',\n 'Unreachable branches. They stay forever. Bugs hide behind them.',\n 'Execution stops. The dead code remains. Remove the ghosts.'\n ],\n 'unused-import-hunter': [\n 'Imports unused. Bundles bloated. Intent unclear.',\n 'An import with no purpose. The AI added it. You can remove it.',\n 'Unused imports multiply. Tree shaking sighs.'\n ],\n 'empty-function-hunter': [\n 'Empty function bodies. Promises without delivery.',\n 'Stub functions linger. The AI forgot to finish.',\n 'Empty handlers. They do nothing. They hide missing behavior.'\n ],\n 'dead-branch-hunter': [\n 'if (true) with no reason. if (false) with no hope.',\n 'Dead conditionals: code that never runs, but always confuses.',\n 'Always-true or always-false. Remove the illusion of choice.'\n ],\n \n // AI Slop Aesthetic\n 'purple-gradient-hunter': [\n 'Purple gradient. The AI\\'s signature. Every vibe-coded site... looks the same.',\n 'from-purple-500 to-violet-600. I\\'ve seen this a million times. So has everyone else.',\n 'The purple gradient. It screams \\'I let AI design this.\\' Is that what you want?'\n ],\n 'star-icon-hunter': [\n 'Stars. Everywhere. The AI decorates like a child with stickers.',\n 'Five stars for the AI\\'s creativity. Zero stars for originality.',\n 'Star icons. The AI\\'s answer to \\'make it look nice.\\' It does not.'\n ],\n 'generic-hero-hunter': [\n '\\'Welcome to the future of...\\' The AI writes copy. The copy says nothing.',\n '\\'Transform your workflow.\\' What workflow? Doing what? The AI doesn\\'t know.',\n 'Generic hero copy. Your product is unique. Your landing page... is not.'\n ],\n 'emoji-overflow-hunter': [\n 'Emojis in production code. The AI\\'s crutch for visual interest.',\n 'Every emoji is an admission: the design couldn\\'t speak for itself.',\n 'The AI decorates. Real designers communicate.'\n ],\n 'inter-font-hunter': [\n 'Inter. The only font the AI knows. The only font everyone uses.',\n 'system-ui. The AI takes the path of least resistance. Every time.',\n 'Inter font. Safe. Boring. Forgettable. Just like every other AI site.'\n ]\n };\n \n const typeNotes = notes[type] || ['I have my eye on your vibe code.'];\n const index = count % typeNotes.length;\n return typeNotes[index] || typeNotes[0] || '';\n }\n\n /**\n * Create AI analysis issue for complex pattern detection\n */\n private createAIAnalysisIssue(files: string[], hunterResults: PatternHunterResult[]): Issue {\n const totalIssues = hunterResults.reduce((sum, r) => sum + r.instances.length, 0);\n const categories = hunterResults.map(r => r.type).join(', ');\n \n return this.createSmithIssue(\n this.generateSmithIssueId(),\n 'moderate',\n `[SMITH] AI Analysis Required -- ${totalIssues} violations in ${files.length} files`,\n `Analyze for deeper code quality issues, architectural problems, and patterns that pattern hunters may have missed. Categories: ${categories}`,\n files[0] || 'unknown',\n undefined,\n 'ai-analysis'\n );\n }\n\n // ============ Memory/Persistence System ============\n\n /**\n * Load memory from disk\n */\n private async loadMemory(workingDir: string): Promise<void> {\n this.memoryBaseDir = workingDir;\n this.memoryPath = join(workingDir, '.trie', 'smith-memory.json');\n \n try {\n if (existsSync(this.memoryPath)) {\n const content = await readFile(this.memoryPath, 'utf-8');\n this.memory = JSON.parse(content);\n } else {\n this.memory = {\n version: '1.0.0',\n lastScan: new Date().toISOString(),\n issues: {},\n assimilationCount: 0\n };\n }\n } catch {\n this.memory = {\n version: '1.0.0',\n lastScan: new Date().toISOString(),\n issues: {},\n assimilationCount: 0\n };\n }\n }\n\n /**\n * Display Agent Smith ASCII art entrance\n * Uses OutputManager to route to TUI or console based on mode\n */\n private displaySmithEntrance(): void {\n const greeting = AGENT_SMITH_GREETING[Math.floor(Math.random() * AGENT_SMITH_GREETING.length)] ?? 'The code will be... assimilated.';\n\n // Route through OutputManager - it will send to dashboard if TUI mode, console otherwise\n output().banner('agent-smith', AGENT_SMITH_ASCII, {\n quote: greeting,\n version: this.version\n });\n }\n\n /**\n * Save memory to disk (with optimization)\n */\n private async saveMemory(): Promise<void> {\n if (!this.memory || !this.memoryPath) return;\n \n this.memory.lastScan = new Date().toISOString();\n \n // Optimize before saving\n this.pruneMemory();\n \n try {\n await mkdir(dirname(this.memoryPath), { recursive: true });\n await writeFile(this.memoryPath, JSON.stringify(this.memory, null, 2));\n } catch {\n // Silently fail - memory is optional\n }\n }\n\n /**\n * Prune memory to prevent unbounded growth\n */\n private pruneMemory(): void {\n if (!this.memory) return;\n \n const now = Date.now();\n const pruneThreshold = MEMORY_LIMITS.PRUNE_AFTER_DAYS * 24 * 60 * 60 * 1000;\n \n // Remove old resolved issues (not seen in 30 days, already resurrected or no occurrences)\n const issues = Object.entries(this.memory.issues);\n for (const [hash, issue] of issues) {\n const lastSeenTime = new Date(issue.lastSeen).getTime();\n const age = now - lastSeenTime;\n \n // Prune if: old + (resurrected OR zero occurrences OR dismissed and not growing)\n if (age > pruneThreshold) {\n if (issue.resurrected || issue.occurrences === 0 || \n (issue.dismissedAt && issue.occurrences <= 1)) {\n delete this.memory.issues[hash];\n }\n }\n }\n \n // If still too many issues, prune oldest first\n const remainingIssues = Object.entries(this.memory.issues);\n if (remainingIssues.length > MEMORY_LIMITS.MAX_TRACKED_ISSUES) {\n // Sort by lastSeen, oldest first\n remainingIssues.sort((a, b) => \n new Date(a[1].lastSeen).getTime() - new Date(b[1].lastSeen).getTime()\n );\n \n // Remove oldest until under limit\n const toRemove = remainingIssues.length - MEMORY_LIMITS.MAX_TRACKED_ISSUES;\n for (let i = 0; i < toRemove; i++) {\n const hash = remainingIssues[i]?.[0];\n if (hash) delete this.memory.issues[hash];\n }\n }\n }\n\n /**\n * Clear all memory (user command)\n */\n async clearMemory(): Promise<{ success: boolean; message: string }> {\n try {\n if (this.memoryPath && existsSync(this.memoryPath)) {\n await rm(this.memoryPath);\n this.memory = null;\n return { \n success: true, \n message: '[SMITH] Memory cleared.' \n };\n }\n return { \n success: true, \n message: '[SMITH] No memory file found. Nothing to clear.' \n };\n } catch (error) {\n return { \n success: false, \n message: `Failed to clear memory: ${error}` \n };\n }\n }\n\n /**\n * Get memory stats (for diagnostics)\n */\n async getMemoryStats(): Promise<{\n issueCount: number;\n dismissedCount: number;\n resurrectedCount: number;\n oldestIssue: string | null;\n fileSizeKB: number;\n }> {\n await this.loadMemory(process.cwd());\n \n if (!this.memory) {\n return {\n issueCount: 0,\n dismissedCount: 0,\n resurrectedCount: 0,\n oldestIssue: null,\n fileSizeKB: 0\n };\n }\n \n const issues = Object.values(this.memory.issues);\n let fileSizeKB = 0;\n \n try {\n if (this.memoryPath && existsSync(this.memoryPath)) {\n const stats = await import('fs/promises').then(fs => fs.stat(this.memoryPath));\n fileSizeKB = Math.round(stats.size / 1024 * 10) / 10;\n }\n } catch {\n // Ignore\n }\n \n const sortedByDate = [...issues].sort((a, b) => \n new Date(a.firstSeen).getTime() - new Date(b.firstSeen).getTime()\n );\n \n return {\n issueCount: issues.length,\n dismissedCount: issues.filter(i => i.dismissedAt).length,\n resurrectedCount: issues.filter(i => i.resurrected).length,\n oldestIssue: sortedByDate[0]?.firstSeen || null,\n fileSizeKB\n };\n }\n\n /**\n * Update memory with new occurrence\n */\n private async updateMemory(\n hash: string, \n pattern: string, \n category: string, \n location: string, \n count: number\n ): Promise<void> {\n if (!this.memory) return;\n \n const existing = this.memory.issues[hash];\n const now = new Date().toISOString();\n \n if (existing) {\n existing.lastSeen = now;\n existing.occurrences = count;\n existing.locations = [location, ...existing.locations.slice(0, MEMORY_LIMITS.MAX_LOCATIONS_PER_ISSUE - 1)];\n } else {\n this.memory.issues[hash] = {\n hash,\n pattern,\n category,\n firstSeen: now,\n lastSeen: now,\n occurrences: count,\n locations: [location],\n resurrected: false\n };\n }\n \n this.memory.assimilationCount++;\n }\n\n /**\n * Dismiss an issue (mark it as seen/accepted)\n */\n async dismissIssue(hash: string, workingDir?: string): Promise<void> {\n const baseDir = this.memoryBaseDir ?? workingDir ?? process.cwd();\n await this.loadMemory(baseDir);\n \n if (this.memory && this.memory.issues[hash]) {\n this.memory.issues[hash].dismissedAt = new Date().toISOString();\n await this.saveMemory();\n }\n }\n\n /**\n * Create a hash for pattern tracking\n */\n private createPatternHash(type: PatternHunterType, file: string): string {\n return createHash('md5').update(`${type}:${file}`).digest('hex').slice(0, 12);\n }\n\n /**\n * Count current occurrences for a pattern hash\n */\n private countCurrentOccurrences(hash: string, issues: Issue[]): number {\n // Extract the type from the hash pattern\n const memory = this.memory?.issues[hash];\n if (!memory) return 0;\n \n // Prefer the encoded hash in the issue id, fall back to category match\n return issues.filter(i => \n i.id.includes(hash) || \n i.category === memory.category || \n (memory.category ? i.issue.includes(memory.category) : false)\n ).length;\n }\n\n /**\n * Check if file is a test file\n */\n private isTestFile(file: string): boolean {\n return /\\.(test|spec)\\.[jt]sx?$/.test(file) ||\n /__(tests|mocks)__/.test(file) ||\n /\\/test\\//.test(file);\n }\n\n // ============ Helper Methods ============\n\n /**\n * Preload file contents once to avoid repeated I/O across pattern hunters\n */\n private async loadFileContents(files: string[]): Promise<Map<string, string>> {\n const contents = new Map<string, string>();\n\n for (const file of files) {\n try {\n const buffer = await readFile(file);\n\n // Skip obvious binaries or extremely large files to avoid thrashing\n if (buffer.includes(0) || buffer.byteLength > FILE_SCAN_LIMITS.MAX_BYTES) {\n continue;\n }\n\n contents.set(file, buffer.toString('utf-8'));\n } catch {\n // Skip unreadable files\n }\n }\n\n return contents;\n }\n\n private createSmithIssue(\n id: string,\n severity: Issue['severity'],\n issue: string,\n fix: string,\n file: string,\n line?: number,\n category?: string\n ): Issue {\n const result: Issue = {\n id,\n agent: this.name,\n severity,\n issue,\n fix,\n file,\n confidence: 0.9,\n autoFixable: false,\n };\n \n // Only add optional properties if defined (exactOptionalPropertyTypes)\n if (line !== undefined) {\n result.line = line;\n }\n if (category !== undefined) {\n result.category = category;\n }\n \n return result;\n }\n\n private generateSmithIssueId(seed?: string): string {\n const base = seed ? `smith-${seed}` : 'smith';\n return `${base}-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;\n }\n}\n\n/**\n * Export pattern hunter configs for testing\n */\nexport { PATTERN_HUNTER_CONFIGS, PatternHunterType, IssueMemory, SmithMemoryBank };\n\n// Backward compatibility export\nexport { AgentSmithSkill as AgentSmithAgent };\n"],"mappings":";;;;;;;;;;;AAEA,SAAS,gBAAgB;;;ACezB,OAAO,QAAQ;AAoFf,IAAM,oBAAN,MAAwB;AAAA,EACd,OAAmB;AAAA,EACnB;AAAA,EACA,iBAA2B,CAAC;AAAA,EAC5B,aAA8B,CAAC;AAAA,EAC/B,eAAwE,CAAC;AAAA;AAAA,EAGzE,WAA2D;AAAA,EAC3D,YAA6D;AAAA,EAC7D,SAAuD;AAAA,EACvD,cAAiE;AAAA,EACjE,aAA+D;AAAA,EAC/D,WAAkE;AAAA,EAClE,aAAsD;AAAA,EACtD,QAAgE;AAAA,EAChE,UAAyD;AAAA;AAAA;AAAA;AAAA,EAKjE,QAAQ,MAAwB;AAC9B,SAAK,OAAO;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,UAAsB;AACpB,WAAO,KAAK;AAAA,EACd;AAAA;AAAA;AAAA;AAAA,EAKA,oBAAoB,SAAiC;AACnD,SAAK,mBAAmB;AAAA,EAC1B;AAAA;AAAA;AAAA;AAAA,EAKA,qBAAqB,WAUZ;AACP,SAAK,WAAW,UAAU;AAC1B,SAAK,YAAY,UAAU;AAC3B,SAAK,SAAS,UAAU;AACxB,SAAK,cAAc,UAAU;AAC7B,SAAK,aAAa,UAAU;AAC5B,SAAK,WAAW,UAAU;AAC1B,SAAK,aAAa,UAAU;AAC5B,SAAK,QAAQ,UAAU;AACvB,SAAK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KAAK,OAAO,aAAa,iBAAiB,WAAW;AACxE;AAAA,QACF;AAEA,iBAAS,IAAI,MAAM,OAAO,SAAS,OAAO,CAAC;AAAA,MAC7C,QAAQ;AAAA,MAER;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAAA,EAEQ,iBACN,IACA,UACA,OACA,KACA,MACA,MACA,UACO;AACP,UAAM,SAAgB;AAAA,MACpB;AAAA,MACA,OAAO,KAAK;AAAA,MACZ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY;AAAA,MACZ,aAAa;AAAA,IACf;AAGA,QAAI,SAAS,QAAW;AACtB,aAAO,OAAO;AAAA,IAChB;AACA,QAAI,aAAa,QAAW;AAC1B,aAAO,WAAW;AAAA,IACpB;AAEA,WAAO;AAAA,EACT;AAAA,EAEQ,qBAAqB,MAAuB;AAClD,UAAM,OAAO,OAAO,SAAS,IAAI,KAAK;AACtC,WAAO,GAAG,IAAI,IAAI,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,GAAG,CAAC,CAAC;AAAA,EACxE;AACF;","names":["readFile","instance"]}
|
package/dist/cli/main.js
CHANGED
|
@@ -17,14 +17,14 @@ import {
|
|
|
17
17
|
shouldAutoFix,
|
|
18
18
|
shouldBlockPush,
|
|
19
19
|
trackIssueOccurrence
|
|
20
|
-
} from "../chunk-
|
|
20
|
+
} from "../chunk-JP4U3OMW.js";
|
|
21
21
|
import {
|
|
22
22
|
SKILL_CATEGORIES,
|
|
23
23
|
detectStack,
|
|
24
24
|
getSkillCategories,
|
|
25
25
|
getSkillsByCategory,
|
|
26
26
|
isTrieInitialized
|
|
27
|
-
} from "../chunk-
|
|
27
|
+
} from "../chunk-3RQPPRM3.js";
|
|
28
28
|
import {
|
|
29
29
|
getGuardianState
|
|
30
30
|
} from "../chunk-4YSLDGBL.js";
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
projectInfoExists,
|
|
38
38
|
recordSkillInstalled,
|
|
39
39
|
removeSkill
|
|
40
|
-
} from "../chunk-
|
|
40
|
+
} from "../chunk-H5MDUTL3.js";
|
|
41
41
|
import {
|
|
42
42
|
findCrossProjectPatterns,
|
|
43
43
|
getGlobalMemoryStats,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "../chunk-7KHT2NKR.js";
|
|
48
48
|
import "../chunk-MVUCBUBR.js";
|
|
49
49
|
import "../chunk-6NLHFIYA.js";
|
|
50
|
-
import "../chunk-
|
|
50
|
+
import "../chunk-NM35UECE.js";
|
|
51
51
|
import "../chunk-AQCAMIQQ.js";
|
|
52
52
|
import {
|
|
53
53
|
getDailyLogs,
|
package/dist/cli/yolo-daemon.js
CHANGED
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
InteractiveDashboard,
|
|
4
4
|
StreamingManager,
|
|
5
5
|
TrieScanTool
|
|
6
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-DQ4FYOHV.js";
|
|
7
7
|
import "../chunk-ULOW5HSH.js";
|
|
8
8
|
import "../chunk-PBOVCPKE.js";
|
|
9
9
|
import "../chunk-D3DMONAJ.js";
|
|
10
10
|
import {
|
|
11
11
|
isTrieInitialized
|
|
12
|
-
} from "../chunk-
|
|
12
|
+
} from "../chunk-3RQPPRM3.js";
|
|
13
13
|
import "../chunk-4YSLDGBL.js";
|
|
14
|
-
import "../chunk-
|
|
14
|
+
import "../chunk-H5MDUTL3.js";
|
|
15
15
|
import "../chunk-7KHT2NKR.js";
|
|
16
16
|
import "../chunk-MVUCBUBR.js";
|
|
17
17
|
import "../chunk-6NLHFIYA.js";
|
|
18
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-NM35UECE.js";
|
|
19
19
|
import "../chunk-AQCAMIQQ.js";
|
|
20
20
|
import "../chunk-TSHZQKCM.js";
|
|
21
21
|
import {
|