chat: broadcast chat-stream events + add talent-log endpoint (lode 3a)
Wrap append_chat_event so every persisted event broadcasts on a new
"chat" tract after the write commits. Broadcast failure is swallowed
and does not roll back the durable append.
Add GET /api/chat/talent-log/<use_id>: reads active or completed talent
JSONL, derives status from tail event (running/completed/errored),
returns task + started_at + finished_at + events.
Decisions:
- Tract for UI events: new "chat" tract (keeps raw cortex process events
separate from reduced chat-stream UI events).
- Talent-log endpoint: new /api/chat/talent-log/<use_id> rather than
reusing /app/sol/api/run/<use_id> (sol route 202s on active runs with
no events; chat modal needs live-mode playback).
Cleanup:
- Delete _display_mode() + the "display" field on cortex/finish proxy
emits and on /api/chat/result/<use_id>. No legacy-mode branch in
inbound data. Ban _display_mode in the legacy-chat guard test.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>