Files
DeepTutor/web/contracts
Bingxi Zhao (Frank) 82621bd2f6 follow-up to #1308: one command-id generator, and not from Math.random
`crypto.getRandomValues` is not gated on a secure context — only
`randomUUID` is — so it is the right fallback on a plain-HTTP deployment,
and the `Math.random` tail is left only for a runtime with no Web Crypto.

The bare `globalThis.crypto.randomUUID()` this fixes had a twin at
`contracts/parse/turn-command.ts`, which throws in exactly the same
deployment. Both now call one exported `newCommandId`, living beside the
`command_id` field it fills rather than in the transport that happened to
notice first.

(cherry picked from commit 70333c900034d383500ca92e294b23445394068f)
2026-09-10 23:55:18 +08:00
..

Generated frontend contracts

The backend owns the wire contract. Do not edit files under schema/ or generated/ by hand.

From the repository root, refresh both layers after a backend contract change:

python scripts/export_frontend_contracts.py
cd web && npm run contracts:generate

CI runs python scripts/export_frontend_contracts.py --check in backend contract tests and npm run contracts:check before frontend typechecking. A drift failure means the committed artifacts must be regenerated with the commands above.