import type { StartStep } from "@uncaged/nerve-core"; /** Runtime may include threadId before types catch up in published nerve-core. */ export function threadIdFromStart(start: StartStep): string { const m = start.meta as { threadId?: string }; return typeof m.threadId === "string" && m.threadId.length > 0 ? m.threadId : "unknown"; }