/**
 * Runtime-message translation — converts the internal `AgentMessage[]`
 * transcript into the LLM-facing `Message[]` shape and the cross-boundary
 * `AgentSnapshot` consumed by host clients.
 */
import type { Message } from '../ai/types.js';
import { AgentStopReason, type AgentSnapshot } from '../contracts/agent-snapshot.js';
import type { AgentErrorKind, AgentMessage, InFlightOp } from './core-types.js';
/**
 * Single source of truth: is this `AgentMessage` projected as a `role:'user'` LLM message?
 *
 * Used by both:
 *   - `convertAgentMessagesToLlm` (to decide what shape to emit)
 *   - `hasPriorUserEquivalent` in `embedded-agent/compose.ts` (to decide whether the
 *     context-update warning should fire)
 *
 * Per §25 spec § Simplifying assumption #6: the warning fires whenever the
 * transcript contains an entry that the projector treats as a user turn. Keeping
 * one predicate ensures the two callers can never drift.
 */
export declare function projectsAsUserRole(message: AgentMessage): boolean;
/** Project the agent transcript into an LLM-ready message list, repairing orphan tool calls. */
export declare function convertAgentMessagesToLlm(messages: AgentMessage[]): Message[];
export interface AgentSnapshotInputs {
    sessionId: string;
    messages: readonly AgentMessage[];
    isStreaming: boolean;
    stopReasonOverride?: AgentStopReason;
    errorKind?: AgentErrorKind;
    inFlight?: readonly InFlightOp[];
    /** Active run id; undefined when no run is in progress. */
    runId?: string;
    /** Optional per-message session-entry ids; lock-step with `messages`. */
    messageEntryIds?: readonly (string | undefined)[];
}
/** Build a structured-clone-safe `AgentSnapshot` from the current transcript. */
export declare function createAgentSnapshotFromAgentMessages(inputs: AgentSnapshotInputs): AgentSnapshot;
//# sourceMappingURL=agent-snapshot-builder.d.ts.map