mirror of
https://github.com/OpenRouterTeam/spawn.git
synced 2026-05-04 23:00:20 +00:00
* feat: add CloudSigma cloud provider Add CloudSigma as a new cloud provider with API-first architecture: - Create cloudsigma/lib/common.sh with HTTP Basic Auth support - Implement cloudsigma/claude.sh and cloudsigma/aider.sh agent scripts - Add CloudSigma to manifest.json (38th cloud provider) - Add matrix entries for all 15 agents (2 implemented, 13 missing) - Update test/record.sh with CloudSigma endpoints and auth handling - Update test/mock.sh with URL-stripping for CloudSigma API - Add cloudsigma/README.md with usage documentation CloudSigma features: - API v2.0 with HTTP Basic Auth (email:password) - Regions: ZRH (Zurich), WDC (Washington DC), LVS (Las Vegas) - Granular resource control (CPU/RAM/Disk independently configurable) - Ubuntu 24.04 cloned from public library drives - SSH access via cloudsigma user - Pay-as-you-go pricing starting at ~$14/month Agent: cloud-scout Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: address security review comments for CloudSigma provider - [CRITICAL] Fix command injection in credential saving: use sys.argv instead of raw shell interpolation in Python strings - [CRITICAL] Fix shell injection in create_cloudsigma_drive: pass name and size via sys.argv instead of inline interpolation - [CRITICAL] Fix shell injection in SSH key fingerprint lookups: pass fingerprint via sys.argv - [HIGH] Replace hardcoded VNC password with random generation via openssl rand -hex 8 - [MEDIUM] Fix config file path injection: pass via sys.argv Agent: pr-maintainer Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: B (Discovery Team) <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
47 lines
1.5 KiB
Bash
47 lines
1.5 KiB
Bash
#!/bin/bash
|
|
set -eo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" 2>/dev/null && pwd)"
|
|
# shellcheck source=cloudsigma/lib/common.sh
|
|
if [[ -f "${SCRIPT_DIR}/lib/common.sh" ]]; then
|
|
source "${SCRIPT_DIR}/lib/common.sh"
|
|
else
|
|
eval "$(curl -fsSL https://raw.githubusercontent.com/OpenRouterTeam/spawn/main/cloudsigma/lib/common.sh)"
|
|
fi
|
|
|
|
log_info "Aider on CloudSigma"
|
|
echo ""
|
|
|
|
ensure_cloudsigma_credentials
|
|
ensure_ssh_key
|
|
|
|
SERVER_NAME=$(get_server_name)
|
|
create_server "${SERVER_NAME}"
|
|
verify_server_connectivity "${CLOUDSIGMA_SERVER_IP}"
|
|
wait_for_cloud_init "${CLOUDSIGMA_SERVER_IP}" 60
|
|
|
|
log_step "Installing Aider..."
|
|
run_server "${CLOUDSIGMA_SERVER_IP}" "pip3 install --user aider-chat"
|
|
|
|
echo ""
|
|
if [[ -n "${OPENROUTER_API_KEY:-}" ]]; then
|
|
log_info "Using OpenRouter API key from environment"
|
|
else
|
|
OPENROUTER_API_KEY=$(get_openrouter_api_key_oauth 5181)
|
|
fi
|
|
|
|
log_step "Setting up environment variables..."
|
|
inject_env_vars_ssh "${CLOUDSIGMA_SERVER_IP}" upload_file run_server \
|
|
"OPENROUTER_API_KEY=${OPENROUTER_API_KEY}" \
|
|
"OPENAI_API_BASE=https://openrouter.ai/api/v1" \
|
|
"OPENAI_API_KEY=${OPENROUTER_API_KEY}"
|
|
|
|
echo ""
|
|
log_info "CloudSigma instance setup completed successfully!"
|
|
log_info "Server: ${SERVER_NAME} (UUID: ${CLOUDSIGMA_SERVER_UUID}, IP: ${CLOUDSIGMA_SERVER_IP})"
|
|
echo ""
|
|
|
|
log_step "Starting Aider..."
|
|
sleep 1
|
|
clear
|
|
interactive_session "${CLOUDSIGMA_SERVER_IP}" "export PATH=\$HOME/.local/bin:\$PATH && aider --model openrouter/anthropic/claude-sonnet-4.5"
|