Files
worldmonitor/shared
Elie Habib 4053a5119a feat(energy): surface coal and TTF gas spot prices in analyst context (#2715)
* feat(intelligence): surface coal and TTF gas spot prices in analyst context

- Add TTF=F (TTF Natural Gas) to scripts/shared/commodities.json after NG=F
- Add coalSpotPrice and gasSpotTtf fields to AnalystContext interface
- Add extractCommodityQuote and buildSpotCommodityLine helpers in chat-analyst-context.ts
- Derive coal (MTF=F) and TTF (TTF=F) from already-fetched commodities bootstrap, no extra Redis calls
- Gate on SPOT_ENERGY_DOMAINS (economic, geo, all)
- Register both fields in SOURCE_LABELS with CoalSpot/GasTTF labels
- Add coalSpotPrice and gasSpotTtf to DOMAIN_SECTIONS for geo and economic in chat-analyst-prompt.ts
- Push Coal Spot Price and TTF Gas Price sections into context when present

* fix(energy): use correct unit for Newcastle coal (/t not /MWh)

buildSpotCommodityLine hardcoded /MWh for all commodities. Coal is
priced per metric ton. Added denominator parameter with /MWh default,
pass /t for Newcastle coal.
2026-04-05 13:29:14 +04:00
..