/**
 * TaskFileLoader — loads task definitions from TypeScript files.
 *
 * Supports `*.task.ts` and `*.task.js` files in task directories. Files
 * are loaded via jiti and expected to export GeneralizedTaskDefinition
 * objects authored with `defineTask()`.
 *
 * TS task files export a single task or an array of tasks:
 *
 * ```typescript
 * // single task
 * import { defineTask } from "@sanity/ailf"
 * export default defineTask({ id: "my-task", mode: "literacy", ... })
 *
 * // multiple tasks
 * export default [
 *   defineTask({ id: "task-1", mode: "literacy", ... }),
 *   defineTask({ id: "task-2", mode: "literacy", ... }),
 * ]
 * ```
 *
 * @see docs/design-docs/architecture-overhaul/typescript-configuration.md
 */
/** A raw task object loaded from a TS file (pre-validation) */
export interface RawTsTask {
    /** Source file path (for error messages) */
    filePath: string;
    /** The loaded task data (may be a single object or an array) */
    tasks: unknown[];
}
/**
 * Discover TS/JS task files in a directory.
 *
 * Looks for files matching `*.task.ts` or `*.task.js`.
 *
 * @param tasksDir - Absolute path to the tasks directory
 * @returns Array of absolute file paths
 */
export declare function discoverTsTaskFiles(tasksDir: string): string[];
/**
 * Load task definitions from a single TS/JS task file.
 *
 * The file's default export can be:
 * - A single task object → wrapped in an array
 * - An array of task objects → used as-is
 *
 * Returns the raw task data without validation — the caller is
 * responsible for running the result through Zod schemas.
 *
 * @param filePath - Absolute path to the .task.ts or .task.js file
 * @returns The loaded task(s), or throws on load failure
 */
export declare function loadTsTaskFile(filePath: string): Promise<RawTsTask>;
/**
 * Synchronously load task definitions from a single TS/JS task file.
 *
 * Uses jiti's synchronous require-style loading instead of async import().
 * Needed by resolve-mappings.ts which is called from sync contexts.
 */
export declare function loadTsTaskFileSync(filePath: string): RawTsTask;
/**
 * Load all TS task files from a directory.
 *
 * @param tasksDir - Absolute path to the tasks directory
 * @returns Array of raw task data from all files
 */
export declare function loadAllTsTaskFiles(tasksDir: string): Promise<RawTsTask[]>;
