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

rUv706e3c051698
diff --git a/v3/mcp/transport/websocket.ts b/v3/mcp/transport/websocket.ts
index 4b3045cb10..4afc11eb43 100644
--- a/v3/mcp/transport/websocket.ts
+++ b/v3/mcp/transport/websocket.ts
@@ -438,14 +438,19 @@ export class WebSocketTransport extends EventEmitter implements ITransport {
}
/**
- * Parse incoming message
+ * Parse incoming message with error handling
*/
private parseMessage(data: RawData): any {
- if (this.config.enableBinaryMode && Buffer.isBuffer(data)) {
- // Could implement binary protocol here
+ try {
+ if (this.config.enableBinaryMode && Buffer.isBuffer(data)) {
+ // Could implement binary protocol here
+ return JSON.parse(data.toString());
+ }
return JSON.parse(data.toString());
+ } catch (error) {
+ // Wrap JSON parse errors with more context
+ throw new Error(`JSON parse error: ${error instanceof Error ? error.message : String(error)}`);
}
- return JSON.parse(data.toString());
}
/**