import { EventLog } from './events/append.js';
import type { RunLoopResult } from './loop.js';
import type { WorkflowRuntimeContext } from './runtime.js';
import { type ColdWorkflowRun } from './cold-scan.js';
export type ColdWorkflowWatcherHandle = {
    ready?: Promise<unknown>;
};
export type AttachColdWorkflowRunsOptions = {
    runsDir: string;
    ownerLarkAppId: string;
    isAttached?: (runId: string) => boolean;
    makeContext: (run: ColdWorkflowRun, log: EventLog) => WorkflowRuntimeContext;
    attachWatcher: (runId: string, ctx: WorkflowRuntimeContext) => ColdWorkflowWatcherHandle;
    driveRun: (runId: string, ctx: WorkflowRuntimeContext) => Promise<RunLoopResult>;
    awaitDrive?: boolean;
    onSkip?: (runId: string, reason: string) => void;
    onAttached?: (run: ColdWorkflowRun) => void;
    onDriveError?: (runId: string, err: unknown) => void;
};
export type AttachColdWorkflowRunsResult = {
    discovered: number;
    attached: string[];
};
/**
 * Daemon cold-start attach path: scan persisted runs owned by this Lark app,
 * attach fan-out watchers, then kick the runtime loop so recovery can settle
 * dangling effects / crashed workers.
 */
export declare function attachColdWorkflowRunsForDaemon(opts: AttachColdWorkflowRunsOptions): Promise<AttachColdWorkflowRunsResult>;
//# sourceMappingURL=cold-attach.d.ts.map