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
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ references/

# Claude trace logs
.claude-trace/
.cctrace/

# Build artifacts
*.tar
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,10 @@ jobs:
--build-arg TMUX_VERSION="${{ steps.pins.outputs.tmux_version }}" \
--build-arg TMUX_SHA256="${{ steps.pins.outputs.tmux_sha256 }}" \
--build-arg CLAUDE_CODE_VERSION="${{ steps.pins.outputs.claude_code_version }}" \
--build-arg CLAUDE_TRACE_VERSION="${{ steps.pins.outputs.claude_trace_version }}" \
--build-arg CCTRACE_VERSION="${{ steps.pins.outputs.cctrace_version }}" \
--build-arg CODEX_VERSION="${{ steps.pins.outputs.codex_version }}" \
--build-arg GEMINI_CLI_VERSION="${{ steps.pins.outputs.gemini_cli_version }}" \
--build-arg ATLAS_CLI_VERSION="${{ steps.pins.outputs.atlas_cli_version }}" \
--build-arg CCX_VERSION="${{ steps.pins.outputs.ccx_version }}" \
--build-arg COPILOT_API_VERSION="${{ steps.pins.outputs.copilot_api_version }}" \
.

Expand All @@ -97,10 +97,10 @@ jobs:
TMUX_VERSION="${{ steps.pins.outputs.tmux_version }}" \
TMUX_SHA256="${{ steps.pins.outputs.tmux_sha256 }}" \
CLAUDE_CODE_VERSION="${{ steps.pins.outputs.claude_code_version }}" \
CLAUDE_TRACE_VERSION="${{ steps.pins.outputs.claude_trace_version }}" \
CCTRACE_VERSION="${{ steps.pins.outputs.cctrace_version }}" \
CODEX_VERSION="${{ steps.pins.outputs.codex_version }}" \
GEMINI_CLI_VERSION="${{ steps.pins.outputs.gemini_cli_version }}" \
ATLAS_CLI_VERSION="${{ steps.pins.outputs.atlas_cli_version }}" \
CCX_VERSION="${{ steps.pins.outputs.ccx_version }}" \
COPILOT_API_VERSION="${{ steps.pins.outputs.copilot_api_version }}" \
PLAYWRIGHT_VERSION="${{ steps.pins.outputs.playwright_version }}" \
RUST_TOOLCHAINS="${{ steps.pins.outputs.rust_toolchains }}" \
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/nightly-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
delta_version: ${{ steps.pins.outputs.delta_version }}
tmux_version: ${{ steps.pins.outputs.tmux_version }}
tmux_sha256: ${{ steps.pins.outputs.tmux_sha256 }}
claude_trace_version: ${{ steps.pins.outputs.claude_trace_version }}
cctrace_version: ${{ steps.pins.outputs.cctrace_version }}
playwright_version: ${{ steps.pins.outputs.playwright_version }}
rust_toolchains: ${{ steps.pins.outputs.rust_toolchains }}
rust_default_toolchain: ${{ steps.pins.outputs.rust_default_toolchain }}
Expand All @@ -54,7 +54,7 @@ jobs:
claude_code_version: ${{ steps.versions.outputs.claude_code_version }}
codex_version: ${{ steps.versions.outputs.codex_version }}
gemini_cli_version: ${{ steps.versions.outputs.gemini_cli_version }}
atlas_cli_version: ${{ steps.versions.outputs.atlas_cli_version }}
ccx_version: ${{ steps.versions.outputs.ccx_version }}
copilot_api_version: ${{ steps.versions.outputs.copilot_api_version }}
steps:
- name: Checkout
Expand All @@ -80,7 +80,7 @@ jobs:
- Claude Code: \`${{ steps.versions.outputs.claude_code_version }}\`
- Codex: \`${{ steps.versions.outputs.codex_version }}\`
- Gemini CLI: \`${{ steps.versions.outputs.gemini_cli_version }}\`
- Atlas CLI: \`${{ steps.versions.outputs.atlas_cli_version }}\`
- ccx: \`${{ steps.versions.outputs.ccx_version }}\`
- Copilot API: \`${{ steps.versions.outputs.copilot_api_version }}\`
- Stamp: \`${{ steps.versions.outputs.stamp }}\`
EOF
Expand Down Expand Up @@ -137,10 +137,10 @@ jobs:
TMUX_VERSION=${{ needs.load-version-pins.outputs.tmux_version }}
TMUX_SHA256=${{ needs.load-version-pins.outputs.tmux_sha256 }}
CLAUDE_CODE_VERSION=${{ needs.resolve-versions.outputs.claude_code_version }}
CLAUDE_TRACE_VERSION=${{ needs.load-version-pins.outputs.claude_trace_version }}
CCTRACE_VERSION=${{ needs.load-version-pins.outputs.cctrace_version }}
CODEX_VERSION=${{ needs.resolve-versions.outputs.codex_version }}
GEMINI_CLI_VERSION=${{ needs.resolve-versions.outputs.gemini_cli_version }}
ATLAS_CLI_VERSION=${{ needs.resolve-versions.outputs.atlas_cli_version }}
CCX_VERSION=${{ needs.resolve-versions.outputs.ccx_version }}
COPILOT_API_VERSION=${{ needs.resolve-versions.outputs.copilot_api_version }}

build-rust:
Expand Down Expand Up @@ -190,10 +190,10 @@ jobs:
build-args: |
BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:nightly-${{ needs.resolve-versions.outputs.stamp }}
CLAUDE_CODE_VERSION=${{ needs.resolve-versions.outputs.claude_code_version }}
CLAUDE_TRACE_VERSION=${{ needs.load-version-pins.outputs.claude_trace_version }}
CCTRACE_VERSION=${{ needs.load-version-pins.outputs.cctrace_version }}
CODEX_VERSION=${{ needs.resolve-versions.outputs.codex_version }}
GEMINI_CLI_VERSION=${{ needs.resolve-versions.outputs.gemini_cli_version }}
ATLAS_CLI_VERSION=${{ needs.resolve-versions.outputs.atlas_cli_version }}
CCX_VERSION=${{ needs.resolve-versions.outputs.ccx_version }}
PLAYWRIGHT_VERSION=${{ needs.load-version-pins.outputs.playwright_version }}
RUST_TOOLCHAINS=${{ needs.load-version-pins.outputs.rust_toolchains }}
RUST_DEFAULT_TOOLCHAIN=${{ needs.load-version-pins.outputs.rust_default_toolchain }}
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ jobs:
tmux_version: ${{ steps.pins.outputs.tmux_version }}
tmux_sha256: ${{ steps.pins.outputs.tmux_sha256 }}
claude_code_version: ${{ steps.pins.outputs.claude_code_version }}
claude_trace_version: ${{ steps.pins.outputs.claude_trace_version }}
cctrace_version: ${{ steps.pins.outputs.cctrace_version }}
codex_version: ${{ steps.pins.outputs.codex_version }}
gemini_cli_version: ${{ steps.pins.outputs.gemini_cli_version }}
atlas_cli_version: ${{ steps.pins.outputs.atlas_cli_version }}
ccx_version: ${{ steps.pins.outputs.ccx_version }}
copilot_api_version: ${{ steps.pins.outputs.copilot_api_version }}
playwright_version: ${{ steps.pins.outputs.playwright_version }}
rust_toolchains: ${{ steps.pins.outputs.rust_toolchains }}
Expand Down Expand Up @@ -81,10 +81,10 @@ jobs:
- Python: \`${{ steps.pins.outputs.python_version }}\`
- Delta: \`${{ steps.pins.outputs.delta_version }}\`
- Claude Code: \`${{ steps.pins.outputs.claude_code_version }}\`
- Claude Trace: \`${{ steps.pins.outputs.claude_trace_version }}\`
- cctrace: \`${{ steps.pins.outputs.cctrace_version }}\`
- Codex: \`${{ steps.pins.outputs.codex_version }}\`
- Gemini CLI: \`${{ steps.pins.outputs.gemini_cli_version }}\`
- Atlas CLI: \`${{ steps.pins.outputs.atlas_cli_version }}\`
- ccx: \`${{ steps.pins.outputs.ccx_version }}\`
- Copilot API: \`${{ steps.pins.outputs.copilot_api_version }}\`
- Playwright: \`${{ steps.pins.outputs.playwright_version }}\`
- Rust toolchains: \`${{ steps.pins.outputs.rust_toolchains }}\`
Expand Down Expand Up @@ -144,10 +144,10 @@ jobs:
TMUX_VERSION=${{ needs.load-version-pins.outputs.tmux_version }}
TMUX_SHA256=${{ needs.load-version-pins.outputs.tmux_sha256 }}
CLAUDE_CODE_VERSION=${{ needs.load-version-pins.outputs.claude_code_version }}
CLAUDE_TRACE_VERSION=${{ needs.load-version-pins.outputs.claude_trace_version }}
CCTRACE_VERSION=${{ needs.load-version-pins.outputs.cctrace_version }}
CODEX_VERSION=${{ needs.load-version-pins.outputs.codex_version }}
GEMINI_CLI_VERSION=${{ needs.load-version-pins.outputs.gemini_cli_version }}
ATLAS_CLI_VERSION=${{ needs.load-version-pins.outputs.atlas_cli_version }}
CCX_VERSION=${{ needs.load-version-pins.outputs.ccx_version }}
COPILOT_API_VERSION=${{ needs.load-version-pins.outputs.copilot_api_version }}

build-and-push-rust:
Expand Down Expand Up @@ -199,10 +199,10 @@ jobs:
build-args: |
BASE_IMAGE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.prepare.outputs.release_tag }}
CLAUDE_CODE_VERSION=${{ needs.load-version-pins.outputs.claude_code_version }}
CLAUDE_TRACE_VERSION=${{ needs.load-version-pins.outputs.claude_trace_version }}
CCTRACE_VERSION=${{ needs.load-version-pins.outputs.cctrace_version }}
CODEX_VERSION=${{ needs.load-version-pins.outputs.codex_version }}
GEMINI_CLI_VERSION=${{ needs.load-version-pins.outputs.gemini_cli_version }}
ATLAS_CLI_VERSION=${{ needs.load-version-pins.outputs.atlas_cli_version }}
CCX_VERSION=${{ needs.load-version-pins.outputs.ccx_version }}
PLAYWRIGHT_VERSION=${{ needs.load-version-pins.outputs.playwright_version }}
RUST_TOOLCHAINS=${{ needs.load-version-pins.outputs.rust_toolchains }}
RUST_DEFAULT_TOOLCHAIN=${{ needs.load-version-pins.outputs.rust_default_toolchain }}
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed
- Replace claude-trace (@mariozechner/claude-trace) with cctrace
(thevibeworks/cctrace) as the `--trace` backend. cctrace is a
TLS-intercepting proxy that captures all Anthropic traffic
(messages, OAuth, usage/credits, MCP), not just `/v1/messages`,
and works on both npm and native-binary Claude installs. Trace
logs and HTML snapshots land in `.cctrace/` inside the workspace
mount. Version pin renamed `CLAUDE_TRACE_VERSION` ->
`CCTRACE_VERSION`; image label renamed to
`org.opencontainers.image.cctrace_version`
- Install bun system-wide at `/usr/local/bin/bun` (real binary via
`BUN_INSTALL=/usr/local`) instead of a symlink into `/root/.bun`
that non-root users could not execute. cctrace is compiled with it
at image build into a standalone binary at
`~/.local/bin/cctrace` (no bun needed at runtime)

## [0.12.0] - 2026-05-27

### Added
Expand Down
9 changes: 9 additions & 0 deletions DEV-LOGS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,15 @@
- Minimal markdown markers, no unnecessary formatting, minimal emojis.
- Reference issue numbers in the format `#<issue-number>` for easy linking.

# [2026-07-07] Dev Log: switch --trace default from claude-trace to cctrace
- Why: claude-trace's node --require fetch hook only sees /v1/messages and dies on native Claude binaries; cctrace (thevibeworks/cctrace) MITM-captures everything (OAuth, usage/credits, MCP) and auto-detects npm vs native installs
- What:
- `--trace` now runs `cctrace --no-open -- <claude args>` in agents/claude.sh, claude.sh (local + docker), and docker-entrypoint.sh (dsp injected after the first `--` instead of after `--run-with`)
- install-agent-tooling.sh compiles cctrace from the npm tarball with `bun build --compile` into `~/.local/bin/cctrace`; compiled binary is required because bun's CLI eats the leading `--` separator
- bun now installed system-wide via `BUN_INSTALL=/usr/local` (was a symlink into /root/.bun, unusable by the deva user)
- pin renamed CLAUDE_TRACE_VERSION -> CCTRACE_VERSION=0.4.0 across versions.env, Makefile, Dockerfiles, CI workflows, release-utils registry, and tests
- Result: `deva.sh claude -- --trace` captures the full request surface; snapshots persist to `.cctrace/` in the workspace mount; claude-trace fully removed from images

# [2026-04-28] Dev Log: agent-context consolidation — ~/.claude as single source of truth [WIP]
- 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
- What:
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get install -y --no-install-recommends nodejs && \
apt-get -y clean && rm -rf /var/lib/apt/lists/*

# Install bun runtime before building Copilot API fork
RUN curl -fsSL https://bun.sh/install | bash && \
ln -s /root/.bun/bin/bun /usr/local/bin/bun
# Install bun runtime system-wide (real binary, not a symlink into /root,
# so non-root users can run it too — cctrace compiles with it at image build)
RUN curl -fsSL https://bun.sh/install | BUN_INSTALL=/usr/local bash

# Install stable runtimes BEFORE volatile packages to maximize cache reuse
RUN curl -LsSf https://astral.sh/uv/install.sh | sh
Expand Down Expand Up @@ -208,13 +208,13 @@ FROM agent-base AS final

# Declare ARGs immediately before usage to minimize cache invalidation
ARG CLAUDE_CODE_VERSION=2.1.143
ARG CLAUDE_TRACE_VERSION=1.0.9
ARG CCTRACE_VERSION=0.4.0
ARG CODEX_VERSION=0.131.0
ARG GEMINI_CLI_VERSION=0.42.0

# Record key tool versions as labels for quick inspection
LABEL org.opencontainers.image.claude_code_version=${CLAUDE_CODE_VERSION}
LABEL org.opencontainers.image.claude_trace_version=${CLAUDE_TRACE_VERSION}
LABEL org.opencontainers.image.cctrace_version=${CCTRACE_VERSION}
LABEL org.opencontainers.image.codex_version=${CODEX_VERSION}
LABEL org.opencontainers.image.gemini_cli_version=${GEMINI_CLI_VERSION}

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile.rust
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.title="deva-rust"
LABEL org.opencontainers.image.description="Rust development environment with full toolchain"

ARG CLAUDE_CODE_VERSION=2.1.143
ARG CLAUDE_TRACE_VERSION=1.0.9
ARG CCTRACE_VERSION=0.4.0
ARG CODEX_VERSION=0.131.0
ARG GEMINI_CLI_VERSION=0.42.0
ARG CCX_VERSION=v0.7.0
Expand All @@ -19,7 +19,7 @@ ARG RUST_DEFAULT_TOOLCHAIN="stable"
ARG RUST_TARGETS="wasm32-unknown-unknown"

LABEL org.opencontainers.image.claude_code_version=${CLAUDE_CODE_VERSION}
LABEL org.opencontainers.image.claude_trace_version=${CLAUDE_TRACE_VERSION}
LABEL org.opencontainers.image.cctrace_version=${CCTRACE_VERSION}
LABEL org.opencontainers.image.codex_version=${CODEX_VERSION}
LABEL org.opencontainers.image.gemini_cli_version=${GEMINI_CLI_VERSION}
LABEL org.opencontainers.image.ccx_version=${CCX_VERSION}
Expand Down
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ DELTA_VERSION ?= 0.19.2
TMUX_VERSION ?= 3.6a
TMUX_SHA256 ?= b6d8d9c76585db8ef5fa00d4931902fa4b8cbe8166f528f44fc403961a3f3759
CLAUDE_CODE_VERSION ?= 2.1.143
CLAUDE_TRACE_VERSION ?= 1.0.9
CCTRACE_VERSION ?= 0.4.0
CODEX_VERSION ?= 0.131.0
GEMINI_CLI_VERSION ?= 0.42.0
CCX_VERSION ?= v0.1.4
Expand All @@ -56,7 +56,7 @@ CORE_BUILD_ARGS := $(TOOLCHAIN_BUILD_ARGS) \

AGENT_BUILD_ARGS := \
--build-arg CLAUDE_CODE_VERSION=$(CLAUDE_CODE_VERSION) \
--build-arg CLAUDE_TRACE_VERSION=$(CLAUDE_TRACE_VERSION) \
--build-arg CCTRACE_VERSION=$(CCTRACE_VERSION) \
--build-arg CODEX_VERSION=$(CODEX_VERSION) \
--build-arg GEMINI_CLI_VERSION=$(GEMINI_CLI_VERSION) \
--build-arg CCX_VERSION=$(CCX_VERSION)
Expand All @@ -78,7 +78,7 @@ VERSION_QUERY_OVERRIDES := \
$(if $(filter command line environment environment\ override override,$(origin TMUX_VERSION)),TMUX_VERSION=$(TMUX_VERSION)) \
$(if $(filter command line environment environment\ override override,$(origin TMUX_SHA256)),TMUX_SHA256=$(TMUX_SHA256)) \
$(if $(filter command line environment environment\ override override,$(origin CLAUDE_CODE_VERSION)),CLAUDE_CODE_VERSION=$(CLAUDE_CODE_VERSION)) \
$(if $(filter command line environment environment\ override override,$(origin CLAUDE_TRACE_VERSION)),CLAUDE_TRACE_VERSION=$(CLAUDE_TRACE_VERSION)) \
$(if $(filter command line environment environment\ override override,$(origin CCTRACE_VERSION)),CCTRACE_VERSION=$(CCTRACE_VERSION)) \
$(if $(filter command line environment environment\ override override,$(origin CODEX_VERSION)),CODEX_VERSION=$(CODEX_VERSION)) \
$(if $(filter command line environment environment\ override override,$(origin GEMINI_CLI_VERSION)),GEMINI_CLI_VERSION=$(GEMINI_CLI_VERSION)) \
$(if $(filter command line environment environment\ override override,$(origin CCX_VERSION)),CCX_VERSION=$(CCX_VERSION)) \
Expand Down Expand Up @@ -329,7 +329,7 @@ dev: build shell

context-size:
@echo "📏 Build context size:"
@du -sh . --exclude='.git' --exclude='node_modules' --exclude='.claude-trace'
@du -sh . --exclude='.git' --exclude='node_modules' --exclude='.claude-trace' --exclude='.cctrace'

lint:
@echo "🔍 Linting Dockerfile..."
Expand Down Expand Up @@ -400,7 +400,7 @@ help:
@echo " DELTA_VERSION delta version (default: $(DELTA_VERSION))"
@echo " TMUX_VERSION tmux version (default: $(TMUX_VERSION))"
@echo " CLAUDE_CODE_VERSION Claude CLI version (default: $(CLAUDE_CODE_VERSION))"
@echo " CLAUDE_TRACE_VERSION Claude trace version (default: $(CLAUDE_TRACE_VERSION))"
@echo " CCTRACE_VERSION cctrace version (default: $(CCTRACE_VERSION))"
@echo " CODEX_VERSION Codex CLI version (default: $(CODEX_VERSION))"
@echo " GEMINI_CLI_VERSION Gemini CLI version (default: $(GEMINI_CLI_VERSION))"
@echo " CCX_VERSION Atlas CLI version (default: $(CCX_VERSION))"
Expand Down
12 changes: 4 additions & 8 deletions agents/claude.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,8 @@ agent_prepare() {
AUTH_METHOD="$PARSED_AUTH_METHOD"
local -a remaining_args=("${PARSED_REMAINING_ARGS[@]+"${PARSED_REMAINING_ARGS[@]}"}")

# Detect --trace flag and extract trace options
# Detect --trace flag
local use_trace=false
local -a trace_args=()
local -a claude_args=()

if [ ${#remaining_args[@]} -gt 0 ]; then
Expand All @@ -27,8 +26,6 @@ agent_prepare() {
case "$arg" in
--trace)
use_trace=true
# Default trace options - include all requests for visibility
trace_args+=("--include-all-requests")
;;
*)
claude_args+=("$arg")
Expand All @@ -48,10 +45,9 @@ agent_prepare() {
done

if [ "$use_trace" = true ]; then
# Use claude-trace wrapper
AGENT_COMMAND=("claude-trace")
AGENT_COMMAND+=("${trace_args[@]}")
AGENT_COMMAND+=("--run-with")
# Use cctrace wrapper: captures everything by default,
# claude args go after "--"
AGENT_COMMAND=("cctrace" "--no-open" "--")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Force base-url tracing for Copilot auth

When this wrapper is used with --auth-with copilot, setup_claude_auth below exports ANTHROPIC_BASE_URL to the HTTP Copilot proxy, but this unconditional cctrace --no-open -- ... lets cctrace auto-select its default MITM mode for native Claude. That mode only routes HTTPS traffic via the proxy, so Claude's HTTP Copilot requests bypass cctrace and deva.sh claude --auth-with copilot -- --trace runs without capturing the LLM calls. Please force cctrace's base-url mode (before the --) for the Copilot/custom-base-url path.

Useful? React with 👍 / 👎.

if [ "$has_dangerously" = false ]; then
AGENT_COMMAND+=("--dangerously-skip-permissions")
fi
Expand Down
Loading
Loading