- Fix legacy.ts: use registerContextEngineForOwner with core owner to
bypass public-sdk protection on default slot
- Add incomplete turn detection in run.ts: surface error when prompt()
resolves prematurely during mid-turn 429 retry producing empty payloads
- Fix TS2367: use correct StopReason union members (toolUse|error)
instead of non-existent end_turn|max_tokens
Fixes issues introduced by PR #47046 (5e293da)