@triedotdev/mcp 1.0.114 → 1.0.115
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/{autonomy-config-O4H3Z7YV.js → autonomy-config-JXB7WCZ2.js} +2 -2
- package/dist/{chunk-DRDEEF6G.js → chunk-I2GFI3AM.js} +13 -1
- package/dist/chunk-I2GFI3AM.js.map +1 -0
- package/dist/{chunk-4SBZXIMG.js → chunk-ZYKEILVK.js} +364 -520
- package/dist/chunk-ZYKEILVK.js.map +1 -0
- package/dist/cli/main.js +7 -7
- package/dist/cli/yolo-daemon.js +1 -1
- package/dist/{goal-validator-7UPLOVAZ.js → goal-validator-T5HEYBC5.js} +39 -37
- package/dist/goal-validator-T5HEYBC5.js.map +1 -0
- package/dist/index.js +116 -59
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-4SBZXIMG.js.map +0 -1
- package/dist/chunk-DRDEEF6G.js.map +0 -1
- package/dist/goal-validator-7UPLOVAZ.js.map +0 -1
- /package/dist/{autonomy-config-O4H3Z7YV.js.map → autonomy-config-JXB7WCZ2.js.map} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utils/autonomy-config.ts","../src/types/autonomy.ts"],"sourcesContent":["/**\n * Autonomy Configuration Loader\n * \n * Loads, saves, and manages autonomy settings from .trie/config.json\n */\n\nimport { readFile, writeFile, mkdir } from 'fs/promises';\nimport { existsSync } from 'fs';\nimport { join } from 'path';\nimport { getTrieDirectory } from './workspace.js';\nimport type { \n AutonomyConfig, \n IssueOccurrence,\n AutoFixAction,\n PushBlockResult \n} from '../types/autonomy.js';\nimport { DEFAULT_AUTONOMY_CONFIG } from '../types/autonomy.js';\nimport { createHash } from 'crypto';\n\n// ============================================================================\n// Config Loading/Saving\n// ============================================================================\n\n/**\n * Load autonomy config from .trie/config.json\n */\nexport async function loadAutonomyConfig(projectPath: string): Promise<AutonomyConfig> {\n const configPath = join(getTrieDirectory(projectPath), 'config.json');\n \n try {\n if (!existsSync(configPath)) {\n return { ...DEFAULT_AUTONOMY_CONFIG };\n }\n \n const content = await readFile(configPath, 'utf-8');\n const config = JSON.parse(content);\n \n // Merge with defaults to ensure all fields exist\n return mergeWithDefaults(config.autonomy || {});\n } catch (error) {\n console.error('Failed to load autonomy config:', error);\n return { ...DEFAULT_AUTONOMY_CONFIG };\n }\n}\n\n/**\n * Save autonomy config to .trie/config.json\n */\nexport async function saveAutonomyConfig(\n projectPath: string, \n autonomyConfig: Partial<AutonomyConfig>\n): Promise<void> {\n const configPath = join(getTrieDirectory(projectPath), 'config.json');\n const trieDir = getTrieDirectory(projectPath);\n \n try {\n // Ensure .trie directory exists\n if (!existsSync(trieDir)) {\n await mkdir(trieDir, { recursive: true });\n }\n \n // Load existing config\n let fullConfig: Record<string, unknown> = {};\n if (existsSync(configPath)) {\n const content = await readFile(configPath, 'utf-8');\n fullConfig = JSON.parse(content);\n }\n \n // Merge autonomy config\n fullConfig.autonomy = mergeWithDefaults(autonomyConfig);\n \n // Save atomically\n const tempPath = configPath + '.tmp';\n await writeFile(tempPath, JSON.stringify(fullConfig, null, 2));\n await writeFile(configPath, JSON.stringify(fullConfig, null, 2));\n \n } catch (error) {\n console.error('Failed to save autonomy config:', error);\n throw error;\n }\n}\n\n/**\n * Merge partial config with defaults\n */\nfunction mergeWithDefaults(partial: Partial<AutonomyConfig>): AutonomyConfig {\n return {\n level: partial.level ?? DEFAULT_AUTONOMY_CONFIG.level,\n autoCheck: {\n ...DEFAULT_AUTONOMY_CONFIG.autoCheck,\n ...(partial.autoCheck || {}),\n },\n autoFix: {\n ...DEFAULT_AUTONOMY_CONFIG.autoFix,\n ...(partial.autoFix || {}),\n },\n pushBlocking: {\n ...DEFAULT_AUTONOMY_CONFIG.pushBlocking,\n ...(partial.pushBlocking || {}),\n },\n progressiveEscalation: {\n ...DEFAULT_AUTONOMY_CONFIG.progressiveEscalation,\n ...(partial.progressiveEscalation || {}),\n thresholds: {\n ...DEFAULT_AUTONOMY_CONFIG.progressiveEscalation.thresholds,\n ...(partial.progressiveEscalation?.thresholds || {}),\n },\n },\n };\n}\n\n// ============================================================================\n// Issue Occurrence Tracking (for progressive escalation)\n// ============================================================================\n\nconst occurrenceCache = new Map<string, Map<string, IssueOccurrence>>();\n\n/**\n * Get occurrence tracker for a project\n */\nasync function getOccurrences(projectPath: string): Promise<Map<string, IssueOccurrence>> {\n if (occurrenceCache.has(projectPath)) {\n return occurrenceCache.get(projectPath)!;\n }\n \n const occurrencesPath = join(getTrieDirectory(projectPath), 'memory', 'occurrences.json');\n const occurrences = new Map<string, IssueOccurrence>();\n \n try {\n if (existsSync(occurrencesPath)) {\n const content = await readFile(occurrencesPath, 'utf-8');\n const data = JSON.parse(content);\n for (const [hash, occ] of Object.entries(data)) {\n occurrences.set(hash, occ as IssueOccurrence);\n }\n }\n } catch {\n // Start fresh\n }\n \n occurrenceCache.set(projectPath, occurrences);\n return occurrences;\n}\n\n/**\n * Save occurrences to disk\n */\nasync function saveOccurrences(projectPath: string): Promise<void> {\n const occurrences = occurrenceCache.get(projectPath);\n if (!occurrences) return;\n \n const occurrencesPath = join(getTrieDirectory(projectPath), 'memory', 'occurrences.json');\n const memoryDir = join(getTrieDirectory(projectPath), 'memory');\n \n try {\n if (!existsSync(memoryDir)) {\n await mkdir(memoryDir, { recursive: true });\n }\n \n const data: Record<string, IssueOccurrence> = {};\n for (const [hash, occ] of occurrences.entries()) {\n data[hash] = occ;\n }\n \n await writeFile(occurrencesPath, JSON.stringify(data, null, 2));\n } catch (error) {\n console.error('Failed to save occurrences:', error);\n }\n}\n\n/**\n * Create a hash for an issue (for deduplication)\n */\nexport function createIssueHash(file: string, line: number | undefined, issueType: string): string {\n const input = `${file}:${line || 0}:${issueType}`;\n return createHash('md5').update(input).digest('hex').slice(0, 12);\n}\n\n/**\n * Track an issue occurrence\n */\nexport async function trackIssueOccurrence(\n projectPath: string,\n file: string,\n line: number | undefined,\n issueType: string,\n config: AutonomyConfig\n): Promise<IssueOccurrence> {\n const occurrences = await getOccurrences(projectPath);\n const hash = createIssueHash(file, line, issueType);\n const now = Date.now();\n \n let occurrence = occurrences.get(hash);\n \n if (occurrence) {\n // Check if within time window\n const windowMs = config.progressiveEscalation.windowMs;\n if (now - occurrence.firstSeen > windowMs) {\n // Reset if outside window\n occurrence = {\n hash,\n firstSeen: now,\n lastSeen: now,\n count: 1,\n escalationLevel: 'suggest',\n notified: false,\n bypassed: false,\n bypassHistory: occurrence.bypassHistory, // Keep bypass history\n };\n } else {\n // Increment within window\n occurrence.lastSeen = now;\n occurrence.count++;\n \n // Update escalation level\n const thresholds = config.progressiveEscalation.thresholds;\n if (occurrence.count >= thresholds.block) {\n occurrence.escalationLevel = 'block';\n } else if (occurrence.count >= thresholds.escalate) {\n occurrence.escalationLevel = 'escalate';\n } else if (occurrence.count >= thresholds.autoCheck) {\n occurrence.escalationLevel = 'autoCheck';\n }\n }\n } else {\n // New occurrence\n occurrence = {\n hash,\n firstSeen: now,\n lastSeen: now,\n count: 1,\n escalationLevel: 'suggest',\n notified: false,\n bypassed: false,\n bypassHistory: [],\n };\n }\n \n occurrences.set(hash, occurrence);\n await saveOccurrences(projectPath);\n \n return occurrence;\n}\n\n/**\n * Get escalation level for an issue\n */\nexport async function getEscalationLevel(\n projectPath: string,\n file: string,\n line: number | undefined,\n issueType: string\n): Promise<IssueOccurrence['escalationLevel']> {\n const occurrences = await getOccurrences(projectPath);\n const hash = createIssueHash(file, line, issueType);\n \n const occurrence = occurrences.get(hash);\n return occurrence?.escalationLevel ?? 'suggest';\n}\n\n/**\n * Record a bypass\n */\nexport async function recordBypass(\n projectPath: string,\n file: string,\n line: number | undefined,\n issueType: string,\n method: string,\n reason?: string\n): Promise<void> {\n const occurrences = await getOccurrences(projectPath);\n const hash = createIssueHash(file, line, issueType);\n \n const occurrence = occurrences.get(hash);\n if (occurrence) {\n occurrence.bypassed = true;\n occurrence.bypassHistory.push({\n timestamp: Date.now(),\n method,\n ...(reason !== undefined ? { reason } : {}),\n });\n await saveOccurrences(projectPath);\n }\n}\n\n// ============================================================================\n// Auto-fix Helpers\n// ============================================================================\n\n/**\n * Check if a fix should be auto-applied based on config\n */\nexport function shouldAutoFix(\n fix: AutoFixAction,\n config: AutonomyConfig\n): boolean {\n if (!config.autoFix.enabled) {\n return false;\n }\n \n // Check if category is allowed\n const allowedCategories = config.autoFix.categories as string[];\n if (!allowedCategories.includes(fix.category) && \n !allowedCategories.includes('all')) {\n return false;\n }\n \n // Check if specific fix type is allowed\n if (config.autoFix.allowedFixTypes.length > 0 &&\n !config.autoFix.allowedFixTypes.includes(fix.type)) {\n return false;\n }\n \n // Check confidence threshold (require high confidence for auto-fix)\n if (fix.confidence < 0.9) {\n return false;\n }\n \n return true;\n}\n\n/**\n * Group fixes by file for batch application\n */\nexport function groupFixesByFile(fixes: AutoFixAction[]): Map<string, AutoFixAction[]> {\n const grouped = new Map<string, AutoFixAction[]>();\n \n for (const fix of fixes) {\n const existing = grouped.get(fix.file) || [];\n existing.push(fix);\n grouped.set(fix.file, existing);\n }\n \n return grouped;\n}\n\n// ============================================================================\n// Push Blocking Helpers\n// ============================================================================\n\n/**\n * Check if push should be blocked\n */\nexport function shouldBlockPush(\n issues: Array<{ severity: string; file: string; line?: number; issue: string }>,\n config: AutonomyConfig\n): PushBlockResult {\n if (!config.pushBlocking.enabled) {\n return {\n blocked: false,\n blockingIssues: [],\n bypassed: false,\n };\n }\n \n // Find blocking issues\n const blockingIssues = issues.filter(issue => \n config.pushBlocking.blockOn.includes(issue.severity as 'critical' | 'serious' | 'moderate')\n );\n \n if (blockingIssues.length === 0) {\n return {\n blocked: false,\n blockingIssues: [],\n bypassed: false,\n };\n }\n \n // Check for bypass\n const envBypass = process.env.TRIE_BYPASS === '1' || process.env.TRIE_BYPASS === 'true';\n \n if (envBypass && config.pushBlocking.allowBypass) {\n return {\n blocked: false,\n blockingIssues,\n bypassed: true,\n bypassMethod: 'env',\n };\n }\n \n // Build bypass instructions\n const bypassInstructions = buildBypassInstructions(config);\n \n return {\n blocked: true,\n reason: `${blockingIssues.length} ${blockingIssues[0]?.severity || 'critical'} issue(s) must be fixed before pushing`,\n blockingIssues,\n bypassInstructions,\n bypassed: false,\n };\n}\n\n/**\n * Build bypass instructions based on config\n */\nfunction buildBypassInstructions(config: AutonomyConfig): string {\n const instructions: string[] = [];\n \n if (config.pushBlocking.bypassMethods.includes('env')) {\n instructions.push('• Set TRIE_BYPASS=1 to bypass: TRIE_BYPASS=1 git push');\n }\n \n if (config.pushBlocking.bypassMethods.includes('flag')) {\n instructions.push('• Use --no-verify flag: git push --no-verify');\n }\n \n if (config.pushBlocking.bypassMethods.includes('confirm')) {\n instructions.push('• Run: trie bypass --confirm to bypass this push');\n }\n \n return instructions.join('\\n');\n}\n\n// ============================================================================\n// Singleton Config Cache\n// ============================================================================\n\nconst configCache = new Map<string, { config: AutonomyConfig; loadedAt: number }>();\nconst CACHE_TTL = 60000; // 1 minute\n\n/**\n * Get autonomy config with caching\n */\nexport async function getAutonomyConfig(projectPath: string): Promise<AutonomyConfig> {\n const cached = configCache.get(projectPath);\n \n if (cached && Date.now() - cached.loadedAt < CACHE_TTL) {\n return cached.config;\n }\n \n const config = await loadAutonomyConfig(projectPath);\n configCache.set(projectPath, { config, loadedAt: Date.now() });\n \n return config;\n}\n\n/**\n * Clear config cache (for testing or after config changes)\n */\nexport function clearConfigCache(): void {\n configCache.clear();\n occurrenceCache.clear();\n}\n","/**\n * Autonomy Configuration Types\n * \n * Controls how autonomous Trie behaves:\n * - Auto-check: Run full checks when issues detected\n * - Auto-fix: Apply fixes with human confirmation\n * - Push blocking: Block git push on critical issues\n * - Progressive escalation: Escalate based on occurrence count\n */\n\n/**\n * Overall autonomy level\n */\nexport type AutonomyLevel = \n | 'passive' // Only report, never act\n | 'suggest' // Suggest actions, don't execute\n | 'proactive' // Auto-check, ask before fixing\n | 'aggressive'; // Auto-check, auto-fix trivial, block on critical\n\n/**\n * Auto-check configuration\n */\nexport interface AutoCheckConfig {\n /** Enable auto-running full checks */\n enabled: boolean;\n /** Issue count threshold to trigger auto-check */\n threshold: number;\n /** Always trigger on critical issues */\n onCritical: boolean;\n /** Cooldown between auto-checks (ms) */\n cooldownMs: number;\n}\n\n/**\n * Auto-fix configuration\n */\nexport interface AutoFixConfig {\n /** Enable auto-fix suggestions */\n enabled: boolean;\n /** Always ask user before applying fixes (human-in-the-loop) */\n askFirst: boolean;\n /** Categories of fixes to auto-apply */\n categories: ('trivial' | 'safe' | 'moderate' | 'all')[];\n /** Specific fix types to auto-apply */\n allowedFixTypes: string[];\n}\n\n/**\n * Push blocking configuration\n */\nexport interface PushBlockingConfig {\n /** Enable push blocking */\n enabled: boolean;\n /** Allow user to bypass with flag */\n allowBypass: boolean;\n /** Severities that trigger blocking */\n blockOn: ('critical' | 'serious' | 'moderate')[];\n /** Bypass methods */\n bypassMethods: ('env' | 'flag' | 'confirm')[];\n /** Log bypasses for audit */\n logBypasses: boolean;\n}\n\n/**\n * Progressive escalation thresholds\n */\nexport interface ProgressiveEscalationConfig {\n /** Enable progressive escalation */\n enabled: boolean;\n /** Thresholds for different actions */\n thresholds: {\n /** First occurrence: suggest fix */\n suggest: number;\n /** N occurrences: auto-run full check */\n autoCheck: number;\n /** N occurrences: escalate to Slack/email */\n escalate: number;\n /** N occurrences: block until fixed */\n block: number;\n };\n /** Time window for counting occurrences (ms) */\n windowMs: number;\n}\n\n/**\n * Full autonomy configuration\n */\nexport interface AutonomyConfig {\n /** Overall autonomy level (can be overridden by specific settings) */\n level: AutonomyLevel;\n /** Auto-check settings */\n autoCheck: AutoCheckConfig;\n /** Auto-fix settings */\n autoFix: AutoFixConfig;\n /** Push blocking settings */\n pushBlocking: PushBlockingConfig;\n /** Progressive escalation settings */\n progressiveEscalation: ProgressiveEscalationConfig;\n}\n\n/**\n * Default autonomy configuration - proactive but safe\n */\nexport const DEFAULT_AUTONOMY_CONFIG: AutonomyConfig = {\n level: 'proactive',\n autoCheck: {\n enabled: true,\n threshold: 5,\n onCritical: true,\n cooldownMs: 30000, // 30 seconds\n },\n autoFix: {\n enabled: true,\n askFirst: true, // Always ask (human-in-the-loop)\n categories: ['trivial', 'safe'],\n allowedFixTypes: [\n 'remove-console-log',\n 'remove-debugger',\n 'remove-emoji',\n 'remove-unused-import',\n 'add-missing-await',\n 'fix-typo',\n ],\n },\n pushBlocking: {\n enabled: true,\n allowBypass: true,\n blockOn: ['critical'],\n bypassMethods: ['env', 'flag', 'confirm'],\n logBypasses: true,\n },\n progressiveEscalation: {\n enabled: true,\n thresholds: {\n suggest: 1,\n autoCheck: 3,\n escalate: 5,\n block: 10,\n },\n windowMs: 24 * 60 * 60 * 1000, // 24 hours\n },\n};\n\n/**\n * Issue occurrence tracking for progressive escalation\n */\nexport interface IssueOccurrence {\n /** Issue hash (file + line + type) */\n hash: string;\n /** First seen timestamp */\n firstSeen: number;\n /** Last seen timestamp */\n lastSeen: number;\n /** Total occurrence count */\n count: number;\n /** Current escalation level */\n escalationLevel: 'suggest' | 'autoCheck' | 'escalate' | 'block';\n /** Whether user has been notified at current level */\n notified: boolean;\n /** Whether issue has been bypassed */\n bypassed: boolean;\n /** Bypass history */\n bypassHistory: Array<{\n timestamp: number;\n method: string;\n reason?: string;\n }>;\n}\n\n/**\n * Auto-fix action\n */\nexport interface AutoFixAction {\n /** Unique ID for this fix */\n id: string;\n /** File to fix */\n file: string;\n /** Line number */\n line?: number;\n /** Original code */\n original: string;\n /** Fixed code */\n fixed: string;\n /** Type of fix */\n type: 'remove-console-log' | 'remove-debugger' | 'remove-emoji' | 'remove-unused-import' | \n 'add-missing-await' | 'fix-typo' | 'goal-violation' | 'custom' | string;\n /** Category of fix */\n category: 'trivial' | 'safe' | 'moderate' | 'risky' | 'goal-violation';\n /** Description of what the fix does */\n description: string;\n /** Confidence in the fix (0-1) */\n confidence: number;\n}\n\n/**\n * Push block result\n */\nexport interface PushBlockResult {\n /** Whether push is blocked */\n blocked: boolean;\n /** Reason for blocking */\n reason?: string;\n /** Issues causing the block */\n blockingIssues: Array<{\n file: string;\n line?: number;\n severity: string;\n issue: string;\n }>;\n /** Bypass instructions */\n bypassInstructions?: string;\n /** Whether user chose to bypass */\n bypassed: boolean;\n /** Bypass method used */\n bypassMethod?: string;\n}\n"],"mappings":";;;;;AAMA,SAAS,UAAU,WAAW,aAAa;AAC3C,SAAS,kBAAkB;AAC3B,SAAS,YAAY;;;AC+Fd,IAAM,0BAA0C;AAAA,EACrD,OAAO;AAAA,EACP,WAAW;AAAA,IACT,SAAS;AAAA,IACT,WAAW;AAAA,IACX,YAAY;AAAA,IACZ,YAAY;AAAA;AAAA,EACd;AAAA,EACA,SAAS;AAAA,IACP,SAAS;AAAA,IACT,UAAU;AAAA;AAAA,IACV,YAAY,CAAC,WAAW,MAAM;AAAA,IAC9B,iBAAiB;AAAA,MACf;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,SAAS,CAAC,UAAU;AAAA,IACpB,eAAe,CAAC,OAAO,QAAQ,SAAS;AAAA,IACxC,aAAa;AAAA,EACf;AAAA,EACA,uBAAuB;AAAA,IACrB,SAAS;AAAA,IACT,YAAY;AAAA,MACV,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,MACV,OAAO;AAAA,IACT;AAAA,IACA,UAAU,KAAK,KAAK,KAAK;AAAA;AAAA,EAC3B;AACF;;;AD5HA,SAAS,kBAAkB;AAS3B,eAAsB,mBAAmB,aAA8C;AACrF,QAAM,aAAa,KAAK,iBAAiB,WAAW,GAAG,aAAa;AAEpE,MAAI;AACF,QAAI,CAAC,WAAW,UAAU,GAAG;AAC3B,aAAO,EAAE,GAAG,wBAAwB;AAAA,IACtC;AAEA,UAAM,UAAU,MAAM,SAAS,YAAY,OAAO;AAClD,UAAM,SAAS,KAAK,MAAM,OAAO;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,SAAS,YAAY,IAAI,WAAW;AAE1C,MAAI,UAAU,KAAK,IAAI,IAAI,OAAO,WAAW,WAAW;AACtD,WAAO,OAAO;AAAA,EAChB;AAEA,QAAM,SAAS,MAAM,mBAAmB,WAAW;AACnD,cAAY,IAAI,aAAa,EAAE,QAAQ,UAAU,KAAK,IAAI,EAAE,CAAC;AAE7D,SAAO;AACT;AAKO,SAAS,mBAAyB;AACvC,cAAY,MAAM;AAClB,kBAAgB,MAAM;AACxB;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/guardian/goal-validator.ts"],"sourcesContent":["/**\n * Goal Validator - Validates code changes against active user goals\n * \n * This module checks file changes in watch mode against active goals\n * and detects violations (e.g., \"no emojis\" goal violated by emoji usage)\n * \n * Integration points:\n * - Called by watch mode when files change\n * - Triggers auto-fix if enabled\n * - Records violations in ledger\n * - Updates goal progress tracking\n */\n\nimport type { Goal } from './guardian-state.js';\nimport { getGuardianState } from './guardian-state.js';\nimport type { AutoFixAction } from '../types/autonomy.js';\n\n// ============================================================================\n// Types\n// ============================================================================\n\nexport interface GoalViolation {\n goal: Goal;\n file: string;\n line?: number;\n column?: number;\n violation: string;\n description: string;\n severity: 'critical' | 'high' | 'medium' | 'low';\n autoFixable: boolean;\n fixAction?: AutoFixAction;\n}\n\nexport interface ValidationResult {\n violations: GoalViolation[];\n passedGoals: Goal[];\n}\n\n// ============================================================================\n// Goal Validation Rules\n// ============================================================================\n\n/**\n * Rule definitions for common goals\n */\nconst GOAL_RULES = {\n 'no-emojis': {\n pattern: /[\\u{1F300}-\\u{1F9FF}\\u{2600}-\\u{26FF}\\u{2700}-\\u{27BF}]/u,\n description: 'Contains emoji',\n severity: 'medium' as const,\n autoFixable: true,\n },\n 'no-console': {\n pattern: /console\\.(log|debug|info|warn|error)/,\n description: 'Contains console statement',\n severity: 'low' as const,\n autoFixable: true,\n },\n 'no-debugger': {\n pattern: /\\bdebugger\\b/,\n description: 'Contains debugger statement',\n severity: 'medium' as const,\n autoFixable: true,\n },\n 'no-todo': {\n pattern: /\\b(TODO|FIXME|XXX|HACK)\\b/i,\n description: 'Contains TODO comment',\n severity: 'low' as const,\n autoFixable: false,\n },\n 'no-any': {\n pattern: /:\\s*any\\b/,\n description: 'Uses TypeScript any type',\n severity: 'medium' as const,\n autoFixable: false,\n },\n};\n\n/**\n * Match goal descriptions to validation rules\n */\nfunction matchGoalToRule(goal: Goal): keyof typeof GOAL_RULES | null {\n const desc = goal.description.toLowerCase();\n \n if (/no emoji|remove emoji|emoji.*free/i.test(desc)) {\n return 'no-emojis';\n }\n if (/no console|remove console|console.*free/i.test(desc)) {\n return 'no-console';\n }\n if (/no debugger|remove debugger/i.test(desc)) {\n return 'no-debugger';\n }\n if (/no (todo|fixme)|clean.*todo/i.test(desc)) {\n return 'no-todo';\n }\n if (/no any|avoid any|typescript.*any/i.test(desc)) {\n return 'no-any';\n }\n \n return null;\n}\n\n// ============================================================================\n// Validation Logic\n// ============================================================================\n\n/**\n * Validate file content against active goals\n */\nexport async function validateAgainstGoals(\n file: string,\n content: string,\n projectPath: string\n): Promise<ValidationResult> {\n const guardianState = getGuardianState(projectPath);\n await guardianState.load();\n \n const activeGoals = guardianState.getAllGoals().filter(g => g.status === 'active');\n const violations: GoalViolation[] = [];\n const passedGoals: Goal[] = [];\n \n for (const goal of activeGoals) {\n const ruleKey = matchGoalToRule(goal);\n if (!ruleKey) {\n continue; // No validation rule for this goal\n }\n \n const rule = GOAL_RULES[ruleKey];\n const foundViolations = findViolations(file, content, goal, rule);\n \n if (foundViolations.length > 0) {\n violations.push(...foundViolations);\n } else {\n passedGoals.push(goal);\n }\n }\n \n return { violations, passedGoals };\n}\n\n/**\n * Find all violations of a rule in file content\n */\nfunction findViolations(\n file: string,\n content: string,\n goal: Goal,\n rule: typeof GOAL_RULES[keyof typeof GOAL_RULES]\n): GoalViolation[] {\n const violations: GoalViolation[] = [];\n const lines = content.split('\\n');\n \n for (let i = 0; i < lines.length; i++) {\n const line = lines[i];\n if (!line) continue;\n \n const match = line.match(rule.pattern);\n if (match) {\n const violation: GoalViolation = {\n goal,\n file,\n line: i + 1,\n column: match.index,\n violation: match[0],\n description: `${rule.description}: \"${match[0]}\" (Goal: ${goal.description})`,\n severity: rule.severity,\n autoFixable: rule.autoFixable,\n };\n \n // Generate fix action if auto-fixable\n if (rule.autoFixable) {\n violation.fixAction = generateFixAction(violation, line, i + 1);\n }\n \n violations.push(violation);\n }\n }\n \n return violations;\n}\n\n/**\n * Generate an auto-fix action for a violation\n */\nfunction generateFixAction(\n violation: GoalViolation,\n originalLine: string,\n lineNumber: number\n): AutoFixAction {\n const { violation: match, goal } = violation;\n \n // Determine fix type based on violation\n let type: AutoFixAction['type'];\n let fixedLine: string;\n \n if (/emoji/i.test(goal.description)) {\n type = 'remove-emoji';\n // Remove emoji from the line\n fixedLine = originalLine.replace(/[\\u{1F300}-\\u{1F9FF}\\u{2600}-\\u{26FF}\\u{2700}-\\u{27BF}]/gu, '');\n } else if (/console/i.test(goal.description)) {\n type = 'remove-console-log';\n fixedLine = ''; // Remove entire line\n } else if (/debugger/i.test(goal.description)) {\n type = 'remove-debugger';\n fixedLine = ''; // Remove entire line\n } else {\n type = 'custom';\n fixedLine = originalLine; // Generic\n }\n \n return {\n id: `fix-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`,\n file: violation.file,\n line: lineNumber,\n original: originalLine,\n fixed: fixedLine,\n type,\n category: 'goal-violation',\n description: `Fix goal violation: ${violation.description}`,\n confidence: 0.9,\n };\n}\n\n// ============================================================================\n// Goal Progress Tracking\n// ============================================================================\n\n/**\n * Record that a goal violation was caught\n */\nexport async function recordGoalViolationCaught(\n goal: Goal,\n file: string,\n projectPath: string\n): Promise<void> {\n const guardianState = getGuardianState(projectPath);\n await guardianState.load();\n \n // Increment caught count (stored in metadata)\n const metadata = goal.metadata || {};\n const caughtCount = (metadata.caughtCount || 0) + 1;\n \n await guardianState.updateGoal(goal.id, {\n metadata: {\n ...metadata,\n caughtCount,\n lastCaught: new Date().toISOString(),\n lastCaughtFile: file,\n },\n });\n}\n\n/**\n * Record that a goal violation was automatically fixed\n */\nexport async function recordGoalViolationFixed(\n goal: Goal,\n file: string,\n projectPath: string\n): Promise<void> {\n const guardianState = getGuardianState(projectPath);\n await guardianState.load();\n \n // Increment both caught and fixed counts\n const metadata = goal.metadata || {};\n const caughtCount = (metadata.caughtCount || 0) + 1;\n const fixedCount = (metadata.fixedCount || 0) + 1;\n \n await guardianState.updateGoal(goal.id, {\n metadata: {\n ...metadata,\n caughtCount,\n fixedCount,\n lastFixed: new Date().toISOString(),\n lastFixedFile: file,\n },\n });\n \n // Update goal progress (currentValue decreases for reduction goals)\n if (goal.type === 'reduction') {\n const newValue = Math.max(0, goal.currentValue - 1);\n await guardianState.updateGoal(goal.id, {\n currentValue: newValue,\n });\n \n // Check if goal is achieved\n if (newValue <= goal.target) {\n await guardianState.updateGoal(goal.id, {\n status: 'achieved',\n achievedAt: new Date().toISOString(),\n });\n }\n }\n}\n"],"mappings":";;;;;;;;;AA6CA,IAAM,aAAa;AAAA,EACjB,aAAa;AAAA,IACX,SAAS;AAAA,IACT,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,IACZ,SAAS;AAAA,IACT,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA,eAAe;AAAA,IACb,SAAS;AAAA,IACT,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA,WAAW;AAAA,IACT,SAAS;AAAA,IACT,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AAAA,EACA,UAAU;AAAA,IACR,SAAS;AAAA,IACT,aAAa;AAAA,IACb,UAAU;AAAA,IACV,aAAa;AAAA,EACf;AACF;AAKA,SAAS,gBAAgB,MAA4C;AACnE,QAAM,OAAO,KAAK,YAAY,YAAY;AAE1C,MAAI,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