import type { WorkflowDefinition } from "../flow/types.ts"; export { WORKFLOW_SUFFIX } from "./load-workflow.ts"; /** A discovered workflow: its installed identity plus metadata loaded for catalog views. */ export interface WorkflowEntry { /** The source filename without `.workflow.ts`; canonical for completion, lookup, and new runs. */ readonly identity: string; /** The definition's authored name. Retained as definition metadata; it is not a command selector. */ 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[]; } /** Cheap, load-free enumeration used by completion and missing-workflow diagnostics. */ export declare function listWorkflowIdentities(projectRoot: string): Promise; /** * 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 ` by explicit TypeScript path or installed filename identity. Declared * definition names are intentionally absent from this namespace: the exact selected file is validated, * loaded once, and its root runtime name is bound to the filename-derived identity. */ export declare function resolveWorkflow(projectRoot: string, arg: string): Promise; //# sourceMappingURL=workflow-catalog.d.ts.map