export type KnowledgeScope = "enterprise" | "enterprise-python" | "flagship" | "cosmic" | "xinghan" | "cangqiong"; export type Edition = Extract; export type KnowledgeFileType = "markdown" | "json"; export interface KnowledgeFile { path: string; title: string; type: KnowledgeFileType; sections: KnowledgeSection[]; tags: string[]; lastModified: string; } export interface KnowledgeSection { heading: string; level: number; content: string; lineStart: number; lineEnd: number; } export interface TableSchema { name: string; module: string; description: string; fields: FieldDefinition[]; relatedTables: RelatedTable[]; } export interface FieldDefinition { name: string; type: string; nullable: boolean; description: string; } export interface RelatedTable { table: string; relation: string; description: string; } export interface KnowledgeBase { common: KnowledgeFile[]; edition: KnowledgeFile[]; tables: Map; } export interface SearchResult { file: KnowledgeFile; section: KnowledgeSection; score: number; highlights: string[]; } export interface SearchOptions { tags?: string[]; edition?: Edition; scope?: KnowledgeScope; scopes?: KnowledgeScope[]; topK?: number; minScore?: number; }