@triedotdev/mcp 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,326 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ TrieFixTool,
4
+ TrieScanTool
5
+ } from "../chunk-E7CKHS3R.js";
6
+ import "../chunk-3CS6Z2SL.js";
7
+ import "../chunk-MR755QGT.js";
8
+ import "../chunk-6NLHFIYA.js";
9
+ import "../chunk-DGUM43GV.js";
10
+
11
+ // src/cli/yolo-daemon.ts
12
+ import { watch, existsSync, statSync } from "fs";
13
+ import { readdir } from "fs/promises";
14
+ import { join, extname, basename, resolve } from "path";
15
+ var WATCH_EXTENSIONS = /* @__PURE__ */ new Set([
16
+ ".ts",
17
+ ".tsx",
18
+ ".js",
19
+ ".jsx",
20
+ ".mjs",
21
+ ".vue",
22
+ ".svelte",
23
+ ".astro",
24
+ ".py",
25
+ ".go",
26
+ ".rs"
27
+ ]);
28
+ var SKIP_DIRS = /* @__PURE__ */ new Set([
29
+ "node_modules",
30
+ ".git",
31
+ "dist",
32
+ "build",
33
+ ".next",
34
+ ".nuxt",
35
+ "coverage",
36
+ ".turbo",
37
+ ".cache",
38
+ "__pycache__",
39
+ ".venv"
40
+ ]);
41
+ var YoloDaemon = class {
42
+ config;
43
+ stats;
44
+ scanTool = new TrieScanTool();
45
+ fixTool = new TrieFixTool();
46
+ watchers = /* @__PURE__ */ new Map();
47
+ pendingFiles = /* @__PURE__ */ new Set();
48
+ debounceTimer = null;
49
+ isProcessing = false;
50
+ constructor(config2) {
51
+ this.config = config2;
52
+ this.stats = {
53
+ filesScanned: 0,
54
+ issuesFound: 0,
55
+ issuesFixed: 0,
56
+ errors: 0,
57
+ startTime: Date.now()
58
+ };
59
+ }
60
+ /**
61
+ * Start the daemon
62
+ */
63
+ async start() {
64
+ this.log("info", "Starting Trie Agent YOLO Daemon", {
65
+ directory: this.config.directory,
66
+ yoloMode: this.config.yoloMode,
67
+ debounceMs: this.config.debounceMs,
68
+ minConfidence: this.config.minConfidence
69
+ });
70
+ if (!existsSync(this.config.directory)) {
71
+ this.log("error", "Directory not found", { directory: this.config.directory });
72
+ process.exit(1);
73
+ }
74
+ this.log("info", "Running initial scan...");
75
+ await this.runScan();
76
+ if (this.config.runOnce) {
77
+ this.log("info", "Run-once mode: exiting after initial scan", { ...this.stats });
78
+ process.exit(this.stats.issuesFound > 0 ? 1 : 0);
79
+ }
80
+ await this.watchDirectory(this.config.directory);
81
+ this.log("info", "Watching for file changes...", {
82
+ directories: this.watchers.size
83
+ });
84
+ process.on("SIGINT", () => this.shutdown("SIGINT"));
85
+ process.on("SIGTERM", () => this.shutdown("SIGTERM"));
86
+ }
87
+ /**
88
+ * Run a scan on all files or specific files
89
+ */
90
+ async runScan(files) {
91
+ try {
92
+ const scanArgs = files ? { files } : { directory: this.config.directory };
93
+ const result = await this.scanTool.execute(scanArgs);
94
+ const resultText = result.content?.[0]?.text || "";
95
+ if (resultText && this.config.runOnce) {
96
+ console.log(resultText);
97
+ }
98
+ const issueMatch = resultText.match(/(\d+) total/);
99
+ const issueCount = issueMatch && issueMatch[1] ? parseInt(issueMatch[1], 10) : 0;
100
+ this.stats.filesScanned += files?.length || 1;
101
+ this.stats.issuesFound += issueCount;
102
+ if (issueCount > 0) {
103
+ this.log("warn", "Issues found", {
104
+ count: issueCount,
105
+ files: files?.map((f) => basename(f)) || ["full scan"]
106
+ });
107
+ const criticalMatch = resultText.match(/(\d+) CRITICAL/);
108
+ const seriousMatch = resultText.match(/(\d+) SERIOUS/);
109
+ if (criticalMatch && criticalMatch[1]) {
110
+ this.log("error", "Critical issues detected", { count: parseInt(criticalMatch[1], 10) });
111
+ }
112
+ if (seriousMatch && seriousMatch[1]) {
113
+ this.log("warn", "Serious issues detected", { count: parseInt(seriousMatch[1], 10) });
114
+ }
115
+ if (this.config.yoloMode) {
116
+ await this.runAutoFix(files);
117
+ }
118
+ } else {
119
+ this.log("info", "No issues found", {
120
+ files: files?.map((f) => basename(f)) || ["full scan"]
121
+ });
122
+ }
123
+ } catch (error) {
124
+ this.stats.errors++;
125
+ this.log("error", "Scan failed", {
126
+ error: error instanceof Error ? error.message : String(error)
127
+ });
128
+ }
129
+ }
130
+ /**
131
+ * Run auto-fix on issues
132
+ */
133
+ async runAutoFix(files) {
134
+ try {
135
+ this.log("info", "Running auto-fix (YOLO mode)...", {
136
+ minConfidence: this.config.minConfidence
137
+ });
138
+ const fixResult = await this.fixTool.execute({
139
+ files,
140
+ autoApprove: true,
141
+ minConfidence: this.config.minConfidence
142
+ });
143
+ const fixText = fixResult.content?.[0]?.text || "";
144
+ const fixedMatch = fixText.match(/(\d+) issues? fixed/i);
145
+ if (fixedMatch && fixedMatch[1]) {
146
+ const fixed = parseInt(fixedMatch[1], 10);
147
+ this.stats.issuesFixed += fixed;
148
+ this.log("info", "Issues auto-fixed", { count: fixed });
149
+ } else {
150
+ this.log("info", "No auto-fixable issues found");
151
+ }
152
+ } catch (error) {
153
+ this.stats.errors++;
154
+ this.log("error", "Auto-fix failed", {
155
+ error: error instanceof Error ? error.message : String(error)
156
+ });
157
+ }
158
+ }
159
+ /**
160
+ * Watch a directory recursively
161
+ */
162
+ async watchDirectory(dir) {
163
+ if (!existsSync(dir)) return;
164
+ try {
165
+ const stat = statSync(dir);
166
+ if (!stat.isDirectory()) return;
167
+ const dirName = basename(dir);
168
+ if (SKIP_DIRS.has(dirName) || dirName.startsWith(".")) return;
169
+ const watcher = watch(dir, { persistent: true }, (_eventType, filename) => {
170
+ if (!filename) return;
171
+ const fullPath = join(dir, filename);
172
+ const ext = extname(filename).toLowerCase();
173
+ if (!WATCH_EXTENSIONS.has(ext)) return;
174
+ if (!existsSync(fullPath)) return;
175
+ this.pendingFiles.add(fullPath);
176
+ this.scheduleProcessing();
177
+ });
178
+ this.watchers.set(dir, watcher);
179
+ const entries = await readdir(dir, { withFileTypes: true });
180
+ for (const entry of entries) {
181
+ if (entry.isDirectory()) {
182
+ await this.watchDirectory(join(dir, entry.name));
183
+ }
184
+ }
185
+ } catch (error) {
186
+ }
187
+ }
188
+ /**
189
+ * Schedule processing of pending files (debounced)
190
+ */
191
+ scheduleProcessing() {
192
+ if (this.debounceTimer) {
193
+ clearTimeout(this.debounceTimer);
194
+ }
195
+ this.debounceTimer = setTimeout(() => {
196
+ this.processPendingFiles();
197
+ }, this.config.debounceMs);
198
+ }
199
+ /**
200
+ * Process all pending files
201
+ */
202
+ async processPendingFiles() {
203
+ if (this.isProcessing || this.pendingFiles.size === 0) return;
204
+ this.isProcessing = true;
205
+ const files = Array.from(this.pendingFiles);
206
+ this.pendingFiles.clear();
207
+ this.log("info", "Processing changed files", {
208
+ count: files.length,
209
+ files: files.map((f) => basename(f))
210
+ });
211
+ await this.runScan(files);
212
+ this.isProcessing = false;
213
+ }
214
+ /**
215
+ * Log a message
216
+ */
217
+ log(level, message, data) {
218
+ const timestamp = (/* @__PURE__ */ new Date()).toISOString();
219
+ const uptime = Math.round((Date.now() - this.stats.startTime) / 1e3);
220
+ if (this.config.jsonOutput) {
221
+ console.log(JSON.stringify({
222
+ timestamp,
223
+ level,
224
+ message,
225
+ uptime,
226
+ ...data,
227
+ stats: this.stats
228
+ }));
229
+ } else {
230
+ const levelEmoji = { info: "\u2139\uFE0F", warn: "\u26A0\uFE0F", error: "\u274C" }[level];
231
+ const dataStr = data ? ` ${JSON.stringify(data)}` : "";
232
+ console.log(`[${timestamp}] ${levelEmoji} ${message}${dataStr}`);
233
+ }
234
+ }
235
+ /**
236
+ * Graceful shutdown
237
+ */
238
+ shutdown(signal) {
239
+ this.log("info", "Shutting down", { signal, stats: this.stats });
240
+ for (const watcher of this.watchers.values()) {
241
+ watcher.close();
242
+ }
243
+ if (this.debounceTimer) {
244
+ clearTimeout(this.debounceTimer);
245
+ }
246
+ process.exit(0);
247
+ }
248
+ };
249
+ function parseArgs() {
250
+ const args = process.argv.slice(2);
251
+ const config2 = {
252
+ directory: process.cwd(),
253
+ yoloMode: false,
254
+ debounceMs: 1e3,
255
+ minConfidence: 0.8,
256
+ jsonOutput: false,
257
+ runOnce: false
258
+ };
259
+ for (let i = 0; i < args.length; i++) {
260
+ const arg = args[i];
261
+ const nextArg = args[i + 1];
262
+ switch (arg) {
263
+ case "--dir":
264
+ case "-d":
265
+ config2.directory = resolve(nextArg || ".");
266
+ i++;
267
+ break;
268
+ case "--yolo":
269
+ case "-y":
270
+ config2.yoloMode = true;
271
+ break;
272
+ case "--debounce":
273
+ case "-D":
274
+ config2.debounceMs = parseInt(nextArg || "1000", 10);
275
+ i++;
276
+ break;
277
+ case "--confidence":
278
+ config2.minConfidence = parseFloat(nextArg || "0.8");
279
+ i++;
280
+ break;
281
+ case "--json":
282
+ config2.jsonOutput = true;
283
+ break;
284
+ case "--once":
285
+ config2.runOnce = true;
286
+ break;
287
+ case "--help":
288
+ case "-h":
289
+ console.log(`
290
+ Trie Agent YOLO Daemon
291
+ Headless file watcher for Docker/CI environments.
292
+
293
+ Usage:
294
+ node dist/cli/yolo-daemon.js [options]
295
+
296
+ Options:
297
+ --dir, -d Directory to watch (default: cwd)
298
+ --yolo, -y Enable auto-fix mode (default: false)
299
+ --debounce, -D Debounce time in ms (default: 1000)
300
+ --confidence Minimum confidence for auto-fix (default: 0.8)
301
+ --json Output as JSON (for log aggregation)
302
+ --once Run once and exit (no watch)
303
+ --help, -h Show this help
304
+
305
+ Examples:
306
+ # Watch current directory in YOLO mode
307
+ node dist/cli/yolo-daemon.js --yolo
308
+
309
+ # CI mode: scan once and exit with error code if issues found
310
+ node dist/cli/yolo-daemon.js --once
311
+
312
+ # Docker: watch /app with JSON logs
313
+ node dist/cli/yolo-daemon.js --dir /app --yolo --json
314
+ `);
315
+ process.exit(0);
316
+ }
317
+ }
318
+ return config2;
319
+ }
320
+ var config = parseArgs();
321
+ var daemon = new YoloDaemon(config);
322
+ daemon.start().catch((error) => {
323
+ console.error("Failed to start daemon:", error);
324
+ process.exit(1);
325
+ });
326
+ //# sourceMappingURL=yolo-daemon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/cli/yolo-daemon.ts"],"sourcesContent":["#!/usr/bin/env node\n/**\n * Trie Agent YOLO Daemon\n * \n * Headless file watcher for Docker/CI environments.\n * Watches a directory and auto-fixes issues as they occur.\n * \n * Usage:\n * node dist/cli/yolo-daemon.js [options]\n * \n * Options:\n * --dir, -d Directory to watch (default: cwd)\n * --yolo, -y Enable auto-fix mode (default: false)\n * --debounce, -D Debounce time in ms (default: 1000)\n * --confidence Minimum confidence for auto-fix (default: 0.8)\n * --json Output as JSON (for log aggregation)\n * --once Run once and exit (no watch)\n */\n\nimport { watch, existsSync, statSync } from 'fs';\nimport { readdir } from 'fs/promises';\nimport { join, extname, basename, resolve } from 'path';\nimport { TrieScanTool } from '../tools/scan.js';\nimport { TrieFixTool } from '../tools/fix.js';\n\n// File extensions to watch\nconst WATCH_EXTENSIONS = new Set([\n '.ts', '.tsx', '.js', '.jsx', '.mjs',\n '.vue', '.svelte', '.astro',\n '.py', '.go', '.rs'\n]);\n\n// Directories to skip\nconst SKIP_DIRS = new Set([\n 'node_modules', '.git', 'dist', 'build', '.next', '.nuxt',\n 'coverage', '.turbo', '.cache', '__pycache__', '.venv'\n]);\n\ninterface DaemonConfig {\n directory: string;\n yoloMode: boolean;\n debounceMs: number;\n minConfidence: number;\n jsonOutput: boolean;\n runOnce: boolean;\n}\n\ninterface DaemonStats {\n filesScanned: number;\n issuesFound: number;\n issuesFixed: number;\n errors: number;\n startTime: number;\n}\n\nclass YoloDaemon {\n private config: DaemonConfig;\n private stats: DaemonStats;\n private scanTool = new TrieScanTool();\n private fixTool = new TrieFixTool();\n private watchers: Map<string, ReturnType<typeof watch>> = new Map();\n private pendingFiles: Set<string> = new Set();\n private debounceTimer: NodeJS.Timeout | null = null;\n private isProcessing = false;\n\n constructor(config: DaemonConfig) {\n this.config = config;\n this.stats = {\n filesScanned: 0,\n issuesFound: 0,\n issuesFixed: 0,\n errors: 0,\n startTime: Date.now()\n };\n }\n\n /**\n * Start the daemon\n */\n async start(): Promise<void> {\n this.log('info', 'Starting Trie Agent YOLO Daemon', {\n directory: this.config.directory,\n yoloMode: this.config.yoloMode,\n debounceMs: this.config.debounceMs,\n minConfidence: this.config.minConfidence\n });\n\n // Validate directory\n if (!existsSync(this.config.directory)) {\n this.log('error', 'Directory not found', { directory: this.config.directory });\n process.exit(1);\n }\n\n // Run initial scan\n this.log('info', 'Running initial scan...');\n await this.runScan();\n\n // If run-once mode, exit after initial scan\n if (this.config.runOnce) {\n this.log('info', 'Run-once mode: exiting after initial scan', { ...this.stats });\n process.exit(this.stats.issuesFound > 0 ? 1 : 0);\n }\n\n // Start watching\n await this.watchDirectory(this.config.directory);\n this.log('info', 'Watching for file changes...', { \n directories: this.watchers.size \n });\n\n // Handle graceful shutdown\n process.on('SIGINT', () => this.shutdown('SIGINT'));\n process.on('SIGTERM', () => this.shutdown('SIGTERM'));\n }\n\n /**\n * Run a scan on all files or specific files\n */\n private async runScan(files?: string[]): Promise<void> {\n try {\n const scanArgs = files\n ? { files }\n : { directory: this.config.directory };\n\n const result = await this.scanTool.execute(scanArgs);\n const resultText = result.content?.[0]?.text || '';\n\n // PRINT THE FULL REPORT TO STDOUT (for terminal/chat display)\n if (resultText && this.config.runOnce) {\n console.log(resultText);\n }\n\n // Parse results\n const issueMatch = resultText.match(/(\\d+) total/);\n const issueCount = issueMatch && issueMatch[1] ? parseInt(issueMatch[1], 10) : 0;\n\n this.stats.filesScanned += files?.length || 1;\n this.stats.issuesFound += issueCount;\n\n if (issueCount > 0) {\n this.log('warn', 'Issues found', {\n count: issueCount,\n files: files?.map(f => basename(f)) || ['full scan']\n });\n\n // Parse severity breakdown\n const criticalMatch = resultText.match(/(\\d+) CRITICAL/);\n const seriousMatch = resultText.match(/(\\d+) SERIOUS/);\n\n if (criticalMatch && criticalMatch[1]) {\n this.log('error', 'Critical issues detected', { count: parseInt(criticalMatch[1], 10) });\n }\n if (seriousMatch && seriousMatch[1]) {\n this.log('warn', 'Serious issues detected', { count: parseInt(seriousMatch[1], 10) });\n }\n\n // Auto-fix if YOLO mode\n if (this.config.yoloMode) {\n await this.runAutoFix(files);\n }\n } else {\n this.log('info', 'No issues found', {\n files: files?.map(f => basename(f)) || ['full scan']\n });\n }\n } catch (error) {\n this.stats.errors++;\n this.log('error', 'Scan failed', { \n error: error instanceof Error ? error.message : String(error) \n });\n }\n }\n\n /**\n * Run auto-fix on issues\n */\n private async runAutoFix(files?: string[]): Promise<void> {\n try {\n this.log('info', 'Running auto-fix (YOLO mode)...', { \n minConfidence: this.config.minConfidence \n });\n\n const fixResult = await this.fixTool.execute({\n files,\n autoApprove: true,\n minConfidence: this.config.minConfidence\n });\n\n const fixText = fixResult.content?.[0]?.text || '';\n const fixedMatch = fixText.match(/(\\d+) issues? fixed/i);\n\n if (fixedMatch && fixedMatch[1]) {\n const fixed = parseInt(fixedMatch[1], 10);\n this.stats.issuesFixed += fixed;\n this.log('info', 'Issues auto-fixed', { count: fixed });\n } else {\n this.log('info', 'No auto-fixable issues found');\n }\n } catch (error) {\n this.stats.errors++;\n this.log('error', 'Auto-fix failed', { \n error: error instanceof Error ? error.message : String(error) \n });\n }\n }\n\n /**\n * Watch a directory recursively\n */\n private async watchDirectory(dir: string): Promise<void> {\n if (!existsSync(dir)) return;\n\n try {\n const stat = statSync(dir);\n if (!stat.isDirectory()) return;\n\n const dirName = basename(dir);\n if (SKIP_DIRS.has(dirName) || dirName.startsWith('.')) return;\n\n // Watch this directory\n const watcher = watch(dir, { persistent: true }, (_eventType, filename) => {\n if (!filename) return;\n\n const fullPath = join(dir, filename);\n const ext = extname(filename).toLowerCase();\n\n if (!WATCH_EXTENSIONS.has(ext)) return;\n if (!existsSync(fullPath)) return;\n\n this.pendingFiles.add(fullPath);\n this.scheduleProcessing();\n });\n\n this.watchers.set(dir, watcher);\n\n // Recursively watch subdirectories\n const entries = await readdir(dir, { withFileTypes: true });\n for (const entry of entries) {\n if (entry.isDirectory()) {\n await this.watchDirectory(join(dir, entry.name));\n }\n }\n } catch (error) {\n // Skip inaccessible directories\n }\n }\n\n /**\n * Schedule processing of pending files (debounced)\n */\n private scheduleProcessing(): void {\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n\n this.debounceTimer = setTimeout(() => {\n this.processPendingFiles();\n }, this.config.debounceMs);\n }\n\n /**\n * Process all pending files\n */\n private async processPendingFiles(): Promise<void> {\n if (this.isProcessing || this.pendingFiles.size === 0) return;\n\n this.isProcessing = true;\n const files = Array.from(this.pendingFiles);\n this.pendingFiles.clear();\n\n this.log('info', 'Processing changed files', { \n count: files.length,\n files: files.map(f => basename(f))\n });\n\n await this.runScan(files);\n this.isProcessing = false;\n }\n\n /**\n * Log a message\n */\n private log(level: 'info' | 'warn' | 'error', message: string, data?: Record<string, unknown>): void {\n const timestamp = new Date().toISOString();\n const uptime = Math.round((Date.now() - this.stats.startTime) / 1000);\n\n if (this.config.jsonOutput) {\n console.log(JSON.stringify({\n timestamp,\n level,\n message,\n uptime,\n ...data,\n stats: this.stats\n }));\n } else {\n const levelEmoji = { info: 'ℹ️', warn: '⚠️', error: '❌' }[level];\n const dataStr = data ? ` ${JSON.stringify(data)}` : '';\n console.log(`[${timestamp}] ${levelEmoji} ${message}${dataStr}`);\n }\n }\n\n /**\n * Graceful shutdown\n */\n private shutdown(signal: string): void {\n this.log('info', 'Shutting down', { signal, stats: this.stats });\n\n // Close all watchers\n for (const watcher of this.watchers.values()) {\n watcher.close();\n }\n\n // Clear timers\n if (this.debounceTimer) {\n clearTimeout(this.debounceTimer);\n }\n\n process.exit(0);\n }\n}\n\n/**\n * Parse command line arguments\n */\nfunction parseArgs(): DaemonConfig {\n const args = process.argv.slice(2);\n const config: DaemonConfig = {\n directory: process.cwd(),\n yoloMode: false,\n debounceMs: 1000,\n minConfidence: 0.8,\n jsonOutput: false,\n runOnce: false\n };\n\n for (let i = 0; i < args.length; i++) {\n const arg = args[i];\n const nextArg = args[i + 1];\n\n switch (arg) {\n case '--dir':\n case '-d':\n config.directory = resolve(nextArg || '.');\n i++;\n break;\n case '--yolo':\n case '-y':\n config.yoloMode = true;\n break;\n case '--debounce':\n case '-D':\n config.debounceMs = parseInt(nextArg || '1000', 10);\n i++;\n break;\n case '--confidence':\n config.minConfidence = parseFloat(nextArg || '0.8');\n i++;\n break;\n case '--json':\n config.jsonOutput = true;\n break;\n case '--once':\n config.runOnce = true;\n break;\n case '--help':\n case '-h':\n console.log(`\nTrie Agent YOLO Daemon\nHeadless file watcher for Docker/CI environments.\n\nUsage:\n node dist/cli/yolo-daemon.js [options]\n\nOptions:\n --dir, -d Directory to watch (default: cwd)\n --yolo, -y Enable auto-fix mode (default: false)\n --debounce, -D Debounce time in ms (default: 1000)\n --confidence Minimum confidence for auto-fix (default: 0.8)\n --json Output as JSON (for log aggregation)\n --once Run once and exit (no watch)\n --help, -h Show this help\n\nExamples:\n # Watch current directory in YOLO mode\n node dist/cli/yolo-daemon.js --yolo\n\n # CI mode: scan once and exit with error code if issues found\n node dist/cli/yolo-daemon.js --once\n\n # Docker: watch /app with JSON logs\n node dist/cli/yolo-daemon.js --dir /app --yolo --json\n`);\n process.exit(0);\n }\n }\n\n return config;\n}\n\n// Run the daemon\nconst config = parseArgs();\nconst daemon = new YoloDaemon(config);\ndaemon.start().catch(error => {\n console.error('Failed to start daemon:', error);\n process.exit(1);\n});\n\n"],"mappings":";;;;;;;;;;;AAmBA,SAAS,OAAO,YAAY,gBAAgB;AAC5C,SAAS,eAAe;AACxB,SAAS,MAAM,SAAS,UAAU,eAAe;AAKjD,IAAM,mBAAmB,oBAAI,IAAI;AAAA,EAC/B;AAAA,EAAO;AAAA,EAAQ;AAAA,EAAO;AAAA,EAAQ;AAAA,EAC9B;AAAA,EAAQ;AAAA,EAAW;AAAA,EACnB;AAAA,EAAO;AAAA,EAAO;AAChB,CAAC;AAGD,IAAM,YAAY,oBAAI,IAAI;AAAA,EACxB;AAAA,EAAgB;AAAA,EAAQ;AAAA,EAAQ;AA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