import type { SlackAdapter } from './slack.js'; import type { OutputStream, MutableRegion, OpenOutputStreamOpts } from '../output-stream.js'; import type { MessageRef, RichBlock, ActionElement, Destination } from '../types.js'; /** * Test-only: override retry delays to skip real wall-clock waits. * Pass [] for no retries, [0,0,0,0] to keep 4-attempt retry semantics with no wait. * Production code must never call this. */ export declare function _testSetRetryDelays(delays: readonly number[]): void; /** Test-only: restore production retry delays. */ export declare function _testResetRetryDelays(): void; export declare class SlackOutputStream implements OutputStream { private adapter; private destination; private threadId; private onMessagePosted; private maxChunk; private durable; /** Readable label for log messages, extracted from the Destination kind. */ private get _logChannel(); private parentRef; private currentRef; private currentContent; private mutableTail; private allRefs; private queue; private lastError; /** Generation counter for MutableRegion staleness tracking. * Incremented every time openMutable is called or a seal event occurs. */ private _regionGeneration; constructor(adapter: SlackAdapter, destination: Destination, opts?: OpenOutputStreamOpts); emitText(text: string): void; openMutable(text: string): MutableRegion; postInteractive(text: string, opts?: { richBlocks?: RichBlock[]; actions?: ActionElement[]; }): Promise; flush(): Promise; getRefs(): MessageRef[]; getParentRef(): MessageRef | null; /** Called by SlackMutableRegion.update(). No-op if the generation is stale. */ _regionUpdate(generation: number, text: string): void; /** Return a no-op region for empty text. */ private _noopRegion; private _processAppend; private _processOpenMutable; private _processEditMutableTail; /** Combined display = currentContent [+ SEP + mutableTail]. */ private _renderWithTail; /** Synchronously move mutableTail into currentContent. */ private _sealMutableTailNow; private _postNew; private _postOne; private _updateCurrent; }