euparliamentmonitor 0.9.15 → 0.9.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +2 -2
  2. package/package.json +6 -6
  3. package/scripts/aggregator/analysis-aggregator.d.ts +1 -131
  4. package/scripts/aggregator/analysis-aggregator.js +41 -434
  5. package/scripts/aggregator/article-generator.d.ts +6 -187
  6. package/scripts/aggregator/article-generator.js +33 -728
  7. package/scripts/aggregator/article-html.d.ts +24 -155
  8. package/scripts/aggregator/article-html.js +30 -1133
  9. package/scripts/aggregator/article-metadata.d.ts +9 -250
  10. package/scripts/aggregator/article-metadata.js +43 -1961
  11. package/scripts/aggregator/clean/dedupe-mermaid.d.ts +18 -0
  12. package/scripts/aggregator/clean/dedupe-mermaid.js +87 -0
  13. package/scripts/aggregator/clean/demote-headings.d.ts +15 -0
  14. package/scripts/aggregator/clean/demote-headings.js +101 -0
  15. package/scripts/aggregator/clean/pipeline.d.ts +38 -0
  16. package/scripts/aggregator/clean/pipeline.js +58 -0
  17. package/scripts/aggregator/clean/rewrite-links.d.ts +33 -0
  18. package/scripts/aggregator/clean/rewrite-links.js +238 -0
  19. package/scripts/aggregator/clean/strip-banners.d.ts +16 -0
  20. package/scripts/aggregator/clean/strip-banners.js +82 -0
  21. package/scripts/aggregator/clean/strip-frontmatter.d.ts +14 -0
  22. package/scripts/aggregator/clean/strip-frontmatter.js +21 -0
  23. package/scripts/aggregator/clean/strip-preamble.d.ts +23 -0
  24. package/scripts/aggregator/clean/strip-preamble.js +62 -0
  25. package/scripts/aggregator/clean/strip-spdx.d.ts +16 -0
  26. package/scripts/aggregator/clean/strip-spdx.js +45 -0
  27. package/scripts/aggregator/clean-artifact.d.ts +31 -160
  28. package/scripts/aggregator/clean-artifact.js +13 -634
  29. package/scripts/aggregator/generator/cli.d.ts +57 -0
  30. package/scripts/aggregator/generator/cli.js +186 -0
  31. package/scripts/aggregator/generator/discovery.d.ts +38 -0
  32. package/scripts/aggregator/generator/discovery.js +37 -0
  33. package/scripts/aggregator/generator/reader-guide-insertion.d.ts +28 -0
  34. package/scripts/aggregator/generator/reader-guide-insertion.js +61 -0
  35. package/scripts/aggregator/generator/render-batch.d.ts +21 -0
  36. package/scripts/aggregator/generator/render-batch.js +30 -0
  37. package/scripts/aggregator/generator/render-one.d.ts +39 -0
  38. package/scripts/aggregator/generator/render-one.js +392 -0
  39. package/scripts/aggregator/generator/slug.d.ts +37 -0
  40. package/scripts/aggregator/generator/slug.js +80 -0
  41. package/scripts/aggregator/html/analysis-index-cards.d.ts +19 -0
  42. package/scripts/aggregator/html/analysis-index-cards.js +219 -0
  43. package/scripts/aggregator/html/headline.d.ts +53 -0
  44. package/scripts/aggregator/html/headline.js +86 -0
  45. package/scripts/aggregator/html/hreflang.d.ts +29 -0
  46. package/scripts/aggregator/html/hreflang.js +56 -0
  47. package/scripts/aggregator/html/localize-body.d.ts +36 -0
  48. package/scripts/aggregator/html/localize-body.js +136 -0
  49. package/scripts/aggregator/html/shell.d.ts +71 -0
  50. package/scripts/aggregator/html/shell.js +254 -0
  51. package/scripts/aggregator/html/toc.d.ts +48 -0
  52. package/scripts/aggregator/html/toc.js +114 -0
  53. package/scripts/aggregator/html/tradecraft-cards.d.ts +105 -0
  54. package/scripts/aggregator/html/tradecraft-cards.js +350 -0
  55. package/scripts/aggregator/metadata/artifact-highlight.d.ts +57 -0
  56. package/scripts/aggregator/metadata/artifact-highlight.js +796 -0
  57. package/scripts/aggregator/metadata/h1-extractor.d.ts +10 -0
  58. package/scripts/aggregator/metadata/h1-extractor.js +33 -0
  59. package/scripts/aggregator/metadata/heading-rules.d.ts +94 -0
  60. package/scripts/aggregator/metadata/heading-rules.js +474 -0
  61. package/scripts/aggregator/metadata/lede-extractor.d.ts +42 -0
  62. package/scripts/aggregator/metadata/lede-extractor.js +205 -0
  63. package/scripts/aggregator/metadata/resolve-helpers.d.ts +91 -0
  64. package/scripts/aggregator/metadata/resolve-helpers.js +247 -0
  65. package/scripts/aggregator/metadata/slug.d.ts +17 -0
  66. package/scripts/aggregator/metadata/slug.js +25 -0
  67. package/scripts/aggregator/metadata/template-fallback.d.ts +23 -0
  68. package/scripts/aggregator/metadata/template-fallback.js +212 -0
  69. package/scripts/aggregator/metadata/types.d.ts +75 -1
  70. package/scripts/aggregator/reader-guide/builder.d.ts +29 -0
  71. package/scripts/aggregator/reader-guide/builder.js +59 -0
  72. package/scripts/aggregator/reader-guide/icons.d.ts +14 -0
  73. package/scripts/aggregator/reader-guide/icons.js +48 -0
  74. package/scripts/aggregator/reader-guide/labels.d.ts +19 -0
  75. package/scripts/aggregator/reader-guide/labels.js +88 -0
  76. package/scripts/aggregator/reader-guide/rows-core.d.ts +14 -0
  77. package/scripts/aggregator/reader-guide/rows-core.js +413 -0
  78. package/scripts/aggregator/reader-guide/rows-extended.d.ts +12 -0
  79. package/scripts/aggregator/reader-guide/rows-extended.js +277 -0
  80. package/scripts/aggregator/reader-guide/rows-types.d.ts +13 -0
  81. package/scripts/aggregator/reader-guide/rows-types.js +4 -0
  82. package/scripts/aggregator/reader-guide/rows.d.ts +11 -0
  83. package/scripts/aggregator/reader-guide/rows.js +9 -0
  84. package/scripts/aggregator/reader-guide/strip.d.ts +17 -0
  85. package/scripts/aggregator/reader-guide/strip.js +22 -0
  86. package/scripts/aggregator/reader-intelligence-guide.d.ts +17 -60
  87. package/scripts/aggregator/reader-intelligence-guide.js +4 -874
  88. package/scripts/aggregator/run/analysis-index.d.ts +11 -0
  89. package/scripts/aggregator/run/analysis-index.js +34 -0
  90. package/scripts/aggregator/run/index.d.ts +14 -0
  91. package/scripts/aggregator/run/index.js +16 -0
  92. package/scripts/aggregator/run/manifest.d.ts +51 -0
  93. package/scripts/aggregator/run/manifest.js +62 -0
  94. package/scripts/aggregator/run/provenance.d.ts +23 -0
  95. package/scripts/aggregator/run/provenance.js +39 -0
  96. package/scripts/aggregator/run/reader-guide.d.ts +22 -0
  97. package/scripts/aggregator/run/reader-guide.js +131 -0
  98. package/scripts/aggregator/run/section-expansion.d.ts +20 -0
  99. package/scripts/aggregator/run/section-expansion.js +37 -0
  100. package/scripts/aggregator/run/tradecraft.d.ts +30 -0
  101. package/scripts/aggregator/run/tradecraft.js +105 -0
  102. package/scripts/config/article-horizons.d.ts +24 -143
  103. package/scripts/config/article-horizons.js +2 -473
  104. package/scripts/config/horizons/artifact-paths.d.ts +72 -0
  105. package/scripts/config/horizons/artifact-paths.js +140 -0
  106. package/scripts/config/horizons/forward-projection.d.ts +35 -0
  107. package/scripts/config/horizons/forward-projection.js +72 -0
  108. package/scripts/config/horizons/lookup.d.ts +30 -0
  109. package/scripts/config/horizons/lookup.js +62 -0
  110. package/scripts/config/horizons/registry.d.ts +36 -0
  111. package/scripts/config/horizons/registry.js +300 -0
  112. package/scripts/config/horizons/stage-budgets.d.ts +45 -0
  113. package/scripts/config/horizons/stage-budgets.js +42 -0
  114. package/scripts/config/horizons/types.d.ts +106 -0
  115. package/scripts/config/horizons/types.js +4 -0
  116. package/scripts/constants/articles/_shared.d.ts +33 -0
  117. package/scripts/constants/articles/_shared.js +37 -0
  118. package/scripts/constants/articles/breaking.d.ts +13 -0
  119. package/scripts/constants/articles/breaking.js +752 -0
  120. package/scripts/constants/articles/committee-reports.d.ts +19 -0
  121. package/scripts/constants/articles/committee-reports.js +604 -0
  122. package/scripts/constants/articles/dashboard.d.ts +16 -0
  123. package/scripts/constants/articles/dashboard.js +1092 -0
  124. package/scripts/constants/articles/deep-analysis.d.ts +24 -0
  125. package/scripts/constants/articles/deep-analysis.js +1148 -0
  126. package/scripts/constants/articles/editorial.d.ts +11 -0
  127. package/scripts/constants/articles/editorial.js +104 -0
  128. package/scripts/constants/articles/extended-horizons.d.ts +21 -0
  129. package/scripts/constants/articles/extended-horizons.js +357 -0
  130. package/scripts/constants/articles/index.d.ts +38 -0
  131. package/scripts/constants/articles/index.js +40 -0
  132. package/scripts/constants/articles/localized-keywords.d.ts +11 -0
  133. package/scripts/constants/articles/localized-keywords.js +643 -0
  134. package/scripts/constants/articles/month-ahead.d.ts +11 -0
  135. package/scripts/constants/articles/month-ahead.js +62 -0
  136. package/scripts/constants/articles/month-in-review.d.ts +20 -0
  137. package/scripts/constants/articles/month-in-review.js +178 -0
  138. package/scripts/constants/articles/motions.d.ts +13 -0
  139. package/scripts/constants/articles/motions.js +331 -0
  140. package/scripts/constants/articles/propositions.d.ts +13 -0
  141. package/scripts/constants/articles/propositions.js +233 -0
  142. package/scripts/constants/articles/swot.d.ts +20 -0
  143. package/scripts/constants/articles/swot.js +790 -0
  144. package/scripts/constants/articles/week-ahead.d.ts +15 -0
  145. package/scripts/constants/articles/week-ahead.js +544 -0
  146. package/scripts/constants/articles/week-in-review.d.ts +11 -0
  147. package/scripts/constants/articles/week-in-review.js +62 -0
  148. package/scripts/constants/committee-indicator-map.d.ts +15 -209
  149. package/scripts/constants/committee-indicator-map.js +15 -1379
  150. package/scripts/constants/language-articles.d.ts +8 -101
  151. package/scripts/constants/language-articles.js +9 -6885
  152. package/scripts/constants/language-ui.d.ts +19 -263
  153. package/scripts/constants/language-ui.js +20 -2782
  154. package/scripts/constants/ui/accessibility.d.ts +14 -0
  155. package/scripts/constants/ui/accessibility.js +72 -0
  156. package/scripts/constants/ui/ai-content.d.ts +22 -0
  157. package/scripts/constants/ui/ai-content.js +190 -0
  158. package/scripts/constants/ui/article-category-labels.d.ts +12 -0
  159. package/scripts/constants/ui/article-category-labels.js +264 -0
  160. package/scripts/constants/ui/footer-labels.d.ts +52 -0
  161. package/scripts/constants/ui/footer-labels.js +400 -0
  162. package/scripts/constants/ui/index.d.ts +33 -0
  163. package/scripts/constants/ui/index.js +35 -0
  164. package/scripts/constants/ui/methodology-framework-labels.d.ts +36 -0
  165. package/scripts/constants/ui/methodology-framework-labels.js +262 -0
  166. package/scripts/constants/ui/page-titles.d.ts +10 -0
  167. package/scripts/constants/ui/page-titles.js +37 -0
  168. package/scripts/constants/ui/pwa-labels.d.ts +24 -0
  169. package/scripts/constants/ui/pwa-labels.js +157 -0
  170. package/scripts/constants/ui/reading-time.d.ts +8 -0
  171. package/scripts/constants/ui/reading-time.js +20 -0
  172. package/scripts/constants/ui/related-analysis.d.ts +28 -0
  173. package/scripts/constants/ui/related-analysis.js +525 -0
  174. package/scripts/constants/ui/risk-threat-labels.d.ts +44 -0
  175. package/scripts/constants/ui/risk-threat-labels.js +329 -0
  176. package/scripts/constants/ui/section-headings.d.ts +49 -0
  177. package/scripts/constants/ui/section-headings.js +356 -0
  178. package/scripts/constants/ui/tradecraft-cards.d.ts +34 -0
  179. package/scripts/constants/ui/tradecraft-cards.js +211 -0
  180. package/scripts/constants/world-bank/category-map.d.ts +44 -0
  181. package/scripts/constants/world-bank/category-map.js +506 -0
  182. package/scripts/constants/world-bank/committee-map.d.ts +54 -0
  183. package/scripts/constants/world-bank/committee-map.js +682 -0
  184. package/scripts/constants/world-bank/index.d.ts +64 -0
  185. package/scripts/constants/world-bank/index.js +99 -0
  186. package/scripts/constants/world-bank/indicator-catalog.d.ts +144 -0
  187. package/scripts/constants/world-bank/indicator-catalog.js +158 -0
  188. package/scripts/generators/news-indexes/backfill.d.ts +85 -0
  189. package/scripts/generators/news-indexes/backfill.js +393 -0
  190. package/scripts/generators/news-indexes/per-language.d.ts +30 -0
  191. package/scripts/generators/news-indexes/per-language.js +351 -0
  192. package/scripts/generators/news-indexes.d.ts +3 -104
  193. package/scripts/generators/news-indexes.js +26 -729
  194. package/scripts/generators/political-intelligence/copy/eu-core.d.ts +13 -0
  195. package/scripts/generators/political-intelligence/copy/eu-core.js +123 -0
  196. package/scripts/generators/political-intelligence/copy/index.d.ts +22 -0
  197. package/scripts/generators/political-intelligence/copy/index.js +45 -0
  198. package/scripts/generators/political-intelligence/copy/nordic.d.ts +16 -0
  199. package/scripts/generators/political-intelligence/copy/nordic.js +126 -0
  200. package/scripts/generators/political-intelligence/copy/other.d.ts +13 -0
  201. package/scripts/generators/political-intelligence/copy/other.js +153 -0
  202. package/scripts/generators/political-intelligence/copy/types.d.ts +62 -0
  203. package/scripts/generators/political-intelligence/copy/types.js +38 -0
  204. package/scripts/generators/political-intelligence/copy.d.ts +7 -80
  205. package/scripts/generators/political-intelligence/copy.js +8 -448
  206. package/scripts/generators/political-intelligence/descriptions/artifact-info.d.ts +47 -0
  207. package/scripts/generators/political-intelligence/descriptions/artifact-info.js +362 -0
  208. package/scripts/generators/political-intelligence/descriptions/curated-descriptions.d.ts +27 -0
  209. package/scripts/generators/political-intelligence/descriptions/curated-descriptions.js +20 -0
  210. package/scripts/generators/political-intelligence/descriptions/curated-titles.d.ts +29 -0
  211. package/scripts/generators/political-intelligence/descriptions/curated-titles.js +25 -0
  212. package/scripts/generators/political-intelligence/descriptions/desc-methodologies.d.ts +10 -0
  213. package/scripts/generators/political-intelligence/descriptions/desc-methodologies.js +226 -0
  214. package/scripts/generators/political-intelligence/descriptions/desc-references.d.ts +9 -0
  215. package/scripts/generators/political-intelligence/descriptions/desc-references.js +53 -0
  216. package/scripts/generators/political-intelligence/descriptions/desc-templates.d.ts +10 -0
  217. package/scripts/generators/political-intelligence/descriptions/desc-templates.js +158 -0
  218. package/scripts/generators/political-intelligence/descriptions/fallback.d.ts +47 -0
  219. package/scripts/generators/political-intelligence/descriptions/fallback.js +180 -0
  220. package/scripts/generators/political-intelligence/descriptions/index.d.ts +26 -0
  221. package/scripts/generators/political-intelligence/descriptions/index.js +17 -0
  222. package/scripts/generators/political-intelligence/descriptions/lookup.d.ts +76 -0
  223. package/scripts/generators/political-intelligence/descriptions/lookup.js +103 -0
  224. package/scripts/generators/political-intelligence/descriptions/run-types-descriptions.d.ts +10 -0
  225. package/scripts/generators/political-intelligence/descriptions/run-types-descriptions.js +262 -0
  226. package/scripts/generators/political-intelligence/descriptions/run-types-titles.d.ts +10 -0
  227. package/scripts/generators/political-intelligence/descriptions/run-types-titles.js +262 -0
  228. package/scripts/generators/political-intelligence/descriptions/run-types.d.ts +72 -0
  229. package/scripts/generators/political-intelligence/descriptions/run-types.js +190 -0
  230. package/scripts/generators/political-intelligence/descriptions/titles-methodologies.d.ts +9 -0
  231. package/scripts/generators/political-intelligence/descriptions/titles-methodologies.js +283 -0
  232. package/scripts/generators/political-intelligence/descriptions/titles-references.d.ts +9 -0
  233. package/scripts/generators/political-intelligence/descriptions/titles-references.js +240 -0
  234. package/scripts/generators/political-intelligence/descriptions/titles-templates-a.d.ts +10 -0
  235. package/scripts/generators/political-intelligence/descriptions/titles-templates-a.js +421 -0
  236. package/scripts/generators/political-intelligence/descriptions/titles-templates-b.d.ts +10 -0
  237. package/scripts/generators/political-intelligence/descriptions/titles-templates-b.js +410 -0
  238. package/scripts/generators/political-intelligence/descriptions/types.d.ts +34 -0
  239. package/scripts/generators/political-intelligence/descriptions/types.js +4 -0
  240. package/scripts/generators/political-intelligence-descriptions.d.ts +19 -199
  241. package/scripts/generators/political-intelligence-descriptions.js +20 -3130
  242. package/scripts/mcp/ep/client.d.ts +798 -0
  243. package/scripts/mcp/ep/client.js +1413 -0
  244. package/scripts/mcp/ep/election-calendar.d.ts +39 -0
  245. package/scripts/mcp/ep/election-calendar.js +49 -0
  246. package/scripts/mcp/ep/error-classifier.d.ts +48 -0
  247. package/scripts/mcp/ep/error-classifier.js +92 -0
  248. package/scripts/mcp/ep/fallbacks.d.ts +35 -0
  249. package/scripts/mcp/ep/fallbacks.js +37 -0
  250. package/scripts/mcp/ep/parse.d.ts +31 -0
  251. package/scripts/mcp/ep/parse.js +55 -0
  252. package/scripts/mcp/ep/reliability.d.ts +9 -0
  253. package/scripts/mcp/ep/reliability.js +11 -0
  254. package/scripts/mcp/ep/staleness.d.ts +51 -0
  255. package/scripts/mcp/ep/staleness.js +85 -0
  256. package/scripts/mcp/ep-mcp-client.d.ts +16 -893
  257. package/scripts/mcp/ep-mcp-client.js +16 -1705
  258. package/scripts/mcp/ep-open-data/client.d.ts +162 -0
  259. package/scripts/mcp/ep-open-data/client.js +352 -0
  260. package/scripts/mcp/ep-open-data/config.d.ts +26 -0
  261. package/scripts/mcp/ep-open-data/config.js +25 -0
  262. package/scripts/mcp/ep-open-data/types.d.ts +60 -0
  263. package/scripts/mcp/ep-open-data/types.js +4 -0
  264. package/scripts/mcp/ep-open-data/utils.d.ts +29 -0
  265. package/scripts/mcp/ep-open-data/utils.js +48 -0
  266. package/scripts/mcp/ep-open-data-client.d.ts +10 -272
  267. package/scripts/mcp/ep-open-data-client.js +11 -442
  268. package/scripts/mcp/imf/client.d.ts +237 -0
  269. package/scripts/mcp/imf/client.js +546 -0
  270. package/scripts/mcp/imf/config.d.ts +34 -0
  271. package/scripts/mcp/imf/config.js +73 -0
  272. package/scripts/mcp/imf/observations.d.ts +32 -0
  273. package/scripts/mcp/imf/observations.js +73 -0
  274. package/scripts/mcp/imf/sdmx.d.ts +83 -0
  275. package/scripts/mcp/imf/sdmx.js +226 -0
  276. package/scripts/mcp/imf/types.d.ts +92 -0
  277. package/scripts/mcp/imf/types.js +4 -0
  278. package/scripts/mcp/imf/utils.d.ts +33 -0
  279. package/scripts/mcp/imf/utils.js +60 -0
  280. package/scripts/mcp/imf-mcp-client.d.ts +13 -328
  281. package/scripts/mcp/imf-mcp-client.js +15 -1035
  282. package/scripts/mcp/mcp-connection.d.ts +11 -287
  283. package/scripts/mcp/mcp-connection.js +10 -831
  284. package/scripts/mcp/transport/connection.d.ts +220 -0
  285. package/scripts/mcp/transport/connection.js +684 -0
  286. package/scripts/mcp/transport/errors.d.ts +33 -0
  287. package/scripts/mcp/transport/errors.js +42 -0
  288. package/scripts/mcp/transport/retry-policy.d.ts +45 -0
  289. package/scripts/mcp/transport/retry-policy.js +101 -0
  290. package/scripts/mcp/transport/sse-parser.d.ts +18 -0
  291. package/scripts/mcp/transport/sse-parser.js +32 -0
  292. package/scripts/templates/section-builders.d.ts +27 -193
  293. package/scripts/templates/section-builders.js +24 -536
  294. package/scripts/templates/sections/banner.d.ts +48 -0
  295. package/scripts/templates/sections/banner.js +101 -0
  296. package/scripts/templates/sections/comparison.d.ts +16 -0
  297. package/scripts/templates/sections/comparison.js +52 -0
  298. package/scripts/templates/sections/footer.d.ts +29 -0
  299. package/scripts/templates/sections/footer.js +158 -0
  300. package/scripts/templates/sections/header.d.ts +34 -0
  301. package/scripts/templates/sections/header.js +77 -0
  302. package/scripts/templates/sections/key-figures.d.ts +27 -0
  303. package/scripts/templates/sections/key-figures.js +50 -0
  304. package/scripts/templates/sections/quality-score.d.ts +20 -0
  305. package/scripts/templates/sections/quality-score.js +100 -0
  306. package/scripts/templates/sections/timeline.d.ts +25 -0
  307. package/scripts/templates/sections/timeline.js +46 -0
  308. package/scripts/templates/sections/toc.d.ts +10 -0
  309. package/scripts/templates/sections/toc.js +37 -0
  310. package/scripts/types/article-category.d.ts +95 -0
  311. package/scripts/types/article-category.js +127 -0
  312. package/scripts/types/article-strings/breaking.d.ts +295 -0
  313. package/scripts/types/article-strings/breaking.js +4 -0
  314. package/scripts/types/article-strings/committee.d.ts +82 -0
  315. package/scripts/types/article-strings/committee.js +4 -0
  316. package/scripts/types/article-strings/motions.d.ts +26 -0
  317. package/scripts/types/article-strings/motions.js +4 -0
  318. package/scripts/types/article-strings/propositions.d.ts +32 -0
  319. package/scripts/types/article-strings/propositions.js +4 -0
  320. package/scripts/types/article-strings/week-ahead.d.ts +98 -0
  321. package/scripts/types/article-strings/week-ahead.js +4 -0
  322. package/scripts/types/common.d.ts +24 -597
  323. package/scripts/types/common.js +1 -118
  324. package/scripts/types/index.d.ts +2 -2
  325. package/scripts/types/languages.d.ts +16 -0
  326. package/scripts/types/languages.js +4 -0
  327. package/scripts/types/mcp/client.d.ts +65 -0
  328. package/scripts/types/mcp/client.js +4 -0
  329. package/scripts/types/mcp/ep-feeds.d.ts +94 -0
  330. package/scripts/types/mcp/ep-feeds.js +4 -0
  331. package/scripts/types/mcp/ep-tools.d.ts +417 -0
  332. package/scripts/types/mcp/ep-tools.js +4 -0
  333. package/scripts/types/mcp/reports.d.ts +14 -0
  334. package/scripts/types/mcp/reports.js +4 -0
  335. package/scripts/types/mcp.d.ts +14 -552
  336. package/scripts/types/visualization/charts.d.ts +68 -0
  337. package/scripts/types/visualization/charts.js +4 -0
  338. package/scripts/types/visualization/dashboard.d.ts +218 -0
  339. package/scripts/types/visualization/dashboard.js +4 -0
  340. package/scripts/types/visualization/mindmap.d.ts +160 -0
  341. package/scripts/types/visualization/mindmap.js +4 -0
  342. package/scripts/types/visualization/swot.d.ts +112 -0
  343. package/scripts/types/visualization/swot.js +4 -0
  344. package/scripts/types/visualization/voting-bloc.d.ts +45 -0
  345. package/scripts/types/visualization/voting-bloc.js +4 -0
  346. package/scripts/types/visualization.d.ts +19 -572
  347. package/scripts/utils/articles/analysis-discovery.d.ts +17 -0
  348. package/scripts/utils/articles/analysis-discovery.js +124 -0
  349. package/scripts/utils/articles/filename.d.ts +37 -0
  350. package/scripts/utils/articles/filename.js +93 -0
  351. package/scripts/utils/articles/metadata.d.ts +98 -0
  352. package/scripts/utils/articles/metadata.js +201 -0
  353. package/scripts/utils/articles/slug.d.ts +30 -0
  354. package/scripts/utils/articles/slug.js +50 -0
  355. package/scripts/utils/file-utils.d.ts +29 -282
  356. package/scripts/utils/file-utils.js +26 -753
  357. package/scripts/utils/fs/atomic-write.d.ts +52 -0
  358. package/scripts/utils/fs/atomic-write.js +190 -0
  359. package/scripts/utils/fs/directory.d.ts +25 -0
  360. package/scripts/utils/fs/directory.js +75 -0
  361. package/scripts/utils/html/escape.d.ts +29 -0
  362. package/scripts/utils/html/escape.js +45 -0
  363. package/scripts/utils/html/validate.d.ts +29 -0
  364. package/scripts/utils/html/validate.js +57 -0
  365. package/scripts/utils/intelligence/build.d.ts +79 -0
  366. package/scripts/utils/intelligence/build.js +192 -0
  367. package/scripts/utils/intelligence/html.d.ts +16 -0
  368. package/scripts/utils/intelligence/html.js +100 -0
  369. package/scripts/utils/intelligence/internals.d.ts +65 -0
  370. package/scripts/utils/intelligence/internals.js +138 -0
  371. package/scripts/utils/intelligence/persist.d.ts +29 -0
  372. package/scripts/utils/intelligence/persist.js +201 -0
  373. package/scripts/utils/intelligence/trends.d.ts +17 -0
  374. package/scripts/utils/intelligence/trends.js +108 -0
  375. package/scripts/utils/intelligence/types.d.ts +8 -0
  376. package/scripts/utils/intelligence/types.js +4 -0
  377. package/scripts/utils/intelligence-index.d.ts +20 -124
  378. package/scripts/utils/intelligence-index.js +19 -711
package/README.md CHANGED
@@ -136,7 +136,7 @@ The published site is the audience-facing companion to this npm/TypeScript packa
136
136
 
137
137
  **MCP Server Integration**: The project uses the
138
138
  [European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server)
139
- v1.3.6 for accessing real EU Parliament data via the Model Context Protocol.
139
+ v1.3.9 for accessing real EU Parliament data via the Model Context Protocol.
140
140
 
141
141
  - **MCP Server Status**: ✅ Fully operational — 60+ EP data tools available
142
142
  (feeds, direct lookups, analytical tools, intelligence correlation)
@@ -432,7 +432,7 @@ import type { ArticleCategory, LanguageCode } from 'euparliamentmonitor/types';
432
432
 
433
433
  ## 🔌 Data Sources
434
434
 
435
- **Primary — European Parliament MCP Server** ([Hack23/European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server) v1.3.6+, fully operational):
435
+ **Primary — European Parliament MCP Server** ([Hack23/European-Parliament-MCP-Server](https://github.com/Hack23/European-Parliament-MCP-Server) v1.3.9+, fully operational):
436
436
 
437
437
  - 🗳️ Plenary sessions, voting records, roll-call votes
438
438
  - 📜 Adopted texts, motions, resolutions, urgency files
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "euparliamentmonitor",
3
- "version": "0.9.15",
3
+ "version": "0.9.17",
4
4
  "type": "module",
5
5
  "description": "European Parliament Intelligence Platform - Monitor political activity with systematic transparency",
6
6
  "main": "scripts/index.js",
@@ -154,10 +154,10 @@
154
154
  "@playwright/test": "1.60.0",
155
155
  "@types/d3": "7.4.3",
156
156
  "@types/markdown-it": "^14.1.2",
157
- "@types/node": "25.8.0",
157
+ "@types/node": "25.9.1",
158
158
  "@types/papaparse": "5.5.2",
159
- "@typescript-eslint/eslint-plugin": "8.59.3",
160
- "@typescript-eslint/parser": "8.59.3",
159
+ "@typescript-eslint/eslint-plugin": "8.59.4",
160
+ "@typescript-eslint/parser": "8.59.4",
161
161
  "@vitest/coverage-v8": "4.1.6",
162
162
  "@vitest/ui": "4.1.6",
163
163
  "chart.js": "4.5.1",
@@ -184,7 +184,7 @@
184
184
  "sharp": "^0.34.5",
185
185
  "terser": "^5.47.1",
186
186
  "ts-api-utils": "2.5.0",
187
- "tsx": "4.22.1",
187
+ "tsx": "4.22.3",
188
188
  "typedoc": "0.28.19",
189
189
  "typescript": "6.0.3",
190
190
  "vitest": "4.1.6"
@@ -193,7 +193,7 @@
193
193
  "node": ">=26"
194
194
  },
195
195
  "dependencies": {
196
- "european-parliament-mcp-server": "1.3.6",
196
+ "european-parliament-mcp-server": "1.3.9",
197
197
  "markdown-it": "^14.1.1",
198
198
  "markdown-it-anchor": "^9.2.0",
199
199
  "markdown-it-attrs": "^4.3.1",
@@ -1,8 +1,7 @@
1
- import { type ArtifactSection } from './artifact-order.js';
2
- import { type Manifest, type ManifestFiles } from './manifest/index.js';
3
1
  import type { TocSection, IncludedArtifact } from './reader-guide-constants.js';
4
2
  export type { TocSection, IncludedArtifact } from './reader-guide-constants.js';
5
3
  export { READER_GUIDE_SECTION_ID, READER_GUIDE_SECTION_IDS, READER_GUIDE_SECTION_TITLE, } from './reader-guide-constants.js';
4
+ export * from './run/index.js';
6
5
  /** Result of {@link aggregateAnalysisRun}. */
7
6
  export interface AggregatedRun {
8
7
  /** Final Markdown document (provenance + sections + appendices). */
@@ -40,126 +39,6 @@ export interface AggregateOptions {
40
39
  */
41
40
  readonly tradecraftFiles?: readonly string[];
42
41
  }
43
- /**
44
- * Normalise `manifest.files` into a flat list of `runRelPath` strings.
45
- *
46
- * Thin re-export of {@link _flattenManifestFiles} from
47
- * `aggregator/manifest/index.js`; preserved here so external callers
48
- * (`backport-article-seo`, curator scripts) keep resolving.
49
- *
50
- * @param files - Manifest `files` section (nested or flat)
51
- * @returns De-duplicated list of run-relative artifact paths
52
- */
53
- export declare function flattenManifestFiles(files: ManifestFiles | undefined): string[];
54
- /**
55
- * Pick the latest non-PENDING gateResult from `manifest.history[]`, falling
56
- * back to `PENDING` if none is recorded.
57
- *
58
- * Thin re-export of {@link _latestGateResult} from
59
- * `aggregator/manifest/index.js`.
60
- *
61
- * @param manifest - Parsed manifest object
62
- * @returns The latest non-PENDING gate result, or `"PENDING"` when none found
63
- */
64
- export declare function latestGateResult(manifest: Manifest): string;
65
- /**
66
- * Expand an `artifacts` entry from {@link ArtifactSection} into a list of
67
- * concrete artifact paths. Exact paths are kept as-is; directory prefixes
68
- * ending in `/` expand to every remaining `.md` under that directory
69
- * (lexical order), excluding files already claimed by higher-priority
70
- * sections.
71
- *
72
- * @param section - Canonical section descriptor from {@link ARTIFACT_SECTIONS}
73
- * @param available - Set of every known artifact path (run-relative)
74
- * @param consumed - Mutable set of paths already claimed by earlier sections
75
- * @returns Ordered list of artifact paths that belong to this section
76
- */
77
- export declare function expandSectionArtifacts(section: ArtifactSection, available: Set<string>, consumed: Set<string>): string[];
78
- /**
79
- * Discover tradecraft files (methodologies + templates) under a repo root.
80
- * Returned paths are repo-relative with POSIX separators and sorted
81
- * lexically.
82
- *
83
- * @param repoRoot - Absolute path of the repo root
84
- * @returns Sorted list of `analysis/methodologies/*.md` + `analysis/templates/*.md`
85
- */
86
- export declare function discoverTradecraftFiles(repoRoot: string): string[];
87
- /**
88
- * Render the provenance block shown at the very top of the aggregated
89
- * document. Shows run metadata, gate result, and a direct link to the
90
- * manifest on GitHub so the reader can audit the full artifact set.
91
- *
92
- * @param params - Provenance metadata for the aggregated run
93
- * @param params.articleType - Article type slug (e.g. `breaking`)
94
- * @param params.date - ISO date of the run (`YYYY-MM-DD`)
95
- * @param params.runId - Stable identifier for the run
96
- * @param params.gateResult - Latest non-PENDING gate result
97
- * @param params.runDirRelPath - Repo-relative path of the run directory
98
- * @param params.manifestRelPath - Repo-relative path of `manifest.json`
99
- * @returns Markdown blockquote ready to be concatenated into the aggregate
100
- */
101
- export declare function renderProvenanceBlock(params: {
102
- articleType: string;
103
- date: string;
104
- runId: string;
105
- gateResult: string;
106
- runDirRelPath: string;
107
- manifestRelPath: string;
108
- }): string;
109
- /**
110
- * Render the tradecraft-references appendix — one bullet per
111
- * methodology/template file with a GitHub blob link.
112
- *
113
- * @param files - Repo-relative paths under `analysis/methodologies/` and
114
- * `analysis/templates/`
115
- * @returns Markdown block with two subsections (methodologies, templates)
116
- */
117
- export declare function renderTradecraftAppendix(files: readonly string[]): string;
118
- /**
119
- * Public re-export of the internal `humanize` helper so other aggregator
120
- * modules (in particular `article-html.ts`) can derive the same display
121
- * title from a file stem when no curated title is available. Keeping the
122
- * single canonical implementation here avoids duplicate humanisation
123
- * rules drifting across modules.
124
- *
125
- * @param stem - File stem (e.g. `electoral-cycle-methodology`)
126
- * @returns Humanised title (e.g. `Electoral Cycle Methodology`)
127
- */
128
- export declare function humanizeStem(stem: string): string;
129
- /**
130
- * Render the analysis-index appendix — a compact table of every included
131
- * artifact and its section, plus a direct link to the manifest.
132
- *
133
- * @param included - Artifacts that contributed to the aggregated document
134
- * @param manifestRelPath - Repo-relative path of `manifest.json`
135
- * @returns Markdown block with the index table
136
- */
137
- export declare function renderAnalysisIndex(included: readonly IncludedArtifact[], manifestRelPath: string): string;
138
- /**
139
- * Render the generated reader-intelligence guide that appears before the
140
- * artifact sections. It gives readers a Riksdagsmonitor-style navigation layer
141
- * without requiring agents to hand-author another artifact.
142
- *
143
- * Section membership is checked against `READER_GUIDE_SECTION_IDS` (the
144
- * canonical list shared with the HTML renderer in `reader-intelligence-guide.ts`)
145
- * to prevent drift between the two renderers.
146
- *
147
- * @param sections - Emitted section TOC entries, in document order
148
- * @param included - Included artifacts, used to name each section's source
149
- * @returns Markdown block containing the guide table
150
- */
151
- export declare function renderReaderIntelligenceGuide(sections: readonly TocSection[], included: readonly IncludedArtifact[]): string;
152
- /**
153
- * Resolve the article-type slug from a manifest, tolerating historic schemas.
154
- *
155
- * Thin re-export of {@link _resolveArticleType} from
156
- * `aggregator/manifest/index.js`. Resolution order: `articleType` →
157
- * `articleTypeSlug` → `articleTypes[0]` → `runType` → `'unknown'`.
158
- *
159
- * @param manifest - Parsed manifest (any of the supported schemas)
160
- * @returns Article-type slug usable as a filename component
161
- */
162
- export declare function resolveArticleTypeFromManifest(manifest: Manifest): string;
163
42
  /**
164
43
  * Read, clean, and concatenate every artifact declared by the run's manifest
165
44
  * (with discovery fallback when manifest.files is missing), returning a
@@ -172,13 +51,4 @@ export declare function resolveArticleTypeFromManifest(manifest: Manifest): stri
172
51
  * @returns {@link AggregatedRun} describing the rendered document
173
52
  */
174
53
  export declare function aggregateAnalysisRun(options: AggregateOptions): AggregatedRun;
175
- /**
176
- * Extract a `YYYY-MM-DD` date from a path like
177
- * `analysis/daily/2026-01-15/run`. Falls back to the epoch date when no
178
- * ISO date is embedded in the path.
179
- *
180
- * @param runDirRelPath - Repo-relative path of the run directory
181
- * @returns ISO date string in `YYYY-MM-DD` form
182
- */
183
- export declare function guessDateFromRunDir(runDirRelPath: string): string;
184
54
  //# sourceMappingURL=analysis-aggregator.d.ts.map