 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>
		
			
				
	
	
	
		
			3.7 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			3.7 KiB
		
	
	
	
	
	
	
	
thenify
Promisify a callback-based function using any-promise.
- Preserves function names
- Uses a native promise implementation if available and tries to fall back to a promise implementation such as bluebird
- Converts multiple arguments from the callback into an Array, also support change the behavior byoptions.multiArgs
- Resulting function never deoptimizes
- Supports both callback and promise style
An added benefit is that thrown errors in that async function will be caught by the promise!
API
fn = thenify(fn, options)
Promisifies a function.
Options
options are optional.
- 
options.withCallback- support both callback and promise style, default tofalse.
- 
options.multiArgs- change the behavior when callback have multiple arguments. default totrue.- true- converts multiple arguments to an array
- false- always use the first argument
- Array- converts multiple arguments to an object with keys provided in- options.multiArgs
 
- 
Turn async functions into promises 
var thenify = require('thenify');
var somethingAsync = thenify(function somethingAsync(a, b, c, callback) {
  callback(null, a, b, c);
});
- Backward compatible with callback
var thenify = require('thenify');
var somethingAsync = thenify(function somethingAsync(a, b, c, callback) {
  callback(null, a, b, c);
}, { withCallback: true });
// somethingAsync(a, b, c).then(onFulfilled).catch(onRejected);
// somethingAsync(a, b, c, function () {});
or use thenify.withCallback()
var thenify = require('thenify').withCallback;
var somethingAsync = thenify(function somethingAsync(a, b, c, callback) {
  callback(null, a, b, c);
});
// somethingAsync(a, b, c).then(onFulfilled).catch(onRejected);
// somethingAsync(a, b, c, function () {});
- Always return the first argument in callback
var thenify = require('thenify');
var promise = thenify(function (callback) {
  callback(null, 1, 2, 3);
}, { multiArgs: false });
// promise().then(function onFulfilled(value) {
//   assert.equal(value, 1);
// });
- Converts callback arguments to an object
var thenify = require('thenify');
var promise = thenify(function (callback) {
  callback(null, 1, 2, 3);
}, { multiArgs: [ 'one', 'tow', 'three' ] });
// promise().then(function onFulfilled(value) {
//   assert.deepEqual(value, {
//     one: 1,
//     tow: 2,
//     three: 3
//   });
// });