7 Commits

Author SHA1 Message Date
Eric
4f177f9b8d feat(tasks): unify Workspace task board with Hermes Kanban backend (#311) (#348)
* wip(hermesworld): viral sprint checkpoint - landing rebuild + character pipeline scaffold

- standalone /hermes-world and /world routes bypass workspace shell
- root overlay leaks gated for landing + game surfaces
- character pipeline scaffolding (player/npc/glb-body components)
- canonical asset path public/assets/hermesworld/characters/
- docs: landing-page-spec, graphics-usability-plan, agora-believable-checklist, master-roadmap
- handoff at memory/goals/2026-05-05-hermesworld-viral-sprint/handoff.md

Local-only checkpoint. Not for upstream yet.

* feat(playground): persistent admin mode toggle with shield button

- Admin mode now persists via localStorage (key: hermes-playground-admin)
- Shield icon button in HUD (right rail, below focus toggle, md+)
- Click toggles admin panel and saves preference
- ?admin=1 URL param still works as override
- gitignore swarm worker scratch dirs

Mission: memory/swarm/missions/2026-05-05-pr-triage.md (5 swarm lanes dispatched on 19 open PRs, no-merge contract)

* feat(landing): add Play Now CTAs to HermesWorld landing

- Hero: Play Now (primary, gold), View on GitHub (demoted), Read Roadmap
- Header nav: Play badge (highlighted gold)
- Final CTA: Play Now (primary), GitHub + Roadmap (secondary)

All Play buttons go to /playground which mounts the title screen
(username + character customizer + Enter). Sets up the public-URL
deploy: hermes-world.ai → / serves landing → click Play → /playground.

* fix(tasks): use shared kanban backend

---------

Co-authored-by: Aurora release bot <release@outsourc-e.com>
2026-05-05 16:46:24 -04:00
Aurora release bot
48536718e5 fix(playground): switch primary multiplayer transport to HTTP polling \u2014 bulletproof, no WS gotchas
WebSockets were never actually connecting from Eric's browser (CF logs
showed zero WebSocket Upgrade requests during testing). Even when they
do connect, they're unreliable: CF DO hibernation, bg-tab throttling,
dev bundle env issues, network blips all kill them.

HTTP polling: dead simple, works everywhere, survives bg tabs, no
hibernation issue, no env-var dependency.

Server (deployed):
- POST /presence  body: {id, name, color, world, x, y, z, yaw, ...}
  Returns: {presences (others in world), chats (since lastChatTs), online, byWorld, peakToday, ts}
- POST /chat     body: {id, name, color, world, text, ts}
- POST /leave    body: {id} (called via navigator.sendBeacon on unload)

Client:
- New 1Hz polling loop in use-playground-multiplayer that POSTs presence
  and processes the snapshot response. Hardcoded fallback URL so it works
  even with stale dev bundles.
- sendChat now fans out to BroadcastChannel + WS + HTTP for redundancy.
- WS still attempted for low-latency presence updates between polls,
  but no longer required for MP to work.
- navigator.sendBeacon on beforeunload/pagehide so explicit leaves
  propagate even when the tab is closing.
2026-05-03 22:53:09 -04:00
Aurora release bot
989fca23b9 fix(playground-ws): switch to Cloudflare Hibernation API
The actual root cause: the DO worker was hibernating after ~10s of
inactivity (CF default), which silently killed every live WebSocket.
Clients reconnected but presence map was reset, count went to 0, all
avatars disappeared from each other's screens.

Fix: state.acceptWebSocket() lets the DO hibernate WITHOUT killing the
WebSockets. Messages route to webSocketMessage/Close/Error class methods.
Presence + chat ring are now persisted to storage so they survive
hibernation cleanly.

Server build is now 'hermes.playground.cf-worker.v2-hibernation'.
Deployed: version fc4a2e58-c7e2-44f5-8629-a266da423c7b.
2026-05-03 22:44:50 -04:00
Aurora release bot
faea3f82c7 fix(playground-ws): don't broadcast leave on raw socket close \u2014 let alarm-prune handle it
This eliminates the 'avatar disappeared then came back' flicker that was
happening every time a tab momentarily lost the WebSocket (CF DO hibernation,
bg-tab throttling, network blip). Now socket close just ages the presence;
if the client reconnects within STALE_AFTER_MS (12s) the avatar persists
seamlessly. Explicit 'leave' messages from the client (sent on beforeunload)
still propagate immediately as before.
2026-05-03 22:32:34 -04:00
Aurora release bot
afecc47008 feat(playground): knight armor pass + worker stale window bumped to 12s
Worker (deployed):
- STALE_AFTER_MS 5000 -> 12000 to forgive bg-tab throttling.

Player avatar:
- Muscled cuirass chest plate + glowing winged Hermes sigil disc on the chest
- Tasset (4 armored skirt strips) at the pelvis
- Steel gauntlets on the forearms
- Greaves (shin armor) on each leg
- Shoulder pauldron stud kept; helmet/cape/weapon variants unchanged

Result: avatars now read as actual knights, not blobs.
2026-05-03 22:15:26 -04:00
Aurora release bot
01affa551b perf(playground): multiplayer optimization sweep (5Hz + skip-still + world-scope + push-counts)
Client (use-playground-multiplayer.ts):
- Drop presence to 5 Hz (200ms, was 100ms). Halves bandwidth, identical look.
- Skip-send when player static (POS_EPSILON 0.04, YAW_EPSILON ~1.4°).
- Avatar config sent only on signature change, not every tick.
- Position-delta gate before re-render (RENDER_POS_EPSILON 0.03).
- World-scoped local rendering (visibleRemotes) — never see remotes from
  other worlds.
- Connection state ('offline' | 'broadcast' | 'ws' | 'both') exposed for HUD.
- Server-pushed count consumed via 'count' wire kind (no /stats polling).

Worker (playground-ws-worker/src/worker.ts) v1:
- World-scoped fan-out: only broadcast to recipients in same world.
- Push 'count' messages on every join/leave (zero poll cost on clients).
- Per-socket token bucket rate limit: 30 msgs/sec.
- 50ms presence dedupe per player (drops floods).
- Stale prune at 5s (matches client).
- Send live count baseline on connect handshake.

HUD (playground-online-chip.tsx):
- Consume server-pushed 'hermes-playground-count' CustomEvent.
- /stats fetch only as 3s fallback if no push arrives.
- Connection-state dot: green (live), yellow (local-only), red (offline).
- Tooltip shows peak + per-world breakdown.
- Pulsing animation when fully connected.

World-3d:
- Coalesced position poll to 200ms (matches presence cadence).
- Surface transport + serverCount on window for HUD chip.

Verified: pnpm build clean, worker deploy clean, WS handshake + count
push + byWorld breakdown all working against the live worker.
2026-05-03 09:02:06 -04:00
Aurora release bot
8a5971c97d feat(playground): nameplate portrait chips + CF Worker WS hub + online HUD
- Replace floating PNG portraits with portrait-chip nameplates above heads
  (NPCs, player, bots, remote players). Voxel body becomes the character;
  PNG identifies them at a glance without the chimera-y face hover.
- Add Cloudflare Workers + Durable Objects port of scripts/playground-ws.mjs
  in playground-ws-worker/ — same wire protocol so client connects unchanged.
  Includes /stats endpoint with online + byWorld + peakToday.
- Add PlaygroundOnlineChip HUD component that polls /stats and renders a
  live 'N agents online' badge. Hidden when VITE_PLAYGROUND_STATS_URL unset.
- Drop unused Billboard / useTexture imports from world-3d.

Build: pnpm build clean. No new deps. Worker deps install separately.
2026-05-03 08:45:46 -04:00