/** * Durable identity for the user-visible assistant reply of an explicit VC * `im_turn`. The first canonical output wins; exact crash replays reuse the * same provider UUID, while changed replays reuse the first durable output. */ import type { VcMeetingImTurnOrigin, VcMeetingListenerOutputPlacement } from '../types.js'; import { type VcMeetingActionRef } from './vc-meeting-action-store.js'; export declare const VC_MEETING_LISTENER_PROVIDER_DEDUP_SAFE_MS: number; export interface VcMeetingImReplyCanonicalOutput { targetChatId: string; quoteTargetId?: string; placement?: VcMeetingListenerOutputPlacement; msgType: string; content: string; } export type VcMeetingImReplyPrepareResult = { kind: 'send'; providerKey: string; ref: VcMeetingActionRef; replay: boolean; /** True only when the provider UUID may already have been accepted. The * caller must suppress a second outbound hook while reconciling it. */ providerReplay: boolean; /** Always the first durable output, even when this replay proposed text * that differs. Callers must send this value, never their new proposal. */ canonicalOutput: VcMeetingImReplyCanonicalOutput; outputMismatch: boolean; } | { kind: 'succeeded'; providerKey: string; ref: VcMeetingActionRef; messageId?: string; /** A missing legacy provider ref is reconciled with an already-used UUID; * do not emit the outbound hook again if a provider call is required. */ providerReplay: true; canonicalOutput: VcMeetingImReplyCanonicalOutput; outputMismatch: boolean; } | { kind: 'conflict'; reason: 'invalid_origin' | 'output_mismatch' | 'invalid_state'; detail: string; }; export interface VcMeetingDeliveryReplyOrigin { receiverSessionId: string; stableTurnId: string; dispatchAttempt: number; } export declare function prepareVcMeetingImReply(dataDir: string, origin: VcMeetingImTurnOrigin, canonicalOutput: VcMeetingImReplyCanonicalOutput, now?: number): VcMeetingImReplyPrepareResult; /** * Durable identity for the automatic listener-thread reply of one delivery. * The identity is the stable delivery key (not dispatchAttempt), so a crash * replay reuses the same provider UUID and first canonical output. */ export declare function prepareVcMeetingDeliveryReply(dataDir: string, origin: VcMeetingDeliveryReplyOrigin, canonicalOutput: VcMeetingImReplyCanonicalOutput, now?: number): VcMeetingImReplyPrepareResult; export declare function finishVcMeetingImReply(dataDir: string, ref: VcMeetingActionRef, messageId: string, now?: number): void; //# sourceMappingURL=vc-meeting-im-reply.d.ts.map