export type PipelineStatus = 'done' | 'running' | 'blocked' | 'idle'; export interface LifecycleStep { name: string; description: string; status: PipelineStatus; } export interface RecentRun { id: string; name: string; type: string; status: string; latency: string; cost: string; } export interface KnowledgeDocument { id: string; name: string; parseStatus: string; indexStatus: string; chunks: number; updatedAt: string; } export interface WorkflowNode { id: string; type: string; label: string; description: string; x: number; y: number; } export interface WorkflowEdge { from: string; to: string; } export interface TraceStep { node: string; status: string; duration: string; output: string; } export const lifecycleSteps: LifecycleStep[] = [ { name: '知识接入', description: '上传、解析、切片、向量化', status: 'done' }, { name: '能力编排', description: 'Workflow 连接模型、工具与 Skill', status: 'running' }, { name: '对话调试', description: '验证引用、成本、延迟与回答质量', status: 'running' }, { name: '发布观测', description: '版本快照、运行追踪、异常排查', status: 'idle' }, ]; export const readinessChecklist = [ { label: '知识库已绑定 Embedding 模型', done: true }, { label: 'Workflow 草稿存在未发布节点变更', done: false }, { label: 'Agent 已绑定默认知识库与 Skill', done: true }, { label: '生产环境路由规则仍需压测', done: false }, ]; export const recentRuns: RecentRun[] = [ { id: 'run-1842', name: '售前问答 Agent', type: 'Agent', status: '成功', latency: '1.42s', cost: '¥0.018' }, { id: 'run-1841', name: '合同知识召回', type: 'Workflow', status: '成功', latency: '860ms', cost: '¥0.006' }, { id: 'run-1840', name: 'MCP: jira.search', type: 'MCP', status: '重试', latency: '2.8s', cost: '¥0.000' }, ]; export const knowledgeStores = [ { id: '1001', name: '产品制度库', docs: 128, health: 96, status: '可检索' }, { id: '1002', name: '交付项目资料', docs: 64, health: 82, status: '索引中' }, { id: '1003', name: '客服 FAQ', docs: 214, health: 91, status: '可检索' }, ]; export const knowledgeDocuments: KnowledgeDocument[] = [ { id: 'doc-01', name: '售前方案模板.pdf', parseStatus: 'PARSED', indexStatus: 'INDEXED', chunks: 42, updatedAt: '10分钟前' }, { id: 'doc-02', name: '项目实施手册.docx', parseStatus: 'PARSED', indexStatus: 'INDEXING', chunks: 88, updatedAt: '23分钟前' }, { id: 'doc-03', name: '服务条款更新.md', parseStatus: 'FAILED', indexStatus: 'PENDING', chunks: 0, updatedAt: '今天 09:12' }, { id: 'doc-04', name: '客服高频问题.xlsx', parseStatus: 'PARSED', indexStatus: 'INDEXED', chunks: 119, updatedAt: '昨天' }, ]; export const ingestionSteps: LifecycleStep[] = [ { name: '上传', description: '4 个文件已入库 sys_attachment', status: 'done' }, { name: '解析', description: 'Tika 抽取文本并保存快照', status: 'done' }, { name: '切片', description: '固定长度 800 / overlap 120', status: 'running' }, { name: '向量化', description: 'Qwen3 Embedding 1024 维', status: 'idle' }, { name: '可检索', description: '等待索引任务完成', status: 'idle' }, ]; export const workflowNodes: WorkflowNode[] = [ { id: 'start', type: 'START', label: 'Start', description: '接收用户问题', x: 4, y: 42 }, { id: 'retrieve', type: 'KNOWLEDGE_RETRIEVAL', label: 'Knowledge Retrieval', description: 'TopK=6 / score>0.72', x: 25, y: 18 }, { id: 'llm', type: 'LLM', label: 'LLM', description: 'RAG_ANSWER 路由', x: 47, y: 42 }, { id: 'mcp', type: 'MCP_TOOL', label: 'MCP Tool', description: 'jira.search / docs.lookup', x: 47, y: 70 }, { id: 'skill', type: 'SKILL', label: 'Skill', description: '答案审校与引用整理', x: 69, y: 42 }, { id: 'answer', type: 'ANSWER', label: 'Answer', description: '返回回答与引用', x: 88, y: 42 }, ]; export const workflowEdges: WorkflowEdge[] = [ { from: 'start', to: 'retrieve' }, { from: 'retrieve', to: 'llm' }, { from: 'llm', to: 'skill' }, { from: 'mcp', to: 'skill' }, { from: 'skill', to: 'answer' }, ]; export const traceSteps: TraceStep[] = [ { node: 'Start', status: '完成', duration: '4ms', output: '用户问题已标准化' }, { node: 'Knowledge Retrieval', status: '完成', duration: '218ms', output: '召回 6 个切片' }, { node: 'LLM', status: '完成', duration: '1.12s', output: '生成 612 tokens' }, { node: 'Skill', status: '完成', duration: '88ms', output: '引用格式已校验' }, ]; export const chatMessages = [ { role: 'user', content: '如果客户要求私有化部署,售前方案里必须说明哪些内容?' }, { role: 'assistant', content: '建议说明部署拓扑、模型服务商、知识库索引策略、权限边界、日志留存周期和故障恢复方式。当前回答引用了 3 个知识切片。', }, ]; export const citations = [ { title: '售前方案模板.pdf', score: '0.91', text: '私有化部署章节应覆盖基础设施、网络、安全与运维边界。' }, { title: '项目实施手册.docx', score: '0.87', text: '交付计划需包含数据导入、索引重建与验收标准。' }, { title: '服务条款更新.md', score: '0.82', text: '客户数据默认不出域,模型调用日志需保留审计字段。' }, ]; export const mcpCapabilities = [ { name: 'jira.search', type: 'tool', status: '已启用', description: '按项目、状态、负责人检索任务' }, { name: 'docs.lookup', type: 'resource', status: '已启用', description: '读取外部文档中心条目' }, { name: 'deploy.trigger', type: 'tool', status: '待授权', description: '触发测试环境部署流水线' }, ]; export const skillVersions = [ { version: 'v4', status: 'Draft', updatedAt: '刚刚', note: '增加引用一致性检查' }, { version: 'v3', status: 'Published', updatedAt: '昨天', note: '生产环境当前版本' }, { version: 'v2', status: 'Archived', updatedAt: '5天前', note: '旧版回答润色策略' }, ]; export const modelRoutes = [ { task: 'RAG_ANSWER', primary: 'qwen-plus', fallback: 'deepseek-v3', latency: '1800ms', status: '启用' }, { task: 'RAG_EMBEDDING', primary: 'Qwen3-Embedding', fallback: '无', latency: '900ms', status: '启用' }, { task: 'AGENT_PLAN', primary: 'gpt-4.1', fallback: 'qwen-max', latency: '3200ms', status: '草稿' }, ];