Member Junction
    Preparing search index...
    interface CompactionOutcome {
        BoundarySequence?: number;
        ErrorMessage?: string;
        Fired: boolean;
        PromptId?: string;
        PromptRun?: MJAIPromptRunEntity;
        PromptRunId?: string;
        SkippedReason?: string;
        SummaryText?: string;
        TokensAfter?: number;
        TokensBefore: number;
        Warnings: string[];
    }
    Index

    Properties

    BoundarySequence?: number

    The boundary row's Sequence — the new summary covers everything below it

    ErrorMessage?: string

    Set when the attempt failed — the conversation is left untouched

    Fired: boolean

    True when a summary was generated and persisted

    PromptId?: string

    The summary prompt used

    The summary AIPromptRun entity (rollup fields populated by the runner) — threaded into the Compaction run step's transient PromptRun so calculateTokenStats can include the summary sub-call's tokens/cost in the agent run's totals.

    PromptRunId?: string

    The AIPromptRun that produced the summary (also written to ConversationDetail.SummaryPromptRunID)

    SkippedReason?: string

    Why the check was a no-op (only when Fired is false and no error occurred)

    SummaryText?: string

    The generated summary text (so a pre-turn caller can splice it into live messages without a re-fetch)

    TokensAfter?: number

    Estimated window tokens after compaction (new summary + retained tail)

    TokensBefore: number

    Estimated window tokens before compaction

    Warnings: string[]

    Non-fatal notes (e.g. budget clamp) surfaced into the run step's OutputData