StaticCompactChecks the conversation's assembled window against the trigger budget and, when
crossed, runs the summary prompt (input = prior summary + raw delta only — the
recursive pattern) and persists the result on the boundary row. Never throws for
business failures — returns an outcome with ErrorMessage and leaves the
conversation untouched, so a failed compaction simply re-triggers next turn.
StaticResolveResolves the effective context budget for a run.
MaxTokens: Agent.ContextWindowMaxTokens || AgentType.ContextWindowMaxTokens || modelMaxInputTokens || 8000, then clamped to modelMaxInputTokens when the
configured value exceeds it (never silently exceed the model — the clamp is
surfaced via ClampedToModel for the caller to log). Percents:
Agent || AgentType || framework default (|| by design — zero is not a valid
value for any of these knobs, and NULL means inherit).
The executing agent
The agent's type (null for typeless programmatic runs)
The selected model's MaxInputTokens when known, else null
Owns cross-turn (Tier A) conversation compaction: budget resolution, trigger math, boundary selection, the summary prompt run, and the durable boundary-row write. Stateless aside from an in-process re-entrancy guard; all entry points are static.