/** * RAG (Retrieval Augmented Generation) Type Definitions and Zod Schemas * * @module @wundr/mcp-server/tools/rag/types */ import { z } from 'zod'; /** * Chunking strategy for splitting files into searchable segments */ export declare const ChunkingStrategySchema: z.ZodEnum<["semantic", "fixed", "paragraph", "sentence", "code-aware"]>; /** * Configuration for how files are chunked for indexing */ export declare const ChunkingConfigSchema: z.ZodObject<{ strategy: z.ZodDefault>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>; /** * Metadata filter operators for querying */ export declare const MetadataFilterOperatorSchema: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>; /** * Single metadata filter condition */ export declare const MetadataFilterConditionSchema: z.ZodObject<{ field: z.ZodString; operator: z.ZodEnum<["eq", "ne", "gt", "gte", "lt", "lte", "in", "nin", "contains", "startsWith", "endsWith"]>; value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray, "many">]>; }, "strip", z.ZodTypeAny, { value: string | number | boolean | (string | number)[]; field: string; operator: "contains" | "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "nin" | "startsWith" | "endsWith"; }, { value: string | number | boolean | (string | number)[]; field: string; operator: "contains" | "in" | "eq" | "ne" | "gt" | "gte" | "lt" | "lte" | "nin" | "startsWith" | "endsWith"; }>; /** * Compound metadata filter with logical operators */ export interface ZodMetadataFilter { and?: ZodMetadataFilter[]; or?: ZodMetadataFilter[]; not?: ZodMetadataFilter; condition?: z.infer; } export declare const ZodMetadataFilterSchema: z.ZodType; /** * Prioritization strategy for context building */ export declare const PrioritizationStrategySchema: z.ZodEnum<["relevance", "recency", "diversity", "coverage", "frequency"]>; /** * Index status for a RAG store */ export declare const IndexStatusSchema: z.ZodEnum<["idle", "indexing", "syncing", "error", "stale"]>; /** * Store operations */ export declare const StoreOperationSchema: z.ZodEnum<["create", "list", "get", "delete", "sync", "status", "optimize", "export", "import"]>; /** * Input schema for rag_file_search tool */ export declare const RagFileSearchInputSchema: z.ZodObject<{ targetPath: z.ZodString; query: z.ZodString; includePatterns: z.ZodDefault>>; excludePatterns: z.ZodDefault>>; fileTypes: z.ZodOptional>; storeName: z.ZodOptional; forceReindex: z.ZodDefault>; chunkingConfig: z.ZodOptional>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>>; metadataFilter: z.ZodOptional>; maxResults: z.ZodDefault>; minRelevanceScore: z.ZodDefault>; includeContent: z.ZodDefault>; includeCitations: z.ZodDefault>; }, "strip", z.ZodTypeAny, { query: string; includePatterns: string[]; excludePatterns: string[]; maxResults: number; includeContent: boolean; targetPath: string; forceReindex: boolean; minRelevanceScore: number; includeCitations: boolean; storeName?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; } | undefined; metadataFilter?: ZodMetadataFilter | undefined; }, { query: string; targetPath: string; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; maxResults?: number | undefined; includeContent?: boolean | undefined; storeName?: string | undefined; forceReindex?: boolean | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; } | undefined; metadataFilter?: ZodMetadataFilter | undefined; minRelevanceScore?: number | undefined; includeCitations?: boolean | undefined; }>; /** * Citation schema */ export declare const CitationZodSchema: z.ZodObject<{ filePath: z.ZodString; startLine: z.ZodNumber; endLine: z.ZodNumber; snippet: z.ZodString; context: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }, { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }>; /** * Matched chunk schema */ export declare const MatchedChunkZodSchema: z.ZodObject<{ chunkId: z.ZodString; content: z.ZodString; score: z.ZodNumber; highlights: z.ZodOptional, "many">>; startLine: z.ZodNumber; endLine: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }, { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }>; /** * Search result schema */ export declare const SearchResultZodSchema: z.ZodObject<{ filePath: z.ZodString; relevanceScore: z.ZodNumber; matchedChunks: z.ZodArray, "many">>; startLine: z.ZodNumber; endLine: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }, { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }>, "many">; citations: z.ZodArray; }, "strip", z.ZodTypeAny, { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }, { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }>, "many">; fileMetadata: z.ZodOptional; lineCount: z.ZodOptional; }, "strip", z.ZodTypeAny, { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; }, { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; }>>; summary: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; relevanceScore: number; matchedChunks: { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }[]; citations: { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }[]; fileMetadata?: { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; } | undefined; summary?: string | undefined; }, { filePath: string; relevanceScore: number; matchedChunks: { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }[]; citations: { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }[]; fileMetadata?: { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; } | undefined; summary?: string | undefined; }>; /** * Output schema for rag_file_search tool */ export declare const RagFileSearchOutputSchema: z.ZodObject<{ results: z.ZodArray, "many">>; startLine: z.ZodNumber; endLine: z.ZodNumber; }, "strip", z.ZodTypeAny, { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }, { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }>, "many">; citations: z.ZodArray; }, "strip", z.ZodTypeAny, { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }, { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }>, "many">; fileMetadata: z.ZodOptional; lineCount: z.ZodOptional; }, "strip", z.ZodTypeAny, { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; }, { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; }>>; summary: z.ZodOptional; }, "strip", z.ZodTypeAny, { filePath: string; relevanceScore: number; matchedChunks: { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }[]; citations: { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }[]; fileMetadata?: { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; } | undefined; summary?: string | undefined; }, { filePath: string; relevanceScore: number; matchedChunks: { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }[]; citations: { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }[]; fileMetadata?: { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; } | undefined; summary?: string | undefined; }>, "many">; summary: z.ZodString; storeName: z.ZodString; indexedFileCount: z.ZodNumber; totalChunks: z.ZodNumber; searchMetrics: z.ZodObject<{ queryTimeMs: z.ZodNumber; totalMatches: z.ZodNumber; indexStatus: z.ZodEnum<["idle", "indexing", "syncing", "error", "stale"]>; }, "strip", z.ZodTypeAny, { queryTimeMs: number; totalMatches: number; indexStatus: "error" | "idle" | "indexing" | "syncing" | "stale"; }, { queryTimeMs: number; totalMatches: number; indexStatus: "error" | "idle" | "indexing" | "syncing" | "stale"; }>; suggestions: z.ZodOptional>; }, "strip", z.ZodTypeAny, { storeName: string; summary: string; results: { filePath: string; relevanceScore: number; matchedChunks: { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }[]; citations: { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }[]; fileMetadata?: { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; } | undefined; summary?: string | undefined; }[]; indexedFileCount: number; totalChunks: number; searchMetrics: { queryTimeMs: number; totalMatches: number; indexStatus: "error" | "idle" | "indexing" | "syncing" | "stale"; }; suggestions?: string[] | undefined; }, { storeName: string; summary: string; results: { filePath: string; relevanceScore: number; matchedChunks: { content: string; startLine: number; endLine: number; chunkId: string; score: number; highlights?: { text: string; end: number; start: number; }[] | undefined; }[]; citations: { filePath: string; startLine: number; endLine: number; snippet: string; context?: string | undefined; }[]; fileMetadata?: { size: number; lastModified: string; language?: string | undefined; lineCount?: number | undefined; } | undefined; summary?: string | undefined; }[]; indexedFileCount: number; totalChunks: number; searchMetrics: { queryTimeMs: number; totalMatches: number; indexStatus: "error" | "idle" | "indexing" | "syncing" | "stale"; }; suggestions?: string[] | undefined; }>; /** * Input schema for rag_store_manage tool */ export declare const RagStoreManageInputSchema: z.ZodObject<{ operation: z.ZodEnum<["create", "list", "get", "delete", "sync", "status", "optimize", "export", "import"]>; storeName: z.ZodOptional; targetPath: z.ZodOptional; includePatterns: z.ZodOptional>; excludePatterns: z.ZodOptional>; fileTypes: z.ZodOptional>; chunkingConfig: z.ZodOptional>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>>; force: z.ZodDefault>; exportPath: z.ZodOptional; importPath: z.ZodOptional; }, "strip", z.ZodTypeAny, { force: boolean; operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; targetPath?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; } | undefined; exportPath?: string | undefined; importPath?: string | undefined; }, { operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; force?: boolean | undefined; targetPath?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; } | undefined; exportPath?: string | undefined; importPath?: string | undefined; }>; /** * Store list item schema */ export declare const StoreListItemSchema: z.ZodObject<{ name: z.ZodString; targetPath: z.ZodString; status: z.ZodEnum<["idle", "indexing", "syncing", "error", "stale"]>; fileCount: z.ZodNumber; chunkCount: z.ZodNumber; lastIndexed: z.ZodOptional; sizeBytes: z.ZodNumber; }, "strip", z.ZodTypeAny, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; targetPath: string; fileCount: number; chunkCount: number; sizeBytes: number; lastIndexed?: string | undefined; }, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; targetPath: string; fileCount: number; chunkCount: number; sizeBytes: number; lastIndexed?: string | undefined; }>; /** * RAG store schema */ export declare const RagStoreZodSchema: z.ZodObject<{ name: z.ZodString; targetPath: z.ZodString; createdAt: z.ZodString; updatedAt: z.ZodString; lastIndexedAt: z.ZodOptional; status: z.ZodEnum<["idle", "indexing", "syncing", "error", "stale"]>; config: z.ZodObject<{ includePatterns: z.ZodArray; excludePatterns: z.ZodArray; fileTypes: z.ZodOptional>; chunking: z.ZodObject<{ strategy: z.ZodDefault>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>; maxFileSizeMb: z.ZodDefault>; followSymlinks: z.ZodDefault>; }, "strip", z.ZodTypeAny, { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }; maxFileSizeMb: number; followSymlinks: boolean; fileTypes?: string[] | undefined; }, { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }; fileTypes?: string[] | undefined; maxFileSizeMb?: number | undefined; followSymlinks?: boolean | undefined; }>; stats: z.ZodObject<{ totalFiles: z.ZodNumber; totalChunks: z.ZodNumber; totalTokens: z.ZodNumber; indexSizeBytes: z.ZodNumber; avgChunkSize: z.ZodNumber; languageDistribution: z.ZodOptional>; }, "strip", z.ZodTypeAny, { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }, { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }>; version: z.ZodString; }, "strip", z.ZodTypeAny, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; version: string; config: { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }; maxFileSizeMb: number; followSymlinks: boolean; fileTypes?: string[] | undefined; }; targetPath: string; createdAt: string; updatedAt: string; stats: { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }; lastIndexedAt?: string | undefined; }, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; version: string; config: { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }; fileTypes?: string[] | undefined; maxFileSizeMb?: number | undefined; followSymlinks?: boolean | undefined; }; targetPath: string; createdAt: string; updatedAt: string; stats: { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }; lastIndexedAt?: string | undefined; }>; /** * Sync result schema */ export declare const SyncResultZodSchema: z.ZodObject<{ filesAdded: z.ZodNumber; filesUpdated: z.ZodNumber; filesRemoved: z.ZodNumber; chunksAdded: z.ZodNumber; chunksRemoved: z.ZodNumber; durationMs: z.ZodNumber; }, "strip", z.ZodTypeAny, { filesAdded: number; filesUpdated: number; filesRemoved: number; chunksAdded: number; chunksRemoved: number; durationMs: number; }, { filesAdded: number; filesUpdated: number; filesRemoved: number; chunksAdded: number; chunksRemoved: number; durationMs: number; }>; /** * Optimize result schema */ export declare const OptimizeResultZodSchema: z.ZodObject<{ beforeSizeBytes: z.ZodNumber; afterSizeBytes: z.ZodNumber; chunksCompacted: z.ZodNumber; durationMs: z.ZodNumber; }, "strip", z.ZodTypeAny, { durationMs: number; beforeSizeBytes: number; afterSizeBytes: number; chunksCompacted: number; }, { durationMs: number; beforeSizeBytes: number; afterSizeBytes: number; chunksCompacted: number; }>; /** * Output schema for rag_store_manage tool */ export declare const RagStoreManageOutputSchema: z.ZodObject<{ success: z.ZodBoolean; operation: z.ZodEnum<["create", "list", "get", "delete", "sync", "status", "optimize", "export", "import"]>; message: z.ZodString; store: z.ZodOptional; status: z.ZodEnum<["idle", "indexing", "syncing", "error", "stale"]>; config: z.ZodObject<{ includePatterns: z.ZodArray; excludePatterns: z.ZodArray; fileTypes: z.ZodOptional>; chunking: z.ZodObject<{ strategy: z.ZodDefault>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>; maxFileSizeMb: z.ZodDefault>; followSymlinks: z.ZodDefault>; }, "strip", z.ZodTypeAny, { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }; maxFileSizeMb: number; followSymlinks: boolean; fileTypes?: string[] | undefined; }, { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }; fileTypes?: string[] | undefined; maxFileSizeMb?: number | undefined; followSymlinks?: boolean | undefined; }>; stats: z.ZodObject<{ totalFiles: z.ZodNumber; totalChunks: z.ZodNumber; totalTokens: z.ZodNumber; indexSizeBytes: z.ZodNumber; avgChunkSize: z.ZodNumber; languageDistribution: z.ZodOptional>; }, "strip", z.ZodTypeAny, { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }, { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }>; version: z.ZodString; }, "strip", z.ZodTypeAny, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; version: string; config: { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }; maxFileSizeMb: number; followSymlinks: boolean; fileTypes?: string[] | undefined; }; targetPath: string; createdAt: string; updatedAt: string; stats: { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }; lastIndexedAt?: string | undefined; }, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; version: string; config: { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }; fileTypes?: string[] | undefined; maxFileSizeMb?: number | undefined; followSymlinks?: boolean | undefined; }; targetPath: string; createdAt: string; updatedAt: string; stats: { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }; lastIndexedAt?: string | undefined; }>>; stores: z.ZodOptional; fileCount: z.ZodNumber; chunkCount: z.ZodNumber; lastIndexed: z.ZodOptional; sizeBytes: z.ZodNumber; }, "strip", z.ZodTypeAny, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; targetPath: string; fileCount: number; chunkCount: number; sizeBytes: number; lastIndexed?: string | undefined; }, { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; targetPath: string; fileCount: number; chunkCount: number; sizeBytes: number; lastIndexed?: string | undefined; }>, "many">>; deletedStore: z.ZodOptional; syncResult: z.ZodOptional>; optimizeResult: z.ZodOptional>; exportPath: z.ZodOptional; }, "strip", z.ZodTypeAny, { message: string; success: boolean; operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; store?: { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; version: string; config: { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }; maxFileSizeMb: number; followSymlinks: boolean; fileTypes?: string[] | undefined; }; targetPath: string; createdAt: string; updatedAt: string; stats: { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }; lastIndexedAt?: string | undefined; } | undefined; exportPath?: string | undefined; stores?: { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; targetPath: string; fileCount: number; chunkCount: number; sizeBytes: number; lastIndexed?: string | undefined; }[] | undefined; deletedStore?: string | undefined; syncResult?: { filesAdded: number; filesUpdated: number; filesRemoved: number; chunksAdded: number; chunksRemoved: number; durationMs: number; } | undefined; optimizeResult?: { durationMs: number; beforeSizeBytes: number; afterSizeBytes: number; chunksCompacted: number; } | undefined; }, { message: string; success: boolean; operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; store?: { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; version: string; config: { includePatterns: string[]; excludePatterns: string[]; chunking: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }; fileTypes?: string[] | undefined; maxFileSizeMb?: number | undefined; followSymlinks?: boolean | undefined; }; targetPath: string; createdAt: string; updatedAt: string; stats: { totalChunks: number; totalFiles: number; totalTokens: number; indexSizeBytes: number; avgChunkSize: number; languageDistribution?: Record | undefined; }; lastIndexedAt?: string | undefined; } | undefined; exportPath?: string | undefined; stores?: { status: "error" | "idle" | "indexing" | "syncing" | "stale"; name: string; targetPath: string; fileCount: number; chunkCount: number; sizeBytes: number; lastIndexed?: string | undefined; }[] | undefined; deletedStore?: string | undefined; syncResult?: { filesAdded: number; filesUpdated: number; filesRemoved: number; chunksAdded: number; chunksRemoved: number; durationMs: number; } | undefined; optimizeResult?: { durationMs: number; beforeSizeBytes: number; afterSizeBytes: number; chunksCompacted: number; } | undefined; }>; /** * Weighted query schema */ export declare const WeightedQuerySchema: z.ZodObject<{ query: z.ZodString; weight: z.ZodDefault>; category: z.ZodOptional; }, "strip", z.ZodTypeAny, { query: string; weight: number; category?: string | undefined; }, { query: string; category?: string | undefined; weight?: number | undefined; }>; /** * Input schema for rag_context_builder tool */ export declare const RagContextBuilderInputSchema: z.ZodObject<{ queries: z.ZodArray>; category: z.ZodOptional; }, "strip", z.ZodTypeAny, { query: string; weight: number; category?: string | undefined; }, { query: string; category?: string | undefined; weight?: number | undefined; }>]>, "many">; targetPath: z.ZodString; contextGoal: z.ZodOptional; maxContextTokens: z.ZodDefault>; prioritization: z.ZodDefault>>; storeName: z.ZodOptional; includePatterns: z.ZodOptional>; excludePatterns: z.ZodOptional>; deduplication: z.ZodDefault>; includeFileHeaders: z.ZodDefault>; groupByFile: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; minRelevanceScore: z.ZodDefault>; }, "strip", z.ZodTypeAny, { targetPath: string; maxChunksPerFile: number; minRelevanceScore: number; queries: (string | { query: string; weight: number; category?: string | undefined; })[]; maxContextTokens: number; prioritization: "relevance" | "recency" | "diversity" | "coverage" | "frequency"; deduplication: boolean; includeFileHeaders: boolean; groupByFile: boolean; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; contextGoal?: string | undefined; }, { targetPath: string; queries: (string | { query: string; category?: string | undefined; weight?: number | undefined; })[]; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; maxChunksPerFile?: number | undefined; minRelevanceScore?: number | undefined; contextGoal?: string | undefined; maxContextTokens?: number | undefined; prioritization?: "relevance" | "recency" | "diversity" | "coverage" | "frequency" | undefined; deduplication?: boolean | undefined; includeFileHeaders?: boolean | undefined; groupByFile?: boolean | undefined; }>; /** * Context section schema */ export declare const ContextSectionSchema: z.ZodObject<{ filePath: z.ZodString; relevanceScore: z.ZodNumber; content: z.ZodString; tokenCount: z.ZodNumber; lineRange: z.ZodObject<{ start: z.ZodNumber; end: z.ZodNumber; }, "strip", z.ZodTypeAny, { end: number; start: number; }, { end: number; start: number; }>; matchedQueries: z.ZodArray; }, "strip", z.ZodTypeAny, { content: string; filePath: string; relevanceScore: number; tokenCount: number; lineRange: { end: number; start: number; }; matchedQueries: string[]; }, { content: string; filePath: string; relevanceScore: number; tokenCount: number; lineRange: { end: number; start: number; }; matchedQueries: string[]; }>; /** * Context suggestions schema */ export declare const ContextSuggestionsSchema: z.ZodObject<{ additionalQueries: z.ZodOptional>; missingContext: z.ZodOptional>; refinements: z.ZodOptional>; }, "strip", z.ZodTypeAny, { additionalQueries?: string[] | undefined; missingContext?: string[] | undefined; refinements?: string[] | undefined; }, { additionalQueries?: string[] | undefined; missingContext?: string[] | undefined; refinements?: string[] | undefined; }>; /** * Output schema for rag_context_builder tool */ export declare const RagContextBuilderOutputSchema: z.ZodObject<{ context: z.ZodString; sections: z.ZodArray; matchedQueries: z.ZodArray; }, "strip", z.ZodTypeAny, { content: string; filePath: string; relevanceScore: number; tokenCount: number; lineRange: { end: number; start: number; }; matchedQueries: string[]; }, { content: string; filePath: string; relevanceScore: number; tokenCount: number; lineRange: { end: number; start: number; }; matchedQueries: string[]; }>, "many">; summary: z.ZodString; metadata: z.ZodObject<{ totalTokens: z.ZodNumber; totalFiles: z.ZodNumber; totalChunks: z.ZodNumber; queriesProcessed: z.ZodNumber; deduplicatedChunks: z.ZodNumber; truncatedFiles: z.ZodNumber; }, "strip", z.ZodTypeAny, { totalChunks: number; totalFiles: number; totalTokens: number; queriesProcessed: number; deduplicatedChunks: number; truncatedFiles: number; }, { totalChunks: number; totalFiles: number; totalTokens: number; queriesProcessed: number; deduplicatedChunks: number; truncatedFiles: number; }>; relevanceMap: z.ZodRecord; suggestions: z.ZodOptional>; missingContext: z.ZodOptional>; refinements: z.ZodOptional>; }, "strip", z.ZodTypeAny, { additionalQueries?: string[] | undefined; missingContext?: string[] | undefined; refinements?: string[] | undefined; }, { additionalQueries?: string[] | undefined; missingContext?: string[] | undefined; refinements?: string[] | undefined; }>>; }, "strip", z.ZodTypeAny, { metadata: { totalChunks: number; totalFiles: number; totalTokens: number; queriesProcessed: number; deduplicatedChunks: number; truncatedFiles: number; }; context: string; summary: string; sections: { content: string; filePath: string; relevanceScore: number; tokenCount: number; lineRange: { end: number; start: number; }; matchedQueries: string[]; }[]; relevanceMap: Record; suggestions?: { additionalQueries?: string[] | undefined; missingContext?: string[] | undefined; refinements?: string[] | undefined; } | undefined; }, { metadata: { totalChunks: number; totalFiles: number; totalTokens: number; queriesProcessed: number; deduplicatedChunks: number; truncatedFiles: number; }; context: string; summary: string; sections: { content: string; filePath: string; relevanceScore: number; tokenCount: number; lineRange: { end: number; start: number; }; matchedQueries: string[]; }[]; relevanceMap: Record; suggestions?: { additionalQueries?: string[] | undefined; missingContext?: string[] | undefined; refinements?: string[] | undefined; } | undefined; }>; /** * File chunk schema */ export declare const FileChunkSchema: z.ZodObject<{ id: z.ZodString; filePath: z.ZodString; content: z.ZodString; startLine: z.ZodNumber; endLine: z.ZodNumber; startChar: z.ZodNumber; endChar: z.ZodNumber; tokenCount: z.ZodNumber; embedding: z.ZodOptional>; metadata: z.ZodOptional>; language: z.ZodOptional; symbols: z.ZodOptional>; imports: z.ZodOptional>; exports: z.ZodOptional>; createdAt: z.ZodString; updatedAt: z.ZodString; }, "strip", z.ZodTypeAny, { id: string; content: string; filePath: string; startLine: number; endLine: number; createdAt: string; updatedAt: string; tokenCount: number; startChar: number; endChar: number; metadata?: Record | undefined; language?: string | undefined; embedding?: number[] | undefined; symbols?: string[] | undefined; imports?: string[] | undefined; exports?: string[] | undefined; }, { id: string; content: string; filePath: string; startLine: number; endLine: number; createdAt: string; updatedAt: string; tokenCount: number; startChar: number; endChar: number; metadata?: Record | undefined; language?: string | undefined; embedding?: number[] | undefined; symbols?: string[] | undefined; imports?: string[] | undefined; exports?: string[] | undefined; }>; /** * RAG tool schemas for registration in ToolSchemas registry */ export declare const RagFileSearchSchema: z.ZodObject<{ targetPath: z.ZodString; query: z.ZodString; includePatterns: z.ZodDefault>>; excludePatterns: z.ZodDefault>>; fileTypes: z.ZodOptional>; storeName: z.ZodOptional; forceReindex: z.ZodDefault>; chunkingConfig: z.ZodOptional>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>>; metadataFilter: z.ZodOptional>; maxResults: z.ZodDefault>; minRelevanceScore: z.ZodDefault>; includeContent: z.ZodDefault>; includeCitations: z.ZodDefault>; }, "strip", z.ZodTypeAny, { query: string; includePatterns: string[]; excludePatterns: string[]; maxResults: number; includeContent: boolean; targetPath: string; forceReindex: boolean; minRelevanceScore: number; includeCitations: boolean; storeName?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; } | undefined; metadataFilter?: ZodMetadataFilter | undefined; }, { query: string; targetPath: string; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; maxResults?: number | undefined; includeContent?: boolean | undefined; storeName?: string | undefined; forceReindex?: boolean | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; } | undefined; metadataFilter?: ZodMetadataFilter | undefined; minRelevanceScore?: number | undefined; includeCitations?: boolean | undefined; }>; export declare const RagStoreManageSchema: z.ZodObject<{ operation: z.ZodEnum<["create", "list", "get", "delete", "sync", "status", "optimize", "export", "import"]>; storeName: z.ZodOptional; targetPath: z.ZodOptional; includePatterns: z.ZodOptional>; excludePatterns: z.ZodOptional>; fileTypes: z.ZodOptional>; chunkingConfig: z.ZodOptional>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>>; force: z.ZodDefault>; exportPath: z.ZodOptional; importPath: z.ZodOptional; }, "strip", z.ZodTypeAny, { force: boolean; operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; targetPath?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; } | undefined; exportPath?: string | undefined; importPath?: string | undefined; }, { operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; force?: boolean | undefined; targetPath?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; } | undefined; exportPath?: string | undefined; importPath?: string | undefined; }>; export declare const RagContextBuilderSchema: z.ZodObject<{ queries: z.ZodArray>; category: z.ZodOptional; }, "strip", z.ZodTypeAny, { query: string; weight: number; category?: string | undefined; }, { query: string; category?: string | undefined; weight?: number | undefined; }>]>, "many">; targetPath: z.ZodString; contextGoal: z.ZodOptional; maxContextTokens: z.ZodDefault>; prioritization: z.ZodDefault>>; storeName: z.ZodOptional; includePatterns: z.ZodOptional>; excludePatterns: z.ZodOptional>; deduplication: z.ZodDefault>; includeFileHeaders: z.ZodDefault>; groupByFile: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; minRelevanceScore: z.ZodDefault>; }, "strip", z.ZodTypeAny, { targetPath: string; maxChunksPerFile: number; minRelevanceScore: number; queries: (string | { query: string; weight: number; category?: string | undefined; })[]; maxContextTokens: number; prioritization: "relevance" | "recency" | "diversity" | "coverage" | "frequency"; deduplication: boolean; includeFileHeaders: boolean; groupByFile: boolean; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; contextGoal?: string | undefined; }, { targetPath: string; queries: (string | { query: string; category?: string | undefined; weight?: number | undefined; })[]; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; maxChunksPerFile?: number | undefined; minRelevanceScore?: number | undefined; contextGoal?: string | undefined; maxContextTokens?: number | undefined; prioritization?: "relevance" | "recency" | "diversity" | "coverage" | "frequency" | undefined; deduplication?: boolean | undefined; includeFileHeaders?: boolean | undefined; groupByFile?: boolean | undefined; }>; /** * RAG tool registry entries */ export declare const RagToolSchemas: { readonly 'rag-file-search': { readonly schema: z.ZodObject<{ targetPath: z.ZodString; query: z.ZodString; includePatterns: z.ZodDefault>>; excludePatterns: z.ZodDefault>>; fileTypes: z.ZodOptional>; storeName: z.ZodOptional; forceReindex: z.ZodDefault>; chunkingConfig: z.ZodOptional>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>>; metadataFilter: z.ZodOptional>; maxResults: z.ZodDefault>; minRelevanceScore: z.ZodDefault>; includeContent: z.ZodDefault>; includeCitations: z.ZodDefault>; }, "strip", z.ZodTypeAny, { query: string; includePatterns: string[]; excludePatterns: string[]; maxResults: number; includeContent: boolean; targetPath: string; forceReindex: boolean; minRelevanceScore: number; includeCitations: boolean; storeName?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; } | undefined; metadataFilter?: ZodMetadataFilter | undefined; }, { query: string; targetPath: string; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; maxResults?: number | undefined; includeContent?: boolean | undefined; storeName?: string | undefined; forceReindex?: boolean | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; } | undefined; metadataFilter?: ZodMetadataFilter | undefined; minRelevanceScore?: number | undefined; includeCitations?: boolean | undefined; }>; readonly description: "Search files using RAG (Retrieval-Augmented Generation) with semantic understanding"; readonly category: "rag"; }; readonly 'rag-store-manage': { readonly schema: z.ZodObject<{ operation: z.ZodEnum<["create", "list", "get", "delete", "sync", "status", "optimize", "export", "import"]>; storeName: z.ZodOptional; targetPath: z.ZodOptional; includePatterns: z.ZodOptional>; excludePatterns: z.ZodOptional>; fileTypes: z.ZodOptional>; chunkingConfig: z.ZodOptional>>; chunkSize: z.ZodDefault>; chunkOverlap: z.ZodDefault>; minChunkSize: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; preserveCodeBlocks: z.ZodDefault>; respectBoundaries: z.ZodDefault>; }, "strip", z.ZodTypeAny, { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; }, { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; }>>; force: z.ZodDefault>; exportPath: z.ZodOptional; importPath: z.ZodOptional; }, "strip", z.ZodTypeAny, { force: boolean; operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; targetPath?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware"; chunkSize: number; chunkOverlap: number; minChunkSize: number; maxChunksPerFile: number; preserveCodeBlocks: boolean; respectBoundaries: boolean; } | undefined; exportPath?: string | undefined; importPath?: string | undefined; }, { operation: "status" | "list" | "create" | "delete" | "optimize" | "get" | "sync" | "export" | "import"; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; force?: boolean | undefined; targetPath?: string | undefined; fileTypes?: string[] | undefined; chunkingConfig?: { strategy?: "semantic" | "fixed" | "paragraph" | "sentence" | "code-aware" | undefined; chunkSize?: number | undefined; chunkOverlap?: number | undefined; minChunkSize?: number | undefined; maxChunksPerFile?: number | undefined; preserveCodeBlocks?: boolean | undefined; respectBoundaries?: boolean | undefined; } | undefined; exportPath?: string | undefined; importPath?: string | undefined; }>; readonly description: "Manage RAG vector stores for file indexing and search"; readonly category: "rag"; }; readonly 'rag-context-builder': { readonly schema: z.ZodObject<{ queries: z.ZodArray>; category: z.ZodOptional; }, "strip", z.ZodTypeAny, { query: string; weight: number; category?: string | undefined; }, { query: string; category?: string | undefined; weight?: number | undefined; }>]>, "many">; targetPath: z.ZodString; contextGoal: z.ZodOptional; maxContextTokens: z.ZodDefault>; prioritization: z.ZodDefault>>; storeName: z.ZodOptional; includePatterns: z.ZodOptional>; excludePatterns: z.ZodOptional>; deduplication: z.ZodDefault>; includeFileHeaders: z.ZodDefault>; groupByFile: z.ZodDefault>; maxChunksPerFile: z.ZodDefault>; minRelevanceScore: z.ZodDefault>; }, "strip", z.ZodTypeAny, { targetPath: string; maxChunksPerFile: number; minRelevanceScore: number; queries: (string | { query: string; weight: number; category?: string | undefined; })[]; maxContextTokens: number; prioritization: "relevance" | "recency" | "diversity" | "coverage" | "frequency"; deduplication: boolean; includeFileHeaders: boolean; groupByFile: boolean; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; contextGoal?: string | undefined; }, { targetPath: string; queries: (string | { query: string; category?: string | undefined; weight?: number | undefined; })[]; includePatterns?: string[] | undefined; excludePatterns?: string[] | undefined; storeName?: string | undefined; maxChunksPerFile?: number | undefined; minRelevanceScore?: number | undefined; contextGoal?: string | undefined; maxContextTokens?: number | undefined; prioritization?: "relevance" | "recency" | "diversity" | "coverage" | "frequency" | undefined; deduplication?: boolean | undefined; includeFileHeaders?: boolean | undefined; groupByFile?: boolean | undefined; }>; readonly description: "Build consolidated context from multiple queries for AI consumption"; readonly category: "rag"; }; }; export type RagToolName = keyof typeof RagToolSchemas; export type RagFileSearchInputType = z.infer; export type RagFileSearchOutputType = z.infer; export type RagStoreManageInputType = z.infer; export type RagStoreManageOutputType = z.infer; export type RagContextBuilderInputType = z.infer; export type RagContextBuilderOutputType = z.infer; export type FileChunkType = z.infer; export type StoreListItemType = z.infer; export type RagStoreType = z.infer; export type ContextSectionType = z.infer; export type WeightedQueryType = z.infer; /** * RAG Store metadata */ export interface RAGStore { /** Unique store identifier (corpus name in Gemini) */ id: string; /** Human-readable display name */ displayName: string; /** Store creation timestamp */ createdAt: string; /** Last sync timestamp */ lastSyncAt?: string; /** Number of files indexed */ fileCount: number; /** Number of chunks created */ chunkCount: number; /** Total size in bytes */ sizeBytes: number; /** Store status */ status: StoreStatus; /** Configuration used for this store */ config?: StoreConfig; } /** * Store status enumeration */ export type StoreStatus = 'active' | 'indexing' | 'error' | 'deleted' | 'syncing'; /** * Store configuration options */ export interface StoreConfig { /** Chunk size for text splitting */ chunkSize?: number; /** Overlap between chunks */ chunkOverlap?: number; /** File patterns to include */ includePatterns?: string[]; /** File patterns to exclude */ excludePatterns?: string[]; /** Maximum file size in bytes */ maxFileSize?: number; /** Embedding model to use */ embeddingModel?: string; } /** * Default store configuration */ export declare const DEFAULT_STORE_CONFIG: Required; /** * File metadata for indexed documents */ export interface IndexedFile { /** File path relative to store root */ path: string; /** File hash for change detection */ hash: string; /** File size in bytes */ sizeBytes: number; /** Last modified timestamp */ lastModified: string; /** Indexing timestamp */ indexedAt: string; /** Number of chunks created from this file */ chunkCount: number; /** File MIME type */ mimeType?: string; } /** * File change types for sync operations */ export type FileChangeType = 'added' | 'modified' | 'deleted' | 'unchanged'; /** * File change detection result */ export interface FileChange { path: string; changeType: FileChangeType; oldHash?: string; newHash?: string; } /** * Store creation parameters */ export interface CreateStoreParams { /** Store identifier */ id: string; /** Optional display name */ displayName?: string; /** Optional configuration */ config?: StoreConfig; /** Initial files to index */ sourcePath?: string; } /** * Store sync parameters */ export interface SyncStoreParams { /** Store identifier */ storeId: string; /** Source path to sync from */ sourcePath: string; /** Force full reindex */ forceReindex?: boolean; /** Delete removed files from index */ deleteRemoved?: boolean; } /** * Store query parameters */ export interface QueryStoreParams { /** Store identifier */ storeId: string; /** Query text */ query: string; /** Maximum results to return */ topK?: number; /** Minimum similarity score */ minScore?: number; /** Filter by file patterns */ fileFilter?: string[]; } /** * Query result item */ export interface QueryResult { /** Document/chunk content */ content: string; /** Source file path */ sourcePath: string; /** Similarity score */ score: number; /** Chunk metadata */ metadata?: Record; } /** * Sync operation result */ export interface SyncResult { /** Number of files added */ added: number; /** Number of files updated */ updated: number; /** Number of files deleted */ deleted: number; /** Number of files unchanged */ unchanged: number; /** Total chunks indexed */ totalChunks: number; /** Time taken in milliseconds */ durationMs: number; /** Errors encountered */ errors?: Array<{ path: string; error: string; }>; } /** * Store statistics */ export interface StoreStats { /** Store identifier */ storeId: string; /** Total files indexed */ totalFiles: number; /** Total chunks */ totalChunks: number; /** Total size in bytes */ totalSizeBytes: number; /** Average chunk size */ avgChunkSize: number; /** File type breakdown */ fileTypes: Record; /** Last sync statistics */ lastSync?: SyncResult; /** Store health status */ health: StoreHealthStatus; } /** * Store health status */ export interface StoreHealthStatus { /** Overall health */ status: 'healthy' | 'degraded' | 'unhealthy'; /** Individual health checks */ checks: Array<{ name: string; status: 'pass' | 'warn' | 'fail'; message?: string; }>; /** Last health check timestamp */ lastCheckedAt: string; } /** * Generic RAG operation response */ export interface RAGOperationResponse { success: boolean; data?: T; error?: string; message?: string; } /** * Store list response */ export interface ListStoresResponse { stores: RAGStore[]; totalCount: number; } /** * Store creation response */ export interface CreateStoreResponse { store: RAGStore; message: string; } /** * Store deletion response */ export interface DeleteStoreResponse { storeId: string; deleted: boolean; message: string; } /** * RAG Store management actions */ export type RAGStoreAction = 'create' | 'list' | 'get' | 'delete' | 'sync' | 'status'; /** * RAG Store manage input parameters */ export interface RAGStoreManageInput { /** Action to perform */ action: RAGStoreAction; /** Store identifier (for get, delete, sync, status) */ storeId?: string; /** Display name (for create) */ displayName?: string; /** Source path (for create, sync) */ sourcePath?: string; /** Store configuration (for create) */ config?: StoreConfig; /** Force reindex (for sync) */ forceReindex?: boolean; /** Output format */ format?: 'json' | 'table' | 'text'; } /** * Prioritization strategy for context building */ export type PrioritizationStrategy = 'relevance' | 'recency' | 'coverage'; /** * A single chunk of retrieved content from RAG search */ export interface RAGChunk { /** Unique identifier for the chunk */ readonly id: string; /** The actual content text */ readonly content: string; /** Source file or document path */ readonly source: string; /** Relevance score from the search (0-1) */ readonly score: number; /** Timestamp when the content was last modified */ readonly timestamp?: Date; /** Line numbers if from a code file */ readonly lineRange?: { start: number; end: number; }; /** Additional metadata about the chunk */ readonly metadata?: Record; } /** * Result from a single RAG search query */ export interface RAGSearchResult { /** The original query string */ readonly query: string; /** Retrieved chunks matching the query */ readonly chunks: readonly RAGChunk[]; /** Total number of matches found */ readonly totalMatches: number; /** Time taken for the search in milliseconds */ readonly searchTimeMs: number; /** Any errors encountered during search */ readonly error?: string; } /** * Array of RAG search results - for compatibility with array operations */ export type RAGSearchResults = RAGSearchResult[]; /** * Input parameters for the RAG context builder */ export interface RAGContextBuilderInput { /** Multiple search queries to execute */ readonly queries: readonly string[]; /** Target path/directory to search within */ readonly targetPath: string; /** Goal description for context building */ readonly contextGoal: string; /** Maximum tokens allowed in the built context */ readonly maxContextTokens: number; /** Strategy for prioritizing results */ readonly prioritization: PrioritizationStrategy; /** Optional file patterns to include */ readonly includePatterns?: readonly string[]; /** Optional file patterns to exclude */ readonly excludePatterns?: readonly string[]; /** Minimum relevance score threshold (0-1) */ readonly minScore?: number; } /** * A consolidated context item after deduplication and prioritization */ export interface ConsolidatedContextItem { /** Unique identifier */ readonly id: string; /** The content text */ readonly content: string; /** Source file path */ readonly source: string; /** Aggregated relevance score */ readonly aggregatedScore: number; /** Queries that matched this content */ readonly matchedQueries: readonly string[]; /** Estimated token count for this item */ readonly tokenCount: number; /** Timestamp for recency calculations */ readonly timestamp?: Date; /** Line range in source file */ readonly lineRange?: { start: number; end: number; }; } /** * Summary of the built context */ export interface ContextSummary { /** Total number of unique sources */ readonly totalSources: number; /** Total token count used */ readonly totalTokens: number; /** Breakdown by query of how many results were included */ readonly queryBreakdown: Record; /** Coverage score (0-1) indicating how well queries are covered */ readonly coverageScore: number; /** Average relevance score of included items */ readonly averageRelevance: number; /** Prioritization strategy used */ readonly strategyUsed: PrioritizationStrategy; } /** * Output from the RAG context builder */ export interface RAGContextBuilderOutput { /** Whether the operation succeeded */ readonly success: boolean; /** Consolidated and prioritized context items */ readonly contextItems: readonly ConsolidatedContextItem[]; /** Summary of the built context */ readonly summary: ContextSummary; /** The formatted context ready for agent use */ readonly formattedContext: string; /** Any warnings generated during processing */ readonly warnings?: readonly string[]; /** Error message if failed */ readonly error?: string; /** Metadata about the operation */ readonly metadata: { readonly totalSearchTimeMs: number; readonly processingTimeMs: number; readonly queriesExecuted: number; readonly chunksProcessed: number; readonly chunksIncluded: number; readonly tokenBudgetUsed: number; readonly tokenBudgetRemaining: number; }; } /** * Configuration for RAG service */ export interface RAGServiceConfig { /** API key for the embedding service */ readonly apiKey?: string; /** Model to use for embeddings */ readonly embeddingModel?: string; /** Maximum chunks to return per query */ readonly maxChunksPerQuery?: number; /** Default minimum score threshold */ readonly defaultMinScore?: number; /** Cache configuration */ readonly cache?: { readonly enabled: boolean; readonly ttlMs: number; }; } /** * Search options for RAG queries */ export interface RAGSearchOptions { /** Maximum results to return (alias: topK) */ readonly limit?: number; /** Maximum results to return (alias: limit) - for compatibility */ readonly topK?: number; /** Minimum score threshold */ readonly minScore?: number; /** File patterns to include */ readonly includePatterns?: readonly string[]; /** File patterns to exclude */ readonly excludePatterns?: readonly string[]; /** Whether to include content in results */ readonly includeContent?: boolean; } /** * Interface for RAG service implementations */ export interface IRAGService { /** * Search for relevant content based on a query */ search(query: string, targetPath: string, options?: RAGSearchOptions): Promise; /** * Execute multiple searches in parallel */ searchMultiple(queries: readonly string[], targetPath: string, options?: RAGSearchOptions): Promise; /** * Index a directory for search */ indexDirectory(path: string): Promise; /** * Check if a path is indexed */ isIndexed(path: string): Promise; } /** * Token counting result */ export interface TokenCountResult { /** Number of tokens */ readonly count: number; /** Method used for counting */ readonly method: 'exact' | 'estimated'; } /** * Token counter interface */ export interface ITokenCounter { /** * Count tokens in a string */ count(text: string): TokenCountResult; /** * Estimate tokens without full counting */ estimate(text: string): number; /** * Truncate text to fit within token limit */ truncateToFit(text: string, maxTokens: number): string; } /** * Supported file type categories for filtering */ export type FileTypeCategory = 'code' | 'documentation' | 'config' | 'data' | 'all'; /** * Mapping of file type categories to extensions */ export declare const FILE_TYPE_EXTENSIONS: Record; /** * Default file patterns to exclude */ export declare const DEFAULT_EXCLUDE_PATTERNS: string[]; /** * Chunking strategy options */ export type ChunkingStrategy = 'fixed' | 'semantic' | 'paragraph' | 'sentence'; /** * Extended chunking configuration */ export interface ChunkingConfig { strategy: ChunkingStrategy; chunkSize: number; chunkOverlap: number; minChunkSize?: number; maxChunksPerFile?: number; } /** * Default chunking configuration */ export declare const DEFAULT_CHUNKING_CONFIG: ChunkingConfig; /** * Metadata filter for search queries */ export interface MetadataFilter { /** File path contains this string */ pathContains?: string; /** File extension filter */ extension?: string | string[]; /** File modified after this date */ modifiedAfter?: string; /** File modified before this date */ modifiedBefore?: string; /** Custom metadata key-value filters */ custom?: Record; } /** * RAG File Search input parameters */ export interface RagFileSearchInput { /** Target path to search (directory or file) */ targetPath: string; /** Natural language search query */ query: string; /** Glob patterns to include files */ includePatterns?: string[]; /** Glob patterns to exclude files */ excludePatterns?: string[]; /** File type categories to include */ fileTypes?: FileTypeCategory[]; /** Name for the RAG store (for caching/reuse) */ storeName?: string; /** Force reindexing even if store exists */ forceReindex?: boolean; /** Chunking configuration */ chunkingConfig?: Partial; /** Metadata filters for search */ metadataFilter?: MetadataFilter; /** Maximum number of results to return */ maxResults?: number; } /** * Citation information for a search result */ export interface Citation { /** Source file path */ filePath: string; /** Starting line number (1-indexed) */ startLine: number; /** Ending line number (1-indexed) */ endLine: number; /** Column start position */ startColumn?: number; /** Column end position */ endColumn?: number; /** Highlighted snippet */ snippet: string; } /** * A matched chunk from the search */ export interface MatchedChunk { /** Chunk content */ content: string; /** Relevance score (0-1) */ score: number; /** Citation information */ citation: Citation; /** Chunk metadata */ metadata?: Record; } /** * Search result for a single file */ export interface FileSearchResult { /** File path */ filePath: string; /** Relative path from target */ relativePath: string; /** Overall relevance score for this file */ relevanceScore: number; /** Matched chunks within this file */ matchedChunks: MatchedChunk[]; /** File metadata */ metadata: { /** File size in bytes */ size: number; /** Last modified timestamp */ lastModified: string; /** File extension */ extension: string; /** Total chunks in file */ totalChunks: number; /** Language (if detected) */ language?: string; }; } /** * Output from RAG file search */ export interface RagFileSearchOutput { /** Search results sorted by relevance */ results: FileSearchResult[]; /** AI-generated summary of findings */ summary: string; /** Total number of files searched */ totalFilesSearched: number; /** Total number of chunks searched */ totalChunksSearched: number; /** Search duration in milliseconds */ searchDuration: number; /** Index statistics */ indexStats: { /** Whether the index was created fresh */ wasReindexed: boolean; /** Number of files indexed */ filesIndexed: number; /** Number of chunks created */ chunksCreated: number; /** Indexing duration in milliseconds */ indexingDuration?: number; }; /** Store information */ storeInfo: { /** Store name */ name: string; /** Store creation timestamp */ createdAt: string; /** Store last updated timestamp */ lastUpdated: string; }; } /** * Summary generation result */ export interface SummaryResult { /** Generated summary */ summary: string; /** Key findings */ keyFindings: string[]; /** Confidence score */ confidence: number; } /** * Supported embedding model types */ export type EmbeddingModel = 'openai' | 'cohere' | 'local' | 'custom'; /** * Supported vector store types */ export type VectorStoreType = 'memory' | 'chromadb' | 'pinecone' | 'qdrant' | 'weaviate'; /** * Search result relevance scoring method */ export type ScoringMethod = 'cosine' | 'euclidean' | 'dot_product'; /** * Store management action types (alias for RAGStoreAction) */ export type StoreAction = RAGStoreAction; /** * Context building strategy */ export type ContextStrategy = 'relevant' | 'recent' | 'comprehensive' | 'focused' | 'custom'; /** * Context source types */ export type ContextSource = 'files' | 'store' | 'memory' | 'combined'; /** * Store info (simplified alias) */ export interface StoreInfo { /** Store name */ name: string; /** Store type */ type: VectorStoreType; /** Number of documents/vectors */ documentCount: number; /** Store size in bytes */ sizeBytes: number; /** Creation timestamp */ createdAt: string; /** Last updated timestamp */ updatedAt: string; /** Embedding model used */ embeddingModel: EmbeddingModel; /** Vector dimensions */ dimensions: number; /** Health status */ status: 'healthy' | 'degraded' | 'error'; } /** * Context chunk for context builder */ export interface ContextChunk { /** Chunk content */ content: string; /** Source information */ source: { type: ContextSource; path?: string; storeName?: string; }; /** Relevance score */ relevance: number; /** Token count estimate */ tokenCount: number; /** Metadata */ metadata?: Record; } /** * Store management input (alias) */ export type RagStoreManageInput = RAGStoreManageInput; /** * Store management output */ export interface RagStoreManageOutput { /** Action performed */ action: StoreAction; /** Whether the action succeeded */ success: boolean; /** Result message */ message: string; /** Store information (for status/list actions) */ stores?: StoreInfo[]; /** Single store info (for status action) */ store?: StoreInfo; /** Index statistics (for index action) */ indexStats?: { filesProcessed: number; documentsAdded: number; errors: number; duration: number; }; } /** * Context builder input (alias with lowercase prefix for backward compatibility) * @deprecated Use RAGContextBuilderInput instead */ export type RagContextBuilderInput = RAGContextBuilderInput; /** * Context builder output for handler (simplified structure) * @deprecated Use RAGContextBuilderOutput for new code - this is maintained for backward compatibility */ export interface RagContextBuilderOutput { /** Built context string */ context: string; /** Individual context chunks */ chunks: ContextChunk[]; /** Total token count estimate */ totalTokens: number; /** Strategy used */ strategy: ContextStrategy; /** Sources used */ sources: ContextSource[]; /** Context quality metrics */ quality?: { relevanceScore: number; diversityScore: number; coverageScore: number; }; } /** * RAG tool handler result */ export interface RagToolResult { /** Whether the operation succeeded */ success: boolean; /** Result data if successful */ data?: T; /** Human-readable message */ message?: string; /** Error message if failed */ error?: string; /** Warnings */ warnings?: string[]; /** Metadata */ metadata?: { duration?: number; timestamp?: string; }; } /** * RAG file search handler type */ export type RagFileSearchHandler = (input: RagFileSearchInput) => Promise>; /** * RAG store manage handler type */ export type RagStoreManageHandler = (input: RagStoreManageInput) => Promise>; /** * RAG context builder handler type */ export type RagContextBuilderHandler = (input: RagContextBuilderInput) => Promise>; /** * RAG tools default configuration */ export interface RagToolsConfig { /** Default vector store type */ defaultStoreType: VectorStoreType; /** Default embedding model */ defaultEmbeddingModel: EmbeddingModel; /** Default vector dimensions */ defaultDimensions: number; /** Default max results for search */ defaultMaxResults: number; /** Default min score threshold */ defaultMinScore: number; /** Default max tokens for context */ defaultMaxTokens: number; /** Default context strategy */ defaultContextStrategy: ContextStrategy; /** Cache settings */ cache: { enabled: boolean; ttlSeconds: number; maxSize: number; }; } //# sourceMappingURL=types.d.ts.map