#!/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);