Implement sudo support across terminal environments
- Added support for sudo commands in local, Docker, Singularity, and SSH environments by introducing the `SUDO_PASSWORD` environment variable. - Updated terminal tool configurations in `.env.example` and `cli-config.yaml.example` to document the new sudo functionality. - Enhanced the command execution process to handle sudo commands gracefully, preventing hangs on interactive prompts and providing clear error messages when no password is configured. - Updated `README.md` to include instructions for using sudo support and SSH backend configuration. - Revised `TODO.md` to reflect the completion of the sudo feature and outline future enhancements.
This commit is contained in:
137
.env.example
137
.env.example
@@ -2,132 +2,17 @@
|
||||
# Copy this file to .env and fill in your API keys
|
||||
|
||||
# =============================================================================
|
||||
# LLM PROVIDER (OpenRouter)
|
||||
# SUDO SUPPORT (works with ALL terminal backends)
|
||||
# =============================================================================
|
||||
# OpenRouter provides access to many models through one API
|
||||
# All LLM calls go through OpenRouter - no direct provider keys needed
|
||||
# Get your key at: https://openrouter.ai/keys
|
||||
OPENROUTER_API_KEY=
|
||||
|
||||
# Default model to use (OpenRouter format: provider/model)
|
||||
# Examples: anthropic/claude-sonnet-4, openai/gpt-4o, google/gemini-2.0-flash, zhipuai/glm-4-plus
|
||||
LLM_MODEL=anthropic/claude-sonnet-4
|
||||
|
||||
# =============================================================================
|
||||
# TOOL API KEYS
|
||||
# =============================================================================
|
||||
|
||||
# Firecrawl API Key - Web search, extract, and crawl
|
||||
# Get at: https://firecrawl.dev/
|
||||
FIRECRAWL_API_KEY=
|
||||
|
||||
# Nous Research API Key - Vision analysis and multi-model reasoning
|
||||
# Get at: https://inference-api.nousresearch.com/
|
||||
NOUS_API_KEY=
|
||||
|
||||
# FAL.ai API Key - Image generation
|
||||
# Get at: https://fal.ai/
|
||||
FAL_KEY=
|
||||
|
||||
# =============================================================================
|
||||
# TERMINAL TOOL CONFIGURATION
|
||||
# =============================================================================
|
||||
# Backend type: "local", "singularity", "docker", or "modal"
|
||||
# Uncomment ONE configuration block below based on your preferred backend.
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# OPTION 1: Singularity/Apptainer (RECOMMENDED for HPC clusters)
|
||||
# - No root required, common on shared systems
|
||||
# - Auto-builds and caches SIF images from docker:// URLs
|
||||
# - Uses /scratch if available, otherwise /tmp
|
||||
# -----------------------------------------------------------------------------
|
||||
TERMINAL_ENV=singularity
|
||||
TERMINAL_SINGULARITY_IMAGE=docker://nikolaik/python-nodejs:python3.11-nodejs20
|
||||
TERMINAL_CWD=/workspace
|
||||
TERMINAL_TIMEOUT=60
|
||||
# Optional: Override scratch directory (auto-detects /scratch or /tmp)
|
||||
# TERMINAL_SCRATCH_DIR=/scratch/myuser/hermes
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# OPTION 2: Local execution (FASTEST, but no isolation)
|
||||
# - Runs directly on your machine
|
||||
# - No containers, no setup required
|
||||
# - WARNING: Commands run with your user permissions
|
||||
# -----------------------------------------------------------------------------
|
||||
# TERMINAL_ENV=local
|
||||
# TERMINAL_CWD=/tmp
|
||||
# TERMINAL_TIMEOUT=60
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# OPTION 3: Docker (good isolation, requires Docker)
|
||||
# - Requires Docker installed and user in 'docker' group
|
||||
# - Each task gets an isolated container
|
||||
# -----------------------------------------------------------------------------
|
||||
# TERMINAL_ENV=docker
|
||||
# TERMINAL_DOCKER_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20
|
||||
# TERMINAL_CWD=/workspace
|
||||
# TERMINAL_TIMEOUT=60
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# OPTION 4: Modal (cloud execution, scalable)
|
||||
# - Requires Modal account: pip install modal && modal setup
|
||||
# - Runs in Modal's cloud sandboxes
|
||||
# - Good for scaling to many parallel workers
|
||||
# -----------------------------------------------------------------------------
|
||||
# TERMINAL_ENV=modal
|
||||
# TERMINAL_MODAL_IMAGE=nikolaik/python-nodejs:python3.11-nodejs20
|
||||
# TERMINAL_CWD=/workspace
|
||||
# TERMINAL_TIMEOUT=60
|
||||
|
||||
# Common settings for all backends
|
||||
TERMINAL_LIFETIME_SECONDS=300
|
||||
TERMINAL_DISK_WARNING_GB=500
|
||||
|
||||
# =============================================================================
|
||||
# BROWSER TOOL CONFIGURATION (agent-browser + Browserbase)
|
||||
# =============================================================================
|
||||
# Browser automation requires Browserbase cloud service for remote browser execution.
|
||||
# This allows the agent to navigate websites, fill forms, and extract information.
|
||||
# If set, enables sudo commands by piping password via `sudo -S`.
|
||||
# Works with: local, docker, singularity, modal, and ssh backends.
|
||||
#
|
||||
# SECURITY WARNING: Password stored in plaintext. Only use on trusted machines.
|
||||
#
|
||||
# ALTERNATIVES:
|
||||
# - For SSH backend: Configure passwordless sudo on the remote server
|
||||
# - For containers: Run as root inside the container (no sudo needed)
|
||||
# - For local: Configure /etc/sudoers for specific commands
|
||||
#
|
||||
# STEALTH MODES:
|
||||
# - Basic Stealth: ALWAYS active (random fingerprints, auto CAPTCHA solving)
|
||||
# - Advanced Stealth: Requires BROWSERBASE_ADVANCED_STEALTH=true (Scale Plan only)
|
||||
# SUDO_PASSWORD=your_password_here
|
||||
|
||||
# Browserbase API Key - Cloud browser execution
|
||||
# Get at: https://browserbase.com/
|
||||
BROWSERBASE_API_KEY=
|
||||
|
||||
# Browserbase Project ID - From your Browserbase dashboard
|
||||
BROWSERBASE_PROJECT_ID=
|
||||
|
||||
# Enable residential proxies for better CAPTCHA solving (default: true)
|
||||
BROWSERBASE_PROXIES=true
|
||||
|
||||
# Enable advanced stealth mode (default: false, requires Scale Plan)
|
||||
BROWSERBASE_ADVANCED_STEALTH=false
|
||||
|
||||
# Browser session timeout in seconds - Browserbase session duration (default: 300)
|
||||
BROWSER_SESSION_TIMEOUT=300
|
||||
|
||||
# Browser inactivity timeout in seconds - auto-cleanup inactive sessions (default: 120)
|
||||
BROWSER_INACTIVITY_TIMEOUT=120
|
||||
|
||||
# =============================================================================
|
||||
# LEGACY/OPTIONAL
|
||||
# =============================================================================
|
||||
|
||||
# Morph API Key - For legacy Hecate terminal backend
|
||||
# Get at: https://morph.so/
|
||||
# MORPH_API_KEY=
|
||||
|
||||
# Hecate VM Settings (only if using terminal-hecate tool)
|
||||
# HECATE_VM_LIFETIME_SECONDS=300
|
||||
# HECATE_DEFAULT_SNAPSHOT_ID=snapshot_p5294qxt
|
||||
|
||||
# =============================================================================
|
||||
# DEBUG OPTIONS
|
||||
# =============================================================================
|
||||
WEB_TOOLS_DEBUG=false
|
||||
VISION_TOOLS_DEBUG=false
|
||||
MOA_TOOLS_DEBUG=false
|
||||
IMAGE_TOOLS_DEBUG=false
|
||||
|
||||
Reference in New Issue
Block a user