{"_id":"x-arcade","_rev":"7-9b36b2376fe92f3b1f6b6971ef16964b","name":"x-arcade","dist-tags":{"latest":"0.2.1"},"versions":{"0.1.0":{"name":"x-arcade","version":"0.1.0","keywords":["tui","terminal","game","snake","cli"],"license":"MIT","_id":"x-arcade@0.1.0","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"dist":{"shasum":"ba71a55bce07e74278ac42f5b271732aeb96ca17","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.1.0.tgz","fileCount":74,"integrity":"sha512-GDB7dJ7K6j7oW2xnHCK2/ZUdwSiwNlKoapLO6rAFixeIIjuzM+5I1fMWUJ+2yXJIEAcMcZUuOQO0rdOSiFgBfA==","signatures":[{"sig":"MEUCIQDaU5I0NKZztQZIQgcXK7sA6mf+2KRg0Mj9sJrohqfGmwIgTmvvpaK2AeBjBO1g9R5JYAVh/DlZ0qsh/PB6CWzi3Ik=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":299294},"type":"module","engines":{"node":">=20"},"gitHead":"62db32b427b5e8f4acf0f4412c5b58dc0dfad1fa","scripts":{"build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"repository":{"url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.6.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","directories":{},"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.21.5"},"_npmOperationalInternal":{"tmp":"tmp/x-arcade_0.1.0_1786232863805_0.33947205871251973","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"x-arcade","version":"0.1.1","keywords":["tui","terminal","game","snake","cli"],"license":"MIT","_id":"x-arcade@0.1.1","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"dist":{"shasum":"09ae4d5b176493ee049542fbdefe857f4b7a1734","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.1.1.tgz","fileCount":74,"integrity":"sha512-5d5KjbIcv2anc19zVRxex2X5aDRnPvBhu8T1fi2WxVWL8JzJvcGtAe5nPMhMtg/FH1vhdd1pU8VWfFVbIeSUHg==","signatures":[{"sig":"MEYCIQDibnvwMB+9dH3Olg1DspongdvjxIIsS1GrCZEQ40DUYAIhANHL+ohkcWHLoixb6HNGTCFv0BKKefvPjScxkq3yp/x+","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":301889},"type":"module","engines":{"node":">=20"},"gitHead":"00e3b4ec87f974705e5eb1f06c97a2db259f3eba","scripts":{"build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"repository":{"url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.6.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","directories":{},"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.21.5"},"_npmOperationalInternal":{"tmp":"tmp/x-arcade_0.1.1_1786233986769_0.9956167807064866","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"x-arcade","version":"0.1.2","keywords":["tui","terminal","game","snake","cli"],"license":"MIT","_id":"x-arcade@0.1.2","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"dist":{"shasum":"38b9da10683d0e386de734992222a35f0a432fd4","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.1.2.tgz","fileCount":74,"integrity":"sha512-TIv5l1qC/Mdvj9sVQo8iRYzLzzCUHviWIviBd9JCx5OySxKbL8PX7+ExKNUx5dzrdWB43GsXmeSPOauPrLg5SA==","signatures":[{"sig":"MEUCIQCHN6BtiS9K6/wthCEczBS8v4m7DWnXoeZxF4SnyBSVewIgTkzl+XuhBcARTt6iFmwCQQEdyJudv4kzU7Bz04P81HM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":304637},"type":"module","engines":{"node":">=20"},"gitHead":"6a95fd40e0f0cc983c7529799d65a82f9b647394","scripts":{"build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"repository":{"url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.6.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","directories":{},"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.21.5"},"_npmOperationalInternal":{"tmp":"tmp/x-arcade_0.1.2_1786234678442_0.9777498999380727","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"x-arcade","version":"0.1.3","keywords":["tui","terminal","game","snake","cli"],"license":"MIT","_id":"x-arcade@0.1.3","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"dist":{"shasum":"c577ae033bca4e046d7d14facf700ab1e71de639","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.1.3.tgz","fileCount":74,"integrity":"sha512-Na3Sn4Aku/LyXY2JR/h0N/rMR9LWRbq5BX2wHVVVq1Ne5jIaxozefDX2/3oTnCHIu93jKVKIaWCGu/545mx1fg==","signatures":[{"sig":"MEUCIC7DKu2xkK5fdO0mQLhJwd6ag0k46H6OMadUZG04MhdYAiEA0lbwy6wQ+coXr23Srktj8jypr4XQ6ca7a7zjAelrlJ8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":306364},"type":"module","engines":{"node":">=20"},"gitHead":"531b0ca2cd4d582caabb20d1e94db1bdb9bf5854","scripts":{"build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"repository":{"url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.6.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","directories":{},"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.21.5"},"_npmOperationalInternal":{"tmp":"tmp/x-arcade_0.1.3_1786241486192_0.5365955098162023","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"x-arcade","version":"0.1.4","keywords":["tui","terminal","game","snake","cli"],"license":"MIT","_id":"x-arcade@0.1.4","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"dist":{"shasum":"e35439af96c22551c1d8eb08c0f4714b78d2f778","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.1.4.tgz","fileCount":74,"integrity":"sha512-ZaA0Dn+4JJSDGH9B9lyl1JFqOVl3QSzTKxiE+3rvQHjDqFRp5rne2+cU14/6P5K+xKl81452tt5uNYiNfVX3hg==","signatures":[{"sig":"MEUCIFW9matEu9gw8DvNN7aFHFpzGvrQ9EQT50olmt2hbXfFAiEA73Vbu/3zEXy7AoPxlcPe4CY4Qh3WTKXFqXknP5k4ECE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":310951},"type":"module","engines":{"node":">=20"},"gitHead":"8b2bc290223003ba91ed1449197e3eab15c0b44c","scripts":{"build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"repository":{"url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.6.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","directories":{},"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.21.5"},"_npmOperationalInternal":{"tmp":"tmp/x-arcade_0.1.4_1786244305835_0.6465129992951131","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"x-arcade","version":"0.2.0","keywords":["tui","terminal","game","snake","cli"],"license":"MIT","_id":"x-arcade@0.2.0","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"dist":{"shasum":"87528ff53683442e948a67b0d99740cc570329b6","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.2.0.tgz","fileCount":78,"integrity":"sha512-IHR+csVIS0eG8xR7kOhf0m3XK109Sz2yzXh4IBdAnTJQorNt5XF+MSRYFwKtjTYlYT28eWI5rhh834f9+0S67w==","signatures":[{"sig":"MEUCIHpRIfBsZ2lzXKB+gU0grFahKCyIhCtMvVVblmYfu3sjAiEAheFhCDob2TceSn39ijOmEoIIghbwClce6GlQgoIwrOM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":405668},"type":"module","engines":{"node":">=20"},"gitHead":"d289ad3c90fca774452fd2899f067e66d9d777a9","scripts":{"build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","prepublishOnly":"npm run build"},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"repository":{"url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","type":"git","directory":"packages/cli"},"_npmVersion":"11.6.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","directories":{},"_nodeVersion":"24.10.0","_hasShrinkwrap":false,"devDependencies":{"esbuild":"^0.21.5"},"_npmOperationalInternal":{"tmp":"tmp/x-arcade_0.2.0_1786246401607_0.6156033889171539","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"x-arcade","version":"0.2.1","description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","type":"module","bin":{"arcade":"dist/index.js","x-arcade":"dist/index.js"},"engines":{"node":">=20"},"scripts":{"//build":"esbuild bundles @x-arcade/shared straight in. It is a private workspace package, so a published CLI that merely *depended* on it would fail at install with 'not found'. No --banner shebang: esbuild already preserves the one in src/index.ts, and adding a second put it on line 2 where it is a syntax error — the package crashed on every invocation.","build":"tsc -b && esbuild src/index.ts --bundle --platform=node --target=node20 --format=esm --outfile=dist/index.js && chmod +x dist/index.js","prepublishOnly":"npm run build"},"keywords":["tui","terminal","game","snake","cli"],"license":"MIT","devDependencies":{"esbuild":"^0.21.5"},"homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","repository":{"type":"git","url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","directory":"packages/cli"},"bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"gitHead":"630e7a3c96299b290b277ba145e008f2deb0926d","_id":"x-arcade@0.2.1","_nodeVersion":"24.10.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-91CXLrhuyACA/up0CkZG7Q7Jw61YnBXOF9bjzAd3L9E+yC7zZI0WYuUpgTxQrWho5IllDIEJpFU8BXTQvPD2wA==","shasum":"248f0e8ebf22ae5341972be45c352b0ffdfbc36e","tarball":"https://registry.npmjs.org/x-arcade/-/x-arcade-0.2.1.tgz","fileCount":78,"unpackedSize":407788,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDHEpsvOGex1Fj+l9fmf4ngYC9HEuBWaMjWbXGvsnApHAiEA+3CY1h/IMgEgBnGvyDiX6VH+6oPe+uWl62HinudrLDQ="}]},"_npmUser":{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"},"directories":{},"maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/x-arcade_0.2.1_1786254234771_0.9306743400409436"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-08T23:47:43.594Z","modified":"2026-08-09T05:43:55.071Z","0.1.0":"2026-08-08T23:47:43.956Z","0.1.1":"2026-08-09T00:06:26.954Z","0.1.2":"2026-08-09T00:17:58.624Z","0.1.3":"2026-08-09T02:11:26.404Z","0.1.4":"2026-08-09T02:58:25.985Z","0.2.0":"2026-08-09T03:33:21.774Z","0.2.1":"2026-08-09T05:43:54.933Z"},"bugs":{"url":"https://github.com/Agrawal-Aakarsh/grok-arcade/issues"},"license":"MIT","homepage":"https://github.com/Agrawal-Aakarsh/grok-arcade","keywords":["tui","terminal","game","snake","cli"],"repository":{"type":"git","url":"git+https://github.com/Agrawal-Aakarsh/grok-arcade.git","directory":"packages/cli"},"description":"Terminal-native daily mini-games for the dead minutes while your coding agent works.","maintainers":[{"name":"aakarsh_a","email":"aakarsh.agrawal@outlook.com"}],"readme":"# X Arcade\n\n**Daily mini-games for the dead minutes while your coding agent works.**\n\n```bash\nnpx x-arcade hook --install\n```\n\nThat's the whole setup. Restart your agent — the arcade opens beside it and asks for your handle the first time.\n\nYour agent starts thinking. The arcade splits in beside it. You play. When the agent needs you, a toast appears — it never steals focus, you switch when you're ready.\n\nEveryone plays the same maze and the same target image each UTC day, so the leaderboard compares something real.\n\n**Live board:** https://grok-arcade-server-three.vercel.app\n\n---\n\n## The games\n\n### Serpent\nSnake as a daily speedrun. Same maze, same apple sequence, everyone. Best of 3 runs is your rank; tiebreak is fewest ticks. Fully playable offline once the day's config is fetched.\n\n### Prompt Golf\nA secret target image is generated each day. Recreate it with the shortest prompt you can. A vision jury compares your image to the target and scores fidelity 0–100; a length multiplier then scales it, so a short prompt that gets close beats a long one that gets slightly closer.\n\nThere is **no pass/fail bar** — that was the first design and playtesting killed it. Three faithful recreations scored 44, 52 and 55 against a bar of 70, and every one read as a failure with nothing to show. Ranking on length alone is the opposite failure: the empty prompt wins. The multiplier keeps both halves live.\n\nYou get 3 attempts a day. Other players' prompts stay hidden until you've used yours.\n\n---\n\n## Setup\n\n```bash\nnpx x-arcade hook --install   # the only command you need\nnpx x-arcade                  # or just play, without the agent integration\n```\n\n`hook --install` copies the CLI to `~/.x-arcade/bin/` and points grok's hooks there, so it keeps working after npm garbage-collects the npx cache. No global install required.\n\nThe arcade asks for your X handle the first time it opens; `npx x-arcade login` exists if you want to change it later.\n\nNeeds Node ≥ 20 and a terminal at least 84×27. Below that you get a \"resize me\" prompt rather than an error.\n\n| Key | Action |\n|---|---|\n| arrows / `wasd` / `hjkl` | move |\n| `Enter` | play / submit |\n| `g` | ghosts (Golf) |\n| `Esc` | back |\n| `q` | quit |\n\n---\n\n## Agent integration\n\n`arcade hook --install` writes `~/.grok/hooks/x-arcade.json`. Restart grok, then `/hooks` should list five entries.\n\n| grok event | What happens |\n|---|---|\n| `UserPromptSubmit` | arcade splits in beside the agent |\n| `Stop` | **agent ready** toast |\n| `Notification` | **grok needs you — approval required** |\n| `SubagentStop` / `StopFailure` | task complete / agent error |\n\n**Auto-open needs cmux or tmux.** This is a hard platform limit, not a missing feature: on macOS Ghostty's only window CLI action is `+new-window`, which reports *\"not supported on this platform\"*; `new_split` exists solely as a keybinding action; and there's no IPC socket. **No external process can split a Ghostty window on macOS.** [cmux](https://github.com/manaflow-ai/cmux) is Ghostty underneath but exposes a Unix socket API, so it can — it's macOS-only. tmux is the cross-platform fallback.\n\nWithout either, everything else still works: open `arcade` in a pane yourself and the toast finds it.\n\nCheck what your setup supports:\n```bash\narcade pane --debug\n```\n\n### Two hook systems — use the right one\n\ngrok has two, and picking wrong costs an afternoon:\n\n| | `[[ui.notifications.hooks]]` in config.toml | `~/.grok/hooks/*.json` ← we use this |\n|---|---|---|\n| Focus gating | Two gates: global `condition` **and** per-hook `only_unfocused` | None |\n| Visible to `/hooks` | No | Yes |\n| File stability | grok rewrites config.toml through its own TOML serialiser, stripping comments | Ours alone |\n\nWe tried the notifications path first. It never fired, and worse, it was *unverifiable* — `/hooks` doesn't list it, so there was no way to distinguish \"not loaded\" from \"loaded but gated\".\n\n---\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm link --workspace packages/cli     # puts `arcade` on your PATH\nnpm test\n```\n\n**The server runs with zero configuration.** With no `DATABASE_URL` it uses an in-memory store implementing the same contract as Postgres, and with no `XAI_API_KEY` every provider falls back to a deterministic mock — so the entire Golf flow is exercisable offline and for free.\n\n```bash\nnpm run dev --workspace packages/server   # http://localhost:3939\nAPI_URL=http://localhost:3939 arcade\n```\n\n### Layout\n\n```\npackages/shared   pure rules — deterministic, no I/O, unit-tested\n  serpent/        engine + six curated mazes (flood-fill verified)\n  golf/           scoring: fidelity × brevity\npackages/cli      raw-ANSI TUI, no framework\n  term/           screen, cell buffer, input, Kitty images\n  games/          serpent (quadrant renderer), golf\n  pane.ts         cmux/tmux split-open\npackages/server   Next.js — 9 routes, Postgres or in-memory\n  lib/providers/  xAI image gen, vision jury, daily target pipeline\n```\n\n### Deploying\n\n**Supabase** — put the connection URI in `packages/server/.env.local` as `DATABASE_URL`, using the **session** pooler (port 5432; advisory locks need a persistent session). Then:\n\n```bash\nnpm run migrate --workspace packages/server\n```\n\nEvery table has RLS on with **no policies** — only the API reaches the data.\n\n**Vercel** — Root Directory `packages/server`. Env: `DATABASE_URL` (**transaction** pooler, port 6543 — serverless opens many short-lived connections), `SERVER_SALT`, `XAI_API_KEY`, `MAX_GENERATIONS_PER_DAY`.\n\nThe daily seed is `hash(day + SERVER_SALT)`. Without the salt, `seedForDay` — which ships inside the npm package — would let anyone compute next month's maze. **Set it once and never change it**; changing it mid-day re-rolls the maze and everyone's runs stop being comparable.\n\n### Cost\n\n~$0.16/player/day (3 images + 9 jury calls), plus ~$0.06/day for the target. `MAX_GENERATIONS_PER_DAY` is the global ceiling — per-handle limits cap individuals, only this caps the bill.\n\n---\n\n## Notes\n\nIdentity is honour-system: first claim on a handle wins and mints a device token, so nobody can overwrite your scores. X OAuth is the production path.\n\nRun submission checks plausibility bounds only. A determined player can forge a believable score; the real fix is submitting the input log and replaying it server-side, which the engine is deterministic enough to support.\n\nMIT.\n","readmeFilename":"README.md"}