export async function loadTxtFromString(text, { source, metadata } = {}) { const normalized = String(text ?? "").trim(); if (!normalized) return []; return [ { text: normalized, source: source ?? "txt", metadata: metadata ?? null } ]; }