Features: - Migrate 10 agent prompts from hardcoded to database - Add grayscale preview support (DRAFT/ACTIVE distribution) - Implement 3-tier fallback (DB -> Cache -> Hardcoded) - Add version management and rollback capability Files changed: - backend/scripts/migrate-aia-prompts.ts (new migration script) - backend/src/common/prompt/prompt.fallbacks.ts (add AIA fallbacks) - backend/src/modules/aia/services/agentService.ts (integrate PromptService) - backend/src/modules/aia/services/conversationService.ts (pass userId) - backend/src/modules/aia/types/index.ts (fix AgentStage type) Documentation: - docs/03-业务模块/AIA-AI智能问答/06-开发记录/2026-01-18-Prompt管理系统集成.md - docs/02-通用能力层/00-通用能力层清单.md (add FileCard, Prompt management) - docs/00-系统总体设计/00-系统当前状态与开发指南.md (update to v3.6) Prompt codes: - AIA_SCIENTIFIC_QUESTION, AIA_PICO_ANALYSIS, AIA_TOPIC_EVALUATION - AIA_OUTCOME_DESIGN, AIA_CRF_DESIGN, AIA_SAMPLE_SIZE - AIA_PROTOCOL_WRITING, AIA_METHODOLOGY_REVIEW - AIA_PAPER_POLISH, AIA_PAPER_TRANSLATE Tested: Migration script executed, all 10 prompts inserted successfully
141 lines
3.1 KiB
HTTP
141 lines
3.1 KiB
HTTP
### RVW稿件审查模块 - API测试
|
||
### Phase 1 验证用例
|
||
|
||
@baseUrl = http://localhost:3001
|
||
@taskId = {{$uuid}}
|
||
|
||
### ========================================
|
||
### 1. 创建任务(上传稿件)
|
||
### POST /api/v1/rvw/tasks
|
||
### ========================================
|
||
|
||
# 注意:需要使用工具(如Postman)上传文<EFBFBD>?
|
||
# curl -X POST http://localhost:3001/api/v1/rvw/tasks \
|
||
# -F "file=@test.docx" \
|
||
# -F "modelType=deepseek-v3"
|
||
|
||
|
||
### ========================================
|
||
### 2. 获取任务列表
|
||
### GET /api/v1/rvw/tasks
|
||
### ========================================
|
||
|
||
### 获取全部任务
|
||
GET {{baseUrl}}/api/v1/rvw/tasks
|
||
Content-Type: application/json
|
||
|
||
### 获取待处理任<EFBFBD>?
|
||
GET {{baseUrl}}/api/v1/rvw/tasks?status=pending
|
||
Content-Type: application/json
|
||
|
||
### 获取已完成任<EFBFBD>?
|
||
GET {{baseUrl}}/api/v1/rvw/tasks?status=completed
|
||
Content-Type: application/json
|
||
|
||
### 分页获取
|
||
GET {{baseUrl}}/api/v1/rvw/tasks?page=1&limit=10
|
||
Content-Type: application/json
|
||
|
||
|
||
### ========================================
|
||
### 3. 运行审查(选择智能体)
|
||
### POST /api/v1/rvw/tasks/:taskId/run
|
||
### ========================================
|
||
|
||
### 只选择规范性智能体
|
||
POST {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/run
|
||
Content-Type: application/json
|
||
|
||
{
|
||
"agents": ["editorial"]
|
||
}
|
||
|
||
### 只选择方法学智能体
|
||
POST {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/run
|
||
Content-Type: application/json
|
||
|
||
{
|
||
"agents": ["methodology"]
|
||
}
|
||
|
||
### 同时选择两个智能体(默认<EFBFBD>?
|
||
POST {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/run
|
||
Content-Type: application/json
|
||
|
||
{
|
||
"agents": ["editorial", "methodology"]
|
||
}
|
||
|
||
|
||
### ========================================
|
||
### 4. 批量运行审查
|
||
### POST /api/v1/rvw/tasks/batch/run
|
||
### ========================================
|
||
|
||
POST {{baseUrl}}/api/v1/rvw/tasks/batch/run
|
||
Content-Type: application/json
|
||
|
||
{
|
||
"taskIds": ["task-id-1", "task-id-2", "task-id-3"],
|
||
"agents": ["editorial", "methodology"]
|
||
}
|
||
|
||
|
||
### ========================================
|
||
### 5. 获取任务详情
|
||
### GET /api/v1/rvw/tasks/:taskId
|
||
### ========================================
|
||
|
||
GET {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}
|
||
Content-Type: application/json
|
||
|
||
|
||
### ========================================
|
||
### 6. 获取审查报告
|
||
### GET /api/v1/rvw/tasks/:taskId/report
|
||
### ========================================
|
||
|
||
GET {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}/report
|
||
Content-Type: application/json
|
||
|
||
|
||
### ========================================
|
||
### 7. 删除任务
|
||
### DELETE /api/v1/rvw/tasks/:taskId
|
||
### ========================================
|
||
|
||
DELETE {{baseUrl}}/api/v1/rvw/tasks/{{taskId}}
|
||
Content-Type: application/json
|
||
|
||
|
||
### ========================================
|
||
### 旧版API(兼容性测试)
|
||
### ========================================
|
||
|
||
### 旧版:获取任务列<EFBFBD>?
|
||
GET {{baseUrl}}/api/v1/review/tasks
|
||
Content-Type: application/json
|
||
|
||
### 旧版:获取任务状<EFBFBD>?
|
||
GET {{baseUrl}}/api/v1/review/tasks/{{taskId}}
|
||
Content-Type: application/json
|
||
|
||
### 旧版:获取报<EFBFBD>?
|
||
GET {{baseUrl}}/api/v1/review/tasks/{{taskId}}/report
|
||
Content-Type: application/json
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|