#!/usr/bin/env node /** * Quick Verification Test - Verify real implementations work */ import { Brainy } from '../dist/index.js' import { MemoryStorage } from '../dist/storage/adapters/memoryStorage.js' async function quickVerify() { console.log('šŸ” Quick Verification Test\n') // Initialize const brain = new Brainy({ storage: new MemoryStorage() }) await brain.init() console.log('āœ… Initialized') // Test 1: Add a single noun const id1 = await brain.addNoun( { content: 'Test document 1' }, 'document', { category: 'test' } ) console.log(`āœ… Added noun: ${id1}`) // Test 2: Add multiple nouns (batch test) const promises = [] for (let i = 0; i < 10; i++) { promises.push(brain.addNoun( { content: `Test doc ${i}` }, 'document', { index: i } )) } const ids = await Promise.all(promises) console.log(`āœ… Batch added ${ids.length} nouns`) // Test 3: Search const results = await brain.searchText('Test document', 5) console.log(`āœ… Search returned ${results.length} results`) // Test 4: Add verb const verbId = await brain.addVerb({ source: id1, target: ids[0], type: 'RelatedTo' }) console.log(`āœ… Added verb: ${verbId}`) // Test 5: Get statistics const stats = await brain.getStatistics() console.log(`āœ… Stats: ${stats.totalNouns} nouns, ${stats.totalVerbs} verbs`) // Verify real implementations console.log('\nšŸ“Š Verification Results:') if (stats.totalNouns === 11) { console.log('āœ… BatchProcessing: Working (all nouns stored)') } else { console.log(`āŒ BatchProcessing: Expected 11 nouns, got ${stats.totalNouns}`) } if (stats.totalVerbs === 1) { console.log('āœ… Verb storage: Working') } else { console.log(`āŒ Verb storage: Expected 1 verb, got ${stats.totalVerbs}`) } // Check augmentations const augTypes = brain.augmentations.getAugmentationTypes() console.log(`āœ… Active augmentations: ${augTypes.join(', ')}`) // Close await brain.close() console.log('\nāœ… All tests passed - implementations are REAL!') } quickVerify().catch(error => { console.error('āŒ Test failed:', error) process.exit(1) })