Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DRAFT.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ so long as that type is a structural sub-type of `T`.

Like `polymorphic`, `protocol` supports deep-copies, const propagation and
custom allocators. Like `polymorphic`, `protocol` has a valueless state after
being moved from to allow move construction and move assignment without
being moved from to allow move construction and move assignment without
dynamic memory allocation.

Where `polymorphic<T>` is owning, `T*`, or `const T*` can be used as a
Expand Down
3 changes: 3 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ RUN mkdir -p /home/vscode/.npm-global
# may invoke either `gemini` or `claude`.
RUN npm install -g @google/gemini-cli @anthropic-ai/claude-code

# Install Antigravity CLI (installs binary as `agy` into ~/.local/bin).
RUN curl -fsSL https://antigravity.google/cli/install.sh | bash

Comment thread
nbx8 marked this conversation as resolved.
# Set up uv and Python environment.
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
ENV UV_PROJECT_ENVIRONMENT="/home/vscode/.venv"
Expand Down
32 changes: 23 additions & 9 deletions scripts/agentic-sandbox.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/usr/bin/env python3
"""Script to run an AI agent (Gemini CLI or Claude Code) in a Docker sandbox."""
"""
Script to run an AI agent in a Docker sandbox.

Supported agents: Gemini CLI, Claude Code, Antigravity CLI.
"""

import argparse
import os
Expand All @@ -26,11 +30,12 @@ def _seed_config_file(path: str, content: bytes) -> None:
def main() -> None:
"""Provide the main entry point for the agentic sandbox script."""
parser = argparse.ArgumentParser(
description="Run an AI agent (gemini or claude) in a Docker sandbox."
description="Run an AI agent (gemini, claude, or antigravity)"
" in a Docker sandbox."
)
parser.add_argument(
"agent",
choices=["gemini", "claude"],
choices=["gemini", "claude", "antigravity"],
help="AI agent to run inside the sandbox.",
)
parser.add_argument(
Expand Down Expand Up @@ -86,16 +91,25 @@ def log(msg: str) -> None:
if args.agent == "gemini":
npm_package = "@google/gemini-cli"
agent_cmd = "gemini"
elif args.agent == "antigravity":
npm_package = None
agent_cmd = "agy"
else:
npm_package = "@anthropic-ai/claude-code"
agent_cmd = "claude --dangerously-skip-permissions"

if args.update:
container_cmd = (
f"export NPM_CONFIG_PREFIX=~/.npm-global && "
f"export PATH=~/.npm-global/bin:$PATH && "
f"npm install -g {npm_package}@latest && {agent_cmd}"
)
if args.agent == "antigravity":
container_cmd = (
"curl -fsSL https://antigravity.google/cli/install.sh | bash && "
f"{agent_cmd}"
)
Comment thread
nbx8 marked this conversation as resolved.
else:
container_cmd = (
f"export NPM_CONFIG_PREFIX=~/.npm-global && "
f"export PATH=~/.npm-global/bin:$PATH && "
f"npm install -g {npm_package}@latest && {agent_cmd}"
)
else:
container_cmd = agent_cmd

Expand All @@ -108,7 +122,7 @@ def log(msg: str) -> None:
f"{project_root}:/workspace",
]

if args.agent == "gemini":
if args.agent in ("gemini", "antigravity"):
gemini_config_dir = os.path.expanduser("~/.gemini")
os.makedirs(gemini_config_dir, mode=0o700, exist_ok=True)
# Seed default config files if missing so they are accessible inside the
Expand Down
Loading