forked from ChromeDevTools/chrome-devtools-mcp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_server.cjs
More file actions
46 lines (40 loc) Β· 1.69 KB
/
test_server.cjs
File metadata and controls
46 lines (40 loc) Β· 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/usr/bin/env node
// Quick test to verify our new tools are loaded
const fs = require('fs');
console.log('π Testing Cortex MCP Extension tools...\n');
// Check if our built tools exist
const toolFiles = [
'build/src/tools/overlay.js',
'build/src/tools/semantic.js',
'build/src/tools/determinism.js',
'build/src/tools/governance.js',
'build/src/tools/network-replay.js'
];
let allFound = true;
toolFiles.forEach(file => {
if (fs.existsSync(file)) {
const stats = fs.statSync(file);
console.log(`β
${file} (${Math.round(stats.size/1024)}KB)`);
} else {
console.log(`β ${file} - NOT FOUND`);
allFound = false;
}
});
console.log(`\nπ Summary:`);
console.log(`- ${allFound ? 'β
All' : 'β Some'} tool files compiled successfully`);
console.log(`- Main server: ${fs.existsSync('build/src/main.js') ? 'β
Ready' : 'β Missing'}`);
console.log(`- Index entry: ${fs.existsSync('build/src/index.js') ? 'β
Ready' : 'β Missing'}`);
if (allFound) {
console.log(`\nπ Your Cortex MCP Extension is ready to use!`);
console.log(`\nTo test it, run:`);
console.log(` node build/src/index.js --headless=false`);
console.log(`\nNew tools available:`);
console.log(` - overlay_annotate, overlay_clear, overlay_pick_element`);
console.log(` - sem_snapshot, sem_query`);
console.log(` - time_freeze, time_resume, exec_step, view_screenshot`);
console.log(` - net_record, net_replay`);
console.log(` - policy_scope, policy_redact, audit_export`);
console.log(`\nπ‘ Use with MCP clients like Claude Desktop, Cursor, etc.`);
} else {
console.log(`\nβ Build incomplete. Check compilation errors above.`);
}