From cf2eedb85bac17f0507777025b608ed8634fae8e Mon Sep 17 00:00:00 2001 From: GRayHook Date: Wed, 17 Jun 2026 12:01:36 +0700 Subject: [PATCH] =?UTF-8?q?Phase=208:=20add=20compaction=20runtime=20state?= =?UTF-8?q?=20=E2=80=94=20pendingCompactionSource=20container=20for=20?= =?UTF-8?q?=C2=A78.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Transient CompactionRuntime holds pending source between input, before_compact, and session_compact hooks. Co-authored-by: Cursor --- src/compaction.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/compaction.ts diff --git a/src/compaction.ts b/src/compaction.ts new file mode 100644 index 0000000..6bf2ff4 --- /dev/null +++ b/src/compaction.ts @@ -0,0 +1,12 @@ +import type { CompactionSource } from "./state.js"; + +/** Runtime compaction-source detection between input → before_compact → session_compact (SPEC §8). */ +export interface CompactionRuntime { + pendingCompactionSource: CompactionSource | null; +} + +export function createCompactionRuntime(): CompactionRuntime { + return { + pendingCompactionSource: null, + }; +}