feat: chat integration, tenant admin spec, backend chat service, miniprogram updates, DEMO moved to tmp, XCX-TEST removed, migrations & docs

This commit is contained in:
Neo
2026-03-20 09:02:10 +08:00
parent 3d2e5f8165
commit beb88d5bea
388 changed files with 6436 additions and 25458 deletions

View File

@@ -2,7 +2,7 @@
> 本文档记录项目中所有文档资产的位置、类型和内容概要,方便快速定位。
> 归档规则见末尾「文档归档规则」章节;程序输出路径规范见 `docs/deployment/EXPORT-PATHS.md`。
> 最后更新2026-03-19RNS1.3 三看板接口文档补充
> 最后更新2026-03-20RNS1.4 CHAT 模块重建 + FDW→直连统一 + R3 筛选修复 审计收口
---
@@ -55,7 +55,7 @@
| `README.md` | 审计目录说明 |
| `SESSION-LOG-GUIDE.md` | Session 日志使用指南:索引字段说明、查询方法、典型场景、与其他审计产物的关系 |
| `AUDIT-HOOKS-GUIDE.md` | 审计 Hooks 使用指南Hook 触发机制、配置方式、与审计流程的集成 |
| `changes/` | 56 份变更审计文档(`YYYY-MM-DD__<slug>.md` 格式),每份包含:变更原因、影响范围、回滚策略、验证 SQL |
| `changes/` | 67 份变更审计文档(`YYYY-MM-DD__<slug>.md` 格式),每份包含:变更原因、影响范围、回滚策略、验证 SQL |
| `prompt_logs/` | Prompt 日志(`prompt_log_YYYYMMDD_HHMMSS.md`),记录每次 AI 交互的输入输出 |
| `session_logs/` | 全量会话记录(按 `YYYY-MM/DD/` 分层),含双索引(`_session_index.json` / `_session_index_full.json`)、每轮 execution 的完整 Markdown 记录、LLM 生成的操作摘要 |
@@ -209,6 +209,14 @@ RNS1.3 新增模块(三看板接口):
| `app/schemas/xcx_board.py` | 看板相关 Pydantic Schema7 枚举 + ~40 响应 Schema |
| `app/schemas/xcx_config.py` | 配置相关 Pydantic SchemaSkillTypeItem |
RNS1.4 新增模块CHAT 对齐与联调收尾):
| 路径 | 内容 |
|------|------|
| `app/routers/xcx_chat.py` | CHAT 端点CHAT-1 对话历史、CHAT-2a/2b 消息查询、CHAT-3 发送消息、CHAT-4 SSE 流式(替代原 `xcx_ai_chat.py`,路径从 `/api/ai/*` 迁移到 `/api/xcx/chat/*` |
| `app/services/chat_service.py` | CHAT 业务逻辑对话管理、消息持久化、对话复用规则、referenceCard 组装、标题生成 |
| `app/schemas/xcx_chat.py` | CHAT 相关 Pydantic SchemaChatHistoryResponse、ChatMessagesResponse、ReferenceCard、SendMessageResponse、ChatStreamRequest 等) |
Monorepo 级属性测试(`tests/`
| 路径 | 内容 |
@@ -216,6 +224,12 @@ Monorepo 级属性测试(`tests/`
| `tests/test_rns12_properties.py` | RNS1.2 属性测试14 个 PropertyHypothesis 框架) |
| `tests/test_board_properties.py` | RNS1.3 属性测试18 个测试函数12 个 PropertyHypothesis 框架) |
| `tests/test_board_service_unit.py` | RNS1.3 看板工具函数单元测试 |
| `tests/test_rns1_chat_title_properties.py` | RNS1.4 属性测试标题生成优先级Property 4Hypothesis 框架) |
| `tests/test_rns1_chat_reuse_properties.py` | RNS1.4 属性测试对话复用规则Property 6 |
| `tests/test_rns1_chat_reference_card_properties.py` | RNS1.4 属性测试referenceCard round tripProperty 7 |
| `tests/test_rns1_chat_persistence_properties.py` | RNS1.4 属性测试消息持久化与会话元数据更新Property 8 |
| `tests/test_rns1_chat_sse_properties.py` | RNS1.4 属性测试SSE 事件类型有效性Property 9 |
| `tests/test_rns1_chat_ordering_properties.py` | RNS1.4 属性测试列表排序不变量Property 3 |
### 3.2 ETL Connector `apps/etl/connectors/feiqiu/`
@@ -382,6 +396,7 @@ Monorepo 级属性测试(`tests/`
| `rns1-task-performance-api` | RNS1.1 任务与绩效接口TASK-1 扩展、TASK-2、PERF-1、PERF-2、前端适配 |
| `rns1-customer-coach-api` | RNS1.2 客户与助教接口CUST-1 客户详情、CUST-2 客户服务记录、COACH-1 助教详情) |
| `rns1-board-apis` | RNS1.3 三看板接口BOARD-1 助教看板、BOARD-2 客户看板、BOARD-3 财务看板、CONFIG-1 技能类型) |
| `rns1-chat-integration` | RNS1.4 CHAT 对齐与联调收尾CHAT-1/2/3/4 路径迁移、对话复用、referenceCard、SSE 流式、FDW 验证、13 页面联调) |
| `spi-spending-power-index` | SPI 消费力指数 |
---