import type { ConversationEvent, MessagingEventHandler, OfficeAddress } from "../types.js"; import type { Office } from "../office/types.js"; import type { ChatResponseErrorContext, ChatResponseErrorReporter, IncomingAttachment, RetryOptions, ResolveStopTargetInput, SavedAttachments, QueueAdmission } from "./types.js"; export declare function createChatResponseErrorReporter(resolve: () => Omit): ChatResponseErrorReporter; export declare class MessagingIntakeTracker { private readonly name; private accepting; private active; constructor(name: string); run(work: () => Promise | void): Promise; close(): Promise; } export declare const MAX_PENDING_EVENTS = 5; export declare class MessagingEventQueue { private readonly name; private queue; private processing; private accepting; private drainWaiters; constructor(name?: string); enqueue(work: () => Promise): boolean; admit(work: () => Promise): QueueAdmission; size(): number; offerEvent(event: ConversationEvent, work: () => Promise): boolean; close(): Promise; private processNext; } export declare function withRetry(fn: () => Promise, opts: RetryOptions): Promise; export declare function splitText(text: string, limit: number, formatContinuation: (partNum: number) => string): string[]; export declare function saveIncomingAttachments(office: Office, items: readonly IncomingAttachment[]): Promise; export declare function resolveStopTarget(input: ResolveStopTargetInput): string | null; export declare function resolveOnlyScopedStopTarget(handler: MessagingEventHandler, address: OfficeAddress): string | null; export declare const MAX_ATTACHMENT_BYTES: number; export declare class AttachmentRejectedError extends Error { } export declare function writeResponseToFile(response: Response, destPath: string, maxBytes?: number): Promise; export declare function downloadUrlToFile(url: string, destPath: string): Promise; export declare function shortNameToUnicodeEmoji(emoji: string): string; //# sourceMappingURL=shared.d.ts.map