cache-overflow-mcp 0.3.7 ā 0.3.8
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/README.md +28 -76
- package/dist/client.d.ts +5 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +157 -9
- package/dist/client.js.map +1 -1
- package/dist/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/tools/find-solution.d.ts.map +1 -1
- package/dist/tools/find-solution.js +74 -3
- package/dist/tools/find-solution.js.map +1 -1
- package/dist/tools/publish-solution.d.ts.map +1 -1
- package/dist/tools/publish-solution.js +68 -3
- package/dist/tools/publish-solution.js.map +1 -1
- package/dist/tools/submit-feedback.d.ts.map +1 -1
- package/dist/tools/submit-feedback.js +62 -2
- package/dist/tools/submit-feedback.js.map +1 -1
- package/dist/tools/submit-verification.d.ts.map +1 -1
- package/dist/tools/submit-verification.js +62 -2
- package/dist/tools/submit-verification.js.map +1 -1
- package/dist/tools/unlock-solution.d.ts.map +1 -1
- package/dist/tools/unlock-solution.js +57 -2
- package/dist/tools/unlock-solution.js.map +1 -1
- package/dist/ui/verification-dialog.d.ts +1 -1
- package/dist/ui/verification-dialog.d.ts.map +1 -1
- package/dist/ui/verification-dialog.js +78 -4
- package/dist/ui/verification-dialog.js.map +1 -1
- package/package.json +1 -1
- package/src/client.ts +177 -9
- package/src/config.ts +1 -1
- package/src/tools/find-solution.ts +75 -3
- package/src/tools/publish-solution.ts +71 -3
- package/src/tools/submit-feedback.ts +62 -2
- package/src/tools/submit-verification.ts +62 -2
- package/src/tools/unlock-solution.ts +56 -2
- package/src/ui/verification-dialog.ts +84 -4
- package/E2E-TESTING.md +0 -195
- package/TROUBLESHOOTING.md +0 -219
- package/scripts/mock-server.js +0 -37
- package/scripts/view-logs.js +0 -125
package/scripts/view-logs.js
DELETED
|
@@ -1,125 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Simple script to help users locate and view their cache.overflow MCP logs
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import fs from 'fs';
|
|
8
|
-
import path from 'path';
|
|
9
|
-
import os from 'os';
|
|
10
|
-
|
|
11
|
-
const homeLogPath = path.join(os.homedir(), '.cache-overflow', 'cache-overflow-mcp.log');
|
|
12
|
-
const tempLogPath = path.join(os.tmpdir(), 'cache-overflow', 'cache-overflow-mcp.log');
|
|
13
|
-
const customLogPath = process.env.CACHE_OVERFLOW_LOG_DIR
|
|
14
|
-
? path.join(process.env.CACHE_OVERFLOW_LOG_DIR, 'cache-overflow-mcp.log')
|
|
15
|
-
: null;
|
|
16
|
-
|
|
17
|
-
console.log('š Looking for cache.overflow MCP log file...\n');
|
|
18
|
-
|
|
19
|
-
// Check custom location first
|
|
20
|
-
if (customLogPath && fs.existsSync(customLogPath)) {
|
|
21
|
-
console.log('ā
Found log file at custom location:');
|
|
22
|
-
console.log(` ${customLogPath}\n`);
|
|
23
|
-
displayLog(customLogPath);
|
|
24
|
-
}
|
|
25
|
-
// Check home directory
|
|
26
|
-
else if (fs.existsSync(homeLogPath)) {
|
|
27
|
-
console.log('ā
Found log file at default location:');
|
|
28
|
-
console.log(` ${homeLogPath}\n`);
|
|
29
|
-
displayLog(homeLogPath);
|
|
30
|
-
}
|
|
31
|
-
// Check temp directory
|
|
32
|
-
else if (fs.existsSync(tempLogPath)) {
|
|
33
|
-
console.log('ā
Found log file at fallback location:');
|
|
34
|
-
console.log(` ${tempLogPath}\n`);
|
|
35
|
-
displayLog(tempLogPath);
|
|
36
|
-
}
|
|
37
|
-
// No log file found
|
|
38
|
-
else {
|
|
39
|
-
console.log('ā No log file found. Checked locations:');
|
|
40
|
-
console.log(` ${homeLogPath}`);
|
|
41
|
-
console.log(` ${tempLogPath}`);
|
|
42
|
-
if (customLogPath) {
|
|
43
|
-
console.log(` ${customLogPath}`);
|
|
44
|
-
}
|
|
45
|
-
console.log('\nThe log file is created when the MCP server starts.');
|
|
46
|
-
console.log('Make sure cache.overflow-mcp has been run at least once.\n');
|
|
47
|
-
process.exit(1);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
function displayLog(logPath) {
|
|
51
|
-
const stats = fs.statSync(logPath);
|
|
52
|
-
const sizeKB = (stats.size / 1024).toFixed(2);
|
|
53
|
-
|
|
54
|
-
console.log(`š File size: ${sizeKB} KB`);
|
|
55
|
-
console.log(`š Last modified: ${stats.mtime.toLocaleString()}\n`);
|
|
56
|
-
|
|
57
|
-
// Read the file
|
|
58
|
-
const content = fs.readFileSync(logPath, 'utf-8');
|
|
59
|
-
const lines = content.trim().split('\n').filter(line => line.trim());
|
|
60
|
-
|
|
61
|
-
console.log(`š Total log entries: ${lines.length}\n`);
|
|
62
|
-
|
|
63
|
-
// Count by level
|
|
64
|
-
const levels = { ERROR: 0, WARN: 0, INFO: 0 };
|
|
65
|
-
lines.forEach(line => {
|
|
66
|
-
try {
|
|
67
|
-
const entry = JSON.parse(line);
|
|
68
|
-
if (entry.level in levels) {
|
|
69
|
-
levels[entry.level]++;
|
|
70
|
-
}
|
|
71
|
-
} catch (e) {
|
|
72
|
-
// Skip invalid JSON lines
|
|
73
|
-
}
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
console.log('š Log level breakdown:');
|
|
77
|
-
console.log(` ERROR: ${levels.ERROR}`);
|
|
78
|
-
console.log(` WARN: ${levels.WARN}`);
|
|
79
|
-
console.log(` INFO: ${levels.INFO}\n`);
|
|
80
|
-
|
|
81
|
-
// Show last 10 entries
|
|
82
|
-
const recentLines = lines.slice(-10);
|
|
83
|
-
console.log('š Last 10 log entries:\n');
|
|
84
|
-
console.log('ā'.repeat(80));
|
|
85
|
-
|
|
86
|
-
recentLines.forEach(line => {
|
|
87
|
-
try {
|
|
88
|
-
const entry = JSON.parse(line);
|
|
89
|
-
const timestamp = new Date(entry.timestamp).toLocaleString();
|
|
90
|
-
const level = entry.level.padEnd(5);
|
|
91
|
-
const icon = entry.level === 'ERROR' ? 'ā' : entry.level === 'WARN' ? 'ā ļø' : 'ā¹ļø';
|
|
92
|
-
|
|
93
|
-
console.log(`${icon} [${timestamp}] ${level} ${entry.message}`);
|
|
94
|
-
|
|
95
|
-
if (entry.error) {
|
|
96
|
-
console.log(` Error: ${entry.error.name}: ${entry.error.message}`);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (entry.context && Object.keys(entry.context).length > 0) {
|
|
100
|
-
console.log(` Context: ${JSON.stringify(entry.context)}`);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
console.log('ā'.repeat(80));
|
|
104
|
-
} catch (e) {
|
|
105
|
-
console.log(line);
|
|
106
|
-
console.log('ā'.repeat(80));
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
console.log(`\nš” To view the full log file, run:`);
|
|
111
|
-
if (process.platform === 'win32') {
|
|
112
|
-
console.log(` type "${logPath}"`);
|
|
113
|
-
} else {
|
|
114
|
-
console.log(` cat "${logPath}"`);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
console.log(`\nš” To follow logs in real-time, run:`);
|
|
118
|
-
if (process.platform === 'win32') {
|
|
119
|
-
console.log(` Get-Content "${logPath}" -Wait`);
|
|
120
|
-
} else {
|
|
121
|
-
console.log(` tail -f "${logPath}"`);
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
console.log('');
|
|
125
|
-
}
|