//#region src/domains/run/workflow/functions/schedulerWorkflow.d.ts
/**
 * Scheduler workflow — single long-lived workflow that ticks every 60 seconds
 * and dispatches all due scheduled triggers.
 *
 * Runs on all environments (Vercel, postgres world, local).
 * On Vercel: restarted by a post-deploy CI step to move onto the latest deployment.
 * On postgres/local: recovers via orphan recovery on server restart.
 *
 * Supersession: registers its run ID in `scheduler_state`. On each tick,
 * checks if it's still the active scheduler. If a newer scheduler has taken
 * over (e.g., deploy restart), this one stops.
 */
declare function _schedulerWorkflow(): Promise<{
  status: string;
  runId: string;
}>;
declare const schedulerWorkflow: typeof _schedulerWorkflow & {
  workflowId: string;
};
//#endregion
export { schedulerWorkflow };