54 Commits

Author SHA1 Message Date
wangdl
fe44dec567 feat: M-CHAT ChatScope 会话系统完整实现
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 46s
## 数据模型
- ChatSession +13 字段 (scopeType/scopeId/parentKnowledgeBaseId/createdFrom/isPinned/isArchived/isDeleted/modelMode/modelId/lastMessageAt)
- ChatMessage +scopeSnapshot (消息级 scope 快照)
- ChatCitation +lineStart/lineEnd +sourceId 索引
- 5 个新查询索引

## 核心能力
- open-or-create: 同 scope 继续会话 (200) / 新建 (201)
- scope 级检索: global/knowledge_base/material/knowledge_item/folder
- listSessions: scope 过滤 + isDeleted 排除 + isPinned 排序 + 分页元数据
- 自动标题: 首条消息截取 + 词边界处理
- 软删除 + 置顶/归档
- scope 字段创建后不可修改
- 全部端点 userId 鉴权

## 文档
- docs/chat-scope-design.md (设计文档 + 决策表)
- docs/chat-scope-api-contract.md (API 契约)
- docs/chat-scope-test-plan.md (33 条测试用例)
- prisma/migrations/backfill_chat_scope.sql (旧数据回填)

## Bug 修复
- #104: KnowledgeItem.sourceRef 填充 (material scope 检索修复)
- #102: sendMessageStream aiGateway null 保护
- listSessions isDeleted/isArchived 过滤 + 分页

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 17:27:40 +08:00
wangdl
17f16cea67 feat: #70 ChatSession 新增 knowledgeItemIds 字段,限定 AI 检索范围
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 46s
- Prisma schema: ChatSession 加 knowledgeItemIds Json? 字段
- createSession: 接受可选 knowledgeItemIds 参数
- loadContext: 支持 itemIds 过滤,传入时只检索指定知识点
- sendMessage/sendMessageStream: 读取 session.knowledgeItemIds 传入 loadContext

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-06 16:02:38 +08:00
wangdl
9c14bda0c2 feat: Phase 1 & 2 — KnowledgeItem/KB model补齐 + API增强
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 43s
#61 KnowledgeItem sourceType 自动检测(COS URL/HTML/Markdown/扩展名)
#59 KnowledgeItem 新增 durationSeconds 字段
#66 KnowledgeItem 新增 fileSize 字段,enrichItem 同步填充 COS 文件大小
#53 KnowledgeBase GET /knowledge-bases 支持 visibility/ownerType 查询筛选
#63 GET /knowledge-items 新增 sortBy/order 排序参数
#65 PATCH /knowledge-items/:id 支持 parentId 校验
#64 POST /knowledge-bases/:id/folders 同步创建 KnowledgeItem(itemType:folder)
#62 GET /learning-sessions 新增 status/sort 筛选参数
#69 KnowledgeItem detail 动态刷新 COS 预签名 URL(7天有效)
#60 GET /quizzes 跨知识库列表已实现,关 issue

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-05 20:01:43 +08:00
wangdl
b90387dd51 fix: User 补充 Quiz 反向关联
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 20s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:04:43 +08:00
wangdl
a1a4b26444 fix: User + KnowledgeBase 补充 Quiz 反向关联
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:04:14 +08:00
wangdl
6033fbc997 feat: H0-12 Quiz 模型与 API
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
Prisma 新增:
- Quiz(测验)
- QuizQuestion(题目,支持 choice/fill/judge 三种题型)
- QuizAttempt(答题记录)
- QuizAnswer(作答详情)

API:
- POST /quizzes(生成测验,自动从KB知识点抽题)
- GET /quizzes(列表)
- GET /quizzes/:id(含题目)
- POST /quizzes/:id/start(开始答题)
- POST /quizzes/:id/submit(提交答案+评分)
- GET /quizzes/:id/results?attemptId=(结果详情)
- GET /quizzes/history/list(历史记录)

题目生成策略:
- 选择题:题干=知识点标题,选项=内容片段+其他知识点干扰项
- 填空题:随机关键词挖空
- 判断题:随机生成对/错陈述

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 20:03:40 +08:00
wangdl
d208fd7876 fix: User 模型补充 KnowledgeBaseSubscription 反向关联
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 44s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 19:25:53 +08:00
wangdl
b9f8334245 feat: H0-08 KnowledgeBase 增加业务字段 + 订阅 + 发现 + 置顶 + 公开
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
Schema 新增:
- coverType/coverIcon/coverColor(封面类型/系统图标/颜色)
- visibility(private/public)
- isPinned(置顶)
- ownerType(user/official)
- isVerified(认证标识)
- KnowledgeBaseSubscription 表

API 新增:
- POST /knowledge-bases/:id/pin(切换置顶)
- PATCH /knowledge-bases/:id/visibility(切换公开/私有)
- POST /knowledge-bases/:id/subscribe(订阅)
- DELETE /knowledge-bases/:id/subscribe(取消订阅)
- GET /knowledge-bases/subscribed(已订阅列表)
- GET /knowledge-bases/discover(发现公开库)

增强:
- findAll 支持 visibility/ownerType 筛选 + 置顶优先排序
- findOne 公开库允许任何人查看
- update 支持所有新字段

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-29 19:24:21 +08:00
7a7561363d perf: add missing createdAt indexes to 7 models for admin query performance
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 43s
- Affected: Notification, AiUsageLog, LearningSession, AiAnalysisResult,
  DocumentImport, ReviewLog, ChatSession, ChatMessage
- All admin list queries use ORDER BY createdAt DESC — without indexes
  these required full table scans on large tables

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 20:01:36 +08:00
8a6b103571 fix: add createdAt index to ReviewCard model to fix slow admin page load
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
The admin review list query uses ORDER BY createdAt DESC but there was no
index on createdAt, causing full table scan + filesort on large tables.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 19:55:01 +08:00
c6d01534c8 feat: M4-11 — vendor billing + secret lifecycle management
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 42s
- Add VendorBill Prisma model (provider/billMonth/amount/usageSummary)
- VendorBillController: CRUD bills, list/rotate/revoke secrets
- Secret lifecycle: active → expiring → expired/rotated/revoked

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:25:58 +08:00
b3176b8ead feat: M4-10 — admin notification deepening (cost alerts, import failures, key expirations)
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 41s
- Add scope field to Notification model (user/admin)
- AdminNotificationsController: list, send, mark read
- Generate endpoints: cost-alert, import-failure, key-expiring

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:23:35 +08:00
c4089129c0 feat: M4-09 — compliance & safety module (policies, agreements, filings, data requests)
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 42s
- Add PrivacyPolicy, UserAgreement, FilingRecord, DataExportRequest Prisma models
- ComplianceController: privacy policies, user agreements, filings, deletion/export requests
- AAPI: /admin-api/compliance/* (6 resource groups)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:19:32 +08:00
cefc4d51c9 feat: M4-08 — release & decision module (changelogs, ADR, checklist)
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 42s
- Add DecisionRecord and ReleaseChecklist Prisma models
- ReleaseController: CRUD for changelogs, decisions, checklists
- AAPI: /admin-api/release/changelogs, /decisions, /checklists

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:14:53 +08:00
5d84769ac0 feat: M4-07 — Hermes Agent task/artifact management with approval workflow
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 40s
- Add AgentTask and AgentArtifact Prisma models
- HermesAgentController: list tasks, approve/reject, list artifacts
- AAPI: GET /admin-api/hermes/tasks, POST approve/reject, GET /admin-api/hermes/artifacts

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:10:37 +08:00
b188988e82 feat: M4-05 — reporting & export module (user/learning/review CSV)
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 42s
- Add ExportJob Prisma model
- ReportingService: userReport, learningReport, reviewReport
- ReportingController: GET export/users, export/learning, export/reviews

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 18:01:23 +08:00
76c42f437c feat: M4-04 — backup & cleanup module with admin interface
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 42s
- Add CleanupJob Prisma model
- Create BackupService with backup/cleanup job tracking
- Create BackupController (AAPI: GET jobs, POST trigger backup, GET cleanup, POST cleanup)
- Supports cleanup types: soft-delete, api-metrics, task-logs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 17:56:26 +08:00
fc978a5e7f feat: M4-03 — server health checks (Docker/MySQL/Redis/Qdrant/Gitea/Nginx/Worker)
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
- Add ServiceHealth Prisma model for health check records
- Add getHealthChecks() with local + remote service checks
- Add GET /admin-api/servers/health endpoint

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 17:51:20 +08:00
2bfa9ad7c3 fix: M3 audit — scheduleState persistence, AI→ReviewCard subscriber, ActiveRecall queue, streak bug, domain events
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 41s
- M3-02: Add scheduleState to ReviewCard model + persist in updateCard/insertCard
- M3-02: Add ReviewCardSubscriber (OnEvent 'ai.analysis.completed' → generateCards)
- M3-02: Add AdminReviewController (GET /admin-api/reviews)
- M3-01: ActiveRecall now enqueues via AiAnalysisService instead of direct workflow call
- M3-01: FocusItem model adds source field, worker uses status:'open'
- M3-03: Fix streak calculation (break on gap), add StreakUpdatedEvent/DailyGoalAchievedEvent
- M3-03: Add LearningGoal/StreakRecord/LearningStats to Prisma schema
- M3-03: Fix FocusItem recommendation query (status:'pending' → 'open')

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 16:17:34 +08:00
8e5d722a1e feat: M3-04/05/06 — Workspace Experience, Notification, Cache Module
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 44s
M3-04: RecentItem/Favorite/SearchHistory models, Tag CRUD, global search, workspace dashboard
M3-05: NotificationPreference/PushToken/Template models, preferences, push tokens, admin templates
M3-06: CacheService with wrap() penetration protection, key naming conventions, admin cache management
E2E: 27 new tests for M3-04/05/06 (35/36 passing overall)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 16:01:34 +08:00
98bc9961ba feat: M2-07 — RAG Chat module with sessions, messages, citations
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 33s
- ChatSession/ChatMessage/ChatCitation Prisma models
- CAPI: create/list sessions, send message, get history, delete
- Admin AAPI: view user sessions and messages
- Content safety integration on user input
- Placeholder RAG pipeline (real pipeline in M3)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 13:39:14 +08:00
06351c7381 feat: M2-06 — Artifact model + KnowledgeItem.learnable + Admin AAPI
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
- Artifact base model for future FlashcardSet/Quiz/StudyGuide
- KnowledgeItem.learnable boolean (default true) for M3 LearningSession
- Admin AAPI: GET candidates (by status/kbId), GET items (by kbId)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 13:34:24 +08:00
9520d1f549 feat: M2-04 — Ingestion & Indexing, ImportStepLog + Admin monitor AAPI
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 42s
- ImportStepLog model for tracking each import pipeline step
- Admin AAPI: import list, detail with step logs, retry failed
- Admin page: ImportMonitor with drawer detail view

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 13:12:16 +08:00
3602fb6cdb fix: add missing opposite relation fields for Prisma validation
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 33s
- KnowledgeBase.folders ← KnowledgeFolder.knowledgeBase
- KnowledgeSource.references ← SourceReference.source
- KnowledgeChunk.references ← SourceReference.chunk

Fixes P1012 Prisma schema validation errors in CI build.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 11:40:36 +08:00
b3bce7ff78 feat: M2-03 — Material & Source, SourceReference citation tracking
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
- SourceReference model for artifact→chunk→source citation chain
- Admin source list + reference tracing endpoints
- Existing KnowledgeSource already covers Material status/version

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 11:31:46 +08:00
052cd5cba8 feat: M2-02 — Workspace + KnowledgeBase + Folder management
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 11s
- Workspace + KnowledgeFolder Prisma models
- Folder CRUD: create/list/update/delete (soft-delete with children)
- Content Safety integration for KB title on create/update
- E2E: KB create, folder CRUD, admin KB list

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 11:23:58 +08:00
292e7e5638 feat: M2-01 — User & Account deepening, membership + deletion + devices
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 33s
- UserDevice + AccountDeletionRequest Prisma models
- CAPI: membership query, deletion request/cancel, device list/remove
- AAPI: membership assign, deletion approve/reject, device view

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 11:18:56 +08:00
a08fd4970a feat: M1-04 — Content Safety deepening, reports CAPI, violation records
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
- Add ViolationRecord table (Prisma + migration)
- CAPI POST /api/reports for user report submission
- AAPI reports list + handle, violations list + penalty apply
- Admin page: reports management + violation records tabs

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:53:19 +08:00
a5a592988a fix: idempotent migration SQL + cleanup failed M1 tables in CI
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 33s
- Use CREATE TABLE IF NOT EXISTS + INSERT IGNORE for M1 tables
- Add ModelRoute/ProviderConfig/FallbackEvent to CI cleanup step
- Fixes P3018 migration error from partially-applied first run

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:44:06 +08:00
5fd737967f feat: M1-01~03 — AI Gateway deepening, Vector module, Task Queue deepening
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 23s
M1-01 AI Gateway:
- DB-driven ModelRoute/ProviderConfig/FallbackEvent tables
- ModelRouter rewrite with loadFromDb() hot-reload
- Fallback event recording + AIUsageRecorded event publishing
- Admin AAPI: routes CRUD, provider enable/disable, fallback events log

M1-02 Vector & Retrieval:
- VectorService with Qdrant client (upsert/delete/search/rerank)
- Admin AAPI: collection status, vector count, reindex trigger

M1-03 Task Queue:
- 16 task types with default retry/timeout configs
- Task stats dashboard, worker status panel, batch retry endpoint

M0 audit fixes:
- ApiMetric retention policy (30-day cleanup)
- Content Safety integration in Files module
- Queue registration centralized (domain-events)
- SECRET_MASTER_KEY production validation

E2E tests:
- M0: 28 smoke tests covering all 14 M0 issues
- M1: 16 tests covering M1-01/02/03
- Mock infrastructure: prisma, ioredis, jose, bullmq, qdrant

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-24 10:18:07 +08:00
d32411760f feat: M0-12 Secret & Vendor Asset — AES-256-GCM encrypted key storage + Admin AAPI
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s
2026-05-23 20:36:39 +08:00
628bb31c98 fix: clean migrations — single working file for UserMembership+QuotaUsage+CostDailySummary
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
2026-05-23 20:30:02 +08:00
fd1897d385 feat: M0-11 — QuotaService + Redis deduction + Admin AAPI + CostDailySummary + UserMembership
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 21s
2026-05-23 20:13:49 +08:00
99d03bb26c feat: M0-10 — TaskLog table + task events + retry audit
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 32s
2026-05-23 19:29:08 +08:00
2bd416c807 feat: M0-07 Observability — MetricsInterceptor + admin metrics AAPI
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 36s
2026-05-22 23:19:31 +08:00
9e8f3dccd7 feat: M0-06 Content Safety — sensitive word check + admin AAPI
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
2026-05-22 23:12:39 +08:00
b5a983dc6b feat: M0-04 Audit — async BullMQ writes + riskLevel + reason + SecurityEvent
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
2026-05-22 23:03:32 +08:00
a1ac07bf88 feat: M0-03 feature flag whitelist + more config integration
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 37s
2026-05-22 23:00:47 +08:00
8d5ff27a3c fix: MySQL compatible migration — replace double quotes with backticks
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 38s
2026-05-22 22:50:33 +08:00
8d52214dd5 feat: M0-03 Config & Feature Flag — DB-backed config + Redis cache + Admin AAPI
Some checks failed
Deploy API Server / build-and-deploy (push) Has been cancelled
2026-05-22 22:36:32 +08:00
997b3c0cdb feat: admin cost management — CRUD + monthly summary + expiry
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 39s
2026-05-22 15:40:24 +08:00
f2d3f3f13f feat: add AdminMessage persistence + conversation title auto-set + messages API
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 21s
2026-05-22 11:03:24 +08:00
f20bdc0d7a feat: add conversation management — sessionId + X-Hermes-Session-Id + CRUD
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 37s
2026-05-22 10:43:18 +08:00
b8a1fb0921 feat: add admin backend modules — dashboard, audit-log, admin-users
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 10s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 17:22:48 +08:00
5a7c21dd60 feat: implement complete admin authentication system
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 9s
- Add AdminRole enum (SUPER_ADMIN/ADMIN/OPERATIONS/DEVELOPER/READONLY) with hierarchy
- Add PasswordService (bcryptjs, 12 rounds), AdminTokenService (type=admin JWT)
- Add AdminAuthService: login/lockout/refresh/logout with audit logging
- Add AdminAuthController: /admin-api/auth/{login,refresh,logout,me}
- Add AdminAuthGuard: validates type=admin, user status, session, lockout
- Add AdminRolesGuard + @AdminRoles() decorator for RBAC
- Add AdminAuditService for audit log persistence
- Add AdminLoginRateLimit (10 req/15min per IP)
- Add prisma/seed.ts for SUPER_ADMIN initialization via env vars
- Update JwtAuthGuard to skip /admin-api/* and /internal/* paths
- Update main.ts to exclude admin-api/internal from global 'api' prefix
- Update jwt.config.ts with admin JWT secrets and expiry config

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 15:05:31 +08:00
e5c6113b25 feat: add admin_users, admin_sessions, admin_audit_logs tables
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 13s
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-21 14:39:38 +08:00
WangDL
1e7e4268ab feat: 知识库新表 migration SQL
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 57s
2026-05-19 22:14:55 +08:00
WangDL
df56a76079 feat: 知识库新模型 — KnowledgeSource/KnowledgeChunk/ImportCandidate/BackupJob/MembershipPlan
All checks were successful
Deploy API Server / build-and-deploy (push) Successful in 1m16s
2026-05-19 22:09:44 +08:00
33f1cc1859 feat: P2 infrastructure — Docker Compose, shutdown hooks, Prisma migration
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 1m1s
- B20: docker-compose.yml with MySQL 8.0, Redis 7, API, BullMQ Worker, Nginx
- B20: Dockerfile.worker + worker.module.ts + worker.main.ts for standalone worker
- B20: nginx/nginx.conf reverse proxy with gzip, /api/* routes, health check
- B21: app.enableShutdownHooks() in main.ts for graceful SIGTERM handling
- B22: migration adding objectKey/bucket to UploadedFile, AiUsageLog, WaitlistEntry

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-18 10:50:59 +08:00
6d7cbffc3b feat: COS 对象存储接入 — CosStorageProvider + FilesModule
Some checks failed
Deploy API Server / build-and-deploy (push) Failing after 3m0s
- 安装 cos-nodejs-sdk-v5,封装 CosStorageProvider(upload/download/delete/healthCheck)
- 重写 StorageService,新增 createUploadUrl/verifyUpload/getDownloadUrl/deleteObject
- 创建 FilesModule:POST /files/upload-url, POST /files/complete, GET /files/:id, DELETE /files/:id
- UploadedFile 新增 objectKey/bucket 字段
- 对象键格式 {userId}/{YYYYMM}/{sanitizedName}.{ext}
- 接入文件类型校验(ALLOWED_FILE_TYPES)+ 上传限流(10次/小时/用户)
- 配置文件 cos.longde.cloud → zhixi-1259685406 / ap-guangzhou

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-17 22:30:14 +08:00