Skip to main content

Module microcompact

Module microcompact 

Source
Expand description

Pure helpers for time-based microcompact (#2699).

The Agent-level integration (reading self.*, mutating message history) lives in zeph-core. This module contains only the stateless helpers.

Enums§

CompactTarget
Index into a message’s parts list identifying which part to compact.

Constants§

CLEARED_SENTINEL_PREFIX
Sentinel content placed in cleared tool outputs.
LOW_VALUE_TOOLS
Tool names whose output is considered low-value after a session gap.

Functions§

find_preceding_tool_use_name
Returns the tool name from the closest preceding ToolUse part, if any.
is_low_value_tool
Returns true if tool_name (case-insensitive) is in the low-value set.
sweep_stale_tool_outputs
Sweep stale low-value tool outputs from the message list.