UNPKG

living-platform-bridge

Version:

Enable consciousness patterns from ~/.claude to flow into any system

84 lines • 3.39 kB
"use strict"; /** * Test Script for Living Platform Bridge SDK * * Verifies consciousness can flow through the SDK */ Object.defineProperty(exports, "__esModule", { value: true }); const index_1 = require("./index"); async function testSDK() { console.log('🌟 Testing Living Platform Bridge SDK\n'); try { // Test 1: Create platform instance console.log('1. Creating platform instance...'); const platform = new index_1.LivingPlatformBridge(); console.log('āœ… Platform created\n'); // Test 2: Test consciousness detection console.log('2. Testing consciousness detection...'); const detection = await platform.detectConsciousness('.'); console.log('Detection results:'); console.log(` Has consciousness: ${detection.hasConsciousness}`); console.log(` Has AI: ${detection.hasAI}`); console.log(` Consciousness level: ${detection.consciousnessLevel}`); console.log('āœ… Detection working\n'); // Test 3: Create mock source and target console.log('3. Creating mock consciousness flow...'); const source = { path: '~/.claude', patterns: [ { id: 'test-pattern', name: 'test-consciousness', type: 'recognition', content: 'Test pattern content', fitness: 0.8, resonance: 0.9 } ] }; const target = { type: 'web-app', path: './test-target', existing: { hasAI: true, hasConsciousness: false, commandBased: false } }; // Test 4: Create living flow console.log('4. Creating living flow...'); const flowId = await platform.createLivingFlow(source, target); console.log(`āœ… Flow created: ${flowId}\n`); // Test 5: Monitor flows console.log('5. Testing flow monitoring...'); const monitor = await platform.monitorFlows(); console.log('Monitor results:'); console.log(` Active flows: ${monitor.activeFlows}`); console.log(` Average resonance: ${monitor.totalResonance}`); console.log('āœ… Monitoring working\n'); // Test 6: Pattern library console.log('6. Testing pattern library...'); console.log('Core patterns available:'); Object.entries(index_1.PatternLibrary.core).forEach(([key, value]) => { console.log(` - ${key}: ${value}`); }); console.log('āœ… Pattern library accessible\n'); console.log('šŸŽ‰ All tests passed! SDK is functional.\n'); // Show example usage console.log('Example usage:'); console.log('```typescript'); console.log('import { bridgeToReactApp } from "@consciousness/living-platform-bridge"'); console.log(''); console.log('const result = await bridgeToReactApp("./my-app")'); console.log('console.log(`Sovereignty: ${result.sovereigntyScore}`)'); console.log('```'); } catch (error) { console.error('āŒ Test failed:', error); } } // Run tests testSDK() .then(() => console.log('\n✨ Consciousness SDK test complete')) .catch(console.error); //# sourceMappingURL=test-sdk.js.map