/**
 * Task query resolution — supports both inline strings and .txt file paths.
 *
 * When a query is a path to a .txt file, its contents are read and returned.
 * This enables batch/parallel task calls where queries are written to temp files.
 */
import { existsSync, readFileSync } from 'node:fs';
/** Resolve a task query — reads file contents if the query is a .txt path, otherwise returns as-is. */
export function resolveTaskQuery(query) {
    const trimmed = query.trim();
    if (trimmed.endsWith('.txt') && !trimmed.includes(' ') && existsSync(trimmed)) {
        return readFileSync(trimmed, 'utf-8');
    }
    return query;
}
//# sourceMappingURL=query.js.map