import type { WorkflowDefinition } from "../flow/types.ts"; /** The file suffix that marks a workflow module inside the workflows directory. */ export declare const WORKFLOW_SUFFIX = ".workflow.ts"; /** A discovered workflow: what `/workflow list` shows and what a name resolves to. */ export interface WorkflowEntry { readonly name: string; readonly description?: string; readonly filePath: string; } /** A file in the workflows directory that failed to load — surfaced rather than silently skipped. */ export interface BrokenWorkflow { readonly filePath: string; readonly error: string; } export interface WorkflowCatalog { readonly entries: readonly WorkflowEntry[]; readonly broken: readonly BrokenWorkflow[]; } /** * Load every workflow in the project's workflows directory, sorted by name. A file that throws is * reported in `broken` instead of failing the whole catalog — one unparseable workflow must not make * `/workflow list` useless. A missing directory is simply an empty catalog. */ export declare function discoverWorkflows(projectRoot: string): Promise; /** A resolved workflow, or a human-readable reason it could not be resolved. */ export type WorkflowResolution = { ok: true; workflow: WorkflowDefinition; filePath: string; } | { ok: false; error: string; }; /** * Resolve `/workflow run ` to a workflow: a filesystem path first, then a declared name from the * catalog. Path wins so an explicit file always beats a coincidental name match; the name path only * runs when the argument does not name a loadable file. Three strategies, tried in order — an explicit * `.ts` path, the `.workflow.ts` convention, then a full catalog scan — each its own helper below. */ export declare function resolveWorkflow(projectRoot: string, arg: string): Promise; //# sourceMappingURL=workflow-catalog.d.ts.map