[PR #3700] [MERGED] fix: hot-activate conversation games #6059

Closed
opened 2026-10-23 04:06:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3700
Author: @SpicyMarinara
Created: 7/16/2026
Status: ✅ Merged
Merged: 7/16/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/hot-activate-conversation-games


📝 Commits (6)

  • 4675e7f fix: hot-activate conversation games
  • ed0690a Merge branch 'staging' into agent/hot-activate-conversation-games
  • d835849 docs: clarify manual game activation
  • f34b941 Merge remote-tracking branch 'origin/agent/hot-activate-conversation-games' into agent/hot-activate-conversation-games
  • 61c5d10 Address CodeRabbit review feedback
  • d2f0ad3 Merge remote-tracking branch 'origin/agent/hot-activate-conversation-games' into agent/hot-activate-conversation-games

📊 Changes

12 files changed (+271 additions, -33 deletions)

View changed files

📝 docs/conversation/table-games.md (+1 -1)
📝 docs/development/optional-agent-packages.md (+2 -0)
📝 package.json (+1 -1)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+2 -2)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+2 -1)
📝 packages/client/src/components/chat/ConversationInput.tsx (+49 -11)
📝 packages/client/src/hooks/use-capability-packages.ts (+1 -1)
📝 packages/client/src/lib/slash-commands.ts (+60 -4)
📝 packages/server/src/routes/capability-packages.routes.ts (+15 -3)
📝 packages/server/src/services/capability-packages/capability-module-runtime.service.ts (+43 -6)
📝 scripts/regressions/capability-package-lifecycle.regression.ts (+23 -3)
➕ scripts/regressions/conversation-game-slash.regression.ts (+72 -0)

📄 Description

Linked issue

Closes #3699

Paired package publication: Pasta-Devs/Marinara-Agents#55.

Why this change

Installed Conversation game manifests declare manual launchers such as /uno, but the client slash matcher only considered static Engine commands. Game commands therefore fell through as ordinary chat text. The same packages were marked restart-required even though turn-game runtimes register reloadable engines, commands, and services rather than Fastify routes.

What changed

  • Synthesize slash commands and single-token aliases from ready installed conversationGame manifest contributions.
  • Make those commands available in autocomplete, /help, normal Send, and Quick Replies Post Only without consulting per-chat character-command toggles.
  • Add focused hot activation/deactivation for turn-game server runtimes while preserving restart behavior for route-bearing packages.
  • Refresh the installed package and agent registries after activation and hot-detach game runtimes before uninstall.
  • Document install-only manual launch behavior and add regressions for slash discovery plus runtime activation cleanup.

Validation

  • pnpm check
  • Capability package lifecycle regression
  • Conversation game slash regression
  • Install a game in a running Engine and launch it immediately with its slash command
  • Confirm the slash command works with the chat's Commands toggle off
  • Uninstall the game and confirm its slash command and surface disappear without restart
  • Confirm Maps and Calls retain their existing restart-required path

Automated evidence

  • pnpm check — passed.
  • pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/capability-package-lifecycle.regression.ts — passed.
  • pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/conversation-game-slash.regression.ts — passed.

Manual proof gap

A live install/uninstall browser smoke test remains before this draft is ready. The paired 1.0.2 package artifacts are being prepared separately.

Risk

This changes executable capability-package lifecycle behavior. Hot activation is intentionally restricted to packages whose manifest includes turn-game; route-bearing Maps and Calls packages are not dynamically registered into an already-ready Fastify instance.

Summary by CodeRabbit

  • New Features

    • Installed conversation games now appear immediately in slash-command autocomplete and can be launched without restarting.
    • Game commands and aliases are available only when the corresponding game is installed and ready.
    • Uninstalling a game removes its commands and runtime contributions immediately.
  • Documentation

    • Clarified installation, availability, and restart behavior for table games and optional agent packages.
  • Bug Fixes

    • Improved command matching and availability across conversation modes.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/3700 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/16/2026 **Status:** ✅ Merged **Merged:** 7/16/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/hot-activate-conversation-games` --- ### 📝 Commits (6) - [`4675e7f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4675e7ff7d95d792a3ce673d363573e2b7986de0) fix: hot-activate conversation games - [`ed0690a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed0690aa398a57989b89ce6ea5d3fb3a60deea51) Merge branch 'staging' into agent/hot-activate-conversation-games - [`d835849`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d835849d8fac4528d7af0e8f5ac5aafb37ebf844) docs: clarify manual game activation - [`f34b941`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f34b941d48ecf425d148fa87d88b94639155a40e) Merge remote-tracking branch 'origin/agent/hot-activate-conversation-games' into agent/hot-activate-conversation-games - [`61c5d10`](https://github.com/Pasta-Devs/Marinara-Engine/commit/61c5d108fd6fa9352971fc71f0dca9fef9ab2db2) Address CodeRabbit review feedback - [`d2f0ad3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d2f0ad3a81190e4d56a78e45884ece2bbc56bac9) Merge remote-tracking branch 'origin/agent/hot-activate-conversation-games' into agent/hot-activate-conversation-games ### 📊 Changes **12 files changed** (+271 additions, -33 deletions) <details> <summary>View changed files</summary> 📝 `docs/conversation/table-games.md` (+1 -1) 📝 `docs/development/optional-agent-packages.md` (+2 -0) 📝 `package.json` (+1 -1) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+2 -2) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+2 -1) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+49 -11) 📝 `packages/client/src/hooks/use-capability-packages.ts` (+1 -1) 📝 `packages/client/src/lib/slash-commands.ts` (+60 -4) 📝 `packages/server/src/routes/capability-packages.routes.ts` (+15 -3) 📝 `packages/server/src/services/capability-packages/capability-module-runtime.service.ts` (+43 -6) 📝 `scripts/regressions/capability-package-lifecycle.regression.ts` (+23 -3) ➕ `scripts/regressions/conversation-game-slash.regression.ts` (+72 -0) </details> ### 📄 Description ## Linked issue Closes #3699 Paired package publication: Pasta-Devs/Marinara-Agents#55. ## Why this change Installed Conversation game manifests declare manual launchers such as `/uno`, but the client slash matcher only considered static Engine commands. Game commands therefore fell through as ordinary chat text. The same packages were marked restart-required even though turn-game runtimes register reloadable engines, commands, and services rather than Fastify routes. ## What changed - Synthesize slash commands and single-token aliases from ready installed `conversationGame` manifest contributions. - Make those commands available in autocomplete, `/help`, normal Send, and Quick Replies Post Only without consulting per-chat character-command toggles. - Add focused hot activation/deactivation for `turn-game` server runtimes while preserving restart behavior for route-bearing packages. - Refresh the installed package and agent registries after activation and hot-detach game runtimes before uninstall. - Document install-only manual launch behavior and add regressions for slash discovery plus runtime activation cleanup. ## Validation - [ ] `pnpm check` - [ ] Capability package lifecycle regression - [ ] Conversation game slash regression - [ ] Install a game in a running Engine and launch it immediately with its slash command - [ ] Confirm the slash command works with the chat's Commands toggle off - [ ] Uninstall the game and confirm its slash command and surface disappear without restart - [ ] Confirm Maps and Calls retain their existing restart-required path ### Automated evidence - `pnpm check` — passed. - `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/capability-package-lifecycle.regression.ts` — passed. - `pnpm --filter @marinara-engine/server exec tsx ../../scripts/regressions/conversation-game-slash.regression.ts` — passed. ### Manual proof gap A live install/uninstall browser smoke test remains before this draft is ready. The paired 1.0.2 package artifacts are being prepared separately. ## Risk This changes executable capability-package lifecycle behavior. Hot activation is intentionally restricted to packages whose manifest includes `turn-game`; route-bearing Maps and Calls packages are not dynamically registered into an already-ready Fastify instance. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Installed conversation games now appear immediately in slash-command autocomplete and can be launched without restarting. * Game commands and aliases are available only when the corresponding game is installed and ready. * Uninstalling a game removes its commands and runtime contributions immediately. * **Documentation** * Clarified installation, availability, and restart behavior for table games and optional agent packages. * **Bug Fixes** * Improved command matching and availability across conversation modes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:06:42 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6059
No description provided.