 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>
		
			
				
	
	
		
			35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import max from "../max/index.js";
 | |
| import min from "../min/index.js";
 | |
| import requiredArgs from "../_lib/requiredArgs/index.js";
 | |
| /**
 | |
|  * @name clamp
 | |
|  * @category Interval Helpers
 | |
|  * @summary Return a date bounded by the start and the end of the given interval
 | |
|  *
 | |
|  * @description
 | |
|  * Clamps a date to the lower bound with the start of the interval and the upper
 | |
|  * bound with the end of the interval.
 | |
|  *
 | |
|  * - When the date is less than the start of the interval, the start is returned.
 | |
|  * - When the date is greater than the end of the interval, the end is returned.
 | |
|  * - Otherwise the date is returned.
 | |
|  *
 | |
|  * @example
 | |
|  * // What is Mar, 21, 2021 bounded to an interval starting at Mar, 22, 2021 and ending at Apr, 01, 2021
 | |
|  * const result = clamp(new Date(2021, 2, 21), {
 | |
|  *   start: new Date(2021, 2, 22),
 | |
|  *   end: new Date(2021, 3, 1),
 | |
|  * })
 | |
|  * //=> Mon Mar 22 2021 00:00:00
 | |
|  *
 | |
|  * @param {Date | Number} date - the date to be bounded
 | |
|  * @param {Interval} interval - the interval to bound to
 | |
|  * @returns {Date} the date bounded by the start and the end of the interval
 | |
|  * @throws {TypeError} 2 arguments required
 | |
|  */
 | |
| export default function clamp(date, _ref) {
 | |
|   var start = _ref.start,
 | |
|     end = _ref.end;
 | |
|   requiredArgs(2, arguments);
 | |
|   return min([max([date, start]), end]);
 | |
| } |