fix: delete agent 500 error + dynamic personality + deployment guide
- Fix delete agent 500: clean up FK records (agent_llm_logs, permissions, schedules, executions, team_members) and unbind goals/tasks before delete - Remove hardcoded personality templates in Android, replace with dynamic system prompt generation from name + description - Set promptSectionsEnabled=false to bypass PromptComposer for personality - Add Tencent Cloud Linux deployment guide (Docker Compose) - Accumulated backend service updates, frontend UI fixes, Android app changes Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -710,11 +710,24 @@ dependencies {
|
||||
|
||||
## 十、后端需配合改造
|
||||
|
||||
| 改动 | 说明 | 优先级 |
|
||||
|------|------|--------|
|
||||
| 新增 `/api/v1/voice/asr` | 接收音频文件,返回文本(已有 speech_to_text 工具,封装为 API) | P0 |
|
||||
| 新增 `/api/v1/voice/tts` | 接收文本,返回音频 URL(已有 text_to_speech 工具,封装为 API) | P0 |
|
||||
| 新增 `/api/v1/push/register` | 接收 FCM Token,绑定用户 | P1 |
|
||||
| 新增 `push_tokens` 表 | 存储设备推送 Token | P1 |
|
||||
| FCM Server SDK | 后端集成 `firebase-admin`,从 notify_user 触发推送 | P1 |
|
||||
| Token 过期延长 | 30分钟 → 7天(移动端场景),或增加 refresh_token 机制 | P1 |
|
||||
| 改动 | 说明 | 优先级 | 状态 |
|
||||
|------|------|--------|:----:|
|
||||
| 新增 `/api/v1/voice/asr` | 接收音频文件,返回文本(已有 speech_to_text 工具,封装为 API) | P0 | ✅ 已完成 |
|
||||
| 新增 `/api/v1/voice/tts` | 接收文本,返回音频 URL(已有 text_to_speech 工具,封装为 API) | P0 | ✅ 已完成 |
|
||||
| 新增 `/api/v1/fcm/register` | 接收 FCM Token,绑定用户 | P1 | ✅ 已完成 |
|
||||
| 新增 `/api/v1/fcm/unregister` | 注销 FCM Token | P1 | ✅ 已完成 |
|
||||
| 新增 `fcm_tokens` 表 | 存储设备推送 Token | P1 | ✅ 已完成 |
|
||||
| FCM Server SDK | 后端集成 `firebase-admin`,从 notify_user 触发推送 | P1 | 待实施 |
|
||||
| Token 过期延长 | 30分钟 → 7天(移动端场景,`client_type=android` 参数) | P1 | ✅ 已完成 |
|
||||
|
||||
### 后端新增文件
|
||||
|
||||
| 文件 | 说明 |
|
||||
|------|------|
|
||||
| `app/api/voice.py` | 语音 API:POST /voice/asr (音频→文字) + POST /voice/tts (文字→MP3 URL) + GET /voice/audio/{filename} |
|
||||
| `app/api/fcm.py` | FCM API:POST /fcm/register + DELETE /fcm/unregister |
|
||||
| `app/models/fcm_token.py` | FcmToken 模型(fcm_tokens 表) |
|
||||
| `app/core/config.py` | 新增 `JWT_MOBILE_TOKEN_EXPIRE_MINUTES = 10080`(7天) |
|
||||
| `app/api/auth.py` | login 端点增加 `client_type` 参数,android/ios 签发 7 天 token |
|
||||
| `app/main.py` | 注册 voice、fcm 路由 |
|
||||
| `app/core/database.py` | init_db() 注册 fcm_token 模型 |
|
||||
|
||||
Reference in New Issue
Block a user