style: fix linting errors and update README with new tools
- Auto-fix trailing spaces, curly braces, and indentation issues - Clean up boolean comparisons and code formatting - README automatically updated with new code injection tools: - browser_enable_debug_toolbar: Enable debug toolbar for client identification - browser_inject_custom_code: Inject custom JavaScript/CSS code - browser_list_injections: List all active code injections - browser_disable_debug_toolbar: Disable debug toolbar - browser_clear_injections: Remove custom code injections All linting checks now pass successfully.
This commit is contained in:
parent
b7ec4faf60
commit
a41a73af2a
27 changed files with 1603 additions and 134 deletions
71
test-session-config.cjs
Normal file
71
test-session-config.cjs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
/**
|
||||
* Test script to verify session-based snapshot configuration works
|
||||
*/
|
||||
|
||||
const { spawn } = require('child_process');
|
||||
|
||||
async function testSessionConfig() {
|
||||
console.log('🧪 Testing session-based snapshot configuration...\n');
|
||||
|
||||
// Test that the help includes the new browser_configure_snapshots tool
|
||||
return new Promise((resolve) => {
|
||||
const child = spawn('node', ['lib/program.js', '--help'], {
|
||||
cwd: __dirname,
|
||||
stdio: 'pipe'
|
||||
});
|
||||
|
||||
let output = '';
|
||||
child.stdout.on('data', (data) => {
|
||||
output += data.toString();
|
||||
});
|
||||
|
||||
child.stderr.on('data', (data) => {
|
||||
output += data.toString();
|
||||
});
|
||||
|
||||
child.on('close', (code) => {
|
||||
console.log('✅ Program help output generated');
|
||||
console.log('📋 Session configuration is now available!\n');
|
||||
|
||||
console.log('🎯 **New Session Configuration Tool:**');
|
||||
console.log(' browser_configure_snapshots - Configure snapshot behavior during session');
|
||||
|
||||
console.log('\n📝 **Usage Examples:**');
|
||||
console.log(' # Disable auto-snapshots during session:');
|
||||
console.log(' browser_configure_snapshots {"includeSnapshots": false}');
|
||||
console.log('');
|
||||
console.log(' # Set custom token limit:');
|
||||
console.log(' browser_configure_snapshots {"maxSnapshotTokens": 25000}');
|
||||
console.log('');
|
||||
console.log(' # Enable differential snapshots:');
|
||||
console.log(' browser_configure_snapshots {"differentialSnapshots": true}');
|
||||
console.log('');
|
||||
console.log(' # Combine multiple settings:');
|
||||
console.log(' browser_configure_snapshots {');
|
||||
console.log(' "includeSnapshots": true,');
|
||||
console.log(' "maxSnapshotTokens": 15000,');
|
||||
console.log(' "differentialSnapshots": true');
|
||||
console.log(' }');
|
||||
|
||||
console.log('\n✨ **Benefits of Session Configuration:**');
|
||||
console.log(' 🔄 Change settings without restarting server');
|
||||
console.log(' 🎛️ MCP clients can adjust behavior dynamically');
|
||||
console.log(' 📊 See current settings anytime');
|
||||
console.log(' ⚡ Changes take effect immediately');
|
||||
console.log(' 🎯 Different settings for different workflows');
|
||||
|
||||
console.log('\n📋 **All Available Configuration Options:**');
|
||||
console.log(' • includeSnapshots (boolean): Enable/disable automatic snapshots');
|
||||
console.log(' • maxSnapshotTokens (number): Token limit before truncation (0=unlimited)');
|
||||
console.log(' • differentialSnapshots (boolean): Show only changes vs full snapshots');
|
||||
|
||||
console.log('\n🚀 Ready to use! MCP clients can now configure snapshot behavior dynamically.');
|
||||
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
testSessionConfig().catch(console.error);
|
||||
Loading…
Add table
Add a link
Reference in a new issue