From 400a0020e2b3230f2f6f8d059bf141b094338fdd Mon Sep 17 00:00:00 2001 From: mkorwel Date: Thu, 19 Mar 2026 15:32:55 -0700 Subject: [PATCH] fix(workspaces): correct extension structure and portable script paths --- .../workspaces/gemini-extension.json | 2 +- extensions/workspaces/scripts/setup.ts | 2 +- .../{docs => skills/workspaces}/SKILL.md | 33 +++++++++++++++---- 3 files changed, 28 insertions(+), 9 deletions(-) rename gemini-extension.json => extensions/workspaces/gemini-extension.json (80%) rename extensions/workspaces/{docs => skills/workspaces}/SKILL.md (70%) diff --git a/gemini-extension.json b/extensions/workspaces/gemini-extension.json similarity index 80% rename from gemini-extension.json rename to extensions/workspaces/gemini-extension.json index 4a122b5722..73c54cfa2e 100644 --- a/gemini-extension.json +++ b/extensions/workspaces/gemini-extension.json @@ -7,5 +7,5 @@ "skills": [ "skills/workspaces/SKILL.md" ], - "contextFileName": "extensions/workspaces/docs/GEMINI.md" + "contextFileName": "docs/GEMINI.md" } diff --git a/extensions/workspaces/scripts/setup.ts b/extensions/workspaces/scripts/setup.ts index b10cad32bd..2ebf090546 100644 --- a/extensions/workspaces/scripts/setup.ts +++ b/extensions/workspaces/scripts/setup.ts @@ -7,7 +7,7 @@ import readline from 'readline'; import { ProviderFactory } from './providers/ProviderFactory.ts'; const __dirname = path.dirname(fileURLToPath(import.meta.url)); -const REPO_ROOT = path.resolve(__dirname, '../../../..'); +const REPO_ROOT = process.cwd(); /** * Loads and parses a local .env file from the repository root and the home directory. diff --git a/extensions/workspaces/docs/SKILL.md b/extensions/workspaces/skills/workspaces/SKILL.md similarity index 70% rename from extensions/workspaces/docs/SKILL.md rename to extensions/workspaces/skills/workspaces/SKILL.md index 6f60f551f1..ce63d27dfc 100644 --- a/extensions/workspaces/docs/SKILL.md +++ b/extensions/workspaces/skills/workspaces/SKILL.md @@ -20,17 +20,36 @@ This skill enables the agent to utilize **Gemini Workspaces**—a high-performan - **Environment Isolation**: When you need a clean, high-performance environment to verify a fix without polluting the user's local machine. ### How to use Workspaces -1. **Setup**: If the user hasn't initialized their environment, instruct them to run `npm run workspace:setup`. -2. **Launch**: Use the `workspace` command to start a playbook: +1. **Setup**: If the user hasn't initialized their environment, instruct them to run the setup script: ```bash - npm run workspace [action] + npx tsx extensions/workspaces/scripts/setup.ts + ``` +2. **Launch**: Start a playbook for a specific PR/issue: + ```bash + npx tsx extensions/workspaces/scripts/orchestrator.ts [action] ``` - Actions: `review` (default), `fix`, `ready`. -3. **Check Status**: See global state and active sessions with `npm run workspace:status`, or deep-dive into specific PR logs with `npm run workspace:check `. +3. **Check Status**: See global state and active sessions: + ```bash + npx tsx extensions/workspaces/scripts/status.ts + ``` + Or deep-dive into specific PR logs: + ```bash + npx tsx extensions/workspaces/scripts/check.ts + ``` 4. **Cleanup**: - - **Bulk**: Clear all sessions/worktrees with `npm run workspace:clean-all`. - - **Surgical**: Kill a specific PR task with `npm run workspace:kill `. -5. **Fleet**: Manage VM lifecycle with `npm run workspace:fleet [stop|provision|list]`. + - **Bulk**: Clear all sessions/worktrees: + ```bash + npx tsx extensions/workspaces/scripts/clean.ts --all + ``` + - **Surgical**: Kill a specific PR task: + ```bash + npx tsx extensions/workspaces/scripts/clean.ts + ``` +5. **Fleet**: Manage VM lifecycle: + ```bash + npx tsx extensions/workspaces/scripts/fleet.ts [stop|provision|list] + ``` ## ⚠️ Important Constraints - **Absolute Paths**: Always use absolute paths (e.g., `/mnt/disks/data/...`) when orchestrating remote commands.