euparliamentmonitor 0.8.4
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.
- package/LICENSE +201 -0
- package/README.md +1005 -0
- package/SECURITY.md +151 -0
- package/package.json +131 -0
- package/scripts/constants/committee-indicator-map.d.ts +199 -0
- package/scripts/constants/committee-indicator-map.d.ts.map +1 -0
- package/scripts/constants/committee-indicator-map.js +1224 -0
- package/scripts/constants/committee-indicator-map.js.map +1 -0
- package/scripts/constants/config.d.ts +38 -0
- package/scripts/constants/config.d.ts.map +1 -0
- package/scripts/constants/config.js +66 -0
- package/scripts/constants/config.js.map +1 -0
- package/scripts/constants/language-articles.d.ts +84 -0
- package/scripts/constants/language-articles.d.ts.map +1 -0
- package/scripts/constants/language-articles.js +6771 -0
- package/scripts/constants/language-articles.js.map +1 -0
- package/scripts/constants/language-core.d.ts +38 -0
- package/scripts/constants/language-core.d.ts.map +1 -0
- package/scripts/constants/language-core.js +90 -0
- package/scripts/constants/language-core.js.map +1 -0
- package/scripts/constants/language-ui.d.ts +82 -0
- package/scripts/constants/language-ui.d.ts.map +1 -0
- package/scripts/constants/language-ui.js +889 -0
- package/scripts/constants/language-ui.js.map +1 -0
- package/scripts/constants/languages.d.ts +14 -0
- package/scripts/constants/languages.d.ts.map +1 -0
- package/scripts/constants/languages.js +15 -0
- package/scripts/constants/languages.js.map +1 -0
- package/scripts/generators/analysis-builders.d.ts +266 -0
- package/scripts/generators/analysis-builders.d.ts.map +1 -0
- package/scripts/generators/analysis-builders.js +2903 -0
- package/scripts/generators/analysis-builders.js.map +1 -0
- package/scripts/generators/breaking-content.d.ts +45 -0
- package/scripts/generators/breaking-content.d.ts.map +1 -0
- package/scripts/generators/breaking-content.js +530 -0
- package/scripts/generators/breaking-content.js.map +1 -0
- package/scripts/generators/committee-helpers.d.ts +54 -0
- package/scripts/generators/committee-helpers.d.ts.map +1 -0
- package/scripts/generators/committee-helpers.js +154 -0
- package/scripts/generators/committee-helpers.js.map +1 -0
- package/scripts/generators/dashboard-content.d.ts +95 -0
- package/scripts/generators/dashboard-content.d.ts.map +1 -0
- package/scripts/generators/dashboard-content.js +630 -0
- package/scripts/generators/dashboard-content.js.map +1 -0
- package/scripts/generators/deep-analysis-content.d.ts +23 -0
- package/scripts/generators/deep-analysis-content.d.ts.map +1 -0
- package/scripts/generators/deep-analysis-content.js +831 -0
- package/scripts/generators/deep-analysis-content.js.map +1 -0
- package/scripts/generators/mindmap-content.d.ts +55 -0
- package/scripts/generators/mindmap-content.d.ts.map +1 -0
- package/scripts/generators/mindmap-content.js +512 -0
- package/scripts/generators/mindmap-content.js.map +1 -0
- package/scripts/generators/motions-content.d.ts +50 -0
- package/scripts/generators/motions-content.d.ts.map +1 -0
- package/scripts/generators/motions-content.js +391 -0
- package/scripts/generators/motions-content.js.map +1 -0
- package/scripts/generators/news-enhanced.d.ts +14 -0
- package/scripts/generators/news-enhanced.d.ts.map +1 -0
- package/scripts/generators/news-enhanced.js +169 -0
- package/scripts/generators/news-enhanced.js.map +1 -0
- package/scripts/generators/news-indexes.d.ts +31 -0
- package/scripts/generators/news-indexes.d.ts.map +1 -0
- package/scripts/generators/news-indexes.js +410 -0
- package/scripts/generators/news-indexes.js.map +1 -0
- package/scripts/generators/pipeline/fetch-stage.d.ts +352 -0
- package/scripts/generators/pipeline/fetch-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/fetch-stage.js +1522 -0
- package/scripts/generators/pipeline/fetch-stage.js.map +1 -0
- package/scripts/generators/pipeline/generate-stage.d.ts +43 -0
- package/scripts/generators/pipeline/generate-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/generate-stage.js +204 -0
- package/scripts/generators/pipeline/generate-stage.js.map +1 -0
- package/scripts/generators/pipeline/output-stage.d.ts +48 -0
- package/scripts/generators/pipeline/output-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/output-stage.js +145 -0
- package/scripts/generators/pipeline/output-stage.js.map +1 -0
- package/scripts/generators/pipeline/transform-stage.d.ts +57 -0
- package/scripts/generators/pipeline/transform-stage.d.ts.map +1 -0
- package/scripts/generators/pipeline/transform-stage.js +111 -0
- package/scripts/generators/pipeline/transform-stage.js.map +1 -0
- package/scripts/generators/propositions-content.d.ts +29 -0
- package/scripts/generators/propositions-content.d.ts.map +1 -0
- package/scripts/generators/propositions-content.js +90 -0
- package/scripts/generators/propositions-content.js.map +1 -0
- package/scripts/generators/sankey-content.d.ts +45 -0
- package/scripts/generators/sankey-content.d.ts.map +1 -0
- package/scripts/generators/sankey-content.js +227 -0
- package/scripts/generators/sankey-content.js.map +1 -0
- package/scripts/generators/sitemap.d.ts +66 -0
- package/scripts/generators/sitemap.d.ts.map +1 -0
- package/scripts/generators/sitemap.js +562 -0
- package/scripts/generators/sitemap.js.map +1 -0
- package/scripts/generators/strategies/article-strategy.d.ts +146 -0
- package/scripts/generators/strategies/article-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/article-strategy.js +4 -0
- package/scripts/generators/strategies/article-strategy.js.map +1 -0
- package/scripts/generators/strategies/breaking-news-strategy.d.ts +64 -0
- package/scripts/generators/strategies/breaking-news-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/breaking-news-strategy.js +246 -0
- package/scripts/generators/strategies/breaking-news-strategy.js.map +1 -0
- package/scripts/generators/strategies/committee-reports-strategy.d.ts +93 -0
- package/scripts/generators/strategies/committee-reports-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/committee-reports-strategy.js +447 -0
- package/scripts/generators/strategies/committee-reports-strategy.js.map +1 -0
- package/scripts/generators/strategies/month-ahead-strategy.d.ts +60 -0
- package/scripts/generators/strategies/month-ahead-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/month-ahead-strategy.js +175 -0
- package/scripts/generators/strategies/month-ahead-strategy.js.map +1 -0
- package/scripts/generators/strategies/monthly-review-strategy.d.ts +66 -0
- package/scripts/generators/strategies/monthly-review-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/monthly-review-strategy.js +204 -0
- package/scripts/generators/strategies/monthly-review-strategy.js.map +1 -0
- package/scripts/generators/strategies/motions-strategy.d.ts +61 -0
- package/scripts/generators/strategies/motions-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/motions-strategy.js +215 -0
- package/scripts/generators/strategies/motions-strategy.js.map +1 -0
- package/scripts/generators/strategies/propositions-strategy.d.ts +60 -0
- package/scripts/generators/strategies/propositions-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/propositions-strategy.js +257 -0
- package/scripts/generators/strategies/propositions-strategy.js.map +1 -0
- package/scripts/generators/strategies/week-ahead-strategy.d.ts +57 -0
- package/scripts/generators/strategies/week-ahead-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/week-ahead-strategy.js +178 -0
- package/scripts/generators/strategies/week-ahead-strategy.js.map +1 -0
- package/scripts/generators/strategies/weekly-review-strategy.d.ts +63 -0
- package/scripts/generators/strategies/weekly-review-strategy.d.ts.map +1 -0
- package/scripts/generators/strategies/weekly-review-strategy.js +211 -0
- package/scripts/generators/strategies/weekly-review-strategy.js.map +1 -0
- package/scripts/generators/swot-content.d.ts +42 -0
- package/scripts/generators/swot-content.d.ts.map +1 -0
- package/scripts/generators/swot-content.js +366 -0
- package/scripts/generators/swot-content.js.map +1 -0
- package/scripts/generators/week-ahead-content.d.ts +103 -0
- package/scripts/generators/week-ahead-content.d.ts.map +1 -0
- package/scripts/generators/week-ahead-content.js +610 -0
- package/scripts/generators/week-ahead-content.js.map +1 -0
- package/scripts/index.d.ts +40 -0
- package/scripts/index.d.ts.map +1 -0
- package/scripts/index.js +53 -0
- package/scripts/index.js.map +1 -0
- package/scripts/mcp/ep-mcp-client.d.ts +471 -0
- package/scripts/mcp/ep-mcp-client.d.ts.map +1 -0
- package/scripts/mcp/ep-mcp-client.js +734 -0
- package/scripts/mcp/ep-mcp-client.js.map +1 -0
- package/scripts/mcp/mcp-connection.d.ts +264 -0
- package/scripts/mcp/mcp-connection.d.ts.map +1 -0
- package/scripts/mcp/mcp-connection.js +790 -0
- package/scripts/mcp/mcp-connection.js.map +1 -0
- package/scripts/mcp/mcp-health.d.ts +75 -0
- package/scripts/mcp/mcp-health.d.ts.map +1 -0
- package/scripts/mcp/mcp-health.js +78 -0
- package/scripts/mcp/mcp-health.js.map +1 -0
- package/scripts/mcp/mcp-retry.d.ts +94 -0
- package/scripts/mcp/mcp-retry.d.ts.map +1 -0
- package/scripts/mcp/mcp-retry.js +127 -0
- package/scripts/mcp/mcp-retry.js.map +1 -0
- package/scripts/mcp/wb-mcp-client.d.ts +38 -0
- package/scripts/mcp/wb-mcp-client.d.ts.map +1 -0
- package/scripts/mcp/wb-mcp-client.js +112 -0
- package/scripts/mcp/wb-mcp-client.js.map +1 -0
- package/scripts/templates/article-template.d.ts +9 -0
- package/scripts/templates/article-template.d.ts.map +1 -0
- package/scripts/templates/article-template.js +378 -0
- package/scripts/templates/article-template.js.map +1 -0
- package/scripts/templates/section-builders.d.ts +28 -0
- package/scripts/templates/section-builders.d.ts.map +1 -0
- package/scripts/templates/section-builders.js +142 -0
- package/scripts/templates/section-builders.js.map +1 -0
- package/scripts/types/analysis.d.ts +115 -0
- package/scripts/types/analysis.d.ts.map +1 -0
- package/scripts/types/analysis.js +4 -0
- package/scripts/types/analysis.js.map +1 -0
- package/scripts/types/common.d.ts +584 -0
- package/scripts/types/common.d.ts.map +1 -0
- package/scripts/types/common.js +96 -0
- package/scripts/types/common.js.map +1 -0
- package/scripts/types/generation.d.ts +104 -0
- package/scripts/types/generation.d.ts.map +1 -0
- package/scripts/types/generation.js +4 -0
- package/scripts/types/generation.js.map +1 -0
- package/scripts/types/index.d.ts +24 -0
- package/scripts/types/index.d.ts.map +1 -0
- package/scripts/types/index.js +16 -0
- package/scripts/types/index.js.map +1 -0
- package/scripts/types/intelligence.d.ts +129 -0
- package/scripts/types/intelligence.d.ts.map +1 -0
- package/scripts/types/intelligence.js +4 -0
- package/scripts/types/intelligence.js.map +1 -0
- package/scripts/types/mcp.d.ts +418 -0
- package/scripts/types/mcp.d.ts.map +1 -0
- package/scripts/types/mcp.js +4 -0
- package/scripts/types/mcp.js.map +1 -0
- package/scripts/types/parliament.d.ts +388 -0
- package/scripts/types/parliament.d.ts.map +1 -0
- package/scripts/types/parliament.js +4 -0
- package/scripts/types/parliament.js.map +1 -0
- package/scripts/types/quality.d.ts +114 -0
- package/scripts/types/quality.d.ts.map +1 -0
- package/scripts/types/quality.js +4 -0
- package/scripts/types/quality.js.map +1 -0
- package/scripts/types/stakeholder.d.ts +88 -0
- package/scripts/types/stakeholder.d.ts.map +1 -0
- package/scripts/types/stakeholder.js +16 -0
- package/scripts/types/stakeholder.js.map +1 -0
- package/scripts/types/visualization.d.ts +708 -0
- package/scripts/types/visualization.d.ts.map +1 -0
- package/scripts/types/visualization.js +4 -0
- package/scripts/types/visualization.js.map +1 -0
- package/scripts/types/world-bank.d.ts +85 -0
- package/scripts/types/world-bank.d.ts.map +1 -0
- package/scripts/types/world-bank.js +4 -0
- package/scripts/types/world-bank.js.map +1 -0
- package/scripts/utils/article-category.d.ts +18 -0
- package/scripts/utils/article-category.d.ts.map +1 -0
- package/scripts/utils/article-category.js +49 -0
- package/scripts/utils/article-category.js.map +1 -0
- package/scripts/utils/article-quality-scorer.d.ts +87 -0
- package/scripts/utils/article-quality-scorer.d.ts.map +1 -0
- package/scripts/utils/article-quality-scorer.js +1048 -0
- package/scripts/utils/article-quality-scorer.js.map +1 -0
- package/scripts/utils/content-metadata.d.ts +34 -0
- package/scripts/utils/content-metadata.d.ts.map +1 -0
- package/scripts/utils/content-metadata.js +249 -0
- package/scripts/utils/content-metadata.js.map +1 -0
- package/scripts/utils/content-validator.d.ts +94 -0
- package/scripts/utils/content-validator.d.ts.map +1 -0
- package/scripts/utils/content-validator.js +489 -0
- package/scripts/utils/content-validator.js.map +1 -0
- package/scripts/utils/copy-test-reports.d.ts +9 -0
- package/scripts/utils/copy-test-reports.d.ts.map +1 -0
- package/scripts/utils/copy-test-reports.js +508 -0
- package/scripts/utils/copy-test-reports.js.map +1 -0
- package/scripts/utils/file-utils.d.ts +144 -0
- package/scripts/utils/file-utils.d.ts.map +1 -0
- package/scripts/utils/file-utils.js +374 -0
- package/scripts/utils/file-utils.js.map +1 -0
- package/scripts/utils/fix-articles.d.ts +27 -0
- package/scripts/utils/fix-articles.d.ts.map +1 -0
- package/scripts/utils/fix-articles.js +510 -0
- package/scripts/utils/fix-articles.js.map +1 -0
- package/scripts/utils/generate-docs-index.d.ts +8 -0
- package/scripts/utils/generate-docs-index.d.ts.map +1 -0
- package/scripts/utils/generate-docs-index.js +275 -0
- package/scripts/utils/generate-docs-index.js.map +1 -0
- package/scripts/utils/html-sanitize.d.ts +18 -0
- package/scripts/utils/html-sanitize.d.ts.map +1 -0
- package/scripts/utils/html-sanitize.js +57 -0
- package/scripts/utils/html-sanitize.js.map +1 -0
- package/scripts/utils/intelligence-analysis.d.ts +173 -0
- package/scripts/utils/intelligence-analysis.d.ts.map +1 -0
- package/scripts/utils/intelligence-analysis.js +936 -0
- package/scripts/utils/intelligence-analysis.js.map +1 -0
- package/scripts/utils/intelligence-index.d.ts +126 -0
- package/scripts/utils/intelligence-index.d.ts.map +1 -0
- package/scripts/utils/intelligence-index.js +731 -0
- package/scripts/utils/intelligence-index.js.map +1 -0
- package/scripts/utils/metadata-utils.d.ts +14 -0
- package/scripts/utils/metadata-utils.d.ts.map +1 -0
- package/scripts/utils/metadata-utils.js +18 -0
- package/scripts/utils/metadata-utils.js.map +1 -0
- package/scripts/utils/news-metadata.d.ts +47 -0
- package/scripts/utils/news-metadata.d.ts.map +1 -0
- package/scripts/utils/news-metadata.js +259 -0
- package/scripts/utils/news-metadata.js.map +1 -0
- package/scripts/utils/validate-articles.d.ts +2 -0
- package/scripts/utils/validate-articles.d.ts.map +1 -0
- package/scripts/utils/validate-articles.js +284 -0
- package/scripts/utils/validate-articles.js.map +1 -0
- package/scripts/utils/validate-ep-api.d.ts +51 -0
- package/scripts/utils/validate-ep-api.d.ts.map +1 -0
- package/scripts/utils/validate-ep-api.js +160 -0
- package/scripts/utils/validate-ep-api.js.map +1 -0
- package/scripts/utils/world-bank-data.d.ts +84 -0
- package/scripts/utils/world-bank-data.d.ts.map +1 -0
- package/scripts/utils/world-bank-data.js +311 -0
- package/scripts/utils/world-bank-data.js.map +1 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* Article category — the primary classifier for content generation.
|
|
5
|
+
* Each value represents a distinct article type with its own data pipeline,
|
|
6
|
+
* template structure, and editorial voice.
|
|
7
|
+
*/
|
|
8
|
+
export var ArticleCategory;
|
|
9
|
+
(function (ArticleCategory) {
|
|
10
|
+
// Prospective — looking ahead
|
|
11
|
+
ArticleCategory["WEEK_AHEAD"] = "week-ahead";
|
|
12
|
+
ArticleCategory["MONTH_AHEAD"] = "month-ahead";
|
|
13
|
+
ArticleCategory["YEAR_AHEAD"] = "year-ahead";
|
|
14
|
+
// Retrospective — looking back
|
|
15
|
+
ArticleCategory["WEEK_IN_REVIEW"] = "week-in-review";
|
|
16
|
+
ArticleCategory["MONTH_IN_REVIEW"] = "month-in-review";
|
|
17
|
+
ArticleCategory["YEAR_IN_REVIEW"] = "year-in-review";
|
|
18
|
+
// Real-time
|
|
19
|
+
ArticleCategory["BREAKING_NEWS"] = "breaking";
|
|
20
|
+
// Domain-specific
|
|
21
|
+
ArticleCategory["COMMITTEE_REPORTS"] = "committee-reports";
|
|
22
|
+
ArticleCategory["MOTIONS"] = "motions";
|
|
23
|
+
ArticleCategory["PROPOSITIONS"] = "propositions";
|
|
24
|
+
// Analytical
|
|
25
|
+
ArticleCategory["DEEP_ANALYSIS"] = "deep-analysis";
|
|
26
|
+
})(ArticleCategory || (ArticleCategory = {}));
|
|
27
|
+
/**
|
|
28
|
+
* Temporal perspective of an article — derived from its category.
|
|
29
|
+
* Determines the editorial framing and verb tense.
|
|
30
|
+
*/
|
|
31
|
+
export var ArticlePerspective;
|
|
32
|
+
(function (ArticlePerspective) {
|
|
33
|
+
/** Forward-looking: previews, agendas, upcoming events */
|
|
34
|
+
ArticlePerspective["PROSPECTIVE"] = "prospective";
|
|
35
|
+
/** Backward-looking: reviews, summaries, retrospectives */
|
|
36
|
+
ArticlePerspective["RETROSPECTIVE"] = "retrospective";
|
|
37
|
+
/** Live/current: breaking news, urgent developments */
|
|
38
|
+
ArticlePerspective["REAL_TIME"] = "real-time";
|
|
39
|
+
/** Deep dive: multi-perspective analysis, root cause */
|
|
40
|
+
ArticlePerspective["ANALYTICAL"] = "analytical";
|
|
41
|
+
})(ArticlePerspective || (ArticlePerspective = {}));
|
|
42
|
+
/**
|
|
43
|
+
* Time period scope for periodic articles (look-ahead or in-review).
|
|
44
|
+
*/
|
|
45
|
+
export var TimePeriod;
|
|
46
|
+
(function (TimePeriod) {
|
|
47
|
+
TimePeriod["WEEK"] = "week";
|
|
48
|
+
TimePeriod["MONTH"] = "month";
|
|
49
|
+
TimePeriod["YEAR"] = "year";
|
|
50
|
+
})(TimePeriod || (TimePeriod = {}));
|
|
51
|
+
/**
|
|
52
|
+
* Analysis perspective for "5 Whys" deep analysis articles.
|
|
53
|
+
* Each perspective frames the same events through a different lens,
|
|
54
|
+
* asking "why" iteratively to uncover root causes.
|
|
55
|
+
*/
|
|
56
|
+
export var AnalysisPerspective;
|
|
57
|
+
(function (AnalysisPerspective) {
|
|
58
|
+
/** Party dynamics, power shifts, political strategy */
|
|
59
|
+
AnalysisPerspective["POLITICAL"] = "political";
|
|
60
|
+
/** Budget impact, market effects, fiscal policy */
|
|
61
|
+
AnalysisPerspective["ECONOMIC"] = "economic";
|
|
62
|
+
/** Citizen impact, public opinion, social equity */
|
|
63
|
+
AnalysisPerspective["SOCIAL"] = "social";
|
|
64
|
+
/** Treaty basis, legal competence, compliance */
|
|
65
|
+
AnalysisPerspective["LEGAL"] = "legal";
|
|
66
|
+
/** Climate, sustainability, green transition */
|
|
67
|
+
AnalysisPerspective["ENVIRONMENTAL"] = "environmental";
|
|
68
|
+
/** EU external relations, global positioning */
|
|
69
|
+
AnalysisPerspective["GEOPOLITICAL"] = "geopolitical";
|
|
70
|
+
/** EU institutional mechanics, inter-institutional balance */
|
|
71
|
+
AnalysisPerspective["INSTITUTIONAL"] = "institutional";
|
|
72
|
+
})(AnalysisPerspective || (AnalysisPerspective = {}));
|
|
73
|
+
/** Mapping from ArticleCategory to its inherent ArticlePerspective */
|
|
74
|
+
export const CATEGORY_PERSPECTIVE = {
|
|
75
|
+
[ArticleCategory.WEEK_AHEAD]: ArticlePerspective.PROSPECTIVE,
|
|
76
|
+
[ArticleCategory.MONTH_AHEAD]: ArticlePerspective.PROSPECTIVE,
|
|
77
|
+
[ArticleCategory.YEAR_AHEAD]: ArticlePerspective.PROSPECTIVE,
|
|
78
|
+
[ArticleCategory.WEEK_IN_REVIEW]: ArticlePerspective.RETROSPECTIVE,
|
|
79
|
+
[ArticleCategory.MONTH_IN_REVIEW]: ArticlePerspective.RETROSPECTIVE,
|
|
80
|
+
[ArticleCategory.YEAR_IN_REVIEW]: ArticlePerspective.RETROSPECTIVE,
|
|
81
|
+
[ArticleCategory.BREAKING_NEWS]: ArticlePerspective.REAL_TIME,
|
|
82
|
+
[ArticleCategory.COMMITTEE_REPORTS]: ArticlePerspective.RETROSPECTIVE,
|
|
83
|
+
[ArticleCategory.MOTIONS]: ArticlePerspective.RETROSPECTIVE,
|
|
84
|
+
[ArticleCategory.PROPOSITIONS]: ArticlePerspective.PROSPECTIVE,
|
|
85
|
+
[ArticleCategory.DEEP_ANALYSIS]: ArticlePerspective.ANALYTICAL,
|
|
86
|
+
};
|
|
87
|
+
/** Mapping from periodic categories to their time period scope */
|
|
88
|
+
export const CATEGORY_TIME_PERIOD = {
|
|
89
|
+
[ArticleCategory.WEEK_AHEAD]: TimePeriod.WEEK,
|
|
90
|
+
[ArticleCategory.MONTH_AHEAD]: TimePeriod.MONTH,
|
|
91
|
+
[ArticleCategory.YEAR_AHEAD]: TimePeriod.YEAR,
|
|
92
|
+
[ArticleCategory.WEEK_IN_REVIEW]: TimePeriod.WEEK,
|
|
93
|
+
[ArticleCategory.MONTH_IN_REVIEW]: TimePeriod.MONTH,
|
|
94
|
+
[ArticleCategory.YEAR_IN_REVIEW]: TimePeriod.YEAR,
|
|
95
|
+
};
|
|
96
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,sCAAsC;AAoCtC;;;;GAIG;AACH,MAAM,CAAN,IAAY,eAqBX;AArBD,WAAY,eAAe;IACzB,8BAA8B;IAC9B,4CAAyB,CAAA;IACzB,8CAA2B,CAAA;IAC3B,4CAAyB,CAAA;IAEzB,+BAA+B;IAC/B,oDAAiC,CAAA;IACjC,sDAAmC,CAAA;IACnC,oDAAiC,CAAA;IAEjC,YAAY;IACZ,6CAA0B,CAAA;IAE1B,kBAAkB;IAClB,0DAAuC,CAAA;IACvC,sCAAmB,CAAA;IACnB,gDAA6B,CAAA;IAE7B,aAAa;IACb,kDAA+B,CAAA;AACjC,CAAC,EArBW,eAAe,KAAf,eAAe,QAqB1B;AAED;;;GAGG;AACH,MAAM,CAAN,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,0DAA0D;IAC1D,iDAA2B,CAAA;IAC3B,2DAA2D;IAC3D,qDAA+B,CAAA;IAC/B,uDAAuD;IACvD,6CAAuB,CAAA;IACvB,wDAAwD;IACxD,+CAAyB,CAAA;AAC3B,CAAC,EATW,kBAAkB,KAAlB,kBAAkB,QAS7B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,UAIX;AAJD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,6BAAe,CAAA;IACf,2BAAa,CAAA;AACf,CAAC,EAJW,UAAU,KAAV,UAAU,QAIrB;AAED;;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I;IAC7C,CAAC,eAAe,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC,KAAK;IAC/C,CAAC,eAAe,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,IAAI;IAC7C,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,IAAI;IACjD,CAAC,eAAe,CAAC,eAAe,CAAC,EAAE,UAAU,CAAC,KAAK;IACnD,CAAC,eAAe,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,IAAI;CAClD,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Types/Generation
|
|
3
|
+
* @description Types for the article generation pipeline — article options, metadata,
|
|
4
|
+
* sitemap entries, and generation statistics.
|
|
5
|
+
*/
|
|
6
|
+
import type { AnalysisPerspective, ArticleCategory, LanguageCode } from './common.js';
|
|
7
|
+
/** Parsed article metadata from filename */
|
|
8
|
+
export interface ParsedArticle {
|
|
9
|
+
date: string;
|
|
10
|
+
slug: string;
|
|
11
|
+
lang: LanguageCode;
|
|
12
|
+
filename: string;
|
|
13
|
+
}
|
|
14
|
+
/** Article source reference */
|
|
15
|
+
export interface ArticleSource {
|
|
16
|
+
title: string;
|
|
17
|
+
url: string;
|
|
18
|
+
}
|
|
19
|
+
/** Options for generating article HTML */
|
|
20
|
+
export interface ArticleOptions {
|
|
21
|
+
slug: string;
|
|
22
|
+
title: string;
|
|
23
|
+
subtitle: string;
|
|
24
|
+
date: string;
|
|
25
|
+
category: ArticleCategory;
|
|
26
|
+
readTime: number;
|
|
27
|
+
lang: LanguageCode;
|
|
28
|
+
content: string;
|
|
29
|
+
keywords?: string[] | undefined;
|
|
30
|
+
sources?: ArticleSource[] | undefined;
|
|
31
|
+
analysisPerspectives?: AnalysisPerspective[] | undefined;
|
|
32
|
+
/** SRI hash (sha256/sha384/sha512) for the styles.css link (e.g. "sha384-…"). If provided, adds integrity and crossorigin attributes. */
|
|
33
|
+
stylesHash?: string | undefined;
|
|
34
|
+
/** Languages for which this article has been generated. When provided, the language switcher only shows links for these languages. Defaults to all supported languages. */
|
|
35
|
+
availableLanguages?: ReadonlyArray<LanguageCode> | undefined;
|
|
36
|
+
}
|
|
37
|
+
/** Sitemap URL entry */
|
|
38
|
+
export interface SitemapUrl {
|
|
39
|
+
loc: string;
|
|
40
|
+
lastmod: string;
|
|
41
|
+
changefreq: string;
|
|
42
|
+
priority: string;
|
|
43
|
+
}
|
|
44
|
+
/** News article metadata entry */
|
|
45
|
+
export interface ArticleMetadataEntry {
|
|
46
|
+
filename: string;
|
|
47
|
+
date: string;
|
|
48
|
+
slug: string;
|
|
49
|
+
lang: LanguageCode;
|
|
50
|
+
title: string;
|
|
51
|
+
description?: string | undefined;
|
|
52
|
+
type?: string | undefined;
|
|
53
|
+
}
|
|
54
|
+
/** News metadata database */
|
|
55
|
+
export interface NewsMetadataDatabase {
|
|
56
|
+
lastUpdated: string;
|
|
57
|
+
articles: ArticleMetadataEntry[];
|
|
58
|
+
}
|
|
59
|
+
/** Date range for article generation */
|
|
60
|
+
export interface DateRange {
|
|
61
|
+
start: string;
|
|
62
|
+
end: string;
|
|
63
|
+
}
|
|
64
|
+
/** Generation statistics */
|
|
65
|
+
export interface GenerationStats {
|
|
66
|
+
generated: number;
|
|
67
|
+
skipped: number;
|
|
68
|
+
dryRun: number;
|
|
69
|
+
errors: number;
|
|
70
|
+
articles: string[];
|
|
71
|
+
timestamp: string;
|
|
72
|
+
/** Count of translation quality warnings emitted during generation */
|
|
73
|
+
translationWarnings?: number;
|
|
74
|
+
}
|
|
75
|
+
/** Generation result */
|
|
76
|
+
export interface GenerationResult {
|
|
77
|
+
success: boolean;
|
|
78
|
+
files?: number | undefined;
|
|
79
|
+
slug?: string | undefined;
|
|
80
|
+
error?: string | undefined;
|
|
81
|
+
}
|
|
82
|
+
/** Article quality score metadata */
|
|
83
|
+
export interface ArticleQualityScore {
|
|
84
|
+
/** Approximate word count (HTML-stripped) */
|
|
85
|
+
wordCount: number;
|
|
86
|
+
/** Number of analysis sections (excludes visualization sections like dashboard, mindmap, SWOT) */
|
|
87
|
+
analysisSections: number;
|
|
88
|
+
/** Number of data visualizations (charts, dashboards, mindmaps, SWOT analyses) */
|
|
89
|
+
visualizationCount: number;
|
|
90
|
+
/** Number of external evidence references (links to EP resources with a path beyond the homepage) */
|
|
91
|
+
evidenceReferences: number;
|
|
92
|
+
/** Overall quality rating */
|
|
93
|
+
overallScore: 'excellent' | 'good' | 'adequate' | 'needs-improvement';
|
|
94
|
+
}
|
|
95
|
+
/** Table of contents entry */
|
|
96
|
+
export interface TOCEntry {
|
|
97
|
+
/** Anchor id (without #) */
|
|
98
|
+
id: string;
|
|
99
|
+
/** Display label */
|
|
100
|
+
label: string;
|
|
101
|
+
/** Nesting level (1 = top-level) */
|
|
102
|
+
level: 1 | 2;
|
|
103
|
+
}
|
|
104
|
+
//# sourceMappingURL=generation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../../src/types/generation.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEtF,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,+BAA+B;AAC/B,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,0CAA0C;AAC1C,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,eAAe,CAAC;IAC1B,QAAQ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C;IACf,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,mBAAmB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,wBAAwB;AACxB,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED,qCAAqC;AACrC,MAAM,WAAW,mBAAmB;IAClC,6CAA6C;IAC7C,SAAS,EAAE,MAAM,CAAC;IAClB,kGAAkG;IAClG,gBAAgB,EAAE,MAAM,CAAC;IACzB,kFAAkF;IAClF,kBAAkB,EAAE,MAAM,CAAC;IAC3B,qGAAqG;IACrG,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6BAA6B;IAC7B,YAAY,EAAE,WAAW,GAAG,MAAM,GAAG,UAAU,GAAG,mBAAmB,CAAC;CACvE;AAED,8BAA8B;AAC9B,MAAM,WAAW,QAAQ;IACvB,4BAA4B;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,oCAAoC;IACpC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC;CACd"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generation.js","sourceRoot":"","sources":["../../src/types/generation.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,sCAAsC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Types
|
|
3
|
+
* @description Barrel re-export for all EU Parliament Monitor type definitions.
|
|
4
|
+
*
|
|
5
|
+
* Bounded contexts:
|
|
6
|
+
* - **common** — Language codes, article enums, category mappings
|
|
7
|
+
* - **parliament** — Domain entities (events, committees, documents, voting)
|
|
8
|
+
* - **generation** — Article pipeline (options, metadata, stats)
|
|
9
|
+
* - **mcp** — MCP client transport and tool option interfaces
|
|
10
|
+
* - **world-bank** — World Bank economic data types for article enrichment
|
|
11
|
+
*/
|
|
12
|
+
export { type LanguageCode, type RTLLanguageCode, type AnyLanguageCode, ArticleCategory, ArticlePerspective, TimePeriod, AnalysisPerspective, CATEGORY_PERSPECTIVE, CATEGORY_TIME_PERIOD, type LanguagePreset, type LanguageMap, type ArticleCategoryLabels, type LangTitleSubtitle, type PropositionsStrings, type EditorialStrings, type MotionsStrings, type WeekAheadStrings, type WeekAheadStakeholderStrings, type StakeholderImpactRow, type StakeholderImpactSection, type PoliticalTemperatureBand, type PoliticalTemperature, type BreakingStrings, type ActionConsequence, type StakeholderOutcome, type PoliticalMistake, type DeepAnalysis, type DeepAnalysisStrings, type CommitteeAnalysisContentStrings, } from './common.js';
|
|
13
|
+
export type { ParliamentEvent, CommitteeMeeting, LegislativeDocument, LegislativeProcedure, ParliamentaryQuestion, WeekAheadData, CommitteeDocument, CommitteeData, VotingRecord, VotingPattern, VotingAnomaly, MotionsQuestion, VotingAnomalyIntelligence, CoalitionIntelligence, MEPInfluenceScore, LegislativeVelocity, EPFeedItem, AdoptedTextFeedItem, EventFeedItem, ProcedureFeedItem, MEPFeedItem, DocumentFeedItem, QuestionFeedItem, DeclarationFeedItem, CorporateBodyFeedItem, BreakingNewsFeedData, EPFeedData, VotingIntensity, CoalitionShift, PolarizationIndex, PoliticalSignificanceScore, VotingTrend, CoalitionStabilityReport, LegislativeVelocityReport, } from './parliament.js';
|
|
14
|
+
export type { ParsedArticle, ArticleSource, ArticleOptions, SitemapUrl, ArticleMetadataEntry, NewsMetadataDatabase, DateRange, GenerationStats, GenerationResult, ArticleQualityScore, TOCEntry, } from './generation.js';
|
|
15
|
+
export { type MCPClientOptions, type MCPContentItem, type MCPToolResult, type JSONRPCRequest, type JSONRPCResponse, type PendingRequest, type GetMEPsOptions, type GetPlenarySessionsOptions, type SearchDocumentsOptions, type GetParliamentaryQuestionsOptions, type GetCommitteeInfoOptions, type MonitorLegislativePipelineOptions, type AssessMEPInfluenceOptions, type AnalyzeCoalitionDynamicsOptions, type DetectVotingAnomaliesOptions, type ComparePoliticalGroupsOptions, type AnalyzeLegislativeEffectivenessOptions, type VotingRecordsOptions, type VotingPatternsOptions, type ReportType, type GenerateReportOptions, type AnalyzeCommitteeActivityOptions, type TrackMEPAttendanceOptions, type AnalyzeCountryDelegationOptions, type GeneratePoliticalLandscapeOptions, type GetCurrentMEPsOptions, type GetSpeechesOptions, type GetProceduresOptions, type GetAdoptedTextsOptions, type GetEventsOptions, type GetMeetingActivitiesOptions, type GetMeetingDecisionsOptions, type GetMEPDeclarationsOptions, type GetIncomingMEPsOptions, type GetOutgoingMEPsOptions, type GetHomonymMEPsOptions, type GetPlenaryDocumentsOptions, type GetCommitteeDocumentsOptions, type GetPlenarySessionDocumentsOptions, type GetPlenarySessionDocumentItemsOptions, type GetControlledVocabulariesOptions, type GetExternalDocumentsOptions, type GetMeetingForeseenActivitiesOptions, type GetProcedureEventsOptions, type GetMeetingPlenarySessionDocumentsOptions, type GetMeetingPlenarySessionDocumentItemsOptions, type NetworkAnalysisOptions, type SentimentTrackerOptions, type EarlyWarningSystemOptions, type ComparativeIntelligenceOptions, type CorrelateIntelligenceOptions, type GeneratedStatsCategory, type GetAllGeneratedStatsOptions, type FeedTimeframe, type FeedBaseOptions, type GetMEPsFeedOptions, type GetEventsFeedOptions, type GetProceduresFeedOptions, type GetAdoptedTextsFeedOptions, type GetMEPDeclarationsFeedOptions, type GetDocumentsFeedOptions, type GetPlenaryDocumentsFeedOptions, type GetCommitteeDocumentsFeedOptions, type GetPlenarySessionDocumentsFeedOptions, type GetExternalDocumentsFeedOptions, type GetParliamentaryQuestionsFeedOptions, type GetCorporateBodiesFeedOptions, type GetControlledVocabulariesFeedOptions, } from './mcp.js';
|
|
16
|
+
export type { WBMCPClientOptions, WorldBankIndicator, WorldBankCountry, EconomicContext, EconomicIndicatorSummary, EUCountryCodeMap, PolicyRelevantIndicators, } from './world-bank.js';
|
|
17
|
+
export type { SwotItem, SwotAnalysis, SwotStrings, SwotBuilderStrings, SwotDimensionName, StakeholderType, SwotDimension, SwotCrossReference, TemporalSwotAssessment, MultiDimensionalSwot, MultiDimensionalSwotStrings, DashboardMetric, ChartDataset, ChartData, ChartConfig, DashboardPanel, DashboardConfig, DashboardStrings, DashboardBuilderStrings, MindmapNodeCategory, PolicyConnectionType, PolicyConnectionStrength, ActorType, MindmapBranchColor, MindmapNode, MindmapLayer, PolicyConnection, ActorNode, InfluenceWeight, IntelligenceMindmap, VotingBloc, VoteHighlight, CoalitionMetrics, LegislativePipeline, TrendMetric, TrendAnalytics, StakeholderMetric, } from './visualization.js';
|
|
18
|
+
export type { ArticleGrade, AnalysisDepthScore, StakeholderCoverage, VisualizationQuality, ArticleQualityReport, } from './quality.js';
|
|
19
|
+
export type { CrossReferenceRelationship, CrossReferenceStrength, ArticleCrossReference, TrendCategory, TrendDirection, TrendConfidence, TrendDetection, ArticleSeriesStatus, ArticleSeries, ArticleIndexEntry, IntelligenceIndex, } from './intelligence.js';
|
|
20
|
+
export type { ConfidenceLevel, EvidenceReference, ReasoningChain, ScenarioStakeholderImpact, Scenario, ScenarioPlanning, EnhancedAnalysisIteration, AnalysisQualityMetadata, EnhancedDeepAnalysis, } from './analysis.js';
|
|
21
|
+
export type { AnalysisStakeholderType, StakeholderImpact, StakeholderSeverity, StakeholderPerspective, AnalysisIterationType, AnalysisIteration, StakeholderOutcomeMatrix, } from './stakeholder.js';
|
|
22
|
+
export { ALL_STAKEHOLDER_TYPES } from './stakeholder.js';
|
|
23
|
+
export type { TranslationValidationResult, TranslationValidationMetrics, } from '../utils/content-validator.js';
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;GA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EACzB,uBAAuB,EACvB,oBAAoB,GACrB,MAAM,eAAe,CAAC;AAEvB,YAAY,EACV,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,YAAY,EACV,2BAA2B,EAC3B,4BAA4B,GAC7B,MAAM,+BAA+B,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2024-2026 Hack23 AB
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
/**
|
|
4
|
+
* @module Types
|
|
5
|
+
* @description Barrel re-export for all EU Parliament Monitor type definitions.
|
|
6
|
+
*
|
|
7
|
+
* Bounded contexts:
|
|
8
|
+
* - **common** — Language codes, article enums, category mappings
|
|
9
|
+
* - **parliament** — Domain entities (events, committees, documents, voting)
|
|
10
|
+
* - **generation** — Article pipeline (options, metadata, stats)
|
|
11
|
+
* - **mcp** — MCP client transport and tool option interfaces
|
|
12
|
+
* - **world-bank** — World Bank economic data types for article enrichment
|
|
13
|
+
*/
|
|
14
|
+
export { ArticleCategory, ArticlePerspective, TimePeriod, AnalysisPerspective, CATEGORY_PERSPECTIVE, CATEGORY_TIME_PERIOD, } from './common.js';
|
|
15
|
+
export { ALL_STAKEHOLDER_TYPES } from './stakeholder.js';
|
|
16
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,sCAAsC;AAEtC;;;;;;;;;;GAUG;AAEH,OAAO,EAIL,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GAqBrB,MAAM,aAAa,CAAC;AA0NrB,OAAO,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module Types/Intelligence
|
|
3
|
+
* @description Cross-article intelligence types for parliamentary trend tracking.
|
|
4
|
+
* Enables trend detection, historical context linking, and unified intelligence
|
|
5
|
+
* reporting across all article types.
|
|
6
|
+
*/
|
|
7
|
+
import type { ArticleCategory, LanguageCode } from './common.js';
|
|
8
|
+
/**
|
|
9
|
+
* Describes a directional relationship between two articles.
|
|
10
|
+
* - `follows_up`: Current article is a follow-up to the target (target is older)
|
|
11
|
+
* - `preceded_by`: Current article precedes the target (target is newer)
|
|
12
|
+
* - `related`: Articles share significant topic/actor overlap
|
|
13
|
+
* - `contradicts`: Articles present opposing analyses
|
|
14
|
+
* - `deepens`: Current article provides deeper analysis of the target
|
|
15
|
+
*/
|
|
16
|
+
export type CrossReferenceRelationship = 'follows_up' | 'preceded_by' | 'related' | 'contradicts' | 'deepens';
|
|
17
|
+
/** Signal strength of a cross-reference link */
|
|
18
|
+
export type CrossReferenceStrength = 'strong' | 'moderate' | 'weak';
|
|
19
|
+
/**
|
|
20
|
+
* A directional reference from one article to another.
|
|
21
|
+
* Used to build navigational and analytical links between related content.
|
|
22
|
+
*/
|
|
23
|
+
export interface ArticleCrossReference {
|
|
24
|
+
/** Identifier of the referenced article (YYYY-MM-DD-slug-lang) */
|
|
25
|
+
targetArticleId: string;
|
|
26
|
+
/** Nature of the relationship from the source article's perspective */
|
|
27
|
+
relationship: CrossReferenceRelationship;
|
|
28
|
+
/** Human-readable description of why these articles are linked */
|
|
29
|
+
context: string;
|
|
30
|
+
/** How strongly the two articles are related */
|
|
31
|
+
strength: CrossReferenceStrength;
|
|
32
|
+
}
|
|
33
|
+
/** Trend category classifying the political domain */
|
|
34
|
+
export type TrendCategory = 'coalition' | 'legislative' | 'procedural' | 'political';
|
|
35
|
+
/** Direction of trend movement over time */
|
|
36
|
+
export type TrendDirection = 'strengthening' | 'weakening' | 'stable' | 'emerging';
|
|
37
|
+
/** Confidence level in a detected trend */
|
|
38
|
+
export type TrendConfidence = 'high' | 'medium' | 'low';
|
|
39
|
+
/**
|
|
40
|
+
* A parliamentary trend detected across multiple articles.
|
|
41
|
+
* Requires a minimum of 2 article references to be valid.
|
|
42
|
+
*/
|
|
43
|
+
export interface TrendDetection {
|
|
44
|
+
/** Unique trend identifier */
|
|
45
|
+
id: string;
|
|
46
|
+
/** Human-readable trend name */
|
|
47
|
+
name: string;
|
|
48
|
+
/** Political domain this trend belongs to */
|
|
49
|
+
category: TrendCategory;
|
|
50
|
+
/** Current momentum direction */
|
|
51
|
+
direction: TrendDirection;
|
|
52
|
+
/** ISO date when this trend was first observed */
|
|
53
|
+
firstSeen: string;
|
|
54
|
+
/** ISO date when this trend was most recently updated */
|
|
55
|
+
lastUpdated: string;
|
|
56
|
+
/** Identifiers of articles that contribute evidence for this trend */
|
|
57
|
+
articleReferences: string[];
|
|
58
|
+
/** Key evidence points supporting the trend */
|
|
59
|
+
evidence: string[];
|
|
60
|
+
/** Reliability of the trend detection */
|
|
61
|
+
confidence: TrendConfidence;
|
|
62
|
+
}
|
|
63
|
+
/** Lifecycle status of an article series */
|
|
64
|
+
export type ArticleSeriesStatus = 'ongoing' | 'concluded';
|
|
65
|
+
/**
|
|
66
|
+
* A named series of articles tracking a single legislative procedure or topic.
|
|
67
|
+
*/
|
|
68
|
+
export interface ArticleSeries {
|
|
69
|
+
/** Unique series identifier */
|
|
70
|
+
id: string;
|
|
71
|
+
/** Human-readable series name */
|
|
72
|
+
name: string;
|
|
73
|
+
/** Optional EP procedure reference (e.g. "2024/0001(COD)") */
|
|
74
|
+
procedureRef?: string | undefined;
|
|
75
|
+
/** Ordered list of article IDs in this series */
|
|
76
|
+
articles: string[];
|
|
77
|
+
/** Whether the series is still being updated */
|
|
78
|
+
status: ArticleSeriesStatus;
|
|
79
|
+
/** Brief editorial summary of the series arc */
|
|
80
|
+
summary: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Lightweight index entry for a single generated article.
|
|
84
|
+
* The `id` follows the convention YYYY-MM-DD-slug-lang
|
|
85
|
+
* (e.g. "2025-03-10-week-ahead-en" or "2025-02-14-ai-regulation-committee-fr").
|
|
86
|
+
*/
|
|
87
|
+
export interface ArticleIndexEntry {
|
|
88
|
+
/** Article identifier: YYYY-MM-DD-slug-lang */
|
|
89
|
+
id: string;
|
|
90
|
+
/** ISO date string (YYYY-MM-DD) */
|
|
91
|
+
date: string;
|
|
92
|
+
/** Article category / type */
|
|
93
|
+
type: ArticleCategory;
|
|
94
|
+
/** Language code */
|
|
95
|
+
lang: LanguageCode;
|
|
96
|
+
/** Key topics covered in the article */
|
|
97
|
+
keyTopics: string[];
|
|
98
|
+
/** Key actors (MEPs, committees, political groups) mentioned */
|
|
99
|
+
keyActors: string[];
|
|
100
|
+
/** EP procedure references covered in the article */
|
|
101
|
+
procedures: string[];
|
|
102
|
+
/** Cross-references to other articles */
|
|
103
|
+
crossReferences: ArticleCrossReference[];
|
|
104
|
+
/** Trend IDs this article contributes evidence for */
|
|
105
|
+
trendContributions: string[];
|
|
106
|
+
/** Series ID if this article belongs to a series */
|
|
107
|
+
seriesId?: string | undefined;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The top-level intelligence index that aggregates cross-article analytics.
|
|
111
|
+
* Uses `Record<string, string[]>` (not Map) for JSON serialisation compatibility.
|
|
112
|
+
*/
|
|
113
|
+
export interface IntelligenceIndex {
|
|
114
|
+
/** All indexed articles */
|
|
115
|
+
articles: ArticleIndexEntry[];
|
|
116
|
+
/** Actor name → list of article IDs mentioning that actor */
|
|
117
|
+
actors: Record<string, string[]>;
|
|
118
|
+
/** Policy domain keyword → list of article IDs covering that domain */
|
|
119
|
+
policyDomains: Record<string, string[]>;
|
|
120
|
+
/** EP procedure reference → list of article IDs covering that procedure */
|
|
121
|
+
procedures: Record<string, string[]>;
|
|
122
|
+
/** Detected trends across articles */
|
|
123
|
+
trends: TrendDetection[];
|
|
124
|
+
/** Article series groupings */
|
|
125
|
+
series: ArticleSeries[];
|
|
126
|
+
/** ISO timestamp of last index update */
|
|
127
|
+
lastUpdated: string;
|
|
128
|
+
}
|
|
129
|
+
//# sourceMappingURL=intelligence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intelligence.d.ts","sourceRoot":"","sources":["../../src/types/intelligence.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEjE;;;;;;;GAOG;AACH,MAAM,MAAM,0BAA0B,GAClC,YAAY,GACZ,aAAa,GACb,SAAS,GACT,aAAa,GACb,SAAS,CAAC;AAEd,gDAAgD;AAChD,MAAM,MAAM,sBAAsB,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAC;AAEpE;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;IACxB,uEAAuE;IACvE,YAAY,EAAE,0BAA0B,CAAC;IACzC,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,EAAE,sBAAsB,CAAC;CAClC;AAED,sDAAsD;AACtD,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,aAAa,GAAG,YAAY,GAAG,WAAW,CAAC;AAErF,4CAA4C;AAC5C,MAAM,MAAM,cAAc,GAAG,eAAe,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnF,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,KAAK,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,8BAA8B;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,QAAQ,EAAE,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