diff --git a/plugins/ruflo-cost-tracker/scripts/budget.mjs b/plugins/ruflo-cost-tracker/scripts/budget.mjs index f90c0c3225..8553388ef4 100755 --- a/plugins/ruflo-cost-tracker/scripts/budget.mjs +++ b/plugins/ruflo-cost-tracker/scripts/budget.mjs @@ -36,7 +36,7 @@ function memoryStore(key, value) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'store', '--namespace', NS, '--key', stamped, '--value', JSON.stringify(value), - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) throw new Error(`memory store failed: ${r.stderr?.slice(0, 200) || r.status}`); // The "current pointer" is found at retrieval time by listing all // budget-config-* keys and picking the lexicographically-largest @@ -46,7 +46,7 @@ function memoryStore(key, value) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'store', '--namespace', NS, '--key', key, '--value', JSON.stringify(value), - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) throw new Error(`memory store failed: ${r.stderr?.slice(0, 200) || r.status}`); } @@ -54,7 +54,7 @@ function memoryRetrieveOne(key) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'retrieve', '--namespace', NS, '--key', key, - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return null; const m = /\{[\s\S]*\}/.exec(r.stdout || ''); if (!m) return null; @@ -67,7 +67,7 @@ function memoryRetrieve(key) { const list = spawnSync('npx', [ CLI_PKG, 'memory', 'list', '--namespace', NS, '--format', 'json', - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (list.status !== 0) return null; const m = /\[[\s\S]*\]/.exec(list.stdout || ''); if (!m) return null; @@ -92,7 +92,7 @@ function memoryListSessionRecords() { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'list', '--namespace', NS, '--format', 'json', - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return []; // CLI may emit a small banner before the JSON array; extract the first '['..']' block. const m = /\[[\s\S]*\]/.exec(r.stdout || ''); diff --git a/plugins/ruflo-cost-tracker/scripts/conversation.mjs b/plugins/ruflo-cost-tracker/scripts/conversation.mjs index f714ba5769..fb3f3bf4a8 100755 --- a/plugins/ruflo-cost-tracker/scripts/conversation.mjs +++ b/plugins/ruflo-cost-tracker/scripts/conversation.mjs @@ -23,7 +23,7 @@ function memoryListSessionKeys() { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'list', '--namespace', NS, '--format', 'json', - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return []; const m = /\[[\s\S]*\]/.exec(r.stdout || ''); if (!m) return []; @@ -38,7 +38,7 @@ function memoryRetrieve(key) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'retrieve', '--namespace', NS, '--key', key, - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return null; const m = /\{[\s\S]*\}/.exec(r.stdout || ''); if (!m) return null; diff --git a/plugins/ruflo-cost-tracker/scripts/export.mjs b/plugins/ruflo-cost-tracker/scripts/export.mjs index 1d92c6ed57..25f214ce36 100755 --- a/plugins/ruflo-cost-tracker/scripts/export.mjs +++ b/plugins/ruflo-cost-tracker/scripts/export.mjs @@ -28,7 +28,7 @@ function memoryListKeys() { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'list', '--namespace', NS, '--format', 'json', - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return []; const m = /\[[\s\S]*\]/.exec(r.stdout || ''); if (!m) return []; @@ -38,7 +38,7 @@ function memoryRetrieve(key) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'retrieve', '--namespace', NS, '--key', key, - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return null; const m = /\{[\s\S]*\}/.exec(r.stdout || ''); if (!m) return null; diff --git a/plugins/ruflo-cost-tracker/scripts/federation.mjs b/plugins/ruflo-cost-tracker/scripts/federation.mjs index 946edef1d5..58e6b9ed88 100755 --- a/plugins/ruflo-cost-tracker/scripts/federation.mjs +++ b/plugins/ruflo-cost-tracker/scripts/federation.mjs @@ -31,7 +31,7 @@ function memoryList() { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'list', '--namespace', NS, '--format', 'json', - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return []; const m = /\[[\s\S]*\]/.exec(r.stdout || ''); if (!m) return []; @@ -41,7 +41,7 @@ function memoryRetrieve(key) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'retrieve', '--namespace', NS, '--key', key, - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return null; const m = /\{[\s\S]*\}/.exec(r.stdout || ''); if (!m) return null; diff --git a/plugins/ruflo-cost-tracker/scripts/outcome.mjs b/plugins/ruflo-cost-tracker/scripts/outcome.mjs index cb17ccab74..27213cef27 100755 --- a/plugins/ruflo-cost-tracker/scripts/outcome.mjs +++ b/plugins/ruflo-cost-tracker/scripts/outcome.mjs @@ -33,7 +33,7 @@ function main() { const r = spawnSync('npx', [ '@claude-flow/cli@latest', 'hooks', 'model-outcome', '-t', task, '-m', model, '-o', outcome, - ], { stdio: 'inherit' }); + ], { stdio: 'inherit', shell: process.platform === 'win32' }); if (r.status !== 0) { console.error(`emit failed (exit ${r.status})`); process.exit(r.status || 1); diff --git a/plugins/ruflo-cost-tracker/scripts/summary.mjs b/plugins/ruflo-cost-tracker/scripts/summary.mjs index 4680f6233e..a12cfabccc 100755 --- a/plugins/ruflo-cost-tracker/scripts/summary.mjs +++ b/plugins/ruflo-cost-tracker/scripts/summary.mjs @@ -36,7 +36,7 @@ function memoryListKeys(ns) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'list', '--namespace', ns, '--format', 'json', - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return []; const m = /\[[\s\S]*\]/.exec(r.stdout || ''); if (!m) return []; @@ -46,7 +46,7 @@ function memoryRetrieve(ns, key) { const r = spawnSync('npx', [ CLI_PKG, 'memory', 'retrieve', '--namespace', ns, '--key', key, - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) return null; const m = /\{[\s\S]*\}/.exec(r.stdout || ''); if (!m) return null; diff --git a/plugins/ruflo-cost-tracker/scripts/track.mjs b/plugins/ruflo-cost-tracker/scripts/track.mjs index c71593b69d..73697a7440 100755 --- a/plugins/ruflo-cost-tracker/scripts/track.mjs +++ b/plugins/ruflo-cost-tracker/scripts/track.mjs @@ -132,7 +132,7 @@ function persistToMemory(summary) { '--namespace', ns, '--key', key, '--value', JSON.stringify(summary), - ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8' }); + ], { stdio: ['ignore', 'pipe', 'pipe'], encoding: 'utf-8', shell: process.platform === 'win32' }); if (r.status !== 0) { return { ok: false, reason: r.stderr?.slice(0, 300) || `exit ${r.status}` }; }