acp_thread: Add keyed message updates (#64773)

Stacked on #64765, with `benbrandt/acp-message-updates` as the base
branch.

- Add typed SDK v2 user-message, assistant-message, and thought upserts,
plus keyed chunk appends, using the existing transcript records.
- Keep legacy optional-ID adjacency and optimistic echo behavior
separate. Keyed records retain their first-seen positions; conflicting
message kinds fail before mutation.
- Apply omitted/null/value content and message metadata independently.
Full snapshots replace content; later chunks append. Chunk-envelope
metadata does not patch message metadata.
- Reconcile rendered text runs and preserve compatible Markdown/image
entities. Replacing a message discards only its superseded streaming
cursor.
- Keep read-only user messages synchronized, including empty snapshots,
without resetting selection on metadata-only or identical updates. A
compact source-change token avoids caching another payload copy.

This does not select v2 connections or change prompt acceptance and
turn-completion semantics. Keyed lookup scans the existing records;
there is no second transcript or maintained ID index.

Release Notes:

- N/A
3794e5e979Ben Brandt committed on 9/28/2026, 9:26:37 AM· committed by GitHubparentfa6aeec
5 files changedLine totals unavailable