Skip to content

Graphorin API reference v0.8.0


Graphorin API reference / @graphorin/memory / / PreCompactionHookContext

Interface: PreCompactionHookContext

Defined in: packages/memory/src/context-engine/compaction/types.ts:229

Per-call context handed to a PRE-compaction hook (wave-D D4) - fired BEFORE the summarizer runs, while the full buffer is still available. This is the seam the built-in memoryFlushHook uses to salvage durable facts from content that is about to be summarized away.

Stable

Properties

PropertyModifierTypeDescriptionDefined in
agentIdreadonlystring-packages/memory/src/context-engine/compaction/types.ts:233
messagesreadonlyreadonly Message[]The full pre-compaction buffer (what the summarizer is about to operate on) - the model-visible messages, i.e. post-guardrail content, never the raw blocked turns.packages/memory/src/context-engine/compaction/types.ts:240
runIdreadonlystring-packages/memory/src/context-engine/compaction/types.ts:231
scopereadonlySessionScope-packages/memory/src/context-engine/compaction/types.ts:230
sessionIdreadonlystring-packages/memory/src/context-engine/compaction/types.ts:232
sourcereadonlyCompactionSource-packages/memory/src/context-engine/compaction/types.ts:234