-
Notifications
You must be signed in to change notification settings - Fork 1
feat: add gemini agent support and Docker-in-Docker auto-mount #145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
lroolle
commented
Dec 2, 2025
- Add gemini.sh agent with oauth, api-key, vertex, and compute-adc auth
- Auto-mount /var/run/docker.sock by default with --no-docker opt-out
- Switch copilot-api to ericc-ch fork for latest features
- Track gemini-cli, atlas-cli, and copilot-api versions in builds
- Enhance version-report with colorized output and release dates
- Reorganize Dockerfile for better cache reuse
- Document container sandboxing architecture and Docker socket security
- Add gemini.sh agent with oauth, api-key, vertex, and compute-adc auth - Auto-mount /var/run/docker.sock by default with --no-docker opt-out - Switch copilot-api to ericc-ch fork for latest features - Track gemini-cli, atlas-cli, and copilot-api versions in builds - Enhance version-report with colorized output and release dates - Reorganize Dockerfile for better cache reuse - Document container sandboxing architecture and Docker socket security
|
Claude finished @lroolle's task —— View job
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
| fi) | ||
| CLAUDE_CODE_VERSION := $(shell npm view @anthropic-ai/claude-code version 2>/dev/null || echo "2.0.1") | ||
| CODEX_VERSION := $(shell npm view @openai/codex version 2>/dev/null || echo "0.42.0") | ||
| GEMINI_CLI_VERSION := $(shell npm view @google/gemini-cli version 2>/dev/null || echo "latest") |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fallback value "latest" for GEMINI_CLI_VERSION is inconsistent with the other version variables which use actual semantic versions (e.g., "2.0.1", "0.42.0"). The "latest" tag is a valid npm tag but not a version number, which could cause issues in version comparison logic throughout the codebase (e.g., in scripts/version-report.sh and Makefile version checking). Use an actual version number as the fallback, e.g., echo "0.1.0" or fetch the resolved version of "latest".
| GEMINI_CLI_VERSION := $(shell npm view @google/gemini-cli version 2>/dev/null || echo "latest") | |
| GEMINI_CLI_VERSION := $(shell npm view @google/gemini-cli version 2>/dev/null || echo "0.1.0") |
| *..* | *//* | *$'\n'* | *$'\t'*) | ||
| auth_error "CONFIG_ROOT contains invalid path pattern: $CONFIG_ROOT" | ||
| ;; | ||
| esac |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The path pattern validation on line 58 checks for *//* which would match paths containing double slashes (like /home//user). However, this pattern itself contains an error - it should be *\/\/* or the regex needs to handle this differently. The current pattern *//* may not work as intended in a case statement. Consider testing this validation or using a more explicit approach like [[ "$CONFIG_ROOT" =~ // ]] to detect double slashes.
| *..* | *//* | *$'\n'* | *$'\t'*) | |
| auth_error "CONFIG_ROOT contains invalid path pattern: $CONFIG_ROOT" | |
| ;; | |
| esac | |
| *..* | *$'\n'* | *$'\t'*) | |
| auth_error "CONFIG_ROOT contains invalid path pattern: $CONFIG_ROOT" | |
| ;; | |
| esac | |
| if [[ "$CONFIG_ROOT" =~ // ]]; then | |
| auth_error "CONFIG_ROOT contains invalid path pattern (double slash): $CONFIG_ROOT" | |
| fi |
| if [ -f "$(dirname "${BASH_SOURCE[0]}")/shared_auth.sh" ]; then | ||
| source "$(dirname "${BASH_SOURCE[0]}")/shared_auth.sh" | ||
| fi | ||
|
|
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent sourcing pattern between agent files. agents/claude.sh and agents/codex.sh now use unconditional source (line 4), while agents/gemini.sh uses conditional sourcing with a file existence check (lines 4-6). For consistency and to avoid potential errors if shared_auth.sh is missing, all three agent files should use the same pattern. Recommend using the simpler unconditional source as in claude.sh and codex.sh, since shared_auth.sh is a required dependency.
| if [ -f "$(dirname "${BASH_SOURCE[0]}")/shared_auth.sh" ]; then | |
| source "$(dirname "${BASH_SOURCE[0]}")/shared_auth.sh" | |
| fi | |
| source "$(dirname "${BASH_SOURCE[0]}")/shared_auth.sh" |
| get_latest_atlas_commit() { | ||
| gh api repos/lroolle/atlas-cli/commits/main --jq '.sha' 2>/dev/null || echo "789eefa650d66e97dd8fddceabf9e09f2a5d04a4" | ||
| } | ||
|
|
||
| get_latest_copilot_api_commit() { |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Hardcoded commit SHAs as fallback values may become stale over time. If the GitHub API calls fail, users will get outdated defaults. Consider adding a comment explaining these are fallback values for offline scenarios, or fetch from a cached local file that's updated periodically.
| get_latest_atlas_commit() { | |
| gh api repos/lroolle/atlas-cli/commits/main --jq '.sha' 2>/dev/null || echo "789eefa650d66e97dd8fddceabf9e09f2a5d04a4" | |
| } | |
| get_latest_copilot_api_commit() { | |
| get_latest_atlas_commit() { | |
| # Fallback SHA below is hardcoded for offline or API failure scenarios. | |
| # WARNING: This value may become stale over time. Update periodically or consider a local cache. | |
| gh api repos/lroolle/atlas-cli/commits/main --jq '.sha' 2>/dev/null || echo "789eefa650d66e97dd8fddceabf9e09f2a5d04a4" | |
| } | |
| get_latest_copilot_api_commit() { | |
| # Fallback SHA below is hardcoded for offline or API failure scenarios. | |
| # WARNING: This value may become stale over time. Update periodically or consider a local cache. |
| AUTH_METHOD="$PARSED_AUTH_METHOD" | ||
| local -a remaining_args=("${PARSED_REMAINING_ARGS[@]+"${PARSED_REMAINING_ARGS[@]}"}") | ||
|
|
||
| AGENT_COMMAND+=("--yolo") |
Copilot
AI
Dec 2, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The --yolo flag is hardcoded for all Gemini invocations, which bypasses permission prompts. While this aligns with the documented "container as sandbox" philosophy in AGENTS.md, there's no option for users who want more granular control. Consider adding a GEMINI_YOLO environment variable (defaulting to true) to allow opt-out for users who prefer permission prompts despite the container sandbox.
| AGENT_COMMAND+=("--yolo") | |
| # Add --yolo unless GEMINI_YOLO is explicitly set to "false" | |
| if [ "${GEMINI_YOLO:-true}" != "false" ]; then | |
| AGENT_COMMAND+=("--yolo") | |
| fi |