/************************** * Workflow DSL Builder * * Main factory function for creating durable workflows **************************/ import type { Schema } from "../../extensions/schema/index.js"; import type { ScheduleIntegrationRequirementConfig } from "../../schedule/types.js"; import type { RetryConfig, StepBuilderContext, Workflow, WorkflowContext, WorkflowNode } from "../types.js"; export type { Workflow } from "../types.js"; /** Options accepted by workflow. */ export interface WorkflowOptions { id: string; description?: string; version?: string; inputSchema?: Schema; outputSchema?: Schema; /** Explicit integration scopes and resources required by scheduled runs. */ integrationRequirements?: ScheduleIntegrationRequirementConfig[]; retry?: RetryConfig; timeout?: string | number; introspect?: boolean; steps: WorkflowNode[] | ((context: StepBuilderContext) => WorkflowNode[]); onError?: (error: Error, context: WorkflowContext) => void | Promise; onComplete?: (result: TOutput, context: WorkflowContext) => void | Promise; } /** Create a workflow definition. */ export declare function workflow(options: WorkflowOptions): Workflow; /** Create a sequential workflow definition. */ export declare function sequence(...nodes: WorkflowNode[]): WorkflowNode[]; type DagNodeInput = WorkflowNode | { node: WorkflowNode; dependsOn: string[]; }; /** Create a directed workflow graph. */ export declare function dag(nodes: Record): WorkflowNode[]; /** Declare workflow step dependencies. */ export declare function dependsOn(node: WorkflowNode, ...dependencies: string[]): WorkflowNode; //# sourceMappingURL=workflow.d.ts.map