M2-06 Artifact & KnowledgeItem 基础版 #26
Closed
opened 2026-05-22 21:09:50 +08:00 by wangdl
·
2 comments
Labels
Clear labels
area:activity
活动/统计
area:admin
管理后台
area:admin-api
area:ai
AI/RAG
area:ai-runtime
AI Runtime / AI 分析体系相关
area:analytics
area:api
API 接口
area:auth
认证与授权
area:cos
对象存储
area:database
数据库/Migration
area:import
文件导入/解析
area:knowledge
知识库/知识点
area:learning-info
area:learning-session
area:quiz
测验/自测
area:reading-event
area:reading-progress
area:review
复习系统
area:security
安全相关
audit:api-admin-info
audit:api-info
audit:planned
已完成宏观规划,尚未代码审查
audit:reviewed
blocked-by:api-info-aggregation
blocked-by:api-info-core
blocked-by:api-info-ops
blocked-by:api-info-schema
blocked-by:processor
blocked-by:schema
priority:p0
最高优先级,阻塞发布
priority:p1
高优先级,里程碑必需
priority:p2
中优先级,后续版本
repo:api
API 仓库 Issue
status:blocked
被阻塞
status:done
已完成
status:partial
status:todo
type:aggregation
type:bug
缺陷修复
type:design
设计
type:docs
文档
type:feature
新功能
type:migration
type:refactor
重构
type:test
work:admin-api
work:aggregation
work:api
work:artifact
题目/卡片产物
work:audit
work:circuit-breaker
熔断
work:contract
work:design
架构/协议设计工作
work:docs
work:export
work:extend-existing
work:internal-api
Runtime 内部接口
work:job
Job 调度相关
work:new-module
work:new-table
work:ops
work:query
work:quota
额度/限流
work:schema
Prisma Schema 设计
work:security
work:service
Service 层实现
work:snapshot
Snapshot 构建
work:test
No Label
Milestone
No items
No Milestone
M2:知识库主链路闭环(P1)
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: wangdl/api-server#26
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
目标
设计知习学习工件与知识点模块,负责从解析后的资料中生成候选知识点(ImportCandidate),用户确认后转为正式知识点(KnowledgeItem),并预留 learnable 标识供 M3 LearningSession 引用。
本 Issue 只做模块架构设计,不直接实现代码。
背景说明
资料进入知习后不是直接变成学习内容,而是先由 AI 从 Material 的 chunks 中抽取候选知识点(ImportCandidate),用户在界面上审阅、编辑、确认或拒绝。确认后的知识点成为 KnowledgeItem,作为后续学习(LearningSession)和复习(ReviewCard)的基础。
本阶段只做 Candidate + Item + Citation,不做全量的 Quiz/StudyGuide/PracticeTest 生成(留到 M3)。
模块职责
本模块负责:
本模块不负责:
候选数据对象
预留扩展(M3 阶段使用)
基础设施依赖判断
API 设计
CAPI:
AAPI:
Domain Event 设计
交付检查
验收标准
禁止事项
不建议当前阶段实现
✅ M2-06 实施完成
关键发现
KnowledgeItem和ImportCandidate模型已有完整的字段设计(title/content/summary/sourceRef/confidence/difficulty/status)。本 Issue 补充了预留扩展能力。交付内容
Artifact模型KnowledgeItem.learnableGET /admin-api/knowledge-bases/candidates候选列表、GET .../items知识点列表运行
🔧 审计修复 — 2026-05-24
问题: Candidate 生成/确认时未接入 Content Safety 审核。
修复:
ImportCandidateService.accept()和createCandidates()新增ContentSafetyService.check()调用。审核不通过时拒绝确认(返回BLOCKED),创建时过滤不安全候选。Commit:
3c242a8