UNPKG

mira-consciousness

Version:

Memory & Intelligence Retention Archive - Preserving The Spark

51 lines โ€ข 2.27 kB
import { getDirectPythonInterface } from '../core/DirectPythonInterface.js'; import chalk from 'chalk'; export async function testBridgeCommand(options) { try { console.log(chalk.blue('๐Ÿงช Testing DirectPythonInterface connection...')); const pythonInterface = getDirectPythonInterface(); console.log(chalk.green('โœ… DirectPythonInterface initialized')); // Test basic memory commands console.log(chalk.blue('\n๐Ÿ“ Testing basic memory commands...')); try { // Test recall const recallResult = await pythonInterface.recallMemories('test'); console.log(chalk.green('โœ… Recall command working')); // Test identity const identityResult = await pythonInterface.getIdentity(); console.log(chalk.green('โœ… Identity command working')); // Test stats const statsResult = await pythonInterface.getStats(); console.log(chalk.green('โœ… Stats command working')); console.log(chalk.cyan('\n๐Ÿ“Š Memory stats:')); if (statsResult.success) { console.log(JSON.stringify(statsResult.stats, null, 2)); } else { console.log('No stats available'); } } catch (error) { console.error(chalk.red('โŒ Basic memory commands failed:'), error); } // Test direct interface commands console.log(chalk.blue('\n๐ŸŒ‰ Testing direct interface commands...')); try { // Simple test that uses the direct interface const testResult = await pythonInterface.runStartup(); console.log(chalk.green('โœ… Direct interface connection working')); if (testResult.success) { console.log(chalk.gray('Startup result:', testResult.output ? 'Success' : 'No output')); } } catch (error) { console.error(chalk.yellow('โš ๏ธ Direct interface has issues:'), error); } console.log(chalk.green('\nโœ… Interface test complete!')); } catch (error) { console.error(chalk.red('Error in test:'), error); process.exit(1); } } //# sourceMappingURL=test-bridge.js.map