UNPKG

aico-pack

Version:

A tool to pack repository contents to single file for AI consumption

61 lines 1.99 kB
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; /** * Search options for grep functionality */ interface SearchOptions { pattern: string; contextLines: number; beforeLines: number; afterLines: number; ignoreCase: boolean; } /** * Search match result */ interface SearchMatch { lineNumber: number; line: string; matchedText: string; } /** * Search result containing matches and formatted output */ interface SearchResult { matches: SearchMatch[]; formattedOutput: string[]; } /** * Register the tool to search Repomix output files with grep-like functionality */ export declare const registerGrepRepomixOutputTool: (mcpServer: McpServer) => void; /** * Create and validate a regular expression pattern */ export declare const createRegexPattern: (pattern: string, ignoreCase: boolean, deps?: { RegExp: RegExpConstructor; }) => RegExp; /** * Search for pattern matches in file content */ export declare const searchInContent: (content: string, options: SearchOptions, deps?: { createRegexPattern: (pattern: string, ignoreCase: boolean, deps?: { RegExp: RegExpConstructor; }) => RegExp; }) => SearchMatch[]; /** * Format search results with separate before and after context lines */ export declare const formatSearchResults: (lines: string[], matches: SearchMatch[], beforeLines: number, afterLines: number) => string[]; /** * Perform grep-like search on content */ export declare const performGrepSearch: (content: string, options: SearchOptions, deps?: { searchInContent: (content: string, options: SearchOptions, deps?: { createRegexPattern: (pattern: string, ignoreCase: boolean, deps?: { RegExp: RegExpConstructor; }) => RegExp; }) => SearchMatch[]; formatSearchResults: (lines: string[], matches: SearchMatch[], beforeLines: number, afterLines: number) => string[]; }) => SearchResult; export {}; //# sourceMappingURL=grepRepomixOutputTool.d.ts.map