import { type WorkflowTodoEventFeed } from "../work-items/workflow-event-feed.js"; import { type JsonValue } from "./model.js"; import { type WorkflowRepository } from "./repository.js"; import type { WorkflowRunDetail } from "./runtime.js"; import type { WorkflowRunner } from "./runner.js"; export interface FireWorkflowEventInput { eventName: string; fireId: string; payload: Record; } export declare class WorkflowTriggerService { private readonly repository; private readonly runner; private readonly now; private readonly schedules; private readonly todos; private readonly feed; constructor(repository: WorkflowRepository, runner: WorkflowRunner, now?: () => string, feed?: WorkflowTodoEventFeed); dispose(): void; rebuild(): void; fire(input: FireWorkflowEventInput): Promise; recoverTodoEvents(): Promise; /** A Todo whose label stood down leaves a backlog of unclaimed events behind, * and restoring the label makes all of them qualify at once — six runs on one * Todo in half a minute. For each (Todo, definition) only the newest * qualifying event runs. `listPendingEvents` hands them back oldest first, so * walking backwards makes the first sighting of a key the winner. */ private supersededDefinitions; private enabledDefinitions; private addSchedule; private fireSchedule; private fireTodo; /** Which definitions a newer event has already taken this Todo's lane for. * The pending page answers this for siblings still waiting their turn; it * cannot answer it for one that has already run, because a settled event is * no longer pending — and past the page's own limit it cannot answer it at * all. A deferral released after either kind of sibling would otherwise see * an empty gate and start a second run on a lane already running. */ private supersededForEvent; /** Why nothing may start on this event yet, or undefined when a run may. The * filters have already had their say; these are the three things that stop a * fire this late, and they all refuse the whole event rather than one * definition of it. */ private refusalBeforeStart; private start; } //# sourceMappingURL=trigger-service.d.ts.map