Skip to content

Commit ad780b7

Browse files
committed
claude login and codex tightening
1 parent 0d3d065 commit ad780b7

38 files changed

+3069
-967
lines changed

.dockerignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Dependencies - must be rebuilt inside container for correct platform
2+
node_modules
3+
src/dashboard/node_modules
4+
5+
# Build outputs
6+
dist
7+
src/dashboard/out
8+
src/dashboard/.next
9+
10+
# Development files
11+
.git
12+
.github
13+
.vscode
14+
*.log
15+
.env*
16+
.DS_Store
17+
18+
# Test files
19+
coverage
20+
*.test.ts
21+
*.spec.ts
22+
__tests__
23+
24+
# Docker files (avoid recursive copy)
25+
Dockerfile*
26+
docker-compose*
27+
28+
# Documentation
29+
*.md
30+
!README.md
31+
docs
32+
!docs/agent-relay-snippet.md
33+
!docs/agent-relay-protocol.md
34+
!docs/agent-policy-snippet.md
35+
36+
# Misc
37+
.beads
38+
.claude
39+
.openskills
40+
tmp

.github/workflows/docker.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ jobs:
3737
- name: Checkout repository
3838
uses: actions/checkout@v4
3939

40+
- name: Set up QEMU
41+
uses: docker/setup-qemu-action@v3
42+
4043
- name: Set up Docker Buildx
4144
uses: docker/setup-buildx-action@v3
4245

@@ -56,7 +59,7 @@ jobs:
5659
tags: ${{ env.REGISTRY }}/${{ env.ORG }}/relay-workspace-base:latest
5760
cache-from: type=gha,scope=base
5861
cache-to: type=gha,mode=max,scope=base
59-
platforms: linux/amd64
62+
platforms: linux/amd64,linux/arm64
6063

6164
# Main images - build on every push
6265
build-and-push:
@@ -78,6 +81,9 @@ jobs:
7881
- name: Checkout repository
7982
uses: actions/checkout@v4
8083

84+
- name: Set up QEMU
85+
uses: docker/setup-qemu-action@v3
86+
8187
- name: Set up Docker Buildx
8288
uses: docker/setup-buildx-action@v3
8389

@@ -109,7 +115,7 @@ jobs:
109115
labels: ${{ steps.meta.outputs.labels }}
110116
cache-from: type=gha,scope=${{ matrix.image }}
111117
cache-to: type=gha,mode=max,scope=${{ matrix.image }}
112-
platforms: linux/amd64
118+
platforms: linux/amd64,linux/arm64
113119

114120
# Update running workspaces with new image (graceful - won't disrupt active agents)
115121
update-workspaces:
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
{
2+
"id": "traj_6mieijqyvaag",
3+
"version": 1,
4+
"task": {
5+
"title": "Fix xterm interactive terminal for provider auth setup",
6+
"source": {
7+
"system": "plain",
8+
"id": "xterm-display"
9+
}
10+
},
11+
"status": "completed",
12+
"startedAt": "2026-01-07T08:27:00.428Z",
13+
"agents": [
14+
{
15+
"name": "khaliqgant",
16+
"role": "lead",
17+
"joinedAt": "2026-01-07T08:27:00.429Z"
18+
}
19+
],
20+
"chapters": [
21+
{
22+
"id": "chap_lcr0k4brra35",
23+
"title": "Work",
24+
"agentName": "default",
25+
"startedAt": "2026-01-07T08:27:29.790Z",
26+
"events": [
27+
{
28+
"ts": 1767774449791,
29+
"type": "decision",
30+
"content": "Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path: Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path",
31+
"raw": {
32+
"question": "Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path",
33+
"chosen": "Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path",
34+
"alternatives": [],
35+
"reasoning": "Dashboard server uses path-based WebSocket routing - root path triggers socket.destroy()"
36+
},
37+
"significance": "high"
38+
},
39+
{
40+
"ts": 1767774451034,
41+
"type": "decision",
42+
"content": "API proxy uses /api/spawn and /api/spawned endpoints: API proxy uses /api/spawn and /api/spawned endpoints",
43+
"raw": {
44+
"question": "API proxy uses /api/spawn and /api/spawned endpoints",
45+
"chosen": "API proxy uses /api/spawn and /api/spawned endpoints",
46+
"alternatives": [],
47+
"reasoning": "Dashboard server exposes these endpoints, not /workspaces/:id/agents"
48+
},
49+
"significance": "high"
50+
},
51+
{
52+
"ts": 1767774452834,
53+
"type": "decision",
54+
"content": "Empty task enables interactive terminal mode: Empty task enables interactive terminal mode",
55+
"raw": {
56+
"question": "Empty task enables interactive terminal mode",
57+
"chosen": "Empty task enables interactive terminal mode",
58+
"alternatives": [],
59+
"reasoning": "Spawner was prepending relay reminder even with empty task, causing auto-input. Fixed to only send messages when actual task provided"
60+
},
61+
"significance": "high"
62+
}
63+
],
64+
"endedAt": "2026-01-07T08:28:17.323Z"
65+
}
66+
],
67+
"commits": [],
68+
"filesChanged": [],
69+
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
70+
"tags": [],
71+
"completedAt": "2026-01-07T08:28:17.323Z",
72+
"retrospective": {
73+
"summary": "Fixed xterm interactive terminal for provider auth: WebSocket proxy path, API endpoint mapping, spawner interactive mode, and updated development docs",
74+
"approach": "Standard approach",
75+
"confidence": 0.85
76+
}
77+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Trajectory: Fix xterm interactive terminal for provider auth setup
2+
3+
> **Status:** ✅ Completed
4+
> **Task:** xterm-display
5+
> **Confidence:** 85%
6+
> **Started:** January 7, 2026 at 09:27 AM
7+
> **Completed:** January 7, 2026 at 09:28 AM
8+
9+
---
10+
11+
## Summary
12+
13+
Fixed xterm interactive terminal for provider auth: WebSocket proxy path, API endpoint mapping, spawner interactive mode, and updated development docs
14+
15+
**Approach:** Standard approach
16+
17+
---
18+
19+
## Key Decisions
20+
21+
### Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path
22+
- **Chose:** Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path
23+
- **Reasoning:** Dashboard server uses path-based WebSocket routing - root path triggers socket.destroy()
24+
25+
### API proxy uses /api/spawn and /api/spawned endpoints
26+
- **Chose:** API proxy uses /api/spawn and /api/spawned endpoints
27+
- **Reasoning:** Dashboard server exposes these endpoints, not /workspaces/:id/agents
28+
29+
### Empty task enables interactive terminal mode
30+
- **Chose:** Empty task enables interactive terminal mode
31+
- **Reasoning:** Spawner was prepending relay reminder even with empty task, causing auto-input. Fixed to only send messages when actual task provided
32+
33+
---
34+
35+
## Chapters
36+
37+
### 1. Work
38+
*Agent: default*
39+
40+
- Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path: Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path
41+
- API proxy uses /api/spawn and /api/spawned endpoints: API proxy uses /api/spawn and /api/spawned endpoints
42+
- Empty task enables interactive terminal mode: Empty task enables interactive terminal mode

.trajectories/index.json

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"version": 1,
3-
"lastUpdated": "2026-01-07T06:30:00.000Z",
3+
"lastUpdated": "2026-01-07T08:28:17.348Z",
44
"trajectories": {
55
"traj_ozd98si6a7ns": {
66
"title": "Fix thinking indicator showing on all messages",
@@ -386,6 +386,13 @@
386386
"startedAt": "2026-01-07T06:00:00.000Z",
387387
"completedAt": "2026-01-07T06:30:00.000Z",
388388
"path": "/home/user/relay/.trajectories/completed/2026-01/traj_multi_server_arch.md"
389+
},
390+
"traj_6mieijqyvaag": {
391+
"title": "Fix xterm interactive terminal for provider auth setup",
392+
"status": "completed",
393+
"startedAt": "2026-01-07T08:27:00.428Z",
394+
"completedAt": "2026-01-07T08:28:17.323Z",
395+
"path": "/Users/khaliqgant/Projects/agent-workforce/relay/.trajectories/completed/2026-01/traj_6mieijqyvaag.json"
389396
}
390397
}
391398
}

deploy/workspace/Dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ COPY --from=builder /app/dist ./dist
4242
COPY --from=builder /app/node_modules ./node_modules
4343
COPY --from=builder /app/package*.json ./
4444

45-
# Copy docs folder (contains relay snippets for agent spawning)
46-
COPY docs ./docs
45+
# Copy relay snippets for agent spawning (only what's needed)
46+
COPY docs/agent-relay-snippet.md docs/agent-relay-protocol.md docs/agent-policy-snippet.md ./docs/
4747

4848
COPY deploy/workspace/entrypoint.sh /entrypoint.sh
4949
COPY deploy/workspace/git-credential-relay /usr/local/bin/git-credential-relay
@@ -66,7 +66,8 @@ ENV AGENT_RELAY_DASHBOARD_PORT=3888
6666
ENV PATH="/home/workspace/.local/bin:$PATH"
6767

6868
# Expose ports
69-
EXPOSE 3888 3889
69+
# 3888: Dashboard/API, 3889: Daemon, 1455: Codex OAuth callback, 2222: SSH (for tunneling)
70+
EXPOSE 3888 3889 1455 2222
7071

7172
# Volume for persistent data
7273
VOLUME ["/data", "/workspace"]

deploy/workspace/Dockerfile.base

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,10 @@ RUN apt-get update && apt-get install -y \
1818
make \
1919
g++ \
2020
procps \
21-
&& rm -rf /var/lib/apt/lists/*
21+
openssh-server \
22+
&& rm -rf /var/lib/apt/lists/* \
23+
&& mkdir -p /run/sshd \
24+
&& ssh-keygen -A
2225

2326
# Install GitHub CLI (gh)
2427
RUN curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \

deploy/workspace/entrypoint.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,36 @@ if [[ "$(id -u)" == "0" ]]; then
1313
log "Fixing volume permissions..."
1414
chown -R workspace:workspace /data /workspace 2>/dev/null || true
1515

16+
# ============================================================================
17+
# SSH Server Setup (for CLI tunneling - Codex OAuth callback forwarding)
18+
# When ENABLE_SSH=true, start SSH server on port 2222 for secure tunneling
19+
# ============================================================================
20+
if [[ "${ENABLE_SSH:-false}" == "true" ]]; then
21+
log "Starting SSH server on port 2222..."
22+
23+
# Set SSH password for workspace user
24+
SSH_PASS="${SSH_PASSWORD:-devpassword}"
25+
echo "workspace:${SSH_PASS}" | chpasswd
26+
27+
# Configure SSH server for tunneling
28+
# - Allow password auth (for CLI simplicity)
29+
# - Listen on port 2222 (non-privileged)
30+
# - Allow TCP forwarding (for port tunneling)
31+
cat > /etc/ssh/sshd_config.d/workspace.conf <<SSHEOF
32+
Port 2222
33+
PasswordAuthentication yes
34+
PermitRootLogin no
35+
AllowUsers workspace
36+
AllowTcpForwarding yes
37+
GatewayPorts no
38+
X11Forwarding no
39+
SSHEOF
40+
41+
# Start SSH server in background
42+
/usr/sbin/sshd -e
43+
log "SSH server started (port 2222, user: workspace)"
44+
fi
45+
1646
# ============================================================================
1747
# Persist workspace environment for SSH sessions (must be done as root)
1848
# SSH sessions don't inherit the container's runtime environment, so we write

0 commit comments

Comments
 (0)