🌊 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
TypeScript agentic-aiagentic-frameworkagentic-workflowagentsai-agentsai-assistantai-skillsautonomous-agentsclaudecodexdsh-pluginharnessmcp-servermulti-agentmulti-agent-systemsnpmskillsswarmswarm-intelligencetypescript
fix: 4 high-priority bugs — browser ENOENT, memory path, stdio crash, settings (#1604, #1605, #1606, #1616)
rUvc1eb37d5357b
diff --git a/.claude/settings copy.json b/.claude/settings.json.baksimilarity index 100%rename from .claude/settings copy.jsonrename to .claude/settings.json.bakdiff --git a/v3/@claude-flow/cli/bin/cli.js b/v3/@claude-flow/cli/bin/cli.jsindex 35c28a0352..cf462527f9 100755--- a/v3/@claude-flow/cli/bin/cli.js+++ b/v3/@claude-flow/cli/bin/cli.js@@ -47,17 +47,28 @@ if (isMCPMode) {for (const line of lines) {if (line.trim()) {+ let message;+ try {+ message = JSON.parse(line);+ } catch {+ console.log(JSON.stringify({+ jsonrpc: '2.0',+ id: null,+ error: { code: -32700, message: 'Parse error' },+ }));+ continue;+ }try {- const message = JSON.parse(line);const response = await handleMessage(message);if (response) {console.log(JSON.stringify(response));}} catch (error) {+ // #1606: Return proper internal error instead of parse errorconsole.log(JSON.stringify({jsonrpc: '2.0',- id: null,- error: { code: -32700, message: 'Parse error' },+ id: message.id ?? null,+ error: { code: -32603, message: error instanceof Error ? error.message : 'Internal error' },}));}}diff --git a/v3/@claude-flow/cli/src/mcp-client.ts b/v3/@claude-flow/cli/src/mcp-client.tsindex a0797127cf..5777dc5de1 100644--- a/v3/@claude-flow/cli/src/mcp-client.ts+++ b/v3/@claude-flow/cli/src/mcp-client.ts@@ -35,6 +35,7 @@ import { githubTools } from './mcp-tools/github-tools.js';import { daaTools } from './mcp-tools/daa-tools.js';import { coordinationTools } from './mcp-tools/coordination-tools.js';import { browserTools } from './mcp-tools/browser-tools.js';+import { execFileSync } from 'node:child_process';// Phase 6: AgentDB v3 controller toolsimport { agentdbTools } from './mcp-tools/agentdb-tools.js';// RuVector WASM tools@@ -43,6 +44,20 @@ import { wasmAgentTools } from './mcp-tools/wasm-agent-tools.js';import { guidanceTools } from './mcp-tools/guidance-tools.js';import { autopilotTools } from './mcp-tools/autopilot-tools.js';+// #1605: Only register browser tools if agent-browser is available+let _browserAvailable: boolean | null = null;+function getBrowserTools(): MCPTool[] {+ if (_browserAvailable === null) {+ try {+ execFileSync('agent-browser', ['--version'], { stdio: 'ignore', timeout: 3000 });+ _browserAvailable = true;+ } catch {+ _browserAvailable = false;+ }+ }+ return _browserAvailable ? browserTools : [];+}+/*** MCP Tool Registry* Maps tool names to their handler functions@@ -81,7 +96,7 @@ registerTools([...githubTools,...daaTools,...coordinationTools,- ...browserTools,+ ...getBrowserTools(),// Phase 6: AgentDB v3 controller tools...agentdbTools,// RuVector WASM toolsdiff --git a/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts b/v3/@claude-flow/cli/src/mcp-tools/memory-tools.tsindex a645052781..0ee77b0392 100644--- a/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts+++ b/v3/@claude-flow/cli/src/mcp-tools/memory-tools.ts@@ -30,9 +30,10 @@ interface LegacyMemoryStore {version: string;}-// Paths-const MEMORY_DIR = '.claude-flow/memory';+// #1604: Align with memory-initializer.ts — single source of truth is .swarm/memory.db+const MEMORY_DIR = '.swarm';const LEGACY_MEMORY_FILE = 'store.json';+const LEGACY_MEMORY_DIR = '.claude-flow/memory';const MIGRATION_MARKER = '.migrated-to-sqlite';function getMemoryDir(): string {@@ -80,11 +81,11 @@ function validateMemoryInput(key?: string, value?: string, query?: string, names}/**- * Check if legacy JSON store exists and needs migration+ * Check if legacy JSON store exists in old .claude-flow/memory/ location*/function hasLegacyStore(): boolean {- const legacyPath = getLegacyPath();- const migrationMarker = getMigrationMarkerPath();+ const legacyPath = resolve(join(LEGACY_MEMORY_DIR, LEGACY_MEMORY_FILE));+ const migrationMarker = resolve(join(LEGACY_MEMORY_DIR, MIGRATION_MARKER));return existsSync(legacyPath) && !existsSync(migrationMarker);}@@ -93,9 +94,9 @@ function hasLegacyStore(): boolean {*/function loadLegacyStore(): LegacyMemoryStore | null {try {- const path = getLegacyPath();- if (existsSync(path)) {- const data = readFileSync(path, 'utf-8');+ const legacyPath = resolve(join(LEGACY_MEMORY_DIR, LEGACY_MEMORY_FILE));+ if (existsSync(legacyPath)) {+ const data = readFileSync(legacyPath, 'utf-8');return JSON.parse(data);}} catch {@@ -108,8 +109,9 @@ function loadLegacyStore(): LegacyMemoryStore | null {* Mark migration as complete*/function markMigrationComplete(): void {- ensureMemoryDir();- writeFileSync(getMigrationMarkerPath(), JSON.stringify({+ const legacyDir = resolve(LEGACY_MEMORY_DIR);+ if (!existsSync(legacyDir)) mkdirSync(legacyDir, { recursive: true });+ writeFileSync(resolve(join(LEGACY_MEMORY_DIR, MIGRATION_MARKER)), JSON.stringify({migratedAt: new Date().toISOString(),version: '3.0.0',}), 'utf-8');@@ -141,43 +143,48 @@ async function getMemoryFunctions() {}/**- * Ensure memory database is initialized and migrate legacy data if needed+ * Ensure memory database is initialized and migrate legacy data if needed.+ * #1606: Wrapped in try/catch to prevent process-level crashes that kill+ * the stdio MCP transport on Windows/Codex.*/async function ensureInitialized(): Promise<void> {- const { initializeMemoryDatabase, checkMemoryInitialization, storeEntry } = await getMemoryFunctions();+ try {+ const { initializeMemoryDatabase, checkMemoryInitialization, storeEntry } = await getMemoryFunctions();- // Check if already initialized- const status = await checkMemoryInitialization();- if (!status.initialized) {- await initializeMemoryDatabase({ force: false, verbose: false });- }+ // Check if already initialized+ const status = await checkMemoryInitialization();+ if (!status.initialized) {+ await initializeMemoryDatabase({ force: false, verbose: false });+ }- // Migrate legacy JSON data if exists- if (hasLegacyStore()) {- const legacyStore = loadLegacyStore();- if (legacyStore && Object.keys(legacyStore.entries).length > 0) {- console.error('[MCP Memory] Migrating legacy JSON store to sql.js...');- let migrated = 0;+ // Migrate legacy JSON data if exists (from old .claude-flow/memory/ location)+ if (hasLegacyStore()) {+ const legacyStore = loadLegacyStore();+ if (legacyStore && Object.keys(legacyStore.entries).length > 0) {+ console.error('[MCP Memory] Migrating legacy JSON store to sql.js...');+ let migrated = 0;- for (const [key, entry] of Object.entries(legacyStore.entries)) {- try {- // Convert value to string for storage- const value = typeof entry.value === 'string' ? entry.value : JSON.stringify(entry.value);- await storeEntry({- key,- value,- namespace: 'default',- generateEmbeddingFlag: true,- });- migrated++;- } catch (e) {- console.error(`[MCP Memory] Failed to migrate key "${key}":`, e);+ for (const [key, entry] of Object.entries(legacyStore.entries)) {+ try {+ const value = typeof entry.value === 'string' ? entry.value : JSON.stringify(entry.value);+ await storeEntry({+ key,+ value,+ namespace: 'default',+ generateEmbeddingFlag: true,+ });+ migrated++;+ } catch (e) {+ console.error(`[MCP Memory] Failed to migrate key "${key}":`, e);+ }}- }- console.error(`[MCP Memory] Migrated ${migrated}/${Object.keys(legacyStore.entries).length} entries`);- markMigrationComplete();+ console.error(`[MCP Memory] Migrated ${migrated}/${Object.keys(legacyStore.entries).length} entries`);+ markMigrationComplete();+ }}+ } catch (error) {+ console.error('[MCP Memory] Initialization failed:', error instanceof Error ? error.message : error);}}