import type { WorkflowConfig } from '../../../core/models/index.js';
export type WorkflowSource = 'builtin' | 'user' | 'project' | 'repertoire';
export interface WorkflowDirEntry {
    name: string;
    path: string;
    category?: string;
    source: WorkflowSource;
}
export interface WorkflowDiscoveryConfig {
    name: string;
    description?: string;
    subworkflow?: WorkflowConfig['subworkflow'];
}
export interface WorkflowWithSource<Config extends WorkflowConfig | WorkflowDiscoveryConfig = WorkflowDiscoveryConfig> {
    config: Config;
    source: WorkflowSource;
}
export type WorkflowDiscoveryWithSource = WorkflowWithSource<WorkflowDiscoveryConfig>;
interface LoadWorkflowsOptions {
    onWarning?: (message: string) => void;
}
interface WorkflowLookupDir {
    dir: string;
    source: WorkflowSource;
    disabled?: string[];
}
interface ValidatedWorkflowEntry<Config extends WorkflowConfig | WorkflowDiscoveryConfig> {
    entry: WorkflowDirEntry;
    config: Config;
}
type WorkflowEntryLoader<Config extends WorkflowConfig | WorkflowDiscoveryConfig> = (entry: WorkflowDirEntry, cwd: string) => Config;
export declare function iterateWorkflowDir(dir: string, source: WorkflowSource, disabled?: string[]): Generator<WorkflowDirEntry>;
export declare function listWorkflowNamesInDir(dir: string, source: WorkflowSource, disabled?: string[]): string[];
export declare function listBuiltinWorkflowNamesForDir(dir: string, disabled?: string[]): string[];
export declare function listRepertoireWorkflowEntries(): WorkflowDirEntry[];
export declare function collectValidatedWorkflowEntries<Config extends WorkflowConfig | WorkflowDiscoveryConfig>(entries: Iterable<WorkflowDirEntry>, cwd: string, options?: LoadWorkflowsOptions, workflowEntryLoader?: WorkflowEntryLoader<Config>, includeInternalWorkflows?: boolean): ValidatedWorkflowEntry<Config>[];
export declare function loadAllWorkflowsWithSourcesFromDirs<Config extends WorkflowConfig | WorkflowDiscoveryConfig>(cwd: string, dirs: WorkflowLookupDir[], options?: LoadWorkflowsOptions, workflowEntryLoader?: WorkflowEntryLoader<Config>, includeInternalWorkflows?: boolean): Map<string, WorkflowWithSource<Config>>;
export {};
//# sourceMappingURL=workflowDiscovery.d.ts.map