import type { WakeQueueService } from '../inbox/wake-queue.service.js'; import type { AgentRuntime } from '../providers/contract.js'; import type { AgentRuntimeBridge } from './runtime-bridge.js'; import type { RuntimeItemContext, RuntimeWorkerConfig } from './types.js'; import { type CursorDeliveryPlan } from './cursor-delivery.js'; import type { SlackInboxItem } from '../../shared/inbox.js'; export declare const FOLLOWUP_BATCH_MAX_ITEMS = 16; export declare const FOLLOWUP_BATCH_MAX_PROMPT_BYTES: number; interface RuntimeFollowupAppenderInput { activeContext: RuntimeItemContext; agentRuntime: AgentRuntime; /** When true, leave follow-ups queued for a post-reload runtime (config pending). */ isIntakePaused?: () => boolean; /** Test seam: inject a deferred restart-drain probe. */ isRestartDrainActive?: () => Promise; itemDone: AbortSignal; logger: Pick; onFollowupAccepted: () => void; onFollowupAppended: (context: RuntimeItemContext, text: string | undefined) => Promise; onFollowupSettled: (context: RuntimeItemContext) => Promise; queue: WakeQueueService; runtimeBridge: AgentRuntimeBridge; runtimeConfig: RuntimeWorkerConfig; workerId: string; } export declare function appendQueuedFollowupsUntilFinished(input: RuntimeFollowupAppenderInput): Promise; type FollowupUnit = { kind: 'solo'; context: RuntimeItemContext; } | { kind: 'slack_group'; lead: RuntimeItemContext; members: RuntimeItemContext[]; mergedPlan: CursorDeliveryPlan; }; /** * Group Slack cursor contexts that share a primary surface. Merge every exact * surface across the group (channel + each response-thread) rather than picking * one whole plan. Bridge sees one lead context per group (one prompt); members * expand into append/mark item ids after selection. */ export declare function groupFollowupContexts(contexts: RuntimeItemContext[]): { bridgeContexts: RuntimeItemContext[]; units: FollowupUnit[]; }; /** Union files + previews from all group members onto one Slack inbox item. */ export declare function mergeSlackInboxAttachments(members: SlackInboxItem[], base: SlackInboxItem): SlackInboxItem; export {}; //# sourceMappingURL=followup-appender.d.ts.map