diff --git a/.gemini/skills/offload/scripts/entrypoint.ts b/.gemini/skills/offload/scripts/entrypoint.ts index f3f1ba64b4..274cc5121a 100644 --- a/.gemini/skills/offload/scripts/entrypoint.ts +++ b/.gemini/skills/offload/scripts/entrypoint.ts @@ -24,13 +24,9 @@ async function main() { const workDir = process.cwd(); // This is remoteWorkDir as set in review.ts const targetDir = path.join(workDir, branchName); - // Use global tsx or fallback to local + // Use global tools pre-installed in the maintainer image const tsxBin = 'tsx'; - // Gemini bin will be needed by the interactive session later - // We'll try to find it in the main repo or current worktree - const geminiBin = fs.existsSync(path.join(workDir, 'node_modules/.bin/gemini')) - ? path.join(workDir, 'node_modules/.bin/gemini') - : path.join(path.dirname(workDir), 'main/node_modules/.bin/gemini'); + const geminiBin = 'gemini'; const action = process.argv[5] || 'review'; diff --git a/.gemini/skills/offload/scripts/setup.ts b/.gemini/skills/offload/scripts/setup.ts index a187bcd12d..9cd4106fb8 100644 --- a/.gemini/skills/offload/scripts/setup.ts +++ b/.gemini/skills/offload/scripts/setup.ts @@ -174,6 +174,9 @@ This script will: // Wipe existing dir for a clean clone and use absolute paths const cloneCmd = `rm -rf ${remoteWorkDir} && git clone --filter=blob:none ${repoUrl} ${remoteWorkDir} && cd ${remoteWorkDir} && git remote add upstream https://github.com/${upstreamRepo}.git && git fetch upstream`; await provider.exec(cloneCmd); + + console.log('📦 Installing remote dependencies (this may take a few minutes)...'); + await provider.exec(`cd ${remoteWorkDir} && npm ci`); } // Save Settings diff --git a/.gemini/skills/offload/scripts/worker.ts b/.gemini/skills/offload/scripts/worker.ts index 58c3d4bea1..8a5388f3ff 100644 --- a/.gemini/skills/offload/scripts/worker.ts +++ b/.gemini/skills/offload/scripts/worker.ts @@ -39,17 +39,8 @@ export async function runWorker(args: string[]) { process.chdir(targetDir); } - // Find gemini binary (try worktree, then fallback to main repo) - let geminiBin = path.join(targetDir, 'node_modules/.bin/gemini'); - if (!fs.existsSync(geminiBin)) { - geminiBin = path.join(path.dirname(targetDir), 'main/node_modules/.bin/gemini'); - } - - console.log(` - Gemini Bin: ${geminiBin} (Exists: ${fs.existsSync(geminiBin)})`); - if (fs.existsSync(geminiBin)) { - const versionCheck = spawnSync(geminiBin, ['--version'], { stdio: 'pipe' }); - console.log(` - Gemini Version: ${versionCheck.stdout.toString().trim() || 'Error fetching version'}`); - } + // Use global gemini command pre-installed in the maintainer image + const geminiBin = 'gemini'; // 2. Dispatch to Playbook switch (action) {