/**
 * Custom-role agent messages — extension point for app-owned message kinds
 * (compaction summaries, system notices) that ride alongside user/assistant/tool
 * entries but are projected into a plain user turn for the LLM.
 */
export const CANCELLATION_BOUNDARY_CUSTOM_TYPE = 'cancellationBoundary';
export const CANCELLATION_BOUNDARY_CONTENT = 'The previous ShortcutXL run was cancelled by the user before it completed. Do not continue the interrupted operation unless the user explicitly asks.';
/** Produce the post-compaction summary marker the reducer renders inline. */
export function createCompactionSummaryMessage(summary, tokensBefore, timestamp) {
    return {
        role: 'custom',
        customType: 'compactionSummary',
        content: summary,
        display: true,
        details: { tokensBefore },
        timestamp: new Date(timestamp).getTime()
    };
}
export function createCancellationBoundaryMessage(timestamp) {
    return {
        role: 'custom',
        customType: CANCELLATION_BOUNDARY_CUSTOM_TYPE,
        content: CANCELLATION_BOUNDARY_CONTENT,
        display: false,
        details: { reason: 'user_cancelled' },
        timestamp: new Date(timestamp).getTime()
    };
}
/** Generic constructor for app-defined custom messages. */
export function createCustomMessage(customType, content, display, details, timestamp) {
    return {
        role: 'custom',
        customType,
        content,
        display,
        details,
        timestamp: new Date(timestamp).getTime()
    };
}
//# sourceMappingURL=custom-messages.js.map