No description
Wires the T24 server-side custom-modifier.register handler all the way through to per-engine custom registries on every connected client. net/types.ts: - new CustomModifierDescriptorWire interface mirroring the chess-side CustomModifierDescriptor (structurally identical; Zod-mirrored across the v3/v4 boundary). - new CustomModifierRegisterPayload + CustomModifierRegisteredPayload. - ServerMessage union extended with custom-modifier.registered envelope. - ClientMessage union extended with custom-modifier.register envelope. net/client.ts: - GameClientEvent union extended with custom-modifier.registered. - handleMessage dispatch switch routes the event to listeners. - new GameClient.sendRegisterCustomModifier(descriptor) helper that ships the message under the active room code; silent no-op when the client isn't in a room (mirrors sendMove's pre-connect guard). net/prediction.ts: - PredictionManager subscribes to custom-modifier.registered. On receipt, registers the descriptor onto BOTH baseEngine.customModifiers AND predictedEngine.customModifiers (when present) so subsequent profile applies and reconciliation from a future game.state can resolve the kind. Triggers an onStateChange so the UI re-renders. Two e2e fixmes remain — both depend on a CustomModifierEditor button that calls sendRegisterCustomModifier when the editor is opened from a multiplayer game. The wire is fully implemented; only the editor's multiplayer-aware send-button surface is missing. Documented as a T3.1 follow-up in the e2e fixme comments. |
||
|---|---|---|
| .github/workflows | ||
| .sisyphus | ||
| docs | ||
| packages | ||
| scripts | ||
| .gitignore | ||
| eslint.config.js | ||
| lefthook.yml | ||
| LICENSE | ||
| package.json | ||
| playwright.config.ts | ||
| README.md | ||
| tsconfig.base.json | ||
| tsconfig.json | ||
| vitest.workspace.ts | ||
@paratype
A Doorenbos-style Rete II rules engine for TypeScript games, with an authoritative WebSocket chess demo.
Packages
packages/rete— Rete II engine corepackages/chess— Browser chess demo (React + Vite)packages/server— Authoritative Bun WebSocket server
Docs
- SPEC.md — Engine specification
- PHASES.md — Development phases & perf budgets
- RULES.md — Chess rule presets
- PROTOCOL.md — WebSocket message protocol
Getting Started
bun install && bun run check