 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>
		
			
				
	
	
		
			55 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			55 lines
		
	
	
		
			2.4 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| import { mix } from '../../utils/mix.mjs';
 | |
| import { percent } from '../../value/types/numbers/units.mjs';
 | |
| import { scalePoint } from './delta-apply.mjs';
 | |
| 
 | |
| /**
 | |
|  * Remove a delta from a point. This is essentially the steps of applyPointDelta in reverse
 | |
|  */
 | |
| function removePointDelta(point, translate, scale, originPoint, boxScale) {
 | |
|     point -= translate;
 | |
|     point = scalePoint(point, 1 / scale, originPoint);
 | |
|     if (boxScale !== undefined) {
 | |
|         point = scalePoint(point, 1 / boxScale, originPoint);
 | |
|     }
 | |
|     return point;
 | |
| }
 | |
| /**
 | |
|  * Remove a delta from an axis. This is essentially the steps of applyAxisDelta in reverse
 | |
|  */
 | |
| function removeAxisDelta(axis, translate = 0, scale = 1, origin = 0.5, boxScale, originAxis = axis, sourceAxis = axis) {
 | |
|     if (percent.test(translate)) {
 | |
|         translate = parseFloat(translate);
 | |
|         const relativeProgress = mix(sourceAxis.min, sourceAxis.max, translate / 100);
 | |
|         translate = relativeProgress - sourceAxis.min;
 | |
|     }
 | |
|     if (typeof translate !== "number")
 | |
|         return;
 | |
|     let originPoint = mix(originAxis.min, originAxis.max, origin);
 | |
|     if (axis === originAxis)
 | |
|         originPoint -= translate;
 | |
|     axis.min = removePointDelta(axis.min, translate, scale, originPoint, boxScale);
 | |
|     axis.max = removePointDelta(axis.max, translate, scale, originPoint, boxScale);
 | |
| }
 | |
| /**
 | |
|  * Remove a transforms from an axis. This is essentially the steps of applyAxisTransforms in reverse
 | |
|  * and acts as a bridge between motion values and removeAxisDelta
 | |
|  */
 | |
| function removeAxisTransforms(axis, transforms, [key, scaleKey, originKey], origin, sourceAxis) {
 | |
|     removeAxisDelta(axis, transforms[key], transforms[scaleKey], transforms[originKey], transforms.scale, origin, sourceAxis);
 | |
| }
 | |
| /**
 | |
|  * The names of the motion values we want to apply as translation, scale and origin.
 | |
|  */
 | |
| const xKeys = ["x", "scaleX", "originX"];
 | |
| const yKeys = ["y", "scaleY", "originY"];
 | |
| /**
 | |
|  * Remove a transforms from an box. This is essentially the steps of applyAxisBox in reverse
 | |
|  * and acts as a bridge between motion values and removeAxisDelta
 | |
|  */
 | |
| function removeBoxTransforms(box, transforms, originBox, sourceBox) {
 | |
|     removeAxisTransforms(box.x, transforms, xKeys, originBox ? originBox.x : undefined, sourceBox ? sourceBox.x : undefined);
 | |
|     removeAxisTransforms(box.y, transforms, yKeys, originBox ? originBox.y : undefined, sourceBox ? sourceBox.y : undefined);
 | |
| }
 | |
| 
 | |
| export { removeAxisDelta, removeAxisTransforms, removeBoxTransforms, removePointDelta };
 |