import type { AgentContext } from "../schema.js"; /** v15.x PR2(§8.3):cache 文件名 __.agent-context.md, * sanitize 非法字符为 _(pack 名已是 kebab-case 通常不需要;profile 名可能含特殊字符)。 */ declare function cacheFileName(packName: string, profileName: string): string; /** 把 AgentContext IR 序列化并写入 /__.agent-context.md。 * 文件头:source-hash: (缓存失效依据)+ pack: 。 */ export declare function saveAgentContext(cwd: string, ctx: AgentContext): Promise; /** 读 /__.agent-context.md 并校验 sourceHash。 * - 文件不存在 → 触发 §9.4.1 旧缓存清理:检测旧名 .agent-context.md → 删除 → 返 null(重编译) * - 文件存在但 hash 不一致 → 返 null(需重编译覆盖) * - 命中 → 返 AgentContext IR * v15.x PR2(§8.3):签名加 packName 参数;旧名 .agent-context.md 自动清理迁移。 */ export declare function loadAgentContext(cwd: string, packName: string, name: string, expectedHash: string): Promise; /** v15.x PR2(§8.3):导出 cacheFileName 给测试用。 */ export { cacheFileName };