/** * Shell tokenizer slice (diagnostics / trace); planner and executor stay in {@link ./shell.js}. * @param {string} line * @returns {{ type: 'word', value: string }[]} */ export function tokenizeBareShellLineForDiagnostics(line) { const s = String(line || '') /** @type {{ type: 'word', value: string }[]} */ const out = [] const re = /\S+/g let m while ((m = re.exec(s))) { out.push({ type: 'word', value: m[0] }) } return out }