From 3fcbccd24df29bc9602492c8c8551333213fe82b Mon Sep 17 00:00:00 2001 From: Viktor Nagy <126671+nagyv@users.noreply.github.com> Date: Fri, 1 Aug 2025 09:14:16 +0200 Subject: [PATCH 1/2] Fixes unused import alias Fixes #534 The file refers to `execSync` extensively, but it's actually not available as it got imported under the alias `execSyncOriginal` Btw, `execSyncOriginal` is never used in the file. --- src/cli/simple-commands/init/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/simple-commands/init/index.js b/src/cli/simple-commands/init/index.js index 0302d965d2..3d36b6d850 100644 --- a/src/cli/simple-commands/init/index.js +++ b/src/cli/simple-commands/init/index.js @@ -2,7 +2,7 @@ import { printSuccess, printError, printWarning, exit } from '../../utils.js'; import { existsSync } from 'fs'; import process from 'process'; -import { spawn, execSync as execSyncOriginal } from 'child_process'; +import { spawn, execSync } from 'child_process'; import { promisify } from 'util'; // Helper to replace Deno.Command From f9f8b5b68ff586c855032fd090c6afcbc3a7924b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3n=20Levy?= Date: Mon, 4 Aug 2025 23:40:01 +0000 Subject: [PATCH 2/2] fix(session): fix missing promise for db session --- src/cli/commands/hive-mind/pause.ts | 2 +- src/cli/commands/hive-mind/stop.ts | 2 +- src/cli/simple-commands/hive-mind.js | 4 ++-- src/cli/simple-commands/hive-mind/session-manager.js | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cli/commands/hive-mind/pause.ts b/src/cli/commands/hive-mind/pause.ts index 0ebc10c65f..d004c4df21 100644 --- a/src/cli/commands/hive-mind/pause.ts +++ b/src/cli/commands/hive-mind/pause.ts @@ -20,7 +20,7 @@ export const pauseCommand = new Command('pause') if (options.session) { // Pause specific session const sessionId = options.session; - const session = sessionManager.getSession(sessionId); + const session = await sessionManager.getSession(sessionId); if (!session) { console.log(chalk.red(`Session ${sessionId} not found`)); diff --git a/src/cli/commands/hive-mind/stop.ts b/src/cli/commands/hive-mind/stop.ts index cc2853ffca..b54b470b8a 100644 --- a/src/cli/commands/hive-mind/stop.ts +++ b/src/cli/commands/hive-mind/stop.ts @@ -54,7 +54,7 @@ export const stopCommand = new Command('stop') } else if (options.session) { // Stop specific session const sessionId = options.session; - const session = sessionManager.getSession(sessionId); + const session = await sessionManager.getSession(sessionId); if (!session) { console.log(chalk.red(`Session ${sessionId} not found`)); diff --git a/src/cli/simple-commands/hive-mind.js b/src/cli/simple-commands/hive-mind.js index e49076e909..a4bbba1e58 100644 --- a/src/cli/simple-commands/hive-mind.js +++ b/src/cli/simple-commands/hive-mind.js @@ -2536,7 +2536,7 @@ async function resumeSession(args, flags) { const sessionManager = new HiveMindSessionManager(); // Get session details - const session = sessionManager.getSession(sessionId); + const session = await sessionManager.getSession(sessionId); if (!session) { spinner.fail(`Session ${sessionId} not found`); @@ -2640,7 +2640,7 @@ async function stopSession(args, flags) { const sessionManager = new HiveMindSessionManager(); // Get session details - const session = sessionManager.getSession(sessionId); + const session = await sessionManager.getSession(sessionId); if (!session) { spinner.fail(`Session ${sessionId} not found`); diff --git a/src/cli/simple-commands/hive-mind/session-manager.js b/src/cli/simple-commands/hive-mind/session-manager.js index fcd6206abb..022195ac02 100644 --- a/src/cli/simple-commands/hive-mind/session-manager.js +++ b/src/cli/simple-commands/hive-mind/session-manager.js @@ -500,7 +500,7 @@ To enable persistence, see: https://github.com/ruvnet/claude-code-flow/docs/wind * Resume any previous session (paused, stopped, or inactive) */ async resumeSession(sessionId) { - const session = this.getSession(sessionId); + const session = await this.getSession(sessionId); if (!session) { throw new Error(`Session ${sessionId} not found`);