Skip to content

Commit 5ce67f3

Browse files
lroolleclaude
andcommitted
feat(codex): add --browser-mcp and bump toolchain versions
- Add deva.sh codex --browser-mcp: injects session-only Playwright MCP override via Codex --config, switches to rust image profile - Add CODEX_BROWSER_MCP=true and repeatable CODEX_CONFIG=key=value in .deva config files for persistent browser sessions - Bump Go 1.26.3, Claude Code 2.1.143, Codex 0.131.0, Gemini CLI 0.42.0, Playwright 1.60.0 - Redesign container slug: deva--<agent>--<auth_tag>--<slug>..<hash> replaces the old ..i/..v/..c suffix soup; agent always in name - Normalize short_hash to SHA-256; drop cksum fallback (non-hex) - Add scripts/test-codex-browser-shape.sh dry-run coverage Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 87b62b6 commit 5ce67f3

12 files changed

Lines changed: 541 additions & 127 deletions

.deva.example

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ EPHEMERAL=false
4949
#
5050
# 6. Disable ephemeral containers (persistent):
5151
# EPHEMERAL=false
52+
#
53+
# 7. Enable Codex browser MCP for this project:
54+
# DEFAULT_AGENT=codex
55+
# CODEX_BROWSER_MCP=true
56+
#
57+
# Optional session-only Codex config overrides:
58+
# CODEX_CONFIG=features.apps=false
59+
# CODEX_CONFIG=features.plugins=false
5260

5361
# Hybrid Agent Setup:
5462
#

DEV-LOGS.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,24 @@
1313
- Minimal markdown markers, no unnecessary formatting, minimal emojis.
1414
- Reference issue numbers in the format `#<issue-number>` for easy linking.
1515

16+
# [2026-04-28] Dev Log: agent-context consolidation — ~/.claude as single source of truth [WIP]
17+
- Why: agent customizations are scattered across three directories (=~/.claude/=, =~/.codex/=, =~/.agents/=), 10 concepts are duplicated between Claude Code agents and Codex skills and are already diverging, and the shared global instructions (GENERAL-AGENTS.md) copied into both =~/.claude/CLAUDE.md= and =~/.codex/AGENTS.md= are 30 lines out of sync
18+
- What:
19+
- **[PLANNING]** Phase 1 — establish source of truth: =~/.claude/= is canonical; Claude Code agents/ are authoritative for the 10 duplicated concepts; =~/.claude/CLAUDE.md= is the master global instructions file
20+
- **[PLANNING]** Phase 2 — Codex sync mechanism: decision needed between symlinking =~/.codex/AGENTS.md= -> =~/.claude/CLAUDE.md= vs. a sync script that copies with Codex-specific adaptations; leaning toward symlink for zero-drift maintenance
21+
- **[PLANNING]** Phase 3 — deduplicate Codex skills: remove from =~/.codex/skills/= all 10 Claude Code agent duplicates (linus-committer, linus-rants, comment-flusher, etc.) plus 8 skills already covered by the superpowers plugin in CC (brainstorming, executing-plans, writing-plans, dispatching-parallel-agents, subagent-driven-development, skill-creator-6rok, using-superpowers, codex-primary-runtime); retain Codex-only skills: docker-compose-safe-deploy, systematic-debugging, test-driven-development, verification-before-completion, finishing-a-development-branch, using-git-worktrees, receiving-code-review, writing-skills
22+
- **[PLANNING]** Phase 4 — clean =~/.agents/=: this directory is dead weight; Claude Code does not scan it; Codex only scans .agents/ walking up from cwd, not from HOME; decide whether to archive the telegram TS package and repurpose the dir as a shared skill source, or delete it entirely
23+
- **[PLANNING]** Phase 5 — purge stale files: delete all .bak/.backup files from =~/.claude/= and =~/.codex/= (~1MB), delete empty =~/.codex/instructions.md=, clean =~/.claude/.claude.json= backup chain
24+
- **[PLANNING]** Phase 6 — document the layout: brief README or section in CLAUDE.md covering what lives where, how to add new skills/agents, and the Codex sync workflow
25+
26+
- Open decisions:
27+
1. Symlink =AGENTS.md= -> =CLAUDE.md=, or keep separate with a sync script? (symlink eliminates drift but loses ability to add Codex-specific front matter)
28+
2. Kill the 10 Codex duplicates entirely, or keep for standalone Codex use without deva? (Claude Code + superpowers already covers the gap when running inside deva)
29+
3. =~/.agents/=: repurpose as shared skill source readable by both tools, or delete?
30+
4. Should unique Codex workflow skills (TDD, systematic-debugging, finishing-a-development-branch, etc.) be ported back into Claude Code agents?
31+
32+
- Result: **[WIP — no files changed yet]** planning entry only; execution blocked on the four decisions above
33+
1634
# [2026-04-13] Dev Log: adopt smux tmux-bridge as layer-2 agent comms
1735
- Why: deva-v2 proposal left the agent-to-agent transport CLI as an open question; smux (github.com/ShawnPana/smux) shipped exactly the shape we sketched (read/type/keys/label/envelope) in 403 lines of bash, MIT-licensed. Reinventing it would be waste. The existing `deva-bridge-tmux` (socat TCP) is layer 1 (kernel boundary); `tmux-bridge` is layer 2 (semantic). They compose cleanly.
1836
- What:

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh
6161
ARG PYTHON_VERSION=3.14t
6262
RUN /root/.local/bin/uv python install "${PYTHON_VERSION}"
6363

64-
ARG GO_VERSION=1.26.2
64+
ARG GO_VERSION=1.26.3
6565
RUN --mount=type=cache,target=/tmp/go-cache,sharing=locked \
6666
ARCH=$(dpkg --print-architecture) && \
6767
GO_ARCH=$([ "$ARCH" = "amd64" ] && echo "amd64" || echo "arm64") && \
@@ -205,10 +205,10 @@ RUN curl -LsSf https://astral.sh/uv/install.sh | sh && \
205205
FROM agent-base AS final
206206

207207
# Declare ARGs immediately before usage to minimize cache invalidation
208-
ARG CLAUDE_CODE_VERSION=2.1.116
208+
ARG CLAUDE_CODE_VERSION=2.1.143
209209
ARG CLAUDE_TRACE_VERSION=1.0.9
210-
ARG CODEX_VERSION=0.122.0
211-
ARG GEMINI_CLI_VERSION=0.38.2
210+
ARG CODEX_VERSION=0.131.0
211+
ARG GEMINI_CLI_VERSION=0.42.0
212212

213213
# Record key tool versions as labels for quick inspection
214214
LABEL org.opencontainers.image.claude_code_version=${CLAUDE_CODE_VERSION}

Dockerfile.rust

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ FROM ${BASE_IMAGE}
88
LABEL org.opencontainers.image.title="deva-rust"
99
LABEL org.opencontainers.image.description="Rust development environment with full toolchain"
1010

11-
ARG CLAUDE_CODE_VERSION=2.1.116
11+
ARG CLAUDE_CODE_VERSION=2.1.143
1212
ARG CLAUDE_TRACE_VERSION=1.0.9
13-
ARG CODEX_VERSION=0.122.0
14-
ARG GEMINI_CLI_VERSION=0.38.2
13+
ARG CODEX_VERSION=0.131.0
14+
ARG GEMINI_CLI_VERSION=0.42.0
1515
ARG ATLAS_CLI_VERSION=v0.1.4
16-
ARG PLAYWRIGHT_VERSION=1.59.1
16+
ARG PLAYWRIGHT_VERSION=1.60.0
1717
ARG RUST_TOOLCHAINS="stable"
1818
ARG RUST_DEFAULT_TOOLCHAIN="stable"
1919
ARG RUST_TARGETS="wasm32-unknown-unknown"

Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,18 @@ DETECTED_IMAGE := $(shell \
2525
echo "$(IMAGE_NAME):$(TAG)"; \
2626
fi)
2727
NODE_MAJOR ?= 22
28-
GO_VERSION ?= 1.26.2
28+
GO_VERSION ?= 1.26.3
2929
PYTHON_VERSION ?= 3.14t
3030
DELTA_VERSION ?= 0.19.2
3131
TMUX_VERSION ?= 3.6a
3232
TMUX_SHA256 ?= b6d8d9c76585db8ef5fa00d4931902fa4b8cbe8166f528f44fc403961a3f3759
33-
CLAUDE_CODE_VERSION ?= 2.1.116
33+
CLAUDE_CODE_VERSION ?= 2.1.143
3434
CLAUDE_TRACE_VERSION ?= 1.0.9
35-
CODEX_VERSION ?= 0.122.0
36-
GEMINI_CLI_VERSION ?= 0.38.2
35+
CODEX_VERSION ?= 0.131.0
36+
GEMINI_CLI_VERSION ?= 0.42.0
3737
ATLAS_CLI_VERSION ?= v0.1.4
3838
COPILOT_API_VERSION ?= 0ea08febdd7e3e055b03dd298bf57e669500b5c1
39-
PLAYWRIGHT_VERSION ?= 1.59.1
39+
PLAYWRIGHT_VERSION ?= 1.60.0
4040
RUST_TOOLCHAINS ?= stable
4141
RUST_DEFAULT_TOOLCHAIN ?= stable
4242
RUST_TARGETS ?= wasm32-unknown-unknown
@@ -402,10 +402,10 @@ help:
402402
@echo " make CLAUDE_CODE_VERSION=2.0.5 build # Override with specific version"
403403
@echo " make GEMINI_CLI_VERSION=0.18.0 build # Override gemini version"
404404
@echo " make ATLAS_CLI_VERSION=5f6a20c build # Pin atlas-cli to specific commit"
405-
@echo " make GO_VERSION=1.26.2 build # Override Go pin"
405+
@echo " make GO_VERSION=1.26.3 build # Override Go pin"
406406
@echo " make toolchains # Show pinned toolchain inventory"
407407
@echo " make scripts # List helper scripts"
408408
@echo " make versions-pin # Refresh shared pin file"
409409
@echo " make versions # Check current versions"
410-
@echo " make PLAYWRIGHT_VERSION=1.59.1 build-rust # Override rust browser tooling"
410+
@echo " make PLAYWRIGHT_VERSION=1.60.0 build-rust # Override rust browser tooling"
411411
@echo " make versions-up # Upgrade to latest upstream versions"

agents/codex.sh

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,23 @@
33
# shellcheck disable=SC1091
44
source "$(dirname "${BASH_SOURCE[0]}")/shared_auth.sh"
55

6+
toml_escape_string() {
7+
local value="$1"
8+
value="${value//\\/\\\\}"
9+
value="${value//\"/\\\"}"
10+
printf '%s' "$value"
11+
}
12+
13+
codex_browser_mcp_config_override() {
14+
local package
15+
package="$(configured_env_value DEVA_CODEX_BROWSER_MCP_PACKAGE || true)"
16+
[ -n "$package" ] || package="$(configured_env_value DEVA_PLAYWRIGHT_MCP_PACKAGE || true)"
17+
[ -n "$package" ] || package="${DEVA_CODEX_BROWSER_MCP_PACKAGE:-${DEVA_PLAYWRIGHT_MCP_PACKAGE:-@playwright/mcp@0.0.75}}"
18+
package="$(toml_escape_string "$package")"
19+
20+
printf '%s' "mcp_servers.playwright={command=\"npx\",args=[\"-y\",\"${package}\",\"--headless\",\"--browser\",\"chromium\",\"--no-sandbox\",\"--isolated\"],startup_timeout_sec=30}"
21+
}
22+
623
agent_prepare() {
724
local -a args
825
if [ $# -gt 0 ]; then
@@ -46,6 +63,15 @@ agent_prepare() {
4663
AGENT_COMMAND+=("-m" "${DEVA_DEFAULT_CODEX_MODEL:-gpt-5-codex}")
4764
fi
4865

66+
if [ "${DEVA_CODEX_BROWSER_MCP:-${DEVA_WITH_BROWSER:-0}}" = "1" ]; then
67+
AGENT_COMMAND+=("--config" "$(codex_browser_mcp_config_override)")
68+
fi
69+
70+
local codex_config
71+
for codex_config in "${CODEX_CONFIG_OVERRIDES[@]+"${CODEX_CONFIG_OVERRIDES[@]}"}"; do
72+
AGENT_COMMAND+=("--config" "$codex_config")
73+
done
74+
4975
AGENT_COMMAND+=("${remaining_args[@]+"${remaining_args[@]}"}")
5076

5177
DOCKER_ARGS+=("-p" "127.0.0.1:1455:1455")

0 commit comments

Comments
 (0)