@bordiko/shared

v0.1.0

Published

Cross-cutting contracts shared by the TS client and Go services: the real-time wire protocol and the game-package manifest schema.

Readme

@bordiko/shared

Contracts shared by the TypeScript client and the Go services.

  • protocol.ts — the real-time WebSocket wire protocol. Clients send intents (join, move, leave, ping); the server replies with redacted per-player snapshots (state), events, move acks/rejections and error/pong. The server never sends the full state, the seed, or another player's hidden information.
  • manifest.ts — the GameManifest describing a published package (game.wasm + UI bundle + metadata, board kind, real-time needs, sandbox limits, content hashes, and the validation scenarios the registry replays).

These TypeScript types are the source of truth; the Go services mirror them (ultimately generated from a shared schema). Keeping both sides pointed at this package is what keeps the language boundary type-safe.