-
Notifications
You must be signed in to change notification settings - Fork 2.3k
[draft] [feat] new shell driven extension #5862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is an experiment that could replace developer. It didn't work a year ago, but LLMs have come a long way and want to test some now very old assumptions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR introduces a new ShellServer MCP extension that provides shell command execution, code analysis, and image processing capabilities. It's an experimental alternative to the DeveloperServer that takes a shell-first approach to file operations. The implementation reuses existing components from the developer module (like CodeAnalyzer and shell utilities) while providing a simplified API focused on shell commands.
- Adds new
ShellServerMCP server with shell command execution, code analysis, and image processing tools - Integrates
ShellServerinto CLI and server runners with bash environment configuration support - Makes developer shell utilities public for reuse by the new shell server
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/goose-mcp/src/shell/mod.rs | New 837-line implementation of ShellServer with shell execution, analyze tool, and image processing |
| crates/goose-mcp/src/lib.rs | Exports new ShellServer module publicly |
| crates/goose-mcp/src/mcp_server_runner.rs | Adds Shell command to McpCommand enum |
| crates/goose-server/src/main.rs | Wires up ShellServer with bash_env configuration in server entry point |
| crates/goose-cli/src/cli.rs | Adds Shell command handling to CLI |
| crates/goose-mcp/src/developer/mod.rs | Makes shell module public for reuse |
| crates/goose-mcp/Cargo.toml | Adds dirs 6.0.0 dependency (appears unused) |
| Cargo.lock | Updates lockfile with dirs 6.0.0 and transitive dependencies |
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
| if let Some(captures) = regex::Regex::new(r"^Screenshot \d{4}-\d{2}-\d{2} at \d{1,2}\.\d{2}\.\d{2} (AM|PM|am|pm)(?: \(\d+\))?\.png$") | ||
| .ok() | ||
| .and_then(|re| re.captures(filename)) |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The regex is compiled on every call to normalize_mac_screenshot_path. Consider using once_cell::sync::Lazy or std::sync::OnceLock to compile it once and reuse across calls for better performance.
| mpatch = "=0.2.0" | ||
| tokio-util = "0.7.16" | ||
| clap = { version = "4", features = ["derive"] } | ||
| dirs = "6.0.0" |
Copilot
AI
Nov 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The dirs = "6.0.0" dependency appears to be unused in this crate. No use dirs or dirs:: references were found in the goose-mcp source code. Consider removing this dependency.
| dirs = "6.0.0" |
|
nice @baxen worth while trying this with something like tbench - what is best way to stretch its wings? |
| .await? | ||
| } | ||
| McpCommand::Shell => { | ||
| let bash_env = Paths::config_dir().join(".bash_env"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are also trying to make it work with users preferred shell - zsh for example
|
closing this but keepign branch so we can try to bring it back when code-mode is more mainstream |
Summary
This is an experiment that could replace developer. It didn't work a year ago, but LLMs have come a long way and want to test some now very old assumptions
Type of Change
AI Assistance