Files
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
..
2026-09-02 04:09:11 +08:00