Claude Code Claude Opus 4.6 commited on
Commit
444f882
Β·
1 Parent(s): 2bc32e8

Claude Code: Remove A2A gateway and frontend for minimal Gradio mode

Browse files

- Remove A2A gateway installation (RUN block)
- Remove frontend COPY step (missing directory)
- Disable token-redirect.cjs preload (depends on A2A)
- Goal: Get Cain running in minimal mode (Gradio only)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Files changed (2) hide show
  1. Dockerfile +5 -18
  2. scripts/entrypoint.sh +2 -1
Dockerfile CHANGED
@@ -88,15 +88,8 @@ ENV HOME=/home/node
88
  WORKDIR /app
89
 
90
  # ── A2A Gateway Extension ───────────────────────────────────────────────────
91
- # Install extension as non-root user
92
- RUN echo "[build] Installing A2A gateway..." && START=$(date +%s) \
93
- && (git clone --depth 1 https://github.com/win4r/openclaw-a2a-gateway.git \
94
- /app/openclaw/extensions/a2a-gateway || \
95
- (sleep 5 && git clone --depth 1 https://github.com/win4r/openclaw-a2a-gateway.git \
96
- /app/openclaw/extensions/a2a-gateway)) \
97
- && cd /app/openclaw/extensions/a2a-gateway \
98
- && npm install --production --no-cache-dir \
99
- && echo "[build] A2A gateway: $(($(date +%s) - START))s"
100
 
101
  # ── Coding Agent Extension (local β€” no git clone needed) ─────────────────────
102
  COPY --chown=node:node extensions/coding-agent /app/openclaw/extensions/coding-agent
@@ -119,15 +112,9 @@ COPY --chown=node:node openclaw.json /home/node/scripts/openclaw.json.default
119
  COPY --chown=node:node gradio_dashboard.py /home/node/gradio_dashboard.py
120
  COPY --chown=node:node app.py /home/node/app.py
121
 
122
- # Copy frontend last (most frequently changed)
123
- COPY --chown=node:node frontend /home/node/frontend
124
-
125
- # ── Frontend index.html with timestamp cache busting ─────────────────────────
126
- RUN VERSION_TS=$(date +%s) \
127
- && sed "s/{{VERSION_TIMESTAMP}}/${VERSION_TS}/g" \
128
- /home/node/frontend/electron-standalone.html \
129
- > /home/node/frontend/index.html \
130
- && echo "[build] Frontend index.html generated (timestamp=${VERSION_TS})"
131
 
132
  # ── Environment variables for production ─────────────────────────────────────
133
  # Default values for HuggingFace Spaces compatibility
 
88
  WORKDIR /app
89
 
90
  # ── A2A Gateway Extension ───────────────────────────────────────────────────
91
+ # REMOVED: A2A gateway installation (minimal mode - Gradio only)
92
+ # To enable A2A, uncomment the gateway installation block
 
 
 
 
 
 
 
93
 
94
  # ── Coding Agent Extension (local β€” no git clone needed) ─────────────────────
95
  COPY --chown=node:node extensions/coding-agent /app/openclaw/extensions/coding-agent
 
112
  COPY --chown=node:node gradio_dashboard.py /home/node/gradio_dashboard.py
113
  COPY --chown=node:node app.py /home/node/app.py
114
 
115
+ # ── Frontend ───────────────────────────────────────────────────────────────────
116
+ # REMOVED: frontend COPY (minimal mode - Gradio only, no Electron UI)
117
+ # To enable full UI, restore the frontend COPY and index.html generation steps
 
 
 
 
 
 
118
 
119
  # ── Environment variables for production ─────────────────────────────────────
120
  # Default values for HuggingFace Spaces compatibility
scripts/entrypoint.sh CHANGED
@@ -28,7 +28,8 @@ export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts
28
  export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/telegram-proxy.cjs"
29
 
30
  # Enable token redirect + A2A routing + state/agents endpoints (all in one preload)
31
- export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/token-redirect.cjs"
 
32
 
33
  # ── Extensions symlink ──────────────────────────────────────────────────────
34
  SYMLINK_START=$(date +%s)
 
28
  export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/telegram-proxy.cjs"
29
 
30
  # Enable token redirect + A2A routing + state/agents endpoints (all in one preload)
31
+ # REMOVED: A2A gateway not installed (minimal mode - Gradio only)
32
+ # export NODE_OPTIONS="${NODE_OPTIONS:+$NODE_OPTIONS }--require /home/node/scripts/token-redirect.cjs"
33
 
34
  # ── Extensions symlink ──────────────────────────────────────────────────────
35
  SYMLINK_START=$(date +%s)