From 7d5dc12fe390f5292e04e14a20544eaabc5bd81b Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Tue, 7 Jul 2026 20:03:46 -0700 Subject: [PATCH 1/3] feat(trace): switch --trace backend from claude-trace to cctrace claude-trace's fetch hook only sees /v1/messages and is dead on native Claude binaries. cctrace MITM-captures the full surface (messages, OAuth, usage/credits, MCP) and auto-detects npm vs native installs. Snapshots land in .cctrace/ in the workspace. - run `cctrace --no-open -- `; entrypoint injects --dangerously-skip-permissions after the first "--" - compile the cctrace standalone binary at image build; bun's CLI eats a leading "--", the compiled binary receives argv directly - install bun system-wide via BUN_INSTALL=/usr/local; the old /root/.bun symlink was unusable by the deva user - rename pin CLAUDE_TRACE_VERSION -> CCTRACE_VERSION=0.4.0 across versions.env, Makefile, Dockerfiles, CI workflows, and registry Close #396 Co-Authored-By: Claude Fable 5 --- .dockerignore | 1 + .github/workflows/ci.yml | 4 +-- .github/workflows/nightly-images.yml | 6 ++-- .github/workflows/release.yml | 8 ++--- CHANGELOG.md | 16 +++++++++ DEV-LOGS.md | 9 +++++ Dockerfile | 10 +++--- Dockerfile.rust | 4 +-- Makefile | 10 +++--- agents/claude.sh | 12 +++---- claude.sh | 33 +++++++++---------- deva.sh | 2 +- docker-entrypoint.sh | 22 ++++++++----- docs/custom-images.md | 4 +-- scripts/install-agent-tooling.sh | 34 ++++++++++++++++--- scripts/release-utils.sh | 2 +- scripts/test-install-agent-tooling.sh | 47 ++++++++++++++++++++++++--- scripts/test-version-targets.sh | 12 +++---- scripts/toolchain-report.sh | 2 +- scripts/update-version-pins.sh | 4 +-- scripts/version-pins.sh | 2 +- scripts/version-upgrade.sh | 14 ++++---- tests/test_release_utils.sh | 6 ++-- tests/version-upgrade.sh | 18 +++++----- versions.env | 2 +- 25 files changed, 186 insertions(+), 98 deletions(-) diff --git a/.dockerignore b/.dockerignore index f3e64e5..25f44aa 100644 --- a/.dockerignore +++ b/.dockerignore @@ -34,6 +34,7 @@ references/ # Claude trace logs .claude-trace/ +.cctrace/ # Build artifacts *.tar diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7603e6b..26388f8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -76,7 +76,7 @@ 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 }}" \ @@ -97,7 +97,7 @@ 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 }}" \ diff --git a/.github/workflows/nightly-images.yml b/.github/workflows/nightly-images.yml index 4d95ec2..f1476c3 100644 --- a/.github/workflows/nightly-images.yml +++ b/.github/workflows/nightly-images.yml @@ -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 }} @@ -137,7 +137,7 @@ 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 }} @@ -190,7 +190,7 @@ 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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c3b5bc8..354d744 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -47,7 +47,7 @@ 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 }} @@ -81,7 +81,7 @@ 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 }}\` @@ -144,7 +144,7 @@ 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 }} @@ -199,7 +199,7 @@ 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 }} diff --git a/CHANGELOG.md b/CHANGELOG.md index f3b0962..01f8908 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/DEV-LOGS.md b/DEV-LOGS.md index ab6db16..486fe01 100644 --- a/DEV-LOGS.md +++ b/DEV-LOGS.md @@ -13,6 +13,15 @@ - Minimal markdown markers, no unnecessary formatting, minimal emojis. - Reference issue numbers in the format `#` 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 -- ` 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: diff --git a/Dockerfile b/Dockerfile index de09e9c..df39049 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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} diff --git a/Dockerfile.rust b/Dockerfile.rust index 1bff18d..829d292 100644 --- a/Dockerfile.rust +++ b/Dockerfile.rust @@ -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 @@ -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} diff --git a/Makefile b/Makefile index f928552..f675596 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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) @@ -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)) \ @@ -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..." @@ -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))" diff --git a/agents/claude.sh b/agents/claude.sh index ccd07a8..cf0f1ce 100644 --- a/agents/claude.sh +++ b/agents/claude.sh @@ -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 @@ -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") @@ -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" "--") if [ "$has_dangerously" = false ]; then AGENT_COMMAND+=("--dangerously-skip-permissions") fi diff --git a/claude.sh b/claude.sh index 03f762d..b431899 100755 --- a/claude.sh +++ b/claude.sh @@ -19,7 +19,7 @@ show_help() { echo "This script runs Claude CLI either locally or in a Docker container with YOLO mode." echo "" echo "Options:" - echo " --trace Use claude-trace for logging" + echo " --trace Use cctrace for request tracing" echo " --verbose Show verbose output including environment info" echo " --help, -h Show this help message" echo " --version Show version information" @@ -837,7 +837,7 @@ done run_claude_local() { CLAUDE_PATH="" - CLAUDE_TRACE_PATH="" + CCTRACE_PATH="" # 1. Check if claude is in PATH (global install) if command -v claude >/dev/null 2>&1; then @@ -863,18 +863,15 @@ run_claude_local() { exit 1 fi - # Try to find claude-trace in similar order - if command -v claude-trace >/dev/null 2>&1; then - CLAUDE_TRACE_PATH="claude-trace" - elif command -v npm >/dev/null 2>&1; then - NPM_PREFIX=$(npm prefix -g 2>/dev/null || echo "") - if [ -n "$NPM_PREFIX" ] && [ -x "$NPM_PREFIX/bin/claude-trace" ]; then - CLAUDE_TRACE_PATH="$NPM_PREFIX/bin/claude-trace" - fi + # Try to find cctrace in similar order + if command -v cctrace >/dev/null 2>&1; then + CCTRACE_PATH="cctrace" + elif [ -x "$HOME/.local/bin/cctrace" ]; then + CCTRACE_PATH="$HOME/.local/bin/cctrace" fi - # Fallback to just "claude-trace" if not found but trace requested - [ -z "$CLAUDE_TRACE_PATH" ] && CLAUDE_TRACE_PATH="claude-trace" + # Fallback to just "cctrace" if not found but trace requested + [ -z "$CCTRACE_PATH" ] && CCTRACE_PATH="cctrace" case "$AUTH_MODE" in "bedrock") @@ -1078,12 +1075,12 @@ run_claude_local() { fi if [ "$USE_TRACE" = true ]; then - if command -v "$CLAUDE_TRACE_PATH" >/dev/null 2>&1; then - CLAUDE_CMD="$CLAUDE_TRACE_PATH" - FINAL_ARGS=("--include-all-requests" "--run-with" "${CLAUDE_ARGS[@]}") + if command -v "$CCTRACE_PATH" >/dev/null 2>&1; then + CLAUDE_CMD="$CCTRACE_PATH" + FINAL_ARGS=("--" "${CLAUDE_ARGS[@]}") else - echo "error: claude-trace not found but --trace was requested" >&2 - echo "install claude-trace with: npm install -g @mariozechner/claude-trace" >&2 + echo "error: cctrace not found but --trace was requested" >&2 + echo "install cctrace: https://github.com/thevibeworks/cctrace (make install)" >&2 exit 1 fi else @@ -1681,7 +1678,7 @@ fi if [ "$OPEN_SHELL" = true ]; then DOCKER_ARGS+=("/bin/zsh") elif [ "$USE_TRACE" = true ]; then - DOCKER_ARGS+=("claude-trace" "--include-all-requests" "--run-with" "${CLAUDE_ARGS[@]}") + DOCKER_ARGS+=("cctrace" "--no-open" "--" "${CLAUDE_ARGS[@]}") else DOCKER_ARGS+=("claude" "${CLAUDE_ARGS[@]}") fi diff --git a/deva.sh b/deva.sh index 674d8f6..f23ee43 100755 --- a/deva.sh +++ b/deva.sh @@ -202,7 +202,7 @@ Examples: Advanced: deva.sh codex -v ~/.ssh:/home/deva/.ssh:ro -- -m gpt-5-codex - deva.sh claude -- --trace --continue # Use claude-trace wrapper for request tracing + deva.sh claude -- --trace --continue # Trace requests with cctrace deva.sh --show-config # Debug configuration deva.sh --no-docker claude # Disable Docker-in-Docker auto-mount USAGE diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index f5b6dc1..35fb7dd 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -367,30 +367,36 @@ main() { else build_gosu_env_cmd "$DEVA_USER" "$cmd" "$@" --dangerously-skip-permissions fi - elif [ "$cmd" = "claude-trace" ]; then - # claude-trace: ensure --dangerously-skip-permissions follows --run-with - local has_dsp=false + elif [ "$cmd" = "cctrace" ]; then + # cctrace: claude args follow "--"; ensure + # --dangerously-skip-permissions is among them + local has_dsp=false has_sep=false for arg in "$@"; do if [ "$arg" = "--dangerously-skip-permissions" ]; then has_dsp=true - break + elif [ "$arg" = "--" ]; then + has_sep=true fi done if [ "$has_dsp" = true ]; then # Already has --dangerously-skip-permissions, pass through build_gosu_env_cmd "$DEVA_USER" "$cmd" "$@" - else - # Insert --dangerously-skip-permissions after --run-with + elif [ "$has_sep" = true ]; then + # Insert --dangerously-skip-permissions after the first "--" args=("$@") new_args=() + local inserted=false for arg in "${args[@]}"; do - if [ "$arg" = "--run-with" ]; then - new_args+=("--run-with" "--dangerously-skip-permissions") + if [ "$arg" = "--" ] && [ "$inserted" = false ]; then + new_args+=("--" "--dangerously-skip-permissions") + inserted=true else new_args+=("$arg") fi done build_gosu_env_cmd "$DEVA_USER" "$cmd" "${new_args[@]}" + else + build_gosu_env_cmd "$DEVA_USER" "$cmd" "$@" -- --dangerously-skip-permissions fi else build_gosu_env_cmd "$DEVA_USER" "$cmd" "$@" diff --git a/docs/custom-images.md b/docs/custom-images.md index 81a9165..8ce9606 100644 --- a/docs/custom-images.md +++ b/docs/custom-images.md @@ -71,7 +71,7 @@ docker build -t deva-local:latest \ --build-arg TMUX_VERSION="$TMUX_VERSION" \ --build-arg TMUX_SHA256="$TMUX_SHA256" \ --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 ATLAS_CLI_VERSION="$ATLAS_CLI_VERSION" \ @@ -90,7 +90,7 @@ docker build -f Dockerfile --target agent-base -t deva-local:core \ docker build -f Dockerfile.rust -t deva-local:rust \ --build-arg BASE_IMAGE=deva-local:core \ --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 ATLAS_CLI_VERSION="$ATLAS_CLI_VERSION" \ diff --git a/scripts/install-agent-tooling.sh b/scripts/install-agent-tooling.sh index 02ade8c..ee64386 100644 --- a/scripts/install-agent-tooling.sh +++ b/scripts/install-agent-tooling.sh @@ -8,7 +8,7 @@ set -euo pipefail : "${CODEX_VERSION:?CODEX_VERSION is required}" : "${GEMINI_CLI_VERSION:?GEMINI_CLI_VERSION is required}" -CLAUDE_TRACE_VERSION="${CLAUDE_TRACE_VERSION:-1.0.9}" +CCTRACE_VERSION="${CCTRACE_VERSION:-0.4.0}" CCX_VERSION="${CCX_VERSION:-v0.7.0}" CCX_REPO="${CCX_REPO:-thevibeworks/ccx}" @@ -119,7 +119,7 @@ download_to() { install_npm_agent_tooling() { log "Installing npm agent tooling" - log "Requested versions: claude=${CLAUDE_CODE_VERSION} claude-trace=${CLAUDE_TRACE_VERSION} codex=${CODEX_VERSION} gemini=${GEMINI_CLI_VERSION}" + log "Requested versions: claude=${CLAUDE_CODE_VERSION} codex=${CODEX_VERSION} gemini=${GEMINI_CLI_VERSION}" mkdir -p "$DEVA_HOME/.npm-global" "$DEVA_HOME/.local/bin" npm config set prefix "$DEVA_HOME/.npm-global" @@ -128,7 +128,6 @@ install_npm_agent_tooling() { retry_cmd 3 "npm install agent tooling" \ npm install -g --verbose --no-audit --no-fund \ "@anthropic-ai/claude-code@${CLAUDE_CODE_VERSION}" \ - "@mariozechner/claude-trace@${CLAUDE_TRACE_VERSION}" \ "@openai/codex@${CODEX_VERSION}" \ "@google/gemini-cli@${GEMINI_CLI_VERSION}" \ || die "npm install failed" @@ -139,7 +138,6 @@ install_npm_agent_tooling() { "$DEVA_HOME/.npm-global/bin/claude" --version "$DEVA_HOME/.npm-global/bin/codex" --version "$DEVA_HOME/.npm-global/bin/gemini" --version - "$DEVA_HOME/.npm-global/bin/claude-trace" --help >/dev/null (npm list -g --depth=0 @anthropic-ai/claude-code @openai/codex @google/gemini-cli || true) } @@ -245,11 +243,39 @@ install_ccx() { log "ccx installed" } +# cctrace ships no prebuilt binaries; compile the standalone binary with bun. +# The compiled binary receives argv directly, so `cctrace -- ` +# works (bun's CLI would eat the leading "--"). +install_cctrace() { + ensure_safe_cwd + mkdir -p "$DEVA_HOME/.local/bin" + + log "Installing cctrace pinned to ${CCTRACE_VERSION}" + command -v bun >/dev/null 2>&1 || die "bun is required to build cctrace" + + local tmp_dir + tmp_dir="$(mktemp -d)" + ( + cd "$tmp_dir" + retry_cmd 3 "npm pack cctrace" \ + npm pack "@thevibeworks/cctrace@${CCTRACE_VERSION}" \ + || die "npm pack @thevibeworks/cctrace failed" + tar -xzf thevibeworks-cctrace-*.tgz + cd package + bun build --compile --outfile "$DEVA_HOME/.local/bin/cctrace" src/cli.ts + ) + rm -rf "$tmp_dir" + + "$DEVA_HOME/.local/bin/cctrace" --help >/dev/null || die "cctrace verification failed" + log "cctrace installed" +} + main() { ensure_safe_cwd log "Installing shared agent tooling into $DEVA_HOME" install_npm_agent_tooling install_ccx + install_cctrace } main "$@" diff --git a/scripts/release-utils.sh b/scripts/release-utils.sh index 4b69b52..3fca661 100755 --- a/scripts/release-utils.sh +++ b/scripts/release-utils.sh @@ -31,7 +31,7 @@ TOOL_REGISTRY=( "gemini-cli|npm|@google/gemini-cli|org.opencontainers.image.gemini_cli_version|https://www.npmjs.com/package/@google/gemini-cli||agent|main" "ccx|github-release|thevibeworks/ccx|org.opencontainers.image.ccx_version|https://github.com/thevibeworks/ccx|github:thevibeworks/ccx|agent|main" "copilot-api|github-commit|ericc-ch/copilot-api|org.opencontainers.image.copilot_api_version|https://github.com/ericc-ch/copilot-api||agent|main" - "claude-trace|npm|@mariozechner/claude-trace|org.opencontainers.image.claude_trace_version|https://www.npmjs.com/package/@mariozechner/claude-trace|github:mariozechner/claude-trace|agent|main" + "cctrace|npm|@thevibeworks/cctrace|org.opencontainers.image.cctrace_version|https://www.npmjs.com/package/@thevibeworks/cctrace|github:thevibeworks/cctrace|agent|main" "playwright|npm|playwright|org.opencontainers.image.playwright_version|https://www.npmjs.com/package/playwright|github:microsoft/playwright|browser|rust" ) diff --git a/scripts/test-install-agent-tooling.sh b/scripts/test-install-agent-tooling.sh index 313e563..9bcf98c 100755 --- a/scripts/test-install-agent-tooling.sh +++ b/scripts/test-install-agent-tooling.sh @@ -34,19 +34,28 @@ config) ;; install) mkdir -p "$DEVA_HOME/.npm-global/bin" - for bin in claude codex gemini claude-trace; do + for bin in claude codex gemini; do cat >"$DEVA_HOME/.npm-global/bin/$bin" <<'BIN' #!/usr/bin/env bash case "$(basename "$0")" in claude) echo "__CLAUDE_CODE_VERSION__ (Claude Code)" ;; codex) echo "codex-cli __CODEX_VERSION__" ;; gemini) echo "__GEMINI_CLI_VERSION__" ;; - claude-trace) exit 0 ;; esac BIN chmod +x "$DEVA_HOME/.npm-global/bin/$bin" done ;; +pack) + spec="${1:?pack spec required}" + ver="${spec##*@}" + workdir="$(mktemp -d)" + mkdir -p "$workdir/package/src" + printf '%s\n' '// fake cctrace cli' >"$workdir/package/src/cli.ts" + tar -czf "thevibeworks-cctrace-${ver}.tgz" -C "$workdir" package + rm -rf "$workdir" + printf 'thevibeworks-cctrace-%s.tgz\n' "$ver" + ;; cache) ;; list) @@ -121,7 +130,33 @@ BIN chmod +x "$GOBIN/ccx" EOF -chmod +x "$fake_bin/npm" "$fake_bin/curl" "$fake_bin/go" +cat >"$fake_bin/bun" <<'EOF' +#!/usr/bin/env bash +set -euo pipefail + +# expects: bun build --compile --outfile src/cli.ts +out="" +while [[ $# -gt 0 ]]; do + case "$1" in + --outfile) + out="$2" + shift 2 + ;; + *) + shift + ;; + esac +done +[ -n "$out" ] || exit 1 +mkdir -p "$(dirname "$out")" +cat >"$out" <<'BIN' +#!/usr/bin/env bash +exit 0 +BIN +chmod +x "$out" +EOF + +chmod +x "$fake_bin/npm" "$fake_bin/curl" "$fake_bin/go" "$fake_bin/bun" mkdir -p "$tmp_root/deny" ( @@ -133,7 +168,7 @@ mkdir -p "$tmp_root/deny" HOME="$fake_home" \ DEVA_HOME="$fake_home" \ CLAUDE_CODE_VERSION="$CLAUDE_CODE_VERSION" \ - CLAUDE_TRACE_VERSION="$CLAUDE_TRACE_VERSION" \ + CCTRACE_VERSION="$CCTRACE_VERSION" \ CODEX_VERSION="$CODEX_VERSION" \ GEMINI_CLI_VERSION="$GEMINI_CLI_VERSION" \ CCX_VERSION="$CCX_VERSION" \ @@ -143,9 +178,11 @@ mkdir -p "$tmp_root/deny" grep -F "Current working directory is not accessible; switching to $fake_home" <<<"$output" >/dev/null grep -F "Installing npm agent tooling" <<<"$output" >/dev/null - grep -F "claude-trace=$CLAUDE_TRACE_VERSION" <<<"$output" >/dev/null grep -F "Installing ccx pinned to $CCX_VERSION" <<<"$output" >/dev/null grep -F "falling back to go install" <<<"$output" >/dev/null grep -F "ccx installed" <<<"$output" >/dev/null test -x "$fake_home/.local/bin/ccx" + grep -F "Installing cctrace pinned to $CCTRACE_VERSION" <<<"$output" >/dev/null + grep -F "cctrace installed" <<<"$output" >/dev/null + test -x "$fake_home/.local/bin/cctrace" ) diff --git a/scripts/test-version-targets.sh b/scripts/test-version-targets.sh index c46f300..7a859fd 100755 --- a/scripts/test-version-targets.sh +++ b/scripts/test-version-targets.sh @@ -28,7 +28,7 @@ cd "$REPO_ROOT" default_versions_up="$(make -n versions-up)" assert_absent "CLAUDE_CODE_VERSION=" "$default_versions_up" -assert_absent "CLAUDE_TRACE_VERSION=" "$default_versions_up" +assert_absent "CCTRACE_VERSION=" "$default_versions_up" assert_absent "CODEX_VERSION=" "$default_versions_up" assert_absent "GEMINI_CLI_VERSION=" "$default_versions_up" assert_absent "CCX_VERSION=" "$default_versions_up" @@ -38,7 +38,7 @@ assert_present "./scripts/version-upgrade.sh" "$default_versions_up" default_versions="$(make -n versions)" assert_absent "CLAUDE_CODE_VERSION=" "$default_versions" -assert_absent "CLAUDE_TRACE_VERSION=" "$default_versions" +assert_absent "CCTRACE_VERSION=" "$default_versions" assert_absent "CODEX_VERSION=" "$default_versions" assert_absent "GEMINI_CLI_VERSION=" "$default_versions" assert_absent "CCX_VERSION=" "$default_versions" @@ -48,7 +48,7 @@ assert_present "./scripts/version-report.sh" "$default_versions" override_versions_up="$( make -n \ CLAUDE_CODE_VERSION=9.9.9 \ - CLAUDE_TRACE_VERSION=1.2.3 \ + CCTRACE_VERSION=1.2.3 \ CODEX_VERSION=8.8.8 \ GEMINI_CLI_VERSION=7.7.7 \ CCX_VERSION=v6.6.6 \ @@ -57,7 +57,7 @@ override_versions_up="$( versions-up )" assert_present "CLAUDE_CODE_VERSION=9.9.9" "$override_versions_up" -assert_present "CLAUDE_TRACE_VERSION=1.2.3" "$override_versions_up" +assert_present "CCTRACE_VERSION=1.2.3" "$override_versions_up" assert_present "CODEX_VERSION=8.8.8" "$override_versions_up" assert_present "GEMINI_CLI_VERSION=7.7.7" "$override_versions_up" assert_present "CCX_VERSION=v6.6.6" "$override_versions_up" @@ -67,7 +67,7 @@ assert_present "PLAYWRIGHT_VERSION=1.2.4" "$override_versions_up" override_versions="$( make -n \ CLAUDE_CODE_VERSION=9.9.9 \ - CLAUDE_TRACE_VERSION=1.2.3 \ + CCTRACE_VERSION=1.2.3 \ CODEX_VERSION=8.8.8 \ GEMINI_CLI_VERSION=7.7.7 \ CCX_VERSION=v6.6.6 \ @@ -75,7 +75,7 @@ override_versions="$( versions )" assert_present "CLAUDE_CODE_VERSION=9.9.9" "$override_versions" -assert_present "CLAUDE_TRACE_VERSION=1.2.3" "$override_versions" +assert_present "CCTRACE_VERSION=1.2.3" "$override_versions" assert_present "CODEX_VERSION=8.8.8" "$override_versions" assert_present "GEMINI_CLI_VERSION=7.7.7" "$override_versions" assert_present "CCX_VERSION=v6.6.6" "$override_versions" diff --git a/scripts/toolchain-report.sh b/scripts/toolchain-report.sh index a70dc75..b862f88 100644 --- a/scripts/toolchain-report.sh +++ b/scripts/toolchain-report.sh @@ -30,7 +30,7 @@ main() { heading "Agent Tools (auto-upgraded by make versions-up)" line "Claude Code:" "$CLAUDE_CODE_VERSION" - line "Claude Trace:" "$CLAUDE_TRACE_VERSION" + line "cctrace:" "$CCTRACE_VERSION" line "Codex:" "$CODEX_VERSION" line "Gemini CLI:" "$GEMINI_CLI_VERSION" line "CCX:" "$CCX_VERSION" diff --git a/scripts/update-version-pins.sh b/scripts/update-version-pins.sh index cbd142b..ee35599 100644 --- a/scripts/update-version-pins.sh +++ b/scripts/update-version-pins.sh @@ -61,7 +61,7 @@ TMUX_VERSION=$TMUX_VERSION TMUX_SHA256=$TMUX_SHA256 CLAUDE_CODE_VERSION=$CLAUDE_CODE_VERSION -CLAUDE_TRACE_VERSION=$CLAUDE_TRACE_VERSION +CCTRACE_VERSION=$CCTRACE_VERSION CODEX_VERSION=$CODEX_VERSION GEMINI_CLI_VERSION=$GEMINI_CLI_VERSION CCX_VERSION=$CCX_VERSION @@ -98,7 +98,7 @@ main() { refresh_pin GO_VERSION "$(fetch_go_version)" refresh_pin DELTA_VERSION "$(fetch_latest_git_tag https://github.com/dandavison/delta.git)" refresh_pin CLAUDE_CODE_VERSION "$(fetch_npm_version @anthropic-ai/claude-code)" - refresh_pin CLAUDE_TRACE_VERSION "$(fetch_npm_version @mariozechner/claude-trace)" + refresh_pin CCTRACE_VERSION "$(fetch_npm_version @thevibeworks/cctrace)" refresh_pin CODEX_VERSION "$(fetch_npm_version @openai/codex)" refresh_pin GEMINI_CLI_VERSION "$(fetch_npm_version @google/gemini-cli)" refresh_pin CCX_VERSION "$(fetch_latest_git_tag https://github.com/thevibeworks/ccx.git)" diff --git a/scripts/version-pins.sh b/scripts/version-pins.sh index 351550a..3908032 100644 --- a/scripts/version-pins.sh +++ b/scripts/version-pins.sh @@ -14,7 +14,7 @@ VERSION_PIN_VARS=( TMUX_VERSION TMUX_SHA256 CLAUDE_CODE_VERSION - CLAUDE_TRACE_VERSION + CCTRACE_VERSION CODEX_VERSION GEMINI_CLI_VERSION CCX_VERSION diff --git a/scripts/version-upgrade.sh b/scripts/version-upgrade.sh index 6d40a02..4e17ce9 100755 --- a/scripts/version-upgrade.sh +++ b/scripts/version-upgrade.sh @@ -13,7 +13,7 @@ source "$SCRIPT_DIR/release-utils.sh" # $(origin) is command-line/environment/override, so anything already set # here is a genuine user override — not a pin default. _CLI_CLAUDE_CODE="${CLAUDE_CODE_VERSION:-}" -_CLI_CLAUDE_TRACE="${CLAUDE_TRACE_VERSION:-}" +_CLI_CCTRACE="${CCTRACE_VERSION:-}" _CLI_CODEX="${CODEX_VERSION:-}" _CLI_GEMINI="${GEMINI_CLI_VERSION:-}" _CLI_CCX="${CCX_VERSION:-}" @@ -47,7 +47,7 @@ Environment: RUST_IMAGE Rust image name (default: ghcr.io/thevibeworks/deva:rust) VERSION_PINS_FILE Shared version pin file (default: versions.env) CLAUDE_CODE_VERSION Override claude-code version - CLAUDE_TRACE_VERSION Override claude-trace version + CCTRACE_VERSION Override cctrace version CODEX_VERSION Override codex version GEMINI_CLI_VERSION Override gemini-cli version CCX_VERSION Override ccx version @@ -87,9 +87,9 @@ main() { # Resolve build versions early so we can show the manifest before countdown. # CLI override wins; otherwise use whatever load_versions fetched. - local claude_ver claude_trace_ver codex_ver gemini_ver ccx_ver copilot_ver playwright_ver + local claude_ver cctrace_ver codex_ver gemini_ver ccx_ver copilot_ver playwright_ver claude_ver="${_CLI_CLAUDE_CODE:-$(get_latest "claude-code")}" - claude_trace_ver="${_CLI_CLAUDE_TRACE:-$(get_latest "claude-trace")}" + cctrace_ver="${_CLI_CCTRACE:-$(get_latest "cctrace")}" codex_ver="${_CLI_CODEX:-$(get_latest "codex")}" gemini_ver="${_CLI_GEMINI:-$(get_latest "gemini-cli")}" ccx_ver="${_CLI_CCX:-$(get_latest "ccx")}" @@ -114,7 +114,7 @@ main() { # Collect lines by status, then render upgrades first for visibility. local _manifest_pairs=( "Claude Code|claude_ver|_CLI_CLAUDE_CODE|claude-code" - "Claude Trace|claude_trace_ver|_CLI_CLAUDE_TRACE|claude-trace" + "cctrace|cctrace_ver|_CLI_CCTRACE|cctrace" "Codex|codex_ver|_CLI_CODEX|codex" "CCX|ccx_ver|_CLI_CCX|ccx" "Copilot API|copilot_ver|_CLI_COPILOT|copilot-api" @@ -217,7 +217,7 @@ main() { --build-arg TMUX_VERSION="$TMUX_VERSION" \ --build-arg TMUX_SHA256="$TMUX_SHA256" \ --build-arg CLAUDE_CODE_VERSION="$claude_ver" \ - --build-arg CLAUDE_TRACE_VERSION="$claude_trace_ver" \ + --build-arg CCTRACE_VERSION="$cctrace_ver" \ --build-arg CODEX_VERSION="$codex_ver" \ --build-arg GEMINI_CLI_VERSION="$gemini_ver" \ --build-arg CCX_VERSION="$ccx_ver" \ @@ -229,7 +229,7 @@ main() { docker build -f "$RUST_DOCKERFILE" \ --build-arg BASE_IMAGE="$CORE_IMAGE" \ --build-arg CLAUDE_CODE_VERSION="$claude_ver" \ - --build-arg CLAUDE_TRACE_VERSION="$claude_trace_ver" \ + --build-arg CCTRACE_VERSION="$cctrace_ver" \ --build-arg CODEX_VERSION="$codex_ver" \ --build-arg GEMINI_CLI_VERSION="$gemini_ver" \ --build-arg CCX_VERSION="$ccx_ver" \ diff --git a/tests/test_release_utils.sh b/tests/test_release_utils.sh index 934a88d..30a0657 100644 --- a/tests/test_release_utils.sh +++ b/tests/test_release_utils.sh @@ -129,7 +129,7 @@ assert_eq "caller 'image' not clobbered" "caller-image" "${leak_after##*|}" # ───── get_tools_by_group ───── section "get_tools_by_group" agent_tools="$(get_tools_by_group agent | sort | tr '\n' ' ' | sed 's/ $//')" -expected_agent="ccx claude-code claude-trace codex copilot-api gemini-cli" +expected_agent="cctrace ccx claude-code codex copilot-api gemini-cli" assert_eq "group=agent" "$expected_agent" "$agent_tools" browser_tools="$(get_tools_by_group browser | sort | tr '\n' ' ' | sed 's/ $//')" @@ -144,7 +144,7 @@ assert_eq "group=does-not-exist" "" "$nonexistent_group" # ───── get_tools_by_image ───── section "get_tools_by_image" main_tools="$(get_tools_by_image main | sort | tr '\n' ' ' | sed 's/ $//')" -expected_main="ccx claude-code claude-trace codex copilot-api gemini-cli" +expected_main="cctrace ccx claude-code codex copilot-api gemini-cli" assert_eq "image=main" "$expected_main" "$main_tools" rust_tools="$(get_tools_by_image rust | sort | tr '\n' ' ' | sed 's/ $//')" @@ -156,7 +156,7 @@ assert_eq "image=base (empty until Step 3)" "" "$base_tools" # ───── filter_tools: scope resolution ───── section "filter_tools: default (no scope)" default_all="$(unset GROUP TOOL IMAGE; filter_tools | sort | tr '\n' ' ' | sed 's/ $//')" -expected_all="ccx claude-code claude-trace codex copilot-api gemini-cli playwright" +expected_all="cctrace ccx claude-code codex copilot-api gemini-cli playwright" assert_eq "default returns all 7" "$expected_all" "$default_all" section "filter_tools: TOOL= scope" diff --git a/tests/version-upgrade.sh b/tests/version-upgrade.sh index f30a303..bdd1209 100644 --- a/tests/version-upgrade.sh +++ b/tests/version-upgrade.sh @@ -23,7 +23,7 @@ inspect) cat <<'JSON' [{"Config":{"Labels":{ "org.opencontainers.image.claude_code_version":"2.1.81", - "org.opencontainers.image.claude_trace_version":"1.0.8", + "org.opencontainers.image.cctrace_version":"0.3.0", "org.opencontainers.image.codex_version":"0.116.0", "org.opencontainers.image.gemini_cli_version":"0.35.0", "org.opencontainers.image.ccx_version":"v0.7.0", @@ -58,11 +58,11 @@ case "${2:-}" in @anthropic-ai/claude-code@2.1.87) echo '{"2.1.87":"2026-03-29T01:40:00Z"}' ;; -@mariozechner/claude-trace) - echo "1.0.9" +@thevibeworks/cctrace) + echo "0.4.0" ;; -@mariozechner/claude-trace@1.0.9) - echo '{"1.0.9":"2026-03-29T01:40:00Z"}' +@thevibeworks/cctrace@0.4.0) + echo '{"0.4.0":"2026-03-29T01:40:00Z"}' ;; @openai/codex) echo "0.117.0" @@ -114,7 +114,7 @@ repos/ericc-ch/copilot-api/commits/0ea08febdd7e3e055b03dd298bf57e669500b5c1) repos/openai/codex/releases) echo '[]' ;; -repos/mariozechner/claude-trace/releases) +repos/thevibeworks/cctrace/releases) echo '[]' ;; repos/microsoft/playwright/releases) @@ -143,7 +143,7 @@ BUILD_IMAGE="ghcr.io/thevibeworks/deva:latest" \ CORE_IMAGE="ghcr.io/thevibeworks/deva:core" \ RUST_IMAGE="ghcr.io/thevibeworks/deva:rust" \ GO_VERSION="1.26.2" \ -CLAUDE_TRACE_VERSION="1.0.9" \ +CCTRACE_VERSION="0.4.0" \ PLAYWRIGHT_VERSION="1.60.0" \ "$REPO_ROOT/scripts/version-upgrade.sh" >/dev/null @@ -169,7 +169,7 @@ done for expected in \ "--build-arg CLAUDE_CODE_VERSION=2.1.87" \ - "--build-arg CLAUDE_TRACE_VERSION=1.0.9" \ + "--build-arg CCTRACE_VERSION=0.4.0" \ "--build-arg CODEX_VERSION=0.117.0" \ "--build-arg GEMINI_CLI_VERSION=0.35.3" \ "--build-arg CCX_VERSION=v0.7.0" \ @@ -185,7 +185,7 @@ done for expected in \ "--build-arg BASE_IMAGE=ghcr.io/thevibeworks/deva:core" \ "--build-arg CLAUDE_CODE_VERSION=2.1.87" \ - "--build-arg CLAUDE_TRACE_VERSION=1.0.9" \ + "--build-arg CCTRACE_VERSION=0.4.0" \ "--build-arg CODEX_VERSION=0.117.0" \ "--build-arg GEMINI_CLI_VERSION=0.35.3" \ "--build-arg CCX_VERSION=v0.7.0" \ diff --git a/versions.env b/versions.env index a92f875..948f70d 100644 --- a/versions.env +++ b/versions.env @@ -9,7 +9,7 @@ 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.7.0 From 36457b7ed0aff037bd13ecdde7ff3597359d6d34 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Tue, 7 Jul 2026 20:17:22 -0700 Subject: [PATCH 2/3] docs: add Request Tracing section for --trace/cctrace Co-Authored-By: Claude Fable 5 --- docs/advanced-usage.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/advanced-usage.md b/docs/advanced-usage.md index c5309cc..ee758e0 100644 --- a/docs/advanced-usage.md +++ b/docs/advanced-usage.md @@ -160,6 +160,22 @@ Use them in that order: The printed `docker run` line is diagnostic output. It masks secrets and may contain unquoted values. Read it. Do not blindly paste it back into a shell and then complain when your shell parses spaces like spaces. +## Request Tracing + +```bash +deva.sh claude -- --trace --continue +``` + +`--trace` wraps Claude with [cctrace](https://github.com/thevibeworks/cctrace), +which records every API call Claude makes — messages, OAuth, usage/credits, +MCP — not just the chat endpoint. Everything else on the line goes to Claude +unchanged. + +Traces land in `.cctrace/` inside your workspace, so they survive the +container. Each run writes a JSONL log plus a self-contained HTML snapshot you +can open in a browser on the host. Credentials are redacted before anything +hits disk. + ## Risk Knobs ### Docker Socket From e9fc499e60b78539abc694cdf7517026b87a3aa6 Mon Sep 17 00:00:00 2001 From: Eric Wang Date: Tue, 7 Jul 2026 20:17:22 -0700 Subject: [PATCH 3/3] fix(ci): pass CCX_VERSION build-arg, drop dead ATLAS_CLI wiring - version-pins.sh and resolve-tool-versions.sh emit ccx_version; every atlas_cli_version output was empty, so ATLAS_CLI_VERSION matched no Dockerfile ARG and ccx silently pinned to the ARG default instead of versions.env Co-Authored-By: Claude Fable 5 --- .github/workflows/ci.yml | 4 ++-- .github/workflows/nightly-images.yml | 8 ++++---- .github/workflows/release.yml | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 26388f8..d8de931 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,7 +79,7 @@ jobs: --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 }}" \ . @@ -100,7 +100,7 @@ jobs: 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 }}" \ diff --git a/.github/workflows/nightly-images.yml b/.github/workflows/nightly-images.yml index f1476c3..7d0a4ea 100644 --- a/.github/workflows/nightly-images.yml +++ b/.github/workflows/nightly-images.yml @@ -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 @@ -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 @@ -140,7 +140,7 @@ jobs: 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: @@ -193,7 +193,7 @@ jobs: 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 }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 354d744..8bcf5ef 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -50,7 +50,7 @@ jobs: 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 }} @@ -84,7 +84,7 @@ jobs: - 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 }}\` @@ -147,7 +147,7 @@ jobs: 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: @@ -202,7 +202,7 @@ jobs: 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 }}