 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>
		
			
				
	
	
		
			112 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			112 lines
		
	
	
		
			4.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| // @flow
 | |
| 
 | |
| export interface Patch {
 | |
| 	op: "replace" | "remove" | "add";
 | |
| 	path: (string | number)[];
 | |
| 	value?: any;
 | |
| }
 | |
| 
 | |
| export type PatchListener = (patches: Patch[], inversePatches: Patch[]) => void
 | |
| 
 | |
| type Base = {...} | Array<any>
 | |
| interface IProduce {
 | |
| 	/**
 | |
| 	 * Immer takes a state, and runs a function against it.
 | |
| 	 * That function can freely mutate the state, as it will create copies-on-write.
 | |
| 	 * This means that the original state will stay unchanged, and once the function finishes, the modified state is returned.
 | |
| 	 *
 | |
| 	 * If the first argument is a function, this is interpreted as the recipe, and will create a curried function that will execute the recipe
 | |
| 	 * any time it is called with the current state.
 | |
| 	 *
 | |
| 	 * @param currentState - the state to start with
 | |
| 	 * @param recipe - function that receives a proxy of the current state as first argument and which can be freely modified
 | |
| 	 * @param initialState - if a curried function is created and this argument was given, it will be used as fallback if the curried function is called with a state of undefined
 | |
| 	 * @returns The next state: a new state, or the current state if nothing was modified
 | |
| 	 */
 | |
| 	<S: Base>(
 | |
| 		currentState: S,
 | |
| 		recipe: (draftState: S) => S | void,
 | |
| 		patchListener?: PatchListener
 | |
| 	): S;
 | |
| 	// curried invocations with initial state
 | |
| 	<S: Base, A = void, B = void, C = void>(
 | |
| 		recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void,
 | |
| 		initialState: S
 | |
| 	): (currentState: S | void, a: A, b: B, c: C, ...extraArgs: any[]) => S;
 | |
| 	// curried invocations without initial state
 | |
| 	<S: Base, A = void, B = void, C = void>(
 | |
| 		recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void
 | |
| 	): (currentState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S;
 | |
| }
 | |
| 
 | |
| interface IProduceWithPatches {
 | |
|         /**
 | |
|          * Like `produce`, but instead of just returning the new state,
 | |
|          * a tuple is returned with [nextState, patches, inversePatches]
 | |
|          *
 | |
|          * Like produce, this function supports currying
 | |
|          */
 | |
| 	<S: Base>(
 | |
| 		currentState: S,
 | |
| 		recipe: (draftState: S) => S | void
 | |
| 	): [S, Patch[], Patch[]];
 | |
| 	// curried invocations with initial state
 | |
| 	<S: Base, A = void, B = void, C = void>(
 | |
| 		recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void,
 | |
| 		initialState: S
 | |
| 	): (currentState: S | void, a: A, b: B, c: C, ...extraArgs: any[]) => [S, Patch[], Patch[]];
 | |
| 	// curried invocations without initial state
 | |
| 	<S: Base, A = void, B = void, C = void>(
 | |
| 		recipe: (draftState: S, a: A, b: B, c: C, ...extraArgs: any[]) => S | void
 | |
| 	): (currentState: S, a: A, b: B, c: C, ...extraArgs: any[]) => [S, Patch[], Patch[]];
 | |
| }
 | |
| 
 | |
| declare export var produce: IProduce
 | |
| 
 | |
| declare export var produceWithPatches: IProduceWithPatches
 | |
| 
 | |
| declare export var nothing: typeof undefined
 | |
| 
 | |
| declare export var immerable: Symbol
 | |
| 
 | |
| /**
 | |
|  * Automatically freezes any state trees generated by immer.
 | |
|  * This protects against accidental modifications of the state tree outside of an immer function.
 | |
|  * This comes with a performance impact, so it is recommended to disable this option in production.
 | |
|  * By default it is turned on during local development, and turned off in production.
 | |
|  */
 | |
| declare export function setAutoFreeze(autoFreeze: boolean): void
 | |
| 
 | |
| /**
 | |
|  * Pass false to disable strict shallow copy.
 | |
|  *
 | |
|  * By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
 | |
|  */
 | |
| declare export function setUseStrictShallowCopy(useStrictShallowCopy: boolean): void
 | |
| 
 | |
| declare export function applyPatches<S>(state: S, patches: Patch[]): S
 | |
| 
 | |
| declare export function original<S>(value: S): S
 | |
| 
 | |
| declare export function current<S>(value: S): S
 | |
| 
 | |
| declare export function isDraft(value: any): boolean
 | |
| 
 | |
| /**
 | |
|  * Creates a mutable draft from an (immutable) object / array.
 | |
|  * The draft can be modified until `finishDraft` is called
 | |
|  */
 | |
| declare export function createDraft<T>(base: T): T
 | |
| 
 | |
| /**
 | |
|  * Given a draft that was created using `createDraft`,
 | |
|  * finalizes the draft into a new immutable object.
 | |
|  * Optionally a patch-listener can be provided to gather the patches that are needed to construct the object.
 | |
|  */
 | |
| declare export function finishDraft<T>(base: T, listener?: PatchListener): T
 | |
| 
 | |
| declare export function enableMapSet(): void
 | |
| declare export function enablePatches(): void
 | |
| 
 | |
| declare export function freeze<T>(obj: T, freeze?: boolean): T
 |