6.2 KiB
6.2 KiB
Goose Super Powers - Implementation Plan
Vision
Transform Goose into a Super-Powered AI Coding IDE that beats Lovable and computer-use gimmicks by integrating:
- App Preview - Live preview of web apps (like Antigravity)
- Computer Use - Control Windows via GUI automation (Windows-Use)
- Browser Control - Automated web browsing (browser-use)
- Server Management - Remote server control via SSH
Phase 1: App Preview (Priority: HIGH)
Goal
Embed a live web browser/iframe in Goose that can preview HTML/JS/CSS files created by the AI.
Implementation
[NEW] bin/goose-electron-app/preview-panel.js
- Create a preview panel component using Electron's BrowserView/webview
- Hot-reload when files change
- Support for file:// and localhost URLs
- Dev server integration (auto-run npm/vite when needed)
[MODIFY] bin/goose-electron-app/index.html
- Add resizable split-pane layout
- Preview panel on the right side
- Toggle button in header
[MODIFY] bin/goose-electron-app/main.cjs
- IPC handlers for:
preview:load-url- Load URL in previewpreview:load-file- Load HTML filepreview:start-server- Auto-start dev serverpreview:refresh- Refresh preview
Phase 2: Computer Use Integration (Priority: HIGH)
Goal
Allow Goose to control the Windows desktop - click, type, take screenshots, execute commands.
Key Features from Windows-Use/Open-Interface
- Screenshot capture and analysis
- Mouse/keyboard simulation
- Window management (minimize, focus, resize)
- Shell command execution
- UI Automation via accessibility APIs
Implementation
[NEW] bin/goose-electron-app/computer-use.cjs
Module to handle computer control:
captureScreen()- Take screenshot of desktop/windowclick(x, y)- Simulate mouse clicktype(text)- Simulate keyboard inputpressKey(key, modifiers)- Key combinations (Ctrl+C, etc.)moveWindow(title, x, y, w, h)- Window managementrunCommand(cmd)- Execute shell commandsgetActiveWindow()- Get focused window info
Dependencies
robotjsornut.js- Cross-platform mouse/keyboard automationscreenshot-desktop- Screen capture- Native Node.js
child_processfor shell commands
[MODIFY] bin/goose-electron-app/main.cjs
Add IPC handlers:
computer:screenshotcomputer:clickcomputer:typecomputer:run-commandcomputer:get-windows
[MODIFY] bin/goose-electron-app/preload.js
Expose computer-use APIs to renderer
Phase 3: Browser Automation (Priority: MEDIUM)
Goal
Allow Goose to browse the web autonomously - open pages, fill forms, click buttons, extract data.
Key Features from browser-use
- Headless/headed browser control
- Page navigation
- Element interaction (click, type, select)
- Data extraction
- Form filling
- Screenshot of web pages
Implementation
[NEW] bin/goose-electron-app/browser-agent.cjs
Browser automation using Playwright:
openPage(url)- Navigate to URLclickElement(selector)- Click on elementtypeInElement(selector, text)- Type in inputextractText(selector)- Get text contentscreenshot()- Capture pageevaluate(script)- Run JS in page context
Dependencies
playwright- Chromium automation (more reliable than Puppeteer)
Phase 4: Server Management (Priority: MEDIUM)
Goal
Allow Goose to connect to and manage remote servers via SSH.
Features
- SSH connection management
- Remote command execution
- File upload/download (SFTP)
- Log viewing
- Service management (start/stop/restart)
Implementation
[NEW] bin/goose-electron-app/server-manager.cjs
SSH and server management:
connect(host, user, keyPath)- Establish SSH connectionexec(command)- Run remote commandupload(localPath, remotePath)- SFTP uploaddownload(remotePath, localPath)- SFTP downloadlistProcesses()- Get running processestailLog(path)- Stream log file
Dependencies
ssh2- SSH client for Node.js
Phase 5: AI Agent Integration
Goal
Connect all these capabilities to the AI so it can:
- Understand user requests
- Plan multi-step actions
- Execute using computer-use/browser/server APIs
- Verify results via screenshots
- Self-correct if needed
Implementation
[MODIFY] bin/qwen-bridge.mjs
Add tool definitions for the AI:
const TOOLS = [
{
name: 'computer_screenshot',
description: 'Take a screenshot of the desktop',
parameters: {}
},
{
name: 'computer_click',
description: 'Click at screen coordinates',
parameters: { x: 'number', y: 'number' }
},
{
name: 'browser_open',
description: 'Open a URL in the browser',
parameters: { url: 'string' }
},
{
name: 'run_command',
description: 'Execute a shell command',
parameters: { command: 'string' }
},
// ... more tools
];
UI Enhancements
New Header Action Buttons
- 🖼️ Preview - Toggle app preview panel
- 🖥️ Computer - Show computer-use actions
- 🌐 Browser - Browser automation panel
- 🔗 Server - Server connection manager
Action Modals
- Computer Use modal with screenshot display
- Browser automation with page preview
- Server terminal with command history
Verification Plan
Phase 1 Testing
- Create an HTML file via chat
- Click Preview button
- Verify file renders in preview panel
Phase 2 Testing
- Ask "open notepad"
- Verify Goose takes screenshot, finds notepad, clicks
- Ask "type hello world"
- Verify text appears in notepad
Phase 3 Testing
- Ask "go to google.com and search for weather"
- Verify browser opens, navigates, searches
Phase 4 Testing
- Connect to SSH server
- Run remote command
- Verify output displayed
Dependencies to Install
cd bin/goose-electron-app
npm install robotjs screenshot-desktop playwright ssh2
Risk Assessment
- robotjs may require native build tools (node-gyp)
- Playwright downloads Chromium (~200MB)
- SSH2 may have security implications (store credentials securely)
Immediate Next Steps
- Start with App Preview - Most impactful, lowest risk
- Add preview panel to Electron app
- Test with simple HTML file
- Then add computer-use features