+ - **`summarizeHistory(messages, compress, opts?)`** (core): produces a compression summary for a message slice using the same prompt, attachment/tool-result stripping, and `<summary>` extraction as the in-flight `compress` path. Extracted from `Janitor.executeCompression`, which now delegates to it (behavior-identical). Pure — an empty slice returns `''` without a model call, and it throws on model failure (the Janitor keeps its own circuit breaker + fallback). The `compress` callback must role-flatten tool/assistant-tool-call messages.
0 commit comments