import type { AnyActivityDefinition } from '../types.ts'; import { type EngineCleanupIntervalDisposalTracker } from './engine-leak-warnings.ts'; import type { Engine } from './index.ts'; import { type EngineInternals } from './internals.ts'; import type { SecondInstanceDetector } from './second-instance-detector.ts'; export declare function isActivityDefinition(value: unknown): value is AnyActivityDefinition; type EngineCreateBackgroundTaskOptions = { backgroundTasks?: 'automatic' | 'manual' | undefined; recover?: boolean | undefined; startScheduler?: boolean | undefined; }; export declare function validateEngineCreateBackgroundTaskOptions(options: EngineCreateBackgroundTaskOptions): void; export declare function shouldStartEngineScheduler(options: EngineCreateBackgroundTaskOptions, backgroundTaskMode: 'automatic' | 'manual'): boolean; export declare function createQueuedInlineWorkflowStartHandler(weakEngine: WeakRef>, channel: MessageChannel): () => void; /** * Drain pending inline launches for `engine` before teardown. Built with the * same inline-launch-queue callbacks as the scheduled flush handler so a drained * start advances identically to a normally-flushed one. Called from * `[Symbol.asyncDispose]` ahead of synchronous disposal (which aborts the signal * and would otherwise discard the queue). */ export declare function drainQueuedInlineWorkflowStartsForEngine(engine: Engine, options?: { abortStartedWorkflows?: boolean; }): Promise; export declare function createCleanupIntervalTick(weakEngine: WeakRef>, tracker: EngineCleanupIntervalDisposalTracker): () => void; /** * Build the resolver the second-instance detection interval uses to find its live * detector. Returns `null` when the engine has been garbage-collected or disposed * (so the tick is skipped), otherwise the engine's current detector. Extracted * here — like {@link createCleanupIntervalTick} — so the deref/disposed guard is * directly testable without driving a real interval. */ export declare function createSecondInstanceDetectorResolver(weakEngine: WeakRef>): () => SecondInstanceDetector | null; export declare function disposeEngineCleanupInterval(internals: EngineInternals): void; export {};