feat: add tmux bridge, gemini support, and build resilience#145
feat: add tmux bridge, gemini support, and build resilience#145
Conversation
- 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
|
| 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") |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 | ||
|
|
There was a problem hiding this comment.
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" |
scripts/version-report.sh
Outdated
| get_latest_atlas_commit() { | ||
| gh api repos/lroolle/atlas-cli/commits/main --jq '.sha' 2>/dev/null || echo "789eefa650d66e97dd8fddceabf9e09f2a5d04a4" | ||
| } | ||
|
|
||
| get_latest_copilot_api_commit() { |
There was a problem hiding this comment.
[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") |
There was a problem hiding this comment.
[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 |
…-run flags - Move Makefile versions-up logic to scripts/version-upgrade.sh - Add release-utils.sh with unified tool registry and version fetching - Support --trace flag in claude agent for request tracing via claude-trace - Add --dry-run flag to show docker command without execution - Fix duplicate --dangerously-skip-permissions injection - Fix autolink checks to handle existing symlinks correctly - Switch atlas-cli to release-based versioning - Add clickhouse-client to rust image
- Build tmux 3.6a from source with SHA256 verification - Add deva-bridge-tmux-host (host TCP listener) and deva-bridge-tmux (container Unix socket proxy) scripts for macOS<->Linux socket bridging - Fix docker-entrypoint.sh usermod error handling for mounted volumes - Document bridge architecture and security model in AGENTS.md - Fix version-upgrade build resilience (gh api vs curl for rate limits) - Add LSP support planning devlog
|
Claude finished @lroolle's task in 2m 33s —— View job Security Audit Complete
|
Summary
Security
tmux bridge is a PRIVILEGED HOST BRIDGE - container gains full tmux control. Documented in AGENTS.md under "Bridges (privileged)".
Test plan