/** D3 请求只传业务参数;工具路径、主体事实与费用一律由后端确定。 */ export interface ResearchRequest { companies: string[] selections: Record mode: 'QUICK' | 'FULL' fileId: string | null parentId: string | null targetProjectId: string | null focus: string | null acknowledgedCalls: number } export interface ResearchReport { kind: 'COMPANY_RESEARCH' | 'BID_RESEARCH' | 'SNAPSHOT_QA' choices: { key: string; options: { id: string; name: string; region: string }[]; selected: string }[] sections: { key: string; tool: string; evidenceId: string; kind: string; data: unknown }[] observations: { text: string; evidenceIds: string[] }[] ownFit?: { summary: { construction: string; qualifications: string[]; gaps: string[] }; match: { score: number | null; completeness: number; profileVersion: number; limitation: string; dimensions: Record } } commonCustomers?: string[] comparisonBasis?: string gaps: string[] scope: { beginDate?: string; basis: string; stepCount?: number; answerCount?: number; candidateCount?: number; platform_total?: number | null; fetched_count?: number; conditions?: { beginDate: string; endDate: string; keywords: string[] } } } export const taskStates: Record = { RECEIVED: '已接收', PLANNING: '规划中', RUNNING: '执行中', WAITING_ENTITY: '等待主体选择', WAITING_INPUT: '等待补充', WAITING_BUDGET: '预算暂停', SUCCEEDED: '步骤完成', PARTIAL: '部分完成', FAILED: '失败', CANCELLED: '已取消' } export const toolNames: Record = { search_company: '定位企业主体', get_company_profile: '基础画像', get_company_business_keywords: '业务关键词', get_company_partners: '客户与供应商', query_bids_advanced: '历史公告明细', aggregate_bids_advanced: '历史聚合统计', find_competitors: '真实投标竞对', search_bids: '定位项目公告', get_bid_detail: '项目正文', find_potential_bidders: '潜在投标者', get_price_trends: '品牌型号历史单价', web_search: '检索公开资料', web_fetch: '读取公开网页', model_json: '生成有据建议', vision: '识别文件页面', FILE_PARSE: '本地文件提取', ENTITY_CACHE: '读取已确认主体(缓存)', get_top_purchasers: '统计主要采购方', get_top_suppliers: '统计主要中标企业', }