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
40 changes: 40 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Dependencies - must be rebuilt inside container for correct platform
node_modules
src/dashboard/node_modules

# Build outputs
dist
src/dashboard/out
src/dashboard/.next

# Development files
.git
.github
.vscode
*.log
.env*
.DS_Store

# Test files
coverage
*.test.ts
*.spec.ts
__tests__

# Docker files (avoid recursive copy)
Dockerfile*
docker-compose*

# Documentation
*.md
!README.md
docs
!docs/agent-relay-snippet.md
!docs/agent-relay-protocol.md
!docs/agent-policy-snippet.md

# Misc
.beads
.claude
.openskills
tmp
10 changes: 8 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

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

# Main images - build on every push
build-and-push:
Expand All @@ -78,6 +81,9 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

Expand Down Expand Up @@ -109,7 +115,7 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha,scope=${{ matrix.image }}
cache-to: type=gha,mode=max,scope=${{ matrix.image }}
platforms: linux/amd64
platforms: linux/amd64,linux/arm64

# Update running workspaces with new image (graceful - won't disrupt active agents)
update-workspaces:
Expand Down
125 changes: 125 additions & 0 deletions .trajectories/completed/2026-01/traj_0zacdjl1g4ht.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
{
"id": "traj_0zacdjl1g4ht",
"version": 1,
"task": {
"title": "Interactive terminal for provider auth setup",
"source": {
"system": "plain",
"id": "xterm-display"
}
},
"status": "completed",
"startedAt": "2026-01-07T10:06:42.869Z",
"agents": [
{
"name": "khaliqgant",
"role": "lead",
"joinedAt": "2026-01-07T10:06:42.870Z"
}
],
"chapters": [
{
"id": "chap_b8zlw68l519i",
"title": "Work",
"agentName": "default",
"startedAt": "2026-01-07T10:06:49.743Z",
"events": [
{
"ts": 1767780409743,
"type": "decision",
"content": "Used __setup__ prefix for temporary auth agents: Used __setup__ prefix for temporary auth agents",
"raw": {
"question": "Used __setup__ prefix for temporary auth agents",
"chosen": "Used __setup__ prefix for temporary auth agents",
"alternatives": [],
"reasoning": "Internal naming convention prevents conflicts with user-created agents named 'setup-*'"
},
"significance": "high"
},
{
"ts": 1767780415611,
"type": "decision",
"content": "Added interactive mode guards to all auto-inject code paths: Added interactive mode guards to all auto-inject code paths",
"raw": {
"question": "Added interactive mode guards to all auto-inject code paths",
"chosen": "Added interactive mode guards to all auto-inject code paths",
"alternatives": [],
"reasoning": "Multiple code paths in pty-wrapper.ts were injecting content with Enter - hooks, continuity, instructions, message queue - all needed guards for interactive mode"
},
"significance": "high"
},
{
"ts": 1767780421440,
"type": "decision",
"content": "Created /api/onboarding/mark-connected endpoint for terminal auth: Created /api/onboarding/mark-connected endpoint for terminal auth",
"raw": {
"question": "Created /api/onboarding/mark-connected endpoint for terminal auth",
"chosen": "Created /api/onboarding/mark-connected endpoint for terminal auth",
"alternatives": [],
"reasoning": "Terminal-based CLI auth stores credentials locally, but cloud DB needs to track provider as connected for user dashboard state"
},
"significance": "high"
},
{
"ts": 1767780429984,
"type": "decision",
"content": "Used ref-based URL tracking for auth modal deduplication: Used ref-based URL tracking for auth modal deduplication",
"raw": {
"question": "Used ref-based URL tracking for auth modal deduplication",
"chosen": "Used ref-based URL tracking for auth modal deduplication",
"alternatives": [],
"reasoning": "shownAuthUrlsRef Set tracks URLs already shown, authModalDismissed state prevents re-showing after user dismisses"
},
"significance": "high"
},
{
"ts": 1767780435663,
"type": "decision",
"content": "Fixed Docker build by copying only needed docs snippet files instead of entire docs folder: Fixed Docker build by copying only needed docs snippet files instead of entire docs folder",
"raw": {
"question": "Fixed Docker build by copying only needed docs snippet files instead of entire docs folder",
"chosen": "Fixed Docker build by copying only needed docs snippet files instead of entire docs folder",
"alternatives": [],
"reasoning": "The .dockerignore was excluding docs/, but Dockerfile needed them. Selective copy is cleaner than changing .dockerignore broadly"
},
"significance": "high"
},
{
"ts": 1767780437208,
"type": "decision",
"content": "Unified providers page with CLI and API key options: Unified providers page with CLI and API key options",
"raw": {
"question": "Unified providers page with CLI and API key options",
"chosen": "Unified providers page with CLI and API key options",
"alternatives": [],
"reasoning": "Providers page was inconsistent with onboarding - now shows both 'Connect via CLI' and 'Use API Key' buttons when workspace is available"
},
"significance": "high"
},
{
"ts": 1767780443931,
"type": "decision",
"content": "Changed intro bonus banner from purple to cyan brand color: Changed intro bonus banner from purple to cyan brand color",
"raw": {
"question": "Changed intro bonus banner from purple to cyan brand color",
"chosen": "Changed intro bonus banner from purple to cyan brand color",
"alternatives": [],
"reasoning": "User requested brand consistency - cyan is the primary accent color"
},
"significance": "high"
}
],
"endedAt": "2026-01-07T10:07:24.422Z"
}
],
"commits": [],
"filesChanged": [],
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
"tags": [],
"completedAt": "2026-01-07T10:07:24.422Z",
"retrospective": {
"summary": "Implemented interactive terminal for provider auth: fixed auto-enter by guarding all injection paths in pty-wrapper.ts, added __setup__ agent prefix with dashboard filtering, deduplicated auth URL modal, added success UI with connect-another option, unified providers page with CLI/API key options, created mark-connected endpoint for terminal auth",
"approach": "Standard approach",
"confidence": 0.9
}
}
62 changes: 62 additions & 0 deletions .trajectories/completed/2026-01/traj_0zacdjl1g4ht.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Trajectory: Interactive terminal for provider auth setup

> **Status:** ✅ Completed
> **Task:** xterm-display
> **Confidence:** 90%
> **Started:** January 7, 2026 at 11:06 AM
> **Completed:** January 7, 2026 at 11:07 AM

---

## Summary

Implemented interactive terminal for provider auth: fixed auto-enter by guarding all injection paths in pty-wrapper.ts, added __setup__ agent prefix with dashboard filtering, deduplicated auth URL modal, added success UI with connect-another option, unified providers page with CLI/API key options, created mark-connected endpoint for terminal auth

**Approach:** Standard approach

---

## Key Decisions

### Used __setup__ prefix for temporary auth agents
- **Chose:** Used __setup__ prefix for temporary auth agents
- **Reasoning:** Internal naming convention prevents conflicts with user-created agents named 'setup-*'

### Added interactive mode guards to all auto-inject code paths
- **Chose:** Added interactive mode guards to all auto-inject code paths
- **Reasoning:** Multiple code paths in pty-wrapper.ts were injecting content with Enter - hooks, continuity, instructions, message queue - all needed guards for interactive mode

### Created /api/onboarding/mark-connected endpoint for terminal auth
- **Chose:** Created /api/onboarding/mark-connected endpoint for terminal auth
- **Reasoning:** Terminal-based CLI auth stores credentials locally, but cloud DB needs to track provider as connected for user dashboard state

### Used ref-based URL tracking for auth modal deduplication
- **Chose:** Used ref-based URL tracking for auth modal deduplication
- **Reasoning:** shownAuthUrlsRef Set tracks URLs already shown, authModalDismissed state prevents re-showing after user dismisses

### Fixed Docker build by copying only needed docs snippet files instead of entire docs folder
- **Chose:** Fixed Docker build by copying only needed docs snippet files instead of entire docs folder
- **Reasoning:** The .dockerignore was excluding docs/, but Dockerfile needed them. Selective copy is cleaner than changing .dockerignore broadly

### Unified providers page with CLI and API key options
- **Chose:** Unified providers page with CLI and API key options
- **Reasoning:** Providers page was inconsistent with onboarding - now shows both 'Connect via CLI' and 'Use API Key' buttons when workspace is available

### Changed intro bonus banner from purple to cyan brand color
- **Chose:** Changed intro bonus banner from purple to cyan brand color
- **Reasoning:** User requested brand consistency - cyan is the primary accent color

---

## Chapters

### 1. Work
*Agent: default*

- Used __setup__ prefix for temporary auth agents: Used __setup__ prefix for temporary auth agents
- Added interactive mode guards to all auto-inject code paths: Added interactive mode guards to all auto-inject code paths
- Created /api/onboarding/mark-connected endpoint for terminal auth: Created /api/onboarding/mark-connected endpoint for terminal auth
- Used ref-based URL tracking for auth modal deduplication: Used ref-based URL tracking for auth modal deduplication
- Fixed Docker build by copying only needed docs snippet files instead of entire docs folder: Fixed Docker build by copying only needed docs snippet files instead of entire docs folder
- Unified providers page with CLI and API key options: Unified providers page with CLI and API key options
- Changed intro bonus banner from purple to cyan brand color: Changed intro bonus banner from purple to cyan brand color
77 changes: 77 additions & 0 deletions .trajectories/completed/2026-01/traj_6mieijqyvaag.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
{
"id": "traj_6mieijqyvaag",
"version": 1,
"task": {
"title": "Fix xterm interactive terminal for provider auth setup",
"source": {
"system": "plain",
"id": "xterm-display"
}
},
"status": "completed",
"startedAt": "2026-01-07T08:27:00.428Z",
"agents": [
{
"name": "khaliqgant",
"role": "lead",
"joinedAt": "2026-01-07T08:27:00.429Z"
}
],
"chapters": [
{
"id": "chap_lcr0k4brra35",
"title": "Work",
"agentName": "default",
"startedAt": "2026-01-07T08:27:29.790Z",
"events": [
{
"ts": 1767774449791,
"type": "decision",
"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",
"raw": {
"question": "Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path",
"chosen": "Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path",
"alternatives": [],
"reasoning": "Dashboard server uses path-based WebSocket routing - root path triggers socket.destroy()"
},
"significance": "high"
},
{
"ts": 1767774451034,
"type": "decision",
"content": "API proxy uses /api/spawn and /api/spawned endpoints: API proxy uses /api/spawn and /api/spawned endpoints",
"raw": {
"question": "API proxy uses /api/spawn and /api/spawned endpoints",
"chosen": "API proxy uses /api/spawn and /api/spawned endpoints",
"alternatives": [],
"reasoning": "Dashboard server exposes these endpoints, not /workspaces/:id/agents"
},
"significance": "high"
},
{
"ts": 1767774452834,
"type": "decision",
"content": "Empty task enables interactive terminal mode: Empty task enables interactive terminal mode",
"raw": {
"question": "Empty task enables interactive terminal mode",
"chosen": "Empty task enables interactive terminal mode",
"alternatives": [],
"reasoning": "Spawner was prepending relay reminder even with empty task, causing auto-input. Fixed to only send messages when actual task provided"
},
"significance": "high"
}
],
"endedAt": "2026-01-07T08:28:17.323Z"
}
],
"commits": [],
"filesChanged": [],
"projectId": "/Users/khaliqgant/Projects/agent-workforce/relay",
"tags": [],
"completedAt": "2026-01-07T08:28:17.323Z",
"retrospective": {
"summary": "Fixed xterm interactive terminal for provider auth: WebSocket proxy path, API endpoint mapping, spawner interactive mode, and updated development docs",
"approach": "Standard approach",
"confidence": 0.85
}
}
42 changes: 42 additions & 0 deletions .trajectories/completed/2026-01/traj_6mieijqyvaag.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Trajectory: Fix xterm interactive terminal for provider auth setup

> **Status:** ✅ Completed
> **Task:** xterm-display
> **Confidence:** 85%
> **Started:** January 7, 2026 at 09:27 AM
> **Completed:** January 7, 2026 at 09:28 AM

---

## Summary

Fixed xterm interactive terminal for provider auth: WebSocket proxy path, API endpoint mapping, spawner interactive mode, and updated development docs

**Approach:** Standard approach

---

## Key Decisions

### Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path
- **Chose:** Fixed WebSocket proxy path - cloud server must connect to /ws/logs/:agentName not root path
- **Reasoning:** Dashboard server uses path-based WebSocket routing - root path triggers socket.destroy()

### API proxy uses /api/spawn and /api/spawned endpoints
- **Chose:** API proxy uses /api/spawn and /api/spawned endpoints
- **Reasoning:** Dashboard server exposes these endpoints, not /workspaces/:id/agents

### Empty task enables interactive terminal mode
- **Chose:** Empty task enables interactive terminal mode
- **Reasoning:** Spawner was prepending relay reminder even with empty task, causing auto-input. Fixed to only send messages when actual task provided

---

## Chapters

### 1. Work
*Agent: default*

- 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
- API proxy uses /api/spawn and /api/spawned endpoints: API proxy uses /api/spawn and /api/spawned endpoints
- Empty task enables interactive terminal mode: Empty task enables interactive terminal mode
Loading
Loading