/** * slice_git — 从 git 历史派生切片事实。 * * 职责边界: * - 负责:从 git log commit message 提取已 committed 的 SLC-NN 集合 + git 可用性探测 * - 不负责:任务阶段推进或审查状态写入 * * 被谁调用:切片进度探针与切片级审查材料收集器 * 调用谁:execa(git) * * 数据流:projectRoot → git log commit messages → committed SLC-NN 集合 + gitAvailable * 持久化:无(纯读取) */ /** getCommittedSlices 返回:committed 切片集合 + git 是否可用(区分"无 SLC commit"与"git 失败")。 */ export interface CommittedSlicesResult { /** 已 committed 的 SLC-NN 集合(commit message 含 "SLC-06" / "SLC-01~04" / "SLC-07/08")。 */ committed: Set; /** git 命令是否成功执行。false = 非 git 项目 / git 命令失败(调用方应降级放行,不误判"全部未完成")。 */ gitAvailable: boolean; } /** * 从单条 commit message 提取 SLC-NN 集合(单值 "SLC-06" + 范围 "SLC-01~04" / "SLC-07/08")。 * getCommittedSlices(聚合所有 commit)与 getSliceChangedFiles(按切片查文件)共用此解析—— * 单源避免双源漂移([[slice-prototype-binding-parsing]] 同源解析陷阱)。 */ export declare function parseSliceRefsFromMessage(message: string): string[]; /** * 从 git log commit message 提取已 committed 的 SLC-NN 集合。 * 支持:单值 "SLC-06"、范围 "SLC-01~04" / "SLC-07/08"(解析逻辑同 parseSliceRefsFromMessage)。 * git 不可用时返回空集 + gitAvailable=false(调用方据此前提降级,不阻断)。 */ export declare function getCommittedSlices(projectRoot: string): Promise; /** getSliceChangedFiles 返回:切片涉及的文件列表 + git 是否可用。 */ export interface SliceChangedFilesResult { /** 该切片 committed 涉及的文件(相对 repo root;commit message 含该 SLC-NN 的所有 commit 文件并集)。 */ files: string[]; /** git 是否成功执行。false = 非 git / git 失败(调用方降级,不阻断)。 */ gitAvailable: boolean; } /** * 取某切片 committed 涉及的文件(commit message 含该 SLC-NN 的所有 commit 的文件变更并集)。 * 切片级对抗审查用——审本切片代码而非全 src/(治"整 code 一次性审"爆炸)。 * git 真相源(同 getCommittedSlices 的 commit message 派生);复用 parseSliceRefsFromMessage 展开范围 commit。 * 支持切片跨多 commit(多次补提交):所有含该 SLC-NN 的 commit 文件并集。 * git 不可用 / 无该切片 commit → 空集 + gitAvailable(调用方降级,不阻断)。 * * core.quotepath=false:防非 ASCII 路径 octal 转义([[regex_scan_chinese_path_octal]])。 */ export declare function getSliceChangedFiles(projectRoot: string, sliceId: string): Promise;