import type { BatchOperation } from '../../../storage/interface.ts'; import type { FailureCategory, TerminationReason, WorkflowTimelineEntry } from '../../types.ts'; import type { EngineInternals } from '../internals.ts'; import { type TerminationCallbacks } from './cleanup.ts'; export declare function cancelWorkflow(internals: EngineInternals, workflowId: string, callbacks: TerminationCallbacks): Promise; export declare function timeoutWorkflow(internals: EngineInternals, workflowId: string, callbacks: TerminationCallbacks): Promise; export declare function terminateWorkflow(internals: EngineInternals, workflowId: string, status: 'cancelled' | 'timed-out', callbacks: TerminationCallbacks, reason?: TerminationReason): Promise; export declare function completeWorkflow(internals: EngineInternals, workflowId: string, result: unknown, callbacks: TerminationCallbacks): Promise; export declare function failWorkflow(internals: EngineInternals, workflowId: string, error: Error, callbacks: TerminationCallbacks, failureCategory?: FailureCategory): Promise; export declare function buildTerminalCleanupTimerOperations(_internals: EngineInternals, workflowId: string, includeOutputArtifacts: boolean, terminalizedAt: number, terminalCleanupToken: string): BatchOperation[]; export declare function ensureTerminalCleanupTracked(internals: EngineInternals, workflowId: string): Promise; export declare function finalizePendingTimelineEntry(internals: EngineInternals, workflowId: string, status: WorkflowTimelineEntry['status'], output: unknown, finishedAt?: number): void; export declare function buildPendingTimelineOperation(internals: EngineInternals, workflowId: string): BatchOperation | null;