mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #2721] [MERGED] feat(turn-games): playable UNO in conversation mode + extensible turn-game framework #5718
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5718
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2721
Author: @Romuromylus
Created: 6/21/2026
Status: ✅ Merged
Merged: 6/21/2026
Merged by: @SpicyMarinara
Base:
staging← Head:feat/turn-games-uno📝 Commits (10+)
69cc0defeat(turn-games): add UNO playable in conversation modede1366cfix(turn-games): support game_engine_state on the file-storage backend9414142feat(turn-games): natural in-character bot turns + board polish455c349fix(turn-games): start the bot loop when the opening turn is a bot's58e3168feat(turn-games): make conversation bots aware of an in-progress game79711a4feat(turn-games): trigger UNO via /uno + natural language, drop the button628a584Connect UNO board + free-chat to game statec91c873Fix duplicate UNO setup modale3e71befix(uno): order the board seat row by live turn order26b0e6ffeat(uno): AI-driven UNO start via an in-character agreement command📊 Changes
36 files changed (+3809 additions, -12 deletions)
View changed files
📝
packages/client/src/components/chat/ChatSettingsDrawer.tsx(+5 -0)📝
packages/client/src/components/chat/ChatSetupWizard.tsx(+1 -0)📝
packages/client/src/components/chat/ConversationInput.tsx(+11 -0)📝
packages/client/src/components/chat/ConversationView.tsx(+16 -2)➕
packages/client/src/components/chat/UnoBoard.tsx(+409 -0)➕
packages/client/src/components/chat/UnoSetup.tsx(+189 -0)📝
packages/client/src/hooks/use-generate.ts(+14 -0)➕
packages/client/src/hooks/use-uno.ts(+135 -0)📝
packages/client/src/lib/slash-commands.ts(+14 -0)➕
packages/client/src/stores/uno-game.store.ts(+35 -0)📝
packages/server/src/db/file-backed-store.ts(+2 -0)📝
packages/server/src/db/migrate.ts(+17 -0)➕
packages/server/src/db/schema/game-engine-state.ts(+28 -0)📝
packages/server/src/db/schema/index.ts(+1 -0)📝
packages/server/src/routes/conversation.routes.ts(+8 -0)📝
packages/server/src/routes/generate.routes.ts(+140 -3)📝
packages/server/src/routes/index.ts(+2 -0)➕
packages/server/src/routes/turn-games.routes.ts(+94 -0)📝
packages/server/src/services/conversation/character-commands.ts(+16 -0)📝
packages/server/src/services/storage/chats.storage.ts(+17 -0)...and 16 more files
📄 Description
Linked issue
No issue is linked yet, since this is a self-initiated feature. Per the template guidance I am happy to open a feature request to gather opinions and link it here before this leaves draft.
Closes #
Why this change
What changed
packages/shared/src/features/turn-games/. On the server/engine side a new game is a new folder plus a manifest, and the runner, persistence, REST routes, and the genericturn_game_state_patchSSE event stay game-agnostic; each game additionally ships its own client board and store.publicViewfor the board, and a hand-freespectatorSummaryfor free-chat awareness.turn-game-runner.service.ts,turn-games.routes.ts) backed by a newgame_engine_statetable, registered in BOTH storage backends:migrate.ts(libsql) andfile-backed-store.ts(the file-native store used in production). A table registered in only one would 500 at runtime.turnGameBotsflag that short-circuits the normal conversation pipeline. The model proposes a move via a restricted, per-turn tool call (validated by the engine, with a deterministic fallback so a bot can never stall) and then narrates the engine-confirmed result in character. Move tools are injected per turn rather than added to the global tool registry.UnoBoard.tsx) driven by a Zustand store fed by an initial fetch plus a newuno_state_patchSSE event. Cards are pure CSS/SVG. The seat row renders in live turn order (current player first, in the play direction, so a Reverse visibly flips the queue) and includes the human in their real slot./uno, a natural-language phrase, or a new in-character[uno]conversation command. A character emits[uno]only when the user proposes a game and they are willing to play; declining is simply not emitting it. Defaults on and is toggleable like the other conversation commands (CONVERSATION_COMMAND_KEYS).[scene]guidance now excludes card / board games (so "let's play uno" no longer starts a roleplay scene by mistake); characters seated at an active game are treated as present at the table (their schedule offline-skip and dnd/idle typing delay are bypassed for that chat); and autonomous messaging is suppressed while a game is active so it cannot seize the chat's single generation lock and stall a bot turn.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Automated checks already run locally:
pnpm check(TypeScript + ESLint + production build across all packages) passes, and the turn-game / UNO engine test suite (node:test, gitignored and run locally, so not part of this diff) passes 30/30, including a full game played through the runner with DB round-trips, a 40-game fallback fuzz, and reverse-flips-direction / persona-name / finished-game-context regression guards.The checkboxes above are intentionally left unticked: per this template's note, an agent should not tick them. The following are the in-browser checks a reviewer should confirm:
/uno: the setup modal opens, deal works, the board renders for 1vN.[uno]); a game starts and no roleplay scene is created.generate.routes.ts.Docs and release impact
No docs or version/release-metadata files are touched by this PR.
UI evidence (if applicable)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.