Version Handling
These docs describe the current v0.2 SDK API. There is one documented client surface: createSimulatorClient(), resource clients, generated protocol types, runtime validators, and MatchSession.
There is no runtime version negotiation and no multi-version docs set yet. Use the SDK package and simulator server from the same release or repository revision.
Exact seed strings
Public match, limited, lobby, tournament, and history seeds are decimal strings. This preserves all 64 bits across JSON and JavaScript; a number would round most generated seeds. Servers continue accepting legacy integer request bodies, but responses use strings, so schema-validating clients must upgrade with the server. Treat seed strings as opaque values and copy them back into request fields without converting them through Number or parseInt.
SchemaValidator grows by optional members only. hasUnknownDiscriminant and warmUp are both optional, so a hand-written validator built against an earlier SDK still satisfies the current interface — it just opts out of unknown-frame tolerance and of the automatic validator warm-up that createSimulatorClient() schedules on idle.
Package version
The npm package version lives in packages/ts-sdk/package.json. For v0.2, install @my-swu/simulator-client@0.2.x with the matching simulator server.
pnpm add @my-swu/simulator-client@0.2Wire schema marker
The package exports schemaVersion from the generated schema bundle. It is a deterministic SHA-256 hash of the exported schemas, their shared definitions, and the route manifest, so deployment tooling can check that a built SDK and server were generated from the same wire contract. Most apps do not need it.
import { schemaVersion } from '@my-swu/simulator-client'
console.log(schemaVersion)After contract changes
Regenerate the SDK after changing public request, response, command, event, or socket payload types:
pnpm sdk:buildscripts/verify.sh sdk regenerates the schema and SDK, then rejects modified, deleted, or untracked artifacts under packages/ts-sdk/schema and packages/ts-sdk/src/generated.
Then rebuild docs:
pnpm docs:build