 85bf1341f3
			
		
	
	85bf1341f3
	
	
	
		
			
			Frontend Enhancements: - Complete React TypeScript frontend with modern UI components - Distributed workflows management interface with real-time updates - Socket.IO integration for live agent status monitoring - Agent management dashboard with cluster visualization - Project management interface with metrics and task tracking - Responsive design with proper error handling and loading states Backend Infrastructure: - Distributed coordinator for multi-agent workflow orchestration - Cluster management API with comprehensive agent operations - Enhanced database models for agents and projects - Project service for filesystem-based project discovery - Performance monitoring and metrics collection - Comprehensive API documentation and error handling Documentation: - Complete distributed development guide (README_DISTRIBUTED.md) - Comprehensive development report with architecture insights - System configuration templates and deployment guides The platform now provides a complete web interface for managing the distributed AI cluster with real-time monitoring, workflow orchestration, and agent coordination capabilities. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import crypto from 'crypto'
 | |
| import { urlAlphabet } from './url-alphabet/index.js'
 | |
| const POOL_SIZE_MULTIPLIER = 128
 | |
| let pool, poolOffset
 | |
| let fillPool = bytes => {
 | |
|   if (!pool || pool.length < bytes) {
 | |
|     pool = Buffer.allocUnsafe(bytes * POOL_SIZE_MULTIPLIER)
 | |
|     crypto.randomFillSync(pool)
 | |
|     poolOffset = 0
 | |
|   } else if (poolOffset + bytes > pool.length) {
 | |
|     crypto.randomFillSync(pool)
 | |
|     poolOffset = 0
 | |
|   }
 | |
|   poolOffset += bytes
 | |
| }
 | |
| let random = bytes => {
 | |
|   fillPool((bytes |= 0))
 | |
|   return pool.subarray(poolOffset - bytes, poolOffset)
 | |
| }
 | |
| let customRandom = (alphabet, defaultSize, getRandom) => {
 | |
|   let mask = (2 << (31 - Math.clz32((alphabet.length - 1) | 1))) - 1
 | |
|   let step = Math.ceil((1.6 * mask * defaultSize) / alphabet.length)
 | |
|   return (size = defaultSize) => {
 | |
|     let id = ''
 | |
|     while (true) {
 | |
|       let bytes = getRandom(step)
 | |
|       let i = step
 | |
|       while (i--) {
 | |
|         id += alphabet[bytes[i] & mask] || ''
 | |
|         if (id.length === size) return id
 | |
|       }
 | |
|     }
 | |
|   }
 | |
| }
 | |
| let customAlphabet = (alphabet, size = 21) =>
 | |
|   customRandom(alphabet, size, random)
 | |
| let nanoid = (size = 21) => {
 | |
|   fillPool((size |= 0))
 | |
|   let id = ''
 | |
|   for (let i = poolOffset - size; i < poolOffset; i++) {
 | |
|     id += urlAlphabet[pool[i] & 63]
 | |
|   }
 | |
|   return id
 | |
| }
 | |
| export { nanoid, customAlphabet, customRandom, urlAlphabet, random }
 |