fix(v13): V13 审计 6 项修复 — TrajectoryRecorder注册 + industryStore接入 + 知识搜索 + webhook标注 + structured UI + persistent注释
FIX-01: TrajectoryRecorderMiddleware 注册到 create_middleware_chain() (@650优先级) FIX-02: industryStore 接入 ButlerPanel 行业专长展示 + 自动拉取 FIX-03: 桌面端知识库搜索 saas-knowledge mixin + VikingPanel SaaS KB UI FIX-04: webhook 迁移标注 deprecated + 添加 down migration 注释 FIX-05: Admin Knowledge 添加结构化数据 Tab (CRUD + 行浏览) FIX-06: PersistentMemoryStore 精化 dead_code 标注 (完整迁移留后续) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -62,6 +62,33 @@ export interface ListItemsResponse {
|
||||
page_size: number
|
||||
}
|
||||
|
||||
// === Structured Data Sources ===
|
||||
|
||||
export interface StructuredSource {
|
||||
id: string
|
||||
account_id: string
|
||||
name: string
|
||||
source_type: string
|
||||
row_count: number
|
||||
columns: string[]
|
||||
created_at: string
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface StructuredRow {
|
||||
id: string
|
||||
source_id: string
|
||||
row_data: Record<string, unknown>
|
||||
created_at: string
|
||||
}
|
||||
|
||||
export interface StructuredQueryResult {
|
||||
row_id: string
|
||||
source_name: string
|
||||
row_data: Record<string, unknown>
|
||||
score: number
|
||||
}
|
||||
|
||||
// === Service ===
|
||||
|
||||
export const knowledgeService = {
|
||||
@@ -159,4 +186,23 @@ export const knowledgeService = {
|
||||
// 导入
|
||||
importItems: (data: { category_id: string; files: Array<{ content: string; title?: string; keywords?: string[]; tags?: string[] }> }) =>
|
||||
request.post('/knowledge/items/import', data).then((r) => r.data),
|
||||
|
||||
// === Structured Data Sources ===
|
||||
listStructuredSources: (signal?: AbortSignal) =>
|
||||
request.get<StructuredSource[]>('/structured/sources', withSignal({}, signal))
|
||||
.then((r) => r.data),
|
||||
|
||||
getStructuredSource: (id: string, signal?: AbortSignal) =>
|
||||
request.get<StructuredSource>(`/structured/sources/${id}`, withSignal({}, signal))
|
||||
.then((r) => r.data),
|
||||
|
||||
deleteStructuredSource: (id: string) =>
|
||||
request.delete(`/structured/sources/${id}`).then((r) => r.data),
|
||||
|
||||
listStructuredRows: (sourceId: string, signal?: AbortSignal) =>
|
||||
request.get<StructuredRow[]>(`/structured/sources/${sourceId}/rows`, withSignal({}, signal))
|
||||
.then((r) => r.data),
|
||||
|
||||
queryStructured: (data: { source_id?: string; query?: string; limit?: number }) =>
|
||||
request.post<StructuredQueryResult[]>('/structured/query', data).then((r) => r.data),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user