import type { MemoryScope } from "./types.js"; /** 序列化 scope 为字符串标识(用于 entry.scope 字段):global | projects/ | sessions/。 */ export declare const serializeScope: (scope: MemoryScope) => string; /** 校验 scope.id 合法(防逃逸)。合法 id 仅含字母数字下划线连字符。 */ export declare function assertSafePath(scope: MemoryScope): void; /** 三级 scope → 目录路径:/global/ | /projects// | /sessions//。 */ export declare function resolveMemoryPath(rootDir: string, scope: MemoryScope): string; /** * 通用 scope 写校验(去 host 的 checkpoint-writer 语义)。纯函数,不碰文件系统。 * target 必须在 memoryRoot 下、必须有合法 scope 前缀、文件名 .md。违例抛带提示的错误。 * target 不在 memoryRoot 下则放行(非 memory 路径)。 */ export declare function assertMemoryWriteAllowed(input: { target: string; memoryRoot: string; scope: MemoryScope; }): void;