Member Junction
    Preparing search index...

    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.

    Index

    Constructors

    Methods

    • Resolves 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).

      Parameters

      • agent: MJAIAgentEntityExtended

        The executing agent

      • agentType: MJAIAgentTypeEntity

        The agent's type (null for typeless programmatic runs)

      • modelMaxInputTokens: number

        The selected model's MaxInputTokens when known, else null

      Returns EffectiveContextBudget