qzl
443c0c80ae
fix: 修复后端代码违规并更新协议文档
...
- 修复 notifications 模块 datetime.now() 缺少时区问题
- 用 ApiProblemError 替换 BaseService 中的 HTTPException
- 更新协议文档:添加错误码、繁体字段、邀请相关协议
- 升级 Docker 镜像版本
2026-04-16 10:51:08 +08:00
qzl
9598d162dd
feat: 六爻算法修复 + prompt架构重构 + i18n输出规则
...
算法修复 (P0/P1):
- P0-1: 空亡判断改为仅从日柱计算(年月空亡标注但不断事)
- P0-2: 暗动判断重写为静爻+旺相+日冲三条件
- P1-1: 月破独立标注
- P1-2: 动不为空、旺不为空
- P1-3: 三合局判断
- P1-4: 反吟伏吟判断
- P1-5: 日辰十二长生
- P1-6: 回头生克判断
Prompt架构重构:
- 删除system_prompt中_build_env_section,不再泄露用户上下文到prompt
- 删除if is_chinese分支,_LANGUAGE_LABELS已覆盖全部语言映射
- 安全规则改为六爻专属约束,拒绝无关问题
- sign_level枚举值在所有语言版本中统一为简体中文(schema严格约束)
- _WORKER_ROLE_PLAYING始终为中文,不因ai_language切换
- _WORKER_OUTPUT_RULES按ai_language分zh-CN/zh-Hant/en三版本
- worker_rules.py独立文件管理多语言输出规则
- runner ai_language从user_context.settings.preferences提取传入prompt
清理死代码:
- 删除UserPreferences/RuntimePromptContext及辅助函数
- 删除runner中runtime_client_time参数链路
- 删除SystemAgentRuntimeConfig.extra_context
- 删除sections.py中env section marker
- 删除agent_prompt.py中AgentPromptRegistry死代码
安全规则:
- AGENTS.md添加Git Safety规则(禁止未经批准的破坏性git操作)
- opencode.json添加高危git命令审批配置
测试:
- 新增22个六爻算法单元测试(空亡/暗动/月破/三合局等)
- 重写7个prompt测试适配新签名
- 全部85个单元测试通过
2026-04-15 16:45:57 +08:00
qzl
1e22f27de2
feat: integrate invite API and improve notification handling
...
- Add invite code display and binding functionality via API
- Fix notification unread count sync on auth state change
- Improve notification mark read with server state validation
- Add auth state listener to trigger notification refresh
- Add YaoCoinConverter for coin-to-yao type conversion
- Remove YaoLegend from divination screens (UI cleanup)
- Abbreviate relation labels in yao detail view
- Add re-register notice to account delete screen
- Update 'coins' terminology to 'points' in localization
- Fix backend points consumption to only run in CHAT mode
- Add HttpxAuthNoiseFilter to suppress auth endpoint logging
- Fix notification static_schema import path
- Add test coverage for notification bloc error handling
- Update AGENTS.md page header rules and image handling
- Delete deprecated run-dev.sh script
2026-04-13 14:52:22 +08:00
qzl
921ffa1c50
docs: add application initialization contract to user-points protocol
2026-04-13 11:35:15 +08:00
qzl
c55be6d3fd
fix: preserve points balance across account re-registration
...
Persist a per-email balance snapshot before account deletion and restore it on same-email re-registration, preventing both unintended balance reset and repeated signup bonus grants.
2026-04-13 11:28:58 +08:00
qzl
4b258bb4d0
feat: 静态通知同步 + 积分审计 JSONB 序列化修复
2026-04-10 19:23:38 +08:00
qzl
3f3d613d99
feat: 实现站内通知系统
...
- 后端: 新增 notifications/user_notifications 表迁移及 ORM 模型
- 后端: 实现 schema/repository/service/router 全套通知 API
- GET /api/v1/notifications (列表+游标分页)
- GET /api/v1/notifications/unread-count
- PATCH /api/v1/notifications/{id}/read (幂等)
- PATCH /api/v1/notifications/mark-all-read (幂等)
- 后端: payload 使用 Pydantic discriminated union (none/open_route/open_url)
- 后端: 19 个单元测试全部通过
- Flutter: 通知 feature 完整实现 (models/apis/repositories/bloc/UI)
- Flutter: Home 页通知按钮接入真实页面,显示未读 badge
- Flutter: 14 个测试全部通过
- 协议文档: notification-inbox-protocol.md 及错误码注册
2026-04-10 18:50:08 +08:00
qzl
17ef460391
docs: 更新 HTTP 错误码、用户积分、占卜运行及用户资料协议文档
2026-04-10 16:45:45 +08:00
qzl
0ac8b81a66
feat: 添加 points_audit_ledger 及 JSON 字段 Pydantic Schema 约束
2026-04-10 12:28:18 +08:00
qzl
46513829cd
feat: 添加账号删除功能
2026-04-10 10:40:44 +08:00
qzl
e80a82bef4
docs: 更新协议文档,删除废弃计划文档
...
- 更新 http-error-codes, user-points-chat-data-protocol
- 更新 divination-run-protocol, profile-protocol
- 删除废弃的后端和前端设计计划文档
2026-04-08 17:23:02 +08:00
qzl
b18a205bf3
refactor(schema): 重构数据库模型和 schema,清理废弃表
2026-04-07 18:43:34 +08:00
ZL-Q
8a18b3528b
feat: 实现用户画像、占卜历史与后端用户管理模块
2026-04-06 01:28:10 +08:00
qzl
d87b2e1e3a
feat: 接入起卦后端流程并完善积分扣减链路
2026-04-03 19:04:46 +08:00
qzl
f245eec5f6
feat: 实现起卦、设置与积分系统
2026-04-03 16:56:47 +08:00
qzl
31594558eb
feat: 切换邮箱认证并重构前后端启动与门禁
2026-04-02 18:39:35 +08:00
qzl
92cdfd9fca
chore: 迁移到 social-app 架构,集成 Supabase 和 taskiq worker
2026-04-02 16:36:35 +08:00
qzl
695adb7d6f
feat: initial commit
2026-03-31 13:32:22 +08:00