import type { InferSchema, Schema } from "../../extensions/schema/index.js"; import type { ChatUiMessage } from "../../chat/types.js"; import { type ConversationRunProjection } from "./durable.js"; /** Record shape for conversation. */ export interface ConversationRecord { id: string; projectId: string | null; } /** Zod schema for get conversation record. */ export declare const getConversationRecordSchema: () => Schema; /** Schema for conversation record. * @deprecated Use getConversationRecordSchema() */ export declare const ConversationRecordSchema: Schema; /** Zod schema for get conversation message record. */ export declare const getConversationMessageRecordSchema: () => Schema; }>>; /** Schema for conversation message record. * @deprecated Use getConversationMessageRecordSchema() */ export declare const ConversationMessageRecordSchema: Schema; }>>; /** Record shape for conversation message. */ export type ConversationMessageRecord = InferSchema>; /** Error shape for conversation control plane response. */ export interface ConversationControlPlaneResponseError { status: number; statusText: string; body: string; } /** Public API contract for persist conversation user message failure. */ export interface PersistConversationUserMessageFailure extends ConversationControlPlaneResponseError { conversationId: string; messageId: string; } /** Record shape for fetch conversation. */ export declare function fetchConversationRecord(input: { authToken: string; apiUrl: string; conversationId: string; }): Promise; /** Ensure conversation project link helper. */ export declare function ensureConversationProjectLink(input: { authToken: string; apiUrl: string; conversationId: string; projectId: string; }): Promise; /** Record shape for create conversation. */ export declare function createConversationRecord(input: { authToken: string; apiUrl: string; body: unknown; }): Promise; /** Message shape for create conversation. */ export declare function createConversationMessage(input: { authToken: string; apiUrl: string; conversationId: string; body: unknown; operation?: string; onResponseError?: (error: ConversationControlPlaneResponseError) => void; }): Promise; /** Message shape for persist conversation user. */ export declare function persistConversationUserMessage(input: { authToken: string; apiUrl: string; conversationId: string; message: ChatUiMessage; parentMessageId?: string; operation?: string; onFailure?: (failure: PersistConversationUserMessageFailure) => void; }): Promise; /** Context for find latest user conversation message. */ export declare function findLatestUserConversationMessageContext(messages: ChatUiMessage[]): { latestUserMessage: ChatUiMessage | undefined; visibleParentMessageId?: string; }; /** Message shape for persist latest conversation user. */ export declare function persistLatestConversationUserMessage(input: { authToken: string; apiUrl: string; conversationId?: string; messages: ChatUiMessage[]; enabled: boolean; operation?: string; missingUserMessageErrorMessage?: string; onFailure?: (failure: PersistConversationUserMessageFailure) => void; }): Promise; /** Result returned from bootstrap conversation agent run. */ export interface BootstrapConversationAgentRunResult { conversation: ConversationRecord; message: ConversationMessageRecord; run: ConversationRunProjection; } /** Bootstrap conversation agent run helper. */ export declare function bootstrapConversationAgentRun(input: { authToken: string; apiUrl: string; parentConversationId?: string; ensureProjectId?: string; conversationBody: unknown; handoffMessageBody: unknown; runId?: string; parentRunId?: string; agentId: string; implementationKind?: string | null; projectId?: string | null; runtimeTargetKind?: "main_branch" | "environment" | "preview_branch" | null; runtimeTargetEnvironmentId?: string | null; branchId?: string | null; }): Promise; //# sourceMappingURL=bootstrap.d.ts.map