Commit Graph

18 Commits

Author SHA1 Message Date
Elie Habib
79d5cf8bb8 security: upgrade @anthropic-ai/sdk 0.79.0 -> 0.82.0 + audit fix (#2846)
Closes GHSA-54m3-95j9-v89j (HIGH) for @anthropic-ai/sdk.
npm audit fix also resolves lodash/lodash-es HIGH CVEs
(GHSA-r5fr-rjxr-66jc, GHSA-f23m-r3pf-42rh).

Co-authored-by: Winston9520 <143687718+Winston9520@users.noreply.github.com>
2026-04-09 08:50:33 +04:00
Elie Habib
9a0f265db3 chore(scripts): replace xlsx with exceljs (#2575)
* chore(scripts): replace xlsx with exceljs

xlsx has known vulnerabilities with no patched version available.
exceljs is actively maintained (~6M weekly downloads) and covers
the same read-only parsing needs in seed-fuel-prices.mjs and
backfill-fuel-prices-prev.mjs.

* fix(scripts): handle ExcelJS Date cells and add Czechia mapping

ExcelJS returns Date objects for date cells (unlike xlsx which returned
raw strings). Convert to DD/MM/YYYY format to preserve downstream regex
parsing. Also add 'Czechia' alias to EU country map since the EU XLSX
now uses the short form instead of 'Czech Republic' (27/27 countries).

* fix(scripts): handle ExcelJS rich-text cell values

ExcelJS returns {richText: [{text: '...'}]} for formatted cells.
String() on these produces '[object Object]', breaking header
detection regex. Extract plain text from rich-text arrays.
2026-03-31 13:09:21 +04:00
Elie Habib
79ec6e601b feat(prefs): Phase 0 — sync primitives and notification scaffolding (#2503) 2026-03-29 13:57:34 +04:00
Elie Habib
004d866f01 fix(fear-greed): add undici to scripts/package.json (ERR_MODULE_NOT_FOUND on Railway) (#2197) 2026-03-24 16:42:32 +04:00
Elie Habib
4936577186 chore(scripts): bump version to 1.1.1 to trigger Railway seed rebuild (#2174) 2026-03-24 08:26:34 +04:00
Elie Habib
dc74ed69e7 fix(fuel-prices): add xlsx to scripts/package-lock.json (#2153)
* fix(fuel-prices): add xlsx to scripts/package-lock.json so npm ci succeeds

* chore(pre-push): detect scripts/package-lock.json out-of-sync with package.json
2026-03-23 21:12:36 +04:00
Elie Habib
d60de13362 fix(sanctions): add sax to scripts/package.json + raise consumer-prices health thresholds (#2033)
Sanctions seed has been failing since PR #2008 with:
  ERR_MODULE_NOT_FOUND: Cannot find package 'sax'
PR #2008 replaced fast-xml-parser with SAX streaming but only updated
the root package.json, not scripts/package.json which is the Railway
container manifest. Railway runs npm ci from scripts/ so sax was never
installed. Add sax ^1.6.0 and remove the now-unused fast-xml-parser.

Also raise consumer-prices SEED_META maxStaleMin from 90-120 to 1500 min.
publish.ts runs once daily at 02:30 UTC; all five consumer-prices keys
were permanently STALE_SEED for 22+ hours/day after the daily run.
1500 min (25h) = 24h cadence + 1h grace before warning.
2026-03-22 08:48:55 +04:00
Elie Habib
aaf4c60b3e chore(deps): bump fast-xml-parser to 5.5.8 and Tauri to 2.10.3 (#1930) 2026-03-20 17:46:41 +04:00
Elie Habib
39a479629b fix(r2): add s3 client to scripts runtime (#1831)
* fix(r2): add s3 client to scripts runtime

* fix(r2): update scripts lockfile for s3 client
2026-03-19 00:51:54 +04:00
Elie Habib
80134e3306 fix(sanctions): add fast-xml-parser to Railway scripts deps (#1755)
seed-sanctions-pressure.mjs imports fast-xml-parser to parse OFAC SDN
XML feeds, but the package was never added to scripts/package.json.
Railway deploys crash with ERR_MODULE_NOT_FOUND on startup.
2026-03-17 13:01:12 +04:00
Elie Habib
4353c20637 feat(widgets): AI widget builder with live WorldMonitor data (#1732) 2026-03-17 09:23:04 +04:00
Elie Habib
adc9c462de fix(scripts): sync package-lock.json with h3-js dependency (#1257) 2026-03-08 09:00:45 +04:00
Elie Habib
d6c9176213 Revert "fix(scripts): sync package-lock.json with h3-js dependency (#1254)" (#1256)
This reverts commit 4816e27d3c.
2026-03-08 08:57:20 +04:00
Elie Habib
4816e27d3c fix(scripts): sync package-lock.json with h3-js dependency (#1254)
* Add premium stock analysis for finance variant

* fix(scripts): sync package-lock.json with h3-js dependency

Railway npm ci requires lock file in sync with package.json.

* fix(market): narrow undefined check for TS strict null safety
2026-03-08 08:45:12 +04:00
Elie Habib
0e58b17237 fix(relay): regenerate package-lock.json with telegram dependency (#522)
The lockfile was missing resolved entries for the telegram package,
causing Railway to skip installation despite it being in package.json.
2026-02-28 14:25:32 +04:00
Elie Habib
5c6660aef0 Revert "fix(relay): regenerate package-lock.json with telegram dependency"
This reverts commit b0fbd89066.
2026-02-28 14:16:08 +04:00
Elie Habib
b0fbd89066 fix(relay): regenerate package-lock.json with telegram dependency
The lockfile was missing resolved entries for the telegram package,
causing Railway to skip installation despite it being in package.json.
2026-02-28 14:13:58 +04:00
Elie Habib
07d0803014 Add WTO trade policy intelligence service with tariffs, flows, and barriers (#364)
* feat: add WTO trade policy service with 4 RPC endpoints and TradePolicyPanel

Adds a new `trade` RPC domain backed by the WTO API (apiportal.wto.org) for
trade policy intelligence: quantitative restrictions, tariff timeseries,
bilateral trade flows, and SPS/TBT barrier notifications.

New files: 6 protos, generated server/client, 4 server handlers + shared WTO
fetch utility, client service with circuit breakers, TradePolicyPanel (4 tabs),
and full API key infrastructure (Rust keychain, sidecar, runtime config).

Panel registered for FULL and FINANCE variants with data loader integration,
command palette entry, status panel tracking, data freshness monitoring, and
i18n across all 17 locale files.

https://claude.ai/code/session_01HZXyoQp6xK3TX8obDzv6Ye

* chore: update package-lock.json

https://claude.ai/code/session_01HZXyoQp6xK3TX8obDzv6Ye

* fix: move tab click listener to constructor to prevent leak

The delegated click handler was added inside render(), which runs
on every data update (4× per load cycle). Since the listener targets
this.content (a persistent container), each call stacked a duplicate
handler. Moving it to the constructor binds it exactly once.

https://claude.ai/code/session_01HZXyoQp6xK3TX8obDzv6Ye

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-02-25 10:50:12 +00:00