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
18 changes: 18 additions & 0 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -504,9 +504,27 @@ Based on CodeRabbit learnings (see `.claude/learnings/ui-error-handling-review-2
- [ ] Shared utilities extracted (no duplicate functions like `ownerFromJwt`)
- [ ] Unused imports removed

## Topology & Runner Strategy

**Master topology:** `pmoves/docs/operations/TOPOLOGY.md` — single source of truth for all nodes, services, routes, and DNS.

**Nodes:** Z890 (dev/GPU), 5090 (primary GPU, pending), KVM4-1 (API gateway), KVM4-2 (data/storage), KVM2 (exit proxy), Cloudflare Edge (DNS/Worker).

**Agent Teams (11 teams, 62 agents):** `pmoves/configs/agent-teams.yaml` — orchestration, research, media, data, ui, automation, evolution, infra, sandbox, life, external.

**CI Runners:** `self-hosted, ai-lab` (GPU), `self-hosted, cloudstartup` (staging), `self-hosted, kvm4` (production), `self-hosted, kvm2` (backup), `ubuntu-latest` (lightweight). Routing via Cloudflare Worker (`deploy/cloudflare/worker.js`).

**DNS:** `pmoves.ai` zone (pending Cloudflare migration). Subdomains: api, agent, rag, tts, n8n, grafana, search, nats, minio, headscale, ci.

**Quick references:**
- `.claude/context/runner-topology.md` — condensed topology for agent context
- `pmoves/docs/operations/WORKFLOW_RUNNER_MAP.md` — all 19 GitHub Actions workflows mapped to runners
- `deploy/HYBRID_RUNNER_STRATEGY.md` — runner fleet documentation

## Additional References

See `.claude/context/` for detailed documentation:
- `runner-topology.md` - Condensed node/runner/team topology for agent context loading
- `credentials-workflow.md` - Credential bootstrap, env-setup, secrets-funnel, JWT-from-Supabase flow
- `services-catalog.md` - Complete service listing with all details
- `submodules.md` - Complete submodules catalog (20 submodules)
Expand Down
66 changes: 66 additions & 0 deletions .claude/context/runner-topology.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Runner & Topology Context (Condensed)

> Quick-reference for agents. Full details: `pmoves/docs/operations/TOPOLOGY.md`

## Nodes

| Node | Role | Key Services | Runner |
|------|------|-------------|--------|
| **Z890** | Dev + GPU (3090Ti) | All (local Docker Compose) | `self-hosted, ai-lab, gpu, cuda` |
| **5090** | Primary GPU (pending) | Future inference | (pending) |
| **KVM4-1** | API Gateway | TensorZero, Agent Zero, Hi-RAG, Archon, Gateway Agent | `self-hosted, vps, kvm4, production` |
| **KVM4-2** | Data/Storage | Supabase, NATS, Qdrant, Neo4j, Meilisearch, MinIO, monitoring | `self-hosted, vps, kvm4, production` |
| **KVM2** | Exit Node | nginx (SSL termination) | `self-hosted, vps, kvm2, backup` |
| **Cloudflare** | Edge | DNS, CI Worker | — |

## Route: Public → Services

```text
Internet → Cloudflare DNS → KVM2 (nginx/SSL) → KVM4-1 (API) or KVM4-2 (data)
```

## Route: CI/CD

```text
GitHub event → CF Worker (analyzes files) → ai-lab (GPU) / vps (Docker) / ubuntu-latest (light)
```

## Agent Teams (11 teams, 62 agents)

| Team | Node Affinity | CI Runner | Count |
|------|--------------|-----------|-------|
| orchestration | kvm4-1, z890, 5090 | ai-lab | 6 |
| research | kvm4-1, kvm4-2, z890 | vps | 9 |
| media | 5090, z890 | ai-lab | 11 |
| data | kvm4-2, z890 | vps | 9 |
| ui | z890, 5090 | ubuntu-latest | 6 |
| automation | kvm4-1, z890 | vps | 4 |
| evolution | 5090, z890 | ai-lab | 4 |
| infra | kvm4-1, kvm2 | vps | 3 |
| sandbox | cloud | ubuntu-latest | 7 |
| life | z890 | ubuntu-latest | 2 |
| external | N/A (CLI) | N/A | 0 agents (7 human contributors) |

## DNS Subdomains (pmoves.ai)

| Subdomain | Target Node | Proxy |
|-----------|------------|-------|
| `api.pmoves.ai` | KVM4-1 | Yes |
| `agent.pmoves.ai` | KVM4-1 | Yes |
| `rag.pmoves.ai` | KVM4-1 | Yes |
| `tts.pmoves.ai` | Z890 (via Tailscale relay) | Yes |
| `n8n.pmoves.ai` | KVM4-1 | Yes |
| `grafana.pmoves.ai` | KVM4-2 | Yes |
| `search.pmoves.ai` | KVM4-2 | Yes |
| `nats.pmoves.ai` | KVM4-2 | DNS only |
| `minio.pmoves.ai` | KVM4-2 | DNS only |
| `headscale.pmoves.ai` | KVM2 | DNS only |
| `ci.pmoves.ai` | CF Worker | Yes |

## Key Files

- `pmoves/configs/agent-teams.yaml` — Team definitions
- `pmoves/config/agent_registry.yaml` — Full agent registry
- `deploy/cloudflare/worker.js` — CI routing logic
- `deploy/scripts/deploy-vps.sh` — VPS deployment
- `pmoves/docs/operations/WORKFLOW_RUNNER_MAP.md` — All 19 workflows mapped
2 changes: 1 addition & 1 deletion PMOVES-Danger-infra
2 changes: 1 addition & 1 deletion PMOVES-E2B-Danger-Room
2 changes: 1 addition & 1 deletion PMOVES-Headscale
2 changes: 1 addition & 1 deletion PMOVES-Pipecat
Submodule PMOVES-Pipecat updated 725 files
2 changes: 1 addition & 1 deletion PMOVES-Ultimate-TTS-Studio
2 changes: 1 addition & 1 deletion PMOVES-llama-throughput-lab
2 changes: 1 addition & 1 deletion PMOVES-surf
2 changes: 1 addition & 1 deletion PMOVES-tensorzero
2 changes: 1 addition & 1 deletion PMOVES-transcribe-and-fetch
2 changes: 1 addition & 1 deletion Pmoves-AgentGym-RL
2 changes: 1 addition & 1 deletion Pmoves-hyperdimensions
Submodule Pmoves-hyperdimensions updated 41 files
+0 −1 .gitignore
+0 −61 PMOVES.AI_INTEGRATION.md
+0 −1 docker-compose.yml
+0 −100 docs/PMOVES-Agent-Zero/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-Agent-Zero/README.md
+0 −100 docs/PMOVES-Archon/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-Archon/README.md
+0 −103 docs/PMOVES-BotZ-gateway/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-BotZ-gateway/README.md
+0 −100 docs/PMOVES-Deep-Serch/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-Deep-Serch/README.md
+0 −100 docs/PMOVES-HiRAG/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-HiRAG/README.md
+0 −100 docs/PMOVES-Jellyfin/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-Jellyfin/README.md
+0 −100 docs/PMOVES-MAI-UI/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES-MAI-UI/README.md
+0 −101 docs/PMOVES_YT/INTEGRATION_DOSSIER.md
+0 −7 docs/PMOVES_YT/README.md
+0 −100 docs/Pmoves-cipher/INTEGRATION_DOSSIER.md
+0 −7 docs/Pmoves-cipher/README.md
+0 −100 docs/Pmoves-hyperdimensions/INTEGRATION_DOSSIER.md
+0 −7 docs/Pmoves-hyperdimensions/README.md
+0 −113 portal/portal-auth.js
+0 −294 portal/portal.css
+0 −82 portal/portal.html
+0 −313 portal/portal.js
+0 −148 saves/PMOVES-Agent-Zero_topology.json
+0 −147 saves/PMOVES-Archon_topology.json
+0 −145 saves/PMOVES-BotZ-gateway_topology.json
+0 −145 saves/PMOVES-Deep-Serch_topology.json
+0 −146 saves/PMOVES-HiRAG_topology.json
+0 −144 saves/PMOVES-Jellyfin_topology.json
+0 −144 saves/PMOVES-MAI-UI_topology.json
+0 −145 saves/PMOVES_YT_topology.json
+0 −143 saves/Pmoves-cipher_topology.json
+0 −143 saves/Pmoves-hyperdimensions_topology.json
+1 −49 saves/_list.json
+0 −91 saves/agent_topology.json
+0 −280 tools/generate_dossier.py
+0 −459 tools/generate_topology.py
16 changes: 13 additions & 3 deletions deploy/cloudflare/wrangler.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ main = "worker.js"
compatibility_date = "2025-12-08"
workers_dev = true

# Account ID (override with CLOUDFLARE_ACCOUNT_ID env var)
# Account ID — set via CLOUDFLARE_ACCOUNT_ID env var or wrangler login
# account_id = "your_account_id_here"

# KV Namespace for build state tracking (create via: wrangler kv:namespace create "CI_STATE")
Expand Down Expand Up @@ -42,10 +42,20 @@ vars = { RUNNER_DISPATCH_MODE = "cloudflare-only" }
# - CLOUDFLARE_API_TOKEN: For deploying via Workers API
# - DISCORD_WEBHOOK_URL: Discord notification endpoint

# Routes (configure after deployment)
# Routes — uncomment after pmoves.ai zone is active in Cloudflare
# routes = [
# { pattern = "ci.pmoves.ai/webhook", zone_name = "pmoves.ai" }
# { pattern = "ci.pmoves.ai/webhook/*", zone_name = "pmoves.ai" },
# { pattern = "ci.pmoves.ai/health", zone_name = "pmoves.ai" },
# { pattern = "ci.pmoves.ai/status", zone_name = "pmoves.ai" },
# { pattern = "ci.pmoves.ai/metrics", zone_name = "pmoves.ai" }
# ]
#
# Secrets to set before deploy:
# wrangler secret put WEBHOOK_SECRET # GitHub webhook HMAC secret
# wrangler secret put GITHUB_TOKEN # GitHub PAT for PR file fetching
# wrangler secret put DISCORD_WEBHOOK_URL # Discord notification endpoint
#
# Deploy: cd deploy/cloudflare && npm install && npx wrangler deploy

# Limits
limits = { cpu_ms = 50 }
Expand Down
Loading
Loading