Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

Checkpoint: File edits

rUv5683e8ad5f14
diff --git a/v3/@claude-flow/cli/src/services/worker-queue.ts b/v3/@claude-flow/cli/src/services/worker-queue.ts
index 1a6c42702e..2305ef97c2 100644
--- a/v3/@claude-flow/cli/src/services/worker-queue.ts
+++ b/v3/@claude-flow/cli/src/services/worker-queue.ts
@@ -494,10 +494,22 @@ export class WorkerQueue extends EventEmitter {
workerTypes: HeadlessWorkerType[],
options?: { maxConcurrent?: number; hostname?: string; containerId?: string }
): Promise<string> {
+ // Initialize if needed
+ if (!this.initialized) {
+ await this.initialize();
+ }
+
+ // Validate worker types
+ if (!Array.isArray(workerTypes) || workerTypes.length === 0) {
+ throw new Error('Worker types must be a non-empty array');
+ }
+
+ this.maxConcurrent = options?.maxConcurrent || 1;
+
const registration: WorkerRegistration = {
workerId: this.workerId,
workerTypes,
- maxConcurrent: options?.maxConcurrent || 1,
+ maxConcurrent: this.maxConcurrent,
currentTasks: 0,
lastHeartbeat: new Date(),
registeredAt: new Date(),