mirror of
https://github.com/Pasta-Devs/Marinara-Agents.git
synced 2026-12-03 18:55:07 +07:00
[PR #1570] [MERGED] feat(blackjack): add a Blackjack table game for Conversation chats #1572
Labels
No labels
agent: chess
agent: conversation-calls
agent: eightball
agent: haptic
agent: hierarchical-maps
agent: hierarchical-maps
agent: illustrator
agent: poker
agent: rock-paper-scissors
agent: tic-tac-toe
agent: uno
artifacts
bug
bugfix
build
catalog
ci
client
dependencies
docs
documentation
enhancement
feature
fixed-in-staging
in-pr
normal-scope
packages
pull-request
qol
regression
roadmap
scope-risk
server
soup
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Agents#1572
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-Agents/pull/1570
Author: @Romuromylus
Created: 10/22/2026
Status: ✅ Merged
Merged: 10/22/2026
Merged by: @Romuromylus
Base:
staging← Head:feat/1569-blackjack📝 Commits (5)
554ab81feat(blackjack): add a Blackjack table game for Conversation chats (#1569)03c0f79Merge branch 'staging' into feat/1569-blackjack3c42ba7fix(blackjack): address Dottore review findings7325582Merge branch 'staging' into feat/1569-blackjack566b68efix(blackjack): settle the bet on a chips change and clear a resign 404📊 Changes
32 files changed (+2687 additions, -4 deletions)
View changed files
📝
README.md(+1 -0)➕
artifacts/blackjack-1.0.0.zip(+0 -0)📝
artwork/agent-covers/art-direction.json(+6 -0)➕
artwork/agent-covers/blackjack.png(+0 -0)➕
artwork/sources/blackjack-imagegen.png(+0 -0)➕
artwork/sources/blackjack-imagegen.prompt.txt(+7 -0)📝
catalog/preview/catalog.json(+77 -0)📝
catalog/preview/notes.json(+10 -0)📝
catalog/preview/v2/catalog.json(+77 -0)📝
catalog/preview/v2/notes.json(+10 -0)📝
catalog/preview/v3/catalog.json(+77 -0)📝
catalog/preview/v3/notes.json(+10 -0)📝
package.json(+1 -1)➕
packages/blackjack/CHANGELOG.md(+5 -0)➕
packages/blackjack/agents.json(+19 -0)➕
packages/blackjack/client.js(+43 -0)➕
packages/blackjack/locales/en.json(+17 -0)➕
packages/blackjack/manifest.json(+67 -0)➕
packages/blackjack/server.mjs(+6 -0)➕
packages/blackjack/src/engine/packages/client/src/components/chat/BlackjackBoard.tsx(+381 -0)...and 12 more files
📄 Description
Pull request
Linked issue
Closes #1569
Why this change
/turn-gamesREST surface are already game-agnostic.What changed
blackjackpackage (1.0.0), staging-only for now (STAGING_ONLY_PACKAGE_IDS), so it lands in the preview overlay and stays hidden from stable users.packages/blackjack/src/engine, stacked over the vendored turn-game framework like Calls does:shared/.../turn-games/blackjack/{types,tools,engine}.ts: a pure, seeded engine. Every player bets in seat order, the cards are dealt, each player plays their hands, then the engine plays the dealer and settles. Hit, stand, double on any two cards, split a pair once (split aces take one card each, a split 21 pays 1:1), dealer peek for blackjack, naturals pay 3 to 2, and an S17/H17 house rule. The shoe (1 to 8 decks) is reshuffled from(seed, round)every round using Poker's vendored deck and RNG, so a rewind redeals the same cards. Rounds are paced by the player (next_round), like Poker'snext_hand.announcerCharacterId/drainAnnouncements, the same contract Poker uses. A seated dealer plays no hand, so "you against a character dealer" is a valid two-seat table.blackjack_actiontool. Bets outside the range are clamped, and a garbled call falls back to a deterministic legal move.BlackjackBoard,BlackjackSetup,use-blackjackandblackjack-game.storemirror the Poker client and use the Engine host (store, query client, Modal) like the other games.scripts/build-feature-packages.mjs: ablackjackfeature entry withpackageSourceRoot/ownedSourcePaths, so its sources are never captured intosources/engine.packages/blackjack/{manifest.json,agents.json,server.mjs,client.js,locales/en.json},artifacts/blackjack-1.0.0.zip, and thecatalog/previewlanes and notes.packages/blackjack/CHANGELOG.mdfor 1.0.0, activation guidance incatalog-package-guidance.mjs, a README row under In development, and the cover atartwork/agent-covers/blackjack.pngwith its art-direction entry and generation prompt inartwork/sources/.tests/blackjack-engine.regression.mjs: rules regression that loads the shippedserver.mjs, activates it against a stub API and drives the registered engine (betting and clamping, determinism, wins, 3:2 naturals, pushes, dealer bust, S17 vs H17, bust handling, double, split and split aces, dealer peek, running out of chips, round limit, the hole card never reaching any prompt, tool parsing, fallbacks and announcement draining).tests/package-turn-game.e2e.tscoversblackjack, andnpm run typecheck:packagesnow includes it.typecheck-packages.mjslists the Engine'sfunction-calls/tool-definitionsas a host module: it's a type-only import of the turn-game contract thatsources/enginedoesn't vendor.Package and security impact
blackjack(new). No existing package is rebuilt or changed.25f8df7b0), the same as the other Conversation games.agent-runtime,chat-read,chat-write,storage,ui(identical to Poker). Server entry registers one turn-game engine and the[blackjack]command tag; client entry definesmarinara-capability-blackjack.Validation
node scripts/validate-catalog.mjspasses locallygit diff --checkpasses locallyCONTRIBUTING.mdManual verification notes
MARINARA_ENGINE_ROOT=<Engine worktree at 25f8df7b0, pnpm install> node scripts/build-feature-packages.mjs blackjackon Windows. The build touched nosources/enginefiles.node scripts/test-catalog-lanes.mjs,node scripts/validate-package-locales.mjs,node scripts/validate-catalog.mjs(preview overlay lists blackjack as staging-only),node scripts/tests/catalog-release-notes.regression.mjs,node scripts/validate-package-locale-keys.mjs,node scripts/tests/vendored-engine.regression.mjs,npm run check(0 errors),git diff --check, andnode tests/blackjack-engine.regression.mjs.typecheck-packages.mjs blackjack gamesis clean. On Windows I ran it through a temporary copy that startsnode_modules/typescript/bin/tscwith node, becauseexecFileSynccan't start the POSIX.bin/tscshim there. I also compiled the engine withtsc --strict --noUncheckedIndexedAccessin a merged tree: clean.tests/package-turn-game.e2e.tswithMARINARA_PACKAGE_ID=blackjackpasses on desktop-chromium and mobile-chromium against the 25f8df7b0 Engine. The fixture installs the package, the board mounts in a Conversation chat, and it locks while the Engine's chat store says the character is replying. On Windows I ranstart-package-browser-servers.mjsand the Playwright CLI by hand becauserun-package-browser-tests.mjsspawnspnpmandplaywright.cmdwithout a shell, which Node refuses there.npm run checkon the merged tree: all pass.client.jsis about 162 KB, and a local rebuild of committed Poker comes out the same size here (the committed one is 34 KB). The extra code is vendored@marinara-engine/sharedconstants reached through the Setup helpers, not Blackjack code. A maintainer rebuild on the usual host should shrink it the same way.node tests/blackjack-engine.regression.mjs, and I'd like it added topull-request-checks.ymlnext to the other package tests.Documentation impact
Characters can't start a game on their own yet. The package registers the
[blackjack]tag, and the Engine's turn-game bridge already starts a game for it, but the per-game Commands toggle and prompt line in Chat Settings are still hard-coded per game in the Engine. That's a small Engine follow-up, and the README row and activation guidance say so for now.UI evidence (if applicable)
Screenshots from the live install pass will go here.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
[PR #1570] feat(blackjack): add a Blackjack table game for Conversation chatsto [PR #1570] [MERGED] feat(blackjack): add a Blackjack table game for Conversation chats