Skip to content

Graphorin API reference v0.1.0


Graphorin API reference / @graphorin/memory / / CompactionSummarizer

Interface: CompactionSummarizer

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

Summarizer adapter — accepts a prompt and returns the produced summary. The Phase 06 Provider adapters implement this signature; tests pass a deterministic stub. The summarizer adapter is intentionally narrow so the compaction subsystem does not take the heavier Provider dependency directly.

Stable

Properties

PropertyModifierTypeDefined in
id?readonlystringpackages/memory/src/context-engine/compaction/types.ts:152

Methods

summarize()

ts
summarize(input): Promise<{
  text: string;
  usageTokens?: number;
}>;

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

Produce a summary text for the supplied prompt. The prompt is built by the compactor using the configured 9-section template; the adapter is responsible for invoking the underlying LLM.

Parameters

ParameterType
input{ model?: string | ModelSpec; prompt: string; signal?: AbortSignal; timeoutMs?: number; }
input.model?string | ModelSpec
input.promptstring
input.signal?AbortSignal
input.timeoutMs?number

Returns

Promise<{ text: string; usageTokens?: number; }>