/**
 * Validation logic for knowledge probe task definitions.
 */
/**
 * Validate that a knowledge probe task definition has all required fields.
 */
export function validateKnowledgeProbeTask(task) {
    const errors = [];
    if (!task.id) {
        errors.push({ field: "id", message: "Task ID is required" });
    }
    if (!task.title) {
        errors.push({ field: "title", message: "Task title is required" });
    }
    // Knowledge probes must have either a prompt or a description
    if (!task.prompt?.text && !task.prompt?.vars?.task && !task.description) {
        errors.push({
            field: "prompt",
            message: "Knowledge probe tasks require either prompt.text, prompt.vars.task, " +
                "or description — the question to ask the model",
        });
    }
    return errors;
}
