Skip to content
System One

typesafe-snake

Snake auto-played by Jev: one Choice per game tick, with legal moves and board facts computed in code before the call.

sorrycc/typesafe-snake on GitHub

Stars
21
Forks
3
Language
TypeScript
Last push
17 Sep 2026

Read from GitHub on . Counts change daily.

How it uses Jev

const res = await client.systemOne(
  {
    state: request.state as never,
    questions: { move: choice(request.instructions, request.criteria as Record<string, string>) },
  },
  // The browser aborts at the tick deadline; a retry could never land in time.
  { signal: c.req.raw.signal, timeout: 5000, retry: { maxRetries: 0 } },
);
const answer = res.answers.move;

View in server/index.ts

Open on GitHub

PrimitivesChoice

More like this

Use cases this is tagged with