Skip to main content

Module compaction

Module compaction 

Source
Expand description

Task-aware pruning strategy for tool output eviction.

Provides relevance scoring, subgoal tracking, density classification, and focus auto-consolidation. These types and functions are used by the crate::service::ContextService summarization path and are referenced from zeph-core via re-export.

Structs§

BlockScore
Per-message relevance score used by task-aware and MIG pruning.
Subgoal
A tracked subgoal with message span.
SubgoalExtractionResult
Output of a background subgoal extraction LLM call.
SubgoalId
Unique identifier for a subgoal within a session.
SubgoalRegistry
In-memory registry of all subgoals in the current session.

Enums§

ContentDensity
Density classification for a message or segment.
SubgoalState
Lifecycle state of a subgoal.

Functions§

classify_density
Classify a message’s content density.
extract_scorable_text
Extract text content from a message suitable for scoring.
partition_by_density
Partition messages into (high-density, low-density) groups.
run_focus_auto_consolidation
Automatically consolidate low-relevance context into a knowledge-block summary.
score_blocks_mig
Score blocks using MIG (relevance − redundancy) with temporal partitioning.
score_blocks_subgoal
Score each tool-output message block by subgoal tier membership.
score_blocks_subgoal_mig
Score tool-output blocks using subgoal tiers combined with MIG redundancy.
score_blocks_task_aware
Score each tool-output message block against the task goal.