empty 5ae63d9df9 feat(engine): 实现行动点系统
- 扩展 AgentState 添加 action_points, max_action_points, last_action_tick 字段
- 新增 ActionFeedback 模型用于返回行动执行结果
- 创建 action_points.py 模块实现行动点消耗与恢复逻辑
- 行动消耗表: vote=1, trigger_skill=2, influence=2, comment/support/chaos=0
- 每 tick 恢复 1 点行动点(不超过 max)
- 行动点不足时拒绝执行并返回失败反馈
- 新增 7 个测试用例,全部 37 个测试通过

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-30 13:48:33 +08:00

验收标准(你跑通就算成功):

打开 http://localhost:3000 能看到页面 在输入框发一句话(例如:下雨了 / 支持Alice / 制造混乱) 页面实时更新: tick 递增 weather / town_mood 改变 actions 出现两名 NPC 的“行动 + 台词” Node 服务和 Python 服务都能一键启动(两个终端)

Description
AI小镇
Readme 177 KiB
Languages
Python 72%
HTML 23.9%
TypeScript 4.1%