@kokorolx/ai-sandbox-wrapper 3.1.1 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/ai-run CHANGED
@@ -43,7 +43,7 @@ Examples:
43
43
  ai-run opencode web -e 4096 # Run OpenCode web with port exposed
44
44
  ai-run opencode web -p secret # Run with password
45
45
  ai-run opencode --shell # Start shell, run tool manually
46
- # ai-run aider -n mynetwork # Connect to Docker network
46
+ ai-run aider -n mynetwork # Connect to Docker network
47
47
  ai-run opencode --git-fetch # Git fetch only (no push)
48
48
 
49
49
  Documentation: https://github.com/kokorolx/ai-sandbox-wrapper
@@ -663,26 +663,26 @@ done < "$WORKSPACES_FILE"
663
663
  # Maps tool name to space-separated config paths (relative to $HOME)
664
664
  get_tool_configs() {
665
665
  case "$1" in
666
- # amp) echo ".config/amp .local/share/amp" ;;
666
+ amp) echo ".config/amp .local/share/amp" ;;
667
667
  opencode) echo ".config/opencode .local/share/opencode" ;;
668
668
  claude) echo ".claude" ;;
669
- # openclaw) echo ".openclaw" ;;
670
- # droid) echo ".config/droid" ;;
671
- # qoder) echo ".config/qoder" ;;
672
- # auggie) echo ".config/auggie" ;;
673
- # codebuddy) echo ".config/codebuddy" ;;
674
- # jules) echo ".config/jules" ;;
675
- # shai) echo ".config/shai" ;;
676
- # gemini) echo ".config/gemini" ;;
677
- # aider) echo ".config/aider .aider" ;;
678
- # kilo) echo ".config/kilo" ;;
669
+ openclaw) echo ".openclaw" ;;
670
+ droid) echo ".config/droid" ;;
671
+ qoder) echo ".config/qoder" ;;
672
+ auggie) echo ".config/auggie" ;;
673
+ codebuddy) echo ".config/codebuddy" ;;
674
+ jules) echo ".config/jules" ;;
675
+ shai) echo ".config/shai" ;;
676
+ gemini) echo ".config/gemini" ;;
677
+ aider) echo ".config/aider .aider" ;;
678
+ kilo) echo ".config/kilo" ;;
679
679
  codex) echo ".config/codex" ;;
680
- # qwen) echo ".config/qwen" ;;
680
+ qwen) echo ".config/qwen" ;;
681
681
  esac
682
682
  }
683
683
 
684
684
  # All known tools (for fallback)
685
- ALL_KNOWN_TOOLS="opencode claude codex"
685
+ ALL_KNOWN_TOOLS="amp opencode claude openclaw droid qoder auggie codebuddy jules shai gemini aider kilo codex qwen"
686
686
 
687
687
  # Get list of installed tools from config.json, fallback to all known tools
688
688
  get_installed_tools() {
@@ -2441,7 +2441,7 @@ elif [[ "$SHELL_MODE" == "true" || -z "$TOOL" ]]; then
2441
2441
  # Shell mode without tool (ai-run with no args)
2442
2442
  DOCKER_COMMAND=(
2443
2443
  "-c"
2444
- "echo ''; echo '🚀 AI Sandbox - Interactive Shell'; echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'; echo ''; echo 'Installed tools: ${INSTALLED_TOOLS_MSG:-unknown}'; echo ''; echo 'Run any tool by name: claude, opencode, codex, etc.'; echo 'Exit: exit or Ctrl+D'; echo ''; echo 'Enhancement tools: specify, uipro, openspec, rtk'; echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'; echo ''; exec bash"
2444
+ "echo ''; echo '🚀 AI Sandbox - Interactive Shell'; echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'; echo ''; echo 'Installed tools: ${INSTALLED_TOOLS_MSG:-unknown}'; echo ''; echo 'Run any tool by name: claude, opencode, gemini, etc.'; echo 'Exit: exit or Ctrl+D'; echo ''; echo 'Enhancement tools: specify, uipro, openspec, rtk'; echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'; echo ''; exec bash"
2445
2445
  )
2446
2446
  fi
2447
2447
  else
@@ -2479,7 +2479,7 @@ if [[ -z "$PLATFORM" ]]; then
2479
2479
  esac
2480
2480
  fi
2481
2481
 
2482
- # Terminal size for TUI apps (important for opencode, etc.)
2482
+ # Terminal size for TUI apps (important for opencode, aider, etc.)
2483
2483
  TERMINAL_SIZE=""
2484
2484
  if [[ -n "$TTY_FLAGS" ]]; then
2485
2485
  # Get current terminal size
@@ -2521,65 +2521,65 @@ DISPLAY_FLAGS=$(detect_display_config)
2521
2521
  # ============================================================================
2522
2522
  # OPENCLAW DOCKER-COMPOSE MODE
2523
2523
  # ============================================================================
2524
- # if [[ "$TOOL" == "openclaw" ]]; then
2525
- # OPENCLAW_REPO_DIR="$HOME/.ai-sandbox/tools/openclaw/repo"
2526
- #
2527
- # if [[ ! -d "$OPENCLAW_REPO_DIR" ]]; then
2528
- # echo "❌ ERROR: OpenClaw repository not found at $OPENCLAW_REPO_DIR"
2529
- # echo " Run: npx @kokorolx/ai-sandbox-wrapper setup"
2530
- # exit 1
2531
- # fi
2532
- #
2533
- # cd "$OPENCLAW_REPO_DIR"
2534
- #
2535
- # OPENCLAW_COMPOSE_FILE="$OPENCLAW_REPO_DIR/docker-compose.yml"
2536
- # OPENCLAW_OVERRIDE_FILE="$OPENCLAW_REPO_DIR/docker-compose.override.yml"
2537
- #
2538
- # echo "🔄 Generating OpenClaw docker-compose override..."
2539
- #
2540
- # cat > "$OPENCLAW_OVERRIDE_FILE" <<EOF
2541
- # services:
2542
- # openclaw-gateway:
2543
- # environment:
2544
- # HOME: /home/node
2545
- # OPENCLAW_GATEWAY_TOKEN: \${OPENCLAW_GATEWAY_TOKEN:-}
2546
- # volumes:
2547
- # - $HOME/.openclaw:/home/node/.openclaw
2548
- # EOF
2549
- #
2550
- # for workspace in "${WORKSPACES[@]}"; do
2551
- # echo " - $workspace:$workspace" >> "$OPENCLAW_OVERRIDE_FILE"
2552
- # done
2553
- #
2554
- # cat >> "$OPENCLAW_OVERRIDE_FILE" <<EOF
2555
- # ports:
2556
- # - "18789:18789"
2557
- # - "18790:18790"
2558
- # working_dir: $CURRENT_DIR
2559
- # EOF
2560
- #
2561
- # if [[ -n "$NETWORK_OPTIONS" ]]; then
2562
- # echo " networks:" >> "$OPENCLAW_OVERRIDE_FILE"
2563
- # for net in ${DOCKER_NETWORKS//,/ }; do
2564
- # echo " - $net" >> "$OPENCLAW_OVERRIDE_FILE"
2565
- # done
2566
- # echo "" >> "$OPENCLAW_OVERRIDE_FILE"
2567
- # echo "networks:" >> "$OPENCLAW_OVERRIDE_FILE"
2568
- # for net in ${DOCKER_NETWORKS//,/ }; do
2569
- # echo " $net:" >> "$OPENCLAW_OVERRIDE_FILE"
2570
- # echo " external: true" >> "$OPENCLAW_OVERRIDE_FILE"
2571
- # done
2572
- # fi
2573
- #
2574
- # echo "🚀 Starting OpenClaw with docker-compose..."
2575
- # echo "🌐 Gateway: http://localhost:18789"
2576
- # echo "🌐 Bridge: http://localhost:18790"
2577
- # echo ""
2578
- #
2579
- # exec docker compose -f "$OPENCLAW_COMPOSE_FILE" -f "$OPENCLAW_OVERRIDE_FILE" \
2580
- # --env-file "$ENV_FILE" \
2581
- # up --remove-orphans
2582
- # fi
2524
+ if [[ "$TOOL" == "openclaw" ]]; then
2525
+ OPENCLAW_REPO_DIR="$HOME/.ai-sandbox/tools/openclaw/repo"
2526
+
2527
+ if [[ ! -d "$OPENCLAW_REPO_DIR" ]]; then
2528
+ echo "❌ ERROR: OpenClaw repository not found at $OPENCLAW_REPO_DIR"
2529
+ echo " Run: npx @kokorolx/ai-sandbox-wrapper setup"
2530
+ exit 1
2531
+ fi
2532
+
2533
+ cd "$OPENCLAW_REPO_DIR"
2534
+
2535
+ OPENCLAW_COMPOSE_FILE="$OPENCLAW_REPO_DIR/docker-compose.yml"
2536
+ OPENCLAW_OVERRIDE_FILE="$OPENCLAW_REPO_DIR/docker-compose.override.yml"
2537
+
2538
+ echo "🔄 Generating OpenClaw docker-compose override..."
2539
+
2540
+ cat > "$OPENCLAW_OVERRIDE_FILE" <<EOF
2541
+ services:
2542
+ openclaw-gateway:
2543
+ environment:
2544
+ HOME: /home/node
2545
+ OPENCLAW_GATEWAY_TOKEN: \${OPENCLAW_GATEWAY_TOKEN:-}
2546
+ volumes:
2547
+ - $HOME/.openclaw:/home/node/.openclaw
2548
+ EOF
2549
+
2550
+ for workspace in "${WORKSPACES[@]}"; do
2551
+ echo " - $workspace:$workspace" >> "$OPENCLAW_OVERRIDE_FILE"
2552
+ done
2553
+
2554
+ cat >> "$OPENCLAW_OVERRIDE_FILE" <<EOF
2555
+ ports:
2556
+ - "18789:18789"
2557
+ - "18790:18790"
2558
+ working_dir: $CURRENT_DIR
2559
+ EOF
2560
+
2561
+ if [[ -n "$NETWORK_OPTIONS" ]]; then
2562
+ echo " networks:" >> "$OPENCLAW_OVERRIDE_FILE"
2563
+ for net in ${DOCKER_NETWORKS//,/ }; do
2564
+ echo " - $net" >> "$OPENCLAW_OVERRIDE_FILE"
2565
+ done
2566
+ echo "" >> "$OPENCLAW_OVERRIDE_FILE"
2567
+ echo "networks:" >> "$OPENCLAW_OVERRIDE_FILE"
2568
+ for net in ${DOCKER_NETWORKS//,/ }; do
2569
+ echo " $net:" >> "$OPENCLAW_OVERRIDE_FILE"
2570
+ echo " external: true" >> "$OPENCLAW_OVERRIDE_FILE"
2571
+ done
2572
+ fi
2573
+
2574
+ echo "🚀 Starting OpenClaw with docker-compose..."
2575
+ echo "🌐 Gateway: http://localhost:18789"
2576
+ echo "🌐 Bridge: http://localhost:18790"
2577
+ echo ""
2578
+
2579
+ exec docker compose -f "$OPENCLAW_COMPOSE_FILE" -f "$OPENCLAW_OVERRIDE_FILE" \
2580
+ --env-file "$ENV_FILE" \
2581
+ up --remove-orphans
2582
+ fi
2583
2583
 
2584
2584
  docker run $CONTAINER_NAME --rm $TTY_FLAGS \
2585
2585
  --init \
@@ -6,7 +6,7 @@ FROM node:22-bookworm-slim
6
6
 
7
7
  ARG AGENT_UID=1001
8
8
 
9
- RUN apt-get update && apt-get install -y --no-install-recommends git curl ssh ca-certificates jq python3 python3-pip python3-venv python3-dev python3-setuptools build-essential libopenblas-dev pipx unzip xclip wl-clipboard ripgrep tmux fd-find sqlite3 vim-tiny poppler-utils qpdf tesseract-ocr && curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin sh && rm -rf /var/lib/apt/lists/* && pipx ensurepath
9
+ RUN apt-get update && apt-get install -y --no-install-recommends git curl ssh ca-certificates jq python3 python3-pip python3-venv python3-dev python3-setuptools build-essential libopenblas-dev pipx unzip xclip wl-clipboard ripgrep tmux vim-nox fd-find sqlite3 poppler-utils qpdf tesseract-ocr && curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin sh && rm -rf /var/lib/apt/lists/* && pipx ensurepath
10
10
 
11
11
  # Install Python PDF processing tools for PDF skill
12
12
  RUN pip3 install --no-cache-dir --break-system-packages pypdf pdfplumber reportlab pytesseract pdf2image
@@ -6,7 +6,7 @@ FROM node:22-bookworm-slim
6
6
 
7
7
  ARG AGENT_UID=1001
8
8
 
9
- RUN apt-get update && apt-get install -y --no-install-recommends git curl ssh ca-certificates jq python3 python3-pip python3-venv python3-dev python3-setuptools build-essential libopenblas-dev pipx unzip xclip wl-clipboard ripgrep tmux fd-find sqlite3 vim-tiny poppler-utils qpdf tesseract-ocr && curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin sh && rm -rf /var/lib/apt/lists/* && pipx ensurepath
9
+ RUN apt-get update && apt-get install -y --no-install-recommends git curl ssh ca-certificates jq python3 python3-pip python3-venv python3-dev python3-setuptools build-essential libopenblas-dev pipx unzip xclip wl-clipboard ripgrep tmux vim-nox fd-find sqlite3 poppler-utils qpdf tesseract-ocr && curl -LsSf https://astral.sh/uv/install.sh | UV_INSTALL_DIR=/usr/local/bin sh && rm -rf /var/lib/apt/lists/* && pipx ensurepath
10
10
 
11
11
  # Install Python PDF processing tools for PDF skill
12
12
  RUN pip3 install --no-cache-dir --break-system-packages pypdf pdfplumber reportlab pytesseract pdf2image
@@ -106,6 +106,14 @@ RUN curl -fsSL https://opencode.ai/install | bash && \
106
106
  mv /root/.opencode/bin/opencode /usr/local/bin/opencode && \
107
107
  rm -rf /root/.opencode
108
108
 
109
+ # === claude ===
110
+ USER root
111
+ RUN export HOME=/root && curl -fsSL https://claude.ai/install.sh | bash && \
112
+ mkdir -p /usr/local/share && \
113
+ mv /root/.local/share/claude /usr/local/share/claude && \
114
+ ln -sf /usr/local/share/claude/versions/$(ls /usr/local/share/claude/versions | head -1) /usr/local/bin/claude
115
+ USER agent
116
+
109
117
  USER agent
110
118
  ENV HOME=/home/agent
111
119
  CMD ["bash"]
@@ -218,6 +218,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
218
218
  wl-clipboard \
219
219
  ripgrep \
220
220
  tmux \
221
+ vim-nox \
221
222
  fd-find \
222
223
  sqlite3 \
223
224
  poppler-utils \
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kokorolx/ai-sandbox-wrapper",
3
- "version": "3.1.1",
3
+ "version": "3.2.0",
4
4
  "description": "Docker-based security sandbox for AI coding agents. Isolate Claude, Gemini, Aider, and other AI tools from your host system.",
5
5
  "keywords": [
6
6
  "ai",
package/setup.sh CHANGED
@@ -281,9 +281,8 @@ echo "📁 Legacy workspaces file: $WORKSPACES_FILE"
281
281
  WORKSPACE="${WORKSPACES[0]}"
282
282
 
283
283
  # Tool definitions
284
- # DISABLED: amp,openclaw,droid,gemini,kilo,qwen,qoder,auggie,codebuddy,jules,shai
285
- TOOL_OPTIONS="opencode,claude,codex"
286
- TOOL_DESCS="Open-source coding tool from opencode-ai,Claude Code CLI from Anthropic,OpenAI Codex terminal agent"
284
+ TOOL_OPTIONS="amp,opencode,openclaw,droid,claude,gemini,kilo,qwen,codex,qoder,auggie,codebuddy,jules,shai"
285
+ TOOL_DESCS="AI coding assistant from @sourcegraph/amp,Open-source coding tool from opencode-ai,OpenClaw AI gateway (Docker Compose),Factory CLI from factory.ai,Claude Code CLI from Anthropic,Google Gemini CLI (free tier),AI pair programmer (Git-native),Kilo Code (500+ models),Alibaba Qwen CLI (1M context),OpenAI Codex terminal agent,Qoder AI CLI assistant,Augment Auggie CLI,Tencent CodeBuddy CLI,Google Jules CLI,OVHcloud SHAI agent"
287
286
 
288
287
  # Pre-select previously installed tools
289
288
  PRESELECTED_TOOLS=""
@@ -304,7 +303,7 @@ echo "Installing tools: ${TOOLS[*]}"
304
303
 
305
304
  CONTAINERIZED_TOOLS=()
306
305
  for tool in "${TOOLS[@]}"; do
307
- if [[ "$tool" =~ ^(opencode|claude|codex)$ ]]; then
306
+ if [[ "$tool" =~ ^(amp|opencode|openclaw|claude|aider|droid|gemini|kilo|qwen|codex|qoder|auggie|codebuddy|jules|shai)$ ]]; then
308
307
  CONTAINERIZED_TOOLS+=("$tool")
309
308
  fi
310
309
  done