# for-ai · map.ugrad.ai hot-pipe

**You are an agent** joining the ugrad map / governance fleet. Read this file + `VERSION.json` first.

## 1. Discover live version

```bash
curl -sS https://map.ugrad.ai/VERSION.json
# fallback Pages origin:
curl -sS https://ugrad-map.pages.dev/VERSION.json
# local:
curl -sS http://127.0.0.1:9876/ugrad-map/VERSION.json 2>/dev/null \
  || cat ~/.panda/ugrad-map/VERSION.json
```

Search keys: `map.ugrad.ai`, `hotpipe`, `ugrad-map`, `VERSION.json`, `BLOCK0`, `3116`.

## 2. Pointer / deploy

| Host | Role |
|------|------|
| **tools.ugrad.ai** | Tools dashboard · GOV · IP · fleet boards (primary tools entry) |
| **map.ugrad.ai** | Canonical map product · map-hub |
| **gov.ugrad.ai** | Gov-tree super hub |
| **ugrad-map.pages.dev** | Cloudflare Pages project (CNAME target) |
| R2 | Only if large cable/cloud binaries exceed Pages limits |

Deploy:

```bash
bash ~/.panda/ugrad-map/scripts/deploy-pages.sh
# attach custom domains once (fixes CF error 1014)
unset CLOUDFLARE_API_TOKEN
npx wrangler pages domain add tools.ugrad.ai --project-name ugrad-map
npx wrangler pages domain add map.ugrad.ai --project-name ugrad-map
npx wrangler pages domain add gov.ugrad.ai --project-name ugrad-map
```

Error **1014** = hostname proxied but not attached to this Pages project (same CF account as `ugrad.ai` zone).

## 3. Local five-hub fleet

| Surface | URL |
|---------|-----|
| Gov split | http://127.0.0.1:9876/gov-tree-hub.html?mode=split&maplite=1 |
| Map | http://127.0.0.1:9876/map-hub.html |
| Recon hotpipe | http://127.0.0.1:8877/reconstruct.html?scene=paths/funeral-scene |
| Glyph (GrokYtalkY / jawta class) | http://127.0.0.1:8790/ugrad-arena.html?mode=glyph |
| SuperSplat viewer | http://127.0.0.1:9876/ugrad-map/viewer/viewer.html?media=supersplat |
| **LIVE STREAM CORE** | http://127.0.0.1:9876/ugrad-map/tools/live-stream/ |
| EQ CORE (reference UX) | http://127.0.0.1:9876/ugrad-map/tools/earthquake/ |
| Stream bus API | http://127.0.0.1:9876/api/stream |
| API | http://127.0.0.1:9876/api/health |

**Never bind 8765/8766.**

### Live stream bus (one handling path)

Unifies **/watch · /cam · optical/jawta · glyph arena · SuperSplat · collab** on a single control plane (EQ-class tool UI).

```bash
# snapshot + probes
curl -sS http://127.0.0.1:9876/api/stream | head -c 2000

# GO all surfaces (also mirrors /api/collab go)
curl -sS -X POST http://127.0.0.1:9876/api/stream \
  -H 'Content-Type: application/json' \
  -d '{"action":"go","role":"A","mission":"watch+cam+glyph+supersplat","channel":"supersplat"}'

# select visualization channel
curl -sS -X POST http://127.0.0.1:9876/api/stream \
  -H 'Content-Type: application/json' \
  -d '{"action":"select","channel":"glyph"}'

# talk line (GrokYtalkY class)
curl -sS -X POST http://127.0.0.1:9876/api/stream \
  -H 'Content-Type: application/json' \
  -d '{"action":"talk","role":"A","msg":"desk dual up"}'

# arm / mark live (C HANDS)
curl -sS -X POST http://127.0.0.1:9876/api/stream \
  -H 'Content-Type: application/json' \
  -d '{"action":"channel","channel":"watch","state":"live","role":"C"}'
```

TTY still needs Terminal.app: `bash scripts/launch-watch.sh` · `/watch` · `/cam`.

## 4. Roles (no collision)

| Term | Role |
|------|------|
| A Grok | Brain / code / plan |
| B MONITOR | curl health · api/moves · heartbeats |
| C HANDS | One browser driver · hotpipe numbers · SPACE pan |

## 5. Hotpipe calibrate (recon)

Hard-refresh funeral-scene. Align knobs = **number steppers**.  
Fine×0.1 · SPACE grab · Save snapshot · write `~/.panda/fleet/hands-note.txt` with meshOff*.

Console: `window.__align.set('meshOffX', 30)` · `.step('meshAlignYaw', 1)`

## 6. Media modes (scaffold)

Viewer: `/viewer/viewer.html?media=pointcloud`  
Modes: pointcloud · mesh · gsplat · supersplat · voxel · animation · mixed  
Recon local: `reconstruct.html?scene=…&media=pointcloud` (scaffold wiring)

GLB library versioning: `index.html?v=65` (asset cache bust; multi-media scaffold in `viewer/media-modes.js`).

## 7. Tools dashboard (tools.ugrad.ai)

| URL | Surface |
|-----|---------|
| https://tools.ugrad.ai/ | Host router → `/tools/geo-desk.html` (auto IP · map · gov hops) |
| `/tools/geo-desk.html` | Geo desk · LOCATION/NETWORK fields · map · lane hop tree |
| `/tools/dashboard.html#gov` | Classic governance lookup |
| `/tools/dashboard.html#fleet` | map-hub · gov-tree · locate · lane (prod parity) |
| `/tools/locate.html` | Locate · evidence · EXIF · scenarios |
| `/map-hub.html` · `/gov-tree-hub.html` | Full boards shipped static |

Also: bulk traceroute · IP · CDN probe · analytics placeholders · subdomain roster.

## 8. Privacy

No SSN, DOB, FOIA form bodies, paystubs. Case IDs + public contacts only.  
House: **3116 SE 21st** not 3115.

## 9. Robustness bar

Target: **portlandmaps.com-class** public map UX  
- lite default on prod  
- progressive layer load  
- smoke tests `/tests/smoke.html`  
- CORS on VERSION.json for agent fetch  

## 10. What not to do

- Do not thrash dual HANDS  
- Do not pkill Soft Path / MG  
- Do not put secrets in VERSION.json or roster  
