From 70a51ba711faedb8d59251229cb6d83a0bf12903 Mon Sep 17 00:00:00 2001 From: "jason.woltje" Date: Fri, 3 Apr 2026 02:28:07 +0000 Subject: [PATCH] fix: all CLI script resolution uses bundled-first resolveTool() (#362) --- packages/cli/package.json | 2 +- packages/cli/src/commands/launch.ts | 26 +++++++++++++++----------- packages/mosaic/package.json | 2 +- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/packages/cli/package.json b/packages/cli/package.json index ceb5e2a..15bd207 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@mosaic/cli", - "version": "0.0.7", + "version": "0.0.8", "type": "module", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/cli/src/commands/launch.ts b/packages/cli/src/commands/launch.ts index bb48d81..1c8a57c 100644 --- a/packages/cli/src/commands/launch.ts +++ b/packages/cli/src/commands/launch.ts @@ -68,7 +68,7 @@ function checkSoul(): void { } // Fallback: legacy bash mosaic-init - const initBin = join(MOSAIC_HOME, 'tools', '_scripts', 'mosaic-init'); + const initBin = fwScript('mosaic-init'); if (existsSync(initBin)) { spawnSync(initBin, [], { stdio: 'inherit' }); } else { @@ -79,7 +79,7 @@ function checkSoul(): void { } function checkSequentialThinking(runtime: string): void { - const checker = join(MOSAIC_HOME, 'tools', '_scripts', 'mosaic-ensure-sequential-thinking'); + const checker = fwScript('mosaic-ensure-sequential-thinking'); if (!existsSync(checker)) return; // Skip if checker doesn't exist const result = spawnSync(checker, ['--check', '--runtime', runtime], { stdio: 'ignore' }); if (result.status !== 0) { @@ -493,24 +493,28 @@ function delegateToScript(scriptPath: string, args: string[], env?: Record