SIGN IN SIGN UP

Live-run fixes: middleware interop, Anthropic message rules, build loop

Found by running the airplane acceptance prompt live on Fable 5 (all
red-green tested, 44 pytest green):

- Bump copilotkit 0.1.78 -> 0.1.94 + ag-ui-langgraph -> >=0.0.38: 0.1.78's
  CopilotKitMiddleware crashes (TypeError) serializing the AG-UI Context
  pydantic models the canonical frontend now sends as agent context
- New src/anthropic_compat.py ConsecutiveSystemMessagesMiddleware:
  (1) reorders the middleware's "App Context" SystemMessage (appended after
  the human turn by the add_messages reducer) to the head — Anthropic rejects
  non-consecutive system messages; (2) repairs streamed zero-length thinking
  blocks missing the "thinking" field, which Anthropic 400s on tool-loop
  replay
- Prompt: generateSandboxedUi at most once per request — the followUp run
  returning "UI generated" caused Fable to rebuild the widget in a loop
  (observed 5+ rebuilds; legacy useComponent rail had no followUp runs)
- .claude/launch.json for the preview server

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
G
GeneralJerel committed
6bee3512d085fabb0cde290f8ecef626c9ebcefb
Parent: a264f3a