import type { AiChangeInfoPush, AiChatMessage, EditorClientMethods } from "@superblocksteam/library-shared/types";
import type { ChatSessionStore } from "../../chat/chat-session-store.js";
import type { Clark } from "../clark-fsm.js";
export declare const sendInteractiveMessageChannel: (clark: Clark, chatSessionStore: ChatSessionStore) => (payload: AiChatMessage, delay?: number, immediate?: boolean) => Promise<{
    success: boolean;
    message: string;
} | {
    success: boolean;
    message?: undefined;
}>;
/**
 * Options for {@link sendUserMessageChannel}.
 *
 * `persistBeforeDeliver` is best-effort ordering, NOT a durability guarantee.
 * When `true`, the queued operation awaits `recordAssistant` before calling
 * `aiPushMessage`.  On write failure we log and continue to peer delivery —
 * the message is NOT guaranteed persisted when it reaches the client.
 *
 * Use this when the caller needs ordering (for example, to beat a downstream
 * full-reload that re-reads messages from the server) and can tolerate silent
 * loss if persistence fails.  Do NOT use it as a "durable send" primitive.
 */
export type SendUserMessageOptions = {
    persistBeforeDeliver?: boolean;
};
export declare const sendUserMessageChannel: (clark: Clark, chatSessionStore: ChatSessionStore) => (payload: AiChatMessage, delay?: number, immediate?: boolean, { persistBeforeDeliver }?: SendUserMessageOptions) => Promise<unknown>;
export declare const sendUserGenerationStateChannel: (clark: Clark) => (payload: Parameters<EditorClientMethods["aiSetGenerationState"]>[0]) => Promise<void>;
/**
 * Clears the pendingToolPermissionRequest from the FSM context and notifies the
 * UI so it removes any stale permission prompt from the chat.
 */
export declare const clearPendingToolPermissionRequest: (clark: Clark) => void;
export declare const sendChangeInfoChannel: (clark: Clark, chatSessionStore: ChatSessionStore) => (payload: AiChangeInfoPush, delay?: number) => Promise<unknown>;
//# sourceMappingURL=peer.d.ts.map