export type SendMessageFn = (larkAppId: string, chatId: string, content: string, msgType?: string, uuid?: string, hookContext?: Record<string, unknown>) => Promise<string>;
export type ReplyMessageFn = (larkAppId: string, messageId: string, content: string, msgType?: string, replyInThread?: boolean, uuid?: string, hookContext?: Record<string, unknown>) => Promise<string>;
export type DispatchPrimaryDeps = {
    sendMessage: SendMessageFn;
    replyMessage: ReplyMessageFn;
};
/** First attachment path that aliases stdin, or null if none do. */
export declare function findStdinAliasAttachment(paths: readonly string[]): string | null;
export type SendFileAttachmentsDeps = {
    uploadFile: (appId: string, path: string) => Promise<string>;
    dispatch: (content: string, msgType: string) => Promise<string>;
};
export type SendFileAttachmentsResult = {
    sent: string[];
    failed: {
        path: string;
        error: string;
    }[];
};
/**
 * Upload + post each file as its own message, best-effort. By the time this
 * runs the primary message has already been delivered, so a failure on one
 * attachment must NOT throw: letting it bubble would make the caller report
 * total failure (exit 1) for an already-sent message, which drives resends and
 * duplicates. Collect failures so the caller can surface them as a warning
 * while still reporting the primary send as the success it was.
 */
export declare function sendFileAttachments(deps: SendFileAttachmentsDeps, appId: string, files: readonly string[]): Promise<SendFileAttachmentsResult>;
export type DispatchPrimaryOptions = {
    appId: string;
    targetChatId: string;
    quoteTargetId: string | null | undefined;
    content: string;
    msgType: string;
    hookContext: Record<string, unknown>;
    MessageWithdrawnError: new (...args: any[]) => Error;
    dispatch: (content: string, msgType: string) => Promise<string>;
    onQuoteWithdrawn?: (messageId: string) => void;
};
export type DispatchPrimaryResult = {
    messageId: string;
    primaryQuotedId: string | null;
};
export declare function dispatchPrimaryMessage(deps: DispatchPrimaryDeps, opts: DispatchPrimaryOptions): Promise<DispatchPrimaryResult>;
//# sourceMappingURL=send-dispatch.d.ts.map