feat(engine): add message queue, triggers, and orchestrators

New @tts/engine package: the pure message layer that drives bgm games.
MessageQueue snapshots and drains on tick; TriggerRegistry matches by
type/id with runtime enable/disable; runOrchestrator suspends on wait
until a matching message is processed. Engine ties them together behind
the CommandHost contract that @tts/tabletop will implement.
This commit is contained in:
2026-08-10 18:26:23 +08:00
parent 91cd3a16d7
commit 3167d26bd6
11 changed files with 517 additions and 0 deletions
+6
View File
@@ -183,6 +183,12 @@ importers:
specifier: ^4.1.10
version: 4.1.10(@types/node@22.20.1)(vite@8.2.1(@types/node@22.20.1)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.11)(yaml@2.9.0))
packages/engine:
devDependencies:
typescript:
specifier: ^5.7.2
version: 5.9.3
packages/extract:
dependencies:
'@tts/shared':