diff --git a/ui/desktop/src/bin/jbang b/ui/desktop/src/bin/jbang deleted file mode 100644 index 8748b44db8c3..000000000000 --- a/ui/desktop/src/bin/jbang +++ /dev/null @@ -1,89 +0,0 @@ -#!/bin/bash - -# Enable strict mode to exit on errors and unset variables -set -euo pipefail - -# Set log file -LOG_FILE="/tmp/mcp.log" - -# Clear the log file at the start -> "$LOG_FILE" - -# Function for logging -log() { - local MESSAGE="$1" - echo "$(date +'%Y-%m-%d %H:%M:%S') - $MESSAGE" | tee -a "$LOG_FILE" -} - -# Trap errors and log them before exiting -trap 'log "An error occurred. Exiting with status $?."' ERR - -log "Starting jbang setup script." - -# Ensure ~/.config/goose/mcp-hermit/bin exists -log "Creating directory ~/.config/goose/mcp-hermit/bin if it does not exist." -mkdir -p ~/.config/goose/mcp-hermit/bin - -# Change to the ~/.config/goose/mcp-hermit directory -log "Changing to directory ~/.config/goose/mcp-hermit." -cd ~/.config/goose/mcp-hermit - -# Check if hermit binary exists and download if not -if [ ! -f ~/.config/goose/mcp-hermit/bin/hermit ]; then - log "Hermit binary not found. Downloading hermit binary." - curl -fsSL "https://github.com/cashapp/hermit/releases/download/stable/hermit-$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/amd64/' | sed 's/aarch64/arm64/').gz" \ - | gzip -dc > ~/.config/goose/mcp-hermit/bin/hermit && chmod +x ~/.config/goose/mcp-hermit/bin/hermit - log "Hermit binary downloaded and made executable." -else - log "Hermit binary already exists. Skipping download." -fi - -log "setting hermit cache to be local for MCP servers" -mkdir -p ~/.config/goose/mcp-hermit/cache -export HERMIT_STATE_DIR=~/.config/goose/mcp-hermit/cache - -# Update PATH -export PATH=~/.config/goose/mcp-hermit/bin:$PATH -log "Updated PATH to include ~/.config/goose/mcp-hermit/bin." - -# Initialize hermit -log "Initializing hermit." -hermit init >> "$LOG_FILE" - -# Install OpenJDK using hermit -log "Installing OpenJDK with hermit." -hermit install openjdk@17 >> "$LOG_FILE" - -# Download and install jbang if not present -if [ ! -f ~/.config/goose/mcp-hermit/bin/jbang ]; then - log "Downloading and installing jbang." - curl -Ls https://sh.jbang.dev | bash -s - app setup - cp ~/.jbang/bin/jbang ~/.config/goose/mcp-hermit/bin/ -fi - -# Verify installations -log "Verifying installation locations:" -log "hermit: $(which hermit)" -log "java: $(which java)" -log "jbang: $(which jbang)" - -# Check for custom registry settings -log "Checking for GOOSE_JBANG_REGISTRY environment variable for custom jbang registry setup..." -if [ -n "${GOOSE_JBANG_REGISTRY:-}" ] && curl -s --head --fail "$GOOSE_JBANG_REGISTRY" > /dev/null; then - log "Checking custom goose registry availability: $GOOSE_JBANG_REGISTRY" - log "$GOOSE_JBANG_REGISTRY is accessible. Setting it as JBANG_REPO." - export JBANG_REPO="$GOOSE_JBANG_REGISTRY" -else - log "GOOSE_JBANG_REGISTRY is not set or not accessible. Using default jbang repository." -fi - -# Trust all jbang scripts that a user might install. Without this, Jbang will attempt to -# prompt the user to trust each script. However, Goose does not surfact this modal and without -# user input, the addExtension method will timeout and fail. -jbang --quiet trust add * - -# Final step: Execute jbang with passed arguments, always including --fresh and --quiet -log "Executing 'jbang' command with arguments: $*" -jbang --fresh --quiet "$@" || log "Failed to execute 'jbang' with arguments: $*" - -log "jbang setup script completed successfully." \ No newline at end of file diff --git a/ui/desktop/src/bin/npx b/ui/desktop/src/bin/npx deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/ui/desktop/src/bin/uvx b/ui/desktop/src/bin/uvx deleted file mode 100644 index e69de29bb2d1..000000000000 diff --git a/ui/desktop/src/components/settings/extensions/agent-api.ts b/ui/desktop/src/components/settings/extensions/agent-api.ts index 52fd7744722c..d58a2501b17b 100644 --- a/ui/desktop/src/components/settings/extensions/agent-api.ts +++ b/ui/desktop/src/components/settings/extensions/agent-api.ts @@ -1,7 +1,6 @@ import { ExtensionConfig } from '../../../api/types.gen'; import { getApiUrl, getSecretKey } from '../../../config'; import { toastService, ToastServiceOptions } from '../../../toasts'; -import { replaceWithShims } from './utils'; interface ApiResponse { error?: boolean; @@ -143,10 +142,6 @@ export async function addToAgent( options: ToastServiceOptions = {} ): Promise { try { - if (extension.type === 'stdio') { - extension.cmd = await replaceWithShims(extension.cmd); - } - extension.name = sanitizeName(extension.name); return await extensionApiCall('/extensions/add', extension, options);