/** * `SmeeDoorbellSource` — SSE consumer for the smee.io channel. Filters * payloads by the epic's ref set and emits `CockpitStreamEvent`s to a * caller-supplied sink. Models the reconnect ladder on * `packages/orchestrator/src/services/smee-receiver.ts`. * * Contract: `specs/978-summary-generacy-cockpit/contracts/smee-doorbell-source.md`. */ import { type CommandRunner, type GhWrapper } from '@generacy-ai/cockpit'; import type { CockpitStreamEvent } from '../watch/stream-event.js'; export declare const DEFAULT_BASE_RECONNECT_DELAY_MS = 5000; export declare const DEFAULT_REFRESH_DEBOUNCE_MS = 500; export declare const DEFAULT_SAFETY_NET_INTERVAL_MS = 600000; export interface SmeeDoorbellSourceOptions { channelUrl: string; epicRef: string; gh: GhWrapper; runner?: CommandRunner; logger: { warn: (msg: string) => void; info?: (msg: string) => void; }; onEvent: (event: CockpitStreamEvent) => Promise; onReconnectAttempt: (failedAttempts: number) => void; onReconnectSuccess: () => void; onSseBytes?: () => void; onRefSetRefreshFailure?: (err: unknown) => void; now?: () => number; fetch?: typeof globalThis.fetch; refreshDebounceMs?: number; safetyNetIntervalMs?: number; baseReconnectDelayMs?: number; } export declare class SmeeDoorbellSource { private readonly channelUrl; private readonly epicRef; private readonly gh; private readonly logger; private readonly onEvent; private readonly onReconnectAttempt; private readonly onReconnectSuccess; private readonly onSseBytes?; private readonly onRefSetRefreshFailure?; private readonly now; private readonly fetchImpl; private readonly refreshDebounceMs; private readonly safetyNetIntervalMs; private readonly baseReconnectDelayMs; private refSet; private aggState; private prev; private currentResolved; private reconnectAttempt; private running; private abortController; private refreshTimer; private refreshDebounceTimer; private aggregateDebounceTimer; private pendingAggregateTrigger; private runLoopPromise; constructor(options: SmeeDoorbellSourceOptions); start(): Promise; stop(): Promise; private sleep; private runLoop; private connect; private processEventBlock; private scheduleRefSetRefresh; private refreshRefSet; private scheduleAggregateRefresh; private runAggregateRefresh; } //# sourceMappingURL=smee-source.d.ts.map