 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>
		
			
				
	
	
		
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			62 lines
		
	
	
		
			1.7 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| /**
 | |
|  * Stringify a CST document, token, or collection item
 | |
|  *
 | |
|  * Fair warning: This applies no validation whatsoever, and
 | |
|  * simply concatenates the sources in their logical order.
 | |
|  */
 | |
| const stringify = (cst) => 'type' in cst ? stringifyToken(cst) : stringifyItem(cst);
 | |
| function stringifyToken(token) {
 | |
|     switch (token.type) {
 | |
|         case 'block-scalar': {
 | |
|             let res = '';
 | |
|             for (const tok of token.props)
 | |
|                 res += stringifyToken(tok);
 | |
|             return res + token.source;
 | |
|         }
 | |
|         case 'block-map':
 | |
|         case 'block-seq': {
 | |
|             let res = '';
 | |
|             for (const item of token.items)
 | |
|                 res += stringifyItem(item);
 | |
|             return res;
 | |
|         }
 | |
|         case 'flow-collection': {
 | |
|             let res = token.start.source;
 | |
|             for (const item of token.items)
 | |
|                 res += stringifyItem(item);
 | |
|             for (const st of token.end)
 | |
|                 res += st.source;
 | |
|             return res;
 | |
|         }
 | |
|         case 'document': {
 | |
|             let res = stringifyItem(token);
 | |
|             if (token.end)
 | |
|                 for (const st of token.end)
 | |
|                     res += st.source;
 | |
|             return res;
 | |
|         }
 | |
|         default: {
 | |
|             let res = token.source;
 | |
|             if ('end' in token && token.end)
 | |
|                 for (const st of token.end)
 | |
|                     res += st.source;
 | |
|             return res;
 | |
|         }
 | |
|     }
 | |
| }
 | |
| function stringifyItem({ start, key, sep, value }) {
 | |
|     let res = '';
 | |
|     for (const st of start)
 | |
|         res += st.source;
 | |
|     if (key)
 | |
|         res += stringifyToken(key);
 | |
|     if (sep)
 | |
|         for (const st of sep)
 | |
|             res += st.source;
 | |
|     if (value)
 | |
|         res += stringifyToken(value);
 | |
|     return res;
 | |
| }
 | |
| 
 | |
| export { stringify };
 |