import type { DreamKind } from "./types"; import { sha256Hex } from "./hash"; /** * 会话级沉淀文件名:每个会话(scopeKey,含 runId)每种类型固定一个文件, * 便于同会话重复提取时用确定性文件名覆盖旧文件。 */ export function buildSessionDreamDocFileName( kind: DreamKind, scopeKey: string, ): string { return `dream-${kind}-${sha256Hex(scopeKey).slice(0, 16)}.md`; }