import type { InboxItem, SlackInboxItem } from '../../shared/inbox.js'; import { WakeQueueService } from '../inbox/wake-queue.service.js'; import { type ObserveSlackMessageInput, type ObserveSlackMessageResult, type ObservedConversationStore } from '../storage/schema/observed-conversation.store.js'; /** * Stable observation actor when a Slack wake has no userId (shortcut handoffs * over source messages that omit message.user). Must stay constant so dedupe * and prepare lookups remain stable across restart. */ export declare const ACTORLESS_SLACK_WAKE_BOT_ID = "B_ANIMA_SHORTCUT"; export interface CursorWakeJournalBackfillResult { appended: number; examined: number; failed: number; skipped: number; } export interface CursorWakeJournalBackfillInput { agentId: string; logger?: Pick; queue?: WakeQueueService; store?: ObservedConversationStore; } /** * List active Slack wakes and ensure each is present in the observed journal * via the normal deduped `store.observe` path. Safe to call every drain; * already-journaled wakes are no-ops. */ export declare function backfillActiveSlackWakeJournal(input: CursorWakeJournalBackfillInput): Promise; /** * Journal one Slack wake through the normal deduped observation store. * Used by producers (shortcut handoff) and by pre-drain backfill. */ export declare function observeSlackWakeInJournal(input: { agentId: string; item: SlackInboxItem; store?: ObservedConversationStore; throwOnError?: boolean; }): Promise; /** Deterministic conversation order for journal ordinal assignment. */ export declare function compareSlackWakesForBackfill(a: SlackInboxItem, b: SlackInboxItem): number; /** * Build observe input from a queued Slack wake. Prefer actor.userId; when * absent (legal for some shortcut source messages), use a stable botId so * observation and prepare can still complete. */ export declare function observeInputFromSlackWake(item: SlackInboxItem): ObserveSlackMessageInput; export declare function eventIdForSlackWake(item: SlackInboxItem): string; /** Active queue rows only (queued/running); settled items are not listed. */ export declare function isActiveSlackWake(item: InboxItem): item is SlackInboxItem; //# sourceMappingURL=cursor-wake-journal-backfill.d.ts.map