mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
487f5cd243
GOOSE-2, GOOSE-3, GOOSE-4: Backend infrastructure for background processes ## What's New ### Shell Tool Enhancement (GOOSE-3) - Added `background: Option<bool>` parameter to ShellParams - When `background: true`, command spawns and returns immediately with process ID - Agent loop can continue processing new messages while process runs ### Background Process Tracking (GOOSE-2) - New `BackgroundProcess` struct with id, command, pid, status, output buffer - `BackgroundProcessStatus` enum: Running, Completed, Failed, Cancelled - Ring buffer (1000 lines) captures stdout/stderr for later retrieval - Real-time output streaming via notify_logging_message ### Process Management Tools (GOOSE-4) - `list_background_processes`: Shows all tracked processes with status/runtime - `get_background_process_output`: Retrieves last N lines from output buffer - `stop_background_process`: Sends SIGTERM to terminate running process ## Why This Matters This solves the core UX issue where long-running commands (npm run dev, etc.) block the chat. Now Goose can: 1. Start a dev server with `background: true` 2. Return immediately with process ID 3. Continue processing new user messages 4. User can check/stop the process later ## Files Changed - crates/goose-mcp/Cargo.toml (added uuid dependency) - crates/goose-mcp/src/developer/rmcp_developer.rs (main implementation) ## Testing All 182 existing tests pass. Background process functionality ready for integration testing with the desktop app.