DeepSeek V4 sometimes expresses a tool call as its internal DSML markup
instead of filling `tool_calls`, and Qoder's gateway leaks the tag skeleton
rather than converting it. When no structured call arrives the turn used to
end as an empty `stop` and the agent stopped mid-task with no error.
Handle both shapes:
- Filter the delimited form (`||DSML||tool_calls` ...) on the reasoning and
content channels, rebuilding a complete block into a structured call.
- Strip the delimiter-less form the gateway leaves behind
(`<parameter name="command">…</parameter>`, `</invoke>`, `</tool_calls>`,
a stray `</thinking>`) line-wise before the empty-turn guard reads the
message, and make `hasVisibleText` ignore markup-only text. That form used
to land in the *content* channel as a normal reply, so the guard saw
visible text and never fired.
A turn that produces only leaked markup now fails with a retryable error
(matching pi's "ended without" pattern) instead of ending silently.