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

rUv0f880daedda4
diff --git a/v3/@claude-flow/cli/src/services/worker-queue.ts b/v3/@claude-flow/cli/src/services/worker-queue.ts
index f009c0f050..1a6c42702e 100644
--- a/v3/@claude-flow/cli/src/services/worker-queue.ts
+++ b/v3/@claude-flow/cli/src/services/worker-queue.ts
@@ -312,8 +312,23 @@ export class WorkerQueue extends EventEmitter {
timeoutMs?: number;
}
): Promise<string> {
- const taskId = `task-${Date.now()}-${randomUUID().slice(0, 8)}`;
+ // Initialize if needed
+ if (!this.initialized) {
+ await this.initialize();
+ }
+
+ // Validate worker type
+ if (!workerType || typeof workerType !== 'string') {
+ throw new Error('Invalid worker type');
+ }
+
+ // Validate priority
const priority = options?.priority || 'normal';
+ if (!['critical', 'high', 'normal', 'low'].includes(priority)) {
+ throw new Error(`Invalid priority: ${priority}`);
+ }
+
+ const taskId = `task-${Date.now()}-${randomUUID().slice(0, 8)}`;
const task: QueueTask = {
id: taskId,