mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 14:16:34 +09:00
## 🔒 Security Fixes - CRITICAL: Removed vulnerable pkg dependency (GHSA-22r3-9w55-cj54) - Replaced with secure @vercel/ncc alternative - Security score improved from 55/100 to 75/100 - All npm audit vulnerabilities resolved (0 vulnerabilities) ## 🚀 Infrastructure Improvements - Re-enabled ALL CI/CD security gates with strict enforcement - Fixed Jest configuration and test infrastructure - Fixed 18 TypeScript test files with import issues - Created comprehensive test utilities ## 🛠️ Code Quality - Fixed 145 ESLint errors (16% reduction) - Fixed 15 critical TypeScript errors - Added development tooling configs ## 📚 Documentation - Created security audit report - Created fix summary documentation - Created functionality review - Updated GitHub issue #362 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
1.1 KiB
JavaScript
39 lines
1.1 KiB
JavaScript
/**
|
|
* Memory Module - Unified memory persistence for ruv-swarm
|
|
*
|
|
* Provides both generic SharedMemory and MCP-specific SwarmMemory implementations
|
|
*
|
|
* @module memory
|
|
*/
|
|
|
|
import SharedMemory from './shared-memory.js';
|
|
import { SwarmMemory, createSwarmMemory } from './swarm-memory.js';
|
|
|
|
export { SharedMemory, SwarmMemory, createSwarmMemory };
|
|
|
|
// Re-export swarm namespaces for convenience
|
|
export const SWARM_NAMESPACES = {
|
|
AGENTS: 'swarm:agents',
|
|
TASKS: 'swarm:tasks',
|
|
COMMUNICATIONS: 'swarm:communications',
|
|
CONSENSUS: 'swarm:consensus',
|
|
PATTERNS: 'swarm:patterns',
|
|
METRICS: 'swarm:metrics',
|
|
COORDINATION: 'swarm:coordination',
|
|
};
|
|
|
|
/**
|
|
* Create memory instance based on context
|
|
* @param {Object} options - Configuration options
|
|
* @returns {SharedMemory|SwarmMemory} Memory instance
|
|
*/
|
|
export function createMemory(options = {}) {
|
|
if (options.type === 'swarm' || options.swarmId) {
|
|
return new SwarmMemory(options);
|
|
}
|
|
return new SharedMemory(options);
|
|
}
|
|
|
|
// Default export for backwards compatibility
|
|
export default { SharedMemory, SwarmMemory, createMemory, SWARM_NAMESPACES };
|