Build the summary nodes with a model
The compactor is the Summarizer of the memory core. Each build is a call
like a turn, with the same system prompt, tools, and cache key, so it
reads the prompt cache of the turns and never calls a tool. The input is
one user message with the compaction view up to the node and the task:
the leaf or merge text of the reference design with the 512-dash ruler.
A line over 512 bytes gets another try with the same view and task plus
only the newest note, which gives its size and its cut at the limit. The
model's earlier reply and reasoning never go back, so each try has the
same cached prefix and about the same size. After at most five tries the
shortest line is the node. A call that fails before any line fails the
build, and the core tries it again at the next message. The model and
effort come from the compactor settings of config.json.
Issue:
b14d537