import type { RuntimeEventLike } from "@mono-agent/observability"; import type { ContextBlockInput, HistoryMessage } from "../context/index.js"; /** * Appends the recalled-memory block to the user message (after the user's text and * any attachment block applyAttachments already merged in), clearly delimited so * the model reads it as injected background context rather than the user's words. * Returns the message unchanged when there is no memory to inject. */ export declare function composeUserMessageWithMemory(userMessage: string, memory: ContextBlockInput | undefined): string; /** * Builds the synthetic `turn_context` event: what context THIS turn was driven * with. `historyCount` is the number of loaded prior messages (0 when omitted); * `historyOmitted` is true only when a confirmed live warm provider session * carries the transcript, so no host history was replayed. A cold durable reopen * reports the canonical history it loaded (including an authoritative empty * history) because its epoch-owned JSONL may be created on miss. The * `history`/`memory` keys are omitted entirely when empty. Each entry is clamped * for display, flagging `truncated`. The current user message is deliberately NOT * included (it is the run's userInput). */ export declare function buildTurnContextEvent(history: readonly HistoryMessage[], historyOmitted: boolean, memory: ContextBlockInput | undefined, speaker?: SpeakerTurnContextFields): RuntimeEventLike; /** * Speaker attribution for the turn. Deliberately asymmetric with `history`: the * speaker LABEL is recorded, but preceding messages contribute only counts and a * byte size, never their text. Same rationale as the memory diagnostic -- that * transcript is third-party chatter the run does not own, so recording it would * multiply its retention surface for no debugging value that `precedingRendered * < precedingCount` (the "we clipped it" signal) does not already give. The * host-only `sender.id` never appears here either. */ export interface SpeakerTurnContextFields { readonly speaker?: string; readonly precedingCount?: number; readonly precedingRendered?: number; readonly precedingBytes?: number; } //# sourceMappingURL=turn-context.d.ts.map