/**
 * Extra message variants that only appear within a live session, plus the
 * routine that collapses an AgentMessage list into the plain Message list a
 * model can read.
 *
 * The base AgentMessage union is widened (via declaration merging) with four
 * session-only kinds — recorded shell runs, extension-supplied entries, and the
 * two flavours of summary (branch and compaction). The transformer below knows
 * how each of those, as well as the ordinary kinds, becomes an LLM Message.
 */
import type { AgentMessage } from "./types.js";
import type { ImageContent, Message, TextContent } from "../ml/index.js";
export declare const COMPACTION_SUMMARY_PREFIX = "Earlier turns in this conversation were condensed. Here is the recap that replaces them:\n\n<summary>\n";
export declare const COMPACTION_SUMMARY_SUFFIX = "\n</summary>";
export declare const BRANCH_SUMMARY_PREFIX = "Recap of a side branch that the conversation has since returned from:\n\n<summary>\n";
export declare const BRANCH_SUMMARY_SUFFIX = "</summary>";
/**
 * One shell command captured from the inline `!` entry point.
 */
export interface BashExecutionMessage {
    role: "bashExecution";
    command: string;
    output: string;
    exitCode: number | undefined;
    cancelled: boolean;
    truncated: boolean;
    fullOutputPath?: string;
    timestamp: number;
    /** Set by the `!!` form to suppress this entry from the model context. */
    excludeFromContext?: boolean;
}
/**
 * Content an extension dropped into the conversation through sendMessage().
 * This is the vehicle extensions use to inject their own material into the
 * ongoing dialogue.
 */
export interface CustomMessage<T = unknown> {
    role: "custom";
    customType: string;
    content: string | (TextContent | ImageContent)[];
    display: boolean;
    details?: T;
    timestamp: number;
}
export interface BranchSummaryMessage {
    role: "branchSummary";
    summary: string;
    fromId: string;
    timestamp: number;
}
export interface CompactionSummaryMessage {
    role: "compactionSummary";
    summary: string;
    tokensBefore: number;
    timestamp: number;
}
declare module "./types.js" {
    interface CustomAgentMessages {
        bashExecution: BashExecutionMessage;
        custom: CustomMessage;
        branchSummary: BranchSummaryMessage;
        compactionSummary: CompactionSummaryMessage;
    }
}
/**
 * Turn a captured shell run into the user-message text shown to the model.
 */
export declare function bashExecutionToText(msg: BashExecutionMessage): string;
export declare function createBranchSummaryMessage(summary: string, fromId: string, timestamp: string): BranchSummaryMessage;
export declare function createCompactionSummaryMessage(summary: string, tokensBefore: number, timestamp: string): CompactionSummaryMessage;
/** Reconstruct a CustomMessage (the in-memory AgentMessage form) from saved entry fields. */
export declare function createCustomMessage(customType: string, content: string | (TextContent | ImageContent)[], display: boolean, details: unknown | undefined, timestamp: string): CustomMessage;
/**
 * Reduce an AgentMessage list (session-only kinds included) to the plain
 * Message list the model accepts. Anything a translator maps to `undefined`
 * is removed from the result.
 *
 * Reached from:
 * - the Agent's convertToLlm hook, used for prompts and queued input
 * - compaction summarization
 * - extensions and tools wanting a model-ready view
 */
export declare function convertToLlm(messages: AgentMessage[]): Message[];
