import type { BuiltinWorkflowCatalog } from "./catalog.js"; import type { WorkflowDefinition, WorkflowSource } from "./types.js"; export type DiscoveredWorkflow = { name: string; ref: string; source: "project" | "global" | "builtin" | "path"; }; export type WorkflowSearchPaths = { cwd: string; homeDir?: string; }; export type ResolvedWorkflow = { definition: WorkflowDefinition; source: WorkflowSource; sourceKind: DiscoveredWorkflow["source"]; }; /** Directories scanned for user workflow files, in precedence order. */ export declare function workflowSearchDirs(options: WorkflowSearchPaths): { dir: string; source: "project" | "global"; }[]; /** SHA-256 of a user workflow source file. */ export declare function hashWorkflowSource(filePath: string): Promise; export declare function workflowFileStem(filePath: string): string; /** Load a user workflow module from disk. */ export declare function loadWorkflowFile(filePath: string): Promise; /** Discover user workflows first, then unshadowed catalog built-ins. */ export declare function discoverWorkflows(options: WorkflowSearchPaths, catalog?: BuiltinWorkflowCatalog): Promise; /** Resolve a workflow name, stable built-in ref, or direct user file path. */ export declare function resolveWorkflowRef(ref: string, options: WorkflowSearchPaths, catalog?: BuiltinWorkflowCatalog): Promise; /** Resolve an already persisted canonical source. */ export declare function resolveWorkflowSource(source: WorkflowSource, catalog?: BuiltinWorkflowCatalog, runId?: string): Promise;