import { BaseExtension, ExtensionTypeEnum } from '../extension' import type { MCPTool, MCPToolCallResult } from '../../types' import type { AttachmentFileInfo } from './vector-db' export interface AttachmentInput { path: string name?: string type?: string size?: number } export interface IngestAttachmentsResult { filesProcessed: number chunksInserted: number files: AttachmentFileInfo[] } export const RAG_INTERNAL_SERVER = 'rag-internal' /** * RAG extension base: exposes RAG tools and orchestration API. */ export abstract class RAGExtension extends BaseExtension { type(): ExtensionTypeEnum | undefined { return ExtensionTypeEnum.RAG } abstract getTools(): Promise /** * Lightweight list of tool names for quick routing/lookup. */ abstract getToolNames(): Promise abstract callTool(toolName: string, args: Record): Promise abstract ingestAttachments(threadId: string, files: AttachmentInput[]): Promise }