Master AI Fleet Architecture & Operations Runbook

T3 Code • CLIProxyAPI v8 • Antigravity (agy) • DGX Spark • Tony WSL • Tailscale Isolation • Multi-Account Artifact Hosting

4 CLIProxyAPI Hubs Verified (200) Tailscale Serve HTTPS (Zero Funnel) Zero Plaintext Secrets Living Doc • Rev 2026-11-30

1. How It All Fits Together

Plain-English Explanation
Think of your setup as four independent AI workstations connected by a private encrypted VPN (Tailscale). Each workstation runs two lightweight background services:
  • T3 Code (the cockpit): Lets you control coding agents, git worktrees, and repos on any machine from your MacBook or iPhone — without screen-sharing or leaving messy terminal windows open.
  • CLIProxyAPI (the fuel switchboard): Sits locally on each machine and routes requests to Google, Claude, OpenRouter, or your local DGX Spark GPU. Everyone uses their own AI accounts — Tony never touches your Google Ultra or Claude pool, and corporate work never mixes with personal work.
  • cpa-open (the master keyring): One command on your MacBook opens any of the 4 switchboard dashboards and puts the right password on your clipboard from macOS Keychain.
Technical Architecture Principles
  • Strict Tenant & Identity Isolation: Two separate Tailscale tailnets — atccorp.com (corporate: MGMT01, spark-6122) and raebconsulting.com (personal/consulting: maurices-macbook-pro, swoop-server) — plus Tony's separate personal tailnet node (tony.tailf9ffa9.ts.net) shared via Tailscale node sharing.
  • Loopback-First Exposure: Every T3 Code server (127.0.0.1:3773) and CLIProxyAPI proxy (127.0.0.1:8317) binds strictly to loopback. Remote access is terminated exclusively by tailscale serve (private tailnet HTTPS with automatic Let's Encrypt certs; tailscale funnel is never used).
  • Hard-Locked Managed Policy: Machine-wide T3 Code Managed Policy files (C:\Program Files\T3Code\policy.json on MGMT01, /etc/t3code/policy.json on Tony WSL) enforce connect: false, telemetry: false, and previewTunnel: false.
  • Zero-Secret Repo & Backup Posture: All Management Keys, Client API Keys, and DB credentials live in macOS Keychain (account: cliproxyapi / mcp-toolbox) or chmod 600 local host files. CLIProxyAPI v8 bcrypt-hashes secret-key in place on startup.

2. Fleet Architecture & Traffic Flow Diagram

TAILNET: raebconsulting.com (Personal) MacBook Pro (Control Plane) maurices-macbook-pro.tailf9ffa9.ts.net IP: 100.120.81.108 • T3 Code Desktop + Serve :8443 • CLIProxyAPI v8.0.79 (:8317 HTTPS) • macOS Keychain (8 hub keys) • cpa-open / verify-ai-stack / agy • No-Receipt-No-Merge hooks + mcp-db iPhone PWA & Work Laptop • Connects to T3 Code servers on :8443 • Work Laptop: static hosts pins for *.ts.net swoop-server (100.103.146.10) • Swoop application & DB host • Read-only MCP Toolbox target (swoop-ro) TAILNET: atccorp.com (Corporate) MGMT01 (Windows Corp Box) mgmt01.tail222e7.ts.net (100.113.254.114) • T3 Code Serve :8443 (Task: T3Code-MGMT01) • Policy: C:\Program Files\T3Code\policy.json • 27 ws-* workstreams • SSH :22 • STRICTLY ISOLATED from Tony • ACL shared to Maurice only (:8443, :22) DGX Spark (spark-6122 GPU) spark-6122.tail222e7.ts.net (100.70.90.19) • Work Hub :8317 (atccorp-only; SSH :8327) • Personal Hub :8318 (HTTPS shared to Mac) • Local GPU LLM: qwen3.8-flash-next • Planned: ATC Private Artifacts (:8444) • ACL shared to Maurice (:8318, :22) • Optional future: Tony on :8318 only TONY'S INDEPENDENT STACK Tony PC + WSL Ubuntu tony.tailf9ffa9.ts.net (100.110.49.81) • T3 Code v0.1.13 (:3773 → Serve :8443) • CLIProxyAPI v8.1.9 (:8317 → Serve :8317) • Policy: /etc/t3code/policy.json • Native agy 1.5.20 (tony.faststop.la@) • Repos: swoop-warehouse, towos-raeb • Keepalive: wsl-keepalive + .wslconfig • Legacy: swoop-claude.service (optional) • Own AI accounts (Zero Ultra sharing) • Zero access to atccorp.com / MGMT01 :8443 / :22 :8318 / :22 MacBook → Tony: T3 :8443 • CLIProxy :8317 • SSH :22 NO ROUTE

3. Node & Service Inventory

MacBook Pro Control Plane

Tailscale: maurices-macbook-pro.tailf9ffa9.ts.net (100.120.81.108, raebconsulting.com)

Versions: T3 Code v0.1.13, CLIProxyAPI v8.0.79 (Homebrew), agy 1.5.17, mcp-toolbox v1.18.0

Services: brew services (cliproxyapi on 127.0.0.1:8317), Tailscale Serve :8317 & :8443

Guardrails: No-Receipt-No-Merge hooks (~/.gemini/config/hooks.json), ops-backup, verify-ai-stack

MGMT01 atccorp.com

Tailscale: mgmt01.tail222e7.ts.net (100.113.254.114, shared to Maurice :8443, :22)

Services: Scheduled Task T3Code-MGMT01 (AtStartup, PT0S, 3x restart), Tailscale Serve :8443

Policy: C:\Program Files\T3Code\policy.json (connect/telemetry/previewTunnel: false)

Pending Fix: Run gh auth login --web --insecure-storage in RDP to replace Fine-Grained PAT for PR status checks.

DGX Spark (spark-6122) Dual Hub + GPU

Tailscale: spark-6122.tail222e7.ts.net (100.70.90.19, atccorp.com, shared to Maurice :8318, :22)

Work Hub (:8317): Strictly atccorp.com; managed from MacBook via cpa-open spark-work SSH tunnel (:8327).

Personal Hub (:8318): HTTPS Tailscale Serve; serves local qwen3.8-flash-next GPU model.

Planned: Private ATC static artifact server on atccorp.com Tailscale (:8444).

Tony PC + WSL Ubuntu Independent

Tailscale: tony.tailf9ffa9.ts.net (100.110.49.81, SSH alias tony-win)

Versions: T3 Code v0.1.13 (~/.local/share/t3), CLIProxyAPI v8.1.9, agy 1.5.20 (tony.faststop.la@)

Services: systemd --user (cliproxyapi.service, t3-serve.service), Windows Tailscale Serve :8443 & :8317

Policy: /etc/t3code/policy.json (organization: "Tony-Swoop", connect/telemetry/previewTunnel: false)

4. CLIProxyAPI Hubs & cpa-open Launcher

Plain-English Explanation
Instead of remembering 4 different URLs and 4 different passwords, run cpa-open <name> in Terminal. It opens the right HTTPS dashboard in your browser and copies the matching password to your clipboard — just press Cmd+V to log in.
Command Dashboard URL Keychain Service (-a cliproxyapi) Verified
cpa-open mac https://maurices-macbook-pro.tailf9ffa9.ts.net:8317/management.html CLIProxyAPI Management Key HTTP 200
cpa-open spark-personal https://spark-6122.tail222e7.ts.net:8318/management.html Spark Personal Management Key HTTP 200
cpa-open spark-work http://127.0.0.1:8327/management.html (SSH tunnel → spark:8317) Spark Work Management Key tunnel:200
cpa-open tony https://tony.tailf9ffa9.ts.net:8317/management.html Tony CLIProxyAPI Management Key HTTP 200
# Check status of all 4 hubs
cpa-open list

# Open dashboard + copy Management Key to clipboard
cpa-open tony

# Copy Client API Key only (for T3 Code Settings -> CLIProxy Hub)
cpa-open tony --client-key

# Close any active SSH tunnels (spark-work)
cpa-open close

5. Tailscale Isolation, Sharing & ACL Rules

Plain-English Explanation
Your corporate network (atccorp.com) and your consulting/personal network (raebconsulting.com) stay completely separate. You share only specific ports from MGMT01 and DGX Spark to your own account so you can work seamlessly from your MacBook without ever exposing corporate servers to Tony.
Current Cross-Tailnet Matrix
Host Native Tailnet Shared To Allowed Ports Notes
mgmt01 atccorp.com david@raebconsulting.com 8443, 22 T3 Code + SSH only. Never share to Tony.
spark-6122 atccorp.com david@raebconsulting.com 8318, 22 Personal Hub + SSH. Work Hub :8317 stays internal to atccorp.com.
tony Tony's tailnet david@raebconsulting.com 8443, 8317, 22 T3 Code + CLIProxyAPI + SSH. Zero access back to atccorp.com.
Security Hardening Reminder (atccorp.com ACL): Narrow src: ["autogroup:shared"] to ["david@raebconsulting.com"] in the atccorp.com Tailscale ACL before ever inviting another user into raebconsulting.com.

6. Zero-Secret Posture & Managed Policy Locks

macOS Keychain Map (-a cliproxyapi)

  • CLIProxyAPI Management Key / Client API Key
  • Spark Personal Management Key / Client API Key
  • Spark Work Management Key / Client API Key
  • Tony CLIProxyAPI Management Key / Client API Key
  • Planned: Cloudflare Swoop API Token & Cloudflare ATC API Token

T3 Code Managed Policy Schema (v0.1.11+)

Strict schema (onExcessProperty: "error"). Deployed at C:\Program Files\T3Code\policy.json (MGMT01) and /etc/t3code/policy.json (Tony WSL):

{
  "schemaVersion": 1,
  "organization": "Tony-Swoop",
  "limits": {
    "connect": false,
    "telemetry": false,
    "previewTunnel": false
  }
}

7. Tony's Box & 3-Layer WSL Keepalive

Plain-English Explanation
Tony's Windows laptop already has a rock-solid keepalive layer (wsl-keepalive + .wslconfig) that keeps Ubuntu running 24/7 after reboots. Always keep that layer ON — it's what keeps Tony's T3 Code and CLIProxyAPI alive. The only optional piece is the old tmux Claude service (swoop-claude.service), which you can disable once you're driving all Swoop work from T3 Code.
Service Layers on tony-win
  • Layer 1 — Keep ON: Windows Scheduled Task wsl-keepalive (runs wsl.exe -d Ubuntu --exec sleep infinity at logon + every 5m), C:\Users\Tony\.wslconfig (vmIdleTimeout=-1, 8 GB RAM, 12 cores), /etc/wsl.conf (systemd=true), and loginctl enable-linger tony.
  • Layer 2 — Active T3 Stack (Keep ON): cliproxyapi.service (127.0.0.1:8317) and t3-serve.service (127.0.0.1:3773, --base-dir /home/tony/.t3), exposed via Windows Tailscale Serve on :8317 and :8443.
  • Layer 3 — Legacy tmux Claude (Optional): swoop-claude.service runs git pull --ff-only and claude --rc --continue in tmux swoop. Disable it once migrated to T3 Code so two agents don't edit swoop-warehouse main simultaneously and to save RAM inside the 8 GB WSL cap.
# Mint a fresh 15-minute T3 pairing code for Tony's box
ssh -T tony-win "wsl -d Ubuntu -- /home/tony/.local/bin/t3 pair --base-dir /home/tony/.t3 --ttl 15m --label MacBook"

# Disable legacy swoop-claude.service (keeps wsl-keepalive, t3-serve, cliproxyapi ON)
ssh -T tony-win "wsl -d Ubuntu -- systemctl --user disable --now swoop-claude.service"

# Re-enable swoop-claude.service if ever needed
ssh -T tony-win "wsl -d Ubuntu -- systemctl --user enable --now swoop-claude.service"

8. AI-Agnostic HTML Artifact Hosting Architecture

Plain-English Explanation
No matter which AI creates an HTML report (Claude, Antigravity/Gemini, Codex, or T3 Code), you publish it with one command (publish-artifact). Links never expire when you switch AI accounts, and corporate ATC work stays 100% separated from Swoop/RAEB work.
Any AI Provider • Antigravity / Gemini • Claude Code • T3 Code (Mac / Tony / MGMT01) • Codex / Local GPU Outputs standalone *.html publish-artifact CLI Reads scoped tokens from Keychain --profile swoop --profile atc-cloud --profile atc-private 1. Swoop / RAEB Cloudflare Pages + Access Own CF Account • docs.raebconsulting.com/<slug> Email OTP / Google login (Maurice, Tony, optional client paths) 2. ATC Corporate Cloudflare Pages + Access SEPARATE ATC CF Account • Zero RAEB overlap Exec / partner shareable ATC reports gated by ATC Access policy 3. ATC Tailscale-Only Server (spark-6122:8444) Strictly inside atccorp.com tailnet • Zero third-party cloud Sensitive internal audits (MGMT01 ws-*, security reviews)
Multi-Account Isolation Design
  • Zero Cross-Account Bleed: publish-artifact never uses a single global wrangler login. Instead, it injects CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID per invocation from macOS Keychain (Cloudflare Swoop API Token vs Cloudflare ATC API Token).
  • Zero-Trust Access (Free up to 50 users): Cloudflare Zero Trust Access sits in front of both Pages projects so links require a 1-click email OTP or Google sign-in — no Claude account needed, works from iPhone or corporate laptops.
  • Strict Internal Option for ATC: --profile atc-private copies HTML over SSH to spark-6122 and serves it via tailscale serve --https=8444 (auto-indexed, reachable only inside atccorp.com).

9. Daily & Recovery Operations Playbook

# 1. Run full 8-point local AI stack health check
verify-ai-stack

# 2. Check all 4 CLIProxyAPI hubs & open any dashboard
cpa-open list
cpa-open mac | spark-personal | spark-work | tony

# 3. Mirror local scripts, LaunchAgents, hooks & redacted configs to ~/ops/mac/
ops-backup

# 4. Inspect Tony's WSL services & Tailscale Serve status
ssh -T tony-win "wsl -d Ubuntu -- systemctl --user status cliproxyapi.service t3-serve.service --no-pager && tailscale serve status"

# 5. If Tony's PC rebooted and nobody logged into Windows yet
ssh tony-win "schtasks /run /tn wsl-keepalive"

10. Continuous Change Log

Date Scope Change Summary
2026-11-30 Fleet / Runbook Rebuilt Master Runbook with Plain/Tech mode toggle, SVG topology + multi-account artifact hosting diagrams; added Swoop (CF Pages) + ATC Hybrid (separate ATC CF account + Spark Tailscale) architecture.
2026-11-30 CLIProxyAPI / Mac & Tony Enabled tailnet-only HTTPS Tailscale Serve (:8317) on MacBook Pro and Tony's box; created cpa-open launcher with 8 verified Keychain keys; reset Tony's bcrypt-hashed management key and verified HTTP 200 auth.
2026-11-30 Tony WSL Installed independent CLIProxyAPI v8.1.9 + T3 Code v0.1.13 under systemd --user, hard-locked /etc/t3code/policy.json, exposed T3 on https://tony.tailf9ffa9.ts.net:8443, paired Maurice's T3 Desktop.
2026-11-28 Tailscale / MacBook Configured atccorp.com → raebconsulting.com node sharing for MGMT01 (:8443, :22) and spark-6122 (:8318, :22); fixed Work Laptop corporate NRPT DNS with static hosts pins.
2026-11-27 MacBook Guardrails Built No-Receipt-No-Merge hooks (agy-receipt, 10/10 tests), installed googleapis/mcp-toolbox v1.18.0 + mcp-db read-only SQL wrapper, hardened MGMT01 Managed Policy & T3Code-MGMT01 task.
2026-11-25 Baseline Initial T3Code_CLIProxy_Runbook.html covering MacBook Pro, MGMT01, and DGX Spark Dual-Hub baseline.