mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-09 14:04:06 +09:00
- Reorganize v3/ into implementation/ subfolders: - planning/, architecture/, migration/, integration/ - security/, adrs/, research/, swarm-plans/ - Add 15-agent concurrent swarm implementation plans: - SWARM-OVERVIEW.md: Hierarchical mesh topology, 4 phases - AGENT-SPECIFICATIONS.md: 15 agent configs with capabilities - TDD-LONDON-SCHOOL-PLAN.md: Mock-first TDD methodology - BENCHMARK-OPTIMIZATION.md: Performance targets (2.49x-7.47x) - DEPLOYMENT-PLAN.md: Release strategy, CI/CD, rollback - GITHUB-ISSUE-TRACKING.md: Issue workflow with agent replies - Update .claude/settings.json with proper hooks format - Add bash aliases for claude --dangerously-skip-permissions 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
81 lines
3.0 KiB
JavaScript
Executable File
81 lines
3.0 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
/**
|
|
* Phase 4 Session Forking - Runtime Validation
|
|
* Tests ParallelSwarmExecutor and RealTimeQueryController
|
|
*/
|
|
|
|
import { createRequire } from 'module';
|
|
const require = createRequire(import.meta.url);
|
|
|
|
console.log('🧪 Testing Phase 4: Session Forking & Real-Time Control\n');
|
|
|
|
// Test 1: Load Session Forking Module
|
|
console.log('Test 1: Loading session-forking module...');
|
|
try {
|
|
const SessionForking = require('../dist/src/sdk/session-forking.js');
|
|
console.log('✅ Module loaded successfully');
|
|
console.log(' Exports:', Object.keys(SessionForking).join(', '));
|
|
|
|
// Test 2: Create ParallelSwarmExecutor Instance
|
|
console.log('\nTest 2: Creating ParallelSwarmExecutor instance...');
|
|
const executor = new SessionForking.ParallelSwarmExecutor({
|
|
maxConcurrency: 5,
|
|
batchSize: 3,
|
|
enableMetrics: true
|
|
});
|
|
console.log('✅ Executor instance created');
|
|
console.log(' Type:', executor.constructor.name);
|
|
|
|
// Get methods
|
|
const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(executor))
|
|
.filter(m => m !== 'constructor' && typeof executor[m] === 'function');
|
|
console.log(' Methods:', methods.join(', '));
|
|
|
|
} catch (error) {
|
|
console.error('❌ Session Forking test failed:', error.message);
|
|
process.exit(1);
|
|
}
|
|
|
|
// Test 3: Load Query Control Module
|
|
console.log('\nTest 3: Loading query-control module...');
|
|
try {
|
|
const QueryControl = require('../dist/src/sdk/query-control.js');
|
|
console.log('✅ Module loaded successfully');
|
|
console.log(' Exports:', Object.keys(QueryControl).join(', '));
|
|
|
|
// Test 4: Create RealTimeQueryController Instance
|
|
console.log('\nTest 4: Creating RealTimeQueryController instance...');
|
|
const controller = new QueryControl.RealTimeQueryController();
|
|
console.log('✅ Controller instance created');
|
|
console.log(' Type:', controller.constructor.name);
|
|
|
|
// Get methods
|
|
const methods = Object.getOwnPropertyNames(Object.getPrototypeOf(controller))
|
|
.filter(m => m !== 'constructor' && typeof controller[m] === 'function');
|
|
console.log(' Methods:', methods.join(', '));
|
|
|
|
} catch (error) {
|
|
console.error('❌ Query Control test failed:', error.message);
|
|
process.exit(1);
|
|
}
|
|
|
|
// Test 5: Verify SDK Integration
|
|
console.log('\nTest 5: Verifying Claude Code SDK integration...');
|
|
try {
|
|
const claudeCodeSDK = require('@anthropic-ai/claude-code');
|
|
console.log('✅ Claude Code SDK accessible');
|
|
console.log(' SDK exports query function:', typeof claudeCodeSDK.query === 'function');
|
|
|
|
} catch (error) {
|
|
console.error('❌ SDK integration test failed:', error.message);
|
|
process.exit(1);
|
|
}
|
|
|
|
console.log('\n🎉 All Phase 4 tests passed!');
|
|
console.log('\n📊 Summary:');
|
|
console.log(' ✅ Session forking module loads correctly');
|
|
console.log(' ✅ ParallelSwarmExecutor instantiates');
|
|
console.log(' ✅ Query control module loads correctly');
|
|
console.log(' ✅ RealTimeQueryController instantiates');
|
|
console.log(' ✅ Claude Code SDK integration working');
|
|
console.log('\n🚀 Phase 4 is fully operational!'); |