/** 规则文件 */ export interface AgentRuleFile { filename: string; title: string; content: string; } /** 选择规则文件的回答 */ export interface SelectAgentRulesAnswer { files: string[]; } /** 获取默认规则文件的参数 */ export interface GetDefaultAgentRuleFilesParams { rules: AgentRuleFile[]; originalContent?: string; } /** 选择规则文件的参数 */ export interface SelectAgentRuleFilesParams { rules: AgentRuleFile[]; defaultFiles: string[]; } /** 判断路径是否存在 */ export declare function pathExists(path: string): Promise; /** 根据固定顺序排序规则文件 */ export declare function sortAgentRuleFiles(files: string[]): string[]; /** 标准化标题用于匹配 */ export declare function normalizeMarkdownHeading(heading: string): string; /** 获取 Markdown 标题 */ export declare function getMarkdownHeadings(content: string, level: number): string[]; /** 获取 Markdown 一级标题 */ export declare function getMarkdownFirstHeading(content: string): string; /** 将远程 Markdown 规则转换为 AGENTS.md 内容 */ export declare function transformMarkdownRuleToAgentsRule(source: string): string; /** 获取远程根目录中的 Markdown 规则文件名 */ export declare function getMarkdownRuleFilenames(): Promise; /** 读取远程规则文件 */ export declare function readAgentRuleFiles(files: string[]): Promise; /** 读取原始 AGENTS.md */ export declare function readOriginalAgentsMd(): Promise; /** 获取默认勾选的规则文件 */ export declare function getDefaultAgentRuleFiles(params: GetDefaultAgentRuleFilesParams): string[]; /** 选择要同步的规则文件 */ export declare function selectAgentRuleFiles(params: SelectAgentRuleFilesParams): Promise; /** 同步 AGENTS.md 规则 */ export declare function syncAgentsMdRules(rules: AgentRuleFile[]): Promise; export declare function asyncAgentRules(): Promise;