Phase 4 of Context Management Engine - Assembly Pipeline: - Add TruncationStrategy with end/middle/sentence-aware truncation - Add TruncationResult dataclass for tracking compression metrics - Add ContextCompressor for type-specific compression - Add ContextPipeline orchestrating full assembly workflow: - Token counting for all contexts - Scoring and ranking via ContextRanker - Optional compression when budget threshold exceeded - Model-specific formatting (XML for Claude, markdown for OpenAI) - Add PipelineMetrics for performance tracking - Update AssembledContext with new fields (model, contexts, metadata) - Add backward compatibility aliases for renamed fields Tests: 34 new tests, 223 total context tests passing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
13 lines
198 B
Python
13 lines
198 B
Python
"""
|
|
Context Assembly Module.
|
|
|
|
Provides the assembly pipeline and formatting.
|
|
"""
|
|
|
|
from .pipeline import ContextPipeline, PipelineMetrics
|
|
|
|
__all__ = [
|
|
"ContextPipeline",
|
|
"PipelineMetrics",
|
|
]
|