@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 +75 -75
- package/dockerfiles/base/Dockerfile +1 -1
- package/dockerfiles/sandbox/Dockerfile +9 -1
- package/lib/install-base.sh +1 -0
- package/package.json +1 -1
- package/setup.sh +3 -4
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
|
-
|
|
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
|
-
|
|
666
|
+
amp) echo ".config/amp .local/share/amp" ;;
|
|
667
667
|
opencode) echo ".config/opencode .local/share/opencode" ;;
|
|
668
668
|
claude) echo ".claude" ;;
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
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
|
|
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
|
|
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"]
|
package/lib/install-base.sh
CHANGED
package/package.json
CHANGED
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
|
-
|
|
285
|
-
|
|
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
|