view_json now carries real inter-player trades — the headless "simulator provides
everything" goal is met. A player-like the headless adapter sees territory (step 2) AND
trades (this step) from the projected view, no GDScript re-derivation.
- view.rs: DiplomacyView gains trade_deals: Vec<TradeDealView> ({kind, you_receive,
you_give, gold_per_turn}, described from the viewer's perspective; serde skip-if-empty
for wire stability).
- projection.rs build_diplomacy: populates trade_deals from the persisted
state.trade_ledger swap/sale agreements (LuxurySwap/StrategicSwap/ResourceSale) for the
viewer↔counterpart pair, via swap_deal_view/sale_deal_view helpers (correct give/receive
direction; sale gold signed + for seller, − for buyer).
Verified: projection_surfaces_trade_deals_from_ledger (luxury swap direction + sale
buyer/gold); mc-player-api 171/0. (Disk filled mid-step from cargo target — cargo clean
reclaimed 9.5GiB; tests re-run from a clean build.)
p3-25 steps 1-5 DONE: view_json now carries territory + real trades, sourced fully in
Rust. Step 6 (live game adopts the unified PlayerView) reframed as a large separate
follow-on — the headless view-completeness this objective targets is achieved.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>