Member Junction
    Preparing search index...

    Type Alias AgentChatMessageMetadata

    Typed metadata for agent conversation messages. Extends ChatMessage to provide agent-specific metadata for message lifecycle management.

    type AgentChatMessageMetadata = {
        canExpand?: boolean;
        compactLength?: number;
        compactMode?: "First N Chars" | "AI Summary";
        compactPromptId?: string;
        conversationDetailId?: string;
        expirationMode?: "None" | "Remove" | "Compact";
        expirationTurns?: number;
        isConversationSummary?: boolean;
        isExpired?: boolean;
        messageType?:
            | "action-result"
            | "client-tool-result"
            | "tool-result"
            | "loop-result"
            | "sub-agent-result"
            | "skill-activation"
            | "skill-activation-refused"
            | "chat"
            | "system"
            | "user";
        originalContent?: ChatMessage["content"];
        originalLength?: number;
        sequence?: number;
        subAgentId?: string;
        subAgentName?: string;
        summaryBoundarySequence?: number;
        tokensSaved?: number;
        turnAdded?: number;
        wasCompacted?: boolean;
    }
    Index

    Properties

    canExpand?: boolean

    Whether this message can be expanded back to original

    compactLength?: number

    Number of characters to keep when using 'First N Chars' mode

    compactMode?: "First N Chars" | "AI Summary"

    Mode for compacting expired messages

    compactPromptId?: string

    Prompt ID to use for AI Summary compaction

    conversationDetailId?: string

    ID of the ConversationDetail row this message came from (window-assembled messages only)

    expirationMode?: "None" | "Remove" | "Compact"

    Mode for handling expired messages

    expirationTurns?: number

    Number of turns after which this message expires

    isConversationSummary?: boolean

    True only on the synthetic first message carrying the persisted cross-turn conversation summary

    isExpired?: boolean

    Whether this message has expired

    messageType?:
        | "action-result"
        | "client-tool-result"
        | "tool-result"
        | "loop-result"
        | "sub-agent-result"
        | "skill-activation"
        | "skill-activation-refused"
        | "chat"
        | "system"
        | "user"

    Type of message (for lifecycle management and logging)

    originalContent?: ChatMessage["content"]

    Original content before compaction (for expansion)

    originalLength?: number

    Original length in characters before compaction

    sequence?: number

    ConversationDetail.Sequence of the row this message came from. Stamped by ConversationEngine.AssembleContextWindow (kept assignment-compatible with its locally-defined ConversationContextMetadata — that package cannot import this type without creating a cycle). The symbolic handle for conversation-history retrieval tools.

    subAgentId?: string

    ID of the sub-agent (only for sub-agent-result messages)

    subAgentName?: string

    Name of the sub-agent (only for sub-agent-result messages)

    summaryBoundarySequence?: number

    On the summary message: the boundary row's Sequence — the summary covers all rows below it

    tokensSaved?: number

    Number of tokens saved by compaction

    turnAdded?: number

    Turn number when this message was added to the conversation

    wasCompacted?: boolean

    Whether this message has been compacted