import type { PlatformAdapter, MessageRef } from '../../../platform/index.js'; import type { AgentResult } from '../../../core/types/agent-types.js'; export declare function buildProgressUpdater(adapter: PlatformAdapter, statusMsg: MessageRef, startTime: number, effectiveProfile: string, sessionName: string): (progress: Record | null) => void; export declare function finalizeThreadSuccess(adapter: PlatformAdapter, channel: string, statusMsg: MessageRef | null, { startTime, sessionName, result, threadResult, project, trigger, label, sessionKind, sessionOrigin, statusPrefix, scheduleId }: { startTime: number; sessionName: string; result: AgentResult | null; threadResult: Record; project: string; trigger: string; label: string | null; sessionKind: 'scheduled' | 'local'; /** How the finalized session was initiated: scheduled jobs pass 'scheduled', task-dispatch * threads pass 'thread'. Passed explicitly because sessionKind='local' cannot distinguish * a dispatch thread (origin 'thread') from a direct session. */ sessionOrigin: 'scheduled' | 'thread'; statusPrefix: string; /** ScheduleTask.id whose fire produced this run (scheduled-task job). Persisted on the session * record so the UI can group runs by schedule and render the trigger card. */ scheduleId?: string | null; }): Promise;