import type { AgentMessage } from '@earendil-works/pi-agent-core'; import type { ImageContent } from '@earendil-works/pi-ai'; import type { Config } from '../../config/schema.js'; import { type MediaRef } from '../../channels/attachments/inbound-persist.js'; import type { AgentInstanceGateway } from '../agent-instance-gateway.js'; export type TranscriptUserMessage = AgentMessage & { media?: MediaRef[]; MediaPath?: string; MediaPaths?: string[]; MediaTypes?: string[]; }; export type LlmUserTurn = { text: string; images: ImageContent[]; }; export declare function assertTranscriptUserMessage(message: AgentMessage): void; /** * Build the transcript row for a user turn (text + media metadata only). */ export declare function buildTranscriptUserMessage(opts: { text: string; prepared: MediaRef[] | undefined; sessionKey: string; modelRef: string; config: Config | undefined; agentManager: AgentInstanceGateway; }): Promise; /** Hydrate images from media store for the current LLM prompt. */ export declare function hydrateUserTurnForLlm(opts: { message: TranscriptUserMessage; modelRef: string; }): Promise; export declare function setPendingTranscriptUserMessage(sessionKey: string, message: TranscriptUserMessage): void; export declare function takePendingTranscriptUserMessage(sessionKey: string): TranscriptUserMessage | undefined; export declare function clearPendingTranscriptUserMessage(sessionKey: string, message?: TranscriptUserMessage): void; export declare function pendingTranscriptReferencesMediaUri(sessionKey: string, uri: string): boolean; export declare function transformUserMessageForPersistence(sessionKey: string | undefined, message: AgentMessage): AgentMessage;