Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
3dc8873
Add Agent Relay Cloud onboarding design document
claude Dec 29, 2025
d65f3b4
Update onboarding design to OAuth-only authentication
claude Dec 29, 2025
a9cf5df
Add realistic Claude Code auth strategy with fallbacks
claude Dec 29, 2025
1ae2ccd
Expand device flow auth for Claude Code and OpenAI Codex
claude Dec 29, 2025
c7c31a4
Add cloud vs self-hosted deployment models
claude Dec 29, 2025
c60339e
Fix deployment models: auth always via cloud
claude Dec 29, 2025
9c25f83
Redesign self-hosted auth: runs via cloud servers
claude Dec 30, 2025
39633af
Add Agent Relay Cloud service scaffold
claude Dec 30, 2025
fe15ee2
Add custom domain support for workspaces
claude Dec 30, 2025
291906e
Make custom domains a premium feature (Team/Enterprise only)
claude Dec 30, 2025
123fb2f
Add multi-user workspaces and team invitations
claude Dec 30, 2025
e31a3a3
Add agent resiliency module for health monitoring and auto-restart
claude Dec 30, 2025
c9f1edb
Add context persistence across agent restarts
claude Dec 30, 2025
d4e6ac5
Refactor to daemon-first architecture with multi-workspace orchestrator
claude Dec 30, 2025
02c7a84
Add workspace switching UI components for dashboard
claude Dec 30, 2025
b0b0b8c
Wire up WorkspaceSelector and orchestrator in main App component
claude Dec 30, 2025
af1af1b
Add Stripe billing integration for subscription management
claude Dec 30, 2025
b02758a
Add stunning landing page for Agent Relay Cloud
claude Dec 30, 2025
52496f2
Add beads tasks for remaining Agent Relay Cloud work
claude Dec 30, 2025
87758da
Fix linting issues across cloud and daemon modules
claude Dec 30, 2025
2830b63
Merge origin/main into feature branch
claude Dec 30, 2025
c39ec37
Fix TypeScript build errors and API compatibility issues
claude Dec 30, 2025
64442a7
Add Infrastructure as Code for cloud deployment
claude Dec 30, 2025
ba37864
Add cloud-daemon linking and Drizzle ORM for local dev
claude Dec 30, 2025
25c622d
Add cloud CLI commands and convert CSS to Tailwind
claude Dec 30, 2025
617c1c5
Add session invalidation detection for cloud dashboard
claude Dec 30, 2025
0e11114
Add coordinator agents and plan-based workspace limits
claude Dec 30, 2025
ddc48e3
Update plan limits to new model with repos and concurrent agents
claude Dec 30, 2025
c212184
Add pricing page and update plan limits in landing page
claude Dec 30, 2025
83b998a
Add landing and pricing page routes to dashboard
claude Dec 30, 2025
281f54d
Restructure routes: landing at /, dashboard at /app
claude Dec 30, 2025
c007aa4
Add user-facing deployment guides for Cloud, Self-Hosted, and Local m…
claude Dec 30, 2025
1e9626d
Add single-command dev setup with npm run dev:start
claude Dec 30, 2025
d5ec059
Use consistent port 3888 for dev server
claude Dec 30, 2025
c41422e
Add Docker publish workflow for ghcr.io/agentworkforce
claude Dec 30, 2025
d39ecce
Dashboard UX improvements: auto-scroll, notifications, sidebar fixes
khaliqgant Dec 30, 2025
48ff5c6
release prep
khaliqgant Dec 30, 2025
d7d8cc0
lint fixes
khaliqgant Dec 30, 2025
9c1afd4
thread seen and hardening log viewer
khaliqgant Dec 30, 2025
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
17 changes: 15 additions & 2 deletions .beads/issues.jsonl

Large diffs are not rendered by default.

35 changes: 32 additions & 3 deletions .claude/agents/lead.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ You are a Lead agent - a coordinator and decision-maker, NOT an implementer. You
- Update issue status immediately when work starts/completes
- Keep a running mental model of who's doing what

### 4. Broadcast Status via [[SUMMARY]] Blocks
**IMPORTANT:** Always emit [[SUMMARY]] blocks to communicate your current state. This is the preferred agent-to-agent communication method and enables the dashboard to display real-time task info.

Emit a [[SUMMARY]] block:
- When you start working on a new task
- After delegating work to agents
- When status changes significantly
- At regular intervals during long sessions

Format:
```
[[SUMMARY]]{"currentTask":"agent-relay-XXX: Brief description","completedTasks":["agent-relay-YYY"],"context":"Who's working on what"}[[/SUMMARY]]
```

## Role Assignments

When delegating, match tasks to roles:
Expand Down Expand Up @@ -171,14 +185,29 @@ Periodically broadcast status:
**Next:** [What's coming next]>>>
```

## Session Summary Pattern
## Session Summary Pattern (REQUIRED)

**You MUST emit [[SUMMARY]] blocks regularly.** This is how other agents and the dashboard know what you're working on.

Use [[SUMMARY]] blocks to track your state:
### When to Emit
1. **After receiving a task** - Show what you're now coordinating
2. **After delegating** - Show updated team assignments
3. **After task completion** - Update completedTasks array
4. **Every 2-3 interactions** - Keep status fresh

### Format
```
[[SUMMARY]]{"currentTask":"Coordinating team on feature X","context":"Implementer working on backend, Designer on UI. 3 issues in progress."}[[/SUMMARY]]
[[SUMMARY]]{"currentTask":"agent-relay-315: Coordinating LogViewer fix","completedTasks":["agent-relay-310","agent-relay-312"],"context":"Implementer on 315, Frontend on 316. Awaiting ETAs.","decisions":["Prioritized P1 bugs first"]}[[/SUMMARY]]
```

### Dashboard Integration
The dashboard parses these blocks to display:
- Your current task next to your name in the sidebar
- Real-time status of what each agent is doing
- Historical context of completed work

**If you don't emit [[SUMMARY]] blocks, the dashboard won't show your current task.**

## Key Metrics

Track these throughout a session:
Expand Down
2 changes: 1 addition & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,5 +28,5 @@ module.exports = {
},
],
},
ignorePatterns: ['dist/**', 'node_modules/**', 'coverage/**'],
ignorePatterns: ['dist/**', 'node_modules/**', 'coverage/**', '**/out/**'],
};
69 changes: 69 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Docker

on:
release:
types: [published]
workflow_dispatch:
inputs:
tag:
description: 'Image tag (default: latest)'
required: false
default: 'latest'

env:
REGISTRY: ghcr.io
ORG: agentworkforce

permissions:
contents: read
packages: write

jobs:
build-and-push:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: agent-relay
dockerfile: Dockerfile
context: .
- image: agent-relay-workspace
dockerfile: deploy/workspace/Dockerfile
context: deploy/workspace

steps:
- name: Checkout repository
uses: actions/checkout@v4

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

- name: Log in to Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.ORG }}/${{ matrix.image }}
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=raw,value=latest,enable={{is_default_branch}}
type=raw,value=${{ inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' }}

- name: Build and push
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
file: ${{ matrix.dockerfile }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
62 changes: 62 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# Agent Relay Cloud - Control Plane
# Runs the Express API server with PostgreSQL/Redis connections

FROM node:20-slim AS builder

WORKDIR /app

# Install build dependencies
RUN apt-get update && apt-get install -y \
python3 \
make \
g++ \
&& rm -rf /var/lib/apt/lists/*

# Copy package files
COPY package*.json ./
COPY src/dashboard/package*.json ./src/dashboard/

# Install dependencies
RUN npm ci --include=dev

# Copy source
COPY . .

# Build TypeScript
RUN npm run build

# Build dashboard
RUN cd src/dashboard && npm ci && npm run build

# Production image
FROM node:20-slim AS runner

WORKDIR /app

# Install runtime dependencies only
RUN apt-get update && apt-get install -y \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# Copy built artifacts
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/src/dashboard/out ./src/dashboard/out
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package*.json ./

# Create non-root user
RUN useradd -m -u 1001 agentrelay
USER agentrelay

# Environment
ENV NODE_ENV=production
ENV PORT=3000

EXPOSE 3000

# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD node -e "require('http').get('http://localhost:3000/health', (r) => process.exit(r.statusCode === 200 ? 0 : 1))"

# Start cloud server
CMD ["node", "dist/cloud/index.js"]
83 changes: 83 additions & 0 deletions deploy/.env.cloud.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Agent Relay Cloud - Production Environment Configuration
# Copy to .env.cloud and fill in your values

# =============================================================================
# Domain Configuration
# =============================================================================
# Main domains for your deployment
LANDING_URL=https://agent-relay.com
APP_URL=https://app.agent-relay.com
API_URL=https://api.agent-relay.com
WORKSPACE_DOMAIN=ws.agent-relay.com

# Public URL (used for OAuth callbacks, etc.)
PUBLIC_URL=https://api.agent-relay.com

# =============================================================================
# Server Configuration
# =============================================================================
PORT=3000
NODE_ENV=production
SESSION_SECRET=generate-a-32-byte-random-string-here

# =============================================================================
# Database (PostgreSQL)
# =============================================================================
# Railway provides this automatically when you add PostgreSQL
DATABASE_URL=postgresql://user:password@host:5432/agent_relay

# =============================================================================
# Redis (Sessions & Caching)
# =============================================================================
# Railway provides this automatically when you add Redis
REDIS_URL=redis://localhost:6379

# =============================================================================
# GitHub OAuth
# =============================================================================
# Create a GitHub OAuth App: https://github.com/settings/applications/new
# Homepage URL: https://agent-relay.com
# Callback URL: https://api.agent-relay.com/api/auth/github/callback
GITHUB_CLIENT_ID=your-github-client-id
GITHUB_CLIENT_SECRET=your-github-client-secret

# =============================================================================
# Compute Provider (for user workspaces)
# =============================================================================
# Options: fly, railway, docker
COMPUTE_PROVIDER=fly

# Fly.io Configuration (recommended for workspaces)
# Get token: fly auth token
FLY_API_TOKEN=your-fly-api-token
FLY_ORG=personal
FLY_REGION=sjc

# Custom domain for workspaces (CNAME *.ws.agent-relay.com to fly.dev)
FLY_WORKSPACE_DOMAIN=ws.agent-relay.com

# =============================================================================
# Stripe Billing
# =============================================================================
# Get keys from: https://dashboard.stripe.com/apikeys
STRIPE_SECRET_KEY=sk_live_...
STRIPE_PUBLISHABLE_KEY=pk_live_...
STRIPE_WEBHOOK_SECRET=whsec_...

# Price IDs from Stripe Products
STRIPE_PRICE_PRO_MONTHLY=price_...
STRIPE_PRICE_PRO_YEARLY=price_...
STRIPE_PRICE_TEAM_MONTHLY=price_...
STRIPE_PRICE_TEAM_YEARLY=price_...

# =============================================================================
# Encryption (for credential vault)
# =============================================================================
# Generate with: openssl rand -hex 32
VAULT_ENCRYPTION_KEY=generate-a-64-character-hex-string

# =============================================================================
# Optional: Monitoring & Logging
# =============================================================================
# SENTRY_DSN=https://xxx@sentry.io/xxx
# LOG_LEVEL=info
5 changes: 5 additions & 0 deletions deploy/init-db.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-- Agent Relay Cloud - Database bootstrap
-- Deprecated: use migrations in src/cloud/db/migrations/0001_initial.sql
-- This file is kept as a convenience wrapper for local psql usage.

\\i ../src/cloud/db/migrations/0001_initial.sql
69 changes: 69 additions & 0 deletions deploy/scripts/setup-fly-workspaces.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
#!/bin/bash
# Setup Fly.io for Agent Relay Workspaces
# Run this from the project root

set -e

echo "=== Agent Relay Cloud - Fly.io Workspace Setup ==="
echo ""

# Check for fly CLI
if ! command -v fly &> /dev/null; then
echo "Error: Fly CLI not found. Install it with:"
echo " curl -L https://fly.io/install.sh | sh"
exit 1
fi

# Check if logged in
if ! fly auth whoami &> /dev/null; then
echo "Please log in to Fly.io first:"
fly auth login
fi

# Get org
FLY_ORG=${FLY_ORG:-personal}
echo "Using Fly.io org: $FLY_ORG"

echo ""
echo "=== Building Workspace Image ==="
echo ""

# Build and push the workspace image
cd deploy/workspace

echo "Building workspace Docker image..."
docker build -t ghcr.io/khaliqgant/agent-relay-workspace:latest .

echo ""
echo "Pushing to GitHub Container Registry..."
echo "(Make sure you're logged in: docker login ghcr.io)"
docker push ghcr.io/khaliqgant/agent-relay-workspace:latest

cd ../..

echo ""
echo "=== Get Your API Token ==="
echo ""
echo "Run this to get your Fly.io API token:"
echo " fly auth token"
echo ""
echo "Add it to your Railway environment:"
echo " FLY_API_TOKEN=<token>"
echo " FLY_ORG=$FLY_ORG"
echo " COMPUTE_PROVIDER=fly"
echo ""

echo "=== Custom Domain Setup ==="
echo ""
echo "To use custom workspace domains (e.g., abc123.ws.agent-relay.com):"
echo ""
echo "1. Add a wildcard CNAME record in your DNS:"
echo " *.ws.agent-relay.com CNAME fly.dev"
echo ""
echo "2. Set the domain in Railway:"
echo " FLY_WORKSPACE_DOMAIN=ws.agent-relay.com"
echo ""
echo "3. Each workspace will be accessible at:"
echo " https://{workspace-id}.ws.agent-relay.com"
echo ""
echo "Setup complete!"
Loading
Loading