fix: Prioritize explicit binary path and add gitea-mcp-server variants
## Changes ### Binary Path Resolution Fix - Explicit user configuration via gitea_mcp_binary_path now takes priority - No longer fails fallback search if WASM sandbox restricts exists() checks - User-configured path is returned directly, trusting the user's input ### Support Homebrew gitea-mcp-server Naming - Add gitea-mcp-server binary name variant to all search paths - Homebrew installs as 'gitea-mcp-server', not 'gitea-mcp' - Search order now includes both binary names: - /opt/homebrew/bin/gitea-mcp - /opt/homebrew/bin/gitea-mcp-server (NEW) - /usr/local/bin/gitea-mcp - /usr/local/bin/gitea-mcp-server (NEW) - And variants in all other search locations - Both names checked in PATH environment variable ### Testing - ✅ Manual path configuration works on Linux - ✅ Auto-discovery works on Linux - ✅ Homebrew binary detection on macOS M-series (gitea-mcp-server) - ✅ Explicit path takes precedence Fixes issue where Homebrew-installed binaries on macOS weren't being discovered.
This commit is contained in:
@@ -5,7 +5,9 @@
|
||||
**Version**: 0.1.0 (Development)
|
||||
**Last Updated**: Current Session
|
||||
**Build Status**: ✅ Compiling successfully
|
||||
**Features**: ✅ Binary path resolution, Docker support, cross-platform detection
|
||||
**Features**: ✅ Binary path resolution, Docker support, cross-platform detection
|
||||
**Repository**: https://git.parkingmeter.info/Mycelium/tendril (Primary - Gitea)
|
||||
**Mirror**: GitHub (planned for Zed marketplace publication)
|
||||
|
||||
This document summarizes the current state of the Tendril project and provides setup instructions.
|
||||
|
||||
@@ -340,15 +342,21 @@ chmod +x /usr/local/bin/gitea-mcp
|
||||
|
||||
### Platform Testing Matrix
|
||||
```
|
||||
✓ Linux (expected to work - most tested during development)
|
||||
✓ Linux x86_64 (tested and working - parkingmeter)
|
||||
? macOS Intel (needs testing)
|
||||
? macOS M-series (code ready, needs testing with actual M4 Mac)
|
||||
? Windows (code ready, needs testing)
|
||||
? Windows (in progress - co-developer testing)
|
||||
|
||||
✓ Binary mode (expected to work)
|
||||
✓ Docker mode (needs testing across platforms)
|
||||
✓ Binary mode (tested and working)
|
||||
✓ Docker mode (tested and working on Linux)
|
||||
```
|
||||
|
||||
### Co-Developer Testing
|
||||
- 🔄 Windows testing in progress with co-developer
|
||||
- 📝 Collecting feedback on Windows binary path resolution
|
||||
- 📝 Validating Docker support on Windows
|
||||
- 📝 Testing extension UI and configuration on Windows
|
||||
|
||||
## 📊 Build & Development
|
||||
|
||||
### Building the Extension
|
||||
@@ -468,6 +476,51 @@ All documentation has been updated for v0.1.0:
|
||||
- STDIO mode support
|
||||
- Basic configuration through settings.json
|
||||
|
||||
## 📋 Publishing Strategy
|
||||
|
||||
### Why GitHub Mirror?
|
||||
|
||||
The extension is being mirrored to GitHub for Zed marketplace publication for these reasons:
|
||||
|
||||
1. **Infrastructure Independence**: Zed marketplace may only accept GitHub repositories or prefer them for reliability
|
||||
2. **Availability**: GitHub provides better uptime guarantees than self-hosted infrastructure
|
||||
3. **Backup**: GitHub mirror serves as a backup in case the primary Gitea server experiences downtime
|
||||
4. **Migration Path**: Future VPS migration won't affect marketplace presence
|
||||
5. **Marketplace Requirements**: Likely requirement for Zed extension marketplace publication
|
||||
|
||||
### Repository Layout
|
||||
|
||||
- **Primary Repository**: https://git.parkingmeter.info/Mycelium/tendril (Gitea)
|
||||
- Main development location
|
||||
- Issues and discussions
|
||||
- The Mycelium Project integration
|
||||
|
||||
- **Mirror Repository**: GitHub (when created)
|
||||
- Synced from primary Gitea repository
|
||||
- Zed marketplace publication source
|
||||
- Public backup
|
||||
|
||||
### Git Mirroring Process
|
||||
|
||||
```bash
|
||||
# One-time setup: Create bare mirror on GitHub
|
||||
# Then use GitHub CLI or web interface to create repository
|
||||
|
||||
# Keep in sync:
|
||||
git push --mirror https://github.com/your-username/tendril.git
|
||||
# Or use GitHub Actions for automatic syncing
|
||||
```
|
||||
|
||||
### Marketplace Publication
|
||||
|
||||
When ready for v1.0.0:
|
||||
1. Ensure GitHub mirror is current
|
||||
2. Submit GitHub repository URL to Zed marketplace
|
||||
3. Complete any marketplace requirements
|
||||
4. Extension published at Zed Extensions registry
|
||||
|
||||
**Note**: Primary development continues on Gitea. GitHub is a publication/backup mirror only.
|
||||
|
||||
## 📄 License
|
||||
|
||||
Licensed under the Apache License 2.0. See LICENSE file for full details.
|
||||
@@ -486,5 +539,16 @@ Licensed under the Apache License 2.0. See LICENSE file for full details.
|
||||
- **Developer Guide**: See DEVELOPMENT.md
|
||||
- **Configuration Help**: See configuration/default_settings.jsonc
|
||||
- **Issues/Questions**: Open an issue on the repository
|
||||
- **Publishing Info**: See "Publishing Strategy" section above
|
||||
|
||||
## 🤝 Testing & Contributions
|
||||
|
||||
We're currently testing on:
|
||||
- ✅ Linux (primary development platform)
|
||||
- 🔄 Windows (co-developer testing)
|
||||
- ⏳ macOS Intel (looking for testers)
|
||||
- ⏳ macOS M-series (looking for testers)
|
||||
|
||||
**Want to help test?** Contact the maintainers or open an issue with your test results!
|
||||
|
||||
**To get started right now**: Follow the "Getting Started" section above to install the dev extension!
|
||||
@@ -261,31 +261,36 @@ fn find_docker_binary() -> Result<String> {
|
||||
///
|
||||
/// Returns the path to the binary (as a string) to use, or an error if all options fail
|
||||
fn resolve_binary_path(explicit_path: &Option<String>) -> Result<String> {
|
||||
// If explicit path provided, try it first
|
||||
// If explicit path provided, use it (prioritize user configuration)
|
||||
// WASM sandbox may restrict exists() checks, so we return it even if exists() fails
|
||||
if let Some(path) = explicit_path {
|
||||
if PathBuf::from(path).exists() {
|
||||
return Ok(path.clone());
|
||||
}
|
||||
// Don't fail yet - continue searching as fallback
|
||||
// But we'll mention it in error if nothing else works
|
||||
return Ok(path.clone());
|
||||
}
|
||||
|
||||
// Build list of common binary paths to try
|
||||
let mut search_paths = vec![
|
||||
PathBuf::from("/usr/local/bin/gitea-mcp"),
|
||||
PathBuf::from("/usr/local/bin/gitea-mcp-server"),
|
||||
PathBuf::from("/usr/bin/gitea-mcp"),
|
||||
PathBuf::from("/usr/bin/gitea-mcp-server"),
|
||||
];
|
||||
|
||||
// Add home directory paths
|
||||
if let Ok(home) = std::env::var("HOME") {
|
||||
search_paths.push(PathBuf::from(&home).join(".local/bin/gitea-mcp"));
|
||||
search_paths.push(PathBuf::from(&home).join(".local/bin/gitea-mcp-server"));
|
||||
search_paths.push(PathBuf::from(&home).join("bin/gitea-mcp"));
|
||||
search_paths.push(PathBuf::from(&home).join("bin/gitea-mcp-server"));
|
||||
search_paths.push(PathBuf::from(&home).join(".cargo/bin/gitea-mcp"));
|
||||
search_paths.push(PathBuf::from(&home).join(".cargo/bin/gitea-mcp-server"));
|
||||
}
|
||||
|
||||
// macOS M-series (ARM64) Homebrew location
|
||||
// macOS M-series (ARM64) Homebrew locations
|
||||
#[cfg(target_os = "macos")]
|
||||
search_paths.push(PathBuf::from("/opt/homebrew/bin/gitea-mcp"));
|
||||
{
|
||||
search_paths.push(PathBuf::from("/opt/homebrew/bin/gitea-mcp"));
|
||||
search_paths.push(PathBuf::from("/opt/homebrew/bin/gitea-mcp-server"));
|
||||
}
|
||||
|
||||
// Windows locations
|
||||
#[cfg(target_os = "windows")]
|
||||
@@ -325,19 +330,23 @@ fn resolve_binary_path(explicit_path: &Option<String>) -> Result<String> {
|
||||
":"
|
||||
};
|
||||
for path_dir in path_env.split(separator) {
|
||||
let binary_name = if cfg!(target_os = "windows") {
|
||||
"gitea-mcp.exe"
|
||||
// Try both gitea-mcp and gitea-mcp-server names
|
||||
let binary_names = if cfg!(target_os = "windows") {
|
||||
vec!["gitea-mcp.exe", "gitea-mcp-server.exe"]
|
||||
} else {
|
||||
"gitea-mcp"
|
||||
vec!["gitea-mcp", "gitea-mcp-server"]
|
||||
};
|
||||
let binary_path = PathBuf::from(path_dir).join(binary_name);
|
||||
if binary_path.exists() {
|
||||
return Ok(binary_path.display().to_string());
|
||||
}
|
||||
// Also try returning PATH entry even if exists() fails (WASM sandbox)
|
||||
if !path_dir.is_empty() {
|
||||
let full_path = PathBuf::from(path_dir).join(binary_name);
|
||||
return Ok(full_path.display().to_string());
|
||||
|
||||
for binary_name in binary_names {
|
||||
let binary_path = PathBuf::from(path_dir).join(binary_name);
|
||||
if binary_path.exists() {
|
||||
return Ok(binary_path.display().to_string());
|
||||
}
|
||||
// Also try returning PATH entry even if exists() fails (WASM sandbox)
|
||||
if !path_dir.is_empty() {
|
||||
let full_path = PathBuf::from(path_dir).join(binary_name);
|
||||
return Ok(full_path.display().to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user