No description
T7 (spawn-marker-pair schema widening) — widen two primitive schemas to accept
resolver shapes on numeric and enum fields, enabling real fixtures to validate.
## Changes
### spawn-marker.ts
- Widen `square` from literal number to numberOrResolver({ min: 0, max: 63 })
- Widen `owner` from literal enum to enumOrResolverFor(PIECE_COLORS).optional()
- Keep `markerKind` strict enum (design constraint — locked marker kinds)
- Update apply() to cast resolved params to literals before engine call
### spawn-marker-pair.ts
- Widen `squareA` and `squareB` to numberOrResolver({ min: 0, max: 63 })
- Widen `owner` to enumOrResolverFor(PIECE_COLORS).optional()
- Keep `markerKind` strict enum
- Update apply() method with cast assertions
### Tests
- Add 8 resolver-shape positive tests to spawn-marker.test.ts
- Add 8 resolver-shape positive tests to spawn-marker-pair.test.ts
- Add 2 strict-enum negative tests (markerKind rejection)
- Add 2 __resolverEnumValues introspection tests (ParamField compatibility)
- Add mr-freeze-validates.test.ts: validates mr_freeze.json (cascade depth 3)
fixture with resolver shapes on square (ctx-build) and owner (ctx-attr)
## Verification
✅ mr_freeze.json now validates cleanly (was the wave goal)
✅ __resolverEnumValues property exposed and survives .optional() wrapper
✅ 60 tests pass (30 spawn-marker + 29 spawn-marker-pair + 1 mr-freeze)
✅ No new linting issues
✅ Links field left alone (mr_freeze doesn't use resolver shapes on links)
|
||
|---|---|---|
| .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