import type { ControllerStore } from "./store.js"; import type { ChildWorkflowRecord, ChildWorkflowState, ControllerResource, ControllerWorkflows } from "./types.js"; export type WorkflowSchedulerRequest = { requestId: string; attempt: number; workflow: string; input: unknown; runId: string; }; export type WorkflowSchedulerResult = { state: ChildWorkflowState; runId?: string; error?: string; }; export interface ControllerWorkflowScheduler { ensure(request: WorkflowSchedulerRequest, signal: AbortSignal, onComplete: (result: WorkflowSchedulerResult) => void): Promise; } export declare class ControllerWorkflowCoordinator { private readonly store; private readonly scheduler?; constructor(store: ControllerStore, scheduler?: ControllerWorkflowScheduler | undefined); forResource(resource: ControllerResource, signal: AbortSignal): ControllerWorkflows; complete(requestId: string, result: WorkflowSchedulerResult): ChildWorkflowRecord; private ensure; private enqueueParent; private recordEvent; }