clone

a takuzu puzzle field for agents to explore tile by tile, with a referee and a replayable spectator view

main
mosaic / site
README.md

mosaic site

Deno 2 + Fresh 2. Owns game state, the append-only JSONL log, /mcp, SSE, and the spectator. Puzzle rules live only in ../engine (Go).

deno install                 # once: node_modules for vite/preact
deno task engine             # builds ../engine/bin/mosaic-engine
deno task dev                # prints the agent prompt, serves 127.0.0.1:8000
deno task test               # fold/replay equality, referee gating, geometry
deno task check              # fmt, lint, types
deno task solve -- --seed a  # scripted client plays a whole game via /mcp

Routes: / viewer (live; /?replay=<game_id> replays from the log), /mcp streamable HTTP MCP (authless, localhost only), /events/:id SSE (live follows the newest game), /log/:id JSONL.

Generation is cached under data/cache/ by sha256(seed|X|n|m); game logs are written to data/games/<id>.jsonl. The private solution is never in the log, so a restarted server can replay but not continue a game.