refactor: rename core-public -> engine-public; fold helpers in; drop shared

Tighten the package model around the determinism invariant: everything the
engine imports must itself be deterministic.

- Rename core-public -> engine-public (package, dir, `engine-public/*` alias,
  all 118 import sites). It is the deterministic public surface the engine
  depends on and that client/server also use.
- Move the pure formatting helpers (renderNumber/renderTroops) from shared
  into engine-public/format — the engine uses them and they're deterministic.
- Drop the now-empty shared package (and its alias). `shared` was intended for
  client/server-shared, engine-forbidden code; there is none yet, so it is
  removed and can be re-added when such code appears.

Final graph: engine-public (leaf) <- engine <- {client, server};
client/server also -> engine-public.

Verified: tsc clean; 1364 + 65 tests pass; prod build succeeds; engine-public
is a leaf; engine has no client/server imports. Lockfile regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Evan Pelle
2026-06-10 20:32:32 +00:00
parent a7f992e9b0
commit 43d07ca85f
145 changed files with 193 additions and 201 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import { Colord } from "colord";
import { base64url } from "jose";
import { assetUrl } from "engine/AssetUrls";
import { decodePatternData } from "core-public/PatternDecoder";
import { decodePatternData } from "engine-public/PatternDecoder";
import { PlayerType } from "engine/game/Game";
import { GameView } from "client/view";
import { uploadFrameData } from "./render/frame/Upload";