You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
本 PR 新增并完善了狼人杀 demo,补齐启动脚本、裁判/玩家 SOUL、后端服务和前端 UI,并支持真人玩家参与。真人模式下,真人可以通过独立面板与 god 私聊或公开发言,且不会泄露其他玩家身份;同时回放能力已整合进主页面。
This PR adds and refines the Werewolf demo, including the startup script, god/player SOUL prompts, backend service, and frontend UI, while also introducing human-player support. In human mode, a real player can interact with god
through a dedicated panel for private or public messages without leaking other players’ identities, and replay is now integrated into the main UI.
Key Changes / 核心改动
新增狼人杀 demo 启动脚本 start_werewolf_demo.py
新增 SOUL-god.md 与 SOUL-player.md,完善裁判与玩家规则
扩展 werewolf_server.py:
支持 human player 模式
支持真人私聊 / 全员广播
修复 loop 提前停止问题
修复结束状态过早显示问题
持久化 game_mode,支持重启恢复
真人模式不计入 leaderboard
重构 werewolfUI.html:
新增真人模式入口和真人交互面板
真人模式下隐藏其他玩家身份与私有信息
优化主界面布局与交互
将 replay 整合到主页面
删除独立 replay.html 页面及 /replay 路由
Added the Werewolf demo bootstrap script start_werewolf_demo.py
Added SOUL-god.md and SOUL-player.md to define host/player rules
Extended werewolf_server.py to:
support human-player mode
support private human messages and public broadcast
fix premature loop termination
fix premature game-end display
persist game_mode across restarts
exclude human games from leaderboard scoring
Reworked werewolfUI.html to:
add human-mode entry and interaction panel
hide other players’ identities/private info in human mode
improve main layout and interactions
integrate replay into the main page
Removed standalone replay.html and the /replay route
Related Issue
Type of Change
Bug fix (non-breaking change that fixes an issue)
New feature (non-breaking change that adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
Documentation update
Refactoring (no functional changes)
Performance improvement
Test update
Changes Made
Testing
I have added tests that prove my fix is effective or that my feature works
New and existing unit tests pass locally with my changes
I have tested this on the following platforms:
Linux
macOS
Windows
Checklist
My code follows the project's coding style
I have performed a self-review of my code
I have commented my code, particularly in hard-to-understand areas
I have made corresponding changes to the documentation
My changes generate no new warnings
Any dependent changes have been merged and published
The signature of build_system_prompt and _build_user_memory changed, removing/renaming parameters. If external code calls these methods directly (unclear if public), this would break. Keep old signatures as deprecated aliases if these are part of the public agent API.
get_viking_user_profiles creates a new VikingClient but does not explicitly close it. This could lead to resource leaks if called frequently. Add a context manager or explicit close for the client.
Ensure proper resource cleanup for the VikingClient instance by using an async context manager (if supported) or explicitly closing it after use. This avoids potential resource leaks.
Why: Adds proper resource cleanup for the VikingClient instance to avoid potential resource leaks, which is a moderate improvement for code reliability.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Summary / 概要
本 PR 新增并完善了狼人杀 demo,补齐启动脚本、裁判/玩家 SOUL、后端服务和前端 UI,并支持真人玩家参与。真人模式下,真人可以通过独立面板与 god 私聊或公开发言,且不会泄露其他玩家身份;同时回放能力已整合进主页面。
This PR adds and refines the Werewolf demo, including the startup script, god/player SOUL prompts, backend service, and frontend UI, while also introducing human-player support. In human mode, a real player can interact with god
through a dedicated panel for private or public messages without leaking other players’ identities, and replay is now integrated into the main UI.
Key Changes / 核心改动
新增狼人杀 demo 启动脚本 start_werewolf_demo.py
新增 SOUL-god.md 与 SOUL-player.md,完善裁判与玩家规则
扩展 werewolf_server.py:
重构 werewolfUI.html:
删除独立 replay.html 页面及 /replay 路由
Added the Werewolf demo bootstrap script start_werewolf_demo.py
Added SOUL-god.md and SOUL-player.md to define host/player rules
Extended werewolf_server.py to:
Reworked werewolfUI.html to:
Removed standalone replay.html and the /replay route
Related Issue
Type of Change
Changes Made
Testing
Checklist
Screenshots (if applicable)
Additional Notes